@golstats/gsc-reports 1.0.15 → 1.0.17
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-55d68355-D7c85b60-BeVAzjri-BT3CP-hm.js → FilterConditions-55d68355-BUvCA8gG-DjZgGsnU-xsrKmbVq.js} +1 -1
- package/dist/{FilterField-59a73e38-DmiT50dq-Cj1GXuko-DF3fgDXP.js → FilterField-59a73e38-C85AzksG-RWEzJGyx-Cq-Qpyh6.js} +1 -1
- package/dist/{FilterSubcategories-a9b32cc9-kojMDEWU-C_Rs1m8o-BOF4Ftj0.js → FilterSubcategories-a9b32cc9-B7ERo60D-C_SWzEDH-Qc0YJtkJ.js} +1 -1
- package/dist/gsc-reports.css +1 -1
- package/dist/gsc-reports.es.js +1 -1
- package/dist/gsc-reports.umd.js +13 -13
- package/dist/{index-DYg7OThv.js → index-Dxm0wpEh.js} +23 -22
- package/package.json +2 -2
package/dist/gsc-reports.umd.js
CHANGED
|
@@ -4027,22 +4027,22 @@ uniform ${De} ${Ue} u_${rt};
|
|
|
4027
4027
|
#endif
|
|
4028
4028
|
`}),staticAttributes:R,staticUniforms:ie}}class Fn{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(i,s,R,B,G,ie,pe,xe,Se){this.context=i;let De=this.boundPaintVertexBuffers.length!==B.length;for(let Ue=0;!De&&Ue<B.length;Ue++)this.boundPaintVertexBuffers[Ue]!==B[Ue]&&(De=!0);!this.vao||this.boundProgram!==s||this.boundLayoutVertexBuffer!==R||De||this.boundIndexBuffer!==G||this.boundVertexOffset!==ie||this.boundDynamicVertexBuffer!==pe||this.boundDynamicVertexBuffer2!==xe||this.boundDynamicVertexBuffer3!==Se?this.freshBind(s,R,B,G,ie,pe,xe,Se):(i.bindVertexArray.set(this.vao),pe&&pe.bind(),G&&G.dynamicDraw&&G.bind(),xe&&xe.bind(),Se&&Se.bind())}freshBind(i,s,R,B,G,ie,pe,xe){const Se=i.numAttributes,De=this.context,Ue=De.gl;this.vao&&this.destroy(),this.vao=De.createVertexArray(),De.bindVertexArray.set(this.vao),this.boundProgram=i,this.boundLayoutVertexBuffer=s,this.boundPaintVertexBuffers=R,this.boundIndexBuffer=B,this.boundVertexOffset=G,this.boundDynamicVertexBuffer=ie,this.boundDynamicVertexBuffer2=pe,this.boundDynamicVertexBuffer3=xe,s.enableAttributes(Ue,i);for(const rt of R)rt.enableAttributes(Ue,i);ie&&ie.enableAttributes(Ue,i),pe&&pe.enableAttributes(Ue,i),xe&&xe.enableAttributes(Ue,i),s.bind(),s.setVertexAttribPointers(Ue,i,G);for(const rt of R)rt.bind(),rt.setVertexAttribPointers(Ue,i,G);ie&&(ie.bind(),ie.setVertexAttribPointers(Ue,i,G)),B&&B.bind(),pe&&(pe.bind(),pe.setVertexAttribPointers(Ue,i,G)),xe&&(xe.bind(),xe.setVertexAttribPointers(Ue,i,G)),De.currentNumAttributes=Se}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const vr=(F,i,s,R,B)=>({u_matrix:F,u_texture:0,u_ele_delta:i,u_fog_matrix:s,u_fog_color:R?R.properties.get("fog-color"):e.aN.white,u_fog_ground_blend:R?R.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:R?R.calculateFogBlendOpacity(B):0,u_horizon_color:R?R.properties.get("horizon-color"):e.aN.white,u_horizon_fog_blend:R?R.properties.get("horizon-fog-blend"):1});function wr(F){const i=[];for(let s=0;s<F.length;s++){if(F[s]===null)continue;const R=F[s].split(" ");i.push(R.pop())}return i}class tn{constructor(i,s,R,B,G,ie){const pe=i.gl;this.program=pe.createProgram();const xe=wr(s.staticAttributes),Se=R?R.getBinderAttributes():[],De=xe.concat(Se),Ue=kn.prelude.staticUniforms?wr(kn.prelude.staticUniforms):[],rt=s.staticUniforms?wr(s.staticUniforms):[],ct=R?R.getBinderUniforms():[],pt=Ue.concat(rt).concat(ct),vt=[];for(const Jt of pt)vt.indexOf(Jt)<0&&vt.push(Jt);const Mt=R?R.defines():[];G&&Mt.push("#define OVERDRAW_INSPECTOR;"),ie&&Mt.push("#define TERRAIN3D;");const At=Mt.concat(kn.prelude.fragmentSource,s.fragmentSource).join(`
|
|
4029
4029
|
`),Vt=Mt.concat(kn.prelude.vertexSource,s.vertexSource).join(`
|
|
4030
|
-
`),Et=pe.createShader(pe.FRAGMENT_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Et,At),pe.compileShader(Et),!pe.getShaderParameter(Et,pe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${pe.getShaderInfoLog(Et)}`);pe.attachShader(this.program,Et);const Kt=pe.createShader(pe.VERTEX_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Kt,Vt),pe.compileShader(Kt),!pe.getShaderParameter(Kt,pe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${pe.getShaderInfoLog(Kt)}`);pe.attachShader(this.program,Kt),this.attributes={};const Yt={};this.numAttributes=De.length;for(let Jt=0;Jt<this.numAttributes;Jt++)De[Jt]&&(pe.bindAttribLocation(this.program,Jt,De[Jt]),this.attributes[De[Jt]]=Jt);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(Kt),pe.deleteShader(Et);for(let Jt=0;Jt<vt.length;Jt++){const dr=vt[Jt];if(dr&&!Yt[dr]){const xr=pe.getUniformLocation(this.program,dr);xr&&(Yt[dr]=xr)}}this.fixedUniforms=B(i,Yt),this.terrainUniforms=((Jt,dr)=>({u_depth:new e.aI(Jt,dr.u_depth),u_terrain:new e.aI(Jt,dr.u_terrain),u_terrain_dim:new e.aJ(Jt,dr.u_terrain_dim),u_terrain_matrix:new e.aK(Jt,dr.u_terrain_matrix),u_terrain_unpack:new e.aL(Jt,dr.u_terrain_unpack),u_terrain_exaggeration:new e.aJ(Jt,dr.u_terrain_exaggeration)}))(i,Yt),this.binderUniforms=R?R.getUniforms(i,Yt):[]}draw(i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct,pt,vt,Mt,At,Vt){const Et=i.gl;if(this.failedToCreate)return;if(i.program.set(this.program),i.setDepthMode(R),i.setStencilMode(B),i.setColorMode(G),i.setCullFace(ie),xe){i.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,xe.depthTexture),i.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,xe.texture);for(const Yt in this.terrainUniforms)this.terrainUniforms[Yt].set(xe[Yt])}for(const Yt in this.fixedUniforms)this.fixedUniforms[Yt].set(pe[Yt]);vt&&vt.setUniforms(i,this.binderUniforms,ct,{zoom:pt});let Kt=0;switch(s){case Et.LINES:Kt=2;break;case Et.TRIANGLES:Kt=3;break;case Et.LINE_STRIP:Kt=1}for(const Yt of rt.get()){const Jt=Yt.vaos||(Yt.vaos={});(Jt[Se]||(Jt[Se]=new Fn)).bind(i,this,De,vt?vt.getPaintVertexBuffers():[],Ue,Yt.vertexOffset,Mt,At,Vt),Et.drawElements(s,Yt.primitiveLength*Kt,Et.UNSIGNED_SHORT,Yt.primitiveOffset*Kt*2)}}}function Br(F,i,s){const R=1/Tt(s,1,i.transform.tileZoom),B=Math.pow(2,s.tileID.overscaledZ),G=s.tileSize*Math.pow(2,i.transform.tileZoom)/B,ie=G*(s.tileID.canonical.x+s.tileID.wrap*B),pe=G*s.tileID.canonical.y;return{u_image:0,u_texsize:s.imageAtlasTexture.size,u_scale:[R,F.fromScale,F.toScale],u_fade:F.t,u_pixel_coord_upper:[ie>>16,pe>>16],u_pixel_coord_lower:[65535&ie,65535&pe]}}const rn=(F,i,s,R)=>{const B=i.style.light,G=B.properties.get("position"),ie=[G.x,G.y,G.z],pe=function(){var Se=new e.A(9);return e.A!=Float32Array&&(Se[1]=0,Se[2]=0,Se[3]=0,Se[5]=0,Se[6]=0,Se[7]=0),Se[0]=1,Se[4]=1,Se[8]=1,Se}();B.properties.get("anchor")==="viewport"&&function(Se,De){var Ue=Math.sin(De),rt=Math.cos(De);Se[0]=rt,Se[1]=Ue,Se[2]=0,Se[3]=-Ue,Se[4]=rt,Se[5]=0,Se[6]=0,Se[7]=0,Se[8]=1}(pe,-i.transform.angle),function(Se,De,Ue){var rt=De[0],ct=De[1],pt=De[2];Se[0]=rt*Ue[0]+ct*Ue[3]+pt*Ue[6],Se[1]=rt*Ue[1]+ct*Ue[4]+pt*Ue[7],Se[2]=rt*Ue[2]+ct*Ue[5]+pt*Ue[8]}(ie,ie,pe);const xe=B.properties.get("color");return{u_matrix:F,u_lightpos:ie,u_lightintensity:B.properties.get("intensity"),u_lightcolor:[xe.r,xe.g,xe.b],u_vertical_gradient:+s,u_opacity:R}},bn=(F,i,s,R,B,G,ie)=>e.e(rn(F,i,s,R),Br(G,i,ie),{u_height_factor:-Math.pow(2,B.overscaledZ)/ie.tileSize/8}),yn=F=>({u_matrix:F}),On=(F,i,s,R)=>e.e(yn(F),Br(s,i,R)),Zn=(F,i)=>({u_matrix:F,u_world:i}),fr=(F,i,s,R,B)=>e.e(On(F,i,s,R),{u_world:B}),jr=(F,i,s,R)=>{const B=F.transform;let G,ie;if(R.paint.get("circle-pitch-alignment")==="map"){const pe=Tt(s,1,B.zoom);G=!0,ie=[pe,pe]}else G=!1,ie=B.pixelsToGLUnits;return{u_camera_to_center_distance:B.cameraToCenterDistance,u_scale_with_map:+(R.paint.get("circle-pitch-scale")==="map"),u_matrix:F.translatePosMatrix(i.posMatrix,s,R.paint.get("circle-translate"),R.paint.get("circle-translate-anchor")),u_pitch_with_map:+G,u_device_pixel_ratio:F.pixelRatio,u_extrude_scale:ie}},tr=(F,i)=>({u_matrix:i,u_pixel_extrude_scale:[1/F.width,1/F.height]}),ir=(F,i,s)=>({u_matrix:F,u_inv_matrix:i,u_camera_to_center_distance:s.cameraToCenterDistance,u_viewport_size:[s.width,s.height]}),gr=(F,i,s=1)=>({u_matrix:F,u_color:i,u_overlay:0,u_overlay_scale:s}),Nr=F=>({u_matrix:F}),Rr=(F,i,s,R)=>({u_matrix:F,u_extrude_scale:Tt(i,1,s),u_intensity:R}),Xr=(F,i,s,R)=>{const B=e.H();e.aQ(B,0,F.width,F.height,0,0,1);const G=F.context.gl;return{u_matrix:B,u_world:[G.drawingBufferWidth,G.drawingBufferHeight],u_image:s,u_color_ramp:R,u_opacity:i.paint.get("heatmap-opacity")}},Vr=(F,i,s,R)=>{const B=s.paint.get("hillshade-shadow-color"),G=s.paint.get("hillshade-highlight-color"),ie=s.paint.get("hillshade-accent-color");let pe=s.paint.get("hillshade-illumination-direction")*(Math.PI/180);s.paint.get("hillshade-illumination-anchor")==="viewport"&&(pe-=F.transform.angle);const xe=!F.options.moving;return{u_matrix:R?R.posMatrix:F.transform.calculatePosMatrix(i.tileID.toUnwrapped(),xe),u_image:0,u_latrange:lr(0,i.tileID),u_light:[s.paint.get("hillshade-exaggeration"),pe],u_shadow:B,u_highlight:G,u_accent:ie}},Pr=(F,i)=>{const s=i.stride,R=e.H();return e.aQ(R,0,e.X,-e.X,0,0,1),e.J(R,R,[0,-e.X,0]),{u_matrix:R,u_image:1,u_dimension:[s,s],u_zoom:F.overscaledZ,u_unpack:i.getUnpackVector()}};function lr(F,i){const s=Math.pow(2,i.canonical.z),R=i.canonical.y;return[new e.Z(0,R/s).toLngLat().lat,new e.Z(0,(R+1)/s).toLngLat().lat]}const sr=(F,i,s,R)=>{const B=F.transform;return{u_matrix:fn(F,i,s,R),u_ratio:1/Tt(i,1,B.zoom),u_device_pixel_ratio:F.pixelRatio,u_units_to_pixels:[1/B.pixelsToGLUnits[0],1/B.pixelsToGLUnits[1]]}},Ar=(F,i,s,R,B)=>e.e(sr(F,i,s,B),{u_image:0,u_image_height:R}),Zr=(F,i,s,R,B)=>{const G=F.transform,ie=ln(i,G);return{u_matrix:fn(F,i,s,B),u_texsize:i.imageAtlasTexture.size,u_ratio:1/Tt(i,1,G.zoom),u_device_pixel_ratio:F.pixelRatio,u_image:0,u_scale:[ie,R.fromScale,R.toScale],u_fade:R.t,u_units_to_pixels:[1/G.pixelsToGLUnits[0],1/G.pixelsToGLUnits[1]]}},cn=(F,i,s,R,B,G)=>{const ie=F.transform,pe=F.lineAtlas,xe=ln(i,ie),Se=s.layout.get("line-cap")==="round",De=pe.getDash(R.from,Se),Ue=pe.getDash(R.to,Se),rt=De.width*B.fromScale,ct=Ue.width*B.toScale;return e.e(sr(F,i,s,G),{u_patternscale_a:[xe/rt,-De.height/2],u_patternscale_b:[xe/ct,-Ue.height/2],u_sdfgamma:pe.width/(256*Math.min(rt,ct)*F.pixelRatio)/2,u_image:0,u_tex_y_a:De.y,u_tex_y_b:Ue.y,u_mix:B.t})};function ln(F,i){return 1/Tt(F,1,i.tileZoom)}function fn(F,i,s,R){return F.translatePosMatrix(R?R.posMatrix:i.tileID.posMatrix,i,s.paint.get("line-translate"),s.paint.get("line-translate-anchor"))}const Cn=(F,i,s,R,B)=>{return{u_matrix:F,u_tl_parent:i,u_scale_parent:s,u_buffer_scale:1,u_fade_t:R.mix,u_opacity:R.opacity*B.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:B.paint.get("raster-brightness-min"),u_brightness_high:B.paint.get("raster-brightness-max"),u_saturation_factor:(ie=B.paint.get("raster-saturation"),ie>0?1-1/(1.001-ie):-ie),u_contrast_factor:(G=B.paint.get("raster-contrast"),G>0?1/(1-G):1+G),u_spin_weights:wn(B.paint.get("raster-hue-rotate"))};var G,ie};function wn(F){F*=Math.PI/180;const i=Math.sin(F),s=Math.cos(F);return[(2*s+1)/3,(-Math.sqrt(3)*i-s+1)/3,(Math.sqrt(3)*i-s+1)/3]}const Pn=(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct)=>{const pt=ie.transform;return{u_is_size_zoom_constant:+(F==="constant"||F==="source"),u_is_size_feature_constant:+(F==="constant"||F==="camera"),u_size_t:i?i.uSizeT:0,u_size:i?i.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+s,u_aspect_ratio:pt.width/pt.height,u_fade_change:ie.options.fadeDuration?ie.symbolFadeChange:1,u_matrix:pe,u_label_plane_matrix:xe,u_coord_matrix:Se,u_is_text:+Ue,u_pitch_with_map:+R,u_is_along_line:B,u_is_variable_anchor:G,u_texsize:rt,u_texture:0,u_translation:De,u_pitched_scale:ct}},_n=(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct,pt)=>{const vt=ie.transform;return e.e(Pn(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,pt),{u_gamma_scale:R?Math.cos(vt._pitch)*vt.cameraToCenterDistance:1,u_device_pixel_ratio:ie.pixelRatio,u_is_halo:1})},An=(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct)=>e.e(_n(F,i,s,R,B,G,ie,pe,xe,Se,De,!0,Ue,!0,ct),{u_texsize_icon:rt,u_texture_icon:1}),Dn=(F,i,s)=>({u_matrix:F,u_opacity:i,u_color:s}),ia=(F,i,s,R,B,G)=>e.e(function(ie,pe,xe,Se){const De=xe.imageManager.getPattern(ie.from.toString()),Ue=xe.imageManager.getPattern(ie.to.toString()),{width:rt,height:ct}=xe.imageManager.getPixelSize(),pt=Math.pow(2,Se.tileID.overscaledZ),vt=Se.tileSize*Math.pow(2,xe.transform.tileZoom)/pt,Mt=vt*(Se.tileID.canonical.x+Se.tileID.wrap*pt),At=vt*Se.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:De.tl,u_pattern_br_a:De.br,u_pattern_tl_b:Ue.tl,u_pattern_br_b:Ue.br,u_texsize:[rt,ct],u_mix:pe.t,u_pattern_size_a:De.displaySize,u_pattern_size_b:Ue.displaySize,u_scale_a:pe.fromScale,u_scale_b:pe.toScale,u_tile_units_to_pixels:1/Tt(Se,1,xe.transform.tileZoom),u_pixel_coord_upper:[Mt>>16,At>>16],u_pixel_coord_lower:[65535&Mt,65535&At]}}(R,G,s,B),{u_matrix:F,u_opacity:i}),$n={fillExtrusion:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_lightpos:new e.aO(F,i.u_lightpos),u_lightintensity:new e.aJ(F,i.u_lightintensity),u_lightcolor:new e.aO(F,i.u_lightcolor),u_vertical_gradient:new e.aJ(F,i.u_vertical_gradient),u_opacity:new e.aJ(F,i.u_opacity)}),fillExtrusionPattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_lightpos:new e.aO(F,i.u_lightpos),u_lightintensity:new e.aJ(F,i.u_lightintensity),u_lightcolor:new e.aO(F,i.u_lightcolor),u_vertical_gradient:new e.aJ(F,i.u_vertical_gradient),u_height_factor:new e.aJ(F,i.u_height_factor),u_image:new e.aI(F,i.u_image),u_texsize:new e.aP(F,i.u_texsize),u_pixel_coord_upper:new e.aP(F,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.aP(F,i.u_pixel_coord_lower),u_scale:new e.aO(F,i.u_scale),u_fade:new e.aJ(F,i.u_fade),u_opacity:new e.aJ(F,i.u_opacity)}),fill:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix)}),fillPattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_image:new e.aI(F,i.u_image),u_texsize:new e.aP(F,i.u_texsize),u_pixel_coord_upper:new e.aP(F,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.aP(F,i.u_pixel_coord_lower),u_scale:new e.aO(F,i.u_scale),u_fade:new e.aJ(F,i.u_fade)}),fillOutline:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_world:new e.aP(F,i.u_world)}),fillOutlinePattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_world:new e.aP(F,i.u_world),u_image:new e.aI(F,i.u_image),u_texsize:new e.aP(F,i.u_texsize),u_pixel_coord_upper:new e.aP(F,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.aP(F,i.u_pixel_coord_lower),u_scale:new e.aO(F,i.u_scale),u_fade:new e.aJ(F,i.u_fade)}),circle:(F,i)=>({u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_scale_with_map:new e.aI(F,i.u_scale_with_map),u_pitch_with_map:new e.aI(F,i.u_pitch_with_map),u_extrude_scale:new e.aP(F,i.u_extrude_scale),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_matrix:new e.aK(F,i.u_matrix)}),collisionBox:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_pixel_extrude_scale:new e.aP(F,i.u_pixel_extrude_scale)}),collisionCircle:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_inv_matrix:new e.aK(F,i.u_inv_matrix),u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_viewport_size:new e.aP(F,i.u_viewport_size)}),debug:(F,i)=>({u_color:new e.aM(F,i.u_color),u_matrix:new e.aK(F,i.u_matrix),u_overlay:new e.aI(F,i.u_overlay),u_overlay_scale:new e.aJ(F,i.u_overlay_scale)}),clippingMask:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix)}),heatmap:(F,i)=>({u_extrude_scale:new e.aJ(F,i.u_extrude_scale),u_intensity:new e.aJ(F,i.u_intensity),u_matrix:new e.aK(F,i.u_matrix)}),heatmapTexture:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_world:new e.aP(F,i.u_world),u_image:new e.aI(F,i.u_image),u_color_ramp:new e.aI(F,i.u_color_ramp),u_opacity:new e.aJ(F,i.u_opacity)}),hillshade:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_image:new e.aI(F,i.u_image),u_latrange:new e.aP(F,i.u_latrange),u_light:new e.aP(F,i.u_light),u_shadow:new e.aM(F,i.u_shadow),u_highlight:new e.aM(F,i.u_highlight),u_accent:new e.aM(F,i.u_accent)}),hillshadePrepare:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_image:new e.aI(F,i.u_image),u_dimension:new e.aP(F,i.u_dimension),u_zoom:new e.aJ(F,i.u_zoom),u_unpack:new e.aL(F,i.u_unpack)}),line:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_ratio:new e.aJ(F,i.u_ratio),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_units_to_pixels:new e.aP(F,i.u_units_to_pixels)}),lineGradient:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_ratio:new e.aJ(F,i.u_ratio),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_units_to_pixels:new e.aP(F,i.u_units_to_pixels),u_image:new e.aI(F,i.u_image),u_image_height:new e.aJ(F,i.u_image_height)}),linePattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_texsize:new e.aP(F,i.u_texsize),u_ratio:new e.aJ(F,i.u_ratio),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_image:new e.aI(F,i.u_image),u_units_to_pixels:new e.aP(F,i.u_units_to_pixels),u_scale:new e.aO(F,i.u_scale),u_fade:new e.aJ(F,i.u_fade)}),lineSDF:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_ratio:new e.aJ(F,i.u_ratio),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_units_to_pixels:new e.aP(F,i.u_units_to_pixels),u_patternscale_a:new e.aP(F,i.u_patternscale_a),u_patternscale_b:new e.aP(F,i.u_patternscale_b),u_sdfgamma:new e.aJ(F,i.u_sdfgamma),u_image:new e.aI(F,i.u_image),u_tex_y_a:new e.aJ(F,i.u_tex_y_a),u_tex_y_b:new e.aJ(F,i.u_tex_y_b),u_mix:new e.aJ(F,i.u_mix)}),raster:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_tl_parent:new e.aP(F,i.u_tl_parent),u_scale_parent:new e.aJ(F,i.u_scale_parent),u_buffer_scale:new e.aJ(F,i.u_buffer_scale),u_fade_t:new e.aJ(F,i.u_fade_t),u_opacity:new e.aJ(F,i.u_opacity),u_image0:new e.aI(F,i.u_image0),u_image1:new e.aI(F,i.u_image1),u_brightness_low:new e.aJ(F,i.u_brightness_low),u_brightness_high:new e.aJ(F,i.u_brightness_high),u_saturation_factor:new e.aJ(F,i.u_saturation_factor),u_contrast_factor:new e.aJ(F,i.u_contrast_factor),u_spin_weights:new e.aO(F,i.u_spin_weights)}),symbolIcon:(F,i)=>({u_is_size_zoom_constant:new e.aI(F,i.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aI(F,i.u_is_size_feature_constant),u_size_t:new e.aJ(F,i.u_size_t),u_size:new e.aJ(F,i.u_size),u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_pitch:new e.aJ(F,i.u_pitch),u_rotate_symbol:new e.aI(F,i.u_rotate_symbol),u_aspect_ratio:new e.aJ(F,i.u_aspect_ratio),u_fade_change:new e.aJ(F,i.u_fade_change),u_matrix:new e.aK(F,i.u_matrix),u_label_plane_matrix:new e.aK(F,i.u_label_plane_matrix),u_coord_matrix:new e.aK(F,i.u_coord_matrix),u_is_text:new e.aI(F,i.u_is_text),u_pitch_with_map:new e.aI(F,i.u_pitch_with_map),u_is_along_line:new e.aI(F,i.u_is_along_line),u_is_variable_anchor:new e.aI(F,i.u_is_variable_anchor),u_texsize:new e.aP(F,i.u_texsize),u_texture:new e.aI(F,i.u_texture),u_translation:new e.aP(F,i.u_translation),u_pitched_scale:new e.aJ(F,i.u_pitched_scale)}),symbolSDF:(F,i)=>({u_is_size_zoom_constant:new e.aI(F,i.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aI(F,i.u_is_size_feature_constant),u_size_t:new e.aJ(F,i.u_size_t),u_size:new e.aJ(F,i.u_size),u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_pitch:new e.aJ(F,i.u_pitch),u_rotate_symbol:new e.aI(F,i.u_rotate_symbol),u_aspect_ratio:new e.aJ(F,i.u_aspect_ratio),u_fade_change:new e.aJ(F,i.u_fade_change),u_matrix:new e.aK(F,i.u_matrix),u_label_plane_matrix:new e.aK(F,i.u_label_plane_matrix),u_coord_matrix:new e.aK(F,i.u_coord_matrix),u_is_text:new e.aI(F,i.u_is_text),u_pitch_with_map:new e.aI(F,i.u_pitch_with_map),u_is_along_line:new e.aI(F,i.u_is_along_line),u_is_variable_anchor:new e.aI(F,i.u_is_variable_anchor),u_texsize:new e.aP(F,i.u_texsize),u_texture:new e.aI(F,i.u_texture),u_gamma_scale:new e.aJ(F,i.u_gamma_scale),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_is_halo:new e.aI(F,i.u_is_halo),u_translation:new e.aP(F,i.u_translation),u_pitched_scale:new e.aJ(F,i.u_pitched_scale)}),symbolTextAndIcon:(F,i)=>({u_is_size_zoom_constant:new e.aI(F,i.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aI(F,i.u_is_size_feature_constant),u_size_t:new e.aJ(F,i.u_size_t),u_size:new e.aJ(F,i.u_size),u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_pitch:new e.aJ(F,i.u_pitch),u_rotate_symbol:new e.aI(F,i.u_rotate_symbol),u_aspect_ratio:new e.aJ(F,i.u_aspect_ratio),u_fade_change:new e.aJ(F,i.u_fade_change),u_matrix:new e.aK(F,i.u_matrix),u_label_plane_matrix:new e.aK(F,i.u_label_plane_matrix),u_coord_matrix:new e.aK(F,i.u_coord_matrix),u_is_text:new e.aI(F,i.u_is_text),u_pitch_with_map:new e.aI(F,i.u_pitch_with_map),u_is_along_line:new e.aI(F,i.u_is_along_line),u_is_variable_anchor:new e.aI(F,i.u_is_variable_anchor),u_texsize:new e.aP(F,i.u_texsize),u_texsize_icon:new e.aP(F,i.u_texsize_icon),u_texture:new e.aI(F,i.u_texture),u_texture_icon:new e.aI(F,i.u_texture_icon),u_gamma_scale:new e.aJ(F,i.u_gamma_scale),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_is_halo:new e.aI(F,i.u_is_halo),u_translation:new e.aP(F,i.u_translation),u_pitched_scale:new e.aJ(F,i.u_pitched_scale)}),background:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_opacity:new e.aJ(F,i.u_opacity),u_color:new e.aM(F,i.u_color)}),backgroundPattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_opacity:new e.aJ(F,i.u_opacity),u_image:new e.aI(F,i.u_image),u_pattern_tl_a:new e.aP(F,i.u_pattern_tl_a),u_pattern_br_a:new e.aP(F,i.u_pattern_br_a),u_pattern_tl_b:new e.aP(F,i.u_pattern_tl_b),u_pattern_br_b:new e.aP(F,i.u_pattern_br_b),u_texsize:new e.aP(F,i.u_texsize),u_mix:new e.aJ(F,i.u_mix),u_pattern_size_a:new e.aP(F,i.u_pattern_size_a),u_pattern_size_b:new e.aP(F,i.u_pattern_size_b),u_scale_a:new e.aJ(F,i.u_scale_a),u_scale_b:new e.aJ(F,i.u_scale_b),u_pixel_coord_upper:new e.aP(F,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.aP(F,i.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aJ(F,i.u_tile_units_to_pixels)}),terrain:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_texture:new e.aI(F,i.u_texture),u_ele_delta:new e.aJ(F,i.u_ele_delta),u_fog_matrix:new e.aK(F,i.u_fog_matrix),u_fog_color:new e.aM(F,i.u_fog_color),u_fog_ground_blend:new e.aJ(F,i.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.aJ(F,i.u_fog_ground_blend_opacity),u_horizon_color:new e.aM(F,i.u_horizon_color),u_horizon_fog_blend:new e.aJ(F,i.u_horizon_fog_blend)}),terrainDepth:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_ele_delta:new e.aJ(F,i.u_ele_delta)}),terrainCoords:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_texture:new e.aI(F,i.u_texture),u_terrain_coords_id:new e.aJ(F,i.u_terrain_coords_id),u_ele_delta:new e.aJ(F,i.u_ele_delta)}),sky:(F,i)=>({u_sky_color:new e.aM(F,i.u_sky_color),u_horizon_color:new e.aM(F,i.u_horizon_color),u_horizon:new e.aJ(F,i.u_horizon),u_sky_horizon_blend:new e.aJ(F,i.u_sky_horizon_blend)})};class Nn{constructor(i,s,R){this.context=i;const B=i.gl;this.buffer=B.createBuffer(),this.dynamicDraw=!!R,this.context.unbindVAO(),i.bindElementBuffer.set(this.buffer),B.bufferData(B.ELEMENT_ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?B.DYNAMIC_DRAW:B.STATIC_DRAW),this.dynamicDraw||delete s.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(i){const s=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),s.bufferSubData(s.ELEMENT_ARRAY_BUFFER,0,i.arrayBuffer)}destroy(){const i=this.context.gl;this.buffer&&(i.deleteBuffer(this.buffer),delete this.buffer)}}const Qn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class va{constructor(i,s,R,B){this.length=s.length,this.attributes=R,this.itemSize=s.bytesPerElement,this.dynamicDraw=B,this.context=i;const G=i.gl;this.buffer=G.createBuffer(),i.bindVertexBuffer.set(this.buffer),G.bufferData(G.ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?G.DYNAMIC_DRAW:G.STATIC_DRAW),this.dynamicDraw||delete s.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(i){if(i.length!==this.length)throw new Error(`Length of new data is ${i.length}, which doesn't match current length of ${this.length}`);const s=this.context.gl;this.bind(),s.bufferSubData(s.ARRAY_BUFFER,0,i.arrayBuffer)}enableAttributes(i,s){for(let R=0;R<this.attributes.length;R++){const B=this.attributes[R],G=s.attributes[B.name];G!==void 0&&i.enableVertexAttribArray(G)}}setVertexAttribPointers(i,s,R){for(let B=0;B<this.attributes.length;B++){const G=this.attributes[B],ie=s.attributes[G.name];ie!==void 0&&i.vertexAttribPointer(ie,G.components,i[Qn[G.type]],!1,this.itemSize,G.offset+this.itemSize*(R||0))}}destroy(){const i=this.context.gl;this.buffer&&(i.deleteBuffer(this.buffer),delete this.buffer)}}const Aa=new WeakMap;function vi(F){var i;if(Aa.has(F))return Aa.get(F);{const s=(i=F.getParameter(F.VERSION))===null||i===void 0?void 0:i.startsWith("WebGL 2.0");return Aa.set(F,s),s}}class Ca{constructor(i){this.gl=i.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(i){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class lo extends Ca{getDefault(){return e.aN.transparent}set(i){const s=this.current;(i.r!==s.r||i.g!==s.g||i.b!==s.b||i.a!==s.a||this.dirty)&&(this.gl.clearColor(i.r,i.g,i.b,i.a),this.current=i,this.dirty=!1)}}class wi extends Ca{getDefault(){return 1}set(i){(i!==this.current||this.dirty)&&(this.gl.clearDepth(i),this.current=i,this.dirty=!1)}}class Vi extends Ca{getDefault(){return 0}set(i){(i!==this.current||this.dirty)&&(this.gl.clearStencil(i),this.current=i,this.dirty=!1)}}class jo extends Ca{getDefault(){return[!0,!0,!0,!0]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2]||i[3]!==s[3]||this.dirty)&&(this.gl.colorMask(i[0],i[1],i[2],i[3]),this.current=i,this.dirty=!1)}}class Pa extends Ca{getDefault(){return!0}set(i){(i!==this.current||this.dirty)&&(this.gl.depthMask(i),this.current=i,this.dirty=!1)}}class Qi extends Ca{getDefault(){return 255}set(i){(i!==this.current||this.dirty)&&(this.gl.stencilMask(i),this.current=i,this.dirty=!1)}}class _s extends Ca{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(i){const s=this.current;(i.func!==s.func||i.ref!==s.ref||i.mask!==s.mask||this.dirty)&&(this.gl.stencilFunc(i.func,i.ref,i.mask),this.current=i,this.dirty=!1)}}class $i extends Ca{getDefault(){const i=this.gl;return[i.KEEP,i.KEEP,i.KEEP]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2]||this.dirty)&&(this.gl.stencilOp(i[0],i[1],i[2]),this.current=i,this.dirty=!1)}}class yl extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;i?s.enable(s.STENCIL_TEST):s.disable(s.STENCIL_TEST),this.current=i,this.dirty=!1}}class cs extends Ca{getDefault(){return[0,1]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||this.dirty)&&(this.gl.depthRange(i[0],i[1]),this.current=i,this.dirty=!1)}}class So extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;i?s.enable(s.DEPTH_TEST):s.disable(s.DEPTH_TEST),this.current=i,this.dirty=!1}}class vl extends Ca{getDefault(){return this.gl.LESS}set(i){(i!==this.current||this.dirty)&&(this.gl.depthFunc(i),this.current=i,this.dirty=!1)}}class bl extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;i?s.enable(s.BLEND):s.disable(s.BLEND),this.current=i,this.dirty=!1}}class Fl extends Ca{getDefault(){const i=this.gl;return[i.ONE,i.ZERO]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||this.dirty)&&(this.gl.blendFunc(i[0],i[1]),this.current=i,this.dirty=!1)}}class qo extends Ca{getDefault(){return e.aN.transparent}set(i){const s=this.current;(i.r!==s.r||i.g!==s.g||i.b!==s.b||i.a!==s.a||this.dirty)&&(this.gl.blendColor(i.r,i.g,i.b,i.a),this.current=i,this.dirty=!1)}}class el extends Ca{getDefault(){return this.gl.FUNC_ADD}set(i){(i!==this.current||this.dirty)&&(this.gl.blendEquation(i),this.current=i,this.dirty=!1)}}class us extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;i?s.enable(s.CULL_FACE):s.disable(s.CULL_FACE),this.current=i,this.dirty=!1}}class ki extends Ca{getDefault(){return this.gl.BACK}set(i){(i!==this.current||this.dirty)&&(this.gl.cullFace(i),this.current=i,this.dirty=!1)}}class co extends Ca{getDefault(){return this.gl.CCW}set(i){(i!==this.current||this.dirty)&&(this.gl.frontFace(i),this.current=i,this.dirty=!1)}}class xl extends Ca{getDefault(){return null}set(i){(i!==this.current||this.dirty)&&(this.gl.useProgram(i),this.current=i,this.dirty=!1)}}class tl extends Ca{getDefault(){return this.gl.TEXTURE0}set(i){(i!==this.current||this.dirty)&&(this.gl.activeTexture(i),this.current=i,this.dirty=!1)}}class Bs extends Ca{getDefault(){const i=this.gl;return[0,0,i.drawingBufferWidth,i.drawingBufferHeight]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2]||i[3]!==s[3]||this.dirty)&&(this.gl.viewport(i[0],i[1],i[2],i[3]),this.current=i,this.dirty=!1)}}class _l extends Ca{getDefault(){return null}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.bindFramebuffer(s.FRAMEBUFFER,i),this.current=i,this.dirty=!1}}class Us extends Ca{getDefault(){return null}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.bindRenderbuffer(s.RENDERBUFFER,i),this.current=i,this.dirty=!1}}class wl extends Ca{getDefault(){return null}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.bindTexture(s.TEXTURE_2D,i),this.current=i,this.dirty=!1}}class kl extends Ca{getDefault(){return null}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.bindBuffer(s.ARRAY_BUFFER,i),this.current=i,this.dirty=!1}}class rl extends Ca{getDefault(){return null}set(i){const s=this.gl;s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,i),this.current=i,this.dirty=!1}}class Ao extends Ca{getDefault(){return null}set(i){var s;if(i===this.current&&!this.dirty)return;const R=this.gl;vi(R)?R.bindVertexArray(i):(s=R.getExtension("OES_vertex_array_object"))===null||s===void 0||s.bindVertexArrayOES(i),this.current=i,this.dirty=!1}}class Vc extends Ca{getDefault(){return 4}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,i),this.current=i,this.dirty=!1}}class Cc extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i),this.current=i,this.dirty=!1}}class Vl extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,i),this.current=i,this.dirty=!1}}class Bc extends Ca{constructor(i,s){super(i),this.context=i,this.parent=s}getDefault(){return null}}class uu extends Bc{setDirty(){this.dirty=!0}set(i){if(i===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,i,0),this.current=i,this.dirty=!1}}class ws extends Bc{set(i){if(i===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,i),this.current=i,this.dirty=!1}}class du extends Bc{set(i){if(i===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,i),this.current=i,this.dirty=!1}}class Ku{constructor(i,s,R,B,G){this.context=i,this.width=s,this.height=R;const ie=i.gl,pe=this.framebuffer=ie.createFramebuffer();if(this.colorAttachment=new uu(i,pe),B)this.depthAttachment=G?new du(i,pe):new ws(i,pe);else if(G)throw new Error("Stencil cannot be set without depth");if(ie.checkFramebufferStatus(ie.FRAMEBUFFER)!==ie.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const i=this.context.gl,s=this.colorAttachment.get();if(s&&i.deleteTexture(s),this.depthAttachment){const R=this.depthAttachment.get();R&&i.deleteRenderbuffer(R)}i.deleteFramebuffer(this.framebuffer)}}class eo{constructor(i,s,R){this.blendFunction=i,this.blendColor=s,this.mask=R}}eo.Replace=[1,0],eo.disabled=new eo(eo.Replace,e.aN.transparent,[!1,!1,!1,!1]),eo.unblended=new eo(eo.Replace,e.aN.transparent,[!0,!0,!0,!0]),eo.alphaBlended=new eo([1,771],e.aN.transparent,[!0,!0,!0,!0]);class uc{constructor(i){var s,R;if(this.gl=i,this.clearColor=new lo(this),this.clearDepth=new wi(this),this.clearStencil=new Vi(this),this.colorMask=new jo(this),this.depthMask=new Pa(this),this.stencilMask=new Qi(this),this.stencilFunc=new _s(this),this.stencilOp=new $i(this),this.stencilTest=new yl(this),this.depthRange=new cs(this),this.depthTest=new So(this),this.depthFunc=new vl(this),this.blend=new bl(this),this.blendFunc=new Fl(this),this.blendColor=new qo(this),this.blendEquation=new el(this),this.cullFace=new us(this),this.cullFaceSide=new ki(this),this.frontFace=new co(this),this.program=new xl(this),this.activeTexture=new tl(this),this.viewport=new Bs(this),this.bindFramebuffer=new _l(this),this.bindRenderbuffer=new Us(this),this.bindTexture=new wl(this),this.bindVertexBuffer=new kl(this),this.bindElementBuffer=new rl(this),this.bindVertexArray=new Ao(this),this.pixelStoreUnpack=new Vc(this),this.pixelStoreUnpackPremultiplyAlpha=new Cc(this),this.pixelStoreUnpackFlipY=new Vl(this),this.extTextureFilterAnisotropic=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=i.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),vi(i)){this.HALF_FLOAT=i.HALF_FLOAT;const B=i.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(s=i.RGBA16F)!==null&&s!==void 0?s:B==null?void 0:B.RGBA16F_EXT,this.RGB16F=(R=i.RGB16F)!==null&&R!==void 0?R:B==null?void 0:B.RGB16F_EXT,i.getExtension("EXT_color_buffer_float")}else{i.getExtension("EXT_color_buffer_half_float"),i.getExtension("OES_texture_half_float_linear");const B=i.getExtension("OES_texture_half_float");this.HALF_FLOAT=B==null?void 0:B.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(i,s){return new Nn(this,i,s)}createVertexBuffer(i,s,R){return new va(this,i,s,R)}createRenderbuffer(i,s,R){const B=this.gl,G=B.createRenderbuffer();return this.bindRenderbuffer.set(G),B.renderbufferStorage(B.RENDERBUFFER,i,s,R),this.bindRenderbuffer.set(null),G}createFramebuffer(i,s,R,B){return new Ku(this,i,s,R,B)}clear({color:i,depth:s,stencil:R}){const B=this.gl;let G=0;i&&(G|=B.COLOR_BUFFER_BIT,this.clearColor.set(i),this.colorMask.set([!0,!0,!0,!0])),s!==void 0&&(G|=B.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(s),this.depthMask.set(!0)),R!==void 0&&(G|=B.STENCIL_BUFFER_BIT,this.clearStencil.set(R),this.stencilMask.set(255)),B.clear(G)}setCullFace(i){i.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(i.mode),this.frontFace.set(i.frontFace))}setDepthMode(i){i.func!==this.gl.ALWAYS||i.mask?(this.depthTest.set(!0),this.depthFunc.set(i.func),this.depthMask.set(i.mask),this.depthRange.set(i.range)):this.depthTest.set(!1)}setStencilMode(i){i.test.func!==this.gl.ALWAYS||i.mask?(this.stencilTest.set(!0),this.stencilMask.set(i.mask),this.stencilOp.set([i.fail,i.depthFail,i.pass]),this.stencilFunc.set({func:i.test.func,ref:i.ref,mask:i.test.mask})):this.stencilTest.set(!1)}setColorMode(i){e.aF(i.blendFunction,eo.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(i.blendFunction),this.blendColor.set(i.blendColor)),this.colorMask.set(i.mask)}createVertexArray(){var i;return vi(this.gl)?this.gl.createVertexArray():(i=this.gl.getExtension("OES_vertex_array_object"))===null||i===void 0?void 0:i.createVertexArrayOES()}deleteVertexArray(i){var s;return vi(this.gl)?this.gl.deleteVertexArray(i):(s=this.gl.getExtension("OES_vertex_array_object"))===null||s===void 0?void 0:s.deleteVertexArrayOES(i)}unbindVAO(){this.bindVertexArray.set(null)}}class Ba{constructor(i,s,R){this.func=i,this.mask=s,this.range=R}}Ba.ReadOnly=!1,Ba.ReadWrite=!0,Ba.disabled=new Ba(519,Ba.ReadOnly,[0,1]);const Bl=7680;class bi{constructor(i,s,R,B,G,ie){this.test=i,this.ref=s,this.mask=R,this.fail=B,this.depthFail=G,this.pass=ie}}bi.disabled=new bi({func:519,mask:0},0,0,Bl,Bl,Bl);class xi{constructor(i,s,R){this.enable=i,this.mode=s,this.frontFace=R}}let ks;function es(F,i,s,R,B){const G=F.context,ie=G.gl,pe=F.useProgram("collisionBox"),xe=[];let Se=0,De=0;for(let Mt=0;Mt<R.length;Mt++){const At=R[Mt],Vt=i.getTile(At).getBucket(s);if(!Vt)continue;const Et=B?Vt.textCollisionBox:Vt.iconCollisionBox,Kt=Vt.collisionCircleArray;if(Kt.length>0){const Yt=e.H();e.aR(Yt,Vt.placementInvProjMatrix,F.transform.glCoordMatrix),e.aR(Yt,Yt,Vt.placementViewportMatrix),xe.push({circleArray:Kt,circleOffset:De,transform:At.posMatrix,invTransform:Yt,coord:At}),Se+=Kt.length/4,De=Se}Et&&pe.draw(G,ie.LINES,Ba.disabled,bi.disabled,F.colorModeForRenderPass(),xi.disabled,tr(F.transform,At.posMatrix),F.style.map.terrain&&F.style.map.terrain.getTerrainData(At),s.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,F.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!B||!xe.length)return;const Ue=F.useProgram("collisionCircle"),rt=new e.aS;rt.resize(4*Se),rt._trim();let ct=0;for(const Mt of xe)for(let At=0;At<Mt.circleArray.length/4;At++){const Vt=4*At,Et=Mt.circleArray[Vt+0],Kt=Mt.circleArray[Vt+1],Yt=Mt.circleArray[Vt+2],Jt=Mt.circleArray[Vt+3];rt.emplace(ct++,Et,Kt,Yt,Jt,0),rt.emplace(ct++,Et,Kt,Yt,Jt,1),rt.emplace(ct++,Et,Kt,Yt,Jt,2),rt.emplace(ct++,Et,Kt,Yt,Jt,3)}(!ks||ks.length<2*Se)&&(ks=function(Mt){const At=2*Mt,Vt=new e.aU;Vt.resize(At),Vt._trim();for(let Et=0;Et<At;Et++){const Kt=6*Et;Vt.uint16[Kt+0]=4*Et+0,Vt.uint16[Kt+1]=4*Et+1,Vt.uint16[Kt+2]=4*Et+2,Vt.uint16[Kt+3]=4*Et+2,Vt.uint16[Kt+4]=4*Et+3,Vt.uint16[Kt+5]=4*Et+0}return Vt}(Se));const pt=G.createIndexBuffer(ks,!0),vt=G.createVertexBuffer(rt,e.aT.members,!0);for(const Mt of xe){const At=ir(Mt.transform,Mt.invTransform,F.transform);Ue.draw(G,ie.TRIANGLES,Ba.disabled,bi.disabled,F.colorModeForRenderPass(),xi.disabled,At,F.style.map.terrain&&F.style.map.terrain.getTerrainData(Mt.coord),s.id,vt,pt,e.a0.simpleSegment(0,2*Mt.circleOffset,Mt.circleArray.length,Mt.circleArray.length/2),null,F.transform.zoom,null,null,null)}vt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const dc=e.ao(new Float32Array(16));function Tl(F,i,s,R,B){if(F.renderPass!=="translucent")return;const G=bi.disabled,ie=F.colorModeForRenderPass();(s._unevaluatedLayout.hasValue("text-variable-anchor")||s._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(pe,xe,Se,De,Ue,rt,ct,pt,vt){const Mt=xe.transform,At=Lr(),Vt=Ue==="map",Et=rt==="map";for(const Kt of pe){const Yt=De.getTile(Kt),Jt=Yt.getBucket(Se);if(!Jt||!Jt.text||!Jt.text.segments.get().length)continue;const dr=Jt.textSizeData,xr=e.ah(dr,Mt.zoom),Dr=Tt(Yt,1,xe.transform.zoom),Ir=Bt(Kt.posMatrix,Et,Vt,xe.transform,Dr),qr=Se.layout.get("icon-text-fit")!=="none"&&Jt.hasIconData();if(xr){const $r=Math.pow(2,Mt.zoom-Yt.tileID.overscaledZ),vn=xe.style.map.terrain?(xn,an)=>xe.style.map.terrain.getElevation(Kt,xn,an):null,Qr=At.translatePosition(Mt,Yt,ct,pt);yo(Jt,Vt,Et,vt,Mt,Ir,Kt.posMatrix,$r,xr,qr,At,Qr,Kt.toUnwrapped(),vn)}}}(R,F,s,i,s.layout.get("text-rotation-alignment"),s.layout.get("text-pitch-alignment"),s.paint.get("text-translate"),s.paint.get("text-translate-anchor"),B),s.paint.get("icon-opacity").constantOr(1)!==0&&Yl(F,i,s,R,!1,s.paint.get("icon-translate"),s.paint.get("icon-translate-anchor"),s.layout.get("icon-rotation-alignment"),s.layout.get("icon-pitch-alignment"),s.layout.get("icon-keep-upright"),G,ie),s.paint.get("text-opacity").constantOr(1)!==0&&Yl(F,i,s,R,!0,s.paint.get("text-translate"),s.paint.get("text-translate-anchor"),s.layout.get("text-rotation-alignment"),s.layout.get("text-pitch-alignment"),s.layout.get("text-keep-upright"),G,ie),i.map.showCollisionBoxes&&(es(F,i,s,R,!0),es(F,i,s,R,!1))}function ts(F,i,s,R,B,G){const{horizontalAlign:ie,verticalAlign:pe}=e.av(F),xe=-(ie-.5)*i,Se=-(pe-.5)*s;return new e.P((xe/B+R[0])*G,(Se/B+R[1])*G)}function ds(F,i,s,R,B,G){const ie=i.tileAnchorPoint.add(new e.P(i.translation[0],i.translation[1]));if(i.pitchWithMap){let pe=R.mult(G);return s||(pe=pe.rotate(-B)),qt(ie.add(pe),i.labelPlaneMatrix,i.getElevation).point}if(s){const pe=Ke(i.tileAnchorPoint.x+1,i.tileAnchorPoint.y,i).point.sub(F),xe=Math.atan(pe.y/pe.x)+(pe.x<0?Math.PI:0);return F.add(R.rotate(xe))}return F.add(R)}function yo(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct){const pt=F.text.placedSymbolArray,vt=F.text.dynamicLayoutVertexArray,Mt=F.icon.dynamicLayoutVertexArray,At={};vt.clear();for(let Vt=0;Vt<pt.length;Vt++){const Et=pt.get(Vt),Kt=F.allowVerticalPlacement&&!Et.placedOrientation,Yt=Et.hidden||!Et.crossTileID||Kt?null:R[Et.crossTileID];if(Yt){const Jt=new e.P(Et.anchorX,Et.anchorY),dr={getElevation:ct,width:B.width,height:B.height,labelPlaneMatrix:G,pitchWithMap:s,projection:De,tileAnchorPoint:Jt,translation:Ue,unwrappedTileID:rt},xr=s?qt(Jt,ie,ct):Ke(Jt.x,Jt.y,dr),Dr=ot(B.cameraToCenterDistance,xr.signedDistanceFromCamera);let Ir=e.aj(F.textSizeData,xe,Et)*Dr/e.aq;s&&(Ir*=F.tilePixelRatio/pe);const{width:qr,height:$r,anchor:vn,textOffset:Qr,textBoxScale:xn}=Yt,an=ts(vn,qr,$r,Qr,xn,Ir),Sn=De.getPitchedTextCorrection(B,Jt.add(new e.P(Ue[0],Ue[1])),rt),mn=ds(xr.point,dr,i,an,B.angle,Sn),Ln=F.allowVerticalPlacement&&Et.placedOrientation===e.ai.vertical?Math.PI/2:0;for(let ta=0;ta<Et.numGlyphs;ta++)e.ak(vt,mn,Ln);Se&&Et.associatedIconIndex>=0&&(At[Et.associatedIconIndex]={shiftedAnchor:mn,angle:Ln})}else Ft(Et.numGlyphs,vt)}if(Se){Mt.clear();const Vt=F.icon.placedSymbolArray;for(let Et=0;Et<Vt.length;Et++){const Kt=Vt.get(Et);if(Kt.hidden)Ft(Kt.numGlyphs,Mt);else{const Yt=At[Et];if(Yt)for(let Jt=0;Jt<Kt.numGlyphs;Jt++)e.ak(Mt,Yt.shiftedAnchor,Yt.angle);else Ft(Kt.numGlyphs,Mt)}}F.icon.dynamicLayoutVertexBuffer.updateData(Mt)}F.text.dynamicLayoutVertexBuffer.updateData(vt)}function Xa(F,i,s){return s.iconsInText&&i?"symbolTextAndIcon":F?"symbolSDF":"symbolIcon"}function Yl(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue){const rt=F.context,ct=rt.gl,pt=F.transform,vt=Lr(),Mt=pe==="map",At=xe==="map",Vt=pe!=="viewport"&&s.layout.get("symbol-placement")!=="point",Et=Mt&&!At&&!Vt,Kt=!At&&Vt,Yt=!s.layout.get("symbol-sort-key").isConstant();let Jt=!1;const dr=F.depthModeForSublayer(0,Ba.ReadOnly),xr=s._unevaluatedLayout.hasValue("text-variable-anchor")||s._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dr=[],Ir=vt.getCircleRadiusCorrection(pt);for(const qr of R){const $r=i.getTile(qr),vn=$r.getBucket(s);if(!vn)continue;const Qr=B?vn.text:vn.icon;if(!Qr||!Qr.segments.get().length||!Qr.hasVisibleVertices)continue;const xn=Qr.programConfigurations.get(s.id),an=B||vn.sdfIcons,Sn=B?vn.textSizeData:vn.iconSizeData,mn=At||pt.pitch!==0,Ln=F.useProgram(Xa(an,B,vn),xn),ta=e.ah(Sn,pt.zoom),Mn=F.style.map.terrain&&F.style.map.terrain.getTerrainData(qr);let Yn,ua,za,ka,Da=[0,0],Na=null;if(B){if(ua=$r.glyphAtlasTexture,za=ct.LINEAR,Yn=$r.glyphAtlasTexture.size,vn.iconsInText){Da=$r.imageAtlasTexture.size,Na=$r.imageAtlasTexture;const Oa=Sn.kind==="composite"||Sn.kind==="camera";ka=mn||F.options.rotating||F.options.zooming||Oa?ct.LINEAR:ct.NEAREST}}else{const Oa=s.layout.get("icon-size").constantOr(0)!==1||vn.iconsNeedLinear;ua=$r.imageAtlasTexture,za=an||F.options.rotating||F.options.zooming||Oa||mn?ct.LINEAR:ct.NEAREST,Yn=$r.imageAtlasTexture.size}const Ua=Tt($r,1,F.transform.zoom),Qa=Kt?qr.posMatrix:dc,Bi=Bt(Qa,At,Mt,F.transform,Ua),Oi=jt(Qa,At,Mt,F.transform,Ua),ao=jt(qr.posMatrix,At,Mt,F.transform,Ua),ti=vt.translatePosition(F.transform,$r,G,ie),Wa=xr&&vn.hasTextData(),Ai=s.layout.get("icon-text-fit")!=="none"&&Wa&&vn.hasIconData();if(Vt){const Oa=F.style.map.terrain?(Zi,fs)=>F.style.map.terrain.getElevation(qr,Zi,fs):null,_o=s.layout.get("text-rotation-alignment")==="map";dt(vn,qr.posMatrix,F,B,Bi,ao,At,Se,_o,vt,qr.toUnwrapped(),pt.width,pt.height,ti,Oa)}const ii=qr.posMatrix,$a=B&&xr||Ai,ri=Vt||$a?dc:Bi,yi=Oi,Ha=an&&s.paint.get(B?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ns;Ns=an?vn.iconsInText?An(Sn.kind,ta,Et,At,Vt,$a,F,ii,ri,yi,ti,Yn,Da,Ir):_n(Sn.kind,ta,Et,At,Vt,$a,F,ii,ri,yi,ti,B,Yn,!0,Ir):Pn(Sn.kind,ta,Et,At,Vt,$a,F,ii,ri,yi,ti,B,Yn,Ir);const Wi={program:Ln,buffers:Qr,uniformValues:Ns,atlasTexture:ua,atlasTextureIcon:Na,atlasInterpolation:za,atlasInterpolationIcon:ka,isSDF:an,hasHalo:Ha};if(Yt&&vn.canOverlap){Jt=!0;const Oa=Qr.segments.get();for(const _o of Oa)Dr.push({segments:new e.a0([_o]),sortKey:_o.sortKey,state:Wi,terrainData:Mn})}else Dr.push({segments:Qr.segments,sortKey:0,state:Wi,terrainData:Mn})}Jt&&Dr.sort((qr,$r)=>qr.sortKey-$r.sortKey);for(const qr of Dr){const $r=qr.state;if(rt.activeTexture.set(ct.TEXTURE0),$r.atlasTexture.bind($r.atlasInterpolation,ct.CLAMP_TO_EDGE),$r.atlasTextureIcon&&(rt.activeTexture.set(ct.TEXTURE1),$r.atlasTextureIcon&&$r.atlasTextureIcon.bind($r.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),$r.isSDF){const vn=$r.uniformValues;$r.hasHalo&&(vn.u_is_halo=1,hu($r.buffers,qr.segments,s,F,$r.program,dr,De,Ue,vn,qr.terrainData)),vn.u_is_halo=0}hu($r.buffers,qr.segments,s,F,$r.program,dr,De,Ue,$r.uniformValues,qr.terrainData)}}function hu(F,i,s,R,B,G,ie,pe,xe,Se){const De=R.context,Ue=De.gl;B.draw(De,Ue.TRIANGLES,G,ie,pe,xi.disabled,xe,Se,s.id,F.layoutVertexBuffer,F.indexBuffer,i,s.paint,R.transform.zoom,F.programConfigurations.get(s.id),F.dynamicLayoutVertexBuffer,F.opacityVertexBuffer)}function Sl(F,i,s,R){if(s.paint.get("heatmap-opacity")!==0)if(F.renderPass==="offscreen"){const B=F.context,G=B.gl,ie=bi.disabled,pe=new eo([G.ONE,G.ONE],e.aN.transparent,[!0,!0,!0,!0]);(function(xe,Se,De){const Ue=xe.gl;xe.activeTexture.set(Ue.TEXTURE1),xe.viewport.set([0,0,Se.width/4,Se.height/4]);let rt=De.heatmapFbo;if(rt)Ue.bindTexture(Ue.TEXTURE_2D,rt.colorAttachment.get()),xe.bindFramebuffer.set(rt.framebuffer);else{const ct=Ue.createTexture();Ue.bindTexture(Ue.TEXTURE_2D,ct),Ue.texParameteri(Ue.TEXTURE_2D,Ue.TEXTURE_WRAP_S,Ue.CLAMP_TO_EDGE),Ue.texParameteri(Ue.TEXTURE_2D,Ue.TEXTURE_WRAP_T,Ue.CLAMP_TO_EDGE),Ue.texParameteri(Ue.TEXTURE_2D,Ue.TEXTURE_MIN_FILTER,Ue.LINEAR),Ue.texParameteri(Ue.TEXTURE_2D,Ue.TEXTURE_MAG_FILTER,Ue.LINEAR),rt=De.heatmapFbo=xe.createFramebuffer(Se.width/4,Se.height/4,!1,!1),function(pt,vt,Mt,At){var Vt,Et;const Kt=pt.gl,Yt=(Vt=pt.HALF_FLOAT)!==null&&Vt!==void 0?Vt:Kt.UNSIGNED_BYTE,Jt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Kt.RGBA;Kt.texImage2D(Kt.TEXTURE_2D,0,Jt,vt.width/4,vt.height/4,0,Kt.RGBA,Yt,null),At.colorAttachment.set(Mt)}(xe,Se,ct,rt)}})(B,F,s),B.clear({color:e.aN.transparent});for(let xe=0;xe<R.length;xe++){const Se=R[xe];if(i.hasRenderableParent(Se))continue;const De=i.getTile(Se),Ue=De.getBucket(s);if(!Ue)continue;const rt=Ue.programConfigurations.get(s.id),ct=F.useProgram("heatmap",rt),{zoom:pt}=F.transform;ct.draw(B,G.TRIANGLES,Ba.disabled,ie,pe,xi.disabled,Rr(Se.posMatrix,De,pt,s.paint.get("heatmap-intensity")),null,s.id,Ue.layoutVertexBuffer,Ue.indexBuffer,Ue.segments,s.paint,F.transform.zoom,rt)}B.viewport.set([0,0,F.width,F.height])}else F.renderPass==="translucent"&&(F.context.setColorMode(F.colorModeForRenderPass()),function(B,G){const ie=B.context,pe=ie.gl,xe=G.heatmapFbo;if(!xe)return;ie.activeTexture.set(pe.TEXTURE0),pe.bindTexture(pe.TEXTURE_2D,xe.colorAttachment.get()),ie.activeTexture.set(pe.TEXTURE1);let Se=G.colorRampTexture;Se||(Se=G.colorRampTexture=new z(ie,G.colorRamp,pe.RGBA)),Se.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),B.useProgram("heatmapTexture").draw(ie,pe.TRIANGLES,Ba.disabled,bi.disabled,B.colorModeForRenderPass(),xi.disabled,Xr(B,G,0,1),null,G.id,B.viewportBuffer,B.quadTriangleIndexBuffer,B.viewportSegments,G.paint,B.transform.zoom)}(F,s))}function Al(F,i,s,R,B){if(!s||!R||!R.imageAtlas)return;const G=R.imageAtlas.patternPositions;let ie=G[s.to.toString()],pe=G[s.from.toString()];if(!ie&&pe&&(ie=pe),!pe&&ie&&(pe=ie),!ie||!pe){const xe=B.getPaintProperty(i);ie=G[xe],pe=G[xe]}ie&&pe&&F.setConstantPatternPositions(ie,pe)}function Mc(F,i,s,R,B,G,ie){const pe=F.context.gl,xe="fill-pattern",Se=s.paint.get(xe),De=Se&&Se.constantOr(1),Ue=s.getCrossfadeParameters();let rt,ct,pt,vt,Mt;ie?(ct=De&&!s.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",rt=pe.LINES):(ct=De?"fillPattern":"fill",rt=pe.TRIANGLES);const At=Se.constantOr(null);for(const Vt of R){const Et=i.getTile(Vt);if(De&&!Et.patternsLoaded())continue;const Kt=Et.getBucket(s);if(!Kt)continue;const Yt=Kt.programConfigurations.get(s.id),Jt=F.useProgram(ct,Yt),dr=F.style.map.terrain&&F.style.map.terrain.getTerrainData(Vt);De&&(F.context.activeTexture.set(pe.TEXTURE0),Et.imageAtlasTexture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Yt.updatePaintBuffers(Ue)),Al(Yt,xe,At,Et,s);const xr=dr?Vt:null,Dr=xr?xr.posMatrix:Vt.posMatrix,Ir=F.translatePosMatrix(Dr,Et,s.paint.get("fill-translate"),s.paint.get("fill-translate-anchor"));if(ie){vt=Kt.indexBuffer2,Mt=Kt.segments2;const qr=[pe.drawingBufferWidth,pe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&De?fr(Ir,F,Ue,Et,qr):Zn(Ir,qr)}else vt=Kt.indexBuffer,Mt=Kt.segments,pt=De?On(Ir,F,Ue,Et):yn(Ir);Jt.draw(F.context,rt,B,F.stencilModeForClipping(Vt),G,xi.disabled,pt,dr,s.id,Kt.layoutVertexBuffer,vt,Mt,s.paint,F.transform.zoom,Yt)}}function hc(F,i,s,R,B,G,ie){const pe=F.context,xe=pe.gl,Se="fill-extrusion-pattern",De=s.paint.get(Se),Ue=De.constantOr(1),rt=s.getCrossfadeParameters(),ct=s.paint.get("fill-extrusion-opacity"),pt=De.constantOr(null);for(const vt of R){const Mt=i.getTile(vt),At=Mt.getBucket(s);if(!At)continue;const Vt=F.style.map.terrain&&F.style.map.terrain.getTerrainData(vt),Et=At.programConfigurations.get(s.id),Kt=F.useProgram(Ue?"fillExtrusionPattern":"fillExtrusion",Et);Ue&&(F.context.activeTexture.set(xe.TEXTURE0),Mt.imageAtlasTexture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE),Et.updatePaintBuffers(rt)),Al(Et,Se,pt,Mt,s);const Yt=F.translatePosMatrix(vt.posMatrix,Mt,s.paint.get("fill-extrusion-translate"),s.paint.get("fill-extrusion-translate-anchor")),Jt=s.paint.get("fill-extrusion-vertical-gradient"),dr=Ue?bn(Yt,F,Jt,ct,vt,rt,Mt):rn(Yt,F,Jt,ct);Kt.draw(pe,pe.gl.TRIANGLES,B,G,ie,xi.backCCW,dr,Vt,s.id,At.layoutVertexBuffer,At.indexBuffer,At.segments,s.paint,F.transform.zoom,Et,F.style.map.terrain&&At.centroidVertexBuffer)}}function pc(F,i,s,R,B,G,ie){const pe=F.context,xe=pe.gl,Se=s.fbo;if(!Se)return;const De=F.useProgram("hillshade"),Ue=F.style.map.terrain&&F.style.map.terrain.getTerrainData(i);pe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,Se.colorAttachment.get());const rt=Ue?i:null;De.draw(pe,xe.TRIANGLES,B,G,ie,xi.disabled,Vr(F,s,R,rt),Ue,R.id,F.rasterBoundsBuffer,F.quadTriangleIndexBuffer,F.rasterBoundsSegments)}function ku(F,i,s,R,B,G){const ie=F.context,pe=ie.gl,xe=i.dem;if(xe&&xe.data){const Se=xe.dim,De=xe.stride,Ue=xe.getPixels();if(ie.activeTexture.set(pe.TEXTURE1),ie.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture=i.demTexture||F.getTileTexture(De),i.demTexture){const ct=i.demTexture;ct.update(Ue,{premultiply:!1}),ct.bind(pe.NEAREST,pe.CLAMP_TO_EDGE)}else i.demTexture=new z(ie,Ue,pe.RGBA,{premultiply:!1}),i.demTexture.bind(pe.NEAREST,pe.CLAMP_TO_EDGE);ie.activeTexture.set(pe.TEXTURE0);let rt=i.fbo;if(!rt){const ct=new z(ie,{width:Se,height:Se,data:null},pe.RGBA);ct.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),rt=i.fbo=ie.createFramebuffer(Se,Se,!0,!1),rt.colorAttachment.set(ct.texture)}ie.bindFramebuffer.set(rt.framebuffer),ie.viewport.set([0,0,Se,Se]),F.useProgram("hillshadePrepare").draw(ie,pe.TRIANGLES,R,B,G,xi.disabled,Pr(i.tileID,xe),null,s.id,F.rasterBoundsBuffer,F.quadTriangleIndexBuffer,F.rasterBoundsSegments),i.needsHillshadePrepare=!1}}function Ts(F,i,s,R,B,G){const ie=R.paint.get("raster-fade-duration");if(!G&&ie>0){const pe=h.now(),xe=(pe-F.timeAdded)/ie,Se=i?(pe-i.timeAdded)/ie:-1,De=s.getSource(),Ue=B.coveringZoomLevel({tileSize:De.tileSize,roundZoom:De.roundZoom}),rt=!i||Math.abs(i.tileID.overscaledZ-Ue)>Math.abs(F.tileID.overscaledZ-Ue),ct=rt&&F.refreshedUponExpiration?1:e.ad(rt?xe:1-Se,0,1);return F.refreshedUponExpiration&&xe>=1&&(F.refreshedUponExpiration=!1),i?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const js=new e.aN(1,0,0,1),El=new e.aN(0,1,0,1),Ss=new e.aN(0,0,1,1),Ja=new e.aN(1,0,1,1),Uc=new e.aN(0,1,1,1);function jc(F){const i=F.transform.padding;Pc(F,F.transform.height-(i.top||0),3,js),Pc(F,i.bottom||0,3,El),Eo(F,i.left||0,3,Ss),Eo(F,F.transform.width-(i.right||0),3,Ja);const s=F.transform.centerPoint;(function(R,B,G,ie){fc(R,B-1,G-10,2,20,ie),fc(R,B-10,G-1,20,2,ie)})(F,s.x,F.transform.height-s.y,Uc)}function Pc(F,i,s,R){fc(F,0,i+s/2,F.transform.width,s,R)}function Eo(F,i,s,R){fc(F,i-s/2,0,s,F.transform.height,R)}function fc(F,i,s,R,B,G){const ie=F.context,pe=ie.gl;pe.enable(pe.SCISSOR_TEST),pe.scissor(i*F.pixelRatio,s*F.pixelRatio,R*F.pixelRatio,B*F.pixelRatio),ie.clear({color:G}),pe.disable(pe.SCISSOR_TEST)}function Cu(F,i,s){const R=F.context,B=R.gl,G=s.posMatrix,ie=F.useProgram("debug"),pe=Ba.disabled,xe=bi.disabled,Se=F.colorModeForRenderPass(),De="$debug",Ue=F.style.map.terrain&&F.style.map.terrain.getTerrainData(s);R.activeTexture.set(B.TEXTURE0);const rt=i.getTileByID(s.key).latestRawTileData,ct=rt&&rt.byteLength||0,pt=Math.floor(ct/1024),vt=i.getTile(s).tileSize,Mt=512/Math.min(vt,512)*(s.overscaledZ/F.transform.zoom)*.5;let At=s.canonical.toString();s.overscaledZ!==s.canonical.z&&(At+=` => ${s.overscaledZ}`),function(Vt,Et){Vt.initDebugOverlayCanvas();const Kt=Vt.debugOverlayCanvas,Yt=Vt.context.gl,Jt=Vt.debugOverlayCanvas.getContext("2d");Jt.clearRect(0,0,Kt.width,Kt.height),Jt.shadowColor="white",Jt.shadowBlur=2,Jt.lineWidth=1.5,Jt.strokeStyle="white",Jt.textBaseline="top",Jt.font="bold 36px Open Sans, sans-serif",Jt.fillText(Et,5,5),Jt.strokeText(Et,5,5),Vt.debugOverlayTexture.update(Kt),Vt.debugOverlayTexture.bind(Yt.LINEAR,Yt.CLAMP_TO_EDGE)}(F,`${At} ${pt}kB`),ie.draw(R,B.TRIANGLES,pe,xe,eo.alphaBlended,xi.disabled,gr(G,e.aN.transparent,Mt),null,De,F.debugBuffer,F.quadTriangleIndexBuffer,F.debugSegments),ie.draw(R,B.LINE_STRIP,pe,xe,Se,xi.disabled,gr(G,e.aN.red),Ue,De,F.debugBuffer,F.tileBorderIndexBuffer,F.debugSegments)}function Ql(F,i,s){const R=F.context,B=R.gl,G=F.colorModeForRenderPass(),ie=new Ba(B.LEQUAL,Ba.ReadWrite,F.depthRangeFor3D),pe=F.useProgram("terrain"),xe=i.getTerrainMesh();R.bindFramebuffer.set(null),R.viewport.set([0,0,F.width,F.height]);for(const Se of s){const De=F.renderToTexture.getTexture(Se),Ue=i.getTerrainData(Se.tileID);R.activeTexture.set(B.TEXTURE0),B.bindTexture(B.TEXTURE_2D,De.texture);const rt=F.transform.calculatePosMatrix(Se.tileID.toUnwrapped()),ct=i.getMeshFrameDelta(F.transform.zoom),pt=F.transform.calculateFogMatrix(Se.tileID.toUnwrapped()),vt=vr(rt,ct,pt,F.style.sky,F.transform.pitch);pe.draw(R,B.TRIANGLES,ie,bi.disabled,G,xi.backCCW,vt,Ue,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments)}}class ec{constructor(i,s,R){this.vertexBuffer=i,this.indexBuffer=s,this.segments=R}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class tc{constructor(i,s){this.context=new uc(i),this.transform=s,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=He.maxUnderzooming+He.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new en}resize(i,s,R){if(this.width=Math.floor(i*R),this.height=Math.floor(s*R),this.pixelRatio=R,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const B of this.style._order)this.style._layers[B].resize()}setup(){const i=this.context,s=new e.aX;s.emplaceBack(0,0),s.emplaceBack(e.X,0),s.emplaceBack(0,e.X),s.emplaceBack(e.X,e.X),this.tileExtentBuffer=i.createVertexBuffer(s,hn.members),this.tileExtentSegments=e.a0.simpleSegment(0,0,4,2);const R=new e.aX;R.emplaceBack(0,0),R.emplaceBack(e.X,0),R.emplaceBack(0,e.X),R.emplaceBack(e.X,e.X),this.debugBuffer=i.createVertexBuffer(R,hn.members),this.debugSegments=e.a0.simpleSegment(0,0,4,5);const B=new e.$;B.emplaceBack(0,0,0,0),B.emplaceBack(e.X,0,e.X,0),B.emplaceBack(0,e.X,0,e.X),B.emplaceBack(e.X,e.X,e.X,e.X),this.rasterBoundsBuffer=i.createVertexBuffer(B,Be.members),this.rasterBoundsSegments=e.a0.simpleSegment(0,0,4,2);const G=new e.aX;G.emplaceBack(0,0),G.emplaceBack(1,0),G.emplaceBack(0,1),G.emplaceBack(1,1),this.viewportBuffer=i.createVertexBuffer(G,hn.members),this.viewportSegments=e.a0.simpleSegment(0,0,4,2);const ie=new e.aZ;ie.emplaceBack(0),ie.emplaceBack(1),ie.emplaceBack(3),ie.emplaceBack(2),ie.emplaceBack(0),this.tileBorderIndexBuffer=i.createIndexBuffer(ie);const pe=new e.aY;pe.emplaceBack(0,1,2),pe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=i.createIndexBuffer(pe);const xe=this.context.gl;this.stencilClearMode=new bi({func:xe.ALWAYS,mask:0},0,255,xe.ZERO,xe.ZERO,xe.ZERO)}clearStencil(){const i=this.context,s=i.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const R=e.H();e.aQ(R,0,this.width,this.height,0,0,1),e.K(R,R,[s.drawingBufferWidth,s.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(i,s.TRIANGLES,Ba.disabled,this.stencilClearMode,eo.disabled,xi.disabled,Nr(R),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(i,s){if(this.currentStencilSource===i.source||!i.isTileClipped()||!s||!s.length)return;this.currentStencilSource=i.source;const R=this.context,B=R.gl;this.nextStencilID+s.length>256&&this.clearStencil(),R.setColorMode(eo.disabled),R.setDepthMode(Ba.disabled);const G=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ie of s){const pe=this._tileClippingMaskIDs[ie.key]=this.nextStencilID++,xe=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ie);G.draw(R,B.TRIANGLES,Ba.disabled,new bi({func:B.ALWAYS,mask:0},pe,255,B.KEEP,B.KEEP,B.REPLACE),eo.disabled,xi.disabled,Nr(ie.posMatrix),xe,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const i=this.nextStencilID++,s=this.context.gl;return new bi({func:s.NOTEQUAL,mask:255},i,255,s.KEEP,s.KEEP,s.REPLACE)}stencilModeForClipping(i){const s=this.context.gl;return new bi({func:s.EQUAL,mask:255},this._tileClippingMaskIDs[i.key],0,s.KEEP,s.KEEP,s.REPLACE)}stencilConfigForOverlap(i){const s=this.context.gl,R=i.sort((ie,pe)=>pe.overscaledZ-ie.overscaledZ),B=R[R.length-1].overscaledZ,G=R[0].overscaledZ-B+1;if(G>1){this.currentStencilSource=void 0,this.nextStencilID+G>256&&this.clearStencil();const ie={};for(let pe=0;pe<G;pe++)ie[pe+B]=new bi({func:s.GEQUAL,mask:255},pe+this.nextStencilID,255,s.KEEP,s.KEEP,s.REPLACE);return this.nextStencilID+=G,[ie,R]}return[{[B]:bi.disabled},R]}colorModeForRenderPass(){const i=this.context.gl;return this._showOverdrawInspector?new eo([i.CONSTANT_COLOR,i.ONE],new e.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?eo.unblended:eo.alphaBlended}depthModeForSublayer(i,s,R){if(!this.opaquePassEnabledForLayer())return Ba.disabled;const B=1-((1+this.currentLayer)*this.numSublayers+i)*this.depthEpsilon;return new Ba(R||this.context.gl.LEQUAL,s,[B,B])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(i,s){var R;this.style=i,this.options=s,this.lineAtlas=i.lineAtlas,this.imageManager=i.imageManager,this.glyphManager=i.glyphManager,this.symbolFadeChange=i.placement.symbolFadeChange(h.now()),this.imageManager.beginFrame();const B=this.style._order,G=this.style.sourceCaches,ie={},pe={},xe={};for(const Se in G){const De=G[Se];De.used&&De.prepare(this.context),ie[Se]=De.getVisibleCoordinates(),pe[Se]=ie[Se].slice().reverse(),xe[Se]=De.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Se=0;Se<B.length;Se++){const De=B[Se];if(this.style._layers[De].is3D()){this.opaquePassCutoff=Se;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Se of B){const De=this.style._layers[Se];if(!De.hasOffscreenPass()||De.isHidden(this.transform.zoom))continue;const Ue=pe[De.source];(De.type==="custom"||Ue.length)&&this.renderLayer(this,G[De.source],De,Ue)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:s.showOverdrawInspector?e.aN.black:e.aN.transparent,depth:1}),this.clearStencil(),!((R=this.style.stylesheet)===null||R===void 0)&&R.sky&&function(Se,De){const Ue=Se.context,rt=Ue.gl,ct=((Vt,Et,Kt)=>({u_sky_color:Vt.properties.get("sky-color"),u_horizon_color:Vt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Kt,u_sky_horizon_blend:Vt.properties.get("sky-horizon-blend")*Et.height/2*Kt}))(De,Se.style.map.transform,Se.pixelRatio),pt=new Ba(rt.LEQUAL,Ba.ReadWrite,[0,1]),vt=bi.disabled,Mt=Se.colorModeForRenderPass(),At=Se.useProgram("sky");if(!De.mesh){const Vt=new e.aX;Vt.emplaceBack(-1,-1),Vt.emplaceBack(1,-1),Vt.emplaceBack(1,1),Vt.emplaceBack(-1,1);const Et=new e.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),De.mesh=new ec(Ue.createVertexBuffer(Vt,hn.members),Ue.createIndexBuffer(Et),e.a0.simpleSegment(0,0,Vt.length,Et.length))}At.draw(Ue,rt.TRIANGLES,pt,vt,Mt,xi.disabled,ct,void 0,"sky",De.mesh.vertexBuffer,De.mesh.indexBuffer,De.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=s.showOverdrawInspector,this.depthRangeFor3D=[0,1-(i._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=B.length-1;this.currentLayer>=0;this.currentLayer--){const Se=this.style._layers[B[this.currentLayer]],De=G[Se.source],Ue=ie[Se.source];this._renderTileClippingMasks(Se,Ue),this.renderLayer(this,De,Se,Ue)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<B.length;this.currentLayer++){const Se=this.style._layers[B[this.currentLayer]],De=G[Se.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Se))continue;const Ue=(Se.type==="symbol"?xe:pe)[Se.source];this._renderTileClippingMasks(Se,ie[Se.source]),this.renderLayer(this,De,Se,Ue)}if(this.options.showTileBoundaries){const Se=function(De,Ue){let rt=null;const ct=Object.values(De._layers).flatMap(At=>At.source&&!At.isHidden(Ue)?[De.sourceCaches[At.source]]:[]),pt=ct.filter(At=>At.getSource().type==="vector"),vt=ct.filter(At=>At.getSource().type!=="vector"),Mt=At=>{(!rt||rt.getSource().maxzoom<At.getSource().maxzoom)&&(rt=At)};return pt.forEach(At=>Mt(At)),rt||vt.forEach(At=>Mt(At)),rt}(this.style,this.transform.zoom);Se&&function(De,Ue,rt){for(let ct=0;ct<rt.length;ct++)Cu(De,Ue,rt[ct])}(this,Se,Se.getVisibleCoordinates())}this.options.showPadding&&jc(this),this.context.setDefault()}maybeDrawDepthAndCoords(i){if(!this.style||!this.style.map||!this.style.map.terrain)return;const s=this.terrainFacilitator.matrix,R=this.transform.modelViewProjectionMatrix;let B=this.terrainFacilitator.dirty;B||(B=i?!e.a_(s,R):!e.a$(s,R)),B||(B=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),B&&(e.b0(s,R),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(G,ie){const pe=G.context,xe=pe.gl,Se=eo.unblended,De=new Ba(xe.LEQUAL,Ba.ReadWrite,[0,1]),Ue=ie.getTerrainMesh(),rt=ie.sourceCache.getRenderableTiles(),ct=G.useProgram("terrainDepth");pe.bindFramebuffer.set(ie.getFramebuffer("depth").framebuffer),pe.viewport.set([0,0,G.width/devicePixelRatio,G.height/devicePixelRatio]),pe.clear({color:e.aN.transparent,depth:1});for(const pt of rt){const vt=ie.getTerrainData(pt.tileID),Mt={u_matrix:G.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:ie.getMeshFrameDelta(G.transform.zoom)};ct.draw(pe,xe.TRIANGLES,De,bi.disabled,Se,xi.backCCW,Mt,vt,"terrain",Ue.vertexBuffer,Ue.indexBuffer,Ue.segments)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,G.width,G.height])}(this,this.style.map.terrain),function(G,ie){const pe=G.context,xe=pe.gl,Se=eo.unblended,De=new Ba(xe.LEQUAL,Ba.ReadWrite,[0,1]),Ue=ie.getTerrainMesh(),rt=ie.getCoordsTexture(),ct=ie.sourceCache.getRenderableTiles(),pt=G.useProgram("terrainCoords");pe.bindFramebuffer.set(ie.getFramebuffer("coords").framebuffer),pe.viewport.set([0,0,G.width/devicePixelRatio,G.height/devicePixelRatio]),pe.clear({color:e.aN.transparent,depth:1}),ie.coordsIndex=[];for(const vt of ct){const Mt=ie.getTerrainData(vt.tileID);pe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,rt.texture);const At={u_matrix:G.transform.calculatePosMatrix(vt.tileID.toUnwrapped()),u_terrain_coords_id:(255-ie.coordsIndex.length)/255,u_texture:0,u_ele_delta:ie.getMeshFrameDelta(G.transform.zoom)};pt.draw(pe,xe.TRIANGLES,De,bi.disabled,Se,xi.backCCW,At,Mt,"terrain",Ue.vertexBuffer,Ue.indexBuffer,Ue.segments),ie.coordsIndex.push(vt.tileID.key)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,G.width,G.height])}(this,this.style.map.terrain))}renderLayer(i,s,R,B){if(!R.isHidden(this.transform.zoom)&&(R.type==="background"||R.type==="custom"||(B||[]).length))switch(this.id=R.id,R.type){case"symbol":Tl(i,s,R,B,this.style.placement.variableOffsets);break;case"circle":(function(G,ie,pe,xe){if(G.renderPass!=="translucent")return;const Se=pe.paint.get("circle-opacity"),De=pe.paint.get("circle-stroke-width"),Ue=pe.paint.get("circle-stroke-opacity"),rt=!pe.layout.get("circle-sort-key").isConstant();if(Se.constantOr(1)===0&&(De.constantOr(1)===0||Ue.constantOr(1)===0))return;const ct=G.context,pt=ct.gl,vt=G.depthModeForSublayer(0,Ba.ReadOnly),Mt=bi.disabled,At=G.colorModeForRenderPass(),Vt=[];for(let Et=0;Et<xe.length;Et++){const Kt=xe[Et],Yt=ie.getTile(Kt),Jt=Yt.getBucket(pe);if(!Jt)continue;const dr=Jt.programConfigurations.get(pe.id),xr=G.useProgram("circle",dr),Dr=Jt.layoutVertexBuffer,Ir=Jt.indexBuffer,qr=G.style.map.terrain&&G.style.map.terrain.getTerrainData(Kt),$r={programConfiguration:dr,program:xr,layoutVertexBuffer:Dr,indexBuffer:Ir,uniformValues:jr(G,Kt,Yt,pe),terrainData:qr};if(rt){const vn=Jt.segments.get();for(const Qr of vn)Vt.push({segments:new e.a0([Qr]),sortKey:Qr.sortKey,state:$r})}else Vt.push({segments:Jt.segments,sortKey:0,state:$r})}rt&&Vt.sort((Et,Kt)=>Et.sortKey-Kt.sortKey);for(const Et of Vt){const{programConfiguration:Kt,program:Yt,layoutVertexBuffer:Jt,indexBuffer:dr,uniformValues:xr,terrainData:Dr}=Et.state,Ir=Et.segments;Yt.draw(ct,pt.TRIANGLES,vt,Mt,At,xi.disabled,xr,Dr,pe.id,Jt,dr,Ir,pe.paint,G.transform.zoom,Kt)}})(i,s,R,B);break;case"heatmap":Sl(i,s,R,B);break;case"line":(function(G,ie,pe,xe){if(G.renderPass!=="translucent")return;const Se=pe.paint.get("line-opacity"),De=pe.paint.get("line-width");if(Se.constantOr(1)===0||De.constantOr(1)===0)return;const Ue=G.depthModeForSublayer(0,Ba.ReadOnly),rt=G.colorModeForRenderPass(),ct=pe.paint.get("line-dasharray"),pt=pe.paint.get("line-pattern"),vt=pt.constantOr(1),Mt=pe.paint.get("line-gradient"),At=pe.getCrossfadeParameters(),Vt=vt?"linePattern":ct?"lineSDF":Mt?"lineGradient":"line",Et=G.context,Kt=Et.gl;let Yt=!0;for(const Jt of xe){const dr=ie.getTile(Jt);if(vt&&!dr.patternsLoaded())continue;const xr=dr.getBucket(pe);if(!xr)continue;const Dr=xr.programConfigurations.get(pe.id),Ir=G.context.program.get(),qr=G.useProgram(Vt,Dr),$r=Yt||qr.program!==Ir,vn=G.style.map.terrain&&G.style.map.terrain.getTerrainData(Jt),Qr=pt.constantOr(null);if(Qr&&dr.imageAtlas){const Sn=dr.imageAtlas,mn=Sn.patternPositions[Qr.to.toString()],Ln=Sn.patternPositions[Qr.from.toString()];mn&&Ln&&Dr.setConstantPatternPositions(mn,Ln)}const xn=vn?Jt:null,an=vt?Zr(G,dr,pe,At,xn):ct?cn(G,dr,pe,ct,At,xn):Mt?Ar(G,dr,pe,xr.lineClipsArray.length,xn):sr(G,dr,pe,xn);if(vt)Et.activeTexture.set(Kt.TEXTURE0),dr.imageAtlasTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE),Dr.updatePaintBuffers(At);else if(ct&&($r||G.lineAtlas.dirty))Et.activeTexture.set(Kt.TEXTURE0),G.lineAtlas.bind(Et);else if(Mt){const Sn=xr.gradients[pe.id];let mn=Sn.texture;if(pe.gradientVersion!==Sn.version){let Ln=256;if(pe.stepInterpolant){const ta=ie.getSource().maxzoom,Mn=Jt.canonical.z===ta?Math.ceil(1<<G.transform.maxZoom-Jt.canonical.z):1,Yn=xr.maxLineLength/e.X*1024*Mn;Ln=e.ad(e.aV(Yn),256,Et.maxTextureSize)}Sn.gradient=e.aW({expression:pe.gradientExpression(),evaluationKey:"lineProgress",resolution:Ln,image:Sn.gradient||void 0,clips:xr.lineClipsArray}),Sn.texture?Sn.texture.update(Sn.gradient):Sn.texture=new z(Et,Sn.gradient,Kt.RGBA),Sn.version=pe.gradientVersion,mn=Sn.texture}Et.activeTexture.set(Kt.TEXTURE0),mn.bind(pe.stepInterpolant?Kt.NEAREST:Kt.LINEAR,Kt.CLAMP_TO_EDGE)}qr.draw(Et,Kt.TRIANGLES,Ue,G.stencilModeForClipping(Jt),rt,xi.disabled,an,vn,pe.id,xr.layoutVertexBuffer,xr.indexBuffer,xr.segments,pe.paint,G.transform.zoom,Dr,xr.layoutVertexBuffer2),Yt=!1}})(i,s,R,B);break;case"fill":(function(G,ie,pe,xe){const Se=pe.paint.get("fill-color"),De=pe.paint.get("fill-opacity");if(De.constantOr(1)===0)return;const Ue=G.colorModeForRenderPass(),rt=pe.paint.get("fill-pattern"),ct=G.opaquePassEnabledForLayer()&&!rt.constantOr(1)&&Se.constantOr(e.aN.transparent).a===1&&De.constantOr(0)===1?"opaque":"translucent";if(G.renderPass===ct){const pt=G.depthModeForSublayer(1,G.renderPass==="opaque"?Ba.ReadWrite:Ba.ReadOnly);Mc(G,ie,pe,xe,pt,Ue,!1)}if(G.renderPass==="translucent"&&pe.paint.get("fill-antialias")){const pt=G.depthModeForSublayer(pe.getPaintProperty("fill-outline-color")?2:0,Ba.ReadOnly);Mc(G,ie,pe,xe,pt,Ue,!0)}})(i,s,R,B);break;case"fill-extrusion":(function(G,ie,pe,xe){const Se=pe.paint.get("fill-extrusion-opacity");if(Se!==0&&G.renderPass==="translucent"){const De=new Ba(G.context.gl.LEQUAL,Ba.ReadWrite,G.depthRangeFor3D);if(Se!==1||pe.paint.get("fill-extrusion-pattern").constantOr(1))hc(G,ie,pe,xe,De,bi.disabled,eo.disabled),hc(G,ie,pe,xe,De,G.stencilModeFor3D(),G.colorModeForRenderPass());else{const Ue=G.colorModeForRenderPass();hc(G,ie,pe,xe,De,bi.disabled,Ue)}}})(i,s,R,B);break;case"hillshade":(function(G,ie,pe,xe){if(G.renderPass!=="offscreen"&&G.renderPass!=="translucent")return;const Se=G.context,De=G.depthModeForSublayer(0,Ba.ReadOnly),Ue=G.colorModeForRenderPass(),[rt,ct]=G.renderPass==="translucent"?G.stencilConfigForOverlap(xe):[{},xe];for(const pt of ct){const vt=ie.getTile(pt);vt.needsHillshadePrepare!==void 0&&vt.needsHillshadePrepare&&G.renderPass==="offscreen"?ku(G,vt,pe,De,bi.disabled,Ue):G.renderPass==="translucent"&&pc(G,pt,vt,pe,De,rt[pt.overscaledZ],Ue)}Se.viewport.set([0,0,G.width,G.height])})(i,s,R,B);break;case"raster":(function(G,ie,pe,xe){if(G.renderPass!=="translucent"||pe.paint.get("raster-opacity")===0||!xe.length)return;const Se=G.context,De=Se.gl,Ue=ie.getSource(),rt=G.useProgram("raster"),ct=G.colorModeForRenderPass(),[pt,vt]=Ue instanceof Le?[{},xe]:G.stencilConfigForOverlap(xe),Mt=vt[vt.length-1].overscaledZ,At=!G.options.moving;for(const Vt of vt){const Et=G.depthModeForSublayer(Vt.overscaledZ-Mt,pe.paint.get("raster-opacity")===1?Ba.ReadWrite:Ba.ReadOnly,De.LESS),Kt=ie.getTile(Vt);Kt.registerFadeDuration(pe.paint.get("raster-fade-duration"));const Yt=ie.findLoadedParent(Vt,0),Jt=ie.findLoadedSibling(Vt),dr=Ts(Kt,Yt||Jt||null,ie,pe,G.transform,G.style.map.terrain);let xr,Dr;const Ir=pe.paint.get("raster-resampling")==="nearest"?De.NEAREST:De.LINEAR;Se.activeTexture.set(De.TEXTURE0),Kt.texture.bind(Ir,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Se.activeTexture.set(De.TEXTURE1),Yt?(Yt.texture.bind(Ir,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),xr=Math.pow(2,Yt.tileID.overscaledZ-Kt.tileID.overscaledZ),Dr=[Kt.tileID.canonical.x*xr%1,Kt.tileID.canonical.y*xr%1]):Kt.texture.bind(Ir,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Kt.texture.useMipmap&&Se.extTextureFilterAnisotropic&&G.transform.pitch>20&&De.texParameterf(De.TEXTURE_2D,Se.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Se.extTextureFilterAnisotropicMax);const qr=G.style.map.terrain&&G.style.map.terrain.getTerrainData(Vt),$r=qr?Vt:null,vn=$r?$r.posMatrix:G.transform.calculatePosMatrix(Vt.toUnwrapped(),At),Qr=Cn(vn,Dr||[0,0],xr||1,dr,pe);Ue instanceof Le?rt.draw(Se,De.TRIANGLES,Et,bi.disabled,ct,xi.disabled,Qr,qr,pe.id,Ue.boundsBuffer,G.quadTriangleIndexBuffer,Ue.boundsSegments):rt.draw(Se,De.TRIANGLES,Et,pt[Vt.overscaledZ],ct,xi.disabled,Qr,qr,pe.id,G.rasterBoundsBuffer,G.quadTriangleIndexBuffer,G.rasterBoundsSegments)}})(i,s,R,B);break;case"background":(function(G,ie,pe,xe){const Se=pe.paint.get("background-color"),De=pe.paint.get("background-opacity");if(De===0)return;const Ue=G.context,rt=Ue.gl,ct=G.transform,pt=ct.tileSize,vt=pe.paint.get("background-pattern");if(G.isPatternMissing(vt))return;const Mt=!vt&&Se.a===1&&De===1&&G.opaquePassEnabledForLayer()?"opaque":"translucent";if(G.renderPass!==Mt)return;const At=bi.disabled,Vt=G.depthModeForSublayer(0,Mt==="opaque"?Ba.ReadWrite:Ba.ReadOnly),Et=G.colorModeForRenderPass(),Kt=G.useProgram(vt?"backgroundPattern":"background"),Yt=xe||ct.coveringTiles({tileSize:pt,terrain:G.style.map.terrain});vt&&(Ue.activeTexture.set(rt.TEXTURE0),G.imageManager.bind(G.context));const Jt=pe.getCrossfadeParameters();for(const dr of Yt){const xr=xe?dr.posMatrix:G.transform.calculatePosMatrix(dr.toUnwrapped()),Dr=vt?ia(xr,De,G,vt,{tileID:dr,tileSize:pt},Jt):Dn(xr,De,Se),Ir=G.style.map.terrain&&G.style.map.terrain.getTerrainData(dr);Kt.draw(Ue,rt.TRIANGLES,Vt,At,Et,xi.disabled,Dr,Ir,pe.id,G.tileExtentBuffer,G.quadTriangleIndexBuffer,G.tileExtentSegments)}})(i,0,R,B);break;case"custom":(function(G,ie,pe){const xe=G.context,Se=pe.implementation;if(G.renderPass==="offscreen"){const De=Se.prerender;De&&(G.setCustomLayerDefaults(),xe.setColorMode(G.colorModeForRenderPass()),De.call(Se,xe.gl,G.transform.customLayerMatrix()),xe.setDirty(),G.setBaseState())}else if(G.renderPass==="translucent"){G.setCustomLayerDefaults(),xe.setColorMode(G.colorModeForRenderPass()),xe.setStencilMode(bi.disabled);const De=Se.renderingMode==="3d"?new Ba(G.context.gl.LEQUAL,Ba.ReadWrite,G.depthRangeFor3D):G.depthModeForSublayer(0,Ba.ReadOnly);xe.setDepthMode(De),Se.render(xe.gl,G.transform.customLayerMatrix(),{farZ:G.transform.farZ,nearZ:G.transform.nearZ,fov:G.transform._fov,modelViewProjectionMatrix:G.transform.modelViewProjectionMatrix,projectionMatrix:G.transform.projectionMatrix}),xe.setDirty(),G.setBaseState(),xe.bindFramebuffer.set(null)}})(i,0,R)}}translatePosMatrix(i,s,R,B,G){if(!R[0]&&!R[1])return i;const ie=G?B==="map"?this.transform.angle:0:B==="viewport"?-this.transform.angle:0;if(ie){const Se=Math.sin(ie),De=Math.cos(ie);R=[R[0]*De-R[1]*Se,R[0]*Se+R[1]*De]}const pe=[G?R[0]:Tt(s,R[0],this.transform.zoom),G?R[1]:Tt(s,R[1],this.transform.zoom),0],xe=new Float32Array(16);return e.J(xe,i,pe),xe}saveTileTexture(i){const s=this._tileTextures[i.size[0]];s?s.push(i):this._tileTextures[i.size[0]]=[i]}getTileTexture(i){const s=this._tileTextures[i];return s&&s.length>0?s.pop():null}isPatternMissing(i){if(!i)return!1;if(!i.from||!i.to)return!0;const s=this.imageManager.getPattern(i.from.toString()),R=this.imageManager.getPattern(i.to.toString());return!s||!R}useProgram(i,s){this.cache=this.cache||{};const R=i+(s?s.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[R]||(this.cache[R]=new tn(this.context,kn[i],s,$n[i],this._showOverdrawInspector,this.style.map.terrain)),this.cache[R]}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 i=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(i.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const i=this.context.gl;this.debugOverlayTexture=new z(this.context,this.debugOverlayCanvas,i.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:i,drawingBufferHeight:s}=this.context.gl;return this.width!==i||this.height!==s}}class qs{constructor(i,s){this.points=i,this.planes=s}static fromInvProjectionMatrix(i,s,R){const B=Math.pow(2,R),G=[[-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 xe=1/(pe=e.ag([],pe,i))[3]/s*B;return e.b1(pe,pe,[xe,xe,1/pe[3],xe])}),ie=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(pe=>{const xe=function(rt,ct){var pt=ct[0],vt=ct[1],Mt=ct[2],At=pt*pt+vt*vt+Mt*Mt;return At>0&&(At=1/Math.sqrt(At)),rt[0]=ct[0]*At,rt[1]=ct[1]*At,rt[2]=ct[2]*At,rt}([],function(rt,ct,pt){var vt=ct[0],Mt=ct[1],At=ct[2],Vt=pt[0],Et=pt[1],Kt=pt[2];return rt[0]=Mt*Kt-At*Et,rt[1]=At*Vt-vt*Kt,rt[2]=vt*Et-Mt*Vt,rt}([],P([],G[pe[0]],G[pe[1]]),P([],G[pe[2]],G[pe[1]]))),Se=(De=xe,Ue=G[pe[1]],-(De[0]*Ue[0]+De[1]*Ue[1]+De[2]*Ue[2]));var De,Ue;return xe.concat(Se)});return new qs(G,ie)}}class As{constructor(i,s){this.min=i,this.max=s,this.center=function(R,B,G){return R[0]=B[0]*G,R[1]=B[1]*G,R[2]=B[2]*G,R}([],function(R,B,G){return R[0]=B[0]+G[0],R[1]=B[1]+G[1],R[2]=B[2]+G[2],R}([],this.min,this.max),.5)}quadrant(i){const s=[i%2==0,i<2],R=k(this.min),B=k(this.max);for(let G=0;G<s.length;G++)R[G]=s[G]?this.min[G]:this.center[G],B[G]=s[G]?this.center[G]:this.max[G];return B[2]=this.max[2],new As(R,B)}distanceX(i){return Math.max(Math.min(this.max[0],i[0]),this.min[0])-i[0]}distanceY(i){return Math.max(Math.min(this.max[1],i[1]),this.min[1])-i[1]}intersects(i){const s=[[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 R=!0;for(let B=0;B<i.planes.length;B++){const G=i.planes[B];let ie=0;for(let pe=0;pe<s.length;pe++)e.b2(G,s[pe])>=0&&ie++;if(ie===0)return 0;ie!==s.length&&(R=!1)}if(R)return 2;for(let B=0;B<3;B++){let G=Number.MAX_VALUE,ie=-Number.MAX_VALUE;for(let pe=0;pe<i.points.length;pe++){const xe=i.points[pe][B]-this.min[B];G=Math.min(G,xe),ie=Math.max(ie,xe)}if(ie<0||G>this.max[B]-this.min[B])return 0}return 1}}class Cl{constructor(i=0,s=0,R=0,B=0){if(isNaN(i)||i<0||isNaN(s)||s<0||isNaN(R)||R<0||isNaN(B)||B<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=i,this.bottom=s,this.left=R,this.right=B}interpolate(i,s,R){return s.top!=null&&i.top!=null&&(this.top=e.z.number(i.top,s.top,R)),s.bottom!=null&&i.bottom!=null&&(this.bottom=e.z.number(i.bottom,s.bottom,R)),s.left!=null&&i.left!=null&&(this.left=e.z.number(i.left,s.left,R)),s.right!=null&&i.right!=null&&(this.right=e.z.number(i.right,s.right,R)),this}getCenter(i,s){const R=e.ad((this.left+i-this.right)/2,0,i),B=e.ad((this.top+s-this.bottom)/2,0,s);return new e.P(R,B)}equals(i){return this.top===i.top&&this.bottom===i.bottom&&this.left===i.left&&this.right===i.right}clone(){return new Cl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const mc=85.051129;class ni{constructor(i,s,R,B,G){this.tileSize=512,this._renderWorldCopies=G===void 0||!!G,this._minZoom=i||0,this._maxZoom=s||22,this._minPitch=R??0,this._maxPitch=B??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Cl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const i=new ni(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return i.apply(this),i}apply(i){this.tileSize=i.tileSize,this.latRange=i.latRange,this.width=i.width,this.height=i.height,this._center=i._center,this._elevation=i._elevation,this.minElevationForCurrentTile=i.minElevationForCurrentTile,this.zoom=i.zoom,this.angle=i.angle,this._fov=i._fov,this._pitch=i._pitch,this._unmodified=i._unmodified,this._edgeInsets=i._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(i){this._minZoom!==i&&(this._minZoom=i,this.zoom=Math.max(this.zoom,i))}get maxZoom(){return this._maxZoom}set maxZoom(i){this._maxZoom!==i&&(this._maxZoom=i,this.zoom=Math.min(this.zoom,i))}get minPitch(){return this._minPitch}set minPitch(i){this._minPitch!==i&&(this._minPitch=i,this.pitch=Math.max(this.pitch,i))}get maxPitch(){return this._maxPitch}set maxPitch(i){this._maxPitch!==i&&(this._maxPitch=i,this.pitch=Math.min(this.pitch,i))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(i){i===void 0?i=!0:i===null&&(i=!1),this._renderWorldCopies=i}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(i){const s=-e.b3(i,-180,180)*Math.PI/180;this.angle!==s&&(this._unmodified=!1,this.angle=s,this._calcMatrices(),this.rotationMatrix=function(){var R=new e.A(4);return e.A!=Float32Array&&(R[1]=0,R[2]=0),R[0]=1,R[3]=1,R}(),function(R,B,G){var ie=B[0],pe=B[1],xe=B[2],Se=B[3],De=Math.sin(G),Ue=Math.cos(G);R[0]=ie*Ue+xe*De,R[1]=pe*Ue+Se*De,R[2]=ie*-De+xe*Ue,R[3]=pe*-De+Se*Ue}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(i){const s=e.ad(i,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==s&&(this._unmodified=!1,this._pitch=s,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(i){i=Math.max(.01,Math.min(60,i)),this._fov!==i&&(this._unmodified=!1,this._fov=i/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(i){const s=Math.min(Math.max(i,this.minZoom),this.maxZoom);this._zoom!==s&&(this._unmodified=!1,this._zoom=s,this.tileZoom=Math.max(0,Math.floor(s)),this.scale=this.zoomScale(s),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(i){i.lat===this._center.lat&&i.lng===this._center.lng||(this._unmodified=!1,this._center=i,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(i){i!==this._elevation&&(this._elevation=i,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(i){this._edgeInsets.equals(i)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,i,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(i){return this._edgeInsets.equals(i)}interpolatePadding(i,s,R){this._unmodified=!1,this._edgeInsets.interpolate(i,s,R),this._constrain(),this._calcMatrices()}coveringZoomLevel(i){const s=(i.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/i.tileSize));return Math.max(0,s)}getVisibleUnwrappedCoordinates(i){const s=[new e.b4(0,i)];if(this._renderWorldCopies){const R=this.pointCoordinate(new e.P(0,0)),B=this.pointCoordinate(new e.P(this.width,0)),G=this.pointCoordinate(new e.P(this.width,this.height)),ie=this.pointCoordinate(new e.P(0,this.height)),pe=Math.floor(Math.min(R.x,B.x,G.x,ie.x)),xe=Math.floor(Math.max(R.x,B.x,G.x,ie.x)),Se=1;for(let De=pe-Se;De<=xe+Se;De++)De!==0&&s.push(new e.b4(De,i))}return s}coveringTiles(i){var s,R;let B=this.coveringZoomLevel(i);const G=B;if(i.minzoom!==void 0&&B<i.minzoom)return[];i.maxzoom!==void 0&&B>i.maxzoom&&(B=i.maxzoom);const ie=this.pointCoordinate(this.getCameraPoint()),pe=e.Z.fromLngLat(this.center),xe=Math.pow(2,B),Se=[xe*ie.x,xe*ie.y,0],De=[xe*pe.x,xe*pe.y,0],Ue=qs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,B);let rt=i.minzoom||0;!i.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(rt=B);const ct=i.terrain?2/Math.min(this.tileSize,i.tileSize)*this.tileSize:3,pt=Et=>({aabb:new As([Et*xe,0,0],[(Et+1)*xe,xe,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),vt=[],Mt=[],At=B,Vt=i.reparseOverscaled?G:B;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)vt.push(pt(-Et)),vt.push(pt(Et));for(vt.push(pt(0));vt.length>0;){const Et=vt.pop(),Kt=Et.x,Yt=Et.y;let Jt=Et.fullyVisible;if(!Jt){const $r=Et.aabb.intersects(Ue);if($r===0)continue;Jt=$r===2}const dr=i.terrain?Se:De,xr=Et.aabb.distanceX(dr),Dr=Et.aabb.distanceY(dr),Ir=Math.max(Math.abs(xr),Math.abs(Dr)),qr=ct+(1<<At-Et.zoom)-2;if(Et.zoom===At||Ir>qr&&Et.zoom>=rt){const $r=At-Et.zoom,vn=Se[0]-.5-(Kt<<$r),Qr=Se[1]-.5-(Yt<<$r);Mt.push({tileID:new e.S(Et.zoom===At?Vt:Et.zoom,Et.wrap,Et.zoom,Kt,Yt),distanceSq:S([De[0]-.5-Kt,De[1]-.5-Yt]),tileDistanceToCamera:Math.sqrt(vn*vn+Qr*Qr)})}else for(let $r=0;$r<4;$r++){const vn=(Kt<<1)+$r%2,Qr=(Yt<<1)+($r>>1),xn=Et.zoom+1;let an=Et.aabb.quadrant($r);if(i.terrain){const Sn=new e.S(xn,Et.wrap,xn,vn,Qr),mn=i.terrain.getMinMaxElevation(Sn),Ln=(s=mn.minElevation)!==null&&s!==void 0?s:this.elevation,ta=(R=mn.maxElevation)!==null&&R!==void 0?R:this.elevation;an=new As([an.min[0],an.min[1],Ln],[an.max[0],an.max[1],ta])}vt.push({aabb:an,zoom:xn,x:vn,y:Qr,wrap:Et.wrap,fullyVisible:Jt})}}return Mt.sort((Et,Kt)=>Et.distanceSq-Kt.distanceSq).map(Et=>Et.tileID)}resize(i,s){this.width=i,this.height=s,this.pixelsToGLUnits=[2/i,-2/s],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(i){return Math.pow(2,i)}scaleZoom(i){return Math.log(i)/Math.LN2}project(i){const s=e.ad(i.lat,-85.051129,mc);return new e.P(e.O(i.lng)*this.worldSize,e.Q(s)*this.worldSize)}unproject(i){return new e.Z(i.x/this.worldSize,i.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(i){const s=this.elevation,R=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,B=this.pointLocation(this.centerPoint,i),G=i.getElevationForLngLatZoom(B,this.tileZoom);if(!(this.elevation-G))return;const ie=R+s-G,pe=Math.cos(this._pitch)*this.cameraToCenterDistance/ie/e.b5(1,B.lat)/this.tileSize,xe=this.scaleZoom(pe);this._elevation=G,this._center=B,this.zoom=xe}setLocationAtPoint(i,s){const R=this.pointCoordinate(s),B=this.pointCoordinate(this.centerPoint),G=this.locationCoordinate(i),ie=new e.Z(G.x-(R.x-B.x),G.y-(R.y-B.y));this.center=this.coordinateLocation(ie),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(i,s){return s?this.coordinatePoint(this.locationCoordinate(i),s.getElevationForLngLatZoom(i,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(i))}pointLocation(i,s){return this.coordinateLocation(this.pointCoordinate(i,s))}locationCoordinate(i){return e.Z.fromLngLat(i)}coordinateLocation(i){return i&&i.toLngLat()}pointCoordinate(i,s){if(s){const pt=s.pointCoordinate(i);if(pt!=null)return pt}const R=[i.x,i.y,0,1],B=[i.x,i.y,1,1];e.ag(R,R,this.pixelMatrixInverse),e.ag(B,B,this.pixelMatrixInverse);const G=R[3],ie=B[3],pe=R[0]/G,xe=B[0]/ie,Se=R[1]/G,De=B[1]/ie,Ue=R[2]/G,rt=B[2]/ie,ct=Ue===rt?0:(0-Ue)/(rt-Ue);return new e.Z(e.z.number(pe,xe,ct)/this.worldSize,e.z.number(Se,De,ct)/this.worldSize)}coordinatePoint(i,s=0,R=this.pixelMatrix){const B=[i.x*this.worldSize,i.y*this.worldSize,s,1];return e.ag(B,B,R),new e.P(B[0]/B[3],B[1]/B[3])}getBounds(){const i=Math.max(0,this.height/2-this.getHorizon());return new Ce().extend(this.pointLocation(new e.P(0,i))).extend(this.pointLocation(new e.P(this.width,i))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(i){i?(this.lngRange=[i.getWest(),i.getEast()],this.latRange=[i.getSouth(),i.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,mc])}calculateTileMatrix(i){const s=i.canonical,R=this.worldSize/this.zoomScale(s.z),B=s.x+Math.pow(2,s.z)*i.wrap,G=e.ao(new Float64Array(16));return e.J(G,G,[B*R,s.y*R,0]),e.K(G,G,[R/e.X,R/e.X,1]),G}calculatePosMatrix(i,s=!1){const R=i.key,B=s?this._alignedPosMatrixCache:this._posMatrixCache;if(B[R])return B[R];const G=this.calculateTileMatrix(i);return e.L(G,s?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,G),B[R]=new Float32Array(G),B[R]}calculateFogMatrix(i){const s=i.key,R=this._fogMatrixCache;if(R[s])return R[s];const B=this.calculateTileMatrix(i);return e.L(B,this.fogMatrix,B),R[s]=new Float32Array(B),R[s]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(i,s){s=e.ad(+s,this.minZoom,this.maxZoom);const R={center:new e.N(i.lng,i.lat),zoom:s};let B=this.lngRange;if(!this._renderWorldCopies&&B===null){const Et=179.9999999999;B=[-Et,Et]}const G=this.tileSize*this.zoomScale(R.zoom);let ie=0,pe=G,xe=0,Se=G,De=0,Ue=0;const{x:rt,y:ct}=this.size;if(this.latRange){const Et=this.latRange;ie=e.Q(Et[1])*G,pe=e.Q(Et[0])*G,pe-ie<ct&&(De=ct/(pe-ie))}B&&(xe=e.b3(e.O(B[0])*G,0,G),Se=e.b3(e.O(B[1])*G,0,G),Se<xe&&(Se+=G),Se-xe<rt&&(Ue=rt/(Se-xe)));const{x:pt,y:vt}=this.project.call({worldSize:G},i);let Mt,At;const Vt=Math.max(Ue||0,De||0);if(Vt){const Et=new e.P(Ue?(Se+xe)/2:pt,De?(pe+ie)/2:vt);return R.center=this.unproject.call({worldSize:G},Et).wrap(),R.zoom+=this.scaleZoom(Vt),R}if(this.latRange){const Et=ct/2;vt-Et<ie&&(At=ie+Et),vt+Et>pe&&(At=pe-Et)}if(B){const Et=(xe+Se)/2;let Kt=pt;this._renderWorldCopies&&(Kt=e.b3(pt,Et-G/2,Et+G/2));const Yt=rt/2;Kt-Yt<xe&&(Mt=xe+Yt),Kt+Yt>Se&&(Mt=Se-Yt)}if(Mt!==void 0||At!==void 0){const Et=new e.P(Mt??pt,At??vt);R.center=this.unproject.call({worldSize:G},Et).wrap()}return R}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const i=this._unmodified,{center:s,zoom:R}=this.getConstrained(this.center,this.zoom);this.center=s,this.zoom=R,this._unmodified=i,this._constraining=!1}_calcMatrices(){if(!this.height)return;const i=this._fov/2,s=this.centerOffset,R=this.point.x,B=this.point.y;this.cameraToCenterDistance=.5/Math.tan(i)*this.height,this._pixelPerMeter=e.b5(1,this.center.lat)*this.worldSize;let G=e.ao(new Float64Array(16));e.K(G,G,[this.width/2,-this.height/2,1]),e.J(G,G,[1,-1,0]),this.labelPlaneMatrix=G,G=e.ao(new Float64Array(16)),e.K(G,G,[1,-1,1]),e.J(G,G,[-1,-1,0]),e.K(G,G,[2/this.width,2/this.height,1]),this.glCoordMatrix=G;const ie=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),pe=Math.min(this.elevation,this.minElevationForCurrentTile),xe=ie-pe*this._pixelPerMeter/Math.cos(this._pitch),Se=pe<0?xe:ie,De=Math.PI/2+this._pitch,Ue=this._fov*(.5+s.y/this.height),rt=Math.sin(Ue)*Se/Math.sin(e.ad(Math.PI-De-Ue,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+s.y/(2*ct)),vt=Math.sin(pt)*Se/Math.sin(e.ad(Math.PI-De-pt,.01,Math.PI-.01)),Mt=Math.min(rt,vt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Mt+Se),this.nearZ=this.height/50,G=new Float64Array(16),e.b6(G,this._fov,this.width/this.height,this.nearZ,this.farZ),G[8]=2*-s.x/this.width,G[9]=2*s.y/this.height,this.projectionMatrix=e.af(G),e.K(G,G,[1,-1,1]),e.J(G,G,[0,0,-this.cameraToCenterDistance]),e.b7(G,G,this._pitch),e.ae(G,G,this.angle),e.J(G,G,[-R,-B,0]),this.mercatorMatrix=e.K([],G,[this.worldSize,this.worldSize,this.worldSize]),e.K(G,G,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.L(new Float64Array(16),this.labelPlaneMatrix,G),e.J(G,G,[0,0,-this.elevation]),this.modelViewProjectionMatrix=G,this.invModelViewProjectionMatrix=e.at([],G),this.fogMatrix=new Float64Array(16),e.b6(this.fogMatrix,this._fov,this.width/this.height,ie,this.farZ),this.fogMatrix[8]=2*-s.x/this.width,this.fogMatrix[9]=2*s.y/this.height,e.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),e.b7(this.fogMatrix,this.fogMatrix,this._pitch),e.ae(this.fogMatrix,this.fogMatrix,this.angle),e.J(this.fogMatrix,this.fogMatrix,[-R,-B,0]),e.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=e.L(new Float64Array(16),this.labelPlaneMatrix,G);const At=this.width%2/2,Vt=this.height%2/2,Et=Math.cos(this.angle),Kt=Math.sin(this.angle),Yt=R-Math.round(R)+Et*At+Kt*Vt,Jt=B-Math.round(B)+Et*Vt+Kt*At,dr=new Float64Array(G);if(e.J(dr,dr,[Yt>.5?Yt-1:Yt,Jt>.5?Jt-1:Jt,0]),this.alignedModelViewProjectionMatrix=dr,G=e.at(new Float64Array(16),this.pixelMatrix),!G)throw new Error("failed to invert matrix");this.pixelMatrixInverse=G,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const i=this.pointCoordinate(new e.P(0,0)),s=[i.x*this.worldSize,i.y*this.worldSize,0,1];return e.ag(s,s,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const i=this._pitch,s=Math.tan(i)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,s))}getCameraQueryGeometry(i){const s=this.getCameraPoint();if(i.length===1)return[i[0],s];{let R=s.x,B=s.y,G=s.x,ie=s.y;for(const pe of i)R=Math.min(R,pe.x),B=Math.min(B,pe.y),G=Math.max(G,pe.x),ie=Math.max(ie,pe.y);return[new e.P(R,B),new e.P(G,B),new e.P(G,ie),new e.P(R,ie),new e.P(R,B)]}}lngLatToCameraDepth(i,s){const R=this.locationCoordinate(i),B=[R.x*this.worldSize,R.y*this.worldSize,s,1];return e.ag(B,B,this.modelViewProjectionMatrix),B[2]/B[3]}}function Ws(F,i){let s,R=!1,B=null,G=null;const ie=()=>{B=null,R&&(F.apply(G,s),B=setTimeout(ie,i),R=!1)};return(...pe)=>(R=!0,G=this,s=pe,B||ie(),B)}class to{constructor(i){this._getCurrentHash=()=>{const s=window.location.hash.replace("#","");if(this._hashName){let R;return s.split("&").map(B=>B.split("=")).forEach(B=>{B[0]===this._hashName&&(R=B)}),(R&&R[1]||"").split("/")}return s.split("/")},this._onHashChange=()=>{const s=this._getCurrentHash();if(s.length>=3&&!s.some(R=>isNaN(R))){const R=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(s[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+s[2],+s[1]],zoom:+s[0],bearing:R,pitch:+(s[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const s=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,s)},this._removeHash=()=>{const s=this._getCurrentHash();if(s.length===0)return;const R=s.join("/");let B=R;B.split("&").length>0&&(B=B.split("&")[0]),this._hashName&&(B=`${this._hashName}=${R}`);let G=window.location.hash.replace(B,"");G.startsWith("#&")?G=G.slice(0,1)+G.slice(2):G==="#"&&(G="");let ie=window.location.href.replace(/(#.+)?$/,G);ie=ie.replace("&&","&"),window.history.replaceState(window.history.state,null,ie)},this._updateHash=Ws(this._updateHashUnthrottled,300),this._hashName=i&&encodeURIComponent(i)}addTo(i){return this._map=i,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(i){const s=this._map.getCenter(),R=Math.round(100*this._map.getZoom())/100,B=Math.ceil((R*Math.LN2+Math.log(512/360/.5))/Math.LN10),G=Math.pow(10,B),ie=Math.round(s.lng*G)/G,pe=Math.round(s.lat*G)/G,xe=this._map.getBearing(),Se=this._map.getPitch();let De="";if(De+=i?`/${ie}/${pe}/${R}`:`${R}/${pe}/${ie}`,(xe||Se)&&(De+="/"+Math.round(10*xe)/10),Se&&(De+=`/${Math.round(Se)}`),this._hashName){const Ue=this._hashName;let rt=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const vt=pt.split("=")[0];return vt===Ue?(rt=!0,`${vt}=${De}`):pt}).filter(pt=>pt);return rt||ct.push(`${Ue}=${De}`),`#${ct.join("&")}`}return`#${De}`}}const Wo={linearity:.3,easing:e.b8(0,0,.3,1)},ei=e.e({deceleration:2500,maxSpeed:1400},Wo),ai=e.e({deceleration:20,maxSpeed:1400},Wo),Es=e.e({deceleration:1e3,maxSpeed:360},Wo),gc=e.e({deceleration:1e3,maxSpeed:90},Wo);class rc{constructor(i){this._map=i,this.clear()}clear(){this._inertiaBuffer=[]}record(i){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:h.now(),settings:i})}_drainInertiaBuffer(){const i=this._inertiaBuffer,s=h.now();for(;i.length>0&&s-i[0].time>160;)i.shift()}_onMoveEnd(i){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const s={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:G}of this._inertiaBuffer)s.zoom+=G.zoomDelta||0,s.bearing+=G.bearingDelta||0,s.pitch+=G.pitchDelta||0,G.panDelta&&s.pan._add(G.panDelta),G.around&&(s.around=G.around),G.pinchAround&&(s.pinchAround=G.pinchAround);const R=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,B={};if(s.pan.mag()){const G=jl(s.pan.mag(),R,e.e({},ei,i||{}));B.offset=s.pan.mult(G.amount/s.pan.mag()),B.center=this._map.transform.center,Ul(B,G)}if(s.zoom){const G=jl(s.zoom,R,ai);B.zoom=this._map.transform.zoom+G.amount,Ul(B,G)}if(s.bearing){const G=jl(s.bearing,R,Es);B.bearing=this._map.transform.bearing+e.ad(G.amount,-179,179),Ul(B,G)}if(s.pitch){const G=jl(s.pitch,R,gc);B.pitch=this._map.transform.pitch+G.amount,Ul(B,G)}if(B.zoom||B.bearing){const G=s.pinchAround===void 0?s.around:s.pinchAround;B.around=G?this._map.unproject(G):this._map.getCenter()}return this.clear(),e.e(B,{noMoveStart:!0})}}function Ul(F,i){(!F.duration||F.duration<i.duration)&&(F.duration=i.duration,F.easing=i.easing)}function jl(F,i,s){const{maxSpeed:R,linearity:B,deceleration:G}=s,ie=e.ad(F*B/(i/1e3),-R,R),pe=Math.abs(ie)/(G*B);return{easing:s.easing,duration:1e3*pe,amount:ie*(pe/2)}}class Co extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(i,s,R,B={}){const G=r.mousePos(s.getCanvas(),R),ie=s.unproject(G);super(i,e.e({point:G,lngLat:ie,originalEvent:R},B)),this._defaultPrevented=!1,this.target=s}}class vo extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(i,s,R){const B=i==="touchend"?R.changedTouches:R.touches,G=r.touchPos(s.getCanvasContainer(),B),ie=G.map(xe=>s.unproject(xe)),pe=G.reduce((xe,Se,De,Ue)=>xe.add(Se.div(Ue.length)),new e.P(0,0));super(i,{points:G,point:pe,lngLats:ie,lngLat:s.unproject(pe),originalEvent:R}),this._defaultPrevented=!1}}class nl extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(i,s,R){super(i,{originalEvent:R}),this._defaultPrevented=!1}}class nc{constructor(i,s){this._map=i,this._clickTolerance=s.clickTolerance}reset(){delete this._mousedownPos}wheel(i){return this._firePreventable(new nl(i.type,this._map,i))}mousedown(i,s){return this._mousedownPos=s,this._firePreventable(new Co(i.type,this._map,i))}mouseup(i){this._map.fire(new Co(i.type,this._map,i))}click(i,s){this._mousedownPos&&this._mousedownPos.dist(s)>=this._clickTolerance||this._map.fire(new Co(i.type,this._map,i))}dblclick(i){return this._firePreventable(new Co(i.type,this._map,i))}mouseover(i){this._map.fire(new Co(i.type,this._map,i))}mouseout(i){this._map.fire(new Co(i.type,this._map,i))}touchstart(i){return this._firePreventable(new vo(i.type,this._map,i))}touchmove(i){this._map.fire(new vo(i.type,this._map,i))}touchend(i){this._map.fire(new vo(i.type,this._map,i))}touchcancel(i){this._map.fire(new vo(i.type,this._map,i))}_firePreventable(i){if(this._map.fire(i),i.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class zo{constructor(i){this._map=i}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(i){this._map.fire(new Co(i.type,this._map,i))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Co("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(i){this._delayContextMenu?this._contextMenuEvent=i:this._ignoreContextMenu||this._map.fire(new Co(i.type,this._map,i)),this._map.listens("contextmenu")&&i.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ti{constructor(i){this._map=i}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(i){return this.transform.pointLocation(e.P.convert(i),this._map.terrain)}}class bo{constructor(i,s){this._map=i,this._tr=new Ti(i),this._el=i.getCanvasContainer(),this._container=i.getContainer(),this._clickTolerance=s.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(i,s){this.isEnabled()&&i.shiftKey&&i.button===0&&(r.disableDrag(),this._startPos=this._lastPos=s,this._active=!0)}mousemoveWindow(i,s){if(!this._active)return;const R=s;if(this._lastPos.equals(R)||!this._box&&R.dist(this._startPos)<this._clickTolerance)return;const B=this._startPos;this._lastPos=R,this._box||(this._box=r.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",i));const G=Math.min(B.x,R.x),ie=Math.max(B.x,R.x),pe=Math.min(B.y,R.y),xe=Math.max(B.y,R.y);r.setTransform(this._box,`translate(${G}px,${pe}px)`),this._box.style.width=ie-G+"px",this._box.style.height=xe-pe+"px"}mouseupWindow(i,s){if(!this._active||i.button!==0)return;const R=this._startPos,B=s;if(this.reset(),r.suppressClick(),R.x!==B.x||R.y!==B.y)return this._map.fire(new e.k("boxzoomend",{originalEvent:i})),{cameraAnimation:G=>G.fitScreenCoordinates(R,B,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",i)}keydown(i){this._active&&i.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",i))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(i,s){return this._map.fire(new e.k(i,{originalEvent:s}))}}function si(F,i){if(F.length!==i.length)throw new Error(`The number of touches and points are not equal - touches ${F.length}, points ${i.length}`);const s={};for(let R=0;R<F.length;R++)s[F[R].identifier]=i[R];return s}class ro{constructor(i){this.reset(),this.numTouches=i.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(i,s,R){(this.centroid||R.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=i.timeStamp),R.length===this.numTouches&&(this.centroid=function(B){const G=new e.P(0,0);for(const ie of B)G._add(ie);return G.div(B.length)}(s),this.touches=si(R,s)))}touchmove(i,s,R){if(this.aborted||!this.centroid)return;const B=si(R,s);for(const G in this.touches){const ie=this.touches[G],pe=B[G];(!pe||pe.dist(ie)>30)&&(this.aborted=!0)}}touchend(i,s,R){if((!this.centroid||i.timeStamp-this.startTime>500)&&(this.aborted=!0),R.length===0){const B=!this.aborted&&this.centroid;if(this.reset(),B)return B}}}class li{constructor(i){this.singleTap=new ro(i),this.numTaps=i.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(i,s,R){this.singleTap.touchstart(i,s,R)}touchmove(i,s,R){this.singleTap.touchmove(i,s,R)}touchend(i,s,R){const B=this.singleTap.touchend(i,s,R);if(B){const G=i.timeStamp-this.lastTime<500,ie=!this.lastTap||this.lastTap.dist(B)<30;if(G&&ie||this.reset(),this.count++,this.lastTime=i.timeStamp,this.lastTap=B,this.count===this.numTaps)return this.reset(),B}}}class uo{constructor(i){this._tr=new Ti(i),this._zoomIn=new li({numTouches:1,numTaps:2}),this._zoomOut=new li({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(i,s,R){this._zoomIn.touchstart(i,s,R),this._zoomOut.touchstart(i,s,R)}touchmove(i,s,R){this._zoomIn.touchmove(i,s,R),this._zoomOut.touchmove(i,s,R)}touchend(i,s,R){const B=this._zoomIn.touchend(i,s,R),G=this._zoomOut.touchend(i,s,R),ie=this._tr;return B?(this._active=!0,i.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:ie.zoom+1,around:ie.unproject(B)},{originalEvent:i})}):G?(this._active=!0,i.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:ie.zoom-1,around:ie.unproject(G)},{originalEvent:i})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xo{constructor(i){this._enabled=!!i.enable,this._moveStateManager=i.moveStateManager,this._clickTolerance=i.clickTolerance||1,this._moveFunction=i.move,this._activateOnStart=!!i.activateOnStart,i.assignEvents(this),this.reset()}reset(i){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(i)}_move(...i){const s=this._moveFunction(...i);if(s.bearingDelta||s.pitchDelta||s.around||s.panDelta)return this._active=!0,s}dragStart(i,s){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(i)&&(this._moveStateManager.startMove(i),this._lastPoint=s.length?s[0]:s,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(i,s){if(!this.isEnabled())return;const R=this._lastPoint;if(!R)return;if(i.preventDefault(),!this._moveStateManager.isValidMoveEvent(i))return void this.reset(i);const B=s.length?s[0]:s;return!this._moved&&B.dist(R)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=B,this._move(R,B))}dragEnd(i){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(i)&&(this._moved&&r.suppressClick(),this.reset(i))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const al={0:1,2:2};class rs{constructor(i){this._correctEvent=i.checkCorrectEvent}startMove(i){const s=r.mouseButton(i);this._eventButton=s}endMove(i){delete this._eventButton}isValidStartEvent(i){return this._correctEvent(i)}isValidMoveEvent(i){return!function(s,R){const B=al[R];return s.buttons===void 0||(s.buttons&B)!==B}(i,this._eventButton)}isValidEndEvent(i){return r.mouseButton(i)===this._eventButton}}class Ml{constructor(){this._firstTouch=void 0}_isOneFingerTouch(i){return i.targetTouches.length===1}_isSameTouchEvent(i){return i.targetTouches[0].identifier===this._firstTouch}startMove(i){const s=i.targetTouches[0].identifier;this._firstTouch=s}endMove(i){delete this._firstTouch}isValidStartEvent(i){return this._isOneFingerTouch(i)}isValidMoveEvent(i){return this._isOneFingerTouch(i)&&this._isSameTouchEvent(i)}isValidEndEvent(i){return this._isOneFingerTouch(i)&&this._isSameTouchEvent(i)}}const Mo=F=>{F.mousedown=F.dragStart,F.mousemoveWindow=F.dragMove,F.mouseup=F.dragEnd,F.contextmenu=i=>{i.preventDefault()}},ql=({enable:F,clickTolerance:i,bearingDegreesPerPixelMoved:s=.8})=>{const R=new rs({checkCorrectEvent:B=>r.mouseButton(B)===0&&B.ctrlKey||r.mouseButton(B)===2});return new xo({clickTolerance:i,move:(B,G)=>({bearingDelta:(G.x-B.x)*s}),moveStateManager:R,enable:F,assignEvents:Mo})},il=({enable:F,clickTolerance:i,pitchDegreesPerPixelMoved:s=-.5})=>{const R=new rs({checkCorrectEvent:B=>r.mouseButton(B)===0&&B.ctrlKey||r.mouseButton(B)===2});return new xo({clickTolerance:i,move:(B,G)=>({pitchDelta:(G.y-B.y)*s}),moveStateManager:R,enable:F,assignEvents:Mo})};class Cs{constructor(i,s){this._clickTolerance=i.clickTolerance||1,this._map=s,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(i){return i<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(i,s,R){return this._calculateTransform(i,s,R)}touchmove(i,s,R){if(this._active){if(!this._shouldBePrevented(R.length))return i.preventDefault(),this._calculateTransform(i,s,R);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",i)}}touchend(i,s,R){this._calculateTransform(i,s,R),this._active&&this._shouldBePrevented(R.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(i,s,R){R.length>0&&(this._active=!0);const B=si(R,s),G=new e.P(0,0),ie=new e.P(0,0);let pe=0;for(const Se in B){const De=B[Se],Ue=this._touches[Se];Ue&&(G._add(De),ie._add(De.sub(Ue)),pe++,B[Se]=De)}if(this._touches=B,this._shouldBePrevented(pe)||!ie.mag())return;const xe=ie.div(pe);return this._sum._add(xe),this._sum.mag()<this._clickTolerance?void 0:{around:G.div(pe),panDelta:xe}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ho{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(i,s,R){this._firstTwoTouches||R.length<2||(this._firstTwoTouches=[R[0].identifier,R[1].identifier],this._start([s[0],s[1]]))}touchmove(i,s,R){if(!this._firstTwoTouches)return;i.preventDefault();const[B,G]=this._firstTwoTouches,ie=gi(R,s,B),pe=gi(R,s,G);if(!ie||!pe)return;const xe=this._aroundCenter?null:ie.add(pe).div(2);return this._move([ie,pe],xe,i)}touchend(i,s,R){if(!this._firstTwoTouches)return;const[B,G]=this._firstTwoTouches,ie=gi(R,s,B),pe=gi(R,s,G);ie&&pe||(this._active&&r.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(i){this._enabled=!0,this._aroundCenter=!!i&&i.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function gi(F,i,s){for(let R=0;R<F.length;R++)if(F[R].identifier===s)return i[R]}function Ms(F,i){return Math.log(F/i)/Math.LN2}class ma extends ho{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(i){this._startDistance=this._distance=i[0].dist(i[1])}_move(i,s){const R=this._distance;if(this._distance=i[0].dist(i[1]),this._active||!(Math.abs(Ms(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Ms(this._distance,R),pinchAround:s}}}function yc(F,i){return 180*F.angleWith(i)/Math.PI}class qc extends ho{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(i){this._startVector=this._vector=i[0].sub(i[1]),this._minDiameter=i[0].dist(i[1])}_move(i,s,R){const B=this._vector;if(this._vector=i[0].sub(i[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:yc(this._vector,B),pinchAround:s}}_isBelowThreshold(i){this._minDiameter=Math.min(this._minDiameter,i.mag());const s=25/(Math.PI*this._minDiameter)*360,R=yc(i,this._startVector);return Math.abs(R)<s}}function ol(F){return Math.abs(F.y)>Math.abs(F.x)}class Pl extends ho{constructor(i){super(),this._currentTouchCount=0,this._map=i}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(i,s,R){super.touchstart(i,s,R),this._currentTouchCount=R.length}_start(i){this._lastPoints=i,ol(i[0].sub(i[1]))&&(this._valid=!1)}_move(i,s,R){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const B=i[0].sub(this._lastPoints[0]),G=i[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(B,G,R.timeStamp),this._valid?(this._lastPoints=i,this._active=!0,{pitchDelta:(B.y+G.y)/2*-.5}):void 0}gestureBeginsVertically(i,s,R){if(this._valid!==void 0)return this._valid;const B=i.mag()>=2,G=s.mag()>=2;if(!B&&!G)return;if(!B||!G)return this._firstMove===void 0&&(this._firstMove=R),R-this._firstMove<100&&void 0;const ie=i.y>0==s.y>0;return ol(i)&&ol(s)&&ie}}const Ll={panStep:100,bearingStep:15,pitchStep:10};class ac{constructor(i){this._tr=new Ti(i);const s=Ll;this._panStep=s.panStep,this._bearingStep=s.bearingStep,this._pitchStep=s.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(i){if(i.altKey||i.ctrlKey||i.metaKey)return;let s=0,R=0,B=0,G=0,ie=0;switch(i.keyCode){case 61:case 107:case 171:case 187:s=1;break;case 189:case 109:case 173:s=-1;break;case 37:i.shiftKey?R=-1:(i.preventDefault(),G=-1);break;case 39:i.shiftKey?R=1:(i.preventDefault(),G=1);break;case 38:i.shiftKey?B=1:(i.preventDefault(),ie=-1);break;case 40:i.shiftKey?B=-1:(i.preventDefault(),ie=1);break;default:return}return this._rotationDisabled&&(R=0,B=0),{cameraAnimation:pe=>{const xe=this._tr;pe.easeTo({duration:300,easeId:"keyboardHandler",easing:ea,zoom:s?Math.round(xe.zoom)+s*(i.shiftKey?2:1):xe.zoom,bearing:xe.bearing+R*this._bearingStep,pitch:xe.pitch+B*this._pitchStep,offset:[-G*this._panStep,-ie*this._panStep],center:xe.center},{originalEvent:i})}}}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 ea(F){return F*(2-F)}const ns=4.000244140625;class sl{constructor(i,s){this._onTimeout=R=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(R)},this._map=i,this._tr=new Ti(i),this._triggerRenderFrame=s,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(i){this._defaultZoomRate=i}setWheelZoomRate(i){this._wheelZoomRate=i}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(i){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!i&&i.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(i){return!!this._map.cooperativeGestures.isEnabled()&&!(i.ctrlKey||this._map.cooperativeGestures.isBypassed(i))}wheel(i){if(!this.isEnabled())return;if(this._shouldBePrevented(i))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",i);let s=i.deltaMode===WheelEvent.DOM_DELTA_LINE?40*i.deltaY:i.deltaY;const R=h.now(),B=R-(this._lastWheelEventTime||0);this._lastWheelEventTime=R,s!==0&&s%ns==0?this._type="wheel":s!==0&&Math.abs(s)<4?this._type="trackpad":B>400?(this._type=null,this._lastValue=s,this._timeout=setTimeout(this._onTimeout,40,i)):this._type||(this._type=Math.abs(B*s)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,s+=this._lastValue)),i.shiftKey&&s&&(s/=4),this._type&&(this._lastWheelEvent=i,this._delta-=s,this._active||this._start(i)),i.preventDefault()}_start(i){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const s=r.mousePos(this._map.getCanvas(),i),R=this._tr;s.y>R.transform.height/2-R.transform.getHorizon()?this._around=e.N.convert(this._aroundCenter?R.center:R.unproject(s)):this._around=e.N.convert(R.center),this._aroundPoint=R.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const i=this._tr.transform;if(this._delta!==0){const xe=this._type==="wheel"&&Math.abs(this._delta)>ns?this._wheelZoomRate:this._defaultZoomRate;let Se=2/(1+Math.exp(-Math.abs(this._delta*xe)));this._delta<0&&Se!==0&&(Se=1/Se);const De=typeof this._targetZoom=="number"?i.zoomScale(this._targetZoom):i.scale;this._targetZoom=Math.min(i.maxZoom,Math.max(i.minZoom,i.scaleZoom(De*Se))),this._type==="wheel"&&(this._startZoom=i.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const s=typeof this._targetZoom=="number"?this._targetZoom:i.zoom,R=this._startZoom,B=this._easing;let G,ie=!1;const pe=h.now()-this._lastWheelEventTime;if(this._type==="wheel"&&R&&B&&pe){const xe=Math.min(pe/200,1),Se=B(xe);G=e.z.number(R,s,Se),xe<1?this._frameId||(this._frameId=!0):ie=!0}else G=s,ie=!0;return this._active=!0,ie&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ie,zoomDelta:G-i.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(i){let s=e.b9;if(this._prevEase){const R=this._prevEase,B=(h.now()-R.start)/R.duration,G=R.easing(B+.01)-R.easing(B),ie=.27/Math.sqrt(G*G+1e-4)*.01,pe=Math.sqrt(.0729-ie*ie);s=e.b8(ie,pe,.25,1)}return this._prevEase={start:h.now(),duration:i,easing:s},s}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Si{constructor(i,s){this._clickZoom=i,this._tapZoom=s}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ho{constructor(i){this._tr=new Ti(i),this.reset()}reset(){this._active=!1}dblclick(i,s){return i.preventDefault(),{cameraAnimation:R=>{R.easeTo({duration:300,zoom:this._tr.zoom+(i.shiftKey?-1:1),around:this._tr.unproject(s)},{originalEvent:i})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ll{constructor(){this._tap=new li({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(i,s,R){if(!this._swipePoint)if(this._tapTime){const B=s[0],G=i.timeStamp-this._tapTime<500,ie=this._tapPoint.dist(B)<30;G&&ie?R.length>0&&(this._swipePoint=B,this._swipeTouch=R[0].identifier):this.reset()}else this._tap.touchstart(i,s,R)}touchmove(i,s,R){if(this._tapTime){if(this._swipePoint){if(R[0].identifier!==this._swipeTouch)return;const B=s[0],G=B.y-this._swipePoint.y;return this._swipePoint=B,i.preventDefault(),this._active=!0,{zoomDelta:G/128}}}else this._tap.touchmove(i,s,R)}touchend(i,s,R){if(this._tapTime)this._swipePoint&&R.length===0&&this.reset();else{const B=this._tap.touchend(i,s,R);B&&(this._tapTime=i.timeStamp,this._tapPoint=B)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ps{constructor(i,s,R){this._el=i,this._mousePan=s,this._touchPan=R}enable(i){this._inertiaOptions=i||{},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 Oo{constructor(i,s,R){this._pitchWithRotate=i.pitchWithRotate,this._mouseRotate=s,this._mousePitch=R}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 cl{constructor(i,s,R,B){this._el=i,this._touchZoom=s,this._touchRotate=R,this._tapDragZoom=B,this._rotationDisabled=!1,this._enabled=!0}enable(i){this._touchZoom.enable(i),this._rotationDisabled||this._touchRotate.enable(i),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 hs{constructor(i,s){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=i,this._options=s,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const i=this._map.getCanvasContainer();i.classList.add("maplibregl-cooperative-gestures"),this._container=r.create("div","maplibregl-cooperative-gesture-screen",i);let s=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(s=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const R=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),B=document.createElement("div");B.className="maplibregl-desktop-message",B.textContent=s,this._container.appendChild(B);const G=document.createElement("div");G.className="maplibregl-mobile-message",G.textContent=R,this._container.appendChild(G),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(r.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(i){return i[this._bypassKey]}notifyGestureBlocked(i,s){this._enabled&&(this._map.fire(new e.k("cooperativegestureprevented",{gestureType:i,originalEvent:s})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Go=F=>F.zoom||F.drag||F.pitch||F.rotate;class Ls extends e.k{}function da(F){return F.panDelta&&F.panDelta.mag()||F.zoomDelta||F.bearingDelta||F.pitchDelta}class Za{constructor(i,s){this.handleWindowEvent=B=>{this.handleEvent(B,`${B.type}Window`)},this.handleEvent=(B,G)=>{if(B.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const ie=B.type==="renderFrame"?void 0:B,pe={needsRenderFrame:!1},xe={},Se={},De=B.touches,Ue=De?this._getMapTouches(De):void 0,rt=Ue?r.touchPos(this._map.getCanvas(),Ue):r.mousePos(this._map.getCanvas(),B);for(const{handlerName:vt,handler:Mt,allowed:At}of this._handlers){if(!Mt.isEnabled())continue;let Vt;this._blockedByActive(Se,At,vt)?Mt.reset():Mt[G||B.type]&&(Vt=Mt[G||B.type](B,rt,Ue),this.mergeHandlerResult(pe,xe,Vt,vt,ie),Vt&&Vt.needsRenderFrame&&this._triggerRenderFrame()),(Vt||Mt.isActive())&&(Se[vt]=Mt)}const ct={};for(const vt in this._previousActiveHandlers)Se[vt]||(ct[vt]=ie);this._previousActiveHandlers=Se,(Object.keys(ct).length||da(pe))&&(this._changes.push([pe,xe,ct]),this._triggerRenderFrame()),(Object.keys(Se).length||da(pe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=pe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=i,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new rc(i),this._bearingSnap=s.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(s);const R=this._el;this._listeners=[[R,"touchstart",{passive:!0}],[R,"touchmove",{passive:!1}],[R,"touchend",void 0],[R,"touchcancel",void 0],[R,"mousedown",void 0],[R,"mousemove",void 0],[R,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[R,"mouseover",void 0],[R,"mouseout",void 0],[R,"dblclick",void 0],[R,"click",void 0],[R,"keydown",{capture:!1}],[R,"keyup",void 0],[R,"wheel",{passive:!1}],[R,"contextmenu",void 0],[window,"blur",void 0]];for(const[B,G,ie]of this._listeners)r.addEventListener(B,G,B===document?this.handleWindowEvent:this.handleEvent,ie)}destroy(){for(const[i,s,R]of this._listeners)r.removeEventListener(i,s,i===document?this.handleWindowEvent:this.handleEvent,R)}_addDefaultHandlers(i){const s=this._map,R=s.getCanvasContainer();this._add("mapEvent",new nc(s,i));const B=s.boxZoom=new bo(s,i);this._add("boxZoom",B),i.interactive&&i.boxZoom&&B.enable();const G=s.cooperativeGestures=new hs(s,i.cooperativeGestures);this._add("cooperativeGestures",G),i.cooperativeGestures&&G.enable();const ie=new uo(s),pe=new Ho(s);s.doubleClickZoom=new Si(pe,ie),this._add("tapZoom",ie),this._add("clickZoom",pe),i.interactive&&i.doubleClickZoom&&s.doubleClickZoom.enable();const xe=new ll;this._add("tapDragZoom",xe);const Se=s.touchPitch=new Pl(s);this._add("touchPitch",Se),i.interactive&&i.touchPitch&&s.touchPitch.enable(i.touchPitch);const De=ql(i),Ue=il(i);s.dragRotate=new Oo(i,De,Ue),this._add("mouseRotate",De,["mousePitch"]),this._add("mousePitch",Ue,["mouseRotate"]),i.interactive&&i.dragRotate&&s.dragRotate.enable();const rt=(({enable:Vt,clickTolerance:Et})=>{const Kt=new rs({checkCorrectEvent:Yt=>r.mouseButton(Yt)===0&&!Yt.ctrlKey});return new xo({clickTolerance:Et,move:(Yt,Jt)=>({around:Jt,panDelta:Jt.sub(Yt)}),activateOnStart:!0,moveStateManager:Kt,enable:Vt,assignEvents:Mo})})(i),ct=new Cs(i,s);s.dragPan=new Ps(R,rt,ct),this._add("mousePan",rt),this._add("touchPan",ct,["touchZoom","touchRotate"]),i.interactive&&i.dragPan&&s.dragPan.enable(i.dragPan);const pt=new qc,vt=new ma;s.touchZoomRotate=new cl(R,vt,pt,xe),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",vt,["touchPan","touchRotate"]),i.interactive&&i.touchZoomRotate&&s.touchZoomRotate.enable(i.touchZoomRotate);const Mt=s.scrollZoom=new sl(s,()=>this._triggerRenderFrame());this._add("scrollZoom",Mt,["mousePan"]),i.interactive&&i.scrollZoom&&s.scrollZoom.enable(i.scrollZoom);const At=s.keyboard=new ac(s);this._add("keyboard",At),i.interactive&&i.keyboard&&s.keyboard.enable(),this._add("blockableMapEvent",new zo(s))}_add(i,s,R){this._handlers.push({handlerName:i,handler:s,allowed:R}),this._handlersById[i]=s}stop(i){if(!this._updatingCamera){for(const{handler:s}of this._handlers)s.reset();this._inertia.clear(),this._fireEvents({},{},i),this._changes=[]}}isActive(){for(const{handler:i}of this._handlers)if(i.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Go(this._eventsInProgress)||this.isZooming()}_blockedByActive(i,s,R){for(const B in i)if(B!==R&&(!s||s.indexOf(B)<0))return!0;return!1}_getMapTouches(i){const s=[];for(const R of i){const B=R.target;this._el.contains(B)&&s.push(R)}return s}mergeHandlerResult(i,s,R,B,G){if(!R)return;e.e(i,R);const ie={handlerName:B,originalEvent:R.originalEvent||G};R.zoomDelta!==void 0&&(s.zoom=ie),R.panDelta!==void 0&&(s.drag=ie),R.pitchDelta!==void 0&&(s.pitch=ie),R.bearingDelta!==void 0&&(s.rotate=ie)}_applyChanges(){const i={},s={},R={};for(const[B,G,ie]of this._changes)B.panDelta&&(i.panDelta=(i.panDelta||new e.P(0,0))._add(B.panDelta)),B.zoomDelta&&(i.zoomDelta=(i.zoomDelta||0)+B.zoomDelta),B.bearingDelta&&(i.bearingDelta=(i.bearingDelta||0)+B.bearingDelta),B.pitchDelta&&(i.pitchDelta=(i.pitchDelta||0)+B.pitchDelta),B.around!==void 0&&(i.around=B.around),B.pinchAround!==void 0&&(i.pinchAround=B.pinchAround),B.noInertia&&(i.noInertia=B.noInertia),e.e(s,G),e.e(R,ie);this._updateMapTransform(i,s,R),this._changes=[]}_updateMapTransform(i,s,R){const B=this._map,G=B._getTransformForUpdate(),ie=B.terrain;if(!(da(i)||ie&&this._terrainMovement))return this._fireEvents(s,R,!0);let{panDelta:pe,zoomDelta:xe,bearingDelta:Se,pitchDelta:De,around:Ue,pinchAround:rt}=i;rt!==void 0&&(Ue=rt),B._stop(!0),Ue=Ue||B.transform.centerPoint;const ct=G.pointLocation(pe?Ue.sub(pe):Ue);Se&&(G.bearing+=Se),De&&(G.pitch+=De),xe&&(G.zoom+=xe),ie?this._terrainMovement||!s.drag&&!s.zoom?s.drag&&this._terrainMovement?G.center=G.pointLocation(G.centerPoint.sub(pe)):G.setLocationAtPoint(ct,Ue):(this._terrainMovement=!0,this._map._elevationFreeze=!0,G.setLocationAtPoint(ct,Ue)):G.setLocationAtPoint(ct,Ue),B._applyUpdatedTransform(G),this._map._update(),i.noInertia||this._inertia.record(i),this._fireEvents(s,R,!0)}_fireEvents(i,s,R){const B=Go(this._eventsInProgress),G=Go(i),ie={};for(const Ue in i){const{originalEvent:rt}=i[Ue];this._eventsInProgress[Ue]||(ie[`${Ue}start`]=rt),this._eventsInProgress[Ue]=i[Ue]}!B&&G&&this._fireEvent("movestart",G.originalEvent);for(const Ue in ie)this._fireEvent(Ue,ie[Ue]);G&&this._fireEvent("move",G.originalEvent);for(const Ue in i){const{originalEvent:rt}=i[Ue];this._fireEvent(Ue,rt)}const pe={};let xe;for(const Ue in this._eventsInProgress){const{handlerName:rt,originalEvent:ct}=this._eventsInProgress[Ue];this._handlersById[rt].isActive()||(delete this._eventsInProgress[Ue],xe=s[rt]||ct,pe[`${Ue}end`]=xe)}for(const Ue in pe)this._fireEvent(Ue,pe[Ue]);const Se=Go(this._eventsInProgress),De=(B||G)&&!Se;if(De&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ue=this._map._getTransformForUpdate();Ue.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ue)}if(R&&De){this._updatingCamera=!0;const Ue=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),rt=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ue||!Ue.essential&&h.prefersReducedMotion?(this._map.fire(new e.k("moveend",{originalEvent:xe})),rt(this._map.getBearing())&&this._map.resetNorth()):(rt(Ue.bearing||this._map.getBearing())&&(Ue.bearing=0),Ue.freezeElevation=!0,this._map.easeTo(Ue,{originalEvent:xe})),this._updatingCamera=!1}}_fireEvent(i,s){this._map.fire(new e.k(i,s?{originalEvent:s}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(i=>{delete this._frameId,this.handleEvent(new Ls("renderFrame",{timeStamp:i})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class no extends e.E{constructor(i,s){super(),this._renderFrameCallback=()=>{const R=Math.min((h.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(R)),R<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=i,this._bearingSnap=s.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.N(this.transform.center.lng,this.transform.center.lat)}setCenter(i,s){return this.jumpTo({center:i},s)}panBy(i,s,R){return i=e.P.convert(i).mult(-1),this.panTo(this.transform.center,e.e({offset:i},s),R)}panTo(i,s,R){return this.easeTo(e.e({center:i},s),R)}getZoom(){return this.transform.zoom}setZoom(i,s){return this.jumpTo({zoom:i},s),this}zoomTo(i,s,R){return this.easeTo(e.e({zoom:i},s),R)}zoomIn(i,s){return this.zoomTo(this.getZoom()+1,i,s),this}zoomOut(i,s){return this.zoomTo(this.getZoom()-1,i,s),this}getBearing(){return this.transform.bearing}setBearing(i,s){return this.jumpTo({bearing:i},s),this}getPadding(){return this.transform.padding}setPadding(i,s){return this.jumpTo({padding:i},s),this}rotateTo(i,s,R){return this.easeTo(e.e({bearing:i},s),R)}resetNorth(i,s){return this.rotateTo(0,e.e({duration:1e3},i),s),this}resetNorthPitch(i,s){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},i),s),this}snapToNorth(i,s){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(i,s):this}getPitch(){return this.transform.pitch}setPitch(i,s){return this.jumpTo({pitch:i},s),this}cameraForBounds(i,s){i=Ce.convert(i);const R=s&&s.bearing||0;return this._cameraForBoxAndBearing(i.getNorthWest(),i.getSouthEast(),R,s)}_cameraForBoxAndBearing(i,s,R,B){const G={top:0,bottom:0,right:0,left:0};if(typeof(B=e.e({padding:G,offset:[0,0],maxZoom:this.transform.maxZoom},B)).padding=="number"){const vn=B.padding;B.padding={top:vn,bottom:vn,right:vn,left:vn}}B.padding=e.e(G,B.padding);const ie=this.transform,pe=ie.padding,xe=new Ce(i,s),Se=ie.project(xe.getNorthWest()),De=ie.project(xe.getNorthEast()),Ue=ie.project(xe.getSouthEast()),rt=ie.project(xe.getSouthWest()),ct=e.ba(-R),pt=Se.rotate(ct),vt=De.rotate(ct),Mt=Ue.rotate(ct),At=rt.rotate(ct),Vt=new e.P(Math.max(pt.x,vt.x,At.x,Mt.x),Math.max(pt.y,vt.y,At.y,Mt.y)),Et=new e.P(Math.min(pt.x,vt.x,At.x,Mt.x),Math.min(pt.y,vt.y,At.y,Mt.y)),Kt=Vt.sub(Et),Yt=(ie.width-(pe.left+pe.right+B.padding.left+B.padding.right))/Kt.x,Jt=(ie.height-(pe.top+pe.bottom+B.padding.top+B.padding.bottom))/Kt.y;if(Jt<0||Yt<0)return void e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const dr=Math.min(ie.scaleZoom(ie.scale*Math.min(Yt,Jt)),B.maxZoom),xr=e.P.convert(B.offset),Dr=(B.padding.left-B.padding.right)/2,Ir=(B.padding.top-B.padding.bottom)/2,qr=new e.P(Dr,Ir).rotate(e.ba(R)),$r=xr.add(qr).mult(ie.scale/ie.zoomScale(dr));return{center:ie.unproject(Se.add(Ue).div(2).sub($r)),zoom:dr,bearing:R}}fitBounds(i,s,R){return this._fitInternal(this.cameraForBounds(i,s),s,R)}fitScreenCoordinates(i,s,R,B,G){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.P.convert(i)),this.transform.pointLocation(e.P.convert(s)),R,B),B,G)}_fitInternal(i,s,R){return i?(delete(s=e.e(i,s)).padding,s.linear?this.easeTo(s,R):this.flyTo(s,R)):this}jumpTo(i,s){this.stop();const R=this._getTransformForUpdate();let B=!1,G=!1,ie=!1;return"zoom"in i&&R.zoom!==+i.zoom&&(B=!0,R.zoom=+i.zoom),i.center!==void 0&&(R.center=e.N.convert(i.center)),"bearing"in i&&R.bearing!==+i.bearing&&(G=!0,R.bearing=+i.bearing),"pitch"in i&&R.pitch!==+i.pitch&&(ie=!0,R.pitch=+i.pitch),i.padding==null||R.isPaddingEqual(i.padding)||(R.padding=i.padding),this._applyUpdatedTransform(R),this.fire(new e.k("movestart",s)).fire(new e.k("move",s)),B&&this.fire(new e.k("zoomstart",s)).fire(new e.k("zoom",s)).fire(new e.k("zoomend",s)),G&&this.fire(new e.k("rotatestart",s)).fire(new e.k("rotate",s)).fire(new e.k("rotateend",s)),ie&&this.fire(new e.k("pitchstart",s)).fire(new e.k("pitch",s)).fire(new e.k("pitchend",s)),this.fire(new e.k("moveend",s))}calculateCameraOptionsFromTo(i,s,R,B=0){const G=e.Z.fromLngLat(i,s),ie=e.Z.fromLngLat(R,B),pe=ie.x-G.x,xe=ie.y-G.y,Se=ie.z-G.z,De=Math.hypot(pe,xe,Se);if(De===0)throw new Error("Can't calculate camera options with same From and To");const Ue=Math.hypot(pe,xe),rt=this.transform.scaleZoom(this.transform.cameraToCenterDistance/De/this.transform.tileSize),ct=180*Math.atan2(pe,-xe)/Math.PI;let pt=180*Math.acos(Ue/De)/Math.PI;return pt=Se<0?90-pt:90+pt,{center:ie.toLngLat(),zoom:rt,pitch:pt,bearing:ct}}easeTo(i,s){var R;this._stop(!1,i.easeId),((i=e.e({offset:[0,0],duration:500,easing:e.b9},i)).animate===!1||!i.essential&&h.prefersReducedMotion)&&(i.duration=0);const B=this._getTransformForUpdate(),G=B.zoom,ie=B.bearing,pe=B.pitch,xe=B.padding,Se="bearing"in i?this._normalizeBearing(i.bearing,ie):ie,De="pitch"in i?+i.pitch:pe,Ue="padding"in i?i.padding:B.padding,rt=e.P.convert(i.offset);let ct=B.centerPoint.add(rt);const pt=B.pointLocation(ct),{center:vt,zoom:Mt}=B.getConstrained(e.N.convert(i.center||pt),(R=i.zoom)!==null&&R!==void 0?R:G);this._normalizeCenter(vt,B);const At=B.project(pt),Vt=B.project(vt).sub(At),Et=B.zoomScale(Mt-G);let Kt,Yt;i.around&&(Kt=e.N.convert(i.around),Yt=B.locationPoint(Kt));const Jt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Mt!==G,this._rotating=this._rotating||ie!==Se,this._pitching=this._pitching||De!==pe,this._padding=!B.isPaddingEqual(Ue),this._easeId=i.easeId,this._prepareEase(s,i.noMoveStart,Jt),this.terrain&&this._prepareElevation(vt),this._ease(dr=>{if(this._zooming&&(B.zoom=e.z.number(G,Mt,dr)),this._rotating&&(B.bearing=e.z.number(ie,Se,dr)),this._pitching&&(B.pitch=e.z.number(pe,De,dr)),this._padding&&(B.interpolatePadding(xe,Ue,dr),ct=B.centerPoint.add(rt)),this.terrain&&!i.freezeElevation&&this._updateElevation(dr),Kt)B.setLocationAtPoint(Kt,Yt);else{const xr=B.zoomScale(B.zoom-G),Dr=Mt>G?Math.min(2,Et):Math.max(.5,Et),Ir=Math.pow(Dr,1-dr),qr=B.unproject(At.add(Vt.mult(dr*Ir)).mult(xr));B.setLocationAtPoint(B.renderWorldCopies?qr.wrap():qr,ct)}this._applyUpdatedTransform(B),this._fireMoveEvents(s)},dr=>{this.terrain&&i.freezeElevation&&this._finalizeElevation(),this._afterEase(s,dr)},i),this}_prepareEase(i,s,R={}){this._moving=!0,s||R.moving||this.fire(new e.k("movestart",i)),this._zooming&&!R.zooming&&this.fire(new e.k("zoomstart",i)),this._rotating&&!R.rotating&&this.fire(new e.k("rotatestart",i)),this._pitching&&!R.pitching&&this.fire(new e.k("pitchstart",i))}_prepareElevation(i){this._elevationCenter=i,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(i,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(i){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const s=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(i<1&&s!==this._elevationTarget){const R=this._elevationTarget-this._elevationStart,B=(s-(R*i+this._elevationStart))/(1-i);this._elevationStart+=i*(R-B),this._elevationTarget=s}this.transform.elevation=e.z.number(this._elevationStart,this._elevationTarget,i)}_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(i){const s=i.getCameraPosition(),R=this.terrain.getElevationForLngLatZoom(s.lngLat,i.zoom);if(s.altitude<R){const B=this.calculateCameraOptionsFromTo(s.lngLat,R,i.center,i.elevation);return{pitch:B.pitch,zoom:B.zoom}}return{}}_applyUpdatedTransform(i){const s=[];if(this.terrain&&s.push(B=>this._elevateCameraIfInsideTerrain(B)),this.transformCameraUpdate&&s.push(B=>this.transformCameraUpdate(B)),!s.length)return;const R=i.clone();for(const B of s){const G=R.clone(),{center:ie,zoom:pe,pitch:xe,bearing:Se,elevation:De}=B(G);ie&&(G.center=ie),pe!==void 0&&(G.zoom=pe),xe!==void 0&&(G.pitch=xe),Se!==void 0&&(G.bearing=Se),De!==void 0&&(G.elevation=De),R.apply(G)}this.transform.apply(R)}_fireMoveEvents(i){this.fire(new e.k("move",i)),this._zooming&&this.fire(new e.k("zoom",i)),this._rotating&&this.fire(new e.k("rotate",i)),this._pitching&&this.fire(new e.k("pitch",i))}_afterEase(i,s){if(this._easeId&&s&&this._easeId===s)return;delete this._easeId;const R=this._zooming,B=this._rotating,G=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,R&&this.fire(new e.k("zoomend",i)),B&&this.fire(new e.k("rotateend",i)),G&&this.fire(new e.k("pitchend",i)),this.fire(new e.k("moveend",i))}flyTo(i,s){var R;if(!i.essential&&h.prefersReducedMotion){const an=e.M(i,["center","zoom","bearing","pitch","around"]);return this.jumpTo(an,s)}this.stop(),i=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.b9},i);const B=this._getTransformForUpdate(),G=B.zoom,ie=B.bearing,pe=B.pitch,xe=B.padding,Se="bearing"in i?this._normalizeBearing(i.bearing,ie):ie,De="pitch"in i?+i.pitch:pe,Ue="padding"in i?i.padding:B.padding,rt=e.P.convert(i.offset);let ct=B.centerPoint.add(rt);const pt=B.pointLocation(ct),{center:vt,zoom:Mt}=B.getConstrained(e.N.convert(i.center||pt),(R=i.zoom)!==null&&R!==void 0?R:G);this._normalizeCenter(vt,B);const At=B.zoomScale(Mt-G),Vt=B.project(pt),Et=B.project(vt).sub(Vt);let Kt=i.curve;const Yt=Math.max(B.width,B.height),Jt=Yt/At,dr=Et.mag();if("minZoom"in i){const an=e.ad(Math.min(i.minZoom,G,Mt),B.minZoom,B.maxZoom),Sn=Yt/B.zoomScale(an-G);Kt=Math.sqrt(Sn/dr*2)}const xr=Kt*Kt;function Dr(an){const Sn=(Jt*Jt-Yt*Yt+(an?-1:1)*xr*xr*dr*dr)/(2*(an?Jt:Yt)*xr*dr);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}function Ir(an){return(Math.exp(an)-Math.exp(-an))/2}function qr(an){return(Math.exp(an)+Math.exp(-an))/2}const $r=Dr(!1);let vn=function(an){return qr($r)/qr($r+Kt*an)},Qr=function(an){return Yt*((qr($r)*(Ir(Sn=$r+Kt*an)/qr(Sn))-Ir($r))/xr)/dr;var Sn},xn=(Dr(!0)-$r)/Kt;if(Math.abs(dr)<1e-6||!isFinite(xn)){if(Math.abs(Yt-Jt)<1e-6)return this.easeTo(i,s);const an=Jt<Yt?-1:1;xn=Math.abs(Math.log(Jt/Yt))/Kt,Qr=()=>0,vn=Sn=>Math.exp(an*Kt*Sn)}if("duration"in i)i.duration=+i.duration;else{const an="screenSpeed"in i?+i.screenSpeed/Kt:+i.speed;i.duration=1e3*xn/an}return i.maxDuration&&i.duration>i.maxDuration&&(i.duration=0),this._zooming=!0,this._rotating=ie!==Se,this._pitching=De!==pe,this._padding=!B.isPaddingEqual(Ue),this._prepareEase(s,!1),this.terrain&&this._prepareElevation(vt),this._ease(an=>{const Sn=an*xn,mn=1/vn(Sn);B.zoom=an===1?Mt:G+B.scaleZoom(mn),this._rotating&&(B.bearing=e.z.number(ie,Se,an)),this._pitching&&(B.pitch=e.z.number(pe,De,an)),this._padding&&(B.interpolatePadding(xe,Ue,an),ct=B.centerPoint.add(rt)),this.terrain&&!i.freezeElevation&&this._updateElevation(an);const Ln=an===1?vt:B.unproject(Vt.add(Et.mult(Qr(Sn))).mult(mn));B.setLocationAtPoint(B.renderWorldCopies?Ln.wrap():Ln,ct),this._applyUpdatedTransform(B),this._fireMoveEvents(s)},()=>{this.terrain&&i.freezeElevation&&this._finalizeElevation(),this._afterEase(s)},i),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(i,s){var R;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const B=this._onEaseEnd;delete this._onEaseEnd,B.call(this,s)}return i||(R=this.handlers)===null||R===void 0||R.stop(!1),this}_ease(i,s,R){R.animate===!1||R.duration===0?(i(1),s()):(this._easeStart=h.now(),this._easeOptions=R,this._onEaseFrame=i,this._onEaseEnd=s,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(i,s){i=e.b3(i,-180,180);const R=Math.abs(i-s);return Math.abs(i-360-s)<R&&(i-=360),Math.abs(i+360-s)<R&&(i+=360),i}_normalizeCenter(i,s){if(!s.renderWorldCopies||s.lngRange)return;const R=i.lng-s.center.lng;i.lng+=R>180?-360:R<-180?360:0}queryTerrainElevation(i){return this.terrain?this.terrain.getElevationForLngLatZoom(e.N.convert(i),this.transform.tileZoom)-this.transform.elevation:null}}const No={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class as{constructor(i=No){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=s=>{!s||s.sourceDataType!=="metadata"&&s.sourceDataType!=="visibility"&&s.dataType!=="style"&&s.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=i}getDefaultPosition(){return"bottom-right"}onAdd(i){return this._map=i,this._compact=this.options.compact,this._container=r.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=r.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(i,s){const R=this._map._getUIString(`AttributionControl.${s}`);i.title=R,i.setAttribute("aria-label",R)}_updateAttributions(){if(!this._map.style)return;let i=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?i=i.concat(this.options.customAttribution.map(B=>typeof B!="string"?"":B)):typeof this.options.customAttribution=="string"&&i.push(this.options.customAttribution)),this._map.style.stylesheet){const B=this._map.style.stylesheet;this.styleOwner=B.owner,this.styleId=B.id}const s=this._map.style.sourceCaches;for(const B in s){const G=s[B];if(G.used||G.usedForTerrain){const ie=G.getSource();ie.attribution&&i.indexOf(ie.attribution)<0&&i.push(ie.attribution)}}i=i.filter(B=>String(B).trim()),i.sort((B,G)=>B.length-G.length),i=i.filter((B,G)=>{for(let ie=G+1;ie<i.length;ie++)if(i[ie].indexOf(B)>=0)return!1;return!0});const R=i.join(" | ");R!==this._attribHTML&&(this._attribHTML=R,i.length?(this._innerContainer.innerHTML=R,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class po{constructor(i={}){this._updateCompact=()=>{const s=this._container.children;if(s.length){const R=s[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&R.classList.add("maplibregl-compact"):R.classList.remove("maplibregl-compact")}},this.options=i}getDefaultPosition(){return"bottom-left"}onAdd(i){this._map=i,this._compact=this.options&&this.options.compact,this._container=r.create("div","maplibregl-ctrl");const s=r.create("a","maplibregl-ctrl-logo");return s.target="_blank",s.rel="noopener nofollow",s.href="https://maplibre.org/",s.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),s.setAttribute("rel","noopener nofollow"),this._container.appendChild(s),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){r.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class vc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(i){const s=++this._id;return this._queue.push({callback:i,id:s,cancelled:!1}),s}remove(i){const s=this._currentlyRunning,R=s?this._queue.concat(s):this._queue;for(const B of R)if(B.id===i)return void(B.cancelled=!0)}run(i=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const s=this._currentlyRunning=this._queue;this._queue=[];for(const R of s)if(!R.cancelled&&(R.callback(i),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var la=e.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Ro extends e.E{constructor(i){super(),this.sourceCache=i,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,i.usedForTerrain=!0,i.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(i,s){this.sourceCache.update(i,s),this._renderableTilesKeys=[];const R={};for(const B of i.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:s}))R[B.key]=!0,this._renderableTilesKeys.push(B.key),this._tiles[B.key]||(B.posMatrix=new Float64Array(16),e.aQ(B.posMatrix,0,e.X,0,e.X,0,1),this._tiles[B.key]=new we(B,this.tileSize));for(const B in this._tiles)R[B]||delete this._tiles[B]}freeRtt(i){for(const s in this._tiles){const R=this._tiles[s];(!i||R.tileID.equals(i)||R.tileID.isChildOf(i)||i.isChildOf(R.tileID))&&(R.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(i=>this.getTileByID(i))}getTileByID(i){return this._tiles[i]}getTerrainCoords(i){const s={};for(const R of this._renderableTilesKeys){const B=this._tiles[R].tileID;if(B.canonical.equals(i.canonical)){const G=i.clone();G.posMatrix=new Float64Array(16),e.aQ(G.posMatrix,0,e.X,0,e.X,0,1),s[R]=G}else if(B.canonical.isChildOf(i.canonical)){const G=i.clone();G.posMatrix=new Float64Array(16);const ie=B.canonical.z-i.canonical.z,pe=B.canonical.x-(B.canonical.x>>ie<<ie),xe=B.canonical.y-(B.canonical.y>>ie<<ie),Se=e.X>>ie;e.aQ(G.posMatrix,0,Se,0,Se,0,1),e.J(G.posMatrix,G.posMatrix,[-pe*Se,-xe*Se,0]),s[R]=G}else if(i.canonical.isChildOf(B.canonical)){const G=i.clone();G.posMatrix=new Float64Array(16);const ie=i.canonical.z-B.canonical.z,pe=i.canonical.x-(i.canonical.x>>ie<<ie),xe=i.canonical.y-(i.canonical.y>>ie<<ie),Se=e.X>>ie;e.aQ(G.posMatrix,0,e.X,0,e.X,0,1),e.J(G.posMatrix,G.posMatrix,[pe*Se,xe*Se,0]),e.K(G.posMatrix,G.posMatrix,[1/2**ie,1/2**ie,0]),s[R]=G}}return s}getSourceTile(i,s){const R=this.sourceCache._source;let B=i.overscaledZ-this.deltaZoom;if(B>R.maxzoom&&(B=R.maxzoom),B<R.minzoom)return null;this._sourceTileCache[i.key]||(this._sourceTileCache[i.key]=i.scaledTo(B).key);let G=this.sourceCache.getTileByID(this._sourceTileCache[i.key]);if((!G||!G.dem)&&s)for(;B>=R.minzoom&&(!G||!G.dem);)G=this.sourceCache.getTileByID(i.scaledTo(B--).key);return G}tilesAfterTime(i=Date.now()){return Object.values(this._tiles).filter(s=>s.timeAdded>=i)}}class Ya{constructor(i,s,R){this.painter=i,this.sourceCache=new Ro(s),this.options=R,this.exaggeration=typeof R.exaggeration=="number"?R.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(i,s,R,B=e.X){var G;if(!(s>=0&&s<B&&R>=0&&R<B))return 0;const ie=this.getTerrainData(i),pe=(G=ie.tile)===null||G===void 0?void 0:G.dem;if(!pe)return 0;const xe=function(pt,vt,Mt){var At=vt[0],Vt=vt[1];return pt[0]=Mt[0]*At+Mt[4]*Vt+Mt[12],pt[1]=Mt[1]*At+Mt[5]*Vt+Mt[13],pt}([],[s/B*e.X,R/B*e.X],ie.u_terrain_matrix),Se=[xe[0]*pe.dim,xe[1]*pe.dim],De=Math.floor(Se[0]),Ue=Math.floor(Se[1]),rt=Se[0]-De,ct=Se[1]-Ue;return pe.get(De,Ue)*(1-rt)*(1-ct)+pe.get(De+1,Ue)*rt*(1-ct)+pe.get(De,Ue+1)*(1-rt)*ct+pe.get(De+1,Ue+1)*rt*ct}getElevationForLngLatZoom(i,s){const{tileID:R,mercatorX:B,mercatorY:G}=this._getOverscaledTileIDFromLngLatZoom(i,s);return this.getElevation(R,B%e.X,G%e.X,e.X)}getElevation(i,s,R,B=e.X){return this.getDEMElevation(i,s,R,B)*this.exaggeration}getTerrainData(i){if(!this._emptyDemTexture){const B=this.painter.context,G=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new z(B,G,B.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new z(B,new e.R({width:1,height:1}),B.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(B.gl.NEAREST,B.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ao([])}const s=this.sourceCache.getSourceTile(i,!0);if(s&&s.dem&&(!s.demTexture||s.needsTerrainPrepare)){const B=this.painter.context;s.demTexture=this.painter.getTileTexture(s.dem.stride),s.demTexture?s.demTexture.update(s.dem.getPixels(),{premultiply:!1}):s.demTexture=new z(B,s.dem.getPixels(),B.gl.RGBA,{premultiply:!1}),s.demTexture.bind(B.gl.NEAREST,B.gl.CLAMP_TO_EDGE),s.needsTerrainPrepare=!1}const R=s&&s+s.tileID.key+i.key;if(R&&!this._demMatrixCache[R]){const B=this.sourceCache.sourceCache._source.maxzoom;let G=i.canonical.z-s.tileID.canonical.z;i.overscaledZ>i.canonical.z&&(i.canonical.z>=B?G=i.canonical.z-B:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const ie=i.canonical.x-(i.canonical.x>>G<<G),pe=i.canonical.y-(i.canonical.y>>G<<G),xe=e.bb(new Float64Array(16),[1/(e.X<<G),1/(e.X<<G),0]);e.J(xe,xe,[ie*e.X,pe*e.X,0]),this._demMatrixCache[i.key]={matrix:xe,coord:i}}return{u_depth:2,u_terrain:3,u_terrain_dim:s&&s.dem&&s.dem.dim||1,u_terrain_matrix:R?this._demMatrixCache[i.key].matrix:this._emptyDemMatrix,u_terrain_unpack:s&&s.dem&&s.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(s&&s.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:s}}getFramebuffer(i){const s=this.painter,R=s.width/devicePixelRatio,B=s.height/devicePixelRatio;return!this._fbo||this._fbo.width===R&&this._fbo.height===B||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new z(s.context,{width:R,height:B,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new z(s.context,{width:R,height:B,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=s.context.createFramebuffer(R,B,!0,!1),this._fbo.depthAttachment.set(s.context.createRenderbuffer(s.context.gl.DEPTH_COMPONENT16,R,B))),this._fbo.colorAttachment.set(i==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const i=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const s=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let G=0,ie=0;G<this._coordsTextureSize;G++)for(let pe=0;pe<this._coordsTextureSize;pe++,ie+=4)s[ie+0]=255&pe,s[ie+1]=255&G,s[ie+2]=pe>>8<<4|G>>8,s[ie+3]=0;const R=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(s.buffer)),B=new z(i,R,i.gl.RGBA,{premultiply:!1});return B.bind(i.gl.NEAREST,i.gl.CLAMP_TO_EDGE),this._coordsTexture=B,B}pointCoordinate(i){this.painter.maybeDrawDepthAndCoords(!0);const s=new Uint8Array(4),R=this.painter.context,B=R.gl,G=Math.round(i.x*this.painter.pixelRatio/devicePixelRatio),ie=Math.round(i.y*this.painter.pixelRatio/devicePixelRatio),pe=Math.round(this.painter.height/devicePixelRatio);R.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),B.readPixels(G,pe-ie-1,1,1,B.RGBA,B.UNSIGNED_BYTE,s),R.bindFramebuffer.set(null);const xe=s[0]+(s[2]>>4<<8),Se=s[1]+((15&s[2])<<8),De=this.coordsIndex[255-s[3]],Ue=De&&this.sourceCache.getTileByID(De);if(!Ue)return null;const rt=this._coordsTextureSize,ct=(1<<Ue.tileID.canonical.z)*rt;return new e.Z((Ue.tileID.canonical.x*rt+xe)/ct+Ue.tileID.wrap,(Ue.tileID.canonical.y*rt+Se)/ct,this.getElevation(Ue.tileID,xe,Se,rt))}depthAtPoint(i){const s=new Uint8Array(4),R=this.painter.context,B=R.gl;return R.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),B.readPixels(i.x,this.painter.height/devicePixelRatio-i.y-1,1,1,B.RGBA,B.UNSIGNED_BYTE,s),R.bindFramebuffer.set(null),(s[0]/16777216+s[1]/65536+s[2]/256+s[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const i=this.painter.context,s=new e.bc,R=new e.aY,B=this.meshSize,G=e.X/B,ie=B*B;for(let Ue=0;Ue<=B;Ue++)for(let rt=0;rt<=B;rt++)s.emplaceBack(rt*G,Ue*G,0);for(let Ue=0;Ue<ie;Ue+=B+1)for(let rt=0;rt<B;rt++)R.emplaceBack(rt+Ue,B+rt+Ue+1,B+rt+Ue+2),R.emplaceBack(rt+Ue,B+rt+Ue+2,rt+Ue+1);const pe=s.length,xe=pe+2*(B+1);for(const Ue of[0,1])for(let rt=0;rt<=B;rt++)for(const ct of[0,1])s.emplaceBack(rt*G,Ue*e.X,ct);for(let Ue=0;Ue<2*B;Ue+=2)R.emplaceBack(xe+Ue,xe+Ue+1,xe+Ue+3),R.emplaceBack(xe+Ue,xe+Ue+3,xe+Ue+2),R.emplaceBack(pe+Ue,pe+Ue+3,pe+Ue+1),R.emplaceBack(pe+Ue,pe+Ue+2,pe+Ue+3);const Se=s.length,De=Se+2*(B+1);for(const Ue of[0,1])for(let rt=0;rt<=B;rt++)for(const ct of[0,1])s.emplaceBack(Ue*e.X,rt*G,ct);for(let Ue=0;Ue<2*B;Ue+=2)R.emplaceBack(Se+Ue,Se+Ue+1,Se+Ue+3),R.emplaceBack(Se+Ue,Se+Ue+3,Se+Ue+2),R.emplaceBack(De+Ue,De+Ue+3,De+Ue+1),R.emplaceBack(De+Ue,De+Ue+2,De+Ue+3);return this._mesh=new ec(i.createVertexBuffer(s,la.members),i.createIndexBuffer(R),e.a0.simpleSegment(0,0,s.length,R.length)),this._mesh}getMeshFrameDelta(i){return 2*Math.PI*e.bd/Math.pow(2,i)/5}getMinTileElevationForLngLatZoom(i,s){var R;const{tileID:B}=this._getOverscaledTileIDFromLngLatZoom(i,s);return(R=this.getMinMaxElevation(B).minElevation)!==null&&R!==void 0?R:0}getMinMaxElevation(i){const s=this.getTerrainData(i).tile,R={minElevation:null,maxElevation:null};return s&&s.dem&&(R.minElevation=s.dem.min*this.exaggeration,R.maxElevation=s.dem.max*this.exaggeration),R}_getOverscaledTileIDFromLngLatZoom(i,s){const R=e.Z.fromLngLat(i.wrap()),B=(1<<s)*e.X,G=R.x*B,ie=R.y*B,pe=Math.floor(G/e.X),xe=Math.floor(ie/e.X);return{tileID:new e.S(s,0,s,pe,xe),mercatorX:G,mercatorY:ie}}}class zl{constructor(i,s,R){this._context=i,this._size=s,this._tileSize=R,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const i of this._objects)i.texture.destroy(),i.fbo.destroy()}_createObject(i){const s=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),R=new z(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return R.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),s.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),s.colorAttachment.set(R.texture),{id:i,fbo:s,texture:R,stamp:-1,inUse:!1}}getObjectForId(i){return this._objects[i]}useObject(i){i.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(s=>i.id!==s),this._recentlyUsed.push(i.id)}stampObject(i){i.stamp=++this._stamp}getOrCreateFreeObject(){for(const s of this._recentlyUsed)if(!this._objects[s].inUse)return this._objects[s];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const i=this._createObject(this._objects.length);return this._objects.push(i),i}freeObject(i){i.inUse=!1}freeAllObjects(){for(const i of this._objects)this.freeObject(i)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(i=>!i.inUse)===!1}}const ps={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Hs{constructor(i,s){this.painter=i,this.terrain=s,this.pool=new zl(i.context,30,s.sourceCache.tileSize*s.qualityFactor)}destruct(){this.pool.destruct()}getTexture(i){return this.pool.getObjectForId(i.rtt[this._stacks.length-1].id).texture}prepareForRender(i,s){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=i._order.filter(R=>!i._layers[R].isHidden(s)),this._coordsDescendingInv={};for(const R in i.sourceCaches){this._coordsDescendingInv[R]={};const B=i.sourceCaches[R].getVisibleCoordinates();for(const G of B){const ie=this.terrain.sourceCache.getTerrainCoords(G);for(const pe in ie)this._coordsDescendingInv[R][pe]||(this._coordsDescendingInv[R][pe]=[]),this._coordsDescendingInv[R][pe].push(ie[pe])}}this._coordsDescendingInvStr={};for(const R of i._order){const B=i._layers[R],G=B.source;if(ps[B.type]&&!this._coordsDescendingInvStr[G]){this._coordsDescendingInvStr[G]={};for(const ie in this._coordsDescendingInv[G])this._coordsDescendingInvStr[G][ie]=this._coordsDescendingInv[G][ie].map(pe=>pe.key).sort().join()}}for(const R of this._renderableTiles)for(const B in this._coordsDescendingInvStr){const G=this._coordsDescendingInvStr[B][R.tileID.key];G&&G!==R.rttCoords[B]&&(R.rtt=[])}}renderLayer(i){if(i.isHidden(this.painter.transform.zoom))return!1;const s=i.type,R=this.painter,B=this._renderableLayerIds[this._renderableLayerIds.length-1]===i.id;if(ps[s]&&(this._prevType&&ps[this._prevType]||this._stacks.push([]),this._prevType=s,this._stacks[this._stacks.length-1].push(i.id),!B))return!0;if(ps[this._prevType]||ps[s]&&B){this._prevType=s;const G=this._stacks.length-1,ie=this._stacks[G]||[];for(const pe of this._renderableTiles){if(this.pool.isFull()&&(Ql(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(pe),pe.rtt[G]){const Se=this.pool.getObjectForId(pe.rtt[G].id);if(Se.stamp===pe.rtt[G].stamp){this.pool.useObject(Se);continue}}const xe=this.pool.getOrCreateFreeObject();this.pool.useObject(xe),this.pool.stampObject(xe),pe.rtt[G]={id:xe.id,stamp:xe.stamp},R.context.bindFramebuffer.set(xe.fbo.framebuffer),R.context.clear({color:e.aN.transparent,stencil:0}),R.currentStencilSource=void 0;for(let Se=0;Se<ie.length;Se++){const De=R.style._layers[ie[Se]],Ue=De.source?this._coordsDescendingInv[De.source][pe.tileID.key]:[pe.tileID];R.context.viewport.set([0,0,xe.fbo.width,xe.fbo.height]),R._renderTileClippingMasks(De,Ue),R.renderLayer(R,R.style.sourceCaches[De.source],De,Ue),De.source&&(pe.rttCoords[De.source]=this._coordsDescendingInvStr[De.source][pe.tileID.key])}}return Ql(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),ps[s]}return!1}}const Lc={"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"},bc=b,ul={hash:!1,interactive:!0,bearingSnap:7,attributionControl:No,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:e.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},Ci=F=>{F.touchstart=F.dragStart,F.touchmoveWindow=F.dragMove,F.touchend=F.dragEnd},zs={showCompass:!0,showZoom:!0,visualizePitch:!1};class ra{constructor(i,s,R=!1){this.mousedown=ie=>{this.startMouse(e.e({},ie,{ctrlKey:!0,preventDefault:()=>ie.preventDefault()}),r.mousePos(this.element,ie)),r.addEventListener(window,"mousemove",this.mousemove),r.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ie=>{this.moveMouse(ie,r.mousePos(this.element,ie))},this.mouseup=ie=>{this.mouseRotate.dragEnd(ie),this.mousePitch&&this.mousePitch.dragEnd(ie),this.offTemp()},this.touchstart=ie=>{ie.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,ie.targetTouches)[0],this.startTouch(ie,this._startPos),r.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.addEventListener(window,"touchend",this.touchend))},this.touchmove=ie=>{ie.targetTouches.length!==1?this.reset():(this._lastPos=r.touchPos(this.element,ie.targetTouches)[0],this.moveTouch(ie,this._lastPos))},this.touchend=ie=>{ie.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const B=i.dragRotate._mouseRotate.getClickTolerance(),G=i.dragRotate._mousePitch.getClickTolerance();this.element=s,this.mouseRotate=ql({clickTolerance:B,enable:!0}),this.touchRotate=(({enable:ie,clickTolerance:pe,bearingDegreesPerPixelMoved:xe=.8})=>{const Se=new Ml;return new xo({clickTolerance:pe,move:(De,Ue)=>({bearingDelta:(Ue.x-De.x)*xe}),moveStateManager:Se,enable:ie,assignEvents:Ci})})({clickTolerance:B,enable:!0}),this.map=i,R&&(this.mousePitch=il({clickTolerance:G,enable:!0}),this.touchPitch=(({enable:ie,clickTolerance:pe,pitchDegreesPerPixelMoved:xe=-.5})=>{const Se=new Ml;return new xo({clickTolerance:pe,move:(De,Ue)=>({pitchDelta:(Ue.y-De.y)*xe}),moveStateManager:Se,enable:ie,assignEvents:Ci})})({clickTolerance:G,enable:!0})),r.addEventListener(s,"mousedown",this.mousedown),r.addEventListener(s,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(s,"touchcancel",this.reset)}startMouse(i,s){this.mouseRotate.dragStart(i,s),this.mousePitch&&this.mousePitch.dragStart(i,s),r.disableDrag()}startTouch(i,s){this.touchRotate.dragStart(i,s),this.touchPitch&&this.touchPitch.dragStart(i,s),r.disableDrag()}moveMouse(i,s){const R=this.map,{bearingDelta:B}=this.mouseRotate.dragMove(i,s)||{};if(B&&R.setBearing(R.getBearing()+B),this.mousePitch){const{pitchDelta:G}=this.mousePitch.dragMove(i,s)||{};G&&R.setPitch(R.getPitch()+G)}}moveTouch(i,s){const R=this.map,{bearingDelta:B}=this.touchRotate.dragMove(i,s)||{};if(B&&R.setBearing(R.getBearing()+B),this.touchPitch){const{pitchDelta:G}=this.touchPitch.dragMove(i,s)||{};G&&R.setPitch(R.getPitch()+G)}}off(){const i=this.element;r.removeEventListener(i,"mousedown",this.mousedown),r.removeEventListener(i,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend),r.removeEventListener(i,"touchcancel",this.reset),this.offTemp()}offTemp(){r.enableDrag(),r.removeEventListener(window,"mousemove",this.mousemove),r.removeEventListener(window,"mouseup",this.mouseup),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend)}}let wa;function Xo(F,i,s){const R=new e.N(F.lng,F.lat);if(F=new e.N(F.lng,F.lat),i){const B=new e.N(F.lng-360,F.lat),G=new e.N(F.lng+360,F.lat),ie=s.locationPoint(F).distSqr(i);s.locationPoint(B).distSqr(i)<ie?F=B:s.locationPoint(G).distSqr(i)<ie&&(F=G)}for(;Math.abs(F.lng-s.center.lng)>180;){const B=s.locationPoint(F);if(B.x>=0&&B.y>=0&&B.x<=s.width&&B.y<=s.height)break;F.lng>s.center.lng?F.lng-=360:F.lng+=360}return F.lng!==R.lng&&s.locationPoint(F).y>s.height/2-s.getHorizon()?F:R}const Os={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 dl(F,i,s){const R=F.classList;for(const B in Os)R.remove(`maplibregl-${s}-anchor-${B}`);R.add(`maplibregl-${s}-anchor-${i}`)}class Ni extends e.E{constructor(i){if(super(),this._onKeyPress=s=>{const R=s.code,B=s.charCode||s.keyCode;R!=="Space"&&R!=="Enter"&&B!==32&&B!==13||this.togglePopup()},this._onMapClick=s=>{const R=s.originalEvent.target,B=this._element;this._popup&&(R===B||B.contains(R))&&this.togglePopup()},this._update=s=>{var R;if(!this._map)return;const B=this._map.loaded()&&!this._map.isMoving();((s==null?void 0:s.type)==="terrain"||(s==null?void 0:s.type)==="render"&&!B)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Xo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(R=this._lngLat)===null||R===void 0?void 0:R.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 G="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?G=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(G=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ie="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ie="rotateX(0deg)":this._pitchAlignment==="map"&&(ie=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||s&&s.type!=="moveend"||(this._pos=this._pos.round()),r.setTransform(this._element,`${Os[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ie} ${G}`),h.frameAsync(new AbortController).then(()=>{this._updateOpacity(s&&s.type==="moveend")}).catch(()=>{})},this._onMove=s=>{if(!this._isDragging){const R=this._clickTolerance||this._map._clickTolerance;this._isDragging=s.point.dist(this._pointerdownPos)>=R}this._isDragging&&(this._pos=s.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.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 e.k("dragend")),this._state="inactive"},this._addDragHandler=s=>{this._element.contains(s.originalEvent.target)&&(s.preventDefault(),this._positionDelta=s.point.sub(this._pos).add(this._offset),this._pointerdownPos=s.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._scale=i&&i.scale||1,this._draggable=i&&i.draggable||!1,this._clickTolerance=i&&i.clickTolerance||0,this._subpixelPositioning=i&&i.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=i&&i.rotation||0,this._rotationAlignment=i&&i.rotationAlignment||"auto",this._pitchAlignment=i&&i.pitchAlignment&&i.pitchAlignment!=="auto"?i.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(i==null?void 0:i.opacity,i==null?void 0:i.opacityWhenCovered),i&&i.element)this._element=i.element,this._offset=e.P.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");const s=r.createNS("http://www.w3.org/2000/svg","svg"),R=41,B=27;s.setAttributeNS(null,"display","block"),s.setAttributeNS(null,"height",`${R}px`),s.setAttributeNS(null,"width",`${B}px`),s.setAttributeNS(null,"viewBox",`0 0 ${B} ${R}`);const G=r.createNS("http://www.w3.org/2000/svg","g");G.setAttributeNS(null,"stroke","none"),G.setAttributeNS(null,"stroke-width","1"),G.setAttributeNS(null,"fill","none"),G.setAttributeNS(null,"fill-rule","evenodd");const ie=r.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"fill-rule","nonzero");const pe=r.createNS("http://www.w3.org/2000/svg","g");pe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),pe.setAttributeNS(null,"fill","#000000");const xe=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const At of xe){const Vt=r.createNS("http://www.w3.org/2000/svg","ellipse");Vt.setAttributeNS(null,"opacity","0.04"),Vt.setAttributeNS(null,"cx","10.5"),Vt.setAttributeNS(null,"cy","5.80029008"),Vt.setAttributeNS(null,"rx",At.rx),Vt.setAttributeNS(null,"ry",At.ry),pe.appendChild(Vt)}const Se=r.createNS("http://www.w3.org/2000/svg","g");Se.setAttributeNS(null,"fill",this._color);const De=r.createNS("http://www.w3.org/2000/svg","path");De.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"),Se.appendChild(De);const Ue=r.createNS("http://www.w3.org/2000/svg","g");Ue.setAttributeNS(null,"opacity","0.25"),Ue.setAttributeNS(null,"fill","#000000");const rt=r.createNS("http://www.w3.org/2000/svg","path");rt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ue.appendChild(rt);const ct=r.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=r.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const vt=r.createNS("http://www.w3.org/2000/svg","circle");vt.setAttributeNS(null,"fill","#000000"),vt.setAttributeNS(null,"opacity","0.25"),vt.setAttributeNS(null,"cx","5.5"),vt.setAttributeNS(null,"cy","5.5"),vt.setAttributeNS(null,"r","5.4999962");const Mt=r.createNS("http://www.w3.org/2000/svg","circle");Mt.setAttributeNS(null,"fill","#FFFFFF"),Mt.setAttributeNS(null,"cx","5.5"),Mt.setAttributeNS(null,"cy","5.5"),Mt.setAttributeNS(null,"r","5.4999962"),pt.appendChild(vt),pt.appendChild(Mt),ie.appendChild(pe),ie.appendChild(Se),ie.appendChild(Ue),ie.appendChild(ct),ie.appendChild(pt),s.appendChild(ie),s.setAttributeNS(null,"height",R*this._scale+"px"),s.setAttributeNS(null,"width",B*this._scale+"px"),this._element.appendChild(s),this._offset=e.P.convert(i&&i.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",s=>{s.preventDefault()}),this._element.addEventListener("mousedown",s=>{s.preventDefault()}),dl(this._element,this._anchor,"marker"),i&&i.className)for(const s of i.className.split(" "))this._element.classList.add(s);this._popup=null}addTo(i){return this.remove(),this._map=i,this._element.setAttribute("aria-label",i._getUIString("Marker.Title")),i.getCanvasContainer().appendChild(this._element),i.on("move",this._update),i.on("moveend",this._update),i.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(i){return this._lngLat=e.N.convert(i),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(i){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),i){if(!("offset"in i.options)){const s=Math.abs(13.5)/Math.SQRT2;i.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[s,-1*(24.6+s)],"bottom-right":[-s,-1*(24.6+s)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=i,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(i){return this._subpixelPositioning=i,this}getPopup(){return this._popup}togglePopup(){const i=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:i?(i.isOpen()?i.remove():(i.setLngLat(this._lngLat),i.addTo(this._map)),this):this}_updateOpacity(i=!1){var s,R;if(!(!((s=this._map)===null||s===void 0)&&s.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(i)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const B=this._map,G=B.terrain.depthAtPoint(this._pos),ie=B.terrain.getElevationForLngLatZoom(this._lngLat,B.transform.tileZoom);if(B.transform.lngLatToCameraDepth(this._lngLat,ie)-G<.006)return void(this._element.style.opacity=this._opacity);const pe=-this._offset.y/B.transform._pixelPerMeter,xe=Math.sin(B.getPitch()*Math.PI/180)*pe,Se=B.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),De=B.transform.lngLatToCameraDepth(this._lngLat,ie+xe)-Se>.006;!((R=this._popup)===null||R===void 0)&&R.isOpen()&&De&&this._popup.remove(),this._element.style.opacity=De?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(i){return this._offset=e.P.convert(i),this._update(),this}addClassName(i){this._element.classList.add(i)}removeClassName(i){this._element.classList.remove(i)}toggleClassName(i){return this._element.classList.toggle(i)}setDraggable(i){return this._draggable=!!i,this._map&&(i?(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(i){return this._rotation=i||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(i){return this._rotationAlignment=i||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(i){return this._pitchAlignment=i&&i!=="auto"?i:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(i,s){return i===void 0&&s===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),i!==void 0&&(this._opacity=i),s!==void 0&&(this._opacityWhenCovered=s),this._map&&this._updateOpacity(!0),this}}const Ol={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let qa=0,Wl=!1;class pa extends e.E{constructor(i){super(),this._onSuccess=s=>{if(this._map){if(this._isOutOfMapMaxBounds(s))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",s)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=s,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(s),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(s),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",s)),this._finish()}},this._updateCamera=s=>{const R=new e.N(s.coords.longitude,s.coords.latitude),B=s.coords.accuracy,G=this._map.getBearing(),ie=e.e({bearing:G},this.options.fitBoundsOptions),pe=Ce.fromLngLat(R,B);this._map.fitBounds(pe,ie,{geolocateSource:!0})},this._updateMarker=s=>{if(s){const R=new e.N(s.coords.longitude,s.coords.latitude);this._accuracyCircleMarker.setLngLat(R).addTo(this._map),this._userLocationDotMarker.setLngLat(R).addTo(this._map),this._accuracy=s.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=s=>{if(this._map){if(this.options.trackUserLocation)if(s.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 R=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=R,this._geolocateButton.setAttribute("aria-label",R),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(s.code===3&&Wl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",s)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",s=>s.preventDefault()),this._geolocateButton=r.create("button","maplibregl-ctrl-geolocate",this._container),r.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=s=>{if(this._map){if(s===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");const R=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=R,this._geolocateButton.setAttribute("aria-label",R)}else{const R=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=R,this._geolocateButton.setAttribute("aria-label",R)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ni({element:this._dotElement}),this._circleElement=r.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ni({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",R=>{const B=R.originalEvent&&R.originalEvent.type==="resize";R.geolocateSource||this._watchState!=="ACTIVE_LOCK"||B||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")),this.fire(new e.k("userlocationlostfocus")))})}},this.options=e.e({},Ol,i)}onAdd(i){return this._map=i,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(s=!1){if(wa!==void 0&&!s)return wa;if(window.navigator.permissions===void 0)return wa=!!window.navigator.geolocation,wa;try{wa=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{wa=!!window.navigator.geolocation}return wa})}().then(s=>this._finishSetupUI(s)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,qa=0,Wl=!1}_isOutOfMapMaxBounds(i){const s=this._map.getMaxBounds(),R=i.coords;return s&&(R.longitude<s.getWest()||R.longitude>s.getEast()||R.latitude<s.getSouth()||R.latitude>s.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 i=this._map.getBounds(),s=i.getSouthEast(),R=i.getNorthEast(),B=s.distanceTo(R),G=this._map._container.clientHeight,ie=Math.ceil(this._accuracy/(B/G)*2);this._circleElement.style.width=`${ie}px`,this._circleElement.style.height=`${ie}px`}trigger(){if(!this._setup)return e.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 e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":qa--,Wl=!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 e.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 e.k("trackuserlocationstart")),this.fire(new e.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 i;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),qa++,qa>1?(i={maximumAge:6e5,timeout:0},Wl=!0):(i=this.options.positionOptions,Wl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,i)}}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 ca={maxWidth:100,unit:"metric"};function _i(F,i,s){const R=s&&s.maxWidth||100,B=F._container.clientHeight/2,G=F.unproject([0,B]),ie=F.unproject([R,B]),pe=G.distanceTo(ie);if(s&&s.unit==="imperial"){const xe=3.2808*pe;xe>5280?fo(i,R,xe/5280,F._getUIString("ScaleControl.Miles")):fo(i,R,xe,F._getUIString("ScaleControl.Feet"))}else s&&s.unit==="nautical"?fo(i,R,pe/1852,F._getUIString("ScaleControl.NauticalMiles")):pe>=1e3?fo(i,R,pe/1e3,F._getUIString("ScaleControl.Kilometers")):fo(i,R,pe,F._getUIString("ScaleControl.Meters"))}function fo(F,i,s,R){const B=function(ie){const pe=Math.pow(10,`${Math.floor(ie)}`.length-1);let xe=ie/pe;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:function(Se){const De=Math.pow(10,Math.ceil(-Math.log(Se)/Math.LN10));return Math.round(Se*De)/De}(xe),pe*xe}(s),G=B/s;F.style.width=i*G+"px",F.innerHTML=`${B} ${R}`}class Nl extends e.E{constructor(i={}){super(),this._onFullscreenChange=()=>{var s;let R=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((s=R==null?void 0:R.shadowRoot)===null||s===void 0)&&s.fullscreenElement;)R=R.shadowRoot.fullscreenElement;R===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,i&&i.container&&(i.container instanceof HTMLElement?this._container=i.container:e.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(i){return this._map=i,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){r.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const i=this._fullscreenButton=r.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);r.create("span","maplibregl-ctrl-icon",i).setAttribute("aria-hidden","true"),i.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const i=this._getTitle();this._fullscreenButton.setAttribute("aria-label",i),this._fullscreenButton.title=i}_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 e.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.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 Ko={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},yt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class xt extends e.E{constructor(i){super(),this.remove=()=>(this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.k("close"))),this),this._onMouseUp=s=>{this._update(s.point)},this._onMouseMove=s=>{this._update(s.point)},this._onDrag=s=>{this._update(s.point)},this._update=s=>{var R;const B=this._lngLat||this._trackPointer;if(!this._map||!B||!this._content)return;if(!this._container){if(this._container=r.create("div","maplibregl-popup",this._map.getContainer()),this._tip=r.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Se of this.options.className.split(" "))this._container.classList.add(Se);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=Xo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(R=this._lngLat)===null||R===void 0?void 0:R.wrap(),this._trackPointer&&!s)return;const G=this._flatPos=this._pos=this._trackPointer&&s?s:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&s?s:this._map.transform.locationPoint(this._lngLat));let ie=this.options.anchor;const pe=Ot(this.options.offset);if(!ie){const Se=this._container.offsetWidth,De=this._container.offsetHeight;let Ue;Ue=G.y+pe.bottom.y<De?["top"]:G.y>this._map.transform.height-De?["bottom"]:[],G.x<Se/2?Ue.push("left"):G.x>this._map.transform.width-Se/2&&Ue.push("right"),ie=Ue.length===0?"bottom":Ue.join("-")}let xe=G.add(pe[ie]);this.options.subpixelPositioning||(xe=xe.round()),r.setTransform(this._container,`${Os[ie]} translate(${xe.x}px,${xe.y}px)`),dl(this._container,ie,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(Ko),i)}addTo(i){return this._map&&this.remove(),this._map=i,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 e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(i){return this._lngLat=e.N.convert(i),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(i){return this.setDOMContent(document.createTextNode(i))}setHTML(i){const s=document.createDocumentFragment(),R=document.createElement("body");let B;for(R.innerHTML=i;B=R.firstChild,B;)s.appendChild(B);return this.setDOMContent(s)}getMaxWidth(){var i;return(i=this._container)===null||i===void 0?void 0:i.style.maxWidth}setMaxWidth(i){return this.options.maxWidth=i,this._update(),this}setDOMContent(i){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(i),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(i){return this._container&&this._container.classList.add(i),this}removeClassName(i){return this._container&&this._container.classList.remove(i),this}setOffset(i){return this.options.offset=i,this._update(),this}toggleClassName(i){if(this._container)return this._container.classList.toggle(i)}setSubpixelPositioning(i){this.options.subpixelPositioning=i}_createCloseButton(){this.options.closeButton&&(this._closeButton=r.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 i=this._container.querySelector(yt);i&&i.focus()}}function Ot(F){if(F){if(typeof F=="number"){const i=Math.round(Math.abs(F)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,F),"top-left":new e.P(i,i),"top-right":new e.P(-i,i),bottom:new e.P(0,-F),"bottom-left":new e.P(i,-i),"bottom-right":new e.P(-i,-i),left:new e.P(F,0),right:new e.P(-F,0)}}if(F instanceof e.P||Array.isArray(F)){const i=e.P.convert(F);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:e.P.convert(F.center||[0,0]),top:e.P.convert(F.top||[0,0]),"top-left":e.P.convert(F["top-left"]||[0,0]),"top-right":e.P.convert(F["top-right"]||[0,0]),bottom:e.P.convert(F.bottom||[0,0]),"bottom-left":e.P.convert(F["bottom-left"]||[0,0]),"bottom-right":e.P.convert(F["bottom-right"]||[0,0]),left:e.P.convert(F.left||[0,0]),right:e.P.convert(F.right||[0,0])}}return Ot(new e.P(0,0))}const Q=b;u.AJAXError=e.bg,u.Evented=e.E,u.LngLat=e.N,u.MercatorCoordinate=e.Z,u.Point=e.P,u.addProtocol=e.bh,u.config=e.a,u.removeProtocol=e.bi,u.AttributionControl=as,u.BoxZoomHandler=bo,u.CanvasSource=Ee,u.CooperativeGesturesHandler=hs,u.DoubleClickZoomHandler=Si,u.DragPanHandler=Ps,u.DragRotateHandler=Oo,u.EdgeInsets=Cl,u.FullscreenControl=Nl,u.GeoJSONSource=Pe,u.GeolocateControl=pa,u.Hash=to,u.ImageSource=Le,u.KeyboardHandler=ac,u.LngLatBounds=Ce,u.LogoControl=po,u.Map=class extends no{constructor(F){e.be.mark(e.bf.create);const i=Object.assign(Object.assign({},ul),F);if(i.minZoom!=null&&i.maxZoom!=null&&i.minZoom>i.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(i.minPitch!=null&&i.maxPitch!=null&&i.minPitch>i.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(i.minPitch!=null&&i.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(i.maxPitch!=null&&i.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new ni(i.minZoom,i.maxZoom,i.minPitch,i.maxPitch,i.renderWorldCopies),{bearingSnap:i.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new vc,this._controls=[],this._mapId=e.a4(),this._contextLost=R=>{R.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new e.k("webglcontextlost",{originalEvent:R}))},this._contextRestored=R=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:R}))},this._onMapScroll=R=>{if(R.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=i.interactive,this._maxTileCacheSize=i.maxTileCacheSize,this._maxTileCacheZoomLevels=i.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=i.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=i.preserveDrawingBuffer===!0,this._antialias=i.antialias===!0,this._trackResize=i.trackResize===!0,this._bearingSnap=i.bearingSnap,this._refreshExpiredTiles=i.refreshExpiredTiles===!0,this._fadeDuration=i.fadeDuration,this._crossSourceCollisions=i.crossSourceCollisions===!0,this._collectResourceTiming=i.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Lc),i.locale),this._clickTolerance=i.clickTolerance,this._overridePixelRatio=i.pixelRatio,this._maxCanvasSize=i.maxCanvasSize,this.transformCameraUpdate=i.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=i.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=w.addThrottleControl(()=>this.isMoving()),this._requestManager=new T(i.transformRequest),typeof i.container=="string"){if(this._container=document.getElementById(i.container),!this._container)throw new Error(`Container '${i.container}' not found.`)}else{if(!(i.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=i.container}if(i.maxBounds&&this.setMaxBounds(i.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 R=!1;const B=Ws(G=>{this._trackResize&&!this._removed&&this.resize(G)._update()},50);this._resizeObserver=new ResizeObserver(G=>{R?B(G):R=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Za(this,i);const s=typeof i.hash=="string"&&i.hash||void 0;this._hash=i.hash&&new to(s).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch}),i.bounds&&(this.resize(),this.fitBounds(i.bounds,e.e({},i.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=i.localIdeographFontFamily,this._validateStyle=i.validateStyle,i.style&&this.setStyle(i.style,{localIdeographFontFamily:i.localIdeographFontFamily}),i.attributionControl&&this.addControl(new as(typeof i.attributionControl=="boolean"?void 0:i.attributionControl)),i.maplibreLogo&&this.addControl(new po,i.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",R=>{this._update(R.dataType==="style"),this.fire(new e.k(`${R.dataType}data`,R))}),this.on("dataloading",R=>{this.fire(new e.k(`${R.dataType}dataloading`,R))}),this.on("dataabort",R=>{this.fire(new e.k("sourcedataabort",R))})}_getMapId(){return this._mapId}addControl(F,i){if(i===void 0&&(i=F.getDefaultPosition?F.getDefaultPosition():"top-right"),!F||!F.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const s=F.onAdd(this);this._controls.push(F);const R=this._controlPositions[i];return i.indexOf("bottom")!==-1?R.insertBefore(s,R.firstChild):R.appendChild(s),this}removeControl(F){if(!F||!F.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const i=this._controls.indexOf(F);return i>-1&&this._controls.splice(i,1),F.onRemove(this),this}hasControl(F){return this._controls.indexOf(F)>-1}calculateCameraOptionsFromTo(F,i,s,R){return R==null&&this.terrain&&(R=this.terrain.getElevationForLngLatZoom(s,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(F,i,s,R)}resize(F){var i;const s=this._containerDimensions(),R=s[0],B=s[1],G=this._getClampedPixelRatio(R,B);if(this._resizeCanvas(R,B,G),this.painter.resize(R,B,G),this.painter.overLimit()){const pe=this.painter.context.gl;this._maxCanvasSize=[pe.drawingBufferWidth,pe.drawingBufferHeight];const xe=this._getClampedPixelRatio(R,B);this._resizeCanvas(R,B,xe),this.painter.resize(R,B,xe)}this.transform.resize(R,B),(i=this._requestedCameraState)===null||i===void 0||i.resize(R,B);const ie=!this._moving;return ie&&(this.stop(),this.fire(new e.k("movestart",F)).fire(new e.k("move",F))),this.fire(new e.k("resize",F)),ie&&this.fire(new e.k("moveend",F)),this}_getClampedPixelRatio(F,i){const{0:s,1:R}=this._maxCanvasSize,B=this.getPixelRatio(),G=F*B,ie=i*B,pe=G>s?s/G:1,xe=ie>R?R/ie:1;return Math.min(pe,xe)*B}getPixelRatio(){var F;return(F=this._overridePixelRatio)!==null&&F!==void 0?F:devicePixelRatio}setPixelRatio(F){this._overridePixelRatio=F,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(F){return this.transform.setMaxBounds(Ce.convert(F)),this._update()}setMinZoom(F){if((F=F??-2)>=-2&&F<=this.transform.maxZoom)return this.transform.minZoom=F,this._update(),this.getZoom()<F&&this.setZoom(F),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(F){if((F=F??22)>=this.transform.minZoom)return this.transform.maxZoom=F,this._update(),this.getZoom()>F&&this.setZoom(F),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(F){if((F=F??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(F>=0&&F<=this.transform.maxPitch)return this.transform.minPitch=F,this._update(),this.getPitch()<F&&this.setPitch(F),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(F){if((F=F??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(F>=this.transform.minPitch)return this.transform.maxPitch=F,this._update(),this.getPitch()>F&&this.setPitch(F),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(F){return this.transform.renderWorldCopies=F,this._update()}project(F){return this.transform.locationPoint(e.N.convert(F),this.style&&this.terrain)}unproject(F){return this.transform.pointLocation(e.P.convert(F),this.terrain)}isMoving(){var F;return this._moving||((F=this.handlers)===null||F===void 0?void 0:F.isMoving())}isZooming(){var F;return this._zooming||((F=this.handlers)===null||F===void 0?void 0:F.isZooming())}isRotating(){var F;return this._rotating||((F=this.handlers)===null||F===void 0?void 0:F.isRotating())}_createDelegatedListener(F,i,s){if(F==="mouseenter"||F==="mouseover"){let R=!1;return{layer:i,listener:s,delegates:{mousemove:B=>{const G=this.getLayer(i)?this.queryRenderedFeatures(B.point,{layers:[i]}):[];G.length?R||(R=!0,s.call(this,new Co(F,this,B.originalEvent,{features:G}))):R=!1},mouseout:()=>{R=!1}}}}if(F==="mouseleave"||F==="mouseout"){let R=!1;return{layer:i,listener:s,delegates:{mousemove:B=>{(this.getLayer(i)?this.queryRenderedFeatures(B.point,{layers:[i]}):[]).length?R=!0:R&&(R=!1,s.call(this,new Co(F,this,B.originalEvent)))},mouseout:B=>{R&&(R=!1,s.call(this,new Co(F,this,B.originalEvent)))}}}}{const R=B=>{const G=this.getLayer(i)?this.queryRenderedFeatures(B.point,{layers:[i]}):[];G.length&&(B.features=G,s.call(this,B),delete B.features)};return{layer:i,listener:s,delegates:{[F]:R}}}}on(F,i,s){if(s===void 0)return super.on(F,i);const R=this._createDelegatedListener(F,i,s);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[F]=this._delegatedListeners[F]||[],this._delegatedListeners[F].push(R);for(const B in R.delegates)this.on(B,R.delegates[B]);return this}once(F,i,s){if(s===void 0)return super.once(F,i);const R=this._createDelegatedListener(F,i,s);for(const B in R.delegates)this.once(B,R.delegates[B]);return this}off(F,i,s){return s===void 0?super.off(F,i):(this._delegatedListeners&&this._delegatedListeners[F]&&(R=>{const B=R[F];for(let G=0;G<B.length;G++){const ie=B[G];if(ie.layer===i&&ie.listener===s){for(const pe in ie.delegates)this.off(pe,ie.delegates[pe]);return B.splice(G,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(F,i){if(!this.style)return[];let s;const R=F instanceof e.P||Array.isArray(F),B=R?F:[[0,0],[this.transform.width,this.transform.height]];if(i=i||(R?{}:F)||{},B instanceof e.P||typeof B[0]=="number")s=[e.P.convert(B)];else{const G=e.P.convert(B[0]),ie=e.P.convert(B[1]);s=[G,new e.P(ie.x,G.y),ie,new e.P(G.x,ie.y),G]}return this.style.queryRenderedFeatures(s,i,this.transform)}querySourceFeatures(F,i){return this.style.querySourceFeatures(F,i)}setStyle(F,i){return(i=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},i)).diff!==!1&&i.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&F?(this._diffStyle(F,i),this):(this._localIdeographFontFamily=i.localIdeographFontFamily,this._updateStyle(F,i))}setTransformRequest(F){return this._requestManager.setTransformRequest(F),this}_getUIString(F){const i=this._locale[F];if(i==null)throw new Error(`Missing UI string '${F}'`);return i}_updateStyle(F,i){if(i.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(F,i));const s=this.style&&i.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!F)),F?(this.style=new Jn(this,i||{}),this.style.setEventedParent(this,{style:this.style}),typeof F=="string"?this.style.loadURL(F,i,s):this.style.loadJSON(F,i,s),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Jn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(F,i){if(typeof F=="string"){const s=F,R=this._requestManager.transformRequest(s,"Style");e.h(R,new AbortController).then(B=>{this._updateDiff(B.data,i)}).catch(B=>{B&&this.fire(new e.j(B))})}else typeof F=="object"&&this._updateDiff(F,i)}_updateDiff(F,i){try{this.style.setState(F,i)&&this._update(!0)}catch(s){e.w(`Unable to perform style diff: ${s.message||s.error||s}. Rebuilding the style from scratch.`),this._updateStyle(F,i)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource(F,i){return this._lazyInitEmptyStyle(),this.style.addSource(F,i),this._update(!0)}isSourceLoaded(F){const i=this.style&&this.style.sourceCaches[F];if(i!==void 0)return i.loaded();this.fire(new e.j(new Error(`There is no source with ID '${F}'`)))}setTerrain(F){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),F){const i=this.style.sourceCaches[F.source];if(!i)throw new Error(`cannot load terrain, because there exists no source with ID: ${F.source}`);this.terrain===null&&i.reload();for(const s in this.style._layers){const R=this.style._layers[s];R.type==="hillshade"&&R.source===F.source&&e.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 Ya(this.painter,i,F),this.painter.renderToTexture=new Hs(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=s=>{s.dataType==="style"?this.terrain.sourceCache.freeRtt():s.dataType==="source"&&s.tile&&(s.sourceId!==F.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(s.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:F})),this}getTerrain(){var F,i;return(i=(F=this.terrain)===null||F===void 0?void 0:F.options)!==null&&i!==void 0?i:null}areTilesLoaded(){const F=this.style&&this.style.sourceCaches;for(const i in F){const s=F[i]._tiles;for(const R in s){const B=s[R];if(B.state!=="loaded"&&B.state!=="errored")return!1}}return!0}removeSource(F){return this.style.removeSource(F),this._update(!0)}getSource(F){return this.style.getSource(F)}addImage(F,i,s={}){const{pixelRatio:R=1,sdf:B=!1,stretchX:G,stretchY:ie,content:pe,textFitWidth:xe,textFitHeight:Se}=s;if(this._lazyInitEmptyStyle(),!(i instanceof HTMLImageElement||e.b(i))){if(i.width===void 0||i.height===void 0)return this.fire(new e.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:De,height:Ue,data:rt}=i,ct=i;return this.style.addImage(F,{data:new e.R({width:De,height:Ue},new Uint8Array(rt)),pixelRatio:R,stretchX:G,stretchY:ie,content:pe,textFitWidth:xe,textFitHeight:Se,sdf:B,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,F),this}}{const{width:De,height:Ue,data:rt}=h.getImageData(i);this.style.addImage(F,{data:new e.R({width:De,height:Ue},rt),pixelRatio:R,stretchX:G,stretchY:ie,content:pe,textFitWidth:xe,textFitHeight:Se,sdf:B,version:0})}}updateImage(F,i){const s=this.style.getImage(F);if(!s)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const R=i instanceof HTMLImageElement||e.b(i)?h.getImageData(i):i,{width:B,height:G,data:ie}=R;if(B===void 0||G===void 0)return this.fire(new e.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(B!==s.data.width||G!==s.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const pe=!(i instanceof HTMLImageElement||e.b(i));return s.data.replace(ie,pe),this.style.updateImage(F,s),this}getImage(F){return this.style.getImage(F)}hasImage(F){return F?!!this.style.getImage(F):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage(F){this.style.removeImage(F)}loadImage(F){return w.getImage(this._requestManager.transformRequest(F,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(F,i){return this._lazyInitEmptyStyle(),this.style.addLayer(F,i),this._update(!0)}moveLayer(F,i){return this.style.moveLayer(F,i),this._update(!0)}removeLayer(F){return this.style.removeLayer(F),this._update(!0)}getLayer(F){return this.style.getLayer(F)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(F,i,s){return this.style.setLayerZoomRange(F,i,s),this._update(!0)}setFilter(F,i,s={}){return this.style.setFilter(F,i,s),this._update(!0)}getFilter(F){return this.style.getFilter(F)}setPaintProperty(F,i,s,R={}){return this.style.setPaintProperty(F,i,s,R),this._update(!0)}getPaintProperty(F,i){return this.style.getPaintProperty(F,i)}setLayoutProperty(F,i,s,R={}){return this.style.setLayoutProperty(F,i,s,R),this._update(!0)}getLayoutProperty(F,i){return this.style.getLayoutProperty(F,i)}setGlyphs(F,i={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(F,i),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(F,i,s={}){return this._lazyInitEmptyStyle(),this.style.addSprite(F,i,s,R=>{R||this._update(!0)}),this}removeSprite(F){return this._lazyInitEmptyStyle(),this.style.removeSprite(F),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(F,i={}){return this._lazyInitEmptyStyle(),this.style.setSprite(F,i,s=>{s||this._update(!0)}),this}setLight(F,i={}){return this._lazyInitEmptyStyle(),this.style.setLight(F,i),this._update(!0)}getLight(){return this.style.getLight()}setSky(F){return this._lazyInitEmptyStyle(),this.style.setSky(F),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(F,i){return this.style.setFeatureState(F,i),this._update()}removeFeatureState(F,i){return this.style.removeFeatureState(F,i),this._update()}getFeatureState(F){return this.style.getFeatureState(F)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let F=0,i=0;return this._container&&(F=this._container.clientWidth||400,i=this._container.clientHeight||300),[F,i]}_setupContainer(){const F=this._container;F.classList.add("maplibregl-map");const i=this._canvasContainer=r.create("div","maplibregl-canvas-container",F);this._interactive&&i.classList.add("maplibregl-interactive"),this._canvas=r.create("canvas","maplibregl-canvas",i),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const s=this._containerDimensions(),R=this._getClampedPixelRatio(s[0],s[1]);this._resizeCanvas(s[0],s[1],R);const B=this._controlContainer=r.create("div","maplibregl-control-container",F),G=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ie=>{G[ie]=r.create("div",`maplibregl-ctrl-${ie} `,B)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(F,i,s){this._canvas.width=Math.floor(s*F),this._canvas.height=Math.floor(s*i),this._canvas.style.width=`${F}px`,this._canvas.style.height=`${i}px`}_setupPainter(){const F={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let i=null;this._canvas.addEventListener("webglcontextcreationerror",R=>{i={requestedAttributes:F},R&&(i.statusMessage=R.statusMessage,i.type=R.type)},{once:!0});const s=this._canvas.getContext("webgl2",F)||this._canvas.getContext("webgl",F);if(!s){const R="Failed to initialize WebGL";throw i?(i.message=R,new Error(JSON.stringify(i))):new Error(R)}this.painter=new tc(s,this.transform),n.testSupport(s)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(F){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||F,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(F){return this._update(),this._renderTaskQueue.add(F)}_cancelRenderFrame(F){this._renderTaskQueue.remove(F)}_render(F){const i=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(F),this._removed)return;let s=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const B=this.transform.zoom,G=h.now();this.style.zoomHistory.update(B,G);const ie=new e.a9(B,{now:G,fadeDuration:i,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),pe=ie.crossFadingFactor();pe===1&&pe===this._crossFadingFactor||(s=!0,this._crossFadingFactor=pe),this.style.update(ie)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,i,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:i,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.be.mark(e.bf.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||s)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const R=this._sourcesDirty||this._styleDirty||this._placementDirty;return R||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||R||(this._fullyLoaded=!0,e.be.mark(e.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var F;this._hash&&this._hash.remove();for(const s of this._controls)s.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),w.removeThrottleControl(this._imageQueueHandle),(F=this._resizeObserver)===null||F===void 0||F.disconnect();const i=this.painter.context.gl.getExtension("WEBGL_lose_context");i!=null&&i.loseContext&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),r.remove(this._canvasContainer),r.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),e.be.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,h.frameAsync(this._frameRequest).then(F=>{e.be.frame(F),this._frameRequest=null,this._render(F)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(F){this._showTileBoundaries!==F&&(this._showTileBoundaries=F,this._update())}get showPadding(){return!!this._showPadding}set showPadding(F){this._showPadding!==F&&(this._showPadding=F,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(F){this._showCollisionBoxes!==F&&(this._showCollisionBoxes=F,F?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(F){this._showOverdrawInspector!==F&&(this._showOverdrawInspector=F,this._update())}get repaint(){return!!this._repaint}set repaint(F){this._repaint!==F&&(this._repaint=F,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(F){this._vertices=F,this._update()}get version(){return bc}getCameraTargetElevation(){return this.transform.elevation}},u.MapMouseEvent=Co,u.MapTouchEvent=vo,u.MapWheelEvent=nl,u.Marker=Ni,u.NavigationControl=class{constructor(F){this._updateZoomButtons=()=>{const i=this._map.getZoom(),s=i===this._map.getMaxZoom(),R=i===this._map.getMinZoom();this._zoomInButton.disabled=s,this._zoomOutButton.disabled=R,this._zoomInButton.setAttribute("aria-disabled",s.toString()),this._zoomOutButton.setAttribute("aria-disabled",R.toString())},this._rotateCompassArrow=()=>{const i=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=i},this._setButtonTitle=(i,s)=>{const R=this._map._getUIString(`NavigationControl.${s}`);i.title=R,i.setAttribute("aria-label",R)},this.options=e.e({},zs,F),this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",i=>i.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",i=>this._map.zoomIn({},{originalEvent:i})),r.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",i=>this._map.zoomOut({},{originalEvent:i})),r.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",i=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:i}):this._map.resetNorth({},{originalEvent:i})}),this._compassIcon=r.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(F){return this._map=F,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 ra(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(F,i){const s=r.create("button",F,this._container);return s.type="button",s.addEventListener("click",i),s}},u.Popup=xt,u.RasterDEMTileSource=We,u.RasterTileSource=Ne,u.ScaleControl=class{constructor(F){this._onMove=()=>{_i(this._map,this._container,this.options)},this.setUnit=i=>{this.options.unit=i,_i(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},ca),F)}getDefaultPosition(){return"bottom-left"}onAdd(F){return this._map=F,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-scale",F.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},u.ScrollZoomHandler=sl,u.Style=Jn,u.TerrainControl=class{constructor(F){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=F}onAdd(F){return this._map=F,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=r.create("button","maplibregl-ctrl-terrain",this._container),r.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){r.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},u.TwoFingersTouchPitchHandler=Pl,u.TwoFingersTouchRotateHandler=qc,u.TwoFingersTouchZoomHandler=ma,u.TwoFingersTouchZoomRotateHandler=cl,u.VectorTileSource=ze,u.VideoSource=ve,u.addSourceType=(F,i)=>e._(void 0,void 0,void 0,function*(){if(qe(F))throw new Error(`A source type called "${F}" already exists.`);((s,R)=>{Te[s]=R})(F,i)}),u.clearPrewarmedResources=function(){const F=fe;F&&(F.isPreloaded()&&F.numActive()===1?(F.release(ce),fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},u.getMaxParallelImageRequests=function(){return e.a.MAX_PARALLEL_IMAGE_REQUESTS},u.getRTLTextPluginStatus=function(){return Ze().getRTLTextPluginStatus()},u.getVersion=function(){return Q},u.getWorkerCount=function(){return he.workerCount},u.getWorkerUrl=function(){return e.a.WORKER_URL},u.importScriptInWorkers=function(F){return me().broadcast("IS",F)},u.prewarm=function(){oe().acquire(ce)},u.setMaxParallelImageRequests=function(F){e.a.MAX_PARALLEL_IMAGE_REQUESTS=F},u.setRTLTextPlugin=function(F,i){return Ze().setRTLTextPlugin(F,i)},u.setWorkerCount=function(F){he.workerCount=F},u.setWorkerUrl=function(F){e.a.WORKER_URL=F}}),E}()},88640:function(O,E,t){function x(_e,Ae,Ce){_e.prototype=Ae.prototype=Ce,Ce.constructor=_e}function u(_e,Ae){var Ce=Object.create(_e.prototype);for(var Me in Ae)Ce[Me]=Ae[Me];return Ce}function e(){}t.d(E,{GW:function(){return ge},Dj:function(){return he}});var b=.7,f=1/b,v="\\s*([+-]?\\d+)\\s*",h="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",n=/^#([0-9a-f]{3,8})$/,c=new RegExp("^rgb\\(".concat(v,",").concat(v,",").concat(v,"\\)$")),o=new RegExp("^rgb\\(".concat(r,",").concat(r,",").concat(r,"\\)$")),l=new RegExp("^rgba\\(".concat(v,",").concat(v,",").concat(v,",").concat(h,"\\)$")),p=new RegExp("^rgba\\(".concat(r,",").concat(r,",").concat(r,",").concat(h,"\\)$")),m=new RegExp("^hsl\\(".concat(h,",").concat(r,",").concat(r,"\\)$")),w=new RegExp("^hsla\\(".concat(h,",").concat(r,",").concat(r,",").concat(h,"\\)$")),T={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 k(){return this.rgb().formatHex()}function M(){return this.rgb().formatRgb()}function P(_e){var Ae,Ce;return _e=(_e+"").trim().toLowerCase(),(Ae=n.exec(_e))?(Ce=Ae[1].length,Ae=parseInt(Ae[1],16),Ce===6?S(Ae):Ce===3?new _(Ae>>8&15|Ae>>4&240,Ae>>4&15|240&Ae,(15&Ae)<<4|15&Ae,1):Ce===8?L(Ae>>24&255,Ae>>16&255,Ae>>8&255,(255&Ae)/255):Ce===4?L(Ae>>12&15|Ae>>8&240,Ae>>8&15|Ae>>4&240,Ae>>4&15|240&Ae,((15&Ae)<<4|15&Ae)/255):null):(Ae=c.exec(_e))?new _(Ae[1],Ae[2],Ae[3],1):(Ae=o.exec(_e))?new _(255*Ae[1]/100,255*Ae[2]/100,255*Ae[3]/100,1):(Ae=l.exec(_e))?L(Ae[1],Ae[2],Ae[3],Ae[4]):(Ae=p.exec(_e))?L(255*Ae[1]/100,255*Ae[2]/100,255*Ae[3]/100,Ae[4]):(Ae=m.exec(_e))?j(Ae[1],Ae[2]/100,Ae[3]/100,1):(Ae=w.exec(_e))?j(Ae[1],Ae[2]/100,Ae[3]/100,Ae[4]):T.hasOwnProperty(_e)?S(T[_e]):_e==="transparent"?new _(NaN,NaN,NaN,0):null}function S(_e){return new _(_e>>16&255,_e>>8&255,255&_e,1)}function L(_e,Ae,Ce,Me){return Me<=0&&(_e=Ae=Ce=NaN),new _(_e,Ae,Ce,Me)}function C(_e,Ae,Ce,Me){return arguments.length===1?((ze=_e)instanceof e||(ze=P(ze)),ze?new _((ze=ze.rgb()).r,ze.g,ze.b,ze.opacity):new _):new _(_e,Ae,Ce,Me??1);var ze}function _(_e,Ae,Ce,Me){this.r=+_e,this.g=+Ae,this.b=+Ce,this.opacity=+Me}function z(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b))}function y(){var _e=N(this.opacity);return"".concat(_e===1?"rgb(":"rgba(").concat(I(this.r),", ").concat(I(this.g),", ").concat(I(this.b)).concat(_e===1?")":", ".concat(_e,")"))}function N(_e){return isNaN(_e)?1:Math.max(0,Math.min(1,_e))}function I(_e){return Math.max(0,Math.min(255,Math.round(_e)||0))}function V(_e){return((_e=I(_e))<16?"0":"")+_e.toString(16)}function j(_e,Ae,Ce,Me){return Me<=0?_e=Ae=Ce=NaN:Ce<=0||Ce>=1?_e=Ae=NaN:Ae<=0&&(_e=NaN),new q(_e,Ae,Ce,Me)}function W(_e){if(_e instanceof q)return new q(_e.h,_e.s,_e.l,_e.opacity);if(_e instanceof e||(_e=P(_e)),!_e)return new q;if(_e instanceof q)return _e;var Ae=(_e=_e.rgb()).r/255,Ce=_e.g/255,Me=_e.b/255,ze=Math.min(Ae,Ce,Me),Ne=Math.max(Ae,Ce,Me),We=NaN,Pe=Ne-ze,Be=(Ne+ze)/2;return Pe?(We=Ae===Ne?(Ce-Me)/Pe+6*(Ce<Me):Ce===Ne?(Me-Ae)/Pe+2:(Ae-Ce)/Pe+4,Pe/=Be<.5?Ne+ze:2-Ne-ze,We*=60):Pe=Be>0&&Be<1?0:We,new q(We,Pe,Be,_e.opacity)}function q(_e,Ae,Ce,Me){this.h=+_e,this.s=+Ae,this.l=+Ce,this.opacity=+Me}function $(_e){return(_e=(_e||0)%360)<0?_e+360:_e}function te(_e){return Math.max(0,Math.min(1,_e||0))}function X(_e,Ae,Ce){return 255*(_e<60?Ae+(Ce-Ae)*_e/60:_e<180?Ce:_e<240?Ae+(Ce-Ae)*(240-_e)/60:Ae)}x(e,P,{copy:function(_e){return Object.assign(new this.constructor,this,_e)},displayable:function(){return this.rgb().displayable()},hex:k,formatHex:k,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return W(this).formatHsl()},formatRgb:M,toString:M}),x(_,C,u(e,{brighter:function(_e){return _e=_e==null?f:Math.pow(f,_e),new _(this.r*_e,this.g*_e,this.b*_e,this.opacity)},darker:function(_e){return _e=_e==null?b:Math.pow(b,_e),new _(this.r*_e,this.g*_e,this.b*_e,this.opacity)},rgb:function(){return this},clamp:function(){return new _(I(this.r),I(this.g),I(this.b),N(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:z,formatHex:z,formatHex8:function(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b)).concat(V(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:y,toString:y})),x(q,function(_e,Ae,Ce,Me){return arguments.length===1?W(_e):new q(_e,Ae,Ce,Me??1)},u(e,{brighter:function(_e){return _e=_e==null?f:Math.pow(f,_e),new q(this.h,this.s,this.l*_e,this.opacity)},darker:function(_e){return _e=_e==null?b:Math.pow(b,_e),new q(this.h,this.s,this.l*_e,this.opacity)},rgb:function(){var _e=this.h%360+360*(this.h<0),Ae=isNaN(_e)||isNaN(this.s)?0:this.s,Ce=this.l,Me=Ce+(Ce<.5?Ce:1-Ce)*Ae,ze=2*Ce-Me;return new _(X(_e>=240?_e-240:_e+120,ze,Me),X(_e,ze,Me),X(_e<120?_e+240:_e-120,ze,Me),this.opacity)},clamp:function(){return new q($(this.h),te(this.s),te(this.l),N(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 _e=N(this.opacity);return"".concat(_e===1?"hsl(":"hsla(").concat($(this.h),", ").concat(100*te(this.s),"%, ").concat(100*te(this.l),"%").concat(_e===1?")":", ".concat(_e,")"))}}));var ne=function(_e){return function(){return _e}};function ee(_e,Ae){var Ce=Ae-_e;return Ce?function(Me,ze){return function(Ne){return Me+Ne*ze}}(_e,Ce):ne(isNaN(_e)?Ae:_e)}var J=function _e(Ae){var Ce=function(ze){return(ze=+ze)==1?ee:function(Ne,We){return We-Ne?function(Pe,Be,Le){return Pe=Math.pow(Pe,Le),Be=Math.pow(Be,Le)-Pe,Le=1/Le,function(ve){return Math.pow(Pe+ve*Be,Le)}}(Ne,We,ze):ne(isNaN(Ne)?We:Ne)}}(Ae);function Me(ze,Ne){var We=Ce((ze=C(ze)).r,(Ne=C(Ne)).r),Pe=Ce(ze.g,Ne.g),Be=Ce(ze.b,Ne.b),Le=ee(ze.opacity,Ne.opacity);return function(ve){return ze.r=We(ve),ze.g=Pe(ve),ze.b=Be(ve),ze.opacity=Le(ve),ze+""}}return Me.gamma=_e,Me}(1);function Z(_e,Ae){var Ce,Me=Ae?Ae.length:0,ze=_e?Math.min(Me,_e.length):0,Ne=new Array(ze),We=new Array(Me);for(Ce=0;Ce<ze;++Ce)Ne[Ce]=ge(_e[Ce],Ae[Ce]);for(;Ce<Me;++Ce)We[Ce]=Ae[Ce];return function(Pe){for(Ce=0;Ce<ze;++Ce)We[Ce]=Ne[Ce](Pe);return We}}function ce(_e,Ae){var Ce=new Date;return _e=+_e,Ae=+Ae,function(Me){return Ce.setTime(_e*(1-Me)+Ae*Me),Ce}}function he(_e,Ae){return _e=+_e,Ae=+Ae,function(Ce){return _e*(1-Ce)+Ae*Ce}}function de(_e){return de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},de(_e)}function fe(_e,Ae){var Ce,Me={},ze={};for(Ce in _e!==null&&de(_e)==="object"||(_e={}),Ae!==null&&de(Ae)==="object"||(Ae={}),Ae)Ce in _e?Me[Ce]=ge(_e[Ce],Ae[Ce]):ze[Ce]=Ae[Ce];return function(Ne){for(Ce in Me)ze[Ce]=Me[Ce](Ne);return ze}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oe=new RegExp(re.source,"g");function le(_e,Ae){var Ce,Me,ze,Ne=re.lastIndex=oe.lastIndex=0,We=-1,Pe=[],Be=[];for(_e+="",Ae+="";(Ce=re.exec(_e))&&(Me=oe.exec(Ae));)(ze=Me.index)>Ne&&(ze=Ae.slice(Ne,ze),Pe[We]?Pe[We]+=ze:Pe[++We]=ze),(Ce=Ce[0])===(Me=Me[0])?Pe[We]?Pe[We]+=Me:Pe[++We]=Me:(Pe[++We]=null,Be.push({i:We,x:he(Ce,Me)})),Ne=oe.lastIndex;return Ne<Ae.length&&(ze=Ae.slice(Ne),Pe[We]?Pe[We]+=ze:Pe[++We]=ze),Pe.length<2?Be[0]?function(Le){return function(ve){return Le(ve)+""}}(Be[0].x):function(Le){return function(){return Le}}(Ae):(Ae=Be.length,function(Le){for(var ve,Ee=0;Ee<Ae;++Ee)Pe[(ve=Be[Ee]).i]=ve.x(Le);return Pe.join("")})}function me(_e,Ae){Ae||(Ae=[]);var Ce,Me=_e?Math.min(Ae.length,_e.length):0,ze=Ae.slice();return function(Ne){for(Ce=0;Ce<Me;++Ce)ze[Ce]=_e[Ce]*(1-Ne)+Ae[Ce]*Ne;return ze}}function be(_e){return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},be(_e)}function ge(_e,Ae){var Ce,Me,ze=be(Ae);return Ae==null||ze==="boolean"?ne(Ae):(ze==="number"?he:ze==="string"?(Ce=P(Ae))?(Ae=Ce,J):le:Ae instanceof P?J:Ae instanceof Date?ce:(Me=Ae,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Ae)?Z:typeof Ae.valueOf!="function"&&typeof Ae.toString!="function"||isNaN(Ae)?fe:he:me))(_e,Ae)}},23648:function(O){O.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(O){O.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(O){O.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(O){O.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(O){O.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(O){O.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(O){O.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(O){O.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"}}]}`)}},U={};function ae(O){var E=U[O];if(E!==void 0)return E.exports;var t=U[O]={id:O,exports:{}};return A[O].call(t.exports,t,t.exports,ae),t.exports}return ae.m=A,ae.n=function(O){var E=O&&O.__esModule?function(){return O.default}:function(){return O};return ae.d(E,{a:E}),E},ae.d=function(O,E){for(var t in E)ae.o(E,t)&&!ae.o(O,t)&&Object.defineProperty(O,t,{enumerable:!0,get:E[t]})},ae.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),ae.o=function(O,E){return Object.prototype.hasOwnProperty.call(O,E)},ae.r=function(O){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})},ae.b=document.baseURI||self.location.href,ae.nc=void 0,ae(20260)}()})}(Jb)),Jb.exports}var f6=p6();const Zb=h6(f6),m6={ref:"card",class:"card-volumetric-field"},Yb=1,g6=800,Qb=300,y6=-46,ex=100,tx=-14,v6={__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},isGhostEffect:{type:Boolean,default:!1}},setup(a){const d=new Set([2,20,308,310]),A=[[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 U=null;const ae=a,O=g.ref(null),E=g.ref(null),t=g.ref(0),x=g.ref(null),u=g.computed(()=>`volumetric-field-${Date.now()}`);g.watch(()=>ae.passesPlays,p=>{const m=p.reduce((w,T)=>(d.has(T[ae.playIndexes.categoryId])&&w.push({x1:T[ae.playIndexes.coordinate1X],y1:T[ae.playIndexes.coordinate1Y],x2:T[ae.playIndexes.coordinate2X],y2:T[ae.playIndexes.coordinate2Y],x3:T[ae.playIndexes.coordinate3X],y3:T[ae.playIndexes.coordinate3Y]}),w),[]);l(m)}),g.watch(()=>t.value,(p,m)=>{x.value&&(n(p),E.value.style.height=`${c(p)}px`,x.value.style.top=`${o(c(p))}px`)});function e(){U=new ResizeObserver(p=>{for(const m of p)t.value=m.contentRect.width}),U.observe(O.value)}function b(p){return Array.from({length:p},()=>0)}function f(p,m){let w=.01351,T=.02439,k=0,M=0,P=[];const S=m.length,L=Math.floor(S/10);for(;k<74;)M=m.filter(C=>1-C.y3>=k*w&&1-C.y3<=(k+1)*w&&1-C.x3>=p*T&&1-C.x3<=(p+1)*T).map(C=>C.y3).length,P.push(parseFloat((M/L).toFixed(4))),k++;return P.reverse()}function v(p){let m=[b(74),b(74)],w=[],T=39;for(;T>0&&T<=39;)w=f(T,p),m.push(w),T--;return m.push(b(74),b(74)),m}function h(p,m,w){const T=[];let k=0,M=0;T.push(p[0]);for(let P=1;P<w-1;P++){const S=[];S.push(p[P][0]);for(let L=1;L<m-1;L++)k=p[P][L-1],M=p[P][L+1],S.push(k+.5*(p[P][L]+M-k));S.push(p[P][m-1]),T.push(S)}T.push(p[w-1]);for(let P=1;P<m-1;P++)for(let S=1;S<w-1;S++)k=T[S-1][P],M=T[S+1][P],T[S][P]=k+.5*(T[S][P]+M-k);return T}function r(p){let m=0,w=0;for(let T=0;T<p.length;T++){w=w+p[T].reduce(function(M,P){return M+P});const k=Math.max.apply(null,p[T]);k>m&&(m=k)}return m}function n(p){Zb.relayout(O.value,{width:p,height:c(p)})}function c(p){return Math.round(Qb/g6*p,0)}function o(p){return tx+(p-ex)/(Qb-ex)*(y6-tx)}function l(p){let m=v(p),w=m.length,T=m[0].length;m=h(h(m,T,w),T,w),T=m[0].length,w=m.length;const k=r(m),M=[{z:m,type:"surface",connectgaps:!0,opacity:.25,colorscale:A,autoscale:!1,showscale:!1}],P=[0,T],S=[0,w],L=[0,k*5],C={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:S},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:L},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:t.value,height:c(t.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};E.value&&(E.value.style.height=`${c(t.value)}px`);const _=[];for(let y=0;y<T;y++){const N=[],I=[],V=[];for(let j=0;j<w;j++)N.push(y),I.push(j),V.push(M[0].z[j][y]);_.push({x:N,y:I,z:V,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:k,width:Yb,color:V,colorscale:A,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let y=0;y<w;y++){const N=[],I=[],V=[];for(let j=0;j<T;j++)N.push(j),I.push(y),V.push(M[0].z[y][j]);_.push({x:N,y:I,z:V,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:k,width:Yb,color:V,colorscale:A,shape:"spline",smoothing:.6,dash:"dotline"}})}Zb.newPlot(O.value,M.concat(_),C,{displayModeBar:!1},{responsive:!0}),x.value=document.querySelector(`div.${u.value} > .plot-container`);const z=document.querySelector(`div.${u.value} div.plotly`);z&&ae.isGhostEffect&&(z.style.opacity="0.2"),x.value&&(x.value.style.top=`${o(c(t.value))}px`)}return g.onMounted(()=>{O.value&&(O.value.style.pointerEvents="none"),e()}),(p,m)=>(g.openBlock(),g.createElementBlock("div",m6,[g.createElementVNode("div",{ref_key:"volumetricField",ref:E,class:"card-volumetric-field__volumetric-field"},[g.createElementVNode("div",{ref_key:"surfacePlot",ref:O,id:"surface-plot",class:g.normalizeClass([u.value])},null,2)],512)],512))}},b6=zm(v6,[["__scopeId","data-v-1cf52ebb"]]),x6={__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(a){const d=a,A=g.computed(()=>({"--flex-direction-info":d.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":d.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":d.team.isHomeTeam?"#336dff":"#7ed321"}));return(U,ae)=>(g.openBlock(),g.createElementBlock("div",{class:"attack-direction",style:g.normalizeStyle(A.value)},[ae[0]||(ae[0]=g.createElementVNode("div",{class:"attack-direction__line"},null,-1)),g.createElementVNode("div",{class:g.normalizeClass(`attack-direction__triangle-${a.team.isHomeTeam?"right":"left"}`)},null,2),ae[1]||(ae[1]=g.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},_6=zm(x6,[["__scopeId","data-v-18aa328f"]]);function rx(a,d){return function(){return a.apply(d,arguments)}}const{toString:w6}=Object.prototype,{getPrototypeOf:Dy}=Object,{iterator:Om,toStringTag:nx}=Symbol,Nm=(a=>d=>{const A=w6.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Du=a=>(a=a.toLowerCase(),d=>Nm(d)===a),Rm=a=>d=>typeof d===a,{isArray:dp}=Array,af=Rm("undefined");function k6(a){return a!==null&&!af(a)&&a.constructor!==null&&!af(a.constructor)&&Jc(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const ax=Du("ArrayBuffer");function T6(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&ax(a.buffer),d}const S6=Rm("string"),Jc=Rm("function"),ix=Rm("number"),Dm=a=>a!==null&&typeof a=="object",A6=a=>a===!0||a===!1,Im=a=>{if(Nm(a)!=="object")return!1;const d=Dy(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(nx in a)&&!(Om in a)},E6=Du("Date"),C6=Du("File"),M6=Du("Blob"),P6=Du("FileList"),L6=a=>Dm(a)&&Jc(a.pipe),z6=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||Jc(a.append)&&((d=Nm(a))==="formdata"||d==="object"&&Jc(a.toString)&&a.toString()==="[object FormData]"))},O6=Du("URLSearchParams"),[N6,R6,D6,I6]=["ReadableStream","Request","Response","Headers"].map(Du),F6=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function of(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),dp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function ox(a,d){d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const bh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sx=a=>!af(a)&&a!==bh;function Iy(){const{caseless:a}=sx(this)&&this||{},d={},A=(U,ae)=>{const O=a&&ox(d,ae)||ae;Im(d[O])&&Im(U)?d[O]=Iy(d[O],U):Im(U)?d[O]=Iy({},U):dp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&of(arguments[U],A);return d}const V6=(a,d,A,{allOwnKeys:U}={})=>(of(d,(ae,O)=>{A&&Jc(ae)?a[O]=rx(ae,A):a[O]=ae},{allOwnKeys:U}),a),B6=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),U6=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},j6=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&Dy(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},q6=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},W6=a=>{if(!a)return null;if(dp(a))return a;let d=a.length;if(!ix(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},H6=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&Dy(Uint8Array)),G6=(a,d)=>{const A=(a&&a[Om]).call(a);let U;for(;(U=A.next())&&!U.done;){const ae=U.value;d.call(a,ae[0],ae[1])}},X6=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},K6=Du("HTMLFormElement"),J6=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,A,U){return A.toUpperCase()+U}),lx=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),$6=Du("RegExp"),cx=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};of(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},Z6=a=>{cx(a,(d,A)=>{if(Jc(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(Jc(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},Y6=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return dp(a)?U(a):U(String(a).split(d)),A},Q6=()=>{},ek=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function tk(a){return!!(a&&Jc(a.append)&&a[nx]==="FormData"&&a[Om])}const rk=a=>{const d=new Array(10),A=(U,ae)=>{if(Dm(U)){if(d.indexOf(U)>=0)return;if(!("toJSON"in U)){d[ae]=U;const O=dp(U)?[]:{};return of(U,(E,t)=>{const x=A(E,ae+1);!af(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},nk=Du("AsyncFunction"),ak=a=>a&&(Dm(a)||Jc(a))&&Jc(a.then)&&Jc(a.catch),ux=((a,d)=>a?setImmediate:d?((A,U)=>(bh.addEventListener("message",({source:ae,data:O})=>{ae===bh&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),bh.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",Jc(bh.postMessage)),ik=typeof queueMicrotask<"u"?queueMicrotask.bind(bh):typeof process<"u"&&process.nextTick||ux,ok=a=>a!=null&&Jc(a[Om]),Bn={isArray:dp,isArrayBuffer:ax,isBuffer:k6,isFormData:z6,isArrayBufferView:T6,isString:S6,isNumber:ix,isBoolean:A6,isObject:Dm,isPlainObject:Im,isReadableStream:N6,isRequest:R6,isResponse:D6,isHeaders:I6,isUndefined:af,isDate:E6,isFile:C6,isBlob:M6,isRegExp:$6,isFunction:Jc,isStream:L6,isURLSearchParams:O6,isTypedArray:H6,isFileList:P6,forEach:of,merge:Iy,extend:V6,trim:F6,stripBOM:B6,inherits:U6,toFlatObject:j6,kindOf:Nm,kindOfTest:Du,endsWith:q6,toArray:W6,forEachEntry:G6,matchAll:X6,isHTMLForm:K6,hasOwnProperty:lx,hasOwnProp:lx,reduceDescriptors:cx,freezeMethods:Z6,toObjectSet:Y6,toCamelCase:J6,noop:Q6,toFiniteNumber:ek,findKey:ox,global:bh,isContextDefined:sx,isSpecCompliantForm:tk,toJSONObject:rk,isAsyncFn:nk,isThenable:ak,setImmediate:ux,asap:ik,isIterable:ok};function ci(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}Bn.inherits(ci,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:Bn.toJSONObject(this.config),code:this.code,status:this.status}}});const dx=ci.prototype,hx={};["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(a=>{hx[a]={value:a}}),Object.defineProperties(ci,hx),Object.defineProperty(dx,"isAxiosError",{value:!0}),ci.from=(a,d,A,U,ae,O)=>{const E=Object.create(dx);return Bn.toFlatObject(a,E,function(t){return t!==Error.prototype},t=>t!=="isAxiosError"),ci.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const sk=null;function Fy(a){return Bn.isPlainObject(a)||Bn.isArray(a)}function px(a){return Bn.endsWith(a,"[]")?a.slice(0,-2):a}function fx(a,d,A){return a?a.concat(d).map(function(U,ae){return U=px(U),!A&&ae?"["+U+"]":U}).join(A?".":""):d}function lk(a){return Bn.isArray(a)&&!a.some(Fy)}const ck=Bn.toFlatObject(Bn,{},null,function(a){return/^is[A-Z]/.test(a)});function Fm(a,d,A){if(!Bn.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=Bn.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,h){return!Bn.isUndefined(h[v])});const U=A.metaTokens,ae=A.visitor||u,O=A.dots,E=A.indexes,t=(A.Blob||typeof Blob<"u"&&Blob)&&Bn.isSpecCompliantForm(d);if(!Bn.isFunction(ae))throw new TypeError("visitor must be a function");function x(v){if(v===null)return"";if(Bn.isDate(v))return v.toISOString();if(Bn.isBoolean(v))return v.toString();if(!t&&Bn.isBlob(v))throw new ci("Blob is not supported. Use a Buffer instead.");return Bn.isArrayBuffer(v)||Bn.isTypedArray(v)?t&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,h,r){let n=v;if(v&&!r&&typeof v=="object"){if(Bn.endsWith(h,"{}"))h=U?h:h.slice(0,-2),v=JSON.stringify(v);else if(Bn.isArray(v)&&lk(v)||(Bn.isFileList(v)||Bn.endsWith(h,"[]"))&&(n=Bn.toArray(v)))return h=px(h),n.forEach(function(c,o){!(Bn.isUndefined(c)||c===null)&&d.append(E===!0?fx([h],o,O):E===null?h:h+"[]",x(c))}),!1}return Fy(v)?!0:(d.append(fx(r,h,O),x(v)),!1)}const e=[],b=Object.assign(ck,{defaultVisitor:u,convertValue:x,isVisitable:Fy});function f(v,h){if(!Bn.isUndefined(v)){if(e.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));e.push(v),Bn.forEach(v,function(r,n){(!(Bn.isUndefined(r)||r===null)&&ae.call(d,r,Bn.isString(n)?n.trim():n,h,b))===!0&&f(r,h?h.concat(n):[n])}),e.pop()}}if(!Bn.isObject(a))throw new TypeError("data must be an object");return f(a),d}function mx(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(A){return d[A]})}function Vy(a,d){this._pairs=[],a&&Fm(a,this,d)}const gx=Vy.prototype;gx.append=function(a,d){this._pairs.push([a,d])},gx.toString=function(a){const d=a?function(A){return a.call(this,A,mx)}:mx;return this._pairs.map(function(A){return d(A[0])+"="+d(A[1])},"").join("&")};function uk(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yx(a,d,A){if(!d)return a;const U=A&&A.encode||uk;Bn.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=Bn.isURLSearchParams(d)?d.toString():new Vy(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}let vx=class{constructor(){this.handlers=[]}use(a,d,A){return this.handlers.push({fulfilled:a,rejected:d,synchronous:A?A.synchronous:!1,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){Bn.forEach(this.handlers,function(d){d!==null&&a(d)})}};const bx={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dk=typeof URLSearchParams<"u"?URLSearchParams:Vy,hk=typeof FormData<"u"?FormData:null,pk=typeof Blob<"u"?Blob:null,fk={isBrowser:!0,classes:{URLSearchParams:dk,FormData:hk,Blob:pk},protocols:["http","https","file","blob","url","data"]},By=typeof window<"u"&&typeof document<"u",Uy=typeof navigator=="object"&&navigator||void 0,mk=By&&(!Uy||["ReactNative","NativeScript","NS"].indexOf(Uy.product)<0),gk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yk=By&&window.location.href||"http://localhost",vk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:By,hasStandardBrowserEnv:mk,hasStandardBrowserWebWorkerEnv:gk,navigator:Uy,origin:yk},Symbol.toStringTag,{value:"Module"})),_c={...vk,...fk};function bk(a,d){return Fm(a,new _c.classes.URLSearchParams,Object.assign({visitor:function(A,U,ae,O){return _c.isNode&&Bn.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)}},d))}function xk(a){return Bn.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function _k(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function xx(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&Bn.isArray(ae)?ae.length:E,x?(Bn.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!Bn.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&Bn.isArray(ae[E])&&(ae[E]=_k(ae[E])),!t)}if(Bn.isFormData(a)&&Bn.isFunction(a.entries)){const A={};return Bn.forEachEntry(a,(U,ae)=>{d(xk(U),ae,A,0)}),A}return null}function wk(a,d,A){if(Bn.isString(a))try{return(d||JSON.parse)(a),Bn.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const sf={transitional:bx,adapter:["xhr","http","fetch"],transformRequest:[function(a,d){const A=d.getContentType()||"",U=A.indexOf("application/json")>-1,ae=Bn.isObject(a);if(ae&&Bn.isHTMLForm(a)&&(a=new FormData(a)),Bn.isFormData(a))return U?JSON.stringify(xx(a)):a;if(Bn.isArrayBuffer(a)||Bn.isBuffer(a)||Bn.isStream(a)||Bn.isFile(a)||Bn.isBlob(a)||Bn.isReadableStream(a))return a;if(Bn.isArrayBufferView(a))return a.buffer;if(Bn.isURLSearchParams(a))return d.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let O;if(ae){if(A.indexOf("application/x-www-form-urlencoded")>-1)return bk(a,this.formSerializer).toString();if((O=Bn.isFileList(a))||A.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return Fm(O?{"files[]":a}:a,E&&new E,this.formSerializer)}}return ae||U?(d.setContentType("application/json",!1),wk(a)):a}],transformResponse:[function(a){const d=this.transitional||sf.transitional,A=d&&d.forcedJSONParsing,U=this.responseType==="json";if(Bn.isResponse(a)||Bn.isReadableStream(a))return a;if(a&&Bn.isString(a)&&(A&&!this.responseType||U)){const ae=!(d&&d.silentJSONParsing)&&U;try{return JSON.parse(a)}catch(O){if(ae)throw O.name==="SyntaxError"?ci.from(O,ci.ERR_BAD_RESPONSE,this,null,this.response):O}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_c.classes.FormData,Blob:_c.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Bn.forEach(["delete","get","head","post","put","patch"],a=>{sf.headers[a]={}});const kk=Bn.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"]),Tk=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4031
|
-
`).forEach(function(O){ae=O.indexOf(":"),A=O.substring(0,ae).trim().toLowerCase(),U=O.substring(ae+1).trim(),!(!A||d[A]&&kk[A])&&(A==="set-cookie"?d[A]?d[A].push(U):d[A]=[U]:d[A]=d[A]?d[A]+", "+U:U)}),d},
|
|
4032
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...d){const A=new this(a);return d.forEach(U=>A.set(U)),A}static accessor(a){const d=(this[_x]=this[_x]={accessors:{}}).accessors,A=this.prototype;function U(ae){const O=lf(ae);d[O]||(Ck(A,ae),d[O]=!0)}return Bn.isArray(a)?a.forEach(U):U(a),this}};$c.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Bn.reduceDescriptors($c.prototype,({value:a},d)=>{let A=d[0].toUpperCase()+d.slice(1);return{get:()=>a,set(U){this[A]=U}}}),Bn.freezeMethods($c);function qy(a,d){const A=this||sf,U=d||A,ae=$c.from(U.headers);let O=U.data;return Bn.forEach(a,function(E){O=E.call(A,O,ae.normalize(),d?d.status:void 0)}),ae.normalize(),O}function wx(a){return!!(a&&a.__CANCEL__)}function hp(a,d,A){ci.call(this,a??"canceled",ci.ERR_CANCELED,d,A),this.name="CanceledError"}Bn.inherits(hp,ci,{__CANCEL__:!0});function kx(a,d,A){const U=A.config.validateStatus;!A.status||!U||U(A.status)?a(A):d(new ci("Request failed with status code "+A.status,[ci.ERR_BAD_REQUEST,ci.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A))}function Mk(a){const d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return d&&d[1]||""}function Pk(a,d){a=a||10;const A=new Array(a),U=new Array(a);let ae=0,O=0,E;return d=d!==void 0?d:1e3,function(t){const x=Date.now(),u=U[O];E||(E=x),A[ae]=t,U[ae]=x;let e=O,b=0;for(;e!==ae;)b+=A[e++],e=e%a;if(ae=(ae+1)%a,ae===O&&(O=(O+1)%a),x-E<d)return;const f=u&&x-u;return f?Math.round(b*1e3/f):void 0}}function Lk(a,d){let A=0,U=1e3/d,ae,O;const E=(t,x=Date.now())=>{A=x,ae=null,O&&(clearTimeout(O),O=null),a.apply(null,t)};return[(...t)=>{const x=Date.now(),u=x-A;u>=U?E(t,x):(ae=t,O||(O=setTimeout(()=>{O=null,E(ae)},U-u)))},()=>ae&&E(ae)]}const Bm=(a,d,A=3)=>{let U=0;const ae=Pk(50,250);return Lk(O=>{const E=O.loaded,t=O.lengthComputable?O.total:void 0,x=E-U,u=ae(x),e=E<=t;U=E;const b={loaded:E,total:t,progress:t?E/t:void 0,bytes:x,rate:u||void 0,estimated:u&&t&&e?(t-E)/u:void 0,event:O,lengthComputable:t!=null,[d?"download":"upload"]:!0};a(b)},A)},Tx=(a,d)=>{const A=a!=null;return[U=>d[0]({lengthComputable:A,total:a,loaded:U}),d[1]]},Sx=a=>(...d)=>Bn.asap(()=>a(...d)),zk=_c.hasStandardBrowserEnv?((a,d)=>A=>(A=new URL(A,_c.origin),a.protocol===A.protocol&&a.host===A.host&&(d||a.port===A.port)))(new URL(_c.origin),_c.navigator&&/(msie|trident)/i.test(_c.navigator.userAgent)):()=>!0,Ok=_c.hasStandardBrowserEnv?{write(a,d,A,U,ae,O){const E=[a+"="+encodeURIComponent(d)];Bn.isNumber(A)&&E.push("expires="+new Date(A).toGMTString()),Bn.isString(U)&&E.push("path="+U),Bn.isString(ae)&&E.push("domain="+ae),O===!0&&E.push("secure"),document.cookie=E.join("; ")},read(a){const d=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Nk(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function Rk(a,d){return d?a.replace(/\/?\/$/,"")+"/"+d.replace(/^\/+/,""):a}function Ax(a,d,A){let U=!Nk(d);return a&&(U||A==!1)?Rk(a,d):d}const Ex=a=>a instanceof $c?{...a}:a;function xh(a,d){d=d||{};const A={};function U(u,e,b,f){return Bn.isPlainObject(u)&&Bn.isPlainObject(e)?Bn.merge.call({caseless:f},u,e):Bn.isPlainObject(e)?Bn.merge({},e):Bn.isArray(e)?e.slice():e}function ae(u,e,b,f){if(Bn.isUndefined(e)){if(!Bn.isUndefined(u))return U(void 0,u,b,f)}else return U(u,e,b,f)}function O(u,e){if(!Bn.isUndefined(e))return U(void 0,e)}function E(u,e){if(Bn.isUndefined(e)){if(!Bn.isUndefined(u))return U(void 0,u)}else return U(void 0,e)}function t(u,e,b){if(b in d)return U(u,e);if(b in a)return U(void 0,u)}const x={url:O,method:O,data:O,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:t,headers:(u,e,b)=>ae(Ex(u),Ex(e),b,!0)};return Bn.forEach(Object.keys(Object.assign({},a,d)),function(u){const e=x[u]||ae,b=e(a[u],d[u],u);Bn.isUndefined(b)&&e!==t||(A[u]=b)}),A}const Cx=a=>{const d=xh({},a);let{data:A,withXSRFToken:U,xsrfHeaderName:ae,xsrfCookieName:O,headers:E,auth:t}=d;d.headers=E=$c.from(E),d.url=yx(Ax(d.baseURL,d.url,d.allowAbsoluteUrls),a.params,a.paramsSerializer),t&&E.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):"")));let x;if(Bn.isFormData(A)){if(_c.hasStandardBrowserEnv||_c.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if((x=E.getContentType())!==!1){const[u,...e]=x?x.split(";").map(b=>b.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...e].join("; "))}}if(_c.hasStandardBrowserEnv&&(U&&Bn.isFunction(U)&&(U=U(d)),U||U!==!1&&zk(d.url))){const u=ae&&O&&Ok.read(O);u&&E.set(ae,u)}return d},Dk=typeof XMLHttpRequest<"u",Ik=Dk&&function(a){return new Promise(function(d,A){const U=Cx(a);let ae=U.data;const O=$c.from(U.headers).normalize();let{responseType:E,onUploadProgress:t,onDownloadProgress:x}=U,u,e,b,f,v;function h(){f&&f(),v&&v(),U.cancelToken&&U.cancelToken.unsubscribe(u),U.signal&&U.signal.removeEventListener("abort",u)}let r=new XMLHttpRequest;r.open(U.method.toUpperCase(),U.url,!0),r.timeout=U.timeout;function n(){if(!r)return;const o=$c.from("getAllResponseHeaders"in r&&r.getAllResponseHeaders()),l={data:!E||E==="text"||E==="json"?r.responseText:r.response,status:r.status,statusText:r.statusText,headers:o,config:a,request:r};kx(function(p){d(p),h()},function(p){A(p),h()},l),r=null}"onloadend"in r?r.onloadend=n:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(n)},r.onabort=function(){r&&(A(new ci("Request aborted",ci.ECONNABORTED,a,r)),r=null)},r.onerror=function(){A(new ci("Network Error",ci.ERR_NETWORK,a,r)),r=null},r.ontimeout=function(){let o=U.timeout?"timeout of "+U.timeout+"ms exceeded":"timeout exceeded";const l=U.transitional||bx;U.timeoutErrorMessage&&(o=U.timeoutErrorMessage),A(new ci(o,l.clarifyTimeoutError?ci.ETIMEDOUT:ci.ECONNABORTED,a,r)),r=null},ae===void 0&&O.setContentType(null),"setRequestHeader"in r&&Bn.forEach(O.toJSON(),function(o,l){r.setRequestHeader(l,o)}),Bn.isUndefined(U.withCredentials)||(r.withCredentials=!!U.withCredentials),E&&E!=="json"&&(r.responseType=U.responseType),x&&([b,v]=Bm(x,!0),r.addEventListener("progress",b)),t&&r.upload&&([e,f]=Bm(t),r.upload.addEventListener("progress",e),r.upload.addEventListener("loadend",f)),(U.cancelToken||U.signal)&&(u=o=>{r&&(A(!o||o.type?new hp(null,a,r):o),r.abort(),r=null)},U.cancelToken&&U.cancelToken.subscribe(u),U.signal&&(U.signal.aborted?u():U.signal.addEventListener("abort",u)));const c=Mk(U.url);if(c&&_c.protocols.indexOf(c)===-1){A(new ci("Unsupported protocol "+c+":",ci.ERR_BAD_REQUEST,a));return}r.send(ae||null)})},Fk=(a,d)=>{const{length:A}=a=a?a.filter(Boolean):[];if(d||A){let U=new AbortController,ae;const O=function(u){if(!ae){ae=!0,t();const e=u instanceof Error?u:this.reason;U.abort(e instanceof ci?e:new hp(e instanceof Error?e.message:e))}};let E=d&&setTimeout(()=>{E=null,O(new ci(`timeout ${d} of ms exceeded`,ci.ETIMEDOUT))},d);const t=()=>{a&&(E&&clearTimeout(E),E=null,a.forEach(u=>{u.unsubscribe?u.unsubscribe(O):u.removeEventListener("abort",O)}),a=null)};a.forEach(u=>u.addEventListener("abort",O));const{signal:x}=U;return x.unsubscribe=()=>Bn.asap(t),x}},Vk=function*(a,d){let A=a.byteLength;if(A<d){yield a;return}let U=0,ae;for(;U<A;)ae=U+d,yield a.slice(U,ae),U=ae},Bk=async function*(a,d){for await(const A of Uk(a))yield*Vk(A,d)},Uk=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const d=a.getReader();try{for(;;){const{done:A,value:U}=await d.read();if(A)break;yield U}}finally{await d.cancel()}},Mx=(a,d,A,U)=>{const ae=Bk(a,d);let O=0,E,t=x=>{E||(E=!0,U&&U(x))};return new ReadableStream({async pull(x){try{const{done:u,value:e}=await ae.next();if(u){t(),x.close();return}let b=e.byteLength;if(A){let f=O+=b;A(f)}x.enqueue(new Uint8Array(e))}catch(u){throw t(u),u}},cancel(x){return t(x),ae.return()}},{highWaterMark:2})},Um=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Px=Um&&typeof ReadableStream=="function",jk=Um&&(typeof TextEncoder=="function"?(a=>d=>a.encode(d))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),Lx=(a,...d)=>{try{return!!a(...d)}catch{return!1}},qk=Px&&Lx(()=>{let a=!1;const d=new Request(_c.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!d}),zx=64*1024,Wy=Px&&Lx(()=>Bn.isReadableStream(new Response("").body)),jm={stream:Wy&&(a=>a.body)};Um&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!jm[d]&&(jm[d]=Bn.isFunction(a[d])?A=>A[d]():(A,U)=>{throw new ci(`Response type '${d}' is not supported`,ci.ERR_NOT_SUPPORT,U)})})})(new Response);const Wk=async a=>{if(a==null)return 0;if(Bn.isBlob(a))return a.size;if(Bn.isSpecCompliantForm(a))return(await new Request(_c.origin,{method:"POST",body:a}).arrayBuffer()).byteLength;if(Bn.isArrayBufferView(a)||Bn.isArrayBuffer(a))return a.byteLength;if(Bn.isURLSearchParams(a)&&(a=a+""),Bn.isString(a))return(await jk(a)).byteLength},Hk=async(a,d)=>Bn.toFiniteNumber(a.getContentLength())??Wk(d),Gk=Um&&(async a=>{let{url:d,method:A,data:U,signal:ae,cancelToken:O,timeout:E,onDownloadProgress:t,onUploadProgress:x,responseType:u,headers:e,withCredentials:b="same-origin",fetchOptions:f}=Cx(a);u=u?(u+"").toLowerCase():"text";let v=Fk([ae,O&&O.toAbortSignal()],E),h;const r=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let n;try{if(x&&qk&&A!=="get"&&A!=="head"&&(n=await Hk(e,U))!==0){let m=new Request(d,{method:"POST",body:U,duplex:"half"}),w;if(Bn.isFormData(U)&&(w=m.headers.get("content-type"))&&e.setContentType(w),m.body){const[T,k]=Tx(n,Bm(Sx(x)));U=Mx(m.body,zx,T,k)}}Bn.isString(b)||(b=b?"include":"omit");const c="credentials"in Request.prototype;h=new Request(d,{...f,signal:v,method:A.toUpperCase(),headers:e.normalize().toJSON(),body:U,duplex:"half",credentials:c?b:void 0});let o=await fetch(h,f);const l=Wy&&(u==="stream"||u==="response");if(Wy&&(t||l&&r)){const m={};["status","statusText","headers"].forEach(M=>{m[M]=o[M]});const w=Bn.toFiniteNumber(o.headers.get("content-length")),[T,k]=t&&Tx(w,Bm(Sx(t),!0))||[];o=new Response(Mx(o.body,zx,T,()=>{k&&k(),r&&r()}),m)}u=u||"text";let p=await jm[Bn.findKey(jm,u)||"text"](o,a);return!l&&r&&r(),await new Promise((m,w)=>{kx(m,w,{data:p,headers:$c.from(o.headers),status:o.status,statusText:o.statusText,config:a,request:h})})}catch(c){throw r&&r(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new ci("Network Error",ci.ERR_NETWORK,a,h),{cause:c.cause||c}):ci.from(c,c&&c.code,a,h)}}),Hy={http:sk,xhr:Ik,fetch:Gk};Bn.forEach(Hy,(a,d)=>{if(a){try{Object.defineProperty(a,"name",{value:d})}catch{}Object.defineProperty(a,"adapterName",{value:d})}});const Ox=a=>`- ${a}`,Xk=a=>Bn.isFunction(a)||a===null||a===!1,Nx={getAdapter:a=>{a=Bn.isArray(a)?a:[a];const{length:d}=a;let A,U;const ae={};for(let O=0;O<d;O++){A=a[O];let E;if(U=A,!Xk(A)&&(U=Hy[(E=String(A)).toLowerCase()],U===void 0))throw new ci(`Unknown adapter '${E}'`);if(U)break;ae[E||"#"+O]=U}if(!U){const O=Object.entries(ae).map(([t,x])=>`adapter ${t} `+(x===!1?"is not supported by the environment":"is not available in the build"));let E=d?O.length>1?`since :
|
|
4033
|
-
`+O.map(
|
|
4034
|
-
`):" "+
|
|
4035
|
-
`+ae):A.stack=ae}catch{}}throw A}}_request(a,d){typeof a=="string"?(d=d||{},d.url=a):d=a||{},d=xh(this.defaults,d);const{transitional:A,paramsSerializer:U,headers:ae}=d;A!==void 0&&Wm.assertOptions(A,{silentJSONParsing:nd.transitional(nd.boolean),forcedJSONParsing:nd.transitional(nd.boolean),clarifyTimeoutError:nd.transitional(nd.boolean)},!1),U!=null&&(Bn.isFunction(U)?d.paramsSerializer={serialize:U}:Wm.assertOptions(U,{encode:nd.function,serialize:nd.function},!0)),d.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?d.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:d.allowAbsoluteUrls=!0),Wm.assertOptions(d,{baseUrl:nd.spelling("baseURL"),withXsrfToken:nd.spelling("withXSRFToken")},!0),d.method=(d.method||this.defaults.method||"get").toLowerCase();let O=ae&&Bn.merge(ae.common,ae[d.method]);ae&&Bn.forEach(["delete","get","head","post","put","patch","common"],v=>{delete ae[v]}),d.headers=$c.concat(O,ae);const E=[];let t=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(d)===!1||(t=t&&v.synchronous,E.unshift(v.fulfilled,v.rejected))});const x=[];this.interceptors.response.forEach(function(v){x.push(v.fulfilled,v.rejected)});let u,e=0,b;if(!t){const v=[Rx.bind(this),void 0];for(v.unshift.apply(v,E),v.push.apply(v,x),b=v.length,u=Promise.resolve(d);e<b;)u=u.then(v[e++],v[e++]);return u}b=E.length;let f=d;for(e=0;e<b;){const v=E[e++],h=E[e++];try{f=v(f)}catch(r){h.call(this,r);break}}try{u=Rx.call(this,f)}catch(v){return Promise.reject(v)}for(e=0,b=x.length;e<b;)u=u.then(x[e++],x[e++]);return u}getUri(a){a=xh(this.defaults,a);const d=Ax(a.baseURL,a.url,a.allowAbsoluteUrls);return yx(d,a.params,a.paramsSerializer)}};Bn.forEach(["delete","get","head","options"],function(a){_h.prototype[a]=function(d,A){return this.request(xh(A||{},{method:a,url:d,data:(A||{}).data}))}}),Bn.forEach(["post","put","patch"],function(a){function d(A){return function(U,ae,O){return this.request(xh(O||{},{method:a,headers:A?{"Content-Type":"multipart/form-data"}:{},url:U,data:ae}))}}_h.prototype[a]=d(),_h.prototype[a+"Form"]=d(!0)});let Jk=class H4{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let A;this.promise=new Promise(function(ae){A=ae});const U=this;this.promise.then(ae=>{if(!U._listeners)return;let O=U._listeners.length;for(;O-- >0;)U._listeners[O](ae);U._listeners=null}),this.promise.then=ae=>{let O;const E=new Promise(t=>{U.subscribe(t),O=t}).then(ae);return E.cancel=function(){U.unsubscribe(O)},E},d(function(ae,O,E){U.reason||(U.reason=new hp(ae,O,E),A(U.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const A=this._listeners.indexOf(d);A!==-1&&this._listeners.splice(A,1)}toAbortSignal(){const d=new AbortController,A=U=>{d.abort(U)};return this.subscribe(A),d.signal.unsubscribe=()=>this.unsubscribe(A),d.signal}static source(){let d;return{token:new H4(function(A){d=A}),cancel:d}}};function $k(a){return function(d){return a.apply(null,d)}}function Zk(a){return Bn.isObject(a)&&a.isAxiosError===!0}const Xy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xy).forEach(([a,d])=>{Xy[d]=a});function Fx(a){const d=new _h(a),A=rx(_h.prototype.request,d);return Bn.extend(A,_h.prototype,d,{allOwnKeys:!0}),Bn.extend(A,d,null,{allOwnKeys:!0}),A.create=function(U){return Fx(xh(a,U))},A}const bs=Fx(sf);bs.Axios=_h,bs.CanceledError=hp,bs.CancelToken=Jk,bs.isCancel=wx,bs.VERSION=Dx,bs.toFormData=Fm,bs.AxiosError=ci,bs.Cancel=bs.CanceledError,bs.all=function(a){return Promise.all(a)},bs.spread=$k,bs.isAxiosError=Zk,bs.mergeConfig=xh,bs.AxiosHeaders=$c,bs.formToJSON=a=>xx(Bn.isHTMLForm(a)?new FormData(a):a),bs.getAdapter=Nx.getAdapter,bs.HttpStatusCode=Xy,bs.default=bs;const{Axios:ppe,AxiosError:fpe,CanceledError:mpe,isCancel:gpe,CancelToken:ype,VERSION:vpe,all:bpe,Cancel:xpe,isAxiosError:_pe,spread:wpe,toFormData:kpe,AxiosHeaders:Tpe,HttpStatusCode:Spe,formToJSON:Ape,getAdapter:Epe,mergeConfig:Cpe}=bs;function Yk(a){return a.reduce((d,A,U)=>(d[A]=U,d),{})}const Qk=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let Ky=null;function eT(){return Ky||(Ky=Yk(Qk)),Ky}const tT={class:"volumetric-section-container"},rT={key:0,class:"volumetric-section-container__title"},nT={class:"volumetric-section-container__switch"},aT={class:"volumetric-section-container__attack-direction"},iT={class:"volumetric-section-container__field"},oT={__name:"GSC-VolumetricField",props:{game:{type:Object,default:()=>({gameId:90209,id:90209,seasonId:1943,regularSeasonId:1933,matchday_name:"Playoffs 6",status:1,score:[2,0],game_status:1,dateTimeUTC:"2025-05-26T00:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2.png",team_id:2,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2.png",colloquial_name:"América",acronym:"AME",team_name:"America"},is_live:0,minutes:{home_goals_minutes:["L. Garcia 65'","A. Vega 82'"],visiting_goals_minutes:[],home_yellow_cards_minutes:["L. Garcia 90'","A. Vega 90 + 3'"],away_yellow_cards_minutes:["S. Caceres 78'"],home_red_cards_minutes:[],away_red_cards_minutes:[]}})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2},areTeamsVisible:{type:Boolean,default:!0},isTitleVisible:{type:Boolean,default:!0},isGhostEffect:{type:Boolean,default:!1},preMatchType:{type:Number,default:0}},setup(a){const d=eT(),A=new Set([2,20,308,310]),U=new Set([3,21,309]),ae=new Set([...A,...U]);let O=null;const E=a,t=g.ref(0),x=g.ref(new Map),u=g.ref({teamId:0}),e=g.computed(()=>[{teamId:E.game.homeTeam.team_id,text:E.game.homeTeam.colloquial_name,img:E.game.homeTeam.logo,isHomeTeam:!0},{teamId:E.game.awayTeam.team_id,text:E.game.awayTeam.colloquial_name,img:E.game.awayTeam.logo,isHomeTeam:!1}]),b=g.computed(()=>x.value.get(E.isGamePreMatch?E.teamSelectedPreMatch.teamId:u.value.teamId)||[]);g.watch(()=>e.value,()=>{f()},{immediate:!0}),g.watch(()=>E.preMatchType,()=>{f()},{immediate:!0}),g.watch(()=>E.game.gameId,p=>{p&&(l(),h())},{immediate:!0});function f(){t.value=0,u.value=E.preMatchType?E.preMatchType===1?e.value[0]:e.value[1]:e.value[t.value]}function v(){O=setInterval(()=>{h()},1e3*60*E.volumetricFieldIntervalMinutes)}async function h(p=!1){try{const m=await n();x.value.set(E.game.homeTeam.team_id,m.homeTeam),x.value.set(E.game.awayTeam.team_id,m.awayTeam),p&&v()}catch(m){throw new Error(m)}}function r(p){return E.game.game_status===4&&!E.game.is_live?p[d.gameId]!==E.game.gameId:p[d.gameId]===E.game.gameId}async function n(p=0){try{let m={homeTeam:[],awayTeam:[]};if(E.game.is_live||E.game.game_status===0){const w=await bs.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${E.game.gameId}`),T=w.data?w.data.data||[]:[],k=new Set;T.forEach(M=>{k.add(M[d.categoryId]),M[d.teamId]===E.game.homeTeam.team_id&&ae.has(M[d.categoryId])&&r(M)?(c(M),m.homeTeam.push(M)):M[d.teamId]===E.game.awayTeam.team_id&&ae.has(M[d.categoryId])&&r(M)&&(M[d.coordinate1Y]=1-M[d.coordinate1Y],M[d.coordinate2Y]=1-M[d.coordinate2Y],M[d.coordinate3Y]=1-M[d.coordinate3Y],M[d.coordinate1X]=1-M[d.coordinate1X],M[d.coordinate2X]=1-M[d.coordinate2X],M[d.coordinate3X]=1-M[d.coordinate3X],c(M),m.awayTeam.push(M))})}else{const[w,T]=await Promise.all([bs.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${p||E.game.seasonId}-${E.game.homeTeam.team_id}.json`,{headers:{Authorization:E.token||""}}),bs.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${p||E.game.seasonId}-${E.game.awayTeam.team_id}.json`,{headers:{Authorization:E.token||""}})]);if(!w.data.data.posession.length&&!T.data.data.posession.length&&!p)return n(E.game.regularSeasonId);m={homeTeam:w.data.data.posession.filter(k=>k[d.teamId]===E.game.homeTeam.team_id&&ae.has(k[d.categoryId])&&r(k)),awayTeam:T.data.data.posession.filter(k=>k[d.teamId]===E.game.awayTeam.team_id&&ae.has(k[d.categoryId])&&r(k)?(k[d.coordinate1Y]=1-k[d.coordinate1Y],k[d.coordinate2Y]=1-k[d.coordinate2Y],k[d.coordinate3Y]=1-k[d.coordinate3Y],k[d.coordinate1X]=1-k[d.coordinate1X],k[d.coordinate2X]=1-k[d.coordinate2X],k[d.coordinate3X]=1-k[d.coordinate3X],!0):!1)}}return m}catch(m){throw new Error(m)}}function c(p){const m=p[d.coordinate1X],w=p[d.coordinate2X],T=p[d.coordinate3X];return p[d.coordinate1X]=p[d.coordinate1Y],p[d.coordinate2X]=p[d.coordinate2Y],p[d.coordinate3X]=p[d.coordinate3Y],p[d.coordinate1Y]=m,p[d.coordinate2Y]=w,p[d.coordinate3Y]=T,p}function o(p){t.value=p.index,u.value=p.button}function l(){O&&clearInterval(O)}return g.onUnmounted(()=>{l()}),(p,m)=>(g.openBlock(),g.createElementBlock("div",tT,[a.isTitleVisible?(g.openBlock(),g.createElementBlock("div",rT,"Volumétrica")):g.createCommentVNode("",!0),g.withDirectives(g.createElementVNode("div",nT,[g.createVNode(d6,{"selected-button-index":t.value,buttons:e.value,width:"320px","border-radius":"16px",onChange:o},null,8,["selected-button-index","buttons"])],512),[[g.vShow,!a.isGamePreMatch&&a.areTeamsVisible]]),g.createElementVNode("div",aT,[g.createVNode(_6,{team:a.isGamePreMatch?a.teamSelectedPreMatch:u.value},null,8,["team"])]),g.createElementVNode("div",iT,[g.createVNode(b6,{"passes-plays":b.value,"play-indexes":g.unref(d),"is-ghost-effect":a.isGhostEffect},null,8,["passes-plays","play-indexes","is-ghost-effect"])])]))}},Vx=zm(oT,[["__scopeId","data-v-342cdb73"]]);function Bx(a,d){return function(){return a.apply(d,arguments)}}const{toString:sT}=Object.prototype,{getPrototypeOf:Jy}=Object,{iterator:Hm,toStringTag:Ux}=Symbol,Gm=(a=>d=>{const A=sT.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Iu=a=>(a=a.toLowerCase(),d=>Gm(d)===a),Xm=a=>d=>typeof d===a,{isArray:pp}=Array,cf=Xm("undefined");function lT(a){return a!==null&&!cf(a)&&a.constructor!==null&&!cf(a.constructor)&&Zc(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const jx=Iu("ArrayBuffer");function cT(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&jx(a.buffer),d}const uT=Xm("string"),Zc=Xm("function"),qx=Xm("number"),Km=a=>a!==null&&typeof a=="object",dT=a=>a===!0||a===!1,Jm=a=>{if(Gm(a)!=="object")return!1;const d=Jy(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(Ux in a)&&!(Hm in a)},hT=Iu("Date"),pT=Iu("File"),fT=Iu("Blob"),mT=Iu("FileList"),gT=a=>Km(a)&&Zc(a.pipe),yT=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||Zc(a.append)&&((d=Gm(a))==="formdata"||d==="object"&&Zc(a.toString)&&a.toString()==="[object FormData]"))},vT=Iu("URLSearchParams"),[bT,xT,_T,wT]=["ReadableStream","Request","Response","Headers"].map(Iu),kT=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uf(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),pp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function Wx(a,d){d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const wh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hx=a=>!cf(a)&&a!==wh;function $y(){const{caseless:a}=Hx(this)&&this||{},d={},A=(U,ae)=>{const O=a&&Wx(d,ae)||ae;Jm(d[O])&&Jm(U)?d[O]=$y(d[O],U):Jm(U)?d[O]=$y({},U):pp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&uf(arguments[U],A);return d}const TT=(a,d,A,{allOwnKeys:U}={})=>(uf(d,(ae,O)=>{A&&Zc(ae)?a[O]=Bx(ae,A):a[O]=ae},{allOwnKeys:U}),a),ST=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),AT=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},ET=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&Jy(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},CT=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},MT=a=>{if(!a)return null;if(pp(a))return a;let d=a.length;if(!qx(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},PT=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&Jy(Uint8Array)),LT=(a,d)=>{const A=(a&&a[Hm]).call(a);let U;for(;(U=A.next())&&!U.done;){const ae=U.value;d.call(a,ae[0],ae[1])}},zT=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},OT=Iu("HTMLFormElement"),NT=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,A,U){return A.toUpperCase()+U}),Gx=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),RT=Iu("RegExp"),Xx=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};uf(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},DT=a=>{Xx(a,(d,A)=>{if(Zc(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(Zc(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},IT=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return pp(a)?U(a):U(String(a).split(d)),A},FT=()=>{},VT=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function BT(a){return!!(a&&Zc(a.append)&&a[Ux]==="FormData"&&a[Hm])}const UT=a=>{const d=new Array(10),A=(U,ae)=>{if(Km(U)){if(d.indexOf(U)>=0)return;if(!("toJSON"in U)){d[ae]=U;const O=pp(U)?[]:{};return uf(U,(E,t)=>{const x=A(E,ae+1);!cf(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},jT=Iu("AsyncFunction"),qT=a=>a&&(Km(a)||Zc(a))&&Zc(a.then)&&Zc(a.catch),Kx=((a,d)=>a?setImmediate:d?((A,U)=>(wh.addEventListener("message",({source:ae,data:O})=>{ae===wh&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),wh.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",Zc(wh.postMessage)),WT=typeof queueMicrotask<"u"?queueMicrotask.bind(wh):typeof process<"u"&&process.nextTick||Kx,HT=a=>a!=null&&Zc(a[Hm]),Un={isArray:pp,isArrayBuffer:jx,isBuffer:lT,isFormData:yT,isArrayBufferView:cT,isString:uT,isNumber:qx,isBoolean:dT,isObject:Km,isPlainObject:Jm,isReadableStream:bT,isRequest:xT,isResponse:_T,isHeaders:wT,isUndefined:cf,isDate:hT,isFile:pT,isBlob:fT,isRegExp:RT,isFunction:Zc,isStream:gT,isURLSearchParams:vT,isTypedArray:PT,isFileList:mT,forEach:uf,merge:$y,extend:TT,trim:kT,stripBOM:ST,inherits:AT,toFlatObject:ET,kindOf:Gm,kindOfTest:Iu,endsWith:CT,toArray:MT,forEachEntry:LT,matchAll:zT,isHTMLForm:OT,hasOwnProperty:Gx,hasOwnProp:Gx,reduceDescriptors:Xx,freezeMethods:DT,toObjectSet:IT,toCamelCase:NT,noop:FT,toFiniteNumber:VT,findKey:Wx,global:wh,isContextDefined:Hx,isSpecCompliantForm:BT,toJSONObject:UT,isAsyncFn:jT,isThenable:qT,setImmediate:Kx,asap:WT,isIterable:HT};function ui(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}Un.inherits(ui,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:Un.toJSONObject(this.config),code:this.code,status:this.status}}});const Jx=ui.prototype,$x={};["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(a=>{$x[a]={value:a}}),Object.defineProperties(ui,$x),Object.defineProperty(Jx,"isAxiosError",{value:!0}),ui.from=(a,d,A,U,ae,O)=>{const E=Object.create(Jx);return Un.toFlatObject(a,E,function(t){return t!==Error.prototype},t=>t!=="isAxiosError"),ui.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const GT=null;function Zy(a){return Un.isPlainObject(a)||Un.isArray(a)}function Zx(a){return Un.endsWith(a,"[]")?a.slice(0,-2):a}function Yx(a,d,A){return a?a.concat(d).map(function(U,ae){return U=Zx(U),!A&&ae?"["+U+"]":U}).join(A?".":""):d}function XT(a){return Un.isArray(a)&&!a.some(Zy)}const KT=Un.toFlatObject(Un,{},null,function(a){return/^is[A-Z]/.test(a)});function $m(a,d,A){if(!Un.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=Un.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,h){return!Un.isUndefined(h[v])});const U=A.metaTokens,ae=A.visitor||u,O=A.dots,E=A.indexes,t=(A.Blob||typeof Blob<"u"&&Blob)&&Un.isSpecCompliantForm(d);if(!Un.isFunction(ae))throw new TypeError("visitor must be a function");function x(v){if(v===null)return"";if(Un.isDate(v))return v.toISOString();if(Un.isBoolean(v))return v.toString();if(!t&&Un.isBlob(v))throw new ui("Blob is not supported. Use a Buffer instead.");return Un.isArrayBuffer(v)||Un.isTypedArray(v)?t&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,h,r){let n=v;if(v&&!r&&typeof v=="object"){if(Un.endsWith(h,"{}"))h=U?h:h.slice(0,-2),v=JSON.stringify(v);else if(Un.isArray(v)&&XT(v)||(Un.isFileList(v)||Un.endsWith(h,"[]"))&&(n=Un.toArray(v)))return h=Zx(h),n.forEach(function(c,o){!(Un.isUndefined(c)||c===null)&&d.append(E===!0?Yx([h],o,O):E===null?h:h+"[]",x(c))}),!1}return Zy(v)?!0:(d.append(Yx(r,h,O),x(v)),!1)}const e=[],b=Object.assign(KT,{defaultVisitor:u,convertValue:x,isVisitable:Zy});function f(v,h){if(!Un.isUndefined(v)){if(e.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));e.push(v),Un.forEach(v,function(r,n){(!(Un.isUndefined(r)||r===null)&&ae.call(d,r,Un.isString(n)?n.trim():n,h,b))===!0&&f(r,h?h.concat(n):[n])}),e.pop()}}if(!Un.isObject(a))throw new TypeError("data must be an object");return f(a),d}function Qx(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(A){return d[A]})}function Yy(a,d){this._pairs=[],a&&$m(a,this,d)}const e2=Yy.prototype;e2.append=function(a,d){this._pairs.push([a,d])},e2.toString=function(a){const d=a?function(A){return a.call(this,A,Qx)}:Qx;return this._pairs.map(function(A){return d(A[0])+"="+d(A[1])},"").join("&")};function JT(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function t2(a,d,A){if(!d)return a;const U=A&&A.encode||JT;Un.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=Un.isURLSearchParams(d)?d.toString():new Yy(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}let r2=class{constructor(){this.handlers=[]}use(a,d,A){return this.handlers.push({fulfilled:a,rejected:d,synchronous:A?A.synchronous:!1,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){Un.forEach(this.handlers,function(d){d!==null&&a(d)})}};const n2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$T=typeof URLSearchParams<"u"?URLSearchParams:Yy,ZT=typeof FormData<"u"?FormData:null,YT=typeof Blob<"u"?Blob:null,QT={isBrowser:!0,classes:{URLSearchParams:$T,FormData:ZT,Blob:YT},protocols:["http","https","file","blob","url","data"]},Qy=typeof window<"u"&&typeof document<"u",e1=typeof navigator=="object"&&navigator||void 0,e8=Qy&&(!e1||["ReactNative","NativeScript","NS"].indexOf(e1.product)<0),t8=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",r8=Qy&&window.location.href||"http://localhost",n8=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qy,hasStandardBrowserEnv:e8,hasStandardBrowserWebWorkerEnv:t8,navigator:e1,origin:r8},Symbol.toStringTag,{value:"Module"})),wc={...n8,...QT};function a8(a,d){return $m(a,new wc.classes.URLSearchParams,Object.assign({visitor:function(A,U,ae,O){return wc.isNode&&Un.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)}},d))}function i8(a){return Un.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function o8(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function a2(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&Un.isArray(ae)?ae.length:E,x?(Un.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!Un.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&Un.isArray(ae[E])&&(ae[E]=o8(ae[E])),!t)}if(Un.isFormData(a)&&Un.isFunction(a.entries)){const A={};return Un.forEachEntry(a,(U,ae)=>{d(i8(U),ae,A,0)}),A}return null}function s8(a,d,A){if(Un.isString(a))try{return(d||JSON.parse)(a),Un.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const df={transitional:n2,adapter:["xhr","http","fetch"],transformRequest:[function(a,d){const A=d.getContentType()||"",U=A.indexOf("application/json")>-1,ae=Un.isObject(a);if(ae&&Un.isHTMLForm(a)&&(a=new FormData(a)),Un.isFormData(a))return U?JSON.stringify(a2(a)):a;if(Un.isArrayBuffer(a)||Un.isBuffer(a)||Un.isStream(a)||Un.isFile(a)||Un.isBlob(a)||Un.isReadableStream(a))return a;if(Un.isArrayBufferView(a))return a.buffer;if(Un.isURLSearchParams(a))return d.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let O;if(ae){if(A.indexOf("application/x-www-form-urlencoded")>-1)return a8(a,this.formSerializer).toString();if((O=Un.isFileList(a))||A.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return $m(O?{"files[]":a}:a,E&&new E,this.formSerializer)}}return ae||U?(d.setContentType("application/json",!1),s8(a)):a}],transformResponse:[function(a){const d=this.transitional||df.transitional,A=d&&d.forcedJSONParsing,U=this.responseType==="json";if(Un.isResponse(a)||Un.isReadableStream(a))return a;if(a&&Un.isString(a)&&(A&&!this.responseType||U)){const ae=!(d&&d.silentJSONParsing)&&U;try{return JSON.parse(a)}catch(O){if(ae)throw O.name==="SyntaxError"?ui.from(O,ui.ERR_BAD_RESPONSE,this,null,this.response):O}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wc.classes.FormData,Blob:wc.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Un.forEach(["delete","get","head","post","put","patch"],a=>{df.headers[a]={}});const l8=Un.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"]),c8=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4036
|
-
`).forEach(function(O){ae=O.indexOf(":"),A=O.substring(0,ae).trim().toLowerCase(),U=O.substring(ae+1).trim(),!(!A||d[A]&&l8[A])&&(A==="set-cookie"?d[A]?d[A].push(U):d[A]=[U]:d[A]=d[A]?d[A]+", "+U:U)}),d},
|
|
4037
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...d){const A=new this(a);return d.forEach(U=>A.set(U)),A}static accessor(a){const d=(this[i2]=this[i2]={accessors:{}}).accessors,A=this.prototype;function U(ae){const O=hf(ae);d[O]||(p8(A,ae),d[O]=!0)}return Un.isArray(a)?a.forEach(U):U(a),this}};Yc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Un.reduceDescriptors(Yc.prototype,({value:a},d)=>{let A=d[0].toUpperCase()+d.slice(1);return{get:()=>a,set(U){this[A]=U}}}),Un.freezeMethods(Yc);function r1(a,d){const A=this||df,U=d||A,ae=Yc.from(U.headers);let O=U.data;return Un.forEach(a,function(E){O=E.call(A,O,ae.normalize(),d?d.status:void 0)}),ae.normalize(),O}function o2(a){return!!(a&&a.__CANCEL__)}function fp(a,d,A){ui.call(this,a??"canceled",ui.ERR_CANCELED,d,A),this.name="CanceledError"}Un.inherits(fp,ui,{__CANCEL__:!0});function s2(a,d,A){const U=A.config.validateStatus;!A.status||!U||U(A.status)?a(A):d(new ui("Request failed with status code "+A.status,[ui.ERR_BAD_REQUEST,ui.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A))}function f8(a){const d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return d&&d[1]||""}function m8(a,d){a=a||10;const A=new Array(a),U=new Array(a);let ae=0,O=0,E;return d=d!==void 0?d:1e3,function(t){const x=Date.now(),u=U[O];E||(E=x),A[ae]=t,U[ae]=x;let e=O,b=0;for(;e!==ae;)b+=A[e++],e=e%a;if(ae=(ae+1)%a,ae===O&&(O=(O+1)%a),x-E<d)return;const f=u&&x-u;return f?Math.round(b*1e3/f):void 0}}function g8(a,d){let A=0,U=1e3/d,ae,O;const E=(t,x=Date.now())=>{A=x,ae=null,O&&(clearTimeout(O),O=null),a.apply(null,t)};return[(...t)=>{const x=Date.now(),u=x-A;u>=U?E(t,x):(ae=t,O||(O=setTimeout(()=>{O=null,E(ae)},U-u)))},()=>ae&&E(ae)]}const Ym=(a,d,A=3)=>{let U=0;const ae=m8(50,250);return g8(O=>{const E=O.loaded,t=O.lengthComputable?O.total:void 0,x=E-U,u=ae(x),e=E<=t;U=E;const b={loaded:E,total:t,progress:t?E/t:void 0,bytes:x,rate:u||void 0,estimated:u&&t&&e?(t-E)/u:void 0,event:O,lengthComputable:t!=null,[d?"download":"upload"]:!0};a(b)},A)},l2=(a,d)=>{const A=a!=null;return[U=>d[0]({lengthComputable:A,total:a,loaded:U}),d[1]]},c2=a=>(...d)=>Un.asap(()=>a(...d)),y8=wc.hasStandardBrowserEnv?((a,d)=>A=>(A=new URL(A,wc.origin),a.protocol===A.protocol&&a.host===A.host&&(d||a.port===A.port)))(new URL(wc.origin),wc.navigator&&/(msie|trident)/i.test(wc.navigator.userAgent)):()=>!0,v8=wc.hasStandardBrowserEnv?{write(a,d,A,U,ae,O){const E=[a+"="+encodeURIComponent(d)];Un.isNumber(A)&&E.push("expires="+new Date(A).toGMTString()),Un.isString(U)&&E.push("path="+U),Un.isString(ae)&&E.push("domain="+ae),O===!0&&E.push("secure"),document.cookie=E.join("; ")},read(a){const d=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function b8(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function x8(a,d){return d?a.replace(/\/?\/$/,"")+"/"+d.replace(/^\/+/,""):a}function u2(a,d,A){let U=!b8(d);return a&&(U||A==!1)?x8(a,d):d}const d2=a=>a instanceof Yc?{...a}:a;function kh(a,d){d=d||{};const A={};function U(u,e,b,f){return Un.isPlainObject(u)&&Un.isPlainObject(e)?Un.merge.call({caseless:f},u,e):Un.isPlainObject(e)?Un.merge({},e):Un.isArray(e)?e.slice():e}function ae(u,e,b,f){if(Un.isUndefined(e)){if(!Un.isUndefined(u))return U(void 0,u,b,f)}else return U(u,e,b,f)}function O(u,e){if(!Un.isUndefined(e))return U(void 0,e)}function E(u,e){if(Un.isUndefined(e)){if(!Un.isUndefined(u))return U(void 0,u)}else return U(void 0,e)}function t(u,e,b){if(b in d)return U(u,e);if(b in a)return U(void 0,u)}const x={url:O,method:O,data:O,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:t,headers:(u,e,b)=>ae(d2(u),d2(e),b,!0)};return Un.forEach(Object.keys(Object.assign({},a,d)),function(u){const e=x[u]||ae,b=e(a[u],d[u],u);Un.isUndefined(b)&&e!==t||(A[u]=b)}),A}const h2=a=>{const d=kh({},a);let{data:A,withXSRFToken:U,xsrfHeaderName:ae,xsrfCookieName:O,headers:E,auth:t}=d;d.headers=E=Yc.from(E),d.url=t2(u2(d.baseURL,d.url,d.allowAbsoluteUrls),a.params,a.paramsSerializer),t&&E.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):"")));let x;if(Un.isFormData(A)){if(wc.hasStandardBrowserEnv||wc.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if((x=E.getContentType())!==!1){const[u,...e]=x?x.split(";").map(b=>b.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...e].join("; "))}}if(wc.hasStandardBrowserEnv&&(U&&Un.isFunction(U)&&(U=U(d)),U||U!==!1&&y8(d.url))){const u=ae&&O&&v8.read(O);u&&E.set(ae,u)}return d},_8=typeof XMLHttpRequest<"u",w8=_8&&function(a){return new Promise(function(d,A){const U=h2(a);let ae=U.data;const O=Yc.from(U.headers).normalize();let{responseType:E,onUploadProgress:t,onDownloadProgress:x}=U,u,e,b,f,v;function h(){f&&f(),v&&v(),U.cancelToken&&U.cancelToken.unsubscribe(u),U.signal&&U.signal.removeEventListener("abort",u)}let r=new XMLHttpRequest;r.open(U.method.toUpperCase(),U.url,!0),r.timeout=U.timeout;function n(){if(!r)return;const o=Yc.from("getAllResponseHeaders"in r&&r.getAllResponseHeaders()),l={data:!E||E==="text"||E==="json"?r.responseText:r.response,status:r.status,statusText:r.statusText,headers:o,config:a,request:r};s2(function(p){d(p),h()},function(p){A(p),h()},l),r=null}"onloadend"in r?r.onloadend=n:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(n)},r.onabort=function(){r&&(A(new ui("Request aborted",ui.ECONNABORTED,a,r)),r=null)},r.onerror=function(){A(new ui("Network Error",ui.ERR_NETWORK,a,r)),r=null},r.ontimeout=function(){let o=U.timeout?"timeout of "+U.timeout+"ms exceeded":"timeout exceeded";const l=U.transitional||n2;U.timeoutErrorMessage&&(o=U.timeoutErrorMessage),A(new ui(o,l.clarifyTimeoutError?ui.ETIMEDOUT:ui.ECONNABORTED,a,r)),r=null},ae===void 0&&O.setContentType(null),"setRequestHeader"in r&&Un.forEach(O.toJSON(),function(o,l){r.setRequestHeader(l,o)}),Un.isUndefined(U.withCredentials)||(r.withCredentials=!!U.withCredentials),E&&E!=="json"&&(r.responseType=U.responseType),x&&([b,v]=Ym(x,!0),r.addEventListener("progress",b)),t&&r.upload&&([e,f]=Ym(t),r.upload.addEventListener("progress",e),r.upload.addEventListener("loadend",f)),(U.cancelToken||U.signal)&&(u=o=>{r&&(A(!o||o.type?new fp(null,a,r):o),r.abort(),r=null)},U.cancelToken&&U.cancelToken.subscribe(u),U.signal&&(U.signal.aborted?u():U.signal.addEventListener("abort",u)));const c=f8(U.url);if(c&&wc.protocols.indexOf(c)===-1){A(new ui("Unsupported protocol "+c+":",ui.ERR_BAD_REQUEST,a));return}r.send(ae||null)})},k8=(a,d)=>{const{length:A}=a=a?a.filter(Boolean):[];if(d||A){let U=new AbortController,ae;const O=function(u){if(!ae){ae=!0,t();const e=u instanceof Error?u:this.reason;U.abort(e instanceof ui?e:new fp(e instanceof Error?e.message:e))}};let E=d&&setTimeout(()=>{E=null,O(new ui(`timeout ${d} of ms exceeded`,ui.ETIMEDOUT))},d);const t=()=>{a&&(E&&clearTimeout(E),E=null,a.forEach(u=>{u.unsubscribe?u.unsubscribe(O):u.removeEventListener("abort",O)}),a=null)};a.forEach(u=>u.addEventListener("abort",O));const{signal:x}=U;return x.unsubscribe=()=>Un.asap(t),x}},T8=function*(a,d){let A=a.byteLength;if(A<d){yield a;return}let U=0,ae;for(;U<A;)ae=U+d,yield a.slice(U,ae),U=ae},S8=async function*(a,d){for await(const A of A8(a))yield*T8(A,d)},A8=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const d=a.getReader();try{for(;;){const{done:A,value:U}=await d.read();if(A)break;yield U}}finally{await d.cancel()}},p2=(a,d,A,U)=>{const ae=S8(a,d);let O=0,E,t=x=>{E||(E=!0,U&&U(x))};return new ReadableStream({async pull(x){try{const{done:u,value:e}=await ae.next();if(u){t(),x.close();return}let b=e.byteLength;if(A){let f=O+=b;A(f)}x.enqueue(new Uint8Array(e))}catch(u){throw t(u),u}},cancel(x){return t(x),ae.return()}},{highWaterMark:2})},Qm=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",f2=Qm&&typeof ReadableStream=="function",E8=Qm&&(typeof TextEncoder=="function"?(a=>d=>a.encode(d))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),m2=(a,...d)=>{try{return!!a(...d)}catch{return!1}},C8=f2&&m2(()=>{let a=!1;const d=new Request(wc.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!d}),g2=64*1024,n1=f2&&m2(()=>Un.isReadableStream(new Response("").body)),e0={stream:n1&&(a=>a.body)};Qm&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!e0[d]&&(e0[d]=Un.isFunction(a[d])?A=>A[d]():(A,U)=>{throw new ui(`Response type '${d}' is not supported`,ui.ERR_NOT_SUPPORT,U)})})})(new Response);const M8=async a=>{if(a==null)return 0;if(Un.isBlob(a))return a.size;if(Un.isSpecCompliantForm(a))return(await new Request(wc.origin,{method:"POST",body:a}).arrayBuffer()).byteLength;if(Un.isArrayBufferView(a)||Un.isArrayBuffer(a))return a.byteLength;if(Un.isURLSearchParams(a)&&(a=a+""),Un.isString(a))return(await E8(a)).byteLength},P8=async(a,d)=>Un.toFiniteNumber(a.getContentLength())??M8(d),L8=Qm&&(async a=>{let{url:d,method:A,data:U,signal:ae,cancelToken:O,timeout:E,onDownloadProgress:t,onUploadProgress:x,responseType:u,headers:e,withCredentials:b="same-origin",fetchOptions:f}=h2(a);u=u?(u+"").toLowerCase():"text";let v=k8([ae,O&&O.toAbortSignal()],E),h;const r=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let n;try{if(x&&C8&&A!=="get"&&A!=="head"&&(n=await P8(e,U))!==0){let m=new Request(d,{method:"POST",body:U,duplex:"half"}),w;if(Un.isFormData(U)&&(w=m.headers.get("content-type"))&&e.setContentType(w),m.body){const[T,k]=l2(n,Ym(c2(x)));U=p2(m.body,g2,T,k)}}Un.isString(b)||(b=b?"include":"omit");const c="credentials"in Request.prototype;h=new Request(d,{...f,signal:v,method:A.toUpperCase(),headers:e.normalize().toJSON(),body:U,duplex:"half",credentials:c?b:void 0});let o=await fetch(h,f);const l=n1&&(u==="stream"||u==="response");if(n1&&(t||l&&r)){const m={};["status","statusText","headers"].forEach(M=>{m[M]=o[M]});const w=Un.toFiniteNumber(o.headers.get("content-length")),[T,k]=t&&l2(w,Ym(c2(t),!0))||[];o=new Response(p2(o.body,g2,T,()=>{k&&k(),r&&r()}),m)}u=u||"text";let p=await e0[Un.findKey(e0,u)||"text"](o,a);return!l&&r&&r(),await new Promise((m,w)=>{s2(m,w,{data:p,headers:Yc.from(o.headers),status:o.status,statusText:o.statusText,config:a,request:h})})}catch(c){throw r&&r(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new ui("Network Error",ui.ERR_NETWORK,a,h),{cause:c.cause||c}):ui.from(c,c&&c.code,a,h)}}),a1={http:GT,xhr:w8,fetch:L8};Un.forEach(a1,(a,d)=>{if(a){try{Object.defineProperty(a,"name",{value:d})}catch{}Object.defineProperty(a,"adapterName",{value:d})}});const y2=a=>`- ${a}`,z8=a=>Un.isFunction(a)||a===null||a===!1,v2={getAdapter:a=>{a=Un.isArray(a)?a:[a];const{length:d}=a;let A,U;const ae={};for(let O=0;O<d;O++){A=a[O];let E;if(U=A,!z8(A)&&(U=a1[(E=String(A)).toLowerCase()],U===void 0))throw new ui(`Unknown adapter '${E}'`);if(U)break;ae[E||"#"+O]=U}if(!U){const O=Object.entries(ae).map(([t,x])=>`adapter ${t} `+(x===!1?"is not supported by the environment":"is not available in the build"));let E=d?O.length>1?`since :
|
|
4038
|
-
`+O.map(
|
|
4039
|
-
`):" "+
|
|
4040
|
-
`+ae):A.stack=ae}catch{}}throw A}}_request(a,d){typeof a=="string"?(d=d||{},d.url=a):d=a||{},d=kh(this.defaults,d);const{transitional:A,paramsSerializer:U,headers:ae}=d;A!==void 0&&r0.assertOptions(A,{silentJSONParsing:ad.transitional(ad.boolean),forcedJSONParsing:ad.transitional(ad.boolean),clarifyTimeoutError:ad.transitional(ad.boolean)},!1),U!=null&&(Un.isFunction(U)?d.paramsSerializer={serialize:U}:r0.assertOptions(U,{encode:ad.function,serialize:ad.function},!0)),d.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?d.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:d.allowAbsoluteUrls=!0),r0.assertOptions(d,{baseUrl:ad.spelling("baseURL"),withXsrfToken:ad.spelling("withXSRFToken")},!0),d.method=(d.method||this.defaults.method||"get").toLowerCase();let O=ae&&Un.merge(ae.common,ae[d.method]);ae&&Un.forEach(["delete","get","head","post","put","patch","common"],v=>{delete ae[v]}),d.headers=Yc.concat(O,ae);const E=[];let t=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(d)===!1||(t=t&&v.synchronous,E.unshift(v.fulfilled,v.rejected))});const x=[];this.interceptors.response.forEach(function(v){x.push(v.fulfilled,v.rejected)});let u,e=0,b;if(!t){const v=[b2.bind(this),void 0];for(v.unshift.apply(v,E),v.push.apply(v,x),b=v.length,u=Promise.resolve(d);e<b;)u=u.then(v[e++],v[e++]);return u}b=E.length;let f=d;for(e=0;e<b;){const v=E[e++],h=E[e++];try{f=v(f)}catch(r){h.call(this,r);break}}try{u=b2.call(this,f)}catch(v){return Promise.reject(v)}for(e=0,b=x.length;e<b;)u=u.then(x[e++],x[e++]);return u}getUri(a){a=kh(this.defaults,a);const d=u2(a.baseURL,a.url,a.allowAbsoluteUrls);return t2(d,a.params,a.paramsSerializer)}};Un.forEach(["delete","get","head","options"],function(a){Th.prototype[a]=function(d,A){return this.request(kh(A||{},{method:a,url:d,data:(A||{}).data}))}}),Un.forEach(["post","put","patch"],function(a){function d(A){return function(U,ae,O){return this.request(kh(O||{},{method:a,headers:A?{"Content-Type":"multipart/form-data"}:{},url:U,data:ae}))}}Th.prototype[a]=d(),Th.prototype[a+"Form"]=d(!0)});let N8=class G4{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let A;this.promise=new Promise(function(ae){A=ae});const U=this;this.promise.then(ae=>{if(!U._listeners)return;let O=U._listeners.length;for(;O-- >0;)U._listeners[O](ae);U._listeners=null}),this.promise.then=ae=>{let O;const E=new Promise(t=>{U.subscribe(t),O=t}).then(ae);return E.cancel=function(){U.unsubscribe(O)},E},d(function(ae,O,E){U.reason||(U.reason=new fp(ae,O,E),A(U.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const A=this._listeners.indexOf(d);A!==-1&&this._listeners.splice(A,1)}toAbortSignal(){const d=new AbortController,A=U=>{d.abort(U)};return this.subscribe(A),d.signal.unsubscribe=()=>this.unsubscribe(A),d.signal}static source(){let d;return{token:new G4(function(A){d=A}),cancel:d}}};function R8(a){return function(d){return a.apply(null,d)}}function D8(a){return Un.isObject(a)&&a.isAxiosError===!0}const o1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(o1).forEach(([a,d])=>{o1[d]=a});function w2(a){const d=new Th(a),A=Bx(Th.prototype.request,d);return Un.extend(A,Th.prototype,d,{allOwnKeys:!0}),Un.extend(A,d,null,{allOwnKeys:!0}),A.create=function(U){return w2(kh(a,U))},A}const Lo=w2(df);Lo.Axios=Th,Lo.CanceledError=fp,Lo.CancelToken=N8,Lo.isCancel=o2,Lo.VERSION=x2,Lo.toFormData=$m,Lo.AxiosError=ui,Lo.Cancel=Lo.CanceledError,Lo.all=function(a){return Promise.all(a)},Lo.spread=R8,Lo.isAxiosError=D8,Lo.mergeConfig=kh,Lo.AxiosHeaders=Yc,Lo.formToJSON=a=>a2(Un.isHTMLForm(a)?new FormData(a):a),Lo.getAdapter=v2.getAdapter,Lo.HttpStatusCode=o1,Lo.default=Lo;const{Axios:Mpe,AxiosError:Ppe,CanceledError:Lpe,isCancel:zpe,CancelToken:Ope,VERSION:Npe,all:Rpe,Cancel:Dpe,isAxiosError:Ipe,spread:Fpe,toFormData:Vpe,AxiosHeaders:Bpe,HttpStatusCode:Upe,formToJSON:jpe,getAdapter:qpe,mergeConfig:Wpe}=Lo,I8={computed:{sizeTabsFontMP(){const a=this.elementSize.width;return a<=380?"12px":a<=768?"14px":"16px"},sizeTabsFontMS(){const a=this.elementSize.width;return a<=600?"12px":a<=768?"13px":"14px"},sizeTabsMS(){const a=this.elementSize.width;return a<=480?"145px":a<=600?"153px":a<=620?"163px":a<=640?"170px":a<=660?"175px":a<=680?"180px":a<=700?"185px":a<=720?"195px":"200px"},sizeTabsMP(){const a=this.elementSize.width;return a<=319?"68px":a<=330?"73px":a<=340?"78px":a<=350?"82px":a<=360||a<=370?"90px":a<=390?"95px":a<=410?"105px":a<=430?"110px":a<=450?"117px":a<=470?"122px":a<=500?"130px":a<=530?"138px":a<=560?"155px":a<=590?"163px":a<=620?"175px":a<=650?"180px":a<=680?"195px":a<=730?"210px":a<=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 a=this.elementSize.width;return a<=960?this.$style.comdescubreVideos960:a<=1232?this.$style.comdescubreVideos1232:this.$style.comdescubreVideos},comquitarFiltrosClass(){const a=this.elementSize.width;return a<=380?this.$style.comquitarFiltros380:a<=480?this.$style.comquitarFiltros480:a<=730?this.$style.comquitarFiltros730:this.$style.comquitarFiltros},commejoresJugadoresClass(){const a=this.elementSize.width;return a<=480?this.$style.commejoresJugadores480:a<=730?this.$style.commejoresJugadores730:this.$style.commejoresJugadores},menuSectionClass(){return this.elementSize.width<=960?this.$style.commenuSection960:this.$style.commenuSection},topFiltersClass(){const a=this.elementSize.width;return a<=420?this.$style.comtopFilters420:a<=460?this.$style.comtopFilters460:a<=1232?this.$style.comtopFilters1232:this.$style.comtopFilters},toniKroosWrapperClass(){const a=this.elementSize.width;return a<=319?this.$style.comtoniKroosWrapper320:a<=420?this.$style.comtoniKroosWrapper420:a<=916?this.$style.comtoniKroosWrapper760:a<=975?this.$style.comtoniKroosWrapper975:a<=1079?this.$style.comtoniKroosWrapper1080:this.$style.comtoniKroosWrapper},containerTablesClass(){const a=this.elementSize.width;return a<=319?this.$style.comcontainerTables320:a<=916?this.$style.comcontainerTables760:a<=1079?this.$style.comcontainerTables960:this.$style.comcontainerTables},containerTheBestClass(){const a=this.elementSize.width;return a<=319?this.$style.comcontainerTheBest320:a<=960?this.$style.comcontainerTheBest960:a<=1232?this.$style.comcontainerTheBest1232:this.$style.comcontainerTheBest},menuSectionHeaderClass(){const a=this.elementSize.width;return a<=730?this.$style.commenuSectionHeader730:a<=960?this.$style.commenuSectionHeader960:a<=1232?this.$style.commenuSectionHeader1232:this.$style.commenuSectionHeader},losMejoresClass(){const a=this.elementSize.width;return a<=380?this.$style.comlosMejores380:a<=530?this.$style.comlosMejores530:a<=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 a=this.elementSize.width;return a<=430?this.$style.commenuSectionParentHeader430:a<=730?this.$style.commenuSectionParentHeader730:a<=960?this.$style.commenuSectionParentHeader960:a<=1232?this.$style.commenuSectionParentHeader1232:this.$style.commenuSectionParentHeader},templateLosMejoresClass(){const a=this.elementSize.width;return a<=319?this.$style.comtemplateLosMejores1320:a<=350?this.$style.comtemplateLosMejores1350:a<=420?this.$style.comtemplateLosMejores1420:a<=540?this.$style.comtemplateLosMejores1540:a<=960?this.$style.comtemplateLosMejores1960:a<=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 a=this.elementSize.width;return a<=319?this.$style.comcontainerSection320:a<=350?this.$style.comcontainerSection350:a<=960?this.$style.comcontainerSection960:a<=1232?this.$style.comcontainerSection1232:this.$style.comcontainerSection},filtersContainerClass(){const a=this.elementSize.width;return a<=420?this.$style.comfiltersContainer420:a<=760?this.$style.comfiltersContainer760:a<=1232?this.$style.comfiltersContainer1232:this.$style.comfiltersContainer},topFiltersParentClass(){const a=this.elementSize.width;return a<=420?this.$style.comtopFiltersParent420:a<=460?this.$style.comtopFiltersParent460:a<=1232?this.$style.comtopFiltersParent1232:this.$style.comtopFiltersParent}}};function pf(a){const d=g.ref({width:0,height:0});function A(){const U=a.value.getBoundingClientRect();d.value.width=U.width,d.value.height=U.height}return g.onMounted(()=>{A(),window.addEventListener("resize",A)}),g.onUnmounted(()=>{window.removeEventListener("resize",A)}),{elementSize:d}}const Wd=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},s1={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,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(a){this.status=a}}},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(a){this.$emit("click",a),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},k2=()=>{g.useCssVars(a=>({b4c0768e:a.height,59532894:a.borderWidthBtn,b334c7d0:a.borderType,"2559be45":a.borderColor,c2a48c20:a.borderRadius,"37b93ff4":a.width,d4c6b0fa:a.backgroundColor,"3ed79642":a.cursorType,"07333802":a.fontSize,"418e7460":a.fontStyle,"1ec091b6":a.fontFamily,"0ae4c74a":a.marginLeftStat,"4b1ae176":a.fontSizeStat}))},T2=s1.setup;s1.setup=T2?(a,d)=>(k2(),T2(a,d)):k2;const F8=["src"],V8={key:1,class:"text"},B8={class:"stats"},U8={class:"numstats"},j8={class:"leyend"};function q8(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["button",ae.status&&A.typeOnOff&&"button-active"]),style:g.normalizeStyle([O.customStyle,ae.status&&A.typeOnOff&&O.customActive]),onClick:d[0]||(d[0]=(...E)=>O.btnClick&&O.btnClick(...E))},[a.icon&&A.iconPosition.toLowerCase()==="left"?(g.openBlock(),g.createElementBlock("img",{key:0,class:g.normalizeClass(A.mini?"icon-txt":"icon"),style:g.normalizeStyle({width:A.iconSize}),src:a.icon},null,14,F8)):g.createCommentVNode("",!0),A.textValue?(g.openBlock(),g.createElementBlock("div",V8,g.toDisplayString(A.textValue),1)):g.createCommentVNode("",!0)],6)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...E)=>O.btnClick&&O.btnClick(...E))},[g.createElementVNode("div",B8,[g.createElementVNode("div",U8,g.toDisplayString(A.textStat),1)]),g.createElementVNode("div",j8,g.toDisplayString(A.textCategory),1)])):g.createCommentVNode("",!0)])}const W8=Wd(s1,[["render",q8],["__scopeId","data-v-458feef3"]]),H8="_tablePositionGames_1rp43_91",G8="_tablePositionWrapperGames_1rp43_123",X8="_imgHenrryIcon_1rp43_141",K8="_americaIcon_1rp43_157",J8="_playerPhotoGames_1rp43_181",$8="_toniKroosGames_1rp43_199",Z8="_shapeIcon_1rp43_221",Y8="_menuiconsTeams_1rp43_233",Q8="_component31_1rp43_251",eS="_playerNameGames_1rp43_273",tS="_icnPlayIcon_1rp43_289",rS="_goles_1rp43_305",nS="_americaIcon1_1rp43_319",aS="_teamsAmerica_1rp43_347",iS="_containerData_1rp43_359",oS="_shapeIcon1_1rp43_375",sS="_icnExpand1_1rp43_387",lS="_icnExpand_1rp43_387",cS="_playerDataGames_1rp43_427",uS="_playerInfoGames_1rp43_449",dS="_headerTopGame_1rp43_479",hS="_playerRow_1rp43_507",pS="_groupsLeague_1rp43_529",fS="_text_1rp43_547",mS="_btnViewFullList_1rp43_563",gS="_headerTopsGames_1rp43_597",yS="_btnVideosOptions_1rp43_741",vS="_position_1rp43_1095",bS="_positionWrapper_1rp43_1119",xS="_imgNecaxaIcon_1rp43_1135",_S="_teamLogo_1rp43_1147",wS="_teamPhoto_1rp43_1163",kS="_name_1rp43_1179",TS="_icnPlayIconType1_1rp43_1195",SS="_verVideosType1_1rp43_1209",AS="_btnVideosOptionsType1_1rp43_1221",ES="_btnVideosOptions1Games_1rp43_1245",CS="_leftContainer_1rp43_1269",MS="_shapeIconType1_1rp43_1287",PS="_icnExpandType1_1rp43_1297",LS="_arrowExpand_1rp43_1317",zS="_containerInfoGames_1rp43_1333",OS="_headerTopTeam_1rp43_1357",NS="_containerHeader_1rp43_1385",RS="_goles1_1rp43_1403",DS="_golesType1_1rp43_1409",IS="_golesWrapper_1rp43_1419",FS="_btnViewAll_1rp43_1437",VS="_headerTopsTeams_1rp43_1471",BS="_arrowExpandIcon_1rp43_1705",US="_rotate_1rp43_1715",jS={tablePositionGames:H8,tablePositionWrapperGames:G8,imgHenrryIcon:X8,americaIcon:K8,playerPhotoGames:J8,toniKroosGames:$8,shapeIcon:Z8,menuiconsTeams:Y8,component31:Q8,playerNameGames:eS,icnPlayIcon:tS,goles:rS,americaIcon1:nS,teamsAmerica:aS,containerData:iS,shapeIcon1:oS,icnExpand1:sS,icnExpand:lS,playerDataGames:cS,playerInfoGames:uS,headerTopGame:dS,playerRow:hS,groupsLeague:pS,text:fS,btnViewFullList:mS,headerTopsGames:gS,btnVideosOptions:yS,position:vS,positionWrapper:bS,imgNecaxaIcon:xS,teamLogo:_S,teamPhoto:wS,name:kS,icnPlayIconType1:TS,verVideosType1:SS,btnVideosOptionsType1:AS,btnVideosOptions1Games:ES,leftContainer:CS,shapeIconType1:MS,icnExpandType1:PS,arrowExpand:LS,containerInfoGames:zS,headerTopTeam:OS,containerHeader:NS,goles1:RS,golesType1:DS,golesWrapper:IS,btnViewAll:FS,headerTopsTeams:VS,arrowExpandIcon:BS,rotate:US},l1={components:{GSCButton:W8},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},arrow:{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"},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(a){this.$emit("play",a)},clickMore(a){this.$emit("more",a)},clickExpand(a){this.$emit("expand",{expand:!this.isExpanded,id:a})},clickFav(a){this.$emit("fav",a)},clickEventMedia(a){this.$emit("mediadata",a)}}},S2=()=>{g.useCssVars(a=>({bda6b7e6:a.fontSizeTopNum,f23df320:a.fontFamilyTopNum,"3068284e":a.fontColorTopNum,"9a5a9596":a.opacityColorTopNum,"13f14a73":a.fontColorName,"4dea1eca":a.fontFamilyName,"1eca7fa7":a.fontSizeName,"3b11f736":a.backgroundColorHeader,df81ac86:a.fontFamilyCategory,"4619d41a":a.fontSizeCategory,"620658e6":a.fontColorCategory,"062e5329":a.borderColorCategory}))},A2=l1.setup;l1.setup=A2?(a,d)=>(S2(),A2(a,d)):S2;const qS=["src"],WS=["src"],HS=["src"],GS=["src"],XS=["fill"],KS=["fill"],JS=["src"],$S=["fill"],ZS=["fill"];function YS(a,d,A,U,ae,O){const E=g.resolveComponent("GSCButton");return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.headerTopsGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.playerRow),id:"player-row"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.headerTopGame)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.playerPhotoGames),id:"container-player-photp"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.tablePositionWrapperGames)},[g.createElementVNode("b",{class:g.normalizeClass(a.$style.tablePositionGames)},g.toDisplayString(A.data.top),3)],2),g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgHenrryIcon),alt:"",src:A.data.photo},null,10,qS),g.createElementVNode("img",{class:g.normalizeClass(a.$style.americaIcon),alt:"",src:A.data.logo},null,10,WS)],2),g.createElementVNode("main",{class:g.normalizeClass(a.$style.playerInfoGames),id:"container-player-info"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.playerNameGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.toniKroosGames)},g.toDisplayString(A.data.name),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.playerDataGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerData)},[A.canPlayVideos||A.game.awayTeam.team_id==A.teamWidget&&A.typeData!=1?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[g.createVNode(E,{"icon-size":A.iconSize,"icon-position":A.iconPosition,width:A.buttonWidth,"button-max-width":A.buttonMaxWidth,height:A.buttonHeight,"border-radius":A.buttonRadius,"border-width":A.buttonBorderWidth,"background-color":A.buttonBackground,"font-family":A.buttonfontFamily,"border-color":A.buttonBorderColor,"text-value":A.data.total+" "+A.categoryName.toLowerCase(),"font-size":A.buttonFontSize,onClick:d[0]||(d[0]=t=>O.clickEventMedia(A.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"]),g.createElementVNode("div",{class:g.normalizeClass(a.$style.teamsAmerica)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.americaIcon1),alt:"",src:A.data.logo},null,10,HS)],2)],64)):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createVNode(E,{icon:"","icon-size":A.iconSize,"icon-position":A.iconPosition,width:A.buttonWidth,"button-max-width":A.buttonMaxWidth,height:A.buttonHeight,"border-radius":A.buttonRadius,"border-width":A.buttonBorderWidth,"background-color":A.buttonBackground,"font-family":A.buttonfontFamily,"border-color":A.buttonBorderColor,"text-value":A.data.total+" "+A.categoryName.toLowerCase(),"font-size":A.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"]),g.createElementVNode("div",{class:g.normalizeClass(a.$style.teamsAmerica)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.americaIcon1),alt:"",src:A.data.logo},null,10,GS)],2)],64))],2),A.arrow?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.icnExpand),onClick:d[1]||(d[1]=t=>O.clickExpand(A.data.player_id))},[(g.openBlock(),g.createElementBlock("svg",{class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[g.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:A.colorArrow},null,8,KS)],10,XS))],2)):g.createCommentVNode("",!0)],2)],2)],2)],2)],2)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(a.$style.headerTopsTeams)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerHeader),id:"header-container"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.headerTopTeam)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.teamPhoto),id:"container-team"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.positionWrapper)},[g.createElementVNode("b",{class:g.normalizeClass(a.$style.position)},g.toDisplayString(A.data.top),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.teamLogo)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgNecaxaIcon),alt:"",src:A.data.logo},null,10,JS)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerInfoGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.leftContainer)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.name)},g.toDisplayString(A.data.name_team),3),g.createVNode(E,{"icon-size":A.iconSize,"icon-position":A.iconPosition,width:A.buttonWidth,"button-max-width":A.buttonMaxWidth,height:A.buttonHeight,"border-radius":A.buttonRadius,"border-width":A.buttonBorderWidth,"background-color":A.buttonBackground,"font-family":A.buttonfontFamily,"border-color":A.buttonBorderColor,"text-value":A.data.total+" "+A.categoryName.toLowerCase(),"font-size":A.buttonFontSize,onClick:d[2]||(d[2]=t=>O.clickEventMedia(A.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"]),g.createElementVNode("div",{class:g.normalizeClass(a.$style.btnVideosOptions1Games)},[g.createVNode(E,{"icon-size":A.iconSize,"icon-position":A.iconPosition,width:A.buttonWidth,"button-max-width":A.buttonMaxWidth,height:A.buttonHeight,"border-radius":A.buttonRadius,"border-width":A.buttonBorderWidth,"background-color":A.buttonBackground,"font-family":A.buttonfontFamily,"border-color":A.buttonBorderColor,"text-value":A.data.total+" "+A.categoryName.toLowerCase(),"font-size":A.buttonFontSize,onClick:d[3]||(d[3]=t=>O.clickEventMedia(A.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"]),g.createElementVNode("div",{class:g.normalizeClass(a.$style.verVideosType1)},g.toDisplayString(A.data.total),3)],2)],2),A.arrow?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.arrowExpand),onClick:d[4]||(d[4]=t=>O.clickExpand(A.data.player_id))},[(g.openBlock(),g.createElementBlock("svg",{class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[g.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:A.colorArrow},null,8,ZS)],10,$S))],2)):g.createCommentVNode("",!0)],2)],2)],2)],2)):g.createCommentVNode("",!0)])}const QS={$style:jS},e7=Wd(l1,[["render",YS],["__cssModules",QS]]),t7="_rotate_1xi10_3",r7="_positionContainer_1xi10_50",n7="_positionContainer620_1xi10_57",a7="_rowwPlayerGames_1xi10_64",i7="_rowwPlayer960Games_1xi10_80",o7="_rowwPlayer420Games_1xi10_95",s7="_rowwPlayer460Games_1xi10_111",l7="_containerLeftGames_1xi10_128",c7="_containerLeft420Games_1xi10_136",u7="_containerLeft620Games_1xi10_144",d7="_iconFavoritesType1_1xi10_151",h7="_iconFavoritesType1320_1xi10_159",p7="_iconFavorites_1xi10_151",f7="_iconFavorites420_1xi10_175",m7="_playerContainerGames_1xi10_183",g7="_playerContainer420Games_1xi10_195",y7="_playerContainer460Games_1xi10_207",v7="_playerContainerType1Games_1xi10_219",b7="_playerContainerType1320Games_1xi10_229",x7="_playerContainerType1460Games_1xi10_239",_7="_imgPlayerIcon_1xi10_249",w7="_imgPlayerIcon460_1xi10_259",k7="_imgPlayerIcon420_1xi10_269",T7="_manchesterUnitedGames_1xi10_279",S7="_manchesterUnited360Games_1xi10_290",A7="_manchesterUnited420Games_1xi10_301",E7="_manchesterUnited460Games_1xi10_312",C7="_containerRightGames_1xi10_323",M7="_containerRight960Games_1xi10_332",P7="_containerRight420Games_1xi10_342",L7="_numberOfVideos_1xi10_353",z7="_numberOfVideos620_1xi10_359",O7="_block02Games_1xi10_365",N7="_block02960Games_1xi10_375",R7="_block02620Games_1xi10_384",D7="_block02420Games_1xi10_391",I7="_verVideos_1xi10_399",F7="_verVideos620_1xi10_405",V7="_numberPosition_1xi10_408",B7="_shapeIcon_1xi10_414",U7="_chivasIcon_1xi10_419",j7="_imgTeamIcon_1xi10_430",q7="_teamName_1xi10_435",W7="_nameTeamGames_1xi10_441",H7="_dfC_1xi10_450",G7="_position_1xi10_50",X7="_age_1xi10_460",K7="_manchesterUnitedIcon_1xi10_468",J7="_country_1xi10_475",$7="_playedGames_1xi10_482",Z7="_playedMinutes_1xi10_489",Y7="_block01_1xi10_496",Q7="_leagueName_1xi10_503",e9="_roleCharacterIcon_1xi10_509",t9="_btnVideosGames_1xi10_517",r9="_containerBtnVideosGames_1xi10_532",n9="_containerBtnVideos620Games_1xi10_542",a9="_containesOptions_1xi10_551",i9="_arrowExpandIcon_1xi10_559",o9="_rowTeam_1xi10_568",s9="_rowTeam420_1xi10_586",l9="_rowTeam320_1xi10_604",c9="_rowTeam460_1xi10_623",u9="_rowTeam350_1xi10_642",d9="_containerLeftType1_1xi10_660",h9="_containerLeftType1680_1xi10_666",p9="_containerLeftType1320_1xi10_673",f9="_containerLeftType1350_1xi10_681",m9="_positionContainertype1_1xi10_688",g9="_positionContainertype1380_1xi10_696",y9="_positionContainertype1680_1xi10_704",v9="_positionContainertype1420_1xi10_712",b9="_manchesterUnitedType1_1xi10_720",x9="_manchesterUnitedType1460_1xi10_726",_9="_manchesterUnitedType1320_1xi10_733",w9="_containerRightType1Games_1xi10_740",k9="_containerRightType1420Games_1xi10_751",T9="_containerRightType1320Games_1xi10_762",S9="_teamNameWrapperType1_1xi10_773",A9="_teamNameWrapperType1960_1xi10_780",E9="_teamNameWrapperType11086_1xi10_787",C9="_ageWrapperType1_1xi10_794",M9="_ageWrapperType1680_1xi10_801",P9="_ageWrapperType11086_1xi10_809",L9="_ageType1_1xi10_817",z9="_ageType1960_1xi10_825",O9="_playedGamesWrapperType1_1xi10_828",N9="_playedGamesWrapperType1680_1xi10_835",R9="_playedGamesWrapperType1960_1xi10_838",D9="_playedGamesType1_1xi10_841",I9="_playedGamesType1540_1xi10_848",F9="_playedGamesType1960_1xi10_852",V9="_playedGamesType11086_1xi10_855",B9="_playedMinutesWrapperType1_1xi10_858",U9="_playedMinutesWrapperType11086_1xi10_865",j9="_playedMinutesType1_1xi10_872",q9="_playedMinutesType1680_1xi10_879",W9="_block02Type1Games_1xi10_882",H9="_block02Type1680Games_1xi10_890",G9="_block02Type1320Games_1xi10_898",X9="_block02Type1350Games_1xi10_907",K9="_leagueNameWrapperType1_1xi10_915",J9="_leagueNameWrapperType1680_1xi10_923",$9="_leagueNameWrapperType1960_1xi10_926",Z9="_leagueNameType1_1xi10_934",Y9="_leagueNameType1960_1xi10_944",Q9="_numberOfVideosType1_1xi10_954",eA="_numberOfVideosType1680_1xi10_961",tA="_numberOfVideosType11232_1xi10_968",rA="_vectorIconType1_1xi10_975",nA="_block01TitlesType1_1xi10_992",aA="_numberPositionType1_1xi10_999",iA="_shapeIconType1_1xi10_1005",oA="_tijuanaIconType1_1xi10_1011",sA="_tijuanaWrapperType1_1xi10_1017",lA="_tijuanaWrapperType1NoBg_1xi10_1028",cA="_teamNameType1_1xi10_1036",uA="_roleCharacterIconType1_1xi10_1043",dA="_verVideosType1_1xi10_1050",hA="_btnVideosType1Games_1xi10_1056",pA="_containerBtnVideosType1Games_1xi10_1071",fA="_containesOptionsType1Games_1xi10_1082",mA="_arrowExpandIconType1_1xi10_1091",gA="_templateTablaProductividadType1_1xi10_1097",yA="_verVideosType11232_1xi10_1109",vA="_templateTablaProductividadType1320_1xi10_1113",bA="_verVideosType1680_1xi10_1117",xA={rotate:t7,positionContainer:r7,positionContainer620:n7,rowwPlayerGames:a7,rowwPlayer960Games:i7,rowwPlayer420Games:o7,rowwPlayer460Games:s7,containerLeftGames:l7,containerLeft420Games:c7,containerLeft620Games:u7,iconFavoritesType1:d7,iconFavoritesType1320:h7,iconFavorites:p7,iconFavorites420:f7,playerContainerGames:m7,playerContainer420Games:g7,playerContainer460Games:y7,playerContainerType1Games:v7,playerContainerType1320Games:b7,playerContainerType1460Games:x7,imgPlayerIcon:_7,imgPlayerIcon460:w7,imgPlayerIcon420:k7,manchesterUnitedGames:T7,manchesterUnited360Games:S7,manchesterUnited420Games:A7,manchesterUnited460Games:E7,containerRightGames:C7,containerRight960Games:M7,containerRight420Games:P7,numberOfVideos:L7,numberOfVideos620:z7,block02Games:O7,block02960Games:N7,block02620Games:R7,block02420Games:D7,verVideos:I7,verVideos620:F7,numberPosition:V7,shapeIcon:B7,chivasIcon:U7,imgTeamIcon:j7,teamName:q7,nameTeamGames:W7,dfC:H7,position:G7,age:X7,manchesterUnitedIcon:K7,country:J7,playedGames:$7,playedMinutes:Z7,block01:Y7,leagueName:Q7,roleCharacterIcon:e9,btnVideosGames:t9,containerBtnVideosGames:r9,containerBtnVideos620Games:n9,containesOptions:a9,arrowExpandIcon:i9,rowTeam:o9,rowTeam420:s9,rowTeam320:l9,rowTeam460:c9,rowTeam350:u9,containerLeftType1:d9,containerLeftType1680:h9,containerLeftType1320:p9,containerLeftType1350:f9,positionContainertype1:m9,positionContainertype1380:g9,positionContainertype1680:y9,positionContainertype1420:v9,manchesterUnitedType1:b9,manchesterUnitedType1460:x9,manchesterUnitedType1320:_9,containerRightType1Games:w9,containerRightType1420Games:k9,containerRightType1320Games:T9,teamNameWrapperType1:S9,teamNameWrapperType1960:A9,teamNameWrapperType11086:E9,ageWrapperType1:C9,ageWrapperType1680:M9,ageWrapperType11086:P9,ageType1:L9,ageType1960:z9,playedGamesWrapperType1:O9,playedGamesWrapperType1680:N9,playedGamesWrapperType1960:R9,playedGamesType1:D9,playedGamesType1540:I9,playedGamesType1960:F9,playedGamesType11086:V9,playedMinutesWrapperType1:B9,playedMinutesWrapperType11086:U9,playedMinutesType1:j9,playedMinutesType1680:q9,block02Type1Games:W9,block02Type1680Games:H9,block02Type1320Games:G9,block02Type1350Games:X9,leagueNameWrapperType1:K9,leagueNameWrapperType1680:J9,leagueNameWrapperType1960:$9,leagueNameType1:Z9,leagueNameType1960:Y9,numberOfVideosType1:Q9,numberOfVideosType1680:eA,numberOfVideosType11232:tA,vectorIconType1:rA,block01TitlesType1:nA,numberPositionType1:aA,shapeIconType1:iA,tijuanaIconType1:oA,tijuanaWrapperType1:sA,tijuanaWrapperType1NoBg:lA,teamNameType1:cA,roleCharacterIconType1:uA,verVideosType1:dA,btnVideosType1Games:hA,containerBtnVideosType1Games:pA,containesOptionsType1Games:fA,arrowExpandIconType1:mA,templateTablaProductividadType1:gA,verVideosType11232:yA,templateTablaProductividadType1320:vA,verVideosType1680:bA},c1={components:{},computed:{manchesterUnitedType1Class(){const a=this.elementSize.width;return a<=320?this.$style.manchesterUnitedType1320:a<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const a=this.elementSize.width;return a<=320?this.$style.containerRightType1320Games:a<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const a=this.elementSize.width;return a<=960?this.$style.teamNameWrapperType1960:a<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const a=this.elementSize.width;return a<=680?this.$style.ageWrapperType1680:a<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const a=this.elementSize.width;return a<=680?this.$style.playedGamesWrapperType1680:a<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const a=this.elementSize.width;return a<=540?this.$style.playedGamesType1540:a<=960?this.$style.playedGamesType1960:a<=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 a=this.elementSize.width;return a<=320?this.$style.block02Type1320Games:a<=350?this.$style.block02Type1350Games:a<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const a=this.elementSize.width;return a<=680?this.$style.leagueNameWrapperType1680:a<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const a=this.elementSize.width;return a<=680?this.$style.numberOfVideosType1680:a<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const a=this.elementSize.width;return a<=320?this.$style.containerLeftType1320:a<=350?this.$style.containerLeftType1350:a<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const a=this.elementSize.width;return a<=380?this.$style.positionContainertype1380:a<=420?this.$style.positionContainertype1420:a<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const a=this.elementSize.width;return a<=320?this.$style.rowTeam320:a<=350?this.$style.rowTeam350:a<=420?this.$style.rowTeam420:a<=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 a=this.elementSize.width;return a<=420?this.$style.block02420Games:a<=620?this.$style.block02620Games:a<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const a=this.elementSize.width;return a<=420?this.$style.imgPlayerIcon420:a<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const a=this.elementSize.width;return a<=360?this.$style.manchesterUnited360Games:a<=420?this.$style.manchesterUnited420Games:a<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const a=this.elementSize.width;return a<=420?this.$style.containerRight420Games:a<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const a=this.elementSize.width;return a<=320?this.$style.playerContainerType1320Games:a<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const a=this.elementSize.width;return a<=420?this.$style.playerContainer420Games:a<=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 a=this.elementSize.width;return a<=420?this.$style.containerLeft420Games:a<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const a=this.elementSize.width;return a<=420?this.$style.rowwPlayer420Games:a<=460?this.$style.rowwPlayer460Games:a<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const a=g.ref("myDivRef2"),{elementSize:d}=pf(a);return{myDivRef2:a,elementSize:d}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},arrow:{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"},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(a){this.$emit("expand",{expand:!this.isExpanded,id:a})},emitEventMedia(a){this.$emit("mediadata",a)}}},E2=()=>{g.useCssVars(a=>({"287acbb5":a.height,"2c02ce88":a.background,"3f686ffe":a.fontSize,a672c1f4:a.fontColor,"1f323fbe":a.fontFamily}))},C2=c1.setup;c1.setup=C2?(a,d)=>(E2(),C2(a,d)):E2;const _A={ref:"myDivRef2",style:{"border-left":"rgba(13, 29, 41, 0.7) 1px solid","border-right":"rgba(13, 29, 41, 0.7) 1px solid"}},wA=["src"],kA=["src"],TA=["fill"],SA=["fill"],AA=["src"],EA=["fill"],CA=["fill"],MA=["src"],PA=["src"],LA=["src"],zA=["fill"],OA=["fill"];function NA(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",_A,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.rowwPlayerClass),id:"container-row-player"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftClass),id:"container-left"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionContainerClass)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.numberPosition)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(O.playerContainerClass)},[g.createElementVNode("img",{class:g.normalizeClass(O.imgPlayerIconClass),src:A.data.player_photo},null,10,wA),g.createElementVNode("div",{class:g.normalizeClass(O.manchesterUnitedClass)},[U.elementSize.width<=420?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[g.createTextVNode(g.toDisplayString(A.data.player_short),1)],64)):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createTextVNode(g.toDisplayString(A.data.player_name),1)],64))],2)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightClass),id:"container-right"},[g.createElementVNode("div",{class:g.normalizeClass(O.block02Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptions)},[g.createElementVNode("div",{class:g.normalizeClass(O.containerBtnVideosClass)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgTeamIcon),alt:"",src:A.data.team_logo},null,10,kA),g.createElementVNode("div",{class:g.normalizeClass(O.numberOfVideosClass)},g.toDisplayString(A.data.total),3)],2)],2),A.arrow?(g.openBlock(),g.createElementBlock("svg",{key:0,class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:d[0]||(d[0]=E=>O.clickExpand(A.data.id))},[g.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:A.colorArrow},null,8,SA)],10,TA)):g.createCommentVNode("",!0)],2)],2)],2)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(O.rowTeamClass),style:g.normalizeStyle(U.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftType1Class),id:"container-left"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionContainertype1Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.numberPositionType1)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(O.playerContainerType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(O.manchesterUnitedType1Class)},g.toDisplayString(A.data.team_abrev),3)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightType1Class),id:"container-right"},[g.createElementVNode("div",{class:g.normalizeClass(O.block02Type1Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptionsType1Games)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerBtnVideosType1Games)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgTeamIcon),alt:"",src:A.data.team_logo},null,10,AA),g.createElementVNode("div",{class:g.normalizeClass(O.numberOfVideosType1Class)},g.toDisplayString(A.data.total),3)],2)],2),A.arrow?(g.openBlock(),g.createElementBlock("svg",{key:0,class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:d[1]||(d[1]=E=>O.clickExpand(A.data.id))},[g.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:A.colorArrow},null,8,CA)],10,EA)):g.createCommentVNode("",!0)],2)],2)],6)):g.createCommentVNode("",!0),A.type==2?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(O.rowwPlayerClass),id:"container-row-player"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftClass),id:"container-left"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionContainerClass)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.numberPosition)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(O.playerContainerClass)},[g.createElementVNode("img",{class:g.normalizeClass(O.imgPlayerIconClass),src:A.data.player_photo},null,10,MA),g.createElementVNode("div",{class:g.normalizeClass(O.manchesterUnitedClass)},g.toDisplayString(A.data.player_name),3),U.elementSize.width<=420?(g.openBlock(),g.createElementBlock("img",{key:0,class:g.normalizeClass(a.$style.chivasIcon),alt:"",src:A.data.team_logo},null,10,PA)):g.createCommentVNode("",!0)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightClass),id:"container-right"},[g.createElementVNode("div",{class:g.normalizeClass(O.block02Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptions)},[g.createElementVNode("div",{class:g.normalizeClass(O.containerBtnVideosClass)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgTeamIcon),alt:"",src:A.data.team_logo},null,10,LA),g.createElementVNode("div",{class:g.normalizeClass(O.numberOfVideosClass)},g.toDisplayString(A.data.total),3)],2)],2),(g.openBlock(),g.createElementBlock("svg",{class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:d[2]||(d[2]=E=>O.clickExpand(A.data.id))},[g.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:A.colorArrow},null,8,OA)],10,zA))],2)],2)],2)):g.createCommentVNode("",!0)],512)}const RA={$style:xA},DA=Wd(c1,[["render",NA],["__cssModules",RA]]),IA="_containerLeftTitles_82svp_119",FA="_containerLeftTitles420_82svp_135",VA="_containerLeftTitles620_82svp_151",BA="_containerLeftTitlesTeam_82svp_169",UA="_containerLeftTitlesTeam1180_82svp_185",jA="_containerLeftTitlesTeam1090_82svp_201",qA="_containerLeftTitlesTeam960_82svp_217",WA="_containerLeftTitlesTeam860_82svp_233",HA="_containerLeftTitlesTeam768_82svp_249",GA="_containerLeftTitlesTeam680_82svp_265",XA="_containerLeftTitlesTeam620_82svp_281",KA="_containerLeftTitlesTeam420_82svp_297",JA="_headTitlesAvanced_82svp_315",$A="_headTitlesAvanced960_82svp_345",ZA="_headTitlesAvanced420_82svp_375",YA="_headTitlesAvanced540_82svp_415",QA="_headTitlesAvanced460_82svp_445",eE="_headTitlesAvanced620_82svp_475",tE="_position_82svp_505",rE="_position420_82svp_523",nE="_player_82svp_529",aE="_player420_82svp_551",iE="_containerRightTypeAvanced1_82svp_559",oE="_containerRightTitlesAdvanced_82svp_573",sE="_containerRightTitlesAdvanced960_82svp_591",lE="_block02Titles_82svp_609",cE="_block02Titles620_82svp_625",uE="_mon1Scouting_82svp_633",dE="_mon1Scouting960_82svp_653",hE="_mon1_82svp_633",pE="_mon1420_82svp_689",fE="_mon1620_82svp_709",mE="_icnIcon_82svp_729",gE="_icnIcon960_82svp_739",yE="_icnIcon420_82svp_751",vE="_teamTitle_82svp_759",bE="_positionTitle_82svp_779",xE="_ageTitle_82svp_795",_E="_partidos_82svp_811",wE="_playedGamesTitle_82svp_819",kE="_playedMinutesTitle_82svp_839",TE="_block01Titles_82svp_857",SE="_mon_82svp_633",AE="_containesOptionsTitles_82svp_889",EE="_templateTablaProductividadType1_82svp_903",CE="_templateTablaProductividadType1400_82svp_927",ME="_headTitlesType1_82svp_955",PE="_headTitlesType1420_82svp_981",LE="_headTitlesType1400_82svp_1013",zE="_headTitlesType1540_82svp_1045",OE="_headTitlesType1460_82svp_1073",NE="_headTitlesType1680_82svp_1101",RE="_headTitlesType1350_82svp_1127",DE="_positionType1_82svp_1157",IE="_positionType1400_82svp_1175",FE="_teamType1_82svp_1195",VE="_teamType1400_82svp_1213",BE="_frecuenciaType1_82svp_1233",UE="_frecuenciaType1540_82svp_1249",jE="_containerLeftTitlesType1_82svp_1267",qE="_frecuenciaWrapperType1_82svp_1283",WE="_frecuenciaWrapperType1680_82svp_1301",HE="_promedioPartidoType1_82svp_1317",GE="_promedioEstePartidoType1_82svp_1325",XE="_promedioEstePartidoType1960_82svp_1341",KE="_promedioEstePartidoWrapperType1_82svp_1349",JE="_promedioEstePartidoWrapperType11200_82svp_1365",$E="_promedioEstePartidoWrapperType11090_82svp_1383",ZE="_promedioEstePartidoWrapperType11086_82svp_1403",YE="_promedioPartidosType1_82svp_1421",QE="_promedioPartidosWrapperType1_82svp_1435",eC="_promedioPartidosWrapperType1960_82svp_1451",tC="_promedioPartidosWrapperType11086_82svp_1457",rC="_partidosJugadosType1_82svp_1463",nC="_partidosJugadosType1960_82svp_1475",aC="_partidosJugadosWrapperType1_82svp_1489",iC="_partidosJugadosWrapperType11200_82svp_1505",oC="_partidosJugadosWrapperType11180_82svp_1521",sC="_partidosJugadosWrapperType11170_82svp_1537",lC="_partidosJugadosWrapperType11140_82svp_1553",cC="_partidosJugadosWrapperType11086_82svp_1569",uC="_partidosJugadosWrapperType1960_82svp_1585",dC="_partidosJugadosWrapperType1880_82svp_1601",hC="_partidosJugadosWrapperType1860_82svp_1617",pC="_partidosJugadosWrapperType1830_82svp_1633",fC="_partidosJugadosWrapperType1790_82svp_1649",mC="_partidosJugadosWrapperType1930_82svp_1665",gC="_partidosJugadosWrapperType1770_82svp_1681",yC="_block01TitlesType1_82svp_1687",vC="_monType1_82svp_1703",bC="_monType1960_82svp_1721",xC="_monType1680_82svp_1741",_C="_videosType1_82svp_1747",wC="_videosType1680_82svp_1767",kC="_videosType1600_82svp_1785",TC="_videosType1540_82svp_1803",SC="_videosType1420_82svp_1821",AC="_videosType1400_82svp_1839",EC="_containesOptionsTitlesType1_82svp_1863",CC="_containesOptionsTitlesType1768_82svp_1879",MC="_containesOptionsTitlesType1730_82svp_1893",PC="_containesOptionsTitlesType1690_82svp_1907",LC="_icnIconType1_82svp_1921",zC="_icnIconType1420_82svp_1933",OC="_icnIconType1400_82svp_1947",NC="_block02TitlesType1_82svp_1955",RC="_block02TitlesType1680_82svp_1969",DC="_block02TitlesType1350_82svp_1983",IC="_containerRightTitlesType1_82svp_1997",FC="_containerRightTitlesType1420_82svp_2015",VC={containerLeftTitles:IA,containerLeftTitles420:FA,containerLeftTitles620:VA,containerLeftTitlesTeam:BA,containerLeftTitlesTeam1180:UA,containerLeftTitlesTeam1090:jA,containerLeftTitlesTeam960:qA,containerLeftTitlesTeam860:WA,containerLeftTitlesTeam768:HA,containerLeftTitlesTeam680:GA,containerLeftTitlesTeam620:XA,containerLeftTitlesTeam420:KA,headTitlesAvanced:JA,headTitlesAvanced960:$A,headTitlesAvanced420:ZA,headTitlesAvanced540:YA,headTitlesAvanced460:QA,headTitlesAvanced620:eE,position:tE,position420:rE,player:nE,player420:aE,containerRightTypeAvanced1:iE,containerRightTitlesAdvanced:oE,containerRightTitlesAdvanced960:sE,block02Titles:lE,block02Titles620:cE,mon1Scouting:uE,mon1Scouting960:dE,mon1:hE,mon1420:pE,mon1620:fE,icnIcon:mE,icnIcon960:gE,icnIcon420:yE,teamTitle:vE,positionTitle:bE,ageTitle:xE,partidos:_E,playedGamesTitle:wE,playedMinutesTitle:kE,block01Titles:TE,mon:SE,containesOptionsTitles:AE,templateTablaProductividadType1:EE,templateTablaProductividadType1400:CE,headTitlesType1:ME,headTitlesType1420:PE,headTitlesType1400:LE,headTitlesType1540:zE,headTitlesType1460:OE,headTitlesType1680:NE,headTitlesType1350:RE,positionType1:DE,positionType1400:IE,teamType1:FE,teamType1400:VE,frecuenciaType1:BE,frecuenciaType1540:UE,containerLeftTitlesType1:jE,frecuenciaWrapperType1:qE,frecuenciaWrapperType1680:WE,promedioPartidoType1:HE,promedioEstePartidoType1:GE,promedioEstePartidoType1960:XE,promedioEstePartidoWrapperType1:KE,promedioEstePartidoWrapperType11200:JE,promedioEstePartidoWrapperType11090:$E,promedioEstePartidoWrapperType11086:ZE,promedioPartidosType1:YE,promedioPartidosWrapperType1:QE,promedioPartidosWrapperType1960:eC,promedioPartidosWrapperType11086:tC,partidosJugadosType1:rC,partidosJugadosType1960:nC,partidosJugadosWrapperType1:aC,partidosJugadosWrapperType11200:iC,partidosJugadosWrapperType11180:oC,partidosJugadosWrapperType11170:sC,partidosJugadosWrapperType11140:lC,partidosJugadosWrapperType11086:cC,partidosJugadosWrapperType1960:uC,partidosJugadosWrapperType1880:dC,partidosJugadosWrapperType1860:hC,partidosJugadosWrapperType1830:pC,partidosJugadosWrapperType1790:fC,partidosJugadosWrapperType1930:mC,partidosJugadosWrapperType1770:gC,block01TitlesType1:yC,monType1:vC,monType1960:bC,monType1680:xC,videosType1:_C,videosType1680:wC,videosType1600:kC,videosType1540:TC,videosType1420:SC,videosType1400:AC,containesOptionsTitlesType1:EC,containesOptionsTitlesType1768:CC,containesOptionsTitlesType1730:MC,containesOptionsTitlesType1690:PC,icnIconType1:LC,icnIconType1420:zC,icnIconType1400:OC,block02TitlesType1:NC,block02TitlesType1680:RC,block02TitlesType1350:DC,containerRightTitlesType1:IC,containerRightTitlesType1420:FC},u1={components:{},computed:{icnIconType1Class(){const a=this.elementSize.width;return a<=400?this.$style.icnIconType1400:a<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const a=this.elementSize.width;return a<=400?this.$style.videosType1400:a<=420?this.$style.videosType1420:a<=540?this.$style.videosType1540:a<=600?this.$style.videosType1600:a<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const a=this.elementSize.width;return a<=680?this.$style.monType1680:a<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const a=this.elementSize.width;return a<=350?this.$style.block02TitlesType1350:a<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const a=this.elementSize.width;return a<=400?this.$style.containesOptionsTitlesType1400:a<=690?this.$style.containesOptionsTitlesType1690:a<=730?this.$style.containesOptionsTitlesType1730:a<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const a=this.elementSize.width;return a<=770?this.$style.promedioPartidosWrapperType1770:a<=790?this.$style.partidosJugadosWrapperType1790:a<=830?this.$style.partidosJugadosWrapperType1830:a<=860?this.$style.partidosJugadosWrapperType1860:a<=880?this.$style.partidosJugadosWrapperType1880:a<=930?this.$style.partidosJugadosWrapperType1930:a<=960?this.$style.partidosJugadosWrapperType1960:a<=1086?this.$style.partidosJugadosWrapperType11086:a<=1140?this.$style.partidosJugadosWrapperType11140:a<=1170?this.$style.partidosJugadosWrapperType11170:a<=1180?this.$style.partidosJugadosWrapperType11180:a<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const a=this.elementSize.width;return a<=960?this.$style.promedioPartidosWrapperType1960:a<=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 a=this.elementSize.width;return a<=350?this.$style.headTitlesType1350:a<=400?this.$style.headTitlesType1400:a<=420?this.$style.headTitlesType1420:a<=460?this.$style.headTitlesType1460:a<=540?this.$style.headTitlesType1540:a<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const a=this.elementSize.width;return a<=420?this.$style.headTitlesAvanced420:a<=460?this.$style.headTitlesAvanced460:a<=540?this.$style.headTitlesAvanced540:a<=620?this.$style.headTitlesAvanced620:a<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const a=this.elementSize.width;return a<=420?this.$style.containerLeftTitles420:a<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const a=this.elementSize.width;return a<=420?this.$style.containerLeftTitlesTeam420:a<=620?this.$style.containerLeftTitlesTeam620:a<=680?this.$style.containerLeftTitlesTeam680:a<=768?this.$style.containerLeftTitlesTeam768:a<=860?this.$style.containerLeftTitlesTeam860:a<=960?this.$style.containerLeftTitlesTeam960:a<=1090?this.$style.containerLeftTitlesTeam1090:a<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const a=this.elementSize.width;return a<=420?this.$style.icnIcon420:a<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const a=this.elementSize.width;return a<=420?this.$style.mon1420:a<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const a=this.elementSize.width;return a<=420?this.$style.mon1420:a<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const a=this.elementSize.width;return a<=1086?this.$style.promedioEstePartidoWrapperType11086:a<=1090?this.$style.promedioEstePartidoWrapperType11090:a<=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 a=g.ref("myDivRef"),{elementSize:d}=pf(a);return{myDivRef:a,elementSize:d}},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:{}},M2=()=>{g.useCssVars(a=>({"32aec1ca":a.background,"4e54a87a":a.height,"448b848c":a.fontSize,"4c061c38":a.fontColor,"3917092f":a.fontFamily,"4a286e80":a.heightTeam}))},P2=u1.setup;u1.setup=P2?(a,d)=>(M2(),P2(a,d)):M2;const BC={ref:"myDivRef"};function UC(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",BC,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.headTitlesClassAvanced),id:"container-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftTitlesClass),id:"container-left-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionClass)},"Pos.",2),g.createElementVNode("div",{class:g.normalizeClass(O.playerClass)},"Jugador",2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightTitlesClassAdvanced),id:"container-right-titles"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.block01Titles)},[U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.teamTitle)},"Equipo",2)):g.createCommentVNode("",!0),U.elementSize.width>730?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(a.$style.positionTitle)},"Posición",2)):g.createCommentVNode("",!0),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(a.$style.ageTitle)},"edad",2)):g.createCommentVNode("",!0),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:3,class:g.normalizeClass(a.$style.ageTitle)},"País",2)):g.createCommentVNode("",!0),U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:4,class:g.normalizeClass(a.$style.playedGamesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Partidos",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Jugados",2)],2)):g.createCommentVNode("",!0),U.elementSize.width>635?(g.openBlock(),g.createElementBlock("div",{key:5,class:g.normalizeClass(a.$style.playedMinutesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Minutos",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Jugados",2)],2)):g.createCommentVNode("",!0)],2),g.createElementVNode("div",{class:g.normalizeClass(O.block02TitlesClass)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptionsTitles)},[U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.mon)},"Total",2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(O.mon1Class)},"Videos",2)],2)],2)],2)],2)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(O.templateTablaProductividadType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(O.headTitlesType1Class),id:"container-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftTitlesClassTeam),id:"container-left-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionType1Class)},"Pos.",2),g.createElementVNode("div",{class:g.normalizeClass(O.teamType1Class)},"Equipo",2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightType1ClassAvanced)},[g.createElementVNode("div",{class:g.normalizeClass(O.frecuenciaWrapperType1Class)},[U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.frecuenciaType1Class)},"Frecuencia",2)):g.createCommentVNode("",!0)],2),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.promedioEstePartidoWrapperType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(O.promedioEstePartidoType1Class)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.promedioPartidoType1)},"Promedio partido",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):g.createCommentVNode("",!0),U.elementSize.width>1086?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(O.promedioPartidosWrapperType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.promedioPartidosType1)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.promedioPartidoType1)},d[0]||(d[0]=[g.createTextVNode("Promedio partido"),g.createElementVNode("br",null,null,-1),g.createTextVNode("Torneo anterior")]),2)],2)],2)):g.createCommentVNode("",!0),U.elementSize.width>770?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(O.partidosJugadosWrapperType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.partidosJugadosType1)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.promedioPartidoType1)},d[1]||(d[1]=[g.createTextVNode("Partidos "),g.createElementVNode("br",null,null,-1),g.createTextVNode("Jugados")]),2)],2)],2)):g.createCommentVNode("",!0)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containesOptionsTitlesType1Class)},[U.elementSize.width>680?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.monType1Class)},"total",2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(O.videosType1Class)},"Videos",2)],2)],2)],2)):g.createCommentVNode("",!0),A.type==2?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(O.headTitlesClassAvanced),id:"container-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftTitlesClass),id:"container-left-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionClass)},"Pos.",2),g.createElementVNode("div",{class:g.normalizeClass(O.playerClass)},"Jugador",2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightTitlesClassAdvanced),id:"container-right-titles"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.block01Titles)},[U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.teamTitle)},"Equipo",2)):g.createCommentVNode("",!0),U.elementSize.width>730?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(a.$style.positionTitle)},"Posición",2)):g.createCommentVNode("",!0),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(a.$style.ageTitle)},"edad",2)):g.createCommentVNode("",!0),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:3,class:g.normalizeClass(a.$style.ageTitle)},"País",2)):g.createCommentVNode("",!0),U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:4,class:g.normalizeClass(a.$style.playedGamesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Partidos",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Jugados",2)],2)):g.createCommentVNode("",!0),U.elementSize.width>635?(g.openBlock(),g.createElementBlock("div",{key:5,class:g.normalizeClass(a.$style.playedMinutesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Minutos",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Jugados",2)],2)):g.createCommentVNode("",!0),U.elementSize.width>635?(g.openBlock(),g.createElementBlock("div",{key:6,class:g.normalizeClass(a.$style.playedMinutesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Liga",2)],2)):g.createCommentVNode("",!0)],2),g.createElementVNode("div",{class:g.normalizeClass(O.block02TitlesClass)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptionsTitles)},[g.createElementVNode("div",{class:g.normalizeClass(O.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):g.createCommentVNode("",!0)],512)}const jC={$style:VC},qC=Wd(u1,[["render",UC],["__cssModules",jC]]),WC=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},d1={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(a){this.status=a}}},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(a){this.$emit("click",a),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},L2=()=>{g.useCssVars(a=>({"9d01acb4":a.height,"14e95081":a.borderWidthBtn,"38fec285":a.borderType,34353510:a.borderColor,"20d20dc6":a.borderRadius,17130967:a.width,"4ccb7d36":a.backgroundColor,"5d1e86a2":a.cursorType,ce65d4a2:a.fontSize,fe4ac47a:a.fontStyle,f98e44dc:a.fontFamily,"93b87770":a.marginLeftStat,c7f7beba:a.fontSizeStat}))},z2=d1.setup;d1.setup=z2?(a,d)=>(L2(),z2(a,d)):L2;const HC=a=>(g.pushScopeId("data-v-f3ee6b2b"),a=a(),g.popScopeId(),a),GC=["src"],XC={key:1,class:"text"},KC=["src"],JC={class:"stats"},$C=HC(()=>g.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),ZC={class:"numstats"},YC={class:"leyend"};function QC(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["button",ae.status&&A.typeOnOff&&"button-active"]),style:g.normalizeStyle([O.customStyle,ae.status&&A.typeOnOff&&O.customActive]),onClick:d[0]||(d[0]=(...E)=>O.btnClick&&O.btnClick(...E))},[A.icon&&A.iconPosition.toLowerCase()==="left"?(g.openBlock(),g.createElementBlock("img",{key:0,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,GC)):g.createCommentVNode("",!0),A.textValue?(g.openBlock(),g.createElementBlock("div",XC,g.toDisplayString(A.textValue),1)):g.createCommentVNode("",!0),A.icon&&A.iconPosition.toLowerCase()==="right"?(g.openBlock(),g.createElementBlock("img",{key:2,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,KC)):g.createCommentVNode("",!0)],6)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...E)=>O.btnClick&&O.btnClick(...E))},[g.createElementVNode("div",JC,[$C,g.createElementVNode("div",ZC,g.toDisplayString(A.textStat),1)]),g.createElementVNode("div",YC,g.toDisplayString(A.textCategory),1)])):g.createCommentVNode("",!0)])}const eM=WC(d1,[["render",QC],["__scopeId","data-v-f3ee6b2b"]]),tM="_equipoGames_fst7d_75",rM="_atlasSeleccinGames_fst7d_85",nM="_equipoAtlasSeleccinMexiGames_fst7d_93",aM="_aosGames_fst7d_101",iM="_span12_fst7d_109",oM="_nacionalidadMex_fst7d_115",sM="_manchesterUnited_fst7d_121",lM="_manchesterUnited12_fst7d_135",cM="_containerInfoGames_fst7d_155",uM="_verPerfil12_fst7d_173",dM="_btnProfile_fst7d_191",hM="_containerButton_fst7d_223",pM="_dataContainer_fst7d_237",fM="_expandedInfoPlayerGames_fst7d_257",mM="_containerDataBg_fst7d_437",gM="_containerDataSm_fst7d_459",yM="_span_fst7d_109",vM="_manchesterUnited14_fst7d_481",bM="_filter_fst7d_491",xM="_verPerfil_fst7d_173",_M="_manchesterUnited8_fst7d_533",wM="_manchesterUnitedParent1_fst7d_545",kM="_manchesterUnited1_fst7d_135",TM="_manchesterUnitedParent_fst7d_545",SM="_frameDiv_fst7d_589",AM="_infoExpanded_fst7d_605",EM="_countryFlag_fst7d_911",CM={equipoGames:tM,atlasSeleccinGames:rM,equipoAtlasSeleccinMexiGames:nM,aosGames:aM,span12:iM,nacionalidadMex:oM,manchesterUnited:sM,manchesterUnited12:lM,containerInfoGames:cM,verPerfil12:uM,btnProfile:dM,containerButton:hM,dataContainer:pM,expandedInfoPlayerGames:fM,containerDataBg:mM,containerDataSm:gM,span:yM,manchesterUnited14:vM,filter:bM,verPerfil:xM,manchesterUnited8:_M,manchesterUnitedParent1:wM,manchesterUnited1:kM,manchesterUnitedParent:TM,frameDiv:SM,infoExpanded:AM,countryFlag:EM},h1={components:{GSCButton:eM},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 a=g.ref("myDivRef"),{elementSize:d}=pf(a);return{myDivRef:a,elementSize:d}},data(){return{}},computed:{},methods:{viewProfile(a){this.$emit("viewprofile",a)}}},O2=()=>{g.useCssVars(a=>({a297a8e8:a.fontFamily,"05868b8a":a.fontColor,"9181d814":a.fontColorValue,c650cbae:a.fontSize,af6837b2:a.background}))},N2=h1.setup;h1.setup=N2?(a,d)=>(O2(),N2(a,d)):O2;const MM={ref:"myDivRef"},PM=["src"];function LM(a,d,A,U,ae,O){const E=g.resolveComponent("GSCButton");return g.openBlock(),g.createElementBlock("div",MM,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.expandedInfoPlayerGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.dataContainer),id:"data-container"},[g.createElementVNode("div",{class:g.normalizeClass([a.$style.containerInfoGames,A.additionalClass]),id:"container-info"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited)},[A.viewTeam?(g.openBlock(),g.createElementBlock("p",{key:0,class:g.normalizeClass(a.$style.equipoAtlasSeleccinMexiGames)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.equipoGames)},"Equipo: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.atlasSeleccinGames)},g.toDisplayString(A.data.teams),3)],2)):g.createCommentVNode("",!0),A.viewAge?(g.openBlock(),g.createElementBlock("p",{key:1,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.equipoGames)},"Edad: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.age)+" años",3),g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)}," ("+g.toDisplayString(A.data.dataofbirth)+")",3)],2)):g.createCommentVNode("",!0),A.viewNationality?(g.openBlock(),g.createElementBlock("p",{key:2,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"Nacionalidad: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},[g.createTextVNode(g.toDisplayString(A.data.nationality.substring(0,3).toUpperCase())+" ",1),g.createElementVNode("div",{class:g.normalizeClass(a.$style.countryFlag)},[g.createElementVNode("img",{src:A.data.countryFlag},null,8,PM)],2)],2)],2)):g.createCommentVNode("",!0),A.viewPosition?(g.openBlock(),g.createElementBlock("p",{key:3,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"Posición: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.position),3)],2)):g.createCommentVNode("",!0)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited12)},[A.viewGames&&!A.isLive?(g.openBlock(),g.createElementBlock("p",{key:0,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"partidos Jugados: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.games),3)],2)):g.createCommentVNode("",!0),A.viewMin&&!A.isLive?(g.openBlock(),g.createElementBlock("p",{key:1,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"Minutos Jugados: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.min),3)],2)):g.createCommentVNode("",!0),A.viewGoals?(g.openBlock(),g.createElementBlock("p",{key:2,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},g.toDisplayString(A.data.category)+": ",3),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.goals),3)],2)):g.createCommentVNode("",!0),A.viewEffectiveness?(g.openBlock(),g.createElementBlock("p",{key:3,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"Efectividad de pases: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.effectiveness.toFixed(0))+"%",3)],2)):g.createCommentVNode("",!0)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerButton),id:"btn-container"},[A.viewButton?(g.openBlock(),g.createBlock(E,{key:0,style:g.normalizeStyle(A.additionalClass!=""&&U.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:d[0]||(d[0]=t=>O.viewProfile(A.data.id))},null,8,["style"])):g.createCommentVNode("",!0)],2)],2)],2)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(a.$style.infoExpanded)},[g.createElementVNode("div",{class:g.normalizeClass([a.$style.containerDataBg,A.additionalClass])},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnitedParent)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[2]||(d[2]=g.createElementVNode("span",null,"Posición en la tabla: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[3]||(d[3]=g.createElementVNode("span",null,"Goles anotados: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.goals),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[4]||(d[4]=g.createElementVNode("span",null,"Goles recibidos: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.goals_received),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[5]||(d[5]=g.createElementVNode("span",null,"Partidos jugados:",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.games_played),3)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnitedParent)},[A.viewEffectiveness?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.manchesterUnited1)},[d[6]||(d[6]=g.createElementVNode("span",null,"Efectividad de pases: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.effectiveness.toFixed(0))+"%",3)],2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[7]||(d[7]=g.createElementVNode("span",null,"xG: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.xg),3)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnitedParent)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[g.createElementVNode("span",null,g.toDisplayString(A.data.category)+": ",1),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.total),3)],2),A.viewEffectiveness?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.manchesterUnited8)},[d[8]||(d[8]=g.createElementVNode("span",null,"Efectividad de pases: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.effectiveness)+"%",3)],2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited8)},[d[9]||(d[9]=g.createElementVNode("span",null,"xG: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.xg),3)],2)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerDataSm)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.frameDiv)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[10]||(d[10]=g.createElementVNode("span",null,"Posición en la tabla: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[11]||(d[11]=g.createElementVNode("span",null,"Goles anotados: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.goals),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[12]||(d[12]=g.createElementVNode("span",null,"Goles recibidos: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.goals_received),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[13]||(d[13]=g.createElementVNode("span",null,"Partidos jugados: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.games_played),3)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnitedParent1)},[A.viewEffectiveness?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.manchesterUnited14)},[d[14]||(d[14]=g.createElementVNode("span",null,"Efectividad de pases: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.effectiveness.toFixed(0))+"%",3)],2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[15]||(d[15]=g.createElementVNode("span",null,"xG: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.xg),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[g.createElementVNode("span",null,g.toDisplayString(A.data.category)+": ",1),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.total),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited8)},[g.createElementVNode("span",null,g.toDisplayString(A.data.category)+": ",1),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.total),3)],2)],2)],2),A.viewButton?(g.openBlock(),g.createBlock(E,{key:0,style:g.normalizeStyle(A.additionalClass!=""&&U.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:d[1]||(d[1]=t=>O.viewProfile(A.data.id))},null,8,["style"])):g.createCommentVNode("",!0)],2)):g.createCommentVNode("",!0)],512)}const zM={$style:CM},OM=Wd(h1,[["render",LM],["__cssModules",zM],["__scopeId","data-v-5dd9e88d"]]),R2={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"},p1={components:{GSCLeaders:e7,GSCRowTable:DA,GSCTableHeader:qC,GSCExpandedInfo:OM},props:{isTeam:{type:Boolean,default:!1},typeTable:{type:Number,default:0},carrousel:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},typeData:{type:Number,default:0},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},dummyData:{type:Array,default:null}},setup(){const a=g.ref("myDivRef"),{elementSize:d}=pf(a);return{myDivRef:a,elementSize:d}},watch:{game:{immediate:!0,deep:!0,async handler(a){a&&(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(a){await this.getCategoryStats(this.season),a===1&&this.game.is_live?(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)):clearInterval(this.intervalIdtops)}},filtersProp:{immediate:!1,deep:!0,async handler(a,d){a&&(JSON.stringify(a)!==JSON.stringify(d)||this.sonConjuntosDistintos(a.setNationalitiesIds,d.setNationalitiesIds))&&(this.isloading=!0,this.filterEmitAux=a,[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.dummyData&&this.category===0)return[this.dummyData];if(this.changeStateLoading(!0),Object.entries(this.statsData).length>0&&this.formatFilterStats.length>0){var a={},d={},A=[],U=[],ae=[];return this.formatFilterStats.map(O=>{a[O.team_id]?a[O.team_id].total=a[O.team_id].total+O.total:(a[O.team_id]={},a[O.team_id].total=O.total,a[O.team_id].id=this.teamInfo[O.team_id].id,a[O.team_id].name=this.teamInfo[O.team_id].name.replace(" Femenil",""),a[O.team_id].img="https://golstatsimages.blob.core.windows.net/teams-80/"+O.team_id+".png",a[O.team_id].effectiveness=this.teamInfo[O.team_id].effectiveness,a[O.team_id].frecuency=this.teamInfo[O.team_id].frecuency,a[O.team_id].game_avg=this.teamInfo[O.team_id].game_avg,a[O.team_id].game_avg_last_season=this.teamInfo[O.team_id].game_avg_last_season,a[O.team_id].games_played_lastseason=this.teamInfo[O.team_id].games_played_lastseason,a[O.team_id].games_played=this.teamInfo[O.team_id].games_played,a[O.team_id].positiontable=this.teamInfo[O.team_id].positiontable,a[O.team_id].goals=this.teamInfo[O.team_id].goals,a[O.team_id].goalsrecived=this.teamInfo[O.team_id].goalsrecived,a[O.team_id].xg=this.teamInfo[O.team_id].xg),d[O.player_id]?O.player_id!=0&&O.player_id!=62117&&(d[O.player_id].total=d[O.player_id].total+O.total):O.player_id!=0&&O.player_id!=62117&&(d[O.player_id]={},d[O.player_id].total=O.total,O.player_id&&this.playersInfo[O.player_id]?(d[O.player_id].name=this.playersInfo[O.player_id].name,d[O.player_id].name_short=this.getnameshort(this.playersInfo[O.player_id].name),d[O.player_id].img=this.playersInfo[O.player_id].img,d[O.player_id].id=this.playersInfo[O.player_id].id,d[O.player_id].age=this.playersInfo[O.player_id].age,d[O.player_id].team=this.playersInfo[O.player_id].team,d[O.player_id].teamname=this.playersInfo[O.player_id].teamname,d[O.player_id].teamid=this.playersInfo[O.player_id].teamid,d[O.player_id].position=this.playersInfo[O.player_id].position,d[O.player_id].positionId=this.playersInfo[O.player_id].positionId,d[O.player_id].positionfull=this.playersInfo[O.player_id].positionfull,d[O.player_id].country=this.playersInfo[O.player_id].country,d[O.player_id].effectiveness=this.playersInfo[O.player_id].effectiveness,d[O.player_id].minutes=this.playersInfo[O.player_id].minutes_played,d[O.player_id].games=this.playersInfo[O.player_id].games_played,d[O.player_id].date=this.playersInfo[O.player_id].date,d[O.player_id].nationality=this.playersInfo[O.player_id].nationality,d[O.player_id].player_country_flag=this.playersInfo[O.player_id].player_country_flag,d[O.player_id].categoryName=this.categoryName):(d[O.player_id].id=O.player_id,d[O.player_id].name=O.player_id,d[O.player_id].img="SIN IMAGEN",d[O.player_id].age="",d[O.player_id].teamname="",d[O.player_id].team="",d[O.player_id].teamid=0,d[O.player_id].position="",d[O.player_id].positionId=0,d[O.player_id].positionfull="",d[O.player_id].country="",d[O.player_id].effectiveness="",d[O.player_id].minutes="",d[O.player_id].games="",d[O.player_id].date="00-00-0000",d[O.player_id].nationality="",d[O.player_id].player_country_flag="",d[O.player_id].categoryName=""))}),A.push(...Object.values(a)),U.push(...Object.values(d)),A=this.sortAndSlice(Object.values(a),60),U=U.sort(this.compareObjectsMinutes).slice(0,60),U=U.map((O,E)=>(O.top=E<9?"0"+(E+1):""+(E+1),O)),A=A.map((O,E)=>(O.top=E<9?"0"+(E+1):""+(E+1),O)),this.filterTeam!==0&&!this.isTeam&&(ae=U.filter(O=>O.teamid===this.filterTeam)),this.changeStateLoading(!1),this.isTeam?this.formatArrayPaginate(A):this.filterTeam!=0?this.formatArrayPaginate(ae):this.formatArrayPaginate(U)}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(a){this.isloading=a},compareObjectsMinutes(a,d){return a.total>d.total?-1:a.total<d.total?1:a.minutes<d.minutes?-1:a.minutes>d.minutes?1:0},sonConjuntosDistintos(a,d){const A=Array.from(a),U=Array.from(d);if(A.length!==U.length)return!0;for(let ae=0;ae<A.length;ae++)if(!d.has(A[ae]))return!0;return!1},getnameshort(a){var d=a.split(","),A=d[0].split(" "),U=d[1].trim().split(" "),ae="";A.length==2||A.length==1?A[0].length<4?ae=A[0]+" "+A[1]:ae=A[0]:A.length==3?ae=A[0]+" "+A[1]:A.length==4&&(ae=A[1]+" "+A[2]+" "+A[3]);var O=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return ae=ae.replace(",",""),O+". "+ae},changeCarrousel(){this.expand=!1,this.playerexpand=0},compareObjects(a,d){return a.total<d.total?-1:a.total>d.total?1:a.name<d.name?-1:a.name>d.name?1:0},sortAndSlice(a,d){return a.sort((A,U)=>(A.name<U.name?1:-1)&&(A.total<U.total?1:-1)).slice(0,d)},getCategoryName(a){let d="";for(let A=0;A<this.categories.length;A++)a==this.categories[A].id&&(d=this.categories[A].name);return d},translateTopCategories(a){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]}[a]||[]},getCoordinatePointPerCategory(a){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}[a]||0},emitEventMedia(a,d,A){let U=this.filtersValues.matchResult,ae=this.filtersValues.playingAs,O=this.filtersValues.sections,E=this.filtersValues.zone;this.translateTopCategories(d),Object.keys(this.filterEmitAux).length>0&&(U=this.filterEmitAux.matchResult,ae=this.filterEmitAux.playingAs,O=this.filterEmitAux.sections,E=this.filterEmitAux.zone);const t=1,x=this.isTeam?3:2,u=a.player_id;let e=[],b=this.isTeam?a.id:this.filterTeam;u?this.isTeam?b=u:e=[u]:this.isTeam?b=a.id:e=[a.id];const f={auxwidget:!!(this.canPlayVideos||this.game.awayTeam.team_id==this.teamWidget&&this.typeData!=1),seasonId:this.game.is_live==1?this.season:this.game.regularSeasonId,isFeaturedPlayers:!1,mainSectionType:t,playListType:x,gameIds:null,playerIds:e,goalkeeperIds:[],categoryIds:this.translateTopCategories(d),teamId:b||0,matchResult:U,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:A,playingAs:ae,timeSections:O,fieldSections:E,coordinatePoint:this.getCoordinatePointPerCategory(d)}};this.$emit("setopenmedia",f)},emitEventMediaFullTable(a,d,A){let U=this.filtersValues.matchResult,ae=this.filtersValues.playingAs,O=this.filtersValues.sections,E=this.filtersValues.zone,t=this.translateTopCategories(d);Object.keys(this.filterEmitAux).length>0&&(U=this.filterEmitAux.matchResult,ae=this.filterEmitAux.playingAs,O=this.filterEmitAux.sections,E=this.filterEmitAux.zone);const x=1,u=this.isTeam?3:2;let e=[],b=this.isTeam?a.id:this.filterTeam;this.isTeam?b=a.id:e=[a.id];const f={seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:x,playListType:u,gameIds:null,playerIds:e,goalkeeperIds:[],categoryIds:t,teamId:b||0,matchResult:U,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:A,playingAs:ae,timeSections:O,fieldSections:E,coordinatePoint:this.getCoordinatePointPerCategory(d)}};this.$emit("setopenmedia",f)},replaceImgPlayer(a){return a.replace("https://golstatsimages.blob.core.windows.net/players-profile/","https://golstatsimages.blob.core.windows.net/players-profile-no-bg/")},abrevName(a){var d=a.split(","),A=d[0].split(" "),U=d[1].trim().split(" "),ae="";A.length==2||A.length==1?A[0].length<4?ae=A[0]+" "+A[1]:ae=A[0]:A.length==3?ae=A[0]+" "+A[1]:A.length==4&&(ae=A[1]+" "+A[2]+" "+A[3]);var O=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";ae=ae.replace(",","");var E=O+". "+ae;return E},clickMore(a){this.$emit("more",{category:a,categoryName:this.categoryName})},morestats(){this.$emit("more",this.category)},viewprofile(a,d){this.$emit("clickprofile",{id:a,teamId:d,isTeam:this.isTeam})},clickexpand(a){this.expand=a.expand,this.playerexpand=a.id},async getCategoryStats(a){var d,A;console.log("llego aqui; ",a),this.mapPlayers=new Map;try{if(!a)return;let U=[],ae={},O={},E=this.season;(A=(d=this.seasonSelected)==null?void 0:d.related_seasons)!=null&&A.some(u=>u.id===this.season)&&(E=this.seasonSelected.id),this.arePlaysEmpty=!1;const t=Lo.create({headers:{Authorization:`${this.token}`}});this.isloading=!0;let x={};if(console.log("this.typeData:::: ",this.typeData),console.log("this.game, ",this.game),this.game.game_status===1?x=await t.get(this.url+"/"+this.gameId+"/"+this.category):(console.log("LLEGO ES 2 PRWMATCH"),x=await t.get(this.urlPrematch+E+"/"+this.category+"?t="+this.game.home_team+"&t="+this.game.visiting_team)),x&&x.data&&x.data.data&&x.data.data.length>0){U=x.data.data.map(e=>this.formatStatsData(e)),x.data.teams.forEach(e=>{ae[e[0]]={},ae[e[0]].id=e[0],ae[e[0]].name=e[1],ae[e[0]].abrv=e[2],ae[e[0]].img=e[3],ae[e[0]].effectiveness=e[4],ae[e[0]].games_played=e[5],ae[e[0]].games_played_lastseason=e[6],ae[e[0]].positiontable=e[7],ae[e[0]].goals=e[8],ae[e[0]].goalsrecived=e[9],ae[e[0]].xg=e[10],ae[e[0]].frecuency=e[11],ae[e[0]].game_avg=e[12],ae[e[0]].game_avg_last_season=e[13]});const u=new Set;x.data.players.forEach(e=>{const b=this.getObjectPlayer(e);this.mapPlayers.set(b.numberId,b);const f=b.numberAge,v=b.teamName.length>0?b.teamName[0].acronym:"",h=b.teamName.length>0?ae[b.teamName[0].team_id].name:"",r=b.teamName.length>0?b.teamName[0].team_id:"",n=this.positions[b.numberPositionId-1].fullname,c=this.positions[b.numberPositionId-1].name,o=b.countryId.length>0?b.countryId[0].nationality_id:"",l=b.effectiveness,p=b.min,m=b.games,w=b.date;b.arrayNationalities.forEach(T=>{u.add(T.numberId)}),O[e[0]]={id:e[0],name:e[1],img:e[2],age:f,team:v,teamname:h,teamid:r,position:n,positionfull:c,effectiveness:l,country:o,games_played:m,minutes_played:p,date:w,nationality:b.stringNationalityName,player_country_flag:b.player_country_flag,positionId:b.numberPositionId}}),this.setNationalityIds=u,this.arrayAgeRange=[x.data.min_age,x.data.max_age]}else this.arePlaysEmpty=!0;this.teamInfo=ae,this.playersInfo=O,this.formatStats=U,this.formatFilterStats=this.filterRecords(this.filtersSelect),this.statsData=x}catch(U){return Promise.reject(U)}},filterRecords(a){return this.formatStats.length>0?this.formatStats.filter(d=>{const A=a.playingAs.includes(d.playing_as),U=a.matchResult.includes(d.match_result),ae=a.sections.includes(d.section),O=a.typeZone===1&&a.zone.includes(d.origen)||a.typeZone===2&&a.zone.includes(d.destino);if(a.setPositionsIds&&a.setNationalitiesIds&&a.arrayAgeRange&&a.setYear&&!this.isTeam){const E=this.mapPlayers.get(d.player_id);if(!E)return!1;if(a.booleanAreNationalTeamsVisible){if(a.setAvailableNationalTeamsPlayersIds.size>0&&!a.setAvailableNationalTeamsPlayersIds.has(d.player_id))return!1}else{let t=!1;for(const x of E.arrayNationalitiesIds)if(a.setNationalitiesIds.has(x)){t=!0;break}if(!t)return!1}if(E.numberAge<a.arrayAgeRange[0]||E.numberAge>a.arrayAgeRange[1]||E.date<a.setYear||!a.setPositionsIds.includes(E.numberPositionId))return!1}return(a.playingAs.length===0||A)&&(a.matchResult.length===0||U)&&(a.sections.length===0||ae)&&(a.zone.length===0||O)}):[]},updateSliderF(){this.updateSlider+=1},formatStatsData(a){const d={};return a[1]===0&&(a[2]===1||a[2]===2)&&(a[2]=3-a[2]),a[1]===0&&(a[3]===1||a[3]===2)&&(a[3]=3-a[3]),this.data_headers.forEach((A,U)=>{d[A]=a[U]}),d},getObjectPlayer(a){const d=[],A=a[7].map(ae=>(d.push(ae.nationality_id),{stringName:ae.nationality,numberId:ae.nationality_id})),U=a[9].split("-");return{numberId:a[0]!==void 0?a[0]:"",stringFullName:a[1]!==void 0?a[1]:"",stringImageUrl:a[2]!==void 0?a[2]:"",numberTeamId:a[3]!==void 0?a[3]:"",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+a[3]+".jpg",stringNationalityName:R2[a[3]],numberAge:a[5]!==void 0?a[5]:"",numberPositionId:a[6]!==void 0?a[6]:"",countryId:a[7]!==void 0?a[7]:"",teamName:a[10]!==void 0?a[10]:"",effectiveness:a[11]!==void 0?a[11]:"",min:a[13]!==void 0?a[13]:"",games:a[12]!==void 0?a[12]:"",date:U.length>0?Number(U[0]):0,arrayNationalities:A,category:this.categoryName,arrayNationalitiesIds:d}},formatArrayPaginate(a){return[a.slice(0,this.numRows)]},createIntervalTops(){this.intervalIdtops=setInterval(async()=>{await this.getCategoryStats(this.season)},this.timeLiveComparativeAvanced)},clearTopsInterval(){this.intervalIdtops&&(clearInterval(this.intervalIdtops),this.intervalIdtops=null)}},beforeUnmount(){this.clearTopsInterval()}},D2=()=>{g.useCssVars(a=>({"723bcaba":a.borderRadius,"7fd86a9e":a.borderWidth,"7ec16c3b":a.borderColor}))},I2=p1.setup;p1.setup=I2?(a,d)=>(D2(),I2(a,d)):D2;const NM={ref:"myDivRef"},RM={class:"btnViewFullList"},DM={class:"text"},IM={class:"row-table-carrousel"},FM={key:1,class:"container-no-search-result"},VM={key:0,class:"overlay-loading-top"};function BM(a,d,A,U,ae,O){const E=g.resolveComponent("GSCLeaders"),t=g.resolveComponent("GSCRowTable"),x=g.resolveComponent("GSCExpandedInfo"),u=g.resolveComponent("GSCTableHeader");return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(A.type==0?"gsc-top":"gsc-top-full")},[g.createElementVNode("div",NM,[A.type==0?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[O.topData.length>0?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[g.createElementVNode("div",RM,[g.createElementVNode("div",DM,g.toDisplayString(A.categoryName),1)]),g.createElementVNode("div",IM,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(O.topData[0],(e,b)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:b},[e.top==1?(g.openBlock(),g.createBlock(E,{key:0,onMediadata:d[0]||(d[0]=f=>O.emitEventMedia(f,A.category,A.categoryName)),type:A.typeTable,"type-data":A.typeData,game:A.game,arrow:A.arrow,"team-widget":A.teamWidget,"can-play-videos":A.canPlayVideos,"is-expanded":a.playerexpand==e.id&&a.expand,ref_for:!0,ref:"GSCLeaders",data:A.typeTable==0?{top:"01",photo:e.img,logo:e.img&&e.img.includes("player-shadow")?"https://golstatsimages.blob.core.windows.net/images-library/logo-team@2x.png":"https://golstatsimages.blob.core.windows.net/teams-80/"+e.teamid+".png",name:e.name,player_short:e.name_short,player_id:e.id,categoryId:A.category,total:e.total}:{top:"01",logo:e.img,total:e.total,name_team:e.name,player_id:e.id},"category-name":A.categoryName,buttonMaxWidth:A.typeTable!=0?U.elementSize.width>360?"210px":"130px":U.elementSize.width>360?"180px":"110px",buttonFontSize:"12px",iconSize:"11px",onExpand:O.clickexpand,onMore:O.morestats},null,8,["type","type-data","game","arrow","team-widget","can-play-videos","is-expanded","data","category-name","buttonMaxWidth","onExpand","onMore"])):(g.openBlock(),g.createBlock(t,{key:1,"type-data":A.typeData,"team-widget":A.teamWidget,game:A.game,type:A.typeTable,"type-view":A.type,arrow:A.arrow,"is-expanded":a.playerexpand==e.id&&a.expand,onMediadata:d[1]||(d[1]=f=>O.emitEventMedia(f,A.category,A.categoryName)),data:A.typeTable==0?{position:e.top,player_name:e.name,player_short:e.name_short,player_photo:e.img,total:e.total,id:e.id,player_age:e.age,team_abrev:e.team,team_logo:e.img&&e.img.includes("player-shadow")?"https://golstatsimages.blob.core.windows.net/images-library/logo-team@2x.png":"https://golstatsimages.blob.core.windows.net/teams-80/"+e.teamid+".png",player_position:e.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+e.country+".jpg",player_games:e.minutes,player_min:e.games,league_name:" Liga MX "}:{position:e.top,team_logo:e.img,team_abrev:e.name,frequency:e.frecuency,promthistournament:e.game_avg,promlasttournament:e.game_avg_last_season,teams_games:"-",category:A.category,total:e.total,id:e.id},height:"71px","can-play-videos":A.canPlayVideos,background:b%2===0?A.backgroundEven:A.backgroundOdd,onExpand:O.clickexpand},null,8,["type-data","team-widget","game","type","type-view","arrow","is-expanded","data","can-play-videos","background","onExpand"])),a.expand&&a.playerexpand==e.id?(g.openBlock(),g.createBlock(x,{key:2,type:A.typeTable,"is-live":A.game.is_live,"view-effectiveness":e.positionId!==1,data:A.typeTable==0?{teams:e.teamname,age:e.age,dataofbirth:e.date,nationality:e.nationality,countryFlag:e.player_country_flag,position:e.position,games:e.games,min:e.minutes,goals:e.total,effectiveness:e.effectiveness,category:A.categoryName,id:e.id}:{position:e.positiontable,goals:e.goals,goals_received:e.goalsrecived,games_played:e.games_played,category:A.categoryName,effectiveness:e.effectiveness,xg:e.xg,total:e.total,attendance:"-",id:e.id},onViewprofile:f=>O.viewprofile(f,e.teamid),background:b%2===0?A.backgroundEven:A.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):g.createCommentVNode("",!0)],64))),128))])],64)):(g.openBlock(),g.createElementBlock("div",FM,[a.isloading?(g.openBlock(),g.createElementBlock("div",VM,d[3]||(d[3]=[g.createElementVNode("div",{class:"overlay-loading-top__spinner"},[g.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),g.createElementVNode("div",{class:"overlay-loading-top__text"},"Loading...",-1)]))):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[d[4]||(d[4]=g.createElementVNode("div",{class:"container-no-search-result-title"},"No existen resultados",-1)),d[5]||(d[5]=g.createElementVNode("div",{class:"container-no-search-result-subtitle"},[g.createTextVNode(" No existen resultados para este tipo de"),g.createElementVNode("br"),g.createTextVNode(" jugada, considerando el torneo y otros"),g.createElementVNode("br"),g.createTextVNode(" filtros que has seleccionado. ")],-1))],64))]))],64)):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createVNode(u,{background:"#183143",type:A.typeTable},null,8,["type"]),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(O.topData,(e,b)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:b},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.slice(0,A.numRows),(f,v)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:v},[g.createVNode(t,{"type-data":A.typeData,"team-widget":A.teamWidget,game:A.game,arrow:A.arrow,type:A.typeTable,"type-view":A.type,"can-play-videos":A.canPlayVideos,"is-expanded":a.playerexpand==f.id&&a.expand,onMediadata:d[2]||(d[2]=h=>O.emitEventMediaFullTable(h,A.category,A.categoryName)),data:A.typeTable==0?{position:f.top,player_name:f.name,player_short:f.name_short,player_photo:f.img,total:f.total,id:f.id,player_age:f.age,team_abrev:f.team,team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+f.teamid+".png",player_position:f.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+f.country+".jpg",player_games:f.games,player_min:f.minutes,league_name:" Liga MX "}:{position:f.positiontable,team_logo:f.img,team_abrev:f.name,frequency:f.frecuency,promthistournament:f.game_avg,promlasttournament:f.game_avg_last_season,category:A.category,team_games:f.games_played,total:f.total,id:f.id},height:"71px",background:((b+1)*5+v)%2===0?A.backgroundOdd:A.backgroundEven,onExpand:O.clickexpand},null,8,["type-data","team-widget","game","arrow","type","type-view","can-play-videos","is-expanded","data","background","onExpand"]),a.expand&&a.playerexpand==f.id?(g.openBlock(),g.createBlock(x,{key:0,type:A.typeTable,"is-live":A.game.is_live,additionalClass:"fullTable","view-effectiveness":f.positionId!==1,data:A.typeTable==0?{teams:f.teamname,age:f.age,dataofbirth:f.date,nationality:f.nationality,countryFlag:f.player_country_flag,position:f.positionfull,positionfull:f.positionfull,games:f.games,min:f.minutes,goals:f.total,effectiveness:f.effectiveness,category:O.getCategoryName(A.category),id:f.id}:{position:f.positiontable,goals:f.goals,goals_received:f.goalsrecived,games_played:f.games_played,category:A.categoryName,effectiveness:f.effectiveness,xg:f.xg,total:f.total,category:O.getCategoryName(A.category),attendance:"-",id:f.id},onViewprofile:h=>O.viewprofile(h,f.teamid),background:v%2===0?A.backgroundEven:A.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):g.createCommentVNode("",!0)],64))),128))],64))),128))],64))],512)],2)}const UM=Wd(p1,[["render",BM],["__scopeId","data-v-4ceb49b7"]]),ff={YEAR:2,AGE_RANGE:3,NATIONALITY:4,POSITION:5,ELIGIBILITY:6},jM=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},qM={key:1},WM={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},HM=["fill"],GM={key:0,class:"checkbox__teams"},XM={class:"checkbox__teams__logo"},KM=["src"],JM={class:"checkbox__teams__logo"},$M=["src"],ZM={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(a){return["left","right","top","bottom"].includes(a)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(a,{emit:d}){const A=a;g.useCssVars(u=>({"7bd9d47b":a.width,"34dc7ddc":a.height}));const U=g.ref(!1),ae=g.computed(()=>{const u={color:A.boxValueColor,"font-family":A.fontFamily,height:A.boxWidthAndHeight,width:A.boxWidthAndHeight,minWidth:A.boxWidthAndHeight,"border-radius":A.boxBorderRadius,"margin-top":A.boxMarginTop};return U.value?(u["background-color"]=A.boxBackgroundColor,u.border=`solid ${A.boxBorderWidth} ${A.boxBackgroundColor}`):u.border=`solid ${A.boxBorderWidth} ${A.boxBorderColor}`,u}),O=g.computed(()=>({"font-family":A.boxValueFontFamily,"font-size":A.boxValueFontSize,color:A.boxValueColor,"line-height":1})),E=g.computed(()=>{const u={color:A.labelColor,"font-family":A.fontFamily,"font-size":A.labelFontSize,"white-space":A.labelWhiteSpace,"text-align":A.boxPosition==="top"||A.boxPosition==="bottom"?"center":A.boxPosition};return(A.boxPosition==="left"||A.boxPosition==="right")&&(u[`margin-${A.boxPosition}`]=A.isBoxOnly?"0":A.teamsIds?"8px":"10px"),u});g.watch(()=>A.modelValue,u=>{u!==U.value&&(U.value=u)},{immediate:!0});function t(){A.avoidInteraction||!U.value&&A.avoidToCheck||(U.value=!U.value,d("update:modelValue",U.value))}function x(u){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${u}.png`}return(u,e)=>(g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["checkbox",`box-${a.boxPosition}`]),onClick:t},[g.createElementVNode("div",{class:"checkbox__box",style:g.normalizeStyle(ae.value)},[U.value?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[A.boxValue?(g.openBlock(),g.createElementBlock("div",{key:0,class:"checkbox__box__value",style:g.normalizeStyle(O.value)},g.toDisplayString(a.boxValue),5)):(g.openBlock(),g.createElementBlock("div",qM,[(g.openBlock(),g.createElementBlock("svg",WM,[g.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:a.boxValueColor},null,8,HM)]))]))],64)):g.createCommentVNode("",!0)],4),a.teamsIds&&a.teamsIds.length?(g.openBlock(),g.createElementBlock("div",GM,[g.createElementVNode("div",XM,[g.createElementVNode("img",{src:x(a.teamsIds[0]),alt:""},null,8,KM)]),g.createElementVNode("div",JM,[g.createElementVNode("img",{src:x(a.teamsIds[1]),alt:""},null,8,$M)])])):g.createCommentVNode("",!0),g.createElementVNode("div",{class:"checkbox__label",style:g.normalizeStyle(E.value)},g.toDisplayString(a.label),5)],2))}},f1=jM(ZM,[["__scopeId","data-v-b6f124d8"]]),Qc=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},YM={PLAYS:"plays",PRODUCTIVITY:"productivity",FIELD:"field",UNIVERSE:"universe",DETAILS:"details",TOURNAMENTS:"tournaments",PERSONAL_DATA:"personalData",PLAYS_TYPES:"playsTypes",GOLSTATS:"golstats",DISTANCE:"distance",RESULTS:"results",RESULTS_BY_TIME:"resultsByTime",VIDEOS:"videos",GAMES:"games",TAKEN_CORNERS:"takenCorners",HOW_WAS_CORNER:"howWasCorner",ZONE:"zone",WHAT_HAPPENED:"whatHappened"},QM=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},m1={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(a){this.status=a}}},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(a){this.$emit("click",a),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},F2=()=>{g.useCssVars(a=>({"9d01acb4":a.height,"14e95081":a.borderWidthBtn,"38fec285":a.borderType,34353510:a.borderColor,"20d20dc6":a.borderRadius,17130967:a.width,"4ccb7d36":a.backgroundColor,"5d1e86a2":a.cursorType,ce65d4a2:a.fontSize,fe4ac47a:a.fontStyle,f98e44dc:a.fontFamily,"93b87770":a.marginLeftStat,c7f7beba:a.fontSizeStat}))},V2=m1.setup;m1.setup=V2?(a,d)=>(F2(),V2(a,d)):F2;const eP=a=>(g.pushScopeId("data-v-f3ee6b2b"),a=a(),g.popScopeId(),a),tP=["src"],rP={key:1,class:"text"},nP=["src"],aP={class:"stats"},iP=eP(()=>g.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),oP={class:"numstats"},sP={class:"leyend"};function lP(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["button",ae.status&&A.typeOnOff&&"button-active"]),style:g.normalizeStyle([O.customStyle,ae.status&&A.typeOnOff&&O.customActive]),onClick:d[0]||(d[0]=(...E)=>O.btnClick&&O.btnClick(...E))},[A.icon&&A.iconPosition.toLowerCase()==="left"?(g.openBlock(),g.createElementBlock("img",{key:0,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,tP)):g.createCommentVNode("",!0),A.textValue?(g.openBlock(),g.createElementBlock("div",rP,g.toDisplayString(A.textValue),1)):g.createCommentVNode("",!0),A.icon&&A.iconPosition.toLowerCase()==="right"?(g.openBlock(),g.createElementBlock("img",{key:2,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,nP)):g.createCommentVNode("",!0)],6)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...E)=>O.btnClick&&O.btnClick(...E))},[g.createElementVNode("div",aP,[iP,g.createElementVNode("div",oP,g.toDisplayString(A.textStat),1)]),g.createElementVNode("div",sP,g.toDisplayString(A.textCategory),1)])):g.createCommentVNode("",!0)])}const cP=QM(m1,[["render",lP],["__scopeId","data-v-f3ee6b2b"]]),uP={class:"gsc-dropdown__main-container__item-selected"},dP=["height","width"],hP=["stroke"],pP={key:1,width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fP=["fill"],mP={class:"gsc-dropdown__items-container"},gP=["onClick"],yP={key:0,class:"gsc-dropdown__items-footer"},g1={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(a){return["solid","dotted","dashed"].includes(a)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:a=>["propName","value"].every(d=>d in a)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1},iconType:{type:Number,default:1,validator:function(a){return[1,2].includes(a)}}},emits:["input","click-ready","update:modelValue"],setup(a,{emit:d}){const A=a,U=g.ref({}),ae=g.ref(null),O=g.ref(A.isMultipleOption?-1:0),E=g.ref(!1);g.watch(()=>A.items,(v,h)=>{if(!A.modelValue&&(!A.onlyFirstTime||!h||!h.length)&&v&&v.length){if(A.defaultItemByProp){const r=A.items.findIndex(n=>n[A.defaultItemByProp.propName]===A.defaultItemByProp.value);r!==-1?(O.value=r,U.value=v[r]):(O.value=0,U.value=v[0])}else U.value=v[A.defaultItemByIndex];d("input",U.value)}},{immediate:!0}),g.watch(()=>A.modelValue,v=>{if(v){const h=A.items.findIndex(r=>typeof v=="object"?JSON.stringify(r)===JSON.stringify(v):r===v);h!==-1&&(O.value=h,U.value=A.items[h],d("update:modelValue",U.value))}},{immediate:!0});const t=g.computed(()=>({height:A.height,width:A.width,backgroundColor:A.backgroundColor,borderRadius:`${A.borderRadius}px`,border:`${A.borderType} ${A.borderWidth}px ${A.borderColor}`,color:A.color,"--hover-background-color":A.hoverBackgroundColor,"--list-container-padding":A.listContainerPadding,"--list-item-padding":A.listItemPadding,"--list-item-margin":A.listItemMargin,"--list-background-color":A.listBackgroundColor,"--list-height":A.listHeight,"--list-item-border-radius":A.listItemBorderRadius,"--list-item-selected-color":A.listItemSelectedColor,"--list-item-selected-background-color":A.listItemSelectedBackgroundColor,"--list-item-color":A.listItemColor,"--list-border-radius":`${A.listBorderRadius}`,"--list-border-color":A.listBorderColor,"--list-width":A.isListSameWidth?A.width:"fit-content","--list-border-width":`${A.listBorderWidth}px`,"--list-margin-top":A.listMarginTop,"--list-left":A.listAlignment==="left"?"0":"auto","--list-right":A.listAlignment==="right"?"0":"auto","--footer-border":`${A.footerBorderWidth}px solid ${A.footerBorderColor}`,"--dropdown-opacity":A.isDisabled?"0.5":"1","--dropdown-cursor":A.isDisabled?"not-allowed":"pointer","--dropdown-font-size":A.fontSize?A.fontSize:"14px"})),x=g.computed(()=>({height:`${A.arrowHeight}px`,width:`${A.arrowWidth}px`}));function u(){A.isDisabled||(E.value=!E.value)}function e(v){ae.value&&!ae.value.contains(v.target)&&(E.value=!1)}function b(v,h){A.isMultipleOption?O.value=-1:(O.value=h,E.value=!1),U.value=v,d("input",U.value),d("update:modelValue",U.value)}function f(){E.value=!1,d("click-ready")}return g.onMounted(()=>{document.addEventListener("click",e)}),g.onBeforeMount(()=>{document.removeEventListener("click",e)}),(v,h)=>(g.openBlock(),g.createElementBlock("div",{ref_key:"dropDown",ref:ae,class:"gsc-dropdown",style:g.normalizeStyle(t.value)},[g.createElementVNode("div",{class:"gsc-dropdown__main-container",style:g.normalizeStyle({"padding-right":`${a.arrowWidth+8}px`}),onClick:u},[g.createElementVNode("div",uP,[g.renderSlot(v.$slots,"default",{selectedItem:U.value})]),g.createElementVNode("div",{class:g.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":E.value}]),style:g.normalizeStyle(x.value)},[a.iconType===1?(g.openBlock(),g.createElementBlock("svg",{key:0,height:a.arrowHeight,width:a.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:a.arrowColor},null,8,hP)],8,dP)):(g.openBlock(),g.createElementBlock("svg",pP,[g.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:a.arrowColor},null,8,fP)]))],6)],4),g.createVNode(g.Transition,null,{default:g.withCtx(()=>[g.withDirectives(g.createElementVNode("div",mP,[g.createElementVNode("div",null,[g.createElementVNode("div",{class:"gsc-dropdown__items",style:g.normalizeStyle({"margin-top":`${A.borderWidth}px`})},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(a.items,(r,n)=>(g.openBlock(),g.createElementBlock("div",null,[g.withDirectives((g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["gsc-dropdown__items__item",{selected:n===O.value}]),key:n,onClick:c=>b(r,n)},[g.renderSlot(v.$slots,"availableItem",{item:r})],10,gP)),[[g.vShow,!r.isHidden]])]))),256))],4),a.isFooterVisible?(g.openBlock(),g.createElementBlock("div",yP,[g.createVNode(g.unref(cP),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):g.createCommentVNode("",!0)])],512),[[g.vShow,E.value]])]),_:3})],4))}},y1={borderType:"solid",listBackgroundColor:"#2E3B46",listBorderColor:"rgba(255, 255, 255, 0.2)",listBorderRadius:"5px",height:"38px",borderWidth:.8,borderColor:"rgba(255, 255, 255, 0.2)",backgroundColor:"#2E3B46",color:"white",listItemColor:"white",listItemSelectedBackgroundColor:"#2E3B46",arrowColor:"#fff",width:"100%",listHeight:"200px",isListSameWidth:!0,isFooterVisible:!0,hoverBackgroundColor:"#2E3B46",iconType:2},vP=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},v1={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(a){this.status=a}}},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(a){this.$emit("click",a),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},B2=()=>{g.useCssVars(a=>({"9d01acb4":a.height,"14e95081":a.borderWidthBtn,"38fec285":a.borderType,34353510:a.borderColor,"20d20dc6":a.borderRadius,17130967:a.width,"4ccb7d36":a.backgroundColor,"5d1e86a2":a.cursorType,ce65d4a2:a.fontSize,fe4ac47a:a.fontStyle,f98e44dc:a.fontFamily,"93b87770":a.marginLeftStat,c7f7beba:a.fontSizeStat}))},U2=v1.setup;v1.setup=U2?(a,d)=>(B2(),U2(a,d)):B2;const bP=a=>(g.pushScopeId("data-v-f3ee6b2b"),a=a(),g.popScopeId(),a),xP=["src"],_P={key:1,class:"text"},wP=["src"],kP={class:"stats"},TP=bP(()=>g.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),SP={class:"numstats"},AP={class:"leyend"};function EP(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["button",ae.status&&A.typeOnOff&&"button-active"]),style:g.normalizeStyle([O.customStyle,ae.status&&A.typeOnOff&&O.customActive]),onClick:d[0]||(d[0]=(...E)=>O.btnClick&&O.btnClick(...E))},[A.icon&&A.iconPosition.toLowerCase()==="left"?(g.openBlock(),g.createElementBlock("img",{key:0,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,xP)):g.createCommentVNode("",!0),A.textValue?(g.openBlock(),g.createElementBlock("div",_P,g.toDisplayString(A.textValue),1)):g.createCommentVNode("",!0),A.icon&&A.iconPosition.toLowerCase()==="right"?(g.openBlock(),g.createElementBlock("img",{key:2,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,wP)):g.createCommentVNode("",!0)],6)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...E)=>O.btnClick&&O.btnClick(...E))},[g.createElementVNode("div",kP,[TP,g.createElementVNode("div",SP,g.toDisplayString(A.textStat),1)]),g.createElementVNode("div",AP,g.toDisplayString(A.textCategory),1)])):g.createCommentVNode("",!0)])}const CP=vP(v1,[["render",EP],["__scopeId","data-v-f3ee6b2b"]]),MP=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},PP={key:1},LP={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},zP=["fill"],OP={key:0,class:"checkbox__teams"},NP={class:"checkbox__teams__logo"},RP=["src"],DP={class:"checkbox__teams__logo"},IP=["src"],FP={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(a){return["left","right","top","bottom"].includes(a)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(a,{emit:d}){const A=a;g.useCssVars(u=>({"7bd9d47b":a.width,"34dc7ddc":a.height}));const U=g.ref(!1),ae=g.computed(()=>{const u={color:A.boxValueColor,"font-family":A.fontFamily,height:A.boxWidthAndHeight,width:A.boxWidthAndHeight,minWidth:A.boxWidthAndHeight,"border-radius":A.boxBorderRadius,"margin-top":A.boxMarginTop};return U.value?(u["background-color"]=A.boxBackgroundColor,u.border=`solid ${A.boxBorderWidth} ${A.boxBackgroundColor}`):u.border=`solid ${A.boxBorderWidth} ${A.boxBorderColor}`,u}),O=g.computed(()=>({"font-family":A.boxValueFontFamily,"font-size":A.boxValueFontSize,color:A.boxValueColor,"line-height":1})),E=g.computed(()=>{const u={color:A.labelColor,"font-family":A.fontFamily,"font-size":A.labelFontSize,"white-space":A.labelWhiteSpace,"text-align":A.boxPosition==="top"||A.boxPosition==="bottom"?"center":A.boxPosition};return(A.boxPosition==="left"||A.boxPosition==="right")&&(u[`margin-${A.boxPosition}`]=A.isBoxOnly?"0":A.teamsIds?"8px":"10px"),u});g.watch(()=>A.modelValue,u=>{u!==U.value&&(U.value=u)},{immediate:!0});function t(){A.avoidInteraction||!U.value&&A.avoidToCheck||(U.value=!U.value,d("update:modelValue",U.value))}function x(u){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${u}.png`}return(u,e)=>(g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["checkbox",`box-${a.boxPosition}`]),onClick:t},[g.createElementVNode("div",{class:"checkbox__box",style:g.normalizeStyle(ae.value)},[U.value?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[A.boxValue?(g.openBlock(),g.createElementBlock("div",{key:0,class:"checkbox__box__value",style:g.normalizeStyle(O.value)},g.toDisplayString(a.boxValue),5)):(g.openBlock(),g.createElementBlock("div",PP,[(g.openBlock(),g.createElementBlock("svg",LP,[g.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:a.boxValueColor},null,8,zP)]))]))],64)):g.createCommentVNode("",!0)],4),a.teamsIds&&a.teamsIds.length?(g.openBlock(),g.createElementBlock("div",OP,[g.createElementVNode("div",NP,[g.createElementVNode("img",{src:x(a.teamsIds[0]),alt:""},null,8,RP)]),g.createElementVNode("div",DP,[g.createElementVNode("img",{src:x(a.teamsIds[1]),alt:""},null,8,IP)])])):g.createCommentVNode("",!0),g.createElementVNode("div",{class:"checkbox__label",style:g.normalizeStyle(E.value)},g.toDisplayString(a.label),5)],2))}},VP=MP(FP,[["__scopeId","data-v-b6f124d8"]]),BP=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},b1={components:{GSCButton:CP,GSCCheckbox:VP},data(){return{update:0,all:!1,refreshBtn14:0,refreshBtn24:0,refreshBtn34:0,refreshBtn44:0,sectors:Array.from({length:16},(a,d)=>({sector:d+1,active:!1})),lastUpdatedValue:[]}},props:{backgroundColor:{type:String,default:"#2e3b46"},heightContainer:{type:String,default:"340px"},widthContainer:{type:String,default:"455px"},heightField:{type:Number,default:230},widthField:{type:Number,default:350},heightFieldGrid:{type:String,default:"230px"},widthFieldGrid:{type:String,default:"350px"},backgroundSectorActive:{type:String,default:"#cbee6b"},backgroundSectorDisabled:{type:String,default:"#2e3b46"},borderWidth:{type:Number,default:1},opacitySector:{type:Number,default:.5},borderColor:{type:String,default:"#FFFFFF"},colorLineField:{type:String,default:"#bfc2c5"},borderWidthLineField:{type:Number,default:2},value:{type:Array,default:()=>[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},title:{type:String,default:"Pase(s) desde la(s) zona(s):"},titleFontSize:{type:String,default:"14px"}},watch:{value:{deep:!0,immediate:!0,handler(a){const d=a.sort();JSON.stringify(d)!==JSON.stringify(this.lastUpdatedValue)&&(this.lastUpdatedValue=d,this.sectors.forEach((A,U)=>{A.active=a.includes(U+1),this.validateField(U)}),this.$emit("update:modelValue",a))}},sectors:{handler(a){var d=[];for(let A=0;A<a.length;A++)a[A].active&&d.push(A+1);this.$emit("update:modelValue",d)},deep:!0}},computed:{translx(){var a=0;return this.widthField>305?a=this.widthField-305:this.widthField==268&&(a=-36),a},transly(){var a=0;return this.heightField>195?(a=this.heightField-195,a=a/2):this.heightField==180&&(a=-7),a},translxcircle(){var a=0;return this.widthField>305?(a=this.widthField-305,a=a/2):this.widthField==268&&(a=-18),a}},methods:{clickAll(a){if(a){for(let d=0;d<this.sectors.length;d++)this.sectors[d].active=!0,this.validateField(d);this.status14=!0,this.status24=!0,this.status34=!0,this.status44=!0,this.refreshBtn14+=1,this.refreshBtn24+=1,this.refreshBtn34+=1,this.refreshBtn44+=1}else for(let d=0;d<this.sectors.length;d++)this.sectors[d].active=!1,this.validateField(d),this.status14=!1,this.status24=!1,this.status34=!1,this.status44=!1,this.refreshBtn14=0,this.refreshBtn24=0,this.refreshBtn34=0,this.refreshBtn44=0},selectSector(a){var d=0;this.sectors[a].active=!this.sectors[a].active;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0&&(this.sectors[a].active=!0),this.validateField(a)},btn14(a){this.sectors[0].active=a?this.sectors[0].active=!0:this.sectors[0].active=!1,this.sectors[1].active=a?this.sectors[1].active=!0:this.sectors[1].active=!1,this.sectors[2].active=a?this.sectors[2].active=!0:this.sectors[2].active=!1,this.sectors[3].active=a?this.sectors[3].active=!0:this.sectors[3].active=!1;var d=0;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0?(this.sectors[0].active=!0,this.sectors[1].active=!0,this.sectors[2].active=!0,this.sectors[3].active=!0,this.status14=!0,this.refreshBtn14+=1):this.status14=!1,d==16&&(this.all=!0,this.update+=1)},btn24(a){this.sectors[4].active=a?this.sectors[4].active=!0:this.sectors[4].active=!1,this.sectors[5].active=a?this.sectors[5].active=!0:this.sectors[5].active=!1,this.sectors[6].active=a?this.sectors[6].active=!0:this.sectors[6].active=!1,this.sectors[7].active=a?this.sectors[7].active=!0:this.sectors[7].active=!1;var d=0;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0?(this.sectors[4].active=!0,this.sectors[5].active=!0,this.sectors[6].active=!0,this.sectors[7].active=!0,this.status24=!0,this.refreshBtn24+=1):this.status24=!1,d==16&&(this.all=!0,this.update+=1)},btn34(a){this.sectors[8].active=a?this.sectors[8].active=!0:this.sectors[8].active=!1,this.sectors[9].active=a?this.sectors[9].active=!0:this.sectors[9].active=!1,this.sectors[10].active=a?this.sectors[10].active=!0:this.sectors[10].active=!1,this.sectors[11].active=a?this.sectors[11].active=!0:this.sectors[11].active=!1;var d=0;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0?(this.sectors[8].active=!0,this.sectors[9].active=!0,this.sectors[10].active=!0,this.sectors[11].active=!0,this.status34=!0,this.refreshBtn34+=1):this.status34=!1,d==16&&(this.all=!0,this.update+=1)},btn44(a){this.sectors[12].active=a?this.sectors[12].active=!0:this.sectors[12].active=!1,this.sectors[13].active=a?this.sectors[13].active=!0:this.sectors[13].active=!1,this.sectors[14].active=a?this.sectors[14].active=!0:this.sectors[14].active=!1,this.sectors[15].active=a?this.sectors[15].active=!0:this.sectors[15].active=!1;var d=0;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0?(this.sectors[12].active=!0,this.sectors[13].active=!0,this.sectors[14].active=!0,this.sectors[15].active=!0,this.status44=!0,this.refreshBtn44+=1):this.status44=!1,d==16&&(this.all=!0,this.update+=1)},validateField(a){(a===0||a===1||a===2||a===3)&&(this.status14=!!(this.sectors[0].active&&this.sectors[1].active&&this.sectors[2].active&&this.sectors[3].active)),(a===4||a===5||a===6||a===7)&&(this.status24=!!(this.sectors[4].active&&this.sectors[5].active&&this.sectors[6].active&&this.sectors[7].active)),(a===8||a===9||a===10||a===11)&&(this.status34=!!(this.sectors[8].active&&this.sectors[9].active&&this.sectors[10].active&&this.sectors[11].active)),(a===12||a===13||a===14||a===15)&&(this.status44=!!(this.sectors[12].active&&this.sectors[13].active&&this.sectors[14].active&&this.sectors[15].active)),this.all=!!(this.status14&&this.status34&&this.status24&&this.status44),this.update+=1,this.status14&&(this.refreshBtn14+=1),this.status24&&(this.refreshBtn24+=1),this.status34&&(this.refreshBtn34+=1),this.status44&&(this.refreshBtn44+=1)}}},j2=()=>{g.useCssVars(a=>({"4fe806fe":a.widthContainer,"91de7c52":a.heightContainer,"266afcdc":a.backgroundColor,"2b853536":a.titleFontSize,"986b6446":a.widthFieldGrid,"1af308b6":a.heightFieldGrid}))},q2=b1.setup;b1.setup=q2?(a,d)=>(j2(),q2(a,d)):j2;const UP={class:"gsc-field"},jP={class:"gsc-field__title-checked"},qP={class:"gsc-field__title-checked__title"},WP={class:"gsc-field__container-field"},HP={class:"gsc-field__container-field__field"},GP={width:"100%",height:"100%",fill:"#2e3b46",xmlns:"http://www.w3.org/2000/svg"},XP=["stroke"],KP=["stroke","stroke-width"],JP=["stroke","stroke-width"],$P=["stroke-width","stroke"],ZP=["fill","fill-opacity","stroke","stroke-width"],YP=["fill","fill-opacity","stroke","stroke-width"],QP=["fill","fill-opacity","stroke","stroke-width"],eL=["fill","fill-opacity","stroke","stroke-width"],tL=["fill","fill-opacity","stroke","stroke-width"],rL=["fill","fill-opacity","stroke","stroke-width"],nL=["fill","fill-opacity","stroke","stroke-width"],aL=["fill","fill-opacity","stroke","stroke-width"],iL=["fill","fill-opacity","stroke","stroke-width"],oL=["fill","fill-opacity","stroke","stroke-width"],sL=["fill","fill-opacity","stroke","stroke-width"],lL=["fill","fill-opacity","stroke","stroke-width"],cL=["fill","fill-opacity","stroke","stroke-width"],uL=["fill","fill-opacity","stroke","stroke-width"],dL=["fill","fill-opacity","stroke","stroke-width"],hL=["fill","fill-opacity","stroke","stroke-width"],pL={class:"gsc-field__container-field__bar-buttons"};function fL(a,d,A,U,ae,O){const E=g.resolveComponent("GSCCheckbox"),t=g.resolveComponent("GSCButton");return g.openBlock(),g.createElementBlock("div",UP,[g.createElementVNode("div",jP,[g.createElementVNode("div",qP,g.toDisplayString(A.title),1),g.createElementVNode("div",{class:"gsc-field__title-checked__check-cont",style:g.normalizeStyle(A.widthField>=350?"min-width: 123px":"")},[(g.openBlock(),g.createBlock(E,{label:A.widthField<350?"Todas":"Todas las zonas","font-family":"Poppins-Regular","box-value-font-family":"Poppins-Regular","box-position":"right","label-font-size":A.titleFontSize,"label-white-space":"nowrap","box-margin-top":"0.4em",value:ae.all,key:ae.update,"model-value":ae.all,"onUpdate:modelValue":O.clickAll},null,8,["label","label-font-size","value","model-value","onUpdate:modelValue"]))],4)]),g.createElementVNode("div",WP,[g.createElementVNode("div",HP,[(g.openBlock(),g.createElementBlock("svg",GP,[g.createElementVNode("rect",{x:"1.5",y:"0.5",width:"100%",height:"100%",rx:"1.5",stroke:A.colorLineField},null,8,XP),g.createElementVNode("path",{style:g.normalizeStyle("transform: translate("+O.translx+"px, "+O.transly+"px);"),d:"M303.597 39.9799H263.371C262.817 39.9799 262.369 40.4301 262.371 40.984L262.842 155.176C262.845 155.726 263.292 156.172 263.842 156.172H302.884",stroke:A.colorLineField,"stroke-width":A.borderWidthLineField,"stroke-linecap":"square"},null,12,KP),g.createElementVNode("path",{style:g.normalizeStyle("transform: translateY("+O.transly+"px);"),class:"porteria1",d:"M1.09097 156.172L41.3162 156.172C41.8701 156.172 42.3185 155.722 42.3162 155.168L41.845 40.9758C41.8427 40.4252 41.3957 39.98 40.845 39.98L1.80338 39.98",stroke:A.colorLineField,"stroke-width":A.borderWidthLineField,"stroke-linecap":"square"},null,12,JP),g.createElementVNode("path",{style:g.normalizeStyle("transform: translate("+O.translxcircle+"px, "+O.transly+"px);"),class:"circle",d:"M182.911 97.4512C182.911 113.726 169.44 126.936 152.801 126.936C136.162 126.936 122.691 113.726 122.691 97.4512C122.691 81.1767 136.162 67.9662 152.801 67.9662C169.44 67.9662 182.911 81.1767 182.911 97.4512Z","stroke-width":A.borderWidthLineField,stroke:A.colorLineField},null,12,$P),g.createElementVNode("rect",{x:"0%",y:"0%",width:"25%",height:"25%",fill:ae.sectors[0].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[0]||(d[0]=x=>O.selectSector(0))},null,8,ZP),g.createElementVNode("rect",{x:"0%",y:"25%",width:"25%",height:"25%",fill:ae.sectors[1].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[1]||(d[1]=x=>O.selectSector(1))},null,8,YP),g.createElementVNode("rect",{x:"0%",y:"50%",width:"25%",height:"25%",fill:ae.sectors[2].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[2]||(d[2]=x=>O.selectSector(2))},null,8,QP),g.createElementVNode("rect",{x:"0%",y:"75%",width:"25%",height:"25%",fill:ae.sectors[3].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[3]||(d[3]=x=>O.selectSector(3))},null,8,eL),g.createElementVNode("rect",{x:"25%",y:"0%",width:"25%",height:"25%",fill:ae.sectors[4].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[4]||(d[4]=x=>O.selectSector(4))},null,8,tL),g.createElementVNode("rect",{x:"25%",y:"25%",width:"25%",height:"25%",fill:ae.sectors[5].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[5]||(d[5]=x=>O.selectSector(5))},null,8,rL),g.createElementVNode("rect",{x:"25%",y:"50%",width:"25%",height:"25%",fill:ae.sectors[6].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[6]||(d[6]=x=>O.selectSector(6))},null,8,nL),g.createElementVNode("rect",{x:"25%",y:"75%",width:"25%",height:"25%",fill:ae.sectors[7].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[7]||(d[7]=x=>O.selectSector(7))},null,8,aL),g.createElementVNode("rect",{x:"50%",y:"0%",width:"25%",height:"25%",fill:ae.sectors[8].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[8]||(d[8]=x=>O.selectSector(8))},null,8,iL),g.createElementVNode("rect",{x:"50%",y:"25%",width:"25%",height:"25%",fill:ae.sectors[9].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[9]||(d[9]=x=>O.selectSector(9))},null,8,oL),g.createElementVNode("rect",{x:"50%",y:"50%",width:"25%",height:"25%",fill:ae.sectors[10].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[10]||(d[10]=x=>O.selectSector(10))},null,8,sL),g.createElementVNode("rect",{x:"50%",y:"75%",width:"25%",height:"25%",fill:ae.sectors[11].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[11]||(d[11]=x=>O.selectSector(11))},null,8,lL),g.createElementVNode("rect",{x:"75%",y:"0%",width:"25%",height:"25%",fill:ae.sectors[12].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[12]||(d[12]=x=>O.selectSector(12))},null,8,cL),g.createElementVNode("rect",{x:"75%",y:"25%",width:"25%",height:"25%",fill:ae.sectors[13].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[13]||(d[13]=x=>O.selectSector(13))},null,8,uL),g.createElementVNode("rect",{x:"75%",y:"50%",width:"25%",height:"25%",fill:ae.sectors[14].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[14]||(d[14]=x=>O.selectSector(14))},null,8,dL),g.createElementVNode("rect",{x:"75%",y:"75%",width:"25%",height:"25%",fill:ae.sectors[15].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[15]||(d[15]=x=>O.selectSector(15))},null,8,hL)]))]),g.createElementVNode("div",pL,[(g.openBlock(),g.createBlock(t,{"text-value":"1/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn14",onStatus:O.btn14,key:ae.refreshBtn14,value:a.status14},null,8,["onStatus","value"])),(g.openBlock(),g.createBlock(t,{"text-value":"2/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn24",onStatus:O.btn24,key:ae.refreshBtn24,value:a.status24},null,8,["onStatus","value"])),(g.openBlock(),g.createBlock(t,{"text-value":"3/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn34",onStatus:O.btn34,key:ae.refreshBtn34,value:a.status34},null,8,["onStatus","value"])),(g.openBlock(),g.createBlock(t,{"text-value":"4/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn44",onStatus:O.btn44,key:ae.refreshBtn44,value:a.status44},null,8,["onStatus","value"]))])])])}const mL=BP(b1,[["render",fL],["__scopeId","data-v-b85699b8"]]);function W2(a,d){return function(){return a.apply(d,arguments)}}const{toString:gL}=Object.prototype,{getPrototypeOf:x1}=Object,{iterator:n0,toStringTag:H2}=Symbol,a0=(a=>d=>{const A=gL.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Fu=a=>(a=a.toLowerCase(),d=>a0(d)===a),i0=a=>d=>typeof d===a,{isArray:mp}=Array,mf=i0("undefined");function yL(a){return a!==null&&!mf(a)&&a.constructor!==null&&!mf(a.constructor)&&eu(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const G2=Fu("ArrayBuffer");function vL(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&G2(a.buffer),d}const bL=i0("string"),eu=i0("function"),X2=i0("number"),o0=a=>a!==null&&typeof a=="object",xL=a=>a===!0||a===!1,s0=a=>{if(a0(a)!=="object")return!1;const d=x1(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(H2 in a)&&!(n0 in a)},_L=Fu("Date"),wL=Fu("File"),kL=Fu("Blob"),TL=Fu("FileList"),SL=a=>o0(a)&&eu(a.pipe),AL=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||eu(a.append)&&((d=a0(a))==="formdata"||d==="object"&&eu(a.toString)&&a.toString()==="[object FormData]"))},EL=Fu("URLSearchParams"),[CL,ML,PL,LL]=["ReadableStream","Request","Response","Headers"].map(Fu),zL=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gf(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),mp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function K2(a,d){d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const Sh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,J2=a=>!mf(a)&&a!==Sh;function _1(){const{caseless:a}=J2(this)&&this||{},d={},A=(U,ae)=>{const O=a&&K2(d,ae)||ae;s0(d[O])&&s0(U)?d[O]=_1(d[O],U):s0(U)?d[O]=_1({},U):mp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&gf(arguments[U],A);return d}const OL=(a,d,A,{allOwnKeys:U}={})=>(gf(d,(ae,O)=>{A&&eu(ae)?a[O]=W2(ae,A):a[O]=ae},{allOwnKeys:U}),a),NL=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),RL=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},DL=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&x1(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},IL=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},FL=a=>{if(!a)return null;if(mp(a))return a;let d=a.length;if(!X2(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},VL=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&x1(Uint8Array)),BL=(a,d)=>{const A=(a&&a[n0]).call(a);let U;for(;(U=A.next())&&!U.done;){const ae=U.value;d.call(a,ae[0],ae[1])}},UL=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},jL=Fu("HTMLFormElement"),qL=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,A,U){return A.toUpperCase()+U}),$2=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),WL=Fu("RegExp"),Z2=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};gf(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},HL=a=>{Z2(a,(d,A)=>{if(eu(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(eu(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},GL=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return mp(a)?U(a):U(String(a).split(d)),A},XL=()=>{},KL=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function JL(a){return!!(a&&eu(a.append)&&a[H2]==="FormData"&&a[n0])}const $L=a=>{const d=new Array(10),A=(U,ae)=>{if(o0(U)){if(d.indexOf(U)>=0)return;if(!("toJSON"in U)){d[ae]=U;const O=mp(U)?[]:{};return gf(U,(E,t)=>{const x=A(E,ae+1);!mf(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},ZL=Fu("AsyncFunction"),YL=a=>a&&(o0(a)||eu(a))&&eu(a.then)&&eu(a.catch),Y2=((a,d)=>a?setImmediate:d?((A,U)=>(Sh.addEventListener("message",({source:ae,data:O})=>{ae===Sh&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),Sh.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",eu(Sh.postMessage)),QL=typeof queueMicrotask<"u"?queueMicrotask.bind(Sh):typeof process<"u"&&process.nextTick||Y2,ez=a=>a!=null&&eu(a[n0]),Gn={isArray:mp,isArrayBuffer:G2,isBuffer:yL,isFormData:AL,isArrayBufferView:vL,isString:bL,isNumber:X2,isBoolean:xL,isObject:o0,isPlainObject:s0,isReadableStream:CL,isRequest:ML,isResponse:PL,isHeaders:LL,isUndefined:mf,isDate:_L,isFile:wL,isBlob:kL,isRegExp:WL,isFunction:eu,isStream:SL,isURLSearchParams:EL,isTypedArray:VL,isFileList:TL,forEach:gf,merge:_1,extend:OL,trim:zL,stripBOM:NL,inherits:RL,toFlatObject:DL,kindOf:a0,kindOfTest:Fu,endsWith:IL,toArray:FL,forEachEntry:BL,matchAll:UL,isHTMLForm:jL,hasOwnProperty:$2,hasOwnProp:$2,reduceDescriptors:Z2,freezeMethods:HL,toObjectSet:GL,toCamelCase:qL,noop:XL,toFiniteNumber:KL,findKey:K2,global:Sh,isContextDefined:J2,isSpecCompliantForm:JL,toJSONObject:$L,isAsyncFn:ZL,isThenable:YL,setImmediate:Y2,asap:QL,isIterable:ez};function di(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}Gn.inherits(di,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:Gn.toJSONObject(this.config),code:this.code,status:this.status}}});const Q2=di.prototype,e_={};["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(a=>{e_[a]={value:a}}),Object.defineProperties(di,e_),Object.defineProperty(Q2,"isAxiosError",{value:!0}),di.from=(a,d,A,U,ae,O)=>{const E=Object.create(Q2);return Gn.toFlatObject(a,E,function(t){return t!==Error.prototype},t=>t!=="isAxiosError"),di.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const tz=null;function w1(a){return Gn.isPlainObject(a)||Gn.isArray(a)}function t_(a){return Gn.endsWith(a,"[]")?a.slice(0,-2):a}function r_(a,d,A){return a?a.concat(d).map(function(U,ae){return U=t_(U),!A&&ae?"["+U+"]":U}).join(A?".":""):d}function rz(a){return Gn.isArray(a)&&!a.some(w1)}const nz=Gn.toFlatObject(Gn,{},null,function(a){return/^is[A-Z]/.test(a)});function l0(a,d,A){if(!Gn.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=Gn.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,h){return!Gn.isUndefined(h[v])});const U=A.metaTokens,ae=A.visitor||u,O=A.dots,E=A.indexes,t=(A.Blob||typeof Blob<"u"&&Blob)&&Gn.isSpecCompliantForm(d);if(!Gn.isFunction(ae))throw new TypeError("visitor must be a function");function x(v){if(v===null)return"";if(Gn.isDate(v))return v.toISOString();if(!t&&Gn.isBlob(v))throw new di("Blob is not supported. Use a Buffer instead.");return Gn.isArrayBuffer(v)||Gn.isTypedArray(v)?t&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,h,r){let n=v;if(v&&!r&&typeof v=="object"){if(Gn.endsWith(h,"{}"))h=U?h:h.slice(0,-2),v=JSON.stringify(v);else if(Gn.isArray(v)&&rz(v)||(Gn.isFileList(v)||Gn.endsWith(h,"[]"))&&(n=Gn.toArray(v)))return h=t_(h),n.forEach(function(c,o){!(Gn.isUndefined(c)||c===null)&&d.append(E===!0?r_([h],o,O):E===null?h:h+"[]",x(c))}),!1}return w1(v)?!0:(d.append(r_(r,h,O),x(v)),!1)}const e=[],b=Object.assign(nz,{defaultVisitor:u,convertValue:x,isVisitable:w1});function f(v,h){if(!Gn.isUndefined(v)){if(e.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));e.push(v),Gn.forEach(v,function(r,n){(!(Gn.isUndefined(r)||r===null)&&ae.call(d,r,Gn.isString(n)?n.trim():n,h,b))===!0&&f(r,h?h.concat(n):[n])}),e.pop()}}if(!Gn.isObject(a))throw new TypeError("data must be an object");return f(a),d}function n_(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(A){return d[A]})}function k1(a,d){this._pairs=[],a&&l0(a,this,d)}const a_=k1.prototype;a_.append=function(a,d){this._pairs.push([a,d])},a_.toString=function(a){const d=a?function(A){return a.call(this,A,n_)}:n_;return this._pairs.map(function(A){return d(A[0])+"="+d(A[1])},"").join("&")};function az(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function i_(a,d,A){if(!d)return a;const U=A&&A.encode||az;Gn.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=Gn.isURLSearchParams(d)?d.toString():new k1(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}const o_=class{constructor(){this.handlers=[]}use(a,d,A){return this.handlers.push({fulfilled:a,rejected:d,synchronous:A?A.synchronous:!1,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){Gn.forEach(this.handlers,function(d){d!==null&&a(d)})}},s_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},iz=typeof URLSearchParams<"u"?URLSearchParams:k1,oz=typeof FormData<"u"?FormData:null,sz=typeof Blob<"u"?Blob:null,lz={isBrowser:!0,classes:{URLSearchParams:iz,FormData:oz,Blob:sz},protocols:["http","https","file","blob","url","data"]},T1=typeof window<"u"&&typeof document<"u",S1=typeof navigator=="object"&&navigator||void 0,cz=T1&&(!S1||["ReactNative","NativeScript","NS"].indexOf(S1.product)<0),uz=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dz=T1&&window.location.href||"http://localhost",hz=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:T1,hasStandardBrowserEnv:cz,hasStandardBrowserWebWorkerEnv:uz,navigator:S1,origin:dz},Symbol.toStringTag,{value:"Module"})),kc={...hz,...lz};function pz(a,d){return l0(a,new kc.classes.URLSearchParams,Object.assign({visitor:function(A,U,ae,O){return kc.isNode&&Gn.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)}},d))}function fz(a){return Gn.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function mz(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function l_(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&Gn.isArray(ae)?ae.length:E,x?(Gn.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!Gn.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&Gn.isArray(ae[E])&&(ae[E]=mz(ae[E])),!t)}if(Gn.isFormData(a)&&Gn.isFunction(a.entries)){const A={};return Gn.forEachEntry(a,(U,ae)=>{d(fz(U),ae,A,0)}),A}return null}function gz(a,d,A){if(Gn.isString(a))try{return(d||JSON.parse)(a),Gn.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const A1={transitional:s_,adapter:["xhr","http","fetch"],transformRequest:[function(a,d){const A=d.getContentType()||"",U=A.indexOf("application/json")>-1,ae=Gn.isObject(a);if(ae&&Gn.isHTMLForm(a)&&(a=new FormData(a)),Gn.isFormData(a))return U?JSON.stringify(l_(a)):a;if(Gn.isArrayBuffer(a)||Gn.isBuffer(a)||Gn.isStream(a)||Gn.isFile(a)||Gn.isBlob(a)||Gn.isReadableStream(a))return a;if(Gn.isArrayBufferView(a))return a.buffer;if(Gn.isURLSearchParams(a))return d.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let O;if(ae){if(A.indexOf("application/x-www-form-urlencoded")>-1)return pz(a,this.formSerializer).toString();if((O=Gn.isFileList(a))||A.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return l0(O?{"files[]":a}:a,E&&new E,this.formSerializer)}}return ae||U?(d.setContentType("application/json",!1),gz(a)):a}],transformResponse:[function(a){const d=this.transitional||A1.transitional,A=d&&d.forcedJSONParsing,U=this.responseType==="json";if(Gn.isResponse(a)||Gn.isReadableStream(a))return a;if(a&&Gn.isString(a)&&(A&&!this.responseType||U)){const ae=!(d&&d.silentJSONParsing)&&U;try{return JSON.parse(a)}catch(O){if(ae)throw O.name==="SyntaxError"?di.from(O,di.ERR_BAD_RESPONSE,this,null,this.response):O}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kc.classes.FormData,Blob:kc.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Gn.forEach(["delete","get","head","post","put","patch"],a=>{A1.headers[a]={}});const E1=A1,yz=Gn.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"]),vz=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4030
|
+
`),Et=pe.createShader(pe.FRAGMENT_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Et,At),pe.compileShader(Et),!pe.getShaderParameter(Et,pe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${pe.getShaderInfoLog(Et)}`);pe.attachShader(this.program,Et);const Kt=pe.createShader(pe.VERTEX_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Kt,Vt),pe.compileShader(Kt),!pe.getShaderParameter(Kt,pe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${pe.getShaderInfoLog(Kt)}`);pe.attachShader(this.program,Kt),this.attributes={};const Yt={};this.numAttributes=De.length;for(let Jt=0;Jt<this.numAttributes;Jt++)De[Jt]&&(pe.bindAttribLocation(this.program,Jt,De[Jt]),this.attributes[De[Jt]]=Jt);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(Kt),pe.deleteShader(Et);for(let Jt=0;Jt<vt.length;Jt++){const dr=vt[Jt];if(dr&&!Yt[dr]){const xr=pe.getUniformLocation(this.program,dr);xr&&(Yt[dr]=xr)}}this.fixedUniforms=B(i,Yt),this.terrainUniforms=((Jt,dr)=>({u_depth:new e.aI(Jt,dr.u_depth),u_terrain:new e.aI(Jt,dr.u_terrain),u_terrain_dim:new e.aJ(Jt,dr.u_terrain_dim),u_terrain_matrix:new e.aK(Jt,dr.u_terrain_matrix),u_terrain_unpack:new e.aL(Jt,dr.u_terrain_unpack),u_terrain_exaggeration:new e.aJ(Jt,dr.u_terrain_exaggeration)}))(i,Yt),this.binderUniforms=R?R.getUniforms(i,Yt):[]}draw(i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct,pt,vt,Mt,At,Vt){const Et=i.gl;if(this.failedToCreate)return;if(i.program.set(this.program),i.setDepthMode(R),i.setStencilMode(B),i.setColorMode(G),i.setCullFace(ie),xe){i.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,xe.depthTexture),i.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,xe.texture);for(const Yt in this.terrainUniforms)this.terrainUniforms[Yt].set(xe[Yt])}for(const Yt in this.fixedUniforms)this.fixedUniforms[Yt].set(pe[Yt]);vt&&vt.setUniforms(i,this.binderUniforms,ct,{zoom:pt});let Kt=0;switch(s){case Et.LINES:Kt=2;break;case Et.TRIANGLES:Kt=3;break;case Et.LINE_STRIP:Kt=1}for(const Yt of rt.get()){const Jt=Yt.vaos||(Yt.vaos={});(Jt[Se]||(Jt[Se]=new Fn)).bind(i,this,De,vt?vt.getPaintVertexBuffers():[],Ue,Yt.vertexOffset,Mt,At,Vt),Et.drawElements(s,Yt.primitiveLength*Kt,Et.UNSIGNED_SHORT,Yt.primitiveOffset*Kt*2)}}}function Br(F,i,s){const R=1/Tt(s,1,i.transform.tileZoom),B=Math.pow(2,s.tileID.overscaledZ),G=s.tileSize*Math.pow(2,i.transform.tileZoom)/B,ie=G*(s.tileID.canonical.x+s.tileID.wrap*B),pe=G*s.tileID.canonical.y;return{u_image:0,u_texsize:s.imageAtlasTexture.size,u_scale:[R,F.fromScale,F.toScale],u_fade:F.t,u_pixel_coord_upper:[ie>>16,pe>>16],u_pixel_coord_lower:[65535&ie,65535&pe]}}const rn=(F,i,s,R)=>{const B=i.style.light,G=B.properties.get("position"),ie=[G.x,G.y,G.z],pe=function(){var Se=new e.A(9);return e.A!=Float32Array&&(Se[1]=0,Se[2]=0,Se[3]=0,Se[5]=0,Se[6]=0,Se[7]=0),Se[0]=1,Se[4]=1,Se[8]=1,Se}();B.properties.get("anchor")==="viewport"&&function(Se,De){var Ue=Math.sin(De),rt=Math.cos(De);Se[0]=rt,Se[1]=Ue,Se[2]=0,Se[3]=-Ue,Se[4]=rt,Se[5]=0,Se[6]=0,Se[7]=0,Se[8]=1}(pe,-i.transform.angle),function(Se,De,Ue){var rt=De[0],ct=De[1],pt=De[2];Se[0]=rt*Ue[0]+ct*Ue[3]+pt*Ue[6],Se[1]=rt*Ue[1]+ct*Ue[4]+pt*Ue[7],Se[2]=rt*Ue[2]+ct*Ue[5]+pt*Ue[8]}(ie,ie,pe);const xe=B.properties.get("color");return{u_matrix:F,u_lightpos:ie,u_lightintensity:B.properties.get("intensity"),u_lightcolor:[xe.r,xe.g,xe.b],u_vertical_gradient:+s,u_opacity:R}},bn=(F,i,s,R,B,G,ie)=>e.e(rn(F,i,s,R),Br(G,i,ie),{u_height_factor:-Math.pow(2,B.overscaledZ)/ie.tileSize/8}),yn=F=>({u_matrix:F}),On=(F,i,s,R)=>e.e(yn(F),Br(s,i,R)),Zn=(F,i)=>({u_matrix:F,u_world:i}),fr=(F,i,s,R,B)=>e.e(On(F,i,s,R),{u_world:B}),jr=(F,i,s,R)=>{const B=F.transform;let G,ie;if(R.paint.get("circle-pitch-alignment")==="map"){const pe=Tt(s,1,B.zoom);G=!0,ie=[pe,pe]}else G=!1,ie=B.pixelsToGLUnits;return{u_camera_to_center_distance:B.cameraToCenterDistance,u_scale_with_map:+(R.paint.get("circle-pitch-scale")==="map"),u_matrix:F.translatePosMatrix(i.posMatrix,s,R.paint.get("circle-translate"),R.paint.get("circle-translate-anchor")),u_pitch_with_map:+G,u_device_pixel_ratio:F.pixelRatio,u_extrude_scale:ie}},tr=(F,i)=>({u_matrix:i,u_pixel_extrude_scale:[1/F.width,1/F.height]}),ir=(F,i,s)=>({u_matrix:F,u_inv_matrix:i,u_camera_to_center_distance:s.cameraToCenterDistance,u_viewport_size:[s.width,s.height]}),gr=(F,i,s=1)=>({u_matrix:F,u_color:i,u_overlay:0,u_overlay_scale:s}),Nr=F=>({u_matrix:F}),Rr=(F,i,s,R)=>({u_matrix:F,u_extrude_scale:Tt(i,1,s),u_intensity:R}),Xr=(F,i,s,R)=>{const B=e.H();e.aQ(B,0,F.width,F.height,0,0,1);const G=F.context.gl;return{u_matrix:B,u_world:[G.drawingBufferWidth,G.drawingBufferHeight],u_image:s,u_color_ramp:R,u_opacity:i.paint.get("heatmap-opacity")}},Vr=(F,i,s,R)=>{const B=s.paint.get("hillshade-shadow-color"),G=s.paint.get("hillshade-highlight-color"),ie=s.paint.get("hillshade-accent-color");let pe=s.paint.get("hillshade-illumination-direction")*(Math.PI/180);s.paint.get("hillshade-illumination-anchor")==="viewport"&&(pe-=F.transform.angle);const xe=!F.options.moving;return{u_matrix:R?R.posMatrix:F.transform.calculatePosMatrix(i.tileID.toUnwrapped(),xe),u_image:0,u_latrange:lr(0,i.tileID),u_light:[s.paint.get("hillshade-exaggeration"),pe],u_shadow:B,u_highlight:G,u_accent:ie}},Pr=(F,i)=>{const s=i.stride,R=e.H();return e.aQ(R,0,e.X,-e.X,0,0,1),e.J(R,R,[0,-e.X,0]),{u_matrix:R,u_image:1,u_dimension:[s,s],u_zoom:F.overscaledZ,u_unpack:i.getUnpackVector()}};function lr(F,i){const s=Math.pow(2,i.canonical.z),R=i.canonical.y;return[new e.Z(0,R/s).toLngLat().lat,new e.Z(0,(R+1)/s).toLngLat().lat]}const sr=(F,i,s,R)=>{const B=F.transform;return{u_matrix:fn(F,i,s,R),u_ratio:1/Tt(i,1,B.zoom),u_device_pixel_ratio:F.pixelRatio,u_units_to_pixels:[1/B.pixelsToGLUnits[0],1/B.pixelsToGLUnits[1]]}},Ar=(F,i,s,R,B)=>e.e(sr(F,i,s,B),{u_image:0,u_image_height:R}),Zr=(F,i,s,R,B)=>{const G=F.transform,ie=ln(i,G);return{u_matrix:fn(F,i,s,B),u_texsize:i.imageAtlasTexture.size,u_ratio:1/Tt(i,1,G.zoom),u_device_pixel_ratio:F.pixelRatio,u_image:0,u_scale:[ie,R.fromScale,R.toScale],u_fade:R.t,u_units_to_pixels:[1/G.pixelsToGLUnits[0],1/G.pixelsToGLUnits[1]]}},cn=(F,i,s,R,B,G)=>{const ie=F.transform,pe=F.lineAtlas,xe=ln(i,ie),Se=s.layout.get("line-cap")==="round",De=pe.getDash(R.from,Se),Ue=pe.getDash(R.to,Se),rt=De.width*B.fromScale,ct=Ue.width*B.toScale;return e.e(sr(F,i,s,G),{u_patternscale_a:[xe/rt,-De.height/2],u_patternscale_b:[xe/ct,-Ue.height/2],u_sdfgamma:pe.width/(256*Math.min(rt,ct)*F.pixelRatio)/2,u_image:0,u_tex_y_a:De.y,u_tex_y_b:Ue.y,u_mix:B.t})};function ln(F,i){return 1/Tt(F,1,i.tileZoom)}function fn(F,i,s,R){return F.translatePosMatrix(R?R.posMatrix:i.tileID.posMatrix,i,s.paint.get("line-translate"),s.paint.get("line-translate-anchor"))}const Cn=(F,i,s,R,B)=>{return{u_matrix:F,u_tl_parent:i,u_scale_parent:s,u_buffer_scale:1,u_fade_t:R.mix,u_opacity:R.opacity*B.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:B.paint.get("raster-brightness-min"),u_brightness_high:B.paint.get("raster-brightness-max"),u_saturation_factor:(ie=B.paint.get("raster-saturation"),ie>0?1-1/(1.001-ie):-ie),u_contrast_factor:(G=B.paint.get("raster-contrast"),G>0?1/(1-G):1+G),u_spin_weights:wn(B.paint.get("raster-hue-rotate"))};var G,ie};function wn(F){F*=Math.PI/180;const i=Math.sin(F),s=Math.cos(F);return[(2*s+1)/3,(-Math.sqrt(3)*i-s+1)/3,(Math.sqrt(3)*i-s+1)/3]}const Pn=(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct)=>{const pt=ie.transform;return{u_is_size_zoom_constant:+(F==="constant"||F==="source"),u_is_size_feature_constant:+(F==="constant"||F==="camera"),u_size_t:i?i.uSizeT:0,u_size:i?i.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+s,u_aspect_ratio:pt.width/pt.height,u_fade_change:ie.options.fadeDuration?ie.symbolFadeChange:1,u_matrix:pe,u_label_plane_matrix:xe,u_coord_matrix:Se,u_is_text:+Ue,u_pitch_with_map:+R,u_is_along_line:B,u_is_variable_anchor:G,u_texsize:rt,u_texture:0,u_translation:De,u_pitched_scale:ct}},_n=(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct,pt)=>{const vt=ie.transform;return e.e(Pn(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,pt),{u_gamma_scale:R?Math.cos(vt._pitch)*vt.cameraToCenterDistance:1,u_device_pixel_ratio:ie.pixelRatio,u_is_halo:1})},An=(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct)=>e.e(_n(F,i,s,R,B,G,ie,pe,xe,Se,De,!0,Ue,!0,ct),{u_texsize_icon:rt,u_texture_icon:1}),Dn=(F,i,s)=>({u_matrix:F,u_opacity:i,u_color:s}),ia=(F,i,s,R,B,G)=>e.e(function(ie,pe,xe,Se){const De=xe.imageManager.getPattern(ie.from.toString()),Ue=xe.imageManager.getPattern(ie.to.toString()),{width:rt,height:ct}=xe.imageManager.getPixelSize(),pt=Math.pow(2,Se.tileID.overscaledZ),vt=Se.tileSize*Math.pow(2,xe.transform.tileZoom)/pt,Mt=vt*(Se.tileID.canonical.x+Se.tileID.wrap*pt),At=vt*Se.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:De.tl,u_pattern_br_a:De.br,u_pattern_tl_b:Ue.tl,u_pattern_br_b:Ue.br,u_texsize:[rt,ct],u_mix:pe.t,u_pattern_size_a:De.displaySize,u_pattern_size_b:Ue.displaySize,u_scale_a:pe.fromScale,u_scale_b:pe.toScale,u_tile_units_to_pixels:1/Tt(Se,1,xe.transform.tileZoom),u_pixel_coord_upper:[Mt>>16,At>>16],u_pixel_coord_lower:[65535&Mt,65535&At]}}(R,G,s,B),{u_matrix:F,u_opacity:i}),$n={fillExtrusion:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_lightpos:new e.aO(F,i.u_lightpos),u_lightintensity:new e.aJ(F,i.u_lightintensity),u_lightcolor:new e.aO(F,i.u_lightcolor),u_vertical_gradient:new e.aJ(F,i.u_vertical_gradient),u_opacity:new e.aJ(F,i.u_opacity)}),fillExtrusionPattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_lightpos:new e.aO(F,i.u_lightpos),u_lightintensity:new e.aJ(F,i.u_lightintensity),u_lightcolor:new e.aO(F,i.u_lightcolor),u_vertical_gradient:new e.aJ(F,i.u_vertical_gradient),u_height_factor:new e.aJ(F,i.u_height_factor),u_image:new e.aI(F,i.u_image),u_texsize:new e.aP(F,i.u_texsize),u_pixel_coord_upper:new e.aP(F,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.aP(F,i.u_pixel_coord_lower),u_scale:new e.aO(F,i.u_scale),u_fade:new e.aJ(F,i.u_fade),u_opacity:new e.aJ(F,i.u_opacity)}),fill:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix)}),fillPattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_image:new e.aI(F,i.u_image),u_texsize:new e.aP(F,i.u_texsize),u_pixel_coord_upper:new e.aP(F,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.aP(F,i.u_pixel_coord_lower),u_scale:new e.aO(F,i.u_scale),u_fade:new e.aJ(F,i.u_fade)}),fillOutline:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_world:new e.aP(F,i.u_world)}),fillOutlinePattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_world:new e.aP(F,i.u_world),u_image:new e.aI(F,i.u_image),u_texsize:new e.aP(F,i.u_texsize),u_pixel_coord_upper:new e.aP(F,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.aP(F,i.u_pixel_coord_lower),u_scale:new e.aO(F,i.u_scale),u_fade:new e.aJ(F,i.u_fade)}),circle:(F,i)=>({u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_scale_with_map:new e.aI(F,i.u_scale_with_map),u_pitch_with_map:new e.aI(F,i.u_pitch_with_map),u_extrude_scale:new e.aP(F,i.u_extrude_scale),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_matrix:new e.aK(F,i.u_matrix)}),collisionBox:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_pixel_extrude_scale:new e.aP(F,i.u_pixel_extrude_scale)}),collisionCircle:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_inv_matrix:new e.aK(F,i.u_inv_matrix),u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_viewport_size:new e.aP(F,i.u_viewport_size)}),debug:(F,i)=>({u_color:new e.aM(F,i.u_color),u_matrix:new e.aK(F,i.u_matrix),u_overlay:new e.aI(F,i.u_overlay),u_overlay_scale:new e.aJ(F,i.u_overlay_scale)}),clippingMask:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix)}),heatmap:(F,i)=>({u_extrude_scale:new e.aJ(F,i.u_extrude_scale),u_intensity:new e.aJ(F,i.u_intensity),u_matrix:new e.aK(F,i.u_matrix)}),heatmapTexture:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_world:new e.aP(F,i.u_world),u_image:new e.aI(F,i.u_image),u_color_ramp:new e.aI(F,i.u_color_ramp),u_opacity:new e.aJ(F,i.u_opacity)}),hillshade:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_image:new e.aI(F,i.u_image),u_latrange:new e.aP(F,i.u_latrange),u_light:new e.aP(F,i.u_light),u_shadow:new e.aM(F,i.u_shadow),u_highlight:new e.aM(F,i.u_highlight),u_accent:new e.aM(F,i.u_accent)}),hillshadePrepare:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_image:new e.aI(F,i.u_image),u_dimension:new e.aP(F,i.u_dimension),u_zoom:new e.aJ(F,i.u_zoom),u_unpack:new e.aL(F,i.u_unpack)}),line:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_ratio:new e.aJ(F,i.u_ratio),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_units_to_pixels:new e.aP(F,i.u_units_to_pixels)}),lineGradient:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_ratio:new e.aJ(F,i.u_ratio),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_units_to_pixels:new e.aP(F,i.u_units_to_pixels),u_image:new e.aI(F,i.u_image),u_image_height:new e.aJ(F,i.u_image_height)}),linePattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_texsize:new e.aP(F,i.u_texsize),u_ratio:new e.aJ(F,i.u_ratio),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_image:new e.aI(F,i.u_image),u_units_to_pixels:new e.aP(F,i.u_units_to_pixels),u_scale:new e.aO(F,i.u_scale),u_fade:new e.aJ(F,i.u_fade)}),lineSDF:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_ratio:new e.aJ(F,i.u_ratio),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_units_to_pixels:new e.aP(F,i.u_units_to_pixels),u_patternscale_a:new e.aP(F,i.u_patternscale_a),u_patternscale_b:new e.aP(F,i.u_patternscale_b),u_sdfgamma:new e.aJ(F,i.u_sdfgamma),u_image:new e.aI(F,i.u_image),u_tex_y_a:new e.aJ(F,i.u_tex_y_a),u_tex_y_b:new e.aJ(F,i.u_tex_y_b),u_mix:new e.aJ(F,i.u_mix)}),raster:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_tl_parent:new e.aP(F,i.u_tl_parent),u_scale_parent:new e.aJ(F,i.u_scale_parent),u_buffer_scale:new e.aJ(F,i.u_buffer_scale),u_fade_t:new e.aJ(F,i.u_fade_t),u_opacity:new e.aJ(F,i.u_opacity),u_image0:new e.aI(F,i.u_image0),u_image1:new e.aI(F,i.u_image1),u_brightness_low:new e.aJ(F,i.u_brightness_low),u_brightness_high:new e.aJ(F,i.u_brightness_high),u_saturation_factor:new e.aJ(F,i.u_saturation_factor),u_contrast_factor:new e.aJ(F,i.u_contrast_factor),u_spin_weights:new e.aO(F,i.u_spin_weights)}),symbolIcon:(F,i)=>({u_is_size_zoom_constant:new e.aI(F,i.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aI(F,i.u_is_size_feature_constant),u_size_t:new e.aJ(F,i.u_size_t),u_size:new e.aJ(F,i.u_size),u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_pitch:new e.aJ(F,i.u_pitch),u_rotate_symbol:new e.aI(F,i.u_rotate_symbol),u_aspect_ratio:new e.aJ(F,i.u_aspect_ratio),u_fade_change:new e.aJ(F,i.u_fade_change),u_matrix:new e.aK(F,i.u_matrix),u_label_plane_matrix:new e.aK(F,i.u_label_plane_matrix),u_coord_matrix:new e.aK(F,i.u_coord_matrix),u_is_text:new e.aI(F,i.u_is_text),u_pitch_with_map:new e.aI(F,i.u_pitch_with_map),u_is_along_line:new e.aI(F,i.u_is_along_line),u_is_variable_anchor:new e.aI(F,i.u_is_variable_anchor),u_texsize:new e.aP(F,i.u_texsize),u_texture:new e.aI(F,i.u_texture),u_translation:new e.aP(F,i.u_translation),u_pitched_scale:new e.aJ(F,i.u_pitched_scale)}),symbolSDF:(F,i)=>({u_is_size_zoom_constant:new e.aI(F,i.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aI(F,i.u_is_size_feature_constant),u_size_t:new e.aJ(F,i.u_size_t),u_size:new e.aJ(F,i.u_size),u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_pitch:new e.aJ(F,i.u_pitch),u_rotate_symbol:new e.aI(F,i.u_rotate_symbol),u_aspect_ratio:new e.aJ(F,i.u_aspect_ratio),u_fade_change:new e.aJ(F,i.u_fade_change),u_matrix:new e.aK(F,i.u_matrix),u_label_plane_matrix:new e.aK(F,i.u_label_plane_matrix),u_coord_matrix:new e.aK(F,i.u_coord_matrix),u_is_text:new e.aI(F,i.u_is_text),u_pitch_with_map:new e.aI(F,i.u_pitch_with_map),u_is_along_line:new e.aI(F,i.u_is_along_line),u_is_variable_anchor:new e.aI(F,i.u_is_variable_anchor),u_texsize:new e.aP(F,i.u_texsize),u_texture:new e.aI(F,i.u_texture),u_gamma_scale:new e.aJ(F,i.u_gamma_scale),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_is_halo:new e.aI(F,i.u_is_halo),u_translation:new e.aP(F,i.u_translation),u_pitched_scale:new e.aJ(F,i.u_pitched_scale)}),symbolTextAndIcon:(F,i)=>({u_is_size_zoom_constant:new e.aI(F,i.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aI(F,i.u_is_size_feature_constant),u_size_t:new e.aJ(F,i.u_size_t),u_size:new e.aJ(F,i.u_size),u_camera_to_center_distance:new e.aJ(F,i.u_camera_to_center_distance),u_pitch:new e.aJ(F,i.u_pitch),u_rotate_symbol:new e.aI(F,i.u_rotate_symbol),u_aspect_ratio:new e.aJ(F,i.u_aspect_ratio),u_fade_change:new e.aJ(F,i.u_fade_change),u_matrix:new e.aK(F,i.u_matrix),u_label_plane_matrix:new e.aK(F,i.u_label_plane_matrix),u_coord_matrix:new e.aK(F,i.u_coord_matrix),u_is_text:new e.aI(F,i.u_is_text),u_pitch_with_map:new e.aI(F,i.u_pitch_with_map),u_is_along_line:new e.aI(F,i.u_is_along_line),u_is_variable_anchor:new e.aI(F,i.u_is_variable_anchor),u_texsize:new e.aP(F,i.u_texsize),u_texsize_icon:new e.aP(F,i.u_texsize_icon),u_texture:new e.aI(F,i.u_texture),u_texture_icon:new e.aI(F,i.u_texture_icon),u_gamma_scale:new e.aJ(F,i.u_gamma_scale),u_device_pixel_ratio:new e.aJ(F,i.u_device_pixel_ratio),u_is_halo:new e.aI(F,i.u_is_halo),u_translation:new e.aP(F,i.u_translation),u_pitched_scale:new e.aJ(F,i.u_pitched_scale)}),background:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_opacity:new e.aJ(F,i.u_opacity),u_color:new e.aM(F,i.u_color)}),backgroundPattern:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_opacity:new e.aJ(F,i.u_opacity),u_image:new e.aI(F,i.u_image),u_pattern_tl_a:new e.aP(F,i.u_pattern_tl_a),u_pattern_br_a:new e.aP(F,i.u_pattern_br_a),u_pattern_tl_b:new e.aP(F,i.u_pattern_tl_b),u_pattern_br_b:new e.aP(F,i.u_pattern_br_b),u_texsize:new e.aP(F,i.u_texsize),u_mix:new e.aJ(F,i.u_mix),u_pattern_size_a:new e.aP(F,i.u_pattern_size_a),u_pattern_size_b:new e.aP(F,i.u_pattern_size_b),u_scale_a:new e.aJ(F,i.u_scale_a),u_scale_b:new e.aJ(F,i.u_scale_b),u_pixel_coord_upper:new e.aP(F,i.u_pixel_coord_upper),u_pixel_coord_lower:new e.aP(F,i.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aJ(F,i.u_tile_units_to_pixels)}),terrain:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_texture:new e.aI(F,i.u_texture),u_ele_delta:new e.aJ(F,i.u_ele_delta),u_fog_matrix:new e.aK(F,i.u_fog_matrix),u_fog_color:new e.aM(F,i.u_fog_color),u_fog_ground_blend:new e.aJ(F,i.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.aJ(F,i.u_fog_ground_blend_opacity),u_horizon_color:new e.aM(F,i.u_horizon_color),u_horizon_fog_blend:new e.aJ(F,i.u_horizon_fog_blend)}),terrainDepth:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_ele_delta:new e.aJ(F,i.u_ele_delta)}),terrainCoords:(F,i)=>({u_matrix:new e.aK(F,i.u_matrix),u_texture:new e.aI(F,i.u_texture),u_terrain_coords_id:new e.aJ(F,i.u_terrain_coords_id),u_ele_delta:new e.aJ(F,i.u_ele_delta)}),sky:(F,i)=>({u_sky_color:new e.aM(F,i.u_sky_color),u_horizon_color:new e.aM(F,i.u_horizon_color),u_horizon:new e.aJ(F,i.u_horizon),u_sky_horizon_blend:new e.aJ(F,i.u_sky_horizon_blend)})};class Nn{constructor(i,s,R){this.context=i;const B=i.gl;this.buffer=B.createBuffer(),this.dynamicDraw=!!R,this.context.unbindVAO(),i.bindElementBuffer.set(this.buffer),B.bufferData(B.ELEMENT_ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?B.DYNAMIC_DRAW:B.STATIC_DRAW),this.dynamicDraw||delete s.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(i){const s=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),s.bufferSubData(s.ELEMENT_ARRAY_BUFFER,0,i.arrayBuffer)}destroy(){const i=this.context.gl;this.buffer&&(i.deleteBuffer(this.buffer),delete this.buffer)}}const Qn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class va{constructor(i,s,R,B){this.length=s.length,this.attributes=R,this.itemSize=s.bytesPerElement,this.dynamicDraw=B,this.context=i;const G=i.gl;this.buffer=G.createBuffer(),i.bindVertexBuffer.set(this.buffer),G.bufferData(G.ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?G.DYNAMIC_DRAW:G.STATIC_DRAW),this.dynamicDraw||delete s.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(i){if(i.length!==this.length)throw new Error(`Length of new data is ${i.length}, which doesn't match current length of ${this.length}`);const s=this.context.gl;this.bind(),s.bufferSubData(s.ARRAY_BUFFER,0,i.arrayBuffer)}enableAttributes(i,s){for(let R=0;R<this.attributes.length;R++){const B=this.attributes[R],G=s.attributes[B.name];G!==void 0&&i.enableVertexAttribArray(G)}}setVertexAttribPointers(i,s,R){for(let B=0;B<this.attributes.length;B++){const G=this.attributes[B],ie=s.attributes[G.name];ie!==void 0&&i.vertexAttribPointer(ie,G.components,i[Qn[G.type]],!1,this.itemSize,G.offset+this.itemSize*(R||0))}}destroy(){const i=this.context.gl;this.buffer&&(i.deleteBuffer(this.buffer),delete this.buffer)}}const Aa=new WeakMap;function vi(F){var i;if(Aa.has(F))return Aa.get(F);{const s=(i=F.getParameter(F.VERSION))===null||i===void 0?void 0:i.startsWith("WebGL 2.0");return Aa.set(F,s),s}}class Ca{constructor(i){this.gl=i.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(i){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class lo extends Ca{getDefault(){return e.aN.transparent}set(i){const s=this.current;(i.r!==s.r||i.g!==s.g||i.b!==s.b||i.a!==s.a||this.dirty)&&(this.gl.clearColor(i.r,i.g,i.b,i.a),this.current=i,this.dirty=!1)}}class wi extends Ca{getDefault(){return 1}set(i){(i!==this.current||this.dirty)&&(this.gl.clearDepth(i),this.current=i,this.dirty=!1)}}class Vi extends Ca{getDefault(){return 0}set(i){(i!==this.current||this.dirty)&&(this.gl.clearStencil(i),this.current=i,this.dirty=!1)}}class jo extends Ca{getDefault(){return[!0,!0,!0,!0]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2]||i[3]!==s[3]||this.dirty)&&(this.gl.colorMask(i[0],i[1],i[2],i[3]),this.current=i,this.dirty=!1)}}class Pa extends Ca{getDefault(){return!0}set(i){(i!==this.current||this.dirty)&&(this.gl.depthMask(i),this.current=i,this.dirty=!1)}}class Qi extends Ca{getDefault(){return 255}set(i){(i!==this.current||this.dirty)&&(this.gl.stencilMask(i),this.current=i,this.dirty=!1)}}class _s extends Ca{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(i){const s=this.current;(i.func!==s.func||i.ref!==s.ref||i.mask!==s.mask||this.dirty)&&(this.gl.stencilFunc(i.func,i.ref,i.mask),this.current=i,this.dirty=!1)}}class $i extends Ca{getDefault(){const i=this.gl;return[i.KEEP,i.KEEP,i.KEEP]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2]||this.dirty)&&(this.gl.stencilOp(i[0],i[1],i[2]),this.current=i,this.dirty=!1)}}class yl extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;i?s.enable(s.STENCIL_TEST):s.disable(s.STENCIL_TEST),this.current=i,this.dirty=!1}}class cs extends Ca{getDefault(){return[0,1]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||this.dirty)&&(this.gl.depthRange(i[0],i[1]),this.current=i,this.dirty=!1)}}class So extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;i?s.enable(s.DEPTH_TEST):s.disable(s.DEPTH_TEST),this.current=i,this.dirty=!1}}class vl extends Ca{getDefault(){return this.gl.LESS}set(i){(i!==this.current||this.dirty)&&(this.gl.depthFunc(i),this.current=i,this.dirty=!1)}}class bl extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;i?s.enable(s.BLEND):s.disable(s.BLEND),this.current=i,this.dirty=!1}}class Fl extends Ca{getDefault(){const i=this.gl;return[i.ONE,i.ZERO]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||this.dirty)&&(this.gl.blendFunc(i[0],i[1]),this.current=i,this.dirty=!1)}}class qo extends Ca{getDefault(){return e.aN.transparent}set(i){const s=this.current;(i.r!==s.r||i.g!==s.g||i.b!==s.b||i.a!==s.a||this.dirty)&&(this.gl.blendColor(i.r,i.g,i.b,i.a),this.current=i,this.dirty=!1)}}class el extends Ca{getDefault(){return this.gl.FUNC_ADD}set(i){(i!==this.current||this.dirty)&&(this.gl.blendEquation(i),this.current=i,this.dirty=!1)}}class us extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;i?s.enable(s.CULL_FACE):s.disable(s.CULL_FACE),this.current=i,this.dirty=!1}}class ki extends Ca{getDefault(){return this.gl.BACK}set(i){(i!==this.current||this.dirty)&&(this.gl.cullFace(i),this.current=i,this.dirty=!1)}}class co extends Ca{getDefault(){return this.gl.CCW}set(i){(i!==this.current||this.dirty)&&(this.gl.frontFace(i),this.current=i,this.dirty=!1)}}class xl extends Ca{getDefault(){return null}set(i){(i!==this.current||this.dirty)&&(this.gl.useProgram(i),this.current=i,this.dirty=!1)}}class tl extends Ca{getDefault(){return this.gl.TEXTURE0}set(i){(i!==this.current||this.dirty)&&(this.gl.activeTexture(i),this.current=i,this.dirty=!1)}}class Bs extends Ca{getDefault(){const i=this.gl;return[0,0,i.drawingBufferWidth,i.drawingBufferHeight]}set(i){const s=this.current;(i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2]||i[3]!==s[3]||this.dirty)&&(this.gl.viewport(i[0],i[1],i[2],i[3]),this.current=i,this.dirty=!1)}}class _l extends Ca{getDefault(){return null}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.bindFramebuffer(s.FRAMEBUFFER,i),this.current=i,this.dirty=!1}}class Us extends Ca{getDefault(){return null}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.bindRenderbuffer(s.RENDERBUFFER,i),this.current=i,this.dirty=!1}}class wl extends Ca{getDefault(){return null}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.bindTexture(s.TEXTURE_2D,i),this.current=i,this.dirty=!1}}class kl extends Ca{getDefault(){return null}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.bindBuffer(s.ARRAY_BUFFER,i),this.current=i,this.dirty=!1}}class rl extends Ca{getDefault(){return null}set(i){const s=this.gl;s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,i),this.current=i,this.dirty=!1}}class Ao extends Ca{getDefault(){return null}set(i){var s;if(i===this.current&&!this.dirty)return;const R=this.gl;vi(R)?R.bindVertexArray(i):(s=R.getExtension("OES_vertex_array_object"))===null||s===void 0||s.bindVertexArrayOES(i),this.current=i,this.dirty=!1}}class Vc extends Ca{getDefault(){return 4}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,i),this.current=i,this.dirty=!1}}class Cc extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i),this.current=i,this.dirty=!1}}class Vl extends Ca{getDefault(){return!1}set(i){if(i===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,i),this.current=i,this.dirty=!1}}class Bc extends Ca{constructor(i,s){super(i),this.context=i,this.parent=s}getDefault(){return null}}class uu extends Bc{setDirty(){this.dirty=!0}set(i){if(i===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,i,0),this.current=i,this.dirty=!1}}class ws extends Bc{set(i){if(i===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,i),this.current=i,this.dirty=!1}}class du extends Bc{set(i){if(i===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,i),this.current=i,this.dirty=!1}}class Ku{constructor(i,s,R,B,G){this.context=i,this.width=s,this.height=R;const ie=i.gl,pe=this.framebuffer=ie.createFramebuffer();if(this.colorAttachment=new uu(i,pe),B)this.depthAttachment=G?new du(i,pe):new ws(i,pe);else if(G)throw new Error("Stencil cannot be set without depth");if(ie.checkFramebufferStatus(ie.FRAMEBUFFER)!==ie.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const i=this.context.gl,s=this.colorAttachment.get();if(s&&i.deleteTexture(s),this.depthAttachment){const R=this.depthAttachment.get();R&&i.deleteRenderbuffer(R)}i.deleteFramebuffer(this.framebuffer)}}class eo{constructor(i,s,R){this.blendFunction=i,this.blendColor=s,this.mask=R}}eo.Replace=[1,0],eo.disabled=new eo(eo.Replace,e.aN.transparent,[!1,!1,!1,!1]),eo.unblended=new eo(eo.Replace,e.aN.transparent,[!0,!0,!0,!0]),eo.alphaBlended=new eo([1,771],e.aN.transparent,[!0,!0,!0,!0]);class uc{constructor(i){var s,R;if(this.gl=i,this.clearColor=new lo(this),this.clearDepth=new wi(this),this.clearStencil=new Vi(this),this.colorMask=new jo(this),this.depthMask=new Pa(this),this.stencilMask=new Qi(this),this.stencilFunc=new _s(this),this.stencilOp=new $i(this),this.stencilTest=new yl(this),this.depthRange=new cs(this),this.depthTest=new So(this),this.depthFunc=new vl(this),this.blend=new bl(this),this.blendFunc=new Fl(this),this.blendColor=new qo(this),this.blendEquation=new el(this),this.cullFace=new us(this),this.cullFaceSide=new ki(this),this.frontFace=new co(this),this.program=new xl(this),this.activeTexture=new tl(this),this.viewport=new Bs(this),this.bindFramebuffer=new _l(this),this.bindRenderbuffer=new Us(this),this.bindTexture=new wl(this),this.bindVertexBuffer=new kl(this),this.bindElementBuffer=new rl(this),this.bindVertexArray=new Ao(this),this.pixelStoreUnpack=new Vc(this),this.pixelStoreUnpackPremultiplyAlpha=new Cc(this),this.pixelStoreUnpackFlipY=new Vl(this),this.extTextureFilterAnisotropic=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=i.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),vi(i)){this.HALF_FLOAT=i.HALF_FLOAT;const B=i.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(s=i.RGBA16F)!==null&&s!==void 0?s:B==null?void 0:B.RGBA16F_EXT,this.RGB16F=(R=i.RGB16F)!==null&&R!==void 0?R:B==null?void 0:B.RGB16F_EXT,i.getExtension("EXT_color_buffer_float")}else{i.getExtension("EXT_color_buffer_half_float"),i.getExtension("OES_texture_half_float_linear");const B=i.getExtension("OES_texture_half_float");this.HALF_FLOAT=B==null?void 0:B.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(i,s){return new Nn(this,i,s)}createVertexBuffer(i,s,R){return new va(this,i,s,R)}createRenderbuffer(i,s,R){const B=this.gl,G=B.createRenderbuffer();return this.bindRenderbuffer.set(G),B.renderbufferStorage(B.RENDERBUFFER,i,s,R),this.bindRenderbuffer.set(null),G}createFramebuffer(i,s,R,B){return new Ku(this,i,s,R,B)}clear({color:i,depth:s,stencil:R}){const B=this.gl;let G=0;i&&(G|=B.COLOR_BUFFER_BIT,this.clearColor.set(i),this.colorMask.set([!0,!0,!0,!0])),s!==void 0&&(G|=B.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(s),this.depthMask.set(!0)),R!==void 0&&(G|=B.STENCIL_BUFFER_BIT,this.clearStencil.set(R),this.stencilMask.set(255)),B.clear(G)}setCullFace(i){i.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(i.mode),this.frontFace.set(i.frontFace))}setDepthMode(i){i.func!==this.gl.ALWAYS||i.mask?(this.depthTest.set(!0),this.depthFunc.set(i.func),this.depthMask.set(i.mask),this.depthRange.set(i.range)):this.depthTest.set(!1)}setStencilMode(i){i.test.func!==this.gl.ALWAYS||i.mask?(this.stencilTest.set(!0),this.stencilMask.set(i.mask),this.stencilOp.set([i.fail,i.depthFail,i.pass]),this.stencilFunc.set({func:i.test.func,ref:i.ref,mask:i.test.mask})):this.stencilTest.set(!1)}setColorMode(i){e.aF(i.blendFunction,eo.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(i.blendFunction),this.blendColor.set(i.blendColor)),this.colorMask.set(i.mask)}createVertexArray(){var i;return vi(this.gl)?this.gl.createVertexArray():(i=this.gl.getExtension("OES_vertex_array_object"))===null||i===void 0?void 0:i.createVertexArrayOES()}deleteVertexArray(i){var s;return vi(this.gl)?this.gl.deleteVertexArray(i):(s=this.gl.getExtension("OES_vertex_array_object"))===null||s===void 0?void 0:s.deleteVertexArrayOES(i)}unbindVAO(){this.bindVertexArray.set(null)}}class Ba{constructor(i,s,R){this.func=i,this.mask=s,this.range=R}}Ba.ReadOnly=!1,Ba.ReadWrite=!0,Ba.disabled=new Ba(519,Ba.ReadOnly,[0,1]);const Bl=7680;class bi{constructor(i,s,R,B,G,ie){this.test=i,this.ref=s,this.mask=R,this.fail=B,this.depthFail=G,this.pass=ie}}bi.disabled=new bi({func:519,mask:0},0,0,Bl,Bl,Bl);class xi{constructor(i,s,R){this.enable=i,this.mode=s,this.frontFace=R}}let ks;function es(F,i,s,R,B){const G=F.context,ie=G.gl,pe=F.useProgram("collisionBox"),xe=[];let Se=0,De=0;for(let Mt=0;Mt<R.length;Mt++){const At=R[Mt],Vt=i.getTile(At).getBucket(s);if(!Vt)continue;const Et=B?Vt.textCollisionBox:Vt.iconCollisionBox,Kt=Vt.collisionCircleArray;if(Kt.length>0){const Yt=e.H();e.aR(Yt,Vt.placementInvProjMatrix,F.transform.glCoordMatrix),e.aR(Yt,Yt,Vt.placementViewportMatrix),xe.push({circleArray:Kt,circleOffset:De,transform:At.posMatrix,invTransform:Yt,coord:At}),Se+=Kt.length/4,De=Se}Et&&pe.draw(G,ie.LINES,Ba.disabled,bi.disabled,F.colorModeForRenderPass(),xi.disabled,tr(F.transform,At.posMatrix),F.style.map.terrain&&F.style.map.terrain.getTerrainData(At),s.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,F.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!B||!xe.length)return;const Ue=F.useProgram("collisionCircle"),rt=new e.aS;rt.resize(4*Se),rt._trim();let ct=0;for(const Mt of xe)for(let At=0;At<Mt.circleArray.length/4;At++){const Vt=4*At,Et=Mt.circleArray[Vt+0],Kt=Mt.circleArray[Vt+1],Yt=Mt.circleArray[Vt+2],Jt=Mt.circleArray[Vt+3];rt.emplace(ct++,Et,Kt,Yt,Jt,0),rt.emplace(ct++,Et,Kt,Yt,Jt,1),rt.emplace(ct++,Et,Kt,Yt,Jt,2),rt.emplace(ct++,Et,Kt,Yt,Jt,3)}(!ks||ks.length<2*Se)&&(ks=function(Mt){const At=2*Mt,Vt=new e.aU;Vt.resize(At),Vt._trim();for(let Et=0;Et<At;Et++){const Kt=6*Et;Vt.uint16[Kt+0]=4*Et+0,Vt.uint16[Kt+1]=4*Et+1,Vt.uint16[Kt+2]=4*Et+2,Vt.uint16[Kt+3]=4*Et+2,Vt.uint16[Kt+4]=4*Et+3,Vt.uint16[Kt+5]=4*Et+0}return Vt}(Se));const pt=G.createIndexBuffer(ks,!0),vt=G.createVertexBuffer(rt,e.aT.members,!0);for(const Mt of xe){const At=ir(Mt.transform,Mt.invTransform,F.transform);Ue.draw(G,ie.TRIANGLES,Ba.disabled,bi.disabled,F.colorModeForRenderPass(),xi.disabled,At,F.style.map.terrain&&F.style.map.terrain.getTerrainData(Mt.coord),s.id,vt,pt,e.a0.simpleSegment(0,2*Mt.circleOffset,Mt.circleArray.length,Mt.circleArray.length/2),null,F.transform.zoom,null,null,null)}vt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const dc=e.ao(new Float32Array(16));function Tl(F,i,s,R,B){if(F.renderPass!=="translucent")return;const G=bi.disabled,ie=F.colorModeForRenderPass();(s._unevaluatedLayout.hasValue("text-variable-anchor")||s._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(pe,xe,Se,De,Ue,rt,ct,pt,vt){const Mt=xe.transform,At=Lr(),Vt=Ue==="map",Et=rt==="map";for(const Kt of pe){const Yt=De.getTile(Kt),Jt=Yt.getBucket(Se);if(!Jt||!Jt.text||!Jt.text.segments.get().length)continue;const dr=Jt.textSizeData,xr=e.ah(dr,Mt.zoom),Dr=Tt(Yt,1,xe.transform.zoom),Ir=Bt(Kt.posMatrix,Et,Vt,xe.transform,Dr),qr=Se.layout.get("icon-text-fit")!=="none"&&Jt.hasIconData();if(xr){const $r=Math.pow(2,Mt.zoom-Yt.tileID.overscaledZ),vn=xe.style.map.terrain?(xn,an)=>xe.style.map.terrain.getElevation(Kt,xn,an):null,Qr=At.translatePosition(Mt,Yt,ct,pt);yo(Jt,Vt,Et,vt,Mt,Ir,Kt.posMatrix,$r,xr,qr,At,Qr,Kt.toUnwrapped(),vn)}}}(R,F,s,i,s.layout.get("text-rotation-alignment"),s.layout.get("text-pitch-alignment"),s.paint.get("text-translate"),s.paint.get("text-translate-anchor"),B),s.paint.get("icon-opacity").constantOr(1)!==0&&Yl(F,i,s,R,!1,s.paint.get("icon-translate"),s.paint.get("icon-translate-anchor"),s.layout.get("icon-rotation-alignment"),s.layout.get("icon-pitch-alignment"),s.layout.get("icon-keep-upright"),G,ie),s.paint.get("text-opacity").constantOr(1)!==0&&Yl(F,i,s,R,!0,s.paint.get("text-translate"),s.paint.get("text-translate-anchor"),s.layout.get("text-rotation-alignment"),s.layout.get("text-pitch-alignment"),s.layout.get("text-keep-upright"),G,ie),i.map.showCollisionBoxes&&(es(F,i,s,R,!0),es(F,i,s,R,!1))}function ts(F,i,s,R,B,G){const{horizontalAlign:ie,verticalAlign:pe}=e.av(F),xe=-(ie-.5)*i,Se=-(pe-.5)*s;return new e.P((xe/B+R[0])*G,(Se/B+R[1])*G)}function ds(F,i,s,R,B,G){const ie=i.tileAnchorPoint.add(new e.P(i.translation[0],i.translation[1]));if(i.pitchWithMap){let pe=R.mult(G);return s||(pe=pe.rotate(-B)),qt(ie.add(pe),i.labelPlaneMatrix,i.getElevation).point}if(s){const pe=Ke(i.tileAnchorPoint.x+1,i.tileAnchorPoint.y,i).point.sub(F),xe=Math.atan(pe.y/pe.x)+(pe.x<0?Math.PI:0);return F.add(R.rotate(xe))}return F.add(R)}function yo(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue,rt,ct){const pt=F.text.placedSymbolArray,vt=F.text.dynamicLayoutVertexArray,Mt=F.icon.dynamicLayoutVertexArray,At={};vt.clear();for(let Vt=0;Vt<pt.length;Vt++){const Et=pt.get(Vt),Kt=F.allowVerticalPlacement&&!Et.placedOrientation,Yt=Et.hidden||!Et.crossTileID||Kt?null:R[Et.crossTileID];if(Yt){const Jt=new e.P(Et.anchorX,Et.anchorY),dr={getElevation:ct,width:B.width,height:B.height,labelPlaneMatrix:G,pitchWithMap:s,projection:De,tileAnchorPoint:Jt,translation:Ue,unwrappedTileID:rt},xr=s?qt(Jt,ie,ct):Ke(Jt.x,Jt.y,dr),Dr=ot(B.cameraToCenterDistance,xr.signedDistanceFromCamera);let Ir=e.aj(F.textSizeData,xe,Et)*Dr/e.aq;s&&(Ir*=F.tilePixelRatio/pe);const{width:qr,height:$r,anchor:vn,textOffset:Qr,textBoxScale:xn}=Yt,an=ts(vn,qr,$r,Qr,xn,Ir),Sn=De.getPitchedTextCorrection(B,Jt.add(new e.P(Ue[0],Ue[1])),rt),mn=ds(xr.point,dr,i,an,B.angle,Sn),Ln=F.allowVerticalPlacement&&Et.placedOrientation===e.ai.vertical?Math.PI/2:0;for(let ta=0;ta<Et.numGlyphs;ta++)e.ak(vt,mn,Ln);Se&&Et.associatedIconIndex>=0&&(At[Et.associatedIconIndex]={shiftedAnchor:mn,angle:Ln})}else Ft(Et.numGlyphs,vt)}if(Se){Mt.clear();const Vt=F.icon.placedSymbolArray;for(let Et=0;Et<Vt.length;Et++){const Kt=Vt.get(Et);if(Kt.hidden)Ft(Kt.numGlyphs,Mt);else{const Yt=At[Et];if(Yt)for(let Jt=0;Jt<Kt.numGlyphs;Jt++)e.ak(Mt,Yt.shiftedAnchor,Yt.angle);else Ft(Kt.numGlyphs,Mt)}}F.icon.dynamicLayoutVertexBuffer.updateData(Mt)}F.text.dynamicLayoutVertexBuffer.updateData(vt)}function Xa(F,i,s){return s.iconsInText&&i?"symbolTextAndIcon":F?"symbolSDF":"symbolIcon"}function Yl(F,i,s,R,B,G,ie,pe,xe,Se,De,Ue){const rt=F.context,ct=rt.gl,pt=F.transform,vt=Lr(),Mt=pe==="map",At=xe==="map",Vt=pe!=="viewport"&&s.layout.get("symbol-placement")!=="point",Et=Mt&&!At&&!Vt,Kt=!At&&Vt,Yt=!s.layout.get("symbol-sort-key").isConstant();let Jt=!1;const dr=F.depthModeForSublayer(0,Ba.ReadOnly),xr=s._unevaluatedLayout.hasValue("text-variable-anchor")||s._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dr=[],Ir=vt.getCircleRadiusCorrection(pt);for(const qr of R){const $r=i.getTile(qr),vn=$r.getBucket(s);if(!vn)continue;const Qr=B?vn.text:vn.icon;if(!Qr||!Qr.segments.get().length||!Qr.hasVisibleVertices)continue;const xn=Qr.programConfigurations.get(s.id),an=B||vn.sdfIcons,Sn=B?vn.textSizeData:vn.iconSizeData,mn=At||pt.pitch!==0,Ln=F.useProgram(Xa(an,B,vn),xn),ta=e.ah(Sn,pt.zoom),Mn=F.style.map.terrain&&F.style.map.terrain.getTerrainData(qr);let Yn,ua,za,ka,Da=[0,0],Na=null;if(B){if(ua=$r.glyphAtlasTexture,za=ct.LINEAR,Yn=$r.glyphAtlasTexture.size,vn.iconsInText){Da=$r.imageAtlasTexture.size,Na=$r.imageAtlasTexture;const Oa=Sn.kind==="composite"||Sn.kind==="camera";ka=mn||F.options.rotating||F.options.zooming||Oa?ct.LINEAR:ct.NEAREST}}else{const Oa=s.layout.get("icon-size").constantOr(0)!==1||vn.iconsNeedLinear;ua=$r.imageAtlasTexture,za=an||F.options.rotating||F.options.zooming||Oa||mn?ct.LINEAR:ct.NEAREST,Yn=$r.imageAtlasTexture.size}const Ua=Tt($r,1,F.transform.zoom),Qa=Kt?qr.posMatrix:dc,Bi=Bt(Qa,At,Mt,F.transform,Ua),Oi=jt(Qa,At,Mt,F.transform,Ua),ao=jt(qr.posMatrix,At,Mt,F.transform,Ua),ti=vt.translatePosition(F.transform,$r,G,ie),Wa=xr&&vn.hasTextData(),Ai=s.layout.get("icon-text-fit")!=="none"&&Wa&&vn.hasIconData();if(Vt){const Oa=F.style.map.terrain?(Zi,fs)=>F.style.map.terrain.getElevation(qr,Zi,fs):null,_o=s.layout.get("text-rotation-alignment")==="map";dt(vn,qr.posMatrix,F,B,Bi,ao,At,Se,_o,vt,qr.toUnwrapped(),pt.width,pt.height,ti,Oa)}const ii=qr.posMatrix,$a=B&&xr||Ai,ri=Vt||$a?dc:Bi,yi=Oi,Ha=an&&s.paint.get(B?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ns;Ns=an?vn.iconsInText?An(Sn.kind,ta,Et,At,Vt,$a,F,ii,ri,yi,ti,Yn,Da,Ir):_n(Sn.kind,ta,Et,At,Vt,$a,F,ii,ri,yi,ti,B,Yn,!0,Ir):Pn(Sn.kind,ta,Et,At,Vt,$a,F,ii,ri,yi,ti,B,Yn,Ir);const Wi={program:Ln,buffers:Qr,uniformValues:Ns,atlasTexture:ua,atlasTextureIcon:Na,atlasInterpolation:za,atlasInterpolationIcon:ka,isSDF:an,hasHalo:Ha};if(Yt&&vn.canOverlap){Jt=!0;const Oa=Qr.segments.get();for(const _o of Oa)Dr.push({segments:new e.a0([_o]),sortKey:_o.sortKey,state:Wi,terrainData:Mn})}else Dr.push({segments:Qr.segments,sortKey:0,state:Wi,terrainData:Mn})}Jt&&Dr.sort((qr,$r)=>qr.sortKey-$r.sortKey);for(const qr of Dr){const $r=qr.state;if(rt.activeTexture.set(ct.TEXTURE0),$r.atlasTexture.bind($r.atlasInterpolation,ct.CLAMP_TO_EDGE),$r.atlasTextureIcon&&(rt.activeTexture.set(ct.TEXTURE1),$r.atlasTextureIcon&&$r.atlasTextureIcon.bind($r.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),$r.isSDF){const vn=$r.uniformValues;$r.hasHalo&&(vn.u_is_halo=1,hu($r.buffers,qr.segments,s,F,$r.program,dr,De,Ue,vn,qr.terrainData)),vn.u_is_halo=0}hu($r.buffers,qr.segments,s,F,$r.program,dr,De,Ue,$r.uniformValues,qr.terrainData)}}function hu(F,i,s,R,B,G,ie,pe,xe,Se){const De=R.context,Ue=De.gl;B.draw(De,Ue.TRIANGLES,G,ie,pe,xi.disabled,xe,Se,s.id,F.layoutVertexBuffer,F.indexBuffer,i,s.paint,R.transform.zoom,F.programConfigurations.get(s.id),F.dynamicLayoutVertexBuffer,F.opacityVertexBuffer)}function Sl(F,i,s,R){if(s.paint.get("heatmap-opacity")!==0)if(F.renderPass==="offscreen"){const B=F.context,G=B.gl,ie=bi.disabled,pe=new eo([G.ONE,G.ONE],e.aN.transparent,[!0,!0,!0,!0]);(function(xe,Se,De){const Ue=xe.gl;xe.activeTexture.set(Ue.TEXTURE1),xe.viewport.set([0,0,Se.width/4,Se.height/4]);let rt=De.heatmapFbo;if(rt)Ue.bindTexture(Ue.TEXTURE_2D,rt.colorAttachment.get()),xe.bindFramebuffer.set(rt.framebuffer);else{const ct=Ue.createTexture();Ue.bindTexture(Ue.TEXTURE_2D,ct),Ue.texParameteri(Ue.TEXTURE_2D,Ue.TEXTURE_WRAP_S,Ue.CLAMP_TO_EDGE),Ue.texParameteri(Ue.TEXTURE_2D,Ue.TEXTURE_WRAP_T,Ue.CLAMP_TO_EDGE),Ue.texParameteri(Ue.TEXTURE_2D,Ue.TEXTURE_MIN_FILTER,Ue.LINEAR),Ue.texParameteri(Ue.TEXTURE_2D,Ue.TEXTURE_MAG_FILTER,Ue.LINEAR),rt=De.heatmapFbo=xe.createFramebuffer(Se.width/4,Se.height/4,!1,!1),function(pt,vt,Mt,At){var Vt,Et;const Kt=pt.gl,Yt=(Vt=pt.HALF_FLOAT)!==null&&Vt!==void 0?Vt:Kt.UNSIGNED_BYTE,Jt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Kt.RGBA;Kt.texImage2D(Kt.TEXTURE_2D,0,Jt,vt.width/4,vt.height/4,0,Kt.RGBA,Yt,null),At.colorAttachment.set(Mt)}(xe,Se,ct,rt)}})(B,F,s),B.clear({color:e.aN.transparent});for(let xe=0;xe<R.length;xe++){const Se=R[xe];if(i.hasRenderableParent(Se))continue;const De=i.getTile(Se),Ue=De.getBucket(s);if(!Ue)continue;const rt=Ue.programConfigurations.get(s.id),ct=F.useProgram("heatmap",rt),{zoom:pt}=F.transform;ct.draw(B,G.TRIANGLES,Ba.disabled,ie,pe,xi.disabled,Rr(Se.posMatrix,De,pt,s.paint.get("heatmap-intensity")),null,s.id,Ue.layoutVertexBuffer,Ue.indexBuffer,Ue.segments,s.paint,F.transform.zoom,rt)}B.viewport.set([0,0,F.width,F.height])}else F.renderPass==="translucent"&&(F.context.setColorMode(F.colorModeForRenderPass()),function(B,G){const ie=B.context,pe=ie.gl,xe=G.heatmapFbo;if(!xe)return;ie.activeTexture.set(pe.TEXTURE0),pe.bindTexture(pe.TEXTURE_2D,xe.colorAttachment.get()),ie.activeTexture.set(pe.TEXTURE1);let Se=G.colorRampTexture;Se||(Se=G.colorRampTexture=new z(ie,G.colorRamp,pe.RGBA)),Se.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),B.useProgram("heatmapTexture").draw(ie,pe.TRIANGLES,Ba.disabled,bi.disabled,B.colorModeForRenderPass(),xi.disabled,Xr(B,G,0,1),null,G.id,B.viewportBuffer,B.quadTriangleIndexBuffer,B.viewportSegments,G.paint,B.transform.zoom)}(F,s))}function Al(F,i,s,R,B){if(!s||!R||!R.imageAtlas)return;const G=R.imageAtlas.patternPositions;let ie=G[s.to.toString()],pe=G[s.from.toString()];if(!ie&&pe&&(ie=pe),!pe&&ie&&(pe=ie),!ie||!pe){const xe=B.getPaintProperty(i);ie=G[xe],pe=G[xe]}ie&&pe&&F.setConstantPatternPositions(ie,pe)}function Mc(F,i,s,R,B,G,ie){const pe=F.context.gl,xe="fill-pattern",Se=s.paint.get(xe),De=Se&&Se.constantOr(1),Ue=s.getCrossfadeParameters();let rt,ct,pt,vt,Mt;ie?(ct=De&&!s.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",rt=pe.LINES):(ct=De?"fillPattern":"fill",rt=pe.TRIANGLES);const At=Se.constantOr(null);for(const Vt of R){const Et=i.getTile(Vt);if(De&&!Et.patternsLoaded())continue;const Kt=Et.getBucket(s);if(!Kt)continue;const Yt=Kt.programConfigurations.get(s.id),Jt=F.useProgram(ct,Yt),dr=F.style.map.terrain&&F.style.map.terrain.getTerrainData(Vt);De&&(F.context.activeTexture.set(pe.TEXTURE0),Et.imageAtlasTexture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Yt.updatePaintBuffers(Ue)),Al(Yt,xe,At,Et,s);const xr=dr?Vt:null,Dr=xr?xr.posMatrix:Vt.posMatrix,Ir=F.translatePosMatrix(Dr,Et,s.paint.get("fill-translate"),s.paint.get("fill-translate-anchor"));if(ie){vt=Kt.indexBuffer2,Mt=Kt.segments2;const qr=[pe.drawingBufferWidth,pe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&De?fr(Ir,F,Ue,Et,qr):Zn(Ir,qr)}else vt=Kt.indexBuffer,Mt=Kt.segments,pt=De?On(Ir,F,Ue,Et):yn(Ir);Jt.draw(F.context,rt,B,F.stencilModeForClipping(Vt),G,xi.disabled,pt,dr,s.id,Kt.layoutVertexBuffer,vt,Mt,s.paint,F.transform.zoom,Yt)}}function hc(F,i,s,R,B,G,ie){const pe=F.context,xe=pe.gl,Se="fill-extrusion-pattern",De=s.paint.get(Se),Ue=De.constantOr(1),rt=s.getCrossfadeParameters(),ct=s.paint.get("fill-extrusion-opacity"),pt=De.constantOr(null);for(const vt of R){const Mt=i.getTile(vt),At=Mt.getBucket(s);if(!At)continue;const Vt=F.style.map.terrain&&F.style.map.terrain.getTerrainData(vt),Et=At.programConfigurations.get(s.id),Kt=F.useProgram(Ue?"fillExtrusionPattern":"fillExtrusion",Et);Ue&&(F.context.activeTexture.set(xe.TEXTURE0),Mt.imageAtlasTexture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE),Et.updatePaintBuffers(rt)),Al(Et,Se,pt,Mt,s);const Yt=F.translatePosMatrix(vt.posMatrix,Mt,s.paint.get("fill-extrusion-translate"),s.paint.get("fill-extrusion-translate-anchor")),Jt=s.paint.get("fill-extrusion-vertical-gradient"),dr=Ue?bn(Yt,F,Jt,ct,vt,rt,Mt):rn(Yt,F,Jt,ct);Kt.draw(pe,pe.gl.TRIANGLES,B,G,ie,xi.backCCW,dr,Vt,s.id,At.layoutVertexBuffer,At.indexBuffer,At.segments,s.paint,F.transform.zoom,Et,F.style.map.terrain&&At.centroidVertexBuffer)}}function pc(F,i,s,R,B,G,ie){const pe=F.context,xe=pe.gl,Se=s.fbo;if(!Se)return;const De=F.useProgram("hillshade"),Ue=F.style.map.terrain&&F.style.map.terrain.getTerrainData(i);pe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,Se.colorAttachment.get());const rt=Ue?i:null;De.draw(pe,xe.TRIANGLES,B,G,ie,xi.disabled,Vr(F,s,R,rt),Ue,R.id,F.rasterBoundsBuffer,F.quadTriangleIndexBuffer,F.rasterBoundsSegments)}function ku(F,i,s,R,B,G){const ie=F.context,pe=ie.gl,xe=i.dem;if(xe&&xe.data){const Se=xe.dim,De=xe.stride,Ue=xe.getPixels();if(ie.activeTexture.set(pe.TEXTURE1),ie.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture=i.demTexture||F.getTileTexture(De),i.demTexture){const ct=i.demTexture;ct.update(Ue,{premultiply:!1}),ct.bind(pe.NEAREST,pe.CLAMP_TO_EDGE)}else i.demTexture=new z(ie,Ue,pe.RGBA,{premultiply:!1}),i.demTexture.bind(pe.NEAREST,pe.CLAMP_TO_EDGE);ie.activeTexture.set(pe.TEXTURE0);let rt=i.fbo;if(!rt){const ct=new z(ie,{width:Se,height:Se,data:null},pe.RGBA);ct.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),rt=i.fbo=ie.createFramebuffer(Se,Se,!0,!1),rt.colorAttachment.set(ct.texture)}ie.bindFramebuffer.set(rt.framebuffer),ie.viewport.set([0,0,Se,Se]),F.useProgram("hillshadePrepare").draw(ie,pe.TRIANGLES,R,B,G,xi.disabled,Pr(i.tileID,xe),null,s.id,F.rasterBoundsBuffer,F.quadTriangleIndexBuffer,F.rasterBoundsSegments),i.needsHillshadePrepare=!1}}function Ts(F,i,s,R,B,G){const ie=R.paint.get("raster-fade-duration");if(!G&&ie>0){const pe=h.now(),xe=(pe-F.timeAdded)/ie,Se=i?(pe-i.timeAdded)/ie:-1,De=s.getSource(),Ue=B.coveringZoomLevel({tileSize:De.tileSize,roundZoom:De.roundZoom}),rt=!i||Math.abs(i.tileID.overscaledZ-Ue)>Math.abs(F.tileID.overscaledZ-Ue),ct=rt&&F.refreshedUponExpiration?1:e.ad(rt?xe:1-Se,0,1);return F.refreshedUponExpiration&&xe>=1&&(F.refreshedUponExpiration=!1),i?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const js=new e.aN(1,0,0,1),El=new e.aN(0,1,0,1),Ss=new e.aN(0,0,1,1),Ja=new e.aN(1,0,1,1),Uc=new e.aN(0,1,1,1);function jc(F){const i=F.transform.padding;Pc(F,F.transform.height-(i.top||0),3,js),Pc(F,i.bottom||0,3,El),Eo(F,i.left||0,3,Ss),Eo(F,F.transform.width-(i.right||0),3,Ja);const s=F.transform.centerPoint;(function(R,B,G,ie){fc(R,B-1,G-10,2,20,ie),fc(R,B-10,G-1,20,2,ie)})(F,s.x,F.transform.height-s.y,Uc)}function Pc(F,i,s,R){fc(F,0,i+s/2,F.transform.width,s,R)}function Eo(F,i,s,R){fc(F,i-s/2,0,s,F.transform.height,R)}function fc(F,i,s,R,B,G){const ie=F.context,pe=ie.gl;pe.enable(pe.SCISSOR_TEST),pe.scissor(i*F.pixelRatio,s*F.pixelRatio,R*F.pixelRatio,B*F.pixelRatio),ie.clear({color:G}),pe.disable(pe.SCISSOR_TEST)}function Cu(F,i,s){const R=F.context,B=R.gl,G=s.posMatrix,ie=F.useProgram("debug"),pe=Ba.disabled,xe=bi.disabled,Se=F.colorModeForRenderPass(),De="$debug",Ue=F.style.map.terrain&&F.style.map.terrain.getTerrainData(s);R.activeTexture.set(B.TEXTURE0);const rt=i.getTileByID(s.key).latestRawTileData,ct=rt&&rt.byteLength||0,pt=Math.floor(ct/1024),vt=i.getTile(s).tileSize,Mt=512/Math.min(vt,512)*(s.overscaledZ/F.transform.zoom)*.5;let At=s.canonical.toString();s.overscaledZ!==s.canonical.z&&(At+=` => ${s.overscaledZ}`),function(Vt,Et){Vt.initDebugOverlayCanvas();const Kt=Vt.debugOverlayCanvas,Yt=Vt.context.gl,Jt=Vt.debugOverlayCanvas.getContext("2d");Jt.clearRect(0,0,Kt.width,Kt.height),Jt.shadowColor="white",Jt.shadowBlur=2,Jt.lineWidth=1.5,Jt.strokeStyle="white",Jt.textBaseline="top",Jt.font="bold 36px Open Sans, sans-serif",Jt.fillText(Et,5,5),Jt.strokeText(Et,5,5),Vt.debugOverlayTexture.update(Kt),Vt.debugOverlayTexture.bind(Yt.LINEAR,Yt.CLAMP_TO_EDGE)}(F,`${At} ${pt}kB`),ie.draw(R,B.TRIANGLES,pe,xe,eo.alphaBlended,xi.disabled,gr(G,e.aN.transparent,Mt),null,De,F.debugBuffer,F.quadTriangleIndexBuffer,F.debugSegments),ie.draw(R,B.LINE_STRIP,pe,xe,Se,xi.disabled,gr(G,e.aN.red),Ue,De,F.debugBuffer,F.tileBorderIndexBuffer,F.debugSegments)}function Ql(F,i,s){const R=F.context,B=R.gl,G=F.colorModeForRenderPass(),ie=new Ba(B.LEQUAL,Ba.ReadWrite,F.depthRangeFor3D),pe=F.useProgram("terrain"),xe=i.getTerrainMesh();R.bindFramebuffer.set(null),R.viewport.set([0,0,F.width,F.height]);for(const Se of s){const De=F.renderToTexture.getTexture(Se),Ue=i.getTerrainData(Se.tileID);R.activeTexture.set(B.TEXTURE0),B.bindTexture(B.TEXTURE_2D,De.texture);const rt=F.transform.calculatePosMatrix(Se.tileID.toUnwrapped()),ct=i.getMeshFrameDelta(F.transform.zoom),pt=F.transform.calculateFogMatrix(Se.tileID.toUnwrapped()),vt=vr(rt,ct,pt,F.style.sky,F.transform.pitch);pe.draw(R,B.TRIANGLES,ie,bi.disabled,G,xi.backCCW,vt,Ue,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments)}}class ec{constructor(i,s,R){this.vertexBuffer=i,this.indexBuffer=s,this.segments=R}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class tc{constructor(i,s){this.context=new uc(i),this.transform=s,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=He.maxUnderzooming+He.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new en}resize(i,s,R){if(this.width=Math.floor(i*R),this.height=Math.floor(s*R),this.pixelRatio=R,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const B of this.style._order)this.style._layers[B].resize()}setup(){const i=this.context,s=new e.aX;s.emplaceBack(0,0),s.emplaceBack(e.X,0),s.emplaceBack(0,e.X),s.emplaceBack(e.X,e.X),this.tileExtentBuffer=i.createVertexBuffer(s,hn.members),this.tileExtentSegments=e.a0.simpleSegment(0,0,4,2);const R=new e.aX;R.emplaceBack(0,0),R.emplaceBack(e.X,0),R.emplaceBack(0,e.X),R.emplaceBack(e.X,e.X),this.debugBuffer=i.createVertexBuffer(R,hn.members),this.debugSegments=e.a0.simpleSegment(0,0,4,5);const B=new e.$;B.emplaceBack(0,0,0,0),B.emplaceBack(e.X,0,e.X,0),B.emplaceBack(0,e.X,0,e.X),B.emplaceBack(e.X,e.X,e.X,e.X),this.rasterBoundsBuffer=i.createVertexBuffer(B,Be.members),this.rasterBoundsSegments=e.a0.simpleSegment(0,0,4,2);const G=new e.aX;G.emplaceBack(0,0),G.emplaceBack(1,0),G.emplaceBack(0,1),G.emplaceBack(1,1),this.viewportBuffer=i.createVertexBuffer(G,hn.members),this.viewportSegments=e.a0.simpleSegment(0,0,4,2);const ie=new e.aZ;ie.emplaceBack(0),ie.emplaceBack(1),ie.emplaceBack(3),ie.emplaceBack(2),ie.emplaceBack(0),this.tileBorderIndexBuffer=i.createIndexBuffer(ie);const pe=new e.aY;pe.emplaceBack(0,1,2),pe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=i.createIndexBuffer(pe);const xe=this.context.gl;this.stencilClearMode=new bi({func:xe.ALWAYS,mask:0},0,255,xe.ZERO,xe.ZERO,xe.ZERO)}clearStencil(){const i=this.context,s=i.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const R=e.H();e.aQ(R,0,this.width,this.height,0,0,1),e.K(R,R,[s.drawingBufferWidth,s.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(i,s.TRIANGLES,Ba.disabled,this.stencilClearMode,eo.disabled,xi.disabled,Nr(R),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(i,s){if(this.currentStencilSource===i.source||!i.isTileClipped()||!s||!s.length)return;this.currentStencilSource=i.source;const R=this.context,B=R.gl;this.nextStencilID+s.length>256&&this.clearStencil(),R.setColorMode(eo.disabled),R.setDepthMode(Ba.disabled);const G=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ie of s){const pe=this._tileClippingMaskIDs[ie.key]=this.nextStencilID++,xe=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ie);G.draw(R,B.TRIANGLES,Ba.disabled,new bi({func:B.ALWAYS,mask:0},pe,255,B.KEEP,B.KEEP,B.REPLACE),eo.disabled,xi.disabled,Nr(ie.posMatrix),xe,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const i=this.nextStencilID++,s=this.context.gl;return new bi({func:s.NOTEQUAL,mask:255},i,255,s.KEEP,s.KEEP,s.REPLACE)}stencilModeForClipping(i){const s=this.context.gl;return new bi({func:s.EQUAL,mask:255},this._tileClippingMaskIDs[i.key],0,s.KEEP,s.KEEP,s.REPLACE)}stencilConfigForOverlap(i){const s=this.context.gl,R=i.sort((ie,pe)=>pe.overscaledZ-ie.overscaledZ),B=R[R.length-1].overscaledZ,G=R[0].overscaledZ-B+1;if(G>1){this.currentStencilSource=void 0,this.nextStencilID+G>256&&this.clearStencil();const ie={};for(let pe=0;pe<G;pe++)ie[pe+B]=new bi({func:s.GEQUAL,mask:255},pe+this.nextStencilID,255,s.KEEP,s.KEEP,s.REPLACE);return this.nextStencilID+=G,[ie,R]}return[{[B]:bi.disabled},R]}colorModeForRenderPass(){const i=this.context.gl;return this._showOverdrawInspector?new eo([i.CONSTANT_COLOR,i.ONE],new e.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?eo.unblended:eo.alphaBlended}depthModeForSublayer(i,s,R){if(!this.opaquePassEnabledForLayer())return Ba.disabled;const B=1-((1+this.currentLayer)*this.numSublayers+i)*this.depthEpsilon;return new Ba(R||this.context.gl.LEQUAL,s,[B,B])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(i,s){var R;this.style=i,this.options=s,this.lineAtlas=i.lineAtlas,this.imageManager=i.imageManager,this.glyphManager=i.glyphManager,this.symbolFadeChange=i.placement.symbolFadeChange(h.now()),this.imageManager.beginFrame();const B=this.style._order,G=this.style.sourceCaches,ie={},pe={},xe={};for(const Se in G){const De=G[Se];De.used&&De.prepare(this.context),ie[Se]=De.getVisibleCoordinates(),pe[Se]=ie[Se].slice().reverse(),xe[Se]=De.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Se=0;Se<B.length;Se++){const De=B[Se];if(this.style._layers[De].is3D()){this.opaquePassCutoff=Se;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Se of B){const De=this.style._layers[Se];if(!De.hasOffscreenPass()||De.isHidden(this.transform.zoom))continue;const Ue=pe[De.source];(De.type==="custom"||Ue.length)&&this.renderLayer(this,G[De.source],De,Ue)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:s.showOverdrawInspector?e.aN.black:e.aN.transparent,depth:1}),this.clearStencil(),!((R=this.style.stylesheet)===null||R===void 0)&&R.sky&&function(Se,De){const Ue=Se.context,rt=Ue.gl,ct=((Vt,Et,Kt)=>({u_sky_color:Vt.properties.get("sky-color"),u_horizon_color:Vt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Kt,u_sky_horizon_blend:Vt.properties.get("sky-horizon-blend")*Et.height/2*Kt}))(De,Se.style.map.transform,Se.pixelRatio),pt=new Ba(rt.LEQUAL,Ba.ReadWrite,[0,1]),vt=bi.disabled,Mt=Se.colorModeForRenderPass(),At=Se.useProgram("sky");if(!De.mesh){const Vt=new e.aX;Vt.emplaceBack(-1,-1),Vt.emplaceBack(1,-1),Vt.emplaceBack(1,1),Vt.emplaceBack(-1,1);const Et=new e.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),De.mesh=new ec(Ue.createVertexBuffer(Vt,hn.members),Ue.createIndexBuffer(Et),e.a0.simpleSegment(0,0,Vt.length,Et.length))}At.draw(Ue,rt.TRIANGLES,pt,vt,Mt,xi.disabled,ct,void 0,"sky",De.mesh.vertexBuffer,De.mesh.indexBuffer,De.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=s.showOverdrawInspector,this.depthRangeFor3D=[0,1-(i._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=B.length-1;this.currentLayer>=0;this.currentLayer--){const Se=this.style._layers[B[this.currentLayer]],De=G[Se.source],Ue=ie[Se.source];this._renderTileClippingMasks(Se,Ue),this.renderLayer(this,De,Se,Ue)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<B.length;this.currentLayer++){const Se=this.style._layers[B[this.currentLayer]],De=G[Se.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Se))continue;const Ue=(Se.type==="symbol"?xe:pe)[Se.source];this._renderTileClippingMasks(Se,ie[Se.source]),this.renderLayer(this,De,Se,Ue)}if(this.options.showTileBoundaries){const Se=function(De,Ue){let rt=null;const ct=Object.values(De._layers).flatMap(At=>At.source&&!At.isHidden(Ue)?[De.sourceCaches[At.source]]:[]),pt=ct.filter(At=>At.getSource().type==="vector"),vt=ct.filter(At=>At.getSource().type!=="vector"),Mt=At=>{(!rt||rt.getSource().maxzoom<At.getSource().maxzoom)&&(rt=At)};return pt.forEach(At=>Mt(At)),rt||vt.forEach(At=>Mt(At)),rt}(this.style,this.transform.zoom);Se&&function(De,Ue,rt){for(let ct=0;ct<rt.length;ct++)Cu(De,Ue,rt[ct])}(this,Se,Se.getVisibleCoordinates())}this.options.showPadding&&jc(this),this.context.setDefault()}maybeDrawDepthAndCoords(i){if(!this.style||!this.style.map||!this.style.map.terrain)return;const s=this.terrainFacilitator.matrix,R=this.transform.modelViewProjectionMatrix;let B=this.terrainFacilitator.dirty;B||(B=i?!e.a_(s,R):!e.a$(s,R)),B||(B=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),B&&(e.b0(s,R),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(G,ie){const pe=G.context,xe=pe.gl,Se=eo.unblended,De=new Ba(xe.LEQUAL,Ba.ReadWrite,[0,1]),Ue=ie.getTerrainMesh(),rt=ie.sourceCache.getRenderableTiles(),ct=G.useProgram("terrainDepth");pe.bindFramebuffer.set(ie.getFramebuffer("depth").framebuffer),pe.viewport.set([0,0,G.width/devicePixelRatio,G.height/devicePixelRatio]),pe.clear({color:e.aN.transparent,depth:1});for(const pt of rt){const vt=ie.getTerrainData(pt.tileID),Mt={u_matrix:G.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:ie.getMeshFrameDelta(G.transform.zoom)};ct.draw(pe,xe.TRIANGLES,De,bi.disabled,Se,xi.backCCW,Mt,vt,"terrain",Ue.vertexBuffer,Ue.indexBuffer,Ue.segments)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,G.width,G.height])}(this,this.style.map.terrain),function(G,ie){const pe=G.context,xe=pe.gl,Se=eo.unblended,De=new Ba(xe.LEQUAL,Ba.ReadWrite,[0,1]),Ue=ie.getTerrainMesh(),rt=ie.getCoordsTexture(),ct=ie.sourceCache.getRenderableTiles(),pt=G.useProgram("terrainCoords");pe.bindFramebuffer.set(ie.getFramebuffer("coords").framebuffer),pe.viewport.set([0,0,G.width/devicePixelRatio,G.height/devicePixelRatio]),pe.clear({color:e.aN.transparent,depth:1}),ie.coordsIndex=[];for(const vt of ct){const Mt=ie.getTerrainData(vt.tileID);pe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,rt.texture);const At={u_matrix:G.transform.calculatePosMatrix(vt.tileID.toUnwrapped()),u_terrain_coords_id:(255-ie.coordsIndex.length)/255,u_texture:0,u_ele_delta:ie.getMeshFrameDelta(G.transform.zoom)};pt.draw(pe,xe.TRIANGLES,De,bi.disabled,Se,xi.backCCW,At,Mt,"terrain",Ue.vertexBuffer,Ue.indexBuffer,Ue.segments),ie.coordsIndex.push(vt.tileID.key)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,G.width,G.height])}(this,this.style.map.terrain))}renderLayer(i,s,R,B){if(!R.isHidden(this.transform.zoom)&&(R.type==="background"||R.type==="custom"||(B||[]).length))switch(this.id=R.id,R.type){case"symbol":Tl(i,s,R,B,this.style.placement.variableOffsets);break;case"circle":(function(G,ie,pe,xe){if(G.renderPass!=="translucent")return;const Se=pe.paint.get("circle-opacity"),De=pe.paint.get("circle-stroke-width"),Ue=pe.paint.get("circle-stroke-opacity"),rt=!pe.layout.get("circle-sort-key").isConstant();if(Se.constantOr(1)===0&&(De.constantOr(1)===0||Ue.constantOr(1)===0))return;const ct=G.context,pt=ct.gl,vt=G.depthModeForSublayer(0,Ba.ReadOnly),Mt=bi.disabled,At=G.colorModeForRenderPass(),Vt=[];for(let Et=0;Et<xe.length;Et++){const Kt=xe[Et],Yt=ie.getTile(Kt),Jt=Yt.getBucket(pe);if(!Jt)continue;const dr=Jt.programConfigurations.get(pe.id),xr=G.useProgram("circle",dr),Dr=Jt.layoutVertexBuffer,Ir=Jt.indexBuffer,qr=G.style.map.terrain&&G.style.map.terrain.getTerrainData(Kt),$r={programConfiguration:dr,program:xr,layoutVertexBuffer:Dr,indexBuffer:Ir,uniformValues:jr(G,Kt,Yt,pe),terrainData:qr};if(rt){const vn=Jt.segments.get();for(const Qr of vn)Vt.push({segments:new e.a0([Qr]),sortKey:Qr.sortKey,state:$r})}else Vt.push({segments:Jt.segments,sortKey:0,state:$r})}rt&&Vt.sort((Et,Kt)=>Et.sortKey-Kt.sortKey);for(const Et of Vt){const{programConfiguration:Kt,program:Yt,layoutVertexBuffer:Jt,indexBuffer:dr,uniformValues:xr,terrainData:Dr}=Et.state,Ir=Et.segments;Yt.draw(ct,pt.TRIANGLES,vt,Mt,At,xi.disabled,xr,Dr,pe.id,Jt,dr,Ir,pe.paint,G.transform.zoom,Kt)}})(i,s,R,B);break;case"heatmap":Sl(i,s,R,B);break;case"line":(function(G,ie,pe,xe){if(G.renderPass!=="translucent")return;const Se=pe.paint.get("line-opacity"),De=pe.paint.get("line-width");if(Se.constantOr(1)===0||De.constantOr(1)===0)return;const Ue=G.depthModeForSublayer(0,Ba.ReadOnly),rt=G.colorModeForRenderPass(),ct=pe.paint.get("line-dasharray"),pt=pe.paint.get("line-pattern"),vt=pt.constantOr(1),Mt=pe.paint.get("line-gradient"),At=pe.getCrossfadeParameters(),Vt=vt?"linePattern":ct?"lineSDF":Mt?"lineGradient":"line",Et=G.context,Kt=Et.gl;let Yt=!0;for(const Jt of xe){const dr=ie.getTile(Jt);if(vt&&!dr.patternsLoaded())continue;const xr=dr.getBucket(pe);if(!xr)continue;const Dr=xr.programConfigurations.get(pe.id),Ir=G.context.program.get(),qr=G.useProgram(Vt,Dr),$r=Yt||qr.program!==Ir,vn=G.style.map.terrain&&G.style.map.terrain.getTerrainData(Jt),Qr=pt.constantOr(null);if(Qr&&dr.imageAtlas){const Sn=dr.imageAtlas,mn=Sn.patternPositions[Qr.to.toString()],Ln=Sn.patternPositions[Qr.from.toString()];mn&&Ln&&Dr.setConstantPatternPositions(mn,Ln)}const xn=vn?Jt:null,an=vt?Zr(G,dr,pe,At,xn):ct?cn(G,dr,pe,ct,At,xn):Mt?Ar(G,dr,pe,xr.lineClipsArray.length,xn):sr(G,dr,pe,xn);if(vt)Et.activeTexture.set(Kt.TEXTURE0),dr.imageAtlasTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE),Dr.updatePaintBuffers(At);else if(ct&&($r||G.lineAtlas.dirty))Et.activeTexture.set(Kt.TEXTURE0),G.lineAtlas.bind(Et);else if(Mt){const Sn=xr.gradients[pe.id];let mn=Sn.texture;if(pe.gradientVersion!==Sn.version){let Ln=256;if(pe.stepInterpolant){const ta=ie.getSource().maxzoom,Mn=Jt.canonical.z===ta?Math.ceil(1<<G.transform.maxZoom-Jt.canonical.z):1,Yn=xr.maxLineLength/e.X*1024*Mn;Ln=e.ad(e.aV(Yn),256,Et.maxTextureSize)}Sn.gradient=e.aW({expression:pe.gradientExpression(),evaluationKey:"lineProgress",resolution:Ln,image:Sn.gradient||void 0,clips:xr.lineClipsArray}),Sn.texture?Sn.texture.update(Sn.gradient):Sn.texture=new z(Et,Sn.gradient,Kt.RGBA),Sn.version=pe.gradientVersion,mn=Sn.texture}Et.activeTexture.set(Kt.TEXTURE0),mn.bind(pe.stepInterpolant?Kt.NEAREST:Kt.LINEAR,Kt.CLAMP_TO_EDGE)}qr.draw(Et,Kt.TRIANGLES,Ue,G.stencilModeForClipping(Jt),rt,xi.disabled,an,vn,pe.id,xr.layoutVertexBuffer,xr.indexBuffer,xr.segments,pe.paint,G.transform.zoom,Dr,xr.layoutVertexBuffer2),Yt=!1}})(i,s,R,B);break;case"fill":(function(G,ie,pe,xe){const Se=pe.paint.get("fill-color"),De=pe.paint.get("fill-opacity");if(De.constantOr(1)===0)return;const Ue=G.colorModeForRenderPass(),rt=pe.paint.get("fill-pattern"),ct=G.opaquePassEnabledForLayer()&&!rt.constantOr(1)&&Se.constantOr(e.aN.transparent).a===1&&De.constantOr(0)===1?"opaque":"translucent";if(G.renderPass===ct){const pt=G.depthModeForSublayer(1,G.renderPass==="opaque"?Ba.ReadWrite:Ba.ReadOnly);Mc(G,ie,pe,xe,pt,Ue,!1)}if(G.renderPass==="translucent"&&pe.paint.get("fill-antialias")){const pt=G.depthModeForSublayer(pe.getPaintProperty("fill-outline-color")?2:0,Ba.ReadOnly);Mc(G,ie,pe,xe,pt,Ue,!0)}})(i,s,R,B);break;case"fill-extrusion":(function(G,ie,pe,xe){const Se=pe.paint.get("fill-extrusion-opacity");if(Se!==0&&G.renderPass==="translucent"){const De=new Ba(G.context.gl.LEQUAL,Ba.ReadWrite,G.depthRangeFor3D);if(Se!==1||pe.paint.get("fill-extrusion-pattern").constantOr(1))hc(G,ie,pe,xe,De,bi.disabled,eo.disabled),hc(G,ie,pe,xe,De,G.stencilModeFor3D(),G.colorModeForRenderPass());else{const Ue=G.colorModeForRenderPass();hc(G,ie,pe,xe,De,bi.disabled,Ue)}}})(i,s,R,B);break;case"hillshade":(function(G,ie,pe,xe){if(G.renderPass!=="offscreen"&&G.renderPass!=="translucent")return;const Se=G.context,De=G.depthModeForSublayer(0,Ba.ReadOnly),Ue=G.colorModeForRenderPass(),[rt,ct]=G.renderPass==="translucent"?G.stencilConfigForOverlap(xe):[{},xe];for(const pt of ct){const vt=ie.getTile(pt);vt.needsHillshadePrepare!==void 0&&vt.needsHillshadePrepare&&G.renderPass==="offscreen"?ku(G,vt,pe,De,bi.disabled,Ue):G.renderPass==="translucent"&&pc(G,pt,vt,pe,De,rt[pt.overscaledZ],Ue)}Se.viewport.set([0,0,G.width,G.height])})(i,s,R,B);break;case"raster":(function(G,ie,pe,xe){if(G.renderPass!=="translucent"||pe.paint.get("raster-opacity")===0||!xe.length)return;const Se=G.context,De=Se.gl,Ue=ie.getSource(),rt=G.useProgram("raster"),ct=G.colorModeForRenderPass(),[pt,vt]=Ue instanceof Le?[{},xe]:G.stencilConfigForOverlap(xe),Mt=vt[vt.length-1].overscaledZ,At=!G.options.moving;for(const Vt of vt){const Et=G.depthModeForSublayer(Vt.overscaledZ-Mt,pe.paint.get("raster-opacity")===1?Ba.ReadWrite:Ba.ReadOnly,De.LESS),Kt=ie.getTile(Vt);Kt.registerFadeDuration(pe.paint.get("raster-fade-duration"));const Yt=ie.findLoadedParent(Vt,0),Jt=ie.findLoadedSibling(Vt),dr=Ts(Kt,Yt||Jt||null,ie,pe,G.transform,G.style.map.terrain);let xr,Dr;const Ir=pe.paint.get("raster-resampling")==="nearest"?De.NEAREST:De.LINEAR;Se.activeTexture.set(De.TEXTURE0),Kt.texture.bind(Ir,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Se.activeTexture.set(De.TEXTURE1),Yt?(Yt.texture.bind(Ir,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),xr=Math.pow(2,Yt.tileID.overscaledZ-Kt.tileID.overscaledZ),Dr=[Kt.tileID.canonical.x*xr%1,Kt.tileID.canonical.y*xr%1]):Kt.texture.bind(Ir,De.CLAMP_TO_EDGE,De.LINEAR_MIPMAP_NEAREST),Kt.texture.useMipmap&&Se.extTextureFilterAnisotropic&&G.transform.pitch>20&&De.texParameterf(De.TEXTURE_2D,Se.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Se.extTextureFilterAnisotropicMax);const qr=G.style.map.terrain&&G.style.map.terrain.getTerrainData(Vt),$r=qr?Vt:null,vn=$r?$r.posMatrix:G.transform.calculatePosMatrix(Vt.toUnwrapped(),At),Qr=Cn(vn,Dr||[0,0],xr||1,dr,pe);Ue instanceof Le?rt.draw(Se,De.TRIANGLES,Et,bi.disabled,ct,xi.disabled,Qr,qr,pe.id,Ue.boundsBuffer,G.quadTriangleIndexBuffer,Ue.boundsSegments):rt.draw(Se,De.TRIANGLES,Et,pt[Vt.overscaledZ],ct,xi.disabled,Qr,qr,pe.id,G.rasterBoundsBuffer,G.quadTriangleIndexBuffer,G.rasterBoundsSegments)}})(i,s,R,B);break;case"background":(function(G,ie,pe,xe){const Se=pe.paint.get("background-color"),De=pe.paint.get("background-opacity");if(De===0)return;const Ue=G.context,rt=Ue.gl,ct=G.transform,pt=ct.tileSize,vt=pe.paint.get("background-pattern");if(G.isPatternMissing(vt))return;const Mt=!vt&&Se.a===1&&De===1&&G.opaquePassEnabledForLayer()?"opaque":"translucent";if(G.renderPass!==Mt)return;const At=bi.disabled,Vt=G.depthModeForSublayer(0,Mt==="opaque"?Ba.ReadWrite:Ba.ReadOnly),Et=G.colorModeForRenderPass(),Kt=G.useProgram(vt?"backgroundPattern":"background"),Yt=xe||ct.coveringTiles({tileSize:pt,terrain:G.style.map.terrain});vt&&(Ue.activeTexture.set(rt.TEXTURE0),G.imageManager.bind(G.context));const Jt=pe.getCrossfadeParameters();for(const dr of Yt){const xr=xe?dr.posMatrix:G.transform.calculatePosMatrix(dr.toUnwrapped()),Dr=vt?ia(xr,De,G,vt,{tileID:dr,tileSize:pt},Jt):Dn(xr,De,Se),Ir=G.style.map.terrain&&G.style.map.terrain.getTerrainData(dr);Kt.draw(Ue,rt.TRIANGLES,Vt,At,Et,xi.disabled,Dr,Ir,pe.id,G.tileExtentBuffer,G.quadTriangleIndexBuffer,G.tileExtentSegments)}})(i,0,R,B);break;case"custom":(function(G,ie,pe){const xe=G.context,Se=pe.implementation;if(G.renderPass==="offscreen"){const De=Se.prerender;De&&(G.setCustomLayerDefaults(),xe.setColorMode(G.colorModeForRenderPass()),De.call(Se,xe.gl,G.transform.customLayerMatrix()),xe.setDirty(),G.setBaseState())}else if(G.renderPass==="translucent"){G.setCustomLayerDefaults(),xe.setColorMode(G.colorModeForRenderPass()),xe.setStencilMode(bi.disabled);const De=Se.renderingMode==="3d"?new Ba(G.context.gl.LEQUAL,Ba.ReadWrite,G.depthRangeFor3D):G.depthModeForSublayer(0,Ba.ReadOnly);xe.setDepthMode(De),Se.render(xe.gl,G.transform.customLayerMatrix(),{farZ:G.transform.farZ,nearZ:G.transform.nearZ,fov:G.transform._fov,modelViewProjectionMatrix:G.transform.modelViewProjectionMatrix,projectionMatrix:G.transform.projectionMatrix}),xe.setDirty(),G.setBaseState(),xe.bindFramebuffer.set(null)}})(i,0,R)}}translatePosMatrix(i,s,R,B,G){if(!R[0]&&!R[1])return i;const ie=G?B==="map"?this.transform.angle:0:B==="viewport"?-this.transform.angle:0;if(ie){const Se=Math.sin(ie),De=Math.cos(ie);R=[R[0]*De-R[1]*Se,R[0]*Se+R[1]*De]}const pe=[G?R[0]:Tt(s,R[0],this.transform.zoom),G?R[1]:Tt(s,R[1],this.transform.zoom),0],xe=new Float32Array(16);return e.J(xe,i,pe),xe}saveTileTexture(i){const s=this._tileTextures[i.size[0]];s?s.push(i):this._tileTextures[i.size[0]]=[i]}getTileTexture(i){const s=this._tileTextures[i];return s&&s.length>0?s.pop():null}isPatternMissing(i){if(!i)return!1;if(!i.from||!i.to)return!0;const s=this.imageManager.getPattern(i.from.toString()),R=this.imageManager.getPattern(i.to.toString());return!s||!R}useProgram(i,s){this.cache=this.cache||{};const R=i+(s?s.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[R]||(this.cache[R]=new tn(this.context,kn[i],s,$n[i],this._showOverdrawInspector,this.style.map.terrain)),this.cache[R]}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 i=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(i.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const i=this.context.gl;this.debugOverlayTexture=new z(this.context,this.debugOverlayCanvas,i.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:i,drawingBufferHeight:s}=this.context.gl;return this.width!==i||this.height!==s}}class qs{constructor(i,s){this.points=i,this.planes=s}static fromInvProjectionMatrix(i,s,R){const B=Math.pow(2,R),G=[[-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 xe=1/(pe=e.ag([],pe,i))[3]/s*B;return e.b1(pe,pe,[xe,xe,1/pe[3],xe])}),ie=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(pe=>{const xe=function(rt,ct){var pt=ct[0],vt=ct[1],Mt=ct[2],At=pt*pt+vt*vt+Mt*Mt;return At>0&&(At=1/Math.sqrt(At)),rt[0]=ct[0]*At,rt[1]=ct[1]*At,rt[2]=ct[2]*At,rt}([],function(rt,ct,pt){var vt=ct[0],Mt=ct[1],At=ct[2],Vt=pt[0],Et=pt[1],Kt=pt[2];return rt[0]=Mt*Kt-At*Et,rt[1]=At*Vt-vt*Kt,rt[2]=vt*Et-Mt*Vt,rt}([],P([],G[pe[0]],G[pe[1]]),P([],G[pe[2]],G[pe[1]]))),Se=(De=xe,Ue=G[pe[1]],-(De[0]*Ue[0]+De[1]*Ue[1]+De[2]*Ue[2]));var De,Ue;return xe.concat(Se)});return new qs(G,ie)}}class As{constructor(i,s){this.min=i,this.max=s,this.center=function(R,B,G){return R[0]=B[0]*G,R[1]=B[1]*G,R[2]=B[2]*G,R}([],function(R,B,G){return R[0]=B[0]+G[0],R[1]=B[1]+G[1],R[2]=B[2]+G[2],R}([],this.min,this.max),.5)}quadrant(i){const s=[i%2==0,i<2],R=k(this.min),B=k(this.max);for(let G=0;G<s.length;G++)R[G]=s[G]?this.min[G]:this.center[G],B[G]=s[G]?this.center[G]:this.max[G];return B[2]=this.max[2],new As(R,B)}distanceX(i){return Math.max(Math.min(this.max[0],i[0]),this.min[0])-i[0]}distanceY(i){return Math.max(Math.min(this.max[1],i[1]),this.min[1])-i[1]}intersects(i){const s=[[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 R=!0;for(let B=0;B<i.planes.length;B++){const G=i.planes[B];let ie=0;for(let pe=0;pe<s.length;pe++)e.b2(G,s[pe])>=0&&ie++;if(ie===0)return 0;ie!==s.length&&(R=!1)}if(R)return 2;for(let B=0;B<3;B++){let G=Number.MAX_VALUE,ie=-Number.MAX_VALUE;for(let pe=0;pe<i.points.length;pe++){const xe=i.points[pe][B]-this.min[B];G=Math.min(G,xe),ie=Math.max(ie,xe)}if(ie<0||G>this.max[B]-this.min[B])return 0}return 1}}class Cl{constructor(i=0,s=0,R=0,B=0){if(isNaN(i)||i<0||isNaN(s)||s<0||isNaN(R)||R<0||isNaN(B)||B<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=i,this.bottom=s,this.left=R,this.right=B}interpolate(i,s,R){return s.top!=null&&i.top!=null&&(this.top=e.z.number(i.top,s.top,R)),s.bottom!=null&&i.bottom!=null&&(this.bottom=e.z.number(i.bottom,s.bottom,R)),s.left!=null&&i.left!=null&&(this.left=e.z.number(i.left,s.left,R)),s.right!=null&&i.right!=null&&(this.right=e.z.number(i.right,s.right,R)),this}getCenter(i,s){const R=e.ad((this.left+i-this.right)/2,0,i),B=e.ad((this.top+s-this.bottom)/2,0,s);return new e.P(R,B)}equals(i){return this.top===i.top&&this.bottom===i.bottom&&this.left===i.left&&this.right===i.right}clone(){return new Cl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const mc=85.051129;class ni{constructor(i,s,R,B,G){this.tileSize=512,this._renderWorldCopies=G===void 0||!!G,this._minZoom=i||0,this._maxZoom=s||22,this._minPitch=R??0,this._maxPitch=B??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Cl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const i=new ni(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return i.apply(this),i}apply(i){this.tileSize=i.tileSize,this.latRange=i.latRange,this.width=i.width,this.height=i.height,this._center=i._center,this._elevation=i._elevation,this.minElevationForCurrentTile=i.minElevationForCurrentTile,this.zoom=i.zoom,this.angle=i.angle,this._fov=i._fov,this._pitch=i._pitch,this._unmodified=i._unmodified,this._edgeInsets=i._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(i){this._minZoom!==i&&(this._minZoom=i,this.zoom=Math.max(this.zoom,i))}get maxZoom(){return this._maxZoom}set maxZoom(i){this._maxZoom!==i&&(this._maxZoom=i,this.zoom=Math.min(this.zoom,i))}get minPitch(){return this._minPitch}set minPitch(i){this._minPitch!==i&&(this._minPitch=i,this.pitch=Math.max(this.pitch,i))}get maxPitch(){return this._maxPitch}set maxPitch(i){this._maxPitch!==i&&(this._maxPitch=i,this.pitch=Math.min(this.pitch,i))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(i){i===void 0?i=!0:i===null&&(i=!1),this._renderWorldCopies=i}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(i){const s=-e.b3(i,-180,180)*Math.PI/180;this.angle!==s&&(this._unmodified=!1,this.angle=s,this._calcMatrices(),this.rotationMatrix=function(){var R=new e.A(4);return e.A!=Float32Array&&(R[1]=0,R[2]=0),R[0]=1,R[3]=1,R}(),function(R,B,G){var ie=B[0],pe=B[1],xe=B[2],Se=B[3],De=Math.sin(G),Ue=Math.cos(G);R[0]=ie*Ue+xe*De,R[1]=pe*Ue+Se*De,R[2]=ie*-De+xe*Ue,R[3]=pe*-De+Se*Ue}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(i){const s=e.ad(i,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==s&&(this._unmodified=!1,this._pitch=s,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(i){i=Math.max(.01,Math.min(60,i)),this._fov!==i&&(this._unmodified=!1,this._fov=i/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(i){const s=Math.min(Math.max(i,this.minZoom),this.maxZoom);this._zoom!==s&&(this._unmodified=!1,this._zoom=s,this.tileZoom=Math.max(0,Math.floor(s)),this.scale=this.zoomScale(s),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(i){i.lat===this._center.lat&&i.lng===this._center.lng||(this._unmodified=!1,this._center=i,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(i){i!==this._elevation&&(this._elevation=i,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(i){this._edgeInsets.equals(i)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,i,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(i){return this._edgeInsets.equals(i)}interpolatePadding(i,s,R){this._unmodified=!1,this._edgeInsets.interpolate(i,s,R),this._constrain(),this._calcMatrices()}coveringZoomLevel(i){const s=(i.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/i.tileSize));return Math.max(0,s)}getVisibleUnwrappedCoordinates(i){const s=[new e.b4(0,i)];if(this._renderWorldCopies){const R=this.pointCoordinate(new e.P(0,0)),B=this.pointCoordinate(new e.P(this.width,0)),G=this.pointCoordinate(new e.P(this.width,this.height)),ie=this.pointCoordinate(new e.P(0,this.height)),pe=Math.floor(Math.min(R.x,B.x,G.x,ie.x)),xe=Math.floor(Math.max(R.x,B.x,G.x,ie.x)),Se=1;for(let De=pe-Se;De<=xe+Se;De++)De!==0&&s.push(new e.b4(De,i))}return s}coveringTiles(i){var s,R;let B=this.coveringZoomLevel(i);const G=B;if(i.minzoom!==void 0&&B<i.minzoom)return[];i.maxzoom!==void 0&&B>i.maxzoom&&(B=i.maxzoom);const ie=this.pointCoordinate(this.getCameraPoint()),pe=e.Z.fromLngLat(this.center),xe=Math.pow(2,B),Se=[xe*ie.x,xe*ie.y,0],De=[xe*pe.x,xe*pe.y,0],Ue=qs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,B);let rt=i.minzoom||0;!i.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(rt=B);const ct=i.terrain?2/Math.min(this.tileSize,i.tileSize)*this.tileSize:3,pt=Et=>({aabb:new As([Et*xe,0,0],[(Et+1)*xe,xe,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),vt=[],Mt=[],At=B,Vt=i.reparseOverscaled?G:B;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)vt.push(pt(-Et)),vt.push(pt(Et));for(vt.push(pt(0));vt.length>0;){const Et=vt.pop(),Kt=Et.x,Yt=Et.y;let Jt=Et.fullyVisible;if(!Jt){const $r=Et.aabb.intersects(Ue);if($r===0)continue;Jt=$r===2}const dr=i.terrain?Se:De,xr=Et.aabb.distanceX(dr),Dr=Et.aabb.distanceY(dr),Ir=Math.max(Math.abs(xr),Math.abs(Dr)),qr=ct+(1<<At-Et.zoom)-2;if(Et.zoom===At||Ir>qr&&Et.zoom>=rt){const $r=At-Et.zoom,vn=Se[0]-.5-(Kt<<$r),Qr=Se[1]-.5-(Yt<<$r);Mt.push({tileID:new e.S(Et.zoom===At?Vt:Et.zoom,Et.wrap,Et.zoom,Kt,Yt),distanceSq:S([De[0]-.5-Kt,De[1]-.5-Yt]),tileDistanceToCamera:Math.sqrt(vn*vn+Qr*Qr)})}else for(let $r=0;$r<4;$r++){const vn=(Kt<<1)+$r%2,Qr=(Yt<<1)+($r>>1),xn=Et.zoom+1;let an=Et.aabb.quadrant($r);if(i.terrain){const Sn=new e.S(xn,Et.wrap,xn,vn,Qr),mn=i.terrain.getMinMaxElevation(Sn),Ln=(s=mn.minElevation)!==null&&s!==void 0?s:this.elevation,ta=(R=mn.maxElevation)!==null&&R!==void 0?R:this.elevation;an=new As([an.min[0],an.min[1],Ln],[an.max[0],an.max[1],ta])}vt.push({aabb:an,zoom:xn,x:vn,y:Qr,wrap:Et.wrap,fullyVisible:Jt})}}return Mt.sort((Et,Kt)=>Et.distanceSq-Kt.distanceSq).map(Et=>Et.tileID)}resize(i,s){this.width=i,this.height=s,this.pixelsToGLUnits=[2/i,-2/s],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(i){return Math.pow(2,i)}scaleZoom(i){return Math.log(i)/Math.LN2}project(i){const s=e.ad(i.lat,-85.051129,mc);return new e.P(e.O(i.lng)*this.worldSize,e.Q(s)*this.worldSize)}unproject(i){return new e.Z(i.x/this.worldSize,i.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(i){const s=this.elevation,R=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,B=this.pointLocation(this.centerPoint,i),G=i.getElevationForLngLatZoom(B,this.tileZoom);if(!(this.elevation-G))return;const ie=R+s-G,pe=Math.cos(this._pitch)*this.cameraToCenterDistance/ie/e.b5(1,B.lat)/this.tileSize,xe=this.scaleZoom(pe);this._elevation=G,this._center=B,this.zoom=xe}setLocationAtPoint(i,s){const R=this.pointCoordinate(s),B=this.pointCoordinate(this.centerPoint),G=this.locationCoordinate(i),ie=new e.Z(G.x-(R.x-B.x),G.y-(R.y-B.y));this.center=this.coordinateLocation(ie),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(i,s){return s?this.coordinatePoint(this.locationCoordinate(i),s.getElevationForLngLatZoom(i,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(i))}pointLocation(i,s){return this.coordinateLocation(this.pointCoordinate(i,s))}locationCoordinate(i){return e.Z.fromLngLat(i)}coordinateLocation(i){return i&&i.toLngLat()}pointCoordinate(i,s){if(s){const pt=s.pointCoordinate(i);if(pt!=null)return pt}const R=[i.x,i.y,0,1],B=[i.x,i.y,1,1];e.ag(R,R,this.pixelMatrixInverse),e.ag(B,B,this.pixelMatrixInverse);const G=R[3],ie=B[3],pe=R[0]/G,xe=B[0]/ie,Se=R[1]/G,De=B[1]/ie,Ue=R[2]/G,rt=B[2]/ie,ct=Ue===rt?0:(0-Ue)/(rt-Ue);return new e.Z(e.z.number(pe,xe,ct)/this.worldSize,e.z.number(Se,De,ct)/this.worldSize)}coordinatePoint(i,s=0,R=this.pixelMatrix){const B=[i.x*this.worldSize,i.y*this.worldSize,s,1];return e.ag(B,B,R),new e.P(B[0]/B[3],B[1]/B[3])}getBounds(){const i=Math.max(0,this.height/2-this.getHorizon());return new Ce().extend(this.pointLocation(new e.P(0,i))).extend(this.pointLocation(new e.P(this.width,i))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(i){i?(this.lngRange=[i.getWest(),i.getEast()],this.latRange=[i.getSouth(),i.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,mc])}calculateTileMatrix(i){const s=i.canonical,R=this.worldSize/this.zoomScale(s.z),B=s.x+Math.pow(2,s.z)*i.wrap,G=e.ao(new Float64Array(16));return e.J(G,G,[B*R,s.y*R,0]),e.K(G,G,[R/e.X,R/e.X,1]),G}calculatePosMatrix(i,s=!1){const R=i.key,B=s?this._alignedPosMatrixCache:this._posMatrixCache;if(B[R])return B[R];const G=this.calculateTileMatrix(i);return e.L(G,s?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,G),B[R]=new Float32Array(G),B[R]}calculateFogMatrix(i){const s=i.key,R=this._fogMatrixCache;if(R[s])return R[s];const B=this.calculateTileMatrix(i);return e.L(B,this.fogMatrix,B),R[s]=new Float32Array(B),R[s]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(i,s){s=e.ad(+s,this.minZoom,this.maxZoom);const R={center:new e.N(i.lng,i.lat),zoom:s};let B=this.lngRange;if(!this._renderWorldCopies&&B===null){const Et=179.9999999999;B=[-Et,Et]}const G=this.tileSize*this.zoomScale(R.zoom);let ie=0,pe=G,xe=0,Se=G,De=0,Ue=0;const{x:rt,y:ct}=this.size;if(this.latRange){const Et=this.latRange;ie=e.Q(Et[1])*G,pe=e.Q(Et[0])*G,pe-ie<ct&&(De=ct/(pe-ie))}B&&(xe=e.b3(e.O(B[0])*G,0,G),Se=e.b3(e.O(B[1])*G,0,G),Se<xe&&(Se+=G),Se-xe<rt&&(Ue=rt/(Se-xe)));const{x:pt,y:vt}=this.project.call({worldSize:G},i);let Mt,At;const Vt=Math.max(Ue||0,De||0);if(Vt){const Et=new e.P(Ue?(Se+xe)/2:pt,De?(pe+ie)/2:vt);return R.center=this.unproject.call({worldSize:G},Et).wrap(),R.zoom+=this.scaleZoom(Vt),R}if(this.latRange){const Et=ct/2;vt-Et<ie&&(At=ie+Et),vt+Et>pe&&(At=pe-Et)}if(B){const Et=(xe+Se)/2;let Kt=pt;this._renderWorldCopies&&(Kt=e.b3(pt,Et-G/2,Et+G/2));const Yt=rt/2;Kt-Yt<xe&&(Mt=xe+Yt),Kt+Yt>Se&&(Mt=Se-Yt)}if(Mt!==void 0||At!==void 0){const Et=new e.P(Mt??pt,At??vt);R.center=this.unproject.call({worldSize:G},Et).wrap()}return R}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const i=this._unmodified,{center:s,zoom:R}=this.getConstrained(this.center,this.zoom);this.center=s,this.zoom=R,this._unmodified=i,this._constraining=!1}_calcMatrices(){if(!this.height)return;const i=this._fov/2,s=this.centerOffset,R=this.point.x,B=this.point.y;this.cameraToCenterDistance=.5/Math.tan(i)*this.height,this._pixelPerMeter=e.b5(1,this.center.lat)*this.worldSize;let G=e.ao(new Float64Array(16));e.K(G,G,[this.width/2,-this.height/2,1]),e.J(G,G,[1,-1,0]),this.labelPlaneMatrix=G,G=e.ao(new Float64Array(16)),e.K(G,G,[1,-1,1]),e.J(G,G,[-1,-1,0]),e.K(G,G,[2/this.width,2/this.height,1]),this.glCoordMatrix=G;const ie=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),pe=Math.min(this.elevation,this.minElevationForCurrentTile),xe=ie-pe*this._pixelPerMeter/Math.cos(this._pitch),Se=pe<0?xe:ie,De=Math.PI/2+this._pitch,Ue=this._fov*(.5+s.y/this.height),rt=Math.sin(Ue)*Se/Math.sin(e.ad(Math.PI-De-Ue,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+s.y/(2*ct)),vt=Math.sin(pt)*Se/Math.sin(e.ad(Math.PI-De-pt,.01,Math.PI-.01)),Mt=Math.min(rt,vt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Mt+Se),this.nearZ=this.height/50,G=new Float64Array(16),e.b6(G,this._fov,this.width/this.height,this.nearZ,this.farZ),G[8]=2*-s.x/this.width,G[9]=2*s.y/this.height,this.projectionMatrix=e.af(G),e.K(G,G,[1,-1,1]),e.J(G,G,[0,0,-this.cameraToCenterDistance]),e.b7(G,G,this._pitch),e.ae(G,G,this.angle),e.J(G,G,[-R,-B,0]),this.mercatorMatrix=e.K([],G,[this.worldSize,this.worldSize,this.worldSize]),e.K(G,G,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.L(new Float64Array(16),this.labelPlaneMatrix,G),e.J(G,G,[0,0,-this.elevation]),this.modelViewProjectionMatrix=G,this.invModelViewProjectionMatrix=e.at([],G),this.fogMatrix=new Float64Array(16),e.b6(this.fogMatrix,this._fov,this.width/this.height,ie,this.farZ),this.fogMatrix[8]=2*-s.x/this.width,this.fogMatrix[9]=2*s.y/this.height,e.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),e.b7(this.fogMatrix,this.fogMatrix,this._pitch),e.ae(this.fogMatrix,this.fogMatrix,this.angle),e.J(this.fogMatrix,this.fogMatrix,[-R,-B,0]),e.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=e.L(new Float64Array(16),this.labelPlaneMatrix,G);const At=this.width%2/2,Vt=this.height%2/2,Et=Math.cos(this.angle),Kt=Math.sin(this.angle),Yt=R-Math.round(R)+Et*At+Kt*Vt,Jt=B-Math.round(B)+Et*Vt+Kt*At,dr=new Float64Array(G);if(e.J(dr,dr,[Yt>.5?Yt-1:Yt,Jt>.5?Jt-1:Jt,0]),this.alignedModelViewProjectionMatrix=dr,G=e.at(new Float64Array(16),this.pixelMatrix),!G)throw new Error("failed to invert matrix");this.pixelMatrixInverse=G,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const i=this.pointCoordinate(new e.P(0,0)),s=[i.x*this.worldSize,i.y*this.worldSize,0,1];return e.ag(s,s,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const i=this._pitch,s=Math.tan(i)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,s))}getCameraQueryGeometry(i){const s=this.getCameraPoint();if(i.length===1)return[i[0],s];{let R=s.x,B=s.y,G=s.x,ie=s.y;for(const pe of i)R=Math.min(R,pe.x),B=Math.min(B,pe.y),G=Math.max(G,pe.x),ie=Math.max(ie,pe.y);return[new e.P(R,B),new e.P(G,B),new e.P(G,ie),new e.P(R,ie),new e.P(R,B)]}}lngLatToCameraDepth(i,s){const R=this.locationCoordinate(i),B=[R.x*this.worldSize,R.y*this.worldSize,s,1];return e.ag(B,B,this.modelViewProjectionMatrix),B[2]/B[3]}}function Ws(F,i){let s,R=!1,B=null,G=null;const ie=()=>{B=null,R&&(F.apply(G,s),B=setTimeout(ie,i),R=!1)};return(...pe)=>(R=!0,G=this,s=pe,B||ie(),B)}class to{constructor(i){this._getCurrentHash=()=>{const s=window.location.hash.replace("#","");if(this._hashName){let R;return s.split("&").map(B=>B.split("=")).forEach(B=>{B[0]===this._hashName&&(R=B)}),(R&&R[1]||"").split("/")}return s.split("/")},this._onHashChange=()=>{const s=this._getCurrentHash();if(s.length>=3&&!s.some(R=>isNaN(R))){const R=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(s[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+s[2],+s[1]],zoom:+s[0],bearing:R,pitch:+(s[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const s=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,s)},this._removeHash=()=>{const s=this._getCurrentHash();if(s.length===0)return;const R=s.join("/");let B=R;B.split("&").length>0&&(B=B.split("&")[0]),this._hashName&&(B=`${this._hashName}=${R}`);let G=window.location.hash.replace(B,"");G.startsWith("#&")?G=G.slice(0,1)+G.slice(2):G==="#"&&(G="");let ie=window.location.href.replace(/(#.+)?$/,G);ie=ie.replace("&&","&"),window.history.replaceState(window.history.state,null,ie)},this._updateHash=Ws(this._updateHashUnthrottled,300),this._hashName=i&&encodeURIComponent(i)}addTo(i){return this._map=i,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(i){const s=this._map.getCenter(),R=Math.round(100*this._map.getZoom())/100,B=Math.ceil((R*Math.LN2+Math.log(512/360/.5))/Math.LN10),G=Math.pow(10,B),ie=Math.round(s.lng*G)/G,pe=Math.round(s.lat*G)/G,xe=this._map.getBearing(),Se=this._map.getPitch();let De="";if(De+=i?`/${ie}/${pe}/${R}`:`${R}/${pe}/${ie}`,(xe||Se)&&(De+="/"+Math.round(10*xe)/10),Se&&(De+=`/${Math.round(Se)}`),this._hashName){const Ue=this._hashName;let rt=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const vt=pt.split("=")[0];return vt===Ue?(rt=!0,`${vt}=${De}`):pt}).filter(pt=>pt);return rt||ct.push(`${Ue}=${De}`),`#${ct.join("&")}`}return`#${De}`}}const Wo={linearity:.3,easing:e.b8(0,0,.3,1)},ei=e.e({deceleration:2500,maxSpeed:1400},Wo),ai=e.e({deceleration:20,maxSpeed:1400},Wo),Es=e.e({deceleration:1e3,maxSpeed:360},Wo),gc=e.e({deceleration:1e3,maxSpeed:90},Wo);class rc{constructor(i){this._map=i,this.clear()}clear(){this._inertiaBuffer=[]}record(i){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:h.now(),settings:i})}_drainInertiaBuffer(){const i=this._inertiaBuffer,s=h.now();for(;i.length>0&&s-i[0].time>160;)i.shift()}_onMoveEnd(i){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const s={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:G}of this._inertiaBuffer)s.zoom+=G.zoomDelta||0,s.bearing+=G.bearingDelta||0,s.pitch+=G.pitchDelta||0,G.panDelta&&s.pan._add(G.panDelta),G.around&&(s.around=G.around),G.pinchAround&&(s.pinchAround=G.pinchAround);const R=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,B={};if(s.pan.mag()){const G=jl(s.pan.mag(),R,e.e({},ei,i||{}));B.offset=s.pan.mult(G.amount/s.pan.mag()),B.center=this._map.transform.center,Ul(B,G)}if(s.zoom){const G=jl(s.zoom,R,ai);B.zoom=this._map.transform.zoom+G.amount,Ul(B,G)}if(s.bearing){const G=jl(s.bearing,R,Es);B.bearing=this._map.transform.bearing+e.ad(G.amount,-179,179),Ul(B,G)}if(s.pitch){const G=jl(s.pitch,R,gc);B.pitch=this._map.transform.pitch+G.amount,Ul(B,G)}if(B.zoom||B.bearing){const G=s.pinchAround===void 0?s.around:s.pinchAround;B.around=G?this._map.unproject(G):this._map.getCenter()}return this.clear(),e.e(B,{noMoveStart:!0})}}function Ul(F,i){(!F.duration||F.duration<i.duration)&&(F.duration=i.duration,F.easing=i.easing)}function jl(F,i,s){const{maxSpeed:R,linearity:B,deceleration:G}=s,ie=e.ad(F*B/(i/1e3),-R,R),pe=Math.abs(ie)/(G*B);return{easing:s.easing,duration:1e3*pe,amount:ie*(pe/2)}}class Co extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(i,s,R,B={}){const G=r.mousePos(s.getCanvas(),R),ie=s.unproject(G);super(i,e.e({point:G,lngLat:ie,originalEvent:R},B)),this._defaultPrevented=!1,this.target=s}}class vo extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(i,s,R){const B=i==="touchend"?R.changedTouches:R.touches,G=r.touchPos(s.getCanvasContainer(),B),ie=G.map(xe=>s.unproject(xe)),pe=G.reduce((xe,Se,De,Ue)=>xe.add(Se.div(Ue.length)),new e.P(0,0));super(i,{points:G,point:pe,lngLats:ie,lngLat:s.unproject(pe),originalEvent:R}),this._defaultPrevented=!1}}class nl extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(i,s,R){super(i,{originalEvent:R}),this._defaultPrevented=!1}}class nc{constructor(i,s){this._map=i,this._clickTolerance=s.clickTolerance}reset(){delete this._mousedownPos}wheel(i){return this._firePreventable(new nl(i.type,this._map,i))}mousedown(i,s){return this._mousedownPos=s,this._firePreventable(new Co(i.type,this._map,i))}mouseup(i){this._map.fire(new Co(i.type,this._map,i))}click(i,s){this._mousedownPos&&this._mousedownPos.dist(s)>=this._clickTolerance||this._map.fire(new Co(i.type,this._map,i))}dblclick(i){return this._firePreventable(new Co(i.type,this._map,i))}mouseover(i){this._map.fire(new Co(i.type,this._map,i))}mouseout(i){this._map.fire(new Co(i.type,this._map,i))}touchstart(i){return this._firePreventable(new vo(i.type,this._map,i))}touchmove(i){this._map.fire(new vo(i.type,this._map,i))}touchend(i){this._map.fire(new vo(i.type,this._map,i))}touchcancel(i){this._map.fire(new vo(i.type,this._map,i))}_firePreventable(i){if(this._map.fire(i),i.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class zo{constructor(i){this._map=i}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(i){this._map.fire(new Co(i.type,this._map,i))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Co("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(i){this._delayContextMenu?this._contextMenuEvent=i:this._ignoreContextMenu||this._map.fire(new Co(i.type,this._map,i)),this._map.listens("contextmenu")&&i.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ti{constructor(i){this._map=i}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(i){return this.transform.pointLocation(e.P.convert(i),this._map.terrain)}}class bo{constructor(i,s){this._map=i,this._tr=new Ti(i),this._el=i.getCanvasContainer(),this._container=i.getContainer(),this._clickTolerance=s.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(i,s){this.isEnabled()&&i.shiftKey&&i.button===0&&(r.disableDrag(),this._startPos=this._lastPos=s,this._active=!0)}mousemoveWindow(i,s){if(!this._active)return;const R=s;if(this._lastPos.equals(R)||!this._box&&R.dist(this._startPos)<this._clickTolerance)return;const B=this._startPos;this._lastPos=R,this._box||(this._box=r.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",i));const G=Math.min(B.x,R.x),ie=Math.max(B.x,R.x),pe=Math.min(B.y,R.y),xe=Math.max(B.y,R.y);r.setTransform(this._box,`translate(${G}px,${pe}px)`),this._box.style.width=ie-G+"px",this._box.style.height=xe-pe+"px"}mouseupWindow(i,s){if(!this._active||i.button!==0)return;const R=this._startPos,B=s;if(this.reset(),r.suppressClick(),R.x!==B.x||R.y!==B.y)return this._map.fire(new e.k("boxzoomend",{originalEvent:i})),{cameraAnimation:G=>G.fitScreenCoordinates(R,B,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",i)}keydown(i){this._active&&i.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",i))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(i,s){return this._map.fire(new e.k(i,{originalEvent:s}))}}function si(F,i){if(F.length!==i.length)throw new Error(`The number of touches and points are not equal - touches ${F.length}, points ${i.length}`);const s={};for(let R=0;R<F.length;R++)s[F[R].identifier]=i[R];return s}class ro{constructor(i){this.reset(),this.numTouches=i.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(i,s,R){(this.centroid||R.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=i.timeStamp),R.length===this.numTouches&&(this.centroid=function(B){const G=new e.P(0,0);for(const ie of B)G._add(ie);return G.div(B.length)}(s),this.touches=si(R,s)))}touchmove(i,s,R){if(this.aborted||!this.centroid)return;const B=si(R,s);for(const G in this.touches){const ie=this.touches[G],pe=B[G];(!pe||pe.dist(ie)>30)&&(this.aborted=!0)}}touchend(i,s,R){if((!this.centroid||i.timeStamp-this.startTime>500)&&(this.aborted=!0),R.length===0){const B=!this.aborted&&this.centroid;if(this.reset(),B)return B}}}class li{constructor(i){this.singleTap=new ro(i),this.numTaps=i.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(i,s,R){this.singleTap.touchstart(i,s,R)}touchmove(i,s,R){this.singleTap.touchmove(i,s,R)}touchend(i,s,R){const B=this.singleTap.touchend(i,s,R);if(B){const G=i.timeStamp-this.lastTime<500,ie=!this.lastTap||this.lastTap.dist(B)<30;if(G&&ie||this.reset(),this.count++,this.lastTime=i.timeStamp,this.lastTap=B,this.count===this.numTaps)return this.reset(),B}}}class uo{constructor(i){this._tr=new Ti(i),this._zoomIn=new li({numTouches:1,numTaps:2}),this._zoomOut=new li({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(i,s,R){this._zoomIn.touchstart(i,s,R),this._zoomOut.touchstart(i,s,R)}touchmove(i,s,R){this._zoomIn.touchmove(i,s,R),this._zoomOut.touchmove(i,s,R)}touchend(i,s,R){const B=this._zoomIn.touchend(i,s,R),G=this._zoomOut.touchend(i,s,R),ie=this._tr;return B?(this._active=!0,i.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:ie.zoom+1,around:ie.unproject(B)},{originalEvent:i})}):G?(this._active=!0,i.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:ie.zoom-1,around:ie.unproject(G)},{originalEvent:i})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xo{constructor(i){this._enabled=!!i.enable,this._moveStateManager=i.moveStateManager,this._clickTolerance=i.clickTolerance||1,this._moveFunction=i.move,this._activateOnStart=!!i.activateOnStart,i.assignEvents(this),this.reset()}reset(i){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(i)}_move(...i){const s=this._moveFunction(...i);if(s.bearingDelta||s.pitchDelta||s.around||s.panDelta)return this._active=!0,s}dragStart(i,s){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(i)&&(this._moveStateManager.startMove(i),this._lastPoint=s.length?s[0]:s,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(i,s){if(!this.isEnabled())return;const R=this._lastPoint;if(!R)return;if(i.preventDefault(),!this._moveStateManager.isValidMoveEvent(i))return void this.reset(i);const B=s.length?s[0]:s;return!this._moved&&B.dist(R)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=B,this._move(R,B))}dragEnd(i){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(i)&&(this._moved&&r.suppressClick(),this.reset(i))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const al={0:1,2:2};class rs{constructor(i){this._correctEvent=i.checkCorrectEvent}startMove(i){const s=r.mouseButton(i);this._eventButton=s}endMove(i){delete this._eventButton}isValidStartEvent(i){return this._correctEvent(i)}isValidMoveEvent(i){return!function(s,R){const B=al[R];return s.buttons===void 0||(s.buttons&B)!==B}(i,this._eventButton)}isValidEndEvent(i){return r.mouseButton(i)===this._eventButton}}class Ml{constructor(){this._firstTouch=void 0}_isOneFingerTouch(i){return i.targetTouches.length===1}_isSameTouchEvent(i){return i.targetTouches[0].identifier===this._firstTouch}startMove(i){const s=i.targetTouches[0].identifier;this._firstTouch=s}endMove(i){delete this._firstTouch}isValidStartEvent(i){return this._isOneFingerTouch(i)}isValidMoveEvent(i){return this._isOneFingerTouch(i)&&this._isSameTouchEvent(i)}isValidEndEvent(i){return this._isOneFingerTouch(i)&&this._isSameTouchEvent(i)}}const Mo=F=>{F.mousedown=F.dragStart,F.mousemoveWindow=F.dragMove,F.mouseup=F.dragEnd,F.contextmenu=i=>{i.preventDefault()}},ql=({enable:F,clickTolerance:i,bearingDegreesPerPixelMoved:s=.8})=>{const R=new rs({checkCorrectEvent:B=>r.mouseButton(B)===0&&B.ctrlKey||r.mouseButton(B)===2});return new xo({clickTolerance:i,move:(B,G)=>({bearingDelta:(G.x-B.x)*s}),moveStateManager:R,enable:F,assignEvents:Mo})},il=({enable:F,clickTolerance:i,pitchDegreesPerPixelMoved:s=-.5})=>{const R=new rs({checkCorrectEvent:B=>r.mouseButton(B)===0&&B.ctrlKey||r.mouseButton(B)===2});return new xo({clickTolerance:i,move:(B,G)=>({pitchDelta:(G.y-B.y)*s}),moveStateManager:R,enable:F,assignEvents:Mo})};class Cs{constructor(i,s){this._clickTolerance=i.clickTolerance||1,this._map=s,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(i){return i<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(i,s,R){return this._calculateTransform(i,s,R)}touchmove(i,s,R){if(this._active){if(!this._shouldBePrevented(R.length))return i.preventDefault(),this._calculateTransform(i,s,R);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",i)}}touchend(i,s,R){this._calculateTransform(i,s,R),this._active&&this._shouldBePrevented(R.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(i,s,R){R.length>0&&(this._active=!0);const B=si(R,s),G=new e.P(0,0),ie=new e.P(0,0);let pe=0;for(const Se in B){const De=B[Se],Ue=this._touches[Se];Ue&&(G._add(De),ie._add(De.sub(Ue)),pe++,B[Se]=De)}if(this._touches=B,this._shouldBePrevented(pe)||!ie.mag())return;const xe=ie.div(pe);return this._sum._add(xe),this._sum.mag()<this._clickTolerance?void 0:{around:G.div(pe),panDelta:xe}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ho{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(i,s,R){this._firstTwoTouches||R.length<2||(this._firstTwoTouches=[R[0].identifier,R[1].identifier],this._start([s[0],s[1]]))}touchmove(i,s,R){if(!this._firstTwoTouches)return;i.preventDefault();const[B,G]=this._firstTwoTouches,ie=gi(R,s,B),pe=gi(R,s,G);if(!ie||!pe)return;const xe=this._aroundCenter?null:ie.add(pe).div(2);return this._move([ie,pe],xe,i)}touchend(i,s,R){if(!this._firstTwoTouches)return;const[B,G]=this._firstTwoTouches,ie=gi(R,s,B),pe=gi(R,s,G);ie&&pe||(this._active&&r.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(i){this._enabled=!0,this._aroundCenter=!!i&&i.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function gi(F,i,s){for(let R=0;R<F.length;R++)if(F[R].identifier===s)return i[R]}function Ms(F,i){return Math.log(F/i)/Math.LN2}class ma extends ho{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(i){this._startDistance=this._distance=i[0].dist(i[1])}_move(i,s){const R=this._distance;if(this._distance=i[0].dist(i[1]),this._active||!(Math.abs(Ms(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Ms(this._distance,R),pinchAround:s}}}function yc(F,i){return 180*F.angleWith(i)/Math.PI}class qc extends ho{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(i){this._startVector=this._vector=i[0].sub(i[1]),this._minDiameter=i[0].dist(i[1])}_move(i,s,R){const B=this._vector;if(this._vector=i[0].sub(i[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:yc(this._vector,B),pinchAround:s}}_isBelowThreshold(i){this._minDiameter=Math.min(this._minDiameter,i.mag());const s=25/(Math.PI*this._minDiameter)*360,R=yc(i,this._startVector);return Math.abs(R)<s}}function ol(F){return Math.abs(F.y)>Math.abs(F.x)}class Pl extends ho{constructor(i){super(),this._currentTouchCount=0,this._map=i}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(i,s,R){super.touchstart(i,s,R),this._currentTouchCount=R.length}_start(i){this._lastPoints=i,ol(i[0].sub(i[1]))&&(this._valid=!1)}_move(i,s,R){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const B=i[0].sub(this._lastPoints[0]),G=i[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(B,G,R.timeStamp),this._valid?(this._lastPoints=i,this._active=!0,{pitchDelta:(B.y+G.y)/2*-.5}):void 0}gestureBeginsVertically(i,s,R){if(this._valid!==void 0)return this._valid;const B=i.mag()>=2,G=s.mag()>=2;if(!B&&!G)return;if(!B||!G)return this._firstMove===void 0&&(this._firstMove=R),R-this._firstMove<100&&void 0;const ie=i.y>0==s.y>0;return ol(i)&&ol(s)&&ie}}const Ll={panStep:100,bearingStep:15,pitchStep:10};class ac{constructor(i){this._tr=new Ti(i);const s=Ll;this._panStep=s.panStep,this._bearingStep=s.bearingStep,this._pitchStep=s.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(i){if(i.altKey||i.ctrlKey||i.metaKey)return;let s=0,R=0,B=0,G=0,ie=0;switch(i.keyCode){case 61:case 107:case 171:case 187:s=1;break;case 189:case 109:case 173:s=-1;break;case 37:i.shiftKey?R=-1:(i.preventDefault(),G=-1);break;case 39:i.shiftKey?R=1:(i.preventDefault(),G=1);break;case 38:i.shiftKey?B=1:(i.preventDefault(),ie=-1);break;case 40:i.shiftKey?B=-1:(i.preventDefault(),ie=1);break;default:return}return this._rotationDisabled&&(R=0,B=0),{cameraAnimation:pe=>{const xe=this._tr;pe.easeTo({duration:300,easeId:"keyboardHandler",easing:ea,zoom:s?Math.round(xe.zoom)+s*(i.shiftKey?2:1):xe.zoom,bearing:xe.bearing+R*this._bearingStep,pitch:xe.pitch+B*this._pitchStep,offset:[-G*this._panStep,-ie*this._panStep],center:xe.center},{originalEvent:i})}}}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 ea(F){return F*(2-F)}const ns=4.000244140625;class sl{constructor(i,s){this._onTimeout=R=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(R)},this._map=i,this._tr=new Ti(i),this._triggerRenderFrame=s,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(i){this._defaultZoomRate=i}setWheelZoomRate(i){this._wheelZoomRate=i}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(i){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!i&&i.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(i){return!!this._map.cooperativeGestures.isEnabled()&&!(i.ctrlKey||this._map.cooperativeGestures.isBypassed(i))}wheel(i){if(!this.isEnabled())return;if(this._shouldBePrevented(i))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",i);let s=i.deltaMode===WheelEvent.DOM_DELTA_LINE?40*i.deltaY:i.deltaY;const R=h.now(),B=R-(this._lastWheelEventTime||0);this._lastWheelEventTime=R,s!==0&&s%ns==0?this._type="wheel":s!==0&&Math.abs(s)<4?this._type="trackpad":B>400?(this._type=null,this._lastValue=s,this._timeout=setTimeout(this._onTimeout,40,i)):this._type||(this._type=Math.abs(B*s)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,s+=this._lastValue)),i.shiftKey&&s&&(s/=4),this._type&&(this._lastWheelEvent=i,this._delta-=s,this._active||this._start(i)),i.preventDefault()}_start(i){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const s=r.mousePos(this._map.getCanvas(),i),R=this._tr;s.y>R.transform.height/2-R.transform.getHorizon()?this._around=e.N.convert(this._aroundCenter?R.center:R.unproject(s)):this._around=e.N.convert(R.center),this._aroundPoint=R.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const i=this._tr.transform;if(this._delta!==0){const xe=this._type==="wheel"&&Math.abs(this._delta)>ns?this._wheelZoomRate:this._defaultZoomRate;let Se=2/(1+Math.exp(-Math.abs(this._delta*xe)));this._delta<0&&Se!==0&&(Se=1/Se);const De=typeof this._targetZoom=="number"?i.zoomScale(this._targetZoom):i.scale;this._targetZoom=Math.min(i.maxZoom,Math.max(i.minZoom,i.scaleZoom(De*Se))),this._type==="wheel"&&(this._startZoom=i.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const s=typeof this._targetZoom=="number"?this._targetZoom:i.zoom,R=this._startZoom,B=this._easing;let G,ie=!1;const pe=h.now()-this._lastWheelEventTime;if(this._type==="wheel"&&R&&B&&pe){const xe=Math.min(pe/200,1),Se=B(xe);G=e.z.number(R,s,Se),xe<1?this._frameId||(this._frameId=!0):ie=!0}else G=s,ie=!0;return this._active=!0,ie&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ie,zoomDelta:G-i.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(i){let s=e.b9;if(this._prevEase){const R=this._prevEase,B=(h.now()-R.start)/R.duration,G=R.easing(B+.01)-R.easing(B),ie=.27/Math.sqrt(G*G+1e-4)*.01,pe=Math.sqrt(.0729-ie*ie);s=e.b8(ie,pe,.25,1)}return this._prevEase={start:h.now(),duration:i,easing:s},s}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Si{constructor(i,s){this._clickZoom=i,this._tapZoom=s}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ho{constructor(i){this._tr=new Ti(i),this.reset()}reset(){this._active=!1}dblclick(i,s){return i.preventDefault(),{cameraAnimation:R=>{R.easeTo({duration:300,zoom:this._tr.zoom+(i.shiftKey?-1:1),around:this._tr.unproject(s)},{originalEvent:i})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ll{constructor(){this._tap=new li({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(i,s,R){if(!this._swipePoint)if(this._tapTime){const B=s[0],G=i.timeStamp-this._tapTime<500,ie=this._tapPoint.dist(B)<30;G&&ie?R.length>0&&(this._swipePoint=B,this._swipeTouch=R[0].identifier):this.reset()}else this._tap.touchstart(i,s,R)}touchmove(i,s,R){if(this._tapTime){if(this._swipePoint){if(R[0].identifier!==this._swipeTouch)return;const B=s[0],G=B.y-this._swipePoint.y;return this._swipePoint=B,i.preventDefault(),this._active=!0,{zoomDelta:G/128}}}else this._tap.touchmove(i,s,R)}touchend(i,s,R){if(this._tapTime)this._swipePoint&&R.length===0&&this.reset();else{const B=this._tap.touchend(i,s,R);B&&(this._tapTime=i.timeStamp,this._tapPoint=B)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ps{constructor(i,s,R){this._el=i,this._mousePan=s,this._touchPan=R}enable(i){this._inertiaOptions=i||{},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 Oo{constructor(i,s,R){this._pitchWithRotate=i.pitchWithRotate,this._mouseRotate=s,this._mousePitch=R}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 cl{constructor(i,s,R,B){this._el=i,this._touchZoom=s,this._touchRotate=R,this._tapDragZoom=B,this._rotationDisabled=!1,this._enabled=!0}enable(i){this._touchZoom.enable(i),this._rotationDisabled||this._touchRotate.enable(i),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 hs{constructor(i,s){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=i,this._options=s,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const i=this._map.getCanvasContainer();i.classList.add("maplibregl-cooperative-gestures"),this._container=r.create("div","maplibregl-cooperative-gesture-screen",i);let s=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(s=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const R=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),B=document.createElement("div");B.className="maplibregl-desktop-message",B.textContent=s,this._container.appendChild(B);const G=document.createElement("div");G.className="maplibregl-mobile-message",G.textContent=R,this._container.appendChild(G),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(r.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(i){return i[this._bypassKey]}notifyGestureBlocked(i,s){this._enabled&&(this._map.fire(new e.k("cooperativegestureprevented",{gestureType:i,originalEvent:s})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Go=F=>F.zoom||F.drag||F.pitch||F.rotate;class Ls extends e.k{}function da(F){return F.panDelta&&F.panDelta.mag()||F.zoomDelta||F.bearingDelta||F.pitchDelta}class Za{constructor(i,s){this.handleWindowEvent=B=>{this.handleEvent(B,`${B.type}Window`)},this.handleEvent=(B,G)=>{if(B.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const ie=B.type==="renderFrame"?void 0:B,pe={needsRenderFrame:!1},xe={},Se={},De=B.touches,Ue=De?this._getMapTouches(De):void 0,rt=Ue?r.touchPos(this._map.getCanvas(),Ue):r.mousePos(this._map.getCanvas(),B);for(const{handlerName:vt,handler:Mt,allowed:At}of this._handlers){if(!Mt.isEnabled())continue;let Vt;this._blockedByActive(Se,At,vt)?Mt.reset():Mt[G||B.type]&&(Vt=Mt[G||B.type](B,rt,Ue),this.mergeHandlerResult(pe,xe,Vt,vt,ie),Vt&&Vt.needsRenderFrame&&this._triggerRenderFrame()),(Vt||Mt.isActive())&&(Se[vt]=Mt)}const ct={};for(const vt in this._previousActiveHandlers)Se[vt]||(ct[vt]=ie);this._previousActiveHandlers=Se,(Object.keys(ct).length||da(pe))&&(this._changes.push([pe,xe,ct]),this._triggerRenderFrame()),(Object.keys(Se).length||da(pe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=pe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=i,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new rc(i),this._bearingSnap=s.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(s);const R=this._el;this._listeners=[[R,"touchstart",{passive:!0}],[R,"touchmove",{passive:!1}],[R,"touchend",void 0],[R,"touchcancel",void 0],[R,"mousedown",void 0],[R,"mousemove",void 0],[R,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[R,"mouseover",void 0],[R,"mouseout",void 0],[R,"dblclick",void 0],[R,"click",void 0],[R,"keydown",{capture:!1}],[R,"keyup",void 0],[R,"wheel",{passive:!1}],[R,"contextmenu",void 0],[window,"blur",void 0]];for(const[B,G,ie]of this._listeners)r.addEventListener(B,G,B===document?this.handleWindowEvent:this.handleEvent,ie)}destroy(){for(const[i,s,R]of this._listeners)r.removeEventListener(i,s,i===document?this.handleWindowEvent:this.handleEvent,R)}_addDefaultHandlers(i){const s=this._map,R=s.getCanvasContainer();this._add("mapEvent",new nc(s,i));const B=s.boxZoom=new bo(s,i);this._add("boxZoom",B),i.interactive&&i.boxZoom&&B.enable();const G=s.cooperativeGestures=new hs(s,i.cooperativeGestures);this._add("cooperativeGestures",G),i.cooperativeGestures&&G.enable();const ie=new uo(s),pe=new Ho(s);s.doubleClickZoom=new Si(pe,ie),this._add("tapZoom",ie),this._add("clickZoom",pe),i.interactive&&i.doubleClickZoom&&s.doubleClickZoom.enable();const xe=new ll;this._add("tapDragZoom",xe);const Se=s.touchPitch=new Pl(s);this._add("touchPitch",Se),i.interactive&&i.touchPitch&&s.touchPitch.enable(i.touchPitch);const De=ql(i),Ue=il(i);s.dragRotate=new Oo(i,De,Ue),this._add("mouseRotate",De,["mousePitch"]),this._add("mousePitch",Ue,["mouseRotate"]),i.interactive&&i.dragRotate&&s.dragRotate.enable();const rt=(({enable:Vt,clickTolerance:Et})=>{const Kt=new rs({checkCorrectEvent:Yt=>r.mouseButton(Yt)===0&&!Yt.ctrlKey});return new xo({clickTolerance:Et,move:(Yt,Jt)=>({around:Jt,panDelta:Jt.sub(Yt)}),activateOnStart:!0,moveStateManager:Kt,enable:Vt,assignEvents:Mo})})(i),ct=new Cs(i,s);s.dragPan=new Ps(R,rt,ct),this._add("mousePan",rt),this._add("touchPan",ct,["touchZoom","touchRotate"]),i.interactive&&i.dragPan&&s.dragPan.enable(i.dragPan);const pt=new qc,vt=new ma;s.touchZoomRotate=new cl(R,vt,pt,xe),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",vt,["touchPan","touchRotate"]),i.interactive&&i.touchZoomRotate&&s.touchZoomRotate.enable(i.touchZoomRotate);const Mt=s.scrollZoom=new sl(s,()=>this._triggerRenderFrame());this._add("scrollZoom",Mt,["mousePan"]),i.interactive&&i.scrollZoom&&s.scrollZoom.enable(i.scrollZoom);const At=s.keyboard=new ac(s);this._add("keyboard",At),i.interactive&&i.keyboard&&s.keyboard.enable(),this._add("blockableMapEvent",new zo(s))}_add(i,s,R){this._handlers.push({handlerName:i,handler:s,allowed:R}),this._handlersById[i]=s}stop(i){if(!this._updatingCamera){for(const{handler:s}of this._handlers)s.reset();this._inertia.clear(),this._fireEvents({},{},i),this._changes=[]}}isActive(){for(const{handler:i}of this._handlers)if(i.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Go(this._eventsInProgress)||this.isZooming()}_blockedByActive(i,s,R){for(const B in i)if(B!==R&&(!s||s.indexOf(B)<0))return!0;return!1}_getMapTouches(i){const s=[];for(const R of i){const B=R.target;this._el.contains(B)&&s.push(R)}return s}mergeHandlerResult(i,s,R,B,G){if(!R)return;e.e(i,R);const ie={handlerName:B,originalEvent:R.originalEvent||G};R.zoomDelta!==void 0&&(s.zoom=ie),R.panDelta!==void 0&&(s.drag=ie),R.pitchDelta!==void 0&&(s.pitch=ie),R.bearingDelta!==void 0&&(s.rotate=ie)}_applyChanges(){const i={},s={},R={};for(const[B,G,ie]of this._changes)B.panDelta&&(i.panDelta=(i.panDelta||new e.P(0,0))._add(B.panDelta)),B.zoomDelta&&(i.zoomDelta=(i.zoomDelta||0)+B.zoomDelta),B.bearingDelta&&(i.bearingDelta=(i.bearingDelta||0)+B.bearingDelta),B.pitchDelta&&(i.pitchDelta=(i.pitchDelta||0)+B.pitchDelta),B.around!==void 0&&(i.around=B.around),B.pinchAround!==void 0&&(i.pinchAround=B.pinchAround),B.noInertia&&(i.noInertia=B.noInertia),e.e(s,G),e.e(R,ie);this._updateMapTransform(i,s,R),this._changes=[]}_updateMapTransform(i,s,R){const B=this._map,G=B._getTransformForUpdate(),ie=B.terrain;if(!(da(i)||ie&&this._terrainMovement))return this._fireEvents(s,R,!0);let{panDelta:pe,zoomDelta:xe,bearingDelta:Se,pitchDelta:De,around:Ue,pinchAround:rt}=i;rt!==void 0&&(Ue=rt),B._stop(!0),Ue=Ue||B.transform.centerPoint;const ct=G.pointLocation(pe?Ue.sub(pe):Ue);Se&&(G.bearing+=Se),De&&(G.pitch+=De),xe&&(G.zoom+=xe),ie?this._terrainMovement||!s.drag&&!s.zoom?s.drag&&this._terrainMovement?G.center=G.pointLocation(G.centerPoint.sub(pe)):G.setLocationAtPoint(ct,Ue):(this._terrainMovement=!0,this._map._elevationFreeze=!0,G.setLocationAtPoint(ct,Ue)):G.setLocationAtPoint(ct,Ue),B._applyUpdatedTransform(G),this._map._update(),i.noInertia||this._inertia.record(i),this._fireEvents(s,R,!0)}_fireEvents(i,s,R){const B=Go(this._eventsInProgress),G=Go(i),ie={};for(const Ue in i){const{originalEvent:rt}=i[Ue];this._eventsInProgress[Ue]||(ie[`${Ue}start`]=rt),this._eventsInProgress[Ue]=i[Ue]}!B&&G&&this._fireEvent("movestart",G.originalEvent);for(const Ue in ie)this._fireEvent(Ue,ie[Ue]);G&&this._fireEvent("move",G.originalEvent);for(const Ue in i){const{originalEvent:rt}=i[Ue];this._fireEvent(Ue,rt)}const pe={};let xe;for(const Ue in this._eventsInProgress){const{handlerName:rt,originalEvent:ct}=this._eventsInProgress[Ue];this._handlersById[rt].isActive()||(delete this._eventsInProgress[Ue],xe=s[rt]||ct,pe[`${Ue}end`]=xe)}for(const Ue in pe)this._fireEvent(Ue,pe[Ue]);const Se=Go(this._eventsInProgress),De=(B||G)&&!Se;if(De&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ue=this._map._getTransformForUpdate();Ue.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ue)}if(R&&De){this._updatingCamera=!0;const Ue=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),rt=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ue||!Ue.essential&&h.prefersReducedMotion?(this._map.fire(new e.k("moveend",{originalEvent:xe})),rt(this._map.getBearing())&&this._map.resetNorth()):(rt(Ue.bearing||this._map.getBearing())&&(Ue.bearing=0),Ue.freezeElevation=!0,this._map.easeTo(Ue,{originalEvent:xe})),this._updatingCamera=!1}}_fireEvent(i,s){this._map.fire(new e.k(i,s?{originalEvent:s}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(i=>{delete this._frameId,this.handleEvent(new Ls("renderFrame",{timeStamp:i})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class no extends e.E{constructor(i,s){super(),this._renderFrameCallback=()=>{const R=Math.min((h.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(R)),R<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=i,this._bearingSnap=s.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.N(this.transform.center.lng,this.transform.center.lat)}setCenter(i,s){return this.jumpTo({center:i},s)}panBy(i,s,R){return i=e.P.convert(i).mult(-1),this.panTo(this.transform.center,e.e({offset:i},s),R)}panTo(i,s,R){return this.easeTo(e.e({center:i},s),R)}getZoom(){return this.transform.zoom}setZoom(i,s){return this.jumpTo({zoom:i},s),this}zoomTo(i,s,R){return this.easeTo(e.e({zoom:i},s),R)}zoomIn(i,s){return this.zoomTo(this.getZoom()+1,i,s),this}zoomOut(i,s){return this.zoomTo(this.getZoom()-1,i,s),this}getBearing(){return this.transform.bearing}setBearing(i,s){return this.jumpTo({bearing:i},s),this}getPadding(){return this.transform.padding}setPadding(i,s){return this.jumpTo({padding:i},s),this}rotateTo(i,s,R){return this.easeTo(e.e({bearing:i},s),R)}resetNorth(i,s){return this.rotateTo(0,e.e({duration:1e3},i),s),this}resetNorthPitch(i,s){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},i),s),this}snapToNorth(i,s){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(i,s):this}getPitch(){return this.transform.pitch}setPitch(i,s){return this.jumpTo({pitch:i},s),this}cameraForBounds(i,s){i=Ce.convert(i);const R=s&&s.bearing||0;return this._cameraForBoxAndBearing(i.getNorthWest(),i.getSouthEast(),R,s)}_cameraForBoxAndBearing(i,s,R,B){const G={top:0,bottom:0,right:0,left:0};if(typeof(B=e.e({padding:G,offset:[0,0],maxZoom:this.transform.maxZoom},B)).padding=="number"){const vn=B.padding;B.padding={top:vn,bottom:vn,right:vn,left:vn}}B.padding=e.e(G,B.padding);const ie=this.transform,pe=ie.padding,xe=new Ce(i,s),Se=ie.project(xe.getNorthWest()),De=ie.project(xe.getNorthEast()),Ue=ie.project(xe.getSouthEast()),rt=ie.project(xe.getSouthWest()),ct=e.ba(-R),pt=Se.rotate(ct),vt=De.rotate(ct),Mt=Ue.rotate(ct),At=rt.rotate(ct),Vt=new e.P(Math.max(pt.x,vt.x,At.x,Mt.x),Math.max(pt.y,vt.y,At.y,Mt.y)),Et=new e.P(Math.min(pt.x,vt.x,At.x,Mt.x),Math.min(pt.y,vt.y,At.y,Mt.y)),Kt=Vt.sub(Et),Yt=(ie.width-(pe.left+pe.right+B.padding.left+B.padding.right))/Kt.x,Jt=(ie.height-(pe.top+pe.bottom+B.padding.top+B.padding.bottom))/Kt.y;if(Jt<0||Yt<0)return void e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const dr=Math.min(ie.scaleZoom(ie.scale*Math.min(Yt,Jt)),B.maxZoom),xr=e.P.convert(B.offset),Dr=(B.padding.left-B.padding.right)/2,Ir=(B.padding.top-B.padding.bottom)/2,qr=new e.P(Dr,Ir).rotate(e.ba(R)),$r=xr.add(qr).mult(ie.scale/ie.zoomScale(dr));return{center:ie.unproject(Se.add(Ue).div(2).sub($r)),zoom:dr,bearing:R}}fitBounds(i,s,R){return this._fitInternal(this.cameraForBounds(i,s),s,R)}fitScreenCoordinates(i,s,R,B,G){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.P.convert(i)),this.transform.pointLocation(e.P.convert(s)),R,B),B,G)}_fitInternal(i,s,R){return i?(delete(s=e.e(i,s)).padding,s.linear?this.easeTo(s,R):this.flyTo(s,R)):this}jumpTo(i,s){this.stop();const R=this._getTransformForUpdate();let B=!1,G=!1,ie=!1;return"zoom"in i&&R.zoom!==+i.zoom&&(B=!0,R.zoom=+i.zoom),i.center!==void 0&&(R.center=e.N.convert(i.center)),"bearing"in i&&R.bearing!==+i.bearing&&(G=!0,R.bearing=+i.bearing),"pitch"in i&&R.pitch!==+i.pitch&&(ie=!0,R.pitch=+i.pitch),i.padding==null||R.isPaddingEqual(i.padding)||(R.padding=i.padding),this._applyUpdatedTransform(R),this.fire(new e.k("movestart",s)).fire(new e.k("move",s)),B&&this.fire(new e.k("zoomstart",s)).fire(new e.k("zoom",s)).fire(new e.k("zoomend",s)),G&&this.fire(new e.k("rotatestart",s)).fire(new e.k("rotate",s)).fire(new e.k("rotateend",s)),ie&&this.fire(new e.k("pitchstart",s)).fire(new e.k("pitch",s)).fire(new e.k("pitchend",s)),this.fire(new e.k("moveend",s))}calculateCameraOptionsFromTo(i,s,R,B=0){const G=e.Z.fromLngLat(i,s),ie=e.Z.fromLngLat(R,B),pe=ie.x-G.x,xe=ie.y-G.y,Se=ie.z-G.z,De=Math.hypot(pe,xe,Se);if(De===0)throw new Error("Can't calculate camera options with same From and To");const Ue=Math.hypot(pe,xe),rt=this.transform.scaleZoom(this.transform.cameraToCenterDistance/De/this.transform.tileSize),ct=180*Math.atan2(pe,-xe)/Math.PI;let pt=180*Math.acos(Ue/De)/Math.PI;return pt=Se<0?90-pt:90+pt,{center:ie.toLngLat(),zoom:rt,pitch:pt,bearing:ct}}easeTo(i,s){var R;this._stop(!1,i.easeId),((i=e.e({offset:[0,0],duration:500,easing:e.b9},i)).animate===!1||!i.essential&&h.prefersReducedMotion)&&(i.duration=0);const B=this._getTransformForUpdate(),G=B.zoom,ie=B.bearing,pe=B.pitch,xe=B.padding,Se="bearing"in i?this._normalizeBearing(i.bearing,ie):ie,De="pitch"in i?+i.pitch:pe,Ue="padding"in i?i.padding:B.padding,rt=e.P.convert(i.offset);let ct=B.centerPoint.add(rt);const pt=B.pointLocation(ct),{center:vt,zoom:Mt}=B.getConstrained(e.N.convert(i.center||pt),(R=i.zoom)!==null&&R!==void 0?R:G);this._normalizeCenter(vt,B);const At=B.project(pt),Vt=B.project(vt).sub(At),Et=B.zoomScale(Mt-G);let Kt,Yt;i.around&&(Kt=e.N.convert(i.around),Yt=B.locationPoint(Kt));const Jt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Mt!==G,this._rotating=this._rotating||ie!==Se,this._pitching=this._pitching||De!==pe,this._padding=!B.isPaddingEqual(Ue),this._easeId=i.easeId,this._prepareEase(s,i.noMoveStart,Jt),this.terrain&&this._prepareElevation(vt),this._ease(dr=>{if(this._zooming&&(B.zoom=e.z.number(G,Mt,dr)),this._rotating&&(B.bearing=e.z.number(ie,Se,dr)),this._pitching&&(B.pitch=e.z.number(pe,De,dr)),this._padding&&(B.interpolatePadding(xe,Ue,dr),ct=B.centerPoint.add(rt)),this.terrain&&!i.freezeElevation&&this._updateElevation(dr),Kt)B.setLocationAtPoint(Kt,Yt);else{const xr=B.zoomScale(B.zoom-G),Dr=Mt>G?Math.min(2,Et):Math.max(.5,Et),Ir=Math.pow(Dr,1-dr),qr=B.unproject(At.add(Vt.mult(dr*Ir)).mult(xr));B.setLocationAtPoint(B.renderWorldCopies?qr.wrap():qr,ct)}this._applyUpdatedTransform(B),this._fireMoveEvents(s)},dr=>{this.terrain&&i.freezeElevation&&this._finalizeElevation(),this._afterEase(s,dr)},i),this}_prepareEase(i,s,R={}){this._moving=!0,s||R.moving||this.fire(new e.k("movestart",i)),this._zooming&&!R.zooming&&this.fire(new e.k("zoomstart",i)),this._rotating&&!R.rotating&&this.fire(new e.k("rotatestart",i)),this._pitching&&!R.pitching&&this.fire(new e.k("pitchstart",i))}_prepareElevation(i){this._elevationCenter=i,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(i,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(i){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const s=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(i<1&&s!==this._elevationTarget){const R=this._elevationTarget-this._elevationStart,B=(s-(R*i+this._elevationStart))/(1-i);this._elevationStart+=i*(R-B),this._elevationTarget=s}this.transform.elevation=e.z.number(this._elevationStart,this._elevationTarget,i)}_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(i){const s=i.getCameraPosition(),R=this.terrain.getElevationForLngLatZoom(s.lngLat,i.zoom);if(s.altitude<R){const B=this.calculateCameraOptionsFromTo(s.lngLat,R,i.center,i.elevation);return{pitch:B.pitch,zoom:B.zoom}}return{}}_applyUpdatedTransform(i){const s=[];if(this.terrain&&s.push(B=>this._elevateCameraIfInsideTerrain(B)),this.transformCameraUpdate&&s.push(B=>this.transformCameraUpdate(B)),!s.length)return;const R=i.clone();for(const B of s){const G=R.clone(),{center:ie,zoom:pe,pitch:xe,bearing:Se,elevation:De}=B(G);ie&&(G.center=ie),pe!==void 0&&(G.zoom=pe),xe!==void 0&&(G.pitch=xe),Se!==void 0&&(G.bearing=Se),De!==void 0&&(G.elevation=De),R.apply(G)}this.transform.apply(R)}_fireMoveEvents(i){this.fire(new e.k("move",i)),this._zooming&&this.fire(new e.k("zoom",i)),this._rotating&&this.fire(new e.k("rotate",i)),this._pitching&&this.fire(new e.k("pitch",i))}_afterEase(i,s){if(this._easeId&&s&&this._easeId===s)return;delete this._easeId;const R=this._zooming,B=this._rotating,G=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,R&&this.fire(new e.k("zoomend",i)),B&&this.fire(new e.k("rotateend",i)),G&&this.fire(new e.k("pitchend",i)),this.fire(new e.k("moveend",i))}flyTo(i,s){var R;if(!i.essential&&h.prefersReducedMotion){const an=e.M(i,["center","zoom","bearing","pitch","around"]);return this.jumpTo(an,s)}this.stop(),i=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.b9},i);const B=this._getTransformForUpdate(),G=B.zoom,ie=B.bearing,pe=B.pitch,xe=B.padding,Se="bearing"in i?this._normalizeBearing(i.bearing,ie):ie,De="pitch"in i?+i.pitch:pe,Ue="padding"in i?i.padding:B.padding,rt=e.P.convert(i.offset);let ct=B.centerPoint.add(rt);const pt=B.pointLocation(ct),{center:vt,zoom:Mt}=B.getConstrained(e.N.convert(i.center||pt),(R=i.zoom)!==null&&R!==void 0?R:G);this._normalizeCenter(vt,B);const At=B.zoomScale(Mt-G),Vt=B.project(pt),Et=B.project(vt).sub(Vt);let Kt=i.curve;const Yt=Math.max(B.width,B.height),Jt=Yt/At,dr=Et.mag();if("minZoom"in i){const an=e.ad(Math.min(i.minZoom,G,Mt),B.minZoom,B.maxZoom),Sn=Yt/B.zoomScale(an-G);Kt=Math.sqrt(Sn/dr*2)}const xr=Kt*Kt;function Dr(an){const Sn=(Jt*Jt-Yt*Yt+(an?-1:1)*xr*xr*dr*dr)/(2*(an?Jt:Yt)*xr*dr);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}function Ir(an){return(Math.exp(an)-Math.exp(-an))/2}function qr(an){return(Math.exp(an)+Math.exp(-an))/2}const $r=Dr(!1);let vn=function(an){return qr($r)/qr($r+Kt*an)},Qr=function(an){return Yt*((qr($r)*(Ir(Sn=$r+Kt*an)/qr(Sn))-Ir($r))/xr)/dr;var Sn},xn=(Dr(!0)-$r)/Kt;if(Math.abs(dr)<1e-6||!isFinite(xn)){if(Math.abs(Yt-Jt)<1e-6)return this.easeTo(i,s);const an=Jt<Yt?-1:1;xn=Math.abs(Math.log(Jt/Yt))/Kt,Qr=()=>0,vn=Sn=>Math.exp(an*Kt*Sn)}if("duration"in i)i.duration=+i.duration;else{const an="screenSpeed"in i?+i.screenSpeed/Kt:+i.speed;i.duration=1e3*xn/an}return i.maxDuration&&i.duration>i.maxDuration&&(i.duration=0),this._zooming=!0,this._rotating=ie!==Se,this._pitching=De!==pe,this._padding=!B.isPaddingEqual(Ue),this._prepareEase(s,!1),this.terrain&&this._prepareElevation(vt),this._ease(an=>{const Sn=an*xn,mn=1/vn(Sn);B.zoom=an===1?Mt:G+B.scaleZoom(mn),this._rotating&&(B.bearing=e.z.number(ie,Se,an)),this._pitching&&(B.pitch=e.z.number(pe,De,an)),this._padding&&(B.interpolatePadding(xe,Ue,an),ct=B.centerPoint.add(rt)),this.terrain&&!i.freezeElevation&&this._updateElevation(an);const Ln=an===1?vt:B.unproject(Vt.add(Et.mult(Qr(Sn))).mult(mn));B.setLocationAtPoint(B.renderWorldCopies?Ln.wrap():Ln,ct),this._applyUpdatedTransform(B),this._fireMoveEvents(s)},()=>{this.terrain&&i.freezeElevation&&this._finalizeElevation(),this._afterEase(s)},i),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(i,s){var R;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const B=this._onEaseEnd;delete this._onEaseEnd,B.call(this,s)}return i||(R=this.handlers)===null||R===void 0||R.stop(!1),this}_ease(i,s,R){R.animate===!1||R.duration===0?(i(1),s()):(this._easeStart=h.now(),this._easeOptions=R,this._onEaseFrame=i,this._onEaseEnd=s,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(i,s){i=e.b3(i,-180,180);const R=Math.abs(i-s);return Math.abs(i-360-s)<R&&(i-=360),Math.abs(i+360-s)<R&&(i+=360),i}_normalizeCenter(i,s){if(!s.renderWorldCopies||s.lngRange)return;const R=i.lng-s.center.lng;i.lng+=R>180?-360:R<-180?360:0}queryTerrainElevation(i){return this.terrain?this.terrain.getElevationForLngLatZoom(e.N.convert(i),this.transform.tileZoom)-this.transform.elevation:null}}const No={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class as{constructor(i=No){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=s=>{!s||s.sourceDataType!=="metadata"&&s.sourceDataType!=="visibility"&&s.dataType!=="style"&&s.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=i}getDefaultPosition(){return"bottom-right"}onAdd(i){return this._map=i,this._compact=this.options.compact,this._container=r.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=r.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(i,s){const R=this._map._getUIString(`AttributionControl.${s}`);i.title=R,i.setAttribute("aria-label",R)}_updateAttributions(){if(!this._map.style)return;let i=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?i=i.concat(this.options.customAttribution.map(B=>typeof B!="string"?"":B)):typeof this.options.customAttribution=="string"&&i.push(this.options.customAttribution)),this._map.style.stylesheet){const B=this._map.style.stylesheet;this.styleOwner=B.owner,this.styleId=B.id}const s=this._map.style.sourceCaches;for(const B in s){const G=s[B];if(G.used||G.usedForTerrain){const ie=G.getSource();ie.attribution&&i.indexOf(ie.attribution)<0&&i.push(ie.attribution)}}i=i.filter(B=>String(B).trim()),i.sort((B,G)=>B.length-G.length),i=i.filter((B,G)=>{for(let ie=G+1;ie<i.length;ie++)if(i[ie].indexOf(B)>=0)return!1;return!0});const R=i.join(" | ");R!==this._attribHTML&&(this._attribHTML=R,i.length?(this._innerContainer.innerHTML=R,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class po{constructor(i={}){this._updateCompact=()=>{const s=this._container.children;if(s.length){const R=s[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&R.classList.add("maplibregl-compact"):R.classList.remove("maplibregl-compact")}},this.options=i}getDefaultPosition(){return"bottom-left"}onAdd(i){this._map=i,this._compact=this.options&&this.options.compact,this._container=r.create("div","maplibregl-ctrl");const s=r.create("a","maplibregl-ctrl-logo");return s.target="_blank",s.rel="noopener nofollow",s.href="https://maplibre.org/",s.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),s.setAttribute("rel","noopener nofollow"),this._container.appendChild(s),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){r.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class vc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(i){const s=++this._id;return this._queue.push({callback:i,id:s,cancelled:!1}),s}remove(i){const s=this._currentlyRunning,R=s?this._queue.concat(s):this._queue;for(const B of R)if(B.id===i)return void(B.cancelled=!0)}run(i=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const s=this._currentlyRunning=this._queue;this._queue=[];for(const R of s)if(!R.cancelled&&(R.callback(i),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var la=e.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Ro extends e.E{constructor(i){super(),this.sourceCache=i,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,i.usedForTerrain=!0,i.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(i,s){this.sourceCache.update(i,s),this._renderableTilesKeys=[];const R={};for(const B of i.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:s}))R[B.key]=!0,this._renderableTilesKeys.push(B.key),this._tiles[B.key]||(B.posMatrix=new Float64Array(16),e.aQ(B.posMatrix,0,e.X,0,e.X,0,1),this._tiles[B.key]=new we(B,this.tileSize));for(const B in this._tiles)R[B]||delete this._tiles[B]}freeRtt(i){for(const s in this._tiles){const R=this._tiles[s];(!i||R.tileID.equals(i)||R.tileID.isChildOf(i)||i.isChildOf(R.tileID))&&(R.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(i=>this.getTileByID(i))}getTileByID(i){return this._tiles[i]}getTerrainCoords(i){const s={};for(const R of this._renderableTilesKeys){const B=this._tiles[R].tileID;if(B.canonical.equals(i.canonical)){const G=i.clone();G.posMatrix=new Float64Array(16),e.aQ(G.posMatrix,0,e.X,0,e.X,0,1),s[R]=G}else if(B.canonical.isChildOf(i.canonical)){const G=i.clone();G.posMatrix=new Float64Array(16);const ie=B.canonical.z-i.canonical.z,pe=B.canonical.x-(B.canonical.x>>ie<<ie),xe=B.canonical.y-(B.canonical.y>>ie<<ie),Se=e.X>>ie;e.aQ(G.posMatrix,0,Se,0,Se,0,1),e.J(G.posMatrix,G.posMatrix,[-pe*Se,-xe*Se,0]),s[R]=G}else if(i.canonical.isChildOf(B.canonical)){const G=i.clone();G.posMatrix=new Float64Array(16);const ie=i.canonical.z-B.canonical.z,pe=i.canonical.x-(i.canonical.x>>ie<<ie),xe=i.canonical.y-(i.canonical.y>>ie<<ie),Se=e.X>>ie;e.aQ(G.posMatrix,0,e.X,0,e.X,0,1),e.J(G.posMatrix,G.posMatrix,[pe*Se,xe*Se,0]),e.K(G.posMatrix,G.posMatrix,[1/2**ie,1/2**ie,0]),s[R]=G}}return s}getSourceTile(i,s){const R=this.sourceCache._source;let B=i.overscaledZ-this.deltaZoom;if(B>R.maxzoom&&(B=R.maxzoom),B<R.minzoom)return null;this._sourceTileCache[i.key]||(this._sourceTileCache[i.key]=i.scaledTo(B).key);let G=this.sourceCache.getTileByID(this._sourceTileCache[i.key]);if((!G||!G.dem)&&s)for(;B>=R.minzoom&&(!G||!G.dem);)G=this.sourceCache.getTileByID(i.scaledTo(B--).key);return G}tilesAfterTime(i=Date.now()){return Object.values(this._tiles).filter(s=>s.timeAdded>=i)}}class Ya{constructor(i,s,R){this.painter=i,this.sourceCache=new Ro(s),this.options=R,this.exaggeration=typeof R.exaggeration=="number"?R.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(i,s,R,B=e.X){var G;if(!(s>=0&&s<B&&R>=0&&R<B))return 0;const ie=this.getTerrainData(i),pe=(G=ie.tile)===null||G===void 0?void 0:G.dem;if(!pe)return 0;const xe=function(pt,vt,Mt){var At=vt[0],Vt=vt[1];return pt[0]=Mt[0]*At+Mt[4]*Vt+Mt[12],pt[1]=Mt[1]*At+Mt[5]*Vt+Mt[13],pt}([],[s/B*e.X,R/B*e.X],ie.u_terrain_matrix),Se=[xe[0]*pe.dim,xe[1]*pe.dim],De=Math.floor(Se[0]),Ue=Math.floor(Se[1]),rt=Se[0]-De,ct=Se[1]-Ue;return pe.get(De,Ue)*(1-rt)*(1-ct)+pe.get(De+1,Ue)*rt*(1-ct)+pe.get(De,Ue+1)*(1-rt)*ct+pe.get(De+1,Ue+1)*rt*ct}getElevationForLngLatZoom(i,s){const{tileID:R,mercatorX:B,mercatorY:G}=this._getOverscaledTileIDFromLngLatZoom(i,s);return this.getElevation(R,B%e.X,G%e.X,e.X)}getElevation(i,s,R,B=e.X){return this.getDEMElevation(i,s,R,B)*this.exaggeration}getTerrainData(i){if(!this._emptyDemTexture){const B=this.painter.context,G=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new z(B,G,B.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new z(B,new e.R({width:1,height:1}),B.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(B.gl.NEAREST,B.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ao([])}const s=this.sourceCache.getSourceTile(i,!0);if(s&&s.dem&&(!s.demTexture||s.needsTerrainPrepare)){const B=this.painter.context;s.demTexture=this.painter.getTileTexture(s.dem.stride),s.demTexture?s.demTexture.update(s.dem.getPixels(),{premultiply:!1}):s.demTexture=new z(B,s.dem.getPixels(),B.gl.RGBA,{premultiply:!1}),s.demTexture.bind(B.gl.NEAREST,B.gl.CLAMP_TO_EDGE),s.needsTerrainPrepare=!1}const R=s&&s+s.tileID.key+i.key;if(R&&!this._demMatrixCache[R]){const B=this.sourceCache.sourceCache._source.maxzoom;let G=i.canonical.z-s.tileID.canonical.z;i.overscaledZ>i.canonical.z&&(i.canonical.z>=B?G=i.canonical.z-B:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const ie=i.canonical.x-(i.canonical.x>>G<<G),pe=i.canonical.y-(i.canonical.y>>G<<G),xe=e.bb(new Float64Array(16),[1/(e.X<<G),1/(e.X<<G),0]);e.J(xe,xe,[ie*e.X,pe*e.X,0]),this._demMatrixCache[i.key]={matrix:xe,coord:i}}return{u_depth:2,u_terrain:3,u_terrain_dim:s&&s.dem&&s.dem.dim||1,u_terrain_matrix:R?this._demMatrixCache[i.key].matrix:this._emptyDemMatrix,u_terrain_unpack:s&&s.dem&&s.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(s&&s.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:s}}getFramebuffer(i){const s=this.painter,R=s.width/devicePixelRatio,B=s.height/devicePixelRatio;return!this._fbo||this._fbo.width===R&&this._fbo.height===B||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new z(s.context,{width:R,height:B,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new z(s.context,{width:R,height:B,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=s.context.createFramebuffer(R,B,!0,!1),this._fbo.depthAttachment.set(s.context.createRenderbuffer(s.context.gl.DEPTH_COMPONENT16,R,B))),this._fbo.colorAttachment.set(i==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const i=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const s=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let G=0,ie=0;G<this._coordsTextureSize;G++)for(let pe=0;pe<this._coordsTextureSize;pe++,ie+=4)s[ie+0]=255&pe,s[ie+1]=255&G,s[ie+2]=pe>>8<<4|G>>8,s[ie+3]=0;const R=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(s.buffer)),B=new z(i,R,i.gl.RGBA,{premultiply:!1});return B.bind(i.gl.NEAREST,i.gl.CLAMP_TO_EDGE),this._coordsTexture=B,B}pointCoordinate(i){this.painter.maybeDrawDepthAndCoords(!0);const s=new Uint8Array(4),R=this.painter.context,B=R.gl,G=Math.round(i.x*this.painter.pixelRatio/devicePixelRatio),ie=Math.round(i.y*this.painter.pixelRatio/devicePixelRatio),pe=Math.round(this.painter.height/devicePixelRatio);R.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),B.readPixels(G,pe-ie-1,1,1,B.RGBA,B.UNSIGNED_BYTE,s),R.bindFramebuffer.set(null);const xe=s[0]+(s[2]>>4<<8),Se=s[1]+((15&s[2])<<8),De=this.coordsIndex[255-s[3]],Ue=De&&this.sourceCache.getTileByID(De);if(!Ue)return null;const rt=this._coordsTextureSize,ct=(1<<Ue.tileID.canonical.z)*rt;return new e.Z((Ue.tileID.canonical.x*rt+xe)/ct+Ue.tileID.wrap,(Ue.tileID.canonical.y*rt+Se)/ct,this.getElevation(Ue.tileID,xe,Se,rt))}depthAtPoint(i){const s=new Uint8Array(4),R=this.painter.context,B=R.gl;return R.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),B.readPixels(i.x,this.painter.height/devicePixelRatio-i.y-1,1,1,B.RGBA,B.UNSIGNED_BYTE,s),R.bindFramebuffer.set(null),(s[0]/16777216+s[1]/65536+s[2]/256+s[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const i=this.painter.context,s=new e.bc,R=new e.aY,B=this.meshSize,G=e.X/B,ie=B*B;for(let Ue=0;Ue<=B;Ue++)for(let rt=0;rt<=B;rt++)s.emplaceBack(rt*G,Ue*G,0);for(let Ue=0;Ue<ie;Ue+=B+1)for(let rt=0;rt<B;rt++)R.emplaceBack(rt+Ue,B+rt+Ue+1,B+rt+Ue+2),R.emplaceBack(rt+Ue,B+rt+Ue+2,rt+Ue+1);const pe=s.length,xe=pe+2*(B+1);for(const Ue of[0,1])for(let rt=0;rt<=B;rt++)for(const ct of[0,1])s.emplaceBack(rt*G,Ue*e.X,ct);for(let Ue=0;Ue<2*B;Ue+=2)R.emplaceBack(xe+Ue,xe+Ue+1,xe+Ue+3),R.emplaceBack(xe+Ue,xe+Ue+3,xe+Ue+2),R.emplaceBack(pe+Ue,pe+Ue+3,pe+Ue+1),R.emplaceBack(pe+Ue,pe+Ue+2,pe+Ue+3);const Se=s.length,De=Se+2*(B+1);for(const Ue of[0,1])for(let rt=0;rt<=B;rt++)for(const ct of[0,1])s.emplaceBack(Ue*e.X,rt*G,ct);for(let Ue=0;Ue<2*B;Ue+=2)R.emplaceBack(Se+Ue,Se+Ue+1,Se+Ue+3),R.emplaceBack(Se+Ue,Se+Ue+3,Se+Ue+2),R.emplaceBack(De+Ue,De+Ue+3,De+Ue+1),R.emplaceBack(De+Ue,De+Ue+2,De+Ue+3);return this._mesh=new ec(i.createVertexBuffer(s,la.members),i.createIndexBuffer(R),e.a0.simpleSegment(0,0,s.length,R.length)),this._mesh}getMeshFrameDelta(i){return 2*Math.PI*e.bd/Math.pow(2,i)/5}getMinTileElevationForLngLatZoom(i,s){var R;const{tileID:B}=this._getOverscaledTileIDFromLngLatZoom(i,s);return(R=this.getMinMaxElevation(B).minElevation)!==null&&R!==void 0?R:0}getMinMaxElevation(i){const s=this.getTerrainData(i).tile,R={minElevation:null,maxElevation:null};return s&&s.dem&&(R.minElevation=s.dem.min*this.exaggeration,R.maxElevation=s.dem.max*this.exaggeration),R}_getOverscaledTileIDFromLngLatZoom(i,s){const R=e.Z.fromLngLat(i.wrap()),B=(1<<s)*e.X,G=R.x*B,ie=R.y*B,pe=Math.floor(G/e.X),xe=Math.floor(ie/e.X);return{tileID:new e.S(s,0,s,pe,xe),mercatorX:G,mercatorY:ie}}}class zl{constructor(i,s,R){this._context=i,this._size=s,this._tileSize=R,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const i of this._objects)i.texture.destroy(),i.fbo.destroy()}_createObject(i){const s=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),R=new z(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return R.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),s.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),s.colorAttachment.set(R.texture),{id:i,fbo:s,texture:R,stamp:-1,inUse:!1}}getObjectForId(i){return this._objects[i]}useObject(i){i.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(s=>i.id!==s),this._recentlyUsed.push(i.id)}stampObject(i){i.stamp=++this._stamp}getOrCreateFreeObject(){for(const s of this._recentlyUsed)if(!this._objects[s].inUse)return this._objects[s];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const i=this._createObject(this._objects.length);return this._objects.push(i),i}freeObject(i){i.inUse=!1}freeAllObjects(){for(const i of this._objects)this.freeObject(i)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(i=>!i.inUse)===!1}}const ps={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Hs{constructor(i,s){this.painter=i,this.terrain=s,this.pool=new zl(i.context,30,s.sourceCache.tileSize*s.qualityFactor)}destruct(){this.pool.destruct()}getTexture(i){return this.pool.getObjectForId(i.rtt[this._stacks.length-1].id).texture}prepareForRender(i,s){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=i._order.filter(R=>!i._layers[R].isHidden(s)),this._coordsDescendingInv={};for(const R in i.sourceCaches){this._coordsDescendingInv[R]={};const B=i.sourceCaches[R].getVisibleCoordinates();for(const G of B){const ie=this.terrain.sourceCache.getTerrainCoords(G);for(const pe in ie)this._coordsDescendingInv[R][pe]||(this._coordsDescendingInv[R][pe]=[]),this._coordsDescendingInv[R][pe].push(ie[pe])}}this._coordsDescendingInvStr={};for(const R of i._order){const B=i._layers[R],G=B.source;if(ps[B.type]&&!this._coordsDescendingInvStr[G]){this._coordsDescendingInvStr[G]={};for(const ie in this._coordsDescendingInv[G])this._coordsDescendingInvStr[G][ie]=this._coordsDescendingInv[G][ie].map(pe=>pe.key).sort().join()}}for(const R of this._renderableTiles)for(const B in this._coordsDescendingInvStr){const G=this._coordsDescendingInvStr[B][R.tileID.key];G&&G!==R.rttCoords[B]&&(R.rtt=[])}}renderLayer(i){if(i.isHidden(this.painter.transform.zoom))return!1;const s=i.type,R=this.painter,B=this._renderableLayerIds[this._renderableLayerIds.length-1]===i.id;if(ps[s]&&(this._prevType&&ps[this._prevType]||this._stacks.push([]),this._prevType=s,this._stacks[this._stacks.length-1].push(i.id),!B))return!0;if(ps[this._prevType]||ps[s]&&B){this._prevType=s;const G=this._stacks.length-1,ie=this._stacks[G]||[];for(const pe of this._renderableTiles){if(this.pool.isFull()&&(Ql(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(pe),pe.rtt[G]){const Se=this.pool.getObjectForId(pe.rtt[G].id);if(Se.stamp===pe.rtt[G].stamp){this.pool.useObject(Se);continue}}const xe=this.pool.getOrCreateFreeObject();this.pool.useObject(xe),this.pool.stampObject(xe),pe.rtt[G]={id:xe.id,stamp:xe.stamp},R.context.bindFramebuffer.set(xe.fbo.framebuffer),R.context.clear({color:e.aN.transparent,stencil:0}),R.currentStencilSource=void 0;for(let Se=0;Se<ie.length;Se++){const De=R.style._layers[ie[Se]],Ue=De.source?this._coordsDescendingInv[De.source][pe.tileID.key]:[pe.tileID];R.context.viewport.set([0,0,xe.fbo.width,xe.fbo.height]),R._renderTileClippingMasks(De,Ue),R.renderLayer(R,R.style.sourceCaches[De.source],De,Ue),De.source&&(pe.rttCoords[De.source]=this._coordsDescendingInvStr[De.source][pe.tileID.key])}}return Ql(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),ps[s]}return!1}}const Lc={"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"},bc=b,ul={hash:!1,interactive:!0,bearingSnap:7,attributionControl:No,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:e.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},Ci=F=>{F.touchstart=F.dragStart,F.touchmoveWindow=F.dragMove,F.touchend=F.dragEnd},zs={showCompass:!0,showZoom:!0,visualizePitch:!1};class ra{constructor(i,s,R=!1){this.mousedown=ie=>{this.startMouse(e.e({},ie,{ctrlKey:!0,preventDefault:()=>ie.preventDefault()}),r.mousePos(this.element,ie)),r.addEventListener(window,"mousemove",this.mousemove),r.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ie=>{this.moveMouse(ie,r.mousePos(this.element,ie))},this.mouseup=ie=>{this.mouseRotate.dragEnd(ie),this.mousePitch&&this.mousePitch.dragEnd(ie),this.offTemp()},this.touchstart=ie=>{ie.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,ie.targetTouches)[0],this.startTouch(ie,this._startPos),r.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.addEventListener(window,"touchend",this.touchend))},this.touchmove=ie=>{ie.targetTouches.length!==1?this.reset():(this._lastPos=r.touchPos(this.element,ie.targetTouches)[0],this.moveTouch(ie,this._lastPos))},this.touchend=ie=>{ie.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const B=i.dragRotate._mouseRotate.getClickTolerance(),G=i.dragRotate._mousePitch.getClickTolerance();this.element=s,this.mouseRotate=ql({clickTolerance:B,enable:!0}),this.touchRotate=(({enable:ie,clickTolerance:pe,bearingDegreesPerPixelMoved:xe=.8})=>{const Se=new Ml;return new xo({clickTolerance:pe,move:(De,Ue)=>({bearingDelta:(Ue.x-De.x)*xe}),moveStateManager:Se,enable:ie,assignEvents:Ci})})({clickTolerance:B,enable:!0}),this.map=i,R&&(this.mousePitch=il({clickTolerance:G,enable:!0}),this.touchPitch=(({enable:ie,clickTolerance:pe,pitchDegreesPerPixelMoved:xe=-.5})=>{const Se=new Ml;return new xo({clickTolerance:pe,move:(De,Ue)=>({pitchDelta:(Ue.y-De.y)*xe}),moveStateManager:Se,enable:ie,assignEvents:Ci})})({clickTolerance:G,enable:!0})),r.addEventListener(s,"mousedown",this.mousedown),r.addEventListener(s,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(s,"touchcancel",this.reset)}startMouse(i,s){this.mouseRotate.dragStart(i,s),this.mousePitch&&this.mousePitch.dragStart(i,s),r.disableDrag()}startTouch(i,s){this.touchRotate.dragStart(i,s),this.touchPitch&&this.touchPitch.dragStart(i,s),r.disableDrag()}moveMouse(i,s){const R=this.map,{bearingDelta:B}=this.mouseRotate.dragMove(i,s)||{};if(B&&R.setBearing(R.getBearing()+B),this.mousePitch){const{pitchDelta:G}=this.mousePitch.dragMove(i,s)||{};G&&R.setPitch(R.getPitch()+G)}}moveTouch(i,s){const R=this.map,{bearingDelta:B}=this.touchRotate.dragMove(i,s)||{};if(B&&R.setBearing(R.getBearing()+B),this.touchPitch){const{pitchDelta:G}=this.touchPitch.dragMove(i,s)||{};G&&R.setPitch(R.getPitch()+G)}}off(){const i=this.element;r.removeEventListener(i,"mousedown",this.mousedown),r.removeEventListener(i,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend),r.removeEventListener(i,"touchcancel",this.reset),this.offTemp()}offTemp(){r.enableDrag(),r.removeEventListener(window,"mousemove",this.mousemove),r.removeEventListener(window,"mouseup",this.mouseup),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend)}}let wa;function Xo(F,i,s){const R=new e.N(F.lng,F.lat);if(F=new e.N(F.lng,F.lat),i){const B=new e.N(F.lng-360,F.lat),G=new e.N(F.lng+360,F.lat),ie=s.locationPoint(F).distSqr(i);s.locationPoint(B).distSqr(i)<ie?F=B:s.locationPoint(G).distSqr(i)<ie&&(F=G)}for(;Math.abs(F.lng-s.center.lng)>180;){const B=s.locationPoint(F);if(B.x>=0&&B.y>=0&&B.x<=s.width&&B.y<=s.height)break;F.lng>s.center.lng?F.lng-=360:F.lng+=360}return F.lng!==R.lng&&s.locationPoint(F).y>s.height/2-s.getHorizon()?F:R}const Os={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 dl(F,i,s){const R=F.classList;for(const B in Os)R.remove(`maplibregl-${s}-anchor-${B}`);R.add(`maplibregl-${s}-anchor-${i}`)}class Ni extends e.E{constructor(i){if(super(),this._onKeyPress=s=>{const R=s.code,B=s.charCode||s.keyCode;R!=="Space"&&R!=="Enter"&&B!==32&&B!==13||this.togglePopup()},this._onMapClick=s=>{const R=s.originalEvent.target,B=this._element;this._popup&&(R===B||B.contains(R))&&this.togglePopup()},this._update=s=>{var R;if(!this._map)return;const B=this._map.loaded()&&!this._map.isMoving();((s==null?void 0:s.type)==="terrain"||(s==null?void 0:s.type)==="render"&&!B)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Xo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(R=this._lngLat)===null||R===void 0?void 0:R.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 G="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?G=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(G=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ie="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ie="rotateX(0deg)":this._pitchAlignment==="map"&&(ie=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||s&&s.type!=="moveend"||(this._pos=this._pos.round()),r.setTransform(this._element,`${Os[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ie} ${G}`),h.frameAsync(new AbortController).then(()=>{this._updateOpacity(s&&s.type==="moveend")}).catch(()=>{})},this._onMove=s=>{if(!this._isDragging){const R=this._clickTolerance||this._map._clickTolerance;this._isDragging=s.point.dist(this._pointerdownPos)>=R}this._isDragging&&(this._pos=s.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.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 e.k("dragend")),this._state="inactive"},this._addDragHandler=s=>{this._element.contains(s.originalEvent.target)&&(s.preventDefault(),this._positionDelta=s.point.sub(this._pos).add(this._offset),this._pointerdownPos=s.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._scale=i&&i.scale||1,this._draggable=i&&i.draggable||!1,this._clickTolerance=i&&i.clickTolerance||0,this._subpixelPositioning=i&&i.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=i&&i.rotation||0,this._rotationAlignment=i&&i.rotationAlignment||"auto",this._pitchAlignment=i&&i.pitchAlignment&&i.pitchAlignment!=="auto"?i.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(i==null?void 0:i.opacity,i==null?void 0:i.opacityWhenCovered),i&&i.element)this._element=i.element,this._offset=e.P.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");const s=r.createNS("http://www.w3.org/2000/svg","svg"),R=41,B=27;s.setAttributeNS(null,"display","block"),s.setAttributeNS(null,"height",`${R}px`),s.setAttributeNS(null,"width",`${B}px`),s.setAttributeNS(null,"viewBox",`0 0 ${B} ${R}`);const G=r.createNS("http://www.w3.org/2000/svg","g");G.setAttributeNS(null,"stroke","none"),G.setAttributeNS(null,"stroke-width","1"),G.setAttributeNS(null,"fill","none"),G.setAttributeNS(null,"fill-rule","evenodd");const ie=r.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"fill-rule","nonzero");const pe=r.createNS("http://www.w3.org/2000/svg","g");pe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),pe.setAttributeNS(null,"fill","#000000");const xe=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const At of xe){const Vt=r.createNS("http://www.w3.org/2000/svg","ellipse");Vt.setAttributeNS(null,"opacity","0.04"),Vt.setAttributeNS(null,"cx","10.5"),Vt.setAttributeNS(null,"cy","5.80029008"),Vt.setAttributeNS(null,"rx",At.rx),Vt.setAttributeNS(null,"ry",At.ry),pe.appendChild(Vt)}const Se=r.createNS("http://www.w3.org/2000/svg","g");Se.setAttributeNS(null,"fill",this._color);const De=r.createNS("http://www.w3.org/2000/svg","path");De.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"),Se.appendChild(De);const Ue=r.createNS("http://www.w3.org/2000/svg","g");Ue.setAttributeNS(null,"opacity","0.25"),Ue.setAttributeNS(null,"fill","#000000");const rt=r.createNS("http://www.w3.org/2000/svg","path");rt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ue.appendChild(rt);const ct=r.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=r.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const vt=r.createNS("http://www.w3.org/2000/svg","circle");vt.setAttributeNS(null,"fill","#000000"),vt.setAttributeNS(null,"opacity","0.25"),vt.setAttributeNS(null,"cx","5.5"),vt.setAttributeNS(null,"cy","5.5"),vt.setAttributeNS(null,"r","5.4999962");const Mt=r.createNS("http://www.w3.org/2000/svg","circle");Mt.setAttributeNS(null,"fill","#FFFFFF"),Mt.setAttributeNS(null,"cx","5.5"),Mt.setAttributeNS(null,"cy","5.5"),Mt.setAttributeNS(null,"r","5.4999962"),pt.appendChild(vt),pt.appendChild(Mt),ie.appendChild(pe),ie.appendChild(Se),ie.appendChild(Ue),ie.appendChild(ct),ie.appendChild(pt),s.appendChild(ie),s.setAttributeNS(null,"height",R*this._scale+"px"),s.setAttributeNS(null,"width",B*this._scale+"px"),this._element.appendChild(s),this._offset=e.P.convert(i&&i.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",s=>{s.preventDefault()}),this._element.addEventListener("mousedown",s=>{s.preventDefault()}),dl(this._element,this._anchor,"marker"),i&&i.className)for(const s of i.className.split(" "))this._element.classList.add(s);this._popup=null}addTo(i){return this.remove(),this._map=i,this._element.setAttribute("aria-label",i._getUIString("Marker.Title")),i.getCanvasContainer().appendChild(this._element),i.on("move",this._update),i.on("moveend",this._update),i.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(i){return this._lngLat=e.N.convert(i),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(i){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),i){if(!("offset"in i.options)){const s=Math.abs(13.5)/Math.SQRT2;i.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[s,-1*(24.6+s)],"bottom-right":[-s,-1*(24.6+s)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=i,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(i){return this._subpixelPositioning=i,this}getPopup(){return this._popup}togglePopup(){const i=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:i?(i.isOpen()?i.remove():(i.setLngLat(this._lngLat),i.addTo(this._map)),this):this}_updateOpacity(i=!1){var s,R;if(!(!((s=this._map)===null||s===void 0)&&s.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(i)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const B=this._map,G=B.terrain.depthAtPoint(this._pos),ie=B.terrain.getElevationForLngLatZoom(this._lngLat,B.transform.tileZoom);if(B.transform.lngLatToCameraDepth(this._lngLat,ie)-G<.006)return void(this._element.style.opacity=this._opacity);const pe=-this._offset.y/B.transform._pixelPerMeter,xe=Math.sin(B.getPitch()*Math.PI/180)*pe,Se=B.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),De=B.transform.lngLatToCameraDepth(this._lngLat,ie+xe)-Se>.006;!((R=this._popup)===null||R===void 0)&&R.isOpen()&&De&&this._popup.remove(),this._element.style.opacity=De?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(i){return this._offset=e.P.convert(i),this._update(),this}addClassName(i){this._element.classList.add(i)}removeClassName(i){this._element.classList.remove(i)}toggleClassName(i){return this._element.classList.toggle(i)}setDraggable(i){return this._draggable=!!i,this._map&&(i?(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(i){return this._rotation=i||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(i){return this._rotationAlignment=i||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(i){return this._pitchAlignment=i&&i!=="auto"?i:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(i,s){return i===void 0&&s===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),i!==void 0&&(this._opacity=i),s!==void 0&&(this._opacityWhenCovered=s),this._map&&this._updateOpacity(!0),this}}const Ol={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let qa=0,Wl=!1;class pa extends e.E{constructor(i){super(),this._onSuccess=s=>{if(this._map){if(this._isOutOfMapMaxBounds(s))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",s)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=s,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(s),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(s),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",s)),this._finish()}},this._updateCamera=s=>{const R=new e.N(s.coords.longitude,s.coords.latitude),B=s.coords.accuracy,G=this._map.getBearing(),ie=e.e({bearing:G},this.options.fitBoundsOptions),pe=Ce.fromLngLat(R,B);this._map.fitBounds(pe,ie,{geolocateSource:!0})},this._updateMarker=s=>{if(s){const R=new e.N(s.coords.longitude,s.coords.latitude);this._accuracyCircleMarker.setLngLat(R).addTo(this._map),this._userLocationDotMarker.setLngLat(R).addTo(this._map),this._accuracy=s.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=s=>{if(this._map){if(this.options.trackUserLocation)if(s.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 R=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=R,this._geolocateButton.setAttribute("aria-label",R),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(s.code===3&&Wl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",s)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",s=>s.preventDefault()),this._geolocateButton=r.create("button","maplibregl-ctrl-geolocate",this._container),r.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=s=>{if(this._map){if(s===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");const R=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=R,this._geolocateButton.setAttribute("aria-label",R)}else{const R=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=R,this._geolocateButton.setAttribute("aria-label",R)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ni({element:this._dotElement}),this._circleElement=r.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ni({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",R=>{const B=R.originalEvent&&R.originalEvent.type==="resize";R.geolocateSource||this._watchState!=="ACTIVE_LOCK"||B||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")),this.fire(new e.k("userlocationlostfocus")))})}},this.options=e.e({},Ol,i)}onAdd(i){return this._map=i,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(s=!1){if(wa!==void 0&&!s)return wa;if(window.navigator.permissions===void 0)return wa=!!window.navigator.geolocation,wa;try{wa=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{wa=!!window.navigator.geolocation}return wa})}().then(s=>this._finishSetupUI(s)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,qa=0,Wl=!1}_isOutOfMapMaxBounds(i){const s=this._map.getMaxBounds(),R=i.coords;return s&&(R.longitude<s.getWest()||R.longitude>s.getEast()||R.latitude<s.getSouth()||R.latitude>s.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 i=this._map.getBounds(),s=i.getSouthEast(),R=i.getNorthEast(),B=s.distanceTo(R),G=this._map._container.clientHeight,ie=Math.ceil(this._accuracy/(B/G)*2);this._circleElement.style.width=`${ie}px`,this._circleElement.style.height=`${ie}px`}trigger(){if(!this._setup)return e.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 e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":qa--,Wl=!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 e.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 e.k("trackuserlocationstart")),this.fire(new e.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 i;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),qa++,qa>1?(i={maximumAge:6e5,timeout:0},Wl=!0):(i=this.options.positionOptions,Wl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,i)}}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 ca={maxWidth:100,unit:"metric"};function _i(F,i,s){const R=s&&s.maxWidth||100,B=F._container.clientHeight/2,G=F.unproject([0,B]),ie=F.unproject([R,B]),pe=G.distanceTo(ie);if(s&&s.unit==="imperial"){const xe=3.2808*pe;xe>5280?fo(i,R,xe/5280,F._getUIString("ScaleControl.Miles")):fo(i,R,xe,F._getUIString("ScaleControl.Feet"))}else s&&s.unit==="nautical"?fo(i,R,pe/1852,F._getUIString("ScaleControl.NauticalMiles")):pe>=1e3?fo(i,R,pe/1e3,F._getUIString("ScaleControl.Kilometers")):fo(i,R,pe,F._getUIString("ScaleControl.Meters"))}function fo(F,i,s,R){const B=function(ie){const pe=Math.pow(10,`${Math.floor(ie)}`.length-1);let xe=ie/pe;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:function(Se){const De=Math.pow(10,Math.ceil(-Math.log(Se)/Math.LN10));return Math.round(Se*De)/De}(xe),pe*xe}(s),G=B/s;F.style.width=i*G+"px",F.innerHTML=`${B} ${R}`}class Nl extends e.E{constructor(i={}){super(),this._onFullscreenChange=()=>{var s;let R=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((s=R==null?void 0:R.shadowRoot)===null||s===void 0)&&s.fullscreenElement;)R=R.shadowRoot.fullscreenElement;R===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,i&&i.container&&(i.container instanceof HTMLElement?this._container=i.container:e.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(i){return this._map=i,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){r.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const i=this._fullscreenButton=r.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);r.create("span","maplibregl-ctrl-icon",i).setAttribute("aria-hidden","true"),i.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const i=this._getTitle();this._fullscreenButton.setAttribute("aria-label",i),this._fullscreenButton.title=i}_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 e.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.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 Ko={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},yt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class xt extends e.E{constructor(i){super(),this.remove=()=>(this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.k("close"))),this),this._onMouseUp=s=>{this._update(s.point)},this._onMouseMove=s=>{this._update(s.point)},this._onDrag=s=>{this._update(s.point)},this._update=s=>{var R;const B=this._lngLat||this._trackPointer;if(!this._map||!B||!this._content)return;if(!this._container){if(this._container=r.create("div","maplibregl-popup",this._map.getContainer()),this._tip=r.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Se of this.options.className.split(" "))this._container.classList.add(Se);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=Xo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(R=this._lngLat)===null||R===void 0?void 0:R.wrap(),this._trackPointer&&!s)return;const G=this._flatPos=this._pos=this._trackPointer&&s?s:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&s?s:this._map.transform.locationPoint(this._lngLat));let ie=this.options.anchor;const pe=Ot(this.options.offset);if(!ie){const Se=this._container.offsetWidth,De=this._container.offsetHeight;let Ue;Ue=G.y+pe.bottom.y<De?["top"]:G.y>this._map.transform.height-De?["bottom"]:[],G.x<Se/2?Ue.push("left"):G.x>this._map.transform.width-Se/2&&Ue.push("right"),ie=Ue.length===0?"bottom":Ue.join("-")}let xe=G.add(pe[ie]);this.options.subpixelPositioning||(xe=xe.round()),r.setTransform(this._container,`${Os[ie]} translate(${xe.x}px,${xe.y}px)`),dl(this._container,ie,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(Ko),i)}addTo(i){return this._map&&this.remove(),this._map=i,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 e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(i){return this._lngLat=e.N.convert(i),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(i){return this.setDOMContent(document.createTextNode(i))}setHTML(i){const s=document.createDocumentFragment(),R=document.createElement("body");let B;for(R.innerHTML=i;B=R.firstChild,B;)s.appendChild(B);return this.setDOMContent(s)}getMaxWidth(){var i;return(i=this._container)===null||i===void 0?void 0:i.style.maxWidth}setMaxWidth(i){return this.options.maxWidth=i,this._update(),this}setDOMContent(i){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(i),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(i){return this._container&&this._container.classList.add(i),this}removeClassName(i){return this._container&&this._container.classList.remove(i),this}setOffset(i){return this.options.offset=i,this._update(),this}toggleClassName(i){if(this._container)return this._container.classList.toggle(i)}setSubpixelPositioning(i){this.options.subpixelPositioning=i}_createCloseButton(){this.options.closeButton&&(this._closeButton=r.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 i=this._container.querySelector(yt);i&&i.focus()}}function Ot(F){if(F){if(typeof F=="number"){const i=Math.round(Math.abs(F)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,F),"top-left":new e.P(i,i),"top-right":new e.P(-i,i),bottom:new e.P(0,-F),"bottom-left":new e.P(i,-i),"bottom-right":new e.P(-i,-i),left:new e.P(F,0),right:new e.P(-F,0)}}if(F instanceof e.P||Array.isArray(F)){const i=e.P.convert(F);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:e.P.convert(F.center||[0,0]),top:e.P.convert(F.top||[0,0]),"top-left":e.P.convert(F["top-left"]||[0,0]),"top-right":e.P.convert(F["top-right"]||[0,0]),bottom:e.P.convert(F.bottom||[0,0]),"bottom-left":e.P.convert(F["bottom-left"]||[0,0]),"bottom-right":e.P.convert(F["bottom-right"]||[0,0]),left:e.P.convert(F.left||[0,0]),right:e.P.convert(F.right||[0,0])}}return Ot(new e.P(0,0))}const Q=b;u.AJAXError=e.bg,u.Evented=e.E,u.LngLat=e.N,u.MercatorCoordinate=e.Z,u.Point=e.P,u.addProtocol=e.bh,u.config=e.a,u.removeProtocol=e.bi,u.AttributionControl=as,u.BoxZoomHandler=bo,u.CanvasSource=Ee,u.CooperativeGesturesHandler=hs,u.DoubleClickZoomHandler=Si,u.DragPanHandler=Ps,u.DragRotateHandler=Oo,u.EdgeInsets=Cl,u.FullscreenControl=Nl,u.GeoJSONSource=Pe,u.GeolocateControl=pa,u.Hash=to,u.ImageSource=Le,u.KeyboardHandler=ac,u.LngLatBounds=Ce,u.LogoControl=po,u.Map=class extends no{constructor(F){e.be.mark(e.bf.create);const i=Object.assign(Object.assign({},ul),F);if(i.minZoom!=null&&i.maxZoom!=null&&i.minZoom>i.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(i.minPitch!=null&&i.maxPitch!=null&&i.minPitch>i.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(i.minPitch!=null&&i.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(i.maxPitch!=null&&i.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new ni(i.minZoom,i.maxZoom,i.minPitch,i.maxPitch,i.renderWorldCopies),{bearingSnap:i.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new vc,this._controls=[],this._mapId=e.a4(),this._contextLost=R=>{R.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new e.k("webglcontextlost",{originalEvent:R}))},this._contextRestored=R=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:R}))},this._onMapScroll=R=>{if(R.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=i.interactive,this._maxTileCacheSize=i.maxTileCacheSize,this._maxTileCacheZoomLevels=i.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=i.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=i.preserveDrawingBuffer===!0,this._antialias=i.antialias===!0,this._trackResize=i.trackResize===!0,this._bearingSnap=i.bearingSnap,this._refreshExpiredTiles=i.refreshExpiredTiles===!0,this._fadeDuration=i.fadeDuration,this._crossSourceCollisions=i.crossSourceCollisions===!0,this._collectResourceTiming=i.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Lc),i.locale),this._clickTolerance=i.clickTolerance,this._overridePixelRatio=i.pixelRatio,this._maxCanvasSize=i.maxCanvasSize,this.transformCameraUpdate=i.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=i.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=w.addThrottleControl(()=>this.isMoving()),this._requestManager=new T(i.transformRequest),typeof i.container=="string"){if(this._container=document.getElementById(i.container),!this._container)throw new Error(`Container '${i.container}' not found.`)}else{if(!(i.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=i.container}if(i.maxBounds&&this.setMaxBounds(i.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 R=!1;const B=Ws(G=>{this._trackResize&&!this._removed&&this.resize(G)._update()},50);this._resizeObserver=new ResizeObserver(G=>{R?B(G):R=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Za(this,i);const s=typeof i.hash=="string"&&i.hash||void 0;this._hash=i.hash&&new to(s).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch}),i.bounds&&(this.resize(),this.fitBounds(i.bounds,e.e({},i.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=i.localIdeographFontFamily,this._validateStyle=i.validateStyle,i.style&&this.setStyle(i.style,{localIdeographFontFamily:i.localIdeographFontFamily}),i.attributionControl&&this.addControl(new as(typeof i.attributionControl=="boolean"?void 0:i.attributionControl)),i.maplibreLogo&&this.addControl(new po,i.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",R=>{this._update(R.dataType==="style"),this.fire(new e.k(`${R.dataType}data`,R))}),this.on("dataloading",R=>{this.fire(new e.k(`${R.dataType}dataloading`,R))}),this.on("dataabort",R=>{this.fire(new e.k("sourcedataabort",R))})}_getMapId(){return this._mapId}addControl(F,i){if(i===void 0&&(i=F.getDefaultPosition?F.getDefaultPosition():"top-right"),!F||!F.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const s=F.onAdd(this);this._controls.push(F);const R=this._controlPositions[i];return i.indexOf("bottom")!==-1?R.insertBefore(s,R.firstChild):R.appendChild(s),this}removeControl(F){if(!F||!F.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const i=this._controls.indexOf(F);return i>-1&&this._controls.splice(i,1),F.onRemove(this),this}hasControl(F){return this._controls.indexOf(F)>-1}calculateCameraOptionsFromTo(F,i,s,R){return R==null&&this.terrain&&(R=this.terrain.getElevationForLngLatZoom(s,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(F,i,s,R)}resize(F){var i;const s=this._containerDimensions(),R=s[0],B=s[1],G=this._getClampedPixelRatio(R,B);if(this._resizeCanvas(R,B,G),this.painter.resize(R,B,G),this.painter.overLimit()){const pe=this.painter.context.gl;this._maxCanvasSize=[pe.drawingBufferWidth,pe.drawingBufferHeight];const xe=this._getClampedPixelRatio(R,B);this._resizeCanvas(R,B,xe),this.painter.resize(R,B,xe)}this.transform.resize(R,B),(i=this._requestedCameraState)===null||i===void 0||i.resize(R,B);const ie=!this._moving;return ie&&(this.stop(),this.fire(new e.k("movestart",F)).fire(new e.k("move",F))),this.fire(new e.k("resize",F)),ie&&this.fire(new e.k("moveend",F)),this}_getClampedPixelRatio(F,i){const{0:s,1:R}=this._maxCanvasSize,B=this.getPixelRatio(),G=F*B,ie=i*B,pe=G>s?s/G:1,xe=ie>R?R/ie:1;return Math.min(pe,xe)*B}getPixelRatio(){var F;return(F=this._overridePixelRatio)!==null&&F!==void 0?F:devicePixelRatio}setPixelRatio(F){this._overridePixelRatio=F,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(F){return this.transform.setMaxBounds(Ce.convert(F)),this._update()}setMinZoom(F){if((F=F??-2)>=-2&&F<=this.transform.maxZoom)return this.transform.minZoom=F,this._update(),this.getZoom()<F&&this.setZoom(F),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(F){if((F=F??22)>=this.transform.minZoom)return this.transform.maxZoom=F,this._update(),this.getZoom()>F&&this.setZoom(F),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(F){if((F=F??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(F>=0&&F<=this.transform.maxPitch)return this.transform.minPitch=F,this._update(),this.getPitch()<F&&this.setPitch(F),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(F){if((F=F??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(F>=this.transform.minPitch)return this.transform.maxPitch=F,this._update(),this.getPitch()>F&&this.setPitch(F),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(F){return this.transform.renderWorldCopies=F,this._update()}project(F){return this.transform.locationPoint(e.N.convert(F),this.style&&this.terrain)}unproject(F){return this.transform.pointLocation(e.P.convert(F),this.terrain)}isMoving(){var F;return this._moving||((F=this.handlers)===null||F===void 0?void 0:F.isMoving())}isZooming(){var F;return this._zooming||((F=this.handlers)===null||F===void 0?void 0:F.isZooming())}isRotating(){var F;return this._rotating||((F=this.handlers)===null||F===void 0?void 0:F.isRotating())}_createDelegatedListener(F,i,s){if(F==="mouseenter"||F==="mouseover"){let R=!1;return{layer:i,listener:s,delegates:{mousemove:B=>{const G=this.getLayer(i)?this.queryRenderedFeatures(B.point,{layers:[i]}):[];G.length?R||(R=!0,s.call(this,new Co(F,this,B.originalEvent,{features:G}))):R=!1},mouseout:()=>{R=!1}}}}if(F==="mouseleave"||F==="mouseout"){let R=!1;return{layer:i,listener:s,delegates:{mousemove:B=>{(this.getLayer(i)?this.queryRenderedFeatures(B.point,{layers:[i]}):[]).length?R=!0:R&&(R=!1,s.call(this,new Co(F,this,B.originalEvent)))},mouseout:B=>{R&&(R=!1,s.call(this,new Co(F,this,B.originalEvent)))}}}}{const R=B=>{const G=this.getLayer(i)?this.queryRenderedFeatures(B.point,{layers:[i]}):[];G.length&&(B.features=G,s.call(this,B),delete B.features)};return{layer:i,listener:s,delegates:{[F]:R}}}}on(F,i,s){if(s===void 0)return super.on(F,i);const R=this._createDelegatedListener(F,i,s);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[F]=this._delegatedListeners[F]||[],this._delegatedListeners[F].push(R);for(const B in R.delegates)this.on(B,R.delegates[B]);return this}once(F,i,s){if(s===void 0)return super.once(F,i);const R=this._createDelegatedListener(F,i,s);for(const B in R.delegates)this.once(B,R.delegates[B]);return this}off(F,i,s){return s===void 0?super.off(F,i):(this._delegatedListeners&&this._delegatedListeners[F]&&(R=>{const B=R[F];for(let G=0;G<B.length;G++){const ie=B[G];if(ie.layer===i&&ie.listener===s){for(const pe in ie.delegates)this.off(pe,ie.delegates[pe]);return B.splice(G,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(F,i){if(!this.style)return[];let s;const R=F instanceof e.P||Array.isArray(F),B=R?F:[[0,0],[this.transform.width,this.transform.height]];if(i=i||(R?{}:F)||{},B instanceof e.P||typeof B[0]=="number")s=[e.P.convert(B)];else{const G=e.P.convert(B[0]),ie=e.P.convert(B[1]);s=[G,new e.P(ie.x,G.y),ie,new e.P(G.x,ie.y),G]}return this.style.queryRenderedFeatures(s,i,this.transform)}querySourceFeatures(F,i){return this.style.querySourceFeatures(F,i)}setStyle(F,i){return(i=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},i)).diff!==!1&&i.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&F?(this._diffStyle(F,i),this):(this._localIdeographFontFamily=i.localIdeographFontFamily,this._updateStyle(F,i))}setTransformRequest(F){return this._requestManager.setTransformRequest(F),this}_getUIString(F){const i=this._locale[F];if(i==null)throw new Error(`Missing UI string '${F}'`);return i}_updateStyle(F,i){if(i.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(F,i));const s=this.style&&i.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!F)),F?(this.style=new Jn(this,i||{}),this.style.setEventedParent(this,{style:this.style}),typeof F=="string"?this.style.loadURL(F,i,s):this.style.loadJSON(F,i,s),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Jn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(F,i){if(typeof F=="string"){const s=F,R=this._requestManager.transformRequest(s,"Style");e.h(R,new AbortController).then(B=>{this._updateDiff(B.data,i)}).catch(B=>{B&&this.fire(new e.j(B))})}else typeof F=="object"&&this._updateDiff(F,i)}_updateDiff(F,i){try{this.style.setState(F,i)&&this._update(!0)}catch(s){e.w(`Unable to perform style diff: ${s.message||s.error||s}. Rebuilding the style from scratch.`),this._updateStyle(F,i)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource(F,i){return this._lazyInitEmptyStyle(),this.style.addSource(F,i),this._update(!0)}isSourceLoaded(F){const i=this.style&&this.style.sourceCaches[F];if(i!==void 0)return i.loaded();this.fire(new e.j(new Error(`There is no source with ID '${F}'`)))}setTerrain(F){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),F){const i=this.style.sourceCaches[F.source];if(!i)throw new Error(`cannot load terrain, because there exists no source with ID: ${F.source}`);this.terrain===null&&i.reload();for(const s in this.style._layers){const R=this.style._layers[s];R.type==="hillshade"&&R.source===F.source&&e.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 Ya(this.painter,i,F),this.painter.renderToTexture=new Hs(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=s=>{s.dataType==="style"?this.terrain.sourceCache.freeRtt():s.dataType==="source"&&s.tile&&(s.sourceId!==F.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(s.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:F})),this}getTerrain(){var F,i;return(i=(F=this.terrain)===null||F===void 0?void 0:F.options)!==null&&i!==void 0?i:null}areTilesLoaded(){const F=this.style&&this.style.sourceCaches;for(const i in F){const s=F[i]._tiles;for(const R in s){const B=s[R];if(B.state!=="loaded"&&B.state!=="errored")return!1}}return!0}removeSource(F){return this.style.removeSource(F),this._update(!0)}getSource(F){return this.style.getSource(F)}addImage(F,i,s={}){const{pixelRatio:R=1,sdf:B=!1,stretchX:G,stretchY:ie,content:pe,textFitWidth:xe,textFitHeight:Se}=s;if(this._lazyInitEmptyStyle(),!(i instanceof HTMLImageElement||e.b(i))){if(i.width===void 0||i.height===void 0)return this.fire(new e.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:De,height:Ue,data:rt}=i,ct=i;return this.style.addImage(F,{data:new e.R({width:De,height:Ue},new Uint8Array(rt)),pixelRatio:R,stretchX:G,stretchY:ie,content:pe,textFitWidth:xe,textFitHeight:Se,sdf:B,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,F),this}}{const{width:De,height:Ue,data:rt}=h.getImageData(i);this.style.addImage(F,{data:new e.R({width:De,height:Ue},rt),pixelRatio:R,stretchX:G,stretchY:ie,content:pe,textFitWidth:xe,textFitHeight:Se,sdf:B,version:0})}}updateImage(F,i){const s=this.style.getImage(F);if(!s)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const R=i instanceof HTMLImageElement||e.b(i)?h.getImageData(i):i,{width:B,height:G,data:ie}=R;if(B===void 0||G===void 0)return this.fire(new e.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(B!==s.data.width||G!==s.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const pe=!(i instanceof HTMLImageElement||e.b(i));return s.data.replace(ie,pe),this.style.updateImage(F,s),this}getImage(F){return this.style.getImage(F)}hasImage(F){return F?!!this.style.getImage(F):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage(F){this.style.removeImage(F)}loadImage(F){return w.getImage(this._requestManager.transformRequest(F,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(F,i){return this._lazyInitEmptyStyle(),this.style.addLayer(F,i),this._update(!0)}moveLayer(F,i){return this.style.moveLayer(F,i),this._update(!0)}removeLayer(F){return this.style.removeLayer(F),this._update(!0)}getLayer(F){return this.style.getLayer(F)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(F,i,s){return this.style.setLayerZoomRange(F,i,s),this._update(!0)}setFilter(F,i,s={}){return this.style.setFilter(F,i,s),this._update(!0)}getFilter(F){return this.style.getFilter(F)}setPaintProperty(F,i,s,R={}){return this.style.setPaintProperty(F,i,s,R),this._update(!0)}getPaintProperty(F,i){return this.style.getPaintProperty(F,i)}setLayoutProperty(F,i,s,R={}){return this.style.setLayoutProperty(F,i,s,R),this._update(!0)}getLayoutProperty(F,i){return this.style.getLayoutProperty(F,i)}setGlyphs(F,i={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(F,i),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(F,i,s={}){return this._lazyInitEmptyStyle(),this.style.addSprite(F,i,s,R=>{R||this._update(!0)}),this}removeSprite(F){return this._lazyInitEmptyStyle(),this.style.removeSprite(F),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(F,i={}){return this._lazyInitEmptyStyle(),this.style.setSprite(F,i,s=>{s||this._update(!0)}),this}setLight(F,i={}){return this._lazyInitEmptyStyle(),this.style.setLight(F,i),this._update(!0)}getLight(){return this.style.getLight()}setSky(F){return this._lazyInitEmptyStyle(),this.style.setSky(F),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(F,i){return this.style.setFeatureState(F,i),this._update()}removeFeatureState(F,i){return this.style.removeFeatureState(F,i),this._update()}getFeatureState(F){return this.style.getFeatureState(F)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let F=0,i=0;return this._container&&(F=this._container.clientWidth||400,i=this._container.clientHeight||300),[F,i]}_setupContainer(){const F=this._container;F.classList.add("maplibregl-map");const i=this._canvasContainer=r.create("div","maplibregl-canvas-container",F);this._interactive&&i.classList.add("maplibregl-interactive"),this._canvas=r.create("canvas","maplibregl-canvas",i),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const s=this._containerDimensions(),R=this._getClampedPixelRatio(s[0],s[1]);this._resizeCanvas(s[0],s[1],R);const B=this._controlContainer=r.create("div","maplibregl-control-container",F),G=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ie=>{G[ie]=r.create("div",`maplibregl-ctrl-${ie} `,B)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(F,i,s){this._canvas.width=Math.floor(s*F),this._canvas.height=Math.floor(s*i),this._canvas.style.width=`${F}px`,this._canvas.style.height=`${i}px`}_setupPainter(){const F={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let i=null;this._canvas.addEventListener("webglcontextcreationerror",R=>{i={requestedAttributes:F},R&&(i.statusMessage=R.statusMessage,i.type=R.type)},{once:!0});const s=this._canvas.getContext("webgl2",F)||this._canvas.getContext("webgl",F);if(!s){const R="Failed to initialize WebGL";throw i?(i.message=R,new Error(JSON.stringify(i))):new Error(R)}this.painter=new tc(s,this.transform),n.testSupport(s)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(F){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||F,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(F){return this._update(),this._renderTaskQueue.add(F)}_cancelRenderFrame(F){this._renderTaskQueue.remove(F)}_render(F){const i=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(F),this._removed)return;let s=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const B=this.transform.zoom,G=h.now();this.style.zoomHistory.update(B,G);const ie=new e.a9(B,{now:G,fadeDuration:i,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),pe=ie.crossFadingFactor();pe===1&&pe===this._crossFadingFactor||(s=!0,this._crossFadingFactor=pe),this.style.update(ie)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,i,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:i,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.be.mark(e.bf.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||s)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const R=this._sourcesDirty||this._styleDirty||this._placementDirty;return R||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||R||(this._fullyLoaded=!0,e.be.mark(e.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var F;this._hash&&this._hash.remove();for(const s of this._controls)s.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),w.removeThrottleControl(this._imageQueueHandle),(F=this._resizeObserver)===null||F===void 0||F.disconnect();const i=this.painter.context.gl.getExtension("WEBGL_lose_context");i!=null&&i.loseContext&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),r.remove(this._canvasContainer),r.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),e.be.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,h.frameAsync(this._frameRequest).then(F=>{e.be.frame(F),this._frameRequest=null,this._render(F)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(F){this._showTileBoundaries!==F&&(this._showTileBoundaries=F,this._update())}get showPadding(){return!!this._showPadding}set showPadding(F){this._showPadding!==F&&(this._showPadding=F,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(F){this._showCollisionBoxes!==F&&(this._showCollisionBoxes=F,F?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(F){this._showOverdrawInspector!==F&&(this._showOverdrawInspector=F,this._update())}get repaint(){return!!this._repaint}set repaint(F){this._repaint!==F&&(this._repaint=F,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(F){this._vertices=F,this._update()}get version(){return bc}getCameraTargetElevation(){return this.transform.elevation}},u.MapMouseEvent=Co,u.MapTouchEvent=vo,u.MapWheelEvent=nl,u.Marker=Ni,u.NavigationControl=class{constructor(F){this._updateZoomButtons=()=>{const i=this._map.getZoom(),s=i===this._map.getMaxZoom(),R=i===this._map.getMinZoom();this._zoomInButton.disabled=s,this._zoomOutButton.disabled=R,this._zoomInButton.setAttribute("aria-disabled",s.toString()),this._zoomOutButton.setAttribute("aria-disabled",R.toString())},this._rotateCompassArrow=()=>{const i=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=i},this._setButtonTitle=(i,s)=>{const R=this._map._getUIString(`NavigationControl.${s}`);i.title=R,i.setAttribute("aria-label",R)},this.options=e.e({},zs,F),this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",i=>i.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",i=>this._map.zoomIn({},{originalEvent:i})),r.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",i=>this._map.zoomOut({},{originalEvent:i})),r.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",i=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:i}):this._map.resetNorth({},{originalEvent:i})}),this._compassIcon=r.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(F){return this._map=F,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 ra(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(F,i){const s=r.create("button",F,this._container);return s.type="button",s.addEventListener("click",i),s}},u.Popup=xt,u.RasterDEMTileSource=We,u.RasterTileSource=Ne,u.ScaleControl=class{constructor(F){this._onMove=()=>{_i(this._map,this._container,this.options)},this.setUnit=i=>{this.options.unit=i,_i(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},ca),F)}getDefaultPosition(){return"bottom-left"}onAdd(F){return this._map=F,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-scale",F.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},u.ScrollZoomHandler=sl,u.Style=Jn,u.TerrainControl=class{constructor(F){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=F}onAdd(F){return this._map=F,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=r.create("button","maplibregl-ctrl-terrain",this._container),r.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){r.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},u.TwoFingersTouchPitchHandler=Pl,u.TwoFingersTouchRotateHandler=qc,u.TwoFingersTouchZoomHandler=ma,u.TwoFingersTouchZoomRotateHandler=cl,u.VectorTileSource=ze,u.VideoSource=ve,u.addSourceType=(F,i)=>e._(void 0,void 0,void 0,function*(){if(qe(F))throw new Error(`A source type called "${F}" already exists.`);((s,R)=>{Te[s]=R})(F,i)}),u.clearPrewarmedResources=function(){const F=fe;F&&(F.isPreloaded()&&F.numActive()===1?(F.release(ce),fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},u.getMaxParallelImageRequests=function(){return e.a.MAX_PARALLEL_IMAGE_REQUESTS},u.getRTLTextPluginStatus=function(){return Ze().getRTLTextPluginStatus()},u.getVersion=function(){return Q},u.getWorkerCount=function(){return he.workerCount},u.getWorkerUrl=function(){return e.a.WORKER_URL},u.importScriptInWorkers=function(F){return me().broadcast("IS",F)},u.prewarm=function(){oe().acquire(ce)},u.setMaxParallelImageRequests=function(F){e.a.MAX_PARALLEL_IMAGE_REQUESTS=F},u.setRTLTextPlugin=function(F,i){return Ze().setRTLTextPlugin(F,i)},u.setWorkerCount=function(F){he.workerCount=F},u.setWorkerUrl=function(F){e.a.WORKER_URL=F}}),E}()},88640:function(O,E,t){function x(_e,Ae,Ce){_e.prototype=Ae.prototype=Ce,Ce.constructor=_e}function u(_e,Ae){var Ce=Object.create(_e.prototype);for(var Me in Ae)Ce[Me]=Ae[Me];return Ce}function e(){}t.d(E,{GW:function(){return ge},Dj:function(){return he}});var b=.7,f=1/b,v="\\s*([+-]?\\d+)\\s*",h="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",n=/^#([0-9a-f]{3,8})$/,c=new RegExp("^rgb\\(".concat(v,",").concat(v,",").concat(v,"\\)$")),o=new RegExp("^rgb\\(".concat(r,",").concat(r,",").concat(r,"\\)$")),l=new RegExp("^rgba\\(".concat(v,",").concat(v,",").concat(v,",").concat(h,"\\)$")),p=new RegExp("^rgba\\(".concat(r,",").concat(r,",").concat(r,",").concat(h,"\\)$")),m=new RegExp("^hsl\\(".concat(h,",").concat(r,",").concat(r,"\\)$")),w=new RegExp("^hsla\\(".concat(h,",").concat(r,",").concat(r,",").concat(h,"\\)$")),T={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 k(){return this.rgb().formatHex()}function M(){return this.rgb().formatRgb()}function P(_e){var Ae,Ce;return _e=(_e+"").trim().toLowerCase(),(Ae=n.exec(_e))?(Ce=Ae[1].length,Ae=parseInt(Ae[1],16),Ce===6?S(Ae):Ce===3?new _(Ae>>8&15|Ae>>4&240,Ae>>4&15|240&Ae,(15&Ae)<<4|15&Ae,1):Ce===8?L(Ae>>24&255,Ae>>16&255,Ae>>8&255,(255&Ae)/255):Ce===4?L(Ae>>12&15|Ae>>8&240,Ae>>8&15|Ae>>4&240,Ae>>4&15|240&Ae,((15&Ae)<<4|15&Ae)/255):null):(Ae=c.exec(_e))?new _(Ae[1],Ae[2],Ae[3],1):(Ae=o.exec(_e))?new _(255*Ae[1]/100,255*Ae[2]/100,255*Ae[3]/100,1):(Ae=l.exec(_e))?L(Ae[1],Ae[2],Ae[3],Ae[4]):(Ae=p.exec(_e))?L(255*Ae[1]/100,255*Ae[2]/100,255*Ae[3]/100,Ae[4]):(Ae=m.exec(_e))?j(Ae[1],Ae[2]/100,Ae[3]/100,1):(Ae=w.exec(_e))?j(Ae[1],Ae[2]/100,Ae[3]/100,Ae[4]):T.hasOwnProperty(_e)?S(T[_e]):_e==="transparent"?new _(NaN,NaN,NaN,0):null}function S(_e){return new _(_e>>16&255,_e>>8&255,255&_e,1)}function L(_e,Ae,Ce,Me){return Me<=0&&(_e=Ae=Ce=NaN),new _(_e,Ae,Ce,Me)}function C(_e,Ae,Ce,Me){return arguments.length===1?((ze=_e)instanceof e||(ze=P(ze)),ze?new _((ze=ze.rgb()).r,ze.g,ze.b,ze.opacity):new _):new _(_e,Ae,Ce,Me??1);var ze}function _(_e,Ae,Ce,Me){this.r=+_e,this.g=+Ae,this.b=+Ce,this.opacity=+Me}function z(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b))}function y(){var _e=N(this.opacity);return"".concat(_e===1?"rgb(":"rgba(").concat(I(this.r),", ").concat(I(this.g),", ").concat(I(this.b)).concat(_e===1?")":", ".concat(_e,")"))}function N(_e){return isNaN(_e)?1:Math.max(0,Math.min(1,_e))}function I(_e){return Math.max(0,Math.min(255,Math.round(_e)||0))}function V(_e){return((_e=I(_e))<16?"0":"")+_e.toString(16)}function j(_e,Ae,Ce,Me){return Me<=0?_e=Ae=Ce=NaN:Ce<=0||Ce>=1?_e=Ae=NaN:Ae<=0&&(_e=NaN),new q(_e,Ae,Ce,Me)}function W(_e){if(_e instanceof q)return new q(_e.h,_e.s,_e.l,_e.opacity);if(_e instanceof e||(_e=P(_e)),!_e)return new q;if(_e instanceof q)return _e;var Ae=(_e=_e.rgb()).r/255,Ce=_e.g/255,Me=_e.b/255,ze=Math.min(Ae,Ce,Me),Ne=Math.max(Ae,Ce,Me),We=NaN,Pe=Ne-ze,Be=(Ne+ze)/2;return Pe?(We=Ae===Ne?(Ce-Me)/Pe+6*(Ce<Me):Ce===Ne?(Me-Ae)/Pe+2:(Ae-Ce)/Pe+4,Pe/=Be<.5?Ne+ze:2-Ne-ze,We*=60):Pe=Be>0&&Be<1?0:We,new q(We,Pe,Be,_e.opacity)}function q(_e,Ae,Ce,Me){this.h=+_e,this.s=+Ae,this.l=+Ce,this.opacity=+Me}function $(_e){return(_e=(_e||0)%360)<0?_e+360:_e}function te(_e){return Math.max(0,Math.min(1,_e||0))}function X(_e,Ae,Ce){return 255*(_e<60?Ae+(Ce-Ae)*_e/60:_e<180?Ce:_e<240?Ae+(Ce-Ae)*(240-_e)/60:Ae)}x(e,P,{copy:function(_e){return Object.assign(new this.constructor,this,_e)},displayable:function(){return this.rgb().displayable()},hex:k,formatHex:k,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return W(this).formatHsl()},formatRgb:M,toString:M}),x(_,C,u(e,{brighter:function(_e){return _e=_e==null?f:Math.pow(f,_e),new _(this.r*_e,this.g*_e,this.b*_e,this.opacity)},darker:function(_e){return _e=_e==null?b:Math.pow(b,_e),new _(this.r*_e,this.g*_e,this.b*_e,this.opacity)},rgb:function(){return this},clamp:function(){return new _(I(this.r),I(this.g),I(this.b),N(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:z,formatHex:z,formatHex8:function(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b)).concat(V(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:y,toString:y})),x(q,function(_e,Ae,Ce,Me){return arguments.length===1?W(_e):new q(_e,Ae,Ce,Me??1)},u(e,{brighter:function(_e){return _e=_e==null?f:Math.pow(f,_e),new q(this.h,this.s,this.l*_e,this.opacity)},darker:function(_e){return _e=_e==null?b:Math.pow(b,_e),new q(this.h,this.s,this.l*_e,this.opacity)},rgb:function(){var _e=this.h%360+360*(this.h<0),Ae=isNaN(_e)||isNaN(this.s)?0:this.s,Ce=this.l,Me=Ce+(Ce<.5?Ce:1-Ce)*Ae,ze=2*Ce-Me;return new _(X(_e>=240?_e-240:_e+120,ze,Me),X(_e,ze,Me),X(_e<120?_e+240:_e-120,ze,Me),this.opacity)},clamp:function(){return new q($(this.h),te(this.s),te(this.l),N(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 _e=N(this.opacity);return"".concat(_e===1?"hsl(":"hsla(").concat($(this.h),", ").concat(100*te(this.s),"%, ").concat(100*te(this.l),"%").concat(_e===1?")":", ".concat(_e,")"))}}));var ne=function(_e){return function(){return _e}};function ee(_e,Ae){var Ce=Ae-_e;return Ce?function(Me,ze){return function(Ne){return Me+Ne*ze}}(_e,Ce):ne(isNaN(_e)?Ae:_e)}var J=function _e(Ae){var Ce=function(ze){return(ze=+ze)==1?ee:function(Ne,We){return We-Ne?function(Pe,Be,Le){return Pe=Math.pow(Pe,Le),Be=Math.pow(Be,Le)-Pe,Le=1/Le,function(ve){return Math.pow(Pe+ve*Be,Le)}}(Ne,We,ze):ne(isNaN(Ne)?We:Ne)}}(Ae);function Me(ze,Ne){var We=Ce((ze=C(ze)).r,(Ne=C(Ne)).r),Pe=Ce(ze.g,Ne.g),Be=Ce(ze.b,Ne.b),Le=ee(ze.opacity,Ne.opacity);return function(ve){return ze.r=We(ve),ze.g=Pe(ve),ze.b=Be(ve),ze.opacity=Le(ve),ze+""}}return Me.gamma=_e,Me}(1);function Z(_e,Ae){var Ce,Me=Ae?Ae.length:0,ze=_e?Math.min(Me,_e.length):0,Ne=new Array(ze),We=new Array(Me);for(Ce=0;Ce<ze;++Ce)Ne[Ce]=ge(_e[Ce],Ae[Ce]);for(;Ce<Me;++Ce)We[Ce]=Ae[Ce];return function(Pe){for(Ce=0;Ce<ze;++Ce)We[Ce]=Ne[Ce](Pe);return We}}function ce(_e,Ae){var Ce=new Date;return _e=+_e,Ae=+Ae,function(Me){return Ce.setTime(_e*(1-Me)+Ae*Me),Ce}}function he(_e,Ae){return _e=+_e,Ae=+Ae,function(Ce){return _e*(1-Ce)+Ae*Ce}}function de(_e){return de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},de(_e)}function fe(_e,Ae){var Ce,Me={},ze={};for(Ce in _e!==null&&de(_e)==="object"||(_e={}),Ae!==null&&de(Ae)==="object"||(Ae={}),Ae)Ce in _e?Me[Ce]=ge(_e[Ce],Ae[Ce]):ze[Ce]=Ae[Ce];return function(Ne){for(Ce in Me)ze[Ce]=Me[Ce](Ne);return ze}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oe=new RegExp(re.source,"g");function le(_e,Ae){var Ce,Me,ze,Ne=re.lastIndex=oe.lastIndex=0,We=-1,Pe=[],Be=[];for(_e+="",Ae+="";(Ce=re.exec(_e))&&(Me=oe.exec(Ae));)(ze=Me.index)>Ne&&(ze=Ae.slice(Ne,ze),Pe[We]?Pe[We]+=ze:Pe[++We]=ze),(Ce=Ce[0])===(Me=Me[0])?Pe[We]?Pe[We]+=Me:Pe[++We]=Me:(Pe[++We]=null,Be.push({i:We,x:he(Ce,Me)})),Ne=oe.lastIndex;return Ne<Ae.length&&(ze=Ae.slice(Ne),Pe[We]?Pe[We]+=ze:Pe[++We]=ze),Pe.length<2?Be[0]?function(Le){return function(ve){return Le(ve)+""}}(Be[0].x):function(Le){return function(){return Le}}(Ae):(Ae=Be.length,function(Le){for(var ve,Ee=0;Ee<Ae;++Ee)Pe[(ve=Be[Ee]).i]=ve.x(Le);return Pe.join("")})}function me(_e,Ae){Ae||(Ae=[]);var Ce,Me=_e?Math.min(Ae.length,_e.length):0,ze=Ae.slice();return function(Ne){for(Ce=0;Ce<Me;++Ce)ze[Ce]=_e[Ce]*(1-Ne)+Ae[Ce]*Ne;return ze}}function be(_e){return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},be(_e)}function ge(_e,Ae){var Ce,Me,ze=be(Ae);return Ae==null||ze==="boolean"?ne(Ae):(ze==="number"?he:ze==="string"?(Ce=P(Ae))?(Ae=Ce,J):le:Ae instanceof P?J:Ae instanceof Date?ce:(Me=Ae,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Ae)?Z:typeof Ae.valueOf!="function"&&typeof Ae.toString!="function"||isNaN(Ae)?fe:he:me))(_e,Ae)}},23648:function(O){O.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(O){O.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(O){O.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(O){O.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(O){O.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(O){O.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(O){O.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(O){O.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"}}]}`)}},U={};function ae(O){var E=U[O];if(E!==void 0)return E.exports;var t=U[O]={id:O,exports:{}};return A[O].call(t.exports,t,t.exports,ae),t.exports}return ae.m=A,ae.n=function(O){var E=O&&O.__esModule?function(){return O.default}:function(){return O};return ae.d(E,{a:E}),E},ae.d=function(O,E){for(var t in E)ae.o(E,t)&&!ae.o(O,t)&&Object.defineProperty(O,t,{enumerable:!0,get:E[t]})},ae.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),ae.o=function(O,E){return Object.prototype.hasOwnProperty.call(O,E)},ae.r=function(O){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})},ae.b=document.baseURI||self.location.href,ae.nc=void 0,ae(20260)}()})}(Jb)),Jb.exports}var f6=p6();const Zb=h6(f6),m6={ref:"card",class:"card-volumetric-field"},Yb=1,g6=800,Qb=300,y6=-46,e2=100,t2=-14,v6={__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},isGhostEffect:{type:Boolean,default:!1}},setup(a){const d=new Set([2,20,308,310]),A=[[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 U=null;const ae=a,O=g.ref(null),E=g.ref(null),t=g.ref(0),x=g.ref(null),u=g.computed(()=>`volumetric-field-${Date.now()}`);g.watch(()=>ae.passesPlays,p=>{const m=p.reduce((w,T)=>(d.has(T[ae.playIndexes.categoryId])&&w.push({x1:T[ae.playIndexes.coordinate1X],y1:T[ae.playIndexes.coordinate1Y],x2:T[ae.playIndexes.coordinate2X],y2:T[ae.playIndexes.coordinate2Y],x3:T[ae.playIndexes.coordinate3X],y3:T[ae.playIndexes.coordinate3Y]}),w),[]);l(m)}),g.watch(()=>t.value,(p,m)=>{x.value&&(n(p),E.value.style.height=`${c(p)}px`,x.value.style.top=`${o(c(p))}px`)});function e(){U=new ResizeObserver(p=>{for(const m of p)t.value=m.contentRect.width}),U.observe(O.value)}function b(p){return Array.from({length:p},()=>0)}function f(p,m){let w=.01351,T=.02439,k=0,M=0,P=[];const S=m.length,L=Math.floor(S/10);for(;k<74;)M=m.filter(C=>1-C.y3>=k*w&&1-C.y3<=(k+1)*w&&1-C.x3>=p*T&&1-C.x3<=(p+1)*T).map(C=>C.y3).length,P.push(parseFloat((M/L).toFixed(4))),k++;return P.reverse()}function v(p){let m=[b(74),b(74)],w=[],T=39;for(;T>0&&T<=39;)w=f(T,p),m.push(w),T--;return m.push(b(74),b(74)),m}function h(p,m,w){const T=[];let k=0,M=0;T.push(p[0]);for(let P=1;P<w-1;P++){const S=[];S.push(p[P][0]);for(let L=1;L<m-1;L++)k=p[P][L-1],M=p[P][L+1],S.push(k+.5*(p[P][L]+M-k));S.push(p[P][m-1]),T.push(S)}T.push(p[w-1]);for(let P=1;P<m-1;P++)for(let S=1;S<w-1;S++)k=T[S-1][P],M=T[S+1][P],T[S][P]=k+.5*(T[S][P]+M-k);return T}function r(p){let m=0,w=0;for(let T=0;T<p.length;T++){w=w+p[T].reduce(function(M,P){return M+P});const k=Math.max.apply(null,p[T]);k>m&&(m=k)}return m}function n(p){Zb.relayout(O.value,{width:p,height:c(p)})}function c(p){return Math.round(Qb/g6*p,0)}function o(p){return t2+(p-e2)/(Qb-e2)*(y6-t2)}function l(p){let m=v(p),w=m.length,T=m[0].length;m=h(h(m,T,w),T,w),T=m[0].length,w=m.length;const k=r(m),M=[{z:m,type:"surface",connectgaps:!0,opacity:.25,colorscale:A,autoscale:!1,showscale:!1}],P=[0,T],S=[0,w],L=[0,k*5],C={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:S},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:L},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:t.value,height:c(t.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};E.value&&(E.value.style.height=`${c(t.value)}px`);const _=[];for(let y=0;y<T;y++){const N=[],I=[],V=[];for(let j=0;j<w;j++)N.push(y),I.push(j),V.push(M[0].z[j][y]);_.push({x:N,y:I,z:V,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:k,width:Yb,color:V,colorscale:A,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let y=0;y<w;y++){const N=[],I=[],V=[];for(let j=0;j<T;j++)N.push(j),I.push(y),V.push(M[0].z[y][j]);_.push({x:N,y:I,z:V,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:k,width:Yb,color:V,colorscale:A,shape:"spline",smoothing:.6,dash:"dotline"}})}Zb.newPlot(O.value,M.concat(_),C,{displayModeBar:!1},{responsive:!0}),x.value=document.querySelector(`div.${u.value} > .plot-container`);const z=document.querySelector(`div.${u.value} div.plotly`);z&&ae.isGhostEffect&&(z.style.opacity="0.2"),x.value&&(x.value.style.top=`${o(c(t.value))}px`)}return g.onMounted(()=>{O.value&&(O.value.style.pointerEvents="none"),e()}),(p,m)=>(g.openBlock(),g.createElementBlock("div",m6,[g.createElementVNode("div",{ref_key:"volumetricField",ref:E,class:"card-volumetric-field__volumetric-field"},[g.createElementVNode("div",{ref_key:"surfacePlot",ref:O,id:"surface-plot",class:g.normalizeClass([u.value])},null,2)],512)],512))}},b6=zm(v6,[["__scopeId","data-v-1cf52ebb"]]),x6={__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(a){const d=a,A=g.computed(()=>({"--flex-direction-info":d.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":d.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":d.team.isHomeTeam?"#336dff":"#7ed321"}));return(U,ae)=>(g.openBlock(),g.createElementBlock("div",{class:"attack-direction",style:g.normalizeStyle(A.value)},[ae[0]||(ae[0]=g.createElementVNode("div",{class:"attack-direction__line"},null,-1)),g.createElementVNode("div",{class:g.normalizeClass(`attack-direction__triangle-${a.team.isHomeTeam?"right":"left"}`)},null,2),ae[1]||(ae[1]=g.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},_6=zm(x6,[["__scopeId","data-v-18aa328f"]]);function r2(a,d){return function(){return a.apply(d,arguments)}}const{toString:w6}=Object.prototype,{getPrototypeOf:Dy}=Object,{iterator:Om,toStringTag:n2}=Symbol,Nm=(a=>d=>{const A=w6.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Du=a=>(a=a.toLowerCase(),d=>Nm(d)===a),Rm=a=>d=>typeof d===a,{isArray:dp}=Array,af=Rm("undefined");function k6(a){return a!==null&&!af(a)&&a.constructor!==null&&!af(a.constructor)&&Jc(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const a2=Du("ArrayBuffer");function T6(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&a2(a.buffer),d}const S6=Rm("string"),Jc=Rm("function"),i2=Rm("number"),Dm=a=>a!==null&&typeof a=="object",A6=a=>a===!0||a===!1,Im=a=>{if(Nm(a)!=="object")return!1;const d=Dy(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(n2 in a)&&!(Om in a)},E6=Du("Date"),C6=Du("File"),M6=Du("Blob"),P6=Du("FileList"),L6=a=>Dm(a)&&Jc(a.pipe),z6=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||Jc(a.append)&&((d=Nm(a))==="formdata"||d==="object"&&Jc(a.toString)&&a.toString()==="[object FormData]"))},O6=Du("URLSearchParams"),[N6,R6,D6,I6]=["ReadableStream","Request","Response","Headers"].map(Du),F6=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function of(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),dp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function o2(a,d){d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const bh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,s2=a=>!af(a)&&a!==bh;function Iy(){const{caseless:a}=s2(this)&&this||{},d={},A=(U,ae)=>{const O=a&&o2(d,ae)||ae;Im(d[O])&&Im(U)?d[O]=Iy(d[O],U):Im(U)?d[O]=Iy({},U):dp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&of(arguments[U],A);return d}const V6=(a,d,A,{allOwnKeys:U}={})=>(of(d,(ae,O)=>{A&&Jc(ae)?a[O]=r2(ae,A):a[O]=ae},{allOwnKeys:U}),a),B6=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),U6=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},j6=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&Dy(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},q6=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},W6=a=>{if(!a)return null;if(dp(a))return a;let d=a.length;if(!i2(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},H6=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&Dy(Uint8Array)),G6=(a,d)=>{const A=(a&&a[Om]).call(a);let U;for(;(U=A.next())&&!U.done;){const ae=U.value;d.call(a,ae[0],ae[1])}},X6=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},K6=Du("HTMLFormElement"),J6=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,A,U){return A.toUpperCase()+U}),l2=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),$6=Du("RegExp"),c2=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};of(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},Z6=a=>{c2(a,(d,A)=>{if(Jc(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(Jc(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},Y6=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return dp(a)?U(a):U(String(a).split(d)),A},Q6=()=>{},ek=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function tk(a){return!!(a&&Jc(a.append)&&a[n2]==="FormData"&&a[Om])}const rk=a=>{const d=new Array(10),A=(U,ae)=>{if(Dm(U)){if(d.indexOf(U)>=0)return;if(!("toJSON"in U)){d[ae]=U;const O=dp(U)?[]:{};return of(U,(E,t)=>{const x=A(E,ae+1);!af(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},nk=Du("AsyncFunction"),ak=a=>a&&(Dm(a)||Jc(a))&&Jc(a.then)&&Jc(a.catch),u2=((a,d)=>a?setImmediate:d?((A,U)=>(bh.addEventListener("message",({source:ae,data:O})=>{ae===bh&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),bh.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",Jc(bh.postMessage)),ik=typeof queueMicrotask<"u"?queueMicrotask.bind(bh):typeof process<"u"&&process.nextTick||u2,ok=a=>a!=null&&Jc(a[Om]),Bn={isArray:dp,isArrayBuffer:a2,isBuffer:k6,isFormData:z6,isArrayBufferView:T6,isString:S6,isNumber:i2,isBoolean:A6,isObject:Dm,isPlainObject:Im,isReadableStream:N6,isRequest:R6,isResponse:D6,isHeaders:I6,isUndefined:af,isDate:E6,isFile:C6,isBlob:M6,isRegExp:$6,isFunction:Jc,isStream:L6,isURLSearchParams:O6,isTypedArray:H6,isFileList:P6,forEach:of,merge:Iy,extend:V6,trim:F6,stripBOM:B6,inherits:U6,toFlatObject:j6,kindOf:Nm,kindOfTest:Du,endsWith:q6,toArray:W6,forEachEntry:G6,matchAll:X6,isHTMLForm:K6,hasOwnProperty:l2,hasOwnProp:l2,reduceDescriptors:c2,freezeMethods:Z6,toObjectSet:Y6,toCamelCase:J6,noop:Q6,toFiniteNumber:ek,findKey:o2,global:bh,isContextDefined:s2,isSpecCompliantForm:tk,toJSONObject:rk,isAsyncFn:nk,isThenable:ak,setImmediate:u2,asap:ik,isIterable:ok};function ci(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}Bn.inherits(ci,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:Bn.toJSONObject(this.config),code:this.code,status:this.status}}});const d2=ci.prototype,h2={};["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(a=>{h2[a]={value:a}}),Object.defineProperties(ci,h2),Object.defineProperty(d2,"isAxiosError",{value:!0}),ci.from=(a,d,A,U,ae,O)=>{const E=Object.create(d2);return Bn.toFlatObject(a,E,function(t){return t!==Error.prototype},t=>t!=="isAxiosError"),ci.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const sk=null;function Fy(a){return Bn.isPlainObject(a)||Bn.isArray(a)}function p2(a){return Bn.endsWith(a,"[]")?a.slice(0,-2):a}function f2(a,d,A){return a?a.concat(d).map(function(U,ae){return U=p2(U),!A&&ae?"["+U+"]":U}).join(A?".":""):d}function lk(a){return Bn.isArray(a)&&!a.some(Fy)}const ck=Bn.toFlatObject(Bn,{},null,function(a){return/^is[A-Z]/.test(a)});function Fm(a,d,A){if(!Bn.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=Bn.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,h){return!Bn.isUndefined(h[v])});const U=A.metaTokens,ae=A.visitor||u,O=A.dots,E=A.indexes,t=(A.Blob||typeof Blob<"u"&&Blob)&&Bn.isSpecCompliantForm(d);if(!Bn.isFunction(ae))throw new TypeError("visitor must be a function");function x(v){if(v===null)return"";if(Bn.isDate(v))return v.toISOString();if(Bn.isBoolean(v))return v.toString();if(!t&&Bn.isBlob(v))throw new ci("Blob is not supported. Use a Buffer instead.");return Bn.isArrayBuffer(v)||Bn.isTypedArray(v)?t&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,h,r){let n=v;if(v&&!r&&typeof v=="object"){if(Bn.endsWith(h,"{}"))h=U?h:h.slice(0,-2),v=JSON.stringify(v);else if(Bn.isArray(v)&&lk(v)||(Bn.isFileList(v)||Bn.endsWith(h,"[]"))&&(n=Bn.toArray(v)))return h=p2(h),n.forEach(function(c,o){!(Bn.isUndefined(c)||c===null)&&d.append(E===!0?f2([h],o,O):E===null?h:h+"[]",x(c))}),!1}return Fy(v)?!0:(d.append(f2(r,h,O),x(v)),!1)}const e=[],b=Object.assign(ck,{defaultVisitor:u,convertValue:x,isVisitable:Fy});function f(v,h){if(!Bn.isUndefined(v)){if(e.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));e.push(v),Bn.forEach(v,function(r,n){(!(Bn.isUndefined(r)||r===null)&&ae.call(d,r,Bn.isString(n)?n.trim():n,h,b))===!0&&f(r,h?h.concat(n):[n])}),e.pop()}}if(!Bn.isObject(a))throw new TypeError("data must be an object");return f(a),d}function m2(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(A){return d[A]})}function Vy(a,d){this._pairs=[],a&&Fm(a,this,d)}const g2=Vy.prototype;g2.append=function(a,d){this._pairs.push([a,d])},g2.toString=function(a){const d=a?function(A){return a.call(this,A,m2)}:m2;return this._pairs.map(function(A){return d(A[0])+"="+d(A[1])},"").join("&")};function uk(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function y2(a,d,A){if(!d)return a;const U=A&&A.encode||uk;Bn.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=Bn.isURLSearchParams(d)?d.toString():new Vy(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}let v2=class{constructor(){this.handlers=[]}use(a,d,A){return this.handlers.push({fulfilled:a,rejected:d,synchronous:A?A.synchronous:!1,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){Bn.forEach(this.handlers,function(d){d!==null&&a(d)})}};const b2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dk=typeof URLSearchParams<"u"?URLSearchParams:Vy,hk=typeof FormData<"u"?FormData:null,pk=typeof Blob<"u"?Blob:null,fk={isBrowser:!0,classes:{URLSearchParams:dk,FormData:hk,Blob:pk},protocols:["http","https","file","blob","url","data"]},By=typeof window<"u"&&typeof document<"u",Uy=typeof navigator=="object"&&navigator||void 0,mk=By&&(!Uy||["ReactNative","NativeScript","NS"].indexOf(Uy.product)<0),gk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yk=By&&window.location.href||"http://localhost",vk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:By,hasStandardBrowserEnv:mk,hasStandardBrowserWebWorkerEnv:gk,navigator:Uy,origin:yk},Symbol.toStringTag,{value:"Module"})),_c={...vk,...fk};function bk(a,d){return Fm(a,new _c.classes.URLSearchParams,Object.assign({visitor:function(A,U,ae,O){return _c.isNode&&Bn.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)}},d))}function xk(a){return Bn.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function _k(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function x2(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&Bn.isArray(ae)?ae.length:E,x?(Bn.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!Bn.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&Bn.isArray(ae[E])&&(ae[E]=_k(ae[E])),!t)}if(Bn.isFormData(a)&&Bn.isFunction(a.entries)){const A={};return Bn.forEachEntry(a,(U,ae)=>{d(xk(U),ae,A,0)}),A}return null}function wk(a,d,A){if(Bn.isString(a))try{return(d||JSON.parse)(a),Bn.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const sf={transitional:b2,adapter:["xhr","http","fetch"],transformRequest:[function(a,d){const A=d.getContentType()||"",U=A.indexOf("application/json")>-1,ae=Bn.isObject(a);if(ae&&Bn.isHTMLForm(a)&&(a=new FormData(a)),Bn.isFormData(a))return U?JSON.stringify(x2(a)):a;if(Bn.isArrayBuffer(a)||Bn.isBuffer(a)||Bn.isStream(a)||Bn.isFile(a)||Bn.isBlob(a)||Bn.isReadableStream(a))return a;if(Bn.isArrayBufferView(a))return a.buffer;if(Bn.isURLSearchParams(a))return d.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let O;if(ae){if(A.indexOf("application/x-www-form-urlencoded")>-1)return bk(a,this.formSerializer).toString();if((O=Bn.isFileList(a))||A.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return Fm(O?{"files[]":a}:a,E&&new E,this.formSerializer)}}return ae||U?(d.setContentType("application/json",!1),wk(a)):a}],transformResponse:[function(a){const d=this.transitional||sf.transitional,A=d&&d.forcedJSONParsing,U=this.responseType==="json";if(Bn.isResponse(a)||Bn.isReadableStream(a))return a;if(a&&Bn.isString(a)&&(A&&!this.responseType||U)){const ae=!(d&&d.silentJSONParsing)&&U;try{return JSON.parse(a)}catch(O){if(ae)throw O.name==="SyntaxError"?ci.from(O,ci.ERR_BAD_RESPONSE,this,null,this.response):O}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_c.classes.FormData,Blob:_c.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Bn.forEach(["delete","get","head","post","put","patch"],a=>{sf.headers[a]={}});const kk=Bn.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"]),Tk=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4031
|
+
`).forEach(function(O){ae=O.indexOf(":"),A=O.substring(0,ae).trim().toLowerCase(),U=O.substring(ae+1).trim(),!(!A||d[A]&&kk[A])&&(A==="set-cookie"?d[A]?d[A].push(U):d[A]=[U]:d[A]=d[A]?d[A]+", "+U:U)}),d},_2=Symbol("internals");function lf(a){return a&&String(a).trim().toLowerCase()}function Vm(a){return a===!1||a==null?a:Bn.isArray(a)?a.map(Vm):String(a)}function Sk(a){const d=Object.create(null),A=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let U;for(;U=A.exec(a);)d[U[1]]=U[2];return d}const Ak=a=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());function jy(a,d,A,U,ae){if(Bn.isFunction(U))return U.call(this,d,A);if(ae&&(d=A),!!Bn.isString(d)){if(Bn.isString(U))return d.indexOf(U)!==-1;if(Bn.isRegExp(U))return U.test(d)}}function Ek(a){return a.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(d,A,U)=>A.toUpperCase()+U)}function Ck(a,d){const A=Bn.toCamelCase(" "+d);["get","set","has"].forEach(U=>{Object.defineProperty(a,U+A,{value:function(ae,O,E){return this[U].call(this,d,ae,O,E)},configurable:!0})})}let $c=class{constructor(a){a&&this.set(a)}set(a,d,A){const U=this;function ae(E,t,x){const u=lf(t);if(!u)throw new Error("header name must be a non-empty string");const e=Bn.findKey(U,u);(!e||U[e]===void 0||x===!0||x===void 0&&U[e]!==!1)&&(U[e||t]=Vm(E))}const O=(E,t)=>Bn.forEach(E,(x,u)=>ae(x,u,t));if(Bn.isPlainObject(a)||a instanceof this.constructor)O(a,d);else if(Bn.isString(a)&&(a=a.trim())&&!Ak(a))O(Tk(a),d);else if(Bn.isObject(a)&&Bn.isIterable(a)){let E={},t,x;for(const u of a){if(!Bn.isArray(u))throw TypeError("Object iterator must return a key-value pair");E[x=u[0]]=(t=E[x])?Bn.isArray(t)?[...t,u[1]]:[t,u[1]]:u[1]}O(E,d)}else a!=null&&ae(d,a,A);return this}get(a,d){if(a=lf(a),a){const A=Bn.findKey(this,a);if(A){const U=this[A];if(!d)return U;if(d===!0)return Sk(U);if(Bn.isFunction(d))return d.call(this,U,A);if(Bn.isRegExp(d))return d.exec(U);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,d){if(a=lf(a),a){const A=Bn.findKey(this,a);return!!(A&&this[A]!==void 0&&(!d||jy(this,this[A],A,d)))}return!1}delete(a,d){const A=this;let U=!1;function ae(O){if(O=lf(O),O){const E=Bn.findKey(A,O);E&&(!d||jy(A,A[E],E,d))&&(delete A[E],U=!0)}}return Bn.isArray(a)?a.forEach(ae):ae(a),U}clear(a){const d=Object.keys(this);let A=d.length,U=!1;for(;A--;){const ae=d[A];(!a||jy(this,this[ae],ae,a,!0))&&(delete this[ae],U=!0)}return U}normalize(a){const d=this,A={};return Bn.forEach(this,(U,ae)=>{const O=Bn.findKey(A,ae);if(O){d[O]=Vm(U),delete d[ae];return}const E=a?Ek(ae):String(ae).trim();E!==ae&&delete d[ae],d[E]=Vm(U),A[E]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const d=Object.create(null);return Bn.forEach(this,(A,U)=>{A!=null&&A!==!1&&(d[U]=a&&Bn.isArray(A)?A.join(", "):A)}),d}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,d])=>a+": "+d).join(`
|
|
4032
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...d){const A=new this(a);return d.forEach(U=>A.set(U)),A}static accessor(a){const d=(this[_2]=this[_2]={accessors:{}}).accessors,A=this.prototype;function U(ae){const O=lf(ae);d[O]||(Ck(A,ae),d[O]=!0)}return Bn.isArray(a)?a.forEach(U):U(a),this}};$c.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Bn.reduceDescriptors($c.prototype,({value:a},d)=>{let A=d[0].toUpperCase()+d.slice(1);return{get:()=>a,set(U){this[A]=U}}}),Bn.freezeMethods($c);function qy(a,d){const A=this||sf,U=d||A,ae=$c.from(U.headers);let O=U.data;return Bn.forEach(a,function(E){O=E.call(A,O,ae.normalize(),d?d.status:void 0)}),ae.normalize(),O}function w2(a){return!!(a&&a.__CANCEL__)}function hp(a,d,A){ci.call(this,a??"canceled",ci.ERR_CANCELED,d,A),this.name="CanceledError"}Bn.inherits(hp,ci,{__CANCEL__:!0});function k2(a,d,A){const U=A.config.validateStatus;!A.status||!U||U(A.status)?a(A):d(new ci("Request failed with status code "+A.status,[ci.ERR_BAD_REQUEST,ci.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A))}function Mk(a){const d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return d&&d[1]||""}function Pk(a,d){a=a||10;const A=new Array(a),U=new Array(a);let ae=0,O=0,E;return d=d!==void 0?d:1e3,function(t){const x=Date.now(),u=U[O];E||(E=x),A[ae]=t,U[ae]=x;let e=O,b=0;for(;e!==ae;)b+=A[e++],e=e%a;if(ae=(ae+1)%a,ae===O&&(O=(O+1)%a),x-E<d)return;const f=u&&x-u;return f?Math.round(b*1e3/f):void 0}}function Lk(a,d){let A=0,U=1e3/d,ae,O;const E=(t,x=Date.now())=>{A=x,ae=null,O&&(clearTimeout(O),O=null),a.apply(null,t)};return[(...t)=>{const x=Date.now(),u=x-A;u>=U?E(t,x):(ae=t,O||(O=setTimeout(()=>{O=null,E(ae)},U-u)))},()=>ae&&E(ae)]}const Bm=(a,d,A=3)=>{let U=0;const ae=Pk(50,250);return Lk(O=>{const E=O.loaded,t=O.lengthComputable?O.total:void 0,x=E-U,u=ae(x),e=E<=t;U=E;const b={loaded:E,total:t,progress:t?E/t:void 0,bytes:x,rate:u||void 0,estimated:u&&t&&e?(t-E)/u:void 0,event:O,lengthComputable:t!=null,[d?"download":"upload"]:!0};a(b)},A)},T2=(a,d)=>{const A=a!=null;return[U=>d[0]({lengthComputable:A,total:a,loaded:U}),d[1]]},S2=a=>(...d)=>Bn.asap(()=>a(...d)),zk=_c.hasStandardBrowserEnv?((a,d)=>A=>(A=new URL(A,_c.origin),a.protocol===A.protocol&&a.host===A.host&&(d||a.port===A.port)))(new URL(_c.origin),_c.navigator&&/(msie|trident)/i.test(_c.navigator.userAgent)):()=>!0,Ok=_c.hasStandardBrowserEnv?{write(a,d,A,U,ae,O){const E=[a+"="+encodeURIComponent(d)];Bn.isNumber(A)&&E.push("expires="+new Date(A).toGMTString()),Bn.isString(U)&&E.push("path="+U),Bn.isString(ae)&&E.push("domain="+ae),O===!0&&E.push("secure"),document.cookie=E.join("; ")},read(a){const d=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Nk(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function Rk(a,d){return d?a.replace(/\/?\/$/,"")+"/"+d.replace(/^\/+/,""):a}function A2(a,d,A){let U=!Nk(d);return a&&(U||A==!1)?Rk(a,d):d}const E2=a=>a instanceof $c?{...a}:a;function xh(a,d){d=d||{};const A={};function U(u,e,b,f){return Bn.isPlainObject(u)&&Bn.isPlainObject(e)?Bn.merge.call({caseless:f},u,e):Bn.isPlainObject(e)?Bn.merge({},e):Bn.isArray(e)?e.slice():e}function ae(u,e,b,f){if(Bn.isUndefined(e)){if(!Bn.isUndefined(u))return U(void 0,u,b,f)}else return U(u,e,b,f)}function O(u,e){if(!Bn.isUndefined(e))return U(void 0,e)}function E(u,e){if(Bn.isUndefined(e)){if(!Bn.isUndefined(u))return U(void 0,u)}else return U(void 0,e)}function t(u,e,b){if(b in d)return U(u,e);if(b in a)return U(void 0,u)}const x={url:O,method:O,data:O,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:t,headers:(u,e,b)=>ae(E2(u),E2(e),b,!0)};return Bn.forEach(Object.keys(Object.assign({},a,d)),function(u){const e=x[u]||ae,b=e(a[u],d[u],u);Bn.isUndefined(b)&&e!==t||(A[u]=b)}),A}const C2=a=>{const d=xh({},a);let{data:A,withXSRFToken:U,xsrfHeaderName:ae,xsrfCookieName:O,headers:E,auth:t}=d;d.headers=E=$c.from(E),d.url=y2(A2(d.baseURL,d.url,d.allowAbsoluteUrls),a.params,a.paramsSerializer),t&&E.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):"")));let x;if(Bn.isFormData(A)){if(_c.hasStandardBrowserEnv||_c.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if((x=E.getContentType())!==!1){const[u,...e]=x?x.split(";").map(b=>b.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...e].join("; "))}}if(_c.hasStandardBrowserEnv&&(U&&Bn.isFunction(U)&&(U=U(d)),U||U!==!1&&zk(d.url))){const u=ae&&O&&Ok.read(O);u&&E.set(ae,u)}return d},Dk=typeof XMLHttpRequest<"u",Ik=Dk&&function(a){return new Promise(function(d,A){const U=C2(a);let ae=U.data;const O=$c.from(U.headers).normalize();let{responseType:E,onUploadProgress:t,onDownloadProgress:x}=U,u,e,b,f,v;function h(){f&&f(),v&&v(),U.cancelToken&&U.cancelToken.unsubscribe(u),U.signal&&U.signal.removeEventListener("abort",u)}let r=new XMLHttpRequest;r.open(U.method.toUpperCase(),U.url,!0),r.timeout=U.timeout;function n(){if(!r)return;const o=$c.from("getAllResponseHeaders"in r&&r.getAllResponseHeaders()),l={data:!E||E==="text"||E==="json"?r.responseText:r.response,status:r.status,statusText:r.statusText,headers:o,config:a,request:r};k2(function(p){d(p),h()},function(p){A(p),h()},l),r=null}"onloadend"in r?r.onloadend=n:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(n)},r.onabort=function(){r&&(A(new ci("Request aborted",ci.ECONNABORTED,a,r)),r=null)},r.onerror=function(){A(new ci("Network Error",ci.ERR_NETWORK,a,r)),r=null},r.ontimeout=function(){let o=U.timeout?"timeout of "+U.timeout+"ms exceeded":"timeout exceeded";const l=U.transitional||b2;U.timeoutErrorMessage&&(o=U.timeoutErrorMessage),A(new ci(o,l.clarifyTimeoutError?ci.ETIMEDOUT:ci.ECONNABORTED,a,r)),r=null},ae===void 0&&O.setContentType(null),"setRequestHeader"in r&&Bn.forEach(O.toJSON(),function(o,l){r.setRequestHeader(l,o)}),Bn.isUndefined(U.withCredentials)||(r.withCredentials=!!U.withCredentials),E&&E!=="json"&&(r.responseType=U.responseType),x&&([b,v]=Bm(x,!0),r.addEventListener("progress",b)),t&&r.upload&&([e,f]=Bm(t),r.upload.addEventListener("progress",e),r.upload.addEventListener("loadend",f)),(U.cancelToken||U.signal)&&(u=o=>{r&&(A(!o||o.type?new hp(null,a,r):o),r.abort(),r=null)},U.cancelToken&&U.cancelToken.subscribe(u),U.signal&&(U.signal.aborted?u():U.signal.addEventListener("abort",u)));const c=Mk(U.url);if(c&&_c.protocols.indexOf(c)===-1){A(new ci("Unsupported protocol "+c+":",ci.ERR_BAD_REQUEST,a));return}r.send(ae||null)})},Fk=(a,d)=>{const{length:A}=a=a?a.filter(Boolean):[];if(d||A){let U=new AbortController,ae;const O=function(u){if(!ae){ae=!0,t();const e=u instanceof Error?u:this.reason;U.abort(e instanceof ci?e:new hp(e instanceof Error?e.message:e))}};let E=d&&setTimeout(()=>{E=null,O(new ci(`timeout ${d} of ms exceeded`,ci.ETIMEDOUT))},d);const t=()=>{a&&(E&&clearTimeout(E),E=null,a.forEach(u=>{u.unsubscribe?u.unsubscribe(O):u.removeEventListener("abort",O)}),a=null)};a.forEach(u=>u.addEventListener("abort",O));const{signal:x}=U;return x.unsubscribe=()=>Bn.asap(t),x}},Vk=function*(a,d){let A=a.byteLength;if(A<d){yield a;return}let U=0,ae;for(;U<A;)ae=U+d,yield a.slice(U,ae),U=ae},Bk=async function*(a,d){for await(const A of Uk(a))yield*Vk(A,d)},Uk=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const d=a.getReader();try{for(;;){const{done:A,value:U}=await d.read();if(A)break;yield U}}finally{await d.cancel()}},M2=(a,d,A,U)=>{const ae=Bk(a,d);let O=0,E,t=x=>{E||(E=!0,U&&U(x))};return new ReadableStream({async pull(x){try{const{done:u,value:e}=await ae.next();if(u){t(),x.close();return}let b=e.byteLength;if(A){let f=O+=b;A(f)}x.enqueue(new Uint8Array(e))}catch(u){throw t(u),u}},cancel(x){return t(x),ae.return()}},{highWaterMark:2})},Um=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",P2=Um&&typeof ReadableStream=="function",jk=Um&&(typeof TextEncoder=="function"?(a=>d=>a.encode(d))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),L2=(a,...d)=>{try{return!!a(...d)}catch{return!1}},qk=P2&&L2(()=>{let a=!1;const d=new Request(_c.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!d}),z2=64*1024,Wy=P2&&L2(()=>Bn.isReadableStream(new Response("").body)),jm={stream:Wy&&(a=>a.body)};Um&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!jm[d]&&(jm[d]=Bn.isFunction(a[d])?A=>A[d]():(A,U)=>{throw new ci(`Response type '${d}' is not supported`,ci.ERR_NOT_SUPPORT,U)})})})(new Response);const Wk=async a=>{if(a==null)return 0;if(Bn.isBlob(a))return a.size;if(Bn.isSpecCompliantForm(a))return(await new Request(_c.origin,{method:"POST",body:a}).arrayBuffer()).byteLength;if(Bn.isArrayBufferView(a)||Bn.isArrayBuffer(a))return a.byteLength;if(Bn.isURLSearchParams(a)&&(a=a+""),Bn.isString(a))return(await jk(a)).byteLength},Hk=async(a,d)=>Bn.toFiniteNumber(a.getContentLength())??Wk(d),Gk=Um&&(async a=>{let{url:d,method:A,data:U,signal:ae,cancelToken:O,timeout:E,onDownloadProgress:t,onUploadProgress:x,responseType:u,headers:e,withCredentials:b="same-origin",fetchOptions:f}=C2(a);u=u?(u+"").toLowerCase():"text";let v=Fk([ae,O&&O.toAbortSignal()],E),h;const r=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let n;try{if(x&&qk&&A!=="get"&&A!=="head"&&(n=await Hk(e,U))!==0){let m=new Request(d,{method:"POST",body:U,duplex:"half"}),w;if(Bn.isFormData(U)&&(w=m.headers.get("content-type"))&&e.setContentType(w),m.body){const[T,k]=T2(n,Bm(S2(x)));U=M2(m.body,z2,T,k)}}Bn.isString(b)||(b=b?"include":"omit");const c="credentials"in Request.prototype;h=new Request(d,{...f,signal:v,method:A.toUpperCase(),headers:e.normalize().toJSON(),body:U,duplex:"half",credentials:c?b:void 0});let o=await fetch(h,f);const l=Wy&&(u==="stream"||u==="response");if(Wy&&(t||l&&r)){const m={};["status","statusText","headers"].forEach(M=>{m[M]=o[M]});const w=Bn.toFiniteNumber(o.headers.get("content-length")),[T,k]=t&&T2(w,Bm(S2(t),!0))||[];o=new Response(M2(o.body,z2,T,()=>{k&&k(),r&&r()}),m)}u=u||"text";let p=await jm[Bn.findKey(jm,u)||"text"](o,a);return!l&&r&&r(),await new Promise((m,w)=>{k2(m,w,{data:p,headers:$c.from(o.headers),status:o.status,statusText:o.statusText,config:a,request:h})})}catch(c){throw r&&r(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new ci("Network Error",ci.ERR_NETWORK,a,h),{cause:c.cause||c}):ci.from(c,c&&c.code,a,h)}}),Hy={http:sk,xhr:Ik,fetch:Gk};Bn.forEach(Hy,(a,d)=>{if(a){try{Object.defineProperty(a,"name",{value:d})}catch{}Object.defineProperty(a,"adapterName",{value:d})}});const O2=a=>`- ${a}`,Xk=a=>Bn.isFunction(a)||a===null||a===!1,N2={getAdapter:a=>{a=Bn.isArray(a)?a:[a];const{length:d}=a;let A,U;const ae={};for(let O=0;O<d;O++){A=a[O];let E;if(U=A,!Xk(A)&&(U=Hy[(E=String(A)).toLowerCase()],U===void 0))throw new ci(`Unknown adapter '${E}'`);if(U)break;ae[E||"#"+O]=U}if(!U){const O=Object.entries(ae).map(([t,x])=>`adapter ${t} `+(x===!1?"is not supported by the environment":"is not available in the build"));let E=d?O.length>1?`since :
|
|
4033
|
+
`+O.map(O2).join(`
|
|
4034
|
+
`):" "+O2(O[0]):"as no adapter specified";throw new ci("There is no suitable adapter to dispatch the request "+E,"ERR_NOT_SUPPORT")}return U},adapters:Hy};function Gy(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new hp(null,a)}function R2(a){return Gy(a),a.headers=$c.from(a.headers),a.data=qy.call(a,a.transformRequest),["post","put","patch"].indexOf(a.method)!==-1&&a.headers.setContentType("application/x-www-form-urlencoded",!1),N2.getAdapter(a.adapter||sf.adapter)(a).then(function(d){return Gy(a),d.data=qy.call(a,a.transformResponse,d),d.headers=$c.from(d.headers),d},function(d){return w2(d)||(Gy(a),d&&d.response&&(d.response.data=qy.call(a,a.transformResponse,d.response),d.response.headers=$c.from(d.response.headers))),Promise.reject(d)})}const D2="1.10.0",qm={};["object","boolean","number","function","string","symbol"].forEach((a,d)=>{qm[a]=function(A){return typeof A===a||"a"+(d<1?"n ":" ")+a}});const I2={};qm.transitional=function(a,d,A){function U(ae,O){return"[Axios v"+D2+"] Transitional option '"+ae+"'"+O+(A?". "+A:"")}return(ae,O,E)=>{if(a===!1)throw new ci(U(O," has been removed"+(d?" in "+d:"")),ci.ERR_DEPRECATED);return d&&!I2[O]&&(I2[O]=!0,console.warn(U(O," has been deprecated since v"+d+" and will be removed in the near future"))),a?a(ae,O,E):!0}},qm.spelling=function(a){return(d,A)=>(console.warn(`${A} is likely a misspelling of ${a}`),!0)};function Kk(a,d,A){if(typeof a!="object")throw new ci("options must be an object",ci.ERR_BAD_OPTION_VALUE);const U=Object.keys(a);let ae=U.length;for(;ae-- >0;){const O=U[ae],E=d[O];if(E){const t=a[O],x=t===void 0||E(t,O,a);if(x!==!0)throw new ci("option "+O+" must be "+x,ci.ERR_BAD_OPTION_VALUE);continue}if(A!==!0)throw new ci("Unknown option "+O,ci.ERR_BAD_OPTION)}}const Wm={assertOptions:Kk,validators:qm},nd=Wm.validators;let _h=class{constructor(a){this.defaults=a||{},this.interceptors={request:new v2,response:new v2}}async request(a,d){try{return await this._request(a,d)}catch(A){if(A instanceof Error){let U={};Error.captureStackTrace?Error.captureStackTrace(U):U=new Error;const ae=U.stack?U.stack.replace(/^.+\n/,""):"";try{A.stack?ae&&!String(A.stack).endsWith(ae.replace(/^.+\n.+\n/,""))&&(A.stack+=`
|
|
4035
|
+
`+ae):A.stack=ae}catch{}}throw A}}_request(a,d){typeof a=="string"?(d=d||{},d.url=a):d=a||{},d=xh(this.defaults,d);const{transitional:A,paramsSerializer:U,headers:ae}=d;A!==void 0&&Wm.assertOptions(A,{silentJSONParsing:nd.transitional(nd.boolean),forcedJSONParsing:nd.transitional(nd.boolean),clarifyTimeoutError:nd.transitional(nd.boolean)},!1),U!=null&&(Bn.isFunction(U)?d.paramsSerializer={serialize:U}:Wm.assertOptions(U,{encode:nd.function,serialize:nd.function},!0)),d.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?d.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:d.allowAbsoluteUrls=!0),Wm.assertOptions(d,{baseUrl:nd.spelling("baseURL"),withXsrfToken:nd.spelling("withXSRFToken")},!0),d.method=(d.method||this.defaults.method||"get").toLowerCase();let O=ae&&Bn.merge(ae.common,ae[d.method]);ae&&Bn.forEach(["delete","get","head","post","put","patch","common"],v=>{delete ae[v]}),d.headers=$c.concat(O,ae);const E=[];let t=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(d)===!1||(t=t&&v.synchronous,E.unshift(v.fulfilled,v.rejected))});const x=[];this.interceptors.response.forEach(function(v){x.push(v.fulfilled,v.rejected)});let u,e=0,b;if(!t){const v=[R2.bind(this),void 0];for(v.unshift.apply(v,E),v.push.apply(v,x),b=v.length,u=Promise.resolve(d);e<b;)u=u.then(v[e++],v[e++]);return u}b=E.length;let f=d;for(e=0;e<b;){const v=E[e++],h=E[e++];try{f=v(f)}catch(r){h.call(this,r);break}}try{u=R2.call(this,f)}catch(v){return Promise.reject(v)}for(e=0,b=x.length;e<b;)u=u.then(x[e++],x[e++]);return u}getUri(a){a=xh(this.defaults,a);const d=A2(a.baseURL,a.url,a.allowAbsoluteUrls);return y2(d,a.params,a.paramsSerializer)}};Bn.forEach(["delete","get","head","options"],function(a){_h.prototype[a]=function(d,A){return this.request(xh(A||{},{method:a,url:d,data:(A||{}).data}))}}),Bn.forEach(["post","put","patch"],function(a){function d(A){return function(U,ae,O){return this.request(xh(O||{},{method:a,headers:A?{"Content-Type":"multipart/form-data"}:{},url:U,data:ae}))}}_h.prototype[a]=d(),_h.prototype[a+"Form"]=d(!0)});let Jk=class H4{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let A;this.promise=new Promise(function(ae){A=ae});const U=this;this.promise.then(ae=>{if(!U._listeners)return;let O=U._listeners.length;for(;O-- >0;)U._listeners[O](ae);U._listeners=null}),this.promise.then=ae=>{let O;const E=new Promise(t=>{U.subscribe(t),O=t}).then(ae);return E.cancel=function(){U.unsubscribe(O)},E},d(function(ae,O,E){U.reason||(U.reason=new hp(ae,O,E),A(U.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const A=this._listeners.indexOf(d);A!==-1&&this._listeners.splice(A,1)}toAbortSignal(){const d=new AbortController,A=U=>{d.abort(U)};return this.subscribe(A),d.signal.unsubscribe=()=>this.unsubscribe(A),d.signal}static source(){let d;return{token:new H4(function(A){d=A}),cancel:d}}};function $k(a){return function(d){return a.apply(null,d)}}function Zk(a){return Bn.isObject(a)&&a.isAxiosError===!0}const Xy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xy).forEach(([a,d])=>{Xy[d]=a});function F2(a){const d=new _h(a),A=r2(_h.prototype.request,d);return Bn.extend(A,_h.prototype,d,{allOwnKeys:!0}),Bn.extend(A,d,null,{allOwnKeys:!0}),A.create=function(U){return F2(xh(a,U))},A}const bs=F2(sf);bs.Axios=_h,bs.CanceledError=hp,bs.CancelToken=Jk,bs.isCancel=w2,bs.VERSION=D2,bs.toFormData=Fm,bs.AxiosError=ci,bs.Cancel=bs.CanceledError,bs.all=function(a){return Promise.all(a)},bs.spread=$k,bs.isAxiosError=Zk,bs.mergeConfig=xh,bs.AxiosHeaders=$c,bs.formToJSON=a=>x2(Bn.isHTMLForm(a)?new FormData(a):a),bs.getAdapter=N2.getAdapter,bs.HttpStatusCode=Xy,bs.default=bs;const{Axios:ppe,AxiosError:fpe,CanceledError:mpe,isCancel:gpe,CancelToken:ype,VERSION:vpe,all:bpe,Cancel:xpe,isAxiosError:_pe,spread:wpe,toFormData:kpe,AxiosHeaders:Tpe,HttpStatusCode:Spe,formToJSON:Ape,getAdapter:Epe,mergeConfig:Cpe}=bs;function Yk(a){return a.reduce((d,A,U)=>(d[A]=U,d),{})}const Qk=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let Ky=null;function eT(){return Ky||(Ky=Yk(Qk)),Ky}const tT={class:"volumetric-section-container"},rT={key:0,class:"volumetric-section-container__title"},nT={class:"volumetric-section-container__switch"},aT={class:"volumetric-section-container__attack-direction"},iT={class:"volumetric-section-container__field"},oT={__name:"GSC-VolumetricField",props:{game:{type:Object,default:()=>({gameId:90209,id:90209,seasonId:1943,regularSeasonId:1933,matchday_name:"Playoffs 6",status:1,score:[2,0],game_status:1,dateTimeUTC:"2025-05-26T00:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2.png",team_id:2,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2.png",colloquial_name:"América",acronym:"AME",team_name:"America"},is_live:0,minutes:{home_goals_minutes:["L. Garcia 65'","A. Vega 82'"],visiting_goals_minutes:[],home_yellow_cards_minutes:["L. Garcia 90'","A. Vega 90 + 3'"],away_yellow_cards_minutes:["S. Caceres 78'"],home_red_cards_minutes:[],away_red_cards_minutes:[]}})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2},areTeamsVisible:{type:Boolean,default:!0},isTitleVisible:{type:Boolean,default:!0},isGhostEffect:{type:Boolean,default:!1},preMatchType:{type:Number,default:0}},setup(a){const d=eT(),A=new Set([2,20,308,310]),U=new Set([3,21,309]),ae=new Set([...A,...U]);let O=null;const E=a,t=g.ref(0),x=g.ref(new Map),u=g.ref({teamId:0}),e=g.computed(()=>[{teamId:E.game.homeTeam.team_id,text:E.game.homeTeam.colloquial_name,img:E.game.homeTeam.logo,isHomeTeam:!0},{teamId:E.game.awayTeam.team_id,text:E.game.awayTeam.colloquial_name,img:E.game.awayTeam.logo,isHomeTeam:!1}]),b=g.computed(()=>x.value.get(E.isGamePreMatch?E.teamSelectedPreMatch.teamId:u.value.teamId)||[]);g.watch(()=>e.value,()=>{f()},{immediate:!0}),g.watch(()=>E.preMatchType,()=>{f()},{immediate:!0}),g.watch(()=>E.game.gameId,p=>{p&&(l(),h())},{immediate:!0});function f(){t.value=0,u.value=E.preMatchType?E.preMatchType===1?e.value[0]:e.value[1]:e.value[t.value]}function v(){O=setInterval(()=>{h()},1e3*60*E.volumetricFieldIntervalMinutes)}async function h(p=!1){try{const m=await n();x.value.set(E.game.homeTeam.team_id,m.homeTeam),x.value.set(E.game.awayTeam.team_id,m.awayTeam),p&&v()}catch(m){throw new Error(m)}}function r(p){return E.game.game_status===4&&!E.game.is_live?p[d.gameId]!==E.game.gameId:p[d.gameId]===E.game.gameId}async function n(p=0){try{let m={homeTeam:[],awayTeam:[]};if(E.game.is_live||E.game.game_status===0){const w=await bs.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${E.game.gameId}`),T=w.data?w.data.data||[]:[],k=new Set;T.forEach(M=>{k.add(M[d.categoryId]),M[d.teamId]===E.game.homeTeam.team_id&&ae.has(M[d.categoryId])&&r(M)?(c(M),m.homeTeam.push(M)):M[d.teamId]===E.game.awayTeam.team_id&&ae.has(M[d.categoryId])&&r(M)&&(M[d.coordinate1Y]=1-M[d.coordinate1Y],M[d.coordinate2Y]=1-M[d.coordinate2Y],M[d.coordinate3Y]=1-M[d.coordinate3Y],M[d.coordinate1X]=1-M[d.coordinate1X],M[d.coordinate2X]=1-M[d.coordinate2X],M[d.coordinate3X]=1-M[d.coordinate3X],c(M),m.awayTeam.push(M))})}else{const[w,T]=await Promise.all([bs.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${p||E.game.seasonId}-${E.game.homeTeam.team_id}.json`,{headers:{Authorization:E.token||""}}),bs.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${p||E.game.seasonId}-${E.game.awayTeam.team_id}.json`,{headers:{Authorization:E.token||""}})]);if(!w.data.data.posession.length&&!T.data.data.posession.length&&!p)return n(E.game.regularSeasonId);m={homeTeam:w.data.data.posession.filter(k=>k[d.teamId]===E.game.homeTeam.team_id&&ae.has(k[d.categoryId])&&r(k)),awayTeam:T.data.data.posession.filter(k=>k[d.teamId]===E.game.awayTeam.team_id&&ae.has(k[d.categoryId])&&r(k)?(k[d.coordinate1Y]=1-k[d.coordinate1Y],k[d.coordinate2Y]=1-k[d.coordinate2Y],k[d.coordinate3Y]=1-k[d.coordinate3Y],k[d.coordinate1X]=1-k[d.coordinate1X],k[d.coordinate2X]=1-k[d.coordinate2X],k[d.coordinate3X]=1-k[d.coordinate3X],!0):!1)}}return m}catch(m){throw new Error(m)}}function c(p){const m=p[d.coordinate1X],w=p[d.coordinate2X],T=p[d.coordinate3X];return p[d.coordinate1X]=p[d.coordinate1Y],p[d.coordinate2X]=p[d.coordinate2Y],p[d.coordinate3X]=p[d.coordinate3Y],p[d.coordinate1Y]=m,p[d.coordinate2Y]=w,p[d.coordinate3Y]=T,p}function o(p){t.value=p.index,u.value=p.button}function l(){O&&clearInterval(O)}return g.onUnmounted(()=>{l()}),(p,m)=>(g.openBlock(),g.createElementBlock("div",tT,[a.isTitleVisible?(g.openBlock(),g.createElementBlock("div",rT,"Volumétrica")):g.createCommentVNode("",!0),g.withDirectives(g.createElementVNode("div",nT,[g.createVNode(d6,{"selected-button-index":t.value,buttons:e.value,width:"320px","border-radius":"16px",onChange:o},null,8,["selected-button-index","buttons"])],512),[[g.vShow,!a.isGamePreMatch&&a.areTeamsVisible]]),g.createElementVNode("div",aT,[g.createVNode(_6,{team:a.isGamePreMatch?a.teamSelectedPreMatch:u.value},null,8,["team"])]),g.createElementVNode("div",iT,[g.createVNode(b6,{"passes-plays":b.value,"play-indexes":g.unref(d),"is-ghost-effect":a.isGhostEffect},null,8,["passes-plays","play-indexes","is-ghost-effect"])])]))}},V2=zm(oT,[["__scopeId","data-v-342cdb73"]]);function B2(a,d){return function(){return a.apply(d,arguments)}}const{toString:sT}=Object.prototype,{getPrototypeOf:Jy}=Object,{iterator:Hm,toStringTag:U2}=Symbol,Gm=(a=>d=>{const A=sT.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Iu=a=>(a=a.toLowerCase(),d=>Gm(d)===a),Xm=a=>d=>typeof d===a,{isArray:pp}=Array,cf=Xm("undefined");function lT(a){return a!==null&&!cf(a)&&a.constructor!==null&&!cf(a.constructor)&&Zc(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const j2=Iu("ArrayBuffer");function cT(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&j2(a.buffer),d}const uT=Xm("string"),Zc=Xm("function"),q2=Xm("number"),Km=a=>a!==null&&typeof a=="object",dT=a=>a===!0||a===!1,Jm=a=>{if(Gm(a)!=="object")return!1;const d=Jy(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(U2 in a)&&!(Hm in a)},hT=Iu("Date"),pT=Iu("File"),fT=Iu("Blob"),mT=Iu("FileList"),gT=a=>Km(a)&&Zc(a.pipe),yT=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||Zc(a.append)&&((d=Gm(a))==="formdata"||d==="object"&&Zc(a.toString)&&a.toString()==="[object FormData]"))},vT=Iu("URLSearchParams"),[bT,xT,_T,wT]=["ReadableStream","Request","Response","Headers"].map(Iu),kT=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uf(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),pp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function W2(a,d){d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const wh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,H2=a=>!cf(a)&&a!==wh;function $y(){const{caseless:a}=H2(this)&&this||{},d={},A=(U,ae)=>{const O=a&&W2(d,ae)||ae;Jm(d[O])&&Jm(U)?d[O]=$y(d[O],U):Jm(U)?d[O]=$y({},U):pp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&uf(arguments[U],A);return d}const TT=(a,d,A,{allOwnKeys:U}={})=>(uf(d,(ae,O)=>{A&&Zc(ae)?a[O]=B2(ae,A):a[O]=ae},{allOwnKeys:U}),a),ST=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),AT=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},ET=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&Jy(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},CT=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},MT=a=>{if(!a)return null;if(pp(a))return a;let d=a.length;if(!q2(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},PT=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&Jy(Uint8Array)),LT=(a,d)=>{const A=(a&&a[Hm]).call(a);let U;for(;(U=A.next())&&!U.done;){const ae=U.value;d.call(a,ae[0],ae[1])}},zT=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},OT=Iu("HTMLFormElement"),NT=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,A,U){return A.toUpperCase()+U}),G2=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),RT=Iu("RegExp"),X2=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};uf(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},DT=a=>{X2(a,(d,A)=>{if(Zc(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(Zc(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},IT=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return pp(a)?U(a):U(String(a).split(d)),A},FT=()=>{},VT=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function BT(a){return!!(a&&Zc(a.append)&&a[U2]==="FormData"&&a[Hm])}const UT=a=>{const d=new Array(10),A=(U,ae)=>{if(Km(U)){if(d.indexOf(U)>=0)return;if(!("toJSON"in U)){d[ae]=U;const O=pp(U)?[]:{};return uf(U,(E,t)=>{const x=A(E,ae+1);!cf(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},jT=Iu("AsyncFunction"),qT=a=>a&&(Km(a)||Zc(a))&&Zc(a.then)&&Zc(a.catch),K2=((a,d)=>a?setImmediate:d?((A,U)=>(wh.addEventListener("message",({source:ae,data:O})=>{ae===wh&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),wh.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",Zc(wh.postMessage)),WT=typeof queueMicrotask<"u"?queueMicrotask.bind(wh):typeof process<"u"&&process.nextTick||K2,HT=a=>a!=null&&Zc(a[Hm]),Un={isArray:pp,isArrayBuffer:j2,isBuffer:lT,isFormData:yT,isArrayBufferView:cT,isString:uT,isNumber:q2,isBoolean:dT,isObject:Km,isPlainObject:Jm,isReadableStream:bT,isRequest:xT,isResponse:_T,isHeaders:wT,isUndefined:cf,isDate:hT,isFile:pT,isBlob:fT,isRegExp:RT,isFunction:Zc,isStream:gT,isURLSearchParams:vT,isTypedArray:PT,isFileList:mT,forEach:uf,merge:$y,extend:TT,trim:kT,stripBOM:ST,inherits:AT,toFlatObject:ET,kindOf:Gm,kindOfTest:Iu,endsWith:CT,toArray:MT,forEachEntry:LT,matchAll:zT,isHTMLForm:OT,hasOwnProperty:G2,hasOwnProp:G2,reduceDescriptors:X2,freezeMethods:DT,toObjectSet:IT,toCamelCase:NT,noop:FT,toFiniteNumber:VT,findKey:W2,global:wh,isContextDefined:H2,isSpecCompliantForm:BT,toJSONObject:UT,isAsyncFn:jT,isThenable:qT,setImmediate:K2,asap:WT,isIterable:HT};function ui(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}Un.inherits(ui,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:Un.toJSONObject(this.config),code:this.code,status:this.status}}});const J2=ui.prototype,$2={};["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(a=>{$2[a]={value:a}}),Object.defineProperties(ui,$2),Object.defineProperty(J2,"isAxiosError",{value:!0}),ui.from=(a,d,A,U,ae,O)=>{const E=Object.create(J2);return Un.toFlatObject(a,E,function(t){return t!==Error.prototype},t=>t!=="isAxiosError"),ui.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const GT=null;function Zy(a){return Un.isPlainObject(a)||Un.isArray(a)}function Z2(a){return Un.endsWith(a,"[]")?a.slice(0,-2):a}function Y2(a,d,A){return a?a.concat(d).map(function(U,ae){return U=Z2(U),!A&&ae?"["+U+"]":U}).join(A?".":""):d}function XT(a){return Un.isArray(a)&&!a.some(Zy)}const KT=Un.toFlatObject(Un,{},null,function(a){return/^is[A-Z]/.test(a)});function $m(a,d,A){if(!Un.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=Un.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,h){return!Un.isUndefined(h[v])});const U=A.metaTokens,ae=A.visitor||u,O=A.dots,E=A.indexes,t=(A.Blob||typeof Blob<"u"&&Blob)&&Un.isSpecCompliantForm(d);if(!Un.isFunction(ae))throw new TypeError("visitor must be a function");function x(v){if(v===null)return"";if(Un.isDate(v))return v.toISOString();if(Un.isBoolean(v))return v.toString();if(!t&&Un.isBlob(v))throw new ui("Blob is not supported. Use a Buffer instead.");return Un.isArrayBuffer(v)||Un.isTypedArray(v)?t&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,h,r){let n=v;if(v&&!r&&typeof v=="object"){if(Un.endsWith(h,"{}"))h=U?h:h.slice(0,-2),v=JSON.stringify(v);else if(Un.isArray(v)&&XT(v)||(Un.isFileList(v)||Un.endsWith(h,"[]"))&&(n=Un.toArray(v)))return h=Z2(h),n.forEach(function(c,o){!(Un.isUndefined(c)||c===null)&&d.append(E===!0?Y2([h],o,O):E===null?h:h+"[]",x(c))}),!1}return Zy(v)?!0:(d.append(Y2(r,h,O),x(v)),!1)}const e=[],b=Object.assign(KT,{defaultVisitor:u,convertValue:x,isVisitable:Zy});function f(v,h){if(!Un.isUndefined(v)){if(e.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));e.push(v),Un.forEach(v,function(r,n){(!(Un.isUndefined(r)||r===null)&&ae.call(d,r,Un.isString(n)?n.trim():n,h,b))===!0&&f(r,h?h.concat(n):[n])}),e.pop()}}if(!Un.isObject(a))throw new TypeError("data must be an object");return f(a),d}function Q2(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(A){return d[A]})}function Yy(a,d){this._pairs=[],a&&$m(a,this,d)}const ex=Yy.prototype;ex.append=function(a,d){this._pairs.push([a,d])},ex.toString=function(a){const d=a?function(A){return a.call(this,A,Q2)}:Q2;return this._pairs.map(function(A){return d(A[0])+"="+d(A[1])},"").join("&")};function JT(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tx(a,d,A){if(!d)return a;const U=A&&A.encode||JT;Un.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=Un.isURLSearchParams(d)?d.toString():new Yy(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}let rx=class{constructor(){this.handlers=[]}use(a,d,A){return this.handlers.push({fulfilled:a,rejected:d,synchronous:A?A.synchronous:!1,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){Un.forEach(this.handlers,function(d){d!==null&&a(d)})}};const nx={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$T=typeof URLSearchParams<"u"?URLSearchParams:Yy,ZT=typeof FormData<"u"?FormData:null,YT=typeof Blob<"u"?Blob:null,QT={isBrowser:!0,classes:{URLSearchParams:$T,FormData:ZT,Blob:YT},protocols:["http","https","file","blob","url","data"]},Qy=typeof window<"u"&&typeof document<"u",e1=typeof navigator=="object"&&navigator||void 0,e8=Qy&&(!e1||["ReactNative","NativeScript","NS"].indexOf(e1.product)<0),t8=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",r8=Qy&&window.location.href||"http://localhost",n8=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qy,hasStandardBrowserEnv:e8,hasStandardBrowserWebWorkerEnv:t8,navigator:e1,origin:r8},Symbol.toStringTag,{value:"Module"})),wc={...n8,...QT};function a8(a,d){return $m(a,new wc.classes.URLSearchParams,Object.assign({visitor:function(A,U,ae,O){return wc.isNode&&Un.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)}},d))}function i8(a){return Un.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function o8(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function ax(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&Un.isArray(ae)?ae.length:E,x?(Un.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!Un.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&Un.isArray(ae[E])&&(ae[E]=o8(ae[E])),!t)}if(Un.isFormData(a)&&Un.isFunction(a.entries)){const A={};return Un.forEachEntry(a,(U,ae)=>{d(i8(U),ae,A,0)}),A}return null}function s8(a,d,A){if(Un.isString(a))try{return(d||JSON.parse)(a),Un.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const df={transitional:nx,adapter:["xhr","http","fetch"],transformRequest:[function(a,d){const A=d.getContentType()||"",U=A.indexOf("application/json")>-1,ae=Un.isObject(a);if(ae&&Un.isHTMLForm(a)&&(a=new FormData(a)),Un.isFormData(a))return U?JSON.stringify(ax(a)):a;if(Un.isArrayBuffer(a)||Un.isBuffer(a)||Un.isStream(a)||Un.isFile(a)||Un.isBlob(a)||Un.isReadableStream(a))return a;if(Un.isArrayBufferView(a))return a.buffer;if(Un.isURLSearchParams(a))return d.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let O;if(ae){if(A.indexOf("application/x-www-form-urlencoded")>-1)return a8(a,this.formSerializer).toString();if((O=Un.isFileList(a))||A.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return $m(O?{"files[]":a}:a,E&&new E,this.formSerializer)}}return ae||U?(d.setContentType("application/json",!1),s8(a)):a}],transformResponse:[function(a){const d=this.transitional||df.transitional,A=d&&d.forcedJSONParsing,U=this.responseType==="json";if(Un.isResponse(a)||Un.isReadableStream(a))return a;if(a&&Un.isString(a)&&(A&&!this.responseType||U)){const ae=!(d&&d.silentJSONParsing)&&U;try{return JSON.parse(a)}catch(O){if(ae)throw O.name==="SyntaxError"?ui.from(O,ui.ERR_BAD_RESPONSE,this,null,this.response):O}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wc.classes.FormData,Blob:wc.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Un.forEach(["delete","get","head","post","put","patch"],a=>{df.headers[a]={}});const l8=Un.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"]),c8=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4036
|
+
`).forEach(function(O){ae=O.indexOf(":"),A=O.substring(0,ae).trim().toLowerCase(),U=O.substring(ae+1).trim(),!(!A||d[A]&&l8[A])&&(A==="set-cookie"?d[A]?d[A].push(U):d[A]=[U]:d[A]=d[A]?d[A]+", "+U:U)}),d},ix=Symbol("internals");function hf(a){return a&&String(a).trim().toLowerCase()}function Zm(a){return a===!1||a==null?a:Un.isArray(a)?a.map(Zm):String(a)}function u8(a){const d=Object.create(null),A=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let U;for(;U=A.exec(a);)d[U[1]]=U[2];return d}const d8=a=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());function t1(a,d,A,U,ae){if(Un.isFunction(U))return U.call(this,d,A);if(ae&&(d=A),!!Un.isString(d)){if(Un.isString(U))return d.indexOf(U)!==-1;if(Un.isRegExp(U))return U.test(d)}}function h8(a){return a.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(d,A,U)=>A.toUpperCase()+U)}function p8(a,d){const A=Un.toCamelCase(" "+d);["get","set","has"].forEach(U=>{Object.defineProperty(a,U+A,{value:function(ae,O,E){return this[U].call(this,d,ae,O,E)},configurable:!0})})}let Yc=class{constructor(a){a&&this.set(a)}set(a,d,A){const U=this;function ae(E,t,x){const u=hf(t);if(!u)throw new Error("header name must be a non-empty string");const e=Un.findKey(U,u);(!e||U[e]===void 0||x===!0||x===void 0&&U[e]!==!1)&&(U[e||t]=Zm(E))}const O=(E,t)=>Un.forEach(E,(x,u)=>ae(x,u,t));if(Un.isPlainObject(a)||a instanceof this.constructor)O(a,d);else if(Un.isString(a)&&(a=a.trim())&&!d8(a))O(c8(a),d);else if(Un.isObject(a)&&Un.isIterable(a)){let E={},t,x;for(const u of a){if(!Un.isArray(u))throw TypeError("Object iterator must return a key-value pair");E[x=u[0]]=(t=E[x])?Un.isArray(t)?[...t,u[1]]:[t,u[1]]:u[1]}O(E,d)}else a!=null&&ae(d,a,A);return this}get(a,d){if(a=hf(a),a){const A=Un.findKey(this,a);if(A){const U=this[A];if(!d)return U;if(d===!0)return u8(U);if(Un.isFunction(d))return d.call(this,U,A);if(Un.isRegExp(d))return d.exec(U);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,d){if(a=hf(a),a){const A=Un.findKey(this,a);return!!(A&&this[A]!==void 0&&(!d||t1(this,this[A],A,d)))}return!1}delete(a,d){const A=this;let U=!1;function ae(O){if(O=hf(O),O){const E=Un.findKey(A,O);E&&(!d||t1(A,A[E],E,d))&&(delete A[E],U=!0)}}return Un.isArray(a)?a.forEach(ae):ae(a),U}clear(a){const d=Object.keys(this);let A=d.length,U=!1;for(;A--;){const ae=d[A];(!a||t1(this,this[ae],ae,a,!0))&&(delete this[ae],U=!0)}return U}normalize(a){const d=this,A={};return Un.forEach(this,(U,ae)=>{const O=Un.findKey(A,ae);if(O){d[O]=Zm(U),delete d[ae];return}const E=a?h8(ae):String(ae).trim();E!==ae&&delete d[ae],d[E]=Zm(U),A[E]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const d=Object.create(null);return Un.forEach(this,(A,U)=>{A!=null&&A!==!1&&(d[U]=a&&Un.isArray(A)?A.join(", "):A)}),d}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,d])=>a+": "+d).join(`
|
|
4037
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...d){const A=new this(a);return d.forEach(U=>A.set(U)),A}static accessor(a){const d=(this[ix]=this[ix]={accessors:{}}).accessors,A=this.prototype;function U(ae){const O=hf(ae);d[O]||(p8(A,ae),d[O]=!0)}return Un.isArray(a)?a.forEach(U):U(a),this}};Yc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Un.reduceDescriptors(Yc.prototype,({value:a},d)=>{let A=d[0].toUpperCase()+d.slice(1);return{get:()=>a,set(U){this[A]=U}}}),Un.freezeMethods(Yc);function r1(a,d){const A=this||df,U=d||A,ae=Yc.from(U.headers);let O=U.data;return Un.forEach(a,function(E){O=E.call(A,O,ae.normalize(),d?d.status:void 0)}),ae.normalize(),O}function ox(a){return!!(a&&a.__CANCEL__)}function fp(a,d,A){ui.call(this,a??"canceled",ui.ERR_CANCELED,d,A),this.name="CanceledError"}Un.inherits(fp,ui,{__CANCEL__:!0});function sx(a,d,A){const U=A.config.validateStatus;!A.status||!U||U(A.status)?a(A):d(new ui("Request failed with status code "+A.status,[ui.ERR_BAD_REQUEST,ui.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A))}function f8(a){const d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return d&&d[1]||""}function m8(a,d){a=a||10;const A=new Array(a),U=new Array(a);let ae=0,O=0,E;return d=d!==void 0?d:1e3,function(t){const x=Date.now(),u=U[O];E||(E=x),A[ae]=t,U[ae]=x;let e=O,b=0;for(;e!==ae;)b+=A[e++],e=e%a;if(ae=(ae+1)%a,ae===O&&(O=(O+1)%a),x-E<d)return;const f=u&&x-u;return f?Math.round(b*1e3/f):void 0}}function g8(a,d){let A=0,U=1e3/d,ae,O;const E=(t,x=Date.now())=>{A=x,ae=null,O&&(clearTimeout(O),O=null),a.apply(null,t)};return[(...t)=>{const x=Date.now(),u=x-A;u>=U?E(t,x):(ae=t,O||(O=setTimeout(()=>{O=null,E(ae)},U-u)))},()=>ae&&E(ae)]}const Ym=(a,d,A=3)=>{let U=0;const ae=m8(50,250);return g8(O=>{const E=O.loaded,t=O.lengthComputable?O.total:void 0,x=E-U,u=ae(x),e=E<=t;U=E;const b={loaded:E,total:t,progress:t?E/t:void 0,bytes:x,rate:u||void 0,estimated:u&&t&&e?(t-E)/u:void 0,event:O,lengthComputable:t!=null,[d?"download":"upload"]:!0};a(b)},A)},lx=(a,d)=>{const A=a!=null;return[U=>d[0]({lengthComputable:A,total:a,loaded:U}),d[1]]},cx=a=>(...d)=>Un.asap(()=>a(...d)),y8=wc.hasStandardBrowserEnv?((a,d)=>A=>(A=new URL(A,wc.origin),a.protocol===A.protocol&&a.host===A.host&&(d||a.port===A.port)))(new URL(wc.origin),wc.navigator&&/(msie|trident)/i.test(wc.navigator.userAgent)):()=>!0,v8=wc.hasStandardBrowserEnv?{write(a,d,A,U,ae,O){const E=[a+"="+encodeURIComponent(d)];Un.isNumber(A)&&E.push("expires="+new Date(A).toGMTString()),Un.isString(U)&&E.push("path="+U),Un.isString(ae)&&E.push("domain="+ae),O===!0&&E.push("secure"),document.cookie=E.join("; ")},read(a){const d=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function b8(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function x8(a,d){return d?a.replace(/\/?\/$/,"")+"/"+d.replace(/^\/+/,""):a}function ux(a,d,A){let U=!b8(d);return a&&(U||A==!1)?x8(a,d):d}const dx=a=>a instanceof Yc?{...a}:a;function kh(a,d){d=d||{};const A={};function U(u,e,b,f){return Un.isPlainObject(u)&&Un.isPlainObject(e)?Un.merge.call({caseless:f},u,e):Un.isPlainObject(e)?Un.merge({},e):Un.isArray(e)?e.slice():e}function ae(u,e,b,f){if(Un.isUndefined(e)){if(!Un.isUndefined(u))return U(void 0,u,b,f)}else return U(u,e,b,f)}function O(u,e){if(!Un.isUndefined(e))return U(void 0,e)}function E(u,e){if(Un.isUndefined(e)){if(!Un.isUndefined(u))return U(void 0,u)}else return U(void 0,e)}function t(u,e,b){if(b in d)return U(u,e);if(b in a)return U(void 0,u)}const x={url:O,method:O,data:O,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:t,headers:(u,e,b)=>ae(dx(u),dx(e),b,!0)};return Un.forEach(Object.keys(Object.assign({},a,d)),function(u){const e=x[u]||ae,b=e(a[u],d[u],u);Un.isUndefined(b)&&e!==t||(A[u]=b)}),A}const hx=a=>{const d=kh({},a);let{data:A,withXSRFToken:U,xsrfHeaderName:ae,xsrfCookieName:O,headers:E,auth:t}=d;d.headers=E=Yc.from(E),d.url=tx(ux(d.baseURL,d.url,d.allowAbsoluteUrls),a.params,a.paramsSerializer),t&&E.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):"")));let x;if(Un.isFormData(A)){if(wc.hasStandardBrowserEnv||wc.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if((x=E.getContentType())!==!1){const[u,...e]=x?x.split(";").map(b=>b.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...e].join("; "))}}if(wc.hasStandardBrowserEnv&&(U&&Un.isFunction(U)&&(U=U(d)),U||U!==!1&&y8(d.url))){const u=ae&&O&&v8.read(O);u&&E.set(ae,u)}return d},_8=typeof XMLHttpRequest<"u",w8=_8&&function(a){return new Promise(function(d,A){const U=hx(a);let ae=U.data;const O=Yc.from(U.headers).normalize();let{responseType:E,onUploadProgress:t,onDownloadProgress:x}=U,u,e,b,f,v;function h(){f&&f(),v&&v(),U.cancelToken&&U.cancelToken.unsubscribe(u),U.signal&&U.signal.removeEventListener("abort",u)}let r=new XMLHttpRequest;r.open(U.method.toUpperCase(),U.url,!0),r.timeout=U.timeout;function n(){if(!r)return;const o=Yc.from("getAllResponseHeaders"in r&&r.getAllResponseHeaders()),l={data:!E||E==="text"||E==="json"?r.responseText:r.response,status:r.status,statusText:r.statusText,headers:o,config:a,request:r};sx(function(p){d(p),h()},function(p){A(p),h()},l),r=null}"onloadend"in r?r.onloadend=n:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(n)},r.onabort=function(){r&&(A(new ui("Request aborted",ui.ECONNABORTED,a,r)),r=null)},r.onerror=function(){A(new ui("Network Error",ui.ERR_NETWORK,a,r)),r=null},r.ontimeout=function(){let o=U.timeout?"timeout of "+U.timeout+"ms exceeded":"timeout exceeded";const l=U.transitional||nx;U.timeoutErrorMessage&&(o=U.timeoutErrorMessage),A(new ui(o,l.clarifyTimeoutError?ui.ETIMEDOUT:ui.ECONNABORTED,a,r)),r=null},ae===void 0&&O.setContentType(null),"setRequestHeader"in r&&Un.forEach(O.toJSON(),function(o,l){r.setRequestHeader(l,o)}),Un.isUndefined(U.withCredentials)||(r.withCredentials=!!U.withCredentials),E&&E!=="json"&&(r.responseType=U.responseType),x&&([b,v]=Ym(x,!0),r.addEventListener("progress",b)),t&&r.upload&&([e,f]=Ym(t),r.upload.addEventListener("progress",e),r.upload.addEventListener("loadend",f)),(U.cancelToken||U.signal)&&(u=o=>{r&&(A(!o||o.type?new fp(null,a,r):o),r.abort(),r=null)},U.cancelToken&&U.cancelToken.subscribe(u),U.signal&&(U.signal.aborted?u():U.signal.addEventListener("abort",u)));const c=f8(U.url);if(c&&wc.protocols.indexOf(c)===-1){A(new ui("Unsupported protocol "+c+":",ui.ERR_BAD_REQUEST,a));return}r.send(ae||null)})},k8=(a,d)=>{const{length:A}=a=a?a.filter(Boolean):[];if(d||A){let U=new AbortController,ae;const O=function(u){if(!ae){ae=!0,t();const e=u instanceof Error?u:this.reason;U.abort(e instanceof ui?e:new fp(e instanceof Error?e.message:e))}};let E=d&&setTimeout(()=>{E=null,O(new ui(`timeout ${d} of ms exceeded`,ui.ETIMEDOUT))},d);const t=()=>{a&&(E&&clearTimeout(E),E=null,a.forEach(u=>{u.unsubscribe?u.unsubscribe(O):u.removeEventListener("abort",O)}),a=null)};a.forEach(u=>u.addEventListener("abort",O));const{signal:x}=U;return x.unsubscribe=()=>Un.asap(t),x}},T8=function*(a,d){let A=a.byteLength;if(A<d){yield a;return}let U=0,ae;for(;U<A;)ae=U+d,yield a.slice(U,ae),U=ae},S8=async function*(a,d){for await(const A of A8(a))yield*T8(A,d)},A8=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const d=a.getReader();try{for(;;){const{done:A,value:U}=await d.read();if(A)break;yield U}}finally{await d.cancel()}},px=(a,d,A,U)=>{const ae=S8(a,d);let O=0,E,t=x=>{E||(E=!0,U&&U(x))};return new ReadableStream({async pull(x){try{const{done:u,value:e}=await ae.next();if(u){t(),x.close();return}let b=e.byteLength;if(A){let f=O+=b;A(f)}x.enqueue(new Uint8Array(e))}catch(u){throw t(u),u}},cancel(x){return t(x),ae.return()}},{highWaterMark:2})},Qm=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",fx=Qm&&typeof ReadableStream=="function",E8=Qm&&(typeof TextEncoder=="function"?(a=>d=>a.encode(d))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),mx=(a,...d)=>{try{return!!a(...d)}catch{return!1}},C8=fx&&mx(()=>{let a=!1;const d=new Request(wc.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!d}),gx=64*1024,n1=fx&&mx(()=>Un.isReadableStream(new Response("").body)),e0={stream:n1&&(a=>a.body)};Qm&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!e0[d]&&(e0[d]=Un.isFunction(a[d])?A=>A[d]():(A,U)=>{throw new ui(`Response type '${d}' is not supported`,ui.ERR_NOT_SUPPORT,U)})})})(new Response);const M8=async a=>{if(a==null)return 0;if(Un.isBlob(a))return a.size;if(Un.isSpecCompliantForm(a))return(await new Request(wc.origin,{method:"POST",body:a}).arrayBuffer()).byteLength;if(Un.isArrayBufferView(a)||Un.isArrayBuffer(a))return a.byteLength;if(Un.isURLSearchParams(a)&&(a=a+""),Un.isString(a))return(await E8(a)).byteLength},P8=async(a,d)=>Un.toFiniteNumber(a.getContentLength())??M8(d),L8=Qm&&(async a=>{let{url:d,method:A,data:U,signal:ae,cancelToken:O,timeout:E,onDownloadProgress:t,onUploadProgress:x,responseType:u,headers:e,withCredentials:b="same-origin",fetchOptions:f}=hx(a);u=u?(u+"").toLowerCase():"text";let v=k8([ae,O&&O.toAbortSignal()],E),h;const r=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let n;try{if(x&&C8&&A!=="get"&&A!=="head"&&(n=await P8(e,U))!==0){let m=new Request(d,{method:"POST",body:U,duplex:"half"}),w;if(Un.isFormData(U)&&(w=m.headers.get("content-type"))&&e.setContentType(w),m.body){const[T,k]=lx(n,Ym(cx(x)));U=px(m.body,gx,T,k)}}Un.isString(b)||(b=b?"include":"omit");const c="credentials"in Request.prototype;h=new Request(d,{...f,signal:v,method:A.toUpperCase(),headers:e.normalize().toJSON(),body:U,duplex:"half",credentials:c?b:void 0});let o=await fetch(h,f);const l=n1&&(u==="stream"||u==="response");if(n1&&(t||l&&r)){const m={};["status","statusText","headers"].forEach(M=>{m[M]=o[M]});const w=Un.toFiniteNumber(o.headers.get("content-length")),[T,k]=t&&lx(w,Ym(cx(t),!0))||[];o=new Response(px(o.body,gx,T,()=>{k&&k(),r&&r()}),m)}u=u||"text";let p=await e0[Un.findKey(e0,u)||"text"](o,a);return!l&&r&&r(),await new Promise((m,w)=>{sx(m,w,{data:p,headers:Yc.from(o.headers),status:o.status,statusText:o.statusText,config:a,request:h})})}catch(c){throw r&&r(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new ui("Network Error",ui.ERR_NETWORK,a,h),{cause:c.cause||c}):ui.from(c,c&&c.code,a,h)}}),a1={http:GT,xhr:w8,fetch:L8};Un.forEach(a1,(a,d)=>{if(a){try{Object.defineProperty(a,"name",{value:d})}catch{}Object.defineProperty(a,"adapterName",{value:d})}});const yx=a=>`- ${a}`,z8=a=>Un.isFunction(a)||a===null||a===!1,vx={getAdapter:a=>{a=Un.isArray(a)?a:[a];const{length:d}=a;let A,U;const ae={};for(let O=0;O<d;O++){A=a[O];let E;if(U=A,!z8(A)&&(U=a1[(E=String(A)).toLowerCase()],U===void 0))throw new ui(`Unknown adapter '${E}'`);if(U)break;ae[E||"#"+O]=U}if(!U){const O=Object.entries(ae).map(([t,x])=>`adapter ${t} `+(x===!1?"is not supported by the environment":"is not available in the build"));let E=d?O.length>1?`since :
|
|
4038
|
+
`+O.map(yx).join(`
|
|
4039
|
+
`):" "+yx(O[0]):"as no adapter specified";throw new ui("There is no suitable adapter to dispatch the request "+E,"ERR_NOT_SUPPORT")}return U},adapters:a1};function i1(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new fp(null,a)}function bx(a){return i1(a),a.headers=Yc.from(a.headers),a.data=r1.call(a,a.transformRequest),["post","put","patch"].indexOf(a.method)!==-1&&a.headers.setContentType("application/x-www-form-urlencoded",!1),vx.getAdapter(a.adapter||df.adapter)(a).then(function(d){return i1(a),d.data=r1.call(a,a.transformResponse,d),d.headers=Yc.from(d.headers),d},function(d){return ox(d)||(i1(a),d&&d.response&&(d.response.data=r1.call(a,a.transformResponse,d.response),d.response.headers=Yc.from(d.response.headers))),Promise.reject(d)})}const xx="1.10.0",t0={};["object","boolean","number","function","string","symbol"].forEach((a,d)=>{t0[a]=function(A){return typeof A===a||"a"+(d<1?"n ":" ")+a}});const _x={};t0.transitional=function(a,d,A){function U(ae,O){return"[Axios v"+xx+"] Transitional option '"+ae+"'"+O+(A?". "+A:"")}return(ae,O,E)=>{if(a===!1)throw new ui(U(O," has been removed"+(d?" in "+d:"")),ui.ERR_DEPRECATED);return d&&!_x[O]&&(_x[O]=!0,console.warn(U(O," has been deprecated since v"+d+" and will be removed in the near future"))),a?a(ae,O,E):!0}},t0.spelling=function(a){return(d,A)=>(console.warn(`${A} is likely a misspelling of ${a}`),!0)};function O8(a,d,A){if(typeof a!="object")throw new ui("options must be an object",ui.ERR_BAD_OPTION_VALUE);const U=Object.keys(a);let ae=U.length;for(;ae-- >0;){const O=U[ae],E=d[O];if(E){const t=a[O],x=t===void 0||E(t,O,a);if(x!==!0)throw new ui("option "+O+" must be "+x,ui.ERR_BAD_OPTION_VALUE);continue}if(A!==!0)throw new ui("Unknown option "+O,ui.ERR_BAD_OPTION)}}const r0={assertOptions:O8,validators:t0},ad=r0.validators;let Th=class{constructor(a){this.defaults=a||{},this.interceptors={request:new rx,response:new rx}}async request(a,d){try{return await this._request(a,d)}catch(A){if(A instanceof Error){let U={};Error.captureStackTrace?Error.captureStackTrace(U):U=new Error;const ae=U.stack?U.stack.replace(/^.+\n/,""):"";try{A.stack?ae&&!String(A.stack).endsWith(ae.replace(/^.+\n.+\n/,""))&&(A.stack+=`
|
|
4040
|
+
`+ae):A.stack=ae}catch{}}throw A}}_request(a,d){typeof a=="string"?(d=d||{},d.url=a):d=a||{},d=kh(this.defaults,d);const{transitional:A,paramsSerializer:U,headers:ae}=d;A!==void 0&&r0.assertOptions(A,{silentJSONParsing:ad.transitional(ad.boolean),forcedJSONParsing:ad.transitional(ad.boolean),clarifyTimeoutError:ad.transitional(ad.boolean)},!1),U!=null&&(Un.isFunction(U)?d.paramsSerializer={serialize:U}:r0.assertOptions(U,{encode:ad.function,serialize:ad.function},!0)),d.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?d.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:d.allowAbsoluteUrls=!0),r0.assertOptions(d,{baseUrl:ad.spelling("baseURL"),withXsrfToken:ad.spelling("withXSRFToken")},!0),d.method=(d.method||this.defaults.method||"get").toLowerCase();let O=ae&&Un.merge(ae.common,ae[d.method]);ae&&Un.forEach(["delete","get","head","post","put","patch","common"],v=>{delete ae[v]}),d.headers=Yc.concat(O,ae);const E=[];let t=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(d)===!1||(t=t&&v.synchronous,E.unshift(v.fulfilled,v.rejected))});const x=[];this.interceptors.response.forEach(function(v){x.push(v.fulfilled,v.rejected)});let u,e=0,b;if(!t){const v=[bx.bind(this),void 0];for(v.unshift.apply(v,E),v.push.apply(v,x),b=v.length,u=Promise.resolve(d);e<b;)u=u.then(v[e++],v[e++]);return u}b=E.length;let f=d;for(e=0;e<b;){const v=E[e++],h=E[e++];try{f=v(f)}catch(r){h.call(this,r);break}}try{u=bx.call(this,f)}catch(v){return Promise.reject(v)}for(e=0,b=x.length;e<b;)u=u.then(x[e++],x[e++]);return u}getUri(a){a=kh(this.defaults,a);const d=ux(a.baseURL,a.url,a.allowAbsoluteUrls);return tx(d,a.params,a.paramsSerializer)}};Un.forEach(["delete","get","head","options"],function(a){Th.prototype[a]=function(d,A){return this.request(kh(A||{},{method:a,url:d,data:(A||{}).data}))}}),Un.forEach(["post","put","patch"],function(a){function d(A){return function(U,ae,O){return this.request(kh(O||{},{method:a,headers:A?{"Content-Type":"multipart/form-data"}:{},url:U,data:ae}))}}Th.prototype[a]=d(),Th.prototype[a+"Form"]=d(!0)});let N8=class G4{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let A;this.promise=new Promise(function(ae){A=ae});const U=this;this.promise.then(ae=>{if(!U._listeners)return;let O=U._listeners.length;for(;O-- >0;)U._listeners[O](ae);U._listeners=null}),this.promise.then=ae=>{let O;const E=new Promise(t=>{U.subscribe(t),O=t}).then(ae);return E.cancel=function(){U.unsubscribe(O)},E},d(function(ae,O,E){U.reason||(U.reason=new fp(ae,O,E),A(U.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const A=this._listeners.indexOf(d);A!==-1&&this._listeners.splice(A,1)}toAbortSignal(){const d=new AbortController,A=U=>{d.abort(U)};return this.subscribe(A),d.signal.unsubscribe=()=>this.unsubscribe(A),d.signal}static source(){let d;return{token:new G4(function(A){d=A}),cancel:d}}};function R8(a){return function(d){return a.apply(null,d)}}function D8(a){return Un.isObject(a)&&a.isAxiosError===!0}const o1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(o1).forEach(([a,d])=>{o1[d]=a});function wx(a){const d=new Th(a),A=B2(Th.prototype.request,d);return Un.extend(A,Th.prototype,d,{allOwnKeys:!0}),Un.extend(A,d,null,{allOwnKeys:!0}),A.create=function(U){return wx(kh(a,U))},A}const Lo=wx(df);Lo.Axios=Th,Lo.CanceledError=fp,Lo.CancelToken=N8,Lo.isCancel=ox,Lo.VERSION=xx,Lo.toFormData=$m,Lo.AxiosError=ui,Lo.Cancel=Lo.CanceledError,Lo.all=function(a){return Promise.all(a)},Lo.spread=R8,Lo.isAxiosError=D8,Lo.mergeConfig=kh,Lo.AxiosHeaders=Yc,Lo.formToJSON=a=>ax(Un.isHTMLForm(a)?new FormData(a):a),Lo.getAdapter=vx.getAdapter,Lo.HttpStatusCode=o1,Lo.default=Lo;const{Axios:Mpe,AxiosError:Ppe,CanceledError:Lpe,isCancel:zpe,CancelToken:Ope,VERSION:Npe,all:Rpe,Cancel:Dpe,isAxiosError:Ipe,spread:Fpe,toFormData:Vpe,AxiosHeaders:Bpe,HttpStatusCode:Upe,formToJSON:jpe,getAdapter:qpe,mergeConfig:Wpe}=Lo,I8={computed:{sizeTabsFontMP(){const a=this.elementSize.width;return a<=380?"12px":a<=768?"14px":"16px"},sizeTabsFontMS(){const a=this.elementSize.width;return a<=600?"12px":a<=768?"13px":"14px"},sizeTabsMS(){const a=this.elementSize.width;return a<=480?"145px":a<=600?"153px":a<=620?"163px":a<=640?"170px":a<=660?"175px":a<=680?"180px":a<=700?"185px":a<=720?"195px":"200px"},sizeTabsMP(){const a=this.elementSize.width;return a<=319?"68px":a<=330?"73px":a<=340?"78px":a<=350?"82px":a<=360||a<=370?"90px":a<=390?"95px":a<=410?"105px":a<=430?"110px":a<=450?"117px":a<=470?"122px":a<=500?"130px":a<=530?"138px":a<=560?"155px":a<=590?"163px":a<=620?"175px":a<=650?"180px":a<=680?"195px":a<=730?"210px":a<=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 a=this.elementSize.width;return a<=960?this.$style.comdescubreVideos960:a<=1232?this.$style.comdescubreVideos1232:this.$style.comdescubreVideos},comquitarFiltrosClass(){const a=this.elementSize.width;return a<=380?this.$style.comquitarFiltros380:a<=480?this.$style.comquitarFiltros480:a<=730?this.$style.comquitarFiltros730:this.$style.comquitarFiltros},commejoresJugadoresClass(){const a=this.elementSize.width;return a<=480?this.$style.commejoresJugadores480:a<=730?this.$style.commejoresJugadores730:this.$style.commejoresJugadores},menuSectionClass(){return this.elementSize.width<=960?this.$style.commenuSection960:this.$style.commenuSection},topFiltersClass(){const a=this.elementSize.width;return a<=420?this.$style.comtopFilters420:a<=460?this.$style.comtopFilters460:a<=1232?this.$style.comtopFilters1232:this.$style.comtopFilters},toniKroosWrapperClass(){const a=this.elementSize.width;return a<=319?this.$style.comtoniKroosWrapper320:a<=420?this.$style.comtoniKroosWrapper420:a<=916?this.$style.comtoniKroosWrapper760:a<=975?this.$style.comtoniKroosWrapper975:a<=1079?this.$style.comtoniKroosWrapper1080:this.$style.comtoniKroosWrapper},containerTablesClass(){const a=this.elementSize.width;return a<=319?this.$style.comcontainerTables320:a<=916?this.$style.comcontainerTables760:a<=1079?this.$style.comcontainerTables960:this.$style.comcontainerTables},containerTheBestClass(){const a=this.elementSize.width;return a<=319?this.$style.comcontainerTheBest320:a<=960?this.$style.comcontainerTheBest960:a<=1232?this.$style.comcontainerTheBest1232:this.$style.comcontainerTheBest},menuSectionHeaderClass(){const a=this.elementSize.width;return a<=730?this.$style.commenuSectionHeader730:a<=960?this.$style.commenuSectionHeader960:a<=1232?this.$style.commenuSectionHeader1232:this.$style.commenuSectionHeader},losMejoresClass(){const a=this.elementSize.width;return a<=380?this.$style.comlosMejores380:a<=530?this.$style.comlosMejores530:a<=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 a=this.elementSize.width;return a<=430?this.$style.commenuSectionParentHeader430:a<=730?this.$style.commenuSectionParentHeader730:a<=960?this.$style.commenuSectionParentHeader960:a<=1232?this.$style.commenuSectionParentHeader1232:this.$style.commenuSectionParentHeader},templateLosMejoresClass(){const a=this.elementSize.width;return a<=319?this.$style.comtemplateLosMejores1320:a<=350?this.$style.comtemplateLosMejores1350:a<=420?this.$style.comtemplateLosMejores1420:a<=540?this.$style.comtemplateLosMejores1540:a<=960?this.$style.comtemplateLosMejores1960:a<=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 a=this.elementSize.width;return a<=319?this.$style.comcontainerSection320:a<=350?this.$style.comcontainerSection350:a<=960?this.$style.comcontainerSection960:a<=1232?this.$style.comcontainerSection1232:this.$style.comcontainerSection},filtersContainerClass(){const a=this.elementSize.width;return a<=420?this.$style.comfiltersContainer420:a<=760?this.$style.comfiltersContainer760:a<=1232?this.$style.comfiltersContainer1232:this.$style.comfiltersContainer},topFiltersParentClass(){const a=this.elementSize.width;return a<=420?this.$style.comtopFiltersParent420:a<=460?this.$style.comtopFiltersParent460:a<=1232?this.$style.comtopFiltersParent1232:this.$style.comtopFiltersParent}}};function pf(a){const d=g.ref({width:0,height:0});function A(){const U=a.value.getBoundingClientRect();d.value.width=U.width,d.value.height=U.height}return g.onMounted(()=>{A(),window.addEventListener("resize",A)}),g.onUnmounted(()=>{window.removeEventListener("resize",A)}),{elementSize:d}}const Wd=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},s1={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,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(a){this.status=a}}},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(a){this.$emit("click",a),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},kx=()=>{g.useCssVars(a=>({b4c0768e:a.height,59532894:a.borderWidthBtn,b334c7d0:a.borderType,"2559be45":a.borderColor,c2a48c20:a.borderRadius,"37b93ff4":a.width,d4c6b0fa:a.backgroundColor,"3ed79642":a.cursorType,"07333802":a.fontSize,"418e7460":a.fontStyle,"1ec091b6":a.fontFamily,"0ae4c74a":a.marginLeftStat,"4b1ae176":a.fontSizeStat}))},Tx=s1.setup;s1.setup=Tx?(a,d)=>(kx(),Tx(a,d)):kx;const F8=["src"],V8={key:1,class:"text"},B8={class:"stats"},U8={class:"numstats"},j8={class:"leyend"};function q8(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["button",ae.status&&A.typeOnOff&&"button-active"]),style:g.normalizeStyle([O.customStyle,ae.status&&A.typeOnOff&&O.customActive]),onClick:d[0]||(d[0]=(...E)=>O.btnClick&&O.btnClick(...E))},[a.icon&&A.iconPosition.toLowerCase()==="left"?(g.openBlock(),g.createElementBlock("img",{key:0,class:g.normalizeClass(A.mini?"icon-txt":"icon"),style:g.normalizeStyle({width:A.iconSize}),src:a.icon},null,14,F8)):g.createCommentVNode("",!0),A.textValue?(g.openBlock(),g.createElementBlock("div",V8,g.toDisplayString(A.textValue),1)):g.createCommentVNode("",!0)],6)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...E)=>O.btnClick&&O.btnClick(...E))},[g.createElementVNode("div",B8,[g.createElementVNode("div",U8,g.toDisplayString(A.textStat),1)]),g.createElementVNode("div",j8,g.toDisplayString(A.textCategory),1)])):g.createCommentVNode("",!0)])}const W8=Wd(s1,[["render",q8],["__scopeId","data-v-458feef3"]]),H8="_tablePositionGames_uslwp_91",G8="_tablePositionWrapperGames_uslwp_123",X8="_imgHenrryIcon_uslwp_141",K8="_americaIcon_uslwp_157",J8="_playerPhotoGames_uslwp_181",$8="_toniKroosGames_uslwp_199",Z8="_shapeIcon_uslwp_221",Y8="_menuiconsTeams_uslwp_233",Q8="_component31_uslwp_251",eS="_playerNameGames_uslwp_273",tS="_icnPlayIcon_uslwp_289",rS="_goles_uslwp_305",nS="_americaIcon1_uslwp_319",aS="_teamsAmerica_uslwp_347",iS="_containerData_uslwp_359",oS="_shapeIcon1_uslwp_375",sS="_icnExpand1_uslwp_387",lS="_icnExpand_uslwp_387",cS="_playerDataGames_uslwp_427",uS="_playerInfoGames_uslwp_449",dS="_headerTopGame_uslwp_479",hS="_playerRow_uslwp_507",pS="_groupsLeague_uslwp_529",fS="_text_uslwp_547",mS="_btnViewFullList_uslwp_563",gS="_headerTopsGames_uslwp_597",yS="_btnVideosOptions_uslwp_741",vS="_position_uslwp_1095",bS="_positionWrapper_uslwp_1119",xS="_imgNecaxaIcon_uslwp_1135",_S="_teamLogo_uslwp_1147",wS="_teamPhoto_uslwp_1163",kS="_name_uslwp_1179",TS="_icnPlayIconType1_uslwp_1195",SS="_verVideosType1_uslwp_1209",AS="_btnVideosOptionsType1_uslwp_1221",ES="_btnVideosOptions1Games_uslwp_1245",CS="_leftContainer_uslwp_1269",MS="_shapeIconType1_uslwp_1287",PS="_icnExpandType1_uslwp_1297",LS="_arrowExpand_uslwp_1317",zS="_containerInfoGames_uslwp_1333",OS="_headerTopTeam_uslwp_1357",NS="_containerHeader_uslwp_1385",RS="_goles1_uslwp_1403",DS="_golesType1_uslwp_1409",IS="_golesWrapper_uslwp_1419",FS="_btnViewAll_uslwp_1437",VS="_headerTopsTeams_uslwp_1471",BS="_arrowExpandIcon_uslwp_1783",US="_rotate_uslwp_1793",jS={tablePositionGames:H8,tablePositionWrapperGames:G8,imgHenrryIcon:X8,americaIcon:K8,playerPhotoGames:J8,toniKroosGames:$8,shapeIcon:Z8,menuiconsTeams:Y8,component31:Q8,playerNameGames:eS,icnPlayIcon:tS,goles:rS,americaIcon1:nS,teamsAmerica:aS,containerData:iS,shapeIcon1:oS,icnExpand1:sS,icnExpand:lS,playerDataGames:cS,playerInfoGames:uS,headerTopGame:dS,playerRow:hS,groupsLeague:pS,text:fS,btnViewFullList:mS,headerTopsGames:gS,btnVideosOptions:yS,position:vS,positionWrapper:bS,imgNecaxaIcon:xS,teamLogo:_S,teamPhoto:wS,name:kS,icnPlayIconType1:TS,verVideosType1:SS,btnVideosOptionsType1:AS,btnVideosOptions1Games:ES,leftContainer:CS,shapeIconType1:MS,icnExpandType1:PS,arrowExpand:LS,containerInfoGames:zS,headerTopTeam:OS,containerHeader:NS,goles1:RS,golesType1:DS,golesWrapper:IS,btnViewAll:FS,headerTopsTeams:VS,"gsc-button":"_gsc-button_uslwp_1601",arrowExpandIcon:BS,rotate:US},l1={components:{GSCButton:W8},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},arrow:{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"},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(a){this.$emit("play",a)},clickMore(a){this.$emit("more",a)},clickExpand(a){this.$emit("expand",{expand:!this.isExpanded,id:a})},clickFav(a){this.$emit("fav",a)},clickEventMedia(a){this.$emit("mediadata",a)}}},Sx=()=>{g.useCssVars(a=>({"063f36d2":a.fontSizeTopNum,"1ccc0816":a.fontFamilyTopNum,"250bb1b4":a.fontColorTopNum,"53245d7a":a.opacityColorTopNum,fae269e4:a.fontColorName,"9a069ce2":a.fontFamilyName,b30600a8:a.fontSizeName,"8cc2a65e":a.backgroundColorHeader,"3090d202":a.fontFamilyCategory,"9e5a6cc2":a.fontSizeCategory,"4e6c1401":a.fontColorCategory,"7011b384":a.borderColorCategory}))},Ax=l1.setup;l1.setup=Ax?(a,d)=>(Sx(),Ax(a,d)):Sx;const qS=["src"],WS=["src"],HS=["src"],GS=["src"],XS=["fill"],KS=["fill"],JS=["src"],$S=["fill"],ZS=["fill"];function YS(a,d,A,U,ae,O){const E=g.resolveComponent("GSCButton");return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.headerTopsGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.playerRow),id:"player-row"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.headerTopGame)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.playerPhotoGames),id:"container-player-photp"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.tablePositionWrapperGames)},[g.createElementVNode("b",{class:g.normalizeClass(a.$style.tablePositionGames)},g.toDisplayString(A.data.top),3)],2),g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgHenrryIcon),alt:"",src:A.data.photo},null,10,qS),g.createElementVNode("img",{class:g.normalizeClass(a.$style.americaIcon),alt:"",src:A.data.logo},null,10,WS)],2),g.createElementVNode("main",{class:g.normalizeClass(a.$style.playerInfoGames),id:"container-player-info"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.playerNameGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.toniKroosGames)},g.toDisplayString(A.data.name),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.playerDataGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerData)},[A.canPlayVideos||A.game.awayTeam.team_id==A.teamWidget&&A.typeData!=1?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[g.createVNode(E,{"icon-size":A.iconSize,"icon-position":A.iconPosition,width:A.buttonWidth,"button-max-width":A.buttonMaxWidth,height:A.buttonHeight,"border-radius":A.buttonRadius,"border-width":A.buttonBorderWidth,"background-color":A.buttonBackground,"font-family":A.buttonfontFamily,"border-color":A.buttonBorderColor,"text-value":A.data.total+" "+A.categoryName.toLowerCase(),"font-size":A.buttonFontSize,onClick:d[0]||(d[0]=t=>O.clickEventMedia(A.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"]),g.createElementVNode("div",{class:g.normalizeClass(a.$style.teamsAmerica)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.americaIcon1),alt:"",src:A.data.logo},null,10,HS)],2)],64)):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createVNode(E,{icon:"","icon-size":A.iconSize,"icon-position":A.iconPosition,width:A.buttonWidth,"button-max-width":A.buttonMaxWidth,height:A.buttonHeight,"border-radius":A.buttonRadius,"border-width":A.buttonBorderWidth,"background-color":A.buttonBackground,"font-family":A.buttonfontFamily,"border-color":A.buttonBorderColor,"text-value":A.data.total+" "+A.categoryName.toLowerCase(),"font-size":A.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"]),g.createElementVNode("div",{class:g.normalizeClass(a.$style.teamsAmerica)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.americaIcon1),alt:"",src:A.data.logo},null,10,GS)],2)],64))],2),A.arrow?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.icnExpand),onClick:d[1]||(d[1]=t=>O.clickExpand(A.data.player_id))},[(g.openBlock(),g.createElementBlock("svg",{class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[g.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:A.colorArrow},null,8,KS)],10,XS))],2)):g.createCommentVNode("",!0)],2)],2)],2)],2)],2)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(a.$style.headerTopsTeams)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerHeader),id:"header-container"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.headerTopTeam)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.teamPhoto),id:"container-team"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.positionWrapper)},[g.createElementVNode("b",{class:g.normalizeClass(a.$style.position)},g.toDisplayString(A.data.top),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.teamLogo)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgNecaxaIcon),alt:"",src:A.data.logo},null,10,JS)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerInfoGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.leftContainer)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.name)},g.toDisplayString(A.data.name_team),3),g.createVNode(E,{"icon-size":A.iconSize,"icon-position":A.iconPosition,width:A.buttonWidth,"button-max-width":A.buttonMaxWidth,height:A.buttonHeight,"border-radius":A.buttonRadius,"border-width":A.buttonBorderWidth,"background-color":A.buttonBackground,"font-family":A.buttonfontFamily,"border-color":A.buttonBorderColor,"text-value":A.data.total+" "+A.categoryName.toLowerCase(),"font-size":A.buttonFontSize,onClick:d[2]||(d[2]=t=>O.clickEventMedia(A.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"]),g.createElementVNode("div",{class:g.normalizeClass(a.$style.btnVideosOptions1Games)},[g.createVNode(E,{"icon-size":A.iconSize,"icon-position":A.iconPosition,width:A.buttonWidth,"button-max-width":A.buttonMaxWidth,height:A.buttonHeight,"border-radius":A.buttonRadius,"border-width":A.buttonBorderWidth,"background-color":A.buttonBackground,"font-family":A.buttonfontFamily,"border-color":A.buttonBorderColor,"text-value":A.data.total+" "+A.categoryName.toLowerCase(),"font-size":A.buttonFontSize,onClick:d[3]||(d[3]=t=>O.clickEventMedia(A.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"]),g.createElementVNode("div",{class:g.normalizeClass(a.$style.verVideosType1)},g.toDisplayString(A.data.total),3)],2)],2),A.arrow?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.arrowExpand),onClick:d[4]||(d[4]=t=>O.clickExpand(A.data.player_id))},[(g.openBlock(),g.createElementBlock("svg",{class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[g.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:A.colorArrow},null,8,ZS)],10,$S))],2)):g.createCommentVNode("",!0)],2)],2)],2)],2)):g.createCommentVNode("",!0)])}const QS={$style:jS},e7=Wd(l1,[["render",YS],["__cssModules",QS]]),t7="_rotate_1xi10_3",r7="_positionContainer_1xi10_50",n7="_positionContainer620_1xi10_57",a7="_rowwPlayerGames_1xi10_64",i7="_rowwPlayer960Games_1xi10_80",o7="_rowwPlayer420Games_1xi10_95",s7="_rowwPlayer460Games_1xi10_111",l7="_containerLeftGames_1xi10_128",c7="_containerLeft420Games_1xi10_136",u7="_containerLeft620Games_1xi10_144",d7="_iconFavoritesType1_1xi10_151",h7="_iconFavoritesType1320_1xi10_159",p7="_iconFavorites_1xi10_151",f7="_iconFavorites420_1xi10_175",m7="_playerContainerGames_1xi10_183",g7="_playerContainer420Games_1xi10_195",y7="_playerContainer460Games_1xi10_207",v7="_playerContainerType1Games_1xi10_219",b7="_playerContainerType1320Games_1xi10_229",x7="_playerContainerType1460Games_1xi10_239",_7="_imgPlayerIcon_1xi10_249",w7="_imgPlayerIcon460_1xi10_259",k7="_imgPlayerIcon420_1xi10_269",T7="_manchesterUnitedGames_1xi10_279",S7="_manchesterUnited360Games_1xi10_290",A7="_manchesterUnited420Games_1xi10_301",E7="_manchesterUnited460Games_1xi10_312",C7="_containerRightGames_1xi10_323",M7="_containerRight960Games_1xi10_332",P7="_containerRight420Games_1xi10_342",L7="_numberOfVideos_1xi10_353",z7="_numberOfVideos620_1xi10_359",O7="_block02Games_1xi10_365",N7="_block02960Games_1xi10_375",R7="_block02620Games_1xi10_384",D7="_block02420Games_1xi10_391",I7="_verVideos_1xi10_399",F7="_verVideos620_1xi10_405",V7="_numberPosition_1xi10_408",B7="_shapeIcon_1xi10_414",U7="_chivasIcon_1xi10_419",j7="_imgTeamIcon_1xi10_430",q7="_teamName_1xi10_435",W7="_nameTeamGames_1xi10_441",H7="_dfC_1xi10_450",G7="_position_1xi10_50",X7="_age_1xi10_460",K7="_manchesterUnitedIcon_1xi10_468",J7="_country_1xi10_475",$7="_playedGames_1xi10_482",Z7="_playedMinutes_1xi10_489",Y7="_block01_1xi10_496",Q7="_leagueName_1xi10_503",e9="_roleCharacterIcon_1xi10_509",t9="_btnVideosGames_1xi10_517",r9="_containerBtnVideosGames_1xi10_532",n9="_containerBtnVideos620Games_1xi10_542",a9="_containesOptions_1xi10_551",i9="_arrowExpandIcon_1xi10_559",o9="_rowTeam_1xi10_568",s9="_rowTeam420_1xi10_586",l9="_rowTeam320_1xi10_604",c9="_rowTeam460_1xi10_623",u9="_rowTeam350_1xi10_642",d9="_containerLeftType1_1xi10_660",h9="_containerLeftType1680_1xi10_666",p9="_containerLeftType1320_1xi10_673",f9="_containerLeftType1350_1xi10_681",m9="_positionContainertype1_1xi10_688",g9="_positionContainertype1380_1xi10_696",y9="_positionContainertype1680_1xi10_704",v9="_positionContainertype1420_1xi10_712",b9="_manchesterUnitedType1_1xi10_720",x9="_manchesterUnitedType1460_1xi10_726",_9="_manchesterUnitedType1320_1xi10_733",w9="_containerRightType1Games_1xi10_740",k9="_containerRightType1420Games_1xi10_751",T9="_containerRightType1320Games_1xi10_762",S9="_teamNameWrapperType1_1xi10_773",A9="_teamNameWrapperType1960_1xi10_780",E9="_teamNameWrapperType11086_1xi10_787",C9="_ageWrapperType1_1xi10_794",M9="_ageWrapperType1680_1xi10_801",P9="_ageWrapperType11086_1xi10_809",L9="_ageType1_1xi10_817",z9="_ageType1960_1xi10_825",O9="_playedGamesWrapperType1_1xi10_828",N9="_playedGamesWrapperType1680_1xi10_835",R9="_playedGamesWrapperType1960_1xi10_838",D9="_playedGamesType1_1xi10_841",I9="_playedGamesType1540_1xi10_848",F9="_playedGamesType1960_1xi10_852",V9="_playedGamesType11086_1xi10_855",B9="_playedMinutesWrapperType1_1xi10_858",U9="_playedMinutesWrapperType11086_1xi10_865",j9="_playedMinutesType1_1xi10_872",q9="_playedMinutesType1680_1xi10_879",W9="_block02Type1Games_1xi10_882",H9="_block02Type1680Games_1xi10_890",G9="_block02Type1320Games_1xi10_898",X9="_block02Type1350Games_1xi10_907",K9="_leagueNameWrapperType1_1xi10_915",J9="_leagueNameWrapperType1680_1xi10_923",$9="_leagueNameWrapperType1960_1xi10_926",Z9="_leagueNameType1_1xi10_934",Y9="_leagueNameType1960_1xi10_944",Q9="_numberOfVideosType1_1xi10_954",eA="_numberOfVideosType1680_1xi10_961",tA="_numberOfVideosType11232_1xi10_968",rA="_vectorIconType1_1xi10_975",nA="_block01TitlesType1_1xi10_992",aA="_numberPositionType1_1xi10_999",iA="_shapeIconType1_1xi10_1005",oA="_tijuanaIconType1_1xi10_1011",sA="_tijuanaWrapperType1_1xi10_1017",lA="_tijuanaWrapperType1NoBg_1xi10_1028",cA="_teamNameType1_1xi10_1036",uA="_roleCharacterIconType1_1xi10_1043",dA="_verVideosType1_1xi10_1050",hA="_btnVideosType1Games_1xi10_1056",pA="_containerBtnVideosType1Games_1xi10_1071",fA="_containesOptionsType1Games_1xi10_1082",mA="_arrowExpandIconType1_1xi10_1091",gA="_templateTablaProductividadType1_1xi10_1097",yA="_verVideosType11232_1xi10_1109",vA="_templateTablaProductividadType1320_1xi10_1113",bA="_verVideosType1680_1xi10_1117",xA={rotate:t7,positionContainer:r7,positionContainer620:n7,rowwPlayerGames:a7,rowwPlayer960Games:i7,rowwPlayer420Games:o7,rowwPlayer460Games:s7,containerLeftGames:l7,containerLeft420Games:c7,containerLeft620Games:u7,iconFavoritesType1:d7,iconFavoritesType1320:h7,iconFavorites:p7,iconFavorites420:f7,playerContainerGames:m7,playerContainer420Games:g7,playerContainer460Games:y7,playerContainerType1Games:v7,playerContainerType1320Games:b7,playerContainerType1460Games:x7,imgPlayerIcon:_7,imgPlayerIcon460:w7,imgPlayerIcon420:k7,manchesterUnitedGames:T7,manchesterUnited360Games:S7,manchesterUnited420Games:A7,manchesterUnited460Games:E7,containerRightGames:C7,containerRight960Games:M7,containerRight420Games:P7,numberOfVideos:L7,numberOfVideos620:z7,block02Games:O7,block02960Games:N7,block02620Games:R7,block02420Games:D7,verVideos:I7,verVideos620:F7,numberPosition:V7,shapeIcon:B7,chivasIcon:U7,imgTeamIcon:j7,teamName:q7,nameTeamGames:W7,dfC:H7,position:G7,age:X7,manchesterUnitedIcon:K7,country:J7,playedGames:$7,playedMinutes:Z7,block01:Y7,leagueName:Q7,roleCharacterIcon:e9,btnVideosGames:t9,containerBtnVideosGames:r9,containerBtnVideos620Games:n9,containesOptions:a9,arrowExpandIcon:i9,rowTeam:o9,rowTeam420:s9,rowTeam320:l9,rowTeam460:c9,rowTeam350:u9,containerLeftType1:d9,containerLeftType1680:h9,containerLeftType1320:p9,containerLeftType1350:f9,positionContainertype1:m9,positionContainertype1380:g9,positionContainertype1680:y9,positionContainertype1420:v9,manchesterUnitedType1:b9,manchesterUnitedType1460:x9,manchesterUnitedType1320:_9,containerRightType1Games:w9,containerRightType1420Games:k9,containerRightType1320Games:T9,teamNameWrapperType1:S9,teamNameWrapperType1960:A9,teamNameWrapperType11086:E9,ageWrapperType1:C9,ageWrapperType1680:M9,ageWrapperType11086:P9,ageType1:L9,ageType1960:z9,playedGamesWrapperType1:O9,playedGamesWrapperType1680:N9,playedGamesWrapperType1960:R9,playedGamesType1:D9,playedGamesType1540:I9,playedGamesType1960:F9,playedGamesType11086:V9,playedMinutesWrapperType1:B9,playedMinutesWrapperType11086:U9,playedMinutesType1:j9,playedMinutesType1680:q9,block02Type1Games:W9,block02Type1680Games:H9,block02Type1320Games:G9,block02Type1350Games:X9,leagueNameWrapperType1:K9,leagueNameWrapperType1680:J9,leagueNameWrapperType1960:$9,leagueNameType1:Z9,leagueNameType1960:Y9,numberOfVideosType1:Q9,numberOfVideosType1680:eA,numberOfVideosType11232:tA,vectorIconType1:rA,block01TitlesType1:nA,numberPositionType1:aA,shapeIconType1:iA,tijuanaIconType1:oA,tijuanaWrapperType1:sA,tijuanaWrapperType1NoBg:lA,teamNameType1:cA,roleCharacterIconType1:uA,verVideosType1:dA,btnVideosType1Games:hA,containerBtnVideosType1Games:pA,containesOptionsType1Games:fA,arrowExpandIconType1:mA,templateTablaProductividadType1:gA,verVideosType11232:yA,templateTablaProductividadType1320:vA,verVideosType1680:bA},c1={components:{},computed:{manchesterUnitedType1Class(){const a=this.elementSize.width;return a<=320?this.$style.manchesterUnitedType1320:a<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const a=this.elementSize.width;return a<=320?this.$style.containerRightType1320Games:a<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const a=this.elementSize.width;return a<=960?this.$style.teamNameWrapperType1960:a<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const a=this.elementSize.width;return a<=680?this.$style.ageWrapperType1680:a<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const a=this.elementSize.width;return a<=680?this.$style.playedGamesWrapperType1680:a<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const a=this.elementSize.width;return a<=540?this.$style.playedGamesType1540:a<=960?this.$style.playedGamesType1960:a<=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 a=this.elementSize.width;return a<=320?this.$style.block02Type1320Games:a<=350?this.$style.block02Type1350Games:a<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const a=this.elementSize.width;return a<=680?this.$style.leagueNameWrapperType1680:a<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const a=this.elementSize.width;return a<=680?this.$style.numberOfVideosType1680:a<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const a=this.elementSize.width;return a<=320?this.$style.containerLeftType1320:a<=350?this.$style.containerLeftType1350:a<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const a=this.elementSize.width;return a<=380?this.$style.positionContainertype1380:a<=420?this.$style.positionContainertype1420:a<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const a=this.elementSize.width;return a<=320?this.$style.rowTeam320:a<=350?this.$style.rowTeam350:a<=420?this.$style.rowTeam420:a<=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 a=this.elementSize.width;return a<=420?this.$style.block02420Games:a<=620?this.$style.block02620Games:a<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const a=this.elementSize.width;return a<=420?this.$style.imgPlayerIcon420:a<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const a=this.elementSize.width;return a<=360?this.$style.manchesterUnited360Games:a<=420?this.$style.manchesterUnited420Games:a<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const a=this.elementSize.width;return a<=420?this.$style.containerRight420Games:a<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const a=this.elementSize.width;return a<=320?this.$style.playerContainerType1320Games:a<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const a=this.elementSize.width;return a<=420?this.$style.playerContainer420Games:a<=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 a=this.elementSize.width;return a<=420?this.$style.containerLeft420Games:a<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const a=this.elementSize.width;return a<=420?this.$style.rowwPlayer420Games:a<=460?this.$style.rowwPlayer460Games:a<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const a=g.ref("myDivRef2"),{elementSize:d}=pf(a);return{myDivRef2:a,elementSize:d}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},arrow:{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"},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(a){this.$emit("expand",{expand:!this.isExpanded,id:a})},emitEventMedia(a){this.$emit("mediadata",a)}}},Ex=()=>{g.useCssVars(a=>({"287acbb5":a.height,"2c02ce88":a.background,"3f686ffe":a.fontSize,a672c1f4:a.fontColor,"1f323fbe":a.fontFamily}))},Cx=c1.setup;c1.setup=Cx?(a,d)=>(Ex(),Cx(a,d)):Ex;const _A={ref:"myDivRef2",style:{"border-left":"rgba(13, 29, 41, 0.7) 1px solid","border-right":"rgba(13, 29, 41, 0.7) 1px solid"}},wA=["src"],kA=["src"],TA=["fill"],SA=["fill"],AA=["src"],EA=["fill"],CA=["fill"],MA=["src"],PA=["src"],LA=["src"],zA=["fill"],OA=["fill"];function NA(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",_A,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.rowwPlayerClass),id:"container-row-player"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftClass),id:"container-left"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionContainerClass)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.numberPosition)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(O.playerContainerClass)},[g.createElementVNode("img",{class:g.normalizeClass(O.imgPlayerIconClass),src:A.data.player_photo},null,10,wA),g.createElementVNode("div",{class:g.normalizeClass(O.manchesterUnitedClass)},[U.elementSize.width<=420?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[g.createTextVNode(g.toDisplayString(A.data.player_short),1)],64)):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createTextVNode(g.toDisplayString(A.data.player_name),1)],64))],2)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightClass),id:"container-right"},[g.createElementVNode("div",{class:g.normalizeClass(O.block02Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptions)},[g.createElementVNode("div",{class:g.normalizeClass(O.containerBtnVideosClass)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgTeamIcon),alt:"",src:A.data.team_logo},null,10,kA),g.createElementVNode("div",{class:g.normalizeClass(O.numberOfVideosClass)},g.toDisplayString(A.data.total),3)],2)],2),A.arrow?(g.openBlock(),g.createElementBlock("svg",{key:0,class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:d[0]||(d[0]=E=>O.clickExpand(A.data.id))},[g.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:A.colorArrow},null,8,SA)],10,TA)):g.createCommentVNode("",!0)],2)],2)],2)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(O.rowTeamClass),style:g.normalizeStyle(U.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftType1Class),id:"container-left"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionContainertype1Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.numberPositionType1)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(O.playerContainerType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(O.manchesterUnitedType1Class)},g.toDisplayString(A.data.team_abrev),3)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightType1Class),id:"container-right"},[g.createElementVNode("div",{class:g.normalizeClass(O.block02Type1Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptionsType1Games)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerBtnVideosType1Games)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgTeamIcon),alt:"",src:A.data.team_logo},null,10,AA),g.createElementVNode("div",{class:g.normalizeClass(O.numberOfVideosType1Class)},g.toDisplayString(A.data.total),3)],2)],2),A.arrow?(g.openBlock(),g.createElementBlock("svg",{key:0,class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:d[1]||(d[1]=E=>O.clickExpand(A.data.id))},[g.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:A.colorArrow},null,8,CA)],10,EA)):g.createCommentVNode("",!0)],2)],2)],6)):g.createCommentVNode("",!0),A.type==2?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(O.rowwPlayerClass),id:"container-row-player"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftClass),id:"container-left"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionContainerClass)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.numberPosition)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(O.playerContainerClass)},[g.createElementVNode("img",{class:g.normalizeClass(O.imgPlayerIconClass),src:A.data.player_photo},null,10,MA),g.createElementVNode("div",{class:g.normalizeClass(O.manchesterUnitedClass)},g.toDisplayString(A.data.player_name),3),U.elementSize.width<=420?(g.openBlock(),g.createElementBlock("img",{key:0,class:g.normalizeClass(a.$style.chivasIcon),alt:"",src:A.data.team_logo},null,10,PA)):g.createCommentVNode("",!0)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightClass),id:"container-right"},[g.createElementVNode("div",{class:g.normalizeClass(O.block02Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptions)},[g.createElementVNode("div",{class:g.normalizeClass(O.containerBtnVideosClass)},[g.createElementVNode("img",{class:g.normalizeClass(a.$style.imgTeamIcon),alt:"",src:A.data.team_logo},null,10,LA),g.createElementVNode("div",{class:g.normalizeClass(O.numberOfVideosClass)},g.toDisplayString(A.data.total),3)],2)],2),(g.openBlock(),g.createElementBlock("svg",{class:g.normalizeClass([a.$style.arrowExpandIcon,A.isExpanded?a.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:A.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:d[2]||(d[2]=E=>O.clickExpand(A.data.id))},[g.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:A.colorArrow},null,8,OA)],10,zA))],2)],2)],2)):g.createCommentVNode("",!0)],512)}const RA={$style:xA},DA=Wd(c1,[["render",NA],["__cssModules",RA]]),IA="_containerLeftTitles_82svp_119",FA="_containerLeftTitles420_82svp_135",VA="_containerLeftTitles620_82svp_151",BA="_containerLeftTitlesTeam_82svp_169",UA="_containerLeftTitlesTeam1180_82svp_185",jA="_containerLeftTitlesTeam1090_82svp_201",qA="_containerLeftTitlesTeam960_82svp_217",WA="_containerLeftTitlesTeam860_82svp_233",HA="_containerLeftTitlesTeam768_82svp_249",GA="_containerLeftTitlesTeam680_82svp_265",XA="_containerLeftTitlesTeam620_82svp_281",KA="_containerLeftTitlesTeam420_82svp_297",JA="_headTitlesAvanced_82svp_315",$A="_headTitlesAvanced960_82svp_345",ZA="_headTitlesAvanced420_82svp_375",YA="_headTitlesAvanced540_82svp_415",QA="_headTitlesAvanced460_82svp_445",eE="_headTitlesAvanced620_82svp_475",tE="_position_82svp_505",rE="_position420_82svp_523",nE="_player_82svp_529",aE="_player420_82svp_551",iE="_containerRightTypeAvanced1_82svp_559",oE="_containerRightTitlesAdvanced_82svp_573",sE="_containerRightTitlesAdvanced960_82svp_591",lE="_block02Titles_82svp_609",cE="_block02Titles620_82svp_625",uE="_mon1Scouting_82svp_633",dE="_mon1Scouting960_82svp_653",hE="_mon1_82svp_633",pE="_mon1420_82svp_689",fE="_mon1620_82svp_709",mE="_icnIcon_82svp_729",gE="_icnIcon960_82svp_739",yE="_icnIcon420_82svp_751",vE="_teamTitle_82svp_759",bE="_positionTitle_82svp_779",xE="_ageTitle_82svp_795",_E="_partidos_82svp_811",wE="_playedGamesTitle_82svp_819",kE="_playedMinutesTitle_82svp_839",TE="_block01Titles_82svp_857",SE="_mon_82svp_633",AE="_containesOptionsTitles_82svp_889",EE="_templateTablaProductividadType1_82svp_903",CE="_templateTablaProductividadType1400_82svp_927",ME="_headTitlesType1_82svp_955",PE="_headTitlesType1420_82svp_981",LE="_headTitlesType1400_82svp_1013",zE="_headTitlesType1540_82svp_1045",OE="_headTitlesType1460_82svp_1073",NE="_headTitlesType1680_82svp_1101",RE="_headTitlesType1350_82svp_1127",DE="_positionType1_82svp_1157",IE="_positionType1400_82svp_1175",FE="_teamType1_82svp_1195",VE="_teamType1400_82svp_1213",BE="_frecuenciaType1_82svp_1233",UE="_frecuenciaType1540_82svp_1249",jE="_containerLeftTitlesType1_82svp_1267",qE="_frecuenciaWrapperType1_82svp_1283",WE="_frecuenciaWrapperType1680_82svp_1301",HE="_promedioPartidoType1_82svp_1317",GE="_promedioEstePartidoType1_82svp_1325",XE="_promedioEstePartidoType1960_82svp_1341",KE="_promedioEstePartidoWrapperType1_82svp_1349",JE="_promedioEstePartidoWrapperType11200_82svp_1365",$E="_promedioEstePartidoWrapperType11090_82svp_1383",ZE="_promedioEstePartidoWrapperType11086_82svp_1403",YE="_promedioPartidosType1_82svp_1421",QE="_promedioPartidosWrapperType1_82svp_1435",eC="_promedioPartidosWrapperType1960_82svp_1451",tC="_promedioPartidosWrapperType11086_82svp_1457",rC="_partidosJugadosType1_82svp_1463",nC="_partidosJugadosType1960_82svp_1475",aC="_partidosJugadosWrapperType1_82svp_1489",iC="_partidosJugadosWrapperType11200_82svp_1505",oC="_partidosJugadosWrapperType11180_82svp_1521",sC="_partidosJugadosWrapperType11170_82svp_1537",lC="_partidosJugadosWrapperType11140_82svp_1553",cC="_partidosJugadosWrapperType11086_82svp_1569",uC="_partidosJugadosWrapperType1960_82svp_1585",dC="_partidosJugadosWrapperType1880_82svp_1601",hC="_partidosJugadosWrapperType1860_82svp_1617",pC="_partidosJugadosWrapperType1830_82svp_1633",fC="_partidosJugadosWrapperType1790_82svp_1649",mC="_partidosJugadosWrapperType1930_82svp_1665",gC="_partidosJugadosWrapperType1770_82svp_1681",yC="_block01TitlesType1_82svp_1687",vC="_monType1_82svp_1703",bC="_monType1960_82svp_1721",xC="_monType1680_82svp_1741",_C="_videosType1_82svp_1747",wC="_videosType1680_82svp_1767",kC="_videosType1600_82svp_1785",TC="_videosType1540_82svp_1803",SC="_videosType1420_82svp_1821",AC="_videosType1400_82svp_1839",EC="_containesOptionsTitlesType1_82svp_1863",CC="_containesOptionsTitlesType1768_82svp_1879",MC="_containesOptionsTitlesType1730_82svp_1893",PC="_containesOptionsTitlesType1690_82svp_1907",LC="_icnIconType1_82svp_1921",zC="_icnIconType1420_82svp_1933",OC="_icnIconType1400_82svp_1947",NC="_block02TitlesType1_82svp_1955",RC="_block02TitlesType1680_82svp_1969",DC="_block02TitlesType1350_82svp_1983",IC="_containerRightTitlesType1_82svp_1997",FC="_containerRightTitlesType1420_82svp_2015",VC={containerLeftTitles:IA,containerLeftTitles420:FA,containerLeftTitles620:VA,containerLeftTitlesTeam:BA,containerLeftTitlesTeam1180:UA,containerLeftTitlesTeam1090:jA,containerLeftTitlesTeam960:qA,containerLeftTitlesTeam860:WA,containerLeftTitlesTeam768:HA,containerLeftTitlesTeam680:GA,containerLeftTitlesTeam620:XA,containerLeftTitlesTeam420:KA,headTitlesAvanced:JA,headTitlesAvanced960:$A,headTitlesAvanced420:ZA,headTitlesAvanced540:YA,headTitlesAvanced460:QA,headTitlesAvanced620:eE,position:tE,position420:rE,player:nE,player420:aE,containerRightTypeAvanced1:iE,containerRightTitlesAdvanced:oE,containerRightTitlesAdvanced960:sE,block02Titles:lE,block02Titles620:cE,mon1Scouting:uE,mon1Scouting960:dE,mon1:hE,mon1420:pE,mon1620:fE,icnIcon:mE,icnIcon960:gE,icnIcon420:yE,teamTitle:vE,positionTitle:bE,ageTitle:xE,partidos:_E,playedGamesTitle:wE,playedMinutesTitle:kE,block01Titles:TE,mon:SE,containesOptionsTitles:AE,templateTablaProductividadType1:EE,templateTablaProductividadType1400:CE,headTitlesType1:ME,headTitlesType1420:PE,headTitlesType1400:LE,headTitlesType1540:zE,headTitlesType1460:OE,headTitlesType1680:NE,headTitlesType1350:RE,positionType1:DE,positionType1400:IE,teamType1:FE,teamType1400:VE,frecuenciaType1:BE,frecuenciaType1540:UE,containerLeftTitlesType1:jE,frecuenciaWrapperType1:qE,frecuenciaWrapperType1680:WE,promedioPartidoType1:HE,promedioEstePartidoType1:GE,promedioEstePartidoType1960:XE,promedioEstePartidoWrapperType1:KE,promedioEstePartidoWrapperType11200:JE,promedioEstePartidoWrapperType11090:$E,promedioEstePartidoWrapperType11086:ZE,promedioPartidosType1:YE,promedioPartidosWrapperType1:QE,promedioPartidosWrapperType1960:eC,promedioPartidosWrapperType11086:tC,partidosJugadosType1:rC,partidosJugadosType1960:nC,partidosJugadosWrapperType1:aC,partidosJugadosWrapperType11200:iC,partidosJugadosWrapperType11180:oC,partidosJugadosWrapperType11170:sC,partidosJugadosWrapperType11140:lC,partidosJugadosWrapperType11086:cC,partidosJugadosWrapperType1960:uC,partidosJugadosWrapperType1880:dC,partidosJugadosWrapperType1860:hC,partidosJugadosWrapperType1830:pC,partidosJugadosWrapperType1790:fC,partidosJugadosWrapperType1930:mC,partidosJugadosWrapperType1770:gC,block01TitlesType1:yC,monType1:vC,monType1960:bC,monType1680:xC,videosType1:_C,videosType1680:wC,videosType1600:kC,videosType1540:TC,videosType1420:SC,videosType1400:AC,containesOptionsTitlesType1:EC,containesOptionsTitlesType1768:CC,containesOptionsTitlesType1730:MC,containesOptionsTitlesType1690:PC,icnIconType1:LC,icnIconType1420:zC,icnIconType1400:OC,block02TitlesType1:NC,block02TitlesType1680:RC,block02TitlesType1350:DC,containerRightTitlesType1:IC,containerRightTitlesType1420:FC},u1={components:{},computed:{icnIconType1Class(){const a=this.elementSize.width;return a<=400?this.$style.icnIconType1400:a<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const a=this.elementSize.width;return a<=400?this.$style.videosType1400:a<=420?this.$style.videosType1420:a<=540?this.$style.videosType1540:a<=600?this.$style.videosType1600:a<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const a=this.elementSize.width;return a<=680?this.$style.monType1680:a<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const a=this.elementSize.width;return a<=350?this.$style.block02TitlesType1350:a<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const a=this.elementSize.width;return a<=400?this.$style.containesOptionsTitlesType1400:a<=690?this.$style.containesOptionsTitlesType1690:a<=730?this.$style.containesOptionsTitlesType1730:a<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const a=this.elementSize.width;return a<=770?this.$style.promedioPartidosWrapperType1770:a<=790?this.$style.partidosJugadosWrapperType1790:a<=830?this.$style.partidosJugadosWrapperType1830:a<=860?this.$style.partidosJugadosWrapperType1860:a<=880?this.$style.partidosJugadosWrapperType1880:a<=930?this.$style.partidosJugadosWrapperType1930:a<=960?this.$style.partidosJugadosWrapperType1960:a<=1086?this.$style.partidosJugadosWrapperType11086:a<=1140?this.$style.partidosJugadosWrapperType11140:a<=1170?this.$style.partidosJugadosWrapperType11170:a<=1180?this.$style.partidosJugadosWrapperType11180:a<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const a=this.elementSize.width;return a<=960?this.$style.promedioPartidosWrapperType1960:a<=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 a=this.elementSize.width;return a<=350?this.$style.headTitlesType1350:a<=400?this.$style.headTitlesType1400:a<=420?this.$style.headTitlesType1420:a<=460?this.$style.headTitlesType1460:a<=540?this.$style.headTitlesType1540:a<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const a=this.elementSize.width;return a<=420?this.$style.headTitlesAvanced420:a<=460?this.$style.headTitlesAvanced460:a<=540?this.$style.headTitlesAvanced540:a<=620?this.$style.headTitlesAvanced620:a<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const a=this.elementSize.width;return a<=420?this.$style.containerLeftTitles420:a<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const a=this.elementSize.width;return a<=420?this.$style.containerLeftTitlesTeam420:a<=620?this.$style.containerLeftTitlesTeam620:a<=680?this.$style.containerLeftTitlesTeam680:a<=768?this.$style.containerLeftTitlesTeam768:a<=860?this.$style.containerLeftTitlesTeam860:a<=960?this.$style.containerLeftTitlesTeam960:a<=1090?this.$style.containerLeftTitlesTeam1090:a<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const a=this.elementSize.width;return a<=420?this.$style.icnIcon420:a<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const a=this.elementSize.width;return a<=420?this.$style.mon1420:a<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const a=this.elementSize.width;return a<=420?this.$style.mon1420:a<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const a=this.elementSize.width;return a<=1086?this.$style.promedioEstePartidoWrapperType11086:a<=1090?this.$style.promedioEstePartidoWrapperType11090:a<=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 a=g.ref("myDivRef"),{elementSize:d}=pf(a);return{myDivRef:a,elementSize:d}},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:{}},Mx=()=>{g.useCssVars(a=>({"32aec1ca":a.background,"4e54a87a":a.height,"448b848c":a.fontSize,"4c061c38":a.fontColor,"3917092f":a.fontFamily,"4a286e80":a.heightTeam}))},Px=u1.setup;u1.setup=Px?(a,d)=>(Mx(),Px(a,d)):Mx;const BC={ref:"myDivRef"};function UC(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",BC,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.headTitlesClassAvanced),id:"container-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftTitlesClass),id:"container-left-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionClass)},"Pos.",2),g.createElementVNode("div",{class:g.normalizeClass(O.playerClass)},"Jugador",2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightTitlesClassAdvanced),id:"container-right-titles"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.block01Titles)},[U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.teamTitle)},"Equipo",2)):g.createCommentVNode("",!0),U.elementSize.width>730?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(a.$style.positionTitle)},"Posición",2)):g.createCommentVNode("",!0),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(a.$style.ageTitle)},"edad",2)):g.createCommentVNode("",!0),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:3,class:g.normalizeClass(a.$style.ageTitle)},"País",2)):g.createCommentVNode("",!0),U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:4,class:g.normalizeClass(a.$style.playedGamesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Partidos",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Jugados",2)],2)):g.createCommentVNode("",!0),U.elementSize.width>635?(g.openBlock(),g.createElementBlock("div",{key:5,class:g.normalizeClass(a.$style.playedMinutesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Minutos",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Jugados",2)],2)):g.createCommentVNode("",!0)],2),g.createElementVNode("div",{class:g.normalizeClass(O.block02TitlesClass)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptionsTitles)},[U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.mon)},"Total",2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(O.mon1Class)},"Videos",2)],2)],2)],2)],2)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(O.templateTablaProductividadType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(O.headTitlesType1Class),id:"container-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftTitlesClassTeam),id:"container-left-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionType1Class)},"Pos.",2),g.createElementVNode("div",{class:g.normalizeClass(O.teamType1Class)},"Equipo",2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightType1ClassAvanced)},[g.createElementVNode("div",{class:g.normalizeClass(O.frecuenciaWrapperType1Class)},[U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.frecuenciaType1Class)},"Frecuencia",2)):g.createCommentVNode("",!0)],2),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.promedioEstePartidoWrapperType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(O.promedioEstePartidoType1Class)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.promedioPartidoType1)},"Promedio partido",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):g.createCommentVNode("",!0),U.elementSize.width>1086?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(O.promedioPartidosWrapperType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.promedioPartidosType1)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.promedioPartidoType1)},d[0]||(d[0]=[g.createTextVNode("Promedio partido"),g.createElementVNode("br",null,null,-1),g.createTextVNode("Torneo anterior")]),2)],2)],2)):g.createCommentVNode("",!0),U.elementSize.width>770?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(O.partidosJugadosWrapperType1Class)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.partidosJugadosType1)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.promedioPartidoType1)},d[1]||(d[1]=[g.createTextVNode("Partidos "),g.createElementVNode("br",null,null,-1),g.createTextVNode("Jugados")]),2)],2)],2)):g.createCommentVNode("",!0)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containesOptionsTitlesType1Class)},[U.elementSize.width>680?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(O.monType1Class)},"total",2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(O.videosType1Class)},"Videos",2)],2)],2)],2)):g.createCommentVNode("",!0),A.type==2?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(O.headTitlesClassAvanced),id:"container-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.containerLeftTitlesClass),id:"container-left-titles"},[g.createElementVNode("div",{class:g.normalizeClass(O.positionClass)},"Pos.",2),g.createElementVNode("div",{class:g.normalizeClass(O.playerClass)},"Jugador",2)],2),g.createElementVNode("div",{class:g.normalizeClass(O.containerRightTitlesClassAdvanced),id:"container-right-titles"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.block01Titles)},[U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.teamTitle)},"Equipo",2)):g.createCommentVNode("",!0),U.elementSize.width>730?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(a.$style.positionTitle)},"Posición",2)):g.createCommentVNode("",!0),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(a.$style.ageTitle)},"edad",2)):g.createCommentVNode("",!0),U.elementSize.width>960?(g.openBlock(),g.createElementBlock("div",{key:3,class:g.normalizeClass(a.$style.ageTitle)},"País",2)):g.createCommentVNode("",!0),U.elementSize.width>540?(g.openBlock(),g.createElementBlock("div",{key:4,class:g.normalizeClass(a.$style.playedGamesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Partidos",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Jugados",2)],2)):g.createCommentVNode("",!0),U.elementSize.width>635?(g.openBlock(),g.createElementBlock("div",{key:5,class:g.normalizeClass(a.$style.playedMinutesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Minutos",2),g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Jugados",2)],2)):g.createCommentVNode("",!0),U.elementSize.width>635?(g.openBlock(),g.createElementBlock("div",{key:6,class:g.normalizeClass(a.$style.playedMinutesTitle)},[g.createElementVNode("p",{class:g.normalizeClass(a.$style.partidos)},"Liga",2)],2)):g.createCommentVNode("",!0)],2),g.createElementVNode("div",{class:g.normalizeClass(O.block02TitlesClass)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.containesOptionsTitles)},[g.createElementVNode("div",{class:g.normalizeClass(O.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):g.createCommentVNode("",!0)],512)}const jC={$style:VC},qC=Wd(u1,[["render",UC],["__cssModules",jC]]),WC=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},d1={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(a){this.status=a}}},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(a){this.$emit("click",a),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Lx=()=>{g.useCssVars(a=>({"9d01acb4":a.height,"14e95081":a.borderWidthBtn,"38fec285":a.borderType,34353510:a.borderColor,"20d20dc6":a.borderRadius,17130967:a.width,"4ccb7d36":a.backgroundColor,"5d1e86a2":a.cursorType,ce65d4a2:a.fontSize,fe4ac47a:a.fontStyle,f98e44dc:a.fontFamily,"93b87770":a.marginLeftStat,c7f7beba:a.fontSizeStat}))},zx=d1.setup;d1.setup=zx?(a,d)=>(Lx(),zx(a,d)):Lx;const HC=a=>(g.pushScopeId("data-v-f3ee6b2b"),a=a(),g.popScopeId(),a),GC=["src"],XC={key:1,class:"text"},KC=["src"],JC={class:"stats"},$C=HC(()=>g.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),ZC={class:"numstats"},YC={class:"leyend"};function QC(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["button",ae.status&&A.typeOnOff&&"button-active"]),style:g.normalizeStyle([O.customStyle,ae.status&&A.typeOnOff&&O.customActive]),onClick:d[0]||(d[0]=(...E)=>O.btnClick&&O.btnClick(...E))},[A.icon&&A.iconPosition.toLowerCase()==="left"?(g.openBlock(),g.createElementBlock("img",{key:0,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,GC)):g.createCommentVNode("",!0),A.textValue?(g.openBlock(),g.createElementBlock("div",XC,g.toDisplayString(A.textValue),1)):g.createCommentVNode("",!0),A.icon&&A.iconPosition.toLowerCase()==="right"?(g.openBlock(),g.createElementBlock("img",{key:2,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,KC)):g.createCommentVNode("",!0)],6)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...E)=>O.btnClick&&O.btnClick(...E))},[g.createElementVNode("div",JC,[$C,g.createElementVNode("div",ZC,g.toDisplayString(A.textStat),1)]),g.createElementVNode("div",YC,g.toDisplayString(A.textCategory),1)])):g.createCommentVNode("",!0)])}const eM=WC(d1,[["render",QC],["__scopeId","data-v-f3ee6b2b"]]),tM="_equipoGames_fst7d_75",rM="_atlasSeleccinGames_fst7d_85",nM="_equipoAtlasSeleccinMexiGames_fst7d_93",aM="_aosGames_fst7d_101",iM="_span12_fst7d_109",oM="_nacionalidadMex_fst7d_115",sM="_manchesterUnited_fst7d_121",lM="_manchesterUnited12_fst7d_135",cM="_containerInfoGames_fst7d_155",uM="_verPerfil12_fst7d_173",dM="_btnProfile_fst7d_191",hM="_containerButton_fst7d_223",pM="_dataContainer_fst7d_237",fM="_expandedInfoPlayerGames_fst7d_257",mM="_containerDataBg_fst7d_437",gM="_containerDataSm_fst7d_459",yM="_span_fst7d_109",vM="_manchesterUnited14_fst7d_481",bM="_filter_fst7d_491",xM="_verPerfil_fst7d_173",_M="_manchesterUnited8_fst7d_533",wM="_manchesterUnitedParent1_fst7d_545",kM="_manchesterUnited1_fst7d_135",TM="_manchesterUnitedParent_fst7d_545",SM="_frameDiv_fst7d_589",AM="_infoExpanded_fst7d_605",EM="_countryFlag_fst7d_911",CM={equipoGames:tM,atlasSeleccinGames:rM,equipoAtlasSeleccinMexiGames:nM,aosGames:aM,span12:iM,nacionalidadMex:oM,manchesterUnited:sM,manchesterUnited12:lM,containerInfoGames:cM,verPerfil12:uM,btnProfile:dM,containerButton:hM,dataContainer:pM,expandedInfoPlayerGames:fM,containerDataBg:mM,containerDataSm:gM,span:yM,manchesterUnited14:vM,filter:bM,verPerfil:xM,manchesterUnited8:_M,manchesterUnitedParent1:wM,manchesterUnited1:kM,manchesterUnitedParent:TM,frameDiv:SM,infoExpanded:AM,countryFlag:EM},h1={components:{GSCButton:eM},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 a=g.ref("myDivRef"),{elementSize:d}=pf(a);return{myDivRef:a,elementSize:d}},data(){return{}},computed:{},methods:{viewProfile(a){this.$emit("viewprofile",a)}}},Ox=()=>{g.useCssVars(a=>({a297a8e8:a.fontFamily,"05868b8a":a.fontColor,"9181d814":a.fontColorValue,c650cbae:a.fontSize,af6837b2:a.background}))},Nx=h1.setup;h1.setup=Nx?(a,d)=>(Ox(),Nx(a,d)):Ox;const MM={ref:"myDivRef"},PM=["src"];function LM(a,d,A,U,ae,O){const E=g.resolveComponent("GSCButton");return g.openBlock(),g.createElementBlock("div",MM,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.expandedInfoPlayerGames)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.dataContainer),id:"data-container"},[g.createElementVNode("div",{class:g.normalizeClass([a.$style.containerInfoGames,A.additionalClass]),id:"container-info"},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited)},[A.viewTeam?(g.openBlock(),g.createElementBlock("p",{key:0,class:g.normalizeClass(a.$style.equipoAtlasSeleccinMexiGames)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.equipoGames)},"Equipo: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.atlasSeleccinGames)},g.toDisplayString(A.data.teams),3)],2)):g.createCommentVNode("",!0),A.viewAge?(g.openBlock(),g.createElementBlock("p",{key:1,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.equipoGames)},"Edad: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.age)+" años",3),g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)}," ("+g.toDisplayString(A.data.dataofbirth)+")",3)],2)):g.createCommentVNode("",!0),A.viewNationality?(g.openBlock(),g.createElementBlock("p",{key:2,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"Nacionalidad: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},[g.createTextVNode(g.toDisplayString(A.data.nationality.substring(0,3).toUpperCase())+" ",1),g.createElementVNode("div",{class:g.normalizeClass(a.$style.countryFlag)},[g.createElementVNode("img",{src:A.data.countryFlag},null,8,PM)],2)],2)],2)):g.createCommentVNode("",!0),A.viewPosition?(g.openBlock(),g.createElementBlock("p",{key:3,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"Posición: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.position),3)],2)):g.createCommentVNode("",!0)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited12)},[A.viewGames&&!A.isLive?(g.openBlock(),g.createElementBlock("p",{key:0,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"partidos Jugados: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.games),3)],2)):g.createCommentVNode("",!0),A.viewMin&&!A.isLive?(g.openBlock(),g.createElementBlock("p",{key:1,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"Minutos Jugados: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.min),3)],2)):g.createCommentVNode("",!0),A.viewGoals?(g.openBlock(),g.createElementBlock("p",{key:2,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},g.toDisplayString(A.data.category)+": ",3),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.goals),3)],2)):g.createCommentVNode("",!0),A.viewEffectiveness?(g.openBlock(),g.createElementBlock("p",{key:3,class:g.normalizeClass(a.$style.nacionalidadMex)},[g.createElementVNode("span",{class:g.normalizeClass(a.$style.span12)},"Efectividad de pases: ",2),g.createElementVNode("span",{class:g.normalizeClass(a.$style.aosGames)},g.toDisplayString(A.data.effectiveness.toFixed(0))+"%",3)],2)):g.createCommentVNode("",!0)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerButton),id:"btn-container"},[A.viewButton?(g.openBlock(),g.createBlock(E,{key:0,style:g.normalizeStyle(A.additionalClass!=""&&U.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:d[0]||(d[0]=t=>O.viewProfile(A.data.id))},null,8,["style"])):g.createCommentVNode("",!0)],2)],2)],2)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(a.$style.infoExpanded)},[g.createElementVNode("div",{class:g.normalizeClass([a.$style.containerDataBg,A.additionalClass])},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnitedParent)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[2]||(d[2]=g.createElementVNode("span",null,"Posición en la tabla: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[3]||(d[3]=g.createElementVNode("span",null,"Goles anotados: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.goals),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[4]||(d[4]=g.createElementVNode("span",null,"Goles recibidos: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.goals_received),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[5]||(d[5]=g.createElementVNode("span",null,"Partidos jugados:",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.games_played),3)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnitedParent)},[A.viewEffectiveness?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.manchesterUnited1)},[d[6]||(d[6]=g.createElementVNode("span",null,"Efectividad de pases: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.effectiveness.toFixed(0))+"%",3)],2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[7]||(d[7]=g.createElementVNode("span",null,"xG: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.xg),3)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnitedParent)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[g.createElementVNode("span",null,g.toDisplayString(A.data.category)+": ",1),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.total),3)],2),A.viewEffectiveness?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.manchesterUnited8)},[d[8]||(d[8]=g.createElementVNode("span",null,"Efectividad de pases: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.effectiveness)+"%",3)],2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited8)},[d[9]||(d[9]=g.createElementVNode("span",null,"xG: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.xg),3)],2)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.containerDataSm)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.frameDiv)},[g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[10]||(d[10]=g.createElementVNode("span",null,"Posición en la tabla: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.position),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[11]||(d[11]=g.createElementVNode("span",null,"Goles anotados: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.goals),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[12]||(d[12]=g.createElementVNode("span",null,"Goles recibidos: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.goals_received),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[13]||(d[13]=g.createElementVNode("span",null,"Partidos jugados: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.games_played),3)],2)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnitedParent1)},[A.viewEffectiveness?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(a.$style.manchesterUnited14)},[d[14]||(d[14]=g.createElementVNode("span",null,"Efectividad de pases: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.effectiveness.toFixed(0))+"%",3)],2)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[d[15]||(d[15]=g.createElementVNode("span",null,"xG: ",-1)),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.xg),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited1)},[g.createElementVNode("span",null,g.toDisplayString(A.data.category)+": ",1),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.total),3)],2),g.createElementVNode("div",{class:g.normalizeClass(a.$style.manchesterUnited8)},[g.createElementVNode("span",null,g.toDisplayString(A.data.category)+": ",1),g.createElementVNode("span",{class:g.normalizeClass(a.$style.spanGames)},g.toDisplayString(A.data.total),3)],2)],2)],2),A.viewButton?(g.openBlock(),g.createBlock(E,{key:0,style:g.normalizeStyle(A.additionalClass!=""&&U.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:d[1]||(d[1]=t=>O.viewProfile(A.data.id))},null,8,["style"])):g.createCommentVNode("",!0)],2)):g.createCommentVNode("",!0)],512)}const zM={$style:CM},OM=Wd(h1,[["render",LM],["__cssModules",zM],["__scopeId","data-v-5dd9e88d"]]),Rx={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"},p1={components:{GSCLeaders:e7,GSCRowTable:DA,GSCTableHeader:qC,GSCExpandedInfo:OM},props:{isTeam:{type:Boolean,default:!1},typeTable:{type:Number,default:0},carrousel:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},typeData:{type:Number,default:0},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},dummyData:{type:Array,default:null}},setup(){const a=g.ref("myDivRef"),{elementSize:d}=pf(a);return{myDivRef:a,elementSize:d}},watch:{game:{immediate:!0,deep:!0,async handler(a){a&&(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(a){await this.getCategoryStats(this.season),a===1&&this.game.is_live?(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)):clearInterval(this.intervalIdtops)}},filtersProp:{immediate:!1,deep:!0,async handler(a,d){a&&(JSON.stringify(a)!==JSON.stringify(d)||this.sonConjuntosDistintos(a.setNationalitiesIds,d.setNationalitiesIds))&&(this.isloading=!0,this.filterEmitAux=a,[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.dummyData&&this.category===0)return[this.dummyData];if(this.changeStateLoading(!0),Object.entries(this.statsData).length>0&&this.formatFilterStats.length>0){var a={},d={},A=[],U=[],ae=[];return this.formatFilterStats.map(O=>{a[O.team_id]?a[O.team_id].total=a[O.team_id].total+O.total:(a[O.team_id]={},a[O.team_id].total=O.total,a[O.team_id].id=this.teamInfo[O.team_id].id,a[O.team_id].name=this.teamInfo[O.team_id].name.replace(" Femenil",""),a[O.team_id].img="https://golstatsimages.blob.core.windows.net/teams-80/"+O.team_id+".png",a[O.team_id].effectiveness=this.teamInfo[O.team_id].effectiveness,a[O.team_id].frecuency=this.teamInfo[O.team_id].frecuency,a[O.team_id].game_avg=this.teamInfo[O.team_id].game_avg,a[O.team_id].game_avg_last_season=this.teamInfo[O.team_id].game_avg_last_season,a[O.team_id].games_played_lastseason=this.teamInfo[O.team_id].games_played_lastseason,a[O.team_id].games_played=this.teamInfo[O.team_id].games_played,a[O.team_id].positiontable=this.teamInfo[O.team_id].positiontable,a[O.team_id].goals=this.teamInfo[O.team_id].goals,a[O.team_id].goalsrecived=this.teamInfo[O.team_id].goalsrecived,a[O.team_id].xg=this.teamInfo[O.team_id].xg),d[O.player_id]?O.player_id!=0&&O.player_id!=62117&&(d[O.player_id].total=d[O.player_id].total+O.total):O.player_id!=0&&O.player_id!=62117&&(d[O.player_id]={},d[O.player_id].total=O.total,O.player_id&&this.playersInfo[O.player_id]?(d[O.player_id].name=this.playersInfo[O.player_id].name,d[O.player_id].name_short=this.getnameshort(this.playersInfo[O.player_id].name),d[O.player_id].img=this.playersInfo[O.player_id].img,d[O.player_id].id=this.playersInfo[O.player_id].id,d[O.player_id].age=this.playersInfo[O.player_id].age,d[O.player_id].team=this.playersInfo[O.player_id].team,d[O.player_id].teamname=this.playersInfo[O.player_id].teamname,d[O.player_id].teamid=this.playersInfo[O.player_id].teamid,d[O.player_id].position=this.playersInfo[O.player_id].position,d[O.player_id].positionId=this.playersInfo[O.player_id].positionId,d[O.player_id].positionfull=this.playersInfo[O.player_id].positionfull,d[O.player_id].country=this.playersInfo[O.player_id].country,d[O.player_id].effectiveness=this.playersInfo[O.player_id].effectiveness,d[O.player_id].minutes=this.playersInfo[O.player_id].minutes_played,d[O.player_id].games=this.playersInfo[O.player_id].games_played,d[O.player_id].date=this.playersInfo[O.player_id].date,d[O.player_id].nationality=this.playersInfo[O.player_id].nationality,d[O.player_id].player_country_flag=this.playersInfo[O.player_id].player_country_flag,d[O.player_id].categoryName=this.categoryName):(d[O.player_id].id=O.player_id,d[O.player_id].name=O.player_id,d[O.player_id].img="SIN IMAGEN",d[O.player_id].age="",d[O.player_id].teamname="",d[O.player_id].team="",d[O.player_id].teamid=0,d[O.player_id].position="",d[O.player_id].positionId=0,d[O.player_id].positionfull="",d[O.player_id].country="",d[O.player_id].effectiveness="",d[O.player_id].minutes="",d[O.player_id].games="",d[O.player_id].date="00-00-0000",d[O.player_id].nationality="",d[O.player_id].player_country_flag="",d[O.player_id].categoryName=""))}),A.push(...Object.values(a)),U.push(...Object.values(d)),A=this.sortAndSlice(Object.values(a),60),U=U.sort(this.compareObjectsMinutes).slice(0,60),U=U.map((O,E)=>(O.top=E<9?"0"+(E+1):""+(E+1),O)),A=A.map((O,E)=>(O.top=E<9?"0"+(E+1):""+(E+1),O)),this.filterTeam!==0&&!this.isTeam&&(ae=U.filter(O=>O.teamid===this.filterTeam)),this.changeStateLoading(!1),this.isTeam?this.formatArrayPaginate(A):this.filterTeam!=0?this.formatArrayPaginate(ae):this.formatArrayPaginate(U)}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(a){this.isloading=a},compareObjectsMinutes(a,d){return a.total>d.total?-1:a.total<d.total?1:a.minutes<d.minutes?-1:a.minutes>d.minutes?1:0},sonConjuntosDistintos(a,d){const A=Array.from(a),U=Array.from(d);if(A.length!==U.length)return!0;for(let ae=0;ae<A.length;ae++)if(!d.has(A[ae]))return!0;return!1},getnameshort(a){var d=a.split(","),A=d[0].split(" "),U=d[1].trim().split(" "),ae="";A.length==2||A.length==1?A[0].length<4?ae=A[0]+" "+A[1]:ae=A[0]:A.length==3?ae=A[0]+" "+A[1]:A.length==4&&(ae=A[1]+" "+A[2]+" "+A[3]);var O=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return ae=ae.replace(",",""),O+". "+ae},changeCarrousel(){this.expand=!1,this.playerexpand=0},compareObjects(a,d){return a.total<d.total?-1:a.total>d.total?1:a.name<d.name?-1:a.name>d.name?1:0},sortAndSlice(a,d){return a.sort((A,U)=>(A.name<U.name?1:-1)&&(A.total<U.total?1:-1)).slice(0,d)},getCategoryName(a){let d="";for(let A=0;A<this.categories.length;A++)a==this.categories[A].id&&(d=this.categories[A].name);return d},translateTopCategories(a){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]}[a]||[]},getCoordinatePointPerCategory(a){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}[a]||0},emitEventMedia(a,d,A){let U=this.filtersValues.matchResult,ae=this.filtersValues.playingAs,O=this.filtersValues.sections,E=this.filtersValues.zone;this.translateTopCategories(d),Object.keys(this.filterEmitAux).length>0&&(U=this.filterEmitAux.matchResult,ae=this.filterEmitAux.playingAs,O=this.filterEmitAux.sections,E=this.filterEmitAux.zone);const t=1,x=this.isTeam?3:2,u=a.player_id;let e=[],b=this.isTeam?a.id:this.filterTeam;u?this.isTeam?b=u:e=[u]:this.isTeam?b=a.id:e=[a.id];const f={auxwidget:!!(this.canPlayVideos||this.game.awayTeam.team_id==this.teamWidget&&this.typeData!=1),seasonId:this.game.is_live==1?this.season:this.game.regularSeasonId,isFeaturedPlayers:!1,mainSectionType:t,playListType:x,gameIds:null,playerIds:e,goalkeeperIds:[],categoryIds:this.translateTopCategories(d),teamId:b||0,matchResult:U,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:A,playingAs:ae,timeSections:O,fieldSections:E,coordinatePoint:this.getCoordinatePointPerCategory(d)}};this.$emit("setopenmedia",f)},emitEventMediaFullTable(a,d,A){let U=this.filtersValues.matchResult,ae=this.filtersValues.playingAs,O=this.filtersValues.sections,E=this.filtersValues.zone,t=this.translateTopCategories(d);Object.keys(this.filterEmitAux).length>0&&(U=this.filterEmitAux.matchResult,ae=this.filterEmitAux.playingAs,O=this.filterEmitAux.sections,E=this.filterEmitAux.zone);const x=1,u=this.isTeam?3:2;let e=[],b=this.isTeam?a.id:this.filterTeam;this.isTeam?b=a.id:e=[a.id];const f={seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:x,playListType:u,gameIds:null,playerIds:e,goalkeeperIds:[],categoryIds:t,teamId:b||0,matchResult:U,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:A,playingAs:ae,timeSections:O,fieldSections:E,coordinatePoint:this.getCoordinatePointPerCategory(d)}};this.$emit("setopenmedia",f)},replaceImgPlayer(a){return a.replace("https://golstatsimages.blob.core.windows.net/players-profile/","https://golstatsimages.blob.core.windows.net/players-profile-no-bg/")},abrevName(a){var d=a.split(","),A=d[0].split(" "),U=d[1].trim().split(" "),ae="";A.length==2||A.length==1?A[0].length<4?ae=A[0]+" "+A[1]:ae=A[0]:A.length==3?ae=A[0]+" "+A[1]:A.length==4&&(ae=A[1]+" "+A[2]+" "+A[3]);var O=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";ae=ae.replace(",","");var E=O+". "+ae;return E},clickMore(a){this.$emit("more",{category:a,categoryName:this.categoryName})},morestats(){this.$emit("more",this.category)},viewprofile(a,d){this.$emit("clickprofile",{id:a,teamId:d,isTeam:this.isTeam})},clickexpand(a){this.expand=a.expand,this.playerexpand=a.id},async getCategoryStats(a){var d,A;console.log("llego aqui; ",a),this.mapPlayers=new Map;try{if(!a)return;let U=[],ae={},O={},E=this.season;(A=(d=this.seasonSelected)==null?void 0:d.related_seasons)!=null&&A.some(u=>u.id===this.season)&&(E=this.seasonSelected.id),this.arePlaysEmpty=!1;const t=Lo.create({headers:{Authorization:`${this.token}`}});this.isloading=!0;let x={};if(console.log("this.typeData:::: ",this.typeData),console.log("this.game, ",this.game),this.game.game_status===1?x=await t.get(this.url+"/"+this.gameId+"/"+this.category):x=await t.get(this.urlPrematch+E+"/"+this.category+"?t="+this.game.home_team+"&t="+this.game.visiting_team),x&&x.data&&x.data.data&&x.data.data.length>0){U=x.data.data.map(e=>this.formatStatsData(e)),x.data.teams.forEach(e=>{ae[e[0]]={},ae[e[0]].id=e[0],ae[e[0]].name=e[1],ae[e[0]].abrv=e[2],ae[e[0]].img=e[3],ae[e[0]].effectiveness=e[4],ae[e[0]].games_played=e[5],ae[e[0]].games_played_lastseason=e[6],ae[e[0]].positiontable=e[7],ae[e[0]].goals=e[8],ae[e[0]].goalsrecived=e[9],ae[e[0]].xg=e[10],ae[e[0]].frecuency=e[11],ae[e[0]].game_avg=e[12],ae[e[0]].game_avg_last_season=e[13]});const u=new Set;x.data.players.forEach(e=>{const b=this.getObjectPlayer(e);this.mapPlayers.set(b.numberId,b);const f=b.numberAge,v=b.teamName.length>0?b.teamName[0].acronym:"",h=b.teamName.length>0?ae[b.teamName[0].team_id].name:"",r=b.teamName.length>0?b.teamName[0].team_id:"",n=this.positions[b.numberPositionId-1].fullname,c=this.positions[b.numberPositionId-1].name,o=b.countryId.length>0?b.countryId[0].nationality_id:"",l=b.effectiveness,p=b.min,m=b.games,w=b.date;b.arrayNationalities.forEach(T=>{u.add(T.numberId)}),O[e[0]]={id:e[0],name:e[1],img:e[2],age:f,team:v,teamname:h,teamid:r,position:n,positionfull:c,effectiveness:l,country:o,games_played:m,minutes_played:p,date:w,nationality:b.stringNationalityName,player_country_flag:b.player_country_flag,positionId:b.numberPositionId}}),this.setNationalityIds=u,this.arrayAgeRange=[x.data.min_age,x.data.max_age]}else this.arePlaysEmpty=!0;this.teamInfo=ae,this.playersInfo=O,this.formatStats=U,this.formatFilterStats=this.filterRecords(this.filtersSelect),this.statsData=x}catch(U){return Promise.reject(U)}},filterRecords(a){return this.formatStats.length>0?this.formatStats.filter(d=>{const A=a.playingAs.includes(d.playing_as),U=a.matchResult.includes(d.match_result),ae=a.sections.includes(d.section),O=a.typeZone===1&&a.zone.includes(d.origen)||a.typeZone===2&&a.zone.includes(d.destino);if(a.setPositionsIds&&a.setNationalitiesIds&&a.arrayAgeRange&&a.setYear&&!this.isTeam){const E=this.mapPlayers.get(d.player_id);if(!E)return!1;if(a.booleanAreNationalTeamsVisible){if(a.setAvailableNationalTeamsPlayersIds.size>0&&!a.setAvailableNationalTeamsPlayersIds.has(d.player_id))return!1}else{let t=!1;for(const x of E.arrayNationalitiesIds)if(a.setNationalitiesIds.has(x)){t=!0;break}if(!t)return!1}if(E.numberAge<a.arrayAgeRange[0]||E.numberAge>a.arrayAgeRange[1]||E.date<a.setYear||!a.setPositionsIds.includes(E.numberPositionId))return!1}return(a.playingAs.length===0||A)&&(a.matchResult.length===0||U)&&(a.sections.length===0||ae)&&(a.zone.length===0||O)}):[]},updateSliderF(){this.updateSlider+=1},formatStatsData(a){const d={};return a[1]===0&&(a[2]===1||a[2]===2)&&(a[2]=3-a[2]),a[1]===0&&(a[3]===1||a[3]===2)&&(a[3]=3-a[3]),this.data_headers.forEach((A,U)=>{d[A]=a[U]}),d},getObjectPlayer(a){const d=[],A=a[7].map(ae=>(d.push(ae.nationality_id),{stringName:ae.nationality,numberId:ae.nationality_id})),U=a[9].split("-");return{numberId:a[0]!==void 0?a[0]:"",stringFullName:a[1]!==void 0?a[1]:"",stringImageUrl:a[2]!==void 0?a[2]:"",numberTeamId:a[3]!==void 0?a[3]:"",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+a[3]+".jpg",stringNationalityName:Rx[a[3]],numberAge:a[5]!==void 0?a[5]:"",numberPositionId:a[6]!==void 0?a[6]:"",countryId:a[7]!==void 0?a[7]:"",teamName:a[10]!==void 0?a[10]:"",effectiveness:a[11]!==void 0?a[11]:"",min:a[13]!==void 0?a[13]:"",games:a[12]!==void 0?a[12]:"",date:U.length>0?Number(U[0]):0,arrayNationalities:A,category:this.categoryName,arrayNationalitiesIds:d}},formatArrayPaginate(a){return[a.slice(0,this.numRows)]},createIntervalTops(){this.intervalIdtops=setInterval(async()=>{await this.getCategoryStats(this.season)},this.timeLiveComparativeAvanced)},clearTopsInterval(){this.intervalIdtops&&(clearInterval(this.intervalIdtops),this.intervalIdtops=null)}},beforeUnmount(){this.clearTopsInterval()}},Dx=()=>{g.useCssVars(a=>({"51229f50":a.borderRadius,20035940:a.borderWidth,"1eec5add":a.borderColor}))},Ix=p1.setup;p1.setup=Ix?(a,d)=>(Dx(),Ix(a,d)):Dx;const NM={ref:"myDivRef"},RM={class:"btnViewFullList"},DM={class:"text"},IM={class:"row-table-carrousel"},FM={key:1,class:"container-no-search-result"},VM={key:0,class:"overlay-loading-top"};function BM(a,d,A,U,ae,O){const E=g.resolveComponent("GSCLeaders"),t=g.resolveComponent("GSCRowTable"),x=g.resolveComponent("GSCExpandedInfo"),u=g.resolveComponent("GSCTableHeader");return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(A.type==0?"gsc-top":"gsc-top-full")},[g.createElementVNode("div",NM,[A.type==0?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[O.topData.length>0?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[g.createElementVNode("div",RM,[g.createElementVNode("div",DM,g.toDisplayString(A.categoryName),1)]),g.createElementVNode("div",IM,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(O.topData[0],(e,b)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:b},[e.top==1?(g.openBlock(),g.createBlock(E,{key:0,onMediadata:d[0]||(d[0]=f=>O.emitEventMedia(f,A.category,A.categoryName)),type:A.typeTable,"type-data":A.typeData,game:A.game,arrow:A.arrow,"team-widget":A.teamWidget,"can-play-videos":A.canPlayVideos,"is-expanded":a.playerexpand==e.id&&a.expand,ref_for:!0,ref:"GSCLeaders",data:A.typeTable==0?{top:"01",photo:e.img,logo:e.img&&e.img.includes("player-shadow")?"https://golstatsimages.blob.core.windows.net/images-library/logo-team@2x.png":"https://golstatsimages.blob.core.windows.net/teams-80/"+e.teamid+".png",name:e.name,player_short:e.name_short,player_id:e.id,categoryId:A.category,total:e.total}:{top:"01",logo:e.img,total:e.total,name_team:e.name,player_id:e.id},"category-name":A.categoryName,buttonMaxWidth:A.typeTable!=0?U.elementSize.width>360?"210px":"130px":U.elementSize.width>360?"180px":"110px",buttonFontSize:"12px",iconSize:"11px",onExpand:O.clickexpand,onMore:O.morestats},null,8,["type","type-data","game","arrow","team-widget","can-play-videos","is-expanded","data","category-name","buttonMaxWidth","onExpand","onMore"])):(g.openBlock(),g.createBlock(t,{key:1,"type-data":A.typeData,"team-widget":A.teamWidget,game:A.game,type:A.typeTable,"type-view":A.type,arrow:A.arrow,"is-expanded":a.playerexpand==e.id&&a.expand,onMediadata:d[1]||(d[1]=f=>O.emitEventMedia(f,A.category,A.categoryName)),data:A.typeTable==0?{position:e.top,player_name:e.name,player_short:e.name_short,player_photo:e.img,total:e.total,id:e.id,player_age:e.age,team_abrev:e.team,team_logo:e.img&&e.img.includes("player-shadow")?"https://golstatsimages.blob.core.windows.net/images-library/logo-team@2x.png":"https://golstatsimages.blob.core.windows.net/teams-80/"+e.teamid+".png",player_position:e.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+e.country+".jpg",player_games:e.minutes,player_min:e.games,league_name:" Liga MX "}:{position:e.top,team_logo:e.img,team_abrev:e.name,frequency:e.frecuency,promthistournament:e.game_avg,promlasttournament:e.game_avg_last_season,teams_games:"-",category:A.category,total:e.total,id:e.id},height:"71px","can-play-videos":A.canPlayVideos,background:b%2===0?A.backgroundEven:A.backgroundOdd,onExpand:O.clickexpand},null,8,["type-data","team-widget","game","type","type-view","arrow","is-expanded","data","can-play-videos","background","onExpand"])),a.expand&&a.playerexpand==e.id?(g.openBlock(),g.createBlock(x,{key:2,type:A.typeTable,"is-live":A.game.is_live,"view-effectiveness":e.positionId!==1,data:A.typeTable==0?{teams:e.teamname,age:e.age,dataofbirth:e.date,nationality:e.nationality,countryFlag:e.player_country_flag,position:e.position,games:e.games,min:e.minutes,goals:e.total,effectiveness:e.effectiveness,category:A.categoryName,id:e.id}:{position:e.positiontable,goals:e.goals,goals_received:e.goalsrecived,games_played:e.games_played,category:A.categoryName,effectiveness:e.effectiveness,xg:e.xg,total:e.total,attendance:"-",id:e.id},onViewprofile:f=>O.viewprofile(f,e.teamid),background:b%2===0?A.backgroundEven:A.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):g.createCommentVNode("",!0)],64))),128))])],64)):(g.openBlock(),g.createElementBlock("div",FM,[a.isloading?(g.openBlock(),g.createElementBlock("div",VM,d[3]||(d[3]=[g.createElementVNode("div",{class:"overlay-loading-top__spinner"},[g.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),g.createElementVNode("div",{class:"overlay-loading-top__text"},"Loading...",-1)]))):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[d[4]||(d[4]=g.createElementVNode("div",{class:"container-no-search-result-title"},"No existen resultados",-1)),d[5]||(d[5]=g.createElementVNode("div",{class:"container-no-search-result-subtitle"},[g.createTextVNode(" No existen resultados para este tipo de"),g.createElementVNode("br"),g.createTextVNode(" jugada, considerando el torneo y otros"),g.createElementVNode("br"),g.createTextVNode(" filtros que has seleccionado. ")],-1))],64))]))],64)):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createVNode(u,{background:"#183143",type:A.typeTable},null,8,["type"]),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(O.topData,(e,b)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:b},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.slice(0,A.numRows),(f,v)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:v},[g.createVNode(t,{"type-data":A.typeData,"team-widget":A.teamWidget,game:A.game,arrow:A.arrow,type:A.typeTable,"type-view":A.type,"can-play-videos":A.canPlayVideos,"is-expanded":a.playerexpand==f.id&&a.expand,onMediadata:d[2]||(d[2]=h=>O.emitEventMediaFullTable(h,A.category,A.categoryName)),data:A.typeTable==0?{position:f.top,player_name:f.name,player_short:f.name_short,player_photo:f.img,total:f.total,id:f.id,player_age:f.age,team_abrev:f.team,team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+f.teamid+".png",player_position:f.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+f.country+".jpg",player_games:f.games,player_min:f.minutes,league_name:" Liga MX "}:{position:f.positiontable,team_logo:f.img,team_abrev:f.name,frequency:f.frecuency,promthistournament:f.game_avg,promlasttournament:f.game_avg_last_season,category:A.category,team_games:f.games_played,total:f.total,id:f.id},height:"71px",background:((b+1)*5+v)%2===0?A.backgroundOdd:A.backgroundEven,onExpand:O.clickexpand},null,8,["type-data","team-widget","game","arrow","type","type-view","can-play-videos","is-expanded","data","background","onExpand"]),a.expand&&a.playerexpand==f.id?(g.openBlock(),g.createBlock(x,{key:0,type:A.typeTable,"is-live":A.game.is_live,additionalClass:"fullTable","view-effectiveness":f.positionId!==1,data:A.typeTable==0?{teams:f.teamname,age:f.age,dataofbirth:f.date,nationality:f.nationality,countryFlag:f.player_country_flag,position:f.positionfull,positionfull:f.positionfull,games:f.games,min:f.minutes,goals:f.total,effectiveness:f.effectiveness,category:O.getCategoryName(A.category),id:f.id}:{position:f.positiontable,goals:f.goals,goals_received:f.goalsrecived,games_played:f.games_played,category:A.categoryName,effectiveness:f.effectiveness,xg:f.xg,total:f.total,category:O.getCategoryName(A.category),attendance:"-",id:f.id},onViewprofile:h=>O.viewprofile(h,f.teamid),background:v%2===0?A.backgroundEven:A.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):g.createCommentVNode("",!0)],64))),128))],64))),128))],64))],512)],2)}const UM=Wd(p1,[["render",BM],["__scopeId","data-v-0e14a382"]]),ff={YEAR:2,AGE_RANGE:3,NATIONALITY:4,POSITION:5,ELIGIBILITY:6},jM=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},qM={key:1},WM={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},HM=["fill"],GM={key:0,class:"checkbox__teams"},XM={class:"checkbox__teams__logo"},KM=["src"],JM={class:"checkbox__teams__logo"},$M=["src"],ZM={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(a){return["left","right","top","bottom"].includes(a)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(a,{emit:d}){const A=a;g.useCssVars(u=>({"7bd9d47b":a.width,"34dc7ddc":a.height}));const U=g.ref(!1),ae=g.computed(()=>{const u={color:A.boxValueColor,"font-family":A.fontFamily,height:A.boxWidthAndHeight,width:A.boxWidthAndHeight,minWidth:A.boxWidthAndHeight,"border-radius":A.boxBorderRadius,"margin-top":A.boxMarginTop};return U.value?(u["background-color"]=A.boxBackgroundColor,u.border=`solid ${A.boxBorderWidth} ${A.boxBackgroundColor}`):u.border=`solid ${A.boxBorderWidth} ${A.boxBorderColor}`,u}),O=g.computed(()=>({"font-family":A.boxValueFontFamily,"font-size":A.boxValueFontSize,color:A.boxValueColor,"line-height":1})),E=g.computed(()=>{const u={color:A.labelColor,"font-family":A.fontFamily,"font-size":A.labelFontSize,"white-space":A.labelWhiteSpace,"text-align":A.boxPosition==="top"||A.boxPosition==="bottom"?"center":A.boxPosition};return(A.boxPosition==="left"||A.boxPosition==="right")&&(u[`margin-${A.boxPosition}`]=A.isBoxOnly?"0":A.teamsIds?"8px":"10px"),u});g.watch(()=>A.modelValue,u=>{u!==U.value&&(U.value=u)},{immediate:!0});function t(){A.avoidInteraction||!U.value&&A.avoidToCheck||(U.value=!U.value,d("update:modelValue",U.value))}function x(u){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${u}.png`}return(u,e)=>(g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["checkbox",`box-${a.boxPosition}`]),onClick:t},[g.createElementVNode("div",{class:"checkbox__box",style:g.normalizeStyle(ae.value)},[U.value?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[A.boxValue?(g.openBlock(),g.createElementBlock("div",{key:0,class:"checkbox__box__value",style:g.normalizeStyle(O.value)},g.toDisplayString(a.boxValue),5)):(g.openBlock(),g.createElementBlock("div",qM,[(g.openBlock(),g.createElementBlock("svg",WM,[g.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:a.boxValueColor},null,8,HM)]))]))],64)):g.createCommentVNode("",!0)],4),a.teamsIds&&a.teamsIds.length?(g.openBlock(),g.createElementBlock("div",GM,[g.createElementVNode("div",XM,[g.createElementVNode("img",{src:x(a.teamsIds[0]),alt:""},null,8,KM)]),g.createElementVNode("div",JM,[g.createElementVNode("img",{src:x(a.teamsIds[1]),alt:""},null,8,$M)])])):g.createCommentVNode("",!0),g.createElementVNode("div",{class:"checkbox__label",style:g.normalizeStyle(E.value)},g.toDisplayString(a.label),5)],2))}},f1=jM(ZM,[["__scopeId","data-v-b6f124d8"]]),Qc=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},YM={PLAYS:"plays",PRODUCTIVITY:"productivity",FIELD:"field",UNIVERSE:"universe",DETAILS:"details",TOURNAMENTS:"tournaments",PERSONAL_DATA:"personalData",PLAYS_TYPES:"playsTypes",GOLSTATS:"golstats",DISTANCE:"distance",RESULTS:"results",RESULTS_BY_TIME:"resultsByTime",VIDEOS:"videos",GAMES:"games",TAKEN_CORNERS:"takenCorners",HOW_WAS_CORNER:"howWasCorner",ZONE:"zone",WHAT_HAPPENED:"whatHappened"},QM=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},m1={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(a){this.status=a}}},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(a){this.$emit("click",a),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Fx=()=>{g.useCssVars(a=>({"9d01acb4":a.height,"14e95081":a.borderWidthBtn,"38fec285":a.borderType,34353510:a.borderColor,"20d20dc6":a.borderRadius,17130967:a.width,"4ccb7d36":a.backgroundColor,"5d1e86a2":a.cursorType,ce65d4a2:a.fontSize,fe4ac47a:a.fontStyle,f98e44dc:a.fontFamily,"93b87770":a.marginLeftStat,c7f7beba:a.fontSizeStat}))},Vx=m1.setup;m1.setup=Vx?(a,d)=>(Fx(),Vx(a,d)):Fx;const eP=a=>(g.pushScopeId("data-v-f3ee6b2b"),a=a(),g.popScopeId(),a),tP=["src"],rP={key:1,class:"text"},nP=["src"],aP={class:"stats"},iP=eP(()=>g.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),oP={class:"numstats"},sP={class:"leyend"};function lP(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["button",ae.status&&A.typeOnOff&&"button-active"]),style:g.normalizeStyle([O.customStyle,ae.status&&A.typeOnOff&&O.customActive]),onClick:d[0]||(d[0]=(...E)=>O.btnClick&&O.btnClick(...E))},[A.icon&&A.iconPosition.toLowerCase()==="left"?(g.openBlock(),g.createElementBlock("img",{key:0,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,tP)):g.createCommentVNode("",!0),A.textValue?(g.openBlock(),g.createElementBlock("div",rP,g.toDisplayString(A.textValue),1)):g.createCommentVNode("",!0),A.icon&&A.iconPosition.toLowerCase()==="right"?(g.openBlock(),g.createElementBlock("img",{key:2,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,nP)):g.createCommentVNode("",!0)],6)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...E)=>O.btnClick&&O.btnClick(...E))},[g.createElementVNode("div",aP,[iP,g.createElementVNode("div",oP,g.toDisplayString(A.textStat),1)]),g.createElementVNode("div",sP,g.toDisplayString(A.textCategory),1)])):g.createCommentVNode("",!0)])}const cP=QM(m1,[["render",lP],["__scopeId","data-v-f3ee6b2b"]]),uP={class:"gsc-dropdown__main-container__item-selected"},dP=["height","width"],hP=["stroke"],pP={key:1,width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fP=["fill"],mP={class:"gsc-dropdown__items-container"},gP=["onClick"],yP={key:0,class:"gsc-dropdown__items-footer"},g1={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(a){return["solid","dotted","dashed"].includes(a)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:a=>["propName","value"].every(d=>d in a)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1},iconType:{type:Number,default:1,validator:function(a){return[1,2].includes(a)}}},emits:["input","click-ready","update:modelValue"],setup(a,{emit:d}){const A=a,U=g.ref({}),ae=g.ref(null),O=g.ref(A.isMultipleOption?-1:0),E=g.ref(!1);g.watch(()=>A.items,(v,h)=>{if(!A.modelValue&&(!A.onlyFirstTime||!h||!h.length)&&v&&v.length){if(A.defaultItemByProp){const r=A.items.findIndex(n=>n[A.defaultItemByProp.propName]===A.defaultItemByProp.value);r!==-1?(O.value=r,U.value=v[r]):(O.value=0,U.value=v[0])}else U.value=v[A.defaultItemByIndex];d("input",U.value)}},{immediate:!0}),g.watch(()=>A.modelValue,v=>{if(v){const h=A.items.findIndex(r=>typeof v=="object"?JSON.stringify(r)===JSON.stringify(v):r===v);h!==-1&&(O.value=h,U.value=A.items[h],d("update:modelValue",U.value))}},{immediate:!0});const t=g.computed(()=>({height:A.height,width:A.width,backgroundColor:A.backgroundColor,borderRadius:`${A.borderRadius}px`,border:`${A.borderType} ${A.borderWidth}px ${A.borderColor}`,color:A.color,"--hover-background-color":A.hoverBackgroundColor,"--list-container-padding":A.listContainerPadding,"--list-item-padding":A.listItemPadding,"--list-item-margin":A.listItemMargin,"--list-background-color":A.listBackgroundColor,"--list-height":A.listHeight,"--list-item-border-radius":A.listItemBorderRadius,"--list-item-selected-color":A.listItemSelectedColor,"--list-item-selected-background-color":A.listItemSelectedBackgroundColor,"--list-item-color":A.listItemColor,"--list-border-radius":`${A.listBorderRadius}`,"--list-border-color":A.listBorderColor,"--list-width":A.isListSameWidth?A.width:"fit-content","--list-border-width":`${A.listBorderWidth}px`,"--list-margin-top":A.listMarginTop,"--list-left":A.listAlignment==="left"?"0":"auto","--list-right":A.listAlignment==="right"?"0":"auto","--footer-border":`${A.footerBorderWidth}px solid ${A.footerBorderColor}`,"--dropdown-opacity":A.isDisabled?"0.5":"1","--dropdown-cursor":A.isDisabled?"not-allowed":"pointer","--dropdown-font-size":A.fontSize?A.fontSize:"14px"})),x=g.computed(()=>({height:`${A.arrowHeight}px`,width:`${A.arrowWidth}px`}));function u(){A.isDisabled||(E.value=!E.value)}function e(v){ae.value&&!ae.value.contains(v.target)&&(E.value=!1)}function b(v,h){A.isMultipleOption?O.value=-1:(O.value=h,E.value=!1),U.value=v,d("input",U.value),d("update:modelValue",U.value)}function f(){E.value=!1,d("click-ready")}return g.onMounted(()=>{document.addEventListener("click",e)}),g.onBeforeMount(()=>{document.removeEventListener("click",e)}),(v,h)=>(g.openBlock(),g.createElementBlock("div",{ref_key:"dropDown",ref:ae,class:"gsc-dropdown",style:g.normalizeStyle(t.value)},[g.createElementVNode("div",{class:"gsc-dropdown__main-container",style:g.normalizeStyle({"padding-right":`${a.arrowWidth+8}px`}),onClick:u},[g.createElementVNode("div",uP,[g.renderSlot(v.$slots,"default",{selectedItem:U.value})]),g.createElementVNode("div",{class:g.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":E.value}]),style:g.normalizeStyle(x.value)},[a.iconType===1?(g.openBlock(),g.createElementBlock("svg",{key:0,height:a.arrowHeight,width:a.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:a.arrowColor},null,8,hP)],8,dP)):(g.openBlock(),g.createElementBlock("svg",pP,[g.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:a.arrowColor},null,8,fP)]))],6)],4),g.createVNode(g.Transition,null,{default:g.withCtx(()=>[g.withDirectives(g.createElementVNode("div",mP,[g.createElementVNode("div",null,[g.createElementVNode("div",{class:"gsc-dropdown__items",style:g.normalizeStyle({"margin-top":`${A.borderWidth}px`})},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(a.items,(r,n)=>(g.openBlock(),g.createElementBlock("div",null,[g.withDirectives((g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["gsc-dropdown__items__item",{selected:n===O.value}]),key:n,onClick:c=>b(r,n)},[g.renderSlot(v.$slots,"availableItem",{item:r})],10,gP)),[[g.vShow,!r.isHidden]])]))),256))],4),a.isFooterVisible?(g.openBlock(),g.createElementBlock("div",yP,[g.createVNode(g.unref(cP),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):g.createCommentVNode("",!0)])],512),[[g.vShow,E.value]])]),_:3})],4))}},y1={borderType:"solid",listBackgroundColor:"#2E3B46",listBorderColor:"rgba(255, 255, 255, 0.2)",listBorderRadius:"5px",height:"38px",borderWidth:.8,borderColor:"rgba(255, 255, 255, 0.2)",backgroundColor:"#2E3B46",color:"white",listItemColor:"white",listItemSelectedBackgroundColor:"#2E3B46",arrowColor:"#fff",width:"100%",listHeight:"200px",isListSameWidth:!0,isFooterVisible:!0,hoverBackgroundColor:"#2E3B46",iconType:2},vP=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},v1={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(a){this.status=a}}},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(a){this.$emit("click",a),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Bx=()=>{g.useCssVars(a=>({"9d01acb4":a.height,"14e95081":a.borderWidthBtn,"38fec285":a.borderType,34353510:a.borderColor,"20d20dc6":a.borderRadius,17130967:a.width,"4ccb7d36":a.backgroundColor,"5d1e86a2":a.cursorType,ce65d4a2:a.fontSize,fe4ac47a:a.fontStyle,f98e44dc:a.fontFamily,"93b87770":a.marginLeftStat,c7f7beba:a.fontSizeStat}))},Ux=v1.setup;v1.setup=Ux?(a,d)=>(Bx(),Ux(a,d)):Bx;const bP=a=>(g.pushScopeId("data-v-f3ee6b2b"),a=a(),g.popScopeId(),a),xP=["src"],_P={key:1,class:"text"},wP=["src"],kP={class:"stats"},TP=bP(()=>g.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),SP={class:"numstats"},AP={class:"leyend"};function EP(a,d,A,U,ae,O){return g.openBlock(),g.createElementBlock("div",null,[A.type==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["button",ae.status&&A.typeOnOff&&"button-active"]),style:g.normalizeStyle([O.customStyle,ae.status&&A.typeOnOff&&O.customActive]),onClick:d[0]||(d[0]=(...E)=>O.btnClick&&O.btnClick(...E))},[A.icon&&A.iconPosition.toLowerCase()==="left"?(g.openBlock(),g.createElementBlock("img",{key:0,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,xP)):g.createCommentVNode("",!0),A.textValue?(g.openBlock(),g.createElementBlock("div",_P,g.toDisplayString(A.textValue),1)):g.createCommentVNode("",!0),A.icon&&A.iconPosition.toLowerCase()==="right"?(g.openBlock(),g.createElementBlock("img",{key:2,class:"icon",style:g.normalizeStyle({width:A.iconSize}),src:A.icon},null,12,wP)):g.createCommentVNode("",!0)],6)):g.createCommentVNode("",!0),A.type==1?(g.openBlock(),g.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...E)=>O.btnClick&&O.btnClick(...E))},[g.createElementVNode("div",kP,[TP,g.createElementVNode("div",SP,g.toDisplayString(A.textStat),1)]),g.createElementVNode("div",AP,g.toDisplayString(A.textCategory),1)])):g.createCommentVNode("",!0)])}const CP=vP(v1,[["render",EP],["__scopeId","data-v-f3ee6b2b"]]),MP=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},PP={key:1},LP={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},zP=["fill"],OP={key:0,class:"checkbox__teams"},NP={class:"checkbox__teams__logo"},RP=["src"],DP={class:"checkbox__teams__logo"},IP=["src"],FP={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(a){return["left","right","top","bottom"].includes(a)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(a,{emit:d}){const A=a;g.useCssVars(u=>({"7bd9d47b":a.width,"34dc7ddc":a.height}));const U=g.ref(!1),ae=g.computed(()=>{const u={color:A.boxValueColor,"font-family":A.fontFamily,height:A.boxWidthAndHeight,width:A.boxWidthAndHeight,minWidth:A.boxWidthAndHeight,"border-radius":A.boxBorderRadius,"margin-top":A.boxMarginTop};return U.value?(u["background-color"]=A.boxBackgroundColor,u.border=`solid ${A.boxBorderWidth} ${A.boxBackgroundColor}`):u.border=`solid ${A.boxBorderWidth} ${A.boxBorderColor}`,u}),O=g.computed(()=>({"font-family":A.boxValueFontFamily,"font-size":A.boxValueFontSize,color:A.boxValueColor,"line-height":1})),E=g.computed(()=>{const u={color:A.labelColor,"font-family":A.fontFamily,"font-size":A.labelFontSize,"white-space":A.labelWhiteSpace,"text-align":A.boxPosition==="top"||A.boxPosition==="bottom"?"center":A.boxPosition};return(A.boxPosition==="left"||A.boxPosition==="right")&&(u[`margin-${A.boxPosition}`]=A.isBoxOnly?"0":A.teamsIds?"8px":"10px"),u});g.watch(()=>A.modelValue,u=>{u!==U.value&&(U.value=u)},{immediate:!0});function t(){A.avoidInteraction||!U.value&&A.avoidToCheck||(U.value=!U.value,d("update:modelValue",U.value))}function x(u){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${u}.png`}return(u,e)=>(g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["checkbox",`box-${a.boxPosition}`]),onClick:t},[g.createElementVNode("div",{class:"checkbox__box",style:g.normalizeStyle(ae.value)},[U.value?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[A.boxValue?(g.openBlock(),g.createElementBlock("div",{key:0,class:"checkbox__box__value",style:g.normalizeStyle(O.value)},g.toDisplayString(a.boxValue),5)):(g.openBlock(),g.createElementBlock("div",PP,[(g.openBlock(),g.createElementBlock("svg",LP,[g.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:a.boxValueColor},null,8,zP)]))]))],64)):g.createCommentVNode("",!0)],4),a.teamsIds&&a.teamsIds.length?(g.openBlock(),g.createElementBlock("div",OP,[g.createElementVNode("div",NP,[g.createElementVNode("img",{src:x(a.teamsIds[0]),alt:""},null,8,RP)]),g.createElementVNode("div",DP,[g.createElementVNode("img",{src:x(a.teamsIds[1]),alt:""},null,8,IP)])])):g.createCommentVNode("",!0),g.createElementVNode("div",{class:"checkbox__label",style:g.normalizeStyle(E.value)},g.toDisplayString(a.label),5)],2))}},VP=MP(FP,[["__scopeId","data-v-b6f124d8"]]),BP=(a,d)=>{const A=a.__vccOpts||a;for(const[U,ae]of d)A[U]=ae;return A},b1={components:{GSCButton:CP,GSCCheckbox:VP},data(){return{update:0,all:!1,refreshBtn14:0,refreshBtn24:0,refreshBtn34:0,refreshBtn44:0,sectors:Array.from({length:16},(a,d)=>({sector:d+1,active:!1})),lastUpdatedValue:[]}},props:{backgroundColor:{type:String,default:"#2e3b46"},heightContainer:{type:String,default:"340px"},widthContainer:{type:String,default:"455px"},heightField:{type:Number,default:230},widthField:{type:Number,default:350},heightFieldGrid:{type:String,default:"230px"},widthFieldGrid:{type:String,default:"350px"},backgroundSectorActive:{type:String,default:"#cbee6b"},backgroundSectorDisabled:{type:String,default:"#2e3b46"},borderWidth:{type:Number,default:1},opacitySector:{type:Number,default:.5},borderColor:{type:String,default:"#FFFFFF"},colorLineField:{type:String,default:"#bfc2c5"},borderWidthLineField:{type:Number,default:2},value:{type:Array,default:()=>[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},title:{type:String,default:"Pase(s) desde la(s) zona(s):"},titleFontSize:{type:String,default:"14px"}},watch:{value:{deep:!0,immediate:!0,handler(a){const d=a.sort();JSON.stringify(d)!==JSON.stringify(this.lastUpdatedValue)&&(this.lastUpdatedValue=d,this.sectors.forEach((A,U)=>{A.active=a.includes(U+1),this.validateField(U)}),this.$emit("update:modelValue",a))}},sectors:{handler(a){var d=[];for(let A=0;A<a.length;A++)a[A].active&&d.push(A+1);this.$emit("update:modelValue",d)},deep:!0}},computed:{translx(){var a=0;return this.widthField>305?a=this.widthField-305:this.widthField==268&&(a=-36),a},transly(){var a=0;return this.heightField>195?(a=this.heightField-195,a=a/2):this.heightField==180&&(a=-7),a},translxcircle(){var a=0;return this.widthField>305?(a=this.widthField-305,a=a/2):this.widthField==268&&(a=-18),a}},methods:{clickAll(a){if(a){for(let d=0;d<this.sectors.length;d++)this.sectors[d].active=!0,this.validateField(d);this.status14=!0,this.status24=!0,this.status34=!0,this.status44=!0,this.refreshBtn14+=1,this.refreshBtn24+=1,this.refreshBtn34+=1,this.refreshBtn44+=1}else for(let d=0;d<this.sectors.length;d++)this.sectors[d].active=!1,this.validateField(d),this.status14=!1,this.status24=!1,this.status34=!1,this.status44=!1,this.refreshBtn14=0,this.refreshBtn24=0,this.refreshBtn34=0,this.refreshBtn44=0},selectSector(a){var d=0;this.sectors[a].active=!this.sectors[a].active;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0&&(this.sectors[a].active=!0),this.validateField(a)},btn14(a){this.sectors[0].active=a?this.sectors[0].active=!0:this.sectors[0].active=!1,this.sectors[1].active=a?this.sectors[1].active=!0:this.sectors[1].active=!1,this.sectors[2].active=a?this.sectors[2].active=!0:this.sectors[2].active=!1,this.sectors[3].active=a?this.sectors[3].active=!0:this.sectors[3].active=!1;var d=0;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0?(this.sectors[0].active=!0,this.sectors[1].active=!0,this.sectors[2].active=!0,this.sectors[3].active=!0,this.status14=!0,this.refreshBtn14+=1):this.status14=!1,d==16&&(this.all=!0,this.update+=1)},btn24(a){this.sectors[4].active=a?this.sectors[4].active=!0:this.sectors[4].active=!1,this.sectors[5].active=a?this.sectors[5].active=!0:this.sectors[5].active=!1,this.sectors[6].active=a?this.sectors[6].active=!0:this.sectors[6].active=!1,this.sectors[7].active=a?this.sectors[7].active=!0:this.sectors[7].active=!1;var d=0;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0?(this.sectors[4].active=!0,this.sectors[5].active=!0,this.sectors[6].active=!0,this.sectors[7].active=!0,this.status24=!0,this.refreshBtn24+=1):this.status24=!1,d==16&&(this.all=!0,this.update+=1)},btn34(a){this.sectors[8].active=a?this.sectors[8].active=!0:this.sectors[8].active=!1,this.sectors[9].active=a?this.sectors[9].active=!0:this.sectors[9].active=!1,this.sectors[10].active=a?this.sectors[10].active=!0:this.sectors[10].active=!1,this.sectors[11].active=a?this.sectors[11].active=!0:this.sectors[11].active=!1;var d=0;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0?(this.sectors[8].active=!0,this.sectors[9].active=!0,this.sectors[10].active=!0,this.sectors[11].active=!0,this.status34=!0,this.refreshBtn34+=1):this.status34=!1,d==16&&(this.all=!0,this.update+=1)},btn44(a){this.sectors[12].active=a?this.sectors[12].active=!0:this.sectors[12].active=!1,this.sectors[13].active=a?this.sectors[13].active=!0:this.sectors[13].active=!1,this.sectors[14].active=a?this.sectors[14].active=!0:this.sectors[14].active=!1,this.sectors[15].active=a?this.sectors[15].active=!0:this.sectors[15].active=!1;var d=0;for(let A=0;A<this.sectors.length;A++)this.sectors[A].active&&(d+=1);d==0?(this.sectors[12].active=!0,this.sectors[13].active=!0,this.sectors[14].active=!0,this.sectors[15].active=!0,this.status44=!0,this.refreshBtn44+=1):this.status44=!1,d==16&&(this.all=!0,this.update+=1)},validateField(a){(a===0||a===1||a===2||a===3)&&(this.status14=!!(this.sectors[0].active&&this.sectors[1].active&&this.sectors[2].active&&this.sectors[3].active)),(a===4||a===5||a===6||a===7)&&(this.status24=!!(this.sectors[4].active&&this.sectors[5].active&&this.sectors[6].active&&this.sectors[7].active)),(a===8||a===9||a===10||a===11)&&(this.status34=!!(this.sectors[8].active&&this.sectors[9].active&&this.sectors[10].active&&this.sectors[11].active)),(a===12||a===13||a===14||a===15)&&(this.status44=!!(this.sectors[12].active&&this.sectors[13].active&&this.sectors[14].active&&this.sectors[15].active)),this.all=!!(this.status14&&this.status34&&this.status24&&this.status44),this.update+=1,this.status14&&(this.refreshBtn14+=1),this.status24&&(this.refreshBtn24+=1),this.status34&&(this.refreshBtn34+=1),this.status44&&(this.refreshBtn44+=1)}}},jx=()=>{g.useCssVars(a=>({"4fe806fe":a.widthContainer,"91de7c52":a.heightContainer,"266afcdc":a.backgroundColor,"2b853536":a.titleFontSize,"986b6446":a.widthFieldGrid,"1af308b6":a.heightFieldGrid}))},qx=b1.setup;b1.setup=qx?(a,d)=>(jx(),qx(a,d)):jx;const UP={class:"gsc-field"},jP={class:"gsc-field__title-checked"},qP={class:"gsc-field__title-checked__title"},WP={class:"gsc-field__container-field"},HP={class:"gsc-field__container-field__field"},GP={width:"100%",height:"100%",fill:"#2e3b46",xmlns:"http://www.w3.org/2000/svg"},XP=["stroke"],KP=["stroke","stroke-width"],JP=["stroke","stroke-width"],$P=["stroke-width","stroke"],ZP=["fill","fill-opacity","stroke","stroke-width"],YP=["fill","fill-opacity","stroke","stroke-width"],QP=["fill","fill-opacity","stroke","stroke-width"],eL=["fill","fill-opacity","stroke","stroke-width"],tL=["fill","fill-opacity","stroke","stroke-width"],rL=["fill","fill-opacity","stroke","stroke-width"],nL=["fill","fill-opacity","stroke","stroke-width"],aL=["fill","fill-opacity","stroke","stroke-width"],iL=["fill","fill-opacity","stroke","stroke-width"],oL=["fill","fill-opacity","stroke","stroke-width"],sL=["fill","fill-opacity","stroke","stroke-width"],lL=["fill","fill-opacity","stroke","stroke-width"],cL=["fill","fill-opacity","stroke","stroke-width"],uL=["fill","fill-opacity","stroke","stroke-width"],dL=["fill","fill-opacity","stroke","stroke-width"],hL=["fill","fill-opacity","stroke","stroke-width"],pL={class:"gsc-field__container-field__bar-buttons"};function fL(a,d,A,U,ae,O){const E=g.resolveComponent("GSCCheckbox"),t=g.resolveComponent("GSCButton");return g.openBlock(),g.createElementBlock("div",UP,[g.createElementVNode("div",jP,[g.createElementVNode("div",qP,g.toDisplayString(A.title),1),g.createElementVNode("div",{class:"gsc-field__title-checked__check-cont",style:g.normalizeStyle(A.widthField>=350?"min-width: 123px":"")},[(g.openBlock(),g.createBlock(E,{label:A.widthField<350?"Todas":"Todas las zonas","font-family":"Poppins-Regular","box-value-font-family":"Poppins-Regular","box-position":"right","label-font-size":A.titleFontSize,"label-white-space":"nowrap","box-margin-top":"0.4em",value:ae.all,key:ae.update,"model-value":ae.all,"onUpdate:modelValue":O.clickAll},null,8,["label","label-font-size","value","model-value","onUpdate:modelValue"]))],4)]),g.createElementVNode("div",WP,[g.createElementVNode("div",HP,[(g.openBlock(),g.createElementBlock("svg",GP,[g.createElementVNode("rect",{x:"1.5",y:"0.5",width:"100%",height:"100%",rx:"1.5",stroke:A.colorLineField},null,8,XP),g.createElementVNode("path",{style:g.normalizeStyle("transform: translate("+O.translx+"px, "+O.transly+"px);"),d:"M303.597 39.9799H263.371C262.817 39.9799 262.369 40.4301 262.371 40.984L262.842 155.176C262.845 155.726 263.292 156.172 263.842 156.172H302.884",stroke:A.colorLineField,"stroke-width":A.borderWidthLineField,"stroke-linecap":"square"},null,12,KP),g.createElementVNode("path",{style:g.normalizeStyle("transform: translateY("+O.transly+"px);"),class:"porteria1",d:"M1.09097 156.172L41.3162 156.172C41.8701 156.172 42.3185 155.722 42.3162 155.168L41.845 40.9758C41.8427 40.4252 41.3957 39.98 40.845 39.98L1.80338 39.98",stroke:A.colorLineField,"stroke-width":A.borderWidthLineField,"stroke-linecap":"square"},null,12,JP),g.createElementVNode("path",{style:g.normalizeStyle("transform: translate("+O.translxcircle+"px, "+O.transly+"px);"),class:"circle",d:"M182.911 97.4512C182.911 113.726 169.44 126.936 152.801 126.936C136.162 126.936 122.691 113.726 122.691 97.4512C122.691 81.1767 136.162 67.9662 152.801 67.9662C169.44 67.9662 182.911 81.1767 182.911 97.4512Z","stroke-width":A.borderWidthLineField,stroke:A.colorLineField},null,12,$P),g.createElementVNode("rect",{x:"0%",y:"0%",width:"25%",height:"25%",fill:ae.sectors[0].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[0]||(d[0]=x=>O.selectSector(0))},null,8,ZP),g.createElementVNode("rect",{x:"0%",y:"25%",width:"25%",height:"25%",fill:ae.sectors[1].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[1]||(d[1]=x=>O.selectSector(1))},null,8,YP),g.createElementVNode("rect",{x:"0%",y:"50%",width:"25%",height:"25%",fill:ae.sectors[2].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[2]||(d[2]=x=>O.selectSector(2))},null,8,QP),g.createElementVNode("rect",{x:"0%",y:"75%",width:"25%",height:"25%",fill:ae.sectors[3].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[3]||(d[3]=x=>O.selectSector(3))},null,8,eL),g.createElementVNode("rect",{x:"25%",y:"0%",width:"25%",height:"25%",fill:ae.sectors[4].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[4]||(d[4]=x=>O.selectSector(4))},null,8,tL),g.createElementVNode("rect",{x:"25%",y:"25%",width:"25%",height:"25%",fill:ae.sectors[5].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[5]||(d[5]=x=>O.selectSector(5))},null,8,rL),g.createElementVNode("rect",{x:"25%",y:"50%",width:"25%",height:"25%",fill:ae.sectors[6].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[6]||(d[6]=x=>O.selectSector(6))},null,8,nL),g.createElementVNode("rect",{x:"25%",y:"75%",width:"25%",height:"25%",fill:ae.sectors[7].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[7]||(d[7]=x=>O.selectSector(7))},null,8,aL),g.createElementVNode("rect",{x:"50%",y:"0%",width:"25%",height:"25%",fill:ae.sectors[8].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[8]||(d[8]=x=>O.selectSector(8))},null,8,iL),g.createElementVNode("rect",{x:"50%",y:"25%",width:"25%",height:"25%",fill:ae.sectors[9].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[9]||(d[9]=x=>O.selectSector(9))},null,8,oL),g.createElementVNode("rect",{x:"50%",y:"50%",width:"25%",height:"25%",fill:ae.sectors[10].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[10]||(d[10]=x=>O.selectSector(10))},null,8,sL),g.createElementVNode("rect",{x:"50%",y:"75%",width:"25%",height:"25%",fill:ae.sectors[11].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[11]||(d[11]=x=>O.selectSector(11))},null,8,lL),g.createElementVNode("rect",{x:"75%",y:"0%",width:"25%",height:"25%",fill:ae.sectors[12].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[12]||(d[12]=x=>O.selectSector(12))},null,8,cL),g.createElementVNode("rect",{x:"75%",y:"25%",width:"25%",height:"25%",fill:ae.sectors[13].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[13]||(d[13]=x=>O.selectSector(13))},null,8,uL),g.createElementVNode("rect",{x:"75%",y:"50%",width:"25%",height:"25%",fill:ae.sectors[14].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[14]||(d[14]=x=>O.selectSector(14))},null,8,dL),g.createElementVNode("rect",{x:"75%",y:"75%",width:"25%",height:"25%",fill:ae.sectors[15].active?A.backgroundSectorActive:A.backgroundSectorDisabled,"fill-opacity":A.opacitySector,stroke:A.borderColor,"stroke-width":A.borderWidth,onClick:d[15]||(d[15]=x=>O.selectSector(15))},null,8,hL)]))]),g.createElementVNode("div",pL,[(g.openBlock(),g.createBlock(t,{"text-value":"1/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn14",onStatus:O.btn14,key:ae.refreshBtn14,value:a.status14},null,8,["onStatus","value"])),(g.openBlock(),g.createBlock(t,{"text-value":"2/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn24",onStatus:O.btn24,key:ae.refreshBtn24,value:a.status24},null,8,["onStatus","value"])),(g.openBlock(),g.createBlock(t,{"text-value":"3/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn34",onStatus:O.btn34,key:ae.refreshBtn34,value:a.status34},null,8,["onStatus","value"])),(g.openBlock(),g.createBlock(t,{"text-value":"4/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn44",onStatus:O.btn44,key:ae.refreshBtn44,value:a.status44},null,8,["onStatus","value"]))])])])}const mL=BP(b1,[["render",fL],["__scopeId","data-v-b85699b8"]]);function Wx(a,d){return function(){return a.apply(d,arguments)}}const{toString:gL}=Object.prototype,{getPrototypeOf:x1}=Object,{iterator:n0,toStringTag:Hx}=Symbol,a0=(a=>d=>{const A=gL.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Fu=a=>(a=a.toLowerCase(),d=>a0(d)===a),i0=a=>d=>typeof d===a,{isArray:mp}=Array,mf=i0("undefined");function yL(a){return a!==null&&!mf(a)&&a.constructor!==null&&!mf(a.constructor)&&eu(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const Gx=Fu("ArrayBuffer");function vL(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&Gx(a.buffer),d}const bL=i0("string"),eu=i0("function"),Xx=i0("number"),o0=a=>a!==null&&typeof a=="object",xL=a=>a===!0||a===!1,s0=a=>{if(a0(a)!=="object")return!1;const d=x1(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(Hx in a)&&!(n0 in a)},_L=Fu("Date"),wL=Fu("File"),kL=Fu("Blob"),TL=Fu("FileList"),SL=a=>o0(a)&&eu(a.pipe),AL=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||eu(a.append)&&((d=a0(a))==="formdata"||d==="object"&&eu(a.toString)&&a.toString()==="[object FormData]"))},EL=Fu("URLSearchParams"),[CL,ML,PL,LL]=["ReadableStream","Request","Response","Headers"].map(Fu),zL=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gf(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),mp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function Kx(a,d){d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const Sh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jx=a=>!mf(a)&&a!==Sh;function _1(){const{caseless:a}=Jx(this)&&this||{},d={},A=(U,ae)=>{const O=a&&Kx(d,ae)||ae;s0(d[O])&&s0(U)?d[O]=_1(d[O],U):s0(U)?d[O]=_1({},U):mp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&gf(arguments[U],A);return d}const OL=(a,d,A,{allOwnKeys:U}={})=>(gf(d,(ae,O)=>{A&&eu(ae)?a[O]=Wx(ae,A):a[O]=ae},{allOwnKeys:U}),a),NL=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),RL=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},DL=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&x1(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},IL=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},FL=a=>{if(!a)return null;if(mp(a))return a;let d=a.length;if(!Xx(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},VL=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&x1(Uint8Array)),BL=(a,d)=>{const A=(a&&a[n0]).call(a);let U;for(;(U=A.next())&&!U.done;){const ae=U.value;d.call(a,ae[0],ae[1])}},UL=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},jL=Fu("HTMLFormElement"),qL=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,A,U){return A.toUpperCase()+U}),$x=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),WL=Fu("RegExp"),Zx=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};gf(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},HL=a=>{Zx(a,(d,A)=>{if(eu(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(eu(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},GL=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return mp(a)?U(a):U(String(a).split(d)),A},XL=()=>{},KL=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function JL(a){return!!(a&&eu(a.append)&&a[Hx]==="FormData"&&a[n0])}const $L=a=>{const d=new Array(10),A=(U,ae)=>{if(o0(U)){if(d.indexOf(U)>=0)return;if(!("toJSON"in U)){d[ae]=U;const O=mp(U)?[]:{};return gf(U,(E,t)=>{const x=A(E,ae+1);!mf(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},ZL=Fu("AsyncFunction"),YL=a=>a&&(o0(a)||eu(a))&&eu(a.then)&&eu(a.catch),Yx=((a,d)=>a?setImmediate:d?((A,U)=>(Sh.addEventListener("message",({source:ae,data:O})=>{ae===Sh&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),Sh.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",eu(Sh.postMessage)),QL=typeof queueMicrotask<"u"?queueMicrotask.bind(Sh):typeof process<"u"&&process.nextTick||Yx,ez=a=>a!=null&&eu(a[n0]),Gn={isArray:mp,isArrayBuffer:Gx,isBuffer:yL,isFormData:AL,isArrayBufferView:vL,isString:bL,isNumber:Xx,isBoolean:xL,isObject:o0,isPlainObject:s0,isReadableStream:CL,isRequest:ML,isResponse:PL,isHeaders:LL,isUndefined:mf,isDate:_L,isFile:wL,isBlob:kL,isRegExp:WL,isFunction:eu,isStream:SL,isURLSearchParams:EL,isTypedArray:VL,isFileList:TL,forEach:gf,merge:_1,extend:OL,trim:zL,stripBOM:NL,inherits:RL,toFlatObject:DL,kindOf:a0,kindOfTest:Fu,endsWith:IL,toArray:FL,forEachEntry:BL,matchAll:UL,isHTMLForm:jL,hasOwnProperty:$x,hasOwnProp:$x,reduceDescriptors:Zx,freezeMethods:HL,toObjectSet:GL,toCamelCase:qL,noop:XL,toFiniteNumber:KL,findKey:Kx,global:Sh,isContextDefined:Jx,isSpecCompliantForm:JL,toJSONObject:$L,isAsyncFn:ZL,isThenable:YL,setImmediate:Yx,asap:QL,isIterable:ez};function di(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}Gn.inherits(di,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:Gn.toJSONObject(this.config),code:this.code,status:this.status}}});const Qx=di.prototype,e_={};["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(a=>{e_[a]={value:a}}),Object.defineProperties(di,e_),Object.defineProperty(Qx,"isAxiosError",{value:!0}),di.from=(a,d,A,U,ae,O)=>{const E=Object.create(Qx);return Gn.toFlatObject(a,E,function(t){return t!==Error.prototype},t=>t!=="isAxiosError"),di.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const tz=null;function w1(a){return Gn.isPlainObject(a)||Gn.isArray(a)}function t_(a){return Gn.endsWith(a,"[]")?a.slice(0,-2):a}function r_(a,d,A){return a?a.concat(d).map(function(U,ae){return U=t_(U),!A&&ae?"["+U+"]":U}).join(A?".":""):d}function rz(a){return Gn.isArray(a)&&!a.some(w1)}const nz=Gn.toFlatObject(Gn,{},null,function(a){return/^is[A-Z]/.test(a)});function l0(a,d,A){if(!Gn.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=Gn.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,h){return!Gn.isUndefined(h[v])});const U=A.metaTokens,ae=A.visitor||u,O=A.dots,E=A.indexes,t=(A.Blob||typeof Blob<"u"&&Blob)&&Gn.isSpecCompliantForm(d);if(!Gn.isFunction(ae))throw new TypeError("visitor must be a function");function x(v){if(v===null)return"";if(Gn.isDate(v))return v.toISOString();if(!t&&Gn.isBlob(v))throw new di("Blob is not supported. Use a Buffer instead.");return Gn.isArrayBuffer(v)||Gn.isTypedArray(v)?t&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,h,r){let n=v;if(v&&!r&&typeof v=="object"){if(Gn.endsWith(h,"{}"))h=U?h:h.slice(0,-2),v=JSON.stringify(v);else if(Gn.isArray(v)&&rz(v)||(Gn.isFileList(v)||Gn.endsWith(h,"[]"))&&(n=Gn.toArray(v)))return h=t_(h),n.forEach(function(c,o){!(Gn.isUndefined(c)||c===null)&&d.append(E===!0?r_([h],o,O):E===null?h:h+"[]",x(c))}),!1}return w1(v)?!0:(d.append(r_(r,h,O),x(v)),!1)}const e=[],b=Object.assign(nz,{defaultVisitor:u,convertValue:x,isVisitable:w1});function f(v,h){if(!Gn.isUndefined(v)){if(e.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));e.push(v),Gn.forEach(v,function(r,n){(!(Gn.isUndefined(r)||r===null)&&ae.call(d,r,Gn.isString(n)?n.trim():n,h,b))===!0&&f(r,h?h.concat(n):[n])}),e.pop()}}if(!Gn.isObject(a))throw new TypeError("data must be an object");return f(a),d}function n_(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(A){return d[A]})}function k1(a,d){this._pairs=[],a&&l0(a,this,d)}const a_=k1.prototype;a_.append=function(a,d){this._pairs.push([a,d])},a_.toString=function(a){const d=a?function(A){return a.call(this,A,n_)}:n_;return this._pairs.map(function(A){return d(A[0])+"="+d(A[1])},"").join("&")};function az(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function i_(a,d,A){if(!d)return a;const U=A&&A.encode||az;Gn.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=Gn.isURLSearchParams(d)?d.toString():new k1(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}const o_=class{constructor(){this.handlers=[]}use(a,d,A){return this.handlers.push({fulfilled:a,rejected:d,synchronous:A?A.synchronous:!1,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){Gn.forEach(this.handlers,function(d){d!==null&&a(d)})}},s_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},iz=typeof URLSearchParams<"u"?URLSearchParams:k1,oz=typeof FormData<"u"?FormData:null,sz=typeof Blob<"u"?Blob:null,lz={isBrowser:!0,classes:{URLSearchParams:iz,FormData:oz,Blob:sz},protocols:["http","https","file","blob","url","data"]},T1=typeof window<"u"&&typeof document<"u",S1=typeof navigator=="object"&&navigator||void 0,cz=T1&&(!S1||["ReactNative","NativeScript","NS"].indexOf(S1.product)<0),uz=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dz=T1&&window.location.href||"http://localhost",hz=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:T1,hasStandardBrowserEnv:cz,hasStandardBrowserWebWorkerEnv:uz,navigator:S1,origin:dz},Symbol.toStringTag,{value:"Module"})),kc={...hz,...lz};function pz(a,d){return l0(a,new kc.classes.URLSearchParams,Object.assign({visitor:function(A,U,ae,O){return kc.isNode&&Gn.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)}},d))}function fz(a){return Gn.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function mz(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function l_(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&Gn.isArray(ae)?ae.length:E,x?(Gn.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!Gn.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&Gn.isArray(ae[E])&&(ae[E]=mz(ae[E])),!t)}if(Gn.isFormData(a)&&Gn.isFunction(a.entries)){const A={};return Gn.forEachEntry(a,(U,ae)=>{d(fz(U),ae,A,0)}),A}return null}function gz(a,d,A){if(Gn.isString(a))try{return(d||JSON.parse)(a),Gn.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const A1={transitional:s_,adapter:["xhr","http","fetch"],transformRequest:[function(a,d){const A=d.getContentType()||"",U=A.indexOf("application/json")>-1,ae=Gn.isObject(a);if(ae&&Gn.isHTMLForm(a)&&(a=new FormData(a)),Gn.isFormData(a))return U?JSON.stringify(l_(a)):a;if(Gn.isArrayBuffer(a)||Gn.isBuffer(a)||Gn.isStream(a)||Gn.isFile(a)||Gn.isBlob(a)||Gn.isReadableStream(a))return a;if(Gn.isArrayBufferView(a))return a.buffer;if(Gn.isURLSearchParams(a))return d.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let O;if(ae){if(A.indexOf("application/x-www-form-urlencoded")>-1)return pz(a,this.formSerializer).toString();if((O=Gn.isFileList(a))||A.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return l0(O?{"files[]":a}:a,E&&new E,this.formSerializer)}}return ae||U?(d.setContentType("application/json",!1),gz(a)):a}],transformResponse:[function(a){const d=this.transitional||A1.transitional,A=d&&d.forcedJSONParsing,U=this.responseType==="json";if(Gn.isResponse(a)||Gn.isReadableStream(a))return a;if(a&&Gn.isString(a)&&(A&&!this.responseType||U)){const ae=!(d&&d.silentJSONParsing)&&U;try{return JSON.parse(a)}catch(O){if(ae)throw O.name==="SyntaxError"?di.from(O,di.ERR_BAD_RESPONSE,this,null,this.response):O}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kc.classes.FormData,Blob:kc.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Gn.forEach(["delete","get","head","post","put","patch"],a=>{A1.headers[a]={}});const E1=A1,yz=Gn.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"]),vz=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4041
4041
|
`).forEach(function(O){ae=O.indexOf(":"),A=O.substring(0,ae).trim().toLowerCase(),U=O.substring(ae+1).trim(),!(!A||d[A]&&yz[A])&&(A==="set-cookie"?d[A]?d[A].push(U):d[A]=[U]:d[A]=d[A]?d[A]+", "+U:U)}),d},c_=Symbol("internals");function yf(a){return a&&String(a).trim().toLowerCase()}function c0(a){return a===!1||a==null?a:Gn.isArray(a)?a.map(c0):String(a)}function bz(a){const d=Object.create(null),A=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let U;for(;U=A.exec(a);)d[U[1]]=U[2];return d}const xz=a=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());function C1(a,d,A,U,ae){if(Gn.isFunction(U))return U.call(this,d,A);if(ae&&(d=A),!!Gn.isString(d)){if(Gn.isString(U))return d.indexOf(U)!==-1;if(Gn.isRegExp(U))return U.test(d)}}function _z(a){return a.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(d,A,U)=>A.toUpperCase()+U)}function wz(a,d){const A=Gn.toCamelCase(" "+d);["get","set","has"].forEach(U=>{Object.defineProperty(a,U+A,{value:function(ae,O,E){return this[U].call(this,d,ae,O,E)},configurable:!0})})}let u0=class{constructor(a){a&&this.set(a)}set(a,d,A){const U=this;function ae(E,t,x){const u=yf(t);if(!u)throw new Error("header name must be a non-empty string");const e=Gn.findKey(U,u);(!e||U[e]===void 0||x===!0||x===void 0&&U[e]!==!1)&&(U[e||t]=c0(E))}const O=(E,t)=>Gn.forEach(E,(x,u)=>ae(x,u,t));if(Gn.isPlainObject(a)||a instanceof this.constructor)O(a,d);else if(Gn.isString(a)&&(a=a.trim())&&!xz(a))O(vz(a),d);else if(Gn.isObject(a)&&Gn.isIterable(a)){let E={},t,x;for(const u of a){if(!Gn.isArray(u))throw TypeError("Object iterator must return a key-value pair");E[x=u[0]]=(t=E[x])?Gn.isArray(t)?[...t,u[1]]:[t,u[1]]:u[1]}O(E,d)}else a!=null&&ae(d,a,A);return this}get(a,d){if(a=yf(a),a){const A=Gn.findKey(this,a);if(A){const U=this[A];if(!d)return U;if(d===!0)return bz(U);if(Gn.isFunction(d))return d.call(this,U,A);if(Gn.isRegExp(d))return d.exec(U);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,d){if(a=yf(a),a){const A=Gn.findKey(this,a);return!!(A&&this[A]!==void 0&&(!d||C1(this,this[A],A,d)))}return!1}delete(a,d){const A=this;let U=!1;function ae(O){if(O=yf(O),O){const E=Gn.findKey(A,O);E&&(!d||C1(A,A[E],E,d))&&(delete A[E],U=!0)}}return Gn.isArray(a)?a.forEach(ae):ae(a),U}clear(a){const d=Object.keys(this);let A=d.length,U=!1;for(;A--;){const ae=d[A];(!a||C1(this,this[ae],ae,a,!0))&&(delete this[ae],U=!0)}return U}normalize(a){const d=this,A={};return Gn.forEach(this,(U,ae)=>{const O=Gn.findKey(A,ae);if(O){d[O]=c0(U),delete d[ae];return}const E=a?_z(ae):String(ae).trim();E!==ae&&delete d[ae],d[E]=c0(U),A[E]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const d=Object.create(null);return Gn.forEach(this,(A,U)=>{A!=null&&A!==!1&&(d[U]=a&&Gn.isArray(A)?A.join(", "):A)}),d}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,d])=>a+": "+d).join(`
|
|
4042
4042
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...d){const A=new this(a);return d.forEach(U=>A.set(U)),A}static accessor(a){const d=(this[c_]=this[c_]={accessors:{}}).accessors,A=this.prototype;function U(ae){const O=yf(ae);d[O]||(wz(A,ae),d[O]=!0)}return Gn.isArray(a)?a.forEach(U):U(a),this}};u0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Gn.reduceDescriptors(u0.prototype,({value:a},d)=>{let A=d[0].toUpperCase()+d.slice(1);return{get:()=>a,set(U){this[A]=U}}}),Gn.freezeMethods(u0);const Vu=u0;function M1(a,d){const A=this||E1,U=d||A,ae=Vu.from(U.headers);let O=U.data;return Gn.forEach(a,function(E){O=E.call(A,O,ae.normalize(),d?d.status:void 0)}),ae.normalize(),O}function u_(a){return!!(a&&a.__CANCEL__)}function gp(a,d,A){di.call(this,a??"canceled",di.ERR_CANCELED,d,A),this.name="CanceledError"}Gn.inherits(gp,di,{__CANCEL__:!0});function d_(a,d,A){const U=A.config.validateStatus;!A.status||!U||U(A.status)?a(A):d(new di("Request failed with status code "+A.status,[di.ERR_BAD_REQUEST,di.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A))}function kz(a){const d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return d&&d[1]||""}function Tz(a,d){a=a||10;const A=new Array(a),U=new Array(a);let ae=0,O=0,E;return d=d!==void 0?d:1e3,function(t){const x=Date.now(),u=U[O];E||(E=x),A[ae]=t,U[ae]=x;let e=O,b=0;for(;e!==ae;)b+=A[e++],e=e%a;if(ae=(ae+1)%a,ae===O&&(O=(O+1)%a),x-E<d)return;const f=u&&x-u;return f?Math.round(b*1e3/f):void 0}}function Sz(a,d){let A=0,U=1e3/d,ae,O;const E=(t,x=Date.now())=>{A=x,ae=null,O&&(clearTimeout(O),O=null),a.apply(null,t)};return[(...t)=>{const x=Date.now(),u=x-A;u>=U?E(t,x):(ae=t,O||(O=setTimeout(()=>{O=null,E(ae)},U-u)))},()=>ae&&E(ae)]}const d0=(a,d,A=3)=>{let U=0;const ae=Tz(50,250);return Sz(O=>{const E=O.loaded,t=O.lengthComputable?O.total:void 0,x=E-U,u=ae(x),e=E<=t;U=E;const b={loaded:E,total:t,progress:t?E/t:void 0,bytes:x,rate:u||void 0,estimated:u&&t&&e?(t-E)/u:void 0,event:O,lengthComputable:t!=null,[d?"download":"upload"]:!0};a(b)},A)},h_=(a,d)=>{const A=a!=null;return[U=>d[0]({lengthComputable:A,total:a,loaded:U}),d[1]]},p_=a=>(...d)=>Gn.asap(()=>a(...d)),Az=kc.hasStandardBrowserEnv?((a,d)=>A=>(A=new URL(A,kc.origin),a.protocol===A.protocol&&a.host===A.host&&(d||a.port===A.port)))(new URL(kc.origin),kc.navigator&&/(msie|trident)/i.test(kc.navigator.userAgent)):()=>!0,Ez=kc.hasStandardBrowserEnv?{write(a,d,A,U,ae,O){const E=[a+"="+encodeURIComponent(d)];Gn.isNumber(A)&&E.push("expires="+new Date(A).toGMTString()),Gn.isString(U)&&E.push("path="+U),Gn.isString(ae)&&E.push("domain="+ae),O===!0&&E.push("secure"),document.cookie=E.join("; ")},read(a){const d=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Cz(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function Mz(a,d){return d?a.replace(/\/?\/$/,"")+"/"+d.replace(/^\/+/,""):a}function f_(a,d,A){let U=!Cz(d);return a&&(U||A==!1)?Mz(a,d):d}const m_=a=>a instanceof Vu?{...a}:a;function Ah(a,d){d=d||{};const A={};function U(u,e,b,f){return Gn.isPlainObject(u)&&Gn.isPlainObject(e)?Gn.merge.call({caseless:f},u,e):Gn.isPlainObject(e)?Gn.merge({},e):Gn.isArray(e)?e.slice():e}function ae(u,e,b,f){if(Gn.isUndefined(e)){if(!Gn.isUndefined(u))return U(void 0,u,b,f)}else return U(u,e,b,f)}function O(u,e){if(!Gn.isUndefined(e))return U(void 0,e)}function E(u,e){if(Gn.isUndefined(e)){if(!Gn.isUndefined(u))return U(void 0,u)}else return U(void 0,e)}function t(u,e,b){if(b in d)return U(u,e);if(b in a)return U(void 0,u)}const x={url:O,method:O,data:O,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:t,headers:(u,e,b)=>ae(m_(u),m_(e),b,!0)};return Gn.forEach(Object.keys(Object.assign({},a,d)),function(u){const e=x[u]||ae,b=e(a[u],d[u],u);Gn.isUndefined(b)&&e!==t||(A[u]=b)}),A}const g_=a=>{const d=Ah({},a);let{data:A,withXSRFToken:U,xsrfHeaderName:ae,xsrfCookieName:O,headers:E,auth:t}=d;d.headers=E=Vu.from(E),d.url=i_(f_(d.baseURL,d.url,d.allowAbsoluteUrls),a.params,a.paramsSerializer),t&&E.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):"")));let x;if(Gn.isFormData(A)){if(kc.hasStandardBrowserEnv||kc.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if((x=E.getContentType())!==!1){const[u,...e]=x?x.split(";").map(b=>b.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...e].join("; "))}}if(kc.hasStandardBrowserEnv&&(U&&Gn.isFunction(U)&&(U=U(d)),U||U!==!1&&Az(d.url))){const u=ae&&O&&Ez.read(O);u&&E.set(ae,u)}return d},Pz=typeof XMLHttpRequest<"u",Lz=Pz&&function(a){return new Promise(function(d,A){const U=g_(a);let ae=U.data;const O=Vu.from(U.headers).normalize();let{responseType:E,onUploadProgress:t,onDownloadProgress:x}=U,u,e,b,f,v;function h(){f&&f(),v&&v(),U.cancelToken&&U.cancelToken.unsubscribe(u),U.signal&&U.signal.removeEventListener("abort",u)}let r=new XMLHttpRequest;r.open(U.method.toUpperCase(),U.url,!0),r.timeout=U.timeout;function n(){if(!r)return;const o=Vu.from("getAllResponseHeaders"in r&&r.getAllResponseHeaders()),l={data:!E||E==="text"||E==="json"?r.responseText:r.response,status:r.status,statusText:r.statusText,headers:o,config:a,request:r};d_(function(p){d(p),h()},function(p){A(p),h()},l),r=null}"onloadend"in r?r.onloadend=n:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(n)},r.onabort=function(){r&&(A(new di("Request aborted",di.ECONNABORTED,a,r)),r=null)},r.onerror=function(){A(new di("Network Error",di.ERR_NETWORK,a,r)),r=null},r.ontimeout=function(){let o=U.timeout?"timeout of "+U.timeout+"ms exceeded":"timeout exceeded";const l=U.transitional||s_;U.timeoutErrorMessage&&(o=U.timeoutErrorMessage),A(new di(o,l.clarifyTimeoutError?di.ETIMEDOUT:di.ECONNABORTED,a,r)),r=null},ae===void 0&&O.setContentType(null),"setRequestHeader"in r&&Gn.forEach(O.toJSON(),function(o,l){r.setRequestHeader(l,o)}),Gn.isUndefined(U.withCredentials)||(r.withCredentials=!!U.withCredentials),E&&E!=="json"&&(r.responseType=U.responseType),x&&([b,v]=d0(x,!0),r.addEventListener("progress",b)),t&&r.upload&&([e,f]=d0(t),r.upload.addEventListener("progress",e),r.upload.addEventListener("loadend",f)),(U.cancelToken||U.signal)&&(u=o=>{r&&(A(!o||o.type?new gp(null,a,r):o),r.abort(),r=null)},U.cancelToken&&U.cancelToken.subscribe(u),U.signal&&(U.signal.aborted?u():U.signal.addEventListener("abort",u)));const c=kz(U.url);if(c&&kc.protocols.indexOf(c)===-1){A(new di("Unsupported protocol "+c+":",di.ERR_BAD_REQUEST,a));return}r.send(ae||null)})},zz=(a,d)=>{const{length:A}=a=a?a.filter(Boolean):[];if(d||A){let U=new AbortController,ae;const O=function(u){if(!ae){ae=!0,t();const e=u instanceof Error?u:this.reason;U.abort(e instanceof di?e:new gp(e instanceof Error?e.message:e))}};let E=d&&setTimeout(()=>{E=null,O(new di(`timeout ${d} of ms exceeded`,di.ETIMEDOUT))},d);const t=()=>{a&&(E&&clearTimeout(E),E=null,a.forEach(u=>{u.unsubscribe?u.unsubscribe(O):u.removeEventListener("abort",O)}),a=null)};a.forEach(u=>u.addEventListener("abort",O));const{signal:x}=U;return x.unsubscribe=()=>Gn.asap(t),x}},Oz=zz,Nz=function*(a,d){let A=a.byteLength;if(A<d){yield a;return}let U=0,ae;for(;U<A;)ae=U+d,yield a.slice(U,ae),U=ae},Rz=async function*(a,d){for await(const A of Dz(a))yield*Nz(A,d)},Dz=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const d=a.getReader();try{for(;;){const{done:A,value:U}=await d.read();if(A)break;yield U}}finally{await d.cancel()}},y_=(a,d,A,U)=>{const ae=Rz(a,d);let O=0,E,t=x=>{E||(E=!0,U&&U(x))};return new ReadableStream({async pull(x){try{const{done:u,value:e}=await ae.next();if(u){t(),x.close();return}let b=e.byteLength;if(A){let f=O+=b;A(f)}x.enqueue(new Uint8Array(e))}catch(u){throw t(u),u}},cancel(x){return t(x),ae.return()}},{highWaterMark:2})},h0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",v_=h0&&typeof ReadableStream=="function",Iz=h0&&(typeof TextEncoder=="function"?(a=>d=>a.encode(d))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),b_=(a,...d)=>{try{return!!a(...d)}catch{return!1}},Fz=v_&&b_(()=>{let a=!1;const d=new Request(kc.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!d}),x_=64*1024,P1=v_&&b_(()=>Gn.isReadableStream(new Response("").body)),p0={stream:P1&&(a=>a.body)};h0&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!p0[d]&&(p0[d]=Gn.isFunction(a[d])?A=>A[d]():(A,U)=>{throw new di(`Response type '${d}' is not supported`,di.ERR_NOT_SUPPORT,U)})})})(new Response);const Vz=async a=>{if(a==null)return 0;if(Gn.isBlob(a))return a.size;if(Gn.isSpecCompliantForm(a))return(await new Request(kc.origin,{method:"POST",body:a}).arrayBuffer()).byteLength;if(Gn.isArrayBufferView(a)||Gn.isArrayBuffer(a))return a.byteLength;if(Gn.isURLSearchParams(a)&&(a=a+""),Gn.isString(a))return(await Iz(a)).byteLength},Bz=async(a,d)=>Gn.toFiniteNumber(a.getContentLength())??Vz(d),Uz=h0&&(async a=>{let{url:d,method:A,data:U,signal:ae,cancelToken:O,timeout:E,onDownloadProgress:t,onUploadProgress:x,responseType:u,headers:e,withCredentials:b="same-origin",fetchOptions:f}=g_(a);u=u?(u+"").toLowerCase():"text";let v=Oz([ae,O&&O.toAbortSignal()],E),h;const r=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let n;try{if(x&&Fz&&A!=="get"&&A!=="head"&&(n=await Bz(e,U))!==0){let m=new Request(d,{method:"POST",body:U,duplex:"half"}),w;if(Gn.isFormData(U)&&(w=m.headers.get("content-type"))&&e.setContentType(w),m.body){const[T,k]=h_(n,d0(p_(x)));U=y_(m.body,x_,T,k)}}Gn.isString(b)||(b=b?"include":"omit");const c="credentials"in Request.prototype;h=new Request(d,{...f,signal:v,method:A.toUpperCase(),headers:e.normalize().toJSON(),body:U,duplex:"half",credentials:c?b:void 0});let o=await fetch(h);const l=P1&&(u==="stream"||u==="response");if(P1&&(t||l&&r)){const m={};["status","statusText","headers"].forEach(M=>{m[M]=o[M]});const w=Gn.toFiniteNumber(o.headers.get("content-length")),[T,k]=t&&h_(w,d0(p_(t),!0))||[];o=new Response(y_(o.body,x_,T,()=>{k&&k(),r&&r()}),m)}u=u||"text";let p=await p0[Gn.findKey(p0,u)||"text"](o,a);return!l&&r&&r(),await new Promise((m,w)=>{d_(m,w,{data:p,headers:Vu.from(o.headers),status:o.status,statusText:o.statusText,config:a,request:h})})}catch(c){throw r&&r(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new di("Network Error",di.ERR_NETWORK,a,h),{cause:c.cause||c}):di.from(c,c&&c.code,a,h)}}),L1={http:tz,xhr:Lz,fetch:Uz};Gn.forEach(L1,(a,d)=>{if(a){try{Object.defineProperty(a,"name",{value:d})}catch{}Object.defineProperty(a,"adapterName",{value:d})}});const __=a=>`- ${a}`,jz=a=>Gn.isFunction(a)||a===null||a===!1,w_={getAdapter:a=>{a=Gn.isArray(a)?a:[a];const{length:d}=a;let A,U;const ae={};for(let O=0;O<d;O++){A=a[O];let E;if(U=A,!jz(A)&&(U=L1[(E=String(A)).toLowerCase()],U===void 0))throw new di(`Unknown adapter '${E}'`);if(U)break;ae[E||"#"+O]=U}if(!U){const O=Object.entries(ae).map(([t,x])=>`adapter ${t} `+(x===!1?"is not supported by the environment":"is not available in the build"));let E=d?O.length>1?`since :
|
|
4043
4043
|
`+O.map(__).join(`
|
|
4044
4044
|
`):" "+__(O[0]):"as no adapter specified";throw new di("There is no suitable adapter to dispatch the request "+E,"ERR_NOT_SUPPORT")}return U},adapters:L1};function z1(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new gp(null,a)}function k_(a){return z1(a),a.headers=Vu.from(a.headers),a.data=M1.call(a,a.transformRequest),["post","put","patch"].indexOf(a.method)!==-1&&a.headers.setContentType("application/x-www-form-urlencoded",!1),w_.getAdapter(a.adapter||E1.adapter)(a).then(function(d){return z1(a),d.data=M1.call(a,a.transformResponse,d),d.headers=Vu.from(d.headers),d},function(d){return u_(d)||(z1(a),d&&d.response&&(d.response.data=M1.call(a,a.transformResponse,d.response),d.response.headers=Vu.from(d.response.headers))),Promise.reject(d)})}const T_="1.9.0",f0={};["object","boolean","number","function","string","symbol"].forEach((a,d)=>{f0[a]=function(A){return typeof A===a||"a"+(d<1?"n ":" ")+a}});const S_={};f0.transitional=function(a,d,A){function U(ae,O){return"[Axios v"+T_+"] Transitional option '"+ae+"'"+O+(A?". "+A:"")}return(ae,O,E)=>{if(a===!1)throw new di(U(O," has been removed"+(d?" in "+d:"")),di.ERR_DEPRECATED);return d&&!S_[O]&&(S_[O]=!0,console.warn(U(O," has been deprecated since v"+d+" and will be removed in the near future"))),a?a(ae,O,E):!0}},f0.spelling=function(a){return(d,A)=>(console.warn(`${A} is likely a misspelling of ${a}`),!0)};function qz(a,d,A){if(typeof a!="object")throw new di("options must be an object",di.ERR_BAD_OPTION_VALUE);const U=Object.keys(a);let ae=U.length;for(;ae-- >0;){const O=U[ae],E=d[O];if(E){const t=a[O],x=t===void 0||E(t,O,a);if(x!==!0)throw new di("option "+O+" must be "+x,di.ERR_BAD_OPTION_VALUE);continue}if(A!==!0)throw new di("Unknown option "+O,di.ERR_BAD_OPTION)}}const m0={assertOptions:qz,validators:f0},id=m0.validators;let g0=class{constructor(a){this.defaults=a||{},this.interceptors={request:new o_,response:new o_}}async request(a,d){try{return await this._request(a,d)}catch(A){if(A instanceof Error){let U={};Error.captureStackTrace?Error.captureStackTrace(U):U=new Error;const ae=U.stack?U.stack.replace(/^.+\n/,""):"";try{A.stack?ae&&!String(A.stack).endsWith(ae.replace(/^.+\n.+\n/,""))&&(A.stack+=`
|
|
4045
|
-
`+ae):A.stack=ae}catch{}}throw A}}_request(a,d){typeof a=="string"?(d=d||{},d.url=a):d=a||{},d=Ah(this.defaults,d);const{transitional:A,paramsSerializer:U,headers:ae}=d;A!==void 0&&m0.assertOptions(A,{silentJSONParsing:id.transitional(id.boolean),forcedJSONParsing:id.transitional(id.boolean),clarifyTimeoutError:id.transitional(id.boolean)},!1),U!=null&&(Gn.isFunction(U)?d.paramsSerializer={serialize:U}:m0.assertOptions(U,{encode:id.function,serialize:id.function},!0)),d.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?d.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:d.allowAbsoluteUrls=!0),m0.assertOptions(d,{baseUrl:id.spelling("baseURL"),withXsrfToken:id.spelling("withXSRFToken")},!0),d.method=(d.method||this.defaults.method||"get").toLowerCase();let O=ae&&Gn.merge(ae.common,ae[d.method]);ae&&Gn.forEach(["delete","get","head","post","put","patch","common"],v=>{delete ae[v]}),d.headers=Vu.concat(O,ae);const E=[];let t=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(d)===!1||(t=t&&v.synchronous,E.unshift(v.fulfilled,v.rejected))});const x=[];this.interceptors.response.forEach(function(v){x.push(v.fulfilled,v.rejected)});let u,e=0,b;if(!t){const v=[k_.bind(this),void 0];for(v.unshift.apply(v,E),v.push.apply(v,x),b=v.length,u=Promise.resolve(d);e<b;)u=u.then(v[e++],v[e++]);return u}b=E.length;let f=d;for(e=0;e<b;){const v=E[e++],h=E[e++];try{f=v(f)}catch(r){h.call(this,r);break}}try{u=k_.call(this,f)}catch(v){return Promise.reject(v)}for(e=0,b=x.length;e<b;)u=u.then(x[e++],x[e++]);return u}getUri(a){a=Ah(this.defaults,a);const d=f_(a.baseURL,a.url,a.allowAbsoluteUrls);return i_(d,a.params,a.paramsSerializer)}};Gn.forEach(["delete","get","head","options"],function(a){g0.prototype[a]=function(d,A){return this.request(Ah(A||{},{method:a,url:d,data:(A||{}).data}))}}),Gn.forEach(["post","put","patch"],function(a){function d(A){return function(U,ae,O){return this.request(Ah(O||{},{method:a,headers:A?{"Content-Type":"multipart/form-data"}:{},url:U,data:ae}))}}g0.prototype[a]=d(),g0.prototype[a+"Form"]=d(!0)});const y0=g0,Wz=class X4{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let A;this.promise=new Promise(function(ae){A=ae});const U=this;this.promise.then(ae=>{if(!U._listeners)return;let O=U._listeners.length;for(;O-- >0;)U._listeners[O](ae);U._listeners=null}),this.promise.then=ae=>{let O;const E=new Promise(t=>{U.subscribe(t),O=t}).then(ae);return E.cancel=function(){U.unsubscribe(O)},E},d(function(ae,O,E){U.reason||(U.reason=new gp(ae,O,E),A(U.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const A=this._listeners.indexOf(d);A!==-1&&this._listeners.splice(A,1)}toAbortSignal(){const d=new AbortController,A=U=>{d.abort(U)};return this.subscribe(A),d.signal.unsubscribe=()=>this.unsubscribe(A),d.signal}static source(){let d;return{token:new X4(function(A){d=A}),cancel:d}}};function Hz(a){return function(d){return a.apply(null,d)}}function Gz(a){return Gn.isObject(a)&&a.isAxiosError===!0}const O1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(O1).forEach(([a,d])=>{O1[d]=a});const Xz=O1;function A_(a){const d=new y0(a),A=W2(y0.prototype.request,d);return Gn.extend(A,y0.prototype,d,{allOwnKeys:!0}),Gn.extend(A,d,null,{allOwnKeys:!0}),A.create=function(U){return A_(Ah(a,U))},A}const Il=A_(E1);Il.Axios=y0,Il.CanceledError=gp,Il.CancelToken=Wz,Il.isCancel=u_,Il.VERSION=T_,Il.toFormData=l0,Il.AxiosError=di,Il.Cancel=Il.CanceledError,Il.all=function(a){return Promise.all(a)},Il.spread=Hz,Il.isAxiosError=Gz,Il.mergeConfig=Ah,Il.AxiosHeaders=Vu,Il.formToJSON=a=>l_(Gn.isHTMLForm(a)?new FormData(a):a),Il.getAdapter=w_.getAdapter,Il.HttpStatusCode=Xz,Il.default=Il,Array.from({length:30},(a,d)=>1981+d).sort((a,d)=>d-a);const Kz={__name:"SwitchCustom",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:d}){const A=a,U=g.ref(null);g.watch(()=>A.modelValue,()=>{ae()},{immediate:!0});function ae(){U.value&&(U.value.checked=A.modelValue)}function O(E){d("update:modelValue",E.target.checked)}return g.onMounted(()=>{ae()}),(E,t)=>(g.openBlock(),g.createElementBlock("input",{ref_key:"switchCustom",ref:U,id:"toggle",class:"toggle",type:"checkbox",role:"switch",name:"toggle",onInput:O},null,544))}},N1=Qc(Kz,[["__scopeId","data-v-e3a6ae4e"]]),Jz={__name:"ButtonCustom",props:{text:{type:String,default:""},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},padding:{type:String,default:"0px"},borderRadius:{type:String,default:"0px"},borderWidth:{type:String,default:"1px"},borderColor:{type:String,default:"#d9d9d9"},backgroundColor:{type:String,default:"#FFFFFF"},activeBackgroundColor:{type:String,default:""},activeBorderColor:{type:String,default:""},activeFontColor:{type:String,default:""},fontColor:{type:String,default:"#000000"},fontSize:{type:String,default:"16px"},fontFamily:{type:String,default:"Poppins-Regular, sans-serif"},isActive:{type:Boolean,default:!1}},emits:["click"],setup(a,{emit:d}){const A=a,U=g.computed(()=>({"--height":A.height,"--width":A.width,"--padding":A.padding,"--border-radius":A.borderRadius,"--border":`solid ${A.borderWidth} ${A.borderColor}`,"--background-color":A.backgroundColor,"--font-color":A.fontColor,"--font-size":A.fontSize,"--font-family":A.fontFamily,"--active-background-color":A.activeBackgroundColor||A.backgroundColor,"--active-border-color":A.activeBorderColor||A.borderColor,"--active-font-color":A.activeFontColor||A.fontColor}));function ae(){d("click")}return(O,E)=>(g.openBlock(),g.createElementBlock("button",{class:g.normalizeClass(["button",{active:a.isActive}]),style:g.normalizeStyle(U.value),onClick:ae},g.toDisplayString(a.text),7))}},v0=Qc(Jz,[["__scopeId","data-v-9688933e"]]),$z={class:"dropdown"},Zz={class:"selected-item"},Yz={__name:"DropdownTextOnly",props:{items:{type:Array,default:()=>[]},itemTextKey:{type:String,default:""},isListSameWidth:{type:Boolean,default:!0}},emits:["input"],setup(a,{emit:d}){function A(U){d("input",U)}return(U,ae)=>(g.openBlock(),g.createElementBlock("div",$z,[g.createVNode(g.unref(g1),g.mergeProps(g.unref(y1),{"is-list-same-width":a.isListSameWidth,items:a.items,onInput:A}),{default:g.withCtx(({selectedItem:O})=>[g.createElementVNode("div",Zz,g.toDisplayString(a.itemTextKey?O[a.itemTextKey]:O),1)]),availableItem:g.withCtx(({item:O})=>[g.createElementVNode("div",null,g.toDisplayString(a.itemTextKey?O[a.itemTextKey]:O),1)]),_:1},16,["is-list-same-width","items"])]))}},tu=Qc(Yz,[["__scopeId","data-v-064d5f86"]]),Qz={class:"dropdown"},eO={class:"game-item"},tO={key:0,class:"item-game"},rO={class:"match-day"},nO={class:"team-logo"},aO=["src"],iO={class:"text"},oO={class:"text score"},sO={class:"text"},lO={class:"team-logo"},cO=["src"],uO={class:"item-game"},dO={class:"team-logo"},hO=["src"],pO={class:"text"},fO={class:"text score"},mO={class:"text"},gO={class:"team-logo"},yO=["src"],vO={__name:"DropdownGame",props:{items:{type:Array,default:()=>[]}},emits:["input"],setup(a,{emit:d}){function A(U){d("input",U)}return(U,ae)=>(g.openBlock(),g.createElementBlock("div",Qz,[g.createVNode(g.unref(g1),g.mergeProps(g.unref(y1),{items:a.items,onInput:A}),{default:g.withCtx(({selectedItem:O})=>[g.createElementVNode("div",eO,[O.homeTeam?(g.openBlock(),g.createElementBlock("div",tO,[g.createElementVNode("div",rO,g.toDisplayString(O.roundAbbreviation),1),g.createElementVNode("div",nO,[g.createElementVNode("img",{src:O.homeTeam.logo,alt:""},null,8,aO)]),g.createElementVNode("div",iO,g.toDisplayString(O.homeTeam.acronym),1),g.createElementVNode("div",oO,g.toDisplayString(O.score[0])+" - "+g.toDisplayString(O.score[1]),1),g.createElementVNode("div",sO,g.toDisplayString(O.awayTeam.acronym),1),g.createElementVNode("div",lO,[g.createElementVNode("img",{src:O.awayTeam.logo,alt:""},null,8,cO)])])):g.createCommentVNode("",!0)])]),availableItem:g.withCtx(({item:O})=>[g.createElementVNode("div",uO,[g.createElementVNode("div",null,g.toDisplayString(O.roundAbbreviation),1),g.createElementVNode("div",dO,[g.createElementVNode("img",{src:O.homeTeam.logo,alt:""},null,8,hO)]),g.createElementVNode("div",pO,g.toDisplayString(O.homeTeam.acronym),1),g.createElementVNode("div",fO,g.toDisplayString(O.score[0])+" - "+g.toDisplayString(O.score[1]),1),g.createElementVNode("div",mO,g.toDisplayString(O.awayTeam.acronym),1),g.createElementVNode("div",gO,[g.createElementVNode("img",{src:O.awayTeam.logo,alt:""},null,8,yO)])])]),_:1},16,["items"])]))}},b0=Qc(vO,[["__scopeId","data-v-7883a91e"]]),x0=a=>(g.pushScopeId("data-v-b63e9c84"),a=a(),g.popScopeId(),a),bO={class:"container"},xO={class:"container__row"},_O={class:"container__row__wrapper"},wO=x0(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),kO={class:"container__row__wrapper__input"},TO={class:"container__row two-items"},SO={class:"container__row__wrapper"},AO=x0(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),EO={key:0,class:"container__row__wrapper__input"},CO={class:"container__row__wrapper"},MO=x0(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige la jornada",-1)),PO={key:0,class:"container__row__wrapper__input"},LO={class:"container__row"},zO={class:"container__row__wrapper"},OO=x0(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),NO={key:0,class:"container__row__wrapper__input"},RO={class:"container__action"},DO={__name:"VideosGoals",props:{tournaments:{type:Array,required:!0}},emits:["update:tournament","update:season"],setup(a,{emit:d}){const A={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},U=g.ref(null),ae=g.ref(null),O=g.ref(null),E=g.ref(null);function t(b){U.value=b,d("update:tournament",b)}function x(b){ae.value=b,d("update:season",b)}function u(b){O.value=b}function e(b){E.value=b}return(b,f)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createElementVNode("div",bO,[g.createElementVNode("div",xO,[g.createElementVNode("div",_O,[wO,g.createElementVNode("div",kO,[g.createVNode(tu,{items:a.tournaments,itemTextKey:"name",onInput:t},null,8,["items"])])])]),g.createElementVNode("div",TO,[g.createElementVNode("div",SO,[AO,U.value&&U.value.seasons?(g.openBlock(),g.createElementBlock("div",EO,[g.createVNode(tu,{items:U.value.seasons,itemTextKey:"name",onInput:x},null,8,["items"])])):g.createCommentVNode("",!0)]),g.createElementVNode("div",CO,[MO,ae.value&&ae.value.arrayMatchDays?(g.openBlock(),g.createElementBlock("div",PO,[g.createVNode(tu,{items:ae.value.arrayMatchDays,itemTextKey:"stringMatchDayAbbreviation",onInput:u},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",LO,[g.createElementVNode("div",zO,[OO,O.value&&O.value.arrayGames?(g.openBlock(),g.createElementBlock("div",NO,[g.createVNode(b0,{items:O.value.arrayGames,onInput:e},null,8,["items"])])):g.createCommentVNode("",!0)])])]),g.createElementVNode("div",RO,[g.createVNode(v0,g.normalizeProps(g.guardReactiveProps(A)),null,16)])],64))}},IO=Qc(DO,[["__scopeId","data-v-b63e9c84"]]),FO={class:"dropdown"},VO={class:"item-team"},BO={class:"team-logo"},UO=["src"],jO={class:"team-acronym"},qO={class:"item-team"},WO={class:"team-logo"},HO=["src"],GO={class:"team-acronym"},XO={__name:"DropdownTeam",props:{items:{type:Array,default:()=>[]}},emits:["input"],setup(a,{emit:d}){function A(U){d("input",U)}return(U,ae)=>(g.openBlock(),g.createElementBlock("div",FO,[g.createVNode(g.unref(g1),g.mergeProps(g.unref(y1),{items:a.items,onInput:A}),{default:g.withCtx(({selectedItem:O})=>[g.createElementVNode("div",VO,[g.createElementVNode("div",BO,[g.createElementVNode("img",{src:O.logo,alt:""},null,8,UO)]),g.createElementVNode("div",jO,g.toDisplayString(O.acronym),1)])]),availableItem:g.withCtx(({item:O})=>[g.createElementVNode("div",qO,[g.createElementVNode("div",WO,[g.createElementVNode("img",{src:O.logo,alt:""},null,8,HO)]),g.createElementVNode("div",GO,g.toDisplayString(O.acronym),1)])]),_:1},16,["items"])]))}},E_=Qc(XO,[["__scopeId","data-v-afd2bee8"]]),KO={class:"advanced-filters"},JO={class:"advanced-filters__buttons"},$O=["onClick"],ZO={class:"advanced-filters__filters"},YO={__name:"AdvancedFilters",props:{selectedCategory:{type:Object,default:()=>({})}},setup(a){const d=a,A=g.defineAsyncComponent(()=>Promise.resolve().then(()=>Dhe)),U=g.defineAsyncComponent(()=>Promise.resolve().then(()=>epe)),ae=g.defineAsyncComponent(()=>Promise.resolve().then(()=>rpe)),O=[{name:"Sub categorías",component:A},{name:"Cancha",component:ae},{name:"Condiciones",component:U}],E=g.ref(O[0]),t=g.computed(()=>d.selectedCategory?d.selectedCategory.subcategoryGroups||[]:[]);function x(u){E.value=u}return(u,e)=>(g.openBlock(),g.createElementBlock("div",KO,[g.createElementVNode("div",JO,[(g.openBlock(),g.createElementBlock(g.Fragment,null,g.renderList(O,b=>g.createElementVNode("div",{key:b.name,role:"button",class:g.normalizeClass(["advanced-filters__buttons__button",{active:E.value.name===b.name}]),onClick:f=>x(b)},g.toDisplayString(b.name),11,$O)),64))]),g.createElementVNode("div",ZO,[(g.openBlock(),g.createBlock(g.KeepAlive,null,[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(E.value.component),{"subcategory-groups":t.value},null,8,["subcategory-groups"]))],1024))])]))}},R1=Qc(YO,[["__scopeId","data-v-c62c5b9c"]]),Eh=a=>(g.pushScopeId("data-v-575b26b5"),a=a(),g.popScopeId(),a),QO={class:"container"},eN={class:"container__row"},tN={class:"container__row__wrapper"},rN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),nN={class:"container__row__wrapper__input"},aN={class:"container__row two-items"},iN={class:"container__row__wrapper"},oN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),sN={key:0,class:"container__row__wrapper__input"},lN={class:"container__row__wrapper"},cN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"3. En que equipo juega?",-1)),uN={key:0,class:"container__row__wrapper__input"},dN={class:"container__row"},hN={class:"container__row__wrapper"},pN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Nombre del jugador",-1)),fN={key:0,class:"container__row__wrapper__input"},mN={class:"container__row"},gN={class:"container__row__wrapper"},yN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"5. Elige el partido",-1)),vN={key:0,class:"container__row__wrapper__input"},bN={class:"container__row type-and-advanced"},xN={class:"container__row__wrapper"},_N=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"6. Elige el tipo de video",-1)),wN={class:"container__row__wrapper__input"},kN={class:"container__row__wrapper center"},TN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),SN={class:"container__row__wrapper__input"},AN={class:"container__row"},EN={class:"container__action"},CN={__name:"VideosPlayer",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({player:[],goalkeeper:[]})}},emits:["update:tournament","update:season","update:team"],setup(a,{emit:d}){const A=a,U={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},ae=g.ref(null),O=g.ref(null);g.ref(null);const E=g.ref(null),t=g.ref(null),x=g.ref(null),u=g.ref(null),e=g.ref(!0),b=g.computed(()=>x.value?x.value.position_id===1?A.advancedFilterCategories.goalkeeper:A.advancedFilterCategories.player:[]);function f(o){ae.value=o,d("update:tournament",o)}function v(o){O.value=o,d("update:season",o)}function h(o){t.value=o,d("update:team",o)}function r(o){x.value=o}function n(o){E.value=o}function c(o){u.value=o}return(o,l)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createElementVNode("div",QO,[g.createElementVNode("div",eN,[g.createElementVNode("div",tN,[rN,g.createElementVNode("div",nN,[g.createVNode(tu,{items:a.tournaments,itemTextKey:"name",onInput:f},null,8,["items"])])])]),g.createElementVNode("div",aN,[g.createElementVNode("div",iN,[oN,ae.value&&ae.value.seasons?(g.openBlock(),g.createElementBlock("div",sN,[g.createVNode(tu,{items:ae.value.seasons,itemTextKey:"name",onInput:v},null,8,["items"])])):g.createCommentVNode("",!0)]),g.createElementVNode("div",lN,[cN,O.value&&O.value.arrayTeams?(g.openBlock(),g.createElementBlock("div",uN,[g.createVNode(E_,{items:O.value.arrayTeams,itemTextKey:"stringMatchDayAbbreviation",onInput:h},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",dN,[g.createElementVNode("div",hN,[pN,t.value&&t.value.arrayPlayers?(g.openBlock(),g.createElementBlock("div",fN,[g.createVNode(tu,{items:t.value.arrayPlayers,itemTextKey:"player_name",onInput:r},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",mN,[g.createElementVNode("div",gN,[yN,O.value&&O.value.mapGamesByTeam&&t.value?(g.openBlock(),g.createElementBlock("div",vN,[g.createVNode(b0,{items:O.value.mapGamesByTeam.get(t.value.team_id),onInput:n},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",bN,[g.createElementVNode("div",xN,[_N,g.createElementVNode("div",wN,[g.createVNode(tu,{items:b.value,itemTextKey:"name","is-list-same-width":!1,onInput:c},null,8,["items"])])]),g.createElementVNode("div",kN,[TN,g.createElementVNode("div",SN,[g.createVNode(N1,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=p=>e.value=p)},null,8,["modelValue"])])])]),g.createElementVNode("div",AN,[g.createVNode(R1,{"selected-category":u.value},null,8,["selected-category"])])]),g.createElementVNode("div",EN,[g.createVNode(v0,g.normalizeProps(g.guardReactiveProps(U)),null,16)])],64))}},MN=Qc(CN,[["__scopeId","data-v-575b26b5"]]),yp=a=>(g.pushScopeId("data-v-6d73d5e6"),a=a(),g.popScopeId(),a),PN={class:"container"},LN={class:"container__row"},zN={class:"container__row__wrapper"},ON=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),NN={class:"container__row__wrapper__input"},RN={class:"container__row two-items"},DN={class:"container__row__wrapper"},IN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),FN={key:0,class:"container__row__wrapper__input"},VN={class:"container__row__wrapper"},BN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige el equipo",-1)),UN={key:0,class:"container__row__wrapper__input"},jN={class:"container__row"},qN={class:"container__row__wrapper"},WN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),HN={key:0,class:"container__row__wrapper__input"},GN={class:"container__row type-and-advanced"},XN={class:"container__row__wrapper"},KN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"5. Elige el tipo de video",-1)),JN={class:"container__row__wrapper__input"},$N={class:"container__row__wrapper center"},ZN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),YN={class:"container__row__wrapper__input"},QN={class:"container__row"},eR={class:"container__action"},tR={__name:"VideosTeam",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({team:[]})}},emits:["update:tournament","update:season","update:team"],setup(a,{emit:d}){const A=a,U={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},ae=g.ref(null),O=g.ref(null);g.ref(null);const E=g.ref(null),t=g.ref(null),x=g.ref(null),u=g.ref(!0),e=g.computed(()=>A.advancedFilterCategories.team);function b(n){ae.value=n,d("update:tournament",n)}function f(n){O.value=n,d("update:season",n)}function v(n){t.value=n,d("update:team",n)}function h(n){E.value=n}function r(n){x.value=n}return(n,c)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createElementVNode("div",PN,[g.createElementVNode("div",LN,[g.createElementVNode("div",zN,[ON,g.createElementVNode("div",NN,[g.createVNode(tu,{items:a.tournaments,itemTextKey:"name",onInput:b},null,8,["items"])])])]),g.createElementVNode("div",RN,[g.createElementVNode("div",DN,[IN,ae.value&&ae.value.seasons?(g.openBlock(),g.createElementBlock("div",FN,[g.createVNode(tu,{items:ae.value.seasons,itemTextKey:"name",onInput:f},null,8,["items"])])):g.createCommentVNode("",!0)]),g.createElementVNode("div",VN,[BN,O.value&&O.value.arrayTeams?(g.openBlock(),g.createElementBlock("div",UN,[g.createVNode(E_,{items:O.value.arrayTeams,itemTextKey:"stringMatchDayAbbreviation",onInput:v},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",jN,[g.createElementVNode("div",qN,[WN,O.value&&O.value.mapGamesByTeam&&t.value?(g.openBlock(),g.createElementBlock("div",HN,[g.createVNode(b0,{items:O.value.mapGamesByTeam.get(t.value.team_id),onInput:h},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",GN,[g.createElementVNode("div",XN,[KN,g.createElementVNode("div",JN,[g.createVNode(tu,{items:e.value,itemTextKey:"name","is-list-same-width":!1,onInput:r},null,8,["items"])])]),g.createElementVNode("div",$N,[ZN,g.createElementVNode("div",YN,[g.createVNode(N1,{modelValue:u.value,"onUpdate:modelValue":c[0]||(c[0]=o=>u.value=o)},null,8,["modelValue"])])])]),g.createElementVNode("div",QN,[g.createVNode(R1,{"selected-category":x.value},null,8,["selected-category"])])]),g.createElementVNode("div",eR,[g.createVNode(v0,g.normalizeProps(g.guardReactiveProps(U)),null,16)])],64))}},rR=Qc(tR,[["__scopeId","data-v-6d73d5e6"]]),vp=a=>(g.pushScopeId("data-v-6e904db8"),a=a(),g.popScopeId(),a),nR={class:"container"},aR={class:"container__row"},iR={class:"container__row__wrapper"},oR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),sR={class:"container__row__wrapper__input"},lR={class:"container__row two-items"},cR={class:"container__row__wrapper"},uR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),dR={key:0,class:"container__row__wrapper__input"},hR={class:"container__row__wrapper"},pR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige la jornada",-1)),fR={key:0,class:"container__row__wrapper__input"},mR={class:"container__row"},gR={class:"container__row__wrapper"},yR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),vR={key:0,class:"container__row__wrapper__input"},bR={class:"container__row type-and-advanced"},xR={class:"container__row__wrapper"},_R=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"6. Elige el tipo de video",-1)),wR={class:"container__row__wrapper__input"},kR={class:"container__row__wrapper center"},TR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),SR={class:"container__row__wrapper__input",style:{width:"fit-content"}},AR={class:"container__row"},ER={class:"container__action"},CR={__name:"VideosGame",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({games:[]})}},emits:["update:tournament","update:season"],setup(a,{emit:d}){const A=a,U={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},ae=g.ref(null),O=g.ref(null),E=g.ref(null),t=g.ref(null),x=g.ref(null),u=g.ref(!0),e=g.computed(()=>A.advancedFilterCategories.games);function b(n){ae.value=n,d("update:tournament",n)}function f(n){O.value=n,d("update:season",n)}function v(n){E.value=n}function h(n){t.value=n}function r(n){x.value=n}return(n,c)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createElementVNode("div",nR,[g.createElementVNode("div",aR,[g.createElementVNode("div",iR,[oR,g.createElementVNode("div",sR,[g.createVNode(tu,{items:a.tournaments,itemTextKey:"name",onInput:b},null,8,["items"])])])]),g.createElementVNode("div",lR,[g.createElementVNode("div",cR,[uR,ae.value&&ae.value.seasons?(g.openBlock(),g.createElementBlock("div",dR,[g.createVNode(tu,{items:ae.value.seasons,itemTextKey:"name",onInput:f},null,8,["items"])])):g.createCommentVNode("",!0)]),g.createElementVNode("div",hR,[pR,O.value&&O.value.arrayMatchDays?(g.openBlock(),g.createElementBlock("div",fR,[g.createVNode(tu,{items:O.value.arrayMatchDays,itemTextKey:"stringMatchDayAbbreviation",onInput:v},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",mR,[g.createElementVNode("div",gR,[yR,E.value&&E.value.arrayGames?(g.openBlock(),g.createElementBlock("div",vR,[g.createVNode(b0,{items:E.value.arrayGames,onInput:h},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",bR,[g.createElementVNode("div",xR,[_R,g.createElementVNode("div",wR,[g.createVNode(tu,{items:e.value,itemTextKey:"name","is-list-same-width":!1,onInput:r},null,8,["items"])])]),g.createElementVNode("div",kR,[TR,g.createElementVNode("div",SR,[g.createVNode(N1,{modelValue:u.value,"onUpdate:modelValue":c[0]||(c[0]=o=>u.value=o)},null,8,["modelValue"])])])]),g.createElementVNode("div",AR,[g.createVNode(R1,{"selected-category":x.value},null,8,["selected-category"])])]),g.createElementVNode("div",ER,[g.createVNode(v0,g.normalizeProps(g.guardReactiveProps(U)),null,16)])],64))}},MR=Qc(CR,[["__scopeId","data-v-6e904db8"]]);g.defineComponent({name:"TemplateVideos",components:{VideosGoals:IO,VideosPlayer:MN,VideosTeam:rR,VideosGame:MR}}),Array.from({length:24},(a,d)=>d+1),od(2,D1()),od(2,D1()),od(1,Hd(1)),od(1,Hd(1)),od(1,Hd(2)),od(1,Hd(2)),od(1,Hd(3)),od(1,Hd(3)),od(1,Hd(4)),od(1,Hd(4));function D1(){return[[337,1],[338,2],[339,3],[340,4],[341,5],[342,6],[343,7],[344,8],[345,9],[346,10],[347,11],[348,12],[349,13],[350,14],[351,15],[352,16],[353,17],[354,18],[355,19],[356,20],[357,21]]}function C_(){return Array.from({length:16},(a,d)=>d+1)}function Hd(a){switch(a){case 1:return[1,2,3,4];case 2:return[5,6,7,8];case 3:return[9,10,11,12];case 4:return[13,14,15,16]}}function od(a=1,d=null){return{origin_zones:a===1?C_():D1(),destiny_zones:d||C_(),minimum_distance_x:0,maximum_distance_x:105,minimum_distance_y:0,maximum_distance_y:68,minimum_total_distance:0,maximum_total_distance:125,zone_type:a}}function PR(){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 LR="_comfiltersContainer_xl2as_1",zR="_comfiltersContainer1232_xl2as_1",OR="_closeFiltersPc_xl2as_1",NR="_comtextleyemdmultipleleagues_xl2as_1",RR="_comtextleyemdmultipleleagues380_xl2as_1",DR="_comfiltersContainer760_xl2as_1",IR="_comfiltersContainer460_xl2as_1",FR="_comcontainerSection_xl2as_1",VR="_comcontainerSection1232_xl2as_1",BR="_comcontainerSection960_xl2as_1",UR="_comcontainerSection320_xl2as_1",jR="_comcontainerSection350_xl2as_1",qR="_comtemplateLosMejores1_xl2as_1",WR="_comtemplateLosMejores11232_xl2as_1",HR="_comtemplateLosMejores1960_xl2as_1",GR="_comtemplateLosMejores1420_xl2as_1",XR="_comtemplateLosMejores1320_xl2as_1",KR="_comtemplateLosMejores1540_xl2as_1",JR="_comtemplateLosMejores1350_xl2as_1",$R="_comtopFiltersParent_xl2as_1",ZR="_comtopFiltersParent1232_xl2as_1",YR="_comtopFiltersParent960_xl2as_1",QR="_comtopFiltersParent460_xl2as_1",eD="_comtopFiltersParent420_xl2as_1",tD="_comcontainerTheBest_xl2as_1",rD="_comcontainerTheBest1232_xl2as_1",nD="_comcontainerTheBest960_xl2as_1",aD="_comcontainerTheBest320_xl2as_1",iD="_comtitleSection_xl2as_1",oD="_comtitleSection540_xl2as_1",sD="_comcontainerTables_xl2as_1",lD="_comcontainerTables960_xl2as_1",cD="_comcontainerTables760_xl2as_1",uD="_comcontainerTables320_xl2as_1",dD="_comtoniKroosWrapper_xl2as_1",hD="_comtoniKroosWrapper1080_xl2as_1",pD="_comtoniKroosWrapper975_xl2as_1",fD="_comtoniKroosWrapper760_xl2as_1",mD="_comtoniKroosWrapper420_xl2as_1",gD="_comtoniKroosWrapper320_xl2as_1",yD="_frameChild_xl2as_1",vD="_filtros_xl2as_1",bD="_groupParent_xl2as_1",xD="_shapeIcon_xl2as_1",_D="_btnFilters_xl2as_1",wD="_btnFiltersPC_xl2as_1",kD="_comquitarFiltros_xl2as_1",TD="_comquitarFiltros730_xl2as_1",SD="_comquitarFiltros480_xl2as_1",AD="_comquitarFiltros380_xl2as_1",ED="_btnCloseFilters_xl2as_1",CD="_commejoresJugadores_xl2as_1",MD="_commejoresJugadores730_xl2as_1",PD="_commejoresJugadores480_xl2as_1",LD="_mejoresJugadoresSM_xl2as_1",zD="_toniKroos_xl2as_1",OD="_teamBar_xl2as_1",ND="_commenuSection_xl2as_1",RD="_commenuSection960_xl2as_1",DD="_comcontainerMenu_xl2as_1",ID="_comcontainerMenu760_xl2as_1",FD="_containerFilters_xl2as_1",VD="_teamBarParent_xl2as_1",BD="_comtopFilters_xl2as_1",UD="_comtopFilters1232_xl2as_1",jD="_comtopFilters420_xl2as_1",qD="_comtopFilters460_xl2as_1",WD="_comlosMejores_xl2as_1",HD="_comlosMejores380_xl2as_1",GD="_comlosMejores530_xl2as_1",XD="_comlosMejores730_xl2as_1",KD="_commenuSectionHeader_xl2as_1",JD="_commenuSectionHeader1232_xl2as_1",$D="_commenuSectionHeader960_xl2as_1",ZD="_commenuSectionHeader730_xl2as_1",YD="_comdropdown_xl2as_1",QD="_comdropdown730_xl2as_1",eI="_comdropdown1_xl2as_1",tI="_comdropdown1730_xl2as_1",rI="_comdropdownParent_xl2as_1",nI="_comdropdownParent730_xl2as_1",aI="_commenuSectionParentHeader_xl2as_1",iI="_commenuSectionParentHeader1232_xl2as_1",oI="_commenuSectionParentHeader960_xl2as_1",sI="_commenuSectionParentHeader730_xl2as_1",lI="_commenuSectionParentHeader430_xl2as_1",cI="_comdescubreVideos_xl2as_1",uI="_comdescubreVideos1232_xl2as_1",dI="_comdescubreVideos960_xl2as_1",hI="_allCategories_xl2as_1",pI="_containerScountingBtncom_xl2as_3",fI="_btnDeleteAplicacom_xl2as_13",mI="_SearchBtnBarcom_xl2as_33",gI="_btnLeyendTxtcom_xl2as_52",yI="_BtnSearchScountingcom_xl2as_61",vI="_containerPredefinedcom_xl2as_85",bI="_containerPredefinedScountingcom_xl2as_92",xI="_titleContainerPredefinedcom_xl2as_100",_I="_subtitleContainerPredefinedcom_xl2as_111",wI={comfiltersContainer:LR,comfiltersContainer1232:zR,closeFiltersPc:OR,comtextleyemdmultipleleagues:NR,comtextleyemdmultipleleagues380:RR,comfiltersContainer760:DR,comfiltersContainer460:IR,comcontainerSection:FR,comcontainerSection1232:VR,comcontainerSection960:BR,comcontainerSection320:UR,comcontainerSection350:jR,comtemplateLosMejores1:qR,comtemplateLosMejores11232:WR,comtemplateLosMejores1960:HR,comtemplateLosMejores1420:GR,comtemplateLosMejores1320:XR,comtemplateLosMejores1540:KR,comtemplateLosMejores1350:JR,comtopFiltersParent:$R,comtopFiltersParent1232:ZR,comtopFiltersParent960:YR,comtopFiltersParent460:QR,comtopFiltersParent420:eD,comcontainerTheBest:tD,comcontainerTheBest1232:rD,comcontainerTheBest960:nD,comcontainerTheBest320:aD,comtitleSection:iD,comtitleSection540:oD,comcontainerTables:sD,comcontainerTables960:lD,comcontainerTables760:cD,comcontainerTables320:uD,comtoniKroosWrapper:dD,comtoniKroosWrapper1080:hD,comtoniKroosWrapper975:pD,comtoniKroosWrapper760:fD,comtoniKroosWrapper420:mD,comtoniKroosWrapper320:gD,frameChild:yD,filtros:vD,groupParent:bD,shapeIcon:xD,btnFilters:_D,btnFiltersPC:wD,comquitarFiltros:kD,comquitarFiltros730:TD,comquitarFiltros480:SD,comquitarFiltros380:AD,btnCloseFilters:ED,commejoresJugadores:CD,commejoresJugadores730:MD,commejoresJugadores480:PD,mejoresJugadoresSM:LD,toniKroos:zD,teamBar:OD,commenuSection:ND,commenuSection960:RD,comcontainerMenu:DD,comcontainerMenu760:ID,containerFilters:FD,teamBarParent:VD,comtopFilters:BD,comtopFilters1232:UD,comtopFilters420:jD,comtopFilters460:qD,comlosMejores:WD,comlosMejores380:HD,comlosMejores530:GD,comlosMejores730:XD,commenuSectionHeader:KD,commenuSectionHeader1232:JD,commenuSectionHeader960:$D,commenuSectionHeader730:ZD,comdropdown:YD,comdropdown730:QD,comdropdown1:eI,comdropdown1730:tI,comdropdownParent:rI,comdropdownParent730:nI,commenuSectionParentHeader:aI,commenuSectionParentHeader1232:iI,commenuSectionParentHeader960:oI,commenuSectionParentHeader730:sI,commenuSectionParentHeader430:lI,comdescubreVideos:cI,comdescubreVideos1232:uI,comdescubreVideos960:dI,allCategories:hI,containerScountingBtncom:pI,btnDeleteAplicacom:fI,SearchBtnBarcom:mI,btnLeyendTxtcom:gI,BtnSearchScountingcom:yI,containerPredefinedcom:vI,containerPredefinedScountingcom:bI,titleContainerPredefinedcom:xI,subtitleContainerPredefinedcom:_I},kI=g.ref(PR()),TI={components:{GSCTopCategory:UM},computed:{...I8.computed,filterChangePredefined(){return this.filtersPredefinedF},filterChange(){const a={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},d=JSON.stringify(a);return JSON.stringify(this.filters)!=d,d},filterGolstats(){return this.FVfilterGolstats},filterButtonProps(){return{...kI.value}}},props:{timeLiveComparativeAvanced:{type:Number,default:6e4},currentSeasonId:{type:Number,default:0},typeData:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},carrousel:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},teamId:{type:Number,default:0},gameId:{type:Number,default:0},isWidget:{type:Boolean,default:!1},seasonSelected:{type:Object,default:()=>({})},categoryView:{type:Array,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:""},numRows:{type:Number,default:5},dummyData:{type:Array,default:null}},watch:{async seasonActive(){if(this.seasonActive!=0){this.teams=[];const a=await this.fetchTeams();for(let d=0;d<a.teams.length;d++)this.teams.push({id:a.teams[d].team_id,team:a.teams[d].colloquial_name,logo:a.teams[d].logo})}}},setup(){const a=g.ref("myDivRefTopsFull"),{elementSize:d}=pf(a);return{myDivRefTopsFull:a,elementSize:d}},data(){return{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"}],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},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}],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:[],filtersTypes:YM,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,fVtypeZone:2,fVsetPositionsIds:[1,2,3,4,5,6,7,8,9],currentIndex:-1,delay:800,tournamentSelected:0,tournamentSelectedObj:{},FVfilterGolstats:[],updateFilterField:0,openMenuMobil:!1,selectedTournament:{seasons:[]},selectedSeasonObj:{}}},methods:{getnameshort(a){var d=a.split(","),A=d[0].split(" "),U=d[1].trim().split(" "),ae="";A.length==2||A.length==1?A[0].length<4?ae=A[0]+" "+A[1]:ae=A[0]:A.length==3?ae=A[0]+" "+A[1]:A.length==4&&(ae=A[1]+" "+A[2]+" "+A[3]);var O=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return ae=ae.replace(",",""),O+". "+ae},setUpTournamentsToFilter(){this.tournamentsToFilter.forEach(a=>{const d=a.id===this.selectedTournament.id;a.isSelected=d,a.isDefaultTournament=d})},async onClickDeleteFilter(){this.optionSelectedSubmenu=="Predeterminados"?this.resetPredefinedTeamAll():(this.arrayFiltersPlays=[],setTimeout(()=>{},200))},clickOpenFilters(){this.showfiltersPc=!0},clickCloseFilters(){this.showfiltersPc=!1},async selectedSeason(a){this.seasonActive!==a.id&&(this.seasonActive=a.id,this.resetPredefinedTeamAll(),this.$emit("change-season-id",a.id))},changeTournament(a){a.id!==this.selectedTournament.id&&(this.selectedTournament=a,this.tournamentSelectedObj={propName:"id",value:a.id},this.teamselect=0,this.resetPredefinedTeamAll(),this.setUpTournamentsToFilter())},changeTournamentMovil(a){this.tournamentSelectedObj={propName:"id",value:a.id},this.seasonBytournament=a.seasons,this.teamselect=0},selectedSeasonMovil(a){this.seasonActive=a.id},setRelevantCategoriesPlayer(a){return a===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(a){this.$emit("openmedia",a)},setMediaData(a){let d=[a.id],A=a.team_id;const U={seasonId:a.season_id,isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:d,goalkeeperIds:[],categoryIds:this.setRelevantCategoriesPlayer(a.position),teamId:A||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",U)},clickprofile(a){a.isTeam?this.$emit("openProfileTeam",{teamId:a.id,seasonId:this.seasonActive}):this.$emit("openProfilePlayer",{playerId:a.id,teamId:a.teamId,seasonId:this.seasonActive})},viewprofile(a,d,A){this.$emit("openProfilePlayer",{playerId:a,teamId:A,seasonId:d||this.seasonActive})},openMenuFilters(){this.openMenuMobil=!this.openMenuMobil,this.showfiltersPc=!0},clickexpand(){},async getScoutingData(){this.arrayFiltersPlays=[],this.loadingActive=!0;const a=Lo.create({headers:{Authorization:`${this.token}`}}),{data:d}=await a.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 A=this.arrayFiltersPlays.findIndex(ae=>ae.type==="onFiltersTournaments");A!==-1?this.arrayFiltersPlays[A].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 ae=0;ae<d.length;ae++){d[ae];let O=d[ae].dob.split("T")[0].split("-");var U={position:ae+1,player_name:this.abrevName(d[ae].name),player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/"+d[ae].player_id+".png",total:d[ae].total.toFixed(0),id:d[ae].player_id,player_age:this.calcularEdad(d[ae].dob),team_abrev:d[ae].teams[0].acronym,team_name:d[ae].teams[0].team_name,team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+d[ae].teams[0].team_id+".png",player_position:d[ae].position_id,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+d[ae].nationality_id+".jpg",date:O[2]+"."+O[1]+"."+O[0].substring(2,4),team_id:d[ae].team_id,nationality_name:R2[d[ae].nationality_id],player_games:d[ae].games_played,player_min:d[ae].minutes_played,league_name:d[ae].tournament_name,seasons:d[ae].seasons,season_id:d[ae].seasons[0]};this.rowScoutingData.push(U)}if(this.seasonsFilterSelected!=0){const ae=await this.fetchTeamsScouting(this.seasonsFilterSelected);this.teamselect=0,this.teamselectrec=0,this.teamsscouting=[];for(let O=0;O<ae.teams.length;O++)this.teamsscouting.push({id:ae.teams[O].team_id,team:ae.teams[O].colloquial_name,logo:ae.teams[O].logo})}this.loadingActive=!1},abrevName(a){var d=a.split(","),A=d[0].split(" "),U=d[1].trim().split(" "),ae="";A.length==2||A.length==1?A[0].length<4?ae=A[0]+" "+A[1]:ae=A[0]:A.length==3?ae=A[0]+" "+A[1]:A.length==4&&(ae=A[1]+" "+A[2]+" "+A[3]);var O=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";ae=ae.replace(",","");var E=O+". "+ae;return E},calcularEdad(a){var d=new Date(a),A=new Date,U=A-d,ae=Math.floor(U/(1e3*60*60*24*365.25));return ae},async onFiltersTournaments(a){this.modifidFiltersFlag=!0;var d=[];for(let A=0;A<a.length;A++)a[A].isSelected&&d.push(a[A].id);if(d.length==0&&(d=[1]),d.length==1)for(let A=0;A<a.length;A++)a[A].isSelected&&(this.nameLeagueSelected=a[A].name,this.seasonsFilterSelected=a[A].seasons[0].id);else this.seasonsFilterSelected=0,d.length>0&&(this.nameLeagueSelected=d.length+" Ligas");this.filterScounting.tournaments=d,this.filterScounting.seasonId=a[0].seasons[0].id},onFiltersPersonalData(a){if(this.modifidFiltersFlag=!0,a.hasOwnProperty("ageByRange")){const U=a.ageByRange.min==0?10:a.ageByRange.min,ae=a.ageByRange.max==0?40:a.ageByRange.max;this.filterScounting.range_age=[U,ae],this.filterScounting.age_or_year=1}else this.filterScounting.range_age=[];a.hasOwnProperty("year")?(this.filterScounting.year=a.year,this.filterScounting.age_or_year=0):this.filterScounting.year=0;var d=[];if(a.hasOwnProperty("nationalities")){for(let U=0;U<a.nationalities.length;U++)a.nationalities[U].isSelected&&d.push(a.nationalities[U].id);d.length==0&&(d=[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=[],a.hasOwnProperty("eligibility")&&(this.filterScounting.elegibles=[a.eligibility[0].id]);var A=[];for(let U=0;U<a.positions.length;U++)a.positions[U].isSelected&&A.push(a.positions[U].id);A.length==0&&(A=[1,2,3,4,5,6,7,8,9,10]),this.filterScounting.positions=A,this.filterScounting.nationalities=d},onFiltersUniverse(a){this.modifidFiltersFlag=!0,this.filterScounting.minutes_played=Number(a.minutesPlayed),this.filterScounting.last_months=Number(a.lastMonths),this.filterScounting.minutes_played_avg=Number(a.percentMinutesPlayed),this.filterScounting.type_stats=a.statistics.averagePerGame?3:a.statistics.averagePerMinute?2:1},onFiltersProductivity(a){this.modifidFiltersFlag=!0;var d=[];for(let A=0;A<a.productivityFilters.length;A++)d[a.productivityFilters[A].priority-1]={name:a.productivityFilters[A].name,ids:a.productivityFilters[A].id};d.length==0&&(d=[]),this.filterScounting.categories=d,this.filterScounting.fouls=a.offensesConditions.areFoulsCommittedSelected,this.filterScounting.yellow_cards=a.offensesConditions.areYellowCardsSelected,this.filterScounting.red_cards=a.offensesConditions.areRedCardsSelected},onFiltersGolStats(a){if(a.length>0){var d=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");d!==-1?this.arrayFiltersPlays[d].name=a[0].name:this.arrayFiltersPlays.push({name:a[0].name,type:"onFiltersPredefined"}),this.filtersPredefinedF=a[0].filters}else{var A=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&A!==-1){this.filtersPredefinedF=this.filters;for(let ae=0;ae<this.FVfilterGolstats.length;ae++)this.FVfilterGolstats[ae].isSelected=!1;var A=this.arrayFiltersPlays.findIndex(ae=>ae.type==="onFiltersPredefined");A!==-1&&this.arrayFiltersPlays.splice(A,1),this.updateFilterGolstats+=1}}},shouldRender(a){return a<=this.currentIndex},renderNext(){this.currentIndex++,this.currentIndex<this.categoriesDefault.length&&setTimeout(()=>{this.$nextTick(()=>{this.renderNext()})},this.delay)},async onFiltersPlaysTypes(a){if(a.length>0){this.categoryPredefinedActive=!0,this.loadingActive=!0,this.categoryPredefined=a[0].id;var d=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&d!==-1){this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(d,1);var A=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");if(A!==-1){for(let U=0;U<this.FVfilterGolstats.length;U++)this.FVfilterGolstats[U].isSelected=!1;A!==-1&&this.arrayFiltersPlays.splice(A,1),this.updateFilterGolstats+=1}}this.updateTables+=1,setTimeout(()=>{this.loadingActive=!1},1e3),await this.getPredefinedfilters(a[0]),this.FVfilterGolstats.length>0&&(this.onFiltersGolStats([this.FVfilterGolstats[0]]),this.FVfilterGolstats[0].isSelected=!0)}else{var d=this.arrayFiltersPlays.findIndex(ae=>ae.type==="onFiltersPredefinedCategory");if(this.categoriesDefault.length>0&&d!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters,this.arrayFiltersPlays.splice(d,1);for(let O=0;O<this.categoriesDefault.length;O++)this.categoriesDefault[O].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var A=this.arrayFiltersPlays.findIndex(O=>O.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&A!==-1){for(let O=0;O<this.FVfilterGolstats.length;O++)this.FVfilterGolstats[O].isSelected=!1;A!==-1&&this.arrayFiltersPlays.splice(A,1),this.updateFilterGolstats+=1}}}},deleteCategoryFilter(){this.categoryName="",this.showFullCategory=0,this.showFullTable=!1,delete this.filters.aux},onShowFullTable(a){this.categoryName=a.categoryName,this.showFullCategory=a.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(a,d){return Math.floor(Math.random()*(d-a+1))+a},applyFiltersBtn(a){},onFiltersPlays(a){if(this.arrayCategoryFilter=[],this.arrayCategoryFilterFull=[],a.playsCategories.length==0){for(let A=0;A<this.categoriesPlaysTypes.offensive.categories.length;A++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offensive.categories[A].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[A]);for(let A=0;A<this.categoriesPlaysTypes.defensive.categories.length;A++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.defensive.categories[A].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[A]);for(let A=0;A<this.categoriesPlaysTypes.possession.categories.length;A++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.possession.categories[A].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[A]);for(let A=0;A<this.categoriesPlaysTypes.offenses.categories.length;A++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offenses.categories[A].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[A])}else for(let A=0;A<a.playsCategories.length;A++)a.playsCategories[A].isSelected&&(this.arrayCategoryFilter.push(a.playsCategories[A].id),this.arrayCategoryFilterFull.push(a.playsCategories[A]));var d=this.arrayFiltersPlays.findIndex(A=>A.type==="onFiltersPlays");this.arrayCategoryFilter.length>0&&this.arrayCategoryFilter.length!=23?this.arrayCategoryFilter.length==1?d!=-1?this.arrayFiltersPlays[d].name=this.arrayCategoryFilterFull[0].name:this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull[0].name,type:"onFiltersPlays"}):d!=-1?this.arrayFiltersPlays[d].name=this.arrayCategoryFilterFull.length+" Tipos de jugadas":this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull.length+" Tipos de jugadas",type:"onFiltersPlays"}):d!==-1&&this.arrayFiltersPlays.splice(d,1)},async deleteLabelFilter(a){var d=this.arrayFiltersPlays.findIndex(U=>U.type===a);if(d!==-1){if(a=="onFiltersTournaments"&&(this.arrayFiltersPlays=[],setTimeout(()=>{},200)),a=="onFiltersPlays"){for(let U=0;U<this.categoriesPlaysTypes.offensive.categories.length;U++)this.categoriesPlaysTypes.offensive.categories[U].isSelected=!0;for(let U=0;U<this.categoriesPlaysTypes.defensive.categories.length;U++)this.categoriesPlaysTypes.defensive.categories[U].isSelected=!0,this.arrayCategoryFilter.push(),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[U]);for(let U=0;U<this.categoriesPlaysTypes.possession.categories.length;U++)this.categoriesPlaysTypes.possession.categories[U].isSelected=!0;for(let U=0;U<this.categoriesPlaysTypes.offenses.categories.length;U++)this.categoriesPlaysTypes.offenses.categories[U].isSelected=!0}if(a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),a=="onFiltersPredefined"){this.filtersPredefinedF=this.filters;for(let U=0;U<this.FVfilterGolstats.length;U++)this.FVfilterGolstats[U].isSelected=!1;this.updateFilterGolstats+=1,this.resetPredefinedTeamAll()}if(a=="onFiltersPredefinedCategory"){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters;var A=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");A!==-1&&this.arrayFiltersPlays.splice(A,1);for(let U=0;U<this.categoriesDefault.length;U++)this.categoriesDefault[U].isSelected=!1;this.updateFilterPlaytypesGolstats+=1}a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ff.NATIONALITY)),a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ff.POSITION)),a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ff.AGE_RANGE)),a=="onFiltersElegibility"&&this.$refs.personalDataFilterPlayers.clearFilters(ff.ELIGIBILITY),a=="onFiltersYear"&&(this.$refs.personalDataFilterPlayers.clearFilters(ff.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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds})}this.arrayFiltersPlays.splice(d,1)},clickAll(){},clickAllAll(){},clickTeam(){},clickTeamScouting(){},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(a){this.resetPredefinedTeamAll(),this.showfiltersPc=!0,this.optionSelected=a,this.optionSelectedSubmenu="Todas las jugadas",this.filtersPredefinedF={},this.categoryPredefinedActive=!1,this.categoryPredefined=0,a=="Equipos"&&(this.typeTable=1,this.isTeam=!0,this.updateTables+=1,this.arrayFiltersPlays=[],this.teamselect=0,this.resetFilterTeamAndPlayers()),a=="Jugadores"&&(this.typeTable=0,this.isTeam=!1,this.teamselect=0,this.updateTables+=1,this.resetFilterTeamAndPlayers())},resetPredefinedTeamAll(){var a=this.arrayFiltersPlays.findIndex(A=>A.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&a!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(a,1);for(let A=0;A<this.categoriesDefault.length;A++)this.categoriesDefault[A].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var d=this.arrayFiltersPlays.findIndex(A=>A.type==="onFiltersPredefined");if(d!==-1){for(let A=0;A<this.FVfilterGolstats.length;A++)this.FVfilterGolstats[A].isSelected=!1;d!==-1&&this.arrayFiltersPlays.splice(d,1),this.updateFilterGolstats+=1}}},changeTabsSubmenu(a){a!="Predeterminados"?this.resetPredefinedTeamAll():this.arrayFiltersPlays=[],this.optionSelectedSubmenu=a},async fetchTournaments(){const a=Lo.create({headers:{Authorization:`${this.token}`}}),{data:d}=await a.get(this.tournamentsUrl);return d},async fetchTeams(){const a=Lo.create({headers:{Authorization:`${this.token}`}}),{data:d}=await a.get(this.teamsUrl+this.seasonActive);return d},async fetchTeamsScouting(a){const d=Lo.create({headers:{Authorization:`${this.token}`}}),{data:A}=await d.get(this.teamsUrl+a);return A},async getPredefinedfilters(a){this.arrayPredefinedFilters=[],this.arrayPredefinedOrigin=[];var d="";a.id==1?d=this.urlFilter:d=this.urlFilter;const A=Lo.create({headers:{Authorization:`${this.token}`}}),{data:U}=await A.get(d+a.id);if(Object.keys(U[0].match_lapse_combinations).forEach(b=>{this.predefinedFiltersMatchLapse[b.toString()]=U[0].match_lapse_combinations[b]}),Object.keys(U[0].playing_as_combinations).forEach(b=>{this.predefinedFiltersPlayingAs[b.toString()]=U[0].playing_as_combinations[b]}),Object.keys(U[0].field_sections_combinations).forEach(b=>{this.predefinedFiltersSections[b.toString()]=U[0].field_sections_combinations[b]}),U[0]){for(let b=0;b<U[0].filter_records.length;b++){var ae=U[0].description;if(U[0].filter_records[b].field_sections!==void 0){const v=U[0].filter_records[b].field_sections.toString();(this.predefinedFiltersSections[v]||this.predefinedFiltersSections[v]=="")&&(this.predefinedFiltersSections[v]==""?ae=ae.replace(" [en {field_sections}]",this.predefinedFiltersSections[v]):ae=ae.replace("{field_sections}",this.predefinedFiltersSections[v]))}if(U[0].filter_records[b].match_lapse!==void 0){const v=U[0].filter_records[b].match_lapse.toString();(this.predefinedFiltersMatchLapse[v]||this.predefinedFiltersMatchLapse[v]=="")&&(this.predefinedFiltersMatchLapse[v]==""?ae=ae.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[v]):ae=ae.replace("{match_lapse}",this.predefinedFiltersMatchLapse[v]))}if(U[0].filter_records[b].playing_as!==void 0){const v=U[0].filter_records[b].playing_as.toString();(this.predefinedFiltersPlayingAs[v]||this.predefinedFiltersPlayingAs[v]=="")&&(this.predefinedFiltersPlayingAs[v]==""?ae=ae.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[v]):ae=ae.replace("{playing_as}",this.predefinedFiltersPlayingAs[v]))}U[0].filter_records[b].section_type!==void 0&&(this.optionSelected=="Jugadores"?ae=ae.replace("{section_type}","Jugadores"):ae=ae.replace("{section_type}","Equipos")),ae=ae.replace(/\[/g,""),ae=ae.replace(/\]/g,""),ae=ae.replace("{category_name}",U[0].category_name);const f=ae.split(": ");var O=f[1];O.length>129&&this.windowWidth>1358&&(O=O.substring(0,129),O=O+"<span id='showIDtootip' class='dots' style='width: 100px; height: 20px; background: red; z-index: 6;'>...</span>"),(!this.isCup||U[0].filter_records[b].playing_as.length===2)&&this.arrayPredefinedFilters.push({id:b,category_name:a.name,id_category:U[0].id,title:f[0]+":",text:f[1],textOrigin:U[0].description,titledots:O,filtersPredefined:{matchResult:U[0].filter_records[b].match_result,playingAs:U[0].filter_records[b].playing_as,sections:U[0].filter_records[b].match_lapse,type:this.optionSelected=="Equipos"?2:1,typeZone:U[0].type_zone,zone:U[0].filter_records[b].field_sections,end_age:0,start_age:0,nationalities:[],elegible:[],positions:[]}})}var E=[];for(let b=0;b<this.arrayPredefinedFilters.length;b++){var t=0,x=new Set,u={},e=this.arrayPredefinedFilters[b].text.replace(/\*.*?\*/,"");if(e=e.replace(/\*/g,""),e=e.replace(/ +/g," "),this.arrayPredefinedFilters[b].filtersPredefined.elegible.length>0&&(t+=1),(this.arrayPredefinedFilters[b].filtersPredefined.end_age.length!=0||this.arrayPredefinedFilters[b].filtersPredefined.start_age.length!=0)&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.end_age!=0&&this.arrayPredefinedFilters[b].filtersPredefined.start_age!=0?u.arrayAgeRange=[this.arrayPredefinedFilters[b].filtersPredefined.start_age,this.arrayPredefinedFilters[b].filtersPredefined.end_age]:this.arrayPredefinedFilters[b].filtersPredefined.end_age==0&&this.arrayPredefinedFilters[b].filtersPredefined.start_age==0?u.arrayAgeRange=[1,60]:this.arrayPredefinedFilters[b].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[b].filtersPredefined.end_age==0?u.arrayAgeRange=[this.arrayPredefinedFilters[b].filtersPredefined.start_age,60]:u.arrayAgeRange=[1,this.arrayPredefinedFilters[b].filtersPredefined.end_age],this.arrayPredefinedFilters[b].filtersPredefined.matchResult.length!=3&&(t+=1),u.matchResult=this.arrayPredefinedFilters[b].filtersPredefined.matchResult,this.arrayPredefinedFilters[b].filtersPredefined.nationalities.length>0&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.nationalities.length!=0){for(let f=0;f<this.arrayPredefinedFilters[b].filtersPredefined.nationalities.length;f++)x.add(this.arrayPredefinedFilters[b].filtersPredefined.nationalities[f]);u.setNationalitiesIds=x}else x.add(138),x.add(222),x.add(163),x.add(51),x.add(226),x.add(10),x.add(223),x.add(96),x.add(171),x.add(198),x.add(105),x.add(80),x.add(29),x.add(74),x.add(216),x.add(196),x.add(64),x.add(155),x.add(156),x.add(89),x.add(106),x.add(81),x.add(233),x.add(204),u.setNationalitiesIds=x;this.arrayPredefinedFilters[b].filtersPredefined.playingAs.length!=2&&(t+=1),u.playingAs=this.arrayPredefinedFilters[b].filtersPredefined.playingAs,this.arrayPredefinedFilters[b].filtersPredefined.positions.length>0&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.positions.length>0?u.setPositionsIds=this.arrayPredefinedFilters[b].filtersPredefined.positions:u.setPositionsIds=[1,2,3,4,5,6,7,8,9],this.arrayPredefinedFilters[b].filtersPredefined.sections.length!=6&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.sections.length>0?u.sections=this.arrayPredefinedFilters[b].filtersPredefined.sections:u.sections=[1,2,3,4,5,6],this.arrayPredefinedFilters[b].filtersPredefined.zone.length!=16&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.zone.length>0?u.zone=this.arrayPredefinedFilters[b].filtersPredefined.zone:u.zone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],u.typeZone=this.arrayPredefinedFilters[b].filtersPredefined.typeZone,E.push({id:b+1,name:e,isSelected:!1,value:t,filters:u})}this.FVfilterGolstats=E,this.updateFilterGolstats+=1,this.arrayPredefinedOrigin=JSON.parse(JSON.stringify(this.arrayPredefinedFilters))}},getTextFilterPredefinedCustom(){this.setDinamicFilters(this.filterEmitAux);var a=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].textOrigin;const d=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.zone.sort((e,b)=>e-b).toString();this.predefinedFiltersSections[d]||this.predefinedFiltersSections[d]==""?this.predefinedFiltersSections[d]==""?a=a.replace(" [en {field_sections}]",this.predefinedFiltersSections[d]):a=a.replace("{field_sections}",this.predefinedFiltersSections[d]):a=a.replace("{field_sections}",this.predefinedFiltersSections.other);var A=!1;this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==this.setNationalityIds.size?(a=a.replace("[{nationality}]",""),a=a.replace("[de las nacionalidades y posiciones seleccionadas]",""),a=a.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==1?(a=a.replace("[{nationality}]",this.$t(`gentilicios[${[...this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities][0]}]`)),a=a.replace("[de las nacionalidades y posiciones seleccionadas]",""),a=a.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size>0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size!=this.setPositionsIds.size?(A=!0,a=a.replace("[{nationality}]",""),a=a.replace("[de las nacionalidades seleccionadas]","")):(a=a.replace("[{nationality}]",""),a=a.replace("[de las nacionalidades y posiciones seleccionadas]","")):(a=a.replace("[{nationality}]",""),a=a.replace("[de las nacionalidades y posiciones seleccionadas]",""),a=a.replace("[de las nacionalidades seleccionadas]","")),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?(A||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size==this.setPositionsIds.size)&&(a=a.replace("[de las posiciones seleccionadas]","")):a=a.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?(a=a.replace("[de {min_age} a {max_age} años]",""),a=a.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(a=a.replace("[de {min_age} años]",""),a=a.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?(a=a.replace("[de {min_age} a {max_age} años]",""),a=a.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(a=a.replace("[de {min_age} años]",""),a=a.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]")):(a=a.replace("[de {min_age} a {max_age} años]",""),a=a.replace("[de {min_age} años]","")):(a=a.replace("[de {min_age} años]",""),a=a.replace("[de {min_age} a {max_age} años]",""));const U=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.sections.sort().toString();if(this.predefinedFiltersMatchLapse[U]||this.predefinedFiltersMatchLapse[U]=="")this.predefinedFiltersMatchLapse[U]==""?a=a.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[U]):a=a.replace("{match_lapse}",this.predefinedFiltersMatchLapse[U]);else{a=a.replace("{match_lapse}"," "+this.predefinedFiltersMatchLapse.other);var ae="";U.includes(1)&&(ae=ae+"0-15, "),U.includes(2)&&(ae=ae+"16-30, "),U.includes(3)&&(ae=ae+"31-45, "),U.includes(4)&&(ae=ae+"46-60, "),U.includes(5)&&(ae=ae+"61-75, "),U.includes(6)&&(ae=ae+"76-90, "),ae=ae.slice(0,-2),ae=ae.replace(/,([^,]*)$/," y $1"),a=a.replace("{match_lapse_selected}",ae)}const O=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.playingAs.sort().toString();(this.predefinedFiltersPlayingAs[O]||this.predefinedFiltersPlayingAs[O]=="")&&(this.predefinedFiltersPlayingAs[O]==""?a=a.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[O]):a=a.replace("{playing_as}",this.predefinedFiltersPlayingAs[O])),this.typeSelected==1?this.getUser.tournament==1001?this.category.id==22?a=a.replace("{section_type}","Porteras"):a=a.replace("{section_type}","Jugadoras"):this.category.id==22?a=a.replace("{section_type}","Porteros"):a=a.replace("{section_type}","Jugadores"):a=a.replace("{section_type}","Equipos"),a=a.replace(/\[/g,""),a=a.replace(/\]/g,""),a=a.replace("{category_name}",this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].category_name);const E=a.split(": ");let t=E[1].charAt(0).toUpperCase()+E[1].toLowerCase().slice(1),x=E[1].charAt(0).toUpperCase()+E[1].toLowerCase().slice(1);this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].text=t,this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].title=E[0]+":";const u=x.match(/\*/g);if(u&&u.length)if(u.length%2===0)for(let e=1;e<=u.length;e++)e%2===0||(x=x.replace("*",'<span style="color: #ffff03" >'));else x=x.replaceAll("*","");this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].titledots=x},intervalidtops(a){this.$emit("intervalidtops",a)}},mounted(){sessionStorage.getItem("sidpdfil")!==null&&sessionStorage.setItem("sidpdfil",0),this.renderNext(),this.teamId!==0&&this.clickTeam(this.teamId),this.defaultSection!=="Jugadores"&&this.changeTabsGeneral(this.defaultSection)},async created(){try{const a=Lo.create({headers:{"Content-Type":"application/json"}});a.interceptors.request.use(A=>(delete A.headers.Authorization,A));const d=await a.get("https://golstats-microservices.s3.us-west-2.amazonaws.com/eligibles/elegibles.json",{headers:{"Content-Type":"application/json"}});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(a){throw new Error(a)}}},SI={ref:"myDivRefTopsFull",style:{width:"100%","max-width":"100%","box-sizing":"border-box"}};function AI(a,d,A,U,ae,O){const E=g.resolveComponent("GSCTopCategory");return g.openBlock(),g.createElementBlock("div",SI,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(A.categoryView,(t,x)=>(g.openBlock(),g.createElementBlock("div",{key:x,class:g.normalizeClass(a.toniKroosWrapperClass)},[(g.openBlock(),g.createBlock(E,{"is-widget":A.isWidget,"team-widget":A.teamWidget,"time-live-comparative-avanced":A.timeLiveComparativeAvanced,"is-team":ae.isTeam,carrousel:A.carrousel,arrow:A.arrow,"border-width":0,"can-play-videos":A.canPlayVideos,"border-radius":"12px","game-id":A.gameId,game:A.game,typeData:0,category:t.id,"type-table":ae.typeTable,categoryName:t.name,"season-selected":A.seasonSelected,season:A.seasonActive,"filter-team":A.teamselect,"num-rows":A.numRows,key:ae.updateTables,"dummy-data":t.id===0?A.dummyData:null},null,8,["is-widget","team-widget","time-live-comparative-avanced","is-team","carrousel","arrow","can-play-videos","game-id","game","category","type-table","categoryName","season-selected","season","filter-team","num-rows","dummy-data"]))],2))),128))],512)}const EI={$style:wI},CI=Wd(TI,[["render",AI],["__cssModules",EI]]),MI=[{top:"01",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow@2x.png",id:9991,age:25,team:"DUM",teamid:1,position:"DEL",positionId:9,positionfull:"Delantero",country:138,effectiveness:100,minutes:90,games:1,date:"01-01-1999",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0},{top:"02",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",id:9992,age:27,team:"DUM",teamname:"Dummy FC",teamid:1,position:"MED",positionId:7,positionfull:"Medio",country:138,effectiveness:95,minutes:85,games:1,date:"02-02-1998",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0},{top:"03",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",id:9993,age:22,team:"DUM",teamname:"Dummy FC",teamid:1,position:"DEF",positionId:2,positionfull:"Defensa",country:138,effectiveness:90,minutes:80,games:1,date:"03-03-2000",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0},{top:"04",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",id:9994,age:24,team:"DUM",teamname:"Dummy FC",teamid:1,position:"POR",positionId:1,positionfull:"Portero",country:138,effectiveness:88,minutes:70,games:1,date:"04-04-1997",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0},{top:"05",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",id:9995,age:28,team:"DUM",teamname:"Dummy FC",teamid:1,position:"LAT",positionId:3,positionfull:"Lateral",country:138,effectiveness:85,minutes:60,games:1,date:"05-05-1995",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0}],PI={class:"gsc-top-player"},LI={__name:"gsc-top-player",props:{categoryView:{type:Array,default:()=>[]},canPlayVideos:{type:Boolean,default:!0},carrousel:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},type:{type:Number,default:1},game:{type:Object,default:()=>({})},gamed:{type:Number,default:90209},season:{type:Number,default:1909},teamView:{type:Number,default:0},numRows:{type:Number,default:5}},setup(a){const d=a,A=d.categoryView.length===1&&d.categoryView[0].id===0?MI:null;return(U,ae)=>(g.openBlock(),g.createElementBlock("div",PI,[g.createVNode(CI,{"can-play-videos":a.canPlayVideos,carrousel:a.carrousel,arrow:a.arrow,"type-data":a.type,"game-id":a.gamed,game:a.game,"season-active":a.season,teamselect:a.teamView,"category-view":a.categoryView,"num-rows":a.numRows,"dummy-data":g.unref(A)},null,8,["can-play-videos","carrousel","arrow","type-data","game-id","game","season-active","teamselect","category-view","num-rows","dummy-data"])]))}},M_=Wd(LI,[["__scopeId","data-v-e448af41"]]);function P_(a,d){return function(){return a.apply(d,arguments)}}const{toString:zI}=Object.prototype,{getPrototypeOf:I1}=Object,{iterator:_0,toStringTag:L_}=Symbol,w0=(a=>d=>{const A=zI.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Bu=a=>(a=a.toLowerCase(),d=>w0(d)===a),k0=a=>d=>typeof d===a,{isArray:bp}=Array,vf=k0("undefined");function OI(a){return a!==null&&!vf(a)&&a.constructor!==null&&!vf(a.constructor)&&ru(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const z_=Bu("ArrayBuffer");function NI(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&z_(a.buffer),d}const RI=k0("string"),ru=k0("function"),O_=k0("number"),T0=a=>a!==null&&typeof a=="object",DI=a=>a===!0||a===!1,S0=a=>{if(w0(a)!=="object")return!1;const d=I1(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(L_ in a)&&!(_0 in a)},II=Bu("Date"),FI=Bu("File"),VI=Bu("Blob"),BI=Bu("FileList"),UI=a=>T0(a)&&ru(a.pipe),jI=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||ru(a.append)&&((d=w0(a))==="formdata"||d==="object"&&ru(a.toString)&&a.toString()==="[object FormData]"))},qI=Bu("URLSearchParams"),[WI,HI,GI,XI]=["ReadableStream","Request","Response","Headers"].map(Bu),KI=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bf(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),bp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function N_(a,d){d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const Ch=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,R_=a=>!vf(a)&&a!==Ch;function F1(){const{caseless:a}=R_(this)&&this||{},d={},A=(U,ae)=>{const O=a&&N_(d,ae)||ae;S0(d[O])&&S0(U)?d[O]=F1(d[O],U):S0(U)?d[O]=F1({},U):bp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&bf(arguments[U],A);return d}const JI=(a,d,A,{allOwnKeys:U}={})=>(bf(d,(ae,O)=>{A&&ru(ae)?a[O]=P_(ae,A):a[O]=ae},{allOwnKeys:U}),a),$I=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),ZI=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},YI=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&I1(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},QI=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},eF=a=>{if(!a)return null;if(bp(a))return a;let d=a.length;if(!O_(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},tF=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&I1(Uint8Array)),rF=(a,d)=>{const A=(a&&a[_0]).call(a);let U;for(;(U=A.next())&&!U.done;){const ae=U.value;d.call(a,ae[0],ae[1])}},nF=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},aF=Bu("HTMLFormElement"),iF=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,A,U){return A.toUpperCase()+U}),D_=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),oF=Bu("RegExp"),I_=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};bf(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},sF=a=>{I_(a,(d,A)=>{if(ru(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(ru(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},lF=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return bp(a)?U(a):U(String(a).split(d)),A},cF=()=>{},uF=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function dF(a){return!!(a&&ru(a.append)&&a[L_]==="FormData"&&a[_0])}const hF=a=>{const d=new Array(10),A=(U,ae)=>{if(T0(U)){if(d.indexOf(U)>=0)return;if(!("toJSON"in U)){d[ae]=U;const O=bp(U)?[]:{};return bf(U,(E,t)=>{const x=A(E,ae+1);!vf(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},pF=Bu("AsyncFunction"),fF=a=>a&&(T0(a)||ru(a))&&ru(a.then)&&ru(a.catch),F_=((a,d)=>a?setImmediate:d?((A,U)=>(Ch.addEventListener("message",({source:ae,data:O})=>{ae===Ch&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),Ch.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",ru(Ch.postMessage)),mF=typeof queueMicrotask<"u"?queueMicrotask.bind(Ch):typeof process<"u"&&process.nextTick||F_,gF=a=>a!=null&&ru(a[_0]),jn={isArray:bp,isArrayBuffer:z_,isBuffer:OI,isFormData:jI,isArrayBufferView:NI,isString:RI,isNumber:O_,isBoolean:DI,isObject:T0,isPlainObject:S0,isReadableStream:WI,isRequest:HI,isResponse:GI,isHeaders:XI,isUndefined:vf,isDate:II,isFile:FI,isBlob:VI,isRegExp:oF,isFunction:ru,isStream:UI,isURLSearchParams:qI,isTypedArray:tF,isFileList:BI,forEach:bf,merge:F1,extend:JI,trim:KI,stripBOM:$I,inherits:ZI,toFlatObject:YI,kindOf:w0,kindOfTest:Bu,endsWith:QI,toArray:eF,forEachEntry:rF,matchAll:nF,isHTMLForm:aF,hasOwnProperty:D_,hasOwnProp:D_,reduceDescriptors:I_,freezeMethods:sF,toObjectSet:lF,toCamelCase:iF,noop:cF,toFiniteNumber:uF,findKey:N_,global:Ch,isContextDefined:R_,isSpecCompliantForm:dF,toJSONObject:hF,isAsyncFn:pF,isThenable:fF,setImmediate:F_,asap:mF,isIterable:gF};function hi(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}jn.inherits(hi,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:jn.toJSONObject(this.config),code:this.code,status:this.status}}});const V_=hi.prototype,B_={};["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(a=>{B_[a]={value:a}}),Object.defineProperties(hi,B_),Object.defineProperty(V_,"isAxiosError",{value:!0}),hi.from=(a,d,A,U,ae,O)=>{const E=Object.create(V_);return jn.toFlatObject(a,E,function(t){return t!==Error.prototype},t=>t!=="isAxiosError"),hi.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const yF=null;function V1(a){return jn.isPlainObject(a)||jn.isArray(a)}function U_(a){return jn.endsWith(a,"[]")?a.slice(0,-2):a}function j_(a,d,A){return a?a.concat(d).map(function(U,ae){return U=U_(U),!A&&ae?"["+U+"]":U}).join(A?".":""):d}function vF(a){return jn.isArray(a)&&!a.some(V1)}const bF=jn.toFlatObject(jn,{},null,function(a){return/^is[A-Z]/.test(a)});function A0(a,d,A){if(!jn.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=jn.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,h){return!jn.isUndefined(h[v])});const U=A.metaTokens,ae=A.visitor||u,O=A.dots,E=A.indexes,t=(A.Blob||typeof Blob<"u"&&Blob)&&jn.isSpecCompliantForm(d);if(!jn.isFunction(ae))throw new TypeError("visitor must be a function");function x(v){if(v===null)return"";if(jn.isDate(v))return v.toISOString();if(jn.isBoolean(v))return v.toString();if(!t&&jn.isBlob(v))throw new hi("Blob is not supported. Use a Buffer instead.");return jn.isArrayBuffer(v)||jn.isTypedArray(v)?t&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,h,r){let n=v;if(v&&!r&&typeof v=="object"){if(jn.endsWith(h,"{}"))h=U?h:h.slice(0,-2),v=JSON.stringify(v);else if(jn.isArray(v)&&vF(v)||(jn.isFileList(v)||jn.endsWith(h,"[]"))&&(n=jn.toArray(v)))return h=U_(h),n.forEach(function(c,o){!(jn.isUndefined(c)||c===null)&&d.append(E===!0?j_([h],o,O):E===null?h:h+"[]",x(c))}),!1}return V1(v)?!0:(d.append(j_(r,h,O),x(v)),!1)}const e=[],b=Object.assign(bF,{defaultVisitor:u,convertValue:x,isVisitable:V1});function f(v,h){if(!jn.isUndefined(v)){if(e.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));e.push(v),jn.forEach(v,function(r,n){(!(jn.isUndefined(r)||r===null)&&ae.call(d,r,jn.isString(n)?n.trim():n,h,b))===!0&&f(r,h?h.concat(n):[n])}),e.pop()}}if(!jn.isObject(a))throw new TypeError("data must be an object");return f(a),d}function q_(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(A){return d[A]})}function B1(a,d){this._pairs=[],a&&A0(a,this,d)}const W_=B1.prototype;W_.append=function(a,d){this._pairs.push([a,d])},W_.toString=function(a){const d=a?function(A){return a.call(this,A,q_)}:q_;return this._pairs.map(function(A){return d(A[0])+"="+d(A[1])},"").join("&")};function xF(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function H_(a,d,A){if(!d)return a;const U=A&&A.encode||xF;jn.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=jn.isURLSearchParams(d)?d.toString():new B1(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}let G_=class{constructor(){this.handlers=[]}use(a,d,A){return this.handlers.push({fulfilled:a,rejected:d,synchronous:A?A.synchronous:!1,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){jn.forEach(this.handlers,function(d){d!==null&&a(d)})}};const X_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_F=typeof URLSearchParams<"u"?URLSearchParams:B1,wF=typeof FormData<"u"?FormData:null,kF=typeof Blob<"u"?Blob:null,TF={isBrowser:!0,classes:{URLSearchParams:_F,FormData:wF,Blob:kF},protocols:["http","https","file","blob","url","data"]},U1=typeof window<"u"&&typeof document<"u",j1=typeof navigator=="object"&&navigator||void 0,SF=U1&&(!j1||["ReactNative","NativeScript","NS"].indexOf(j1.product)<0),AF=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",EF=U1&&window.location.href||"http://localhost",CF=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:U1,hasStandardBrowserEnv:SF,hasStandardBrowserWebWorkerEnv:AF,navigator:j1,origin:EF},Symbol.toStringTag,{value:"Module"})),Tc={...CF,...TF};function MF(a,d){return A0(a,new Tc.classes.URLSearchParams,Object.assign({visitor:function(A,U,ae,O){return Tc.isNode&&jn.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)}},d))}function PF(a){return jn.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function LF(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function K_(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&jn.isArray(ae)?ae.length:E,x?(jn.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!jn.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&jn.isArray(ae[E])&&(ae[E]=LF(ae[E])),!t)}if(jn.isFormData(a)&&jn.isFunction(a.entries)){const A={};return jn.forEachEntry(a,(U,ae)=>{d(PF(U),ae,A,0)}),A}return null}function zF(a,d,A){if(jn.isString(a))try{return(d||JSON.parse)(a),jn.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const xf={transitional:X_,adapter:["xhr","http","fetch"],transformRequest:[function(a,d){const A=d.getContentType()||"",U=A.indexOf("application/json")>-1,ae=jn.isObject(a);if(ae&&jn.isHTMLForm(a)&&(a=new FormData(a)),jn.isFormData(a))return U?JSON.stringify(K_(a)):a;if(jn.isArrayBuffer(a)||jn.isBuffer(a)||jn.isStream(a)||jn.isFile(a)||jn.isBlob(a)||jn.isReadableStream(a))return a;if(jn.isArrayBufferView(a))return a.buffer;if(jn.isURLSearchParams(a))return d.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let O;if(ae){if(A.indexOf("application/x-www-form-urlencoded")>-1)return MF(a,this.formSerializer).toString();if((O=jn.isFileList(a))||A.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return A0(O?{"files[]":a}:a,E&&new E,this.formSerializer)}}return ae||U?(d.setContentType("application/json",!1),zF(a)):a}],transformResponse:[function(a){const d=this.transitional||xf.transitional,A=d&&d.forcedJSONParsing,U=this.responseType==="json";if(jn.isResponse(a)||jn.isReadableStream(a))return a;if(a&&jn.isString(a)&&(A&&!this.responseType||U)){const ae=!(d&&d.silentJSONParsing)&&U;try{return JSON.parse(a)}catch(O){if(ae)throw O.name==="SyntaxError"?hi.from(O,hi.ERR_BAD_RESPONSE,this,null,this.response):O}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tc.classes.FormData,Blob:Tc.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};jn.forEach(["delete","get","head","post","put","patch"],a=>{xf.headers[a]={}});const OF=jn.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"]),NF=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4045
|
+
`+ae):A.stack=ae}catch{}}throw A}}_request(a,d){typeof a=="string"?(d=d||{},d.url=a):d=a||{},d=Ah(this.defaults,d);const{transitional:A,paramsSerializer:U,headers:ae}=d;A!==void 0&&m0.assertOptions(A,{silentJSONParsing:id.transitional(id.boolean),forcedJSONParsing:id.transitional(id.boolean),clarifyTimeoutError:id.transitional(id.boolean)},!1),U!=null&&(Gn.isFunction(U)?d.paramsSerializer={serialize:U}:m0.assertOptions(U,{encode:id.function,serialize:id.function},!0)),d.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?d.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:d.allowAbsoluteUrls=!0),m0.assertOptions(d,{baseUrl:id.spelling("baseURL"),withXsrfToken:id.spelling("withXSRFToken")},!0),d.method=(d.method||this.defaults.method||"get").toLowerCase();let O=ae&&Gn.merge(ae.common,ae[d.method]);ae&&Gn.forEach(["delete","get","head","post","put","patch","common"],v=>{delete ae[v]}),d.headers=Vu.concat(O,ae);const E=[];let t=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(d)===!1||(t=t&&v.synchronous,E.unshift(v.fulfilled,v.rejected))});const x=[];this.interceptors.response.forEach(function(v){x.push(v.fulfilled,v.rejected)});let u,e=0,b;if(!t){const v=[k_.bind(this),void 0];for(v.unshift.apply(v,E),v.push.apply(v,x),b=v.length,u=Promise.resolve(d);e<b;)u=u.then(v[e++],v[e++]);return u}b=E.length;let f=d;for(e=0;e<b;){const v=E[e++],h=E[e++];try{f=v(f)}catch(r){h.call(this,r);break}}try{u=k_.call(this,f)}catch(v){return Promise.reject(v)}for(e=0,b=x.length;e<b;)u=u.then(x[e++],x[e++]);return u}getUri(a){a=Ah(this.defaults,a);const d=f_(a.baseURL,a.url,a.allowAbsoluteUrls);return i_(d,a.params,a.paramsSerializer)}};Gn.forEach(["delete","get","head","options"],function(a){g0.prototype[a]=function(d,A){return this.request(Ah(A||{},{method:a,url:d,data:(A||{}).data}))}}),Gn.forEach(["post","put","patch"],function(a){function d(A){return function(U,ae,O){return this.request(Ah(O||{},{method:a,headers:A?{"Content-Type":"multipart/form-data"}:{},url:U,data:ae}))}}g0.prototype[a]=d(),g0.prototype[a+"Form"]=d(!0)});const y0=g0,Wz=class X4{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let A;this.promise=new Promise(function(ae){A=ae});const U=this;this.promise.then(ae=>{if(!U._listeners)return;let O=U._listeners.length;for(;O-- >0;)U._listeners[O](ae);U._listeners=null}),this.promise.then=ae=>{let O;const E=new Promise(t=>{U.subscribe(t),O=t}).then(ae);return E.cancel=function(){U.unsubscribe(O)},E},d(function(ae,O,E){U.reason||(U.reason=new gp(ae,O,E),A(U.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const A=this._listeners.indexOf(d);A!==-1&&this._listeners.splice(A,1)}toAbortSignal(){const d=new AbortController,A=U=>{d.abort(U)};return this.subscribe(A),d.signal.unsubscribe=()=>this.unsubscribe(A),d.signal}static source(){let d;return{token:new X4(function(A){d=A}),cancel:d}}};function Hz(a){return function(d){return a.apply(null,d)}}function Gz(a){return Gn.isObject(a)&&a.isAxiosError===!0}const O1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(O1).forEach(([a,d])=>{O1[d]=a});const Xz=O1;function A_(a){const d=new y0(a),A=Wx(y0.prototype.request,d);return Gn.extend(A,y0.prototype,d,{allOwnKeys:!0}),Gn.extend(A,d,null,{allOwnKeys:!0}),A.create=function(U){return A_(Ah(a,U))},A}const Il=A_(E1);Il.Axios=y0,Il.CanceledError=gp,Il.CancelToken=Wz,Il.isCancel=u_,Il.VERSION=T_,Il.toFormData=l0,Il.AxiosError=di,Il.Cancel=Il.CanceledError,Il.all=function(a){return Promise.all(a)},Il.spread=Hz,Il.isAxiosError=Gz,Il.mergeConfig=Ah,Il.AxiosHeaders=Vu,Il.formToJSON=a=>l_(Gn.isHTMLForm(a)?new FormData(a):a),Il.getAdapter=w_.getAdapter,Il.HttpStatusCode=Xz,Il.default=Il,Array.from({length:30},(a,d)=>1981+d).sort((a,d)=>d-a);const Kz={__name:"SwitchCustom",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:d}){const A=a,U=g.ref(null);g.watch(()=>A.modelValue,()=>{ae()},{immediate:!0});function ae(){U.value&&(U.value.checked=A.modelValue)}function O(E){d("update:modelValue",E.target.checked)}return g.onMounted(()=>{ae()}),(E,t)=>(g.openBlock(),g.createElementBlock("input",{ref_key:"switchCustom",ref:U,id:"toggle",class:"toggle",type:"checkbox",role:"switch",name:"toggle",onInput:O},null,544))}},N1=Qc(Kz,[["__scopeId","data-v-e3a6ae4e"]]),Jz={__name:"ButtonCustom",props:{text:{type:String,default:""},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},padding:{type:String,default:"0px"},borderRadius:{type:String,default:"0px"},borderWidth:{type:String,default:"1px"},borderColor:{type:String,default:"#d9d9d9"},backgroundColor:{type:String,default:"#FFFFFF"},activeBackgroundColor:{type:String,default:""},activeBorderColor:{type:String,default:""},activeFontColor:{type:String,default:""},fontColor:{type:String,default:"#000000"},fontSize:{type:String,default:"16px"},fontFamily:{type:String,default:"Poppins-Regular, sans-serif"},isActive:{type:Boolean,default:!1}},emits:["click"],setup(a,{emit:d}){const A=a,U=g.computed(()=>({"--height":A.height,"--width":A.width,"--padding":A.padding,"--border-radius":A.borderRadius,"--border":`solid ${A.borderWidth} ${A.borderColor}`,"--background-color":A.backgroundColor,"--font-color":A.fontColor,"--font-size":A.fontSize,"--font-family":A.fontFamily,"--active-background-color":A.activeBackgroundColor||A.backgroundColor,"--active-border-color":A.activeBorderColor||A.borderColor,"--active-font-color":A.activeFontColor||A.fontColor}));function ae(){d("click")}return(O,E)=>(g.openBlock(),g.createElementBlock("button",{class:g.normalizeClass(["button",{active:a.isActive}]),style:g.normalizeStyle(U.value),onClick:ae},g.toDisplayString(a.text),7))}},v0=Qc(Jz,[["__scopeId","data-v-9688933e"]]),$z={class:"dropdown"},Zz={class:"selected-item"},Yz={__name:"DropdownTextOnly",props:{items:{type:Array,default:()=>[]},itemTextKey:{type:String,default:""},isListSameWidth:{type:Boolean,default:!0}},emits:["input"],setup(a,{emit:d}){function A(U){d("input",U)}return(U,ae)=>(g.openBlock(),g.createElementBlock("div",$z,[g.createVNode(g.unref(g1),g.mergeProps(g.unref(y1),{"is-list-same-width":a.isListSameWidth,items:a.items,onInput:A}),{default:g.withCtx(({selectedItem:O})=>[g.createElementVNode("div",Zz,g.toDisplayString(a.itemTextKey?O[a.itemTextKey]:O),1)]),availableItem:g.withCtx(({item:O})=>[g.createElementVNode("div",null,g.toDisplayString(a.itemTextKey?O[a.itemTextKey]:O),1)]),_:1},16,["is-list-same-width","items"])]))}},tu=Qc(Yz,[["__scopeId","data-v-064d5f86"]]),Qz={class:"dropdown"},eO={class:"game-item"},tO={key:0,class:"item-game"},rO={class:"match-day"},nO={class:"team-logo"},aO=["src"],iO={class:"text"},oO={class:"text score"},sO={class:"text"},lO={class:"team-logo"},cO=["src"],uO={class:"item-game"},dO={class:"team-logo"},hO=["src"],pO={class:"text"},fO={class:"text score"},mO={class:"text"},gO={class:"team-logo"},yO=["src"],vO={__name:"DropdownGame",props:{items:{type:Array,default:()=>[]}},emits:["input"],setup(a,{emit:d}){function A(U){d("input",U)}return(U,ae)=>(g.openBlock(),g.createElementBlock("div",Qz,[g.createVNode(g.unref(g1),g.mergeProps(g.unref(y1),{items:a.items,onInput:A}),{default:g.withCtx(({selectedItem:O})=>[g.createElementVNode("div",eO,[O.homeTeam?(g.openBlock(),g.createElementBlock("div",tO,[g.createElementVNode("div",rO,g.toDisplayString(O.roundAbbreviation),1),g.createElementVNode("div",nO,[g.createElementVNode("img",{src:O.homeTeam.logo,alt:""},null,8,aO)]),g.createElementVNode("div",iO,g.toDisplayString(O.homeTeam.acronym),1),g.createElementVNode("div",oO,g.toDisplayString(O.score[0])+" - "+g.toDisplayString(O.score[1]),1),g.createElementVNode("div",sO,g.toDisplayString(O.awayTeam.acronym),1),g.createElementVNode("div",lO,[g.createElementVNode("img",{src:O.awayTeam.logo,alt:""},null,8,cO)])])):g.createCommentVNode("",!0)])]),availableItem:g.withCtx(({item:O})=>[g.createElementVNode("div",uO,[g.createElementVNode("div",null,g.toDisplayString(O.roundAbbreviation),1),g.createElementVNode("div",dO,[g.createElementVNode("img",{src:O.homeTeam.logo,alt:""},null,8,hO)]),g.createElementVNode("div",pO,g.toDisplayString(O.homeTeam.acronym),1),g.createElementVNode("div",fO,g.toDisplayString(O.score[0])+" - "+g.toDisplayString(O.score[1]),1),g.createElementVNode("div",mO,g.toDisplayString(O.awayTeam.acronym),1),g.createElementVNode("div",gO,[g.createElementVNode("img",{src:O.awayTeam.logo,alt:""},null,8,yO)])])]),_:1},16,["items"])]))}},b0=Qc(vO,[["__scopeId","data-v-7883a91e"]]),x0=a=>(g.pushScopeId("data-v-b63e9c84"),a=a(),g.popScopeId(),a),bO={class:"container"},xO={class:"container__row"},_O={class:"container__row__wrapper"},wO=x0(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),kO={class:"container__row__wrapper__input"},TO={class:"container__row two-items"},SO={class:"container__row__wrapper"},AO=x0(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),EO={key:0,class:"container__row__wrapper__input"},CO={class:"container__row__wrapper"},MO=x0(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige la jornada",-1)),PO={key:0,class:"container__row__wrapper__input"},LO={class:"container__row"},zO={class:"container__row__wrapper"},OO=x0(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),NO={key:0,class:"container__row__wrapper__input"},RO={class:"container__action"},DO={__name:"VideosGoals",props:{tournaments:{type:Array,required:!0}},emits:["update:tournament","update:season"],setup(a,{emit:d}){const A={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},U=g.ref(null),ae=g.ref(null),O=g.ref(null),E=g.ref(null);function t(b){U.value=b,d("update:tournament",b)}function x(b){ae.value=b,d("update:season",b)}function u(b){O.value=b}function e(b){E.value=b}return(b,f)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createElementVNode("div",bO,[g.createElementVNode("div",xO,[g.createElementVNode("div",_O,[wO,g.createElementVNode("div",kO,[g.createVNode(tu,{items:a.tournaments,itemTextKey:"name",onInput:t},null,8,["items"])])])]),g.createElementVNode("div",TO,[g.createElementVNode("div",SO,[AO,U.value&&U.value.seasons?(g.openBlock(),g.createElementBlock("div",EO,[g.createVNode(tu,{items:U.value.seasons,itemTextKey:"name",onInput:x},null,8,["items"])])):g.createCommentVNode("",!0)]),g.createElementVNode("div",CO,[MO,ae.value&&ae.value.arrayMatchDays?(g.openBlock(),g.createElementBlock("div",PO,[g.createVNode(tu,{items:ae.value.arrayMatchDays,itemTextKey:"stringMatchDayAbbreviation",onInput:u},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",LO,[g.createElementVNode("div",zO,[OO,O.value&&O.value.arrayGames?(g.openBlock(),g.createElementBlock("div",NO,[g.createVNode(b0,{items:O.value.arrayGames,onInput:e},null,8,["items"])])):g.createCommentVNode("",!0)])])]),g.createElementVNode("div",RO,[g.createVNode(v0,g.normalizeProps(g.guardReactiveProps(A)),null,16)])],64))}},IO=Qc(DO,[["__scopeId","data-v-b63e9c84"]]),FO={class:"dropdown"},VO={class:"item-team"},BO={class:"team-logo"},UO=["src"],jO={class:"team-acronym"},qO={class:"item-team"},WO={class:"team-logo"},HO=["src"],GO={class:"team-acronym"},XO={__name:"DropdownTeam",props:{items:{type:Array,default:()=>[]}},emits:["input"],setup(a,{emit:d}){function A(U){d("input",U)}return(U,ae)=>(g.openBlock(),g.createElementBlock("div",FO,[g.createVNode(g.unref(g1),g.mergeProps(g.unref(y1),{items:a.items,onInput:A}),{default:g.withCtx(({selectedItem:O})=>[g.createElementVNode("div",VO,[g.createElementVNode("div",BO,[g.createElementVNode("img",{src:O.logo,alt:""},null,8,UO)]),g.createElementVNode("div",jO,g.toDisplayString(O.acronym),1)])]),availableItem:g.withCtx(({item:O})=>[g.createElementVNode("div",qO,[g.createElementVNode("div",WO,[g.createElementVNode("img",{src:O.logo,alt:""},null,8,HO)]),g.createElementVNode("div",GO,g.toDisplayString(O.acronym),1)])]),_:1},16,["items"])]))}},E_=Qc(XO,[["__scopeId","data-v-afd2bee8"]]),KO={class:"advanced-filters"},JO={class:"advanced-filters__buttons"},$O=["onClick"],ZO={class:"advanced-filters__filters"},YO={__name:"AdvancedFilters",props:{selectedCategory:{type:Object,default:()=>({})}},setup(a){const d=a,A=g.defineAsyncComponent(()=>Promise.resolve().then(()=>Dhe)),U=g.defineAsyncComponent(()=>Promise.resolve().then(()=>epe)),ae=g.defineAsyncComponent(()=>Promise.resolve().then(()=>rpe)),O=[{name:"Sub categorías",component:A},{name:"Cancha",component:ae},{name:"Condiciones",component:U}],E=g.ref(O[0]),t=g.computed(()=>d.selectedCategory?d.selectedCategory.subcategoryGroups||[]:[]);function x(u){E.value=u}return(u,e)=>(g.openBlock(),g.createElementBlock("div",KO,[g.createElementVNode("div",JO,[(g.openBlock(),g.createElementBlock(g.Fragment,null,g.renderList(O,b=>g.createElementVNode("div",{key:b.name,role:"button",class:g.normalizeClass(["advanced-filters__buttons__button",{active:E.value.name===b.name}]),onClick:f=>x(b)},g.toDisplayString(b.name),11,$O)),64))]),g.createElementVNode("div",ZO,[(g.openBlock(),g.createBlock(g.KeepAlive,null,[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(E.value.component),{"subcategory-groups":t.value},null,8,["subcategory-groups"]))],1024))])]))}},R1=Qc(YO,[["__scopeId","data-v-c62c5b9c"]]),Eh=a=>(g.pushScopeId("data-v-575b26b5"),a=a(),g.popScopeId(),a),QO={class:"container"},eN={class:"container__row"},tN={class:"container__row__wrapper"},rN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),nN={class:"container__row__wrapper__input"},aN={class:"container__row two-items"},iN={class:"container__row__wrapper"},oN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),sN={key:0,class:"container__row__wrapper__input"},lN={class:"container__row__wrapper"},cN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"3. En que equipo juega?",-1)),uN={key:0,class:"container__row__wrapper__input"},dN={class:"container__row"},hN={class:"container__row__wrapper"},pN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Nombre del jugador",-1)),fN={key:0,class:"container__row__wrapper__input"},mN={class:"container__row"},gN={class:"container__row__wrapper"},yN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"5. Elige el partido",-1)),vN={key:0,class:"container__row__wrapper__input"},bN={class:"container__row type-and-advanced"},xN={class:"container__row__wrapper"},_N=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"6. Elige el tipo de video",-1)),wN={class:"container__row__wrapper__input"},kN={class:"container__row__wrapper center"},TN=Eh(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),SN={class:"container__row__wrapper__input"},AN={class:"container__row"},EN={class:"container__action"},CN={__name:"VideosPlayer",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({player:[],goalkeeper:[]})}},emits:["update:tournament","update:season","update:team"],setup(a,{emit:d}){const A=a,U={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},ae=g.ref(null),O=g.ref(null);g.ref(null);const E=g.ref(null),t=g.ref(null),x=g.ref(null),u=g.ref(null),e=g.ref(!0),b=g.computed(()=>x.value?x.value.position_id===1?A.advancedFilterCategories.goalkeeper:A.advancedFilterCategories.player:[]);function f(o){ae.value=o,d("update:tournament",o)}function v(o){O.value=o,d("update:season",o)}function h(o){t.value=o,d("update:team",o)}function r(o){x.value=o}function n(o){E.value=o}function c(o){u.value=o}return(o,l)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createElementVNode("div",QO,[g.createElementVNode("div",eN,[g.createElementVNode("div",tN,[rN,g.createElementVNode("div",nN,[g.createVNode(tu,{items:a.tournaments,itemTextKey:"name",onInput:f},null,8,["items"])])])]),g.createElementVNode("div",aN,[g.createElementVNode("div",iN,[oN,ae.value&&ae.value.seasons?(g.openBlock(),g.createElementBlock("div",sN,[g.createVNode(tu,{items:ae.value.seasons,itemTextKey:"name",onInput:v},null,8,["items"])])):g.createCommentVNode("",!0)]),g.createElementVNode("div",lN,[cN,O.value&&O.value.arrayTeams?(g.openBlock(),g.createElementBlock("div",uN,[g.createVNode(E_,{items:O.value.arrayTeams,itemTextKey:"stringMatchDayAbbreviation",onInput:h},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",dN,[g.createElementVNode("div",hN,[pN,t.value&&t.value.arrayPlayers?(g.openBlock(),g.createElementBlock("div",fN,[g.createVNode(tu,{items:t.value.arrayPlayers,itemTextKey:"player_name",onInput:r},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",mN,[g.createElementVNode("div",gN,[yN,O.value&&O.value.mapGamesByTeam&&t.value?(g.openBlock(),g.createElementBlock("div",vN,[g.createVNode(b0,{items:O.value.mapGamesByTeam.get(t.value.team_id),onInput:n},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",bN,[g.createElementVNode("div",xN,[_N,g.createElementVNode("div",wN,[g.createVNode(tu,{items:b.value,itemTextKey:"name","is-list-same-width":!1,onInput:c},null,8,["items"])])]),g.createElementVNode("div",kN,[TN,g.createElementVNode("div",SN,[g.createVNode(N1,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=p=>e.value=p)},null,8,["modelValue"])])])]),g.createElementVNode("div",AN,[g.createVNode(R1,{"selected-category":u.value},null,8,["selected-category"])])]),g.createElementVNode("div",EN,[g.createVNode(v0,g.normalizeProps(g.guardReactiveProps(U)),null,16)])],64))}},MN=Qc(CN,[["__scopeId","data-v-575b26b5"]]),yp=a=>(g.pushScopeId("data-v-6d73d5e6"),a=a(),g.popScopeId(),a),PN={class:"container"},LN={class:"container__row"},zN={class:"container__row__wrapper"},ON=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),NN={class:"container__row__wrapper__input"},RN={class:"container__row two-items"},DN={class:"container__row__wrapper"},IN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),FN={key:0,class:"container__row__wrapper__input"},VN={class:"container__row__wrapper"},BN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige el equipo",-1)),UN={key:0,class:"container__row__wrapper__input"},jN={class:"container__row"},qN={class:"container__row__wrapper"},WN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),HN={key:0,class:"container__row__wrapper__input"},GN={class:"container__row type-and-advanced"},XN={class:"container__row__wrapper"},KN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"5. Elige el tipo de video",-1)),JN={class:"container__row__wrapper__input"},$N={class:"container__row__wrapper center"},ZN=yp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),YN={class:"container__row__wrapper__input"},QN={class:"container__row"},eR={class:"container__action"},tR={__name:"VideosTeam",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({team:[]})}},emits:["update:tournament","update:season","update:team"],setup(a,{emit:d}){const A=a,U={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},ae=g.ref(null),O=g.ref(null);g.ref(null);const E=g.ref(null),t=g.ref(null),x=g.ref(null),u=g.ref(!0),e=g.computed(()=>A.advancedFilterCategories.team);function b(n){ae.value=n,d("update:tournament",n)}function f(n){O.value=n,d("update:season",n)}function v(n){t.value=n,d("update:team",n)}function h(n){E.value=n}function r(n){x.value=n}return(n,c)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createElementVNode("div",PN,[g.createElementVNode("div",LN,[g.createElementVNode("div",zN,[ON,g.createElementVNode("div",NN,[g.createVNode(tu,{items:a.tournaments,itemTextKey:"name",onInput:b},null,8,["items"])])])]),g.createElementVNode("div",RN,[g.createElementVNode("div",DN,[IN,ae.value&&ae.value.seasons?(g.openBlock(),g.createElementBlock("div",FN,[g.createVNode(tu,{items:ae.value.seasons,itemTextKey:"name",onInput:f},null,8,["items"])])):g.createCommentVNode("",!0)]),g.createElementVNode("div",VN,[BN,O.value&&O.value.arrayTeams?(g.openBlock(),g.createElementBlock("div",UN,[g.createVNode(E_,{items:O.value.arrayTeams,itemTextKey:"stringMatchDayAbbreviation",onInput:v},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",jN,[g.createElementVNode("div",qN,[WN,O.value&&O.value.mapGamesByTeam&&t.value?(g.openBlock(),g.createElementBlock("div",HN,[g.createVNode(b0,{items:O.value.mapGamesByTeam.get(t.value.team_id),onInput:h},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",GN,[g.createElementVNode("div",XN,[KN,g.createElementVNode("div",JN,[g.createVNode(tu,{items:e.value,itemTextKey:"name","is-list-same-width":!1,onInput:r},null,8,["items"])])]),g.createElementVNode("div",$N,[ZN,g.createElementVNode("div",YN,[g.createVNode(N1,{modelValue:u.value,"onUpdate:modelValue":c[0]||(c[0]=o=>u.value=o)},null,8,["modelValue"])])])]),g.createElementVNode("div",QN,[g.createVNode(R1,{"selected-category":x.value},null,8,["selected-category"])])]),g.createElementVNode("div",eR,[g.createVNode(v0,g.normalizeProps(g.guardReactiveProps(U)),null,16)])],64))}},rR=Qc(tR,[["__scopeId","data-v-6d73d5e6"]]),vp=a=>(g.pushScopeId("data-v-6e904db8"),a=a(),g.popScopeId(),a),nR={class:"container"},aR={class:"container__row"},iR={class:"container__row__wrapper"},oR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),sR={class:"container__row__wrapper__input"},lR={class:"container__row two-items"},cR={class:"container__row__wrapper"},uR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),dR={key:0,class:"container__row__wrapper__input"},hR={class:"container__row__wrapper"},pR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige la jornada",-1)),fR={key:0,class:"container__row__wrapper__input"},mR={class:"container__row"},gR={class:"container__row__wrapper"},yR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),vR={key:0,class:"container__row__wrapper__input"},bR={class:"container__row type-and-advanced"},xR={class:"container__row__wrapper"},_R=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"6. Elige el tipo de video",-1)),wR={class:"container__row__wrapper__input"},kR={class:"container__row__wrapper center"},TR=vp(()=>g.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),SR={class:"container__row__wrapper__input",style:{width:"fit-content"}},AR={class:"container__row"},ER={class:"container__action"},CR={__name:"VideosGame",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({games:[]})}},emits:["update:tournament","update:season"],setup(a,{emit:d}){const A=a,U={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},ae=g.ref(null),O=g.ref(null),E=g.ref(null),t=g.ref(null),x=g.ref(null),u=g.ref(!0),e=g.computed(()=>A.advancedFilterCategories.games);function b(n){ae.value=n,d("update:tournament",n)}function f(n){O.value=n,d("update:season",n)}function v(n){E.value=n}function h(n){t.value=n}function r(n){x.value=n}return(n,c)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createElementVNode("div",nR,[g.createElementVNode("div",aR,[g.createElementVNode("div",iR,[oR,g.createElementVNode("div",sR,[g.createVNode(tu,{items:a.tournaments,itemTextKey:"name",onInput:b},null,8,["items"])])])]),g.createElementVNode("div",lR,[g.createElementVNode("div",cR,[uR,ae.value&&ae.value.seasons?(g.openBlock(),g.createElementBlock("div",dR,[g.createVNode(tu,{items:ae.value.seasons,itemTextKey:"name",onInput:f},null,8,["items"])])):g.createCommentVNode("",!0)]),g.createElementVNode("div",hR,[pR,O.value&&O.value.arrayMatchDays?(g.openBlock(),g.createElementBlock("div",fR,[g.createVNode(tu,{items:O.value.arrayMatchDays,itemTextKey:"stringMatchDayAbbreviation",onInput:v},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",mR,[g.createElementVNode("div",gR,[yR,E.value&&E.value.arrayGames?(g.openBlock(),g.createElementBlock("div",vR,[g.createVNode(b0,{items:E.value.arrayGames,onInput:h},null,8,["items"])])):g.createCommentVNode("",!0)])]),g.createElementVNode("div",bR,[g.createElementVNode("div",xR,[_R,g.createElementVNode("div",wR,[g.createVNode(tu,{items:e.value,itemTextKey:"name","is-list-same-width":!1,onInput:r},null,8,["items"])])]),g.createElementVNode("div",kR,[TR,g.createElementVNode("div",SR,[g.createVNode(N1,{modelValue:u.value,"onUpdate:modelValue":c[0]||(c[0]=o=>u.value=o)},null,8,["modelValue"])])])]),g.createElementVNode("div",AR,[g.createVNode(R1,{"selected-category":x.value},null,8,["selected-category"])])]),g.createElementVNode("div",ER,[g.createVNode(v0,g.normalizeProps(g.guardReactiveProps(U)),null,16)])],64))}},MR=Qc(CR,[["__scopeId","data-v-6e904db8"]]);g.defineComponent({name:"TemplateVideos",components:{VideosGoals:IO,VideosPlayer:MN,VideosTeam:rR,VideosGame:MR}}),Array.from({length:24},(a,d)=>d+1),od(2,D1()),od(2,D1()),od(1,Hd(1)),od(1,Hd(1)),od(1,Hd(2)),od(1,Hd(2)),od(1,Hd(3)),od(1,Hd(3)),od(1,Hd(4)),od(1,Hd(4));function D1(){return[[337,1],[338,2],[339,3],[340,4],[341,5],[342,6],[343,7],[344,8],[345,9],[346,10],[347,11],[348,12],[349,13],[350,14],[351,15],[352,16],[353,17],[354,18],[355,19],[356,20],[357,21]]}function C_(){return Array.from({length:16},(a,d)=>d+1)}function Hd(a){switch(a){case 1:return[1,2,3,4];case 2:return[5,6,7,8];case 3:return[9,10,11,12];case 4:return[13,14,15,16]}}function od(a=1,d=null){return{origin_zones:a===1?C_():D1(),destiny_zones:d||C_(),minimum_distance_x:0,maximum_distance_x:105,minimum_distance_y:0,maximum_distance_y:68,minimum_total_distance:0,maximum_total_distance:125,zone_type:a}}function PR(){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 LR="_comfiltersContainer_xl2as_1",zR="_comfiltersContainer1232_xl2as_1",OR="_closeFiltersPc_xl2as_1",NR="_comtextleyemdmultipleleagues_xl2as_1",RR="_comtextleyemdmultipleleagues380_xl2as_1",DR="_comfiltersContainer760_xl2as_1",IR="_comfiltersContainer460_xl2as_1",FR="_comcontainerSection_xl2as_1",VR="_comcontainerSection1232_xl2as_1",BR="_comcontainerSection960_xl2as_1",UR="_comcontainerSection320_xl2as_1",jR="_comcontainerSection350_xl2as_1",qR="_comtemplateLosMejores1_xl2as_1",WR="_comtemplateLosMejores11232_xl2as_1",HR="_comtemplateLosMejores1960_xl2as_1",GR="_comtemplateLosMejores1420_xl2as_1",XR="_comtemplateLosMejores1320_xl2as_1",KR="_comtemplateLosMejores1540_xl2as_1",JR="_comtemplateLosMejores1350_xl2as_1",$R="_comtopFiltersParent_xl2as_1",ZR="_comtopFiltersParent1232_xl2as_1",YR="_comtopFiltersParent960_xl2as_1",QR="_comtopFiltersParent460_xl2as_1",eD="_comtopFiltersParent420_xl2as_1",tD="_comcontainerTheBest_xl2as_1",rD="_comcontainerTheBest1232_xl2as_1",nD="_comcontainerTheBest960_xl2as_1",aD="_comcontainerTheBest320_xl2as_1",iD="_comtitleSection_xl2as_1",oD="_comtitleSection540_xl2as_1",sD="_comcontainerTables_xl2as_1",lD="_comcontainerTables960_xl2as_1",cD="_comcontainerTables760_xl2as_1",uD="_comcontainerTables320_xl2as_1",dD="_comtoniKroosWrapper_xl2as_1",hD="_comtoniKroosWrapper1080_xl2as_1",pD="_comtoniKroosWrapper975_xl2as_1",fD="_comtoniKroosWrapper760_xl2as_1",mD="_comtoniKroosWrapper420_xl2as_1",gD="_comtoniKroosWrapper320_xl2as_1",yD="_frameChild_xl2as_1",vD="_filtros_xl2as_1",bD="_groupParent_xl2as_1",xD="_shapeIcon_xl2as_1",_D="_btnFilters_xl2as_1",wD="_btnFiltersPC_xl2as_1",kD="_comquitarFiltros_xl2as_1",TD="_comquitarFiltros730_xl2as_1",SD="_comquitarFiltros480_xl2as_1",AD="_comquitarFiltros380_xl2as_1",ED="_btnCloseFilters_xl2as_1",CD="_commejoresJugadores_xl2as_1",MD="_commejoresJugadores730_xl2as_1",PD="_commejoresJugadores480_xl2as_1",LD="_mejoresJugadoresSM_xl2as_1",zD="_toniKroos_xl2as_1",OD="_teamBar_xl2as_1",ND="_commenuSection_xl2as_1",RD="_commenuSection960_xl2as_1",DD="_comcontainerMenu_xl2as_1",ID="_comcontainerMenu760_xl2as_1",FD="_containerFilters_xl2as_1",VD="_teamBarParent_xl2as_1",BD="_comtopFilters_xl2as_1",UD="_comtopFilters1232_xl2as_1",jD="_comtopFilters420_xl2as_1",qD="_comtopFilters460_xl2as_1",WD="_comlosMejores_xl2as_1",HD="_comlosMejores380_xl2as_1",GD="_comlosMejores530_xl2as_1",XD="_comlosMejores730_xl2as_1",KD="_commenuSectionHeader_xl2as_1",JD="_commenuSectionHeader1232_xl2as_1",$D="_commenuSectionHeader960_xl2as_1",ZD="_commenuSectionHeader730_xl2as_1",YD="_comdropdown_xl2as_1",QD="_comdropdown730_xl2as_1",eI="_comdropdown1_xl2as_1",tI="_comdropdown1730_xl2as_1",rI="_comdropdownParent_xl2as_1",nI="_comdropdownParent730_xl2as_1",aI="_commenuSectionParentHeader_xl2as_1",iI="_commenuSectionParentHeader1232_xl2as_1",oI="_commenuSectionParentHeader960_xl2as_1",sI="_commenuSectionParentHeader730_xl2as_1",lI="_commenuSectionParentHeader430_xl2as_1",cI="_comdescubreVideos_xl2as_1",uI="_comdescubreVideos1232_xl2as_1",dI="_comdescubreVideos960_xl2as_1",hI="_allCategories_xl2as_1",pI="_containerScountingBtncom_xl2as_3",fI="_btnDeleteAplicacom_xl2as_13",mI="_SearchBtnBarcom_xl2as_33",gI="_btnLeyendTxtcom_xl2as_52",yI="_BtnSearchScountingcom_xl2as_61",vI="_containerPredefinedcom_xl2as_85",bI="_containerPredefinedScountingcom_xl2as_92",xI="_titleContainerPredefinedcom_xl2as_100",_I="_subtitleContainerPredefinedcom_xl2as_111",wI={comfiltersContainer:LR,comfiltersContainer1232:zR,closeFiltersPc:OR,comtextleyemdmultipleleagues:NR,comtextleyemdmultipleleagues380:RR,comfiltersContainer760:DR,comfiltersContainer460:IR,comcontainerSection:FR,comcontainerSection1232:VR,comcontainerSection960:BR,comcontainerSection320:UR,comcontainerSection350:jR,comtemplateLosMejores1:qR,comtemplateLosMejores11232:WR,comtemplateLosMejores1960:HR,comtemplateLosMejores1420:GR,comtemplateLosMejores1320:XR,comtemplateLosMejores1540:KR,comtemplateLosMejores1350:JR,comtopFiltersParent:$R,comtopFiltersParent1232:ZR,comtopFiltersParent960:YR,comtopFiltersParent460:QR,comtopFiltersParent420:eD,comcontainerTheBest:tD,comcontainerTheBest1232:rD,comcontainerTheBest960:nD,comcontainerTheBest320:aD,comtitleSection:iD,comtitleSection540:oD,comcontainerTables:sD,comcontainerTables960:lD,comcontainerTables760:cD,comcontainerTables320:uD,comtoniKroosWrapper:dD,comtoniKroosWrapper1080:hD,comtoniKroosWrapper975:pD,comtoniKroosWrapper760:fD,comtoniKroosWrapper420:mD,comtoniKroosWrapper320:gD,frameChild:yD,filtros:vD,groupParent:bD,shapeIcon:xD,btnFilters:_D,btnFiltersPC:wD,comquitarFiltros:kD,comquitarFiltros730:TD,comquitarFiltros480:SD,comquitarFiltros380:AD,btnCloseFilters:ED,commejoresJugadores:CD,commejoresJugadores730:MD,commejoresJugadores480:PD,mejoresJugadoresSM:LD,toniKroos:zD,teamBar:OD,commenuSection:ND,commenuSection960:RD,comcontainerMenu:DD,comcontainerMenu760:ID,containerFilters:FD,teamBarParent:VD,comtopFilters:BD,comtopFilters1232:UD,comtopFilters420:jD,comtopFilters460:qD,comlosMejores:WD,comlosMejores380:HD,comlosMejores530:GD,comlosMejores730:XD,commenuSectionHeader:KD,commenuSectionHeader1232:JD,commenuSectionHeader960:$D,commenuSectionHeader730:ZD,comdropdown:YD,comdropdown730:QD,comdropdown1:eI,comdropdown1730:tI,comdropdownParent:rI,comdropdownParent730:nI,commenuSectionParentHeader:aI,commenuSectionParentHeader1232:iI,commenuSectionParentHeader960:oI,commenuSectionParentHeader730:sI,commenuSectionParentHeader430:lI,comdescubreVideos:cI,comdescubreVideos1232:uI,comdescubreVideos960:dI,allCategories:hI,containerScountingBtncom:pI,btnDeleteAplicacom:fI,SearchBtnBarcom:mI,btnLeyendTxtcom:gI,BtnSearchScountingcom:yI,containerPredefinedcom:vI,containerPredefinedScountingcom:bI,titleContainerPredefinedcom:xI,subtitleContainerPredefinedcom:_I},kI=g.ref(PR()),TI={components:{GSCTopCategory:UM},computed:{...I8.computed,filterChangePredefined(){return this.filtersPredefinedF},filterChange(){const a={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},d=JSON.stringify(a);return JSON.stringify(this.filters)!=d,d},filterGolstats(){return this.FVfilterGolstats},filterButtonProps(){return{...kI.value}}},props:{timeLiveComparativeAvanced:{type:Number,default:6e4},currentSeasonId:{type:Number,default:0},typeData:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},carrousel:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},teamId:{type:Number,default:0},gameId:{type:Number,default:0},isWidget:{type:Boolean,default:!1},seasonSelected:{type:Object,default:()=>({})},categoryView:{type:Array,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:""},numRows:{type:Number,default:5},dummyData:{type:Array,default:null}},watch:{async seasonActive(){if(this.seasonActive!=0){this.teams=[];const a=await this.fetchTeams();for(let d=0;d<a.teams.length;d++)this.teams.push({id:a.teams[d].team_id,team:a.teams[d].colloquial_name,logo:a.teams[d].logo})}}},setup(){const a=g.ref("myDivRefTopsFull"),{elementSize:d}=pf(a);return{myDivRefTopsFull:a,elementSize:d}},data(){return{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"}],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},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}],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:[],filtersTypes:YM,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,fVtypeZone:2,fVsetPositionsIds:[1,2,3,4,5,6,7,8,9],currentIndex:-1,delay:800,tournamentSelected:0,tournamentSelectedObj:{},FVfilterGolstats:[],updateFilterField:0,openMenuMobil:!1,selectedTournament:{seasons:[]},selectedSeasonObj:{}}},methods:{getnameshort(a){var d=a.split(","),A=d[0].split(" "),U=d[1].trim().split(" "),ae="";A.length==2||A.length==1?A[0].length<4?ae=A[0]+" "+A[1]:ae=A[0]:A.length==3?ae=A[0]+" "+A[1]:A.length==4&&(ae=A[1]+" "+A[2]+" "+A[3]);var O=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return ae=ae.replace(",",""),O+". "+ae},setUpTournamentsToFilter(){this.tournamentsToFilter.forEach(a=>{const d=a.id===this.selectedTournament.id;a.isSelected=d,a.isDefaultTournament=d})},async onClickDeleteFilter(){this.optionSelectedSubmenu=="Predeterminados"?this.resetPredefinedTeamAll():(this.arrayFiltersPlays=[],setTimeout(()=>{},200))},clickOpenFilters(){this.showfiltersPc=!0},clickCloseFilters(){this.showfiltersPc=!1},async selectedSeason(a){this.seasonActive!==a.id&&(this.seasonActive=a.id,this.resetPredefinedTeamAll(),this.$emit("change-season-id",a.id))},changeTournament(a){a.id!==this.selectedTournament.id&&(this.selectedTournament=a,this.tournamentSelectedObj={propName:"id",value:a.id},this.teamselect=0,this.resetPredefinedTeamAll(),this.setUpTournamentsToFilter())},changeTournamentMovil(a){this.tournamentSelectedObj={propName:"id",value:a.id},this.seasonBytournament=a.seasons,this.teamselect=0},selectedSeasonMovil(a){this.seasonActive=a.id},setRelevantCategoriesPlayer(a){return a===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(a){this.$emit("openmedia",a)},setMediaData(a){let d=[a.id],A=a.team_id;const U={seasonId:a.season_id,isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:d,goalkeeperIds:[],categoryIds:this.setRelevantCategoriesPlayer(a.position),teamId:A||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",U)},clickprofile(a){a.isTeam?this.$emit("openProfileTeam",{teamId:a.id,seasonId:this.seasonActive}):this.$emit("openProfilePlayer",{playerId:a.id,teamId:a.teamId,seasonId:this.seasonActive})},viewprofile(a,d,A){this.$emit("openProfilePlayer",{playerId:a,teamId:A,seasonId:d||this.seasonActive})},openMenuFilters(){this.openMenuMobil=!this.openMenuMobil,this.showfiltersPc=!0},clickexpand(){},async getScoutingData(){this.arrayFiltersPlays=[],this.loadingActive=!0;const a=Lo.create({headers:{Authorization:`${this.token}`}}),{data:d}=await a.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 A=this.arrayFiltersPlays.findIndex(ae=>ae.type==="onFiltersTournaments");A!==-1?this.arrayFiltersPlays[A].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 ae=0;ae<d.length;ae++){d[ae];let O=d[ae].dob.split("T")[0].split("-");var U={position:ae+1,player_name:this.abrevName(d[ae].name),player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/"+d[ae].player_id+".png",total:d[ae].total.toFixed(0),id:d[ae].player_id,player_age:this.calcularEdad(d[ae].dob),team_abrev:d[ae].teams[0].acronym,team_name:d[ae].teams[0].team_name,team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+d[ae].teams[0].team_id+".png",player_position:d[ae].position_id,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+d[ae].nationality_id+".jpg",date:O[2]+"."+O[1]+"."+O[0].substring(2,4),team_id:d[ae].team_id,nationality_name:Rx[d[ae].nationality_id],player_games:d[ae].games_played,player_min:d[ae].minutes_played,league_name:d[ae].tournament_name,seasons:d[ae].seasons,season_id:d[ae].seasons[0]};this.rowScoutingData.push(U)}if(this.seasonsFilterSelected!=0){const ae=await this.fetchTeamsScouting(this.seasonsFilterSelected);this.teamselect=0,this.teamselectrec=0,this.teamsscouting=[];for(let O=0;O<ae.teams.length;O++)this.teamsscouting.push({id:ae.teams[O].team_id,team:ae.teams[O].colloquial_name,logo:ae.teams[O].logo})}this.loadingActive=!1},abrevName(a){var d=a.split(","),A=d[0].split(" "),U=d[1].trim().split(" "),ae="";A.length==2||A.length==1?A[0].length<4?ae=A[0]+" "+A[1]:ae=A[0]:A.length==3?ae=A[0]+" "+A[1]:A.length==4&&(ae=A[1]+" "+A[2]+" "+A[3]);var O=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";ae=ae.replace(",","");var E=O+". "+ae;return E},calcularEdad(a){var d=new Date(a),A=new Date,U=A-d,ae=Math.floor(U/(1e3*60*60*24*365.25));return ae},async onFiltersTournaments(a){this.modifidFiltersFlag=!0;var d=[];for(let A=0;A<a.length;A++)a[A].isSelected&&d.push(a[A].id);if(d.length==0&&(d=[1]),d.length==1)for(let A=0;A<a.length;A++)a[A].isSelected&&(this.nameLeagueSelected=a[A].name,this.seasonsFilterSelected=a[A].seasons[0].id);else this.seasonsFilterSelected=0,d.length>0&&(this.nameLeagueSelected=d.length+" Ligas");this.filterScounting.tournaments=d,this.filterScounting.seasonId=a[0].seasons[0].id},onFiltersPersonalData(a){if(this.modifidFiltersFlag=!0,a.hasOwnProperty("ageByRange")){const U=a.ageByRange.min==0?10:a.ageByRange.min,ae=a.ageByRange.max==0?40:a.ageByRange.max;this.filterScounting.range_age=[U,ae],this.filterScounting.age_or_year=1}else this.filterScounting.range_age=[];a.hasOwnProperty("year")?(this.filterScounting.year=a.year,this.filterScounting.age_or_year=0):this.filterScounting.year=0;var d=[];if(a.hasOwnProperty("nationalities")){for(let U=0;U<a.nationalities.length;U++)a.nationalities[U].isSelected&&d.push(a.nationalities[U].id);d.length==0&&(d=[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=[],a.hasOwnProperty("eligibility")&&(this.filterScounting.elegibles=[a.eligibility[0].id]);var A=[];for(let U=0;U<a.positions.length;U++)a.positions[U].isSelected&&A.push(a.positions[U].id);A.length==0&&(A=[1,2,3,4,5,6,7,8,9,10]),this.filterScounting.positions=A,this.filterScounting.nationalities=d},onFiltersUniverse(a){this.modifidFiltersFlag=!0,this.filterScounting.minutes_played=Number(a.minutesPlayed),this.filterScounting.last_months=Number(a.lastMonths),this.filterScounting.minutes_played_avg=Number(a.percentMinutesPlayed),this.filterScounting.type_stats=a.statistics.averagePerGame?3:a.statistics.averagePerMinute?2:1},onFiltersProductivity(a){this.modifidFiltersFlag=!0;var d=[];for(let A=0;A<a.productivityFilters.length;A++)d[a.productivityFilters[A].priority-1]={name:a.productivityFilters[A].name,ids:a.productivityFilters[A].id};d.length==0&&(d=[]),this.filterScounting.categories=d,this.filterScounting.fouls=a.offensesConditions.areFoulsCommittedSelected,this.filterScounting.yellow_cards=a.offensesConditions.areYellowCardsSelected,this.filterScounting.red_cards=a.offensesConditions.areRedCardsSelected},onFiltersGolStats(a){if(a.length>0){var d=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");d!==-1?this.arrayFiltersPlays[d].name=a[0].name:this.arrayFiltersPlays.push({name:a[0].name,type:"onFiltersPredefined"}),this.filtersPredefinedF=a[0].filters}else{var A=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&A!==-1){this.filtersPredefinedF=this.filters;for(let ae=0;ae<this.FVfilterGolstats.length;ae++)this.FVfilterGolstats[ae].isSelected=!1;var A=this.arrayFiltersPlays.findIndex(ae=>ae.type==="onFiltersPredefined");A!==-1&&this.arrayFiltersPlays.splice(A,1),this.updateFilterGolstats+=1}}},shouldRender(a){return a<=this.currentIndex},renderNext(){this.currentIndex++,this.currentIndex<this.categoriesDefault.length&&setTimeout(()=>{this.$nextTick(()=>{this.renderNext()})},this.delay)},async onFiltersPlaysTypes(a){if(a.length>0){this.categoryPredefinedActive=!0,this.loadingActive=!0,this.categoryPredefined=a[0].id;var d=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&d!==-1){this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(d,1);var A=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");if(A!==-1){for(let U=0;U<this.FVfilterGolstats.length;U++)this.FVfilterGolstats[U].isSelected=!1;A!==-1&&this.arrayFiltersPlays.splice(A,1),this.updateFilterGolstats+=1}}this.updateTables+=1,setTimeout(()=>{this.loadingActive=!1},1e3),await this.getPredefinedfilters(a[0]),this.FVfilterGolstats.length>0&&(this.onFiltersGolStats([this.FVfilterGolstats[0]]),this.FVfilterGolstats[0].isSelected=!0)}else{var d=this.arrayFiltersPlays.findIndex(ae=>ae.type==="onFiltersPredefinedCategory");if(this.categoriesDefault.length>0&&d!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters,this.arrayFiltersPlays.splice(d,1);for(let O=0;O<this.categoriesDefault.length;O++)this.categoriesDefault[O].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var A=this.arrayFiltersPlays.findIndex(O=>O.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&A!==-1){for(let O=0;O<this.FVfilterGolstats.length;O++)this.FVfilterGolstats[O].isSelected=!1;A!==-1&&this.arrayFiltersPlays.splice(A,1),this.updateFilterGolstats+=1}}}},deleteCategoryFilter(){this.categoryName="",this.showFullCategory=0,this.showFullTable=!1,delete this.filters.aux},onShowFullTable(a){this.categoryName=a.categoryName,this.showFullCategory=a.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(a,d){return Math.floor(Math.random()*(d-a+1))+a},applyFiltersBtn(a){},onFiltersPlays(a){if(this.arrayCategoryFilter=[],this.arrayCategoryFilterFull=[],a.playsCategories.length==0){for(let A=0;A<this.categoriesPlaysTypes.offensive.categories.length;A++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offensive.categories[A].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[A]);for(let A=0;A<this.categoriesPlaysTypes.defensive.categories.length;A++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.defensive.categories[A].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[A]);for(let A=0;A<this.categoriesPlaysTypes.possession.categories.length;A++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.possession.categories[A].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[A]);for(let A=0;A<this.categoriesPlaysTypes.offenses.categories.length;A++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offenses.categories[A].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[A])}else for(let A=0;A<a.playsCategories.length;A++)a.playsCategories[A].isSelected&&(this.arrayCategoryFilter.push(a.playsCategories[A].id),this.arrayCategoryFilterFull.push(a.playsCategories[A]));var d=this.arrayFiltersPlays.findIndex(A=>A.type==="onFiltersPlays");this.arrayCategoryFilter.length>0&&this.arrayCategoryFilter.length!=23?this.arrayCategoryFilter.length==1?d!=-1?this.arrayFiltersPlays[d].name=this.arrayCategoryFilterFull[0].name:this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull[0].name,type:"onFiltersPlays"}):d!=-1?this.arrayFiltersPlays[d].name=this.arrayCategoryFilterFull.length+" Tipos de jugadas":this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull.length+" Tipos de jugadas",type:"onFiltersPlays"}):d!==-1&&this.arrayFiltersPlays.splice(d,1)},async deleteLabelFilter(a){var d=this.arrayFiltersPlays.findIndex(U=>U.type===a);if(d!==-1){if(a=="onFiltersTournaments"&&(this.arrayFiltersPlays=[],setTimeout(()=>{},200)),a=="onFiltersPlays"){for(let U=0;U<this.categoriesPlaysTypes.offensive.categories.length;U++)this.categoriesPlaysTypes.offensive.categories[U].isSelected=!0;for(let U=0;U<this.categoriesPlaysTypes.defensive.categories.length;U++)this.categoriesPlaysTypes.defensive.categories[U].isSelected=!0,this.arrayCategoryFilter.push(),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[U]);for(let U=0;U<this.categoriesPlaysTypes.possession.categories.length;U++)this.categoriesPlaysTypes.possession.categories[U].isSelected=!0;for(let U=0;U<this.categoriesPlaysTypes.offenses.categories.length;U++)this.categoriesPlaysTypes.offenses.categories[U].isSelected=!0}if(a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),a=="onFiltersPredefined"){this.filtersPredefinedF=this.filters;for(let U=0;U<this.FVfilterGolstats.length;U++)this.FVfilterGolstats[U].isSelected=!1;this.updateFilterGolstats+=1,this.resetPredefinedTeamAll()}if(a=="onFiltersPredefinedCategory"){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters;var A=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");A!==-1&&this.arrayFiltersPlays.splice(A,1);for(let U=0;U<this.categoriesDefault.length;U++)this.categoriesDefault[U].isSelected=!1;this.updateFilterPlaytypesGolstats+=1}a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ff.NATIONALITY)),a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ff.POSITION)),a=="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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ff.AGE_RANGE)),a=="onFiltersElegibility"&&this.$refs.personalDataFilterPlayers.clearFilters(ff.ELIGIBILITY),a=="onFiltersYear"&&(this.$refs.personalDataFilterPlayers.clearFilters(ff.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:!1,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds})}this.arrayFiltersPlays.splice(d,1)},clickAll(){},clickAllAll(){},clickTeam(){},clickTeamScouting(){},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(a){this.resetPredefinedTeamAll(),this.showfiltersPc=!0,this.optionSelected=a,this.optionSelectedSubmenu="Todas las jugadas",this.filtersPredefinedF={},this.categoryPredefinedActive=!1,this.categoryPredefined=0,a=="Equipos"&&(this.typeTable=1,this.isTeam=!0,this.updateTables+=1,this.arrayFiltersPlays=[],this.teamselect=0,this.resetFilterTeamAndPlayers()),a=="Jugadores"&&(this.typeTable=0,this.isTeam=!1,this.teamselect=0,this.updateTables+=1,this.resetFilterTeamAndPlayers())},resetPredefinedTeamAll(){var a=this.arrayFiltersPlays.findIndex(A=>A.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&a!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(a,1);for(let A=0;A<this.categoriesDefault.length;A++)this.categoriesDefault[A].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var d=this.arrayFiltersPlays.findIndex(A=>A.type==="onFiltersPredefined");if(d!==-1){for(let A=0;A<this.FVfilterGolstats.length;A++)this.FVfilterGolstats[A].isSelected=!1;d!==-1&&this.arrayFiltersPlays.splice(d,1),this.updateFilterGolstats+=1}}},changeTabsSubmenu(a){a!="Predeterminados"?this.resetPredefinedTeamAll():this.arrayFiltersPlays=[],this.optionSelectedSubmenu=a},async fetchTournaments(){const a=Lo.create({headers:{Authorization:`${this.token}`}}),{data:d}=await a.get(this.tournamentsUrl);return d},async fetchTeams(){const a=Lo.create({headers:{Authorization:`${this.token}`}}),{data:d}=await a.get(this.teamsUrl+this.seasonActive);return d},async fetchTeamsScouting(a){const d=Lo.create({headers:{Authorization:`${this.token}`}}),{data:A}=await d.get(this.teamsUrl+a);return A},async getPredefinedfilters(a){this.arrayPredefinedFilters=[],this.arrayPredefinedOrigin=[];var d="";a.id==1?d=this.urlFilter:d=this.urlFilter;const A=Lo.create({headers:{Authorization:`${this.token}`}}),{data:U}=await A.get(d+a.id);if(Object.keys(U[0].match_lapse_combinations).forEach(b=>{this.predefinedFiltersMatchLapse[b.toString()]=U[0].match_lapse_combinations[b]}),Object.keys(U[0].playing_as_combinations).forEach(b=>{this.predefinedFiltersPlayingAs[b.toString()]=U[0].playing_as_combinations[b]}),Object.keys(U[0].field_sections_combinations).forEach(b=>{this.predefinedFiltersSections[b.toString()]=U[0].field_sections_combinations[b]}),U[0]){for(let b=0;b<U[0].filter_records.length;b++){var ae=U[0].description;if(U[0].filter_records[b].field_sections!==void 0){const v=U[0].filter_records[b].field_sections.toString();(this.predefinedFiltersSections[v]||this.predefinedFiltersSections[v]=="")&&(this.predefinedFiltersSections[v]==""?ae=ae.replace(" [en {field_sections}]",this.predefinedFiltersSections[v]):ae=ae.replace("{field_sections}",this.predefinedFiltersSections[v]))}if(U[0].filter_records[b].match_lapse!==void 0){const v=U[0].filter_records[b].match_lapse.toString();(this.predefinedFiltersMatchLapse[v]||this.predefinedFiltersMatchLapse[v]=="")&&(this.predefinedFiltersMatchLapse[v]==""?ae=ae.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[v]):ae=ae.replace("{match_lapse}",this.predefinedFiltersMatchLapse[v]))}if(U[0].filter_records[b].playing_as!==void 0){const v=U[0].filter_records[b].playing_as.toString();(this.predefinedFiltersPlayingAs[v]||this.predefinedFiltersPlayingAs[v]=="")&&(this.predefinedFiltersPlayingAs[v]==""?ae=ae.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[v]):ae=ae.replace("{playing_as}",this.predefinedFiltersPlayingAs[v]))}U[0].filter_records[b].section_type!==void 0&&(this.optionSelected=="Jugadores"?ae=ae.replace("{section_type}","Jugadores"):ae=ae.replace("{section_type}","Equipos")),ae=ae.replace(/\[/g,""),ae=ae.replace(/\]/g,""),ae=ae.replace("{category_name}",U[0].category_name);const f=ae.split(": ");var O=f[1];O.length>129&&this.windowWidth>1358&&(O=O.substring(0,129),O=O+"<span id='showIDtootip' class='dots' style='width: 100px; height: 20px; background: red; z-index: 6;'>...</span>"),(!this.isCup||U[0].filter_records[b].playing_as.length===2)&&this.arrayPredefinedFilters.push({id:b,category_name:a.name,id_category:U[0].id,title:f[0]+":",text:f[1],textOrigin:U[0].description,titledots:O,filtersPredefined:{matchResult:U[0].filter_records[b].match_result,playingAs:U[0].filter_records[b].playing_as,sections:U[0].filter_records[b].match_lapse,type:this.optionSelected=="Equipos"?2:1,typeZone:U[0].type_zone,zone:U[0].filter_records[b].field_sections,end_age:0,start_age:0,nationalities:[],elegible:[],positions:[]}})}var E=[];for(let b=0;b<this.arrayPredefinedFilters.length;b++){var t=0,x=new Set,u={},e=this.arrayPredefinedFilters[b].text.replace(/\*.*?\*/,"");if(e=e.replace(/\*/g,""),e=e.replace(/ +/g," "),this.arrayPredefinedFilters[b].filtersPredefined.elegible.length>0&&(t+=1),(this.arrayPredefinedFilters[b].filtersPredefined.end_age.length!=0||this.arrayPredefinedFilters[b].filtersPredefined.start_age.length!=0)&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.end_age!=0&&this.arrayPredefinedFilters[b].filtersPredefined.start_age!=0?u.arrayAgeRange=[this.arrayPredefinedFilters[b].filtersPredefined.start_age,this.arrayPredefinedFilters[b].filtersPredefined.end_age]:this.arrayPredefinedFilters[b].filtersPredefined.end_age==0&&this.arrayPredefinedFilters[b].filtersPredefined.start_age==0?u.arrayAgeRange=[1,60]:this.arrayPredefinedFilters[b].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[b].filtersPredefined.end_age==0?u.arrayAgeRange=[this.arrayPredefinedFilters[b].filtersPredefined.start_age,60]:u.arrayAgeRange=[1,this.arrayPredefinedFilters[b].filtersPredefined.end_age],this.arrayPredefinedFilters[b].filtersPredefined.matchResult.length!=3&&(t+=1),u.matchResult=this.arrayPredefinedFilters[b].filtersPredefined.matchResult,this.arrayPredefinedFilters[b].filtersPredefined.nationalities.length>0&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.nationalities.length!=0){for(let f=0;f<this.arrayPredefinedFilters[b].filtersPredefined.nationalities.length;f++)x.add(this.arrayPredefinedFilters[b].filtersPredefined.nationalities[f]);u.setNationalitiesIds=x}else x.add(138),x.add(222),x.add(163),x.add(51),x.add(226),x.add(10),x.add(223),x.add(96),x.add(171),x.add(198),x.add(105),x.add(80),x.add(29),x.add(74),x.add(216),x.add(196),x.add(64),x.add(155),x.add(156),x.add(89),x.add(106),x.add(81),x.add(233),x.add(204),u.setNationalitiesIds=x;this.arrayPredefinedFilters[b].filtersPredefined.playingAs.length!=2&&(t+=1),u.playingAs=this.arrayPredefinedFilters[b].filtersPredefined.playingAs,this.arrayPredefinedFilters[b].filtersPredefined.positions.length>0&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.positions.length>0?u.setPositionsIds=this.arrayPredefinedFilters[b].filtersPredefined.positions:u.setPositionsIds=[1,2,3,4,5,6,7,8,9],this.arrayPredefinedFilters[b].filtersPredefined.sections.length!=6&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.sections.length>0?u.sections=this.arrayPredefinedFilters[b].filtersPredefined.sections:u.sections=[1,2,3,4,5,6],this.arrayPredefinedFilters[b].filtersPredefined.zone.length!=16&&(t+=1),this.arrayPredefinedFilters[b].filtersPredefined.zone.length>0?u.zone=this.arrayPredefinedFilters[b].filtersPredefined.zone:u.zone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],u.typeZone=this.arrayPredefinedFilters[b].filtersPredefined.typeZone,E.push({id:b+1,name:e,isSelected:!1,value:t,filters:u})}this.FVfilterGolstats=E,this.updateFilterGolstats+=1,this.arrayPredefinedOrigin=JSON.parse(JSON.stringify(this.arrayPredefinedFilters))}},getTextFilterPredefinedCustom(){this.setDinamicFilters(this.filterEmitAux);var a=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].textOrigin;const d=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.zone.sort((e,b)=>e-b).toString();this.predefinedFiltersSections[d]||this.predefinedFiltersSections[d]==""?this.predefinedFiltersSections[d]==""?a=a.replace(" [en {field_sections}]",this.predefinedFiltersSections[d]):a=a.replace("{field_sections}",this.predefinedFiltersSections[d]):a=a.replace("{field_sections}",this.predefinedFiltersSections.other);var A=!1;this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==this.setNationalityIds.size?(a=a.replace("[{nationality}]",""),a=a.replace("[de las nacionalidades y posiciones seleccionadas]",""),a=a.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==1?(a=a.replace("[{nationality}]",this.$t(`gentilicios[${[...this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities][0]}]`)),a=a.replace("[de las nacionalidades y posiciones seleccionadas]",""),a=a.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size>0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size!=this.setPositionsIds.size?(A=!0,a=a.replace("[{nationality}]",""),a=a.replace("[de las nacionalidades seleccionadas]","")):(a=a.replace("[{nationality}]",""),a=a.replace("[de las nacionalidades y posiciones seleccionadas]","")):(a=a.replace("[{nationality}]",""),a=a.replace("[de las nacionalidades y posiciones seleccionadas]",""),a=a.replace("[de las nacionalidades seleccionadas]","")),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?(A||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size==this.setPositionsIds.size)&&(a=a.replace("[de las posiciones seleccionadas]","")):a=a.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?(a=a.replace("[de {min_age} a {max_age} años]",""),a=a.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(a=a.replace("[de {min_age} años]",""),a=a.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?(a=a.replace("[de {min_age} a {max_age} años]",""),a=a.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(a=a.replace("[de {min_age} años]",""),a=a.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]")):(a=a.replace("[de {min_age} a {max_age} años]",""),a=a.replace("[de {min_age} años]","")):(a=a.replace("[de {min_age} años]",""),a=a.replace("[de {min_age} a {max_age} años]",""));const U=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.sections.sort().toString();if(this.predefinedFiltersMatchLapse[U]||this.predefinedFiltersMatchLapse[U]=="")this.predefinedFiltersMatchLapse[U]==""?a=a.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[U]):a=a.replace("{match_lapse}",this.predefinedFiltersMatchLapse[U]);else{a=a.replace("{match_lapse}"," "+this.predefinedFiltersMatchLapse.other);var ae="";U.includes(1)&&(ae=ae+"0-15, "),U.includes(2)&&(ae=ae+"16-30, "),U.includes(3)&&(ae=ae+"31-45, "),U.includes(4)&&(ae=ae+"46-60, "),U.includes(5)&&(ae=ae+"61-75, "),U.includes(6)&&(ae=ae+"76-90, "),ae=ae.slice(0,-2),ae=ae.replace(/,([^,]*)$/," y $1"),a=a.replace("{match_lapse_selected}",ae)}const O=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.playingAs.sort().toString();(this.predefinedFiltersPlayingAs[O]||this.predefinedFiltersPlayingAs[O]=="")&&(this.predefinedFiltersPlayingAs[O]==""?a=a.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[O]):a=a.replace("{playing_as}",this.predefinedFiltersPlayingAs[O])),this.typeSelected==1?this.getUser.tournament==1001?this.category.id==22?a=a.replace("{section_type}","Porteras"):a=a.replace("{section_type}","Jugadoras"):this.category.id==22?a=a.replace("{section_type}","Porteros"):a=a.replace("{section_type}","Jugadores"):a=a.replace("{section_type}","Equipos"),a=a.replace(/\[/g,""),a=a.replace(/\]/g,""),a=a.replace("{category_name}",this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].category_name);const E=a.split(": ");let t=E[1].charAt(0).toUpperCase()+E[1].toLowerCase().slice(1),x=E[1].charAt(0).toUpperCase()+E[1].toLowerCase().slice(1);this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].text=t,this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].title=E[0]+":";const u=x.match(/\*/g);if(u&&u.length)if(u.length%2===0)for(let e=1;e<=u.length;e++)e%2===0||(x=x.replace("*",'<span style="color: #ffff03" >'));else x=x.replaceAll("*","");this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].titledots=x},intervalidtops(a){this.$emit("intervalidtops",a)}},mounted(){sessionStorage.getItem("sidpdfil")!==null&&sessionStorage.setItem("sidpdfil",0),this.renderNext(),this.teamId!==0&&this.clickTeam(this.teamId),this.defaultSection!=="Jugadores"&&this.changeTabsGeneral(this.defaultSection)},async created(){try{const a=Lo.create({headers:{"Content-Type":"application/json"}});a.interceptors.request.use(A=>(delete A.headers.Authorization,A));const d=await a.get("https://golstats-microservices.s3.us-west-2.amazonaws.com/eligibles/elegibles.json",{headers:{"Content-Type":"application/json"}});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(a){throw new Error(a)}}},SI={ref:"myDivRefTopsFull",style:{width:"100%","max-width":"100%","box-sizing":"border-box"}};function AI(a,d,A,U,ae,O){const E=g.resolveComponent("GSCTopCategory");return g.openBlock(),g.createElementBlock("div",SI,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(A.categoryView,(t,x)=>(g.openBlock(),g.createElementBlock("div",{key:x,class:g.normalizeClass(a.toniKroosWrapperClass)},[(g.openBlock(),g.createBlock(E,{"is-widget":A.isWidget,"team-widget":A.teamWidget,"time-live-comparative-avanced":A.timeLiveComparativeAvanced,"is-team":ae.isTeam,carrousel:A.carrousel,arrow:A.arrow,"border-width":0,"can-play-videos":A.canPlayVideos,"border-radius":"12px","game-id":A.gameId,game:A.game,typeData:0,category:t.id,"type-table":ae.typeTable,categoryName:t.name,"season-selected":A.seasonSelected,season:A.seasonActive,"filter-team":A.teamselect,"num-rows":A.numRows,key:ae.updateTables,"dummy-data":t.id===0?A.dummyData:null},null,8,["is-widget","team-widget","time-live-comparative-avanced","is-team","carrousel","arrow","can-play-videos","game-id","game","category","type-table","categoryName","season-selected","season","filter-team","num-rows","dummy-data"]))],2))),128))],512)}const EI={$style:wI},CI=Wd(TI,[["render",AI],["__cssModules",EI]]),MI=[{top:"01",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow@2x.png",id:9991,age:25,team:"DUM",teamid:1,position:"DEL",positionId:9,positionfull:"Delantero",country:138,effectiveness:100,minutes:90,games:1,date:"01-01-1999",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0},{top:"02",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",id:9992,age:27,team:"DUM",teamname:"Dummy FC",teamid:1,position:"MED",positionId:7,positionfull:"Medio",country:138,effectiveness:95,minutes:85,games:1,date:"02-02-1998",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0},{top:"03",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",id:9993,age:22,team:"DUM",teamname:"Dummy FC",teamid:1,position:"DEF",positionId:2,positionfull:"Defensa",country:138,effectiveness:90,minutes:80,games:1,date:"03-03-2000",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0},{top:"04",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",id:9994,age:24,team:"DUM",teamname:"Dummy FC",teamid:1,position:"POR",positionId:1,positionfull:"Portero",country:138,effectiveness:88,minutes:70,games:1,date:"04-04-1997",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0},{top:"05",name:"Nombre Jugador",name_short:"Nombre Jugador",img:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",id:9995,age:28,team:"DUM",teamname:"Dummy FC",teamid:1,position:"LAT",positionId:3,positionfull:"Lateral",country:138,effectiveness:85,minutes:60,games:1,date:"05-05-1995",nationality:"Mexicano",player_country_flag:"https://golstatsimages.blob.core.windows.net/images-library/player-shadow-02@2x.png",categoryName:"Pases acertados",total:0}],PI={class:"gsc-top-player"},LI={__name:"gsc-top-player",props:{categoryView:{type:Array,default:()=>[]},canPlayVideos:{type:Boolean,default:!0},carrousel:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},type:{type:Number,default:1},game:{type:Object,default:()=>({})},gamed:{type:Number,default:90209},season:{type:Number,default:1909},teamView:{type:Number,default:0},numRows:{type:Number,default:5}},setup(a){const d=a,A=d.categoryView.length===1&&d.categoryView[0].id===0?MI:null;return(U,ae)=>(g.openBlock(),g.createElementBlock("div",PI,[g.createVNode(CI,{"can-play-videos":a.canPlayVideos,carrousel:a.carrousel,arrow:a.arrow,"type-data":a.type,"game-id":a.gamed,game:a.game,"season-active":a.season,teamselect:a.teamView,"category-view":a.categoryView,"num-rows":a.numRows,"dummy-data":g.unref(A)},null,8,["can-play-videos","carrousel","arrow","type-data","game-id","game","season-active","teamselect","category-view","num-rows","dummy-data"])]))}},M_=Wd(LI,[["__scopeId","data-v-e448af41"]]);function P_(a,d){return function(){return a.apply(d,arguments)}}const{toString:zI}=Object.prototype,{getPrototypeOf:I1}=Object,{iterator:_0,toStringTag:L_}=Symbol,w0=(a=>d=>{const A=zI.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Bu=a=>(a=a.toLowerCase(),d=>w0(d)===a),k0=a=>d=>typeof d===a,{isArray:bp}=Array,vf=k0("undefined");function OI(a){return a!==null&&!vf(a)&&a.constructor!==null&&!vf(a.constructor)&&ru(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const z_=Bu("ArrayBuffer");function NI(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&z_(a.buffer),d}const RI=k0("string"),ru=k0("function"),O_=k0("number"),T0=a=>a!==null&&typeof a=="object",DI=a=>a===!0||a===!1,S0=a=>{if(w0(a)!=="object")return!1;const d=I1(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(L_ in a)&&!(_0 in a)},II=Bu("Date"),FI=Bu("File"),VI=Bu("Blob"),BI=Bu("FileList"),UI=a=>T0(a)&&ru(a.pipe),jI=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||ru(a.append)&&((d=w0(a))==="formdata"||d==="object"&&ru(a.toString)&&a.toString()==="[object FormData]"))},qI=Bu("URLSearchParams"),[WI,HI,GI,XI]=["ReadableStream","Request","Response","Headers"].map(Bu),KI=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bf(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),bp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function N_(a,d){d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const Ch=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,R_=a=>!vf(a)&&a!==Ch;function F1(){const{caseless:a}=R_(this)&&this||{},d={},A=(U,ae)=>{const O=a&&N_(d,ae)||ae;S0(d[O])&&S0(U)?d[O]=F1(d[O],U):S0(U)?d[O]=F1({},U):bp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&bf(arguments[U],A);return d}const JI=(a,d,A,{allOwnKeys:U}={})=>(bf(d,(ae,O)=>{A&&ru(ae)?a[O]=P_(ae,A):a[O]=ae},{allOwnKeys:U}),a),$I=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),ZI=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},YI=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&I1(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},QI=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},eF=a=>{if(!a)return null;if(bp(a))return a;let d=a.length;if(!O_(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},tF=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&I1(Uint8Array)),rF=(a,d)=>{const A=(a&&a[_0]).call(a);let U;for(;(U=A.next())&&!U.done;){const ae=U.value;d.call(a,ae[0],ae[1])}},nF=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},aF=Bu("HTMLFormElement"),iF=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,A,U){return A.toUpperCase()+U}),D_=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),oF=Bu("RegExp"),I_=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};bf(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},sF=a=>{I_(a,(d,A)=>{if(ru(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(ru(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},lF=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return bp(a)?U(a):U(String(a).split(d)),A},cF=()=>{},uF=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function dF(a){return!!(a&&ru(a.append)&&a[L_]==="FormData"&&a[_0])}const hF=a=>{const d=new Array(10),A=(U,ae)=>{if(T0(U)){if(d.indexOf(U)>=0)return;if(!("toJSON"in U)){d[ae]=U;const O=bp(U)?[]:{};return bf(U,(E,t)=>{const x=A(E,ae+1);!vf(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},pF=Bu("AsyncFunction"),fF=a=>a&&(T0(a)||ru(a))&&ru(a.then)&&ru(a.catch),F_=((a,d)=>a?setImmediate:d?((A,U)=>(Ch.addEventListener("message",({source:ae,data:O})=>{ae===Ch&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),Ch.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",ru(Ch.postMessage)),mF=typeof queueMicrotask<"u"?queueMicrotask.bind(Ch):typeof process<"u"&&process.nextTick||F_,gF=a=>a!=null&&ru(a[_0]),jn={isArray:bp,isArrayBuffer:z_,isBuffer:OI,isFormData:jI,isArrayBufferView:NI,isString:RI,isNumber:O_,isBoolean:DI,isObject:T0,isPlainObject:S0,isReadableStream:WI,isRequest:HI,isResponse:GI,isHeaders:XI,isUndefined:vf,isDate:II,isFile:FI,isBlob:VI,isRegExp:oF,isFunction:ru,isStream:UI,isURLSearchParams:qI,isTypedArray:tF,isFileList:BI,forEach:bf,merge:F1,extend:JI,trim:KI,stripBOM:$I,inherits:ZI,toFlatObject:YI,kindOf:w0,kindOfTest:Bu,endsWith:QI,toArray:eF,forEachEntry:rF,matchAll:nF,isHTMLForm:aF,hasOwnProperty:D_,hasOwnProp:D_,reduceDescriptors:I_,freezeMethods:sF,toObjectSet:lF,toCamelCase:iF,noop:cF,toFiniteNumber:uF,findKey:N_,global:Ch,isContextDefined:R_,isSpecCompliantForm:dF,toJSONObject:hF,isAsyncFn:pF,isThenable:fF,setImmediate:F_,asap:mF,isIterable:gF};function hi(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}jn.inherits(hi,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:jn.toJSONObject(this.config),code:this.code,status:this.status}}});const V_=hi.prototype,B_={};["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(a=>{B_[a]={value:a}}),Object.defineProperties(hi,B_),Object.defineProperty(V_,"isAxiosError",{value:!0}),hi.from=(a,d,A,U,ae,O)=>{const E=Object.create(V_);return jn.toFlatObject(a,E,function(t){return t!==Error.prototype},t=>t!=="isAxiosError"),hi.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const yF=null;function V1(a){return jn.isPlainObject(a)||jn.isArray(a)}function U_(a){return jn.endsWith(a,"[]")?a.slice(0,-2):a}function j_(a,d,A){return a?a.concat(d).map(function(U,ae){return U=U_(U),!A&&ae?"["+U+"]":U}).join(A?".":""):d}function vF(a){return jn.isArray(a)&&!a.some(V1)}const bF=jn.toFlatObject(jn,{},null,function(a){return/^is[A-Z]/.test(a)});function A0(a,d,A){if(!jn.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=jn.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,h){return!jn.isUndefined(h[v])});const U=A.metaTokens,ae=A.visitor||u,O=A.dots,E=A.indexes,t=(A.Blob||typeof Blob<"u"&&Blob)&&jn.isSpecCompliantForm(d);if(!jn.isFunction(ae))throw new TypeError("visitor must be a function");function x(v){if(v===null)return"";if(jn.isDate(v))return v.toISOString();if(jn.isBoolean(v))return v.toString();if(!t&&jn.isBlob(v))throw new hi("Blob is not supported. Use a Buffer instead.");return jn.isArrayBuffer(v)||jn.isTypedArray(v)?t&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,h,r){let n=v;if(v&&!r&&typeof v=="object"){if(jn.endsWith(h,"{}"))h=U?h:h.slice(0,-2),v=JSON.stringify(v);else if(jn.isArray(v)&&vF(v)||(jn.isFileList(v)||jn.endsWith(h,"[]"))&&(n=jn.toArray(v)))return h=U_(h),n.forEach(function(c,o){!(jn.isUndefined(c)||c===null)&&d.append(E===!0?j_([h],o,O):E===null?h:h+"[]",x(c))}),!1}return V1(v)?!0:(d.append(j_(r,h,O),x(v)),!1)}const e=[],b=Object.assign(bF,{defaultVisitor:u,convertValue:x,isVisitable:V1});function f(v,h){if(!jn.isUndefined(v)){if(e.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));e.push(v),jn.forEach(v,function(r,n){(!(jn.isUndefined(r)||r===null)&&ae.call(d,r,jn.isString(n)?n.trim():n,h,b))===!0&&f(r,h?h.concat(n):[n])}),e.pop()}}if(!jn.isObject(a))throw new TypeError("data must be an object");return f(a),d}function q_(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(A){return d[A]})}function B1(a,d){this._pairs=[],a&&A0(a,this,d)}const W_=B1.prototype;W_.append=function(a,d){this._pairs.push([a,d])},W_.toString=function(a){const d=a?function(A){return a.call(this,A,q_)}:q_;return this._pairs.map(function(A){return d(A[0])+"="+d(A[1])},"").join("&")};function xF(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function H_(a,d,A){if(!d)return a;const U=A&&A.encode||xF;jn.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=jn.isURLSearchParams(d)?d.toString():new B1(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}let G_=class{constructor(){this.handlers=[]}use(a,d,A){return this.handlers.push({fulfilled:a,rejected:d,synchronous:A?A.synchronous:!1,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){jn.forEach(this.handlers,function(d){d!==null&&a(d)})}};const X_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_F=typeof URLSearchParams<"u"?URLSearchParams:B1,wF=typeof FormData<"u"?FormData:null,kF=typeof Blob<"u"?Blob:null,TF={isBrowser:!0,classes:{URLSearchParams:_F,FormData:wF,Blob:kF},protocols:["http","https","file","blob","url","data"]},U1=typeof window<"u"&&typeof document<"u",j1=typeof navigator=="object"&&navigator||void 0,SF=U1&&(!j1||["ReactNative","NativeScript","NS"].indexOf(j1.product)<0),AF=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",EF=U1&&window.location.href||"http://localhost",CF=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:U1,hasStandardBrowserEnv:SF,hasStandardBrowserWebWorkerEnv:AF,navigator:j1,origin:EF},Symbol.toStringTag,{value:"Module"})),Tc={...CF,...TF};function MF(a,d){return A0(a,new Tc.classes.URLSearchParams,Object.assign({visitor:function(A,U,ae,O){return Tc.isNode&&jn.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)}},d))}function PF(a){return jn.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function LF(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function K_(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&jn.isArray(ae)?ae.length:E,x?(jn.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!jn.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&jn.isArray(ae[E])&&(ae[E]=LF(ae[E])),!t)}if(jn.isFormData(a)&&jn.isFunction(a.entries)){const A={};return jn.forEachEntry(a,(U,ae)=>{d(PF(U),ae,A,0)}),A}return null}function zF(a,d,A){if(jn.isString(a))try{return(d||JSON.parse)(a),jn.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const xf={transitional:X_,adapter:["xhr","http","fetch"],transformRequest:[function(a,d){const A=d.getContentType()||"",U=A.indexOf("application/json")>-1,ae=jn.isObject(a);if(ae&&jn.isHTMLForm(a)&&(a=new FormData(a)),jn.isFormData(a))return U?JSON.stringify(K_(a)):a;if(jn.isArrayBuffer(a)||jn.isBuffer(a)||jn.isStream(a)||jn.isFile(a)||jn.isBlob(a)||jn.isReadableStream(a))return a;if(jn.isArrayBufferView(a))return a.buffer;if(jn.isURLSearchParams(a))return d.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let O;if(ae){if(A.indexOf("application/x-www-form-urlencoded")>-1)return MF(a,this.formSerializer).toString();if((O=jn.isFileList(a))||A.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return A0(O?{"files[]":a}:a,E&&new E,this.formSerializer)}}return ae||U?(d.setContentType("application/json",!1),zF(a)):a}],transformResponse:[function(a){const d=this.transitional||xf.transitional,A=d&&d.forcedJSONParsing,U=this.responseType==="json";if(jn.isResponse(a)||jn.isReadableStream(a))return a;if(a&&jn.isString(a)&&(A&&!this.responseType||U)){const ae=!(d&&d.silentJSONParsing)&&U;try{return JSON.parse(a)}catch(O){if(ae)throw O.name==="SyntaxError"?hi.from(O,hi.ERR_BAD_RESPONSE,this,null,this.response):O}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tc.classes.FormData,Blob:Tc.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};jn.forEach(["delete","get","head","post","put","patch"],a=>{xf.headers[a]={}});const OF=jn.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"]),NF=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4046
4046
|
`).forEach(function(O){ae=O.indexOf(":"),A=O.substring(0,ae).trim().toLowerCase(),U=O.substring(ae+1).trim(),!(!A||d[A]&&OF[A])&&(A==="set-cookie"?d[A]?d[A].push(U):d[A]=[U]:d[A]=d[A]?d[A]+", "+U:U)}),d},J_=Symbol("internals");function _f(a){return a&&String(a).trim().toLowerCase()}function E0(a){return a===!1||a==null?a:jn.isArray(a)?a.map(E0):String(a)}function RF(a){const d=Object.create(null),A=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let U;for(;U=A.exec(a);)d[U[1]]=U[2];return d}const DF=a=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());function q1(a,d,A,U,ae){if(jn.isFunction(U))return U.call(this,d,A);if(ae&&(d=A),!!jn.isString(d)){if(jn.isString(U))return d.indexOf(U)!==-1;if(jn.isRegExp(U))return U.test(d)}}function IF(a){return a.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(d,A,U)=>A.toUpperCase()+U)}function FF(a,d){const A=jn.toCamelCase(" "+d);["get","set","has"].forEach(U=>{Object.defineProperty(a,U+A,{value:function(ae,O,E){return this[U].call(this,d,ae,O,E)},configurable:!0})})}let nu=class{constructor(a){a&&this.set(a)}set(a,d,A){const U=this;function ae(E,t,x){const u=_f(t);if(!u)throw new Error("header name must be a non-empty string");const e=jn.findKey(U,u);(!e||U[e]===void 0||x===!0||x===void 0&&U[e]!==!1)&&(U[e||t]=E0(E))}const O=(E,t)=>jn.forEach(E,(x,u)=>ae(x,u,t));if(jn.isPlainObject(a)||a instanceof this.constructor)O(a,d);else if(jn.isString(a)&&(a=a.trim())&&!DF(a))O(NF(a),d);else if(jn.isObject(a)&&jn.isIterable(a)){let E={},t,x;for(const u of a){if(!jn.isArray(u))throw TypeError("Object iterator must return a key-value pair");E[x=u[0]]=(t=E[x])?jn.isArray(t)?[...t,u[1]]:[t,u[1]]:u[1]}O(E,d)}else a!=null&&ae(d,a,A);return this}get(a,d){if(a=_f(a),a){const A=jn.findKey(this,a);if(A){const U=this[A];if(!d)return U;if(d===!0)return RF(U);if(jn.isFunction(d))return d.call(this,U,A);if(jn.isRegExp(d))return d.exec(U);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,d){if(a=_f(a),a){const A=jn.findKey(this,a);return!!(A&&this[A]!==void 0&&(!d||q1(this,this[A],A,d)))}return!1}delete(a,d){const A=this;let U=!1;function ae(O){if(O=_f(O),O){const E=jn.findKey(A,O);E&&(!d||q1(A,A[E],E,d))&&(delete A[E],U=!0)}}return jn.isArray(a)?a.forEach(ae):ae(a),U}clear(a){const d=Object.keys(this);let A=d.length,U=!1;for(;A--;){const ae=d[A];(!a||q1(this,this[ae],ae,a,!0))&&(delete this[ae],U=!0)}return U}normalize(a){const d=this,A={};return jn.forEach(this,(U,ae)=>{const O=jn.findKey(A,ae);if(O){d[O]=E0(U),delete d[ae];return}const E=a?IF(ae):String(ae).trim();E!==ae&&delete d[ae],d[E]=E0(U),A[E]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const d=Object.create(null);return jn.forEach(this,(A,U)=>{A!=null&&A!==!1&&(d[U]=a&&jn.isArray(A)?A.join(", "):A)}),d}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,d])=>a+": "+d).join(`
|
|
4047
4047
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...d){const A=new this(a);return d.forEach(U=>A.set(U)),A}static accessor(a){const d=(this[J_]=this[J_]={accessors:{}}).accessors,A=this.prototype;function U(ae){const O=_f(ae);d[O]||(FF(A,ae),d[O]=!0)}return jn.isArray(a)?a.forEach(U):U(a),this}};nu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),jn.reduceDescriptors(nu.prototype,({value:a},d)=>{let A=d[0].toUpperCase()+d.slice(1);return{get:()=>a,set(U){this[A]=U}}}),jn.freezeMethods(nu);function W1(a,d){const A=this||xf,U=d||A,ae=nu.from(U.headers);let O=U.data;return jn.forEach(a,function(E){O=E.call(A,O,ae.normalize(),d?d.status:void 0)}),ae.normalize(),O}function $_(a){return!!(a&&a.__CANCEL__)}function xp(a,d,A){hi.call(this,a??"canceled",hi.ERR_CANCELED,d,A),this.name="CanceledError"}jn.inherits(xp,hi,{__CANCEL__:!0});function Z_(a,d,A){const U=A.config.validateStatus;!A.status||!U||U(A.status)?a(A):d(new hi("Request failed with status code "+A.status,[hi.ERR_BAD_REQUEST,hi.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A))}function VF(a){const d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return d&&d[1]||""}function BF(a,d){a=a||10;const A=new Array(a),U=new Array(a);let ae=0,O=0,E;return d=d!==void 0?d:1e3,function(t){const x=Date.now(),u=U[O];E||(E=x),A[ae]=t,U[ae]=x;let e=O,b=0;for(;e!==ae;)b+=A[e++],e=e%a;if(ae=(ae+1)%a,ae===O&&(O=(O+1)%a),x-E<d)return;const f=u&&x-u;return f?Math.round(b*1e3/f):void 0}}function UF(a,d){let A=0,U=1e3/d,ae,O;const E=(t,x=Date.now())=>{A=x,ae=null,O&&(clearTimeout(O),O=null),a.apply(null,t)};return[(...t)=>{const x=Date.now(),u=x-A;u>=U?E(t,x):(ae=t,O||(O=setTimeout(()=>{O=null,E(ae)},U-u)))},()=>ae&&E(ae)]}const C0=(a,d,A=3)=>{let U=0;const ae=BF(50,250);return UF(O=>{const E=O.loaded,t=O.lengthComputable?O.total:void 0,x=E-U,u=ae(x),e=E<=t;U=E;const b={loaded:E,total:t,progress:t?E/t:void 0,bytes:x,rate:u||void 0,estimated:u&&t&&e?(t-E)/u:void 0,event:O,lengthComputable:t!=null,[d?"download":"upload"]:!0};a(b)},A)},Y_=(a,d)=>{const A=a!=null;return[U=>d[0]({lengthComputable:A,total:a,loaded:U}),d[1]]},Q_=a=>(...d)=>jn.asap(()=>a(...d)),jF=Tc.hasStandardBrowserEnv?((a,d)=>A=>(A=new URL(A,Tc.origin),a.protocol===A.protocol&&a.host===A.host&&(d||a.port===A.port)))(new URL(Tc.origin),Tc.navigator&&/(msie|trident)/i.test(Tc.navigator.userAgent)):()=>!0,qF=Tc.hasStandardBrowserEnv?{write(a,d,A,U,ae,O){const E=[a+"="+encodeURIComponent(d)];jn.isNumber(A)&&E.push("expires="+new Date(A).toGMTString()),jn.isString(U)&&E.push("path="+U),jn.isString(ae)&&E.push("domain="+ae),O===!0&&E.push("secure"),document.cookie=E.join("; ")},read(a){const d=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function WF(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function HF(a,d){return d?a.replace(/\/?\/$/,"")+"/"+d.replace(/^\/+/,""):a}function ew(a,d,A){let U=!WF(d);return a&&(U||A==!1)?HF(a,d):d}const tw=a=>a instanceof nu?{...a}:a;function Mh(a,d){d=d||{};const A={};function U(u,e,b,f){return jn.isPlainObject(u)&&jn.isPlainObject(e)?jn.merge.call({caseless:f},u,e):jn.isPlainObject(e)?jn.merge({},e):jn.isArray(e)?e.slice():e}function ae(u,e,b,f){if(jn.isUndefined(e)){if(!jn.isUndefined(u))return U(void 0,u,b,f)}else return U(u,e,b,f)}function O(u,e){if(!jn.isUndefined(e))return U(void 0,e)}function E(u,e){if(jn.isUndefined(e)){if(!jn.isUndefined(u))return U(void 0,u)}else return U(void 0,e)}function t(u,e,b){if(b in d)return U(u,e);if(b in a)return U(void 0,u)}const x={url:O,method:O,data:O,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:t,headers:(u,e,b)=>ae(tw(u),tw(e),b,!0)};return jn.forEach(Object.keys(Object.assign({},a,d)),function(u){const e=x[u]||ae,b=e(a[u],d[u],u);jn.isUndefined(b)&&e!==t||(A[u]=b)}),A}const rw=a=>{const d=Mh({},a);let{data:A,withXSRFToken:U,xsrfHeaderName:ae,xsrfCookieName:O,headers:E,auth:t}=d;d.headers=E=nu.from(E),d.url=H_(ew(d.baseURL,d.url,d.allowAbsoluteUrls),a.params,a.paramsSerializer),t&&E.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):"")));let x;if(jn.isFormData(A)){if(Tc.hasStandardBrowserEnv||Tc.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if((x=E.getContentType())!==!1){const[u,...e]=x?x.split(";").map(b=>b.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...e].join("; "))}}if(Tc.hasStandardBrowserEnv&&(U&&jn.isFunction(U)&&(U=U(d)),U||U!==!1&&jF(d.url))){const u=ae&&O&&qF.read(O);u&&E.set(ae,u)}return d},GF=typeof XMLHttpRequest<"u",XF=GF&&function(a){return new Promise(function(d,A){const U=rw(a);let ae=U.data;const O=nu.from(U.headers).normalize();let{responseType:E,onUploadProgress:t,onDownloadProgress:x}=U,u,e,b,f,v;function h(){f&&f(),v&&v(),U.cancelToken&&U.cancelToken.unsubscribe(u),U.signal&&U.signal.removeEventListener("abort",u)}let r=new XMLHttpRequest;r.open(U.method.toUpperCase(),U.url,!0),r.timeout=U.timeout;function n(){if(!r)return;const o=nu.from("getAllResponseHeaders"in r&&r.getAllResponseHeaders()),l={data:!E||E==="text"||E==="json"?r.responseText:r.response,status:r.status,statusText:r.statusText,headers:o,config:a,request:r};Z_(function(p){d(p),h()},function(p){A(p),h()},l),r=null}"onloadend"in r?r.onloadend=n:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(n)},r.onabort=function(){r&&(A(new hi("Request aborted",hi.ECONNABORTED,a,r)),r=null)},r.onerror=function(){A(new hi("Network Error",hi.ERR_NETWORK,a,r)),r=null},r.ontimeout=function(){let o=U.timeout?"timeout of "+U.timeout+"ms exceeded":"timeout exceeded";const l=U.transitional||X_;U.timeoutErrorMessage&&(o=U.timeoutErrorMessage),A(new hi(o,l.clarifyTimeoutError?hi.ETIMEDOUT:hi.ECONNABORTED,a,r)),r=null},ae===void 0&&O.setContentType(null),"setRequestHeader"in r&&jn.forEach(O.toJSON(),function(o,l){r.setRequestHeader(l,o)}),jn.isUndefined(U.withCredentials)||(r.withCredentials=!!U.withCredentials),E&&E!=="json"&&(r.responseType=U.responseType),x&&([b,v]=C0(x,!0),r.addEventListener("progress",b)),t&&r.upload&&([e,f]=C0(t),r.upload.addEventListener("progress",e),r.upload.addEventListener("loadend",f)),(U.cancelToken||U.signal)&&(u=o=>{r&&(A(!o||o.type?new xp(null,a,r):o),r.abort(),r=null)},U.cancelToken&&U.cancelToken.subscribe(u),U.signal&&(U.signal.aborted?u():U.signal.addEventListener("abort",u)));const c=VF(U.url);if(c&&Tc.protocols.indexOf(c)===-1){A(new hi("Unsupported protocol "+c+":",hi.ERR_BAD_REQUEST,a));return}r.send(ae||null)})},KF=(a,d)=>{const{length:A}=a=a?a.filter(Boolean):[];if(d||A){let U=new AbortController,ae;const O=function(u){if(!ae){ae=!0,t();const e=u instanceof Error?u:this.reason;U.abort(e instanceof hi?e:new xp(e instanceof Error?e.message:e))}};let E=d&&setTimeout(()=>{E=null,O(new hi(`timeout ${d} of ms exceeded`,hi.ETIMEDOUT))},d);const t=()=>{a&&(E&&clearTimeout(E),E=null,a.forEach(u=>{u.unsubscribe?u.unsubscribe(O):u.removeEventListener("abort",O)}),a=null)};a.forEach(u=>u.addEventListener("abort",O));const{signal:x}=U;return x.unsubscribe=()=>jn.asap(t),x}},JF=function*(a,d){let A=a.byteLength;if(A<d){yield a;return}let U=0,ae;for(;U<A;)ae=U+d,yield a.slice(U,ae),U=ae},$F=async function*(a,d){for await(const A of ZF(a))yield*JF(A,d)},ZF=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const d=a.getReader();try{for(;;){const{done:A,value:U}=await d.read();if(A)break;yield U}}finally{await d.cancel()}},nw=(a,d,A,U)=>{const ae=$F(a,d);let O=0,E,t=x=>{E||(E=!0,U&&U(x))};return new ReadableStream({async pull(x){try{const{done:u,value:e}=await ae.next();if(u){t(),x.close();return}let b=e.byteLength;if(A){let f=O+=b;A(f)}x.enqueue(new Uint8Array(e))}catch(u){throw t(u),u}},cancel(x){return t(x),ae.return()}},{highWaterMark:2})},M0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",aw=M0&&typeof ReadableStream=="function",YF=M0&&(typeof TextEncoder=="function"?(a=>d=>a.encode(d))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),iw=(a,...d)=>{try{return!!a(...d)}catch{return!1}},QF=aw&&iw(()=>{let a=!1;const d=new Request(Tc.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!d}),ow=64*1024,H1=aw&&iw(()=>jn.isReadableStream(new Response("").body)),P0={stream:H1&&(a=>a.body)};M0&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!P0[d]&&(P0[d]=jn.isFunction(a[d])?A=>A[d]():(A,U)=>{throw new hi(`Response type '${d}' is not supported`,hi.ERR_NOT_SUPPORT,U)})})})(new Response);const eV=async a=>{if(a==null)return 0;if(jn.isBlob(a))return a.size;if(jn.isSpecCompliantForm(a))return(await new Request(Tc.origin,{method:"POST",body:a}).arrayBuffer()).byteLength;if(jn.isArrayBufferView(a)||jn.isArrayBuffer(a))return a.byteLength;if(jn.isURLSearchParams(a)&&(a=a+""),jn.isString(a))return(await YF(a)).byteLength},tV=async(a,d)=>jn.toFiniteNumber(a.getContentLength())??eV(d),rV=M0&&(async a=>{let{url:d,method:A,data:U,signal:ae,cancelToken:O,timeout:E,onDownloadProgress:t,onUploadProgress:x,responseType:u,headers:e,withCredentials:b="same-origin",fetchOptions:f}=rw(a);u=u?(u+"").toLowerCase():"text";let v=KF([ae,O&&O.toAbortSignal()],E),h;const r=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let n;try{if(x&&QF&&A!=="get"&&A!=="head"&&(n=await tV(e,U))!==0){let m=new Request(d,{method:"POST",body:U,duplex:"half"}),w;if(jn.isFormData(U)&&(w=m.headers.get("content-type"))&&e.setContentType(w),m.body){const[T,k]=Y_(n,C0(Q_(x)));U=nw(m.body,ow,T,k)}}jn.isString(b)||(b=b?"include":"omit");const c="credentials"in Request.prototype;h=new Request(d,{...f,signal:v,method:A.toUpperCase(),headers:e.normalize().toJSON(),body:U,duplex:"half",credentials:c?b:void 0});let o=await fetch(h,f);const l=H1&&(u==="stream"||u==="response");if(H1&&(t||l&&r)){const m={};["status","statusText","headers"].forEach(M=>{m[M]=o[M]});const w=jn.toFiniteNumber(o.headers.get("content-length")),[T,k]=t&&Y_(w,C0(Q_(t),!0))||[];o=new Response(nw(o.body,ow,T,()=>{k&&k(),r&&r()}),m)}u=u||"text";let p=await P0[jn.findKey(P0,u)||"text"](o,a);return!l&&r&&r(),await new Promise((m,w)=>{Z_(m,w,{data:p,headers:nu.from(o.headers),status:o.status,statusText:o.statusText,config:a,request:h})})}catch(c){throw r&&r(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new hi("Network Error",hi.ERR_NETWORK,a,h),{cause:c.cause||c}):hi.from(c,c&&c.code,a,h)}}),G1={http:yF,xhr:XF,fetch:rV};jn.forEach(G1,(a,d)=>{if(a){try{Object.defineProperty(a,"name",{value:d})}catch{}Object.defineProperty(a,"adapterName",{value:d})}});const sw=a=>`- ${a}`,nV=a=>jn.isFunction(a)||a===null||a===!1,lw={getAdapter:a=>{a=jn.isArray(a)?a:[a];const{length:d}=a;let A,U;const ae={};for(let O=0;O<d;O++){A=a[O];let E;if(U=A,!nV(A)&&(U=G1[(E=String(A)).toLowerCase()],U===void 0))throw new hi(`Unknown adapter '${E}'`);if(U)break;ae[E||"#"+O]=U}if(!U){const O=Object.entries(ae).map(([t,x])=>`adapter ${t} `+(x===!1?"is not supported by the environment":"is not available in the build"));let E=d?O.length>1?`since :
|
|
4048
4048
|
`+O.map(sw).join(`
|
|
@@ -4073,7 +4073,7 @@ uniform ${De} ${Ue} u_${rt};
|
|
|
4073
4073
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
4074
4074
|
*/const Fc=new Vre;class ja{static init(d={},A=".grid-stack"){if(typeof document>"u")return null;const U=ja.getGridElement(A);return U?(U.gridstack||(U.gridstack=new ja(U,In.cloneDeep(d))),U.gridstack):(console.error(typeof A=="string"?'GridStack.initAll() no grid was found with selector "'+A+`" - element missing or wrong selector ?
|
|
4075
4075
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(d={},A=".grid-stack"){const U=[];return typeof document>"u"||(ja.getGridElements(A).forEach(ae=>{ae.gridstack||(ae.gridstack=new ja(ae,In.cloneDeep(d))),U.push(ae.gridstack)}),U.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+A+`" - element missing or wrong selector ?
|
|
4076
|
-
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),U}static addGrid(d,A={}){if(!d)return null;let U=d;if(U.gridstack){const ae=U.gridstack;return A&&(ae.opts={...ae.opts,...A}),A.children!==void 0&&ae.load(A.children),ae}return(!d.classList.contains("grid-stack")||ja.addRemoveCB)&&(ja.addRemoveCB?U=ja.addRemoveCB(d,A,!0,!0):U=In.createDiv(["grid-stack",A.class],d)),ja.init(A,U)}static registerEngine(d){ja.engineClass=d}get placeholder(){if(!this._placeholder){this._placeholder=In.createDiv([this.opts.placeholderClass,wu.itemClass,this.opts.itemClass]);const d=In.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(d.textContent=this.opts.placeholderText)}return this._placeholder}constructor(d,A={}){var U;this.el=d,this.opts=A,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},d.gridstack=this,this.opts=A=A||{},d.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),A.row&&(A.minRow=A.maxRow=A.row,delete A.row);const ae=In.toNumber(d.getAttribute("gs-row"));A.column==="auto"&&delete A.column,A.alwaysShowResizeHandle!==void 0&&(A._alwaysShowResizeHandle=A.alwaysShowResizeHandle);const O=A.columnOpts;if(O){const e=O.breakpoints;!O.columnWidth&&!(e!=null&&e.length)?delete A.columnOpts:(O.columnMax=O.columnMax||12,(e==null?void 0:e.length)>1&&e.sort((b,f)=>(f.w||0)-(b.w||0)))}const E={...In.cloneDeep(wu),column:In.toNumber(d.getAttribute("gs-column"))||wu.column,minRow:ae||In.toNumber(d.getAttribute("gs-min-row"))||wu.minRow,maxRow:ae||In.toNumber(d.getAttribute("gs-max-row"))||wu.maxRow,staticGrid:In.toBool(d.getAttribute("gs-static"))||wu.staticGrid,sizeToContent:In.toBool(d.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(A.handleClass?"."+A.handleClass:A.handle?A.handle:"")||wu.draggable.handle},removableOptions:{accept:A.itemClass||wu.removableOptions.accept,decline:wu.removableOptions.decline}};d.getAttribute("gs-animate")&&(E.animate=In.toBool(d.getAttribute("gs-animate"))),A=In.defaults(A,E),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(A),A.rtl==="auto"&&(A.rtl=d.style.direction==="rtl"),A.rtl&&this.el.classList.add("grid-stack-rtl");const t=this.el.closest("."+wu.itemClass),x=t==null?void 0:t.gridstackNode;if(x&&(x.subGrid=this,this.parentGridNode=x,this.el.classList.add("grid-stack-nested"),x.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=A.cellHeight==="auto",this._isAutoCellHeight||A.cellHeight==="initial")this.cellHeight(void 0);else{typeof A.cellHeight=="number"&&A.cellHeightUnit&&A.cellHeightUnit!==wu.cellHeightUnit&&(A.cellHeight=A.cellHeight+A.cellHeightUnit,delete A.cellHeightUnit);const e=A.cellHeight;delete A.cellHeight,this.cellHeight(e)}A.alwaysShowResizeHandle==="mobile"&&(A.alwaysShowResizeHandle=Gu),this._setStaticClass();const u=A.engineClass||ja.engineClass||Pd;if(this.engine=new u({column:this.getColumn(),float:A.float,maxRow:A.maxRow,onChange:e=>{e.forEach(b=>{const f=b.el;f&&(b._removeDOM?(f&&f.remove(),delete b._removeDOM):this._writePosAttr(f,b))}),this._updateContainerHeight()}}),A.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(e=>this._prepareElement(e)),delete this.engine._loading,this.batchUpdate(!1)),A.children){const e=A.children;delete A.children,e.length&&this.load(e)}this.setAnimation(),A.subGridDynamic&&!Ka.pauseDrag&&(Ka.pauseDrag=!0),((U=A.draggable)==null?void 0:U.pause)!==void 0&&(Ka.pauseDrag=A.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(d=this.opts){this.el.classList.add("gs-"+d.column),typeof d.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/d.column}%`)}addWidget(d){if(typeof d=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(d.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(d);let A,U=d;if(U.grid=this,U!=null&&U.el?A=U.el:ja.addRemoveCB?A=ja.addRemoveCB(this.el,d,!0,!1):A=this.createWidgetDivs(U),!A)return;if(U=A.gridstackNode,U&&A.parentElement===this.el&&this.engine.nodes.find(O=>O._id===U._id))return A;const ae=this._readAttr(A);return In.defaults(d,ae),this.engine.prepareNode(d),this.el.appendChild(A),this.makeWidget(A,d),A}createWidgetDivs(d){const A=In.createDiv(["grid-stack-item",this.opts.itemClass]),U=In.createDiv(["grid-stack-item-content"],A);return In.lazyLoad(d)?d.visibleObservable||(d.visibleObservable=new IntersectionObserver(([ae])=>{var O,E;ae.isIntersecting&&((O=d.visibleObservable)==null||O.disconnect(),delete d.visibleObservable,ja.renderCB(U,d),(E=d.grid)==null||E.prepareDragDrop(d.el))}),window.setTimeout(()=>{var ae;return(ae=d.visibleObservable)==null?void 0:ae.observe(A)})):ja.renderCB(U,d),A}makeSubGrid(d,A,U,ae=!0){var O,E,t;let x=d.gridstackNode;if(x||(x=this.makeWidget(d).gridstackNode),(O=x.subGrid)!=null&&O.el)return x.subGrid;let u,e=this;for(;e&&!u;)u=(E=e.opts)==null?void 0:E.subGridOpts,e=(t=e.parentGridNode)==null?void 0:t.grid;A=In.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...u||{},...A||x.subGridOpts||{}}),x.subGridOpts=A;let b;A.column==="auto"&&(b=!0,A.column=Math.max(x.w||1,(U==null?void 0:U.w)||1),delete A.columnOpts);let f=x.el.querySelector(".grid-stack-item-content"),v,h;if(ae&&(this._removeDD(x.el),h={...x,x:0,y:0},In.removeInternalForSave(h),delete h.subGridOpts,x.content&&(h.content=x.content,delete x.content),ja.addRemoveCB?v=ja.addRemoveCB(this.el,h,!0,!1):(v=In.createDiv(["grid-stack-item"]),v.appendChild(f),f=In.createDiv(["grid-stack-item-content"],x.el)),this.prepareDragDrop(x.el)),U){const n=b?A.column:x.w,c=x.h+U.h,o=x.el.style;o.transition="none",this.update(x.el,{w:n,h:c}),setTimeout(()=>o.transition=null)}const r=x.subGrid=ja.addGrid(f,A);return U!=null&&U._moving&&(r._isTemp=!0),b&&(r._autoColumn=!0),ae&&r.makeWidget(v,h),U&&(U._moving?window.setTimeout(()=>In.simulateMouseEvent(U._event,"mouseenter",r.el),0):r.makeWidget(x.el,x)),this.resizeToContentCheck(!1,x),r}removeAsSubGrid(d){var A;const U=(A=this.parentGridNode)==null?void 0:A.grid;U&&(U.batchUpdate(),U.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(ae=>{ae.x+=this.parentGridNode.x,ae.y+=this.parentGridNode.y,U.makeWidget(ae.el,ae)}),U.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,d&&window.setTimeout(()=>In.simulateMouseEvent(d._event,"mouseenter",U.el),0))}save(d=!0,A=!1,U=ja.saveCB){const ae=this.engine.save(d,U);if(ae.forEach(O=>{var E;if(d&&O.el&&!O.subGrid&&!U){const t=O.el.querySelector(".grid-stack-item-content");O.content=t==null?void 0:t.innerHTML,O.content||delete O.content}else if(!d&&!U&&delete O.content,(E=O.subGrid)!=null&&E.el){const t=O.subGrid.save(d,A,U);O.subGridOpts=A?t:{children:t},delete O.subGrid}delete O.el}),A){const O=In.cloneDeep(this.opts);O.marginBottom===O.marginTop&&O.marginRight===O.marginLeft&&O.marginTop===O.marginRight&&(O.margin=O.marginTop,delete O.marginTop,delete O.marginRight,delete O.marginBottom,delete O.marginLeft),O.rtl===(this.el.style.direction==="rtl")&&(O.rtl="auto"),this._isAutoCellHeight&&(O.cellHeight="auto"),this._autoColumn&&(O.column="auto");const E=O._alwaysShowResizeHandle;return delete O._alwaysShowResizeHandle,E!==void 0?O.alwaysShowResizeHandle=E:delete O.alwaysShowResizeHandle,In.removeInternalAndSame(O,wu),O.children=ae,O}return ae}load(d,A=ja.addRemoveCB||!0){d=In.cloneDeep(d);const U=this.getColumn();d.forEach(e=>{e.w=e.w||1,e.h=e.h||1}),d=In.sort(d),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let ae=0;d.forEach(e=>{ae=Math.max(ae,(e.x||0)+e.w)}),ae>this.engine.defaultColumn&&(this.engine.defaultColumn=ae),ae>U&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=d,this.engine.columnChanged(ae,U,this.responseLayout),d=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(d,ae,!0));const O=ja.addRemoveCB;typeof A=="function"&&(ja.addRemoveCB=A);const E=[];this.batchUpdate();const t=!this.engine.nodes.length,x=t&&this.opts.animate;x&&this.setAnimation(!1),!t&&A&&[...this.engine.nodes].forEach(e=>{e.id&&(In.find(d,e.id)||(ja.addRemoveCB&&ja.addRemoveCB(this.el,e,!1,!1),E.push(e),this.removeWidget(e.el,!0,!1)))}),this.engine._loading=!0;const u=[];return this.engine.nodes=this.engine.nodes.filter(e=>In.find(d,e.id)?(u.push(e),!1):!0),d.forEach(e=>{var b;const f=In.find(u,e.id);if(f){if(In.shouldSizeToContent(f)&&(e.h=f.h),this.engine.nodeBoundFix(e),(e.autoPosition||e.x===void 0||e.y===void 0)&&(e.w=e.w||f.w,e.h=e.h||f.h,this.engine.findEmptyPosition(e)),this.engine.nodes.push(f),In.samePos(f,e)&&this.engine.nodes.length>1&&(this.moveNode(f,{...e,forceCollide:!0}),In.copyPos(e,f)),this.update(f.el,e),(b=e.subGridOpts)!=null&&b.children){const v=f.el.querySelector(".grid-stack");v&&v.gridstack&&v.gridstack.load(e.subGridOpts.children)}}else A&&this.addWidget(e)}),delete this.engine._loading,this.engine.removedNodes=E,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,O?ja.addRemoveCB=O:delete ja.addRemoveCB,x&&this.setAnimation(!0,!0),this}batchUpdate(d=!0){return this.engine.batchUpdate(d),d||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(d=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!d||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const A=this.el.querySelector("."+this.opts.itemClass);if(A){const ae=In.toNumber(A.getAttribute("gs-h"))||1;return Math.round(A.offsetHeight/ae)}const U=parseInt(this.el.getAttribute("gs-current-row"));return U?Math.round(this.el.getBoundingClientRect().height/U):this.opts.cellHeight}cellHeight(d){if(d!==void 0&&this._isAutoCellHeight!==(d==="auto")&&(this._isAutoCellHeight=d==="auto",this._updateResizeEvent()),(d==="initial"||d==="auto")&&(d=void 0),d===void 0){const U=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;d=this.cellWidth()+U}const A=In.parseHeight(d);return this.opts.cellHeightUnit===A.unit&&this.opts.cellHeight===A.h?this:(this.opts.cellHeightUnit=A.unit,this.opts.cellHeight=A.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(d=!1){var A;return d&&(A=this.opts.columnOpts)!=null&&A.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var d,A;const U=this.opts.columnOpts;if(!U||!U.columnWidth&&!((d=U.breakpoints)!=null&&d.length))return!1;const ae=this.getColumn();let O=ae;const E=this._widthOrContainer(!0);if(U.columnWidth)O=Math.min(Math.round(E/U.columnWidth)||1,U.columnMax);else{O=U.columnMax;let t=0;for(;t<U.breakpoints.length&&E<=U.breakpoints[t].w;)O=U.breakpoints[t++].c||ae}if(O!==ae){const t=(A=U.breakpoints)==null?void 0:A.find(x=>x.c===O);return this.column(O,(t==null?void 0:t.layout)||U.layout),!0}return!1}compact(d="compact",A=!0){return this.engine.compact(d,A),this._triggerChangeEvent(),this}column(d,A="moveScale"){if(!d||d<1||this.opts.column===d)return this;const U=this.getColumn();return this.opts.column=d,this.engine?(this.engine.column=d,this.el.classList.remove("gs-"+U),this._updateColumnVar(),this.engine.columnChanged(U,d,A),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=A,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(d=>d.matches("."+this.opts.itemClass)&&!d.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(d=!0){var A;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),d?this.el.parentNode.removeChild(this.el):(this.removeAll(d),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,(A=this._placeholder)==null||delete A.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(d){return this.opts.float!==d&&(this.opts.float=this.engine.float=d,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(d,A=!1){const U=this.el.getBoundingClientRect();let ae;A?ae={top:U.top+document.documentElement.scrollTop,left:U.left}:ae={top:this.el.offsetTop,left:this.el.offsetLeft};const O=d.left-ae.left,E=d.top-ae.top,t=U.width/this.getColumn(),x=U.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(O/t),y:Math.floor(E/x)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(d,A,U,ae){return this.engine.isAreaEmpty(d,A,U,ae)}makeWidget(d,A){const U=ja.getElement(d);if(!U||U.gridstackNode)return U;U.parentElement||this.el.appendChild(U),this._prepareElement(U,!0,A);const ae=U.gridstackNode;this._updateContainerHeight(),ae.subGridOpts&&this.makeSubGrid(U,ae.subGridOpts,void 0,!1);let O;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(O=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),O&&delete this._ignoreLayoutsNodeChange,U}on(d,A){return d.indexOf(" ")!==-1?(d.split(" ").forEach(U=>this.on(U,A)),this):(d==="change"||d==="added"||d==="removed"||d==="enable"||d==="disable"?(d==="enable"||d==="disable"?this._gsEventHandler[d]=U=>A(U):this._gsEventHandler[d]=U=>{U.detail&&A(U,U.detail)},this.el.addEventListener(d,this._gsEventHandler[d])):d==="drag"||d==="dragstart"||d==="dragstop"||d==="resizestart"||d==="resize"||d==="resizestop"||d==="dropped"||d==="resizecontent"?this._gsEventHandler[d]=A:console.error("GridStack.on("+d+") event not supported"),this)}off(d){return d.indexOf(" ")!==-1?(d.split(" ").forEach(A=>this.off(A)),this):((d==="change"||d==="added"||d==="removed"||d==="enable"||d==="disable")&&this._gsEventHandler[d]&&this.el.removeEventListener(d,this._gsEventHandler[d]),delete this._gsEventHandler[d],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(d=>this.off(d)),this}removeWidget(d,A=!0,U=!0){return d?(ja.getElements(d).forEach(ae=>{if(ae.parentElement&&ae.parentElement!==this.el)return;let O=ae.gridstackNode;O||(O=this.engine.nodes.find(E=>ae===E.el)),O&&(A&&ja.addRemoveCB&&ja.addRemoveCB(this.el,O,!1,!1),delete ae.gridstackNode,this._removeDD(ae),this.engine.removeNode(O,A,U),A&&ae.parentElement&&ae.remove())}),U&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(d=!0,A=!0){return this.engine.nodes.forEach(U=>{d&&ja.addRemoveCB&&ja.addRemoveCB(this.el,U,!1,!1),delete U.el.gridstackNode,this.opts.staticGrid||this._removeDD(U.el)}),this.engine.removeAll(d,A),A&&this._triggerRemoveEvent(),this}setAnimation(d=this.opts.animate,A){return A?setTimeout(()=>{this.opts&&this.setAnimation(d)}):d?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=d,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(d,A=!0,U=!0){return!!this.opts.staticGrid===d?this:(d?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(ae=>{this.prepareDragDrop(ae.el),ae.subGrid&&U&&ae.subGrid.setStatic(d,A,U)}),A&&this._setStaticClass(),this)}updateOptions(d){var A;const U=this.opts;return d===U?this:(d.acceptWidgets!==void 0&&(U.acceptWidgets=d.acceptWidgets,this._setupAcceptWidget()),d.animate!==void 0&&this.setAnimation(d.animate),d.cellHeight&&this.cellHeight(d.cellHeight),d.class!==void 0&&d.class!==U.class&&(U.class&&this.el.classList.remove(U.class),d.class&&this.el.classList.add(d.class)),d.columnOpts?(this.opts.columnOpts=d.columnOpts,this.checkDynamicColumn()):d.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof d.column=="number"&&this.column(d.column),d.margin!==void 0&&this.margin(d.margin),d.staticGrid!==void 0&&this.setStatic(d.staticGrid),d.disableDrag!==void 0&&!d.staticGrid&&this.enableMove(!d.disableDrag),d.disableResize!==void 0&&!d.staticGrid&&this.enableResize(!d.disableResize),d.float!==void 0&&this.float(d.float),d.row!==void 0?(U.minRow=U.maxRow=U.row=d.row,this._updateContainerHeight()):(d.minRow!==void 0&&(U.minRow=d.minRow,this._updateContainerHeight()),d.maxRow!==void 0&&(U.maxRow=d.maxRow)),(A=d.children)!=null&&A.length&&this.load(d.children),this)}update(d,A){return ja.getElements(d).forEach(U=>{var ae;const O=U==null?void 0:U.gridstackNode;if(!O)return;const E={...In.copyPos({},O),...In.cloneDeep(A)};this.engine.nodeBoundFix(E),delete E.autoPosition;const t=["x","y","w","h"];let x;if(t.some(b=>E[b]!==void 0&&E[b]!==O[b])&&(x={},t.forEach(b=>{x[b]=E[b]!==void 0?E[b]:O[b],delete E[b]})),!x&&(E.minW||E.minH||E.maxW||E.maxH)&&(x={}),E.content!==void 0){const b=U.querySelector(".grid-stack-item-content");b&&b.textContent!==E.content&&(O.content=E.content,ja.renderCB(b,E),(ae=O.subGrid)!=null&&ae.el&&(b.appendChild(O.subGrid.el),O.subGrid._updateContainerHeight())),delete E.content}let u=!1,e=!1;for(const b in E)b[0]!=="_"&&O[b]!==E[b]&&(O[b]=E[b],u=!0,e=e||!this.opts.staticGrid&&(b==="noResize"||b==="noMove"||b==="locked"));if(In.sanitizeMinMax(O),x){const b=x.w!==void 0&&x.w!==O.w;this.moveNode(O,x),b&&O.subGrid?O.subGrid.onResize(this.hasAnimationCSS()?O.w:void 0):this.resizeToContentCheck(b,O),delete O._orig}(x||u)&&this._writeAttr(U,O),e&&this.prepareDragDrop(O.el),ja.updateCB&&ja.updateCB(O)}),this}moveNode(d,A){const U=d._updating;U||this.engine.cleanNodes().beginUpdate(d),this.engine.moveNode(d,A),this._updateContainerHeight(),U||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(d){var A,U;if(!d||(d.classList.remove("size-to-content-max"),!d.clientHeight))return;const ae=d.gridstackNode;if(!ae)return;const O=ae.grid;if(!O||d.parentElement!==O.el)return;const E=O.getCellHeight(!0);if(!E)return;let t=ae.h?ae.h*E:d.clientHeight,x;if(ae.resizeToContentParent&&(x=d.querySelector(ae.resizeToContentParent)),x||(x=d.querySelector(ja.resizeToContentParent)),!x)return;const u=d.clientHeight-x.clientHeight,e=ae.h?ae.h*E-u:x.clientHeight;let b;if(ae.subGrid){b=ae.subGrid.getRow()*ae.subGrid.getCellHeight(!0);const h=ae.subGrid.el.getBoundingClientRect(),r=d.getBoundingClientRect();b+=h.top-r.top}else{if((U=(A=ae.subGridOpts)==null?void 0:A.children)!=null&&U.length)return;{const h=x.firstElementChild;if(!h){console.error(`Error: GridStack.resizeToContent() widget id:${ae.id} '${ja.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}b=h.getBoundingClientRect().height||e}}if(e===b)return;t+=b-e;let f=Math.ceil(t/E);const v=Number.isInteger(ae.sizeToContent)?ae.sizeToContent:0;v&&f>v&&(f=v,d.classList.add("size-to-content-max")),ae.minH&&f<ae.minH?f=ae.minH:ae.maxH&&f>ae.maxH&&(f=ae.maxH),f!==ae.h&&(O._ignoreLayoutsNodeChange=!0,O.moveNode(ae,{h:f}),delete O._ignoreLayoutsNodeChange)}resizeToContentCBCheck(d){ja.resizeToContentCB?ja.resizeToContentCB(d):this.resizeToContent(d)}rotate(d,A){return ja.getElements(d).forEach(U=>{const ae=U.gridstackNode;if(!In.canBeRotated(ae))return;const O={w:ae.h,h:ae.w,minH:ae.minW,minW:ae.minH,maxH:ae.maxW,maxW:ae.maxH};if(A){const t=A.left>0?Math.floor(A.left/this.cellWidth()):0,x=A.top>0?Math.floor(A.top/this.opts.cellHeight):0;O.x=ae.x+t-(ae.h-(x+1)),O.y=ae.y+x-t}Object.keys(O).forEach(t=>{O[t]===void 0&&delete O[t]});const E=ae._orig;this.update(U,O),ae._orig=E}),this}margin(d){if(!(typeof d=="string"&&d.split(" ").length>1)){const A=In.parseHeight(d);if(this.opts.marginUnit===A.unit&&this.opts.margin===A.h)return}return this.opts.margin=d,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(d){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const A=arguments;let U=0,ae={x:A[U++],y:A[U++],w:A[U++],h:A[U++],autoPosition:A[U++]};return this.willItFit(ae)}return this.engine.willItFit(d)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const d=this.engine.getDirtyNodes(!0);return d&&d.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(d),this._triggerEvent("change",d)),this.engine.saveInitial(),this}_triggerAddEvent(){var d;if(this.engine.batchMode)return this;if((d=this.engine.addedNodes)!=null&&d.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(U=>{delete U._dirty});const A=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",A)}return this}_triggerRemoveEvent(){var d;if(this.engine.batchMode)return this;if((d=this.engine.removedNodes)!=null&&d.length){const A=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",A)}return this}_triggerEvent(d,A){const U=A?new CustomEvent(d,{bubbles:!1,detail:A}):new Event(d);let ae=this;for(;ae.parentGridNode;)ae=ae.parentGridNode.grid;return ae.el.dispatchEvent(U),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const d=this.parentGridNode;let A=this.getRow()+this._extraDragRow;const U=this.opts.cellHeight,ae=this.opts.cellHeightUnit;if(!U)return this;if(!d&&!this.opts.minRow){const O=In.parseHeight(getComputedStyle(this.el).minHeight);if(O.h>0&&O.unit===ae){const E=Math.floor(O.h/U);A<E&&(A=E)}}return this.el.setAttribute("gs-current-row",String(A)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),A&&(this.el.style[d?"minHeight":"height"]=A*U+ae),d&&In.shouldSizeToContent(d)&&d.grid.resizeToContentCBCheck(d.el),this}_prepareElement(d,A=!1,U){U=U||this._readAttr(d),d.gridstackNode=U,U.el=d,U.grid=this,U=this.engine.addNode(U,A),this._writeAttr(d,U),d.classList.add(wu.itemClass,this.opts.itemClass);const ae=In.shouldSizeToContent(U);return ae?d.classList.add("size-to-content"):d.classList.remove("size-to-content"),ae&&this.resizeToContentCheck(!1,U),In.lazyLoad(U)||this.prepareDragDrop(U.el),this}_writePosAttr(d,A){return(!A._moving&&!A._resizing||this._placeholder===d)&&(d.style.top=A.y?A.y===1?"var(--gs-cell-height)":`calc(${A.y} * var(--gs-cell-height))`:null,d.style.left=A.x?A.x===1?"var(--gs-column-width)":`calc(${A.x} * var(--gs-column-width))`:null,d.style.width=A.w>1?`calc(${A.w} * var(--gs-column-width))`:null,d.style.height=A.h>1?`calc(${A.h} * var(--gs-cell-height))`:null),A.x>0?d.setAttribute("gs-x",String(A.x)):d.removeAttribute("gs-x"),A.y>0?d.setAttribute("gs-y",String(A.y)):d.removeAttribute("gs-y"),A.w>1?d.setAttribute("gs-w",String(A.w)):d.removeAttribute("gs-w"),A.h>1?d.setAttribute("gs-h",String(A.h)):d.removeAttribute("gs-h"),this}_writeAttr(d,A){if(!A)return this;this._writePosAttr(d,A);const U={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const ae in U)A[ae]?d.setAttribute(U[ae],String(A[ae])):d.removeAttribute(U[ae]);return this}_readAttr(d,A=!0){const U={};U.x=In.toNumber(d.getAttribute("gs-x")),U.y=In.toNumber(d.getAttribute("gs-y")),U.w=In.toNumber(d.getAttribute("gs-w")),U.h=In.toNumber(d.getAttribute("gs-h")),U.autoPosition=In.toBool(d.getAttribute("gs-auto-position")),U.noResize=In.toBool(d.getAttribute("gs-no-resize")),U.noMove=In.toBool(d.getAttribute("gs-no-move")),U.locked=In.toBool(d.getAttribute("gs-locked"));const ae=d.getAttribute("gs-size-to-content");ae&&(ae==="true"||ae==="false"?U.sizeToContent=In.toBool(ae):U.sizeToContent=parseInt(ae,10)),U.id=d.getAttribute("gs-id"),U.maxW=In.toNumber(d.getAttribute("gs-max-w")),U.minW=In.toNumber(d.getAttribute("gs-min-w")),U.maxH=In.toNumber(d.getAttribute("gs-max-h")),U.minH=In.toNumber(d.getAttribute("gs-min-h")),A&&(U.w===1&&d.removeAttribute("gs-w"),U.h===1&&d.removeAttribute("gs-h"),U.maxW&&d.removeAttribute("gs-max-w"),U.minW&&d.removeAttribute("gs-min-w"),U.maxH&&d.removeAttribute("gs-max-h"),U.minH&&d.removeAttribute("gs-min-h"));for(const O in U){if(!U.hasOwnProperty(O))return;!U[O]&&U[O]!==0&&O!=="sizeToContent"&&delete U[O]}return U}_setStaticClass(){const d=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...d),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...d),this.el.removeAttribute("gs-static")),this}onResize(d=(A=>(A=this.el)==null?void 0:A.clientWidth)()){if(!d||this.prevWidth===d)return;this.prevWidth=d,this.batchUpdate();let A=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),A=!0):A=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(U=>{U.subGrid&&U.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(A),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(d=!1,A=void 0){if(this.engine){if(d&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,A),this.animationDelay);if(A)In.shouldSizeToContent(A)&&this.resizeToContentCBCheck(A.el);else if(this.engine.nodes.some(U=>In.shouldSizeToContent(U))){const U=[...this.engine.nodes];this.batchUpdate(),U.forEach(ae=>{In.shouldSizeToContent(ae)&&this.resizeToContentCBCheck(ae.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,A?[A]:this.engine.nodes)}}_updateResizeEvent(d=!1){const A=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(U=>U.sizeToContent));return!d&&A&&!this.resizeObserver?(this._sizeThrottle=In.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(d||!A)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(d=".grid-stack-item"){return In.getElement(d)}static getElements(d=".grid-stack-item"){return In.getElements(d)}static getGridElement(d){return ja.getElement(d)}static getGridElements(d){return In.getElements(d)}_initMargin(){let d,A=0,U=[];typeof this.opts.margin=="string"&&(U=this.opts.margin.split(" ")),U.length===2?(this.opts.marginTop=this.opts.marginBottom=U[0],this.opts.marginLeft=this.opts.marginRight=U[1]):U.length===4?(this.opts.marginTop=U[0],this.opts.marginRight=U[1],this.opts.marginBottom=U[2],this.opts.marginLeft=U[3]):(d=In.parseHeight(this.opts.margin),this.opts.marginUnit=d.unit,A=this.opts.margin=d.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(O=>{this.opts[O]===void 0?this.opts[O]=A:(d=In.parseHeight(this.opts[O]),this.opts[O]=d.h,delete this.opts.margin)}),this.opts.marginUnit=d.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const ae=this.el.style;return ae.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),ae.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),ae.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),ae.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return Fc}static setupDragIn(d,A,U,ae=document){(A==null?void 0:A.pause)!==void 0&&(Ka.pauseDrag=A.pause),A={appendTo:"body",helper:"clone",...A||{}},(typeof d=="string"?In.getElements(d,ae):d).forEach((O,E)=>{Fc.isDraggable(O)||Fc.dragIn(O,A),U!=null&&U[E]&&(O.gridstackNode=U[E])})}movable(d,A){return this.opts.staticGrid?this:(ja.getElements(d).forEach(U=>{const ae=U.gridstackNode;ae&&(A?delete ae.noMove:ae.noMove=!0,this.prepareDragDrop(ae.el))}),this)}resizable(d,A){return this.opts.staticGrid?this:(ja.getElements(d).forEach(U=>{const ae=U.gridstackNode;ae&&(A?delete ae.noResize:ae.noResize=!0,this.prepareDragDrop(ae.el))}),this)}disable(d=!0){if(!this.opts.staticGrid)return this.enableMove(!1,d),this.enableResize(!1,d),this._triggerEvent("disable"),this}enable(d=!0){if(!this.opts.staticGrid)return this.enableMove(!0,d),this.enableResize(!0,d),this._triggerEvent("enable"),this}enableMove(d,A=!0){return this.opts.staticGrid?this:(d?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(U=>{this.prepareDragDrop(U.el),U.subGrid&&A&&U.subGrid.enableMove(d,A)}),this)}enableResize(d,A=!0){return this.opts.staticGrid?this:(d?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(U=>{this.prepareDragDrop(U.el),U.subGrid&&A&&U.subGrid.enableResize(d,A)}),this)}cancelDrag(){var d;const A=(d=this._placeholder)==null?void 0:d.gridstackNode;A&&(A._isExternal?(A._isAboutToRemove=!0,this.engine.removeNode(A)):A._isAboutToRemove&&ja._itemRemoving(A.el,!1),this.engine.restoreInitial())}_removeDD(d){return Fc.draggable(d,"destroy").resizable(d,"destroy"),d.gridstackNode&&delete d.gridstackNode._initDD,delete d.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return Fc.droppable(this.el,"destroy"),this;let d,A;const U=(ae,O,E)=>{var t;E=E||O;const x=E.gridstackNode;if(!x)return;if(!((t=x.grid)!=null&&t.el)){E.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const v=E.getBoundingClientRect();E.style.left=v.x+(this.dragTransform.xScale-1)*(ae.clientX-v.x)/this.dragTransform.xScale+"px",E.style.top=v.y+(this.dragTransform.yScale-1)*(ae.clientY-v.y)/this.dragTransform.yScale+"px",E.style.transformOrigin="0px 0px"}let{top:u,left:e}=E.getBoundingClientRect();const b=this.el.getBoundingClientRect();e-=b.left,u-=b.top;const f={position:{top:u*this.dragTransform.xScale,left:e*this.dragTransform.yScale}};if(x._temporaryRemoved){if(x.x=Math.max(0,Math.round(e/A)),x.y=Math.max(0,Math.round(u/d)),delete x.autoPosition,this.engine.nodeBoundFix(x),!this.engine.willItFit(x)){if(x.autoPosition=!0,!this.engine.willItFit(x)){Fc.off(O,"drag");return}x._willFitPos&&(In.copyPos(x,x._willFitPos),delete x._willFitPos)}this._onStartMoving(E,ae,f,x,A,d)}else this._dragOrResize(E,ae,f,x,A,d)};return Fc.droppable(this.el,{accept:ae=>{const O=ae.gridstackNode||this._readAttr(ae,!1);if((O==null?void 0:O.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let E=!0;if(typeof this.opts.acceptWidgets=="function")E=this.opts.acceptWidgets(ae);else{const t=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;E=ae.matches(t)}if(E&&O&&this.opts.maxRow){const t={w:O.w,h:O.h,minW:O.minW,minH:O.minH};E=this.engine.willItFit(t)}return E}}).on(this.el,"dropover",(ae,O,E)=>{let t=(E==null?void 0:E.gridstackNode)||O.gridstackNode;if((t==null?void 0:t.grid)===this&&!t._temporaryRemoved)return!1;if(t!=null&&t._sidebarOrig&&(t.w=t._sidebarOrig.w,t.h=t._sidebarOrig.h),t!=null&&t.grid&&t.grid!==this&&!t._temporaryRemoved&&t.grid._leave(O,E),E=E||O,A=this.cellWidth(),d=this.getCellHeight(!0),!t){const e=E.getAttribute("data-gs-widget")||E.getAttribute("gridstacknode");if(e){try{t=JSON.parse(e)}catch{console.error("Gridstack dropover: Bad JSON format: ",e)}E.removeAttribute("data-gs-widget"),E.removeAttribute("gridstacknode")}t||(t=this._readAttr(E)),t._sidebarOrig={w:t.w,h:t.h}}t.grid||(t.el||(t={...t}),t._isExternal=!0,E.gridstackNode=t);const x=t.w||Math.round(E.offsetWidth/A)||1,u=t.h||Math.round(E.offsetHeight/d)||1;return t.grid&&t.grid!==this?(O._gridstackNodeOrig||(O._gridstackNodeOrig=t),O.gridstackNode=t={...t,w:x,h:u,grid:this},delete t.x,delete t.y,this.engine.cleanupNode(t).nodeBoundFix(t),t._initDD=t._isExternal=t._temporaryRemoved=!0):(t.w=x,t.h=u,t._temporaryRemoved=!0),ja._itemRemoving(t.el,!1),Fc.on(O,"drag",U),U(ae,O,E),!1}).on(this.el,"dropout",(ae,O,E)=>{const t=(E==null?void 0:E.gridstackNode)||O.gridstackNode;return t&&(!t.grid||t.grid===this)&&(this._leave(O,E),this._isTemp&&this.removeAsSubGrid(t)),!1}).on(this.el,"drop",(ae,O,E)=>{var t,x,u;const e=(E==null?void 0:E.gridstackNode)||O.gridstackNode;if((e==null?void 0:e.grid)===this&&!e._isExternal)return!1;const b=!!this.placeholder.parentElement,f=O!==E;this.placeholder.remove(),delete this.placeholder.gridstackNode,b&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const v=O._gridstackNodeOrig;if(delete O._gridstackNodeOrig,b&&v!=null&&v.grid&&v.grid!==this){const r=v.grid;r.engine.removeNodeFromLayoutCache(v),r.engine.removedNodes.push(v),r._triggerRemoveEvent()._triggerChangeEvent(),r.parentGridNode&&!r.engine.nodes.length&&r.opts.subGridDynamic&&r.removeAsSubGrid()}if(!e||(b&&(this.engine.cleanupNode(e),e.grid=this),(t=e.grid)==null||delete t._isTemp,Fc.off(O,"drag"),E!==O?(E.remove(),O=E):O.remove(),this._removeDD(O),!b))return!1;const h=(u=(x=e.subGrid)==null?void 0:x.el)==null?void 0:u.gridstack;return In.copyPos(e,this._readAttr(this.placeholder)),In.removePositioningStyles(O),f&&(e.content||e.subGridOpts||ja.addRemoveCB)?(delete e.el,O=this.addWidget(e)):(this._prepareElement(O,!0,e),this.el.appendChild(O),this.resizeToContentCheck(!1,e),h&&(h.parentGridNode=e),this._updateContainerHeight()),this.engine.addedNodes.push(e),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...ae,type:"dropped"},v&&v.grid?v:void 0,e),!1}),this}static _itemRemoving(d,A){if(!d)return;const U=d?d.gridstackNode:void 0;!(U!=null&&U.grid)||d.classList.contains(U.grid.opts.removableOptions.decline)||(A?U._isAboutToRemove=!0:delete U._isAboutToRemove,A?d.classList.add("grid-stack-item-removing"):d.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const d=document.querySelector(this.opts.removable);return d?(!this.opts.staticGrid&&!Fc.isDroppable(d)&&Fc.droppable(d,this.opts.removableOptions).on(d,"dropover",(A,U)=>ja._itemRemoving(U,!0)).on(d,"dropout",(A,U)=>ja._itemRemoving(U,!1)),this):this}prepareDragDrop(d,A=!1){const U=d==null?void 0:d.gridstackNode;if(!U)return;const ae=U.noMove||this.opts.disableDrag,O=U.noResize||this.opts.disableResize,E=this.opts.staticGrid||ae&&O;if((A||E)&&(U._initDD&&(this._removeDD(d),delete U._initDD),E&&d.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!A))return this;if(!U._initDD){let t,x;const u=(f,v)=>{this.triggerEvent(f,f.target),t=this.cellWidth(),x=this.getCellHeight(!0),this._onStartMoving(d,f,v,U,t,x)},e=(f,v)=>{this._dragOrResize(d,f,v,U,t,x)},b=f=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete U._moving,delete U._resizing,delete U._event,delete U._lastTried;const v=U.w!==U._orig.w,h=f.target;if(!(!h.gridstackNode||h.gridstackNode.grid!==this)){if(U.el=h,U._isAboutToRemove){const r=d.gridstackNode.grid;r._gsEventHandler[f.type]&&r._gsEventHandler[f.type](f,h),r.engine.nodes.push(U),r.removeWidget(d,!0,!0)}else In.removePositioningStyles(h),U._temporaryRemoved?(In.copyPos(U,U._orig),this._writePosAttr(h,U),this.engine.addNode(U)):this._writePosAttr(h,U),this.triggerEvent(f,h);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),f.type==="resizestop"&&(Number.isInteger(U.sizeToContent)&&(U.sizeToContent=U.h),this.resizeToContentCheck(v,U))}};Fc.draggable(d,{start:u,stop:b,drag:e}).resizable(d,{start:u,stop:b,resize:e}),U._initDD=!0}return Fc.draggable(d,ae?"disable":"enable").resizable(d,O?"disable":"enable"),this}_onStartMoving(d,A,U,ae,O,E){var t;if(this.engine.cleanNodes().beginUpdate(ae),this._writePosAttr(this.placeholder,ae),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=ae,(t=ae.grid)!=null&&t.el)this.dragTransform=In.getValuesFromTransformedElement(d);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const x=this.placeholder.closest(".grid-stack");this.dragTransform=In.getValuesFromTransformedElement(x)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(ae.el=this.placeholder,ae._lastUiPosition=U.position,ae._prevYPix=U.position.top,ae._moving=A.type==="dragstart",ae._resizing=A.type==="resizestart",delete ae._lastTried,A.type==="dropover"&&ae._temporaryRemoved&&(this.engine.addNode(ae),ae._moving=!0),this.engine.cacheRects(O,E,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),A.type==="resizestart"){const x=this.getColumn()-ae.x,u=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-ae.y;Fc.resizable(d,"option","minWidth",O*Math.min(ae.minW||1,x)).resizable(d,"option","minHeight",E*Math.min(ae.minH||1,u)).resizable(d,"option","maxWidth",O*Math.min(ae.maxW||Number.MAX_SAFE_INTEGER,x)).resizable(d,"option","maxWidthMoveLeft",O*Math.min(ae.maxW||Number.MAX_SAFE_INTEGER,ae.x+ae.w)).resizable(d,"option","maxHeight",E*Math.min(ae.maxH||Number.MAX_SAFE_INTEGER,u)).resizable(d,"option","maxHeightMoveUp",E*Math.min(ae.maxH||Number.MAX_SAFE_INTEGER,ae.y+ae.h))}}_dragOrResize(d,A,U,ae,O,E){const t={...ae._orig};let x,u=this.opts.marginLeft,e=this.opts.marginRight,b=this.opts.marginTop,f=this.opts.marginBottom;const v=Math.round(E*.1),h=Math.round(O*.1);if(u=Math.min(u,h),e=Math.min(e,h),b=Math.min(b,v),f=Math.min(f,v),A.type==="drag"){if(ae._temporaryRemoved)return;const n=U.position.top-ae._prevYPix;ae._prevYPix=U.position.top,this.opts.draggable.scroll!==!1&&In.updateScrollPosition(d,U.position,n);const c=U.position.left+(U.position.left>ae._lastUiPosition.left?-e:u),o=U.position.top+(U.position.top>ae._lastUiPosition.top?-f:b);t.x=Math.round(c/O),t.y=Math.round(o/E);const l=this._extraDragRow;if(this.engine.collide(ae,t)){const p=this.getRow();let m=Math.max(0,t.y+ae.h-p);this.opts.maxRow&&p+m>this.opts.maxRow&&(m=Math.max(0,this.opts.maxRow-p)),this._extraDragRow=m}else this._extraDragRow=0;if(this._extraDragRow!==l&&this._updateContainerHeight(),ae.x===t.x&&ae.y===t.y)return}else if(A.type==="resize"){if(t.x<0||(In.updateScrollResize(A,d,E),t.w=Math.round((U.size.width-u)/O),t.h=Math.round((U.size.height-b)/E),ae.w===t.w&&ae.h===t.h)||ae._lastTried&&ae._lastTried.w===t.w&&ae._lastTried.h===t.h)return;const n=U.position.left+u,c=U.position.top+b;t.x=Math.round(n/O),t.y=Math.round(c/E),x=!0}ae._event=A,ae._lastTried=t;const r={x:U.position.left+u,y:U.position.top+b,w:(U.size?U.size.width:ae.w*O)-u-e,h:(U.size?U.size.height:ae.h*E)-b-f};if(this.engine.moveNodeCheck(ae,{...t,cellWidth:O,cellHeight:E,rect:r,resizing:x})){ae._lastUiPosition=U.position,this.engine.cacheRects(O,E,b,e,f,u),delete ae._skipDown,x&&ae.subGrid&&ae.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const n=A.target;ae._sidebarOrig||this._writePosAttr(n,ae),this.triggerEvent(A,n)}}triggerEvent(d,A){let U=this;for(;U.parentGridNode;)U=U.parentGridNode.grid;U._gsEventHandler[d.type]&&U._gsEventHandler[d.type](d,A)}_leave(d,A){A=A||d;const U=A.gridstackNode;if(!U||(A.style.transform=A.style.transformOrigin=null,Fc.off(d,"drag"),U._temporaryRemoved))return;U._temporaryRemoved=!0,this.engine.removeNode(U),U.el=U._isExternal&&A?A:d;const ae=U._sidebarOrig;U._isExternal&&this.engine.cleanupNode(U),U._sidebarOrig=ae,this.opts.removable===!0&&ja._itemRemoving(d,!0),d._gridstackNodeOrig?(d.gridstackNode=d._gridstackNodeOrig,delete d._gridstackNodeOrig):U._isExternal&&this.engine.restoreInitial()}commit(){return Dre(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}ja.renderCB=(a,d)=>{a&&d!=null&&d.content&&(a.textContent=d.content)},ja.resizeToContentParent=".grid-stack-item-content",ja.Utils=In,ja.Engine=Pd,ja.GDRev="12.2.2";const Bre=[{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}],W5=new Map([[9,{id:9,analysisTypes:new Map([["2-20",{analysisType:"successfulPasses",name:"Pases acertados",title:"Mapeo de pases acertados"}],["3-21",{analysisType:"unsuccessfulPasses",name:"Pases no acertados",title:"Mapeo de pases no acertados"}],["222-223-224-225",{analysisType:"recoveredBalls",name:"Balones recuperados",title:"Mapeo de balones recuperados"}],["226-227-228-229",{analysisType:"lostBalls",name:"Balones perdidos",title:"Mapeo de balones perdidos"}]])}]]);class Tg{constructor(d,A=new Map,U,ae=null,O=!1,E=!1,t=null){Ad(this,"id",""),Ad(this,"childViews",[]),Ad(this,"viewId",0),Ad(this,"dynamicFilters",null),Ad(this,"isPostMatch",!1),Ad(this,"isTemplateMode",!1),Ad(this,"filtresJSON",null),Ad(this,"homeTeamViews",[]),Ad(this,"awayTeamViews",[]),this.id=d,this.viewId=U,this.childViews=A,this.dynamicFilters=ae,this.isPostMatch=O,this.isTemplateMode=E,this.filtresJSON=t,console.log("contructor, dynamicFilters",ae)}getId(){return this.id}setDynamicFilters(d){this.dynamicFilters=d}getDynamicFilters(){return this.dynamicFilters}addView(d,A=!1){var U,ae,O,E,t,x,u,e,b,f,v,h,r,n,c,o,l,p,m,w,T,k,M,P,S,L,C,_,z,y;if(console.log("addView: ###################################################"),console.log("this.dynamicFilters",this.dynamicFilters),d.view.filterAndViewsContainer=this,Qo.emit("component-added-to-container",this),this.viewId===5&&d.view.componentProps&&!A&&(d.view.componentProps.preMatchType=this.dynamicFilters[0]!==3&&this.dynamicFilters[0]||1),this.viewId===9&&(console.log("id 9"),console.log("this.dynamicFilters",this.dynamicFilters),d.view.componentProps&&!A)){const N=this.dynamicFilters[0].map(j=>j.join("-"));console.log("categoriesIdsString",N);const I=this.dynamicFilters[1],V=W5.get(this.viewId);if(I!==3){const j=I===1?this.homeTeamViews:this.awayTeamViews;d.view.componentProps.isHomeTeamForAnalysis=I===1;for(let W=0;W<N.length;W++){const q=V.analysisTypes.get(N[W]);j.find($=>$.view.componentProps.analysisType===q.analysisType)||(d.view.componentProps.analysisType=q.analysisType,d.view.title=q.title)}j.push(d)}}this.viewId===2&&d.view.componentProps&&d.view.game&&(d.view.componentProps.gamed=(ae=(U=d.view)==null?void 0:U.game)==null?void 0:ae.game_id,d.view.componentProps.game=(O=d.view)==null?void 0:O.game,d.view.componentProps.season=(t=(E=d.view)==null?void 0:E.game)==null?void 0:t.season_id,d.view.componentProps.teamView=this.dynamicFilters[1]==2?(u=(x=d.view)==null?void 0:x.game)==null?void 0:u.visiting_team:this.dynamicFilters[1]==1?(b=(e=d.view)==null?void 0:e.game)==null?void 0:b.home_team:0,d.view.componentProps.categoryView=this.dynamicFilters[0].length>0?[{id:this.dynamicFilters[0][0],name:((f=Bre.filter(N=>N.id===this.dynamicFilters[0][0])[0])==null?void 0:f.name)||"default"}]:[{id:0,name:"Category"}]),this.viewId===8&&d.view.componentProps&&d.view.game&&(d.view.componentProps.areInactiveVisible=this.dynamicFilters[0],d.view.componentProps.gamed=(v=d.view)==null?void 0:v.game,d.view.componentProps.isDefault=!1),this.viewId===6&&d.view.componentProps&&d.view.game&&(this.isPostMatch?(d.view.componentProps.selectedOption="Postmatch",d.view.componentProps.game={game_id:(r=(h=d.view)==null?void 0:h.game)==null?void 0:r.game_id,season_id:(c=(n=d.view)==null?void 0:n.game)==null?void 0:c.season_id,prematch:!1},d.view.componentProps.gamehome={game_id:(l=(o=d.view)==null?void 0:o.game)==null?void 0:l.game_id,season_id:(m=(p=d.view)==null?void 0:p.game)==null?void 0:m.season_id,prematch:!1},d.view.componentProps.gameaway={game_id:(T=(w=d.view)==null?void 0:w.game)==null?void 0:T.game_id,season_id:(M=(k=d.view)==null?void 0:k.game)==null?void 0:M.season_id,prematch:!1}):d.view.componentProps.selectedOption="Prematch"),this.viewId===3&&d.view.componentProps&&d.view.game&&(d.view.componentProps._isReactive||(d.view.componentProps=g.reactive(d.view.componentProps),d.view.componentProps._isReactive=!0),d.view.componentProps.game=(P=d.view)==null?void 0:P.game,d.view.componentProps.defaultShields=!1,d.view.dynamicFilters&&d.view.dynamicFilters.length>0?d.view.componentProps.desplegable=d.view.dynamicFilters[0]:d.view.componentProps.desplegable=this.dynamicFilters[0]||!1,Qo.emit("component-props-updated",{viewId:d.view.id,componentProps:d.view.componentProps,dynamicFilters:this.dynamicFilters})),this.viewId===4&&d.view.componentProps&&d.view.game&&this.isPostMatch&&(d.view.componentProps.key=!1,d.view.componentProps.isDefault=!1,d.view.componentProps.gameId=(L=(S=d.view)==null?void 0:S.game)==null?void 0:L.game_id,d.view.componentProps.homeTeam=(_=(C=d.view)==null?void 0:C.game)==null?void 0:_.home_team,d.view.componentProps.awayTeam=(y=(z=d.view)==null?void 0:z.game)==null?void 0:y.visiting_team),this.childViews.push(d),console.log("this.childViews",this.childViews)}getHowManyViewsToAdd(d){if(this.viewId===5)return 1;if(this.viewId===6){const A=d[0];return A===2||A===3?A:1}if(this.viewId===9){const A=d[0],U=d[1];if(U===1||U===2){const ae=U===1?this.homeTeamViews:this.awayTeamViews;return A.length-ae.length}else return A*2-(this.homeTeamViews.length+this.awayTeamViews.length)}return 0}getRequiresAddView(d){if(console.log("getRequiresAddView",this.viewId,d),console.log("this.dynamicFilters",this.dynamicFilters),this.viewId===5)return d[0]===3&&this.childViews.length<2;if(this.viewId===6){const A=d[0];return A===2||A===3}return this.viewId===9?this.getRequiresAddViewMultipleAndBothTeams(d):!1}getRequiresAddViewMultipleAndBothTeams(d){console.log("*******************************************************"),console.log("dynamicFilters",d),console.log("this.dynamicFilters",this.dynamicFilters);const A=d[0].length,U=d[1],ae=A*(U===1||U===2?1:2),O=U===3?this.homeTeamViews.length+this.awayTeamViews.length:this.homeTeamViews.length||this.awayTeamViews.length;return console.log("totalNewViews",ae,"totalViewsByTeam",O),console.log("totalViewsByTeam",O,"totalNewViews",ae),ae>O}getRequiresLessViews(d){if(console.log("getRequiresLessViews",this.viewId,d),this.viewId===5)return d[0]!==3&&this.childViews.length>1;if(this.viewId===6){const A=d[0];return(A===2||A===3)&&this.childViews.length>1}return!1}updateDynamicFilters(d){if(this.dynamicFilters=d,Qo.emit("component-added-to-container",this),this.viewId===5){const A=d[0]||1;if(A<3)if(this.childViews.length===1){const U=this.childViews[0];U.view.componentProps&&(U.view.componentProps.preMatchType=A)}else{const U=this.childViews.pop(),ae=U.grid,O=U.page,E=document.querySelector(`[gs-id="${U.view.id}"]`);if(ae&&E&&(ae.removeWidget(E),O)){const x=O.items.findIndex(u=>u.id===U.view.id);x!==-1&&O.items.splice(x,1)}const t=this.childViews[0];t.view.componentProps&&(t.view.componentProps.preMatchType=A)}else this.childViews.forEach((U,ae)=>{U.view.componentProps.preMatchType=ae+1})}if(this.viewId===9){const A=d[0],U=d[1];if(U!==3){const ae=U===1;if(ae&&this.homeTeamViews.length===0)this.awayTeamViews.forEach(O=>{O.view.componentProps.isHomeTeamForAnalysis=!0,O.view.isHomeTeam=!0,this.homeTeamViews.push(O)}),this.awayTeamViews=[];else if(!ae&&this.awayTeamViews.length===0)this.homeTeamViews.forEach(O=>{O.view.componentProps.isHomeTeamForAnalysis=!1,O.view.isHomeTeam=!1,this.awayTeamViews.push(O)}),this.homeTeamViews=[];else{const O=ae?this.homeTeamViews:this.awayTeamViews;if(O.length>A.length){const E=A.map(t=>{const x=t.join("-");return W5.get(this.viewId).analysisTypes.get(x).analysisType});O.forEach(t=>{E.includes(t.view.componentProps.analysisType)||this.removeChildView(t)})}}}console.log("updateDynamicFilters",this.homeTeamViews,this.awayTeamViews)}if(this.viewId,this.viewId,this.viewId,this.viewId===3){const A=d[0]||!1;this.childViews.forEach(U=>{U.view.componentProps&&(U.view.componentProps._isReactive||(U.view.componentProps=g.reactive(U.view.componentProps),U.view.componentProps._isReactive=!0),console.log("DynamicFilters 333333333333333333333333333333333333333",A),U.view.componentProps.desplegable=A,U.view.componentProps.key=A,Qo.emit("component-props-updated",{viewId:U.view.id,componentProps:U.view.componentProps,dynamicFilters:d}),Qo.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:U.view.id,dynamicFilters:d}))})}this.viewId}removeChildView(d){const A=this.childViews.findIndex(O=>O.view.id===d.view.id),U=this.homeTeamViews.findIndex(O=>O.view.id===d.view.id),ae=this.awayTeamViews.findIndex(O=>O.view.id===d.view.id);if(U!==-1&&this.homeTeamViews.splice(U,1),ae!==-1&&this.awayTeamViews.splice(ae,1),A!==-1){const O=this.childViews[A];this.childViews.splice(A,1);const E=O.grid,t=O.page,x=document.querySelector(`[gs-id="${O.view.id}"]`);if(E&&x&&(E.removeWidget(x),t)){const u=t.items.findIndex(e=>e.id===O.view.id);u!==-1&&(t.items.splice(u,1),t.items.length===0&&Qo.emit("empty-page",t),console.log("page.items",t.items))}}}updateView({view:d,dynamicFilters:A,filtersJSON:U}){this.dynamicFilters=A;const ae=this.childViews.find(O=>O.view.id===d.view.id);ae?(ae.view.filtersJSON=U,ae.view.coreView&&(ae.view.coreView.filtersJSON=U),this.viewId===5?this.updateVolumetricField(ae,A):this.viewId===3&&this.updateMatchSummary(ae,A)):console.log("viewToUpdate not found")}updateVolumetricField(d,A){d.view.componentProps&&(d.view.componentProps.preMatchType=A[0]||1)}updateMatchSummary(d,A){d.view.componentProps&&(d.view.componentProps._isReactive||(d.view.componentProps=g.reactive(d.view.componentProps),d.view.componentProps._isReactive=!0),d.view.componentProps.desplegable=A[0]||!1,d.view.componentProps.key=A[0]||!1,Qo.emit("component-props-updated",{viewId:d.view.id,componentProps:d.view.componentProps,dynamicFilters:A}),Qo.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:d.view.id,dynamicFilters:A}))}}const Ure={class:"template-page__header"},jre={class:"template-page__header__name"},qre=["value"],Wre={class:"template-page__header__details"},Hre={class:"template-page__header__details__teams"},Gre={class:"template-page__header__details__teams__team"},Xre={key:0,class:"template-page__header__details__teams__team__logo"},Kre=["src"],Jre={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$re={class:"template-page__header__details__teams__team"},Zre={key:0,class:"template-page__header__details__teams__team__logo"},Yre=["src"],Qre={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ene={class:"template-page__content"},tne=["id"],rne=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-max-w","gs-max-h","gs-min-w","gs-min-h","gs-no-resize","gs-no-move","gs-auto-position","onMounted"],nne=g.defineComponent({__name:"TemplateReportPage",props:{token:{type:String,default:""},game:{type:Object,default:()=>null},id:{type:[String,Number],default:()=>String(Date.now())},page:{type:Object,default:()=>({title:"Page 1",items:[{name:"Tabla jugadores",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]})},isPostMatch:{type:Boolean,default:!1},isTemplateMode:{type:Boolean,default:!1}},emits:["intersection-changed","delete-page","change-sort","edit-view","view-changed","component-props-updated","delete-view"],setup(a,{emit:d}){var A,U;const ae=g.ref(null);let O=null;const E=a,t=g.ref(!1),x=d,u=g.computed(()=>E.page.items.reduce((M,P)=>(M.set(P.id,P),M),new Map)),e=g.computed(()=>{var M,P,S,L;return E.game&&E.game.homeTeam&&E.game.awayTeam?{homeTeam:{name:((M=E.game.homeTeam)==null?void 0:M.acronym)||"LOC",logo:((P=E.game.homeTeam)==null?void 0:P.logo)||null},awayTeam:{name:((S=E.game.awayTeam)==null?void 0:S.acronym)||"VIS",logo:((L=E.game.awayTeam)==null?void 0:L.logo)||null}}:{homeTeam:{name:"LOC"},awayTeam:{name:"VIS"}}}),b=M=>{M.forEach(P=>{x("intersection-changed",P.isIntersecting)})};let f=null;function v(){const M={root:null,rootMargin:"0px",threshold:.7};f=new IntersectionObserver(b,M);const P=ae.value;P&&f.observe(P)}function h(){x("view-changed")}const r={game_id:0,season_id:0,prematch:!1},n={gameId:90209,id:90209,seasonId:1909,regularSeasonId:1909,matchday_name:"Matchday 1",status:1,score:[1,3],game_status:1,dateTimeUTC:"2024-09-05T22:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2936.png",team_id:2936,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2936.png",colloquial_name:"Guyana",acronym:"GUY",team_name:"Guyana"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/3279.png",team_id:3279,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/3279.png",colloquial_name:"Surinam",acronym:"SUR",team_name:"Surinam"},is_live:0,minutes:{home_goals_minutes:[],visiting_goals_minutes:[],home_yellow_cards_minutes:[],away_yellow_cards_minutes:[],home_red_cards_minutes:[],away_red_cards_minutes:[]}},c=new Map([[5,{component:Vx,componentName:"GSCVolumetricField",props:{isGamePreMatch:!E.isPostMatch,areTeamsVisible:!1,isTitleVisible:!1,isGhostEffect:E.isTemplateMode,isTemplateMode:E.isTemplateMode}}],[2,{component:M_,componentName:"GscTopPlayer",props:{categoryView:[{id:0,name:"Category"}],gamed:(A=E==null?void 0:E.game)==null?void 0:A.game_id,game:E==null?void 0:E.game,season:(U=E==null?void 0:E.game)==null?void 0:U.season_id,teamView:0}}],[8,{component:zw,componentName:"FieldPosesion",props:{widthSection:600,game:n,areInactiveVisible:!1,showTitle:!1,isDefault:!0}}],[6,{component:D5,componentName:"GSCLineupsReports",props:{selectedOption:"Postmatch",game:r,gamehome:r,gameaway:r}}],[3,{component:Rw,componentName:"GSCMatchSummary",props:{game:n,defaultShields:!0,desplegable:!1}}],[4,{component:b3,componentName:"GSCTimelineReports",props:{key:!0,isDefault:!0,gameId:n.gameId,homeTeam:n.homeTeam.team_id,awayTeam:n.awayTeam.team_id,token:E.token}}],[9,{component:I5,componentName:"GSCFieldDataByZones",props:{game:E.game,isHomeTeamForAnalysis:!0,analysisType:"successfulPasses",canPlayVideos:!1,isPreMatch:!E.isPostMatch}}]]);function o(M){if(M)if(typeof M=="string"){let P=null;switch(M){case"GSCVolumetricField":P=Vx;break;case"GscTopPlayer":P=M_;break;case"FieldPosesion":P=zw;break;case"GSCLineupsReports":P=D5;break;case"GSCMatchSummary":P=Rw;break;case"GSCTimelineReports":P=b3;break;case"GSCFieldDataByZones":P=I5;break;default:P=null}return P}else return M;return null}function l({pageId:M,view:P,filterAndWidgetContainer:S,applyMinimumSize:L=!1}){if(console.log("addView ----------------------------------------------"),console.log("pageId:",M),console.log("props.page.id:",E.page.id),E.page.id===M&&O){const C={w:L?P.min_column:P.colspan,h:L?P.min_row:P.rowspan};if(O.willItFit(0,0,C.w,C.h,!0)){const _=O.addWidget(C),z=Number(_.getAttribute("gs-x")||0),y=Number(_.getAttribute("gs-y")||0);O.removeWidget(_);const N=c.get(P.id),I=g.reactive({...JSON.parse(JSON.stringify(N.props))||{},_isReactive:!0}),V=g.reactive({pageId:M,grid:O,page:E.page,view:{name:P.name,title:P.title,id:`w-${String(Date.now())}`,x:z,y,w:C.w,h:C.h,maxWidth:P.max_column,maxHeight:P.max_row,minWidth:P.min_column,minHeight:P.min_row,componentName:N.componentName,componentProps:I,pageId:M,coreView:P}});S.addView(V),Qo.emit("add-page-view",V)}else Qo.emit("add-page-and-view",{pageId:M,view:P,filterAndWidgetContainer:S})}}function p(M){if(O){const P=document.querySelector(`[gs-id="${M.id}"]`);P&&(O.removeWidget(P),x("delete-view",M))}x("view-changed")}function m(M){if(!M.filterAndViewsContainer&&M.coreView){const P=new Tg(`FAWC-${Date.now()}-${Math.random()}`,[],M.coreView.id,M.dynamicFilters||[],E.isPostMatch,E.isTemplateMode,M.filtersJSON);M.filterAndViewsContainer=P}x("edit-view",M)}function w(){x("delete-page",E.page)}function T(){Qo.emit("change-sort",E.page)}const k=function(){Qo.off("add-view",l)};return Qo.on("add-view",l),Qo.on("force-component-update",M=>{console.log("Force component update:",M);const P=E.page.items.find(S=>S.id===M.itemId);P&&(Object.assign(P.componentProps,M.componentProps),P._updateKey=Date.now(),console.log("Forced component update for item:",M.itemId,P.componentProps))}),g.onMounted(async()=>{await g.nextTick(),O=ja.init({column:12,row:12,maxRow:12,cellHeight:60,float:!0,resizable:{handles:"e, se, s, sw, w"}},`#grid-stack-${E.id}`),O.on("change",(M,P)=>{const S=P[0];if(S){const L=u.value.get(S.id);L&&(L.x=S.x,L.y=S.y,L.w=S.w,L.h=S.h,x("view-changed"))}}),v(),E.page.grid=O,E.page.offAddView=k}),(M,P)=>(g.openBlock(),g.createElementBlock("div",{ref_key:"templatePage",ref:ae,class:"template-page"},[g.createElementVNode("div",Ure,[t.value?(g.openBlock(),g.createBlock(F5,{key:0,"options-type":"page",onClick:P[0]||(P[0]=g.withModifiers(S=>t.value=!1,["self"])),onMouseleave:P[1]||(P[1]=S=>t.value=!1),onCloseTooltip:P[2]||(P[2]=S=>t.value=!1),onDeletePage:w,onChangeSort:T})):g.createCommentVNode("",!0),g.createElementVNode("div",jre,[P[4]||(P[4]=g.createElementVNode("div",null,[g.createElementVNode("svg",{width:"19",height:"21",viewBox:"0 0 19 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M11.2986 12.9994C7.62909 14.8341 4.11744 16.0178 1.35547 16.4518L9.18763 20.0029C9.34545 20.0818 9.60192 20.0818 9.74002 20.0029L17.8878 16.3137C18.0457 16.2348 18.164 16.0572 18.164 15.8797V8.75781C16.2898 10.2177 13.9422 11.6776 11.2986 12.9994Z",fill:"white"}),g.createElementVNode("path",{d:"M4.7152 8.89735C4.7152 8.89735 10.9494 3.76802 16.8482 1.20335C15.0529 0.946887 11.3637 0.43395 9.3711 0.453678C4.41928 0.493135 1.06546 1.34145 1.06546 1.34145C0.90763 1.3809 0.769531 1.55846 0.769531 1.71629V8.12795C3.01857 6.56942 5.34651 5.56329 5.34651 5.56329C5.34651 5.56329 2.72264 7.06263 0.769531 8.81844V9.41028V14.1648C3.09748 13.9675 6.62886 12.7641 10.3575 10.7321C13.6719 8.91707 16.4733 6.84562 18.17 5.05035V2.40677C14.3032 3.37346 4.7152 8.89735 4.7152 8.89735Z",fill:"white"})])],-1)),P[5]||(P[5]=g.createElementVNode("div",{class:"separator"},null,-1)),g.createElementVNode("input",{value:a.page.title,type:"text",class:"page-title-input",onclick:"this.select()",onInput:h},null,40,qre)]),g.createElementVNode("div",Wre,[g.createElementVNode("div",Hre,[g.createElementVNode("div",Gre,[e.value.homeTeam.logo?(g.openBlock(),g.createElementBlock("div",Xre,[g.createElementVNode("img",{src:e.value.homeTeam.logo,alt:"Home Team Logo",width:"25",height:"25"},null,8,Kre)])):(g.openBlock(),g.createElementBlock("svg",Jre,P[6]||(P[6]=[g.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)]))),g.createElementVNode("span",null,g.toDisplayString(e.value.homeTeam.name),1)]),P[8]||(P[8]=g.createElementVNode("div",{class:"template-page__header__details__teams__vs"}," VS ",-1)),g.createElementVNode("div",$re,[g.createElementVNode("span",null,g.toDisplayString(e.value.awayTeam.name),1),e.value.awayTeam.logo?(g.openBlock(),g.createElementBlock("div",Zre,[g.createElementVNode("img",{src:e.value.awayTeam.logo,alt:"Away Team Logo",width:"25",height:"25"},null,8,Yre)])):(g.openBlock(),g.createElementBlock("svg",Qre,P[7]||(P[7]=[g.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])))])]),a.isTemplateMode?(g.openBlock(),g.createElementBlock("div",{key:0,class:"template-page__header__details__options",onClick:P[3]||(P[3]=S=>t.value=!0)},P[9]||(P[9]=[g.createElementVNode("svg",{width:"17",height:"13",viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M3.56953 6.28672C3.56953 7.19972 2.83253 7.93672 1.91953 7.93672C1.00653 7.93672 0.269531 7.19972 0.269531 6.28672C0.269531 5.37372 1.00653 4.63672 1.91953 4.63672C2.83253 4.63672 3.56953 5.37372 3.56953 6.28672ZM8.51953 4.63672C7.60653 4.63672 6.86953 5.37372 6.86953 6.28672C6.86953 7.19972 7.60653 7.93672 8.51953 7.93672C9.43253 7.93672 10.1695 7.19972 10.1695 6.28672C10.1695 5.37372 9.43253 4.63672 8.51953 4.63672ZM15.1195 4.63672C14.2065 4.63672 13.4695 5.37372 13.4695 6.28672C13.4695 7.19972 14.2065 7.93672 15.1195 7.93672C16.0325 7.93672 16.7695 7.19972 16.7695 6.28672C16.7695 5.37372 16.0325 4.63672 15.1195 4.63672Z",fill:"white"})],-1)]))):g.createCommentVNode("",!0)])]),g.createElementVNode("div",ene,[g.createElementVNode("div",{id:`grid-stack-${a.id}`,class:"grid-stack"},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(a.page.items,S=>{var L,C;return g.openBlock(),g.createElementBlock("div",{class:"grid-stack-item",key:S.id,"gs-id":S.id,"gs-x":S.x,"gs-y":S.y,"gs-w":S.w,"gs-h":S.h,"gs-max-w":S.maxWidth,"gs-max-h":S.maxHeight,"gs-min-w":S.minWidth,"gs-min-h":S.minHeight,"gs-no-resize":!a.isTemplateMode,"gs-no-move":!E.isTemplateMode,"gs-auto-position":S.x===0&&S.y===0,onMounted:()=>{S.componentName==="GSCMatchSummary"&&console.log("GSCMatchSummary component props:",S.componentProps)}},[g.createElementVNode("div",{class:g.normalizeClass(["grid-stack-item-content",{"is-selected":S.isSelected}])},[g.createVNode(Lre,{title:S.title,"is-template-mode":a.isTemplateMode,game:a.game,"is-home-team":(L=S.componentProps)!=null&&L.preMatchType?((C=S.componentProps)==null?void 0:C.preMatchType)===1:S.isHomeTeam,onEdit:_=>m(S),onDelete:_=>p(S)},{default:g.withCtx(()=>[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o(S.componentName)),g.mergeProps({ref_for:!0},S.componentProps,{key:`${S.id}-${S._updateKey||Date.now()}`}),null,16))]),_:2},1032,["title","is-template-mode","game","is-home-team","onEdit","onDelete"])],2)],40,rne)}),128))],8,tne)])],512))}}),ane=Ed(nne,[["__scopeId","data-v-7464d0c4"]]),ine={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},one={class:"cover__title-subtitle"},sne={class:"cover__title-subtitle__title"},lne={class:"cover__title-subtitle__subtitle"},cne={key:0,class:"cover-type-one"},une={class:"team-info-one"},dne={class:"team-data"},hne={key:0,class:"team-logo"},pne=["src"],fne={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mne=["fill","opacity"],gne={class:"team-name"},yne={key:0,class:"team-events"},vne={class:"score-one"},bne={key:0},xne={class:"team-info-one"},_ne={class:"team-data"},wne={key:0,class:"team-logo"},kne=["src"],Tne={key:1,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Sne=["fill","opacity"],Ane={class:"team-name"},Ene={key:0,class:"team-events"},Cne={key:1,class:"cover-type-two"},Mne={class:"team-data"},Pne={class:"team-info"},Lne={key:0,class:"team-logo"},zne=["src"],One={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Nne=["fill","opacity"],Rne={key:2,class:"team-score-two"},Dne={key:0,class:"team-goals"},Ine={class:"team-data"},Fne={class:"team-info"},Vne={key:0,class:"team-score-two"},Bne={key:1,class:"team-logo"},Une=["src"],jne={key:2,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qne=["fill","opacity"],Wne={key:0,class:"team-goals"},Hne={__name:"CoverPage",props:{game:{type:Object,default:()=>null},coverId:{type:Number,default:1},isPostMatch:{type:Boolean,default:!0}},emits:["intersection-changed"],setup(a,{emit:d}){const A=a,U=d,ae=g.ref(null),O=g.computed(()=>[1,2].includes(A.coverId)),E=g.computed(()=>[1,3].includes(A.coverId)),t=g.computed(()=>A.coverId===1?{homeTeam:"#1558CC",awayTeam:"#0046BF",opacity:1}:A.coverId===3?{homeTeam:"#000A1A",awayTeam:"#000A1A",opacity:.4}:{homeTeam:"#576883",awayTeam:"#576883",opacity:.4}),x=g.computed(()=>A.game&&A.game.score?A.game.score:["0","0"]),u=g.computed(()=>{var l,p,m,w,T,k,M,P;if(A.game&&A.game.homeTeam&&A.game.awayTeam){const S={homeTeam:{name:((l=A.game.homeTeam)==null?void 0:l.acronym)||"LOC",logo:((p=A.game.homeTeam)==null?void 0:p.logo)||null},awayTeam:{name:((m=A.game.awayTeam)==null?void 0:m.acronym)||"VIS",logo:((w=A.game.awayTeam)==null?void 0:w.logo)||null}};return O.value?(S.homeTeam.goalsMinutes=n(A.game.minutes.home_goals_minutes),S.homeTeam.totalYellowCards=((T=A.game.minutes.home_yellow_cards_minutes)==null?void 0:T.length)||0,S.homeTeam.totalRedCards=((k=A.game.minutes.home_red_cards_minutes)==null?void 0:k.length)||0,S.awayTeam.goalsMinutes=n(A.game.minutes.visiting_goals_minutes),S.awayTeam.totalYellowCards=((M=A.game.minutes.away_yellow_cards_minutes)==null?void 0:M.length)||0,S.awayTeam.totalRedCards=((P=A.game.minutes.away_red_cards_minutes)==null?void 0:P.length)||0):(S.homeTeam.goalsEvents=r(A.game.report_minutes.home_goals_minutes),S.awayTeam.goalsEvents=r(A.game.report_minutes.visiting_goals_minutes)),S}return{homeTeam:{name:"LOC",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]},awayTeam:{name:"VIS",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]}}}),e=g.computed(()=>({"--background-image":E.value?"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-01@2x.jpg)":"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-02@2x.jpg)","--grid-template-columns-type-one":A.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-one":A.isPostMatch?"100%":"fit-content","--grid-template-columns-type-two":A.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-two":A.isPostMatch?"100%":"fit-content"})),b=g.computed(()=>A.isPostMatch?"Postmatch":"Prematch"),f=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],v=g.computed(()=>{if(A.game){let l=ine[A.game.matchday_abbreviation];l||(l=A.game.matchday_abbreviation.replace("M","J"));const[p,m,w]=A.game.date.split("-");return`${l} - ${w} ${f[Number(m)-1]}, ${p}`}return"Jornada - Día 00 Mes"}),h=l=>{l.forEach(p=>{U("intersection-changed",p.isIntersecting)})};function r(l){return!l||!Array.isArray(l)||l.length===0?"":l.map(p=>{const m=p.split(", ");let w=m[0].replace("'","");w=w.replace("+",""),w=w.replace("’","");const T=w.split(" "),{strings:k,numbers:M}=T.reduce((L,C)=>(isNaN(Number(C))?L.strings.push(C):L.numbers.push(C),L),{strings:[],numbers:[]}),P=k.join(" "),S=M.length===1?`${M[0]}'`:`${M[0]}' ${M.slice(1).join(" + ")}'`;return{playerName:P,goalTime:m.length===1?S:`${S}, ${m.reduce((L,C,_)=>_===0?L:`${L}${_<m.length-1?", ":""}${C}`,"")}`}})}function n(l){return!l||!Array.isArray(l)||l.length===0?"":l.reduce((p,m,w)=>{const T=m.split(" ");let k="";return T.length===3?k=T[2]:T.length===5&&(k=`${T[2]} ${T[3]} ${T[4]}`),k&&(p+=`${k}${w<l.length-1?", ":""}`),p},"")}let c=null;function o(){const l={root:null,rootMargin:"0px",threshold:.7};c=new IntersectionObserver(h,l);const p=ae.value;p&&c.observe(p)}return g.onMounted(()=>{o()}),(l,p)=>(g.openBlock(),g.createElementBlock("div",{ref_key:"coverPage",ref:ae,class:"cover",style:g.normalizeStyle(e.value)},[g.createElementVNode("div",one,[g.createElementVNode("div",sne,[p[0]||(p[0]=g.createElementVNode("div",null,"Análisis",-1)),g.createElementVNode("div",null,g.toDisplayString(b.value),1)]),g.createElementVNode("div",lne,g.toDisplayString(v.value),1)]),O.value?(g.openBlock(),g.createElementBlock("div",cne,[g.createElementVNode("div",une,[g.createElementVNode("div",dne,[u.value.homeTeam.logo?(g.openBlock(),g.createElementBlock("div",hne,[g.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,pne)])):(g.openBlock(),g.createElementBlock("svg",fne,[g.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:t.value.homeTeam,opacity:t.value.opacity},null,8,mne)])),g.createElementVNode("div",gne,g.toDisplayString(u.value.homeTeam.name),1)]),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",yne,[p[1]||(p[1]=g.createStaticVNode('<svg class="ball" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-55e643d2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path></svg>',1)),g.createElementVNode("div",null,g.toDisplayString(u.value.homeTeam.goalsMinutes),1),p[2]||(p[2]=g.createElementVNode("div",{class:"separator"},null,-1)),p[3]||(p[3]=g.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),g.createElementVNode("div",null,g.toDisplayString(u.value.homeTeam.totalYellowCards),1),p[4]||(p[4]=g.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),g.createElementVNode("div",null,g.toDisplayString(u.value.homeTeam.totalRedCards),1)])):g.createCommentVNode("",!0)]),g.createElementVNode("div",vne,[a.isPostMatch?(g.openBlock(),g.createElementBlock("div",bne,g.toDisplayString(x.value[0])+" : "+g.toDisplayString(x.value[1]),1)):g.createCommentVNode("",!0)]),g.createElementVNode("div",xne,[g.createElementVNode("div",_ne,[u.value.awayTeam.logo?(g.openBlock(),g.createElementBlock("div",wne,[g.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,kne)])):(g.openBlock(),g.createElementBlock("svg",Tne,[g.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:t.value.awayTeam,opacity:t.value.opacity},null,8,Sne)])),g.createElementVNode("div",Ane,g.toDisplayString(u.value.awayTeam.name),1)]),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Ene,[g.createElementVNode("div",null,g.toDisplayString(u.value.awayTeam.totalYellowCards),1),p[5]||(p[5]=g.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),g.createElementVNode("div",null,g.toDisplayString(u.value.awayTeam.totalRedCards),1),p[6]||(p[6]=g.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),p[7]||(p[7]=g.createElementVNode("div",{class:"separator"},null,-1)),g.createElementVNode("div",null,g.toDisplayString(u.value.awayTeam.goalsMinutes),1),p[8]||(p[8]=g.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-55e643d2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path></svg>',1))])):g.createCommentVNode("",!0)])])):(g.openBlock(),g.createElementBlock("div",Cne,[g.createElementVNode("div",Mne,[g.createElementVNode("div",Pne,[u.value.homeTeam.logo?(g.openBlock(),g.createElementBlock("div",Lne,[g.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,zne)])):(g.openBlock(),g.createElementBlock("svg",One,[g.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:t.value.homeTeam,opacity:t.value.opacity},null,8,Nne)])),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Rne,g.toDisplayString(x.value[0]),1)):g.createCommentVNode("",!0)]),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Dne,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(u.value.homeTeam.goalsEvents,(m,w)=>(g.openBlock(),g.createElementBlock("div",{key:`goal-${w}`,class:"goal"},[g.createElementVNode("div",null,g.toDisplayString(m.playerName),1),p[9]||(p[9]=g.createElementVNode("div",{class:"bullet"},null,-1)),g.createElementVNode("div",null,g.toDisplayString(m.goalTime),1),p[10]||(p[10]=g.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-55e643d2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path></svg>',1))]))),128))])):g.createCommentVNode("",!0)]),p[13]||(p[13]=g.createElementVNode("div",{class:"separator"},null,-1)),g.createElementVNode("div",Ine,[g.createElementVNode("div",Fne,[a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Vne,g.toDisplayString(x.value[1]),1)):g.createCommentVNode("",!0),u.value.awayTeam.logo?(g.openBlock(),g.createElementBlock("div",Bne,[g.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,Une)])):(g.openBlock(),g.createElementBlock("svg",jne,[g.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:t.value.awayTeam,opacity:t.value.opacity},null,8,qne)]))]),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Wne,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(u.value.awayTeam.goalsEvents,(m,w)=>(g.openBlock(),g.createElementBlock("div",{key:`goal-a-${w}`,class:"goal"},[p[11]||(p[11]=g.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-55e643d2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path></svg>',1)),g.createElementVNode("div",null,g.toDisplayString(m.goalTime),1),p[12]||(p[12]=g.createElementVNode("div",{class:"bullet"},null,-1)),g.createElementVNode("div",null,g.toDisplayString(m.playerName),1)]))),128))])):g.createCommentVNode("",!0)])]))],4))}},Gne=Ed(Hne,[["__scopeId","data-v-55e643d2"]]),Xne={class:"floating-bar"},Kne={class:"tab active"},Jne={class:"select-display"},$ne={class:"select-icon"},Zne=["src"],Yne={key:1,src:"https://golstatsimages.blob.core.windows.net/images-library/vector2.png",alt:"icono",class:"option-img-default"},Qne={key:0,class:"select-placeholder select-label"},eae={key:1,class:"select-label"},tae={key:0,class:"dropdown-menu field-menu"},rae=["onClick"],nae={class:"option-icon"},aae=["src","data-hover-src"],iae={class:"option-content"},oae={class:"option-title"},sae={key:0,class:"option-description"},lae={class:"select-display"},cae={class:"select-icon"},uae=["src"],dae=["src"],hae={class:"select-label"},pae={key:0,class:"dropdown-menu type-menu type-menu-grid"},fae={class:"option-grid"},mae=["onClick"],gae={class:"option-grid-title"},yae={class:"option-grid-icon"},vae=["src"],bae={key:1,class:"filter-separator"},xae=["onClick"],_ae={class:"select-display"},wae={key:0,class:"badge-categorias"},kae={key:0,class:"dropdown-menu type-menu multi-select-menu"},Tae={class:"multi-select-scroll-area"},Sae={class:"select-all-checkbox"},Aae=["checked","indeterminate","onChange"],Eae={class:"option-checkbox"},Cae=["checked","onChange"],Mae=["onClick"],Pae={class:"option-title"},Lae={class:"multi-select-footer"},zae={key:1,class:"custom-radio-group filter-inline"},Oae={class:"radio-label"},Nae={class:"radio-options"},Rae=["name","value","onUpdate:modelValue","disabled"],Dae={key:2,class:"check-group filter-inline"},Iae=["onUpdate:modelValue","checked","onChange"],Fae={key:3,class:"filter-separator"},Vae=Object.assign({name:"FloatingFiltersBar"},{__name:"filters",props:{token:{type:String,required:!0},view:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!1}},emits:["filters-changed","close"],setup(a,{expose:d,emit:A}){const U=a,ae=A,O=g.ref([]);let E=null,t=null,x=null;const u=g.ref(!1),e=g.computed(()=>O.value),b=g.ref(null),f=g.computed(()=>e.value[b.value]||null),v=g.computed(()=>{var de;const fe=((de=f.value)==null?void 0:de.views)||[];return w(fe)}),h=g.ref(null),r=g.computed(()=>v.value.find(de=>de.id===h.value)||null),n=g.ref([]);g.watch(r,de=>{var fe,re;if(!de||!Array.isArray(de.filters)){n.value=[];return}n.value=de.filters.map((oe,le)=>{var me,be;if(oe.type==="select")return[];if(oe.type==="radio-button")return((be=(me=oe.options)==null?void 0:me[0])==null?void 0:be.value)??null;if(oe.type==="check"){if(u.value&&x&&x.dynamicFilters){const ge=x.dynamicFilters[le];if(ge&&ge.isChecked!==void 0)return console.log(`Using saved checkbox value for filter ${le}:`,ge.isChecked),ge.isChecked}return!1}return null}),(fe=de.name)!=null&&fe.toLowerCase().includes("tops players")||(re=de.title)!=null&&re.toLowerCase().includes("tops players")||g.nextTick(()=>{u.value&&he(),$()})},{immediate:!0}),g.watch(()=>E,de=>{de&&de.dynamicFilters&&(console.log("FilterAndViewsContainer changed, updating dynamicFilters:",de.dynamicFilters),Array.isArray(de.dynamicFilters)&&(n.value=[...de.dynamicFilters]))},{deep:!0}),g.watch(()=>E==null?void 0:E.dynamicFilters,de=>{de&&Array.isArray(de)&&(console.log("Container dynamicFilters changed, updating:",de),n.value=[...de])},{deep:!0});function c(de,fe){const re=n.value[de];return Array.isArray(re)&&re.includes(fe)}function o(de,fe){Array.isArray(n.value[de])||(n.value[de]=[]);const re=n.value[de],oe=re.indexOf(fe);oe>-1?re.splice(oe,1):re.push(fe),$()}function l(de){var fe,re;const oe=n.value[de],le=(re=(fe=r.value)==null?void 0:fe.filters)==null?void 0:re[de];return!le||!le.options||!Array.isArray(oe)?!1:oe.length===le.options.length}function p(de){var fe,re;const oe=n.value[de],le=(re=(fe=r.value)==null?void 0:fe.filters)==null?void 0:re[de];return!le||!le.options||!Array.isArray(oe)?!1:oe.length>0&&oe.length<le.options.length}function m(){var de;return!(((de=r.value)==null?void 0:de.id)===6&&U.isPostMatch)}function w(de){return!de||!Array.isArray(de)?de:de.filter(fe=>{const re=(fe.name||fe.title||"").toLowerCase();return U.isPostMatch?U.isPostMatch?!["fortalezas","tabla general"].some(oe=>re.includes(oe)):!0:!["resumen general","timeline","datos relevantes"].some(oe=>re.includes(oe))})}function T(){var de,fe;const re=((fe=(de=f.value)==null?void 0:de.name)==null?void 0:fe.toLowerCase())||"";return re.includes("cancha")||re.includes("volumétrica")||re.includes("volumetric")}function k(de,fe){if(!u.value||!T())return!1;const re=String(de||"").toLowerCase(),oe=String(fe||"").toLowerCase();return re.includes("ambos")||oe.includes("ambos")}function M(de){var fe,re;const oe=(re=(fe=r.value)==null?void 0:fe.filters)==null?void 0:re[de];if(!oe||!oe.options)return;const le=oe.options.map(me=>me.value);Array.isArray(n.value[de])||(n.value[de]=[]),l(de)?n.value[de]=[]:n.value[de]=[...le],C.value=de,$()}const P=g.ref("ambos"),S=g.ref(!1),L=g.ref(!1),C=g.ref(null);function _(de,fe=!1){const re="https://golstatsimages.blob.core.windows.net/images-library/",oe="https://golstatsimages.blob.core.windows.net/reports-images/",le={cancha:"icn_cancha",grafico:"icn_grafico",gráfico:"icn_grafico",chart:"icn_grafico",volumetrica:"icn_cancha",volumétrica:"icn_cancha",volumetric:"icn_cancha",tabla:"icn_tabla",tablas:"icn_tabla",Tablas:"icn_tabla"},me=Object.keys(le).find(be=>de==null?void 0:de.toLowerCase().includes(be.toLowerCase()));if(me){const be=le[me],ge=fe?"":"-def";return me.toLowerCase().includes("tabla")?`${oe}${be}${ge}@2x.png`:`${re}${be}${ge}@2x.png`}return`${re}icn_default${fe?"":"-def"}.png`}function z(){return f.value?f.value.name:"Tipo de vista"}function y(){return r.value?r.value.name||r.value.title:"Visualización"}function N(){u.value||(S.value=!S.value,S.value&&(L.value=!1,g.nextTick(()=>{Z()})))}function I(){u.value||f.value&&(L.value=!L.value,L.value&&(S.value=!1))}function V(de){u.value||(b.value=de,S.value=!1,h.value=null,$())}function j(de){var fe,re;u.value||(h.value=de.id,L.value=!1,(fe=de.name)!=null&&fe.toLowerCase().includes("tops players")||(re=de.title)==null||re.toLowerCase().includes("tops players"))}function W(de){C.value=C.value===de?null:de}function q(de){de.target.closest(".custom-select")||(S.value=!1,L.value=!1)}function $(){var de,fe,re,oe,le,me,be,ge,_e,Ae,Ce,Me,ze,Ne,We,Pe,Be;console.log("emitChange called"),console.log("isEditMode.value:",u.value),console.log("viewToEdit:",t),console.log("dynamicFilters.value:",n.value);let Le=[],ve=[];r.value&&Array.isArray(r.value.filters)&&r.value.filters.forEach((Re,je)=>{if(Re.type==="select"&&Re.label==="Tipo de análisis"&&Re.id===2){const Ge=n.value[je]||[];Array.isArray(Ge)&&Ge.length>0&&(Le=Ge.map(Ze=>{var we;const Ie=(we=Re.options)==null?void 0:we.find(Fe=>Fe.value===Ze);return{value:Ze,label:(Ie==null?void 0:Ie.label)||Ze}}))}});const Ee=((fe=(de=r.value)==null?void 0:de.name)==null?void 0:fe.toLowerCase().includes("tops players"))||((oe=(re=r.value)==null?void 0:re.title)==null?void 0:oe.toLowerCase().includes("tops players")),Te=r.value&&Array.isArray(r.value.filters)?r.value.filters.some(Re=>Re.type==="select"&&Re.label==="Tipo de análisis"&&Re.id===2):!1;if(Ee&&Te&&Le.length===0||Te&&Le.length===0)return;ve=((me=(le=r.value)==null?void 0:le.filters)==null?void 0:me.map((Re,je)=>{var Ge,Ze;const we=n.value[je];return{filterId:Re.id||`filter_${je}`,filterType:Re.type,filterLabel:Re.label,filterIcon:Re.icon||null,selectedValue:we,selectedOptions:Re.type==="select"&&Array.isArray(we)&&we.length>0?we.map(Ie=>{var Fe;const He=(Fe=Re.options)==null?void 0:Fe.find(et=>et.value===Ie);return{value:Ie,label:(He==null?void 0:He.label)||Ie,icon:(He==null?void 0:He.icon)||null}}):null,selectedOption:Re.type==="radio-button"&&we?{value:we,label:((Ze=(Ge=Re.options)==null?void 0:Ge.find(Ie=>Ie.value===we))==null?void 0:Ze.label)||we}:null,isChecked:Re.type==="check"?we:null}}))||[];const qe={mainSelector:{id:((be=f.value)==null?void 0:be.id)||null,name:((ge=f.value)==null?void 0:ge.name)||null,url:((_e=f.value)==null?void 0:_e.url)||null},viewSelector:{id:((Ae=r.value)==null?void 0:Ae.id)||null,name:((Ce=r.value)==null?void 0:Ce.name)||((Me=r.value)==null?void 0:Me.title)||null,url:((ze=r.value)==null?void 0:ze.url)||null},team:P.value,dynamicFilters:ve,categoriasSeleccionadas:Le,timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!r.value,totalDynamicFilters:((We=(Ne=r.value)==null?void 0:Ne.filters)==null?void 0:We.length)||0,activeFilters:((Be=(Pe=r.value)==null?void 0:Pe.filters)==null?void 0:Be.filter((Re,je)=>{const Ge=n.value[je];return Array.isArray(Ge)?Ge.length>0:Ge!=null&&Ge!==!1}).length)||0}};ae("filters-changed",{main:f.value,view:r.value,team:P.value,dynamicFilters:n.value,filtersJSON:qe,filterAndViewsContainer:E,viewToEdit:t}),u.value&&t&&(x=qe,console.log("Updated editFiltersJSON:",x)),E&&(E.setDynamicFilters(n.value),console.log("Updated container with new dynamicFilters:",n.value))}function te(){t=null,x=null,E=null,b.value=null,h.value=null,P.value="ambos",n.value=[],S.value=!1,L.value=!1,C.value=null,u.value=!1}function X(de){de&&de.dynamicFilters&&(console.log("Updating filters from container:",de.dynamicFilters),Array.isArray(de.dynamicFilters)&&de.dynamicFilters.length>0&&(n.value=[...de.dynamicFilters]))}function ne(de){if(console.log("preselectFiltersFromJSON called with:",de),u.value=!0,de.mainSelector&&de.mainSelector.id){const fe=O.value.findIndex(re=>re.id===de.mainSelector.id);fe!==-1&&(b.value=fe,console.log("Selected main index:",fe))}de.viewSelector&&de.viewSelector.id&&f.value&&f.value.views.findIndex(fe=>fe.id===de.viewSelector.id)!==-1&&(h.value=de.viewSelector.id,console.log("Selected second id:",de.viewSelector.id)),de.dynamicFilters&&Array.isArray(de.dynamicFilters)?(console.log("Processing dynamic filters:",de.dynamicFilters),g.nextTick(()=>{setTimeout(()=>{console.log("Processing filters after delay"),console.log("selectedSecond.value:",r.value),r.value&&r.value.filters?(console.log("Filters available:",r.value.filters),de.dynamicFilters.forEach((fe,re)=>{if(console.log(`Processing filter data ${re}:`,fe),re<r.value.filters.length){const oe=r.value.filters[re];if(console.log(`Filter ${re}:`,oe),oe.type==="check"){const le=fe.isChecked;console.log(`Setting check filter ${re} to:`,le),typeof le=="boolean"?(n.value[re]=le,console.log(`Successfully set check filter ${re} to:`,le)):console.log(`Invalid isChecked value for filter ${re}:`,le)}else if(oe.type==="select"&&fe.selectedOptions){const le=fe.selectedOptions.map(me=>me.value);console.log(`Setting select filter ${re} to:`,le),n.value[re]=le}else oe.type==="radio-button"&&fe.selectedOption&&(console.log(`Setting radio filter ${re} to:`,fe.selectedOption.value),n.value[re]=fe.selectedOption.value)}else console.log(`Filter index ${re} out of range`)}),console.log("Final dynamicFilters.value:",n.value),E&&(E.setDynamicFilters(n.value),console.log("Updated container with new dynamicFilters:",n.value)),setTimeout(()=>{console.log("Emitting change after preselecting filters"),$()},500)):console.log("selectedSecond or filters not available")},300)})):console.log("No dynamicFilters found in filtersJSON")}function ee(){var de,fe,re,oe,le,me,be,ge,_e,Ae,Ce,Me,ze;return{mainSelector:{id:((de=f.value)==null?void 0:de.id)||null,name:((fe=f.value)==null?void 0:fe.name)||null,url:((re=f.value)==null?void 0:re.url)||null},viewSelector:{id:((oe=r.value)==null?void 0:oe.id)||null,name:((le=r.value)==null?void 0:le.name)||((me=r.value)==null?void 0:me.title)||null,url:((be=r.value)==null?void 0:be.url)||null},team:P.value,dynamicFilters:((_e=(ge=r.value)==null?void 0:ge.filters)==null?void 0:_e.map((Ne,We)=>{var Pe,Be;const Le=n.value[We];return{filterId:Ne.id||`filter_${We}`,filterType:Ne.type,filterLabel:Ne.label,filterIcon:Ne.icon||null,selectedValue:Le,selectedOptions:Ne.type==="select"&&Array.isArray(Le)&&Le.length>0?Le.map(ve=>{var Ee;const Te=(Ee=Ne.options)==null?void 0:Ee.find(qe=>qe.value===ve);return{value:ve,label:(Te==null?void 0:Te.label)||ve,icon:(Te==null?void 0:Te.icon)||null}}):null,selectedOption:Ne.type==="radio-button"&&Le?{value:Le,label:((Be=(Pe=Ne.options)==null?void 0:Pe.find(ve=>ve.value===Le))==null?void 0:Be.label)||Le}:null,isChecked:Ne.type==="check"?Le:null}}))||[],timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!r.value,totalDynamicFilters:((Ce=(Ae=r.value)==null?void 0:Ae.filters)==null?void 0:Ce.length)||0,activeFilters:((ze=(Me=r.value)==null?void 0:Me.filters)==null?void 0:ze.filter((Ne,We)=>{const Pe=n.value[We];return Array.isArray(Pe)?Pe.length>0:Pe!=null&&Pe!==!1}).length)||0}}}d({getCurrentFiltersJSON:ee});function J(){te(),ae("close")}g.onMounted(async()=>{document.addEventListener("click",q),g.nextTick(()=>{Z()});try{const de=await(await fetch("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/views",{headers:{Authorization:`${U.token}`}})).json();O.value=de.data||[]}catch(de){console.error("Error al obtener datos:",de)}});function Z(){document.querySelectorAll(".field-menu .option-card").forEach(de=>{const fe=de.querySelector(".option-img");if(!fe||!fe.dataset.hoverSrc)return;const re=fe.src,oe=fe.dataset.hoverSrc;de.addEventListener("mouseenter",()=>{fe.src=oe}),de.addEventListener("mouseleave",()=>{fe.src=re})})}g.onUnmounted(()=>{document.removeEventListener("click",q)}),Qo.on("set-filter-and-views-container",de=>{E=de,de&&X(de)}),Qo.on("component-added-to-container",de=>{console.log("Component added to container, updating filters, container:",de),X(de)}),Qo.on("edit-view",de=>{var fe,re,oe,le,me,be,ge;console.log("edit-view received:",de),t=de,E=((fe=de.view)==null?void 0:fe.filterAndViewsContainer)||null,x=null;const _e=[(oe=(re=de.view)==null?void 0:re.coreView)==null?void 0:oe.filtersJSON,(le=de.view)==null?void 0:le.filtersJSON,(me=de.coreView)==null?void 0:me.filtersJSON,de.filtersJSON,(ge=(be=de.view)==null?void 0:be.componentProps)==null?void 0:ge.filtersJSON];for(const Ae of _e)if(Ae){x=Ae,console.log("Found editFiltersJSON in:",Ae);break}console.log("Final editFiltersJSON:",x),x?(ne(x),setTimeout(()=>{he()},600)):console.log("No editFiltersJSON found, cannot preselect filters")});function ce(){C.value=null}function he(){u.value&&x&&x.dynamicFilters&&(console.log("Forcing checkbox update from editFiltersJSON"),x.dynamicFilters.forEach((de,fe)=>{var re,oe,le;de&&de.isChecked!==void 0&&((le=(oe=(re=r.value)==null?void 0:re.filters)==null?void 0:oe[fe])==null?void 0:le.type)==="check"&&(console.log(`Forcing checkbox ${fe} to:`,de.isChecked),n.value[fe]=de.isChecked)}))}return(de,fe)=>(g.openBlock(),g.createElementBlock("div",Xne,[g.createElementVNode("button",Kne,g.toDisplayString(u.value?"Editando visualización":"Nueva visualización"),1),g.createElementVNode("div",{class:g.normalizeClass(["custom-select main-select",{disabled:u.value}]),onClick:N},[g.createElementVNode("div",Jne,[g.createElementVNode("span",$ne,[f.value?(g.openBlock(),g.createElementBlock("img",{key:0,src:_(f.value.name,!1),alt:"icono",class:"option-img"},null,8,Zne)):(g.openBlock(),g.createElementBlock("img",Yne))]),f.value?(g.openBlock(),g.createElementBlock("span",eae,g.toDisplayString(z()),1)):(g.openBlock(),g.createElementBlock("span",Qne,"Tipo de vista")),g.createElementVNode("span",{class:g.normalizeClass(["arrow",{open:S.value}])},fe[4]||(fe[4]=[g.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[g.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)]),S.value?(g.openBlock(),g.createElementBlock("div",tae,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.value,(re,oe)=>(g.openBlock(),g.createElementBlock("div",{key:re.id,class:g.normalizeClass(["option-card",{active:b.value===oe}]),onClick:g.withModifiers(le=>V(oe),["stop"])},[g.createElementVNode("div",nae,[g.createElementVNode("img",{src:_(re.name,!1),"data-hover-src":_(re.name,!0),alt:"icono",class:"option-img-34"},null,8,aae)]),g.createElementVNode("div",iae,[g.createElementVNode("div",oae,g.toDisplayString(re.name),1),re.description?(g.openBlock(),g.createElementBlock("div",sae,g.toDisplayString(re.description),1)):g.createCommentVNode("",!0)])],10,rae))),128))])):g.createCommentVNode("",!0)],2),f.value?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["custom-select second-select",{disabled:u.value}]),onClick:I},[g.createElementVNode("div",lae,[g.createElementVNode("span",cae,[r.value?(g.openBlock(),g.createElementBlock("img",{key:0,src:r.value.url,alt:"icono",class:"option-img-graph2"},null,8,uae)):f.value?(g.openBlock(),g.createElementBlock("img",{key:1,src:_(f.value.name,!1),alt:"icono",class:"option-img"},null,8,dae)):g.createCommentVNode("",!0)]),g.createElementVNode("span",hae,g.toDisplayString(y()),1),g.createElementVNode("span",{class:g.normalizeClass(["arrow",{open:L.value}])},fe[5]||(fe[5]=[g.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[g.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)]),L.value&&f.value?(g.openBlock(),g.createElementBlock("div",pae,[g.createElementVNode("div",fae,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(v.value,re=>(g.openBlock(),g.createElementBlock("div",{key:re.id,class:g.normalizeClass(["option-card-grid",{active:h.value===re.id}]),onClick:g.withModifiers(oe=>j(re),["stop"])},[g.createElementVNode("div",gae,g.toDisplayString(re.name||re.title),1),g.createElementVNode("div",yae,[g.createElementVNode("img",{src:re.url,alt:"icono",class:"option-img-grid"},null,8,vae)])],10,mae))),128))])])):g.createCommentVNode("",!0)],2)):g.createCommentVNode("",!0),r.value?(g.openBlock(),g.createElementBlock("div",bae)):g.createCommentVNode("",!0),r.value&&r.value.filters&&m()?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":r.value.filters.length>=2}])},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(r.value.filters,(re,oe)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:oe},[re.type==="select"?(g.openBlock(),g.createElementBlock("div",{key:0,class:"custom-select dynamic-select filter-inline",onClick:g.withModifiers(le=>W(oe),["stop"])},[g.createElementVNode("div",_ae,[fe[7]||(fe[7]=g.createElementVNode("span",{class:"select-icon select-analisis-icon"},[g.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),fe[8]||(fe[8]=g.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),Array.isArray(n.value[oe])&&n.value[oe].length>0?(g.openBlock(),g.createElementBlock("span",wae,g.toDisplayString(n.value[oe].length),1)):g.createCommentVNode("",!0),g.createElementVNode("span",{class:g.normalizeClass(["arrow",{open:C.value===oe}])},fe[6]||(fe[6]=[g.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[g.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)]),C.value===oe?(g.openBlock(),g.createElementBlock("div",kae,[g.createElementVNode("div",Tae,[g.createElementVNode("div",{class:"multi-select-header",onClick:fe[1]||(fe[1]=g.withModifiers(()=>{},["stop"]))},[g.createElementVNode("label",Sae,[g.createElementVNode("input",{type:"checkbox",checked:l(oe),indeterminate:p(oe),onChange:g.withModifiers(le=>M(oe),["stop"]),onClick:fe[0]||(fe[0]=g.withModifiers(()=>{},["stop"]))},null,40,Aae),fe[9]||(fe[9]=g.createElementVNode("span",{class:"select-all-label"},"Agregar todas",-1))])]),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(re.options,le=>(g.openBlock(),g.createElementBlock("div",{key:le.value,class:g.normalizeClass(["option-card multi-select-option",{active:c(oe,le.value)}]),onClick:fe[2]||(fe[2]=g.withModifiers(()=>{},["stop"]))},[g.createElementVNode("div",Eae,[g.createElementVNode("input",{type:"checkbox",checked:c(oe,le.value),onChange:g.withModifiers(me=>o(oe,le.value),["stop"])},null,40,Cae)]),g.createElementVNode("div",{class:"option-content",onClick:me=>o(oe,le.value)},[g.createElementVNode("div",Pae,g.toDisplayString(le.label),1)],8,Mae)],2))),128))]),g.createElementVNode("div",Lae,[g.createElementVNode("button",{class:"btn-listo",onClick:fe[3]||(fe[3]=g.withModifiers(le=>ce(),["stop"]))},"Listo")])])):g.createCommentVNode("",!0)],8,xae)):re.type==="radio-button"?(g.openBlock(),g.createElementBlock("div",zae,[g.createElementVNode("div",Oae,g.toDisplayString(re.label),1),g.createElementVNode("div",Nae,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(re.options,le=>(g.openBlock(),g.createElementBlock("label",{key:le.value,class:g.normalizeClass(["radio-option-card",{active:n.value[oe]===le.value}])},[g.withDirectives(g.createElementVNode("input",{type:"radio",name:"dynamic-radio-"+oe,value:le.value,"onUpdate:modelValue":me=>n.value[oe]=me,disabled:k(le.value,le.label),onChange:$},null,40,Rae),[[g.vModelRadio,n.value[oe]]]),g.createElementVNode("span",null,g.toDisplayString(le.label),1)],2))),128))])])):re.type==="check"?(g.openBlock(),g.createElementBlock("div",Dae,[g.createElementVNode("label",null,[g.withDirectives(g.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":le=>n.value[oe]=le,checked:n.value[oe],onChange:()=>{console.log(`Checkbox ${oe} changed to:`,n.value[oe]),$()}},null,40,Iae),[[g.vModelCheckbox,n.value[oe]]]),g.createTextVNode(" "+g.toDisplayString(re.label),1)])])):g.createCommentVNode("",!0),oe===1&&r.value.filters.length>2?(g.openBlock(),g.createElementBlock("div",Fae)):g.createCommentVNode("",!0)],64))),128))],2)):g.createCommentVNode("",!0),g.createElementVNode("button",{class:"close-btn",onClick:J},"✕")]))}}),Bae=Ed(Vae,[["__scopeId","data-v-90f99e05"]]),Uae={key:0,class:"modal-simple"},jae={class:"modal-simple__content"},qae={class:"modal-simple__content__header"},Wae={class:"modal-simple__content__body"},Hae={class:"modal-simple__content__footer"},Gae={__name:"ModalSimple",props:{modelValue:{type:Boolean,default:!1}},setup(a){return(d,A)=>(g.openBlock(),g.createBlock(g.Teleport,{to:"body"},[a.modelValue?(g.openBlock(),g.createElementBlock("div",Uae,[g.createElementVNode("div",jae,[g.createElementVNode("div",qae,[g.renderSlot(d.$slots,"header",{},void 0,!0)]),g.createElementVNode("div",Wae,[g.renderSlot(d.$slots,"body",{},void 0,!0)]),g.createElementVNode("div",Hae,[g.renderSlot(d.$slots,"footer",{},void 0,!0)])])])):g.createCommentVNode("",!0)]))}},Xae=Ed(Gae,[["__scopeId","data-v-1cc4f590"]]),Kae={class:"footer"},Jae={__name:"ModalCautionClose",props:{value:{type:Boolean,default:!1}},emits:["update:modelValue","action"],setup(a,{emit:d}){const A=d;function U(O){A("update:modelValue",O)}function ae(O){A("action",O),A("update:modelValue",!1)}return(O,E)=>(g.openBlock(),g.createBlock(Xae,{"modle-value":a.value,"onUpdate:modelValue":U},{header:g.withCtx(()=>E[2]||(E[2]=[g.createElementVNode("div",{class:"header"},"Descartar template",-1)])),body:g.withCtx(()=>E[3]||(E[3]=[g.createElementVNode("div",{class:"body"},"¿Estás seguro que deseas abandonar el proceso?",-1)])),footer:g.withCtx(()=>[g.createElementVNode("div",Kae,[g.createElementVNode("div",{role:"button",class:"btn btn-cancel",onClick:E[0]||(E[0]=t=>ae(!1))}," Seguir editando "),g.createElementVNode("div",{role:"button",class:"btn btn-confirm",onClick:E[1]||(E[1]=t=>ae(!0))}," Descartar ")])]),_:1},8,["modle-value"]))}},$ae=Ed(Jae,[["__scopeId","data-v-ed9b5088"]]),Zae={class:"template-maker__header"},Yae={class:"template-maker__content"},Qae={class:"template-maker__content__main"},eie={id:"containerMain",class:"container-main"},tie={class:"template-maker__content__main__cover-selector"},rie=["id"],nie={class:"page-indicator"},aie={class:"page-indicator__index"},iie=["onClick"],oie=["onClick"],sie={key:0,class:"template-maker__content__main__footer"},lie={class:"template-maker__content__main__footer__paginator"},cie={class:"template-maker__content__main__footer__paginator__nav"},uie={class:"template-maker__content__main__footer__paginator__numbers"},die=["onClick"],hie={__name:"GSC-TemplateReportMaker",props:{token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},setup(a,{expose:d}){const A=new Map,U=g.ref([{title:"Page 1",id:String(Date.now()),items:[{name:"Volumetrica",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:6,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}},{name:"Volumetrica",id:String(Date.now()),x:4,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]}]),ae=g.ref(null),O=g.ref(0),E=g.ref(!1),t=g.ref(null),x=g.ref(null),u=g.ref(!0),e=g.ref(!1),b=g.ref(!1),f=g.ref(0),v=g.ref(!1),h=g.ref(null);g.ref(null);const r=g.ref(new Map),n=g.ref(null),c=g.ref(null),o=g.ref(!1),l=g.ref(!1);g.ref({updated_at:"2025-07-11T21:37:27.950Z",main_team:1,visible:!0,user_id:24254,created_at:"2025-07-11T21:35:44.847Z",report_name:"reporte modificado",team_id:1,id:"1adc5b32-24ae-4a26-8304-0369a7308f3f",game:{date:"2025-01-11",visiting_team_goals:12,home_team_name:"Guadalajara",visiting_team_xg:12.614200000000002,has_tracking:1,penalties_score_home_team:0,has_video:1,game_status:1,score:[1,0],date_time_utc:"2025-01-12T01:05:00Z",referee_id:391,video_types:[[1,2],[2,2],[3,2]],live_stats:1,home_team_goals:24,matchday_name:"Matchday 1",draw_probability:18,home_team_probability:72,matchday_abbreviation:"M1",game_id:88138,time_active:{home_te:"32:22",home_ti:"21:11",xta:"00:00",home_ta_average:"00:00",total_ti:"46:02",visiting_te:"21:14",visiting_ta_average:"00:00",total_te:"53:36",visiting_ti:"23:43",referee_ta_average:"-",others:"01:09"},matchday_id:1,minutes:{home_yellow_cards_minutes:["J. Rangel 32'"],away_yellow_cards_minutes:["A. Lozano 81'"],home_goals_minutes:["R. Alvarado 75'"],home_red_cards_minutes:[],away_red_cards_minutes:["A. Lozano 89'"],visiting_goals_minutes:[]},alt_minutes:{home_yellow_cards_minutes:["32'"],away_yellow_cards_minutes:["81'"],home_goals_minutes:["75'"],home_red_cards_minutes:[],away_red_cards_minutes:["89'"],visiting_goals_minutes:[]},tv_stations:[],season_id:1933,home_team_xg:24.784200000000002,visiting_team_name:"Santos Laguna",schedule:"19:05:00",visiting_team_acronym:"SAN",home_team_acronym:"CHI",referee_name:"Quintero Huitron, Daniel",is_live:0,home_games_played:0,visiting_team:14,penalties_score_visiting_team:0,home_team:1,away_games_played:0,visiting_team_probability:10},name:"VALOR 45",template_type:2,pages:[{is_front_page:!0,type:1,template_type:2},{components:[{min_row:1,min_column:1,column:1,max_row:4,filters:[{options:[{value:1,label:"Mi equipo"},{value:2,label:"Rival"},{value:3,label:"Ambos"}],type:"radio-button"}],title:"Hacia donde fueron los pases",url:"https://example.com/grafico.png",colspan:3,rowspan:2,name:"Volumétrica",show_extra_teams_logos:!0,id:5,row:1,allowed_templates_types:[1,2],max_column:4},{min_row:1,min_column:1,column:1,max_row:4,filters:[{options:[{value:1,label:"Ultimo juego"},{value:2,label:"2"},{value:3,label:"3"}],type:"radio-button",label:"Juegos"}],title:"Alineaciones iniciales",url:"https://example.com/grafico.png",colspan:3,rowspan:2,name:"Alineaciones iniciales",show_extra_teams_logos:!0,id:6,row:1,allowed_templates_types:[1,2],max_column:4},{min_row:1,min_column:1,column:1,max_row:4,filters:[{options:[{value:!0,label:"Si"},{value:!1,label:"No"}],type:"radio-button",label:"Ver tiempo inactivo"}],title:"Posesión de balón",url:"https://example.com/grafico.png",colspan:3,rowspan:2,name:"Posesión de balón",show_extra_teams_logos:!1,id:8,row:1,allowed_templates_types:[1,2],max_column:4}],columns:12,gap:10,name:"Pag 01",width:968,rows:12,height:702}]});const p=g.computed(()=>({"--overflow-y-template-maker":e.value?"scroll":"hidden","--height-container-main":e.value?"fit-content":"calc(100vh - 64px)","--margin-bottom-container-main":(e.value,"0")}));g.watch(()=>E.value,re=>{const oe=document.getElementById("app");re?(O.value=0,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",oe&&(oe.style.overflow="hidden")):(document.body.style.overflow="",document.documentElement.style.overflow="",oe&&(oe.style.overflow=""))});function m(re){return re<10?`0${re}`:re}async function w({templateId:re,userId:oe}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${oe}/templates/${re}`,{method:"GET",headers:{Authorization:W.token}})).json()).data}catch(le){console.error("Error fetching template by ID:",le)}}async function T({reportId:re,userId:oe}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${oe}/reports/${re}`,{method:"GET",headers:{Authorization:W.token}})).json()).data}catch(le){console.error("Error fetching report by ID:",le)}}let k=0;function M(re){ae.value=re,k>0&&(o.value=!0),k++}function P(re){re&&$(null,!0)}let S=null;function L(re,oe){let le=re.getBoundingClientRect(),me={height:re.clientHeight,width:re.clientWidth},be=oe.getBoundingClientRect();if(!(be.top>=le.top&&be.bottom<=le.top+me.height)){const ge=be.top-le.top,_e=be.bottom-le.bottom;Math.abs(ge)<Math.abs(_e)?re.scrollTop+=ge:re.scrollTop+=_e}}function C(re,oe=!1){const le={title:`Page ${U.value.length+1}`,id:`p-${Date.now()}`,items:[]};if(Z(),re!==void 0&&re>=-1?U.value.splice(re+1,0,le):U.value.push(le),g.nextTick(()=>{const me=U.value.findIndex(ge=>ge.id===le.id),be=document.getElementById(`page-${me+1}`);S||(S=document.getElementById("containerMain")),be&&S?L(S,be):console.error("Page element or container main element not found")}),oe)return le;o.value=!0}function _(re){if(re<-1||re>=U.value.length+1)return;const oe=document.getElementById(`page-${re}`);S||(S=document.getElementById("containerMain")),oe&&S&&L(S,oe)}function z(re){n.value=re,v.value=!0}function y(re,oe){re&&(O.value=oe+1)}function N(re){v.value=!0,Qo.emit("edit-view",{view:re})}async function I({templateReportId:re,userId:oe,isTemplateMode:le}){try{return le?w({templateId:re,userId:oe}):T({reportId:re,userId:oe})}catch(me){throw new Error("Error fetching template or report by ID: "+me.message)}}async function V(re){if(k=0,r.value.clear(),u.value=re.isTemplateMode,e.value=!!re.isPDFMode,re.isPDFMode?t.value=await T({reportId:re.reportId,userId:re.userId}):(t.value=re.template,t.value=await I({templateReportId:re.template.id,userId:re.template.user_id,isTemplateMode:re.isTemplateMode})),!t.value)return;t.value&&t.value.game&&(t.value.game=q(t.value.game)),x.value=JSON.parse(JSON.stringify(t.value)),b.value=t.value.template_type===2;const oe=t.value.pages.find(le=>le.is_front_page);f.value=oe?oe.type:1,E.value=!0,U.value=t.value.pages.reduce((le,me,be)=>{if(!me.is_front_page){me.name||(me.name="");const ge={originalPage:JSON.parse(JSON.stringify(me)),title:me.name,id:`p-${Date.now()-be*9}`,items:[],components:me.components};me.components&&me.components.length>0&&(ge.items=me.components.map((_e,Ae)=>{const Ce=new Tg(`FAWC-${Date.now()}`,[],_e.coreView.id,_e.dynamicFilters,b.value,u.value),Me={originalComponent:JSON.parse(JSON.stringify(_e)),title:_e.title,game:t.value.game,idAux:_e.id,id:`w-${Date.now()-Ae*7}`,x:_e.column,y:_e.row,w:_e.colspan,h:_e.rowspan,maxWidth:_e.max_column,maxHeight:_e.max_row,minWidth:_e.min_column,minHeight:_e.min_row,noResize:!u.value,noMove:!u.value,coreView:_e.coreView||null,isTemplateMode:u.value,componentName:_e.componentName,componentProps:j({currentProps:_e.componentProps,coreView:_e.coreView,isTemplateMode:u.value,game:t.value.game||null})||{},filtersJSON:_e.filtersJSON||null,dynamicFilters:_e.dynamicFilters||[]},ze=g.reactive({view:Me});return Ce.addView(ze,!0),r.value.set(Ce.getId(),Ce),Me})),le.push(ge)}return le},[])}function j({currentProps:re,coreView:oe,isTemplateMode:le,game:me}){if(!re||!oe)return re||{};const be={...re};return oe.id===5&&(be.isGhostEffect=le),me&&(be.game=me),be}const W=a;d({show:V}),Qo.on("add-page-view",re=>{A.set(re.view.id,re.view);const oe=U.value.find(le=>le.id===re.pageId);oe&&(oe.items||(oe.items=[]),oe.items.push(re.view),g.nextTick(()=>{const le=document.querySelector(`[gs-id="${re.view.id}"]`);re.grid.makeWidget(le)}))}),Qo.on("add-page-and-view",re=>{const oe=U.value.findIndex(le=>le.id===re.pageId);if(oe>-1){const le=C(oe,!0);setTimeout(()=>{Qo.emit("add-view",{pageId:le.id,view:re.view,filterAndWidgetContainer:re.filterAndWidgetContainer}),c.value=le},500)}else console.error("Page not found for adding view:",re.pageId)}),Qo.on("empty-page",re=>{ce(re),c.value&&c.value.id===re.id&&(c.value=null)});function q(re){return{...re,gameId:re.game_id,id:re.game_id,seasonId:re.season_id,status:re.game_status,homeTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${re.home_team}.png`,team_id:re.home_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${re.home_team}.png`,colloquial_name:re.home_team_name,acronym:re.home_team_acronym,team_name:re.home_team_name},awayTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${re.visiting_team}.png`,team_id:re.visiting_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${re.visiting_team}.png`,colloquial_name:re.visiting_team_name,acronym:re.visiting_team_acronym,team_name:re.visiting_team_name}}}function $(re,oe=!1){oe||!u.value?E.value=!1:o.value?l.value=!0:E.value=!1}function te(){h.value=null,v.value=!1}function X({page:re,view:oe,applyMinimumSize:le=!1}){const me=re.grid;if(!re||!oe||!me)return null;const be=le?{w:oe.min_column,h:oe.min_row}:{w:oe.colspan,h:oe.rowspan},ge=me.willItFit(0,0,be.w,be.h,!0);return ge?{willFit:ge,applyMinimumSize:le}:le?null:X({page:re,view:oe,applyMinimumSize:!0})}const ne=new Set([9]);function ee(re,oe=!1){var le;if(console.log("onFiltersChanged",re),re.viewToEdit){if(console.log("Processing viewToEdit:",re.viewToEdit),console.log("filters.dynamicFilters:",re.dynamicFilters),console.log("filters.filtersJSON:",re.filtersJSON),!re.viewToEdit.view.filterAndViewsContainer){const me=new Tg(`FAWC-${Date.now()}-${Math.random()}`,[],((le=re.viewToEdit.view.coreView)==null?void 0:le.id)||re.viewToEdit.view.id,re.dynamicFilters||[],b.value,u.value,re.filtersJSON);re.viewToEdit.view.filterAndViewsContainer=me}re.viewToEdit.view.filterAndViewsContainer.updateView({view:re.viewToEdit,dynamicFilters:re.dynamicFilters||[],filtersJSON:re.filtersJSON||null}),o.value=!0}else if(re.view){re.view.id&&ne.has(re.view.id)&&re.dynamicFilters[0]&&re.dynamicFilters[0].length===0&&re.filterAndViewsContainer&&(re.filterAndViewsContainer.updateDynamicFilters(re.dynamicFilters,re),o.value=!0);const me=c.value||n.value,be=X({page:me,view:re.view,applyMinimumSize:!1});re.view.filtersJSON=re.filtersJSON||null;const ge=re.filterAndViewsContainer,_e=U.value.findIndex(Ae=>Ae.id===me.id);if(console.log("filterAndViewsContainerAux",ge),ge){const Ae=re.filterAndViewsContainer.getRequiresAddView(re.dynamicFilters);console.log("requiresAddView",Ae),Ae?(be||_e===U.value.length-1)&&(Qo.emit("add-view",{pageId:me.id,view:re.view,filterAndWidgetContainer:ge,avoidWillFit:!1,applyMinimumSize:be?be.applyMinimumSize:!1}),re.filterAndViewsContainer.updateDynamicFilters(re.dynamicFilters,re),o.value=!0,setTimeout(()=>{ee(re,!0)},1e3)):(re.filterAndViewsContainer.updateDynamicFilters(re.dynamicFilters,re),o.value=!0)}else if(be||_e===U.value.length-1){const Ae=new Tg(`FAWC-${Date.now()}`,[],re.view.id,re.dynamicFilters,b.value,u.value,re.filtersJSON);Qo.emit("set-filter-and-views-container",Ae),r.value.set(Ae.getId(),Ae),re.dynamicFilters&&Array.isArray(re.dynamicFilters[0])?(re.filterAndViewsContainer=Ae,ee(re,!0)):Qo.emit("add-view",{pageId:me.id,view:re.view,filterAndWidgetContainer:Ae,avoidWillFit:!1,applyMinimumSize:be?be.applyMinimumSize:!1}),o.value=!0}}}async function J(){if(o.value)try{const re=[{is_front_page:!0,template_type:ae.value.isPostMatch?2:1,type:ae.value.id},...U.value.map(le=>({columns:le.originalPage?le.originalPage.columns:12,rows:le.originalPage?le.originalPage.rows:12,gap:le.originalPage?le.originalPage.gap:10,name:le.title,width:le.originalPage?le.originalPage.width:968,height:le.originalPage?le.originalPage.height:702,components:le.items.map(me=>({min_column:me.minWidth,min_row:me.minHeight,max_column:me.maxWidth,max_row:me.maxHeight,column:me.x,row:me.y,colspan:me.w,rowspan:me.h,name:me.name,title:me.title,dynamicFilters:me.filterAndViewsContainer.getDynamicFilters()||[],coreView:me.coreView||null,componentName:me.componentName,componentProps:me.componentProps||{},isHomeTeam:me.isHomeTeam||!0}))}))],oe=await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${t.value.user_id}/templates/${t.value.id}/pages`,{method:"PATCH",headers:{Authorization:W.token},body:JSON.stringify({pages:re})})).json();o.value=!1}catch(re){console.error("Error saving template:",re)}}function Z(){U.value.forEach(re=>{console.log("page.offAddView",re.offAddView),re.offAddView&&re.offAddView()})}function ce(re){const oe=U.value.findIndex(le=>le.id===re.id);oe>-1&&(Z(),U.value=U.value.filter(le=>le.id!==re.id),O.value>=oe&&(O.value=Math.max(0,O.value-1)),console.log("onDeletePage: ",re),console.log("pates.value",U.value),o.value=!0)}function he(){o.value=!0}function de(re){const oe=U.value.find(le=>le.items.some(me=>me.id===re.id));if(oe){const le=oe.items.findIndex(me=>me.id===re.id);le!==-1&&(oe.items.splice(le,1),o.value=!0)}}function fe(re){console.log("onChangeSort",re)}return(re,oe)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createVNode($ae,{modelValue:l.value,"onUpdate:modelValue":oe[0]||(oe[0]=le=>l.value=le),onAction:P},null,8,["modelValue"]),(g.openBlock(),g.createBlock(g.Teleport,{to:"body"},[E.value&&t.value?(g.openBlock(),g.createElementBlock("div",{key:0,class:"template-maker",style:g.normalizeStyle(p.value)},[g.withDirectives(g.createVNode(Bae,{token:a.token,view:h.value,"is-post-match":b.value,onClose:te,onFiltersChanged:ee},null,8,["token","view","is-post-match"]),[[g.vShow,u.value&&v.value]]),g.createElementVNode("div",Zae,[g.createTextVNode(g.toDisplayString(t.value?t.value.name:"Nuevo template")+" ",1),g.createElementVNode("div",{class:"template-maker__header__close",onClick:$},[e.value?g.createCommentVNode("",!0):(g.openBlock(),g.createElementBlock("svg",{key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:oe[1]||(oe[1]=le=>re.$emit("close"))},oe[7]||(oe[7]=[g.createElementVNode("path",{d:"M1.33398 1.33398L14.6673 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g.createElementVNode("path",{d:"M14.666 1.33398L1.33268 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])))])]),g.createElementVNode("div",Yae,[oe[15]||(oe[15]=g.createElementVNode("div",{class:"template-maker__content__sidebar"},null,-1)),g.createElementVNode("div",Qae,[g.createElementVNode("div",eie,[g.createElementVNode("div",tie,[g.withDirectives(g.createVNode(i6,{"is-post-match":b.value,"initial-cover-id":f.value,onSelectCover:M},null,8,["is-post-match","initial-cover-id"]),[[g.vShow,u.value]])]),(g.openBlock(),g.createElementBlock("div",{class:"template-maker__content__main__pages",key:U.value.length},[ae.value?(g.openBlock(),g.createBlock(Gne,{key:0,id:"page-0",game:t.value.game||null,"cover-id":ae.value.id,"is-post-match":ae.value.isPostMatch,onIntersectionChanged:oe[2]||(oe[2]=le=>y(le,-1))},null,8,["game","cover-id","is-post-match"])):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createElementBlock("div",{key:1,class:"new-items-buttons",style:g.normalizeStyle({"margin-bottom":U.value.length===0?"30px":"0"})},[v.value?g.createCommentVNode("",!0):(g.openBlock(),g.createElementBlock("div",{key:0,class:"new-items-buttons__add-page new-item-button",onClick:oe[3]||(oe[3]=le=>C(-1))},oe[8]||(oe[8]=[g.createElementVNode("div",null,"+ Nueva página",-1),g.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])))],4)):g.createCommentVNode("",!0),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(U.value,(le,me)=>(g.openBlock(),g.createElementBlock("div",{key:me,id:`page-${me+1}`,class:"template-maker__content__main__pages__page"},[g.createElementVNode("div",nie,[g.createElementVNode("div",aie,"Pag "+g.toDisplayString(m(me+2)),1)]),ae.value?(g.openBlock(),g.createBlock(ane,{key:0,page:le,isTemplateMode:u.value,"is-post-match":ae.value.isPostMatch,game:t.value.game||null,onEditView:N,onIntersectionChanged:be=>y(be,me),onChangeSort:fe,onDeletePage:ce,onViewChanged:he,onDeleteView:de},null,8,["page","isTemplateMode","is-post-match","game","onIntersectionChanged"])):g.createCommentVNode("",!0),u.value&&!v.value?(g.openBlock(),g.createElementBlock("div",{key:1,class:"new-items-buttons",style:g.normalizeStyle({"margin-bottom":me+1===U.value.length?"30px":"0","margin-top":"10px"})},[g.createElementVNode("div",{class:"new-items-buttons__add-page new-item-button",onClick:be=>C(me)},oe[9]||(oe[9]=[g.createElementVNode("div",null,"+ Nueva página",-1),g.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),8,iie),g.createElementVNode("div",{class:"new-items-buttons__add-item new-item-button",onClick:be=>z(le)},oe[10]||(oe[10]=[g.createElementVNode("div",null,"+ Agregar gráfico",-1),g.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M12 13.3346V6.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M8 13.3346V2.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M4 13.332V9.33203",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),8,oie)],4)):g.createCommentVNode("",!0)],8,rie))),128))]))]),e.value?g.createCommentVNode("",!0):(g.openBlock(),g.createElementBlock("div",sie,[g.createElementVNode("div",lie,[g.createElementVNode("div",cie,[oe[13]||(oe[13]=g.createElementVNode("div",null,"Páginas",-1)),g.createElementVNode("div",{class:"template-maker__content__main__footer__paginator__nav__arrow",onClick:oe[4]||(oe[4]=le=>_(O.value-1))},oe[11]||(oe[11]=[g.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.22444 5L5.29079 8.57741C5.56974 8.90285 5.56974 9.43049 5.29079 9.75592C5.01184 10.0814 4.55958 10.0814 4.28064 9.75592L0.709209 5.58926C0.430263 5.26382 0.430263 4.73618 0.709209 4.41074L4.28064 0.244078C4.55958 -0.0813593 5.01184 -0.0813592 5.29079 0.244078C5.56974 0.569515 5.56974 1.09715 5.29079 1.42259L2.22444 5Z",fill:"#92929D"})],-1)])),g.createElementVNode("div",{class:"template-maker__content__main__footer__paginator__nav__arrow",onClick:oe[5]||(oe[5]=le=>_(O.value+1))},oe[12]||(oe[12]=[g.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.77556 5L0.70921 8.57741C0.430264 8.90285 0.430264 9.43049 0.70921 9.75592C0.988156 10.0814 1.44042 10.0814 1.71936 9.75592L5.29079 5.58926C5.56974 5.26382 5.56974 4.73618 5.29079 4.41074L1.71936 0.244078C1.44042 -0.0813593 0.988155 -0.0813592 0.709209 0.244078C0.430264 0.569515 0.430264 1.09715 0.70921 1.42259L3.77556 5Z",fill:"#92929D"})],-1)]))]),g.createElementVNode("div",uie,[g.createElementVNode("div",{role:"button",class:g.normalizeClass({active:O.value===0}),onClick:oe[6]||(oe[6]=le=>_(0))},g.toDisplayString(m(1)),3),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(U.value,(le,me)=>(g.openBlock(),g.createElementBlock("div",{role:"button",key:me,class:g.normalizeClass({active:me+1===O.value}),onClick:be=>_(me+1)},g.toDisplayString(m(me+2)),11,die))),128))])]),u.value?(g.openBlock(),g.createElementBlock("div",{key:0,role:"button",class:g.normalizeClass(["template-maker__content__main__footer__save save-button",{disabled:!o.value}]),onClick:J},oe[14]||(oe[14]=[g.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V3.33333C2 2.97971 2.14048 2.64057 2.39052 2.39052C2.64057 2.14048 2.97971 2 3.33333 2H10.6667L14 5.33333V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M11.3346 14.0013V8.66797H4.66797V14.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M4.66797 2V5.33333H10.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1),g.createElementVNode("div",null,"Guardar",-1)]),2)):g.createCommentVNode("",!0)]))])])],4)):g.createCommentVNode("",!0)]))],64))}},pie=Ed(hie,[["__scopeId","data-v-191726f9"]]);function H5(a,d){return function(){return a.apply(d,arguments)}}const{toString:fie}=Object.prototype,{getPrototypeOf:Yv}=Object,{iterator:Sg,toStringTag:G5}=Symbol,Ag=(a=>d=>{const A=fie.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Xu=a=>(a=a.toLowerCase(),d=>Ag(d)===a),Eg=a=>d=>typeof d===a,{isArray:Cp}=Array,Ff=Eg("undefined");function Vf(a){return a!==null&&!Ff(a)&&a.constructor!==null&&!Ff(a.constructor)&&lu(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const X5=Xu("ArrayBuffer");function mie(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&X5(a.buffer),d}const gie=Eg("string"),lu=Eg("function"),K5=Eg("number"),Bf=a=>a!==null&&typeof a=="object",yie=a=>a===!0||a===!1,Cg=a=>{if(Ag(a)!=="object")return!1;const d=Yv(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(G5 in a)&&!(Sg in a)},vie=a=>{if(!Bf(a)||Vf(a))return!1;try{return Object.keys(a).length===0&&Object.getPrototypeOf(a)===Object.prototype}catch{return!1}},bie=Xu("Date"),xie=Xu("File"),_ie=Xu("Blob"),wie=Xu("FileList"),kie=a=>Bf(a)&&lu(a.pipe),Tie=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||lu(a.append)&&((d=Ag(a))==="formdata"||d==="object"&&lu(a.toString)&&a.toString()==="[object FormData]"))},Sie=Xu("URLSearchParams"),[Aie,Eie,Cie,Mie]=["ReadableStream","Request","Response","Headers"].map(Xu),Pie=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Uf(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),Cp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{if(Vf(a))return;const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function J5(a,d){if(Vf(a))return null;d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const Vh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$5=a=>!Ff(a)&&a!==Vh;function Qv(){const{caseless:a}=$5(this)&&this||{},d={},A=(U,ae)=>{const O=a&&J5(d,ae)||ae;Cg(d[O])&&Cg(U)?d[O]=Qv(d[O],U):Cg(U)?d[O]=Qv({},U):Cp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&Uf(arguments[U],A);return d}const Lie=(a,d,A,{allOwnKeys:U}={})=>(Uf(d,(ae,O)=>{A&&lu(ae)?a[O]=H5(ae,A):a[O]=ae},{allOwnKeys:U}),a),zie=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),Oie=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},Nie=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&Yv(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},Rie=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},Die=a=>{if(!a)return null;if(Cp(a))return a;let d=a.length;if(!K5(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},Iie=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&Yv(Uint8Array)),Fie=(a,d)=>{const U=(a&&a[Sg]).call(a);let ae;for(;(ae=U.next())&&!ae.done;){const O=ae.value;d.call(a,O[0],O[1])}},Vie=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},Bie=Xu("HTMLFormElement"),Uie=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(A,U,ae){return U.toUpperCase()+ae}),Z5=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),jie=Xu("RegExp"),Y5=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};Uf(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},qie=a=>{Y5(a,(d,A)=>{if(lu(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(lu(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},Wie=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return Cp(a)?U(a):U(String(a).split(d)),A},Hie=()=>{},Gie=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function Xie(a){return!!(a&&lu(a.append)&&a[G5]==="FormData"&&a[Sg])}const Kie=a=>{const d=new Array(10),A=(U,ae)=>{if(Bf(U)){if(d.indexOf(U)>=0)return;if(Vf(U))return U;if(!("toJSON"in U)){d[ae]=U;const O=Cp(U)?[]:{};return Uf(U,(E,t)=>{const x=A(E,ae+1);!Ff(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},Jie=Xu("AsyncFunction"),$ie=a=>a&&(Bf(a)||lu(a))&&lu(a.then)&&lu(a.catch),Q5=((a,d)=>a?setImmediate:d?((A,U)=>(Vh.addEventListener("message",({source:ae,data:O})=>{ae===Vh&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),Vh.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",lu(Vh.postMessage)),Zie=typeof queueMicrotask<"u"?queueMicrotask.bind(Vh):typeof process<"u"&&process.nextTick||Q5,Hn={isArray:Cp,isArrayBuffer:X5,isBuffer:Vf,isFormData:Tie,isArrayBufferView:mie,isString:gie,isNumber:K5,isBoolean:yie,isObject:Bf,isPlainObject:Cg,isEmptyObject:vie,isReadableStream:Aie,isRequest:Eie,isResponse:Cie,isHeaders:Mie,isUndefined:Ff,isDate:bie,isFile:xie,isBlob:_ie,isRegExp:jie,isFunction:lu,isStream:kie,isURLSearchParams:Sie,isTypedArray:Iie,isFileList:wie,forEach:Uf,merge:Qv,extend:Lie,trim:Pie,stripBOM:zie,inherits:Oie,toFlatObject:Nie,kindOf:Ag,kindOfTest:Xu,endsWith:Rie,toArray:Die,forEachEntry:Fie,matchAll:Vie,isHTMLForm:Bie,hasOwnProperty:Z5,hasOwnProp:Z5,reduceDescriptors:Y5,freezeMethods:qie,toObjectSet:Wie,toCamelCase:Uie,noop:Hie,toFiniteNumber:Gie,findKey:J5,global:Vh,isContextDefined:$5,isSpecCompliantForm:Xie,toJSONObject:Kie,isAsyncFn:Jie,isThenable:$ie,setImmediate:Q5,asap:Zie,isIterable:a=>a!=null&&lu(a[Sg])};function mi(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}Hn.inherits(mi,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:Hn.toJSONObject(this.config),code:this.code,status:this.status}}});const e4=mi.prototype,t4={};["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(a=>{t4[a]={value:a}}),Object.defineProperties(mi,t4),Object.defineProperty(e4,"isAxiosError",{value:!0}),mi.from=(a,d,A,U,ae,O)=>{const E=Object.create(e4);return Hn.toFlatObject(a,E,function(x){return x!==Error.prototype},t=>t!=="isAxiosError"),mi.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const Yie=null;function eb(a){return Hn.isPlainObject(a)||Hn.isArray(a)}function r4(a){return Hn.endsWith(a,"[]")?a.slice(0,-2):a}function n4(a,d,A){return a?a.concat(d).map(function(ae,O){return ae=r4(ae),!A&&O?"["+ae+"]":ae}).join(A?".":""):d}function Qie(a){return Hn.isArray(a)&&!a.some(eb)}const eoe=Hn.toFlatObject(Hn,{},null,function(d){return/^is[A-Z]/.test(d)});function Mg(a,d,A){if(!Hn.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=Hn.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(r,n){return!Hn.isUndefined(n[r])});const U=A.metaTokens,ae=A.visitor||e,O=A.dots,E=A.indexes,x=(A.Blob||typeof Blob<"u"&&Blob)&&Hn.isSpecCompliantForm(d);if(!Hn.isFunction(ae))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(Hn.isDate(h))return h.toISOString();if(Hn.isBoolean(h))return h.toString();if(!x&&Hn.isBlob(h))throw new mi("Blob is not supported. Use a Buffer instead.");return Hn.isArrayBuffer(h)||Hn.isTypedArray(h)?x&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function e(h,r,n){let c=h;if(h&&!n&&typeof h=="object"){if(Hn.endsWith(r,"{}"))r=U?r:r.slice(0,-2),h=JSON.stringify(h);else if(Hn.isArray(h)&&Qie(h)||(Hn.isFileList(h)||Hn.endsWith(r,"[]"))&&(c=Hn.toArray(h)))return r=r4(r),c.forEach(function(l,p){!(Hn.isUndefined(l)||l===null)&&d.append(E===!0?n4([r],p,O):E===null?r:r+"[]",u(l))}),!1}return eb(h)?!0:(d.append(n4(n,r,O),u(h)),!1)}const b=[],f=Object.assign(eoe,{defaultVisitor:e,convertValue:u,isVisitable:eb});function v(h,r){if(!Hn.isUndefined(h)){if(b.indexOf(h)!==-1)throw Error("Circular reference detected in "+r.join("."));b.push(h),Hn.forEach(h,function(c,o){(!(Hn.isUndefined(c)||c===null)&&ae.call(d,c,Hn.isString(o)?o.trim():o,r,f))===!0&&v(c,r?r.concat(o):[o])}),b.pop()}}if(!Hn.isObject(a))throw new TypeError("data must be an object");return v(a),d}function a4(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(U){return d[U]})}function tb(a,d){this._pairs=[],a&&Mg(a,this,d)}const i4=tb.prototype;i4.append=function(d,A){this._pairs.push([d,A])},i4.toString=function(d){const A=d?function(U){return d.call(this,U,a4)}:a4;return this._pairs.map(function(ae){return A(ae[0])+"="+A(ae[1])},"").join("&")};function toe(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function o4(a,d,A){if(!d)return a;const U=A&&A.encode||toe;Hn.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=Hn.isURLSearchParams(d)?d.toString():new tb(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}class s4{constructor(){this.handlers=[]}use(d,A,U){return this.handlers.push({fulfilled:d,rejected:A,synchronous:U?U.synchronous:!1,runWhen:U?U.runWhen:null}),this.handlers.length-1}eject(d){this.handlers[d]&&(this.handlers[d]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(d){Hn.forEach(this.handlers,function(U){U!==null&&d(U)})}}const l4={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},roe={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:tb,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},rb=typeof window<"u"&&typeof document<"u",nb=typeof navigator=="object"&&navigator||void 0,noe=rb&&(!nb||["ReactNative","NativeScript","NS"].indexOf(nb.product)<0),aoe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ioe=rb&&window.location.href||"http://localhost",Ec={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rb,hasStandardBrowserEnv:noe,hasStandardBrowserWebWorkerEnv:aoe,navigator:nb,origin:ioe},Symbol.toStringTag,{value:"Module"})),...roe};function ooe(a,d){return Mg(a,new Ec.classes.URLSearchParams,{visitor:function(A,U,ae,O){return Ec.isNode&&Hn.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)},...d})}function soe(a){return Hn.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function loe(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function c4(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&Hn.isArray(ae)?ae.length:E,x?(Hn.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!Hn.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&Hn.isArray(ae[E])&&(ae[E]=loe(ae[E])),!t)}if(Hn.isFormData(a)&&Hn.isFunction(a.entries)){const A={};return Hn.forEachEntry(a,(U,ae)=>{d(soe(U),ae,A,0)}),A}return null}function coe(a,d,A){if(Hn.isString(a))try{return(d||JSON.parse)(a),Hn.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const jf={transitional:l4,adapter:["xhr","http","fetch"],transformRequest:[function(d,A){const U=A.getContentType()||"",ae=U.indexOf("application/json")>-1,O=Hn.isObject(d);if(O&&Hn.isHTMLForm(d)&&(d=new FormData(d)),Hn.isFormData(d))return ae?JSON.stringify(c4(d)):d;if(Hn.isArrayBuffer(d)||Hn.isBuffer(d)||Hn.isStream(d)||Hn.isFile(d)||Hn.isBlob(d)||Hn.isReadableStream(d))return d;if(Hn.isArrayBufferView(d))return d.buffer;if(Hn.isURLSearchParams(d))return A.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),d.toString();let t;if(O){if(U.indexOf("application/x-www-form-urlencoded")>-1)return ooe(d,this.formSerializer).toString();if((t=Hn.isFileList(d))||U.indexOf("multipart/form-data")>-1){const x=this.env&&this.env.FormData;return Mg(t?{"files[]":d}:d,x&&new x,this.formSerializer)}}return O||ae?(A.setContentType("application/json",!1),coe(d)):d}],transformResponse:[function(d){const A=this.transitional||jf.transitional,U=A&&A.forcedJSONParsing,ae=this.responseType==="json";if(Hn.isResponse(d)||Hn.isReadableStream(d))return d;if(d&&Hn.isString(d)&&(U&&!this.responseType||ae)){const E=!(A&&A.silentJSONParsing)&&ae;try{return JSON.parse(d)}catch(t){if(E)throw t.name==="SyntaxError"?mi.from(t,mi.ERR_BAD_RESPONSE,this,null,this.response):t}}return d}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ec.classes.FormData,Blob:Ec.classes.Blob},validateStatus:function(d){return d>=200&&d<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Hn.forEach(["delete","get","head","post","put","patch"],a=>{jf.headers[a]={}});const uoe=Hn.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"]),doe=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4076
|
+
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),U}static addGrid(d,A={}){if(!d)return null;let U=d;if(U.gridstack){const ae=U.gridstack;return A&&(ae.opts={...ae.opts,...A}),A.children!==void 0&&ae.load(A.children),ae}return(!d.classList.contains("grid-stack")||ja.addRemoveCB)&&(ja.addRemoveCB?U=ja.addRemoveCB(d,A,!0,!0):U=In.createDiv(["grid-stack",A.class],d)),ja.init(A,U)}static registerEngine(d){ja.engineClass=d}get placeholder(){if(!this._placeholder){this._placeholder=In.createDiv([this.opts.placeholderClass,wu.itemClass,this.opts.itemClass]);const d=In.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(d.textContent=this.opts.placeholderText)}return this._placeholder}constructor(d,A={}){var U;this.el=d,this.opts=A,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},d.gridstack=this,this.opts=A=A||{},d.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),A.row&&(A.minRow=A.maxRow=A.row,delete A.row);const ae=In.toNumber(d.getAttribute("gs-row"));A.column==="auto"&&delete A.column,A.alwaysShowResizeHandle!==void 0&&(A._alwaysShowResizeHandle=A.alwaysShowResizeHandle);const O=A.columnOpts;if(O){const e=O.breakpoints;!O.columnWidth&&!(e!=null&&e.length)?delete A.columnOpts:(O.columnMax=O.columnMax||12,(e==null?void 0:e.length)>1&&e.sort((b,f)=>(f.w||0)-(b.w||0)))}const E={...In.cloneDeep(wu),column:In.toNumber(d.getAttribute("gs-column"))||wu.column,minRow:ae||In.toNumber(d.getAttribute("gs-min-row"))||wu.minRow,maxRow:ae||In.toNumber(d.getAttribute("gs-max-row"))||wu.maxRow,staticGrid:In.toBool(d.getAttribute("gs-static"))||wu.staticGrid,sizeToContent:In.toBool(d.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(A.handleClass?"."+A.handleClass:A.handle?A.handle:"")||wu.draggable.handle},removableOptions:{accept:A.itemClass||wu.removableOptions.accept,decline:wu.removableOptions.decline}};d.getAttribute("gs-animate")&&(E.animate=In.toBool(d.getAttribute("gs-animate"))),A=In.defaults(A,E),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(A),A.rtl==="auto"&&(A.rtl=d.style.direction==="rtl"),A.rtl&&this.el.classList.add("grid-stack-rtl");const t=this.el.closest("."+wu.itemClass),x=t==null?void 0:t.gridstackNode;if(x&&(x.subGrid=this,this.parentGridNode=x,this.el.classList.add("grid-stack-nested"),x.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=A.cellHeight==="auto",this._isAutoCellHeight||A.cellHeight==="initial")this.cellHeight(void 0);else{typeof A.cellHeight=="number"&&A.cellHeightUnit&&A.cellHeightUnit!==wu.cellHeightUnit&&(A.cellHeight=A.cellHeight+A.cellHeightUnit,delete A.cellHeightUnit);const e=A.cellHeight;delete A.cellHeight,this.cellHeight(e)}A.alwaysShowResizeHandle==="mobile"&&(A.alwaysShowResizeHandle=Gu),this._setStaticClass();const u=A.engineClass||ja.engineClass||Pd;if(this.engine=new u({column:this.getColumn(),float:A.float,maxRow:A.maxRow,onChange:e=>{e.forEach(b=>{const f=b.el;f&&(b._removeDOM?(f&&f.remove(),delete b._removeDOM):this._writePosAttr(f,b))}),this._updateContainerHeight()}}),A.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(e=>this._prepareElement(e)),delete this.engine._loading,this.batchUpdate(!1)),A.children){const e=A.children;delete A.children,e.length&&this.load(e)}this.setAnimation(),A.subGridDynamic&&!Ka.pauseDrag&&(Ka.pauseDrag=!0),((U=A.draggable)==null?void 0:U.pause)!==void 0&&(Ka.pauseDrag=A.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(d=this.opts){this.el.classList.add("gs-"+d.column),typeof d.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/d.column}%`)}addWidget(d){if(typeof d=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(d.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(d);let A,U=d;if(U.grid=this,U!=null&&U.el?A=U.el:ja.addRemoveCB?A=ja.addRemoveCB(this.el,d,!0,!1):A=this.createWidgetDivs(U),!A)return;if(U=A.gridstackNode,U&&A.parentElement===this.el&&this.engine.nodes.find(O=>O._id===U._id))return A;const ae=this._readAttr(A);return In.defaults(d,ae),this.engine.prepareNode(d),this.el.appendChild(A),this.makeWidget(A,d),A}createWidgetDivs(d){const A=In.createDiv(["grid-stack-item",this.opts.itemClass]),U=In.createDiv(["grid-stack-item-content"],A);return In.lazyLoad(d)?d.visibleObservable||(d.visibleObservable=new IntersectionObserver(([ae])=>{var O,E;ae.isIntersecting&&((O=d.visibleObservable)==null||O.disconnect(),delete d.visibleObservable,ja.renderCB(U,d),(E=d.grid)==null||E.prepareDragDrop(d.el))}),window.setTimeout(()=>{var ae;return(ae=d.visibleObservable)==null?void 0:ae.observe(A)})):ja.renderCB(U,d),A}makeSubGrid(d,A,U,ae=!0){var O,E,t;let x=d.gridstackNode;if(x||(x=this.makeWidget(d).gridstackNode),(O=x.subGrid)!=null&&O.el)return x.subGrid;let u,e=this;for(;e&&!u;)u=(E=e.opts)==null?void 0:E.subGridOpts,e=(t=e.parentGridNode)==null?void 0:t.grid;A=In.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...u||{},...A||x.subGridOpts||{}}),x.subGridOpts=A;let b;A.column==="auto"&&(b=!0,A.column=Math.max(x.w||1,(U==null?void 0:U.w)||1),delete A.columnOpts);let f=x.el.querySelector(".grid-stack-item-content"),v,h;if(ae&&(this._removeDD(x.el),h={...x,x:0,y:0},In.removeInternalForSave(h),delete h.subGridOpts,x.content&&(h.content=x.content,delete x.content),ja.addRemoveCB?v=ja.addRemoveCB(this.el,h,!0,!1):(v=In.createDiv(["grid-stack-item"]),v.appendChild(f),f=In.createDiv(["grid-stack-item-content"],x.el)),this.prepareDragDrop(x.el)),U){const n=b?A.column:x.w,c=x.h+U.h,o=x.el.style;o.transition="none",this.update(x.el,{w:n,h:c}),setTimeout(()=>o.transition=null)}const r=x.subGrid=ja.addGrid(f,A);return U!=null&&U._moving&&(r._isTemp=!0),b&&(r._autoColumn=!0),ae&&r.makeWidget(v,h),U&&(U._moving?window.setTimeout(()=>In.simulateMouseEvent(U._event,"mouseenter",r.el),0):r.makeWidget(x.el,x)),this.resizeToContentCheck(!1,x),r}removeAsSubGrid(d){var A;const U=(A=this.parentGridNode)==null?void 0:A.grid;U&&(U.batchUpdate(),U.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(ae=>{ae.x+=this.parentGridNode.x,ae.y+=this.parentGridNode.y,U.makeWidget(ae.el,ae)}),U.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,d&&window.setTimeout(()=>In.simulateMouseEvent(d._event,"mouseenter",U.el),0))}save(d=!0,A=!1,U=ja.saveCB){const ae=this.engine.save(d,U);if(ae.forEach(O=>{var E;if(d&&O.el&&!O.subGrid&&!U){const t=O.el.querySelector(".grid-stack-item-content");O.content=t==null?void 0:t.innerHTML,O.content||delete O.content}else if(!d&&!U&&delete O.content,(E=O.subGrid)!=null&&E.el){const t=O.subGrid.save(d,A,U);O.subGridOpts=A?t:{children:t},delete O.subGrid}delete O.el}),A){const O=In.cloneDeep(this.opts);O.marginBottom===O.marginTop&&O.marginRight===O.marginLeft&&O.marginTop===O.marginRight&&(O.margin=O.marginTop,delete O.marginTop,delete O.marginRight,delete O.marginBottom,delete O.marginLeft),O.rtl===(this.el.style.direction==="rtl")&&(O.rtl="auto"),this._isAutoCellHeight&&(O.cellHeight="auto"),this._autoColumn&&(O.column="auto");const E=O._alwaysShowResizeHandle;return delete O._alwaysShowResizeHandle,E!==void 0?O.alwaysShowResizeHandle=E:delete O.alwaysShowResizeHandle,In.removeInternalAndSame(O,wu),O.children=ae,O}return ae}load(d,A=ja.addRemoveCB||!0){d=In.cloneDeep(d);const U=this.getColumn();d.forEach(e=>{e.w=e.w||1,e.h=e.h||1}),d=In.sort(d),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let ae=0;d.forEach(e=>{ae=Math.max(ae,(e.x||0)+e.w)}),ae>this.engine.defaultColumn&&(this.engine.defaultColumn=ae),ae>U&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=d,this.engine.columnChanged(ae,U,this.responseLayout),d=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(d,ae,!0));const O=ja.addRemoveCB;typeof A=="function"&&(ja.addRemoveCB=A);const E=[];this.batchUpdate();const t=!this.engine.nodes.length,x=t&&this.opts.animate;x&&this.setAnimation(!1),!t&&A&&[...this.engine.nodes].forEach(e=>{e.id&&(In.find(d,e.id)||(ja.addRemoveCB&&ja.addRemoveCB(this.el,e,!1,!1),E.push(e),this.removeWidget(e.el,!0,!1)))}),this.engine._loading=!0;const u=[];return this.engine.nodes=this.engine.nodes.filter(e=>In.find(d,e.id)?(u.push(e),!1):!0),d.forEach(e=>{var b;const f=In.find(u,e.id);if(f){if(In.shouldSizeToContent(f)&&(e.h=f.h),this.engine.nodeBoundFix(e),(e.autoPosition||e.x===void 0||e.y===void 0)&&(e.w=e.w||f.w,e.h=e.h||f.h,this.engine.findEmptyPosition(e)),this.engine.nodes.push(f),In.samePos(f,e)&&this.engine.nodes.length>1&&(this.moveNode(f,{...e,forceCollide:!0}),In.copyPos(e,f)),this.update(f.el,e),(b=e.subGridOpts)!=null&&b.children){const v=f.el.querySelector(".grid-stack");v&&v.gridstack&&v.gridstack.load(e.subGridOpts.children)}}else A&&this.addWidget(e)}),delete this.engine._loading,this.engine.removedNodes=E,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,O?ja.addRemoveCB=O:delete ja.addRemoveCB,x&&this.setAnimation(!0,!0),this}batchUpdate(d=!0){return this.engine.batchUpdate(d),d||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(d=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!d||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const A=this.el.querySelector("."+this.opts.itemClass);if(A){const ae=In.toNumber(A.getAttribute("gs-h"))||1;return Math.round(A.offsetHeight/ae)}const U=parseInt(this.el.getAttribute("gs-current-row"));return U?Math.round(this.el.getBoundingClientRect().height/U):this.opts.cellHeight}cellHeight(d){if(d!==void 0&&this._isAutoCellHeight!==(d==="auto")&&(this._isAutoCellHeight=d==="auto",this._updateResizeEvent()),(d==="initial"||d==="auto")&&(d=void 0),d===void 0){const U=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;d=this.cellWidth()+U}const A=In.parseHeight(d);return this.opts.cellHeightUnit===A.unit&&this.opts.cellHeight===A.h?this:(this.opts.cellHeightUnit=A.unit,this.opts.cellHeight=A.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(d=!1){var A;return d&&(A=this.opts.columnOpts)!=null&&A.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var d,A;const U=this.opts.columnOpts;if(!U||!U.columnWidth&&!((d=U.breakpoints)!=null&&d.length))return!1;const ae=this.getColumn();let O=ae;const E=this._widthOrContainer(!0);if(U.columnWidth)O=Math.min(Math.round(E/U.columnWidth)||1,U.columnMax);else{O=U.columnMax;let t=0;for(;t<U.breakpoints.length&&E<=U.breakpoints[t].w;)O=U.breakpoints[t++].c||ae}if(O!==ae){const t=(A=U.breakpoints)==null?void 0:A.find(x=>x.c===O);return this.column(O,(t==null?void 0:t.layout)||U.layout),!0}return!1}compact(d="compact",A=!0){return this.engine.compact(d,A),this._triggerChangeEvent(),this}column(d,A="moveScale"){if(!d||d<1||this.opts.column===d)return this;const U=this.getColumn();return this.opts.column=d,this.engine?(this.engine.column=d,this.el.classList.remove("gs-"+U),this._updateColumnVar(),this.engine.columnChanged(U,d,A),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=A,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(d=>d.matches("."+this.opts.itemClass)&&!d.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(d=!0){var A;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),d?this.el.parentNode.removeChild(this.el):(this.removeAll(d),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,(A=this._placeholder)==null||delete A.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(d){return this.opts.float!==d&&(this.opts.float=this.engine.float=d,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(d,A=!1){const U=this.el.getBoundingClientRect();let ae;A?ae={top:U.top+document.documentElement.scrollTop,left:U.left}:ae={top:this.el.offsetTop,left:this.el.offsetLeft};const O=d.left-ae.left,E=d.top-ae.top,t=U.width/this.getColumn(),x=U.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(O/t),y:Math.floor(E/x)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(d,A,U,ae){return this.engine.isAreaEmpty(d,A,U,ae)}makeWidget(d,A){const U=ja.getElement(d);if(!U||U.gridstackNode)return U;U.parentElement||this.el.appendChild(U),this._prepareElement(U,!0,A);const ae=U.gridstackNode;this._updateContainerHeight(),ae.subGridOpts&&this.makeSubGrid(U,ae.subGridOpts,void 0,!1);let O;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(O=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),O&&delete this._ignoreLayoutsNodeChange,U}on(d,A){return d.indexOf(" ")!==-1?(d.split(" ").forEach(U=>this.on(U,A)),this):(d==="change"||d==="added"||d==="removed"||d==="enable"||d==="disable"?(d==="enable"||d==="disable"?this._gsEventHandler[d]=U=>A(U):this._gsEventHandler[d]=U=>{U.detail&&A(U,U.detail)},this.el.addEventListener(d,this._gsEventHandler[d])):d==="drag"||d==="dragstart"||d==="dragstop"||d==="resizestart"||d==="resize"||d==="resizestop"||d==="dropped"||d==="resizecontent"?this._gsEventHandler[d]=A:console.error("GridStack.on("+d+") event not supported"),this)}off(d){return d.indexOf(" ")!==-1?(d.split(" ").forEach(A=>this.off(A)),this):((d==="change"||d==="added"||d==="removed"||d==="enable"||d==="disable")&&this._gsEventHandler[d]&&this.el.removeEventListener(d,this._gsEventHandler[d]),delete this._gsEventHandler[d],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(d=>this.off(d)),this}removeWidget(d,A=!0,U=!0){return d?(ja.getElements(d).forEach(ae=>{if(ae.parentElement&&ae.parentElement!==this.el)return;let O=ae.gridstackNode;O||(O=this.engine.nodes.find(E=>ae===E.el)),O&&(A&&ja.addRemoveCB&&ja.addRemoveCB(this.el,O,!1,!1),delete ae.gridstackNode,this._removeDD(ae),this.engine.removeNode(O,A,U),A&&ae.parentElement&&ae.remove())}),U&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(d=!0,A=!0){return this.engine.nodes.forEach(U=>{d&&ja.addRemoveCB&&ja.addRemoveCB(this.el,U,!1,!1),delete U.el.gridstackNode,this.opts.staticGrid||this._removeDD(U.el)}),this.engine.removeAll(d,A),A&&this._triggerRemoveEvent(),this}setAnimation(d=this.opts.animate,A){return A?setTimeout(()=>{this.opts&&this.setAnimation(d)}):d?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=d,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(d,A=!0,U=!0){return!!this.opts.staticGrid===d?this:(d?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(ae=>{this.prepareDragDrop(ae.el),ae.subGrid&&U&&ae.subGrid.setStatic(d,A,U)}),A&&this._setStaticClass(),this)}updateOptions(d){var A;const U=this.opts;return d===U?this:(d.acceptWidgets!==void 0&&(U.acceptWidgets=d.acceptWidgets,this._setupAcceptWidget()),d.animate!==void 0&&this.setAnimation(d.animate),d.cellHeight&&this.cellHeight(d.cellHeight),d.class!==void 0&&d.class!==U.class&&(U.class&&this.el.classList.remove(U.class),d.class&&this.el.classList.add(d.class)),d.columnOpts?(this.opts.columnOpts=d.columnOpts,this.checkDynamicColumn()):d.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof d.column=="number"&&this.column(d.column),d.margin!==void 0&&this.margin(d.margin),d.staticGrid!==void 0&&this.setStatic(d.staticGrid),d.disableDrag!==void 0&&!d.staticGrid&&this.enableMove(!d.disableDrag),d.disableResize!==void 0&&!d.staticGrid&&this.enableResize(!d.disableResize),d.float!==void 0&&this.float(d.float),d.row!==void 0?(U.minRow=U.maxRow=U.row=d.row,this._updateContainerHeight()):(d.minRow!==void 0&&(U.minRow=d.minRow,this._updateContainerHeight()),d.maxRow!==void 0&&(U.maxRow=d.maxRow)),(A=d.children)!=null&&A.length&&this.load(d.children),this)}update(d,A){return ja.getElements(d).forEach(U=>{var ae;const O=U==null?void 0:U.gridstackNode;if(!O)return;const E={...In.copyPos({},O),...In.cloneDeep(A)};this.engine.nodeBoundFix(E),delete E.autoPosition;const t=["x","y","w","h"];let x;if(t.some(b=>E[b]!==void 0&&E[b]!==O[b])&&(x={},t.forEach(b=>{x[b]=E[b]!==void 0?E[b]:O[b],delete E[b]})),!x&&(E.minW||E.minH||E.maxW||E.maxH)&&(x={}),E.content!==void 0){const b=U.querySelector(".grid-stack-item-content");b&&b.textContent!==E.content&&(O.content=E.content,ja.renderCB(b,E),(ae=O.subGrid)!=null&&ae.el&&(b.appendChild(O.subGrid.el),O.subGrid._updateContainerHeight())),delete E.content}let u=!1,e=!1;for(const b in E)b[0]!=="_"&&O[b]!==E[b]&&(O[b]=E[b],u=!0,e=e||!this.opts.staticGrid&&(b==="noResize"||b==="noMove"||b==="locked"));if(In.sanitizeMinMax(O),x){const b=x.w!==void 0&&x.w!==O.w;this.moveNode(O,x),b&&O.subGrid?O.subGrid.onResize(this.hasAnimationCSS()?O.w:void 0):this.resizeToContentCheck(b,O),delete O._orig}(x||u)&&this._writeAttr(U,O),e&&this.prepareDragDrop(O.el),ja.updateCB&&ja.updateCB(O)}),this}moveNode(d,A){const U=d._updating;U||this.engine.cleanNodes().beginUpdate(d),this.engine.moveNode(d,A),this._updateContainerHeight(),U||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(d){var A,U;if(!d||(d.classList.remove("size-to-content-max"),!d.clientHeight))return;const ae=d.gridstackNode;if(!ae)return;const O=ae.grid;if(!O||d.parentElement!==O.el)return;const E=O.getCellHeight(!0);if(!E)return;let t=ae.h?ae.h*E:d.clientHeight,x;if(ae.resizeToContentParent&&(x=d.querySelector(ae.resizeToContentParent)),x||(x=d.querySelector(ja.resizeToContentParent)),!x)return;const u=d.clientHeight-x.clientHeight,e=ae.h?ae.h*E-u:x.clientHeight;let b;if(ae.subGrid){b=ae.subGrid.getRow()*ae.subGrid.getCellHeight(!0);const h=ae.subGrid.el.getBoundingClientRect(),r=d.getBoundingClientRect();b+=h.top-r.top}else{if((U=(A=ae.subGridOpts)==null?void 0:A.children)!=null&&U.length)return;{const h=x.firstElementChild;if(!h){console.error(`Error: GridStack.resizeToContent() widget id:${ae.id} '${ja.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}b=h.getBoundingClientRect().height||e}}if(e===b)return;t+=b-e;let f=Math.ceil(t/E);const v=Number.isInteger(ae.sizeToContent)?ae.sizeToContent:0;v&&f>v&&(f=v,d.classList.add("size-to-content-max")),ae.minH&&f<ae.minH?f=ae.minH:ae.maxH&&f>ae.maxH&&(f=ae.maxH),f!==ae.h&&(O._ignoreLayoutsNodeChange=!0,O.moveNode(ae,{h:f}),delete O._ignoreLayoutsNodeChange)}resizeToContentCBCheck(d){ja.resizeToContentCB?ja.resizeToContentCB(d):this.resizeToContent(d)}rotate(d,A){return ja.getElements(d).forEach(U=>{const ae=U.gridstackNode;if(!In.canBeRotated(ae))return;const O={w:ae.h,h:ae.w,minH:ae.minW,minW:ae.minH,maxH:ae.maxW,maxW:ae.maxH};if(A){const t=A.left>0?Math.floor(A.left/this.cellWidth()):0,x=A.top>0?Math.floor(A.top/this.opts.cellHeight):0;O.x=ae.x+t-(ae.h-(x+1)),O.y=ae.y+x-t}Object.keys(O).forEach(t=>{O[t]===void 0&&delete O[t]});const E=ae._orig;this.update(U,O),ae._orig=E}),this}margin(d){if(!(typeof d=="string"&&d.split(" ").length>1)){const A=In.parseHeight(d);if(this.opts.marginUnit===A.unit&&this.opts.margin===A.h)return}return this.opts.margin=d,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(d){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const A=arguments;let U=0,ae={x:A[U++],y:A[U++],w:A[U++],h:A[U++],autoPosition:A[U++]};return this.willItFit(ae)}return this.engine.willItFit(d)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const d=this.engine.getDirtyNodes(!0);return d&&d.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(d),this._triggerEvent("change",d)),this.engine.saveInitial(),this}_triggerAddEvent(){var d;if(this.engine.batchMode)return this;if((d=this.engine.addedNodes)!=null&&d.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(U=>{delete U._dirty});const A=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",A)}return this}_triggerRemoveEvent(){var d;if(this.engine.batchMode)return this;if((d=this.engine.removedNodes)!=null&&d.length){const A=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",A)}return this}_triggerEvent(d,A){const U=A?new CustomEvent(d,{bubbles:!1,detail:A}):new Event(d);let ae=this;for(;ae.parentGridNode;)ae=ae.parentGridNode.grid;return ae.el.dispatchEvent(U),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const d=this.parentGridNode;let A=this.getRow()+this._extraDragRow;const U=this.opts.cellHeight,ae=this.opts.cellHeightUnit;if(!U)return this;if(!d&&!this.opts.minRow){const O=In.parseHeight(getComputedStyle(this.el).minHeight);if(O.h>0&&O.unit===ae){const E=Math.floor(O.h/U);A<E&&(A=E)}}return this.el.setAttribute("gs-current-row",String(A)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),A&&(this.el.style[d?"minHeight":"height"]=A*U+ae),d&&In.shouldSizeToContent(d)&&d.grid.resizeToContentCBCheck(d.el),this}_prepareElement(d,A=!1,U){U=U||this._readAttr(d),d.gridstackNode=U,U.el=d,U.grid=this,U=this.engine.addNode(U,A),this._writeAttr(d,U),d.classList.add(wu.itemClass,this.opts.itemClass);const ae=In.shouldSizeToContent(U);return ae?d.classList.add("size-to-content"):d.classList.remove("size-to-content"),ae&&this.resizeToContentCheck(!1,U),In.lazyLoad(U)||this.prepareDragDrop(U.el),this}_writePosAttr(d,A){return(!A._moving&&!A._resizing||this._placeholder===d)&&(d.style.top=A.y?A.y===1?"var(--gs-cell-height)":`calc(${A.y} * var(--gs-cell-height))`:null,d.style.left=A.x?A.x===1?"var(--gs-column-width)":`calc(${A.x} * var(--gs-column-width))`:null,d.style.width=A.w>1?`calc(${A.w} * var(--gs-column-width))`:null,d.style.height=A.h>1?`calc(${A.h} * var(--gs-cell-height))`:null),A.x>0?d.setAttribute("gs-x",String(A.x)):d.removeAttribute("gs-x"),A.y>0?d.setAttribute("gs-y",String(A.y)):d.removeAttribute("gs-y"),A.w>1?d.setAttribute("gs-w",String(A.w)):d.removeAttribute("gs-w"),A.h>1?d.setAttribute("gs-h",String(A.h)):d.removeAttribute("gs-h"),this}_writeAttr(d,A){if(!A)return this;this._writePosAttr(d,A);const U={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const ae in U)A[ae]?d.setAttribute(U[ae],String(A[ae])):d.removeAttribute(U[ae]);return this}_readAttr(d,A=!0){const U={};U.x=In.toNumber(d.getAttribute("gs-x")),U.y=In.toNumber(d.getAttribute("gs-y")),U.w=In.toNumber(d.getAttribute("gs-w")),U.h=In.toNumber(d.getAttribute("gs-h")),U.autoPosition=In.toBool(d.getAttribute("gs-auto-position")),U.noResize=In.toBool(d.getAttribute("gs-no-resize")),U.noMove=In.toBool(d.getAttribute("gs-no-move")),U.locked=In.toBool(d.getAttribute("gs-locked"));const ae=d.getAttribute("gs-size-to-content");ae&&(ae==="true"||ae==="false"?U.sizeToContent=In.toBool(ae):U.sizeToContent=parseInt(ae,10)),U.id=d.getAttribute("gs-id"),U.maxW=In.toNumber(d.getAttribute("gs-max-w")),U.minW=In.toNumber(d.getAttribute("gs-min-w")),U.maxH=In.toNumber(d.getAttribute("gs-max-h")),U.minH=In.toNumber(d.getAttribute("gs-min-h")),A&&(U.w===1&&d.removeAttribute("gs-w"),U.h===1&&d.removeAttribute("gs-h"),U.maxW&&d.removeAttribute("gs-max-w"),U.minW&&d.removeAttribute("gs-min-w"),U.maxH&&d.removeAttribute("gs-max-h"),U.minH&&d.removeAttribute("gs-min-h"));for(const O in U){if(!U.hasOwnProperty(O))return;!U[O]&&U[O]!==0&&O!=="sizeToContent"&&delete U[O]}return U}_setStaticClass(){const d=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...d),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...d),this.el.removeAttribute("gs-static")),this}onResize(d=(A=>(A=this.el)==null?void 0:A.clientWidth)()){if(!d||this.prevWidth===d)return;this.prevWidth=d,this.batchUpdate();let A=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),A=!0):A=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(U=>{U.subGrid&&U.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(A),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(d=!1,A=void 0){if(this.engine){if(d&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,A),this.animationDelay);if(A)In.shouldSizeToContent(A)&&this.resizeToContentCBCheck(A.el);else if(this.engine.nodes.some(U=>In.shouldSizeToContent(U))){const U=[...this.engine.nodes];this.batchUpdate(),U.forEach(ae=>{In.shouldSizeToContent(ae)&&this.resizeToContentCBCheck(ae.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,A?[A]:this.engine.nodes)}}_updateResizeEvent(d=!1){const A=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(U=>U.sizeToContent));return!d&&A&&!this.resizeObserver?(this._sizeThrottle=In.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(d||!A)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(d=".grid-stack-item"){return In.getElement(d)}static getElements(d=".grid-stack-item"){return In.getElements(d)}static getGridElement(d){return ja.getElement(d)}static getGridElements(d){return In.getElements(d)}_initMargin(){let d,A=0,U=[];typeof this.opts.margin=="string"&&(U=this.opts.margin.split(" ")),U.length===2?(this.opts.marginTop=this.opts.marginBottom=U[0],this.opts.marginLeft=this.opts.marginRight=U[1]):U.length===4?(this.opts.marginTop=U[0],this.opts.marginRight=U[1],this.opts.marginBottom=U[2],this.opts.marginLeft=U[3]):(d=In.parseHeight(this.opts.margin),this.opts.marginUnit=d.unit,A=this.opts.margin=d.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(O=>{this.opts[O]===void 0?this.opts[O]=A:(d=In.parseHeight(this.opts[O]),this.opts[O]=d.h,delete this.opts.margin)}),this.opts.marginUnit=d.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const ae=this.el.style;return ae.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),ae.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),ae.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),ae.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return Fc}static setupDragIn(d,A,U,ae=document){(A==null?void 0:A.pause)!==void 0&&(Ka.pauseDrag=A.pause),A={appendTo:"body",helper:"clone",...A||{}},(typeof d=="string"?In.getElements(d,ae):d).forEach((O,E)=>{Fc.isDraggable(O)||Fc.dragIn(O,A),U!=null&&U[E]&&(O.gridstackNode=U[E])})}movable(d,A){return this.opts.staticGrid?this:(ja.getElements(d).forEach(U=>{const ae=U.gridstackNode;ae&&(A?delete ae.noMove:ae.noMove=!0,this.prepareDragDrop(ae.el))}),this)}resizable(d,A){return this.opts.staticGrid?this:(ja.getElements(d).forEach(U=>{const ae=U.gridstackNode;ae&&(A?delete ae.noResize:ae.noResize=!0,this.prepareDragDrop(ae.el))}),this)}disable(d=!0){if(!this.opts.staticGrid)return this.enableMove(!1,d),this.enableResize(!1,d),this._triggerEvent("disable"),this}enable(d=!0){if(!this.opts.staticGrid)return this.enableMove(!0,d),this.enableResize(!0,d),this._triggerEvent("enable"),this}enableMove(d,A=!0){return this.opts.staticGrid?this:(d?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(U=>{this.prepareDragDrop(U.el),U.subGrid&&A&&U.subGrid.enableMove(d,A)}),this)}enableResize(d,A=!0){return this.opts.staticGrid?this:(d?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(U=>{this.prepareDragDrop(U.el),U.subGrid&&A&&U.subGrid.enableResize(d,A)}),this)}cancelDrag(){var d;const A=(d=this._placeholder)==null?void 0:d.gridstackNode;A&&(A._isExternal?(A._isAboutToRemove=!0,this.engine.removeNode(A)):A._isAboutToRemove&&ja._itemRemoving(A.el,!1),this.engine.restoreInitial())}_removeDD(d){return Fc.draggable(d,"destroy").resizable(d,"destroy"),d.gridstackNode&&delete d.gridstackNode._initDD,delete d.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return Fc.droppable(this.el,"destroy"),this;let d,A;const U=(ae,O,E)=>{var t;E=E||O;const x=E.gridstackNode;if(!x)return;if(!((t=x.grid)!=null&&t.el)){E.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const v=E.getBoundingClientRect();E.style.left=v.x+(this.dragTransform.xScale-1)*(ae.clientX-v.x)/this.dragTransform.xScale+"px",E.style.top=v.y+(this.dragTransform.yScale-1)*(ae.clientY-v.y)/this.dragTransform.yScale+"px",E.style.transformOrigin="0px 0px"}let{top:u,left:e}=E.getBoundingClientRect();const b=this.el.getBoundingClientRect();e-=b.left,u-=b.top;const f={position:{top:u*this.dragTransform.xScale,left:e*this.dragTransform.yScale}};if(x._temporaryRemoved){if(x.x=Math.max(0,Math.round(e/A)),x.y=Math.max(0,Math.round(u/d)),delete x.autoPosition,this.engine.nodeBoundFix(x),!this.engine.willItFit(x)){if(x.autoPosition=!0,!this.engine.willItFit(x)){Fc.off(O,"drag");return}x._willFitPos&&(In.copyPos(x,x._willFitPos),delete x._willFitPos)}this._onStartMoving(E,ae,f,x,A,d)}else this._dragOrResize(E,ae,f,x,A,d)};return Fc.droppable(this.el,{accept:ae=>{const O=ae.gridstackNode||this._readAttr(ae,!1);if((O==null?void 0:O.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let E=!0;if(typeof this.opts.acceptWidgets=="function")E=this.opts.acceptWidgets(ae);else{const t=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;E=ae.matches(t)}if(E&&O&&this.opts.maxRow){const t={w:O.w,h:O.h,minW:O.minW,minH:O.minH};E=this.engine.willItFit(t)}return E}}).on(this.el,"dropover",(ae,O,E)=>{let t=(E==null?void 0:E.gridstackNode)||O.gridstackNode;if((t==null?void 0:t.grid)===this&&!t._temporaryRemoved)return!1;if(t!=null&&t._sidebarOrig&&(t.w=t._sidebarOrig.w,t.h=t._sidebarOrig.h),t!=null&&t.grid&&t.grid!==this&&!t._temporaryRemoved&&t.grid._leave(O,E),E=E||O,A=this.cellWidth(),d=this.getCellHeight(!0),!t){const e=E.getAttribute("data-gs-widget")||E.getAttribute("gridstacknode");if(e){try{t=JSON.parse(e)}catch{console.error("Gridstack dropover: Bad JSON format: ",e)}E.removeAttribute("data-gs-widget"),E.removeAttribute("gridstacknode")}t||(t=this._readAttr(E)),t._sidebarOrig={w:t.w,h:t.h}}t.grid||(t.el||(t={...t}),t._isExternal=!0,E.gridstackNode=t);const x=t.w||Math.round(E.offsetWidth/A)||1,u=t.h||Math.round(E.offsetHeight/d)||1;return t.grid&&t.grid!==this?(O._gridstackNodeOrig||(O._gridstackNodeOrig=t),O.gridstackNode=t={...t,w:x,h:u,grid:this},delete t.x,delete t.y,this.engine.cleanupNode(t).nodeBoundFix(t),t._initDD=t._isExternal=t._temporaryRemoved=!0):(t.w=x,t.h=u,t._temporaryRemoved=!0),ja._itemRemoving(t.el,!1),Fc.on(O,"drag",U),U(ae,O,E),!1}).on(this.el,"dropout",(ae,O,E)=>{const t=(E==null?void 0:E.gridstackNode)||O.gridstackNode;return t&&(!t.grid||t.grid===this)&&(this._leave(O,E),this._isTemp&&this.removeAsSubGrid(t)),!1}).on(this.el,"drop",(ae,O,E)=>{var t,x,u;const e=(E==null?void 0:E.gridstackNode)||O.gridstackNode;if((e==null?void 0:e.grid)===this&&!e._isExternal)return!1;const b=!!this.placeholder.parentElement,f=O!==E;this.placeholder.remove(),delete this.placeholder.gridstackNode,b&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const v=O._gridstackNodeOrig;if(delete O._gridstackNodeOrig,b&&v!=null&&v.grid&&v.grid!==this){const r=v.grid;r.engine.removeNodeFromLayoutCache(v),r.engine.removedNodes.push(v),r._triggerRemoveEvent()._triggerChangeEvent(),r.parentGridNode&&!r.engine.nodes.length&&r.opts.subGridDynamic&&r.removeAsSubGrid()}if(!e||(b&&(this.engine.cleanupNode(e),e.grid=this),(t=e.grid)==null||delete t._isTemp,Fc.off(O,"drag"),E!==O?(E.remove(),O=E):O.remove(),this._removeDD(O),!b))return!1;const h=(u=(x=e.subGrid)==null?void 0:x.el)==null?void 0:u.gridstack;return In.copyPos(e,this._readAttr(this.placeholder)),In.removePositioningStyles(O),f&&(e.content||e.subGridOpts||ja.addRemoveCB)?(delete e.el,O=this.addWidget(e)):(this._prepareElement(O,!0,e),this.el.appendChild(O),this.resizeToContentCheck(!1,e),h&&(h.parentGridNode=e),this._updateContainerHeight()),this.engine.addedNodes.push(e),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...ae,type:"dropped"},v&&v.grid?v:void 0,e),!1}),this}static _itemRemoving(d,A){if(!d)return;const U=d?d.gridstackNode:void 0;!(U!=null&&U.grid)||d.classList.contains(U.grid.opts.removableOptions.decline)||(A?U._isAboutToRemove=!0:delete U._isAboutToRemove,A?d.classList.add("grid-stack-item-removing"):d.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const d=document.querySelector(this.opts.removable);return d?(!this.opts.staticGrid&&!Fc.isDroppable(d)&&Fc.droppable(d,this.opts.removableOptions).on(d,"dropover",(A,U)=>ja._itemRemoving(U,!0)).on(d,"dropout",(A,U)=>ja._itemRemoving(U,!1)),this):this}prepareDragDrop(d,A=!1){const U=d==null?void 0:d.gridstackNode;if(!U)return;const ae=U.noMove||this.opts.disableDrag,O=U.noResize||this.opts.disableResize,E=this.opts.staticGrid||ae&&O;if((A||E)&&(U._initDD&&(this._removeDD(d),delete U._initDD),E&&d.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!A))return this;if(!U._initDD){let t,x;const u=(f,v)=>{this.triggerEvent(f,f.target),t=this.cellWidth(),x=this.getCellHeight(!0),this._onStartMoving(d,f,v,U,t,x)},e=(f,v)=>{this._dragOrResize(d,f,v,U,t,x)},b=f=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete U._moving,delete U._resizing,delete U._event,delete U._lastTried;const v=U.w!==U._orig.w,h=f.target;if(!(!h.gridstackNode||h.gridstackNode.grid!==this)){if(U.el=h,U._isAboutToRemove){const r=d.gridstackNode.grid;r._gsEventHandler[f.type]&&r._gsEventHandler[f.type](f,h),r.engine.nodes.push(U),r.removeWidget(d,!0,!0)}else In.removePositioningStyles(h),U._temporaryRemoved?(In.copyPos(U,U._orig),this._writePosAttr(h,U),this.engine.addNode(U)):this._writePosAttr(h,U),this.triggerEvent(f,h);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),f.type==="resizestop"&&(Number.isInteger(U.sizeToContent)&&(U.sizeToContent=U.h),this.resizeToContentCheck(v,U))}};Fc.draggable(d,{start:u,stop:b,drag:e}).resizable(d,{start:u,stop:b,resize:e}),U._initDD=!0}return Fc.draggable(d,ae?"disable":"enable").resizable(d,O?"disable":"enable"),this}_onStartMoving(d,A,U,ae,O,E){var t;if(this.engine.cleanNodes().beginUpdate(ae),this._writePosAttr(this.placeholder,ae),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=ae,(t=ae.grid)!=null&&t.el)this.dragTransform=In.getValuesFromTransformedElement(d);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const x=this.placeholder.closest(".grid-stack");this.dragTransform=In.getValuesFromTransformedElement(x)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(ae.el=this.placeholder,ae._lastUiPosition=U.position,ae._prevYPix=U.position.top,ae._moving=A.type==="dragstart",ae._resizing=A.type==="resizestart",delete ae._lastTried,A.type==="dropover"&&ae._temporaryRemoved&&(this.engine.addNode(ae),ae._moving=!0),this.engine.cacheRects(O,E,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),A.type==="resizestart"){const x=this.getColumn()-ae.x,u=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-ae.y;Fc.resizable(d,"option","minWidth",O*Math.min(ae.minW||1,x)).resizable(d,"option","minHeight",E*Math.min(ae.minH||1,u)).resizable(d,"option","maxWidth",O*Math.min(ae.maxW||Number.MAX_SAFE_INTEGER,x)).resizable(d,"option","maxWidthMoveLeft",O*Math.min(ae.maxW||Number.MAX_SAFE_INTEGER,ae.x+ae.w)).resizable(d,"option","maxHeight",E*Math.min(ae.maxH||Number.MAX_SAFE_INTEGER,u)).resizable(d,"option","maxHeightMoveUp",E*Math.min(ae.maxH||Number.MAX_SAFE_INTEGER,ae.y+ae.h))}}_dragOrResize(d,A,U,ae,O,E){const t={...ae._orig};let x,u=this.opts.marginLeft,e=this.opts.marginRight,b=this.opts.marginTop,f=this.opts.marginBottom;const v=Math.round(E*.1),h=Math.round(O*.1);if(u=Math.min(u,h),e=Math.min(e,h),b=Math.min(b,v),f=Math.min(f,v),A.type==="drag"){if(ae._temporaryRemoved)return;const n=U.position.top-ae._prevYPix;ae._prevYPix=U.position.top,this.opts.draggable.scroll!==!1&&In.updateScrollPosition(d,U.position,n);const c=U.position.left+(U.position.left>ae._lastUiPosition.left?-e:u),o=U.position.top+(U.position.top>ae._lastUiPosition.top?-f:b);t.x=Math.round(c/O),t.y=Math.round(o/E);const l=this._extraDragRow;if(this.engine.collide(ae,t)){const p=this.getRow();let m=Math.max(0,t.y+ae.h-p);this.opts.maxRow&&p+m>this.opts.maxRow&&(m=Math.max(0,this.opts.maxRow-p)),this._extraDragRow=m}else this._extraDragRow=0;if(this._extraDragRow!==l&&this._updateContainerHeight(),ae.x===t.x&&ae.y===t.y)return}else if(A.type==="resize"){if(t.x<0||(In.updateScrollResize(A,d,E),t.w=Math.round((U.size.width-u)/O),t.h=Math.round((U.size.height-b)/E),ae.w===t.w&&ae.h===t.h)||ae._lastTried&&ae._lastTried.w===t.w&&ae._lastTried.h===t.h)return;const n=U.position.left+u,c=U.position.top+b;t.x=Math.round(n/O),t.y=Math.round(c/E),x=!0}ae._event=A,ae._lastTried=t;const r={x:U.position.left+u,y:U.position.top+b,w:(U.size?U.size.width:ae.w*O)-u-e,h:(U.size?U.size.height:ae.h*E)-b-f};if(this.engine.moveNodeCheck(ae,{...t,cellWidth:O,cellHeight:E,rect:r,resizing:x})){ae._lastUiPosition=U.position,this.engine.cacheRects(O,E,b,e,f,u),delete ae._skipDown,x&&ae.subGrid&&ae.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const n=A.target;ae._sidebarOrig||this._writePosAttr(n,ae),this.triggerEvent(A,n)}}triggerEvent(d,A){let U=this;for(;U.parentGridNode;)U=U.parentGridNode.grid;U._gsEventHandler[d.type]&&U._gsEventHandler[d.type](d,A)}_leave(d,A){A=A||d;const U=A.gridstackNode;if(!U||(A.style.transform=A.style.transformOrigin=null,Fc.off(d,"drag"),U._temporaryRemoved))return;U._temporaryRemoved=!0,this.engine.removeNode(U),U.el=U._isExternal&&A?A:d;const ae=U._sidebarOrig;U._isExternal&&this.engine.cleanupNode(U),U._sidebarOrig=ae,this.opts.removable===!0&&ja._itemRemoving(d,!0),d._gridstackNodeOrig?(d.gridstackNode=d._gridstackNodeOrig,delete d._gridstackNodeOrig):U._isExternal&&this.engine.restoreInitial()}commit(){return Dre(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}ja.renderCB=(a,d)=>{a&&d!=null&&d.content&&(a.textContent=d.content)},ja.resizeToContentParent=".grid-stack-item-content",ja.Utils=In,ja.Engine=Pd,ja.GDRev="12.2.2";const Bre=[{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}],W5=new Map([[9,{id:9,analysisTypes:new Map([["2-20",{analysisType:"successfulPasses",name:"Pases acertados",title:"Mapeo de pases acertados"}],["3-21",{analysisType:"unsuccessfulPasses",name:"Pases no acertados",title:"Mapeo de pases no acertados"}],["222-223-224-225",{analysisType:"recoveredBalls",name:"Balones recuperados",title:"Mapeo de balones recuperados"}],["226-227-228-229",{analysisType:"lostBalls",name:"Balones perdidos",title:"Mapeo de balones perdidos"}]])}]]);class Tg{constructor(d,A=new Map,U,ae=null,O=!1,E=!1,t=null){Ad(this,"id",""),Ad(this,"childViews",[]),Ad(this,"viewId",0),Ad(this,"dynamicFilters",null),Ad(this,"isPostMatch",!1),Ad(this,"isTemplateMode",!1),Ad(this,"filtresJSON",null),Ad(this,"homeTeamViews",[]),Ad(this,"awayTeamViews",[]),this.id=d,this.viewId=U,this.childViews=A,this.dynamicFilters=ae,this.isPostMatch=O,this.isTemplateMode=E,this.filtresJSON=t,console.log("contructor, dynamicFilters",ae)}getId(){return this.id}setDynamicFilters(d){this.dynamicFilters=d}getDynamicFilters(){return this.dynamicFilters}addView(d,A=!1){var U,ae,O,E,t,x,u,e,b,f,v,h,r,n,c,o,l,p,m,w,T,k,M,P,S,L,C,_,z,y;if(console.log("addView: ###################################################"),console.log("this.dynamicFilters",this.dynamicFilters),d.view.filterAndViewsContainer=this,Qo.emit("component-added-to-container",this),this.viewId===5&&d.view.componentProps&&!A&&(d.view.componentProps.preMatchType=this.dynamicFilters[0]!==3&&this.dynamicFilters[0]||1),this.viewId===9&&(console.log("id 9"),console.log("this.dynamicFilters",this.dynamicFilters),d.view.componentProps&&!A)){const N=this.dynamicFilters[0].map(j=>j.join("-"));console.log("categoriesIdsString",N);const I=this.dynamicFilters[1],V=W5.get(this.viewId);if(I!==3){const j=I===1?this.homeTeamViews:this.awayTeamViews;d.view.componentProps.isHomeTeamForAnalysis=I===1;for(let W=0;W<N.length;W++){const q=V.analysisTypes.get(N[W]);j.find($=>$.view.componentProps.analysisType===q.analysisType)||(d.view.componentProps.analysisType=q.analysisType,d.view.title=q.title)}j.push(d)}}this.viewId===2&&d.view.componentProps&&d.view.game&&(d.view.componentProps.gamed=(ae=(U=d.view)==null?void 0:U.game)==null?void 0:ae.game_id,d.view.componentProps.game=(O=d.view)==null?void 0:O.game,d.view.componentProps.season=(t=(E=d.view)==null?void 0:E.game)==null?void 0:t.season_id,d.view.componentProps.teamView=this.dynamicFilters[1]==2?(u=(x=d.view)==null?void 0:x.game)==null?void 0:u.visiting_team:this.dynamicFilters[1]==1?(b=(e=d.view)==null?void 0:e.game)==null?void 0:b.home_team:0,d.view.componentProps.categoryView=this.dynamicFilters[0].length>0?[{id:this.dynamicFilters[0][0],name:((f=Bre.filter(N=>N.id===this.dynamicFilters[0][0])[0])==null?void 0:f.name)||"default"}]:[{id:0,name:"Category"}]),this.viewId===8&&d.view.componentProps&&d.view.game&&(d.view.componentProps.areInactiveVisible=this.dynamicFilters[0],d.view.componentProps.gamed=(v=d.view)==null?void 0:v.game,d.view.componentProps.isDefault=!1),this.viewId===6&&d.view.componentProps&&d.view.game&&(this.isPostMatch?(d.view.componentProps.selectedOption="Postmatch",d.view.componentProps.game={game_id:(r=(h=d.view)==null?void 0:h.game)==null?void 0:r.game_id,season_id:(c=(n=d.view)==null?void 0:n.game)==null?void 0:c.season_id,prematch:!1},d.view.componentProps.gamehome={game_id:(l=(o=d.view)==null?void 0:o.game)==null?void 0:l.game_id,season_id:(m=(p=d.view)==null?void 0:p.game)==null?void 0:m.season_id,prematch:!1},d.view.componentProps.gameaway={game_id:(T=(w=d.view)==null?void 0:w.game)==null?void 0:T.game_id,season_id:(M=(k=d.view)==null?void 0:k.game)==null?void 0:M.season_id,prematch:!1}):d.view.componentProps.selectedOption="Prematch"),this.viewId===3&&d.view.componentProps&&d.view.game&&(d.view.componentProps._isReactive||(d.view.componentProps=g.reactive(d.view.componentProps),d.view.componentProps._isReactive=!0),d.view.componentProps.game=(P=d.view)==null?void 0:P.game,d.view.componentProps.defaultShields=!1,d.view.dynamicFilters&&d.view.dynamicFilters.length>0?d.view.componentProps.desplegable=d.view.dynamicFilters[0]:d.view.componentProps.desplegable=this.dynamicFilters[0]||!1,Qo.emit("component-props-updated",{viewId:d.view.id,componentProps:d.view.componentProps,dynamicFilters:this.dynamicFilters})),this.viewId===4&&d.view.componentProps&&d.view.game&&this.isPostMatch&&(d.view.componentProps.key=!1,d.view.componentProps.isDefault=!1,d.view.componentProps.gameId=(L=(S=d.view)==null?void 0:S.game)==null?void 0:L.game_id,d.view.componentProps.homeTeam=(_=(C=d.view)==null?void 0:C.game)==null?void 0:_.home_team,d.view.componentProps.awayTeam=(y=(z=d.view)==null?void 0:z.game)==null?void 0:y.visiting_team),this.childViews.push(d),console.log("this.childViews",this.childViews)}getHowManyViewsToAdd(d){if(this.viewId===5)return 1;if(this.viewId===6){const A=d[0];return A===2||A===3?A:1}if(this.viewId===9){const A=d[0],U=d[1];if(U===1||U===2){const ae=U===1?this.homeTeamViews:this.awayTeamViews;return A.length-ae.length}else return A*2-(this.homeTeamViews.length+this.awayTeamViews.length)}return 0}getRequiresAddView(d){if(console.log("getRequiresAddView",this.viewId,d),console.log("this.dynamicFilters",this.dynamicFilters),this.viewId===5)return d[0]===3&&this.childViews.length<2;if(this.viewId===6){const A=d[0];return A===2||A===3}return this.viewId===9?this.getRequiresAddViewMultipleAndBothTeams(d):!1}getRequiresAddViewMultipleAndBothTeams(d){console.log("*******************************************************"),console.log("dynamicFilters",d),console.log("this.dynamicFilters",this.dynamicFilters);const A=d[0].length,U=d[1],ae=A*(U===1||U===2?1:2),O=U===3?this.homeTeamViews.length+this.awayTeamViews.length:this.homeTeamViews.length||this.awayTeamViews.length;return console.log("totalNewViews",ae,"totalViewsByTeam",O),console.log("totalViewsByTeam",O,"totalNewViews",ae),ae>O}getRequiresLessViews(d){if(console.log("getRequiresLessViews",this.viewId,d),this.viewId===5)return d[0]!==3&&this.childViews.length>1;if(this.viewId===6){const A=d[0];return(A===2||A===3)&&this.childViews.length>1}return!1}updateDynamicFilters(d){if(this.dynamicFilters=d,Qo.emit("component-added-to-container",this),this.viewId===5){const A=d[0]||1;if(A<3)if(this.childViews.length===1){const U=this.childViews[0];U.view.componentProps&&(U.view.componentProps.preMatchType=A)}else{const U=this.childViews.pop(),ae=U.grid,O=U.page,E=document.querySelector(`[gs-id="${U.view.id}"]`);if(ae&&E&&(ae.removeWidget(E),O)){const x=O.items.findIndex(u=>u.id===U.view.id);x!==-1&&O.items.splice(x,1)}const t=this.childViews[0];t.view.componentProps&&(t.view.componentProps.preMatchType=A)}else this.childViews.forEach((U,ae)=>{U.view.componentProps.preMatchType=ae+1})}if(this.viewId===9){const A=d[0],U=d[1];if(U!==3){const ae=U===1;if(ae&&this.homeTeamViews.length===0)this.awayTeamViews.forEach(O=>{O.view.componentProps.isHomeTeamForAnalysis=!0,O.view.isHomeTeam=!0,this.homeTeamViews.push(O)}),this.awayTeamViews=[];else if(!ae&&this.awayTeamViews.length===0)this.homeTeamViews.forEach(O=>{O.view.componentProps.isHomeTeamForAnalysis=!1,O.view.isHomeTeam=!1,this.awayTeamViews.push(O)}),this.homeTeamViews=[];else{const O=ae?this.homeTeamViews:this.awayTeamViews;if(O.length>A.length){const E=A.map(t=>{const x=t.join("-");return W5.get(this.viewId).analysisTypes.get(x).analysisType});O.forEach(t=>{E.includes(t.view.componentProps.analysisType)||this.removeChildView(t)})}}}console.log("updateDynamicFilters",this.homeTeamViews,this.awayTeamViews)}if(this.viewId,this.viewId,this.viewId,this.viewId===3){const A=d[0]||!1;this.childViews.forEach(U=>{U.view.componentProps&&(U.view.componentProps._isReactive||(U.view.componentProps=g.reactive(U.view.componentProps),U.view.componentProps._isReactive=!0),console.log("DynamicFilters 333333333333333333333333333333333333333",A),U.view.componentProps.desplegable=A,U.view.componentProps.key=A,Qo.emit("component-props-updated",{viewId:U.view.id,componentProps:U.view.componentProps,dynamicFilters:d}),Qo.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:U.view.id,dynamicFilters:d}))})}this.viewId}removeChildView(d){const A=this.childViews.findIndex(O=>O.view.id===d.view.id),U=this.homeTeamViews.findIndex(O=>O.view.id===d.view.id),ae=this.awayTeamViews.findIndex(O=>O.view.id===d.view.id);if(U!==-1&&this.homeTeamViews.splice(U,1),ae!==-1&&this.awayTeamViews.splice(ae,1),A!==-1){const O=this.childViews[A];this.childViews.splice(A,1);const E=O.grid,t=O.page,x=document.querySelector(`[gs-id="${O.view.id}"]`);if(E&&x&&(E.removeWidget(x),t)){const u=t.items.findIndex(e=>e.id===O.view.id);u!==-1&&(t.items.splice(u,1),t.items.length===0&&Qo.emit("empty-page",t),console.log("page.items",t.items))}}}updateView({view:d,dynamicFilters:A,filtersJSON:U}){this.dynamicFilters=A;const ae=this.childViews.find(O=>O.view.id===d.view.id);ae?(ae.view.filtersJSON=U,ae.view.coreView&&(ae.view.coreView.filtersJSON=U),this.viewId===5?this.updateVolumetricField(ae,A):this.viewId===3&&this.updateMatchSummary(ae,A)):console.log("viewToUpdate not found")}updateVolumetricField(d,A){d.view.componentProps&&(d.view.componentProps.preMatchType=A[0]||1)}updateMatchSummary(d,A){d.view.componentProps&&(d.view.componentProps._isReactive||(d.view.componentProps=g.reactive(d.view.componentProps),d.view.componentProps._isReactive=!0),d.view.componentProps.desplegable=A[0]||!1,d.view.componentProps.key=A[0]||!1,Qo.emit("component-props-updated",{viewId:d.view.id,componentProps:d.view.componentProps,dynamicFilters:A}),Qo.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:d.view.id,dynamicFilters:A}))}}const Ure={class:"template-page__header"},jre={class:"template-page__header__name"},qre=["value"],Wre={class:"template-page__header__details"},Hre={class:"template-page__header__details__teams"},Gre={class:"template-page__header__details__teams__team"},Xre={key:0,class:"template-page__header__details__teams__team__logo"},Kre=["src"],Jre={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$re={class:"template-page__header__details__teams__team"},Zre={key:0,class:"template-page__header__details__teams__team__logo"},Yre=["src"],Qre={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ene={class:"template-page__content"},tne=["id"],rne=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-max-w","gs-max-h","gs-min-w","gs-min-h","gs-no-resize","gs-no-move","gs-auto-position","onMounted"],nne=g.defineComponent({__name:"TemplateReportPage",props:{token:{type:String,default:""},game:{type:Object,default:()=>null},id:{type:[String,Number],default:()=>String(Date.now())},page:{type:Object,default:()=>({title:"Page 1",items:[{name:"Tabla jugadores",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]})},isPostMatch:{type:Boolean,default:!1},isTemplateMode:{type:Boolean,default:!1}},emits:["intersection-changed","delete-page","change-sort","edit-view","view-changed","component-props-updated","delete-view"],setup(a,{emit:d}){var A,U;const ae=g.ref(null);let O=null;const E=a,t=g.ref(!1),x=d,u=g.computed(()=>E.page.items.reduce((M,P)=>(M.set(P.id,P),M),new Map)),e=g.computed(()=>{var M,P,S,L;return E.game&&E.game.homeTeam&&E.game.awayTeam?{homeTeam:{name:((M=E.game.homeTeam)==null?void 0:M.acronym)||"LOC",logo:((P=E.game.homeTeam)==null?void 0:P.logo)||null},awayTeam:{name:((S=E.game.awayTeam)==null?void 0:S.acronym)||"VIS",logo:((L=E.game.awayTeam)==null?void 0:L.logo)||null}}:{homeTeam:{name:"LOC"},awayTeam:{name:"VIS"}}}),b=M=>{M.forEach(P=>{x("intersection-changed",P.isIntersecting)})};let f=null;function v(){const M={root:null,rootMargin:"0px",threshold:.7};f=new IntersectionObserver(b,M);const P=ae.value;P&&f.observe(P)}function h(){x("view-changed")}const r={game_id:0,season_id:0,prematch:!1},n={gameId:90209,id:90209,seasonId:1909,regularSeasonId:1909,matchday_name:"Matchday 1",status:1,score:[1,3],game_status:1,dateTimeUTC:"2024-09-05T22:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2936.png",team_id:2936,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2936.png",colloquial_name:"Guyana",acronym:"GUY",team_name:"Guyana"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/3279.png",team_id:3279,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/3279.png",colloquial_name:"Surinam",acronym:"SUR",team_name:"Surinam"},is_live:0,minutes:{home_goals_minutes:[],visiting_goals_minutes:[],home_yellow_cards_minutes:[],away_yellow_cards_minutes:[],home_red_cards_minutes:[],away_red_cards_minutes:[]}},c=new Map([[5,{component:V2,componentName:"GSCVolumetricField",props:{isGamePreMatch:!E.isPostMatch,areTeamsVisible:!1,isTitleVisible:!1,isGhostEffect:E.isTemplateMode,isTemplateMode:E.isTemplateMode}}],[2,{component:M_,componentName:"GscTopPlayer",props:{categoryView:[{id:0,name:"Category"}],gamed:(A=E==null?void 0:E.game)==null?void 0:A.game_id,game:E==null?void 0:E.game,season:(U=E==null?void 0:E.game)==null?void 0:U.season_id,teamView:0}}],[8,{component:zw,componentName:"FieldPosesion",props:{widthSection:600,game:n,areInactiveVisible:!1,showTitle:!1,isDefault:!0}}],[6,{component:D5,componentName:"GSCLineupsReports",props:{selectedOption:"Postmatch",game:r,gamehome:r,gameaway:r}}],[3,{component:Rw,componentName:"GSCMatchSummary",props:{game:n,defaultShields:!0,desplegable:!1}}],[4,{component:b3,componentName:"GSCTimelineReports",props:{key:!0,isDefault:!0,gameId:n.gameId,homeTeam:n.homeTeam.team_id,awayTeam:n.awayTeam.team_id,token:E.token}}],[9,{component:I5,componentName:"GSCFieldDataByZones",props:{game:E.game,isHomeTeamForAnalysis:!0,analysisType:"successfulPasses",canPlayVideos:!1,isPreMatch:!E.isPostMatch}}]]);function o(M){if(M)if(typeof M=="string"){let P=null;switch(M){case"GSCVolumetricField":P=V2;break;case"GscTopPlayer":P=M_;break;case"FieldPosesion":P=zw;break;case"GSCLineupsReports":P=D5;break;case"GSCMatchSummary":P=Rw;break;case"GSCTimelineReports":P=b3;break;case"GSCFieldDataByZones":P=I5;break;default:P=null}return P}else return M;return null}function l({pageId:M,view:P,filterAndWidgetContainer:S,applyMinimumSize:L=!1}){if(console.log("addView ----------------------------------------------"),console.log("pageId:",M),console.log("props.page.id:",E.page.id),E.page.id===M&&O){const C={w:L?P.min_column:P.colspan,h:L?P.min_row:P.rowspan};if(O.willItFit(0,0,C.w,C.h,!0)){const _=O.addWidget(C),z=Number(_.getAttribute("gs-x")||0),y=Number(_.getAttribute("gs-y")||0);O.removeWidget(_);const N=c.get(P.id),I=g.reactive({...JSON.parse(JSON.stringify(N.props))||{},_isReactive:!0}),V=g.reactive({pageId:M,grid:O,page:E.page,view:{name:P.name,title:P.title,id:`w-${String(Date.now())}`,x:z,y,w:C.w,h:C.h,maxWidth:P.max_column,maxHeight:P.max_row,minWidth:P.min_column,minHeight:P.min_row,componentName:N.componentName,componentProps:I,pageId:M,coreView:P}});S.addView(V),Qo.emit("add-page-view",V)}else Qo.emit("add-page-and-view",{pageId:M,view:P,filterAndWidgetContainer:S})}}function p(M){if(O){const P=document.querySelector(`[gs-id="${M.id}"]`);P&&(O.removeWidget(P),x("delete-view",M))}x("view-changed")}function m(M){if(!M.filterAndViewsContainer&&M.coreView){const P=new Tg(`FAWC-${Date.now()}-${Math.random()}`,[],M.coreView.id,M.dynamicFilters||[],E.isPostMatch,E.isTemplateMode,M.filtersJSON);M.filterAndViewsContainer=P}x("edit-view",M)}function w(){x("delete-page",E.page)}function T(){Qo.emit("change-sort",E.page)}const k=function(){Qo.off("add-view",l)};return Qo.on("add-view",l),Qo.on("force-component-update",M=>{console.log("Force component update:",M);const P=E.page.items.find(S=>S.id===M.itemId);P&&(Object.assign(P.componentProps,M.componentProps),P._updateKey=Date.now(),console.log("Forced component update for item:",M.itemId,P.componentProps))}),g.onMounted(async()=>{await g.nextTick(),O=ja.init({column:12,row:12,maxRow:12,cellHeight:60,float:!0,resizable:{handles:"e, se, s, sw, w"}},`#grid-stack-${E.id}`),O.on("change",(M,P)=>{const S=P[0];if(S){const L=u.value.get(S.id);L&&(L.x=S.x,L.y=S.y,L.w=S.w,L.h=S.h,x("view-changed"))}}),v(),E.page.grid=O,E.page.offAddView=k}),(M,P)=>(g.openBlock(),g.createElementBlock("div",{ref_key:"templatePage",ref:ae,class:"template-page"},[g.createElementVNode("div",Ure,[t.value?(g.openBlock(),g.createBlock(F5,{key:0,"options-type":"page",onClick:P[0]||(P[0]=g.withModifiers(S=>t.value=!1,["self"])),onMouseleave:P[1]||(P[1]=S=>t.value=!1),onCloseTooltip:P[2]||(P[2]=S=>t.value=!1),onDeletePage:w,onChangeSort:T})):g.createCommentVNode("",!0),g.createElementVNode("div",jre,[P[4]||(P[4]=g.createElementVNode("div",null,[g.createElementVNode("svg",{width:"19",height:"21",viewBox:"0 0 19 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M11.2986 12.9994C7.62909 14.8341 4.11744 16.0178 1.35547 16.4518L9.18763 20.0029C9.34545 20.0818 9.60192 20.0818 9.74002 20.0029L17.8878 16.3137C18.0457 16.2348 18.164 16.0572 18.164 15.8797V8.75781C16.2898 10.2177 13.9422 11.6776 11.2986 12.9994Z",fill:"white"}),g.createElementVNode("path",{d:"M4.7152 8.89735C4.7152 8.89735 10.9494 3.76802 16.8482 1.20335C15.0529 0.946887 11.3637 0.43395 9.3711 0.453678C4.41928 0.493135 1.06546 1.34145 1.06546 1.34145C0.90763 1.3809 0.769531 1.55846 0.769531 1.71629V8.12795C3.01857 6.56942 5.34651 5.56329 5.34651 5.56329C5.34651 5.56329 2.72264 7.06263 0.769531 8.81844V9.41028V14.1648C3.09748 13.9675 6.62886 12.7641 10.3575 10.7321C13.6719 8.91707 16.4733 6.84562 18.17 5.05035V2.40677C14.3032 3.37346 4.7152 8.89735 4.7152 8.89735Z",fill:"white"})])],-1)),P[5]||(P[5]=g.createElementVNode("div",{class:"separator"},null,-1)),g.createElementVNode("input",{value:a.page.title,type:"text",class:"page-title-input",onclick:"this.select()",onInput:h},null,40,qre)]),g.createElementVNode("div",Wre,[g.createElementVNode("div",Hre,[g.createElementVNode("div",Gre,[e.value.homeTeam.logo?(g.openBlock(),g.createElementBlock("div",Xre,[g.createElementVNode("img",{src:e.value.homeTeam.logo,alt:"Home Team Logo",width:"25",height:"25"},null,8,Kre)])):(g.openBlock(),g.createElementBlock("svg",Jre,P[6]||(P[6]=[g.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)]))),g.createElementVNode("span",null,g.toDisplayString(e.value.homeTeam.name),1)]),P[8]||(P[8]=g.createElementVNode("div",{class:"template-page__header__details__teams__vs"}," VS ",-1)),g.createElementVNode("div",$re,[g.createElementVNode("span",null,g.toDisplayString(e.value.awayTeam.name),1),e.value.awayTeam.logo?(g.openBlock(),g.createElementBlock("div",Zre,[g.createElementVNode("img",{src:e.value.awayTeam.logo,alt:"Away Team Logo",width:"25",height:"25"},null,8,Yre)])):(g.openBlock(),g.createElementBlock("svg",Qre,P[7]||(P[7]=[g.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])))])]),a.isTemplateMode?(g.openBlock(),g.createElementBlock("div",{key:0,class:"template-page__header__details__options",onClick:P[3]||(P[3]=S=>t.value=!0)},P[9]||(P[9]=[g.createElementVNode("svg",{width:"17",height:"13",viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M3.56953 6.28672C3.56953 7.19972 2.83253 7.93672 1.91953 7.93672C1.00653 7.93672 0.269531 7.19972 0.269531 6.28672C0.269531 5.37372 1.00653 4.63672 1.91953 4.63672C2.83253 4.63672 3.56953 5.37372 3.56953 6.28672ZM8.51953 4.63672C7.60653 4.63672 6.86953 5.37372 6.86953 6.28672C6.86953 7.19972 7.60653 7.93672 8.51953 7.93672C9.43253 7.93672 10.1695 7.19972 10.1695 6.28672C10.1695 5.37372 9.43253 4.63672 8.51953 4.63672ZM15.1195 4.63672C14.2065 4.63672 13.4695 5.37372 13.4695 6.28672C13.4695 7.19972 14.2065 7.93672 15.1195 7.93672C16.0325 7.93672 16.7695 7.19972 16.7695 6.28672C16.7695 5.37372 16.0325 4.63672 15.1195 4.63672Z",fill:"white"})],-1)]))):g.createCommentVNode("",!0)])]),g.createElementVNode("div",ene,[g.createElementVNode("div",{id:`grid-stack-${a.id}`,class:"grid-stack"},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(a.page.items,S=>{var L,C;return g.openBlock(),g.createElementBlock("div",{class:"grid-stack-item",key:S.id,"gs-id":S.id,"gs-x":S.x,"gs-y":S.y,"gs-w":S.w,"gs-h":S.h,"gs-max-w":S.maxWidth,"gs-max-h":S.maxHeight,"gs-min-w":S.minWidth,"gs-min-h":S.minHeight,"gs-no-resize":!a.isTemplateMode,"gs-no-move":!E.isTemplateMode,"gs-auto-position":S.x===0&&S.y===0,onMounted:()=>{S.componentName==="GSCMatchSummary"&&console.log("GSCMatchSummary component props:",S.componentProps)}},[g.createElementVNode("div",{class:g.normalizeClass(["grid-stack-item-content",{"is-selected":S.isSelected}])},[g.createVNode(Lre,{title:S.title,"is-template-mode":a.isTemplateMode,game:a.game,"is-home-team":(L=S.componentProps)!=null&&L.preMatchType?((C=S.componentProps)==null?void 0:C.preMatchType)===1:S.isHomeTeam,onEdit:_=>m(S),onDelete:_=>p(S)},{default:g.withCtx(()=>[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o(S.componentName)),g.mergeProps({ref_for:!0},S.componentProps,{key:`${S.id}-${S._updateKey||Date.now()}`}),null,16))]),_:2},1032,["title","is-template-mode","game","is-home-team","onEdit","onDelete"])],2)],40,rne)}),128))],8,tne)])],512))}}),ane=Ed(nne,[["__scopeId","data-v-7464d0c4"]]),ine={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},one={class:"cover__title-subtitle"},sne={class:"cover__title-subtitle__title"},lne={class:"cover__title-subtitle__subtitle"},cne={key:0,class:"cover-type-one"},une={class:"team-info-one"},dne={class:"team-data"},hne={key:0,class:"team-logo"},pne=["src"],fne={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mne=["fill","opacity"],gne={class:"team-name"},yne={key:0,class:"team-events"},vne={class:"score-one"},bne={key:0},xne={class:"team-info-one"},_ne={class:"team-data"},wne={key:0,class:"team-logo"},kne=["src"],Tne={key:1,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Sne=["fill","opacity"],Ane={class:"team-name"},Ene={key:0,class:"team-events"},Cne={key:1,class:"cover-type-two"},Mne={class:"team-data"},Pne={class:"team-info"},Lne={key:0,class:"team-logo"},zne=["src"],One={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Nne=["fill","opacity"],Rne={key:2,class:"team-score-two"},Dne={key:0,class:"team-goals"},Ine={class:"team-data"},Fne={class:"team-info"},Vne={key:0,class:"team-score-two"},Bne={key:1,class:"team-logo"},Une=["src"],jne={key:2,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qne=["fill","opacity"],Wne={key:0,class:"team-goals"},Hne={__name:"CoverPage",props:{game:{type:Object,default:()=>null},coverId:{type:Number,default:1},isPostMatch:{type:Boolean,default:!0}},emits:["intersection-changed"],setup(a,{emit:d}){const A=a,U=d,ae=g.ref(null),O=g.computed(()=>[1,2].includes(A.coverId)),E=g.computed(()=>[1,3].includes(A.coverId)),t=g.computed(()=>A.coverId===1?{homeTeam:"#1558CC",awayTeam:"#0046BF",opacity:1}:A.coverId===3?{homeTeam:"#000A1A",awayTeam:"#000A1A",opacity:.4}:{homeTeam:"#576883",awayTeam:"#576883",opacity:.4}),x=g.computed(()=>A.game&&A.game.score?A.game.score:["0","0"]),u=g.computed(()=>{var l,p,m,w,T,k,M,P;if(A.game&&A.game.homeTeam&&A.game.awayTeam){const S={homeTeam:{name:((l=A.game.homeTeam)==null?void 0:l.acronym)||"LOC",logo:((p=A.game.homeTeam)==null?void 0:p.logo)||null},awayTeam:{name:((m=A.game.awayTeam)==null?void 0:m.acronym)||"VIS",logo:((w=A.game.awayTeam)==null?void 0:w.logo)||null}};return O.value?(S.homeTeam.goalsMinutes=n(A.game.minutes.home_goals_minutes),S.homeTeam.totalYellowCards=((T=A.game.minutes.home_yellow_cards_minutes)==null?void 0:T.length)||0,S.homeTeam.totalRedCards=((k=A.game.minutes.home_red_cards_minutes)==null?void 0:k.length)||0,S.awayTeam.goalsMinutes=n(A.game.minutes.visiting_goals_minutes),S.awayTeam.totalYellowCards=((M=A.game.minutes.away_yellow_cards_minutes)==null?void 0:M.length)||0,S.awayTeam.totalRedCards=((P=A.game.minutes.away_red_cards_minutes)==null?void 0:P.length)||0):(S.homeTeam.goalsEvents=r(A.game.report_minutes.home_goals_minutes),S.awayTeam.goalsEvents=r(A.game.report_minutes.visiting_goals_minutes)),S}return{homeTeam:{name:"LOC",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]},awayTeam:{name:"VIS",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]}}}),e=g.computed(()=>({"--background-image":E.value?"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-01@2x.jpg)":"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-02@2x.jpg)","--grid-template-columns-type-one":A.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-one":A.isPostMatch?"100%":"fit-content","--grid-template-columns-type-two":A.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-two":A.isPostMatch?"100%":"fit-content"})),b=g.computed(()=>A.isPostMatch?"Postmatch":"Prematch"),f=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],v=g.computed(()=>{if(A.game){let l=ine[A.game.matchday_abbreviation];l||(l=A.game.matchday_abbreviation.replace("M","J"));const[p,m,w]=A.game.date.split("-");return`${l} - ${w} ${f[Number(m)-1]}, ${p}`}return"Jornada - Día 00 Mes"}),h=l=>{l.forEach(p=>{U("intersection-changed",p.isIntersecting)})};function r(l){return!l||!Array.isArray(l)||l.length===0?"":l.map(p=>{const m=p.split(", ");let w=m[0].replace("'","");w=w.replace("+",""),w=w.replace("’","");const T=w.split(" "),{strings:k,numbers:M}=T.reduce((L,C)=>(isNaN(Number(C))?L.strings.push(C):L.numbers.push(C),L),{strings:[],numbers:[]}),P=k.join(" "),S=M.length===1?`${M[0]}'`:`${M[0]}' ${M.slice(1).join(" + ")}'`;return{playerName:P,goalTime:m.length===1?S:`${S}, ${m.reduce((L,C,_)=>_===0?L:`${L}${_<m.length-1?", ":""}${C}`,"")}`}})}function n(l){return!l||!Array.isArray(l)||l.length===0?"":l.reduce((p,m,w)=>{const T=m.split(" ");let k="";return T.length===3?k=T[2]:T.length===5&&(k=`${T[2]} ${T[3]} ${T[4]}`),k&&(p+=`${k}${w<l.length-1?", ":""}`),p},"")}let c=null;function o(){const l={root:null,rootMargin:"0px",threshold:.7};c=new IntersectionObserver(h,l);const p=ae.value;p&&c.observe(p)}return g.onMounted(()=>{o()}),(l,p)=>(g.openBlock(),g.createElementBlock("div",{ref_key:"coverPage",ref:ae,class:"cover",style:g.normalizeStyle(e.value)},[g.createElementVNode("div",one,[g.createElementVNode("div",sne,[p[0]||(p[0]=g.createElementVNode("div",null,"Análisis",-1)),g.createElementVNode("div",null,g.toDisplayString(b.value),1)]),g.createElementVNode("div",lne,g.toDisplayString(v.value),1)]),O.value?(g.openBlock(),g.createElementBlock("div",cne,[g.createElementVNode("div",une,[g.createElementVNode("div",dne,[u.value.homeTeam.logo?(g.openBlock(),g.createElementBlock("div",hne,[g.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,pne)])):(g.openBlock(),g.createElementBlock("svg",fne,[g.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:t.value.homeTeam,opacity:t.value.opacity},null,8,mne)])),g.createElementVNode("div",gne,g.toDisplayString(u.value.homeTeam.name),1)]),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",yne,[p[1]||(p[1]=g.createStaticVNode('<svg class="ball" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-55e643d2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path></svg>',1)),g.createElementVNode("div",null,g.toDisplayString(u.value.homeTeam.goalsMinutes),1),p[2]||(p[2]=g.createElementVNode("div",{class:"separator"},null,-1)),p[3]||(p[3]=g.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),g.createElementVNode("div",null,g.toDisplayString(u.value.homeTeam.totalYellowCards),1),p[4]||(p[4]=g.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),g.createElementVNode("div",null,g.toDisplayString(u.value.homeTeam.totalRedCards),1)])):g.createCommentVNode("",!0)]),g.createElementVNode("div",vne,[a.isPostMatch?(g.openBlock(),g.createElementBlock("div",bne,g.toDisplayString(x.value[0])+" : "+g.toDisplayString(x.value[1]),1)):g.createCommentVNode("",!0)]),g.createElementVNode("div",xne,[g.createElementVNode("div",_ne,[u.value.awayTeam.logo?(g.openBlock(),g.createElementBlock("div",wne,[g.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,kne)])):(g.openBlock(),g.createElementBlock("svg",Tne,[g.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:t.value.awayTeam,opacity:t.value.opacity},null,8,Sne)])),g.createElementVNode("div",Ane,g.toDisplayString(u.value.awayTeam.name),1)]),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Ene,[g.createElementVNode("div",null,g.toDisplayString(u.value.awayTeam.totalYellowCards),1),p[5]||(p[5]=g.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),g.createElementVNode("div",null,g.toDisplayString(u.value.awayTeam.totalRedCards),1),p[6]||(p[6]=g.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),p[7]||(p[7]=g.createElementVNode("div",{class:"separator"},null,-1)),g.createElementVNode("div",null,g.toDisplayString(u.value.awayTeam.goalsMinutes),1),p[8]||(p[8]=g.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-55e643d2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path></svg>',1))])):g.createCommentVNode("",!0)])])):(g.openBlock(),g.createElementBlock("div",Cne,[g.createElementVNode("div",Mne,[g.createElementVNode("div",Pne,[u.value.homeTeam.logo?(g.openBlock(),g.createElementBlock("div",Lne,[g.createElementVNode("img",{src:u.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,zne)])):(g.openBlock(),g.createElementBlock("svg",One,[g.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:t.value.homeTeam,opacity:t.value.opacity},null,8,Nne)])),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Rne,g.toDisplayString(x.value[0]),1)):g.createCommentVNode("",!0)]),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Dne,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(u.value.homeTeam.goalsEvents,(m,w)=>(g.openBlock(),g.createElementBlock("div",{key:`goal-${w}`,class:"goal"},[g.createElementVNode("div",null,g.toDisplayString(m.playerName),1),p[9]||(p[9]=g.createElementVNode("div",{class:"bullet"},null,-1)),g.createElementVNode("div",null,g.toDisplayString(m.goalTime),1),p[10]||(p[10]=g.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-55e643d2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path></svg>',1))]))),128))])):g.createCommentVNode("",!0)]),p[13]||(p[13]=g.createElementVNode("div",{class:"separator"},null,-1)),g.createElementVNode("div",Ine,[g.createElementVNode("div",Fne,[a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Vne,g.toDisplayString(x.value[1]),1)):g.createCommentVNode("",!0),u.value.awayTeam.logo?(g.openBlock(),g.createElementBlock("div",Bne,[g.createElementVNode("img",{src:u.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,Une)])):(g.openBlock(),g.createElementBlock("svg",jne,[g.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:t.value.awayTeam,opacity:t.value.opacity},null,8,qne)]))]),a.isPostMatch?(g.openBlock(),g.createElementBlock("div",Wne,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(u.value.awayTeam.goalsEvents,(m,w)=>(g.openBlock(),g.createElementBlock("div",{key:`goal-a-${w}`,class:"goal"},[p[11]||(p[11]=g.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-55e643d2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-55e643d2></path></svg>',1)),g.createElementVNode("div",null,g.toDisplayString(m.goalTime),1),p[12]||(p[12]=g.createElementVNode("div",{class:"bullet"},null,-1)),g.createElementVNode("div",null,g.toDisplayString(m.playerName),1)]))),128))])):g.createCommentVNode("",!0)])]))],4))}},Gne=Ed(Hne,[["__scopeId","data-v-55e643d2"]]),Xne={class:"floating-bar"},Kne={class:"tab active"},Jne={class:"select-display"},$ne={class:"select-icon"},Zne=["src"],Yne={key:1,src:"https://golstatsimages.blob.core.windows.net/images-library/vector2.png",alt:"icono",class:"option-img-default"},Qne={key:0,class:"select-placeholder select-label"},eae={key:1,class:"select-label"},tae={key:0,class:"dropdown-menu field-menu"},rae=["onClick"],nae={class:"option-icon"},aae=["src","data-hover-src"],iae={class:"option-content"},oae={class:"option-title"},sae={key:0,class:"option-description"},lae={class:"select-display"},cae={class:"select-icon"},uae=["src"],dae=["src"],hae={class:"select-label"},pae={key:0,class:"dropdown-menu type-menu type-menu-grid"},fae={class:"option-grid"},mae=["onClick"],gae={class:"option-grid-title"},yae={class:"option-grid-icon"},vae=["src"],bae={key:1,class:"filter-separator"},xae=["onClick"],_ae={class:"select-display"},wae={key:0,class:"badge-categorias"},kae={key:0,class:"dropdown-menu type-menu multi-select-menu"},Tae={class:"multi-select-scroll-area"},Sae={class:"select-all-checkbox"},Aae=["checked","indeterminate","onChange"],Eae={class:"option-checkbox"},Cae=["checked","onChange"],Mae=["onClick"],Pae={class:"option-title"},Lae={class:"multi-select-footer"},zae={key:1,class:"custom-radio-group filter-inline"},Oae={class:"radio-label"},Nae={class:"radio-options"},Rae=["name","value","onUpdate:modelValue","disabled"],Dae={key:2,class:"check-group filter-inline"},Iae=["onUpdate:modelValue","checked","onChange"],Fae={key:3,class:"filter-separator"},Vae=Object.assign({name:"FloatingFiltersBar"},{__name:"filters",props:{token:{type:String,required:!0},view:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!1}},emits:["filters-changed","close"],setup(a,{expose:d,emit:A}){const U=a,ae=A,O=g.ref([]);let E=null,t=null,x=null;const u=g.ref(!1),e=g.computed(()=>O.value),b=g.ref(null),f=g.computed(()=>e.value[b.value]||null),v=g.computed(()=>{var de;const fe=((de=f.value)==null?void 0:de.views)||[];return w(fe)}),h=g.ref(null),r=g.computed(()=>v.value.find(de=>de.id===h.value)||null),n=g.ref([]);g.watch(r,de=>{var fe,re;if(!de||!Array.isArray(de.filters)){n.value=[];return}n.value=de.filters.map((oe,le)=>{var me,be;if(oe.type==="select")return[];if(oe.type==="radio-button")return((be=(me=oe.options)==null?void 0:me[0])==null?void 0:be.value)??null;if(oe.type==="check"){if(u.value&&x&&x.dynamicFilters){const ge=x.dynamicFilters[le];if(ge&&ge.isChecked!==void 0)return console.log(`Using saved checkbox value for filter ${le}:`,ge.isChecked),ge.isChecked}return!1}return null}),(fe=de.name)!=null&&fe.toLowerCase().includes("tops players")||(re=de.title)!=null&&re.toLowerCase().includes("tops players")||g.nextTick(()=>{u.value&&he(),$()})},{immediate:!0}),g.watch(()=>E,de=>{de&&de.dynamicFilters&&(console.log("FilterAndViewsContainer changed, updating dynamicFilters:",de.dynamicFilters),Array.isArray(de.dynamicFilters)&&(n.value=[...de.dynamicFilters]))},{deep:!0}),g.watch(()=>E==null?void 0:E.dynamicFilters,de=>{de&&Array.isArray(de)&&(console.log("Container dynamicFilters changed, updating:",de),n.value=[...de])},{deep:!0});function c(de,fe){const re=n.value[de];return Array.isArray(re)&&re.includes(fe)}function o(de,fe){Array.isArray(n.value[de])||(n.value[de]=[]);const re=n.value[de],oe=re.indexOf(fe);oe>-1?re.splice(oe,1):re.push(fe),$()}function l(de){var fe,re;const oe=n.value[de],le=(re=(fe=r.value)==null?void 0:fe.filters)==null?void 0:re[de];return!le||!le.options||!Array.isArray(oe)?!1:oe.length===le.options.length}function p(de){var fe,re;const oe=n.value[de],le=(re=(fe=r.value)==null?void 0:fe.filters)==null?void 0:re[de];return!le||!le.options||!Array.isArray(oe)?!1:oe.length>0&&oe.length<le.options.length}function m(){var de;return!(((de=r.value)==null?void 0:de.id)===6&&U.isPostMatch)}function w(de){return!de||!Array.isArray(de)?de:de.filter(fe=>{const re=(fe.name||fe.title||"").toLowerCase();return U.isPostMatch?U.isPostMatch?!["fortalezas","tabla general"].some(oe=>re.includes(oe)):!0:!["resumen general","timeline","datos relevantes"].some(oe=>re.includes(oe))})}function T(){var de,fe;const re=((fe=(de=f.value)==null?void 0:de.name)==null?void 0:fe.toLowerCase())||"";return re.includes("cancha")||re.includes("volumétrica")||re.includes("volumetric")}function k(de,fe){if(!u.value||!T())return!1;const re=String(de||"").toLowerCase(),oe=String(fe||"").toLowerCase();return re.includes("ambos")||oe.includes("ambos")}function M(de){var fe,re;const oe=(re=(fe=r.value)==null?void 0:fe.filters)==null?void 0:re[de];if(!oe||!oe.options)return;const le=oe.options.map(me=>me.value);Array.isArray(n.value[de])||(n.value[de]=[]),l(de)?n.value[de]=[]:n.value[de]=[...le],C.value=de,$()}const P=g.ref("ambos"),S=g.ref(!1),L=g.ref(!1),C=g.ref(null);function _(de,fe=!1){const re="https://golstatsimages.blob.core.windows.net/images-library/",oe="https://golstatsimages.blob.core.windows.net/reports-images/",le={cancha:"icn_cancha",grafico:"icn_grafico",gráfico:"icn_grafico",chart:"icn_grafico",volumetrica:"icn_cancha",volumétrica:"icn_cancha",volumetric:"icn_cancha",tabla:"icn_tabla",tablas:"icn_tabla",Tablas:"icn_tabla"},me=Object.keys(le).find(be=>de==null?void 0:de.toLowerCase().includes(be.toLowerCase()));if(me){const be=le[me],ge=fe?"":"-def";return me.toLowerCase().includes("tabla")?`${oe}${be}${ge}@2x.png`:`${re}${be}${ge}@2x.png`}return`${re}icn_default${fe?"":"-def"}.png`}function z(){return f.value?f.value.name:"Tipo de vista"}function y(){return r.value?r.value.name||r.value.title:"Visualización"}function N(){u.value||(S.value=!S.value,S.value&&(L.value=!1,g.nextTick(()=>{Z()})))}function I(){u.value||f.value&&(L.value=!L.value,L.value&&(S.value=!1))}function V(de){u.value||(b.value=de,S.value=!1,h.value=null,$())}function j(de){var fe,re;u.value||(h.value=de.id,L.value=!1,(fe=de.name)!=null&&fe.toLowerCase().includes("tops players")||(re=de.title)==null||re.toLowerCase().includes("tops players"))}function W(de){C.value=C.value===de?null:de}function q(de){de.target.closest(".custom-select")||(S.value=!1,L.value=!1)}function $(){var de,fe,re,oe,le,me,be,ge,_e,Ae,Ce,Me,ze,Ne,We,Pe,Be;console.log("emitChange called"),console.log("isEditMode.value:",u.value),console.log("viewToEdit:",t),console.log("dynamicFilters.value:",n.value);let Le=[],ve=[];r.value&&Array.isArray(r.value.filters)&&r.value.filters.forEach((Re,je)=>{if(Re.type==="select"&&Re.label==="Tipo de análisis"&&Re.id===2){const Ge=n.value[je]||[];Array.isArray(Ge)&&Ge.length>0&&(Le=Ge.map(Ze=>{var we;const Ie=(we=Re.options)==null?void 0:we.find(Fe=>Fe.value===Ze);return{value:Ze,label:(Ie==null?void 0:Ie.label)||Ze}}))}});const Ee=((fe=(de=r.value)==null?void 0:de.name)==null?void 0:fe.toLowerCase().includes("tops players"))||((oe=(re=r.value)==null?void 0:re.title)==null?void 0:oe.toLowerCase().includes("tops players")),Te=r.value&&Array.isArray(r.value.filters)?r.value.filters.some(Re=>Re.type==="select"&&Re.label==="Tipo de análisis"&&Re.id===2):!1;if(Ee&&Te&&Le.length===0||Te&&Le.length===0)return;ve=((me=(le=r.value)==null?void 0:le.filters)==null?void 0:me.map((Re,je)=>{var Ge,Ze;const we=n.value[je];return{filterId:Re.id||`filter_${je}`,filterType:Re.type,filterLabel:Re.label,filterIcon:Re.icon||null,selectedValue:we,selectedOptions:Re.type==="select"&&Array.isArray(we)&&we.length>0?we.map(Ie=>{var Fe;const He=(Fe=Re.options)==null?void 0:Fe.find(et=>et.value===Ie);return{value:Ie,label:(He==null?void 0:He.label)||Ie,icon:(He==null?void 0:He.icon)||null}}):null,selectedOption:Re.type==="radio-button"&&we?{value:we,label:((Ze=(Ge=Re.options)==null?void 0:Ge.find(Ie=>Ie.value===we))==null?void 0:Ze.label)||we}:null,isChecked:Re.type==="check"?we:null}}))||[];const qe={mainSelector:{id:((be=f.value)==null?void 0:be.id)||null,name:((ge=f.value)==null?void 0:ge.name)||null,url:((_e=f.value)==null?void 0:_e.url)||null},viewSelector:{id:((Ae=r.value)==null?void 0:Ae.id)||null,name:((Ce=r.value)==null?void 0:Ce.name)||((Me=r.value)==null?void 0:Me.title)||null,url:((ze=r.value)==null?void 0:ze.url)||null},team:P.value,dynamicFilters:ve,categoriasSeleccionadas:Le,timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!r.value,totalDynamicFilters:((We=(Ne=r.value)==null?void 0:Ne.filters)==null?void 0:We.length)||0,activeFilters:((Be=(Pe=r.value)==null?void 0:Pe.filters)==null?void 0:Be.filter((Re,je)=>{const Ge=n.value[je];return Array.isArray(Ge)?Ge.length>0:Ge!=null&&Ge!==!1}).length)||0}};ae("filters-changed",{main:f.value,view:r.value,team:P.value,dynamicFilters:n.value,filtersJSON:qe,filterAndViewsContainer:E,viewToEdit:t}),u.value&&t&&(x=qe,console.log("Updated editFiltersJSON:",x)),E&&(E.setDynamicFilters(n.value),console.log("Updated container with new dynamicFilters:",n.value))}function te(){t=null,x=null,E=null,b.value=null,h.value=null,P.value="ambos",n.value=[],S.value=!1,L.value=!1,C.value=null,u.value=!1}function X(de){de&&de.dynamicFilters&&(console.log("Updating filters from container:",de.dynamicFilters),Array.isArray(de.dynamicFilters)&&de.dynamicFilters.length>0&&(n.value=[...de.dynamicFilters]))}function ne(de){if(console.log("preselectFiltersFromJSON called with:",de),u.value=!0,de.mainSelector&&de.mainSelector.id){const fe=O.value.findIndex(re=>re.id===de.mainSelector.id);fe!==-1&&(b.value=fe,console.log("Selected main index:",fe))}de.viewSelector&&de.viewSelector.id&&f.value&&f.value.views.findIndex(fe=>fe.id===de.viewSelector.id)!==-1&&(h.value=de.viewSelector.id,console.log("Selected second id:",de.viewSelector.id)),de.dynamicFilters&&Array.isArray(de.dynamicFilters)?(console.log("Processing dynamic filters:",de.dynamicFilters),g.nextTick(()=>{setTimeout(()=>{console.log("Processing filters after delay"),console.log("selectedSecond.value:",r.value),r.value&&r.value.filters?(console.log("Filters available:",r.value.filters),de.dynamicFilters.forEach((fe,re)=>{if(console.log(`Processing filter data ${re}:`,fe),re<r.value.filters.length){const oe=r.value.filters[re];if(console.log(`Filter ${re}:`,oe),oe.type==="check"){const le=fe.isChecked;console.log(`Setting check filter ${re} to:`,le),typeof le=="boolean"?(n.value[re]=le,console.log(`Successfully set check filter ${re} to:`,le)):console.log(`Invalid isChecked value for filter ${re}:`,le)}else if(oe.type==="select"&&fe.selectedOptions){const le=fe.selectedOptions.map(me=>me.value);console.log(`Setting select filter ${re} to:`,le),n.value[re]=le}else oe.type==="radio-button"&&fe.selectedOption&&(console.log(`Setting radio filter ${re} to:`,fe.selectedOption.value),n.value[re]=fe.selectedOption.value)}else console.log(`Filter index ${re} out of range`)}),console.log("Final dynamicFilters.value:",n.value),E&&(E.setDynamicFilters(n.value),console.log("Updated container with new dynamicFilters:",n.value)),setTimeout(()=>{console.log("Emitting change after preselecting filters"),$()},500)):console.log("selectedSecond or filters not available")},300)})):console.log("No dynamicFilters found in filtersJSON")}function ee(){var de,fe,re,oe,le,me,be,ge,_e,Ae,Ce,Me,ze;return{mainSelector:{id:((de=f.value)==null?void 0:de.id)||null,name:((fe=f.value)==null?void 0:fe.name)||null,url:((re=f.value)==null?void 0:re.url)||null},viewSelector:{id:((oe=r.value)==null?void 0:oe.id)||null,name:((le=r.value)==null?void 0:le.name)||((me=r.value)==null?void 0:me.title)||null,url:((be=r.value)==null?void 0:be.url)||null},team:P.value,dynamicFilters:((_e=(ge=r.value)==null?void 0:ge.filters)==null?void 0:_e.map((Ne,We)=>{var Pe,Be;const Le=n.value[We];return{filterId:Ne.id||`filter_${We}`,filterType:Ne.type,filterLabel:Ne.label,filterIcon:Ne.icon||null,selectedValue:Le,selectedOptions:Ne.type==="select"&&Array.isArray(Le)&&Le.length>0?Le.map(ve=>{var Ee;const Te=(Ee=Ne.options)==null?void 0:Ee.find(qe=>qe.value===ve);return{value:ve,label:(Te==null?void 0:Te.label)||ve,icon:(Te==null?void 0:Te.icon)||null}}):null,selectedOption:Ne.type==="radio-button"&&Le?{value:Le,label:((Be=(Pe=Ne.options)==null?void 0:Pe.find(ve=>ve.value===Le))==null?void 0:Be.label)||Le}:null,isChecked:Ne.type==="check"?Le:null}}))||[],timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!r.value,totalDynamicFilters:((Ce=(Ae=r.value)==null?void 0:Ae.filters)==null?void 0:Ce.length)||0,activeFilters:((ze=(Me=r.value)==null?void 0:Me.filters)==null?void 0:ze.filter((Ne,We)=>{const Pe=n.value[We];return Array.isArray(Pe)?Pe.length>0:Pe!=null&&Pe!==!1}).length)||0}}}d({getCurrentFiltersJSON:ee});function J(){te(),ae("close")}g.onMounted(async()=>{document.addEventListener("click",q),g.nextTick(()=>{Z()});try{const de=await(await fetch("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/views",{headers:{Authorization:`${U.token}`}})).json();O.value=de.data||[]}catch(de){console.error("Error al obtener datos:",de)}});function Z(){document.querySelectorAll(".field-menu .option-card").forEach(de=>{const fe=de.querySelector(".option-img");if(!fe||!fe.dataset.hoverSrc)return;const re=fe.src,oe=fe.dataset.hoverSrc;de.addEventListener("mouseenter",()=>{fe.src=oe}),de.addEventListener("mouseleave",()=>{fe.src=re})})}g.onUnmounted(()=>{document.removeEventListener("click",q)}),Qo.on("set-filter-and-views-container",de=>{E=de,de&&X(de)}),Qo.on("component-added-to-container",de=>{console.log("Component added to container, updating filters, container:",de),X(de)}),Qo.on("edit-view",de=>{var fe,re,oe,le,me,be,ge;console.log("edit-view received:",de),t=de,E=((fe=de.view)==null?void 0:fe.filterAndViewsContainer)||null,x=null;const _e=[(oe=(re=de.view)==null?void 0:re.coreView)==null?void 0:oe.filtersJSON,(le=de.view)==null?void 0:le.filtersJSON,(me=de.coreView)==null?void 0:me.filtersJSON,de.filtersJSON,(ge=(be=de.view)==null?void 0:be.componentProps)==null?void 0:ge.filtersJSON];for(const Ae of _e)if(Ae){x=Ae,console.log("Found editFiltersJSON in:",Ae);break}console.log("Final editFiltersJSON:",x),x?(ne(x),setTimeout(()=>{he()},600)):console.log("No editFiltersJSON found, cannot preselect filters")});function ce(){C.value=null}function he(){u.value&&x&&x.dynamicFilters&&(console.log("Forcing checkbox update from editFiltersJSON"),x.dynamicFilters.forEach((de,fe)=>{var re,oe,le;de&&de.isChecked!==void 0&&((le=(oe=(re=r.value)==null?void 0:re.filters)==null?void 0:oe[fe])==null?void 0:le.type)==="check"&&(console.log(`Forcing checkbox ${fe} to:`,de.isChecked),n.value[fe]=de.isChecked)}))}return(de,fe)=>(g.openBlock(),g.createElementBlock("div",Xne,[g.createElementVNode("button",Kne,g.toDisplayString(u.value?"Editando visualización":"Nueva visualización"),1),g.createElementVNode("div",{class:g.normalizeClass(["custom-select main-select",{disabled:u.value}]),onClick:N},[g.createElementVNode("div",Jne,[g.createElementVNode("span",$ne,[f.value?(g.openBlock(),g.createElementBlock("img",{key:0,src:_(f.value.name,!1),alt:"icono",class:"option-img"},null,8,Zne)):(g.openBlock(),g.createElementBlock("img",Yne))]),f.value?(g.openBlock(),g.createElementBlock("span",eae,g.toDisplayString(z()),1)):(g.openBlock(),g.createElementBlock("span",Qne,"Tipo de vista")),g.createElementVNode("span",{class:g.normalizeClass(["arrow",{open:S.value}])},fe[4]||(fe[4]=[g.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[g.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)]),S.value?(g.openBlock(),g.createElementBlock("div",tae,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.value,(re,oe)=>(g.openBlock(),g.createElementBlock("div",{key:re.id,class:g.normalizeClass(["option-card",{active:b.value===oe}]),onClick:g.withModifiers(le=>V(oe),["stop"])},[g.createElementVNode("div",nae,[g.createElementVNode("img",{src:_(re.name,!1),"data-hover-src":_(re.name,!0),alt:"icono",class:"option-img-34"},null,8,aae)]),g.createElementVNode("div",iae,[g.createElementVNode("div",oae,g.toDisplayString(re.name),1),re.description?(g.openBlock(),g.createElementBlock("div",sae,g.toDisplayString(re.description),1)):g.createCommentVNode("",!0)])],10,rae))),128))])):g.createCommentVNode("",!0)],2),f.value?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["custom-select second-select",{disabled:u.value}]),onClick:I},[g.createElementVNode("div",lae,[g.createElementVNode("span",cae,[r.value?(g.openBlock(),g.createElementBlock("img",{key:0,src:r.value.url,alt:"icono",class:"option-img-graph2"},null,8,uae)):f.value?(g.openBlock(),g.createElementBlock("img",{key:1,src:_(f.value.name,!1),alt:"icono",class:"option-img"},null,8,dae)):g.createCommentVNode("",!0)]),g.createElementVNode("span",hae,g.toDisplayString(y()),1),g.createElementVNode("span",{class:g.normalizeClass(["arrow",{open:L.value}])},fe[5]||(fe[5]=[g.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[g.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)]),L.value&&f.value?(g.openBlock(),g.createElementBlock("div",pae,[g.createElementVNode("div",fae,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(v.value,re=>(g.openBlock(),g.createElementBlock("div",{key:re.id,class:g.normalizeClass(["option-card-grid",{active:h.value===re.id}]),onClick:g.withModifiers(oe=>j(re),["stop"])},[g.createElementVNode("div",gae,g.toDisplayString(re.name||re.title),1),g.createElementVNode("div",yae,[g.createElementVNode("img",{src:re.url,alt:"icono",class:"option-img-grid"},null,8,vae)])],10,mae))),128))])])):g.createCommentVNode("",!0)],2)):g.createCommentVNode("",!0),r.value?(g.openBlock(),g.createElementBlock("div",bae)):g.createCommentVNode("",!0),r.value&&r.value.filters&&m()?(g.openBlock(),g.createElementBlock("div",{key:2,class:g.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":r.value.filters.length>=2}])},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(r.value.filters,(re,oe)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:oe},[re.type==="select"?(g.openBlock(),g.createElementBlock("div",{key:0,class:"custom-select dynamic-select filter-inline",onClick:g.withModifiers(le=>W(oe),["stop"])},[g.createElementVNode("div",_ae,[fe[7]||(fe[7]=g.createElementVNode("span",{class:"select-icon select-analisis-icon"},[g.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),fe[8]||(fe[8]=g.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),Array.isArray(n.value[oe])&&n.value[oe].length>0?(g.openBlock(),g.createElementBlock("span",wae,g.toDisplayString(n.value[oe].length),1)):g.createCommentVNode("",!0),g.createElementVNode("span",{class:g.normalizeClass(["arrow",{open:C.value===oe}])},fe[6]||(fe[6]=[g.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[g.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)]),C.value===oe?(g.openBlock(),g.createElementBlock("div",kae,[g.createElementVNode("div",Tae,[g.createElementVNode("div",{class:"multi-select-header",onClick:fe[1]||(fe[1]=g.withModifiers(()=>{},["stop"]))},[g.createElementVNode("label",Sae,[g.createElementVNode("input",{type:"checkbox",checked:l(oe),indeterminate:p(oe),onChange:g.withModifiers(le=>M(oe),["stop"]),onClick:fe[0]||(fe[0]=g.withModifiers(()=>{},["stop"]))},null,40,Aae),fe[9]||(fe[9]=g.createElementVNode("span",{class:"select-all-label"},"Agregar todas",-1))])]),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(re.options,le=>(g.openBlock(),g.createElementBlock("div",{key:le.value,class:g.normalizeClass(["option-card multi-select-option",{active:c(oe,le.value)}]),onClick:fe[2]||(fe[2]=g.withModifiers(()=>{},["stop"]))},[g.createElementVNode("div",Eae,[g.createElementVNode("input",{type:"checkbox",checked:c(oe,le.value),onChange:g.withModifiers(me=>o(oe,le.value),["stop"])},null,40,Cae)]),g.createElementVNode("div",{class:"option-content",onClick:me=>o(oe,le.value)},[g.createElementVNode("div",Pae,g.toDisplayString(le.label),1)],8,Mae)],2))),128))]),g.createElementVNode("div",Lae,[g.createElementVNode("button",{class:"btn-listo",onClick:fe[3]||(fe[3]=g.withModifiers(le=>ce(),["stop"]))},"Listo")])])):g.createCommentVNode("",!0)],8,xae)):re.type==="radio-button"?(g.openBlock(),g.createElementBlock("div",zae,[g.createElementVNode("div",Oae,g.toDisplayString(re.label),1),g.createElementVNode("div",Nae,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(re.options,le=>(g.openBlock(),g.createElementBlock("label",{key:le.value,class:g.normalizeClass(["radio-option-card",{active:n.value[oe]===le.value}])},[g.withDirectives(g.createElementVNode("input",{type:"radio",name:"dynamic-radio-"+oe,value:le.value,"onUpdate:modelValue":me=>n.value[oe]=me,disabled:k(le.value,le.label),onChange:$},null,40,Rae),[[g.vModelRadio,n.value[oe]]]),g.createElementVNode("span",null,g.toDisplayString(le.label),1)],2))),128))])])):re.type==="check"?(g.openBlock(),g.createElementBlock("div",Dae,[g.createElementVNode("label",null,[g.withDirectives(g.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":le=>n.value[oe]=le,checked:n.value[oe],onChange:()=>{console.log(`Checkbox ${oe} changed to:`,n.value[oe]),$()}},null,40,Iae),[[g.vModelCheckbox,n.value[oe]]]),g.createTextVNode(" "+g.toDisplayString(re.label),1)])])):g.createCommentVNode("",!0),oe===1&&r.value.filters.length>2?(g.openBlock(),g.createElementBlock("div",Fae)):g.createCommentVNode("",!0)],64))),128))],2)):g.createCommentVNode("",!0),g.createElementVNode("button",{class:"close-btn",onClick:J},"✕")]))}}),Bae=Ed(Vae,[["__scopeId","data-v-90f99e05"]]),Uae={key:0,class:"modal-simple"},jae={class:"modal-simple__content"},qae={class:"modal-simple__content__header"},Wae={class:"modal-simple__content__body"},Hae={class:"modal-simple__content__footer"},Gae={__name:"ModalSimple",props:{modelValue:{type:Boolean,default:!1}},setup(a){return(d,A)=>(g.openBlock(),g.createBlock(g.Teleport,{to:"body"},[a.modelValue?(g.openBlock(),g.createElementBlock("div",Uae,[g.createElementVNode("div",jae,[g.createElementVNode("div",qae,[g.renderSlot(d.$slots,"header",{},void 0,!0)]),g.createElementVNode("div",Wae,[g.renderSlot(d.$slots,"body",{},void 0,!0)]),g.createElementVNode("div",Hae,[g.renderSlot(d.$slots,"footer",{},void 0,!0)])])])):g.createCommentVNode("",!0)]))}},Xae=Ed(Gae,[["__scopeId","data-v-1cc4f590"]]),Kae={class:"footer"},Jae={__name:"ModalCautionClose",props:{value:{type:Boolean,default:!1}},emits:["update:modelValue","action"],setup(a,{emit:d}){const A=d;function U(O){A("update:modelValue",O)}function ae(O){A("action",O),A("update:modelValue",!1)}return(O,E)=>(g.openBlock(),g.createBlock(Xae,{"modle-value":a.value,"onUpdate:modelValue":U},{header:g.withCtx(()=>E[2]||(E[2]=[g.createElementVNode("div",{class:"header"},"Descartar template",-1)])),body:g.withCtx(()=>E[3]||(E[3]=[g.createElementVNode("div",{class:"body"},"¿Estás seguro que deseas abandonar el proceso?",-1)])),footer:g.withCtx(()=>[g.createElementVNode("div",Kae,[g.createElementVNode("div",{role:"button",class:"btn btn-cancel",onClick:E[0]||(E[0]=t=>ae(!1))}," Seguir editando "),g.createElementVNode("div",{role:"button",class:"btn btn-confirm",onClick:E[1]||(E[1]=t=>ae(!0))}," Descartar ")])]),_:1},8,["modle-value"]))}},$ae=Ed(Jae,[["__scopeId","data-v-ed9b5088"]]),Zae={class:"template-maker__header"},Yae={class:"template-maker__content"},Qae={class:"template-maker__content__main"},eie={id:"containerMain",class:"container-main"},tie={class:"template-maker__content__main__cover-selector"},rie=["id"],nie={class:"page-indicator"},aie={class:"page-indicator__index"},iie=["onClick"],oie=["onClick"],sie={key:0,class:"template-maker__content__main__footer"},lie={class:"template-maker__content__main__footer__paginator"},cie={class:"template-maker__content__main__footer__paginator__nav"},uie={class:"template-maker__content__main__footer__paginator__numbers"},die=["onClick"],hie={__name:"GSC-TemplateReportMaker",props:{token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},setup(a,{expose:d}){const A=new Map,U=g.ref([{title:"Page 1",id:String(Date.now()),items:[{name:"Volumetrica",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:6,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}},{name:"Volumetrica",id:String(Date.now()),x:4,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]}]),ae=g.ref(null),O=g.ref(0),E=g.ref(!1),t=g.ref(null),x=g.ref(null),u=g.ref(!0),e=g.ref(!1),b=g.ref(!1),f=g.ref(0),v=g.ref(!1),h=g.ref(null);g.ref(null);const r=g.ref(new Map),n=g.ref(null),c=g.ref(null),o=g.ref(!1),l=g.ref(!1);g.ref({updated_at:"2025-07-11T21:37:27.950Z",main_team:1,visible:!0,user_id:24254,created_at:"2025-07-11T21:35:44.847Z",report_name:"reporte modificado",team_id:1,id:"1adc5b32-24ae-4a26-8304-0369a7308f3f",game:{date:"2025-01-11",visiting_team_goals:12,home_team_name:"Guadalajara",visiting_team_xg:12.614200000000002,has_tracking:1,penalties_score_home_team:0,has_video:1,game_status:1,score:[1,0],date_time_utc:"2025-01-12T01:05:00Z",referee_id:391,video_types:[[1,2],[2,2],[3,2]],live_stats:1,home_team_goals:24,matchday_name:"Matchday 1",draw_probability:18,home_team_probability:72,matchday_abbreviation:"M1",game_id:88138,time_active:{home_te:"32:22",home_ti:"21:11",xta:"00:00",home_ta_average:"00:00",total_ti:"46:02",visiting_te:"21:14",visiting_ta_average:"00:00",total_te:"53:36",visiting_ti:"23:43",referee_ta_average:"-",others:"01:09"},matchday_id:1,minutes:{home_yellow_cards_minutes:["J. Rangel 32'"],away_yellow_cards_minutes:["A. Lozano 81'"],home_goals_minutes:["R. Alvarado 75'"],home_red_cards_minutes:[],away_red_cards_minutes:["A. Lozano 89'"],visiting_goals_minutes:[]},alt_minutes:{home_yellow_cards_minutes:["32'"],away_yellow_cards_minutes:["81'"],home_goals_minutes:["75'"],home_red_cards_minutes:[],away_red_cards_minutes:["89'"],visiting_goals_minutes:[]},tv_stations:[],season_id:1933,home_team_xg:24.784200000000002,visiting_team_name:"Santos Laguna",schedule:"19:05:00",visiting_team_acronym:"SAN",home_team_acronym:"CHI",referee_name:"Quintero Huitron, Daniel",is_live:0,home_games_played:0,visiting_team:14,penalties_score_visiting_team:0,home_team:1,away_games_played:0,visiting_team_probability:10},name:"VALOR 45",template_type:2,pages:[{is_front_page:!0,type:1,template_type:2},{components:[{min_row:1,min_column:1,column:1,max_row:4,filters:[{options:[{value:1,label:"Mi equipo"},{value:2,label:"Rival"},{value:3,label:"Ambos"}],type:"radio-button"}],title:"Hacia donde fueron los pases",url:"https://example.com/grafico.png",colspan:3,rowspan:2,name:"Volumétrica",show_extra_teams_logos:!0,id:5,row:1,allowed_templates_types:[1,2],max_column:4},{min_row:1,min_column:1,column:1,max_row:4,filters:[{options:[{value:1,label:"Ultimo juego"},{value:2,label:"2"},{value:3,label:"3"}],type:"radio-button",label:"Juegos"}],title:"Alineaciones iniciales",url:"https://example.com/grafico.png",colspan:3,rowspan:2,name:"Alineaciones iniciales",show_extra_teams_logos:!0,id:6,row:1,allowed_templates_types:[1,2],max_column:4},{min_row:1,min_column:1,column:1,max_row:4,filters:[{options:[{value:!0,label:"Si"},{value:!1,label:"No"}],type:"radio-button",label:"Ver tiempo inactivo"}],title:"Posesión de balón",url:"https://example.com/grafico.png",colspan:3,rowspan:2,name:"Posesión de balón",show_extra_teams_logos:!1,id:8,row:1,allowed_templates_types:[1,2],max_column:4}],columns:12,gap:10,name:"Pag 01",width:968,rows:12,height:702}]});const p=g.computed(()=>({"--overflow-y-template-maker":e.value?"scroll":"hidden","--height-container-main":e.value?"fit-content":"calc(100vh - 64px)","--margin-bottom-container-main":(e.value,"0")}));g.watch(()=>E.value,re=>{const oe=document.getElementById("app");re?(O.value=0,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",oe&&(oe.style.overflow="hidden")):(document.body.style.overflow="",document.documentElement.style.overflow="",oe&&(oe.style.overflow=""))});function m(re){return re<10?`0${re}`:re}async function w({templateId:re,userId:oe}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${oe}/templates/${re}`,{method:"GET",headers:{Authorization:W.token}})).json()).data}catch(le){console.error("Error fetching template by ID:",le)}}async function T({reportId:re,userId:oe}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${oe}/reports/${re}`,{method:"GET",headers:{Authorization:W.token}})).json()).data}catch(le){console.error("Error fetching report by ID:",le)}}let k=0;function M(re){ae.value=re,k>0&&(o.value=!0),k++}function P(re){re&&$(null,!0)}let S=null;function L(re,oe){let le=re.getBoundingClientRect(),me={height:re.clientHeight,width:re.clientWidth},be=oe.getBoundingClientRect();if(!(be.top>=le.top&&be.bottom<=le.top+me.height)){const ge=be.top-le.top,_e=be.bottom-le.bottom;Math.abs(ge)<Math.abs(_e)?re.scrollTop+=ge:re.scrollTop+=_e}}function C(re,oe=!1){const le={title:`Page ${U.value.length+1}`,id:`p-${Date.now()}`,items:[]};if(Z(),re!==void 0&&re>=-1?U.value.splice(re+1,0,le):U.value.push(le),g.nextTick(()=>{const me=U.value.findIndex(ge=>ge.id===le.id),be=document.getElementById(`page-${me+1}`);S||(S=document.getElementById("containerMain")),be&&S?L(S,be):console.error("Page element or container main element not found")}),oe)return le;o.value=!0}function _(re){if(re<-1||re>=U.value.length+1)return;const oe=document.getElementById(`page-${re}`);S||(S=document.getElementById("containerMain")),oe&&S&&L(S,oe)}function z(re){n.value=re,v.value=!0}function y(re,oe){re&&(O.value=oe+1)}function N(re){v.value=!0,Qo.emit("edit-view",{view:re})}async function I({templateReportId:re,userId:oe,isTemplateMode:le}){try{return le?w({templateId:re,userId:oe}):T({reportId:re,userId:oe})}catch(me){throw new Error("Error fetching template or report by ID: "+me.message)}}async function V(re){if(k=0,r.value.clear(),u.value=re.isTemplateMode,e.value=!!re.isPDFMode,re.isPDFMode?t.value=await T({reportId:re.reportId,userId:re.userId}):(t.value=re.template,t.value=await I({templateReportId:re.template.id,userId:re.template.user_id,isTemplateMode:re.isTemplateMode})),!t.value)return;t.value&&t.value.game&&(t.value.game=q(t.value.game)),x.value=JSON.parse(JSON.stringify(t.value)),b.value=t.value.template_type===2;const oe=t.value.pages.find(le=>le.is_front_page);f.value=oe?oe.type:1,E.value=!0,U.value=t.value.pages.reduce((le,me,be)=>{if(!me.is_front_page){me.name||(me.name="");const ge={originalPage:JSON.parse(JSON.stringify(me)),title:me.name,id:`p-${Date.now()-be*9}`,items:[],components:me.components};me.components&&me.components.length>0&&(ge.items=me.components.map((_e,Ae)=>{const Ce=new Tg(`FAWC-${Date.now()}`,[],_e.coreView.id,_e.dynamicFilters,b.value,u.value),Me={originalComponent:JSON.parse(JSON.stringify(_e)),title:_e.title,game:t.value.game,idAux:_e.id,id:`w-${Date.now()-Ae*7}`,x:_e.column,y:_e.row,w:_e.colspan,h:_e.rowspan,maxWidth:_e.max_column,maxHeight:_e.max_row,minWidth:_e.min_column,minHeight:_e.min_row,noResize:!u.value,noMove:!u.value,coreView:_e.coreView||null,isTemplateMode:u.value,componentName:_e.componentName,componentProps:j({currentProps:_e.componentProps,coreView:_e.coreView,isTemplateMode:u.value,game:t.value.game||null})||{},filtersJSON:_e.filtersJSON||null,dynamicFilters:_e.dynamicFilters||[]},ze=g.reactive({view:Me});return Ce.addView(ze,!0),r.value.set(Ce.getId(),Ce),Me})),le.push(ge)}return le},[])}function j({currentProps:re,coreView:oe,isTemplateMode:le,game:me}){if(!re||!oe)return re||{};const be={...re};return oe.id===5&&(be.isGhostEffect=le),me&&(be.game=me),be}const W=a;d({show:V}),Qo.on("add-page-view",re=>{A.set(re.view.id,re.view);const oe=U.value.find(le=>le.id===re.pageId);oe&&(oe.items||(oe.items=[]),oe.items.push(re.view),g.nextTick(()=>{const le=document.querySelector(`[gs-id="${re.view.id}"]`);re.grid.makeWidget(le)}))}),Qo.on("add-page-and-view",re=>{const oe=U.value.findIndex(le=>le.id===re.pageId);if(oe>-1){const le=C(oe,!0);setTimeout(()=>{Qo.emit("add-view",{pageId:le.id,view:re.view,filterAndWidgetContainer:re.filterAndWidgetContainer}),c.value=le},500)}else console.error("Page not found for adding view:",re.pageId)}),Qo.on("empty-page",re=>{ce(re),c.value&&c.value.id===re.id&&(c.value=null)});function q(re){return{...re,gameId:re.game_id,id:re.game_id,seasonId:re.season_id,status:re.game_status,homeTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${re.home_team}.png`,team_id:re.home_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${re.home_team}.png`,colloquial_name:re.home_team_name,acronym:re.home_team_acronym,team_name:re.home_team_name},awayTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${re.visiting_team}.png`,team_id:re.visiting_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${re.visiting_team}.png`,colloquial_name:re.visiting_team_name,acronym:re.visiting_team_acronym,team_name:re.visiting_team_name}}}function $(re,oe=!1){oe||!u.value?E.value=!1:o.value?l.value=!0:E.value=!1}function te(){h.value=null,v.value=!1}function X({page:re,view:oe,applyMinimumSize:le=!1}){const me=re.grid;if(!re||!oe||!me)return null;const be=le?{w:oe.min_column,h:oe.min_row}:{w:oe.colspan,h:oe.rowspan},ge=me.willItFit(0,0,be.w,be.h,!0);return ge?{willFit:ge,applyMinimumSize:le}:le?null:X({page:re,view:oe,applyMinimumSize:!0})}const ne=new Set([9]);function ee(re,oe=!1){var le;if(console.log("onFiltersChanged",re),re.viewToEdit){if(console.log("Processing viewToEdit:",re.viewToEdit),console.log("filters.dynamicFilters:",re.dynamicFilters),console.log("filters.filtersJSON:",re.filtersJSON),!re.viewToEdit.view.filterAndViewsContainer){const me=new Tg(`FAWC-${Date.now()}-${Math.random()}`,[],((le=re.viewToEdit.view.coreView)==null?void 0:le.id)||re.viewToEdit.view.id,re.dynamicFilters||[],b.value,u.value,re.filtersJSON);re.viewToEdit.view.filterAndViewsContainer=me}re.viewToEdit.view.filterAndViewsContainer.updateView({view:re.viewToEdit,dynamicFilters:re.dynamicFilters||[],filtersJSON:re.filtersJSON||null}),o.value=!0}else if(re.view){re.view.id&&ne.has(re.view.id)&&re.dynamicFilters[0]&&re.dynamicFilters[0].length===0&&re.filterAndViewsContainer&&(re.filterAndViewsContainer.updateDynamicFilters(re.dynamicFilters,re),o.value=!0);const me=c.value||n.value,be=X({page:me,view:re.view,applyMinimumSize:!1});re.view.filtersJSON=re.filtersJSON||null;const ge=re.filterAndViewsContainer,_e=U.value.findIndex(Ae=>Ae.id===me.id);if(console.log("filterAndViewsContainerAux",ge),ge){const Ae=re.filterAndViewsContainer.getRequiresAddView(re.dynamicFilters);console.log("requiresAddView",Ae),Ae?(be||_e===U.value.length-1)&&(Qo.emit("add-view",{pageId:me.id,view:re.view,filterAndWidgetContainer:ge,avoidWillFit:!1,applyMinimumSize:be?be.applyMinimumSize:!1}),re.filterAndViewsContainer.updateDynamicFilters(re.dynamicFilters,re),o.value=!0,setTimeout(()=>{ee(re,!0)},1e3)):(re.filterAndViewsContainer.updateDynamicFilters(re.dynamicFilters,re),o.value=!0)}else if(be||_e===U.value.length-1){const Ae=new Tg(`FAWC-${Date.now()}`,[],re.view.id,re.dynamicFilters,b.value,u.value,re.filtersJSON);Qo.emit("set-filter-and-views-container",Ae),r.value.set(Ae.getId(),Ae),re.dynamicFilters&&Array.isArray(re.dynamicFilters[0])?(re.filterAndViewsContainer=Ae,ee(re,!0)):Qo.emit("add-view",{pageId:me.id,view:re.view,filterAndWidgetContainer:Ae,avoidWillFit:!1,applyMinimumSize:be?be.applyMinimumSize:!1}),o.value=!0}}}async function J(){if(o.value)try{const re=[{is_front_page:!0,template_type:ae.value.isPostMatch?2:1,type:ae.value.id},...U.value.map(le=>({columns:le.originalPage?le.originalPage.columns:12,rows:le.originalPage?le.originalPage.rows:12,gap:le.originalPage?le.originalPage.gap:10,name:le.title,width:le.originalPage?le.originalPage.width:968,height:le.originalPage?le.originalPage.height:702,components:le.items.map(me=>({min_column:me.minWidth,min_row:me.minHeight,max_column:me.maxWidth,max_row:me.maxHeight,column:me.x,row:me.y,colspan:me.w,rowspan:me.h,name:me.name,title:me.title,dynamicFilters:me.filterAndViewsContainer.getDynamicFilters()||[],coreView:me.coreView||null,componentName:me.componentName,componentProps:me.componentProps||{},isHomeTeam:me.isHomeTeam||!0}))}))],oe=await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${t.value.user_id}/templates/${t.value.id}/pages`,{method:"PATCH",headers:{Authorization:W.token},body:JSON.stringify({pages:re})})).json();o.value=!1}catch(re){console.error("Error saving template:",re)}}function Z(){U.value.forEach(re=>{console.log("page.offAddView",re.offAddView),re.offAddView&&re.offAddView()})}function ce(re){const oe=U.value.findIndex(le=>le.id===re.id);oe>-1&&(Z(),U.value=U.value.filter(le=>le.id!==re.id),O.value>=oe&&(O.value=Math.max(0,O.value-1)),console.log("onDeletePage: ",re),console.log("pates.value",U.value),o.value=!0)}function he(){o.value=!0}function de(re){const oe=U.value.find(le=>le.items.some(me=>me.id===re.id));if(oe){const le=oe.items.findIndex(me=>me.id===re.id);le!==-1&&(oe.items.splice(le,1),o.value=!0)}}function fe(re){console.log("onChangeSort",re)}return(re,oe)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createVNode($ae,{modelValue:l.value,"onUpdate:modelValue":oe[0]||(oe[0]=le=>l.value=le),onAction:P},null,8,["modelValue"]),(g.openBlock(),g.createBlock(g.Teleport,{to:"body"},[E.value&&t.value?(g.openBlock(),g.createElementBlock("div",{key:0,class:"template-maker",style:g.normalizeStyle(p.value)},[g.withDirectives(g.createVNode(Bae,{token:a.token,view:h.value,"is-post-match":b.value,onClose:te,onFiltersChanged:ee},null,8,["token","view","is-post-match"]),[[g.vShow,u.value&&v.value]]),g.createElementVNode("div",Zae,[g.createTextVNode(g.toDisplayString(t.value?t.value.name:"Nuevo template")+" ",1),g.createElementVNode("div",{class:"template-maker__header__close",onClick:$},[e.value?g.createCommentVNode("",!0):(g.openBlock(),g.createElementBlock("svg",{key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:oe[1]||(oe[1]=le=>re.$emit("close"))},oe[7]||(oe[7]=[g.createElementVNode("path",{d:"M1.33398 1.33398L14.6673 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g.createElementVNode("path",{d:"M14.666 1.33398L1.33268 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])))])]),g.createElementVNode("div",Yae,[oe[15]||(oe[15]=g.createElementVNode("div",{class:"template-maker__content__sidebar"},null,-1)),g.createElementVNode("div",Qae,[g.createElementVNode("div",eie,[g.createElementVNode("div",tie,[g.withDirectives(g.createVNode(i6,{"is-post-match":b.value,"initial-cover-id":f.value,onSelectCover:M},null,8,["is-post-match","initial-cover-id"]),[[g.vShow,u.value]])]),(g.openBlock(),g.createElementBlock("div",{class:"template-maker__content__main__pages",key:U.value.length},[ae.value?(g.openBlock(),g.createBlock(Gne,{key:0,id:"page-0",game:t.value.game||null,"cover-id":ae.value.id,"is-post-match":ae.value.isPostMatch,onIntersectionChanged:oe[2]||(oe[2]=le=>y(le,-1))},null,8,["game","cover-id","is-post-match"])):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createElementBlock("div",{key:1,class:"new-items-buttons",style:g.normalizeStyle({"margin-bottom":U.value.length===0?"30px":"0"})},[v.value?g.createCommentVNode("",!0):(g.openBlock(),g.createElementBlock("div",{key:0,class:"new-items-buttons__add-page new-item-button",onClick:oe[3]||(oe[3]=le=>C(-1))},oe[8]||(oe[8]=[g.createElementVNode("div",null,"+ Nueva página",-1),g.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])))],4)):g.createCommentVNode("",!0),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(U.value,(le,me)=>(g.openBlock(),g.createElementBlock("div",{key:me,id:`page-${me+1}`,class:"template-maker__content__main__pages__page"},[g.createElementVNode("div",nie,[g.createElementVNode("div",aie,"Pag "+g.toDisplayString(m(me+2)),1)]),ae.value?(g.openBlock(),g.createBlock(ane,{key:0,page:le,isTemplateMode:u.value,"is-post-match":ae.value.isPostMatch,game:t.value.game||null,onEditView:N,onIntersectionChanged:be=>y(be,me),onChangeSort:fe,onDeletePage:ce,onViewChanged:he,onDeleteView:de},null,8,["page","isTemplateMode","is-post-match","game","onIntersectionChanged"])):g.createCommentVNode("",!0),u.value&&!v.value?(g.openBlock(),g.createElementBlock("div",{key:1,class:"new-items-buttons",style:g.normalizeStyle({"margin-bottom":me+1===U.value.length?"30px":"0","margin-top":"10px"})},[g.createElementVNode("div",{class:"new-items-buttons__add-page new-item-button",onClick:be=>C(me)},oe[9]||(oe[9]=[g.createElementVNode("div",null,"+ Nueva página",-1),g.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),8,iie),g.createElementVNode("div",{class:"new-items-buttons__add-item new-item-button",onClick:be=>z(le)},oe[10]||(oe[10]=[g.createElementVNode("div",null,"+ Agregar gráfico",-1),g.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M12 13.3346V6.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M8 13.3346V2.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M4 13.332V9.33203",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),8,oie)],4)):g.createCommentVNode("",!0)],8,rie))),128))]))]),e.value?g.createCommentVNode("",!0):(g.openBlock(),g.createElementBlock("div",sie,[g.createElementVNode("div",lie,[g.createElementVNode("div",cie,[oe[13]||(oe[13]=g.createElementVNode("div",null,"Páginas",-1)),g.createElementVNode("div",{class:"template-maker__content__main__footer__paginator__nav__arrow",onClick:oe[4]||(oe[4]=le=>_(O.value-1))},oe[11]||(oe[11]=[g.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.22444 5L5.29079 8.57741C5.56974 8.90285 5.56974 9.43049 5.29079 9.75592C5.01184 10.0814 4.55958 10.0814 4.28064 9.75592L0.709209 5.58926C0.430263 5.26382 0.430263 4.73618 0.709209 4.41074L4.28064 0.244078C4.55958 -0.0813593 5.01184 -0.0813592 5.29079 0.244078C5.56974 0.569515 5.56974 1.09715 5.29079 1.42259L2.22444 5Z",fill:"#92929D"})],-1)])),g.createElementVNode("div",{class:"template-maker__content__main__footer__paginator__nav__arrow",onClick:oe[5]||(oe[5]=le=>_(O.value+1))},oe[12]||(oe[12]=[g.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.77556 5L0.70921 8.57741C0.430264 8.90285 0.430264 9.43049 0.70921 9.75592C0.988156 10.0814 1.44042 10.0814 1.71936 9.75592L5.29079 5.58926C5.56974 5.26382 5.56974 4.73618 5.29079 4.41074L1.71936 0.244078C1.44042 -0.0813593 0.988155 -0.0813592 0.709209 0.244078C0.430264 0.569515 0.430264 1.09715 0.70921 1.42259L3.77556 5Z",fill:"#92929D"})],-1)]))]),g.createElementVNode("div",uie,[g.createElementVNode("div",{role:"button",class:g.normalizeClass({active:O.value===0}),onClick:oe[6]||(oe[6]=le=>_(0))},g.toDisplayString(m(1)),3),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(U.value,(le,me)=>(g.openBlock(),g.createElementBlock("div",{role:"button",key:me,class:g.normalizeClass({active:me+1===O.value}),onClick:be=>_(me+1)},g.toDisplayString(m(me+2)),11,die))),128))])]),u.value?(g.openBlock(),g.createElementBlock("div",{key:0,role:"button",class:g.normalizeClass(["template-maker__content__main__footer__save save-button",{disabled:!o.value}]),onClick:J},oe[14]||(oe[14]=[g.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g.createElementVNode("path",{d:"M12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V3.33333C2 2.97971 2.14048 2.64057 2.39052 2.39052C2.64057 2.14048 2.97971 2 3.33333 2H10.6667L14 5.33333V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M11.3346 14.0013V8.66797H4.66797V14.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),g.createElementVNode("path",{d:"M4.66797 2V5.33333H10.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1),g.createElementVNode("div",null,"Guardar",-1)]),2)):g.createCommentVNode("",!0)]))])])],4)):g.createCommentVNode("",!0)]))],64))}},pie=Ed(hie,[["__scopeId","data-v-191726f9"]]);function H5(a,d){return function(){return a.apply(d,arguments)}}const{toString:fie}=Object.prototype,{getPrototypeOf:Yv}=Object,{iterator:Sg,toStringTag:G5}=Symbol,Ag=(a=>d=>{const A=fie.call(d);return a[A]||(a[A]=A.slice(8,-1).toLowerCase())})(Object.create(null)),Xu=a=>(a=a.toLowerCase(),d=>Ag(d)===a),Eg=a=>d=>typeof d===a,{isArray:Cp}=Array,Ff=Eg("undefined");function Vf(a){return a!==null&&!Ff(a)&&a.constructor!==null&&!Ff(a.constructor)&&lu(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const X5=Xu("ArrayBuffer");function mie(a){let d;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?d=ArrayBuffer.isView(a):d=a&&a.buffer&&X5(a.buffer),d}const gie=Eg("string"),lu=Eg("function"),K5=Eg("number"),Bf=a=>a!==null&&typeof a=="object",yie=a=>a===!0||a===!1,Cg=a=>{if(Ag(a)!=="object")return!1;const d=Yv(a);return(d===null||d===Object.prototype||Object.getPrototypeOf(d)===null)&&!(G5 in a)&&!(Sg in a)},vie=a=>{if(!Bf(a)||Vf(a))return!1;try{return Object.keys(a).length===0&&Object.getPrototypeOf(a)===Object.prototype}catch{return!1}},bie=Xu("Date"),xie=Xu("File"),_ie=Xu("Blob"),wie=Xu("FileList"),kie=a=>Bf(a)&&lu(a.pipe),Tie=a=>{let d;return a&&(typeof FormData=="function"&&a instanceof FormData||lu(a.append)&&((d=Ag(a))==="formdata"||d==="object"&&lu(a.toString)&&a.toString()==="[object FormData]"))},Sie=Xu("URLSearchParams"),[Aie,Eie,Cie,Mie]=["ReadableStream","Request","Response","Headers"].map(Xu),Pie=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Uf(a,d,{allOwnKeys:A=!1}={}){if(a===null||typeof a>"u")return;let U,ae;if(typeof a!="object"&&(a=[a]),Cp(a))for(U=0,ae=a.length;U<ae;U++)d.call(null,a[U],U,a);else{if(Vf(a))return;const O=A?Object.getOwnPropertyNames(a):Object.keys(a),E=O.length;let t;for(U=0;U<E;U++)t=O[U],d.call(null,a[t],t,a)}}function J5(a,d){if(Vf(a))return null;d=d.toLowerCase();const A=Object.keys(a);let U=A.length,ae;for(;U-- >0;)if(ae=A[U],d===ae.toLowerCase())return ae;return null}const Vh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$5=a=>!Ff(a)&&a!==Vh;function Qv(){const{caseless:a}=$5(this)&&this||{},d={},A=(U,ae)=>{const O=a&&J5(d,ae)||ae;Cg(d[O])&&Cg(U)?d[O]=Qv(d[O],U):Cg(U)?d[O]=Qv({},U):Cp(U)?d[O]=U.slice():d[O]=U};for(let U=0,ae=arguments.length;U<ae;U++)arguments[U]&&Uf(arguments[U],A);return d}const Lie=(a,d,A,{allOwnKeys:U}={})=>(Uf(d,(ae,O)=>{A&&lu(ae)?a[O]=H5(ae,A):a[O]=ae},{allOwnKeys:U}),a),zie=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),Oie=(a,d,A,U)=>{a.prototype=Object.create(d.prototype,U),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:d.prototype}),A&&Object.assign(a.prototype,A)},Nie=(a,d,A,U)=>{let ae,O,E;const t={};if(d=d||{},a==null)return d;do{for(ae=Object.getOwnPropertyNames(a),O=ae.length;O-- >0;)E=ae[O],(!U||U(E,a,d))&&!t[E]&&(d[E]=a[E],t[E]=!0);a=A!==!1&&Yv(a)}while(a&&(!A||A(a,d))&&a!==Object.prototype);return d},Rie=(a,d,A)=>{a=String(a),(A===void 0||A>a.length)&&(A=a.length),A-=d.length;const U=a.indexOf(d,A);return U!==-1&&U===A},Die=a=>{if(!a)return null;if(Cp(a))return a;let d=a.length;if(!K5(d))return null;const A=new Array(d);for(;d-- >0;)A[d]=a[d];return A},Iie=(a=>d=>a&&d instanceof a)(typeof Uint8Array<"u"&&Yv(Uint8Array)),Fie=(a,d)=>{const U=(a&&a[Sg]).call(a);let ae;for(;(ae=U.next())&&!ae.done;){const O=ae.value;d.call(a,O[0],O[1])}},Vie=(a,d)=>{let A;const U=[];for(;(A=a.exec(d))!==null;)U.push(A);return U},Bie=Xu("HTMLFormElement"),Uie=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(A,U,ae){return U.toUpperCase()+ae}),Z5=(({hasOwnProperty:a})=>(d,A)=>a.call(d,A))(Object.prototype),jie=Xu("RegExp"),Y5=(a,d)=>{const A=Object.getOwnPropertyDescriptors(a),U={};Uf(A,(ae,O)=>{let E;(E=d(ae,O,a))!==!1&&(U[O]=E||ae)}),Object.defineProperties(a,U)},qie=a=>{Y5(a,(d,A)=>{if(lu(a)&&["arguments","caller","callee"].indexOf(A)!==-1)return!1;const U=a[A];if(lu(U)){if(d.enumerable=!1,"writable"in d){d.writable=!1;return}d.set||(d.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")})}})},Wie=(a,d)=>{const A={},U=ae=>{ae.forEach(O=>{A[O]=!0})};return Cp(a)?U(a):U(String(a).split(d)),A},Hie=()=>{},Gie=(a,d)=>a!=null&&Number.isFinite(a=+a)?a:d;function Xie(a){return!!(a&&lu(a.append)&&a[G5]==="FormData"&&a[Sg])}const Kie=a=>{const d=new Array(10),A=(U,ae)=>{if(Bf(U)){if(d.indexOf(U)>=0)return;if(Vf(U))return U;if(!("toJSON"in U)){d[ae]=U;const O=Cp(U)?[]:{};return Uf(U,(E,t)=>{const x=A(E,ae+1);!Ff(x)&&(O[t]=x)}),d[ae]=void 0,O}}return U};return A(a,0)},Jie=Xu("AsyncFunction"),$ie=a=>a&&(Bf(a)||lu(a))&&lu(a.then)&&lu(a.catch),Q5=((a,d)=>a?setImmediate:d?((A,U)=>(Vh.addEventListener("message",({source:ae,data:O})=>{ae===Vh&&O===A&&U.length&&U.shift()()},!1),ae=>{U.push(ae),Vh.postMessage(A,"*")}))(`axios@${Math.random()}`,[]):A=>setTimeout(A))(typeof setImmediate=="function",lu(Vh.postMessage)),Zie=typeof queueMicrotask<"u"?queueMicrotask.bind(Vh):typeof process<"u"&&process.nextTick||Q5,Hn={isArray:Cp,isArrayBuffer:X5,isBuffer:Vf,isFormData:Tie,isArrayBufferView:mie,isString:gie,isNumber:K5,isBoolean:yie,isObject:Bf,isPlainObject:Cg,isEmptyObject:vie,isReadableStream:Aie,isRequest:Eie,isResponse:Cie,isHeaders:Mie,isUndefined:Ff,isDate:bie,isFile:xie,isBlob:_ie,isRegExp:jie,isFunction:lu,isStream:kie,isURLSearchParams:Sie,isTypedArray:Iie,isFileList:wie,forEach:Uf,merge:Qv,extend:Lie,trim:Pie,stripBOM:zie,inherits:Oie,toFlatObject:Nie,kindOf:Ag,kindOfTest:Xu,endsWith:Rie,toArray:Die,forEachEntry:Fie,matchAll:Vie,isHTMLForm:Bie,hasOwnProperty:Z5,hasOwnProp:Z5,reduceDescriptors:Y5,freezeMethods:qie,toObjectSet:Wie,toCamelCase:Uie,noop:Hie,toFiniteNumber:Gie,findKey:J5,global:Vh,isContextDefined:$5,isSpecCompliantForm:Xie,toJSONObject:Kie,isAsyncFn:Jie,isThenable:$ie,setImmediate:Q5,asap:Zie,isIterable:a=>a!=null&&lu(a[Sg])};function mi(a,d,A,U,ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=a,this.name="AxiosError",d&&(this.code=d),A&&(this.config=A),U&&(this.request=U),ae&&(this.response=ae,this.status=ae.status?ae.status:null)}Hn.inherits(mi,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:Hn.toJSONObject(this.config),code:this.code,status:this.status}}});const e4=mi.prototype,t4={};["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(a=>{t4[a]={value:a}}),Object.defineProperties(mi,t4),Object.defineProperty(e4,"isAxiosError",{value:!0}),mi.from=(a,d,A,U,ae,O)=>{const E=Object.create(e4);return Hn.toFlatObject(a,E,function(x){return x!==Error.prototype},t=>t!=="isAxiosError"),mi.call(E,a.message,d,A,U,ae),E.cause=a,E.name=a.name,O&&Object.assign(E,O),E};const Yie=null;function eb(a){return Hn.isPlainObject(a)||Hn.isArray(a)}function r4(a){return Hn.endsWith(a,"[]")?a.slice(0,-2):a}function n4(a,d,A){return a?a.concat(d).map(function(ae,O){return ae=r4(ae),!A&&O?"["+ae+"]":ae}).join(A?".":""):d}function Qie(a){return Hn.isArray(a)&&!a.some(eb)}const eoe=Hn.toFlatObject(Hn,{},null,function(d){return/^is[A-Z]/.test(d)});function Mg(a,d,A){if(!Hn.isObject(a))throw new TypeError("target must be an object");d=d||new FormData,A=Hn.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(r,n){return!Hn.isUndefined(n[r])});const U=A.metaTokens,ae=A.visitor||e,O=A.dots,E=A.indexes,x=(A.Blob||typeof Blob<"u"&&Blob)&&Hn.isSpecCompliantForm(d);if(!Hn.isFunction(ae))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(Hn.isDate(h))return h.toISOString();if(Hn.isBoolean(h))return h.toString();if(!x&&Hn.isBlob(h))throw new mi("Blob is not supported. Use a Buffer instead.");return Hn.isArrayBuffer(h)||Hn.isTypedArray(h)?x&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function e(h,r,n){let c=h;if(h&&!n&&typeof h=="object"){if(Hn.endsWith(r,"{}"))r=U?r:r.slice(0,-2),h=JSON.stringify(h);else if(Hn.isArray(h)&&Qie(h)||(Hn.isFileList(h)||Hn.endsWith(r,"[]"))&&(c=Hn.toArray(h)))return r=r4(r),c.forEach(function(l,p){!(Hn.isUndefined(l)||l===null)&&d.append(E===!0?n4([r],p,O):E===null?r:r+"[]",u(l))}),!1}return eb(h)?!0:(d.append(n4(n,r,O),u(h)),!1)}const b=[],f=Object.assign(eoe,{defaultVisitor:e,convertValue:u,isVisitable:eb});function v(h,r){if(!Hn.isUndefined(h)){if(b.indexOf(h)!==-1)throw Error("Circular reference detected in "+r.join("."));b.push(h),Hn.forEach(h,function(c,o){(!(Hn.isUndefined(c)||c===null)&&ae.call(d,c,Hn.isString(o)?o.trim():o,r,f))===!0&&v(c,r?r.concat(o):[o])}),b.pop()}}if(!Hn.isObject(a))throw new TypeError("data must be an object");return v(a),d}function a4(a){const d={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(U){return d[U]})}function tb(a,d){this._pairs=[],a&&Mg(a,this,d)}const i4=tb.prototype;i4.append=function(d,A){this._pairs.push([d,A])},i4.toString=function(d){const A=d?function(U){return d.call(this,U,a4)}:a4;return this._pairs.map(function(ae){return A(ae[0])+"="+A(ae[1])},"").join("&")};function toe(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function o4(a,d,A){if(!d)return a;const U=A&&A.encode||toe;Hn.isFunction(A)&&(A={serialize:A});const ae=A&&A.serialize;let O;if(ae?O=ae(d,A):O=Hn.isURLSearchParams(d)?d.toString():new tb(d,A).toString(U),O){const E=a.indexOf("#");E!==-1&&(a=a.slice(0,E)),a+=(a.indexOf("?")===-1?"?":"&")+O}return a}class s4{constructor(){this.handlers=[]}use(d,A,U){return this.handlers.push({fulfilled:d,rejected:A,synchronous:U?U.synchronous:!1,runWhen:U?U.runWhen:null}),this.handlers.length-1}eject(d){this.handlers[d]&&(this.handlers[d]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(d){Hn.forEach(this.handlers,function(U){U!==null&&d(U)})}}const l4={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},roe={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:tb,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},rb=typeof window<"u"&&typeof document<"u",nb=typeof navigator=="object"&&navigator||void 0,noe=rb&&(!nb||["ReactNative","NativeScript","NS"].indexOf(nb.product)<0),aoe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ioe=rb&&window.location.href||"http://localhost",Ec={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rb,hasStandardBrowserEnv:noe,hasStandardBrowserWebWorkerEnv:aoe,navigator:nb,origin:ioe},Symbol.toStringTag,{value:"Module"})),...roe};function ooe(a,d){return Mg(a,new Ec.classes.URLSearchParams,{visitor:function(A,U,ae,O){return Ec.isNode&&Hn.isBuffer(A)?(this.append(U,A.toString("base64")),!1):O.defaultVisitor.apply(this,arguments)},...d})}function soe(a){return Hn.matchAll(/\w+|\[(\w*)]/g,a).map(d=>d[0]==="[]"?"":d[1]||d[0])}function loe(a){const d={},A=Object.keys(a);let U;const ae=A.length;let O;for(U=0;U<ae;U++)O=A[U],d[O]=a[O];return d}function c4(a){function d(A,U,ae,O){let E=A[O++];if(E==="__proto__")return!0;const t=Number.isFinite(+E),x=O>=A.length;return E=!E&&Hn.isArray(ae)?ae.length:E,x?(Hn.hasOwnProp(ae,E)?ae[E]=[ae[E],U]:ae[E]=U,!t):((!ae[E]||!Hn.isObject(ae[E]))&&(ae[E]=[]),d(A,U,ae[E],O)&&Hn.isArray(ae[E])&&(ae[E]=loe(ae[E])),!t)}if(Hn.isFormData(a)&&Hn.isFunction(a.entries)){const A={};return Hn.forEachEntry(a,(U,ae)=>{d(soe(U),ae,A,0)}),A}return null}function coe(a,d,A){if(Hn.isString(a))try{return(d||JSON.parse)(a),Hn.trim(a)}catch(U){if(U.name!=="SyntaxError")throw U}return(A||JSON.stringify)(a)}const jf={transitional:l4,adapter:["xhr","http","fetch"],transformRequest:[function(d,A){const U=A.getContentType()||"",ae=U.indexOf("application/json")>-1,O=Hn.isObject(d);if(O&&Hn.isHTMLForm(d)&&(d=new FormData(d)),Hn.isFormData(d))return ae?JSON.stringify(c4(d)):d;if(Hn.isArrayBuffer(d)||Hn.isBuffer(d)||Hn.isStream(d)||Hn.isFile(d)||Hn.isBlob(d)||Hn.isReadableStream(d))return d;if(Hn.isArrayBufferView(d))return d.buffer;if(Hn.isURLSearchParams(d))return A.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),d.toString();let t;if(O){if(U.indexOf("application/x-www-form-urlencoded")>-1)return ooe(d,this.formSerializer).toString();if((t=Hn.isFileList(d))||U.indexOf("multipart/form-data")>-1){const x=this.env&&this.env.FormData;return Mg(t?{"files[]":d}:d,x&&new x,this.formSerializer)}}return O||ae?(A.setContentType("application/json",!1),coe(d)):d}],transformResponse:[function(d){const A=this.transitional||jf.transitional,U=A&&A.forcedJSONParsing,ae=this.responseType==="json";if(Hn.isResponse(d)||Hn.isReadableStream(d))return d;if(d&&Hn.isString(d)&&(U&&!this.responseType||ae)){const E=!(A&&A.silentJSONParsing)&&ae;try{return JSON.parse(d)}catch(t){if(E)throw t.name==="SyntaxError"?mi.from(t,mi.ERR_BAD_RESPONSE,this,null,this.response):t}}return d}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ec.classes.FormData,Blob:Ec.classes.Blob},validateStatus:function(d){return d>=200&&d<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Hn.forEach(["delete","get","head","post","put","patch"],a=>{jf.headers[a]={}});const uoe=Hn.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"]),doe=a=>{const d={};let A,U,ae;return a&&a.split(`
|
|
4077
4077
|
`).forEach(function(E){ae=E.indexOf(":"),A=E.substring(0,ae).trim().toLowerCase(),U=E.substring(ae+1).trim(),!(!A||d[A]&&uoe[A])&&(A==="set-cookie"?d[A]?d[A].push(U):d[A]=[U]:d[A]=d[A]?d[A]+", "+U:U)}),d},u4=Symbol("internals");function qf(a){return a&&String(a).trim().toLowerCase()}function Pg(a){return a===!1||a==null?a:Hn.isArray(a)?a.map(Pg):String(a)}function hoe(a){const d=Object.create(null),A=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let U;for(;U=A.exec(a);)d[U[1]]=U[2];return d}const poe=a=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());function ab(a,d,A,U,ae){if(Hn.isFunction(U))return U.call(this,d,A);if(ae&&(d=A),!!Hn.isString(d)){if(Hn.isString(U))return d.indexOf(U)!==-1;if(Hn.isRegExp(U))return U.test(d)}}function foe(a){return a.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(d,A,U)=>A.toUpperCase()+U)}function moe(a,d){const A=Hn.toCamelCase(" "+d);["get","set","has"].forEach(U=>{Object.defineProperty(a,U+A,{value:function(ae,O,E){return this[U].call(this,d,ae,O,E)},configurable:!0})})}let cu=class{constructor(d){d&&this.set(d)}set(d,A,U){const ae=this;function O(t,x,u){const e=qf(x);if(!e)throw new Error("header name must be a non-empty string");const b=Hn.findKey(ae,e);(!b||ae[b]===void 0||u===!0||u===void 0&&ae[b]!==!1)&&(ae[b||x]=Pg(t))}const E=(t,x)=>Hn.forEach(t,(u,e)=>O(u,e,x));if(Hn.isPlainObject(d)||d instanceof this.constructor)E(d,A);else if(Hn.isString(d)&&(d=d.trim())&&!poe(d))E(doe(d),A);else if(Hn.isObject(d)&&Hn.isIterable(d)){let t={},x,u;for(const e of d){if(!Hn.isArray(e))throw TypeError("Object iterator must return a key-value pair");t[u=e[0]]=(x=t[u])?Hn.isArray(x)?[...x,e[1]]:[x,e[1]]:e[1]}E(t,A)}else d!=null&&O(A,d,U);return this}get(d,A){if(d=qf(d),d){const U=Hn.findKey(this,d);if(U){const ae=this[U];if(!A)return ae;if(A===!0)return hoe(ae);if(Hn.isFunction(A))return A.call(this,ae,U);if(Hn.isRegExp(A))return A.exec(ae);throw new TypeError("parser must be boolean|regexp|function")}}}has(d,A){if(d=qf(d),d){const U=Hn.findKey(this,d);return!!(U&&this[U]!==void 0&&(!A||ab(this,this[U],U,A)))}return!1}delete(d,A){const U=this;let ae=!1;function O(E){if(E=qf(E),E){const t=Hn.findKey(U,E);t&&(!A||ab(U,U[t],t,A))&&(delete U[t],ae=!0)}}return Hn.isArray(d)?d.forEach(O):O(d),ae}clear(d){const A=Object.keys(this);let U=A.length,ae=!1;for(;U--;){const O=A[U];(!d||ab(this,this[O],O,d,!0))&&(delete this[O],ae=!0)}return ae}normalize(d){const A=this,U={};return Hn.forEach(this,(ae,O)=>{const E=Hn.findKey(U,O);if(E){A[E]=Pg(ae),delete A[O];return}const t=d?foe(O):String(O).trim();t!==O&&delete A[O],A[t]=Pg(ae),U[t]=!0}),this}concat(...d){return this.constructor.concat(this,...d)}toJSON(d){const A=Object.create(null);return Hn.forEach(this,(U,ae)=>{U!=null&&U!==!1&&(A[ae]=d&&Hn.isArray(U)?U.join(", "):U)}),A}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([d,A])=>d+": "+A).join(`
|
|
4078
4078
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(d){return d instanceof this?d:new this(d)}static concat(d,...A){const U=new this(d);return A.forEach(ae=>U.set(ae)),U}static accessor(d){const U=(this[u4]=this[u4]={accessors:{}}).accessors,ae=this.prototype;function O(E){const t=qf(E);U[t]||(moe(ae,E),U[t]=!0)}return Hn.isArray(d)?d.forEach(O):O(d),this}};cu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Hn.reduceDescriptors(cu.prototype,({value:a},d)=>{let A=d[0].toUpperCase()+d.slice(1);return{get:()=>a,set(U){this[A]=U}}}),Hn.freezeMethods(cu);function ib(a,d){const A=this||jf,U=d||A,ae=cu.from(U.headers);let O=U.data;return Hn.forEach(a,function(t){O=t.call(A,O,ae.normalize(),d?d.status:void 0)}),ae.normalize(),O}function d4(a){return!!(a&&a.__CANCEL__)}function Mp(a,d,A){mi.call(this,a??"canceled",mi.ERR_CANCELED,d,A),this.name="CanceledError"}Hn.inherits(Mp,mi,{__CANCEL__:!0});function h4(a,d,A){const U=A.config.validateStatus;!A.status||!U||U(A.status)?a(A):d(new mi("Request failed with status code "+A.status,[mi.ERR_BAD_REQUEST,mi.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A))}function goe(a){const d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return d&&d[1]||""}function yoe(a,d){a=a||10;const A=new Array(a),U=new Array(a);let ae=0,O=0,E;return d=d!==void 0?d:1e3,function(x){const u=Date.now(),e=U[O];E||(E=u),A[ae]=x,U[ae]=u;let b=O,f=0;for(;b!==ae;)f+=A[b++],b=b%a;if(ae=(ae+1)%a,ae===O&&(O=(O+1)%a),u-E<d)return;const v=e&&u-e;return v?Math.round(f*1e3/v):void 0}}function voe(a,d){let A=0,U=1e3/d,ae,O;const E=(u,e=Date.now())=>{A=e,ae=null,O&&(clearTimeout(O),O=null),a(...u)};return[(...u)=>{const e=Date.now(),b=e-A;b>=U?E(u,e):(ae=u,O||(O=setTimeout(()=>{O=null,E(ae)},U-b)))},()=>ae&&E(ae)]}const Lg=(a,d,A=3)=>{let U=0;const ae=yoe(50,250);return voe(O=>{const E=O.loaded,t=O.lengthComputable?O.total:void 0,x=E-U,u=ae(x),e=E<=t;U=E;const b={loaded:E,total:t,progress:t?E/t:void 0,bytes:x,rate:u||void 0,estimated:u&&t&&e?(t-E)/u:void 0,event:O,lengthComputable:t!=null,[d?"download":"upload"]:!0};a(b)},A)},p4=(a,d)=>{const A=a!=null;return[U=>d[0]({lengthComputable:A,total:a,loaded:U}),d[1]]},f4=a=>(...d)=>Hn.asap(()=>a(...d)),boe=Ec.hasStandardBrowserEnv?((a,d)=>A=>(A=new URL(A,Ec.origin),a.protocol===A.protocol&&a.host===A.host&&(d||a.port===A.port)))(new URL(Ec.origin),Ec.navigator&&/(msie|trident)/i.test(Ec.navigator.userAgent)):()=>!0,xoe=Ec.hasStandardBrowserEnv?{write(a,d,A,U,ae,O){const E=[a+"="+encodeURIComponent(d)];Hn.isNumber(A)&&E.push("expires="+new Date(A).toGMTString()),Hn.isString(U)&&E.push("path="+U),Hn.isString(ae)&&E.push("domain="+ae),O===!0&&E.push("secure"),document.cookie=E.join("; ")},read(a){const d=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _oe(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function woe(a,d){return d?a.replace(/\/?\/$/,"")+"/"+d.replace(/^\/+/,""):a}function m4(a,d,A){let U=!_oe(d);return a&&(U||A==!1)?woe(a,d):d}const g4=a=>a instanceof cu?{...a}:a;function Bh(a,d){d=d||{};const A={};function U(u,e,b,f){return Hn.isPlainObject(u)&&Hn.isPlainObject(e)?Hn.merge.call({caseless:f},u,e):Hn.isPlainObject(e)?Hn.merge({},e):Hn.isArray(e)?e.slice():e}function ae(u,e,b,f){if(Hn.isUndefined(e)){if(!Hn.isUndefined(u))return U(void 0,u,b,f)}else return U(u,e,b,f)}function O(u,e){if(!Hn.isUndefined(e))return U(void 0,e)}function E(u,e){if(Hn.isUndefined(e)){if(!Hn.isUndefined(u))return U(void 0,u)}else return U(void 0,e)}function t(u,e,b){if(b in d)return U(u,e);if(b in a)return U(void 0,u)}const x={url:O,method:O,data:O,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:t,headers:(u,e,b)=>ae(g4(u),g4(e),b,!0)};return Hn.forEach(Object.keys({...a,...d}),function(e){const b=x[e]||ae,f=b(a[e],d[e],e);Hn.isUndefined(f)&&b!==t||(A[e]=f)}),A}const y4=a=>{const d=Bh({},a);let{data:A,withXSRFToken:U,xsrfHeaderName:ae,xsrfCookieName:O,headers:E,auth:t}=d;d.headers=E=cu.from(E),d.url=o4(m4(d.baseURL,d.url,d.allowAbsoluteUrls),a.params,a.paramsSerializer),t&&E.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):"")));let x;if(Hn.isFormData(A)){if(Ec.hasStandardBrowserEnv||Ec.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if((x=E.getContentType())!==!1){const[u,...e]=x?x.split(";").map(b=>b.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...e].join("; "))}}if(Ec.hasStandardBrowserEnv&&(U&&Hn.isFunction(U)&&(U=U(d)),U||U!==!1&&boe(d.url))){const u=ae&&O&&xoe.read(O);u&&E.set(ae,u)}return d},koe=typeof XMLHttpRequest<"u"&&function(a){return new Promise(function(A,U){const ae=y4(a);let O=ae.data;const E=cu.from(ae.headers).normalize();let{responseType:t,onUploadProgress:x,onDownloadProgress:u}=ae,e,b,f,v,h;function r(){v&&v(),h&&h(),ae.cancelToken&&ae.cancelToken.unsubscribe(e),ae.signal&&ae.signal.removeEventListener("abort",e)}let n=new XMLHttpRequest;n.open(ae.method.toUpperCase(),ae.url,!0),n.timeout=ae.timeout;function c(){if(!n)return;const l=cu.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),m={data:!t||t==="text"||t==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:l,config:a,request:n};h4(function(T){A(T),r()},function(T){U(T),r()},m),n=null}"onloadend"in n?n.onloadend=c:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(c)},n.onabort=function(){n&&(U(new mi("Request aborted",mi.ECONNABORTED,a,n)),n=null)},n.onerror=function(){U(new mi("Network Error",mi.ERR_NETWORK,a,n)),n=null},n.ontimeout=function(){let p=ae.timeout?"timeout of "+ae.timeout+"ms exceeded":"timeout exceeded";const m=ae.transitional||l4;ae.timeoutErrorMessage&&(p=ae.timeoutErrorMessage),U(new mi(p,m.clarifyTimeoutError?mi.ETIMEDOUT:mi.ECONNABORTED,a,n)),n=null},O===void 0&&E.setContentType(null),"setRequestHeader"in n&&Hn.forEach(E.toJSON(),function(p,m){n.setRequestHeader(m,p)}),Hn.isUndefined(ae.withCredentials)||(n.withCredentials=!!ae.withCredentials),t&&t!=="json"&&(n.responseType=ae.responseType),u&&([f,h]=Lg(u,!0),n.addEventListener("progress",f)),x&&n.upload&&([b,v]=Lg(x),n.upload.addEventListener("progress",b),n.upload.addEventListener("loadend",v)),(ae.cancelToken||ae.signal)&&(e=l=>{n&&(U(!l||l.type?new Mp(null,a,n):l),n.abort(),n=null)},ae.cancelToken&&ae.cancelToken.subscribe(e),ae.signal&&(ae.signal.aborted?e():ae.signal.addEventListener("abort",e)));const o=goe(ae.url);if(o&&Ec.protocols.indexOf(o)===-1){U(new mi("Unsupported protocol "+o+":",mi.ERR_BAD_REQUEST,a));return}n.send(O||null)})},Toe=(a,d)=>{const{length:A}=a=a?a.filter(Boolean):[];if(d||A){let U=new AbortController,ae;const O=function(u){if(!ae){ae=!0,t();const e=u instanceof Error?u:this.reason;U.abort(e instanceof mi?e:new Mp(e instanceof Error?e.message:e))}};let E=d&&setTimeout(()=>{E=null,O(new mi(`timeout ${d} of ms exceeded`,mi.ETIMEDOUT))},d);const t=()=>{a&&(E&&clearTimeout(E),E=null,a.forEach(u=>{u.unsubscribe?u.unsubscribe(O):u.removeEventListener("abort",O)}),a=null)};a.forEach(u=>u.addEventListener("abort",O));const{signal:x}=U;return x.unsubscribe=()=>Hn.asap(t),x}},Soe=function*(a,d){let A=a.byteLength;if(A<d){yield a;return}let U=0,ae;for(;U<A;)ae=U+d,yield a.slice(U,ae),U=ae},Aoe=async function*(a,d){for await(const A of Eoe(a))yield*Soe(A,d)},Eoe=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const d=a.getReader();try{for(;;){const{done:A,value:U}=await d.read();if(A)break;yield U}}finally{await d.cancel()}},v4=(a,d,A,U)=>{const ae=Aoe(a,d);let O=0,E,t=x=>{E||(E=!0,U&&U(x))};return new ReadableStream({async pull(x){try{const{done:u,value:e}=await ae.next();if(u){t(),x.close();return}let b=e.byteLength;if(A){let f=O+=b;A(f)}x.enqueue(new Uint8Array(e))}catch(u){throw t(u),u}},cancel(x){return t(x),ae.return()}},{highWaterMark:2})},zg=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",b4=zg&&typeof ReadableStream=="function",Coe=zg&&(typeof TextEncoder=="function"?(a=>d=>a.encode(d))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),x4=(a,...d)=>{try{return!!a(...d)}catch{return!1}},Moe=b4&&x4(()=>{let a=!1;const d=new Request(Ec.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!d}),_4=64*1024,ob=b4&&x4(()=>Hn.isReadableStream(new Response("").body)),Og={stream:ob&&(a=>a.body)};zg&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!Og[d]&&(Og[d]=Hn.isFunction(a[d])?A=>A[d]():(A,U)=>{throw new mi(`Response type '${d}' is not supported`,mi.ERR_NOT_SUPPORT,U)})})})(new Response);const Poe=async a=>{if(a==null)return 0;if(Hn.isBlob(a))return a.size;if(Hn.isSpecCompliantForm(a))return(await new Request(Ec.origin,{method:"POST",body:a}).arrayBuffer()).byteLength;if(Hn.isArrayBufferView(a)||Hn.isArrayBuffer(a))return a.byteLength;if(Hn.isURLSearchParams(a)&&(a=a+""),Hn.isString(a))return(await Coe(a)).byteLength},Loe=async(a,d)=>{const A=Hn.toFiniteNumber(a.getContentLength());return A??Poe(d)},sb={http:Yie,xhr:koe,fetch:zg&&(async a=>{let{url:d,method:A,data:U,signal:ae,cancelToken:O,timeout:E,onDownloadProgress:t,onUploadProgress:x,responseType:u,headers:e,withCredentials:b="same-origin",fetchOptions:f}=y4(a);u=u?(u+"").toLowerCase():"text";let v=Toe([ae,O&&O.toAbortSignal()],E),h;const r=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let n;try{if(x&&Moe&&A!=="get"&&A!=="head"&&(n=await Loe(e,U))!==0){let m=new Request(d,{method:"POST",body:U,duplex:"half"}),w;if(Hn.isFormData(U)&&(w=m.headers.get("content-type"))&&e.setContentType(w),m.body){const[T,k]=p4(n,Lg(f4(x)));U=v4(m.body,_4,T,k)}}Hn.isString(b)||(b=b?"include":"omit");const c="credentials"in Request.prototype;h=new Request(d,{...f,signal:v,method:A.toUpperCase(),headers:e.normalize().toJSON(),body:U,duplex:"half",credentials:c?b:void 0});let o=await fetch(h,f);const l=ob&&(u==="stream"||u==="response");if(ob&&(t||l&&r)){const m={};["status","statusText","headers"].forEach(M=>{m[M]=o[M]});const w=Hn.toFiniteNumber(o.headers.get("content-length")),[T,k]=t&&p4(w,Lg(f4(t),!0))||[];o=new Response(v4(o.body,_4,T,()=>{k&&k(),r&&r()}),m)}u=u||"text";let p=await Og[Hn.findKey(Og,u)||"text"](o,a);return!l&&r&&r(),await new Promise((m,w)=>{h4(m,w,{data:p,headers:cu.from(o.headers),status:o.status,statusText:o.statusText,config:a,request:h})})}catch(c){throw r&&r(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new mi("Network Error",mi.ERR_NETWORK,a,h),{cause:c.cause||c}):mi.from(c,c&&c.code,a,h)}})};Hn.forEach(sb,(a,d)=>{if(a){try{Object.defineProperty(a,"name",{value:d})}catch{}Object.defineProperty(a,"adapterName",{value:d})}});const w4=a=>`- ${a}`,zoe=a=>Hn.isFunction(a)||a===null||a===!1,k4={getAdapter:a=>{a=Hn.isArray(a)?a:[a];const{length:d}=a;let A,U;const ae={};for(let O=0;O<d;O++){A=a[O];let E;if(U=A,!zoe(A)&&(U=sb[(E=String(A)).toLowerCase()],U===void 0))throw new mi(`Unknown adapter '${E}'`);if(U)break;ae[E||"#"+O]=U}if(!U){const O=Object.entries(ae).map(([t,x])=>`adapter ${t} `+(x===!1?"is not supported by the environment":"is not available in the build"));let E=d?O.length>1?`since :
|
|
4079
4079
|
`+O.map(w4).join(`
|