1import{j as e,r as A,__tla as L}from"./vendor-BvzV4098.js";import{W as O,__tla as q}from"./widgetDataNav-Bpr3bh_v.js";import{D as G,__tla as H}from"./econLiveData-ObD-Miqf.js";import{__tla as Q}from"./fetchEconData-CGEl_7n0.js";import{__tla as U}from"./index-DkXTyYOv.js";import{__tla as V}from"./jspdf-CfiETrc0.js";import{__tla as $}from"./framer-motion-C706ZmUs.js";import"./html2canvas-B0tyYwQk.js";import"./r0yEconNormalize-bUJfz_MD.js";let C,J=Promise.all([(()=>{try{return L}catch{}})(),(()=>{try{return q}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return U}catch{}})(),(()=>{try{return V}catch{}})(),(()=>{try{return $}catch{}})()]).then(async()=>{const T=[{id:"DTWEXBGS",provider:"FRED",description:"Nominal Broad U.S. Dollar Index (trade-weighted, daily)",endpoint:"/econ-fetch?alias=dxy",cadence:"Daily"},{id:"SP500",provider:"FRED",description:"S&P 500 close \u2014 paired with DXY for 120D rolling correlation",endpoint:"/econ-fetch?alias=sp500",cadence:"Daily"},{id:"NASDAQCOM",provider:"FRED",description:"NASDAQ Composite close \u2014 paired with DXY for 120D rolling correlation",endpoint:"/econ-fetch?alias=ndx",cadence:"Daily"}],v="#0a0a0d",_="rgba(255,255,255,0.05)",P="rgba(255,255,255,0.08)",D="rgba(255,255,255,0.92)",u="rgba(255,255,255,0.50)",R="rgba(255,255,255,0.32)",z="rgba(255,255,255,0.05)",j="#fbbf24",b="#7c86ff",F="#4ade80",k="#f87171",s="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",W=()=>{const t=Array.from({length:520},(o,x)=>{const p=new Date;p.setDate(p.getDate()-(520-x));const d=x/520,g=100+6*Math.sin(x/35)+d*4,i=4500+600*d+90*Math.sin(x/18),h=14e3+2500*d+300*Math.sin(x/18);return{date:p.toISOString().slice(0,10),dxy:g,spx:i,ndx:h}}),n=t.map(o=>({date:o.date,value:o.dxy,period_start:o.date})),a=t.map(o=>({date:o.date,value:o.spx,period_start:o.date})),l=t.map(o=>({date:o.date,value:o.ndx,period_start:o.date}));return{dxy:n,spx:a,ndx:l,paired:t,correlationSpx:-.42,correlationNdx:-.38,latestDxy:n[n.length-1].value,latestSpx:a[a.length-1].value,asOf:t[t.length-1].date}},Y=W();function B(){const[t,n]=A.useState(Y);return A.useEffect(()=>{let a=!1;return G().then(l=>{!a&&l&&n(l)}).catch(()=>{}),()=>{a=!0}},[]),t}const E=({b:t})=>{const n=t.paired.slice(-260);if(!n.length)return null;const a=n.map(r=>r.dxy),l=n.map(r=>r.spx),o=Math.min(...a)*.99,x=Math.max(...a)*1.01,p=Math.min(...l)*.99,d=Math.max(...l)*1.01,g=r=>50+r/Math.max(1,n.length-1)*660,i=r=>254-(r-o)/(x-o)*238,h=r=>254-(r-p)/(d-p)*238,f=n.map((r,y)=>(y===0?"M":"L")+g(y).toFixed(1)+" "+i(r.dxy).toFixed(1)).join(" "),S=n.map((r,y)=>(y===0?"M":"L")+g(y).toFixed(1)+" "+h(r.spx).toFixed(1)).join(" ");return e.jsxs("svg",{viewBox:"0 0 760 280",width:"100%",preserveAspectRatio:"xMidYMid meet",style:{display:"block"},children:[e.jsx("defs",{children:e.jsx("clipPath",{id:"dx-clip",children:e.jsx("rect",{x:50,y:16,width:660,height:238})})}),[o,(o+x)/2,x].map(r=>e.jsxs("g",{children:[e.jsx("line",{x1:50,y1:i(r),x2:710,y2:i(r),stroke:z,strokeWidth:.5}),e.jsx("text",{x:44,y:i(r)+3,fontFamily:s,fontSize:10,fill:j,textAnchor:"end",children:r.toFixed(1)})]},r)),[p,(p+d)/2,d].map(r=>e.jsx("text",{x:716,y:h(r)+3,fontFamily:s,fontSize:10,fill:b,textAnchor:"start",children:r.toFixed(0)},r)),e.jsxs("g",{clipPath:"url(#dx-clip)",children:[e.jsx("path",{d:f,fill:"none",stroke:j,strokeWidth:1.6}),e.jsx("path",{d:S,fill:"none",stroke:b,strokeWidth:1.6,strokeDasharray:"4 3"})]})]})},I=({b:t})=>{const n=t.paired,a=30,l=[];for(let i=a;i<n.length;i++){const h=n.slice(i-a,i),f=h.map(c=>c.dxy),S=h.map(c=>c.spx),r=f.reduce((c,m)=>c+m,0)/f.length,y=S.reduce((c,m)=>c+m,0)/S.length;let N=0,M=0,w=0;for(let c=0;c<f.length;c++){const m=f[c]-r,X=S[c]-y;N+=m*X,M+=m*m,w+=X*X}l.push(M>0&&w>0?N/Math.sqrt(M*w):0)}if(!l.length)return null;const o=-1,x=1,p=i=>36+i/Math.max(1,l.length-1)*316,d=i=>198-(i-o)/(x-o)*184,g=l.map((i,h)=>(h===0?"M":"L")+p(h).toFixed(1)+" "+d(i).toFixed(1)).join(" ");return e.jsxs("svg",{viewBox:"0 0 360 220",width:"100%",preserveAspectRatio:"xMidYMid meet",style:{display:"block"},children:[[-1,0,1].map(i=>e.jsxs("g",{children:[e.jsx("line",{x1:36,y1:d(i),x2:352,y2:d(i),stroke:z,strokeWidth:i===0?1:.5,strokeDasharray:i===0?"0":"2 3"}),e.jsx("text",{x:30,y:d(i)+3,fontFamily:s,fontSize:10,fill:R,textAnchor:"end",children:i.toFixed(1)})]},i)),e.jsx("path",{d:g,fill:"none",stroke:l[l.length-1]>=0?F:k,strokeWidth:1.5})]})};C=function(){const t=B(),n=t.correlationSpx>.3?"Co-move":t.correlationSpx<-.3?"Inverse":"Decoupled",a=t.correlationNdx>.3?"Co-move":t.correlationNdx<-.3?"Inverse":"Decoupled";return e.jsxs(O,{title:"Dollar vs Equities",subtitle:"Trade-weighted DXY \xB7 SPX \xB7 NDX correlation regime",asOf:t.asOf,sources:T,children:[e.jsx("div",{style:{display:"flex",gap:10,marginBottom:10},children:[{l:"DXY (TWI)",v:t.latestDxy.toFixed(2),c:j},{l:"S&P 500",v:t.latestSpx.toFixed(0),c:b},{l:"DXY \u2194 SPX (120d)",v:(t.correlationSpx>=0?"+":"")+t.correlationSpx.toFixed(2),c:t.correlationSpx>=0?F:k},{l:"DXY \u2194 NDX (120d)",v:(t.correlationNdx>=0?"+":"")+t.correlationNdx.toFixed(2),c:t.correlationNdx>=0?F:k}
1].map(l=>e.jsxs("div",{style:{flex:"1 1 0",minWidth:0,background:v,border:"1px solid "+_,borderRadius:8,padding:"12px 16px 14px",boxSizing:"border-box"},children:[e.jsx("div",{style:{fontFamily:s,fontSize:10.5,color:u,letterSpacing:"0.06em"},children:l.l}),e.jsx("div",{style:{fontFamily:s,fontSize:22,color:l.c,marginTop:2,fontWeight:500},children:l.v})]},l.l))}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 380px",gap:12},children:[e.jsxs("div",{style:{background:v,border:"1px solid "+_,borderRadius:10,padding:14,boxSizing:"border-box"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:8},children:[e.jsx("span",{style:{fontFamily:s,fontSize:11,color:u,letterSpacing:"0.06em"},children:"DXY (LEFT) \xB7 SPX (RIGHT) \xB7 1Y"}),e.jsxs("span",{style:{fontFamily:s,fontSize:10.5},children:[e.jsx("span",{style:{display:"inline-block",width:14,height:2,background:j,marginRight:6,verticalAlign:"middle"}}),e.jsx("span",{style:{color:j,marginRight:14},children:"DXY"}),e.jsx("span",{style:{display:"inline-block",width:14,height:1.5,borderTop:"1.5px dashed "+b,marginRight:6,verticalAlign:"middle"}}),e.jsx("span",{style:{color:b},children:"SPX"})]})]}),e.jsx(E,{b:t})]}),e.jsxs("div",{style:{background:v,border:"1px solid "+_,borderRadius:10,padding:14,boxSizing:"border-box"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:6},children:[e.jsx("span",{style:{fontFamily:s,fontSize:11,color:u,letterSpacing:"0.06em"},children:"ROLLING 30D CORRELATION"}),e.jsx("span",{style:{fontFamily:s,fontSize:10,color:R},children:"\u22121 \u2194 +1"})]}),e.jsx(I,{b:t}),e.jsxs("div",{style:{borderTop:"1px solid "+_,paddingTop:10,marginTop:6},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontFamily:s,fontSize:11.5,marginBottom:6},children:[e.jsx("span",{style:{color:u},children:"SPX regime"}),e.jsx("span",{style:{color:D},children:n})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontFamily:s,fontSize:11.5},children:[e.jsx("span",{style:{color:u},children:"NDX regime"}),e.jsx("span",{style:{color:D},children:a})]})]})]})]}),e.jsxs("div",{style:{background:v,border:"1px solid "+P,borderRadius:10,padding:"12px 16px",marginTop:10,fontFamily:s,fontSize:12,color:D,lineHeight:1.55,boxSizing:"border-box"},children:["Dollar is ",t.correlationSpx<-.2?"running inverse":t.correlationSpx>.2?"moving with":"decoupled from"," equities (",t.correlationSpx.toFixed(2)," SPX, ",t.correlationNdx.toFixed(2)," NDX). ",t.correlationSpx<-.3?"Classic risk-on / risk-off setup \u2014 weak USD supports earnings translation for multinationals.":"Watch for regime change to confirm cross-asset flow direction."]})]})}});export{J as __tla,C as default};
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.