1import{j as t}from"./vendor-query-Ced1gGr8.js";import{S as x}from"./SEOHead-9DHwQbfo.js";import{p,D as b}from"./useDataHub-CFie_JCq.js";import{g as f}from"./datahub-pages-ByZWTSHV.js";import{d as g,N as j,L as m}from"./vendor-react-e7KWTrIa.js";import{C as v}from"./chevron-left-CQ9bLWKb.js";import{F as N}from"./file-text-BTB5DgRb.js";import{A as y}from"./arrow-right-LsfPKogL.js";import"./index-C6BJ2JaW.js";import"./footer-OSlZabWI.js";import"./button-C2rnlcGU.js";import"./collapsible-_YkUyPDN.js";import"./breadcrumb-CD7C9A_C.js";import"./chevron-right-D7qSKA7E.js";function A(a){const e=new Date(`${a}T00:00:00Z`);return Number.isNaN(e.getTime())?a:e.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",timeZone:"UTC"})}function w(a){return a.reduce((e,i)=>{const s=i.snapshot_date.slice(0,4);return(e[s]||(e[s]=[])).push(i),e},{})}function R(){const{slug:a}=g(),e=f(a),{data:i,isLoading:s}=p(a||"");if(!e)return t.jsx(j,{to:"/data",replace:!0});const n=i?w(i):{},l=Object.keys(n).sort().reverse(),c=`/data/${e.slug}/archive`,h=`${e.title} â Analysis Archive`,u=`Historical analytical summaries of ${e.title.toLowerCase()} from the AlphaLoops FMCSA Data Hub. Each snapshot is dated and citable.`;return t.jsxs(t.Fragment,{children:[t.jsx(x,{title:h,description:u,canonical:c}),t.jsx(b,{title:`${e.title} â Analysis Archive`,subtitle:"Each snapshot captures the data and interpretation as of its publication date.",breadcrumbs:[{label:"Data Hub",to:"/data"},{label:e.title,to:e.path},{label:"Archive"}],children:t.jsxs("div",{className:"max-w-3xl mx-auto",children:[t.jsxs(m,{to:e.path,className:"inline-flex items-center gap-1.5 text-sm text-datahub-text-muted hover:text-datahub-text-secondary transition-colors mb-8",children:[t.jsx(v,{className:"h-4 w-4"}),"Back to ",e.title]}),s&&t.jsx("div",{className:"space-y-3",children:Array.from({length:4}).map((o,r)=>t.jsx("div",{className:"h-16 rounded-lg bg-datahub-surface-alt dh-skeleton"},r))}),!s&&l.length===0&&t.jsxs("div",{className:"rounded-xl border border-datahub-border bg-datahub-surface-alt p-12 text-center",children:[t.jsx(N,{className:"h-10 w-10 text-datahub-text-muted mx-auto mb-4"}),t.jsx("p",{className:"text-datahub-text-secondary",children:"No historical analyses yet. The first snapshot will appear here after the next scheduled run."})]}),!s&&l.map(o=>t.jsxs("section",{className:"mb-10",children:[t.jsx("h2",{className:"text-sm font-medium text-datahub-text-muted uppercase tracking-wider mb-4",children:o}),t.jsx("ul",{className:"space-y-2",children:n[o].map(r=>{var d;return t.jsx("li",{children:t.jsxs(m,{to:`/data/${e.slug}/archive/${r.snapshot_date}`,className:"flex items-center justify-between gap-4 rounded-lg border border-datahub-border bg-datahub-surface-alt px-5 py-4 hover:border-datahub-primary/50 hover:bg-datahub-surface transition-all group",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:"text-datahub-text-primary font-medium",children:A(r.snapshot_date)}),t.jsxs("div",{className:"text-xs text-datahub-text-muted mt-0.5",children:["Data through ",((d=r.data_as_of)==null?void 0:d.slice(0,10))||r.snapshot_date]})]}),t.jsx(y,{className:"h-4 w-4 text-datahub-text-muted group-hover:text-datahub-primary group-hover:translate-x-0.5 transition-all flex-shrink-0"})]})},r.story_slug)})})]},o))]})})]})}export{R 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.