"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[6497],{20901:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h,getLayer:()=>p});var i=r(65476),s=r(95579),a=r(69161),o=r(41857),n=r(25564),u=r(49443),l=r(47823),d=r(32548),g=r(2445);function c(e){return(0,g.Y)("div",{className:"deckgl-tooltip",children:(0,g.Y)(d.A,{label:(0,s.t)("Centroid (Longitude and Latitude): "),value:`(${null==e?void 0:e.coordinate[0]}, ${null==e?void 0:e.coordinate[1]})`})})}const p=(e,t,r,s)=>{var l,d,g,p;const h=e,{intensity:y=1,radius_pixels:b=30,aggregation:f="SUM",js_data_mutator:m,linear_color_scheme:_}=h;let L=t.data.features;m&&(L=(0,n.A)(h.js_data_mutator)(L));const S=null==(l=(0,a.A)())||null==(d=l.get(_))?void 0:d.createLinearScale([0,6]),x=null==S||null==(g=S.range())||null==(p=g.map((e=>(0,u.hexToRGB)(e))))?void 0:p.reverse();return new i.A({id:`heatmap-layer-${h.slice_id}`,data:L,intensity:y,radiusPixels:b,colorRange:x,aggregation:f.toUpperCase(),getPosition:e=>e.position,getWeight:e=>e.weight?e.weight:1,...(0,o.T)(h,s,c)})},h=(0,l.y)(p,(function(e){return e.map((e=>e.position))}))},83102:(e,t,r)=>{r.d(t,{Pu:()=>o,QO:()=>i,Y5:()=>s,cp:()=>n});const i=[[255,255,178],[254,217,118],[254,178,76],[253,141,60],[240,59,32],[189,0,38]];function s(e,t=!1,r=Float32Array){let i;if(Number.isFinite(e[0]))i=new r(e);else{i=new r(4*e.length);let t=0;for(let r=0;r<e.length;r++){const s=e[r];i[t++]=s[0],i[t++]=s[1],i[t++]=s[2],i[t++]=Number.isFinite(s[3])?s[3]:255}}if(t)for(let e=0;e<i.length;e++)i[e]/=255;return i}const a={linear:"linear",quantile:"nearest",quantize:"nearest",ordinal:"nearest"};function o(e,t){e.setSampler({minFilter:a[t],magFilter:a[t]})}function n(e,t,r="linear"){const i=s(t,!1,Uint8Array);return e.createTexture({format:"rgba8unorm",mipmaps:!1,sampler:{minFilter:a[r],magFilter:a[r],addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"},data:i,width:i.length/4,height:1})}},84402:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(75077),s=r(7277),a=r(95801),o=r(68427);class n extends i.A{get isComposite(){return!0}get isDrawable(){return!1}get isLoaded(){return super.isLoaded&&this.getSubLayers().every((e=>e.isLoaded))}getSubLayers(){return this.internalState&&this.internalState.subLayers||[]}initializeState(e){}setState(e){super.setState(e),this.setNeedsUpdate()}getPickingInfo({info:e}){const{object:t}=e;return t&&t.__source&&t.__source.parent&&t.__source.parent.id===this.id?(e.object=t.__source.object,e.index=t.__source.index,e):e}filterSubLayer(e){return!0}shouldRenderSubLayer(e,t){return t&&t.length}getSubLayerClass(e,t){const{_subLayerProps:r}=this.props;return r&&r[e]&&r[e].type||t}getSubLayerRow(e,t,r){return e.__source={parent:this,object:t,index:r},e}getSubLayerAccessor(e){if("function"==typeof e){const t={index:-1,data:this.props.data,target:[]};return(r,i)=>r&&r.__source?(t.index=r.__source.index,e(r.__source.object,t)):e(r,i)}return e}getSubLayerProps(e={}){const{opacity:t,pickable:r,visible:i,parameters:s,getPolygonOffset:a,highlightedObjectIndex:n,autoHighlight:u,highlightColor:l,coordinateSystem:d,coordinateOrigin:g,wrapLongitude:c,positionFormat:p,modelMatrix:h,extensions:y,fetch:b,operation:f,_subLayerProps:m}=this.props,_={id:"",updateTriggers:{},opacity:t,pickable:r,visible:i,parameters:s,getPolygonOffset:a,highlightedObjectIndex:n,autoHighlight:u,highlightColor:l,coordinateSystem:d,coordinateOrigin:g,wrapLongitude:c,positionFormat:p,modelMatrix:h,extensions:y,fetch:b,operation:f},L=m&&e.id&&m[e.id],S=L&&L.updateTriggers,x=e.id||"sublayer";if(L){const t=this.props[o.fW],r=e.type?e.type._propTypes:{};for(const e in L){const i=r[e]||t[e];i&&"accessor"===i.type&&(L[e]=this.getSubLayerAccessor(L[e]))}}Object.assign(_,e,L),_.id=`${this.props.id}-${x}`,_.updateTriggers={all:this.props.updateTriggers?.all,...e.updateTriggers,...S};for(const e of y){const t=e.getSubLayerProps.call(this,e);t&&Object.assign(_,t,{updateTriggers:Object.assign(_.updateTriggers,t.updateTriggers)})}return _}_updateAutoHighlight(e){for(const t of this.getSubLayers())t.updateAutoHighlight(e)}_getAttributeManager(){return null}_postUpdate(e,t){let r=this.internalState.subLayers;const i=!r||this.needsUpdate();if(i){const e=this.renderLayers();r=(0,a.B)(e,Boolean),this.internalState.subLayers=r}(0,s.A)("compositeLayer.renderLayers",this,i,r);for(const e of r)e.parent=this}}n.layerName="CompositeLayer";const u=n}}]);