PageSourceSearch

https://ssicevs.com/assets/MarketSnapshotCard-aLyFKCDg.js

js ssicevs.com collected 2026-10-08 04:53:10 UTC 4,460 bytes, 1 lines download raw bytes

1import{r as x,j as e}from"./metal-fx-C6GZ_SKA.js";import{S as P,H as m,e as y,h as p,T as b,b as u,E as U}from"./shared-OtDZU4QY.js";import{fm as W,c as I,eT as j}from"./index-D1yBc__G.js";import"./motion-BHwmuFpx.js";const v=["1D","1W","1M","3M","YTD","1Y","All"],E=[178.52,176.84,180.15,181.42,179.96,184.22,187.61,190.04,188.72,194.85,202.14,198.93,211.75,224.68,219.42,236.18,248.06,243.44,268.31,284.12,276.88,301.45],h=320,i=150;function Y(){const N=W(),M=x.useRef(null),[o,T]=x.useState("All"),[c,f]=x.useState(null),S=Math.max(7,Math.round(E.length*((v.indexOf(o)+1)/v.length))),s=x.useMemo(()=>E.slice(-S),[S]),A=Math.min(...s)*.97,F=Math.max(...s)*1.02,r=t=>8+t/(s.length-1)*(h-16),D=t=>8+(1-(t-A)/(F-A||1))*(i-18),L=s.map((t,n)=>`${n?"L":"M"}${r(n).toFixed(1)} ${D(t).toFixed(1)}`).join(" "),a=c??s.length-1,l=s[a],g=l-s[0],k=g/s[0]*100,R=t=>{var d;const n=(d=M.current)==null?void 0:d.getBoundingClientRect();n&&f(Math.max(0,Math.min(s.length-1,Math.round((t.clientX-n.left)/n.width*(s.length-1)))))},$={"1D":1,"1W":7,"1M":30,"3M":90,YTD:210,"1Y":365,All:660},C=t=>{const n=new Date(2026,6,29,16,0),d=(s.length-1-t)/(s.length-1)*($[o]??660),w=new Date(n.getTime()-d*864e5);return o==="1D"?w.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}):w.toLocaleDateString("en-US",{month:"short",day:"numeric",year:o==="All"||o==="1Y"?"2-digit":void 0})};return e.jsxs("div",{className:"w-full max-w-[340px] overflow-hidden rounded-lg border",style:{background:y,borderColor:m,fontFamily:P},children:[e.jsxs("div",{className:"flex items-start justify-between px-5 pb-2 pt-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-medium",style:{color:p},children:"Amazon.com Inc."}),e.jsxs("div",{className:"mt-1.5 flex flex-wrap items-baseline gap-x-2 gap-y-1 tabular-nums",children:[e.jsx(I,{mode:"popLayout",initial:!1,children:e.jsxs(j.span,{className:"text-[22px] font-semibold tracking-[-0.035em]",style:{color:b},initial:N?!1:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0},transition:{duration:.18},children:["$",l.toFixed(2)]},l.toFixed(2))}),e.jsxs("span",{className:"text-[11px] font-semibold",style:{color:u.green},children:[g>=0?"+":"",g.toFixed(2)," (",k>=0?"+":"",k.toFixed(2),"%)"]})]})]}),e.jsx("span",{className:"text-[12px] font-semibold",style:{color:b},children:"AMZN"})]}),e.jsxs("div",{className:"relative px-3",children:[e.jsxs("svg",{ref:M,viewBox:`0 0 ${h} ${i}`,className:"w-full touch-none",onPointerMove:R,onPointerLeave:()=>f(null),role:"img","aria-label":`Amazon price ${l.toFixed(2)} dollars over ${o}`,children:[[.33,.66].map(t=>e.jsx("line",{x1:"8",x2:h-8,y1:8+t*(i-18),y2:8+t*(i-18),stroke:m,strokeDasharray:"2 5"},t)),e.jsx(j.path,{d:L,fill:"none",stroke:u.green,strokeWidth:"1.8",strokeLinecap:"round",initial:N?!1:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1},transition:{duration:.65,ease:U}},o),c!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:r(a),x2:r(a),y1:"8",y2:i-10,stroke:"color-mix(in srgb, var(--foreground) 16%, transparent)"}),e.jsx("circle",{cx:r(a),cy:D(l),r:"3",fill:u.green,stroke:y,strokeWidth:"1.5"})]})]}),c!=null&&e.jsx("div",{className:"pointer-events-none absolute top-0 z-10 -translate-x-1/2 whitespace-nowrap rounded-md border px-1.5 py-0.5 text-[9px] tabular-nums",style:{left:`${(r(a)/h*100).toFixed(1)}%`,background:y,borderColor:m,color:p,boxShadow:"0 6px 18px rgba(0,0,0,0.35)"},role:"status",children:C(a)})]}),e.jsxs("div",{className:"border-t px-4 pb-4 pt-3",style:{borderColor:m},children:[e.jsx("div",{className:"flex items-center justify-between gap-1",children:v.map(t=>{const n=t===o;return e.jsxs("button",{type:"button",onClick:()=>{T(t),f(null)},className:"relative rounded-md px-2 py-1.5 text-[10px] font-semibold transition-colors",style:{color:n?b:p,background:n?"color-mix(in srgb, var(--foreground) 5.5%, transparent)":"transparent"},children:[t,n&&e.jsx(j.span,{layoutId:"msnap-period-tab",className:"absolute inset-x-1.5 -bottom-[5px] h-[3px] rounded-t-full",style:{background:u.green},transition:{type:"spring",stiffness:400,damping:34}})]},t)})}),e.jsxs("div",{className:"mt-3 flex items-center justify-between text-[10px] tabular-nums",style:{color:p},children:[e.jsx("span",{children:"Updated 1:54 PM"}),e.jsx("span",{children:"NASDAQ · USD"})]})]})]})}function B(){return e.jsx("div",{className:"flex min-h-[420px] w-full items-center justify-center p-4",children:e.jsx(Y,{})})}
1export{B as Demo,Y 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.