1import{c as Nt,D as vt,F as St,G as kt,r as u,an as B,z as Y,j as e,L as F,aS as Mt,aU as Et,B as X,J as oe,s as Pt,w as Yt,aw as Ie,u as Dt,x as E,ax as _t,A as y,bc as ee,aN as ve,bd as ze,be as At,V as Se,W as Ut,ao as de,aq as ce,ar as He,as as Je,n as Ct,o as Ft}from"./index-m4mBRonp.js";import{D as $t}from"./download-Bh1ryFyA.js";import{A as Lt}from"./arrow-up-down-B-my_PB0.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const qt=Nt("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),xe={BABA:"9988.HK",NSRGY:"NESN.SW",RY:"RY.TO",MUFG:"8306.T",SAP:"SAP.DE",SAN:"SAN.MC",TD:"TD.TO",NVO:"NOVO-B.CO",SONY:"6758.T",TCEHY:"0700.HK",RHHBY:"ROG.SW",NVS:"NOVN.SW",TM:"7203.T"},Rt=new Set(["TSM","BABA","TM","SONY","NVS","MUFG","NSRGY","SAP","SAN","RY","TD","NVO","SHEL","HSBC","ASML","AZN","UL","BP","BHP","CBAUF","SIEGY","ALIZY","LVMUY","LRLCY","TTE","AIQUY","MPNGY","PNGAY"]),Gt=new Set(["NOVO-B.CO","NOVN.SW"]),Ze={SHOP:"SHOP.TO"},Bt={"ROG.SW":"RO.SW","000660.KS":"000660.KQ"},Kt={BKNG:25,"000660.KS":10},Ot={"0700.HK":1.09,"9988.HK":1.09,"NOVN.SW":.89};function K(l){return xe[l]||l}function Xe(l){return Bt[l]||l}function Wt(l){return Kt[l]||1}function Vt(l){return Ot[l]||1}function te(l,L,j){return l==null?l??null:L===1&&j===1?l:l/L*j}function et(l){if(!l||l.length===0)return{isValid:!1,validQuarters:[]};const L=new Date;L.setMonth(L.getMonth()-18);const j=l.filter(S=>{if(!S.endDate)return!1;const re=new Date(S.endDate);return re>=L&&!isNaN(re.getTime())});return{isValid:j.length>=4,validQuarters:j}}function er({language:l,showIntro:L=!0}){const{isAdmin:j,session:S}=vt(),re=St(),tt=kt();u.useState(!1);const[q,ke]=u.useState(null),[$,Me]=u.useState(null),[rt,Ee]=u.useState(!1),[M,Pe]=u.useState(new Map),[st,Ye]=u.useState(new Set),[De,nt]=u.useState(null),[at,lt]=u.useState(new Date),[_e,Ae]=u.useState(!1),[W,Ue]=u.useState(!1),[V,Ce]=u.useState(!1),[he,it]=u.useState("edgar"),[Q,Fe]=u.useState(!1),[I,$e]=u.useState(!1),[R,Le]=u.useState(null),[_,ot]=u.useState(null),[Qt,dt]=u.useState("edgar"),[N,qe]=u.useState(null),[v,pe]=u.useState(null),[z,ct]=u.useState({key:"rank",direction:"asc"}),{data:m,isLoading:xt,error:ht,refetch:It}=B({queryKey:["msci-companies-valuation-all"],queryFn:async()=>{const{data:t,error:s}=await Y.from("msci_companies").select("id, rank, name, ticker, market_cap, market_cap_value, country, sector, currency").order("market_cap_value",{ascending:!1}).limit(100);if(s)throw s;return t}});u.useEffect(()=>{if(!m||m.length===0||!window.location.hash.startsWith("#ticker-"))return;const t=window.location.hash.slice(1),s=(n=0)=>{const a=document.getElementById(t);if(a){a.scrollIntoView({behavior:"smooth",block:"center"}),a.classList.add("ring-2","ring-amber-400","bg-amber-100","dark:bg-amber-900/40"),setTimeout(()=>{a.classList.remove("ring-2","ring-amber-400","bg-amber-100","dark:bg-amber-900/40")},2500);return}n<20&&setTimeout(()=>s(n+1),250)};setTimeout(()=>s(0),300)},[m]);const{data:P,refetch:se,isLoading:zt}=B({queryKey:["cached-eps-data"],queryFn:async()=>{const{data:t,error:s}=await Y.from("cached_eps_data").select("ticker, eps_ttm, eps_ttm_edgar, eps_ttm_yahoo, last_updated, last_updated_edgar, last_updated_yahoo, data_source, quarterly_eps, quarterly_eps_yahoo, dps_ttm, dps_ttm_edgar, dps_ttm_yahoo, last_updated_dps_edgar, last_updated_dps_yahoo, quarterly_dps, quarterly_dps_yahoo");if(s)return new Map;const n=new Map;return t==null||t.forEach(a=>{n.set(a.ticker,{epsTTM:a.eps_ttm,epsTTMEdgar:a.eps_ttm_edgar,epsTTMYahoo:a.eps_ttm_yahoo,lastUpdated:a.last_updated,lastUpdatedEdgar:a.last_updated_edgar,lastUpdatedYahoo:a.last_updated_yahoo,dataSource:a.data_source,quarterlyEPS:a.quarterly_eps,quarterlyEPSYahoo:a.quarterly_eps_yahoo,dpsTTM:a.dps_ttm,dpsTTMEdgar:a.dps_ttm_edgar,dpsTTMYahoo:a.dps_ttm_yahoo,lastUpdatedDpsEdgar:a.last_updated_dps_edgar,lastUpdatedDpsYahoo:a.last_updated_dps_yahoo,quarterlyDPS:a.quarterly_dps,quarterlyDPSYahoo:a.quarterly_dps_yahoo})}),n},staleTime:5*60*1e3}),{data:ue}=B({queryKey:["sankey-company-meta-next"],queryFn:async()=>{const{data:t,error:s}=await Y.from("sankey_company_meta").select("ticker, next_expected_report"),n=new Map;return s||!t||t.forEach(a=>{n.set(a.ticker,{next:a.next_expected_report??null})}),n},staleTime:30*60*1e3}),{data:me}=B({queryKey:["sankey-fixed-tickers"],enabled:!!j,queryFn:async()=>{const{data:t,error:s}=await Y.from("sankey_fixed_positions").select("ticker").eq("is_fixed",!0),n=new Set;return s||!t||t.forEach(a=>n.add(String(a.ticker).toUpperCase())),n},staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0}),{data:ne}=B({queryKey:["local-currency-prices"],queryFn:async()=>{const t=Object.values(xe);if(t.length===0)return new Map;const s=t.map(Xe),n=new Map;t.forEach(d=>n.set(Xe(d),d));const{data:a,error:r}=await Y.functions.invoke("fetch-portfolio-prices",{body:{tickers:s}});if(r||!(a!=null&&a.results))return new Map;const i=new Map;
6return a.results.forEach(d=>{if(d.price!==null){const c=n.get(d.ticker)||d.ticker;i.set(c,{price:d.price,change1dPercent:d.change1dPercent||0,currency:d.currency||"USD"})}}),i},staleTime:5*60*1e3}),{data:be}=B({queryKey:["tradingview-pe",(m==null?void 0:m.map(t=>t.ticker).join(","))||""],enabled:!!j&&!!m&&m.length>0,queryFn:async()=>{const t=(m||[]).map(r=>r.ticker),{data:s,error:n}=await Y.functions.invoke("fetch-tradingview-pe",{body:{tickers:t}}),a=new Map;return n||!(s!=null&&s.results)||Object.entries(s.results).forEach(([r,i])=>{(i==null?void 0:i.pe)!=null&&isFinite(i.pe)&&a.set(r,i.pe)}),a},staleTime:2*60*1e3,refetchOnMount:"always"}),{data:O,isLoading:Ht}=B({queryKey:["cached-msci-prices"],queryFn:async()=>{const{data:t,error:s}=await Y.from("msci_companies").select("ticker, current_price, change_1d, change_ytd, price_date, currency").not("current_price","is",null);if(s)return new Map;const n=new Map;return t==null||t.forEach(a=>{n.set(a.ticker,{price:a.current_price,change:a.change_1d||0,changePercent:a.change_1d||0,priceDate:a.price_date,currency:a.currency||"USD"})}),n},staleTime:5*60*1e3});u.useEffect(()=>{if(!m||!P||!O)return;const t=new Map;m.forEach(s=>{const n=K(s.ticker),a=n!==s.ticker,r=a?P.get(n):P.get(s.ticker)||P.get(n)||(Ze[s.ticker]?P.get(Ze[s.ticker]):void 0),i=O.get(s.ticker),d=a?ne==null?void 0:ne.get(n):null;if(i||r||d){const c=a&&d,b=Wt(s.ticker),g=Vt(n);t.set(s.ticker,{ticker:s.ticker,price:c?d.price:(i==null?void 0:i.price)||0,change:(i==null?void 0:i.change)||0,changePercent:c?d.change1dPercent||(i==null?void 0:i.changePercent)||0:(i==null?void 0:i.changePercent)||0,priceDate:(i==null?void 0:i.priceDate)||"",epsTTM:te((r==null?void 0:r.epsTTMEdgar)??null,b,g),yahooEpsTTM:te((r==null?void 0:r.epsTTMYahoo)??null,b,g),quarterlyEPS:(r==null?void 0:r.quarterlyEPS)||[],quarterlyEPSYahoo:(r==null?void 0:r.quarterlyEPSYahoo)||[],currency:c?d.currency:(i==null?void 0:i.currency)||s.currency||"USD",epsSource:(r==null?void 0:r.dataSource)||"",epsLastUpdated:(r==null?void 0:r.lastUpdatedEdgar)??null,yahooEpsLastUpdated:(r==null?void 0:r.lastUpdatedYahoo)??null,dpsTTM:te((r==null?void 0:r.dpsTTM)??null,b,g),dpsTTMEdgar:te((r==null?void 0:r.dpsTTMEdgar)??null,b,g),dpsTTMYahoo:te((r==null?void 0:r.dpsTTMYahoo)??null,b,g),dpsLastUpdatedEdgar:(r==null?void 0:r.lastUpdatedDpsEdgar)??null,dpsLastUpdatedYahoo:(r==null?void 0:r.lastUpdatedDpsYahoo)??null,quarterlyDPS:(r==null?void 0:r.quarterlyDPS)||[],quarterlyDPSYahoo:(r==null?void 0:r.quarterlyDPSYahoo)||[]})}}),Pe(t)},[m,P,O,ne]);const Re=u.useCallback(async t=>{try{const{data:s,error:n}=await Y.functions.invoke("fetch-stock-data",{body:{ticker:t}});if(n||!(s!=null&&s.quote))return null;const a=s.quarterlyForecasts||[],r=a.map(p=>({endDate:p.endDate||p.end,eps:p.eps??p.val,quarter:p.quarter||`Q${p.quarterNum||0}`,fiscalYear:p.fiscalYear,source:"SEC EDGAR",isEstimate:!1})),{isValid:i,validQuarters:d}=et(r),b=[...d].filter(p=>p.eps!==null&&p.eps!==void 0&&!isNaN(p.eps)).sort((p,D)=>new Date(D.endDate).getTime()-new Date(p.endDate).getTime()).slice(0,4),g=i&&b.length===4?b.reduce((p,D)=>p+D.eps,0):null,w=i&&a.length>0?"SEC EDGAR":s.epsTTM?"Yahoo Finance":"",o=P==null?void 0:P.get(t),k=(o==null?void 0:o.epsTTMEdgar)??(o==null?void 0:o.epsTTM)??g??s.epsTTM??null,T=(o==null?void 0:o.dataSource)||w;return{ticker:t,price:s.quote.price,change:s.quote.change||0,changePercent:s.quote.changesPercentage||0,priceDate:s.currentPriceDate||new Date().toISOString().split("T")[0],epsTTM:k,yahooEpsTTM:(o==null?void 0:o.epsTTMYahoo)??null,quarterlyEPS:d,quarterlyEPSYahoo:(o==null?void 0:o.quarterlyEPSYahoo)||[],currency:s.currency||"USD",epsSource:T,epsLastUpdated:(o==null?void 0:o.lastUpdatedEdgar)??(o==null?void 0:o.lastUpdated)??null,yahooEpsLastUpdated:(o==null?void 0:o.lastUpdatedYahoo)??null,dpsTTM:(o==null?void 0:o.dpsTTM)??null,dpsTTMEdgar:(o==null?void 0:o.dpsTTMEdgar)??null,dpsTTMYahoo:(o==null?void 0:o.dpsTTMYahoo)??null,dpsLastUpdatedEdgar:(o==null?void 0:o.lastUpdatedDpsEdgar)??null,dpsLastUpdatedYahoo:(o==null?void 0:o.lastUpdatedDpsYahoo)??null,quarterlyDPS:(o==null?void 0:o.quarterlyDPS)||[],quarterlyDPSYahoo:(o==null?void 0:o.quarterlyDPSYahoo)||[]}}catch(s){return console.error(`Error fetching ${t}:`,s),null}},[P]);u.useCallback(async(t=!1)=>
6{if(!m||!j)return;t||Ae(!0);const s=m.map(a=>a.ticker),n=new Map(M);for(let a=0;a<s.length;a+=5){const r=s.slice(a,a+5);await Promise.all(r.map(async i=>{t||Ye(c=>new Set(c).add(i));const d=await Re(i);d&&n.set(i,d),t||Ye(c=>{const b=new Set(c);return b.delete(i),b})})),Pe(new Map(n)),a+5<s.length&&await new Promise(i=>setTimeout(i,300))}nt(new Date),Ae(!1)},[m,j,Re,M]);const Ge=u.useCallback(t=>{if(!t)return{value:null,isFallback:!1,hasMismatch:!1};const s=t.epsTTM&&t.yahooEpsTTM&&Math.abs(t.epsTTM-t.yahooEpsTTM)/Math.abs(t.yahooEpsTTM)>.05;return s&&t.yahooEpsTTM!=null?{value:t.yahooEpsTTM,isFallback:!0,hasMismatch:s}:t.epsTTM!=null?{value:t.epsTTM,isFallback:!1,hasMismatch:s}:t.yahooEpsTTM!=null?{value:t.yahooEpsTTM,isFallback:!0,hasMismatch:!1}:{value:null,isFallback:!1,hasMismatch:!1}},[]),Be=u.useCallback(t=>{if(!t)return{value:null,isYahoo:!1,hasMismatch:!1};const s=t.dpsTTMEdgar,n=t.dpsTTMYahoo,a=s&&n&&Math.abs(s-n)/Math.abs(n)>.1,r=a||s===null||s===void 0;return{value:r&&n!==null&&n!==void 0?n:s??n??null,isYahoo:r&&n!==null&&n!==void 0,hasMismatch:a}},[]),ge=u.useMemo(()=>m?m.map((t,s)=>{const n=M.get(t.ticker),{value:a}=Ge(n),r=n!=null&&n.price&&a&&a>0?n.price/a:null,{value:i}=Be(n),d=n!=null&&n.price&&i&&i>0?i/n.price*100:null;return{company:t,originalIndex:s,peTTM:r,divYield:d}}):[],[m,M,Ge,Be]),pt=u.useMemo(()=>{if(!ge.length)return[];const t=[...ge];return t.sort((s,n)=>{let a=0;switch(z.key){case"rank":a=s.originalIndex-n.originalIndex;break;case"name":a=s.company.name.localeCompare(n.company.name);break;case"pe":s.peTTM==null&&n.peTTM==null?a=0:s.peTTM==null?a=1:n.peTTM==null?a=-1:a=s.peTTM-n.peTTM;break;case"divYield":s.divYield==null&&n.divYield==null?a=0:s.divYield==null?a=1:n.divYield==null?a=-1:a=s.divYield-n.divYield;break}return z.direction==="asc"?a:-a}),t},[ge,z]),H=t=>{ct(s=>s.key!==t?{key:t,direction:"asc"}:s.direction==="asc"?{key:t,direction:"desc"}:{key:t,direction:"asc"})},J=({columnKey:t})=>z.key!==t?e.jsx(Lt,{className:"w-5 h-5 text-primary",strokeWidth:2.5}):z.direction==="asc"?e.jsx(Ct,{className:"w-5 h-5 text-primary",strokeWidth:2.5}):e.jsx(Ft,{className:"w-5 h-5 text-primary",strokeWidth:2.5});u.useEffect(()=>{const t=setInterval(()=>{lt(new Date)},1e4);return()=>clearInterval(t)},[]);const ut=(t,s="USD")=>{const n=fe(s);return t>=1e3?`${n}${Math.round(t).toLocaleString()}`:["TWD","KRW","JPY"].includes(s)&&t>=100?`${n}${Math.round(t).toLocaleString()}`:`${n}${t.toFixed(2)}`},mt=t=>t>=1e12?`$${(t/1e12).toFixed(2)}T`:`$${(t/1e9).toFixed(0)}B`,fe=t=>({USD:"$",EUR:"â¬",GBP:"£",JPY:"Â¥",CHF:"CHF ",CAD:"C$",AUD:"A$",HKD:"HK$",CNY:"Â¥",KRW:"â©",TWD:"NT$",INR:"â¹",BRL:"R$",SEK:"kr ",DKK:"kr ",NOK:"kr "})[t||"USD"]||(t?`${t} `:"$"),U=(t,s)=>{if(t===null)return"â";const n=Math.abs(t),a=fe(s);return n>=1e3?`${a}${Math.round(t).toLocaleString()}`:n>=100?`${a}${t.toFixed(1)}`:`${a}${t.toFixed(2)}`},ae=(t,s)=>{const n=Math.abs(t),a=fe(s);return n>=1e3?`${a}${Math.round(t).toLocaleString()}`:`${a}${t.toFixed(2)}`},Ke=t=>t?new Date(t).toLocaleDateString(l==="de"?"de-DE":"en-US",{day:"2-digit",month:"2-digit",year:"2-digit"}):"â",le=t=>{if(!t)return null;const s=new Date(t),n=s.toLocaleDateString(l==="de"?"de-DE":"en-US",{day:"2-digit",month:"2-digit",year:"2-digit"}),a=s.toLocaleTimeString(l==="de"?"de-DE":"en-US",{hour:"2-digit",minute:"2-digit"});return{date:n,time:a}},Oe=t=>t.toLocaleTimeString(l==="de"?"de-DE":"en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),ye=async(t,s="edgar")=>{var a;const n=M.get(t.ticker);if(!(s==="edgar"&&!(n!=null&&n.epsTTM))&&!(s==="yahoo"&&!(n!=null&&n.yahooEpsTTM))&&(ke(t),Me(n),it(s),s==="edgar"&&!((a=n==null?void 0:n.quarterlyEPS)!=null&&a.length))){Ee(!0);try{const{data:r,error:i}=await Y.functions.invoke("fetch-stock-data",{body:{ticker:t.ticker}});if(!i&&(r!=null&&r.quarterlyForecasts)){const d=et(r.quarterlyForecasts);Me({...n,quarterlyEPS:d.validQuarters})}}catch(r){console.error("Error fetching quarterly data:",r)}finally{Ee(!1)}}},je=(t,s="edgar")=>{const n=M.get(t.ticker);s==="edgar"&&!(n!=null&&n.dpsTTMEdgar)||s==="yahoo"&&!(n!=null&&n.dpsTTMYahoo)||(Le(t),ot(n||null),dt(s))},bt=async()=>
6{if(!(S!=null&&S.access_token)){y.error(l==="de"?"Bitte einloggen":"Please login");return}Ue(!0),y.info(l==="de"?"Starte EDGAR EPS Abruf...":"Starting EDGAR EPS fetch...");try{for(let t=0;t<100;t+=20){y.info(l==="de"?`EDGAR Batch ${Math.floor(t/20)+1}/5...`:`EDGAR batch ${Math.floor(t/20)+1}/5...`);const{data:s,error:n}=await Y.functions.invoke("update-eps-cache",{body:{limit:20,offset:t,source:"edgar"}});n?console.error(`EDGAR Batch ${t} error:`,n):console.log(`EDGAR Batch ${t} result:`,s),await new Promise(a=>setTimeout(a,1e3))}await se(),y.success(l==="de"?"EDGAR EPS aktualisiert":"EDGAR EPS updated")}catch(t){console.error("EDGAR EPS update error:",t),y.error(`Error: ${t.message}`)}finally{Ue(!1)}},gt=async()=>{if(!(S!=null&&S.access_token)){y.error(l==="de"?"Bitte einloggen":"Please login");return}Ce(!0),y.info(l==="de"?"Starte Yahoo EPS Abruf...":"Starting Yahoo EPS fetch...");try{for(let t=0;t<100;t+=20){y.info(l==="de"?`Yahoo Batch ${Math.floor(t/20)+1}/5...`:`Yahoo batch ${Math.floor(t/20)+1}/5...`);const{data:s,error:n}=await Y.functions.invoke("update-eps-cache",{body:{limit:20,offset:t,source:"yahoo"}});n?console.error(`Yahoo Batch ${t} error:`,n):console.log(`Yahoo Batch ${t} result:`,s),await new Promise(a=>setTimeout(a,1e3))}await se(),y.success(l==="de"?"Yahoo EPS aktualisiert":"Yahoo EPS updated")}catch(t){console.error("Yahoo EPS update error:",t),y.error(`Error: ${t.message}`)}finally{Ce(!1)}},ft=async()=>{if(!(S!=null&&S.access_token)){y.error(l==="de"?"Bitte einloggen":"Please login");return}Fe(!0),y.info(l==="de"?"Starte EDGAR DPS Abruf...":"Starting EDGAR DPS fetch...");try{for(let t=0;t<100;t+=20){y.info(l==="de"?`DPS EDGAR Batch ${Math.floor(t/20)+1}/5...`:`DPS EDGAR batch ${Math.floor(t/20)+1}/5...`);const{data:s,error:n}=await Y.functions.invoke("update-dps-cache",{body:{limit:20,offset:t,source:"edgar"}});n?console.error(`DPS EDGAR Batch ${t} error:`,n):console.log(`DPS EDGAR Batch ${t} result:`,s),await new Promise(a=>setTimeout(a,1e3))}await se(),y.success(l==="de"?"EDGAR DPS aktualisiert":"EDGAR DPS updated")}catch(t){console.error("EDGAR DPS update error:",t),y.error(`Error: ${t.message}`)}finally{Fe(!1)}},yt=async()=>{if(!(S!=null&&S.access_token)){y.error(l==="de"?"Bitte einloggen":"Please login");return}$e(!0),y.info(l==="de"?"Starte Yahoo DPS Abruf...":"Starting Yahoo DPS fetch...");try{for(let t=0;t<100;t+=20){y.info(l==="de"?`DPS Yahoo Batch ${Math.floor(t/20)+1}/5...`:`DPS Yahoo batch ${Math.floor(t/20)+1}/5...`);const{data:s,error:n}=await Y.functions.invoke("update-dps-cache",{body:{limit:20,offset:t,source:"yahoo"}});n?console.error(`DPS Yahoo Batch ${t} error:`,n):console.log(`DPS Yahoo Batch ${t} result:`,s),await new Promise(a=>setTimeout(a,1e3))}await se(),y.success(l==="de"?"Yahoo DPS aktualisiert":"Yahoo DPS updated")}catch(t){console.error("Yahoo DPS update error:",t),y.error(`Error: ${t.message}`)}finally{$e(!1)}};return xt?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(F,{className:"w-8 h-8 animate-spin text-primary"})}):ht?e.jsx("div",{className:"text-center py-8 text-red-500",children:l==="de"?"Fehler beim Laden der Daten":"Error loading data"}):e.jsxs("div",{className:"w-full",children:[L&&e.jsx("section",{className:"container mx-auto px-3 sm:px-4 py-8 sm:py-12 md:py-16 lg:py-20 max-w-4xl",children:e.jsx(Mt,{animation:"slide-left",duration:800,triggerOnce:!1,children:e.jsx("p",{className:"text-lg md:text-xl lg:text-2xl xl:text-3xl text-justify leading-relaxed text-foreground/90 font-semibold",children:l==="de"?e.jsxs(e.Fragment,{children:["In der nachfolgenden Tabelle weisen wir die ",e.jsx("strong",{className:"font-semibold",children:"Kurs-Gewinn-Verhältnisse (KGV)"})," und die ",e.jsx("strong",{className:"font-semibold",children:"Dividendenrenditen"})," für die Top 100 Aktien weltweit transparent aus. Wir machen die Berechnung nachvollziehbar, weil insbesondere KGVs im Internet oft schwer zu überprüfen sind â verschiedene Anbieter verwenden unterschiedliche Definitionen, Aktualisierungszyklen oder sogar fehlerhafte Daten. Hier kannst Du ",e.jsx("strong",{className:"font-semibold",children:"auf den Gewinn je Aktie der letzten 12 Monate (TTM) klicken"}),", um genau zu sehen, welche Datenpunkte verwendet wurden. Wenn Du mehr über Aktienbewertung lernen möchtest, dann findest Du in meinen ",e.jsx("a",{href:"/book",className:"text-primary hover:underline font-semibold",children:"Büchern"})," einen kompakten und praxisnahen Einstieg. Weiter unten schauen wir uns anhand des ",e.jsx("span",{className:"whitespace-nowrap",children:"Shiller-KGVs"})," an, ob der US-Aktienmarkt aktuell überbewertet ist. Zusätzlich findest Du wichtige Bewertungskennzahlen für vielbeachtete internationale Aktienindizes."]}):e.jsxs(e.Fragment,{children:["In the following table, we transparently display the ",e.jsx("strong",{className:"font-semibold",children:"price-to-earnings ratios (P/E)"})," and the ",e.jsx("strong",{className:"font-semibold",children:"dividend yields"})," for the Top 100 stocks globally. We make the calculation explicit because especially P/E ratios you find online are often hard to verifyâdifferent providers may use different definitions, update cycles, or even faulty input
6s. ",e.jsx("strong",{className:"font-semibold",children:"Click on the data below"})," to see exactly which earnings per share data and which dividends per share data for the last trailing twelve months (TTM) were used to calculate the valuation ratios. If you want to learn more about stock valuation, you'll find a compact and practical introduction in my ",e.jsx("a",{href:"/book",className:"text-primary hover:underline font-semibold",children:"books"}),". Further below, we'll look at whether the U.S. stock market is currently overvalued using the ",e.jsx("span",{className:"whitespace-nowrap",children:"Shiller PE"}),". In addition, you will find important valuation metrics for widely followed international equity indices."]})})})}),j&&e.jsxs("div",{className:"flex flex-col gap-2 mb-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-3 py-2 bg-blue-500/10 rounded-lg border border-blue-500/20 text-xs text-blue-700 dark:text-blue-300",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${_e?"bg-yellow-500 animate-pulse":M.size>0?"bg-green-500":"bg-gray-400"}`}),e.jsx("strong",{children:l==="de"?"Kurse:":"Prices:"}),e.jsx("span",{children:"Yahoo Finance"}),e.jsx("span",{className:"text-muted-foreground",children:"|"}),e.jsxs("span",{children:[M.size,"/",(m==null?void 0:m.length)||0]}),e.jsx("span",{className:"text-muted-foreground",children:"|"}),e.jsx(Et,{className:"w-3 h-3"}),e.jsx("span",{className:"font-mono",children:Oe(at)}),De&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:"|"}),e.jsxs("span",{className:"text-[10px]",children:[l==="de"?"Letzte Aktualisierung:":"Last update:"," ",Oe(De)]})]}),_e&&e.jsxs("span",{className:"text-yellow-600 dark:text-yellow-400 flex items-center gap-1",children:[e.jsx(F,{className:"w-3 h-3 animate-spin"}),l==="de"?"Aktualisiere...":"Refreshing..."]})]}),e.jsxs("div",{className:"flex flex-wrap gap-4",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsxs(X,{onClick:bt,disabled:W||V||Q||I,size:"sm",className:"group relative overflow-hidden bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-500 hover:to-emerald-500 text-white font-semibold px-4 py-2 rounded-xl border-2 border-white/20 shadow-lg disabled:opacity-50 disabled:cursor-not-allowed",children:[W?e.jsx(F,{className:"h-4 w-4 mr-2 animate-spin"}):e.jsx(oe,{className:"h-4 w-4 mr-2"}),e.jsx("span",{children:"EPS EDGAR"})]}),(()=>{const t=Array.from(M.values()).find(s=>s.epsLastUpdated);if(t!=null&&t.epsLastUpdated){const s=le(t.epsLastUpdated);return s?e.jsxs("span",{className:"text-[9px] text-muted-foreground mt-1",children:[s.date," ",s.time]}):null}return null})()]}),e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsxs(X,{onClick:gt,disabled:V||W||Q||I,size:"sm",className:"group relative overflow-hidden bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 text-white font-semibold px-4 py-2 rounded-xl border-2 border-white/20 shadow-lg disabled:opacity-50 disabled:cursor-not-allowed",children:[V?e.jsx(F,{className:"h-4 w-4 mr-2 animate-spin"}):e.jsx(oe,{className:"h-4 w-4 mr-2"}),e.jsx("span",{children:"EPS Yahoo"})]}),(()=>{const t=Array.from(M.values()).find(s=>s.yahooEpsLastUpdated);if(t!=null&&t.yahooEpsLastUpdated){const s=le(t.yahooEpsLastUpdated);return s?e.jsxs("span",{className:"text-[9px] text-muted-foreground mt-1",children:[s.date," ",s.time]}):null}return null})()]}),e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsxs(X,{onClick:ft,disabled:W||V||Q||I,size:"sm",className:"group relative overflow-hidden bg-gradient-to-r from-orange-600 to-amber-600 hover:from-orange-500 hover:to-amber-500 text-white font-semibold px-4 py-2 rounded-xl border-2 border-white/20 shadow-lg disabled:opacity-50 disabled:cursor-not-allowed",children:[Q?e.jsx(F,{className:"h-4 w-4 mr-2 animate-spin"}):e.jsx(oe,{className:"h-4 w-4 mr-2"}),e.jsx("span",{children:"DPS EDGAR"})]}),(()=>{const t=Array.from(M.values()).find(s=>s.dpsLastUpdatedEdgar);
6if(t!=null&&t.dpsLastUpdatedEdgar){const s=le(t.dpsLastUpdatedEdgar);return s?e.jsxs("span",{className:"text-[9px] text-muted-foreground mt-1",children:[s.date," ",s.time]}):null}return null})()]}),e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsxs(X,{onClick:yt,disabled:V||W||Q||I,size:"sm",className:"group relative overflow-hidden bg-gradient-to-r from-pink-600 to-rose-600 hover:from-pink-500 hover:to-rose-500 text-white font-semibold px-4 py-2 rounded-xl border-2 border-white/20 shadow-lg disabled:opacity-50 disabled:cursor-not-allowed",children:[I?e.jsx(F,{className:"h-4 w-4 mr-2 animate-spin"}):e.jsx(oe,{className:"h-4 w-4 mr-2"}),e.jsx("span",{children:"DPS Fallback"})]}),(()=>{const t=Array.from(M.values()).find(s=>s.dpsLastUpdatedYahoo);if(t!=null&&t.dpsLastUpdatedYahoo){const s=le(t.dpsLastUpdatedYahoo);return s?e.jsxs("span",{className:"text-[9px] text-muted-foreground mt-1",children:[s.date," ",s.time]}):null}return null})()]})]})]}),m&&m.length>0?e.jsx(e.Fragment,{children:e.jsx("div",{className:"rounded-2xl border border-[rgb(229,229,234)] dark:border-[rgb(58,58,60)] overflow-hidden bg-white dark:bg-[rgb(44,44,46)]",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(Pt,{className:"sm:text-sm w-full min-w-0 table-fixed",children:[e.jsxs("thead",{className:"bg-[rgb(220,235,250)] dark:bg-[rgb(30,60,90)]",children:[j&&e.jsxs("tr",{className:"border-b border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)]",children:[e.jsx("th",{className:"hidden sm:table-cell",colSpan:1}),e.jsx("th",{colSpan:1}),e.jsx("th",{colSpan:1}),e.jsx("th",{className:"hidden sm:table-cell",colSpan:1}),e.jsx("th",{className:"hidden sm:table-cell",colSpan:1}),e.jsx("th",{colSpan:1}),e.jsx("th",{className:"sm:hidden",colSpan:1}),e.jsx("th",{className:"hidden sm:table-cell",colSpan:1}),e.jsx("th",{className:"hidden sm:table-cell",colSpan:1}),e.jsx("th",{className:"hidden lg:table-cell py-2 text-center text-xs border-l border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)]",colSpan:2,style:{fontWeight:800,color:"rgb(0,80,160)"},children:"EPS"}),e.jsx("th",{className:"hidden lg:table-cell py-2 text-center text-xs border-l border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)]",colSpan:2,style:{fontWeight:800,color:"rgb(0,80,160)"},children:"DPS"})]}),e.jsxs("tr",{className:"border-b-2 border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)]",children:[e.jsx("th",{onClick:()=>H("rank"),className:"hidden sm:table-cell w-10 px-3 py-4 text-left h-14 align-middle cursor-pointer select-none hover:bg-[rgb(200,225,245)] dark:hover:bg-[rgb(40,70,100)] transition-colors",style:{fontSize:"15px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px"},children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["#",e.jsx(J,{columnKey:"rank"})]})}),e.jsx("th",{onClick:()=>H("name"),className:"w-[140px] sm:w-[200px] lg:w-[240px] py-4 px-2 sm:px-3 text-left h-14 align-middle cursor-pointer select-none hover:bg-[rgb(200,225,245)] dark:hover:bg-[rgb(40,70,100)] transition-colors",style:{fontSize:"15px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px",textAlign:"left"},children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[l==="de"?"Top100 Aktien":"Top100 Stocks",e.jsx(J,{columnKey:"name"})]})}),j&&e.jsx("th",{className:"w-[72px] sm:w-24 lg:w-28 py-4 px-2 sm:px-3 text-left h-14 align-middle",style:{fontSize:"15px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px",textAlign:"left"},children:l==="de"?"Kurs":"Price"}),e.jsxs("th",{className:"hidden sm:table-cell w-[88px] sm:w-[110px] py-4 px-1 sm:px-2 text-center h-14 align-middle leading-tight",style:{fontSize:"13px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px"},children:["Sankey",e.jsx("br",{}),"Annual Report"]}),e.jsx("th",{className:"hidden sm:table-cell w-28 lg:w-36 py-4 px-3 text-left border-l-2 border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)] h-14 align-middle",style:{fontSize:"15px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px",textAlign:"left"},children:"Earnings Per Share (TTM)"}),e.jsx("th",{onClick:()=>H("pe"),className:"w-[60px] sm:w-24 lg:w-36 py-4 px-1 sm:px-3 text-center sm:text-left sm:border-r-2 sm:border-[rgb(150,190,230)] dark:sm:border-[rgb(80,120,160)] h-14 align-middle cursor-pointer select-none hover:bg-[rgb(200,225,245)] dark:hover:bg-[rgb(40,70,100)] transition-colors",style:{fontSize:"14px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px"},children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:"sm:hidden",children:l==="de"?"KGV":"PE"}),e.jsx("span",{className:"hidden sm:inline",style:{textAlign:"left"},children:"Price-Earnings Ratio (TTM)"}),e.jsx(J,{columnKey:"pe"})]})}),e.jsx("th",{onClick:()=>H("divYield"),className:"w-[68px] sm:hidden py-4 px-1 text-center h-14 align-middle cursor-pointer select-none hover:bg-[rgb(200,225,245)] dark:hover:bg-[rgb(40,70,100)] transition-colors",style:{fontSize:"14px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px"},children:e.jsxs("span",{className:"inline-flex items-center justify-center gap-1",children:["Div%",e.jsx(J,{columnKey:"divYield"})]})}),e.jsx("th",{className:"hidden sm:table-cell w-28 lg:w-36 py-4 px-3 text-left border-l-2 border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)] h-14 align-middle",style:{fontSize:"15px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px"},children:"Dividend Per Share (TTM)"}),e.jsx("th",{onClick:()=>H("divYield"),className:"hidden sm:table-cell w-24 lg:w-32 py-4 px-3 text-left border-r-2 border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)] h-14 align-middle cursor-pointer select-none hover:bg-[rgb(200,225,245)] dark:hover:bg-[rgb(40,70,100)] transition-colors",style:{fontSize:"15px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px"},children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["Dividend Yield (TTM)",e.jsx(J,{columnKey:"divYield"})]})}),e.jsx("th",{className:"hidden sm:table-cell w-28 lg:w-36 py-4 px-3 text-left border-l-2 border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)] h-14 align-middle",style:{fontSize:"15px",fontWeight:800,color:"rgb(0,60,120)",letterSpacing:"0.5px"},children:l==="de"?"Link zu Company Page":"Link to Company Page"}),j&&e.jsxs(e.Fragment,{children:[e.jsx("th",{className:"hidden lg:table-cell w-16 px-2 py-2 text-left text-[10px] border-l border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)] align-middle",style:{fontWeight:600,color:"rgb(0,100,180)"},children:"Edgar"}),e.jsx("th",{className:"hidden lg:table-cell w-16 px-2 py-2 text-left text-[10px] align-middle",style:{fontWeight:600,color:"rgb(0,100,180)"},children:"Yahoo"}),e.jsx("th",{className:"hidden lg:table-cell w-16 px-2 py-2 text-left text-[10px] border-l border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)] align-middle",style:{fontWeight:600,color:"rgb(0,100,180)"},children:"Edgar"}),e.jsx("th",{className:"hidden lg:table-cell w-16 px-2 py-2 text-left text-[10px] align-middle",style:{fontWeight:600,color:"rgb(0,100,180)"},children:"Yahoo"})]})]})]}),e.jsx(Yt,{children:pt.map(({company:t,originalIndex:s},n)=>{var Qe;const a=Ie(t.ticker),r=M.get(t.ticker),i=st.has(t.ticker),d=(r==null?void 0:r.epsTTM)&&(r==null?void 0:r.yahooEpsTTM)&&Math.abs(r.epsTTM-r.yahooEpsTTM)/Math.abs(r.yahooEpsTTM)>.05;let c,b=!1;d&&(r==null?void 0:r.yahooEpsTTM)!=null?(c=r.yahooEpsTTM,b=!0):(r==null?void 0:r.epsTTM)!=null?c=r.epsTTM:(r==null?void 0:r.yahooEpsTTM)!=null?(c=r.yahooEpsTTM,b=!0):c=null;const g=r!=null&&r.price&&c&&c>0?r.price/c:null,w=r!=null&&r.price&&(r!=null&&r.yahooEpsTTM)&&r.yahooEpsTTM>0?r.price/r.yahooEpsTTM:null,o=(be==null?void 0:be.get(t.ticker))??null,k=P==null?void 0:P.get(t.ticker),T=(k==null?void 0:k.epsTTMEdgar)??(k==null?void 0:k.epsTTMYahoo)??null,p=((Qe=O==null?void 0:O.get(t.ticker))==null?void 0:Qe.price)??null,D=p&&T&&T>0?p/T:null,We=K(t.ticker)!==t.ticker,Ve=x=>g&&x&&x>0?Math.abs(g-x)/x:0;let ie=Ve(w)>.05,Z=Ve(o)>.05;We&&D!=null&&(o!=null&&o>
60&&Math.abs(D-o)/o<=.05&&(Z=!1),w!=null&&w>0&&Math.abs(D-w)/w<=.05&&(ie=!1));const we=g!=null&&(ie||Z),Te=[];ie&&Te.push("Yahoo"),Z&&Te.push("TradingView");const jt=we?j?[`Abweichung >5% gegenüber: ${Te.join(", ")}`,"",`Eigen: PE ${g.toFixed(2)}`,w!=null?`Yahoo: PE ${w.toFixed(2)}${ie?" â ":" â"}`:"Yahoo: n/a",o!=null?`TradingView: PE ${o.toFixed(2)}${Z?" â ":" â"}`:"TradingView: n/a",We&&D!=null?`ADR-Paar (USD): PE ${D.toFixed(2)}`:null].filter(Boolean).join(` 7`):l==="de"?"Hinweis: Das berechnete KGV weicht deutlich von externen Datenquellen ab. Bitte für Investitionsentscheidungen zusätzlich prüfen.":"Note: The calculated P/E ratio deviates significantly from external data sources. Please verify before making investment decisions.":"",wt=t.country!=="USA"&&t.country!=="United States",Tt=[t.ticker,K(t.ticker)].some(x=>me==null?void 0:me.has(x.toUpperCase()));return e.jsxs(Dt,{id:`ticker-${(t.ticker||"").toUpperCase()}`,className:`border-b border-[rgb(245,245,247)] dark:border-[rgb(44,44,46)] transition-colors hover:bg-[rgb(245,245,247)] dark:hover:bg-[rgb(50,50,52)] ${wt?"bg-sky-50 dark:bg-sky-900/20":""}`,children:[e.jsx(E,{className:"hidden sm:table-cell px-3 py-3 text-sm text-[rgb(142,142,147)] font-medium",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[s+1,j&&Tt&&e.jsx("span",{title:"Sankey fixed",className:"text-green-600 dark:text-green-400 leading-none",children:"â"})]})}),e.jsx(E,{className:"w-[140px] sm:w-auto px-2 sm:px-3 py-2 sm:py-3",children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1 sm:gap-1.5",children:[e.jsx("span",{className:"sm:hidden text-[8px] text-[rgb(142,142,147)] w-3 shrink-0",children:s+1}),e.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] sm:text-sm lg:text-base font-semibold text-[rgb(44,44,46)] dark:text-white hover:text-[rgb(0,122,255)] truncate leading-tight max-w-[115px] sm:max-w-none transition-colors",children:t.name}),e.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-[rgb(174,174,178)] hover:text-[rgb(0,122,255)] shrink-0 hidden sm:block transition-colors",children:e.jsx(_t,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-0 sm:flex-col sm:items-start pl-4 sm:pl-0",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-[9px] sm:text-xs text-[rgb(0,122,255)] font-mono font-medium",children:K(t.ticker)}),(Rt.has(t.ticker)&&!xe[t.ticker]||Gt.has(t.ticker.toUpperCase()))&&e.jsx("span",{className:"text-[7px] sm:text-[9px] font-bold tracking-wide px-1 py-px rounded-sm bg-[rgb(0,122,255)]/10 text-[rgb(0,122,255)] border border-[rgb(0,122,255)]/20",title:l==="de"?"American Depositary Receipt â US-Listing in USD":"American Depositary Receipt â US listing in USD",children:"ADR"})]}),e.jsxs("span",{className:"text-[8px] sm:text-[11px] text-[rgb(142,142,147)]",children:[e.jsx("span",{className:"hidden sm:inline",children:"MCap: "}),mt(t.market_cap_value)]})]})]})}),j&&e.jsx(E,{className:"w-[72px] sm:w-auto px-2 sm:px-3 py-2 sm:py-3",children:i?e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(F,{className:"w-3 h-3 animate-spin text-[rgb(142,142,147)]"})}):r?e.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[e.jsx("a",{href:Ie(t.ticker),target:"_blank",rel:"noopener noreferrer",className:"text-[11px] sm:text-sm lg:text-base font-semibold text-[rgb(44,44,46)] dark:text-white hover:text-[rgb(0,122,255)] transition-colors",children:ut(r.price,r.currency)}),e.jsxs("span",{className:`text-[9px] sm:text-xs font-medium ${r.change>=0?"text-[rgb(52,199,89)]":"text-[rgb(255,59,48)]"}`,children:[r.change>=0?"+":"",r.changePercent.toFixed(1),"%"]})]}):e.jsx("div",{className:"text-center text-[rgb(174,174,178)] text-[9px]",children:"-"})}),e.jsxs(E,{className:"hidden sm:table-cell w-[88px] sm:w-[110px] px-1 sm:px-2 py-2 sm:py-3 text-center",children:[e.jsxs("button",{onClick:()=>{if(tt){y.info(l==="de"?"Sankey-Graphiken schaust Du Dir am besten auf dem Desktop an.":"Sankey diagrams are best viewed on desktop.");return}re(`/busmodel?ticker=${encodeURIComponent(K(t.ticker).toUpperCase())}&from=valuation`)},className:"flex items-center justify-center gap-1 w-full px-2 py-1 rounded-md text-white text-[10px] sm:text-xs font-semibold border border-white/10 hover:scale-[1.03] transition-all duration-150 shadow-sm whitespace-nowrap",style:{backgroundColor:"hsl(215, 65%, 28%)"},title:l==="de"?"Sankey-Diagramm öffnen":"Open Sankey diagram",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[e.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),e.jsx("polyline",{points:"7.5 4.21 12 6.81 16.5 4.21"}),e.jsx("polyline",{points:"7.5 19.79 7.5 14.6 3 12"}),e.jsx("polyline",{points:"21 12 16.5 14.6 16.5 19.79"}),e.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),e.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]}),e.jsx("span",{className:"font-mono truncate",children:K(t.ticker)})]}),(()=>{const x=ue==null?void 0:ue.get(t.ticker),h=x==null?void 0:x.next;if(!h)return null;const C=new Date(h);if(isNaN(C.getTime()))return null;const A=C.toLocaleDateString(l==="de"?"de-DE":"en-GB",{day:"2-digit",month:"short",year:"2-digit"}),f=C.getTime()<=Date.now();return e.jsxs("div",{className:`mt-1 text-[9px] sm:text-[10px] font-medium ${f?"text-amber-600 dar
7k:text-amber-400":"text-[rgb(142,142,147)]"}`,title:l==="de"?`Nächster erwarteter Geschäftsbericht: ${A}${f?" (überfällig â wird automatisch nachgeladen)":""}`:`Next expected annual report: ${A}${f?" (overdue â auto-retry enabled)":""}`,children:["Next: ",A]})})()]}),e.jsx(E,{className:"hidden sm:table-cell px-3 py-2 border-l-2 border-[rgb(0,122,255)]/10",children:e.jsx("div",{className:"flex items-center justify-center",children:i?e.jsx(F,{className:"w-3 h-3 animate-spin text-[rgb(142,142,147)]"}):c?e.jsxs("button",{onClick:()=>ye(t,b?"yahoo":"edgar"),title:l==="de"?"Berechnung anzeigen":"Show calculation",className:`group/cell inline-flex items-center gap-1 px-2.5 py-1 rounded-lg text-[11px] lg:text-sm font-semibold cursor-pointer transition-all duration-150 ring-1 hover:shadow-sm hover:-translate-y-px active:translate-y-0 active:scale-[0.97] ${c>0?"bg-gradient-to-b from-[rgb(0,122,255)]/5 to-[rgb(0,122,255)]/10 ring-[rgb(0,122,255)]/20 text-[rgb(44,44,46)] dark:text-white hover:ring-[rgb(0,122,255)]/50 hover:from-[rgb(0,122,255)]/10 hover:to-[rgb(0,122,255)]/15":"bg-[rgb(255,59,48)]/10 ring-[rgb(255,59,48)]/30 text-[rgb(255,59,48)] hover:ring-[rgb(255,59,48)]/60 hover:bg-[rgb(255,59,48)]/15"}`,children:[e.jsx("span",{children:U(c,r==null?void 0:r.currency)}),e.jsx(ee,{className:"w-3 h-3 opacity-40 group-hover/cell:opacity-90 transition-opacity",strokeWidth:2.25})]}):e.jsx("span",{className:"inline-block text-center text-[rgb(174,174,178)] text-[10px] min-w-[36px]",title:l==="de"?"Keine Daten verfügbar":"No data available",children:"â"})})}),e.jsx(E,{className:"w-[60px] sm:w-auto px-1 sm:px-3 py-2 sm:py-3 sm:border-r-2 sm:border-[rgb(0,122,255)]/10",children:e.jsxs("div",{className:"flex items-center justify-center w-full",children:[i?e.jsx(F,{className:"w-3 h-3 animate-spin text-[rgb(142,142,147)]"}):g?e.jsxs("button",{onClick:()=>{r&&qe({company:t,pe:g,eps:c,price:r.price,currency:r.currency})},className:"group/cell inline-flex items-center gap-1 px-2 sm:px-2.5 py-1 rounded-lg text-[11px] sm:text-sm lg:text-base font-bold tabular-nums cursor-pointer transition-all duration-150 ring-1 ring-[rgb(0,122,255)]/25 bg-gradient-to-b from-[rgb(0,122,255)]/8 to-[rgb(0,122,255)]/15 text-[rgb(0,86,179)] dark:text-[rgb(10,132,255)] hover:ring-[rgb(0,122,255)]/60 hover:from-[rgb(0,122,255)]/15 hover:to-[rgb(0,122,255)]/25 hover:shadow-sm hover:-translate-y-px active:translate-y-0 active:scale-[0.97]",title:l==="de"?"Berechnung anzeigen":"Show calculation",children:[e.jsx("span",{children:g.toFixed(1)}),e.jsx(ee,{className:"w-3 h-3 opacity-50 group-hover/cell:opacity-100 transition-opacity",strokeWidth:2.25})]}):e.jsx("span",{className:"inline-block text-center text-[rgb(174,174,178)] text-[10px] min-w-[36px]",title:l==="de"?"Keine Daten verfügbar":"No data available",children:"â"}),j&&we&&e.jsx("span",{className:"ml-1 inline-flex items-center text-amber-500 dark:text-amber-400 cursor-help",title:jt,"aria-label":"PE divergence warning",children:e.jsx(ve,{className:"w-3.5 h-3.5",strokeWidth:2.5})}),j&&we&&Z&&o!=null&&e.jsxs("span",{className:"ml-1 text-[10px] sm:text-xs font-semibold tabular-nums text-amber-600 dark:text-amber-400",title:`TradingView: PE ${o.toFixed(2)}`,children:["TV ",o.toFixed(1)]})]})}),e.jsx(E,{className:"w-[68px] sm:hidden px-1 py-2",children:e.jsx("div",{className:"flex items-center justify-center w-full",children:(()=>{const x=r==null?void 0:r.dpsTTMEdgar,h=r==null?void 0:r.dpsTTMYahoo,f=(x&&h&&Math.abs(x-h)/Math.abs(h)>.1||x===null||x===void 0)&&h!==null&&h!==void 0?h:x??h??null;if(!(f!=null)||f===0)return e.jsx("span",{className:"block w-full text-center text-[11px] font-semibold text-[rgb(174,174,178)]",children:"â"});const G=r!=null&&r.price&&f>0?f/r.price*100:0;return!G||G<=0?e.jsx("span",{className:"block w-full text-center text-[11px] font-semibold text-[rgb(174,174,178)]",children:"â"}):e.jsxs("button",{onClick:()=>{r&&pe({company:t,divYield:G,dps:f,price:r.price,currency:r.currency})},className:"group/cell inline-flex items-center gap-1 px-1.5 py-1 rounded-lg text-[11px] font-bold tabular-nums cursor-pointer transition-all duration-150 ring-1 ring-[rgb(52,199,89)]/30 bg-gradient-to-b from-[rgb(52,199,89)]/8 to-[rgb(52,199,89)]/15 text-[rgb(20,140,60)] dark:text-[rgb(52,199,89)] hover:ring-[rgb(52,199,89)]/60 active:scale-95 whitespace-nowrap",title:l==="de"?"Berechnung anzeigen":"Show calculation",children:[e.jsxs("span",{children:[G.toFixed(1),"%"]}),e.jsx(ee,{className:"w-3 h-3 opacity-50 group-hover/cell:opacity-100 transition-opacity shrink-0",strokeWidth:2.25})]})})()})}),e.jsx(E,{className:"hidden sm:table-cell px-3 py-2 border-l-2 border-[rgb(52,199,89)]/10",children:e.jsx("div",{className:"flex items-center justify-center",children:(()=>
7{const x=r==null?void 0:r.dpsTTMEdgar,h=r==null?void 0:r.dpsTTMYahoo,A=x&&h&&Math.abs(x-h)/Math.abs(h)>.1||x===null||x===void 0,f=A&&h!==null&&h!==void 0?h:x??h??null,Ne=A&&h!==null&&h!==void 0;return!(f!=null)||f===0?e.jsx("span",{className:"inline-block text-[11px] lg:text-sm font-semibold text-[rgb(174,174,178)] min-w-[44px] text-center",children:"â"}):e.jsxs("button",{onClick:()=>je(t,Ne?"yahoo":"edgar"),title:l==="de"?"Berechnung anzeigen":"Show calculation",className:"group/cell inline-flex items-center gap-1 px-2.5 py-1 rounded-lg text-[11px] lg:text-sm font-semibold cursor-pointer transition-all duration-150 ring-1 ring-[rgb(52,199,89)]/25 bg-gradient-to-b from-[rgb(52,199,89)]/5 to-[rgb(52,199,89)]/12 text-[rgb(44,44,46)] dark:text-white hover:ring-[rgb(52,199,89)]/60 hover:from-[rgb(52,199,89)]/12 hover:to-[rgb(52,199,89)]/20 hover:shadow-sm hover:-translate-y-px active:translate-y-0 active:scale-[0.97]",children:[e.jsx("span",{children:U(f,r==null?void 0:r.currency)}),e.jsx(ee,{className:"w-3 h-3 opacity-40 group-hover/cell:opacity-90 transition-opacity",strokeWidth:2.25})]})})()})}),e.jsx(E,{className:"hidden sm:table-cell px-3 py-2 border-r-2 border-[rgb(52,199,89)]/10",children:e.jsx("div",{className:"flex items-center justify-center",children:(()=>{const x=r==null?void 0:r.dpsTTMEdgar,h=r==null?void 0:r.dpsTTMYahoo,f=(x&&h&&Math.abs(x-h)/Math.abs(h)>.1||x===null||x===void 0)&&h!==null&&h!==void 0?h:x??h??null;if(r!=null&&r.quarterlyDPS&&r.quarterlyDPS.length>0||r!=null&&r.quarterlyDPSYahoo&&r.quarterlyDPSYahoo.length>0,!(f!=null)||f===0)return e.jsx("span",{className:"inline-block text-center text-[12px] lg:text-sm font-semibold text-[rgb(174,174,178)] min-w-[36px]",children:"â"});const G=r!=null&&r.price&&f>0?f/r.price*100:0;return e.jsxs("button",{onClick:()=>{r&&pe({company:t,divYield:G,dps:f,price:r.price,currency:r.currency})},className:"group/cell inline-flex items-center gap-1 px-2.5 py-1 rounded-lg text-[12px] lg:text-sm font-bold tabular-nums cursor-pointer transition-all duration-150 ring-1 ring-[rgb(52,199,89)]/25 bg-gradient-to-b from-[rgb(52,199,89)]/8 to-[rgb(52,199,89)]/15 text-[rgb(30,140,60)] dark:text-[rgb(48,209,88)] hover:ring-[rgb(52,199,89)]/60 hover:from-[rgb(52,199,89)]/15 hover:to-[rgb(52,199,89)]/25 hover:shadow-sm hover:-translate-y-px active:translate-y-0 active:scale-[0.97]",title:l==="de"?"Berechnung anzeigen":"Show calculation",children:[e.jsxs("span",{children:[G.toFixed(1),"%"]}),e.jsx(ee,{className:"w-3 h-3 opacity-50 group-hover/cell:opacity-100 transition-opacity",strokeWidth:2.25})]})})()})}),e.jsx(E,{className:"hidden sm:table-cell px-3 py-2 border-l-2 border-[rgb(52,199,89)]/10",children:e.jsx("div",{className:"flex items-center justify-center",children:(()=>{const x=ze(t.ticker)||ze(xe[t.ticker]||"");return x?e.jsx(At,{to:`/stocks/${x}`,title:l==="de"?"Zur Unternehmensseite":"Open company page",className:"inline-flex items-center justify-center w-8 h-8 rounded-full bg-primary/10 text-primary hover:bg-primary hover:text-primary-foreground transition-colors",children:e.jsx(qt,{className:"w-4 h-4"})}):e.jsx("span",{className:"inline-block text-center text-[12px] lg:text-sm font-semibold text-[rgb(174,174,178)] min-w-[36px]",children:"NA"})})()})}),j&&e.jsxs(e.Fragment,{children:[(()=>{const x=r==null?void 0:r.epsTTM,h=r==null?void 0:r.yahooEpsTTM,C=x!=null&&h!=null&&Math.abs(h)>0&&Math.abs(x-h)/Math.abs(h)>.05,A=C?`Edgar: ${x.toFixed(2)} 8Yahoo: ${h.toFixed(2)} 9Abweichung >5%`:"";return e.jsxs(e.Fragment,{children:[e.jsx(E,{className:"hidden lg:table-cell px-2 py-2",children:e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[r!=null&&r.epsTTM?e.jsx("button",{onClick:()=>ye(t,"edgar"),className:"px-1.5 py-0.5 rounded text-[9px] font-medium text-[rgb(72,72,74)] dark:text-[rgb(174,174,178)] bg-[rgb(245,245,247)] dark:bg-[rgb(58,58,60)] hover:bg-[rgb(229,229,234)] dark:hover:bg-[rgb(72,72,74)] cursor-pointer",children:U(r.epsTTM,r==null?void 0:r.currency)}):e.jsx("span",{className:"inline-block text-center text-[rgb(174,174,178)] text-[8px] min-w-[24px]",children:"â"}),C&&e.jsx("span",{title:A,"aria-label":"EPS divergence",className:"text-amber-500 dark:text-amber-400 cursor-help",children:e.jsx(ve,{className:"w-3 h-3",strokeWidth:2.5})})]})}),e.jsx(E,{className:"hidden lg:table-cell px-2 py-2",children:e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[r!=null&&r.yahooEpsTTM?e.jsx("button",{onClick:()=>ye(t,"yahoo"),className:"px-1.5 py-0.5 rounded text-[9px] font-medium text-[rgb(72,72,74)] dark:text-[rgb(174,174,178)] bg-[rgb(245,245,247)] dark:bg-[rgb(58,58,60)] hover:bg-[rgb(229,229,234)] dark:hover:bg-[rgb(72,72,74)] cursor-pointer",children:U(r.yahooEpsTTM,r==null?void 0:r.currency)}):e.jsx("span",{className:"inline-block text-center text-[rgb(174,174,178)] text-[8px] min-w-[24px]",children:"â"}),C&&e.jsx("span",{title:A,"aria-label":"EPS divergence",className:"text-amber-500 dark:text-amber-400 cursor-help",children:e.jsx(ve,{className:"w-3 h-3",strokeWidth:2.5})})]})})]})})(),e.jsx(E,{className:"hidden lg:table-cell px-2 py-2",children:e.jsx("div",{className:"flex items-center justify-center",children:r!=null&&r.dpsTTMEdgar?e.jsx("button",{onClick:()=>je(t,"edgar"),className:"px-1.5 py-0.5 rounded text-[9px] font-medium text-[rgb(72,72,74)] dark:text-[rgb(174,174,178)] bg-[rgb(245,245,247)] dark:bg-[rgb(58,58,60)] hover:bg-[rgb(229,229,234)] dark:hover:bg-[rgb(72,72,74)] cursor-pointer",children:U(r.dpsTTMEdgar,r==null?void 0:r.currency)}):e.jsx("span",{className:"inline-block text-center text-[rgb(174,174,178)] text-[8px] min-w-[24px]",children:"â"})})}),e.jsx(E,{className:"hidden lg:table-cell px-2 py-2",children:e.jsx("div",{className:"flex items-center justify-center",children:r!=null&&r.dpsTTMYahoo?e.jsx("button",{onClick:()=>je(t,"yahoo"),className:"px-1.5 py-0.5 rounded text-[9px] font-medium text-[rgb(72,72,74)] dark:text-[rgb(174,174,178)] bg-[rgb(245,245,247)] dark:bg-[rgb(58,58,60)] hover:bg-[rgb(229,229,234)] dark:hover:bg-[rgb(72,72,74)] cursor-pointer",children:U(r.dpsTTMYahoo,r==null?void 0:r.currency)}):e.jsx("span",{className:"inline-block text-center text-[rgb(174,174,178)] text-[8px] min-w-[24px]",children:"â"})})})]})]},t.id)})})]})})})}):e.jsx("div",{className:"text-center py-8 text-[rgb(142,142,147)]",children:l==="de"?"Keine Daten verfügbar":"No data available"}),j&&m&&m.length>0&&e.jsx("div",{className:"flex justify-center mt-2 mb-6",children:e.jsxs(X,{variant:"outline",size:"sm",className:"gap-2 text-xs sm:text-sm",onClick:()=>{const t=m.map(r=>
9{const i=M.get(r.ticker),d=(i==null?void 0:i.price)||0,c=i==null?void 0:i.epsTTM,b=i==null?void 0:i.yahooEpsTTM,g=c??b??null,w=g&&g>0&&d>0?d/g:null,o=i==null?void 0:i.dpsTTMEdgar,k=i==null?void 0:i.dpsTTMYahoo,T=o??k??null,p=T&&T>0&&d>0?T/d*100:null;return{Ticker:K(r.ticker),[l==="de"?"Unternehmen":"Company"]:r.name,[l==="de"?"MarktKap (Mrd $)":"MarketCap (B $)"]:r.market_cap_value>=1e12?(r.market_cap_value/1e12).toFixed(2):(r.market_cap_value/1e9).toFixed(0),"PE TTM":w?w.toFixed(1):"N/A",[l==="de"?"Div. Rendite TTM (%)":"Div. Yield TTM (%)"]:p?p.toFixed(2):"N/A"}}),s=Se.json_to_sheet(t);s["!cols"]=[{wch:10},{wch:30},{wch:18},{wch:10},{wch:20}];const n=Se.book_new();Se.book_append_sheet(n,s,"Valuation Data");const a=l==="de"?`Bewertungsdaten_Top100_${new Date().toISOString().split("T")[0]}.xlsx`:`Valuation_Top100_${new Date().toISOString().split("T")[0]}.xlsx`;Ut(n,a),y.success(l==="de"?"Excel-Datei heruntergeladen":"Excel file downloaded")},children:[e.jsx($t,{className:"w-4 h-4"}),l==="de"?"Excel herunterladen":"Download Excel"]})}),e.jsx(de,{open:!!q,onOpenChange:t=>!t&&ke(null),children:e.jsxs(ce,{className:"max-w-md bg-white dark:bg-[rgb(44,44,46)] border-[rgb(229,229,234)] dark:border-[rgb(58,58,60)] rounded-2xl",children:[e.jsx(He,{children:e.jsxs(Je,{className:"text-lg font-semibold text-[rgb(44,44,46)] dark:text-white",children:[l==="de"?"EPS Quartalsübersicht":"Quarterly EPS Overview"," â ",q==null?void 0:q.name," (",q==null?void 0:q.ticker,")"]})}),q&&$&&e.jsxs("div",{className:"bg-[rgb(250,250,252)] dark:bg-[rgb(38,38,40)] border border-[rgb(229,229,234)] dark:border-[rgb(58,58,60)] rounded-xl p-4",children:[e.jsxs("div",{className:"bg-white dark:bg-[rgb(44,44,46)] p-3 rounded-xl border border-[rgb(229,229,234)] dark:border-[rgb(58,58,60)] mb-4",children:[e.jsxs("p",{className:"text-xs font-medium text-[rgb(142,142,147)] mb-1",children:["EPS ",e.jsx("span",{className:"bg-[rgb(0,122,255)] text-white px-1.5 py-0.5 rounded text-[10px] font-semibold",children:"TTM"}),e.jsx("span",{className:"ml-2 text-[9px] font-normal",children:"(Diluted)"}),e.jsx("span",{className:"ml-2 px-1.5 py-0.5 rounded text-[9px] font-medium bg-[rgb(245,245,247)] dark:bg-[rgb(58,58,60)] text-[rgb(72,72,74)] dark:text-[rgb(174,174,178)]",children:he==="yahoo"?"Fallback Data":"EDGAR"})]}),e.jsx("p",{className:"text-xl font-semibold text-[rgb(0,122,255)]",children:U(he==="yahoo"?$.yahooEpsTTM:$.epsTTM,$.currency)}),e.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:l==="de"?"Berechnet aus den letzten 4 Quartalen":"Calculated from last 4 quarters"})]}),e.jsx("h4",{className:"text-sm font-semibold mb-3 text-[rgb(99,99,102)] dark:text-[rgb(174,174,178)]",children:l==="de"?"Quartals-EPS (Diluted)":"Quarterly EPS (Diluted)"}),e.jsx("div",{className:"space-y-2",children:rt?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(F,{className:"w-6 h-6 animate-spin text-[rgb(142,142,147)]"})}):(()=>{const t=he==="yahoo"?$.quarterlyEPSYahoo:$.quarterlyEPS;return!t||t.length===0?e.jsx("div",{className:"text-center py-4 text-muted-foreground text-sm",children:l==="de"?"Keine Quartalsdaten verfügbar":"No quarterly data available"}):[...t].sort((s,n)=>new Date(n.endDate).getTime()-new Date(s.endDate).getTime()).slice(0,4).map((s,n,a)=>{const r=a[n+1],i=r&&r.eps!==0?(s.eps-r.eps)/Math.abs(r.eps)*100:null,d=t.find(b=>b.quarter===s.quarter&&b.fiscalYear===s.fiscalYear-1),c=d&&d.eps!==0?(s.eps-d.eps)/Math.abs(d.eps)*100:null;return e.jsxs("div",{className:"bg-white dark:bg-[rgb(44,44,46)] p-2 md:p-3 rounded border border-[rgb(229,229,234)] dark:border-[rgb(58,58,60)]",children:[e.jsx("div",{className:"flex items-center justify-between mb-1",children:e.jsxs("p",{className:"text-[10px] md:text-xs font-semibold text-muted-foreground",children:[l==="de"?"Quartalsende":"Quarter Ended",": ",Ke(s.endDate)]})}),e.jsxs("div",{className:"flex items-center justify-between gap-2 flex-nowrap",children:[e.jsx("p",{className:`text-sm md:text-lg font-bold whitespace-nowrap ${s.eps>=0?"":"text-red-600"}`,children:U(s.eps,$==null?void 0:$.currency)}),e.jsxs("div",{className:"flex flex-col items-end gap-0.5 shrink-0",children:[c!==null&&isFinite(c)&&e.jsxs("p",{className:`text-[10px] md:text-sm font-bold whitespace-nowrap ${c>=0?"text-green-600":"text-red-600"}`,children:["YoY: ",c>=0?"â":"â"," ",Math.abs(c).toFixed(1),"%"]}),i!==null&&isFinite(i)&&e.jsxs("p",{className:`text-[9px] md:text-xs font-semibold whitespace-nowrap ${i>=0?"text-blue-600":"text-orange-600"}`,children:["QoQ: ",i>=0?"â":"â"," ",Math.abs(i).toFixed(1),"%"]})]})]})]},n)})})()}),e.jsx("div",{className:"mt-3 pt-3 border-t border-border text-[10px] sm:text-xs text-muted-foreground",children:e.jsx("p",{children:l==="de"?"YoY = Wachstum gegenüber Vorjahresquartal | QoQ = Wachstum gegenüber Vorquartal":"YoY = year-over-year growth | QoQ = quarter-over-quarter growth"})})]})]})}),e.jsx(de,{open:!!R,onOpenChange:t=>!t&&Le(null),children:e.jsxs(ce,{className:"max-w-md",children:[e.jsx(He,{children:e.jsxs(Je,{className:"text-lg font-bold",children:[l==="de"?"DPS Quartalsübersicht":"Quarterly DPS Overview"," â ",R==null?void 0:R.name,"
9(",R==null?void 0:R.ticker,")"]})}),R&&_&&e.jsxs("div",{className:"bg-[rgb(240,247,255)] dark:bg-[rgb(20,40,60)] border-[rgb(180,210,240)] dark:border-[rgb(60,100,140)] border rounded-lg p-4",children:[e.jsxs("div",{className:"bg-[rgb(220,235,250)] dark:bg-[rgb(30,60,90)] border-[rgb(150,190,230)] dark:border-[rgb(80,120,160)] p-3 rounded-lg border-2 mb-4",children:[e.jsxs("p",{className:"text-xs font-semibold text-[rgb(0,80,160)] dark:text-[rgb(140,180,220)] mb-1",children:["DPS ",e.jsx("span",{className:"bg-[rgb(0,122,255)] text-white px-1.5 py-0.5 rounded text-[10px] font-bold",children:"TTM"}),e.jsx("span",{className:"ml-2 px-1.5 py-0.5 rounded text-[9px] font-bold bg-[rgb(180,210,240)] dark:bg-[rgb(60,100,140)] text-[rgb(0,80,160)] dark:text-[rgb(180,210,240)]",children:"Fallback"})]}),e.jsx("p",{className:"text-xl font-bold text-[rgb(0,100,200)] dark:text-[rgb(140,190,240)]",children:U(_.dpsTTMYahoo,_.currency)}),_.price&&e.jsxs("p",{className:"text-[10px] text-muted-foreground mt-1",children:[l==="de"?"Dividendenrendite":"Dividend Yield",": ",((_.dpsTTMYahoo||0)/_.price*100).toFixed(2),"%"]}),(()=>{const t=_.quarterlyDPSYahoo;if(!t||t.length===0)return null;const s=new Date;s.setFullYear(s.getFullYear()-1);const n=t.filter(r=>new Date(r.endDate)>=s).length;let a="";return n>=4?a=l==="de"?"Quartalsdividende":"Quarterly dividend":n>=2?a=l==="de"?"Halbjährliche Dividende":"Semi-annual dividend":n>=1&&(a=l==="de"?"Jährliche Dividende":"Annual dividend"),a?e.jsxs("p",{className:"text-[10px] text-muted-foreground mt-0.5 italic",children:[a," (",n,"x / ",l==="de"?"Jahr":"year",")"]}):null})()]}),e.jsx("h4",{className:"text-sm font-semibold mb-3 text-[rgb(0,100,200)] dark:text-[rgb(140,190,240)]",children:l==="de"?"Dividendenzahlungen":"Dividend Payments"}),e.jsx("div",{className:"space-y-2",children:(()=>{const t=_.quarterlyDPSYahoo;if(!t||t.length===0)return e.jsx("div",{className:"text-center py-4 text-muted-foreground text-sm",children:l==="de"?"Keine Quartalsdaten verfügbar":"No quarterly data available"});const s=[...t].map(d=>new Date(d.endDate).getTime()).sort((d,c)=>c-d);let n=3;if(s.length>=2){const d=[];for(let c=0;c<Math.min(s.length-1,4);c++){const g=(s[c]-s[c+1])/(1e3*60*60*24*30);d.push(g)}n=d.reduce((c,b)=>c+b,0)/d.length}const a=n<5,r=n>=5&&n<9,i=n>=9;return[...t].sort((d,c)=>new Date(c.endDate).getTime()-new Date(d.endDate).getTime()).slice(0,4).map((d,c,b)=>{const g=d.dps??d.eps??0;let w=null;if(a){const T=b[c+1],p=T?T.dps??T.eps??0:0;w=T&&p!==0?(g-p)/Math.abs(p)*100:null}let o=null;if(a){const T=t.find(D=>D.quarter===d.quarter&&D.fiscalYear===d.fiscalYear-1),p=T?T.dps??T.eps??0:0;o=T&&p!==0?(g-p)/Math.abs(p)*100:null}let k="";return i?k=l==="de"?"Jahresende":"Year Ended":r?k=l==="de"?"Halbjahresende":"Half-Year Ended":k=l==="de"?"Quartalsende":"Quarter Ended",e.jsxs("div",{className:"bg-white dark:bg-[rgb(44,44,46)] p-2 md:p-3 rounded border border-[rgb(180,210,240)] dark:border-[rgb(60,100,140)]",children:[e.jsx("div",{className:"flex items-center justify-between mb-1",children:e.jsxs("p",{className:"text-[10px] md:text-xs font-semibold text-muted-foreground",children:[k,": ",Ke(d.endDate)]})}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-sm md:text-lg font-bold",children:U(g,_==null?void 0:_.currency)}),a&&e.jsxs("div",{className:"flex flex-col items-end gap-0.5",children:[o!==null&&isFinite(o)&&e.jsxs("p",{className:`text-[10px] md:text-sm font-bold ${o>=0?"text-green-600":"text-red-600"}`,children:["YoY: ",o>=0?"â":"â"," ",Math.abs(o).toFixed(1),"%"]}),w!==null&&isFinite(w)&&e.jsxs("p",{className:`text-[9px] md:text-xs font-semibold ${w>=0?"text-blue-600":"text-orange-600"}`,children:["QoQ: ",w>=0?"â":"â"," ",Math.abs(w).toFixed(1),"%"]})]})]})]},c)})})()})]})]})}),e.jsx(de,{open:!!N,onOpenChange:t=>!t&&qe(null),children:e.jsx(ce,{className:"max-w-[90vw] w-[320px] p-0 overflow-hidden pt-8",children:N&&e.jsxs("div",{className:"bg-gradient-to-br from-[rgb(248,248,250)] to-[rgb(240,240,245)] dark:from-[rgb(38,38,40)] dark:to-[rgb(28,28,30)]",children:[e.jsxs("div",{className:"bg-[rgb(142,142,147)] dark:bg-[rgb(99,99,102)] px-4 py-3 mt-2",children:[e.jsx("h3",{className:"text-white font-bold text-base truncate pr-6",children:N.company.name}),e.jsx("p",{className:"text-[rgb(210,210,215)] text-sm",children:N.company.ticker})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-xs text-[rgb(99,99,102)] dark:text-[rgb(174,174,178)] font-medium mb-1",children:l==="de"?"Kurs-Gewinn-Verhältnis":"Price-to-Earnings Ratio"}),e.jsx("p",{className:"text-4xl font-bold text-[rgb(44,44,46)] dark:text-white",children:N.pe.toFixed(1)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-white dark:bg-[rgb(44,44,46)] rounded-lg p-3 text-center border border-[rgb(229,229,234)] dark:border-[rgb(58,58,60)]",children:[e.jsx("p",{className:"text-[10px] text-muted-foreground mb-0.5",children:l==="de"?"Kurs":"Price"}),e.jsx("p",{className:"text-lg font-bold",children:ae(N.price,N.currency)})]}),e.jsxs("div",{className:"bg-white dark:bg-[rgb(44,44,46)] rounded-lg p-3 text-center border border-[rgb(229,229,234)] dark:border-[rgb(58,58,60)]",children:[e.jsx("p",{className:"text-[10px] text-muted-foreground mb-0.5",children:"EPS TTM"}),e.jsx("p",{className:"text-lg font-bold",children:ae(N.eps,N.currency)})]})]}),e.jsxs("div",{className:"bg-[rgb(245,245,247)] dark:bg-[rgb(58,58,60)] rounded-lg p-3 text-center",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:["PE = ",l==="de"?"Kurs":"Price"," ÷ EPS TTM"]}),e.jsxs("p",{className:"text-sm font-mono mt-1",children:[N.price>
9=1e3?Math.round(N.price).toLocaleString():N.price.toFixed(2)," ÷ ",N.eps>=1e3?Math.round(N.eps).toLocaleString():N.eps.toFixed(2)," = ",e.jsx("span",{className:"font-bold text-[rgb(44,44,46)] dark:text-white",children:N.pe.toFixed(1)})]})]})]})]})})}),e.jsx(de,{open:!!v,onOpenChange:t=>!t&&pe(null),children:e.jsx(ce,{className:"max-w-[90vw] w-[320px] p-0 overflow-hidden pt-8",children:v&&e.jsxs("div",{className:"bg-gradient-to-br from-[rgb(240,248,255)] to-[rgb(225,240,255)] dark:from-[rgb(20,40,60)] dark:to-[rgb(10,30,50)]",children:[e.jsxs("div",{className:"bg-[rgb(0,122,255)] dark:bg-[rgb(10,80,160)] px-4 py-3 mt-2",children:[e.jsx("h3",{className:"text-white font-bold text-base truncate pr-6",children:v.company.name}),e.jsx("p",{className:"text-[rgb(180,210,240)] text-sm",children:v.company.ticker})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-xs text-[rgb(0,100,200)] dark:text-[rgb(140,190,240)] font-medium mb-1",children:l==="de"?"Dividendenrendite":"Dividend Yield"}),e.jsxs("p",{className:"text-4xl font-bold text-[rgb(0,80,160)] dark:text-[rgb(180,210,240)]",children:[v.divYield.toFixed(2),"%"]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-white dark:bg-[rgb(44,44,46)] rounded-lg p-3 text-center border border-[rgb(180,210,240)] dark:border-[rgb(60,100,140)]",children:[e.jsx("p",{className:"text-[10px] text-muted-foreground mb-0.5",children:"DPS TTM"}),e.jsx("p",{className:"text-lg font-bold",children:ae(v.dps,v.currency)})]}),e.jsxs("div",{className:"bg-white dark:bg-[rgb(44,44,46)] rounded-lg p-3 text-center border border-[rgb(180,210,240)] dark:border-[rgb(60,100,140)]",children:[e.jsx("p",{className:"text-[10px] text-muted-foreground mb-0.5",children:l==="de"?"Kurs":"Price"}),e.jsx("p",{className:"text-lg font-bold",children:ae(v.price,v.currency)})]})]}),e.jsxs("div",{className:"bg-[rgb(230,242,255)] dark:bg-[rgb(30,60,90)] rounded-lg p-3 text-center",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:["DivYield = DPS TTM ÷ ",l==="de"?"Kurs":"Price"]}),e.jsxs("p",{className:"text-sm font-mono mt-1",children:[v.dps>=1e3?Math.round(v.dps).toLocaleString():v.dps.toFixed(2)," ÷ ",v.price>=1e3?Math.round(v.price).toLocaleString():v.price.toFixed(2)," = ",e.jsxs("span",{className:"font-bold text-[rgb(0,100,200)] dark:text-[rgb(140,190,240)]",children:[v.divYield.toFixed(2),"%"]})]})]})]})]})})})]})}export{er 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.