PageSourceSearch

https://beanvest.com/_nuxt/D04OJsmt.js

js beanvest.com collected 2026-10-08 17:47:07 UTC 42,744 bytes, 1 lines download raw bytes

1import{_ as Je}from"./CRmIUlhp.js";import{B as ee,a7 as Xe,n as J,o as i,p as I,P as ue,m as t,a8 as _e,R as W,k as w,d as s,l as M,e as l,Q as be,D as G,G as Ae,a9 as ea,V as ke,Y as He,T as Me,a4 as Se,K as Be,F as oe,r as ie,t as g,f as z,aa as fe,N as ye,g as ne,ab as qe,ac as aa,q as De,ad as ta,ae as la,af as na,W as Ie,S as ge,ag as oa,ah as ia,w as sa,A as Oe,M as le,I as ra,J as ua,a6 as da}from"#entry";import{G as ca}from"./CwlIVyis.js";import{F as va,G as ma,I as ha}from"./BUvvzISc.js";import{I as fa}from"./CGVeYTSC.js";import{F as Re}from"./Cwy-_O7e.js";import{i as ya,P as Fe,a as Ee,b as Te,c as Ne}from"./COE5HYmv.js";import{C as pa,a as ga,Q as wa,f as ba,b as $e,c as me,d as Ve,u as $a,e as ka,g as Ca,h as Aa}from"./BEnvfMyg.js";import{H as Ha,C as Ma,v as xe,d as Za,c as Sa}from"./FV3k1Ypf.js";import{L as We}from"./BcVP60nm.js";import{h as qa,r as Va,c as xa}from"./CNU0U0FH.js";import{u as za,c as La,a as Pa,b as Ba}from"./B4sD6nOS.js";import{t as Da,u as Ia}from"./DatTBhHy.js";import{u as Oa}from"./DNIcH36k.js";import"./DVu5kgg7.js";import"./B2bO5Xct.js";import"./CvUjPkao.js";import"./CE1G-McA.js";import"./UkMVQ4tk.js";import"./DG-ul1K7.js";import"./CnCYZbcz.js";import"./Kojc0Z1Z.js";import"./B94QFPvX.js";import"./DIfgLNHu.js";var Ra=ee({__name:"PopoverClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const a=e;Xe();const n=ya();return(o,u)=>(i(),J(t(_e),{type:o.as==="button"?"button":void 0,as:o.as,"as-child":a.asChild,onClick:u[0]||(u[0]=d=>t(n).onOpenChange(!1))},{default:I(()=>[ue(o.$slots,"default")]),_:3},8,["type","as","as-child"]))}}),Ue=Ra;const Fa=["width","height","fill","transform"],Ea={key:0},Ta=l("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"},null,-1),Na=[Ta],Wa={key:1},Ua=l("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"},null,-1),Ga=l("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"},null,-1),ja=[Ua,Ga],Qa={key:2},Ka=l("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"},null,-1),Ya=[Ka],Ja={key:3},Xa=l("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"},null,-1),_a=[Xa],et={key:4},at=l("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"},null,-1),tt=[at],lt={key:5},nt=l("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"},null,-1),ot=[nt],it={name:"PhArrowCounterClockwise"},st=ee({...it,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(e){const a=e,n=W("weight","regular"),o=W("size","1em"),u=W("color","currentColor"),d=W("mirrored",!1),m=w(()=>a.weight??n),h=w(()=>a.size??o),y=w(()=>a.color??u),x=w(()=>a.mirrored!==void 0?a.mirrored?"scale(-1, 1)":void 0:d?"scale(-1, 1)":void 0);return(C,V)=>(i(),s("svg",be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:h.value,height:h.value,fill:y.value,transform:x.value},C.$attrs),[ue(C.$slots,"default"),m.value==="bold"?(i(),s("g",Ea,Na)):m.value==="duotone"?(i(),s("g",Wa,ja)):m.value==="fill"?(i(),s("g",Qa,Ya)):m.value==="light"?(i(),s("g",Ja,_a)):m.value==="regular"?(i(),s("g",et,tt)):m.value==="thin"?(i(),s("g",lt,ot)):M("",!0)],16,Fa))}}),rt=["width","height","fill","transform"],ut={key:0},dt=l("path",{d:"M76,92A16,16,0,1,1,60,76,16,16,0,0,1,76,92Zm52-16a16,16,0,1,0,16,16A16,16,0,0,0,128,76Zm68,32a16,16,0,1,0-16-16A16,16,0,0,0,196,108ZM60,148a16,16,0,1,0,16,16A16,16,0,0,0,60,148Zm68,0a16,16,0,1,0,16,16A16,16,0,0,0,128,148Zm68,0a16,16,0,1,0,16,16A16,16,0,0,0,196,148Z"},null,-1),ct=[dt],vt={key:1},mt=l("path",{d:"M240,64V192a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V64A16,16,0,0,1,32,48H224A16,16,0,0,1,240,64Z",opacity:"0.2"},null,-1),ht=l("path",{d:"M72,92A12,12,0,1,1,60,80,12,12,0,0,1,72,92Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,128,80Zm68,24a12,12,0,1,0-12-12A12,12,0,0,0,196,104ZM60,152a12,12,0,1,0,12,12A12,12,0,0,0,60,152Zm68,0a12,12,0,1,0,12,12A12,12,0,0,0,128,152Zm68,0a12,12,0,1,0,12,12A12,12,0,0,0,196,152Z"}
1,null,-1),ft=[mt,ht],yt={key:2},pt=l("path",{d:"M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM68,168a12,12,0,1,1,12-12A12,12,0,0,1,68,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,68,112Zm60,56a12,12,0,1,1,12-12A12,12,0,0,1,128,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,128,112Zm60,56a12,12,0,1,1,12-12A12,12,0,0,1,188,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,188,112Z"},null,-1),gt=[pt],wt={key:3},bt=l("path",{d:"M70,92A10,10,0,1,1,60,82,10,10,0,0,1,70,92Zm58-10a10,10,0,1,0,10,10A10,10,0,0,0,128,82Zm68,20a10,10,0,1,0-10-10A10,10,0,0,0,196,102ZM60,154a10,10,0,1,0,10,10A10,10,0,0,0,60,154Zm68,0a10,10,0,1,0,10,10A10,10,0,0,0,128,154Zm68,0a10,10,0,1,0,10,10A10,10,0,0,0,196,154Z"},null,-1),$t=[bt],kt={key:4},Ct=l("path",{d:"M72,92A12,12,0,1,1,60,80,12,12,0,0,1,72,92Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,128,80Zm68,24a12,12,0,1,0-12-12A12,12,0,0,0,196,104ZM60,152a12,12,0,1,0,12,12A12,12,0,0,0,60,152Zm68,0a12,12,0,1,0,12,12A12,12,0,0,0,128,152Zm68,0a12,12,0,1,0,12,12A12,12,0,0,0,196,152Z"},null,-1),At=[Ct],Ht={key:5},Mt=l("path",{d:"M68,92a8,8,0,1,1-8-8A8,8,0,0,1,68,92Zm60-8a8,8,0,1,0,8,8A8,8,0,0,0,128,84Zm68,16a8,8,0,1,0-8-8A8,8,0,0,0,196,100ZM60,156a8,8,0,1,0,8,8A8,8,0,0,0,60,156Zm68,0a8,8,0,1,0,8,8A8,8,0,0,0,128,156Zm68,0a8,8,0,1,0,8,8A8,8,0,0,0,196,156Z"},null,-1),Zt=[Mt],St={name:"PhDotsSix"},qt=ee({...St,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(e){const a=e,n=W("weight","regular"),o=W("size","1em"),u=W("color","currentColor"),d=W("mirrored",!1),m=w(()=>a.weight??n),h=w(()=>a.size??o),y=w(()=>a.color??u),x=w(()=>a.mirrored!==void 0?a.mirrored?"scale(-1, 1)":void 0:d?"scale(-1, 1)":void 0);return(C,V)=>(i(),s("svg",be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:h.value,height:h.value,fill:y.value,transform:x.value},C.$attrs),[ue(C.$slots,"default"),m.value==="bold"?(i(),s("g",ut,ct)):m.value==="duotone"?(i(),s("g",vt,ft)):m.value==="fill"?(i(),s("g",yt,gt)):m.value==="light"?(i(),s("g",wt,$t)):m.value==="regular"?(i(),s("g",kt,At)):m.value==="thin"?(i(),s("g",Ht,Zt)):M("",!0)],16,rt))}}),Vt=["width","height","fill","transform"],xt={key:0},zt=l("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"},null,-1),Lt=[zt],Pt={key:1},Bt=l("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"},null,-1),Dt=l("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"},null,-1),It=[Bt,Dt],Ot={key:2},Rt=l("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"},null,-1),Ft=[Rt],Et={key:3},Tt=l("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"},null,-1),Nt=[Tt],Wt={key:4},Ut=l("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"},null,-1),Gt=[Ut],jt={key:5},Qt=l("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"},null,-1),Kt=[Qt],Yt={name:"PhPlus"},Jt=ee({...Yt,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(e){const a=e,n=W("weight","regular"),o=W("size","1em"),u=W("color","currentColor"),d=W("mirrored",!1),m=w(()=>a.weight??n),h=w(()=>a.size??o),y=w(()=>a.color??u),x=w(()=>a.mirrored!==void 0?a.mirrored?"scale(-1, 1)":void 0:d?"scale(-1, 1)":void 0);return(C,V)=>(i(),s("svg",be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:h.value,height:h.value,fill:y.value,transform:x.value},C.$attrs),[ue(C.$slots,"default"),m.value==="bold"?(i(),s("g",xt,Lt)):m.value==="duotone"?(i(),s("g",Pt,It)):m.value==="fill"?(i(),s("g",Ot,Ft)):m.value==="light"?(i(),s("g",Et,Nt)):m.value==="regular"?(i(),s("g",Wt,Gt)):m.value==="thin"?(i(),s("g",jt,Kt)):M("",!0)],16,Vt))}}),Xt=["width","height","fill","transform"],_t={key:0},el=l("path",{d:"M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z"},null,-1),al=[el],tl={key:1},ll=l("path",{d:"M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z",opacity:"0.2"}
1,null,-1),nl=l("path",{d:"M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z"},null,-1),ol=[ll,nl],il={key:2},sl=l("path",{d:"M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z"},null,-1),rl=[sl],ul={key:3},dl=l("path",{d:"M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z"},null,-1),cl=[dl],vl={key:4},ml=l("path",{d:"M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z"},null,-1),hl=[ml],fl={key:5},yl=l("path",{d:"M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z"},null,-1),pl=[yl],gl={name:"PhSlidersHorizontal"},Ge=ee({...gl,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(e){const a=e,n=W("weight","regular"),o=W("size","1em"),u=W("color","currentColor"),d=W("mirrored",!1),m=w(()=>a.weight??n),h=w(()=>a.size??o),y=w(()=>a.color??u),x=w(()=>a.mirrored!==void 0?a.mirrored?"scale(-1, 1)":void 0:d?"scale(-1, 1)":void 0);return(C,V)=>(i(),s("svg",be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:h.value,height:h.value,fill:y.value,transform:x.value},C.$attrs),[ue(C.$slots,"default"),m.value==="bold"?(i(),s("g",_t,al)):m.value==="duotone"?(i(),s("g",tl,ol)):m.value==="fill"?(i(),s("g",il,rl)):m.value==="light"?(i(),s("g",ul,cl)):m.value==="regular"?(i(),s("g",vl,hl)):m.value==="thin"?(i(),s("g",fl,pl)):M("",!0)],16,Xt))}}),wl=12,ze=72,bl=e=>`beanvest:v2:overview:${e}:v1`,pe=(e,a,n)=>typeof e=="number"&&Number.isInteger(e)&&e>=a&&e<=n,Ce=(e,a)=>e.x<a.x+a.w&&e.x+e.w>a.x&&e.y<a.y+a.h&&e.y+e.h>a.y,de=e=>[...e].sort((a,n)=>a.y-n.y||a.x-n.x),he=(e,a)=>a?e==="capital-allocation"?8:7:4;function $l(e){return de(e.map(a=>({id:a.id??"",x:a.x??0,y:a.y??0,w:a.w??a.minW??1,h:a.h??a.minH??1})))}function je(e){const a=de(e).map(o=>({...o}));if(!a.length||a[0].h>=he(a[0].id,!0))return a;a[0].h=he(a[0].id,!0);const n=[];for(const o of a){let u=n.filter(d=>Ce(o,d));for(;u.length;)o.y=Math.max(...u.map(d=>d.y+d.h)),u=n.filter(d=>Ce(o,d));n.push(o)}return de(n)}function we(e){let a=0,n=0,o=0;return e.map(u=>{a+u.w>wl&&(a=0,n+=o,o=0);const d={...u,x:a,y:n};return a+=u.w,o=Math.max(o,u.h),d})}function kl(e,a=!1){const n=["revenue",a?"net-income":"fcf","net-margin","pe",a?"roe":"roic",...e==="tsla"?["deliveries"]:["capital-allocation"]];return we(n.map((o,u)=>({id:o,x:0,y:0,w:u?6:12,h:u?5:7})))}function Qe(e,a){if(!Array.isArray(e)||e.length>a.length)return null;const n=new Set,o=[];for(const u of e){if(!u||typeof u!="object")return null;const d=u;if(!a.includes(d.id)||n.has(d.id)||!pe(d.w,4,12)||!pe(d.h,4,10)||!pe(d.x,0,12-d.w)||!pe(d.y,0,1500))return null;const m={id:d.id,x:d.x,y:d.y,w:d.w,h:d.h};if(o.some(h=>Ce(m,h)))return null;n.add(d.id),o.push(m)}return de(o)}function Le(e,a,n){if(e!==null)try{const o=JSON.parse(e);if(o?.version===1){const u=Qe(o.tiles,a);if(u)return je(u)}}catch{}return n.map(o=>({...o}))}function Cl(e,a,n){const o=de(e),u=o.findIndex(m=>m.id===a),d=u+n;return u<0||d<0||d>=o.length?e:([o[u],o[d]]=[o[d],o[u]],we(o))}function Al(e,a,n){return!a||!n.includes(a)||e.some(o=>o.id===a)?e:[...e,{id:a,x:0,y:Math.max(0,...e.map(o=>o.y+o.h)),w:12,h:7}]}const Hl=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-min-h","aria-label","data-tile-id"],Ml={class:"grid-stack-item-content overview-tile-content"},Zl={key:0,class:"overview-tile-tools"},Sl=["aria-label","onKeydown","onClick"],ql=["aria-pressed","onClick"],Vl=["aria-pressed","disabled","onClick"],xl={key:0,class:"overview-size-hint"},zl={class:"overview-menu-moves"},Ll=["disabled","onClick"],Pl=["disabled","onClick"],Bl=["aria-label","onClick"],Dl={class:"overview-tile-chart"},Il={class:"sr-only",role:"status","aria-live":"polite"},Ol=ee({__name:"OverviewGrid",props:{tiles:{},labels:{},editing:{type:Boolean}},emits:["change","remove","interaction"],setup(e,{emit:a}){const n=e,o=a,u=G(),d=G(!1),m=G(!1),h=G(),y=G(""),x=[{value:4,label:"⅓"},{value:6,label:"½"},{value:8,label:"⅔"},{value:12,label:"Full"}],C=[{value:4,label:"Small"},{value:5,label:"Medium"},{value:7,label:"Large"},{value:10,label:"Tall"}],V=w(()=>d.value?void 0:{gridTemplateRows:`repeat(${Math.max(0,...n.tiles.map(p=>p.y+p.h))}, ${ze}px)`});let k,P=!1,A,b=!1,H=!1,Z=0,O=[],R=new Map;const F=new Map;let N;const Q=()=>N?.matches??!0;function T(){F.forEach(p=>p.cancel()),F.clear()}function L(){const p=u.value?.getBoundingClientRect();return new Map(Array.from(u.value?.querySelectorAll(":scope > .overview-tile")??[]).map(v=>
1[v,new DOMRect((p?.left??0)+v.offsetLeft,(p?.top??0)+v.offsetTop,v.offsetWidth,v.offsetHeight)]))}function ae(){Z=0;const p=L();p.forEach((v,c)=>{const B=R.get(c);if(c===A||!B||m.value||Q())return;let S=B.left-v.left,re=B.top-v.top;if(Math.abs(S)<1&&Math.abs(re)<1)return;if(F.has(c)){const ve=c.getBoundingClientRect();S+=ve.left-v.left,re+=ve.top-v.top}F.get(c)?.cancel();const ce=c.animate([{transform:`translate(${S}px, ${re}px)`},{transform:"translate(0, 0)"}],{duration:240,easing:"cubic-bezier(.16, 1, .3, 1)"});F.set(c,ce),ce.finished.then(()=>{F.get(c)===ce&&F.delete(c)}).catch(()=>{})}),R=p}function j(){Z||(Z=requestAnimationFrame(ae))}function f(){if(!k)return;const p=k.save(!1,!1,void 0,k.getColumn()),v=$l(p);o("change",k.getColumn()===1?we(v.map(c=>({...c,w:n.tiles.find(B=>B.id===c.id)?.w??6}))):v)}async function K(){if(!k||!u.value||A||(H=!0,R=L(),T(),await ke(),!k||P))return;const p=new Set(n.tiles.map(v=>v.id));for(const v of[...k.engine.nodes])p.has(v.id)||k.removeWidget(v.el,!1,!1);for(const v of u.value.querySelectorAll(":scope > .overview-tile"))v.gridstackNode||k.makeWidget(v);k.load(n.tiles.map((v,c)=>({...v,minW:4,minH:he(v.id,c===0),maxH:10})),!1),k.enableMove(n.editing),k.enableResize(n.editing&&k.getColumn()!==1),H=!1,j()}function E(p,v){T();const c=Cl(n.tiles,p,v);o("change",c),y.value=`${n.labels[p]} moved ${v<0?"earlier":"later"}.`}function X(p,v,c){o("change",we(n.tiles.map(B=>B.id===p?{...B,w:v,h:c}:B))),y.value=`${n.labels[p]}: ${v} of 12 columns, ${c} rows.`}function U(p){A&&(p&&(p.preventDefault(),p.stopImmediatePropagation()),b=!0,document.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),k?.load(O,!1),A=void 0,o("interaction",!1),T(),y.value="Layout change cancelled.")}const _=p=>{p.key==="Escape"&&U(p)},se=()=>U();return Ae(async()=>{N=window.matchMedia("(prefers-reduced-motion: reduce)"),N.addEventListener("change",T),window.addEventListener("keydown",_,!0),window.addEventListener("blur",se);const{GridStack:p}=await ea(async()=>{const{GridStack:v}=await import("./Zs9tPiph.js");return{GridStack:v}},[],import.meta.url);P||!u.value||(d.value=!0,await ke(),!(P||!u.value)&&(k=p.init({column:12,cellHeight:ze,margin:16,auto:!1,animate:!1,handle:".overview-drag-handle",draggable:{cancel:"input,textarea,select,option,.overview-tile-settings,.overview-tile-remove",scroll:!0},resizable:{handles:"se"},alwaysShowResizeHandle:!0,disableDrag:!n.editing,disableResize:!n.editing,columnOpts:{breakpoints:[{w:760,c:1}],layout:"list"}},u.value),await K(),k.on("dragstart resizestart",(v,c)=>{A=c,b=!1,O=n.tiles.map(B=>({...B})),R=L(),T(),o("interaction",!0)}),k.on("drag resize",j),k.on("dragstop resizestop",()=>{A=void 0,b||(f(),y.value="Layout saved."),o("interaction",!1),j()}),k.on("change",()=>{H||j()})))}),He(()=>[n.tiles,n.editing],()=>{A&&U(),K()},{deep:!0}),Me(()=>{P=!0,U(),cancelAnimationFrame(Z),T(),N?.removeEventListener("change",T),window.removeEventListener("keydown",_,!0),window.removeEventListener("blur",se),k?.destroy(!1),k=void 0}),(p,v)=>(i(),s("div",{ref_key:"root",ref:u,class:Be(["overview-grid grid-stack",{"is-ready":t(d),"is-editing":e.editing}]),style:Se(t(V)),onPointerdownCapture:v[1]||(v[1]=c=>m.value=!1),onKeydownCapture:v[2]||(v[2]=c=>m.value=!0)},[(i(!0),s(oe,null,ie(e.tiles,(c,B)=>(i(),s("section",{key:c.id,class:"grid-stack-item overview-tile","gs-id":c.id,"gs-x":c.x,"gs-y":c.y,"gs-w":c.w,"gs-h":c.h,"gs-min-w":"4","gs-min-h":t(he)(c.id,B===0),"gs-max-h":"10",style:Se(t(d)?void 0:{gridColumn:`${c.x+1} / span ${c.w}`,gridRow:`${c.y+1} / span ${c.h}`}),"aria-label":`${e.labels[c.id]} chart`,"data-tile-id":c.id},[l("div",Ml,[e.editing?(i(),s("div",Zl,[l("button",{type:"button",class:"overview-drag-handle","aria-label":`Move ${e.labels[c.id]} chart`,title:"Drag to move. Arrow keys move earlier or later.",onKeydown:[fe(ye(S=>E(c.id,-1),["prevent"]),["up"]),fe(ye(S=>E(c.id,1),["prevent"]),["down"]),fe(ye(S=>E(c.id,-1),["prevent"]),["left"]),fe(ye(S=>E(c.id,1),["prevent"]),["right"])],onClick:S=>h.value=c.id},[z(t(qt),{size:18,weight:"duotone","aria-hidden":"true"})],40,Sl),l("span",null,g(c.w)+"/12 · "+g(c.h)+" rows",1),z(t(Ne),{open:t(h)===c.id,"onUpdate:open":S=>h.value=S?c.id:void 0},{default:I(()=>[z(t(Fe),{class:"overview-tile-settings","aria-label":`Size and position of ${e.labels[c.id]} chart`},{default:I(()=>[z(t(Ge),{size:16,weight:"duotone","aria-hidden":"true"}),v[3]||(v[3]=ne("Size",-1))]),_:1},8,["aria-label"]),z(t(Ee),null,{default:I(()=>[z(t(Te),{class:"overview-size-menu",side:"bottom",align:"end","side-offset":6,onOpenAutoFocus:v[0]||(v[0]=S=>m.value=!0)},{default:I(()=>[l("p",null,g(e.labels[c.id]),1),l("fieldset",null,[v[4]||(v[4]=l("legend",null,"Wi
1dth",-1)),l("div",null,[(i(),s(oe,null,ie(x,S=>l("button",{key:S.value,type:"button","aria-pressed":c.w===S.value,onClick:re=>X(c.id,S.value,c.h)},g(S.label),9,ql)),64))])]),l("fieldset",null,[v[5]||(v[5]=l("legend",null,"Height",-1)),l("div",null,[(i(),s(oe,null,ie(C,S=>l("button",{key:S.value,type:"button","aria-pressed":c.h===S.value,disabled:S.value<t(he)(c.id,B===0),onClick:re=>X(c.id,c.w,S.value)},g(S.label),9,Vl)),64))])]),B===0?(i(),s("p",xl,"The shared period needs a taller chart.")):M("",!0),l("div",zl,[l("button",{type:"button",disabled:B===0,onClick:S=>E(c.id,-1)},[z(t(va),{size:16,"aria-hidden":"true"}),v[6]||(v[6]=ne("Move earlier",-1))],8,Ll),l("button",{type:"button",disabled:B===e.tiles.length-1,onClick:S=>E(c.id,1)},[z(t(ma),{size:16,"aria-hidden":"true"}),v[7]||(v[7]=ne("Move later",-1))],8,Pl)]),z(t(Ue),{class:"overview-menu-close"},{default:I(()=>[...v[8]||(v[8]=[ne("Done",-1)])]),_:1})]),_:2},1024)]),_:2},1024)]),_:2},1032,["open","onUpdate:open"]),l("button",{type:"button",class:"overview-tile-remove","aria-label":`Remove ${e.labels[c.id]} chart`,onClick:S=>o("remove",c.id)},[z(t(Re),{size:16,"aria-hidden":"true"})],8,Bl)])):M("",!0),l("div",Dl,[ue(p.$slots,"default",{tile:c,primary:B===0})])])],12,Hl))),128)),l("p",Il,g(t(y)),1)],38))}}),Rl=Object.assign(Ol,{__name:"CompanyOverviewGrid"}),Fl=["data-metric"],El={class:"overview-chart-heading"},Tl=["title"],Nl=["title"],Wl={key:3,class:"overview-chart-empty",role:"status"},Ul={key:4,class:"sr-only"},Gl={"data-chart-data":""},jl={scope:"col"},Ql={scope:"col"},Kl={key:0,scope:"col"},Yl={scope:"row"},Jl={key:0},Xl={key:0,class:"overview-chart-benchmarks"},_l=["data-direction"],en={key:1,class:"overview-chart-note"},an={key:2,class:"overview-chart-note"},tn=ee({__name:"OverviewChart",props:qe({data:{},company:{},color:{},frequency:{},duration:{},primary:{type:Boolean},dates:{}},{period:{required:!0},periodModifiers:{}}),emits:qe(["inputMode"],["update:period"]),setup(e,{emit:a}){const n=e,o=aa(e,"period"),u=a,d=G(),m=G(230),h=w(()=>n.data.unit==="percent"||n.data.unit==="points"),y=w(()=>n.data.daily?[...new Map(n.data.lines.map(A=>[A.date.slice(0,7),A])).values()]:n.data.lines);function x(A,b){return A===null?"—":ba(A,b)}let C,V=0;function k(){V=0;const A=d.value?.querySelector(".chart-focus-panel:not(.is-expanded)"),b=A?.querySelector(".chart-focus-body");if(!b||b.clientHeight===0)return;const H=b.querySelector("[data-chart-plot]"),Z=b.firstElementChild,O=Z&&H?Math.max(0,Z.getBoundingClientRect().height-H.getBoundingClientRect().height):0;m.value=Math.max(120,Math.floor(b.clientHeight-O))}function P(){V||(V=requestAnimationFrame(k))}return Ae(()=>{const A=d.value?.querySelector(".chart-focus-body");C=new ResizeObserver(P),A&&C.observe(A),d.value&&C.observe(d.value),P()}),He(()=>[n.primary,n.data.unitLabel,n.data.series.length,n.data.hasValues],P),Me(()=>{C?.disconnect(),cancelAnimationFrame(V)}),(A,b)=>(i(),s("div",{ref_key:"root",ref:d,class:"overview-chart","data-metric":e.data.chart.metrics[0]??"capital_allocation"},[z(pa,{"chart-id":e.data.chart.id,label:`${e.company.name} ${e.data.chart.label}`,height:t(m),available:e.data.available,onInputMode:b[2]||(b[2]=H=>u("inputMode",H))},{heading:I(({expanded:H})=>[l("header",El,[l("div",null,[l("h2",{title:e.data.formula},g(H?`${e.company.name} ${e.data.chart.label}`:e.data.chart.label),9,Tl),l("p",null,g(e.data.unitLabel),1)]),l("span",{title:e.data.latestPeriod},g(e.data.kind==="allocation"?x(e.data.latest,`${e.company.currency}_millions`):x(e.data.latest,e.data.unit)),9,Nl)])]),controls:I(()=>[ue(A.$slots,"controls",{},void 0,!0)]),default:I(({height:H,expanded:Z,tooltipContainer:O})=>[e.data.kind==="line"&&e.data.hasValues?(i(),J(Ha,{key:0,data:e.data.lines,"comparison-data":e.data.lineComparison,label:`${e.company.name} ${e.data.chart.label}`,unit:e.data.unit,height:H,duration:e.duration,color:e.color,statistics:e.data.statistics,"comparison-mode":t(h)?"points":"relative","escape-closes-chart":Z},null,8,["data","comparison-data","label","unit","height","duration","color","statistics","comparison-mode","escape-closes-chart"])):e.data.kind==="allocation"&&e.data.hasValues?(i(),J(Ma,{key:1,data:e.data.allocations??[],frequency:e.frequency,currency:e.company.currency,color:e.color,label:`${e.company.name} capital allocation`,height:H,duration:e.duration,"tooltip-container":O,"accessible-data":""},null,8,["data","frequency","currency","color","label","height","duration","tooltip-container"])):e.data.hasValues?(i(),J(wa,{key:2,data:e.data.points,"comparison-data":e.data.comparison,frequency:e.frequency,series:e.data.series,label:`${e.company.name} ${e.data.chart.label}`,unit:e.data.unit,height:H,duration:e.duration,"tooltip-container":O,"comparison-mode":t(h)?"points":"relative","total-label":"Total revenue","filtered-total-label":"Selected revenue","accessible-data":""},null,8,["data","comparison-data","frequency","series","label","unit","height","duration","tooltip-container","comparison-mode"])):(i(),s("div",Wl,g(e.data.issue),1)),e.data.kind==="line"?(i(),s("div",Ul,[l("table",Gl,[l("caption",null,g(e.company.name)+" "+g(e.data.chart.label)+". "+g(e.data.daily?"Monthly closing observations; inspect daily values with the chart arrow keys.":"Reported fiscal history."),1),l("thead",null,[l("tr",null,[l("th",
1jl,g(e.data.daily?"Close date":"Fiscal period"),1),l("th",Ql,g(e.data.unitLabel),1),e.data.daily?(i(),s("th",Kl,"Financials through")):M("",!0)])]),l("tbody",null,[(i(!0),s(oe,null,ie(t(y),R=>(i(),s("tr",{key:R.date},[l("th",Yl,g(R.period??R.date),1),l("td",null,g(x(R.value,e.data.unit)),1),e.data.daily?(i(),s("td",Jl,g(R.basisEnd),1)):M("",!0)]))),128))])])])):M("",!0)]),range:I(({expanded:H})=>[e.primary||H?(i(),J(ga,{key:0,modelValue:o.value,"onUpdate:modelValue":b[0]||(b[0]=Z=>o.value=Z),dates:e.dates,color:e.color,label:e.company.name,daily:e.data.daily,onScrub:b[1]||(b[1]=Z=>u("inputMode","keyboard"))},null,8,["modelValue","dates","color","label","daily"])):M("",!0)]),footer:I(()=>[e.data.statistics?(i(),s("div",Xl,[l("span",null,"Mean "+g(x(e.data.statistics.mean,e.data.unit)),1),l("span",null,"Median "+g(x(e.data.statistics.median,e.data.unit)),1),e.data.relative?(i(),s("span",{key:0,class:"v2-median-comparison","data-direction":e.data.relative.direction},g(Math.abs(e.data.relative.difference).toFixed(0))+"% "+g(e.data.relative.difference>=0?"above":"below")+" median",9,_l)):M("",!0)])):M("",!0),e.data.kind==="allocation"?(i(),s("p",en,"Tracked cash uses · SBC excluded")):M("",!0),e.data.hasValues&&e.data.latestIssue?(i(),s("p",an,g(e.data.latestIssue),1)):M("",!0)]),_:3},8,["chart-id","label","height","available"])],8,Fl))}}),ln=Object.assign(De(tn,[["__scopeId","data-v-6ed081d8"]]),{__name:"CompanyOverviewChart"}),nn={class:"overview-controls"},on={key:0,class:"overview-frequency",role:"group","aria-label":"Data frequency"},sn=["aria-pressed","disabled","onClick"],rn={key:2,class:"overview-wacc"},un=["for"],dn=["id","value","aria-invalid","aria-describedby"],cn=["id"],vn=ee({__name:"OverviewControls",props:{frequency:{},deductSbc:{type:Boolean},wacc:{},waccInvalid:{type:Boolean},waccDefault:{},color:{},hasQuarterly:{type:Boolean},showFrequency:{type:Boolean,default:!0},showSbc:{type:Boolean,default:!1},showWacc:{type:Boolean,default:!1}},emits:["update:frequency","update:deductSbc","update:wacc"],setup(e,{emit:a}){const n=a,o=ta(),u=[{value:"quarterly",label:"Quarterly"},{value:"yearly",label:"Yearly"}];return(d,m)=>(i(),s("div",nn,[e.showFrequency?(i(),s("div",on,[(i(),s(oe,null,ie(u,h=>l("button",{key:h.value,type:"button","aria-pressed":e.frequency===h.value,disabled:h.value==="quarterly"&&!e.hasQuarterly,onClick:y=>n("update:frequency",h.value)},g(h.label),9,sn)),64))])):M("",!0),e.showSbc?(i(),J(We,{key:1,"model-value":e.deductSbc,label:"Deduct SBC from FCF",color:e.color,"onUpdate:modelValue":m[0]||(m[0]=h=>n("update:deductSbc",h))},null,8,["model-value","color"])):M("",!0),e.showWacc?(i(),s("div",rn,[l("label",{for:t(o)},"WACC",8,un),l("input",{id:t(o),value:e.wacc,type:"number",min:"0",max:"100",step:"0.1",inputmode:"decimal","aria-invalid":e.waccInvalid||void 0,"aria-describedby":`${t(o)}-help`,onInput:m[1]||(m[1]=h=>n("update:wacc",h.target.value))},null,40,dn),m[3]||(m[3]=l("span",null,"%",-1)),Number(e.wacc)!==e.waccDefault.value?(i(),s("button",{key:0,type:"button",onClick:m[2]||(m[2]=h=>n("update:wacc",e.waccDefault.value))},"Reset")):M("",!0),l("span",{id:`${t(o)}-help`,class:"overview-wacc-help"},g(e.waccInvalid?"Enter 0–100%.":`${e.waccDefault.value}% ${e.waccDefault.sector} proxy`),9,cn)])):M("",!0)]))}}),Pe=Object.assign(De(vn,[["__scopeId","data-v-00a96fbc"]]),{__name:"CompanyOverviewControls"});function mn(e,a){const n=e.metrics[0],o=la[n],u=o?.group==="valuation"&&a.valuation.length>0,d=e.kind==="allocation"?"percent":n==="vehicle_deliveries"?"vehicles":o?o.unit==="money"?`${a.currency}_millions`:o.unit==="per_share"?`${a.currency}_per_share`:o.unit==="shares"?"shares_millions":o.unit:`${a.currency}_millions`,m={percent:"%",points:"Percentage points",multiple:"×",shares_millions:"Million shares",vehicles:"vehicles"}[d]??(d.endsWith("_per_share")?`${a.currency} per share`:`${a.currency} millions`),h=a.periods.map(f=>({period:f.period,periodEnd:o?.group==="valuation"?f.priceDate??f.end:f.end,values:f.values,fiscal:!0})),y=e.kind==="revenue"&&a.symbol==="tsla"||n==="vehicle_deliveries",x=o?h:y?a.operatingComparison:a.reportedComparison,C=o?h:y?a.operating:a.reported,V=$e(C,a.bounds,me),k=u?a.valuation.map(f=>({date:f.date,value:f.values[n],basisEnd:f.basisEnd,detail:xe(n,f.growthRates)})):C.map(f=>({date:me(f),value:f.values[n]??null,period:Ve(f),detail:xe(n,a.periods.find(K=>
1K.period===f.period)?.growthRates)})),P=$e(k,a.bounds,f=>f.date),A=$e(a.allocations,a.bounds,f=>f.end),b=e.kind==="allocation"?"allocation":o&&(["valuation","margins","returns"].includes(o.group)||["dilution","basic_shares","diluted_shares","eps","sbc_fcf","sbc_ocf"].includes(n))?"line":"bar",H=e.kind==="revenue"&&a.symbol==="tsla"?Da:[{id:n,label:e.label,color:a.color}],Z=f=>H.some(K=>f.values[K.id]!=null),O=b==="allocation"?a.allocations.some(f=>f.total!==null):b==="line"?k.some(f=>f.value!==null):C.some(Z),R=b==="allocation"?A.some(f=>f.total!==null):b==="line"?P.some(f=>f.value!==null):V.some(Z),F=V.at(-1),N=P.at(-1),Q=b==="allocation"?A.at(-1)?.total??null:b==="line"?N?.value??null:F?.values[e.kind==="revenue"?"total_revenue":n]??null,T=b==="allocation"?A.at(-1)?.period??"":b==="line"?N?.period??N?.date??"":F?Ve(F):"",L=o?.group==="valuation"?qa(P.map(f=>f.value)):void 0,ae=Q===null&&["peg","pfcf_growth"].includes(n)?u?a.valuation.find(f=>f.date===N?.date)?.issues?.[n]:a.periods.find(f=>(f.priceDate??f.end)===N?.date)?.issues[n]:void 0,j=O?"No data in this period. Try a wider range.":ae??a.periods.at(-1)?.issues[n]??"No validated inputs are available for this chart.";return{chart:e,kind:b,unit:d,unitLabel:e.kind==="allocation"?"% of tracked cash uses":`${m}${o?.basis?` · ${o.basis}`:""}${u?" · Daily":""}`,points:V,comparison:x,lines:P,lineComparison:k,series:H,latest:Q,latestPeriod:T,available:O,hasValues:R,issue:j,latestIssue:ae,formula:o?.formula??(e.kind==="revenue"?"Reported revenue from company filings.":e.kind==="allocation"?"Reported cash uses as a percentage of tracked uses. Missing categories remain unavailable; SBC is noncash and excluded.":"Reported company figures."),statistics:L,relative:L?Va(Q,L.median,n.endsWith("_yield")):void 0,allocations:A,daily:u}}async function hn(e){const a=na(),n=Ie(e),o=Ba(e),u=za(e),d=e==="tsla"?Ia():void 0,[m,h]=await Promise.all([u,d]);return a.runWithContext(()=>{const{dataset:y,snapshot:x,dataIssue:C}=m,V=()=>Promise.all([m.refresh(),h?.refresh()]),k=w(()=>!!y.value?.quarters.length||!!y.value?.fundamentals?.quarters.length),P=ge(`v2-overview-frequency-${e}`,()=>k.value?"quarterly":"yearly"),A=ge(`v2-deduct-sbc-${e}`,()=>!1),b=Za(e,y.value?.industry?.sic),H=ge(`v2-wacc-${e}`,()=>b.value),Z=w(()=>H.value===""?null:Number(H.value)),O=w(()=>Z.value!==null&&(!Number.isFinite(Z.value)||Z.value<0||Z.value>100)),R=$a(),F=w(()=>({deductSbc:A.value,wacc:O.value?null:Z.value})),N=w(()=>y.value?La(y.value):[]),Q=w(()=>y.value?Pa(y.value):[]),T=w(()=>h?.allChartPoints.value??[]),L=w(()=>ka(T.value)),ae=w(()=>y.value?oa(y.value,P.value,F.value):[]),j=w(()=>y.value?xa(y.value,F.value):[]),f=w(()=>y.value?Sa(y.value,P.value):[]),K=w(()=>Ca([...N.value.map(me),...Q.value.map(me),...T.value.map(me),...ae.value.map(p=>p.end),...j.value.map(p=>p.date)])),E=w(()=>Aa(K.value,R.value)),X=w(()=>({currency:n.currency,color:o,symbol:e,bounds:E.value,reported:P.value==="yearly"?Q.value:N.value,reportedComparison:[...N.value,...Q.value],operating:P.value==="yearly"?L.value:T.value,operatingComparison:[...T.value,...L.value],periods:ae.value,valuation:j.value,allocations:f.value})),U=ia(e,"overview"),_=w(()=>new Map(U.map(p=>[p.id,mn(p,X.value)]))),se=y.value?.industry?.kind!==void 0&&y.value.industry.kind!=="general"||e==="jpm";return{company:n,color:o,dataset:y,snapshot:x,dataIssue:C,refresh:V,operatingIssue:h?.dataIssue,charts:_,catalog:U,financialIndustry:se,hasQuarterly:k,frequency:P,deductSbc:A,waccInput:H,waccDefault:b,waccInvalid:O,period:R,dates:K}})}function fn(e,a,n){const o=kl(e,n),u=ge(`v2-overview-layout-${e}`,()=>o),d=G(!1),m=G(!1),h=bl(e);function y(C){(C.key===h||C.key===null)&&(u.value=Le(C.newValue,a,o))}Ae(()=>{try{u.value=Le(localStorage.getItem(h),a,o)}catch{d.value=!0}m.value=!0,window.addEventListener("storage",y)}),Me(()=>window.removeEventListener("storage",y));function x(C){const V=Qe(C,a);if(V){u.value=je(V);try{localStorage.setItem(h,JSON.stringify({version:1,tiles:u.value})),d.value=!1}catch{d.value=!0}}}return{tiles:u,ready:m,persistenceIssue:d,save:x,reset:()=>x(o)}}const yn={class:"overview-toolbar"},pn={class:"overview-title"}
1,gn={class:"v2-heading"},wn={class:"overview-actions"},bn={class:"overview-picker-heading"},$n={class:"overview-picker-search"},kn={class:"overview-picker-list"},Cn={key:0,class:"overview-picker-unavailable"},An={key:0,class:"overview-picker-empty"},Hn={class:"overview-picker-count"},Mn=["aria-pressed"],Zn={key:0,class:"overview-edit-hint"},Sn={key:1,class:"overview-storage-issue",role:"status"},qn={key:2,class:"v2-notice",role:"alert"},Vn={key:1,class:"overview-storage-issue",role:"status"},xn={key:2,class:"overview-empty"},zn={key:3,class:"overview-definitions"},Ln={key:0},Pn={key:1},Bn=ee({__name:"OverviewDashboard",props:{symbol:{}},async setup(e){let a,n;const o=e,{company:u,color:d,dataset:m,snapshot:h,dataIssue:y,refresh:x,operatingIssue:C,charts:V,catalog:k,financialIndustry:P,hasQuarterly:A,frequency:b,deductSbc:H,waccInput:Z,waccDefault:O,waccInvalid:R,period:F,dates:N}=([a,n]=sa(()=>hn(o.symbol)),a=await a,n(),a),Q=k.map(q=>q.id),T=Object.fromEntries(k.map(q=>[q.id,q.label])),{tiles:L,persistenceIssue:ae,save:j,reset:f}=fn(o.symbol,Q,P),K=Oe(),E=G(!1),X=G(!1),U=G(""),_=G(240),se=G(),p=w(()=>da(K.path)?.chartId),v=w(()=>Al(L.value,p.value,Q)),c=["fcf","pfcf","fcf-yield","fcf-margin","debt-fcf"],B=w(()=>v.value.some(q=>c.includes(q.id))),S=w(()=>v.value.some(q=>q.id==="roic-wacc")),re=w(()=>v.value.some(q=>!V.value.get(q.id)?.daily)),ce=[{id:"reported",label:"Revenue & operations"},{id:"valuation",label:"Valuation"},{id:"cash-flow",label:"Cash flow & EPS"},{id:"margins",label:"Margins"},{id:"returns",label:"Returns on capital"},{id:"capital",label:"Debt & dilution"}],ve=w(()=>ce.map(q=>({...q,charts:k.filter(r=>(["revenue","deliveries",void 0].includes(r.sourceTopic)?"reported":r.sourceTopic)===q.id&&`${r.label} ${r.id}`.toLowerCase().includes(U.value.trim().toLowerCase()))})).filter(q=>q.charts.length));function Ke(q){j(q.filter(r=>L.value.some(Y=>Y.id===r.id)))}function Ye(q,r){r&&!L.value.some(Y=>Y.id===q)?j([...L.value,{id:q,x:0,y:Math.max(0,...L.value.map(Y=>Y.y+Y.h)),w:L.value.length?6:12,h:L.value.length?5:7}]):r||Ze(q)}async function Ze(q){const r=de(L.value),Y=r.findIndex(D=>D.id===q),$=r[Y+1]?.id??r[Y-1]?.id,te=document.activeElement?.closest(`[data-tile-id="${q}"]`);if(j(L.value.filter(D=>D.id!==q)),await ke(),te){const D=document.querySelector(`[data-tile-id="${$}"] .overview-drag-handle`);D?D.focus():se.value?.focus()}}return He(X,q=>{q||(U.value="")}),(q,r)=>{const Y=Je;return i(),s("div",{class:"overview-dashboard",onPointerdownCapture:r[17]||(r[17]=$=>_.value=240),onKeydownCapture:r[18]||(r[18]=$=>_.value=0)},[l("div",yn,[l("div",pn,[l("h1",gn,g(t(u).name)+" overview",1),l("span",null,g(t(L).length)+" charts",1)]),l("div",wn,[z(t(Ne),{open:t(X),"onUpdate:open":r[1]||(r[1]=$=>le(X)?X.value=$:null)},{default:I(()=>[z(t(Fe),{class:"overview-action"},{default:I(()=>[z(t(Jt),{size:16,weight:"duotone","aria-hidden":"true"}),r[19]||(r[19]=ne("Charts",-1))]),_:1}),z(t(Ee),null,{default:I(()=>[z(t(Te),{class:"overview-chart-picker",side:"bottom",align:"end","side-offset":8,"collision-padding":16},{default:I(()=>[l("div",bn,[r[20]||(r[20]=l("h2",null,"Choose charts",-1)),z(t(Ue),{"aria-label":"Close chart picker"},{default:I(()=>[z(t(Re),{size:18,"aria-hidden":"true"})]),_:1})]),l("label",$n,[z(t(ha),{size:16,weight:"duotone","aria-hidden":"true"}),ra(l("input",{"onUpdate:modelValue":r[0]||(r[0]=$=>le(U)?U.value=$:null),type:"search",placeholder:"Search charts","aria-label":"Search charts"},null,512),[[ua,t(U)]])]),l("div",kn,[(i(!0),s(oe,null,ie(t(ve),$=>(i(),s("section",{key:$.id},[l("h3",null,g($.label),1),(i(!0),s(oe,null,ie($.charts,te=>(i(),s("div",{key:te.id,class:"overview-picker-row"},[z(We,{"model-value":t(L).some(D=>D.id===te.id),label:te.label,color:t(d),"onUpdate:modelValue":D=>Ye(te.id,D)},null,8,["model-value","label","color","onUpdate:modelValue"]),t(V).get(te.id)?.available?M("",!0):(i(),s("span",Cn,"No history"))]))),128))]))),128)),t(ve).length?M("",!0):(i(),s("p",An,"No charts match “"+g(t(U))+"”.",1))]),l("p",Hn,g(t(L).length)+" selected",1)]),_:1})]),_:1})]),_:1},8,["open"]),l("button",{ref_key:"customize",ref:se,type:"button",class:Be(["overview-action",{"is-active":t(E)}]),"aria-pressed":t(E),onClick:r[2]||(r[2]=$=>E.value=!t(E))},[t(E)?(i(),J(t(ca),{key:1,size:16,weight:"duotone","aria-hidden":"true"})):(i(),J(t(Ge),{key:0,size:16,weight:"duotone","aria-hidden":"true"})),ne(g(t(E)?"Done":"Customize"),1)],10,Mn),t(E)?(i(),s("button",{key:0,t
1ype:"button",class:"overview-reset",onClick:r[3]||(r[3]=$=>t(f)())},[z(t(st),{size:16,weight:"duotone","aria-hidden":"true"}),r[21]||(r[21]=ne("Reset layout",-1))])):M("",!0)])]),t(E)?(i(),s("p",Zn,"Drag to move. Resize from a corner or use Size. Changes save automatically.")):M("",!0),t(ae)?(i(),s("p",Sn,"This layout lasts for this visit. Browser storage is unavailable.")):M("",!0),t(y)?(i(),s("div",qn,[l("p",null,g(t(y)),1),l("button",{type:"button",class:"v2-text-link",onClick:r[4]||(r[4]=$=>t(x)())},"Try again")])):(i(),s(oe,{key:3},[t(v).length?(i(),J(Pe,{key:0,frequency:t(b),"onUpdate:frequency":r[5]||(r[5]=$=>le(b)?b.value=$:null),"deduct-sbc":t(H),"onUpdate:deductSbc":r[6]||(r[6]=$=>le(H)?H.value=$:null),wacc:t(Z),"onUpdate:wacc":r[7]||(r[7]=$=>le(Z)?Z.value=$:null),class:"overview-shared-controls","wacc-default":t(O),"wacc-invalid":t(R),color:t(d),"has-quarterly":t(A),"show-frequency":t(re),"show-sbc":t(B),"show-wacc":t(S)},null,8,["frequency","deduct-sbc","wacc","wacc-default","wacc-invalid","color","has-quarterly","show-frequency","show-sbc","show-wacc"])):M("",!0),t(C)?(i(),s("p",Vn,[ne(g(t(C))+" ",1),l("button",{type:"button",class:"v2-text-link",onClick:r[8]||(r[8]=$=>t(x)())},"Try again")])):M("",!0),z(Rl,{tiles:t(v),labels:t(T),editing:t(E),onChange:Ke,onRemove:Ze,onInteraction:r[14]||(r[14]=$=>_.value=$?0:240)},{default:I(({tile:$,primary:te})=>[t(V).get($.id)?(i(),J(ln,{key:0,period:t(F),"onUpdate:period":r[12]||(r[12]=D=>le(F)?F.value=D:null),data:t(V).get($.id),company:t(u),color:t(d),frequency:t(b),duration:t(_),primary:te,dates:t(N),onInputMode:r[13]||(r[13]=D=>_.value=D==="keyboard"?0:240)},{controls:I(()=>[z(Pe,{frequency:t(b),"onUpdate:frequency":r[9]||(r[9]=D=>le(b)?b.value=D:null),"deduct-sbc":t(H),"onUpdate:deductSbc":r[10]||(r[10]=D=>le(H)?H.value=D:null),wacc:t(Z),"onUpdate:wacc":r[11]||(r[11]=D=>le(Z)?Z.value=D:null),"wacc-default":t(O),"wacc-invalid":t(R),color:t(d),"has-quarterly":t(A),"show-frequency":!t(V).get($.id)?.daily,"show-sbc":c.includes($.id),"show-wacc":$.id==="roic-wacc"},null,8,["frequency","deduct-sbc","wacc","wacc-default","wacc-invalid","color","has-quarterly","show-frequency","show-sbc","show-wacc"])]),_:2},1032,["period","data","company","color","frequency","duration","primary","dates"])):M("",!0)]),_:1},8,["tiles","labels","editing"]),t(v).length?M("",!0):(i(),s("div",xn,[z(t(fa),{size:28,weight:"duotone","aria-hidden":"true"}),r[22]||(r[22]=l("h2",null,"Your overview, your charts",-1)),r[23]||(r[23]=l("p",null,"Choose the metrics you want to follow.",-1)),l("button",{type:"button",class:"overview-action is-active",onClick:r[15]||(r[15]=$=>X.value=!0)},"Choose charts"),l("button",{type:"button",class:"overview-reset",onClick:r[16]||(r[16]=$=>t(f)())},"Restore default layout")])),t(v).length?(i(),s("details",zn,[r[25]||(r[25]=l("summary",null,"Sources and calculations",-1)),l("p",null,"Company filings · "+g(t(u).currency)+" · Last checked "+g(t(h)?.lastCheckedAt?.slice(0,10)??t(m)?.retrievedAt.slice(0,10)??"Unavailable")+". Missing inputs remain unavailable. Your chart selection and layout are saved in this browser for "+g(t(u).name)+".",1),r[26]||(r[26]=l("p",null,"All charts share the selected dates. Quarterly/Yearly changes fiscal charts; valuation keeps completed daily closes on a published TTM basis. Later restatements can delay that basis. Historical mean, median and pricing labels use the selected range and do not estimate intrinsic fair value.",-1)),t(B)?(i(),s("p",Ln,"SBC deduction is an optional economic-cost scenario for FCF-based metrics. Missing SBC never becomes zero.")):M("",!0),t(S)?(i(),s("p",Pn,"WACC uses the "+g(t(O).value)+"% "+g(t(O).sector)+" US industry scenario across history, not a historical company cost of capital.",1)):M("",!0),l("dl",null,[(i(!0),s(oe,null,ie(t(v),$=>(i(),s("div",{key:$.id},[l("dt",null,g(t(T)[$.id]),1),l("dd",null,g(t(V).get($.id)?.formula),1)]))),128))]),z(Y,{to:`/v2/${e.symbol}/revenue`,class:"v2-text-link"},{default:I(()=>[...r[24]||(r[24]=[ne("Reported revenue and sources",-1)])]),_:1},8,["to"])])):M("",!0)],64))],32)}}}),Dn=Object.assign(Bn,{__name:"CompanyOverviewDashboard"}),so=ee({__name:"index",setup(e){const a=Ie(String(Oe().params.symbol)),n=`${a.name} Financial Dashboard | Beanvest`;return Oa(n.length<=60?n:`${a.symbol.toUpperCase()} Financial Dashboard | Beanvest`,`Build your ${a.symbol.toUpperCase()} dashboard with revenue, cash flow, valuation, margins and returns charts from company filings.`),(o,u)=>(i(),J(Dn,{symbol:t(a).symbol},null,8,["symbol"]))}});
1export{so 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.