1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3094],{6505:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/interest-rates",function(){return a(790)}])},5614:function(e,t,a){"use strict";a.d(t,{Z:function(){return d}});var n=a(5893),s=a(3043),i=a(4246),r=a(9505),o=a(1893);function d(e){let{title:t,subtitle:a,headerAppend:d}=e,c=(0,o.G6)();return(0,n.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column",gap:3,pb:3},children:[(0,n.jsxs)(s.Z,{sx:{display:"flex",flexDirection:c?"column":"row",gap:c?2:3,alignItems:c?"start":"end"},children:[(0,n.jsx)(i.Z,{sx:{fontSize:36,mb:-1},color:"gray.800",children:t}),d]}),(0,n.jsx)(s.Z,{sx:{display:"flex",flexDirection:"row",gap:.5,color:"gray.400"},children:(0,n.jsx)(i.Z,{variant:"h3",color:"gray.500",children:a})}),(0,n.jsx)(r.Z,{})]})}},2850:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var n=a(5893),s=a(6799),i=a(5416),r=a(7636),o=a(6605),d=a(8452);function c(e){let{setUsState:t,usState:a,width:c,label:l}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(s.Z,{variant:"outlined",sx:{minWidth:0,pr:1},children:[l&&(0,n.jsx)(i.Z,{children:l}),(0,n.jsx)(r.Z,{sx:{width:c||"100%",height:"32px"},required:!0,onChange:e=>{t(e.target.value)},value:a,children:d.u.map(e=>{var t;return(0,n.jsx)(o.Z,{value:null==e?void 0:e.state_code,children:null==e?void 0:null===(t=e.state_code)||void 0===t?void 0:t.toUpperCase()},null==e?void 0:e.state_code)})})]})})}},790:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return j}});var n=a(5893),s=a(2850),i=a(3043),r=a(4246),o=a(7294),d=a(8198),c=a(9189),l=a(649),u=a(1758);function h(){let{data:e,isLoading:t}=(0,u.ZP)("/api/interest-rates/all",c._,{refreshInterval:0,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1});return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(l._,{density:"compact",rows:e||[],columns:[{field:"state",headerName:"State",width:65},{field:"thirty_year_fixed",headerName:"30 Yr Fixed",width:100},{field:"twenty_year_fixed",headerName:"20 Yr Fixed",width:100},{field:"fifteen_year_fixed",headerName:"15 Yr Fixed",width:100}],editMode:"row",loading:t,showColumnRightBorder:!0})})}var f=a(7414),_=a(3821),w=a(3777),x=a(9203),m=a(1893);function v(e){let{state1:t,state2:a}=e;(0,m.G6)();let s=new URLSearchParams({state1:t,state2:a}),r="/api/interest-rates/timeseries?".concat(s.toString()),{data:o,isLoading:d}=(0,u.ZP)(r,c._),l=Math.max(...(null==o?void 0:o.map(e=>Math.max(e.s1_rate,e.s2_rate)))||[]),h=Math.min(...(null==o?void 0:o.map(e=>Math.min(e.s1_rate,e.s2_rate)))||[]),v={data:[o,o],xField:"event_date",yField:["s1_rate","s2_rate"],yAxis:{},tooltip:{},meta:{date:{},s1_rate:{alias:t.toUpperCase(),tickCount:4,formatter:e=>parseFloat(e).toFixed(2),min:h-.2,max:l+.2},s2_rate:{alias:a.toUpperCase(),tickCount:4,formatter:e=>parseFloat(e).toFixed(2),min:h-.2,max:l+.2}},geometryOptions:[{geometry:"line",color:"#5B8FF9",smooth:!0},{geometry:"line",color:"#5AD8A6",smooth:!0}]};return(0,n.jsx)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:(0,n.jsxs)(_.Z,{children:[(0,n.jsx)(w.Z,{disableTypography:!0,sx:{fontSize:"1.2rem",color:"#5b5e5e",marginBottom:-2},title:"Rates Over Time"}),(0,n.jsx)(x.Z,{children:(0,n.jsx)(i.Z,{height:250,children:!d&&(0,n.jsx)(f.Z,{...v})})})]})})}var g=a(5614),p=a(150),y=a(7740);function j(){let[e,t]=(0,o.useState)("ut"),[a,c]=(0,o.useState)("ca"),l=(0,y.I4)();return(0,n.jsxs)(p.Z,{pageTitle:"Home Slice | Interest Rates",pageDescription:"Live interest rates for every state",allowed:!0,children:[(0,n.jsx)(g.Z,{title:"Interest Rates",subtitle:"Live interest rates for every state.",headerAppend:(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"row",gap:1,alignItems:"center",color:"gray.400"},children:[(0,n.jsx)(d.Bge,{}),(0,n.jsx)(r.Z,{sx:{fontSize:16},children:l})]})}),(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"row",gap:2},children:[(0,n.jsx)(s.Z,{setUsState:t,usState:e}),(0,n.jsx)(s.Z,{setUsState:c,usState:a})]}),(0,n.jsx)(v,{state1:e,state2:a}),(0,n.jsx)(i.Z,{sx:{display:"flex",height:600},children:(0,n.jsx)(h,{})})]})]})}}
1,7740:function(e,t,a){"use strict";function n(){let e=new Date,t=new Date(new Date(e.getTime()- -6e4*e.getTimezoneOffset()));e.setDate(e.getDate()+1);let a=new Date(e.setDate(e.getDate()-90));return[new Date(new Date(a.getTime()- -6e4*a.getTimezoneOffset())).toISOString().split("T")[0],t.toISOString().split("T")[0]]}function s(){return new Date().toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function i(e){return e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"}):""}a.d(t,{I4:function(){return s},M2:function(){return n},bY:function(){return i}}),a(7484)},9189:function(e,t,a){"use strict";a.d(t,{H:function(){return i},_:function(){return s}});var n=a(6501);let s=async(e,t)=>{let a=await fetch(e,{headers:(null==t?void 0:t.headers)||{},cache:"no-store"});if(!a.ok)throw n.ZP.error((null==t?void 0:t.customToastError)||"An error has occured",{position:"bottom-right",duration:5e3}),Error("An error has occured");return await a.json()},i=async e=>{let t=await fetch(e[0],{headers:{"session-token":e[1]}});return t.ok||n.ZP.error("An error has occured",{position:"bottom-right",duration:5e3}),await t.json()}},1893:function(e,t,a){"use strict";a.d(t,{G6:function(){return s},Y:function(){return i},Zk:function(){return r}});var n=a(7294);function s(){let[e,t]=n.useState({width:1500,height:1e3}),[a,s]=n.useState(!1);return n.useEffect(()=>{function e(){var e,a;t({width:(null===(e=window)||void 0===e?void 0:e.innerWidth)||1500,height:(null===(a=window)||void 0===a?void 0:a.innerHeight)||1e3}),window.innerWidth<=600?s(!0):s(!1)}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),a}function i(){let[e,t]=n.useState({width:1500,height:1e3});return n.useEffect(()=>{function e(){var e,a;t({width:(null===(e=window)||void 0===e?void 0:e.innerWidth)||1500,height:(null===(a=window)||void 0===a?void 0:a.innerHeight)||1e3})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e}function r(){let[e,t]=n.useState({width:1500,height:1e3}),[a,s]=n.useState(!1);return n.useEffect(()=>{function e(){var e,a;t({width:(null===(e=window)||void 0===e?void 0:e.innerWidth)||1500,height:(null===(a=window)||void 0===a?void 0:a.innerHeight)||1e3}),window.innerWidth<1200?s(!0):s(!1)}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),a}},8452:function(e,t,a){"use strict";a.d(t,{u:function(){return n}});let n=[{state:"Alabama",state_code:"al"},{state:"Alaska",state_code:"ak"},{state:"Arizona",state_code:"az"},{state:"Arkansas",state_code:"ar"},{state:"California",state_code:"ca"},{state:"Colorado",state_code:"co"},{state:"Connecticut",state_code:"ct"},{state:"Delaware",state_code:"de"},{state:"Florida",state_code:"fl"},{state:"Georgia",state_code:"ga"},{state:"Hawaii",state_code:"hi"},{state:"Idaho",state_code:"id"},{state:"Illinois",state_code:"il"},{state:"Indiana",state_code:"in"},{state:"Iowa",state_code:"ia"},{state:"Kansas",state_code:"ks"},{state:"Kentucky",state_code:"ky"},{state:"Louisiana",state_code:"la"},{state:"Maine",state_code:"me"},{state:"Maryland",state_code:"md"},{state:"Massachusetts",state_code:"ma"},{state:"Michigan",state_code:"mi"},{state:"Minnesota",state_code:"mn"},{state:"Mississippi",state_code:"ms"},{state:"Missouri",state_code:"mo"},{state:"Montana",state_code:"mt"},{state:"Nebraska",state_code:"ne"},{state:"Nevada",state_code:"nv"},{state:"New Hampshire",state_code:"nh"},{state:"New Jersey",state_code:"nj"},{state:"New Mexico",state_code:"nm"},{state:"New York",state_code:"ny"},{state:"North Carolina",state_code:"nc"},{state:"North Dakota",state_code:"nd"},{state:"Ohio",state_code:"oh"},{state:"Oklahoma",state_code:"ok"},{state:"Oregon",state_code:"or"},{state:"Pennsylvania",state_code:"pa"},{state:"Rhode Island",state_code:"ri"},{state:"South Carolina",state_code:"sc"},{state:"South Dakota",state_code:"sd"},{state:"Tennessee",state_code:"tn"},{state:"Texas",state_code:"tx"},{state:"Utah",state_code:"ut"},{state:"Vermont",state_code:"vt"},{state:"Virginia",state_code:"va"},{state:"Washington",state_code:"wa"},{state:"West Virginia",state_code:"wv"},{state:"Wisconsin",state_code:"wi"},{state:"Wyoming",state_code:"wy"}]}},function(e){e.O(0,[6556,9961,8263,3875,5234,9046,649,1758,9316,150,2888,9774,179],function(){return e(e.s=6505)}),_N_E=e.O()}]);
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.