MCPcopy Index your code
hub / github.com/plotly/plotly.py / resize

Method resize

plotly/package_data/widgetbundle.js:3789–3789  ·  view source on GitHub ↗
(Ue)

Source from the content-addressed store, hash-verified

3787`}),staticAttributes:we,staticUniforms:dt}}class Xt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(I,ie,we,Se,Be,dt,St,Nt,$t){this.context=I;let Tr=this.boundPaintVertexBuffers.length!==Se.length;for(let Ar=0;!Tr&&Ar<Se.length;Ar++)this.boundPaintVertexBuffers[Ar]!==Se[Ar]&&(Tr=!0);!this.vao||this.boundProgram!==ie||this.boundLayoutVertexBuffer!==we||Tr||this.boundIndexBuffer!==Be||this.boundVertexOffset!==dt||this.boundDynamicVertexBuffer!==St||this.boundDynamicVertexBuffer2!==Nt||this.boundDynamicVertexBuffer3!==$t?this.freshBind(ie,we,Se,Be,dt,St,Nt,$t):(I.bindVertexArray.set(this.vao),St&&St.bind(),Be&&Be.dynamicDraw&&Be.bind(),Nt&&Nt.bind(),$t&&$t.bind())}freshBind(I,ie,we,Se,Be,dt,St,Nt){let $t=I.numAttributes,Tr=this.context,Ar=Tr.gl;this.vao&&this.destroy(),this.vao=Tr.createVertexArray(),Tr.bindVertexArray.set(this.vao),this.boundProgram=I,this.boundLayoutVertexBuffer=ie,this.boundPaintVertexBuffers=we,this.boundIndexBuffer=Se,this.boundVertexOffset=Be,this.boundDynamicVertexBuffer=dt,this.boundDynamicVertexBuffer2=St,this.boundDynamicVertexBuffer3=Nt,ie.enableAttributes(Ar,I);for(let Kr of we)Kr.enableAttributes(Ar,I);dt&&dt.enableAttributes(Ar,I),St&&St.enableAttributes(Ar,I),Nt&&Nt.enableAttributes(Ar,I),ie.bind(),ie.setVertexAttribPointers(Ar,I,Be);for(let Kr of we)Kr.bind(),Kr.setVertexAttribPointers(Ar,I,Be);dt&&(dt.bind(),dt.setVertexAttribPointers(Ar,I,Be)),Se&&Se.bind(),St&&(St.bind(),St.setVertexAttribPointers(Ar,I,Be)),Nt&&(Nt.bind(),Nt.setVertexAttribPointers(Ar,I,Be)),Tr.currentNumAttributes=$t}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let vr=(Ue,I,ie,we,Se)=>({u_matrix:Ue,u_texture:0,u_ele_delta:I,u_fog_matrix:ie,u_fog_color:we?we.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:we?we.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:we?we.calculateFogBlendOpacity(Se):0,u_horizon_color:we?we.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:we?we.properties.get("horizon-fog-blend"):1});function Or(Ue){let I=[];for(let ie=0;ie<Ue.length;ie++){if(Ue[ie]===null)continue;let we=Ue[ie].split(" ");I.push(we.pop())}return I}class ba{constructor(I,ie,we,Se,Be,dt){let St=I.gl;this.program=St.createProgram();let Nt=Or(ie.staticAttributes),$t=we?we.getBinderAttributes():[],Tr=Nt.concat($t),Ar=Hr.prelude.staticUniforms?Or(Hr.prelude.staticUniforms):[],Kr=ie.staticUniforms?Or(ie.staticUniforms):[],na=we?we.getBinderUniforms():[],He=Ar.concat(Kr).concat(na),Je=[];for(let yr of He)Je.indexOf(yr)<0&&Je.push(yr);let lt=we?we.defines():[];Be&&lt.push("#define OVERDRAW_INSPECTOR;"),dt&&lt.push("#define TERRAIN3D;");let vt=lt.concat(Hr.prelude.fragmentSource,ie.fragmentSource).join(`
3788`),Lt=lt.concat(Hr.prelude.vertexSource,ie.vertexSource).join(`
3789`),At=St.createShader(St.FRAGMENT_SHADER);if(St.isContextLost())return void(this.failedToCreate=!0);if(St.shaderSource(At,vt),St.compileShader(At),!St.getShaderParameter(At,St.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${St.getShaderInfoLog(At)}`);St.attachShader(this.program,At);let zt=St.createShader(St.VERTEX_SHADER);if(St.isContextLost())return void(this.failedToCreate=!0);if(St.shaderSource(zt,Lt),St.compileShader(zt),!St.getShaderParameter(zt,St.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${St.getShaderInfoLog(zt)}`);St.attachShader(this.program,zt),this.attributes={};let cr={};this.numAttributes=Tr.length;for(let yr=0;yr<this.numAttributes;yr++)Tr[yr]&&(St.bindAttribLocation(this.program,yr,Tr[yr]),this.attributes[Tr[yr]]=yr);if(St.linkProgram(this.program),!St.getProgramParameter(this.program,St.LINK_STATUS))throw new Error(`Program failed to link: ${St.getProgramInfoLog(this.program)}`);St.deleteShader(zt),St.deleteShader(At);for(let yr=0;yr<Je.length;yr++){let Er=Je[yr];if(Er&&!cr[Er]){let jr=St.getUniformLocation(this.program,Er);jr&&(cr[Er]=jr)}}this.fixedUniforms=Se(I,cr),this.terrainUniforms=((yr,Er)=>({u_depth:new t.aH(yr,Er.u_depth),u_terrain:new t.aH(yr,Er.u_terrain),u_terrain_dim:new t.aI(yr,Er.u_terrain_dim),u_terrain_matrix:new t.aJ(yr,Er.u_terrain_matrix),u_terrain_unpack:new t.aK(yr,Er.u_terrain_unpack),u_terrain_exaggeration:new t.aI(yr,Er.u_terrain_exaggeration)}))(I,cr),this.binderUniforms=we?we.getUniforms(I,cr):[]}draw(I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He,Je,lt,vt,Lt){let At=I.gl;if(this.failedToCreate)return;if(I.program.set(this.program),I.setDepthMode(we),I.setStencilMode(Se),I.setColorMode(Be),I.setCullFace(dt),Nt){I.activeTexture.set(At.TEXTURE2),At.bindTexture(At.TEXTURE_2D,Nt.depthTexture),I.activeTexture.set(At.TEXTURE3),At.bindTexture(At.TEXTURE_2D,Nt.texture);for(let cr in this.terrainUniforms)this.terrainUniforms[cr].set(Nt[cr])}for(let cr in this.fixedUniforms)this.fixedUniforms[cr].set(St[cr]);Je&&Je.setUniforms(I,this.binderUniforms,na,{zoom:He});let zt=0;switch(ie){case At.LINES:zt=2;break;case At.TRIANGLES:zt=3;break;case At.LINE_STRIP:zt=1}for(let cr of Kr.get()){let yr=cr.vaos||(cr.vaos={});(yr[$t]||(yr[$t]=new Xt)).bind(I,this,Tr,Je?Je.getPaintVertexBuffers():[],Ar,cr.vertexOffset,lt,vt,Lt),At.drawElements(ie,cr.primitiveLength*zt,At.UNSIGNED_SHORT,cr.primitiveOffset*zt*2)}}}function Pa(Ue,I,ie){let we=1/Da(ie,1,I.transform.tileZoom),Se=Math.pow(2,ie.tileID.overscaledZ),Be=ie.tileSize*Math.pow(2,I.transform.tileZoom)/Se,dt=Be*(ie.tileID.canonical.x+ie.tileID.wrap*Se),St=Be*ie.tileID.canonical.y;return{u_image:0,u_texsize:ie.imageAtlasTexture.size,u_scale:[we,Ue.fromScale,Ue.toScale],u_fade:Ue.t,u_pixel_coord_upper:[dt>>16,St>>16],u_pixel_coord_lower:[65535&dt,65535&St]}}let ya=(Ue,I,ie,we)=>{let Se=I.style.light,Be=Se.properties.get("position"),dt=[Be.x,Be.y,Be.z],St=function(){var $t=new t.A(9);return t.A!=Float32Array&&($t[1]=0,$t[2]=0,$t[3]=0,$t[5]=0,$t[6]=0,$t[7]=0),$t[0]=1,$t[4]=1,$t[8]=1,$t}();Se.properties.get("anchor")==="viewport"&&function($t,Tr){var Ar=Math.sin(Tr),Kr=Math.cos(Tr);$t[0]=Kr,$t[1]=Ar,$t[2]=0,$t[3]=-Ar,$t[4]=Kr,$t[5]=0,$t[6]=0,$t[7]=0,$t[8]=1}(St,-I.transform.angle),function($t,Tr,Ar){var Kr=Tr[0],na=Tr[1],He=Tr[2];$t[0]=Kr*Ar[0]+na*Ar[3]+He*Ar[6],$t[1]=Kr*Ar[1]+na*Ar[4]+He*Ar[7],$t[2]=Kr*Ar[2]+na*Ar[5]+He*Ar[8]}(dt,dt,St);let Nt=Se.properties.get("color");return{u_matrix:Ue,u_lightpos:dt,u_lightintensity:Se.properties.get("intensity"),u_lightcolor:[Nt.r,Nt.g,Nt.b],u_vertical_gradient:+ie,u_opacity:we}},la=(Ue,I,ie,we,Se,Be,dt)=>t.e(ya(Ue,I,ie,we),Pa(Be,I,dt),{u_height_factor:-Math.pow(2,Se.overscaledZ)/dt.tileSize/8}),Ta=Ue=>({u_matrix:Ue}),Ai=(Ue,I,ie,we)=>t.e(Ta(Ue),Pa(ie,I,we)),ki=(Ue,I)=>({u_matrix:Ue,u_world:I}),Ki=(Ue,I,ie,we,Se)=>t.e(Ai(Ue,I,ie,we),{u_world:Se}),_n=(Ue,I,ie,we)=>{let Se=Ue.transform,Be,dt;if(we.paint.get("circle-pitch-alignment")==="map"){let St=Da(ie,1,Se.zoom);Be=!0,dt=[St,St]}else Be=!1,dt=Se.pixelsToGLUnits;return{u_camera_to_center_distance:Se.cameraToCenterDistance,u_scale_with_map:+(we.paint.get("circle-pitch-scale")==="map"),u_matrix:Ue.translatePosMatrix(I.posMatrix,ie,we.paint.get("circle-translate"),we.paint.get("circle-translate-anchor")),u_pitch_with_map:+Be,u_device_pixel_ratio:Ue.pixelRatio,u_extrude_scale:dt}},Rn=(Ue,I,ie)=>({u_matrix:Ue,u_inv_matrix:I,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}),En=(Ue,I,ie=1)=>({u_matrix:Ue,u_color:I,u_overlay:0,u_overlay_scale:ie}),On=Ue=>({u_matrix:Ue}),no=(Ue,I,ie,we)=>({u_matrix:Ue,u_extrude_scale:Da(I,1,ie),u_intensity:we}),cn=(Ue,I,ie,we)=>{let Se=t.H();t.aP(Se,0,Ue.width,Ue.height,0,0,1);let Be=Ue.context.gl;return{u_matrix:Se,u_world:[Be.drawingBufferWidth,Be.drawingBufferHeight],u_image:ie,u_color_ramp:we,u_opacity:I.paint.get("heatmap-opacity")}};function lo(Ue,I){let ie=Math.pow(2,I.canonical.z),we=I.canonical.y;return[new t.Z(0,we/ie).toLngLat().lat,new t.Z(0,(we+1)/ie).toLngLat().lat]}let Wo=(Ue,I,ie,we)=>{let Se=Ue.transform;return{u_matrix:as(Ue,I,ie,we),u_ratio:1/Da(I,1,Se.zoom),u_device_pixel_ratio:Ue.pixelRatio,u_units_to_pixels:[1/Se.pixelsToGLUnits[0],1/Se.pixelsToGLUnits[1]]}},hs=(Ue,I,ie,we,Se)=>t.e(Wo(Ue,I,ie,Se),{u_image:0,u_image_height:we}),Oo=(Ue,I,ie,we,Se)=>{let Be=Ue.transform,dt=No(I,Be);return{u_matrix:as(Ue,I,ie,Se),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Da(I,1,Be.zoom),u_device_pixel_ratio:Ue.pixelRatio,u_image:0,u_scale:[dt,we.fromScale,we.toScale],u_fade:we.t,u_units_to_pixels:[1/Be.pixelsToGLUnits[0],1/Be.pixelsToGLUnits[1]]}},Wn=(Ue,I,ie,we,Se,Be)=>{let dt=Ue.lineAtlas,St=No(I,Ue.transform),Nt=ie.layout.get("line-cap")==="round",$t=dt.getDash(we.from,Nt),Tr=dt.getDash(we.to,Nt),Ar=$t.width*Se.fromScale,Kr=Tr.width*Se.toScale;return t.e(Wo(Ue,I,ie,Be),{u_patternscale_a:[St/Ar,-$t.height/2],u_patternscale_b:[St/Kr,-Tr.height/2],u_sdfgamma:dt.width/(256*Math.min(Ar,Kr)*Ue.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:Tr.y,u_mix:Se.t})};function No(Ue,I){return 1/Da(Ue,1,I.tileZoom)}function as(Ue,I,ie,we){return Ue.translatePosMatrix(we?we.posMatrix:I.tileID.posMatrix,I,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}let Ns=(Ue,I,ie,we,Se)=>{return{u_matrix:Ue,u_tl_parent:I,u_scale_parent:ie,u_buffer_scale:1,u_fade_t:we.mix,u_opacity:we.opacity*Se.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Se.paint.get("raster-brightness-min"),u_brightness_high:Se.paint.get("raster-brightness-max"),u_saturation_factor:(dt=Se.paint.get("raster-saturation"),dt>0?1-1/(1.001-dt):-dt),u_contrast_factor:(Be=Se.paint.get("raster-contrast"),Be>0?1/(1-Be):1+Be),u_spin_weights:ss(Se.paint.get("raster-hue-rotate"))};var Be,dt};function ss(Ue){Ue*=Math.PI/180;let I=Math.sin(Ue),ie=Math.cos(Ue);return[(2*ie+1)/3,(-Math.sqrt(3)*I-ie+1)/3,(Math.sqrt(3)*I-ie+1)/3]}let uo=(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na)=>{let He=dt.transform;return{u_is_size_zoom_constant:+(Ue==="constant"||Ue==="source"),u_is_size_feature_constant:+(Ue==="constant"||Ue==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:He.cameraToCenterDistance,u_pitch:He.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:He.width/He.height,u_fade_change:dt.options.fadeDuration?dt.symbolFadeChange:1,u_matrix:St,u_label_plane_matrix:Nt,u_coord_matrix:$t,u_is_text:+Ar,u_pitch_with_map:+we,u_is_along_line:Se,u_is_variable_anchor:Be,u_texsize:Kr,u_texture:0,u_translation:Tr,u_pitched_scale:na}},jn=(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He)=>{let Je=dt.transform;return t.e(uo(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,He),{u_gamma_scale:we?Math.cos(Je._pitch)*Je.cameraToCenterDistance:1,u_device_pixel_ratio:dt.pixelRatio,u_is_halo:+na})},Xn=(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na)=>t.e(jn(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,!0,Ar,!0,na),{u_texsize_icon:Kr,u_texture_icon:1}),ls=(Ue,I,ie)=>({u_matrix:Ue,u_opacity:I,u_color:ie}),Cs=(Ue,I,ie,we,Se,Be)=>t.e(function(dt,St,Nt,$t){let Tr=Nt.imageManager.getPattern(dt.from.toString()),Ar=Nt.imageManager.getPattern(dt.to.toString()),{width:Kr,height:na}=Nt.imageManager.getPixelSize(),He=Math.pow(2,$t.tileID.overscaledZ),Je=$t.tileSize*Math.pow(2,Nt.transform.tileZoom)/He,lt=Je*($t.tileID.canonical.x+$t.tileID.wrap*He),vt=Je*$t.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Tr.tl,u_pattern_br_a:Tr.br,u_pattern_tl_b:Ar.tl,u_pattern_br_b:Ar.br,u_texsize:[Kr,na],u_mix:St.t,u_pattern_size_a:Tr.displaySize,u_pattern_size_b:Ar.displaySize,u_scale_a:St.fromScale,u_scale_b:St.toScale,u_tile_units_to_pixels:1/Da($t,1,Nt.transform.tileZoom),u_pixel_coord_upper:[lt>>16,vt>>16],u_pixel_coord_lower:[65535&lt,65535&vt]}}(we,Be,ie,Se),{u_matrix:Ue,u_opacity:I}),Ks={fillExtrusion:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_lightpos:new t.aN(Ue,I.u_lightpos),u_lightintensity:new t.aI(Ue,I.u_lightintensity),u_lightcolor:new t.aN(Ue,I.u_lightcolor),u_vertical_gradient:new t.aI(Ue,I.u_vertical_gradient),u_opacity:new t.aI(Ue,I.u_opacity)}),fillExtrusionPattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_lightpos:new t.aN(Ue,I.u_lightpos),u_lightintensity:new t.aI(Ue,I.u_lightintensity),u_lightcolor:new t.aN(Ue,I.u_lightcolor),u_vertical_gradient:new t.aI(Ue,I.u_vertical_gradient),u_height_factor:new t.aI(Ue,I.u_height_factor),u_image:new t.aH(Ue,I.u_image),u_texsize:new t.aO(Ue,I.u_texsize),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade),u_opacity:new t.aI(Ue,I.u_opacity)}),fill:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix)}),fillPattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_image:new t.aH(Ue,I.u_image),u_texsize:new t.aO(Ue,I.u_texsize),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade)}),fillOutline:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_world:new t.aO(Ue,I.u_world)}),fillOutlinePattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_world:new t.aO(Ue,I.u_world),u_image:new t.aH(Ue,I.u_image),u_texsize:new t.aO(Ue,I.u_texsize),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade)}),circle:(Ue,I)=>({u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_scale_with_map:new t.aH(Ue,I.u_scale_with_map),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_extrude_scale:new t.aO(Ue,I.u_extrude_scale),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_matrix:new t.aJ(Ue,I.u_matrix)}),collisionBox:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_pixel_extrude_scale:new t.aO(Ue,I.u_pixel_extrude_scale)}),collisionCircle:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_inv_matrix:new t.aJ(Ue,I.u_inv_matrix),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_viewport_size:new t.aO(Ue,I.u_viewport_size)}),debug:(Ue,I)=>({u_color:new t.aL(Ue,I.u_color),u_matrix:new t.aJ(Ue,I.u_matrix),u_overlay:new t.aH(Ue,I.u_overlay),u_overlay_scale:new t.aI(Ue,I.u_overlay_scale)}),clippingMask:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix)}),heatmap:(Ue,I)=>({u_extrude_scale:new t.aI(Ue,I.u_extrude_scale),u_intensity:new t.aI(Ue,I.u_intensity),u_matrix:new t.aJ(Ue,I.u_matrix)}),heatmapTexture:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_world:new t.aO(Ue,I.u_world),u_image:new t.aH(Ue,I.u_image),u_color_ramp:new t.aH(Ue,I.u_color_ramp),u_opacity:new t.aI(Ue,I.u_opacity)}),hillshade:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_image:new t.aH(Ue,I.u_image),u_latrange:new t.aO(Ue,I.u_latrange),u_light:new t.aO(Ue,I.u_light),u_shadow:new t.aL(Ue,I.u_shadow),u_highlight:new t.aL(Ue,I.u_highlight),u_accent:new t.aL(Ue,I.u_accent)}),hillshadePrepare:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_image:new t.aH(Ue,I.u_image),u_dimension:new t.aO(Ue,I.u_dimension),u_zoom:new t.aI(Ue,I.u_zoom),u_unpack:new t.aK(Ue,I.u_unpack)}),line:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels)}),lineGradient:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels),u_image:new t.aH(Ue,I.u_image),u_image_height:new t.aI(Ue,I.u_image_height)}),linePattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_texsize:new t.aO(Ue,I.u_texsize),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_image:new t.aH(Ue,I.u_image),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade)}),lineSDF:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels),u_patternscale_a:new t.aO(Ue,I.u_patternscale_a),u_patternscale_b:new t.aO(Ue,I.u_patternscale_b),u_sdfgamma:new t.aI(Ue,I.u_sdfgamma),u_image:new t.aH(Ue,I.u_image),u_tex_y_a:new t.aI(Ue,I.u_tex_y_a),u_tex_y_b:new t.aI(Ue,I.u_tex_y_b),u_mix:new t.aI(Ue,I.u_mix)}),raster:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_tl_parent:new t.aO(Ue,I.u_tl_parent),u_scale_parent:new t.aI(Ue,I.u_scale_parent),u_buffer_scale:new t.aI(Ue,I.u_buffer_scale),u_fade_t:new t.aI(Ue,I.u_fade_t),u_opacity:new t.aI(Ue,I.u_opacity),u_image0:new t.aH(Ue,I.u_image0),u_image1:new t.aH(Ue,I.u_image1),u_brightness_low:new t.aI(Ue,I.u_brightness_low),u_brightness_high:new t.aI(Ue,I.u_brightness_high),u_saturation_factor:new t.aI(Ue,I.u_saturation_factor),u_contrast_factor:new t.aI(Ue,I.u_contrast_factor),u_spin_weights:new t.aN(Ue,I.u_spin_weights)}),symbolIcon:(Ue,I)=>({u_is_size_zoom_constant:new t.aH(Ue,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ue,I.u_is_size_feature_constant),u_size_t:new t.aI(Ue,I.u_size_t),u_size:new t.aI(Ue,I.u_size),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_pitch:new t.aI(Ue,I.u_pitch),u_rotate_symbol:new t.aH(Ue,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Ue,I.u_aspect_ratio),u_fade_change:new t.aI(Ue,I.u_fade_change),u_matrix:new t.aJ(Ue,I.u_matrix),u_label_plane_matrix:new t.aJ(Ue,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ue,I.u_coord_matrix),u_is_text:new t.aH(Ue,I.u_is_text),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_is_along_line:new t.aH(Ue,I.u_is_along_line),u_is_variable_anchor:new t.aH(Ue,I.u_is_variable_anchor),u_texsize:new t.aO(Ue,I.u_texsize),u_texture:new t.aH(Ue,I.u_texture),u_translation:new t.aO(Ue,I.u_translation),u_pitched_scale:new t.aI(Ue,I.u_pitched_scale)}),symbolSDF:(Ue,I)=>({u_is_size_zoom_constant:new t.aH(Ue,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ue,I.u_is_size_feature_constant),u_size_t:new t.aI(Ue,I.u_size_t),u_size:new t.aI(Ue,I.u_size),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_pitch:new t.aI(Ue,I.u_pitch),u_rotate_symbol:new t.aH(Ue,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Ue,I.u_aspect_ratio),u_fade_change:new t.aI(Ue,I.u_fade_change),u_matrix:new t.aJ(Ue,I.u_matrix),u_label_plane_matrix:new t.aJ(Ue,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ue,I.u_coord_matrix),u_is_text:new t.aH(Ue,I.u_is_text),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_is_along_line:new t.aH(Ue,I.u_is_along_line),u_is_variable_anchor:new t.aH(Ue,I.u_is_variable_anchor),u_texsize:new t.aO(Ue,I.u_texsize),u_texture:new t.aH(Ue,I.u_texture),u_gamma_scale:new t.aI(Ue,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_is_halo:new t.aH(Ue,I.u_is_halo),u_translation:new t.aO(Ue,I.u_translation),u_pitched_scale:new t.aI(Ue,I.u_pitched_scale)}),symbolTextAndIcon:(Ue,I)=>({u_is_size_zoom_constant:new t.aH(Ue,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ue,I.u_is_size_feature_constant),u_size_t:new t.aI(Ue,I.u_size_t),u_size:new t.aI(Ue,I.u_size),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_pitch:new t.aI(Ue,I.u_pitch),u_rotate_symbol:new t.aH(Ue,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Ue,I.u_aspect_ratio),u_fade_change:new t.aI(Ue,I.u_fade_change),u_matrix:new t.aJ(Ue,I.u_matrix),u_label_plane_matrix:new t.aJ(Ue,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ue,I.u_coord_matrix),u_is_text:new t.aH(Ue,I.u_is_text),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_is_along_line:new t.aH(Ue,I.u_is_along_line),u_is_variable_anchor:new t.aH(Ue,I.u_is_variable_anchor),u_texsize:new t.aO(Ue,I.u_texsize),u_texsize_icon:new t.aO(Ue,I.u_texsize_icon),u_texture:new t.aH(Ue,I.u_texture),u_texture_icon:new t.aH(Ue,I.u_texture_icon),u_gamma_scale:new t.aI(Ue,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_is_halo:new t.aH(Ue,I.u_is_halo),u_translation:new t.aO(Ue,I.u_translation),u_pitched_scale:new t.aI(Ue,I.u_pitched_scale)}),background:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_opacity:new t.aI(Ue,I.u_opacity),u_color:new t.aL(Ue,I.u_color)}),backgroundPattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_opacity:new t.aI(Ue,I.u_opacity),u_image:new t.aH(Ue,I.u_image),u_pattern_tl_a:new t.aO(Ue,I.u_pattern_tl_a),u_pattern_br_a:new t.aO(Ue,I.u_pattern_br_a),u_pattern_tl_b:new t.aO(Ue,I.u_pattern_tl_b),u_pattern_br_b:new t.aO(Ue,I.u_pattern_br_b),u_texsize:new t.aO(Ue,I.u_texsize),u_mix:new t.aI(Ue,I.u_mix),u_pattern_size_a:new t.aO(Ue,I.u_pattern_size_a),u_pattern_size_b:new t.aO(Ue,I.u_pattern_size_b),u_scale_a:new t.aI(Ue,I.u_scale_a),u_scale_b:new t.aI(Ue,I.u_scale_b),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Ue,I.u_tile_units_to_pixels)}),terrain:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_texture:new t.aH(Ue,I.u_texture),u_ele_delta:new t.aI(Ue,I.u_ele_delta),u_fog_matrix:new t.aJ(Ue,I.u_fog_matrix),u_fog_color:new t.aL(Ue,I.u_fog_color),u_fog_ground_blend:new t.aI(Ue,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Ue,I.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Ue,I.u_horizon_color),u_horizon_fog_blend:new t.aI(Ue,I.u_horizon_fog_blend)}),terrainDepth:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ele_delta:new t.aI(Ue,I.u_ele_delta)}),terrainCoords:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_texture:new t.aH(Ue,I.u_texture),u_terrain_coords_id:new t.aI(Ue,I.u_terrain_coords_id),u_ele_delta:new t.aI(Ue,I.u_ele_delta)}),sky:(Ue,I)=>({u_sky_color:new t.aL(Ue,I.u_sky_color),u_horizon_color:new t.aL(Ue,I.u_horizon_color),u_horizon:new t.aI(Ue,I.u_horizon),u_sky_horizon_blend:new t.aI(Ue,I.u_sky_horizon_blend)})};class Xo{constructor(I,ie,we){this.context=I;let Se=I.gl;this.buffer=Se.createBuffer(),this.dynamicDraw=!!we,this.context.unbindVAO(),I.bindElementBuffer.set(this.buffer),Se.bufferData(Se.ELEMENT_ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Se.DYNAMIC_DRAW:Se.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(I){let ie=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ie.bufferSubData(ie.ELEMENT_ARRAY_BUFFER,0,I.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Gi={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Ln{constructor(I,ie,we,Se){this.length=ie.length,this.attributes=we,this.itemSize=ie.bytesPerElement,this.dynamicDraw=Se,this.context=I;let Be=I.gl;this.buffer=Be.createBuffer(),I.bindVertexBuffer.set(this.buffer),Be.bufferData(Be.ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Be.DYNAMIC_DRAW:Be.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(I){if(I.length!==this.length)throw new Error(`Length of new data is ${I.length}, which doesn't match current length of ${this.length}`);let ie=this.context.gl;this.bind(),ie.bufferSubData(ie.ARRAY_BUFFER,0,I.arrayBuffer)}enableAttributes(I,ie){for(let we=0;we<this.attributes.length;we++){let Se=ie.attributes[this.attributes[we].name];Se!==void 0&&I.enableVertexAttribArray(Se)}}setVertexAttribPointers(I,ie,we){for(let Se=0;Se<this.attributes.length;Se++){let Be=this.attributes[Se],dt=ie.attributes[Be.name];dt!==void 0&&I.vertexAttribPointer(dt,Be.components,I[Gi[Be.type]],!1,this.itemSize,Be.offset+this.itemSize*(we||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Us=new WeakMap;function _s(Ue){var I;if(Us.has(Ue))return Us.get(Ue);{let ie=(I=Ue.getParameter(Ue.VERSION))===null||I===void 0?void 0:I.startsWith("WebGL 2.0");return Us.set(Ue,ie),ie}}class Gn{constructor(I){this.gl=I.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(I){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class zs extends Gn{getDefault(){return t.aM.transparent}set(I){let ie=this.current;(I.r!==ie.r||I.g!==ie.g||I.b!==ie.b||I.a!==ie.a||this.dirty)&&(this.gl.clearColor(I.r,I.g,I.b,I.a),this.current=I,this.dirty=!1)}}class vs extends Gn{getDefault(){return 1}set(I){(I!==this.current||this.dirty)&&(this.gl.clearDepth(I),this.current=I,this.dirty=!1)}}class Ws extends Gn{getDefault(){return 0}set(I){(I!==this.current||this.dirty)&&(this.gl.clearStencil(I),this.current=I,this.dirty=!1)}}class il extends Gn{getDefault(){return[!0,!0,!0,!0]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||I[2]!==ie[2]||I[3]!==ie[3]||this.dirty)&&(this.gl.colorMask(I[0],I[1],I[2],I[3]),this.current=I,this.dirty=!1)}}class xn extends Gn{getDefault(){return!0}set(I){(I!==this.current||this.dirty)&&(this.gl.depthMask(I),this.current=I,this.dirty=!1)}}class ko extends Gn{getDefault(){return 255}set(I){(I!==this.current||this.dirty)&&(this.gl.stencilMask(I),this.current=I,this.dirty=!1)}}class bo extends Gn{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(I){let ie=this.current;(I.func!==ie.func||I.ref!==ie.ref||I.mask!==ie.mask||this.dirty)&&(this.gl.stencilFunc(I.func,I.ref,I.mask),this.current=I,this.dirty=!1)}}class Is extends Gn{getDefault(){let I=this.gl;return[I.KEEP,I.KEEP,I.KEEP]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||I[2]!==ie[2]||this.dirty)&&(this.gl.stencilOp(I[0],I[1],I[2]),this.current=I,this.dirty=!1)}}class pu extends Gn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;I?ie.enable(ie.STENCIL_TEST):ie.disable(ie.STENCIL_TEST),this.current=I,this.dirty=!1}}class co extends Gn{getDefault(){return[0,1]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||this.dirty)&&(this.gl.depthRange(I[0],I[1]),this.current=I,this.dirty=!1)}}class Vs extends Gn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;I?ie.enable(ie.DEPTH_TEST):ie.disable(ie.DEPTH_TEST),this.current=I,this.dirty=!1}}class vl extends Gn{getDefault(){return this.gl.LESS}set(I){(I!==this.current||this.dirty)&&(this.gl.depthFunc(I),this.current=I,this.dirty=!1)}}class Ts extends Gn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;I?ie.enable(ie.BLEND):ie.disable(ie.BLEND),this.current=I,this.dirty=!1}}class js extends Gn{getDefault(){let I=this.gl;return[I.ONE,I.ZERO]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||this.dirty)&&(this.gl.blendFunc(I[0],I[1]),this.current=I,this.dirty=!1)}}class us extends Gn{getDefault(){return t.aM.transparent}set(I){let ie=this.current;(I.r!==ie.r||I.g!==ie.g||I.b!==ie.b||I.a!==ie.a||this.dirty)&&(this.gl.blendColor(I.r,I.g,I.b,I.a),this.current=I,this.dirty=!1)}}class As extends Gn{getDefault(){return this.gl.FUNC_ADD}set(I){(I!==this.current||this.dirty)&&(this.gl.blendEquation(I),this.current=I,this.dirty=!1)}}class Nl extends Gn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;I?ie.enable(ie.CULL_FACE):ie.disable(ie.CULL_FACE),this.current=I,this.dirty=!1}}class su extends Gn{getDefault(){return this.gl.BACK}set(I){(I!==this.current||this.dirty)&&(this.gl.cullFace(I),this.current=I,this.dirty=!1)}}class Tc extends Gn{getDefault(){return this.gl.CCW}set(I){(I!==this.current||this.dirty)&&(this.gl.frontFace(I),this.current=I,this.dirty=!1)}}class du extends Gn{getDefault(){return null}set(I){(I!==this.current||this.dirty)&&(this.gl.useProgram(I),this.current=I,this.dirty=!1)}}class Sf extends Gn{getDefault(){return this.gl.TEXTURE0}set(I){(I!==this.current||this.dirty)&&(this.gl.activeTexture(I),this.current=I,this.dirty=!1)}}class Uc extends Gn{getDefault(){let I=this.gl;return[0,0,I.drawingBufferWidth,I.drawingBufferHeight]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||I[2]!==ie[2]||I[3]!==ie[3]||this.dirty)&&(this.gl.viewport(I[0],I[1],I[2],I[3]),this.current=I,this.dirty=!1)}}class Fs extends Gn{getDefault(){return null}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.bindFramebuffer(ie.FRAMEBUFFER,I),this.current=I,this.dirty=!1}}class dc extends Gn{getDefault(){return null}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.bindRenderbuffer(ie.RENDERBUFFER,I),this.current=I,this.dirty=!1}}class Hc extends Gn{getDefault(){return null}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.bindTexture(ie.TEXTURE_2D,I),this.current=I,this.dirty=!1}}class lu extends Gn{getDefault(){return null}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.bindBuffer(ie.ARRAY_BUFFER,I),this.current=I,this.dirty=!1}}class Pl extends Gn{getDefault(){return null}set(I){let ie=this.gl;ie.bindBuffer(ie.ELEMENT_ARRAY_BUFFER,I),this.current=I,this.dirty=!1}}class ic extends Gn{getDefault(){return null}set(I){var ie;if(I===this.current&&!this.dirty)return;let we=this.gl;_s(we)?we.bindVertexArray(I):(ie=we.getExtension("OES_vertex_array_object"))===null||ie===void 0||ie.bindVertexArrayOES(I),this.current=I,this.dirty=!1}}class Ou extends Gn{getDefault(){return 4}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.pixelStorei(ie.UNPACK_ALIGNMENT,I),this.current=I,this.dirty=!1}}class nl extends Gn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.pixelStorei(ie.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I),this.current=I,this.dirty=!1}}class ml extends Gn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.pixelStorei(ie.UNPACK_FLIP_Y_WEBGL,I),this.current=I,this.dirty=!1}}class xs extends Gn{constructor(I,ie){super(I),this.context=I,this.parent=ie}getDefault(){return null}}class Xs extends xs{setDirty(){this.dirty=!0}set(I){if(I===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let ie=this.gl;ie.framebufferTexture2D(ie.FRAMEBUFFER,ie.COLOR_ATTACHMENT0,ie.TEXTURE_2D,I,0),this.current=I,this.dirty=!1}}class nc extends xs{set(I){if(I===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let ie=this.gl;ie.framebufferRenderbuffer(ie.FRAMEBUFFER,ie.DEPTH_ATTACHMENT,ie.RENDERBUFFER,I),this.current=I,this.dirty=!1}}class Ul extends xs{set(I){if(I===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let ie=this.gl;ie.framebufferRenderbuffer(ie.FRAMEBUFFER,ie.DEPTH_STENCIL_ATTACHMENT,ie.RENDERBUFFER,I),this.current=I,this.dirty=!1}}class qu{constructor(I,ie,we,Se,Be){this.context=I,this.width=ie,this.height=we;let dt=I.gl,St=this.framebuffer=dt.createFramebuffer();if(this.colorAttachment=new Xs(I,St),Se)this.depthAttachment=Be?new Ul(I,St):new nc(I,St);else if(Be)throw new Error("Stencil cannot be set without depth");if(dt.checkFramebufferStatus(dt.FRAMEBUFFER)!==dt.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){let I=this.context.gl,ie=this.colorAttachment.get();if(ie&&I.deleteTexture(ie),this.depthAttachment){let we=this.depthAttachment.get();we&&I.deleteRenderbuffer(we)}I.deleteFramebuffer(this.framebuffer)}}class fl{constructor(I,ie,we){this.blendFunction=I,this.blendColor=ie,this.mask=we}}fl.Replace=[1,0],fl.disabled=new fl(fl.Replace,t.aM.transparent,[!1,!1,!1,!1]),fl.unblended=new fl(fl.Replace,t.aM.transparent,[!0,!0,!0,!0]),fl.alphaBlended=new fl([1,771],t.aM.transparent,[!0,!0,!0,!0]);class xh{constructor(I){var ie,we;if(this.gl=I,this.clearColor=new zs(this),this.clearDepth=new vs(this),this.clearStencil=new Ws(this),this.colorMask=new il(this),this.depthMask=new xn(this),this.stencilMask=new ko(this),this.stencilFunc=new bo(this),this.stencilOp=new Is(this),this.stencilTest=new pu(this),this.depthRange=new co(this),this.depthTest=new Vs(this),this.depthFunc=new vl(this),this.blend=new Ts(this),this.blendFunc=new js(this),this.blendColor=new us(this),this.blendEquation=new As(this),this.cullFace=new Nl(this),this.cullFaceSide=new su(this),this.frontFace=new Tc(this),this.program=new du(this),this.activeTexture=new Sf(this),this.viewport=new Uc(this),this.bindFramebuffer=new Fs(this),this.bindRenderbuffer=new dc(this),this.bindTexture=new Hc(this),this.bindVertexBuffer=new lu(this),this.bindElementBuffer=new Pl(this),this.bindVertexArray=new ic(this),this.pixelStoreUnpack=new Ou(this),this.pixelStoreUnpackPremultiplyAlpha=new nl(this),this.pixelStoreUnpackFlipY=new ml(this),this.extTextureFilterAnisotropic=I.getExtension("EXT_texture_filter_anisotropic")||I.getExtension("MOZ_EXT_texture_filter_anisotropic")||I.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=I.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=I.getParameter(I.MAX_TEXTURE_SIZE),_s(I)){this.HALF_FLOAT=I.HALF_FLOAT;let Se=I.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(ie=I.RGBA16F)!==null&&ie!==void 0?ie:Se?.RGBA16F_EXT,this.RGB16F=(we=I.RGB16F)!==null&&we!==void 0?we:Se?.RGB16F_EXT,I.getExtension("EXT_color_buffer_float")}else{I.getExtension("EXT_color_buffer_half_float"),I.getExtension("OES_texture_half_float_linear");let Se=I.getExtension("OES_texture_half_float");this.HALF_FLOAT=Se?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(I,ie){return new Xo(this,I,ie)}createVertexBuffer(I,ie,we){return new Ln(this,I,ie,we)}createRenderbuffer(I,ie,we){let Se=this.gl,Be=Se.createRenderbuffer();return this.bindRenderbuffer.set(Be),Se.renderbufferStorage(Se.RENDERBUFFER,I,ie,we),this.bindRenderbuffer.set(null),Be}createFramebuffer(I,ie,we,Se){return new qu(this,I,ie,we,Se)}clear({color:I,depth:ie,stencil:we}){let Se=this.gl,Be=0;I&&(Be|=Se.COLOR_BUFFER_BIT,this.clearColor.set(I),this.colorMask.set([!0,!0,!0,!0])),ie!==void 0&&(Be|=Se.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(ie),this.depthMask.set(!0)),we!==void 0&&(Be|=Se.STENCIL_BUFFER_BIT,this.clearStencil.set(we),this.stencilMask.set(255)),Se.clear(Be)}setCullFace(I){I.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(I.mode),this.frontFace.set(I.frontFace))}setDepthMode(I){I.func!==this.gl.ALWAYS||I.mask?(this.depthTest.set(!0),this.depthFunc.set(I.func),this.depthMask.set(I.mask),this.depthRange.set(I.range)):this.depthTest.set(!1)}setStencilMode(I){I.test.func!==this.gl.ALWAYS||I.mask?(this.stencilTest.set(!0),this.stencilMask.set(I.mask),this.stencilOp.set([I.fail,I.depthFail,I.pass]),this.stencilFunc.set({func:I.test.func,ref:I.ref,mask:I.test.mask})):this.stencilTest.set(!1)}setColorMode(I){t.aE(I.blendFunction,fl.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(I.blendFunction),this.blendColor.set(I.blendColor)),this.colorMask.set(I.mask)}createVertexArray(){var I;return _s(this.gl)?this.gl.createVertexArray():(I=this.gl.getExtension("OES_vertex_array_object"))===null||I===void 0?void 0:I.createVertexArrayOES()}deleteVertexArray(I){var ie;return _s(this.gl)?this.gl.deleteVertexArray(I):(ie=this.gl.getExtension("OES_vertex_array_object"))===null||ie===void 0?void 0:ie.deleteVertexArrayOES(I)}unbindVAO(){this.bindVertexArray.set(null)}}class ns{constructor(I,ie,we){this.func=I,this.mask=ie,this.range=we}}ns.ReadOnly=!1,ns.ReadWrite=!0,ns.disabled=new ns(519,ns.ReadOnly,[0,1]);let bh=7680;class Es{constructor(I,ie,we,Se,Be,dt){this.test=I,this.ref=ie,this.mask=we,this.fail=Se,this.depthFail=Be,this.pass=dt}}Es.disabled=new Es({func:519,mask:0},0,0,bh,bh,bh);class to{constructor(I,ie,we){this.enable=I,this.mode=ie,this.frontFace=we}}let Wc;function Vu(Ue,I,ie,we,Se){let Be=Ue.context,dt=Be.gl,St=Ue.useProgram("collisionBox"),Nt=[],$t=0,Tr=0;for(let vt=0;vt<we.length;vt++){let Lt=we[vt],At=I.getTile(Lt).getBucket(ie);if(!At)continue;let zt=Se?At.textCollisionBox:At.iconCollisionBox,cr=At.collisionCircleArray;if(cr.length>0){let yr=t.H();t.aQ(yr,At.placementInvProjMatrix,Ue.transform.glCoordMatrix),t.aQ(yr,yr,At.placementViewportMatrix),Nt.push({circleArray:cr,circleOffset:Tr,transform:Lt.posMatrix,invTransform:yr,coord:Lt}),$t+=cr.length/4,Tr=$t}zt&&St.draw(Be,dt.LINES,ns.disabled,Es.disabled,Ue.colorModeForRenderPass(),to.disabled,{u_matrix:Lt.posMatrix,u_pixel_extrude_scale:[1/(Ar=Ue.transform).width,1/Ar.height]},Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Lt),ie.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,null,Ue.transform.zoom,null,null,zt.collisionVertexBuffer)}var Ar;if(!Se||!Nt.length)return;let Kr=Ue.useProgram("collisionCircle"),na=new t.aR;na.resize(4*$t),na._trim();let He=0;for(let vt of Nt)for(let Lt=0;Lt<vt.circleArray.length/4;Lt++){let At=4*Lt,zt=vt.circleArray[At+0],cr=vt.circleArray[At+1],yr=vt.circleArray[At+2],Er=vt.circleArray[At+3];na.emplace(He++,zt,cr,yr,Er,0),na.emplace(He++,zt,cr,yr,Er,1),na.emplace(He++,zt,cr,yr,Er,2),na.emplace(He++,zt,cr,yr,Er,3)}(!Wc||Wc.length<2*$t)&&(Wc=function(vt){let Lt=2*vt,At=new t.aT;At.resize(Lt),At._trim();for(let zt=0;zt<Lt;zt++){let cr=6*zt;At.uint16[cr+0]=4*zt+0,At.uint16[cr+1]=4*zt+1,At.uint16[cr+2]=4*zt+2,At.uint16[cr+3]=4*zt+2,At.uint16[cr+4]=4*zt+3,At.uint16[cr+5]=4*zt+0}return At}($t));let Je=Be.createIndexBuffer(Wc,!0),lt=Be.createVertexBuffer(na,t.aS.members,!0);for(let vt of Nt){let Lt=Rn(vt.transform,vt.invTransform,Ue.transform);Kr.draw(Be,dt.TRIANGLES,ns.disabled,Es.disabled,Ue.colorModeForRenderPass(),to.disabled,Lt,Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(vt.coord),ie.id,lt,Je,t.a0.simpleSegment(0,2*vt.circleOffset,vt.circleArray.length,vt.circleArray.length/2),null,Ue.transform.zoom,null,null,null)}lt.destroy(),Je.destroy()}to.disabled=new to(!1,1029,2305),to.backCCW=new to(!0,1029,2305);let jl=t.an(new Float32Array(16));function Mf(Ue,I,ie,we,Se,Be){let{horizontalAlign:dt,verticalAlign:St}=t.au(Ue);return new t.P((-(dt-.5)*I/Se+we[0])*Be,(-(St-.5)*ie/Se+we[1])*Be)}function Ac(Ue,I,ie,we,Se,Be){let dt=I.tileAnchorPoint.add(new t.P(I.translation[0],I.translation[1]));if(I.pitchWithMap){let St=we.mult(Be);ie||(St=St.rotate(-Se));let Nt=dt.add(St);return wt(Nt.x,Nt.y,I.labelPlaneMatrix,I.getElevation).point}if(ie){let St=ft(I.tileAnchorPoint.x+1,I.tileAnchorPoint.y,I).point.sub(Ue),Nt=Math.atan(St.y/St.x)+(St.x<0?Math.PI:0);return Ue.add(we.rotate(Nt))}return Ue.add(we)}function nf(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na){let He=Ue.text.placedSymbolArray,Je=Ue.text.dynamicLayoutVertexArray,lt=Ue.icon.dynamicLayoutVertexArray,vt={};Je.clear();for(let Lt=0;Lt<He.length;Lt++){let At=He.get(Lt),zt=At.hidden||!At.crossTileID||Ue.allowVerticalPlacement&&!At.placedOrientation?null:we[At.crossTileID];if(zt){let cr=new t.P(At.anchorX,At.anchorY),yr={getElevation:na,width:Se.width,height:Se.height,labelPlaneMatrix:Be,lineVertexArray:null,pitchWithMap:ie,projection:Tr,projectionCache:null,tileAnchorPoint:cr,translation:Ar,unwrappedTileID:Kr},Er=ie?wt(cr.x,cr.y,dt,na):ft(cr.x,cr.y,yr),jr=Ne(Se.cameraToCenterDistance,Er.signedDistanceFromCamera),Qr=t.ai(Ue.textSizeData,Nt,At)*jr/t.ap;ie&&(Qr*=Ue.tilePixelRatio/St);let{width:pa,height:Aa,anchor:za,textOffset:ci,textBoxScale:Vi}=zt,ji=Mf(za,pa,Aa,ci,Vi,Qr),nn=Tr.getPitchedTextCorrection(Se,cr.add(new t.P(Ar[0],Ar[1])),Kr),Sn=Ac(Er.point,yr,I,ji,Se.angle,nn),Kn=Ue.allowVerticalPlacement&&At.placedOrientation===t.ah.vertical?Math.PI/2:0;for(let Bn=0;Bn<At.numGlyphs;Bn++)t.aj(Je,Sn,Kn);$t&&At.associatedIconIndex>=0&&(vt[At.associatedIconIndex]={shiftedAnchor:Sn,angle:Kn})}else rr(At.numGlyphs,Je)}if($t){lt.clear();let Lt=Ue.icon.placedSymbolArray;for(let At=0;At<Lt.length;At++){let zt=Lt.get(At);if(zt.hidden)rr(zt.numGlyphs,lt);else{let cr=vt[At];if(cr)for(let yr=0;yr<zt.numGlyphs;yr++)t.aj(lt,cr.shiftedAnchor,cr.angle);else rr(zt.numGlyphs,lt)}}Ue.icon.dynamicLayoutVertexBuffer.updateData(lt)}Ue.text.dynamicLayoutVertexBuffer.updateData(Je)}function $l(Ue,I,ie){return ie.iconsInText&&I?"symbolTextAndIcon":Ue?"symbolSDF":"symbolIcon"}function Jf(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar){let Kr=Ue.context,na=Kr.gl,He=Ue.transform,Je=pi(),lt=St==="map",vt=Nt==="map",Lt=St!=="viewport"&&ie.layout.get("symbol-placement")!=="point",At=lt&&!vt&&!Lt,zt=!vt&&Lt,cr=!ie.layout.get("symbol-sort-key").isConstant(),yr=!1,Er=Ue.depthModeForSublayer(0,ns.ReadOnly),jr=ie._unevaluatedLayout.hasValue("text-variable-anchor")||ie._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Qr=[],pa=Je.getCircleRadiusCorrection(He);for(let Aa of we){let za=I.getTile(Aa),ci=za.getBucket(ie);if(!ci)continue;let Vi=Se?ci.text:ci.icon;if(!Vi||!Vi.segments.get().length||!Vi.hasVisibleVertices)continue;let ji=Vi.programConfigurations.get(ie.id),nn=Se||ci.sdfIcons,Sn=Se?ci.textSizeData:ci.iconSizeData,Kn=vt||He.pitch!==0,Bn=Ue.useProgram($l(nn,Se,ci),ji),wo=t.ag(Sn,He.zoom),is=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Aa),Ao,Zo,ps,ul,tl=[0,0],Jo=null;if(Se)Zo=za.glyphAtlasTexture,ps=na.LINEAR,Ao=za.glyphAtlasTexture.size,ci.iconsInText&&(tl=za.imageAtlasTexture.size,Jo=za.imageAtlasTexture,ul=Kn||Ue.options.rotating||Ue.options.zooming||Sn.kind==="composite"||Sn.kind==="camera"?na.LINEAR:na.NEAREST);else{let Mt=ie.layout.get("icon-size").constantOr(0)!==1||ci.iconsNeedLinear;Zo=za.imageAtlasTexture,ps=nn||Ue.options.rotating||Ue.options.zooming||Mt||Kn?na.LINEAR:na.NEAREST,Ao=za.imageAtlasTexture.size}let $o=Da(za,1,Ue.transform.zoom),Il=zt?Aa.posMatrix:jl,eu=Sr(Il,vt,lt,Ue.transform,$o),Ru=Rr(Il,vt,lt,Ue.transform,$o),vu=Rr(Aa.posMatrix,vt,lt,Ue.transform,$o),Tl=Je.translatePosition(Ue.transform,za,Be,dt),cu=jr&&ci.hasTextData(),uc=ie.layout.get("icon-text-fit")!=="none"&&cu&&ci.hasIconData();if(Lt){let Mt=Ue.style.map.terrain?(Ot,_r)=>Ue.style.map.terrain.getElevation(Aa,Ot,_r):null,ar=ie.layout.get("text-rotation-alignment")==="map";Te(ci,Aa.posMatrix,Ue,Se,eu,vu,vt,$t,ar,Je,Aa.toUnwrapped(),He.width,He.height,Tl,Mt)}let Vl=Aa.posMatrix,Gl=Se&&jr||uc,de=Lt||Gl?jl:eu,Fe=Ru,et=nn&&ie.paint.get(Se?"text-halo-width":"icon-halo-width").constantOr(1)!==0,mt;mt=nn?ci.iconsInText?Xn(Sn.kind,wo,At,vt,Lt,Gl,Ue,Vl,de,Fe,Tl,Ao,tl,pa):jn(Sn.kind,wo,At,vt,Lt,Gl,Ue,Vl,de,Fe,Tl,Se,Ao,!0,pa):uo(Sn.kind,wo,At,vt,Lt,Gl,Ue,Vl,de,Fe,Tl,Se,Ao,pa);let bt={program:Bn,buffers:Vi,uniformValues:mt,atlasTexture:Zo,atlasTextureIcon:Jo,atlasInterpolation:ps,atlasInterpolationIcon:ul,isSDF:nn,hasHalo:et};if(cr&&ci.canOverlap){yr=!0;let Mt=Vi.segments.get();for(let ar of Mt)Qr.push({segments:new t.a0([ar]),sortKey:ar.sortKey,state:bt,terrainData:is})}else Qr.push({segments:Vi.segments,sortKey:0,state:bt,terrainData:is})}yr&&Qr.sort((Aa,za)=>Aa.sortKey-za.sortKey);for(let Aa of Qr){let za=Aa.state;if(Kr.activeTexture.set(na.TEXTURE0),za.atlasTexture.bind(za.atlasInterpolation,na.CLAMP_TO_EDGE),za.atlasTextureIcon&&(Kr.activeTexture.set(na.TEXTURE1),za.atlasTextureIcon&&za.atlasTextureIcon.bind(za.atlasInterpolationIcon,na.CLAMP_TO_EDGE)),za.isSDF){let ci=za.uniformValues;za.hasHalo&&(ci.u_is_halo=1,Of(za.buffers,Aa.segments,ie,Ue,za.program,Er,Tr,Ar,ci,Aa.terrainData)),ci.u_is_halo=0}Of(za.buffers,Aa.segments,ie,Ue,za.program,Er,Tr,Ar,za.uniformValues,Aa.terrainData)}}function Of(Ue,I,ie,we,Se,Be,dt,St,Nt,$t){let Tr=we.context;Se.draw(Tr,Tr.gl.TRIANGLES,Be,dt,St,to.disabled,Nt,$t,ie.id,Ue.layoutVertexBuffer,Ue.indexBuffer,I,ie.paint,we.transform.zoom,Ue.programConfigurations.get(ie.id),Ue.dynamicLayoutVertexBuffer,Ue.opacityVertexBuffer)}function of(Ue,I,ie,we){let Se=Ue.context,Be=Se.gl,dt=Es.disabled,St=new fl([Be.ONE,Be.ONE],t.aM.transparent,[!0,!0,!0,!0]),Nt=I.getBucket(ie);if(!Nt)return;let $t=we.key,Tr=ie.heatmapFbos.get($t);Tr||(Tr=Bf(Se,I.tileSize,I.tileSize),ie.heatmapFbos.set($t,Tr)),Se.bindFramebuffer.set(Tr.framebuffer),Se.viewport.set([0,0,I.tileSize,I.tileSize]),Se.clear({color:t.aM.transparent});let Ar=Nt.programConfigurations.get(ie.id),Kr=Ue.useProgram("heatmap",Ar),na=Ue.style.map.terrain.getTerrainData(we);Kr.draw(Se,Be.TRIANGLES,ns.disabled,dt,St,to.disabled,no(we.posMatrix,I,Ue.transform.zoom,ie.paint.get("heatmap-intensity")),na,ie.id,Nt.layoutVertexBuffer,Nt.indexBuffer,Nt.segments,ie.paint,Ue.transform.zoom,Ar)}function jc(Ue,I,ie){let we=Ue.context,Se=we.gl;we.setColorMode(Ue.colorModeForRenderPass());let Be=Nf(we,I),dt=ie.key,St=I.heatmapFbos.get(dt);St&&(we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,St.colorAttachment.get()),we.activeTexture.set(Se.TEXTURE1),Be.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),Ue.useProgram("heatmapTexture").draw(we,Se.TRIANGLES,ns.disabled,Es.disabled,Ue.colorModeForRenderPass(),to.disabled,cn(Ue,I,0,1),null,I.id,Ue.rasterBoundsBuffer,Ue.quadTriangleIndexBuffer,Ue.rasterBoundsSegments,I.paint,Ue.transform.zoom),St.destroy(),I.heatmapFbos.delete(dt))}function Bf(Ue,I,ie){var we,Se;let Be=Ue.gl,dt=Be.createTexture();Be.bindTexture(Be.TEXTURE_2D,dt),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_WRAP_S,Be.CLAMP_TO_EDGE),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_WRAP_T,Be.CLAMP_TO_EDGE),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MIN_FILTER,Be.LINEAR),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MAG_FILTER,Be.LINEAR);let St=(we=Ue.HALF_FLOAT)!==null&&we!==void 0?we:Be.UNSIGNED_BYTE,Nt=(Se=Ue.RGBA16F)!==null&&Se!==void 0?Se:Be.RGBA;Be.texImage2D(Be.TEXTURE_2D,0,Nt,I,ie,0,Be.RGBA,St,null);let $t=Ue.createFramebuffer(I,ie,!1,!1);return $t.colorAttachment.set(dt),$t}function Nf(Ue,I){return I.colorRampTexture||(I.colorRampTexture=new u(Ue,I.colorRamp,Ue.gl.RGBA)),I.colorRampTexture}function Gu(Ue,I,ie,we,Se){if(!ie||!we||!we.imageAtlas)return;let Be=we.imageAtlas.patternPositions,dt=Be[ie.to.toString()],St=Be[ie.from.toString()];if(!dt&&St&&(dt=St),!St&&dt&&(St=dt),!dt||!St){let Nt=Se.getPaintProperty(I);dt=Be[Nt],St=Be[Nt]}dt&&St&&Ue.setConstantPatternPositions(dt,St)}function Ef(Ue,I,ie,we,Se,Be,dt){let St=Ue.context.gl,Nt="fill-pattern",$t=ie.paint.get(Nt),Tr=$t&&$t.constantOr(1),Ar=ie.getCrossfadeParameters(),Kr,na,He,Je,lt;dt?(na=Tr&&!ie.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Kr=St.LINES):(na=Tr?"fillPattern":"fill",Kr=St.TRIANGLES);let vt=$t.constantOr(null);for(let Lt of we){let At=I.getTile(Lt);if(Tr&&!At.patternsLoaded())continue;let zt=At.getBucket(ie);if(!zt)continue;let cr=zt.programConfigurations.get(ie.id),yr=Ue.useProgram(na,cr),Er=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Lt);Tr&&(Ue.context.activeTexture.set(St.TEXTURE0),At.imageAtlasTexture.bind(St.LINEAR,St.CLAMP_TO_EDGE),cr.updatePaintBuffers(Ar)),Gu(cr,Nt,vt,At,ie);let jr=Er?Lt:null,Qr=Ue.translatePosMatrix(jr?jr.posMatrix:Lt.posMatrix,At,ie.paint.get("fill-translate"),ie.paint.get("fill-translate-anchor"));if(dt){Je=zt.indexBuffer2,lt=zt.segments2;let pa=[St.drawingBufferWidth,St.drawingBufferHeight];He=na==="fillOutlinePattern"&&Tr?Ki(Qr,Ue,Ar,At,pa):ki(Qr,pa)}else Je=zt.indexBuffer,lt=zt.segments,He=Tr?Ai(Qr,Ue,Ar,At):Ta(Qr);yr.draw(Ue.context,Kr,Se,Ue.stencilModeForClipping(Lt),Be,to.disabled,He,Er,ie.id,zt.layoutVertexBuffer,Je,lt,ie.paint,Ue.transform.zoom,cr)}}function oc(Ue,I,ie,we,Se,Be,dt){let St=Ue.context,Nt=St.gl,$t="fill-extrusion-pattern",Tr=ie.paint.get($t),Ar=Tr.constantOr(1),Kr=ie.getCrossfadeParameters(),na=ie.paint.get("fill-extrusion-opacity"),He=Tr.constantOr(null);for(let Je of we){let lt=I.getTile(Je),vt=lt.getBucket(ie);if(!vt)continue;let Lt=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Je),At=vt.programConfigurations.get(ie.id),zt=Ue.useProgram(Ar?"fillExtrusionPattern":"fillExtrusion",At);Ar&&(Ue.context.activeTexture.set(Nt.TEXTURE0),lt.imageAtlasTexture.bind(Nt.LINEAR,Nt.CLAMP_TO_EDGE),At.updatePaintBuffers(Kr)),Gu(At,$t,He,lt,ie);let cr=Ue.translatePosMatrix(Je.posMatrix,lt,ie.paint.get("fill-extrusion-translate"),ie.paint.get("fill-extrusion-translate-anchor")),yr=ie.paint.get("fill-extrusion-vertical-gradient"),Er=Ar?la(cr,Ue,yr,na,Je,Kr,lt):ya(cr,Ue,yr,na);zt.draw(St,St.gl.TRIANGLES,Se,Be,dt,to.backCCW,Er,Lt,ie.id,vt.layoutVertexBuffer,vt.indexBuffer,vt.segments,ie.paint,Ue.transform.zoom,At,Ue.style.map.terrain&&vt.centroidVertexBuffer)}}function Xc(Ue,I,ie,we,Se,Be,dt){let St=Ue.context,Nt=St.gl,$t=ie.fbo;if(!$t)return;let Tr=Ue.useProgram("hillshade"),Ar=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(I);St.activeTexture.set(Nt.TEXTURE0),Nt.bindTexture(Nt.TEXTURE_2D,$t.colorAttachment.get()),Tr.draw(St,Nt.TRIANGLES,Se,Be,dt,to.disabled,((Kr,na,He,Je)=>{let lt=He.paint.get("hillshade-shadow-color"),vt=He.paint.get("hillshade-highlight-color"),Lt=He.paint.get("hillshade-accent-color"),At=He.paint.get("hillshade-illumination-direction")*(Math.PI/180);He.paint.get("hillshade-illumination-anchor")==="viewport"&&(At-=Kr.transform.angle);let zt=!Kr.options.moving;return{u_matrix:Je?Je.posMatrix:Kr.transform.calculatePosMatrix(na.tileID.toUnwrapped(),zt),u_image:0,u_latrange:lo(0,na.tileID),u_light:[He.paint.get("hillshade-exaggeration"),At],u_shadow:lt,u_highlight:vt,u_accent:Lt}})(Ue,ie,we,Ar?I:null),Ar,we.id,Ue.rasterBoundsBuffer,Ue.quadTriangleIndexBuffer,Ue.rasterBoundsSegments)}function Ql(Ue,I,ie,we,Se,Be){let dt=Ue.context,St=dt.gl,Nt=I.dem;if(Nt&&Nt.data){let $t=Nt.dim,Tr=Nt.stride,Ar=Nt.getPixels();if(dt.activeTexture.set(St.TEXTURE1),dt.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||Ue.getTileTexture(Tr),I.demTexture){let na=I.demTexture;na.update(Ar,{premultiply:!1}),na.bind(St.NEAREST,St.CLAMP_TO_EDGE)}else I.demTexture=new u(dt,Ar,St.RGBA,{premultiply:!1}),I.demTexture.bind(St.NEAREST,St.CLAMP_TO_EDGE);dt.activeTexture.set(St.TEXTURE0);let Kr=I.fbo;if(!Kr){let na=new u(dt,{width:$t,height:$t,data:null},St.RGBA);na.bind(St.LINEAR,St.CLAMP_TO_EDGE),Kr=I.fbo=dt.createFramebuffer($t,$t,!0,!1),Kr.colorAttachment.set(na.texture)}dt.bindFramebuffer.set(Kr.framebuffer),dt.viewport.set([0,0,$t,$t]),Ue.useProgram("hillshadePrepare").draw(dt,St.TRIANGLES,we,Se,Be,to.disabled,((na,He)=>{let Je=He.stride,lt=t.H();return t.aP(lt,0,t.X,-t.X,0,0,1),t.J(lt,lt,[0,-t.X,0]),{u_matrix:lt,u_image:1,u_dimension:[Je,Je],u_zoom:na.overscaledZ,u_unpack:He.getUnpackVector()}})(I.tileID,Nt),null,ie.id,Ue.rasterBoundsBuffer,Ue.quadTriangleIndexBuffer,Ue.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function qc(Ue,I,ie,we,Se,Be){let dt=we.paint.get("raster-fade-duration");if(!Be&&dt>0){let St=n.now(),Nt=(St-Ue.timeAdded)/dt,$t=I?(St-I.timeAdded)/dt:-1,Tr=ie.getSource(),Ar=Se.coveringZoomLevel({tileSize:Tr.tileSize,roundZoom:Tr.roundZoom}),Kr=!I||Math.abs(I.tileID.overscaledZ-Ar)>Math.abs(Ue.tileID.overscaledZ-Ar),na=Kr&&Ue.refreshedUponExpiration?1:t.ac(Kr?Nt:1-$t,0,1);return Ue.refreshedUponExpiration&&Nt>=1&&(Ue.refreshedUponExpiration=!1),I?{opacity:1,mix:1-na}:{opacity:na,mix:0}}return{opacity:1,mix:0}}let Sc=new t.aM(1,0,0,1),Zs=new t.aM(0,1,0,1),kf=new t.aM(0,0,1,1),fh=new t.aM(1,0,1,1),Uf=new t.aM(0,1,1,1);function Zc(Ue,I,ie,we){Cu(Ue,0,I+ie/2,Ue.transform.width,ie,we)}function $f(Ue,I,ie,we){Cu(Ue,I-ie/2,0,ie,Ue.transform.height,we)}function Cu(Ue,I,ie,we,Se,Be){let dt=Ue.context,St=dt.gl;St.enable(St.SCISSOR_TEST),St.scissor(I*Ue.pixelRatio,ie*Ue.pixelRatio,we*Ue.pixelRatio,Se*Ue.pixelRatio),dt.clear({color:Be}),St.disable(St.SCISSOR_TEST)}function jf(Ue,I,ie){let we=Ue.context,Se=we.gl,Be=ie.posMatrix,dt=Ue.useProgram("debug"),St=ns.disabled,Nt=Es.disabled,$t=Ue.colorModeForRenderPass(),Tr="$debug",Ar=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(ie);we.activeTexture.set(Se.TEXTURE0);let Kr=I.getTileByID(ie.key).latestRawTileData,na=Math.floor((Kr&&Kr.byteLength||0)/1024),He=I.getTile(ie).tileSize,Je=512/Math.min(He,512)*(ie.overscaledZ/Ue.transform.zoom)*.5,lt=ie.canonical.toString();ie.overscaledZ!==ie.canonical.z&&(lt+=` => ${ie.overscaledZ}`),function(vt,Lt){vt.initDebugOverlayCanvas();let At=vt.debugOverlayCanvas,zt=vt.context.gl,cr=vt.debugOverlayCanvas.getContext("2d");cr.clearRect(0,0,At.width,At.height),cr.shadowColor="white",cr.shadowBlur=2,cr.lineWidth=1.5,cr.strokeStyle="white",cr.textBaseline="top",cr.font="bold 36px Open Sans, sans-serif",cr.fillText(Lt,5,5),cr.strokeText(Lt,5,5),vt.debugOverlayTexture.update(At),vt.debugOverlayTexture.bind(zt.LINEAR,zt.CLAMP_TO_EDGE)}(Ue,`${lt} ${na}kB`),dt.draw(we,Se.TRIANGLES,St,Nt,fl.alphaBlended,to.disabled,En(Be,t.aM.transparent,Je),null,Tr,Ue.debugBuffer,Ue.quadTriangleIndexBuffer,Ue.debugSegments),dt.draw(we,Se.LINE_STRIP,St,Nt,$t,to.disabled,En(Be,t.aM.red),Ar,Tr,Ue.debugBuffer,Ue.tileBorderIndexBuffer,Ue.debugSegments)}function yl(Ue,I,ie){let we=Ue.context,Se=we.gl,Be=Ue.colorModeForRenderPass(),dt=new ns(Se.LEQUAL,ns.ReadWrite,Ue.depthRangeFor3D),St=Ue.useProgram("terrain"),Nt=I.getTerrainMesh();we.bindFramebuffer.set(null),we.viewport.set([0,0,Ue.width,Ue.height]);for(let $t of ie){let Tr=Ue.renderToTexture.getTexture($t),Ar=I.getTerrainData($t.tileID);we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,Tr.texture);let Kr=Ue.transform.calculatePosMatrix($t.tileID.toUnwrapped()),na=I.getMeshFrameDelta(Ue.transform.zoom),He=Ue.transform.calculateFogMatrix($t.tileID.toUnwrapped()),Je=vr(Kr,na,He,Ue.style.sky,Ue.transform.pitch);St.draw(we,Se.TRIANGLES,dt,Es.disabled,Be,to.backCCW,Je,Ar,"terrain",Nt.vertexBuffer,Nt.indexBuffer,Nt.segments)}}class Lu{constructor(I,ie,we){this.vertexBuffer=I,this.indexBuffer=ie,this.segments=we}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Mc{constructor(I,ie){this.context=new xh(I),this.transform=ie,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=It.maxUnderzooming+It.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Br}resize(I,ie,we){if(this.width=Math.floor(I*we),this.height=Math.floor(ie*we),this.pixelRatio=we,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let Se of this.style._order)this.style._layers[Se].resize()}setup(){let I=this.context,ie=new t.aX;ie.emplaceBack(0,0),ie.emplaceBack(t.X,0),ie.emplaceBack(0,t.X),ie.emplaceBack(t.X,t.X),this.tileExtentBuffer=I.createVertexBuffer(ie,Ur.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let we=new t.aX;we.emplaceBack(0,0),we.emplaceBack(t.X,0),we.emplaceBack(0,t.X),we.emplaceBack(t.X,t.X),this.debugBuffer=I.createVertexBuffer(we,Ur.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let Se=new t.$;Se.emplaceBack(0,0,0,0),Se.emplaceBack(t.X,0,t.X,0),Se.emplaceBack(0,t.X,0,t.X),Se.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=I.createVertexBuffer(Se,Ze.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let Be=new t.aX;Be.emplaceBack(0,0),Be.emplaceBack(1,0),Be.emplaceBack(0,1),Be.emplaceBack(1,1),this.viewportBuffer=I.createVertexBuffer(Be,Ur.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let dt=new t.aZ;dt.emplaceBack(0),dt.emplaceBack(1),dt.emplaceBack(3),dt.emplaceBack(2),dt.emplaceBack(0),this.tileBorderIndexBuffer=I.createIndexBuffer(dt);let St=new t.aY;St.emplaceBack(0,1,2),St.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=I.createIndexBuffer(St);let Nt=this.context.gl;this.stencilClearMode=new Es({func:Nt.ALWAYS,mask:0},0,255,Nt.ZERO,Nt.ZERO,Nt.ZERO)}clearStencil(){let I=this.context,ie=I.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let we=t.H();t.aP(we,0,this.width,this.height,0,0,1),t.K(we,we,[ie.drawingBufferWidth,ie.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(I,ie.TRIANGLES,ns.disabled,this.stencilClearMode,fl.disabled,to.disabled,On(we),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(I,ie){if(this.currentStencilSource===I.source||!I.isTileClipped()||!ie||!ie.length)return;this.currentStencilSource=I.source;let we=this.context,Se=we.gl;this.nextStencilID+ie.length>256&&this.clearStencil(),we.setColorMode(fl.disabled),we.setDepthMode(ns.disabled);let Be=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let dt of ie){let St=this._tileClippingMaskIDs[dt.key]=this.nextStencilID++,Nt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(dt);Be.draw(we,Se.TRIANGLES,ns.disabled,new Es({func:Se.ALWAYS,mask:0},St,255,Se.KEEP,Se.KEEP,Se.REPLACE),fl.disabled,to.disabled,On(dt.posMatrix),Nt,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let I=this.nextStencilID++,ie=this.context.gl;return new Es({func:ie.NOTEQUAL,mask:255},I,255,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilModeForClipping(I){let ie=this.context.gl;return new Es({func:ie.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilConfigForOverlap(I){let ie=this.context.gl,we=I.sort((dt,St)=>St.overscaledZ-dt.overscaledZ),Se=we[we.length-1].overscaledZ,Be=we[0].overscaledZ-Se+1;if(Be>1){this.currentStencilSource=void 0,this.nextStencilID+Be>256&&this.clearStencil();let dt={};for(let St=0;St<Be;St++)dt[St+Se]=new Es({func:ie.GEQUAL,mask:255},St+this.nextStencilID,255,ie.KEEP,ie.KEEP,ie.REPLACE);return this.nextStencilID+=Be,[dt,we]}return[{[Se]:Es.disabled},we]}colorModeForRenderPass(){let I=this.context.gl;return this._showOverdrawInspector?new fl([I.CONSTANT_COLOR,I.ONE],new t.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?fl.unblended:fl.alphaBlended}depthModeForSublayer(I,ie,we){if(!this.opaquePassEnabledForLayer())return ns.disabled;let Se=1-((1+this.currentLayer)*this.numSublayers+I)*this.depthEpsilon;return new ns(we||this.context.gl.LEQUAL,ie,[Se,Se])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(I,ie){this.style=I,this.options=ie,this.lineAtlas=I.lineAtlas,this.imageManager=I.imageManager,this.glyphManager=I.glyphManager,this.symbolFadeChange=I.placement.symbolFadeChange(n.now()),this.imageManager.beginFrame();let we=this.style._order,Se=this.style.sourceCaches,Be={},dt={},St={};for(let Nt in Se){let $t=Se[Nt];$t.used&&$t.prepare(this.context),Be[Nt]=$t.getVisibleCoordinates(),dt[Nt]=Be[Nt].slice().reverse(),St[Nt]=$t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Nt=0;Nt<we.length;Nt++)if(this.style._layers[we[Nt]].is3D()){this.opaquePassCutoff=Nt;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(let Nt of we){let $t=this.style._layers[Nt];if(!$t.hasOffscreenPass()||$t.isHidden(this.transform.zoom))continue;let Tr=dt[$t.source];($t.type==="custom"||Tr.length)&&this.renderLayer(this,Se[$t.source],$t,Tr)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:ie.showOverdrawInspector?t.aM.black:t.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(Nt,$t){let Tr=Nt.context,Ar=Tr.gl,Kr=((vt,Lt,At)=>({u_sky_color:vt.properties.get("sky-color"),u_horizon_color:vt.properties.get("horizon-color"),u_horizon:(Lt.height/2+Lt.getHorizon())*At,u_sky_horizon_blend:vt.properties.get("sky-horizon-blend")*Lt.height/2*At}))($t,Nt.style.map.transform,Nt.pixelRatio),na=new ns(Ar.LEQUAL,ns.ReadWrite,[0,1]),He=Es.disabled,Je=Nt.colorModeForRenderPass(),lt=Nt.useProgram("sky");if(!$t.mesh){let vt=new t.aX;vt.emplaceBack(-1,-1),vt.emplaceBack(1,-1),vt.emplaceBack(1,1),vt.emplaceBack(-1,1);let Lt=new t.aY;Lt.emplaceBack(0,1,2),Lt.emplaceBack(0,2,3),$t.mesh=new Lu(Tr.createVertexBuffer(vt,Ur.members),Tr.createIndexBuffer(Lt),t.a0.simpleSegment(0,0,vt.length,Lt.length))}lt.draw(Tr,Ar.TRIANGLES,na,He,Je,to.disabled,Kr,void 0,"sky",$t.mesh.vertexBuffer,$t.mesh.indexBuffer,$t.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ie.showOverdrawInspector,this.depthRangeFor3D=[0,1-(I._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=we.length-1;this.currentLayer>=0;this.currentLayer--){let Nt=this.style._layers[we[this.currentLayer]],$t=Se[Nt.source],Tr=Be[Nt.source];this._renderTileClippingMasks(Nt,Tr),this.renderLayer(this,$t,Nt,Tr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<we.length;this.currentLayer++){let Nt=this.style._layers[we[this.currentLayer]],$t=Se[Nt.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Nt))continue;let Tr=(Nt.type==="symbol"?St:dt)[Nt.source];this._renderTileClippingMasks(Nt,Be[Nt.source]),this.renderLayer(this,$t,Nt,Tr)}if(this.options.showTileBoundaries){let Nt=function($t,Tr){let Ar=null,Kr=Object.values($t._layers).flatMap(lt=>lt.source&&!lt.isHidden(Tr)?[$t.sourceCaches[lt.source]]:[]),na=Kr.filter(lt=>lt.getSource().type==="vector"),He=Kr.filter(lt=>lt.getSource().type!=="vector"),Je=lt=>{(!Ar||Ar.getSource().maxzoom<lt.getSource().maxzoom)&&(Ar=lt)};return na.forEach(lt=>Je(lt)),Ar||He.forEach(lt=>Je(lt)),Ar}(this.style,this.transform.zoom);Nt&&function($t,Tr,Ar){for(let Kr=0;Kr<Ar.length;Kr++)jf($t,Tr,Ar[Kr])}(this,Nt,Nt.getVisibleCoordinates())}this.options.showPadding&&function(Nt){let $t=Nt.transform.padding;Zc(Nt,Nt.transform.height-($t.top||0),3,Sc),Zc(Nt,$t.bottom||0,3,Zs),$f(Nt,$t.left||0,3,kf),$f(Nt,Nt.transform.width-($t.right||0),3,fh);let Tr=Nt.transform.centerPoint;(function(Ar,Kr,na,He){Cu(Ar,Kr-1,na-10,2,20,He),Cu(Ar,Kr-10,na-1,20,2,He)})(Nt,Tr.x,Nt.transform.height-Tr.y,Uf)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(I){if(!this.style||!this.style.map||!this.style.map.terrain)return;let ie=this.terrainFacilitator.matrix,we=this.transform.modelViewProjectionMatrix,Se=this.terrainFacilitator.dirty;Se||(Se=I?!t.a_(ie,we):!t.a$(ie,we)),Se||(Se=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Se&&(t.b0(ie,we),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Be,dt){let St=Be.context,Nt=St.gl,$t=fl.unblended,Tr=new ns(Nt.LEQUAL,ns.ReadWrite,[0,1]),Ar=dt.getTerrainMesh(),Kr=dt.sourceCache.getRenderableTiles(),na=Be.useProgram("terrainDepth");St.bindFramebuffer.set(dt.getFramebuffer("depth").framebuffer),St.viewport.set([0,0,Be.width/devicePixelRatio,Be.height/devicePixelRatio]),St.clear({color:t.aM.transparent,depth:1});for(let He of Kr){let Je=dt.getTerrainData(He.tileID),lt={u_matrix:Be.transform.calculatePosMatrix(He.tileID.toUnwrapped()),u_ele_delta:dt.getMeshFrameDelta(Be.transform.zoom)};na.draw(St,Nt.TRIANGLES,Tr,Es.disabled,$t,to.backCCW,lt,Je,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments)}St.bindFramebuffer.set(null),St.viewport.set([0,0,Be.width,Be.height])}(this,this.style.map.terrain),function(Be,dt){let St=Be.context,Nt=St.gl,$t=fl.unblended,Tr=new ns(Nt.LEQUAL,ns.ReadWrite,[0,1]),Ar=dt.getTerrainMesh(),Kr=dt.getCoordsTexture(),na=dt.sourceCache.getRenderableTiles(),He=Be.useProgram("terrainCoords");St.bindFramebuffer.set(dt.getFramebuffer("coords").framebuffer),St.viewport.set([0,0,Be.width/devicePixelRatio,Be.height/devicePixelRatio]),St.clear({color:t.aM.transparent,depth:1}),dt.coordsIndex=[];for(let Je of na){let lt=dt.getTerrainData(Je.tileID);St.activeTexture.set(Nt.TEXTURE0),Nt.bindTexture(Nt.TEXTURE_2D,Kr.texture);let vt={u_matrix:Be.transform.calculatePosMatrix(Je.tileID.toUnwrapped()),u_terrain_coords_id:(255-dt.coordsIndex.length)/255,u_texture:0,u_ele_delta:dt.getMeshFrameDelta(Be.transform.zoom)};He.draw(St,Nt.TRIANGLES,Tr,Es.disabled,$t,to.backCCW,vt,lt,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments),dt.coordsIndex.push(Je.tileID.key)}St.bindFramebuffer.set(null),St.viewport.set([0,0,Be.width,Be.height])}(this,this.style.map.terrain))}renderLayer(I,ie,we,Se){if(!we.isHidden(this.transform.zoom)&&(we.type==="background"||we.type==="custom"||(Se||[]).length))switch(this.id=we.id,we.type){case"symbol":(function(Be,dt,St,Nt,$t){if(Be.renderPass!=="translucent")return;let Tr=Es.disabled,Ar=Be.colorModeForRenderPass();(St._unevaluatedLayout.hasValue("text-variable-anchor")||St._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Kr,na,He,Je,lt,vt,Lt,At,zt){let cr=na.transform,yr=pi(),Er=lt==="map",jr=vt==="map";for(let Qr of Kr){let pa=Je.getTile(Qr),Aa=pa.getBucket(He);if(!Aa||!Aa.text||!Aa.text.segments.get().length)continue;let za=t.ag(Aa.textSizeData,cr.zoom),ci=Da(pa,1,na.transform.zoom),Vi=Sr(Qr.posMatrix,jr,Er,na.transform,ci),ji=He.layout.get("icon-text-fit")!=="none"&&Aa.hasIconData();if(za){let nn=Math.pow(2,cr.zoom-pa.tileID.overscaledZ),Sn=na.style.map.terrain?(Bn,wo)=>na.style.map.terrain.getElevation(Qr,Bn,wo):null,Kn=yr.translatePosition(cr,pa,Lt,At);nf(Aa,Er,jr,zt,cr,Vi,Qr.posMatrix,nn,za,ji,yr,Kn,Qr.toUnwrapped(),Sn)}}}(Nt,Be,St,dt,St.layout.get("text-rotation-alignment"),St.layout.get("text-pitch-alignment"),St.paint.get("text-translate"),St.paint.get("text-translate-anchor"),$t),St.paint.get("icon-opacity").constantOr(1)!==0&&Jf(Be,dt,St,Nt,!1,St.paint.get("icon-translate"),St.paint.get("icon-translate-anchor"),St.layout.get("icon-rotation-alignment"),St.layout.get("icon-pitch-alignment"),St.layout.get("icon-keep-upright"),Tr,Ar),St.paint.get("text-opacity").constantOr(1)!==0&&Jf(Be,dt,St,Nt,!0,St.paint.get("text-translate"),St.paint.get("text-translate-anchor"),St.layout.get("text-rotation-alignment"),St.layout.get("text-pitch-alignment"),St.layout.get("text-keep-upright"),Tr,Ar),dt.map.showCollisionBoxes&&(Vu(Be,dt,St,Nt,!0),Vu(Be,dt,St,Nt,!1))})(I,ie,we,Se,this.style.placement.variableOffsets);break;case"circle":(function(Be,dt,St,Nt){if(Be.renderPass!=="translucent")return;let $t=St.paint.get("circle-opacity"),Tr=St.paint.get("circle-stroke-width"),Ar=St.paint.get("circle-stroke-opacity"),Kr=!St.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(Tr.constantOr(1)===0||Ar.constantOr(1)===0))return;let na=Be.context,He=na.gl,Je=Be.depthModeForSublayer(0,ns.ReadOnly),lt=Es.disabled,vt=Be.colorModeForRenderPass(),Lt=[];for(let At=0;At<Nt.length;At++){let zt=Nt[At],cr=dt.getTile(zt),yr=cr.getBucket(St);if(!yr)continue;let Er=yr.programConfigurations.get(St.id),jr=Be.useProgram("circle",Er),Qr=yr.layoutVertexBuffer,pa=yr.indexBuffer,Aa=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(zt),za={programConfiguration:Er,program:jr,layoutVertexBuffer:Qr,indexBuffer:pa,uniformValues:_n(Be,zt,cr,St),terrainData:Aa};if(Kr){let ci=yr.segments.get();for(let Vi of ci)Lt.push({segments:new t.a0([Vi]),sortKey:Vi.sortKey,state:za})}else Lt.push({segments:yr.segments,sortKey:0,state:za})}Kr&&Lt.sort((At,zt)=>At.sortKey-zt.sortKey);for(let At of Lt){let{programConfiguration:zt,program:cr,layoutVertexBuffer:yr,indexBuffer:Er,uniformValues:jr,terrainData:Qr}=At.state;cr.draw(na,He.TRIANGLES,Je,lt,vt,to.disabled,jr,Qr,St.id,yr,Er,At.segments,St.paint,Be.transform.zoom,zt)}})(I,ie,we,Se);break;case"heatmap":(function(Be,dt,St,Nt){if(St.paint.get("heatmap-opacity")===0)return;let $t=Be.context;if(Be.style.map.terrain){for(let Tr of Nt){let Ar=dt.getTile(Tr);dt.hasRenderableParent(Tr)||(Be.renderPass==="offscreen"?of(Be,Ar,St,Tr):Be.renderPass==="translucent"&&jc(Be,St,Tr))}$t.viewport.set([0,0,Be.width,Be.height])}else Be.renderPass==="offscreen"?function(Tr,Ar,Kr,na){let He=Tr.context,Je=He.gl,lt=Es.disabled,vt=new fl([Je.ONE,Je.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Lt,At,zt){let cr=Lt.gl;Lt.activeTexture.set(cr.TEXTURE1),Lt.viewport.set([0,0,At.width/4,At.height/4]);let yr=zt.heatmapFbos.get(t.aU);yr?(cr.bindTexture(cr.TEXTURE_2D,yr.colorAttachment.get()),Lt.bindFramebuffer.set(yr.framebuffer)):(yr=Bf(Lt,At.width/4,At.height/4),zt.heatmapFbos.set(t.aU,yr))})(He,Tr,Kr),He.clear({color:t.aM.transparent});for(let Lt=0;Lt<na.length;Lt++){let At=na[Lt];if(Ar.hasRenderableParent(At))continue;let zt=Ar.getTile(At),cr=zt.getBucket(Kr);if(!cr)continue;let yr=cr.programConfigurations.get(Kr.id),Er=Tr.useProgram("heatmap",yr),{zoom:jr}=Tr.transform;Er.draw(He,Je.TRIANGLES,ns.disabled,lt,vt,to.disabled,no(At.posMatrix,zt,jr,Kr.paint.get("heatmap-intensity")),null,Kr.id,cr.layoutVertexBuffer,cr.indexBuffer,cr.segments,Kr.paint,Tr.transform.zoom,yr)}He.viewport.set([0,0,Tr.width,Tr.height])}(Be,dt,St,Nt):Be.renderPass==="translucent"&&function(Tr,Ar){let Kr=Tr.context,na=Kr.gl;Kr.setColorMode(Tr.colorModeForRenderPass());let He=Ar.heatmapFbos.get(t.aU);He&&(Kr.activeTexture.set(na.TEXTURE0),na.bindTexture(na.TEXTURE_2D,He.colorAttachment.get()),Kr.activeTexture.set(na.TEXTURE1),Nf(Kr,Ar).bind(na.LINEAR,na.CLAMP_TO_EDGE),Tr.useProgram("heatmapTexture").draw(Kr,na.TRIANGLES,ns.disabled,Es.disabled,Tr.colorModeForRenderPass(),to.disabled,cn(Tr,Ar,0,1),null,Ar.id,Tr.viewportBuffer,Tr.quadTriangleIndexBuffer,Tr.viewportSegments,Ar.paint,Tr.transform.zoom))}(Be,St)})(I,ie,we,Se);break;case"line":(function(Be,dt,St,Nt){if(Be.renderPass!=="translucent")return;let $t=St.paint.get("line-opacity"),Tr=St.paint.get("line-width");if($t.constantOr(1)===0||Tr.constantOr(1)===0)return;let Ar=Be.depthModeForSublayer(0,ns.ReadOnly),Kr=Be.colorModeForRenderPass(),na=St.paint.get("line-dasharray"),He=St.paint.get("line-pattern"),Je=He.constantOr(1),lt=St.paint.get("line-gradient"),vt=St.getCrossfadeParameters(),Lt=Je?"linePattern":na?"lineSDF":lt?"lineGradient":"line",At=Be.context,zt=At.gl,cr=!0;for(let yr of Nt){let Er=dt.getTile(yr);if(Je&&!Er.patternsLoaded())continue;let jr=Er.getBucket(St);if(!jr)continue;let Qr=jr.programConfigurations.get(St.id),pa=Be.context.program.get(),Aa=Be.useProgram(Lt,Qr),za=cr||Aa.program!==pa,ci=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(yr),Vi=He.constantOr(null);if(Vi&&Er.imageAtlas){let Sn=Er.imageAtlas,Kn=Sn.patternPositions[Vi.to.toString()],Bn=Sn.patternPositions[Vi.from.toString()];Kn&&Bn&&Qr.setConstantPatternPositions(Kn,Bn)}let ji=ci?yr:null,nn=Je?Oo(Be,Er,St,vt,ji):na?Wn(Be,Er,St,na,vt,ji):lt?hs(Be,Er,St,jr.lineClipsArray.length,ji):Wo(Be,Er,St,ji);if(Je)At.activeTexture.set(zt.TEXTURE0),Er.imageAtlasTexture.bind(zt.LINEAR,zt.CLAMP_TO_EDGE),Qr.updatePaintBuffers(vt);else if(na&&(za||Be.lineAtlas.dirty))At.activeTexture.set(zt.TEXTURE0),Be.lineAtlas.bind(At);else if(lt){let Sn=jr.gradients[St.id],Kn=Sn.texture;if(St.gradientVersion!==Sn.version){let Bn=256;if(St.stepInterpolant){let wo=dt.getSource().maxzoom,is=yr.canonical.z===wo?Math.ceil(1<<Be.transform.maxZoom-yr.canonical.z):1;Bn=t.ac(t.aV(jr.maxLineLength/t.X*1024*is),256,At.maxTextureSize)}Sn.gradient=t.aW({expression:St.gradientExpression(),evaluationKey:"lineProgress",resolution:Bn,image:Sn.gradient||void 0,clips:jr.lineClipsArray}),Sn.texture?Sn.texture.update(Sn.gradient):Sn.texture=new u(At,Sn.gradient,zt.RGBA),Sn.version=St.gradientVersion,Kn=Sn.texture}At.activeTexture.set(zt.TEXTURE0),Kn.bind(St.stepInterpolant?zt.NEAREST:zt.LINEAR,zt.CLAMP_TO_EDGE)}Aa.draw(At,zt.TRIANGLES,Ar,Be.stencilModeForClipping(yr),Kr,to.disabled,nn,ci,St.id,jr.layoutVertexBuffer,jr.indexBuffer,jr.segments,St.paint,Be.transform.zoom,Qr,jr.layoutVertexBuffer2),cr=!1}})(I,ie,we,Se);break;case"fill":(function(Be,dt,St,Nt){let $t=St.paint.get("fill-color"),Tr=St.paint.get("fill-opacity");if(Tr.constantOr(1)===0)return;let Ar=Be.colorModeForRenderPass(),Kr=St.paint.get("fill-pattern"),na=Be.opaquePassEnabledForLayer()&&!Kr.constantOr(1)&&$t.constantOr(t.aM.transparent).a===1&&Tr.constantOr(0)===1?"opaque":"translucent";if(Be.renderPass===na){let He=Be.depthModeForSublayer(1,Be.renderPass==="opaque"?ns.ReadWrite:ns.ReadOnly);Ef(Be,dt,St,Nt,He,Ar,!1)}if(Be.renderPass==="translucent"&&St.paint.get("fill-antialias")){let He=Be.depthModeForSublayer(St.getPaintProperty("fill-outline-color")?2:0,ns.ReadOnly);Ef(Be,dt,St,Nt,He,Ar,!0)}})(I,ie,we,Se);break;case"fill-extrusion":(function(Be,dt,St,Nt){let $t=St.paint.get("fill-extrusion-opacity");if($t!==0&&Be.renderPass==="translucent"){let Tr=new ns(Be.context.gl.LEQUAL,ns.ReadWrite,Be.depthRangeFor3D);if($t!==1||St.paint.get("fill-extrusion-pattern").constantOr(1))oc(Be,dt,St,Nt,Tr,Es.disabled,fl.disabled),oc(Be,dt,St,Nt,Tr,Be.stencilModeFor3D(),Be.colorModeForRenderPass());else{let Ar=Be.colorModeForRenderPass();oc(Be,dt,St,Nt,Tr,Es.disabled,Ar)}}})(I,ie,we,Se);break;case"hillshade":(function(Be,dt,St,Nt){if(Be.renderPass!=="offscreen"&&Be.renderPass!=="translucent")return;let $t=Be.context,Tr=Be.depthModeForSublayer(0,ns.ReadOnly),Ar=Be.colorModeForRenderPass(),[Kr,na]=Be.renderPass==="translucent"?Be.stencilConfigForOverlap(Nt):[{},Nt];for(let He of na){let Je=dt.getTile(He);Je.needsHillshadePrepare!==void 0&&Je.needsHillshadePrepare&&Be.renderPass==="offscreen"?Ql(Be,Je,St,Tr,Es.disabled,Ar):Be.renderPass==="translucent"&&Xc(Be,He,Je,St,Tr,Kr[He.overscaledZ],Ar)}$t.viewport.set([0,0,Be.width,Be.height])})(I,ie,we,Se);break;case"raster":(function(Be,dt,St,Nt){if(Be.renderPass!=="translucent"||St.paint.get("raster-opacity")===0||!Nt.length)return;let $t=Be.context,Tr=$t.gl,Ar=dt.getSource(),Kr=Be.useProgram("raster"),na=Be.colorModeForRenderPass(),[He,Je]=Ar instanceof at?[{},Nt]:Be.stencilConfigForOverlap(Nt),lt=Je[Je.length-1].overscaledZ,vt=!Be.options.moving;for(let Lt of Je){let At=Be.depthModeForSublayer(Lt.overscaledZ-lt,St.paint.get("raster-opacity")===1?ns.ReadWrite:ns.ReadOnly,Tr.LESS),zt=dt.getTile(Lt);zt.registerFadeDuration(St.paint.get("raster-fade-duration"));let cr=dt.findLoadedParent(Lt,0),yr=dt.findLoadedSibling(Lt),Er=qc(zt,cr||yr||null,dt,St,Be.transform,Be.style.map.terrain),jr,Qr,pa=St.paint.get("raster-resampling")==="nearest"?Tr.NEAREST:Tr.LINEAR;$t.activeTexture.set(Tr.TEXTURE0),zt.texture.bind(pa,Tr.CLAMP_TO_EDGE,Tr.LINEAR_MIPMAP_NEAREST),$t.activeTexture.set(Tr.TEXTURE1),cr?(cr.texture.bind(pa,Tr.CLAMP_TO_EDGE,Tr.LINEAR_MIPMAP_NEAREST),jr=Math.pow(2,cr.tileID.overscaledZ-zt.tileID.overscaledZ),Qr=[zt.tileID.canonical.x*jr%1,zt.tileID.canonical.y*jr%1]):zt.texture.bind(pa,Tr.CLAMP_TO_EDGE,Tr.LINEAR_MIPMAP_NEAREST),zt.texture.useMipmap&&$t.extTextureFilterAnisotropic&&Be.transform.pitch>20&&Tr.texParameterf(Tr.TEXTURE_2D,$t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$t.extTextureFilterAnisotropicMax);let Aa=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(Lt),za=Aa?Lt:null,ci=za?za.posMatrix:Be.transform.calculatePosMatrix(Lt.toUnwrapped(),vt),Vi=Ns(ci,Qr||[0,0],jr||1,Er,St);Ar instanceof at?Kr.draw($t,Tr.TRIANGLES,At,Es.disabled,na,to.disabled,Vi,Aa,St.id,Ar.boundsBuffer,Be.quadTriangleIndexBuffer,Ar.boundsSegments):Kr.draw($t,Tr.TRIANGLES,At,He[Lt.overscaledZ],na,to.disabled,Vi,Aa,St.id,Be.rasterBoundsBuffer,Be.quadTriangleIndexBuffer,Be.rasterBoundsSegments)}})(I,ie,we,Se);break;case"background":(function(Be,dt,St,Nt){let $t=St.paint.get("background-color"),Tr=St.paint.get("background-opacity");if(Tr===0)return;let Ar=Be.context,Kr=Ar.gl,na=Be.transform,He=na.tileSize,Je=St.paint.get("background-pattern");if(Be.isPatternMissing(Je))return;let lt=!Je&&$t.a===1&&Tr===1&&Be.opaquePassEnabledForLayer()?"opaque":"translucent";if(Be.renderPass!==lt)return;let vt=Es.disabled,Lt=Be.depthModeForSublayer(0,lt==="opaque"?ns.ReadWrite:ns.ReadOnly),At=Be.colorModeForRenderPass(),zt=Be.useProgram(Je?"backgroundPattern":"background"),cr=Nt||na.coveringTiles({tileSize:He,terrain:Be.style.map.terrain});Je&&(Ar.activeTexture.set(Kr.TEXTURE0),Be.imageManager.bind(Be.context));let yr=St.getCrossfadeParameters();for(let Er of cr){let jr=Nt?Er.posMatrix:Be.transform.calculatePosMatrix(Er.toUnwrapped()),Qr=Je?Cs(jr,Tr,Be,Je,{tileID:Er,tileSize:He},yr):ls(jr,Tr,$t),pa=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(Er);zt.draw(Ar,Kr.TRIANGLES,Lt,vt,At,to.disabled,Qr,pa,St.id,Be.tileExtentBuffer,Be.quadTriangleIndexBuffer,Be.tileExtentSegments)}})(I,0,we,Se);break;case"custom":(function(Be,dt,St){let Nt=Be.context,$t=St.implementation;if(Be.renderPass==="offscreen"){let Tr=$t.prerender;Tr&&(Be.setCustomLayerDefaults(),Nt.setColorMode(Be.colorModeForRenderPass()),Tr.call($t,Nt.gl,Be.transform.customLayerMatrix()),Nt.setDirty(),Be.setBaseState())}else if(Be.renderPass==="translucent"){Be.setCustomLayerDefaults(),Nt.setColorMode(Be.colorModeForRenderPass()),Nt.setStencilMode(Es.disabled);let Tr=$t.renderingMode==="3d"?new ns(Be.context.gl.LEQUAL,ns.ReadWrite,Be.depthRangeFor3D):Be.depthModeForSublayer(0,ns.ReadOnly);Nt.setDepthMode(Tr),$t.render(Nt.gl,Be.transform.customLayerMatrix(),{farZ:Be.transform.farZ,nearZ:Be.transform.nearZ,fov:Be.transform._fov,modelViewProjectionMatrix:Be.transform.modelViewProjectionMatrix,projectionMatrix:Be.transform.projectionMatrix}),Nt.setDirty(),Be.setBaseState(),Nt.bindFramebuffer.set(null)}})(I,0,we)}}translatePosMatrix(I,ie,we,Se,Be){if(!we[0]&&!we[1])return I;let dt=Be?Se==="map"?this.transform.angle:0:Se==="viewport"?-this.transform.angle:0;if(dt){let $t=Math.sin(dt),Tr=Math.cos(dt);we=[we[0]*Tr-we[1]*$t,we[0]*$t+we[1]*Tr]}let St=[Be?we[0]:Da(ie,we[0],this.transform.zoom),Be?we[1]:Da(ie,we[1],this.transform.zoom),0],Nt=new Float32Array(16);return t.J(Nt,I,St),Nt}saveTileTexture(I){let ie=this._tileTextures[I.size[0]];ie?ie.push(I):this._tileTextures[I.size[0]]=[I]}getTileTexture(I){let ie=this._tileTextures[I];return ie&&ie.length>0?ie.pop():null}isPatternMissing(I){if(!I)return!1;if(!I.from||!I.to)return!0;let ie=this.imageManager.getPattern(I.from.toString()),we=this.imageManager.getPattern(I.to.toString());return!ie||!we}useProgram(I,ie){this.cache=this.cache||{};let we=I+(ie?ie.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[we]||(this.cache[we]=new ba(this.context,Hr[I],ie,Ks[I],this._showOverdrawInspector,this.style.map.terrain)),this.cache[we]}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(){let I=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(I.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:I,drawingBufferHeight:ie}=this.context.gl;return this.width!==I||this.height!==ie}}class ol{constructor(I,ie){this.points=I,this.planes=ie}static fromInvProjectionMatrix(I,ie,we){let Se=Math.pow(2,we),Be=[[-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(St=>{let Nt=1/(St=t.af([],St,I))[3]/ie*Se;return t.b1(St,St,[Nt,Nt,1/St[3],Nt])}),dt=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(St=>{let Nt=function(Kr,na){var He=na[0],Je=na[1],lt=na[2],vt=He*He+Je*Je+lt*lt;return vt>0&&(vt=1/Math.sqrt(vt)),Kr[0]=na[0]*vt,Kr[1]=na[1]*vt,Kr[2]=na[2]*vt,Kr}([],function(Kr,na,He){var Je=na[0],lt=na[1],vt=na[2],Lt=He[0],At=He[1],zt=He[2];return Kr[0]=lt*zt-vt*At,Kr[1]=vt*Lt-Je*zt,Kr[2]=Je*At-lt*Lt,Kr}([],M([],Be[St[0]],Be[St[1]]),M([],Be[St[2]],Be[St[1]]))),$t=-((Tr=Nt)[0]*(Ar=Be[St[1]])[0]+Tr[1]*Ar[1]+Tr[2]*Ar[2]);var Tr,Ar;return Nt.concat($t)});return new ol(Be,dt)}}class vc{constructor(I,ie){this.min=I,this.max=ie,this.center=function(we,Se,Be){return we[0]=.5*Se[0],we[1]=.5*Se[1],we[2]=.5*Se[2],we}([],function(we,Se,Be){return we[0]=Se[0]+Be[0],we[1]=Se[1]+Be[1],we[2]=Se[2]+Be[2],we}([],this.min,this.max))}quadrant(I){let ie=[I%2==0,I<2],we=w(this.min),Se=w(this.max);for(let Be=0;Be<ie.length;Be++)we[Be]=ie[Be]?this.min[Be]:this.center[Be],Se[Be]=ie[Be]?this.center[Be]:this.max[Be];return Se[2]=this.max[2],new vc(we,Se)}distanceX(I){return Math.max(Math.min(this.max[0],I[0]),this.min[0])-I[0]}distanceY(I){return Math.max(Math.min(this.max[1],I[1]),this.min[1])-I[1]}intersects(I){let ie=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]],we=!0;for(let Se=0;Se<I.planes.length;Se++){let Be=I.planes[Se],dt=0;for(let St=0;St<ie.length;St++)t.b2(Be,ie[St])>=0&&dt++;if(dt===0)return 0;dt!==ie.length&&(we=!1)}if(we)return 2;for(let Se=0;Se<3;Se++){let Be=Number.MAX_VALUE,dt=-Number.MAX_VALUE;for(let St=0;St<I.points.length;St++){let Nt=I.points[St][Se]-this.min[Se];Be=Math.min(Be,Nt),dt=Math.max(dt,Nt)}if(dt<0||Be>this.max[Se]-this.min[Se])return 0}return 1}}class yu{constructor(I=0,ie=0,we=0,Se=0){if(isNaN(I)||I<0||isNaN(ie)||ie<0||isNaN(we)||we<0||isNaN(Se)||Se<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=I,this.bottom=ie,this.left=we,this.right=Se}interpolate(I,ie,we){return ie.top!=null&&I.top!=null&&(this.top=t.y.number(I.top,ie.top,we)),ie.bottom!=null&&I.bottom!=null&&(this.bottom=t.y.number(I.bottom,ie.bottom,we)),ie.left!=null&&I.left!=null&&(this.left=t.y.number(I.left,ie.left,we)),ie.right!=null&&I.right!=null&&(this.right=t.y.number(I.right,ie.right,we)),this}getCenter(I,ie){let we=t.ac((this.left+I-this.right)/2,0,I),Se=t.ac((this.top+ie-this.bottom)/2,0,ie);return new t.P(we,Se)}equals(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right}clone(){return new yu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Tu=85.051129;class El{constructor(I,ie,we,Se,Be){this.tileSize=512,this._renderWorldCopies=Be===void 0||!!Be,this._minZoom=I||0,this._maxZoom=ie||22,this._minPitch=we??0,this._maxPitch=Se??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new yu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let I=new El(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.apply(this),I}apply(I){this.tileSize=I.tileSize,this.latRange=I.latRange,this.lngRange=I.lngRange,this.width=I.width,this.height=I.height,this._center=I._center,this._elevation=I._elevation,this.minElevationForCurrentTile=I.minElevationForCurrentTile,this.zoom=I.zoom,this.angle=I.angle,this._fov=I._fov,this._pitch=I._pitch,this._unmodified=I._unmodified,this._edgeInsets=I._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))}get maxZoom(){return this._maxZoom}set maxZoom(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))}get minPitch(){return this._minPitch}set minPitch(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))}get maxPitch(){return this._maxPitch}set maxPitch(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(I){let ie=-t.b3(I,-180,180)*Math.PI/180;this.angle!==ie&&(this._unmodified=!1,this.angle=ie,this._calcMatrices(),this.rotationMatrix=function(){var we=new t.A(4);return t.A!=Float32Array&&(we[1]=0,we[2]=0),we[0]=1,we[3]=1,we}(),function(we,Se,Be){var dt=Se[0],St=Se[1],Nt=Se[2],$t=Se[3],Tr=Math.sin(Be),Ar=Math.cos(Be);we[0]=dt*Ar+Nt*Tr,we[1]=St*Ar+$t*Tr,we[2]=dt*-Tr+Nt*Ar,we[3]=St*-Tr+$t*Ar}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(I){let ie=t.ac(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ie&&(this._unmodified=!1,this._pitch=ie,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(I){let ie=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==ie&&(this._unmodified=!1,this._zoom=ie,this.tileZoom=Math.max(0,Math.floor(ie)),this.scale=this.zoomScale(ie),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(I){I!==this._elevation&&(this._elevation=I,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(I){return this._edgeInsets.equals(I)}interpolatePadding(I,ie,we){this._unmodified=!1,this._edgeInsets.interpolate(I,ie,we),this._constrain(),this._calcMatrices()}coveringZoomLevel(I){let ie=(I.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/I.tileSize));return Math.max(0,ie)}getVisibleUnwrappedCoordinates(I){let ie=[new t.b4(0,I)];if(this._renderWorldCopies){let we=this.pointCoordinate(new t.P(0,0)),Se=this.pointCoordinate(new t.P(this.width,0)),Be=this.pointCoordinate(new t.P(this.width,this.height)),dt=this.pointCoordinate(new t.P(0,this.height)),St=Math.floor(Math.min(we.x,Se.x,Be.x,dt.x)),Nt=Math.floor(Math.max(we.x,Se.x,Be.x,dt.x)),$t=1;for(let Tr=St-$t;Tr<=Nt+$t;Tr++)Tr!==0&&ie.push(new t.b4(Tr,I))}return ie}coveringTiles(I){var ie,we;let Se=this.coveringZoomLevel(I),Be=Se;if(I.minzoom!==void 0&&Se<I.minzoom)return[];I.maxzoom!==void 0&&Se>I.maxzoom&&(Se=I.maxzoom);let dt=this.pointCoordinate(this.getCameraPoint()),St=t.Z.fromLngLat(this.center),Nt=Math.pow(2,Se),$t=[Nt*dt.x,Nt*dt.y,0],Tr=[Nt*St.x,Nt*St.y,0],Ar=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Se),Kr=I.minzoom||0;!I.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Kr=Se);let na=I.terrain?2/Math.min(this.tileSize,I.tileSize)*this.tileSize:3,He=At=>({aabb:new vc([At*Nt,0,0],[(At+1)*Nt,Nt,0]),zoom:0,x:0,y:0,wrap:At,fullyVisible:!1}),Je=[],lt=[],vt=Se,Lt=I.reparseOverscaled?Be:Se;if(this._renderWorldCopies)for(let At=1;At<=3;At++)Je.push(He(-At)),Je.push(He(At));for(Je.push(He(0));Je.length>0;){let At=Je.pop(),zt=At.x,cr=At.y,yr=At.fullyVisible;if(!yr){let Aa=At.aabb.intersects(Ar);if(Aa===0)continue;yr=Aa===2}let Er=I.terrain?$t:Tr,jr=At.aabb.distanceX(Er),Qr=At.aabb.distanceY(Er),pa=Math.max(Math.abs(jr),Math.abs(Qr));if(At.zoom===vt||pa>na+(1<<vt-At.zoom)-2&&At.zoom>=Kr){let Aa=vt-At.zoom,za=$t[0]-.5-(zt<<Aa),ci=$t[1]-.5-(cr<<Aa);lt.push({tileID:new t.S(At.zoom===vt?Lt:At.zoom,At.wrap,At.zoom,zt,cr),distanceSq:g([Tr[0]-.5-zt,Tr[1]-.5-cr]),tileDistanceToCamera:Math.sqrt(za*za+ci*ci)})}else for(let Aa=0;Aa<4;Aa++){let za=(zt<<1)+Aa%2,ci=(cr<<1)+(Aa>>1),Vi=At.zoom+1,ji=At.aabb.quadrant(Aa);if(I.terrain){let nn=new t.S(Vi,At.wrap,Vi,za,ci),Sn=I.terrain.getMinMaxElevation(nn),Kn=(ie=Sn.minElevation)!==null&&ie!==void 0?ie:this.elevation,Bn=(we=Sn.maxElevation)!==null&&we!==void 0?we:this.elevation;ji=new vc([ji.min[0],ji.min[1],Kn],[ji.max[0],ji.max[1],Bn])}Je.push({aabb:ji,zoom:Vi,x:za,y:ci,wrap:At.wrap,fullyVisible:yr})}}return lt.sort((At,zt)=>At.distanceSq-zt.distanceSq).map(At=>At.tileID)}resize(I,ie){this.width=I,this.height=ie,this.pixelsToGLUnits=[2/I,-2/ie],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(I){return Math.pow(2,I)}scaleZoom(I){return Math.log(I)/Math.LN2}project(I){let ie=t.ac(I.lat,-85.051129,Tu);return new t.P(t.O(I.lng)*this.worldSize,t.Q(ie)*this.worldSize)}unproject(I){return new t.Z(I.x/this.worldSize,I.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(I){let ie=this.elevation,we=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Se=this.pointLocation(this.centerPoint,I),Be=I.getElevationForLngLatZoom(Se,this.tileZoom);if(!(this.elevation-Be))return;let dt=we+ie-Be,St=Math.cos(this._pitch)*this.cameraToCenterDistance/dt/t.b5(1,Se.lat),Nt=this.scaleZoom(St/this.tileSize);this._elevation=Be,this._center=Se,this.zoom=Nt}setLocationAtPoint(I,ie){let we=this.pointCoordinate(ie),Se=this.pointCoordinate(this.centerPoint),Be=this.locationCoordinate(I),dt=new t.Z(Be.x-(we.x-Se.x),Be.y-(we.y-Se.y));this.center=this.coordinateLocation(dt),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(I,ie){return ie?this.coordinatePoint(this.locationCoordinate(I),ie.getElevationForLngLatZoom(I,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(I))}pointLocation(I,ie){return this.coordinateLocation(this.pointCoordinate(I,ie))}locationCoordinate(I){return t.Z.fromLngLat(I)}coordinateLocation(I){return I&&I.toLngLat()}pointCoordinate(I,ie){if(ie){let Kr=ie.pointCoordinate(I);if(Kr!=null)return Kr}let we=[I.x,I.y,0,1],Se=[I.x,I.y,1,1];t.af(we,we,this.pixelMatrixInverse),t.af(Se,Se,this.pixelMatrixInverse);let Be=we[3],dt=Se[3],St=we[1]/Be,Nt=Se[1]/dt,$t=we[2]/Be,Tr=Se[2]/dt,Ar=$t===Tr?0:(0-$t)/(Tr-$t);return new t.Z(t.y.number(we[0]/Be,Se[0]/dt,Ar)/this.worldSize,t.y.number(St,Nt,Ar)/this.worldSize)}coordinatePoint(I,ie=0,we=this.pixelMatrix){let Se=[I.x*this.worldSize,I.y*this.worldSize,ie,1];return t.af(Se,Se,we),new t.P(Se[0]/Se[3],Se[1]/Se[3])}getBounds(){let I=Math.max(0,this.height/2-this.getHorizon());return new re().extend(this.pointLocation(new t.P(0,I))).extend(this.pointLocation(new t.P(this.width,I))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new re([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tu])}calculateTileMatrix(I){let ie=I.canonical,we=this.worldSize/this.zoomScale(ie.z),Se=ie.x+Math.pow(2,ie.z)*I.wrap,Be=t.an(new Float64Array(16));return t.J(Be,Be,[Se*we,ie.y*we,0]),t.K(Be,Be,[we/t.X,we/t.X,1]),Be}calculatePosMatrix(I,ie=!1){let we=I.key,Se=ie?this._alignedPosMatrixCache:this._posMatrixCache;if(Se[we])return Se[we];let Be=this.calculateTileMatrix(I);return t.L(Be,ie?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Be),Se[we]=new Float32Array(Be),Se[we]}calculateFogMatrix(I){let ie=I.key,we=this._fogMatrixCache;if(we[ie])return we[ie];let Se=this.calculateTileMatrix(I);return t.L(Se,this.fogMatrix,Se),we[ie]=new Float32Array(Se),we[ie]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(I,ie){ie=t.ac(+ie,this.minZoom,this.maxZoom);let we={center:new t.N(I.lng,I.lat),zoom:ie},Se=this.lngRange;if(!this._renderWorldCopies&&Se===null){let At=179.9999999999;Se=[-At,At]}let Be=this.tileSize*this.zoomScale(we.zoom),dt=0,St=Be,Nt=0,$t=Be,Tr=0,Ar=0,{x:Kr,y:na}=this.size;if(this.latRange){let At=this.latRange;dt=t.Q(At[1])*Be,St=t.Q(At[0])*Be,St-dt<na&&(Tr=na/(St-dt))}Se&&(Nt=t.b3(t.O(Se[0])*Be,0,Be),$t=t.b3(t.O(Se[1])*Be,0,Be),$t<Nt&&($t+=Be),$t-Nt<Kr&&(Ar=Kr/($t-Nt)));let{x:He,y:Je}=this.project.call({worldSize:Be},I),lt,vt,Lt=Math.max(Ar||0,Tr||0);if(Lt){let At=new t.P(Ar?($t+Nt)/2:He,Tr?(St+dt)/2:Je);return we.center=this.unproject.call({worldSize:Be},At).wrap(),we.zoom+=this.scaleZoom(Lt),we}if(this.latRange){let At=na/2;Je-At<dt&&(vt=dt+At),Je+At>St&&(vt=St-At)}if(Se){let At=(Nt+$t)/2,zt=He;this._renderWorldCopies&&(zt=t.b3(He,At-Be/2,At+Be/2));let cr=Kr/2;zt-cr<Nt&&(lt=Nt+cr),zt+cr>$t&&(lt=$t-cr)}if(lt!==void 0||vt!==void 0){let At=new t.P(lt??He,vt??Je);we.center=this.unproject.call({worldSize:Be},At).wrap()}return we}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let I=this._unmodified,{center:ie,zoom:we}=this.getConstrained(this.center,this.zoom);this.center=ie,this.zoom=we,this._unmodified=I,this._constraining=!1}_calcMatrices(){if(!this.height)return;let I=this.centerOffset,ie=this.point.x,we=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Se=t.an(new Float64Array(16));t.K(Se,Se,[this.width/2,-this.height/2,1]),t.J(Se,Se,[1,-1,0]),this.labelPlaneMatrix=Se,Se=t.an(new Float64Array(16)),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[-1,-1,0]),t.K(Se,Se,[2/this.width,2/this.height,1]),this.glCoordMatrix=Se;let Be=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),dt=Math.min(this.elevation,this.minElevationForCurrentTile),St=Be-dt*this._pixelPerMeter/Math.cos(this._pitch),Nt=dt<0?St:Be,$t=Math.PI/2+this._pitch,Tr=this._fov*(.5+I.y/this.height),Ar=Math.sin(Tr)*Nt/Math.sin(t.ac(Math.PI-$t-Tr,.01,Math.PI-.01)),Kr=this.getHorizon(),na=2*Math.atan(Kr/this.cameraToCenterDistance)*(.5+I.y/(2*Kr)),He=Math.sin(na)*Nt/Math.sin(t.ac(Math.PI-$t-na,.01,Math.PI-.01)),Je=Math.min(Ar,He);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Je+Nt),this.nearZ=this.height/50,Se=new Float64Array(16),t.b6(Se,this._fov,this.width/this.height,this.nearZ,this.farZ),Se[8]=2*-I.x/this.width,Se[9]=2*I.y/this.height,this.projectionMatrix=t.ae(Se),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[0,0,-this.cameraToCenterDistance]),t.b7(Se,Se,this._pitch),t.ad(Se,Se,this.angle),t.J(Se,Se,[-ie,-we,0]),this.mercatorMatrix=t.K([],Se,[this.worldSize,this.worldSize,this.worldSize]),t.K(Se,Se,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Se),t.J(Se,Se,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Se,this.invModelViewProjectionMatrix=t.as([],Se),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,Be,this.farZ),this.fogMatrix[8]=2*-I.x/this.width,this.fogMatrix[9]=2*I.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ad(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-ie,-we,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,Se);let lt=this.width%2/2,vt=this.height%2/2,Lt=Math.cos(this.angle),At=Math.sin(this.angle),zt=ie-Math.round(ie)+Lt*lt+At*vt,cr=we-Math.round(we)+Lt*vt+At*lt,yr=new Float64Array(Se);if(t.J(yr,yr,[zt>.5?zt-1:zt,cr>.5?cr-1:cr,0]),this.alignedModelViewProjectionMatrix=yr,Se=t.as(new Float64Array(16),this.pixelMatrix),!Se)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Se,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let I=this.pointCoordinate(new t.P(0,0)),ie=[I.x*this.worldSize,I.y*this.worldSize,0,1];return t.af(ie,ie,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let I=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,I))}getCameraQueryGeometry(I){let ie=this.getCameraPoint();if(I.length===1)return[I[0],ie];{let we=ie.x,Se=ie.y,Be=ie.x,dt=ie.y;for(let St of I)we=Math.min(we,St.x),Se=Math.min(Se,St.y),Be=Math.max(Be,St.x),dt=Math.max(dt,St.y);return[new t.P(we,Se),new t.P(Be,Se),new t.P(Be,dt),new t.P(we,dt),new t.P(we,Se)]}}lngLatToCameraDepth(I,ie){let we=this.locationCoordinate(I),Se=[we.x*this.worldSize,we.y*this.worldSize,ie,1];return t.af(Se,Se,this.modelViewProjectionMatrix),Se[2]/Se[3]}}function qf(Ue,I){let ie,we=!1,Se=null,Be=null,dt=()=>{Se=null,we&&(Ue.apply(Be,ie),Se=setTimeout(dt,I),we=!1)};return(...St)=>(we=!0,Be=this,ie=St,Se||dt(),Se)}class Qf{constructor(I){this._getCurrentHash=()=>{let ie=window.location.hash.replace("#","");if(this._hashName){let we;return ie.split("&").map(Se=>Se.split("=")).forEach(Se=>{Se[0]===this._hashName&&(we=Se)}),(we&&we[1]||"").split("/")}return ie.split("/")},this._onHashChange=()=>{let ie=this._getCurrentHash();if(ie.length>=3&&!ie.some(we=>isNaN(we))){let we=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ie[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ie[2],+ie[1]],zoom:+ie[0],bearing:we,pitch:+(ie[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ie=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ie)},this._removeHash=()=>{let ie=this._getCurrentHash();if(ie.length===0)return;let we=ie.join("/"),Se=we;Se.split("&").length>0&&(Se=Se.split("&")[0]),this._hashName&&(Se=`${this._hashName}=${we}`);let Be=window.location.hash.replace(Se,"");Be.startsWith("#&")?Be=Be.slice(0,1)+Be.slice(2):Be==="#"&&(Be="");let dt=window.location.href.replace(/(#.+)?$/,Be);dt=dt.replace("&&","&"),window.history.replaceState(window.history.state,null,dt)},this._updateHash=qf(this._updateHashUnthrottled,300),this._hashName=I&&encodeURIComponent(I)}addTo(I){return this._map=I,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(I){let ie=this._map.getCenter(),we=Math.round(100*this._map.getZoom())/100,Se=Math.ceil((we*Math.LN2+Math.log(512/360/.5))/Math.LN10),Be=Math.pow(10,Se),dt=Math.round(ie.lng*Be)/Be,St=Math.round(ie.lat*Be)/Be,Nt=this._map.getBearing(),$t=this._map.getPitch(),Tr="";if(Tr+=I?`/${dt}/${St}/${we}`:`${we}/${St}/${dt}`,(Nt||$t)&&(Tr+="/"+Math.round(10*Nt)/10),$t&&(Tr+=`/${Math.round($t)}`),this._hashName){let Ar=this._hashName,Kr=!1,na=window.location.hash.slice(1).split("&").map(He=>{let Je=He.split("=")[0];return Je===Ar?(Kr=!0,`${Je}=${Tr}`):He}).filter(He=>He);return Kr||na.push(`${Ar}=${Tr}`),`#${na.join("&")}`}return`#${Tr}`}}let Bu={linearity:.3,easing:t.b8(0,0,.3,1)},Ec=t.e({deceleration:2500,maxSpeed:1400},Bu),mc=t.e({deceleration:20,maxSpeed:1400},Bu),Lh=t.e({deceleration:1e3,maxSpeed:360},Bu),sf=t.e({deceleration:1e3,maxSpeed:90},Bu);class vf{constructor(I){this._map=I,this.clear()}clear(){this._inertiaBuffer=[]}record(I){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:n.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ie=n.now();for(;I.length>0&&ie-I[0].time>160;)I.shift()}_onMoveEnd(I){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ie={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Be}of this._inertiaBuffer)ie.zoom+=Be.zoomDelta||0,ie.bearing+=Be.bearingDelta||0,ie.pitch+=Be.pitchDelta||0,Be.panDelta&&ie.pan._add(Be.panDelta),Be.around&&(ie.around=Be.around),Be.pinchAround&&(ie.pinchAround=Be.pinchAround);let we=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Se={};if(ie.pan.mag()){let Be=lf(ie.pan.mag(),we,t.e({},Ec,I||{}));Se.offset=ie.pan.mult(Be.amount/ie.pan.mag()),Se.center=this._map.transform.center,Nu(Se,Be)}if(ie.zoom){let Be=lf(ie.zoom,we,mc);Se.zoom=this._map.transform.zoom+Be.amount,Nu(Se,Be)}if(ie.bearing){let Be=lf(ie.bearing,we,Lh);Se.bearing=this._map.transform.bearing+t.ac(Be.amount,-179,179),Nu(Se,Be)}if(ie.pitch){let Be=lf(ie.pitch,we,sf);Se.pitch=this._map.transform.pitch+Be.amount,Nu(Se,Be)}if(Se.zoom||Se.bearing){let Be=ie.pinchAround===void 0?ie.around:ie.pinchAround;Se.around=Be?this._map.unproject(Be):this._map.getCenter()}return this.clear(),t.e(Se,{noMoveStart:!0})}}function Nu(Ue,I){(!Ue.duration||Ue.duration<I.duration)&&(Ue.duration=I.duration,Ue.easing=I.easing)}function lf(Ue,I,ie){let{maxSpeed:we,linearity:Se,deceleration:Be}=ie,dt=t.ac(Ue*Se/(I/1e3),-we,we),St=Math.abs(dt)/(Be*Se);return{easing:ie.easing,duration:1e3*St,amount:dt*(St/2)}}class au extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,we,Se={}){let Be=i.mousePos(ie.getCanvas(),we),dt=ie.unproject(Be);super(I,t.e({point:Be,lngLat:dt,originalEvent:we},Se)),this._defaultPrevented=!1,this.target=ie}}class Yc extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,we){let Se=I==="touchend"?we.changedTouches:we.touches,Be=i.touchPos(ie.getCanvasContainer(),Se),dt=Be.map(Nt=>ie.unproject(Nt)),St=Be.reduce((Nt,$t,Tr,Ar)=>Nt.add($t.div(Ar.length)),new t.P(0,0));super(I,{points:Be,point:St,lngLats:dt,lngLat:ie.unproject(St),originalEvent:we}),this._defaultPrevented=!1}}class hh extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,we){super(I,{originalEvent:we}),this._defaultPrevented=!1}}class mf{constructor(I,ie){this._map=I,this._clickTolerance=ie.clickTolerance}reset(){delete this._mousedownPos}wheel(I){return this._firePreventable(new hh(I.type,this._map,I))}mousedown(I,ie){return this._mousedownPos=ie,this._firePreventable(new au(I.type,this._map,I))}mouseup(I){this._map.fire(new au(I.type,this._map,I))}click(I,ie){this._mousedownPos&&this._mousedownPos.dist(ie)>=this._clickTolerance||this._map.fire(new au(I.type,this._map,I))}dblclick(I){return this._firePreventable(new au(I.type,this._map,I))}mouseover(I){this._map.fire(new au(I.type,this._map,I))}mouseout(I){this._map.fire(new au(I.type,this._map,I))}touchstart(I){return this._firePreventable(new Yc(I.type,this._map,I))}touchmove(I){this._map.fire(new Yc(I.type,this._map,I))}touchend(I){this._map.fire(new Yc(I.type,this._map,I))}touchcancel(I){this._map.fire(new Yc(I.type,this._map,I))}_firePreventable(I){if(this._map.fire(I),I.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class sl{constructor(I){this._map=I}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(I){this._map.fire(new au(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new au("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new au(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _u{constructor(I){this._map=I}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(I){return this.transform.pointLocation(t.P.convert(I),this._map.terrain)}}class Pu{constructor(I,ie){this._map=I,this._tr=new _u(I),this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=ie.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(I,ie){this.isEnabled()&&I.shiftKey&&I.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ie,this._active=!0)}mousemoveWindow(I,ie){if(!this._active)return;let we=ie;if(this._lastPos.equals(we)||!this._box&&we.dist(this._startPos)<this._clickTolerance)return;let Se=this._startPos;this._lastPos=we,this._box||(this._box=i.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",I));let Be=Math.min(Se.x,we.x),dt=Math.max(Se.x,we.x),St=Math.min(Se.y,we.y),Nt=Math.max(Se.y,we.y);i.setTransform(this._box,`translate(${Be}px,${St}px)`),this._box.style.width=dt-Be+"px",this._box.style.height=Nt-St+"px"}mouseupWindow(I,ie){if(!this._active||I.button!==0)return;let we=this._startPos,Se=ie;if(this.reset(),i.suppressClick(),we.x!==Se.x||we.y!==Se.y)return this._map.fire(new t.k("boxzoomend",{originalEvent:I})),{cameraAnimation:Be=>Be.fitScreenCoordinates(we,Se,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",I)}keydown(I){this._active&&I.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",I))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(I,ie){return this._map.fire(new t.k(I,{originalEvent:ie}))}}function Cf(Ue,I){if(Ue.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${Ue.length}, points ${I.length}`);let ie={};for(let we=0;we<Ue.length;we++)ie[Ue[we].identifier]=I[we];return ie}class hl{constructor(I){this.reset(),this.numTouches=I.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(I,ie,we){(this.centroid||we.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),we.length===this.numTouches&&(this.centroid=function(Se){let Be=new t.P(0,0);for(let dt of Se)Be._add(dt);return Be.div(Se.length)}(ie),this.touches=Cf(we,ie)))}touchmove(I,ie,we){if(this.aborted||!this.centroid)return;let Se=Cf(we,ie);for(let Be in this.touches){let dt=Se[Be];(!dt||dt.dist(this.touches[Be])>30)&&(this.aborted=!0)}}touchend(I,ie,we){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),we.length===0){let Se=!this.aborted&&this.centroid;if(this.reset(),Se)return Se}}}class uf{constructor(I){this.singleTap=new hl(I),this.numTaps=I.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(I,ie,we){this.singleTap.touchstart(I,ie,we)}touchmove(I,ie,we){this.singleTap.touchmove(I,ie,we)}touchend(I,ie,we){let Se=this.singleTap.touchend(I,ie,we);if(Se){let Be=I.timeStamp-this.lastTime<500,dt=!this.lastTap||this.lastTap.dist(Se)<30;if(Be&&dt||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=Se,this.count===this.numTaps)return this.reset(),Se}}}class kc{constructor(I){this._tr=new _u(I),this._zoomIn=new uf({numTouches:1,numTaps:2}),this._zoomOut=new uf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(I,ie,we){this._zoomIn.touchstart(I,ie,we),this._zoomOut.touchstart(I,ie,we)}touchmove(I,ie,we){this._zoomIn.touchmove(I,ie,we),this._zoomOut.touchmove(I,ie,we)}touchend(I,ie,we){let Se=this._zoomIn.touchend(I,ie,we),Be=this._zoomOut.touchend(I,ie,we),dt=this._tr;return Se?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:St=>St.easeTo({duration:300,zoom:dt.zoom+1,around:dt.unproject(Se)},{originalEvent:I})}):Be?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:St=>St.easeTo({duration:300,zoom:dt.zoom-1,around:dt.unproject(Be)},{originalEvent:I})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hu{constructor(I){this._enabled=!!I.enable,this._moveStateManager=I.moveStateManager,this._clickTolerance=I.clickTolerance||1,this._moveFunction=I.move,this._activateOnStart=!!I.activateOnStart,I.assignEvents(this),this.reset()}reset(I){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(I)}_move(...I){let ie=this._moveFunction(...I);if(ie.bearingDelta||ie.pitchDelta||ie.around||ie.panDelta)return this._active=!0,ie}dragStart(I,ie){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(I)&&(this._moveStateManager.startMove(I),this._lastPoint=ie.length?ie[0]:ie,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(I,ie){if(!this.isEnabled())return;let we=this._lastPoint;if(!we)return;if(I.preventDefault(),!this._moveStateManager.isValidMoveEvent(I))return void this.reset(I);let Se=ie.length?ie[0]:ie;return!this._moved&&Se.dist(we)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Se,this._move(we,Se))}dragEnd(I){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(I)&&(this._moved&&i.suppressClick(),this.reset(I))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let gf={0:1,2:2};class Wu{constructor(I){this._correctEvent=I.checkCorrectEvent}startMove(I){let ie=i.mouseButton(I);this._eventButton=ie}endMove(I){delete this._eventButton}isValidStartEvent(I){return this._correctEvent(I)}isValidMoveEvent(I){return!function(ie,we){let Se=gf[we];return ie.buttons===void 0||(ie.buttons&Se)!==Se}(I,this._eventButton)}isValidEndEvent(I){return i.mouseButton(I)===this._eventButton}}class Kc{constructor(){this._firstTouch=void 0}_isOneFingerTouch(I){return I.targetTouches.length===1}_isSameTouchEvent(I){return I.targetTouches[0].identifier===this._firstTouch}startMove(I){this._firstTouch=I.targetTouches[0].identifier}endMove(I){delete this._firstTouch}isValidStartEvent(I){return this._isOneFingerTouch(I)}isValidMoveEvent(I){return this._isOneFingerTouch(I)&&this._isSameTouchEvent(I)}isValidEndEvent(I){return this._isOneFingerTouch(I)&&this._isSameTouchEvent(I)}}let Lf=Ue=>{Ue.mousedown=Ue.dragStart,Ue.mousemoveWindow=Ue.dragMove,Ue.mouseup=Ue.dragEnd,Ue.contextmenu=I=>{I.preventDefault()}},iu=({enable:Ue,clickTolerance:I,bearingDegreesPerPixelMoved:ie=.8})=>{let we=new Wu({checkCorrectEvent:Se=>i.mouseButton(Se)===0&&Se.ctrlKey||i.mouseButton(Se)===2});return new Hu({clickTolerance:I,move:(Se,Be)=>({bearingDelta:(Be.x-Se.x)*ie}),moveStateManager:we,enable:Ue,assignEvents:Lf})},Vf=({enable:Ue,clickTolerance:I,pitchDegreesPerPixelMoved:ie=-.5})=>{let we=new Wu({checkCorrectEvent:Se=>i.mouseButton(Se)===0&&Se.ctrlKey||i.mouseButton(Se)===2});return new Hu({clickTolerance:I,move:(Se,Be)=>({pitchDelta:(Be.y-Se.y)*ie}),moveStateManager:we,enable:Ue,assignEvents:Lf})};class Xu{constructor(I,ie){this._clickTolerance=I.clickTolerance||1,this._map=ie,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(I){return I<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(I,ie,we){return this._calculateTransform(I,ie,we)}touchmove(I,ie,we){if(this._active){if(!this._shouldBePrevented(we.length))return I.preventDefault(),this._calculateTransform(I,ie,we);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",I)}}touchend(I,ie,we){this._calculateTransform(I,ie,we),this._active&&this._shouldBePrevented(we.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(I,ie,we){we.length>0&&(this._active=!0);let Se=Cf(we,ie),Be=new t.P(0,0),dt=new t.P(0,0),St=0;for(let $t in Se){let Tr=Se[$t],Ar=this._touches[$t];Ar&&(Be._add(Tr),dt._add(Tr.sub(Ar)),St++,Se[$t]=Tr)}if(this._touches=Se,this._shouldBePrevented(St)||!dt.mag())return;let Nt=dt.div(St);return this._sum._add(Nt),this._sum.mag()<this._clickTolerance?void 0:{around:Be.div(St),panDelta:Nt}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Cc{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(I,ie,we){this._firstTwoTouches||we.length<2||(this._firstTwoTouches=[we[0].identifier,we[1].identifier],this._start([ie[0],ie[1]]))}touchmove(I,ie,we){if(!this._firstTwoTouches)return;I.preventDefault();let[Se,Be]=this._firstTwoTouches,dt=gc(we,ie,Se),St=gc(we,ie,Be);if(!dt||!St)return;let Nt=this._aroundCenter?null:dt.add(St).div(2);return this._move([dt,St],Nt,I)}touchend(I,ie,we){if(!this._firstTwoTouches)return;let[Se,Be]=this._firstTwoTouches,dt=gc(we,ie,Se),St=gc(we,ie,Be);dt&&St||(this._active&&i.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(I){this._enabled=!0,this._aroundCenter=!!I&&I.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function gc(Ue,I,ie){for(let we=0;we<Ue.length;we++)if(Ue[we].identifier===ie)return I[we]}function ql(Ue,I){return Math.log(Ue/I)/Math.LN2}class xu extends Cc{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(I){this._startDistance=this._distance=I[0].dist(I[1])}_move(I,ie){let we=this._distance;if(this._distance=I[0].dist(I[1]),this._active||!(Math.abs(ql(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:ql(this._distance,we),pinchAround:ie}}}function Lc(Ue,I){return 180*Ue.angleWith(I)/Math.PI}class Jc extends Cc{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(I){this._startVector=this._vector=I[0].sub(I[1]),this._minDiameter=I[0].dist(I[1])}_move(I,ie,we){let Se=this._vector;if(this._vector=I[0].sub(I[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Lc(this._vector,Se),pinchAround:ie}}_isBelowThreshold(I){this._minDiameter=Math.min(this._minDiameter,I.mag());let ie=25/(Math.PI*this._minDiameter)*360,we=Lc(I,this._startVector);return Math.abs(we)<ie}}function sc(Ue){return Math.abs(Ue.y)>Math.abs(Ue.x)}class Pc extends Cc{constructor(I){super(),this._currentTouchCount=0,this._map=I}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(I,ie,we){super.touchstart(I,ie,we),this._currentTouchCount=we.length}_start(I){this._lastPoints=I,sc(I[0].sub(I[1]))&&(this._valid=!1)}_move(I,ie,we){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let Se=I[0].sub(this._lastPoints[0]),Be=I[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Se,Be,we.timeStamp),this._valid?(this._lastPoints=I,this._active=!0,{pitchDelta:(Se.y+Be.y)/2*-.5}):void 0}gestureBeginsVertically(I,ie,we){if(this._valid!==void 0)return this._valid;let Se=I.mag()>=2,Be=ie.mag()>=2;if(!Se&&!Be)return;if(!Se||!Be)return this._firstMove===void 0&&(this._firstMove=we),we-this._firstMove<100&&void 0;let dt=I.y>0==ie.y>0;return sc(I)&&sc(ie)&&dt}}let Qt={panStep:100,bearingStep:15,pitchStep:10};class br{constructor(I){this._tr=new _u(I);let ie=Qt;this._panStep=ie.panStep,this._bearingStep=ie.bearingStep,this._pitchStep=ie.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(I){if(I.altKey||I.ctrlKey||I.metaKey)return;let ie=0,we=0,Se=0,Be=0,dt=0;switch(I.keyCode){case 61:case 107:case 171:case 187:ie=1;break;case 189:case 109:case 173:ie=-1;break;case 37:I.shiftKey?we=-1:(I.preventDefault(),Be=-1);break;case 39:I.shiftKey?we=1:(I.preventDefault(),Be=1);break;case 38:I.shiftKey?Se=1:(I.preventDefault(),dt=-1);break;case 40:I.shiftKey?Se=-1:(I.preventDefault(),dt=1);break;default:return}return this._rotationDisabled&&(we=0,Se=0),{cameraAnimation:St=>{let Nt=this._tr;St.easeTo({duration:300,easeId:"keyboardHandler",easing:aa,zoom:ie?Math.round(Nt.zoom)+ie*(I.shiftKey?2:1):Nt.zoom,bearing:Nt.bearing+we*this._bearingStep,pitch:Nt.pitch+Se*this._pitchStep,offset:[-Be*this._panStep,-dt*this._panStep],center:Nt.center},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function aa(Ue){return Ue*(2-Ue)}let $r=4.000244140625;class ka{constructor(I,ie){this._onTimeout=we=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(we)},this._map=I,this._tr=new _u(I),this._triggerRenderFrame=ie,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(I){this._defaultZoomRate=I}setWheelZoomRate(I){this._wheelZoomRate=I}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(I){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!I&&I.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(I){return!!this._map.cooperativeGestures.isEnabled()&&!(I.ctrlKey||this._map.cooperativeGestures.isBypassed(I))}wheel(I){if(!this.isEnabled())return;if(this._shouldBePrevented(I))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",I);let ie=I.deltaMode===WheelEvent.DOM_DELTA_LINE?40*I.deltaY:I.deltaY,we=n.now(),Se=we-(this._lastWheelEventTime||0);this._lastWheelEventTime=we,ie!==0&&ie%$r==0?this._type="wheel":ie!==0&&Math.abs(ie)<4?this._type="trackpad":Se>400?(this._type=null,this._lastValue=ie,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(Se*ie)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ie+=this._lastValue)),I.shiftKey&&ie&&(ie/=4),this._type&&(this._lastWheelEvent=I,this._delta-=ie,this._active||this._start(I)),I.preventDefault()}_start(I){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let ie=i.mousePos(this._map.getCanvas(),I),we=this._tr;this._around=ie.y>we.transform.height/2-we.transform.getHorizon()?t.N.convert(this._aroundCenter?we.center:we.unproject(ie)):t.N.convert(we.center),this._aroundPoint=we.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let I=this._tr.transform;if(this._delta!==0){let Nt=this._type==="wheel"&&Math.abs(this._delta)>$r?this._wheelZoomRate:this._defaultZoomRate,$t=2/(1+Math.exp(-Math.abs(this._delta*Nt)));this._delta<0&&$t!==0&&($t=1/$t);let Tr=typeof this._targetZoom=="number"?I.zoomScale(this._targetZoom):I.scale;this._targetZoom=Math.min(I.maxZoom,Math.max(I.minZoom,I.scaleZoom(Tr*$t))),this._type==="wheel"&&(this._startZoom=I.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ie=typeof this._targetZoom=="number"?this._targetZoom:I.zoom,we=this._startZoom,Se=this._easing,Be,dt=!1,St=n.now()-this._lastWheelEventTime;if(this._type==="wheel"&&we&&Se&&St){let Nt=Math.min(St/200,1),$t=Se(Nt);Be=t.y.number(we,ie,$t),Nt<1?this._frameId||(this._frameId=!0):dt=!0}else Be=ie,dt=!0;return this._active=!0,dt&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!dt,zoomDelta:Be-I.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(I){let ie=t.b9;if(this._prevEase){let we=this._prevEase,Se=(n.now()-we.start)/we.duration,Be=we.easing(Se+.01)-we.easing(Se),dt=.27/Math.sqrt(Be*Be+1e-4)*.01,St=Math.sqrt(.0729-dt*dt);ie=t.b8(dt,St,.25,1)}return this._prevEase={start:n.now(),duration:I,easing:ie},ie}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class li{constructor(I,ie){this._clickZoom=I,this._tapZoom=ie}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 Ci{constructor(I){this._tr=new _u(I),this.reset()}reset(){this._active=!1}dblclick(I,ie){return I.preventDefault(),{cameraAnimation:we=>{we.easeTo({duration:300,zoom:this._tr.zoom+(I.shiftKey?-1:1),around:this._tr.unproject(ie)},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hi{constructor(){this._tap=new uf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(I,ie,we){if(!this._swipePoint)if(this._tapTime){let Se=ie[0],Be=I.timeStamp-this._tapTime<500,dt=this._tapPoint.dist(Se)<30;Be&&dt?we.length>0&&(this._swipePoint=Se,this._swipeTouch=we[0].identifier):this.reset()}else this._tap.touchstart(I,ie,we)}touchmove(I,ie,we){if(this._tapTime){if(this._swipePoint){if(we[0].identifier!==this._swipeTouch)return;let Se=ie[0],Be=Se.y-this._swipePoint.y;return this._swipePoint=Se,I.preventDefault(),this._active=!0,{zoomDelta:Be/128}}}else this._tap.touchmove(I,ie,we)}touchend(I,ie,we){if(this._tapTime)this._swipePoint&&we.length===0&&this.reset();else{let Se=this._tap.touchend(I,ie,we);Se&&(this._tapTime=I.timeStamp,this._tapPoint=Se)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Qi{constructor(I,ie,we){this._el=I,this._mousePan=ie,this._touchPan=we}enable(I){this._inertiaOptions=I||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class dn{constructor(I,ie,we){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=ie,this._mousePitch=we}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 Pi{constructor(I,ie,we,Se){this._el=I,this._touchZoom=ie,this._touchRotate=we,this._tapDragZoom=Se,this._rotationDisabled=!1,this._enabled=!0}enable(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Di{constructor(I,ie){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=I,this._options=ie,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let I=this._map.getCanvasContainer();I.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",I);let ie=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ie=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let we=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Se=document.createElement("div");Se.className="maplibregl-desktop-message",Se.textContent=ie,this._container.appendChild(Se);let Be=document.createElement("div");Be.className="maplibregl-mobile-message",Be.textContent=we,this._container.appendChild(Be),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(I){return I[this._bypassKey]}notifyGestureBlocked(I,ie){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:I,originalEvent:ie})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let Ni=Ue=>Ue.zoom||Ue.drag||Ue.pitch||Ue.rotate;class mi extends t.k{}function Mn(Ue){return Ue.panDelta&&Ue.panDelta.mag()||Ue.zoomDelta||Ue.bearingDelta||Ue.pitchDelta}class Qn{constructor(I,ie){this.handleWindowEvent=Se=>{this.handleEvent(Se,`${Se.type}Window`)},this.handleEvent=(Se,Be)=>{if(Se.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let dt=Se.type==="renderFrame"?void 0:Se,St={needsRenderFrame:!1},Nt={},$t={},Tr=Se.touches,Ar=Tr?this._getMapTouches(Tr):void 0,Kr=Ar?i.touchPos(this._map.getCanvas(),Ar):i.mousePos(this._map.getCanvas(),Se);for(let{handlerName:Je,handler:lt,allowed:vt}of this._handlers){if(!lt.isEnabled())continue;let Lt;this._blockedByActive($t,vt,Je)?lt.reset():lt[Be||Se.type]&&(Lt=lt[Be||Se.type](Se,Kr,Ar),this.mergeHandlerResult(St,Nt,Lt,Je,dt),Lt&&Lt.needsRenderFrame&&this._triggerRenderFrame()),(Lt||lt.isActive())&&($t[Je]=lt)}let na={};for(let Je in this._previousActiveHandlers)$t[Je]||(na[Je]=dt);this._previousActiveHandlers=$t,(Object.keys(na).length||Mn(St))&&(this._changes.push([St,Nt,na]),this._triggerRenderFrame()),(Object.keys($t).length||Mn(St))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:He}=St;He&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],He(this._map))},this._map=I,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new vf(I),this._bearingSnap=ie.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ie);let we=this._el;this._listeners=[[we,"touchstart",{passive:!0}],[we,"touchmove",{passive:!1}],[we,"touchend",void 0],[we,"touchcancel",void 0],[we,"mousedown",void 0],[we,"mousemove",void 0],[we,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[we,"mouseover",void 0],[we,"mouseout",void 0],[we,"dblclick",void 0],[we,"click",void 0],[we,"keydown",{capture:!1}],[we,"keyup",void 0],[we,"wheel",{passive:!1}],[we,"contextmenu",void 0],[window,"blur",void 0]];for(let[Se,Be,dt]of this._listeners)i.addEventListener(Se,Be,Se===document?this.handleWindowEvent:this.handleEvent,dt)}destroy(){for(let[I,ie,we]of this._listeners)i.removeEventListener(I,ie,I===document?this.handleWindowEvent:this.handleEvent,we)}_addDefaultHandlers(I){let ie=this._map,we=ie.getCanvasContainer();this._add("mapEvent",new mf(ie,I));let Se=ie.boxZoom=new Pu(ie,I);this._add("boxZoom",Se),I.interactive&&I.boxZoom&&Se.enable();let Be=ie.cooperativeGestures=new Di(ie,I.cooperativeGestures);this._add("cooperativeGestures",Be),I.cooperativeGestures&&Be.enable();let dt=new kc(ie),St=new Ci(ie);ie.doubleClickZoom=new li(St,dt),this._add("tapZoom",dt),this._add("clickZoom",St),I.interactive&&I.doubleClickZoom&&ie.doubleClickZoom.enable();let Nt=new Hi;this._add("tapDragZoom",Nt);let $t=ie.touchPitch=new Pc(ie);this._add("touchPitch",$t),I.interactive&&I.touchPitch&&ie.touchPitch.enable(I.touchPitch);let Tr=iu(I),Ar=Vf(I);ie.dragRotate=new dn(I,Tr,Ar),this._add("mouseRotate",Tr,["mousePitch"]),this._add("mousePitch",Ar,["mouseRotate"]),I.interactive&&I.dragRotate&&ie.dragRotate.enable();let Kr=(({enable:Lt,clickTolerance:At})=>{let zt=new Wu({checkCorrectEvent:cr=>i.mouseButton(cr)===0&&!cr.ctrlKey});return new Hu({clickTolerance:At,move:(cr,yr)=>({around:yr,panDelta:yr.sub(cr)}),activateOnStart:!0,moveStateManager:zt,enable:Lt,assignEvents:Lf})})(I),na=new Xu(I,ie);ie.dragPan=new Qi(we,Kr,na),this._add("mousePan",Kr),this._add("touchPan",na,["touchZoom","touchRotate"]),I.interactive&&I.dragPan&&ie.dragPan.enable(I.dragPan);let He=new Jc,Je=new xu;ie.touchZoomRotate=new Pi(we,Je,He,Nt),this._add("touchRotate",He,["touchPan","touchZoom"]),this._add("touchZoom",Je,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ie.touchZoomRotate.enable(I.touchZoomRotate);let lt=ie.scrollZoom=new ka(ie,()=>this._triggerRenderFrame());this._add("scrollZoom",lt,["mousePan"]),I.interactive&&I.scrollZoom&&ie.scrollZoom.enable(I.scrollZoom);let vt=ie.keyboard=new br(ie);this._add("keyboard",vt),I.interactive&&I.keyboard&&ie.keyboard.enable(),this._add("blockableMapEvent",new sl(ie))}_add(I,ie,we){this._handlers.push({handlerName:I,handler:ie,allowed:we}),this._handlersById[I]=ie}stop(I){if(!this._updatingCamera){for(let{handler:ie}of this._handlers)ie.reset();this._inertia.clear(),this._fireEvents({},{},I),this._changes=[]}}isActive(){for(let{handler:I}of this._handlers)if(I.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ni(this._eventsInProgress)||this.isZooming()}_blockedByActive(I,ie,we){for(let Se in I)if(Se!==we&&(!ie||ie.indexOf(Se)<0))return!0;return!1}_getMapTouches(I){let ie=[];for(let we of I)this._el.contains(we.target)&&ie.push(we);return ie}mergeHandlerResult(I,ie,we,Se,Be){if(!we)return;t.e(I,we);let dt={handlerName:Se,originalEvent:we.originalEvent||Be};we.zoomDelta!==void 0&&(ie.zoom=dt),we.panDelta!==void 0&&(ie.drag=dt),we.pitchDelta!==void 0&&(ie.pitch=dt),we.bearingDelta!==void 0&&(ie.rotate=dt)}_applyChanges(){let I={},ie={},we={};for(let[Se,Be,dt]of this._changes)Se.panDelta&&(I.panDelta=(I.panDelta||new t.P(0,0))._add(Se.panDelta)),Se.zoomDelta&&(I.zoomDelta=(I.zoomDelta||0)+Se.zoomDelta),Se.bearingDelta&&(I.bearingDelta=(I.bearingDelta||0)+Se.bearingDelta),Se.pitchDelta&&(I.pitchDelta=(I.pitchDelta||0)+Se.pitchDelta),Se.around!==void 0&&(I.around=Se.around),Se.pinchAround!==void 0&&(I.pinchAround=Se.pinchAround),Se.noInertia&&(I.noInertia=Se.noInertia),t.e(ie,Be),t.e(we,dt);this._updateMapTransform(I,ie,we),this._changes=[]}_updateMapTransform(I,ie,we){let Se=this._map,Be=Se._getTransformForUpdate(),dt=Se.terrain;if(!(Mn(I)||dt&&this._terrainMovement))return this._fireEvents(ie,we,!0);let{panDelta:St,zoomDelta:Nt,bearingDelta:$t,pitchDelta:Tr,around:Ar,pinchAround:Kr}=I;Kr!==void 0&&(Ar=Kr),Se._stop(!0),Ar=Ar||Se.transform.centerPoint;let na=Be.pointLocation(St?Ar.sub(St):Ar);$t&&(Be.bearing+=$t),Tr&&(Be.pitch+=Tr),Nt&&(Be.zoom+=Nt),dt?this._terrainMovement||!ie.drag&&!ie.zoom?ie.drag&&this._terrainMovement?Be.center=Be.pointLocation(Be.centerPoint.sub(St)):Be.setLocationAtPoint(na,Ar):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Be.setLocationAtPoint(na,Ar)):Be.setLocationAtPoint(na,Ar),Se._applyUpdatedTransform(Be),this._map._update(),I.noInertia||this._inertia.record(I),this._fireEvents(ie,we,!0)}_fireEvents(I,ie,we){let Se=Ni(this._eventsInProgress),Be=Ni(I),dt={};for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._eventsInProgress[Ar]||(dt[`${Ar}start`]=Kr),this._eventsInProgress[Ar]=I[Ar]}!Se&&Be&&this._fireEvent("movestart",Be.originalEvent);for(let Ar in dt)this._fireEvent(Ar,dt[Ar]);Be&&this._fireEvent("move",Be.originalEvent);for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._fireEvent(Ar,Kr)}let St={},Nt;for(let Ar in this._eventsInProgress){let{handlerName:Kr,originalEvent:na}=this._eventsInProgress[Ar];this._handlersById[Kr].isActive()||(delete this._eventsInProgress[Ar],Nt=ie[Kr]||na,St[`${Ar}end`]=Nt)}for(let Ar in St)this._fireEvent(Ar,St[Ar]);let $t=Ni(this._eventsInProgress),Tr=(Se||Be)&&!$t;if(Tr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ar=this._map._getTransformForUpdate();Ar.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ar)}if(we&&Tr){this._updatingCamera=!0;let Ar=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Kr=na=>na!==0&&-this._bearingSnap<na&&na<this._bearingSnap;!Ar||!Ar.essential&&n.prefersReducedMotion?(this._map.fire(new t.k("moveend",{originalEvent:Nt})),Kr(this._map.getBearing())&&this._map.resetNorth()):(Kr(Ar.bearing||this._map.getBearing())&&(Ar.bearing=0),Ar.freezeElevation=!0,this._map.easeTo(Ar,{originalEvent:Nt})),this._updatingCamera=!1}}_fireEvent(I,ie){this._map.fire(new t.k(I,ie?{originalEvent:ie}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(I=>{delete this._frameId,this.handleEvent(new mi("renderFrame",{timeStamp:I})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ao extends t.E{constructor(I,ie){super(),this._renderFrameCallback=()=>{let we=Math.min((n.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(we)),we<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=I,this._bearingSnap=ie.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(I,ie){return this.jumpTo({center:I},ie)}panBy(I,ie,we){return I=t.P.convert(I).mult(-1),this.panTo(this.transform.center,t.e({offset:I},ie),we)}panTo(I,ie,we){return this.easeTo(t.e({center:I},ie),we)}getZoom(){return this.transform.zoom}setZoom(I,ie){return this.jumpTo({zoom:I},ie),this}zoomTo(I,ie,we){return this.easeTo(t.e({zoom:I},ie),we)}zoomIn(I,ie){return this.zoomTo(this.getZoom()+1,I,ie),this}zoomOut(I,ie){return this.zoomTo(this.getZoom()-1,I,ie),this}getBearing(){return this.transform.bearing}setBearing(I,ie){return this.jumpTo({bearing:I},ie),this}getPadding(){return this.transform.padding}setPadding(I,ie){return this.jumpTo({padding:I},ie),this}rotateTo(I,ie,we){return this.easeTo(t.e({bearing:I},ie),we)}resetNorth(I,ie){return this.rotateTo(0,t.e({duration:1e3},I),ie),this}resetNorthPitch(I,ie){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},I),ie),this}snapToNorth(I,ie){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(I,ie):this}getPitch(){return this.transform.pitch}setPitch(I,ie){return this.jumpTo({pitch:I},ie),this}cameraForBounds(I,ie){I=re.convert(I).adjustAntiMeridian();let we=ie&&ie.bearing||0;return this._cameraForBoxAndBearing(I.getNorthWest(),I.getSouthEast(),we,ie)}_cameraForBoxAndBearing(I,ie,we,Se){let Be={top:0,bottom:0,right:0,left:0};if(typeof(Se=t.e({padding:Be,offset:[0,0],maxZoom:this.transform.maxZoom},Se)).padding=="number"){let Aa=Se.padding;Se.padding={top:Aa,bottom:Aa,right:Aa,left:Aa}}Se.padding=t.e(Be,Se.padding);let dt=this.transform,St=dt.padding,Nt=new re(I,ie),$t=dt.project(Nt.getNorthWest()),Tr=dt.project(Nt.getNorthEast()),Ar=dt.project(Nt.getSouthEast()),Kr=dt.project(Nt.getSouthWest()),na=t.ba(-we),He=$t.rotate(na),Je=Tr.rotate(na),lt=Ar.rotate(na),vt=Kr.rotate(na),Lt=new t.P(Math.max(He.x,Je.x,vt.x,lt.x),Math.max(He.y,Je.y,vt.y,lt.y)),At=new t.P(Math.min(He.x,Je.x,vt.x,lt.x),Math.min(He.y,Je.y,vt.y,lt.y)),zt=Lt.sub(At),cr=(dt.width-(St.left+St.right+Se.padding.left+Se.padding.right))/zt.x,yr=(dt.height-(St.top+St.bottom+Se.padding.top+Se.padding.bottom))/zt.y;if(yr<0||cr<0)return void t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");let Er=Math.min(dt.scaleZoom(dt.scale*Math.min(cr,yr)),Se.maxZoom),jr=t.P.convert(Se.offset),Qr=new t.P((Se.padding.left-Se.padding.right)/2,(Se.padding.top-Se.padding.bottom)/2).rotate(t.ba(we)),pa=jr.add(Qr).mult(dt.scale/dt.zoomScale(Er));return{center:dt.unproject($t.add(Ar).div(2).sub(pa)),zoom:Er,bearing:we}}fitBounds(I,ie,we){return this._fitInternal(this.cameraForBounds(I,ie),ie,we)}fitScreenCoordinates(I,ie,we,Se,Be){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.P.convert(I)),this.transform.pointLocation(t.P.convert(ie)),we,Se),Se,Be)}_fitInternal(I,ie,we){return I?(delete(ie=t.e(I,ie)).padding,ie.linear?this.easeTo(ie,we):this.flyTo(ie,we)):this}jumpTo(I,ie){this.stop();let we=this._getTransformForUpdate(),Se=!1,Be=!1,dt=!1;return"zoom"in I&&we.zoom!==+I.zoom&&(Se=!0,we.zoom=+I.zoom),I.center!==void 0&&(we.center=t.N.convert(I.center)),"bearing"in I&&we.bearing!==+I.bearing&&(Be=!0,we.bearing=+I.bearing),"pitch"in I&&we.pitch!==+I.pitch&&(dt=!0,we.pitch=+I.pitch),I.padding==null||we.isPaddingEqual(I.padding)||(we.padding=I.padding),this._applyUpdatedTransform(we),this.fire(new t.k("movestart",ie)).fire(new t.k("move",ie)),Se&&this.fire(new t.k("zoomstart",ie)).fire(new t.k("zoom",ie)).fire(new t.k("zoomend",ie)),Be&&this.fire(new t.k("rotatestart",ie)).fire(new t.k("rotate",ie)).fire(new t.k("rotateend",ie)),dt&&this.fire(new t.k("pitchstart",ie)).fire(new t.k("pitch",ie)).fire(new t.k("pitchend",ie)),this.fire(new t.k("moveend",ie))}calculateCameraOptionsFromTo(I,ie,we,Se=0){let Be=t.Z.fromLngLat(I,ie),dt=t.Z.fromLngLat(we,Se),St=dt.x-Be.x,Nt=dt.y-Be.y,$t=dt.z-Be.z,Tr=Math.hypot(St,Nt,$t);if(Tr===0)throw new Error("Can't calculate camera options with same From and To");let Ar=Math.hypot(St,Nt),Kr=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Tr/this.transform.tileSize),na=180*Math.atan2(St,-Nt)/Math.PI,He=180*Math.acos(Ar/Tr)/Math.PI;return He=$t<0?90-He:90+He,{center:dt.toLngLat(),zoom:Kr,pitch:He,bearing:na}}easeTo(I,ie){var we;this._stop(!1,I.easeId),((I=t.e({offset:[0,0],duration:500,easing:t.b9},I)).animate===!1||!I.essential&&n.prefersReducedMotion)&&(I.duration=0);let Se=this._getTransformForUpdate(),Be=Se.zoom,dt=Se.bearing,St=Se.pitch,Nt=Se.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,dt):dt,Tr="pitch"in I?+I.pitch:St,Ar="padding"in I?I.padding:Se.padding,Kr=t.P.convert(I.offset),na=Se.centerPoint.add(Kr),He=Se.pointLocation(na),{center:Je,zoom:lt}=Se.getConstrained(t.N.convert(I.center||He),(we=I.zoom)!==null&&we!==void 0?we:Be);this._normalizeCenter(Je,Se);let vt=Se.project(He),Lt=Se.project(Je).sub(vt),At=Se.zoomScale(lt-Be),zt,cr;I.around&&(zt=t.N.convert(I.around),cr=Se.locationPoint(zt));let yr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||lt!==Be,this._rotating=this._rotating||dt!==$t,this._pitching=this._pitching||Tr!==St,this._padding=!Se.isPaddingEqual(Ar),this._easeId=I.easeId,this._prepareEase(ie,I.noMoveStart,yr),this.terrain&&this._prepareElevation(Je),this._ease(Er=>{if(this._zooming&&(Se.zoom=t.y.number(Be,lt,Er)),this._rotating&&(Se.bearing=t.y.number(dt,$t,Er)),this._pitching&&(Se.pitch=t.y.number(St,Tr,Er)),this._padding&&(Se.interpolatePadding(Nt,Ar,Er),na=Se.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(Er),zt)Se.setLocationAtPoint(zt,cr);else{let jr=Se.zoomScale(Se.zoom-Be),Qr=lt>Be?Math.min(2,At):Math.max(.5,At),pa=Math.pow(Qr,1-Er),Aa=Se.unproject(vt.add(Lt.mult(Er*pa)).mult(jr));Se.setLocationAtPoint(Se.renderWorldCopies?Aa.wrap():Aa,na)}this._applyUpdatedTransform(Se),this._fireMoveEvents(ie)},Er=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie,Er)},I),this}_prepareEase(I,ie,we={}){this._moving=!0,ie||we.moving||this.fire(new t.k("movestart",I)),this._zooming&&!we.zooming&&this.fire(new t.k("zoomstart",I)),this._rotating&&!we.rotating&&this.fire(new t.k("rotatestart",I)),this._pitching&&!we.pitching&&this.fire(new t.k("pitchstart",I))}_prepareElevation(I){this._elevationCenter=I,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(I,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(I){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ie=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(I<1&&ie!==this._elevationTarget){let we=this._elevationTarget-this._elevationStart;this._elevationStart+=I*(we-(ie-(we*I+this._elevationStart))/(1-I)),this._elevationTarget=ie}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,I)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(I){let ie=I.getCameraPosition(),we=this.terrain.getElevationForLngLatZoom(ie.lngLat,I.zoom);if(ie.altitude<we){let Se=this.calculateCameraOptionsFromTo(ie.lngLat,we,I.center,I.elevation);return{pitch:Se.pitch,zoom:Se.zoom}}return{}}_applyUpdatedTransform(I){let ie=[];if(this.terrain&&ie.push(Se=>this._elevateCameraIfInsideTerrain(Se)),this.transformCameraUpdate&&ie.push(Se=>this.transformCameraUpdate(Se)),!ie.length)return;let we=I.clone();for(let Se of ie){let Be=we.clone(),{center:dt,zoom:St,pitch:Nt,bearing:$t,elevation:Tr}=Se(Be);dt&&(Be.center=dt),St!==void 0&&(Be.zoom=St),Nt!==void 0&&(Be.pitch=Nt),$t!==void 0&&(Be.bearing=$t),Tr!==void 0&&(Be.elevation=Tr),we.apply(Be)}this.transform.apply(we)}_fireMoveEvents(I){this.fire(new t.k("move",I)),this._zooming&&this.fire(new t.k("zoom",I)),this._rotating&&this.fire(new t.k("rotate",I)),this._pitching&&this.fire(new t.k("pitch",I))}_afterEase(I,ie){if(this._easeId&&ie&&this._easeId===ie)return;delete this._easeId;let we=this._zooming,Se=this._rotating,Be=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,we&&this.fire(new t.k("zoomend",I)),Se&&this.fire(new t.k("rotateend",I)),Be&&this.fire(new t.k("pitchend",I)),this.fire(new t.k("moveend",I))}flyTo(I,ie){var we;if(!I.essential&&n.prefersReducedMotion){let nn=t.M(I,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nn,ie)}this.stop(),I=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},I);let Se=this._getTransformForUpdate(),Be=Se.zoom,dt=Se.bearing,St=Se.pitch,Nt=Se.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,dt):dt,Tr="pitch"in I?+I.pitch:St,Ar="padding"in I?I.padding:Se.padding,Kr=t.P.convert(I.offset),na=Se.centerPoint.add(Kr),He=Se.pointLocation(na),{center:Je,zoom:lt}=Se.getConstrained(t.N.convert(I.center||He),(we=I.zoom)!==null&&we!==void 0?we:Be);this._normalizeCenter(Je,Se);let vt=Se.zoomScale(lt-Be),Lt=Se.project(He),At=Se.project(Je).sub(Lt),zt=I.curve,cr=Math.max(Se.width,Se.height),yr=cr/vt,Er=At.mag();if("minZoom"in I){let nn=t.ac(Math.min(I.minZoom,Be,lt),Se.minZoom,Se.maxZoom),Sn=cr/Se.zoomScale(nn-Be);zt=Math.sqrt(Sn/Er*2)}let jr=zt*zt;function Qr(nn){let Sn=(yr*yr-cr*cr+(nn?-1:1)*jr*jr*Er*Er)/(2*(nn?yr:cr)*jr*Er);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}function pa(nn){return(Math.exp(nn)-Math.exp(-nn))/2}function Aa(nn){return(Math.exp(nn)+Math.exp(-nn))/2}let za=Qr(!1),ci=function(nn){return Aa(za)/Aa(za+zt*nn)},Vi=function(nn){return cr*((Aa(za)*(pa(Sn=za+zt*nn)/Aa(Sn))-pa(za))/jr)/Er;var Sn},ji=(Qr(!0)-za)/zt;if(Math.abs(Er)<1e-6||!isFinite(ji)){if(Math.abs(cr-yr)<1e-6)return this.easeTo(I,ie);let nn=yr<cr?-1:1;ji=Math.abs(Math.log(yr/cr))/zt,Vi=()=>0,ci=Sn=>Math.exp(nn*zt*Sn)}return I.duration="duration"in I?+I.duration:1e3*ji/("screenSpeed"in I?+I.screenSpeed/zt:+I.speed),I.maxDuration&&I.duration>I.maxDuration&&(I.duration=0),this._zooming=!0,this._rotating=dt!==$t,this._pitching=Tr!==St,this._padding=!Se.isPaddingEqual(Ar),this._prepareEase(ie,!1),this.terrain&&this._prepareElevation(Je),this._ease(nn=>{let Sn=nn*ji,Kn=1/ci(Sn);Se.zoom=nn===1?lt:Be+Se.scaleZoom(Kn),this._rotating&&(Se.bearing=t.y.number(dt,$t,nn)),this._pitching&&(Se.pitch=t.y.number(St,Tr,nn)),this._padding&&(Se.interpolatePadding(Nt,Ar,nn),na=Se.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(nn);let Bn=nn===1?Je:Se.unproject(Lt.add(At.mult(Vi(Sn))).mult(Kn));Se.setLocationAtPoint(Se.renderWorldCopies?Bn.wrap():Bn,na),this._applyUpdatedTransform(Se),this._fireMoveEvents(ie)},()=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie)},I),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(I,ie){var we;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let Se=this._onEaseEnd;delete this._onEaseEnd,Se.call(this,ie)}return I||(we=this.handlers)===null||we===void 0||we.stop(!1),this}_ease(I,ie,we){we.animate===!1||we.duration===0?(I(1),ie()):(this._easeStart=n.now(),this._easeOptions=we,this._onEaseFrame=I,this._onEaseEnd=ie,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(I,ie){I=t.b3(I,-180,180);let we=Math.abs(I-ie);return Math.abs(I-360-ie)<we&&(I-=360),Math.abs(I+360-ie)<we&&(I+=360),I}_normalizeCenter(I,ie){if(!ie.renderWorldCopies||ie.lngRange)return;let we=I.lng-ie.center.lng;I.lng+=we>180?-360:we<-180?360:0}queryTerrainElevation(I){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(I),this.transform.tileZoom)-this.transform.elevation:null}}let eo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class fo{constructor(I=eo){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=ie=>{!ie||ie.sourceDataType!=="metadata"&&ie.sourceDataType!=="visibility"&&ie.dataType!=="style"&&ie.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=I}getDefaultPosition(){return"bottom-right"}onAdd(I){return this._map=I,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.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(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(I,ie){let we=this._map._getUIString(`AttributionControl.${ie}`);I.title=we,I.setAttribute("aria-label",we)}_updateAttributions(){if(!this._map.style)return;let I=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?I=I.concat(this.options.customAttribution.map(Se=>typeof Se!="string"?"":Se)):typeof this.options.customAttribution=="string"&&I.push(this.options.customAttribution)),this._map.style.stylesheet){let Se=this._map.style.stylesheet;this.styleOwner=Se.owner,this.styleId=Se.id}let ie=this._map.style.sourceCaches;for(let Se in ie){let Be=ie[Se];if(Be.used||Be.usedForTerrain){let dt=Be.getSource();dt.attribution&&I.indexOf(dt.attribution)<0&&I.push(dt.attribution)}}I=I.filter(Se=>String(Se).trim()),I.sort((Se,Be)=>Se.length-Be.length),I=I.filter((Se,Be)=>{for(let dt=Be+1;dt<I.length;dt++)if(I[dt].indexOf(Se)>=0)return!1;return!0});let we=I.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,I.length?(this._innerContainer.innerHTML=we,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class An{constructor(I={}){this._updateCompact=()=>{let ie=this._container.children;if(ie.length){let we=ie[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&we.classList.add("maplibregl-compact"):we.classList.remove("maplibregl-compact")}},this.options=I}getDefaultPosition(){return"bottom-left"}onAdd(I){this._map=I,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let ie=i.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class un{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(I){let ie=++this._id;return this._queue.push({callback:I,id:ie,cancelled:!1}),ie}remove(I){let ie=this._currentlyRunning,we=ie?this._queue.concat(ie):this._queue;for(let Se of we)if(Se.id===I)return void(Se.cancelled=!0)}run(I=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ie=this._currentlyRunning=this._queue;this._queue=[];for(let we of ie)if(!we.cancelled&&(we.callback(I),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var yo=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Ko extends t.E{constructor(I){super(),this.sourceCache=I,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,I.usedForTerrain=!0,I.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(I,ie){this.sourceCache.update(I,ie),this._renderableTilesKeys=[];let we={};for(let Se of I.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ie}))we[Se.key]=!0,this._renderableTilesKeys.push(Se.key),this._tiles[Se.key]||(Se.posMatrix=new Float64Array(16),t.aP(Se.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Se.key]=new ot(Se,this.tileSize));for(let Se in this._tiles)we[Se]||delete this._tiles[Se]}freeRtt(I){for(let ie in this._tiles){let we=this._tiles[ie];(!I||we.tileID.equals(I)||we.tileID.isChildOf(I)||I.isChildOf(we.tileID))&&(we.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(I=>this.getTileByID(I))}getTileByID(I){return this._tiles[I]}getTerrainCoords(I){let ie={};for(let we of this._renderableTilesKeys){let Se=this._tiles[we].tileID;if(Se.canonical.equals(I.canonical)){let Be=I.clone();Be.posMatrix=new Float64Array(16),t.aP(Be.posMatrix,0,t.X,0,t.X,0,1),ie[we]=Be}else if(Se.canonical.isChildOf(I.canonical)){let Be=I.clone();Be.posMatrix=new Float64Array(16);let dt=Se.canonical.z-I.canonical.z,St=Se.canonical.x-(Se.canonical.x>>dt<<dt),Nt=Se.canonical.y-(Se.canonical.y>>dt<<dt),$t=t.X>>dt;t.aP(Be.posMatrix,0,$t,0,$t,0,1),t.J(Be.posMatrix,Be.posMatrix,[-St*$t,-Nt*$t,0]),ie[we]=Be}else if(I.canonical.isChildOf(Se.canonical)){let Be=I.clone();Be.posMatrix=new Float64Array(16);let dt=I.canonical.z-Se.canonical.z,St=I.canonical.x-(I.canonical.x>>dt<<dt),Nt=I.canonical.y-(I.canonical.y>>dt<<dt),$t=t.X>>dt;t.aP(Be.posMatrix,0,t.X,0,t.X,0,1),t.J(Be.posMatrix,Be.posMatrix,[St*$t,Nt*$t,0]),t.K(Be.posMatrix,Be.posMatrix,[1/2**dt,1/2**dt,0]),ie[we]=Be}}return ie}getSourceTile(I,ie){let we=this.sourceCache._source,Se=I.overscaledZ-this.deltaZoom;if(Se>we.maxzoom&&(Se=we.maxzoom),Se<we.minzoom)return null;this._sourceTileCache[I.key]||(this._sourceTileCache[I.key]=I.scaledTo(Se).key);let Be=this.sourceCache.getTileByID(this._sourceTileCache[I.key]);if((!Be||!Be.dem)&&ie)for(;Se>=we.minzoom&&(!Be||!Be.dem);)Be=this.sourceCache.getTileByID(I.scaledTo(Se--).key);return Be}tilesAfterTime(I=Date.now()){return Object.values(this._tiles).filter(ie=>ie.timeAdded>=I)}}class Ss{constructor(I,ie,we){this.painter=I,this.sourceCache=new Ko(ie),this.options=we,this.exaggeration=typeof we.exaggeration=="number"?we.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(I,ie,we,Se=t.X){var Be;if(!(ie>=0&&ie<Se&&we>=0&&we<Se))return 0;let dt=this.getTerrainData(I),St=(Be=dt.tile)===null||Be===void 0?void 0:Be.dem;if(!St)return 0;let Nt=function(He,Je,lt){var vt=Je[0],Lt=Je[1];return He[0]=lt[0]*vt+lt[4]*Lt+lt[12],He[1]=lt[1]*vt+lt[5]*Lt+lt[13],He}([],[ie/Se*t.X,we/Se*t.X],dt.u_terrain_matrix),$t=[Nt[0]*St.dim,Nt[1]*St.dim],Tr=Math.floor($t[0]),Ar=Math.floor($t[1]),Kr=$t[0]-Tr,na=$t[1]-Ar;return St.get(Tr,Ar)*(1-Kr)*(1-na)+St.get(Tr+1,Ar)*Kr*(1-na)+St.get(Tr,Ar+1)*(1-Kr)*na+St.get(Tr+1,Ar+1)*Kr*na}getElevationForLngLatZoom(I,ie){if(!t.bb(ie,I.wrap()))return 0;let{tileID:we,mercatorX:Se,mercatorY:Be}=this._getOverscaledTileIDFromLngLatZoom(I,ie);return this.getElevation(we,Se%t.X,Be%t.X,t.X)}getElevation(I,ie,we,Se=t.X){return this.getDEMElevation(I,ie,we,Se)*this.exaggeration}getTerrainData(I){if(!this._emptyDemTexture){let Se=this.painter.context,Be=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new u(Se,Be,Se.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new u(Se,new t.R({width:1,height:1}),Se.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.an([])}let ie=this.sourceCache.getSourceTile(I,!0);if(ie&&ie.dem&&(!ie.demTexture||ie.needsTerrainPrepare)){let Se=this.painter.context;ie.demTexture=this.painter.getTileTexture(ie.dem.stride),ie.demTexture?ie.demTexture.update(ie.dem.getPixels(),{premultiply:!1}):ie.demTexture=new u(Se,ie.dem.getPixels(),Se.gl.RGBA,{premultiply:!1}),ie.demTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),ie.needsTerrainPrepare=!1}let we=ie&&ie+ie.tileID.key+I.key;if(we&&!this._demMatrixCache[we]){let Se=this.sourceCache.sourceCache._source.maxzoom,Be=I.canonical.z-ie.tileID.canonical.z;I.overscaledZ>I.canonical.z&&(I.canonical.z>=Se?Be=I.canonical.z-Se:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let dt=I.canonical.x-(I.canonical.x>>Be<<Be),St=I.canonical.y-(I.canonical.y>>Be<<Be),Nt=t.bc(new Float64Array(16),[1/(t.X<<Be),1/(t.X<<Be),0]);t.J(Nt,Nt,[dt*t.X,St*t.X,0]),this._demMatrixCache[I.key]={matrix:Nt,coord:I}}return{u_depth:2,u_terrain:3,u_terrain_dim:ie&&ie.dem&&ie.dem.dim||1,u_terrain_matrix:we?this._demMatrixCache[I.key].matrix:this._emptyDemMatrix,u_terrain_unpack:ie&&ie.dem&&ie.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(ie&&ie.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:ie}}getFramebuffer(I){let ie=this.painter,we=ie.width/devicePixelRatio,Se=ie.height/devicePixelRatio;return!this._fbo||this._fbo.width===we&&this._fbo.height===Se||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new u(ie.context,{width:we,height:Se,data:null},ie.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(ie.context.gl.NEAREST,ie.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new u(ie.context,{width:we,height:Se,data:null},ie.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(ie.context.gl.NEAREST,ie.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=ie.context.createFramebuffer(we,Se,!0,!1),this._fbo.depthAttachment.set(ie.context.createRenderbuffer(ie.context.gl.DEPTH_COMPONENT16,we,Se))),this._fbo.colorAttachment.set(I==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let I=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let ie=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let Be=0,dt=0;Be<this._coordsTextureSize;Be++)for(let St=0;St<this._coordsTextureSize;St++,dt+=4)ie[dt+0]=255&St,ie[dt+1]=255&Be,ie[dt+2]=St>>8<<4|Be>>8,ie[dt+3]=0;let we=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ie.buffer)),Se=new u(I,we,I.gl.RGBA,{premultiply:!1});return Se.bind(I.gl.NEAREST,I.gl.CLAMP_TO_EDGE),this._coordsTexture=Se,Se}pointCoordinate(I){this.painter.maybeDrawDepthAndCoords(!0);let ie=new Uint8Array(4),we=this.painter.context,Se=we.gl,Be=Math.round(I.x*this.painter.pixelRatio/devicePixelRatio),dt=Math.round(I.y*this.painter.pixelRatio/devicePixelRatio),St=Math.round(this.painter.height/devicePixelRatio);we.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Se.readPixels(Be,St-dt-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ie),we.bindFramebuffer.set(null);let Nt=ie[0]+(ie[2]>>4<<8),$t=ie[1]+((15&ie[2])<<8),Tr=this.coordsIndex[255-ie[3]],Ar=Tr&&this.sourceCache.getTileByID(Tr);if(!Ar)return null;let Kr=this._coordsTextureSize,na=(1<<Ar.tileID.canonical.z)*Kr;return new t.Z((Ar.tileID.canonical.x*Kr+Nt)/na+Ar.tileID.wrap,(Ar.tileID.canonical.y*Kr+$t)/na,this.getElevation(Ar.tileID,Nt,$t,Kr))}depthAtPoint(I){let ie=new Uint8Array(4),we=this.painter.context,Se=we.gl;return we.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Se.readPixels(I.x,this.painter.height/devicePixelRatio-I.y-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ie),we.bindFramebuffer.set(null),(ie[0]/16777216+ie[1]/65536+ie[2]/256+ie[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;let I=this.painter.context,ie=new t.bd,we=new t.aY,Se=this.meshSize,Be=t.X/Se,dt=Se*Se;for(let Ar=0;Ar<=Se;Ar++)for(let Kr=0;Kr<=Se;Kr++)ie.emplaceBack(Kr*Be,Ar*Be,0);for(let Ar=0;Ar<dt;Ar+=Se+1)for(let Kr=0;Kr<Se;Kr++)we.emplaceBack(Kr+Ar,Se+Kr+Ar+1,Se+Kr+Ar+2),we.emplaceBack(Kr+Ar,Se+Kr+Ar+2,Kr+Ar+1);let St=ie.length,Nt=St+2*(Se+1);for(let Ar of[0,1])for(let Kr=0;Kr<=Se;Kr++)for(let na of[0,1])ie.emplaceBack(Kr*Be,Ar*t.X,na);for(let Ar=0;Ar<2*Se;Ar+=2)we.emplaceBack(Nt+Ar,Nt+Ar+1,Nt+Ar+3),we.emplaceBack(Nt+Ar,Nt+Ar+3,Nt+Ar+2),we.emplaceBack(St+Ar,St+Ar+3,St+Ar+1),we.emplaceBack(St+Ar,St+Ar+2,St+Ar+3);let $t=ie.length,Tr=$t+2*(Se+1);for(let Ar of[0,1])for(let Kr=0;Kr<=Se;Kr++)for(let na of[0,1])ie.emplaceBack(Ar*t.X,Kr*Be,na);for(let Ar=0;Ar<2*Se;Ar+=2)we.emplaceBack($t+Ar,$t+Ar+1,$t+Ar+3),we.emplaceBack($t+Ar,$t+Ar+3,$t+Ar+2),we.emplaceBack(Tr+Ar,Tr+Ar+3,Tr+Ar+1),we.emplaceBack(Tr+Ar,Tr+Ar+2,Tr+Ar+3);return this._mesh=new Lu(I.createVertexBuffer(ie,yo.members),I.createIndexBuffer(we),t.a0.simpleSegment(0,0,ie.length,we.length)),this._mesh}getMeshFrameDelta(I){return 2*Math.PI*t.be/Math.pow(2,I)/5}getMinTileElevationForLngLatZoom(I,ie){var we;let{tileID:Se}=this._getOverscaledTileIDFromLngLatZoom(I,ie);return(we=this.getMinMaxElevation(Se).minElevation)!==null&&we!==void 0?we:0}getMinMaxElevation(I){let ie=this.getTerrainData(I).tile,we={minElevation:null,maxElevation:null};return ie&&ie.dem&&(we.minElevation=ie.dem.min*this.exaggeration,we.maxElevation=ie.dem.max*this.exaggeration),we}_getOverscaledTileIDFromLngLatZoom(I,ie){let we=t.Z.fromLngLat(I.wrap()),Se=(1<<ie)*t.X,Be=we.x*Se,dt=we.y*Se,St=Math.floor(Be/t.X),Nt=Math.floor(dt/t.X);return{tileID:new t.S(ie,0,ie,St,Nt),mercatorX:Be,mercatorY:dt}}}class rl{constructor(I,ie,we){this._context=I,this._size=ie,this._tileSize=we,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let I of this._objects)I.texture.destroy(),I.fbo.destroy()}_createObject(I){let ie=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),we=new u(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return we.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),ie.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),ie.colorAttachment.set(we.texture),{id:I,fbo:ie,texture:we,stamp:-1,inUse:!1}}getObjectForId(I){return this._objects[I]}useObject(I){I.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(ie=>I.id!==ie),this._recentlyUsed.push(I.id)}stampObject(I){I.stamp=++this._stamp}getOrCreateFreeObject(){for(let ie of this._recentlyUsed)if(!this._objects[ie].inUse)return this._objects[ie];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let I=this._createObject(this._objects.length);return this._objects.push(I),I}freeObject(I){I.inUse=!1}freeAllObjects(){for(let I of this._objects)this.freeObject(I)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(I=>!I.inUse)===!1}}let Os={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class el{constructor(I,ie){this.painter=I,this.terrain=ie,this.pool=new rl(I.context,30,ie.sourceCache.tileSize*ie.qualityFactor)}destruct(){this.pool.destruct()}getTexture(I){return this.pool.getObjectForId(I.rtt[this._stacks.length-1].id).texture}prepareForRender(I,ie){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=I._order.filter(we=>!I._layers[we].isHidden(ie)),this._coordsDescendingInv={};for(let we in I.sourceCaches){this._coordsDescendingInv[we]={};let Se=I.sourceCaches[we].getVisibleCoordinates();for(let Be of Se){let dt=this.terrain.sourceCache.getTerrainCoords(Be);for(let St in dt)this._coordsDescendingInv[we][St]||(this._coordsDescendingInv[we][St]=[]),this._coordsDescendingInv[we][St].push(dt[St])}}this._coordsDescendingInvStr={};for(let we of I._order){let Se=I._layers[we],Be=Se.source;if(Os[Se.type]&&!this._coordsDescendingInvStr[Be]){this._coordsDescendingInvStr[Be]={};for(let dt in this._coordsDescendingInv[Be])this._coordsDescendingInvStr[Be][dt]=this._coordsDescendingInv[Be][dt].map(St=>St.key).sort().join()}}for(let we of this._renderableTiles)for(let Se in this._coordsDescendingInvStr){let Be=this._coordsDescendingInvStr[Se][we.tileID.key];Be&&Be!==we.rttCoords[Se]&&(we.rtt=[])}}renderLayer(I){if(I.isHidden(this.painter.transform.zoom))return!1;let ie=I.type,we=this.painter,Se=this._renderableLayerIds[this._renderableLayerIds.length-1]===I.id;if(Os[ie]&&(this._prevType&&Os[this._prevType]||this._stacks.push([]),this._prevType=ie,this._stacks[this._stacks.length-1].push(I.id),!Se))return!0;if(Os[this._prevType]||Os[ie]&&Se){this._prevType=ie;let Be=this._stacks.length-1,dt=this._stacks[Be]||[];for(let St of this._renderableTiles){if(this.pool.isFull()&&(yl(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(St),St.rtt[Be]){let $t=this.pool.getObjectForId(St.rtt[Be].id);if($t.stamp===St.rtt[Be].stamp){this.pool.useObject($t);continue}}let Nt=this.pool.getOrCreateFreeObject();this.pool.useObject(Nt),this.pool.stampObject(Nt),St.rtt[Be]={id:Nt.id,stamp:Nt.stamp},we.context.bindFramebuffer.set(Nt.fbo.framebuffer),we.context.clear({color:t.aM.transparent,stencil:0}),we.currentStencilSource=void 0;for(let $t=0;$t<dt.length;$t++){let Tr=we.style._layers[dt[$t]],Ar=Tr.source?this._coordsDescendingInv[Tr.source][St.tileID.key]:[St.tileID];we.context.viewport.set([0,0,Nt.fbo.width,Nt.fbo.height]),we._renderTileClippingMasks(Tr,Ar),we.renderLayer(we,we.style.sourceCaches[Tr.source],Tr,Ar),Tr.source&&(St.rttCoords[Tr.source]=this._coordsDescendingInvStr[Tr.source][St.tileID.key])}}return yl(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Os[ie]}return!1}}let bs={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Fl=r,_l={hash:!1,interactive:!0,bearingSnap:7,attributionControl:eo,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:t.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},ll=Ue=>{Ue.touchstart=Ue.dragStart,Ue.touchmoveWindow=Ue.dragMove,Ue.touchend=Ue.dragEnd},Un={showCompass:!0,showZoom:!0,visualizePitch:!1};class Lo{constructor(I,ie,we=!1){this.mousedown=dt=>{this.startMouse(t.e({},dt,{ctrlKey:!0,preventDefault:()=>dt.preventDefault()}),i.mousePos(this.element,dt)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=dt=>{this.moveMouse(dt,i.mousePos(this.element,dt))},this.mouseup=dt=>{this.mouseRotate.dragEnd(dt),this.mousePitch&&this.mousePitch.dragEnd(dt),this.offTemp()},this.touchstart=dt=>{dt.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,dt.targetTouches)[0],this.startTouch(dt,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=dt=>{dt.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,dt.targetTouches)[0],this.moveTouch(dt,this._lastPos))},this.touchend=dt=>{dt.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let Se=I.dragRotate._mouseRotate.getClickTolerance(),Be=I.dragRotate._mousePitch.getClickTolerance();this.element=ie,this.mouseRotate=iu({clickTolerance:Se,enable:!0}),this.touchRotate=(({enable:dt,clickTolerance:St,bearingDegreesPerPixelMoved:Nt=.8})=>{let $t=new Kc;return new Hu({clickTolerance:St,move:(Tr,Ar)=>({bearingDelta:(Ar.x-Tr.x)*Nt}),moveStateManager:$t,enable:dt,assignEvents:ll})})({clickTolerance:Se,enable:!0}),this.map=I,we&&(this.mousePitch=Vf({clickTolerance:Be,enable:!0}),this.touchPitch=(({enable:dt,clickTolerance:St,pitchDegreesPerPixelMoved:Nt=-.5})=>{let $t=new Kc;return new Hu({clickTolerance:St,move:(Tr,Ar)=>({pitchDelta:(Ar.y-Tr.y)*Nt}),moveStateManager:$t,enable:dt,assignEvents:ll})})({clickTolerance:Be,enable:!0})),i.addEventListener(ie,"mousedown",this.mousedown),i.addEventListener(ie,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(ie,"touchcancel",this.reset)}startMouse(I,ie){this.mouseRotate.dragStart(I,ie),this.mousePitch&&this.mousePitch.dragStart(I,ie),i.disableDrag()}startTouch(I,ie){this.touchRotate.dragStart(I,ie),this.touchPitch&&this.touchPitch.dragStart(I,ie),i.disableDrag()}moveMouse(I,ie){let we=this.map,{bearingDelta:Se}=this.mouseRotate.dragMove(I,ie)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.mousePitch){let{pitchDelta:Be}=this.mousePitch.dragMove(I,ie)||{};Be&&we.setPitch(we.getPitch()+Be)}}moveTouch(I,ie){let we=this.map,{bearingDelta:Se}=this.touchRotate.dragMove(I,ie)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.touchPitch){let{pitchDelta:Be}=this.touchPitch.dragMove(I,ie)||{};Be&&we.setPitch(we.getPitch()+Be)}}off(){let I=this.element;i.removeEventListener(I,"mousedown",this.mousedown),i.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(I,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let Js;function Rs(Ue,I,ie){let we=new t.N(Ue.lng,Ue.lat);if(Ue=new t.N(Ue.lng,Ue.lat),I){let Se=new t.N(Ue.lng-360,Ue.lat),Be=new t.N(Ue.lng+360,Ue.lat),dt=ie.locationPoint(Ue).distSqr(I);ie.locationPoint(Se).distSqr(I)<dt?Ue=Se:ie.locationPoint(Be).distSqr(I)<dt&&(Ue=Be)}for(;Math.abs(Ue.lng-ie.center.lng)>180;){let Se=ie.locationPoint(Ue);if(Se.x>=0&&Se.y>=0&&Se.x<=ie.width&&Se.y<=ie.height)break;Ue.lng>ie.center.lng?Ue.lng-=360:Ue.lng+=360}return Ue.lng!==we.lng&&ie.locationPoint(Ue).y>ie.height/2-ie.getHorizon()?Ue:we}let uu={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 Iu(Ue,I,ie){let we=Ue.classList;for(let Se in uu)we.remove(`maplibregl-${ie}-anchor-${Se}`);we.add(`maplibregl-${ie}-anchor-${I}`)}class Zu extends t.E{constructor(I){if(super(),this._onKeyPress=ie=>{let we=ie.code,Se=ie.charCode||ie.keyCode;we!=="Space"&&we!=="Enter"&&Se!==32&&Se!==13||this.togglePopup()},this._onMapClick=ie=>{let we=ie.originalEvent.target,Se=this._element;this._popup&&(we===Se||Se.contains(we))&&this.togglePopup()},this._update=ie=>{var we;if(!this._map)return;let Se=this._map.loaded()&&!this._map.isMoving();(ie?.type==="terrain"||ie?.type==="render"&&!Se)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Rs(this._lngLat,this._flatPos,this._map.transform):(we=this._lngLat)===null||we===void 0?void 0:we.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Be="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Be=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Be=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let dt="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?dt="rotateX(0deg)":this._pitchAlignment==="map"&&(dt=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ie&&ie.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${uu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${dt} ${Be}`),n.frameAsync(new AbortController).then(()=>{this._updateOpacity(ie&&ie.type==="moveend")}).catch(()=>{})},this._onMove=ie=>{if(!this._isDragging){let we=this._clickTolerance||this._map._clickTolerance;this._isDragging=ie.point.dist(this._pointerdownPos)>=we}this._isDragging&&(this._pos=ie.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 t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.k("dragend")),this._state="inactive"},this._addDragHandler=ie=>{this._element.contains(ie.originalEvent.target)&&(ie.preventDefault(),this._positionDelta=ie.point.sub(this._pos).add(this._offset),this._pointerdownPos=ie.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=I&&I.anchor||"center",this._color=I&&I.color||"#3FB1CE",this._scale=I&&I.scale||1,this._draggable=I&&I.draggable||!1,this._clickTolerance=I&&I.clickTolerance||0,this._subpixelPositioning=I&&I.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=I&&I.rotation||0,this._rotationAlignment=I&&I.rotationAlignment||"auto",this._pitchAlignment=I&&I.pitchAlignment&&I.pitchAlignment!=="auto"?I.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(I?.opacity,I?.opacityWhenCovered),I&&I.element)this._element=I.element,this._offset=t.P.convert(I&&I.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let ie=i.createNS("http://www.w3.org/2000/svg","svg"),we=41,Se=27;ie.setAttributeNS(null,"display","block"),ie.setAttributeNS(null,"height",`${we}px`),ie.setAttributeNS(null,"width",`${Se}px`),ie.setAttributeNS(null,"viewBox",`0 0 ${Se} ${we}`);let Be=i.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"stroke","none"),Be.setAttributeNS(null,"stroke-width","1"),Be.setAttributeNS(null,"fill","none"),Be.setAttributeNS(null,"fill-rule","evenodd");let dt=i.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"fill-rule","nonzero");let St=i.createNS("http://www.w3.org/2000/svg","g");St.setAttributeNS(null,"transform","translate(3.0, 29.0)"),St.setAttributeNS(null,"fill","#000000");let Nt=[{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(let vt of Nt){let Lt=i.createNS("http://www.w3.org/2000/svg","ellipse");Lt.setAttributeNS(null,"opacity","0.04"),Lt.setAttributeNS(null,"cx","10.5"),Lt.setAttributeNS(null,"cy","5.80029008"),Lt.setAttributeNS(null,"rx",vt.rx),Lt.setAttributeNS(null,"ry",vt.ry),St.appendChild(Lt)}let $t=i.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"fill",this._color);let Tr=i.createNS("http://www.w3.org/2000/svg","path");Tr.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"),$t.appendChild(Tr);let Ar=i.createNS("http://www.w3.org/2000/svg","g");Ar.setAttributeNS(null,"opacity","0.25"),Ar.setAttributeNS(null,"fill","#000000");let Kr=i.createNS("http://www.w3.org/2000/svg","path");Kr.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"),Ar.appendChild(Kr);let na=i.createNS("http://www.w3.org/2000/svg","g");na.setAttributeNS(null,"transform","translate(6.0, 7.0)"),na.setAttributeNS(null,"fill","#FFFFFF");let He=i.createNS("http://www.w3.org/2000/svg","g");He.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Je=i.createNS("http://www.w3.org/2000/svg","circle");Je.setAttributeNS(null,"fill","#000000"),Je.setAttributeNS(null,"opacity","0.25"),Je.setAttributeNS(null,"cx","5.5"),Je.setAttributeNS(null,"cy","5.5"),Je.setAttributeNS(null,"r","5.4999962");let lt=i.createNS("http://www.w3.org/2000/svg","circle");lt.setAttributeNS(null,"fill","#FFFFFF"),lt.setAttributeNS(null,"cx","5.5"),lt.setAttributeNS(null,"cy","5.5"),lt.setAttributeNS(null,"r","5.4999962"),He.appendChild(Je),He.appendChild(lt),dt.appendChild(St),dt.appendChild($t),dt.appendChild(Ar),dt.appendChild(na),dt.appendChild(He),ie.appendChild(dt),ie.setAttributeNS(null,"height",we*this._scale+"px"),ie.setAttributeNS(null,"width",Se*this._scale+"px"),this._element.appendChild(ie),this._offset=t.P.convert(I&&I.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ie=>{ie.preventDefault()}),this._element.addEventListener("mousedown",ie=>{ie.preventDefault()}),Iu(this._element,this._anchor,"marker"),I&&I.className)for(let ie of I.className.split(" "))this._element.classList.add(ie);this._popup=null}addTo(I){return this.remove(),this._map=I,this._element.setAttribute("aria-label",I._getUIString("Marker.Title")),I.getCanvasContainer().appendChild(this._element),I.on("move",this._update),I.on("moveend",this._update),I.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(I){return this._lngLat=t.N.convert(I),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(I){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),I){if(!("offset"in I.options)){let Se=Math.abs(13.5)/Math.SQRT2;I.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Se,-1*(38.1-13.5+Se)],"bottom-right":[-Se,-1*(38.1-13.5+Se)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=I,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(I){return this._subpixelPositioning=I,this}getPopup(){return this._popup}togglePopup(){let I=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:I?(I.isOpen()?I.remove():(I.setLngLat(this._lngLat),I.addTo(this._map)),this):this}_updateOpacity(I=!1){var ie,we;if(!(!((ie=this._map)===null||ie===void 0)&&ie.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(I)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Se=this._map,Be=Se.terrain.depthAtPoint(this._pos),dt=Se.terrain.getElevationForLngLatZoom(this._lngLat,Se.transform.tileZoom);if(Se.transform.lngLatToCameraDepth(this._lngLat,dt)-Be<.006)return void(this._element.style.opacity=this._opacity);let St=-this._offset.y/Se.transform._pixelPerMeter,Nt=Math.sin(Se.getPitch()*Math.PI/180)*St,$t=Se.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),Tr=Se.transform.lngLatToCameraDepth(this._lngLat,dt+Nt)-$t>.006;!((we=this._popup)===null||we===void 0)&&we.isOpen()&&Tr&&this._popup.remove(),this._element.style.opacity=Tr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(I){return this._offset=t.P.convert(I),this._update(),this}addClassName(I){this._element.classList.add(I)}removeClassName(I){this._element.classList.remove(I)}toggleClassName(I){return this._element.classList.toggle(I)}setDraggable(I){return this._draggable=!!I,this._map&&(I?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(I){return this._rotation=I||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(I){return this._rotationAlignment=I||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(I){return this._pitchAlignment=I&&I!=="auto"?I:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(I,ie){return I===void 0&&ie===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),I!==void 0&&(this._opacity=I),ie!==void 0&&(this._opacityWhenCovered=ie),this._map&&this._updateOpacity(!0),this}}let Ic={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},bu=0,Rc=!1,Au={maxWidth:100,unit:"metric"};function yc(Ue,I,ie){let we=ie&&ie.maxWidth||100,Se=Ue._container.clientHeight/2,Be=Ue.unproject([0,Se]),dt=Ue.unproject([we,Se]),St=Be.distanceTo(dt);if(ie&&ie.unit==="imperial"){let Nt=3.2808*St;Nt>5280?ho(I,we,Nt/5280,Ue._getUIString("ScaleControl.Miles")):ho(I,we,Nt,Ue._getUIString("ScaleControl.Feet"))}else ie&&ie.unit==="nautical"?ho(I,we,St/1852,Ue._getUIString("ScaleControl.NauticalMiles")):St>=1e3?ho(I,we,St/1e3,Ue._getUIString("ScaleControl.Kilometers")):ho(I,we,St,Ue._getUIString("ScaleControl.Meters"))}function ho(Ue,I,ie,we){let Se=function(Be){let dt=Math.pow(10,`${Math.floor(Be)}`.length-1),St=Be/dt;return St=St>=10?10:St>=5?5:St>=3?3:St>=2?2:St>=1?1:function(Nt){let $t=Math.pow(10,Math.ceil(-Math.log(Nt)/Math.LN10));return Math.round(Nt*$t)/$t}(St),dt*St}(ie);Ue.style.width=I*(Se/ie)+"px",Ue.innerHTML=`${Se}&nbsp;${we}`}let Ro={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Dc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function lc(Ue){if(Ue){if(typeof Ue=="number"){let I=Math.round(Math.abs(Ue)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Ue),"top-left":new t.P(I,I),"top-right":new t.P(-I,I),bottom:new t.P(0,-Ue),"bottom-left":new t.P(I,-I),"bottom-right":new t.P(-I,-I),left:new t.P(Ue,0),right:new t.P(-Ue,0)}}if(Ue instanceof t.P||Array.isArray(Ue)){let I=t.P.convert(Ue);return{center:I,top:I,"top-left":I,"top-right":I,bottom:I,"bottom-left":I,"bottom-right":I,left:I,right:I}}return{center:t.P.convert(Ue.center||[0,0]),top:t.P.convert(Ue.top||[0,0]),"top-left":t.P.convert(Ue["top-left"]||[0,0]),"top-right":t.P.convert(Ue["top-right"]||[0,0]),bottom:t.P.convert(Ue.bottom||[0,0]),"bottom-left":t.P.convert(Ue["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Ue["bottom-right"]||[0,0]),left:t.P.convert(Ue.left||[0,0]),right:t.P.convert(Ue.right||[0,0])}}return lc(new t.P(0,0))}let Yu=r;e.AJAXError=t.bh,e.Evented=t.E,e.LngLat=t.N,e.MercatorCoordinate=t.Z,e.Point=t.P,e.addProtocol=t.bi,e.config=t.a,e.removeProtocol=t.bj,e.AttributionControl=fo,e.BoxZoomHandler=Pu,e.CanvasSource=rt,e.CooperativeGesturesHandler=Di,e.DoubleClickZoomHandler=li,e.DragPanHandler=Qi,e.DragRotateHandler=dn,e.EdgeInsets=yu,e.FullscreenControl=class extends t.E{constructor(Ue={}){super(),this._onFullscreenChange=()=>{var I;let ie=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((I=ie?.shadowRoot)===null||I===void 0)&&I.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Ue&&Ue.container&&(Ue.container instanceof HTMLElement?this._container=Ue.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Ue){return this._map=Ue,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Ue=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",Ue).setAttribute("aria-hidden","true"),Ue.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Ue=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Ue),this._fullscreenButton.title=Ue}_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 t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=ze,e.GeolocateControl=class extends t.E{constructor(Ue){super(),this._onSuccess=I=>{if(this._map){if(this._isOutOfMapMaxBounds(I))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",I)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=I,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(I),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(I),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",I)),this._finish()}},this._updateCamera=I=>{let ie=new t.N(I.coords.longitude,I.coords.latitude),we=I.coords.accuracy,Se=this._map.getBearing(),Be=t.e({bearing:Se},this.options.fitBoundsOptions),dt=re.fromLngLat(ie,we);this._map.fitBounds(dt,Be,{geolocateSource:!0})},this._updateMarker=I=>{if(I){let ie=new t.N(I.coords.longitude,I.coords.latitude);this._accuracyCircleMarker.setLngLat(ie).addTo(this._map),this._userLocationDotMarker.setLngLat(ie).addTo(this._map),this._accuracy=I.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=I=>{if(this._map){if(this.options.trackUserLocation)if(I.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;let ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(I.code===3&&Rc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",I)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",I=>I.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=I=>{if(this._map){if(I===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}else{let ie=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Zu({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Zu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ie=>{ie.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ie.originalEvent&&ie.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 t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},Ic,Ue)}onAdd(Ue){return this._map=Ue,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,function*(I=!1){if(Js!==void 0&&!I)return Js;if(window.navigator.permissions===void 0)return Js=!!window.navigator.geolocation,Js;try{Js=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Js=!!window.navigator.geolocation}return Js})}().then(I=>this._finishSetupUI(I)),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(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,bu=0,Rc=!1}_isOutOfMapMaxBounds(Ue){let I=this._map.getMaxBounds(),ie=Ue.coords;return I&&(ie.longitude<I.getWest()||ie.longitude>I.getEast()||ie.latitude<I.getSouth()||ie.latitude>I.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(){let Ue=this._map.getBounds(),I=Ue.getSouthEast(),ie=Ue.getNorthEast(),we=I.distanceTo(ie),Se=Math.ceil(this._accuracy/(we/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Se}px`,this._circleElement.style.height=`${Se}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":bu--,Rc=!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 t.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.k("trackuserlocationstart")),this.fire(new t.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Ue;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(Ue={maximumAge:6e5,timeout:0},Rc=!0):(Ue=this.options.positionOptions,Rc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Ue)}}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)}},e.Hash=Qf,e.ImageSource=at,e.KeyboardHandler=br,e.LngLatBounds=re,e.LogoControl=An,e.Map=class extends ao{constructor(Ue){t.bf.mark(t.bg.create);let I=Object.assign(Object.assign({},_l),Ue);if(I.minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new El(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),{bearingSnap:I.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new un,this._controls=[],this._mapId=t.a4(),this._contextLost=ie=>{ie.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:ie}))},this._contextRestored=ie=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:ie}))},this._onMapScroll=ie=>{if(ie.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=I.interactive,this._maxTileCacheSize=I.maxTileCacheSize,this._maxTileCacheZoomLevels=I.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=I.preserveDrawingBuffer===!0,this._antialias=I.antialias===!0,this._trackResize=I.trackResize===!0,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles===!0,this._fadeDuration=I.fadeDuration,this._crossSourceCollisions=I.crossSourceCollisions===!0,this._collectResourceTiming=I.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},bs),I.locale),this._clickTolerance=I.clickTolerance,this._overridePixelRatio=I.pixelRatio,this._maxCanvasSize=I.maxCanvasSize,this.transformCameraUpdate=I.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=I.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new _(I.transformRequest),typeof I.container=="string"){if(this._container=document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(I.maxBounds&&this.setMaxBounds(I.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ie=!1,we=qf(Se=>{this._trackResize&&!this._removed&&(this.resize(Se),this.redraw())},50);this._resizeObserver=new ResizeObserver(Se=>{ie?we(Se):ie=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Qn(this,I),this._hash=I.hash&&new Qf(typeof I.hash=="string"&&I.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:I.center,zoom:I.zoom,bearing:I.bearing,pitch:I.pitch}),I.bounds&&(this.resize(),this.fitBounds(I.bounds,t.e({},I.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=I.localIdeographFontFamily,this._validateStyle=I.validateStyle,I.style&&this.setStyle(I.style,{localIdeographFontFamily:I.localIdeographFontFamily}),I.attributionControl&&this.addControl(new fo(typeof I.attributionControl=="boolean"?void 0:I.attributionControl)),I.maplibreLogo&&this.addControl(new An,I.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ie=>{this._update(ie.dataType==="style"),this.fire(new t.k(`${ie.dataType}data`,ie))}),this.on("dataloading",ie=>{this.fire(new t.k(`${ie.dataType}dataloading`,ie))}),this.on("dataabort",ie=>{this.fire(new t.k("sourcedataabort",ie))})}_getMapId(){return this._mapId}addControl(Ue,I){if(I===void 0&&(I=Ue.getDefaultPosition?Ue.getDefaultPosition():"top-right"),!Ue||!Ue.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let ie=Ue.onAdd(this);this._controls.push(Ue);let we=this._controlPositions[I];return I.indexOf("bottom")!==-1?we.insertBefore(ie,we.firstChild):we.appendChild(ie),this}removeControl(Ue){if(!Ue||!Ue.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let I=this._controls.indexOf(Ue);return I>-1&&this._controls.splice(I,1),Ue.onRemove(this),this}hasControl(Ue){return this._controls.indexOf(Ue)>-1}calculateCameraOptionsFromTo(Ue,I,ie,we){return we==null&&this.terrain&&(we=this.terrain.getElevationForLngLatZoom(ie,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Ue,I,ie,we)}resize(Ue){var I;let ie=this._containerDimensions(),we=ie[0],Se=ie[1],Be=this._getClampedPixelRatio(we,Se);if(this._resizeCanvas(we,Se,Be),this.painter.resize(we,Se,Be),this.painter.overLimit()){let St=this.painter.context.gl;this._maxCanvasSize=[St.drawingBufferWidth,St.drawingBufferHeight];let Nt=this._getClampedPixelRatio(we,Se);this._resizeCanvas(we,Se,Nt),this.painter.resize(we,Se,Nt)}this.transform.resize(we,Se),(I=this._requestedCameraState)===null||I===void 0||I.resize(we,Se);let dt=!this._moving;return dt&&(this.stop(),this.fire(new t.k("movestart",Ue)).fire(new t.k("move",Ue))),this.fire(new t.k("resize",Ue)),dt&&this.fire(new t.k("moveend",Ue)),this}_getClampedPixelRatio(Ue,I){let{0:ie,1:we}=this._maxCanvasSize,Se=this.getPixelRatio(),Be=Ue*Se,dt=I*Se;return Math.min(Be>ie?ie/Be:1,dt>we?we/dt:1)*Se}getPixelRatio(){var Ue;return(Ue=this._overridePixelRatio)!==null&&Ue!==void 0?Ue:devicePixelRatio}setPixelRatio(Ue){this._overridePixelRatio=Ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Ue){return this.transform.setMaxBounds(re.convert(Ue)),this._update()}setMinZoom(Ue){if((Ue=Ue??-2)>=-2&&Ue<=this.transform.maxZoom)return this.transform.minZoom=Ue,this._update(),this.getZoom()<Ue&&this.setZoom(Ue),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Ue){if((Ue=Ue??22)>=this.transform.minZoom)return this.transform.maxZoom=Ue,this._update(),this.getZoom()>Ue&&this.setZoom(Ue),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Ue){if((Ue=Ue??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Ue>=0&&Ue<=this.transform.maxPitch)return this.transform.minPitch=Ue,this._update(),this.getPitch()<Ue&&this.setPitch(Ue),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Ue){if((Ue=Ue??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(Ue>=this.transform.minPitch)return this.transform.maxPitch=Ue,this._update(),this.getPitch()>Ue&&this.setPitch(Ue),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Ue){return this.transform.renderWorldCopies=Ue,this._update()}project(Ue){return this.transform.locationPoint(t.N.convert(Ue),this.style&&this.terrain)}unproject(Ue){return this.transform.pointLocation(t.P.convert(Ue),this.terrain)}isMoving(){var Ue;return this._moving||((Ue=this.handlers)===null||Ue===void 0?void 0:Ue.isMoving())}isZooming(){var Ue;return this._zooming||((Ue=this.handlers)===null||Ue===void 0?void 0:Ue.isZooming())}isRotating(){var Ue;return this._rotating||((Ue=this.handlers)===null||Ue===void 0?void 0:Ue.isRotating())}_createDelegatedListener(Ue,I,ie){if(Ue==="mouseenter"||Ue==="mouseover"){let we=!1;return{layers:I,listener:ie,delegates:{mousemove:Be=>{let dt=I.filter(Nt=>this.getLayer(Nt)),St=dt.length!==0?this.queryRenderedFeatures(Be.point,{layers:dt}):[];St.length?we||(we=!0,ie.call(this,new au(Ue,this,Be.originalEvent,{features:St}))):we=!1},mouseout:()=>{we=!1}}}}if(Ue==="mouseleave"||Ue==="mouseout"){let we=!1;return{layers:I,listener:ie,delegates:{mousemove:dt=>{let St=I.filter(Nt=>this.getLayer(Nt));(St.length!==0?this.queryRenderedFeatures(dt.point,{layers:St}):[]).length?we=!0:we&&(we=!1,ie.call(this,new au(Ue,this,dt.originalEvent)))},mouseout:dt=>{we&&(we=!1,ie.call(this,new au(Ue,this,dt.originalEvent)))}}}}{let we=Se=>{let Be=I.filter(St=>this.getLayer(St)),dt=Be.length!==0?this.queryRenderedFeatures(Se.point,{layers:Be}):[];dt.length&&(Se.features=dt,ie.call(this,Se),delete Se.features)};return{layers:I,listener:ie,delegates:{[Ue]:we}}}}_saveDelegatedListener(Ue,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Ue]=this._delegatedListeners[Ue]||[],this._delegatedListeners[Ue].push(I)}_removeDelegatedListener(Ue,I,ie){if(!this._delegatedListeners||!this._delegatedListeners[Ue])return;let we=this._delegatedListeners[Ue];for(let Se=0;Se<we.length;Se++){let Be=we[Se];if(Be.listener===ie&&Be.layers.length===I.length&&Be.layers.every(dt=>I.includes(dt))){for(let dt in Be.delegates)this.off(dt,Be.delegates[dt]);return void we.splice(Se,1)}}}on(Ue,I,ie){if(ie===void 0)return super.on(Ue,I);let we=this._createDelegatedListener(Ue,typeof I=="string"?[I]:I,ie);this._saveDelegatedListener(Ue,we);for(let Se in we.delegates)this.on(Se,we.delegates[Se]);return this}once(Ue,I,ie){if(ie===void 0)return super.once(Ue,I);let we=typeof I=="string"?[I]:I,Se=this._createDelegatedListener(Ue,we,ie);for(let Be in Se.delegates){let dt=Se.delegates[Be];Se.delegates[Be]=(...St)=>{this._removeDelegatedListener(Ue,we,ie),dt(...St)}}this._saveDelegatedListener(Ue,Se);for(let Be in Se.delegates)this.once(Be,Se.delegates[Be]);return this}off(Ue,I,ie){return ie===void 0?super.off(Ue,I):(this._removeDelegatedListener(Ue,typeof I=="string"?[I]:I,ie),this)}queryRenderedFeatures(Ue,I){if(!this.style)return[];let ie,we=Ue instanceof t.P||Array.isArray(Ue),Se=we?Ue:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(we?{}:Ue)||{},Se instanceof t.P||typeof Se[0]=="number")ie=[t.P.convert(Se)];else{let Be=t.P.convert(Se[0]),dt=t.P.convert(Se[1]);ie=[Be,new t.P(dt.x,Be.y),dt,new t.P(Be.x,dt.y),Be]}return this.style.queryRenderedFeatures(ie,I,this.transform)}querySourceFeatures(Ue,I){return this.style.querySourceFeatures(Ue,I)}setStyle(Ue,I){return(I=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Ue?(this._diffStyle(Ue,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(Ue,I))}setTransformRequest(Ue){return this._requestManager.setTransformRequest(Ue),this}_getUIString(Ue){let I=this._locale[Ue];if(I==null)throw new Error(`Missing UI string '${Ue}'`);return I}_updateStyle(Ue,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Ue,I));let ie=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Ue)),Ue?(this.style=new Ir(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof Ue=="string"?this.style.loadURL(Ue,I,ie):this.style.loadJSON(Ue,I,ie),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ir(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Ue,I){if(typeof Ue=="string"){let ie=this._requestManager.transformRequest(Ue,"Style");t.h(ie,new AbortController).then(we=>{this._updateDiff(we.data,I)}).catch(we=>{we&&this.fire(new t.j(we))})}else typeof Ue=="object"&&this._updateDiff(Ue,I)}_updateDiff(Ue,I){try{this.style.setState(Ue,I)&&this._update(!0)}catch(ie){t.w(`Unable to perform style diff: ${ie.message||ie.error||ie}. Rebuilding the style from scratch.`),this._updateStyle(Ue,I)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(Ue,I){return this._lazyInitEmptyStyle(),this.style.addSource(Ue,I),this._update(!0)}isSourceLoaded(Ue){let I=this.style&&this.style.sourceCaches[Ue];if(I!==void 0)return I.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Ue}'`)))}setTerrain(Ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Ue){let I=this.style.sourceCaches[Ue.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${Ue.source}`);this.terrain===null&&I.reload();for(let ie in this.style._layers){let we=this.style._layers[ie];we.type==="hillshade"&&we.source===Ue.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Ss(this.painter,I,Ue),this.painter.renderToTexture=new el(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ie=>{ie.dataType==="style"?this.terrain.sourceCache.freeRtt():ie.dataType==="source"&&ie.tile&&(ie.sourceId!==Ue.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ie.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:Ue})),this}getTerrain(){var Ue,I;return(I=(Ue=this.terrain)===null||Ue===void 0?void 0:Ue.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let Ue=this.style&&this.style.sourceCaches;for(let I in Ue){let ie=Ue[I]._tiles;for(let we in ie){let Se=ie[we];if(Se.state!=="loaded"&&Se.state!=="errored")return!1}}return!0}removeSource(Ue){return this.style.removeSource(Ue),this._update(!0)}getSource(Ue){return this.style.getSource(Ue)}addImage(Ue,I,ie={}){let{pixelRatio:we=1,sdf:Se=!1,stretchX:Be,stretchY:dt,content:St,textFitWidth:Nt,textFitHeight:$t}=ie;if(this._lazyInitEmptyStyle(),!(I instanceof HTMLImageElement||t.b(I))){if(I.width===void 0||I.height===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Tr,height:Ar,data:Kr}=I,na=I;return this.style.addImage(Ue,{data:new t.R({width:Tr,height:Ar},new Uint8Array(Kr)),pixelRatio:we,stretchX:Be,stretchY:dt,content:St,textFitWidth:Nt,textFitHeight:$t,sdf:Se,version:0,userImage:na}),na.onAdd&&na.onAdd(this,Ue),this}}{let{width:Tr,height:Ar,data:Kr}=n.getImageData(I);this.style.addImage(Ue,{data:new t.R({width:Tr,height:Ar},Kr),pixelRatio:we,stretchX:Be,stretchY:dt,content:St,textFitWidth:Nt,textFitHeight:$t,sdf:Se,version:0})}}updateImage(Ue,I){let ie=this.style.getImage(Ue);if(!ie)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let we=I instanceof HTMLImageElement||t.b(I)?n.getImageData(I):I,{width:Se,height:Be,data:dt}=we;if(Se===void 0||Be===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Se!==ie.data.width||Be!==ie.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let St=!(I instanceof HTMLImageElement||t.b(I));return ie.data.replace(dt,St),this.style.updateImage(Ue,ie),this}getImage(Ue){return this.style.getImage(Ue)}hasImage(Ue){return Ue?!!this.style.getImage(Ue):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Ue){this.style.removeImage(Ue)}loadImage(Ue){return l.getImage(this._requestManager.transformRequest(Ue,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Ue,I){return this._lazyInitEmptyStyle(),this.style.addLayer(Ue,I),this._update(!0)}moveLayer(Ue,I){return this.style.moveLayer(Ue,I),this._update(!0)}removeLayer(Ue){return this.style.removeLayer(Ue),this._update(!0)}getLayer(Ue){return this.style.getLayer(Ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Ue,I,ie){return this.style.setLayerZoomRange(Ue,I,ie),this._update(!0)}setFilter(Ue,I,ie={}){return this.style.setFilter(Ue,I,ie),this._update(!0)}getFilter(Ue){return this.style.getFilter(Ue)}setPaintProperty(Ue,I,ie,we={}){return this.style.setPaintProperty(Ue,I,ie,we),this._update(!0)}getPaintProperty(Ue,I){return this.style.getPaintProperty(Ue,I)}setLayoutProperty(Ue,I,ie,we={}){return this.style.setLayoutProperty(Ue,I,ie,we),this._update(!0)}getLayoutProperty(Ue,I){return this.style.getLayoutProperty(Ue,I)}setGlyphs(Ue,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Ue,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Ue,I,ie={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Ue,I,ie,we=>{we||this._update(!0)}),this}removeSprite(Ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(Ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Ue,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Ue,I,ie=>{ie||this._update(!0)}),this}setLight(Ue,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(Ue,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(Ue){return this._lazyInitEmptyStyle(),this.style.setSky(Ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Ue,I){return this.style.setFeatureState(Ue,I),this._update()}removeFeatureState(Ue,I){return this.style.removeFeatureState(Ue,I),this._update()}getFeatureState(Ue){return this.style.getFeatureState(Ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Ue=0,I=0;return this._container&&(Ue=this._container.clientWidth||400,I=this._container.clientHeight||300),[Ue,I]}_setupContainer(){let Ue=this._container;Ue.classList.add("maplibregl-map");let I=this._canvasContainer=i.create("div","maplibregl-canvas-container",Ue);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",I),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let ie=this._containerDimensions(),we=this._getClampedPixelRatio(ie[0],ie[1]);this._resizeCanvas(ie[0],ie[1],we);let Se=this._controlContainer=i.create("div","maplibregl-control-container",Ue),Be=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(dt=>{Be[dt]=i.create("div",`maplibregl-ctrl-${dt} `,Se)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Ue,I,ie){this._canvas.width=Math.floor(ie*Ue),this._canvas.height=Math.floor(ie*I),this._canvas.style.width=`${Ue}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let Ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},I=null;this._canvas.addEventListener("webglcontextcreationerror",we=>{I={requestedAttributes:Ue},we&&(I.statusMessage=we.statusMessage,I.type=we.type)},{once:!0});let ie=this._canvas.getContext("webgl2",Ue)||this._canvas.getContext("webgl",Ue);if(!ie){let we="Failed to initialize WebGL";throw I?(I.message=we,new Error(JSON.stringify(I))):new Error(we)}this.painter=new Mc(ie,this.transform),s.testSupport(ie)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Ue){return this._update(),this._renderTaskQueue.add(Ue)}_cancelRenderFrame(Ue){this._renderTaskQueue.remove(Ue)}_render(Ue){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Ue),this._removed)return;let ie=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Se=this.transform.zoom,Be=n.now();this.style.zoomHistory.update(Se,Be);let dt=new t.z(Se,{now:Be,fadeDuration:I,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),St=dt.crossFadingFactor();St===1&&St===this._crossFadingFactor||(ie=!0,this._crossFadingFactor=St),this.style.update(dt)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,I,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:I,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.bf.mark(t.bg.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||ie)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let we=this._sourcesDirty||this._styleDirty||this._placementDirty;return we||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||we||(this._fullyLoaded=!0,t.bf.mark(t.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Ue;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),(Ue=this._resizeObserver)===null||Ue===void 0||Ue.disconnect();let I=this.painter.context.gl.getExtension("WEBGL_lose_context");I?.loseContext&&I.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(Ue=>{t.bf.frame(Ue),this._frameRequest=null,this._render(Ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Ue){this._showTileBoundaries!==Ue&&(this._showTileBoundaries=Ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Ue){this._showPadding!==Ue&&(this._showPadding=Ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Ue){this._showCollisionBoxes!==Ue&&(this._showCollisionBoxes=Ue,Ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Ue){this._showOverdrawInspector!==Ue&&(this._showOverdrawInspector=Ue,this._update())}get repaint(){return!!this._repaint}set repaint(Ue){this._repaint!==Ue&&(this._repaint=Ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Ue){this._vertices=Ue,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=au,e.MapTouchEvent=Yc,e.MapWheelEvent=hh,e.Marker=Zu,e.NavigationControl=class{constructor(Ue){this._updateZoomButtons=()=>{let I=this._map.getZoom(),ie=I===this._map.getMaxZoom(),we=I===this._map.getMinZoom();this._zoomInButton.disabled=ie,this._zoomOutButton.disabled=we,this._zoomInButton.setAttribute("aria-disabled",ie.toString()),this._zoomOutButton.setAttribute("aria-disabled",we.toString())},this._rotateCompassArrow=()=>{let I=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=I},this._setButtonTitle=(I,ie)=>{let we=this._map._getUIString(`NavigationControl.${ie}`);I.title=we,I.setAttribute("aria-label",we)},this.options=t.e({},Un,Ue),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",I=>I.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",I=>this._map.zoomIn({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",I=>this._map.zoomOut({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",I=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:I}):this._map.resetNorth({},{originalEvent:I})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Ue){return this._map=Ue,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 Lo(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.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(Ue,I){let ie=i.create("button",Ue,this._container);return ie.type="button",ie.addEventListener("click",I),ie}},e.Popup=class extends t.E{constructor(Ue){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=I=>{this._update(I.point)},this._onMouseMove=I=>{this._update(I.point)},this._onDrag=I=>{this._update(I.point)},this._update=I=>{var ie;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let St of this.options.className.split(" "))this._container.classList.add(St);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Rs(this._lngLat,this._flatPos,this._map.transform):(ie=this._lngLat)===null||ie===void 0?void 0:ie.wrap(),this._trackPointer&&!I)return;let we=this._flatPos=this._pos=this._trackPointer&&I?I:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&I?I:this._map.transform.locationPoint(this._lngLat));let Se=this.options.anchor,Be=lc(this.options.offset);if(!Se){let St=this._container.offsetWidth,Nt=this._container.offsetHeight,$t;$t=we.y+Be.bottom.y<Nt?["top"]:we.y>this._map.transform.height-Nt?["bottom"]:[],we.x<St/2?$t.push("left"):we.x>this._map.transform.width-St/2&&$t.push("right"),Se=$t.length===0?"bottom":$t.join("-")}let dt=we.add(Be[Se]);this.options.subpixelPositioning||(dt=dt.round()),i.setTransform(this._container,`${uu[Se]} translate(${dt.x}px,${dt.y}px)`),Iu(this._container,Se,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Ro),Ue)}addTo(Ue){return this._map&&this.remove(),this._map=Ue,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 t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Ue){return this._lngLat=t.N.convert(Ue),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Ue){return this.setDOMContent(document.createTextNode(Ue))}setHTML(Ue){let I=document.createDocumentFragment(),ie=document.createElement("body"),we;for(ie.innerHTML=Ue;we=ie.firstChild,we;)I.appendChild(we);return this.setDOMContent(I)}getMaxWidth(){var Ue;return(Ue=this._container)===null||Ue===void 0?void 0:Ue.style.maxWidth}setMaxWidth(Ue){return this.options.maxWidth=Ue,this._update(),this}setDOMContent(Ue){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Ue){return this._container&&this._container.classList.add(Ue),this}removeClassName(Ue){return this._container&&this._container.classList.remove(Ue),this}setOffset(Ue){return this.options.offset=Ue,this._update(),this}toggleClassName(Ue){if(this._container)return this._container.classList.toggle(Ue)}setSubpixelPositioning(Ue){this.options.subpixelPositioning=Ue}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Ue=this._container.querySelector(Dc);Ue&&Ue.focus()}},e.RasterDEMTileSource=De,e.RasterTileSource=Ae,e.ScaleControl=class{constructor(Ue){this._onMove=()=>{yc(this._map,this._container,this.options)},this.setUnit=I=>{this.options.unit=I,yc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Au),Ue)}getDefaultPosition(){return"bottom-left"}onAdd(Ue){return this._map=Ue,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Ue.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=ka,e.Style=Ir,e.TerrainControl=class{constructor(Ue){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=Ue}onAdd(Ue){return this._map=Ue,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.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(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=Pc,e.TwoFingersTouchRotateHandler=Jc,e.TwoFingersTouchZoomHandler=xu,e.TwoFingersTouchZoomRotateHandler=Pi,e.VectorTileSource=be,e.VideoSource=nt,e.addSourceType=(Ue,I)=>t._(void 0,void 0,void 0,function*(){if(Me(Ue))throw new Error(`A source type called "${Ue}" already exists.`);((ie,we)=>{st[ie]=we})(Ue,I)}),e.clearPrewarmedResources=function(){let Ue=fe;Ue&&(Ue.isPreloaded()&&Ue.numActive()===1?(Ue.release($),fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return tt().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return se.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Ue){return q().broadcast("IS",Ue)},e.prewarm=function(){Y().acquire($)},e.setMaxParallelImageRequests=function(Ue){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Ue},e.setRTLTextPlugin=function(Ue,I){return tt().setRTLTextPlugin(Ue,I)},e.setWorkerCount=function(Ue){se.workerCount=Ue},e.setWorkerUrl=function(Ue){t.a.WORKER_URL=Ue}});var E=v;return E})}}),qV=Xe({"src/plots/map/layers.js"(Z,G){"use strict";var v=sa(),x=ou().sanitizeHTML,S=D6(),E=b0();function e(n,i){this.subplot=n,this.uid=n.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=r(i)},t.needsNewImage=function(n){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},t.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},t.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(n){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(n){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!r(n)){var s=a(n);i.addSource(this.idSource,s)}},t.findFollowingMapLayerId=function(n){if(n==="traces")for(var i=this.subplot.getMapLayers(),s=0;s<i.length;s++){var h=i[s].id;if(typeof h=="string"&&h.indexOf(E.traceLayerPrefix)===0){n=h;break}}return n},t.updateLayer=function(n){var i=this.subplot,s=o(n),h=this.lookupBelow(),c=this.findFollowingMapLayerId(h);this.removeLayer(),r(n)&&i.addLayer({id:this.idLayer,source:this.idSource,"source-layer":n.sourcelayer||"",type:n.type,minzoom:n.minzoom,maxzoom:n.maxzoom,layout:s.layout,paint:s.paint},c),this.layerType=n.type,this.below=h},t.updateStyle=function(n){if(r(n)){var i=o(n);this.subplot.setOptions(this.idLayer,"setLayoutProperty",i.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",i.paint)}},t.removeLayer=function(){var n=this.subplot.map;n.getLayer(this.idLayer)&&n.removeLayer(this.idLayer)},t.dispose=function(){var n=this.subplot.map;n.getLayer(this.idLayer)&&n.removeLayer(this.idLayer),n.getSource(this.idSource)&&n.removeSource(this.idSource)};function r(n){if(!n.visible)return!1;var i=n.source;if(Array.isArray(i)&&i.length>0){for(var s=0;s<i.length;s++)if(typeof i[s]!="string"||i[s].length===0)return!1;return!0}return v.isPlainObject(i)||typeof i=="string"&&i.length>0}function o(n){var i={},s={};switch(n.type){case"circle":v.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":v.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,c=S(h.textposition,h.iconsize);v.extendFlat(i,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":c.anchor,"text-offset":c.offset,"symbol-placement":h.placement}),v.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:i,paint:s}}function a(n){var i=n.sourcetype,s=n.source,h={type:i},c;return i==="geojson"?c="data":i==="vector"?c=typeof s=="string"?"url":"tiles":i==="raster"?(c="tiles",h.tileSize=256):i==="image"&&(c="url",h.coordinates=n.coordinates),h[c]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}G.exports=function(i,s,h){var c=new e(i,s);return c.update(h),c}}}),VV=Xe({"src/plots/map/map.js"(Z,G){"use strict";var v=jV(),x=sa(),S=g0(),E=so(),e=Go(),t=Ap(),r=rf(),o=Jd(),a=o.drawMode,n=o.selectMode,i=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,c=Af().selectOnClick,m=b0(),p=qV();function T(g,b){this.id=b,this.gd=g;var d=g._fullLayout,u=g._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(g,b,d){var u=this,y;u.map?y=new Promise(function(f,R){u.updateMap(g,b,f,R)}):y=new Promise(function(f,R){u.createMap(g,b,f,R)}),d.push(y)},l.createMap=function(g,b,d,u){var y=this,f=b[y.id],R=y.styleObj=w(f.style),L=f.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new v.Map({container:y.div,style:R.style,center:M(f.center),zoom:f.zoom,bearing:f.bearing,pitch:f.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0})),N={};F.on("styleimagemissing",function(P){var U=P.id;if(!N[U]&&U.includes("-15")){N[U]=!0;var B=new Image(15,15);B.onload=function(){F.addImage(U,B)},B.crossOrigin="Anonymous",B.src="https://unpkg.com/maki@2.1.0/icons/"+U+".svg"}}),F.setTransformRequest(function(P){return P=P.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),P=P.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),P=P.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:P}}),F._canvas.style.left="0px",F._canvas.style.top="0px",y.rejectOnError(u),y.isStatic||y.initFx(g,b);var O=[];O.push(new Promise(function(P){F.once("load",P)})),O=O.concat(S.fetchTraceGeoData(g)),Promise.all(O).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(d)}).catch(u)},l.updateMap=function(g,b,d,u){var y=this,f=y.map,R=b[this.id];y.rejectOnError(u);var L=[],z=w(R.style);JSON.stringify(y.styleObj)!==JSON.stringify(z)&&(y.styleObj=z,f.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){f.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(g)),Promise.all(L).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(g,b){var d=b[this.id],u=d.layers,y,f,R=this.belowLookup={},L=!1;for(y=0;y<g.length;y++){var z=g[y][0].trace,F=z._module;typeof z.below=="string"?f=z.below:F.getBelow&&(f=F.getBelow(z,this)),f===""&&(L=!0),R["trace-"+z.uid]=f||""}for(y=0;y<u.length;y++){var N=u[y];typeof N.below=="string"?f=N.below:L?f="traces":f="",R["layout-"+y]=f}var O={},P,U;for(P in R)f=R[P],O[f]?O[f].push(P):O[f]=[P];for(f in O){var B=O[f];if(B.length>1)for(y=0;y<B.length;y++)P=B[y],P.indexOf("trace-")===0?(U=P.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):P.indexOf("layout-")===0&&(U=P.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var _={choroplethmap:0,densitymap:1,scattermap:2};l.updateData=function(g){var b=this.traceHash,d,u,y,f,R=g.slice().sort(function(O,P){return _[O[0].trace.type]-_[P[0].trace.type]});for(y=0;y<R.length;y++){var L=R[y];u=L[0].trace,d=b[u.uid];var z=!1;d&&(d.type===u.type?(d.update(L),z=!0):d.dispose()),!z&&u._module&&(b[u.uid]=u._module.plot(this,L))}var F=Object.keys(b);e:for(y=0;y<F.length;y++){var N=F[y];for(f=0;f<g.length;f++)if(u=g[f][0].trace,N===u.uid)continue e;d=b[N],d.dispose(),delete b[N]}},l.updateLayout=function(g){var b=this.map,d=g[this.id];!this.dragging&&!this.wheeling&&(b.setCenter(M(d.center)),b.setZoom(d.zoom),b.setBearing(d.bearing),b.setPitch(d.pitch)),this.updateLayers(g),this.updateFramework(g),this.updateFx(g),this.map.resize(),this.gd._context._scrollZoom.map?b.scrollZoom.enable():b.scrollZoom.disable()},l.resolveOnRender=function(g){var b=this.map;b.on("render",function d(){b.loaded()&&(b.off("render",d),setTimeout(g,10))})},l.rejectOnError=function(g){var b=this.map;function d(){g(new Error(m.mapOnErrorMsg))}b.once("error",d),b.once("style.error",d),b.once("source.error",d),b.once("tile.error",d),b.once("layer.error",d)},l.createFramework=function(g){var b=this,d=b.div=document.createElement("div");d.id=b.uid,d.style.position="absolute",b.container.appendChild(d),b.xaxis={_id:"x",c2p:function(u){return b.project(u).x}},b.yaxis={_id:"y",c2p:function(u){return b.project(u).y}},b.updateFramework(g),b.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(b.mockAxis,g)},l.initFx=function(g,b){var d=this,u=d.gd,y=d.map;y.on("moveend",function(L){if(d.map){var z=u._fullLayout;if(L.originalEvent||d.wheeling){var F=z[d.id];E.call("_storeDirectGUIEdit",u.layout,z._preGUI,d.getViewEdits(F));var N=d.getView();F._input.center=F.center=N.center,F._input.zoom=F.zoom=N.zoom,F._input.bearing=F.bearing=N.bearing,F._input.pitch=F.pitch=N.pitch,u.emit("plotly_relayout",d.getViewEditsWithDerived(N))}L.originalEvent&&L.originalEvent.type==="mouseup"?d.dragging=!1:d.wheeling&&(d.wheeling=!1),z&&z._rehover&&z._rehover()}}),y.on("wheel",function(){d.wheeling=!0}),y.on("mousemove",function(L){var z=d.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},d.xaxis.p2c=function(){return y.unproject(F).lng},d.yaxis.p2c=function(){return y.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===d.id&&u._fullLayout[d.id]&&r.hover(u,L,d.id)},r.hover(u,L,d.id),u._fullLayout._hoversubplot=d.id});function f(){r.loneUnhover(b._hoverlayer)}y.on("dragstart",function(){d.dragging=!0,f()}),y.on("zoomstart",f),y.on("mouseout",function(){u._fullLayout._hoversubplot=null});function R(){var L=d.getView();u.emit("plotly_relayouting",d.getViewEditsWithDerived(L))}y.on("drag",R),y.on("zoom",R),y.on("dblclick",function(){var L=u._fullLayout[d.id];E.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,d.getViewEdits(L));var z=d.viewInitial;y.setCenter(M(z.center)),y.setZoom(z.zoom),y.setBearing(z.bearing),y.setPitch(z.pitch);var F=d.getView();L._input.center=L.center=F.center,L._input.zoom=L.zoom=F.zoom,L._input.bearing=L.bearing=F.bearing,L._input.pitch=L.pitch=F.pitch,u.emit("plotly_doubleclick",null),u.emit("plotly_relayout",d.getViewEditsWithDerived(F))}),d.clearOutline=function(){h(d.dragOptions),s(d.dragOptions.gd)},d.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&c(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var f=g.dragmode,R;R=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[y([F.xmin,F.ymin]),y([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(y)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:g.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:g[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:R},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),n(f)||a(f)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){i(z,F,N,b.dragOptions,f)},t.init(b.dragOptions)):(d.dragPan.enable(),d.off("zoomstart",b.clearOutline),b.div.onmousedown=null,b.div.ontouchstart=null,b.div.removeEventListener("touchstart",b.div._ontouchstart),b.onClickInPanHandler=b.onClickInPanFn(b.dragOptions),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(g){var b=g[this.id].domain,d=g._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(g){var b=g[this.id],d=b.layers,u=this.layerList,y;if(d.length!==u.length){for(y=0;y<u.length;y++)u[y].dispose();for(u=this.layerList=[],y=0;y<d.length;y++)u.push(p(this,y,d[y]))}else for(y=0;y<d.length;y++)u[y].update(d[y])},l.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},l.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},l.setOptions=function(g,b,d){for(var u in d)this.map[b](g,u,d[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(g,b){var d=this.map;if(typeof b=="string"){if(b===""){d.addLayer(g,b);return}for(var u=this.getMapLayers(),y=0;y<u.length;y++)if(b===u[y].id){d.addLayer(g,b);return}x.warn(["Trying to add layer with *below* value",b,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}d.addLayer(g)},l.project=function(g){return this.map.project(new v.LngLat(g[0],g[1]))},l.getView=function(){var g=this.map,b=g.getCenter(),d=b.lng,u=b.lat,y={lon:d,lat:u},f=g.getCanvas(),R=parseInt(f.style.width),L=parseInt(f.style.height);return{center:y,zoom:g.getZoom(),bearing:g.getBearing(),pitch:g.getPitch(),_derived:{coordinates:[g.unproject([0,0]).toArray(),g.unproject([R,0]).toArray(),g.unproject([R,L]).toArray(),g.unproject([0,L]).toArray()]}}},l.getViewEdits=function(g){for(var b=this.id,d=["center","zoom","bearing","pitch"],u={},y=0;y<d.length;y++){var f=d[y];u[b+"."+f]=g[f]}return u},l.getViewEditsWithDerived=function(g){var b=this.id,d=this.getViewEdits(g);return d[b+"._derived"]=g._derived,d};function w(g){var b={};return x.isPlainObject(g)?(b.id=g.id,b.style=g):typeof g=="string"?(b.id=g,m.stylesMap[g]?b.style=m.stylesMap[g]:b.style=g):(b.id=m.styleValueDflt,b.style=A(m.styleValueDflt)),b.transition={duration:0,delay:0},b}function A(g){return m.styleUrlPrefix+g+"-"+m.styleUrlSuffix}function M(g){return[g.lon,g.lat]}G.exports=T}}),GV=Xe({"src/plots/map/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=o0(),S=hp(),E=kx();G.exports=function(o,a,n){x(o,a,n,{type:"map",attributes:E,handleDefaults:e,partition:"y"})};function e(r,o,a){a("style"),a("center.lon"),a("center.lat"),a("zoom"),a("bearing"),a("pitch");var n=a("bounds.west"),i=a("bounds.east"),s=a("bounds.south"),h=a("bounds.north");(n===void 0||i===void 0||s===void 0||h===void 0)&&delete o.bounds,S(r,o,{name:"layers",handleItemDefaults:t}),o._input=r}function t(r,o){function a(m,p){return v.coerce(r,o,E.layers,m,p)}var n=a("visible");if(n){var i=a("sourcetype"),s=i==="raster"||i==="image";a("source"),a("sourceattribution"),i==="vector"&&a("sourcelayer"),i==="image"&&a("coordinates");var h;s&&(h="raster");var c=a("type",h);s&&c!=="raster"&&(c=o.type="raster",v.log("Source types *raster* and *image* must drawn *raster* layer type.")),a("below"),a("color"),a("opacity"),a("minzoom"),a("maxzoom"),c==="circle"&&a("circle.radius"),c==="line"&&(a("line.width"),a("line.dash")),c==="fill"&&a("fill.outlinecolor"),c==="symbol"&&(a("symbol.icon"),a("symbol.iconsize"),a("symbol.text"),v.coerceFont(a,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),a("symbol.textposition"),a("symbol.placement"))}}}}),CT=Xe({"src/plots/map/index.js"(Z){"use strict";var G=sa(),v=G.strTranslate,x=G.strScale,S=Hh().getSubplotCalcData,E=vd(),e=Hn(),t=es(),r=ou(),o=VV(),a="map";Z.name=a,Z.attr="subplot",Z.idRoot=a,Z.idRegex=Z.attrRegex=G.counterRegex(a),Z.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Z.layoutAttributes=kx(),Z.supplyLayoutDefaults=GV(),Z.plot=function(i){for(var s=i._fullLayout,h=i.calcdata,c=s._subplots[a],m=0;m<c.length;m++){var p=c[m],T=S(h,a,p),l=s[p],_=l._subplot;_||(_=new o(i,p),s[p]._subplot=_),_.viewInitial||(_.viewInitial={center:G.extendFlat({},l.center),zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),_.plot(T,s,i._promises)}},Z.clean=function(n,i,s,h){for(var c=h._subplots[a]||[],m=0;m<c.length;m++){var p=c[m];!i[p]&&h[p]._subplot&&h[p]._subplot.destroy()}},Z.toSVG=function(n){for(var i=n._fullLayout,s=i._subplots[a],h=i._size,c=0;c<s.length;c++){var m=i[s[c]],p=m.domain,T=m._subplot,l=T.toImage("png"),_=i._glimages.append("svg:image");_.attr({xmlns:E.svg,"xlink:href":l,x:h.l+h.w*p.x[0],y:h.t+h.h*(1-p.y[1]),width:h.w*(p.x[1]-p.x[0]),height:h.h*(p.y[1]-p.y[0]),preserveAspectRatio:"none"});var w=e.select(m._subplot.div),A=w.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),M=i._glimages.append("g"),g=M.append("text");g.text(A).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":A});var b=t.bBox(g.node()),d=h.w*(p.x[1]-p.x[0]);if(b.width>d/2){var u=A.split("|").join("<br>");g.text(u).attr("data-unformatted",u).call(r.convertToTspans,n),b=t.bBox(g.node())}g.attr("transform",v(-3,-b.height+8)),M.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;b.width+6>d&&(y=d/(b.width+6));var f=[h.l+h.w*p.x[1],h.t+h.h*(1-p.y[0])];M.attr("transform",v(f[0],f[1])+x(y))}},Z.updateFx=function(n){for(var i=n._fullLayout,s=i._subplots[a],h=0;h<s.length;h++){var c=i[s[h]]._subplot;c.updateFx(i)}}}}),HV=Xe({"src/traces/scattermap/index.js"(Z,G){"use strict";G.exports={attributes:ET(),supplyDefaults:FV(),colorbar:pp(),formatLabels:R6(),calc:iT(),plot:BV(),hoverPoints:kT().hoverPoints,eventData:NV(),selectPoints:UV(),styleOnSelect:function(v,x){if(x){var S=x[0].trace;S._glTrace.update(x)}},moduleType:"trace",name:"scattermap",basePlotModule:CT(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}}),WV=Xe({"lib/scattermap.js"(Z,G){"use strict";G.exports=HV()}}),z6=Xe({"src/traces/choroplethmap/attributes.js"(Z,G){"use strict";var v=k1(),x=ku(),{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ru(),t=Qo().extendFlat;G.exports=t({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:t({},v.featureidkey,{}),below:{valType:"string",editType:"plot"},text:v.text,hovertext:v.hovertext,marker:{line:{color:t({},v.marker.line.color,{editType:"plot"}),width:t({},v.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:t({},v.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:t({},v.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:t({},v.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:v.hoverinfo,hovertemplate:S({},{keys:["properties"]}),hovertemplatefallback:E(),showlegend:t({},e.showlegend,{dflt:!1})},x("",{cLetter:"z",editTypeOverride:"calc"}))}}),XV=Xe({"src/traces/choroplethmap/defaults.js"(Z,G){"use strict";var v=sa(),x=_h(),S=z6();G.exports=function(e,t,r,o){function a(c,m){return v.coerce(e,t,S,c,m)}var n=a("locations"),i=a("z"),s=a("geojson");if(!v.isArrayOrTypedArray(n)||!n.length||!v.isArrayOrTypedArray(i)||!i.length||!(typeof s=="string"&&s!==""||v.isPlainObject(s))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,i.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var h=a("marker.line.width");h&&a("marker.line.color"),a("marker.opacity"),x(e,t,o,a,{prefix:"",cLetter:"z"}),v.coerceSelectionMarkerOpacity(t,a)}}}),F6=Xe({"src/traces/choroplethmap/convert.js"(Z,G){"use strict";var v=rs(),x=sa(),S=rc(),E=es(),e=m0().makeBlank,t=g0();function r(a){var n=a[0].trace,i=n.visible===!0&&n._length!==0,s={layout:{visibility:"none"},paint:{}},h={layout:{visibility:"none"},paint:{}},c=n._opts={fill:s,line:h,geojson:e()};if(!i)return c;var m=t.extractTraceFeature(a);if(!m)return c;var p=S.makeColorScaleFuncFromTrace(n),T=n.marker,l=T.line||{},_;x.isArrayOrTypedArray(T.opacity)&&(_=function(y){var f=y.mo;return v(f)?+x.constrain(f,0,1):0});var w;x.isArrayOrTypedArray(l.color)&&(w=function(y){return y.mlc});var A;x.isArrayOrTypedArray(l.width)&&(A=function(y){return y.mlw});for(var M=0;M<a.length;M++){var g=a[M],b=g.fOut;if(b){var d=b.properties;d.fc=p(g.z),_&&(d.mo=_(g)),w&&(d.mlc=w(g)),A&&(d.mlw=A(g)),g.ct=d.ct,g._polygons=t.feature2polygons(b)}}var u=_?{type:"identity",property:"mo"}:T.opacity;return x.extendFlat(s.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":u}),x.extendFlat(h.paint,{"line-color":w?{type:"identity",property:"mlc"}:l.color,"line-width":A?{type:"identity",property:"mlw"}:l.width,"line-opacity":u}),s.layout.visibility="visible",h.layout.visibility="visible",c.geojson={type:"FeatureCollection",features:m},o(a),c}function o(a){var n=a[0].trace,i=n._opts,s;if(n.selectedpoints){for(var h=E.makeSelectedPointStyleFns(n),c=0;c<a.length;c++){var m=a[c];m.fOut&&(m.fOut.properties.mo2=h.selectedOpacityFn(m))}s={type:"identity",property:"mo2"}}else s=x.isArrayOrTypedArray(n.marker.opacity)?{type:"identity",property:"mo"}:n.marker.opacity;return x.extendFlat(i.fill.paint,{"fill-opacity":s}),x.extendFlat(i.line.paint,{"line-opacity":s}),i}G.exports={convert:r,convertOnSelect:o}}}),ZV=Xe({"src/traces/choroplethmap/plot.js"(Z,G){"use strict";var v=F6().convert,x=F6().convertOnSelect,S=b0().traceLayerPrefix;function E(t,r){this.type="choroplethmap",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",S+r+"-fill"],["line",S+r+"-line"]],this.below=null}var e=E.prototype;e.update=function(t){this._update(v(t)),t[0].trace._glTrace=this},e.updateOnSelect=function(t){this._update(x(t))},e._update=function(t){var r=this.subplot,o=this.layerList,a=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(t.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(t,a),this.below=a);for(var n=0;n<o.length;n++){var i=o[n],s=i[0],h=i[1],c=t[s];r.setOptions(h,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&r.setOptions(h,"setPaintProperty",c.paint)}},e._addLayers=function(t,r){for(var o=this.subplot,a=this.layerList,n=this.sourceId,i=0;i<a.length;i++){var s=a[i],h=s[0],c=t[h];o.addLayer({type:h,id:s[1],source:n,layout:c.layout,paint:c.paint},r)}},e._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,o=r.length-1;o>=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},G.exports=function(r,o){var a=o[0].trace,n=new E(r,a.uid),i=n.sourceId,s=v(o),h=n.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(i,{type:"geojson",data:s.geojson}),n._addLayers(s,h),o[0].trace._glTrace=n,n}}}),YV=Xe({"src/traces/choroplethmap/index.js"(Z,G){"use strict";G.exports={attributes:z6(),supplyDefaults:XV(),colorbar:n0(),calc:lT(),plot:ZV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(v,x){if(x){var S=x[0].trace;S._glTrace.updateOnSelect(x)}},getBelow:function(v,x){for(var S=x.getMapLayers(),E=S.length-2;E>=0;E--){var e=S[E].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=E+1;t<S.length;t++)if(e=S[t].id,typeof e=="string"&&e.indexOf("plotly-")===-1)return e}}},moduleType:"trace",name:"choroplethmap",basePlotModule:CT(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}}}),KV=Xe({"lib/choroplethmap.js"(Z,G){"use strict";G.exports=YV()}}),O6=Xe({"src/traces/densitymap/attributes.js"(Z,G){"use strict";var v=ku(),{hovertemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ru(),e=ET(),t=Qo().extendFlat;G.exports=t({lon:e.lon,lat:e.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:e.text,hovertext:e.hovertext,hoverinfo:t({},E.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:x(),hovertemplatefallback:S(),showlegend:t({},E.showlegend,{dflt:!1})},v("",{cLetter:"z",editTypeOverride:"calc"}))}}),JV=Xe({"src/traces/densitymap/defaults.js"(Z,G){"use strict";var v=sa(),x=_h(),S=O6();G.exports=function(e,t,r,o){function a(h,c){return v.coerce(e,t,S,h,c)}var n=a("lon")||[],i=a("lat")||[],s=Math.min(n.length,i.length);if(!s){t.visible=!1;return}t._length=s,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),x(e,t,o,a,{prefix:"",cLetter:"z"})}}}),$V=Xe({"src/traces/densitymap/calc.js"(Z,G){"use strict";var v=rs(),x=sa().isArrayOrTypedArray,S=Hs().BADNUM,E=Tp(),e=sa()._;G.exports=function(r,o){for(var a=o._length,n=new Array(a),i=o.z,s=x(i)&&i.length,h=0;h<a;h++){var c=n[h]={},m=o.lon[h],p=o.lat[h];if(c.lonlat=v(m)&&v(p)?[+m,+p]:[S,S],s){var T=i[h];c.z=v(T)?T:S}}return E(r,o,{vals:s?i:[0,1],containerStr:"",cLetter:"z"}),a&&(n[0].t={labels:{lat:e(r,"lat:")+" ",lon:e(r,"lon:")+" "}}),n}}}),QV=Xe({"src/traces/densitymap/convert.js"(Z,G){"use strict";var v=rs(),x=sa(),S=$n(),E=rc(),e=Hs().BADNUM,t=m0().makeBlank;G.exports=function(o){var a=o[0].trace,n=a.visible===!0&&a._length!==0,i={layout:{visibility:"none"},paint:{}},s=a._opts={heatmap:i,geojson:t()};if(!n)return s;var h=[],c,m=a.z,p=a.radius,T=x.isArrayOrTypedArray(m)&&m.length,l=x.isArrayOrTypedArray(p);for(c=0;c<o.length;c++){var _=o[c],w=_.lonlat;if(w[0]!==e){var A={};if(T){var M=_.z;A.z=M!==e?M:0}l&&(A.r=v(p[c])&&p[c]>0?+p[c]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var g=E.extractOpts(a),b=g.reversescale?E.flipScale(g.colorscale):g.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(c=1;c<b.length;c++)y.push(b[c][0],b[c][1]);var f=["interpolate",["linear"],["get","z"],g.min,0,g.max,1];return x.extendFlat(s.heatmap.paint,{"heatmap-weight":T?f:1/(g.max-g.min),"heatmap-color":y,"heatmap-radius":l?{type:"identity",property:"r"}:a.radius,"heatmap-opacity":a.opacity}),s.geojson={type:"FeatureCollection",features:h},s.heatmap.layout.visibility="visible",s}}}),eG=Xe({"src/traces/densitymap/plot.js"(Z,G){"use strict";var v=QV(),x=b0().traceLayerPrefix;function S(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",x+t+"-heatmap"]],this.below=null}var E=S.prototype;E.update=function(e){var t=this.subplot,r=this.layerList,o=v(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(o.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(o,a),this.below=a);for(var n=0;n<r.length;n++){var i=r[n],s=i[0],h=i[1],c=o[s];t.setOptions(h,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&t.setOptions(h,"setPaintProperty",c.paint)}},E._addLayers=function(e,t){for(var r=this.subplot,o=this.layerList,a=this.sourceId,n=0;n<o.length;n++){var i=o[n],s=i[0],h=e[s];r.addLayer({type:s,id:i[1],source:a,layout:h.layout,paint:h.paint},t)}},E._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},G.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),n=a.sourceId,i=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:i.geojson}),a._addLayers(i,s),a}}}),tG=Xe({"src/traces/densitymap/hover.js"(Z,G){"use strict";var v=Go(),x=kT().hoverPoints,S=kT().getExtraText;G.exports=function(e,t,r){var o=x(e,t,r);if(o){var a=o[0],n=a.cd,i=n[0].trace,s=n[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(i,s,n[0].t.labels),[a]}}}}),rG=Xe({"src/traces/densitymap/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),aG=Xe({"src/traces/densitymap/index.js"(Z,G){"use strict";G.exports={attributes:O6(),supplyDefaults:JV(),colorbar:n0(),formatLabels:R6(),calc:$V(),plot:eG(),hoverPoints:tG(),eventData:rG(),getBelow:function(v,x){for(var S=x.getMapLayers(),E=0;E<S.length;E++){var e=S[E],t=e.id;if(e.type==="symbol"&&typeof t=="string"&&t.indexOf("plotly-")===-1)return t}},moduleType:"trace",name:"densitymap",basePlotModule:CT(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}}}),iG=Xe({"lib/densitymap.js"(Z,G){"use strict";G.exports=aG()}}),B6=Xe({"src/traces/sankey/attributes.js"(Z,G){"use strict";var v=tc(),x=ru(),S=sh(),E=Ky(),e=wc().attributes,{hovertemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=ku(),a=zl().templatedArray,n=tf().descriptionOnlyNumbers,i=Qo().extendFlat,s=pc().overrideAll,h=G.exports=s({hoverinfo:i({},x.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:E.hoverlabel,domain:e({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:n("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:v({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:E.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),hovertemplatefallback:r(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:E.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),hovertemplatefallback:r(),colorscales:a("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:i(o().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}}),nG=Xe({"src/traces/sankey/defaults.js"(Z,G){"use strict";var v=sa(),x=B6(),S=$n(),E=Ch(),e=wc().defaults,t=k_(),r=zl(),o=hp();G.exports=function(i,s,h,c){function m(L,z){return v.coerce(i,s,x,L,z)}var p=v.extendDeep(c.hoverlabel,i.hoverlabel),T=i.node,l=r.newContainer(s,"node");function _(L,z){return v.coerce(T,l,x.node,L,z)}_("label"),_("groups"),_("x"),_("y"),_("pad"),_("thickness"),_("line.color"),_("line.width"),_("hoverinfo",i.hoverinfo),t(T,l,_,p),_("hovertemplate"),_("align");var w=c.colorway,A=function(L){return w[L%w.length]};_("color",l.label.map(function(L,z){return S.addOpacity(A(z),.8)})),_("customdata");var M=i.link||{},g=r.newContainer(s,"link");function b(L,z){return v.coerce(M,g,x.link,L,z)}b("label"),b("arrowlen"),b("source"),b("target"),b("value"),b("line.color"),b("line.width"),b("hoverinfo",i.hoverinfo),t(M,g,b,p),b("hovertemplate");var d=E(c.paper_bgcolor).getLuminance()<.333,u=d?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=b("color",u);function f(L){var z=E(L);if(!z.isValid())return L;var F=z.getAlpha();return F<=.8?z.setAlpha(F+.2):z=d?z.brighten():z.darken(),z.toRgbString()}b("hovercolor",Array.isArray(y)?y.map(f):f(y)),b("customdata"),o(M,g,{name:"colorscales",handleItemDefaults:a}),e(s,c,m),m("orientation"),m("valueformat"),m("valuesuffix");var R;l.x.length&&l.y.length&&(R="freeform"),m("arrangement",R),v.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),s._length=null};function a(n,i){function s(h,c){return v.coerce(n,i,x.link.colorscales,h,c)}s("label"),s("cmin"),s("cmax"),s("colorscale")}}}),N6=Xe({"node_modules/strongly-connected-components/scc.js"(Z,G){"use strict";G.exports=v;function v(x){for(var S=x.length,E=new Array(S),e=new Array(S),t=new Array(S),r=new Array(S),o=new Array(S),a=new Array(S),n=0;n<S;++n)E[n]=-1,e[n]=0,t[n]=!1,r[n]=0,o[n]=-1,a[n]=[];var i=0,s=[],h=[];function c(l){var _=[l],w=[l];for(E[l]=e[l]=i,t[l]=!0,i+=1;w.length>0;){l=w[w.length-1];var A=x[l];if(r[l]<A.length){for(var M=r[l];M<A.length;++M){var g=A[M];if(E[g]<0){E[g]=e[g]=i,t[g]=!0,i+=1,_.push(g),w.push(g);break}else t[g]&&(e[l]=Math.min(e[l],e[g])|0);o[g]>=0&&a[l].push(o[g])}r[l]=M}else{if(e[l]===E[l]){for(var b=[],d=[],u=0,M=_.length-1;M>=0;--M){var y=_[M];if(t[y]=!1,b.push(y),d.push(a[y]),u+=a[y].length,o[y]=s.length,y===l){_.length=M;break}}s.push(b);for(var f=new Array(u),M=0;M<d.length;M++)for(var R=0;R<d[M].length;R++)f[--u]=d[M][R];h.push(f)}w.pop()}}}for(var n=0;n<S;++n)E[n]<0&&c(n);for(var m,n=0;n<h.length;n++){var p=h[n];if(p.length!==0){p.sort(function(_,w){return _-w}),m=[p[0]];for(var T=1;T<p.length;T++)p[T]!==p[T-1]&&m.push(p[T]);h[n]=m}}return{components:s,adjacencyList:h}}}}),oG=Xe({"src/traces/sankey/calc.js"(Z,G){"use strict";var v=N6(),x=sa(),S=kv().wrap,E=x.isArrayOrTypedArray,e=x.isIndex,t=rc();function r(a){var n=a.node,i=a.link,s=[],h=E(i.color),c=E(i.hovercolor),m=E(i.customdata),p={},T={},l=i.colorscales.length,_;for(_=0;_<l;_++){var w=i.colorscales[_],A=t.extractScale(w,{cLetter:"c"}),M=t.makeColorScaleFunc(A);T[w.label]=M}var g=0;for(_=0;_<i.value.length;_++)i.source[_]>g&&(g=i.source[_]),i.target[_]>g&&(g=i.target[_]);var b=g+1;a.node._count=b;var d,u=a.node.groups,y={};for(_=0;_<u.length;_++){var f=u[_];for(d=0;d<f.length;d++){var R=f[d],L=b+_;y.hasOwnProperty(R)?x.warn("Node "+R+" is already part of a group."):y[R]=L}}var z={source:[],target:[]};for(_=0;_<i.value.length;_++){var F=i.value[_],N=i.source[_],O=i.target[_];if(F>0&&e(N,b)&&e(O,b)&&!(y.hasOwnProperty(N)&&y.hasOwnProperty(O)&&y[N]===y[O])){y.hasOwnProperty(O)&&(O=y[O]),y.hasOwnProperty(N)&&(N=y[N]),N=+N,O=+O,p[N]=p[O]=!0;var P="";i.label&&i.label[_]&&(P=i.label[_]);var U=null;P&&T.hasOwnProperty(P)&&(U=T[P]),s.push({pointNumber:_,label:P,color:h?i.color[_]:i.color,hovercolor:c?i.hovercolor[_]:i.hovercolor,customdata:m?i.customdata[_]:i.customdata,concentrationscale:U,source:N,target:O,value:+F}),z.source.push(N),z.target.push(O)}}var B=b+u.length,X=E(n.color),$=E(n.customdata),se=[];for(_=0;_<B;_++)if(p[_]){var le=n.label[_];se.push({group:_>b-1,childrenNodes:[],pointNumber:_,label:le,color:X?n.color[_]:n.color,customdata:$?n.customdata[_]:n.customdata})}var fe=!1;return o(B,z.source,z.target)&&(fe=!0),{circular:fe,links:s,nodes:se,groups:u,groupLookup:y}}function o(a,n,i){for(var s=x.init2dArray(a,0),h=0;h<Math.min(n.length,i.length);h++)if(x.isIndex(n[h],a)&&x.isIndex(i[h],a)){if(n[h]===i[h])return!0;s[n[h]].push(i[h])}var c=v(s);return c.components.some(function(m){return m.length>1})}G.exports=function(n,i){var s=r(i);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),sG=Xe({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";function x(b){var d=+this._x.call(null,b),u=+this._y.call(null,b);return S(this.cover(d,u),d,u,b)}function S(b,d,u,y){if(isNaN(d)||isNaN(u))return b;var f,R=b._root,L={data:y},z=b._x0,F=b._y0,N=b._x1,O=b._y1,P,U,B,X,$,se,le,fe;if(!R)return b._root=L,b;for(;R.length;)if(($=d>=(P=(z+N)/2))?z=P:N=P,(se=u>=(U=(F+O)/2))?F=U:O=U,f=R,!(R=R[le=se<<1|$]))return f[le]=L,b;if(B=+b._x.call(null,R.data),X=+b._y.call(null,R.data),d===B&&u===X)return L.next=R,f?f[le]=L:b._root=L,b;do f=f?f[le]=new Array(4):b._root=new Array(4),($=d>=(P=(z+N)/2))?z=P:N=P,(se=u>=(U=(F+O)/2))?F=U:O=U;while((le=se<<1|$)===(fe=(X>=U)<<1|B>=P));return f[fe]=R,f[le]=L,b}function E(b){var d,u,y=b.length,f,R,L=new Array(y),z=new Array(y),F=1/0,N=1/0,O=-1/0,P=-1/0;for(u=0;u<y;++u)isNaN(f=+this._x.call(null,d=b[u]))||isNaN(R=+this._y.call(null,d))||(L[u]=f,z[u]=R,f<F&&(F=f),f>O&&(O=f),R<N&&(N=R),R>P&&(P=R));if(F>O||N>P)return this;for(this.cover(F,N).cover(O,P),u=0;u<y;++u)S(this,L[u],z[u],b[u]);return this}function e(b,d){if(isNaN(b=+b)||isNaN(d=+d))return this;var u=this._x0,y=this._y0,f=this._x1,R=this._y1;if(isNaN(u))f=(u=Math.floor(b))+1,R=(y=Math.floor(d))+1;else{for(var L=f-u,z=this._root,F,N;u>b||b>=f||y>d||d>=R;)switch(N=(d<y)<<1|b<u,F=new Array(4),F[N]=z,z=F,L*=2,N){case 0:f=u+L,R=y+L;break;case 1:u=f-L,R=y+L;break;case 2:f=u+L,y=R-L;break;case 3:u=f-L,y=R-L;break}this._root&&this._root.length&&(this._root=z)}return this._x0=u,this._y0=y,this._x1=f,this._y1=R,this}function t(){var b=[];return this.visit(function(d){if(!d.length)do b.push(d.data);while(d=d.next)}),b}function r(b){return arguments.length?this.cover(+b[0][0],+b[0][1]).cover(+b[1][0],+b[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function o(b,d,u,y,f){this.node=b,this.x0=d,this.y0=u,this.x1=y,this.y1=f}function a(b,d,u){var y,f=this._x0,R=this._y0,L,z,F,N,O=this._x1,P=this._y1,U=[],B=this._root,X,$;for(B&&U.push(new o(B,f,R,O,P)),u==null?u=1/0:(f=b-u,R=d-u,O=b+u,P=d+u,u*=u);X=U.pop();)if(!(!(B=X.node)||(L=X.x0)>O||(z=X.y0)>P||(F=X.x1)<f||(N=X.y1)<R))if(B.length){var se=(L+F)/2,le=(z+N)/2;U.push(new o(B[3],se,le,F,N),new o(B[2],L,le,se,N),new o(B[1],se,z,F,le),new o(B[0],L,z,se,le)),($=(d>=le)<<1|b>=se)&&(X=U[U.length-1],U[U.length-1]=U[U.length-1-$],U[U.length-1-$]=X)}else{var fe=b-+this._x.call(null,B.data),V=d-+this._y.call(null,B.data),Y=fe*fe+V*V;if(Y<u){var ee=Math.sqrt(u=Y);f=b-ee,R=d-ee,O=b+ee,P=d+ee,y=B.data}}return y}function n(b){if(isNaN(O=+this._x.call(null,b))||isNaN(P=+this._y.call(null,b)))return this;var d,u=this._root,y,f,R,L=this._x0,z=this._y0,F=this._x1,N=this._y1,O,P,U,B,X,$,se,le;if(!u)return this;if(u.length)for(;;){if((X=O>=(U=(L+F)/2))?L=U:F=U,($=P>=(B=(z+N)/2))?z=B:N=B,d=u,!(u=u[se=$<<1|X]))return this;if(!u.length)break;(d[se+1&3]||d[se+2&3]||d[se+3&3])&&(y=d,le=se)}for(;u.data!==b;)if(f=u,!(u=u.next))return this;return(R=u.next)&&delete u.next,f?(R?f.next=R:delete f.next,this):d?(R?d[se]=R:delete d[se],(u=d[0]||d[1]||d[2]||d[3])&&u===(d[3]||d[2]||d[1]||d[0])&&!u.length&&(y?y[le]=u:this._root=u),this):(this._root=R,this)}function i(b){for(var d=0,u=b.length;d<u;++d)this.remove(b[d]);return this}function s(){return this._root}function h(){var b=0;return this.visit(function(d){if(!d.length)do++b;while(d=d.next)}),b}function c(b){var d=[],u,y=this._root,f,R,L,z,F;for(y&&d.push(new o(y,this._x0,this._y0,this._x1,this._y1));u=d.pop();)if(!b(y=u.node,R=u.x0,L=u.y0,z=u.x1,F=u.y1)&&y.length){var N=(R+z)/2,O=(L+F)/2;(f=y[3])&&d.push(new o(f,N,O,z,F)),(f=y[2])&&d.push(new o(f,R,O,N,F)),(f=y[1])&&d.push(new o(f,N,L,z,O)),(f=y[0])&&d.push(new o(f,R,L,N,O))}return this}function m(b){var d=[],u=[],y;for(this._root&&d.push(new o(this._root,this._x0,this._y0,this._x1,this._y1));y=d.pop();){var f=y.node;if(f.length){var R,L=y.x0,z=y.y0,F=y.x1,N=y.y1,O=(L+F)/2,P=(z+N)/2;(R=f[0])&&d.push(new o(R,L,z,O,P)),(R=f[1])&&d.push(new o(R,O,z,F,P)),(R=f[2])&&d.push(new o(R,L,P,O,N)),(R=f[3])&&d.push(new o(R,O,P,F,N))}u.push(y)}for(;y=u.pop();)b(y.node,y.x0,y.y0,y.x1,y.y1);return this}function p(b){return b[0]}function T(b){return arguments.length?(this._x=b,this):this._x}function l(b){return b[1]}function _(b){return arguments.length?(this._y=b,this):this._y}function w(b,d,u){var y=new A(d??p,u??l,NaN,NaN,NaN,NaN);return b==null?y:y.addAll(b)}function A(b,d,u,y,f,R){this._x=b,this._y=d,this._x0=u,this._y0=y,this._x1=f,this._y1=R,this._root=void 0}function M(b){for(var d={data:b.data},u=d;b=b.next;)u=u.next={data:b.data};return d}var g=w.prototype=A.prototype;g.copy=function(){var b=new A(this._x,this._y,this._x0,this._y0,this._x1,this._y1),d=this._root,u,y;if(!d)return b;if(!d.length)return b._root=M(d),b;for(u=[{source:d,target:b._root=new Array(4)}];d=u.pop();)for(var f=0;f<4;++f)(y=d.source[f])&&(y.length?u.push({source:y,target:d.target[f]=new Array(4)}):d.target[f]=M(y));return b},g.add=x,g.addAll=E,g.cover=e,g.data=t,g.extent=r,g.find=a,g.remove=n,g.removeAll=i,g.root=s,g.size=h,g.visit=c,g.visitAfter=m,g.x=T,g.y=_,v.quadtree=w,Object.defineProperty(v,"__esModule",{value:!0})})}}),LT=Xe({"node_modules/d3-collection/dist/d3-collection.js"(Z,G){(function(v,x){x(typeof Z=="object"&&typeof G<"u"?Z:v.d3=v.d3||{})})(Z,function(v){"use strict";var x="$";function S(){}S.prototype=E.prototype={constructor:S,has:function(p){return x+p in this},get:function(p){return this[x+p]},set:function(p,T){return this[x+p]=T,this},remove:function(p){var T=x+p;return T in this&&delete this[T]},clear:function(){for(var p in this)p[0]===x&&delete this[p]},keys:function(){var p=[];for(var T in this)T[0]===x&&p.push(T.slice(1));return p},values:function(){var p=[];for(var T in this)T[0]===x&&p.push(this[T]);return p},entries:function(){var p=[];for(var T in this)T[0]===x&&p.push({key:T.slice(1),value:this[T]});return p},size:function(){var p=0;for(var T in this)T[0]===x&&++p;return p},empty:function(){for(var p in this)if(p[0]===x)return!1;return!0},each:function(p){for(var T in this)T[0]===x&&p(this[T],T.slice(1),this)}};function E(p,T){var l=new S;if(p instanceof S)p.each(function(g,b){l.set(b,g)});else if(Array.isArray(p)){var _=-1,w=p.length,A;if(T==null)for(;++_<w;)l.set(_,p[_]);else for(;++_<w;)l.set(T(A=p[_],_,p),A)}else if(p)for(var M in p)l.set(M,p[M]);return l}function e(){var p=[],T=[],l,_,w;function A(g,b,d,u){if(b>=p.length)return l!=null&&g.sort(l),_!=null?_(g):g;for(var y=-1,f=g.length,R=p[b++],L,z,F=E(),N,O=d();++y<f;)(N=F.get(L=R(z=g[y])+""))?N.push(z):F.set(L,[z]);return F.each(function(P,U){u(O,U,A(P,b,d,u))}),O}function M(g,b){if(++b>p.length)return g;var d,u=T[b-1];return _!=null&&b>=p.length?d=g.entries():(d=[],g.each(function(y,f){d.push({key:f,values:M(y,b)})})),u!=null?d.sort(function(y,f){return u(y.key,f.key)}):d}return w={object:function(g){return A(g,0,t,r)},map:function(g){return A(g,0,o,a)},entries:function(g){return M(A(g,0,o,a),0)},key:function(g){return p.push(g),w},sortKeys:function(g){return T[p.length-1]=g,w},sortValues:function(g){return l=g,w},rollup:function(g){return _=g,w}}}function t(){return{}}function r(p,T,l){p[T]=l}function o(){return E()}function a(p,T,l){p.set(T,l)}function n(){}var i=E.prototype;n.prototype=s.prototype={constructor:n,has:i.has,add:function(p){return p+="",this[x+p]=p,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function s(p,T){var l=new n;if(p instanceof n)p.each(function(A){l.add(A)});else if(p){var _=-1,w=p.length;if(T==null)for(;++_<w;)l.add(p[_]);else for(;++_<w;)l.add(T(p[_],_,p))}return l}function h(p){var T=[];for(var l in p)T.push(l);return T}function c(p){var T=[];for(var l in p)T.push(p[l]);return T}function m(p){var T=[];for(var l in p)T.push({key:l,value:p[l]});return T}v.nest=e,v.set=s,v.map=E,v.keys=h,v.values=c,v.entries=m,Object.defineProperty(v,"__esModule",{value:!0})})}}),lG=Xe({"node_modules/d3-dispatch/dist/d3-dispatch.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";var x={value:function(){}};function S(){for(var o=0,a=arguments.length,n={},i;o<a;++o){if(!(i=arguments[o]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new E(n)}function E(o){this._=o}function e(o,a){return o.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");if(s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!a.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}E.prototype=S.prototype={constructor:E,on:function(o,a){var n=this._,i=e(o+"",n),s,h=-1,c=i.length;if(arguments.length<2){for(;++h<c;)if((s=(o=i[h]).type)&&(s=t(n[s],o.name)))return s;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++h<c;)if(s=(o=i[h]).type)n[s]=r(n[s],o.name,a);else if(a==null)for(s in n)n[s]=r(n[s],o.name,null);return this},copy:function(){var o={},a=this._;for(var n in a)o[n]=a[n].slice();return new E(o)},call:function(o,a){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,h;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(h=this._[o],i=0,s=h.length;i<s;++i)h[i].value.apply(a,n)},apply:function(o,a,n){if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(var i=this._[o],s=0,h=i.length;s<h;++s)i[s].value.apply(a,n)}};function t(o,a){for(var n=0,i=o.length,s;n<i;++n)if((s=o[n]).name===a)return s.value}function r(o,a,n){for(var i=0,s=o.length;i<s;++i)if(o[i].name===a){o[i]=x,o=o.slice(0,i).concat(o.slice(i+1));break}return n!=null&&o.push({name:a,value:n}),o}v.dispatch=S,Object.defineProperty(v,"__esModule",{value:!0})})}}),uG=Xe({"node_modules/d3-timer/dist/d3-timer.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";var x=0,S=0,E=0,e=1e3,t,r,o=0,a=0,n=0,i=typeof performance=="object"&&performance.now?performance:Date,s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(b){setTimeout(b,17)};function h(){return a||(s(c),a=i.now()+n)}function c(){a=0}function m(){this._call=this._time=this._next=null}m.prototype=p.prototype={constructor:m,restart:function(b,d,u){if(typeof b!="function")throw new TypeError("callback is not a function");u=(u==null?h():+u)+(d==null?0:+d),!this._next&&r!==this&&(r?r._next=this:t=this,r=this),this._call=b,this._time=u,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};function p(b,d,u){var y=new m;return y.restart(b,d,u),y}function T(){h(),++x;for(var b=t,d;b;)(d=a-b._time)>=0&&b._call.call(null,d),b=b._next;--x}function l(){a=(o=i.now())+n,x=S=0;try{T()}finally{x=0,w(),a=0}}function _(){var b=i.now(),d=b-o;d>e&&(n-=d,o=b)}function w(){for(var b,d=t,u,y=1/0;d;)d._call?(y>d._time&&(y=d._time),b=d,d=d._next):(u=d._next,d._next=null,d=b?b._next=u:t=u);r=b,A(y)}function A(b){if(!x){S&&(S=clearTimeout(S));var d=b-a;d>24?(b<1/0&&(S=setTimeout(l,b-i.now()-n)),E&&(E=clearInterval(E))):(E||(o=i.now(),E=setInterval(_,e)),x=1,s(l))}}function M(b,d,u){var y=new m;return d=d==null?0:+d,y.restart(function(f){y.stop(),b(f+d)},d,u),y}function g(b,d,u){var y=new m,f=d;return d==null?(y.restart(b,d,u),y):(d=+d,u=u==null?h():+u,y.restart(function R(L){L+=f,y.restart(R,f+=d,u),b(L)},d,u),y)}v.interval=g,v.now=h,v.timeout=M,v.timer=p,v.timerFlush=T,Object.defineProperty(v,"__esModule",{value:!0})})}}),cG=Xe({"node_modules/d3-force/dist/d3-force.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,sG(),LT(),lG(),uG()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(Z,function(v,x,S,E,e){"use strict";function t(b,d){var u;b==null&&(b=0),d==null&&(d=0);function y(){var f,R=u.length,L,z=0,F=0;for(f=0;f<R;++f)L=u[f],z+=L.x,F+=L.y;for(z=z/R-b,F=F/R-d,f=0;f<R;++f)L=u[f],L.x-=z,L.y-=F}return y.initialize=function(f){u=f},y.x=function(f){return arguments.length?(b=+f,y):b},y.y=function(f){return arguments.length?(d=+f,y):d},y}function r(b){return function(){return b}}function o(){return(Math.random()-.5)*1e-6}function a(b){return b.x+b.vx}function n(b){return b.y+b.vy}function i(b){var d,u,y=1,f=1;typeof b!="function"&&(b=r(b==null?1:+b));function R(){for(var F,N=d.length,O,P,U,B,X,$,se=0;se<f;++se)for(O=x.quadtree(d,a,n).visitAfter(L),F=0;F<N;++F)P=d[F],X=u[P.index],$=X*X,U=P.x+P.vx,B=P.y+P.vy,O.visit(le);function le(fe,V,Y,ee,q){var oe=fe.data,ae=fe.r,j=X+ae;if(oe){if(oe.index>P.index){var Q=U-oe.x-oe.vx,re=B-oe.y-oe.vy,ce=Q*Q+re*re;ce<j*j&&(Q===0&&(Q=o(),ce+=Q*Q),re===0&&(re=o(),ce+=re*re),ce=(j-(ce=Math.sqrt(ce)))/ce*y,P.vx+=(Q*=ce)*(j=(ae*=ae)/($+ae)),P.vy+=(re*=ce)*j,oe.vx-=Q*(j=1-j),oe.vy-=re*j)}return}return V>U+j||ee<U-j||Y>B+j||q<B-j}}function L(F){if(F.data)return F.r=u[F.data.index];for(var N=F.r=0;N<4;++N)F[N]&&F[N].r>F.r&&(F.r=F[N].r)}function z(){if(d){var F,N=d.length,O;for(u=new Array(N),F=0;F<N;++F)O=d[F],u[O.index]=+b(O,F,d)}}return R.initialize=function(F){d=F,z()},R.iterations=function(F){return arguments.length?(f=+F,R):f},R.strength=function(F){return arguments.length?(y=+F,R):y},R.radius=function(F){return arguments.length?(b=typeof F=="function"?F:r(+F),z(),R):b},R}function s(b){return b.index}function h(b,d){var u=b.get(d);if(!u)throw new Error("missing: "+d);return u}function c(b){var d=s,u=O,y,f=r(30),R,L,z,F,N=1;b==null&&(b=[]);function O($){return 1/Math.min(z[$.source.index],z[$.target.index])}function P($){for(var se=0,le=b.length;se<N;++se)for(var fe=0,V,Y,ee,q,oe,ae,j;fe<le;++fe)V=b[fe],Y=V.source,ee=V.target,q=ee.x+ee.vx-Y.x-Y.vx||o(),oe=ee.y+ee.vy-Y.y-Y.vy||o(),ae=Math.sqrt(q*q+oe*oe),ae=(ae-R[fe])/ae*$*y[fe],q*=ae,oe*=ae,ee.vx-=q*(j=F[fe]),ee.vy-=oe*j,Y.vx+=q*(j=1-j),Y.vy+=oe*j}function U(){if(L){var $,se=L.length,le=b.length,fe=S.map(L,d),V;for($=0,z=new Array(se);$<le;++$)V=b[$],V.index=$,typeof V.source!="object"&&(V.source=h(fe,V.source)),typeof V.target!="object"&&(V.target=h(fe,V.target)),z[V.source.index]=(z[V.source.index]||0)+1,z[V.target.index]=(z[V.target.index]||0)+1;for($=0,F=new Array(le);$<le;++$)V=b[$],F[$]=z[V.source.index]/(z[V.source.index]+z[V.target.index]);y=new Array(le),B(),R=new Array(le),X()}}function B(){if(L)for(var $=0,se=b.length;$<se;++$)y[$]=+u(b[$],$,b)}function X(){if(L)for(var $=0,se=b.length;$<se;++$)R[$]=+f(b[$],$,b)}return P.initialize=function($){L=$,U()},P.links=function($){return arguments.length?(b=$,U(),P):b},P.id=function($){return arguments.length?(d=$,P):d},P.iterations=function($){return arguments.length?(N=+$,P):N},P.strength=function($){return arguments.length?(u=typeof $=="function"?$:r(+$),B(),P):u},P.distance=function($){return arguments.length?(f=typeof $=="function"?$:r(+$),X(),P):f},P}function m(b){return b.x}function p(b){return b.y}var T=10,l=Math.PI*(3-Math.sqrt(5));function _(b){var d,u=1,y=.001,f=1-Math.pow(y,1/300),R=0,L=.6,z=S.map(),F=e.timer(O),N=E.dispatch("tick","end");b==null&&(b=[]);function O(){P(),N.call("tick",d),u<y&&(F.stop(),N.call("end",d))}function P(X){var $,se=b.length,le;X===void 0&&(X=1);for(var fe=0;fe<X;++fe)for(u+=(R-u)*f,z.each(function(V){V(u)}),$=0;$<se;++$)le=b[$],le.fx==null?le.x+=le.vx*=L:(le.x=le.fx,le.vx=0),le.fy==null?le.y+=le.vy*=L:(le.y=le.fy,le.vy=0);return d}function U(){for(var X=0,$=b.length,se;X<$;++X){if(se=b[X],se.index=X,se.fx!=null&&(se.x=se.fx),se.fy!=null&&(se.y=se.fy),isNaN(se.x)||isNaN(se.y)){var le=T*Math.sqrt(X),fe=X*l;se.x=le*Math.cos(fe),se.y=le*Math.sin(fe)}(isNaN(se.vx)||isNaN(se.vy))&&(se.vx=se.vy=0)}}function B(X){return X.initialize&&X.initialize(b),X}return U(),d={tick:P,restart:function(){return F.restart(O),d},stop:function(){return F.stop(),d},nodes:function(X){return arguments.length?(b=X,U(),z.each(B),d):b},alpha:function(X){return arguments.length?(u=+X,d):u},alphaMin:function(X){return arguments.length?(y=+X,d):y},alphaDecay:function(X){return arguments.length?(f=+X,d):+f},alphaTarget:function(X){return arguments.length?(R=+X,d):R},velocityDecay:function(X){return arguments.length?(L=1-X,d):1-L},force:function(X,$){return arguments.length>1?($==null?z.remove(X):z.set(X,B($)),d):z.get(X)},find:function(X,$,se){var le=0,fe=b.length,V,Y,ee,q,oe;for(se==null?se=1/0:se*=se,le=0;le<fe;++le)q=b[le],V=X-q.x,Y=$-q.y,ee=V*V+Y*Y,ee<se&&(oe=q,se=ee);return oe},on:function(X,$){return arguments.length>1?(N.on(X,$),d):N.on(X)}}}function w(){var b,d,u,y=r(-30),f,R=1,L=1/0,z=.81;function F(U){var B,X=b.length,$=x.quadtree(b,m,p).visitAfter(O);for(u=U,B=0;B<X;++B)d=b[B],$.visit(P)}function N(){if(b){var U,B=b.length,X;for(f=new Array(B),U=0;U<B;++U)X=b[U],f[X.index]=+y(X,U,b)}}function O(U){var B=0,X,$,se=0,le,fe,V;if(U.length){for(le=fe=V=0;V<4;++V)(X=U[V])&&($=Math.abs(X.value))&&(B+=X.value,se+=$,le+=$*X.x,fe+=$*X.y);U.x=le/se,U.y=fe/se}else{X=U,X.x=X.data.x,X.y=X.data.y;do B+=f[X.data.index];while(X=X.next)}U.value=B}function P(U,B,X,$){if(!U.value)return!0;var se=U.x-d.x,le=U.y-d.y,fe=$-B,V=se*se+le*le;if(fe*fe/z<V)return V<L&&(se===0&&(se=o(),V+=se*se),le===0&&(le=o(),V+=le*le),V<R&&(V=Math.sqrt(R*V)),d.vx+=se*U.value*u/V,d.vy+=le*U.value*u/V),!0;if(U.length||V>=L)return;(U.data!==d||U.next)&&(se===0&&(se=o(),V+=se*se),le===0&&(le=o(),V+=le*le),V<R&&(V=Math.sqrt(R*V)));do U.data!==d&&(fe=f[U.data.index]*u/V,d.vx+=se*fe,d.vy+=le*fe);while(U=U.next)}return F.initialize=function(U){b=U,N()},F.strength=function(U){return arguments.length?(y=typeof U=="function"?U:r(+U),N(),F):y},F.distanceMin=function(U){return arguments.length?(R=U*U,F):Math.sqrt(R)},F.distanceMax=function(U){return arguments.length?(L=U*U,F):Math.sqrt(L)},F.theta=function(U){return arguments.length?(z=U*U,F):Math.sqrt(z)},F}function A(b,d,u){var y,f=r(.1),R,L;typeof b!="function"&&(b=r(+b)),d==null&&(d=0),u==null&&(u=0);function z(N){for(var O=0,P=y.length;O<P;++O){var U=y[O],B=U.x-d||1e-6,X=U.y-u||1e-6,$=Math.sqrt(B*B+X*X),se=(L[O]-$)*R[O]*N/$;U.vx+=B*se,U.vy+=X*se}}function F(){if(y){var N,O=y.length;for(R=new Array(O),L=new Array(O),N=0;N<O;++N)L[N]=+b(y[N],N,y),R[N]=isNaN(L[N])?0:+f(y[N],N,y)}}return z.initialize=function(N){y=N,F()},z.strength=function(N){return arguments.length?(f=typeof N=="function"?N:r(+N),F(),z):f},z.radius=function(N){return arguments.length?(b=typeof N=="function"?N:r(+N),F(),z):b},z.x=function(N){return arguments.length?(d=+N,z):d},z.y=function(N){return arguments.length?(u=+N,z):u},z}function M(b){var d=r(.1),u,y,f;typeof b!="function"&&(b=r(b==null?0:+b));function R(z){for(var F=0,N=u.length,O;F<N;++F)O=u[F],O.vx+=(f[F]-O.x)*y[F]*z}function L(){if(u){var z,F=u.length;for(y=new Array(F),f=new Array(F),z=0;z<F;++z)y[z]=isNaN(f[z]=+b(u[z],z,u))?0:+d(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(d=typeof z=="function"?z:r(+z),L(),R):d},R.x=function(z){return arguments.length?(b=typeof z=="function"?z:r(+z),L(),R):b},R}function g(b){var d=r(.1),u,y,f;typeof b!="function"&&(b=r(b==null?0:+b));function R(z){for(var F=0,N=u.length,O;F<N;++F)O=u[F],O.vy+=(f[F]-O.y)*y[F]*z}function L(){if(u){var z,F=u.length;for(y=new Array(F),f=new Array(F),z=0;z<F;++z)y[z]=isNaN(f[z]=+b(u[z],z,u))?0:+d(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(d=typeof z=="function"?z:r(+z),L(),R):d},R.y=function(z){return arguments.length?(b=typeof z=="function"?z:r(+z),L(),R):b},R}v.forceCenter=t,v.forceCollide=i,v.forceLink=c,v.forceManyBody=w,v.forceRadial=A,v.forceSimulation=_,v.forceX=M,v.forceY=g,Object.defineProperty(v,"__esModule",{value:!0})})}}),fG=Xe({"node_modules/d3-path/dist/d3-path.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";var x=Math.PI,S=2*x,E=1e-6,e=S-E;function t(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new t}t.prototype=r.prototype={constructor:t,moveTo:function(o,a){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(o,a){this._+="L"+(this._x1=+o)+","+(this._y1=+a)},quadraticCurveTo:function(o,a,n,i){this._+="Q"+ +o+","+ +a+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(o,a,n,i,s,h){this._+="C"+ +o+","+ +a+","+ +n+","+ +i+","+(this._x1=+s)+","+(this._y1=+h)},arcTo:function(o,a,n,i,s){o=+o,a=+a,n=+n,i=+i,s=+s;var h=this._x1,c=this._y1,m=n-o,p=i-a,T=h-o,l=c-a,_=T*T+l*l;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=o)+","+(this._y1=a);else if(_>E)if(!(Math.abs(l*m-p*T)>E)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=n-h,A=i-c,M=m*m+p*p,g=w*w+A*A,b=Math.sqrt(M),d=Math.sqrt(_),u=s*Math.tan((x-Math.acos((M+_-g)/(2*b*d)))/2),y=u/d,f=u/b;Math.abs(y-1)>E&&(this._+="L"+(o+y*T)+","+(a+y*l)),this._+="A"+s+","+s+",0,0,"+ +(l*w>T*A)+","+(this._x1=o+f*m)+","+(this._y1=a+f*p)}},arc:function(o,a,n,i,s,h){o=+o,a=+a,n=+n,h=!!h;var c=n*Math.cos(i),m=n*Math.sin(i),p=o+c,T=a+m,l=1^h,_=h?i-s:s-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+p+","+T:(Math.abs(this._x1-p)>E||Math.abs(this._y1-T)>E)&&(this._+="L"+p+","+T),n&&(_<0&&(_=_%S+S),_>e?this._+="A"+n+","+n+",0,1,"+l+","+(o-c)+","+(a-m)+"A"+n+","+n+",0,1,"+l+","+(this._x1=p)+","+(this._y1=T):_>E&&(this._+="A"+n+","+n+",0,"+ +(_>=x)+","+l+","+(this._x1=o+n*Math.cos(s))+","+(this._y1=a+n*Math.sin(s))))},rect:function(o,a,n,i){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},v.path=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),U6=Xe({"node_modules/d3-shape/dist/d3-shape.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,fG()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(Z,function(v,x){"use strict";function S(xt){return function(){return xt}}var E=Math.abs,e=Math.atan2,t=Math.cos,r=Math.max,o=Math.min,a=Math.sin,n=Math.sqrt,i=1e-12,s=Math.PI,h=s/2,c=2*s;function m(xt){return xt>1?0:xt<-1?s:Math.acos(xt)}function p(xt){return xt>=1?h:xt<=-1?-h:Math.asin(xt)}function T(xt){return xt.innerRadius}function l(xt){return xt.outerRadius}function _(xt){return xt.startAngle}function w(xt){return xt.endAngle}function A(xt){return xt&&xt.padAngle}function M(xt,Xt,vr,Or,ba,Pa,ya,la){var Ta=vr-xt,Ai=Or-Xt,ki=ya-ba,Ki=la-Pa,_n=Ki*Ta-ki*Ai;if(!(_n*_n<i))return _n=(ki*(Xt-Pa)-Ki*(xt-ba))/_n,[xt+_n*Ta,Xt+_n*Ai]}function g(xt,Xt,vr,Or,ba,Pa,ya){var la=xt-vr,Ta=Xt-Or,Ai=(ya?Pa:-Pa)/n(la*la+Ta*Ta),ki=Ai*Ta,Ki=-Ai*la,_n=xt+ki,Rn=Xt+Ki,En=vr+ki,On=Or+Ki,no=(_n+En)/2,cn=(Rn+On)/2,lo=En-_n,Wo=On-Rn,hs=lo*lo+Wo*Wo,Oo=ba-Pa,Wn=_n*On-En*Rn,No=(Wo<0?-1:1)*n(r(0,Oo*Oo*hs-Wn*Wn)),as=(Wn*Wo-lo*No)/hs,Ns=(-Wn*lo-Wo*No)/hs,ss=(Wn*Wo+lo*No)/hs,uo=(-Wn*lo+Wo*No)/hs,jn=as-no,Xn=Ns-cn,ls=ss-no,Cs=uo-cn;return jn*jn+Xn*Xn>ls*ls+Cs*Cs&&(as=ss,Ns=uo),{cx:as,cy:Ns,x01:-ki,y01:-Ki,x11:as*(ba/Oo-1),y11:Ns*(ba/Oo-1)}}function b(){var xt=T,Xt=l,vr=S(0),Or=null,ba=_,Pa=w,ya=A,la=null;function Ta(){var Ai,ki,Ki=+xt.apply(this,arguments),_n=+Xt.apply(this,arguments),Rn=ba.apply(this,arguments)-h,En=Pa.apply(this,arguments)-h,On=E(En-Rn),no=En>Rn;if(la||(la=Ai=x.path()),_n<Ki&&(ki=_n,_n=Ki,Ki=ki),!(_n>i))la.moveTo(0,0);else if(On>c-i)la.moveTo(_n*t(Rn),_n*a(Rn)),la.arc(0,0,_n,Rn,En,!no),Ki>i&&(la.moveTo(Ki*t(En),Ki*a(En)),la.arc(0,0,Ki,En,Rn,no));else{var cn=Rn,lo=En,Wo=Rn,hs=En,Oo=On,Wn=On,No=ya.apply(this,arguments)/2,as=No>i&&(Or?+Or.apply(this,arguments):n(Ki*Ki+_n*_n)),Ns=o(E(_n-Ki)/2,+vr.apply(this,arguments)),ss=Ns,uo=Ns,jn,Xn;if(as>i){var ls=p(as/Ki*a(No)),Cs=p(as/_n*a(No));(Oo-=ls*2)>i?(ls*=no?1:-1,Wo+=ls,hs-=ls):(Oo=0,Wo=hs=(Rn+En)/2),(Wn-=Cs*2)>i?(Cs*=no?1:-1,cn+=Cs,lo-=Cs):(Wn=0,cn=lo=(Rn+En)/2)}var Ks=_n*t(cn),Xo=_n*a(cn),Gi=Ki*t(hs),Ln=Ki*a(hs);if(Ns>i){var Us=_n*t(lo),_s=_n*a(lo),Gn=Ki*t(Wo),zs=Ki*a(Wo),vs;if(On<s&&(vs=M(Ks,Xo,Gn,zs,Us,_s,Gi,Ln))){var Ws=Ks-vs[0],il=Xo-vs[1],xn=Us-vs[0],ko=_s-vs[1],bo=1/a(m((Ws*xn+il*ko)/(n(Ws*Ws+il*il)*n(xn*xn+ko*ko)))/2),Is=n(vs[0]*vs[0]+vs[1]*vs[1]);ss=o(Ns,(Ki-Is)/(bo-1)),uo=o(Ns,(_n-Is)/(bo+1))}}Wn>i?uo>i?(jn=g(Gn,zs,Ks,Xo,_n,uo,no),Xn=g(Us,_s,Gi,Ln,_n,uo,no),la.moveTo(jn.cx+jn.x01,jn.cy+jn.y01),uo<Ns?la.arc(jn.cx,jn.cy,uo,e(jn.y01,jn.x01),e(Xn.y01,Xn.x01),!no):(la.arc(jn.cx,jn.cy,uo,e(jn.y01,jn.x01),e(jn.y11,jn.x11),!no),la.arc(0,0,_n,e(jn.cy+jn.y11,jn.cx+jn.x11),e(Xn.cy+Xn.y11,Xn.cx+Xn.x11),!no),la.arc(Xn.cx,Xn.cy,uo,e(Xn.y11,Xn.x11),e(Xn.y01,Xn.x01),!no))):(la.moveTo(Ks,Xo),la.arc(0,0,_n,cn,lo,!no)):la.moveTo(Ks,Xo),!(Ki>i)||!(Oo>i)?la.lineTo(Gi,Ln):ss>i?(jn=g(Gi,Ln,Us,_s,Ki,-ss,no),Xn=g(Ks,Xo,Gn,zs,Ki,-ss,no),la.lineTo(jn.cx+jn.x01,jn.cy+jn.y01),ss<Ns?la.arc(jn.cx,jn.cy,ss,e(jn.y01,jn.x01),e(Xn.y01,Xn.x01),!no):(la.arc(jn.cx,jn.cy,ss,e(jn.y01,jn.x01),e(jn.y11,jn.x11),!no),la.arc(0,0,Ki,e(jn.cy+jn.y11,jn.cx+jn.x11),e(Xn.cy+Xn.y11,Xn.cx+Xn.x11),no),la.arc(Xn.cx,Xn.cy,ss,e(Xn.y11,Xn.x11),e(Xn.y01,Xn.x01),!no))):la.arc(0,0,Ki,hs,Wo,no)}if(la.closePath(),Ai)return la=null,Ai+""||null}return Ta.centroid=function(){var Ai=(+xt.apply(this,arguments)+ +Xt.apply(this,arguments))/2,ki=(+ba.apply(this,arguments)+ +Pa.apply(this,arguments))/2-s/2;return[t(ki)*Ai,a(ki)*Ai]},Ta.innerRadius=function(Ai){return arguments.length?(xt=typeof Ai=="function"?Ai:S(+Ai),Ta):xt},Ta.outerRadius=function(Ai){return arguments.length?(Xt=typeof Ai=="function"?Ai:S(+Ai),Ta):Xt},Ta.cornerRadius=function(Ai){return arguments.length?(vr=typeof Ai=="function"?Ai:S(+Ai),Ta):vr},Ta.padRadius=function(Ai){return arguments.length?(Or=Ai==null?null:typeof Ai=="function"?Ai:S(+Ai),Ta):Or},Ta.startAngle=function(Ai){return arguments.length?(ba=typeof Ai=="function"?Ai:S(+Ai),Ta):ba},Ta.endAngle=function(Ai){return arguments.length?(Pa=typeof Ai=="function"?Ai:S(+Ai),Ta):Pa},Ta.padAngle=function(Ai){return arguments.length?(ya=typeof Ai=="function"?Ai:S(+Ai),Ta):ya},Ta.context=function(Ai){return arguments.length?(la=Ai??null,Ta):la},Ta}function d(xt){this._context=xt}d.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;default:this._context.lineTo(xt,Xt);break}}};function u(xt){return new d(xt)}function y(xt){return xt[0]}function f(xt){return xt[1]}function R(){var xt=y,Xt=f,vr=S(!0),Or=null,ba=u,Pa=null;function ya(la){var Ta,Ai=la.length,ki,Ki=!1,_n;for(Or==null&&(Pa=ba(_n=x.path())),Ta=0;Ta<=Ai;++Ta)!(Ta<Ai&&vr(ki=la[Ta],Ta,la))===Ki&&((Ki=!Ki)?Pa.lineStart():Pa.lineEnd()),Ki&&Pa.point(+xt(ki,Ta,la),+Xt(ki,Ta,la));if(_n)return Pa=null,_n+""||null}return ya.x=function(la){return arguments.length?(xt=typeof la=="function"?la:S(+la),ya):xt},ya.y=function(la){return arguments.length?(Xt=typeof la=="function"?la:S(+la),ya):Xt},ya.defined=function(la){return arguments.length?(vr=typeof la=="function"?la:S(!!la),ya):vr},ya.curve=function(la){return arguments.length?(ba=la,Or!=null&&(Pa=ba(Or)),ya):ba},ya.context=function(la){return arguments.length?(la==null?Or=Pa=null:Pa=ba(Or=la),ya):Or},ya}function L(){var xt=y,Xt=null,vr=S(0),Or=f,ba=S(!0),Pa=null,ya=u,la=null;function Ta(ki){var Ki,_n,Rn,En=ki.length,On,no=!1,cn,lo=new Array(En),Wo=new Array(En);for(Pa==null&&(la=ya(cn=x.path())),Ki=0;Ki<=En;++Ki){if(!(Ki<En&&ba(On=ki[Ki],Ki,ki))===no)if(no=!no)_n=Ki,la.areaStart(),la.lineStart();else{for(la.lineEnd(),la.lineStart(),Rn=Ki-1;Rn>=_n;--Rn)la.point(lo[Rn],Wo[Rn]);la.lineEnd(),la.areaEnd()}no&&(lo[Ki]=+xt(On,Ki,ki),Wo[Ki]=+vr(On,Ki,ki),la.point(Xt?+Xt(On,Ki,ki):lo[Ki],Or?+Or(On,Ki,ki):Wo[Ki]))}if(cn)return la=null,cn+""||null}function Ai(){return R().defined(ba).curve(ya).context(Pa)}return Ta.x=function(ki){return arguments.length?(xt=typeof ki=="function"?ki:S(+ki),Xt=null,Ta):xt},Ta.x0=function(ki){return arguments.length?(xt=typeof ki=="function"?ki:S(+ki),Ta):xt},Ta.x1=function(ki){return arguments.length?(Xt=ki==null?null:typeof ki=="function"?ki:S(+ki),Ta):Xt},Ta.y=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),Or=null,Ta):vr},Ta.y0=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),Ta):vr},Ta.y1=function(ki){return arguments.length?(Or=ki==null?null:typeof ki=="function"?ki:S(+ki),Ta):Or},Ta.lineX0=Ta.lineY0=function(){return Ai().x(xt).y(vr)},Ta.lineY1=function(){return Ai().x(xt).y(Or)},Ta.lineX1=function(){return Ai().x(Xt).y(vr)},Ta.defined=function(ki){return arguments.length?(ba=typeof ki=="function"?ki:S(!!ki),Ta):ba},Ta.curve=function(ki){return arguments.length?(ya=ki,Pa!=null&&(la=ya(Pa)),Ta):ya},Ta.context=function(ki){return arguments.length?(ki==null?Pa=la=null:la=ya(Pa=ki),Ta):Pa},Ta}function z(xt,Xt){return Xt<xt?-1:Xt>xt?1:Xt>=xt?0:NaN}function F(xt){return xt}function N(){var xt=F,Xt=z,vr=null,Or=S(0),ba=S(c),Pa=S(0);function ya(la){var Ta,Ai=la.length,ki,Ki,_n=0,Rn=new Array(Ai),En=new Array(Ai),On=+Or.apply(this,arguments),no=Math.min(c,Math.max(-c,ba.apply(this,arguments)-On)),cn,lo=Math.min(Math.abs(no)/Ai,Pa.apply(this,arguments)),Wo=lo*(no<0?-1:1),hs;for(Ta=0;Ta<Ai;++Ta)(hs=En[Rn[Ta]=Ta]=+xt(la[Ta],Ta,la))>0&&(_n+=hs);for(Xt!=null?Rn.sort(function(Oo,Wn){return Xt(En[Oo],En[Wn])}):vr!=null&&Rn.sort(function(Oo,Wn){return vr(la[Oo],la[Wn])}),Ta=0,Ki=_n?(no-Ai*Wo)/_n:0;Ta<Ai;++Ta,On=cn)ki=Rn[Ta],hs=En[ki],cn=On+(hs>0?hs*Ki:0)+Wo,En[ki]={data:la[ki],index:Ta,value:hs,startAngle:On,endAngle:cn,padAngle:lo};return En}return ya.value=function(la){return arguments.length?(xt=typeof la=="function"?la:S(+la),ya):xt},ya.sortValues=function(la){return arguments.length?(Xt=la,vr=null,ya):Xt},ya.sort=function(la){return arguments.length?(vr=la,Xt=null,ya):vr},ya.startAngle=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ya):Or},ya.endAngle=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ya):ba},ya.padAngle=function(la){return arguments.length?(Pa=typeof la=="function"?la:S(+la),ya):Pa},ya}var O=U(u);function P(xt){this._curve=xt}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(xt,Xt){this._curve.point(Xt*Math.sin(xt),Xt*-Math.cos(xt))}};function U(xt){function Xt(vr){return new P(xt(vr))}return Xt._curve=xt,Xt}function B(xt){var Xt=xt.curve;return xt.angle=xt.x,delete xt.x,xt.radius=xt.y,delete xt.y,xt.curve=function(vr){return arguments.length?Xt(U(vr)):Xt()._curve},xt}function X(){return B(R().curve(O))}function $(){var xt=L().curve(O),Xt=xt.curve,vr=xt.lineX0,Or=xt.lineX1,ba=xt.lineY0,Pa=xt.lineY1;return xt.angle=xt.x,delete xt.x,xt.startAngle=xt.x0,delete xt.x0,xt.endAngle=xt.x1,delete xt.x1,xt.radius=xt.y,delete xt.y,xt.innerRadius=xt.y0,delete xt.y0,xt.outerRadius=xt.y1,delete xt.y1,xt.lineStartAngle=function(){return B(vr())},delete xt.lineX0,xt.lineEndAngle=function(){return B(Or())},delete xt.lineX1,xt.lineInnerRadius=function(){return B(ba())},delete xt.lineY0,xt.lineOuterRadius=function(){return B(Pa())},delete xt.lineY1,xt.curve=function(ya){return arguments.length?Xt(U(ya)):Xt()._curve},xt}function se(xt,Xt){return[(Xt=+Xt)*Math.cos(xt-=Math.PI/2),Xt*Math.sin(xt)]}var le=Array.prototype.slice;function fe(xt){return xt.source}function V(xt){return xt.target}function Y(xt){var Xt=fe,vr=V,Or=y,ba=f,Pa=null;function ya(){var la,Ta=le.call(arguments),Ai=Xt.apply(this,Ta),ki=vr.apply(this,Ta);if(Pa||(Pa=la=x.path()),xt(Pa,+Or.apply(this,(Ta[0]=Ai,Ta)),+ba.apply(this,Ta),+Or.apply(this,(Ta[0]=ki,Ta)),+ba.apply(this,Ta)),la)return Pa=null,la+""||null}return ya.source=function(la){return arguments.length?(Xt=la,ya):Xt},ya.target=function(la){return arguments.length?(vr=la,ya):vr},ya.x=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ya):Or},ya.y=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ya):ba},ya.context=function(la){return arguments.length?(Pa=la??null,ya):Pa},ya}function ee(xt,Xt,vr,Or,ba){xt.moveTo(Xt,vr),xt.bezierCurveTo(Xt=(Xt+Or)/2,vr,Xt,ba,Or,ba)}function q(xt,Xt,vr,Or,ba){xt.moveTo(Xt,vr),xt.bezierCurveTo(Xt,vr=(vr+ba)/2,Or,vr,Or,ba)}function oe(xt,Xt,vr,Or,ba){var Pa=se(Xt,vr),ya=se(Xt,vr=(vr+ba)/2),la=se(Or,vr),Ta=se(Or,ba);xt.moveTo(Pa[0],Pa[1]),xt.bezierCurveTo(ya[0],ya[1],la[0],la[1],Ta[0],Ta[1])}function ae(){return Y(ee)}function j(){return Y(q)}function Q(){var xt=Y(oe);return xt.angle=xt.x,delete xt.x,xt.radius=xt.y,delete xt.y,xt}var re={draw:function(xt,Xt){var vr=Math.sqrt(Xt/s);xt.moveTo(vr,0),xt.arc(0,0,vr,0,c)}},ce={draw:function(xt,Xt){var vr=Math.sqrt(Xt/5)/2;xt.moveTo(-3*vr,-vr),xt.lineTo(-vr,-vr),xt.lineTo(-vr,-3*vr),xt.lineTo(vr,-3*vr),xt.lineTo(vr,-vr),xt.lineTo(3*vr,-vr),xt.lineTo(3*vr,vr),xt.lineTo(vr,vr),xt.lineTo(vr,3*vr),xt.lineTo(-vr,3*vr),xt.lineTo(-vr,vr),xt.lineTo(-3*vr,vr),xt.closePath()}},be=Math.sqrt(1/3),Ae=be*2,De={draw:function(xt,Xt){var vr=Math.sqrt(Xt/Ae),Or=vr*be;xt.moveTo(0,-vr),xt.lineTo(Or,0),xt.lineTo(0,vr),xt.lineTo(-Or,0),xt.closePath()}},ze=.8908130915292852,Ze=Math.sin(s/10)/Math.sin(7*s/10),at=Math.sin(c/10)*Ze,nt=-Math.cos(c/10)*Ze,rt={draw:function(xt,Xt){var vr=Math.sqrt(Xt*ze),Or=at*vr,ba=nt*vr;xt.moveTo(0,-vr),xt.lineTo(Or,ba);for(var Pa=1;Pa<5;++Pa){var ya=c*Pa/5,la=Math.cos(ya),Ta=Math.sin(ya);xt.lineTo(Ta*vr,-la*vr),xt.lineTo(la*Or-Ta*ba,Ta*Or+la*ba)}xt.closePath()}},st={draw:function(xt,Xt){var vr=Math.sqrt(Xt),Or=-vr/2;xt.rect(Or,Or,vr,vr)}},Me=Math.sqrt(3),ye={draw:function(xt,Xt){var vr=-Math.sqrt(Xt/(Me*3));xt.moveTo(0,vr*2),xt.lineTo(-Me*vr,-vr),xt.lineTo(Me*vr,-vr),xt.closePath()}},he=-.5,Oe=Math.sqrt(3)/2,tt=1/Math.sqrt(12),ot=(tt/2+1)*3,Qe={draw:function(xt,Xt){var vr=Math.sqrt(Xt/ot),Or=vr/2,ba=vr*tt,Pa=Or,ya=vr*tt+vr,la=-Pa,Ta=ya;xt.moveTo(Or,ba),xt.lineTo(Pa,ya),xt.lineTo(la,Ta),xt.lineTo(he*Or-Oe*ba,Oe*Or+he*ba),xt.lineTo(he*Pa-Oe*ya,Oe*Pa+he*ya),xt.lineTo(he*la-Oe*Ta,Oe*la+he*Ta),xt.lineTo(he*Or+Oe*ba,he*ba-Oe*Or),xt.lineTo(he*Pa+Oe*ya,he*ya-Oe*Pa),xt.lineTo(he*la+Oe*Ta,he*Ta-Oe*la),xt.closePath()}},Pt=[re,ce,De,st,rt,ye,Qe];function It(){var xt=S(re),Xt=S(64),vr=null;function Or(){var ba;if(vr||(vr=ba=x.path()),xt.apply(this,arguments).draw(vr,+Xt.apply(this,arguments)),ba)return vr=null,ba+""||null}return Or.type=function(ba){return arguments.length?(xt=typeof ba=="function"?ba:S(ba),Or):xt},Or.size=function(ba){return arguments.length?(Xt=typeof ba=="function"?ba:S(+ba),Or):Xt},Or.context=function(ba){return arguments.length?(vr=ba??null,Or):vr},Or}function qt(){}function Wt(xt,Xt,vr){xt._context.bezierCurveTo((2*xt._x0+xt._x1)/3,(2*xt._y0+xt._y1)/3,(xt._x0+2*xt._x1)/3,(xt._y0+2*xt._y1)/3,(xt._x0+4*xt._x1+Xt)/6,(xt._y0+4*xt._y1+vr)/6)}function kr(xt){this._context=xt}kr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Wt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Wt(this,xt,Xt);break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt}};function mr(xt){return new kr(xt)}function qr(xt){this._context=xt}qr.prototype={areaStart:qt,areaEnd:qt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._x2=xt,this._y2=Xt;break;case 1:this._point=2,this._x3=xt,this._y3=Xt;break;case 2:this._point=3,this._x4=xt,this._y4=Xt,this._context.moveTo((this._x0+4*this._x1+xt)/6,(this._y0+4*this._y1+Xt)/6);break;default:Wt(this,xt,Xt);break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt}};function Sr(xt){return new qr(xt)}function Rr(xt){this._context=xt}Rr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var vr=(this._x0+4*this._x1+xt)/6,Or=(this._y0+4*this._y1+Xt)/6;this._line?this._context.lineTo(vr,Or):this._context.moveTo(vr,Or);break;case 3:this._point=4;default:Wt(this,xt,Xt);break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt}};function wt(xt){return new Rr(xt)}function Ne(xt,Xt){this._basis=new kr(xt),this._beta=Xt}Ne.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var xt=this._x,Xt=this._y,vr=xt.length-1;if(vr>0)for(var Or=xt[0],ba=Xt[0],Pa=xt[vr]-Or,ya=Xt[vr]-ba,la=-1,Ta;++la<=vr;)Ta=la/vr,this._basis.point(this._beta*xt[la]+(1-this._beta)*(Or+Ta*Pa),this._beta*Xt[la]+(1-this._beta)*(ba+Ta*ya));this._x=this._y=null,this._basis.lineEnd()},point:function(xt,Xt){this._x.push(+xt),this._y.push(+Xt)}};var Ke=function xt(Xt){function vr(Or){return Xt===1?new kr(Or):new Ne(Or,Xt)}return vr.beta=function(Or){return xt(+Or)},vr}(.85);function Te(xt,Xt,vr){xt._context.bezierCurveTo(xt._x1+xt._k*(xt._x2-xt._x0),xt._y1+xt._k*(xt._y2-xt._y0),xt._x2+xt._k*(xt._x1-Xt),xt._y2+xt._k*(xt._y1-vr),xt._x2,xt._y2)}function Ie(xt,Xt){this._context=xt,this._k=(1-Xt)/6}Ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Te(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2,this._x1=xt,this._y1=Xt;break;case 2:this._point=3;default:Te(this,xt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ve=function xt(Xt){function vr(Or){return new Ie(Or,Xt)}return vr.tension=function(Or){return xt(+Or)},vr}(0);function Ce(xt,Xt){this._context=xt,this._k=(1-Xt)/6}Ce.prototype={areaStart:qt,areaEnd:qt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._x3=xt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=xt,this._y4=Xt);break;case 2:this._point=3,this._x5=xt,this._y5=Xt;break;default:Te(this,xt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ee=function xt(Xt){function vr(Or){return new Ce(Or,Xt)}return vr.tension=function(Or){return xt(+Or)},vr}(0);function Pe(xt,Xt){this._context=xt,this._k=(1-Xt)/6}Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Te(this,xt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var ft=function xt(Xt){function vr(Or){return new Pe(Or,Xt)}return vr.tension=function(Or){return xt(+Or)},vr}(0);function ct(xt,Xt,vr){var Or=xt._x1,ba=xt._y1,Pa=xt._x2,ya=xt._y2;if(xt._l01_a>i){var la=2*xt._l01_2a+3*xt._l01_a*xt._l12_a+xt._l12_2a,Ta=3*xt._l01_a*(xt._l01_a+xt._l12_a);Or=(Or*la-xt._x0*xt._l12_2a+xt._x2*xt._l01_2a)/Ta,ba=(ba*la-xt._y0*xt._l12_2a+xt._y2*xt._l01_2a)/Ta}if(xt._l23_a>i){var Ai=2*xt._l23_2a+3*xt._l23_a*xt._l12_a+xt._l12_2a,ki=3*xt._l23_a*(xt._l23_a+xt._l12_a);Pa=(Pa*Ai+xt._x1*xt._l23_2a-Xt*xt._l12_2a)/ki,ya=(ya*Ai+xt._y1*xt._l23_2a-vr*xt._l12_2a)/ki}xt._context.bezierCurveTo(Or,ba,Pa,ya,xt._x2,xt._y2)}function _t(xt,Xt){this._context=xt,this._alpha=Xt}_t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){if(xt=+xt,Xt=+Xt,this._point){var vr=this._x2-xt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;break;case 2:this._point=3;default:ct(this,xt,Xt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ct=function xt(Xt){function vr(Or){return Xt?new _t(Or,Xt):new Ie(Or,0)}return vr.alpha=function(Or){return xt(+Or)},vr}(.5);function ir(xt,Xt){this._context=xt,this._alpha=Xt}ir.prototype={areaStart:qt,areaEnd:qt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(xt,Xt){if(xt=+xt,Xt=+Xt,this._point){var vr=this._x2-xt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=xt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=xt,this._y4=Xt);break;case 2:this._point=3,this._x5=xt,this._y5=Xt;break;default:ct(this,xt,Xt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var rr=function xt(Xt){function vr(Or){return Xt?new ir(Or,Xt):new Ce(Or,0)}return vr.alpha=function(Or){return xt(+Or)},vr}(.5);function er(xt,Xt){this._context=xt,this._alpha=Xt}er.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){if(xt=+xt,Xt=+Xt,this._point){var vr=this._x2-xt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ct(this,xt,Xt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Lr=function xt(Xt){function vr(Or){return Xt?new er(Or,Xt):new Pe(Or,0)}return vr.alpha=function(Or){return xt(+Or)},vr}(.5);function fa(xt){this._context=xt}fa.prototype={areaStart:qt,areaEnd:qt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(xt,Xt){xt=+xt,Xt=+Xt,this._point?this._context.lineTo(xt,Xt):(this._point=1,this._context.moveTo(xt,Xt))}};function Da(xt){return new fa(xt)}function Ia(xt){return xt<0?-1:1}function qa(xt,Xt,vr){var Or=xt._x1-xt._x0,ba=Xt-xt._x1,Pa=(xt._y1-xt._y0)/(Or||ba<0&&-0),ya=(vr-xt._y1)/(ba||Or<0&&-0),la=(Pa*ba+ya*Or)/(Or+ba);return(Ia(Pa)+Ia(ya))*Math.min(Math.abs(Pa),Math.abs(ya),.5*Math.abs(la))||0}function Wa(xt,Xt){var vr=xt._x1-xt._x0;return vr?(3*(xt._y1-xt._y0)/vr-Xt)/2:Xt}function Ca(xt,Xt,vr){var Or=xt._x0,ba=xt._y0,Pa=xt._x1,ya=xt._y1,la=(Pa-Or)/3;xt._context.bezierCurveTo(Or+la,ba+la*Xt,Pa-la,ya-la*vr,Pa,ya)}function hi(xt){this._context=xt}hi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ca(this,this._t0,Wa(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){var vr=NaN;if(xt=+xt,Xt=+Xt,!(xt===this._x1&&Xt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;break;case 2:this._point=3,Ca(this,Wa(this,vr=qa(this,xt,Xt)),vr);break;default:Ca(this,this._t0,vr=qa(this,xt,Xt));break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt,this._t0=vr}}};function wi(xt){this._context=new Kt(xt)}(wi.prototype=Object.create(hi.prototype)).point=function(xt,Xt){hi.prototype.point.call(this,Xt,xt)};function Kt(xt){this._context=xt}Kt.prototype={moveTo:function(xt,Xt){this._context.moveTo(Xt,xt)},closePath:function(){this._context.closePath()},lineTo:function(xt,Xt){this._context.lineTo(Xt,xt)},bezierCurveTo:function(xt,Xt,vr,Or,ba,Pa){this._context.bezierCurveTo(Xt,xt,Or,vr,Pa,ba)}};function Ft(xt){return new hi(xt)}function Yt(xt){return new wi(xt)}function Jt(xt){this._context=xt}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var xt=this._x,Xt=this._y,vr=xt.length;if(vr)if(this._line?this._context.lineTo(xt[0],Xt[0]):this._context.moveTo(xt[0],Xt[0]),vr===2)this._context.lineTo(xt[1],Xt[1]);else for(var Or=Fr(xt),ba=Fr(Xt),Pa=0,ya=1;ya<vr;++Pa,++ya)this._context.bezierCurveTo(Or[0][Pa],ba[0][Pa],Or[1][Pa],ba[1][Pa],xt[ya],Xt[ya]);(this._line||this._line!==0&&vr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(xt,Xt){this._x.push(+xt),this._y.push(+Xt)}};function Fr(xt){var Xt,vr=xt.length-1,Or,ba=new Array(vr),Pa=new Array(vr),ya=new Array(vr);for(ba[0]=0,Pa[0]=2,ya[0]=xt[0]+2*xt[1],Xt=1;Xt<vr-1;++Xt)ba[Xt]=1,Pa[Xt]=4,ya[Xt]=4*xt[Xt]+2*xt[Xt+1];for(ba[vr-1]=2,Pa[vr-1]=7,ya[vr-1]=8*xt[vr-1]+xt[vr],Xt=1;Xt<vr;++Xt)Or=ba[Xt]/Pa[Xt-1],Pa[Xt]-=Or,ya[Xt]-=Or*ya[Xt-1];for(ba[vr-1]=ya[vr-1]/Pa[vr-1],Xt=vr-2;Xt>=0;--Xt)ba[Xt]=(ya[Xt]-ba[Xt+1])/Pa[Xt];for(Pa[vr-1]=(xt[vr]+ba[vr-1])/2,Xt=0;Xt<vr-1;++Xt)Pa[Xt]=2*xt[Xt+1]-ba[Xt+1];return[ba,Pa]}function ta(xt){return new Jt(xt)}function ra(xt,Xt){this._context=xt,this._t=Xt}ra.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Xt),this._context.lineTo(xt,Xt);else{var vr=this._x*(1-this._t)+xt*this._t;this._context.lineTo(vr,this._y),this._context.lineTo(vr,Xt)}break}}this._x=xt,this._y=Xt}};function ca(xt){return new ra(xt,.5)}function Ba(xt){return new ra(xt,0)}function $a(xt){return new ra(xt,1)}function Za(xt,Xt){if((ya=xt.length)>1)for(var vr=1,Or,ba,Pa=xt[Xt[0]],ya,la=Pa.length;vr<ya;++vr)for(ba=Pa,Pa=xt[Xt[vr]],Or=0;Or<la;++Or)Pa[Or][1]+=Pa[Or][0]=isNaN(ba[Or][1])?ba[Or][0]:ba[Or][1]}function ri(xt){for(var Xt=xt.length,vr=new Array(Xt);--Xt>=0;)vr[Xt]=Xt;return vr}function pi(xt,Xt){return xt[Xt]}function Ra(){var xt=S([]),Xt=ri,vr=Za,Or=pi;function ba(Pa){var ya=xt.apply(this,arguments),la,Ta=Pa.length,Ai=ya.length,ki=new Array(Ai),Ki;for(la=0;la<Ai;++la){for(var _n=ya[la],Rn=ki[la]=new Array(Ta),En=0,On;En<Ta;++En)Rn[En]=On=[0,+Or(Pa[En],_n,En,Pa)],On.data=Pa[En];Rn.key=_n}for(la=0,Ki=Xt(ki);la<Ai;++la)ki[Ki[la]].index=la;return vr(ki,Ki),ki}return ba.keys=function(Pa){return arguments.length?(xt=typeof Pa=="function"?Pa:S(le.call(Pa)),ba):xt},ba.value=function(Pa){return arguments.length?(Or=typeof Pa=="function"?Pa:S(+Pa),ba):Or},ba.order=function(Pa){return arguments.length?(Xt=Pa==null?ri:typeof Pa=="function"?Pa:S(le.call(Pa)),ba):Xt},ba.offset=function(Pa){return arguments.length?(vr=Pa??Za,ba):vr},ba}function tn(xt,Xt){if((Or=xt.length)>0){for(var vr,Or,ba=0,Pa=xt[0].length,ya;ba<Pa;++ba){for(ya=vr=0;vr<Or;++vr)ya+=xt[vr][ba][1]||0;if(ya)for(vr=0;vr<Or;++vr)xt[vr][ba][1]/=ya}Za(xt,Xt)}}function on(xt,Xt){if((Ta=xt.length)>0)for(var vr,Or=0,ba,Pa,ya,la,Ta,Ai=xt[Xt[0]].length;Or<Ai;++Or)for(ya=la=0,vr=0;vr<Ta;++vr)(Pa=(ba=xt[Xt[vr]][Or])[1]-ba[0])>0?(ba[0]=ya,ba[1]=ya+=Pa):Pa<0?(ba[1]=la,ba[0]=la+=Pa):(ba[0]=0,ba[1]=Pa)}function hn(xt,Xt){if((ba=xt.length)>0){for(var vr=0,Or=xt[Xt[0]],ba,Pa=Or.length;vr<Pa;++vr){for(var ya=0,la=0;ya<ba;++ya)la+=xt[ya][vr][1]||0;Or[vr][1]+=Or[vr][0]=-la/2}Za(xt,Xt)}}function Tt(xt,Xt){if(!(!((ya=xt.length)>0)||!((Pa=(ba=xt[Xt[0]]).length)>0))){for(var vr=0,Or=1,ba,Pa,ya;Or<Pa;++Or){for(var la=0,Ta=0,Ai=0;la<ya;++la){for(var ki=xt[Xt[la]],Ki=ki[Or][1]||0,_n=ki[Or-1][1]||0,Rn=(Ki-_n)/2,En=0;En<la;++En){var On=xt[Xt[En]],no=On[Or][1]||0,cn=On[Or-1][1]||0;Rn+=no-cn}Ta+=Ki,Ai+=Rn*Ki}ba[Or-1][1]+=ba[Or-1][0]=vr,Ta&&(vr-=Ai/Ta)}ba[Or-1][1]+=ba[Or-1][0]=vr,Za(xt,Xt)}}function ut(xt){var Xt=xt.map(Br);return ri(xt).sort(function(vr,Or){return Xt[vr]-Xt[Or]})}function Br(xt){for(var Xt=-1,vr=0,Or=xt.length,ba,Pa=-1/0;++Xt<Or;)(ba=+xt[Xt][1])>Pa&&(Pa=ba,vr=Xt);return vr}function Cr(xt){var Xt=xt.map(xr);return ri(xt).sort(function(vr,Or){return Xt[vr]-Xt[Or]})}function xr(xt){for(var Xt=0,vr=-1,Or=xt.length,ba;++vr<Or;)(ba=+xt[vr][1])&&(Xt+=ba);return Xt}function Ir(xt){return Cr(xt).reverse()}function Ur(xt){var Xt=xt.length,vr,Or,ba=xt.map(xr),Pa=ut(xt),ya=0,la=0,Ta=[],Ai=[];for(vr=0;vr<Xt;++vr)Or=Pa[vr],ya<la?(ya+=ba[Or],Ta.push(Or)):(la+=ba[Or],Ai.push(Or));return Ai.reverse().concat(Ta)}function Hr(xt){return ri(xt).reverse()}v.arc=b,v.area=L,v.areaRadial=$,v.curveBasis=mr,v.curveBasisClosed=Sr,v.curveBasisOpen=wt,v.curveBundle=Ke,v.curveCardinal=Ve,v.curveCardinalClosed=Ee,v.curveCardinalOpen=ft,v.curveCatmullRom=Ct,v.curveCatmullRomClosed=rr,v.curveCatmullRomOpen=Lr,v.curveLinear=u,v.curveLinearClosed=Da,v.curveMonotoneX=Ft,v.curveMonotoneY=Yt,v.curveNatural=ta,v.curveStep=ca,v.curveStepAfter=$a,v.curveStepBefore=Ba,v.line=R,v.lineRadial=X,v.linkHorizontal=ae,v.linkRadial=Q,v.linkVertical=j,v.pie=N,v.pointRadial=se,v.radialArea=$,v.radialLine=X,v.stack=Ra,v.stackOffsetDiverging=on,v.stackOffsetExpand=tn,v.stackOffsetNone=Za,v.stackOffsetSilhouette=hn,v.stackOffsetWiggle=Tt,v.stackOrderAppearance=ut,v.stackOrderAscending=Cr,v.stackOrderDescending=Ir,v.stackOrderInsideOut=Ur,v.stackOrderNone=ri,v.stackOrderReverse=Hr,v.symbol=It,v.symbolCircle=re,v.symbolCross=ce,v.symbolDiamond=De,v.symbolSquare=st,v.symbolStar=rt,v.symbolTriangle=ye,v.symbolWye=Qe,v.symbols=Pt,Object.defineProperty(v,"__esModule",{value:!0})})}}),hG=Xe({"node_modules/@plotly/d3-sankey/build/d3-sankey.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,_x(),LT(),U6()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3)})(Z,function(v,x,S,E){"use strict";function e(u){return u.target.depth}function t(u){return u.depth}function r(u,y){return y-1-u.height}function o(u,y){return u.sourceLinks.length?u.depth:y-1}function a(u){return u.targetLinks.length?u.depth:u.sourceLinks.length?x.min(u.sourceLinks,e)-1:0}function n(u){return function(){return u}}function i(u,y){return h(u.source,y.source)||u.index-y.index}function s(u,y){return h(u.target,y.target)||u.index-y.index}function h(u,y){return u.y0-y.y0}function c(u){return u.value}function m(u){return(u.y0+u.y1)/2}function p(u){return m(u.source)*u.value}function T(u){return m(u.target)*u.value}function l(u){return u.index}function _(u){return u.nodes}function w(u){return u.links}function A(u,y){var f=u.get(y);if(!f)throw new Error("missing: "+y);return f}var M=function(){var u=0,y=0,f=1,R=1,L=24,z=8,F=l,N=o,O=_,P=w,U=32,B=2/3;function X(){var Y={nodes:O.apply(null,arguments),links:P.apply(null,arguments)};return $(Y),se(Y),le(Y),fe(Y,U),V(Y),Y}X.update=function(Y){return V(Y),Y},X.nodeId=function(Y){return arguments.length?(F=typeof Y=="function"?Y:n(Y),X):F},X.nodeAlign=function(Y){return arguments.length?(N=typeof Y=="function"?Y:n(Y),X):N},X.nodeWidth=function(Y){return arguments.length?(L=+Y,X):L},X.nodePadding=function(Y){return arguments.length?(z=+Y,X):z},X.nodes=function(Y){return arguments.length?(O=typeof Y=="function"?Y:n(Y),X):O},X.links=function(Y){return arguments.length?(P=typeof Y=="function"?Y:n(Y),X):P},X.size=function(Y){return arguments.length?(u=y=0,f=+Y[0],R=+Y[1],X):[f-u,R-y]},X.extent=function(Y){return arguments.length?(u=+Y[0][0],f=+Y[1][0],y=+Y[0][1],R=+Y[1][1],X):[[u,y],[f,R]]},X.iterations=function(Y){return arguments.length?(U=+Y,X):U};function $(Y){Y.nodes.forEach(function(q,oe){q.index=oe,q.sourceLinks=[],q.targetLinks=[]});var ee=S.map(Y.nodes,F);Y.links.forEach(function(q,oe){q.index=oe;var ae=q.source,j=q.target;typeof ae!="object"&&(ae=q.source=A(ee,ae)),typeof j!="object"&&(j=q.target=A(ee,j)),ae.sourceLinks.push(q),j.targetLinks.push(q)})}function se(Y){Y.nodes.forEach(function(ee){ee.value=Math.max(x.sum(ee.sourceLinks,c),x.sum(ee.targetLinks,c))})}function le(Y){var ee,q,oe;for(ee=Y.nodes,q=[],oe=0;ee.length;++oe,ee=q,q=[])ee.forEach(function(j){j.depth=oe,j.sourceLinks.forEach(function(Q){q.indexOf(Q.target)<0&&q.push(Q.target)})});for(ee=Y.nodes,q=[],oe=0;ee.length;++oe,ee=q,q=[])ee.forEach(function(j){j.height=oe,j.targetLinks.forEach(function(Q){q.indexOf(Q.source)<0&&q.push(Q.source)})});var ae=(f-u-L)/(oe-1);Y.nodes.forEach(function(j){j.x1=(j.x0=u+Math.max(0,Math.min(oe-1,Math.floor(N.call(null,j,oe))))*ae)+L})}function fe(Y){var ee=S.nest().key(function(ce){return ce.x0}).sortKeys(x.ascending).entries(Y.nodes).map(function(ce){return ce.values});ae(),re();for(var q=1,oe=U;oe>0;--oe)Q(q*=.99),re(),j(q),re();function ae(){var ce=x.max(ee,function(De){return De.length}),be=B*(R-y)/(ce-1);z>be&&(z=be);var Ae=x.min(ee,function(De){return(R-y-(De.length-1)*z)/x.sum(De,c)});ee.forEach(function(De){De.forEach(function(ze,Ze){ze.y1=(ze.y0=Ze)+ze.value*Ae})}),Y.links.forEach(function(De){De.width=De.value*Ae})}function j(ce){ee.forEach(function(be){be.forEach(function(Ae){if(Ae.targetLinks.length){var De=(x.sum(Ae.targetLinks,p)/x.sum(Ae.targetLinks,c)-m(Ae))*ce;Ae.y0+=De,Ae.y1+=De}})})}function Q(ce){ee.slice().reverse().forEach(function(be){be.forEach(function(Ae){if(Ae.sourceLinks.length){var De=(x.sum(Ae.sourceLinks,T)/x.sum(Ae.sourceLinks,c)-m(Ae))*ce;Ae.y0+=De,Ae.y1+=De}})})}function re(){ee.forEach(function(ce){var be,Ae,De=y,ze=ce.length,Ze;for(ce.sort(h),Ze=0;Ze<ze;++Ze)be=ce[Ze],Ae=De-be.y0,Ae>0&&(be.y0+=Ae,be.y1+=Ae),De=be.y1+z;if(Ae=De-z-R,Ae>0)for(De=be.y0-=Ae,be.y1-=Ae,Ze=ze-2;Ze>=0;--Ze)be=ce[Ze],Ae=be.y1+z-De,Ae>0&&(be.y0-=Ae,be.y1-=Ae),De=be.y0})}}function V(Y){Y.nodes.forEach(function(ee){ee.sourceLinks.sort(s),ee.targetLinks.sort(i)}),Y.nodes.forEach(function(ee){var q=ee.y0,oe=q;ee.sourceLinks.forEach(function(ae){ae.y0=q+ae.width/2,q+=ae.width}),ee.targetLinks.forEach(function(ae){ae.y1=oe+ae.width/2,oe+=ae.width})})}return X};function g(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var d=function(){return E.linkHorizontal().source(g).target(b)};v.sankey=M,v.sankeyCenter=a,v.sankeyLeft=t,v.sankeyRight=r,v.sankeyJustify=o,v.sankeyLinkHorizontal=d,Object.defineProperty(v,"__esModule",{value:!0})})}}),pG=Xe({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,G){var v=N6();G.exports=function(S,E){var e=[],t=[],r=[],o={},a=[],n;function i(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(M){delete o[A][M],r[M]&&i(M)})}function s(A){var M=!1;t.push(A),r[A]=!0;var g,b;for(g=0;g<a[A].length;g++)b=a[A][g],b===n?(h(n,t),M=!0):r[b]||(M=s(b));if(M)i(A);else for(g=0;g<a[A].length;g++){b=a[A][g];var d=o[b];d||(d={},o[b]=d),d[b]=!0}return t.pop(),M}function h(A,M){var g=[].concat(M).concat(A);E?E(s):e.push(g)}function c(A){for(var M=0;M<S.length;M++)M<A&&(S[M]=[]),S[M]=S[M].filter(function(g){return g>=A})}function m(A){c(A);for(var M=S,g=v(M),b=g.components.filter(function(z){return z.length>1}),d=1/0,u,y=0;y<b.length;y++)for(var f=0;f<b[y].length;f++)b[y][f]<d&&(d=b[y][f],u=y);var R=b[u];if(!R)return!1;var L=S.map(function(z,F){return R.indexOf(F)===-1?[]:z.filter(function(N){return R.indexOf(N)!==-1})});return{leastVertex:d,adjList:L}}n=0;for(var p=S.length;n<p;){var T=m(n);if(n=T.leastVertex,a=T.adjList,a){for(var l=0;l<a.length;l++)for(var _=0;_<a[l].length;_++){var w=a[l][_];r[+w]=!1,o[w]={}}s(n),n=n+1}else n=p}if(!E)return e}}}),dG=Xe({"node_modules/@plotly/d3-sankey-circular/dist/d3-sankey-circular.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,_x(),LT(),U6(),pG()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3,null)})(Z,function(v,x,S,E,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;function t(ze){return ze.target.depth}function r(ze){return ze.depth}function o(ze,Ze){return Ze-1-ze.height}function a(ze,Ze){return ze.sourceLinks.length?ze.depth:Ze-1}function n(ze){return ze.targetLinks.length?ze.depth:ze.sourceLinks.length?x.min(ze.sourceLinks,t)-1:0}function i(ze){return function(){return ze}}var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ze){return typeof ze}:function(ze){return ze&&typeof Symbol=="function"&&ze.constructor===Symbol&&ze!==Symbol.prototype?"symbol":typeof ze};function h(ze,Ze){return m(ze.source,Ze.source)||ze.index-Ze.index}function c(ze,Ze){return m(ze.target,Ze.target)||ze.index-Ze.index}function m(ze,Ze){return ze.partOfCycle===Ze.partOfCycle?ze.y0-Ze.y0:ze.circularLinkType==="top"||Ze.circularLinkType==="bottom"?-1:1}function p(ze){return ze.value}function T(ze){return(ze.y0+ze.y1)/2}function l(ze){return T(ze.source)}function _(ze){return T(ze.target)}function w(ze){return ze.index}function A(ze){return ze.nodes}function M(ze){return ze.links}function g(ze,Ze){var at=ze.get(Ze);if(!at)throw new Error("missing: "+Ze);return at}function b(ze,Ze){return Ze(ze)}var d=25,u=10,y=.3;function f(){var ze=0,Ze=0,at=1,nt=1,rt=24,st,Me=w,ye=a,he=A,Oe=M,tt=32,ot=2,Qe,Pt=null;function It(){var wt={nodes:he.apply(null,arguments),links:Oe.apply(null,arguments)};qt(wt),R(wt,Me,Pt),Wt(wt),qr(wt),L(wt,Me),Sr(wt,tt,Me),Rr(wt);for(var Ne=4,Ke=0;Ke<Ne;Ke++)Q(wt,nt,Me),re(wt,nt,Me),oe(wt,Ze,nt,Me),Q(wt,nt,Me),re(wt,nt,Me);return De(wt,Ze,nt),U(wt,ot,nt,Me),wt}It.nodeId=function(wt){return arguments.length?(Me=typeof wt=="function"?wt:i(wt),It):Me},It.nodeAlign=function(wt){return arguments.length?(ye=typeof wt=="function"?wt:i(wt),It):ye},It.nodeWidth=function(wt){return arguments.length?(rt=+wt,It):rt},It.nodePadding=function(wt){return arguments.length?(st=+wt,It):st},It.nodes=function(wt){return arguments.length?(he=typeof wt=="function"?wt:i(wt),It):he},It.links=function(wt){return arguments.length?(Oe=typeof wt=="function"?wt:i(wt),It):Oe},It.size=function(wt){return arguments.length?(ze=Ze=0,at=+wt[0],nt=+wt[1],It):[at-ze,nt-Ze]},It.extent=function(wt){return arguments.length?(ze=+wt[0][0],at=+wt[1][0],Ze=+wt[0][1],nt=+wt[1][1],It):[[ze,Ze],[at,nt]]},It.iterations=function(wt){return arguments.length?(tt=+wt,It):tt},It.circularLinkGap=function(wt){return arguments.length?(ot=+wt,It):ot},It.nodePaddingRatio=function(wt){return arguments.length?(Qe=+wt,It):Qe},It.sortNodes=function(wt){return arguments.length?(Pt=wt,It):Pt},It.update=function(wt){return L(wt,Me),Rr(wt),wt.links.forEach(function(Ne){Ne.circular&&(Ne.circularLinkType=Ne.y0+Ne.y1<nt?"top":"bottom",Ne.source.circularLinkType=Ne.circularLinkType,Ne.target.circularLinkType=Ne.circularLinkType)}),Q(wt,nt,Me,!1),re(wt,nt,Me),U(wt,ot,nt,Me),wt};function qt(wt){wt.nodes.forEach(function(Ke,Te){Ke.index=Te,Ke.sourceLinks=[],Ke.targetLinks=[]});var Ne=S.map(wt.nodes,Me);return wt.links.forEach(function(Ke,Te){Ke.index=Te;var Ie=Ke.source,Ve=Ke.target;(typeof Ie>"u"?"undefined":s(Ie))!=="object"&&(Ie=Ke.source=g(Ne,Ie)),(typeof Ve>"u"?"undefined":s(Ve))!=="object"&&(Ve=Ke.target=g(Ne,Ve)),Ie.sourceLinks.push(Ke),Ve.targetLinks.push(Ke)}),wt}function Wt(wt){wt.nodes.forEach(function(Ne){Ne.partOfCycle=!1,Ne.value=Math.max(x.sum(Ne.sourceLinks,p),x.sum(Ne.targetLinks,p)),Ne.sourceLinks.forEach(function(Ke){Ke.circular&&(Ne.partOfCycle=!0,Ne.circularLinkType=Ke.circularLinkType)}),Ne.targetLinks.forEach(function(Ke){Ke.circular&&(Ne.partOfCycle=!0,Ne.circularLinkType=Ke.circularLinkType)})})}function kr(wt){var Ne=0,Ke=0,Te=0,Ie=0,Ve=x.max(wt.nodes,function(Ce){return Ce.column});return wt.links.forEach(function(Ce){Ce.circular&&(Ce.circularLinkType=="top"?Ne=Ne+Ce.width:Ke=Ke+Ce.width,Ce.target.column==0&&(Ie=Ie+Ce.width),Ce.source.column==Ve&&(Te=Te+Ce.width))}),Ne=Ne>0?Ne+d+u:Ne,Ke=Ke>0?Ke+d+u:Ke,Te=Te>0?Te+d+u:Te,Ie=Ie>0?Ie+d+u:Ie,{top:Ne,bottom:Ke,left:Ie,right:Te}}function mr(wt,Ne){var Ke=x.max(wt.nodes,function(ft){return ft.column}),Te=at-ze,Ie=nt-Ze,Ve=Te+Ne.right+Ne.left,Ce=Ie+Ne.top+Ne.bottom,Ee=Te/Ve,Pe=Ie/Ce;return ze=ze*Ee+Ne.left,at=Ne.right==0?at:at*Ee,Ze=Ze*Pe+Ne.top,nt=nt*Pe,wt.nodes.forEach(function(ft){ft.x0=ze+ft.column*((at-ze-rt)/Ke),ft.x1=ft.x0+rt}),Pe}function qr(wt){var Ne,Ke,Te;for(Ne=wt.nodes,Ke=[],Te=0;Ne.length;++Te,Ne=Ke,Ke=[])Ne.forEach(function(Ie){Ie.depth=Te,Ie.sourceLinks.forEach(function(Ve){Ke.indexOf(Ve.target)<0&&!Ve.circular&&Ke.push(Ve.target)})});for(Ne=wt.nodes,Ke=[],Te=0;Ne.length;++Te,Ne=Ke,Ke=[])Ne.forEach(function(Ie){Ie.height=Te,Ie.targetLinks.forEach(function(Ve){Ke.indexOf(Ve.source)<0&&!Ve.circular&&Ke.push(Ve.source)})});wt.nodes.forEach(function(Ie){Ie.column=Math.floor(ye.call(null,Ie,Te))})}function Sr(wt,Ne,Ke){var Te=S.nest().key(function(ft){return ft.column}).sortKeys(x.ascending).entries(wt.nodes).map(function(ft){return ft.values});Ce(Ke),Pe();for(var Ie=1,Ve=Ne;Ve>0;--Ve)Ee(Ie*=.99,Ke),Pe();function Ce(ft){if(Qe){var ct=1/0;Te.forEach(function(rr){var er=nt*Qe/(rr.length+1);ct=er<ct?er:ct}),st=ct}var _t=x.min(Te,function(rr){return(nt-Ze-(rr.length-1)*st)/x.sum(rr,p)});_t=_t*y,wt.links.forEach(function(rr){rr.width=rr.value*_t});var Ct=kr(wt),ir=mr(wt,Ct);_t=_t*ir,wt.links.forEach(function(rr){rr.width=rr.value*_t}),Te.forEach(function(rr){var er=rr.length;rr.forEach(function(Lr,fa){Lr.depth==Te.length-1&&er==1||Lr.depth==0&&er==1?(Lr.y0=nt/2-Lr.value*_t,Lr.y1=Lr.y0+Lr.value*_t):Lr.partOfCycle?N(Lr,ft)==0?(Lr.y0=nt/2+fa,Lr.y1=Lr.y0+Lr.value*_t):Lr.circularLinkType=="top"?(Lr.y0=Ze+fa,Lr.y1=Lr.y0+Lr.value*_t):(Lr.y0=nt-Lr.value*_t-fa,Lr.y1=Lr.y0+Lr.value*_t):Ct.top==0||Ct.bottom==0?(Lr.y0=(nt-Ze)/er*fa,Lr.y1=Lr.y0+Lr.value*_t):(Lr.y0=(nt-Ze)/2-er/2+fa,Lr.y1=Lr.y0+Lr.value*_t)})})}function Ee(ft,ct){var _t=Te.length;Te.forEach(function(Ct){var ir=Ct.length,rr=Ct[0].depth;Ct.forEach(function(er){var Lr;if((er.sourceLinks.length||er.targetLinks.length)&&!(er.partOfCycle&&N(er,ct)>0))if(rr==0&&ir==1)Lr=er.y1-er.y0,er.y0=nt/2-Lr/2,er.y1=nt/2+Lr/2;else if(rr==_t-1&&ir==1)Lr=er.y1-er.y0,er.y0=nt/2-Lr/2,er.y1=nt/2+Lr/2;else{var fa=0,Da=x.mean(er.sourceLinks,_),Ia=x.mean(er.targetLinks,l);Da&&Ia?fa=(Da+Ia)/2:fa=Da||Ia;var qa=(fa-T(er))*ft;er.y0+=qa,er.y1+=qa}})})}function Pe(){Te.forEach(function(ft){var ct,_t,Ct=Ze,ir=ft.length,rr;for(ft.sort(m),rr=0;rr<ir;++rr)ct=ft[rr],_t=Ct-ct.y0,_t>0&&(ct.y0+=_t,ct.y1+=_t),Ct=ct.y1+st;if(_t=Ct-st-nt,_t>0)for(Ct=ct.y0-=_t,ct.y1-=_t,rr=ir-2;rr>=0;--rr)ct=ft[rr],_t=ct.y1+st-Ct,_t>0&&(ct.y0-=_t,ct.y1-=_t),Ct=ct.y0})}}function Rr(wt){wt.nodes.forEach(function(Ne){Ne.sourceLinks.sort(c),Ne.targetLinks.sort(h)}),wt.nodes.forEach(function(Ne){var Ke=Ne.y0,Te=Ke,Ie=Ne.y1,Ve=Ie;Ne.sourceLinks.forEach(function(Ce){Ce.circular?(Ce.y0=Ie-Ce.width/2,Ie=Ie-Ce.width):(Ce.y0=Ke+Ce.width/2,Ke+=Ce.width)}),Ne.targetLinks.forEach(function(Ce){Ce.circular?(Ce.y1=Ve-Ce.width/2,Ve=Ve-Ce.width):(Ce.y1=Te+Ce.width/2,Te+=Ce.width)})})}return It}function R(ze,Ze,at){var nt=0;if(at===null){for(var rt=[],st=0;st<ze.links.length;st++){var Me=ze.links[st],ye=Me.source.index,he=Me.target.index;rt[ye]||(rt[ye]=[]),rt[he]||(rt[he]=[]),rt[ye].indexOf(he)===-1&&rt[ye].push(he)}var Oe=e(rt);Oe.sort(function(Pt,It){return Pt.length-It.length});var tt={};for(st=0;st<Oe.length;st++){var ot=Oe[st],Qe=ot.slice(-2);tt[Qe[0]]||(tt[Qe[0]]={}),tt[Qe[0]][Qe[1]]=!0}ze.links.forEach(function(Pt){var It=Pt.target.index,qt=Pt.source.index;It===qt||tt[qt]&&tt[qt][It]?(Pt.circular=!0,Pt.circularLinkID=nt,nt=nt+1):Pt.circular=!1})}else ze.links.forEach(function(Pt){Pt.source[at]<Pt.target[at]?Pt.circular=!1:(Pt.circular=!0,Pt.circularLinkID=nt,nt=nt+1)})}function L(ze,Ze){var at=0,nt=0;ze.links.forEach(function(rt){rt.circular&&(rt.source.circularLinkType||rt.target.circularLinkType?rt.circularLinkType=rt.source.circularLinkType?rt.source.circularLinkType:rt.target.circularLinkType:rt.circularLinkType=at<nt?"top":"bottom",rt.circularLinkType=="top"?at=at+1:nt=nt+1,ze.nodes.forEach(function(st){(b(st,Ze)==b(rt.source,Ze)||b(st,Ze)==b(rt.target,Ze))&&(st.circularLinkType=rt.circularLinkType)}))}),ze.links.forEach(function(rt){rt.circular&&(rt.source.circularLinkType==rt.target.circularLinkType&&(rt.circularLinkType=rt.source.circularLinkType),Ae(rt,Ze)&&(rt.circularLinkType=rt.source.circularLinkType))})}function z(ze){var Ze=Math.abs(ze.y1-ze.y0),at=Math.abs(ze.target.x0-ze.source.x1);return Math.atan(at/Ze)}function F(ze,Ze){return ze.source.column<Ze.target.column?!1:!(ze.target.column>Ze.source.column)}function N(ze,Ze){var at=0;ze.sourceLinks.forEach(function(rt){at=rt.circular&&!Ae(rt,Ze)?at+1:at});var nt=0;return ze.targetLinks.forEach(function(rt){nt=rt.circular&&!Ae(rt,Ze)?nt+1:nt}),at+nt}function O(ze){var Ze=ze.source.sourceLinks,at=0;Ze.forEach(function(st){at=st.circular?at+1:at});var nt=ze.target.targetLinks,rt=0;return nt.forEach(function(st){rt=st.circular?rt+1:rt}),!(at>1||rt>1)}function P(ze,Ze,at){return ze.sort(X),ze.forEach(function(nt,rt){var st=0;if(Ae(nt,at)&&O(nt))nt.circularPathData.verticalBuffer=st+nt.width/2;else{var Me=0;for(Me;Me<rt;Me++)if(F(ze[rt],ze[Me])){var ye=ze[Me].circularPathData.verticalBuffer+ze[Me].width/2+Ze;st=ye>st?ye:st}nt.circularPathData.verticalBuffer=st+nt.width/2}}),ze}function U(ze,Ze,at,nt){var rt=5,st=x.min(ze.links,function(he){return he.source.y0});ze.links.forEach(function(he){he.circular&&(he.circularPathData={})});var Me=ze.links.filter(function(he){return he.circularLinkType=="top"});P(Me,Ze,nt);var ye=ze.links.filter(function(he){return he.circularLinkType=="bottom"});P(ye,Ze,nt),ze.links.forEach(function(he){if(he.circular){if(he.circularPathData.arcRadius=he.width+u,he.circularPathData.leftNodeBuffer=rt,he.circularPathData.rightNodeBuffer=rt,he.circularPathData.sourceWidth=he.source.x1-he.source.x0,he.circularPathData.sourceX=he.source.x0+he.circularPathData.sourceWidth,he.circularPathData.targetX=he.target.x0,he.circularPathData.sourceY=he.y0,he.circularPathData.targetY=he.y1,Ae(he,nt)&&O(he))he.circularPathData.leftSmallArcRadius=u+he.width/2,he.circularPathData.leftLargeArcRadius=u+he.width/2,he.circularPathData.rightSmallArcRadius=u+he.width/2,he.circularPathData.rightLargeArcRadius=u+he.width/2,he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=he.source.y1+d+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=he.source.y0-d-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius);else{var Oe=he.source.column,tt=he.circularLinkType,ot=ze.links.filter(function(It){return It.source.column==Oe&&It.circularLinkType==tt});he.circularLinkType=="bottom"?ot.sort(se):ot.sort($);var Qe=0;ot.forEach(function(It,qt){It.circularLinkID==he.circularLinkID&&(he.circularPathData.leftSmallArcRadius=u+he.width/2+Qe,he.circularPathData.leftLargeArcRadius=u+he.width/2+qt*Ze+Qe),Qe=Qe+It.width}),Oe=he.target.column,ot=ze.links.filter(function(It){return It.target.column==Oe&&It.circularLinkType==tt}),he.circularLinkType=="bottom"?ot.sort(fe):ot.sort(le),Qe=0,ot.forEach(function(It,qt){It.circularLinkID==he.circularLinkID&&(he.circularPathData.rightSmallArcRadius=u+he.width/2+Qe,he.circularPathData.rightLargeArcRadius=u+he.width/2+qt*Ze+Qe),Qe=Qe+It.width}),he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=Math.max(at,he.source.y1,he.target.y1)+d+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=st-d-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius)}he.circularPathData.leftInnerExtent=he.circularPathData.sourceX+he.circularPathData.leftNodeBuffer,he.circularPathData.rightInnerExtent=he.circularPathData.targetX-he.circularPathData.rightNodeBuffer,he.circularPathData.leftFullExtent=he.circularPathData.sourceX+he.circularPathData.leftLargeArcRadius+he.circularPathData.leftNodeBuffer,he.circularPathData.rightFullExtent=he.circularPathData.targetX-he.circularPathData.rightLargeArcRadius-he.circularPathData.rightNodeBuffer}if(he.circular)he.path=B(he);else{var Pt=E.linkHorizontal().source(function(It){var qt=It.source.x0+(It.source.x1-It.source.x0),Wt=It.y0;return[qt,Wt]}).target(function(It){var qt=It.target.x0,Wt=It.y1;return[qt,Wt]});he.path=Pt(he)}})}function B(ze){var Ze="";return ze.circularLinkType=="top"?Ze="M"+ze.circularPathData.sourceX+" "+ze.circularPathData.sourceY+" L"+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.sourceY+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftSmallArcRadius+" 0 0 0 "+ze.circularPathData.leftFullExtent+" "+(ze.circularPathData.sourceY-ze.circularPathData.leftSmallArcRadius)+" L"+ze.circularPathData.leftFullExtent+" "+ze.circularPathData.verticalLeftInnerExtent+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftLargeArcRadius+" 0 0 0 "+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.verticalFullExtent+" L"+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.verticalFullExtent+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightLargeArcRadius+" 0 0 0 "+ze.circularPathData.rightFullExtent+" "+ze.circularPathData.verticalRightInnerExtent+" L"+ze.circularPathData.rightFullExtent+" "+(ze.circularPathData.targetY-ze.circularPathData.rightSmallArcRadius)+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightSmallArcRadius+" 0 0 0 "+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.targetY+" L"+ze.circularPathData.targetX+" "+ze.circularPathData.targetY:Ze="M"+ze.circularPathData.sourceX+" "+ze.circularPathData.sourceY+" L"+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.sourceY+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftSmallArcRadius+" 0 0 1 "+ze.circularPathData.leftFullExtent+" "+(ze.circularPathData.sourceY+ze.circularPathData.leftSmallArcRadius)+" L"+ze.circularPathData.leftFullExtent+" "+ze.circularPathData.verticalLeftInnerExtent+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftLargeArcRadius+" 0 0 1 "+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.verticalFullExtent+" L"+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.verticalFullExtent+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightLargeArcRadius+" 0 0 1 "+ze.circularPathData.rightFullExtent+" "+ze.circularPathData.verticalRightInnerExtent+" L"+ze.circularPathData.rightFullExtent+" "+(ze.circularPathData.targetY+ze.circularPathData.rightSmallArcRadius)+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightSmallArcRadius+" 0 0 1 "+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.targetY+" L"+ze.circularPathData.targetX+" "+ze.circularPathData.targetY,Ze}function X(ze,Ze){return V(ze)==V(Ze)?ze.circularLinkType=="bottom"?se(ze,Ze):$(ze,Ze):V(Ze)-V(ze)}function $(ze,Ze){return ze.y0-Ze.y0}function se(ze,Ze){return Ze.y0-ze.y0}function le(ze,Ze){return ze.y1-Ze.y1}function fe(ze,Ze){return Ze.y1-ze.y1}function V(ze){return ze.target.column-ze.source.column}function Y(ze){return ze.target.x0-ze.source.x1}function ee(ze,Ze){var at=z(ze),nt=Y(Ze)/Math.tan(at),rt=be(ze)=="up"?ze.y1+nt:ze.y1-nt;return rt}function q(ze,Ze){var at=z(ze),nt=Y(Ze)/Math.tan(at),rt=be(ze)=="up"?ze.y1-nt:ze.y1+nt;return rt}function oe(ze,Ze,at,nt){ze.links.forEach(function(rt){if(!rt.circular&&rt.target.column-rt.source.column>1){var st=rt.source.column+1,Me=rt.target.column-1,ye=1,he=Me-st+1;for(ye=1;st<=Me;st++,ye++)ze.nodes.forEach(function(Oe){if(Oe.column==st){var tt=ye/(he+1),ot=Math.pow(1-tt,3),Qe=3*tt*Math.pow(1-tt,2),Pt=3*Math.pow(tt,2)*(1-tt),It=Math.pow(tt,3),qt=ot*rt.y0+Qe*rt.y0+Pt*rt.y1+It*rt.y1,Wt=qt-rt.width/2,kr=qt+rt.width/2,mr;Wt>Oe.y0&&Wt<Oe.y1?(mr=Oe.y1-Wt+10,mr=Oe.circularLinkType=="bottom"?mr:-mr,Oe=j(Oe,mr,Ze,at),ze.nodes.forEach(function(qr){b(qr,nt)==b(Oe,nt)||qr.column!=Oe.column||ae(Oe,qr)&&j(qr,mr,Ze,at)})):kr>Oe.y0&&kr<Oe.y1?(mr=kr-Oe.y0+10,Oe=j(Oe,mr,Ze,at),ze.nodes.forEach(function(qr){b(qr,nt)==b(Oe,nt)||qr.column!=Oe.column||qr.y0<Oe.y1&&qr.y1>Oe.y1&&j(qr,mr,Ze,at)})):Wt<Oe.y0&&kr>Oe.y1&&(mr=kr-Oe.y0+10,Oe=j(Oe,mr,Ze,at),ze.nodes.forEach(function(qr){b(qr,nt)==b(Oe,nt)||qr.column!=Oe.column||qr.y0<Oe.y1&&qr.y1>Oe.y1&&j(qr,mr,Ze,at)}))}})}})}function ae(ze,Ze){return ze.y0>Ze.y0&&ze.y0<Ze.y1||ze.y1>Ze.y0&&ze.y1<Ze.y1?!0:ze.y0<Ze.y0&&ze.y1>Ze.y1}function j(ze,Ze,at,nt){return ze.y0+Ze>=at&&ze.y1+Ze<=nt&&(ze.y0=ze.y0+Ze,ze.y1=ze.y1+Ze,ze.targetLinks.forEach(function(rt){rt.y1=rt.y1+Ze}),ze.sourceLinks.forEach(function(rt){rt.y0=rt.y0+Ze})),ze}function Q(ze,Ze,at,nt){ze.nodes.forEach(function(rt){nt&&rt.y+(rt.y1-rt.y0)>Ze&&(rt.y=rt.y-(rt.y+(rt.y1-rt.y0)-Ze));var st=ze.links.filter(function(he){return b(he.source,at)==b(rt,at)}),Me=st.length;Me>1&&st.sort(function(he,Oe){if(!he.circular&&!Oe.circular){if(he.target.column==Oe.target.column)return he.y1-Oe.y1;if(ce(he,Oe)){if(he.target.column>Oe.target.column){var tt=q(Oe,he);return he.y1-tt}if(Oe.target.column>he.target.column){var ot=q(he,Oe);return ot-Oe.y1}}else return he.y1-Oe.y1}if(he.circular&&!Oe.circular)return he.circularLinkType=="top"?-1:1;if(Oe.circular&&!he.circular)return Oe.circularLinkType=="top"?1:-1;if(he.circular&&Oe.circular)return he.circularLinkType===Oe.circularLinkType&&he.circularLinkType=="top"?he.target.column===Oe.target.column?he.target.y1-Oe.target.y1:Oe.target.column-he.target.column:he.circularLinkType===Oe.circularLinkType&&he.circularLinkType=="bottom"?he.target.column===Oe.target.column?Oe.target.y1-he.target.y1:he.target.column-Oe.target.column:he.circularLinkType=="top"?-1:1});var ye=rt.y0;st.forEach(function(he){he.y0=ye+he.width/2,ye=ye+he.width}),st.forEach(function(he,Oe){if(he.circularLinkType=="bottom"){var tt=Oe+1,ot=0;for(tt;tt<Me;tt++)ot=ot+st[tt].width;he.y0=rt.y1-ot-he.width/2}})})}function re(ze,Ze,at){ze.nodes.forEach(function(nt){var rt=ze.links.filter(function(ye){return b(ye.target,at)==b(nt,at)}),st=rt.length;st>1&&rt.sort(function(ye,he){if(!ye.circular&&!he.circular){if(ye.source.column==he.source.column)return ye.y0-he.y0;if(ce(ye,he)){if(he.source.column<ye.source.column){var Oe=ee(he,ye);return ye.y0-Oe}if(ye.source.column<he.source.column){var tt=ee(ye,he);return tt-he.y0}}else return ye.y0-he.y0}if(ye.circular&&!he.circular)return ye.circularLinkType=="top"?-1:1;if(he.circular&&!ye.circular)return he.circularLinkType=="top"?1:-1;if(ye.circular&&he.circular)return ye.circularLinkType===he.circularLinkType&&ye.circularLinkType=="top"?ye.source.column===he.source.column?ye.source.y1-he.source.y1:ye.source.column-he.source.column:ye.circularLinkType===he.circularLinkType&&ye.circularLinkType=="bottom"?ye.source.column===he.source.column?ye.source.y1-he.source.y1:he.source.column-ye.source.column:ye.circularLinkType=="top"?-1:1});var Me=nt.y0;rt.forEach(function(ye){ye.y1=Me+ye.width/2,Me=Me+ye.width}),rt.forEach(function(ye,he){if(ye.circularLinkType=="bottom"){var Oe=he+1,tt=0;for(Oe;Oe<st;Oe++)tt=tt+rt[Oe].width;ye.y1=nt.y1-tt-ye.width/2}})})}function ce(ze,Ze){return be(ze)==be(Ze)}function be(ze){return ze.y0-ze.y1>0?"up":"down"}function Ae(ze,Ze){return b(ze.source,Ze)==b(ze.target,Ze)}function De(ze,Ze,at){var nt=ze.nodes,rt=ze.links,st=!1,Me=!1;if(rt.forEach(function(Qe){Qe.circularLinkType=="top"?st=!0:Qe.circularLinkType=="bottom"&&(Me=!0)}),st==!1||Me==!1){var ye=x.min(nt,function(Qe){return Qe.y0}),he=x.max(nt,function(Qe){return Qe.y1}),Oe=he-ye,tt=at-Ze,ot=tt/Oe;nt.forEach(function(Qe){var Pt=(Qe.y1-Qe.y0)*ot;Qe.y0=(Qe.y0-ye)*ot,Qe.y1=Qe.y0+Pt}),rt.forEach(function(Qe){Qe.y0=(Qe.y0-ye)*ot,Qe.y1=(Qe.y1-ye)*ot,Qe.width=Qe.width*ot})}}v.sankeyCircular=f,v.sankeyCenter=n,v.sankeyLeft=r,v.sankeyRight=o,v.sankeyJustify=a,Object.defineProperty(v,"__esModule",{value:!0})})}}),j6=Xe({"src/traces/sankey/constants.js"(Z,G){"use strict";G.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),vG=Xe({"src/traces/sankey/render.js"(Z,G){"use strict";var v=cG(),x=(pg(),zf(p0)).interpolateNumber,S=Hn(),E=hG(),e=dG(),t=j6(),r=Ch(),o=$n(),a=es(),n=sa(),i=n.strTranslate,s=n.strRotate,h=kv(),c=h.keyFun,m=h.repeat,p=h.unwrap,T=ou(),l=so(),_=uh(),w=_.CAP_SHIFT,A=_.LINE_SPACING,M=3;function g(ee,q,oe){var ae=p(q),j=ae.trace,Q=j.domain,re=j.orientation==="h",ce=j.node.pad,be=j.node.thickness,Ae={justify:E.sankeyJustify,left:E.sankeyLeft,right:E.sankeyRight,center:E.sankeyCenter}[j.node.align],De=ee.width*(Q.x[1]-Q.x[0]),ze=ee.height*(Q.y[1]-Q.y[0]),Ze=ae._nodes,at=ae._links,nt=ae.circular,rt;nt?rt=e.sankeyCircular().circularLinkGap(0):rt=E.sankey(),rt.iterations(t.sankeyIterations).size(re?[De,ze]:[ze,De]).nodeWidth(be).nodePadding(ce).nodeId(function(qr){return qr.pointNumber}).nodeAlign(Ae).nodes(Ze).links(at);var st=rt();rt.nodePadding()<ce&&n.warn("node.pad was reduced to ",rt.nodePadding()," to fit within the figure.");var Me,ye,he;for(var Oe in ae._groupLookup){var tt=parseInt(ae._groupLookup[Oe]),ot;for(Me=0;Me<st.nodes.length;Me++)if(st.nodes[Me].pointNumber===tt){ot=st.nodes[Me];break}if(ot){var Qe={pointNumber:parseInt(Oe),x0:ot.x0,x1:ot.x1,y0:ot.y0,y1:ot.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};st.nodes.unshift(Qe),ot.childrenNodes.unshift(Qe)}}function Pt(){for(Me=0;Me<st.nodes.length;Me++){var qr=st.nodes[Me],Sr={},Rr,wt;for(ye=0;ye<qr.targetLinks.length;ye++)wt=qr.targetLinks[ye],Rr=wt.source.pointNumber+":"+wt.target.pointNumber,Sr.hasOwnProperty(Rr)||(Sr[Rr]=[]),Sr[Rr].push(wt);var Ne=Object.keys(Sr);for(ye=0;ye<Ne.length;ye++){Rr=Ne[ye];var Ke=Sr[Rr],Te=0,Ie={};for(he=0;he<Ke.length;he++)wt=Ke[he],Ie[wt.label]||(Ie[wt.label]=0),Ie[wt.label]+=wt.value,Te+=wt.value;for(he=0;he<Ke.length;he++)wt=Ke[he],wt.flow={value:Te,labelConcentration:Ie[wt.label]/Te,concentration:wt.value/Te,links:Ke},wt.concentrationscale&&(wt.color=r(wt.concentrationscale(wt.flow.labelConcentration)))}var Ve=0;for(ye=0;ye<qr.sourceLinks.length;ye++)Ve+=qr.sourceLinks[ye].value;for(ye=0;ye<qr.sourceLinks.length;ye++)wt=qr.sourceLinks[ye],wt.concentrationOut=wt.value/Ve;var Ce=0;for(ye=0;ye<qr.targetLinks.length;ye++)Ce+=qr.targetLinks[ye].value;for(ye=0;ye<qr.targetLinks.length;ye++)wt=qr.targetLinks[ye],wt.concenrationIn=wt.value/Ce}}Pt();function It(qr){qr.forEach(function(Sr){var Rr,wt,Ne=0,Ke=Sr.length,Te;for(Sr.sort(function(Ie,Ve){return Ie.y0-Ve.y0}),Te=0;Te<Ke;++Te)Rr=Sr[Te],Rr.y0>=Ne||(wt=Ne-Rr.y0,wt>1e-6&&(Rr.y0+=wt,Rr.y1+=wt)),Ne=Rr.y1+ce})}function qt(qr){var Sr=qr.map(function(Ve,Ce){return{x0:Ve.x0,index:Ce}}).sort(function(Ve,Ce){return Ve.x0-Ce.x0}),Rr=[],wt=-1,Ne,Ke=-1/0,Te;for(Me=0;Me<Sr.length;Me++){var Ie=qr[Sr[Me].index];Ie.x0>Ke+be&&(wt+=1,Ne=Ie.x0),Ke=Ie.x0,Rr[wt]||(Rr[wt]=[]),Rr[wt].push(Ie),Te=Ne-Ie.x0,Ie.x0+=Te,Ie.x1+=Te}return Rr}if(j.node.x.length&&j.node.y.length){for(Me=0;Me<Math.min(j.node.x.length,j.node.y.length,st.nodes.length);Me++)if(j.node.x[Me]&&j.node.y[Me]){var Wt=[j.node.x[Me]*De,j.node.y[Me]*ze];st.nodes[Me].x0=Wt[0]-be/2,st.nodes[Me].x1=Wt[0]+be/2;var kr=st.nodes[Me].y1-st.nodes[Me].y0;st.nodes[Me].y0=Wt[1]-kr/2,st.nodes[Me].y1=Wt[1]+kr/2}if(j.arrangement==="snap"){Ze=st.nodes;var mr=qt(Ze);It(mr)}rt.update(st)}return{circular:nt,key:oe,trace:j,guid:n.randstr(),horizontal:re,width:De,height:ze,nodePad:j.node.pad,nodeLineColor:j.node.line.color,nodeLineWidth:j.node.line.width,linkLineColor:j.link.line.color,linkLineWidth:j.link.line.width,linkArrowLength:j.link.arrowlen,valueFormat:j.valueformat,valueSuffix:j.valuesuffix,textFont:j.textfont,translateX:Q.x[0]*ee.width+ee.margin.l,translateY:ee.height-Q.y[1]*ee.height+ee.margin.t,dragParallel:re?ze:De,dragPerpendicular:re?De:ze,arrangement:j.arrangement,sankey:rt,graph:st,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function b(ee,q,oe){var ae=r(q.color),j=r(q.hovercolor),Q=q.source.label+"|"+q.target.label,re=Q+"__"+oe;return q.trace=ee.trace,q.curveNumber=ee.trace.index,{circular:ee.circular,key:re,traceId:ee.key,pointNumber:q.pointNumber,link:q,tinyColorHue:o.tinyRGB(ae),tinyColorAlpha:ae.getAlpha(),tinyColorHoverHue:o.tinyRGB(j),tinyColorHoverAlpha:j.getAlpha(),linkPath:u,linkLineColor:ee.linkLineColor,linkLineWidth:ee.linkLineWidth,linkArrowLength:ee.linkArrowLength,valueFormat:ee.valueFormat,valueSuffix:ee.valueSuffix,sankey:ee.sankey,parent:ee,interactionState:ee.interactionState,flow:q.flow}}function d(ee,q){var oe="",ae=ee.width/2,j=ee.circularPathData,Q=j.sourceX+j.verticalBuffer<j.targetX,re=j.rightFullExtent-j.rightLargeArcRadius-q<=j.leftFullExtent-ae,ce=Math.abs(j.rightFullExtent-j.leftFullExtent-ae)<ae;return ee.circularLinkType==="top"?(oe="M "+(j.targetX-q)+" "+(j.targetY+ae)+" L "+(j.rightInnerExtent-q)+" "+(j.targetY+ae)+"A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 1 "+(j.rightFullExtent-ae-q)+" "+(j.targetY-j.rightSmallArcRadius)+"L "+(j.rightFullExtent-ae-q)+" "+j.verticalRightInnerExtent,Q&&re?oe+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 1 "+(j.rightFullExtent+ae-q-(j.rightLargeArcRadius-ae))+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius+ae))+" L "+(j.rightFullExtent+ae-(j.rightLargeArcRadius-ae)-q)+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius+ae))+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalRightInnerExtent:Q?oe+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 0 "+(j.rightFullExtent-ae-q-(j.rightLargeArcRadius-ae))+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius-ae))+" L "+(j.leftFullExtent+ae+(j.rightLargeArcRadius-ae))+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius-ae))+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:oe+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 1 "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent-ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,oe+=" L "+(j.leftFullExtent+ae)+" "+(j.sourceY-j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.sourceY+ae)+" L "+j.sourceX+" "+(j.sourceY+ae)+" L "+j.sourceX+" "+(j.sourceY-ae)+" L "+j.leftInnerExtent+" "+(j.sourceY-ae)+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftSmallArcRadius-ae)+" 0 0 0 "+(j.leftFullExtent-ae)+" "+(j.sourceY-j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ae)+" "+j.verticalLeftInnerExtent,Q&&re?oe+=" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent-ae)+" "+(j.verticalFullExtent+ae)+"L"+(j.rightFullExtent+ae-q)+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:Q?oe+=" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent-ae-q)+" "+(j.verticalFullExtent-ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:oe+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 0 "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" L "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 0 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent,oe+=" L "+(j.rightFullExtent+ae-q)+" "+(j.targetY-j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 0 "+(j.rightInnerExtent-q)+" "+(j.targetY-ae)+" L "+(j.targetX-q)+" "+(j.targetY-ae)+(q>0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(oe="M "+(j.targetX-q)+" "+(j.targetY-ae)+" L "+(j.rightInnerExtent-q)+" "+(j.targetY-ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent-ae-q)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-ae-q)+" "+j.verticalRightInnerExtent,Q&&re?oe+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-ae-q)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent+ae-q-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:Q?oe+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent-q-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.leftFullExtent+ae+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:oe+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent+ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,oe+=" L "+(j.leftFullExtent+ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+j.leftInnerExtent+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY+ae)+" L "+j.leftInnerExtent+" "+(j.sourceY+ae)+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ae)+" "+j.verticalLeftInnerExtent,Q&&re?oe+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent+ae-q+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:Q?oe+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent-q-ae)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:oe+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" L "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent,oe+=" L "+(j.rightFullExtent+ae-q)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightInnerExtent-q)+" "+(j.targetY+ae)+" L "+(j.targetX-q)+" "+(j.targetY+ae)+(q>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),oe}function u(){var ee=.5;function q(oe){var ae=oe.linkArrowLength;if(oe.link.circular)return d(oe.link,ae);var j=Math.abs((oe.link.target.x0-oe.link.source.x1)/2);ae>j&&(ae=j);var Q=oe.link.source.x1,re=oe.link.target.x0-ae,ce=x(Q,re),be=ce(ee),Ae=ce(1-ee),De=oe.link.y0-oe.link.width/2,ze=oe.link.y0+oe.link.width/2,Ze=oe.link.y1-oe.link.width/2,at=oe.link.y1+oe.link.width/2,nt="M"+Q+","+De,rt="C"+be+","+De+" "+Ae+","+Ze+" "+re+","+Ze,st="C"+Ae+","+at+" "+be+","+ze+" "+Q+","+ze,Me=ae>0?"L"+(re+ae)+","+(Ze+oe.link.width/2):"";return Me+="L"+re+","+at,nt+rt+Me+st+"Z"}return q}function y(ee,q){var oe=r(q.color),ae=t.nodePadAcross,j=ee.nodePad/2;q.dx=q.x1-q.x0,q.dy=q.y1-q.y0;var Q=q.dx,re=Math.max(.5,q.dy),ce="node_"+q.pointNumber;return q.group&&(ce=n.randstr()),q.trace=ee.trace,q.curveNumber=ee.trace.index,{index:q.pointNumber,key:ce,partOfGroup:q.partOfGroup||!1,group:q.group,traceId:ee.key,trace:ee.trace,node:q,nodePad:ee.nodePad,nodeLineColor:ee.nodeLineColor,nodeLineWidth:ee.nodeLineWidth,textFont:ee.textFont,size:ee.horizontal?ee.height:ee.width,visibleWidth:Math.ceil(Q),visibleHeight:re,zoneX:-ae,zoneY:-j,zoneWidth:Q+2*ae,zoneHeight:re+2*j,labelY:ee.horizontal?q.dy/2+1:q.dx/2+1,left:q.originalLayer===1,sizeAcross:ee.width,forceLayouts:ee.forceLayouts,horizontal:ee.horizontal,darkBackground:oe.getBrightness()<=128,tinyColorHue:o.tinyRGB(oe),tinyColorAlpha:oe.getAlpha(),valueFormat:ee.valueFormat,valueSuffix:ee.valueSuffix,sankey:ee.sankey,graph:ee.graph,arrangement:ee.arrangement,uniqueNodeLabelPathId:[ee.guid,ee.key,ce].join("_"),interactionState:ee.interactionState,figure:ee}}function f(ee){ee.attr("transform",function(q){return i(q.node.x0.toFixed(3),q.node.y0.toFixed(3))})}function R(ee){ee.call(f)}function L(ee,q){ee.call(R),q.attr("d",u())}function z(ee){ee.attr("width",function(q){return q.node.x1-q.node.x0}).attr("height",function(q){return q.visibleHeight})}function F(ee){return ee.link.width>1||ee.linkLineWidth>0}function N(ee){var q=i(ee.translateX,ee.translateY);return q+(ee.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(ee,q,oe){ee.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(oe.hover(this,ae,q),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(oe.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(oe.unhover(this,ae,q),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(oe.unhover(this,ae,q),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&oe.select(this,ae,q)})}function P(ee,q,oe,ae){var j=S.behavior.drag().origin(function(Q){return{x:Q.node.x0+Q.visibleWidth/2,y:Q.node.y0+Q.visibleHeight/2}}).on("dragstart",function(Q){if(Q.arrangement!=="fixed"&&(n.ensureSingle(ae._fullLayout._infolayer,"g","dragcover",function(ce){ae._fullLayout._dragCover=ce}),n.raiseToTop(this),Q.interactionState.dragInProgress=Q.node,le(Q.node),Q.interactionState.hovered&&(oe.nodeEvents.unhover.apply(0,Q.interactionState.hovered),Q.interactionState.hovered=!1),Q.arrangement==="snap")){var re=Q.traceId+"|"+Q.key;Q.forceLayouts[re]?Q.forceLayouts[re].alpha(1):U(ee,re,Q,ae),B(ee,q,Q,re,ae)}}).on("drag",function(Q){if(Q.arrangement!=="fixed"){var re=S.event.x,ce=S.event.y;Q.arrangement==="snap"?(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2,Q.node.y0=ce-Q.visibleHeight/2,Q.node.y1=ce+Q.visibleHeight/2):(Q.arrangement==="freeform"&&(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2),ce=Math.max(0,Math.min(Q.size-Q.visibleHeight/2,ce)),Q.node.y0=ce-Q.visibleHeight/2,Q.node.y1=ce+Q.visibleHeight/2),le(Q.node),Q.arrangement!=="snap"&&(Q.sankey.update(Q.graph),L(ee.filter(fe(Q)),q))}}).on("dragend",function(Q){if(Q.arrangement!=="fixed"){Q.interactionState.dragInProgress=!1;for(var re=0;re<Q.node.childrenNodes.length;re++)Q.node.childrenNodes[re].x=Q.node.x,Q.node.childrenNodes[re].y=Q.node.y;Q.arrangement!=="snap"&&$(Q,ae)}});ee.on(".drag",null).call(j)}function U(ee,q,oe,ae){V(oe.graph.nodes);var j=oe.graph.nodes.filter(function(Q){return Q.originalX===oe.node.originalX}).filter(function(Q){return!Q.partOfGroup});oe.forceLayouts[q]=v.forceSimulation(j).alphaDecay(0).force("collide",v.forceCollide().radius(function(Q){return Q.dy/2+oe.nodePad/2}).strength(1).iterations(t.forceIterations)).force("constrain",X(ee,q,j,oe,ae)).stop()}function B(ee,q,oe,ae,j){window.requestAnimationFrame(function Q(){var re;for(re=0;re<t.forceTicksPerFrame;re++)oe.forceLayouts[ae].tick();var ce=oe.graph.nodes;if(Y(ce),oe.sankey.update(oe.graph),L(ee.filter(fe(oe)),q),oe.forceLayouts[ae].alpha()>0)window.requestAnimationFrame(Q);else{var be=oe.node.originalX;oe.node.x0=be-oe.visibleWidth/2,oe.node.x1=be+oe.visibleWidth/2,$(oe,j)}})}function X(ee,q,oe,ae){return function(){for(var Q=0,re=0;re<oe.length;re++){var ce=oe[re];ce===ae.interactionState.dragInProgress?(ce.x=ce.lastDraggedX,ce.y=ce.lastDraggedY):(ce.vx=(ce.originalX-ce.x)/t.forceTicksPerFrame,ce.y=Math.min(ae.size-ce.dy/2,Math.max(ce.dy/2,ce.y))),Q=Math.max(Q,Math.abs(ce.vx),Math.abs(ce.vy))}!ae.interactionState.dragInProgress&&Q<.1&&ae.forceLayouts[q].alpha()>0&&ae.forceLayouts[q].alpha(0)}}function $(ee,q){for(var oe=[],ae=[],j=0;j<ee.graph.nodes.length;j++){var Q=(ee.graph.nodes[j].x0+ee.graph.nodes[j].x1)/2,re=(ee.graph.nodes[j].y0+ee.graph.nodes[j].y1)/2;oe.push(Q/ee.figure.width),ae.push(re/ee.figure.height)}l.call("_guiRestyle",q,{"node.x":[oe],"node.y":[ae]},ee.trace.index).then(function(){q._fullLayout._dragCover&&q._fullLayout._dragCover.remove()})}function se(ee){var q=[],oe;for(oe=0;oe<ee.length;oe++)ee[oe].originalX=(ee[oe].x0+ee[oe].x1)/2,ee[oe].originalY=(ee[oe].y0+ee[oe].y1)/2,q.indexOf(ee[oe].originalX)===-1&&q.push(ee[oe].originalX);for(q.sort(function(ae,j){return ae-j}),oe=0;oe<ee.length;oe++)ee[oe].originalLayerIndex=q.indexOf(ee[oe].originalX),ee[oe].originalLayer=ee[oe].originalLayerIndex/(q.length-1)}function le(ee){ee.lastDraggedX=ee.x0+ee.dx/2,ee.lastDraggedY=ee.y0+ee.dy/2}function fe(ee){return function(q){return q.node.originalX===ee.node.originalX}}function V(ee){for(var q=0;q<ee.length;q++)ee[q].y=(ee[q].y0+ee[q].y1)/2,ee[q].x=(ee[q].x0+ee[q].x1)/2}function Y(ee){for(var q=0;q<ee.length;q++)ee[q].y0=ee[q].y-ee[q].dy/2,ee[q].y1=ee[q].y0+ee[q].dy,ee[q].x0=ee[q].x-ee[q].dx/2,ee[q].x1=ee[q].x0+ee[q].dx}G.exports=function(ee,q,oe,ae,j){var Q=ee._context.staticPlot,re=!1;n.ensureSingle(ee._fullLayout._infolayer,"g","first-render",function(){re=!0});var ce=ee._fullLayout._dragCover,be=oe.filter(function(st){return p(st).trace.visible}).map(g.bind(null,ae)),Ae=q.selectAll("."+t.cn.sankey).data(be,c);Ae.exit().remove(),Ae.enter().append("g").classed(t.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",Q?"none":"auto").attr("transform",N),Ae.each(function(st,Me){ee._fullData[Me]._sankey=st;var ye="bgsankey-"+st.trace.uid+"-"+Me;n.ensureSingle(ee._fullLayout._draggers,"rect",ye),ee._fullData[Me]._bgRect=S.select("."+ye),ee._fullData[Me]._bgRect.style("pointer-events",Q?"none":"all").attr("width",st.width).attr("height",st.height).attr("x",st.translateX).attr("y",st.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),Ae.transition().ease(t.ease).duration(t.duration).attr("transform",N);var De=Ae.selectAll("."+t.cn.sankeyLinks).data(m,c);De.enter().append("g").classed(t.cn.sankeyLinks,!0).style("fill","none");var ze=De.selectAll("."+t.cn.sankeyLink).data(function(st){var Me=st.graph.links;return Me.filter(function(ye){return ye.value}).map(b.bind(null,st))},c);ze.enter().append("path").classed(t.cn.sankeyLink,!0).call(O,Ae,j.linkEvents),ze.style("stroke",function(st){return F(st)?o.tinyRGB(r(st.linkLineColor)):st.tinyColorHue}).style("stroke-opacity",function(st){return F(st)?o.opacity(st.linkLineColor):st.tinyColorAlpha}).style("fill",function(st){return st.tinyColorHue}).style("fill-opacity",function(st){return st.tinyColorAlpha}).style("stroke-width",function(st){return F(st)?st.linkLineWidth:1}).attr("d",u()),ze.style("opacity",function(){return ee._context.staticPlot||re||ce?1:0}).transition().ease(t.ease).duration(t.duration).style("opacity",1),ze.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var Ze=Ae.selectAll("."+t.cn.sankeyNodeSet).data(m,c);Ze.enter().append("g").classed(t.cn.sankeyNodeSet,!0),Ze.style("cursor",function(st){switch(st.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var at=Ze.selectAll("."+t.cn.sankeyNode).data(function(st){var Me=st.graph.nodes;return se(Me),Me.map(y.bind(null,st))},c);at.enter().append("g").classed(t.cn.sankeyNode,!0).call(f).style("opacity",function(st){return(ee._context.staticPlot||re)&&!st.partOfGroup?1:0}),at.call(O,Ae,j.nodeEvents).call(P,ze,j,ee),at.transition().ease(t.ease).duration(t.duration).call(f).style("opacity",function(st){return st.partOfGroup?0:1}),at.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var nt=at.selectAll("."+t.cn.nodeRect).data(m);nt.enter().append("rect").classed(t.cn.nodeRect,!0).call(z),nt.style("stroke-width",function(st){return st.nodeLineWidth}).style("stroke",function(st){return o.tinyRGB(r(st.nodeLineColor))}).style("stroke-opacity",function(st){return o.opacity(st.nodeLineColor)}).style("fill",function(st){return st.tinyColorHue}).style("fill-opacity",function(st){return st.tinyColorAlpha}),nt.transition().ease(t.ease).duration(t.duration).call(z);var rt=at.selectAll("."+t.cn.nodeLabel).data(m);rt.enter().append("text").classed(t.cn.nodeLabel,!0).style("cursor","default"),rt.attr("data-notex",1).text(function(st){return st.node.label}).each(function(st){var Me=S.select(this);a.font(Me,st.textFont),T.convertToTspans(Me,ee)}).attr("text-anchor",function(st){return st.horizontal&&st.left?"end":"start"}).attr("transform",function(st){var Me=S.select(this),ye=T.lineCount(Me),he=st.textFont.size*((ye-1)*A-w),Oe=st.nodeLineWidth/2+M,tt=((st.horizontal?st.visibleHeight:st.visibleWidth)-he)/2;st.horizontal&&(st.left?Oe=-Oe:Oe+=st.visibleWidth);var ot=st.horizontal?"":"scale(-1,1)"+s(90);return i(st.horizontal?Oe:tt,st.horizontal?tt:Oe)+ot}),rt.transition().ease(t.ease).duration(t.duration)}}}),q6=Xe({"src/traces/sankey/plot.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=x.numberFormat,E=vG(),e=rf(),t=$n(),r=j6().cn,o=x._;function a(w){return w!==""}function n(w,A){return w.filter(function(M){return M.key===A.traceId})}function i(w,A){v.select(w).select("path").style("fill-opacity",A),v.select(w).select("rect").style("fill-opacity",A)}function s(w){v.select(w).select("text.name").style("fill","black")}function h(w){return function(A){return w.node.sourceLinks.indexOf(A.link)!==-1||w.node.targetLinks.indexOf(A.link)!==-1}}function c(w){return function(A){return A.node.sourceLinks.indexOf(w.link)!==-1||A.node.targetLinks.indexOf(w.link)!==-1}}function m(w,A,M){A&&M&&n(M,A).selectAll("."+r.sankeyLink).filter(h(A)).call(T.bind(0,A,M,!1))}function p(w,A,M){A&&M&&n(M,A).selectAll("."+r.sankeyLink).filter(h(A)).call(l.bind(0,A,M,!1))}function T(w,A,M,g){g.style("fill",function(b){if(!b.link.concentrationscale)return b.tinyColorHoverHue}).style("fill-opacity",function(b){if(!b.link.concentrationscale)return b.tinyColorHoverAlpha}),g.each(function(b){var d=b.link.label;d!==""&&n(A,w).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===d}).style("fill",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverHue}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverAlpha})}),M&&n(A,w).selectAll("."+r.sankeyNode).filter(c(w)).call(m)}function l(w,A,M,g){g.style("fill",function(b){return b.tinyColorHue}).style("fill-opacity",function(b){return b.tinyColorAlpha}),g.each(function(b){var d=b.link.label;d!==""&&n(A,w).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===d}).style("fill",function(u){return u.tinyColorHue}).style("fill-opacity",function(u){return u.tinyColorAlpha})}),M&&n(A,w).selectAll(r.sankeyNode).filter(c(w)).call(p)}function _(w,A){var M=w.hoverlabel||{},g=x.nestedProperty(M,A).get();return Array.isArray(g)?!1:g}G.exports=function(A,M){for(var g=A._fullLayout,b=g._paper,d=g._size,u=0;u<A._fullData.length;u++)if(A._fullData[u].visible&&A._fullData[u].type===r.sankey&&!A._fullData[u]._viewInitial){var y=A._fullData[u].node;A._fullData[u]._viewInitial={node:{groups:y.groups.slice(),x:y.x.slice(),y:y.y.slice()}}}var f=function(le,fe){var V=fe.link;V.originalEvent=v.event,A._hoverdata=[V],e.click(A,{target:!0})},R=function(le,fe,V){A._fullLayout.hovermode!==!1&&(v.select(le).call(T.bind(0,fe,V,!0)),fe.link.trace.link.hoverinfo!=="skip"&&(fe.link.fullData=fe.link.trace,A.emit("plotly_hover",{event:v.event,points:[fe.link]})))},L=o(A,"source:")+" ",z=o(A,"target:")+" ",F=o(A,"concentration:")+" ",N=o(A,"incoming flow count:")+" ",O=o(A,"outgoing flow count:")+" ",P=function(le,fe){if(A._fullLayout.hovermode===!1)return;var V=fe.link.trace.link;if(V.hoverinfo==="none"||V.hoverinfo==="skip")return;var Y=[];function ee(ce){var be,Ae;ce.circular?(be=(ce.circularPathData.leftInnerExtent+ce.circularPathData.rightInnerExtent)/2,Ae=ce.circularPathData.verticalFullExtent):(be=(ce.source.x1+ce.target.x0)/2,Ae=(ce.y0+ce.y1)/2);var De=[be,Ae];return ce.trace.orientation==="v"&&De.reverse(),De[0]+=fe.parent.translateX,De[1]+=fe.parent.translateY,De}for(var q=0,oe=0;oe<fe.flow.links.length;oe++){var ae=fe.flow.links[oe];if(!(A._fullLayout.hovermode==="closest"&&fe.link.pointNumber!==ae.pointNumber)){fe.link.pointNumber===ae.pointNumber&&(q=oe),ae.fullData=ae.trace,V=fe.link.trace.link;var j=ee(ae),Q={valueLabel:S(fe.valueFormat)(ae.value)+fe.valueSuffix};Y.push({x:j[0],y:j[1],name:Q.valueLabel,text:[ae.label||"",L+ae.source.label,z+ae.target.label,ae.concentrationscale?F+S("%0.2f")(ae.flow.labelConcentration):""].filter(a).join("<br>"),color:_(V,"bgcolor")||t.addOpacity(ae.color,1),borderColor:_(V,"bordercolor"),fontFamily:_(V,"font.family"),fontSize:_(V,"font.size"),fontColor:_(V,"font.color"),fontWeight:_(V,"font.weight"),fontStyle:_(V,"font.style"),fontVariant:_(V,"font.variant"),fontTextcase:_(V,"font.textcase"),fontLineposition:_(V,"font.lineposition"),fontShadow:_(V,"font.shadow"),nameLength:_(V,"namelength"),textAlign:_(V,"align"),idealAlign:v.event.x<j[0]?"right":"left",hovertemplate:V.hovertemplate,hovertemplateLabels:Q,eventData:[ae]})}}var re=e.loneHover(Y,{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:A,anchorIndex:q});re.each(function(){var ce=this;fe.link.concentrationscale||i(ce,.65),s(ce)})},U=function(le,fe,V){A._fullLayout.hovermode!==!1&&(v.select(le).call(l.bind(0,fe,V,!0)),fe.link.trace.link.hoverinfo!=="skip"&&(fe.link.fullData=fe.link.trace,A.emit("plotly_unhover",{event:v.event,points:[fe.link]})),e.loneUnhover(g._hoverlayer.node()))},B=function(le,fe,V){var Y=fe.node;Y.originalEvent=v.event,A._hoverdata=[Y],v.select(le).call(p,fe,V),e.click(A,{target:!0})},X=function(le,fe,V){A._fullLayout.hovermode!==!1&&(v.select(le).call(m,fe,V),fe.node.trace.node.hoverinfo!=="skip"&&(fe.node.fullData=fe.node.trace,A.emit("plotly_hover",{event:v.event,points:[fe.node]})))},$=function(le,fe){if(A._fullLayout.hovermode!==!1){var V=fe.node.trace.node;if(!(V.hoverinfo==="none"||V.hoverinfo==="skip")){var Y=v.select(le).select("."+r.nodeRect),ee=A._fullLayout._paperdiv.node().getBoundingClientRect(),q=Y.node().getBoundingClientRect(),oe=q.left-2-ee.left,ae=q.right+2-ee.left,j=q.top+q.height/4-ee.top,Q={valueLabel:S(fe.valueFormat)(fe.node.value)+fe.valueSuffix};fe.node.fullData=fe.node.trace,A._fullLayout._calcInverseTransform(A);var re=A._fullLayout._invScaleX,ce=A._fullLayout._invScaleY,be=e.loneHover({x0:re*oe,x1:re*ae,y:ce*j,name:S(fe.valueFormat)(fe.node.value)+fe.valueSuffix,text:[fe.node.label,N+fe.node.targetLinks.length,O+fe.node.sourceLinks.length].filter(a).join("<br>"),color:_(V,"bgcolor")||fe.tinyColorHue,borderColor:_(V,"bordercolor"),fontFamily:_(V,"font.family"),fontSize:_(V,"font.size"),fontColor:_(V,"font.color"),fontWeight:_(V,"font.weight"),fontStyle:_(V,"font.style"),fontVariant:_(V,"font.variant"),fontTextcase:_(V,"font.textcase"),fontLineposition:_(V,"font.lineposition"),fontShadow:_(V,"font.shadow"),nameLength:_(V,"namelength"),textAlign:_(V,"align"),idealAlign:"left",hovertemplate:V.hovertemplate,hovertemplateLabels:Q,eventData:[fe.node]},{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:A});i(be,.85),s(be)}}},se=function(le,fe,V){A._fullLayout.hovermode!==!1&&(v.select(le).call(p,fe,V),fe.node.trace.node.hoverinfo!=="skip"&&(fe.node.fullData=fe.node.trace,A.emit("plotly_unhover",{event:v.event,points:[fe.node]})),e.loneUnhover(g._hoverlayer.node()))};E(A,b,M,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{linkEvents:{hover:R,follow:P,unhover:U,select:f},nodeEvents:{hover:X,follow:$,unhover:se,select:B}})}}}),mG=Xe({"src/traces/sankey/base_plot.js"(Z){"use strict";var G=pc().overrideAll,v=Hh().getModuleCalcData,x=q6(),S=Zm(),E=Kd(),e=Ap(),t=Af().prepSelect,r=sa(),o=so(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=G({hoverlabel:S.hoverlabel},"plot","nested"),Z.plot=function(i){var s=v(i.calcdata,a)[0];x(i,s),Z.updateFx(i)},Z.clean=function(i,s,h,c){var m=c._has&&c._has(a),p=s._has&&s._has(a);m&&!p&&(c._paperdiv.selectAll(".sankey").remove(),c._paperdiv.selectAll(".bgsankey").remove())},Z.updateFx=function(i){for(var s=0;s<i._fullData.length;s++)n(i,s)};function n(i,s){var h=i._fullData[s],c=i._fullLayout,m=c.dragmode,p=c.dragmode==="pan"?"move":"crosshair",T=h._bgRect;if(T&&!(m==="pan"||m==="zoom")){E(T,p);var l={_id:"x",c2p:r.identity,_offset:h._sankey.translateX,_length:h._sankey.width},_={_id:"y",c2p:r.identity,_offset:h._sankey.translateY,_length:h._sankey.height},w={gd:i,element:T.node(),plotinfo:{id:s,xaxis:l,yaxis:_,fillRangeItems:r.noop},subplot:s,xaxes:[l],yaxes:[_],doneFnCompleted:function(A){var M=i._fullData[s],g,b=M.node.groups.slice(),d=[];function u(L){for(var z=M._sankey.graph.nodes,F=0;F<z.length;F++)if(z[F].pointNumber===L)return z[F]}for(var y=0;y<A.length;y++){var f=u(A[y].pointNumber);if(f)if(f.group){for(var R=0;R<f.childrenNodes.length;R++)d.push(f.childrenNodes[R].pointNumber);b[f.pointNumber-M.node._count]=!1}else d.push(f.pointNumber)}g=b.filter(Boolean).concat([d]),o.call("_guiRestyle",i,{"node.groups":[g]},s)}};w.prepFn=function(A,M,g){t(A,M,g,w,m)},e.init(w)}}}}),gG=Xe({"src/traces/sankey/select.js"(Z,G){"use strict";G.exports=function(x,S){for(var E=x.cd,e=[],t=E[0].trace,r=t._sankey.graph.nodes,o=0;o<r.length;o++){var a=r[o];if(!a.partOfGroup){var n=[(a.x0+a.x1)/2,(a.y0+a.y1)/2];t.orientation==="v"&&n.reverse(),S&&S.contains(n,!1,o,x)&&e.push({pointNumber:a.pointNumber})}}return e}}}),yG=Xe({"src/traces/sankey/index.js"(Z,G){"use strict";G.exports={attributes:B6(),supplyDefaults:nG(),calc:oG(),plot:q6(),moduleType:"trace",name:"sankey",basePlotModule:mG(),selectPoints:gG(),categories:["noOpacity"],meta:{}}}}),_G=Xe({"lib/sankey.js"(Z,G){"use strict";G.exports=yG()}}),xG=Xe({"src/traces/indicator/base_plot.js"(Z){"use strict";var G=bc();Z.name="indicator",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),V6=Xe({"src/traces/indicator/attributes.js"(Z,G){"use strict";var v=Qo().extendFlat,x=Qo().extendDeep,S=pc().overrideAll,E=tc(),e=sh(),t=wc().attributes,r=Wh(),o=zl().templatedArray,a=d1(),n=tf().descriptionOnlyNumbers,i=E({editType:"plot",colorEditType:"plot"}),s={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:e.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},h={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},c=o("step",x({},s,{range:h}));G.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:t({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:v({},i,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:n("value")},font:v({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:n("value")},increasing:{symbol:{valType:"string",dflt:a.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:a.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:v({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:x({},s,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:S({range:h,visible:v({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:v({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:E({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:c,threshold:{line:{color:v({},s.line.color,{}),width:v({},s.line.width,{dflt:1}),editType:"plot"},thickness:v({},s.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}}),G6=Xe({"src/traces/indicator/constants.js"(Z,G){"use strict";G.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}}),bG=Xe({"src/traces/indicator/defaults.js"(Z,G){"use strict";var v=sa(),x=V6(),S=wc().defaults,E=zl(),e=hp(),t=G6(),r=Y0(),o=t1(),a=Qm(),n=e0();function i(h,c,m,p){function T(P,U){return v.coerce(h,c,x,P,U)}S(c,p,T),T("mode"),c._hasNumber=c.mode.indexOf("number")!==-1,c._hasDelta=c.mode.indexOf("delta")!==-1,c._hasGauge=c.mode.indexOf("gauge")!==-1;var l=T("value");c._range=[0,typeof l=="number"?1.5*l:1];var _=new Array(2),w;if(c._hasNumber){T("number.valueformat");var A=v.extendFlat({},p.font);A.size=void 0,v.coerceFont(T,"number.font",A),c.number.font.size===void 0&&(c.number.font.size=t.defaultNumberFontSize,_[0]=!0),T("number.prefix"),T("number.suffix"),w=c.number.font.size}var M;if(c._hasDelta){var g=v.extendFlat({},p.font);g.size=void 0,v.coerceFont(T,"delta.font",g),c.delta.font.size===void 0&&(c.delta.font.size=(c._hasNumber?.5:1)*(w||t.defaultNumberFontSize),_[1]=!0),T("delta.reference",c.value),T("delta.relative"),T("delta.valueformat",c.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),M=c.delta.font.size}c._scaleNumbers=(!c._hasNumber||_[0])&&(!c._hasDelta||_[1])||!1;var b=v.extendFlat({},p.font);b.size=.25*(w||M||t.defaultNumberFontSize),v.coerceFont(T,"title.font",b),T("title.text");var d,u,y,f;function R(P,U){return v.coerce(d,u,x.gauge,P,U)}function L(P,U){return v.coerce(y,f,x.gauge.axis,P,U)}if(c._hasGauge){d=h.gauge,d||(d={}),u=E.newContainer(c,"gauge"),R("shape");var z=c._isBullet=c.gauge.shape==="bullet";z||T("title.align","center");var F=c._isAngular=c.gauge.shape==="angular";F||T("align","center"),R("bgcolor",p.paper_bgcolor),R("borderwidth"),R("bordercolor"),R("bar.color"),R("bar.line.color"),R("bar.line.width");var N=t.valueThickness*(c.gauge.shape==="bullet"?.5:1);R("bar.thickness",N),e(d,u,{name:"steps",handleItemDefaults:s}),R("threshold.value"),R("threshold.thickness"),R("threshold.line.width"),R("threshold.line.color"),y={},d&&(y=d.axis||{}),f=E.newContainer(u,"axis"),L("visible"),c._range=L("range",c._range);var O={font:p.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(y,f,L,"linear"),n(y,f,L,"linear",O),a(y,f,L,"linear",O),o(y,f,L,O)}else T("title.align","center"),T("align","center"),c._isAngular=c._isBullet=!1;c._length=null}function s(h,c){function m(p,T){return v.coerce(h,c,x.gauge.steps,p,T)}m("color"),m("line.color"),m("line.width"),m("range"),m("thickness")}G.exports={supplyDefaults:i}}}),wG=Xe({"src/traces/indicator/calc.js"(Z,G){"use strict";function v(x,S){var E=[],e=S.value;typeof S._lastValue!="number"&&(S._lastValue=S.value);var t=S._lastValue,r=t;return S._hasDelta&&typeof S.delta.reference=="number"&&(r=S.delta.reference),E[0]={y:e,lastY:t,delta:e-r,relativeDelta:(e-r)/r},E}G.exports={calc:v}}}),TG=Xe({"src/traces/indicator/plot.js"(Z,G){"use strict";var v=Hn(),x=(pg(),zf(p0)).interpolate,S=(pg(),zf(p0)).interpolateNumber,E=sa(),e=E.strScale,t=E.strTranslate,r=E.rad2deg,o=uh().MID_SHIFT,a=es(),n=G6(),i=ou(),s=Go(),h=F_(),c=R2(),m=Wh(),p=$n(),T={left:"start",center:"middle",right:"end"},l={left:0,center:.5,right:1},_=/[yzafpnµmkMGTPEZY]/;function w(z){return z&&z.duration>0}G.exports=function(F,N,O,P){var U=F._fullLayout,B;w(O)&&P&&(B=P()),E.makeTraceGroups(U._indicatorlayer,N,"trace").each(function(X){var $=X[0],se=$.trace,le=v.select(this),fe=se._hasGauge,V=se._isAngular,Y=se._isBullet,ee=se.domain,q={w:U._size.w*(ee.x[1]-ee.x[0]),h:U._size.h*(ee.y[1]-ee.y[0]),l:U._size.l+U._size.w*ee.x[0],r:U._size.r+U._size.w*(1-ee.x[1]),t:U._size.t+U._size.h*(1-ee.y[1]),b:U._size.b+U._size.h*ee.y[0]},oe=q.l+q.w/2,ae=q.t+q.h/2,j=Math.min(q.w/2,q.h),Q=n.innerRadius*j,re,ce,be,Ae=se.align||"center";if(ce=ae,!fe)re=q.l+l[Ae]*q.w,be=function(he){return y(he,q.w,q.h)};else if(V&&(re=oe,ce=ae+j/2,be=function(he){return f(he,.9*Q)}),Y){var De=n.bulletPadding,ze=1-n.bulletNumberDomainSize+De;re=q.l+(ze+(1-ze)*l[Ae])*q.w,be=function(he){return y(he,(n.bulletNumberDomainSize-De)*q.w,q.h)}}g(F,le,X,{numbersX:re,numbersY:ce,numbersScaler:be,transitionOpts:O,onComplete:B});var Ze,at;fe&&(Ze={range:se.gauge.axis.range,color:se.gauge.bgcolor,line:{color:se.gauge.bordercolor,width:0},thickness:1},at={range:se.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:se.gauge.bordercolor,width:se.gauge.borderwidth},thickness:1});var nt=le.selectAll("g.angular").data(V?X:[]);nt.exit().remove();var rt=le.selectAll("g.angularaxis").data(V?X:[]);rt.exit().remove(),V&&M(F,le,X,{radius:j,innerRadius:Q,gauge:nt,layer:rt,size:q,gaugeBg:Ze,gaugeOutline:at,transitionOpts:O,onComplete:B});var st=le.selectAll("g.bullet").data(Y?X:[]);st.exit().remove();var Me=le.selectAll("g.bulletaxis").data(Y?X:[]);Me.exit().remove(),Y&&A(F,le,X,{gauge:st,layer:Me,size:q,gaugeBg:Ze,gaugeOutline:at,transitionOpts:O,onComplete:B});var ye=le.selectAll("text.title").data(X);ye.exit().remove(),ye.enter().append("text").classed("title",!0),ye.attr("text-anchor",function(){return Y?T.right:T[se.title.align]}).text(se.title.text).call(a.font,se.title.font).call(i.convertToTspans,F),ye.attr("transform",function(){var he=q.l+q.w*l[se.title.align],Oe,tt=n.titlePadding,ot=a.bBox(ye.node());if(fe){if(V)if(se.gauge.axis.visible){var Qe=a.bBox(rt.node());Oe=Qe.top-tt-ot.bottom}else Oe=q.t+q.h/2-j/2-ot.bottom-tt;Y&&(Oe=ce-(ot.top+ot.bottom)/2,he=q.l-n.bulletPadding*q.w)}else Oe=se._numbersTop-tt-ot.bottom;return t(he,Oe)})})};function A(z,F,N,O){var P=N[0].trace,U=O.gauge,B=O.layer,X=O.gaugeBg,$=O.gaugeOutline,se=O.size,le=P.domain,fe=O.transitionOpts,V=O.onComplete,Y,ee,q,oe,ae;U.enter().append("g").classed("bullet",!0),U.attr("transform",t(se.l,se.t)),B.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),B.selectAll("g.xbulletaxistick,path,text").remove();var j=se.h,Q=P.gauge.bar.thickness*j,re=le.x[0],ce=le.x[0]+(le.x[1]-le.x[0])*(P._hasNumber||P._hasDelta?1-n.bulletNumberDomainSize:1);Y=u(z,P.gauge.axis),Y._id="xbulletaxis",Y.domain=[re,ce],Y.setScale(),ee=s.calcTicks(Y),q=s.makeTransTickFn(Y),oe=s.getTickSigns(Y)[2],ae=se.t+se.h,Y.visible&&(s.drawTicks(z,Y,{vals:Y.ticks==="inside"?s.clipEnds(Y,ee):ee,layer:B,path:s.makeTickPath(Y,ae,oe),transFn:q}),s.drawLabels(z,Y,{vals:ee,layer:B,transFn:q,labelFns:s.makeLabelFns(Y,ae)}));function be(rt){rt.attr("width",function(st){return Math.max(0,Y.c2p(st.range[1])-Y.c2p(st.range[0]))}).attr("x",function(st){return Y.c2p(st.range[0])}).attr("y",function(st){return .5*(1-st.thickness)*j}).attr("height",function(st){return st.thickness*j})}var Ae=[X].concat(P.gauge.steps),De=U.selectAll("g.bg-bullet").data(Ae);De.enter().append("g").classed("bg-bullet",!0).append("rect"),De.select("rect").call(be).call(b),De.exit().remove();var ze=U.selectAll("g.value-bullet").data([P.gauge.bar]);ze.enter().append("g").classed("value-bullet",!0).append("rect"),ze.select("rect").attr("height",Q).attr("y",(j-Q)/2).call(b),w(fe)?ze.select("rect").transition().duration(fe.duration).ease(fe.easing).each("end",function(){V&&V()}).each("interrupt",function(){V&&V()}).attr("width",Math.max(0,Y.c2p(Math.min(P.gauge.axis.range[1],N[0].y)))):ze.select("rect").attr("width",typeof N[0].y=="number"?Math.max(0,Y.c2p(Math.min(P.gauge.axis.range[1],N[0].y))):0),ze.exit().remove();var Ze=N.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),at=U.selectAll("g.threshold-bullet").data(Ze);at.enter().append("g").classed("threshold-bullet",!0).append("line"),at.select("line").attr("x1",Y.c2p(P.gauge.threshold.value)).attr("x2",Y.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*j).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*j).call(p.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),at.exit().remove();var nt=U.selectAll("g.gauge-outline").data([$]);nt.enter().append("g").classed("gauge-outline",!0).append("rect"),nt.select("rect").call(be).call(b),nt.exit().remove()}function M(z,F,N,O){var P=N[0].trace,U=O.size,B=O.radius,X=O.innerRadius,$=O.gaugeBg,se=O.gaugeOutline,le=[U.l+U.w/2,U.t+U.h/2+B/2],fe=O.gauge,V=O.layer,Y=O.transitionOpts,ee=O.onComplete,q=Math.PI/2;function oe(Pt){var It=P.gauge.axis.range[0],qt=P.gauge.axis.range[1],Wt=(Pt-It)/(qt-It)*Math.PI-q;return Wt<-q?-q:Wt>q?q:Wt}function ae(Pt){return v.svg.arc().innerRadius((X+B)/2-Pt/2*(B-X)).outerRadius((X+B)/2+Pt/2*(B-X)).startAngle(-q)}function j(Pt){Pt.attr("d",function(It){return ae(It.thickness).startAngle(oe(It.range[0])).endAngle(oe(It.range[1]))()})}var Q,re,ce,be;fe.enter().append("g").classed("angular",!0),fe.attr("transform",t(le[0],le[1])),V.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),V.selectAll("g.xangularaxistick,path,text").remove(),Q=u(z,P.gauge.axis),Q.type="linear",Q.range=P.gauge.axis.range,Q._id="xangularaxis",Q.ticklabeloverflow="allow",Q.setScale();var Ae=function(Pt){return(Q.range[0]-Pt.x)/(Q.range[1]-Q.range[0])*Math.PI+Math.PI},De={},ze=s.makeLabelFns(Q,0),Ze=ze.labelStandoff;De.xFn=function(Pt){var It=Ae(Pt);return Math.cos(It)*Ze},De.yFn=function(Pt){var It=Ae(Pt),qt=Math.sin(It)>0?.2:1;return-Math.sin(It)*(Ze+Pt.fontSize*qt)+Math.abs(Math.cos(It))*(Pt.fontSize*o)},De.anchorFn=function(Pt){var It=Ae(Pt),qt=Math.cos(It);return Math.abs(qt)<.1?"middle":qt>0?"start":"end"},De.heightFn=function(Pt,It,qt){var Wt=Ae(Pt);return-.5*(1+Math.sin(Wt))*qt};var at=function(Pt){return t(le[0]+B*Math.cos(Pt),le[1]-B*Math.sin(Pt))};ce=function(Pt){return at(Ae(Pt))};var nt=function(Pt){var It=Ae(Pt);return at(It)+"rotate("+-r(It)+")"};if(re=s.calcTicks(Q),be=s.getTickSigns(Q)[2],Q.visible){be=Q.ticks==="inside"?-1:1;var rt=(Q.linewidth||1)/2;s.drawTicks(z,Q,{vals:re,layer:V,path:"M"+be*rt+",0h"+be*Q.ticklen,transFn:nt}),s.drawLabels(z,Q,{vals:re,layer:V,transFn:ce,labelFns:De})}var st=[$].concat(P.gauge.steps),Me=fe.selectAll("g.bg-arc").data(st);Me.enter().append("g").classed("bg-arc",!0).append("path"),Me.select("path").call(j).call(b),Me.exit().remove();var ye=ae(P.gauge.bar.thickness),he=fe.selectAll("g.value-arc").data([P.gauge.bar]);he.enter().append("g").classed("value-arc",!0).append("path");var Oe=he.select("path");w(Y)?(Oe.transition().duration(Y.duration).ease(Y.easing).each("end",function(){ee&&ee()}).each("interrupt",function(){ee&&ee()}).attrTween("d",d(ye,oe(N[0].lastY),oe(N[0].y))),P._lastValue=N[0].y):Oe.attr("d",typeof N[0].y=="number"?ye.endAngle(oe(N[0].y)):"M0,0Z"),Oe.call(b),he.exit().remove(),st=[];var tt=P.gauge.threshold.value;(tt||tt===0)&&st.push({range:[tt,tt],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var ot=fe.selectAll("g.threshold-arc").data(st);ot.enter().append("g").classed("threshold-arc",!0).append("path"),ot.select("path").call(j).call(b),ot.exit().remove();var Qe=fe.selectAll("g.gauge-outline").data([se]);Qe.enter().append("g").classed("gauge-outline",!0).append("path"),Qe.select("path").call(j).call(b),Qe.exit().remove()}function g(z,F,N,O){var P=N[0].trace,U=O.numbersX,B=O.numbersY,X=P.align||"center",$=T[X],se=O.transitionOpts,le=O.onComplete,fe=E.ensureSingle(F,"g","numbers"),V,Y,ee,q=[];P._hasNumber&&q.push("number"),P._hasDelta&&(q.push("delta"),P.delta.position==="left"&&q.reverse());var oe=fe.selectAll("text").data(q);oe.enter().append("text"),oe.attr("text-anchor",function(){return $}).attr("class",function(at){return at}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),oe.exit().remove();function ae(at,nt,rt,st){if(at.match("s")&&rt>=0!=st>=0&&!nt(rt).slice(-1).match(_)&&!nt(st).slice(-1).match(_)){var Me=at.slice().replace("s","f").replace(/\d+/,function(he){return parseInt(he)-1}),ye=u(z,{tickformat:Me});return function(he){return Math.abs(he)<1?s.tickText(ye,he).text:nt(he)}}else return nt}function j(){var at=u(z,{tickformat:P.number.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(he){return s.tickText(at,he).text},rt=P.number.suffix,st=P.number.prefix,Me=fe.select("text.number");function ye(){var he=typeof N[0].y=="number"?st+nt(N[0].y)+rt:"-";Me.text(he).call(a.font,P.number.font).call(i.convertToTspans,z)}return w(se)?Me.transition().duration(se.duration).ease(se.easing).each("end",function(){ye(),le&&le()}).each("interrupt",function(){ye(),le&&le()}).attrTween("text",function(){var he=v.select(this),Oe=S(N[0].lastY,N[0].y);P._lastValue=N[0].y;var tt=ae(P.number.valueformat,nt,N[0].lastY,N[0].y);return function(ot){he.text(st+tt(Oe(ot))+rt)}}):ye(),V=R(st+nt(N[0].y)+rt,P.number.font,$,z),Me}function Q(){var at=u(z,{tickformat:P.delta.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(ot){return s.tickText(at,ot).text},rt=P.delta.suffix,st=P.delta.prefix,Me=function(ot){var Qe=P.delta.relative?ot.relativeDelta:ot.delta;return Qe},ye=function(ot,Qe){return ot===0||typeof ot!="number"||isNaN(ot)?"-":(ot>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+st+Qe(ot)+rt},he=function(ot){return ot.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=Me(N[0]));var Oe=fe.select("text.delta");Oe.call(a.font,P.delta.font).call(p.fill,he({delta:P._deltaLastValue}));function tt(){Oe.text(ye(Me(N[0]),nt)).call(p.fill,he(N[0])).call(i.convertToTspans,z)}return w(se)?Oe.transition().duration(se.duration).ease(se.easing).tween("text",function(){var ot=v.select(this),Qe=Me(N[0]),Pt=P._deltaLastValue,It=ae(P.delta.valueformat,nt,Pt,Qe),qt=S(Pt,Qe);return P._deltaLastValue=Qe,function(Wt){ot.text(ye(qt(Wt),It)),ot.call(p.fill,he({delta:qt(Wt)}))}}).each("end",function(){tt(),le&&le()}).each("interrupt",function(){tt(),le&&le()}):tt(),Y=R(ye(Me(N[0]),nt),P.delta.font,$,z),Oe}var re=P.mode+P.align,ce;if(P._hasDelta&&(ce=Q(),re+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,re+=P.delta.increasing.symbol+P.delta.decreasing.symbol,ee=Y),P._hasNumber&&(j(),re+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,ee=V),P._hasDelta&&P._hasNumber){var be=[(V.left+V.right)/2,(V.top+V.bottom)/2],Ae=[(Y.left+Y.right)/2,(Y.top+Y.bottom)/2],De,ze,Ze=.75*P.delta.font.size;P.delta.position==="left"&&(De=L(P,"deltaPos",0,-1*(V.width*l[P.align]+Y.width*(1-l[P.align])+Ze),re,Math.min),ze=be[1]-Ae[1],ee={width:V.width+Y.width+Ze,height:Math.max(V.height,Y.height),left:Y.left+De,right:V.right,top:Math.min(V.top,Y.top+ze),bottom:Math.max(V.bottom,Y.bottom+ze)}),P.delta.position==="right"&&(De=L(P,"deltaPos",0,V.width*(1-l[P.align])+Y.width*l[P.align]+Ze,re,Math.max),ze=be[1]-Ae[1],ee={width:V.width+Y.width+Ze,height:Math.max(V.height,Y.height),left:V.left,right:Y.right+De,top:Math.min(V.top,Y.top+ze),bottom:Math.max(V.bottom,Y.bottom+ze)}),P.delta.position==="bottom"&&(De=null,ze=Y.height,ee={width:Math.max(V.width,Y.width),height:V.height+Y.height,left:Math.min(V.left,Y.left),right:Math.max(V.right,Y.right),top:V.bottom-V.height,bottom:V.bottom+Y.height}),P.delta.position==="top"&&(De=null,ze=V.top,ee={width:Math.max(V.width,Y.width),height:V.height+Y.height,left:Math.min(V.left,Y.left),right:Math.max(V.right,Y.right),top:V.bottom-V.height-Y.height,bottom:V.bottom}),ce.attr({dx:De,dy:ze})}(P._hasNumber||P._hasDelta)&&fe.attr("transform",function(){var at=O.numbersScaler(ee);re+=at[2];var nt=L(P,"numbersScale",1,at[0],re,Math.min),rt;P._scaleNumbers||(nt=1),P._isAngular?rt=B-nt*ee.bottom:rt=B-nt*(ee.top+ee.bottom)/2,P._numbersTop=nt*ee.top+rt;var st=ee[X];X==="center"&&(st=(ee.left+ee.right)/2);var Me=U-nt*st;return Me=L(P,"numbersTranslate",0,Me,re,Math.max),t(Me,rt)+e(nt)})}function b(z){z.each(function(F){p.stroke(v.select(this),F.line.color)}).each(function(F){p.fill(v.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function d(z,F,N){return function(){var O=x(F,N);return function(P){return z.endAngle(O(P))()}}}function u(z,F,N){var O=z._fullLayout,P=E.extendFlat({type:"linear",ticks:"outside",range:N,showline:!0},F),U={type:"linear",_id:"x"+F._id},B={letter:"x",font:O.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function X($,se){return E.coerce(P,U,m,$,se)}return h(P,U,X,B,O),c(P,U,X,B),U}function y(z,F,N){var O=Math.min(F/z.width,N/z.height);return[O,z,F+"x"+N]}function f(z,F){var N=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/N;return[O,z,F]}function R(z,F,N,O){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),U=v.select(P);return U.text(z).attr("x",0).attr("y",0).attr("text-anchor",N).attr("data-unformatted",z).call(i.convertToTspans,O).call(a.font,F),a.bBox(U.node())}function L(z,F,N,O,P,U){var B="_cache"+F;z[B]&&z[B].key===P||(z[B]={key:P,value:N});var X=E.aggNums(U,null,[z[B].value,O],2);return z[B].value=X,X}}}),AG=Xe({"src/traces/indicator/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"indicator",basePlotModule:xG(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:V6(),supplyDefaults:bG().supplyDefaults,calc:wG().calc,plot:TG(),meta:{}}}}),SG=Xe({"lib/indicator.js"(Z,G){"use strict";G.exports=AG()}}),H6=Xe({"src/traces/table/attributes.js"(Z,G){"use strict";var v=$0(),x=Qo().extendFlat,S=pc().overrideAll,E=tc(),e=wc().attributes,t=tf().descriptionOnlyNumbers,r=G.exports=S({domain:e({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:x({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},E({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:x({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},E({arrayOk:!0}))}},"calc","from-root")}}),MG=Xe({"src/traces/table/defaults.js"(Z,G){"use strict";var v=sa(),x=H6(),S=wc().defaults;function E(e,t){for(var r=e.columnorder||[],o=e.header.values.length,a=r.slice(0,o),n=a.slice().sort(function(h,c){return h-c}),i=a.map(function(h){return n.indexOf(h)}),s=i.length;s<o;s++)i.push(s);t("columnorder",i)}G.exports=function(t,r,o,a){function n(i,s){return v.coerce(t,r,x,i,s)}S(r,a,n),n("columnwidth"),n("header.values"),n("header.format"),n("header.align"),n("header.prefix"),n("header.suffix"),n("header.height"),n("header.line.width"),n("header.line.color"),n("header.fill.color"),v.coerceFont(n,"header.font",a.font),E(r,n),n("cells.values"),n("cells.format"),n("cells.align"),n("cells.prefix"),n("cells.suffix"),n("cells.height"),n("cells.line.width"),n("cells.line.color"),n("cells.fill.color"),v.coerceFont(n,"cells.font",a.font),r._length=null}}}),EG=Xe({"src/traces/table/calc.js"(Z,G){"use strict";var v=kv().wrap;G.exports=function(){return v({})}}}),W6=Xe({"src/traces/table/constants.js"(Z,G){"use strict";G.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),kG=Xe({"src/traces/table/data_preparation_helper.js"(Z,G){"use strict";var v=W6(),x=Qo().extendFlat,S=rs(),E=bp().isTypedArray,e=bp().isArrayOrTypedArray;G.exports=function(m,p){var T=o(p.cells.values),l=function($){return $.slice(p.header.values.length,$.length)},_=o(p.header.values);_.length&&!_[0].length&&(_[0]=[""],_=o(_));var w=_.concat(l(T).map(function(){return a((_[0]||[""]).length)})),A=p.domain,M=Math.floor(m._fullLayout._size.w*(A.x[1]-A.x[0])),g=Math.floor(m._fullLayout._size.h*(A.y[1]-A.y[0])),b=p.header.values.length?w[0].map(function(){return p.header.height}):[v.emptyHeaderHeight],d=T.length?T[0].map(function(){return p.cells.height}):[],u=b.reduce(r,0),y=g-u,f=y+v.uplift,R=s(d,f),L=s(b,u),z=i(L,[]),F=i(R,z),N={},O=p._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function($,se){return se})));var P=w.map(function($,se){var le=e(p.columnwidth)?p.columnwidth[Math.min(se,p.columnwidth.length-1)]:p.columnwidth;return S(le)?Number(le):1}),U=P.reduce(r,0);P=P.map(function($){return $/U*M});var B=Math.max(t(p.header.line.width),t(p.cells.line.width)),X={key:p.uid+m._context.staticPlot,translateX:A.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-A.y[1]),size:m._fullLayout._size,width:M,maxLineWidth:B,height:g,columnOrder:O,groupHeight:g,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:x({},p.cells,{values:T}),headerCells:x({},p.header,{values:w}),gdColumns:w.map(function($){return $[0]}),gdColumnsOriginalOrder:w.map(function($){return $[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:w.map(function($,se){var le=N[$];N[$]=(le||0)+1;var fe=$+"__"+N[$];return{key:fe,label:$,specIndex:se,xIndex:O[se],xScale:n,x:void 0,calcdata:void 0,columnWidth:P[se]}})};return X.columns.forEach(function($){$.calcdata=X,$.x=n($)}),X};function t(c){if(e(c)){for(var m=0,p=0;p<c.length;p++)m=Math.max(m,t(c[p]));return m}return c}function r(c,m){return c+m}function o(c){var m=c.slice(),p=1/0,T=0,l;for(l=0;l<m.length;l++)E(m[l])?m[l]=Array.from(m[l]):e(m[l])||(m[l]=[m[l]]),p=Math.min(p,m[l].length),T=Math.max(T,m[l].length);if(p!==T)for(l=0;l<m.length;l++){var _=T-m[l].length;_&&(m[l]=m[l].concat(a(_)))}return m}function a(c){for(var m=new Array(c),p=0;p<c;p++)m[p]="";return m}function n(c){return c.calcdata.columns.reduce(function(m,p){return p.xIndex<c.xIndex?m+p.columnWidth:m},0)}function i(c,m){var p=Object.keys(c);return p.map(function(T){return x({},c[T],{auxiliaryBlocks:m})})}function s(c,m){for(var p={},T,l=0,_=0,w=h(),A=0,M=0,g=0;g<c.length;g++)T=c[g],w.rows.push({rowIndex:g,rowHeight:T}),_+=T,(_>=m||g===c.length-1)&&(p[l]=w,w.key=M++,w.firstRowIndex=A,w.lastRowIndex=g,w=h(),l+=_,A=g+1,_=0);return p}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),CG=Xe({"src/traces/table/data_split_helpers.js"(Z){"use strict";var G=Qo().extendFlat;Z.splitToPanels=function(x){var S=[0,0],E=G({},x,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:x.calcdata.headerCells.values[x.specIndex],rowBlocks:x.calcdata.headerRowBlocks,calcdata:G({},x.calcdata,{cells:x.calcdata.headerCells})}),e=G({},x,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks}),t=G({},x,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks});return[e,t,E]},Z.splitToCells=function(x){var S=v(x);return(x.values||[]).slice(S[0],S[1]).map(function(E,e){var t=typeof E=="string"&&E.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:x,calcdata:x.calcdata,page:x.page,rowBlocks:x.rowBlocks,value:E}})};function v(x){var S=x.rowBlocks[x.page],E=S?S.rows[0].rowIndex:0,e=S?E+S.rows.length:0;return[E,e]}}}),X6=Xe({"src/traces/table/plot.js"(Z,G){"use strict";var v=W6(),x=Hn(),S=sa(),E=S.numberFormat,e=kv(),t=es(),r=ou(),o=sa().raiseToTop,a=sa().strTranslate,n=sa().cancelTransition,i=kG(),s=CG(),h=$n();G.exports=function(re,ce){var be=!re._context.staticPlot,Ae=re._fullLayout._paper.selectAll("."+v.cn.table).data(ce.map(function(Qe){var Pt=e.unwrap(Qe),It=Pt.trace;return i(re,It)}),e.keyFun);Ae.exit().remove(),Ae.enter().append("g").classed(v.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),Ae.attr("width",function(Qe){return Qe.width+Qe.size.l+Qe.size.r}).attr("height",function(Qe){return Qe.height+Qe.size.t+Qe.size.b}).attr("transform",function(Qe){return a(Qe.translateX,Qe.translateY)});var De=Ae.selectAll("."+v.cn.tableControlView).data(e.repeat,e.keyFun),ze=De.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(be){var Ze="onwheel"in document?"wheel":"mousewheel";ze.on("mousemove",function(Qe){De.filter(function(Pt){return Qe===Pt}).call(l,re)}).on(Ze,function(Qe){if(!Qe.scrollbarState.wheeling){Qe.scrollbarState.wheeling=!0;var Pt=Qe.scrollY+x.event.deltaY,It=$(re,De,null,Pt)(Qe);It||(x.event.stopPropagation(),x.event.preventDefault()),Qe.scrollbarState.wheeling=!1}}).call(l,re,!0)}De.attr("transform",function(Qe){return a(Qe.size.l,Qe.size.t)});var at=De.selectAll("."+v.cn.scrollBackground).data(e.repeat,e.keyFun);at.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),at.attr("width",function(Qe){return Qe.width}).attr("height",function(Qe){return Qe.height}),De.each(function(Qe){t.setClipUrl(x.select(this),m(re,Qe),re)});var nt=De.selectAll("."+v.cn.yColumn).data(function(Qe){return Qe.columns},e.keyFun);nt.enter().append("g").classed(v.cn.yColumn,!0),nt.exit().remove(),nt.attr("transform",function(Qe){return a(Qe.x,0)}),be&&nt.call(x.behavior.drag().origin(function(Qe){var Pt=x.select(this);return N(Pt,Qe,-v.uplift),o(this),Qe.calcdata.columnDragInProgress=!0,l(De.filter(function(It){return Qe.calcdata.key===It.key}),re),Qe}).on("drag",function(Qe){var Pt=x.select(this),It=function(kr){return(Qe===kr?x.event.x:kr.x)+kr.columnWidth/2};Qe.x=Math.max(-v.overdrag,Math.min(Qe.calcdata.width+v.overdrag-Qe.columnWidth,x.event.x));var qt=T(nt).filter(function(kr){return kr.calcdata.key===Qe.calcdata.key}),Wt=qt.sort(function(kr,mr){return It(kr)-It(mr)});Wt.forEach(function(kr,mr){kr.xIndex=mr,kr.x=Qe===kr?kr.x:kr.xScale(kr)}),nt.filter(function(kr){return Qe!==kr}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(kr){return a(kr.x,0)}),Pt.call(n).attr("transform",a(Qe.x,-v.uplift))}).on("dragend",function(Qe){var Pt=x.select(this),It=Qe.calcdata;Qe.x=Qe.xScale(Qe),Qe.calcdata.columnDragInProgress=!1,N(Pt,Qe,0),z(re,It,It.columns.map(function(qt){return qt.xIndex}))})),nt.each(function(Qe){t.setClipUrl(x.select(this),p(re,Qe),re)});var rt=nt.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,e.keyFun);rt.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Qe){return Qe.key}),rt.style("cursor",function(Qe){return Qe.dragHandle?"ew-resize":Qe.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var st=rt.filter(P),Me=rt.filter(O);be&&Me.call(x.behavior.drag().origin(function(Qe){return x.event.stopPropagation(),Qe}).on("drag",$(re,De,-1)).on("dragend",function(){})),_(re,De,st,rt),_(re,De,Me,rt);var ye=De.selectAll("."+v.cn.scrollAreaClip).data(e.repeat,e.keyFun);ye.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Qe){return m(re,Qe)});var he=ye.selectAll("."+v.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);he.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),he.attr("width",function(Qe){return Qe.width+2*v.overdrag}).attr("height",function(Qe){return Qe.height+v.uplift});var Oe=nt.selectAll("."+v.cn.columnBoundary).data(e.repeat,e.keyFun);Oe.enter().append("g").classed(v.cn.columnBoundary,!0);var tt=nt.selectAll("."+v.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);tt.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),tt.attr("id",function(Qe){return p(re,Qe)});var ot=tt.selectAll("."+v.cn.columnBoundaryRect).data(e.repeat,e.keyFun);ot.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),ot.attr("width",function(Qe){return Qe.columnWidth+2*c(Qe)}).attr("height",function(Qe){return Qe.calcdata.height+2*c(Qe)+v.uplift}).attr("x",function(Qe){return-c(Qe)}).attr("y",function(Qe){return-c(Qe)}),X(null,Me,De)};function c(Q){return Math.ceil(Q.calcdata.maxLineWidth/2)}function m(Q,re){return"clip"+Q._fullLayout._uid+"_scrollAreaBottomClip_"+re.key}function p(Q,re){return"clip"+Q._fullLayout._uid+"_columnBoundaryClippath_"+re.calcdata.key+"_"+re.specIndex}function T(Q){return[].concat.apply([],Q.map(function(re){return re})).map(function(re){return re.__data__})}function l(Q,re,ce){function be(nt){var rt=nt.rowBlocks;return ee(rt,rt.length-1)+(rt.length?q(rt[rt.length-1],1/0):1)}var Ae=Q.selectAll("."+v.cn.scrollbarKit).data(e.repeat,e.keyFun);Ae.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Ae.each(function(nt){var rt=nt.scrollbarState;rt.totalHeight=be(nt),rt.scrollableAreaHeight=nt.groupHeight-U(nt),rt.currentlyVisibleHeight=Math.min(rt.totalHeight,rt.scrollableAreaHeight),rt.ratio=rt.currentlyVisibleHeight/rt.totalHeight,rt.barLength=Math.max(rt.ratio*rt.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),rt.barWiggleRoom=rt.currentlyVisibleHeight-rt.barLength,rt.wiggleRoom=Math.max(0,rt.totalHeight-rt.scrollableAreaHeight),rt.topY=rt.barWiggleRoom===0?0:nt.scrollY/rt.wiggleRoom*rt.barWiggleRoom,rt.bottomY=rt.topY+rt.barLength,rt.dragMultiplier=rt.wiggleRoom/rt.barWiggleRoom}).attr("transform",function(nt){var rt=nt.width+v.scrollbarWidth/2+v.scrollbarOffset;return a(rt,U(nt))});var De=Ae.selectAll("."+v.cn.scrollbar).data(e.repeat,e.keyFun);De.enter().append("g").classed(v.cn.scrollbar,!0);var ze=De.selectAll("."+v.cn.scrollbarSlider).data(e.repeat,e.keyFun);ze.enter().append("g").classed(v.cn.scrollbarSlider,!0),ze.attr("transform",function(nt){return a(0,nt.scrollbarState.topY||0)});var Ze=ze.selectAll("."+v.cn.scrollbarGlyph).data(e.repeat,e.keyFun);Ze.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),Ze.attr("y2",function(nt){return nt.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(nt){return nt.columnDragInProgress||!nt.scrollbarState.barWiggleRoom||ce?0:.4}),Ze.transition().delay(0).duration(0),Ze.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var at=De.selectAll("."+v.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);at.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(nt){var rt=x.event.y,st=this.getBoundingClientRect(),Me=nt.scrollbarState,ye=rt-st.top,he=x.scale.linear().domain([0,Me.scrollableAreaHeight]).range([0,Me.totalHeight]).clamp(!0);Me.topY<=ye&&ye<=Me.bottomY||$(re,Q,null,he(ye-Me.barLength/2))(nt)}).call(x.behavior.drag().origin(function(nt){return x.event.stopPropagation(),nt.scrollbarState.scrollbarScrollInProgress=!0,nt}).on("drag",$(re,Q)).on("dragend",function(){})),at.attr("y2",function(nt){return nt.scrollbarState.scrollableAreaHeight}),re._context.staticPlot&&(Ze.remove(),at.remove())}function _(Q,re,ce,be){var Ae=w(ce),De=A(Ae);d(De);var ze=M(De);y(ze);var Ze=b(De),at=g(Ze);u(at),f(at,re,be,Q),Y(De)}function w(Q){var re=Q.selectAll("."+v.cn.columnCells).data(e.repeat,e.keyFun);return re.enter().append("g").classed(v.cn.columnCells,!0),re.exit().remove(),re}function A(Q){var re=Q.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(v.cn.columnCell,!0),re.exit().remove(),re}function M(Q){var re=Q.selectAll("."+v.cn.cellRect).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("rect").classed(v.cn.cellRect,!0),re}function g(Q){var re=Q.selectAll("."+v.cn.cellText).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){x.event.stopPropagation()}),re}function b(Q){var re=Q.selectAll("."+v.cn.cellTextHolder).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),re}function d(Q){Q.each(function(re,ce){var be=re.calcdata.cells.font,Ae=re.column.specIndex,De={size:F(be.size,Ae,ce),color:F(be.color,Ae,ce),family:F(be.family,Ae,ce),weight:F(be.weight,Ae,ce),style:F(be.style,Ae,ce),variant:F(be.variant,Ae,ce),textcase:F(be.textcase,Ae,ce),lineposition:F(be.lineposition,Ae,ce),shadow:F(be.shadow,Ae,ce)};re.rowNumber=re.key,re.align=F(re.calcdata.cells.align,Ae,ce),re.cellBorderWidth=F(re.calcdata.cells.line.width,Ae,ce),re.font=De})}function u(Q){Q.each(function(re){t.font(x.select(this),re.font)})}function y(Q){Q.attr("width",function(re){return re.column.columnWidth}).attr("stroke-width",function(re){return re.cellBorderWidth}).each(function(re){var ce=x.select(this);h.stroke(ce,F(re.calcdata.cells.line.color,re.column.specIndex,re.rowNumber)),h.fill(ce,F(re.calcdata.cells.fill.color,re.column.specIndex,re.rowNumber))})}function f(Q,re,ce,be){Q.text(function(Ae){var De=Ae.column.specIndex,ze=Ae.rowNumber,Ze=Ae.value,at=typeof Ze=="string",nt=at&&Ze.match(/<br>/i),rt=!at||nt;Ae.mayHaveMarkup=at&&Ze.match(/[<&>]/);var st=R(Ze);Ae.latex=st;var Me=st?"":F(Ae.calcdata.cells.prefix,De,ze)||"",ye=st?"":F(Ae.calcdata.cells.suffix,De,ze)||"",he=st?null:F(Ae.calcdata.cells.format,De,ze)||null,Oe=Me+(he?E(he)(Ae.value):Ae.value)+ye,tt;Ae.wrappingNeeded=!Ae.wrapped&&!rt&&!st&&(tt=L(Oe)),Ae.cellHeightMayIncrease=nt||st||Ae.mayHaveMarkup||(tt===void 0?L(Oe):tt),Ae.needsConvertToTspans=Ae.mayHaveMarkup||Ae.wrappingNeeded||Ae.latex;var ot;if(Ae.wrappingNeeded){var Qe=v.wrapSplitCharacter===" "?Oe.replace(/<a href=/ig,"<a_href="):Oe,Pt=Qe.split(v.wrapSplitCharacter),It=v.wrapSplitCharacter===" "?Pt.map(function(qt){return qt.replace(/<a_href=/ig,"<a href=")}):Pt;Ae.fragments=It.map(function(qt){return{text:qt,width:null}}),Ae.fragments.push({fragment:v.wrapSpacer,width:null}),ot=It.join(v.lineBreaker)+v.lineBreaker+v.wrapSpacer}else delete Ae.fragments,ot=Oe;return ot}).attr("dy",function(Ae){return Ae.needsConvertToTspans?0:"0.75em"}).each(function(Ae){var De=this,ze=x.select(De),Ze=Ae.wrappingNeeded?le:fe;Ae.needsConvertToTspans?r.convertToTspans(ze,be,Ze(ce,De,re,be,Ae)):x.select(De.parentNode).attr("transform",function(at){return a(V(at),v.cellPad)}).attr("text-anchor",function(at){return{left:"start",center:"middle",right:"end"}[at.align]})})}function R(Q){return typeof Q=="string"&&Q.match(v.latexCheck)}function L(Q){return Q.indexOf(v.wrapSplitCharacter)!==-1}function z(Q,re,ce){var be=re.gdColumnsOriginalOrder;re.gdColumns.sort(function(Ae,De){return ce[be.indexOf(Ae)]-ce[be.indexOf(De)]}),re.columnorder=ce,Q.emit("plotly_restyle")}function F(Q,re,ce){if(S.isArrayOrTypedArray(Q)){var be=Q[Math.min(re,Q.length-1)];return S.isArrayOrTypedArray(be)?be[Math.min(ce,be.length-1)]:be}else return Q}function N(Q,re,ce){Q.transition().ease(v.releaseTransitionEase).duration(v.releaseTransitionDuration).attr("transform",a(re.x,ce))}function O(Q){return Q.type==="cells"}function P(Q){return Q.type==="header"}function U(Q){var re=Q.rowBlocks.length?Q.rowBlocks[0].auxiliaryBlocks:[];return re.reduce(function(ce,be){return ce+q(be,1/0)},0)}function B(Q,re,ce){for(var be=[],Ae=0,De=0;De<Q.length;De++){for(var ze=Q[De],Ze=ze.rows,at=0,nt=0;nt<Ze.length;nt++)at+=Ze[nt].rowHeight;ze.allRowsHeight=at;var rt=Ae+at,st=re,Me=st+ce;st<rt&&Me>Ae&&be.push(De),Ae+=at}return be}function X(Q,re,ce){var be=T(re)[0];if(be!==void 0){var Ae=be.rowBlocks,De=be.calcdata,ze=ee(Ae,Ae.length),Ze=be.calcdata.groupHeight-U(be),at=De.scrollY=Math.max(0,Math.min(ze-Ze,De.scrollY)),nt=B(Ae,at,Ze);nt.length===1&&(nt[0]===Ae.length-1?nt.unshift(nt[0]-1):nt.push(nt[0]+1)),nt[0]%2&&nt.reverse(),re.each(function(rt,st){rt.page=nt[st],rt.scrollY=at}),re.attr("transform",function(rt){var st=ee(rt.rowBlocks,rt.page)-rt.scrollY;return a(0,st)}),Q&&(se(Q,ce,re,nt,be.prevPages,be,0),se(Q,ce,re,nt,be.prevPages,be,1),l(ce,Q))}}function $(Q,re,ce,be){return function(De){var ze=De.calcdata?De.calcdata:De,Ze=re.filter(function(st){return ze.key===st.key}),at=ce||ze.scrollbarState.dragMultiplier,nt=ze.scrollY;ze.scrollY=be===void 0?ze.scrollY+at*x.event.dy:be;var rt=Ze.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(O);return X(Q,rt,Ze),ze.scrollY===nt}}function se(Q,re,ce,be,Ae,De,ze){var Ze=be[ze]!==Ae[ze];Ze&&(clearTimeout(De.currentRepaint[ze]),De.currentRepaint[ze]=setTimeout(function(){var at=ce.filter(function(nt,rt){return rt===ze&&be[rt]!==Ae[rt]});_(Q,re,at,ce),Ae[ze]=be[ze]}))}function le(Q,re,ce,be){return function(){var De=x.select(re.parentNode);De.each(function(ze){var Ze=ze.fragments;De.selectAll("tspan.line").each(function(Oe,tt){Ze[tt].width=this.getComputedTextLength()});var at=Ze[Ze.length-1].width,nt=Ze.slice(0,-1),rt=[],st,Me,ye=0,he=ze.column.columnWidth-2*v.cellPad;for(ze.value="";nt.length;)st=nt.shift(),Me=st.width+at,ye+Me>he&&(ze.value+=rt.join(v.wrapSpacer)+v.lineBreaker,rt=[],ye=0),rt.push(st.text),ye+=Me;ye&&(ze.value+=rt.join(v.wrapSpacer)),ze.wrapped=!0}),De.selectAll("tspan.line").remove(),f(De.select("."+v.cn.cellText),ce,Q,be),x.select(re.parentNode.parentNode).call(Y)}}function fe(Q,re,ce,be,Ae){return function(){if(!Ae.settledY){var ze=x.select(re.parentNode),Ze=ae(Ae),at=Ae.key-Ze.firstRowIndex,nt=Ze.rows[at].rowHeight,rt=Ae.cellHeightMayIncrease?re.parentNode.getBoundingClientRect().height+2*v.cellPad:nt,st=Math.max(rt,nt),Me=st-Ze.rows[at].rowHeight;Me&&(Ze.rows[at].rowHeight=st,Q.selectAll("."+v.cn.columnCell).call(Y),X(null,Q.filter(O),0),l(ce,be,!0)),ze.attr("transform",function(){var ye=this,he=ye.parentNode,Oe=he.getBoundingClientRect(),tt=x.select(ye.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),ot=ye.transform.baseVal.consolidate(),Qe=tt.top-Oe.top+(ot?ot.matrix.f:v.cellPad);return a(V(Ae,x.select(ye.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Qe)}),Ae.settledY=!0}}}function V(Q,re){switch(Q.align){case"left":return v.cellPad;case"right":return Q.column.columnWidth-(re||0)-v.cellPad;case"center":return(Q.column.columnWidth-(re||0))/2;default:return v.cellPad}}function Y(Q){Q.attr("transform",function(re){var ce=re.rowBlocks[0].auxiliaryBlocks.reduce(function(ze,Ze){return ze+q(Ze,1/0)},0),be=ae(re),Ae=q(be,re.key),De=Ae+ce;return a(0,De)}).selectAll("."+v.cn.cellRect).attr("height",function(re){return j(ae(re),re.key).rowHeight})}function ee(Q,re){for(var ce=0,be=re-1;be>=0;be--)ce+=oe(Q[be]);return ce}function q(Q,re){for(var ce=0,be=0;be<Q.rows.length&&Q.rows[be].rowIndex<re;be++)ce+=Q.rows[be].rowHeight;return ce}function oe(Q){var re=Q.allRowsHeight;if(re!==void 0)return re;for(var ce=0,be=0;be<Q.rows.length;be++)ce+=Q.rows[be].rowHeight;return Q.allRowsHeight=ce,ce}function ae(Q){return Q.rowBlocks[Q.page]}function j(Q,re){return Q.rows[re-Q.firstRowIndex]}}}),LG=Xe({"src/traces/table/base_plot.js"(Z){"use strict";var G=Hh().getModuleCalcData,v=X6(),x="table";Z.name=x,Z.plot=function(S){var E=G(S.calcdata,x)[0];E.length&&v(S,E)},Z.clean=function(S,E,e,t){var r=t._has&&t._has(x),o=E._has&&E._has(x);r&&!o&&t._paperdiv.selectAll(".table").remove()}}}),PG=Xe({"src/traces/table/index.js"(Z,G){"use strict";G.exports={attributes:H6(),supplyDefaults:MG(),calc:EG(),plot:X6(),moduleType:"trace",name:"table",basePlotModule:LG(),categories:["noOpacity"],meta:{}}}}),IG=Xe({"lib/table.js"(Z,G){"use strict";G.exports=PG()}}),RG=Xe({"src/traces/carpet/axis_attributes.js"(Z,G){"use strict";var v=tc(),x=sh(),S=Wh(),E=tf().descriptionWithDates,e=pc().overrideAll,t=Gh().dash,r=Qo().extendFlat;G.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:v({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:S.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:r({},S.labelalias,{editType:"calc"}),tickfont:v({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:E("tick label")},tickformatstops:e(S.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:x.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:r({},t,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:r({},t,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:x.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}}}),PT=Xe({"src/traces/carpet/attributes.js"(Z,G){"use strict";var v=tc(),x=RG(),S=sh(),E=v({editType:"calc"}),e=af().zorder;E.family.dflt='"Open Sans", verdana, arial, sans-serif',E.size.dflt=12,E.color.dflt=S.defaultLine,G.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:x,baxis:x,font:E,color:{valType:"color",dflt:S.defaultLine,editType:"plot"},zorder:e}}}),DG=Xe({"src/traces/carpet/xy_defaults.js"(Z,G){"use strict";var v=sa().isArray1D;G.exports=function(S,E,e){var t=e("x"),r=t&&t.length,o=e("y"),a=o&&o.length;if(!r&&!a)return!1;if(E._cheater=!t,(!r||v(t))&&(!a||v(o))){var n=r?t.length:1/0;a&&(n=Math.min(n,o.length)),E.a&&E.a.length&&(n=Math.min(n,E.a.length)),E.b&&E.b.length&&(n=Math.min(n,E.b.length)),E._length=n}else E._length=null;return!0}}}),zG=Xe({"src/traces/carpet/axis_defaults.js"(Z,G){"use strict";var v=PT(),x=$n().addOpacity,S=so(),E=sa(),e=Y0(),t=Qm(),r=e0(),o=I2(),a=wv(),n=a1();G.exports=function(h,c,m){var p=m.letter,T=m.font||{},l=v[p+"axis"];function _(B,X){return E.coerce(h,c,l,B,X)}function w(B,X){return E.coerce2(h,c,l,B,X)}m.name&&(c._name=m.name,c._id=m.name),_("autotypenumbers",m.autotypenumbersDflt);var A=_("type");if(A==="-"&&(m.data&&i(c,m.data),c.type==="-"?c.type="linear":A=h.type=c.type),_("smoothing"),_("cheatertype"),_("showticklabels"),_("labelprefix",p+" = "),_("labelsuffix"),_("showtickprefix"),_("showticksuffix"),_("separatethousands"),_("tickformat"),_("exponentformat"),_("minexponent"),_("showexponent"),_("categoryorder"),_("tickmode"),_("tickvals"),_("ticktext"),_("tick0"),_("dtick"),c.tickmode==="array"&&(_("arraytick0"),_("arraydtick")),_("labelpadding"),c._hovertitle=p,A==="date"){var M=S.getComponentMethod("calendars","handleDefaults");M(h,c,"calendar",m.calendar)}a(c,m.fullLayout),c.c2p=E.identity;var g=_("color",m.dfltColor),b=g===h.color?g:T.color,d=_("title.text");d&&(E.coerceFont(_,"title.font",T,{overrideDflt:{size:E.bigFont(T.size),color:b}}),_("title.offset")),_("tickangle");var u=_("autorange",!c.isValidRange(h.range));u&&_("rangemode"),_("range"),c.cleanRange(),_("fixedrange"),e(h,c,_,A),r(h,c,_,A,m),t(h,c,_,A,m),o(h,c,_,{data:m.data,dataAttr:p});var y=w("gridcolor",x(g,.3)),f=w("gridwidth"),R=w("griddash"),L=_("showgrid");L||(delete c.gridcolor,delete c.gridwidth,delete c.griddash);var z=w("startlinecolor",g),F=w("startlinewidth",f),N=_("startline",c.showgrid||!!z||!!F);N||(delete c.startlinecolor,delete c.startlinewidth);var O=w("endlinecolor",g),P=w("endlinewidth",f),U=_("endline",c.showgrid||!!O||!!P);return U||(delete c.endlinecolor,delete c.endlinewidth),L?(_("minorgridcount"),_("minorgridwidth",f),_("minorgriddash",R),_("minorgridcolor",x(y,.06)),c.minorgridcount||(delete c.minorgridwidth,delete c.minorgriddash,delete c.minorgridcolor)):(delete c.gridcolor,delete c.gridwidth,delete c.griddash),c.showticklabels==="none"&&(delete c.tickfont,delete c.tickangle,delete c.showexponent,delete c.exponentformat,delete c.minexponent,delete c.tickformat,delete c.showticksuffix,delete c.showtickprefix),c.showticksuffix||delete c.ticksuffix,c.showtickprefix||delete c.tickprefix,_("tickmode"),c};function i(s,h){if(s.type==="-"){var c=s._id,m=c.charAt(0),p=m+"calendar",T=s[p];s.type=n(h,T,{autotypenumbers:s.autotypenumbers})}}}}),FG=Xe({"src/traces/carpet/ab_defaults.js"(Z,G){"use strict";var v=zG(),x=zl();G.exports=function(e,t,r,o,a){var n=o("a");n||(o("da"),o("a0"));var i=o("b");i||(o("db"),o("b0")),S(e,t,r,a)};function S(E,e,t,r){var o=["aaxis","baxis"];o.forEach(function(a){var n=a.charAt(0),i=E[a]||{},s=x.newContainer(e,a),h={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:n+"axis",letter:n,font:e.font,name:a,data:E[n],calendar:e.calendar,dfltColor:r,bgColor:t.paper_bgcolor,autotypenumbersDflt:t.autotypenumbers,fullLayout:t};v(i,s,h),s._categories=s._categories||[],!E[a]&&i.type!=="-"&&(E[a]={type:i.type})})}}}),OG=Xe({"src/traces/carpet/defaults.js"(Z,G){"use strict";var v=sa(),x=DG(),S=FG(),E=PT(),e=sh();G.exports=function(r,o,a,n){function i(c,m){return v.coerce(r,o,E,c,m)}o._clipPathId="clip"+o.uid+"carpet";var s=i("color",e.defaultLine);if(v.coerceFont(i,"font",n.font),i("carpet"),S(r,o,n,i,s),!o.a||!o.b){o.visible=!1;return}o.a.length<3&&(o.aaxis.smoothing=0),o.b.length<3&&(o.baxis.smoothing=0);var h=x(r,o,i);h||(o.visible=!1),o._cheater&&i("cheaterslope"),i("zorder")}}}),Z6=Xe({"src/traces/carpet/map_1d_array.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(S,E,e){var t;for(v(S)?S.length>E.length&&(S=S.slice(0,E.length)):S=[],t=0;t<E.length;t++)S[t]=e(E[t]);return S}}}),Y6=Xe({"src/traces/carpet/makepath.js"(Z,G){"use strict";G.exports=function(x,S,E){if(x.length===0)return"";var e,t=[],r=E?3:1;for(e=0;e<x.length;e+=r)t.push(x[e]+","+S[e]),E&&e<x.length-r&&(t.push("C"),t.push([x[e+1]+","+S[e+1],x[e+2]+","+S[e+2]+" "].join(" ")));return t.join(E?"":"L")}}}),BG=Xe({"src/traces/carpet/orient_text.js"(Z,G){"use strict";G.exports=function(x,S,E,e,t,r){var o=t[0]*x.dpdx(S),a=t[1]*x.dpdy(E),n=1,i=1;if(r){var s=Math.sqrt(t[0]*t[0]+t[1]*t[1]),h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=(t[0]*r[0]+t[1]*r[1])/s/h;i=Math.max(0,c)}var m=Math.atan2(a,o)*180/Math.PI;return m<-90?(m+=180,n=-n):m>90&&(m-=180,n=-n),{angle:m,flip:n,p:x.c2p(e,S,E),offsetMultplier:i}}}}),NG=Xe({"src/traces/carpet/plot.js"(Z,G){"use strict";var v=Hn(),x=es(),S=Z6(),E=Y6(),e=BG(),t=ou(),r=sa(),o=r.strRotate,a=r.strTranslate,n=uh();G.exports=function(_,w,A,M){var g=_._context.staticPlot,b=w.xaxis,d=w.yaxis,u=_._fullLayout,y=u._clips;r.makeTraceGroups(M,A,"trace").each(function(f){var R=v.select(this),L=f[0],z=L.trace,F=z.aaxis,N=z.baxis,O=r.ensureSingle(R,"g","minorlayer"),P=r.ensureSingle(R,"g","majorlayer"),U=r.ensureSingle(R,"g","boundarylayer"),B=r.ensureSingle(R,"g","labellayer");R.style("opacity",z.opacity),s(b,d,P,F,"a",F._gridlines,!0,g),s(b,d,P,N,"b",N._gridlines,!0,g),s(b,d,O,F,"a",F._minorgridlines,!0,g),s(b,d,O,N,"b",N._minorgridlines,!0,g),s(b,d,U,F,"a-boundary",F._boundarylines,g),s(b,d,U,N,"b-boundary",N._boundarylines,g);var X=h(_,b,d,z,L,B,F._labels,"a-label"),$=h(_,b,d,z,L,B,N._labels,"b-label");c(_,B,z,L,b,d,X,$),i(z,L,y,b,d)})};function i(l,_,w,A,M){var g,b,d,u,y=w.select("#"+l._clipPathId);y.size()||(y=w.append("clipPath").classed("carpetclip",!0));var f=r.ensureSingle(y,"path","carpetboundary"),R=_.clipsegments,L=[];for(u=0;u<R.length;u++)g=R[u],b=S([],g.x,A.c2p),d=S([],g.y,M.c2p),L.push(E(b,d,g.bicubic));var z="M"+L.join("L")+"Z";y.attr("id",l._clipPathId),f.attr("d",z)}function s(l,_,w,A,M,g,b){var d="const-"+M+"-lines",u=w.selectAll("."+d).data(g);u.enter().append("path").classed(d,!0).style("vector-effect",b?"none":"non-scaling-stroke"),u.each(function(y){var f=y,R=f.x,L=f.y,z=S([],R,l.c2p),F=S([],L,_.c2p),N="M"+E(z,F,f.smoothing),O=v.select(this);O.attr("d",N).style("stroke-width",f.width).style("stroke",f.color).style("stroke-dasharray",x.dashStyle(f.dash,f.width)).style("fill","none")}),u.exit().remove()}function h(l,_,w,A,M,g,b,d){var u=g.selectAll("text."+d).data(b);u.enter().append("text").classed(d,!0);var y=0,f={};return u.each(function(R,L){var z;if(R.axis.tickangle==="auto")z=e(A,_,w,R.xy,R.dxy);else{var F=(R.axis.tickangle+180)*Math.PI/180;z=e(A,_,w,R.xy,[Math.cos(F),Math.sin(F)])}L||(f={angle:z.angle,flip:z.flip});var N=(R.endAnchor?-1:1)*z.flip,O=v.select(this).attr({"text-anchor":N>0?"start":"end","data-notex":1}).call(x.font,R.font).text(R.text).call(t.convertToTspans,l),P=x.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(R.axis.labelpadding*N,P.height*.3)),y=Math.max(y,P.width+R.axis.labelpadding)}),u.exit().remove(),f.maxExtent=y,f}function c(l,_,w,A,M,g,b,d){var u,y,f,R,L=r.aggNums(Math.min,null,w.a),z=r.aggNums(Math.max,null,w.a),F=r.aggNums(Math.min,null,w.b),N=r.aggNums(Math.max,null,w.b);u=.5*(L+z),y=F,f=w.ab2xy(u,y,!0),R=w.dxyda_rough(u,y),b.angle===void 0&&r.extendFlat(b,e(w,M,g,f,w.dxydb_rough(u,y))),T(l,_,w,A,f,R,w.aaxis,M,g,b,"a-title"),u=L,y=.5*(F+N),f=w.ab2xy(u,y,!0),R=w.dxydb_rough(u,y),d.angle===void 0&&r.extendFlat(d,e(w,M,g,f,w.dxyda_rough(u,y))),T(l,_,w,A,f,R,w.baxis,M,g,d,"b-title")}var m=n.LINE_SPACING,p=(1-n.MID_SHIFT)/m+1;function T(l,_,w,A,M,g,b,d,u,y,f){var R=[];b.title.text&&R.push(b.title.text);var L=_.selectAll("text."+f).data(R),z=y.maxExtent;L.enter().append("text").classed(f,!0),L.each(function(){var F=e(w,d,u,M,g);["start","both"].indexOf(b.showticklabels)===-1&&(z=0);var N=b.title.font.size;z+=N+b.title.offset;var O=y.angle+(y.flip<0?180:0),P=(O-F.angle+450)%360,U=P>90&&P<270,B=v.select(this);B.text(b.title.text).call(t.convertToTspans,l),U&&(z=(-t.lineCount(B)+p)*m*N-z),B.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(x.font,b.title.font)}),L.exit().remove()}}}),UG=Xe({"src/traces/carpet/cheater_basis.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(x,S,E){var e,t,r,o,a,n,i=[],s=v(x)?x.length:x,h=v(S)?S.length:S,c=v(x)?x:null,m=v(S)?S:null;c&&(r=(c.length-1)/(c[c.length-1]-c[0])/(s-1)),m&&(o=(m.length-1)/(m[m.length-1]-m[0])/(h-1));var p,T=1/0,l=-1/0;for(t=0;t<h;t++)for(i[t]=[],n=m?(m[t]-m[0])*o:t/(h-1),e=0;e<s;e++)a=c?(c[e]-c[0])*r:e/(s-1),p=a-n*E,T=Math.min(p,T),l=Math.max(p,l),i[t][e]=p;var _=1/(l-T),w=-T*_;for(t=0;t<h;t++)for(e=0;e<s;e++)i[t][e]=_*i[t][e]+w;return i}}}),jG=Xe({"src/traces/carpet/array_minmax.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(S){return x(S,0)};function x(S,E){if(!v(S)||E>=10)return null;for(var e=1/0,t=-1/0,r=S.length,o=0;o<r;o++){var a=S[o];if(v(a)){var n=x(a,E+1);n&&(e=Math.min(n[0],e),t=Math.max(n[1],t))}else e=Math.min(a,e),t=Math.max(a,t)}return[e,t]}}}),qG=Xe({"src/traces/carpet/calc_gridlines.js"(Z,G){"use strict";var v=Go(),x=Qo().extendFlat;G.exports=function(E,e,t){var r,o,a,n,i,s,h,c,m,p,T,l,_,w,A=E["_"+e],M=E[e+"axis"],g=M._gridlines=[],b=M._minorgridlines=[],d=M._boundarylines=[],u=E["_"+t],y=E[t+"axis"];M.tickmode==="array"&&(M.tickvals=A.slice());var f=E._xctrl,R=E._yctrl,L=f[0].length,z=f.length,F=E._a.length,N=E._b.length;v.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var O=M.smoothing?3:1;function P(B){var X,$,se,le,fe,V,Y,ee,q,oe,ae,j,Q=[],re=[],ce={};if(e==="b")for($=E.b2j(B),se=Math.floor(Math.max(0,Math.min(N-2,$))),le=$-se,ce.length=N,ce.crossLength=F,ce.xy=function(be){return E.evalxy([],be,$)},ce.dxy=function(be,Ae){return E.dxydi([],be,se,Ae,le)},X=0;X<F;X++)V=Math.min(F-2,X),Y=X-V,ee=E.evalxy([],X,$),y.smoothing&&X>0&&(q=E.dxydi([],X-1,se,0,le),Q.push(fe[0]+q[0]/3),re.push(fe[1]+q[1]/3),oe=E.dxydi([],X-1,se,1,le),Q.push(ee[0]-oe[0]/3),re.push(ee[1]-oe[1]/3)),Q.push(ee[0]),re.push(ee[1]),fe=ee;else for(X=E.a2i(B),V=Math.floor(Math.max(0,Math.min(F-2,X))),Y=X-V,ce.length=F,ce.crossLength=N,ce.xy=function(be){return E.evalxy([],X,be)},ce.dxy=function(be,Ae){return E.dxydj([],V,be,Y,Ae)},$=0;$<N;$++)se=Math.min(N-2,$),le=$-se,ee=E.evalxy([],X,$),y.smoothing&&$>0&&(ae=E.dxydj([],V,$-1,Y,0),Q.push(fe[0]+ae[0]/3),re.push(fe[1]+ae[1]/3),j=E.dxydj([],V,$-1,Y,1),Q.push(ee[0]-j[0]/3),re.push(ee[1]-j[1]/3)),Q.push(ee[0]),re.push(ee[1]),fe=ee;return ce.axisLetter=e,ce.axis=M,ce.crossAxis=y,ce.value=B,ce.constvar=t,ce.index=c,ce.x=Q,ce.y=re,ce.smoothing=y.smoothing,ce}function U(B){var X,$,se,le,fe,V=[],Y=[],ee={};if(ee.length=A.length,ee.crossLength=u.length,e==="b")for(se=Math.max(0,Math.min(N-2,B)),fe=Math.min(1,Math.max(0,B-se)),ee.xy=function(q){return E.evalxy([],q,B)},ee.dxy=function(q,oe){return E.dxydi([],q,se,oe,fe)},X=0;X<L;X++)V[X]=f[B*O][X],Y[X]=R[B*O][X];else for($=Math.max(0,Math.min(F-2,B)),le=Math.min(1,Math.max(0,B-$)),ee.xy=function(q){return E.evalxy([],B,q)},ee.dxy=function(q,oe){return E.dxydj([],$,q,le,oe)},X=0;X<z;X++)V[X]=f[X][B*O],Y[X]=R[X][B*O];return ee.axisLetter=e,ee.axis=M,ee.crossAxis=y,ee.value=A[B],ee.constvar=t,ee.index=B,ee.x=V,ee.y=Y,ee.smoothing=y.smoothing,ee}if(M.tickmode==="array"){for(n=5e-15,i=[Math.floor((A.length-1-M.arraytick0)/M.arraydtick*(1+n)),Math.ceil(-M.arraytick0/M.arraydtick/(1+n))].sort(function(B,X){return B-X}),s=i[0]-1,h=i[1]+1,c=s;c<h;c++)o=M.arraytick0+M.arraydtick*c,!(o<0||o>A.length-1)&&g.push(x(U(o),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s;c<h;c++)if(a=M.arraytick0+M.arraydtick*c,T=Math.min(a+M.arraydtick,A.length-1),!(a<0||a>A.length-1)&&!(T<0||T>A.length-1))for(l=A[a],_=A[T],r=0;r<M.minorgridcount;r++)w=T-a,!(w<=0)&&(p=l+(_-l)*(r+1)/(M.minorgridcount+1)*(M.arraydtick/w),!(p<A[0]||p>A[A.length-1])&&b.push(x(P(p),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&d.push(x(U(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&d.push(x(U(A.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(n=5e-15,i=[Math.floor((A[A.length-1]-M.tick0)/M.dtick*(1+n)),Math.ceil((A[0]-M.tick0)/M.dtick/(1+n))].sort(function(B,X){return B-X}),s=i[0],h=i[1],c=s;c<=h;c++)m=M.tick0+M.dtick*c,g.push(x(P(m),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s-1;c<h+1;c++)for(m=M.tick0+M.dtick*c,r=0;r<M.minorgridcount;r++)p=m+M.dtick*(r+1)/(M.minorgridcount+1),!(p<A[0]||p>A[A.length-1])&&b.push(x(P(p),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&d.push(x(P(A[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&d.push(x(P(A[A.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}}}),VG=Xe({"src/traces/carpet/calc_labels.js"(Z,G){"use strict";var v=Go(),x=Qo().extendFlat;G.exports=function(E,e){var t,r,o,a,n,i=e._labels=[],s=e._gridlines;for(t=0;t<s.length;t++)n=s[t],["start","both"].indexOf(e.showticklabels)!==-1&&(r=v.tickText(e,n.value),x(r,{prefix:o,suffix:a,endAnchor:!0,xy:n.xy(0),dxy:n.dxy(0,0),axis:n.axis,length:n.crossAxis.length,font:n.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),i.push(r)),["end","both"].indexOf(e.showticklabels)!==-1&&(r=v.tickText(e,n.value),x(r,{endAnchor:!1,xy:n.xy(n.crossLength-1),dxy:n.dxy(n.crossLength-2,1),axis:n.axis,length:n.crossAxis.length,font:n.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),i.push(r))}}}),GG=Xe({"src/traces/carpet/calc_clippath.js"(Z,G){"use strict";G.exports=function(x,S,E,e){var t,r,o,a=[],n=!!E.smoothing,i=!!e.smoothing,s=x[0].length-1,h=x.length-1;for(t=0,r=[],o=[];t<=s;t++)r[t]=x[0][t],o[t]=S[0][t];for(a.push({x:r,y:o,bicubic:n}),t=0,r=[],o=[];t<=h;t++)r[t]=x[t][s],o[t]=S[t][s];for(a.push({x:r,y:o,bicubic:i}),t=s,r=[],o=[];t>=0;t--)r[s-t]=x[h][t],o[s-t]=S[h][t];for(a.push({x:r,y:o,bicubic:n}),t=h,r=[],o=[];t>=0;t--)r[h-t]=x[t][0],o[h-t]=S[t][0];return a.push({x:r,y:o,bicubic:i}),a}}}),HG=Xe({"src/traces/carpet/smooth_fill_2d_array.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E,e){var t,r,o,a=[],n=[],i=S[0].length,s=S.length;function h($,se){var le=0,fe,V=0;return $>0&&(fe=S[se][$-1])!==void 0&&(V++,le+=fe),$<i-1&&(fe=S[se][$+1])!==void 0&&(V++,le+=fe),se>0&&(fe=S[se-1][$])!==void 0&&(V++,le+=fe),se<s-1&&(fe=S[se+1][$])!==void 0&&(V++,le+=fe),le/Math.max(1,V)}var c=0;for(t=0;t<i;t++)for(r=0;r<s;r++)S[r][t]===void 0&&(a.push(t),n.push(r),S[r][t]=h(t,r)),c=Math.max(c,Math.abs(S[r][t]));if(!a.length)return S;var m,p,T,l,_,w,A,M,g,b,d,u=1e-5,y=0,f=100,R=0,L=a.length;do{for(y=0,o=0;o<L;o++){t=a[o],r=n[o];var z=0,F=0,N,O,P,U,B,X;t===0?(B=Math.min(i-1,2),P=E[B],U=E[1],N=S[r][B],O=S[r][1],F+=O+(O-N)*(E[0]-U)/(U-P),z++):t===i-1&&(B=Math.max(0,i-3),P=E[B],U=E[i-2],N=S[r][B],O=S[r][i-2],F+=O+(O-N)*(E[i-1]-U)/(U-P),z++),(t===0||t===i-1)&&r>0&&r<s-1&&(m=e[r+1]-e[r],p=e[r]-e[r-1],F+=(p*S[r+1][t]+m*S[r-1][t])/(p+m),z++),r===0?(X=Math.min(s-1,2),P=e[X],U=e[1],N=S[X][t],O=S[1][t],F+=O+(O-N)*(e[0]-U)/(U-P),z++):r===s-1&&(X=Math.max(0,s-3),P=e[X],U=e[s-2],N=S[X][t],O=S[s-2][t],F+=O+(O-N)*(e[s-1]-U)/(U-P),z++),(r===0||r===s-1)&&t>0&&t<i-1&&(m=E[t+1]-E[t],p=E[t]-E[t-1],F+=(p*S[r][t+1]+m*S[r][t-1])/(p+m),z++),z?F/=z:(T=E[t+1]-E[t],l=E[t]-E[t-1],_=e[r+1]-e[r],w=e[r]-e[r-1],A=T*l*(T+l),M=_*w*(_+w),F=(A*(w*S[r+1][t]+_*S[r-1][t])+M*(l*S[r][t+1]+T*S[r][t-1]))/(M*(l+T)+A*(w+_))),g=F-S[r][t],b=g/c,y+=b*b,d=z?0:.85,S[r][t]+=g*(1+d)}y=Math.sqrt(y)}while(R++<f&&y>u);return v.log("Smoother converged to",y,"after",R,"iterations"),S}}}),WG=Xe({"src/traces/carpet/constants.js"(Z,G){"use strict";G.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),XG=Xe({"src/traces/carpet/catmull_rom.js"(Z,G){"use strict";var v=.5;G.exports=function(S,E,e,t){var r=S[0]-E[0],o=S[1]-E[1],a=e[0]-E[0],n=e[1]-E[1],i=Math.pow(r*r+o*o,v/2),s=Math.pow(a*a+n*n,v/2),h=(s*s*r-i*i*a)*t,c=(s*s*o-i*i*n)*t,m=s*(i+s)*3,p=i*(i+s)*3;return[[E[0]+(m&&h/m),E[1]+(m&&c/m)],[E[0]-(p&&h/p),E[1]-(p&&c/p)]]}}}),ZG=Xe({"src/traces/carpet/compute_control_points.js"(Z,G){"use strict";var v=XG(),x=sa().ensureArray;function S(E,e,t){var r=-.5*t[0]+1.5*e[0],o=-.5*t[1]+1.5*e[1];return[(2*r+E[0])/3,(2*o+E[1])/3]}G.exports=function(e,t,r,o,a,n){var i,s,h,c,m,p,T,l,_,w,A=r[0].length,M=r.length,g=a?3*A-2:A,b=n?3*M-2:M;for(e=x(e,b),t=x(t,b),h=0;h<b;h++)e[h]=x(e[h],g),t[h]=x(t[h],g);for(s=0,c=0;s<M;s++,c+=n?3:1)for(m=e[c],p=t[c],T=r[s],l=o[s],i=0,h=0;i<A;i++,h+=a?3:1)m[h]=T[i],p[h]=l[i];if(a)for(s=0,c=0;s<M;s++,c+=n?3:1){for(i=1,h=3;i<A-1;i++,h+=3)_=v([r[s][i-1],o[s][i-1]],[r[s][i],o[s][i]],[r[s][i+1],o[s][i+1]],a),e[c][h-1]=_[0][0],t[c][h-1]=_[0][1],e[c][h+1]=_[1][0],t[c][h+1]=_[1][1];w=S([e[c][0],t[c][0]],[e[c][2],t[c][2]],[e[c][3],t[c][3]]),e[c][1]=w[0],t[c][1]=w[1],w=S([e[c][g-1],t[c][g-1]],[e[c][g-3],t[c][g-3]],[e[c][g-4],t[c][g-4]]),e[c][g-2]=w[0],t[c][g-2]=w[1]}if(n)for(h=0;h<g;h++){for(c=3;c<b-3;c+=3)_=v([e[c-3][h],t[c-3][h]],[e[c][h],t[c][h]],[e[c+3][h],t[c+3][h]],n),e[c-1][h]=_[0][0],t[c-1][h]=_[0][1],e[c+1][h]=_[1][0],t[c+1][h]=_[1][1];w=S([e[0][h],t[0][h]],[e[2][h],t[2][h]],[e[3][h],t[3][h]]),e[1][h]=w[0],t[1][h]=w[1],w=S([e[b-1][h],t[b-1][h]],[e[b-3][h],t[b-3][h]],[e[b-4][h],t[b-4][h]]),e[b-2][h]=w[0],t[b-2][h]=w[1]}if(a&&n)for(c=1;c<b;c+=(c+1)%3===0?2:1){for(h=3;h<g-3;h+=3)_=v([e[c][h-3],t[c][h-3]],[e[c][h],t[c][h]],[e[c][h+3],t[c][h+3]],a),e[c][h-1]=.5*(e[c][h-1]+_[0][0]),t[c][h-1]=.5*(t[c][h-1]+_[0][1]),e[c][h+1]=.5*(e[c][h+1]+_[1][0]),t[c][h+1]=.5*(t[c][h+1]+_[1][1]);w=S([e[c][0],t[c][0]],[e[c][2],t[c][2]],[e[c][3],t[c][3]]),e[c][1]=.5*(e[c][1]+w[0]),t[c][1]=.5*(t[c][1]+w[1]),w=S([e[c][g-1],t[c][g-1]],[e[c][g-3],t[c][g-3]],[e[c][g-4],t[c][g-4]]),e[c][g-2]=.5*(e[c][g-2]+w[0]),t[c][g-2]=.5*(t[c][g-2]+w[1])}return[e,t]}}}),YG=Xe({"src/traces/carpet/create_spline_evaluator.js"(Z,G){"use strict";G.exports=function(v,x,S,E,e){var t=x-2,r=S-2;return E&&e?function(o,a,n){o||(o=[]);var i,s,h,c,m,p,T=Math.max(0,Math.min(Math.floor(a),t)),l=Math.max(0,Math.min(Math.floor(n),r)),_=Math.max(0,Math.min(1,a-T)),w=Math.max(0,Math.min(1,n-l));T*=3,l*=3;var A=_*_,M=A*_,g=1-_,b=g*g,d=b*g,u=w*w,y=u*w,f=1-w,R=f*f,L=R*f;for(p=0;p<v.length;p++)m=v[p],i=d*m[l][T]+3*(b*_*m[l][T+1]+g*A*m[l][T+2])+M*m[l][T+3],s=d*m[l+1][T]+3*(b*_*m[l+1][T+1]+g*A*m[l+1][T+2])+M*m[l+1][T+3],h=d*m[l+2][T]+3*(b*_*m[l+2][T+1]+g*A*m[l+2][T+2])+M*m[l+2][T+3],c=d*m[l+3][T]+3*(b*_*m[l+3][T+1]+g*A*m[l+3][T+2])+M*m[l+3][T+3],o[p]=L*i+3*(R*w*s+f*u*h)+y*c;return o}:E?function(o,a,n){o||(o=[]);var i=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(n),r)),h=Math.max(0,Math.min(1,a-i)),c=Math.max(0,Math.min(1,n-s)),m,p,T,l,_,w;i*=3;var A=h*h,M=A*h,g=1-h,b=g*g,d=b*g,u=1-c;for(_=0;_<v.length;_++)w=v[_],m=u*w[s][i]+c*w[s+1][i],p=u*w[s][i+1]+c*w[s+1][i+1],T=u*w[s][i+2]+c*w[s+1][i+1],l=u*w[s][i+3]+c*w[s+1][i+1],o[_]=d*m+3*(b*h*p+g*A*T)+M*l;return o}:e?function(o,a,n){o||(o=[]);var i=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(n),r)),h=Math.max(0,Math.min(1,a-i)),c=Math.max(0,Math.min(1,n-s)),m,p,T,l,_,w;s*=3;var A=c*c,M=A*c,g=1-c,b=g*g,d=b*g,u=1-h;for(_=0;_<v.length;_++)w=v[_],m=u*w[s][i]+h*w[s][i+1],p=u*w[s+1][i]+h*w[s+1][i+1],T=u*w[s+2][i]+h*w[s+2][i+1],l=u*w[s+3][i]+h*w[s+3][i+1],o[_]=d*m+3*(b*c*p+g*A*T)+M*l;return o}:function(o,a,n){o||(o=[]);var i=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(n),r)),h=Math.max(0,Math.min(1,a-i)),c=Math.max(0,Math.min(1,n-s)),m,p,T,l,_=1-c,w=1-h;for(T=0;T<v.length;T++)l=v[T],m=w*l[s][i]+h*l[s][i+1],p=w*l[s+1][i]+h*l[s+1][i+1],o[T]=_*m+c*p;return o}}}}),KG=Xe({"src/traces/carpet/create_i_derivative_evaluator.js"(Z,G){"use strict";G.exports=function(v,x,S){return x&&S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,c;e*=3,t*=3;var m=r*r,p=1-r,T=p*p,l=p*r*2,_=-3*T,w=3*(T-l),A=3*(l-m),M=3*m,g=o*o,b=g*o,d=1-o,u=d*d,y=u*d;for(c=0;c<v.length;c++)h=v[c],a=_*h[t][e]+w*h[t][e+1]+A*h[t][e+2]+M*h[t][e+3],n=_*h[t+1][e]+w*h[t+1][e+1]+A*h[t+1][e+2]+M*h[t+1][e+3],i=_*h[t+2][e]+w*h[t+2][e+1]+A*h[t+2][e+2]+M*h[t+2][e+3],s=_*h[t+3][e]+w*h[t+3][e+1]+A*h[t+3][e+2]+M*h[t+3][e+3],E[c]=y*a+3*(u*o*n+d*g*i)+b*s;return E}:x?function(E,e,t,r,o){E||(E=[]);var a,n,i,s;e*=3;var h=r*r,c=1-r,m=c*c,p=c*r*2,T=-3*m,l=3*(m-p),_=3*(p-h),w=3*h,A=1-o;for(i=0;i<v.length;i++)s=v[i],a=T*s[t][e]+l*s[t][e+1]+_*s[t][e+2]+w*s[t][e+3],n=T*s[t+1][e]+l*s[t+1][e+1]+_*s[t+1][e+2]+w*s[t+1][e+3],E[i]=A*a+o*n;return E}:S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,c;t*=3;var m=o*o,p=m*o,T=1-o,l=T*T,_=l*T;for(h=0;h<v.length;h++)c=v[h],a=c[t][e+1]-c[t][e],n=c[t+1][e+1]-c[t+1][e],i=c[t+2][e+1]-c[t+2][e],s=c[t+3][e+1]-c[t+3][e],E[h]=_*a+3*(l*o*n+T*m*i)+p*s;return E}:function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h=1-o;for(i=0;i<v.length;i++)s=v[i],a=s[t][e+1]-s[t][e],n=s[t+1][e+1]-s[t+1][e],E[i]=h*a+o*n;return E}}}}),JG=Xe({"src/traces/carpet/create_j_derivative_evaluator.js"(Z,G){"use strict";G.exports=function(v,x,S){return x&&S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,c;e*=3,t*=3;var m=r*r,p=m*r,T=1-r,l=T*T,_=l*T,w=o*o,A=1-o,M=A*A,g=A*o*2,b=-3*M,d=3*(M-g),u=3*(g-w),y=3*w;for(c=0;c<v.length;c++)h=v[c],a=b*h[t][e]+d*h[t+1][e]+u*h[t+2][e]+y*h[t+3][e],n=b*h[t][e+1]+d*h[t+1][e+1]+u*h[t+2][e+1]+y*h[t+3][e+1],i=b*h[t][e+2]+d*h[t+1][e+2]+u*h[t+2][e+2]+y*h[t+3][e+2],s=b*h[t][e+3]+d*h[t+1][e+3]+u*h[t+2][e+3]+y*h[t+3][e+3],E[c]=_*a+3*(l*r*n+T*m*i)+p*s;return E}:x?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,c;e*=3;var m=o*o,p=m*o,T=1-o,l=T*T,_=l*T;for(h=0;h<v.length;h++)c=v[h],a=c[t+1][e]-c[t][e],n=c[t+1][e+1]-c[t][e+1],i=c[t+1][e+2]-c[t][e+2],s=c[t+1][e+3]-c[t][e+3],E[h]=_*a+3*(l*o*n+T*m*i)+p*s;return E}:S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s;t*=3;var h=1-r,c=o*o,m=1-o,p=m*m,T=m*o*2,l=-3*p,_=3*(p-T),w=3*(T-c),A=3*c;for(i=0;i<v.length;i++)s=v[i],a=l*s[t][e]+_*s[t+1][e]+w*s[t+2][e]+A*s[t+3][e],n=l*s[t][e+1]+_*s[t+1][e+1]+w*s[t+2][e+1]+A*s[t+3][e+1],E[i]=h*a+r*n;return E}:function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h=1-r;for(i=0;i<v.length;i++)s=v[i],a=s[t+1][e]-s[t][e],n=s[t+1][e+1]-s[t][e+1],E[i]=h*a+r*n;return E}}}}),$G=Xe({"src/traces/carpet/set_convert.js"(Z,G){"use strict";var v=WG(),x=g2().findBin,S=ZG(),E=YG(),e=KG(),t=JG();G.exports=function(o){var a=o._a,n=o._b,i=a.length,s=n.length,h=o.aaxis,c=o.baxis,m=a[0],p=a[i-1],T=n[0],l=n[s-1],_=a[a.length-1]-a[0],w=n[n.length-1]-n[0],A=_*v.RELATIVE_CULL_TOLERANCE,M=w*v.RELATIVE_CULL_TOLERANCE;m-=A,p+=A,T-=M,l+=M,o.isVisible=function(g,b){return g>m&&g<p&&b>T&&b<l},o.isOccluded=function(g,b){return g<m||g>p||b<T||b>l},o.setScale=function(){var g=o._x,b=o._y,d=S(o._xctrl,o._yctrl,g,b,h.smoothing,c.smoothing);o._xctrl=d[0],o._yctrl=d[1],o.evalxy=E([o._xctrl,o._yctrl],i,s,h.smoothing,c.smoothing),o.dxydi=e([o._xctrl,o._yctrl],h.smoothing,c.smoothing),o.dxydj=t([o._xctrl,o._yctrl],h.smoothing,c.smoothing)},o.i2a=function(g){var b=Math.max(0,Math.floor(g[0]),i-2),d=g[0]-b;return(1-d)*a[b]+d*a[b+1]},o.j2b=function(g){var b=Math.max(0,Math.floor(g[1]),i-2),d=g[1]-b;return(1-d)*n[b]+d*n[b+1]},o.ij2ab=function(g){return[o.i2a(g[0]),o.j2b(g[1])]},o.a2i=function(g){var b=Math.max(0,Math.min(x(g,a),i-2)),d=a[b],u=a[b+1];return Math.max(0,Math.min(i-1,b+(g-d)/(u-d)))},o.b2j=function(g){var b=Math.max(0,Math.min(x(g,n),s-2)),d=n[b],u=n[b+1];return Math.max(0,Math.min(s-1,b+(g-d)/(u-d)))},o.ab2ij=function(g){return[o.a2i(g[0]),o.b2j(g[1])]},o.i2c=function(g,b){return o.evalxy([],g,b)},o.ab2xy=function(g,b,d){if(!d&&(g<a[0]||g>a[i-1]|b<n[0]||b>n[s-1]))return[!1,!1];var u=o.a2i(g),y=o.b2j(b),f=o.evalxy([],u,y);if(d){var R=0,L=0,z=[],F,N,O,P;g<a[0]?(F=0,N=0,R=(g-a[0])/(a[1]-a[0])):g>a[i-1]?(F=i-2,N=1,R=(g-a[i-1])/(a[i-1]-a[i-2])):(F=Math.max(0,Math.min(i-2,Math.floor(u))),N=u-F),b<n[0]?(O=0,P=0,L=(b-n[0])/(n[1]-n[0])):b>n[s-1]?(O=s-2,P=1,L=(b-n[s-1])/(n[s-1]-n[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(y))),P=y-O),R&&(o.dxydi(z,F,O,N,P),f[0]+=z[0]*R,f[1]+=z[1]*R),L&&(o.dxydj(z,F,O,N,P),f[0]+=z[0]*L,f[1]+=z[1]*L)}return f},o.c2p=function(g,b,d){return[b.c2p(g[0]),d.c2p(g[1])]},o.p2x=function(g,b,d){return[b.p2c(g[0]),d.p2c(g[1])]},o.dadi=function(g){var b=Math.max(0,Math.min(a.length-2,g));return a[b+1]-a[b]},o.dbdj=function(g){var b=Math.max(0,Math.min(n.length-2,g));return n[b+1]-n[b]},o.dxyda=function(g,b,d,u){var y=o.dxydi(null,g,b,d,u),f=o.dadi(g,d);return[y[0]/f,y[1]/f]},o.dxydb=function(g,b,d,u){var y=o.dxydj(null,g,b,d,u),f=o.dbdj(b,u);return[y[0]/f,y[1]/f]},o.dxyda_rough=function(g,b,d){var u=_*(d||.1),y=o.ab2xy(g+u,b,!0),f=o.ab2xy(g-u,b,!0);return[(y[0]-f[0])*.5/u,(y[1]-f[1])*.5/u]},o.dxydb_rough=function(g,b,d){var u=w*(d||.1),y=o.ab2xy(g,b+u,!0),f=o.ab2xy(g,b-u,!0);return[(y[0]-f[0])*.5/u,(y[1]-f[1])*.5/u]},o.dpdx=function(g){return g._m},o.dpdy=function(g){return g._m}}}}),QG=Xe({"src/traces/carpet/calc.js"(Z,G){"use strict";var v=Go(),x=sa().isArray1D,S=UG(),E=jG(),e=qG(),t=VG(),r=GG(),o=Y2(),a=HG(),n=Z2(),i=$G();G.exports=function(h,c){var m=v.getFromId(h,c.xaxis),p=v.getFromId(h,c.yaxis),T=c.aaxis,l=c.baxis,_=c.x,w=c.y,A=[];_&&x(_)&&A.push("x"),w&&x(w)&&A.push("y"),A.length&&n(c,T,l,"a","b",A);var M=c._a=c._a||c.a,g=c._b=c._b||c.b;_=c._x||c.x,w=c._y||c.y;var b={};if(c._cheater){var d=T.cheatertype==="index"?M.length:M,u=l.cheatertype==="index"?g.length:g;_=S(d,u,c.cheaterslope)}c._x=_=o(_),c._y=w=o(w),a(_,M,g),a(w,M,g),i(c),c.setScale();var y=E(_),f=E(w),R=.5*(y[1]-y[0]),L=.5*(y[1]+y[0]),z=.5*(f[1]-f[0]),F=.5*(f[1]+f[0]),N=1.3;return y=[L-R*N,L+R*N],f=[F-z*N,F+z*N],c._extremes[m._id]=v.findExtremes(m,y,{padded:!0}),c._extremes[p._id]=v.findExtremes(p,f,{padded:!0}),e(c,"a","b"),e(c,"b","a"),t(c,T),t(c,l),b.clipsegments=r(c._xctrl,c._yctrl,T,l),b.x=_,b.y=w,b.a=M,b.b=g,[b]}}}),eH=Xe({"src/traces/carpet/index.js"(Z,G){"use strict";G.exports={attributes:PT(),supplyDefaults:OG(),plot:NG(),calc:QG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),tH=Xe({"lib/carpet.js"(Z,G){"use strict";G.exports=eH()}}),K6=Xe({"src/traces/scattercarpet/attributes.js"(Z,G){"use strict";var v=$d(),x=af(),S=ru(),{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=ku(),o=Qo().extendFlat,a=x.marker,n=x.line,i=a.line;G.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},x.mode,{dflt:"markers"}),text:o({},x.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},x.hovertext,{}),line:{color:n.color,width:n.width,dash:n.dash,backoff:n.backoff,shape:o({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:x.connectgaps,fill:o({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),marker:o({symbol:a.symbol,opacity:a.opacity,maxdisplayed:a.maxdisplayed,angle:a.angle,angleref:a.angleref,standoff:a.standoff,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:o({width:i.width,dash:i.dash,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:x.textfont,textposition:x.textposition,selected:x.selected,unselected:x.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:x.hoveron,hovertemplate:E(),hovertemplatefallback:t(),zorder:x.zorder}}}),rH=Xe({"src/traces/scattercarpet/defaults.js"(Z,G){"use strict";var v=sa(),x=Tv(),S=Fu(),E=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=K6();G.exports=function(i,s,h,c){function m(M,g){return v.coerce(i,s,a,M,g)}m("carpet"),s.xaxis="x",s.yaxis="y";var p=m("a"),T=m("b"),l=Math.min(p.length,T.length);if(!l){s.visible=!1;return}s._length=l,m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext");var _=l<x.PTS_LINESONLY?"lines+markers":"lines";m("mode",_),S.hasMarkers(s)&&E(i,s,h,c,m,{gradient:!0}),S.hasLines(s)&&(e(i,s,h,c,m,{backoff:!0}),t(i,s,m),m("connectgaps")),S.hasText(s)&&r(i,s,c,m);var w=[];(S.hasMarkers(s)||S.hasText(s))&&(m("marker.maxdisplayed"),w.push("points")),m("fill"),s.fill!=="none"&&(o(i,s,h,m),S.hasLines(s)||t(i,s,m)),(s.fill==="tonext"||s.fill==="toself")&&w.push("fills");var A=m("hoveron",w.join("+")||"points");A!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),m("zorder"),v.coerceSelectionMarkerOpacity(s,m)}}}),aH=Xe({"src/traces/scattercarpet/format_labels.js"(Z,G){"use strict";G.exports=function(x,S){var E={},e=S._carpet,t=e.ab2ij([x.a,x.b]),r=Math.floor(t[0]),o=t[0]-r,a=Math.floor(t[1]),n=t[1]-a,i=e.evalxy([],r,a,o,n);return E.yLabel=i[1].toFixed(3),E}}}),IT=Xe({"src/traces/carpet/lookup_carpetid.js"(Z,G){"use strict";G.exports=function(v,x){for(var S=v._fullData.length,E,e=0;e<S;e++){var t=v._fullData[e];if(t.index!==x.index&&t.type==="carpet"&&(E||(E=t),t.carpet===x.carpet))return t}return E}}}),iH=Xe({"src/traces/scattercarpet/calc.js"(Z,G){"use strict";var v=rs(),x=Fd(),S=Av(),E=Od(),e=Bd().calcMarkerSize,t=IT();G.exports=function(o,a){var n=a._carpetTrace=t(o,a);if(!(!n||!n.visible||n.visible==="legendonly")){var i;a.xaxis=n.xaxis,a.yaxis=n.yaxis;var s=a._length,h=new Array(s),c,m,p=!1;for(i=0;i<s;i++)if(c=a.a[i],m=a.b[i],v(c)&&v(m)){var T=n.ab2xy(+c,+m,!0),l=n.isVisible(+c,+m);l||(p=!0),h[i]={x:T[0],y:T[1],a:c,b:m,vis:l}}else h[i]={x:!1,y:!1};return a._needsCull=p,h[0].carpet=n,h[0].trace=a,e(a,s),x(o,a),S(h,a),E(h,a),h}}}}),nH=Xe({"src/traces/scattercarpet/plot.js"(Z,G){"use strict";var v=s1(),x=Go(),S=es();G.exports=function(e,t,r,o){var a,n,i,s=r[0][0].carpet,h=x.getFromId(e,s.xaxis||"x"),c=x.getFromId(e,s.yaxis||"y"),m={xaxis:h,yaxis:c,plot:t.plot};for(a=0;a<r.length;a++)n=r[a][0].trace,n._xA=h,n._yA=c;for(v(e,m,r,o),a=0;a<r.length;a++)n=r[a][0].trace,i=o.selectAll("g.trace"+n.uid+" .js-line"),S.setClipUrl(i,r[a][0].carpet._clipPathId,e)}}}),oH=Xe({"src/traces/scattercarpet/hover.js"(Z,G){"use strict";var v=u1(),x=sa().fillText;G.exports=function(E,e,t,r){var o=v(E,e,t,r);if(!o||o[0].index===!1)return;var a=o[0];if(a.index===void 0){var n=1-a.y0/E.ya._length,i=E.xa._length,s=i*n/2,h=i-s;return a.x0=Math.max(Math.min(a.x0,h),s),a.x1=Math.max(Math.min(a.x1,h),s),o}var c=a.cd[a.index];a.a=c.a,a.b=c.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var m=a.trace,p=m._carpet,T=m._module.formatLabels(c,m);a.yLabel=T.yLabel,delete a.text;var l=[];function _(M,g){var b;M.labelprefix&&M.labelprefix.length>0?b=M.labelprefix.replace(/ = $/,""):b=M._hovertitle,l.push(b+": "+g.toFixed(3)+M.labelsuffix)}if(!m.hovertemplate){var w=c.hi||m.hoverinfo,A=w.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&_(p.aaxis,c.a),A.indexOf("b")!==-1&&_(p.baxis,c.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&x(c,m,l),a.extraText=l.join("<br>")}return o}}}),sH=Xe({"src/traces/scattercarpet/event_data.js"(Z,G){"use strict";G.exports=function(x,S,E,e,t){var r=e[t];return x.a=r.a,x.b=r.b,x.y=r.y,x}}}),lH=Xe({"src/traces/scattercarpet/index.js"(Z,G){"use strict";G.exports={attributes:K6(),supplyDefaults:rH(),colorbar:pp(),formatLabels:aH(),calc:iH(),plot:nH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:oH(),selectPoints:c1(),eventData:sH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Kf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),uH=Xe({"lib/scattercarpet.js"(Z,G){"use strict";G.exports=lH()}}),J6=Xe({"src/traces/contourcarpet/attributes.js"(Z,G){"use strict";var v=p1(),x=V_(),S=ku(),E=Qo().extendFlat,e=x.contours;G.exports=E({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:x.fillcolor,autocontour:x.autocontour,ncontours:x.ncontours,contours:{type:e.type,start:e.start,end:e.end,size:e.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:e.showlines,showlabels:e.showlabels,labelfont:e.labelfont,labelformat:e.labelformat,operation:e.operation,value:e.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:x.line.color,width:x.line.width,dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},zorder:x.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),$6=Xe({"src/traces/contourcarpet/defaults.js"(Z,G){"use strict";var v=sa(),x=X2(),S=J6(),E=TS(),e=s3(),t=l3();G.exports=function(o,a,n,i){function s(p,T){return v.coerce(o,a,S,p,T)}function h(p){return v.coerce2(o,a,S,p)}if(s("carpet"),o.a&&o.b){var c=x(o,a,s,i,"a","b");if(!c){a.visible=!1;return}s("text");var m=s("contours.type")==="constraint";m?E(o,a,s,i,n,{hasHover:!1}):(e(o,a,s,h),t(o,a,s,i,{hasHover:!1}))}else a._defaultColor=n,a._length=null;s("zorder")}}}),cH=Xe({"src/traces/contourcarpet/calc.js"(Z,G){"use strict";var v=Tp(),x=sa(),S=Z2(),E=Y2(),e=K2(),t=J2(),r=sS(),o=$6(),a=IT(),n=dS();G.exports=function(h,c){var m=c._carpetTrace=a(h,c);if(!(!m||!m.visible||m.visible==="legendonly")){if(!c.a||!c.b){var p=h.data[m.index],T=h.data[c.index];T.a||(T.a=p.a),T.b||(T.b=p.b),o(T,c,c._defaultColor,h._fullLayout)}var l=i(h,c);return n(c,c._z),l}};function i(s,h){var c=h._carpetTrace,m=c.aaxis,p=c.baxis,T,l,_,w,A,M,g;m._minDtick=0,p._minDtick=0,x.isArray1D(h.z)&&S(h,m,p,"a","b",["z"]),T=h._a=h._a||h.a,w=h._b=h._b||h.b,T=T?m.makeCalcdata(h,"_a"):[],w=w?p.makeCalcdata(h,"_b"):[],l=h.a0||0,_=h.da||1,A=h.b0||0,M=h.db||1,g=h._z=E(h._z||h.z,h.transpose),h._emptypoints=t(g),e(g,h._emptypoints);var b=x.maxRowLength(g),d=h.xtype==="scaled"?"":T,u=r(h,d,l,_,b,m),y=h.ytype==="scaled"?"":w,f=r(h,y,A,M,g.length,p),R={a:u,b:f,z:g};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&v(s,h,{vals:g,containerStr:"",cLetter:"z"}),[R]}}}),fH=Xe({"src/traces/carpet/axis_aligned_line.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(x,S,E,e){var t,r,o,a,n,i,s,h,c,m,p,T,l,_=v(E)?"a":"b",w=_==="a"?x.aaxis:x.baxis,A=w.smoothing,M=_==="a"?x.a2i:x.b2j,g=_==="a"?E:e,b=_==="a"?e:E,d=_==="a"?S.a.length:S.b.length,u=_==="a"?S.b.length:S.a.length,y=Math.floor(_==="a"?x.b2j(b):x.a2i(b)),f=_==="a"?function(se){return x.evalxy([],se,y)}:function(se){return x.evalxy([],y,se)};A&&(o=Math.max(0,Math.min(u-2,y)),a=y-o,r=_==="a"?function(se,le){return x.dxydi([],se,o,le,a)}:function(se,le){return x.dxydj([],o,se,a,le)});var R=M(g[0]),L=M(g[1]),z=R<L?1:-1,F=(L-R)*1e-8,N=z>0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,P=z>0?Math.min:Math.max,U=z>0?Math.max:Math.min,B=N(R+F),X=O(L-F);s=f(R);var $=[[s]];for(t=B;t*z<X*z;t+=z)n=[],p=U(R,t),T=P(L,t+z),l=T-p,i=Math.max(0,Math.min(d-2,Math.floor(.5*(p+T)))),h=f(T),A&&(c=r(i,p-i),m=r(i,T-i),n.push([s[0]+c[0]/3*l,s[1]+c[1]/3*l]),n.push([h[0]-m[0]/3*l,h[1]-m[1]/3*l])),n.push(h),$.push(n),s=h;return $}}}),hH=Xe({"src/traces/contourcarpet/plot.js"(Z,G){"use strict";var v=Hn(),x=Z6(),S=Y6(),E=es(),e=sa(),t=mS(),r=gS(),o=u3(),a=H_(),n=_S(),i=yS(),s=xS(),h=IT(),c=fH();G.exports=function(d,u,y,f){var R=u.xaxis,L=u.yaxis;e.makeTraceGroups(f,y,"contour").each(function(z){var F=v.select(this),N=z[0],O=N.trace,P=O._carpetTrace=h(d,O),U=d.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var B=N.a,X=N.b,$=O.contours,se=i($,u,N),le=$.type==="constraint",fe=$._operation,V=le?fe==="="?"lines":"fill":$.coloring;function Y(De){var ze=P.ab2xy(De[0],De[1],!0);return[R.c2p(ze[0]),L.c2p(ze[1])]}var ee=[[B[0],X[X.length-1]],[B[B.length-1],X[X.length-1]],[B[B.length-1],X[0]],[B[0],X[0]]];t(se);var q=(B[B.length-1]-B[0])*1e-8,oe=(X[X.length-1]-X[0])*1e-8;r(se,q,oe);var ae=se;$.type==="constraint"&&(ae=n(se,fe)),m(se,Y);var j,Q,re,ce,be=[];for(ce=U.clipsegments.length-1;ce>=0;ce--)j=U.clipsegments[ce],Q=x([],j.x,R.c2p),re=x([],j.y,L.c2p),Q.reverse(),re.reverse(),be.push(S(Q,re,j.bicubic));var Ae="M"+be.join("L")+"Z";A(F,U.clipsegments,R,L,le,V),M(O,F,R,L,ae,ee,Y,P,U,V,Ae),p(F,se,d,N,$,u,P),E.setClipUrl(F,P._clipPathId,d)})};function m(b,d){var u,y,f,R,L,z,F,N,O;for(u=0;u<b.length;u++){for(R=b[u],L=R.pedgepaths=[],z=R.ppaths=[],y=0;y<R.edgepaths.length;y++){for(O=R.edgepaths[y],F=[],f=0;f<O.length;f++)F[f]=d(O[f]);L.push(F)}for(y=0;y<R.paths.length;y++){for(O=R.paths[y],N=[],f=0;f<O.length;f++)N[f]=d(O[f]);z.push(N)}}}function p(b,d,u,y,f,R,L){var z=u._context.staticPlot,F=e.ensureSingle(b,"g","contourlines"),N=f.showlines!==!1,O=f.showlabels,P=N&&O,U=o.createLines(F,N||O,d,z),B=o.createLineClip(F,P,u,y.trace.uid),X=b.selectAll("g.contourlabels").data(O?[0]:[]);if(X.exit().remove(),X.enter().append("g").classed("contourlabels",!0),O){var $=R.xaxis,se=R.yaxis,le=$._length,fe=se._length,V=[[[0,0],[le,0],[le,fe],[0,fe]]],Y=[];e.clearLocationCache();var ee=o.labelFormatter(u,y),q=E.tester.append("text").attr("data-notex",1).call(E.font,f.labelfont),oe={left:0,right:le,center:le/2,top:0,bottom:fe,middle:fe/2},ae=Math.sqrt(le*le+fe*fe),j=a.LABELDISTANCE*ae/Math.max(1,d.length/a.LABELINCREASE);U.each(function(Q){var re=o.calcTextOpts(Q.level,ee,q,u);v.select(this).selectAll("path").each(function(ce){var be=this,Ae=e.getVisibleSegment(be,oe,re.height/2);if(Ae&&(T(be,ce,Q,Ae,L,re.height),!(Ae.len<(re.width+re.height)*a.LABELMIN)))for(var De=Math.min(Math.ceil(Ae.len/j),a.LABELMAX),ze=0;ze<De;ze++){var Ze=o.findBestTextLocation(be,Ae,re,Y,oe);if(!Ze)break;o.addLabelData(Ze,re,Y,V)}})}),q.remove(),o.drawLabels(X,Y,u,B,P?V:null)}O&&!N&&U.remove()}function T(b,d,u,y,f,R){for(var L,z=0;z<u.pedgepaths.length;z++)d===u.pedgepaths[z]&&(L=u.edgepaths[z]);if(!L)return;var F=f.a[0],N=f.a[f.a.length-1],O=f.b[0],P=f.b[f.b.length-1];function U(le,fe){var V=0,Y,ee=.1;return(Math.abs(le[0]-F)<ee||Math.abs(le[0]-N)<ee)&&(Y=_(f.dxydb_rough(le[0],le[1],ee)),V=Math.max(V,R*w(fe,Y)/2)),(Math.abs(le[1]-O)<ee||Math.abs(le[1]-P)<ee)&&(Y=_(f.dxyda_rough(le[0],le[1],ee)),V=Math.max(V,R*w(fe,Y)/2)),V}var B=l(b,0,1),X=l(b,y.total,y.total-1),$=U(L[0],B),se=y.total-U(L[L.length-1],X);y.min<$&&(y.min=$),y.max>se&&(y.max=se),y.len=y.max-y.min}function l(b,d,u){var y=b.getPointAtLength(d),f=b.getPointAtLength(u),R=f.x-y.x,L=f.y-y.y,z=Math.sqrt(R*R+L*L);return[R/z,L/z]}function _(b){var d=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/d,b[1]/d]}function w(b,d){var u=Math.abs(b[0]*d[0]+b[1]*d[1]),y=Math.sqrt(1-u*u);return y/u}function A(b,d,u,y,f,R){var L,z,F,N,O=e.ensureSingle(b,"g","contourbg"),P=O.selectAll("path").data(R==="fill"&&!f?[0]:[]);P.enter().append("path"),P.exit().remove();var U=[];for(N=0;N<d.length;N++)L=d[N],z=x([],L.x,u.c2p),F=x([],L.y,y.c2p),U.push(S(z,F,L.bicubic));P.attr("d","M"+U.join("L")+"Z").style("stroke","none")}function M(b,d,u,y,f,R,L,z,F,N,O){var P=N==="fill";P&&s(f,b.contours);var U=e.ensureSingle(d,"g","contourfill"),B=U.selectAll("path").data(P?f:[]);B.enter().append("path"),B.exit().remove(),B.each(function(X){var $=(X.prefixBoundary?O:"")+g(b,X,R,L,z,F,u,y);$?v.select(this).attr("d",$).style("stroke","none"):v.select(this).remove()})}function g(b,d,u,y,f,R,L,z){var F,N="",O=d.edgepaths.map(function(re,ce){return ce}),P=!0,U,B,X,$,se,le,fe=Math.abs(u[0][0]-u[2][0])*1e-4,V=Math.abs(u[0][1]-u[2][1])*1e-4;function Y(re){return Math.abs(re[1]-u[0][1])<V}function ee(re){return Math.abs(re[1]-u[2][1])<V}function q(re){return Math.abs(re[0]-u[0][0])<fe}function oe(re){return Math.abs(re[0]-u[2][0])<fe}function ae(re,ce){var be,Ae,De,ze,Ze="";for(Y(re)&&!oe(re)||ee(re)&&!q(re)?(ze=f.aaxis,De=c(f,R,[re[0],ce[0]],.5*(re[1]+ce[1]))):(ze=f.baxis,De=c(f,R,.5*(re[0]+ce[0]),[re[1],ce[1]])),be=1;be<De.length;be++)for(Ze+=ze.smoothing?"C":"L",Ae=0;Ae<De[be].length;Ae++){var at=De[be][Ae];Ze+=[L.c2p(at[0]),z.c2p(at[1])]+" "}return Ze}for(F=0,U=null;O.length;){var j=d.edgepaths[F][0];for(U&&(N+=ae(U,j)),le=E.smoothopen(d.edgepaths[F].map(y),d.smoothing),N+=P?le:le.replace(/^M/,"L"),O.splice(O.indexOf(F),1),U=d.edgepaths[F][d.edgepaths[F].length-1],$=-1,X=0;X<4;X++){if(!U){e.log("Missing end?",F,d);break}for(Y(U)&&!oe(U)?B=u[1]:q(U)?B=u[0]:ee(U)?B=u[3]:oe(U)&&(B=u[2]),se=0;se<d.edgepaths.length;se++){var Q=d.edgepaths[se][0];Math.abs(U[0]-B[0])<fe?Math.abs(U[0]-Q[0])<fe&&(Q[1]-U[1])*(B[1]-Q[1])>=0&&(B=Q,$=se):Math.abs(U[1]-B[1])<V?Math.abs(U[1]-Q[1])<V&&(Q[0]-U[0])*(B[0]-Q[0])>=0&&(B=Q,$=se):e.log("endpt to newendpt is not vert. or horz.",U,B,Q)}if($>=0)break;N+=ae(U,B),U=B}if($===d.edgepaths.length){e.log("unclosed perimeter path");break}F=$,P=O.indexOf(F)===-1,P&&(F=O[0],N+=ae(U,B)+"Z",U=null)}for(F=0;F<d.paths.length;F++)N+=E.smoothclosed(d.paths[F].map(y),d.smoothing);return N}}}),pH=Xe({"src/traces/contourcarpet/index.js"(Z,G){"use strict";G.exports={attributes:J6(),supplyDefaults:$6(),colorbar:f3(),calc:cH(),plot:hH(),style:c3(),moduleType:"trace",name:"contourcarpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}}),dH=Xe({"lib/contourcarpet.js"(Z,G){"use strict";G.exports=pH()}}),RT=Xe({"src/traces/ohlc/attributes.js"(Z,G){"use strict";var v=sa().extendFlat,x=af(),S=tf().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:e}=Jl(),t=Gh().dash,r=Ky(),o=d1(),a=o.INCREASING.COLOR,n=o.DECREASING.COLOR,i=x.line;function s(h){return{line:{color:v({},i.color,{dflt:h}),width:i.width,dash:t,editType:"style"},editType:"style"}}G.exports={xperiod:x.xperiod,xperiod0:x.xperiod0,xperiodalignment:x.xperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:v({},i.width,{}),dash:v({},t,{}),editType:"style"},increasing:s(a),decreasing:s(n),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:E({},{keys:["open","high","low","close"]}),hovertemplatefallback:e(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:v({},r.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:x.zorder}}}),Q6=Xe({"src/traces/ohlc/ohlc_defaults.js"(Z,G){"use strict";var v=so(),x=sa();G.exports=function(E,e,t,r){var o=t("x"),a=t("open"),n=t("high"),i=t("low"),s=t("close");t("hoverlabel.split");var h=v.getComponentMethod("calendars","handleTraceDefaults");if(h(E,e,["x"],r),!!(a&&n&&i&&s)){var c=Math.min(a.length,n.length,i.length,s.length);return o&&(c=Math.min(c,x.minRowLength(o))),e._length=c,c}}}}),vH=Xe({"src/traces/ohlc/defaults.js"(Z,G){"use strict";var v=sa(),x=Q6(),S=Qd(),E=RT();G.exports=function(r,o,a,n){function i(h,c){return v.coerce(r,o,E,h,c)}var s=x(r,o,i,n);if(!s){o.visible=!1;return}S(r,o,n,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),e(r,o,i,"increasing"),e(r,o,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("tickwidth"),n._requestRangeslider[o.xaxis]=!0,i("zorder")};function e(t,r,o,a){o(a+".line.color"),o(a+".line.width",r.line.width),o(a+".line.dash",r.line.dash)}}}),ek=Xe({"src/traces/ohlc/calc.js"(Z,G){"use strict";var v=sa(),x=v._,S=Go(),E=tv(),e=Hs().BADNUM;function t(n,i){var s=S.getFromId(n,i.xaxis),h=S.getFromId(n,i.yaxis),c=a(n,s,i),m=i._minDiff;i._minDiff=null;var p=i._origX;i._origX=null;var T=i._xcalc;i._xcalc=null;var l=o(n,i,p,T,h,r);return i._extremes[s._id]=S.findExtremes(s,T,{vpad:m/2}),l.length?(v.extendFlat(l[0].t,{wHover:m/2,tickLen:c}),l):[{t:{empty:!0}}]}function r(n,i,s,h){return{o:n,h:i,l:s,c:h}}function o(n,i,s,h,c,m){for(var p=c.makeCalcdata(i,"open"),T=c.makeCalcdata(i,"high"),l=c.makeCalcdata(i,"low"),_=c.makeCalcdata(i,"close"),w=v.isArrayOrTypedArray(i.text),A=v.isArrayOrTypedArray(i.hovertext),M=!0,g=null,b=!!i.xperiodalignment,d=[],u=0;u<h.length;u++){var y=h[u],f=p[u],R=T[u],L=l[u],z=_[u];if(y!==e&&f!==e&&R!==e&&L!==e&&z!==e){z===f?g!==null&&z!==g&&(M=z>g):M=z>f,g=z;var F=m(f,R,L,z);F.pos=y,F.yc=(f+z)/2,F.i=u,F.dir=M?"increasing":"decreasing",F.x=F.pos,F.y=[L,R],b&&(F.orig_p=s[u]),w&&(F.tx=i.text[u]),A&&(F.htx=i.hovertext[u]),d.push(F)}else d.push({pos:y,empty:!0})}return i._extremes[c._id]=S.findExtremes(c,v.concat(l,T),{padded:!0}),d.length&&(d[0].t={labels:{open:x(n,"open:")+" ",high:x(n,"high:")+" ",low:x(n,"low:")+" ",close:x(n,"close:")+" "}}),d}function a(n,i,s){var h=s._minDiff;if(!h){var c=n._fullData,m=[];h=1/0;var p;for(p=0;p<c.length;p++){var T=c[p];if(T.type==="ohlc"&&T.visible===!0&&T.xaxis===i._id){m.push(T);var l=i.makeCalcdata(T,"x");T._origX=l;var _=E(s,i,"x",l).vals;T._xcalc=_;var w=v.distinctVals(_).minDiff;w&&isFinite(w)&&(h=Math.min(h,w))}}for(h===1/0&&(h=1),p=0;p<m.length;p++)m[p]._minDiff=h}return h*s.tickwidth}G.exports={calc:t,calcCommon:o}}}),mH=Xe({"src/traces/ohlc/plot.js"(Z,G){"use strict";var v=Hn(),x=sa();G.exports=function(E,e,t,r){var o=e.yaxis,a=e.xaxis,n=!!a.rangebreaks;x.makeTraceGroups(r,t,"trace ohlc").each(function(i){var s=v.select(this),h=i[0],c=h.t,m=h.trace;if(m.visible!==!0||c.empty){s.remove();return}var p=c.tickLen,T=s.selectAll("path").data(x.identity);T.enter().append("path"),T.exit().remove(),T.attr("d",function(l){if(l.empty)return"M0,0Z";var _=a.c2p(l.pos-p,!0),w=a.c2p(l.pos+p,!0),A=n?(_+w)/2:a.c2p(l.pos,!0),M=o.c2p(l.o,!0),g=o.c2p(l.h,!0),b=o.c2p(l.l,!0),d=o.c2p(l.c,!0);return"M"+_+","+M+"H"+A+"M"+A+","+g+"V"+b+"M"+w+","+d+"H"+A})})}}}),gH=Xe({"src/traces/ohlc/style.js"(Z,G){"use strict";var v=Hn(),x=es(),S=$n();G.exports=function(e,t,r){var o=r||v.select(e).selectAll("g.ohlclayer").selectAll("g.trace");o.style("opacity",function(a){return a[0].trace.opacity}),o.each(function(a){var n=a[0].trace;v.select(this).selectAll("path").each(function(i){if(!i.empty){var s=n[i.dir].line;v.select(this).style("fill","none").call(S.stroke,s.color).call(x.dashLine,s.dash,s.width).style("opacity",n.selectedpoints&&!i.selected?.3:1)}})})}}}),tk=Xe({"src/traces/ohlc/hover.js"(Z,G){"use strict";var v=Go(),x=sa(),S=rf(),E=$n(),e=sa().fillText,t=d1(),r={increasing:t.INCREASING.SYMBOL,decreasing:t.DECREASING.SYMBOL};function o(s,h,c,m){var p=s.cd,T=p[0].trace;return T.hoverlabel.split?n(s,h,c,m):i(s,h,c,m)}function a(s,h,c,m){var p=s.cd,T=s.xa,l=p[0].trace,_=p[0].t,w=l.type,A=w==="ohlc"?"l":"min",M=w==="ohlc"?"h":"max",g,b,d=_.bPos||0,u=function(X){return X.pos+d-h},y=_.bdPos||_.tickLen,f=_.wHover,R=Math.min(1,y/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));g=s.maxHoverDistance-R,b=s.maxSpikeDistance-R;function L(X){var $=u(X);return S.inbox($-f,$+f,g)}function z(X){var $=X[A],se=X[M];return $===se||S.inbox($-c,se-c,g)}function F(X){return(L(X)+z(X))/2}var N=S.getDistanceFunction(m,L,z,F);if(S.getClosest(p,N,s),s.index===!1)return null;var O=p[s.index];if(O.empty)return null;var P=O.dir,U=l[P],B=U.line.color;return E.opacity(B)&&U.line.width?s.color=B:s.color=U.fillcolor,s.x0=T.c2p(O.pos+d-y,!0),s.x1=T.c2p(O.pos+d+y,!0),s.xLabelVal=O.orig_p!==void 0?O.orig_p:O.pos,s.spikeDistance=F(O)*b/g,s.xSpike=T.c2p(O.pos,!0),s}function n(s,h,c,m){var p=s.cd,T=s.ya,l=p[0].trace,_=p[0].t,w=[],A=a(s,h,c,m);if(!A)return[];var M=p[A.index],g=M.hi||l.hoverinfo||"";if(g==="none"||g==="skip")return[];for(var b=["high","open","close","low"],d={},u=0;u<b.length;u++){var y=b[u],f=l[y][A.index],R=T.c2p(f,!0),L;f in d?(L=d[f],L.yLabel+="<br>"+_.labels[y]+v.hoverLabelText(T,f,l.yhoverformat)):(L=x.extendFlat({},A),L.y0=L.y1=R,L.yLabelVal=f,L.yLabel=_.labels[y]+v.hoverLabelText(T,f,l.yhoverformat),L.name="",w.push(L),d[f]=L)}return w}function i(s,h,c,m){var p=s.cd,T=s.ya,l=p[0].trace,_=p[0].t,w=a(s,h,c,m);if(!w)return[];var A=w.index,M=p[A],g=w.index=M.i,b=M.dir;function d(F){return _.labels[F]+v.hoverLabelText(T,l[F][g],l.yhoverformat)}var u=M.hi||l.hoverinfo||"",y=u.split("+"),f=u==="all",R=f||y.indexOf("y")!==-1,L=f||y.indexOf("text")!==-1,z=R?[d("open"),d("high"),d("low"),d("close")+" "+r[b]]:[];return L&&e(M,l,z),w.extraText=z.join("<br>"),w.y0=w.y1=T.c2p(M.yc,!0),[w]}G.exports={hoverPoints:o,hoverSplit:n,hoverOnPoints:i}}}),rk=Xe({"src/traces/ohlc/select.js"(Z,G){"use strict";G.exports=function(x,S){var E=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a=E[0].t.bPos||0;if(S===!1)for(o=0;o<E.length;o++)E[o].selected=0;else for(o=0;o<E.length;o++){var n=E[o];S.contains([e.c2p(n.pos+a),t.c2p(n.yc)],null,n.i,x)?(r.push({pointNumber:n.i,x:e.c2d(n.pos),y:t.c2d(n.yc)}),n.selected=1):n.selected=0}return r}}}),yH=Xe({"src/traces/ohlc/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"ohlc",basePlotModule:Kf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:RT(),supplyDefaults:vH(),calc:ek().calc,plot:mH(),style:gH(),hoverPoints:tk().hoverPoints,selectPoints:rk()}}}),_H=Xe({"lib/ohlc.js"(Z,G){"use strict";G.exports=yH()}}),ak=Xe({"src/traces/candlestick/attributes.js"(Z,G){"use strict";var v=sa().extendFlat,x=tf().axisHoverFormat,S=RT(),E=N_();function e(t){return{line:{color:v({},E.line.color,{dflt:t}),width:E.line.width,editType:"style"},fillcolor:E.fillcolor,editType:"style"}}G.exports={xperiod:S.xperiod,xperiod0:S.xperiod0,xperiodalignment:S.xperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),x:S.x,open:S.open,high:S.high,low:S.low,close:S.close,line:{width:v({},E.line.width,{}),editType:"style"},increasing:e(S.increasing.line.color.dflt),decreasing:e(S.decreasing.line.color.dflt),text:S.text,hovertext:S.hovertext,hovertemplate:S.hovertemplate,hovertemplatefallback:S.hovertemplatefallback,whiskerwidth:v({},E.whiskerwidth,{dflt:0}),hoverlabel:S.hoverlabel,zorder:E.zorder}}}),xH=Xe({"src/traces/candlestick/defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=Q6(),E=Qd(),e=ak();G.exports=function(o,a,n,i){function s(c,m){return v.coerce(o,a,e,c,m)}var h=S(o,a,s,i);if(!h){a.visible=!1;return}E(o,a,i,s,{x:!0}),s("xhoverformat"),s("yhoverformat"),s("line.width"),t(o,a,s,"increasing"),t(o,a,s,"decreasing"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),s("whiskerwidth"),i._requestRangeslider[a.xaxis]=!0,s("zorder")};function t(r,o,a,n){var i=a(n+".line.color");a(n+".line.width",o.line.width),a(n+".fillcolor",x.addOpacity(i,.5))}}}),bH=Xe({"src/traces/candlestick/calc.js"(Z,G){"use strict";var v=sa(),x=Go(),S=tv(),E=ek().calcCommon;G.exports=function(t,r){var o=t._fullLayout,a=x.getFromId(t,r.xaxis),n=x.getFromId(t,r.yaxis),i=a.makeCalcdata(r,"x"),s=S(r,a,"x",i).vals,h=E(t,r,i,s,n,e);return h.length?(v.extendFlat(h[0].t,{num:o._numBoxes,dPos:v.distinctVals(s).minDiff/2,posLetter:"x",valLetter:"y"}),o._numBoxes++,h):[{t:{empty:!0}}]};function e(t,r,o,a){return{min:o,q1:Math.min(t,a),med:a,q3:Math.max(t,a),max:r}}}}),wH=Xe({"src/traces/candlestick/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"candlestick",basePlotModule:Kf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:ak(),layoutAttributes:U_(),supplyLayoutDefaults:V2().supplyLayoutDefaults,crossTraceCalc:G2().crossTraceCalc,supplyDefaults:xH(),calc:bH(),plot:H2().plot,layerName:"boxlayer",style:W2().style,hoverPoints:tk().hoverPoints,selectPoints:rk()}}}),TH=Xe({"lib/candlestick.js"(Z,G){"use strict";G.exports=wH()}}),ik=Xe({"src/plots/polar/set_convert.js"(Z,G){"use strict";var v=sa(),x=wv(),S=v.deg2rad,E=v.rad2deg;G.exports=function(n,i,s){switch(x(n,s),n._id){case"x":case"radialaxis":e(n,i);break;case"angularaxis":o(n,i);break}};function e(a,n){var i=n._subplot;a.setGeometry=function(){var s=a._rl[0],h=a._rl[1],c=i.innerRadius,m=(i.radius-c)/(h-s),p=c/m,T=s>h?function(l){return l<=0}:function(l){return l>=0};a.c2g=function(l){var _=a.c2l(l)-s;return(T(_)?_:0)+p},a.g2c=function(l){return a.l2c(l+s-p)},a.g2p=function(l){return l*m},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,n){return n==="degrees"?S(a):a}function r(a,n){return n==="degrees"?E(a):a}function o(a,n){var i=a.type;if(i==="linear"){var s=a.d2c,h=a.c2d;a.d2c=function(c,m){return t(s(c),m)},a.c2d=function(c,m){return h(r(c,m))}}a.makeCalcdata=function(c,m){var p=c[m],T=c._length,l,_,w=function(d){return a.d2c(d,c.thetaunit)};if(p)for(l=new Array(T),_=0;_<T;_++)l[_]=w(p[_]);else{var A=m+"0",M="d"+m,g=A in c?w(c[A]):0,b=c[M]?w(c[M]):(a.period||2*Math.PI)/T;for(l=new Array(T),_=0;_<T;_++)l[_]=g+_*b}return l},a.setGeometry=function(){var c=n.sector,m=c.map(S),p={clockwise:-1,counterclockwise:1}[a.direction],T=S(a.rotation),l=function(u){return p*u+T},_=function(u){return(u-T)/p},w,A,M,g;switch(i){case"linear":A=w=v.identity,g=S,M=E,a.range=v.isFullCircle(m)?[c[0],c[0]+360]:m.map(_).map(E);break;case"category":var b=a._categories.length,d=a.period?Math.max(a.period,b):b;d===0&&(d=1),A=g=function(u){return u*2*Math.PI/d},w=M=function(u){return u*d/Math.PI/2},a.range=[0,d];break}a.c2g=function(u){return l(A(u))},a.g2c=function(u){return w(_(u))},a.t2g=function(u){return l(g(u))},a.g2t=function(u){return M(_(u))}}}}}),DT=Xe({"src/plots/polar/constants.js"(Z,G){"use strict";G.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}}}),zT=Xe({"src/plots/polar/helpers.js"(Z,G){"use strict";var v=sa(),x=I_().tester,S=v.findIndexOfMin,E=v.isAngleInsideSector,e=v.angleDelta,t=v.angleDist;function r(_,w,A,M,g){if(!E(w,M))return!1;var b,d;A[0]<A[1]?(b=A[0],d=A[1]):(b=A[1],d=A[0]);var u=x(s(b,M[0],M[1],g)),y=x(s(d,M[0],M[1],g)),f=[_*Math.cos(w),_*Math.sin(w)];return y.contains(f)&&!u.contains(f)}function o(_,w,A,M){var g,b,d=M[0],u=M[1],y=m(Math.sin(w)-Math.sin(_)),f=m(Math.cos(w)-Math.cos(_)),R=Math.tan(A),L=m(1/R),z=y/f,F=u-z*d;return L?y&&f?(g=F/(R-z),b=R*g):f?(g=u*L,b=u):(g=d,b=d*R):y&&f?(g=0,b=F):f?(g=0,b=u):g=b=NaN,[g,b]}function a(_,w,A,M){var g=-w*A,b=w*w+1,d=2*(w*g-A),u=g*g+A*A-_*_,y=Math.sqrt(d*d-4*b*u),f=(-d+y)/(2*b),R=(-d-y)/(2*b);return[[f,w*f+g+M],[R,w*R+g+M]]}function n(_,w){var A=w.length,M=new Array(A+1),g;for(g=0;g<A;g++){var b=w[g];M[g]=[_*Math.cos(b),_*Math.sin(b)]}return M[g]=M[0].slice(),M}function i(_,w,A,M){var g=M.length,b=[],d,u;function y(U){return[_*Math.cos(U),_*Math.sin(U)]}function f(U,B,X){return o(U,B,X,y(U))}function R(U){return v.mod(U,g)}function L(U){return E(U,[w,A])}var z=S(M,function(U){return L(U)?t(U,w):1/0}),F=f(M[z],M[R(z-1)],w);for(b.push(F),d=z,u=0;u<g;d++,u++){var N=M[R(d)];if(!L(N))break;b.push(y(N))}var O=S(M,function(U){return L(U)?t(U,A):1/0}),P=f(M[O],M[R(O+1)],A);return b.push(P),b.push([0,0]),b.push(b[0].slice()),b}function s(_,w,A,M){return v.isFullCircle([w,A])?n(_,M):i(_,w,A,M)}function h(_,w,A,M){for(var g=1/0,b=1/0,d=s(_,w,A,M),u=0;u<d.length;u++){var y=d[u];g=Math.min(g,y[0]),b=Math.min(b,-y[1])}return[g,b]}function c(_,w){var A=function(b){var d=e(b,_);return d>0?d:1/0},M=S(w,A),g=v.mod(M+1,w.length);return[w[M],w[g]]}function m(_){return Math.abs(_)>1e-10?_:0}function p(_,w,A){w=w||0,A=A||0;for(var M=_.length,g=new Array(M),b=0;b<M;b++){var d=_[b];g[b]=[w+d[0],A-d[1]]}return g}function T(_,w,A,M,g,b){var d=s(_,w,A,M);return"M"+p(d,g,b).join("L")}function l(_,w,A,M,g,b,d){var u,y;_<w?(u=_,y=w):(u=w,y=_);var f=p(s(u,A,M,g),b,d),R=p(s(y,A,M,g),b,d);return"M"+R.reverse().join("L")+"M"+f.join("L")}G.exports={isPtInsidePolygon:r,findPolygonOffset:h,findEnclosingVertexAngles:c,findIntersectionXY:o,findXYatLength:a,clampTiny:m,pathPolygon:T,pathPolygonAnnulus:l}}}),nk=Xe({"src/plots/smith/helpers.js"(Z,G){"use strict";function v(r){return r<0?-1:r>0?1:0}function x(r){var o=r[0],a=r[1];if(!isFinite(o)||!isFinite(a))return[1,0];var n=(o+1)*(o+1)+a*a;return[(o*o+a*a-1)/n,2*a/n]}function S(r,o){var a=o[0],n=o[1];return[a*r.radius+r.cx,-n*r.radius+r.cy]}function E(r,o){return o*r.radius}function e(r,o,a,n){var i=S(r,x([a,o])),s=i[0],h=i[1],c=S(r,x([n,o])),m=c[0],p=c[1];if(o===0)return["M"+s+","+h,"L"+m+","+p].join(" ");var T=E(r,1/Math.abs(o));return["M"+s+","+h,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+m+","+p].join(" ")}function t(r,o,a,n){var i=E(r,1/(o+1)),s=S(r,x([o,a])),h=s[0],c=s[1],m=S(r,x([o,n])),p=m[0],T=m[1];if(v(a)!==v(n)){var l=S(r,x([o,0])),_=l[0],w=l[1];return["M"+h+","+c,"A"+i+","+i+" 0 0,"+(0<a?0:1)+" "+_+","+w,"A"+i+","+i+" 0 0,"+(n<0?0:1)+p+","+T].join(" ")}return["M"+h+","+c,"A"+i+","+i+" 0 0,"+(n<a?0:1)+" "+p+","+T].join(" ")}G.exports={smith:x,reactanceArc:e,resistanceArc:t,smithTransform:S}}}),ok=Xe({"src/plots/polar/polar.js"(Z,G){"use strict";var v=Hn(),x=Ch(),S=so(),E=sa(),e=E.strRotate,t=E.strTranslate,r=$n(),o=es(),a=bc(),n=Go(),i=wv(),s=ik(),h=Yd().doAutoRange,c=P5(),m=Ap(),p=rf(),T=K0(),l=Af().prepSelect,_=Af().selectOnClick,w=Af().clearOutline,A=Kd(),M=C_(),g=P_().redrawReglTraces,b=uh().MID_SHIFT,d=DT(),u=zT(),y=nk(),f=y.smith,R=y.reactanceArc,L=y.resistanceArc,z=y.smithTransform,F=E._,N=E.mod,O=E.deg2rad,P=E.rad2deg;function U(fe,V,Y){this.isSmith=Y||!1,this.id=V,this.gd=fe,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var ee=fe._fullLayout,q="clip"+ee._uid+V;this.clipIds.forTraces=q+"-for-traces",this.clipPaths.forTraces=ee._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=ee["_"+(Y?"smith":"polar")+"layer"].append("g").attr("class",V),this.getHole=function(oe){return this.isSmith?0:oe.hole},this.getSector=function(oe){return this.isSmith?[0,360]:oe.sector},this.getRadial=function(oe){return this.isSmith?oe.realaxis:oe.radialaxis},this.getAngular=function(oe){return this.isSmith?oe.imaginaryaxis:oe.angularaxis},Y||(this.radialTickLayout=null,this.angularTickLayout=null)}var B=U.prototype;G.exports=function(V,Y,ee){return new U(V,Y,ee)},B.plot=function(fe,V){for(var Y=this,ee=V[Y.id],q=!1,oe=0;oe<fe.length;oe++){var ae=fe[oe][0].trace;if(ae.cliponaxis===!1){q=!0;break}}Y._hasClipOnAxisFalse=q,Y.updateLayers(V,ee),Y.updateLayout(V,ee),a.generalUpdatePerTraceModule(Y.gd,Y,fe,ee),Y.updateFx(V,ee),Y.isSmith&&(delete ee.realaxis.range,delete ee.imaginaryaxis.range)},B.updateLayers=function(fe,V){var Y=this,ee=Y.isSmith,q=Y.layers,oe=Y.getRadial(V),ae=Y.getAngular(V),j=d.layerNames,Q=j.indexOf("frontplot"),re=j.slice(0,Q),ce=ae.layer==="below traces",be=oe.layer==="below traces";ce&&re.push("angular-line"),be&&re.push("radial-line"),ce&&re.push("angular-axis"),be&&re.push("radial-axis"),re.push("frontplot"),ce||re.push("angular-line"),be||re.push("radial-line"),ce||re.push("angular-axis"),be||re.push("radial-axis");var Ae=(ee?"smith":"polar")+"sublayer",De=Y.framework.selectAll("."+Ae).data(re,String);De.enter().append("g").attr("class",function(ze){return Ae+" "+ze}).each(function(ze){var Ze=q[ze]=v.select(this);switch(ze){case"frontplot":ee||Ze.append("g").classed("barlayer",!0),Ze.append("g").classed("scatterlayer",!0);break;case"backplot":Ze.append("g").classed("maplayer",!0);break;case"plotbg":q.bg=Ze.append("path");break;case"radial-grid":Ze.style("fill","none");break;case"angular-grid":Ze.style("fill","none");break;case"radial-line":Ze.append("line").style("fill","none");break;case"angular-line":Ze.append("path").style("fill","none");break}}),De.order()},B.updateLayout=function(fe,V){var Y=this,ee=Y.layers,q=fe._size,oe=Y.getRadial(V),ae=Y.getAngular(V),j=V.domain.x,Q=V.domain.y;Y.xOffset=q.l+q.w*j[0],Y.yOffset=q.t+q.h*(1-Q[1]);var re=Y.xLength=q.w*(j[1]-j[0]),ce=Y.yLength=q.h*(Q[1]-Q[0]),be=Y.getSector(V);Y.sectorInRad=be.map(O);var Ae=Y.sectorBBox=$(be),De=Ae[2]-Ae[0],ze=Ae[3]-Ae[1],Ze=ce/re,at=Math.abs(ze/De),nt,rt,st,Me,ye;Ze>at?(nt=re,rt=re*at,ye=(ce-rt)/q.h/2,st=[j[0],j[1]],Me=[Q[0]+ye,Q[1]-ye]):(nt=ce/at,rt=ce,ye=(re-nt)/q.w/2,st=[j[0]+ye,j[1]-ye],Me=[Q[0],Q[1]]),Y.xLength2=nt,Y.yLength2=rt,Y.xDomain2=st,Y.yDomain2=Me;var he=Y.xOffset2=q.l+q.w*st[0],Oe=Y.yOffset2=q.t+q.h*(1-Me[1]),tt=Y.radius=nt/De,ot=Y.innerRadius=Y.getHole(V)*tt,Qe=Y.cx=he-tt*Ae[0],Pt=Y.cy=Oe+tt*Ae[3],It=Y.cxx=Qe-he,qt=Y.cyy=Pt-Oe,Wt=oe.side,kr;Wt==="counterclockwise"?(kr=Wt,Wt="top"):Wt==="clockwise"&&(kr=Wt,Wt="bottom"),Y.radialAxis=Y.mockAxis(fe,V,oe,{_id:"x",side:Wt,_trueSide:kr,domain:[ot/q.w,tt/q.w]}),Y.angularAxis=Y.mockAxis(fe,V,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),Y.doAutoRange(fe,V),Y.updateAngularAxis(fe,V),Y.updateRadialAxis(fe,V),Y.updateRadialAxisTitle(fe,V),Y.xaxis=Y.mockCartesianAxis(fe,V,{_id:"x",domain:st}),Y.yaxis=Y.mockCartesianAxis(fe,V,{_id:"y",domain:Me});var mr=Y.pathSubplot();Y.clipPaths.forTraces.select("path").attr("d",mr).attr("transform",t(It,qt)),ee.frontplot.attr("transform",t(he,Oe)).call(o.setClipUrl,Y._hasClipOnAxisFalse?null:Y.clipIds.forTraces,Y.gd),ee.bg.attr("d",mr).attr("transform",t(Qe,Pt)).call(r.fill,V.bgcolor)},B.mockAxis=function(fe,V,Y,ee){var q=E.extendFlat({},Y,ee);return s(q,V,fe),q},B.mockCartesianAxis=function(fe,V,Y){var ee=this,q=ee.isSmith,oe=Y._id,ae=E.extendFlat({type:"linear"},Y);i(ae,fe);var j={x:[0,2],y:[1,3]};return ae.setRange=function(){var Q=ee.sectorBBox,re=j[oe],ce=ee.radialAxis._rl,be=(ce[1]-ce[0])/(1-ee.getHole(V));ae.range=[Q[re[0]]*be,Q[re[1]]*be]},ae.isPtWithinRange=oe==="x"&&!q?function(Q){return ee.isPtInside(Q)}:function(){return!0},ae.setRange(),ae.setScale(),ae},B.doAutoRange=function(fe,V){var Y=this,ee=Y.gd,q=Y.radialAxis,oe=Y.getRadial(V);h(ee,q);var ae=q.range;if(oe.range=ae.slice(),oe._input.range=ae.slice(),q._rl=[q.r2l(ae[0],null,"gregorian"),q.r2l(ae[1],null,"gregorian")],q.minallowed!==void 0){var j=q.r2l(q.minallowed);q._rl[0]>q._rl[1]?q._rl[1]=Math.max(q._rl[1],j):q._rl[0]=Math.max(q._rl[0],j)}if(q.maxallowed!==void 0){var Q=q.r2l(q.maxallowed);q._rl[0]<q._rl[1]?q._rl[1]=Math.min(q._rl[1],Q):q._rl[0]=Math.min(q._rl[0],Q)}},B.updateRadialAxis=function(fe,V){var Y=this,ee=Y.gd,q=Y.layers,oe=Y.radius,ae=Y.innerRadius,j=Y.cx,Q=Y.cy,re=Y.getRadial(V),ce=N(Y.getSector(V)[0],360),be=Y.radialAxis,Ae=ae<oe,De=Y.isSmith;De||(Y.fillViewInitialKey("radialaxis.angle",re.angle),Y.fillViewInitialKey("radialaxis.range",be.range.slice()),be.setGeometry()),be.tickangle==="auto"&&ce>90&&ce<=270&&(be.tickangle=180);var ze=De?function(tt){var ot=z(Y,f([tt.x,0]));return t(ot[0]-j,ot[1]-Q)}:function(tt){return t(be.l2p(tt.x)+ae,0)},Ze=De?function(tt){return L(Y,tt.x,-1/0,1/0)}:function(tt){return Y.pathArc(be.r2p(tt.x)+ae)},at=X(re);if(Y.radialTickLayout!==at&&(q["radial-axis"].selectAll(".xtick").remove(),Y.radialTickLayout=at),Ae){be.setScale();var nt=0,rt=De?(be.tickvals||[]).filter(function(tt){return tt>=0}).map(function(tt){return n.tickText(be,tt,!0,!1)}):n.calcTicks(be),st=De?rt:n.clipEnds(be,rt),Me=n.getTickSigns(be)[2];De&&((be.ticks==="top"&&be.side==="bottom"||be.ticks==="bottom"&&be.side==="top")&&(Me=-Me),be.ticks==="top"&&be.side==="top"&&(nt=-be.ticklen),be.ticks==="bottom"&&be.side==="bottom"&&(nt=be.ticklen)),n.drawTicks(ee,be,{vals:rt,layer:q["radial-axis"],path:n.makeTickPath(be,0,Me),transFn:ze,crisp:!1}),n.drawGrid(ee,be,{vals:st,layer:q["radial-grid"],path:Ze,transFn:E.noop,crisp:!1}),n.drawLabels(ee,be,{vals:rt,layer:q["radial-axis"],transFn:ze,labelFns:n.makeLabelFns(be,nt)})}var ye=Y.radialAxisAngle=Y.vangles?P(se(O(re.angle),Y.vangles)):re.angle,he=t(j,Q),Oe=he+e(-ye);le(q["radial-axis"],Ae&&(re.showticklabels||re.ticks),{transform:Oe}),le(q["radial-grid"],Ae&&re.showgrid,{transform:De?"":he}),le(q["radial-line"].select("line"),Ae&&re.showline,{x1:De?-oe:ae,y1:0,x2:oe,y2:0,transform:Oe}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},B.updateRadialAxisTitle=function(fe,V,Y){if(!this.isSmith){var ee=this,q=ee.gd,oe=ee.radius,ae=ee.cx,j=ee.cy,Q=ee.getRadial(V),re=ee.id+"title",ce=0;if(Q.title){var be=o.bBox(ee.layers["radial-axis"].node()).height,Ae=Q.title.font.size,De=Q.side;ce=De==="top"?Ae:De==="counterclockwise"?-(be+Ae*.4):be+Ae*.8}var ze=Y!==void 0?Y:ee.radialAxisAngle,Ze=O(ze),at=Math.cos(Ze),nt=Math.sin(Ze),rt=ae+oe/2*at+ce*nt,st=j-oe/2*nt+ce*at;ee.layers["radial-axis-title"]=T.draw(q,re,{propContainer:Q,propName:ee.id+".radialaxis.title.text",placeholder:F(q,"Click to enter radial axis title"),attributes:{x:rt,y:st,"text-anchor":"middle"},transform:{rotate:-ze}})}},B.updateAngularAxis=function(fe,V){var Y=this,ee=Y.gd,q=Y.layers,oe=Y.radius,ae=Y.innerRadius,j=Y.cx,Q=Y.cy,re=Y.getAngular(V),ce=Y.angularAxis,be=Y.isSmith;be||(Y.fillViewInitialKey("angularaxis.rotation",re.rotation),ce.setGeometry(),ce.setScale());var Ae=be?function(ot){var Qe=z(Y,f([0,ot.x]));return Math.atan2(Qe[0]-j,Qe[1]-Q)-Math.PI/2}:function(ot){return ce.t2g(ot.x)};ce.type==="linear"&&ce.thetaunit==="radians"&&(ce.tick0=P(ce.tick0),ce.dtick=P(ce.dtick));var De=function(ot){return t(j+oe*Math.cos(ot),Q-oe*Math.sin(ot))},ze=be?function(ot){var Qe=z(Y,f([0,ot.x]));return t(Qe[0],Qe[1])}:function(ot){return De(Ae(ot))},Ze=be?function(ot){var Qe=z(Y,f([0,ot.x])),Pt=Math.atan2(Qe[0]-j,Qe[1]-Q)-Math.PI/2;return t(Qe[0],Qe[1])+e(-P(Pt))}:function(ot){var Qe=Ae(ot);return De(Qe)+e(-P(Qe))},at=be?function(ot){return R(Y,ot.x,0,1/0)}:function(ot){var Qe=Ae(ot),Pt=Math.cos(Qe),It=Math.sin(Qe);return"M"+[j+ae*Pt,Q-ae*It]+"L"+[j+oe*Pt,Q-oe*It]},nt=n.makeLabelFns(ce,0),rt=nt.labelStandoff,st={};st.xFn=function(ot){var Qe=Ae(ot);return Math.cos(Qe)*rt},st.yFn=function(ot){var Qe=Ae(ot),Pt=Math.sin(Qe)>0?.2:1;return-Math.sin(Qe)*(rt+ot.fontSize*Pt)+Math.abs(Math.cos(Qe))*(ot.fontSize*b)},st.anchorFn=function(ot){var Qe=Ae(ot),Pt=Math.cos(Qe);return Math.abs(Pt)<.1?"middle":Pt>0?"start":"end"},st.heightFn=function(ot,Qe,Pt){var It=Ae(ot);return-.5*(1+Math.sin(It))*Pt};var Me=X(re);Y.angularTickLayout!==Me&&(q["angular-axis"].selectAll("."+ce._id+"tick").remove(),Y.angularTickLayout=Me);var ye=be?[1/0].concat(ce.tickvals||[]).map(function(ot){return n.tickText(ce,ot,!0,!1)}):n.calcTicks(ce);be&&(ye[0].text="\u221E",ye[0].fontSize*=1.75);var he;if(V.gridshape==="linear"?(he=ye.map(Ae),E.angleDelta(he[0],he[1])<0&&(he=he.slice().reverse())):he=null,Y.vangles=he,ce.type==="category"&&(ye=ye.filter(function(ot){return E.isAngleInsideSector(Ae(ot),Y.sectorInRad)})),ce.visible){var Oe=ce.ticks==="inside"?-1:1,tt=(ce.linewidth||1)/2;n.drawTicks(ee,ce,{vals:ye,layer:q["angular-axis"],path:"M"+Oe*tt+",0h"+Oe*ce.ticklen,transFn:Ze,crisp:!1}),n.drawGrid(ee,ce,{vals:ye,layer:q["angular-grid"],path:at,transFn:E.noop,crisp:!1}),n.drawLabels(ee,ce,{vals:ye,layer:q["angular-axis"],repositionOnUpdate:!0,transFn:ze,labelFns:st})}le(q["angular-line"].select("path"),re.showline,{d:Y.pathSubplot(),transform:t(j,Q)}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},B.updateFx=function(fe,V){if(!this.gd._context.staticPlot){var Y=!this.isSmith;Y&&(this.updateAngularDrag(fe),this.updateRadialDrag(fe,V,0),this.updateRadialDrag(fe,V,1)),this.updateHoverAndMainDrag(fe)}},B.updateHoverAndMainDrag=function(fe){var V=this,Y=V.isSmith,ee=V.gd,q=V.layers,oe=fe._zoomlayer,ae=d.MINZOOM,j=d.OFFEDGE,Q=V.radius,re=V.innerRadius,ce=V.cx,be=V.cy,Ae=V.cxx,De=V.cyy,ze=V.sectorInRad,Ze=V.vangles,at=V.radialAxis,nt=u.clampTiny,rt=u.findXYatLength,st=u.findEnclosingVertexAngles,Me=d.cornerHalfWidth,ye=d.cornerLen/2,he,Oe,tt=c.makeDragger(q,"path","maindrag",fe.dragmode===!1?"none":"crosshair");v.select(tt).attr("d",V.pathSubplot()).attr("transform",t(ce,be)),tt.onmousemove=function(rr){p.hover(ee,rr,V.id),ee._fullLayout._lasthover=tt,ee._fullLayout._hoversubplot=V.id},tt.onmouseout=function(rr){ee._dragging||m.unhover(ee,rr)};var ot={element:tt,gd:ee,subplot:V.id,plotinfo:{id:V.id,xaxis:V.xaxis,yaxis:V.yaxis},xaxes:[V.xaxis],yaxes:[V.yaxis]},Qe,Pt,It,qt,Wt,kr,mr,qr,Sr;function Rr(rr,er){return Math.sqrt(rr*rr+er*er)}function wt(rr,er){return Rr(rr-Ae,er-De)}function Ne(rr,er){return Math.atan2(De-er,rr-Ae)}function Ke(rr,er){return[rr*Math.cos(er),rr*Math.sin(-er)]}function Te(rr,er){if(rr===0)return V.pathSector(2*Me);var Lr=ye/rr,fa=er-Lr,Da=er+Lr,Ia=Math.max(0,Math.min(rr,Q)),qa=Ia-Me,Wa=Ia+Me;return"M"+Ke(qa,fa)+"A"+[qa,qa]+" 0,0,0 "+Ke(qa,Da)+"L"+Ke(Wa,Da)+"A"+[Wa,Wa]+" 0,0,1 "+Ke(Wa,fa)+"Z"}function Ie(rr,er,Lr){if(rr===0)return V.pathSector(2*Me);var fa=Ke(rr,er),Da=Ke(rr,Lr),Ia=nt((fa[0]+Da[0])/2),qa=nt((fa[1]+Da[1])/2),Wa,Ca;if(Ia&&qa){var hi=qa/Ia,wi=-1/hi,Kt=rt(Me,hi,Ia,qa);Wa=rt(ye,wi,Kt[0][0],Kt[0][1]),Ca=rt(ye,wi,Kt[1][0],Kt[1][1])}else{var Ft,Yt;qa?(Ft=ye,Yt=Me):(Ft=Me,Yt=ye),Wa=[[Ia-Ft,qa-Yt],[Ia+Ft,qa-Yt]],Ca=[[Ia-Ft,qa+Yt],[Ia+Ft,qa+Yt]]}return"M"+Wa.join("L")+"L"+Ca.reverse().join("L")+"Z"}function Ve(){It=null,qt=null,Wt=V.pathSubplot(),kr=!1;var rr=ee._fullLayout[V.id];mr=x(rr.bgcolor).getLuminance(),qr=c.makeZoombox(oe,mr,ce,be,Wt),qr.attr("fill-rule","evenodd"),Sr=c.makeCorners(oe,ce,be),w(ee)}function Ce(rr,er){return er=Math.max(Math.min(er,Q),re),rr<j?rr=0:Q-rr<j?rr=Q:er<j?er=0:Q-er<j&&(er=Q),Math.abs(er-rr)>ae?(rr<er?(It=rr,qt=er):(It=er,qt=rr),!0):(It=null,qt=null,!1)}function Ee(rr,er){rr=rr||Wt,er=er||"M0,0Z",qr.attr("d",rr),Sr.attr("d",er),c.transitionZoombox(qr,Sr,kr,mr),kr=!0;var Lr={};Ct(Lr),ee.emit("plotly_relayouting",Lr)}function Pe(rr,er){rr=rr*he,er=er*Oe;var Lr=Qe+rr,fa=Pt+er,Da=wt(Qe,Pt),Ia=Math.min(wt(Lr,fa),Q),qa=Ne(Qe,Pt),Wa,Ca;Ce(Da,Ia)&&(Wa=Wt+V.pathSector(qt),It&&(Wa+=V.pathSector(It)),Ca=Te(It,qa)+Te(qt,qa)),Ee(Wa,Ca)}function ft(rr,er,Lr,fa){var Da=u.findIntersectionXY(Lr,fa,Lr,[rr-Ae,De-er]);return Rr(Da[0],Da[1])}function ct(rr,er){var Lr=Qe+rr,fa=Pt+er,Da=Ne(Qe,Pt),Ia=Ne(Lr,fa),qa=st(Da,Ze),Wa=st(Ia,Ze),Ca=ft(Qe,Pt,qa[0],qa[1]),hi=Math.min(ft(Lr,fa,Wa[0],Wa[1]),Q),wi,Kt;Ce(Ca,hi)&&(wi=Wt+V.pathSector(qt),It&&(wi+=V.pathSector(It)),Kt=[Ie(It,qa[0],qa[1]),Ie(qt,qa[0],qa[1])].join(" ")),Ee(wi,Kt)}function _t(){if(c.removeZoombox(ee),!(It===null||qt===null)){var rr={};Ct(rr),c.showDoubleClickNotifier(ee),S.call("_guiRelayout",ee,rr)}}function Ct(rr){var er=at._rl,Lr=(er[1]-er[0])/(1-re/Q)/Q,fa=[er[0]+(It-re)*Lr,er[0]+(qt-re)*Lr];rr[V.id+".radialaxis.range"]=fa}function ir(rr,er){var Lr=ee._fullLayout.clickmode;if(c.removeZoombox(ee),rr===2){var fa={};for(var Da in V.viewInitial)fa[V.id+"."+Da]=V.viewInitial[Da];ee.emit("plotly_doubleclick",null),S.call("_guiRelayout",ee,fa)}Lr.indexOf("select")>-1&&rr===1&&_(er,ee,[V.xaxis],[V.yaxis],V.id,ot),Lr.indexOf("event")>-1&&p.click(ee,er,V.id)}ot.prepFn=function(rr,er,Lr){var fa=ee._fullLayout.dragmode,Da=tt.getBoundingClientRect();ee._fullLayout._calcInverseTransform(ee);var Ia=ee._fullLayout._invTransform;he=ee._fullLayout._invScaleX,Oe=ee._fullLayout._invScaleY;var qa=E.apply3DTransform(Ia)(er-Da.left,Lr-Da.top);if(Qe=qa[0],Pt=qa[1],Ze){var Wa=u.findPolygonOffset(Q,ze[0],ze[1],Ze);Qe+=Ae+Wa[0],Pt+=De+Wa[1]}switch(fa){case"zoom":ot.clickFn=ir,Y||(Ze?ot.moveFn=ct:ot.moveFn=Pe,ot.doneFn=_t,Ve(rr,er,Lr));break;case"select":case"lasso":l(rr,er,Lr,ot,fa);break}},m.init(ot)},B.updateRadialDrag=function(fe,V,Y){var ee=this,q=ee.gd,oe=ee.layers,ae=ee.radius,j=ee.innerRadius,Q=ee.cx,re=ee.cy,ce=ee.radialAxis,be=d.radialDragBoxSize,Ae=be/2;if(!ce.visible)return;var De=O(ee.radialAxisAngle),ze=ce._rl,Ze=ze[0],at=ze[1],nt=ze[Y],rt=.75*(ze[1]-ze[0])/(1-ee.getHole(V))/ae,st,Me,ye;Y?(st=Q+(ae+Ae)*Math.cos(De),Me=re-(ae+Ae)*Math.sin(De),ye="radialdrag"):(st=Q+(j-Ae)*Math.cos(De),Me=re-(j-Ae)*Math.sin(De),ye="radialdrag-inner");var he=c.makeRectDragger(oe,ye,"crosshair",-Ae,-Ae,be,be),Oe={element:he,gd:q};fe.dragmode===!1&&(Oe.dragmode=!1),le(v.select(he),ce.visible&&j<ae,{transform:t(st,Me)});var tt,ot,Qe;function Pt(mr,qr){if(tt)tt(mr,qr);else{var Sr=[mr,-qr],Rr=[Math.cos(De),Math.sin(De)],wt=Math.abs(E.dot(Sr,Rr)/Math.sqrt(E.dot(Sr,Sr)));isNaN(wt)||(tt=wt<.5?Wt:kr)}var Ne={};It(Ne),q.emit("plotly_relayouting",Ne)}function It(mr){ot!==null?mr[ee.id+".radialaxis.angle"]=ot:Qe!==null&&(mr[ee.id+".radialaxis.range["+Y+"]"]=Qe)}function qt(){ot!==null?S.call("_guiRelayout",q,ee.id+".radialaxis.angle",ot):Qe!==null&&S.call("_guiRelayout",q,ee.id+".radialaxis.range["+Y+"]",Qe)}function Wt(mr,qr){if(Y!==0){var Sr=st+mr,Rr=Me+qr;ot=Math.atan2(re-Rr,Sr-Q),ee.vangles&&(ot=se(ot,ee.vangles)),ot=P(ot);var wt=t(Q,re)+e(-ot);oe["radial-axis"].attr("transform",wt),oe["radial-line"].select("line").attr("transform",wt);var Ne=ee.gd._fullLayout,Ke=Ne[ee.id];ee.updateRadialAxisTitle(Ne,Ke,ot)}}function kr(mr,qr){var Sr=E.dot([mr,-qr],[Math.cos(De),Math.sin(De)]);if(Qe=nt-rt*Sr,rt>0!=(Y?Qe>Ze:Qe<at)){Qe=null;return}var Rr=q._fullLayout,wt=Rr[ee.id];ce.range[Y]=Qe,ce._rl[Y]=Qe,ee.updateRadialAxis(Rr,wt),ee.xaxis.setRange(),ee.xaxis.setScale(),ee.yaxis.setRange(),ee.yaxis.setScale();var Ne=!1;for(var Ke in ee.traceHash){var Te=ee.traceHash[Ke],Ie=E.filterVisible(Te),Ve=Te[0][0].trace._module;Ve.plot(q,ee,Ie,wt),S.traceIs(Ke,"gl")&&Ie.length&&(Ne=!0)}Ne&&(M(q),g(q))}Oe.prepFn=function(){tt=null,ot=null,Qe=null,Oe.moveFn=Pt,Oe.doneFn=qt,w(q)},Oe.clampFn=function(mr,qr){return Math.sqrt(mr*mr+qr*qr)<d.MINDRAG&&(mr=0,qr=0),[mr,qr]},m.init(Oe)},B.updateAngularDrag=function(fe){var V=this,Y=V.gd,ee=V.layers,q=V.radius,oe=V.angularAxis,ae=V.cx,j=V.cy,Q=V.cxx,re=V.cyy,ce=d.angularDragBoxSize,be=c.makeDragger(ee,"path","angulardrag",fe.dragmode===!1?"none":"move"),Ae={element:be,gd:Y};fe.dragmode===!1?Ae.dragmode=!1:v.select(be).attr("d",V.pathAnnulus(q,q+ce)).attr("transform",t(ae,j)).call(A,"move");function De(Qe,Pt){return Math.atan2(re+ce-Pt,Qe-Q-ce)}var ze=ee.frontplot.select(".scatterlayer").selectAll(".trace"),Ze=ze.selectAll(".point"),at=ze.selectAll(".textpoint"),nt,rt,st,Me,ye,he;function Oe(Qe,Pt){var It=V.gd._fullLayout,qt=It[V.id],Wt=nt+Qe*fe._invScaleX,kr=rt+Pt*fe._invScaleY,mr=De(Wt,kr),qr=P(mr-he);if(Me=st+qr,ee.frontplot.attr("transform",t(V.xOffset2,V.yOffset2)+e([-qr,Q,re])),V.vangles){ye=V.radialAxisAngle+qr;var Sr=t(ae,j)+e(-qr),Rr=t(ae,j)+e(-ye);ee.bg.attr("transform",Sr),ee["radial-grid"].attr("transform",Sr),ee["radial-axis"].attr("transform",Rr),ee["radial-line"].select("line").attr("transform",Rr),V.updateRadialAxisTitle(It,qt,ye)}else V.clipPaths.forTraces.select("path").attr("transform",t(Q,re)+e(qr));Ze.each(function(){var Ce=v.select(this),Ee=o.getTranslate(Ce);Ce.attr("transform",t(Ee.x,Ee.y)+e([qr]))}),at.each(function(){var Ce=v.select(this),Ee=Ce.select("text"),Pe=o.getTranslate(Ce);Ce.attr("transform",e([qr,Ee.attr("x"),Ee.attr("y")])+t(Pe.x,Pe.y))}),oe.rotation=E.modHalf(Me,360),V.updateAngularAxis(It,qt),V._hasClipOnAxisFalse&&!E.isFullCircle(V.sectorInRad)&&ze.call(o.hideOutsideRangePoints,V);var wt=!1;for(var Ne in V.traceHash)if(S.traceIs(Ne,"gl")){var Ke=V.traceHash[Ne],Te=E.filterVisible(Ke),Ie=Ke[0][0].trace._module;Ie.plot(Y,V,Te,qt),Te.length&&(wt=!0)}wt&&(M(Y),g(Y));var Ve={};tt(Ve),Y.emit("plotly_relayouting",Ve)}function tt(Qe){Qe[V.id+".angularaxis.rotation"]=Me,V.vangles&&(Qe[V.id+".radialaxis.angle"]=ye)}function ot(){at.select("text").attr("transform",null);var Qe={};tt(Qe),S.call("_guiRelayout",Y,Qe)}Ae.prepFn=function(Qe,Pt,It){var qt=fe[V.id];st=qt.angularaxis.rotation;var Wt=be.getBoundingClientRect();nt=Pt-Wt.left,rt=It-Wt.top,Y._fullLayout._calcInverseTransform(Y);var kr=E.apply3DTransform(fe._invTransform)(nt,rt);nt=kr[0],rt=kr[1],he=De(nt,rt),Ae.moveFn=Oe,Ae.doneFn=ot,w(Y)},V.vangles&&!E.isFullCircle(V.sectorInRad)&&(Ae.prepFn=E.noop,A(v.select(be),null)),m.init(Ae)},B.isPtInside=function(fe){if(this.isSmith)return!0;var V=this.sectorInRad,Y=this.vangles,ee=this.angularAxis.c2g(fe.theta),q=this.radialAxis,oe=q.c2l(fe.r),ae=q._rl,j=Y?u.isPtInsidePolygon:E.isPtInsideSector;return j(oe,ee,ae,V,Y)},B.pathArc=function(fe){var V=this.sectorInRad,Y=this.vangles,ee=Y?u.pathPolygon:E.pathArc;return ee(fe,V[0],V[1],Y)},B.pathSector=function(fe){var V=this.sectorInRad,Y=this.vangles,ee=Y?u.pathPolygon:E.pathSector;return ee(fe,V[0],V[1],Y)},B.pathAnnulus=function(fe,V){var Y=this.sectorInRad,ee=this.vangles,q=ee?u.pathPolygonAnnulus:E.pathAnnulus;return q(fe,V,Y[0],Y[1],ee)},B.pathSubplot=function(){var fe=this.innerRadius,V=this.radius;return fe?this.pathAnnulus(fe,V):this.pathSector(V)},B.fillViewInitialKey=function(fe,V){fe in this.viewInitial||(this.viewInitial[fe]=V)};function X(fe){var V=fe.ticks+String(fe.ticklen)+String(fe.showticklabels);return"side"in fe&&(V+=fe.side),V}function $(fe){var V=fe[0],Y=fe[1],ee=Y-V,q=N(V,360),oe=q+ee,ae=Math.cos(O(q)),j=Math.sin(O(q)),Q=Math.cos(O(oe)),re=Math.sin(O(oe)),ce,be,Ae,De;return q<=90&&oe>=90||q>90&&oe>=450?De=1:j<=0&&re<=0?De=0:De=Math.max(j,re),q<=180&&oe>=180||q>180&&oe>=540?ce=-1:ae>=0&&Q>=0?ce=0:ce=Math.min(ae,Q),q<=270&&oe>=270||q>270&&oe>=630?be=-1:j>=0&&re>=0?be=0:be=Math.min(j,re),oe>=360?Ae=1:ae<=0&&Q<=0?Ae=0:Ae=Math.max(ae,Q),[ce,be,Ae,De]}function se(fe,V){var Y=function(q){return E.angleDist(fe,q)},ee=E.findIndexOfMin(V,Y);return V[ee]}function le(fe,V,Y){return V?(fe.attr("display",null),fe.attr(Y)):fe&&fe.attr("display","none"),fe}}}),sk=Xe({"src/plots/polar/layout_attributes.js"(Z,G){"use strict";var v=sh(),x=Wh(),S=wc().attributes,E=sa().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:E({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:E({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,ticklabelstep:x.ticklabelstep,showticklabels:x.showticklabels,labelalias:x.labelalias,minorloglabels:x.minorloglabels,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickfont:x.tickfont,tickangle:x.tickangle,tickformat:x.tickformat,tickformatstops:x.tickformatstops,layer:x.layer},"plot","from-root"),o={visible:E({},x.visible,{dflt:!0}),type:E({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},autorange:E({},x.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:E({},x.minallowed,{editType:"plot"}),maxallowed:E({},x.maxallowed,{editType:"plot"}),range:E({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:x.categoryorder,categoryarray:x.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:x.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:E({},x.title.text,{editType:"plot",dflt:""}),font:E({},x.title.font,{editType:"plot"}),editType:"plot"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(o,t,r);var a={visible:E({},x.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:x.autotypenumbers,categoryorder:x.categoryorder,categoryarray:x.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(a,t,r),G.exports={domain:S({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:v.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),AH=Xe({"src/plots/polar/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=zl(),E=o0(),e=Hh().getSubplotData,t=Y0(),r=t1(),o=Qm(),a=e0(),n=I2(),i=z_(),s=f5(),h=a1(),c=sk(),m=ik(),p=DT(),T=p.axisNames;function l(w,A,M,g){var b=M("bgcolor");g.bgColor=x.combine(b,g.paper_bgcolor);var d=M("sector");M("hole");var u=e(g.fullData,p.name,g.id),y=g.layoutOut,f;function R(be,Ae){return M(f+"."+be,Ae)}for(var L=0;L<T.length;L++){f=T[L],v.isPlainObject(w[f])||(w[f]={});var z=w[f],F=S.newContainer(A,f);F._id=F._name=f,F._attr=g.id+"."+f,F._traceIndices=u.map(function(be){return be.index});var N=p.axisName2dataArray[f],O=_(z,F,R,u,N,g);n(z,F,R,{axData:u,dataAttr:N});var P=R("visible");switch(m(F,A,y),R("uirevision",A.uirevision),F._m=1,f){case"radialaxis":R("minallowed"),R("maxallowed");var U=R("range"),B=F.getAutorangeDflt(U),X=R("autorange",B),$;U&&(U[0]===null&&U[1]===null||(U[0]===null||U[1]===null)&&(X==="reversed"||X===!0)||U[0]!==null&&(X==="min"||X==="max reversed")||U[1]!==null&&(X==="max"||X==="min reversed"))&&(U=void 0,delete F.range,F.autorange=!0,$=!0),$||(B=F.getAutorangeDflt(U),X=R("autorange",B)),z.autorange=X,X&&(s(R,X,U),(O==="linear"||O==="-")&&R("rangemode"),F.isReversed()&&(F._m=-1)),F.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(O==="date"){v.log("Polar plots do not support date angular axes yet.");for(var se=0;se<u.length;se++)u[se].visible=!1;O=z.type=F.type="linear"}R(O==="linear"?"thetaunit":"period");var le=R("direction");R("rotation",{counterclockwise:0,clockwise:90}[le]);break}if(a(z,F,R,F.type,{tickSuffixDflt:F.thetaunit==="degrees"?"\xB0":void 0}),P){var fe,V,Y,ee,q,oe,ae,j,Q,re,ce=g.font||{};fe=R("color"),V=fe===z.color?fe:ce.color,Y=ce.size,ee=ce.family,q=ce.weight,oe=ce.style,ae=ce.variant,j=ce.textcase,Q=ce.lineposition,re=ce.shadow,t(z,F,R,F.type),o(z,F,R,F.type,{font:{weight:q,style:oe,variant:ae,textcase:j,lineposition:Q,shadow:re,color:V,size:Y,family:ee},noAutotickangles:f==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),r(z,F,R,{outerTicks:!0}),i(z,F,R,{dfltColor:fe,bgColor:g.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:c[f]}),R("layer"),f==="radialaxis"&&(R("side"),R("angle",d[0]),R("title.text"),v.coerceFont(R,"title.font",{weight:q,style:oe,variant:ae,textcase:j,lineposition:Q,shadow:re,color:V,size:v.bigFont(Y),family:ee}))}O!=="category"&&R("hoverformat"),F._input=z}A.angularaxis.type==="category"&&M("gridshape")}function _(w,A,M,g,b,d){var u=M("autotypenumbers",d.autotypenumbersDflt),y=M("type");if(y==="-"){for(var f,R=0;R<g.length;R++)if(g[R].visible){f=g[R];break}f&&f[b]&&(A.type=h(f[b],"gregorian",{noMultiCategory:!0,autotypenumbers:u})),A.type==="-"?A.type="linear":w.type=A.type}return A.type}G.exports=function(A,M,g){E(A,M,g,{type:p.name,attributes:c,handleDefaults:l,font:M.font,autotypenumbersDflt:M.autotypenumbers,paper_bgcolor:M.paper_bgcolor,fullData:g,layoutOut:M})}}}),FT=Xe({"src/plots/polar/index.js"(Z,G){"use strict";var v=Hh().getSubplotCalcData,x=sa().counterRegex,S=ok(),E=DT(),e=E.attr,t=E.name,r=x(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(i){for(var s=i._fullLayout,h=i.calcdata,c=s._subplots[t],m=0;m<c.length;m++){var p=c[m],T=v(h,t,p),l=s[p]._subplot;l||(l=S(i,p),s[p]._subplot=l),l.plot(T,s,i._promises)}}function n(i,s,h,c){for(var m=c._subplots[t]||[],p=c._has&&c._has("gl"),T=s._has&&s._has("gl"),l=p&&!T,_=0;_<m.length;_++){var w=m[_],A=c[w]._subplot;if(!s[w]&&A){A.framework.remove(),A.layers["radial-axis-title"].remove();for(var M in A.clipPaths)A.clipPaths[M].remove()}l&&A._scene&&(A._scene.destroy(),A._scene=null)}}G.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:sk(),supplyLayoutDefaults:AH(),plot:a,clean:n,toSVG:Kf().toSVG}}}),Cx=Xe({"src/traces/scatterpolar/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=Qo().extendFlat,e=$d(),t=af(),r=ru(),o=t.line;G.exports={mode:t.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:t.text,texttemplate:x({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:E({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,marker:t.marker,cliponaxis:E({},t.cliponaxis,{dflt:!1}),textposition:t.textposition,textfont:t.textfont,fill:E({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:e(),hoverinfo:E({},r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:t.hoveron,hovertemplate:v(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),OT=Xe({"src/traces/scatterpolar/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=md(),E=Dd(),e=o1(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=Cx();function n(s,h,c,m){function p(_,w){return v.coerce(s,h,a,_,w)}var T=i(s,h,m,p);if(!T){h.visible=!1;return}p("thetaunit"),p("mode",T<o?"lines+markers":"lines"),p("text"),p("hovertext"),h.hoveron!=="fills"&&(p("hovertemplate"),p("hovertemplatefallback")),x.hasMarkers(h)&&S(s,h,c,m,p,{gradient:!0}),x.hasLines(h)&&(E(s,h,c,m,p,{backoff:!0}),e(s,h,p),p("connectgaps")),x.hasText(h)&&(p("texttemplate"),p("texttemplatefallback"),t(s,h,m,p));var l=[];(x.hasMarkers(h)||x.hasText(h))&&(p("cliponaxis"),p("marker.maxdisplayed"),l.push("points")),p("fill"),h.fill!=="none"&&(r(s,h,c,p),x.hasLines(h)||e(s,h,p)),(h.fill==="tonext"||h.fill==="toself")&&l.push("fills"),p("hoveron",l.join("+")||"points"),v.coerceSelectionMarkerOpacity(h,p)}function i(s,h,c,m){var p=m("r"),T=m("theta");v.isTypedArray(p)&&(h.r=p=Array.from(p)),v.isTypedArray(T)&&(h.theta=T=Array.from(T));var l;if(p)T?l=Math.min(p.length,T.length):(l=p.length,m("theta0"),m("dtheta"));else{if(!T)return 0;l=h.theta.length,m("r0"),m("dr")}return h._length=l,l}G.exports={handleRThetaDefaults:i,supplyDefaults:n}}}),BT=Xe({"src/traces/scatterpolar/format_labels.js"(Z,G){"use strict";var v=sa(),x=Go();G.exports=function(E,e,t){var r={},o=t[e.subplot]._subplot,a,n;o?(a=o.radialAxis,n=o.angularAxis):(o=t[e.subplot],a=o.radialaxis,n=o.angularaxis);var i=a.c2l(E.r);r.rLabel=x.tickText(a,i,!0).text;var s=n.thetaunit==="degrees"?v.rad2deg(E.theta):E.theta;return r.thetaLabel=x.tickText(n,s,!0).text,r}}}),SH=Xe({"src/traces/scatterpolar/calc.js"(Z,G){"use strict";var v=rs(),x=Hs().BADNUM,S=Go(),E=Fd(),e=Av(),t=Od(),r=Bd().calcMarkerSize;G.exports=function(a,n){for(var i=a._fullLayout,s=n.subplot,h=i[s].radialaxis,c=i[s].angularaxis,m=h.makeCalcdata(n,"r"),p=c.makeCalcdata(n,"theta"),T=n._length,l=new Array(T),_=0;_<T;_++){var w=m[_],A=p[_],M=l[_]={};v(w)&&v(A)?(M.r=w,M.theta=A):M.r=x}var g=r(n,T);return n._extremes.x=S.findExtremes(h,m,{ppad:g}),E(a,n),e(l,n),t(l,n),l}}}),MH=Xe({"src/traces/scatterpolar/plot.js"(Z,G){"use strict";var v=s1(),x=Hs().BADNUM;G.exports=function(E,e,t){for(var r=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,a=e.yaxis,n={xaxis:o,yaxis:a,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},i=e.radialAxis,s=e.angularAxis,h=0;h<t.length;h++)for(var c=t[h],m=0;m<c.length;m++){m===0&&(c[0].trace._xA=o,c[0].trace._yA=a);var p=c[m],T=p.r;if(T===x)p.x=p.y=x;else{var l=i.c2g(T),_=s.c2g(p.theta);p.x=l*Math.cos(_),p.y=l*Math.sin(_)}}v(E,n,t,r)}}}),NT=Xe({"src/traces/scatterpolar/hover.js"(Z,G){"use strict";var v=u1();function x(E,e,t,r){var o=v(E,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var n=E.subplot,i=a.cd[a.index],s=a.trace;if(n.isPtInside(i))return a.xLabelVal=void 0,a.yLabelVal=void 0,S(i,s,n,a),a.hovertemplate=s.hovertemplate,o}}function S(E,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="r",a._hovertitle="\u03B8";var n={};n[e.subplot]={_subplot:t};var i=e._module.formatLabels(E,e,n);r.rLabel=i.rLabel,r.thetaLabel=i.thetaLabel;var s=E.hi||e.hoverinfo,h=[];function c(p,T){h.push(p._hovertitle+": "+T)}if(!e.hovertemplate){var m=s.split("+");m.indexOf("all")!==-1&&(m=["r","theta","text"]),m.indexOf("r")!==-1&&c(o,r.rLabel),m.indexOf("theta")!==-1&&c(a,r.thetaLabel),m.indexOf("text")!==-1&&r.text&&(h.push(r.text),delete r.text),r.extraText=h.join("<br>")}}G.exports={hoverPoints:x,makeHoverPointText:S}}}),EH=Xe({"src/traces/scatterpolar/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:FT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:Cx(),supplyDefaults:OT().supplyDefaults,colorbar:pp(),formatLabels:BT(),calc:SH(),plot:MH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),kH=Xe({"lib/scatterpolar.js"(Z,G){"use strict";G.exports=EH()}}),lk=Xe({"src/traces/scatterpolargl/attributes.js"(Z,G){"use strict";var v=Cx(),{cliponaxis:x,hoveron:S}=v,E=Qs(v,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:n,marker:i,textfont:s,textposition:h}=xx();G.exports=ds(To({},E),{connectgaps:e,fill:a,fillcolor:n,line:{color:t,dash:r,editType:"calc",width:o},marker:i,textfont:s,textposition:h})}}),CH=Xe({"src/traces/scatterpolargl/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=OT().handleRThetaDefaults,E=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=lk();G.exports=function(i,s,h,c){function m(T,l){return v.coerce(i,s,a,T,l)}var p=S(i,s,c,m);if(!p){s.visible=!1;return}m("thetaunit"),m("mode",p<o?"lines+markers":"lines"),m("text"),m("hovertext"),s.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),x.hasMarkers(s)&&E(i,s,h,c,m,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),x.hasLines(s)&&(e(i,s,h,c,m),m("connectgaps")),x.hasText(s)&&(m("texttemplate"),m("texttemplatefallback"),t(i,s,c,m,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),m("fill"),s.fill!=="none"&&r(i,s,h,m),v.coerceSelectionMarkerOpacity(s,m)}}}),LH=Xe({"src/traces/scatterpolargl/format_labels.js"(Z,G){"use strict";var v=BT();G.exports=function(S,E,e){var t=S.i;return"r"in S||(S.r=E._r[t]),"theta"in S||(S.theta=E._theta[t]),v(S,E,e)}}}),PH=Xe({"src/traces/scatterpolargl/calc.js"(Z,G){"use strict";var v=Fd(),x=Bd().calcMarkerSize,S=yg(),E=Go(),e=y0().TOO_MANY_POINTS;G.exports=function(r,o){var a=r._fullLayout,n=o.subplot,i=a[n].radialaxis,s=a[n].angularaxis,h=o._r=i.makeCalcdata(o,"r"),c=o._theta=s.makeCalcdata(o,"theta"),m=o._length,p={};m<h.length&&(h=h.slice(0,m)),m<c.length&&(c=c.slice(0,m)),p.r=h,p.theta=c,v(r,o);var T=p.opts=S.style(r,o),l;return m<e?l=x(o,m):T.marker&&(l=2*(T.marker.sizeAvg||Math.max(T.marker.size,3))),o._extremes.x=E.findExtremes(i,h,{ppad:l}),[{x:!1,y:!1,t:p,trace:o}]}}}),IH=Xe({"src/traces/scatterpolargl/hover.js"(Z,G){"use strict";var v=pT(),x=NT().makeHoverPointText;function S(E,e,t,r){var o=E.cd,a=o[0].t,n=a.r,i=a.theta,s=v.hoverPoints(E,e,t,r);if(!(!s||s[0].index===!1)){var h=s[0];if(h.index===void 0)return s;var c=E.subplot,m=h.cd[h.index],p=h.trace;if(m.r=n[h.index],m.theta=i[h.index],!!c.isPtInside(m))return h.xLabelVal=void 0,h.yLabelVal=void 0,x(m,p,c,h),s}}G.exports={hoverPoints:S}}}),RH=Xe({"src/traces/scatterpolargl/base_index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:FT(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:lk(),supplyDefaults:CH(),colorbar:pp(),formatLabels:LH(),calc:PH(),hoverPoints:IH().hoverPoints,selectPoints:VE(),meta:{}}}}),DH=Xe({"src/traces/scatterpolargl/plot.js"(Z,G){"use strict";var v=vT(),x=rs(),S=p6(),E=jE(),e=yg(),t=sa(),r=y0().TOO_MANY_POINTS,o={};G.exports=function(n,i,s){if(s.length){var h=i.radialAxis,c=i.angularAxis,m=E(n,i);return s.forEach(function(p){if(!(!p||!p[0]||!p[0].trace)){var T=p[0],l=T.trace,_=T.t,w=l._length,A=_.r,M=_.theta,g=_.opts,b,d=A.slice(),u=M.slice();for(b=0;b<A.length;b++)i.isPtInside({r:A[b],theta:M[b]})||(d[b]=NaN,u[b]=NaN);var y=new Array(w*2),f=Array(w),R=Array(w);for(b=0;b<w;b++){var L=d[b],z,F;if(x(L)){var N=h.c2g(L),O=c.c2g(u[b],l.thetaunit);z=N*Math.cos(O),F=N*Math.sin(O)}else z=F=NaN;f[b]=y[b*2]=z,R[b]=y[b*2+1]=F}_.tree=v(y),g.marker&&w>=r&&(g.marker.cluster=_.tree),g.marker&&(g.markerSel.positions=g.markerUnsel.positions=g.marker.positions=y),g.line&&y.length>1&&t.extendFlat(g.line,e.linePositions(n,l,y)),g.text&&(t.extendFlat(g.text,{positions:y},e.textPosition(n,l,g.text,g.marker)),t.extendFlat(g.textSel,{positions:y},e.textPosition(n,l,g.text,g.markerSel)),t.extendFlat(g.textUnsel,{positions:y},e.textPosition(n,l,g.text,g.markerUnsel))),g.fill&&!m.fill2d&&(m.fill2d=!0),g.marker&&!m.scatter2d&&(m.scatter2d=!0),g.line&&!m.line2d&&(m.line2d=!0),g.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(g.line),m.fillOptions.push(g.fill),m.markerOptions.push(g.marker),m.markerSelectedOptions.push(g.markerSel),m.markerUnselectedOptions.push(g.markerUnsel),m.textOptions.push(g.text),m.textSelectedOptions.push(g.textSel),m.textUnselectedOptions.push(g.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),_.x=f,_.y=R,_.rawx=f,_.rawy=R,_.r=A,_.theta=M,_.positions=y,_._scene=m,_.index=m.count,m.count++}}),S(n,i,s)}},G.exports.reglPrecompiled=o}}),zH=Xe({"src/traces/scatterpolargl/index.js"(Z,G){"use strict";var v=RH();v.plot=DH(),G.exports=v}}),FH=Xe({"lib/scatterpolargl.js"(Z,G){"use strict";G.exports=zH()}}),uk=Xe({"src/traces/barpolar/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:x}=Jl(),S=Qo().extendFlat,E=Cx(),e=Sv();G.exports={r:E.r,theta:E.theta,r0:E.r0,dr:E.dr,theta0:E.theta0,dtheta:E.dtheta,thetaunit:E.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:E.hoverinfo,hovertemplate:v(),hovertemplatefallback:x(),selected:e.selected,unselected:e.unselected};function t(){var r=S({},e.marker);return delete r.cornerradius,r}}}),ck=Xe({"src/traces/barpolar/layout_attributes.js"(Z,G){"use strict";G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),OH=Xe({"src/traces/barpolar/defaults.js"(Z,G){"use strict";var v=sa(),x=OT().handleRThetaDefaults,S=j2(),E=uk();G.exports=function(t,r,o,a){function n(s,h){return v.coerce(t,r,E,s,h)}var i=x(t,r,a,n);if(!i){r.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),S(t,r,n,o,a),v.coerceSelectionMarkerOpacity(r,n)}}}),BH=Xe({"src/traces/barpolar/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=ck();G.exports=function(S,E,e){var t={},r;function o(i,s){return v.coerce(S[r]||{},E[r],x,i,s)}for(var a=0;a<e.length;a++){var n=e[a];n.type==="barpolar"&&n.visible===!0&&(r=n.subplot,t[r]||(o("barmode"),o("bargap"),t[r]=1))}}}}),fk=Xe({"src/traces/barpolar/calc.js"(Z,G){"use strict";var v=wp().hasColorscale,x=Tp(),S=sa().isArrayOrTypedArray,E=B_(),e=eg().setGroupPositions,t=Od(),r=so().traceIs,o=sa().extendFlat;function a(i,s){for(var h=i._fullLayout,c=s.subplot,m=h[c].radialaxis,p=h[c].angularaxis,T=m.makeCalcdata(s,"r"),l=p.makeCalcdata(s,"theta"),_=s._length,w=new Array(_),A=T,M=l,g=0;g<_;g++)w[g]={p:M[g],s:A[g]};function b(d){var u=s[d];u!==void 0&&(s["_"+d]=S(u)?p.makeCalcdata(s,d):p.d2c(u,s.thetaunit))}return p.type==="linear"&&(b("width"),b("offset")),v(s,"marker")&&x(i,s,{vals:s.marker.color,containerStr:"marker",cLetter:"c"}),v(s,"marker.line")&&x(i,s,{vals:s.marker.line.color,containerStr:"marker.line",cLetter:"c"}),E(w,s),t(w,s),w}function n(i,s,h){for(var c=i.calcdata,m=[],p=0;p<c.length;p++){var T=c[p],l=T[0].trace;l.visible===!0&&r(l,"bar")&&l.subplot===h&&m.push(T)}var _=o({},s.radialaxis,{_id:"x"}),w=s.angularaxis;e(i,w,_,m,{mode:s.barmode,norm:s.barnorm,gap:s.bargap,groupgap:s.bargroupgap})}G.exports={calc:a,crossTraceCalc:n}}}),NH=Xe({"src/traces/barpolar/plot.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=sa(),E=es(),e=zT();G.exports=function(o,a,n){var i=o._context.staticPlot,s=a.xaxis,h=a.yaxis,c=a.radialAxis,m=a.angularAxis,p=t(a),T=a.layers.frontplot.select("g.barlayer");S.makeTraceGroups(T,n,"trace bars").each(function(){var l=v.select(this),_=S.ensureSingle(l,"g","points"),w=_.selectAll("g.point").data(S.identity);w.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),w.exit().remove(),w.each(function(A){var M=v.select(this),g=A.rp0=c.c2p(A.s0),b=A.rp1=c.c2p(A.s1),d=A.thetag0=m.c2g(A.p0),u=A.thetag1=m.c2g(A.p1),y;if(!x(g)||!x(b)||!x(d)||!x(u)||g===b||d===u)y="M0,0Z";else{var f=c.c2g(A.s1),R=(d+u)/2;A.ct=[s.c2p(f*Math.cos(R)),h.c2p(f*Math.sin(R))],y=p(g,b,d,u)}S.ensureSingle(M,"path").attr("d",y)}),E.setClipUrl(l,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,o)})};function t(r){var o=r.cxx,a=r.cyy;return r.vangles?function(n,i,s,h){var c,m;S.angleDelta(s,h)>0?(c=s,m=h):(c=h,m=s);var p=e.findEnclosingVertexAngles(c,r.vangles)[0],T=e.findEnclosingVertexAngles(m,r.vangles)[1],l=[p,(c+m)/2,T];return e.pathPolygonAnnulus(n,i,c,m,l,o,a)}:function(n,i,s,h){return S.pathAnnulus(n,i,s,h,o,a)}}}}),UH=Xe({"src/traces/barpolar/hover.js"(Z,G){"use strict";var v=rf(),x=sa(),S=f1().getTraceColor,E=x.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;G.exports=function(o,a,n){var i=o.cd,s=i[0].trace,h=o.subplot,c=h.radialAxis,m=h.angularAxis,p=h.vangles,T=p?t:x.isPtInsideSector,l=o.maxHoverDistance,_=m._period||2*Math.PI,w=Math.abs(c.g2p(Math.sqrt(a*a+n*n))),A=Math.atan2(n,a);c.range[0]>c.range[1]&&(A+=Math.PI);var M=function(u){return T(w,A,[u.rp0,u.rp1],[u.thetag0,u.thetag1],p)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/_)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(v.getClosest(i,M,o),o.index!==!1){var g=o.index,b=i[g];o.x0=o.x1=b.ct[0],o.y0=o.y1=b.ct[1];var d=x.extendFlat({},b,{r:b.s,theta:b.p});return E(b,s,o),e(d,s,h,o),o.hovertemplate=s.hovertemplate,o.color=S(s,b),o.xLabelVal=o.yLabelVal=void 0,b.s<0&&(o.idealAlign="left"),[o]}}}}),jH=Xe({"src/traces/barpolar/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:uk(),layoutAttributes:ck(),supplyDefaults:OH(),supplyLayoutDefaults:BH(),calc:fk().calc,crossTraceCalc:fk().crossTraceCalc,plot:NH(),colorbar:pp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:UH(),selectPoints:h1(),meta:{}}}}),qH=Xe({"lib/barpolar.js"(Z,G){"use strict";G.exports=jH()}}),hk=Xe({"src/plots/smith/constants.js"(Z,G){"use strict";G.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),pk=Xe({"src/plots/smith/layout_attributes.js"(Z,G){"use strict";var v=sh(),x=Wh(),S=wc().attributes,E=sa().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:E({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:E({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({ticklen:x.ticklen,tickwidth:E({},x.tickwidth,{dflt:2}),tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,tickfont:x.tickfont,tickformat:x.tickformat,hoverformat:x.hoverformat,layer:x.layer},"plot","from-root"),o=E({visible:E({},x.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:E({},x.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},t,r),a=E({visible:E({},x.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:x.ticks,editType:"calc"},t,r);G.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),VH=Xe({"src/plots/smith/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=zl(),E=o0(),e=Hh().getSubplotData,t=e0(),r=Qm(),o=z_(),a=wv(),n=pk(),i=hk(),s=i.axisNames,h=m(function(p){return v.isTypedArray(p)&&(p=Array.from(p)),p.slice().reverse().map(function(T){return-T}).concat([0]).concat(p)},String);function c(p,T,l,_){var w=l("bgcolor");_.bgColor=x.combine(w,_.paper_bgcolor);var A=e(_.fullData,i.name,_.id),M=_.layoutOut,g;function b(B,X){return l(g+"."+B,X)}for(var d=0;d<s.length;d++){g=s[d],v.isPlainObject(p[g])||(p[g]={});var u=p[g],y=S.newContainer(T,g);y._id=y._name=g,y._attr=_.id+"."+g,y._traceIndices=A.map(function(B){return B.index});var f=b("visible");if(y.type="linear",a(y,M),t(u,y,b,y.type),f){var R=g==="realaxis";if(R&&b("side"),R)b("tickvals");else{var L=h(T.realaxis.tickvals||n.realaxis.tickvals.dflt);b("tickvals",L)}v.isTypedArray(y.tickvals)&&(y.tickvals=Array.from(y.tickvals));var z,F,N,O,P=_.font||{};f&&(z=b("color"),F=z===u.color?z:P.color,N=P.size,O=P.family),r(u,y,b,y.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!R,noExp:!0,font:{color:F,size:N,family:O}}),v.coerce2(p,T,n,g+".ticklen"),v.coerce2(p,T,n,g+".tickwidth"),v.coerce2(p,T,n,g+".tickcolor",T.color);var U=b("ticks");U||(delete T[g].ticklen,delete T[g].tickwidth,delete T[g].tickcolor),o(u,y,b,{dfltColor:z,bgColor:_.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n[g]}),b("layer")}b("hoverformat"),delete y.type,y._input=u}}G.exports=function(T,l,_){E(T,l,_,{noUirevision:!0,type:i.name,attributes:n,handleDefaults:c,font:l.font,paper_bgcolor:l.paper_bgcolor,fullData:_,layoutOut:l})};function m(p,T){var l={};return function(_){var w=T?T(_):_;if(w in l)return l[w];var A=p(_);return l[w]=A,A}}}}),GH=Xe({"src/plots/smith/index.js"(Z,G){"use strict";var v=Hh().getSubplotCalcData,x=sa().counterRegex,S=ok(),E=hk(),e=E.attr,t=E.name,r=x(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(i){for(var s=i._fullLayout,h=i.calcdata,c=s._subplots[t],m=0;m<c.length;m++){var p=c[m],T=v(h,t,p),l=s[p]._subplot;l||(l=S(i,p,!0),s[p]._subplot=l),l.plot(T,s,i._promises)}}function n(i,s,h,c){for(var m=c._subplots[t]||[],p=0;p<m.length;p++){var T=m[p],l=c[T]._subplot;if(!s[T]&&l){l.framework.remove();for(var _ in l.clipPaths)l.clipPaths[_].remove()}}}G.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:pk(),supplyLayoutDefaults:VH(),plot:a,clean:n,toSVG:Kf().toSVG}}}),dk=Xe({"src/traces/scattersmith/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=Qo().extendFlat,e=$d(),t=af(),r=ru(),o=t.line;G.exports={mode:t.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:t.text,texttemplate:x({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:E({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,marker:t.marker,cliponaxis:E({},t.cliponaxis,{dflt:!1}),textposition:t.textposition,textfont:t.textfont,fill:E({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:e(),hoverinfo:E({},r.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:t.hoveron,hovertemplate:v(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),HH=Xe({"src/traces/scattersmith/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=md(),E=Dd(),e=o1(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=dk();G.exports=function(s,h,c,m){function p(_,w){return v.coerce(s,h,a,_,w)}var T=n(s,h,m,p);if(!T){h.visible=!1;return}p("mode",T<o?"lines+markers":"lines"),p("text"),p("hovertext"),h.hoveron!=="fills"&&(p("hovertemplate"),p("hovertemplatefallback")),x.hasMarkers(h)&&S(s,h,c,m,p,{gradient:!0}),x.hasLines(h)&&(E(s,h,c,m,p,{backoff:!0}),e(s,h,p),p("connectgaps")),x.hasText(h)&&(p("texttemplate"),p("texttemplatefallback"),t(s,h,m,p));var l=[];(x.hasMarkers(h)||x.hasText(h))&&(p("cliponaxis"),p("marker.maxdisplayed"),l.push("points")),p("fill"),h.fill!=="none"&&(r(s,h,c,p),x.hasLines(h)||e(s,h,p)),(h.fill==="tonext"||h.fill==="toself")&&l.push("fills"),p("hoveron",l.join("+")||"points"),v.coerceSelectionMarkerOpacity(h,p)};function n(i,s,h,c){var m=c("real"),p=c("imag"),T;return m&&p&&(T=Math.min(m.length,p.length)),v.isTypedArray(m)&&(s.real=m=Array.from(m)),v.isTypedArray(p)&&(s.imag=p=Array.from(p)),s._length=T,T}}}),WH=Xe({"src/traces/scattersmith/format_labels.js"(Z,G){"use strict";var v=Go();G.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot;return t.realLabel=v.tickText(r.radialAxis,S.real,!0).text,t.imagLabel=v.tickText(r.angularAxis,S.imag,!0).text,t}}}),XH=Xe({"src/traces/scattersmith/calc.js"(Z,G){"use strict";var v=rs(),x=Hs().BADNUM,S=Fd(),E=Av(),e=Od(),t=Bd().calcMarkerSize;G.exports=function(o,a){for(var n=o._fullLayout,i=a.subplot,s=n[i].realaxis,h=n[i].imaginaryaxis,c=s.makeCalcdata(a,"real"),m=h.makeCalcdata(a,"imag"),p=a._length,T=new Array(p),l=0;l<p;l++){var _=c[l],w=m[l],A=T[l]={};v(_)&&v(w)?(A.real=_,A.imag=w):A.real=x}return t(a,p),S(o,a),E(T,a),e(T,a),T}}}),ZH=Xe({"src/traces/scattersmith/plot.js"(Z,G){"use strict";var v=s1(),x=Hs().BADNUM,S=nk(),E=S.smith;G.exports=function(t,r,o){for(var a=r.layers.frontplot.select("g.scatterlayer"),n=r.xaxis,i=r.yaxis,s={xaxis:n,yaxis:i,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},h=0;h<o.length;h++)for(var c=o[h],m=0;m<c.length;m++){m===0&&(c[0].trace._xA=n,c[0].trace._yA=i);var p=c[m],T=p.real;if(T===x)p.x=p.y=x;else{var l=E([T,p.imag]);p.x=l[0],p.y=l[1]}}v(t,s,o,a)}}}),YH=Xe({"src/traces/scattersmith/hover.js"(Z,G){"use strict";var v=u1();function x(E,e,t,r){var o=v(E,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var n=E.subplot,i=a.cd[a.index],s=a.trace;if(n.isPtInside(i))return a.xLabelVal=void 0,a.yLabelVal=void 0,S(i,s,n,a),a.hovertemplate=s.hovertemplate,o}}function S(E,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="real",a._hovertitle="imag";var n={};n[e.subplot]={_subplot:t};var i=e._module.formatLabels(E,e,n);r.realLabel=i.realLabel,r.imagLabel=i.imagLabel;var s=E.hi||e.hoverinfo,h=[];function c(p,T){h.push(p._hovertitle+": "+T)}if(!e.hovertemplate){var m=s.split("+");m.indexOf("all")!==-1&&(m=["real","imag","text"]),m.indexOf("real")!==-1&&c(o,r.realLabel),m.indexOf("imag")!==-1&&c(a,r.imagLabel),m.indexOf("text")!==-1&&r.text&&(h.push(r.text),delete r.text),r.extraText=h.join("<br>")}}G.exports={hoverPoints:x,makeHoverPointText:S}}}),KH=Xe({"src/traces/scattersmith/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"scattersmith",basePlotModule:GH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:dk(),supplyDefaults:HH(),colorbar:pp(),formatLabels:WH(),calc:XH(),plot:ZH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:YH().hoverPoints,selectPoints:c1(),meta:{}}}}),JH=Xe({"lib/scattersmith.js"(Z,G){"use strict";G.exports=KH()}}),Mp=Xe({"node_modules/world-calendars/dist/main.js"(Z,G){var v=ch();function x(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}v(x.prototype,{instance:function(o,a){o=(o||"gregorian").toLowerCase(),a=a||"";var n=this._localCals[o+"-"+a];if(!n&&this.calendars[o]&&(n=new this.calendars[o](a),this._localCals[o+"-"+a]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return n},newDate:function(o,a,n,i,s){return i=(o!=null&&o.year?o.calendar():typeof i=="string"?this.instance(i,s):i)||this.instance(),i.newDate(o,a,n)},substituteDigits:function(o){return function(a){return(a+"").replace(/[0-9]/g,function(n){return o[n]})}},substituteChineseDigits:function(o,a){return function(n){for(var i="",s=0;n>0;){var h=n%10;i=(h===0?"":o[h]+a[s])+i,s++,n=Math.floor(n/10)}return i.indexOf(o[1]+a[1])===0&&(i=i.substr(1)),i||o[0]}}});function S(o,a,n,i){if(this._calendar=o,this._year=a,this._month=n,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function E(o,a){return o=""+o,"000000".substring(0,a-o.length)+o}v(S.prototype,{newDate:function(o,a,n){return this._calendar.newDate(o??this,a,n)},year:function(o){return arguments.length===0?this._year:this.set(o,"y")},month:function(o){return arguments.length===0?this._month:this.set(o,"m")},day:function(o){return arguments.length===0?this._day:this.set(o,"d")},date:function(o,a,n){if(!this._calendar.isValid(o,a,n))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=a,this._day=n,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(o,a){return this._calendar.add(this,o,a)},set:function(o,a){return this._calendar.set(this,o,a)},compareTo:function(o){if(this._calendar.name!==o._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,o._calendar.local.name);var a=this._year!==o._year?this._year-o._year:this._month!==o._month?this.monthOfYear()-o.monthOfYear():this._day-o._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(o){return this._calendar.fromJD(o)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(o){return this._calendar.fromJSDate(o)},toString:function(){return(this.year()<0?"-":"")+E(Math.abs(this.year()),4)+"-"+E(this.month(),2)+"-"+E(this.day(),2)}});function e(){this.shortYearCutoff="+10"}v(e.prototype,{_validateLevel:0,newDate:function(o,a,n){return o==null?this.today():(o.year&&(this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),n=o.day(),a=o.month(),o=o.year()),new S(this,o,a,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return a.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+E(Math.abs(a.year()),4)},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(o,a){var n=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(o,a){var n=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,n,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),n},daysInYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(o,a,n){return this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(o,a,n){return this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,a,n),a,n)},_add:function(o,a,n){if(this._validateLevel++,n==="d"||n==="w"){var i=o.toJD()+a*(n==="w"?this.daysInWeek():1),s=o.calendar().fromJD(i);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var h=o.year()+(n==="y"?a:0),c=o.monthOfYear()+(n==="m"?a:0),s=o.day(),m=function(l){for(;c<l.minMonth;)h--,c+=l.monthsInYear(h);for(var _=l.monthsInYear(h);c>_-1+l.minMonth;)h++,c-=_,_=l.monthsInYear(h)};n==="y"?(o.month()!==this.fromMonthOfYear(h,c)&&(c=this.newDate(h,o.month(),this.minDay).monthOfYear()),c=Math.min(c,this.monthsInYear(h)),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,c)))):n==="m"&&(m(this),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,c))));var p=[h,this.fromMonthOfYear(h,c),s];return this._validateLevel--,p}catch(T){throw this._validateLevel--,T}},_correctAdd:function(o,a,n,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(a[0]===0||o.year()>0!=a[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],h=n<0?-1:1;a=this._add(o,n*s[0]+h*s[1],s[2])}return o.date(a[0],a[1],a[2])},set:function(o,a,n){this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var i=n==="y"?a:o.year(),s=n==="m"?a:o.month(),h=n==="d"?a:o.day();return(n==="y"||n==="m")&&(h=Math.min(h,this.daysInMonth(i,s))),o.date(i,s,h)},isValid:function(o,a,n){this._validateLevel++;var i=this.hasYearZero||o!==0;if(i){var s=this.newDate(o,a,this.minDay);i=a>=this.minMonth&&a-this.minMonth<this.monthsInYear(s)&&n>=this.minDay&&n-this.minDay<this.daysInMonth(s)}return this._validateLevel--,i},toJSDate:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return r.instance().fromJD(this.toJD(i)).toJSDate()},fromJSDate:function(o){return this.fromJD(r.instance().fromJSDate(o).toJD())},_validate:function(o,a,n,i){if(o.year){if(this._validateLevel===0&&this.name!==o.calendar().name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,o.calendar().local.name);return o}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(o,a,n))throw i.replace(/\{0\}/,this.local.name);var s=this.newDate(o,a,n);return this._validateLevel--,s}catch(h){throw this._validateLevel--,h}}});function t(o){this.local=this.regionalOptions[o]||this.regionalOptions[""]}t.prototype=new e,v(t.prototype,{name:"Gregorian",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(n){var a=this._validate(n,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),n=a.year()+(a.year()<0?1:0);return n%4===0&&(n%100!==0||n%400===0)},weekOfYear:function(o,a,n){var i=this.newDate(o,a,n);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(o,a){var n=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===2&&this.leapYear(n.year())?1:0)},weekDay:function(o,a,n){return(this.dayOfWeek(o,a,n)||7)<6},toJD:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);o=i.year(),a=i.month(),n=i.day(),o<0&&o++,a<3&&(a+=12,o--);var s=Math.floor(o/100),h=2-s+Math.floor(s/4);return Math.floor(365.25*(o+4716))+Math.floor(30.6001*(a+1))+n+h-1524.5},fromJD:function(o){var a=Math.floor(o+.5),n=Math.floor((a-186721625e-2)/36524.25);n=a+1+n-Math.floor(n/4);var i=n+1524,s=Math.floor((i-122.1)/365.25),h=Math.floor(365.25*s),c=Math.floor((i-h)/30.6001),m=i-h-Math.floor(c*30.6001),p=c-(c>13.5?13:1),T=s-(p>2.5?4716:4715);return T<=0&&T--,this.newDate(T,p,m)},toJSDate:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(i.year(),i.month()-1,i.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(o){return this.newDate(o.getFullYear(),o.getMonth()+1,o.getDate())}});var r=G.exports=new x;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),$H=Xe({"node_modules/world-calendars/dist/plus.js"(){var Z=ch(),G=Mp();Z(G.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),G.local=G.regionalOptions[""],Z(G.cdate.prototype,{formatDate:function(v,x){return typeof v!="string"&&(x=v,v=""),this._calendar.formatDate(v||"",this,x)}}),Z(G.baseCalendar.prototype,{UNIX_EPOCH:G.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:G.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(v,x,S){if(typeof v!="string"&&(S=x,x=v,v=""),!x)return"";if(x.calendar()!==this)throw G.local.invalidFormat||G.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,S=S||{};for(var E=S.dayNamesShort||this.local.dayNamesShort,e=S.dayNames||this.local.dayNames,t=S.monthNumbers||this.local.monthNumbers,r=S.monthNamesShort||this.local.monthNamesShort,o=S.monthNames||this.local.monthNames,a=S.calculateWeek||this.local.calculateWeek,n=function(A,M){for(var g=1;w+g<v.length&&v.charAt(w+g)===A;)g++;return w+=g-1,Math.floor(g/(M||1))>1},i=function(A,M,g,b){var d=""+M;if(n(A,b))for(;d.length<g;)d="0"+d;return d},s=function(A,M,g,b){return n(A)?b[M]:g[M]},h=this,c=function(A){return typeof t=="function"?t.call(h,A,n("m")):T(i("m",A.month(),2))},m=function(A,M){return M?typeof o=="function"?o.call(h,A):o[A.month()-h.minMonth]:typeof r=="function"?r.call(h,A):r[A.month()-h.minMonth]},p=this.local.digits,T=function(A){return S.localNumbers&&p?p(A):A},l="",_=!1,w=0;w<v.length;w++)if(_)v.charAt(w)==="'"&&!n("'")?_=!1:l+=v.charAt(w);else switch(v.charAt(w)){case"d":l+=T(i("d",x.day(),2));break;case"D":l+=s("D",x.dayOfWeek(),E,e);break;case"o":l+=i("o",x.dayOfYear(),3);break;case"w":l+=i("w",x.weekOfYear(),2);break;case"m":l+=c(x);break;case"M":l+=m(x,n("M"));break;case"y":l+=n("y",2)?x.year():(x.year()%100<10?"0":"")+x.year()%100;break;case"Y":n("Y",2),l+=x.formatYear();break;case"J":l+=x.toJD();break;case"@":l+=(x.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":l+=(x.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":n("'")?l+="'":_=!0;break;default:l+=v.charAt(w)}return l},parseDate:function(v,x,S){if(x==null)throw G.local.invalidArguments||G.regionalOptions[""].invalidArguments;if(x=typeof x=="object"?x.toString():x+"",x==="")return null;v=v||this.local.dateFormat,S=S||{};var E=S.shortYearCutoff||this.shortYearCutoff;E=typeof E!="string"?E:this.today().year()%100+parseInt(E,10);for(var e=S.dayNamesShort||this.local.dayNamesShort,t=S.dayNames||this.local.dayNames,r=S.parseMonth||this.local.parseMonth,o=S.monthNumbers||this.local.monthNumbers,a=S.monthNamesShort||this.local.monthNamesShort,n=S.monthNames||this.local.monthNames,i=-1,s=-1,h=-1,c=-1,m=-1,p=!1,T=!1,l=function(R,L){for(var z=1;u+z<v.length&&v.charAt(u+z)===R;)z++;return u+=z-1,Math.floor(z/(L||1))>1},_=function(R,L){var z=l(R,L),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],N=new RegExp("^-?\\d{1,"+F+"}"),O=x.substring(d).match(N);if(!O)throw(G.local.missingNumberAt||G.regionalOptions[""].missingNumberAt).replace(/\{0\}/,d);return d+=O[0].length,parseInt(O[0],10)},w=this,A=function(){if(typeof o=="function"){l("m");var R=o.call(w,x.substring(d));return d+=R.length,R}return _("m")},M=function(R,L,z,F){for(var N=l(R,F)?z:L,O=0;O<N.length;O++)if(x.substr(d,N[O].length).toLowerCase()===N[O].toLowerCase())return d+=N[O].length,O+w.minMonth;throw(G.local.unknownNameAt||G.regionalOptions[""].unknownNameAt).replace(/\{0\}/,d)},g=function(){if(typeof n=="function"){var R=l("M")?n.call(w,x.substring(d)):a.call(w,x.substring(d));return d+=R.length,R}return M("M",a,n)},b=function(){if(x.charAt(d)!==v.charAt(u))throw(G.local.unexpectedLiteralAt||G.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,d);d++},d=0,u=0;u<v.length;u++)if(T)v.charAt(u)==="'"&&!l("'")?T=!1:b();else switch(v.charAt(u)){case"d":c=_("d");break;case"D":M("D",e,t);break;case"o":m=_("o");break;case"w":_("w");break;case"m":h=A();break;case"M":h=g();break;case"y":var y=u;p=!l("y",2),u=y,s=_("y",2);break;case"Y":s=_("Y",2);break;case"J":i=_("J")+.5,x.charAt(d)==="."&&(d++,_("J"));break;case"@":i=_("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":i=_("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":d=x.length;break;case"'":l("'")?b():T=!0;break;default:b()}if(d<x.length)throw G.local.unexpectedText||G.regionalOptions[""].unexpectedText;if(s===-1?s=this.today().year():s<100&&p&&(s+=E===-1?1900:this.today().year()-this.today().year()%100-(s<=E?0:100)),typeof h=="string"&&(h=r.call(this,s,h)),m>-1){h=1,c=m;for(var f=this.daysInMonth(s,h);c>f;f=this.daysInMonth(s,h))h++,c-=f}return i>-1?this.fromJD(i):this.newDate(s,h,c)},determineDate:function(v,x,S,E,e){S&&typeof S!="object"&&(e=E,E=S,S=null),typeof E!="string"&&(e=E,E="");var t=this,r=function(o){try{return t.parseDate(E,o,e)}catch{}o=o.toLowerCase();for(var a=(o.match(/^c/)&&S?S.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=n.exec(o);i;)a.add(parseInt(i[1],10),i[2]||"d"),i=n.exec(o);return a};return x=x?x.newDate():null,v=v==null?x:typeof v=="string"?r(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?x:t.today().add(v,"d"):t.newDate(v),v}})}}),QH=Xe({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Mp(),G=ch(),v=Z.instance();function x(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,G(x.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,s){if(typeof i=="string"){var h=i.match(E);return h?h[0]:""}var c=this._validateYear(i),m=i.month(),p=""+this.toChineseMonth(c,m);return s&&p.length<2&&(p="0"+p),this.isIntercalaryMonth(c,m)&&(p+="i"),p},monthNames:function(i){if(typeof i=="string"){var s=i.match(e);return s?s[0]:""}var h=this._validateYear(i),c=i.month(),m=this.toChineseMonth(h,c),p=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][m-1];return this.isIntercalaryMonth(h,c)&&(p="\u95F0"+p),p},monthNamesShort:function(i){if(typeof i=="string"){var s=i.match(t);return s?s[0]:""}var h=this._validateYear(i),c=i.month(),m=this.toChineseMonth(h,c),p=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][m-1];return this.isIntercalaryMonth(h,c)&&(p="\u95F0"+p),p},parseMonth:function(i,s){i=this._validateYear(i);var h=parseInt(s),c;if(isNaN(h))s[0]==="\u95F0"&&(c=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),h=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var m=s[s.length-1];c=m==="i"||m==="I"}var p=this.toMonthIndex(i,h,c);return p},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(i,s){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw s.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,s,h){var c=this.intercalaryMonth(i),m=h&&s!==c;if(m||s<1||s>12)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var p;return c?!h&&s<=c?p=s-1:p=s:p=s-1,p},toChineseMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var h=this.intercalaryMonth(i),c=h?12:11;if(s<0||s>c)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return h?s<h?m=s+1:m=s:m=s+1,m},intercalaryMonth:function(i){i=this._validateYear(i);var s=r[i-r[0]],h=s>>13;return h},isIntercalaryMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var h=this.intercalaryMonth(i);return!!h&&h===s},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,s,h){var c=this._validateYear(i,Z.local.invalidyear),m=o[c-o[0]],p=m>>9&4095,T=m>>5&15,l=m&31,_;_=v.newDate(p,T,l),_.add(4-(_.dayOfWeek()||7),"d");var w=this.toJD(i,s,h)-_.toJD();return 1+Math.floor(w/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,s){i.year&&(s=i.month(),i=i.year()),i=this._validateYear(i);var h=r[i-r[0]],c=h>>13,m=c?12:11;if(s>m)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var p=h&1<<12-s?30:29;return p},weekDay:function(i,s,h){return(this.dayOfWeek(i,s,h)||7)<6},toJD:function(i,s,h){var c=this._validate(i,p,h,Z.local.invalidDate);i=this._validateYear(c.year()),s=c.month(),h=c.day();var m=this.isIntercalaryMonth(i,s),p=this.toChineseMonth(i,s),T=n(i,p,h,m);return v.toJD(T.year,T.month,T.day)},fromJD:function(i){var s=v.fromJD(i),h=a(s.year(),s.month(),s.day()),c=this.toMonthIndex(h.year,h.month,h.isIntercalary);return this.newDate(h.year,c,h.day)},fromString:function(i){var s=i.match(S),h=this._validateYear(+s[1]),c=+s[2],m=!!s[3],p=this.toMonthIndex(h,c,m),T=+s[4];return this.newDate(h,p,T)},add:function(i,s,h){var c=i.year(),m=i.month(),p=this.isIntercalaryMonth(c,m),T=this.toChineseMonth(c,m),l=Object.getPrototypeOf(x.prototype).add.call(this,i,s,h);if(h==="y"){var _=l.year(),w=l.month(),A=this.isIntercalaryMonth(_,T),M=p&&A?this.toMonthIndex(_,T,!0):this.toMonthIndex(_,T,!1);M!==w&&l.month(M)}return l}});var S=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,E=/^\d?\d[iI]?/m,e=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;Z.calendars.chinese=x;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],o=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function a(i,s,h,c){var m,p;if(typeof i=="object")m=i,p=s||{};else{var T=typeof i=="number"&&i>=1888&&i<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var l=typeof s=="number"&&s>=1&&s<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var _=typeof h=="number"&&h>=1&&h<=31;if(!_)throw new Error("Solar day outside range 1 - 31");m={year:i,month:s,day:h},p=c||{}}var w=o[m.year-o[0]],A=m.year<<9|m.month<<5|m.day;p.year=A>=w?m.year:m.year-1,w=o[p.year-o[0]];var M=w>>9&4095,g=w>>5&15,b=w&31,d,u=new Date(M,g-1,b),y=new Date(m.year,m.month-1,m.day);d=Math.round((y-u)/(24*3600*1e3));var f=r[p.year-r[0]],R;for(R=0;R<13;R++){var L=f&1<<12-R?30:29;if(d<L)break;d-=L}var z=f>>13;return!z||R<z?(p.isIntercalary=!1,p.month=1+R):R===z?(p.isIntercalary=!0,p.month=R):(p.isIntercalary=!1,p.month=R),p.day=1+d,p}function n(i,s,h,c,m){var p,T;if(typeof i=="object")T=i,p=s||{};else{var l=typeof i=="number"&&i>=1888&&i<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var _=typeof s=="number"&&s>=1&&s<=12;if(!_)throw new Error("Lunar month outside range 1 - 12");var w=typeof h=="number"&&h>=1&&h<=30;if(!w)throw new Error("Lunar day outside range 1 - 30");var A;typeof c=="object"?(A=!1,p=c):(A=!!c,p=m||{}),T={year:i,month:s,day:h,isIntercalary:A}}var M;M=T.day-1;var g=r[T.year-r[0]],b=g>>13,d;b&&(T.month>b||T.isIntercalary)?d=T.month:d=T.month-1;for(var u=0;u<d;u++){var y=g&1<<12-u?30:29;M+=y}var f=o[T.year-o[0]],R=f>>9&4095,L=f>>5&15,z=f&31,F=new Date(R,L-1,z+M);return p.year=F.getFullYear(),p.month=1+F.getMonth(),p.day=F.getDate(),p}}}),eW=Xe({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var S=Math.floor(x)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(x)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Z.calendars.coptic=v}}),tW=Xe({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),!1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),13},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),400},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,E,e){var t=this.dayOfWeek(S,E,e);return t>=2&&t<=6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return{century:x[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return S=t.year()+(t.year()<0?1:0),E=t.month(),e=t.day(),e+(E>1?16:0)+(E>2?(E-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var E=Math.floor(S/400)+1;S-=(E-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(E<=0?E-1:E,e,t)}});var x={20:"Fruitbat",21:"Anchovy"};Z.calendars.discworld=v}}),rW=Xe({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var S=Math.floor(x)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(x)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Z.calendars.ethiopian=v}}),aW=Xe({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this._leapYear(E.year())},_leapYear:function(S){return S=S<0?S+1:S,x(S*7+1,19)<7},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),this._leapYear(S.year?S.year():S)?13:12},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return S=E.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,E){return S.year&&(E=S.month(),S=S.year()),this._validate(S,E,this.minDay,Z.local.invalidMonth),E===12&&this.leapYear(S)||E===8&&x(this.daysInYear(S),10)===5?30:E===9&&x(this.daysInYear(S),10)===3?29:this.daysPerMonth[E-1]},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(E<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a<E;a++)o+=this.daysInMonth(S,a)}else for(var a=7;a<E;a++)o+=this.daysInMonth(S,a);return o},_delay1:function(S){var E=Math.floor((235*S-234)/19),e=12084+13753*E,t=E*29+Math.floor(e/25920);return x(3*(t+1),7)<3&&t++,t},_delay2:function(S){var E=this._delay1(S-1),e=this._delay1(S),t=this._delay1(S+1);return t-e===356?2:e-E===382?1:0},fromJD:function(S){S=Math.floor(S)+.5;for(var E=Math.floor((S-this.jdEpoch)*98496/35975351)-1;S>=this.toJD(E===-1?1:E+1,7,1);)E++;for(var e=S<this.toJD(E,1,1)?7:1;S>this.toJD(E,e,this.daysInMonth(E,e));)e++;var t=S-this.toJD(E,e,1)+1;return this.newDate(E,e,t)}});function x(S,E){return S-E*Math.floor(S/E)}Z.calendars.hebrew=v}}),iW=Xe({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(x){var S=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){return this.leapYear(x)?355:354},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===12&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return this.dayOfWeek(x,S,E)!==5},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),S=e.month(),E=e.day(),x=x<=0?x+1:x,E+Math.ceil(29.5*(S-1))+(x-1)*354+Math.floor((3+11*x)/30)+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var S=Math.floor((30*(x-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var E=Math.min(12,Math.ceil((x-29-this.toJD(S,1,1))/29.5)+1),e=x-this.toJD(S,E,1)+1;return this.newDate(S,E,e)}}),Z.calendars.islamic=v}}),nW=Xe({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()<0?S.year()+1:S.year();return E%4===0},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===2&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),S=e.month(),E=e.day(),x<0&&x++,S<=2&&(x--,S+=12),Math.floor(365.25*(x+4716))+Math.floor(30.6001*(S+1))+E-1524.5},fromJD:function(x){var S=Math.floor(x+.5),E=S+1524,e=Math.floor((E-122.1)/365.25),t=Math.floor(365.25*e),r=Math.floor((E-t)/30.6001),o=r-Math.floor(r<14?1:13),a=e-Math.floor(o>2?4716:4715),n=E-t-Math.floor(30.6001*r);return a<=0&&a--,this.newDate(a,o,n)}}),Z.calendars.julian=v}}),oW=Xe({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Mp(),G=ch();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),!1},formatYear:function(E){var e=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear);E=e.year();var t=Math.floor(E/400);E=E%400,E+=E<0?400:0;var r=Math.floor(E/20);return t+"."+r+"."+E%20},forYear:function(E){if(E=E.split("."),E.length<3)throw"Invalid Mayan year";for(var e=0,t=0;t<E.length;t++){var r=parseInt(E[t],10);if(Math.abs(r)>19||t>0&&r<0)throw"Invalid Mayan year";e=e*20+r}return e},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),18},weekOfYear:function(E,e,t){return this._validate(E,e,t,Z.local.invalidDate),0},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),360},daysInMonth:function(E,e){return this._validate(E,e,this.minDay,Z.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate);return r.day()},weekDay:function(E,e,t){return this._validate(E,e,t,Z.local.invalidDate),!0},extraInfo:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate),o=r.toJD(),a=this._toHaab(o),n=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(E){E-=this.jdEpoch;var e=x(E+8+17*20,365);return[Math.floor(e/20)+1,x(e,20)]},_toTzolkin:function(E){return E-=this.jdEpoch,[S(E+20,20),S(E+4,13)]},toJD:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(E){E=Math.floor(E)+.5-this.jdEpoch;var e=Math.floor(E/360);E=E%360,E+=E<0?360:0;var t=Math.floor(E/20),r=E%20;return this.newDate(e,t,r)}});function x(E,e){return E-e*Math.floor(E/e)}function S(E,e){return x(E-1,e)+1}Z.calendars.mayan=v}}),sW=Xe({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar;var x=Z.instance("gregorian");G(v.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear);return x.leapYear(E.year()+(E.year()<1?1:0)+1469)},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidMonth),r=t.year();r<0&&r++;for(var o=t.day(),a=1;a<t.month();a++)o+=this.daysPerMonth[a-1];return o+x.toJD(r+1468,3,13)},fromJD:function(S){S=Math.floor(S+.5);for(var E=Math.floor((S-(this.jdEpoch-1))/366);S>=this.toJD(E+1,1,1);)E++;for(var e=S-Math.floor(this.toJD(E,1,1)+.5)+1,t=1;e>this.daysInMonth(E,t);)e-=this.daysInMonth(E,t),t++;return this.newDate(E,t,e)}}),Z.calendars.nanakshahi=v}}),lW=Xe({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(x){return this.daysInYear(x)!==this.daysPerYear},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){var S=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);if(x=S.year(),typeof this.NEPALI_CALENDAR_DATA[x]>"u")return this.daysPerYear;for(var E=0,e=this.minMonth;e<=12;e++)E+=this.NEPALI_CALENDAR_DATA[x][e];return E},daysInMonth:function(x,S){return x.year&&(S=x.month(),x=x.year()),this._validate(x,S,this.minDay,Z.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[x]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[x][S]},weekDay:function(x,S,E){return this.dayOfWeek(x,S,E)!==6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);x=e.year(),S=e.month(),E=e.day();var t=Z.instance(),r=0,o=S,a=x;this._createMissingCalendarData(x);var n=x-(o>9||o===9&&E>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=E,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===9?(r+=E-this.NEPALI_CALENDAR_DATA[a][0],r<0&&(r+=t.daysInYear(n))):r+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],t.newDate(n,1,1).add(r,"d").toJD()},fromJD:function(x){var S=Z.instance(),E=S.fromJD(x),e=E.year(),t=E.dayOfYear(),r=e+56;this._createMissingCalendarData(r);for(var o=9,a=this.NEPALI_CALENDAR_DATA[r][0],n=this.NEPALI_CALENDAR_DATA[r][o]-a+1;t>n;)o++,o>12&&(o=1,r++),n+=this.NEPALI_CALENDAR_DATA[r][o];var i=this.NEPALI_CALENDAR_DATA[r][o]-(n-t);return this.newDate(r,o,i)},_createMissingCalendarData:function(x){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var E=x-1;E<x+2;E++)typeof this.NEPALI_CALENDAR_DATA[E]>"u"&&(this.NEPALI_CALENDAR_DATA[E]=S)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),Z.calendars.nepali=v}}),uW=Xe({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function x(S){var E=S-475;S<0&&E++;var e=.242197,t=e*E,r=e*(E+1),o=t-Math.floor(t),a=r-Math.floor(r);return o>a}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return x(E.year())},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=0;if(S>0)for(var o=1;o<S;o++)x(o)&&r++;else if(S<0)for(var o=S;o<0;o++)x(o)&&r--;return e+(E<=7?(E-1)*31:(E-1)*30+6)+(S>0?S-1:S)*365+r+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var E=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(E);e<=0&&e--,S>this.toJD(e,12,x(e)?30:29)&&(e++,e===0&&e++);var t=S-this.toJD(e,1,1)+1,r=t<=186?Math.ceil(t/31):Math.ceil((t-6)/30),o=S-this.toJD(e,r,1)+1;return this.newDate(e,r,o)}}),Z.calendars.persian=v,Z.calendars.jalali=v}}),cW=Xe({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Mp(),G=ch(),v=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,G(x.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(E.year());return v.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidDate),r=this._t2gYear(t.year());return v.toJD(r,t.month(),t.day())},fromJD:function(S){var E=v.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)},_g2tYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)}}),Z.calendars.taiwan=x}}),fW=Xe({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Mp(),G=ch(),v=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,G(x.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(E.year());return v.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidDate),r=this._t2gYear(t.year());return v.toJD(r,t.month(),t.day())},fromJD:function(S){var E=v.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)},_g2tYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)}}),Z.calendars.thai=x}}),hW=Xe({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this.daysInYear(E.year())===355},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var E=0,e=1;e<=12;e++)E+=this.daysInMonth(S,e);return E},daysInMonth:function(S,E){for(var e=this._validate(S,E,this.minDay,Z.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;o<x.length;o++){if(x[o]>t)return x[r]-x[r-1];r++}return 30},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+x[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var E=S-24e5+.5,e=0,t=0;t<x.length&&!(x[t]>E);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,n=r-12*o,i=E-x[e-1]+1;return this.newDate(a,n,i)},isValid:function(S,E,e){var t=Z.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(S=S.year!=null?S.year:S,t=S>=1276&&S<=1500),t},_validate:function(S,E,e,t){var r=Z.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw t.replace(/\{0\}/,this.local.name);return r}}),Z.calendars.ummalqura=v;var x=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),pW=Xe({"src/components/calendars/calendars.js"(Z,G){"use strict";G.exports=Mp(),$H(),QH(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW(),hW()}}),dW=Xe({"src/components/calendars/index.js"(Z,G){"use strict";var v=pW(),x=sa(),S=Hs(),E=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:x.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},r=function(g,b,d,u){var y={};return y[d]=t,x.coerce(g,b,y,d,u)},o=function(g,b,d,u){for(var y=0;y<d.length;y++)r(g,b,d[y]+"calendar",u.calendar)},a={chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},n={chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},i={chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},s="##",h={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:s,w:s,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function c(g,b,d){for(var u=Math.floor((b+.05)/e)+E,y=p(d).fromJD(u),f=0,R,L,z,F,N;(f=g.indexOf("%",f))!==-1;)R=g.charAt(f+1),R==="0"||R==="-"||R==="_"?(z=3,L=g.charAt(f+2),R==="_"&&(R="-")):(L=R,R="0",z=2),F=h[L],F?(F===s?N=s:N=y.formatDate(F[R]),g=g.slice(0,f)+N+g.slice(f+z),f+=N.length):f+=z;return g}var m={};function p(g){var b=m[g];return b||(b=m[g]=v.instance(g),b)}function T(g){return x.extendFlat({},t,{description:g})}function l(g){return"Sets the calendar system to use with `"+g+"` date data."}var _={xcalendar:T(l("x"))},w=x.extendFlat({},_,{ycalendar:T(l("y"))}),A=x.extendFlat({},w,{zcalendar:T(l("z"))}),M=T(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));G.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:w,bar:w,box:w,heatmap:w,contour:w,histogram:w,histogram2d:w,histogram2dcontour:w,scatter3d:A,surface:A,mesh3d:A,scattergl:w,ohlc:_,candlestick:_},layout:{calendar:T(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:M},yaxis:{calendar:M},scene:{xaxis:{calendar:M},yaxis:{calendar:M},zaxis:{calendar:M}},polar:{radialaxis:{calendar:M}}}},layoutAttributes:t,handleDefaults:r,handleTraceDefaults:o,CANONICAL_SUNDAY:n,CANONICAL_TICK:a,DFLTRANGE:i,getCal:p,worldCalFmt:c}}}),vW=Xe({"lib/calendars.js"(Z,G){"use strict";G.exports=dW()}}),mW=Xe({"lib/index.js"(Z,G){var v=X9();v.register([J9(),eF(),iF(),uF(),pF(),gF(),xF(),PF(),UF(),JF(),sO(),EB(),RB(),_N(),kN(),FN(),VN(),oU(),cU(),hU(),mU(),bU(),MU(),LU(),HU(),ZU(),Pq(),Wq(),nV(),fV(),bV(),SV(),RV(),WV(),KV(),iG(),_G(),SG(),IG(),tH(),uH(),dH(),_H(),TH(),kH(),FH(),qH(),JH(),vW()]),G.exports=v}});return mW()})();return window.Plotly=ue,ue})});var cX=typeof global=="object"&&global&&global.Object===Object&&global,xb=cX;var fX=typeof self=="object"&&self&&self.Object===Object&&self,hX=xb||fX||Function("return this")(),wu=hX;var pX=wu.Symbol,If=pX;var Xk=Object.prototype,dX=Xk.hasOwnProperty,vX=Xk.toString,a_=If?If.toStringTag:void 0;function mX(ue){var ge=dX.call(ue,a_),Ye=ue[a_];try{ue[a_]=void 0;var Rt=!0}catch{}var gr=vX.call(ue);return Rt&&(ge?ue[a_]=Ye:delete ue[a_]),gr}var Zk=mX;var gX=Object.prototype,yX=gX.toString;function _X(ue){return yX.call(ue)}var Yk=_X;var xX="[object Null]",bX="[object Undefined]",Kk=If?If.toStringTag:void 0;function wX(ue){return ue==null?ue===void 0?bX:xX:Kk&&Kk in Object(ue)?Zk(ue):Yk(ue)}var Oc=wX;function TX(ue){return ue!=null&&typeof ue=="object"}var Dl=TX;var AX="[object Symbol]";function SX(ue){return typeof ue=="symbol"||Dl(ue)&&Oc(ue)==AX}var Rf=SX;var MX=NaN;function EX(ue){return typeof ue=="number"?ue:Rf(ue)?MX:+ue}var wA=EX;function kX(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length,gr=Array(Rt);++Ye<Rt;)gr[Ye]=ge(ue[Ye],Ye,ue);return gr}var Ml=kX;var CX=Array.isArray,Io=CX;var LX=1/0,Jk=If?If.prototype:void 0,$k=Jk?Jk.toString:void 0;function Qk(ue){if(typeof ue=="string")return ue;if(Io(ue))return Ml(ue,Qk)+"";if(Rf(ue))return $k?$k.call(ue):"";var ge=ue+"";return ge=="0"&&1/ue==-LX?"-0":ge}var nh=Qk;function PX(ue,ge){return function(Ye,Rt){var gr;if(Ye===void 0&&Rt===void 0)return ge;if(Ye!==void 0&&(gr=Ye),Rt!==void 0){if(gr===void 0)return Rt;typeof Ye=="string"||typeof Rt=="string"?(Ye=nh(Ye),Rt=nh(Rt)):(Ye=wA(Ye),Rt=wA(Rt)),gr=ue(Ye,Rt)}return gr}}var wm=PX;var IX=wm(function(ue,ge){return ue+ge},0),eC=IX;var RX=/\s/;function DX(ue){for(var ge=ue.length;ge--&&RX.test(ue.charAt(ge)););return ge}var bb=DX;var zX=/^\s+/;function FX(ue){return ue&&ue.slice(0,bb(ue)+1).replace(zX,"")}var wb=FX;function OX(ue){var ge=typeof ue;return ue!=null&&(ge=="object"||ge=="function")}var Ll=OX;var tC=NaN,BX=/^[-+]0x[0-9a-f]+$/i,NX=/^0b[01]+$/i,UX=/^0o[0-7]+$/i,jX=parseInt;function qX(ue){if(typeof ue=="number")return ue;if(Rf(ue))return tC;if(Ll(ue)){var ge=typeof ue.valueOf=="function"?ue.valueOf():ue;ue=Ll(ge)?ge+"":ge}if(typeof ue!="string")return ue===0?ue:+ue;ue=wb(ue);var Ye=NX.test(ue);return Ye||UX.test(ue)?jX(ue.slice(2),Ye?2:8):BX.test(ue)?tC:+ue}var Sh=qX;var rC=1/0,VX=17976931348623157e292;function GX(ue){if(!ue)return ue===0?ue:0;if(ue=Sh(ue),ue===rC||ue===-rC){var ge=ue<0?-1:1;return ge*VX}return ue===ue?ue:0}var od=GX;function HX(ue){var ge=od(ue),Ye=ge%1;return ge===ge?Ye?ge-Ye:ge:0}var jo=HX;var WX="Expected a function";function XX(ue,ge){if(typeof ge!="function")throw new TypeError(WX);return ue=jo(ue),function(){if(--ue<1)return ge.apply(this,arguments)}}var aC=XX;function ZX(ue){return ue}var Bc=ZX;var YX="[object AsyncFunction]",KX="[object Function]",JX="[object GeneratorFunction]",$X="[object Proxy]";function QX(ue){if(!Ll(ue))return!1;var ge=Oc(ue);return ge==KX||ge==JX||ge==YX||ge==$X}var ap=QX;var eZ=wu["__core-js_shared__"],Zg=eZ;var iC=function(){var ue=/[^.]+$/.exec(Zg&&Zg.keys&&Zg.keys.IE_PROTO||"");return ue?"Symbol(src)_1."+ue:""}();function tZ(ue){return!!iC&&iC in ue}var nC=tZ;var rZ=Function.prototype,aZ=rZ.toString;function iZ(ue){if(ue!=null){try{return aZ.call(ue)}catch{}try{return ue+""}catch{}}return""}var jv=iZ;var nZ=/[\\^$.*+?()[\]{}|]/g,oZ=/^\[object .+?Constructor\]$/,sZ=Function.prototype,lZ=Object.prototype,uZ=sZ.toString,cZ=lZ.hasOwnProperty,fZ=RegExp("^"+uZ.call(cZ).replace(nZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hZ(ue){if(!Ll(ue)||nC(ue))return!1;var ge=ap(ue)?fZ:oZ;return ge.test(jv(ue))}var Tb=hZ;function pZ(ue,ge){return ue?.[ge]}var oC=pZ;function dZ(ue,ge){var Ye=oC(ue,ge);return Tb(Ye)?Ye:void 0}var sd=dZ;var vZ=sd(wu,"WeakMap"),q0=vZ;var mZ=q0&&new q0,Yg=mZ;var gZ=Yg?function(ue,ge){return Yg.set(ue,ge),ue}:Bc,Ab=gZ;var sC=Object.create,yZ=function(){function ue(){}return function(ge){if(!Ll(ge))return{};if(sC)return sC(ge);ue.prototype=ge;var Ye=new ue;return ue.prototype=void 0,Ye}}(),Td=yZ;function _Z(ue){return function(){var ge=arguments;switch(ge.length){case 0:return new ue;case 1:return new ue(ge[0]);case 2:return new ue(ge[0],ge[1]);case 3:return new ue(ge[0],ge[1],ge[2]);case 4:return new ue(ge[0],ge[1],ge[2],ge[3]);case 5:return new ue(ge[0],ge[1],ge[2],ge[3],ge[4]);case 6:return new ue(ge[0],ge[1],ge[2],ge[3],ge[4],ge[5]);case 7:return new ue(ge[0],ge[1],ge[2],ge[3],ge[4],ge[5],ge[6])}var Ye=Td(ue.prototype),Rt=ue.apply(Ye,ge);return Ll(Rt)?Rt:Ye}}var qv=_Z;var xZ=1;function bZ(ue,ge,Ye){var Rt=ge&xZ,gr=qv(ue);function Yr(){var Ea=this&&this!==wu&&this instanceof Yr?gr:ue;return Ea.apply(Rt?Ye:this,arguments)}return Yr}var lC=bZ;function wZ(ue,ge,Ye){switch(Ye.length){case 0:return ue.call(ge);case 1:return ue.call(ge,Ye[0]);case 2:return ue.call(ge,Ye[0],Ye[1]);case 3:return ue.call(ge,Ye[0],Ye[1],Ye[2])}return ue.apply(ge,Ye)}var xf=wZ;var TZ=Math.max;function AZ(ue,ge,Ye,Rt){for(var gr=-1,Yr=ue.length,Ea=Ye.length,ei=-1,oi=ge.length,Cn=TZ(Yr-Ea,0),bn=Array(oi+Cn),Fn=!Rt;++ei<oi;)bn[ei]=ge[ei];for(;++gr<Ea;)(Fn||gr<Yr)&&(bn[Ye[gr]]=ue[gr]);for(;Cn--;)bn[ei++]=ue[gr++];return bn}var Sb=AZ;var SZ=Math.max;function MZ(ue,ge,Ye,Rt){for(var gr=-1,Yr=ue.length,Ea=-1,ei=Ye.length,oi=-1,Cn=ge.length,bn=SZ(Yr-ei,0),Fn=Array(bn+Cn),To=!Rt;++gr<bn;)Fn[gr]=ue[gr];for(var ds=gr;++oi<Cn;)Fn[ds+oi]=ge[oi];for(;++Ea<ei;)(To||gr<Yr)&&(Fn[ds+Ye[Ea]]=ue[gr++]);return Fn}var Mb=MZ;function EZ(ue,ge){for(var Ye=ue.length,Rt=0;Ye--;)ue[Ye]===ge&&++Rt;return Rt}var uC=EZ;function kZ(){}var Tm=kZ;var CZ=4294967295;function Eb(ue){this.__wrapped__=ue,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=CZ,this.__views__=[]}Eb.prototype=Td(Tm.prototype);Eb.prototype.constructor=Eb;var Bl=Eb;function LZ(){}var Kg=LZ;var PZ=Yg?function(ue){return Yg.get(ue)}:Kg,Jg=PZ;var IZ={},Am=IZ;var RZ=Object.prototype,DZ=RZ.hasOwnProperty;function zZ(ue){for(var ge=ue.name+"",Ye=Am[ge],Rt=DZ.call(Am,ge)?Ye.length:0;Rt--;){var gr=Ye[Rt],Yr=gr.func;if(Yr==null||Yr==ue)return gr.name}return ge}var $g=zZ;function kb(ue,ge){this.__wrapped__=ue,this.__actions__=[],this.__chain__=!!ge,this.__index__=0,this.__values__=void 0}kb.prototype=Td(Tm.prototype);kb.prototype.constructor=kb;var zp=kb;function FZ(ue,ge){var Ye=-1,Rt=ue.length;for(ge||(ge=Array(Rt));++Ye<Rt;)ge[Ye]=ue[Ye];return ge}var pf=FZ;function OZ(ue){if(ue instanceof Bl)return ue.clone();var ge=new zp(ue.__wrapped__,ue.__chain__);return ge.__actions__=pf(ue.__actions__),ge.__index__=ue.__index__,ge.__values__=ue.__values__,ge}var Cb=OZ;var BZ=Object.prototype,NZ=BZ.hasOwnProperty;function Lb(ue){if(Dl(ue)&&!Io(ue)&&!(ue instanceof Bl)){if(ue instanceof zp)return ue;if(NZ.call(ue,"__wrapped__"))return Cb(ue)}return new zp(ue)}Lb.prototype=Tm.prototype;Lb.prototype.constructor=Lb;var va=Lb;function UZ(ue){var ge=$g(ue),Ye=va[ge];if(typeof Ye!="function"||!(ge in Bl.prototype))return!1;if(ue===Ye)return!0;var Rt=Jg(Ye);return!!Rt&&ue===Rt[0]}var i_=UZ;var jZ=800,qZ=16,VZ=Date.now;function GZ(ue){var ge=0,Ye=0;return function(){var Rt=VZ(),gr=qZ-(Rt-Ye);if(Ye=Rt,gr>0){if(++ge>=jZ)return arguments[0]}else ge=0;return ue.apply(void 0,arguments)}}var Pb=GZ;var HZ=Pb(Ab),Ib=HZ;var WZ=/\{\n\/\* \[wrapped with (.+)\] \*/,XZ=/,? & /;function ZZ(ue){var ge=ue.match(WZ);return ge?ge[1].split(XZ):[]}var cC=ZZ;var YZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function KZ(ue,ge){var Ye=ge.length;if(!Ye)return ue;var Rt=Ye-1;return ge[Rt]=(Ye>1?"& ":"")+ge[Rt],ge=ge.join(Ye>2?", ":" "),ue.replace(YZ,`{
3790/* [wrapped with `+ge+`] */
3791`)}var fC=KZ;function JZ(ue){return function(){return ue}}var Qg=JZ;var $Z=function(){try{var ue=sd(Object,"defineProperty");return ue({},"",{}),ue}catch{}}(),ey=$Z;var QZ=ey?function(ue,ge){return ey(ue,"toString",{configurable:!0,enumerable:!1,value:Qg(ge),writable:!0})}:Bc,hC=QZ;var eY=Pb(hC),ty=eY;function tY(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length;++Ye<Rt&&ge(ue[Ye],Ye,ue)!==!1;);return ue}var Nh=tY;function rY(ue,ge,Ye,Rt){for(var gr=ue.length,Yr=Ye+(Rt?1:-1);Rt?Yr--:++Yr<gr;)if(ge(ue[Yr],Yr,ue))return Yr;return-1}var Sm=rY;function aY(ue){return ue!==ue}var Rb=aY;function iY(ue,ge,Ye){for(var Rt=Ye-1,gr=ue.length;++Rt<gr;)if(ue[Rt]===ge)return Rt;return-1}var pC=iY;function nY(ue,ge,Ye){return ge===ge?pC(ue,ge,Ye):Sm(ue,Rb,Ye)}var Ad=nY;function oY(ue,ge){var Ye=ue==null?0:ue.length;return!!Ye&&Ad(ue,ge,0)>-1}var Mm=oY;var sY=1,lY=2,uY=8,cY=16,fY=32,hY=64,pY=128,dY=256,vY=512,mY=[["ary",pY],["bind",sY],["bindKey",lY],["curry",uY],["curryRight",cY],["flip",vY],["partial",fY],["partialRight",hY],["rearg",dY]];function gY(ue,ge){return Nh(mY,function(Ye){var Rt="_."+Ye[0];ge&Ye[1]&&!Mm(ue,Rt)&&ue.push(Rt)}),ue.sort()}var dC=gY;function yY(ue,ge,Ye){var Rt=ge+"";return ty(ue,fC(Rt,dC(cC(Rt),Ye)))}var Db=yY;var _Y=1,xY=2,bY=4,wY=8,vC=32,mC=64;function TY(ue,ge,Ye,Rt,gr,Yr,Ea,ei,oi,Cn){var bn=ge&wY,Fn=bn?Ea:void 0,To=bn?void 0:Ea,ds=bn?Yr:void 0,Qs=bn?void 0:Yr;ge|=bn?vC:mC,ge&=~(bn?mC:vC),ge&bY||(ge&=~(_Y|xY));var Vo=[ue,ge,gr,ds,Fn,Qs,To,ei,oi,Cn],Xe=Ye.apply(void 0,Vo);return i_(ue)&&Ib(Xe,Vo),Xe.placeholder=Rt,Db(Xe,ue,ge)}var zb=TY;function AY(ue){var ge=ue;return ge.placeholder}var Sd=AY;var SY=9007199254740991,MY=/^(?:0|[1-9]\d*)$/;function EY(ue,ge){var Ye=typeof ue;return ge=ge??SY,!!ge&&(Ye=="number"||Ye!="symbol"&&MY.test(ue))&&ue>-1&&ue%1==0&&ue<ge}var ip=EY;var kY=Math.min;function CY(ue,ge){for(var Ye=ue.length,Rt=kY(ge.length,Ye),gr=pf(ue);Rt--;){var Yr=ge[Rt];ue[Rt]=ip(Yr,Ye)?gr[Yr]:void 0}return ue}var gC=CY;var yC="__lodash_placeholder__";function LY(ue,ge){for(var Ye=-1,Rt=ue.length,gr=0,Yr=[];++Ye<Rt;){var Ea=ue[Ye];(Ea===ge||Ea===yC)&&(ue[Ye]=yC,Yr[gr++]=Ye)}return Yr}var Yp=LY;var PY=1,IY=2,RY=8,DY=16,zY=128,FY=512;function _C(ue,ge,Ye,Rt,gr,Yr,Ea,ei,oi,Cn){var bn=ge&zY,Fn=ge&PY,To=ge&IY,ds=ge&(RY|DY),Qs=ge&FY,Vo=To?void 0:qv(ue);function Xe(){for(var Kl=arguments.length,nu=Array(Kl),jp=Kl;jp--;)nu[jp]=arguments[jp];if(ds)var zf=Sd(Xe),fp=uC(nu,zf);if(Rt&&(nu=Sb(nu,Rt,gr,ds)),Yr&&(nu=Mb(nu,Yr,Ea,ds)),Kl-=fp,ds&&Kl<Cn){var Ff=Yp(nu,zf);return zb(ue,ge,_C,Xe.placeholder,Ye,nu,Ff,ei,oi,Cn-Kl)}var Hn=Fn?Ye:this,dd=To?Hn[ue]:ue;return Kl=nu.length,ei?nu=gC(nu,ei):Qs&&Kl>1&&nu.reverse(),bn&&oi<Kl&&(nu.length=oi),this&&this!==wu&&this instanceof Xe&&(dd=Vo||qv(dd)),dd.apply(Hn,nu)}return Xe}var ry=_C;function OY(ue,ge,Ye){var Rt=qv(ue);function gr(){for(var Yr=arguments.length,Ea=Array(Yr),ei=Yr,oi=Sd(gr);ei--;)Ea[ei]=arguments[ei];var Cn=Yr<3&&Ea[0]!==oi&&Ea[Yr-1]!==oi?[]:Yp(Ea,oi);if(Yr-=Cn.length,Yr<Ye)return zb(ue,ge,ry,gr.placeholder,void 0,Ea,Cn,void 0,void 0,Ye-Yr);var bn=this&&this!==wu&&this instanceof gr?Rt:ue;return xf(bn,this,Ea)}return gr}var xC=OY;var BY=1;function NY(ue,ge,Ye,Rt){var gr=ge&BY,Yr=qv(ue);function Ea(){for(var ei=-1,oi=arguments.length,Cn=-1,bn=Rt.length,Fn=Array(bn+oi),To=this&&this!==wu&&this instanceof Ea?Yr:ue;++Cn<bn;)Fn[Cn]=Rt[Cn];for(;oi--;)Fn[Cn++]=arguments[++ei];return xf(To,gr?Ye:this,Fn)}return Ea}var bC=NY;var wC="__lodash_placeholder__",TA=1,UY=2,jY=4,TC=8,n_=128,AC=256,qY=Math.min;function VY(ue,ge){var Ye=ue[1],Rt=ge[1],gr=Ye|Rt,Yr=gr<(TA|UY|n_),Ea=Rt==n_&&Ye==TC||Rt==n_&&Ye==AC&&ue[7].length<=ge[8]||Rt==(n_|AC)&&ge[7].length<=ge[8]&&Ye==TC;if(!(Yr||Ea))return ue;Rt&TA&&(ue[2]=ge[2],gr|=Ye&TA?0:jY);var ei=ge[3];if(ei){var oi=ue[3];ue[3]=oi?Sb(oi,ei,ge[4]):ei,ue[4]=oi?Yp(ue[3],wC):ge[4]}return ei=ge[5],ei&&(oi=ue[5],ue[5]=oi?Mb(oi,ei,ge[6]):ei,ue[6]=oi?Yp(ue[5],wC):ge[6]),ei=ge[7],ei&&(ue[7]=ei),Rt&n_&&(ue[8]=ue[8]==null?ge[8]:qY(ue[8],ge[8])),ue[9]==null&&(ue[9]=ge[9]),ue[0]=ge[0],ue[1]=gr,ue}var SC=VY;var GY="Expected a function",MC=1,HY=2,AA=8,SA=16,MA=32,EC=64,kC=Math.max;function WY(ue,ge,Ye,Rt,gr,Yr,Ea,ei){var oi=ge&HY;if(!oi&&typeof ue!="function")throw new TypeError(GY);var Cn=Rt?Rt.length:0;if(Cn||(ge&=~(MA|EC),Rt=gr=void 0),Ea=Ea===void 0?Ea:kC(jo(Ea),0),ei=ei===void 0?ei:jo(ei),Cn-=gr?gr.length:0,ge&EC){var bn=Rt,Fn=gr;Rt=gr=void 0}var To=oi?void 0:Jg(ue),ds=[ue,ge,Ye,Rt,gr,bn,Fn,Yr,Ea,ei];if(To&&SC(ds,To),ue=ds[0],ge=ds[1],Ye=ds[2],Rt=ds[3],gr=ds[4],ei=ds[9]=ds[9]===void 0?oi?0:ue.length:kC(ds[9]-Cn,0),!ei&&ge&(AA|SA)&&(ge&=~(AA|SA)),!ge||ge==MC)var Qs=lC(ue,ge,Ye);else ge==AA||ge==SA?Qs=xC(ue,ge,ei):(ge==MA||ge==(MC|MA))&&!gr.length?Qs=bC(ue,ge,Ye,Rt):Qs=ry.apply(void 0,ds);var Vo=To?Ab:Ib;return Db(Vo(Qs,ds),ue,ge)}var np=WY;var XY=128;function ZY(ue,ge,Ye){return ge=Ye?void 0:ge,ge=ue&&ge==null?ue.length:ge,np(ue,XY,void 0,void 0,void 0,void 0,ge)}var Fb=ZY;function YY(ue,ge,Ye){ge=="__proto__"&&ey?ey(ue,ge,{configurable:!0,enumerable:!0,value:Ye,writable:!0}):ue[ge]=Ye}var op=YY;function KY(ue,ge){return ue===ge||ue!==ue&&ge!==ge}var oh=KY;var JY=Object.prototype,$Y=JY.hasOwnProperty;function QY(ue,ge,Ye){var Rt=ue[ge];(!($Y.call(ue,ge)&&oh(Rt,Ye))||Ye===void 0&&!(ge in ue))&&op(ue,ge,Ye)}var vv=QY;function eK(ue,ge,Ye,Rt){var gr=!Ye;Ye||(Ye={});for(var Yr=-1,Ea=ge.length;++Yr<Ea;){var ei=ge[Yr],oi=Rt?Rt(Ye[ei],ue[ei],ei,Ye,ue):void 0;oi===void 0&&(oi=ue[ei]),gr?op(Ye,ei,oi):vv(Ye,ei,oi)}return Ye}var Mh=eK;var CC=Math.max;function tK(ue,ge,Ye){return ge=CC(ge===void 0?ue.length-1:ge,0),function(){for(var Rt=arguments,gr=-1,Yr=CC(Rt.length-ge,0),Ea=Array(Yr);++gr<Yr;)Ea[gr]=Rt[ge+gr];gr=-1;for(var ei=Array(ge+1);++gr<ge;)ei[gr]=Rt[gr];return ei[ge]=Ye(Ea),xf(ue,this,ei)}}var Ob=tK;function rK(ue,ge){return ty(Ob(ue,ge,Bc),ue+"")}var qo=rK;var aK=9007199254740991;function iK(ue){return typeof ue=="number"&&ue>-1&&ue%1==0&&ue<=aK}var Em=iK;function nK(ue){return ue!=null&&Em(ue.length)&&!ap(ue)}var Vc=nK;function oK(ue,ge,Ye){if(!Ll(Ye))return!1;var Rt=typeof ge;return(Rt=="number"?Vc(Ye)&&ip(ge,Ye.length):Rt=="string"&&ge in Ye)?oh(Ye[ge],ue):!1}var Nc=oK;function sK(ue){return qo(function(ge,Ye){var Rt=-1,gr=Ye.length,Yr=gr>1?Ye[gr-1]:void 0,Ea=gr>2?Ye[2]:void 0;for(Yr=ue.length>3&&typeof Yr=="function"?(gr--,Yr):void 0,Ea&&Nc(Ye[0],Ye[1],Ea)&&(Yr=gr<3?void 0:Yr,gr=1),ge=Object(ge);++Rt<gr;){var ei=Ye[Rt];ei&&ue(ge,ei,Rt,Yr)}return ge})}var Md=sK;var lK=Object.prototype;function uK(ue){var ge=ue&&ue.constructor,Ye=typeof ge=="function"&&ge.prototype||lK;return ue===Ye}var mv=uK;function cK(ue,ge){for(var Ye=-1,Rt=Array(ue);++Ye<ue;)Rt[Ye]=ge(Ye);return Rt}var ay=cK;var fK="[object Arguments]";function hK(ue){return Dl(ue)&&Oc(ue)==fK}var EA=hK;var LC=Object.prototype,pK=LC.hasOwnProperty,dK=LC.propertyIsEnumerable,vK=EA(function(){return arguments}())?EA:function(ue){return Dl(ue)&&pK.call(ue,"callee")&&!dK.call(ue,"callee")},pd=vK;function mK(){return!1}var iy=mK;var RC=typeof exports=="object"&&exports&&!exports.nodeType&&exports,PC=RC&&typeof module=="object"&&module&&!module.nodeType&&module,gK=PC&&PC.exports===RC,IC=gK?wu.Buffer:void 0,yK=IC?IC.isBuffer:void 0,_K=yK||iy,Kp=_K;var xK="[object Arguments]",bK="[object Array]",wK="[object Boolean]",TK="[object Date]",AK="[object Error]",SK="[object Function]",MK="[object Map]",EK="[object Number]",kK="[object Object]",CK="[object RegExp]",LK="[object Set]",PK="[object String]",IK="[object WeakMap]",RK="[object ArrayBuffer]",DK="[object DataView]",zK="[object Float32Array]",FK="[object Float64Array]",OK="[object Int8Array]",BK="[object Int16Array]",NK="[object Int32Array]",UK="[object Uint8Array]",jK="[object Uint8ClampedArray]",qK="[object Uint16Array]",VK="[object Uint32Array]",bf={};bf[zK]=bf[FK]=bf[OK]=bf[BK]=bf[NK]=bf[UK]=bf[jK]=bf[qK]=bf[VK]=!0;bf[xK]=bf[bK]=bf[RK]=bf[wK]=bf[DK]=bf[TK]=bf[AK]=bf[SK]=bf[MK]=bf[EK]=bf[kK]=bf[CK]=bf[LK]=bf[PK]=bf[IK]=!1;function GK(ue){return Dl(ue)&&Em(ue.length)&&!!bf[Oc(ue)]}var DC=GK;function HK(ue){return function(ge){return ue(ge)}}var wf=HK;var zC=typeof exports=="object"&&exports&&!exports.nodeType&&exports,o_=zC&&typeof module=="object"&&module&&!module.nodeType&&module,WK=o_&&o_.exports===zC,kA=WK&&xb.process,XK=function(){try{var ue=o_&&o_.require&&o_.require("util").types;return ue||kA&&kA.binding&&kA.binding("util")}catch{}}(),sp=XK;var FC=sp&&sp.isTypedArray,ZK=FC?wf(FC):DC,Ed=ZK;var YK=Object.prototype,KK=YK.hasOwnProperty;function JK(ue,ge){var Ye=Io(ue),Rt=!Ye&&pd(ue),gr=!Ye&&!Rt&&Kp(ue),Yr=!Ye&&!Rt&&!gr&&Ed(ue),Ea=Ye||Rt||gr||Yr,ei=Ea?ay(ue.length,String):[],oi=ei.length;for(var Cn in ue)(ge||KK.call(ue,Cn))&&!(Ea&&(Cn=="length"||gr&&(Cn=="offset"||Cn=="parent")||Yr&&(Cn=="buffer"||Cn=="byteLength"||Cn=="byteOffset")||ip(Cn,oi)))&&ei.push(Cn);return ei}var Bb=JK;function $K(ue,ge){return function(Ye){return ue(ge(Ye))}}var Nb=$K;var QK=Nb(Object.keys,Object),OC=QK;var eJ=Object.prototype,tJ=eJ.hasOwnProperty;function rJ(ue){if(!mv(ue))return OC(ue);var ge=[];for(var Ye in Object(ue))tJ.call(ue,Ye)&&Ye!="constructor"&&ge.push(Ye);return ge}var ny=rJ;function aJ(ue){return Vc(ue)?Bb(ue):ny(ue)}var gu=aJ;var iJ=Object.prototype,nJ=iJ.hasOwnProperty,oJ=Md(function(ue,ge){if(mv(ge)||Vc(ge)){Mh(ge,gu(ge),ue);return}for(var Ye in ge)nJ.call(ge,Ye)&&vv(ue,Ye,ge[Ye])}),BC=oJ;function sJ(ue){var ge=[];if(ue!=null)for(var Ye in Object(ue))ge.push(Ye);return ge}var NC=sJ;var lJ=Object.prototype,uJ=lJ.hasOwnProperty;function cJ(ue){if(!Ll(ue))return NC(ue);var ge=mv(ue),Ye=[];for(var Rt in ue)Rt=="constructor"&&(ge||!uJ.call(ue,Rt))||Ye.push(Rt);return Ye}var UC=cJ;function fJ(ue){return Vc(ue)?Bb(ue,!0):UC(ue)}var Gc=fJ;var hJ=Md(function(ue,ge){Mh(ge,Gc(ge),ue)}),s_=hJ;var pJ=Md(function(ue,ge,Ye,Rt){Mh(ge,Gc(ge),ue,Rt)}),km=pJ;var dJ=Md(function(ue,ge,Ye,Rt){Mh(ge,gu(ge),ue,Rt)}),jC=dJ;var vJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mJ=/^\w*$/;function gJ(ue,ge){if(Io(ue))return!1;var Ye=typeof ue;return Ye=="number"||Ye=="symbol"||Ye=="boolean"||ue==null||Rf(ue)?!0:mJ.test(ue)||!vJ.test(ue)||ge!=null&&ue in Object(ge)}var oy=gJ;var yJ=sd(Object,"create"),Vv=yJ;function _J(){this.__data__=Vv?Vv(null):{},this.size=0}var qC=_J;function xJ(ue){var ge=this.has(ue)&&delete this.__data__[ue];return this.size-=ge?1:0,ge}var VC=xJ;var bJ="__lodash_hash_undefined__",wJ=Object.prototype,TJ=wJ.hasOwnProperty;function AJ(ue){var ge=this.__data__;if(Vv){var Ye=ge[ue];return Ye===bJ?void 0:Ye}return TJ.call(ge,ue)?ge[ue]:void 0}var GC=AJ;var SJ=Object.prototype,MJ=SJ.hasOwnProperty;function EJ(ue){var ge=this.__data__;return Vv?ge[ue]!==void 0:MJ.call(ge,ue)}var HC=EJ;var kJ="__lodash_hash_undefined__";function CJ(ue,ge){var Ye=this.__data__;return this.size+=this.has(ue)?0:1,Ye[ue]=Vv&&ge===void 0?kJ:ge,this}var WC=CJ;function sy(ue){var ge=-1,Ye=ue==null?0:ue.length;for(this.clear();++ge<Ye;){var Rt=ue[ge];this.set(Rt[0],Rt[1])}}sy.prototype.clear=qC;sy.prototype.delete=VC;sy.prototype.get=GC;sy.prototype.has=HC;sy.prototype.set=WC;var CA=sy;function LJ(){this.__data__=[],this.size=0}var XC=LJ;function PJ(ue,ge){for(var Ye=ue.length;Ye--;)if(oh(ue[Ye][0],ge))return Ye;return-1}var Cm=PJ;var IJ=Array.prototype,RJ=IJ.splice;function DJ(ue){var ge=this.__data__,Ye=Cm(ge,ue);if(Ye<0)return!1;var Rt=ge.length-1;return Ye==Rt?ge.pop():RJ.call(ge,Ye,1),--this.size,!0}var ZC=DJ;function zJ(ue){var ge=this.__data__,Ye=Cm(ge,ue);return Ye<0?void 0:ge[Ye][1]}var YC=zJ;function FJ(ue){return Cm(this.__data__,ue)>-1}var KC=FJ;function OJ(ue,ge){var Ye=this.__data__,Rt=Cm(Ye,ue);return Rt<0?(++this.size,Ye.push([ue,ge])):Ye[Rt][1]=ge,this}var JC=OJ;function ly(ue){var ge=-1,Ye=ue==null?0:ue.length;for(this.clear();++ge<Ye;){var Rt=ue[ge];this.set(Rt[0],Rt[1])}}ly.prototype.clear=XC;ly.prototype.delete=ZC;ly.prototype.get=YC;ly.prototype.has=KC;ly.prototype.set=JC;var Lm=ly;var BJ=sd(wu,"Map"),Pm=BJ;function NJ(){this.size=0,this.__data__={hash:new CA,map:new(Pm||Lm),string:new CA}}var $C=NJ;function UJ(ue){var ge=typeof ue;return ge=="string"||ge=="number"||ge=="symbol"||ge=="boolean"?ue!=="__proto__":ue===null}var QC=UJ;function jJ(ue,ge){var Ye=ue.__data__;return QC(ge)?Ye[typeof ge=="string"?"string":"hash"]:Ye.map}var Im=jJ;function qJ(ue){var ge=Im(this,ue).delete(ue);return this.size-=ge?1:0,ge}var eL=qJ;function VJ(ue){return Im(this,ue).get(ue)}var tL=VJ;function GJ(ue){return Im(this,ue).has(ue)}var rL=GJ;function HJ(ue,ge){var Ye=Im(this,ue),Rt=Ye.size;return Ye.set(ue,ge),this.size+=Ye.size==Rt?0:1,this}var aL=HJ;function uy(ue){var ge=-1,Ye=ue==null?0:ue.length;for(this.clear();++ge<Ye;){var Rt=ue[ge];this.set(Rt[0],Rt[1])}}uy.prototype.clear=$C;uy.prototype.delete=eL;uy.prototype.get=tL;uy.prototype.has=rL;uy.prototype.set=aL;var V0=uy;var WJ="Expected a function";function LA(ue,ge){if(typeof ue!="function"||ge!=null&&typeof ge!="function")throw new TypeError(WJ);var Ye=function(){var Rt=arguments,gr=ge?ge.apply(this,Rt):Rt[0],Yr=Ye.cache;if(Yr.has(gr))return Yr.get(gr);var Ea=ue.apply(this,Rt);return Ye.cache=Yr.set(gr,Ea)||Yr,Ea};return Ye.cache=new(LA.Cache||V0),Ye}LA.Cache=V0;var Ub=LA;var XJ=500;function ZJ(ue){var ge=Ub(ue,function(Rt){return Ye.size===XJ&&Ye.clear(),Rt}),Ye=ge.cache;return ge}var iL=ZJ;var YJ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,KJ=/\\(\\)?/g,JJ=iL(function(ue){var ge=[];return ue.charCodeAt(0)===46&&ge.push(""),ue.replace(YJ,function(Ye,Rt,gr,Yr){ge.push(gr?Yr.replace(KJ,"$1"):Rt||Ye)}),ge}),jb=JJ;function $J(ue){return ue==null?"":nh(ue)}var Bs=$J;function QJ(ue,ge){return Io(ue)?ue:oy(ue,ge)?[ue]:jb(Bs(ue))}var Fp=QJ;var e$=1/0;function t$(ue){if(typeof ue=="string"||Rf(ue))return ue;var ge=ue+"";return ge=="0"&&1/ue==-e$?"-0":ge}var Eh=t$;function r$(ue,ge){ge=Fp(ge,ue);for(var Ye=0,Rt=ge.length;ue!=null&&Ye<Rt;)ue=ue[Eh(ge[Ye++])];return Ye&&Ye==Rt?ue:void 0}var ld=r$;function a$(ue,ge,Ye){var Rt=ue==null?void 0:ld(ue,ge);return Rt===void 0?Ye:Rt}var cy=a$;function i$(ue,ge){for(var Ye=-1,Rt=ge.length,gr=Array(Rt),Yr=ue==null;++Ye<Rt;)gr[Ye]=Yr?void 0:cy(ue,ge[Ye]);return gr}var fy=i$;function n$(ue,ge){for(var Ye=-1,Rt=ge.length,gr=ue.length;++Ye<Rt;)ue[gr+Ye]=ge[Ye];return ue}var Op=n$;var nL=If?If.isConcatSpreadable:void 0;function o$(ue){return Io(ue)||pd(ue)||!!(nL&&ue&&ue[nL])}var oL=o$;function sL(ue,ge,Ye,Rt,gr){var Yr=-1,Ea=ue.length;for(Ye||(Ye=oL),gr||(gr=[]);++Yr<Ea;){var ei=ue[Yr];ge>0&&Ye(ei)?ge>1?sL(ei,ge-1,Ye,Rt,gr):Op(gr,ei):Rt||(gr[gr.length]=ei)}return gr}var Qu=sL;function s$(ue){var ge=ue==null?0:ue.length;return ge?Qu(ue,1):[]}var qb=s$;function l$(ue){return ty(Ob(ue,void 0,qb),ue+"")}var lp=l$;var u$=lp(fy),lL=u$;var c$=Nb(Object.getPrototypeOf,Object),Rm=c$;var f$="[object Object]",h$=Function.prototype,p$=Object.prototype,uL=h$.toString,d$=p$.hasOwnProperty,v$=uL.call(Object);function m$(ue){if(!Dl(ue)||Oc(ue)!=f$)return!1;var ge=Rm(ue);if(ge===null)return!0;var Ye=d$.call(ge,"constructor")&&ge.constructor;return typeof Ye=="function"&&Ye instanceof Ye&&uL.call(Ye)==v$}var gv=m$;var g$="[object DOMException]",y$="[object Error]";function _$(ue){if(!Dl(ue))return!1;var ge=Oc(ue);return ge==y$||ge==g$||typeof ue.message=="string"&&typeof ue.name=="string"&&!gv(ue)}var hy=_$;var x$=qo(function(ue,ge){try{return xf(ue,void 0,ge)}catch(Ye){return hy(Ye)?Ye:new Error(Ye)}}),Vb=x$;var b$="Expected a function";function w$(ue,ge){var Ye;if(typeof ge!="function")throw new TypeError(b$);return ue=jo(ue),function(){return--ue>0&&(Ye=ge.apply(this,arguments)),ue<=1&&(ge=void 0),Ye}}var Gb=w$;var T$=1,A$=32,PA=qo(function(ue,ge,Ye){var Rt=T$;if(Ye.length){var gr=Yp(Ye,Sd(PA));Rt|=A$}return np(ue,Rt,ge,Ye,gr)});PA.placeholder={};var Hb=PA;var S$=lp(function(ue,ge){return Nh(ge,function(Ye){Ye=Eh(Ye),op(ue,Ye,Hb(ue[Ye],ue))}),ue}),cL=S$;var M$=1,E$=2,k$=32,IA=qo(function(ue,ge,Ye){var Rt=M$|E$;if(Ye.length){var gr=Yp(Ye,Sd(IA));Rt|=k$}return np(ge,Rt,ue,Ye,gr)});IA.placeholder={};var fL=IA;function C$(ue,ge,Ye){var Rt=-1,gr=ue.length;ge<0&&(ge=-ge>gr?0:gr+ge),Ye=Ye>gr?gr:Ye,Ye<0&&(Ye+=gr),gr=ge>Ye?0:Ye-ge>>>0,ge>>>=0;for(var Yr=Array(gr);++Rt<gr;)Yr[Rt]=ue[Rt+ge];return Yr}var Yf=C$;function L$(ue,ge,Ye){var Rt=ue.length;return Ye=Ye===void 0?Rt:Ye,!ge&&Ye>=Rt?ue:Yf(ue,ge,Ye)}var Bp=L$;var P$="\\ud800-\\udfff",I$="\\u0300-\\u036f",R$="\\ufe20-\\ufe2f",D$="\\u20d0-\\u20ff",z$=I$+R$+D$,F$="\\ufe0e\\ufe0f",O$="\\u200d",B$=RegExp("["+O$+P$+z$+F$+"]");function N$(ue){return B$.test(ue)}var kd=N$;function U$(ue){return ue.split("")}var hL=U$;var pL="\\ud800-\\udfff",j$="\\u0300-\\u036f",q$="\\ufe20-\\ufe2f",V$="\\u20d0-\\u20ff",G$=j$+q$+V$,H$="\\ufe0e\\ufe0f",W$="["+pL+"]",RA="["+G$+"]",DA="\\ud83c[\\udffb-\\udfff]",X$="(?:"+RA+"|"+DA+")",dL="[^"+pL+"]",vL="(?:\\ud83c[\\udde6-\\uddff]){2}",mL="[\\ud800-\\udbff][\\udc00-\\udfff]",Z$="\\u200d",gL=X$+"?",yL="["+H$+"]?",Y$="(?:"+Z$+"(?:"+[dL,vL,mL].join("|")+")"+yL+gL+")*",K$=yL+gL+Y$,J$="(?:"+[dL+RA+"?",RA,vL,mL,W$].join("|")+")",$$=RegExp(DA+"(?="+DA+")|"+J$+K$,"g");function Q$(ue){return ue.match($$)||[]}var _L=Q$;function eQ(ue){return kd(ue)?_L(ue):hL(ue)}var Uh=eQ;function tQ(ue){return function(ge){ge=Bs(ge);var Ye=kd(ge)?Uh(ge):void 0,Rt=Ye?Ye[0]:ge.charAt(0),gr=Ye?Bp(Ye,1).join(""):ge.slice(1);return Rt[ue]()+gr}}var Wb=tQ;var rQ=Wb("toUpperCase"),py=rQ;function aQ(ue){return py(Bs(ue).toLowerCase())}var Xb=aQ;function iQ(ue,ge,Ye,Rt){var gr=-1,Yr=ue==null?0:ue.length;for(Rt&&Yr&&(Ye=ue[++gr]);++gr<Yr;)Ye=ge(Ye,ue[gr],gr,ue);return Ye}var dy=iQ;function nQ(ue){return function(ge){return ue?.[ge]}}var vy=nQ;var oQ={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},sQ=vy(oQ),xL=sQ;var lQ=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,uQ="\\u0300-\\u036f",cQ="\\ufe20-\\ufe2f",fQ="\\u20d0-\\u20ff",hQ=uQ+cQ+fQ,pQ="["+hQ+"]",dQ=RegExp(pQ,"g");function vQ(ue){return ue=Bs(ue),ue&&ue.replace(lQ,xL).replace(dQ,"")}var Zb=vQ;var mQ=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function gQ(ue){return ue.match(mQ)||[]}var bL=gQ;var yQ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function _Q(ue){return yQ.test(ue)}var wL=_Q;var EL="\\ud800-\\udfff",xQ="\\u0300-\\u036f",bQ="\\ufe20-\\ufe2f",wQ="\\u20d0-\\u20ff",TQ=xQ+bQ+wQ,kL="\\u2700-\\u27bf",CL="a-z\\xdf-\\xf6\\xf8-\\xff",AQ="\\xac\\xb1\\xd7\\xf7",SQ="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",MQ="\\u2000-\\u206f",EQ=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",LL="A-Z\\xc0-\\xd6\\xd8-\\xde",kQ="\\ufe0e\\ufe0f",PL=AQ+SQ+MQ+EQ,IL="['\u2019]",TL="["+PL+"]",CQ="["+TQ+"]",RL="\\d+",LQ="["+kL+"]",DL="["+CL+"]",zL="[^"+EL+PL+RL+kL+CL+LL+"]",PQ="\\ud83c[\\udffb-\\udfff]",IQ="(?:"+CQ+"|"+PQ+")",RQ="[^"+EL+"]",FL="(?:\\ud83c[\\udde6-\\uddff]){2}",OL="[\\ud800-\\udbff][\\udc00-\\udfff]",my="["+LL+"]",DQ="\\u200d",AL="(?:"+DL+"|"+zL+")",zQ="(?:"+my+"|"+zL+")",SL="(?:"+IL+"(?:d|ll|m|re|s|t|ve))?",ML="(?:"+IL+"(?:D|LL|M|RE|S|T|VE))?",BL=IQ+"?",NL="["+kQ+"]?",FQ="(?:"+DQ+"(?:"+[RQ,FL,OL].join("|")+")"+NL+BL+")*",OQ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",BQ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",NQ=NL+BL+FQ,UQ="(?:"+[LQ,FL,OL].join("|")+")"+NQ,jQ=RegExp([my+"?"+DL+"+"+SL+"(?="+[TL,my,"$"].join("|")+")",zQ+"+"+ML+"(?="+[TL,my+AL,"$"].join("|")+")",my+"?"+AL+"+"+SL,my+"+"+ML,BQ,OQ,RL,UQ].join("|"),"g");function qQ(ue){return ue.match(jQ)||[]}var UL=qQ;function VQ(ue,ge,Ye){return ue=Bs(ue),ge=Ye?void 0:ge,ge===void 0?wL(ue)?UL(ue):bL(ue):ue.match(ge)||[]}var Yb=VQ;var GQ="['\u2019]",HQ=RegExp(GQ,"g");function WQ(ue){return function(ge){return dy(Yb(Zb(ge).replace(HQ,"")),ue,"")}}var Cd=WQ;var XQ=Cd(function(ue,ge,Ye){return ge=ge.toLowerCase(),ue+(Ye?Xb(ge):ge)}),jL=XQ;function ZQ(){if(!arguments.length)return[];var ue=arguments[0];return Io(ue)?ue:[ue]}var qL=ZQ;var YQ=wu.isFinite,KQ=Math.min;function JQ(ue){var ge=Math[ue];return function(Ye,Rt){if(Ye=Sh(Ye),Rt=Rt==null?0:KQ(jo(Rt),292),Rt&&YQ(Ye)){var gr=(Bs(Ye)+"e").split("e"),Yr=ge(gr[0]+"e"+(+gr[1]+Rt));return gr=(Bs(Yr)+"e").split("e"),+(gr[0]+"e"+(+gr[1]-Rt))}return ge(Ye)}}var gy=JQ;var $Q=gy("ceil"),VL=$Q;function QQ(ue){var ge=va(ue);return ge.__chain__=!0,ge}var Kb=QQ;var eee=Math.ceil,tee=Math.max;function ree(ue,ge,Ye){(Ye?Nc(ue,ge,Ye):ge===void 0)?ge=1:ge=tee(jo(ge),0);var Rt=ue==null?0:ue.length;if(!Rt||ge<1)return[];for(var gr=0,Yr=0,Ea=Array(eee(Rt/ge));gr<Rt;)Ea[Yr++]=Yf(ue,gr,gr+=ge);return Ea}var GL=ree;function aee(ue,ge,Ye){return ue===ue&&(Ye!==void 0&&(ue=ue<=Ye?ue:Ye),ge!==void 0&&(ue=ue>=ge?ue:ge)),ue}var ud=aee;function iee(ue,ge,Ye){return Ye===void 0&&(Ye=ge,ge=void 0),Ye!==void 0&&(Ye=Sh(Ye),Ye=Ye===Ye?Ye:0),ge!==void 0&&(ge=Sh(ge),ge=ge===ge?ge:0),ud(Sh(ue),ge,Ye)}var HL=iee;function nee(){this.__data__=new Lm,this.size=0}var WL=nee;function oee(ue){var ge=this.__data__,Ye=ge.delete(ue);return this.size=ge.size,Ye}var XL=oee;function see(ue){return this.__data__.get(ue)}var ZL=see;function lee(ue){return this.__data__.has(ue)}var YL=lee;var uee=200;function cee(ue,ge){var Ye=this.__data__;if(Ye instanceof Lm){var Rt=Ye.__data__;if(!Pm||Rt.length<uee-1)return Rt.push([ue,ge]),this.size=++Ye.size,this;Ye=this.__data__=new V0(Rt)}return Ye.set(ue,ge),this.size=Ye.size,this}var KL=cee;function yy(ue){var ge=this.__data__=new Lm(ue);this.size=ge.size}yy.prototype.clear=WL;yy.prototype.delete=XL;yy.prototype.get=ZL;yy.prototype.has=YL;yy.prototype.set=KL;var yv=yy;function fee(ue,ge){return ue&&Mh(ge,gu(ge),ue)}var Jb=fee;function hee(ue,ge){return ue&&Mh(ge,Gc(ge),ue)}var JL=hee;var tP=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$L=tP&&typeof module=="object"&&module&&!module.nodeType&&module,pee=$L&&$L.exports===tP,QL=pee?wu.Buffer:void 0,eP=QL?QL.allocUnsafe:void 0;function dee(ue,ge){if(ge)return ue.slice();var Ye=ue.length,Rt=eP?eP(Ye):new ue.constructor(Ye);return ue.copy(Rt),Rt}var $b=dee;function vee(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length,gr=0,Yr=[];++Ye<Rt;){var Ea=ue[Ye];ge(Ea,Ye,ue)&&(Yr[gr++]=Ea)}return Yr}var Np=vee;function mee(){return[]}var _y=mee;var gee=Object.prototype,yee=gee.propertyIsEnumerable,rP=Object.getOwnPropertySymbols,_ee=rP?function(ue){return ue==null?[]:(ue=Object(ue),Np(rP(ue),function(ge){return yee.call(ue,ge)}))}:_y,xy=_ee;function xee(ue,ge){return Mh(ue,xy(ue),ge)}var aP=xee;var bee=Object.getOwnPropertySymbols,wee=bee?function(ue){for(var ge=[];ue;)Op(ge,xy(ue)),ue=Rm(ue);return ge}:_y,Qb=wee;function Tee(ue,ge){return Mh(ue,Qb(ue),ge)}var iP=Tee;function Aee(ue,ge,Ye){var Rt=ge(ue);return Io(ue)?Rt:Op(Rt,Ye(ue))}var ew=Aee;function See(ue){return ew(ue,gu,xy)}var l_=See;function Mee(ue){return ew(ue,Gc,Qb)}var by=Mee;var Eee=sd(wu,"DataView"),tw=Eee;var kee=sd(wu,"Promise"),rw=kee;var Cee=sd(wu,"Set"),Dm=Cee;var nP="[object Map]",Lee="[object Object]",oP="[object Promise]",sP="[object Set]",lP="[object WeakMap]",uP="[object DataView]",Pee=jv(tw),Iee=jv(Pm),Ree=jv(rw),Dee=jv(Dm),zee=jv(q0),G0=Oc;(tw&&G0(new tw(new ArrayBuffer(1)))!=uP||Pm&&G0(new Pm)!=nP||rw&&G0(rw.resolve())!=oP||Dm&&G0(new Dm)!=sP||q0&&G0(new q0)!=lP)&&(G0=function(ue){var ge=Oc(ue),Ye=ge==Lee?ue.constructor:void 0,Rt=Ye?jv(Ye):"";if(Rt)switch(Rt){case Pee:return uP;case Iee:return nP;case Ree:return oP;case Dee:return sP;case zee:return lP}return ge});var jh=G0;var Fee=Object.prototype,Oee=Fee.hasOwnProperty;function Bee(ue){var ge=ue.length,Ye=new ue.constructor(ge);return ge&&typeof ue[0]=="string"&&Oee.call(ue,"index")&&(Ye.index=ue.index,Ye.input=ue.input),Ye}var cP=Bee;var Nee=wu.Uint8Array,wy=Nee;function Uee(ue){var ge=new ue.constructor(ue.byteLength);return new wy(ge).set(new wy(ue)),ge}var Ty=Uee;function jee(ue,ge){var Ye=ge?Ty(ue.buffer):ue.buffer;return new ue.constructor(Ye,ue.byteOffset,ue.byteLength)}var fP=jee;var qee=/\w*$/;function Vee(ue){var ge=new ue.constructor(ue.source,qee.exec(ue));return ge.lastIndex=ue.lastIndex,ge}var hP=Vee;var pP=If?If.prototype:void 0,dP=pP?pP.valueOf:void 0;function Gee(ue){return dP?Object(dP.call(ue)):{}}var vP=Gee;function Hee(ue,ge){var Ye=ge?Ty(ue.buffer):ue.buffer;return new ue.constructor(Ye,ue.byteOffset,ue.length)}var aw=Hee;var Wee="[object Boolean]",Xee="[object Date]",Zee="[object Map]",Yee="[object Number]",Kee="[object RegExp]",Jee="[object Set]",$ee="[object String]",Qee="[object Symbol]",ete="[object ArrayBuffer]",tte="[object DataView]",rte="[object Float32Array]",ate="[object Float64Array]",ite="[object Int8Array]",nte="[object Int16Array]",ote="[object Int32Array]",ste="[object Uint8Array]",lte="[object Uint8ClampedArray]",ute="[object Uint16Array]",cte="[object Uint32Array]";function fte(ue,ge,Ye){var Rt=ue.constructor;switch(ge){case ete:return Ty(ue);case Wee:case Xee:return new Rt(+ue);case tte:return fP(ue,Ye);case rte:case ate:case ite:case nte:case ote:case ste:case lte:case ute:case cte:return aw(ue,Ye);case Zee:return new Rt;case Yee:case $ee:return new Rt(ue);case Kee:return hP(ue);case Jee:return new Rt;case Qee:return vP(ue)}}var mP=fte;function hte(ue){return typeof ue.constructor=="function"&&!mv(ue)?Td(Rm(ue)):{}}var iw=hte;var pte="[object Map]";function dte(ue){return Dl(ue)&&jh(ue)==pte}var gP=dte;var yP=sp&&sp.isMap,vte=yP?wf(yP):gP,nw=vte;var mte="[object Set]";function gte(ue){return Dl(ue)&&jh(ue)==mte}var _P=gte;var xP=sp&&sp.isSet,yte=xP?wf(xP):_P,ow=yte;var _te=1,xte=2,bte=4,bP="[object Arguments]",wte="[object Array]",Tte="[object Boolean]",Ate="[object Date]",Ste="[object Error]",wP="[object Function]",Mte="[object GeneratorFunction]",Ete="[object Map]",kte="[object Number]",TP="[object Object]",Cte="[object RegExp]",Lte="[object Set]",Pte="[object String]",Ite="[object Symbol]",Rte="[object WeakMap]",Dte="[object ArrayBuffer]",zte="[object DataView]",Fte="[object Float32Array]",Ote="[object Float64Array]",Bte="[object Int8Array]",Nte="[object Int16Array]",Ute="[object Int32Array]",jte="[object Uint8Array]",qte="[object Uint8ClampedArray]",Vte="[object Uint16Array]",Gte="[object Uint32Array]",df={};df[bP]=df[wte]=df[Dte]=df[zte]=df[Tte]=df[Ate]=df[Fte]=df[Ote]=df[Bte]=df[Nte]=df[Ute]=df[Ete]=df[kte]=df[TP]=df[Cte]=df[Lte]=df[Pte]=df[Ite]=df[jte]=df[qte]=df[Vte]=df[Gte]=!0;df[Ste]=df[wP]=df[Rte]=!1;function sw(ue,ge,Ye,Rt,gr,Yr){var Ea,ei=ge&_te,oi=ge&xte,Cn=ge&bte;if(Ye&&(Ea=gr?Ye(ue,Rt,gr,Yr):Ye(ue)),Ea!==void 0)return Ea;if(!Ll(ue))return ue;var bn=Io(ue);if(bn){if(Ea=cP(ue),!ei)return pf(ue,Ea)}else{var Fn=jh(ue),To=Fn==wP||Fn==Mte;if(Kp(ue))return $b(ue,ei);if(Fn==TP||Fn==bP||To&&!gr){if(Ea=oi||To?{}:iw(ue),!ei)return oi?iP(ue,JL(Ea,ue)):aP(ue,Jb(Ea,ue))}else{if(!df[Fn])return gr?ue:{};Ea=mP(ue,Fn,ei)}}Yr||(Yr=new yv);var ds=Yr.get(ue);if(ds)return ds;Yr.set(ue,Ea),ow(ue)?ue.forEach(function(Xe){Ea.add(sw(Xe,ge,Ye,Xe,ue,Yr))}):nw(ue)&&ue.forEach(function(Xe,Kl){Ea.set(Kl,sw(Xe,ge,Ye,Kl,ue,Yr))});var Qs=Cn?oi?by:l_:oi?Gc:gu,Vo=bn?void 0:Qs(ue);return Nh(Vo||ue,function(Xe,Kl){Vo&&(Kl=Xe,Xe=ue[Kl]),vv(Ea,Kl,sw(Xe,ge,Ye,Kl,ue,Yr))}),Ea}var up=sw;var Hte=4;function Wte(ue){return up(ue,Hte)}var AP=Wte;var Xte=1,Zte=4;function Yte(ue){return up(ue,Xte|Zte)}var SP=Yte;var Kte=1,Jte=4;function $te(ue,ge){return ge=typeof ge=="function"?ge:void 0,up(ue,Kte|Jte,ge)}var MP=$te;var Qte=4;function ere(ue,ge){return ge=typeof ge=="function"?ge:void 0,up(ue,Qte,ge)}var EP=ere;function tre(){return new zp(this.value(),this.__chain__)}var kP=tre;function rre(ue){for(var ge=-1,Ye=ue==null?0:ue.length,Rt=0,gr=[];++ge<Ye;){var Yr=ue[ge];Yr&&(gr[Rt++]=Yr)}return gr}var CP=rre;function are(){var ue=arguments.length;if(!ue)return[];for(var ge=Array(ue-1),Ye=arguments[0],Rt=ue;Rt--;)ge[Rt-1]=arguments[Rt];return Op(Io(Ye)?pf(Ye):[Ye],Qu(ge,1))}var LP=are;var ire="__lodash_hash_undefined__";function nre(ue){return this.__data__.set(ue,ire),this}var PP=nre;function ore(ue){return this.__data__.has(ue)}var IP=ore;function lw(ue){var ge=-1,Ye=ue==null?0:ue.length;for(this.__data__=new V0;++ge<Ye;)this.add(ue[ge])}lw.prototype.add=lw.prototype.push=PP;lw.prototype.has=IP;var zm=lw;function sre(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length;++Ye<Rt;)if(ge(ue[Ye],Ye,ue))return!0;return!1}var Ay=sre;function lre(ue,ge){return ue.has(ge)}var Gv=lre;var ure=1,cre=2;function fre(ue,ge,Ye,Rt,gr,Yr){var Ea=Ye&ure,ei=ue.length,oi=ge.length;if(ei!=oi&&!(Ea&&oi>ei))return!1;var Cn=Yr.get(ue),bn=Yr.get(ge);if(Cn&&bn)return Cn==ge&&bn==ue;var Fn=-1,To=!0,ds=Ye&cre?new zm:void 0;for(Yr.set(ue,ge),Yr.set(ge,ue);++Fn<ei;){var Qs=ue[Fn],Vo=ge[Fn];if(Rt)var Xe=Ea?Rt(Vo,Qs,Fn,ge,ue,Yr):Rt(Qs,Vo,Fn,ue,ge,Yr);if(Xe!==void 0){if(Xe)continue;To=!1;break}if(ds){if(!Ay(ge,function(Kl,nu){if(!Gv(ds,nu)&&(Qs===Kl||gr(Qs,Kl,Ye,Rt,Yr)))return ds.push(nu)})){To=!1;break}}else if(!(Qs===Vo||gr(Qs,Vo,Ye,Rt,Yr))){To=!1;break}}return Yr.delete(ue),Yr.delete(ge),To}var uw=fre;function hre(ue){var ge=-1,Ye=Array(ue.size);return ue.forEach(function(Rt,gr){Ye[++ge]=[gr,Rt]}),Ye}var Sy=hre;function pre(ue){var ge=-1,Ye=Array(ue.size);return ue.forEach(function(Rt){Ye[++ge]=Rt}),Ye}var Fm=pre;var dre=1,vre=2,mre="[object Boolean]",gre="[object Date]",yre="[object Error]",_re="[object Map]",xre="[object Number]",bre="[object RegExp]",wre="[object Set]",Tre="[object String]",Are="[object Symbol]",Sre="[object ArrayBuffer]",Mre="[object DataView]",RP=If?If.prototype:void 0,zA=RP?RP.valueOf:void 0;function Ere(ue,ge,Ye,Rt,gr,Yr,Ea){switch(Ye){case Mre:if(ue.byteLength!=ge.byteLength||ue.byteOffset!=ge.byteOffset)return!1;ue=ue.buffer,ge=ge.buffer;case Sre:return!(ue.byteLength!=ge.byteLength||!Yr(new wy(ue),new wy(ge)));case mre:case gre:case xre:return oh(+ue,+ge);case yre:return ue.name==ge.name&&ue.message==ge.message;case bre:case Tre:return ue==ge+"";case _re:var ei=Sy;case wre:var oi=Rt&dre;if(ei||(ei=Fm),ue.size!=ge.size&&!oi)return!1;var Cn=Ea.get(ue);if(Cn)return Cn==ge;Rt|=vre,Ea.set(ue,ge);var bn=uw(ei(ue),ei(ge),Rt,gr,Yr,Ea);return Ea.delete(ue),bn;case Are:if(zA)return zA.call(ue)==zA.call(ge)}return!1}var DP=Ere;var kre=1,Cre=Object.prototype,Lre=Cre.hasOwnProperty;function Pre(ue,ge,Ye,Rt,gr,Yr){var Ea=Ye&kre,ei=l_(ue),oi=ei.length,Cn=l_(ge),bn=Cn.length;if(oi!=bn&&!Ea)return!1;for(var Fn=oi;Fn--;){var To=ei[Fn];if(!(Ea?To in ge:Lre.call(ge,To)))return!1}var ds=Yr.get(ue),Qs=Yr.get(ge);if(ds&&Qs)return ds==ge&&Qs==ue;var Vo=!0;Yr.set(ue,ge),Yr.set(ge,ue);for(var Xe=Ea;++Fn<oi;){To=ei[Fn];var Kl=ue[To],nu=ge[To];if(Rt)var jp=Ea?Rt(nu,Kl,To,ge,ue,Yr):Rt(Kl,nu,To,ue,ge,Yr);if(!(jp===void 0?Kl===nu||gr(Kl,nu,Ye,Rt,Yr):jp)){Vo=!1;break}Xe||(Xe=To=="constructor")}if(Vo&&!Xe){var zf=ue.constructor,fp=ge.constructor;zf!=fp&&"constructor"in ue&&"constructor"in ge&&!(typeof zf=="function"&&zf instanceof zf&&typeof fp=="function"&&fp instanceof fp)&&(Vo=!1)}return Yr.delete(ue),Yr.delete(ge),Vo}var zP=Pre;var Ire=1,FP="[object Arguments]",OP="[object Array]",cw="[object Object]",Rre=Object.prototype,BP=Rre.hasOwnProperty;function Dre(ue,ge,Ye,Rt,gr,Yr){var Ea=Io(ue),ei=Io(ge),oi=Ea?OP:jh(ue),Cn=ei?OP:jh(ge);oi=oi==FP?cw:oi,Cn=Cn==FP?cw:Cn;var bn=oi==cw,Fn=Cn==cw,To=oi==Cn;if(To&&Kp(ue)){if(!Kp(ge))return!1;Ea=!0,bn=!1}if(To&&!bn)return Yr||(Yr=new yv),Ea||Ed(ue)?uw(ue,ge,Ye,Rt,gr,Yr):DP(ue,ge,oi,Ye,Rt,gr,Yr);if(!(Ye&Ire)){var ds=bn&&BP.call(ue,"__wrapped__"),Qs=Fn&&BP.call(ge,"__wrapped__");if(ds||Qs){var Vo=ds?ue.value():ue,Xe=Qs?ge.value():ge;return Yr||(Yr=new yv),gr(Vo,Xe,Ye,Rt,Yr)}}return To?(Yr||(Yr=new yv),zP(ue,ge,Ye,Rt,gr,Yr)):!1}var NP=Dre;function UP(ue,ge,Ye,Rt,gr){return ue===ge?!0:ue==null||ge==null||!Dl(ue)&&!Dl(ge)?ue!==ue&&ge!==ge:NP(ue,ge,Ye,Rt,UP,gr)}var Om=UP;var zre=1,Fre=2;function Ore(ue,ge,Ye,Rt){var gr=Ye.length,Yr=gr,Ea=!Rt;if(ue==null)return!Yr;for(ue=Object(ue);gr--;){var ei=Ye[gr];if(Ea&&ei[2]?ei[1]!==ue[ei[0]]:!(ei[0]in ue))return!1}for(;++gr<Yr;){ei=Ye[gr];var oi=ei[0],Cn=ue[oi],bn=ei[1];if(Ea&&ei[2]){if(Cn===void 0&&!(oi in ue))return!1}else{var Fn=new yv;if(Rt)var To=Rt(Cn,bn,oi,ue,ge,Fn);if(!(To===void 0?Om(bn,Cn,zre|Fre,Rt,Fn):To))return!1}}return!0}var My=Ore;function Bre(ue){return ue===ue&&!Ll(ue)}var fw=Bre;function Nre(ue){for(var ge=gu(ue),Ye=ge.length;Ye--;){var Rt=ge[Ye],gr=ue[Rt];ge[Ye]=[Rt,gr,fw(gr)]}return ge}var Ey=Nre;function Ure(ue,ge){return function(Ye){return Ye==null?!1:Ye[ue]===ge&&(ge!==void 0||ue in Object(Ye))}}var hw=Ure;function jre(ue){var ge=Ey(ue);return ge.length==1&&ge[0][2]?hw(ge[0][0],ge[0][1]):function(Ye){return Ye===ue||My(Ye,ue,ge)}}var pw=jre;function qre(ue,ge){return ue!=null&&ge in Object(ue)}var jP=qre;function Vre(ue,ge,Ye){ge=Fp(ge,ue);for(var Rt=-1,gr=ge.length,Yr=!1;++Rt<gr;){var Ea=Eh(ge[Rt]);if(!(Yr=ue!=null&&Ye(ue,Ea)))break;ue=ue[Ea]}return Yr||++Rt!=gr?Yr:(gr=ue==null?0:ue.length,!!gr&&Em(gr)&&ip(Ea,gr)&&(Io(ue)||pd(ue)))}var dw=Vre;function Gre(ue,ge){return ue!=null&&dw(ue,ge,jP)}var ky=Gre;var Hre=1,Wre=2;function Xre(ue,ge){return oy(ue)&&fw(ge)?hw(Eh(ue),ge):function(Ye){var Rt=cy(Ye,ue);return Rt===void 0&&Rt===ge?ky(Ye,ue):Om(ge,Rt,Hre|Wre)}}var vw=Xre;function Zre(ue){return function(ge){return ge?.[ue]}}var Cy=Zre;function Yre(ue){return function(ge){return ld(ge,ue)}}var qP=Yre;function Kre(ue){return oy(ue)?Cy(Eh(ue)):qP(ue)}var mw=Kre;function Jre(ue){return typeof ue=="function"?ue:ue==null?Bc:typeof ue=="object"?Io(ue)?vw(ue[0],ue[1]):pw(ue):mw(ue)}var xo=Jre;var $re="Expected a function";function Qre(ue){var ge=ue==null?0:ue.length,Ye=xo;return ue=ge?Ml(ue,function(Rt){if(typeof Rt[1]!="function")throw new TypeError($re);return[Ye(Rt[0]),Rt[1]]}):[],qo(function(Rt){for(var gr=-1;++gr<ge;){var Yr=ue[gr];if(xf(Yr[0],this,Rt))return xf(Yr[1],this,Rt)}})}var VP=Qre;function eae(ue,ge,Ye){var Rt=Ye.length;if(ue==null)return!Rt;for(ue=Object(ue);Rt--;){var gr=Ye[Rt],Yr=ge[gr],Ea=ue[gr];if(Ea===void 0&&!(gr in ue)||!Yr(Ea))return!1}return!0}var gw=eae;function tae(ue){var ge=gu(ue);return function(Ye){return gw(Ye,ue,ge)}}var GP=tae;var rae=1;function aae(ue){return GP(up(ue,rae))}var HP=aae;function iae(ue,ge){return ge==null||gw(ue,ge,gu(ge))}var WP=iae;function nae(ue,ge,Ye,Rt){for(var gr=-1,Yr=ue==null?0:ue.length;++gr<Yr;){var Ea=ue[gr];ge(Rt,Ea,Ye(Ea),ue)}return Rt}var XP=nae;function oae(ue){return function(ge,Ye,Rt){for(var gr=-1,Yr=Object(ge),Ea=Rt(ge),ei=Ea.length;ei--;){var oi=Ea[ue?ei:++gr];if(Ye(Yr[oi],oi,Yr)===!1)break}return ge}}var yw=oae;var sae=yw(),Ly=sae;function lae(ue,ge){return ue&&Ly(ue,ge,gu)}var cp=lae;function uae(ue,ge){return function(Ye,Rt){if(Ye==null)return Ye;if(!Vc(Ye))return ue(Ye,Rt);for(var gr=Ye.length,Yr=ge?gr:-1,Ea=Object(Ye);(ge?Yr--:++Yr<gr)&&Rt(Ea[Yr],Yr,Ea)!==!1;);return Ye}}var _w=uae;var cae=_w(cp),Up=cae;function fae(ue,ge,Ye,Rt){return Up(ue,function(gr,Yr,Ea){ge(Rt,gr,Ye(gr),Ea)}),Rt}var ZP=fae;function hae(ue,ge){return function(Ye,Rt){var gr=Io(Ye)?XP:ZP,Yr=ge?ge():{};return gr(Ye,ue,xo(Rt,2),Yr)}}var Bm=hae;var pae=Object.prototype,dae=pae.hasOwnProperty,vae=Bm(function(ue,ge,Ye){dae.call(ue,Ye)?++ue[Ye]:op(ue,Ye,1)}),YP=vae;function mae(ue,ge){var Ye=Td(ue);return ge==null?Ye:Jb(Ye,ge)}var KP=mae;var gae=8;function FA(ue,ge,Ye){ge=Ye?void 0:ge;var Rt=np(ue,gae,void 0,void 0,void 0,void 0,void 0,ge);return Rt.placeholder=FA.placeholder,Rt}FA.placeholder={};var JP=FA;var yae=16;function OA(ue,ge,Ye){ge=Ye?void 0:ge;var Rt=np(ue,yae,void 0,void 0,void 0,void 0,void 0,ge);return Rt.placeholder=OA.placeholder,Rt}OA.placeholder={};var $P=OA;var _ae=function(){return wu.Date.now()},Py=_ae;var xae="Expected a function",bae=Math.max,wae=Math.min;function Tae(ue,ge,Ye){var Rt,gr,Yr,Ea,ei,oi,Cn=0,bn=!1,Fn=!1,To=!0;if(typeof ue!="function")throw new TypeError(xae);ge=Sh(ge)||0,Ll(Ye)&&(bn=!!Ye.leading,Fn="maxWait"in Ye,Yr=Fn?bae(Sh(Ye.maxWait)||0,ge):Yr,To="trailing"in Ye?!!Ye.trailing:To);function ds(Ff){var Hn=Rt,dd=gr;return Rt=gr=void 0,Cn=Ff,Ea=ue.apply(dd,Hn),Ea}function Qs(Ff){return Cn=Ff,ei=setTimeout(Kl,ge),bn?ds(Ff):Ea}function Vo(Ff){var Hn=Ff-oi,dd=Ff-Cn,Xv=ge-Hn;return Fn?wae(Xv,Yr-dd):Xv}function Xe(Ff){var Hn=Ff-oi,dd=Ff-Cn;return oi===void 0||Hn>=ge||Hn<0||Fn&&dd>=Yr}function Kl(){var Ff=Py();if(Xe(Ff))return nu(Ff);ei=setTimeout(Kl,Vo(Ff))}function nu(Ff){return ei=void 0,To&&Rt?ds(Ff):(Rt=gr=void 0,Ea)}function jp(){ei!==void 0&&clearTimeout(ei),Cn=0,Rt=oi=gr=ei=void 0}function zf(){return ei===void 0?Ea:nu(Py())}function fp(){var Ff=Py(),Hn=Xe(Ff);if(Rt=arguments,gr=this,oi=Ff,Hn){if(ei===void 0)return Qs(oi);if(Fn)return clearTimeout(ei),ei=setTimeout(Kl,ge),ds(oi)}return ei===void 0&&(ei=setTimeout(Kl,ge)),Ea}return fp.cancel=jp,fp.flush=zf,fp}var xw=Tae;function Aae(ue,ge){return ue==null||ue!==ue?ge:ue}var QP=Aae;var eI=Object.prototype,Sae=eI.hasOwnProperty,Mae=qo(function(ue,ge){ue=Object(ue);var Ye=-1,Rt=ge.length,gr=Rt>2?ge[2]:void 0;for(gr&&Nc(ge[0],ge[1],gr)&&(Rt=1);++Ye<Rt;)for(var Yr=ge[Ye],Ea=Gc(Yr),ei=-1,oi=Ea.length;++ei<oi;){var Cn=Ea[ei],bn=ue[Cn];(bn===void 0||oh(bn,eI[Cn])&&!Sae.call(ue,Cn))&&(ue[Cn]=Yr[Cn])}return ue}),tI=Mae;function Eae(ue,ge,Ye){(Ye!==void 0&&!oh(ue[ge],Ye)||Ye===void 0&&!(ge in ue))&&op(ue,ge,Ye)}var u_=Eae;function kae(ue){return Dl(ue)&&Vc(ue)}var Eu=kae;function Cae(ue,ge){if(!(ge==="constructor"&&typeof ue[ge]=="function")&&ge!="__proto__")return ue[ge]}var c_=Cae;function Lae(ue){return Mh(ue,Gc(ue))}var bw=Lae;function Pae(ue,ge,Ye,Rt,gr,Yr,Ea){var ei=c_(ue,Ye),oi=c_(ge,Ye),Cn=Ea.get(oi);if(Cn){u_(ue,Ye,Cn);return}var bn=Yr?Yr(ei,oi,Ye+"",ue,ge,Ea):void 0,Fn=bn===void 0;if(Fn){var To=Io(oi),ds=!To&&Kp(oi),Qs=!To&&!ds&&Ed(oi);bn=oi,To||ds||Qs?Io(ei)?bn=ei:Eu(ei)?bn=pf(ei):ds?(Fn=!1,bn=$b(oi,!0)):Qs?(Fn=!1,bn=aw(oi,!0)):bn=[]:gv(oi)||pd(oi)?(bn=ei,pd(ei)?bn=bw(ei):(!Ll(ei)||ap(ei))&&(bn=iw(oi))):Fn=!1}Fn&&(Ea.set(oi,bn),gr(bn,oi,Rt,Yr,Ea),Ea.delete(oi)),u_(ue,Ye,bn)}var rI=Pae;function aI(ue,ge,Ye,Rt,gr){ue!==ge&&Ly(ge,function(Yr,Ea){if(gr||(gr=new yv),Ll(Yr))rI(ue,ge,Ea,Ye,aI,Rt,gr);else{var ei=Rt?Rt(c_(ue,Ea),Yr,Ea+"",ue,ge,gr):void 0;ei===void 0&&(ei=Yr),u_(ue,Ea,ei)}},Gc)}var Iy=aI;function iI(ue,ge,Ye,Rt,gr,Yr){return Ll(ue)&&Ll(ge)&&(Yr.set(ge,ue),Iy(ue,ge,void 0,iI,Yr),Yr.delete(ge)),ue}var nI=iI;var Iae=Md(function(ue,ge,Ye,Rt){Iy(ue,ge,Ye,Rt)}),ww=Iae;var Rae=qo(function(ue){return ue.push(void 0,nI),xf(ww,void 0,ue)}),oI=Rae;var Dae="Expected a function";function zae(ue,ge,Ye){if(typeof ue!="function")throw new TypeError(Dae);return setTimeout(function(){ue.apply(void 0,Ye)},ge)}var Tw=zae;var Fae=qo(function(ue,ge){return Tw(ue,1,ge)}),sI=Fae;var Oae=qo(function(ue,ge,Ye){return Tw(ue,Sh(ge)||0,Ye)}),lI=Oae;function Bae(ue,ge,Ye){for(var Rt=-1,gr=ue==null?0:ue.length;++Rt<gr;)if(Ye(ge,ue[Rt]))return!0;return!1}var Ry=Bae;var Nae=200;function Uae(ue,ge,Ye,Rt){var gr=-1,Yr=Mm,Ea=!0,ei=ue.length,oi=[],Cn=ge.length;if(!ei)return oi;Ye&&(ge=Ml(ge,wf(Ye))),Rt?(Yr=Ry,Ea=!1):ge.length>=Nae&&(Yr=Gv,Ea=!1,ge=new zm(ge));e:for(;++gr<ei;){var bn=ue[gr],Fn=Ye==null?bn:Ye(bn);if(bn=Rt||bn!==0?bn:0,Ea&&Fn===Fn){for(var To=Cn;To--;)if(ge[To]===Fn)continue e;oi.push(bn)}else Yr(ge,Fn,Rt)||oi.push(bn)}return oi}var _v=Uae;var jae=qo(function(ue,ge){return Eu(ue)?_v(ue,Qu(ge,1,Eu,!0)):[]}),uI=jae;function qae(ue){var ge=ue==null?0:ue.length;return ge?ue[ge-1]:void 0}var Tf=qae;var Vae=qo(function(ue,ge){var Ye=Tf(ge);return Eu(Ye)&&(Ye=void 0),Eu(ue)?_v(ue,Qu(ge,1,Eu,!0),xo(Ye,2)):[]}),cI=Vae;var Gae=qo(function(ue,ge){var Ye=Tf(ge);return Eu(Ye)&&(Ye=void 0),Eu(ue)?_v(ue,Qu(ge,1,Eu,!0),void 0,Ye):[]}),fI=Gae;var Hae=wm(function(ue,ge){return ue/ge},1),hI=Hae;function Wae(ue,ge,Ye){var Rt=ue==null?0:ue.length;return Rt?(ge=Ye||ge===void 0?1:jo(ge),Yf(ue,ge<0?0:ge,Rt)):[]}var pI=Wae;function Xae(ue,ge,Ye){var Rt=ue==null?0:ue.length;return Rt?(ge=Ye||ge===void 0?1:jo(ge),ge=Rt-ge,Yf(ue,0,ge<0?0:ge)):[]}var dI=Xae;function Zae(ue,ge,Ye,Rt){for(var gr=ue.length,Yr=Rt?gr:-1;(Rt?Yr--:++Yr<gr)&&ge(ue[Yr],Yr,ue););return Ye?Yf(ue,Rt?0:Yr,Rt?Yr+1:gr):Yf(ue,Rt?Yr+1:0,Rt?gr:Yr)}var Nm=Zae;function Yae(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3),!0,!0):[]}var vI=Yae;function Kae(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3),!0):[]}var mI=Kae;function Jae(ue){return typeof ue=="function"?ue:Bc}var kh=Jae;function $ae(ue,ge){var Ye=Io(ue)?Nh:Up;return Ye(ue,kh(ge))}var f_=$ae;function Qae(ue,ge){for(var Ye=ue==null?0:ue.length;Ye--&&ge(ue[Ye],Ye,ue)!==!1;);return ue}var gI=Qae;var eie=yw(!0),Aw=eie;function tie(ue,ge){return ue&&Aw(ue,ge,gu)}var Dy=tie;var rie=_w(Dy,!0),Sw=rie;function aie(ue,ge){var Ye=Io(ue)?gI:Sw;return Ye(ue,kh(ge))}var h_=aie;function iie(ue,ge,Ye){ue=Bs(ue),ge=nh(ge);var Rt=ue.length;Ye=Ye===void 0?Rt:ud(jo(Ye),0,Rt);var gr=Ye;return Ye-=ge.length,Ye>=0&&ue.slice(Ye,gr)==ge}var yI=iie;function nie(ue,ge){return Ml(ge,function(Ye){return[Ye,ue[Ye]]})}var _I=nie;function oie(ue){var ge=-1,Ye=Array(ue.size);return ue.forEach(function(Rt){Ye[++ge]=[Rt,Rt]}),Ye}var xI=oie;var sie="[object Map]",lie="[object Set]";function uie(ue){return function(ge){var Ye=jh(ge);return Ye==sie?Sy(ge):Ye==lie?xI(ge):_I(ge,ue(ge))}}var Mw=uie;var cie=Mw(gu),p_=cie;var fie=Mw(Gc),d_=fie;var hie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pie=vy(hie),bI=pie;var wI=/[&<>"']/g,die=RegExp(wI.source);function vie(ue){return ue=Bs(ue),ue&&die.test(ue)?ue.replace(wI,bI):ue}var Ew=vie;var TI=/[\\^$.*+?()[\]{}|]/g,mie=RegExp(TI.source);function gie(ue){return ue=Bs(ue),ue&&mie.test(ue)?ue.replace(TI,"\\$&"):ue}var AI=gie;function yie(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length;++Ye<Rt;)if(!ge(ue[Ye],Ye,ue))return!1;return!0}var kw=yie;function _ie(ue,ge){var Ye=!0;return Up(ue,function(Rt,gr,Yr){return Ye=!!ge(Rt,gr,Yr),Ye}),Ye}var SI=_ie;function xie(ue,ge,Ye){var Rt=Io(ue)?kw:SI;return Ye&&Nc(ue,ge,Ye)&&(ge=void 0),Rt(ue,xo(ge,3))}var MI=xie;var bie=4294967295;function wie(ue){return ue?ud(jo(ue),0,bie):0}var Cw=wie;function Tie(ue,ge,Ye,Rt){var gr=ue.length;for(Ye=jo(Ye),Ye<0&&(Ye=-Ye>gr?0:gr+Ye),Rt=Rt===void 0||Rt>gr?gr:jo(Rt),Rt<0&&(Rt+=gr),Rt=Ye>Rt?0:Cw(Rt);Ye<Rt;)ue[Ye++]=ge;return ue}var EI=Tie;function Aie(ue,ge,Ye,Rt){var gr=ue==null?0:ue.length;return gr?(Ye&&typeof Ye!="number"&&Nc(ue,ge,Ye)&&(Ye=0,Rt=gr),EI(ue,ge,Ye,Rt)):[]}var kI=Aie;function Sie(ue,ge){var Ye=[];return Up(ue,function(Rt,gr,Yr){ge(Rt,gr,Yr)&&Ye.push(Rt)}),Ye}var Lw=Sie;function Mie(ue,ge){var Ye=Io(ue)?Np:Lw;return Ye(ue,xo(ge,3))}var CI=Mie;function Eie(ue){return function(ge,Ye,Rt){var gr=Object(ge);if(!Vc(ge)){var Yr=xo(Ye,3);ge=gu(ge),Ye=function(ei){return Yr(gr[ei],ei,gr)}}var Ea=ue(ge,Ye,Rt);return Ea>-1?gr[Yr?ge[Ea]:Ea]:void 0}}var Pw=Eie;var kie=Math.max;function Cie(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Ye==null?0:jo(Ye);return gr<0&&(gr=kie(Rt+gr,0)),Sm(ue,xo(ge,3),gr)}var Iw=Cie;var Lie=Pw(Iw),LI=Lie;function Pie(ue,ge,Ye){var Rt;return Ye(ue,function(gr,Yr,Ea){if(ge(gr,Yr,Ea))return Rt=Yr,!1}),Rt}var Rw=Pie;function Iie(ue,ge){return Rw(ue,xo(ge,3),cp)}var PI=Iie;var Rie=Math.max,Die=Math.min;function zie(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Rt-1;return Ye!==void 0&&(gr=jo(Ye),gr=Ye<0?Rie(Rt+gr,0):Die(gr,Rt-1)),Sm(ue,xo(ge,3),gr,!0)}var Dw=zie;var Fie=Pw(Dw),II=Fie;function Oie(ue,ge){return Rw(ue,xo(ge,3),Dy)}var RI=Oie;function Bie(ue){return ue&&ue.length?ue[0]:void 0}var v_=Bie;function Nie(ue,ge){var Ye=-1,Rt=Vc(ue)?Array(ue.length):[];return Up(ue,function(gr,Yr,Ea){Rt[++Ye]=ge(gr,Yr,Ea)}),Rt}var zw=Nie;function Uie(ue,ge){var Ye=Io(ue)?Ml:zw;return Ye(ue,xo(ge,3))}var Um=Uie;function jie(ue,ge){return Qu(Um(ue,ge),1)}var DI=jie;var qie=1/0;function Vie(ue,ge){return Qu(Um(ue,ge),qie)}var zI=Vie;function Gie(ue,ge,Ye){return Ye=Ye===void 0?1:jo(Ye),Qu(Um(ue,ge),Ye)}var FI=Gie;var Hie=1/0;function Wie(ue){var ge=ue==null?0:ue.length;return ge?Qu(ue,Hie):[]}var OI=Wie;function Xie(ue,ge){var Ye=ue==null?0:ue.length;return Ye?(ge=ge===void 0?1:jo(ge),Qu(ue,ge)):[]}var BI=Xie;var Zie=512;function Yie(ue){return np(ue,Zie)}var NI=Yie;var Kie=gy("floor"),UI=Kie;var Jie="Expected a function",$ie=8,Qie=32,ene=128,tne=256;function rne(ue){return lp(function(ge){var Ye=ge.length,Rt=Ye,gr=zp.prototype.thru;for(ue&&ge.reverse();Rt--;){var Yr=ge[Rt];if(typeof Yr!="function")throw new TypeError(Jie);if(gr&&!Ea&&$g(Yr)=="wrapper")var Ea=new zp([],!0)}for(Rt=Ea?Rt:Ye;++Rt<Ye;){Yr=ge[Rt];var ei=$g(Yr),oi=ei=="wrapper"?Jg(Yr):void 0;oi&&i_(oi[0])&&oi[1]==(ene|$ie|Qie|tne)&&!oi[4].length&&oi[9]==1?Ea=Ea[$g(oi[0])].apply(Ea,oi[3]):Ea=Yr.length==1&&i_(Yr)?Ea[ei]():Ea.thru(Yr)}return function(){var Cn=arguments,bn=Cn[0];if(Ea&&Cn.length==1&&Io(bn))return Ea.plant(bn).value();for(var Fn=0,To=Ye?ge[Fn].apply(this,Cn):bn;++Fn<Ye;)To=ge[Fn].call(this,To);return To}})}var Fw=rne;var ane=Fw(),jI=ane;var ine=Fw(!0),qI=ine;function nne(ue,ge){return ue==null?ue:Ly(ue,kh(ge),Gc)}var VI=nne;function one(ue,ge){return ue==null?ue:Aw(ue,kh(ge),Gc)}var GI=one;function sne(ue,ge){return ue&&cp(ue,kh(ge))}var HI=sne;function lne(ue,ge){return ue&&Dy(ue,kh(ge))}var WI=lne;function une(ue){for(var ge=-1,Ye=ue==null?0:ue.length,Rt={};++ge<Ye;){var gr=ue[ge];Rt[gr[0]]=gr[1]}return Rt}var XI=une;function cne(ue,ge){return Np(ge,function(Ye){return ap(ue[Ye])})}var jm=cne;function fne(ue){return ue==null?[]:jm(ue,gu(ue))}var ZI=fne;function hne(ue){return ue==null?[]:jm(ue,Gc(ue))}var YI=hne;var pne=Object.prototype,dne=pne.hasOwnProperty,vne=Bm(function(ue,ge,Ye){dne.call(ue,Ye)?ue[Ye].push(ge):op(ue,Ye,[ge])}),KI=vne;function mne(ue,ge){return ue>ge}var zy=mne;function gne(ue){return function(ge,Ye){return typeof ge=="string"&&typeof Ye=="string"||(ge=Sh(ge),Ye=Sh(Ye)),ue(ge,Ye)}}var qm=gne;var yne=qm(zy),JI=yne;var _ne=qm(function(ue,ge){return ue>=ge}),$I=_ne;var xne=Object.prototype,bne=xne.hasOwnProperty;function wne(ue,ge){return ue!=null&&bne.call(ue,ge)}var QI=wne;function Tne(ue,ge){return ue!=null&&dw(ue,ge,QI)}var e8=Tne;var Ane=Math.max,Sne=Math.min;function Mne(ue,ge,Ye){return ue>=Sne(ge,Ye)&&ue<Ane(ge,Ye)}var t8=Mne;function Ene(ue,ge,Ye){return ge=od(ge),Ye===void 0?(Ye=ge,ge=0):Ye=od(Ye),ue=Sh(ue),t8(ue,ge,Ye)}var r8=Ene;var kne="[object String]";function Cne(ue){return typeof ue=="string"||!Io(ue)&&Dl(ue)&&Oc(ue)==kne}var Vm=Cne;function Lne(ue,ge){return Ml(ge,function(Ye){return ue[Ye]})}var Fy=Lne;function Pne(ue){return ue==null?[]:Fy(ue,gu(ue))}var Ld=Pne;var Ine=Math.max;function Rne(ue,ge,Ye,Rt){ue=Vc(ue)?ue:Ld(ue),Ye=Ye&&!Rt?jo(Ye):0;var gr=ue.length;return Ye<0&&(Ye=Ine(gr+Ye,0)),Vm(ue)?Ye<=gr&&ue.indexOf(ge,Ye)>-1:!!gr&&Ad(ue,ge,Ye)>-1}var a8=Rne;var Dne=Math.max;function zne(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Ye==null?0:jo(Ye);return gr<0&&(gr=Dne(Rt+gr,0)),Ad(ue,ge,gr)}var i8=zne;function Fne(ue){var ge=ue==null?0:ue.length;return ge?Yf(ue,0,-1):[]}var n8=Fne;var One=Math.min;function Bne(ue,ge,Ye){for(var Rt=Ye?Ry:Mm,gr=ue[0].length,Yr=ue.length,Ea=Yr,ei=Array(Yr),oi=1/0,Cn=[];Ea--;){var bn=ue[Ea];Ea&&ge&&(bn=Ml(bn,wf(ge))),oi=One(bn.length,oi),ei[Ea]=!Ye&&(ge||gr>=120&&bn.length>=120)?new zm(Ea&&bn):void 0}bn=ue[0];var Fn=-1,To=ei[0];e:for(;++Fn<gr&&Cn.length<oi;){var ds=bn[Fn],Qs=ge?ge(ds):ds;if(ds=Ye||ds!==0?ds:0,!(To?Gv(To,Qs):Rt(Cn,Qs,Ye))){for(Ea=Yr;--Ea;){var Vo=ei[Ea];if(!(Vo?Gv(Vo,Qs):Rt(ue[Ea],Qs,Ye)))continue e}To&&To.push(Qs),Cn.push(ds)}}return Cn}var Oy=Bne;function Nne(ue){return Eu(ue)?ue:[]}var By=Nne;var Une=qo(function(ue){var ge=Ml(ue,By);return ge.length&&ge[0]===ue[0]?Oy(ge):[]}),o8=Une;var jne=qo(function(ue){var ge=Tf(ue),Ye=Ml(ue,By);return ge===Tf(Ye)?ge=void 0:Ye.pop(),Ye.length&&Ye[0]===ue[0]?Oy(Ye,xo(ge,2)):[]}),s8=jne;var qne=qo(function(ue){var ge=Tf(ue),Ye=Ml(ue,By);return ge=typeof ge=="function"?ge:void 0,ge&&Ye.pop(),Ye.length&&Ye[0]===ue[0]?Oy(Ye,void 0,ge):[]}),l8=qne;function Vne(ue,ge,Ye,Rt){return cp(ue,function(gr,Yr,Ea){ge(Rt,Ye(gr),Yr,Ea)}),Rt}var u8=Vne;function Gne(ue,ge){return function(Ye,Rt){return u8(Ye,ue,ge(Rt),{})}}var Ow=Gne;var Hne=Object.prototype,Wne=Hne.toString,Xne=Ow(function(ue,ge,Ye){ge!=null&&typeof ge.toString!="function"&&(ge=Wne.call(ge)),ue[ge]=Ye},Qg(Bc)),c8=Xne;var f8=Object.prototype,Zne=f8.hasOwnProperty,Yne=f8.toString,Kne=Ow(function(ue,ge,Ye){ge!=null&&typeof ge.toString!="function"&&(ge=Yne.call(ge)),Zne.call(ue,ge)?ue[ge].push(Ye):ue[ge]=[Ye]},xo),h8=Kne;function Jne(ue,ge){return ge.length<2?ue:ld(ue,Yf(ge,0,-1))}var Bw=Jne;function $ne(ue,ge,Ye){ge=Fp(ge,ue),ue=Bw(ue,ge);var Rt=ue==null?ue:ue[Eh(Tf(ge))];return Rt==null?void 0:xf(Rt,ue,Ye)}var xv=$ne;var Qne=qo(xv),p8=Qne;var eoe=qo(function(ue,ge,Ye){var Rt=-1,gr=typeof ge=="function",Yr=Vc(ue)?Array(ue.length):[];return Up(ue,function(Ea){Yr[++Rt]=gr?xf(ge,Ea,Ye):xv(Ea,ge,Ye)}),Yr}),d8=eoe;var toe="[object ArrayBuffer]";function roe(ue){return Dl(ue)&&Oc(ue)==toe}var v8=roe;var m8=sp&&sp.isArrayBuffer,aoe=m8?wf(m8):v8,g8=aoe;var ioe="[object Boolean]";function noe(ue){return ue===!0||ue===!1||Dl(ue)&&Oc(ue)==ioe}var y8=noe;var ooe="[object Date]";function soe(ue){return Dl(ue)&&Oc(ue)==ooe}var _8=soe;var x8=sp&&sp.isDate,loe=x8?wf(x8):_8,b8=loe;function uoe(ue){return Dl(ue)&&ue.nodeType===1&&!gv(ue)}var w8=uoe;var coe="[object Map]",foe="[object Set]",hoe=Object.prototype,poe=hoe.hasOwnProperty;function doe(ue){if(ue==null)return!0;if(Vc(ue)&&(Io(ue)||typeof ue=="string"||typeof ue.splice=="function"||Kp(ue)||Ed(ue)||pd(ue)))return!ue.length;var ge=jh(ue);if(ge==coe||ge==foe)return!ue.size;if(mv(ue))return!ny(ue).length;for(var Ye in ue)if(poe.call(ue,Ye))return!1;return!0}var T8=doe;function voe(ue,ge){return Om(ue,ge)}var A8=voe;function moe(ue,ge,Ye){Ye=typeof Ye=="function"?Ye:void 0;var Rt=Ye?Ye(ue,ge):void 0;return Rt===void 0?Om(ue,ge,void 0,Ye):!!Rt}var S8=moe;var goe=wu.isFinite;function yoe(ue){return typeof ue=="number"&&goe(ue)}var M8=yoe;function _oe(ue){return typeof ue=="number"&&ue==jo(ue)}var Nw=_oe;function xoe(ue,ge){return ue===ge||My(ue,ge,Ey(ge))}var E8=xoe;function boe(ue,ge,Ye){return Ye=typeof Ye=="function"?Ye:void 0,My(ue,ge,Ey(ge),Ye)}var k8=boe;var woe="[object Number]";function Toe(ue){return typeof ue=="number"||Dl(ue)&&Oc(ue)==woe}var Uw=Toe;function Aoe(ue){return Uw(ue)&&ue!=+ue}var C8=Aoe;var Soe=Zg?ap:iy,L8=Soe;var Moe="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.";function Eoe(ue){if(L8(ue))throw new Error(Moe);return Tb(ue)}var P8=Eoe;function koe(ue){return ue==null}var I8=koe;function Coe(ue){return ue===null}var R8=Coe;var Loe="[object RegExp]";function Poe(ue){return Dl(ue)&&Oc(ue)==Loe}var D8=Poe;var z8=sp&&sp.isRegExp,Ioe=z8?wf(z8):D8,Ny=Ioe;var F8=9007199254740991;function Roe(ue){return Nw(ue)&&ue>=-F8&&ue<=F8}var O8=Roe;function Doe(ue){return ue===void 0}var B8=Doe;var zoe="[object WeakMap]";function Foe(ue){return Dl(ue)&&jh(ue)==zoe}var N8=Foe;var Ooe="[object WeakSet]";function Boe(ue){return Dl(ue)&&Oc(ue)==Ooe}var U8=Boe;var Noe=1;function Uoe(ue){return xo(typeof ue=="function"?ue:up(ue,Noe))}var j8=Uoe;var joe=Array.prototype,qoe=joe.join;function Voe(ue,ge){return ue==null?"":qoe.call(ue,ge)}var q8=Voe;var Goe=Cd(function(ue,ge,Ye){return ue+(Ye?"-":"")+ge.toLowerCase()}),V8=Goe;var Hoe=Bm(function(ue,ge,Ye){op(ue,Ye,ge)}),G8=Hoe;function Woe(ue,ge,Ye){for(var Rt=Ye+1;Rt--;)if(ue[Rt]===ge)return Rt;return Rt}var H8=Woe;var Xoe=Math.max,Zoe=Math.min;function Yoe(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Rt;return Ye!==void 0&&(gr=jo(Ye),gr=gr<0?Xoe(Rt+gr,0):Zoe(gr,Rt-1)),ge===ge?H8(ue,ge,gr):Sm(ue,Rb,gr,!0)}var W8=Yoe;var Koe=Cd(function(ue,ge,Ye){return ue+(Ye?" ":"")+ge.toLowerCase()}),X8=Koe;var Joe=Wb("toLowerCase"),Z8=Joe;function $oe(ue,ge){return ue<ge}var Uy=$oe;var Qoe=qm(Uy),Y8=Qoe;var ese=qm(function(ue,ge){return ue<=ge}),K8=ese;function tse(ue,ge){var Ye={};return ge=xo(ge,3),cp(ue,function(Rt,gr,Yr){op(Ye,ge(Rt,gr,Yr),Rt)}),Ye}var J8=tse;function rse(ue,ge){var Ye={};return ge=xo(ge,3),cp(ue,function(Rt,gr,Yr){op(Ye,gr,ge(Rt,gr,Yr))}),Ye}var $8=rse;var ase=1;function ise(ue){return pw(up(ue,ase))}var Q8=ise;var nse=1;function ose(ue,ge){return vw(ue,up(ge,nse))}var eR=ose;function sse(ue,ge,Ye){for(var Rt=-1,gr=ue.length;++Rt<gr;){var Yr=ue[Rt],Ea=ge(Yr);if(Ea!=null&&(ei===void 0?Ea===Ea&&!Rf(Ea):Ye(Ea,ei)))var ei=Ea,oi=Yr}return oi}var Gm=sse;function lse(ue){return ue&&ue.length?Gm(ue,Bc,zy):void 0}var tR=lse;function use(ue,ge){return ue&&ue.length?Gm(ue,xo(ge,2),zy):void 0}var rR=use;function cse(ue,ge){for(var Ye,Rt=-1,gr=ue.length;++Rt<gr;){var Yr=ge(ue[Rt]);Yr!==void 0&&(Ye=Ye===void 0?Yr:Ye+Yr)}return Ye}var jy=cse;var fse=NaN;function hse(ue,ge){var Ye=ue==null?0:ue.length;return Ye?jy(ue,ge)/Ye:fse}var jw=hse;function pse(ue){return jw(ue,Bc)}var aR=pse;function dse(ue,ge){return jw(ue,xo(ge,2))}var iR=dse;var vse=Md(function(ue,ge,Ye){Iy(ue,ge,Ye)}),nR=vse;var mse=qo(function(ue,ge){return function(Ye){return xv(Ye,ue,ge)}}),oR=mse;var gse=qo(function(ue,ge){return function(Ye){return xv(ue,Ye,ge)}}),sR=gse;function yse(ue){return ue&&ue.length?Gm(ue,Bc,Uy):void 0}var lR=yse;function _se(ue,ge){return ue&&ue.length?Gm(ue,xo(ge,2),Uy):void 0}var uR=_se;function xse(ue,ge,Ye){var Rt=gu(ge),gr=jm(ge,Rt),Yr=!(Ll(Ye)&&"chain"in Ye)||!!Ye.chain,Ea=ap(ue);return Nh(gr,function(ei){var oi=ge[ei];ue[ei]=oi,Ea&&(ue.prototype[ei]=function(){var Cn=this.__chain__;if(Yr||Cn){var bn=ue(this.__wrapped__),Fn=bn.__actions__=pf(this.__actions__);return Fn.push({func:oi,args:arguments,thisArg:ue}),bn.__chain__=Cn,bn}return oi.apply(ue,Op([this.value()],arguments))})}),ue}var qw=xse;var bse=wm(function(ue,ge){return ue*ge},1),cR=bse;var wse="Expected a function";function Tse(ue){if(typeof ue!="function")throw new TypeError(wse);return function(){var ge=arguments;switch(ge.length){case 0:return!ue.call(this);case 1:return!ue.call(this,ge[0]);case 2:return!ue.call(this,ge[0],ge[1]);case 3:return!ue.call(this,ge[0],ge[1],ge[2])}return!ue.apply(this,ge)}}var Hv=Tse;function Ase(ue){for(var ge,Ye=[];!(ge=ue.next()).done;)Ye.push(ge.value);return Ye}var fR=Ase;var Sse="[object Map]",Mse="[object Set]",BA=If?If.iterator:void 0;function Ese(ue){if(!ue)return[];if(Vc(ue))return Vm(ue)?Uh(ue):pf(ue);if(BA&&ue[BA])return fR(ue[BA]());var ge=jh(ue),Ye=ge==Sse?Sy:ge==Mse?Fm:Ld;return Ye(ue)}var Vw=Ese;function kse(){this.__values__===void 0&&(this.__values__=Vw(this.value()));var ue=this.__index__>=this.__values__.length,ge=ue?void 0:this.__values__[this.__index__++];return{done:ue,value:ge}}var hR=kse;function Cse(ue,ge){var Ye=ue.length;if(Ye)return ge+=ge<0?Ye:0,ip(ge,Ye)?ue[ge]:void 0}var Gw=Cse;function Lse(ue,ge){return ue&&ue.length?Gw(ue,jo(ge)):void 0}var pR=Lse;function Pse(ue){return ue=jo(ue),qo(function(ge){return Gw(ge,ue)})}var dR=Pse;function Ise(ue,ge){return ge=Fp(ge,ue),ue=Bw(ue,ge),ue==null||delete ue[Eh(Tf(ge))]}var qy=Ise;function Rse(ue){return gv(ue)?void 0:ue}var vR=Rse;var Dse=1,zse=2,Fse=4,Ose=lp(function(ue,ge){var Ye={};if(ue==null)return Ye;var Rt=!1;ge=Ml(ge,function(Yr){return Yr=Fp(Yr,ue),Rt||(Rt=Yr.length>1),Yr}),Mh(ue,by(ue),Ye),Rt&&(Ye=up(Ye,Dse|zse|Fse,vR));for(var gr=ge.length;gr--;)qy(Ye,ge[gr]);return Ye}),mR=Ose;function Bse(ue,ge,Ye,Rt){if(!Ll(ue))return ue;ge=Fp(ge,ue);for(var gr=-1,Yr=ge.length,Ea=Yr-1,ei=ue;ei!=null&&++gr<Yr;){var oi=Eh(ge[gr]),Cn=Ye;if(oi==="__proto__"||oi==="constructor"||oi==="prototype")return ue;if(gr!=Ea){var bn=ei[oi];Cn=Rt?Rt(bn,oi,ei):void 0,Cn===void 0&&(Cn=Ll(bn)?bn:ip(ge[gr+1])?[]:{})}vv(ei,oi,Cn),ei=ei[oi]}return ue}var bv=Bse;function Nse(ue,ge,Ye){for(var Rt=-1,gr=ge.length,Yr={};++Rt<gr;){var Ea=ge[Rt],ei=ld(ue,Ea);Ye(ei,Ea)&&bv(Yr,Fp(Ea,ue),ei)}return Yr}var Hw=Nse;function Use(ue,ge){if(ue==null)return{};var Ye=Ml(by(ue),function(Rt){return[Rt]});return ge=xo(ge),Hw(ue,Ye,function(Rt,gr){return ge(Rt,gr[0])})}var Ww=Use;function jse(ue,ge){return Ww(ue,Hv(xo(ge)))}var gR=jse;function qse(ue){return Gb(2,ue)}var yR=qse;function Vse(ue,ge){var Ye=ue.length;for(ue.sort(ge);Ye--;)ue[Ye]=ue[Ye].value;return ue}var _R=Vse;function Gse(ue,ge){if(ue!==ge){var Ye=ue!==void 0,Rt=ue===null,gr=ue===ue,Yr=Rf(ue),Ea=ge!==void 0,ei=ge===null,oi=ge===ge,Cn=Rf(ge);if(!ei&&!Cn&&!Yr&&ue>ge||Yr&&Ea&&oi&&!ei&&!Cn||Rt&&Ea&&oi||!Ye&&oi||!gr)return 1;if(!Rt&&!Yr&&!Cn&&ue<ge||Cn&&Ye&&gr&&!Rt&&!Yr||ei&&Ye&&gr||!Ea&&gr||!oi)return-1}return 0}var Xw=Gse;function Hse(ue,ge,Ye){for(var Rt=-1,gr=ue.criteria,Yr=ge.criteria,Ea=gr.length,ei=Ye.length;++Rt<Ea;){var oi=Xw(gr[Rt],Yr[Rt]);if(oi){if(Rt>=ei)return oi;var Cn=Ye[Rt];return oi*(Cn=="desc"?-1:1)}}return ue.index-ge.index}var xR=Hse;function Wse(ue,ge,Ye){ge.length?ge=Ml(ge,function(Yr){return Io(Yr)?function(Ea){return ld(Ea,Yr.length===1?Yr[0]:Yr)}:Yr}):ge=[Bc];var Rt=-1;ge=Ml(ge,wf(xo));var gr=zw(ue,function(Yr,Ea,ei){var oi=Ml(ge,function(Cn){return Cn(Yr)});return{criteria:oi,index:++Rt,value:Yr}});return _R(gr,function(Yr,Ea){return xR(Yr,Ea,Ye)})}var Zw=Wse;function Xse(ue,ge,Ye,Rt){return ue==null?[]:(Io(ge)||(ge=ge==null?[]:[ge]),Ye=Rt?void 0:Ye,Io(Ye)||(Ye=Ye==null?[]:[Ye]),Zw(ue,ge,Ye))}var bR=Xse;function Zse(ue){return lp(function(ge){return ge=Ml(ge,wf(xo)),qo(function(Ye){var Rt=this;return ue(ge,function(gr){return xf(gr,Rt,Ye)})})})}var Vy=Zse;var Yse=Vy(Ml),wR=Yse;var Kse=qo,TR=Kse;var Jse=Math.min,$se=TR(function(ue,ge){ge=ge.length==1&&Io(ge[0])?Ml(ge[0],wf(xo)):Ml(Qu(ge,1),wf(xo));var Ye=ge.length;return qo(function(Rt){for(var gr=-1,Yr=Jse(Rt.length,Ye);++gr<Yr;)Rt[gr]=ge[gr].call(this,Rt[gr]);return xf(ue,this,Rt)})}),AR=$se;var Qse=Vy(kw),SR=Qse;var ele=Vy(Ay),MR=ele;var tle=9007199254740991,rle=Math.floor;function ale(ue,ge){var Ye="";if(!ue||ge<1||ge>tle)return Ye;do ge%2&&(Ye+=ue),ge=rle(ge/2),ge&&(ue+=ue);while(ge);return Ye}var m_=ale;var ile=Cy("length"),ER=ile;var CR="\\ud800-\\udfff",nle="\\u0300-\\u036f",ole="\\ufe20-\\ufe2f",sle="\\u20d0-\\u20ff",lle=nle+ole+sle,ule="\\ufe0e\\ufe0f",cle="["+CR+"]",NA="["+lle+"]",UA="\\ud83c[\\udffb-\\udfff]",fle="(?:"+NA+"|"+UA+")",LR="[^"+CR+"]",PR="(?:\\ud83c[\\udde6-\\uddff]){2}",IR="[\\ud800-\\udbff][\\udc00-\\udfff]",hle="\\u200d",RR=fle+"?",DR="["+ule+"]?",ple="(?:"+hle+"(?:"+[LR,PR,IR].join("|")+")"+DR+RR+")*",dle=DR+RR+ple,vle="(?:"+[LR+NA+"?",NA,PR,IR,cle].join("|")+")",kR=RegExp(UA+"(?="+UA+")|"+vle+dle,"g");function mle(ue){for(var ge=kR.lastIndex=0;kR.test(ue);)++ge;return ge}var zR=mle;function gle(ue){return kd(ue)?zR(ue):ER(ue)}var Pd=gle;var yle=Math.ceil;function _le(ue,ge){ge=ge===void 0?" ":nh(ge);var Ye=ge.length;if(Ye<2)return Ye?m_(ge,ue):ge;var Rt=m_(ge,yle(ue/Pd(ge)));return kd(ge)?Bp(Uh(Rt),0,ue).join(""):Rt.slice(0,ue)}var H0=_le;var xle=Math.ceil,ble=Math.floor;function wle(ue,ge,Ye){ue=Bs(ue),ge=jo(ge);var Rt=ge?Pd(ue):0;if(!ge||Rt>=ge)return ue;var gr=(ge-Rt)/2;return H0(ble(gr),Ye)+ue+H0(xle(gr),Ye)}var FR=wle;function Tle(ue,ge,Ye){ue=Bs(ue),ge=jo(ge);var Rt=ge?Pd(ue):0;return ge&&Rt<ge?ue+H0(ge-Rt,Ye):ue}var OR=Tle;function Ale(ue,ge,Ye){ue=Bs(ue),ge=jo(ge);var Rt=ge?Pd(ue):0;return ge&&Rt<ge?H0(ge-Rt,Ye)+ue:ue}var BR=Ale;var Sle=/^\s+/,Mle=wu.parseInt;function Ele(ue,ge,Ye){return Ye||ge==null?ge=0:ge&&(ge=+ge),Mle(Bs(ue).replace(Sle,""),ge||0)}var NR=Ele;var kle=32,jA=qo(function(ue,ge){var Ye=Yp(ge,Sd(jA));return np(ue,kle,void 0,ge,Ye)});jA.placeholder={};var Yw=jA;var Cle=64,qA=qo(function(ue,ge){var Ye=Yp(ge,Sd(qA));return np(ue,Cle,void 0,ge,Ye)});qA.placeholder={};var UR=qA;var Lle=Bm(function(ue,ge,Ye){ue[Ye?0:1].push(ge)},function(){return[[],[]]}),jR=Lle;function Ple(ue,ge){return Hw(ue,ge,function(Ye,Rt){return ky(ue,Rt)})}var qR=Ple;var Ile=lp(function(ue,ge){return ue==null?{}:qR(ue,ge)}),VR=Ile;function Rle(ue){for(var ge,Ye=this;Ye instanceof Tm;){var Rt=Cb(Ye);Rt.__index__=0,Rt.__values__=void 0,ge?gr.__wrapped__=Rt:ge=Rt;var gr=Rt;Ye=Ye.__wrapped__}return gr.__wrapped__=ue,ge}var GR=Rle;function Dle(ue){return function(ge){return ue==null?void 0:ld(ue,ge)}}var HR=Dle;function zle(ue,ge,Ye,Rt){for(var gr=Ye-1,Yr=ue.length;++gr<Yr;)if(Rt(ue[gr],ge))return gr;return-1}var WR=zle;var Fle=Array.prototype,XR=Fle.splice;function Ole(ue,ge,Ye,Rt){var gr=Rt?WR:Ad,Yr=-1,Ea=ge.length,ei=ue;for(ue===ge&&(ge=pf(ge)),Ye&&(ei=Ml(ue,wf(Ye)));++Yr<Ea;)for(var oi=0,Cn=ge[Yr],bn=Ye?Ye(Cn):Cn;(oi=gr(ei,bn,oi,Rt))>-1;)ei!==ue&&XR.call(ei,oi,1),XR.call(ue,oi,1);return ue}var Gy=Ole;function Ble(ue,ge){return ue&&ue.length&&ge&&ge.length?Gy(ue,ge):ue}var Kw=Ble;var Nle=qo(Kw),ZR=Nle;function Ule(ue,ge,Ye){return ue&&ue.length&&ge&&ge.length?Gy(ue,ge,xo(Ye,2)):ue}var YR=Ule;function jle(ue,ge,Ye){return ue&&ue.length&&ge&&ge.length?Gy(ue,ge,void 0,Ye):ue}var KR=jle;var qle=Array.prototype,Vle=qle.splice;function Gle(ue,ge){for(var Ye=ue?ge.length:0,Rt=Ye-1;Ye--;){var gr=ge[Ye];if(Ye==Rt||gr!==Yr){var Yr=gr;ip(gr)?Vle.call(ue,gr,1):qy(ue,gr)}}return ue}var Jw=Gle;var Hle=lp(function(ue,ge){var Ye=ue==null?0:ue.length,Rt=fy(ue,ge);return Jw(ue,Ml(ge,function(gr){return ip(gr,Ye)?+gr:gr}).sort(Xw)),Rt}),JR=Hle;var Wle=Math.floor,Xle=Math.random;function Zle(ue,ge){return ue+Wle(Xle()*(ge-ue+1))}var Hy=Zle;var Yle=parseFloat,Kle=Math.min,Jle=Math.random;function $le(ue,ge,Ye){if(Ye&&typeof Ye!="boolean"&&Nc(ue,ge,Ye)&&(ge=Ye=void 0),Ye===void 0&&(typeof ge=="boolean"?(Ye=ge,ge=void 0):typeof ue=="boolean"&&(Ye=ue,ue=void 0)),ue===void 0&&ge===void 0?(ue=0,ge=1):(ue=od(ue),ge===void 0?(ge=ue,ue=0):ge=od(ge)),ue>ge){var Rt=ue;ue=ge,ge=Rt}if(Ye||ue%1||ge%1){var gr=Jle();return Kle(ue+gr*(ge-ue+Yle("1e-"+((gr+"").length-1))),ge)}return Hy(ue,ge)}var $R=$le;var Qle=Math.ceil,eue=Math.max;function tue(ue,ge,Ye,Rt){for(var gr=-1,Yr=eue(Qle((ge-ue)/(Ye||1)),0),Ea=Array(Yr);Yr--;)Ea[Rt?Yr:++gr]=ue,ue+=Ye;return Ea}var QR=tue;function rue(ue){return function(ge,Ye,Rt){return Rt&&typeof Rt!="number"&&Nc(ge,Ye,Rt)&&(Ye=Rt=void 0),ge=od(ge),Ye===void 0?(Ye=ge,ge=0):Ye=od(Ye),Rt=Rt===void 0?ge<Ye?1:-1:od(Rt),QR(ge,Ye,Rt,ue)}}var $w=rue;var aue=$w(),e4=aue;var iue=$w(!0),t4=iue;var nue=256,oue=lp(function(ue,ge){return np(ue,nue,void 0,void 0,void 0,ge)}),r4=oue;function sue(ue,ge,Ye,Rt,gr){return gr(ue,function(Yr,Ea,ei){Ye=Rt?(Rt=!1,Yr):ge(Ye,Yr,Ea,ei)}),Ye}var Qw=sue;function lue(ue,ge,Ye){var Rt=Io(ue)?dy:Qw,gr=arguments.length<3;return Rt(ue,xo(ge,4),Ye,gr,Up)}var a4=lue;function uue(ue,ge,Ye,Rt){var gr=ue==null?0:ue.length;for(Rt&&gr&&(Ye=ue[--gr]);gr--;)Ye=ge(Ye,ue[gr],gr,ue);return Ye}var i4=uue;function cue(ue,ge,Ye){var Rt=Io(ue)?i4:Qw,gr=arguments.length<3;return Rt(ue,xo(ge,4),Ye,gr,Sw)}var n4=cue;function fue(ue,ge){var Ye=Io(ue)?Np:Lw;return Ye(ue,Hv(xo(ge,3)))}var o4=fue;function hue(ue,ge){var Ye=[];if(!(ue&&ue.length))return Ye;var Rt=-1,gr=[],Yr=ue.length;for(ge=xo(ge,3);++Rt<Yr;){var Ea=ue[Rt];ge(Ea,Rt,ue)&&(Ye.push(Ea),gr.push(Rt))}return Jw(ue,gr),Ye}var s4=hue;function pue(ue,ge,Ye){return(Ye?Nc(ue,ge,Ye):ge===void 0)?ge=1:ge=jo(ge),m_(Bs(ue),ge)}var l4=pue;function due(){var ue=arguments,ge=Bs(ue[0]);return ue.length<3?ge:ge.replace(ue[1],ue[2])}var u4=due;var vue="Expected a function";function mue(ue,ge){if(typeof ue!="function")throw new TypeError(vue);return ge=ge===void 0?ge:jo(ge),qo(ue,ge)}var c4=mue;function gue(ue,ge,Ye){ge=Fp(ge,ue);var Rt=-1,gr=ge.length;for(gr||(gr=1,ue=void 0);++Rt<gr;){var Yr=ue?.[Eh(ge[Rt])];Yr===void 0&&(Rt=gr,Yr=Ye),ue=ap(Yr)?Yr.call(ue):Yr}return ue}var f4=gue;var yue=Array.prototype,_ue=yue.reverse;function xue(ue){return ue==null?ue:_ue.call(ue)}var g_=xue;var bue=gy("round"),h4=bue;function wue(ue){var ge=ue.length;return ge?ue[Hy(0,ge-1)]:void 0}var e2=wue;function Tue(ue){return e2(Ld(ue))}var p4=Tue;function Aue(ue){var ge=Io(ue)?e2:p4;return ge(ue)}var d4=Aue;function Sue(ue,ge){var Ye=-1,Rt=ue.length,gr=Rt-1;for(ge=ge===void 0?Rt:ge;++Ye<ge;){var Yr=Hy(Ye,gr),Ea=ue[Yr];ue[Yr]=ue[Ye],ue[Ye]=Ea}return ue.length=ge,ue}var Hm=Sue;function Mue(ue,ge){return Hm(pf(ue),ud(ge,0,ue.length))}var v4=Mue;function Eue(ue,ge){var Ye=Ld(ue);return Hm(Ye,ud(ge,0,Ye.length))}var m4=Eue;function kue(ue,ge,Ye){(Ye?Nc(ue,ge,Ye):ge===void 0)?ge=1:ge=jo(ge);var Rt=Io(ue)?v4:m4;return Rt(ue,ge)}var g4=kue;function Cue(ue,ge,Ye){return ue==null?ue:bv(ue,ge,Ye)}var y4=Cue;function Lue(ue,ge,Ye,Rt){return Rt=typeof Rt=="function"?Rt:void 0,ue==null?ue:bv(ue,ge,Ye,Rt)}var _4=Lue;function Pue(ue){return Hm(pf(ue))}var x4=Pue;function Iue(ue){return Hm(Ld(ue))}var b4=Iue;function Rue(ue){var ge=Io(ue)?x4:b4;return ge(ue)}var w4=Rue;var Due="[object Map]",zue="[object Set]";function Fue(ue){if(ue==null)return 0;if(Vc(ue))return Vm(ue)?Pd(ue):ue.length;var ge=jh(ue);return ge==Due||ge==zue?ue.size:ny(ue).length}var T4=Fue;function Oue(ue,ge,Ye){var Rt=ue==null?0:ue.length;return Rt?(Ye&&typeof Ye!="number"&&Nc(ue,ge,Ye)?(ge=0,Ye=Rt):(ge=ge==null?0:jo(ge),Ye=Ye===void 0?Rt:jo(Ye)),Yf(ue,ge,Ye)):[]}var A4=Oue;var Bue=Cd(function(ue,ge,Ye){return ue+(Ye?"_":"")+ge.toLowerCase()}),S4=Bue;function Nue(ue,ge){var Ye;return Up(ue,function(Rt,gr,Yr){return Ye=ge(Rt,gr,Yr),!Ye}),!!Ye}var M4=Nue;function Uue(ue,ge,Ye){var Rt=Io(ue)?Ay:M4;return Ye&&Nc(ue,ge,Ye)&&(ge=void 0),Rt(ue,xo(ge,3))}var E4=Uue;var jue=qo(function(ue,ge){if(ue==null)return[];var Ye=ge.length;return Ye>1&&Nc(ue,ge[0],ge[1])?ge=[]:Ye>2&&Nc(ge[0],ge[1],ge[2])&&(ge=[ge[0]]),Zw(ue,Qu(ge,1),[])}),k4=jue;var que=4294967295,Vue=que-1,Gue=Math.floor,Hue=Math.min;function Wue(ue,ge,Ye,Rt){var gr=0,Yr=ue==null?0:ue.length;if(Yr===0)return 0;ge=Ye(ge);for(var Ea=ge!==ge,ei=ge===null,oi=Rf(ge),Cn=ge===void 0;gr<Yr;){var bn=Gue((gr+Yr)/2),Fn=Ye(ue[bn]),To=Fn!==void 0,ds=Fn===null,Qs=Fn===Fn,Vo=Rf(Fn);if(Ea)var Xe=Rt||Qs;else Cn?Xe=Qs&&(Rt||To):ei?Xe=Qs&&To&&(Rt||!ds):oi?Xe=Qs&&To&&!ds&&(Rt||!Vo):ds||Vo?Xe=!1:Xe=Rt?Fn<=ge:Fn<ge;Xe?gr=bn+1:Yr=bn}return Hue(Yr,Vue)}var Wy=Wue;var Xue=4294967295,Zue=Xue>>>1;function Yue(ue,ge,Ye){var Rt=0,gr=ue==null?Rt:ue.length;if(typeof ge=="number"&&ge===ge&&gr<=Zue){for(;Rt<gr;){var Yr=Rt+gr>>>1,Ea=ue[Yr];Ea!==null&&!Rf(Ea)&&(Ye?Ea<=ge:Ea<ge)?Rt=Yr+1:gr=Yr}return gr}return Wy(ue,ge,Bc,Ye)}var Wm=Yue;function Kue(ue,ge){return Wm(ue,ge)}var C4=Kue;function Jue(ue,ge,Ye){return Wy(ue,ge,xo(Ye,2))}var L4=Jue;function $ue(ue,ge){var Ye=ue==null?0:ue.length;if(Ye){var Rt=Wm(ue,ge);if(Rt<Ye&&oh(ue[Rt],ge))return Rt}return-1}var P4=$ue;function Que(ue,ge){return Wm(ue,ge,!0)}var I4=Que;function ece(ue,ge,Ye){return Wy(ue,ge,xo(Ye,2),!0)}var R4=ece;function tce(ue,ge){var Ye=ue==null?0:ue.length;if(Ye){var Rt=Wm(ue,ge,!0)-1;if(oh(ue[Rt],ge))return Rt}return-1}var D4=tce;function rce(ue,ge){for(var Ye=-1,Rt=ue.length,gr=0,Yr=[];++Ye<Rt;){var Ea=ue[Ye],ei=ge?ge(Ea):Ea;if(!Ye||!oh(ei,oi)){var oi=ei;Yr[gr++]=Ea===0?0:Ea}}return Yr}var t2=rce;function ace(ue){return ue&&ue.length?t2(ue):[]}var z4=ace;function ice(ue,ge){return ue&&ue.length?t2(ue,xo(ge,2)):[]}var F4=ice;var nce=4294967295;function oce(ue,ge,Ye){return Ye&&typeof Ye!="number"&&Nc(ue,ge,Ye)&&(ge=Ye=void 0),Ye=Ye===void 0?nce:Ye>>>0,Ye?(ue=Bs(ue),ue&&(typeof ge=="string"||ge!=null&&!Ny(ge))&&(ge=nh(ge),!ge&&kd(ue))?Bp(Uh(ue),0,Ye):ue.split(ge,Ye)):[]}var O4=oce;var sce="Expected a function",lce=Math.max;function uce(ue,ge){if(typeof ue!="function")throw new TypeError(sce);return ge=ge==null?0:lce(jo(ge),0),qo(function(Ye){var Rt=Ye[ge],gr=Bp(Ye,0,ge);return Rt&&Op(gr,Rt),xf(ue,this,gr)})}var B4=uce;var cce=Cd(function(ue,ge,Ye){return ue+(Ye?" ":"")+py(ge)}),N4=cce;function fce(ue,ge,Ye){return ue=Bs(ue),Ye=Ye==null?0:ud(jo(Ye),0,ue.length),ge=nh(ge),ue.slice(Ye,Ye+ge.length)==ge}var U4=fce;function hce(){return{}}var j4=hce;function pce(){return""}var q4=pce;function dce(){return!0}var V4=dce;var vce=wm(function(ue,ge){return ue-ge},0),G4=vce;function mce(ue){return ue&&ue.length?jy(ue,Bc):0}var H4=mce;function gce(ue,ge){return ue&&ue.length?jy(ue,xo(ge,2)):0}var W4=gce;function yce(ue){var ge=ue==null?0:ue.length;return ge?Yf(ue,1,ge):[]}var X4=yce;function _ce(ue,ge,Ye){return ue&&ue.length?(ge=Ye||ge===void 0?1:jo(ge),Yf(ue,0,ge<0?0:ge)):[]}var Z4=_ce;function xce(ue,ge,Ye){var Rt=ue==null?0:ue.length;return Rt?(ge=Ye||ge===void 0?1:jo(ge),ge=Rt-ge,Yf(ue,ge<0?0:ge,Rt)):[]}var Y4=xce;function bce(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3),!1,!0):[]}var K4=bce;function wce(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3)):[]}var J4=wce;function Tce(ue,ge){return ge(ue),ue}var $4=Tce;var Q4=Object.prototype,Ace=Q4.hasOwnProperty;function Sce(ue,ge,Ye,Rt){return ue===void 0||oh(ue,Q4[Ye])&&!Ace.call(Rt,Ye)?ge:ue}var VA=Sce;var Mce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Ece(ue){return"\\"+Mce[ue]}var eD=Ece;var kce=/<%=([\s\S]+?)%>/g,r2=kce;var Cce=/<%-([\s\S]+?)%>/g,tD=Cce;var Lce=/<%([\s\S]+?)%>/g,rD=Lce;var Pce={escape:tD,evaluate:rD,interpolate:r2,variable:"",imports:{_:{escape:Ew}}},y_=Pce;var Ice="Invalid `variable` option passed into `_.template`",Rce=/\b__p \+= '';/g,Dce=/\b(__p \+=) '' \+/g,zce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Fce=/[()=,{}\[\]\/\s]/,Oce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,a2=/($^)/,Bce=/['\n\r\u2028\u2029\\]/g,Nce=Object.prototype,aD=Nce.hasOwnProperty;function Uce(ue,ge,Ye){var Rt=y_.imports._.templateSettings||y_;Ye&&Nc(ue,ge,Ye)&&(ge=void 0),ue=Bs(ue),ge=km({},ge,Rt,VA);var gr=km({},ge.imports,Rt.imports,VA),Yr=gu(gr),Ea=Fy(gr,Yr),ei,oi,Cn=0,bn=ge.interpolate||a2,Fn="__p += '",To=RegExp((ge.escape||a2).source+"|"+bn.source+"|"+(bn===r2?Oce:a2).source+"|"+(ge.evaluate||a2).source+"|$","g"),ds=aD.call(ge,"sourceURL")?"//# sourceURL="+(ge.sourceURL+"").replace(/\s/g," ")+`
3792`:"";ue.replace(To,function(Xe,Kl,nu,jp,zf,fp){return nu||(nu=jp),Fn+=ue.slice(Cn,fp).replace(Bce,eD),Kl&&(ei=!0,Fn+=`' +

Callers 15

uFunction · 0.45
QaFunction · 0.45
mnFunction · 0.45
ziFunction · 0.45
hsFunction · 0.45
lcFunction · 0.45
YuFunction · 0.45
KFunction · 0.45
emplaceBackMethod · 0.45

Calls 6

_containerDimensionsMethod · 0.45
_getClampedPixelRatioMethod · 0.45
_resizeCanvasMethod · 0.45
overLimitMethod · 0.45
stopMethod · 0.45
fireMethod · 0.45

Tested by

no test coverage detected