1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,360174,(e,t,r)=>{var a=e.r(987325),l=e.r(791606);t.exports=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw TypeError("Expected a function");return l(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),a(e,t,{leading:i,maxWait:t,trailing:o})}},492393,e=>{e.v({colorbar:"MapLegend-module-scss-module__w4F0La__colorbar",mapLegend:"MapLegend-module-scss-module__w4F0La__mapLegend",title:"MapLegend-module-scss-module__w4F0La__title"})},198139,e=>{e.v({description:"MapPopup-module-scss-module__daEenW__description",mapPopup:"MapPopup-module-scss-module__daEenW__mapPopup",title:"MapPopup-module-scss-module__daEenW__title",value:"MapPopup-module-scss-module__daEenW__value",values:"MapPopup-module-scss-module__daEenW__values"})},175958,(e,t,r)=>{"use strict";var a=e.r(874033);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=a(e.r(719885)),i=e.r(62376);r.default=(0,l.default)((0,i.jsx)("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMarkOutlined")},953561,e=>{e.v({container:"MapUI-module-scss-module__tAxOVq__container",helpButton:"MapUI-module-scss-module__tAxOVq__helpButton",mapUI:"MapUI-module-scss-module__tAxOVq__mapUI",parameterSelection:"MapUI-module-scss-module__tAxOVq__parameterSelection"})},270587,e=>{"use strict";let t;var r=e.i(62376),a=e.i(500893),l=e.i(519923);let i=[{id:0,title:"Extreme Heat",slug:"extreme-heat",abs:{mean:"s3://cadcat/wrf/climate-metrics-map/mm4mean/ssp370/gwl/TX99p/d03",min_path:"s3://cadcat/wrf/climate-metrics-map/mm4min/ssp370/gwl/TX99p/d03",max_path:"s3://cadcat/wrf/climate-metrics-map/mm4max/ssp370/gwl/TX99p/d03",description:"Mean number of extreme heat days (# of days)",short_desc:"How many days during the year are expected to be very hot compared to the past (# of days)",variable:"TX99p",rescale:"0,50",colormap:"Reds"},del:{mean:"s3://cadcat/wrf/climate-metrics-map/mm4mean/ssp370/gwl/TX99pd/d03",min_path:"s3://cadcat/wrf/climate-metrics-map/mm4min/ssp370/gwl/TX99pd/d03",max_path:"s3://cadcat/wrf/climate-metrics-map/mm4max/ssp370/gwl/TX99pd/d03",description:"Mean annual change in number of extreme heat days (# of days)",short_desc:"Change in how many days during the year are expected to be very hot compared to the past (# of days)",variable:"TX99pd",rescale:"-30,30",colormap:"RdBu_r"}},{id:1,title:"Extreme Precipitation",slug:"extreme-precipitation",abs:{mean:"s3://cadcat/wrf/climate-metrics-map/mm4mean/ssp370/gwl/R99p/d03",min_path:"s3://cadcat/wrf/climate-metrics-map/mm4min/ssp370/gwl/R99p/d03",max_path:"s3://cadcat/wrf/climate-metrics-map/mm4max/ssp370/gwl/R99p/d03",description:"Absolute 99th percentile 1-day accumulated precipitation (mm)",short_desc:"How much precipitation will fall on really heavy precipitation days (mm)",variable:"R99p",rescale:"0,265",colormap:"Blues"},del:{mean:"s3://cadcat/wrf/climate-metrics-map/mm4mean/ssp370/gwl/R99pd/d03",min_path:"s3://cadcat/wrf/climate-metrics-map/mm4min/ssp370/gwl/R99pd/d03",max_path:"s3://cadcat/wrf/climate-metrics-map/mm4max/ssp370/gwl/R99pd/d03",description:"Absolute change in 99th percentile 1-day accumulated precipitation (mm)",short_desc:"Change in how much more precipitation will fall on really heavy precipitation days (mm)",variable:"R99pd",rescale:"-20,20",colormap:"BrBG"}},{id:2,title:"Fire Weather",slug:"fire-weather",abs:{mean:"s3://cadcat/wrf/climate-metrics-map/mm4mean/ssp370/gwl/ffwige50/d03",min_path:"s3://cadcat/wrf/climate-metrics-map/mm4min/ssp370/gwl/ffwige50/d03",max_path:"s3://cadcat/wrf/climate-metrics-map/mm4max/ssp370/gwl/ffwige50/d03",description:"Absolute median annual number of days with Fosberg Fire Weather Index (FFWI) value greater than 50 (# of days)",short_desc:"How often the weather is conducive for fires in this area (# of days)",variable:"ffwige50",rescale:"0,365",colormap:"gist_heat_r"},del:{mean:"s3://cadcat/wrf/climate-metrics-map/mm4mean/ssp370/gwl/ffwige50d/d03",min_path:"s3://cadcat/wrf/climate-metrics-map/mm4min/ssp370/gwl/ffwige50d/d03",max_path:"s3://cadcat/wrf/climate-metrics-map/mm4max/ssp370/gwl/ffwige50d/d03",description:"Change in median annual number of days with Fosberg Fire Weather Index (FFWI) value greater than 50 (# of days)",short_desc:"Change in how often the weather is conducive for fires in this area (# of days)",variable:"ffwige50d",rescale:"-2,2",colormap:"PuOr_r"}}];var o=e.i(860909);e.i(530354);var n=e.i(483690),s=e.i(360174);e.i(646018);var d=e.i(810070),c=e.i(965766),u=e.i(234107);e.i(991577);var p=e.i(197609),m=e.i(257115),m=m,f=e.i(287782),h=e.i(266195),h=h,x=e.i(251900),g=e.i(492393);function b({colormap:e,min:t,max:a,title:l}){let i,o=p.scaleLinear().range([40,480]).domain([t,a]),n=a-t;if(t>=0&&n>=100){let e=50*Math.ceil(t/50),r=[];for(let t=e;t<=a;t+=50)r.push(t);0===t&&(0===r.length||0!==r[0])&&r.unshift(0),i=r}else i=p.scaleLinear().domain([t,a]).nice(6).ticks(6).filter(e=>e>=t&&e<=a);let s=function(e){let t=e.endsWith("_r")?e.slice(0,-2):e,r=m.default(f.interpolateRgbBasis(["#FFFFFF","#FFFF00","#FF4000","#800000","#000000"])).domain([0,1]);if("gist_heat"===t)return e=>r(e)??"#888";let a=x[`interpolate${t.charAt(0).toUpperCase()}${t.slice(1)}`]||h.inferno;if(e.endsWith("_r")&&"PuOr_r"!==e){let e=a;a=t=>e(1-t)}return a}(e),d=490,c=480,u=`M 30 12 L 40 0 L ${c} 0 L ${d} 12 L ${c} 24 L 40 24 Z`,b=`legend-gradient-${e}-${t}-${a}`.replace(/[^a-z0-9-]/gi,"-"),v=Array.from({length:33},(e,t)=>{let a=t/32;return(0,r.jsx)("stop",{offset:a,stopColor:s(a)},t)}),w=a-t,y=i.map(e=>{let t;return{value:e,label:`${0==(t=w>=10?0:w>=1?1:2)?Math.round(e):Number(e.toFixed(t))}`}});return(0,r.jsxs)("div",{className:g.default.mapLegend,children:[(0,r.jsx)("div",{className:g.default.colorbar,children:(0,r.jsxs)("svg",{width:540,height:54,"aria-label":`Legend for ${l??"color scale"} from ${t} to ${a}`,children:[(0,r.jsx)("defs",{children:(0,r.jsx)("linearGradient",{id:b,x1:30,y1:0,x2:d,y2:0,gradientUnits:"userSpaceOnUse",children:v})}),(0,r.jsx)("path",{d:u,fill:`url(#${b})`,stroke:"black",strokeWidth:1}),y.map(({value:e,label:t},a)=>{let l=o(e);return(0,r.jsxs)("g",{children:[(0,r.jsx)("line",{x1:l,y1:0,x2:l,y2:34,stroke:"black"}),(0,r.jsx)("text",{x:l,y:44,fontSize:12,textAnchor:"middle",fill:"black",children:t})]},a)})]})}),l&&(0,r.jsx)("p",{className:g.default.title,children:l})]})}var v=e.i(737838),w=e.i(688885),y=e.i(151939),j=e.i(576188),S=e.i(198139);function C({longitude:e,latitude:t,value:l,min:i,max:o,title:n,isPopupLoading:s,onClose:c,isDataValid:p}){let m=(0,a.useMemo)(()=>i?.toFixed(2),[i]),f=(0,a.useMemo)(()=>l.toFixed(2),[l]),h=(0,a.useMemo)(()=>o?.toFixed(2),[o]);return(0,r.jsx)(d.Popup,{className:S.default.mapPopup,longitude:e,latitude:t,closeButton:!1,anchor:"bottom","aria-label":`Climate data popup for coordinates ${t.toFixed(4)}, ${e.toFixed(4)}`,children:(0,r.jsxs)("div",{className:S.default.inner,children:[s&&(0,r.jsx)(u.default,{}),!s&&p&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:S.default.description,children:(0,r.jsx)(y.default,{variant:"body2",children:n})}),(0,r.jsx)("div",{className:"close",style:{position:"absolute",float:"right",top:"10px",right:"10px"},children:(0,r.jsx)(w.default,{size:"small",onClick:c,"aria-label":"Close popup",children:(0,r.jsx)(v.default,{fontSize:"small"})})}),(0,r.jsxs)("div",{className:S.default.values,children:[null!=i&&(0,r.jsxs)("div",{className:S.default.value,children:[(0,r.jsx)(y.default,{variant:"h5",children:m}),(0,r.jsx)(y.default,{variant:"body2",children:"Min*"})]}),null!=i&&(0,r.jsxs)("div",{className:S.default.value,children:[(0,r.jsx)(y.default,{variant:"h4",children:f}),(0,r.jsx)(y.default,{variant:"body2",children:"Mean*"})]}),null!=o&&(0,r.jsxs)("div",{className:S.default.value,children:[(0,r.jsx)(y.default,{variant:"h5",children:h}),(0,r.jsx)(y.default,{variant:"body2",children:"Max*"})]})]}),(0,r.jsx)("div",{className:S.default.title,children:(0,r.jsx)(y.default,{variant:"caption",children:"*Value across models"})})]}),!s&&!p&&(0,r.jsx)(j.default,{style:{marginBottom:0},children:"No data is available for this location"})]})})}let M={longitude:-120,latitude:37.4,zoom:5},W=[[-140,20],[-100,50]],k=(0,s.default)(async(e,t,r,a,l,i,n,s)=>{s(await o.calAdaptApi.map.getPointGwlStats({lng:e,lat:t,meanPath:r,minPath:a,maxPath:l,variable:i,gwlIndex:n}))},100,{leading:!0,trailing:!0}),_=(0,a.forwardRef)(({metricSelected:e,gwlSelected:t,globalWarmingLevels:i,metrics:s,valueType:p},m)=>{let f=(0,a.useRef)(null);(0,a.useImperativeHandle)(m,()=>f.current||void 0);let h=(0,a.useRef)(null),[x,g]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),[y,j]=(0,a.useState)(null),[S,_]=(0,a.useState)(null),[B,N]=(0,a.useState)(null),[$,F]=(0,a.useState)(!1),[L,T]=(0,a.useState)(!1),[R,I]=(0,a.useState)(!1),z=(0,a.useRef)(null),E=s[e],P=E[`${p}`];E||console.error("Invalid metric selected:",e);let A=P.variable,O=i[t]??i[0],G=!x||!y;(0,a.useEffect)(()=>(g(!0),()=>{k.cancel()}),[]),(0,a.useEffect)(()=>{!async function(){try{let e=await o.calAdaptApi.map.getTileJson({url:P.mean,variable:A,datetime:String(O),rescale:P.rescale,colormap:P.colormap});j(e)}catch(e){console.error("Failed to get TileJSON:",e)}}()},[e,t,A,E,O]),(0,a.useEffect)(()=>
1{if(f.current){let e=f.current.getMap(),t=e=>{let t=e.error;t&&404===t.status&&t.url?.includes("WebMercatorQuad")||t&&t.message?.includes("tile")||console.error("Map error:",t)};return e.on("error",t),()=>{e.off("error",t)}}},[f]),(0,a.useEffect)(()=>{if(!v||!y||!h.current)return;let e=h.current,t="raster-source",r="tile-layer",a="california-mask-source",l="california-mask";e.getLayer(r)&&e.removeLayer(r),e.getLayer(l)&&e.removeLayer(l),e.getSource(t)&&e.removeSource(t),e.getSource(a)&&e.removeSource(a),e.addSource(t,{type:"raster",tiles:y.tiles,tileSize:y.tileSize||256});let i=e.getStyle(),o=i?.layers||[],n=o.find(e=>"symbol"===e.type||"line"===e.type&&e.id.includes("road"))?.id;return e.addLayer({id:r,type:"raster",source:t,paint:{"raster-opacity":.8}},n),fetch("/geojson/california.geojson").then(e=>e.json()).then(t=>{let r=t.geometry.coordinates,i={type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[-180,-90],[180,-90],[180,90],[-180,90],[-180,-90]],..."MultiPolygon"===t.geometry.type?r.map(e=>e[0]):[r[0]]]}};e.addSource(a,{type:"geojson",data:i}),e.addLayer({id:l,type:"fill",source:a,paint:{"fill-color":"#f8f8f8","fill-opacity":1}},n)}).catch(e=>{console.error("Failed to load California mask:",e)}),e.on("click",X),()=>{e.off("click",X)}},[v,y]);let H=(0,a.useCallback)((e,r,a=!1)=>{F(!0),a&&_({lng:e,lat:r,key:Date.now()}),k(e,r,P.mean,P.min_path,P.max_path,A,t,t=>{null!==t.value||null!==t.min||null!==t.max?(T(!0),N({longitude:e,latitude:r,...t})):T(!1),F(!1)})},[P,A,t]);(0,a.useEffect)(()=>{let r={valueType:p,metricSelected:e,gwlSelected:t},a=!z.current||z.current.valueType!==r.valueType||z.current.metricSelected!==r.metricSelected||z.current.gwlSelected!==r.gwlSelected;z.current=r,a&&S&&R&&H(S.lng,S.lat,!1)},[p,e,t,S,R,H]);let X=e=>{let{lng:t,lat:r}=e.lngLat;I(!1),N(null),I(!0),H(t,r,!0)};return((0,a.useEffect)(()=>{null===z.current&&(z.current={valueType:p,metricSelected:e,gwlSelected:t})},[]),x)?(0,r.jsx)(l.default,{container:!0,sx:{height:"100%",flexDirection:"column",flexWrap:"nowrap",flexGrow:1,position:"relative"},children:(0,r.jsx)(n.default,{sx:{height:"100%",position:"relative"},id:"map","aria-label":"Interactive map showing climate data",children:(0,r.jsxs)("div",{style:{position:"relative",width:"100%",height:"100%"},children:[G&&(0,r.jsx)(n.default,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.5)",zIndex:9999},"aria-live":"polite",children:(0,r.jsx)(u.default,{})}),(0,r.jsxs)(d.Map,{ref:f,onLoad:e=>{if(!e.target)return;h.current=e.target,w(!0),h.current.getCanvas().style.cursor="pointer";let t=document.getElementById("map");t&&new ResizeObserver(()=>{f.current&&f.current.resize()}).observe(t)},onError:e=>{let t=e.error;404===t.status&&t.url?.includes("WebMercatorQuad")||console.error("Map error:",t)},mapboxAccessToken:"pk.eyJ1IjoiY2FsLWFkYXB0IiwiYSI6ImNqaXZ4eHFxMTBsMGozcWxoaW51MmdqNncifQ.RG84ZzUyfIOEAnvgUVS6Bw",initialViewState:M,mapStyle:"mapbox://styles/mapbox/light-v11",scrollZoom:!0,dragRotate:!1,pitchWithRotate:!1,minPitch:0,maxPitch:0,touchZoomRotate:!1,minZoom:3.5,maxBounds:W,dragPan:!0,style:{width:"100%",height:"100%"},children:[(0,r.jsx)(c.default,{mapboxAccessToken:"pk.eyJ1IjoiY2FsLWFkYXB0IiwiYSI6ImNqaXZ4eHFxMTBsMGozcWxoaW51MmdqNncifQ.RG84ZzUyfIOEAnvgUVS6Bw",zoom:13,position:"top-right",collapsed:!0,clearOnBlur:!0,onResult:e=>{let{result:t}=e,r=t&&(t.center||t.geometry?.type==="Point"&&t.geometry.coordinates);r&&f.current&&f.current.flyTo({center:r,zoom:10})}}),(0,r.jsx)(d.NavigationControl,{position:"top-right",showCompass:!1}),(0,r.jsx)(d.ScaleControl,{position:"bottom-right",maxWidth:100,unit:"metric"}),S&&R&&(0,r.jsx)(C,{longitude:S.lng,latitude:S.lat,min:B?.min||0,max:B?.max||0,value:B?.value||0,title:P.short_desc,isPopupLoading:$,isDataValid:L,onClose:()=>{I(!1),N(null)},"aria-label":`Popup at longitude ${S.lng} and latitude ${S.lat}`},S.key)]}),(0,r.jsx)("div",{style:{position:"absolute",bottom:40,left:40,zIndex:2,maxWidth:554},children:(0,r.jsx)(b,{colormap:P.colormap,min:parseFloat(P.rescale.split(",")[0]),max:parseFloat(P.rescale.split(",")[1]),title:P.description})})]})})}):(0,r.jsx)(l.default,{container:!0,sx:{height:"100%",flexDirection:"column",flexWrap:"nowrap",flexGrow:1},children:(0,r.jsx)(n.default,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:(0,r.jsx)(u.default,{})})})});_.displayName="MapboxMap";var B=e.i(707661),N=e.i(946094),$=e.i(175958),F=e.i(277318),L=e.i(318680),T=e.i(511334),R=e.i(7284),I=e.i(271625),z=e.i(865572),E=e.i(984034),P=e.i(693560),A=e.i(15017),O=e.i(431284);function G(e){return(0,O.default)("MuiFab",e)}let H=(0,A.default)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","
1info","error","warning","success"]);var X=e.i(125086),D=e.i(568017);let U=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],V=(0,X.default)(z.default,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,D.rootShouldForwardProp)(e)||"classes"===e,overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,E.default)(r.size)}`],"inherit"===r.color&&t.colorInherit,t[(0,E.default)(r.size)],t[r.color]]}})(({theme:e,ownerState:t})=>{var r,a;return(0,T.default)({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:null==(r=(a=e.palette).getContrastText)?void 0:r.call(a,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${H.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},"small"===t.size&&{width:40,height:40},"medium"===t.size&&{width:48,height:48},"extended"===t.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===t.variant&&"small"===t.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,he
1ight:34},"extended"===t.variant&&"medium"===t.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===t.color&&{color:"inherit"})},({theme:e,ownerState:t})=>(0,T.default)({},"inherit"!==t.color&&"default"!==t.color&&null!=(e.vars||e).palette[t.color]&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}}),({theme:e})=>({[`&.${H.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}})),Y=a.forwardRef(function(e,t){let a=(0,P.useDefaultProps)({props:e,name:"MuiFab"}),{children:l,className:i,color:o="default",component:n="button",disabled:s=!1,disableFocusRipple:d=!1,focusVisibleClassName:c,size:u="large",variant:p="circular"}=a,m=(0,L.default)(a,U),f=(0,T.default)({},a,{color:o,component:n,disabled:s,disableFocusRipple:d,size:u,variant:p}),h=(e=>{let{color:t,variant:r,classes:a,size:l}=e,i={root:["root",r,`size${(0,E.default)(l)}`,"inherit"===t?"colorInherit":t]},o=(0,I.default)(i,G,a);return(0,T.default)({},a,o)})(f);return(0,r.jsx)(V,(0,T.default)({className:(0,R.default)(h.root,i),component:n,disabled:s,focusRipple:!d,focusVisibleClassName:(0,R.default)(h.focusVisible,c),ownerState:f,ref:t},m,{classes:h,children:l}))});var q=e.i(21479),Z=e.i(975036),Q=e.i(670273),K=e.i(479386);let J=a.createContext();function ee(e){return(0,O.default)("MuiGrid",e)}let et=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],er=(0,A.default)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>`spacing-xs-${e}`),...["column-reverse","column","row-reverse","row"].map(e=>`direction-xs-${e}`),...["nowrap","wrap-reverse","wrap"].map(e=>`wrap-xs-${e}`),...et.map(e=>`grid-xs-${e}`),...et.map(e=>`grid-sm-${e}`),...et.map(e=>`grid-md-${e}`),...et.map(e=>`grid-lg-${e}`),...et.map(e=>`grid-xl-${e}`)]),ea=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function el(e){let t=parseFloat(e);return`${t}
1${String(e).replace(String(t),"")||"px"}`}function ei({breakpoints:e,values:t}){let r="";Object.keys(t).forEach(e=>{""===r&&0!==t[e]&&(r=e)});let a=Object.keys(e).sort((t,r)=>e[t]-e[r]);return a.slice(0,a.indexOf(r))}let eo=(0,X.default)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e,{container:a,direction:l,item:i,spacing:o,wrap:n,zeroMinWidth:s,breakpoints:d}=r,c=[];a&&(c=function(e,t,r={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[r[`spacing-xs-${String(e)}`]];let a=[];return t.forEach(t=>{let l=e[t];Number(l)>0&&a.push(r[`spacing-${t}-${String(l)}`])}),a}(o,d,t));let u=[];return d.forEach(e=>{let a=r[e];a&&u.push(t[`grid-${e}-${String(a)}`])}),[t.root,a&&t.container,i&&t.item,s&&t.zeroMinWidth,...c,"row"!==l&&t[`direction-xs-${String(l)}`],"wrap"!==n&&t[`wrap-xs-${String(n)}`],...u]}})(({ownerState:e})=>(0,T.default)({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap}),function({theme:e,ownerState:t}){let r=(0,Z.resolveBreakpointValues)({values:t.direction,breakpoints:e.breakpoints.values});return(0,Z.handleBreakpoints)({theme:e},r,e=>{let t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${er.item}`]={maxWidth:"none"}),t})},function({theme:e,ownerState:t}){let{container:r,rowSpacing:a}=t,l={};if(r&&0!==a){let t,r=(0,Z.resolveBreakpointValues)({values:a,breakpoints:e.breakpoints.values});"object"==typeof r&&(t=ei({breakpoints:e.breakpoints.values,values:r})),l=(0,Z.handleBreakpoints)({theme:e},r,(r,a)=>{var l;let i=e.spacing(r);return"0px"!==i?{marginTop:`-${el(i)}`,[`& > .${er.item}`]:{paddingTop:el(i)}}:null!=(l=t)&&l.includes(a)?{}:{marginTop:0,[`& > .${er.item}`]:{paddingTop:0}}})}return l},function({theme:e,ownerState:t}){let{container:r,columnSpacing:a}=t,l={};if(r&&0!==a){let t,r=(0,Z.resolveBreakpointValues)({values:a,breakpoints:e.breakpoints.values});"object"==typeof r&&(t=ei({breakpoints:e.breakpoints.values,values:r})),l=(0,Z.handleBreakpoints)({theme:e},r,(r,a)=>{var l;let i=e.spacing(r);return"0px"!==i?{width:`calc(100% + ${el(i)})`,marginLeft:`-${el(i)}`,[`& > .${er.item}`]:{paddingLeft:el(i)}}:null!=(l=t)&&l.includes(a)?{}:{width:"100%",marginLeft:0,[`& > .${er.item}`]:{paddingLeft:0}}})}return l},function({theme:e,ownerState:t}){let r;return e.breakpoints.keys.reduce((a,l)=>{let i={};if(t[l]&&(r=t[l]),!r)return a;
1if(!0===r)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===r)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{let o=(0,Z.resolveBreakpointValues)({values:t.columns,breakpoints:e.breakpoints.values}),n="object"==typeof o?o[l]:o;if(null==n)return a;let s=`${Math.round(r/n*1e8)/1e6}%`,d={};if(t.container&&t.item&&0!==t.columnSpacing){let r=e.spacing(t.columnSpacing);if("0px"!==r){let e=`calc(${s} + ${el(r)})`;d={flexBasis:e,maxWidth:e}}}i=(0,T.default)({flexBasis:s,flexGrow:0,maxWidth:s},d)}return 0===e.breakpoints.values[l]?Object.assign(a,i):a[e.breakpoints.up(l)]=i,a},{})}),en=a.forwardRef(function(e,t){let l=(0,P.useDefaultProps)({props:e,name:"MuiGrid"}),{breakpoints:i}=(0,K.default)(),o=(0,Q.extendSxProp)(l),{className:n,columns:s,columnSpacing:d,component:c="div",container:u=!1,direction:p="row",item:m=!1,rowSpacing:f,spacing:h=0,wrap:x="wrap",zeroMinWidth:g=!1}=o,b=(0,L.default)(o,ea),v=f||h,w=d||h,y=a.useContext(J),j=u?s||12:y,S={},C=(0,T.default)({},b);i.keys.forEach(e=>{null!=b[e]&&(S[e]=b[e],delete C[e])});let M=(0,T.default)({},o,{columns:j,container:u,direction:p,item:m,rowSpacing:v,columnSpacing:w,wrap:x,zeroMinWidth:g,spacing:h},S,{breakpoints:i.keys}),W=(e=>{let{classes:t,container:r,direction:a,item:l,spacing:i,wrap:o,zeroMinWidth:n,breakpoints:s}=e,d=[];r&&(d=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];let r=[];return t.forEach(t=>{let a=e[t];if(Number(a)>0){let e=`spacing-${t}-${String(a)}`;r.push(e)}}),r}(i,s));let c=[];s.forEach(t=>{let r=e[t];r&&c.push(`grid-${t}-${String(r)}`)});let u={root:["root",r&&"container",l&&"item",n&&"zeroMinWidth",...d,"row"!==a&&`direction-xs-${String(a)}`,"wrap"!==o&&`wrap-xs-${String(o)}`,...c]};return(0,I.default)(u,ee,t)})(M);return(0,r.jsx)(J.Provider,{value:j,children:(0,r.jsx)(eo,(0,T.default)({ownerState:M,className:(0,R.default)(W.root,n),as:c,ref:t},C))})});var es=e.i(982379),ed=e.i(512351),ec=e.i(648760),eu=e.i(491919);function ep(e){return(0,O.default)("MuiTab",e)}let em=(0,A.default)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),ef=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],eh=(0,X.default)(z.default,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${(0,E.default)(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped,{[`& .${em.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>(0,T.default)({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${em.iconWrapper}`]:(0,T.default)({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${em.selected}`]:{opacity:1},[`&.${em.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${em.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${em.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${em.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${em.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),ex=a.forwardRef(function(e,t){let l=(0,P.useDefaultProps)({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:n=!1,fullWidth:s,icon:d,iconPosition:c="top",indicator:u,label:p,onChange:m,onClick:f,onFocus:h,selected:x,selectionFollowsFocus:g,textColor:b="inherit",value:v,wrapped:w=!1}=l,y=(0,L.default)(l,ef),j=(0,T.default)({},l,{disabled:o,disableFocusRipple:n,selected:x,icon:!!d,iconPosition:c,label:!!p,fullWidth:s,textColor:b,wrapped:w}),S=(e=>{let{classes:t,textColor:r,fullWidth:a,wrapped:l,icon:i,label:o,selected:n,disabled:s}=e,d={root:["root",i&&o&&"labelIcon",`textColor${(0,E.default)(r)}`,a&&"fullWidth",l&&"wrapped",n&&"selected",s&&"disabled"],iconWrapper:["iconWrapper"]};return(0,I.default)(d,ep,t)})(j),C=d&&p&&a.isValidElement(d)?a.cloneElement(d,{className:(0,R.default)(S.iconWrapper,d.props.className)}):d;
1return(0,r.jsxs)(eh,(0,T.default)({focusRipple:!n,className:(0,R.default)(S.root,i),ref:t,role:"tab","aria-selected":x,disabled:o,onClick:e=>{!x&&m&&m(e,v),f&&f(e)},onFocus:e=>{g&&!x&&m&&m(e,v),h&&h(e)},ownerState:j,tabIndex:x?0:-1},y,{children:["top"===c||"start"===c?(0,r.jsxs)(a.Fragment,{children:[C,p]}):(0,r.jsxs)(a.Fragment,{children:[p,C]}),u]}))});var eg=e.i(203976),eb=e.i(65399),ev=e.i(909516);function ew(){if(t)return t;let e=document.createElement("div"),r=document.createElement("div");return r.style.width="10px",r.style.height="1px",e.appendChild(r),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),t="reverse",e.scrollLeft>0?t="default":(e.scrollLeft=1,0===e.scrollLeft&&(t="negative")),document.body.removeChild(e),t}function ey(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var ej=e.i(646138),eS=e.i(831620),eS=eS;let eC=["onChange"],eM={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var eW=e.i(683901);let ek=(0,eW.default)((0,r.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),e_=(0,eW.default)((0,r.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function eB(e){return(0,O.default)("MuiTabScrollButton",e)}let eN=(0,A.default)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),e$=["className","slots","slotProps","direction","orientation","disabled"],eF=(0,X.default)(z.default,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})(({ownerState:e})=>(0,T.default)({width:40,flexShrink:0,opacity:.8,[`&.${eN.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),eL=a.forwardRef(function(e,t){var a,l;let i=(0,P.useDefaultProps)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:n={},slotProps:s={},direction:d}=i,c=(0,L.default)(i,e$),u=(0,eg.useRtl)(),p=(0,T.default)({isRtl:u},i),m=(e=>{let{classes:t,orientation:r,disabled:a}=e;return(0,I.default)({root:["root",r,a&&"disabled"]},eB,t)})(p),f=null!=(a=n.StartScrollButtonIcon)?a:ek,h=null!=(l=n.EndScrollButtonIcon)?l:e_,x=(0,eb.default)({elementType:f,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),g=(0,eb.default)({elementType:h,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return(0,r.jsx)(eF,(0,T.default)({component:"div",className:(0,R.default)(m.root,o),ref:t,role:null,ownerState:p,tabIndex:null},c,{children:"left"===d?(0,r.jsx)(f,(0,T.default)({},x)):(0,r.jsx)(h,(0,T.default)({},g))}))});var eT=e.i(615714);function eR(e){return(0,O.default)("MuiTabs",e)}let eI=(0,A.default)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","
1indicator"]);var ez=e.i(876075),eE=e.i(385052);let eP=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],eA=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,eO=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,eG=(e,t,r)=>{let a=!1,l=r(e,t);for(;l;){if(l===e.firstChild){if(a)return;a=!0}let t=l.disabled||"true"===l.getAttribute("aria-disabled");if(l.hasAttribute("tabindex")&&!t)return void l.focus();l=r(e,l)}},eH=(0,X.default)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`& .${eI.scrollButtons}`]:t.scrollButtons},{[`& .${eI.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>(0,T.default)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${eI.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),eX=(0,X.default)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})(({ownerState:e})=>(0,T.default)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),eD=(0,X.default)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})(({ownerState:e})=>(0,T.default)({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),eU=(0,X.default)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>(0,T.default)({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),eV=(0,X.default)(function(e){let{onChange:t}=e,l=(0,L.default)(e,eC),i=a.useRef(),o=a.useRef(null),n=()=>{i.current=o.current.offsetHeight-o.current.clientHeight};return(0,eS.default)(()=>{let e=(0,ev.default)(()=>{let e=i.current;n(),e!==i.current&&t(i.current)}),r=(0,ej.ownerWindow)(o.current);return r.addEventListener("resize",e),()=>{e.clear(),r.removeEventListener("resize",e)}},[t]),a.useEffect(()=>{n(),t(i.current)},[t]),(0,r.jsx)("div",(0,T.default)({style:eM},l,{ref:o}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),eY={},eq=a.forwardRef(function(e,t){let l,i,o=(0,P.useDefaultProps)({props:e,name:"MuiTabs"}),n=(0,K.default)(),s=(0,eg.useRtl)(),{"aria-label":d,"aria-labelledby":c,action:u,centered:p=!1,children:m,className:f,component:h="div",allowScrollButtonsMobile:x=!1,indicatorColor:g="primary",onChange:b,orientation:v="horizontal",ScrollButtonComponent:w=eL,scrollButtons:y="auto",selectionFollowsFocus:j,slots:S={},slotProps:C={},TabIndicatorProps:M={},TabScrollButtonProps:W={},textColor:k="primary",value:_,variant:B="standard",visibleScrollbar:N=!1}=o,$=(0,L.default)(o,eP),F="scrollable"===B,z="vertical"===v,E=z?"scrollTop":"scrollLeft",A=z?"top":"left",O=z?"bottom":"right",G=z?"clientHeight":"clientWidth",H=z?"height":"width",X=(0,T.default)({},o,{component:h,allowScrollButtonsMobile:x,indicatorColor:g,orientation:v,vertical:z,scrollButtons:y,textColor:k,variant:B,visibleScrollbar:N,fixed:!F,hideScrollbar:F&&!N,scrollableX:F&&!z,scrollableY:F&&z,centered:p&&!F,scrollButtonsHideMobile:!x}),D=(e=>{let{vertical:t,fixed:r,hideScrollbar:a,scrollableX:l,scrollableY:i,centered:o,scrollButtonsHideMobile:n,classes:s}=e;return(0,I.default)({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",a&&"hideScrollbar",l&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",n&&"scrollButtonsHideMobile"],scrollableX:[l&&"scrollableX"],hideScrollbar:[a&&"hideScrollbar"]},eR,s)})(X),U=(0,eb.default)({elementType:S.StartScrollButtonIcon,externalSlotProps:C.startScrollButtonIcon,ownerState:X}),V=(0,eb.default)({elementType:S.EndScrollButtonIcon,externalSlotProps:C.endScrollButtonIcon,ownerState:X}
1),[Y,q]=a.useState(!1),[Z,Q]=a.useState(eY),[J,ee]=a.useState(!1),[et,er]=a.useState(!1),[ea,el]=a.useState(!1),[ei,eo]=a.useState({overflow:"hidden",scrollbarWidth:0}),en=new Map,es=a.useRef(null),ed=a.useRef(null),ec=()=>{let e,t,r=es.current;if(r){let t=r.getBoundingClientRect();e={clientWidth:r.clientWidth,scrollLeft:r.scrollLeft,scrollTop:r.scrollTop,scrollLeftNormalized:function(e,t){let r=e.scrollLeft;if("rtl"!==t)return r;switch(ew()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}(r,s?"rtl":"ltr"),scrollWidth:r.scrollWidth,top:t.top,bottom:t.bottom,left:t.left,right:t.right}}if(r&&!1!==_){let e=ed.current.children;if(e.length>0){let r=e[en.get(_)];t=r?r.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},eu=(0,eT.default)(()=>{let e,{tabsMeta:t,tabMeta:r}=ec(),a=0;if(z)e="top",r&&t&&(a=r.top-t.top+t.scrollTop);else if(e=s?"right":"left",r&&t){let l=s?t.scrollLeftNormalized+t.clientWidth-t.scrollWidth:t.scrollLeft;a=(s?-1:1)*(r[e]-t[e]+l)}let l={[e]:a,[H]:r?r[H]:0};if(isNaN(Z[e])||isNaN(Z[H]))Q(l);else{let t=Math.abs(Z[e]-l[e]),r=Math.abs(Z[H]-l[H]);(t>=1||r>=1)&&Q(l)}}),ep=(e,{animation:t=!0}={})=>{t?function(e,t,r,a={},l=()=>{}){let{ease:i=ey,duration:o=300}=a,n=null,s=t[e],d=!1,c=a=>{if(d)return void l(Error("Animation cancelled"));null===n&&(n=a);let u=Math.min(1,(a-n)/o);(t[e]=i(u)*(r-s)+s,u>=1)?requestAnimationFrame(()=>{l(null)}):requestAnimationFrame(c)};s===r?l(Error("Element already at target position")):requestAnimationFrame(c)}(E,es.current,e,{duration:n.transitions.duration.standard}):es.current[E]=e},em=e=>{let t=es.current[E];z?t+=e:(t+=e*(s?-1:1),t*=s&&"reverse"===ew()?-1:1),ep(t)},ef=()=>{let e=es.current[G],t=0,r=Array.from(ed.current.children);for(let a=0;a<r.length;a+=1){let l=r[a];if(t+l[G]>e){0===a&&(t=e);break}t+=l[G]}return t},eh=a.useCallback(e=>{eo({overflow:null,scrollbarWidth:e})},[]),ex=(0,eT.default)(e=>{let{tabsMeta:t,tabMeta:r}=ec();r&&t&&(r[A]<t[A]?ep(t[E]+(r[A]-t[A]),{animation:e}):r[O]>t[O]&&ep(t[E]+(r[O]-t[O]),{animation:e}))}),ej=(0,eT.default)(()=>{F&&!1!==y&&el(!ea)});a.useEffect(()=>{let e,t,r=(0,ev.default)(()=>{es.current&&eu()}),a=(0,eE.default)(es.current);return a.addEventListener("resize",r),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(r),Array.from(ed.current.children).forEach(t=>{e.observe(t)})),"undefined"!=typeof MutationObserver&&(t=new MutationObserver(t=>{t.forEach(t=>{t.removedNodes.forEach(t=>{var r;null==(r=e)||r.unobserve(t)}),t.addedNodes.forEach(t=>{var r;null==(r=e)||r.observe(t)})}),r(),ej()})).observe(ed.current,{childList:!0}),()=>{var l,i;r.clear(),a.removeEventListener("resize",r),null==(l=t)||l.disconnect(),null==(i=e)||i.disconnect()}},[eu,ej]),a.useEffect(()=>{let e=Array.from(ed.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&F&&!1!==y){let r=e[0],a=e[t-1],l={root:es.current,threshold:.99},i=new IntersectionObserver(e=>{ee(!e[0].isIntersecting)},l);i.observe(r);let o=new IntersectionObserver(e=>{er(!e[0].isIntersecting)},l);return o.observe(a),()=>{i.disconnect(),o.disconnect()}}},[F,y,ea,null==m?void 0:m.length]),a.useEffect(()=>{q(!0)},[]),a.useEffect(()=>{eu()}),a.useEffect(()=>{ex(eY!==Z)},[ex,Z]),a.useImperativeHandle(u,()=>({updateIndicator:eu,updateScrollButtons:ej}),[eu,ej]);let eS=(0,r.jsx)(eU,(0,T.default)({},M,{className:(0,R.default)(D.indicator,M.className),ownerState:X,style:(0,T.default)({},Z,M.style)})),eC=0,eM=a.Children.map(m,e=>{if(!a.isValidElement(e))return null;let t=void 0===e.props.value?eC:e.props.value;en.set(t,eC);let r=t===_;return eC+=1,a.cloneElement(e,(0,T.default)({fullWidth:"fullWidth"===B,indicator:r&&!Y&&eS,selected:r,selectionFollowsFocus:j,onChange:b,textColor:k,value:t},1!==eC||!1!==_||e.props.tabIndex?{}:{tabIndex:0}))}),eW=((l={}).scrollbarSizeListener=F?(0,r.jsx)(eV,{onChange:eh,className:(0,R.default)(D.scrollableX,D.hideScrollbar)}):null,l.scrollButtonStart=(i=F&&("auto"===y&&(J||et)||!0===y))?(0,r.jsx)(w,(0,T.default)({slots:{StartScrollButtonIcon:S.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:U},orientation:v,direction:s?"right":"left",onClick:()=>{em(-1*ef())},disabled:!J},W,{className:(0,R.default)(D.scrollButtons,W.className)})):null,l.scrollButtonEnd=i?(0,r.jsx)(w,(0,T.default)({slots:{EndScrollButtonIcon:S.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:V},orientation:v,direction:s?"left":"right",onClick:()=>{em(ef())},disabled:!et},W,{className:(0,R.default)(D.scrollButtons,W.className)})):null,l);return(0,r.jsxs)(eH,(0,T.default)({className:(0,R.default)(D.root,f),ownerState:X,ref:t,as:h},$,{children:[eW.scrollButtonStart,eW.scrollbarSizeListener,(0,r.jsxs)(eX,{className:D.scroller,ownerState:X,style:{overflow:ei.overflow,[z?`margin${s?"Left":"Right"}`:"marginBottom"]:N?void 0:-ei.scrollbarWidth},ref:es,children:[(0,r.jsx)(eD,{"aria-label":d,"aria-labelledby":c,"aria-orientation":"vertical"===v?"vertical":null,className:D.flexContainer,ownerState:X,onKeyDown:e=>{let t=ed.current,r=(0,ez.default)(t).activeElement;if("tab"!==r.getAttribute("role"))return;let a="horizontal"===v?"ArrowLeft":"ArrowUp",l="horizontal"===v?"ArrowRight":"ArrowDown";switch("horizontal"===v&&s&&(a="ArrowRight",l="ArrowLeft"),e.key){case a:e.preventDefault(),eG(t,r,eO);break;case l:e.preventDefault(),eG(t,r,eA);break;case"Home":e.preventDefault(),eG(t,null,eA);break;case"End":e.preventDefault(),eG(t,null,eO)}},ref:ed,role:"tablist",children:eM}),Y&&eS]}),eW.scrollButtonEnd]}))});var eZ=e.i(715423),eQ=e.i(611914),eK=e.i(974341),eJ=e.i(953561);let e0={PaperProps:{style:{maxHeight:224,width:250}},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},variant:"menu"};function e1({valueType:e,setValueType:t,metricSelected:l,gwlSelected:i,setMetricSelected:o,setGwlSelected:s,globalWarmingLevels:d,metrics:c}){let{open:u,drawerWidth:p}=(0,eQ.useLeftDrawer)(),[m,f]=(0,a.useState)(null),h=(0,a.useRef)(null),x=u?"100%":`calc(100% - ${p}
1 - 72px)`,g=(0,B.useRouter)();(0,B.useSearchParams)();let b=!!m,v="help-popover",w="help-popover-title";return(0,a.useEffect)(()=>{let e=setTimeout(()=>{h.current&&f(h.current)},1e3);return()=>clearTimeout(e)},[]),(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search),r=e.get("metric");if(r){let e=c.find(e=>e.slug===r);e?o(e.id):(console.warn(`Unknown metric selected: ${r}`),o(c[0].id))}else o(c[0].id);let a=e.get("gwl");if(a){let e=parseInt(a,10);isNaN(e)||s(e)}let l=e.get("valueType");("abs"===l||"del"===l)&&t(l)},[]),(0,r.jsx)("div",{className:eJ.default.mapUI,style:{width:`calc(100% - ${u?275:72}px)`,transition:"width 225ms cubic-bezier(0.4, 0, 0.6, 1)"},children:(0,r.jsx)(n.default,{sx:{height:"80vh",display:"flex",flexDirection:"column"},children:(0,r.jsxs)(en,{container:!0,direction:"column",sx:{height:"100%"},children:[(0,r.jsxs)(en,{container:!0,spacing:2,children:[(0,r.jsx)(en,{item:!0,xs:3,children:(0,r.jsxs)("div",{className:eJ.default.parameterSelection,children:[(0,r.jsx)("div",{className:eJ.default.valueType,children:(0,r.jsx)(n.default,{sx:{width:x},children:(0,r.jsxs)(eq,{className:"container container--transparent",value:e,onChange:(e,r)=>{t(r)},centered:!0,children:[(0,r.jsx)(ex,{value:"abs",label:"Absolute"}),(0,r.jsx)(ex,{value:"del",label:"Delta"})]})})}),(0,r.jsx)("div",{className:"container container--transparent",children:(0,r.jsxs)("div",{className:"option-group option-group--vertical",children:[(0,r.jsxs)("div",{className:"option-group__title",children:[(0,r.jsx)(y.default,{variant:"body2",id:"gwl-label",children:"Global Warming Level"}),(0,r.jsx)(eZ.default,{textFragment:(0,r.jsx)(a.default.Fragment,{children:(0,r.jsx)("p",{children:eK.tooltips[0].long_text})}),iconFragment:(0,r.jsx)(N.default,{}),TransitionComponent:q.default,TransitionProps:{timeout:600},placement:"right-end"})]}),(0,r.jsx)(F.FormControl,{children:(0,r.jsx)(eu.default,{"aria-label":"GWL",id:"gwl-select",labelId:"gwl-label",value:i,onChange:e=>{s(e.target.value)},MenuProps:e0,sx:{mt:"15px",width:"200px"},children:d.map((e,t)=>(0,r.jsx)(ed.default,{value:t,children:(0,r.jsx)(es.default,{primary:`${e}\xb0`})},e))})})]})}),(0,r.jsx)("div",{className:"container container--transparent",children:(0,r.jsxs)("div",{className:"option-group option-group--vertical",children:[(0,r.jsxs)("div",{className:"option-group__title",children:[(0,r.jsx)(y.default,{id:"metric-label",variant:"body2",children:"Metric"}),(0,r.jsx)(eZ.default,{textFragment:(0,r.jsx)(a.default.Fragment,{children:(0,r.jsx)("p",{children:eK.tooltips[1].long_text})}),iconFragment:(0,r.jsx)(N.default,{}),TransitionComponent:q.default,TransitionProps:{timeout:600},placement:"right-end"})]}),(0,r.jsx)(F.FormControl,{children:(0,r.jsx)(eu.default,{"aria-label":"Metric",id:"metric-select",labelId:"metric-label",value:l,onChange:e=>{console.log("handleMetricChange");let t=e.target.value;o(t);let r=c.find(e=>e.id===t);if(r){let e=new URLSearchParams(window.location.search);e.set("metric",r.slug),g.push(`?${e.toString()}`)}},MenuProps:e0,sx:{mt:"15px",width:"220px"},children:c.map(e=>(0,r.jsx)(ed.default,{value:e.id,children:(0,r.jsx)(es.default,{primary:e.title})},e.id))})})]})})]})}),(0,r.jsx)(en,{item:!0,xs:9})]}),(0,r.jsx)(en,{item:!0,xs:!0}),(0,r.jsxs)(en,{container:!0,item:!0,justifyContent:"center",children:[(0,r.jsx)(en,{item:!0,xs:10}),(0,r.jsxs)(en,{item:!0,xs:2,children:[(0,r.jsx)(Y,{className:eJ.default.helpButton,color:"secondary",sx:{float:"right",mr:"50px"},"aria-label":"Open help dialog","aria-controls":b?v:void 0,"aria-expanded":b,"aria-haspopup":"dialog",size:"medium",onClick:e=>{f(e.currentTarget)},ref:h,children:(0,r.jsx)($.default,{})}),(0,r.jsxs)(ec.default,{id:v,className:"help-popover","aria-labelledby":w,open:b,anchorEl:m,onClose:()=>{f(null)},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiPaper-root":{width:"400px",height:"500px",padding:"30px"}},children:[(0,r.jsx)(y.default,{variant:"h5",id:w,children:"About the Climate Metrics Map tool"}),(0,r.jsx)(y.default,{variant:"body1",id:w,children:(0,r.jsx)("p",{children:"Showing the absolute and change in extreme weather across heat, precipitation, and fire weather over the potential futures in California allows individuals, planners, researchers, and interested parties to examine the general shape of climate projections."})}
1),(0,r.jsx)(y.default,{variant:"h6",style:{marginTop:"15px"},id:w,children:"Projections Type"}),(0,r.jsxs)(y.default,{variant:"body1",id:w,children:[(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Absolute"}),": show the average expected value for the chosen metric and at the selected Global Warming Level (GWL)."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Delta"}),": show the change between a 0.8° C world (approximately 1987-2016) and the selected GWL"]})]}),(0,r.jsx)(y.default,{variant:"h6",id:w,style:{marginTop:"15px"},children:"Global Warming Level"}),(0,r.jsxs)(y.default,{variant:"body1",children:[(0,r.jsx)("p",{children:"Show what different parts of California will look like when the world, as a whole, has increased average temperature compared to pre-industrial by the chosen amount."}),(0,r.jsxs)("p",{children:["For additional information go to:"," ",(0,r.jsx)("a",{href:"https://cmip5.cal-adapt.org/blog/understanding-warming-levels",target:"_blank",children:(0,r.jsx)("span",{className:"underline",children:"Understanding Climate Futures through the lens of global Warming Levels"})})]})]}),(0,r.jsxs)(y.default,{id:w,variant:"body1",style:{marginTop:"15px"},children:["Use the dropdown menu to select a global warming scenario (e.g., 1.5°C, 2.0°C). This will adju
1st the data overlays to reflect projected changes under the selected warming level. (",(0,r.jsx)("a",{href:"https://climate.gov",target:"_blank",children:(0,r.jsx)("span",{className:"underline",children:"Climate.gov"})})," ","has more information)"]}),(0,r.jsx)(y.default,{id:w,variant:"h6",sx:{mt:"15px"},children:"Metric"}),(0,r.jsxs)(y.default,{id:w,variant:"body1",children:[(0,r.jsx)("p",{children:"Choose a climate metric to display on the map (e.g., extreme temperature, extreme precipitation, fire weather index) Each metric provides a unique perspective on how climate change impacts various regions."}),"(A plain language description of metrics can be found"," ",(0,r.jsx)("a",{href:"https://docs.google.com/document/d/19UB672X38z21QlEkieWEwWLwZQWU_L7wMW5zq9bo7tc/edit?usp=sharing",target:"_blank",children:(0,r.jsx)("span",{className:"underline",children:"here"})}),")"]}),(0,r.jsx)(y.default,{id:w,variant:"h6",sx:{mt:"15px"},children:"Interactive Map Features"}),(0,r.jsxs)(y.default,{id:w,variant:"body1",children:[(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Pan and Zoom:"})," Click and drag to move the map, and use the scroll wheel or zoom buttons to focus on specific areas."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Region Highlighting:"})," Click on a region to view localized climate data and projections."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Legend:"})," The color scale on the map legend indicates the range of values for the selected metric."]})]})]})]})]})]})})})}function e3(){let[e,t]=(0,a.useState)(0),[n,s]=(0,a.useState)(0),[d,c]=(0,a.useState)("abs"),[u,p]=(0,a.useState)([]);return(0,a.useEffect)(()=>{!async function(){if(n<0)return;let e=i[n][d];try{let r=await o.calAdaptApi.map.getGwlInfo(e.mean,e.variable);if(r.length>0){p(r);let e=r.indexOf(1.5);t(e>=0?e:0)}}catch(e){console.error("Failed to fetch GWL:",e)}}()},[n,d]),(0,r.jsxs)(l.default,{container:!0,sx:{height:"100%",flexDirection:"column",flexWrap:"nowrap",flexGrow:1},children:[(0,r.jsx)(e1,{globalWarmingLevels:u,metrics:i,gwlSelected:e,setGwlSelected:t,metricSelected:n,setMetricSelected:s,valueType:d,setValueType:c}),(0,r.jsx)(_,{gwlSelected:e,metricSelected:n,globalWarmingLevels:u,metrics:i,valueType:d})]})}e.s(["default",()=>e3],270587)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.