PageSourceSearch

https://heynyle.replit.app/assets/SecurityNews-CB_pVMY2.js

js heynyle.replit.app collected 2026-10-03 03:54:46 UTC 30,898 bytes, 1 lines download raw bytes

1import{f as oe,g as x,s as U,n as X,i as ce,h as de,t as he,k as F,l as ue,m as me,o as z,p as Z,r as c,q,v as fe,j as e,L as pe}from"./index-CZ5NxYsP.js";import{F as ve}from"./Footer-CypxQkB1.js";var xe=class extends oe{#t;#e=void 0;#m=void 0;#s=void 0;#r;#c;#a;#f;#d;#h;#n;#l;#i;#u=new Set;constructor(t,s){super(),this.options=s,this.#t=t,this.#a=null,this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),K(this.#e,this.options)?this.#o():this.updateResult(),this.#j())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#y(),this.#e.removeObserver(this)}setOptions(t){const s=this.options,a=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof x(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#e.setOptions(this.options),s._defaulted&&!U(this.options,s)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const i=this.hasListeners();i&&J(this.#e,a,this.options,s)&&this.#o(),this.updateResult(),i&&(this.#e!==a||x(this.options.enabled,this.#e)!==x(s.enabled,this.#e)||x(this.options.staleTime,this.#e)!==x(s.staleTime,this.#e))&&this.#v();const l=this.#x();i&&(this.#e!==a||x(this.options.enabled,this.#e)!==x(s.enabled,this.#e)||l!==this.#i)&&this.#b(l)}getOptimisticResult(t){const s=this.#t.getQueryCache().build(this.#t,t),a=this.createResult(s,t);return U(this.getCurrentResult(),a)||(this.#s=a,this.#c=this.options,this.#r=this.#e.state),a}getCurrentResult(){return this.#s}trackResult(t,s){return new Proxy(t,{get:(a,i)=>(this.trackProp(i),s?.(i),Reflect.get(a,i))})}trackProp(t){this.#u.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=this.#t.defaultQueryOptions(t),a=this.#t.getQueryCache().build(this.#t,s);let i=()=>{},l;const h=new Promise(n=>{l=n,i=this.#t.getQueryCache().subscribe(p=>{p.type==="updated"&&p.query.queryHash===a.queryHash&&a.state.data!==void 0&&(i(),n(this.createResult(a,s)))})});return Promise.race([a.fetch().then(()=>{const n=this.createResult(a,s);return l?.(n),n}).finally(()=>{i()}),h])}fetch(t){return this.#o({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#o(t){this.#N();let s=this.#e.fetch(this.options,t);return t?.throwOnError||(s=s.catch(X)),s}#p(t){return!ce()&&x(this.options.enabled,this.#e)!==!1&&de(t)}#v(){this.#g();const t=x(this.options.staleTime,this.#e);if(this.#s.isStale||!this.#p(t))return;const s=he(this.#s.dataUpdatedAt,t)+1;this.#n=F.setTimeout(()=>{this.#s.isStale||this.updateResult()},s)}#x(){return x(this.options.refetchInterval,this.#e)??!1}#b(t){this.#y(),this.#i=t,!(this.#i===0||!this.#p(this.#i))&&(this.#l=F.setInterval(()=>{(this.options.refetchIntervalInBackground||ue.isFocused())&&this.#o()},this.#i))}#j(){this.#v(),this.#b(this.#x())}#g(){this.#n!==void 0&&(F.clearTimeout(this.#n),this.#n=void 0)}#y(){this.#l!==void 0&&(F.clearInterval(this.#l),this.#l=void 0)}createResult(t,s){const a=this.#e,i=this.options,l=this.#s,h=this.#r,n=this.#c,p=t!==a?t.state:this.#m,{state:f}=t;let d={...f},o=!1,u;if(s._optimisticResults){const b=this.hasListeners(),k=!b&&K(t,s),I=b&&J(t,a,s,i);(k||I)&&(d={...d,...me(f.data,t.options)}),s._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:C,errorUpdatedAt:E,status:g}=d;u=d.data;let O=!1;if(s.placeholderData!==void 0&&u===void 0&&g==="pending"){let b;l?.isPlaceholderData&&s.placeholderData===n?.placeholderData?(b=l.data,O=!0):b=typeof s.placeholderData=="function"?s.placeholderData(this.#h?.state.data,this.#h):s.placeholderData,b!==void 0&&(g="success",u=z(l?.data,b,s),o=!0)}if(s.select&&u!==void 0&&!O)if(l&&u===h?.data&&s.select===this.#f)u=this.#d;else try{this.#f=s.select,u=s.select(u),u=z(l?.data,u,s),this.#d=u,this.#a=null}catch(b){this.#a=b}else u===void 0&&(this.#a=null);this.#a&&(C=this.#a,u=this.#d,E=Date.now(),g="error",o=!1);const y=d.fetchStatus==="fetching",S=g==="pending",R=g==="error",w=S&&y,T=u!==void 0;return{status:g,fetchStatus:d.fetchStatus,isPending:S,isSuccess:g==="success",isError:R,isInitialLoading:w,isLoading:w,data:u,dataUpdatedAt:d.dataUpdatedAt,error:C,errorUpdatedAt:E,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdate
1Count:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>p.dataUpdateCount||d.errorUpdateCount>p.errorUpdateCount,isFetching:y,isRefetching:y&&!S,isLoadingError:R&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:o,isRefetchError:R&&T,isStale:V(t,s),refetch:this.refetch,isEnabled:x(s.enabled,t)!==!1}}updateResult(){const t=this.#s,s=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#c=this.options,this.#r.data!==void 0&&(this.#h=this.#e),U(s,t))return;this.#s=s;const i=(()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,h=typeof l=="function"?l():l;if(h==="all"||!h&&!this.#u.size)return!0;const n=new Set(h??this.#u);return this.options.throwOnError&&n.add("error"),Object.keys(this.#s).some(p=>{const f=p;return this.#s[f]!==t[f]&&n.has(f)})})();Z.batch(()=>{i&&this.listeners.forEach(l=>{l(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}#N(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const s=this.#e;this.#e=t,this.#m=t.state,this.hasListeners()&&(s?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#j()}};function be(t,s){return x(s.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&x(s.retryOnMount,t)===!1)}function K(t,s){return be(t,s)||t.state.data!==void 0&&Q(t,s,s.refetchOnMount)}function Q(t,s,a){if(x(s.enabled,t)!==!1&&x(s.staleTime,t)!=="static"){const i=x(a,t);return i==="always"||i!==!1&&V(t,s)}return!1}function J(t,s,a,i){return(t!==s||x(i.enabled,t)===!1)&&(!a.suspense||t.state.status!=="error")&&V(t,a)}function V(t,s){return x(s.enabled,t)!==!1&&t.isStaleByTime(x(s.staleTime,t))}const ee=c.createContext(!1),je=()=>c.useContext(ee);ee.Provider;function ge(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const ye=c.createContext(ge()),Ne=()=>c.useContext(ye),Se=(t,s,a)=>{const i=a?.state.error&&typeof t.throwOnError=="function"?q(t.throwOnError,[a.state.error,a]):t.throwOnError;(t.suspense||i)&&(s.isReset()||(t.retryOnMount=!1))},we=t=>{c.useEffect(()=>{t.clearReset()},[t])},ke=({result:t,errorResetBoundary:s,throwOnError:a,query:i,suspense:l})=>t.isError&&!s.isReset()&&!t.isFetching&&i&&(l&&t.data===void 0||q(a,[t.error,i])),Ce=t=>{if(t.suspense){const a=l=>l==="static"?l:Math.max(l??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...l)=>a(i(...l)):a(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Ee=(t,s)=>t?.suspense&&s.isPending,Re=(t,s,a)=>s.fetchOptimistic(t).catch(()=>{a.clearReset()});function Me(t,s,a){const i=je(),l=Ne(),h=fe(),n=h.defaultQueryOptions(t),p=h.getQueryCache().get(n.queryHash),f=t.subscribed!==!1;n._optimisticResults=i?"isRestoring":f?"optimistic":void 0,Ce(n),Se(n,l,p),we(l);const[d]=c.useState(()=>new s(h,n)),o=d.getOptimisticResult(n),u=!i&&f;if(c.useSyncExternalStore(c.useCallback(C=>{const E=u?d.subscribe(Z.batchCalls(C)):X;return d.updateResult(),E},[d,u]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),c.useEffect(()=>{d.setOptions(n)},[n,d]),Ee(n,o))throw Re(n,d,l);if(ke({result:o,errorResetBoundary:l,throwOnError:n.throwOnError,query:p,suspense:n.suspense}))throw o.error;return n.notifyOnChangeProps?o:d.trackResult(o)}function Oe(t,s){return Me(t,xe)}const te="nyle_fsb_sub_v1",se=24*3600*1e3,_=7*se,Te=30*se,B=[{id:"week",label:"This Week",lo:0,hi:_,suf:"7d"},{id:"lastweek",label:"Last Week",lo:_,hi:2*_,suf:"prev wk"},{id:"month",label:"This Month",lo:0,hi:Te,suf:"30d"}];function D(t,s){const a=Math.max(1,Math.floor((s-new Date(t).getTime())/1e3));if(a<60)return a+"s ago";const i=Math.floor(a/60);if(i<60)return i+"m ago";const l=Math.floor(i/60);if(l<24)return l+"h ago";const h=Math.floor(l/24);return h<7?h+"d ago":Math.floor(h/7)+"w ago"}function H(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function ae(t){return new Date(t).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})+" ET"}const W={critical:"CRITICAL",high:"HIGH",medium:"MEDIUM",low:"LOW"};function Le(t,s){return t.severity==="critical"?"critical":t.severity==="high"?"high":t.severity==="medium"?"medium":t.severity==="low"?"low":"update"}const j={search:t=>e.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",...t,children:[e.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),e.jsx("path",{d:"M21 21l-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),arrow:t=>e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",...t,children:e.jsx("path",{d:"M7 17L17 7M17 7H9M17 7V15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),bell:t=>e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",...t,children:[e.jsx("path",{d:"M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M13.7 21a2 2 0 0 1-3.4 0",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),refresh:t=>e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",...t,children:[e.jsx("path",{d:"M21 12a9 9 0 1 1-3-6.7L21 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M21 3v5h-5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),checkBig:t=>e.jsx("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",...t,children:e.jsx("path",{d:"M20 6L9 17l-5-5",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}),x:t=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",...t,children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),menu:t=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",...t,children:e.jsx("path",{d:"M3 6h18M3 12h18M3 18h18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),chevron:t=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",...t,children:e.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),ext:t=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",...t,children:e.jsx("path",{d:"M14 4h6v6M20 4l-9 9M18 13v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})};function ie({sev:t}){return t?e.jsx("span",{className:"sev-badge sev-"+t,children:W[t]}):e.jsx("span",{className:"sev-badge sev-update",children:"UPDATE"})}function Ie({entry:t,source:s,now:a,onOpen:i,idx:l}){return e.jsxs("div",{className:"card ac-"+Le(t),onClick:()=>i(t,s),style:{animation:"fadeUp 0.4s ease both",animationDelay:Math.min(l*.03,.25)+"s"},"data-testid":`card-entry-${t.id}`,children:[e.jsx("div",{className:"card-sev",children:e.jsx(ie,{sev:t.severity})}),e.jsxs("div",{className:"card-body",children:[e.jsx("div",{className:"card-title",children:t.title}),e.jsx("div",{className:"card-sum",children:t.summary}),t.tags&&t.tags.length>0&&e.jsx("div",{className:"card-tags",children:t.tags.slice(0,4).map(h=>e.jsx("span",{className:"tag",children:h},h))})]}),e.jsxs("div",{className:"card-meta",children:[e.jsx("span",{className:"card-time",children:D(t.date,a)}),e.jsx(j.arrow,{className:"card-arrow"})]})]})}function Ae({source:t,entries:s,now:a,onOpen:i,query:l}){const[h,n]=c.useState(!1),p=3,f=h||l?s:s.slice(0,p),d=s.length-f.length;return e.jsxs("section",{className:"section",id:"sec-"+t.id,children:[e.jsxs("div",{className:"sec-head",children:[e.jsxs("div",{className:"sec-l",children:[e.jsxs("div",{className:"sec-mono",children:[e.jsx("span",{className:"sdot",style:{background:t.status==="error"?"var(--red)":t.status==="ok"?"var(--green)":"#6a6a6a"}}),e.jsx("span",{className:"slbl",children:t.mono}),t.status==="error"?e.jsxs("span",{className:"ssync ssync-err",title:"Last sync failed for "+t.short,children:["· sync failed",t.lastUpdatedAt?e.jsxs(e.Fragment,{children:[" · last update ",D(t.lastUpdatedAt,a)]}):null]}):t.lastUpdatedAt?e.jsxs("span",{className:"ssync",title:"Last successful sync "+H(t.lastUpdatedAt),children:["· updated ",D(t.lastUpdatedAt,a)]}):null]}),e.jsx("h2",{className:"sec-name",children:t.name}),e.jsx("div",{className:"sec-desc",children:t.desc})]}),e.jsxs("div",{className:"sec-r",children:[e.jsxs("div",{className:"sec-count",children:[s.length,e.jsx("span",{children:l?"matches":"updates"})]}),!l&&s.length>p&&e.jsxs("button",{className:"viewall",onClick:()=>n(!h),"data-testid":`button-viewall-${t.id}`,children:[h?"Collapse":"View all "+s.length," ",h?"▲":"▾"]})]})]}),s.length===0?e.jsx("div",{className:"empty-sec",children:"No matching updates in this feed."}):e.jsxs("div",{className:"cards",children:[f.map((o,u)=>e.jsx(Ie,{entry:o,source:t,now:a,onOpen:i,idx:u},o.id)),!h&&!l&&d>0&&e.jsxs("button",{className:"btn btn-ghost btn-sm show-more",onClick:()=>n(!0),children:["Show ",d," more from ",t.short]})]})]})}function De({data:t,now:s,onClose:a}){if(c.useEffect(()=>{const n=p=>{p.key==="Escape"&&a()};return window.addEventListener("keydown",n),document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",n),document.body.style.overflow=""}},[]),!t)return null;const{entry:i,source:l}=t;return e.jsx("div",{className:"overlay",onClick:a,children:e.jsxs("div",{className:"modal",onClick:n=>n.stopPropagation(),"data-testid":"modal-detail",children:[e.jsx("div",{className:"modal-glow",style:{boxShadow:"inset 0 1px 0 rgba(255,255,255,0.06)"}}),e.jsxs("div",{className:"modal-top",children:[e.jsxs("div",{className:"modal-src",children:[e.jsxs("div",{className:"modal-src-l",children:[e.jsx("span",{className:"ic",style:{background:"#8b918b"}}),e.jsx("span",{className:"nm",children:l.mono})]}),e.jsx("button",{className:"modal-close",onClick:a,"data-testid":"button-close-detail",children:e.jsx(j.x,{})})]}),e.jsx("h2",{children:i.title}),e.jsxs("div",{className:"modal-meta-row",children:[e.jsx(ie,{sev:i.severity}),e.jsxs("span",{className:"mt",children:[H(i.date)," · ",ae(i.date)]}),e.jsxs("span",{className:"mt",style:{color:"var(--muted-3)"},children:["· ",D(i.date,s)]})]})]}),e.jsx("div",{className:"modal-body-txt",children:i.body}),i.meta&&e.jsx("div",{className:"meta-table",children:Object.entries(i.meta).map(([n,p])=>e.jsxs("div",{className:"meta-cell",children:[e.jsx("div",{className:"k",children:n}),e.jsx("div",{className:"v",children:p})]},n))}),i.tags&&e.jsx("div",{className:"modal-tags",children:i.tags.map(n=>e.jsx("span",{className:"tag",children:n},n))}),e.jsxs("div",{className:"modal-foot",children:[e.jsx("div",{className:"src-url",children:l.org}),e.jsxs("a",{className:"btn btn-primary btn-sm",href:i.link,target:"_blank",rel:"noopener noreferrer","data-testid":"link-read-source",children:["Read at source ",e.jsx(j.ext,{})]})]})]})})}const Fe=["CISO / Security Executive","Authorizing Official (AO)","Information System Security Officer (ISSO)","Information System Security Manager (ISSM)","Security Control Assessor (SCA)","GRC / Compliance","Security Engineer","Security Architect","SOC Analyst / Threat Analyst","Incident Responder","Vulnerability Management Analyst","Penetration Tester / Red Team","DevSecOps Engineer","System / Cloud Administrator","Privacy Officer","Program / Project Manager","Researcher / Academia","Other"];function Pe({onClose:t,onDone:s}
1){const[a,i]=c.useState(""),[l,h]=c.useState(""),[n,p]=c.useState(""),[f,d]=c.useState(""),[o,u]=c.useState(""),[C,E]=c.useState(""),[g,O]=c.useState(!1),[y,S]=c.useState(!1),[R,w]=c.useState(""),T=c.useRef(Date.now()),k=/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(n)&&a.trim()&&l.trim()&&f;c.useEffect(()=>{const m=M=>{M.key==="Escape"&&t()};return window.addEventListener("keydown",m),document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",m),document.body.style.overflow=""}},[]);const I=async()=>{if(!(!k||y)){S(!0),w("");try{const m=await fetch("/api/newsletter/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,firstName:a,lastName:l,role:f,title:o,_hp:C,_ts:T.current})}),M=await m.json().catch(()=>({}));if(!m.ok){w(M?.error||"Something went wrong. Please try again."),S(!1);return}try{localStorage.setItem(te,JSON.stringify({first:a,last:l,email:n,role:f,title:o,freq:"weekly"}))}catch{}O(!0),s(n)}catch{w("Network error. Please try again."),S(!1)}}};return e.jsx("div",{className:"overlay",onClick:t,children:e.jsxs("div",{className:"modal sub-modal",onClick:m=>m.stopPropagation(),"data-testid":"modal-subscribe",children:[e.jsx("button",{className:"modal-close",onClick:t,style:{position:"absolute",top:20,right:20,zIndex:2},"data-testid":"button-close-subscribe",children:e.jsx(j.x,{})}),g?e.jsxs("div",{className:"sub-success",children:[e.jsx("div",{className:"chk",style:{color:"var(--green)"},children:e.jsx(j.checkBig,{})}),e.jsx("h2",{children:"Check your inbox."}),e.jsxs("p",{children:["We just sent a confirmation link to ",e.jsx("span",{className:"em-tag",children:n}),". Click it to confirm, and your federal security digest will arrive every Tuesday morning at 9:00 AM ET. Unsubscribe anytime from the footer of any email."]}),e.jsx("button",{className:"btn btn-primary",style:{marginTop:26},onClick:t,"data-testid":"button-back-to-brief",children:"Back to the brief"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sub-head",children:[e.jsx("span",{className:"eyebrow",children:"— Weekly Digest"}),e.jsx("h2",{children:"Subscribe to the brief"}),e.jsx("p",{children:"Stay ahead of federal security developments with announcements, advisories, and threat updates every week."})]}),e.jsxs("div",{className:"sub-form",children:[e.jsxs("div",{className:"field-row",children:[e.jsxs("div",{className:"field-col",children:[e.jsx("div",{className:"field-lbl",children:"First name"}),e.jsx("input",{className:"inp",type:"text",placeholder:"John",value:a,onChange:m=>i(m.target.value),autoFocus:!0,"data-testid":"input-first-name"})]}),e.jsxs("div",{className:"field-col",children:[e.jsx("div",{className:"field-lbl",children:"Last name"}),e.jsx("input",{className:"inp",type:"text",placeholder:"Doe",value:l,onChange:m=>h(m.target.value),"data-testid":"input-last-name"})]})]}),e.jsx("div",{className:"field-lbl",children:"Email"}),e.jsx("input",{className:"inp",type:"email",placeholder:"[email protected]",value:n,onChange:m=>p(m.target.value),"data-testid":"input-email"}),e.jsx("div",{className:"field-lbl",children:"Role"}),e.jsxs("div",{className:"sel-wrap",children:[e.jsxs("select",{className:"inp sel",value:f,onChange:m=>d(m.target.value),style:{color:f?"#fff":"var(--muted-3)"},"data-testid":"select-role",children:[e.jsx("option",{value:"",disabled:!0,children:"Select your security role…"}),Fe.map(m=>e.jsx("option",{value:m,children:m},m))]}),e.jsx("span",{className:"sel-caret",children:e.jsx(j.chevron,{})})]}),e.jsxs("div",{className:"field-lbl",children:["Title ",e.jsx("span",{style:{color:"var(--muted-3)"},children:"· optional"})]}),e.jsx("input",{className:"inp",type:"text",placeholder:"e.g. Deputy CISO, Head of Security, CTO",value:o,onChange:m=>u(m.target.value),"data-testid":"input-title"}),e.jsx("input",{type:"text",tabIndex:-1,autoComplete:"off",value:C,onChange:m=>E(m.target.value),style:{position:"absolute",left:"-9999px",width:1,height:1,opacity:0},"aria-hidden":"true"}),R&&e.jsx("div",{style:{color:"var(--red)",fontSize:13,marginTop:14},"data-testid":"text-subscribe-error",children:R}),e.jsxs("button",{className:"btn btn-primary",style:{width:"100%",justifyContent:"center",marginTop:24,opacity:k&&!y?1:.5},onClick:I,disabled:!k||y,"data-testid":"button-activate-digest",children:[e.jsx(j.bell,{})," ",y?"Sending…":"Activate weekly digest"]})]})]})]})})}function Ue({digest:t}){if(!t||!t.narrative.trim())return e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Generating today's federal security brief from the latest agency updates…"}),e.jsx("div",{className:"stamp",children:"Auto-generated digest"})]});const s=t.narrative.split(/\n{2,}/).map(a=>
1a.trim()).filter(Boolean);return e.jsxs(e.Fragment,{children:[s.map((a,i)=>e.jsx("p",{children:a},i)),e.jsxs("div",{className:"stamp",children:["Auto-generated digest",t.basis==="last_active_day"?` · ${t.windowLabel}`:""]})]})}function _e({sources:t,now:s}){const[a,i]=c.useState("week"),l=B.find(o=>o.id===a)??B[0],h=o=>{const u=s-new Date(o.date).getTime();return u>=l.lo&&u<l.hi},n=o=>(t.find(u=>u.id===o)?.entries??[]).filter(h).length,p=t.flatMap(o=>o.entries).filter(o=>o.severity==="critical"&&h(o)).length,f="· "+l.suf,d=[{lbl:"KEV Added "+f,val:n("cisa-kev"),sub:"Active exploitation",acc:"red",trend:"crit",tlbl:"critical"},{lbl:"New CVEs "+f,val:n("nvd-cves"),sub:"From NVD",acc:"blue",trend:"info",tlbl:"tracking"},{lbl:"Critical "+f,val:p,sub:"Across all feeds",acc:"red",trend:"crit",tlbl:"priority"},{lbl:"Advisories "+f,val:n("cisa-advisories"),sub:"ICS / infrastructure",acc:"orange",trend:"high",tlbl:"monitor"},{lbl:"STIG Releases "+f,val:n("disa-stigs"),sub:"DISA hardening",acc:"green",trend:"comp",tlbl:"compliance"},{lbl:"FedRAMP "+f,val:n("fedramp-notices")+n("fedramp-changelog"),sub:"Notices + marketplace",acc:"purple",trend:"prog",tlbl:"notices"}];return e.jsxs("div",{className:"metrics-col",children:[e.jsx("div",{className:"seg metric-seg","data-testid":"seg-metric-range",children:B.map(o=>e.jsx("button",{className:a===o.id?"on":"",onClick:()=>i(o.id),"data-testid":`button-range-${o.id}`,children:o.label},o.id))}),e.jsx("div",{className:"tiles",children:d.map((o,u)=>e.jsxs("div",{className:"tile acc-"+o.acc,style:{animation:"fadeUp 0.5s ease both",animationDelay:.05*u+"s"},children:[e.jsx("div",{className:"t-lbl",children:o.lbl}),e.jsx("div",{className:"t-trend trend-"+o.trend,children:o.tlbl}),e.jsx("div",{className:"t-val","data-testid":`metric-val-${u}`,children:String(o.val).padStart(2,"0")}),e.jsx("div",{className:"t-sub",children:o.sub})]},o.lbl))})]})}function We(){const{data:t,refetch:s}=Oe({queryKey:["/api/news/feed"],queryFn:async()=>{const r=await fetch("/api/news/feed");if(!r.ok)throw new Error("Failed to load feed");return r.json()}}),[a,i]=c.useState(()=>Date.now()),[l,h]=c.useState(""),[n,p]=c.useState("all"),[f,d]=c.useState({}),[o,u]=c.useState(null),[C,E]=c.useState(!1),[g,O]=c.useState(!1),[y,S]=c.useState(null),[R,w]=c.useState(!1),[T,b]=c.useState(!1);c.useEffect(()=>{const r=document.title;document.title="NYLE Federal Security Brief";const v=document.querySelector('meta[name="description"]'),N=v?.getAttribute("content")??null;return v&&v.setAttribute("content","Get daily federal cybersecurity updates from CISA KEV, CISA Advisories, NVD CVEs, DISA STIGs, FedRAMP notices, and DoD CIO announcements."),()=>{document.title=r,v&&N!==null&&v.setAttribute("content",N)}},[]),c.useEffect(()=>{try{localStorage.getItem(te)&&O(!0)}catch{}},[]),c.useEffect(()=>{const r=setInterval(()=>i(v=>v+3e4),3e4);return()=>clearInterval(r)},[]);const k=r=>{S(r),setTimeout(()=>S(null),3200)},I=async()=>{if(!T){b(!0);try{const r=await fetch("/api/news/refresh",{method:"POST"}),v=await r.json().catch(()=>({}));if(!r.ok)k(v?.error||"Refresh failed · please try again");else{await s(),i(Date.now());const N=Array.isArray(v?.results)?v.results.filter(L=>L?.ok||L?.status==="ok").length:0;k(N?`Feeds refreshed · ${N} sources synced`:"Feeds refreshed")}}catch{k("Refresh failed · please try again")}finally{b(!1)}}},m=l.trim().toLowerCase(),M=t?.generatedAt??new Date(a).toISOString(),A=c.useMemo(()=>t?.sources??[],[t]),re=r=>n!=="all"&&r.severity!==n?!1:m?(r.title+" "+r.summary+" "+r.body+" "+(r.tags||[]).join(" ")+" "+Object.values(r.meta||{}).join(" ")).toLowerCase().includes(m):!0,P=A.map(r=>{const v=r.entries.slice().sort((N,L)=>new Date(L.date).getTime()-new Date(N.date).getTime()).filter(re);return{source:r,entries:v}}),G=m!==""||n!=="all",$=P.filter(r=>!f[r.source.id]&&(!G||r.entries.length>0)),Y=P.filter(r=>!f[r.source.id]).reduce((r,v)=>r+v.entries.length,0),ne=r=>d(v=>({...v,[r]:!v[r]})),le=["all","critical","high","medium","low"];return t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"fsb",children:[e.jsx("div",{className:"brandbar"}),e.jsx("header",{className:"hdr",children:e.jsxs("div",{className:"wrap hdr-inner",children:[e.jsxs("div",{className:"brand",children:[e.jsx(pe,{href:"/",className:"logo","data-testid":"link-home","aria-label":"NYLE home",children:"NYLE"}),e.jsx("span",{className:"brand-div"}),e.jsxs("span",{className:"brand-sub",children:[e.jsx("b",{children:"Federal Security Brief"}),"Real-time authorization & threat intel"]})]}),e.jsxs("div",{className:"hdr-actions",children:[e.jsxs("span",{className:"live-chip",children:[e.jsx("span",{className:"live-dot"}),"LIVE",e.jsxs("span",{className:"upd",children:[" · synced ",D(M,a)]})]}),e.jsxs("button",{className:"btn btn-ghost btn-sm",onClick:I,title:"Refresh feeds","data-testid":"button-refresh",children:[e.jsx(j.refresh,{style:{animation:T?"spin 0.9s linear infinite":"none"}}),e.jsx("span",{style:{display:"inline"},className:"rf-lbl",children:"Refresh"})]}),e.jsxs("button",{className:"btn btn-primary btn-sm",onClick:()=>E(!0),"data-testid":"button-subscribe",children:[e.jsx(j.bell,{})," ",g?"Subscribed":"Subscribe"]}),e.jsx("button",{className:"nav-menu-btn",onClick:()=>w(!0),"aria-label":"Open menu","data-testid":"button-menu-open",children:e.jsx(j.menu,{})})]})]})}),R&&e.jsxs("div",{className:"nav-overlay open","data-testid":"overlay-menu",onClick:()=>w(!1),children:[e.jsx("button",{type:"button",className:"nav-overlay-close",onClick:()=>w(!1),"aria-label":"Close menu","data-testid":"button-menu-close",children:e.jsx(j.x,{})}),e.jsxs("nav",{className:"nav-overlay-links",onClick:r=>r.stopPropagation(),children:[e.jsx("a",{href:"/","data-testid":"link-menu-home",children:"Home"}),e.jsx("a",{href:"/federalready","data-testid":"link-menu-gap",children:"Gap Analysis"}),e.jsx("a",{href:"/federaltrustcenter","data-testid":"link-menu-trust",children:"Trust Center"}),e.jsx("a",{href:"/security-news","data-testid":"link-menu-security-news",children:"Security News"}),e.jsx("a",{href:"/federalcomplianceblog","data-testid":"link-menu-blog",children:"Blog"}),e.jsx("a",{href:"/federalcompliancetemplates","data-testid":"link-menu-resources",children:"Resources"}),e.jsx("a",{href:"/about","data-testid":"link-menu-about",children:"About NYLE"}),e.jsx("a",{href:"/bookacall","data-testid":"link-menu-book",children:"Book a Call"}),e.jsx("a",{href:"/termsofservice","data-testid":"link-menu-terms",children:"Terms of Service"}),e.jsx("a",{href:"/privacypolicy","data-testid":"link-menu-privacy",children:"Privacy Policy"})]})]}),e.jsxs("div",{className:"wrap hero",children:[e.jsxs("div",{className:"hero-eyebrow",children:[e.jsx("span",{className:"dash"}),e.jsx("span",{className:"lbl",children:"Last 24 Hours"}),e.jsx("span",{className:"date",children:new Date(M).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})})]}),e.jsxs("h1",{children:["What's New in ",e.jsx("span",{className:"em",children:"Federal Security."})]}),e.jsxs("div",{className:"hero-grid",children:[e.jsx("div",{className:"narrative",children:e.jsx(Ue,{digest:t?.digest??null})}),e.jsx(_e,{sources:A,now:a})]})]}),e.jsx("div",{className:"controls",children:e.jsxs("div",{className:"wrap",children:[e.jsxs("div",{className:"controls-inner",children:[e.jsxs("div",{className:"search",children:[e.jsx(j.search,{}),e.jsx("input",{placeholder:"Search CVEs, advisories, STIGs, vendors, FedRAMP…",value:l,onCh
1ange:r=>h(r.target.value),"data-testid":"input-search"}),l&&e.jsx("button",{className:"clearx",onClick:()=>h(""),"data-testid":"button-clear-search",children:"×"})]}),e.jsx("div",{className:"seg",children:le.map(r=>e.jsx("button",{className:n===r?"on sev-"+r:"",onClick:()=>p(r),"data-testid":`button-sev-${r}`,children:r==="all"?"ALL":W[r]},r))})]}),e.jsx("div",{className:"chips",children:A.map(r=>{const v=P.find(L=>L.source.id===r.id)?.entries.length??0,N=f[r.id];return e.jsxs("button",{className:"chip"+(N?" off":""),onClick:()=>ne(r.id),"data-testid":`chip-source-${r.id}`,children:[e.jsx("span",{className:"cdot"}),r.short," ",e.jsx("span",{className:"cnt",children:v})]},r.id)})}),G&&e.jsxs("div",{className:"result-line",children:[e.jsx("b",{children:Y})," ",Y===1?"result":"results"," ",m&&e.jsxs(e.Fragment,{children:['for "',l,'"']})," ",n!=="all"&&e.jsxs(e.Fragment,{children:["· severity: ",W[n]]})]})]})}),e.jsx("div",{className:"wrap feeds",children:$.length===0?e.jsx("div",{className:"empty-sec",style:{padding:60},children:"No updates match your filters. Try clearing search or severity."}):$.map(r=>e.jsx(Ae,{source:r.source,entries:r.entries,now:a,onOpen:(v,N)=>u({entry:v,source:N}),query:m},r.source.id))}),e.jsx("footer",{className:"foot",children:e.jsxs("div",{className:"wrap foot-inner",children:[e.jsxs("div",{className:"foot-l",children:[e.jsx("b",{children:"NYLE Federal Security Brief"}),e.jsx("br",{}),e.jsx("a",{href:"https://www.heynyle.com",target:"_blank",rel:"noopener noreferrer",className:"foot-site","data-testid":"link-heynyle",children:"www.heynyle.com"}),e.jsx("br",{}),"Aggregated live from official government feeds",e.jsx("br",{}),"Generated ",H(M)," · ",ae(M)]}),e.jsx("div",{className:"foot-sources",children:A.map(r=>e.jsxs("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",children:[r.mono," ↗"]},r.id))})]})}),o&&e.jsx(De,{data:o,now:a,onClose:()=>u(null)}),C&&e.jsx(Pe,{onClose:()=>E(!1),onDone:()=>{O(!0),setTimeout(()=>k("Confirmation email sent · check your inbox"),400)}}),y&&e.jsxs("div",{className:"toast","data-testid":"text-toast",children:[e.jsx("span",{className:"live-dot"}),y]})]}),e.jsx(ve,{})]}):e.jsxs("div",{className:"fsb",style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx("div",{className:"brandbar"}),e.jsxs("div",{className:"live-chip",style:{marginTop:0},children:[e.jsx("span",{className:"live-dot"}),"Loading the brief…"]})]})}export{We 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.