diff --git a/_app/immutable/chunks/2.060fc6ba.js b/_app/immutable/chunks/2.2f787e74.js similarity index 97% rename from _app/immutable/chunks/2.060fc6ba.js rename to _app/immutable/chunks/2.2f787e74.js index b08b47c..55fdf2e 100644 --- a/_app/immutable/chunks/2.060fc6ba.js +++ b/_app/immutable/chunks/2.2f787e74.js @@ -577,7 +577,7 @@ uniform ${Se} ${Le} u_${Ke}; `),ue=te.createShader(te.FRAGMENT_SHADER);if(te.isContextLost())return void(this.failedToCreate=!0);te.shaderSource(ue,oe),te.compileShader(ue),te.attachShader(this.program,ue);const we=te.createShader(te.VERTEX_SHADER);if(te.isContextLost())return void(this.failedToCreate=!0);te.shaderSource(we,ve),te.compileShader(we),te.attachShader(this.program,we),this.attributes={};const Te={};this.numAttributes=Se.length;for(let ze=0;ze({u_depth:new s.Uniform1i(ze,$e.u_depth),u_terrain:new s.Uniform1i(ze,$e.u_terrain),u_terrain_dim:new s.Uniform1f(ze,$e.u_terrain_dim),u_terrain_matrix:new s.UniformMatrix4f(ze,$e.u_terrain_matrix),u_terrain_unpack:new s.Uniform4f(ze,$e.u_terrain_unpack),u_terrain_exaggeration:new s.Uniform1f(ze,$e.u_terrain_exaggeration)}))(p,Te),this.binderUniforms=L?L.getUniforms(p,Te):[]}draw(p,k,L,z,j,Y,te,se,ye,Se,Le,Ke,bt,T,B,W,oe,ve){const ue=p.gl;if(this.failedToCreate)return;if(p.program.set(this.program),p.setDepthMode(L),p.setStencilMode(z),p.setColorMode(j),p.setCullFace(Y),se){p.activeTexture.set(ue.TEXTURE2),ue.bindTexture(ue.TEXTURE_2D,se.depthTexture),p.activeTexture.set(ue.TEXTURE3),ue.bindTexture(ue.TEXTURE_2D,se.texture);for(const Te in this.terrainUniforms)this.terrainUniforms[Te].set(se[Te])}for(const Te in this.fixedUniforms)this.fixedUniforms[Te].set(te[Te]);B&&B.setUniforms(p,this.binderUniforms,bt,{zoom:T});let we=0;switch(k){case ue.LINES:we=2;break;case ue.TRIANGLES:we=3;break;case ue.LINE_STRIP:we=1}for(const Te of Ke.get()){const ze=Te.vaos||(Te.vaos={});(ze[ye]||(ze[ye]=new as)).bind(p,this,Se,B?B.getPaintVertexBuffers():[],Le,Te.vertexOffset,W,oe,ve),ue.drawElements(k,Te.primitiveLength*we,ue.UNSIGNED_SHORT,Te.primitiveOffset*we*2)}}}function zl(R,p,k){const L=1/ir(k,1,p.transform.tileZoom),z=Math.pow(2,k.tileID.overscaledZ),j=k.tileSize*Math.pow(2,p.transform.tileZoom)/z,Y=j*(k.tileID.canonical.x+k.tileID.wrap*z),te=j*k.tileID.canonical.y;return{u_image:0,u_texsize:k.imageAtlasTexture.size,u_scale:[L,R.fromScale,R.toScale],u_fade:R.t,u_pixel_coord_upper:[Y>>16,te>>16],u_pixel_coord_lower:[65535&Y,65535&te]}}const il=(R,p,k,L)=>{const z=p.style.light,j=z.properties.get("position"),Y=[j.x,j.y,j.z],te=function(){var ye=new s.ARRAY_TYPE(9);return s.ARRAY_TYPE!=Float32Array&&(ye[1]=0,ye[2]=0,ye[3]=0,ye[5]=0,ye[6]=0,ye[7]=0),ye[0]=1,ye[4]=1,ye[8]=1,ye}();z.properties.get("anchor")==="viewport"&&function(ye,Se){var Le=Math.sin(Se),Ke=Math.cos(Se);ye[0]=Ke,ye[1]=Le,ye[2]=0,ye[3]=-Le,ye[4]=Ke,ye[5]=0,ye[6]=0,ye[7]=0,ye[8]=1}(te,-p.transform.angle),function(ye,Se,Le){var Ke=Se[0],bt=Se[1],T=Se[2];ye[0]=Ke*Le[0]+bt*Le[3]+T*Le[6],ye[1]=Ke*Le[1]+bt*Le[4]+T*Le[7],ye[2]=Ke*Le[2]+bt*Le[5]+T*Le[8]}(Y,Y,te);const se=z.properties.get("color");return{u_matrix:R,u_lightpos:Y,u_lightintensity:z.properties.get("intensity"),u_lightcolor:[se.r,se.g,se.b],u_vertical_gradient:+k,u_opacity:L}},vc=(R,p,k,L,z,j,Y)=>s.extend(il(R,p,k,L),zl(j,p,Y),{u_height_factor:-Math.pow(2,z.overscaledZ)/Y.tileSize/8}),fu=R=>({u_matrix:R}),bc=(R,p,k,L)=>s.extend(fu(R),zl(k,p,L)),zs=(R,p)=>({u_matrix:R,u_world:p}),hu=(R,p,k,L,z)=>s.extend(bc(R,p,k,L),{u_world:z}),Nl=(R,p,k,L)=>{const z=R.transform;let j,Y;if(L.paint.get("circle-pitch-alignment")==="map"){const te=ir(k,1,z.zoom);j=!0,Y=[te,te]}else j=!1,Y=z.pixelsToGLUnits;return{u_camera_to_center_distance:z.cameraToCenterDistance,u_scale_with_map:+(L.paint.get("circle-pitch-scale")==="map"),u_matrix:R.translatePosMatrix(p.posMatrix,k,L.paint.get("circle-translate"),L.paint.get("circle-translate-anchor")),u_pitch_with_map:+j,u_device_pixel_ratio:R.pixelRatio,u_extrude_scale:Y}},wc=(R,p,k)=>{const L=ir(k,1,p.zoom),z=Math.pow(2,p.zoom-k.tileID.overscaledZ),j=k.tileID.overscaleFactor();return{u_matrix:R,u_camera_to_center_distance:p.cameraToCenterDistance,u_pixels_to_tile_units:L,u_extrude_scale:[p.pixelsToGLUnits[0]/(L*z),p.pixelsToGLUnits[1]/(L*z)],u_overscale_factor:j}},$u=(R,p,k=1)=>({u_matrix:R,u_color:p,u_overlay:0,u_overlay_scale:k}),du=R=>({u_matrix:R}),Ns=(R,p,k,L)=>({u_matrix:R,u_extrude_scale:ir(p,1,k),u_intensity:L});function qa(R,p){const k=Math.pow(2,p.canonical.z),L=p.canonical.y;return[new s.MercatorCoordinate(0,L/k).toLngLat().lat,new s.MercatorCoordinate(0,(L+1)/k).toLngLat().lat]}const Rs=(R,p,k,L)=>{const z=R.transform;return{u_matrix:De(R,p,k,L),u_ratio:1/ir(p,1,z.zoom),u_device_pixel_ratio:R.pixelRatio,u_units_to_pixels:[1/z.pixelsToGLUnits[0],1/z.pixelsToGLUnits[1]]}},Aa=(R,p,k,L,z)=>s.extend(Rs(R,p,k,z),{u_image:0,u_image_height:L}),O=(R,p,k,L,z)=>{const j=R.transform,Y=ce(p,j);return{u_matrix:De(R,p,k,z),u_texsize:p.imageAtlasTexture.size,u_ratio:1/ir(p,1,j.zoom),u_device_pixel_ratio:R.pixelRatio,u_image:0,u_scale:[Y,L.fromScale,L.toScale],u_fade:L.t,u_units_to_pixels:[1/j.pixelsToGLUnits[0],1/j.pixelsToGLUnits[1]]}},X=(R,p,k,L,z,j)=>{const Y=R.lineAtlas,te=ce(p,R.transform),se=k.layout.get("line-cap")==="round",ye=Y.getDash(L.from,se),Se=Y.getDash(L.to,se),Le=ye.width*z.fromScale,Ke=Se.width*z.toScale;return s.extend(Rs(R,p,k,j),{u_patternscale_a:[te/Le,-ye.height/2],u_patternscale_b:[te/Ke,-Se.height/2],u_sdfgamma:Y.width/(256*Math.min(Le,Ke)*R.pixelRatio)/2,u_image:0,u_tex_y_a:ye.y,u_tex_y_b:Se.y,u_mix:z.t})};function ce(R,p){return 1/ir(R,1,p.tileZoom)}function De(R,p,k,L){return R.translatePosMatrix(L?L.posMatrix:p.tileID.posMatrix,p,k.paint.get("line-translate"),k.paint.get("line-translate-anchor"))}const et=(R,p,k,L,z)=>{return{u_matrix:R,u_tl_parent:p,u_scale_parent:k,u_buffer_scale:1,u_fade_t:L.mix,u_opacity:L.opacity*z.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:z.paint.get("raster-brightness-min"),u_brightness_high:z.paint.get("raster-brightness-max"),u_saturation_factor:(Y=z.paint.get("raster-saturation"),Y>0?1-1/(1.001-Y):-Y),u_contrast_factor:(j=z.paint.get("raster-contrast"),j>0?1/(1-j):1+j),u_spin_weights:vt(z.paint.get("raster-hue-rotate"))};var j,Y};function vt(R){R*=Math.PI/180;const p=Math.sin(R),k=Math.cos(R);return[(2*k+1)/3,(-Math.sqrt(3)*p-k+1)/3,(Math.sqrt(3)*p-k+1)/3]}const Ft=(R,p,k,L,z,j,Y,te,se,ye)=>{const Se=z.transform;return{u_is_size_zoom_constant:+(R==="constant"||R==="source"),u_is_size_feature_constant:+(R==="constant"||R==="camera"),u_size_t:p?p.uSizeT:0,u_size:p?p.uSize:0,u_camera_to_center_distance:Se.cameraToCenterDistance,u_pitch:Se.pitch/360*2*Math.PI,u_rotate_symbol:+k,u_aspect_ratio:Se.width/Se.height,u_fade_change:z.options.fadeDuration?z.symbolFadeChange:1,u_matrix:j,u_label_plane_matrix:Y,u_coord_matrix:te,u_is_text:+se,u_pitch_with_map:+L,u_texsize:ye,u_texture:0}},Ot=(R,p,k,L,z,j,Y,te,se,ye,Se)=>{const Le=z.transform;return s.extend(Ft(R,p,k,L,z,j,Y,te,se,ye),{u_gamma_scale:L?Math.cos(Le._pitch)*Le.cameraToCenterDistance:1,u_device_pixel_ratio:z.pixelRatio,u_is_halo:+Se})},yr=(R,p,k,L,z,j,Y,te,se,ye)=>s.extend(Ot(R,p,k,L,z,j,Y,te,!0,se,!0),{u_texsize_icon:ye,u_texture_icon:1}),hr=(R,p,k)=>({u_matrix:R,u_opacity:p,u_color:k}),br=(R,p,k,L,z,j)=>s.extend(function(Y,te,se,ye){const Se=se.imageManager.getPattern(Y.from.toString()),Le=se.imageManager.getPattern(Y.to.toString()),{width:Ke,height:bt}=se.imageManager.getPixelSize(),T=Math.pow(2,ye.tileID.overscaledZ),B=ye.tileSize*Math.pow(2,se.transform.tileZoom)/T,W=B*(ye.tileID.canonical.x+ye.tileID.wrap*T),oe=B*ye.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Se.tl,u_pattern_br_a:Se.br,u_pattern_tl_b:Le.tl,u_pattern_br_b:Le.br,u_texsize:[Ke,bt],u_mix:te.t,u_pattern_size_a:Se.displaySize,u_pattern_size_b:Le.displaySize,u_scale_a:te.fromScale,u_scale_b:te.toScale,u_tile_units_to_pixels:1/ir(ye,1,se.transform.tileZoom),u_pixel_coord_upper:[W>>16,oe>>16],u_pixel_coord_lower:[65535&W,65535&oe]}}(L,j,k,z),{u_matrix:R,u_opacity:p}),kr={fillExtrusion:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_lightpos:new s.Uniform3f(R,p.u_lightpos),u_lightintensity:new s.Uniform1f(R,p.u_lightintensity),u_lightcolor:new s.Uniform3f(R,p.u_lightcolor),u_vertical_gradient:new s.Uniform1f(R,p.u_vertical_gradient),u_opacity:new s.Uniform1f(R,p.u_opacity)}),fillExtrusionPattern:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_lightpos:new s.Uniform3f(R,p.u_lightpos),u_lightintensity:new s.Uniform1f(R,p.u_lightintensity),u_lightcolor:new s.Uniform3f(R,p.u_lightcolor),u_vertical_gradient:new s.Uniform1f(R,p.u_vertical_gradient),u_height_factor:new s.Uniform1f(R,p.u_height_factor),u_image:new s.Uniform1i(R,p.u_image),u_texsize:new s.Uniform2f(R,p.u_texsize),u_pixel_coord_upper:new s.Uniform2f(R,p.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(R,p.u_pixel_coord_lower),u_scale:new s.Uniform3f(R,p.u_scale),u_fade:new s.Uniform1f(R,p.u_fade),u_opacity:new s.Uniform1f(R,p.u_opacity)}),fill:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix)}),fillPattern:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_image:new s.Uniform1i(R,p.u_image),u_texsize:new s.Uniform2f(R,p.u_texsize),u_pixel_coord_upper:new s.Uniform2f(R,p.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(R,p.u_pixel_coord_lower),u_scale:new s.Uniform3f(R,p.u_scale),u_fade:new s.Uniform1f(R,p.u_fade)}),fillOutline:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_world:new s.Uniform2f(R,p.u_world)}),fillOutlinePattern:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_world:new s.Uniform2f(R,p.u_world),u_image:new s.Uniform1i(R,p.u_image),u_texsize:new s.Uniform2f(R,p.u_texsize),u_pixel_coord_upper:new s.Uniform2f(R,p.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(R,p.u_pixel_coord_lower),u_scale:new s.Uniform3f(R,p.u_scale),u_fade:new s.Uniform1f(R,p.u_fade)}),circle:(R,p)=>({u_camera_to_center_distance:new s.Uniform1f(R,p.u_camera_to_center_distance),u_scale_with_map:new s.Uniform1i(R,p.u_scale_with_map),u_pitch_with_map:new s.Uniform1i(R,p.u_pitch_with_map),u_extrude_scale:new s.Uniform2f(R,p.u_extrude_scale),u_device_pixel_ratio:new s.Uniform1f(R,p.u_device_pixel_ratio),u_matrix:new s.UniformMatrix4f(R,p.u_matrix)}),collisionBox:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_camera_to_center_distance:new s.Uniform1f(R,p.u_camera_to_center_distance),u_pixels_to_tile_units:new s.Uniform1f(R,p.u_pixels_to_tile_units),u_extrude_scale:new s.Uniform2f(R,p.u_extrude_scale),u_overscale_factor:new s.Uniform1f(R,p.u_overscale_factor)}),collisionCircle:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_inv_matrix:new s.UniformMatrix4f(R,p.u_inv_matrix),u_camera_to_center_distance:new s.Uniform1f(R,p.u_camera_to_center_distance),u_viewport_size:new s.Uniform2f(R,p.u_viewport_size)}),debug:(R,p)=>({u_color:new s.UniformColor(R,p.u_color),u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_overlay:new s.Uniform1i(R,p.u_overlay),u_overlay_scale:new s.Uniform1f(R,p.u_overlay_scale)}),clippingMask:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix)}),heatmap:(R,p)=>({u_extrude_scale:new s.Uniform1f(R,p.u_extrude_scale),u_intensity:new s.Uniform1f(R,p.u_intensity),u_matrix:new s.UniformMatrix4f(R,p.u_matrix)}),heatmapTexture:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_world:new s.Uniform2f(R,p.u_world),u_image:new s.Uniform1i(R,p.u_image),u_color_ramp:new s.Uniform1i(R,p.u_color_ramp),u_opacity:new s.Uniform1f(R,p.u_opacity)}),hillshade:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_image:new s.Uniform1i(R,p.u_image),u_latrange:new s.Uniform2f(R,p.u_latrange),u_light:new s.Uniform2f(R,p.u_light),u_shadow:new s.UniformColor(R,p.u_shadow),u_highlight:new s.UniformColor(R,p.u_highlight),u_accent:new s.UniformColor(R,p.u_accent)}),hillshadePrepare:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_image:new s.Uniform1i(R,p.u_image),u_dimension:new s.Uniform2f(R,p.u_dimension),u_zoom:new s.Uniform1f(R,p.u_zoom),u_unpack:new s.Uniform4f(R,p.u_unpack)}),line:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_ratio:new s.Uniform1f(R,p.u_ratio),u_device_pixel_ratio:new s.Uniform1f(R,p.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(R,p.u_units_to_pixels)}),lineGradient:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_ratio:new s.Uniform1f(R,p.u_ratio),u_device_pixel_ratio:new s.Uniform1f(R,p.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(R,p.u_units_to_pixels),u_image:new s.Uniform1i(R,p.u_image),u_image_height:new s.Uniform1f(R,p.u_image_height)}),linePattern:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_texsize:new s.Uniform2f(R,p.u_texsize),u_ratio:new s.Uniform1f(R,p.u_ratio),u_device_pixel_ratio:new s.Uniform1f(R,p.u_device_pixel_ratio),u_image:new s.Uniform1i(R,p.u_image),u_units_to_pixels:new s.Uniform2f(R,p.u_units_to_pixels),u_scale:new s.Uniform3f(R,p.u_scale),u_fade:new s.Uniform1f(R,p.u_fade)}),lineSDF:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_ratio:new s.Uniform1f(R,p.u_ratio),u_device_pixel_ratio:new s.Uniform1f(R,p.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(R,p.u_units_to_pixels),u_patternscale_a:new s.Uniform2f(R,p.u_patternscale_a),u_patternscale_b:new s.Uniform2f(R,p.u_patternscale_b),u_sdfgamma:new s.Uniform1f(R,p.u_sdfgamma),u_image:new s.Uniform1i(R,p.u_image),u_tex_y_a:new s.Uniform1f(R,p.u_tex_y_a),u_tex_y_b:new s.Uniform1f(R,p.u_tex_y_b),u_mix:new s.Uniform1f(R,p.u_mix)}),raster:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_tl_parent:new s.Uniform2f(R,p.u_tl_parent),u_scale_parent:new s.Uniform1f(R,p.u_scale_parent),u_buffer_scale:new s.Uniform1f(R,p.u_buffer_scale),u_fade_t:new s.Uniform1f(R,p.u_fade_t),u_opacity:new s.Uniform1f(R,p.u_opacity),u_image0:new s.Uniform1i(R,p.u_image0),u_image1:new s.Uniform1i(R,p.u_image1),u_brightness_low:new s.Uniform1f(R,p.u_brightness_low),u_brightness_high:new s.Uniform1f(R,p.u_brightness_high),u_saturation_factor:new s.Uniform1f(R,p.u_saturation_factor),u_contrast_factor:new s.Uniform1f(R,p.u_contrast_factor),u_spin_weights:new s.Uniform3f(R,p.u_spin_weights)}),symbolIcon:(R,p)=>({u_is_size_zoom_constant:new s.Uniform1i(R,p.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(R,p.u_is_size_feature_constant),u_size_t:new s.Uniform1f(R,p.u_size_t),u_size:new s.Uniform1f(R,p.u_size),u_camera_to_center_distance:new s.Uniform1f(R,p.u_camera_to_center_distance),u_pitch:new s.Uniform1f(R,p.u_pitch),u_rotate_symbol:new s.Uniform1i(R,p.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(R,p.u_aspect_ratio),u_fade_change:new s.Uniform1f(R,p.u_fade_change),u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(R,p.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(R,p.u_coord_matrix),u_is_text:new s.Uniform1i(R,p.u_is_text),u_pitch_with_map:new s.Uniform1i(R,p.u_pitch_with_map),u_texsize:new s.Uniform2f(R,p.u_texsize),u_texture:new s.Uniform1i(R,p.u_texture)}),symbolSDF:(R,p)=>({u_is_size_zoom_constant:new s.Uniform1i(R,p.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(R,p.u_is_size_feature_constant),u_size_t:new s.Uniform1f(R,p.u_size_t),u_size:new s.Uniform1f(R,p.u_size),u_camera_to_center_distance:new s.Uniform1f(R,p.u_camera_to_center_distance),u_pitch:new s.Uniform1f(R,p.u_pitch),u_rotate_symbol:new s.Uniform1i(R,p.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(R,p.u_aspect_ratio),u_fade_change:new s.Uniform1f(R,p.u_fade_change),u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(R,p.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(R,p.u_coord_matrix),u_is_text:new s.Uniform1i(R,p.u_is_text),u_pitch_with_map:new s.Uniform1i(R,p.u_pitch_with_map),u_texsize:new s.Uniform2f(R,p.u_texsize),u_texture:new s.Uniform1i(R,p.u_texture),u_gamma_scale:new s.Uniform1f(R,p.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(R,p.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(R,p.u_is_halo)}),symbolTextAndIcon:(R,p)=>({u_is_size_zoom_constant:new s.Uniform1i(R,p.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(R,p.u_is_size_feature_constant),u_size_t:new s.Uniform1f(R,p.u_size_t),u_size:new s.Uniform1f(R,p.u_size),u_camera_to_center_distance:new s.Uniform1f(R,p.u_camera_to_center_distance),u_pitch:new s.Uniform1f(R,p.u_pitch),u_rotate_symbol:new s.Uniform1i(R,p.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(R,p.u_aspect_ratio),u_fade_change:new s.Uniform1f(R,p.u_fade_change),u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(R,p.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(R,p.u_coord_matrix),u_is_text:new s.Uniform1i(R,p.u_is_text),u_pitch_with_map:new s.Uniform1i(R,p.u_pitch_with_map),u_texsize:new s.Uniform2f(R,p.u_texsize),u_texsize_icon:new s.Uniform2f(R,p.u_texsize_icon),u_texture:new s.Uniform1i(R,p.u_texture),u_texture_icon:new s.Uniform1i(R,p.u_texture_icon),u_gamma_scale:new s.Uniform1f(R,p.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(R,p.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(R,p.u_is_halo)}),background:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_opacity:new s.Uniform1f(R,p.u_opacity),u_color:new s.UniformColor(R,p.u_color)}),backgroundPattern:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_opacity:new s.Uniform1f(R,p.u_opacity),u_image:new s.Uniform1i(R,p.u_image),u_pattern_tl_a:new s.Uniform2f(R,p.u_pattern_tl_a),u_pattern_br_a:new s.Uniform2f(R,p.u_pattern_br_a),u_pattern_tl_b:new s.Uniform2f(R,p.u_pattern_tl_b),u_pattern_br_b:new s.Uniform2f(R,p.u_pattern_br_b),u_texsize:new s.Uniform2f(R,p.u_texsize),u_mix:new s.Uniform1f(R,p.u_mix),u_pattern_size_a:new s.Uniform2f(R,p.u_pattern_size_a),u_pattern_size_b:new s.Uniform2f(R,p.u_pattern_size_b),u_scale_a:new s.Uniform1f(R,p.u_scale_a),u_scale_b:new s.Uniform1f(R,p.u_scale_b),u_pixel_coord_upper:new s.Uniform2f(R,p.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(R,p.u_pixel_coord_lower),u_tile_units_to_pixels:new s.Uniform1f(R,p.u_tile_units_to_pixels)}),terrain:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_texture:new s.Uniform1i(R,p.u_texture),u_ele_delta:new s.Uniform1f(R,p.u_ele_delta)}),terrainDepth:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_ele_delta:new s.Uniform1f(R,p.u_ele_delta)}),terrainCoords:(R,p)=>({u_matrix:new s.UniformMatrix4f(R,p.u_matrix),u_texture:new s.Uniform1i(R,p.u_texture),u_terrain_coords_id:new s.Uniform1f(R,p.u_terrain_coords_id),u_ele_delta:new s.Uniform1f(R,p.u_ele_delta)})};class Nr{constructor(p,k,L){this.context=p;const z=p.gl;this.buffer=z.createBuffer(),this.dynamicDraw=!!L,this.context.unbindVAO(),p.bindElementBuffer.set(this.buffer),z.bufferData(z.ELEMENT_ARRAY_BUFFER,k.arrayBuffer,this.dynamicDraw?z.DYNAMIC_DRAW:z.STATIC_DRAW),this.dynamicDraw||delete k.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(p){const k=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),k.bufferSubData(k.ELEMENT_ARRAY_BUFFER,0,p.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Xr={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class xi{constructor(p,k,L,z){this.length=k.length,this.attributes=L,this.itemSize=k.bytesPerElement,this.dynamicDraw=z,this.context=p;const j=p.gl;this.buffer=j.createBuffer(),p.bindVertexBuffer.set(this.buffer),j.bufferData(j.ARRAY_BUFFER,k.arrayBuffer,this.dynamicDraw?j.DYNAMIC_DRAW:j.STATIC_DRAW),this.dynamicDraw||delete k.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(p){if(p.length!==this.length)throw new Error(`Length of new data is ${p.length}, which doesn't match current length of ${this.length}`);const k=this.context.gl;this.bind(),k.bufferSubData(k.ARRAY_BUFFER,0,p.arrayBuffer)}enableAttributes(p,k){for(let L=0;L0){const Gt=s.create(),$t=$e;s.mul(Gt,ze.placementInvProjMatrix,R.transform.glCoordMatrix),s.mul(Gt,Gt,ze.placementViewportMatrix),Se.push({circleArray:At,circleOffset:Ke,transform:$t,invTransform:Gt,coord:we}),Le+=At.length/4,Ke=Le}ht&&ye.draw(te,se.LINES,di.disabled,Gi.disabled,R.colorModeForRenderPass(),rn.disabled,wc($e,R.transform,Te),R.style.map.terrain&&R.style.map.terrain.getTerrainData(we),k.id,ht.layoutVertexBuffer,ht.indexBuffer,ht.segments,null,R.transform.zoom,null,null,ht.collisionVertexBuffer)}if(!Y||!Se.length)return;const bt=R.useProgram("collisionCircle"),T=new s.CollisionCircleLayoutArray;T.resize(4*Le),T._trim();let B=0;for(const ue of Se)for(let we=0;we=0&&(T[W.associatedIconIndex]={shiftedAnchor:Pr,angle:rr})}else ut(W.numGlyphs,Ke)}if(ye){bt.clear();const B=R.icon.placedSymbolArray;for(let W=0;WR.style.map.terrain.getElevation(ht,Uo,Wo):null,So=k.layout.get("text-rotation-alignment")==="map";wi(Gt,ht.posMatrix,R,z,kn,Vn,W,ye,So,Ao)}const co=R.translatePosMatrix(ht.posMatrix,At,j,Y),Qi=oe||z&&ze||Cn?na:kn,gn=R.translatePosMatrix(Vn,At,j,Y,!0),xo=rr&&k.paint.get(z?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let In;In=rr?Gt.iconsInText?yr(Dt.kind,Or,ve,W,R,co,Qi,gn,Zr,xn):Ot(Dt.kind,Or,ve,W,R,co,Qi,gn,z,Zr,!0):Ft(Dt.kind,Or,ve,W,R,co,Qi,gn,z,Zr);const Pn={program:Lr,buffers:$t,uniformValues:In,atlasTexture:ii,atlasTextureIcon:qn,atlasInterpolation:qi,atlasInterpolationIcon:ui,isSDF:rr,hasHalo:xo};if(ue&&Gt.canOverlap){we=!0;const Ao=$t.segments.get();for(const So of Ao)$e.push({segments:new s.SegmentVector([So]),sortKey:So.sortKey,state:Pn,terrainData:Mr})}else $e.push({segments:$t.segments,sortKey:0,state:Pn,terrainData:Mr})}we&&$e.sort((ht,At)=>ht.sortKey-At.sortKey);for(const ht of $e){const At=ht.state;if(Ke.activeTexture.set(bt.TEXTURE0),At.atlasTexture.bind(At.atlasInterpolation,bt.CLAMP_TO_EDGE),At.atlasTextureIcon&&(Ke.activeTexture.set(bt.TEXTURE1),At.atlasTextureIcon&&At.atlasTextureIcon.bind(At.atlasInterpolationIcon,bt.CLAMP_TO_EDGE)),At.isSDF){const Gt=At.uniformValues;At.hasHalo&&(Gt.u_is_halo=1,js(At.buffers,ht.segments,k,R,At.program,Te,Se,Le,Gt,ht.terrainData)),Gt.u_is_halo=0}js(At.buffers,ht.segments,k,R,At.program,Te,Se,Le,At.uniformValues,ht.terrainData)}}function js(R,p,k,L,z,j,Y,te,se,ye){const Se=L.context;z.draw(Se,Se.gl.TRIANGLES,j,Y,te,rn.disabled,se,ye,k.id,R.layoutVertexBuffer,R.indexBuffer,p,k.paint,L.transform.zoom,R.programConfigurations.get(k.id),R.dynamicLayoutVertexBuffer,R.opacityVertexBuffer)}function Us(R,p,k,L,z){if(!k||!L||!L.imageAtlas)return;const j=L.imageAtlas.patternPositions;let Y=j[k.to.toString()],te=j[k.from.toString()];if(!Y||!te){const se=z.getPaintProperty(p);Y=j[se],te=j[se]}Y&&te&&R.setConstantPatternPositions(Y,te)}function al(R,p,k,L,z,j,Y){const te=R.context.gl,se="fill-pattern",ye=k.paint.get(se),Se=ye&&ye.constantOr(1),Le=k.getCrossfadeParameters();let Ke,bt,T,B,W;Y?(bt=Se&&!k.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Ke=te.LINES):(bt=Se?"fillPattern":"fill",Ke=te.TRIANGLES);const oe=ye.constantOr(null);for(const ve of L){const ue=p.getTile(ve);if(Se&&!ue.patternsLoaded())continue;const we=ue.getBucket(k);if(!we)continue;const Te=we.programConfigurations.get(k.id),ze=R.useProgram(bt,Te),$e=R.style.map.terrain&&R.style.map.terrain.getTerrainData(ve);Se&&(R.context.activeTexture.set(te.TEXTURE0),ue.imageAtlasTexture.bind(te.LINEAR,te.CLAMP_TO_EDGE),Te.updatePaintBuffers(Le)),Us(Te,se,oe,ue,k);const ht=$e?ve:null,At=R.translatePosMatrix(ht?ht.posMatrix:ve.posMatrix,ue,k.paint.get("fill-translate"),k.paint.get("fill-translate-anchor"));if(Y){B=we.indexBuffer2,W=we.segments2;const Gt=[te.drawingBufferWidth,te.drawingBufferHeight];T=bt==="fillOutlinePattern"&&Se?hu(At,R,Le,ue,Gt):zs(At,Gt)}else B=we.indexBuffer,W=we.segments,T=Se?bc(At,R,Le,ue):fu(At);ze.draw(R.context,Ke,z,R.stencilModeForClipping(ve),j,rn.disabled,T,$e,k.id,we.layoutVertexBuffer,B,W,k.paint,R.transform.zoom,Te)}}function gu(R,p,k,L,z,j,Y){const te=R.context,se=te.gl,ye="fill-extrusion-pattern",Se=k.paint.get(ye),Le=Se.constantOr(1),Ke=k.getCrossfadeParameters(),bt=k.paint.get("fill-extrusion-opacity"),T=Se.constantOr(null);for(const B of L){const W=p.getTile(B),oe=W.getBucket(k);if(!oe)continue;const ve=R.style.map.terrain&&R.style.map.terrain.getTerrainData(B),ue=oe.programConfigurations.get(k.id),we=R.useProgram(Le?"fillExtrusionPattern":"fillExtrusion",ue);Le&&(R.context.activeTexture.set(se.TEXTURE0),W.imageAtlasTexture.bind(se.LINEAR,se.CLAMP_TO_EDGE),ue.updatePaintBuffers(Ke)),Us(ue,ye,T,W,k);const Te=R.translatePosMatrix(B.posMatrix,W,k.paint.get("fill-extrusion-translate"),k.paint.get("fill-extrusion-translate-anchor")),ze=k.paint.get("fill-extrusion-vertical-gradient"),$e=Le?vc(Te,R,ze,bt,B,Ke,W):il(Te,R,ze,bt);we.draw(te,te.gl.TRIANGLES,z,j,Y,rn.backCCW,$e,ve,k.id,oe.layoutVertexBuffer,oe.indexBuffer,oe.segments,k.paint,R.transform.zoom,ue,R.style.map.terrain&&oe.centroidVertexBuffer)}}function yu(R,p,k,L,z,j,Y){const te=R.context,se=te.gl,ye=k.fbo;if(!ye)return;const Se=R.useProgram("hillshade"),Le=R.style.map.terrain&&R.style.map.terrain.getTerrainData(p);te.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,ye.colorAttachment.get()),Se.draw(te,se.TRIANGLES,z,j,Y,rn.disabled,((Ke,bt,T,B)=>{const W=T.paint.get("hillshade-shadow-color"),oe=T.paint.get("hillshade-highlight-color"),ve=T.paint.get("hillshade-accent-color");let ue=T.paint.get("hillshade-illumination-direction")*(Math.PI/180);T.paint.get("hillshade-illumination-anchor")==="viewport"&&(ue-=Ke.transform.angle);const we=!Ke.options.moving;return{u_matrix:B?B.posMatrix:Ke.transform.calculatePosMatrix(bt.tileID.toUnwrapped(),we),u_image:0,u_latrange:qa(0,bt.tileID),u_light:[T.paint.get("hillshade-exaggeration"),ue],u_shadow:W,u_highlight:oe,u_accent:ve}})(R,k,L,Le?p:null),Le,L.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments)}function Go(R,p,k,L,z,j){const Y=R.context,te=Y.gl,se=p.dem;if(se&&se.data){const ye=se.dim,Se=se.stride,Le=se.getPixels();if(Y.activeTexture.set(te.TEXTURE1),Y.pixelStoreUnpackPremultiplyAlpha.set(!1),p.demTexture=p.demTexture||R.getTileTexture(Se),p.demTexture){const bt=p.demTexture;bt.update(Le,{premultiply:!1}),bt.bind(te.NEAREST,te.CLAMP_TO_EDGE)}else p.demTexture=new Fe(Y,Le,te.RGBA,{premultiply:!1}),p.demTexture.bind(te.NEAREST,te.CLAMP_TO_EDGE);Y.activeTexture.set(te.TEXTURE0);let Ke=p.fbo;if(!Ke){const bt=new Fe(Y,{width:ye,height:ye,data:null},te.RGBA);bt.bind(te.LINEAR,te.CLAMP_TO_EDGE),Ke=p.fbo=Y.createFramebuffer(ye,ye,!0,!1),Ke.colorAttachment.set(bt.texture)}Y.bindFramebuffer.set(Ke.framebuffer),Y.viewport.set([0,0,ye,ye]),R.useProgram("hillshadePrepare").draw(Y,te.TRIANGLES,L,z,j,rn.disabled,((bt,T)=>{const B=T.stride,W=s.create();return s.ortho(W,0,s.EXTENT,-s.EXTENT,0,0,1),s.translate(W,W,[0,-s.EXTENT,0]),{u_matrix:W,u_image:1,u_dimension:[B,B],u_zoom:bt.overscaledZ,u_unpack:T.getUnpackVector()}})(p.tileID,se),null,k.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments),p.needsHillshadePrepare=!1}}function qs(R,p,k,L,z,j){const Y=L.paint.get("raster-fade-duration");if(!j&&Y>0){const te=s.browser.now(),se=(te-R.timeAdded)/Y,ye=p?(te-p.timeAdded)/Y:-1,Se=k.getSource(),Le=z.coveringZoomLevel({tileSize:Se.tileSize,roundZoom:Se.roundZoom}),Ke=!p||Math.abs(p.tileID.overscaledZ-Le)>Math.abs(R.tileID.overscaledZ-Le),bt=Ke&&R.refreshedUponExpiration?1:s.clamp(Ke?se:1-ye,0,1);return R.refreshedUponExpiration&&se>=1&&(R.refreshedUponExpiration=!1),p?{opacity:1,mix:1-bt}:{opacity:bt,mix:0}}return{opacity:1,mix:0}}const _a=new s.Color(1,0,0,1),Pa=new s.Color(0,1,0,1),jl=new s.Color(0,0,1,1),Ul=new s.Color(1,0,1,1),ws=new s.Color(0,1,1,1);function Vs(R,p,k,L){ql(R,0,p+k/2,R.transform.width,k,L)}function va(R,p,k,L){ql(R,p-k/2,0,k,R.transform.height,L)}function ql(R,p,k,L,z,j){const Y=R.context,te=Y.gl;te.enable(te.SCISSOR_TEST),te.scissor(p*R.pixelRatio,k*R.pixelRatio,L*R.pixelRatio,z*R.pixelRatio),Y.clear({color:j}),te.disable(te.SCISSOR_TEST)}function _u(R,p,k){const L=R.context,z=L.gl,j=k.posMatrix,Y=R.useProgram("debug"),te=di.disabled,se=Gi.disabled,ye=R.colorModeForRenderPass(),Se="$debug",Le=R.style.map.terrain&&R.style.map.terrain.getTerrainData(k);L.activeTexture.set(z.TEXTURE0);const Ke=p.getTileByID(k.key).latestRawTileData,bt=Math.floor((Ke&&Ke.byteLength||0)/1024),T=p.getTile(k).tileSize,B=512/Math.min(T,512)*(k.overscaledZ/R.transform.zoom)*.5;let W=k.canonical.toString();k.overscaledZ!==k.canonical.z&&(W+=` => ${k.overscaledZ}`),function(oe,ve){oe.initDebugOverlayCanvas();const ue=oe.debugOverlayCanvas,we=oe.context.gl,Te=oe.debugOverlayCanvas.getContext("2d");Te.clearRect(0,0,ue.width,ue.height),Te.shadowColor="white",Te.shadowBlur=2,Te.lineWidth=1.5,Te.strokeStyle="white",Te.textBaseline="top",Te.font="bold 36px Open Sans, sans-serif",Te.fillText(ve,5,5),Te.strokeText(ve,5,5),oe.debugOverlayTexture.update(ue),oe.debugOverlayTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE)}(R,`${W} ${bt}kB`),Y.draw(L,z.TRIANGLES,te,se,Wr.alphaBlended,rn.disabled,$u(j,s.Color.transparent,B),null,Se,R.debugBuffer,R.quadTriangleIndexBuffer,R.debugSegments),Y.draw(L,z.LINE_STRIP,te,se,ye,rn.disabled,$u(j,s.Color.red),Le,Se,R.debugBuffer,R.tileBorderIndexBuffer,R.debugSegments)}function vu(R,p,k){const L=R.context,z=L.gl,j=R.colorModeForRenderPass(),Y=new di(z.LEQUAL,di.ReadWrite,R.depthRangeFor3D),te=R.useProgram("terrain"),se=p.getTerrainMesh();L.bindFramebuffer.set(null),L.viewport.set([0,0,R.width,R.height]);for(const ye of k){const Se=R.renderToTexture.getTexture(ye),Le=p.getTerrainData(ye.tileID);L.activeTexture.set(z.TEXTURE0),z.bindTexture(z.TEXTURE_2D,Se.texture);const Ke={u_matrix:R.transform.calculatePosMatrix(ye.tileID.toUnwrapped()),u_texture:0,u_ele_delta:p.getMeshFrameDelta(R.transform.zoom)};te.draw(L,z.TRIANGLES,Y,Gi.disabled,j,rn.backCCW,Ke,Le,"terrain",se.vertexBuffer,se.indexBuffer,se.segments)}}class Va{constructor(p,k){this.context=new Pi(p),this.transform=k,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:s.create(),renderTime:0},this.setup(),this.numSublayers=Vr.maxUnderzooming+Vr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Mo}resize(p,k,L){if(this.width=Math.floor(p*L),this.height=Math.floor(k*L),this.pixelRatio=L,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const z of this.style._order)this.style._layers[z].resize()}setup(){const p=this.context,k=new s.PosArray;k.emplaceBack(0,0),k.emplaceBack(s.EXTENT,0),k.emplaceBack(0,s.EXTENT),k.emplaceBack(s.EXTENT,s.EXTENT),this.tileExtentBuffer=p.createVertexBuffer(k,rl.members),this.tileExtentSegments=s.SegmentVector.simpleSegment(0,0,4,2);const L=new s.PosArray;L.emplaceBack(0,0),L.emplaceBack(s.EXTENT,0),L.emplaceBack(0,s.EXTENT),L.emplaceBack(s.EXTENT,s.EXTENT),this.debugBuffer=p.createVertexBuffer(L,rl.members),this.debugSegments=s.SegmentVector.simpleSegment(0,0,4,5);const z=new s.RasterBoundsArray;z.emplaceBack(0,0,0,0),z.emplaceBack(s.EXTENT,0,s.EXTENT,0),z.emplaceBack(0,s.EXTENT,0,s.EXTENT),z.emplaceBack(s.EXTENT,s.EXTENT,s.EXTENT,s.EXTENT),this.rasterBoundsBuffer=p.createVertexBuffer(z,_r.members),this.rasterBoundsSegments=s.SegmentVector.simpleSegment(0,0,4,2);const j=new s.PosArray;j.emplaceBack(0,0),j.emplaceBack(1,0),j.emplaceBack(0,1),j.emplaceBack(1,1),this.viewportBuffer=p.createVertexBuffer(j,rl.members),this.viewportSegments=s.SegmentVector.simpleSegment(0,0,4,2);const Y=new s.LineStripIndexArray;Y.emplaceBack(0),Y.emplaceBack(1),Y.emplaceBack(3),Y.emplaceBack(2),Y.emplaceBack(0),this.tileBorderIndexBuffer=p.createIndexBuffer(Y);const te=new s.TriangleIndexArray;te.emplaceBack(0,1,2),te.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=p.createIndexBuffer(te);const se=this.context.gl;this.stencilClearMode=new Gi({func:se.ALWAYS,mask:0},0,255,se.ZERO,se.ZERO,se.ZERO)}clearStencil(){const p=this.context,k=p.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const L=s.create();s.ortho(L,0,this.width,this.height,0,0,1),s.scale(L,L,[k.drawingBufferWidth,k.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(p,k.TRIANGLES,di.disabled,this.stencilClearMode,Wr.disabled,rn.disabled,du(L),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(p,k){if(this.currentStencilSource===p.source||!p.isTileClipped()||!k||!k.length)return;this.currentStencilSource=p.source;const L=this.context,z=L.gl;this.nextStencilID+k.length>256&&this.clearStencil(),L.setColorMode(Wr.disabled),L.setDepthMode(di.disabled);const j=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const Y of k){const te=this._tileClippingMaskIDs[Y.key]=this.nextStencilID++,se=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Y);j.draw(L,z.TRIANGLES,di.disabled,new Gi({func:z.ALWAYS,mask:0},te,255,z.KEEP,z.KEEP,z.REPLACE),Wr.disabled,rn.disabled,du(Y.posMatrix),se,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const p=this.nextStencilID++,k=this.context.gl;return new Gi({func:k.NOTEQUAL,mask:255},p,255,k.KEEP,k.KEEP,k.REPLACE)}stencilModeForClipping(p){const k=this.context.gl;return new Gi({func:k.EQUAL,mask:255},this._tileClippingMaskIDs[p.key],0,k.KEEP,k.KEEP,k.REPLACE)}stencilConfigForOverlap(p){const k=this.context.gl,L=p.sort((Y,te)=>te.overscaledZ-Y.overscaledZ),z=L[L.length-1].overscaledZ,j=L[0].overscaledZ-z+1;if(j>1){this.currentStencilSource=void 0,this.nextStencilID+j>256&&this.clearStencil();const Y={};for(let te=0;te=0;this.currentLayer--){const se=this.style._layers[L[this.currentLayer]],ye=z[se.source],Se=j[se.source];this._renderTileClippingMasks(se,Se),this.renderLayer(this,ye,se,Se)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerW.source&&!W.isHidden(Se)?[ye.sourceCaches[W.source]]:[]),bt=Ke.filter(W=>W.getSource().type==="vector"),T=Ke.filter(W=>W.getSource().type!=="vector"),B=W=>{(!Le||Le.getSource().maxzoomB(W)),Le||T.forEach(W=>B(W)),Le}(this.style,this.transform.zoom);se&&function(ye,Se,Le){for(let Ke=0;Kebt.style.map.terrain.getElevation(ze,Dt,Et):null)}}}(se,j,te,Y,te.layout.get("text-rotation-alignment"),te.layout.get("text-pitch-alignment"),ye),te.paint.get("icon-opacity").constantOr(1)!==0&&Ea(j,Y,te,se,!1,te.paint.get("icon-translate"),te.paint.get("icon-translate-anchor"),te.layout.get("icon-rotation-alignment"),te.layout.get("icon-pitch-alignment"),te.layout.get("icon-keep-upright"),Se,Le),te.paint.get("text-opacity").constantOr(1)!==0&&Ea(j,Y,te,se,!0,te.paint.get("text-translate"),te.paint.get("text-translate-anchor"),te.layout.get("text-rotation-alignment"),te.layout.get("text-pitch-alignment"),te.layout.get("text-keep-upright"),Se,Le),Y.map.showCollisionBoxes&&($o(j,Y,te,se,te.paint.get("text-translate"),te.paint.get("text-translate-anchor"),!0),$o(j,Y,te,se,te.paint.get("icon-translate"),te.paint.get("icon-translate-anchor"),!1))})(p,k,L,z,this.style.placement.variableOffsets);break;case"circle":(function(j,Y,te,se){if(j.renderPass!=="translucent")return;const ye=te.paint.get("circle-opacity"),Se=te.paint.get("circle-stroke-width"),Le=te.paint.get("circle-stroke-opacity"),Ke=!te.layout.get("circle-sort-key").isConstant();if(ye.constantOr(1)===0&&(Se.constantOr(1)===0||Le.constantOr(1)===0))return;const bt=j.context,T=bt.gl,B=j.depthModeForSublayer(0,di.ReadOnly),W=Gi.disabled,oe=j.colorModeForRenderPass(),ve=[];for(let ue=0;ueue.sortKey-we.sortKey);for(const ue of ve){const{programConfiguration:we,program:Te,layoutVertexBuffer:ze,indexBuffer:$e,uniformValues:ht,terrainData:At}=ue.state;Te.draw(bt,T.TRIANGLES,B,W,oe,rn.disabled,ht,At,te.id,ze,$e,ue.segments,te.paint,j.transform.zoom,we)}})(p,k,L,z);break;case"heatmap":(function(j,Y,te,se){if(te.paint.get("heatmap-opacity")!==0)if(j.renderPass==="offscreen"){const ye=j.context,Se=ye.gl,Le=Gi.disabled,Ke=new Wr([Se.ONE,Se.ONE],s.Color.transparent,[!0,!0,!0,!0]);(function(bt,T,B){const W=bt.gl;bt.activeTexture.set(W.TEXTURE1),bt.viewport.set([0,0,T.width/4,T.height/4]);let oe=B.heatmapFbo;if(oe)W.bindTexture(W.TEXTURE_2D,oe.colorAttachment.get()),bt.bindFramebuffer.set(oe.framebuffer);else{const ve=W.createTexture();W.bindTexture(W.TEXTURE_2D,ve),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,W.LINEAR),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,W.LINEAR),oe=B.heatmapFbo=bt.createFramebuffer(T.width/4,T.height/4,!1,!1),function(ue,we,Te,ze){var $e,ht;const At=ue.gl,Gt=($e=ue.HALF_FLOAT)!==null&&$e!==void 0?$e:At.UNSIGNED_BYTE,$t=(ht=ue.RGBA16F)!==null&&ht!==void 0?ht:At.RGBA;At.texImage2D(At.TEXTURE_2D,0,$t,we.width/4,we.height/4,0,At.RGBA,Gt,null),ze.colorAttachment.set(Te)}(bt,T,ve,oe)}})(ye,j,te),ye.clear({color:s.Color.transparent});for(let bt=0;bt{const ue=s.create();s.ortho(ue,0,B.width,B.height,0,0,1);const we=B.context.gl;return{u_matrix:ue,u_world:[we.drawingBufferWidth,we.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:W.paint.get("heatmap-opacity")}})(ye,Se),null,Se.id,ye.viewportBuffer,ye.quadTriangleIndexBuffer,ye.viewportSegments,Se.paint,ye.transform.zoom)}(j,te))})(p,k,L,z);break;case"line":(function(j,Y,te,se){if(j.renderPass!=="translucent")return;const ye=te.paint.get("line-opacity"),Se=te.paint.get("line-width");if(ye.constantOr(1)===0||Se.constantOr(1)===0)return;const Le=j.depthModeForSublayer(0,di.ReadOnly),Ke=j.colorModeForRenderPass(),bt=te.paint.get("line-dasharray"),T=te.paint.get("line-pattern"),B=T.constantOr(1),W=te.paint.get("line-gradient"),oe=te.getCrossfadeParameters(),ve=B?"linePattern":bt?"lineSDF":W?"lineGradient":"line",ue=j.context,we=ue.gl;let Te=!0;for(const ze of se){const $e=Y.getTile(ze);if(B&&!$e.patternsLoaded())continue;const ht=$e.getBucket(te);if(!ht)continue;const At=ht.programConfigurations.get(te.id),Gt=j.context.program.get(),$t=j.useProgram(ve,At),Pr=Te||$t.program!==Gt,rr=j.style.map.terrain&&j.style.map.terrain.getTerrainData(ze),Dt=T.constantOr(null);if(Dt&&$e.imageAtlas){const Or=$e.imageAtlas,Mr=Or.patternPositions[Dt.to.toString()],Zr=Or.patternPositions[Dt.from.toString()];Mr&&Zr&&At.setConstantPatternPositions(Mr,Zr)}const Et=rr?ze:null,Lr=B?O(j,$e,te,oe,Et):bt?X(j,$e,te,bt,oe,Et):W?Aa(j,$e,te,ht.lineClipsArray.length,Et):Rs(j,$e,te,Et);if(B)ue.activeTexture.set(we.TEXTURE0),$e.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),At.updatePaintBuffers(oe);else if(bt&&(Pr||j.lineAtlas.dirty))ue.activeTexture.set(we.TEXTURE0),j.lineAtlas.bind(ue);else if(W){const Or=ht.gradients[te.id];let Mr=Or.texture;if(te.gradientVersion!==Or.version){let Zr=256;if(te.stepInterpolant){const ii=Y.getSource().maxzoom,qi=ze.canonical.z===ii?Math.ceil(1<0?k.pop():null}isPatternMissing(p){if(!p)return!1;if(!p.from||!p.to)return!0;const k=this.imageManager.getPattern(p.from.toString()),L=this.imageManager.getPattern(p.to.toString());return!k||!L}useProgram(p,k){this.cache=this.cache||{};const L=p+(k?k.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[L]||(this.cache[L]=new Ka(this.context,pa[p],k,kr[p],this._showOverdrawInspector,this.style.map.terrain)),this.cache[L]}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 p=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(p.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Fe(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:p,drawingBufferHeight:k}=this.context.gl;return this.width!==p||this.height!==k}}class Vl{constructor(p,k){this.points=p,this.planes=k}static fromInvProjectionMatrix(p,k,L){const z=Math.pow(2,L),j=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(te=>{const se=1/(te=s.transformMat4([],te,p))[3]/k*z;return s.mul$1(te,te,[se,se,1/te[3],se])}),Y=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(te=>{const se=function(Ke,bt){var T=bt[0],B=bt[1],W=bt[2],oe=T*T+B*B+W*W;return oe>0&&(oe=1/Math.sqrt(oe)),Ke[0]=bt[0]*oe,Ke[1]=bt[1]*oe,Ke[2]=bt[2]*oe,Ke}([],function(Ke,bt,T){var B=bt[0],W=bt[1],oe=bt[2],ve=T[0],ue=T[1],we=T[2];return Ke[0]=W*we-oe*ue,Ke[1]=oe*ve-B*we,Ke[2]=B*ue-W*ve,Ke}([],ae([],j[te[0]],j[te[1]]),ae([],j[te[2]],j[te[1]]))),ye=-((Se=se)[0]*(Le=j[te[1]])[0]+Se[1]*Le[1]+Se[2]*Le[2]);var Se,Le;return se.concat(ye)});return new Vl(j,Y)}}class ss{constructor(p,k){this.min=p,this.max=k,this.center=function(L,z,j){return L[0]=.5*z[0],L[1]=.5*z[1],L[2]=.5*z[2],L}([],function(L,z,j){return L[0]=z[0]+j[0],L[1]=z[1]+j[1],L[2]=z[2]+j[2],L}([],this.min,this.max))}quadrant(p){const k=[p%2==0,p<2],L=Q(this.min),z=Q(this.max);for(let j=0;j=0&&Y++;if(Y===0)return 0;Y!==k.length&&(L=!1)}if(L)return 2;for(let z=0;z<3;z++){let j=Number.MAX_VALUE,Y=-Number.MAX_VALUE;for(let te=0;tethis.max[z]-this.min[z])return 0}return 1}}class Wu{constructor(p=0,k=0,L=0,z=0){if(isNaN(p)||p<0||isNaN(k)||k<0||isNaN(L)||L<0||isNaN(z)||z<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=p,this.bottom=k,this.left=L,this.right=z}interpolate(p,k,L){return k.top!=null&&p.top!=null&&(this.top=s.interpolate.number(p.top,k.top,L)),k.bottom!=null&&p.bottom!=null&&(this.bottom=s.interpolate.number(p.bottom,k.bottom,L)),k.left!=null&&p.left!=null&&(this.left=s.interpolate.number(p.left,k.left,L)),k.right!=null&&p.right!=null&&(this.right=s.interpolate.number(p.right,k.right,L)),this}getCenter(p,k){const L=s.clamp((this.left+p-this.right)/2,0,p),z=s.clamp((this.top+k-this.bottom)/2,0,k);return new s.Point(L,z)}equals(p){return this.top===p.top&&this.bottom===p.bottom&&this.left===p.left&&this.right===p.right}clone(){return new Wu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class Hs{constructor(p,k,L,z,j){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=j===void 0||!!j,this._minZoom=p||0,this._maxZoom=k||22,this._minPitch=L??0,this._maxPitch=z??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new s.LngLat(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Wu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._minEleveationForCurrentTile=0}clone(){const p=new Hs(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return p.apply(this),p}apply(p){this.tileSize=p.tileSize,this.latRange=p.latRange,this.width=p.width,this.height=p.height,this._center=p._center,this._elevation=p._elevation,this._minEleveationForCurrentTile=p._minEleveationForCurrentTile,this.zoom=p.zoom,this.angle=p.angle,this._fov=p._fov,this._pitch=p._pitch,this._unmodified=p._unmodified,this._edgeInsets=p._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(p){this._minZoom!==p&&(this._minZoom=p,this.zoom=Math.max(this.zoom,p))}get maxZoom(){return this._maxZoom}set maxZoom(p){this._maxZoom!==p&&(this._maxZoom=p,this.zoom=Math.min(this.zoom,p))}get minPitch(){return this._minPitch}set minPitch(p){this._minPitch!==p&&(this._minPitch=p,this.pitch=Math.max(this.pitch,p))}get maxPitch(){return this._maxPitch}set maxPitch(p){this._maxPitch!==p&&(this._maxPitch=p,this.pitch=Math.min(this.pitch,p))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(p){p===void 0?p=!0:p===null&&(p=!1),this._renderWorldCopies=p}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new s.Point(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(p){const k=-s.wrap(p,-180,180)*Math.PI/180;this.angle!==k&&(this._unmodified=!1,this.angle=k,this._calcMatrices(),this.rotationMatrix=function(){var L=new s.ARRAY_TYPE(4);return s.ARRAY_TYPE!=Float32Array&&(L[1]=0,L[2]=0),L[0]=1,L[3]=1,L}(),function(L,z,j){var Y=z[0],te=z[1],se=z[2],ye=z[3],Se=Math.sin(j),Le=Math.cos(j);L[0]=Y*Le+se*Se,L[1]=te*Le+ye*Se,L[2]=Y*-Se+se*Le,L[3]=te*-Se+ye*Le}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(p){const k=s.clamp(p,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==k&&(this._unmodified=!1,this._pitch=k,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(p){p=Math.max(.01,Math.min(60,p)),this._fov!==p&&(this._unmodified=!1,this._fov=p/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(p){const k=Math.min(Math.max(p,this.minZoom),this.maxZoom);this._zoom!==k&&(this._unmodified=!1,this._zoom=k,this.tileZoom=Math.max(0,Math.floor(k)),this.scale=this.zoomScale(k),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(p){p.lat===this._center.lat&&p.lng===this._center.lng||(this._unmodified=!1,this._center=p,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(p){p!==this._elevation&&(this._elevation=p,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(p){this._edgeInsets.equals(p)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,p,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(p){return this._edgeInsets.equals(p)}interpolatePadding(p,k,L){this._unmodified=!1,this._edgeInsets.interpolate(p,k,L),this._constrain(),this._calcMatrices()}coveringZoomLevel(p){const k=(p.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/p.tileSize));return Math.max(0,k)}getVisibleUnwrappedCoordinates(p){const k=[new s.UnwrappedTileID(0,p)];if(this._renderWorldCopies){const L=this.pointCoordinate(new s.Point(0,0)),z=this.pointCoordinate(new s.Point(this.width,0)),j=this.pointCoordinate(new s.Point(this.width,this.height)),Y=this.pointCoordinate(new s.Point(0,this.height)),te=Math.floor(Math.min(L.x,z.x,j.x,Y.x)),se=Math.floor(Math.max(L.x,z.x,j.x,Y.x)),ye=1;for(let Se=te-ye;Se<=se+ye;Se++)Se!==0&&k.push(new s.UnwrappedTileID(Se,p))}return k}coveringTiles(p){var k,L;let z=this.coveringZoomLevel(p);const j=z;if(p.minzoom!==void 0&&zp.maxzoom&&(z=p.maxzoom);const Y=this.pointCoordinate(this.getCameraPoint()),te=s.MercatorCoordinate.fromLngLat(this.center),se=Math.pow(2,z),ye=[se*Y.x,se*Y.y,0],Se=[se*te.x,se*te.y,0],Le=Vl.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,z);let Ke=p.minzoom||0;!p.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Ke=z);const bt=p.terrain?2/Math.min(this.tileSize,p.tileSize)*this.tileSize:3,T=ue=>({aabb:new ss([ue*se,0,0],[(ue+1)*se,se,0]),zoom:0,x:0,y:0,wrap:ue,fullyVisible:!1}),B=[],W=[],oe=z,ve=p.reparseOverscaled?j:z;if(this._renderWorldCopies)for(let ue=1;ue<=3;ue++)B.push(T(-ue)),B.push(T(ue));for(B.push(T(0));B.length>0;){const ue=B.pop(),we=ue.x,Te=ue.y;let ze=ue.fullyVisible;if(!ze){const $t=ue.aabb.intersects(Le);if($t===0)continue;ze=$t===2}const $e=p.terrain?ye:Se,ht=ue.aabb.distanceX($e),At=ue.aabb.distanceY($e),Gt=Math.max(Math.abs(ht),Math.abs(At));if(ue.zoom===oe||Gt>bt+(1<=Ke){const $t=oe-ue.zoom,Pr=ye[0]-.5-(we<<$t),rr=ye[1]-.5-(Te<<$t);W.push({tileID:new s.OverscaledTileID(ue.zoom===oe?ve:ue.zoom,ue.wrap,ue.zoom,we,Te),distanceSq:ge([Se[0]-.5-we,Se[1]-.5-Te]),tileDistanceToCamera:Math.sqrt(Pr*Pr+rr*rr)})}else for(let $t=0;$t<4;$t++){const Pr=(we<<1)+$t%2,rr=(Te<<1)+($t>>1),Dt=ue.zoom+1;let Et=ue.aabb.quadrant($t);if(p.terrain){const Lr=new s.OverscaledTileID(Dt,ue.wrap,Dt,Pr,rr),Or=p.terrain.getMinMaxElevation(Lr),Mr=(k=Or.minElevation)!==null&&k!==void 0?k:this.elevation,Zr=(L=Or.maxElevation)!==null&&L!==void 0?L:this.elevation;Et=new ss([Et.min[0],Et.min[1],Mr],[Et.max[0],Et.max[1],Zr])}B.push({aabb:Et,zoom:Dt,x:Pr,y:rr,wrap:ue.wrap,fullyVisible:ze})}}return W.sort((ue,we)=>ue.distanceSq-we.distanceSq).map(ue=>ue.tileID)}resize(p,k){this.width=p,this.height=k,this.pixelsToGLUnits=[2/p,-2/k],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(p){return Math.pow(2,p)}scaleZoom(p){return Math.log(p)/Math.LN2}project(p){const k=s.clamp(p.lat,-this.maxValidLatitude,this.maxValidLatitude);return new s.Point(s.mercatorXfromLng(p.lng)*this.worldSize,s.mercatorYfromLat(k)*this.worldSize)}unproject(p){return new s.MercatorCoordinate(p.x/this.worldSize,p.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(p){const k=this.pointLocation(this.centerPoint,p),L=p.getElevationForLngLatZoom(k,this.tileZoom);if(!(this.elevation-L))return;const z=this.getCameraPosition(),j=s.MercatorCoordinate.fromLngLat(z.lngLat,z.altitude),Y=s.MercatorCoordinate.fromLngLat(k,L),te=j.x-Y.x,se=j.y-Y.y,ye=j.z-Y.z,Se=Math.sqrt(te*te+se*se+ye*ye),Le=this.scaleZoom(this.cameraToCenterDistance/Se/this.tileSize);this._elevation=L,this._center=k,this.zoom=Le}setLocationAtPoint(p,k){const L=this.pointCoordinate(k),z=this.pointCoordinate(this.centerPoint),j=this.locationCoordinate(p),Y=new s.MercatorCoordinate(j.x-(L.x-z.x),j.y-(L.y-z.y));this.center=this.coordinateLocation(Y),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(p,k){return k?this.coordinatePoint(this.locationCoordinate(p),k.getElevationForLngLatZoom(p,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(p))}pointLocation(p,k){return this.coordinateLocation(this.pointCoordinate(p,k))}locationCoordinate(p){return s.MercatorCoordinate.fromLngLat(p)}coordinateLocation(p){return p&&p.toLngLat()}pointCoordinate(p,k){if(k){const Ke=k.pointCoordinate(p);if(Ke!=null)return Ke}const L=[p.x,p.y,0,1],z=[p.x,p.y,1,1];s.transformMat4(L,L,this.pixelMatrixInverse),s.transformMat4(z,z,this.pixelMatrixInverse);const j=L[3],Y=z[3],te=L[1]/j,se=z[1]/Y,ye=L[2]/j,Se=z[2]/Y,Le=ye===Se?0:(0-ye)/(Se-ye);return new s.MercatorCoordinate(s.interpolate.number(L[0]/j,z[0]/Y,Le)/this.worldSize,s.interpolate.number(te,se,Le)/this.worldSize)}coordinatePoint(p,k=0,L=this.pixelMatrix){const z=[p.x*this.worldSize,p.y*this.worldSize,k,1];return s.transformMat4(z,z,L),new s.Point(z[0]/z[3],z[1]/z[3])}getBounds(){const p=Math.max(0,this.height/2-this.getHorizon());return new ke().extend(this.pointLocation(new s.Point(0,p))).extend(this.pointLocation(new s.Point(this.width,p))).extend(this.pointLocation(new s.Point(this.width,this.height))).extend(this.pointLocation(new s.Point(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ke([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(p){p?(this.lngRange=[p.getWest(),p.getEast()],this.latRange=[p.getSouth(),p.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(p,k=!1){const L=p.key,z=k?this._alignedPosMatrixCache:this._posMatrixCache;if(z[L])return z[L];const j=p.canonical,Y=this.worldSize/this.zoomScale(j.z),te=j.x+Math.pow(2,j.z)*p.wrap,se=s.identity(new Float64Array(16));return s.translate(se,se,[te*Y,j.y*Y,0]),s.scale(se,se,[Y/s.EXTENT,Y/s.EXTENT,1]),s.multiply(se,k?this.alignedProjMatrix:this.projMatrix,se),z[L]=new Float32Array(se),z[L]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let p,k,L,z,j=-90,Y=90,te=-180,se=180;const ye=this.size,Se=this._unmodified;if(this.latRange){const bt=this.latRange;j=s.mercatorYfromLat(bt[1])*this.worldSize,Y=s.mercatorYfromLat(bt[0])*this.worldSize,p=Y-jY&&(z=Y-T)}if(this.lngRange){const bt=(te+se)/2,T=s.wrap(Le.x,bt-this.worldSize/2,bt+this.worldSize/2),B=ye.x/2;T-Bse&&(L=se-B)}L===void 0&&z===void 0||(this.center=this.unproject(new s.Point(L!==void 0?L:Le.x,z!==void 0?z:Le.y)).wrap()),this._unmodified=Se,this._constraining=!1}_calcMatrices(){if(!this.height)return;const p=this.centerOffset,k=this.point.x,L=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=s.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let z=s.identity(new Float64Array(16));s.scale(z,z,[this.width/2,-this.height/2,1]),s.translate(z,z,[1,-1,0]),this.labelPlaneMatrix=z,z=s.identity(new Float64Array(16)),s.scale(z,z,[1,-1,1]),s.translate(z,z,[-1,-1,0]),s.scale(z,z,[2/this.width,2/this.height,1]),this.glCoordMatrix=z;const j=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Y=Math.min(this.elevation,this._minEleveationForCurrentTile),te=j-Y*this._pixelPerMeter/Math.cos(this._pitch),se=Y<0?te:j,ye=Math.PI/2+this._pitch,Se=this._fov*(.5+p.y/this.height),Le=Math.sin(Se)*se/Math.sin(s.clamp(Math.PI-ye-Se,.01,Math.PI-.01)),Ke=this.getHorizon(),bt=2*Math.atan(Ke/this.cameraToCenterDistance)*(.5+p.y/(2*Ke)),T=Math.sin(bt)*se/Math.sin(s.clamp(Math.PI-ye-bt,.01,Math.PI-.01)),B=Math.min(Le,T),W=1.01*(Math.cos(Math.PI/2-this._pitch)*B+se),oe=this.height/50;z=new Float64Array(16),s.perspective(z,this._fov,this.width/this.height,oe,W),z[8]=2*-p.x/this.width,z[9]=2*p.y/this.height,s.scale(z,z,[1,-1,1]),s.translate(z,z,[0,0,-this.cameraToCenterDistance]),s.rotateX(z,z,this._pitch),s.rotateZ(z,z,this.angle),s.translate(z,z,[-k,-L,0]),this.mercatorMatrix=s.scale([],z,[this.worldSize,this.worldSize,this.worldSize]),s.scale(z,z,[1,1,this._pixelPerMeter]),this.pixelMatrix=s.multiply(new Float64Array(16),this.labelPlaneMatrix,z),s.translate(z,z,[0,0,-this.elevation]),this.projMatrix=z,this.invProjMatrix=s.invert([],z),this.pixelMatrix3D=s.multiply(new Float64Array(16),this.labelPlaneMatrix,z);const ve=this.width%2/2,ue=this.height%2/2,we=Math.cos(this.angle),Te=Math.sin(this.angle),ze=k-Math.round(k)+we*ve+Te*ue,$e=L-Math.round(L)+we*ue+Te*ve,ht=new Float64Array(z);if(s.translate(ht,ht,[ze>.5?ze-1:ze,$e>.5?$e-1:$e,0]),this.alignedProjMatrix=ht,z=s.invert(new Float64Array(16),this.pixelMatrix),!z)throw new Error("failed to invert matrix");this.pixelMatrixInverse=z,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const p=this.pointCoordinate(new s.Point(0,0)),k=[p.x*this.worldSize,p.y*this.worldSize,0,1];return s.transformMat4(k,k,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const p=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.Point(0,p))}getCameraQueryGeometry(p){const k=this.getCameraPoint();if(p.length===1)return[p[0],k];{let L=k.x,z=k.y,j=k.x,Y=k.y;for(const te of p)L=Math.min(L,te.x),z=Math.min(z,te.y),j=Math.max(j,te.x),Y=Math.max(Y,te.y);return[new s.Point(L,z),new s.Point(j,z),new s.Point(j,Y),new s.Point(L,Y),new s.Point(L,z)]}}}class ls{constructor(p){this._getCurrentHash=()=>{const k=window.location.hash.replace("#","");if(this._hashName){let L;return k.split("&").map(z=>z.split("=")).forEach(z=>{z[0]===this._hashName&&(L=z)}),(L&&L[1]||"").split("/")}return k.split("/")},this._onHashChange=()=>{const k=this._getCurrentHash();if(k.length>=3&&!k.some(L=>isNaN(L))){const L=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(k[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+k[2],+k[1]],zoom:+k[0],bearing:L,pitch:+(k[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const k=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,k)}catch{}},this._updateHash=function(k,L){let z=!1,j=null;const Y=()=>{j=null,z&&(k(),j=setTimeout(Y,300),z=!1)};return()=>(z=!0,j||Y(),j)}(this._updateHashUnthrottled),this._hashName=p&&encodeURIComponent(p)}addTo(p){return this._map=p,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()),delete this._map,this}getHashString(p){const k=this._map.getCenter(),L=Math.round(100*this._map.getZoom())/100,z=Math.ceil((L*Math.LN2+Math.log(512/360/.5))/Math.LN10),j=Math.pow(10,z),Y=Math.round(k.lng*j)/j,te=Math.round(k.lat*j)/j,se=this._map.getBearing(),ye=this._map.getPitch();let Se="";if(Se+=p?`/${Y}/${te}/${L}`:`${L}/${te}/${Y}`,(se||ye)&&(Se+="/"+Math.round(10*se)/10),ye&&(Se+=`/${Math.round(ye)}`),this._hashName){const Le=this._hashName;let Ke=!1;const bt=window.location.hash.slice(1).split("&").map(T=>{const B=T.split("=")[0];return B===Le?(Ke=!0,`${B}=${Se}`):T}).filter(T=>T);return Ke||bt.push(`${Le}=${Se}`),`#${bt.join("&")}`}return`#${Se}`}}const Ha={linearity:.3,easing:s.bezier(0,0,.3,1)},wl=s.extend({deceleration:2500,maxSpeed:1400},Ha),us=s.extend({deceleration:20,maxSpeed:1400},Ha),Ma=s.extend({deceleration:1e3,maxSpeed:360},Ha),xl=s.extend({deceleration:1e3,maxSpeed:90},Ha);class ua{constructor(p){this._map=p,this.clear()}clear(){this._inertiaBuffer=[]}record(p){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.browser.now(),settings:p})}_drainInertiaBuffer(){const p=this._inertiaBuffer,k=s.browser.now();for(;p.length>0&&k-p[0].time>160;)p.shift()}_onMoveEnd(p){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const k={zoom:0,bearing:0,pitch:0,pan:new s.Point(0,0),pinchAround:void 0,around:void 0};for(const{settings:j}of this._inertiaBuffer)k.zoom+=j.zoomDelta||0,k.bearing+=j.bearingDelta||0,k.pitch+=j.pitchDelta||0,j.panDelta&&k.pan._add(j.panDelta),j.around&&(k.around=j.around),j.pinchAround&&(k.pinchAround=j.pinchAround);const L=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,z={};if(k.pan.mag()){const j=$s(k.pan.mag(),L,s.extend({},wl,p||{}));z.offset=k.pan.mult(j.amount/k.pan.mag()),z.center=this._map.transform.center,Ca(z,j)}if(k.zoom){const j=$s(k.zoom,L,us);z.zoom=this._map.transform.zoom+j.amount,Ca(z,j)}if(k.bearing){const j=$s(k.bearing,L,Ma);z.bearing=this._map.transform.bearing+s.clamp(j.amount,-179,179),Ca(z,j)}if(k.pitch){const j=$s(k.pitch,L,xl);z.pitch=this._map.transform.pitch+j.amount,Ca(z,j)}if(z.zoom||z.bearing){const j=k.pinchAround===void 0?k.around:k.pinchAround;z.around=j?this._map.unproject(j):this._map.getCenter()}return this.clear(),s.extend(z,{noMoveStart:!0})}}function Ca(R,p){(!R.duration||R.durationk.unproject(se)),te=j.reduce((se,ye,Se,Le)=>se.add(ye.div(Le.length)),new s.Point(0,0));super(p,{points:j,point:te,lngLats:Y,lngLat:k.unproject(te),originalEvent:L}),this._defaultPrevented=!1}}class kl extends s.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(p,k,L){super(p,{originalEvent:L}),this._defaultPrevented=!1}}class Hl{constructor(p,k){this._map=p,this._clickTolerance=k.clickTolerance}reset(){delete this._mousedownPos}wheel(p){return this._firePreventable(new kl(p.type,this._map,p))}mousedown(p,k){return this._mousedownPos=k,this._firePreventable(new bo(p.type,this._map,p))}mouseup(p){this._map.fire(new bo(p.type,this._map,p))}click(p,k){this._mousedownPos&&this._mousedownPos.dist(k)>=this._clickTolerance||this._map.fire(new bo(p.type,this._map,p))}dblclick(p){return this._firePreventable(new bo(p.type,this._map,p))}mouseover(p){this._map.fire(new bo(p.type,this._map,p))}mouseout(p){this._map.fire(new bo(p.type,this._map,p))}touchstart(p){return this._firePreventable(new Yn(p.type,this._map,p))}touchmove(p){this._map.fire(new Yn(p.type,this._map,p))}touchend(p){this._map.fire(new Yn(p.type,this._map,p))}touchcancel(p){this._map.fire(new Yn(p.type,this._map,p))}_firePreventable(p){if(this._map.fire(p),p.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class $l{constructor(p){this._map=p}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(p){this._map.fire(new bo(p.type,this._map,p))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new bo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(p){this._delayContextMenu?this._contextMenuEvent=p:this._ignoreContextMenu||this._map.fire(new bo(p.type,this._map,p)),this._map.listens("contextmenu")&&p.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class xs{constructor(p){this._map=p}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(p){return this.transform.pointLocation(s.Point.convert(p),this._map.terrain)}}class fa{constructor(p,k){this._map=p,this._tr=new xs(p),this._el=p.getCanvasContainer(),this._container=p.getContainer(),this._clickTolerance=k.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(p,k){this.isEnabled()&&p.shiftKey&&p.button===0&&(y.disableDrag(),this._startPos=this._lastPos=k,this._active=!0)}mousemoveWindow(p,k){if(!this._active)return;const L=k;if(this._lastPos.equals(L)||!this._box&&L.dist(this._startPos)j.fitScreenCoordinates(L,z,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",p)}keydown(p){this._active&&p.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",p))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(y.remove(this._box),this._box=null),y.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(p,k){return this._map.fire(new s.Event(p,{originalEvent:k}))}}function Qa(R,p){if(R.length!==p.length)throw new Error(`The number of touches and points are not equal - touches ${R.length}, points ${p.length}`);const k={};for(let L=0;Lthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=p.timeStamp),L.length===this.numTouches&&(this.centroid=function(z){const j=new s.Point(0,0);for(const Y of z)j._add(Y);return j.div(z.length)}(k),this.touches=Qa(L,k)))}touchmove(p,k,L){if(this.aborted||!this.centroid)return;const z=Qa(L,k);for(const j in this.touches){const Y=z[j];(!Y||Y.dist(this.touches[j])>30)&&(this.aborted=!0)}}touchend(p,k,L){if((!this.centroid||p.timeStamp-this.startTime>500)&&(this.aborted=!0),L.length===0){const z=!this.aborted&&this.centroid;if(this.reset(),z)return z}}}class cs{constructor(p){this.singleTap=new vi(p),this.numTaps=p.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(p,k,L){this.singleTap.touchstart(p,k,L)}touchmove(p,k,L){this.singleTap.touchmove(p,k,L)}touchend(p,k,L){const z=this.singleTap.touchend(p,k,L);if(z){const j=p.timeStamp-this.lastTime<500,Y=!this.lastTap||this.lastTap.dist(z)<30;if(j&&Y||this.reset(),this.count++,this.lastTime=p.timeStamp,this.lastTap=z,this.count===this.numTaps)return this.reset(),z}}}class wo{constructor(p){this._tr=new xs(p),this._zoomIn=new cs({numTouches:1,numTaps:2}),this._zoomOut=new cs({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(p,k,L){this._zoomIn.touchstart(p,k,L),this._zoomOut.touchstart(p,k,L)}touchmove(p,k,L){this._zoomIn.touchmove(p,k,L),this._zoomOut.touchmove(p,k,L)}touchend(p,k,L){const z=this._zoomIn.touchend(p,k,L),j=this._zoomOut.touchend(p,k,L),Y=this._tr;return z?(this._active=!0,p.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:te=>te.easeTo({duration:300,zoom:Y.zoom+1,around:Y.unproject(z)},{originalEvent:p})}):j?(this._active=!0,p.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:te=>te.easeTo({duration:300,zoom:Y.zoom-1,around:Y.unproject(j)},{originalEvent:p})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Rn{constructor(p){this._enabled=!!p.enable,this._moveStateManager=p.moveStateManager,this._clickTolerance=p.clickTolerance||1,this._moveFunction=p.move,this._activateOnStart=!!p.activateOnStart,p.assignEvents(this),this.reset()}reset(p){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(p)}_move(...p){const k=this._moveFunction(...p);if(k.bearingDelta||k.pitchDelta||k.around||k.panDelta)return this._active=!0,k}dragStart(p,k){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(p)&&(this._moveStateManager.startMove(p),this._lastPoint=k.length?k[0]:k,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(p,k){if(!this.isEnabled())return;const L=this._lastPoint;if(!L)return;if(p.preventDefault(),!this._moveStateManager.isValidMoveEvent(p))return void this.reset(p);const z=k.length?k[0]:k;return!this._moved&&z.dist(L){R.mousedown=R.dragStart,R.mousemoveWindow=R.dragMove,R.mouseup=R.dragEnd,R.contextmenu=function(p){p.preventDefault()}},bu=({enable:R,clickTolerance:p,bearingDegreesPerPixelMoved:k=.8})=>{const L=new ri({checkCorrectEvent:z=>y.mouseButton(z)===0&&z.ctrlKey||y.mouseButton(z)===2});return new Rn({clickTolerance:p,move:(z,j)=>({bearingDelta:(j.x-z.x)*k}),moveStateManager:L,enable:R,assignEvents:ks})},wu=({enable:R,clickTolerance:p,pitchDegreesPerPixelMoved:k=-.5})=>{const L=new ri({checkCorrectEvent:z=>y.mouseButton(z)===0&&z.ctrlKey||y.mouseButton(z)===2});return new Rn({clickTolerance:p,move:(z,j)=>({pitchDelta:(j.y-z.y)*k}),moveStateManager:L,enable:R,assignEvents:ks})};class d0{constructor(p,k){this._minTouches=p.cooperativeGestures?2:1,this._clickTolerance=p.clickTolerance||1,this._map=k,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new s.Point(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(p,k,L){return this._calculateTransform(p,k,L)}touchmove(p,k,L){if(this._map._cooperativeGestures&&(this._minTouches===2&&L.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(p,!1,L.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(L.length0&&(this._active=!0);const z=Qa(L,k),j=new s.Point(0,0),Y=new s.Point(0,0);let te=0;for(const ye in z){const Se=z[ye],Le=this._touches[ye];Le&&(j._add(Se),Y._add(Se.sub(Le)),te++,z[ye]=Se)}if(this._touches=z,teMath.abs(R.x)}class Fo extends kc{constructor(p){super(),this._map=p}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(p,k,L){super.touchstart(p,k,L),this._currentTouchCount=L.length}_start(p){this._lastPoints=p,Oo(p[0].sub(p[1]))&&(this._valid=!1)}_move(p,k,L){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const z=p[0].sub(this._lastPoints[0]),j=p[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(z,j,L.timeStamp),this._valid?(this._lastPoints=p,this._active=!0,{pitchDelta:(z.y+j.y)/2*-.5}):void 0}gestureBeginsVertically(p,k,L){if(this._valid!==void 0)return this._valid;const z=p.mag()>=2,j=k.mag()>=2;if(!z&&!j)return;if(!z||!j)return this._firstMove===void 0&&(this._firstMove=L),L-this._firstMove<100&&void 0;const Y=p.y>0==k.y>0;return Oo(p)&&Oo(k)&&Y}}const ma={panStep:100,bearingStep:15,pitchStep:10};class Cc{constructor(p){this._tr=new xs(p);const k=ma;this._panStep=k.panStep,this._bearingStep=k.bearingStep,this._pitchStep=k.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(p){if(p.altKey||p.ctrlKey||p.metaKey)return;let k=0,L=0,z=0,j=0,Y=0;switch(p.keyCode){case 61:case 107:case 171:case 187:k=1;break;case 189:case 109:case 173:k=-1;break;case 37:p.shiftKey?L=-1:(p.preventDefault(),j=-1);break;case 39:p.shiftKey?L=1:(p.preventDefault(),j=1);break;case 38:p.shiftKey?z=1:(p.preventDefault(),Y=-1);break;case 40:p.shiftKey?z=-1:(p.preventDefault(),Y=1);break;default:return}return this._rotationDisabled&&(L=0,z=0),{cameraAnimation:te=>{const se=this._tr;te.easeTo({duration:300,easeId:"keyboardHandler",easing:Zu,zoom:k?Math.round(se.zoom)+k*(p.shiftKey?2:1):se.zoom,bearing:se.bearing+L*this._bearingStep,pitch:se.pitch+z*this._pitchStep,offset:[-j*this._panStep,-Y*this._panStep],center:se.center},{originalEvent:p})}}}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 Zu(R){return R*(2-R)}const Xu=4.000244140625;class Gl{constructor(p,k){this._onTimeout=L=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(L)},this._map=p,this._tr=new xs(p),this._el=p.getCanvasContainer(),this._triggerRenderFrame=k,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(p){this._defaultZoomRate=p}setWheelZoomRate(p){this._wheelZoomRate=p}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(p){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!p&&p.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(p){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!p[this._map._metaKey])return;p.preventDefault()}let k=p.deltaMode===WheelEvent.DOM_DELTA_LINE?40*p.deltaY:p.deltaY;const L=s.browser.now(),z=L-(this._lastWheelEventTime||0);this._lastWheelEventTime=L,k!==0&&k%Xu==0?this._type="wheel":k!==0&&Math.abs(k)<4?this._type="trackpad":z>400?(this._type=null,this._lastValue=k,this._timeout=setTimeout(this._onTimeout,40,p)):this._type||(this._type=Math.abs(z*k)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,k+=this._lastValue)),p.shiftKey&&k&&(k/=4),this._type&&(this._lastWheelEvent=p,this._delta-=k,this._active||this._start(p)),p.preventDefault()}_start(p){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 k=y.mousePos(this._el,p),L=this._tr;this._around=s.LngLat.convert(this._aroundCenter?L.center:L.unproject(k)),this._aroundPoint=L.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const p=this._tr.transform;if(this._delta!==0){const te=this._type==="wheel"&&Math.abs(this._delta)>Xu?this._wheelZoomRate:this._defaultZoomRate;let se=2/(1+Math.exp(-Math.abs(this._delta*te)));this._delta<0&&se!==0&&(se=1/se);const ye=typeof this._targetZoom=="number"?p.zoomScale(this._targetZoom):p.scale;this._targetZoom=Math.min(p.maxZoom,Math.max(p.minZoom,p.scaleZoom(ye*se))),this._type==="wheel"&&(this._startZoom=p.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const k=typeof this._targetZoom=="number"?this._targetZoom:p.zoom,L=this._startZoom,z=this._easing;let j,Y=!1;if(this._type==="wheel"&&L&&z){const te=Math.min((s.browser.now()-this._lastWheelEventTime)/200,1),se=z(te);j=s.interpolate.number(L,k,se),te<1?this._frameId||(this._frameId=!0):Y=!0}else j=k,Y=!0;return this._active=!0,Y&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Y,zoomDelta:j-p.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(p){let k=s.defaultEasing;if(this._prevEase){const L=this._prevEase,z=(s.browser.now()-L.start)/L.duration,j=L.easing(z+.01)-L.easing(z),Y=.27/Math.sqrt(j*j+1e-4)*.01,te=Math.sqrt(.0729-Y*Y);k=s.bezier(Y,te,.25,1)}return this._prevEase={start:s.browser.now(),duration:p,easing:k},k}reset(){this._active=!1}}class Ic{constructor(p,k){this._clickZoom=p,this._tapZoom=k}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 En{constructor(p){this._tr=new xs(p),this.reset()}reset(){this._active=!1}dblclick(p,k){return p.preventDefault(),{cameraAnimation:L=>{L.easeTo({duration:300,zoom:this._tr.zoom+(p.shiftKey?-1:1),around:this._tr.unproject(k)},{originalEvent:p})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Bo{constructor(){this._tap=new cs({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(p,k,L){if(!this._swipePoint)if(this._tapTime){const z=k[0],j=p.timeStamp-this._tapTime<500,Y=this._tapPoint.dist(z)<30;j&&Y?L.length>0&&(this._swipePoint=z,this._swipeTouch=L[0].identifier):this.reset()}else this._tap.touchstart(p,k,L)}touchmove(p,k,L){if(this._tapTime){if(this._swipePoint){if(L[0].identifier!==this._swipeTouch)return;const z=k[0],j=z.y-this._swipePoint.y;return this._swipePoint=z,p.preventDefault(),this._active=!0,{zoomDelta:j/128}}}else this._tap.touchmove(p,k,L)}touchend(p,k,L){if(this._tapTime)this._swipePoint&&L.length===0&&this.reset();else{const z=this._tap.touchend(p,k,L);z&&(this._tapTime=p.timeStamp,this._tapPoint=z)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Yu{constructor(p,k,L){this._el=p,this._mousePan=k,this._touchPan=L}enable(p){this._inertiaOptions=p||{},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 Gs{constructor(p,k,L){this._pitchWithRotate=p.pitchWithRotate,this._mouseRotate=k,this._mousePitch=L}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 Lc{constructor(p,k,L,z){this._el=p,this._touchZoom=k,this._touchRotate=L,this._tapDragZoom=z,this._rotationDisabled=!1,this._enabled=!0}enable(p){this._touchZoom.enable(p),this._rotationDisabled||this._touchRotate.enable(p),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()}}const xu=R=>R.zoom||R.drag||R.pitch||R.rotate;class ku extends s.Event{}function Ws(R){return R.panDelta&&R.panDelta.mag()||R.zoomDelta||R.bearingDelta||R.pitchDelta}class Zs{constructor(p,k){this.handleWindowEvent=z=>{this.handleEvent(z,`${z.type}Window`)},this.handleEvent=(z,j)=>{if(z.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const Y=z.type==="renderFrame"?void 0:z,te={needsRenderFrame:!1},se={},ye={},Se=z.touches,Le=Se?this._getMapTouches(Se):void 0,Ke=Le?y.touchPos(this._el,Le):y.mousePos(this._el,z);for(const{handlerName:B,handler:W,allowed:oe}of this._handlers){if(!W.isEnabled())continue;let ve;this._blockedByActive(ye,oe,B)?W.reset():W[j||z.type]&&(ve=W[j||z.type](z,Ke,Le),this.mergeHandlerResult(te,se,ve,B,Y),ve&&ve.needsRenderFrame&&this._triggerRenderFrame()),(ve||W.isActive())&&(ye[B]=W)}const bt={};for(const B in this._previousActiveHandlers)ye[B]||(bt[B]=Y);this._previousActiveHandlers=ye,(Object.keys(bt).length||Ws(te))&&(this._changes.push([te,se,bt]),this._triggerRenderFrame()),(Object.keys(ye).length||Ws(te))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:T}=te;T&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],T(this._map))},this._map=p,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ua(p),this._bearingSnap=k.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(k);const L=this._el;this._listeners=[[L,"touchstart",{passive:!0}],[L,"touchmove",{passive:!1}],[L,"touchend",void 0],[L,"touchcancel",void 0],[L,"mousedown",void 0],[L,"mousemove",void 0],[L,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[L,"mouseover",void 0],[L,"mouseout",void 0],[L,"dblclick",void 0],[L,"click",void 0],[L,"keydown",{capture:!1}],[L,"keyup",void 0],[L,"wheel",{passive:!1}],[L,"contextmenu",void 0],[window,"blur",void 0]];for(const[z,j,Y]of this._listeners)y.addEventListener(z,j,z===document?this.handleWindowEvent:this.handleEvent,Y)}destroy(){for(const[p,k,L]of this._listeners)y.removeEventListener(p,k,p===document?this.handleWindowEvent:this.handleEvent,L)}_addDefaultHandlers(p){const k=this._map,L=k.getCanvasContainer();this._add("mapEvent",new Hl(k,p));const z=k.boxZoom=new fa(k,p);this._add("boxZoom",z),p.interactive&&p.boxZoom&&z.enable();const j=new wo(k),Y=new En(k);k.doubleClickZoom=new Ic(Y,j),this._add("tapZoom",j),this._add("clickZoom",Y),p.interactive&&p.doubleClickZoom&&k.doubleClickZoom.enable();const te=new Bo;this._add("tapDragZoom",te);const se=k.touchPitch=new Fo(k);this._add("touchPitch",se),p.interactive&&p.touchPitch&&k.touchPitch.enable(p.touchPitch);const ye=bu(p),Se=wu(p);k.dragRotate=new Gs(p,ye,Se),this._add("mouseRotate",ye,["mousePitch"]),this._add("mousePitch",Se,["mouseRotate"]),p.interactive&&p.dragRotate&&k.dragRotate.enable();const Le=(({enable:oe,clickTolerance:ve})=>{const ue=new ri({checkCorrectEvent:we=>y.mouseButton(we)===0&&!we.ctrlKey});return new Rn({clickTolerance:ve,move:(we,Te)=>({around:Te,panDelta:Te.sub(we)}),activateOnStart:!0,moveStateManager:ue,enable:oe,assignEvents:ks})})(p),Ke=new d0(p,k);k.dragPan=new Yu(L,Le,Ke),this._add("mousePan",Le),this._add("touchPan",Ke,["touchZoom","touchRotate"]),p.interactive&&p.dragPan&&k.dragPan.enable(p.dragPan);const bt=new Ec,T=new wn;k.touchZoomRotate=new Lc(L,T,bt,te),this._add("touchRotate",bt,["touchPan","touchZoom"]),this._add("touchZoom",T,["touchPan","touchRotate"]),p.interactive&&p.touchZoomRotate&&k.touchZoomRotate.enable(p.touchZoomRotate);const B=k.scrollZoom=new Gl(k,()=>this._triggerRenderFrame());this._add("scrollZoom",B,["mousePan"]),p.interactive&&p.scrollZoom&&k.scrollZoom.enable(p.scrollZoom);const W=k.keyboard=new Cc(k);this._add("keyboard",W),p.interactive&&p.keyboard&&k.keyboard.enable(),this._add("blockableMapEvent",new $l(k))}_add(p,k,L){this._handlers.push({handlerName:p,handler:k,allowed:L}),this._handlersById[p]=k}stop(p){if(!this._updatingCamera){for(const{handler:k}of this._handlers)k.reset();this._inertia.clear(),this._fireEvents({},{},p),this._changes=[]}}isActive(){for(const{handler:p}of this._handlers)if(p.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!xu(this._eventsInProgress)||this.isZooming()}_blockedByActive(p,k,L){for(const z in p)if(z!==L&&(!k||k.indexOf(z)<0))return!0;return!1}_getMapTouches(p){const k=[];for(const L of p)this._el.contains(L.target)&&k.push(L);return k}mergeHandlerResult(p,k,L,z,j){if(!L)return;s.extend(p,L);const Y={handlerName:z,originalEvent:L.originalEvent||j};L.zoomDelta!==void 0&&(k.zoom=Y),L.panDelta!==void 0&&(k.drag=Y),L.pitchDelta!==void 0&&(k.pitch=Y),L.bearingDelta!==void 0&&(k.rotate=Y)}_applyChanges(){const p={},k={},L={};for(const[z,j,Y]of this._changes)z.panDelta&&(p.panDelta=(p.panDelta||new s.Point(0,0))._add(z.panDelta)),z.zoomDelta&&(p.zoomDelta=(p.zoomDelta||0)+z.zoomDelta),z.bearingDelta&&(p.bearingDelta=(p.bearingDelta||0)+z.bearingDelta),z.pitchDelta&&(p.pitchDelta=(p.pitchDelta||0)+z.pitchDelta),z.around!==void 0&&(p.around=z.around),z.pinchAround!==void 0&&(p.pinchAround=z.pinchAround),z.noInertia&&(p.noInertia=z.noInertia),s.extend(k,j),s.extend(L,Y);this._updateMapTransform(p,k,L),this._changes=[]}_updateMapTransform(p,k,L){const z=this._map,j=z._getTransformForUpdate(),Y=z.terrain;if(!(Ws(p)||Y&&this._terrainMovement))return this._fireEvents(k,L,!0);let{panDelta:te,zoomDelta:se,bearingDelta:ye,pitchDelta:Se,around:Le,pinchAround:Ke}=p;Ke!==void 0&&(Le=Ke),z._stop(!0),Le=Le||z.transform.centerPoint;const bt=j.pointLocation(te?Le.sub(te):Le);ye&&(j.bearing+=ye),Se&&(j.pitch+=Se),se&&(j.zoom+=se),Y?this._terrainMovement||!k.drag&&!k.zoom?k.drag&&this._terrainMovement?j.center=j.pointLocation(j.centerPoint.sub(te)):j.setLocationAtPoint(bt,Le):(this._terrainMovement=!0,this._map._elevationFreeze=!0,j.setLocationAtPoint(bt,Le),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,j.recalculateZoom(z.terrain)})):j.setLocationAtPoint(bt,Le),z._applyUpdatedTransform(j),this._map._update(),p.noInertia||this._inertia.record(p),this._fireEvents(k,L,!0)}_fireEvents(p,k,L){const z=xu(this._eventsInProgress),j=xu(p),Y={};for(const Se in p){const{originalEvent:Le}=p[Se];this._eventsInProgress[Se]||(Y[`${Se}start`]=Le),this._eventsInProgress[Se]=p[Se]}!z&&j&&this._fireEvent("movestart",j.originalEvent);for(const Se in Y)this._fireEvent(Se,Y[Se]);j&&this._fireEvent("move",j.originalEvent);for(const Se in p){const{originalEvent:Le}=p[Se];this._fireEvent(Se,Le)}const te={};let se;for(const Se in this._eventsInProgress){const{handlerName:Le,originalEvent:Ke}=this._eventsInProgress[Se];this._handlersById[Le].isActive()||(delete this._eventsInProgress[Se],se=k[Le]||Ke,te[`${Se}end`]=se)}for(const Se in te)this._fireEvent(Se,te[Se]);const ye=xu(this._eventsInProgress);if(L&&(z||j)&&!ye){this._updatingCamera=!0;const Se=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Le=Ke=>Ke!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new ku("renderFrame",{timeStamp:p})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Qc extends s.Evented{constructor(p,k){super(),this._renderFrameCallback=()=>{const L=Math.min((s.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(L)),L<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=p,this._bearingSnap=k.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new s.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(p,k){return this.jumpTo({center:p},k)}panBy(p,k,L){return p=s.Point.convert(p).mult(-1),this.panTo(this.transform.center,s.extend({offset:p},k),L)}panTo(p,k,L){return this.easeTo(s.extend({center:p},k),L)}getZoom(){return this.transform.zoom}setZoom(p,k){return this.jumpTo({zoom:p},k),this}zoomTo(p,k,L){return this.easeTo(s.extend({zoom:p},k),L)}zoomIn(p,k){return this.zoomTo(this.getZoom()+1,p,k),this}zoomOut(p,k){return this.zoomTo(this.getZoom()-1,p,k),this}getBearing(){return this.transform.bearing}setBearing(p,k){return this.jumpTo({bearing:p},k),this}getPadding(){return this.transform.padding}setPadding(p,k){return this.jumpTo({padding:p},k),this}rotateTo(p,k,L){return this.easeTo(s.extend({bearing:p},k),L)}resetNorth(p,k){return this.rotateTo(0,s.extend({duration:1e3},p),k),this}resetNorthPitch(p,k){return this.easeTo(s.extend({bearing:0,pitch:0,duration:1e3},p),k),this}snapToNorth(p,k){return Math.abs(this.getBearing()){if(this._zooming&&(L.zoom=s.interpolate.number(z,se,ze)),this._rotating&&(L.bearing=s.interpolate.number(j,ye,ze)),this._pitching&&(L.pitch=s.interpolate.number(Y,Se,ze)),this._padding&&(L.interpolatePadding(te,Le,ze),bt=L.centerPoint.add(Ke)),this.terrain&&!p.freezeElevation&&this._updateElevation(ze),ue)L.setLocationAtPoint(ue,we);else{const $e=L.zoomScale(L.zoom-z),ht=se>z?Math.min(2,ve):Math.max(.5,ve),At=Math.pow(ht,1-ze),Gt=L.unproject(W.add(oe.mult(ze*At)).mult($e));L.setLocationAtPoint(L.renderWorldCopies?Gt.wrap():Gt,bt)}this._applyUpdatedTransform(L),this._fireMoveEvents(k)},ze=>{this.terrain&&this._finalizeElevation(),this._afterEase(k,ze)},p),this}_prepareEase(p,k,L={}){this._moving=!0,k||L.moving||this.fire(new s.Event("movestart",p)),this._zooming&&!L.zooming&&this.fire(new s.Event("zoomstart",p)),this._rotating&&!L.rotating&&this.fire(new s.Event("rotatestart",p)),this._pitching&&!L.pitching&&this.fire(new s.Event("pitchstart",p))}_prepareElevation(p){this._elevationCenter=p,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(p,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(p){this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const k=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(p<1&&k!==this._elevationTarget){const L=this._elevationTarget-this._elevationStart;this._elevationStart+=p*(L-(k-(L*p+this._elevationStart))/(1-p)),this._elevationTarget=k}this.transform.elevation=s.interpolate.number(this._elevationStart,this._elevationTarget,p)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(p){if(!this.transformCameraUpdate)return;const k=p.clone(),{center:L,zoom:z,pitch:j,bearing:Y,elevation:te}=this.transformCameraUpdate(k);L&&(k.center=L),z!==void 0&&(k.zoom=z),j!==void 0&&(k.pitch=j),Y!==void 0&&(k.bearing=Y),te!==void 0&&(k.elevation=te),this.transform.apply(k)}_fireMoveEvents(p){this.fire(new s.Event("move",p)),this._zooming&&this.fire(new s.Event("zoom",p)),this._rotating&&this.fire(new s.Event("rotate",p)),this._pitching&&this.fire(new s.Event("pitch",p))}_afterEase(p,k){if(this._easeId&&k&&this._easeId===k)return;delete this._easeId;const L=this._zooming,z=this._rotating,j=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,L&&this.fire(new s.Event("zoomend",p)),z&&this.fire(new s.Event("rotateend",p)),j&&this.fire(new s.Event("pitchend",p)),this.fire(new s.Event("moveend",p))}flyTo(p,k){if(!p.essential&&s.browser.prefersReducedMotion){const Et=s.pick(p,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Et,k)}this.stop(),p=s.extend({offset:[0,0],speed:1.2,curve:1.42,easing:s.defaultEasing},p);const L=this._getTransformForUpdate(),z=this.getZoom(),j=this.getBearing(),Y=this.getPitch(),te=this.getPadding(),se="zoom"in p?s.clamp(+p.zoom,L.minZoom,L.maxZoom):z,ye="bearing"in p?this._normalizeBearing(p.bearing,j):j,Se="pitch"in p?+p.pitch:Y,Le="padding"in p?p.padding:L.padding,Ke=L.zoomScale(se-z),bt=s.Point.convert(p.offset);let T=L.centerPoint.add(bt);const B=L.pointLocation(T),W=s.LngLat.convert(p.center||B);this._normalizeCenter(W);const oe=L.project(B),ve=L.project(W).sub(oe);let ue=p.curve;const we=Math.max(L.width,L.height),Te=we/Ke,ze=ve.mag();if("minZoom"in p){const Et=s.clamp(Math.min(p.minZoom,z,se),L.minZoom,L.maxZoom),Lr=we/L.zoomScale(Et-z);ue=Math.sqrt(Lr/ze*2)}const $e=ue*ue;function ht(Et){const Lr=(Te*Te-we*we+(Et?-1:1)*$e*$e*ze*ze)/(2*(Et?Te:we)*$e*ze);return Math.log(Math.sqrt(Lr*Lr+1)-Lr)}function At(Et){return(Math.exp(Et)-Math.exp(-Et))/2}function Gt(Et){return(Math.exp(Et)+Math.exp(-Et))/2}const $t=ht(!1);let Pr=function(Et){return Gt($t)/Gt($t+ue*Et)},rr=function(Et){return we*((Gt($t)*(At(Lr=$t+ue*Et)/Gt(Lr))-At($t))/$e)/ze;var Lr},Dt=(ht(!0)-$t)/ue;if(Math.abs(ze)<1e-6||!isFinite(Dt)){if(Math.abs(we-Te)<1e-6)return this.easeTo(p,k);const Et=Tep.maxDuration&&(p.duration=0),this._zooming=!0,this._rotating=j!==ye,this._pitching=Se!==Y,this._padding=!L.isPaddingEqual(Le),this._prepareEase(k,!1),this.terrain&&this._prepareElevation(W),this._ease(Et=>{const Lr=Et*Dt,Or=1/Pr(Lr);L.zoom=Et===1?se:z+L.scaleZoom(Or),this._rotating&&(L.bearing=s.interpolate.number(j,ye,Et)),this._pitching&&(L.pitch=s.interpolate.number(Y,Se,Et)),this._padding&&(L.interpolatePadding(te,Le,Et),T=L.centerPoint.add(bt)),this.terrain&&!p.freezeElevation&&this._updateElevation(Et);const Mr=Et===1?W:L.unproject(oe.add(ve.mult(rr(Lr))).mult(Or));L.setLocationAtPoint(L.renderWorldCopies?Mr.wrap():Mr,T),this._applyUpdatedTransform(L),this._fireMoveEvents(k)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(k)},p),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(p,k){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const L=this._onEaseEnd;delete this._onEaseEnd,L.call(this,k)}if(!p){const L=this.handlers;L&&L.stop(!1)}return this}_ease(p,k,L){L.animate===!1||L.duration===0?(p(1),k()):(this._easeStart=s.browser.now(),this._easeOptions=L,this._onEaseFrame=p,this._onEaseEnd=k,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(p,k){p=s.wrap(p,-180,180);const L=Math.abs(p-k);return Math.abs(p-360-k)180?-360:L<-180?360:0}queryTerrainElevation(p){return this.terrain?this.terrain.getElevationForLngLatZoom(s.LngLat.convert(p),this.transform.tileZoom)-this.transform.elevation:null}}class Zi{constructor(p={}){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=k=>{!k||k.sourceDataType!=="metadata"&&k.sourceDataType!=="visibility"&&k.dataType!=="style"&&k.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=p}getDefaultPosition(){return"bottom-right"}onAdd(p){return this._map=p,this._compact=this.options&&this.options.compact,this._container=y.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=y.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=y.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(){y.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(p,k){const L=this._map._getUIString(`AttributionControl.${k}`);p.title=L,p.setAttribute("aria-label",L)}_updateAttributions(){if(!this._map.style)return;let p=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?p=p.concat(this.options.customAttribution.map(z=>typeof z!="string"?"":z)):typeof this.options.customAttribution=="string"&&p.push(this.options.customAttribution)),this._map.style.stylesheet){const z=this._map.style.stylesheet;this.styleOwner=z.owner,this.styleId=z.id}const k=this._map.style.sourceCaches;for(const z in k){const j=k[z];if(j.used||j.usedForTerrain){const Y=j.getSource();Y.attribution&&p.indexOf(Y.attribution)<0&&p.push(Y.attribution)}}p=p.filter(z=>String(z).trim()),p.sort((z,j)=>z.length-j.length),p=p.filter((z,j)=>{for(let Y=j+1;Y=0)return!1;return!0});const L=p.join(" | ");L!==this._attribHTML&&(this._attribHTML=L,p.length?(this._innerContainer.innerHTML=L,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ln{constructor(p={}){this._updateCompact=()=>{const k=this._container.children;if(k.length){const L=k[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&L.classList.add("maplibregl-compact"):L.classList.remove("maplibregl-compact")}},this.options=p}getDefaultPosition(){return"bottom-left"}onAdd(p){this._map=p,this._compact=this.options&&this.options.compact,this._container=y.create("div","maplibregl-ctrl");const k=y.create("a","maplibregl-ctrl-logo");return k.target="_blank",k.rel="noopener nofollow",k.href="https://maplibre.org/",k.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),k.setAttribute("rel","noopener nofollow"),this._container.appendChild(k),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){y.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ku{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(p){const k=++this._id;return this._queue.push({callback:p,id:k,cancelled:!1}),k}remove(p){const k=this._currentlyRunning,L=k?this._queue.concat(k):this._queue;for(const z of L)if(z.id===p)return void(z.cancelled=!0)}run(p=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const k=this._currentlyRunning=this._queue;this._queue=[];for(const L of k)if(!L.cancelled&&(L.callback(p),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const $a={"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":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"};var Ju=s.createLayout([{name:"a_pos3d",type:"Int16",components:3}]);class jo extends s.Evented{constructor(p){super(),this.sourceCache=p,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,p.usedForTerrain=!0,p.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(p,k){this.sourceCache.update(p,k),this._renderableTilesKeys=[];const L={};for(const z of p.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:k}))L[z.key]=!0,this._renderableTilesKeys.push(z.key),this._tiles[z.key]||(z.posMatrix=new Float64Array(16),s.ortho(z.posMatrix,0,s.EXTENT,0,s.EXTENT,0,1),this._tiles[z.key]=new mr(z,this.tileSize));for(const z in this._tiles)L[z]||delete this._tiles[z]}freeRtt(p){for(const k in this._tiles){const L=this._tiles[k];(!p||L.tileID.equals(p)||L.tileID.isChildOf(p)||p.isChildOf(L.tileID))&&(L.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(p=>this.getTileByID(p))}getTileByID(p){return this._tiles[p]}getTerrainCoords(p){const k={};for(const L of this._renderableTilesKeys){const z=this._tiles[L].tileID;if(z.canonical.equals(p.canonical)){const j=p.clone();j.posMatrix=new Float64Array(16),s.ortho(j.posMatrix,0,s.EXTENT,0,s.EXTENT,0,1),k[L]=j}else if(z.canonical.isChildOf(p.canonical)){const j=p.clone();j.posMatrix=new Float64Array(16);const Y=z.canonical.z-p.canonical.z,te=z.canonical.x-(z.canonical.x>>Y<>Y<>Y;s.ortho(j.posMatrix,0,ye,0,ye,0,1),s.translate(j.posMatrix,j.posMatrix,[-te*ye,-se*ye,0]),k[L]=j}else if(p.canonical.isChildOf(z.canonical)){const j=p.clone();j.posMatrix=new Float64Array(16);const Y=p.canonical.z-z.canonical.z,te=p.canonical.x-(p.canonical.x>>Y<>Y<>Y;s.ortho(j.posMatrix,0,s.EXTENT,0,s.EXTENT,0,1),s.translate(j.posMatrix,j.posMatrix,[te*ye,se*ye,0]),s.scale(j.posMatrix,j.posMatrix,[1/2**Y,1/2**Y,0]),k[L]=j}}return k}getSourceTile(p,k){const L=this.sourceCache._source;let z=p.overscaledZ-this.deltaZoom;if(z>L.maxzoom&&(z=L.maxzoom),z=L.minzoom&&(!j||!j.dem);)j=this.sourceCache.getTileByID(p.scaledTo(z--).key);return j}tilesAfterTime(p=Date.now()){return Object.values(this._tiles).filter(k=>k.timeAdded>=p)}}class ts{constructor(p,k,L){this.painter=p,this.sourceCache=new jo(k),this.options=L,this.exaggeration=typeof L.exaggeration=="number"?L.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(p,k,L,z=s.EXTENT){var j;if(!(k>=0&&k=0&&Lp.canonical.z&&(p.canonical.z>=z?j=p.canonical.z-z:s.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const Y=p.canonical.x-(p.canonical.x>>j<>j<>8<<4|j>>8,k[Y+3]=0;const L=new s.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(k.buffer)),z=new Fe(p,L,p.gl.RGBA,{premultiply:!1});return z.bind(p.gl.NEAREST,p.gl.CLAMP_TO_EDGE),this._coordsTexture=z,z}pointCoordinate(p){const k=new Uint8Array(4),L=this.painter.context,z=L.gl;L.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),z.readPixels(p.x,this.painter.height/devicePixelRatio-p.y-1,1,1,z.RGBA,z.UNSIGNED_BYTE,k),L.bindFramebuffer.set(null);const j=k[0]+(k[2]>>4<<8),Y=k[1]+((15&k[2])<<8),te=this.coordsIndex[255-k[3]],se=te&&this.sourceCache.getTileByID(te);if(!se)return null;const ye=this._coordsTextureSize,Se=(1<p.id!==k),this._recentlyUsed.push(p.id)}stampObject(p){p.stamp=++this._stamp}getOrCreateFreeObject(){for(const k of this._recentlyUsed)if(!this._objects[k].inUse)return this._objects[k];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const p=this._createObject(this._objects.length);return this._objects.push(p),p}freeObject(p){p.inUse=!1}freeAllObjects(){for(const p of this._objects)this.freeObject(p)}isFull(){return!(this._objects.length!p.inUse)===!1}}const Au={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Tc{constructor(p,k){this.painter=p,this.terrain=k,this.pool=new Xs(p.context,30,k.sourceCache.tileSize*k.qualityFactor)}destruct(){this.pool.destruct()}getTexture(p){return this.pool.getObjectForId(p.rtt[this._stacks.length-1].id).texture}prepareForRender(p,k){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=p._order.filter(L=>!p._layers[L].isHidden(k)),this._coordsDescendingInv={};for(const L in p.sourceCaches){this._coordsDescendingInv[L]={};const z=p.sourceCaches[L].getVisibleCoordinates();for(const j of z){const Y=this.terrain.sourceCache.getTerrainCoords(j);for(const te in Y)this._coordsDescendingInv[L][te]||(this._coordsDescendingInv[L][te]=[]),this._coordsDescendingInv[L][te].push(Y[te])}}this._coordsDescendingInvStr={};for(const L of p._order){const z=p._layers[L],j=z.source;if(Au[z.type]&&!this._coordsDescendingInvStr[j]){this._coordsDescendingInvStr[j]={};for(const Y in this._coordsDescendingInv[j])this._coordsDescendingInvStr[j][Y]=this._coordsDescendingInv[j][Y].map(te=>te.key).sort().join()}}for(const L of this._renderableTiles)for(const z in this._coordsDescendingInvStr){const j=this._coordsDescendingInvStr[z][L.tileID.key];j&&j!==L.rttCoords[z]&&(L.rtt=[])}}renderLayer(p){if(p.isHidden(this.painter.transform.zoom))return!1;const k=p.type,L=this.painter,z=this._renderableLayerIds[this._renderableLayerIds.length-1]===p.id;if(Au[k]&&(this._prevType&&Au[this._prevType]||this._stacks.push([]),this._prevType=k,this._stacks[this._stacks.length-1].push(p.id),!z))return!0;if(Au[this._prevType]||Au[k]&&z){this._prevType=k;const j=this._stacks.length-1,Y=this._stacks[j]||[];for(const te of this._renderableTiles){if(this.pool.isFull()&&(vu(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(te),te.rtt[j]){const ye=this.pool.getObjectForId(te.rtt[j].id);if(ye.stamp===te.rtt[j].stamp){this.pool.useObject(ye);continue}}const se=this.pool.getOrCreateFreeObject();this.pool.useObject(se),this.pool.stampObject(se),te.rtt[j]={id:se.id,stamp:se.stamp},L.context.bindFramebuffer.set(se.fbo.framebuffer),L.context.clear({color:s.Color.transparent,stencil:0}),L.currentStencilSource=void 0;for(let ye=0;ye{R.touchstart=R.dragStart,R.touchmoveWindow=R.dragMove,R.touchend=R.dragEnd},Qu={showCompass:!0,showZoom:!0,visualizePitch:!1};class As{constructor(p,k,L=!1){this.mousedown=Y=>{this.startMouse(s.extend({},Y,{ctrlKey:!0,preventDefault:()=>Y.preventDefault()}),y.mousePos(this.element,Y)),y.addEventListener(window,"mousemove",this.mousemove),y.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Y=>{this.moveMouse(Y,y.mousePos(this.element,Y))},this.mouseup=Y=>{this.mouseRotate.dragEnd(Y),this.mousePitch&&this.mousePitch.dragEnd(Y),this.offTemp()},this.touchstart=Y=>{Y.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=y.touchPos(this.element,Y.targetTouches)[0],this.startTouch(Y,this._startPos),y.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),y.addEventListener(window,"touchend",this.touchend))},this.touchmove=Y=>{Y.targetTouches.length!==1?this.reset():(this._lastPos=y.touchPos(this.element,Y.targetTouches)[0],this.moveTouch(Y,this._lastPos))},this.touchend=Y=>{Y.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){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 z=p.dragRotate._mouseRotate.getClickTolerance(),j=p.dragRotate._mousePitch.getClickTolerance();this.element=k,this.mouseRotate=bu({clickTolerance:z,enable:!0}),this.touchRotate=(({enable:Y,clickTolerance:te,bearingDegreesPerPixelMoved:se=.8})=>{const ye=new es;return new Rn({clickTolerance:te,move:(Se,Le)=>({bearingDelta:(Le.x-Se.x)*se}),moveStateManager:ye,enable:Y,assignEvents:m0})})({clickTolerance:z,enable:!0}),this.map=p,L&&(this.mousePitch=wu({clickTolerance:j,enable:!0}),this.touchPitch=(({enable:Y,clickTolerance:te,pitchDegreesPerPixelMoved:se=-.5})=>{const ye=new es;return new Rn({clickTolerance:te,move:(Se,Le)=>({pitchDelta:(Le.y-Se.y)*se}),moveStateManager:ye,enable:Y,assignEvents:m0})})({clickTolerance:j,enable:!0})),y.addEventListener(k,"mousedown",this.mousedown),y.addEventListener(k,"touchstart",this.touchstart,{passive:!1}),y.addEventListener(k,"touchcancel",this.reset)}startMouse(p,k){this.mouseRotate.dragStart(p,k),this.mousePitch&&this.mousePitch.dragStart(p,k),y.disableDrag()}startTouch(p,k){this.touchRotate.dragStart(p,k),this.touchPitch&&this.touchPitch.dragStart(p,k),y.disableDrag()}moveMouse(p,k){const L=this.map,{bearingDelta:z}=this.mouseRotate.dragMove(p,k)||{};if(z&&L.setBearing(L.getBearing()+z),this.mousePitch){const{pitchDelta:j}=this.mousePitch.dragMove(p,k)||{};j&&L.setPitch(L.getPitch()+j)}}moveTouch(p,k){const L=this.map,{bearingDelta:z}=this.touchRotate.dragMove(p,k)||{};if(z&&L.setBearing(L.getBearing()+z),this.touchPitch){const{pitchDelta:j}=this.touchPitch.dragMove(p,k)||{};j&&L.setPitch(L.getPitch()+j)}}off(){const p=this.element;y.removeEventListener(p,"mousedown",this.mousedown),y.removeEventListener(p,"touchstart",this.touchstart,{passive:!1}),y.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),y.removeEventListener(window,"touchend",this.touchend),y.removeEventListener(p,"touchcancel",this.reset),this.offTemp()}offTemp(){y.enableDrag(),y.removeEventListener(window,"mousemove",this.mousemove),y.removeEventListener(window,"mouseup",this.mouseup),y.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),y.removeEventListener(window,"touchend",this.touchend)}}let aa;function Ss(R,p,k){if(R=new s.LngLat(R.lng,R.lat),p){const L=new s.LngLat(R.lng-360,R.lat),z=new s.LngLat(R.lng+360,R.lat),j=k.locationPoint(R).distSqr(p);k.locationPoint(L).distSqr(p)180;){const L=k.locationPoint(R);if(L.x>=0&&L.y>=0&&L.x<=k.width&&L.y<=k.height)break;R.lng>k.center.lng?R.lng-=360:R.lng+=360}return R}const Pc={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 Al(R,p,k){const L=R.classList;for(const z in Pc)L.remove(`maplibregl-${k}-anchor-${z}`);L.add(`maplibregl-${k}-anchor-${p}`)}class Ia extends s.Evented{constructor(p){if(super(),this._onKeyPress=k=>{const L=k.code,z=k.charCode||k.keyCode;L!=="Space"&&L!=="Enter"&&z!==32&&z!==13||this.togglePopup()},this._onMapClick=k=>{const L=k.originalEvent.target,z=this._element;this._popup&&(L===z||z.contains(L))&&this.togglePopup()},this._update=k=>{if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=Ss(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let L="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?L=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(L=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let z="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?z="rotateX(0deg)":this._pitchAlignment==="map"&&(z=`rotateX(${this._map.getPitch()}deg)`),k&&k.type!=="moveend"||(this._pos=this._pos.round()),y.setTransform(this._element,`${Pc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${z} ${L}`),this._map.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const j=this._map.unproject(this._pos),Y=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=j.distanceTo(this._lngLat)>20*Y?"0.2":"1.0",this._opacityTimeout=null},100))},this._onMove=k=>{if(!this._isDragging){const L=this._clickTolerance||this._map._clickTolerance;this._isDragging=k.point.dist(this._pointerdownPos)>=L}this._isDragging&&(this._pos=k.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 s.Event("dragstart"))),this.fire(new s.Event("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 s.Event("dragend")),this._state="inactive"},this._addDragHandler=k=>{this._element.contains(k.originalEvent.target)&&(k.preventDefault(),this._positionDelta=k.point.sub(this._pos).add(this._offset),this._pointerdownPos=k.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=p&&p.anchor||"center",this._color=p&&p.color||"#3FB1CE",this._scale=p&&p.scale||1,this._draggable=p&&p.draggable||!1,this._clickTolerance=p&&p.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=p&&p.rotation||0,this._rotationAlignment=p&&p.rotationAlignment||"auto",this._pitchAlignment=p&&p.pitchAlignment&&p.pitchAlignment!=="auto"?p.pitchAlignment:this._rotationAlignment,p&&p.element)this._element=p.element,this._offset=s.Point.convert(p&&p.offset||[0,0]);else{this._defaultMarker=!0,this._element=y.create("div"),this._element.setAttribute("aria-label","Map marker");const k=y.createNS("http://www.w3.org/2000/svg","svg"),L=41,z=27;k.setAttributeNS(null,"display","block"),k.setAttributeNS(null,"height",`${L}px`),k.setAttributeNS(null,"width",`${z}px`),k.setAttributeNS(null,"viewBox",`0 0 ${z} ${L}`);const j=y.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"stroke","none"),j.setAttributeNS(null,"stroke-width","1"),j.setAttributeNS(null,"fill","none"),j.setAttributeNS(null,"fill-rule","evenodd");const Y=y.createNS("http://www.w3.org/2000/svg","g");Y.setAttributeNS(null,"fill-rule","nonzero");const te=y.createNS("http://www.w3.org/2000/svg","g");te.setAttributeNS(null,"transform","translate(3.0, 29.0)"),te.setAttributeNS(null,"fill","#000000");const se=[{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 oe of se){const ve=y.createNS("http://www.w3.org/2000/svg","ellipse");ve.setAttributeNS(null,"opacity","0.04"),ve.setAttributeNS(null,"cx","10.5"),ve.setAttributeNS(null,"cy","5.80029008"),ve.setAttributeNS(null,"rx",oe.rx),ve.setAttributeNS(null,"ry",oe.ry),te.appendChild(ve)}const ye=y.createNS("http://www.w3.org/2000/svg","g");ye.setAttributeNS(null,"fill",this._color);const Se=y.createNS("http://www.w3.org/2000/svg","path");Se.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"),ye.appendChild(Se);const Le=y.createNS("http://www.w3.org/2000/svg","g");Le.setAttributeNS(null,"opacity","0.25"),Le.setAttributeNS(null,"fill","#000000");const Ke=y.createNS("http://www.w3.org/2000/svg","path");Ke.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"),Le.appendChild(Ke);const bt=y.createNS("http://www.w3.org/2000/svg","g");bt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),bt.setAttributeNS(null,"fill","#FFFFFF");const T=y.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"transform","translate(8.0, 8.0)");const B=y.createNS("http://www.w3.org/2000/svg","circle");B.setAttributeNS(null,"fill","#000000"),B.setAttributeNS(null,"opacity","0.25"),B.setAttributeNS(null,"cx","5.5"),B.setAttributeNS(null,"cy","5.5"),B.setAttributeNS(null,"r","5.4999962");const W=y.createNS("http://www.w3.org/2000/svg","circle");W.setAttributeNS(null,"fill","#FFFFFF"),W.setAttributeNS(null,"cx","5.5"),W.setAttributeNS(null,"cy","5.5"),W.setAttributeNS(null,"r","5.4999962"),T.appendChild(B),T.appendChild(W),Y.appendChild(te),Y.appendChild(ye),Y.appendChild(Le),Y.appendChild(bt),Y.appendChild(T),k.appendChild(Y),k.setAttributeNS(null,"height",L*this._scale+"px"),k.setAttributeNS(null,"width",z*this._scale+"px"),this._element.appendChild(k),this._offset=s.Point.convert(p&&p.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",k=>{k.preventDefault()}),this._element.addEventListener("mousedown",k=>{k.preventDefault()}),Al(this._element,this._anchor,"marker"),p&&p.className)for(const k of p.className.split(" "))this._element.classList.add(k);this._popup=null}addTo(p){return this.remove(),this._map=p,p.getCanvasContainer().appendChild(this._element),p.on("move",this._update),p.on("moveend",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("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),y.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(p){return this._lngLat=s.LngLat.convert(p),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(p){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),p){if(!("offset"in p.options)){const z=Math.sqrt(Math.pow(13.5,2)/2);p.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[z,-1*(38.1-13.5+z)],"bottom-right":[-z,-1*(38.1-13.5+z)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=p,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}getPopup(){return this._popup}togglePopup(){const p=this._popup;return p?(p.isOpen()?p.remove():p.addTo(this._map),this):this}getOffset(){return this._offset}setOffset(p){return this._offset=s.Point.convert(p),this._update(),this}addClassName(p){this._element.classList.add(p)}removeClassName(p){this._element.classList.remove(p)}toggleClassName(p){return this._element.classList.toggle(p)}setDraggable(p){return this._draggable=!!p,this._map&&(p?(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(p){return this._rotation=p||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(p){return this._rotationAlignment=p||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(p){return this._pitchAlignment=p&&p!=="auto"?p:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const rs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let ec=0,Su=!1;const Mc={maxWidth:100,unit:"metric"};function Ga(R,p,k){const L=k&&k.maxWidth||100,z=R._container.clientHeight/2,j=R.unproject([0,z]),Y=R.unproject([L,z]),te=j.distanceTo(Y);if(k&&k.unit==="imperial"){const se=3.2808*te;se>5280?Wl(p,L,se/5280,R._getUIString("ScaleControl.Miles")):Wl(p,L,se,R._getUIString("ScaleControl.Feet"))}else k&&k.unit==="nautical"?Wl(p,L,te/1852,R._getUIString("ScaleControl.NauticalMiles")):te>=1e3?Wl(p,L,te/1e3,R._getUIString("ScaleControl.Kilometers")):Wl(p,L,te,R._getUIString("ScaleControl.Meters"))}function Wl(R,p,k,L){const z=function(j){const Y=Math.pow(10,`${Math.floor(j)}`.length-1);let te=j/Y;return te=te>=10?10:te>=5?5:te>=3?3:te>=2?2:te>=1?1:function(se){const ye=Math.pow(10,Math.ceil(-Math.log(se)/Math.LN10));return Math.round(se*ye)/ye}(te),Y*te}(k);R.style.width=p*(z/k)+"px",R.innerHTML=`${z} ${L}`}const Dc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},e0=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Eu(R){if(R){if(typeof R=="number"){const p=Math.round(Math.sqrt(.5*Math.pow(R,2)));return{center:new s.Point(0,0),top:new s.Point(0,R),"top-left":new s.Point(p,p),"top-right":new s.Point(-p,p),bottom:new s.Point(0,-R),"bottom-left":new s.Point(p,-p),"bottom-right":new s.Point(-p,-p),left:new s.Point(R,0),right:new s.Point(-R,0)}}if(R instanceof s.Point||Array.isArray(R)){const p=s.Point.convert(R);return{center:p,top:p,"top-left":p,"top-right":p,bottom:p,"bottom-left":p,"bottom-right":p,left:p,right:p}}return{center:s.Point.convert(R.center||[0,0]),top:s.Point.convert(R.top||[0,0]),"top-left":s.Point.convert(R["top-left"]||[0,0]),"top-right":s.Point.convert(R["top-right"]||[0,0]),bottom:s.Point.convert(R.bottom||[0,0]),"bottom-left":s.Point.convert(R["bottom-left"]||[0,0]),"bottom-right":s.Point.convert(R["bottom-right"]||[0,0]),left:s.Point.convert(R.left||[0,0]),right:s.Point.convert(R.right||[0,0])}}return Eu(new s.Point(0,0))}const tc={extend:(R,...p)=>s.extend(R,...p),run(R){R()},logToElement(R,p=!1,k="log"){const L=window.document.getElementById(k);L&&(p&&(L.innerHTML=""),L.innerHTML+=`
${R}`)}},Zl=f;class uo{static get version(){return Zl}static get workerCount(){return Bi.workerCount}static set workerCount(p){Bi.workerCount=p}static get maxParallelImageRequests(){return s.config.MAX_PARALLEL_IMAGE_REQUESTS}static set maxParallelImageRequests(p){s.config.MAX_PARALLEL_IMAGE_REQUESTS=p}static get workerUrl(){return s.config.WORKER_URL}static set workerUrl(p){s.config.WORKER_URL=p}static addProtocol(p,k){s.config.REGISTERED_PROTOCOLS[p]=k}static removeProtocol(p){delete s.config.REGISTERED_PROTOCOLS[p]}}return uo.Map=class extends Qc{constructor(R){if(s.PerformanceUtils.mark(s.PerformanceMarkers.create),(R=s.extend({},oa,R)).minZoom!=null&&R.maxZoom!=null&&R.minZoom>R.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(R.minPitch!=null&&R.maxPitch!=null&&R.minPitch>R.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(R.minPitch!=null&&R.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(R.maxPitch!=null&&R.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Hs(R.minZoom,R.maxZoom,R.minPitch,R.maxPitch,R.renderWorldCopies),{bearingSnap:R.bearingSnap}),this._cooperativeGesturesOnWheel=p=>{this._onCooperativeGesture(p,p[this._metaKey],1)},this._contextLost=p=>{p.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new s.Event("webglcontextlost",{originalEvent:p}))},this._contextRestored=p=>{this._setupPainter(),this.resize(),this._update(),this.fire(new s.Event("webglcontextrestored",{originalEvent:p}))},this._onMapScroll=p=>{if(p.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=R.interactive,this._cooperativeGestures=R.cooperativeGestures,this._metaKey=navigator.platform.indexOf("Mac")===0?"metaKey":"ctrlKey",this._maxTileCacheSize=R.maxTileCacheSize,this._maxTileCacheZoomLevels=R.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=R.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=R.preserveDrawingBuffer,this._antialias=R.antialias,this._trackResize=R.trackResize,this._bearingSnap=R.bearingSnap,this._refreshExpiredTiles=R.refreshExpiredTiles,this._fadeDuration=R.fadeDuration,this._crossSourceCollisions=R.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=R.collectResourceTiming,this._renderTaskQueue=new Ku,this._controls=[],this._mapId=s.uniqueId(),this._locale=s.extend({},$a,R.locale),this._clickTolerance=R.clickTolerance,this._overridePixelRatio=R.pixelRatio,this._maxCanvasSize=R.maxCanvasSize,this.transformCameraUpdate=R.transformCameraUpdate,this._imageQueueHandle=$.addThrottleControl(()=>this.isMoving()),this._requestManager=new Z(R.transformRequest),typeof R.container=="string"){if(this._container=document.getElementById(R.container),!this._container)throw new Error(`Container '${R.container}' not found.`)}else{if(!(R.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=R.container}if(R.maxBounds&&this.setMaxBounds(R.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let p=!1;this._resizeObserver=new ResizeObserver(k=>{p?this._trackResize&&this.resize(k)._update():p=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Zs(this,R),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=R.hash&&new ls(typeof R.hash=="string"&&R.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:R.center,zoom:R.zoom,bearing:R.bearing,pitch:R.pitch}),R.bounds&&(this.resize(),this.fitBounds(R.bounds,s.extend({},R.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=R.localIdeographFontFamily,this._validateStyle=R.validateStyle,R.style&&this.setStyle(R.style,{localIdeographFontFamily:R.localIdeographFontFamily}),R.attributionControl&&this.addControl(new Zi({customAttribution:R.customAttribution})),R.maplibreLogo&&this.addControl(new ln,R.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",p=>{this._update(p.dataType==="style"),this.fire(new s.Event(`${p.dataType}data`,p))}),this.on("dataloading",p=>{this.fire(new s.Event(`${p.dataType}dataloading`,p))}),this.on("dataabort",p=>{this.fire(new s.Event("sourcedataabort",p))})}_getMapId(){return this._mapId}addControl(R,p){if(p===void 0&&(p=R.getDefaultPosition?R.getDefaultPosition():"top-right"),!R||!R.onAdd)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const k=R.onAdd(this);this._controls.push(R);const L=this._controlPositions[p];return p.indexOf("bottom")!==-1?L.insertBefore(k,L.firstChild):L.appendChild(k),this}removeControl(R){if(!R||!R.onRemove)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const p=this._controls.indexOf(R);return p>-1&&this._controls.splice(p,1),R.onRemove(this),this}hasControl(R){return this._controls.indexOf(R)>-1}calculateCameraOptionsFromTo(R,p,k,L){return L==null&&this.terrain&&(L=this.terrain.getElevationForLngLatZoom(k,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(R,p,k,L)}resize(R){var p;const k=this._containerDimensions(),L=k[0],z=k[1],j=this._getClampedPixelRatio(L,z);if(this._resizeCanvas(L,z,j),this.painter.resize(L,z,j),this.painter.overLimit()){const te=this.painter.context.gl;this._maxCanvasSize=[te.drawingBufferWidth,te.drawingBufferHeight];const se=this._getClampedPixelRatio(L,z);this._resizeCanvas(L,z,se),this.painter.resize(L,z,se)}this.transform.resize(L,z),(p=this._requestedCameraState)===null||p===void 0||p.resize(L,z);const Y=!this._moving;return Y&&(this.stop(),this.fire(new s.Event("movestart",R)).fire(new s.Event("move",R))),this.fire(new s.Event("resize",R)),Y&&this.fire(new s.Event("moveend",R)),this}_getClampedPixelRatio(R,p){const{0:k,1:L}=this._maxCanvasSize,z=this.getPixelRatio(),j=R*z,Y=p*z;return Math.min(j>k?k/j:1,Y>L?L/Y:1)*z}getPixelRatio(){var R;return(R=this._overridePixelRatio)!==null&&R!==void 0?R:devicePixelRatio}setPixelRatio(R){this._overridePixelRatio=R,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(R){return this.transform.setMaxBounds(ke.convert(R)),this._update()}setMinZoom(R){if((R=R??-2)>=-2&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(R){if((R=R??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(R>=0&&R<=this.transform.maxPitch)return this.transform.minPitch=R,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(R>=this.transform.minPitch)return this.transform.maxPitch=R,this._update(),this.getPitch()>R&&this.setPitch(R),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(R){return this.transform.renderWorldCopies=R,this._update()}getCooperativeGestures(){return this._cooperativeGestures}setCooperativeGestures(R){return this._cooperativeGestures=R,this._cooperativeGestures?this._setupCooperativeGestures():this._destroyCooperativeGestures(),this}project(R){return this.transform.locationPoint(s.LngLat.convert(R),this.style&&this.terrain)}unproject(R){return this.transform.pointLocation(s.Point.convert(R),this.terrain)}isMoving(){var R;return this._moving||((R=this.handlers)===null||R===void 0?void 0:R.isMoving())}isZooming(){var R;return this._zooming||((R=this.handlers)===null||R===void 0?void 0:R.isZooming())}isRotating(){var R;return this._rotating||((R=this.handlers)===null||R===void 0?void 0:R.isRotating())}_createDelegatedListener(R,p,k){if(R==="mouseenter"||R==="mouseover"){let L=!1;return{layer:p,listener:k,delegates:{mousemove:j=>{const Y=this.getLayer(p)?this.queryRenderedFeatures(j.point,{layers:[p]}):[];Y.length?L||(L=!0,k.call(this,new bo(R,this,j.originalEvent,{features:Y}))):L=!1},mouseout:()=>{L=!1}}}}if(R==="mouseleave"||R==="mouseout"){let L=!1;return{layer:p,listener:k,delegates:{mousemove:Y=>{(this.getLayer(p)?this.queryRenderedFeatures(Y.point,{layers:[p]}):[]).length?L=!0:L&&(L=!1,k.call(this,new bo(R,this,Y.originalEvent)))},mouseout:Y=>{L&&(L=!1,k.call(this,new bo(R,this,Y.originalEvent)))}}}}{const L=z=>{const j=this.getLayer(p)?this.queryRenderedFeatures(z.point,{layers:[p]}):[];j.length&&(z.features=j,k.call(this,z),delete z.features)};return{layer:p,listener:k,delegates:{[R]:L}}}}on(R,p,k){if(k===void 0)return super.on(R,p);const L=this._createDelegatedListener(R,p,k);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(L);for(const z in L.delegates)this.on(z,L.delegates[z]);return this}once(R,p,k){if(k===void 0)return super.once(R,p);const L=this._createDelegatedListener(R,p,k);for(const z in L.delegates)this.once(z,L.delegates[z]);return this}off(R,p,k){return k===void 0?super.off(R,p):(this._delegatedListeners&&this._delegatedListeners[R]&&(L=>{const z=this._delegatedListeners[R];for(let j=0;jthis._updateStyle(R,p));const k=this.style&&p.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!R)),R?(this.style=new tl(this,p||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R,p,k):this.style.loadJSON(R,p,k),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new tl(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(R,p){if(typeof R=="string"){const k=this._requestManager.transformRequest(R,G.Style);s.getJSON(k,(L,z)=>{L?this.fire(new s.ErrorEvent(L)):z&&this._updateDiff(z,p)})}else typeof R=="object"&&this._updateDiff(R,p)}_updateDiff(R,p){try{this.style.setState(R,p)&&this._update(!0)}catch(k){s.warnOnce(`Unable to perform style diff: ${k.message||k.error||k}. Rebuilding the style from scratch.`),this._updateStyle(R,p)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():s.warnOnce("There is no style added to the map.")}addSource(R,p){return this._lazyInitEmptyStyle(),this.style.addSource(R,p),this._update(!0)}isSourceLoaded(R){const p=this.style&&this.style.sourceCaches[R];if(p!==void 0)return p.loaded();this.fire(new s.ErrorEvent(new Error(`There is no source with ID '${R}'`)))}setTerrain(R){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),R){const p=this.style.sourceCaches[R.source];if(!p)throw new Error(`cannot load terrain, because there exists no source with ID: ${R.source}`);for(const k in this.style._layers){const L=this.style._layers[k];L.type==="hillshade"&&L.source===R.source&&s.warnOnce("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 ts(this.painter,p,R),this.painter.renderToTexture=new Tc(this.painter,this.terrain),this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=k=>{k.dataType==="style"?this.terrain.sourceCache.freeRtt():k.dataType==="source"&&k.tile&&(k.sourceId!==R.source||this._elevationFreeze||(this.transform._minEleveationForCurrentTile=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(k.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._minEleveationForCurrentTile=0,this.transform.elevation=0;return this.fire(new s.Event("terrain",{terrain:R})),this}getTerrain(){return this.terrain&&this.terrain.options}areTilesLoaded(){const R=this.style&&this.style.sourceCaches;for(const p in R){const k=R[p]._tiles;for(const L in k){const z=k[L];if(z.state!=="loaded"&&z.state!=="errored")return!1}}return!0}addSourceType(R,p,k){return this._lazyInitEmptyStyle(),this.style.addSourceType(R,p,k)}removeSource(R){return this.style.removeSource(R),this._update(!0)}getSource(R){return this.style.getSource(R)}addImage(R,p,k={}){const{pixelRatio:L=1,sdf:z=!1,stretchX:j,stretchY:Y,content:te}=k;if(this._lazyInitEmptyStyle(),!(p instanceof HTMLImageElement||s.isImageBitmap(p))){if(p.width===void 0||p.height===void 0)return this.fire(new s.ErrorEvent(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:se,height:ye,data:Se}=p,Le=p;return this.style.addImage(R,{data:new s.RGBAImage({width:se,height:ye},new Uint8Array(Se)),pixelRatio:L,stretchX:j,stretchY:Y,content:te,sdf:z,version:0,userImage:Le}),Le.onAdd&&Le.onAdd(this,R),this}}{const{width:se,height:ye,data:Se}=s.browser.getImageData(p);this.style.addImage(R,{data:new s.RGBAImage({width:se,height:ye},Se),pixelRatio:L,stretchX:j,stretchY:Y,content:te,sdf:z,version:0})}}updateImage(R,p){const k=this.style.getImage(R);if(!k)return this.fire(new s.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const L=p instanceof HTMLImageElement||s.isImageBitmap(p)?s.browser.getImageData(p):p,{width:z,height:j,data:Y}=L;if(z===void 0||j===void 0)return this.fire(new s.ErrorEvent(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(z!==k.data.width||j!==k.data.height)return this.fire(new s.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));const te=!(p instanceof HTMLImageElement||s.isImageBitmap(p));return k.data.replace(Y,te),this.style.updateImage(R,k),this}getImage(R){return this.style.getImage(R)}hasImage(R){return R?!!this.style.getImage(R):(this.fire(new s.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(R){this.style.removeImage(R)}loadImage(R,p){$.getImage(this._requestManager.transformRequest(R,G.Image),p)}listImages(){return this.style.listImages()}addLayer(R,p){return this._lazyInitEmptyStyle(),this.style.addLayer(R,p),this._update(!0)}moveLayer(R,p){return this.style.moveLayer(R,p),this._update(!0)}removeLayer(R){return this.style.removeLayer(R),this._update(!0)}getLayer(R){return this.style.getLayer(R)}setLayerZoomRange(R,p,k){return this.style.setLayerZoomRange(R,p,k),this._update(!0)}setFilter(R,p,k={}){return this.style.setFilter(R,p,k),this._update(!0)}getFilter(R){return this.style.getFilter(R)}setPaintProperty(R,p,k,L={}){return this.style.setPaintProperty(R,p,k,L),this._update(!0)}getPaintProperty(R,p){return this.style.getPaintProperty(R,p)}setLayoutProperty(R,p,k,L={}){return this.style.setLayoutProperty(R,p,k,L),this._update(!0)}getLayoutProperty(R,p){return this.style.getLayoutProperty(R,p)}setGlyphs(R,p={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(R,p),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(R,p,k={}){return this._lazyInitEmptyStyle(),this.style.addSprite(R,p,k,L=>{L||this._update(!0)}),this}removeSprite(R){return this._lazyInitEmptyStyle(),this.style.removeSprite(R),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(R,p={}){return this._lazyInitEmptyStyle(),this.style.setSprite(R,p,k=>{k||this._update(!0)}),this}setLight(R,p={}){return this._lazyInitEmptyStyle(),this.style.setLight(R,p),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(R,p){return this.style.setFeatureState(R,p),this._update()}removeFeatureState(R,p){return this.style.removeFeatureState(R,p),this._update()}getFeatureState(R){return this.style.getFeatureState(R)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let R=0,p=0;return this._container&&(R=this._container.clientWidth||400,p=this._container.clientHeight||300),[R,p]}_setupContainer(){const R=this._container;R.classList.add("maplibregl-map");const p=this._canvasContainer=y.create("div","maplibregl-canvas-container",R);this._interactive&&p.classList.add("maplibregl-interactive"),this._canvas=y.create("canvas","maplibregl-canvas",p),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const k=this._containerDimensions(),L=this._getClampedPixelRatio(k[0],k[1]);this._resizeCanvas(k[0],k[1],L);const z=this._controlContainer=y.create("div","maplibregl-control-container",R),j=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Y=>{j[Y]=y.create("div",`maplibregl-ctrl-${Y} `,z)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){this._cooperativeGesturesScreen=y.create("div","maplibregl-cooperative-gesture-screen",this._container);let R=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(R=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use ⌘ + scroll to zoom the map"),this._cooperativeGesturesScreen.innerHTML=`
${R}
${typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}
- `,this._cooperativeGesturesScreen.setAttribute("aria-hidden","true"),this._canvasContainer.addEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.add("maplibregl-cooperative-gestures")}_destroyCooperativeGestures(){y.remove(this._cooperativeGesturesScreen),this._canvasContainer.removeEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.remove("maplibregl-cooperative-gestures")}_resizeCanvas(R,p,k){this._canvas.width=Math.floor(k*R),this._canvas.height=Math.floor(k*p),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${p}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let p=null;this._canvas.addEventListener("webglcontextcreationerror",L=>{p={requestedAttributes:R},L&&(p.statusMessage=L.statusMessage,p.type=L.type)},{once:!0});const k=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!k){const L="Failed to initialize WebGL";throw p?(p.message=L,new Error(JSON.stringify(p))):new Error(L)}this.painter=new Va(k,this.transform),b.testSupport(k)}_onCooperativeGesture(R,p,k){return!p&&k<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout(()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")},100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const p=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let k=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const z=this.transform.zoom,j=s.browser.now();this.style.zoomHistory.update(z,j);const Y=new s.EvaluationParameters(z,{now:j,fadeDuration:p,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),te=Y.crossFadingFactor();te===1&&te===this._crossFadingFactor||(k=!0,this._crossFadingFactor=te),this.style.update(Y)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform._minEleveationForCurrentTile=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._minEleveationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,p,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:p,showPadding:this.showPadding}),this.fire(new s.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,s.PerformanceUtils.mark(s.PerformanceMarkers.load),this.fire(new s.Event("load"))),this.style&&(this.style.hasTransitions()||k)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const L=this._sourcesDirty||this._styleDirty||this._placementDirty;return L||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new s.Event("idle")),!this._loaded||this._fullyLoaded||L||(this._fullyLoaded=!0,s.PerformanceUtils.mark(s.PerformanceMarkers.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const k of this._controls)k.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),$.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const p=this.painter.context.gl.getExtension("WEBGL_lose_context");p&&p.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),y.remove(this._canvasContainer),y.remove(this._controlContainer),this._cooperativeGestures&&this._destroyCooperativeGestures(),this._container.classList.remove("maplibregl-map"),s.PerformanceUtils.clearMetrics(),this._removed=!0,this.fire(new s.Event("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=s.browser.frame(R=>{s.PerformanceUtils.frame(R),this._frame=null,this._render(R)}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Jo}getCameraTargetElevation(){return this.transform.elevation}},uo.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const p=this._map.getZoom(),k=p===this._map.getMaxZoom(),L=p===this._map.getMinZoom();this._zoomInButton.disabled=k,this._zoomOutButton.disabled=L,this._zoomInButton.setAttribute("aria-disabled",k.toString()),this._zoomOutButton.setAttribute("aria-disabled",L.toString())},this._rotateCompassArrow=()=>{const p=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=p},this._setButtonTitle=(p,k)=>{const L=this._map._getUIString(`NavigationControl.${k}`);p.title=L,p.setAttribute("aria-label",L)},this.options=s.extend({},Qu,R),this._container=y.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",p=>p.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",p=>this._map.zoomIn({},{originalEvent:p})),y.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",p=>this._map.zoomOut({},{originalEvent:p})),y.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",p=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:p}):this._map.resetNorth({},{originalEvent:p})}),this._compassIcon=y.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new As(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){y.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(R,p){const k=y.create("button",R,this._container);return k.type="button",k.addEventListener("click",p),k}},uo.GeolocateControl=class extends s.Evented{constructor(R){super(),this._onSuccess=p=>{if(this._map){if(this._isOutOfMapMaxBounds(p))return this._setErrorState(),this.fire(new s.Event("outofmaxbounds",p)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=p,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(p),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(p),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new s.Event("geolocate",p)),this._finish()}},this._updateCamera=p=>{const k=new s.LngLat(p.coords.longitude,p.coords.latitude),L=p.coords.accuracy,z=this._map.getBearing(),j=s.extend({bearing:z},this.options.fitBoundsOptions),Y=ke.fromLngLat(k,L);this._map.fitBounds(Y,j,{geolocateSource:!0})},this._updateMarker=p=>{if(p){const k=new s.LngLat(p.coords.longitude,p.coords.latitude);this._accuracyCircleMarker.setLngLat(k).addTo(this._map),this._userLocationDotMarker.setLngLat(k).addTo(this._map),this._accuracy=p.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=p=>{if(this._map){if(this.options.trackUserLocation)if(p.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const k=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=k,this._geolocateButton.setAttribute("aria-label",k),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(p.code===3&&Su)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new s.Event("error",p)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=p=>{if(this._map){if(this._container.addEventListener("contextmenu",k=>k.preventDefault()),this._geolocateButton=y.create("button","maplibregl-ctrl-geolocate",this._container),y.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",p===!1){s.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const k=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=k,this._geolocateButton.setAttribute("aria-label",k)}else{const k=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=k,this._geolocateButton.setAttribute("aria-label",k)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=y.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ia({element:this._dotElement}),this._circleElement=y.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ia({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",k=>{k.geolocateSource||this._watchState!=="ACTIVE_LOCK"||k.originalEvent&&k.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new s.Event("trackuserlocationend")))})}},this.options=s.extend({},rs,R)}onAdd(R){return this._map=R,this._container=y.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(p,k=!1){aa===void 0||k?window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(L=>{aa=L.state!=="denied",p(aa)}).catch(()=>{aa=!!window.navigator.geolocation,p(aa)}):(aa=!!window.navigator.geolocation,p(aa)):p(aa)}(this._setupUI),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(),y.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ec=0,Su=!1}_isOutOfMapMaxBounds(R){const p=this._map.getMaxBounds(),k=R.coords;return p&&(k.longitudep.getEast()||k.latitudep.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 R=this._map.getBounds(),p=R.getSouthEast(),k=R.getNorthEast(),L=p.distanceTo(k),z=Math.ceil(this._accuracy/(L/this._map._container.clientHeight)*2);this._circleElement.style.width=`${z}px`,this._circleElement.style.height=`${z}px`}trigger(){if(!this._setup)return s.warnOnce("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 s.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ec--,Su=!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 s.Event("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 s.Event("trackuserlocationstart"));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 R;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ec++,ec>1?(R={maximumAge:6e5,timeout:0},Su=!0):(R=this.options.positionOptions,Su=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,R)}}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)}},uo.AttributionControl=Zi,uo.LogoControl=ln,uo.ScaleControl=class{constructor(R){this._onMove=()=>{Ga(this._map,this._container,this.options)},this.setUnit=p=>{this.options.unit=p,Ga(this._map,this._container,this.options)},this.options=s.extend({},Mc,R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=y.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){y.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},uo.FullscreenControl=class extends s.Evented{constructor(R={}){super(),this._onFullscreenChange=()=>{(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,R&&R.container&&(R.container instanceof HTMLElement?this._container=R.container:s.warnOnce("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(R){return this._map=R,this._container||(this._container=this._map.getContainer()),this._controlContainer=y.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){y.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const R=this._fullscreenButton=y.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);y.create("span","maplibregl-ctrl-icon",R).setAttribute("aria-hidden","true"),R.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const R=this._getTitle();this._fullscreenButton.setAttribute("aria-label",R),this._fullscreenButton.title=R}_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 s.Event("fullscreenstart")),this._map._cooperativeGestures&&(this._prevCooperativeGestures=this._map._cooperativeGestures,this._map.setCooperativeGestures())):(this.fire(new s.Event("fullscreenend")),this._prevCooperativeGestures&&(this._map.setCooperativeGestures(this._prevCooperativeGestures),delete this._prevCooperativeGestures))}_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()}},uo.TerrainControl=class{constructor(R){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))},this.options=R}onAdd(R){return this._map=R,this._container=y.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=y.create("button","maplibregl-ctrl-terrain",this._container),y.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(){y.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},uo.Popup=class extends s.Evented{constructor(R){super(),this.remove=()=>(this._content&&y.remove(this._content),this._container&&(y.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),delete this._map),this.fire(new s.Event("close")),this),this._onMouseUp=p=>{this._update(p.point)},this._onMouseMove=p=>{this._update(p.point)},this._onDrag=p=>{this._update(p.point)},this._update=p=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=y.create("div","maplibregl-popup",this._map.getContainer()),this._tip=y.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Y of this.options.className.split(" "))this._container.classList.add(Y);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=Ss(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!p)return;const k=this._pos=this._trackPointer&&p?p:this._map.project(this._lngLat);let L=this.options.anchor;const z=Eu(this.options.offset);if(!L){const Y=this._container.offsetWidth,te=this._container.offsetHeight;let se;se=k.y+z.bottom.ythis._map.transform.height-te?["bottom"]:[],k.xthis._map.transform.width-Y/2&&se.push("right"),L=se.length===0?"bottom":se.join("-")}const j=k.add(z[L]).round();y.setTransform(this._container,`${Pc[L]} translate(${j.x}px,${j.y}px)`),Al(this._container,L,"popup")},this._onClose=()=>{this.remove()},this.options=s.extend(Object.create(Dc),R)}addTo(R){return this._map&&this.remove(),this._map=R,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 s.Event("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(R){return this._lngLat=s.LngLat.convert(R),this._pos=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._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(R){return this.setDOMContent(document.createTextNode(R))}setHTML(R){const p=document.createDocumentFragment(),k=document.createElement("body");let L;for(k.innerHTML=R;L=k.firstChild,L;)p.appendChild(L);return this.setDOMContent(p)}getMaxWidth(){var R;return(R=this._container)===null||R===void 0?void 0:R.style.maxWidth}setMaxWidth(R){return this.options.maxWidth=R,this._update(),this}setDOMContent(R){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=y.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(R),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(R){this._container&&this._container.classList.add(R)}removeClassName(R){this._container&&this._container.classList.remove(R)}setOffset(R){return this.options.offset=R,this._update(),this}toggleClassName(R){if(this._container)return this._container.classList.toggle(R)}_createCloseButton(){this.options.closeButton&&(this._closeButton=y.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const R=this._container.querySelector(e0);R&&R.focus()}},uo.Marker=Ia,uo.Style=tl,uo.LngLat=s.LngLat,uo.LngLatBounds=ke,uo.Point=s.Point,uo.MercatorCoordinate=s.MercatorCoordinate,uo.Evented=s.Evented,uo.AJAXError=s.AJAXError,uo.config=s.config,uo.CanvasSource=It,uo.GeoJSONSource=Jt,uo.ImageSource=Sr,uo.RasterDEMTileSource=Mt,uo.RasterTileSource=zt,uo.VectorTileSource=Nt,uo.VideoSource=Qt,uo.setRTLTextPlugin=s.setRTLTextPlugin,uo.getRTLTextPluginStatus=s.getRTLTextPluginStatus,uo.prewarm=function(){Wi().acquire(Rr)},uo.clearPrewarmedResources=function(){const R=un;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(Rr),un=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()"))},tc.extend(uo,{isSafari:s.isSafari,getPerformanceMetrics:s.PerformanceUtils.getPerformanceMetrics}),uo});var c=o;return c})})(a8);var sc=a8.exports;const ny=M2(sc);var ju=(t,e,r)=>new Promise((i,o)=>{var u=f=>{try{s(r.next(f))}catch(y){o(y)}},c=f=>{try{s(r.throw(f))}catch(y){o(y)}},s=f=>f.done?i(f.value):Promise.resolve(f.value).then(u,c);s((r=r.apply(t,e)).next())}),Gc=Uint8Array,id=Uint16Array,e9=Int32Array,l8=new Gc([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),u8=new Gc([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),t9=new Gc([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c8=function(t,e){for(var r=new id(31),i=0;i<31;++i)r[i]=e+=1<>1|(ra&21845)<<1,mf=(mf&52428)>>2|(mf&13107)<<2,mf=(mf&61680)>>4|(mf&3855)<<4,oy[ra]=((mf&65280)>>8|(mf&255)<<8)>>1;var mf,ra,dp=function(t,e,r){for(var i=t.length,o=0,u=new id(e);o>f]=y}else for(s=new id(i),o=0;o>15-t[o]);return s},Yp=new Gc(288);for(ra=0;ra<144;++ra)Yp[ra]=8;var ra;for(ra=144;ra<256;++ra)Yp[ra]=9;var ra;for(ra=256;ra<280;++ra)Yp[ra]=7;var ra;for(ra=280;ra<288;++ra)Yp[ra]=8;var ra,d8=new Gc(32);for(ra=0;ra<32;++ra)d8[ra]=5;var ra,o9=dp(Yp,9,1),a9=dp(d8,5,1),Rm=function(t){for(var e=t[0],r=1;re&&(e=t[r]);return e},A0=function(t,e,r){var i=e/8|0;return(t[i]|t[i+1]<<8)>>(e&7)&r},Om=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},s9=function(t){return(t+7)/8|0},l9=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new Gc(r-e);return i.set(t.subarray(e,r)),i},u9=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Hc=function(t,e,r){var i=new Error(e||u9[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,Hc),!r)throw i;return i},s_=function(t,e,r,i){var o=t.length,u=i?i.length:0;if(!o||e.f&&!e.l)return r||new Gc(0);var c=!r||e.i!=2,s=e.i;r||(r=new Gc(o*3));var f=function(_r){var Sr=r.length;if(_r>Sr){var Qt=new Gc(Math.max(Sr*2,_r));Qt.set(r),r=Qt}},y=e.f||0,b=e.p||0,A=e.b||0,I=e.l,C=e.d,N=e.m,F=e.n,$=o*8;do{if(!I){y=A0(t,b,1);var G=A0(t,b+1,3);if(b+=3,G)if(G==1)I=o9,C=a9,N=9,F=5;else if(G==2){var Ae=A0(t,b,31)+257,ae=A0(t,b+10,15)+4,ge=Ae+A0(t,b+5,31)+1;b+=14;for(var he=new Gc(ge),Ee=new Gc(19),Fe=0;Fe>4;if(Z<16)he[Fe++]=Z;else{var xt=0,yt=0;for(Z==16?(yt=3+A0(t,b,3),b+=2,xt=he[Fe-1]):Z==17?(yt=3+A0(t,b,7),b+=3):Z==18&&(yt=11+A0(t,b,127),b+=7);yt--;)he[Fe++]=xt}}var Ge=he.subarray(0,Ae),ot=he.subarray(Ae);N=Rm(Ge),F=Rm(ot),I=dp(Ge,N,1),C=dp(ot,F,1)}else Hc(1);else{var Z=s9(b)+4,ee=t[Z-4]|t[Z-3]<<8,Q=Z+ee;if(Q>o){s&&Hc(0);break}c&&f(A+ee),r.set(t.subarray(Z,Q),A),e.b=A+=ee,e.p=b=Q*8,e.f=y;continue}if(b>$){s&&Hc(0);break}}c&&f(A+131072);for(var mt=(1<>4;if(b+=xt&15,b>$){s&&Hc(0);break}if(xt||Hc(2),_e<256)r[A++]=_e;else if(_e==256){wt=b,I=null;break}else{var Be=_e-254;if(_e>264){var Fe=_e-257,ke=l8[Fe];Be=A0(t,b,(1<>4;ft||Hc(3),b+=ft&15;var ot=n9[Nt];if(Nt>3){var ke=u8[Nt];ot+=Om(t,b)&(1<$){s&&Hc(0);break}c&&f(A+131072);var zt=A+Be;if(A>3&1)+(e>>4&1);i>0;i-=!t[r++]);return r+(e&2)},h9=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},d9=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&Hc(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&Hc(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function p9(t,e){return s_(t,{i:2},e&&e.out,e&&e.dictionary)}function m9(t,e){var r=f9(t);return r+8>t.length&&Hc(6,"invalid gzip data"),s_(t.subarray(r,-8),{i:2},e&&e.out||new Gc(h9(t)),e&&e.dictionary)}function g9(t,e){return s_(t.subarray(d9(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function ay(t,e){return t[0]==31&&t[1]==139&&t[2]==8?m9(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?p9(t,e):g9(t,e)}var y9=typeof TextDecoder<"u"&&new TextDecoder,_9=0;try{y9.decode(c9,{stream:!0}),_9=1}catch{}var p8=(t,e)=>t*Math.pow(2,e),Jd=(t,e)=>Math.floor(t/Math.pow(2,e)),s2=(t,e)=>p8(t.getUint16(e+1,!0),8)+t.getUint8(e),m8=(t,e)=>p8(t.getUint32(e+2,!0),16)+t.getUint16(e,!0),v9=(t,e,r,i,o)=>{if(t!=i.getUint8(o))return t-i.getUint8(o);const u=s2(i,o+1);if(e!=u)return e-u;const c=s2(i,o+4);return r!=c?r-c:0},b9=(t,e,r,i)=>{const o=g8(t,e|128,r,i);return o?{z:e,x:r,y:i,offset:o[0],length:o[1],is_dir:!0}:null},wb=(t,e,r,i)=>{const o=g8(t,e,r,i);return o?{z:e,x:r,y:i,offset:o[0],length:o[1],is_dir:!1}:null},g8=(t,e,r,i)=>{let o=0,u=t.byteLength/17-1;for(;o<=u;){const c=u+o>>1,s=v9(e,r,i,t,c*17);if(s>0)o=c+1;else if(s<0)u=c-1;else return[m8(t,c*17+7),t.getUint32(c*17+13,!0)]}return null},w9=(t,e)=>t.is_dir&&!e.is_dir?1:!t.is_dir&&e.is_dir?-1:t.z!==e.z?t.z-e.z:t.x!==e.x?t.x-e.x:t.y-e.y,y8=(t,e)=>{const r=t.getUint8(e*17);return{z:r&127,x:s2(t,e*17+1),y:s2(t,e*17+4),offset:m8(t,e*17+7),length:t.getUint32(e*17+13,!0),is_dir:r>>7===1}},xb=t=>{const e=[],r=new DataView(t);for(let i=0;i{t.sort(w9);const e=new ArrayBuffer(17*t.length),r=new Uint8Array(e);for(let i=0;i>8&255,r[i*17+3]=o.x>>16&255,r[i*17+4]=o.y&255,r[i*17+5]=o.y>>8&255,r[i*17+6]=o.y>>16&255,r[i*17+7]=o.offset&255,r[i*17+8]=Jd(o.offset,8)&255,r[i*17+9]=Jd(o.offset,16)&255,r[i*17+10]=Jd(o.offset,24)&255,r[i*17+11]=Jd(o.offset,32)&255,r[i*17+12]=Jd(o.offset,48)&255,r[i*17+13]=o.length&255,r[i*17+14]=o.length>>8&255,r[i*17+15]=o.length>>16&255,r[i*17+16]=o.length>>24&255}return e},k9=(t,e)=>{if(t.byteLength<17)return null;const r=t.byteLength/17,i=y8(t,r-1);if(i.is_dir){const o=i.z,u=e.z-o,c=Math.trunc(e.x/(1<{if(t.type=="json"){const r=t.url.substr(10);let i=this.tiles.get(r);return i||(i=new kb(r),this.tiles.set(r,i)),i.getHeader().then(o=>{const u={tiles:[t.url+"/{z}/{x}/{y}"],minzoom:o.minZoom,maxzoom:o.maxZoom,bounds:[o.minLon,o.minLat,o.maxLon,o.maxLat]};e(null,u,null,null)}).catch(o=>{e(o,null,null,null)}),{cancel:()=>{}}}else{const r=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),i=t.url.match(r);if(!i)throw new Error("Invalid PMTiles protocol URL");const o=i[1];let u=this.tiles.get(o);u||(u=new kb(o),this.tiles.set(o,u));const c=i[2],s=i[3],f=i[4],y=new AbortController,b=y.signal;let A=()=>{y.abort()};return u.getHeader().then(I=>{u.getZxy(+c,+s,+f,b).then(C=>{C?e(null,new Uint8Array(C.data),C.cacheControl,C.expires):I.tileType==1?e(null,new Uint8Array,null,null):e(null,null,null,null)}).catch(C=>{C.name!=="AbortError"&&e(C,null,null,null)})}),{cancel:A}}},this.tiles=new Map}add(t){this.tiles.set(t.source.getKey(),t)}get(t){return this.tiles.get(t)}};function qh(t,e){return(e>>>0)*4294967296+(t>>>0)}function C9(t,e){const r=e.buf;let i,o;if(o=r[e.pos++],i=(o&112)>>4,o<128||(o=r[e.pos++],i|=(o&127)<<3,o<128)||(o=r[e.pos++],i|=(o&127)<<10,o<128)||(o=r[e.pos++],i|=(o&127)<<17,o<128)||(o=r[e.pos++],i|=(o&127)<<24,o<128)||(o=r[e.pos++],i|=(o&1)<<31,o<128))return qh(t,i);throw new Error("Expected varint not more than 10 bytes")}function Qd(t){const e=t.buf;let r,i;return i=e[t.pos++],r=i&127,i<128||(i=e[t.pos++],r|=(i&127)<<7,i<128)||(i=e[t.pos++],r|=(i&127)<<14,i<128)||(i=e[t.pos++],r|=(i&127)<<21,i<128)?r:(i=e[t.pos],r|=(i&15)<<28,C9(r,t))}function I9(t,e,r,i){if(i==0){r==1&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const o=e[0];e[0]=e[1],e[1]=o}}var L9=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function T9(t,e,r){if(t>26)throw Error("Tile zoom level exceeds max safe number limit (26)");if(e>Math.pow(2,t)-1||r>Math.pow(2,t)-1)throw Error("tile x/y outside zoom level bounds");const i=L9[t],o=Math.pow(2,t);let u=0,c=0,s=0;const f=[e,r];let y=o/2;for(;y>0;)u=(f[0]&y)>0?1:0,c=(f[1]&y)>0?1:0,s+=y*y*(3*u^c),I9(y,f,u,c),y=y/2;return i+s}function v8(t,e){return ju(this,null,function*(){if(e===1||e===0)return t;if(e===2){if(typeof globalThis.DecompressionStream>"u")return ay(new Uint8Array(t));{let i=new Response(t).body.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(i).arrayBuffer()}}else throw Error("Compression method not supported")})}var P9=127;function M9(t,e){let r=0,i=t.length-1;for(;r<=i;){const o=i+r>>1,u=e-t[o].tileId;if(u>0)r=o+1;else if(u<0)i=o-1;else return t[o]}return i>=0&&(t[i].runLength===0||e-t[i].tileId=300)throw Error("Bad response code: "+o.status);const u=o.headers.get("Content-Length");if(o.status===200&&(!u||+u>e))throw i&&i.abort(),Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield o.arrayBuffer(),etag:o.headers.get("ETag")||void 0,cacheControl:o.headers.get("Cache-Control")||void 0,expires:o.headers.get("Expires")||void 0}})}};function S0(t,e){const r=t.getUint32(e+4,!0),i=t.getUint32(e+0,!0);return r*Math.pow(2,32)+i}function z9(t,e){const r=new DataView(t),i=r.getUint8(7);if(i>3)throw Error(`Archive is spec version ${i} but this library supports up to spec version 3`);return{specVersion:i,rootDirectoryOffset:S0(r,8),rootDirectoryLength:S0(r,16),jsonMetadataOffset:S0(r,24),jsonMetadataLength:S0(r,32),leafDirectoryOffset:S0(r,40),leafDirectoryLength:S0(r,48),tileDataOffset:S0(r,56),tileDataLength:S0(r,64),numAddressedTiles:S0(r,72),numTileEntries:S0(r,80),numTileContents:S0(r,88),clustered:r.getUint8(96)===1,internalCompression:r.getUint8(97),tileCompression:r.getUint8(98),tileType:r.getUint8(99),minZoom:r.getUint8(100),maxZoom:r.getUint8(101),minLon:r.getInt32(102,!0)/1e7,minLat:r.getInt32(106,!0)/1e7,maxLon:r.getInt32(110,!0)/1e7,maxLat:r.getInt32(114,!0)/1e7,centerZoom:r.getUint8(118),centerLon:r.getInt32(119,!0)/1e7,centerLat:r.getInt32(123,!0)/1e7,etag:e}}function b8(t){const e={buf:new Uint8Array(t),pos:0},r=Qd(e),i=[];let o=0;for(let u=0;u0?i[u].offset=i[u-1].offset+i[u-1].length:i[u].offset=c-1}return i}function N9(t){const e=new DataView(t);return e.getUint16(2,!0)===2?(console.warn("PMTiles spec version 2 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),2):e.getUint16(2,!0)===1?(console.warn("PMTiles spec version 1 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),1):3}var nd=class extends Error{};function R9(t,e,r,i){return ju(this,null,function*(){const o=yield t.getBytes(0,16384);if(new DataView(o.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");if(N9(o.data)<3)return[yield _8.getHeader(t)];const c=o.data.slice(0,P9);let s=o.etag;i&&o.etag!=i&&(console.warn("ETag conflict detected; your HTTP server might not support content-based ETag headers. ETags disabled for "+t.getKey()),s=void 0);const f=z9(c,s);if(r){const y=o.data.slice(f.rootDirectoryOffset,f.rootDirectoryOffset+f.rootDirectoryLength),b=t.getKey()+"|"+(f.etag||"")+"|"+f.rootDirectoryOffset+"|"+f.rootDirectoryLength,A=b8(yield e(y,f.internalCompression));return[f,[b,A.length,A]]}return[f,void 0]})}function O9(t,e,r,i,o){return ju(this,null,function*(){const u=yield t.getBytes(r,i);if(o.etag&&o.etag!==u.etag)throw new nd(u.etag);const c=yield e(u.data,o.internalCompression),s=b8(c);if(s.length===0)throw new Error("Empty directory is invalid");return s})}var F9=class{constructor(t=100,e=!0,r=v8){this.cache=new Map,this.maxCacheEntries=t,this.counter=1,this.prefetch=e,this.decompress=r}getHeader(t,e){return ju(this,null,function*(){const r=t.getKey();if(this.cache.has(r))return this.cache.get(r).lastUsed=this.counter++,yield this.cache.get(r).data;const i=new Promise((o,u)=>{R9(t,this.decompress,this.prefetch,e).then(c=>{c[1]&&this.cache.set(c[1][0],{lastUsed:this.counter++,data:Promise.resolve(c[1][2])}),o(c[0]),this.prune()}).catch(c=>{u(c)})});return this.cache.set(r,{lastUsed:this.counter++,data:i}),i})}getDirectory(t,e,r,i){return ju(this,null,function*(){const o=t.getKey()+"|"+(i.etag||"")+"|"+e+"|"+r;if(this.cache.has(o))return this.cache.get(o).lastUsed=this.counter++,yield this.cache.get(o).data;const u=new Promise((c,s)=>{O9(t,this.decompress,e,r,i).then(f=>{c(f),this.prune()}).catch(f=>{s(f)})});return this.cache.set(o,{lastUsed:this.counter++,data:u}),u})}getArrayBuffer(t,e,r,i){return ju(this,null,function*(){const o=t.getKey()+"|"+(i.etag||"")+"|"+e+"|"+r;if(this.cache.has(o))return this.cache.get(o).lastUsed=this.counter++,yield this.cache.get(o).data;const u=new Promise((c,s)=>{t.getBytes(e,r).then(f=>{if(i.etag&&i.etag!==f.etag)throw new nd(f.etag);c(f.data),this.cache.has(o),this.prune()}).catch(f=>{s(f)})});return this.cache.set(o,{lastUsed:this.counter++,data:u}),u})}prune(){if(this.cache.size>=this.maxCacheEntries){let t=1/0,e;this.cache.forEach((r,i)=>{r.lastUsedu.maxZoom)return;let c=u.rootDirectoryOffset,s=u.rootDirectoryLength;for(let f=0;f<=3;f++){const y=yield this.cache.getDirectory(this.source,c,s,u),b=M9(y,o);if(b)if(b.runLength>0){const A=yield this.source.getBytes(u.tileDataOffset+b.offset,b.length,i);if(u.etag&&u.etag!==A.etag)throw new nd(A.etag);return{data:yield this.decompress(A.data,u.tileCompression),cacheControl:A.cacheControl,expires:A.expires}}else c=u.leafDirectoryOffset+b.offset,s=b.length;else return}throw Error("Maximum directory depth exceeded")})}getZxy(t,e,r,i){return ju(this,null,function*(){try{return yield this.getZxyAttempt(t,e,r,i)}catch(o){if(o instanceof nd)return this.cache.invalidate(this.source,o.message),yield this.getZxyAttempt(t,e,r,i);throw o}})}getMetadataAttempt(){return ju(this,null,function*(){const t=yield this.cache.getHeader(this.source),e=yield this.source.getBytes(t.jsonMetadataOffset,t.jsonMetadataLength);if(t.etag&&t.etag!==e.etag)throw new nd(e.etag);const r=yield this.decompress(e.data,t.internalCompression),i=new TextDecoder("utf-8");return JSON.parse(i.decode(r))})}getMetadata(){return ju(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(t){if(t instanceof nd)return this.cache.invalidate(this.source,t.message),yield this.getMetadataAttempt();throw t}})}};const Bu=Is(null),Lp=Is(null),Po={title:"WASAC Rural Water Network",url:"https://wasac.rw",logo:"https://raw.githubusercontent.com/wasac/logo/main/logo.png",basePath:"",attribution:"©WASAC,Ltd.",styles:[{title:"OSM",uri:"https://wasac.github.io/mapbox-stylefiles/unvt/style.json"},{title:"OSM (Open Building)",uri:"https://wasac.github.io/mapbox-stylefiles/unvt/style-buildings.json"},{title:"Bing Aerial",uri:"https://wasac.github.io/mapbox-stylefiles/unvt/style-aerial.json"}],center:[30.0291,-2.0032],zoom:9,search:{url:"https://wasac.github.io/vt/wss.geojson",target:["wss_name","district","po_name"],format:t=>`${t.wss_id}-${t.wss_name}, ${t.po_name}, ${t.district}`,place_type:["wss"],placeholder:"Search WSS/PO/District",limit:10,zoom:13},popup:{target:["handpump","improvedspring","dugwell","solarpump","otherwaterpoint","household","publictap","waterkiosk","industrial","institution","other connection","chamber","reservoir","pumping-station","watersource","pipeline","wss","pg-building","uwss-customers","uwss-fire-hydrant","uwss-manhole","uwss_pipeline_annotation","uwss_pipeline","uwss-pumping-station","uwss-reservoir","uwss-valve","uwss-water-meter","uwss-water-treatment-plant","uwss-watersource","ecd","ecd_point","health_facility","health_facility_point","school","school_point","office","office_point"]},legend:{targets:{village:"Village","village-annotation":"Village Label",cell:"Cell","cell-annotation":"Cell Label",sector:"Sector","sector-annotation":"Sector Label",district:"District","district-annotation":"District Label",wss:"WSS","wss-annotation":"WSS Label",pipeline:"Pipeline",pipeline_annotation:"Pipeline Label",watersource:"Water Source",reservoir:"Reservoir","pumping-station":"Pumping Station",chamber:"Chamber",household:"Household",publictap:"Public Tap",waterkiosk:"Water Kiosk",industrial:"Industrial",institution:"Institution","other connection":"Other connection",handpump:"Hand Pump",improvedspring:"Improved Spring",dugwell:"Dug well",solarpump:"Solar Pump",otherwaterpoint:"Other water point",parcels:"Parcels",parcels_annotation:"Parcels Label","contour-line":"Countour","contour-label":"Contour Label",hillshade:"Hillshade","uwss-customers":"Customers (Urban)","uwss-fire-hydrant":"Fire hydrant (Urban)","uwss-manhole":"Manhole (Urban)",uwss_pipeline_annotation:"Pipeline Label (Urban)",uwss_pipeline:"Pipeline (Urban)","uwss-pumping-station":"Pump (Urban)","uwss-reservoir":"Reservoir (Urban)","uwss-valve":"Valve (Urban)","uwss-water-meter":"Water meter (Urban)","uwss-water-treatment-plant":"Water treatment plant (Urban)","uwss-watersource":"Water source (Urban)",ecd:"Early Children Development Center (building)",ecd_point:"Early Children Development Center",ecd_point_anotation:"Early Children Development Center (label)",health_facility:"Health facility (building)",health_facility_point:"Health facility",health_facility_point_anotation:"Health facility (label)",school:"School (building)",school_point:"School",school_point_anotation:"School (label)",office:"Office (building)",office_point:"Office",office_point_anotation:"Office (label)"}},elevation:{url:"https://wasac.github.io/rw-terrain/tiles/{z}/{x}/{y}.png",options:{tileSize:512,font:["Roboto Medium"],fontSize:12,fontHalo:1,mainColor:"#263238",haloColor:"#fff",units:"kilometers"}},valhalla:{url:"https://valhalla.water-gis.com",isoChroneOptions:{Contours:[{time:3,distance:1,color:"ff0000"},{time:5,distance:2,color:"ffff00"},{time:10,distance:3,color:"0000ff"},{time:15,distance:4,color:"ff00ff"}],isochrone:{font:["Roboto Medium"],fontSize:14,fontHalo:3,fontColor:"#263238",fontHaloColor:"#fff"}},routingOptions:{font:["Roboto Medium"],fontSize:14,fontHalo:3,fontColor:"#263238",fontHaloColor:"#fff",iconImage:"marker",iconSize:1}},terrain:{source:"rwanda-dem",exaggeration:1},attributeTable:{rowsPerPage:50,minZoom:14},adminBoundary:{url:"https://wasac.github.io/rw-admin-boundary"}};var B9=Object.defineProperty,j9=(t,e,r)=>e in t?B9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,H0=(t,e,r)=>(j9(t,typeof e!="symbol"?e+"":e,r),r);const G1=class{constructor(e,r){H0(this,"controlContainer"),H0(this,"map"),H0(this,"mapAreaContainer"),H0(this,"areaButton"),H0(this,"areas"),H0(this,"select"),H0(this,"limit_no_areas"),this.areas=e||G1.DEFAULT_AREAS,this.limit_no_areas=r||G1.DEFAULT_NO_AREAS,this.onDocumentClick=this.onDocumentClick.bind(this)}getDefaultPosition(){return"top-right"}onAdd(e){if(this.map=e,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("maplibregl-ctrl"),this.controlContainer.classList.add("maplibregl-ctrl-group"),this.areas.length<=this.limit_no_areas){this.mapAreaContainer=document.createElement("div"),this.areaButton=document.createElement("button"),this.mapAreaContainer.classList.add("maplibregl-area-list");for(const r of this.areas){const i=document.createElement("button");i.innerText=r.title,i.classList.add(r.title.replace(/[^a-z0-9-]/gi,"_")),i.value=JSON.stringify({center:r.latlng,zoom:r.zoom}),i.addEventListener("click",o=>{var u;const c=o.srcElement;(u=this.map)==null||u.jumpTo(JSON.parse(c.value)),this.mapAreaContainer.style.display="none",this.areaButton.style.display="block";const s=this.mapAreaContainer.getElementsByClassName("active");for(;s[0];)s[0].classList.remove("active");c.classList.add("active")}),r.title===G1.DEFAULT_AREA&&i.classList.add("active"),this.mapAreaContainer.appendChild(i)}this.areaButton.classList.add("maplibregl-ctrl-icon"),this.areaButton.classList.add("maplibregl-area-switcher"),this.areaButton.addEventListener("click",()=>{this.areaButton.style.display="none",this.mapAreaContainer.style.display="block"}),document.addEventListener("click",this.onDocumentClick),this.controlContainer.appendChild(this.areaButton),this.controlContainer.appendChild(this.mapAreaContainer)}else{this.controlContainer.classList.add("maplibregl-ctrl-area-switch");const r=document.createElement("select");this.select=r,this.select.setAttribute("type","select"),this.select.addEventListener("change",function(i){i.target&&e.flyTo(JSON.parse(i.target[this.selectedIndex].value))}),this.controlContainer.appendChild(this.select),this.areas.forEach(function(i){const o=document.createElement("option");o.setAttribute("type","option"),o.text=i.title,o.value=JSON.stringify({center:i.latlng,zoom:i.zoom}),r.appendChild(o)})}return this.controlContainer}onRemove(){!this.controlContainer||!this.controlContainer.parentNode||!this.map||!this.areaButton||(this.areaButton.removeEventListener("click",this.onDocumentClick),this.controlContainer.parentNode.removeChild(this.controlContainer),document.removeEventListener("click",this.onDocumentClick),this.map=void 0)}onDocumentClick(e){this.controlContainer&&!this.controlContainer.contains(e.target)&&this.mapAreaContainer&&this.areaButton&&(this.mapAreaContainer.style.display="none",this.areaButton.style.display="block")}};let W1=G1;H0(W1,"DEFAULT_AREA","Narok"),H0(W1,"DEFAULT_AREAS",[{title:"Narok",latlng:[35.86974,-1.08707],zoom:13},{title:"Nairobi",latlng:[36.8034,-1.2809],zoom:11},{title:"Mombasa",latlng:[39.65449,-4.05099],zoom:12}]),H0(W1,"DEFAULT_NO_AREAS",5);function Ab(t,e,r){const i=t.slice();return i[12]=e[r],i}function Sb(t,e,r){const i=t.slice();return i[15]=e[r],i}function Eb(t,e,r){const i=t.slice();return i[15]=e[r],i}function Cb(t){let e;function r(u,c){return u[3]?q9:U9}let i=r(t),o=i(t);return{c(){e=tt("div"),o.c(),this.h()},l(u){e=rt(u,"DIV",{class:!0});var c=_t(e);o.l(c),c.forEach(fe),this.h()},h(){me(e,"class","popup-select svelte-1655iok")},m(u,c){dt(u,e,c),o.m(e,null)},p(u,c){i===(i=r(u))&&o?o.p(u,c):(o.d(1),o=i(u),o&&(o.c(),o.m(e,null)))},d(u){u&&fe(e),o.d()}}}function U9(t){let e,r,i,o=pn(t[0]),u=[];for(let c=0;ct[8].call(e))},m(c,s){dt(c,e,s);for(let f=0;ft[7].call(e))},m(c,s){dt(c,e,s);for(let f=0;f0&&Cb(t),o=t[2]&&Tb(t);return{c(){e=tt("div"),i&&i.c(),r=ar(),o&&o.c()},l(u){e=rt(u,"DIV",{});var c=_t(e);i&&i.l(c),r=sr(c),o&&o.l(c),c.forEach(fe)},m(u,c){dt(u,e,c),i&&i.m(e,null),Qe(e,r),o&&o.m(e,null),t[9](e)},p(u,[c]){u[0]&&u[0].length>0?i?i.p(u,c):(i=Cb(u),i.c(),i.m(e,r)):i&&(i.d(1),i=null),u[2]?o?o.p(u,c):(o=Tb(u),o.c(),o.m(e,null)):o&&(o.d(1),o=null)},i:gi,o:gi,d(u){u&&fe(e),i&&i.d(),o&&o.d(),t[9](null)}}}function H9(t,e,r){let i,{map:o}=e,{targetLayers:u=[]}=e,c,s,f=[],y;function b(){}b.prototype.onAdd=function(F){return this.map=F,this.controlContainer=document.createElement("div"),this.controlContainer.className="maplibregl-ctrl maplibregl-ctrl-group",this.button=document.createElement("button"),this.button.className="maplibregl-ctrl-identify maplibre-identify-icon",this.button.type="button",this.button.addEventListener("click",()=>{this.changeButtonCondition()}),this.controlContainer.appendChild(this.button),this.button.dispatchEvent(new Event("click")),this.controlContainer},b.prototype.changeButtonCondition=function(){this.isActive?(this.button.classList.remove("-active"),this.isActive=!1,this.map.off("click",this.onClick.bind(this)),r(0,f=[]),r(2,y=void 0),c&&(c.remove(),c=void 0)):(this.button.classList.add("-active"),this.isActive=!0,this.map.on("click",this.onClick.bind(this)))},b.prototype.onClick=function(F){if(!this.isActive){r(0,f=[]),r(2,y=void 0);return}let $=[];u.length>0?u.forEach(Z=>{this.map.getLayer(Z)&&$.push(Z)}):$=o.getStyle().layers.map(Z=>Z.id);const G=this.map.queryRenderedFeatures(F.point,{layers:$});r(0,f=G.filter(Z=>Object.keys(Z.properties).length>0)),r(2,y=f.length>0?f[0]:void 0),f.length>0?c=new sc.Popup().setLngLat(F.lngLat).setDOMContent(s).setMaxWidth("300px").addTo(o):c&&(c.remove(),c=void 0)},b.prototype.onRemove=function(){!this.controlContainer||!this.controlContainer.parentNode||!this.map||!this.button||(this.controlContainer.parentNode.removeChild(this.controlContainer),this.map.off("click",this.onClick.bind(this)),this.map=void 0)};let A=null;th(async()=>{r(6,A=new b)});function I(){y=$c(this),r(2,y),r(0,f)}function C(){y=$c(this),r(2,y),r(0,f)}function N(F){Ht[F?"unshift":"push"](()=>{s=F,r(1,s)})}return t.$$set=F=>{"map"in F&&r(4,o=F.map),"targetLayers"in F&&r(5,u=F.targetLayers)},t.$$.update=()=>{t.$$.dirty&1&&r(3,i=f.length===1),t.$$.dirty&80&&o&&A!==null&&o.hasControl(A)===!1&&o.addControl(A,"top-right")},[f,s,y,i,o,u,A,I,C,N]}class $9 extends pi{constructor(e){super(),mi(this,e,H9,V9,fi,{map:4,targetLayers:5})}}const E1=parseFloat;function sy(t,e=";"){let r;if(Array.isArray(t))r=t.filter(i=>i);else{r=[];for(const i in t)t[i]&&r.push(`${i}:${t[i]}`)}return r.join(e)}function G9(t,e,r,i){let o,u;const c="1em";let s,f,y,b="-.125em";const A="visible";return i&&(y="center",u="1.25em"),r&&(o=r),e&&(e=="lg"?(f="1.33333em",s=".75em",b="-.225em"):e=="xs"?f=".75em":e=="sm"?f=".875em":f=e.replace("x","em")),sy([sy({float:o,width:u,height:c,"line-height":s,"font-size":f,"text-align":y,"vertical-align":b,"transform-origin":"center",overflow:A}),t])}function W9(t,e,r,i,o,u=1,c="",s=""){let f=1,y=1;return o&&(o=="horizontal"?f=-1:o=="vertical"?y=-1:f=y=-1),sy([`translate(${E1(e)*u}${c},${E1(r)*u}${c})`,`scale(${f*E1(t)},${y*E1(t)})`,i&&`rotate(${i}${s})`]," ")}function Mb(t){let e,r,i,o,u,c,s,f;function y(I,C){return typeof I[10][4]=="string"?X9:Z9}let b=y(t),A=b(t);return{c(){e=cd("svg"),r=cd("g"),i=cd("g"),A.c(),this.h()},l(I){e=fd(I,"svg",{id:!0,class:!0,style:!0,viewBox:!0,"aria-hidden":!0,role:!0,xmlns:!0});var C=_t(e);r=fd(C,"g",{transform:!0,"transform-origin":!0});var N=_t(r);i=fd(N,"g",{transform:!0});var F=_t(i);A.l(F),F.forEach(fe),N.forEach(fe),C.forEach(fe),this.h()},h(){me(i,"transform",t[12]),me(r,"transform",o="translate("+t[10][0]/2+" "+t[10][1]/2+")"),me(r,"transform-origin",u=t[10][0]/4+" 0"),me(e,"id",c=t[1]||void 0),me(e,"class",s="svelte-fa "+t[0]+" svelte-1cj2gr0"),me(e,"style",t[11]),me(e,"viewBox",f="0 0 "+t[10][0]+" "+t[10][1]),me(e,"aria-hidden","true"),me(e,"role","img"),me(e,"xmlns","http://www.w3.org/2000/svg"),li(e,"pulse",t[4]),li(e,"spin",t[3])},m(I,C){dt(I,e,C),Qe(e,r),Qe(r,i),A.m(i,null)},p(I,C){b===(b=y(I))&&A?A.p(I,C):(A.d(1),A=b(I),A&&(A.c(),A.m(i,null))),C&4096&&me(i,"transform",I[12]),C&1024&&o!==(o="translate("+I[10][0]/2+" "+I[10][1]/2+")")&&me(r,"transform",o),C&1024&&u!==(u=I[10][0]/4+" 0")&&me(r,"transform-origin",u),C&2&&c!==(c=I[1]||void 0)&&me(e,"id",c),C&1&&s!==(s="svelte-fa "+I[0]+" svelte-1cj2gr0")&&me(e,"class",s),C&2048&&me(e,"style",I[11]),C&1024&&f!==(f="0 0 "+I[10][0]+" "+I[10][1])&&me(e,"viewBox",f),C&17&&li(e,"pulse",I[4]),C&9&&li(e,"spin",I[3])},d(I){I&&fe(e),A.d()}}}function Z9(t){let e,r,i,o,u,c,s,f,y,b;return{c(){e=cd("path"),c=cd("path"),this.h()},l(A){e=fd(A,"path",{d:!0,fill:!0,"fill-opacity":!0,transform:!0}),_t(e).forEach(fe),c=fd(A,"path",{d:!0,fill:!0,"fill-opacity":!0,transform:!0}),_t(c).forEach(fe),this.h()},h(){me(e,"d",r=t[10][4][0]),me(e,"fill",i=t[6]||t[2]||"currentColor"),me(e,"fill-opacity",o=t[9]!=!1?t[7]:t[8]),me(e,"transform",u="translate("+t[10][0]/-2+" "+t[10][1]/-2+")"),me(c,"d",s=t[10][4][1]),me(c,"fill",f=t[5]||t[2]||"currentColor"),me(c,"fill-opacity",y=t[9]!=!1?t[8]:t[7]),me(c,"transform",b="translate("+t[10][0]/-2+" "+t[10][1]/-2+")")},m(A,I){dt(A,e,I),dt(A,c,I)},p(A,I){I&1024&&r!==(r=A[10][4][0])&&me(e,"d",r),I&68&&i!==(i=A[6]||A[2]||"currentColor")&&me(e,"fill",i),I&896&&o!==(o=A[9]!=!1?A[7]:A[8])&&me(e,"fill-opacity",o),I&1024&&u!==(u="translate("+A[10][0]/-2+" "+A[10][1]/-2+")")&&me(e,"transform",u),I&1024&&s!==(s=A[10][4][1])&&me(c,"d",s),I&36&&f!==(f=A[5]||A[2]||"currentColor")&&me(c,"fill",f),I&896&&y!==(y=A[9]!=!1?A[8]:A[7])&&me(c,"fill-opacity",y),I&1024&&b!==(b="translate("+A[10][0]/-2+" "+A[10][1]/-2+")")&&me(c,"transform",b)},d(A){A&&(fe(e),fe(c))}}}function X9(t){let e,r,i,o;return{c(){e=cd("path"),this.h()},l(u){e=fd(u,"path",{d:!0,fill:!0,transform:!0}),_t(e).forEach(fe),this.h()},h(){me(e,"d",r=t[10][4]),me(e,"fill",i=t[2]||t[5]||"currentColor"),me(e,"transform",o="translate("+t[10][0]/-2+" "+t[10][1]/-2+")")},m(u,c){dt(u,e,c)},p(u,c){c&1024&&r!==(r=u[10][4])&&me(e,"d",r),c&36&&i!==(i=u[2]||u[5]||"currentColor")&&me(e,"fill",i),c&1024&&o!==(o="translate("+u[10][0]/-2+" "+u[10][1]/-2+")")&&me(e,"transform",o)},d(u){u&&fe(e)}}}function Y9(t){let e,r=t[10][4]&&Mb(t);return{c(){r&&r.c(),e=mn()},l(i){r&&r.l(i),e=mn()},m(i,o){r&&r.m(i,o),dt(i,e,o)},p(i,[o]){i[10][4]?r?r.p(i,o):(r=Mb(i),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},i:gi,o:gi,d(i){i&&fe(e),r&&r.d(i)}}}function K9(t,e,r){let{class:i=""}=e,{id:o=""}=e,{style:u=""}=e,{icon:c}=e,{size:s=""}=e,{color:f=""}=e,{fw:y=!1}=e,{pull:b=""}=e,{scale:A=1}=e,{translateX:I=0}=e,{translateY:C=0}=e,{rotate:N=""}=e,{flip:F=!1}=e,{spin:$=!1}=e,{pulse:G=!1}=e,{primaryColor:Z=""}=e,{secondaryColor:ee=""}=e,{primaryOpacity:Q=1}=e,{secondaryOpacity:Ae=.4}=e,{swapOpacity:ae=!1}=e,ge,he,Ee;return t.$$set=Fe=>{"class"in Fe&&r(0,i=Fe.class),"id"in Fe&&r(1,o=Fe.id),"style"in Fe&&r(13,u=Fe.style),"icon"in Fe&&r(14,c=Fe.icon),"size"in Fe&&r(15,s=Fe.size),"color"in Fe&&r(2,f=Fe.color),"fw"in Fe&&r(16,y=Fe.fw),"pull"in Fe&&r(17,b=Fe.pull),"scale"in Fe&&r(18,A=Fe.scale),"translateX"in Fe&&r(19,I=Fe.translateX),"translateY"in Fe&&r(20,C=Fe.translateY),"rotate"in Fe&&r(21,N=Fe.rotate),"flip"in Fe&&r(22,F=Fe.flip),"spin"in Fe&&r(3,$=Fe.spin),"pulse"in Fe&&r(4,G=Fe.pulse),"primaryColor"in Fe&&r(5,Z=Fe.primaryColor),"secondaryColor"in Fe&&r(6,ee=Fe.secondaryColor),"primaryOpacity"in Fe&&r(7,Q=Fe.primaryOpacity),"secondaryOpacity"in Fe&&r(8,Ae=Fe.secondaryOpacity),"swapOpacity"in Fe&&r(9,ae=Fe.swapOpacity)},t.$$.update=()=>{t.$$.dirty&16384&&r(10,ge=c&&c.icon||[0,0,"",[],""]),t.$$.dirty&237568&&r(11,he=G9(u,s,b,y)),t.$$.dirty&8126464&&r(12,Ee=W9(A,I,C,N,F,512))},[i,o,f,$,G,Z,ee,Q,Ae,ae,ge,he,Ee,u,c,s,y,b,A,I,C,N,F]}class eo extends pi{constructor(e){super(),mi(this,e,K9,Y9,fi,{class:0,id:1,style:13,icon:14,size:15,color:2,fw:16,pull:17,scale:18,translateX:19,translateY:20,rotate:21,flip:22,spin:3,pulse:4,primaryColor:5,secondaryColor:6,primaryOpacity:7,secondaryOpacity:8,swapOpacity:9})}}var J9={prefix:"fas",iconName:"sort-down",icon:[320,512,["sort-desc"],"f0dd","M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"]},Q9={prefix:"fas",iconName:"arrow-down-up-across-line",icon:[576,512,[],"e4af","M137.4 502.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7V288H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H448V109.3l41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 109.3V224H192 128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96V402.7L86.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96zM128 192h64V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V192zM448 320H384V448c0 17.7 14.3 32 32 32s32-14.3 32-32V320z"]},eS={prefix:"fas",iconName:"table",icon:[512,512,[],"f0ce","M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"]},tS={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},rS={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},iS={prefix:"fas",iconName:"share-nodes",icon:[448,512,["share-alt"],"f1e0","M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z"]},nS={prefix:"fas",iconName:"eye-slash",icon:[640,512,[],"f070","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"]},oS={prefix:"fas",iconName:"bicycle",icon:[640,512,[128690],"f206","M312 32c-13.3 0-24 10.7-24 24s10.7 24 24 24h25.7l34.6 64H222.9l-27.4-38C191 99.7 183.7 96 176 96H120c-13.3 0-24 10.7-24 24s10.7 24 24 24h43.7l22.1 30.7-26.6 53.1c-10-2.5-20.5-3.8-31.2-3.8C57.3 224 0 281.3 0 352s57.3 128 128 128c65.3 0 119.1-48.9 127-112h49c8.5 0 16.3-4.5 20.7-11.8l84.8-143.5 21.7 40.1C402.4 276.3 384 312 384 352c0 70.7 57.3 128 128 128s128-57.3 128-128s-57.3-128-128-128c-13.5 0-26.5 2.1-38.7 6L375.4 48.8C369.8 38.4 359 32 347.2 32H312zM458.6 303.7l32.3 59.7c6.3 11.7 20.9 16 32.5 9.7s16-20.9 9.7-32.5l-32.3-59.7c3.6-.6 7.4-.9 11.2-.9c39.8 0 72 32.2 72 72s-32.2 72-72 72s-72-32.2-72-72c0-18.6 7-35.5 18.6-48.3zM133.2 368h65c-7.3 32.1-36 56-70.2 56c-39.8 0-72-32.2-72-72s32.2-72 72-72c1.7 0 3.4 .1 5.1 .2l-24.2 48.5c-9 18.1 4.1 39.4 24.3 39.4zm33.7-48l50.7-101.3 72.9 101.2-.1 .1H166.8zm90.6-128H365.9L317 274.8 257.4 192z"]},aS={prefix:"fas",iconName:"chart-simple",icon:[448,512,[],"e473","M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80zM0 272c0-26.5 21.5-48 48-48H80c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V272zM368 96h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H368c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48z"]},sS={prefix:"fas",iconName:"person-walking",icon:[320,512,[128694,"walking"],"f554","M160 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM126.5 199.3c-1 .4-1.9 .8-2.9 1.2l-8 3.5c-16.4 7.3-29 21.2-34.7 38.2l-2.6 7.8c-5.6 16.8-23.7 25.8-40.5 20.2s-25.8-23.7-20.2-40.5l2.6-7.8c11.4-34.1 36.6-61.9 69.4-76.5l8-3.5c20.8-9.2 43.3-14 66.1-14c44.6 0 84.8 26.8 101.9 67.9L281 232.7l21.4 10.7c15.8 7.9 22.2 27.1 14.3 42.9s-27.1 22.2-42.9 14.3L247 287.3c-10.3-5.2-18.4-13.8-22.8-24.5l-9.6-23-19.3 65.5 49.5 54c5.4 5.9 9.2 13 11.2 20.8l23 92.1c4.3 17.1-6.1 34.5-23.3 38.8s-34.5-6.1-38.8-23.3l-22-88.1-70.7-77.1c-14.8-16.1-20.3-38.6-14.7-59.7l16.9-63.5zM68.7 398l25-62.4c2.1 3 4.5 5.8 7 8.6l40.7 44.4-14.5 36.2c-2.4 6-6 11.5-10.6 16.1L54.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L68.7 398z"]},lS={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},uS={prefix:"fas",iconName:"left-right",icon:[512,512,[8596,"arrows-alt-h"],"f337","M504.3 273.6c4.9-4.5 7.7-10.9 7.7-17.6s-2.8-13-7.7-17.6l-112-104c-7-6.5-17.2-8.2-25.9-4.4s-14.4 12.5-14.4 22l0 56-192 0 0-56c0-9.5-5.7-18.2-14.4-22s-18.9-2.1-25.9 4.4l-112 104C2.8 243 0 249.3 0 256s2.8 13 7.7 17.6l112 104c7 6.5 17.2 8.2 25.9 4.4s14.4-12.5 14.4-22l0-56 192 0 0 56c0 9.5 5.7 18.2 14.4 22s18.9 2.1 25.9-4.4l112-104z"]},cS={prefix:"fas",iconName:"layer-group",icon:[576,512,[],"f5fd","M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z"]},w8={prefix:"fas",iconName:"up-down-left-right",icon:[512,512,["arrows-alt"],"f0b2","M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8h32v96H128V192c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V288h96v96H192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8H288V288h96v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6v32H288V128h32c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z"]},fS={prefix:"fas",iconName:"circle-question",icon:[512,512,[62108,"question-circle"],"f059","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},hS={prefix:"fas",iconName:"route",icon:[512,512,[],"f4d7","M512 96c0 50.2-59.1 125.1-84.6 155c-3.8 4.4-9.4 6.1-14.5 5H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c53 0 96 43 96 96s-43 96-96 96H139.6c8.7-9.9 19.3-22.6 30-36.8c6.3-8.4 12.8-17.6 19-27.2H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-53 0-96-43-96-96s43-96 96-96h39.8c-21-31.5-39.8-67.7-39.8-96c0-53 43-96 96-96s96 43 96 96zM117.1 489.1c-3.8 4.3-7.2 8.1-10.1 11.3l-1.8 2-.2-.2c-6 4.6-14.6 4-20-1.8C59.8 473 0 402.5 0 352c0-53 43-96 96-96s96 43 96 96c0 30-21.1 67-43.5 97.9c-10.7 14.7-21.7 28-30.8 38.5l-.6 .7zM128 352a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM416 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},dS={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},pS={prefix:"fas",iconName:"floppy-disk",icon:[448,512,[128190,128426,"save"],"f0c7","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V128zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"]},mS={prefix:"fas",iconName:"sort-up",icon:[320,512,["sort-asc"],"f0de","M182.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},l_={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},u_={prefix:"fas",iconName:"ruler",icon:[512,512,[128207],"f545","M177.9 494.1c-18.7 18.7-49.1 18.7-67.9 0L17.9 401.9c-18.7-18.7-18.7-49.1 0-67.9l50.7-50.7 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 50.7-50.7c18.7-18.7 49.1-18.7 67.9 0l92.1 92.1c18.7 18.7 18.7 49.1 0 67.9L177.9 494.1z"]},gS={prefix:"fas",iconName:"file-pdf",icon:[512,512,[],"f1c1","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM176 352h32c30.9 0 56 25.1 56 56s-25.1 56-56 56H192v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V448 368c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24H192v48h16zm96-80h32c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48H304c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H320v96h16zm80-112c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V432 368z"]},yS={prefix:"fas",iconName:"braille",icon:[640,512,[],"f2a1","M0 96a64 64 0 1 1 128 0A64 64 0 1 1 0 96zM224 272a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm0-80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM80 416a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zM0 416a64 64 0 1 1 128 0A64 64 0 1 1 0 416zm240 0a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM64 192a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM224 32a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM352 96a64 64 0 1 1 128 0A64 64 0 1 1 352 96zm240 0a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0A64 64 0 1 1 512 96zm64 176a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm0-80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm16 224a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM416 272a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm0-80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm16 224a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"]},_S={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},vS={prefix:"fas",iconName:"grip-vertical",icon:[320,512,[],"f58e","M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"]},x8={prefix:"fas",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]},k8={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},A8={prefix:"fas",iconName:"stop",icon:[384,512,[9209],"f04d","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"]},bS={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},wS={prefix:"fas",iconName:"car",icon:[512,512,[128664,"automobile"],"f1b9","M135.2 117.4L109.1 192H402.9l-26.1-74.6C372.3 104.6 360.2 96 346.6 96H165.4c-13.6 0-25.7 8.6-30.2 21.4zM39.6 196.8L74.8 96.3C88.3 57.8 124.6 32 165.4 32H346.6c40.8 0 77.1 25.8 90.6 64.3l35.2 100.5c23.2 9.6 39.6 32.5 39.6 59.2V400v48c0 17.7-14.3 32-32 32H448c-17.7 0-32-14.3-32-32V400H96v48c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V400 256c0-26.7 16.4-49.6 39.6-59.2zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},xS={prefix:"fas",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128z"]},kS={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},AS=kS,SS={prefix:"fas",iconName:"copy",icon:[512,512,[],"f0c5","M272 0H396.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H272c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128H192v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z"]},c_={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},ES={prefix:"fas",iconName:"arrow-down-up-lock",icon:[640,512,[],"e4b0","M150.6 502.6l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 402.7V288H416V272c0-17.2 3.9-33.5 10.8-48H352V109.3l41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96c-6-6-14.1-9.4-22.6-9.4s-16.6 3.4-22.6 9.4l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L288 109.3V224l-128 0H96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32H96V402.7L54.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0zM160 192V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V192h64zM288 320V448c0 17.7 14.3 32 32 32s32-14.3 32-32V320H288zm240-80c17.7 0 32 14.3 32 32v48H496V272c0-17.7 14.3-32 32-32zm-80 32v48c-17.7 0-32 14.3-32 32V480c0 17.7 14.3 32 32 32H608c17.7 0 32-14.3 32-32V352c0-17.7-14.3-32-32-32V272c0-44.2-35.8-80-80-80s-80 35.8-80 80z"]},CS={prefix:"fas",iconName:"angle-up",icon:[448,512,[8963],"f106","M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z"]},IS={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},LS={prefix:"fas",iconName:"up-down",icon:[256,512,[8597,11021,"arrows-alt-v"],"f338","M145.6 7.7C141 2.8 134.7 0 128 0s-13 2.8-17.6 7.7l-104 112c-6.5 7-8.2 17.2-4.4 25.9S14.5 160 24 160H80V352H24c-9.5 0-18.2 5.7-22 14.4s-2.1 18.9 4.4 25.9l104 112c4.5 4.9 10.9 7.7 17.6 7.7s13-2.8 17.6-7.7l104-112c6.5-7 8.2-17.2 4.4-25.9s-12.5-14.4-22-14.4H176V160h56c9.5 0 18.2-5.7 22-14.4s2.1-18.9-4.4-25.9l-104-112z"]},f_={prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]},TS={prefix:"fas",iconName:"magnifying-glass-plus",icon:[512,512,["search-plus"],"f00e","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM184 296c0 13.3 10.7 24 24 24s24-10.7 24-24V232h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H232V120c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H120c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"]};function ca(t){"@babel/helpers - typeof";return ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ca(t)}var qu=Uint8Array,Vu=Uint16Array,Tp=Uint32Array,D2=new qu([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),z2=new qu([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ly=new qu([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),S8=function(t,e){for(var r=new Vu(31),i=0;i<31;++i)r[i]=e+=1<>>1|(Ta&21845)<<1;Bf=(Bf&52428)>>>2|(Bf&13107)<<2,Bf=(Bf&61680)>>>4|(Bf&3855)<<4,cy[Ta]=((Bf&65280)>>>8|(Bf&255)<<8)>>>1}var Y0=function(t,e,r){for(var i=t.length,o=0,u=new Vu(e);o>>f]=y}else for(s=new Vu(i),o=0;o>>15-t[o];return s},Jf=new qu(288);for(var Ta=0;Ta<144;++Ta)Jf[Ta]=8;for(var Ta=144;Ta<256;++Ta)Jf[Ta]=9;for(var Ta=256;Ta<280;++Ta)Jf[Ta]=7;for(var Ta=280;Ta<288;++Ta)Jf[Ta]=8;var Pp=new qu(32);for(var Ta=0;Ta<32;++Ta)Pp[Ta]=5;var MS=Y0(Jf,9,0),DS=Y0(Jf,9,1),zS=Y0(Pp,5,0),NS=Y0(Pp,5,1),Fm=function(t){for(var e=t[0],r=1;re&&(e=t[r]);return e},E0=function(t,e,r){var i=e/8>>0;return(t[i]|t[i+1]<<8)>>>(e&7)&r},Bm=function(t,e){var r=e/8>>0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>>(e&7)},h_=function(t){return(t/8>>0)+(t&7&&1)},L8=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t instanceof Vu?Vu:t instanceof Tp?Tp:qu)(r-e);return i.set(t.subarray(e,r)),i},RS=function(t,e,r){var i=t.length,o=!e||r,u=!r||r.i;r||(r={}),e||(e=new qu(i*3));var c=function(Nt){var zt=e.length;if(Nt>zt){var Mt=new qu(Math.max(zt*2,Nt));Mt.set(e),e=Mt}},s=r.f||0,f=r.p||0,y=r.b||0,b=r.l,A=r.d,I=r.m,C=r.n,N=i*8;do{if(!b){r.f=s=E0(t,f,1);var F=E0(t,f+1,3);if(f+=3,F)if(F==1)b=DS,A=NS,I=9,C=5;else if(F==2){var ee=E0(t,f,31)+257,Q=E0(t,f+10,15)+4,Ae=ee+E0(t,f+5,31)+1;f+=14;for(var ae=new qu(Ae),ge=new qu(19),he=0;heN)break;for(var Ce=Y0(ge,Ee,1),he=0;he>>4;if($<16)ae[he++]=$;else{var qe=0,it=0;for($==16?(it=3+E0(t,f,3),f+=2,qe=ae[he-1]):$==17?(it=3+E0(t,f,7),f+=3):$==18&&(it=11+E0(t,f,127),f+=7);it--;)ae[he++]=qe}}var xt=ae.subarray(0,ee),yt=ae.subarray(ee);I=Fm(xt),C=Fm(yt),b=Y0(xt,I,1),A=Y0(yt,C,1)}else throw"invalid block type";else{var $=h_(f)+4,G=t[$-4]|t[$-3]<<8,Z=$+G;if(Z>i){if(u)throw"unexpected EOF";break}o&&c(y+G),e.set(t.subarray($,Z),y),r.b=y+=G,r.p=f=Z*8;continue}if(f>N)throw"unexpected EOF"}o&&c(y+131072);for(var Ge=(1<>>4;if(f+=qe&15,f>N)throw"unexpected EOF";if(!qe)throw"invalid length/literal";if(Xe<256)e[y++]=Xe;else if(Xe==256){b=null;break}else{var wt=Xe-254;if(Xe>264){var he=Xe-257,_e=D2[he];wt=E0(t,f,(1<<_e)-1)+C8[he],f+=_e}var Be=A[Bm(t,f)&ot],ke=Be>>>4;if(!Be)throw"invalid distance";f+=Be&15;var yt=PS[ke];if(ke>3){var _e=z2[ke];yt+=Bm(t,f)&(1<<_e)-1,f+=_e}if(f>N)throw"unexpected EOF";o&&c(y+131072);for(var ft=y+wt;y>0;t[i]|=r,t[i+1]|=r>>>8},ep=function(t,e,r){r<<=e&7;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},jm=function(t,e){for(var r=[],i=0;iI&&(I=u[i].s);var C=new Vu(I+1),N=fy(r[b-1],C,0);if(N>e){var i=0,F=0,$=N-e,G=1<<$;for(u.sort(function(ae,ge){return C[ge.s]-C[ae.s]||ae.f-ge.f});ie)F+=G-(1<>>=$;F>0;){var ee=u[i].s;C[ee]=0&&F;--i){var Q=u[i].s;C[Q]==e&&(--C[Q],++F)}N=e}return[new qu(C),N]},fy=function(t,e,r){return t.s==-1?Math.max(fy(t.l,e,r+1),fy(t.r,e,r+1)):e[t.s]=r},zb=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Vu(++e),i=0,o=t[0],u=1,c=function(f){r[i++]=f},s=1;s<=e;++s)if(t[s]==o&&s!=e)++u;else{if(!o&&u>2){for(;u>138;u-=138)c(32754);u>2&&(c(u>10?u-11<<5|28690:u-3<<5|12305),u=0)}else if(u>3){for(c(o),--u;u>6;u-=6)c(8304);u>2&&(c(u-3<<5|8208),u=0)}for(;u--;)c(o);u=1,o=t[s]}return[r.subarray(0,i),e]},tp=function(t,e){for(var r=0,i=0;i>>8,t[o+2]=t[o]^255,t[o+3]=t[o+1]^255;for(var u=0;u4&&!Fe[ly[Ie-1]];--Ie);var qe=y+5<<3,it=tp(o,Jf)+tp(u,Pp)+c,xt=tp(o,I)+tp(u,F)+c+14+3*Ie+tp(ge,Fe)+(2*ge[16]+3*ge[17]+7*ge[18]);if(qe<=it&&qe<=xt)return Z1(e,b,t.subarray(f,f+y));var yt,Ge,ot,mt;if(gf(e,b,1+(xt15&&(gf(e,b,Be[he]>>>5&127),b+=Be[he]>>>12)}}else yt=MS,Ge=Jf,ot=zS,mt=Pp;for(var he=0;he255){var ke=i[he]>>>18&31;ep(e,b,yt[ke+257]),b+=Ge[ke+257],ke>7&&(gf(e,b,i[he]>>>23&31),b+=D2[ke]);var ft=i[he]&31;ep(e,b,ot[ft]),b+=mt[ft],ft>3&&(ep(e,b,i[he]>>>5&8191),b+=z2[ft])}else ep(e,b,yt[i[he]]),b+=Ge[i[he]];return ep(e,b,yt[256]),b+Ge[256]},OS=new Tp([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),FS=new qu(0),BS=function(t,e,r,i,o,u){var c=t.length,s=new qu(i+c+5*(1+Math.floor(c/7e3))+o),f=s.subarray(i,s.length-o),y=0;if(!e||c<8)for(var b=0;b<=c;b+=65535){var A=b+65535;A>>13,N=I&8191,F=(1<7e3||Fe>24576)&&yt>423){y=Nb(t,f,0,Ae,ae,ge,Ee,Fe,Ie,b-Ie,y),Fe=he=Ee=0,Ie=b;for(var Ge=0;Ge<286;++Ge)ae[Ge]=0;for(var Ge=0;Ge<30;++Ge)ge[Ge]=0}var ot=2,mt=0,Xe=N,wt=it-xt&32767;if(yt>2&&qe==Q(b-wt))for(var _e=Math.min(C,yt)-1,Be=Math.min(32767,b),ke=Math.min(258,yt);wt<=Be&&--Xe&&it!=xt;){if(t[b+ot]==t[b+ot-wt]){for(var ft=0;ftot){if(ot=ft,mt=wt,ft>_e)break;for(var Nt=Math.min(wt,ft-2),zt=0,Ge=0;Gezt&&(zt=_r,xt=Mt)}}}it=xt,xt=$[it],wt+=it-xt+32768&32767}if(mt){Ae[Fe++]=268435456|uy[ot]<<18|Db[mt];var Sr=uy[ot]&31,Qt=Db[mt]&31;Ee+=D2[Sr]+z2[Qt],++ae[257+Sr],++ge[Qt],Ce=b+ot,++he}else Ae[Fe++]=t[b],++ae[t[b]]}}y=Nb(t,f,u,Ae,ae,ge,Ee,Fe,Ie,b-Ie,y),u||(y=Z1(f,y,FS))}return L8(s,0,i+h_(y)+o)},jS=function(){var t=1,e=0;return{p:function(r){for(var i=t,o=e,u=r.length,c=0;c!=u;){for(var s=Math.min(c+5552,u);c>>8<<16|(e&255)<<8|e>>>8)+((t&255)<<23)*2}}},US=function(t,e,r,i,o){return BS(t,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):12+e.mem,r,i,!o)},qS=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},VS=function(t,e){var r=e.level,i=r==0?0:r<6?1:r==9?3:2;t[0]=120,t[1]=i<<6|(i?32-2*i:1)},HS=function(t){if((t[0]&15)!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(t[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function hy(t,e){e===void 0&&(e={});var r=jS();r.p(t);var i=US(t,e,2,4);return VS(i,e),qS(i,i.length-4,r.d()),i}function $S(t,e){return RS((HS(t),t.subarray(2,-4)),e)}var Wn=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function Um(){Wn.console&&typeof Wn.console.log=="function"&&Wn.console.log.apply(Wn.console,arguments)}var ya={log:Um,warn:function(t){Wn.console&&(typeof Wn.console.warn=="function"?Wn.console.warn.apply(Wn.console,arguments):Um.call(null,arguments))},error:function(t){Wn.console&&(typeof Wn.console.error=="function"?Wn.console.error.apply(Wn.console,arguments):Um(t))}};function qm(t,e,r){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){ch(i.response,e,r)},i.onerror=function(){ya.error("could not download file")},i.send()}function Rb(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function C1(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var pp,dy,ch=Wn.saveAs||((typeof window>"u"?"undefined":ca(window))!=="object"||window!==Wn?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,e,r){var i=Wn.URL||Wn.webkitURL,o=document.createElement("a");e=e||t.name||"download",o.download=e,o.rel="noopener",typeof t=="string"?(o.href=t,o.origin!==location.origin?Rb(o.href)?qm(t,e,r):C1(o,o.target="_blank"):C1(o)):(o.href=i.createObjectURL(t),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){C1(o)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,r){if(e=e||t.name||"download",typeof t=="string")if(Rb(t))qm(t,e,r);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){C1(i)})}else navigator.msSaveOrOpenBlob(function(o,u){return u===void 0?u={autoBom:!1}:ca(u)!=="object"&&(ya.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob([String.fromCharCode(65279),o],{type:o.type}):o}(t,r),e)}:function(t,e,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof t=="string")return qm(t,e,r);var o=t.type==="application/octet-stream",u=/constructor/i.test(Wn.HTMLElement)||Wn.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||o&&u)&&(typeof FileReader>"u"?"undefined":ca(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var b=s.result;b=c?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=b:location=b,i=null},s.readAsDataURL(t)}else{var f=Wn.URL||Wn.webkitURL,y=f.createObjectURL(t);i?i.location=y:location.href=y,i=null,setTimeout(function(){f.revokeObjectURL(y)},4e4)}});/** + `,this._cooperativeGesturesScreen.setAttribute("aria-hidden","true"),this._canvasContainer.addEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.add("maplibregl-cooperative-gestures")}_destroyCooperativeGestures(){y.remove(this._cooperativeGesturesScreen),this._canvasContainer.removeEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.remove("maplibregl-cooperative-gestures")}_resizeCanvas(R,p,k){this._canvas.width=Math.floor(k*R),this._canvas.height=Math.floor(k*p),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${p}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let p=null;this._canvas.addEventListener("webglcontextcreationerror",L=>{p={requestedAttributes:R},L&&(p.statusMessage=L.statusMessage,p.type=L.type)},{once:!0});const k=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!k){const L="Failed to initialize WebGL";throw p?(p.message=L,new Error(JSON.stringify(p))):new Error(L)}this.painter=new Va(k,this.transform),b.testSupport(k)}_onCooperativeGesture(R,p,k){return!p&&k<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout(()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")},100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const p=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let k=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const z=this.transform.zoom,j=s.browser.now();this.style.zoomHistory.update(z,j);const Y=new s.EvaluationParameters(z,{now:j,fadeDuration:p,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),te=Y.crossFadingFactor();te===1&&te===this._crossFadingFactor||(k=!0,this._crossFadingFactor=te),this.style.update(Y)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform._minEleveationForCurrentTile=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._minEleveationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,p,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:p,showPadding:this.showPadding}),this.fire(new s.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,s.PerformanceUtils.mark(s.PerformanceMarkers.load),this.fire(new s.Event("load"))),this.style&&(this.style.hasTransitions()||k)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const L=this._sourcesDirty||this._styleDirty||this._placementDirty;return L||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new s.Event("idle")),!this._loaded||this._fullyLoaded||L||(this._fullyLoaded=!0,s.PerformanceUtils.mark(s.PerformanceMarkers.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const k of this._controls)k.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),$.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const p=this.painter.context.gl.getExtension("WEBGL_lose_context");p&&p.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),y.remove(this._canvasContainer),y.remove(this._controlContainer),this._cooperativeGestures&&this._destroyCooperativeGestures(),this._container.classList.remove("maplibregl-map"),s.PerformanceUtils.clearMetrics(),this._removed=!0,this.fire(new s.Event("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=s.browser.frame(R=>{s.PerformanceUtils.frame(R),this._frame=null,this._render(R)}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Jo}getCameraTargetElevation(){return this.transform.elevation}},uo.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const p=this._map.getZoom(),k=p===this._map.getMaxZoom(),L=p===this._map.getMinZoom();this._zoomInButton.disabled=k,this._zoomOutButton.disabled=L,this._zoomInButton.setAttribute("aria-disabled",k.toString()),this._zoomOutButton.setAttribute("aria-disabled",L.toString())},this._rotateCompassArrow=()=>{const p=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=p},this._setButtonTitle=(p,k)=>{const L=this._map._getUIString(`NavigationControl.${k}`);p.title=L,p.setAttribute("aria-label",L)},this.options=s.extend({},Qu,R),this._container=y.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",p=>p.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",p=>this._map.zoomIn({},{originalEvent:p})),y.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",p=>this._map.zoomOut({},{originalEvent:p})),y.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",p=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:p}):this._map.resetNorth({},{originalEvent:p})}),this._compassIcon=y.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new As(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){y.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(R,p){const k=y.create("button",R,this._container);return k.type="button",k.addEventListener("click",p),k}},uo.GeolocateControl=class extends s.Evented{constructor(R){super(),this._onSuccess=p=>{if(this._map){if(this._isOutOfMapMaxBounds(p))return this._setErrorState(),this.fire(new s.Event("outofmaxbounds",p)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=p,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(p),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(p),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new s.Event("geolocate",p)),this._finish()}},this._updateCamera=p=>{const k=new s.LngLat(p.coords.longitude,p.coords.latitude),L=p.coords.accuracy,z=this._map.getBearing(),j=s.extend({bearing:z},this.options.fitBoundsOptions),Y=ke.fromLngLat(k,L);this._map.fitBounds(Y,j,{geolocateSource:!0})},this._updateMarker=p=>{if(p){const k=new s.LngLat(p.coords.longitude,p.coords.latitude);this._accuracyCircleMarker.setLngLat(k).addTo(this._map),this._userLocationDotMarker.setLngLat(k).addTo(this._map),this._accuracy=p.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=p=>{if(this._map){if(this.options.trackUserLocation)if(p.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const k=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=k,this._geolocateButton.setAttribute("aria-label",k),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(p.code===3&&Su)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new s.Event("error",p)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=p=>{if(this._map){if(this._container.addEventListener("contextmenu",k=>k.preventDefault()),this._geolocateButton=y.create("button","maplibregl-ctrl-geolocate",this._container),y.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",p===!1){s.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const k=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=k,this._geolocateButton.setAttribute("aria-label",k)}else{const k=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=k,this._geolocateButton.setAttribute("aria-label",k)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=y.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ia({element:this._dotElement}),this._circleElement=y.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ia({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",k=>{k.geolocateSource||this._watchState!=="ACTIVE_LOCK"||k.originalEvent&&k.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new s.Event("trackuserlocationend")))})}},this.options=s.extend({},rs,R)}onAdd(R){return this._map=R,this._container=y.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(p,k=!1){aa===void 0||k?window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(L=>{aa=L.state!=="denied",p(aa)}).catch(()=>{aa=!!window.navigator.geolocation,p(aa)}):(aa=!!window.navigator.geolocation,p(aa)):p(aa)}(this._setupUI),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(),y.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ec=0,Su=!1}_isOutOfMapMaxBounds(R){const p=this._map.getMaxBounds(),k=R.coords;return p&&(k.longitudep.getEast()||k.latitudep.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 R=this._map.getBounds(),p=R.getSouthEast(),k=R.getNorthEast(),L=p.distanceTo(k),z=Math.ceil(this._accuracy/(L/this._map._container.clientHeight)*2);this._circleElement.style.width=`${z}px`,this._circleElement.style.height=`${z}px`}trigger(){if(!this._setup)return s.warnOnce("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 s.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ec--,Su=!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 s.Event("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 s.Event("trackuserlocationstart"));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 R;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ec++,ec>1?(R={maximumAge:6e5,timeout:0},Su=!0):(R=this.options.positionOptions,Su=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,R)}}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)}},uo.AttributionControl=Zi,uo.LogoControl=ln,uo.ScaleControl=class{constructor(R){this._onMove=()=>{Ga(this._map,this._container,this.options)},this.setUnit=p=>{this.options.unit=p,Ga(this._map,this._container,this.options)},this.options=s.extend({},Mc,R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=y.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){y.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},uo.FullscreenControl=class extends s.Evented{constructor(R={}){super(),this._onFullscreenChange=()=>{(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,R&&R.container&&(R.container instanceof HTMLElement?this._container=R.container:s.warnOnce("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(R){return this._map=R,this._container||(this._container=this._map.getContainer()),this._controlContainer=y.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){y.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const R=this._fullscreenButton=y.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);y.create("span","maplibregl-ctrl-icon",R).setAttribute("aria-hidden","true"),R.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const R=this._getTitle();this._fullscreenButton.setAttribute("aria-label",R),this._fullscreenButton.title=R}_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 s.Event("fullscreenstart")),this._map._cooperativeGestures&&(this._prevCooperativeGestures=this._map._cooperativeGestures,this._map.setCooperativeGestures())):(this.fire(new s.Event("fullscreenend")),this._prevCooperativeGestures&&(this._map.setCooperativeGestures(this._prevCooperativeGestures),delete this._prevCooperativeGestures))}_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()}},uo.TerrainControl=class{constructor(R){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))},this.options=R}onAdd(R){return this._map=R,this._container=y.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=y.create("button","maplibregl-ctrl-terrain",this._container),y.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(){y.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},uo.Popup=class extends s.Evented{constructor(R){super(),this.remove=()=>(this._content&&y.remove(this._content),this._container&&(y.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),delete this._map),this.fire(new s.Event("close")),this),this._onMouseUp=p=>{this._update(p.point)},this._onMouseMove=p=>{this._update(p.point)},this._onDrag=p=>{this._update(p.point)},this._update=p=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=y.create("div","maplibregl-popup",this._map.getContainer()),this._tip=y.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Y of this.options.className.split(" "))this._container.classList.add(Y);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=Ss(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!p)return;const k=this._pos=this._trackPointer&&p?p:this._map.project(this._lngLat);let L=this.options.anchor;const z=Eu(this.options.offset);if(!L){const Y=this._container.offsetWidth,te=this._container.offsetHeight;let se;se=k.y+z.bottom.ythis._map.transform.height-te?["bottom"]:[],k.xthis._map.transform.width-Y/2&&se.push("right"),L=se.length===0?"bottom":se.join("-")}const j=k.add(z[L]).round();y.setTransform(this._container,`${Pc[L]} translate(${j.x}px,${j.y}px)`),Al(this._container,L,"popup")},this._onClose=()=>{this.remove()},this.options=s.extend(Object.create(Dc),R)}addTo(R){return this._map&&this.remove(),this._map=R,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 s.Event("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(R){return this._lngLat=s.LngLat.convert(R),this._pos=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._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(R){return this.setDOMContent(document.createTextNode(R))}setHTML(R){const p=document.createDocumentFragment(),k=document.createElement("body");let L;for(k.innerHTML=R;L=k.firstChild,L;)p.appendChild(L);return this.setDOMContent(p)}getMaxWidth(){var R;return(R=this._container)===null||R===void 0?void 0:R.style.maxWidth}setMaxWidth(R){return this.options.maxWidth=R,this._update(),this}setDOMContent(R){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=y.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(R),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(R){this._container&&this._container.classList.add(R)}removeClassName(R){this._container&&this._container.classList.remove(R)}setOffset(R){return this.options.offset=R,this._update(),this}toggleClassName(R){if(this._container)return this._container.classList.toggle(R)}_createCloseButton(){this.options.closeButton&&(this._closeButton=y.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const R=this._container.querySelector(e0);R&&R.focus()}},uo.Marker=Ia,uo.Style=tl,uo.LngLat=s.LngLat,uo.LngLatBounds=ke,uo.Point=s.Point,uo.MercatorCoordinate=s.MercatorCoordinate,uo.Evented=s.Evented,uo.AJAXError=s.AJAXError,uo.config=s.config,uo.CanvasSource=It,uo.GeoJSONSource=Jt,uo.ImageSource=Sr,uo.RasterDEMTileSource=Mt,uo.RasterTileSource=zt,uo.VectorTileSource=Nt,uo.VideoSource=Qt,uo.setRTLTextPlugin=s.setRTLTextPlugin,uo.getRTLTextPluginStatus=s.getRTLTextPluginStatus,uo.prewarm=function(){Wi().acquire(Rr)},uo.clearPrewarmedResources=function(){const R=un;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(Rr),un=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()"))},tc.extend(uo,{isSafari:s.isSafari,getPerformanceMetrics:s.PerformanceUtils.getPerformanceMetrics}),uo});var c=o;return c})})(a8);var sc=a8.exports;const ny=M2(sc);var ju=(t,e,r)=>new Promise((i,o)=>{var u=f=>{try{s(r.next(f))}catch(y){o(y)}},c=f=>{try{s(r.throw(f))}catch(y){o(y)}},s=f=>f.done?i(f.value):Promise.resolve(f.value).then(u,c);s((r=r.apply(t,e)).next())}),Gc=Uint8Array,id=Uint16Array,e9=Int32Array,l8=new Gc([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),u8=new Gc([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),t9=new Gc([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c8=function(t,e){for(var r=new id(31),i=0;i<31;++i)r[i]=e+=1<>1|(ra&21845)<<1,mf=(mf&52428)>>2|(mf&13107)<<2,mf=(mf&61680)>>4|(mf&3855)<<4,oy[ra]=((mf&65280)>>8|(mf&255)<<8)>>1;var mf,ra,dp=function(t,e,r){for(var i=t.length,o=0,u=new id(e);o>f]=y}else for(s=new id(i),o=0;o>15-t[o]);return s},Yp=new Gc(288);for(ra=0;ra<144;++ra)Yp[ra]=8;var ra;for(ra=144;ra<256;++ra)Yp[ra]=9;var ra;for(ra=256;ra<280;++ra)Yp[ra]=7;var ra;for(ra=280;ra<288;++ra)Yp[ra]=8;var ra,d8=new Gc(32);for(ra=0;ra<32;++ra)d8[ra]=5;var ra,o9=dp(Yp,9,1),a9=dp(d8,5,1),Rm=function(t){for(var e=t[0],r=1;re&&(e=t[r]);return e},A0=function(t,e,r){var i=e/8|0;return(t[i]|t[i+1]<<8)>>(e&7)&r},Om=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},s9=function(t){return(t+7)/8|0},l9=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new Gc(r-e);return i.set(t.subarray(e,r)),i},u9=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Hc=function(t,e,r){var i=new Error(e||u9[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,Hc),!r)throw i;return i},s_=function(t,e,r,i){var o=t.length,u=i?i.length:0;if(!o||e.f&&!e.l)return r||new Gc(0);var c=!r||e.i!=2,s=e.i;r||(r=new Gc(o*3));var f=function(_r){var Sr=r.length;if(_r>Sr){var Qt=new Gc(Math.max(Sr*2,_r));Qt.set(r),r=Qt}},y=e.f||0,b=e.p||0,A=e.b||0,I=e.l,C=e.d,N=e.m,F=e.n,$=o*8;do{if(!I){y=A0(t,b,1);var G=A0(t,b+1,3);if(b+=3,G)if(G==1)I=o9,C=a9,N=9,F=5;else if(G==2){var Ae=A0(t,b,31)+257,ae=A0(t,b+10,15)+4,ge=Ae+A0(t,b+5,31)+1;b+=14;for(var he=new Gc(ge),Ee=new Gc(19),Fe=0;Fe>4;if(Z<16)he[Fe++]=Z;else{var xt=0,yt=0;for(Z==16?(yt=3+A0(t,b,3),b+=2,xt=he[Fe-1]):Z==17?(yt=3+A0(t,b,7),b+=3):Z==18&&(yt=11+A0(t,b,127),b+=7);yt--;)he[Fe++]=xt}}var Ge=he.subarray(0,Ae),ot=he.subarray(Ae);N=Rm(Ge),F=Rm(ot),I=dp(Ge,N,1),C=dp(ot,F,1)}else Hc(1);else{var Z=s9(b)+4,ee=t[Z-4]|t[Z-3]<<8,Q=Z+ee;if(Q>o){s&&Hc(0);break}c&&f(A+ee),r.set(t.subarray(Z,Q),A),e.b=A+=ee,e.p=b=Q*8,e.f=y;continue}if(b>$){s&&Hc(0);break}}c&&f(A+131072);for(var mt=(1<>4;if(b+=xt&15,b>$){s&&Hc(0);break}if(xt||Hc(2),_e<256)r[A++]=_e;else if(_e==256){wt=b,I=null;break}else{var Be=_e-254;if(_e>264){var Fe=_e-257,ke=l8[Fe];Be=A0(t,b,(1<>4;ft||Hc(3),b+=ft&15;var ot=n9[Nt];if(Nt>3){var ke=u8[Nt];ot+=Om(t,b)&(1<$){s&&Hc(0);break}c&&f(A+131072);var zt=A+Be;if(A>3&1)+(e>>4&1);i>0;i-=!t[r++]);return r+(e&2)},h9=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},d9=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&Hc(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&Hc(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function p9(t,e){return s_(t,{i:2},e&&e.out,e&&e.dictionary)}function m9(t,e){var r=f9(t);return r+8>t.length&&Hc(6,"invalid gzip data"),s_(t.subarray(r,-8),{i:2},e&&e.out||new Gc(h9(t)),e&&e.dictionary)}function g9(t,e){return s_(t.subarray(d9(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function ay(t,e){return t[0]==31&&t[1]==139&&t[2]==8?m9(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?p9(t,e):g9(t,e)}var y9=typeof TextDecoder<"u"&&new TextDecoder,_9=0;try{y9.decode(c9,{stream:!0}),_9=1}catch{}var p8=(t,e)=>t*Math.pow(2,e),Jd=(t,e)=>Math.floor(t/Math.pow(2,e)),s2=(t,e)=>p8(t.getUint16(e+1,!0),8)+t.getUint8(e),m8=(t,e)=>p8(t.getUint32(e+2,!0),16)+t.getUint16(e,!0),v9=(t,e,r,i,o)=>{if(t!=i.getUint8(o))return t-i.getUint8(o);const u=s2(i,o+1);if(e!=u)return e-u;const c=s2(i,o+4);return r!=c?r-c:0},b9=(t,e,r,i)=>{const o=g8(t,e|128,r,i);return o?{z:e,x:r,y:i,offset:o[0],length:o[1],is_dir:!0}:null},wb=(t,e,r,i)=>{const o=g8(t,e,r,i);return o?{z:e,x:r,y:i,offset:o[0],length:o[1],is_dir:!1}:null},g8=(t,e,r,i)=>{let o=0,u=t.byteLength/17-1;for(;o<=u;){const c=u+o>>1,s=v9(e,r,i,t,c*17);if(s>0)o=c+1;else if(s<0)u=c-1;else return[m8(t,c*17+7),t.getUint32(c*17+13,!0)]}return null},w9=(t,e)=>t.is_dir&&!e.is_dir?1:!t.is_dir&&e.is_dir?-1:t.z!==e.z?t.z-e.z:t.x!==e.x?t.x-e.x:t.y-e.y,y8=(t,e)=>{const r=t.getUint8(e*17);return{z:r&127,x:s2(t,e*17+1),y:s2(t,e*17+4),offset:m8(t,e*17+7),length:t.getUint32(e*17+13,!0),is_dir:r>>7===1}},xb=t=>{const e=[],r=new DataView(t);for(let i=0;i{t.sort(w9);const e=new ArrayBuffer(17*t.length),r=new Uint8Array(e);for(let i=0;i>8&255,r[i*17+3]=o.x>>16&255,r[i*17+4]=o.y&255,r[i*17+5]=o.y>>8&255,r[i*17+6]=o.y>>16&255,r[i*17+7]=o.offset&255,r[i*17+8]=Jd(o.offset,8)&255,r[i*17+9]=Jd(o.offset,16)&255,r[i*17+10]=Jd(o.offset,24)&255,r[i*17+11]=Jd(o.offset,32)&255,r[i*17+12]=Jd(o.offset,48)&255,r[i*17+13]=o.length&255,r[i*17+14]=o.length>>8&255,r[i*17+15]=o.length>>16&255,r[i*17+16]=o.length>>24&255}return e},k9=(t,e)=>{if(t.byteLength<17)return null;const r=t.byteLength/17,i=y8(t,r-1);if(i.is_dir){const o=i.z,u=e.z-o,c=Math.trunc(e.x/(1<{if(t.type=="json"){const r=t.url.substr(10);let i=this.tiles.get(r);return i||(i=new kb(r),this.tiles.set(r,i)),i.getHeader().then(o=>{const u={tiles:[t.url+"/{z}/{x}/{y}"],minzoom:o.minZoom,maxzoom:o.maxZoom,bounds:[o.minLon,o.minLat,o.maxLon,o.maxLat]};e(null,u,null,null)}).catch(o=>{e(o,null,null,null)}),{cancel:()=>{}}}else{const r=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),i=t.url.match(r);if(!i)throw new Error("Invalid PMTiles protocol URL");const o=i[1];let u=this.tiles.get(o);u||(u=new kb(o),this.tiles.set(o,u));const c=i[2],s=i[3],f=i[4],y=new AbortController,b=y.signal;let A=()=>{y.abort()};return u.getHeader().then(I=>{u.getZxy(+c,+s,+f,b).then(C=>{C?e(null,new Uint8Array(C.data),C.cacheControl,C.expires):I.tileType==1?e(null,new Uint8Array,null,null):e(null,null,null,null)}).catch(C=>{C.name!=="AbortError"&&e(C,null,null,null)})}),{cancel:A}}},this.tiles=new Map}add(t){this.tiles.set(t.source.getKey(),t)}get(t){return this.tiles.get(t)}};function qh(t,e){return(e>>>0)*4294967296+(t>>>0)}function C9(t,e){const r=e.buf;let i,o;if(o=r[e.pos++],i=(o&112)>>4,o<128||(o=r[e.pos++],i|=(o&127)<<3,o<128)||(o=r[e.pos++],i|=(o&127)<<10,o<128)||(o=r[e.pos++],i|=(o&127)<<17,o<128)||(o=r[e.pos++],i|=(o&127)<<24,o<128)||(o=r[e.pos++],i|=(o&1)<<31,o<128))return qh(t,i);throw new Error("Expected varint not more than 10 bytes")}function Qd(t){const e=t.buf;let r,i;return i=e[t.pos++],r=i&127,i<128||(i=e[t.pos++],r|=(i&127)<<7,i<128)||(i=e[t.pos++],r|=(i&127)<<14,i<128)||(i=e[t.pos++],r|=(i&127)<<21,i<128)?r:(i=e[t.pos],r|=(i&15)<<28,C9(r,t))}function I9(t,e,r,i){if(i==0){r==1&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const o=e[0];e[0]=e[1],e[1]=o}}var L9=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function T9(t,e,r){if(t>26)throw Error("Tile zoom level exceeds max safe number limit (26)");if(e>Math.pow(2,t)-1||r>Math.pow(2,t)-1)throw Error("tile x/y outside zoom level bounds");const i=L9[t],o=Math.pow(2,t);let u=0,c=0,s=0;const f=[e,r];let y=o/2;for(;y>0;)u=(f[0]&y)>0?1:0,c=(f[1]&y)>0?1:0,s+=y*y*(3*u^c),I9(y,f,u,c),y=y/2;return i+s}function v8(t,e){return ju(this,null,function*(){if(e===1||e===0)return t;if(e===2){if(typeof globalThis.DecompressionStream>"u")return ay(new Uint8Array(t));{let i=new Response(t).body.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(i).arrayBuffer()}}else throw Error("Compression method not supported")})}var P9=127;function M9(t,e){let r=0,i=t.length-1;for(;r<=i;){const o=i+r>>1,u=e-t[o].tileId;if(u>0)r=o+1;else if(u<0)i=o-1;else return t[o]}return i>=0&&(t[i].runLength===0||e-t[i].tileId=300)throw Error("Bad response code: "+o.status);const u=o.headers.get("Content-Length");if(o.status===200&&(!u||+u>e))throw i&&i.abort(),Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield o.arrayBuffer(),etag:o.headers.get("ETag")||void 0,cacheControl:o.headers.get("Cache-Control")||void 0,expires:o.headers.get("Expires")||void 0}})}};function S0(t,e){const r=t.getUint32(e+4,!0),i=t.getUint32(e+0,!0);return r*Math.pow(2,32)+i}function z9(t,e){const r=new DataView(t),i=r.getUint8(7);if(i>3)throw Error(`Archive is spec version ${i} but this library supports up to spec version 3`);return{specVersion:i,rootDirectoryOffset:S0(r,8),rootDirectoryLength:S0(r,16),jsonMetadataOffset:S0(r,24),jsonMetadataLength:S0(r,32),leafDirectoryOffset:S0(r,40),leafDirectoryLength:S0(r,48),tileDataOffset:S0(r,56),tileDataLength:S0(r,64),numAddressedTiles:S0(r,72),numTileEntries:S0(r,80),numTileContents:S0(r,88),clustered:r.getUint8(96)===1,internalCompression:r.getUint8(97),tileCompression:r.getUint8(98),tileType:r.getUint8(99),minZoom:r.getUint8(100),maxZoom:r.getUint8(101),minLon:r.getInt32(102,!0)/1e7,minLat:r.getInt32(106,!0)/1e7,maxLon:r.getInt32(110,!0)/1e7,maxLat:r.getInt32(114,!0)/1e7,centerZoom:r.getUint8(118),centerLon:r.getInt32(119,!0)/1e7,centerLat:r.getInt32(123,!0)/1e7,etag:e}}function b8(t){const e={buf:new Uint8Array(t),pos:0},r=Qd(e),i=[];let o=0;for(let u=0;u0?i[u].offset=i[u-1].offset+i[u-1].length:i[u].offset=c-1}return i}function N9(t){const e=new DataView(t);return e.getUint16(2,!0)===2?(console.warn("PMTiles spec version 2 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),2):e.getUint16(2,!0)===1?(console.warn("PMTiles spec version 1 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),1):3}var nd=class extends Error{};function R9(t,e,r,i){return ju(this,null,function*(){const o=yield t.getBytes(0,16384);if(new DataView(o.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");if(N9(o.data)<3)return[yield _8.getHeader(t)];const c=o.data.slice(0,P9);let s=o.etag;i&&o.etag!=i&&(console.warn("ETag conflict detected; your HTTP server might not support content-based ETag headers. ETags disabled for "+t.getKey()),s=void 0);const f=z9(c,s);if(r){const y=o.data.slice(f.rootDirectoryOffset,f.rootDirectoryOffset+f.rootDirectoryLength),b=t.getKey()+"|"+(f.etag||"")+"|"+f.rootDirectoryOffset+"|"+f.rootDirectoryLength,A=b8(yield e(y,f.internalCompression));return[f,[b,A.length,A]]}return[f,void 0]})}function O9(t,e,r,i,o){return ju(this,null,function*(){const u=yield t.getBytes(r,i);if(o.etag&&o.etag!==u.etag)throw new nd(u.etag);const c=yield e(u.data,o.internalCompression),s=b8(c);if(s.length===0)throw new Error("Empty directory is invalid");return s})}var F9=class{constructor(t=100,e=!0,r=v8){this.cache=new Map,this.maxCacheEntries=t,this.counter=1,this.prefetch=e,this.decompress=r}getHeader(t,e){return ju(this,null,function*(){const r=t.getKey();if(this.cache.has(r))return this.cache.get(r).lastUsed=this.counter++,yield this.cache.get(r).data;const i=new Promise((o,u)=>{R9(t,this.decompress,this.prefetch,e).then(c=>{c[1]&&this.cache.set(c[1][0],{lastUsed:this.counter++,data:Promise.resolve(c[1][2])}),o(c[0]),this.prune()}).catch(c=>{u(c)})});return this.cache.set(r,{lastUsed:this.counter++,data:i}),i})}getDirectory(t,e,r,i){return ju(this,null,function*(){const o=t.getKey()+"|"+(i.etag||"")+"|"+e+"|"+r;if(this.cache.has(o))return this.cache.get(o).lastUsed=this.counter++,yield this.cache.get(o).data;const u=new Promise((c,s)=>{O9(t,this.decompress,e,r,i).then(f=>{c(f),this.prune()}).catch(f=>{s(f)})});return this.cache.set(o,{lastUsed:this.counter++,data:u}),u})}getArrayBuffer(t,e,r,i){return ju(this,null,function*(){const o=t.getKey()+"|"+(i.etag||"")+"|"+e+"|"+r;if(this.cache.has(o))return this.cache.get(o).lastUsed=this.counter++,yield this.cache.get(o).data;const u=new Promise((c,s)=>{t.getBytes(e,r).then(f=>{if(i.etag&&i.etag!==f.etag)throw new nd(f.etag);c(f.data),this.cache.has(o),this.prune()}).catch(f=>{s(f)})});return this.cache.set(o,{lastUsed:this.counter++,data:u}),u})}prune(){if(this.cache.size>=this.maxCacheEntries){let t=1/0,e;this.cache.forEach((r,i)=>{r.lastUsedu.maxZoom)return;let c=u.rootDirectoryOffset,s=u.rootDirectoryLength;for(let f=0;f<=3;f++){const y=yield this.cache.getDirectory(this.source,c,s,u),b=M9(y,o);if(b)if(b.runLength>0){const A=yield this.source.getBytes(u.tileDataOffset+b.offset,b.length,i);if(u.etag&&u.etag!==A.etag)throw new nd(A.etag);return{data:yield this.decompress(A.data,u.tileCompression),cacheControl:A.cacheControl,expires:A.expires}}else c=u.leafDirectoryOffset+b.offset,s=b.length;else return}throw Error("Maximum directory depth exceeded")})}getZxy(t,e,r,i){return ju(this,null,function*(){try{return yield this.getZxyAttempt(t,e,r,i)}catch(o){if(o instanceof nd)return this.cache.invalidate(this.source,o.message),yield this.getZxyAttempt(t,e,r,i);throw o}})}getMetadataAttempt(){return ju(this,null,function*(){const t=yield this.cache.getHeader(this.source),e=yield this.source.getBytes(t.jsonMetadataOffset,t.jsonMetadataLength);if(t.etag&&t.etag!==e.etag)throw new nd(e.etag);const r=yield this.decompress(e.data,t.internalCompression),i=new TextDecoder("utf-8");return JSON.parse(i.decode(r))})}getMetadata(){return ju(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(t){if(t instanceof nd)return this.cache.invalidate(this.source,t.message),yield this.getMetadataAttempt();throw t}})}};const Bu=Is(null),Lp=Is(null),Po={title:"WASAC Rural Water Network",url:"https://wasac.rw",logo:"https://raw.githubusercontent.com/wasac/logo/main/logo.png",basePath:"",attribution:"©WASAC,Ltd.",styles:[{title:"OSM",uri:"https://wasac.github.io/mapbox-stylefiles/unvt/style.json"},{title:"OSM (Open Building)",uri:"https://wasac.github.io/mapbox-stylefiles/unvt/style-buildings.json"},{title:"Bing Aerial",uri:"https://wasac.github.io/mapbox-stylefiles/unvt/style-aerial.json"}],center:[30.0291,-2.0032],zoom:9,search:{url:"https://wasac.github.io/vt/wss.geojson",target:["wss_name","district","po_name"],format:t=>`${t.wss_id}-${t.wss_name}, ${t.po_name}, ${t.district}`,place_type:["wss"],placeholder:"Search WSS/PO/District",limit:10,zoom:13},popup:{target:["handpump","improvedspring","dugwell","solarpump","otherwaterpoint","household","publictap","waterkiosk","industrial","institution","other connection","chamber","reservoir","pumping-station","watersource","pipeline","wss","pg-building","uwss-customers","uwss-fire-hydrant","uwss-manhole","uwss_pipeline_annotation","uwss_pipeline","uwss-pumping-station","uwss-reservoir","uwss-valve","uwss-water-meter","uwss-water-treatment-plant","uwss-watersource","ecd_point","health_facility_point","school_point","office_point"]},legend:{targets:{village:"Village","village-annotation":"Village Label",cell:"Cell","cell-annotation":"Cell Label",sector:"Sector","sector-annotation":"Sector Label",district:"District","district-annotation":"District Label",wss:"WSS","wss-annotation":"WSS Label",pipeline:"Pipeline",pipeline_annotation:"Pipeline Label",watersource:"Water Source",reservoir:"Reservoir","pumping-station":"Pumping Station",chamber:"Chamber",household:"Household",publictap:"Public Tap",waterkiosk:"Water Kiosk",industrial:"Industrial",institution:"Institution","other connection":"Other connection",handpump:"Hand Pump",improvedspring:"Improved Spring",dugwell:"Dug well",solarpump:"Solar Pump",otherwaterpoint:"Other water point",parcels:"Parcels",parcels_annotation:"Parcels Label","contour-line":"Countour","contour-label":"Contour Label",hillshade:"Hillshade","uwss-customers":"Customers (Urban)","uwss-fire-hydrant":"Fire hydrant (Urban)","uwss-manhole":"Manhole (Urban)",uwss_pipeline_annotation:"Pipeline Label (Urban)",uwss_pipeline:"Pipeline (Urban)","uwss-pumping-station":"Pump (Urban)","uwss-reservoir":"Reservoir (Urban)","uwss-valve":"Valve (Urban)","uwss-water-meter":"Water meter (Urban)","uwss-water-treatment-plant":"Water treatment plant (Urban)","uwss-watersource":"Water source (Urban)",ecd:"Early Children Development Center (building)",ecd_point:"Early Children Development Center",ecd_point_anotation:"Early Children Development Center (label)",health_facility:"Health facility (building)",health_facility_point:"Health facility",health_facility_point_anotation:"Health facility (label)",school:"School (building)",school_point:"School",school_point_anotation:"School (label)",office:"Office (building)",office_point:"Office",office_point_anotation:"Office (label)"}},elevation:{url:"https://wasac.github.io/rw-terrain/tiles/{z}/{x}/{y}.png",options:{tileSize:512,font:["Roboto Medium"],fontSize:12,fontHalo:1,mainColor:"#263238",haloColor:"#fff",units:"kilometers"}},valhalla:{url:"https://valhalla.water-gis.com",isoChroneOptions:{Contours:[{time:3,distance:1,color:"ff0000"},{time:5,distance:2,color:"ffff00"},{time:10,distance:3,color:"0000ff"},{time:15,distance:4,color:"ff00ff"}],isochrone:{font:["Roboto Medium"],fontSize:14,fontHalo:3,fontColor:"#263238",fontHaloColor:"#fff"}},routingOptions:{font:["Roboto Medium"],fontSize:14,fontHalo:3,fontColor:"#263238",fontHaloColor:"#fff",iconImage:"marker",iconSize:1}},terrain:{source:"rwanda-dem",exaggeration:1},attributeTable:{rowsPerPage:50,minZoom:14},adminBoundary:{url:"https://wasac.github.io/rw-admin-boundary"}};var B9=Object.defineProperty,j9=(t,e,r)=>e in t?B9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,H0=(t,e,r)=>(j9(t,typeof e!="symbol"?e+"":e,r),r);const G1=class{constructor(e,r){H0(this,"controlContainer"),H0(this,"map"),H0(this,"mapAreaContainer"),H0(this,"areaButton"),H0(this,"areas"),H0(this,"select"),H0(this,"limit_no_areas"),this.areas=e||G1.DEFAULT_AREAS,this.limit_no_areas=r||G1.DEFAULT_NO_AREAS,this.onDocumentClick=this.onDocumentClick.bind(this)}getDefaultPosition(){return"top-right"}onAdd(e){if(this.map=e,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("maplibregl-ctrl"),this.controlContainer.classList.add("maplibregl-ctrl-group"),this.areas.length<=this.limit_no_areas){this.mapAreaContainer=document.createElement("div"),this.areaButton=document.createElement("button"),this.mapAreaContainer.classList.add("maplibregl-area-list");for(const r of this.areas){const i=document.createElement("button");i.innerText=r.title,i.classList.add(r.title.replace(/[^a-z0-9-]/gi,"_")),i.value=JSON.stringify({center:r.latlng,zoom:r.zoom}),i.addEventListener("click",o=>{var u;const c=o.srcElement;(u=this.map)==null||u.jumpTo(JSON.parse(c.value)),this.mapAreaContainer.style.display="none",this.areaButton.style.display="block";const s=this.mapAreaContainer.getElementsByClassName("active");for(;s[0];)s[0].classList.remove("active");c.classList.add("active")}),r.title===G1.DEFAULT_AREA&&i.classList.add("active"),this.mapAreaContainer.appendChild(i)}this.areaButton.classList.add("maplibregl-ctrl-icon"),this.areaButton.classList.add("maplibregl-area-switcher"),this.areaButton.addEventListener("click",()=>{this.areaButton.style.display="none",this.mapAreaContainer.style.display="block"}),document.addEventListener("click",this.onDocumentClick),this.controlContainer.appendChild(this.areaButton),this.controlContainer.appendChild(this.mapAreaContainer)}else{this.controlContainer.classList.add("maplibregl-ctrl-area-switch");const r=document.createElement("select");this.select=r,this.select.setAttribute("type","select"),this.select.addEventListener("change",function(i){i.target&&e.flyTo(JSON.parse(i.target[this.selectedIndex].value))}),this.controlContainer.appendChild(this.select),this.areas.forEach(function(i){const o=document.createElement("option");o.setAttribute("type","option"),o.text=i.title,o.value=JSON.stringify({center:i.latlng,zoom:i.zoom}),r.appendChild(o)})}return this.controlContainer}onRemove(){!this.controlContainer||!this.controlContainer.parentNode||!this.map||!this.areaButton||(this.areaButton.removeEventListener("click",this.onDocumentClick),this.controlContainer.parentNode.removeChild(this.controlContainer),document.removeEventListener("click",this.onDocumentClick),this.map=void 0)}onDocumentClick(e){this.controlContainer&&!this.controlContainer.contains(e.target)&&this.mapAreaContainer&&this.areaButton&&(this.mapAreaContainer.style.display="none",this.areaButton.style.display="block")}};let W1=G1;H0(W1,"DEFAULT_AREA","Narok"),H0(W1,"DEFAULT_AREAS",[{title:"Narok",latlng:[35.86974,-1.08707],zoom:13},{title:"Nairobi",latlng:[36.8034,-1.2809],zoom:11},{title:"Mombasa",latlng:[39.65449,-4.05099],zoom:12}]),H0(W1,"DEFAULT_NO_AREAS",5);function Ab(t,e,r){const i=t.slice();return i[12]=e[r],i}function Sb(t,e,r){const i=t.slice();return i[15]=e[r],i}function Eb(t,e,r){const i=t.slice();return i[15]=e[r],i}function Cb(t){let e;function r(u,c){return u[3]?q9:U9}let i=r(t),o=i(t);return{c(){e=tt("div"),o.c(),this.h()},l(u){e=rt(u,"DIV",{class:!0});var c=_t(e);o.l(c),c.forEach(fe),this.h()},h(){me(e,"class","popup-select svelte-1655iok")},m(u,c){dt(u,e,c),o.m(e,null)},p(u,c){i===(i=r(u))&&o?o.p(u,c):(o.d(1),o=i(u),o&&(o.c(),o.m(e,null)))},d(u){u&&fe(e),o.d()}}}function U9(t){let e,r,i,o=pn(t[0]),u=[];for(let c=0;ct[8].call(e))},m(c,s){dt(c,e,s);for(let f=0;ft[7].call(e))},m(c,s){dt(c,e,s);for(let f=0;f0&&Cb(t),o=t[2]&&Tb(t);return{c(){e=tt("div"),i&&i.c(),r=ar(),o&&o.c()},l(u){e=rt(u,"DIV",{});var c=_t(e);i&&i.l(c),r=sr(c),o&&o.l(c),c.forEach(fe)},m(u,c){dt(u,e,c),i&&i.m(e,null),Qe(e,r),o&&o.m(e,null),t[9](e)},p(u,[c]){u[0]&&u[0].length>0?i?i.p(u,c):(i=Cb(u),i.c(),i.m(e,r)):i&&(i.d(1),i=null),u[2]?o?o.p(u,c):(o=Tb(u),o.c(),o.m(e,null)):o&&(o.d(1),o=null)},i:gi,o:gi,d(u){u&&fe(e),i&&i.d(),o&&o.d(),t[9](null)}}}function H9(t,e,r){let i,{map:o}=e,{targetLayers:u=[]}=e,c,s,f=[],y;function b(){}b.prototype.onAdd=function(F){return this.map=F,this.controlContainer=document.createElement("div"),this.controlContainer.className="maplibregl-ctrl maplibregl-ctrl-group",this.button=document.createElement("button"),this.button.className="maplibregl-ctrl-identify maplibre-identify-icon",this.button.type="button",this.button.addEventListener("click",()=>{this.changeButtonCondition()}),this.controlContainer.appendChild(this.button),this.button.dispatchEvent(new Event("click")),this.controlContainer},b.prototype.changeButtonCondition=function(){this.isActive?(this.button.classList.remove("-active"),this.isActive=!1,this.map.off("click",this.onClick.bind(this)),r(0,f=[]),r(2,y=void 0),c&&(c.remove(),c=void 0)):(this.button.classList.add("-active"),this.isActive=!0,this.map.on("click",this.onClick.bind(this)))},b.prototype.onClick=function(F){if(!this.isActive){r(0,f=[]),r(2,y=void 0);return}let $=[];u.length>0?u.forEach(Z=>{this.map.getLayer(Z)&&$.push(Z)}):$=o.getStyle().layers.map(Z=>Z.id);const G=this.map.queryRenderedFeatures(F.point,{layers:$});r(0,f=G.filter(Z=>Object.keys(Z.properties).length>0)),r(2,y=f.length>0?f[0]:void 0),f.length>0?c=new sc.Popup().setLngLat(F.lngLat).setDOMContent(s).setMaxWidth("300px").addTo(o):c&&(c.remove(),c=void 0)},b.prototype.onRemove=function(){!this.controlContainer||!this.controlContainer.parentNode||!this.map||!this.button||(this.controlContainer.parentNode.removeChild(this.controlContainer),this.map.off("click",this.onClick.bind(this)),this.map=void 0)};let A=null;th(async()=>{r(6,A=new b)});function I(){y=$c(this),r(2,y),r(0,f)}function C(){y=$c(this),r(2,y),r(0,f)}function N(F){Ht[F?"unshift":"push"](()=>{s=F,r(1,s)})}return t.$$set=F=>{"map"in F&&r(4,o=F.map),"targetLayers"in F&&r(5,u=F.targetLayers)},t.$$.update=()=>{t.$$.dirty&1&&r(3,i=f.length===1),t.$$.dirty&80&&o&&A!==null&&o.hasControl(A)===!1&&o.addControl(A,"top-right")},[f,s,y,i,o,u,A,I,C,N]}class $9 extends pi{constructor(e){super(),mi(this,e,H9,V9,fi,{map:4,targetLayers:5})}}const E1=parseFloat;function sy(t,e=";"){let r;if(Array.isArray(t))r=t.filter(i=>i);else{r=[];for(const i in t)t[i]&&r.push(`${i}:${t[i]}`)}return r.join(e)}function G9(t,e,r,i){let o,u;const c="1em";let s,f,y,b="-.125em";const A="visible";return i&&(y="center",u="1.25em"),r&&(o=r),e&&(e=="lg"?(f="1.33333em",s=".75em",b="-.225em"):e=="xs"?f=".75em":e=="sm"?f=".875em":f=e.replace("x","em")),sy([sy({float:o,width:u,height:c,"line-height":s,"font-size":f,"text-align":y,"vertical-align":b,"transform-origin":"center",overflow:A}),t])}function W9(t,e,r,i,o,u=1,c="",s=""){let f=1,y=1;return o&&(o=="horizontal"?f=-1:o=="vertical"?y=-1:f=y=-1),sy([`translate(${E1(e)*u}${c},${E1(r)*u}${c})`,`scale(${f*E1(t)},${y*E1(t)})`,i&&`rotate(${i}${s})`]," ")}function Mb(t){let e,r,i,o,u,c,s,f;function y(I,C){return typeof I[10][4]=="string"?X9:Z9}let b=y(t),A=b(t);return{c(){e=cd("svg"),r=cd("g"),i=cd("g"),A.c(),this.h()},l(I){e=fd(I,"svg",{id:!0,class:!0,style:!0,viewBox:!0,"aria-hidden":!0,role:!0,xmlns:!0});var C=_t(e);r=fd(C,"g",{transform:!0,"transform-origin":!0});var N=_t(r);i=fd(N,"g",{transform:!0});var F=_t(i);A.l(F),F.forEach(fe),N.forEach(fe),C.forEach(fe),this.h()},h(){me(i,"transform",t[12]),me(r,"transform",o="translate("+t[10][0]/2+" "+t[10][1]/2+")"),me(r,"transform-origin",u=t[10][0]/4+" 0"),me(e,"id",c=t[1]||void 0),me(e,"class",s="svelte-fa "+t[0]+" svelte-1cj2gr0"),me(e,"style",t[11]),me(e,"viewBox",f="0 0 "+t[10][0]+" "+t[10][1]),me(e,"aria-hidden","true"),me(e,"role","img"),me(e,"xmlns","http://www.w3.org/2000/svg"),li(e,"pulse",t[4]),li(e,"spin",t[3])},m(I,C){dt(I,e,C),Qe(e,r),Qe(r,i),A.m(i,null)},p(I,C){b===(b=y(I))&&A?A.p(I,C):(A.d(1),A=b(I),A&&(A.c(),A.m(i,null))),C&4096&&me(i,"transform",I[12]),C&1024&&o!==(o="translate("+I[10][0]/2+" "+I[10][1]/2+")")&&me(r,"transform",o),C&1024&&u!==(u=I[10][0]/4+" 0")&&me(r,"transform-origin",u),C&2&&c!==(c=I[1]||void 0)&&me(e,"id",c),C&1&&s!==(s="svelte-fa "+I[0]+" svelte-1cj2gr0")&&me(e,"class",s),C&2048&&me(e,"style",I[11]),C&1024&&f!==(f="0 0 "+I[10][0]+" "+I[10][1])&&me(e,"viewBox",f),C&17&&li(e,"pulse",I[4]),C&9&&li(e,"spin",I[3])},d(I){I&&fe(e),A.d()}}}function Z9(t){let e,r,i,o,u,c,s,f,y,b;return{c(){e=cd("path"),c=cd("path"),this.h()},l(A){e=fd(A,"path",{d:!0,fill:!0,"fill-opacity":!0,transform:!0}),_t(e).forEach(fe),c=fd(A,"path",{d:!0,fill:!0,"fill-opacity":!0,transform:!0}),_t(c).forEach(fe),this.h()},h(){me(e,"d",r=t[10][4][0]),me(e,"fill",i=t[6]||t[2]||"currentColor"),me(e,"fill-opacity",o=t[9]!=!1?t[7]:t[8]),me(e,"transform",u="translate("+t[10][0]/-2+" "+t[10][1]/-2+")"),me(c,"d",s=t[10][4][1]),me(c,"fill",f=t[5]||t[2]||"currentColor"),me(c,"fill-opacity",y=t[9]!=!1?t[8]:t[7]),me(c,"transform",b="translate("+t[10][0]/-2+" "+t[10][1]/-2+")")},m(A,I){dt(A,e,I),dt(A,c,I)},p(A,I){I&1024&&r!==(r=A[10][4][0])&&me(e,"d",r),I&68&&i!==(i=A[6]||A[2]||"currentColor")&&me(e,"fill",i),I&896&&o!==(o=A[9]!=!1?A[7]:A[8])&&me(e,"fill-opacity",o),I&1024&&u!==(u="translate("+A[10][0]/-2+" "+A[10][1]/-2+")")&&me(e,"transform",u),I&1024&&s!==(s=A[10][4][1])&&me(c,"d",s),I&36&&f!==(f=A[5]||A[2]||"currentColor")&&me(c,"fill",f),I&896&&y!==(y=A[9]!=!1?A[8]:A[7])&&me(c,"fill-opacity",y),I&1024&&b!==(b="translate("+A[10][0]/-2+" "+A[10][1]/-2+")")&&me(c,"transform",b)},d(A){A&&(fe(e),fe(c))}}}function X9(t){let e,r,i,o;return{c(){e=cd("path"),this.h()},l(u){e=fd(u,"path",{d:!0,fill:!0,transform:!0}),_t(e).forEach(fe),this.h()},h(){me(e,"d",r=t[10][4]),me(e,"fill",i=t[2]||t[5]||"currentColor"),me(e,"transform",o="translate("+t[10][0]/-2+" "+t[10][1]/-2+")")},m(u,c){dt(u,e,c)},p(u,c){c&1024&&r!==(r=u[10][4])&&me(e,"d",r),c&36&&i!==(i=u[2]||u[5]||"currentColor")&&me(e,"fill",i),c&1024&&o!==(o="translate("+u[10][0]/-2+" "+u[10][1]/-2+")")&&me(e,"transform",o)},d(u){u&&fe(e)}}}function Y9(t){let e,r=t[10][4]&&Mb(t);return{c(){r&&r.c(),e=mn()},l(i){r&&r.l(i),e=mn()},m(i,o){r&&r.m(i,o),dt(i,e,o)},p(i,[o]){i[10][4]?r?r.p(i,o):(r=Mb(i),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},i:gi,o:gi,d(i){i&&fe(e),r&&r.d(i)}}}function K9(t,e,r){let{class:i=""}=e,{id:o=""}=e,{style:u=""}=e,{icon:c}=e,{size:s=""}=e,{color:f=""}=e,{fw:y=!1}=e,{pull:b=""}=e,{scale:A=1}=e,{translateX:I=0}=e,{translateY:C=0}=e,{rotate:N=""}=e,{flip:F=!1}=e,{spin:$=!1}=e,{pulse:G=!1}=e,{primaryColor:Z=""}=e,{secondaryColor:ee=""}=e,{primaryOpacity:Q=1}=e,{secondaryOpacity:Ae=.4}=e,{swapOpacity:ae=!1}=e,ge,he,Ee;return t.$$set=Fe=>{"class"in Fe&&r(0,i=Fe.class),"id"in Fe&&r(1,o=Fe.id),"style"in Fe&&r(13,u=Fe.style),"icon"in Fe&&r(14,c=Fe.icon),"size"in Fe&&r(15,s=Fe.size),"color"in Fe&&r(2,f=Fe.color),"fw"in Fe&&r(16,y=Fe.fw),"pull"in Fe&&r(17,b=Fe.pull),"scale"in Fe&&r(18,A=Fe.scale),"translateX"in Fe&&r(19,I=Fe.translateX),"translateY"in Fe&&r(20,C=Fe.translateY),"rotate"in Fe&&r(21,N=Fe.rotate),"flip"in Fe&&r(22,F=Fe.flip),"spin"in Fe&&r(3,$=Fe.spin),"pulse"in Fe&&r(4,G=Fe.pulse),"primaryColor"in Fe&&r(5,Z=Fe.primaryColor),"secondaryColor"in Fe&&r(6,ee=Fe.secondaryColor),"primaryOpacity"in Fe&&r(7,Q=Fe.primaryOpacity),"secondaryOpacity"in Fe&&r(8,Ae=Fe.secondaryOpacity),"swapOpacity"in Fe&&r(9,ae=Fe.swapOpacity)},t.$$.update=()=>{t.$$.dirty&16384&&r(10,ge=c&&c.icon||[0,0,"",[],""]),t.$$.dirty&237568&&r(11,he=G9(u,s,b,y)),t.$$.dirty&8126464&&r(12,Ee=W9(A,I,C,N,F,512))},[i,o,f,$,G,Z,ee,Q,Ae,ae,ge,he,Ee,u,c,s,y,b,A,I,C,N,F]}class eo extends pi{constructor(e){super(),mi(this,e,K9,Y9,fi,{class:0,id:1,style:13,icon:14,size:15,color:2,fw:16,pull:17,scale:18,translateX:19,translateY:20,rotate:21,flip:22,spin:3,pulse:4,primaryColor:5,secondaryColor:6,primaryOpacity:7,secondaryOpacity:8,swapOpacity:9})}}var J9={prefix:"fas",iconName:"sort-down",icon:[320,512,["sort-desc"],"f0dd","M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"]},Q9={prefix:"fas",iconName:"arrow-down-up-across-line",icon:[576,512,[],"e4af","M137.4 502.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7V288H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H448V109.3l41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 109.3V224H192 128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96V402.7L86.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96zM128 192h64V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V192zM448 320H384V448c0 17.7 14.3 32 32 32s32-14.3 32-32V320z"]},eS={prefix:"fas",iconName:"table",icon:[512,512,[],"f0ce","M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"]},tS={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},rS={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},iS={prefix:"fas",iconName:"share-nodes",icon:[448,512,["share-alt"],"f1e0","M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z"]},nS={prefix:"fas",iconName:"eye-slash",icon:[640,512,[],"f070","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"]},oS={prefix:"fas",iconName:"bicycle",icon:[640,512,[128690],"f206","M312 32c-13.3 0-24 10.7-24 24s10.7 24 24 24h25.7l34.6 64H222.9l-27.4-38C191 99.7 183.7 96 176 96H120c-13.3 0-24 10.7-24 24s10.7 24 24 24h43.7l22.1 30.7-26.6 53.1c-10-2.5-20.5-3.8-31.2-3.8C57.3 224 0 281.3 0 352s57.3 128 128 128c65.3 0 119.1-48.9 127-112h49c8.5 0 16.3-4.5 20.7-11.8l84.8-143.5 21.7 40.1C402.4 276.3 384 312 384 352c0 70.7 57.3 128 128 128s128-57.3 128-128s-57.3-128-128-128c-13.5 0-26.5 2.1-38.7 6L375.4 48.8C369.8 38.4 359 32 347.2 32H312zM458.6 303.7l32.3 59.7c6.3 11.7 20.9 16 32.5 9.7s16-20.9 9.7-32.5l-32.3-59.7c3.6-.6 7.4-.9 11.2-.9c39.8 0 72 32.2 72 72s-32.2 72-72 72s-72-32.2-72-72c0-18.6 7-35.5 18.6-48.3zM133.2 368h65c-7.3 32.1-36 56-70.2 56c-39.8 0-72-32.2-72-72s32.2-72 72-72c1.7 0 3.4 .1 5.1 .2l-24.2 48.5c-9 18.1 4.1 39.4 24.3 39.4zm33.7-48l50.7-101.3 72.9 101.2-.1 .1H166.8zm90.6-128H365.9L317 274.8 257.4 192z"]},aS={prefix:"fas",iconName:"chart-simple",icon:[448,512,[],"e473","M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80zM0 272c0-26.5 21.5-48 48-48H80c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V272zM368 96h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H368c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48z"]},sS={prefix:"fas",iconName:"person-walking",icon:[320,512,[128694,"walking"],"f554","M160 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM126.5 199.3c-1 .4-1.9 .8-2.9 1.2l-8 3.5c-16.4 7.3-29 21.2-34.7 38.2l-2.6 7.8c-5.6 16.8-23.7 25.8-40.5 20.2s-25.8-23.7-20.2-40.5l2.6-7.8c11.4-34.1 36.6-61.9 69.4-76.5l8-3.5c20.8-9.2 43.3-14 66.1-14c44.6 0 84.8 26.8 101.9 67.9L281 232.7l21.4 10.7c15.8 7.9 22.2 27.1 14.3 42.9s-27.1 22.2-42.9 14.3L247 287.3c-10.3-5.2-18.4-13.8-22.8-24.5l-9.6-23-19.3 65.5 49.5 54c5.4 5.9 9.2 13 11.2 20.8l23 92.1c4.3 17.1-6.1 34.5-23.3 38.8s-34.5-6.1-38.8-23.3l-22-88.1-70.7-77.1c-14.8-16.1-20.3-38.6-14.7-59.7l16.9-63.5zM68.7 398l25-62.4c2.1 3 4.5 5.8 7 8.6l40.7 44.4-14.5 36.2c-2.4 6-6 11.5-10.6 16.1L54.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L68.7 398z"]},lS={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},uS={prefix:"fas",iconName:"left-right",icon:[512,512,[8596,"arrows-alt-h"],"f337","M504.3 273.6c4.9-4.5 7.7-10.9 7.7-17.6s-2.8-13-7.7-17.6l-112-104c-7-6.5-17.2-8.2-25.9-4.4s-14.4 12.5-14.4 22l0 56-192 0 0-56c0-9.5-5.7-18.2-14.4-22s-18.9-2.1-25.9 4.4l-112 104C2.8 243 0 249.3 0 256s2.8 13 7.7 17.6l112 104c7 6.5 17.2 8.2 25.9 4.4s14.4-12.5 14.4-22l0-56 192 0 0 56c0 9.5 5.7 18.2 14.4 22s18.9 2.1 25.9-4.4l112-104z"]},cS={prefix:"fas",iconName:"layer-group",icon:[576,512,[],"f5fd","M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z"]},w8={prefix:"fas",iconName:"up-down-left-right",icon:[512,512,["arrows-alt"],"f0b2","M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8h32v96H128V192c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V288h96v96H192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8H288V288h96v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6v32H288V128h32c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z"]},fS={prefix:"fas",iconName:"circle-question",icon:[512,512,[62108,"question-circle"],"f059","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},hS={prefix:"fas",iconName:"route",icon:[512,512,[],"f4d7","M512 96c0 50.2-59.1 125.1-84.6 155c-3.8 4.4-9.4 6.1-14.5 5H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c53 0 96 43 96 96s-43 96-96 96H139.6c8.7-9.9 19.3-22.6 30-36.8c6.3-8.4 12.8-17.6 19-27.2H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-53 0-96-43-96-96s43-96 96-96h39.8c-21-31.5-39.8-67.7-39.8-96c0-53 43-96 96-96s96 43 96 96zM117.1 489.1c-3.8 4.3-7.2 8.1-10.1 11.3l-1.8 2-.2-.2c-6 4.6-14.6 4-20-1.8C59.8 473 0 402.5 0 352c0-53 43-96 96-96s96 43 96 96c0 30-21.1 67-43.5 97.9c-10.7 14.7-21.7 28-30.8 38.5l-.6 .7zM128 352a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM416 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},dS={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},pS={prefix:"fas",iconName:"floppy-disk",icon:[448,512,[128190,128426,"save"],"f0c7","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V128zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"]},mS={prefix:"fas",iconName:"sort-up",icon:[320,512,["sort-asc"],"f0de","M182.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},l_={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},u_={prefix:"fas",iconName:"ruler",icon:[512,512,[128207],"f545","M177.9 494.1c-18.7 18.7-49.1 18.7-67.9 0L17.9 401.9c-18.7-18.7-18.7-49.1 0-67.9l50.7-50.7 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 50.7-50.7c18.7-18.7 49.1-18.7 67.9 0l92.1 92.1c18.7 18.7 18.7 49.1 0 67.9L177.9 494.1z"]},gS={prefix:"fas",iconName:"file-pdf",icon:[512,512,[],"f1c1","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM176 352h32c30.9 0 56 25.1 56 56s-25.1 56-56 56H192v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V448 368c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24H192v48h16zm96-80h32c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48H304c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H320v96h16zm80-112c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V432 368z"]},yS={prefix:"fas",iconName:"braille",icon:[640,512,[],"f2a1","M0 96a64 64 0 1 1 128 0A64 64 0 1 1 0 96zM224 272a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm0-80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM80 416a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zM0 416a64 64 0 1 1 128 0A64 64 0 1 1 0 416zm240 0a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM64 192a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM224 32a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM352 96a64 64 0 1 1 128 0A64 64 0 1 1 352 96zm240 0a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0A64 64 0 1 1 512 96zm64 176a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm0-80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm16 224a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM416 272a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm0-80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm16 224a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"]},_S={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},vS={prefix:"fas",iconName:"grip-vertical",icon:[320,512,[],"f58e","M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"]},x8={prefix:"fas",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]},k8={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},A8={prefix:"fas",iconName:"stop",icon:[384,512,[9209],"f04d","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"]},bS={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},wS={prefix:"fas",iconName:"car",icon:[512,512,[128664,"automobile"],"f1b9","M135.2 117.4L109.1 192H402.9l-26.1-74.6C372.3 104.6 360.2 96 346.6 96H165.4c-13.6 0-25.7 8.6-30.2 21.4zM39.6 196.8L74.8 96.3C88.3 57.8 124.6 32 165.4 32H346.6c40.8 0 77.1 25.8 90.6 64.3l35.2 100.5c23.2 9.6 39.6 32.5 39.6 59.2V400v48c0 17.7-14.3 32-32 32H448c-17.7 0-32-14.3-32-32V400H96v48c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V400 256c0-26.7 16.4-49.6 39.6-59.2zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},xS={prefix:"fas",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128z"]},kS={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},AS=kS,SS={prefix:"fas",iconName:"copy",icon:[512,512,[],"f0c5","M272 0H396.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H272c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128H192v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z"]},c_={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},ES={prefix:"fas",iconName:"arrow-down-up-lock",icon:[640,512,[],"e4b0","M150.6 502.6l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 402.7V288H416V272c0-17.2 3.9-33.5 10.8-48H352V109.3l41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96c-6-6-14.1-9.4-22.6-9.4s-16.6 3.4-22.6 9.4l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L288 109.3V224l-128 0H96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32H96V402.7L54.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0zM160 192V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V192h64zM288 320V448c0 17.7 14.3 32 32 32s32-14.3 32-32V320H288zm240-80c17.7 0 32 14.3 32 32v48H496V272c0-17.7 14.3-32 32-32zm-80 32v48c-17.7 0-32 14.3-32 32V480c0 17.7 14.3 32 32 32H608c17.7 0 32-14.3 32-32V352c0-17.7-14.3-32-32-32V272c0-44.2-35.8-80-80-80s-80 35.8-80 80z"]},CS={prefix:"fas",iconName:"angle-up",icon:[448,512,[8963],"f106","M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z"]},IS={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},LS={prefix:"fas",iconName:"up-down",icon:[256,512,[8597,11021,"arrows-alt-v"],"f338","M145.6 7.7C141 2.8 134.7 0 128 0s-13 2.8-17.6 7.7l-104 112c-6.5 7-8.2 17.2-4.4 25.9S14.5 160 24 160H80V352H24c-9.5 0-18.2 5.7-22 14.4s-2.1 18.9 4.4 25.9l104 112c4.5 4.9 10.9 7.7 17.6 7.7s13-2.8 17.6-7.7l104-112c6.5-7 8.2-17.2 4.4-25.9s-12.5-14.4-22-14.4H176V160h56c9.5 0 18.2-5.7 22-14.4s2.1-18.9-4.4-25.9l-104-112z"]},f_={prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]},TS={prefix:"fas",iconName:"magnifying-glass-plus",icon:[512,512,["search-plus"],"f00e","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM184 296c0 13.3 10.7 24 24 24s24-10.7 24-24V232h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H232V120c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H120c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"]};function ca(t){"@babel/helpers - typeof";return ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ca(t)}var qu=Uint8Array,Vu=Uint16Array,Tp=Uint32Array,D2=new qu([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),z2=new qu([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ly=new qu([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),S8=function(t,e){for(var r=new Vu(31),i=0;i<31;++i)r[i]=e+=1<>>1|(Ta&21845)<<1;Bf=(Bf&52428)>>>2|(Bf&13107)<<2,Bf=(Bf&61680)>>>4|(Bf&3855)<<4,cy[Ta]=((Bf&65280)>>>8|(Bf&255)<<8)>>>1}var Y0=function(t,e,r){for(var i=t.length,o=0,u=new Vu(e);o>>f]=y}else for(s=new Vu(i),o=0;o>>15-t[o];return s},Jf=new qu(288);for(var Ta=0;Ta<144;++Ta)Jf[Ta]=8;for(var Ta=144;Ta<256;++Ta)Jf[Ta]=9;for(var Ta=256;Ta<280;++Ta)Jf[Ta]=7;for(var Ta=280;Ta<288;++Ta)Jf[Ta]=8;var Pp=new qu(32);for(var Ta=0;Ta<32;++Ta)Pp[Ta]=5;var MS=Y0(Jf,9,0),DS=Y0(Jf,9,1),zS=Y0(Pp,5,0),NS=Y0(Pp,5,1),Fm=function(t){for(var e=t[0],r=1;re&&(e=t[r]);return e},E0=function(t,e,r){var i=e/8>>0;return(t[i]|t[i+1]<<8)>>>(e&7)&r},Bm=function(t,e){var r=e/8>>0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>>(e&7)},h_=function(t){return(t/8>>0)+(t&7&&1)},L8=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t instanceof Vu?Vu:t instanceof Tp?Tp:qu)(r-e);return i.set(t.subarray(e,r)),i},RS=function(t,e,r){var i=t.length,o=!e||r,u=!r||r.i;r||(r={}),e||(e=new qu(i*3));var c=function(Nt){var zt=e.length;if(Nt>zt){var Mt=new qu(Math.max(zt*2,Nt));Mt.set(e),e=Mt}},s=r.f||0,f=r.p||0,y=r.b||0,b=r.l,A=r.d,I=r.m,C=r.n,N=i*8;do{if(!b){r.f=s=E0(t,f,1);var F=E0(t,f+1,3);if(f+=3,F)if(F==1)b=DS,A=NS,I=9,C=5;else if(F==2){var ee=E0(t,f,31)+257,Q=E0(t,f+10,15)+4,Ae=ee+E0(t,f+5,31)+1;f+=14;for(var ae=new qu(Ae),ge=new qu(19),he=0;heN)break;for(var Ce=Y0(ge,Ee,1),he=0;he>>4;if($<16)ae[he++]=$;else{var qe=0,it=0;for($==16?(it=3+E0(t,f,3),f+=2,qe=ae[he-1]):$==17?(it=3+E0(t,f,7),f+=3):$==18&&(it=11+E0(t,f,127),f+=7);it--;)ae[he++]=qe}}var xt=ae.subarray(0,ee),yt=ae.subarray(ee);I=Fm(xt),C=Fm(yt),b=Y0(xt,I,1),A=Y0(yt,C,1)}else throw"invalid block type";else{var $=h_(f)+4,G=t[$-4]|t[$-3]<<8,Z=$+G;if(Z>i){if(u)throw"unexpected EOF";break}o&&c(y+G),e.set(t.subarray($,Z),y),r.b=y+=G,r.p=f=Z*8;continue}if(f>N)throw"unexpected EOF"}o&&c(y+131072);for(var Ge=(1<>>4;if(f+=qe&15,f>N)throw"unexpected EOF";if(!qe)throw"invalid length/literal";if(Xe<256)e[y++]=Xe;else if(Xe==256){b=null;break}else{var wt=Xe-254;if(Xe>264){var he=Xe-257,_e=D2[he];wt=E0(t,f,(1<<_e)-1)+C8[he],f+=_e}var Be=A[Bm(t,f)&ot],ke=Be>>>4;if(!Be)throw"invalid distance";f+=Be&15;var yt=PS[ke];if(ke>3){var _e=z2[ke];yt+=Bm(t,f)&(1<<_e)-1,f+=_e}if(f>N)throw"unexpected EOF";o&&c(y+131072);for(var ft=y+wt;y>0;t[i]|=r,t[i+1]|=r>>>8},ep=function(t,e,r){r<<=e&7;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},jm=function(t,e){for(var r=[],i=0;iI&&(I=u[i].s);var C=new Vu(I+1),N=fy(r[b-1],C,0);if(N>e){var i=0,F=0,$=N-e,G=1<<$;for(u.sort(function(ae,ge){return C[ge.s]-C[ae.s]||ae.f-ge.f});ie)F+=G-(1<>>=$;F>0;){var ee=u[i].s;C[ee]=0&&F;--i){var Q=u[i].s;C[Q]==e&&(--C[Q],++F)}N=e}return[new qu(C),N]},fy=function(t,e,r){return t.s==-1?Math.max(fy(t.l,e,r+1),fy(t.r,e,r+1)):e[t.s]=r},zb=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Vu(++e),i=0,o=t[0],u=1,c=function(f){r[i++]=f},s=1;s<=e;++s)if(t[s]==o&&s!=e)++u;else{if(!o&&u>2){for(;u>138;u-=138)c(32754);u>2&&(c(u>10?u-11<<5|28690:u-3<<5|12305),u=0)}else if(u>3){for(c(o),--u;u>6;u-=6)c(8304);u>2&&(c(u-3<<5|8208),u=0)}for(;u--;)c(o);u=1,o=t[s]}return[r.subarray(0,i),e]},tp=function(t,e){for(var r=0,i=0;i>>8,t[o+2]=t[o]^255,t[o+3]=t[o+1]^255;for(var u=0;u4&&!Fe[ly[Ie-1]];--Ie);var qe=y+5<<3,it=tp(o,Jf)+tp(u,Pp)+c,xt=tp(o,I)+tp(u,F)+c+14+3*Ie+tp(ge,Fe)+(2*ge[16]+3*ge[17]+7*ge[18]);if(qe<=it&&qe<=xt)return Z1(e,b,t.subarray(f,f+y));var yt,Ge,ot,mt;if(gf(e,b,1+(xt15&&(gf(e,b,Be[he]>>>5&127),b+=Be[he]>>>12)}}else yt=MS,Ge=Jf,ot=zS,mt=Pp;for(var he=0;he255){var ke=i[he]>>>18&31;ep(e,b,yt[ke+257]),b+=Ge[ke+257],ke>7&&(gf(e,b,i[he]>>>23&31),b+=D2[ke]);var ft=i[he]&31;ep(e,b,ot[ft]),b+=mt[ft],ft>3&&(ep(e,b,i[he]>>>5&8191),b+=z2[ft])}else ep(e,b,yt[i[he]]),b+=Ge[i[he]];return ep(e,b,yt[256]),b+Ge[256]},OS=new Tp([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),FS=new qu(0),BS=function(t,e,r,i,o,u){var c=t.length,s=new qu(i+c+5*(1+Math.floor(c/7e3))+o),f=s.subarray(i,s.length-o),y=0;if(!e||c<8)for(var b=0;b<=c;b+=65535){var A=b+65535;A>>13,N=I&8191,F=(1<7e3||Fe>24576)&&yt>423){y=Nb(t,f,0,Ae,ae,ge,Ee,Fe,Ie,b-Ie,y),Fe=he=Ee=0,Ie=b;for(var Ge=0;Ge<286;++Ge)ae[Ge]=0;for(var Ge=0;Ge<30;++Ge)ge[Ge]=0}var ot=2,mt=0,Xe=N,wt=it-xt&32767;if(yt>2&&qe==Q(b-wt))for(var _e=Math.min(C,yt)-1,Be=Math.min(32767,b),ke=Math.min(258,yt);wt<=Be&&--Xe&&it!=xt;){if(t[b+ot]==t[b+ot-wt]){for(var ft=0;ftot){if(ot=ft,mt=wt,ft>_e)break;for(var Nt=Math.min(wt,ft-2),zt=0,Ge=0;Gezt&&(zt=_r,xt=Mt)}}}it=xt,xt=$[it],wt+=it-xt+32768&32767}if(mt){Ae[Fe++]=268435456|uy[ot]<<18|Db[mt];var Sr=uy[ot]&31,Qt=Db[mt]&31;Ee+=D2[Sr]+z2[Qt],++ae[257+Sr],++ge[Qt],Ce=b+ot,++he}else Ae[Fe++]=t[b],++ae[t[b]]}}y=Nb(t,f,u,Ae,ae,ge,Ee,Fe,Ie,b-Ie,y),u||(y=Z1(f,y,FS))}return L8(s,0,i+h_(y)+o)},jS=function(){var t=1,e=0;return{p:function(r){for(var i=t,o=e,u=r.length,c=0;c!=u;){for(var s=Math.min(c+5552,u);c>>8<<16|(e&255)<<8|e>>>8)+((t&255)<<23)*2}}},US=function(t,e,r,i,o){return BS(t,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):12+e.mem,r,i,!o)},qS=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},VS=function(t,e){var r=e.level,i=r==0?0:r<6?1:r==9?3:2;t[0]=120,t[1]=i<<6|(i?32-2*i:1)},HS=function(t){if((t[0]&15)!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(t[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function hy(t,e){e===void 0&&(e={});var r=jS();r.p(t);var i=US(t,e,2,4);return VS(i,e),qS(i,i.length-4,r.d()),i}function $S(t,e){return RS((HS(t),t.subarray(2,-4)),e)}var Wn=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function Um(){Wn.console&&typeof Wn.console.log=="function"&&Wn.console.log.apply(Wn.console,arguments)}var ya={log:Um,warn:function(t){Wn.console&&(typeof Wn.console.warn=="function"?Wn.console.warn.apply(Wn.console,arguments):Um.call(null,arguments))},error:function(t){Wn.console&&(typeof Wn.console.error=="function"?Wn.console.error.apply(Wn.console,arguments):Um(t))}};function qm(t,e,r){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){ch(i.response,e,r)},i.onerror=function(){ya.error("could not download file")},i.send()}function Rb(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function C1(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var pp,dy,ch=Wn.saveAs||((typeof window>"u"?"undefined":ca(window))!=="object"||window!==Wn?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,e,r){var i=Wn.URL||Wn.webkitURL,o=document.createElement("a");e=e||t.name||"download",o.download=e,o.rel="noopener",typeof t=="string"?(o.href=t,o.origin!==location.origin?Rb(o.href)?qm(t,e,r):C1(o,o.target="_blank"):C1(o)):(o.href=i.createObjectURL(t),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){C1(o)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,r){if(e=e||t.name||"download",typeof t=="string")if(Rb(t))qm(t,e,r);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){C1(i)})}else navigator.msSaveOrOpenBlob(function(o,u){return u===void 0?u={autoBom:!1}:ca(u)!=="object"&&(ya.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob([String.fromCharCode(65279),o],{type:o.type}):o}(t,r),e)}:function(t,e,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof t=="string")return qm(t,e,r);var o=t.type==="application/octet-stream",u=/constructor/i.test(Wn.HTMLElement)||Wn.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||o&&u)&&(typeof FileReader>"u"?"undefined":ca(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var b=s.result;b=c?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=b:location=b,i=null},s.readAsDataURL(t)}else{var f=Wn.URL||Wn.webkitURL,y=f.createObjectURL(t);i?i.location=y:location.href=y,i=null,setTimeout(function(){f.revokeObjectURL(y)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} @@ -742,7 +742,7 @@ endobj\r * http://opensource.org/licenses/mit-license */function C0(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Kb(t){function e(he){if(!he)throw Error("assert :P")}function r(he,Ee,Fe){for(var Ce=0;4>Ce;Ce++)if(he[Ee+Ce]!=Fe.charCodeAt(Ce))return!0;return!1}function i(he,Ee,Fe,Ce,Ie){for(var qe=0;qeqe+1?[]:new Ee),!(it.length>>0;T&W;)W>>>=1;return W?(T&W-1)+W:T}function Fe(T,B,W,oe,ve){e(!(oe%W));do T[B+(oe-=W)]=ve;while(0=ve),512>=ve)var ue=u(512);else if((ue=u(ve))==null)return 0;return function(we,Te,ze,$e,ht,At){var Gt,$t,Pr=Te,rr=1<Gt;++Gt){if(Dt[Gt]>1<(qi-=Dt[Gt]))return 0;for(;0=Gt;++Gt,ht<<=1){if(ii+=qi<<=1,0>(qi-=Dt[Gt]))return 0;for(;0Or&&!(0>=(Lr-=Dt[Or]));)++Or,Lr<<=1;rr+=ui=1<<(Lr=Or-ze),we[Te+(Or=Zr&Mr)].g=Lr+ze,we[Te+Or].value=Pr-Te-Or}$e.g=Gt-ze,$e.value=At[$t++],Fe(we,Pr+(Zr>>ze),ht,ui,$e),Zr=Ee(Zr,Gt)}}return ii!=2*Et[15]-1?0:rr}(T,B,W,oe,ve,ue)}function Ie(){this.value=this.g=0}function qe(){this.value=this.g=0}function it(){this.G=c(5,Ie),this.H=u(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=c(Pa,qe)}function xt(T,B,W,oe){e(T!=null),e(B!=null),e(2147483648>oe),T.Ca=254,T.I=0,T.b=-8,T.Ka=0,T.oa=B,T.pa=W,T.Jd=B,T.Yc=W+oe,T.Zc=4<=oe?W+oe-4+1:W,zt(T)}function yt(T,B){for(var W=0;0oe),T.Sb=oe,T.Ra=0,T.u=0,T.h=0,4>>=8,T.Ra+=T.oa[T.pa+T.bb]<>>0,++T.bb,T.u-=8;ke(T)&&(T.h=1,T.u=0)}function Xe(T,B){if(e(0<=B),!T.h&&B<=Ul){var W=Be(T)&jl[B];return T.u+=B,mt(T),W}return T.h=1,T.u=0}function wt(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function _e(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function Be(T){return T.Ra>>>(T.u&ws-1)>>>0}function ke(T){return e(T.bb<=T.Sb),T.h||T.bb==T.Sb&&T.u>ws}function ft(T,B){T.u=B,T.h=ke(T)}function Nt(T){T.u>=Vs&&(e(T.u>=Vs),mt(T))}function zt(T){e(T!=null&&T.oa!=null),T.pa>>0,T.b+=8):(e(T!=null&&T.oa!=null),T.paT.b&&zt(T);var oe=T.b,ve=W*B>>>8,ue=(T.I>>>oe>ve)+0;for(ue?(W-=ve,T.I-=ve+1<>>0):W=ve+1,oe=W,ve=0;256<=oe;)ve+=8,oe>>=8;return oe=7^ve+va[oe],T.b-=oe,T.Ca=(W<>24&255,T[B+1]=W>>16&255,T[B+2]=W>>8&255,T[B+3]=W>>0&255}function Sr(T,B){return T[B+0]<<0|T[B+1]<<8}function Qt(T,B){return Sr(T,B)|T[B+2]<<16}function It(T,B){return Sr(T,B)|Sr(T,B+2)<<16}function jr(T,B){var W=1<=ve||0>=ue?0:(W[0]=ve,oe[0]=ue,1)}function Jr(T,B){return T+(1<>>B}function mr(T,B){return((4278255360&T)+(4278255360&B)>>>0&4278255360)+((16711935&T)+(16711935&B)>>>0&16711935)>>>0}function zr(T,B){he[B]=function(W,oe,ve,ue,we,Te,ze){var $e;for($e=0;$e>>1)+(T&B)>>>0}function _i(T){return 0<=T&&256>T?T:0>T?0:255>1))}function Rr(T,B,W){return Math.abs(B-W)-Math.abs(T-W)}function Bi(T,B,W,oe,ve,ue,we){for(oe=ue[we-1],W=0;W>8&255,ze=16711935&(ze=(ze=16711935&we)+((Te<<16)+Te));oe[ve+ue]=(4278255360&we)+ze>>>0}}function un(T,B){B.jd=T>>0&255,B.hd=T>>8&255,B.ud=T>>16&255}function Wi(T,B,W,oe,ve,ue){var we;for(we=0;we>>8,$e=Te,ht=255&(ht=(ht=Te>>>16)+((T.jd<<24>>24)*(ze<<24>>24)>>>5));$e=255&($e=($e=$e+((T.hd<<24>>24)*(ze<<24>>24)>>>5))+((T.ud<<24>>24)*(ht<<24>>24)>>>5)),ve[ue+we]=(4278255360&Te)+(ht<<16)+$e}}function Br(T,B,W,oe,ve){he[B]=function(ue,we,Te,ze,$e,ht,At,Gt,$t){for(ze=At;ze>ue.b,$t=ue.Ea,Pr=ue.K[0],rr=ue.w;if(8>Gt)for(ue=(1<>=Gt}else he["VP8LMapColor"+W](ze,$e,Pr,rr,ht,At,we,Te,$t)}}function Ur(T,B,W,oe,ve){for(W=B+W;B>16&255,oe[ve++]=ue>>8&255,oe[ve++]=ue>>0&255}}function zi(T,B,W,oe,ve){for(W=B+W;B>16&255,oe[ve++]=ue>>8&255,oe[ve++]=ue>>0&255,oe[ve++]=ue>>24&255}}function Ui(T,B,W,oe,ve){for(W=B+W;B>16&240|we>>12&15,we=we>>0&240|we>>28&15;oe[ve++]=ue,oe[ve++]=we}}function kt(T,B,W,oe,ve){for(W=B+W;B>16&248|we>>13&7,we=we>>5&224|we>>3&31;oe[ve++]=ue,oe[ve++]=we}}function pr(T,B,W,oe,ve){for(W=B+W;B>0&255,oe[ve++]=ue>>8&255,oe[ve++]=ue>>16&255}}function Qr(T,B,W,oe,ve,ue){if(ue==0)for(W=B+W;B>24|ue[1]>>8&65280|ue[2]<<8&16711680|ue[3]<<24)>>>0),ve+=32;else i(oe,ve,T,B,W)}function Ei(T,B){he[B][0]=he[T+"0"],he[B][1]=he[T+"1"],he[B][2]=he[T+"2"],he[B][3]=he[T+"3"],he[B][4]=he[T+"4"],he[B][5]=he[T+"5"],he[B][6]=he[T+"6"],he[B][7]=he[T+"7"],he[B][8]=he[T+"8"],he[B][9]=he[T+"9"],he[B][10]=he[T+"10"],he[B][11]=he[T+"11"],he[B][12]=he[T+"12"],he[B][13]=he[T+"13"],he[B][14]=he[T+"0"],he[B][15]=he[T+"0"]}function wi(T){return T==Yu||T==Gs||T==Lc||T==xu}function io(){this.eb=[],this.size=this.A=this.fb=0}function Yi(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function _n(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new io,this.f.kb=new Yi,this.sd=null}function Za(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function to(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function hn(T){return alert("todo:WebPSamplerProcessPlane"),T.T}function gt(T,B){var W=T.T,oe=B.ba.f.RGBA,ve=oe.eb,ue=oe.fb+T.ka*oe.A,we=rs[B.ba.S],Te=T.y,ze=T.O,$e=T.f,ht=T.N,At=T.ea,Gt=T.W,$t=B.cc,Pr=B.dc,rr=B.Mc,Dt=B.Nc,Et=T.ka,Lr=T.ka+T.T,Or=T.U,Mr=Or+1>>1;for(Et==0?we(Te,ze,null,null,$e,ht,At,Gt,$e,ht,At,Gt,ve,ue,null,null,Or):(we(B.ec,B.fc,Te,ze,$t,Pr,rr,Dt,$e,ht,At,Gt,ve,ue-oe.A,ve,ue,Or),++W);Et+2W,ve=W==Zu||W==Gl||W==Ic||W==En||W==12||wi(W);if(B.memory=null,B.Ib=null,B.Jb=null,B.Nd=null,!Go(B.Oa,T,ve?11:12))return 0;if(ve&&wi(W)&&Wr(),T.da)alert("todo:use_scaling");else{if(oe){if(B.Ib=hn,T.Kb){if(W=T.U+1>>1,B.memory=u(T.U+2*W),B.memory==null)return 0;B.ec=B.memory,B.fc=0,B.cc=B.ec,B.dc=B.fc+T.U,B.Mc=B.cc,B.Nc=B.dc+W,B.Ib=gt,Wr()}}else alert("todo:EmitYUV");ve&&(B.Jb=Ne,oe&&Ar())}if(oe&&!k){for(T=0;256>T;++T)L[T]=89858*(T-128)+tc>>Eu,Y[T]=-22014*(T-128)+tc,j[T]=-45773*(T-128),z[T]=113618*(T-128)+tc>>Eu;for(T=Zl;T>Eu,te[T-Zl]=Ea(B,255),se[T-Zl]=Ea(B+8>>4,15);k=1}return 1}function ut(T){var B=T.ma,W=T.U,oe=T.T;return e(!(1&T.ka)),0>=W||0>=oe?0:(W=B.Ib(T,B),B.Jb!=null&&B.Jb(T,B,W),B.Dc+=W,1)}function Pt(T){T.ma.memory=null}function lt(T,B,W,oe){return Xe(T,8)!=47?0:(B[0]=Xe(T,14)+1,W[0]=Xe(T,14)+1,oe[0]=Xe(T,1),Xe(T,3)!=0?0:!T.h)}function pe(T,B){if(4>T)return T+1;var W=T-2>>1;return(2+(1&T)<>4)*T+(8-(15&W)))?W:1;var W}function Wt(T,B,W){var oe=Be(W),ve=T[B+=255&oe].g-8;return 0>>0,e(8>=W.g),T.g}function pt(T,B,W){var oe=T.xc;return e((B=oe==0?0:T.vc[T.md*(W>>oe)+(B>>oe)])>ui.b)*ii;rrOr&&(kn=Or),(0,Hs[xn[qn++]>>8&15])(Gt,$t+ +On,Et,Lr+On-Or,kn-On,Et,Lr+On),On=kn}$t+=Or,Lr+=Or,++rr&Zr||(ui+=ii)}At!=$e.nc&&i(ze,Te-Pr,ze,Te+(At-ht-1)*Pr,Pr);break;case 1:for(Pr=Gt,Dt=$t,Or=(Gt=$e.Ea)-(Lr=Gt&~(Et=($t=1<<$e.b)-1)),rr=Jr(Gt,$e.b),Mr=$e.K,$e=$e.w+(ht>>$e.b)*rr;ht=ve),0ue.o&&(oe=ue.o),W=oe?W=0:(ve[0]+=4*ue.v,ue.ka=W-ue.j,ue.U=ue.va-ue.v,ue.T=oe-W,W=1),W){if(Te=Te[0],11>(W=T.ca).S){var ht=W.f.RGBA,At=(oe=W.S,ve=ue.U,ue=ue.T,$e=ht.eb,ht.A),Gt=ue;for(ht=ht.fb+T.Ma*ht.A;0oe){var ve=T.l.width,ue=W.ca,we=W.tb+ve*oe,Te=T.V,ze=T.Ba+T.c*oe,$e=T.gc;e(T.ab==1),e($e[0].hc==3),ss($e[0],oe,B,Te,ze,ue,we),on(W,oe,B,ue,we,ve)}T.C=T.Ma=B}function Ct(T,B,W,oe,ve,ue,we){var Te=T.$/oe,ze=T.$%oe,$e=T.m,ht=T.s,At=W+T.$,Gt=At;ve=W+oe*ve;var $t=W+oe*ue,Pr=280+ht.ua,rr=T.Pb?Te:16777216,Dt=0=rr){var Zr=At-W;e((rr=T).Pb),rr.wd=rr.m,rr.xd=Zr,0qi.g?(ft(Mr,Mr.u+qi.g),Zr[ii]=qi.value,Mr=0):(ft(Mr,Mr.u+qi.g-256),e(256<=qi.value),Mr=qi.value),Mr==0&&(Or=!0)}else Mr=Wt(Lr.G[0],Lr.H[0],$e);if($e.h)break;if(Or||256>Mr){if(!Or)if(Lr.nd)B[At]=(Lr.qb|Mr<<8)>>>0;else{if(Nt($e),Or=Wt(Lr.G[1],Lr.H[1],$e),Nt($e),Zr=Wt(Lr.G[2],Lr.H[2],$e),ii=Wt(Lr.G[3],Lr.H[3],$e),$e.h)break;B[At]=(ii<<24|Or<<16|Mr<<8|Zr)>>>0}if(Or=!1,++At,++ze>=oe&&(ze=0,++Te,we!=null&&Te<=ue&&!(Te%16)&&we(T,Te),Dt!=null))for(;Gt>>Dt.Mb]=Mr}else if(280>Mr){if(Mr=pe(Mr-256,$e),Zr=Wt(Lr.G[4],Lr.H[4],$e),Nt($e),Zr=ir(oe,Zr=pe(Zr,$e)),$e.h)break;if(At-W=oe;)ze-=oe,++Te,we!=null&&Te<=ue&&!(Te%16)&&we(T,Te);if(e(At<=ve),ze&Et&&(Lr=pt(ht,ze,Te)),Dt!=null)for(;Gt>>Dt.Mb]=Mr}else{if(!(Mr>>Dt.Mb]=Mr;Mr=At,e(!(Or>>>(Zr=Dt).Xa)),B[Mr]=Zr.X[Or],Or=!0}Or||e($e.h==ke($e))}if(T.Pb&&$e.h&&Atue?ue:Te),T.a=0,T.$=At-W}return 1}return T.a=3,0}function tn(T){e(T!=null),T.vc=null,T.yc=null,T.Ya=null;var B=T.Wa;B!=null&&(B.X=null),T.vb=null,e(T!=null)}function Ln(){var T=new lo;return T==null?null:(T.a=0,T.xb=Al,Ei("Predictor","VP8LPredictors"),Ei("Predictor","VP8LPredictors_C"),Ei("PredictorAdd","VP8LPredictorsAdd"),Ei("PredictorAdd","VP8LPredictorsAdd_C"),vu=ji,ls=Wi,Ha=Ur,wl=zi,us=Ui,Ma=kt,xl=pr,he.VP8LMapColor32b=Vl,he.VP8LMapColor8b=Wu,T)}function Bn(T,B,W,oe,ve){var ue=1,we=[T],Te=[B],ze=oe.m,$e=oe.s,ht=null,At=0;e:for(;;){if(W)for(;ue&&Xe(ze,1);){var Gt=we,$t=Te,Pr=oe,rr=1,Dt=Pr.m,Et=Pr.gc[Pr.ab],Lr=Xe(Dt,2);if(Pr.Oc&1<=Pr.ab),Lr){case 0:case 1:Et.b=Xe(Dt,3)+2,rr=Bn(Jr(Et.Ea,Et.b),Jr(Et.nc,Et.b),0,Pr,Et.K),Et.K=Et.K[0];break;case 3:var Or,Mr=Xe(Dt,8)+1,Zr=16>ui.b),qn=u(xn);if(qn==null)Or=0;else{var On=ui.K[0],kn=ui.w;for(qn[0]=ui.K[0][0],ii=1;ii<1*qi;++ii)qn[ii]=mr(On[kn+ii],qn[ii-1]);for(;ii<4*xn;++ii)qn[ii]=0;ui.K[0]=null,ui.K[0]=qn,Or=1}}rr=Or;break;case 2:break;default:e(0)}ue=rr}}if(we=we[0],Te=Te[0],ue&&Xe(ze,1)&&!(ue=1<=(At=Xe(ze,4))&&11>=At)){oe.a=3;break e}var Vn;if(Vn=ue)t:{var no,Cn,co,Qi=oe,gn=we,xo=Te,In=At,Pn=W,Ao=Qi.m,So=Qi.s,Uo=[null],Wo=1,fs=0,Ys=Ku[In];r:for(;;){if(Pn&&Xe(Ao,1)){var Mn=Xe(Ao,3)+2,Ks=Jr(gn,Mn),Es=Jr(xo,Mn),Wa=Ks*Es;if(!Bn(Ks,Es,0,Qi,Uo))break r;for(Uo=Uo[0],So.xc=Mn,no=0;no>8&65535;Uo[no]=is,is>=Wo&&(Wo=is+1)}}if(Ao.h)break r;for(Cn=0;5>Cn;++Cn){var Xo=Zs[Cn];!Cn&&0=R0),Zo=Xl;var y0=u(fs);if(Zo==null||y0==null||g0==null){Qi.a=1;break r}var t0=g0;for(no=co=0;noCn;++Cn){Xo=Zs[Cn],hs[Cn]=t0,Yl[Cn]=co,!Cn&&0fr)break o}else Pe=fr;for(Ye=0;YeVi)tr[Ye++]=Vi,Vi!=0&&(Yr=Vi);else{var Ji=Vi==16,Xn=Vi-16,ro=Ws[Xn],fo=Xe(Er,ku[Xn])+ro;if(Ye+fo>fr)break o;for(var ho=Ji?Yr:0;0=Cn){var Qo,wa=y0[0];for(Qo=1;Qowa&&(wa=y0[Qo]);nf+=wa}}if(sl.nd=Cu,sl.Qb=0,Cu&&(sl.qb=(hs[3][Yl[3]+0].value<<24|hs[1][Yl[1]+0].value<<16|hs[2][Yl[2]+0].value)>>>0,O0==0&&256>hs[0][Yl[0]+0].value&&(sl.Qb=1,sl.qb+=hs[0][Yl[0]+0].value<<8)),sl.jc=!sl.Qb&&6>nf,sl.jc){var qo,Hn=sl;for(qo=0;qo>=cr(Kn,8,cn),oi>>=cr(Hn.G[1][Hn.H[1]+oi],16,cn),oi>>=cr(Hn.G[2][Hn.H[2]+oi],0,cn),cr(Hn.G[3][Hn.H[3]+oi],24,cn))}}}So.vc=Uo,So.Wb=Wo,So.Ya=Zo,So.yc=g0,Vn=1;break t}Vn=0}if(!(ue=Vn)){oe.a=3;break e}if(0oe+1?[]:0),!(ve.lengthve)return Lo(T,7,"Truncated header.");var ue=W[oe+0]|W[oe+1]<<8|W[oe+2]<<16,we=T.Od;if(we.Rb=!(1&ue),we.td=ue>>1&7,we.yd=ue>>4&1,we.ub=ue>>5,3ve)return Lo(T,7,"cannot parse picture header");if(!tl(W,oe,ve))return Lo(T,3,"Bad code word");Te.c=16383&(W[oe+4]<<8|W[oe+3]),Te.Td=W[oe+4]>>6,Te.i=16383&(W[oe+6]<<8|W[oe+5]),Te.Ud=W[oe+6]>>6,oe+=7,ve-=7,T.za=Te.c+15>>4,T.Ub=Te.i+15>>4,B.width=Te.c,B.height=Te.i,B.Da=0,B.j=0,B.v=0,B.va=B.width,B.o=B.height,B.da=0,B.ib=B.width,B.hb=B.height,B.U=B.width,B.T=B.height,o((ue=T.Pa).jb,0,255,ue.jb.length),e((ue=T.Qa)!=null),ue.Cb=0,ue.Bb=0,ue.Fb=1,o(ue.Zb,0,0,ue.Zb.length),o(ue.Lb,0,0,ue.Lb)}if(we.ub>ve)return Lo(T,7,"bad partition length");xt(ue=T.m,W,oe,we.ub),oe+=we.ub,ve-=we.ub,we.Rb&&(Te.Ld=Mt(ue),Te.Kd=Mt(ue)),Te=T.Qa;var ze,$e=T.Pa;if(e(ue!=null),e(Te!=null),Te.Cb=Mt(ue),Te.Cb){if(Te.Bb=Mt(ue),Mt(ue)){for(Te.Fb=Mt(ue),ze=0;4>ze;++ze)Te.Zb[ze]=Mt(ue)?Ge(ue,7):0;for(ze=0;4>ze;++ze)Te.Lb[ze]=Mt(ue)?Ge(ue,6):0}if(Te.Bb)for(ze=0;3>ze;++ze)$e.jb[ze]=Mt(ue)?yt(ue,8):255}else Te.Bb=0;if(ue.Ka)return Lo(T,3,"cannot parse segment header");if((Te=T.ed).zd=Mt(ue),Te.Tb=yt(ue,6),Te.wb=yt(ue,3),Te.Pc=Mt(ue),Te.Pc&&Mt(ue)){for($e=0;4>$e;++$e)Mt(ue)&&(Te.vd[$e]=Ge(ue,6));for($e=0;4>$e;++$e)Mt(ue)&&(Te.od[$e]=Ge(ue,6))}if(T.L=Te.Tb==0?0:Te.zd?1:2,ue.Ka)return Lo(T,3,"cannot parse filter header");var ht=ve;if(ve=ze=oe,oe=ze+ht,Te=ht,T.Xb=(1<Te&&(At=Te),xt(T.Jc[+ht],W,ze,At),ze+=At,Te-=At,ve+=3}xt(T.Jc[+$e],W,ze,Te),W=zeAt;++At){if(ht.Cb){var Gt=ht.Zb[At];ht.Fb||(Gt+=W)}else{if(0>16,8>$t.Eb[1]&&($t.Eb[1]=8),$t.Qc[0]=Ju[Ea(Gt+$e,117)],$t.Qc[1]=jo[Ea(Gt+ze,127)],$t.lc=Gt+ze}if(!we.Rb)return Lo(T,4,"Not a key frame.");for(Mt(ue),we=T.Pa,W=0;4>W;++W){for(ve=0;8>ve;++ve)for(oe=0;3>oe;++oe)for(Te=0;11>Te;++Te)$e=Jt(ue,m0[W][ve][oe][Te])?yt(ue,8):Jo[W][ve][oe][Te],we.Wc[W][ve].Yb[oe][Te]=$e;for(ve=0;17>ve;++ve)we.Xc[W][ve]=we.Wc[W][Qu[ve]]}return T.kc=Mt(ue),T.kc&&(T.Bd=yt(ue,8)),T.cb=1}function _s(T,B,W,oe,ve,ue,we){var Te=B[ve].Yb[W];for(W=0;16>ve;++ve){if(!Jt(T,Te[W+0]))return ve;for(;!Jt(T,Te[W+1]);)if(Te=B[++ve].Yb[0],W=0,ve==16)return 16;var ze=B[ve+1].Yb;if(Jt(T,Te[W+2])){var $e=T,ht=0;if(Jt($e,(Gt=Te)[(At=W)+3]))if(Jt($e,Gt[At+6])){for(Te=0,At=2*(ht=Jt($e,Gt[At+8]))+(Gt=Jt($e,Gt[At+9+ht])),ht=0,Gt=Xs[At];Gt[Te];++Te)ht+=ht+Jt($e,Gt[Te]);ht+=3+(8<($e=T).b&&zt($e);var At,Gt=$e.b,$t=(At=$e.Ca>>1)-($e.I>>Gt)>>31;--$e.b,$e.Ca+=$t,$e.Ca|=1,$e.I-=(At+1&$t)<>4,T.zb=B.j-W>>4,0>T.yb&&(T.yb=0),0>T.zb&&(T.zb=0)),T.Va=B.o+15+W>>4,T.Hb=B.va+15+W>>4,T.Hb>T.za&&(T.Hb=T.za),T.Va>T.Ub&&(T.Va=T.Ub),0W;++W){var ve;if(T.Qa.Cb){var ue=T.Qa.Lb[W];T.Qa.Fb||(ue+=oe.Tb)}else ue=oe.Tb;for(ve=0;1>=ve;++ve){var we=T.gd[W][ve],Te=ue;if(oe.Pc&&(Te+=oe.vd[0],ve&&(Te+=oe.od[0])),0<(Te=0>Te?0:63>2:ze>>1)>9-oe.wb&&(ze=9-oe.wb),1>ze&&(ze=1),we.dd=ze,we.tc=2*Te+ze,we.ld=40<=Te?2:15<=Te?1:0}else we.tc=0;we.La=ve}}}W=0}else Lo(T,6,"Frame setup failed"),W=T.a;if(W=W==0){if(W){T.$c=0,0T.Vb){if(T.Vb=0,T.Ec=u(we),T.Fc=0,T.Ec==null){W=Lo(T,1,"no memory during frame initialization.");break e}T.Vb=we}we=T.Ec,Te=T.Fc,T.Ac=we,T.Bc=Te,Te+=oe,T.Gd=c($e,Mo),T.Hd=0,T.rb=c(ht+1,Ps),T.sb=1,T.wa=At?c(At,cu):null,T.Y=0,T.D.Nb=0,T.D.wa=T.wa,T.D.Y=T.Y,0=W;++W)kc[255+W]=0>W?-W:W;for(W=-1020;1020>=W;++W)Ac[1020+W]=-128>W?-128:127=W;++W)p0[112+W]=-16>W?-16:15=W;++W)wn[255+W]=0>W?0:255Mr;++Mr){var On,kn=qi[0+Mr];for(On=0;4>On;++On){kn=oa[Zr[ii+On]][kn];for(var Vn=Tc[Jt(Or,kn[0])];0>3;for(Vn=0;256>Vn;Vn+=16)Mr[xn+Vn]=xo}co=1,Qi=ii[0]}var In=15&Or.la,Pn=15&qn.la;for(Vn=0;4>Vn;++Vn){var Ao=1&Pn;for(xo=Cn=0;4>xo;++xo)In=In>>1|(Ao=(gn=ts(Zr,Qi,gn=Ao+(1&In),ui.Sc,co,Mr,xn))>co)<<7,Cn=Cn<<2|(3>=4,Pn=Pn>>1|Ao<<7,On=(On<<8|Cn)>>>0}for(Qi=In,co=Pn>>4,no=0;4>no;no+=2){for(Cn=0,In=Or.la>>4+no,Pn=qn.la>>4+no,Vn=0;2>Vn;++Vn){for(Ao=1&Pn,xo=0;2>xo;++xo)gn=Ao+(1&In),In=In>>1|(Ao=0<(gn=ts(Zr,ii[2],gn,ui.Qc,0,Mr,xn)))<<3,Cn=Cn<<2|(3>=2,Pn=Pn>>1|Ao<<5}kn|=Cn<<4*no,Qi|=In<<4<=Dt.zb&&Dt.M<=Dt.Va,Dt.Aa==0)e:{if(rr.M=Dt.M,rr.uc=Or,gu(Dt,rr),Lr=1,rr=(Cn=Dt.D).Nb,Or=(kn=Se[Dt.L])*Dt.R,Zr=kn/2*Dt.B,Vn=16*rr*Dt.R,xo=8*rr*Dt.B,ii=Dt.sa,qi=Dt.ta-Or+Vn,ui=Dt.qa,Mr=Dt.ra-Zr+xo,xn=Dt.Ha,qn=Dt.Ia-Zr+xo,Pn=(In=Cn.M)==0,On=In>=Dt.Va-1,Dt.Aa==2&&gu(Dt,Cn),Cn.uc)for(Ao=(gn=Dt).D.M,e(gn.D.uc),Cn=gn.yb;CnEt.o&&(In=Et.o),Et.F=null,Et.J=null,Dt.Fa!=null&&0>1),Et.W+=Dt.B*(kn>>1),Et.F!=null&&(Et.J+=Et.width*kn)),Cn>1,Et.W+=Et.v>>1,Et.F!=null&&(Et.J+=Et.v),Et.ka=Cn-Et.j,Et.U=Et.va-Et.v,Et.T=In-Cn,Lr=Et.put(Et))}rr+1!=Dt.Ic||On||(i(Dt.sa,Dt.ta-Or,ii,qi+16*Dt.R,Or),i(Dt.qa,Dt.ra-Zr,ui,Mr+8*Dt.B,Zr),i(Dt.Ha,Dt.Ia-Zr,xn,qn+8*Dt.B,Zr))}if(!Lr)return Lo($t,6,"Output aborted.")}return 1}(T,B)),B.bc!=null&&B.bc(B),W&=1}return W?(T.cb=0,W):0}function as(T,B,W,oe,ve){ve=T[B+W+32*oe]+(ve>>3),T[B+W+32*oe]=-256&ve?0>ve?0:255:ve}function Ds(T,B,W,oe,ve,ue){as(T,B,0,W,oe+ve),as(T,B,1,W,oe+ue),as(T,B,2,W,oe-ue),as(T,B,3,W,oe-ve)}function Ka(T){return(20091*T>>16)+T}function zl(T,B,W,oe){var ve,ue=0,we=u(16);for(ve=0;4>ve;++ve){var Te=T[B+0]+T[B+8],ze=T[B+0]-T[B+8],$e=(35468*T[B+4]>>16)-Ka(T[B+12]),ht=Ka(T[B+4])+(35468*T[B+12]>>16);we[ue+0]=Te+ht,we[ue+1]=ze+$e,we[ue+2]=ze-$e,we[ue+3]=Te-ht,ue+=4,B++}for(ve=ue=0;4>ve;++ve)Te=(T=we[ue+0]+4)+we[ue+8],ze=T-we[ue+8],$e=(35468*we[ue+4]>>16)-Ka(we[ue+12]),as(W,oe,0,0,Te+(ht=Ka(we[ue+4])+(35468*we[ue+12]>>16))),as(W,oe,1,0,ze+$e),as(W,oe,2,0,ze-$e),as(W,oe,3,0,Te-ht),ue++,oe+=32}function il(T,B,W,oe){var ve=T[B+0]+4,ue=35468*T[B+4]>>16,we=Ka(T[B+4]),Te=35468*T[B+1]>>16;Ds(W,oe,0,ve+we,T=Ka(T[B+1]),Te),Ds(W,oe,1,ve+ue,T,Te),Ds(W,oe,2,ve-ue,T,Te),Ds(W,oe,3,ve-we,T,Te)}function vc(T,B,W,oe,ve){zl(T,B,W,oe),ve&&zl(T,B+16,W,oe+4)}function fu(T,B,W,oe){Ca(T,B+0,W,oe,1),Ca(T,B+32,W,oe+128,1)}function bc(T,B,W,oe){var ve;for(T=T[B+0]+4,ve=0;4>ve;++ve)for(B=0;4>B;++B)as(W,oe,B,ve,T)}function zs(T,B,W,oe){T[B+0]&&Yn(T,B+0,W,oe),T[B+16]&&Yn(T,B+16,W,oe+4),T[B+32]&&Yn(T,B+32,W,oe+128),T[B+48]&&Yn(T,B+48,W,oe+128+4)}function hu(T,B,W,oe){var ve,ue=u(16);for(ve=0;4>ve;++ve){var we=T[B+0+ve]+T[B+12+ve],Te=T[B+4+ve]+T[B+8+ve],ze=T[B+4+ve]-T[B+8+ve],$e=T[B+0+ve]-T[B+12+ve];ue[0+ve]=we+Te,ue[8+ve]=we-Te,ue[4+ve]=$e+ze,ue[12+ve]=$e-ze}for(ve=0;4>ve;++ve)we=(T=ue[0+4*ve]+3)+ue[3+4*ve],Te=ue[1+4*ve]+ue[2+4*ve],ze=ue[1+4*ve]-ue[2+4*ve],$e=T-ue[3+4*ve],W[oe+0]=we+Te>>3,W[oe+16]=$e+ze>>3,W[oe+32]=we-Te>>3,W[oe+48]=$e-ze>>3,oe+=64}function Nl(T,B,W){var oe,ve=B-32,ue=Fo,we=255-T[ve-1];for(oe=0;oeW;++W)i(T,B+32*W,T,B-32,16)}function qa(T,B){var W;for(W=16;0oe;++oe)o(B,W+32*oe,T,16)}function Aa(T,B){var W,oe=16;for(W=0;16>W;++W)oe+=T[B-1+32*W]+T[B+W-32];Rs(oe>>5,T,B)}function O(T,B){var W,oe=8;for(W=0;16>W;++W)oe+=T[B-1+32*W];Rs(oe>>4,T,B)}function X(T,B){var W,oe=8;for(W=0;16>W;++W)oe+=T[B+W-32];Rs(oe>>4,T,B)}function ce(T,B){Rs(128,T,B)}function De(T,B,W){return T+2*B+W+2>>2}function et(T,B){var W,oe=B-32;for(oe=new Uint8Array([De(T[oe-1],T[oe+0],T[oe+1]),De(T[oe+0],T[oe+1],T[oe+2]),De(T[oe+1],T[oe+2],T[oe+3]),De(T[oe+2],T[oe+3],T[oe+4])]),W=0;4>W;++W)i(T,B+32*W,oe,0,oe.length)}function vt(T,B){var W=T[B-1],oe=T[B-1+32],ve=T[B-1+64],ue=T[B-1+96];_r(T,B+0,16843009*De(T[B-1-32],W,oe)),_r(T,B+32,16843009*De(W,oe,ve)),_r(T,B+64,16843009*De(oe,ve,ue)),_r(T,B+96,16843009*De(ve,ue,ue))}function Ft(T,B){var W,oe=4;for(W=0;4>W;++W)oe+=T[B+W-32]+T[B-1+32*W];for(oe>>=3,W=0;4>W;++W)o(T,B+32*W,oe,4)}function Ot(T,B){var W=T[B-1+0],oe=T[B-1+32],ve=T[B-1+64],ue=T[B-1-32],we=T[B+0-32],Te=T[B+1-32],ze=T[B+2-32],$e=T[B+3-32];T[B+0+96]=De(oe,ve,T[B-1+96]),T[B+1+96]=T[B+0+64]=De(W,oe,ve),T[B+2+96]=T[B+1+64]=T[B+0+32]=De(ue,W,oe),T[B+3+96]=T[B+2+64]=T[B+1+32]=T[B+0+0]=De(we,ue,W),T[B+3+64]=T[B+2+32]=T[B+1+0]=De(Te,we,ue),T[B+3+32]=T[B+2+0]=De(ze,Te,we),T[B+3+0]=De($e,ze,Te)}function yr(T,B){var W=T[B+1-32],oe=T[B+2-32],ve=T[B+3-32],ue=T[B+4-32],we=T[B+5-32],Te=T[B+6-32],ze=T[B+7-32];T[B+0+0]=De(T[B+0-32],W,oe),T[B+1+0]=T[B+0+32]=De(W,oe,ve),T[B+2+0]=T[B+1+32]=T[B+0+64]=De(oe,ve,ue),T[B+3+0]=T[B+2+32]=T[B+1+64]=T[B+0+96]=De(ve,ue,we),T[B+3+32]=T[B+2+64]=T[B+1+96]=De(ue,we,Te),T[B+3+64]=T[B+2+96]=De(we,Te,ze),T[B+3+96]=De(Te,ze,ze)}function hr(T,B){var W=T[B-1+0],oe=T[B-1+32],ve=T[B-1+64],ue=T[B-1-32],we=T[B+0-32],Te=T[B+1-32],ze=T[B+2-32],$e=T[B+3-32];T[B+0+0]=T[B+1+64]=ue+we+1>>1,T[B+1+0]=T[B+2+64]=we+Te+1>>1,T[B+2+0]=T[B+3+64]=Te+ze+1>>1,T[B+3+0]=ze+$e+1>>1,T[B+0+96]=De(ve,oe,W),T[B+0+64]=De(oe,W,ue),T[B+0+32]=T[B+1+96]=De(W,ue,we),T[B+1+32]=T[B+2+96]=De(ue,we,Te),T[B+2+32]=T[B+3+96]=De(we,Te,ze),T[B+3+32]=De(Te,ze,$e)}function br(T,B){var W=T[B+0-32],oe=T[B+1-32],ve=T[B+2-32],ue=T[B+3-32],we=T[B+4-32],Te=T[B+5-32],ze=T[B+6-32],$e=T[B+7-32];T[B+0+0]=W+oe+1>>1,T[B+1+0]=T[B+0+64]=oe+ve+1>>1,T[B+2+0]=T[B+1+64]=ve+ue+1>>1,T[B+3+0]=T[B+2+64]=ue+we+1>>1,T[B+0+32]=De(W,oe,ve),T[B+1+32]=T[B+0+96]=De(oe,ve,ue),T[B+2+32]=T[B+1+96]=De(ve,ue,we),T[B+3+32]=T[B+2+96]=De(ue,we,Te),T[B+3+64]=De(we,Te,ze),T[B+3+96]=De(Te,ze,$e)}function kr(T,B){var W=T[B-1+0],oe=T[B-1+32],ve=T[B-1+64],ue=T[B-1+96];T[B+0+0]=W+oe+1>>1,T[B+2+0]=T[B+0+32]=oe+ve+1>>1,T[B+2+32]=T[B+0+64]=ve+ue+1>>1,T[B+1+0]=De(W,oe,ve),T[B+3+0]=T[B+1+32]=De(oe,ve,ue),T[B+3+32]=T[B+1+64]=De(ve,ue,ue),T[B+3+64]=T[B+2+64]=T[B+0+96]=T[B+1+96]=T[B+2+96]=T[B+3+96]=ue}function Nr(T,B){var W=T[B-1+0],oe=T[B-1+32],ve=T[B-1+64],ue=T[B-1+96],we=T[B-1-32],Te=T[B+0-32],ze=T[B+1-32],$e=T[B+2-32];T[B+0+0]=T[B+2+32]=W+we+1>>1,T[B+0+32]=T[B+2+64]=oe+W+1>>1,T[B+0+64]=T[B+2+96]=ve+oe+1>>1,T[B+0+96]=ue+ve+1>>1,T[B+3+0]=De(Te,ze,$e),T[B+2+0]=De(we,Te,ze),T[B+1+0]=T[B+3+32]=De(W,we,Te),T[B+1+32]=T[B+3+64]=De(oe,W,we),T[B+1+64]=T[B+3+96]=De(ve,oe,W),T[B+1+96]=De(ue,ve,oe)}function Xr(T,B){var W;for(W=0;8>W;++W)i(T,B+32*W,T,B-32,8)}function xi(T,B){var W;for(W=0;8>W;++W)o(T,B,T[B-1],8),B+=32}function at(T,B,W){var oe;for(oe=0;8>oe;++oe)o(B,W+32*oe,T,8)}function m(T,B){var W,oe=8;for(W=0;8>W;++W)oe+=T[B+W-32]+T[B-1+32*W];at(oe>>4,T,B)}function xr(T,B){var W,oe=4;for(W=0;8>W;++W)oe+=T[B+W-32];at(oe>>3,T,B)}function h(T,B){var W,oe=4;for(W=0;8>W;++W)oe+=T[B-1+32*W];at(oe>>3,T,B)}function P(T,B){at(128,T,B)}function hi(T,B,W){var oe=T[B-W],ve=T[B+0],ue=3*(ve-oe)+Ec[1020+T[B-2*W]-T[B+W]],we=Oo[112+(ue+4>>3)];T[B-W]=Fo[255+oe+Oo[112+(ue+3>>3)]],T[B+0]=Fo[255+ve-we]}function Ni(T,B,W,oe){var ve=T[B+0],ue=T[B+W];return ma[255+T[B-2*W]-T[B-W]]>oe||ma[255+ue-ve]>oe}function Co(T,B,W,oe){return 4*ma[255+T[B-W]-T[B+0]]+ma[255+T[B-2*W]-T[B+W]]<=oe}function re(T,B,W,oe,ve){var ue=T[B-3*W],we=T[B-2*W],Te=T[B-W],ze=T[B+0],$e=T[B+W],ht=T[B+2*W],At=T[B+3*W];return 4*ma[255+Te-ze]+ma[255+we-$e]>oe?0:ma[255+T[B-4*W]-ue]<=ve&&ma[255+ue-we]<=ve&&ma[255+we-Te]<=ve&&ma[255+At-ht]<=ve&&ma[255+ht-$e]<=ve&&ma[255+$e-ze]<=ve}function Tn(T,B,W,oe){var ve=2*oe+1;for(oe=0;16>oe;++oe)Co(T,B+oe,W,ve)&&hi(T,B+oe,W)}function Os(T,B,W,oe){var ve=2*oe+1;for(oe=0;16>oe;++oe)Co(T,B+oe*W,1,ve)&&hi(T,B+oe*W,1)}function Rl(T,B,W,oe){var ve;for(ve=3;0>7,Et=18*Lr+63>>7,Lr=9*Lr+63>>7;ze[$e-3*ht]=Fo[255+ze[$e-3*ht]+Lr],ze[$e-2*ht]=Fo[255+At+Et],ze[$e-ht]=Fo[255+Gt+Dt],ze[$e+0]=Fo[255+$t-Dt],ze[$e+ht]=Fo[255+Pr-Et],ze[$e+2*ht]=Fo[255+rr-Lr]}B+=oe}}function Ja(T,B,W,oe,ve,ue,we,Te){for(ue=2*ue+1;0>3)],rr=Oo[112+(rr+3>>3)],Dt=Pr+1>>1;ze[$e-2*ht]=Fo[255+ze[$e-2*ht]+Dt],ze[$e-ht]=Fo[255+At+rr],ze[$e+0]=Fo[255+Gt-Pr],ze[$e+ht]=Fo[255+$t-Dt]}B+=oe}}function pu(T,B,W,oe,ve,ue){nl(T,B,W,1,16,oe,ve,ue)}function vl(T,B,W,oe,ve,ue){nl(T,B,1,W,16,oe,ve,ue)}function bl(T,B,W,oe,ve,ue){var we;for(we=3;0$e?0:255:$e)&255,$e=ze,ve[ue+Te]=ht}}function Gu(T,B,W,oe){var ve=B.width,ue=B.o;if(e(T!=null&&B!=null),0>W||0>=oe||W+oe>ue)return null;if(!T.Cc){if(T.ga==null){var we;if(T.ga=new vs,(we=T.ga==null)||(we=B.width*B.o,e(T.Gb.length==0),T.Gb=u(we),T.Uc=0,T.Gb==null?we=0:(T.mb=T.Gb,T.nb=T.Uc,T.rc=null,we=1),we=!we),!we){we=T.ga;var Te=T.Fa,ze=T.P,$e=T.qc,ht=T.mb,At=T.nb,Gt=ze+1,$t=$e-1,Pr=we.l;if(e(Te!=null&&ht!=null&&B!=null),Ia[0]=null,Ia[1]=mu,Ia[2]=Bl,Ia[3]=bs,we.ca=ht,we.tb=At,we.c=B.width,we.i=B.height,e(0=$e)B=0;else if(we.$a=Te[ze+0]>>0&3,we.Z=Te[ze+0]>>2&3,we.Lc=Te[ze+0]>>4&3,ze=Te[ze+0]>>6&3,0>we.$a||1=we.c*we.i;we=!B}if(we)return null;T.ga.Lc!=1?T.Ga=0:oe=ue-W}e(T.ga!=null),e(W+oe<=ue);e:{if(B=(Te=T.ga).c,ue=Te.l.o,Te.$a==0){if(Gt=T.rc,$t=T.Vc,Pr=T.Fa,ze=T.P+1+W*B,$e=T.mb,ht=T.nb+W*B,e(ze<=T.P+T.qc),Te.Z!=0)for(e(Ia[Te.Z]!=null),we=0;we=B)B=1;else if(Te.ic||Ar(),Te.ic){Te=we.V,Gt=we.Ba,$t=we.c;var rr=we.i,Dt=(Pr=1,ze=we.$/$t,$e=we.$%$t,ht=we.m,At=we.s,we.$),Et=$t*rr,Lr=$t*B,Or=At.wc,Mr=Dt(rr=Wt(Mr.G[0],Mr.H[0],ht)))Te[Gt+Dt]=rr,++Dt,++$e>=$t&&($e=0,++ze<=B&&!(ze%16)&&Ai(we,ze));else{if(!(280>rr)){Pr=0;break t}rr=pe(rr-256,ht);var Zr,ii=Wt(Mr.G[4],Mr.H[4],ht);if(Nt(ht),!(Dt>=(ii=ir($t,ii=pe(ii,ht)))&&Et-Dt>=rr)){Pr=0;break t}for(Zr=0;Zr=$t;)$e-=$t,++ze<=B&&!(ze%16)&&Ai(we,ze);DtB?B:ze);break t}!Pr||ht.h&&Dt=ue&&(T.Cc=1),oe=1}if(!oe)return null;if(T.Cc&&((oe=T.ga)!=null&&(oe.mc=null),T.ga=null,0>23,Te[ze+4*we+1]=Te[ze+4*we+1]*At>>23,Te[ze+4*we+2]=Te[ze+4*we+2]*At>>23)}B+=ue}}function Ve(T,B,W,oe,ve){for(;0>4)*ze>>16;T[B+2*ue+0]=(240&we|we>>4)*ze>>16&240|(15&we|we<<4)*ze>>16>>4&15,T[B+2*ue+1]=240&$e|Te}B+=ve}}function Rt(T,B,W,oe,ve,ue,we,Te){var ze,$e,ht=255;for($e=0;$e>8}function Ar(){ks=ie,bu=Ve,wu=Rt,d0=lr}function qr(T,B,W){he[T]=function(oe,ve,ue,we,Te,ze,$e,ht,At,Gt,$t,Pr,rr,Dt,Et,Lr,Or){var Mr,Zr=Or-1>>1,ii=Te[ze+0]|$e[ht+0]<<16,qi=At[Gt+0]|$t[Pr+0]<<16;e(oe!=null);var ui=3*ii+qi+131074>>2;for(B(oe[ve+0],255&ui,ui>>16,rr,Dt),ue!=null&&(ui=3*qi+ii+131074>>2,B(ue[we+0],255&ui,ui>>16,Et,Lr)),Mr=1;Mr<=Zr;++Mr){var xn=Te[ze+Mr]|$e[ht+Mr]<<16,qn=At[Gt+Mr]|$t[Pr+Mr]<<16,On=ii+xn+qi+qn+524296,kn=On+2*(xn+qi)>>3;ui=kn+ii>>1,ii=(On=On+2*(ii+qn)>>3)+xn>>1,B(oe[ve+2*Mr-1],255&ui,ui>>16,rr,Dt+(2*Mr-1)*W),B(oe[ve+2*Mr-0],255&ii,ii>>16,rr,Dt+(2*Mr-0)*W),ue!=null&&(ui=On+qi>>1,ii=kn+qn>>1,B(ue[we+2*Mr-1],255&ui,ui>>16,Et,Lr+(2*Mr-1)*W),B(ue[we+2*Mr+0],255&ii,ii>>16,Et,Lr+(2*Mr+0)*W)),ii=xn,qi=qn}1&Or||(ui=3*ii+qi+131074>>2,B(oe[ve+Or-1],255&ui,ui>>16,rr,Dt+(Or-1)*W),ue!=null&&(ui=3*qi+ii+131074>>2,B(ue[we+Or-1],255&ui,ui>>16,Et,Lr+(Or-1)*W)))}}function Wr(){rs[Cc]=ec,rs[Zu]=Mc,rs[Xu]=Su,rs[Gl]=Ga,rs[Ic]=Wl,rs[En]=Dc,rs[Bo]=e0,rs[Yu]=Mc,rs[Gs]=Ga,rs[Lc]=Wl,rs[xu]=Dc}function Pi(T){return T&~p?0>T?0:255:T>>R}function di(T,B){return Pi((19077*T>>8)+(26149*B>>8)-14234)}function vn(T,B,W){return Pi((19077*T>>8)-(6419*B>>8)-(13320*W>>8)+8708)}function Gi(T,B){return Pi((19077*T>>8)+(33050*B>>8)-17685)}function rn(T,B,W,oe,ve){oe[ve+0]=di(T,W),oe[ve+1]=vn(T,B,W),oe[ve+2]=Gi(T,B)}function Do(T,B,W,oe,ve){oe[ve+0]=Gi(T,B),oe[ve+1]=vn(T,B,W),oe[ve+2]=di(T,W)}function $o(T,B,W,oe,ve){var ue=vn(T,B,W);B=ue<<3&224|Gi(T,B)>>3,oe[ve+0]=248&di(T,W)|ue>>5,oe[ve+1]=B}function na(T,B,W,oe,ve){var ue=240&Gi(T,B)|15;oe[ve+0]=240&di(T,W)|vn(T,B,W)>>4,oe[ve+1]=ue}function Sa(T,B,W,oe,ve){oe[ve+0]=255,rn(T,B,W,oe,ve+1)}function Ro(T,B,W,oe,ve){Do(T,B,W,oe,ve),oe[ve+3]=255}function Nn(T,B,W,oe,ve){rn(T,B,W,oe,ve),oe[ve+3]=255}function Ea(T,B){return 0>T?0:T>B?B:T}function js(T,B,W){he[T]=function(oe,ve,ue,we,Te,ze,$e,ht,At){for(var Gt=ht+(-2&At)*W;ht!=Gt;)B(oe[ve+0],ue[we+0],Te[ze+0],$e,ht),B(oe[ve+1],ue[we+0],Te[ze+0],$e,ht+W),ve+=2,++we,++ze,ht+=2*W;1&At&&B(oe[ve+0],ue[we+0],Te[ze+0],$e,ht)}}function Us(T,B,W){return W==0?T==0?B==0?6:5:B==0?4:0:W}function al(T,B,W,oe,ve){switch(T>>>30){case 3:Ca(B,W,oe,ve,0);break;case 2:$s(B,W,oe,ve);break;case 1:Yn(B,W,oe,ve)}}function gu(T,B){var W,oe,ve=B.M,ue=B.Nb,we=T.oc,Te=T.pc+40,ze=T.oc,$e=T.pc+584,ht=T.oc,At=T.pc+600;for(W=0;16>W;++W)we[Te+32*W-1]=129;for(W=0;8>W;++W)ze[$e+32*W-1]=129,ht[At+32*W-1]=129;for(0W;++W)i(we,Te+32*W-4,we,Te+32*W+12,4);for(W=-1;8>W;++W)i(ze,$e+32*W-4,ze,$e+32*W+4,4),i(ht,At+32*W-4,ht,At+32*W+4,4)}var $t=T.Gd,Pr=T.Hd+oe,rr=Gt.ad,Dt=Gt.Hc;if(0=T.za-1?o(Et,Lr,$t[Pr].y[15],4):i(Et,Lr,$t[Pr+1].y,0,4)),W=0;4>W;W++)Et[Lr+128+W]=Et[Lr+256+W]=Et[Lr+384+W]=Et[Lr+0+W];for(W=0;16>W;++W,Dt<<=2)Et=we,Lr=Te+ye[W],aa[Gt.Ob[W]](Et,Lr),al(Dt,rr,16*+W,Et,Lr)}else if(Et=Us(oe,ve,Gt.Ob[0]),As[Et](we,Te),Dt!=0)for(W=0;16>W;++W,Dt<<=2)al(Dt,rr,16*+W,we,Te+ye[W]);for(W=Gt.Gc,Et=Us(oe,ve,Gt.Dd),Ss[Et](ze,$e),Ss[Et](ht,At),Dt=rr,Et=ze,Lr=$e,255&(Gt=W>>0)&&(170&Gt?bo(Dt,256,Et,Lr):kl(Dt,256,Et,Lr)),Gt=ht,Dt=At,255&(W>>=8)&&(170&W?bo(rr,320,Gt,Dt):kl(rr,320,Gt,Dt)),veW;++W)i($t,Pr+W*T.R,we,Te+32*W,16);for(W=0;8>W;++W)i(rr,Gt+W*T.B,ze,$e+32*W,8),i(Dt,Et+W*T.B,ht,At+32*W,8)}}function yu(T,B,W,oe,ve,ue,we,Te,ze){var $e=[0],ht=[0],At=0,Gt=ze!=null?ze.kd:0,$t=ze??new ol;if(T==null||12>W)return 7;$t.data=T,$t.w=B,$t.ha=W,B=[B],W=[W],$t.gb=[$t.gb];e:{var Pr=B,rr=W,Dt=$t.gb;if(e(T!=null),e(rr!=null),e(Dt!=null),Dt[0]=0,12<=rr[0]&&!r(T,Pr[0],"RIFF")){if(r(T,Pr[0]+8,"WEBP")){Dt=3;break e}var Et=It(T,Pr[0]+4);if(12>Et||4294967286rr[0]-8){Dt=7;break e}Dt[0]=Et,Pr[0]+=12,rr[0]-=12}Dt=0}if(Dt!=0)return Dt;for(Et=0<$t.gb[0],W=W[0];;){e:{var Lr=T;rr=B,Dt=W;var Or=$e,Mr=ht,Zr=Pr=[0];if((ui=At=[At])[0]=0,8>Dt[0])Dt=7;else{if(!r(Lr,rr[0],"VP8X")){if(It(Lr,rr[0]+4)!=10){Dt=3;break e}if(18>Dt[0]){Dt=7;break e}var ii=It(Lr,rr[0]+8),qi=1+Qt(Lr,rr[0]+12);if(2147483648<=qi*(Lr=1+Qt(Lr,rr[0]+15))){Dt=3;break e}Zr!=null&&(Zr[0]=ii),Or!=null&&(Or[0]=qi),Mr!=null&&(Mr[0]=Lr),rr[0]+=18,Dt[0]-=18,ui[0]=1}Dt=0}}if(At=At[0],Pr=Pr[0],Dt!=0)return Dt;if(rr=!!(2&Pr),!Et&&At)return 3;if(ue!=null&&(ue[0]=!!(16&Pr)),we!=null&&(we[0]=rr),Te!=null&&(Te[0]=0),we=$e[0],Pr=ht[0],At&&rr&&ze==null){Dt=0;break}if(4>W){Dt=7;break}if(Et&&At||!Et&&!At&&!r(T,B[0],"ALPH")){W=[W],$t.na=[$t.na],$t.P=[$t.P],$t.Sa=[$t.Sa];e:{ii=T,Dt=B,Et=W;var ui=$t.gb;Or=$t.na,Mr=$t.P,Zr=$t.Sa,qi=22,e(ii!=null),e(Et!=null),Lr=Dt[0];var xn=Et[0];for(e(Or!=null),e(Zr!=null),Or[0]=null,Mr[0]=null,Zr[0]=0;;){if(Dt[0]=Lr,Et[0]=xn,8>xn){Dt=7;break e}var qn=It(ii,Lr+4);if(4294967286ui){Dt=3;break e}if(!r(ii,Lr,"VP8 ")||!r(ii,Lr,"VP8L")){Dt=0;break e}if(xn[0]Et[0])Dt=7;else{if(Lr||qi){if(ui=It(ui,ii+4),12<=Or&&ui>Or-12){Dt=3;break e}if(Gt&&ui>Et[0]-8){Dt=7;break e}Mr[0]=ui,Dt[0]+=8,Et[0]-=8,Zr[0]=qi}else Zr[0]=5<=Et[0]&&ui[ii+0]==47&&!(ui[ii+4]>>5),Mr[0]=Et[0];Dt=0}if(W=W[0],$t.Ja=$t.Ja[0],$t.xa=$t.xa[0],B=B[0],Dt!=0)break;if(4294967286<$t.Ja)return 3;if(Te==null||rr||(Te[0]=$t.xa?2:1),we=[we],Pr=[Pr],$t.xa){if(5>W){Dt=7;break}Te=we,Gt=Pr,rr=ue,T==null||5>W?T=0:5<=W&&T[B+0]==47&&!(T[B+4]>>5)?(Et=[0],ui=[0],Or=[0],ot(Mr=new _e,T,B,W),lt(Mr,Et,ui,Or)?(Te!=null&&(Te[0]=Et[0]),Gt!=null&&(Gt[0]=ui[0]),rr!=null&&(rr[0]=Or[0]),T=1):T=0):T=0}else{if(10>W){Dt=7;break}Te=Pr,T==null||10>W||!tl(T,B+3,W-3)?T=0:(Gt=T[B+0]|T[B+1]<<8|T[B+2]<<16,rr=16383&(T[B+7]<<8|T[B+6]),T=16383&(T[B+9]<<8|T[B+8]),1&Gt||3<(Gt>>1&7)||!(Gt>>4&1)||Gt>>5>=$t.Ja||!rr||!T?T=0:(we&&(we[0]=rr),Te&&(Te[0]=T),T=1))}if(!T||(we=we[0],Pr=Pr[0],At&&($e[0]!=we||ht[0]!=Pr)))return 3;ze!=null&&(ze[0]=$t,ze.offset=B-ze.w,e(4294967286>B-ze.w),e(ze.offset==ze.ha-W));break}return Dt==0||Dt==7&&At&&ze==null?(ue!=null&&(ue[0]|=$t.na!=null&&0<$t.na.length),oe!=null&&(oe[0]=we),ve!=null&&(ve[0]=Pr),0):Dt}function Go(T,B,W){var oe=B.width,ve=B.height,ue=0,we=0,Te=oe,ze=ve;if(B.Da=T!=null&&0W||(ue&=-2,we&=-2),0>ue||0>we||0>=Te||0>=ze||ue+Te>oe||we+ze>ve))return 0;if(B.v=ue,B.j=we,B.va=ue+Te,B.o=we+ze,B.U=Te,B.T=ze,B.da=T!=null&&0T.S){var B=T.f.RGBA;B.fb+=(T.height-1)*B.A,B.A=-B.A}else B=T.f.kb,T=T.height,B.O+=(T-1)*B.fa,B.fa=-B.fa,B.N+=(T-1>>1)*B.Ab,B.Ab=-B.Ab,B.W+=(T-1>>1)*B.Db,B.Db=-B.Db,B.F!=null&&(B.J+=(T-1)*B.lb,B.lb=-B.lb);return 0}function _a(T,B,W,oe){if(oe==null||0>=T||0>=B)return 2;if(W!=null){if(W.Da){var ve=W.cd,ue=W.bd,we=-2&W.v,Te=-2&W.j;if(0>we||0>Te||0>=ve||0>=ue||we+ve>T||Te+ue>B)return 2;T=ve,B=ue}if(W.da){if(!gr(T,B,ve=[W.ib],ue=[W.hb]))return 2;T=ve[0],B=ue[0]}}oe.width=T,oe.height=B;e:{var ze=oe.width,$e=oe.height;if(T=oe.S,0>=ze||0>=$e||!(T>=Cc&&13>T))T=2;else{if(0>=oe.Rd&&oe.sd==null){we=ue=ve=B=0;var ht=(Te=ze*bt[T])*$e;if(11>T||(ue=($e+1)/2*(B=(ze+1)/2),T==12&&(we=(ve=ze)*$e)),($e=u(ht+2*ue+we))==null){T=1;break e}oe.sd=$e,11>T?((ze=oe.f.RGBA).eb=$e,ze.fb=0,ze.A=Te,ze.size=ht):((ze=oe.f.kb).y=$e,ze.O=0,ze.fa=Te,ze.Fd=ht,ze.f=$e,ze.N=0+ht,ze.Ab=B,ze.Cd=ue,ze.ea=$e,ze.W=0+ht+ue,ze.Db=B,ze.Ed=ue,T==12&&(ze.F=$e,ze.J=0+ht+2*ue),ze.Tc=we,ze.lb=ve)}if(B=1,ve=oe.S,ue=oe.width,we=oe.height,ve>=Cc&&13>ve)if(11>ve)T=oe.f.RGBA,B&=(Te=Math.abs(T.A))*(we-1)+ue<=T.size,B&=Te>=ue*bt[ve],B&=T.eb!=null;else{T=oe.f.kb,Te=(ue+1)/2,ht=(we+1)/2,ze=Math.abs(T.fa),$e=Math.abs(T.Ab);var At=Math.abs(T.Db),Gt=Math.abs(T.lb),$t=Gt*(we-1)+ue;B&=ze*(we-1)+ue<=T.Fd,B&=$e*(ht-1)+Te<=T.Cd,B=(B&=At*(ht-1)+Te<=T.Ed)&ze>=ue&$e>=Te&At>=Te,B&=T.y!=null,B&=T.f!=null,B&=T.ea!=null,ve==12&&(B&=Gt>=ue,B&=$t<=T.Tc,B&=T.F!=null)}else B=0;T=B?0:2}}return T!=0||W!=null&&W.fd&&(T=qs(oe)),T}var Pa=64,jl=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Ul=24,ws=32,Vs=8,va=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];zr("Predictor0","PredictorAdd0"),he.Predictor0=function(){return 4278190080},he.Predictor1=function(T){return T},he.Predictor2=function(T,B,W){return B[W+0]},he.Predictor3=function(T,B,W){return B[W+1]},he.Predictor4=function(T,B,W){return B[W-1]},he.Predictor5=function(T,B,W){return Vr(Vr(T,B[W+1]),B[W+0])},he.Predictor6=function(T,B,W){return Vr(T,B[W-1])},he.Predictor7=function(T,B,W){return Vr(T,B[W+0])},he.Predictor8=function(T,B,W){return Vr(B[W-1],B[W+0])},he.Predictor9=function(T,B,W){return Vr(B[W+0],B[W+1])},he.Predictor10=function(T,B,W){return Vr(Vr(T,B[W-1]),Vr(B[W+0],B[W+1]))},he.Predictor11=function(T,B,W){var oe=B[W+0];return 0>=Rr(oe>>24&255,T>>24&255,(B=B[W-1])>>24&255)+Rr(oe>>16&255,T>>16&255,B>>16&255)+Rr(oe>>8&255,T>>8&255,B>>8&255)+Rr(255&oe,255&T,255&B)?oe:T},he.Predictor12=function(T,B,W){var oe=B[W+0];return(_i((T>>24&255)+(oe>>24&255)-((B=B[W-1])>>24&255))<<24|_i((T>>16&255)+(oe>>16&255)-(B>>16&255))<<16|_i((T>>8&255)+(oe>>8&255)-(B>>8&255))<<8|_i((255&T)+(255&oe)-(255&B)))>>>0},he.Predictor13=function(T,B,W){var oe=B[W-1];return(Hi((T=Vr(T,B[W+0]))>>24&255,oe>>24&255)<<24|Hi(T>>16&255,oe>>16&255)<<16|Hi(T>>8&255,oe>>8&255)<<8|Hi(T>>0&255,oe>>0&255))>>>0};var ql=he.PredictorAdd0;he.PredictorAdd1=Bi,zr("Predictor2","PredictorAdd2"),zr("Predictor3","PredictorAdd3"),zr("Predictor4","PredictorAdd4"),zr("Predictor5","PredictorAdd5"),zr("Predictor6","PredictorAdd6"),zr("Predictor7","PredictorAdd7"),zr("Predictor8","PredictorAdd8"),zr("Predictor9","PredictorAdd9"),zr("Predictor10","PredictorAdd10"),zr("Predictor11","PredictorAdd11"),zr("Predictor12","PredictorAdd12"),zr("Predictor13","PredictorAdd13");var _u=he.PredictorAdd2;Br("ColorIndexInverseTransform","MapARGB","32b",function(T){return T>>8&255},function(T){return T}),Br("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(T){return T},function(T){return T>>8&255});var vu,Va=he.ColorIndexInverseTransform,Vl=he.MapARGB,ss=he.VP8LColorIndexInverseTransformAlpha,Wu=he.MapAlpha,Hs=he.VP8LPredictorsAdd=[];Hs.length=16,(he.VP8LPredictors=[]).length=16,(he.VP8LPredictorsAdd_C=[]).length=16,(he.VP8LPredictors_C=[]).length=16;var ls,Ha,wl,us,Ma,xl,ua,Ca,$s,bo,Yn,kl,Hl,$l,xs,fa,Qa,vi,cs,wo,Rn,Ko,ri,es,ks,bu,wu,d0,kc=u(511),Ac=u(2041),p0=u(225),wn=u(767),Sc=0,Ec=Ac,Oo=p0,Fo=wn,ma=kc,Cc=0,Zu=1,Xu=2,Gl=3,Ic=4,En=5,Bo=6,Yu=7,Gs=8,Lc=9,xu=10,ku=[2,3,7],Ws=[3,3,11],Zs=[280,256,256,256,40],Qc=[0,1,1,1,0],Zi=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],ln=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Ku=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],$a=8,Ju=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],jo=[4,5,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,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ts=null,Xs=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Au=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Tc=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Jo=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],oa=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],m0=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Qu=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],As=[],aa=[],Ss=[],Pc=1,Al=2,Ia=[],rs=[];qr("UpsampleRgbLinePair",rn,3),qr("UpsampleBgrLinePair",Do,3),qr("UpsampleRgbaLinePair",Nn,4),qr("UpsampleBgraLinePair",Ro,4),qr("UpsampleArgbLinePair",Sa,4),qr("UpsampleRgba4444LinePair",na,2),qr("UpsampleRgb565LinePair",$o,2);var ec=he.UpsampleRgbLinePair,Su=he.UpsampleBgrLinePair,Mc=he.UpsampleRgbaLinePair,Ga=he.UpsampleBgraLinePair,Wl=he.UpsampleArgbLinePair,Dc=he.UpsampleRgba4444LinePair,e0=he.UpsampleRgb565LinePair,Eu=16,tc=1<oe.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),oe.ca.f.kb.F!=null&&Ar()),oe.Pb&&0(ze=W.Md)?0:100$e;++$e)12>(At=ve.pb[$e]).lc&&(At.ia=ze*Le[0>At.lc?0:At.lc]>>3),ht|=At.ia;ht&&(alert("todo:VP8InitRandom"),ve.ia=1)}ve.Ga=W.Id,100ve.Ga&&(ve.Ga=0)}jn(T,oe)||(B=T.a)}}else B=T.a}B==0&&we.Oa!=null&&we.Oa.fd&&(B=qs(we.ba))}we=B}ue=we!=0?null:11>ue?Te.f.RGBA.eb:Te.f.kb.y}else ue=null;return ue};var bt=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function y(he,Ee){for(var Fe="",Ce=0;Ce<4;Ce++)Fe+=String.fromCharCode(he[Ee++]);return Fe}function b(he,Ee){return(he[Ee+0]<<0|he[Ee+1]<<8|he[Ee+2]<<16)>>>0}function A(he,Ee){return(he[Ee+0]<<0|he[Ee+1]<<8|he[Ee+2]<<16|he[Ee+3]<<24)>>>0}new f;var I=[0],C=[0],N=[],F=new f,$=t,G=function(he,Ee){var Fe={},Ce=0,Ie=!1,qe=0,it=0;if(Fe.frames=[],!function(Be,ke,ft,Nt){for(var zt=0;zt>1&1}Ge!="ANMF"&&(Ee+=mt)}return Fe}}($,0);G.response=$,G.rgbaoutput=!0,G.dataurl=!1;var Z=G.header?G.header:null,ee=G.frames?G.frames:null;if(Z){Z.loop_counter=Z.loop_count,I=[Z.canvas_height],C=[Z.canvas_width];for(var Q=0;Q>>1)&255;return G},f=function(I,C,N){var F,$,G,Z,ee=[],Q=I.length;ee[0]=4;for(var Ae=0;Ae>>Ge&255,Ge+=Z.bits;Ee[qe]=Ie>>>Ge&255}}if(Z.bits===16){he=(ge=new Uint32Array(Z.decodePixels().buffer)).length,Fe=new Uint8Array(he*(32/Z.pixelBitlength)*Z.colors),Ee=new Uint8Array(he*(32/Z.pixelBitlength)),Ce=Z.colors>1,qe=0,it=0;for(var mt=0;qe>>0&255,Ce&&(Fe[it++]=Ie>>>16&255,Ie=ge[qe++],Fe[it++]=Ie>>>0&255),Ee[mt++]=Ie>>>16&255;G=8}F!==t.image_compression.NONE&&e()?(I=r(Fe,Z.width*Z.colors,Z.colors,F),ae=r(Ee,Z.width,1,F)):(I=Fe,ae=Ee,xt=void 0)}if(Z.colorType===3&&($=this.color_spaces.INDEXED,Ae=Z.palette,Z.transparency.indexed)){var Xe=Z.transparency.indexed,wt=0;for(qe=0,he=Xe.length;qe=0;t--){for(var i=this.bottom_up?t:this.height-1-t,o=0;o>7-s&1];this.data[c+4*s]=f.blue,this.data[c+4*s+1]=f.green,this.data[c+4*s+2]=f.red,this.data[c+4*s+3]=255}r!==0&&(this.pos+=4-r)}},C0.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,o=0;o>4,f=15&u,y=this.palette[s];if(this.data[c]=y.blue,this.data[c+1]=y.green,this.data[c+2]=y.red,this.data[c+3]=255,2*o+1>=this.width)break;y=this.palette[f],this.data[c+4]=y.blue,this.data[c+4+1]=y.green,this.data[c+4+2]=y.red,this.data[c+4+3]=255}e!==0&&(this.pos+=4-e)}},C0.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i=0;r--){for(var i=this.bottom_up?r:this.height-1-r,o=0;o>5&e)/e*255|0,f=(u>>10&e)/e*255|0,y=u>>15?255:0,b=i*this.width*4+4*o;this.data[b]=f,this.data[b+1]=s,this.data[b+2]=c,this.data[b+3]=y}this.pos+=t}},C0.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var o=this.bottom_up?i:this.height-1-i,u=0;u>5&r)/r*255|0,y=(c>>11)/e*255|0,b=o*this.width*4+4*u;this.data[b]=y,this.data[b+1]=f,this.data[b+2]=s,this.data[b+3]=255}this.pos+=t}},C0.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;ri&&(o.push(t.slice(f,u)),s=0,f=u),s+=e[u],u++;return f!==u&&o.push(t.slice(f,u)),o},Xb=function(t,e,r){r||(r={});var i,o,u,c,s,f,y,b=[],A=[b],I=r.textIndent||0,C=0,N=0,F=t.split(" "),$=T1.apply(this,[" ",r])[0];if(f=r.lineIndent===-1?F[0].length+2:r.lineIndent||0){var G=Array(f).join(" "),Z=[];F.map(function(Q){(Q=Q.split(/\s*\n/)).length>1?Z=Z.concat(Q.map(function(Ae,ae){return(ae&&Ae.length?` `:"")+Ae})):Z.push(Q[0])}),F=Z,f=Wb.apply(this,[G,r])}for(u=0,c=F.length;ue||ee){if(N>e){for(s=Zb.apply(this,[i,o,e-(I+C),e]),b.push(s.shift()),b=[s.pop()];s.length;)A.push([s.shift()]);N=o.slice(i.length-(b[0]?b[0].length:0)).reduce(function(Q,Ae){return Q+Ae},0)}else b=[i];A.push(b),I=N+f,C=$}else b.push(i),I+=C+N,C=$}return y=f?function(Q,Ae){return(Ae?G:"")+Q.join(" ")}:function(Q){return Q.join(" ")},A.map(y)},Hh.splitTextToSize=function(t,e,r){var i,o=(r=r||{}).fontSize||this.internal.getFontSize(),u=(function(b){if(b.widths&&b.kerning)return{widths:b.widths,kerning:b.kerning};var A=this.internal.getFont(b.fontName,b.fontStyle);return A.metadata.Unicode?{widths:A.metadata.Unicode.widths||{0:1},kerning:A.metadata.Unicode.kerning||{}}:{font:A.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);i=Array.isArray(t)?t:String(t).split(/\r?\n/);var c=1*this.internal.scaleFactor*e/o;u.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/o:0,u.lineIndent=r.lineIndent;var s,f,y=[];for(s=0,f=i.length;simport("./index.es.866aa745.js"),[])).catch(function(r){return Promise.reject(new Error("Could not load canvg: "+r))}).then(function(r){return r.default?r.default:r})}Gn.API.addSvgAsImage=function(r,i,o,u,c,s,f,y){if(isNaN(i)||isNaN(o))throw ya.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(u)||isNaN(c))throw ya.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var b=document.createElement("canvas");b.width=u,b.height=c;var A=b.getContext("2d");A.fillStyle="#fff",A.fillRect(0,0,b.width,b.height);var I={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},C=this;return e().then(function(N){return N.fromString(A,r,I)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(N){return N.render(I)}).then(function(){C.addImage(b.toDataURL("image/jpeg",1),i,o,u,c,f,y)})}}(),Gn.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var o=0;o1){for(b=0;be||ee){if(N>e){for(s=Zb.apply(this,[i,o,e-(I+C),e]),b.push(s.shift()),b=[s.pop()];s.length;)A.push([s.shift()]);N=o.slice(i.length-(b[0]?b[0].length:0)).reduce(function(Q,Ae){return Q+Ae},0)}else b=[i];A.push(b),I=N+f,C=$}else b.push(i),I+=C+N,C=$}return y=f?function(Q,Ae){return(Ae?G:"")+Q.join(" ")}:function(Q){return Q.join(" ")},A.map(y)},Hh.splitTextToSize=function(t,e,r){var i,o=(r=r||{}).fontSize||this.internal.getFontSize(),u=(function(b){if(b.widths&&b.kerning)return{widths:b.widths,kerning:b.kerning};var A=this.internal.getFont(b.fontName,b.fontStyle);return A.metadata.Unicode?{widths:A.metadata.Unicode.widths||{0:1},kerning:A.metadata.Unicode.kerning||{}}:{font:A.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);i=Array.isArray(t)?t:String(t).split(/\r?\n/);var c=1*this.internal.scaleFactor*e/o;u.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/o:0,u.lineIndent=r.lineIndent;var s,f,y=[];for(s=0,f=i.length;simport("./index.es.482b19d7.js"),[])).catch(function(r){return Promise.reject(new Error("Could not load canvg: "+r))}).then(function(r){return r.default?r.default:r})}Gn.API.addSvgAsImage=function(r,i,o,u,c,s,f,y){if(isNaN(i)||isNaN(o))throw ya.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(u)||isNaN(c))throw ya.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var b=document.createElement("canvas");b.width=u,b.height=c;var A=b.getContext("2d");A.fillStyle="#fff",A.fillRect(0,0,b.width,b.height);var I={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},C=this;return e().then(function(N){return N.fromString(A,r,I)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(N){return N.render(I)}).then(function(){C.addImage(b.toDataURL("image/jpeg",1),i,o,u,c,f,y)})}}(),Gn.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var o=0;o1){for(b=0;b`,i,o,u;return o=new $W({}),{c(){e=tt("sveltekit:head"),e.innerHTML=r,i=ar(),jt(o.$$.fragment)},l(c){e=rt(c,"SVELTEKIT:HEAD",{"data-svelte-h":!0}),Vo(e)!=="svelte-1sczuhu"&&(e.innerHTML=r),i=sr(c),Zt(o.$$.fragment,c)},m(c,s){dt(c,e,s),dt(c,i,s),Ut(o,c,s),u=!0},p:gi,i(c){u||(Ue(o.$$.fragment,c),u=!0)},o(c){Ze(o.$$.fragment,c),u=!1},d(c){c&&(fe(e),fe(i)),qt(o,c)}}}function WW(t){const e=Po.styles[0];return Lp.update(()=>e),th(async()=>{window.global=window;const r=await(await Sp(()=>import("./index.16437b7b.js").then(i=>i.i),[])).Buffer;window.Buffer=r}),[]}class sZ extends pi{constructor(e){super(),mi(this,e,WW,GW,fi,{})}}export{sZ as P,ca as _,QW as a,dh as c,M2 as g}; + gtag('config', 'G-872N8T6TQJ');<\/script>`,i,o,u;return o=new $W({}),{c(){e=tt("sveltekit:head"),e.innerHTML=r,i=ar(),jt(o.$$.fragment)},l(c){e=rt(c,"SVELTEKIT:HEAD",{"data-svelte-h":!0}),Vo(e)!=="svelte-1sczuhu"&&(e.innerHTML=r),i=sr(c),Zt(o.$$.fragment,c)},m(c,s){dt(c,e,s),dt(c,i,s),Ut(o,c,s),u=!0},p:gi,i(c){u||(Ue(o.$$.fragment,c),u=!0)},o(c){Ze(o.$$.fragment,c),u=!1},d(c){c&&(fe(e),fe(i)),qt(o,c)}}}function WW(t){const e=Po.styles[0];return Lp.update(()=>e),th(async()=>{window.global=window;const r=await(await Sp(()=>import("./index.ea3df40c.js").then(i=>i.i),[])).Buffer;window.Buffer=r}),[]}class sZ extends pi{constructor(e){super(),mi(this,e,WW,GW,fi,{})}}export{sZ as P,ca as _,QW as a,dh as c,M2 as g}; diff --git a/_app/immutable/chunks/index.16437b7b.js b/_app/immutable/chunks/index.ea3df40c.js similarity index 99% rename from _app/immutable/chunks/index.16437b7b.js rename to _app/immutable/chunks/index.ea3df40c.js index ab3155a..163881b 100644 --- a/_app/immutable/chunks/index.16437b7b.js +++ b/_app/immutable/chunks/index.ea3df40c.js @@ -1,4 +1,4 @@ -import{g as _r}from"./2.060fc6ba.js";function Sr(c,f){for(var s=0;sw[y]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var V={},j={};j.byteLength=br;j.toByteArray=kr;j.fromByteArray=Pr;var _=[],R=[],Lr=typeof Uint8Array<"u"?Uint8Array:Array,H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var k=0,Nr=H.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var s=c.indexOf("=");s===-1&&(s=f);var w=s===f?0:4-s%4;return[s,w]}function br(c){var f=hr(c),s=f[0],w=f[1];return(s+w)*3/4-w}function Mr(c,f,s){return(f+s)*3/4-s}function kr(c){var f,s=hr(c),w=s[0],y=s[1],l=new Lr(Mr(c,w,y)),p=0,o=y>0?w-4:w,B;for(B=0;B>16&255,l[p++]=f>>8&255,l[p++]=f&255;return y===2&&(f=R[c.charCodeAt(B)]<<2|R[c.charCodeAt(B+1)]>>4,l[p++]=f&255),y===1&&(f=R[c.charCodeAt(B)]<<10|R[c.charCodeAt(B+1)]<<4|R[c.charCodeAt(B+2)]>>2,l[p++]=f>>8&255,l[p++]=f&255),l}function Dr(c){return _[c>>18&63]+_[c>>12&63]+_[c>>6&63]+_[c&63]}function $r(c,f,s){for(var w,y=[],l=f;lo?o:p+l));return w===1?(f=c[s-1],y.push(_[f>>2]+_[f<<4&63]+"==")):w===2&&(f=(c[s-2]<<8)+c[s-1],y.push(_[f>>10]+_[f>>4&63]+_[f<<2&63]+"=")),y.join("")}var X={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */X.read=function(c,f,s,w,y){var l,p,o=y*8-w-1,B=(1<>1,I=-7,F=s?y-1:0,S=s?-1:1,A=c[f+F];for(F+=S,l=A&(1<<-I)-1,A>>=-I,I+=o;I>0;l=l*256+c[f+F],F+=S,I-=8);for(p=l&(1<<-I)-1,l>>=-I,I+=w;I>0;p=p*256+c[f+F],F+=S,I-=8);if(l===0)l=1-T;else{if(l===B)return p?NaN:(A?-1:1)*(1/0);p=p+Math.pow(2,w),l=l-T}return(A?-1:1)*p*Math.pow(2,l-w)};X.write=function(c,f,s,w,y,l){var p,o,B,T=l*8-y-1,I=(1<>1,S=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=w?0:l-1,D=w?1:-1,$=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(o=isNaN(f)?1:0,p=I):(p=Math.floor(Math.log(f)/Math.LN2),f*(B=Math.pow(2,-p))<1&&(p--,B*=2),p+F>=1?f+=S/B:f+=S*Math.pow(2,1-F),f*B>=2&&(p++,B/=2),p+F>=I?(o=0,p=I):p+F>=1?(o=(f*B-1)*Math.pow(2,y),p=p+F):(o=f*Math.pow(2,F-1)*Math.pow(2,y),p=0));y>=8;c[s+A]=o&255,A+=D,o/=256,y-=8);for(p=p<0;c[s+A]=p&255,A+=D,p/=256,T-=8);c[s+A-D]|=$*128};/*! +import{g as _r}from"./2.2f787e74.js";function Sr(c,f){for(var s=0;sw[y]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var V={},j={};j.byteLength=br;j.toByteArray=kr;j.fromByteArray=Pr;var _=[],R=[],Lr=typeof Uint8Array<"u"?Uint8Array:Array,H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var k=0,Nr=H.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var s=c.indexOf("=");s===-1&&(s=f);var w=s===f?0:4-s%4;return[s,w]}function br(c){var f=hr(c),s=f[0],w=f[1];return(s+w)*3/4-w}function Mr(c,f,s){return(f+s)*3/4-s}function kr(c){var f,s=hr(c),w=s[0],y=s[1],l=new Lr(Mr(c,w,y)),p=0,o=y>0?w-4:w,B;for(B=0;B>16&255,l[p++]=f>>8&255,l[p++]=f&255;return y===2&&(f=R[c.charCodeAt(B)]<<2|R[c.charCodeAt(B+1)]>>4,l[p++]=f&255),y===1&&(f=R[c.charCodeAt(B)]<<10|R[c.charCodeAt(B+1)]<<4|R[c.charCodeAt(B+2)]>>2,l[p++]=f>>8&255,l[p++]=f&255),l}function Dr(c){return _[c>>18&63]+_[c>>12&63]+_[c>>6&63]+_[c&63]}function $r(c,f,s){for(var w,y=[],l=f;lo?o:p+l));return w===1?(f=c[s-1],y.push(_[f>>2]+_[f<<4&63]+"==")):w===2&&(f=(c[s-2]<<8)+c[s-1],y.push(_[f>>10]+_[f>>4&63]+_[f<<2&63]+"=")),y.join("")}var X={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */X.read=function(c,f,s,w,y){var l,p,o=y*8-w-1,B=(1<>1,I=-7,F=s?y-1:0,S=s?-1:1,A=c[f+F];for(F+=S,l=A&(1<<-I)-1,A>>=-I,I+=o;I>0;l=l*256+c[f+F],F+=S,I-=8);for(p=l&(1<<-I)-1,l>>=-I,I+=w;I>0;p=p*256+c[f+F],F+=S,I-=8);if(l===0)l=1-T;else{if(l===B)return p?NaN:(A?-1:1)*(1/0);p=p+Math.pow(2,w),l=l-T}return(A?-1:1)*p*Math.pow(2,l-w)};X.write=function(c,f,s,w,y,l){var p,o,B,T=l*8-y-1,I=(1<>1,S=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=w?0:l-1,D=w?1:-1,$=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(o=isNaN(f)?1:0,p=I):(p=Math.floor(Math.log(f)/Math.LN2),f*(B=Math.pow(2,-p))<1&&(p--,B*=2),p+F>=1?f+=S/B:f+=S*Math.pow(2,1-F),f*B>=2&&(p++,B/=2),p+F>=I?(o=0,p=I):p+F>=1?(o=(f*B-1)*Math.pow(2,y),p=p+F):(o=f*Math.pow(2,F-1)*Math.pow(2,y),p=0));y>=8;c[s+A]=o&255,A+=D,o/=256,y-=8);for(p=p<0;c[s+A]=p&255,A+=D,p/=256,T-=8);c[s+A-D]|=$*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh diff --git a/_app/immutable/chunks/index.es.866aa745.js b/_app/immutable/chunks/index.es.482b19d7.js similarity index 99% rename from _app/immutable/chunks/index.es.866aa745.js rename to _app/immutable/chunks/index.es.482b19d7.js index af46c27..2de8129 100644 --- a/_app/immutable/chunks/index.es.866aa745.js +++ b/_app/immutable/chunks/index.es.482b19d7.js @@ -1,4 +1,4 @@ -import{c as Tt,_ as Ha,g as Vo}from"./2.060fc6ba.js";var Gt=function(a){return a&&a.Math===Math&&a},U=Gt(typeof globalThis=="object"&&globalThis)||Gt(typeof window=="object"&&window)||Gt(typeof self=="object"&&self)||Gt(typeof Tt=="object"&&Tt)||function(){return this}()||Tt||Function("return this")(),ot={},L=function(a){try{return!!a()}catch{return!0}},Nl=L,ce=!Nl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Ml=L,br=!Ml(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")}),_l=br,Ht=Function.prototype.call,Y=_l?Ht.bind(Ht):function(){return Ht.apply(Ht,arguments)},Lo={},ko={}.propertyIsEnumerable,Bo=Object.getOwnPropertyDescriptor,Dl=Bo&&!ko.call({1:2},1);Lo.f=Dl?function(e){var t=Bo(this,e);return!!t&&t.enumerable}:ko;var xr=function(a,e){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:e}},Fo=br,jo=Function.prototype,Ya=jo.call,Vl=Fo&&jo.bind.bind(Ya,Ya),k=Fo?Vl:function(a){return function(){return Ya.apply(a,arguments)}},Uo=k,Ll=Uo({}.toString),kl=Uo("".slice),Fe=function(a){return kl(Ll(a),8,-1)},Bl=k,Fl=L,jl=Fe,Zr=Object,Ul=Bl("".split),zo=Fl(function(){return!Zr("z").propertyIsEnumerable(0)})?function(a){return jl(a)==="String"?Ul(a,""):Zr(a)}:Zr,je=function(a){return a==null},zl=je,Gl=TypeError,ge=function(a){if(zl(a))throw Gl("Can't call method on "+a);return a},Hl=zo,Yl=ge,wt=function(a){return Hl(Yl(a))},Xa=typeof document=="object"&&document.all,Xl=typeof Xa>"u"&&Xa!==void 0,Go={all:Xa,IS_HTMLDDA:Xl},Ho=Go,Wl=Ho.all,D=Ho.IS_HTMLDDA?function(a){return typeof a=="function"||a===Wl}:function(a){return typeof a=="function"},mn=D,Yo=Go,ql=Yo.all,Te=Yo.IS_HTMLDDA?function(a){return typeof a=="object"?a!==null:mn(a)||a===ql}:function(a){return typeof a=="object"?a!==null:mn(a)},Jr=U,Ql=D,Kl=function(a){return Ql(a)?a:void 0},Ue=function(a,e){return arguments.length<2?Kl(Jr[a]):Jr[a]&&Jr[a][e]},Zl=k,Tr=Zl({}.isPrototypeOf),Sr=typeof navigator<"u"&&String(navigator.userAgent)||"",Xo=U,ea=Sr,bn=Xo.process,xn=Xo.Deno,Tn=bn&&bn.versions||xn&&xn.version,Sn=Tn&&Tn.v8,ue,cr;Sn&&(ue=Sn.split("."),cr=ue[0]>0&&ue[0]<4?1:+(ue[0]+ue[1]));!cr&&ea&&(ue=ea.match(/Edge\/(\d+)/),(!ue||ue[1]>=74)&&(ue=ea.match(/Chrome\/(\d+)/),ue&&(cr=+ue[1])));var Oi=cr,On=Oi,Jl=L,eh=U,th=eh.String,Wo=!!Object.getOwnPropertySymbols&&!Jl(function(){var a=Symbol("symbol detection");return!th(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&On&&On<41}),rh=Wo,qo=rh&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ah=Ue,ih=D,nh=Tr,sh=qo,oh=Object,Qo=sh?function(a){return typeof a=="symbol"}:function(a){var e=ah("Symbol");return ih(e)&&nh(e.prototype,oh(a))},uh=String,Or=function(a){try{return uh(a)}catch{return"Object"}},lh=D,hh=Or,vh=TypeError,Se=function(a){if(lh(a))return a;throw vh(hh(a)+" is not a function")},fh=Se,ch=je,ut=function(a,e){var t=a[e];return ch(t)?void 0:fh(t)},ta=Y,ra=D,aa=Te,gh=TypeError,dh=function(a,e){var t,r;if(e==="string"&&ra(t=a.toString)&&!aa(r=ta(t,a))||ra(t=a.valueOf)&&!aa(r=ta(t,a))||e!=="string"&&ra(t=a.toString)&&!aa(r=ta(t,a)))return r;throw gh("Can't convert object to primitive value")},Ko={exports:{}},En=U,ph=Object.defineProperty,Ei=function(a,e){try{ph(En,a,{value:e,configurable:!0,writable:!0})}catch{En[a]=e}return e},yh=U,mh=Ei,$n="__core-js_shared__",bh=yh[$n]||mh($n,{}),$i=bh,Cn=$i;(Ko.exports=function(a,e){return Cn[a]||(Cn[a]=e!==void 0?e:{})})("versions",[]).push({version:"3.32.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ci=Ko.exports,xh=ge,Th=Object,Er=function(a){return Th(xh(a))},Sh=k,Oh=Er,Eh=Sh({}.hasOwnProperty),le=Object.hasOwn||function(e,t){return Eh(Oh(e),t)},$h=k,Ch=0,wh=Math.random(),Ah=$h(1 .toString),Zo=function(a){return"Symbol("+(a===void 0?"":a)+")_"+Ah(++Ch+wh,36)},Ph=U,Rh=Ci,wn=le,Ih=Zo,Nh=Wo,Mh=qo,Je=Ph.Symbol,ia=Rh("wks"),_h=Mh?Je.for||Je:Je&&Je.withoutSetter||Ih,G=function(a){return wn(ia,a)||(ia[a]=Nh&&wn(Je,a)?Je[a]:_h("Symbol."+a)),ia[a]},Dh=Y,An=Te,Pn=Qo,Vh=ut,Lh=dh,kh=G,Bh=TypeError,Fh=kh("toPrimitive"),jh=function(a,e){if(!An(a)||Pn(a))return a;var t=Vh(a,Fh),r;if(t){if(e===void 0&&(e="default"),r=Dh(t,a,e),!An(r)||Pn(r))return r;throw Bh("Can't convert object to primitive value")}return e===void 0&&(e="number"),Lh(a,e)},Uh=jh,zh=Qo,wi=function(a){var e=Uh(a,"string");return zh(e)?e:e+""},Gh=U,Rn=Te,Wa=Gh.document,Hh=Rn(Wa)&&Rn(Wa.createElement),$r=function(a){return Hh?Wa.createElement(a):{}},Yh=ce,Xh=L,Wh=$r,Jo=!Yh&&!Xh(function(){return Object.defineProperty(Wh("div"),"a",{get:function(){return 7}}).a!==7}),qh=ce,Qh=Y,Kh=Lo,Zh=xr,Jh=wt,ev=wi,tv=le,rv=Jo,In=Object.getOwnPropertyDescriptor;ot.f=qh?In:function(e,t){if(e=Jh(e),t=ev(t),rv)try{return In(e,t)}catch{}if(tv(e,t))return Zh(!Qh(Kh.f,e,t),e[t])};var de={},av=ce,iv=L,eu=av&&iv(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),nv=Te,sv=String,ov=TypeError,K=function(a){if(nv(a))return a;throw ov(sv(a)+" is not an object")},uv=ce,lv=Jo,hv=eu,Yt=K,Nn=wi,vv=TypeError,na=Object.defineProperty,fv=Object.getOwnPropertyDescriptor,sa="enumerable",oa="configurable",ua="writable";de.f=uv?hv?function(e,t,r){if(Yt(e),t=Nn(t),Yt(r),typeof e=="function"&&t==="prototype"&&"value"in r&&ua in r&&!r[ua]){var i=fv(e,t);i&&i[ua]&&(e[t]=r.value,r={configurable:oa in r?r[oa]:i[oa],enumerable:sa in r?r[sa]:i[sa],writable:!1})}return na(e,t,r)}:na:function(e,t,r){if(Yt(e),t=Nn(t),Yt(r),lv)try{return na(e,t,r)}catch{}if("get"in r||"set"in r)throw vv("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var cv=ce,gv=de,dv=xr,At=cv?function(a,e,t){return gv.f(a,e,dv(1,t))}:function(a,e,t){return a[e]=t,a},tu={exports:{}},qa=ce,pv=le,ru=Function.prototype,yv=qa&&Object.getOwnPropertyDescriptor,Ai=pv(ru,"name"),mv=Ai&&(function(){}).name==="something",bv=Ai&&(!qa||qa&&yv(ru,"name").configurable),Cr={EXISTS:Ai,PROPER:mv,CONFIGURABLE:bv},xv=k,Tv=D,Qa=$i,Sv=xv(Function.toString);Tv(Qa.inspectSource)||(Qa.inspectSource=function(a){return Sv(a)});var Pi=Qa.inspectSource,Ov=U,Ev=D,Mn=Ov.WeakMap,$v=Ev(Mn)&&/native code/.test(String(Mn)),Cv=Ci,wv=Zo,_n=Cv("keys"),Ri=function(a){return _n[a]||(_n[a]=wv(a))},Ii={},Av=$v,au=U,Pv=Te,Rv=At,la=le,ha=$i,Iv=Ri,Nv=Ii,Dn="Object already initialized",Ka=au.TypeError,Mv=au.WeakMap,gr,Et,dr,_v=function(a){return dr(a)?Et(a):gr(a,{})},Dv=function(a){return function(e){var t;if(!Pv(e)||(t=Et(e)).type!==a)throw Ka("Incompatible receiver, "+a+" required");return t}};if(Av||ha.state){var fe=ha.state||(ha.state=new Mv);fe.get=fe.get,fe.has=fe.has,fe.set=fe.set,gr=function(a,e){if(fe.has(a))throw Ka(Dn);return e.facade=a,fe.set(a,e),e},Et=function(a){return fe.get(a)||{}},dr=function(a){return fe.has(a)}}else{var Xe=Iv("state");Nv[Xe]=!0,gr=function(a,e){if(la(a,Xe))throw Ka(Dn);return e.facade=a,Rv(a,Xe,e),e},Et=function(a){return la(a,Xe)?a[Xe]:{}},dr=function(a){return la(a,Xe)}}var wr={set:gr,get:Et,has:dr,enforce:_v,getterFor:Dv},Ni=k,Vv=L,Lv=D,Xt=le,Za=ce,kv=Cr.CONFIGURABLE,Bv=Pi,iu=wr,Fv=iu.enforce,jv=iu.get,Vn=String,or=Object.defineProperty,Uv=Ni("".slice),zv=Ni("".replace),Gv=Ni([].join),Hv=Za&&!Vv(function(){return or(function(){},"length",{value:8}).length!==8}),Yv=String(String).split("String"),Xv=tu.exports=function(a,e,t){Uv(Vn(e),0,7)==="Symbol("&&(e="["+zv(Vn(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Xt(a,"name")||kv&&a.name!==e)&&(Za?or(a,"name",{value:e,configurable:!0}):a.name=e),Hv&&t&&Xt(t,"arity")&&a.length!==t.arity&&or(a,"length",{value:t.arity});try{t&&Xt(t,"constructor")&&t.constructor?Za&&or(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var r=Fv(a);return Xt(r,"source")||(r.source=Gv(Yv,typeof e=="string"?e:"")),a};Function.prototype.toString=Xv(function(){return Lv(this)&&jv(this).source||Bv(this)},"toString");var nu=tu.exports,Wv=D,qv=de,Qv=nu,Kv=Ei,ze=function(a,e,t,r){r||(r={});var i=r.enumerable,n=r.name!==void 0?r.name:e;if(Wv(t)&&Qv(t,n,r),r.global)i?a[e]=t:Kv(e,t);else{try{r.unsafe?a[e]&&(i=!0):delete a[e]}catch{}i?a[e]=t:qv.f(a,e,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return a},su={},Zv=Math.ceil,Jv=Math.floor,ef=Math.trunc||function(e){var t=+e;return(t>0?Jv:Zv)(t)},tf=ef,Ar=function(a){var e=+a;return e!==e||e===0?0:tf(e)},rf=Ar,af=Math.max,nf=Math.min,ou=function(a,e){var t=rf(a);return t<0?af(t+e,0):nf(t,e)},sf=Ar,of=Math.min,lt=function(a){return a>0?of(sf(a),9007199254740991):0},uf=lt,Pr=function(a){return uf(a.length)},lf=wt,hf=ou,vf=Pr,Ln=function(a){return function(e,t,r){var i=lf(e),n=vf(i),o=hf(r,n),s;if(a&&t!==t){for(;n>o;)if(s=i[o++],s!==s)return!0}else for(;n>o;o++)if((a||o in i)&&i[o]===t)return a||o||0;return!a&&-1}},uu={includes:Ln(!0),indexOf:Ln(!1)},ff=k,va=le,cf=wt,gf=uu.indexOf,df=Ii,kn=ff([].push),lu=function(a,e){var t=cf(a),r=0,i=[],n;for(n in t)!va(df,n)&&va(t,n)&&kn(i,n);for(;e.length>r;)va(t,n=e[r++])&&(~gf(i,n)||kn(i,n));return i},Mi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],pf=lu,yf=Mi,mf=yf.concat("length","prototype");su.f=Object.getOwnPropertyNames||function(e){return pf(e,mf)};var hu={};hu.f=Object.getOwnPropertySymbols;var bf=Ue,xf=k,Tf=su,Sf=hu,Of=K,Ef=xf([].concat),$f=bf("Reflect","ownKeys")||function(e){var t=Tf.f(Of(e)),r=Sf.f;return r?Ef(t,r(e)):t},Bn=le,Cf=$f,wf=ot,Af=de,Pf=function(a,e,t){for(var r=Cf(e),i=Af.f,n=wf.f,o=0;of;f++)if(v=y(a[f]),v&&ds(ys,v))return v;return new hr(!1)}l=wd(a,h)}for(d=n?a.next:l.next;!(g=Sd(d,l)).done;){try{v=y(g.value)}catch(x){ps(l,"throw",x)}if(typeof v=="object"&&v&&ds(ys,v))return v}return new hr(!1)},Rd=G,Uu=Rd("iterator"),zu=!1;try{var Id=0,ms={next:function(){return{done:!!Id++}},return:function(){zu=!0}};ms[Uu]=function(){return this},Array.from(ms,function(){throw 2})}catch{}var Nd=function(a,e){if(!e&&!zu)return!1;var t=!1;try{var r={};r[Uu]=function(){return{next:function(){return{done:t=!0}}}},a(r)}catch{}return t},Md=Rr,_d=Nd,Dd=Nt.CONSTRUCTOR,Gu=Dd||!_d(function(a){Md.all(a).then(void 0,function(){})}),Vd=ee,Ld=Y,kd=Se,Bd=ht,Fd=Fi,jd=ju,Ud=Gu;Vd({target:"Promise",stat:!0,forced:Ud},{all:function(e){var t=this,r=Bd.f(t),i=r.resolve,n=r.reject,o=Fd(function(){var s=kd(t.resolve),u=[],l=0,h=1;jd(e,function(f){var c=l++,v=!1;h++,Ld(s,t,f).then(function(d){v||(v=!0,u[c]=d,--h||i(u))},n)}),--h||i(u)});return o.error&&n(o.value),r.promise}});var zd=ee,Gd=Nt.CONSTRUCTOR,si=Rr,Hd=Ue,Yd=D,Xd=ze,bs=si&&si.prototype;zd({target:"Promise",proto:!0,forced:Gd,real:!0},{catch:function(a){return this.then(void 0,a)}});if(Yd(si)){var xs=Hd("Promise").prototype.catch;bs.catch!==xs&&Xd(bs,"catch",xs,{unsafe:!0})}var Wd=ee,qd=Y,Qd=Se,Kd=ht,Zd=Fi,Jd=ju,ep=Gu;Wd({target:"Promise",stat:!0,forced:ep},{race:function(e){var t=this,r=Kd.f(t),i=r.reject,n=Zd(function(){var o=Qd(t.resolve);Jd(e,function(s){qd(o,t,s).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var tp=ee,rp=Y,ap=ht,ip=Nt.CONSTRUCTOR;tp({target:"Promise",stat:!0,forced:ip},{reject:function(e){var t=ap.f(this);return rp(t.reject,void 0,e),t.promise}});var np=K,sp=Te,op=ht,up=function(a,e){if(np(a),sp(e)&&e.constructor===a)return e;var t=op.f(a),r=t.resolve;return r(e),t.promise},lp=ee,hp=Ue,vp=Nt.CONSTRUCTOR,fp=up;hp("Promise");lp({target:"Promise",stat:!0,forced:vp},{resolve:function(e){return fp(this,e)}});function Ts(a,e,t,r,i,n,o){try{var s=a[n](o),u=s.value}catch(l){t(l);return}s.done?e(u):Promise.resolve(u).then(r,i)}function xe(a){return function(){var e=this,t=arguments;return new Promise(function(r,i){var n=a.apply(e,t);function o(u){Ts(n,r,i,o,s,"next",u)}function s(u){Ts(n,r,i,o,s,"throw",u)}o(void 0)})}}var cp=Di,gp=String,pe=function(a){if(cp(a)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return gp(a)},dp=K,Hu=function(){var a=dp(this),e="";return a.hasIndices&&(e+="d"),a.global&&(e+="g"),a.ignoreCase&&(e+="i"),a.multiline&&(e+="m"),a.dotAll&&(e+="s"),a.unicode&&(e+="u"),a.unicodeSets&&(e+="v"),a.sticky&&(e+="y"),e},Hi=L,pp=U,Yi=pp.RegExp,Xi=Hi(function(){var a=Yi("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),yp=Xi||Hi(function(){return!Yi("a","y").sticky}),mp=Xi||Hi(function(){var a=Yi("^r","gy");return a.lastIndex=2,a.exec("str")!==null}),Yu={BROKEN_CARET:mp,MISSED_STICKY:yp,UNSUPPORTED_Y:Xi},Xu={},bp=lu,xp=Mi,Tp=Object.keys||function(e){return bp(e,xp)},Sp=ce,Op=eu,Ep=de,$p=K,Cp=wt,wp=Tp;Xu.f=Sp&&!Op?Object.defineProperties:function(e,t){$p(e);for(var r=Cp(t),i=wp(t),n=i.length,o=0,s;n>o;)Ep.f(e,s=i[o++],r[s]);return e};var Ap=K,Pp=Xu,Ss=Mi,Rp=Ii,Ip=xu,Np=$r,Mp=Ri,Os=">",Es="<",oi="prototype",ui="script",Wu=Mp("IE_PROTO"),Ea=function(){},qu=function(a){return Es+ui+Os+a+Es+"/"+ui+Os},$s=function(a){a.write(qu("")),a.close();var e=a.parentWindow.Object;return a=null,e},_p=function(){var a=Np("iframe"),e="java"+ui+":",t;return a.style.display="none",Ip.appendChild(a),a.src=String(e),t=a.contentWindow.document,t.open(),t.write(qu("document.F=Object")),t.close(),t.F},er,vr=function(){try{er=new ActiveXObject("htmlfile")}catch{}vr=typeof document<"u"?document.domain&&er?$s(er):_p():$s(er);for(var a=Ss.length;a--;)delete vr[oi][Ss[a]];return vr()};Rp[Wu]=!0;var Wi=Object.create||function(e,t){var r;return e!==null?(Ea[oi]=Ap(e),r=new Ea,Ea[oi]=null,r[Wu]=e):r=vr(),t===void 0?r:Pp.f(r,t)},Dp=L,Vp=U,Lp=Vp.RegExp,kp=Dp(function(){var a=Lp(".","s");return!(a.dotAll&&a.exec(` +import{c as Tt,_ as Ha,g as Vo}from"./2.2f787e74.js";var Gt=function(a){return a&&a.Math===Math&&a},U=Gt(typeof globalThis=="object"&&globalThis)||Gt(typeof window=="object"&&window)||Gt(typeof self=="object"&&self)||Gt(typeof Tt=="object"&&Tt)||function(){return this}()||Tt||Function("return this")(),ot={},L=function(a){try{return!!a()}catch{return!0}},Nl=L,ce=!Nl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Ml=L,br=!Ml(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")}),_l=br,Ht=Function.prototype.call,Y=_l?Ht.bind(Ht):function(){return Ht.apply(Ht,arguments)},Lo={},ko={}.propertyIsEnumerable,Bo=Object.getOwnPropertyDescriptor,Dl=Bo&&!ko.call({1:2},1);Lo.f=Dl?function(e){var t=Bo(this,e);return!!t&&t.enumerable}:ko;var xr=function(a,e){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:e}},Fo=br,jo=Function.prototype,Ya=jo.call,Vl=Fo&&jo.bind.bind(Ya,Ya),k=Fo?Vl:function(a){return function(){return Ya.apply(a,arguments)}},Uo=k,Ll=Uo({}.toString),kl=Uo("".slice),Fe=function(a){return kl(Ll(a),8,-1)},Bl=k,Fl=L,jl=Fe,Zr=Object,Ul=Bl("".split),zo=Fl(function(){return!Zr("z").propertyIsEnumerable(0)})?function(a){return jl(a)==="String"?Ul(a,""):Zr(a)}:Zr,je=function(a){return a==null},zl=je,Gl=TypeError,ge=function(a){if(zl(a))throw Gl("Can't call method on "+a);return a},Hl=zo,Yl=ge,wt=function(a){return Hl(Yl(a))},Xa=typeof document=="object"&&document.all,Xl=typeof Xa>"u"&&Xa!==void 0,Go={all:Xa,IS_HTMLDDA:Xl},Ho=Go,Wl=Ho.all,D=Ho.IS_HTMLDDA?function(a){return typeof a=="function"||a===Wl}:function(a){return typeof a=="function"},mn=D,Yo=Go,ql=Yo.all,Te=Yo.IS_HTMLDDA?function(a){return typeof a=="object"?a!==null:mn(a)||a===ql}:function(a){return typeof a=="object"?a!==null:mn(a)},Jr=U,Ql=D,Kl=function(a){return Ql(a)?a:void 0},Ue=function(a,e){return arguments.length<2?Kl(Jr[a]):Jr[a]&&Jr[a][e]},Zl=k,Tr=Zl({}.isPrototypeOf),Sr=typeof navigator<"u"&&String(navigator.userAgent)||"",Xo=U,ea=Sr,bn=Xo.process,xn=Xo.Deno,Tn=bn&&bn.versions||xn&&xn.version,Sn=Tn&&Tn.v8,ue,cr;Sn&&(ue=Sn.split("."),cr=ue[0]>0&&ue[0]<4?1:+(ue[0]+ue[1]));!cr&&ea&&(ue=ea.match(/Edge\/(\d+)/),(!ue||ue[1]>=74)&&(ue=ea.match(/Chrome\/(\d+)/),ue&&(cr=+ue[1])));var Oi=cr,On=Oi,Jl=L,eh=U,th=eh.String,Wo=!!Object.getOwnPropertySymbols&&!Jl(function(){var a=Symbol("symbol detection");return!th(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&On&&On<41}),rh=Wo,qo=rh&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ah=Ue,ih=D,nh=Tr,sh=qo,oh=Object,Qo=sh?function(a){return typeof a=="symbol"}:function(a){var e=ah("Symbol");return ih(e)&&nh(e.prototype,oh(a))},uh=String,Or=function(a){try{return uh(a)}catch{return"Object"}},lh=D,hh=Or,vh=TypeError,Se=function(a){if(lh(a))return a;throw vh(hh(a)+" is not a function")},fh=Se,ch=je,ut=function(a,e){var t=a[e];return ch(t)?void 0:fh(t)},ta=Y,ra=D,aa=Te,gh=TypeError,dh=function(a,e){var t,r;if(e==="string"&&ra(t=a.toString)&&!aa(r=ta(t,a))||ra(t=a.valueOf)&&!aa(r=ta(t,a))||e!=="string"&&ra(t=a.toString)&&!aa(r=ta(t,a)))return r;throw gh("Can't convert object to primitive value")},Ko={exports:{}},En=U,ph=Object.defineProperty,Ei=function(a,e){try{ph(En,a,{value:e,configurable:!0,writable:!0})}catch{En[a]=e}return e},yh=U,mh=Ei,$n="__core-js_shared__",bh=yh[$n]||mh($n,{}),$i=bh,Cn=$i;(Ko.exports=function(a,e){return Cn[a]||(Cn[a]=e!==void 0?e:{})})("versions",[]).push({version:"3.32.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ci=Ko.exports,xh=ge,Th=Object,Er=function(a){return Th(xh(a))},Sh=k,Oh=Er,Eh=Sh({}.hasOwnProperty),le=Object.hasOwn||function(e,t){return Eh(Oh(e),t)},$h=k,Ch=0,wh=Math.random(),Ah=$h(1 .toString),Zo=function(a){return"Symbol("+(a===void 0?"":a)+")_"+Ah(++Ch+wh,36)},Ph=U,Rh=Ci,wn=le,Ih=Zo,Nh=Wo,Mh=qo,Je=Ph.Symbol,ia=Rh("wks"),_h=Mh?Je.for||Je:Je&&Je.withoutSetter||Ih,G=function(a){return wn(ia,a)||(ia[a]=Nh&&wn(Je,a)?Je[a]:_h("Symbol."+a)),ia[a]},Dh=Y,An=Te,Pn=Qo,Vh=ut,Lh=dh,kh=G,Bh=TypeError,Fh=kh("toPrimitive"),jh=function(a,e){if(!An(a)||Pn(a))return a;var t=Vh(a,Fh),r;if(t){if(e===void 0&&(e="default"),r=Dh(t,a,e),!An(r)||Pn(r))return r;throw Bh("Can't convert object to primitive value")}return e===void 0&&(e="number"),Lh(a,e)},Uh=jh,zh=Qo,wi=function(a){var e=Uh(a,"string");return zh(e)?e:e+""},Gh=U,Rn=Te,Wa=Gh.document,Hh=Rn(Wa)&&Rn(Wa.createElement),$r=function(a){return Hh?Wa.createElement(a):{}},Yh=ce,Xh=L,Wh=$r,Jo=!Yh&&!Xh(function(){return Object.defineProperty(Wh("div"),"a",{get:function(){return 7}}).a!==7}),qh=ce,Qh=Y,Kh=Lo,Zh=xr,Jh=wt,ev=wi,tv=le,rv=Jo,In=Object.getOwnPropertyDescriptor;ot.f=qh?In:function(e,t){if(e=Jh(e),t=ev(t),rv)try{return In(e,t)}catch{}if(tv(e,t))return Zh(!Qh(Kh.f,e,t),e[t])};var de={},av=ce,iv=L,eu=av&&iv(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),nv=Te,sv=String,ov=TypeError,K=function(a){if(nv(a))return a;throw ov(sv(a)+" is not an object")},uv=ce,lv=Jo,hv=eu,Yt=K,Nn=wi,vv=TypeError,na=Object.defineProperty,fv=Object.getOwnPropertyDescriptor,sa="enumerable",oa="configurable",ua="writable";de.f=uv?hv?function(e,t,r){if(Yt(e),t=Nn(t),Yt(r),typeof e=="function"&&t==="prototype"&&"value"in r&&ua in r&&!r[ua]){var i=fv(e,t);i&&i[ua]&&(e[t]=r.value,r={configurable:oa in r?r[oa]:i[oa],enumerable:sa in r?r[sa]:i[sa],writable:!1})}return na(e,t,r)}:na:function(e,t,r){if(Yt(e),t=Nn(t),Yt(r),lv)try{return na(e,t,r)}catch{}if("get"in r||"set"in r)throw vv("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var cv=ce,gv=de,dv=xr,At=cv?function(a,e,t){return gv.f(a,e,dv(1,t))}:function(a,e,t){return a[e]=t,a},tu={exports:{}},qa=ce,pv=le,ru=Function.prototype,yv=qa&&Object.getOwnPropertyDescriptor,Ai=pv(ru,"name"),mv=Ai&&(function(){}).name==="something",bv=Ai&&(!qa||qa&&yv(ru,"name").configurable),Cr={EXISTS:Ai,PROPER:mv,CONFIGURABLE:bv},xv=k,Tv=D,Qa=$i,Sv=xv(Function.toString);Tv(Qa.inspectSource)||(Qa.inspectSource=function(a){return Sv(a)});var Pi=Qa.inspectSource,Ov=U,Ev=D,Mn=Ov.WeakMap,$v=Ev(Mn)&&/native code/.test(String(Mn)),Cv=Ci,wv=Zo,_n=Cv("keys"),Ri=function(a){return _n[a]||(_n[a]=wv(a))},Ii={},Av=$v,au=U,Pv=Te,Rv=At,la=le,ha=$i,Iv=Ri,Nv=Ii,Dn="Object already initialized",Ka=au.TypeError,Mv=au.WeakMap,gr,Et,dr,_v=function(a){return dr(a)?Et(a):gr(a,{})},Dv=function(a){return function(e){var t;if(!Pv(e)||(t=Et(e)).type!==a)throw Ka("Incompatible receiver, "+a+" required");return t}};if(Av||ha.state){var fe=ha.state||(ha.state=new Mv);fe.get=fe.get,fe.has=fe.has,fe.set=fe.set,gr=function(a,e){if(fe.has(a))throw Ka(Dn);return e.facade=a,fe.set(a,e),e},Et=function(a){return fe.get(a)||{}},dr=function(a){return fe.has(a)}}else{var Xe=Iv("state");Nv[Xe]=!0,gr=function(a,e){if(la(a,Xe))throw Ka(Dn);return e.facade=a,Rv(a,Xe,e),e},Et=function(a){return la(a,Xe)?a[Xe]:{}},dr=function(a){return la(a,Xe)}}var wr={set:gr,get:Et,has:dr,enforce:_v,getterFor:Dv},Ni=k,Vv=L,Lv=D,Xt=le,Za=ce,kv=Cr.CONFIGURABLE,Bv=Pi,iu=wr,Fv=iu.enforce,jv=iu.get,Vn=String,or=Object.defineProperty,Uv=Ni("".slice),zv=Ni("".replace),Gv=Ni([].join),Hv=Za&&!Vv(function(){return or(function(){},"length",{value:8}).length!==8}),Yv=String(String).split("String"),Xv=tu.exports=function(a,e,t){Uv(Vn(e),0,7)==="Symbol("&&(e="["+zv(Vn(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Xt(a,"name")||kv&&a.name!==e)&&(Za?or(a,"name",{value:e,configurable:!0}):a.name=e),Hv&&t&&Xt(t,"arity")&&a.length!==t.arity&&or(a,"length",{value:t.arity});try{t&&Xt(t,"constructor")&&t.constructor?Za&&or(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var r=Fv(a);return Xt(r,"source")||(r.source=Gv(Yv,typeof e=="string"?e:"")),a};Function.prototype.toString=Xv(function(){return Lv(this)&&jv(this).source||Bv(this)},"toString");var nu=tu.exports,Wv=D,qv=de,Qv=nu,Kv=Ei,ze=function(a,e,t,r){r||(r={});var i=r.enumerable,n=r.name!==void 0?r.name:e;if(Wv(t)&&Qv(t,n,r),r.global)i?a[e]=t:Kv(e,t);else{try{r.unsafe?a[e]&&(i=!0):delete a[e]}catch{}i?a[e]=t:qv.f(a,e,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return a},su={},Zv=Math.ceil,Jv=Math.floor,ef=Math.trunc||function(e){var t=+e;return(t>0?Jv:Zv)(t)},tf=ef,Ar=function(a){var e=+a;return e!==e||e===0?0:tf(e)},rf=Ar,af=Math.max,nf=Math.min,ou=function(a,e){var t=rf(a);return t<0?af(t+e,0):nf(t,e)},sf=Ar,of=Math.min,lt=function(a){return a>0?of(sf(a),9007199254740991):0},uf=lt,Pr=function(a){return uf(a.length)},lf=wt,hf=ou,vf=Pr,Ln=function(a){return function(e,t,r){var i=lf(e),n=vf(i),o=hf(r,n),s;if(a&&t!==t){for(;n>o;)if(s=i[o++],s!==s)return!0}else for(;n>o;o++)if((a||o in i)&&i[o]===t)return a||o||0;return!a&&-1}},uu={includes:Ln(!0),indexOf:Ln(!1)},ff=k,va=le,cf=wt,gf=uu.indexOf,df=Ii,kn=ff([].push),lu=function(a,e){var t=cf(a),r=0,i=[],n;for(n in t)!va(df,n)&&va(t,n)&&kn(i,n);for(;e.length>r;)va(t,n=e[r++])&&(~gf(i,n)||kn(i,n));return i},Mi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],pf=lu,yf=Mi,mf=yf.concat("length","prototype");su.f=Object.getOwnPropertyNames||function(e){return pf(e,mf)};var hu={};hu.f=Object.getOwnPropertySymbols;var bf=Ue,xf=k,Tf=su,Sf=hu,Of=K,Ef=xf([].concat),$f=bf("Reflect","ownKeys")||function(e){var t=Tf.f(Of(e)),r=Sf.f;return r?Ef(t,r(e)):t},Bn=le,Cf=$f,wf=ot,Af=de,Pf=function(a,e,t){for(var r=Cf(e),i=Af.f,n=wf.f,o=0;of;f++)if(v=y(a[f]),v&&ds(ys,v))return v;return new hr(!1)}l=wd(a,h)}for(d=n?a.next:l.next;!(g=Sd(d,l)).done;){try{v=y(g.value)}catch(x){ps(l,"throw",x)}if(typeof v=="object"&&v&&ds(ys,v))return v}return new hr(!1)},Rd=G,Uu=Rd("iterator"),zu=!1;try{var Id=0,ms={next:function(){return{done:!!Id++}},return:function(){zu=!0}};ms[Uu]=function(){return this},Array.from(ms,function(){throw 2})}catch{}var Nd=function(a,e){if(!e&&!zu)return!1;var t=!1;try{var r={};r[Uu]=function(){return{next:function(){return{done:t=!0}}}},a(r)}catch{}return t},Md=Rr,_d=Nd,Dd=Nt.CONSTRUCTOR,Gu=Dd||!_d(function(a){Md.all(a).then(void 0,function(){})}),Vd=ee,Ld=Y,kd=Se,Bd=ht,Fd=Fi,jd=ju,Ud=Gu;Vd({target:"Promise",stat:!0,forced:Ud},{all:function(e){var t=this,r=Bd.f(t),i=r.resolve,n=r.reject,o=Fd(function(){var s=kd(t.resolve),u=[],l=0,h=1;jd(e,function(f){var c=l++,v=!1;h++,Ld(s,t,f).then(function(d){v||(v=!0,u[c]=d,--h||i(u))},n)}),--h||i(u)});return o.error&&n(o.value),r.promise}});var zd=ee,Gd=Nt.CONSTRUCTOR,si=Rr,Hd=Ue,Yd=D,Xd=ze,bs=si&&si.prototype;zd({target:"Promise",proto:!0,forced:Gd,real:!0},{catch:function(a){return this.then(void 0,a)}});if(Yd(si)){var xs=Hd("Promise").prototype.catch;bs.catch!==xs&&Xd(bs,"catch",xs,{unsafe:!0})}var Wd=ee,qd=Y,Qd=Se,Kd=ht,Zd=Fi,Jd=ju,ep=Gu;Wd({target:"Promise",stat:!0,forced:ep},{race:function(e){var t=this,r=Kd.f(t),i=r.reject,n=Zd(function(){var o=Qd(t.resolve);Jd(e,function(s){qd(o,t,s).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var tp=ee,rp=Y,ap=ht,ip=Nt.CONSTRUCTOR;tp({target:"Promise",stat:!0,forced:ip},{reject:function(e){var t=ap.f(this);return rp(t.reject,void 0,e),t.promise}});var np=K,sp=Te,op=ht,up=function(a,e){if(np(a),sp(e)&&e.constructor===a)return e;var t=op.f(a),r=t.resolve;return r(e),t.promise},lp=ee,hp=Ue,vp=Nt.CONSTRUCTOR,fp=up;hp("Promise");lp({target:"Promise",stat:!0,forced:vp},{resolve:function(e){return fp(this,e)}});function Ts(a,e,t,r,i,n,o){try{var s=a[n](o),u=s.value}catch(l){t(l);return}s.done?e(u):Promise.resolve(u).then(r,i)}function xe(a){return function(){var e=this,t=arguments;return new Promise(function(r,i){var n=a.apply(e,t);function o(u){Ts(n,r,i,o,s,"next",u)}function s(u){Ts(n,r,i,o,s,"throw",u)}o(void 0)})}}var cp=Di,gp=String,pe=function(a){if(cp(a)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return gp(a)},dp=K,Hu=function(){var a=dp(this),e="";return a.hasIndices&&(e+="d"),a.global&&(e+="g"),a.ignoreCase&&(e+="i"),a.multiline&&(e+="m"),a.dotAll&&(e+="s"),a.unicode&&(e+="u"),a.unicodeSets&&(e+="v"),a.sticky&&(e+="y"),e},Hi=L,pp=U,Yi=pp.RegExp,Xi=Hi(function(){var a=Yi("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),yp=Xi||Hi(function(){return!Yi("a","y").sticky}),mp=Xi||Hi(function(){var a=Yi("^r","gy");return a.lastIndex=2,a.exec("str")!==null}),Yu={BROKEN_CARET:mp,MISSED_STICKY:yp,UNSUPPORTED_Y:Xi},Xu={},bp=lu,xp=Mi,Tp=Object.keys||function(e){return bp(e,xp)},Sp=ce,Op=eu,Ep=de,$p=K,Cp=wt,wp=Tp;Xu.f=Sp&&!Op?Object.defineProperties:function(e,t){$p(e);for(var r=Cp(t),i=wp(t),n=i.length,o=0,s;n>o;)Ep.f(e,s=i[o++],r[s]);return e};var Ap=K,Pp=Xu,Ss=Mi,Rp=Ii,Ip=xu,Np=$r,Mp=Ri,Os=">",Es="<",oi="prototype",ui="script",Wu=Mp("IE_PROTO"),Ea=function(){},qu=function(a){return Es+ui+Os+a+Es+"/"+ui+Os},$s=function(a){a.write(qu("")),a.close();var e=a.parentWindow.Object;return a=null,e},_p=function(){var a=Np("iframe"),e="java"+ui+":",t;return a.style.display="none",Ip.appendChild(a),a.src=String(e),t=a.contentWindow.document,t.open(),t.write(qu("document.F=Object")),t.close(),t.F},er,vr=function(){try{er=new ActiveXObject("htmlfile")}catch{}vr=typeof document<"u"?document.domain&&er?$s(er):_p():$s(er);for(var a=Ss.length;a--;)delete vr[oi][Ss[a]];return vr()};Rp[Wu]=!0;var Wi=Object.create||function(e,t){var r;return e!==null?(Ea[oi]=Ap(e),r=new Ea,Ea[oi]=null,r[Wu]=e):r=vr(),t===void 0?r:Pp.f(r,t)},Dp=L,Vp=U,Lp=Vp.RegExp,kp=Dp(function(){var a=Lp(".","s");return!(a.dotAll&&a.exec(` `)&&a.flags==="s")}),Bp=L,Fp=U,jp=Fp.RegExp,Up=Bp(function(){var a=jp("(?b)","g");return a.exec("b").groups.a!=="b"||"b".replace(a,"$c")!=="bc"}),tt=Y,Nr=k,zp=pe,Gp=Hu,Hp=Yu,Yp=Ci,Xp=Wi,Wp=wr.get,qp=kp,Qp=Up,Kp=Yp("native-string-replace",String.prototype.replace),mr=RegExp.prototype.exec,li=mr,Zp=Nr("".charAt),Jp=Nr("".indexOf),ey=Nr("".replace),$a=Nr("".slice),hi=function(){var a=/a/,e=/b*/g;return tt(mr,a,"a"),tt(mr,e,"a"),a.lastIndex!==0||e.lastIndex!==0}(),Qu=Hp.BROKEN_CARET,vi=/()??/.exec("")[1]!==void 0,ty=hi||vi||Qu||qp||Qp;ty&&(li=function(e){var t=this,r=Wp(t),i=zp(e),n=r.raw,o,s,u,l,h,f,c;if(n)return n.lastIndex=t.lastIndex,o=tt(li,n,i),t.lastIndex=n.lastIndex,o;var v=r.groups,d=Qu&&t.sticky,g=tt(Gp,t),p=t.source,y=0,x=i;if(d&&(g=ey(g,"y",""),Jp(g,"g")===-1&&(g+="g"),x=$a(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&Zp(i,t.lastIndex-1)!==` `)&&(p="(?: "+p+")",x=" "+x,y++),s=new RegExp("^(?:"+p+")",g)),vi&&(s=new RegExp("^"+p+"$(?!\\s)",g)),hi&&(u=t.lastIndex),l=tt(mr,d?s:t,x),d?l?(l.input=$a(l.input,y),l[0]=$a(l[0],y),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:hi&&l&&(t.lastIndex=t.global?l.index+l[0].length:u),vi&&l&&l.length>1&&tt(Kp,l[0],s,function(){for(h=1;h=n?a?"":void 0:(o=Rs(r,i),o<55296||o>56319||i+1===n||(s=Rs(r,i+1))<56320||s>57343?a?ly(r,i):o:a?hy(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},vy={codeAt:Is(!1),charAt:Is(!0)},fy=vy.charAt,Ki=function(a,e,t){return e+(t?fy(a,e).length:1)},Ns=Y,cy=K,gy=D,dy=Fe,py=Mr,yy=TypeError,Zi=function(a,e){var t=a.exec;if(gy(t)){var r=Ns(t,a,e);return r!==null&&cy(r),r}if(dy(a)==="RegExp")return Ns(py,a,e);throw yy("RegExp#exec called on incompatible receiver")},my=Y,by=qi,xy=K,Ty=je,Sy=lt,wa=pe,Oy=ge,Ey=ut,$y=Ki,Ms=Zi;by("match",function(a,e,t){return[function(i){var n=Oy(this),o=Ty(i)?void 0:Ey(i,a);return o?my(o,i,n):new RegExp(i)[a](wa(n))},function(r){var i=xy(this),n=wa(r),o=t(e,i,n);if(o.done)return o.value;if(!i.global)return Ms(i,n);var s=i.unicode;i.lastIndex=0;for(var u=[],l=0,h;(h=Ms(i,n))!==null;){var f=wa(h[0]);u[l]=f,f===""&&(i.lastIndex=$y(n,Sy(i.lastIndex),s)),l++}return l===0?null:u}]});var Ji=k,Cy=Er,wy=Math.floor,Aa=Ji("".charAt),Ay=Ji("".replace),Pa=Ji("".slice),Py=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ry=/\$([$&'`]|\d{1,2})/g,Iy=function(a,e,t,r,i,n){var o=t+a.length,s=r.length,u=Ry;return i!==void 0&&(i=Cy(i),u=Py),Ay(n,u,function(l,h){var f;switch(Aa(h,0)){case"$":return"$";case"&":return a;case"`":return Pa(e,0,t);case"'":return Pa(e,o);case"<":f=i[Pa(h,1,-1)];break;default:var c=+h;if(c===0)return l;if(c>s){var v=wy(c/10);return v===0?l:v<=s?r[v-1]===void 0?Aa(h,1):r[v-1]+Aa(h,1):l}f=r[c-1]}return f===void 0?"":f})},Ny=Li,_s=Y,_r=k,My=qi,_y=L,Dy=K,Vy=D,Ly=je,ky=Ar,By=lt,qe=pe,Fy=ge,jy=Ki,Uy=ut,zy=Iy,Gy=Zi,Hy=G,fi=Hy("replace"),Yy=Math.max,Xy=Math.min,Wy=_r([].concat),Ra=_r([].push),Ds=_r("".indexOf),Vs=_r("".slice),qy=function(a){return a===void 0?a:String(a)},Qy=function(){return"a".replace(/./,"$0")==="$0"}(),Ls=function(){return/./[fi]?/./[fi]("a","$0")==="":!1}(),Ky=!_y(function(){var a=/./;return a.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(a,"$")!=="7"});My("replace",function(a,e,t){var r=Ls?"$":"$0";return[function(n,o){var s=Fy(this),u=Ly(n)?void 0:Uy(n,fi);return u?_s(u,n,s,o):_s(e,qe(s),n,o)},function(i,n){var o=Dy(this),s=qe(i);if(typeof n=="string"&&Ds(n,r)===-1&&Ds(n,"$<")===-1){var u=t(e,o,s,n);if(u.done)return u.value}var l=Vy(n);l||(n=qe(n));var h=o.global,f;h&&(f=o.unicode,o.lastIndex=0);for(var c=[],v;v=Gy(o,s),!(v===null||(Ra(c,v),!h));){var d=qe(v[0]);d===""&&(o.lastIndex=jy(s,By(o.lastIndex),f))}for(var g="",p=0,y=0;y=p&&(g+=Vs(s,p,b)+$,p=b+x.length)}return g+Vs(s,p)}]},!Ky||!Qy||Ls);var Zy=Te,Jy=Fe,em=G,tm=em("match"),Zu=function(a){var e;return Zy(a)&&((e=a[tm])!==void 0?!!e:Jy(a)==="RegExp")},rm=Zu,am=TypeError,en=function(a){if(rm(a))throw am("The method doesn't accept regular expressions");return a},im=G,nm=im("match"),tn=function(a){var e=/./;try{"/./"[a](e)}catch{try{return e[nm]=!1,"/./"[a](e)}catch{}}return!1},sm=ee,Ju=It,om=ot.f,um=lt,ks=pe,lm=en,hm=ge,vm=tn,Bs=Ju("".startsWith),fm=Ju("".slice),cm=Math.min,el=vm("startsWith"),gm=!el&&!!function(){var a=om(String.prototype,"startsWith");return a&&!a.writable}();sm({target:"String",proto:!0,forced:!gm&&!el},{startsWith:function(e){var t=ks(hm(this));lm(e);var r=um(cm(arguments.length>1?arguments[1]:void 0,t.length)),i=ks(e);return Bs?Bs(t,i,r):fm(t,r,r+i.length)===i}});var dm=G,pm=Wi,ym=de.f,ci=dm("unscopables"),gi=Array.prototype;gi[ci]===void 0&&ym(gi,ci,{configurable:!0,value:pm(null)});var mm=function(a){gi[ci][a]=!0},bm=L,xm=!bm(function(){function a(){}return a.prototype.constructor=null,Object.getPrototypeOf(new a)!==a.prototype}),Tm=le,Sm=D,Om=Er,Em=Ri,$m=xm,Fs=Em("IE_PROTO"),di=Object,Cm=di.prototype,tl=$m?di.getPrototypeOf:function(a){var e=Om(a);if(Tm(e,Fs))return e[Fs];var t=e.constructor;return Sm(t)&&e instanceof t?t.prototype:e instanceof di?Cm:null},wm=L,Am=D,Pm=Te,js=tl,Rm=ze,Im=G,pi=Im("iterator"),rl=!1,ke,Ia,Na;[].keys&&(Na=[].keys(),"next"in Na?(Ia=js(js(Na)),Ia!==Object.prototype&&(ke=Ia)):rl=!0);var Nm=!Pm(ke)||wm(function(){var a={};return ke[pi].call(a)!==a});Nm&&(ke={});Am(ke[pi])||Rm(ke,pi,function(){return this});var al={IteratorPrototype:ke,BUGGY_SAFARI_ITERATORS:rl},Mm=al.IteratorPrototype,_m=Wi,Dm=xr,Vm=_i,Lm=Mt,km=function(){return this},Bm=function(a,e,t,r){var i=e+" Iterator";return a.prototype=_m(Mm,{next:Dm(+!r,t)}),Vm(a,i,!1),Lm[i]=km,a},Fm=ee,jm=Y,il=Cr,Um=D,zm=Bm,Us=tl,zs=fu,Gm=_i,Hm=At,Ma=ze,Ym=G,Xm=Mt,nl=al,Wm=il.PROPER,qm=il.CONFIGURABLE,Gs=nl.IteratorPrototype,tr=nl.BUGGY_SAFARI_ITERATORS,ct=Ym("iterator"),Hs="keys",gt="values",Ys="entries",Qm=function(){return this},Km=function(a,e,t,r,i,n,o){zm(t,e,r);var s=function(y){if(y===i&&c)return c;if(!tr&&y in h)return h[y];switch(y){case Hs:return function(){return new t(this,y)};case gt:return function(){return new t(this,y)};case Ys:return function(){return new t(this,y)}}return function(){return new t(this)}},u=e+" Iterator",l=!1,h=a.prototype,f=h[ct]||h["@@iterator"]||i&&h[i],c=!tr&&f||s(i),v=e==="Array"&&h.entries||f,d,g,p;if(v&&(d=Us(v.call(new a)),d!==Object.prototype&&d.next&&(Us(d)!==Gs&&(zs?zs(d,Gs):Um(d[ct])||Ma(d,ct,Qm)),Gm(d,u,!0))),Wm&&i===gt&&f&&f.name!==gt&&(qm?Hm(h,"name",gt):(l=!0,c=function(){return jm(f,this)})),i)if(g={values:s(gt),keys:n?c:s(Hs),entries:s(Ys)},o)for(p in g)(tr||l||!(p in h))&&Ma(h,p,g[p]);else Fm({target:e,proto:!0,forced:tr||l},g);return h[ct]!==c&&Ma(h,ct,c,{name:i}),Xm[e]=c,g},Zm=function(a,e){return{value:a,done:e}},Jm=wt,rn=mm,Xs=Mt,sl=wr,e0=de.f,t0=Km,rr=Zm,r0=ce,ol="Array Iterator",a0=sl.set,i0=sl.getterFor(ol),n0=t0(Array,"Array",function(a,e){a0(this,{type:ol,target:Jm(a),index:0,kind:e})},function(){var a=i0(this),e=a.target,t=a.kind,r=a.index++;if(!e||r>=e.length)return a.target=void 0,rr(void 0,!0);switch(t){case"keys":return rr(r,!1);case"values":return rr(e[r],!1)}return rr([r,e[r]],!1)},"values"),Ws=Xs.Arguments=Xs.Array;rn("keys");rn("values");rn("entries");if(r0&&Ws.name!=="values")try{e0(Ws,"name",{value:"values"})}catch{}var s0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},o0=$r,_a=o0("span").classList,qs=_a&&_a.constructor&&_a.constructor.prototype,u0=qs===Object.prototype?void 0:qs,Qs=U,ul=s0,l0=u0,mt=n0,Da=At,ll=G,Va=ll("iterator"),Ks=ll("toStringTag"),La=mt.values,hl=function(a,e){if(a){if(a[Va]!==La)try{Da(a,Va,La)}catch{a[Va]=La}if(a[Ks]||Da(a,Ks,e),ul[e]){for(var t in mt)if(a[t]!==mt[t])try{Da(a,t,mt[t])}catch{a[t]=mt[t]}}}};for(var ka in ul)hl(Qs[ka]&&Qs[ka].prototype,ka);hl(l0,"DOMTokenList");function h0(a,e){if(Ha(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e||"default");if(Ha(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function v0(a){var e=h0(a,"string");return Ha(e)==="symbol"?e:String(e)}function an(a,e,t){return e=v0(e),e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}var f0=Se,c0=Er,g0=zo,d0=Pr,p0=TypeError,Zs=function(a){return function(e,t,r,i){f0(t);var n=c0(e),o=g0(n),s=d0(n),u=a?s-1:0,l=a?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,a?u<0:s<=u)throw p0("Reduce of empty array with no initial value")}for(;a?u>=0:s>u;u+=l)u in o&&(i=t(i,o[u],u,n));return i}},y0={left:Zs(!1),right:Zs(!0)},m0=L,vl=function(a,e){var t=[][a];return!!t&&m0(function(){t.call(null,e||function(){return 1},1)})},b0=ee,x0=y0.left,T0=vl,Js=Oi,S0=Rt,O0=!S0&&Js>79&&Js<83,E0=O0||!T0("reduce");b0({target:"Array",proto:!0,forced:E0},{reduce:function(e){var t=arguments.length;return x0(this,e,t,t>1?arguments[1]:void 0)}});var $0=ee,fl=It,C0=ot.f,w0=lt,eo=pe,A0=en,P0=ge,R0=tn,to=fl("".endsWith),I0=fl("".slice),N0=Math.min,cl=R0("endsWith"),M0=!cl&&!!function(){var a=C0(String.prototype,"endsWith");return a&&!a.writable}();$0({target:"String",proto:!0,forced:!M0&&!cl},{endsWith:function(e){var t=eo(P0(this));A0(e);var r=arguments.length>1?arguments[1]:void 0,i=t.length,n=r===void 0?i:N0(w0(r),i),o=eo(e);return to?to(t,o,n):I0(t,n-o.length,n)===o}});var _0=wi,D0=de,V0=xr,L0=function(a,e,t){var r=_0(e);r in a?D0.f(a,r,V0(0,t)):a[r]=t},ro=ou,k0=Pr,B0=L0,F0=Array,j0=Math.max,U0=function(a,e,t){for(var r=k0(a),i=ro(e,r),n=ro(t===void 0?r:t,r),o=F0(j0(n-i,0)),s=0;i1||"".split(/.?/).length?r=function(i,n){var o=Ba(ao(this)),s=n===void 0?so:n>>>0;if(s===0)return[];if(i===void 0)return[o];if(!X0(i))return dt(e,o,i,s);for(var u=[],l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),h=0,f=new RegExp(i.source,l+"g"),c,v,d;(c=dt(Z0,f,o))&&(v=f.lastIndex,!(v>h&&(Ke(u,pt(o,h,c.index)),c.length>1&&c.index=s)));)f.lastIndex===c.index&&f.lastIndex++;return h===o.length?(d||!rb(f,""))&&Ke(u,""):Ke(u,pt(o,h)),u.length>s?io(u,0,s):u}:"0".split(void 0,0).length?r=function(i,n){return i===void 0&&n===0?[]:dt(e,this,i,n)}:r=e,[function(n,o){var s=ao(this),u=Y0(n)?void 0:K0(n,a);return u?dt(u,n,s,o):dt(r,Ba(s),n,o)},function(i,n){var o=H0(this),s=Ba(i),u=t(r,o,s,n,r!==e);if(u.done)return u.value;var l=W0(o,RegExp),h=o.unicode,f=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Qe?"g":"y"),c=new l(Qe?"^(?:"+o.source+")":o,f),v=n===void 0?so:n>>>0;if(v===0)return[];if(s.length===0)return no(c,s)===null?[s]:[];for(var d=0,g=0,p=[];g"u"?Tt:window,ar=["moz","webkit"],at="AnimationFrame",st=be["request"+at],Ct=be["cancel"+at]||be["cancelRequest"+at];for(var yt=0;!st&&yt3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var u=this.r.toString(16),l=this.g.toString(16),h=this.b.toString(16);return u.length==1&&(u="0"+u),l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),"#"+u+l+h},this.getHelpXML=function(){for(var u=new Array,l=0;l "+g.toRGB()+" -> "+g.toHex());d.appendChild(p),d.appendChild(y),v.appendChild(d)}catch{}return v}};const mi=Vo(xb);var Tb=ee,Sb=It,Ob=uu.indexOf,Eb=vl,bi=Sb([].indexOf),pl=!!bi&&1/bi([1],1,-0)<0,$b=pl||!Eb("indexOf");Tb({target:"Array",proto:!0,forced:$b},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return pl?bi(this,e,t)||0:Ob(this,e,t)}});var Cb=ee,wb=k,Ab=en,Pb=ge,vo=pe,Rb=tn,Ib=wb("".indexOf);Cb({target:"String",proto:!0,forced:!Rb("includes")},{includes:function(e){return!!~Ib(vo(Pb(this)),vo(Ab(e)),arguments.length>1?arguments[1]:void 0)}});var Nb=Fe,Mb=Array.isArray||function(e){return Nb(e)==="Array"},_b=ee,Db=k,Vb=Mb,Lb=Db([].reverse),fo=[1,2];_b({target:"Array",proto:!0,forced:String(fo)===String(fo.reverse())},{reverse:function(){return Vb(this)&&(this.length=this.length),Lb(this)}});/*! ***************************************************************************** diff --git a/_app/immutable/chunks/singletons.8c7033f6.js b/_app/immutable/chunks/singletons.f9c495b5.js similarity index 89% rename from _app/immutable/chunks/singletons.8c7033f6.js rename to _app/immutable/chunks/singletons.f9c495b5.js index 89f96a9..b1155ea 100644 --- a/_app/immutable/chunks/singletons.8c7033f6.js +++ b/_app/immutable/chunks/singletons.f9c495b5.js @@ -1 +1 @@ -import{w as u}from"./index.f67b0ed0.js";var _;const v=((_=globalThis.__sveltekit_1obbe51)==null?void 0:_.base)??"";var b;const k=((b=globalThis.__sveltekit_1obbe51)==null?void 0:b.assets)??v,m="1693066094077",R="sveltekit:snapshot",T="sveltekit:scroll",y="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1};function I(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function S(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function g(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function x(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=g(e)}}function O(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,r=!n||!!o||E(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),l=(n==null?void 0:n.origin)===location.origin&&e.hasAttribute("download");return{url:n,external:r,target:o,download:l}}function U(e){let t=null,n=null,o=null,r=null,l=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),r===null&&(r=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),l===null&&(l=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=g(s);function i(h){switch(h){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[r??"off"],keep_focus:i(t),noscroll:i(n),reload:i(l),replace_state:i(a)}}function p(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function l(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:r,subscribe:l}}function w(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const r=await fetch(`${k}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==m;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function E(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}function L(e){e.client}const N={url:p({}),page:p({}),navigating:u(null),updated:w()};export{y as I,f as P,T as S,R as a,O as b,U as c,N as d,v as e,x as f,I as g,L as h,E as i,S as s}; +import{w as u}from"./index.f67b0ed0.js";var _;const v=((_=globalThis.__sveltekit_1dhuh6e)==null?void 0:_.base)??"";var h;const k=((h=globalThis.__sveltekit_1dhuh6e)==null?void 0:h.assets)??v,m="1693068740553",R="sveltekit:snapshot",T="sveltekit:scroll",y="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1};function I(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function S(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function g(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function x(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=g(e)}}function O(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,r=!n||!!o||E(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),l=(n==null?void 0:n.origin)===location.origin&&e.hasAttribute("download");return{url:n,external:r,target:o,download:l}}function U(e){let t=null,n=null,o=null,r=null,l=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),r===null&&(r=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),l===null&&(l=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=g(s);function i(b){switch(b){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[r??"off"],keep_focus:i(t),noscroll:i(n),reload:i(l),replace_state:i(a)}}function p(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function l(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:r,subscribe:l}}function w(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const r=await fetch(`${k}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==m;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function E(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}function L(e){e.client}const N={url:p({}),page:p({}),navigating:u(null),updated:w()};export{y as I,f as P,T as S,R as a,O as b,U as c,N as d,v as e,x as f,I as g,L as h,E as i,S as s}; diff --git a/_app/immutable/entry/app.866d7762.js b/_app/immutable/entry/app.d464323b.js similarity index 92% rename from _app/immutable/entry/app.866d7762.js rename to _app/immutable/entry/app.d464323b.js index 875e3a7..2541f61 100644 --- a/_app/immutable/entry/app.866d7762.js +++ b/_app/immutable/entry/app.d464323b.js @@ -1 +1 @@ -import{_ as P}from"../chunks/preload-helper.cf010ec4.js";import{s as S,a as j,e as p,c as C,i as w,d as h,b as M,o as U,f as z,g as B,h as F,j as R,k as m,l as G,m as H,n as J,t as K,p as V,q as k}from"../chunks/scheduler.e663fd29.js";import{S as Q,i as W,t as d,c as D,a as g,g as I,b as v,d as A,m as E,e as N}from"../chunks/index.a1df979d.js";const ie={};function X(r){let e,n,i;var s=r[1][0];function _(t){return{props:{data:t[3],form:t[2]}}}return s&&(e=k(s,_(r)),r[12](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&A(e.$$.fragment,t),n=p()},m(t,o){e&&E(e,t,o),w(t,n,o),i=!0},p(t,o){const c={};if(o&8&&(c.data=t[3]),o&4&&(c.form=t[2]),o&2&&s!==(s=t[1][0])){if(e){I();const a=e;d(a.$$.fragment,1,0,()=>{N(a,1)}),D()}s?(e=k(s,_(t)),t[12](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else s&&e.$set(c)},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&h(n),r[12](null),e&&N(e,t)}}}function Y(r){let e,n,i;var s=r[1][0];function _(t){return{props:{data:t[3],$$slots:{default:[Z]},$$scope:{ctx:t}}}}return s&&(e=k(s,_(r)),r[11](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&A(e.$$.fragment,t),n=p()},m(t,o){e&&E(e,t,o),w(t,n,o),i=!0},p(t,o){const c={};if(o&8&&(c.data=t[3]),o&8215&&(c.$$scope={dirty:o,ctx:t}),o&2&&s!==(s=t[1][0])){if(e){I();const a=e;d(a.$$.fragment,1,0,()=>{N(a,1)}),D()}s?(e=k(s,_(t)),t[11](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else s&&e.$set(c)},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&h(n),r[11](null),e&&N(e,t)}}}function Z(r){let e,n,i;var s=r[1][1];function _(t){return{props:{data:t[4],form:t[2]}}}return s&&(e=k(s,_(r)),r[10](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&A(e.$$.fragment,t),n=p()},m(t,o){e&&E(e,t,o),w(t,n,o),i=!0},p(t,o){const c={};if(o&16&&(c.data=t[4]),o&4&&(c.form=t[2]),o&2&&s!==(s=t[1][1])){if(e){I();const a=e;d(a.$$.fragment,1,0,()=>{N(a,1)}),D()}s?(e=k(s,_(t)),t[10](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else s&&e.$set(c)},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&h(n),r[10](null),e&&N(e,t)}}}function L(r){let e,n=r[6]&&O(r);return{c(){e=z("div"),n&&n.c(),this.h()},l(i){e=B(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=F(e);n&&n.l(s),s.forEach(h),this.h()},h(){R(e,"id","svelte-announcer"),R(e,"aria-live","assertive"),R(e,"aria-atomic","true"),m(e,"position","absolute"),m(e,"left","0"),m(e,"top","0"),m(e,"clip","rect(0 0 0 0)"),m(e,"clip-path","inset(50%)"),m(e,"overflow","hidden"),m(e,"white-space","nowrap"),m(e,"width","1px"),m(e,"height","1px")},m(i,s){w(i,e,s),n&&n.m(e,null)},p(i,s){i[6]?n?n.p(i,s):(n=O(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&h(e),n&&n.d()}}}function O(r){let e;return{c(){e=G(r[7])},l(n){e=H(n,r[7])},m(n,i){w(n,e,i)},p(n,i){i&128&&J(e,n[7])},d(n){n&&h(e)}}}function $(r){let e,n,i,s,_;const t=[Y,X],o=[];function c(f,u){return f[1][1]?0:1}e=c(r),n=o[e]=t[e](r);let a=r[5]&&L(r);return{c(){n.c(),i=j(),a&&a.c(),s=p()},l(f){n.l(f),i=C(f),a&&a.l(f),s=p()},m(f,u){o[e].m(f,u),w(f,i,u),a&&a.m(f,u),w(f,s,u),_=!0},p(f,[u]){let b=e;e=c(f),e===b?o[e].p(f,u):(I(),d(o[b],1,1,()=>{o[b]=null}),D(),n=o[e],n?n.p(f,u):(n=o[e]=t[e](f),n.c()),g(n,1),n.m(i.parentNode,i)),f[5]?a?a.p(f,u):(a=L(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(f){_||(g(n),_=!0)},o(f){d(n),_=!1},d(f){f&&(h(i),h(s)),o[e].d(f),a&&a.d(f)}}}function x(r,e,n){let{stores:i}=e,{page:s}=e,{constructors:_}=e,{components:t=[]}=e,{form:o}=e,{data_0:c=null}=e,{data_1:a=null}=e;M(i.page.notify);let f=!1,u=!1,b=null;U(()=>{const l=i.page.subscribe(()=>{f&&(n(6,u=!0),K().then(()=>{n(7,b=document.title||"untitled page")}))});return n(5,f=!0),l});function T(l){V[l?"unshift":"push"](()=>{t[1]=l,n(0,t)})}function q(l){V[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}function y(l){V[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}return r.$$set=l=>{"stores"in l&&n(8,i=l.stores),"page"in l&&n(9,s=l.page),"constructors"in l&&n(1,_=l.constructors),"components"in l&&n(0,t=l.components),"form"in l&&n(2,o=l.form),"data_0"in l&&n(3,c=l.data_0),"data_1"in l&&n(4,a=l.data_1)},r.$$.update=()=>{r.$$.dirty&768&&i.page.set(s)},[t,_,o,c,a,f,u,b,i,s,T,q,y]}class se extends Q{constructor(e){super(),W(this,e,x,$,S,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const oe=[()=>P(()=>import("../nodes/0.cac3c05e.js"),["_app/immutable/nodes/0.cac3c05e.js","_app/immutable/chunks/scheduler.e663fd29.js","_app/immutable/chunks/index.a1df979d.js"]),()=>P(()=>import("../nodes/1.8f849a73.js"),["_app/immutable/nodes/1.8f849a73.js","_app/immutable/chunks/scheduler.e663fd29.js","_app/immutable/chunks/index.a1df979d.js","_app/immutable/chunks/singletons.8c7033f6.js","_app/immutable/chunks/index.f67b0ed0.js"]),()=>P(()=>import("../nodes/2.9aa80b4f.js"),["_app/immutable/nodes/2.9aa80b4f.js","_app/immutable/chunks/2.060fc6ba.js","_app/immutable/chunks/preload-helper.cf010ec4.js","_app/immutable/chunks/scheduler.e663fd29.js","_app/immutable/chunks/index.a1df979d.js","_app/immutable/chunks/index.f67b0ed0.js","_app/immutable/assets/2.30926e9a.css"])],re=[],ae={"/":[2]},fe={handleError:({error:r})=>{console.error(r)}};export{ae as dictionary,fe as hooks,ie as matchers,oe as nodes,se as root,re as server_loads}; +import{_ as P}from"../chunks/preload-helper.cf010ec4.js";import{s as S,a as j,e as p,c as C,i as w,d as h,b as M,o as U,f as z,g as B,h as F,j as R,k as m,l as G,m as H,n as J,t as K,p as V,q as k}from"../chunks/scheduler.e663fd29.js";import{S as Q,i as W,t as d,c as D,a as g,g as I,b as v,d as A,m as E,e as N}from"../chunks/index.a1df979d.js";const ie={};function X(r){let e,n,i;var s=r[1][0];function _(t){return{props:{data:t[3],form:t[2]}}}return s&&(e=k(s,_(r)),r[12](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&A(e.$$.fragment,t),n=p()},m(t,o){e&&E(e,t,o),w(t,n,o),i=!0},p(t,o){const c={};if(o&8&&(c.data=t[3]),o&4&&(c.form=t[2]),o&2&&s!==(s=t[1][0])){if(e){I();const a=e;d(a.$$.fragment,1,0,()=>{N(a,1)}),D()}s?(e=k(s,_(t)),t[12](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else s&&e.$set(c)},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&h(n),r[12](null),e&&N(e,t)}}}function Y(r){let e,n,i;var s=r[1][0];function _(t){return{props:{data:t[3],$$slots:{default:[Z]},$$scope:{ctx:t}}}}return s&&(e=k(s,_(r)),r[11](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&A(e.$$.fragment,t),n=p()},m(t,o){e&&E(e,t,o),w(t,n,o),i=!0},p(t,o){const c={};if(o&8&&(c.data=t[3]),o&8215&&(c.$$scope={dirty:o,ctx:t}),o&2&&s!==(s=t[1][0])){if(e){I();const a=e;d(a.$$.fragment,1,0,()=>{N(a,1)}),D()}s?(e=k(s,_(t)),t[11](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else s&&e.$set(c)},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&h(n),r[11](null),e&&N(e,t)}}}function Z(r){let e,n,i;var s=r[1][1];function _(t){return{props:{data:t[4],form:t[2]}}}return s&&(e=k(s,_(r)),r[10](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&A(e.$$.fragment,t),n=p()},m(t,o){e&&E(e,t,o),w(t,n,o),i=!0},p(t,o){const c={};if(o&16&&(c.data=t[4]),o&4&&(c.form=t[2]),o&2&&s!==(s=t[1][1])){if(e){I();const a=e;d(a.$$.fragment,1,0,()=>{N(a,1)}),D()}s?(e=k(s,_(t)),t[10](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else s&&e.$set(c)},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&h(n),r[10](null),e&&N(e,t)}}}function L(r){let e,n=r[6]&&O(r);return{c(){e=z("div"),n&&n.c(),this.h()},l(i){e=B(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=F(e);n&&n.l(s),s.forEach(h),this.h()},h(){R(e,"id","svelte-announcer"),R(e,"aria-live","assertive"),R(e,"aria-atomic","true"),m(e,"position","absolute"),m(e,"left","0"),m(e,"top","0"),m(e,"clip","rect(0 0 0 0)"),m(e,"clip-path","inset(50%)"),m(e,"overflow","hidden"),m(e,"white-space","nowrap"),m(e,"width","1px"),m(e,"height","1px")},m(i,s){w(i,e,s),n&&n.m(e,null)},p(i,s){i[6]?n?n.p(i,s):(n=O(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&h(e),n&&n.d()}}}function O(r){let e;return{c(){e=G(r[7])},l(n){e=H(n,r[7])},m(n,i){w(n,e,i)},p(n,i){i&128&&J(e,n[7])},d(n){n&&h(e)}}}function $(r){let e,n,i,s,_;const t=[Y,X],o=[];function c(f,u){return f[1][1]?0:1}e=c(r),n=o[e]=t[e](r);let a=r[5]&&L(r);return{c(){n.c(),i=j(),a&&a.c(),s=p()},l(f){n.l(f),i=C(f),a&&a.l(f),s=p()},m(f,u){o[e].m(f,u),w(f,i,u),a&&a.m(f,u),w(f,s,u),_=!0},p(f,[u]){let b=e;e=c(f),e===b?o[e].p(f,u):(I(),d(o[b],1,1,()=>{o[b]=null}),D(),n=o[e],n?n.p(f,u):(n=o[e]=t[e](f),n.c()),g(n,1),n.m(i.parentNode,i)),f[5]?a?a.p(f,u):(a=L(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(f){_||(g(n),_=!0)},o(f){d(n),_=!1},d(f){f&&(h(i),h(s)),o[e].d(f),a&&a.d(f)}}}function x(r,e,n){let{stores:i}=e,{page:s}=e,{constructors:_}=e,{components:t=[]}=e,{form:o}=e,{data_0:c=null}=e,{data_1:a=null}=e;M(i.page.notify);let f=!1,u=!1,b=null;U(()=>{const l=i.page.subscribe(()=>{f&&(n(6,u=!0),K().then(()=>{n(7,b=document.title||"untitled page")}))});return n(5,f=!0),l});function T(l){V[l?"unshift":"push"](()=>{t[1]=l,n(0,t)})}function q(l){V[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}function y(l){V[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}return r.$$set=l=>{"stores"in l&&n(8,i=l.stores),"page"in l&&n(9,s=l.page),"constructors"in l&&n(1,_=l.constructors),"components"in l&&n(0,t=l.components),"form"in l&&n(2,o=l.form),"data_0"in l&&n(3,c=l.data_0),"data_1"in l&&n(4,a=l.data_1)},r.$$.update=()=>{r.$$.dirty&768&&i.page.set(s)},[t,_,o,c,a,f,u,b,i,s,T,q,y]}class se extends Q{constructor(e){super(),W(this,e,x,$,S,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const oe=[()=>P(()=>import("../nodes/0.cac3c05e.js"),["_app/immutable/nodes/0.cac3c05e.js","_app/immutable/chunks/scheduler.e663fd29.js","_app/immutable/chunks/index.a1df979d.js"]),()=>P(()=>import("../nodes/1.1aa0feea.js"),["_app/immutable/nodes/1.1aa0feea.js","_app/immutable/chunks/scheduler.e663fd29.js","_app/immutable/chunks/index.a1df979d.js","_app/immutable/chunks/singletons.f9c495b5.js","_app/immutable/chunks/index.f67b0ed0.js"]),()=>P(()=>import("../nodes/2.a969f15f.js"),["_app/immutable/nodes/2.a969f15f.js","_app/immutable/chunks/2.2f787e74.js","_app/immutable/chunks/preload-helper.cf010ec4.js","_app/immutable/chunks/scheduler.e663fd29.js","_app/immutable/chunks/index.a1df979d.js","_app/immutable/chunks/index.f67b0ed0.js","_app/immutable/assets/2.30926e9a.css"])],re=[],ae={"/":[2]},fe={handleError:({error:r})=>{console.error(r)}};export{ae as dictionary,fe as hooks,ie as matchers,oe as nodes,se as root,re as server_loads}; diff --git a/_app/immutable/entry/start.c29ab372.js b/_app/immutable/entry/start.8bb2260a.js similarity index 99% rename from _app/immutable/entry/start.c29ab372.js rename to _app/immutable/entry/start.8bb2260a.js index e354015..09d5a78 100644 --- a/_app/immutable/entry/start.c29ab372.js +++ b/_app/immutable/entry/start.8bb2260a.js @@ -1,3 +1,3 @@ -import{o as De,t as ye}from"../chunks/scheduler.e663fd29.js";import{S as He,a as Je,I as V,g as Ce,f as Ve,b as we,c as le,s as ee,i as _e,d as M,e as K,P as qe,h as We}from"../chunks/singletons.8c7033f6.js";function Xe(n,o){return n==="/"||o==="ignore"?n:o==="never"?n.endsWith("/")?n.slice(0,-1):n:o==="always"&&!n.endsWith("/")?n+"/":n}function Ze(n){return n.split("%25").map(decodeURI).join("%25")}function Qe(n){for(const o in n)n[o]=decodeURIComponent(n[o]);return n}const et=["href","pathname","search","searchParams","toString","toJSON"];function tt(n,o){const u=new URL(n);for(const s of et)Object.defineProperty(u,s,{get(){return o(),n[s]},enumerable:!0,configurable:!0});return nt(u),u}function nt(n){Object.defineProperty(n,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}const at="/__data.json";function rt(n){return n.replace(/\/$/,"")+at}function ot(...n){let o=5381;for(const u of n)if(typeof u=="string"){let s=u.length;for(;s;)o=o*33^u.charCodeAt(--s)}else if(ArrayBuffer.isView(u)){const s=new Uint8Array(u.buffer,u.byteOffset,u.byteLength);let d=s.length;for(;d;)o=o*33^s[--d]}else throw new TypeError("value must be a string or TypedArray");return(o>>>0).toString(36)}const fe=window.fetch;window.fetch=(n,o)=>((n instanceof Request?n.method:(o==null?void 0:o.method)||"GET")!=="GET"&&ne.delete(Se(n)),fe(n,o));const ne=new Map;function it(n,o){const u=Se(n,o),s=document.querySelector(u);if(s!=null&&s.textContent){const{body:d,...f}=JSON.parse(s.textContent),S=s.getAttribute("data-ttl");return S&&ne.set(u,{body:d,init:f,ttl:1e3*Number(S)}),Promise.resolve(new Response(d,f))}return fe(n,o)}function st(n,o,u){if(ne.size>0){const s=Se(n,u),d=ne.get(s);if(d){if(performance.now(){const d=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(s);if(d)return o.push({name:d[1],matcher:d[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const f=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(s);if(f)return o.push({name:f[1],matcher:f[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!s)return;const S=s.split(/\[(.+?)\](?!\])/);return"/"+S.map((y,w)=>{if(w%2){if(y.startsWith("x+"))return be(String.fromCharCode(parseInt(y.slice(2),16)));if(y.startsWith("u+"))return be(String.fromCharCode(...y.slice(2).split("-").map(U=>parseInt(U,16))));const h=ct.exec(y);if(!h)throw new Error(`Invalid param: ${y}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,D,x,k,N]=h;return o.push({name:k,matcher:N,optional:!!D,rest:!!x,chained:x?w===1&&S[0]==="":!1}),x?"(.*?)":D?"([^/]*)?":"([^/]+?)"}return be(y)}).join("")}).join("")}/?$`),params:o}}function ft(n){return!/^\([^)]+\)$/.test(n)}function ut(n){return n.slice(1).split("/").filter(ft)}function dt(n,o,u){const s={},d=n.slice(1);let f=0;for(let S=0;Sw).join("/"),f=0),y===void 0){l.rest&&(s[l.name]="");continue}if(!l.matcher||u[l.matcher](y)){s[l.name]=y;const w=o[S+1],h=d[S+1];w&&!w.rest&&w.optional&&h&&l.chained&&(f=0);continue}if(l.optional&&l.chained){f++;continue}return}if(!f)return s}function be(n){return n.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function pt({nodes:n,server_loads:o,dictionary:u,matchers:s}){const d=new Set(o);return Object.entries(u).map(([l,[y,w,h]])=>{const{pattern:D,params:x}=lt(l),k={id:l,exec:N=>{const U=D.exec(N);if(U)return dt(U,x,s)},errors:[1,...h||[]].map(N=>n[N]),layouts:[0,...w||[]].map(S),leaf:f(y)};return k.errors.length=k.layouts.length=Math.max(k.errors.length,k.layouts.length),k});function f(l){const y=l<0;return y&&(l=~l),[y,n[l]]}function S(l){return l===void 0?l:[d.has(l),n[l]]}}function Ke(n){try{return JSON.parse(sessionStorage[n])}catch{}}function Fe(n,o){const u=JSON.stringify(o);try{sessionStorage[n]=u}catch{}}const ht=-1,gt=-2,mt=-3,yt=-4,wt=-5,_t=-6;function bt(n,o){if(typeof n=="number")return d(n,!0);if(!Array.isArray(n)||n.length===0)throw new Error("Invalid input");const u=n,s=Array(u.length);function d(f,S=!1){if(f===ht)return;if(f===mt)return NaN;if(f===yt)return 1/0;if(f===wt)return-1/0;if(f===_t)return-0;if(S)throw new Error("Invalid input");if(f in s)return s[f];const l=u[f];if(!l||typeof l!="object")s[f]=l;else if(Array.isArray(l))if(typeof l[0]=="string"){const y=l[0],w=o==null?void 0:o[y];if(w)return s[f]=w(d(l[1]));switch(y){case"Date":s[f]=new Date(l[1]);break;case"Set":const h=new Set;s[f]=h;for(let k=1;ko!=null)}const ze=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...ze];const Et=new Set([...ze]);[...Et];async function St(n){var o;for(const u in n)if(typeof((o=n[u])==null?void 0:o.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(n).map(async([s,d])=>[s,await d])));return n}class te{constructor(o,u){this.status=o,typeof u=="string"?this.body={message:u}:u?this.body=u:this.body={message:`Error: ${o}`}}toString(){return JSON.stringify(this.body)}}class Me{constructor(o,u){this.status=o,this.location=u}}const kt="x-sveltekit-invalidated",z=Ke(He)??{},Q=Ke(Je)??{};function ve(n){z[n]=ee()}function Rt(n,o){var $e;const u=pt(n),s=n.nodes[0],d=n.nodes[1];s(),d();const f=document.documentElement,S=[],l=[];let y=null;const w={before_navigate:[],after_navigate:[]};let h={branch:[],error:null,url:null},D=!1,x=!1,k=!0,N=!1,U=!1,B=!1,H=!1,q,j=($e=history.state)==null?void 0:$e[V];j||(j=Date.now(),history.replaceState({...history.state,[V]:j},"",location.href));const ue=z[j];ue&&(history.scrollRestoration="manual",scrollTo(ue.x,ue.y));let F,ae,Y;async function ke(){if(Y=Y||Promise.resolve(),await Y,!Y)return;Y=null;const e=new URL(location.href),i=X(e,!0);y=null;const t=ae={},r=i&&await he(i);if(t===ae&&r){if(r.type==="redirect")return re(new URL(r.location,e).href,{},[e.pathname],t);r.props.page!==void 0&&(F=r.props.page),q.$set(r.props)}}function Re(e){l.some(i=>i==null?void 0:i.snapshot)&&(Q[e]=l.map(i=>{var t;return(t=i==null?void 0:i.snapshot)==null?void 0:t.capture()}))}function Ae(e){var i;(i=Q[e])==null||i.forEach((t,r)=>{var a,c;(c=(a=l[r])==null?void 0:a.snapshot)==null||c.restore(t)})}function Ie(){ve(j),Fe(He,z),Re(j),Fe(Je,Q)}async function re(e,{noScroll:i=!1,replaceState:t=!1,keepFocus:r=!1,state:a={},invalidateAll:c=!1},p,v){return typeof e=="string"&&(e=new URL(e,Ce(document))),ce({url:e,scroll:i?ee():null,keepfocus:r,redirect_chain:p,details:{state:a,replaceState:t},nav_token:v,accepted:()=>{c&&(H=!0)},blocked:()=>{},type:"goto"})}async function Le(e){return y={id:e.id,promise:he(e).then(i=>(i.type==="loaded"&&i.state.error&&(y=null),i))},y.promise}async function oe(...e){const t=u.filter(r=>e.some(a=>r.exec(a))).map(r=>Promise.all([...r.layouts,r.leaf].map(a=>a==null?void 0:a[1]())));await Promise.all(t)}function Oe(e){var r;h=e.state;const i=document.querySelector("style[data-sveltekit]");i&&i.remove(),F=e.props.page,q=new n.root({target:o,props:{...e.props,stores:M,components:l},hydrate:!0}),Ae(j);const t={from:null,to:{params:h.params,route:{id:((r=h.route)==null?void 0:r.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter"};w.after_navigate.forEach(a=>a(t)),x=!0}async function W({url:e,params:i,branch:t,status:r,error:a,route:c,form:p}){let v="never";for(const g of t)(g==null?void 0:g.slash)!==void 0&&(v=g.slash);e.pathname=Xe(e.pathname,v),e.search=e.search;const b={type:"loaded",state:{url:e,params:i,branch:t,error:a,route:c},props:{constructors:vt(t).map(g=>g.node.component)}};p!==void 0&&(b.props.form=p);let _={},R=!F,A=0;for(let g=0;g(v.params.add(P),m[P])}),data:(c==null?void 0:c.data)??null,url:tt(t,()=>{v.url=!0}),async fetch(m,P){let $;m instanceof Request?($=m.url,P={body:m.method==="GET"||m.method==="HEAD"?void 0:await m.blob(),cache:m.cache,credentials:m.credentials,headers:m.headers,integrity:m.integrity,keepalive:m.keepalive,method:m.method,mode:m.mode,redirect:m.redirect,referrer:m.referrer,referrerPolicy:m.referrerPolicy,signal:m.signal,...P}):$=m;const C=new URL($,t);return I(C.href),C.origin===t.origin&&($=C.href.slice(t.origin.length)),x?st($,C.href,P):it($,P)},setHeaders:()=>{},depends:I,parent(){return v.parent=!0,i()}};p=await b.universal.load.call(null,g)??null,p=p?await St(p):null}return{node:b,loader:e,server:c,universal:(R=b.universal)!=null&&R.load?{type:"data",data:p,uses:v}:null,data:p??(c==null?void 0:c.data)??null,slash:((A=b.universal)==null?void 0:A.trailingSlash)??(c==null?void 0:c.slash)}}function Ue(e,i,t,r,a){if(H)return!0;if(!r)return!1;if(r.parent&&e||r.route&&i||r.url&&t)return!0;for(const c of r.params)if(a[c]!==h.params[c])return!0;for(const c of r.dependencies)if(S.some(p=>p(new URL(c))))return!0;return!1}function pe(e,i){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?i??null:null}async function he({id:e,invalidating:i,url:t,params:r,route:a}){if((y==null?void 0:y.id)===e)return y.promise;const{errors:c,layouts:p,leaf:v}=a,b=[...p,v];c.forEach(E=>E==null?void 0:E().catch(()=>{})),b.forEach(E=>E==null?void 0:E[1]().catch(()=>{}));let _=null;const R=h.url?e!==h.url.pathname+h.url.search:!1,A=h.route?a.id!==h.route.id:!1;let I=!1;const g=b.map((E,O)=>{var J;const L=h.branch[O],T=!!(E!=null&&E[0])&&((L==null?void 0:L.loader)!==E[1]||Ue(I,A,R,(J=L.server)==null?void 0:J.uses,r));return T&&(I=!0),T});if(g.some(Boolean)){try{_=await Be(t,g)}catch(E){return ie({status:E instanceof te?E.status:500,error:await Z(E,{url:t,params:r,route:{id:a.id}}),url:t,route:a})}if(_.type==="redirect")return _}const m=_==null?void 0:_.nodes;let P=!1;const $=b.map(async(E,O)=>{var ge;if(!E)return;const L=h.branch[O],T=m==null?void 0:m[O];if((!T||T.type==="skip")&&E[1]===(L==null?void 0:L.loader)&&!Ue(P,A,R,(ge=L.universal)==null?void 0:ge.uses,r))return L;if(P=!0,(T==null?void 0:T.type)==="error")throw T;return de({loader:E[1],url:t,params:r,route:a,parent:async()=>{var Te;const je={};for(let me=0;me{});const C=[];for(let E=0;EPromise.resolve({}),server_data_node:pe(c)}),b={node:await d(),loader:d,universal:null,server:null,data:null};return await W({url:t,params:a,branch:[v,b],status:e,error:i,route:null})}function X(e,i){if(_e(e,K))return;const t=se(e);for(const r of u){const a=r.exec(t);if(a)return{id:e.pathname+e.search,invalidating:i,route:r,params:Qe(a),url:e}}}function se(e){return Ze(e.pathname.slice(K.length)||"/")}function xe({url:e,type:i,intent:t,delta:r}){var v,b;let a=!1;const c={from:{params:h.params,route:{id:((v=h.route)==null?void 0:v.id)??null},url:h.url},to:{params:(t==null?void 0:t.params)??null,route:{id:((b=t==null?void 0:t.route)==null?void 0:b.id)??null},url:e},willUnload:!t,type:i};r!==void 0&&(c.delta=r);const p={...c,cancel:()=>{a=!0}};return U||w.before_navigate.forEach(_=>_(p)),a?null:c}async function ce({url:e,scroll:i,keepfocus:t,redirect_chain:r,details:a,type:c,delta:p,nav_token:v={},accepted:b,blocked:_}){var $,C,E;const R=X(e,!1),A=xe({url:e,type:c,delta:p,intent:R});if(!A){_();return}const I=j;b(),U=!0,x&&M.navigating.set(A),ae=v;let g=R&&await he(R);if(!g){if(_e(e,K))return await G(e);g=await Ne(e,{id:null},await Z(new Error(`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(R==null?void 0:R.url)||e,ae!==v)return!1;if(g.type==="redirect")if(r.length>10||r.includes(e.pathname))g=await ie({status:500,error:await Z(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return re(new URL(g.location,e).href,{},[...r,e.pathname],v),!1;else(($=g.props.page)==null?void 0:$.status)>=400&&await M.updated.check()&&await G(e);if(S.length=0,H=!1,N=!0,ve(I),Re(I),(C=g.props.page)!=null&&C.url&&g.props.page.url.pathname!==e.pathname&&(e.pathname=(E=g.props.page)==null?void 0:E.url.pathname),a){const O=a.replaceState?0:1;if(a.state[V]=j+=O,history[a.replaceState?"replaceState":"pushState"](a.state,"",e),!a.replaceState){let L=j+1;for(;Q[L]||z[L];)delete Q[L],delete z[L],L+=1}}y=null,x?(h=g.state,g.props.page&&(g.props.page.url=e),q.$set(g.props)):Oe(g);const{activeElement:m}=document;if(await ye(),k){const O=e.hash&&document.getElementById(decodeURIComponent(e.hash.slice(1)));i?scrollTo(i.x,i.y):O?O.scrollIntoView():scrollTo(0,0)}const P=document.activeElement!==m&&document.activeElement!==document.body;!t&&!P&&Ee(),k=!0,g.props.page&&(F=g.props.page),U=!1,c==="popstate"&&Ae(j),w.after_navigate.forEach(O=>O(A)),M.navigating.set(null),N=!1}async function Ne(e,i,t,r){return e.origin===location.origin&&e.pathname===location.pathname&&!D?await ie({status:r,error:t,url:e,route:i}):await G(e)}function G(e){return location.href=e.href,new Promise(()=>{})}function Ye(){let e;f.addEventListener("mousemove",c=>{const p=c.target;clearTimeout(e),e=setTimeout(()=>{r(p,2)},20)});function i(c){r(c.composedPath()[0],1)}f.addEventListener("mousedown",i),f.addEventListener("touchstart",i,{passive:!0});const t=new IntersectionObserver(c=>{for(const p of c)p.isIntersecting&&(oe(se(new URL(p.target.href))),t.unobserve(p.target))},{threshold:0});function r(c,p){const v=Ve(c,f);if(!v)return;const{url:b,external:_,download:R}=we(v,K);if(_||R)return;const A=le(v);if(!A.reload)if(p<=A.preload_data){const I=X(b,!1);I&&Le(I)}else p<=A.preload_code&&oe(se(b))}function a(){t.disconnect();for(const c of f.querySelectorAll("a")){const{url:p,external:v,download:b}=we(c,K);if(v||b)continue;const _=le(c);_.reload||(_.preload_code===qe.viewport&&t.observe(c),_.preload_code===qe.eager&&oe(se(p)))}}w.after_navigate.push(a),a()}function Z(e,i){return e instanceof te?e.body:n.hooks.handleError({error:e,event:i})??{message:i.route.id!=null?"Internal Error":"Not Found"}}return{after_navigate:e=>{De(()=>(w.after_navigate.push(e),()=>{const i=w.after_navigate.indexOf(e);w.after_navigate.splice(i,1)}))},before_navigate:e=>{De(()=>(w.before_navigate.push(e),()=>{const i=w.before_navigate.indexOf(e);w.before_navigate.splice(i,1)}))},disable_scroll_handling:()=>{(N||!x)&&(k=!1)},goto:(e,i={})=>re(e,i,[]),invalidate:e=>{if(typeof e=="function")S.push(e);else{const{href:i}=new URL(e,location.href);S.push(t=>t.href===i)}return ke()},invalidate_all:()=>(H=!0,ke()),preload_data:async e=>{const i=new URL(e,Ce(document)),t=X(i,!1);if(!t)throw new Error(`Attempted to preload a URL that does not belong to this app: ${i}`);await Le(t)},preload_code:oe,apply_action:async e=>{if(e.type==="error"){const i=new URL(location.href),{branch:t,route:r}=h;if(!r)return;const a=await Pe(h.branch.length,t,r.errors);if(a){const c=await W({url:i,params:h.params,branch:t.slice(0,a.idx).concat(a.node),status:e.status??500,error:e.error,route:r});h=c.state,q.$set(c.props),ye().then(Ee)}}else e.type==="redirect"?re(e.location,{invalidateAll:!0},[]):(q.$set({form:null,page:{...F,form:e.data,status:e.status}}),await ye(),q.$set({form:e.data}),e.type==="success"&&Ee())},_start_router:()=>{var i;history.scrollRestoration="manual",addEventListener("beforeunload",t=>{var a;let r=!1;if(Ie(),!U){const c={from:{params:h.params,route:{id:((a=h.route)==null?void 0:a.id)??null},url:h.url},to:null,willUnload:!0,type:"leave",cancel:()=>r=!0};w.before_navigate.forEach(p=>p(c))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ie()}),(i=navigator.connection)!=null&&i.saveData||Ye(),f.addEventListener("click",t=>{var I;if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=Ve(t.composedPath()[0],f);if(!r)return;const{url:a,external:c,target:p,download:v}=we(r,K);if(!a)return;if(p==="_parent"||p==="_top"){if(window.parent!==window)return}else if(p&&p!=="_self")return;const b=le(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||v)return;if(c||b.reload){xe({url:a,type:"link"})?U=!0:t.preventDefault();return}const[R,A]=a.href.split("#");if(A!==void 0&&R===location.href.split("#")[0]){if(h.url.hash===a.hash){t.preventDefault(),(I=r.ownerDocument.getElementById(A))==null||I.scrollIntoView();return}if(B=!0,ve(j),e(a),!b.replace_state)return;B=!1,t.preventDefault()}ce({url:a,scroll:b.noscroll?ee():null,keepfocus:b.keep_focus??!1,redirect_chain:[],details:{state:{},replaceState:b.replace_state??a.href===location.href},accepted:()=>t.preventDefault(),blocked:()=>t.preventDefault(),type:"link"})}),f.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if(((a==null?void 0:a.formMethod)||r.method)!=="get")return;const p=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(_e(p,K))return;const v=t.target,{keep_focus:b,noscroll:_,reload:R,replace_state:A}=le(v);if(R)return;t.preventDefault(),t.stopPropagation();const I=new FormData(v),g=a==null?void 0:a.getAttribute("name");g&&I.append(g,(a==null?void 0:a.getAttribute("value"))??""),p.search=new URLSearchParams(I).toString(),ce({url:p,scroll:_?ee():null,keepfocus:b??!1,redirect_chain:[],details:{state:{},replaceState:A??p.href===location.href},nav_token:{},accepted:()=>{},blocked:()=>{},type:"form"})}),addEventListener("popstate",async t=>{var r;if((r=t.state)!=null&&r[V]){if(t.state[V]===j)return;const a=z[t.state[V]];if(h.url.href.split("#")[0]===location.href.split("#")[0]){z[j]=ee(),j=t.state[V],scrollTo(a.x,a.y);return}const c=t.state[V]-j;await ce({url:new URL(location.href),scroll:a,keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{j=t.state[V]},blocked:()=>{history.go(-c)},type:"popstate",delta:c})}else if(!B){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{B&&(B=!1,history.replaceState({...history.state,[V]:++j},"",location.href))});for(const t of document.querySelectorAll("link"))t.rel==="icon"&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&M.navigating.set(null)});function e(t){h.url=t,M.page.set({...F,url:t}),M.page.notify()}},_hydrate:async({status:e=200,error:i,node_ids:t,params:r,route:a,data:c,form:p})=>{D=!0;const v=new URL(location.href);({params:r={},route:a={id:null}}=X(v,!1)||{});let b;try{const _=t.map(async(I,g)=>{const m=c[g];return m!=null&&m.uses&&(m.uses=Ge(m.uses)),de({loader:n.nodes[I],url:v,params:r,route:a,parent:async()=>{const P={};for(let $=0;$I===a.id);if(A){const I=A.layouts;for(let g=0;gd?"1":"0").join(""));const s=await fe(u.href);if(!s.ok)throw new te(s.status,await s.json());return new Promise(async d=>{var h;const f=new Map,S=s.body.getReader(),l=new TextDecoder;function y(D){return bt(D,{Promise:x=>new Promise((k,N)=>{f.set(x,{fulfil:k,reject:N})})})}let w="";for(;;){const{done:D,value:x}=await S.read();if(D&&!w)break;for(w+=!x&&w?` +import{o as De,t as ye}from"../chunks/scheduler.e663fd29.js";import{S as He,a as Je,I as V,g as Ce,f as Ve,b as we,c as le,s as ee,i as _e,d as M,e as K,P as qe,h as We}from"../chunks/singletons.f9c495b5.js";function Xe(n,o){return n==="/"||o==="ignore"?n:o==="never"?n.endsWith("/")?n.slice(0,-1):n:o==="always"&&!n.endsWith("/")?n+"/":n}function Ze(n){return n.split("%25").map(decodeURI).join("%25")}function Qe(n){for(const o in n)n[o]=decodeURIComponent(n[o]);return n}const et=["href","pathname","search","searchParams","toString","toJSON"];function tt(n,o){const u=new URL(n);for(const s of et)Object.defineProperty(u,s,{get(){return o(),n[s]},enumerable:!0,configurable:!0});return nt(u),u}function nt(n){Object.defineProperty(n,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}const at="/__data.json";function rt(n){return n.replace(/\/$/,"")+at}function ot(...n){let o=5381;for(const u of n)if(typeof u=="string"){let s=u.length;for(;s;)o=o*33^u.charCodeAt(--s)}else if(ArrayBuffer.isView(u)){const s=new Uint8Array(u.buffer,u.byteOffset,u.byteLength);let d=s.length;for(;d;)o=o*33^s[--d]}else throw new TypeError("value must be a string or TypedArray");return(o>>>0).toString(36)}const fe=window.fetch;window.fetch=(n,o)=>((n instanceof Request?n.method:(o==null?void 0:o.method)||"GET")!=="GET"&&ne.delete(Se(n)),fe(n,o));const ne=new Map;function it(n,o){const u=Se(n,o),s=document.querySelector(u);if(s!=null&&s.textContent){const{body:d,...f}=JSON.parse(s.textContent),S=s.getAttribute("data-ttl");return S&&ne.set(u,{body:d,init:f,ttl:1e3*Number(S)}),Promise.resolve(new Response(d,f))}return fe(n,o)}function st(n,o,u){if(ne.size>0){const s=Se(n,u),d=ne.get(s);if(d){if(performance.now(){const d=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(s);if(d)return o.push({name:d[1],matcher:d[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const f=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(s);if(f)return o.push({name:f[1],matcher:f[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!s)return;const S=s.split(/\[(.+?)\](?!\])/);return"/"+S.map((y,w)=>{if(w%2){if(y.startsWith("x+"))return be(String.fromCharCode(parseInt(y.slice(2),16)));if(y.startsWith("u+"))return be(String.fromCharCode(...y.slice(2).split("-").map(U=>parseInt(U,16))));const h=ct.exec(y);if(!h)throw new Error(`Invalid param: ${y}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,D,x,k,N]=h;return o.push({name:k,matcher:N,optional:!!D,rest:!!x,chained:x?w===1&&S[0]==="":!1}),x?"(.*?)":D?"([^/]*)?":"([^/]+?)"}return be(y)}).join("")}).join("")}/?$`),params:o}}function ft(n){return!/^\([^)]+\)$/.test(n)}function ut(n){return n.slice(1).split("/").filter(ft)}function dt(n,o,u){const s={},d=n.slice(1);let f=0;for(let S=0;Sw).join("/"),f=0),y===void 0){l.rest&&(s[l.name]="");continue}if(!l.matcher||u[l.matcher](y)){s[l.name]=y;const w=o[S+1],h=d[S+1];w&&!w.rest&&w.optional&&h&&l.chained&&(f=0);continue}if(l.optional&&l.chained){f++;continue}return}if(!f)return s}function be(n){return n.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function pt({nodes:n,server_loads:o,dictionary:u,matchers:s}){const d=new Set(o);return Object.entries(u).map(([l,[y,w,h]])=>{const{pattern:D,params:x}=lt(l),k={id:l,exec:N=>{const U=D.exec(N);if(U)return dt(U,x,s)},errors:[1,...h||[]].map(N=>n[N]),layouts:[0,...w||[]].map(S),leaf:f(y)};return k.errors.length=k.layouts.length=Math.max(k.errors.length,k.layouts.length),k});function f(l){const y=l<0;return y&&(l=~l),[y,n[l]]}function S(l){return l===void 0?l:[d.has(l),n[l]]}}function Ke(n){try{return JSON.parse(sessionStorage[n])}catch{}}function Fe(n,o){const u=JSON.stringify(o);try{sessionStorage[n]=u}catch{}}const ht=-1,gt=-2,mt=-3,yt=-4,wt=-5,_t=-6;function bt(n,o){if(typeof n=="number")return d(n,!0);if(!Array.isArray(n)||n.length===0)throw new Error("Invalid input");const u=n,s=Array(u.length);function d(f,S=!1){if(f===ht)return;if(f===mt)return NaN;if(f===yt)return 1/0;if(f===wt)return-1/0;if(f===_t)return-0;if(S)throw new Error("Invalid input");if(f in s)return s[f];const l=u[f];if(!l||typeof l!="object")s[f]=l;else if(Array.isArray(l))if(typeof l[0]=="string"){const y=l[0],w=o==null?void 0:o[y];if(w)return s[f]=w(d(l[1]));switch(y){case"Date":s[f]=new Date(l[1]);break;case"Set":const h=new Set;s[f]=h;for(let k=1;ko!=null)}const ze=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...ze];const Et=new Set([...ze]);[...Et];async function St(n){var o;for(const u in n)if(typeof((o=n[u])==null?void 0:o.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(n).map(async([s,d])=>[s,await d])));return n}class te{constructor(o,u){this.status=o,typeof u=="string"?this.body={message:u}:u?this.body=u:this.body={message:`Error: ${o}`}}toString(){return JSON.stringify(this.body)}}class Me{constructor(o,u){this.status=o,this.location=u}}const kt="x-sveltekit-invalidated",z=Ke(He)??{},Q=Ke(Je)??{};function ve(n){z[n]=ee()}function Rt(n,o){var $e;const u=pt(n),s=n.nodes[0],d=n.nodes[1];s(),d();const f=document.documentElement,S=[],l=[];let y=null;const w={before_navigate:[],after_navigate:[]};let h={branch:[],error:null,url:null},D=!1,x=!1,k=!0,N=!1,U=!1,B=!1,H=!1,q,j=($e=history.state)==null?void 0:$e[V];j||(j=Date.now(),history.replaceState({...history.state,[V]:j},"",location.href));const ue=z[j];ue&&(history.scrollRestoration="manual",scrollTo(ue.x,ue.y));let F,ae,Y;async function ke(){if(Y=Y||Promise.resolve(),await Y,!Y)return;Y=null;const e=new URL(location.href),i=X(e,!0);y=null;const t=ae={},r=i&&await he(i);if(t===ae&&r){if(r.type==="redirect")return re(new URL(r.location,e).href,{},[e.pathname],t);r.props.page!==void 0&&(F=r.props.page),q.$set(r.props)}}function Re(e){l.some(i=>i==null?void 0:i.snapshot)&&(Q[e]=l.map(i=>{var t;return(t=i==null?void 0:i.snapshot)==null?void 0:t.capture()}))}function Ae(e){var i;(i=Q[e])==null||i.forEach((t,r)=>{var a,c;(c=(a=l[r])==null?void 0:a.snapshot)==null||c.restore(t)})}function Ie(){ve(j),Fe(He,z),Re(j),Fe(Je,Q)}async function re(e,{noScroll:i=!1,replaceState:t=!1,keepFocus:r=!1,state:a={},invalidateAll:c=!1},p,v){return typeof e=="string"&&(e=new URL(e,Ce(document))),ce({url:e,scroll:i?ee():null,keepfocus:r,redirect_chain:p,details:{state:a,replaceState:t},nav_token:v,accepted:()=>{c&&(H=!0)},blocked:()=>{},type:"goto"})}async function Le(e){return y={id:e.id,promise:he(e).then(i=>(i.type==="loaded"&&i.state.error&&(y=null),i))},y.promise}async function oe(...e){const t=u.filter(r=>e.some(a=>r.exec(a))).map(r=>Promise.all([...r.layouts,r.leaf].map(a=>a==null?void 0:a[1]())));await Promise.all(t)}function Oe(e){var r;h=e.state;const i=document.querySelector("style[data-sveltekit]");i&&i.remove(),F=e.props.page,q=new n.root({target:o,props:{...e.props,stores:M,components:l},hydrate:!0}),Ae(j);const t={from:null,to:{params:h.params,route:{id:((r=h.route)==null?void 0:r.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter"};w.after_navigate.forEach(a=>a(t)),x=!0}async function W({url:e,params:i,branch:t,status:r,error:a,route:c,form:p}){let v="never";for(const g of t)(g==null?void 0:g.slash)!==void 0&&(v=g.slash);e.pathname=Xe(e.pathname,v),e.search=e.search;const b={type:"loaded",state:{url:e,params:i,branch:t,error:a,route:c},props:{constructors:vt(t).map(g=>g.node.component)}};p!==void 0&&(b.props.form=p);let _={},R=!F,A=0;for(let g=0;g(v.params.add(P),m[P])}),data:(c==null?void 0:c.data)??null,url:tt(t,()=>{v.url=!0}),async fetch(m,P){let $;m instanceof Request?($=m.url,P={body:m.method==="GET"||m.method==="HEAD"?void 0:await m.blob(),cache:m.cache,credentials:m.credentials,headers:m.headers,integrity:m.integrity,keepalive:m.keepalive,method:m.method,mode:m.mode,redirect:m.redirect,referrer:m.referrer,referrerPolicy:m.referrerPolicy,signal:m.signal,...P}):$=m;const C=new URL($,t);return I(C.href),C.origin===t.origin&&($=C.href.slice(t.origin.length)),x?st($,C.href,P):it($,P)},setHeaders:()=>{},depends:I,parent(){return v.parent=!0,i()}};p=await b.universal.load.call(null,g)??null,p=p?await St(p):null}return{node:b,loader:e,server:c,universal:(R=b.universal)!=null&&R.load?{type:"data",data:p,uses:v}:null,data:p??(c==null?void 0:c.data)??null,slash:((A=b.universal)==null?void 0:A.trailingSlash)??(c==null?void 0:c.slash)}}function Ue(e,i,t,r,a){if(H)return!0;if(!r)return!1;if(r.parent&&e||r.route&&i||r.url&&t)return!0;for(const c of r.params)if(a[c]!==h.params[c])return!0;for(const c of r.dependencies)if(S.some(p=>p(new URL(c))))return!0;return!1}function pe(e,i){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?i??null:null}async function he({id:e,invalidating:i,url:t,params:r,route:a}){if((y==null?void 0:y.id)===e)return y.promise;const{errors:c,layouts:p,leaf:v}=a,b=[...p,v];c.forEach(E=>E==null?void 0:E().catch(()=>{})),b.forEach(E=>E==null?void 0:E[1]().catch(()=>{}));let _=null;const R=h.url?e!==h.url.pathname+h.url.search:!1,A=h.route?a.id!==h.route.id:!1;let I=!1;const g=b.map((E,O)=>{var J;const L=h.branch[O],T=!!(E!=null&&E[0])&&((L==null?void 0:L.loader)!==E[1]||Ue(I,A,R,(J=L.server)==null?void 0:J.uses,r));return T&&(I=!0),T});if(g.some(Boolean)){try{_=await Be(t,g)}catch(E){return ie({status:E instanceof te?E.status:500,error:await Z(E,{url:t,params:r,route:{id:a.id}}),url:t,route:a})}if(_.type==="redirect")return _}const m=_==null?void 0:_.nodes;let P=!1;const $=b.map(async(E,O)=>{var ge;if(!E)return;const L=h.branch[O],T=m==null?void 0:m[O];if((!T||T.type==="skip")&&E[1]===(L==null?void 0:L.loader)&&!Ue(P,A,R,(ge=L.universal)==null?void 0:ge.uses,r))return L;if(P=!0,(T==null?void 0:T.type)==="error")throw T;return de({loader:E[1],url:t,params:r,route:a,parent:async()=>{var Te;const je={};for(let me=0;me{});const C=[];for(let E=0;EPromise.resolve({}),server_data_node:pe(c)}),b={node:await d(),loader:d,universal:null,server:null,data:null};return await W({url:t,params:a,branch:[v,b],status:e,error:i,route:null})}function X(e,i){if(_e(e,K))return;const t=se(e);for(const r of u){const a=r.exec(t);if(a)return{id:e.pathname+e.search,invalidating:i,route:r,params:Qe(a),url:e}}}function se(e){return Ze(e.pathname.slice(K.length)||"/")}function xe({url:e,type:i,intent:t,delta:r}){var v,b;let a=!1;const c={from:{params:h.params,route:{id:((v=h.route)==null?void 0:v.id)??null},url:h.url},to:{params:(t==null?void 0:t.params)??null,route:{id:((b=t==null?void 0:t.route)==null?void 0:b.id)??null},url:e},willUnload:!t,type:i};r!==void 0&&(c.delta=r);const p={...c,cancel:()=>{a=!0}};return U||w.before_navigate.forEach(_=>_(p)),a?null:c}async function ce({url:e,scroll:i,keepfocus:t,redirect_chain:r,details:a,type:c,delta:p,nav_token:v={},accepted:b,blocked:_}){var $,C,E;const R=X(e,!1),A=xe({url:e,type:c,delta:p,intent:R});if(!A){_();return}const I=j;b(),U=!0,x&&M.navigating.set(A),ae=v;let g=R&&await he(R);if(!g){if(_e(e,K))return await G(e);g=await Ne(e,{id:null},await Z(new Error(`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(R==null?void 0:R.url)||e,ae!==v)return!1;if(g.type==="redirect")if(r.length>10||r.includes(e.pathname))g=await ie({status:500,error:await Z(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return re(new URL(g.location,e).href,{},[...r,e.pathname],v),!1;else(($=g.props.page)==null?void 0:$.status)>=400&&await M.updated.check()&&await G(e);if(S.length=0,H=!1,N=!0,ve(I),Re(I),(C=g.props.page)!=null&&C.url&&g.props.page.url.pathname!==e.pathname&&(e.pathname=(E=g.props.page)==null?void 0:E.url.pathname),a){const O=a.replaceState?0:1;if(a.state[V]=j+=O,history[a.replaceState?"replaceState":"pushState"](a.state,"",e),!a.replaceState){let L=j+1;for(;Q[L]||z[L];)delete Q[L],delete z[L],L+=1}}y=null,x?(h=g.state,g.props.page&&(g.props.page.url=e),q.$set(g.props)):Oe(g);const{activeElement:m}=document;if(await ye(),k){const O=e.hash&&document.getElementById(decodeURIComponent(e.hash.slice(1)));i?scrollTo(i.x,i.y):O?O.scrollIntoView():scrollTo(0,0)}const P=document.activeElement!==m&&document.activeElement!==document.body;!t&&!P&&Ee(),k=!0,g.props.page&&(F=g.props.page),U=!1,c==="popstate"&&Ae(j),w.after_navigate.forEach(O=>O(A)),M.navigating.set(null),N=!1}async function Ne(e,i,t,r){return e.origin===location.origin&&e.pathname===location.pathname&&!D?await ie({status:r,error:t,url:e,route:i}):await G(e)}function G(e){return location.href=e.href,new Promise(()=>{})}function Ye(){let e;f.addEventListener("mousemove",c=>{const p=c.target;clearTimeout(e),e=setTimeout(()=>{r(p,2)},20)});function i(c){r(c.composedPath()[0],1)}f.addEventListener("mousedown",i),f.addEventListener("touchstart",i,{passive:!0});const t=new IntersectionObserver(c=>{for(const p of c)p.isIntersecting&&(oe(se(new URL(p.target.href))),t.unobserve(p.target))},{threshold:0});function r(c,p){const v=Ve(c,f);if(!v)return;const{url:b,external:_,download:R}=we(v,K);if(_||R)return;const A=le(v);if(!A.reload)if(p<=A.preload_data){const I=X(b,!1);I&&Le(I)}else p<=A.preload_code&&oe(se(b))}function a(){t.disconnect();for(const c of f.querySelectorAll("a")){const{url:p,external:v,download:b}=we(c,K);if(v||b)continue;const _=le(c);_.reload||(_.preload_code===qe.viewport&&t.observe(c),_.preload_code===qe.eager&&oe(se(p)))}}w.after_navigate.push(a),a()}function Z(e,i){return e instanceof te?e.body:n.hooks.handleError({error:e,event:i})??{message:i.route.id!=null?"Internal Error":"Not Found"}}return{after_navigate:e=>{De(()=>(w.after_navigate.push(e),()=>{const i=w.after_navigate.indexOf(e);w.after_navigate.splice(i,1)}))},before_navigate:e=>{De(()=>(w.before_navigate.push(e),()=>{const i=w.before_navigate.indexOf(e);w.before_navigate.splice(i,1)}))},disable_scroll_handling:()=>{(N||!x)&&(k=!1)},goto:(e,i={})=>re(e,i,[]),invalidate:e=>{if(typeof e=="function")S.push(e);else{const{href:i}=new URL(e,location.href);S.push(t=>t.href===i)}return ke()},invalidate_all:()=>(H=!0,ke()),preload_data:async e=>{const i=new URL(e,Ce(document)),t=X(i,!1);if(!t)throw new Error(`Attempted to preload a URL that does not belong to this app: ${i}`);await Le(t)},preload_code:oe,apply_action:async e=>{if(e.type==="error"){const i=new URL(location.href),{branch:t,route:r}=h;if(!r)return;const a=await Pe(h.branch.length,t,r.errors);if(a){const c=await W({url:i,params:h.params,branch:t.slice(0,a.idx).concat(a.node),status:e.status??500,error:e.error,route:r});h=c.state,q.$set(c.props),ye().then(Ee)}}else e.type==="redirect"?re(e.location,{invalidateAll:!0},[]):(q.$set({form:null,page:{...F,form:e.data,status:e.status}}),await ye(),q.$set({form:e.data}),e.type==="success"&&Ee())},_start_router:()=>{var i;history.scrollRestoration="manual",addEventListener("beforeunload",t=>{var a;let r=!1;if(Ie(),!U){const c={from:{params:h.params,route:{id:((a=h.route)==null?void 0:a.id)??null},url:h.url},to:null,willUnload:!0,type:"leave",cancel:()=>r=!0};w.before_navigate.forEach(p=>p(c))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ie()}),(i=navigator.connection)!=null&&i.saveData||Ye(),f.addEventListener("click",t=>{var I;if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=Ve(t.composedPath()[0],f);if(!r)return;const{url:a,external:c,target:p,download:v}=we(r,K);if(!a)return;if(p==="_parent"||p==="_top"){if(window.parent!==window)return}else if(p&&p!=="_self")return;const b=le(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||v)return;if(c||b.reload){xe({url:a,type:"link"})?U=!0:t.preventDefault();return}const[R,A]=a.href.split("#");if(A!==void 0&&R===location.href.split("#")[0]){if(h.url.hash===a.hash){t.preventDefault(),(I=r.ownerDocument.getElementById(A))==null||I.scrollIntoView();return}if(B=!0,ve(j),e(a),!b.replace_state)return;B=!1,t.preventDefault()}ce({url:a,scroll:b.noscroll?ee():null,keepfocus:b.keep_focus??!1,redirect_chain:[],details:{state:{},replaceState:b.replace_state??a.href===location.href},accepted:()=>t.preventDefault(),blocked:()=>t.preventDefault(),type:"link"})}),f.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if(((a==null?void 0:a.formMethod)||r.method)!=="get")return;const p=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(_e(p,K))return;const v=t.target,{keep_focus:b,noscroll:_,reload:R,replace_state:A}=le(v);if(R)return;t.preventDefault(),t.stopPropagation();const I=new FormData(v),g=a==null?void 0:a.getAttribute("name");g&&I.append(g,(a==null?void 0:a.getAttribute("value"))??""),p.search=new URLSearchParams(I).toString(),ce({url:p,scroll:_?ee():null,keepfocus:b??!1,redirect_chain:[],details:{state:{},replaceState:A??p.href===location.href},nav_token:{},accepted:()=>{},blocked:()=>{},type:"form"})}),addEventListener("popstate",async t=>{var r;if((r=t.state)!=null&&r[V]){if(t.state[V]===j)return;const a=z[t.state[V]];if(h.url.href.split("#")[0]===location.href.split("#")[0]){z[j]=ee(),j=t.state[V],scrollTo(a.x,a.y);return}const c=t.state[V]-j;await ce({url:new URL(location.href),scroll:a,keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{j=t.state[V]},blocked:()=>{history.go(-c)},type:"popstate",delta:c})}else if(!B){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{B&&(B=!1,history.replaceState({...history.state,[V]:++j},"",location.href))});for(const t of document.querySelectorAll("link"))t.rel==="icon"&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&M.navigating.set(null)});function e(t){h.url=t,M.page.set({...F,url:t}),M.page.notify()}},_hydrate:async({status:e=200,error:i,node_ids:t,params:r,route:a,data:c,form:p})=>{D=!0;const v=new URL(location.href);({params:r={},route:a={id:null}}=X(v,!1)||{});let b;try{const _=t.map(async(I,g)=>{const m=c[g];return m!=null&&m.uses&&(m.uses=Ge(m.uses)),de({loader:n.nodes[I],url:v,params:r,route:a,parent:async()=>{const P={};for(let $=0;$I===a.id);if(A){const I=A.layouts;for(let g=0;gd?"1":"0").join(""));const s=await fe(u.href);if(!s.ok)throw new te(s.status,await s.json());return new Promise(async d=>{var h;const f=new Map,S=s.body.getReader(),l=new TextDecoder;function y(D){return bt(D,{Promise:x=>new Promise((k,N)=>{f.set(x,{fulfil:k,reject:N})})})}let w="";for(;;){const{done:D,value:x}=await S.read();if(D&&!w)break;for(w+=!x&&w?` `:l.decode(x);;){const k=w.indexOf(` `);if(k===-1)break;const N=JSON.parse(w.slice(0,k));if(w=w.slice(k+1),N.type==="redirect")return d(N);if(N.type==="data")(h=N.nodes)==null||h.forEach(U=>{(U==null?void 0:U.type)==="data"&&(U.uses=Ge(U.uses),U.data=y(U.data))}),d(N);else if(N.type==="chunk"){const{id:U,data:B,error:H}=N,q=f.get(U);f.delete(U),H?q.reject(y(H)):q.fulfil(y(B))}}}})}function Ge(n){return{dependencies:new Set((n==null?void 0:n.dependencies)??[]),params:new Set((n==null?void 0:n.params)??[]),parent:!!(n!=null&&n.parent),route:!!(n!=null&&n.route),url:!!(n!=null&&n.url)}}function Ee(){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const o=document.body,u=o.getAttribute("tabindex");o.tabIndex=-1,o.focus({preventScroll:!0,focusVisible:!1}),u!==null?o.setAttribute("tabindex",u):o.removeAttribute("tabindex");const s=getSelection();if(s&&s.type!=="None"){const d=[];for(let f=0;f{if(s.rangeCount===d.length){for(let f=0;f{const s=H;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},j={subscribe(s){return P().page.subscribe(s)}};function k(s){var b;let t,r=s[0].status+"",o,n,i,c=((b=s[0].error)==null?void 0:b.message)+"",u;return{c(){t=_("h1"),o=d(r),n=S(),i=_("p"),u=d(c)},l(e){t=f(e,"H1",{});var a=g(t);o=h(a,r),a.forEach(l),n=y(e),i=f(e,"P",{});var p=g(i);u=h(p,c),p.forEach(l)},m(e,a){m(e,t,a),v(t,o),m(e,n,a),m(e,i,a),v(i,u)},p(e,[a]){var p;a&1&&r!==(r=e[0].status+"")&&$(o,r),a&1&&c!==(c=((p=e[0].error)==null?void 0:p.message)+"")&&$(u,c)},i:E,o:E,d(e){e&&(l(t),l(n),l(i))}}}function w(s,t,r){let o;return q(s,j,n=>r(0,o=n)),[o]}let F=class extends z{constructor(t){super(),C(this,t,w,k,x,{})}};export{F as component}; +import{s as x,f as _,l as d,a as S,g as f,h as g,m as h,d as l,c as y,i as m,x as v,n as $,y as E,z as q}from"../chunks/scheduler.e663fd29.js";import{S as z,i as C}from"../chunks/index.a1df979d.js";import{d as H}from"../chunks/singletons.f9c495b5.js";const P=()=>{const s=H;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},j={subscribe(s){return P().page.subscribe(s)}};function k(s){var b;let t,r=s[0].status+"",o,n,i,c=((b=s[0].error)==null?void 0:b.message)+"",u;return{c(){t=_("h1"),o=d(r),n=S(),i=_("p"),u=d(c)},l(e){t=f(e,"H1",{});var a=g(t);o=h(a,r),a.forEach(l),n=y(e),i=f(e,"P",{});var p=g(i);u=h(p,c),p.forEach(l)},m(e,a){m(e,t,a),v(t,o),m(e,n,a),m(e,i,a),v(i,u)},p(e,[a]){var p;a&1&&r!==(r=e[0].status+"")&&$(o,r),a&1&&c!==(c=((p=e[0].error)==null?void 0:p.message)+"")&&$(u,c)},i:E,o:E,d(e){e&&(l(t),l(n),l(i))}}}function w(s,t,r){let o;return q(s,j,n=>r(0,o=n)),[o]}let F=class extends z{constructor(t){super(),C(this,t,w,k,x,{})}};export{F as component}; diff --git a/_app/immutable/nodes/2.9aa80b4f.js b/_app/immutable/nodes/2.9aa80b4f.js deleted file mode 100644 index 4e943de..0000000 --- a/_app/immutable/nodes/2.9aa80b4f.js +++ /dev/null @@ -1 +0,0 @@ -import{P as e,a as n}from"../chunks/2.060fc6ba.js";export{e as component,n as universal}; diff --git a/_app/immutable/nodes/2.a969f15f.js b/_app/immutable/nodes/2.a969f15f.js new file mode 100644 index 0000000..cb9c010 --- /dev/null +++ b/_app/immutable/nodes/2.a969f15f.js @@ -0,0 +1 @@ +import{P as e,a as n}from"../chunks/2.2f787e74.js";export{e as component,n as universal}; diff --git a/_app/version.json b/_app/version.json index 971ecbf..9434927 100644 --- a/_app/version.json +++ b/_app/version.json @@ -1 +1 @@ -{"version":"1693066094077"} \ No newline at end of file +{"version":"1693068740553"} \ No newline at end of file diff --git a/index.html b/index.html index 0c64780..3adfa76 100644 --- a/index.html +++ b/index.html @@ -48,11 +48,11 @@ /> - + - + - + @@ -75,7 +75,7 @@