1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1239fd4d-1dc2-4e5a-93ab-85de142d1396",e._sentryDebugIdIdentifier="sentry-dbid-1239fd4d-1dc2-4e5a-93ab-85de142d1396")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6066],{34873:function(e,t,r){r.d(t,{Z:function(){return u}});var a=r(85893),s=r(67294),n=r(86010),i=r(33215),o=r(34362),c=r(98256),d=r(56042);let l=[{value:"spam",label:"Spam"},{value:"offtopic",label:"Off Topic"},{value:"abuse",label:"Abusive/Harassment"},{value:"duplicate",label:"Duplicate"},{value:"misleading",label:"Misleading/False"},{value:"other",label:"Other"}];function u(e){let{isOpen:t,onClose:r,referenceType:u,referenceId:m,userKarma:h,isAdmin:p=!1,onSuccess:x}=e,{token:g}=(0,c.Fy)(),[f,b]=(0,s.useState)(""),[y,v]=(0,s.useState)(""),[k,w]=(0,s.useState)(!1),[j,T]=(0,s.useState)(""),[N,S]=(0,s.useState)(!1),_=async e=>{e.preventDefault(),T(""),w(!0);try{let{data:e}=await i.ZP.post("/api/flags/create",{reference_type:u,reference_id:m,reason:f,notes:y.trim()||void 0},{headers:(0,c.iy)(g)});e.success&&(S(!0),setTimeout(()=>{null==x||x(),r(),b(""),v(""),S(!1)},1500))}catch(e){var t,a;T((null===(a=e.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.error)||"Failed to flag content")}finally{w(!1)}};return t?(0,o.P9)(h,p)?(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-sentry-component":"FlagModal","data-sentry-source-file":"FlagModal.tsx",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-modal-backdrop dark:bg-modal-backdrop-dark",onClick:r}),(0,a.jsxs)("div",{className:"relative bg-surface dark:bg-surface-secondary-dark rounded-lg shadow-xl p-4 sm:p-6 max-w-md w-full",children:[(0,a.jsxs)("h2",{className:"text-lg sm:text-xl font-bold text-text-primary dark:text-text-primary-dark mb-4",children:["Flag ","article"===u?"Article":"Comment"]}),N?(0,a.jsxs)("div",{className:"py-8 text-center",children:[(0,a.jsx)("div",{className:"text-success-text dark:text-success-text-dark text-lg font-medium mb-2",children:"â Flagged successfully"}),(0,a.jsx)("p",{className:"text-text-secondary dark:text-text-secondary-dark text-sm",children:"Moderators will review this content"})]}):(0,a.jsxs)("form",{onSubmit:_,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-text-secondary dark:text-text-secondary-dark mb-2",children:"Reason *"}),(0,a.jsxs)("select",{value:f,onChange:e=>b(e.target.value),required:!0,className:(0,n.Z)("w-full px-3 py-2 rounded border","bg-surface dark:bg-input-bg-dark","border-border-input dark:border-border-input-dark","text-text-primary dark:text-text-primary-dark","focus:ring-2 focus:ring-border-input-focus dark:focus:ring-border-input-focus-dark focus:border-transparent"),children:[(0,a.jsx)("option",{value:"",children:"Select a reason..."}),l.map(e=>{let{value:t,label:r}=e;return(0,a.jsx)("option",{value:t,children:r},t)})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-text-secondary dark:text-text-secondary-dark mb-2",children:"Additional Notes (optional)"}),(0,a.jsx)("textarea",{value:y,onChange:e=>v(e.target.value),rows:3,maxLength:o.Hg.FLAG_NOTES_MAX_LENGTH,placeholder:"Provide additional context...",className:(0,n.Z)("w-full px-3 py-2 rounded border","bg-surface dark:bg-input-bg-dark","border-border-input dark:border-border-input-dark","text-text-primary dark:text-text-primary-dark","focus:ring-2 focus:ring-border-input-focus dark:focus:ring-border-input-focus-dark focus:border-transparent")}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-text-tertiary dark:text-text-tertiary-dark",children:[y.length,"/",o.Hg.FLAG_NOTES_MAX_LENGTH," characters"]})]}),j&&(0,a.jsx)("div",{className:"p-3 bg-error-bg dark:bg-error-bg-dark border border-error-border dark:border-error-border-dark rounded text-sm text-error-text dark:text-error-text-dark",children:j}),(0,a.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,a.jsx)("button",{type:"button",onClick:r,className:"flex-1 px-4 py-2 border border-border-input dark:border-border-input-dark rounded text-text-secondary dark:text-text-secondary-dark hover:bg-hover-bg dark:hover:bg-hover-bg-dark",children:"Cancel"}),(0,a.jsx)("button",{type:"submit",disabled:!f||k,className:(0,n.Z)("flex-1 px-4 py-2 rounded text-btn-danger-text flex items-center justify-center","bg-btn-danger-bg dark:bg-btn-danger-bg-dark hover:bg-btn-danger-bg-hover dark:hover:bg-btn-danger-bg-dark-hover","disabled:opacity-50 disabled:cursor-not-allowed"),children:k?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.ZP,{size:"sm",color:"white",inline:!0,className:"mr-2"}),"Flagging..."]}):"Flag Content"})]})]})]})]}):(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-modal-backdrop dark:bg-modal-backdrop-dark",onClick:r}),(0,a.jsxs)("div",{className:"relative bg-surface dark:bg-surface-secondary-dark rounded-lg shadow-xl p-6 max-w-md w-full",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-text-primary dark:text-text-primary-dark mb-4",children:"Karma Required"}),(0,a.jsxs)("p",{className:"text-text-secondary dark:text-text-secondary-dark mb-6",children:["You need ",o.LR.FLAG_CONTENT,"+ karma to flag content. You currently have ",h," karma."]}),(0,a.jsx)("button",{onClick:r,className:"w-full px-4 py-2 bg-primary-bg text-btn-primary-text rounded hover:bg-primary-bg-hover",children:"OK"})]})]}):null}},88362:function(e,t,r){r.d(t,{Z:function(){return j}});var a=r(85893),s=r(67294),n=r(86010),i=r(70142),o=r(41914),c=r(95361),d=r(4723),l=r(25523);async function u(e){try{let t=await fetch("/api/virustotal/check?type=domain&value=".concat(encodeURIComponent(e)));if(!t.ok){let e=await t.json().catch(()=>({}));return console.error("VirusTotal domain check failed:",e),null}return await t.json()}catch(e){return console.error("VirusTotal domain check failed:",e),null}}async function m(e){try{let t=await fetch("/api/virustotal/check?type=ip&value=".concat(encodeURIComponent(e)));if(!t.ok){let e=await t.json().catch(()=>({}));return console.error("VirusTotal IP check failed:",e),null}return await t.json()}catch(e){return console.error("VirusTotal IP check failed:",e),null}}async function h(e){try{let t=await fetch("/api/virustotal/check?type=hash&value=".concat(encodeURIComponent(e)));if(!t.ok){let e=await t.json().catch(()=>({}));return console.error("VirusTotal hash check failed:",e),null}return await t.json()}catch(e){return console.error("VirusTotal hash check failed:",e),null}}async function p(e){try{var t,r,a,s,n,i;let o=e.replace(/^https?:\/\//,"").split("/")[0],c=await fetch("https://rdap.org/domain/".concat(o));if(!c.ok){if(404===c.status)return{domain:o,status:["Domain not found in registry"]};throw Error("RDAP API error: ".concat(c.status))}let d=await c.json(),l={domain:o,nameServers:(null===(t=d.nameservers)||void 0===t?void 0:t.map(e=>e.ldhName))||[],status:d.status||[]};
1if(d.events&&d.events.forEach(e=>{switch(e.eventAction){case"registration":l.registrationDate=e.eventDate;break;case"expiration":l.expirationDate=e.eventDate;break;case"last changed":case"last update of RDAP database":l.updatedDate=e.eventDate}}),d.entities){let e=d.entities.find(e=>{var t;return null===(t=e.roles)||void 0===t?void 0:t.includes("registrar")});e&&(l.registrar=null===(n=e.vcardArray)||void 0===n?void 0:null===(s=n[1])||void 0===s?void 0:null===(a=s.find(e=>"fn"===e[0]))||void 0===a?void 0:a[3]);let t=d.entities.find(e=>{var t;return null===(t=e.roles)||void 0===t?void 0:t.includes("registrant")});if(t&&t.vcardArray){let e=t.vcardArray[1],r=e.find(e=>"org"===e[0]);r&&(l.registrantOrganization=r[3]);let a=e.find(e=>"adr"===e[0]);a&&(l.registrantCountry=null===(i=a[1])||void 0===i?void 0:i["country-name"]);let s=e.find(e=>"email"===e[0]);s&&(l.adminEmail=s[3])}}return l.dnssec=(null===(r=d.secureDNS)||void 0===r?void 0:r.delegationSigned)?"signed":"unsigned",l}catch(e){return console.error("WHOIS lookup failed:",e),null}}function x(e){let t=[];return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;if(!e.registrationDate)return!1;let r=new Date(e.registrationDate);return(new Date().getTime()-r.getTime())/864e5<=t}
1(e,30)&&t.push("Recently registered (< 30 days)"),["privacy","protection","whoisguard","domains by proxy","contact privacy","redacted for privacy"].some(t=>{var r,a;return(null===(r=e.registrar)||void 0===r?void 0:r.toLowerCase().includes(t))||(null===(a=e.registrantOrganization)||void 0===a?void 0:a.toLowerCase().includes(t))})&&t.push("WHOIS privacy protection enabled"),[".tk",".ml",".ga",".cf",".gq",".xyz",".top",".club"].some(t=>e.domain.endsWith(t))&&t.push("Suspicious TLD"),"unsigned"===e.dnssec&&t.push("DNSSEC not enabled"),t}var g=r(56042);function f(e){let{article:t}=e,[r,i]=(0,s.useState)(null),[o,c]=(0,s.useState)(!0),[d,f]=(0,s.useState)(null),[b,y]=(0,s.useState)(null),[v,k]=(0,s.useState)(null),[w,j]=(0,s.useState)(!1);(0,s.useEffect)(()=>{c(!0),i((0,l.bc)(t)),c(!1)},[t]);let T=e=>{navigator.clipboard.writeText(e)},N=async(e,t)=>{f({type:e,value:t}),j(!0),y(null),k(null);try{if("ip"===e){let e=await m(t);y(e)}else if("domain"===e){let e=await u(t);y(e);let r=await p(t);k(r)}else if("hash"===e){let e=await h(t);y(e)}}catch(e){console.error("Reputation check failed:",e)}finally{j(!1)}};return o?(0,a.jsx)("div",{className:"p-4 rounded-lg bg-surface-secondary dark:bg-surface-secondary-dark",children:(0,a.jsx)("p",{className:"text-sm text-text-secondary dark:text-text-secondary-dark",children:"Extracting IOCs..."})}):r&&0!==(0,l.nR)(r)?(0,a.jsxs)("div",{className:"border rounded-lg overflow-hidden transition-colors duration-200 bg-surface dark:bg-surface-dark border-subtle dark:border-subtle-dark","data-sentry-component":"IOCPanel","data-sentry-source-file":"IOCPanel.tsx",children:[(0,a.jsxs)("div",{className:"px-4 py-3 border-b border-subtle dark:border-subtle-dark flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"font-semibold text-sm text-text-primary dark:text-text-primary-dark",children:["Extracted IOCs (",(0,l.nR)(r),")"]}),(0,a.jsx)("p",{className:"text-xs mt-0.5 text-text-tertiary dark:text-text-tertiary-dark",children:"Indicators of Compromise extracted from article"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>T((0,l.BT)(r)),className:"px-3 py-1 text-xs rounded transition-colors bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark hover:bg-btn-secondary-bg-hover dark:hover:bg-btn-secondary-bg-hover-dark",children:"Copy All"}),(0,a.jsx)("button",{onClick:()=>{if(!r)return;let e=new Blob([(0,l.GS)(r)],{type:"text/csv"}),a=URL.createObjectURL(e),s=document.createElement("a");s.href=a,s.download="iocs-".concat(t.id,".csv"),s.click()},className:"px-3 py-1 text-xs rounded transition-colors bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark hover:bg-btn-secondary-bg-hover dark:hover:bg-btn-secondary-bg-hover-dark",children:"CSV"}),(0,a.jsx)("button",{onClick:()=>{if(!r)return;let e=new Blob([(0,l.cs)(r)],{type:"application/json"}),a=URL.createObjectURL(e),s=document.createElement("a");s.href=a,s.download="iocs-".concat(t.id,".json"),s.click()},className:"px-3 py-1 text-xs rounded transition-colors bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark hover:bg-btn-secondary-bg-hover dark:hover:bg-btn-secondary-bg-hover-dark",children:"JSON"}),(0,a.jsx)("button",{onClick:()=>{if(!r)return;let e=new Blob([(0,l.mJ)(r,t.title)],{type:"application/json"}),a=URL.createObjectURL(e),s=document.createElement("a");s.href=a,s.download="iocs-".concat(t.id,".stix"),s.click()},className:"px-3 py-1 text-xs rounded transition-colors bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark hover:bg-btn-secondary-bg-hover dark:hover:bg-btn-secondary-bg-hover-dark",children:"STIX"})]})]}),(0,a.jsxs)("div",{className:"p-4 space-y-4",children:[r.cves.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold mb-2 text-text-secondary dark:text-text-secondary-dark",children:["CVEs (",r.cves.length,")"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:r.cves.map(e=>(0,a.jsx)("a",{href:"https://nvd.nist.gov/vuln/detail/".concat(e),target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 text-xs rounded font-mono transition-colors bg-error-soft text-red-700 dark:text-red-300 hover:bg-red-100 dark:hover:bg-red-900/30",children:e},e))})]}),r.ips.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold mb-2 text-text-secondary dark:text-text-secondary-dark",children:["IP Addresses (",r.ips.length,")"]}),(0,a.jsx)("div",{className:"space-y-1",children:r.ips.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"px-2 py-1 text-xs rounded flex-1 bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark",children:e}),(0,a.jsx)("button",{onClick:()=>N("ip",e),disabled:w&&(null==d?void 0:d.value)===e,className:(0,n.Z)("px-2 py-1 text-xs rounded transition-colors flex items-center gap-1 bg-primary-bg dark:bg-primary-bg-dark text-btn-primary-text dark:text-btn-primary-text-dark hover:bg-primary-bg-hover dark:hover:bg-primary-bg-hover-dark",w&&(null==d?void 0:d.value)===e&&"opacity-50 cursor-not-allowed"),children:w&&(null==d?void 0:d.value)===e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.ZP,{size:"xs",color:"current",inline:!0}),"Checking..."]}):"Check VT"})]},e))})]}),r.domains.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold mb-2 text-text-secondary dark:text-text-secondary-dark",children:["Domains (",r.domains.length,")"]}),(0,a.jsx)("div",{className:"space-y-1",children:r.domains.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"px-2 py-1 text-xs rounded flex-1 bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark",children:e}),(0,a.jsx)("button",{onClick:()=>N("domain",e),disabled:w&&(null==d?void 0:d.value)===e,className:(0,n.Z)("px-2 py-1 text-xs rounded transition-colors flex items-center gap-1 bg-primary-bg dark:bg-primary-bg-dark text-btn-primary-text dark:text-btn-primary-text-dark hover:bg-primary-bg-hover dark:hover:bg-primary-bg-hover-dark",w&&(null==d?void 0:d.value)===e&&"opacity-50 cursor-not-allowed"),children:w&&(null==d?void 0:d.value)===e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.ZP,{size:"xs",color:"current",inline:!0}),"Checking..."]}):"Check VT + WHOIS"})]},e))})]}),(r.hashes.md5.length>0||r.hashes.sha1.length>0||r.hashes.sha256.length>0)&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold mb-2 text-text-secondary dark:text-text-secondary-dark",children:["File Hashes (",r.hashes.md5.length+r.hashes.sha1.length+r.hashes.sha256.length,")"]}),(0,a.jsx)("div",{className:"space-y-1",children:[...r.hashes.md5,...r.hashes.sha1,...r.hashes.sha256].map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"px-2 py-1 text-xs rounded flex-1 truncate bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark",children:e}),(0,a.jsx)("button",{onClick:()=>N("hash",e),disabled:w&&(null==d?void 0:d.value)===e,className:(0,n.Z)("px-2 py-1 text-xs rounded transition-colors whitespace-nowrap flex items-center gap-1 bg-primary-bg dark:bg-primary-bg-dark text-btn-primary-text dark:text-btn-primary-text-dark hover:bg-primary-bg-hover dark:hover:bg-primary-bg-hover-dark",w&&(null==d?void 0:d.value)===e&&"opacity-50 cursor-not-allowed"),children:w&&(null==d?void 0:d.value)===e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.ZP,{size:"xs",color:"current",inline:!0}),"Checking..."]}):"Check VT"})]},e))})]})]}),d&&(0,a.jsxs)("div",{className:"px-4 py-3 border-t border-subtle dark:border-subtle-dark bg-surface-muted dark:bg-surface-muted-dark",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold mb-2 text-text-secondary dark:text-text-secondary-dark",children:["Reputation: ",(0,a.jsx)("code",{className:"font-mono",children:d.value})]}),w&&(0,a.jsx)("p",{className:"text-xs text-text-secondary dark:text-text-secondary-dark",children:"Checking reputation..."}),!w&&b&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:(0,n.Z)("px-3 py-2 rounded text-xs","malicious"===b.reputation?"bg-red-900/20 text-red-400":"suspicious"===b.reputation?"bg-yellow-900/20 text-yellow-400":"clean"===b.reputation?"bg-green-900/20 text-green-400":"bg-gray-800 text-gray-400"),children:[(0,a.jsxs)("div",{className:"font-semibold mb-1",children:["VirusTotal: ",b.reputation.toUpperCase()]}),(0,a.jsxs)("div",{children:["Malicious: ",b.malicious," | Suspicious: ",b.suspicious," | Clean: ",b.harmless," | Unknown: ",b.undetected]}),b.total>0&&(0,a.jsxs)("div",{className:"mt-1",children:["Detection rate: ",b.malicious+b.suspicious,"/",b.total," engines"]})]}),v&&(0,a.jsxs)("div",{className:"px-3 py-2 rounded text-xs bg-surface dark:bg-surface-dark text-text-secondary dark:text-text-secondary-dark",children:[(0,a.jsx)("div",{className:"font-semibold mb-1",children:"WHOIS Information"}),(0,a.jsx)("pre",{className:"text-xs whitespace-pre-wrap font-mono",children:function(e){let t=[];return t.push("Domain: ".concat(e.domain)),t.push(""),e.registrar&&t.push("Registrar: ".concat(e.registrar)),e.registrantOrganization&&t.push("Organization: ".concat(e.registrantOrganization)),e.registrantCountry&&t.pu
1sh("Country: ".concat(e.registrantCountry)),e.adminEmail&&t.push("Admin Email: ".concat(e.adminEmail)),t.push(""),e.registrationDate&&t.push("Registered: ".concat(new Date(e.registrationDate).toLocaleDateString())),e.expirationDate&&t.push("Expires: ".concat(new Date(e.expirationDate).toLocaleDateString())),e.updatedDate&&t.push("Updated: ".concat(new Date(e.updatedDate).toLocaleDateString())),e.nameServers&&e.nameServers.length>0&&(t.push(""),t.push("Name Servers:"),e.nameServers.forEach(e=>t.push(" - ".concat(e)))),e.status&&e.status.length>0&&(t.push(""),t.push("Status:"),e.status.forEach(e=>t.push(" - ".concat(e)))),e.dnssec&&(t.push(""),t.push("DNSSEC: ".concat(e.dnssec))),t.join("\n")}(v)}),x(v).length>0&&(0,a.jsxs)("div",{className:"mt-2 pt-2 border-t border-subtle dark:border-subtle-dark",children:[(0,a.jsx)("div",{className:"font-semibold text-yellow-400 mb-1",children:"Suspicious Indicators:"}),(0,a.jsx)("ul",{className:"list-disc list-inside",children:x(v).map((e,t)=>(0,a.jsx)("li",{children:e},t))})]})]})]})]})]}):(0,a.jsx)("div",{className:"p-4 rounded-lg bg-surface-secondary dark:bg-surface-secondary-dark",children:(0,a.jsx)("p",{className:"text-sm text-text-secondary dark:text-text-secondary-dark",children:"No IOCs detected in this article"})})}var b=r(97585);let y={phishing_campaign:{id:"phishing_campaign",name:"Phishing â Execution â Persistence",description:"Classic phishing attack chain with macro execution and persistence",techniques:["T1566","T1204","T1059","T1547","T1543"],tactics:["Initial Access","Execution","Persistence"],confidence_boost:.15,min_match:2,severity:"high"},drive_by_compromise:{id:"drive_by_compromise",name:"Drive-by Compromise â Exploitation",description:"Exploit kit delivery via compromised websites",techniques:["T1189","T1190","T1203","T1059"],tactics:["Initial Access","Execution"],confidence_boost:.15,min_match:2,severity:"high"},supply_chain_attack:{id:"supply_chain_attack",name:"Supply Chain Compromise",description:"Software supply chain attack with trusted software manipulation",techniques:["T1195","T1072","T1021"],tactics:["Initial Access","Lateral Movement"],confidence_boost:.2,min_match:2,severity:"critical"},credential_theft:{id:"credential_theft",name:"Valid Accounts â Credential Dumping â Lateral Movement",description:"Credential theft and abuse for lateral movement",techniques:["T1078","T1003","T1558","T1021"],tactics:["Defense Evasion","Credential Access","Lateral Movement"],confidence_boost:.15,min_match:2,severity:"high"},mimikatz_attack:{id:"mimikatz_attack",name:"LSASS Credential Dumping Chain",description:"Mimikatz-style credential dumping from LSASS memory",techniques:["T1003.001","T1003.002","T1558","T1550"],tactics:["Credential Access","Defense Evasion"],confidence_boost:.2,min_match:2,severity:"critical"},kerberoasting:{id:"kerberoasting",name:"Kerberoasting Attack Chain",description:"Kerberos ticket abuse for credential access",techniques:["T1558.003","T1558.004","T1110","T1078"],tactics:["Credential Access","Defense Evasion"],confidence_boost:.2,min_match:2,severity:"high"},lateral_movement:{id:"lateral_movement",name:"Lateral Movement via Remote Services",description:"Moving laterally using RDP, SMB, or WinRM",techniques:["T1021.001","T1021.002","T1021.006","T1570"],tactics:["Lateral Movement"],confidence_boost:.15,min_match:2,severity:"high"},pass_the_hash:{id:"pass_the_hash",name:"Pass-the-Hash Attack",description:"Using stolen credentials for authentication without passwords",techniques:["T1003.001","T1550.002","T1021"],tactics:["Credential Access","Defense Evasion","Lateral Movement"],confidence_boost:.2,min_match:2,severity:"high"},ransomware_deployment:{id:"ransomware_deployment",name:"Ransomware Kill Chain",description:"Full ransomware deployment with data destruction",techniques:["T1486","T1490","T1491","T1489","T1529"],tactics:["Impact"],confidence_boost:.25,min_match:2,severity:"critical"},ransomware_defense_evasion:{id:"ransomware_defense_evasion",name:"Ransomware Defense Evasion",description:"Disabling security tools before ransomware deployment",techniques:["T1562.001","T1562.009","T1490","T1486"],tactics:["Defense Evasion","Impact"],confidence_boost:.2,min_match:2,severity:"critical"},double_extortion:{id:"double_extortion",name:"Double Extortion Ransomware",description:"Data exfiltration before encryption for double extortion",techniques:["T1567","T1048","T1486","T1491"],tactics:["Exfiltration","Impact"],confidence_boost:.2,min_match:2,severity:"critical"},data_exfiltration:{id:"data_exfiltration",name:"Data Exfiltration Chain",description:"Data collection, staging, and exfiltration",techniques:["T1005","T
11039","T1074","T1560","T1567","T1048"],tactics:["Collection","Exfiltration"],confidence_boost:.15,min_match:3,severity:"high"},cloud_data_theft:{id:"cloud_data_theft",name:"Cloud Data Theft",description:"Stealing data from cloud services",techniques:["T1530","T1567.002","T1078.004"],tactics:["Collection","Exfiltration"],confidence_boost:.15,min_match:2,severity:"high"},c2_establishment:{id:"c2_establishment",name:"Command and Control Establishment",description:"Setting up persistent C2 communications",techniques:["T1071","T1573","T1090","T1095","T1102"],tactics:["Command and Control"],confidence_boost:.15,min_match:2,severity:"high"},web_shell_persistence:{id:"web_shell_persistence",name:"Web Shell Persistence",description:"Deploying web shells for persistent access",techniques:["T1505.003","T1190","T1071.001"],tactics:["Persistence","Command and Control"],confidence_boost:.2,min_match:2,severity:"high"},rootkit_installation:{id:"rootkit_installation",name:"Rootkit Installation",description:"Installing rootkit for stealth and persistence",techniques:["T1014","T1542","T1055","T1574"],tactics:["Defense Evasion","Persistence"],confidence_boost:.2,min_match:2,severity:"critical"},apt_full_chain:{id:"apt_full_chain",name:"APT Full Kill Chain",description:"Complete APT attack from initial access to impact",techniques:["T1566","T1059","T1547","T1003","T1021","T1567","T1486"],tactics:["Initial Access","Execution","Persistence","Credential Access","Lateral Movement","Exfiltration","Impact"],confidence_boost:.3,min_match:4,severity:"critical"},living_off_the_land:{id:"living_off_the_land",name:"Living off the Land (LotL)",description:"Using legitimate system tools for malicious purposes",techniques:["T1059.001","T1059.003","T1218","T1216","T1047"],tactics:["Execution","Defense Evasion"],confidence_boost:.15,min_match:2,severity:"high"},cryptomining:{id:"cryptomining",name:"Cryptomining Campaign",description:"Resource hijacking for cryptocurrency mining",techniques:["T1496","T1053","T1543","T1562.001"],tactics:["Impact","Persistence","Defense Evasion"],confidence_boost:.15,min_match:2,severity:"medium"},defense_evasion_chain:{id:"defense_evasion_chain",name:"Multi-Layer Defense Evasion",description:"Comprehensive defense evasion tactics",techniques:["T1562.001","T1070","T1036","T1055","T1027"],tactics:["Defense Evasion"],confidence_boost:.15,min_match:3,severity:"high"},log_deletion:{id:"log_deletion",name:"Log Deletion and Anti-Forensics",description:"Covering tracks by deleting logs and indicators",techniques:["T1070.001","T1070.003","T1070.004","T1070.006"],tactics:["Defense Evasion"],confidence_boost:.15,min_match:2,severity:"high"}},v={T1566:{detection_strategies:[{name:"Email Gateway Analysis",description:"Monitor email gateways for suspicious attachments, links, and sender reputation",data_sources:["Email Gateway","Email Header Analysis","Link Analysis"]},{name:"User Behavior Analytics",description:"Detect anomalous email interactions and suspicious file downloads",data_sources:["User Activity Monitoring","File Download Events"]}],analytics:[{name:"Suspicious Attachment Detection",description:"Alert on emails with executable attachments or macro-enabled documents from external senders",false_positive_rate:"medium",data_sources:["Email Gateway","File Metadata"]}]},T1190:{detection_strategies:[{name:"Web Application Firewall (WAF)",description:"Monitor for exploit attempts, SQL injection, command injection patterns",data_sources:["WAF Logs","Application Logs","Network Traffic"]},{name:"Vulnerability Scanning Correlation",description:"Correlate scanning activity with exploitation attempts",data_sources:["IDS/IPS","Network Flow"]}],analytics:[{name:"Web Shell Detection",description:"Monitor web directories for unexpected file creation or modification",false_positive_rate:"low",data_sources:["File Integrity Monitoring","Web Server Logs"]}]},"T1059.001":{detection_strategies:[{name:"PowerShell Logging",description:"Enable ScriptBlock logging and monitor for suspicious cmdlets and encoded commands",data_sources:["PowerShell Logs (Event ID 4104)","Process Creation"]},{name:"Command-Line Analysis",description:"Analyze command-line arguments for obfuscation, base64 encoding, download cradles",data_sources:["Sysmon Event ID 1","EDR Telemetry"]}],analytics:[{name:"Encoded PowerShell Command",description:"Alert on PowerShell with -EncodedCommand, -Enc, or Base64 strings",pseudocode:"powershell.exe -enc OR -EncodedCommand OR [Convert]::FromBase64String",false_positive_rate:"low",data_sources:["Process Command Line"]},{name:"PowerShell Download Cradle",description:"Detect IEX (Invoke-Expression) with web requests",pseudocode:"IEX (New-Object Net.WebClient).DownloadString",false_positive_rate:"low",data_sources:["PowerShell Logs","Network Connections"]}]},"T1059.003":{detection_strategies:[{name:"Process Monitoring",description:"Monitor cmd.exe spawned by unusual parents (e.g., Office apps, browsers)",data_sources:["Process Creation (Sysmon Event ID 1)","Parent-Child Process Trees"]}],analytics:[{name:"Suspicious cmd.exe Parent",description:"Alert on cmd.exe spawned by WINWORD.EXE, EXCEL.EXE, or browsers",false_positive_rate:"low",data_sources:["Process Creation"]}]},"T1547.001":{detection_strategies:[{name:"Registry Monitoring",description:"Monitor Registry Run keys for unauthorized modifications",data_sources:["Registry Events (Sysmon Event ID 13)","Windows Event ID 4657"]}],analytics:[{name:"New Registry Run Key",description:"Alert on creation of new Run/RunOnce registry entries",pseudocode:"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run[Once]",false_positive_rate:"medium",data_sources:["Registry Modifications"]}]},"T1053.005":{detection_strategies:[{name:"Scheduled Task Monitoring",description:"Monitor schtasks.exe and Task Scheduler service for new/modified tasks",data_sources:["Sysmon Event ID 1","Windows Event ID 4698 (Task Created)"]}],analytics:[{name:"Suspicious Scheduled Task",description:"Alert on tasks created via schtasks.exe with unusual paths or accounts",false_positive_rate:"low",data_sources:["Process Creation","Scheduled Task Logs"]}]},"T1003.001":{detection_strategies:[{name:"LSASS Process Access Monitoring",description:"Monitor for suspicious process access to lsass.exe",data_sources:["Sysmon Event ID 10 (ProcessAccess)","EDR Telemetry"]},{name:"Credential Dumping Tool Detection",description:"Detect known tools (Mimikatz, ProcDump, Comsvcs.dll)",data_sources:["File Hash Analysis","Process Execution"]}],analytics:[{name:"LSASS Memory Access",description:"Alert on non-system processes accessing lsass.exe with PROCESS_VM_READ",pseudocode:"TargetImage = lsass.exe AND GrantedAccess = 0x1010 (PROCESS_VM_READ)",false_positive_rate:"low",data_sources:["Process Access Events"]}]},"T1558.003":{detection_strategies:[{name:"Kerberos Traffic Analysis",description:"Monitor for TGS-REQ requests with RC4 encryption for service accounts",data_sources:["Windows Event ID 4769","Network Traffic"]}],analytics:[{name:"Kerberos RC4 Encryption Downgrade",description:"Alert on TGS requests using RC4 encryption (0x17) for SPNs",fal
1se_positive_rate:"low",data_sources:["Windows Security Event Logs"]}]},"T1021.001":{detection_strategies:[{name:"RDP Session Monitoring",description:"Monitor RDP logons, especially from unusual sources or at unusual times",data_sources:["Windows Event ID 4624 (Type 10)","Network Connections"]}],analytics:[{name:"Lateral RDP",description:"Alert on RDP connections between internal systems",false_positive_rate:"medium",data_sources:["Windows Security Logs","Network Flow"]}]},"T1021.002":{detection_strategies:[{name:"SMB Traffic Analysis",description:"Monitor SMB connections to admin shares (C$, ADMIN$)",data_sources:["Windows Event ID 5140","Network Traffic"]}],analytics:[{name:"Admin Share Access",description:"Alert on connections to ADMIN$ or C$ from unusual sources",false_positive_rate:"low",data_sources:["SMB Logs"]}]},"T1071.001":{detection_strategies:[{name:"TLS/SSL Inspection",description:"Inspect HTTPS traffic for C2 beaconing patterns and unusual destinations",data_sources:["Proxy Logs","Network Traffic Analysis","DNS Logs"]},{name:"Beaconing Detection",description:"Detect periodic connections to same destination at regular intervals",data_sources:["Network Flow Analysis","Firewall Logs"]}],analytics:[{name:"Regular Beaconing Pattern",description:"Alert on connections to external IPs at regular intervals (< 5% jitter)",false_positive_rate:"medium",data_sources:["Network Connection Logs"]}]},T1090:{detection_strategies:[{name:"Proxy Tool Detection",description:"Detect proxy tools (Proxifier, Tor, SSH tunneling)",data_sources:["Process Execution","Network Connections"]}],analytics:[{name:"SOCKS Proxy Usage",description:"Alert on SOCKS proxy connections from workstations",false_positive_rate:"low",data_sources:["Network Traffic","Proxy Logs"]}]},T1567:{detection_strategies:[{name:"Cloud Storage Traffic Analysis",description:"Monitor uploads to cloud storage services (Dropbox, Google Drive, OneDrive)",data_sources:["Proxy Logs","DLP","Cloud Access Security Broker (CASB)"]}],analytics:[{name:"Large Upload to Cloud Storage",description:"Alert on uploads > 100MB to cloud storage by non-authorized users",false_positive_rate:"medium",data_sources:["Proxy Logs","Network Traffic"]}]},T1048:{detection_strategies:[{name:"Unusual Protocol Usage",description:"Detect data transfer over DNS, ICMP, or other unusual protocols",data_sources:["Network Traffic Analysis","DNS Logs"]}],analytics:[{name:"DNS Tunneling",description:"Alert on unusually long DNS queries or high query volume to single domain",false_positive_rate:"low",data_sources:["DNS Logs"]}]},T1486:{detection_strategies:[{name:"File System Monitoring",description:"Monitor for mass file encryption, extensions changes, and ransom notes",data_sources:["File System Events","EDR Telemetry"]},{name:"Entropy Analysis",description:"Detect significant increase in file entropy indicating encryption",data_sources:["File Content Analysis","EDR"]}],analytics:[{name:"Mass File Encryption",description:"Alert on rapid file modification (>100 files in < 60 seconds)",false_positive_rate:"low",data_sources:["File System Events"]},{name:"Ransom Note Creation",description:"Alert on creation of .txt files with ransom keywords (decrypt, bitcoin, payment)",false_positive_rate:"low",data_sources:["File Creation Events"]}]},T1490:{detection_strategies:[{name:"Backup Deletion Monitoring",description:"Monitor for vssadmin.exe, wmic.exe deleting shadow copies or backups",data_sources:["Process Creation","Command Line"]}],analytics:[{name:"Shadow Copy Deletion",description:"Alert on vssadmin delete shadows or wmic shadowcopy delete",pseudocode:"vssadmin.exe delete shadows /all OR wmic shadowcopy delete",false_positive_rate:"low",data_sources:["Process Command Line"]}]},"T1562.001":{detection_strategies:[{name:"Security Tool Monitoring",description:"Monitor for disabling of Windows Defender, firewalls, or EDR agents",data_sources:["Registry Modifications","Service Control Events"]}],analytics:[{name:"Windows Defender Disabled",description:"Alert on DisableAntiSpyware registry key set to 1",pseudocode:"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\DisableAntiSpyware = 1",false_positive_rate:"low",data_sources:["Registry Events"]}]}};function k(e){let{article:t}
1=e,[r,i]=(0,s.useState)(null),[o,c]=(0,s.useState)(!0),[d,l]=(0,s.useState)("ai"),[u,m]=(0,s.useState)({}),[h,p]=(0,s.useState)({}),[x,g]=(0,s.useState)({});(0,s.useEffect)(()=>{c(!0),i((0,b.bG)({title:t.title,ai_summary:t.ai_summary,summary:t.summary||"",content:void 0})),c(!1)},[t.title,t.ai_summary,t.summary]);let{aiTechniques:f,keywordOnlyTechniques:k,hasAnyTechniques:w,attackPatterns:j}=(0,s.useMemo)(()=>{let e=t.ai_mitre_techniques||[],a=(null==r?void 0:r.techniques)||[],s=new Set(e.map(e=>e.id)),n=a.filter(e=>!s.has(e.id)),i=function(e){let t=[];for(let r of Object.values(y)){let a=[];for(let t of r.techniques)e.some(e=>e===t||e.startsWith(t+"."))&&a.push(t);let s=a.length;if(s>=r.min_match){let e=s/r.techniques.length,n=s===r.techniques.length;t.push({pattern:r,matchedTechniques:a,matchCount:s,totalTechniques:r.techniques.length,confidence:e,isComplete:n})}}return t.sort((e,t)=>t.confidence-e.confidence),t}([...e.map(e=>e.id),...n.map(e=>e.id)]);return{aiTechniques:e,keywordOnlyTechniques:n,hasAnyTechniques:e.length>0||n.length>0,attackPatterns:i}}
1,[t.ai_mitre_techniques,r]);if(o)return(0,a.jsx)("div",{className:"p-4 rounded-lg bg-surface-secondary dark:bg-surface-secondary-dark",children:(0,a.jsx)("p",{className:"text-sm text-text-secondary dark:text-text-secondary-dark",children:"Analyzing MITRE ATT&CK techniques..."})});if(!w)return(0,a.jsx)("div",{className:"p-4 rounded-lg border bg-surface-secondary dark:bg-surface-secondary-dark border-subtle dark:border-subtle-dark",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("svg",{className:"w-5 h-5 mt-0.5 text-text-tertiary dark:text-text-tertiary-dark",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-primary dark:text-text-primary-dark",children:"No MITRE ATT&CK techniques detected"}),(0,a.jsx)("p",{className:"text-xs mt-1 text-text-tertiary dark:text-text-tertiary-dark",children:"This article may be informational content rather than a threat analysis."})]})]})});let T=e=>{p(t=>({...t,[e]:!t[e]}))},N=e=>{g(t=>({...t,[e]:!t[e]}))},S=(e,t)=>{let r="evidence"in e&&e.evidence,s=h[e.id],i=x[e.id],o=function(e){if(v[e])return v[e];let t=e.split(".")[0];return v[t]?v[t]:{detection_strategies:[{name:"General Monitoring",description:"Implement behavior-based detection and monitor related data sources. Consult MITRE ATT&CK for specific detection guidance.",data_sources:["Process Monitoring","Network Traffic Analysis","File System Events"]}],analytics:[{name:"Custom Detection Rule",description:"Develop custom analytics based on technique characteristics and organizational environment",false_positive_rate:"medium",data_sources:["Multiple Sources"]}]}}(e.id);return(0,a.jsxs)("div",{className:"rounded-lg border transition-colors bg-surface dark:bg-surface-dark border-subtle dark:border-subtle-dark","data-sentry-component":"renderTechniqueCard","data-sentry-source-file":"AttackPanel.tsx",children:[(0,a.jsx)("div",{className:"p-3",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("span",{className:"text-xs font-mono px-2 py-0.5 rounded bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",children:e.id}),(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded font-medium bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300",children:e.tactic})]}),(0,a.jsx)("h4",{className:"text-sm font-medium text-text-primary dark:text-text-primary-dark",children:e.name}),(0,a.jsx)("p",{className:"text-xs mt-1 text-text-secondary dark:text-text-secondary-dark",children:"description"in e?e.description:"AI-detected technique"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("a",{href:"https://attack.mitre.org/techniques/".concat(e.id.replace(".","/"),"/"),target:"_blank",rel:"noopener noreferrer",className:"text-xs px-2 py-1 rounded transition-colors flex-shrink-0 bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark hover:bg-btn-secondary-bg-hover dark:hover:bg-btn-secondary-bg-hover-dark",children:"View Details"}),r&&(0,a.jsxs)("button",{onClick:()=>T(e.id),className:"text-xs px-2 py-1 rounded transition-colors flex items-center gap-1 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 hover:bg-blue-200 dark:hover:bg-blue-900/50",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Evidence"]}),(0,a.jsxs)("button",{onClick:()=>N(e.id),className:"text-xs px-2 py-1 rounded transition-colors flex items-center gap-1 bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300 hover:bg-green-200 dark:hover:bg-green-900/50",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","data-sentry-element":"svg","data-sentry-source-file":"AttackPanel.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z","data-sentry-element":"path","data-sentry-source-file":"AttackPanel.tsx"})}),"Detection"]})]})]})}
1),r&&s&&(0,a.jsx)("div",{className:"px-3 pb-3 pt-0 border-t mt-2 border-subtle dark:border-subtle-dark",children:(0,a.jsxs)("div",{className:"p-3 rounded-lg space-y-2 text-xs bg-surface-secondary dark:bg-surface-secondary-dark",children:[(0,a.jsx)("div",{className:"font-semibold text-text-primary dark:text-text-primary-dark",children:"Context-Rich Evidence"}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-info",children:"What:"}),(0,a.jsx)("span",{className:"ml-2 text-text-primary dark:text-text-primary-dark",children:e.evidence.what})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-info",children:"How:"}),(0,a.jsx)("span",{className:"ml-2 text-text-primary dark:text-text-primary-dark",children:e.evidence.how})]}),(0,a.jsxs)("div",{className:"p-2 rounded border-l-2 italic bg-surface dark:bg-surface-dark border-blue-400 dark:border-blue-500/50 text-text-secondary dark:text-text-secondary-dark",children:[(0,a.jsx)("span",{className:"font-medium not-italic text-info",children:"Quote:"}),(0,a.jsxs)("span",{className:"ml-2",children:['"',e.evidence.quote,'"']})]}),e.evidence.who&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-info",children:"Who:"}),(0,a.jsx)("span",{className:"ml-2 text-text-primary dark:text-text-primary-dark",children:e.evidence.who})]}),e.evidence.when&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-info",children:"When:"}),(0,a.jsx)("span",{className:"ml-2 text-text-primary dark:text-text-primary-dark",children:e.evidence.when})]}),e.evidence.where&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-info",children:"Where:"}),(0,a.jsx)("span",{className:"ml-2 text-text-primary dark:text-text-primary-dark",children:e.evidence.where})]}),e.evidence.why&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-info",children:"Why:"}),(0,a.jsx)("span",{className:"ml-2 text-text-primary dark:text-text-primary-dark",children:e.evidence.why})]})]})]})}),i&&(0,a.jsx)("div",{className:"px-3 pb-3 pt-0 border-t mt-2 border-subtle dark:border-subtle-dark",children:(0,a.jsxs)("div",{className:"p-3 rounded-lg space-y-3 text-xs bg-surface-secondary dark:bg-surface-secondary-dark",children:[(0,a.jsx)("div",{className:"font-semibold text-sm text-text-primary dark:text-text-primary-dark",children:"Detection Guidance (MITRE ATT&CK v18)"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"font-medium text-green-600 dark:text-green-400",children:"Detection Strategies:"}),o.detection_strategies.map((e,t)=>(0,a.jsxs)("div",{className:"p-2 rounded border-l-2 bg-surface dark:bg-surface-dark border-green-400 dark:border-green-500/50",children:[(0,a.jsx)("div",{className:"font-medium text-text-primary dark:text-text-primary-dark",children:e.name}),(0,a.jsx)("p",{className:"mt-1 text-text-secondary dark:text-text-secondary-dark",children:e.description}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1.5",children:e.data_sources.map((e,t)=>(0,a.jsx)("span",{className:"px-2 py-0.5 rounded text-xs bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",children:e},t))})]},t))]}),o.analytics.length>0&&(0,a.jsxs)("div",{className:"space-y-2 pt-2 border-t border-subtle dark:border-subtle-dark",children:[(0,a.jsx)("div",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Detection Analytics:"}),o.analytics.map((e,t)=>(0,a.jsxs)("div",{className:"p-2 rounded border-l-2 bg-surface dark:bg-surface-dark border-yellow-400 dark:border-yellow-500/50",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 mb-1",children:[(0,a.jsx)("div",{className:"font-medium text-text-primary dark:text-text-primary-dark",children:e.name}),(0,a.jsxs)("span",{className:(0,n.Z)("px-2 py-0.5 rounded text-xs font-medium whitespace-nowrap","low"===e.false_positive_rate&&"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300","medium"===e.false_positive_rate&&"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300","high"===e.false_positive_rate&&"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"),children:[e.false_positive_rate.toUpperCase()," FP"]})]}),(0,a.jsx)("p",{className:"mt-1 text-text-secondary dark:text-text-secondary-dark",children:e.description}),e.pseudocode&&(0,a.jsx)("div",{className:"mt-2 p-2 rounded font-mono text-xs bg-surface-secondary dark:bg-surface-secondary-dark text-green-700 dark:text-green-400",children:e.pseudocode}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1.5",children:e.data_sources.map((e,t)=>(0,a.jsx)("span",{className:"px-2 py-0.5 rounded text-xs bg-blue-100 dar
1k:bg-blue-900/30 text-blue-700 dark:text-blue-300",children:e},t))})]},t))]}),(0,a.jsxs)("div",{className:"p-2 rounded text-xs bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300",children:[(0,a.jsx)("p",{className:"font-medium mb-1",children:"\uD83D\uDCA1 Implementation Guidance"}),(0,a.jsx)("p",{className:"opacity-90",children:"Review your SIEM, EDR, and other security tools to ensure you have the required data sources. Tune analytics based on your environment to minimize false positives while maintaining detection coverage."})]})]})})]},e.id)};return(0,a.jsxs)("div",{className:"space-y-4","data-sentry-component":"AttackPanel","data-sentry-source-file":"AttackPanel.tsx",children:[f.length>0&&(0,a.jsxs)("div",{className:"border rounded-lg overflow-hidden bg-green-50 dark:bg-green-900/10 border-green-200 dark:border-green-800/50",children:[(0,a.jsxs)("button",{onClick:()=>l("ai"===d?null:"ai"),className:"w-full px-4 py-3 flex items-center justify-between transition-colors hover:bg-green-100 dark:hover:bg-green-900/20",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-green-600 dark:text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("h3",{className:"font-semibold text-sm text-green-900 dark:text-green-300",children:"AI-Validated Techniques"}),(0,a.jsxs)("p",{className:"text-xs mt-0.5 text-green-700 dark:text-green-400/70",children:[f.length," technique",1!==f.length?"s":""," detected by semantic analysis ⢠High confidence"]})]})]}),(0,a.jsx)("svg",{className:(0,n.Z)("w-5 h-5 transition-transform text-green-600 dark:text-green-400","ai"===d&&"transform rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),"ai"===d&&(0,a.jsxs)("div",{className:"px-4 py-3 border-t space-y-3 border-green-200 dark:border-green-800/50",children:[f.map(e=>S(e,"high")),(0,a.jsxs)("div",{className:"p-3 rounded-lg text-xs bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300",children:[(0,a.jsx)("p",{className:"font-medium mb-1",children:"â Verified by AI Analysis"}),(0,a.jsx)("p",{className:"opacity-90",children:"These techniques were identified through semantic understanding of the article content by GPT-4o-mini. They represent actual threats discussed in the article, not incidental keyword matches."})]})]})]}),k.length>0&&(0,a.jsxs)("div",{className:"border rounded-lg overflow-hidden bg-yellow-50 dark:bg-yellow-900/10 border-yellow-200 dark:border-yellow-800/50",children:[(0,a.jsxs)("button",{onClick:()=>l("keyword"===d?null:"keyword"),className:"w-full px-4 py-3 flex items-center justify-between transition-colors hover:bg-yellow-100 dark:hover:bg-yellow-900/20",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-yellow-600 dark:text-yellow-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("h3",{className:"font-semibold text-sm text-yellow-900 dark:text-yellow-300",children:"Keyword-Detected Techniques"}),(0,a.jsxs)("p",{className:"text-xs mt-0.5 text-yellow-700 dark:text-yellow-400/70",children:[k.length," technique",1!==k.length?"s":""," detected by pattern matching ⢠Review recommended"]})]})]}),(0,a.jsx)("svg",{className:(0,n.Z)("w-5 h-5 transition-transform text-yellow-600 dark:text-yellow-400","keyword"===d&&"transform rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),"keyword"===d&&(0,a.jsxs)("div",{className:"px-4 py-3 border-t space-y-3 border-yellow-200 dark:border-yellow-800/50",children:[k.map(e=>S(e,"low")),(0,a.jsxs)("div",{className:"p-3 rounded-lg text-xs bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300",children:[(0,a.jsx)("p",{className:"font-medium mb-1",children:"â Review Context Recommended"}),(0,a.jsx)("p",{className:"opacity-90",children:"These techniques were detected by keyword pattern matching. They may represent actual threats or could be false positives from incidental mentions. Review the article context to confirm relevance."})]})]})]}),j.length>0&&(0,a.jsxs)("div",{className:"border rounded-lg overflow-hidden bg-red-50 dark:bg-red-900/10 border-red-200 dark:border-red-800/50",children:[(0,a.jsx)("div",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("svg",{className:"w-5 h-5 mt-0.5 text-red-600 dark:text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"font-semibold text-sm text-red-900 dark:text-red-300",children:"\uD83C\uDFAF Detected Attack Chains"}),(0,a.jsxs)("p",{className:"text-xs mt-0.5 text-red-700 dark:text-red-400/70",children:[j.length," known attack pattern",1!==j.length?"s":""," identified ⢠Pattern-based validation"]})]})]})}),(0,a.jsxs)("div",{className:"px-4 pb-4 space-y-3",children:[j.map((e,t)=>(0,a.jsxs)("div",{className:"p-3 rounded-lg border bg-surface dark:bg-surface-dark border-subtle dark:border-subtle-dark",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("span",{className:(0,n.Z)("text-xs px-2 py-0.5 rounded font-medium","critical"===e.pattern.severity&&"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300","high"===e.pattern.severity&&"bg-orange-100 dar
1k:bg-orange-900/30 text-orange-700 dark:text-orange-300","medium"===e.pattern.severity&&"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300","low"===e.pattern.severity&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300"),children:e.pattern.severity.toUpperCase()}),(0,a.jsx)("span",{className:(0,n.Z)("text-xs px-2 py-0.5 rounded font-medium",e.isComplete?"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300":"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300"),children:e.isComplete?"Complete Chain":"Partial Match"}),(0,a.jsxs)("span",{className:"text-xs px-2 py-0.5 rounded font-mono bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",children:[e.matchCount,"/",e.totalTechniques," techniques"]})]}),(0,a.jsx)("h4",{className:"text-sm font-semibold text-text-primary dark:text-text-primary-dark",children:e.pattern.name}),(0,a.jsx)("p",{className:"text-xs mt-1 text-text-secondary dark:text-text-secondary-dark",children:e.pattern.description})]}),(0,a.jsxs)("div",{className:"text-lg font-bold text-red-600 dark:text-red-400",children:[Math.round(100*e.confidence),"%"]})]}),(0,a.jsxs)("div",{className:"text-xs mt-2 pt-2 border-t border-subtle dark:border-subtle-dark",children:[(0,a.jsx)("span",{className:"font-medium text-text-primary dark:text-text-primary-dark",children:"Matched Techniques:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.matchedTechniques.map(e=>(0,a.jsx)("span",{className:"px-2 py-0.5 rounded font-mono bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark",children:e},e))})]}),(0,a.jsxs)("div",{className:"text-xs mt-2 pt-2 border-t border-subtle dark:border-subtle-dark",children:[(0,a.jsx)("span",{className:"font-medium text-text-primary dark:text-text-primary-dark",children:"Attack Chain:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.pattern.tactics.map((t,r)=>(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"px-2 py-0.5 rounded text-xs bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300",children:t}),r<e.pattern.tactics.length-1&&(0,a.jsx)("span",{className:"mx-1 text-text-tertiary dark:text-text-tertiary-dark",children:"â"})]},r))})]})]},e.pattern.id)),(0,a.jsxs)("div",{className:"p-3 rounded-lg text-xs bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300",children:[(0,a.jsx)("p",{className:"font-medium mb-1",children:"â¡ Attack Pattern Validation"}),(0,a.jsx)("p",{className:"opacity-90",children:"These patterns match known attack chains from real-world APT campaigns. Complete chains indicate a sophisticated, multi-stage attack. Prioritize investigation and response."})]})]})]}),(0,a.jsx)("div",{className:"text-xs p-3 rounded-lg bg-surface-secondary dark:bg-surface-secondary-dark text-text-secondary dark:text-text-secondary-dark",children:(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"font-medium",children:"Note:"})," Review your detection coverage for these techniques. Ensure your SIEM, EDR, and other security tools can detect and alert on these attack patterns."]})})]})}var w=r(99967);function j(e){let{article:t,onClose:r,onPrevious:l,onNext:u,hasPrevious:m=!1,hasNext:h=!1}=e,{isAuthenticated:p}=(0,c.aC)(),{openLoginModal:x,openRegisterModal:g}=(0,d.f)(),[b,y]=(0,s.useState)("overview"),[v,j]=(0,s.useState)(t.ai_summary||null),[T,N]=(0,s.useState)(t.ai_mitre_te
1chniques||null),[S,_]=(0,s.useState)(!1),[C,A]=(0,s.useState)(null),E=(0,s.useRef)(null),D=(0,s.useRef)(null),L=(0,s.useRef)(!1);(0,s.useEffect)(()=>()=>{E.current&&clearTimeout(E.current),D.current&&D.current.abort(),L.current=!1},[t.id]),(0,s.useEffect)(()=>{if(t.ai_summary||L.current){t.ai_summary&&!v&&j(t.ai_summary);return}L.current=!0,_(!0),A(null),D.current=new AbortController;let e=D.current.signal,r=async()=>{if(!e.aborted)try{let a=await fetch("/api/articles/".concat(t.id,"/summary?_t=").concat(Date.now()),{cache:"no-store",headers:{"Cache-Control":"no-cache"},signal:e});if(e.aborted)return;let s=await a.json();s.success&&s.summary?(j(s.summary),s.mitreTechniques&&N(s.mitreTechniques),_(!1)):"generating"===s.status?E.current=setTimeout(r,3e3):("skipped"===s.status||"failed"===s.status&&A(s.error||"Failed to generate summary"),_(!1))}catch(t){if(e.aborted)return;console.error("Error fetching AI summary:",t),A("Failed to load summary"),_(!1)}};r()},[t.id,t.ai_summary,v]);let M=[{id:"overview",label:"Overview"},{id:"iocs",label:"IOCs"},...p?[{id:"attack",label:"MITRE ATT&CK"}]:[]];return(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r]),(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"article-modal-title","data-sentry-component":"ArticleDetailModal","data-sentry-source-file":"ArticleDetailModal.tsx",children:[(0,a.jsx)("div",{className:"absolute inset-0 transition-all bg-modal-backdrop dark:bg-modal-backdrop-dark backdrop-blur-sm",onClick:r,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:"relative w-full max-w-5xl max-h-[90vh] overflow-hidden rounded-lg shadow-2xl transition-colors flex flex-col bg-surface dark:bg-surface-dark border border-subtle dark:border-subtle-dark",children:[(0,a.jsxs)("div",{className:"px-4 sm:px-6 py-3 sm:py-4 border-b border-subtle dark:border-subtle-dark",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-3 md:mb-0 md:float-right md:ml-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 md:gap-2",role:"group","aria-label":"Article navigation",children:[(0,a.jsx)("button",{onClick:l,disabled:!m,"aria-label":"Previous article",className:(0,n.Z)("inline-flex items-center justify-center","min-w-[44px] min-h-[44px] w-11 h-11","md:w-auto md:h-auto md:min-w-0 md:min-h-0","md:px-3 md:py-2","rounded-full md:rounded","text-sm transition-all duration-150","focus:outline-none focus:ring-2 focus:ring-offset-1",m?"bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark hover:bg-hover-bg dark:hover:bg-hover-bg-dark focus:ring-accent/50 dark:focus:ring-accent-dark/50 active:scale-95":"bg-surface-muted text-disabled cursor-not-allowed"),children:(0,a.jsx)("svg",{className:"w-5 h-5 md:w-4 md:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true","data-sentry-element":"svg","data-sentry-source-file":"ArticleDetailModal.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7","data-sentry-element":"path","data-sentry-source-file":"ArticleDetailModal.tsx"})})}),(0,a.jsx)("button",{onClick:u,disabled:!h,"aria-label":"Next article",className:(0,n.Z)("inline-flex items-center justify-center","min-w-[44px] min-h-[44px] w-11 h-11","md:w-auto md:h-auto md:min-w-0 md:min-h-0","md:px-3 md:py-2","rounded-full md:rounded","text-sm transition-all duration-150","focus:outline-none focus:ring-2 focus:ring-offset-1",h?"bg-btn-secondary-bg dark:bg-btn-secondary-bg-dark text-btn-secondary-text dark:text-btn-secondary-text-dark hover:bg-hover-bg dark:hover:bg-hover-bg-dark focus:ring-accent/50 dark:focus:ring-accent-dark/50 active:scale-95":"bg-surface-muted text-disabled cursor-not-allowed"),children:(0,a.jsx)("svg",{className:"w-5 h-5 md:w-4 md:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true","data-sentry-element":"svg","data-sentry-source-file":"ArticleDetailModal.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7","data-sentry-element":"path","data-sentry-source-file":"ArticleDetailModal.tsx"})})})]}),(0,a.jsx)("button",{onClick:r,"aria-label":"Close article details modal",className:(0,n.Z)("inline-flex items-center justify-center","min-w-[44px] min-h-[44px] w-11 h-11","md:w-auto md:h-auto md:min-w-0 md:min-
1h-0","md:p-2","rounded-full md:rounded","transition-all duration-150","text-text-secondary dark:text-text-secondary-dark","hover:text-text-primary dark:hover:text-text-primary-dark","hover:bg-hover-bg dark:hover:bg-hover-bg-dark","active:scale-95 active:bg-gray-200 dark:active:bg-slate-700","focus:outline-none focus:ring-2 focus:ring-accent/50 dark:focus:ring-accent-dark/50 focus:ring-offset-1"),children:(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true","data-sentry-element":"svg","data-sentry-source-file":"ArticleDetailModal.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12","data-sentry-element":"path","data-sentry-source-file":"ArticleDetailModal.tsx"})})})]}),(0,a.jsxs)("div",{className:"md:pr-40",children:[(0,a.jsx)("h2",{id:"article-modal-title",className:"text-lg sm:text-xl font-semibold mb-2 break-words text-text-primary dark:text-text-primary-dark leading-tight",children:t.title}),(0,a.jsxs)("div",{className:"text-xs flex items-center gap-2 md:gap-3 flex-wrap text-text-tertiary dark:text-text-tertiary-dark",children:[(0,a.jsx)("span",{className:"font-medium",children:t.source}),(0,a.jsx)("span",{className:"hidden sm:inline text-text-tertiary/50 dark:text-text-tertiary-dark/50",children:"â¢"}),(0,a.jsx)("time",{dateTime:t.published_at,className:"text-[11px] sm:text-xs",children:(0,o.WU)(new Date(t.published_at),"dd/MM/yyyy, HH:mm")}),(0,a.jsx)("span",{className:"text-text-tertiary/50 dark:text-text-tertiary-dark/50",children:"â¢"}),(0,a.jsxs)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:(0,n.Z)("inline-flex items-center gap-1","font-medium","text-link","hover:text-link-hover dark:hover:text-link-hover-dark","hover:underline underline-offset-2","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-1 rounded"),children:["View Original",(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true","data-sentry-element":"svg","data-sentry-source-file":"ArticleDetailModal.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14","data-sentry-element":"path","data-sentry-source-file":"ArticleDetailModal.tsx"})})]})]})]})]}),(0,a.jsx)("div",{className:"px-4 sm:px-6 py-2 sm:py-3 border-b border-subtle dark:border-subtle-dark bg-gray-50 dark:bg-slate-800/30 overflow-x-auto",children:(0,a.jsx)("div",{className:"flex gap-2 min-w-max",role:"tablist","aria-label":"Article details tabs",children:M.map(e=>(0,a.jsx)("button",{onClick:()=>y(e.id),role:"tab","aria-selected":b===e.id,"aria-controls":"tabpanel-".concat(e.id),className:(0,n.Z)("min-h-[44px] sm:min-h-0","px-4 sm:px-4 py-2.5 sm:py-2","text-sm rounded","transition-all duration-150 whitespace-nowrap","focus:outline-none focus:ring-2 focus:ring-accent/50 dark:focus:ring-accent-dark/50 focus:ring-offset-1",b===e.id?"bg-white dark:bg-slate-700 text-text-primary dark:text-text-primary-dark shadow-sm font-semibold":"text-text-secondary dark:text-text-secondary-dark hover:text-text-primary dark:hover:text-text-primary-dark hover:bg-white/50 dark:hover:bg-slate-800/50 active:scale-[0.98]"),children:e.label},e.id))})}),(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:(0,a.jsxs)("div",{className:"p-4 sm:p-6",children:["overview"===b&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"rounded-xl border p-5 bg-white dark:bg-slate-800/40 border-subtle dark:border-slate-700/50",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-info",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary dark:text-text-primary-dark",children:"Summary"})]}),S&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-info",children:[(0,a.jsxs)("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,a.jsx)("span",{children:"Generating AI summary..."})]}),(t.ai_summary||t.summary)&&(0,a.jsx)("p",{className:"text-sm leading-relaxed text-text-secondary dark:text-text-secondary-dark opacity-60",children:t.ai_summary||t.summary})]}),C&&!S&&!v&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("p",{className:"text-sm text-red-500 dark:text-red-400",children:C}),(t.ai_summary||t.summary)&&(0,a.jsx)("p",{className:"text-sm leading-relaxed text-text-secondary dark:text-text-secondary-dark",children:t.ai_summary||t.summary})]}),!v&&!S&&!C&&(t.ai_summary||t.summary)&&(0,a.jsx)("p",{className:"text-sm leading-relaxed text-text-secondary dark:text-text-secondary-dark",children:t.ai_summary||t.summary}),v&&(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsx)(i.UG,{components:{h3:e=>{let{node:t,...r}=e,s=String(r.children);return(0,a.jsx)("h3",{className:"text-sm font-bold mb-3 pb-2 border-b text-text-primary dark:text-text-primary-dark border-subtle dark:border-slate-700",children:s})},p:e=>{let{node:t,...r}=e,s=String(r.children).match(/^(Main threat|Impact assessment|Recommended actions|Technical Details|IOCs Mentioned):\s*(.+)$/i);if(s){let[,e,t]=s;if(e.toLowerCase().includes("ioc")&&t.toLowerCase().includes("none"))return null;let r=["malware","ransomware","phishing","apt","zero-day","vulnerability","exploit"].filter(e=>t.toLowerCase().includes(e)),i=["finance","financial","healthcare","government","manufacturing","education","retail"].filter(e=>t.toLowerCase().includes(e));return(0,a.jsxs)("div",{className:"mb-4 last:mb-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)("div",{className:(0,n.Z)("flex-shrink-0 w-5 h-5 rounded-md flex items-center justify-center",e.toLowerCase().includes("threat")?"bg-red-100 dark:bg-red-500/15 text-red-700 dark:text-red-400":e.toLowerCase().includes("impact")?"bg-orange-100 dar
1k:bg-orange-500/15 text-orange-700 dark:text-orange-400":e.toLowerCase().includes("action")?"bg-green-100 dark:bg-green-500/15 text-green-700 dark:text-green-400":"bg-blue-100 dark:bg-blue-500/15 text-blue-700 dark:text-blue-400"),children:(0,a.jsxs)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2.5,children:[e.toLowerCase().includes("threat")&&(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}),e.toLowerCase().includes("impact")&&(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 10V3L4 14h7v7l9-11h-7z"}),e.toLowerCase().includes("action")&&(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),e.toLowerCase().includes("technical")&&(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})]})}),(0,a.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-text-tertiary dark:text-text-tertiary-dark",children:e})]}),(0,a.jsx)("div",{className:"text-sm leading-relaxed ml-7 text-text-secondary dark:text-text-secondary-dark",children:t}),(r.length>0||i.length>0)&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-1.5 mt-2.5 ml-7",children:[r.map((e,t)=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wide bg-red-50 dark:bg-red-500/15 text-red-700 dark:text-red-400 border border-red-200 dark:border-red-500/30",role:"status","aria-label":"Threat type: ".concat(e),children:[(0,a.jsx)("svg",{className:"w-2.5 h-2.5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),e]},"threat-".concat(t))),i.map((e,t)=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wide bg-blue-50 dark:bg-blue-500/15 text-blue-700 dark:text-blue-400 border border-blue-200 dark:border-blue-500/30",role:"status","aria-label":"Affected industry: ".concat(e),children:[(0,a.jsx)("svg",{className:"w-2.5 h-2.5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h8a2 2 0 012 2v12a1 1 0 110 2h-3a1 1 0 01-1-1v-2a1 1 0 00-1-1H9a1 1 0 00-1 1v2a1 1 0 01-1 1H4a1 1 0 110-2V4zm3 1h2v2H7V5zm2 4H7v2h2V9zm2-4h2v2h-2V5zm2 4h-2v2h2V9z",clipRule:"evenodd"})}),e]},"industry-".concat(t)))]})]})}return(0,a.jsx)("p",{className:"text-sm leading-relaxed mb-3 text-text-secondary dark:text-text-secondary-dark",children:r.children})},ul:e=>{let{node:t,...r}=e;return(0,a.jsx)("ul",{className:"space-y-2 mb-4",role:"list",...r})},li:e=>{let{node:t,...r}=e;return(0,a.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,a.jsx)("span",{className:"inline-block w-1.5 h-1.5 rounded-full mt-2 flex-shrink-0 bg-blue-600 dark:bg-blue-400","aria-hidden":"true"}),(0,a.jsx)("span",{className:"text-sm leading-relaxed flex-1 text-text-secondary dark:text-text-secondary-dark",children:r.children})]})},strong:e=>{let{node:t,...r}=e;return(0,a.jsx)("strong",{className:"font-bold text-text-primary dark:text-text-primary-dark",...r})},a:e=>{let{node:t,...r}=e;return(0,a.jsx)("a",{className:"underline underline-offset-2 transition-colors font-medium text-link hover:text-link-hover dark:hover:text-link-hover-dark",target:"_blank",rel:"noopener noreferrer",...r})}},children:v}),!p&&(0,a.jsx)("div",{className:"mt-4 p-3 rounded-lg border bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border-blue-200 dark:border-blue-700/50",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,a.jsx)("span",{className:"font-medium",children:"Join SOC Defenders"})," to access MITRE ATT&CK mapping, comment on articles, and save your favorites."]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:x,className:"text-xs px-3 py-1.5 rounded font-medium transition-colors bg-blue-600 hover:bg-blue-700 text-white",children:"Log In"}),(0,a.jsx)("button",{onClick:g,className:"text-xs px-3 py-1.5 rounded font-medium transition-colors bg-white dark:bg-slate-700 hover:bg-gray-100 dark:hover:bg-slate-600 text-gray-700 dark:text-slate-200 border border-gray-200 dark:border-slate-600",children:"Sign Up Free"})]})]})})]})]}),(0,a.jsx)(w.Z,{variant:"modal",source:"article_modal"})]}),"iocs"===b&&(0,a.jsx)(f,{article:t}),"attack"===b&&(0,a.jsx)(k,{article:t})]})})]})]})}},32094:function(e,t,r){r.d(t,{Z:function(){return _}});var a=r(85893),s=r(38472),n=r(86010),i=r(67294),o=r(86501),c=r(7877),d=r(14303),l=r(95361),u=r(4723),m=r(18346),h=r(11381),p=r(84037),x=r(34873),g=r(73935),f=r(11460),b=r(78700),y=r(25967),v=r(56042);let k=[{value:"off_topic",label:"Off-topic (not cybersecurity)"},{value:"duplicate",label:"Duplicate content"},{value:"non_english",label:"Non-English language"},{value:"spam",label:"Spam/promotional"},{value:"low_quality",label:"Low quality"},{value:"outdated",label:"Outdated"},{value:"other",label:"Other"}];function w(e){var t;let{isOpen:r,onClose:s,onConfirm:o,articleTitle:c,articleSource:d,isDeleting:l=!1}=e,[u,m]=(0,i.useState)(null),[h,p]=(0,i.useState)(""),[x,w]=(0,i.useState)(null);(0,i.useEffect)(()=>{r&&(m(null),p(""),w(null))},[r]);let j=(0,i.useCallback)(async()=>
1{if(!l){w(null);try{await o(u||void 0,h||void 0)}catch(e){w(e instanceof Error?e.message:"Failed to delete article")}}},[l,o,u,h]);if((0,i.useEffect)(()=>{let e=e=>{var t;r&&("Escape"!==e.key||l||s(),"Enter"!==e.key||l||(null===(t=document.activeElement)||void 0===t?void 0:t.tagName)==="TEXTAREA"||(e.preventDefault(),j()))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,l,s,j]),"undefined"==typeof document)return null;let T=(0,a.jsx)(f.u,{appear:!0,show:r,as:i.Fragment,children:(0,a.jsxs)(b.V,{as:"div",className:"relative z-[10000]",onClose:()=>!l&&s(),children:[(0,a.jsx)(f.u.Child,{as:i.Fragment,enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm"})}),(0,a.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,a.jsx)(f.u.Child,{as:i.Fragment,enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,a.jsxs)(b.V.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-xl shadow-2xl transition-all bg-surface dark:bg-surface-dark border border-subtle dark:border-subtle-dark",children:[(0,a.jsx)("div",{className:"px-6 pt-6 pb-4 border-b border-subtle dark:border-subtle-dark",children:(0,a.jsxs)(b.V.Title,{className:"text-lg font-semibold flex items-center gap-2 text-primary dark:text-primary-dark",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete Article"]})}),(0,a.jsxs)("div",{className:"px-6 py-4 space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-red-500/10 border border-red-500/20",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-red-500 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsxs)("div",{className:"text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("p",{className:"font-medium",children:"This action cannot be undone."}),(0,a.jsx)("p",{className:"mt-1 opacity-80",children:"All votes, comments, and saved references will also be deleted."})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-sm text-secondary dark:text-secondary-dark",children:"Are you sure you want to delete this article?"}),(0,a.jsxs)("div",{className:"p-3 rounded-lg bg-surface-muted dark:bg-surface-muted-dark",children:[(0,a.jsx)("p",{className:"font-medium text-primary dark:text-primary-dark line-clamp-2",children:c}),(0,a.jsxs)("p",{className:"text-xs mt-1 text-secondary dark:text-secondary-dark",children:["from ",d]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-secondary dark:text-secondary-dark",children:"Reason (optional)"}),(0,a.jsx)(y.R,{value:u,onChange:m,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)(y.R.Button,{className:"relative w-full cursor-pointer rounded-lg py-2.5 pl-3 pr-10 text-left border transition-colors bg-surface dark:bg-surface-dark border-subtle dark:border-subtle-dark text-primary dark:text-primary-dark hover:border-accent/30 dark:hover:border-accent-dark/30 focus:outline-none focus:ring-2 focus:ring-accent dark:focus:ring-accent-dark",children:[(0,a.jsx)("span",{className:(0,n.Z)("block truncate",!u&&"text-secondary dark:text-secondary-dark"),children:u?null===(t=k.find(e=>e.value===u))||void 0===t?void 0:t.label:"Select a reason..."}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:(0,a.jsx)("svg",{className:"h-5 w-5 text-secondary dark:text-secondary-dark",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z",clipRule:"evenodd"})})})]}),(0,a.jsx)(f.u,{as:i.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)(y.R.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-lg py-1 shadow-lg ring-1 ring-black/5 focus:outline-none bg-surface dark:bg-surface-dark border border-subtle dark:border-subtle-dark",children:k.map(e=>(0,a.jsx)(y.R.Option,{value:e.value,className:e=>{let{active:t}=e;return(0,n.Z)("relative cursor-pointer select-none py-2 pl-10 pr-4 text-sm",t?"bg-accent/10 dark:bg-accent-dark/10 text-accent dark:text-accent-dark":"text-primary dark:text-primary-dark")},children:t=>{let{selected:r}=t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:(0,n.Z)("block truncate",r&&"font-medium"),children:e.label}),r&&(0,a.jsx)("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3 text-accent dark:text-accent-dark",children:(0,a.jsx)("svg",{className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})})]})}},e.value))})})]})})]}),"other"===u&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-secondary dark:text-secondary-dark",children:"Notes"}),(0,a.jsx)("textarea",{value:h,onChange:e=>p(e.target.value),placeholder:"Describe why this article should be deleted...",rows:2,className:"w-full rounded-lg border px-3 py-2 text-sm resize-none transition-colors bg-surface dark:bg-surface-dark border-subtle dark:border-subtle-dark text-primary dark:text-primary-dark placeholder:text-secondary dark:placeholder:text-secondary-dark focus:outline-none focus:ring-2 focus:ring-accent dark:focus:ring-accent-dark"})]}),x&&(0,a.jsx)("div",{className:"p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-sm text-red-600 dark:text-red-400",children:x})]}),(0,a.jsxs)("div",{className:"px-6 py-4 border-t border-subtle dark:border-subtle-dark flex justify-end gap-3",children:[(0,a.jsx)("button",{type:"button",onClick:s,disabled:l,className:(0,n.Z)("px-4 py-2 text-sm font-medium rounded-lg transition-colors","bg-surface dark:bg-surface-dark","text-secondary dark:text-secondary-dark","border border-subtle dark:border-subtle-dark","hover:bg-surface-muted dark:hover:bg-surface-muted-dark","focus:outline-none focus:ring-2 focus:ring-accent dark:focus:ring-accent-dark",l&&"opacity-50 cursor-not-allowed"),children:"Cancel"}),(0,a.jsx)("button",{type:"button",onClick:j,disabled:l,className:(0,n.Z)("px-4 py-2 text-sm font-medium rounded-lg transition-colors","bg-red-600 hover:bg-red-700","text-white","focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2","inline-flex items-center gap-2",l&&"opacity-70 cursor-not-allowed"),children:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.ZP,{size:"xs",color:"white",inline:!0}),"Deleting..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete Article"]})})]})]})})})})]})});return(0,g.createPortal)(T,document.body)}var j=r(33215),T=r(34362),N=r(98256);function S(e){return e.replace(/\*\*([^*]+)\*\*/g,"$1").replace(/\*([^*]+)\*/g,"$1").replace(/^[-â¢]\s*/gm,"").replace(/^#+\s*/gm,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\n+/g," ").replace(/\s+/g," ").trim()}var _=(0,i.memo)(function(e){var t,r;let{article:g,index:f,density:b="comfortable",onClick:y,onTagClick:k,selectedTags:_=[],on
1Hide:C,onDelete:A}=e,{isAuthenticated:E,user:D}=(0,l.aC)(),{openLoginModal:L}=(0,u.f)(),{isArticleSaved:M,markArticleAsSaved:I,markArticleAsUnsaved:R}=(0,m.g)(),{hasVoted:P,setVoted:O}=(0,h.u$)(),{hasVouchedArticle:F,setVouchedArticle:q}=(0,p.Xb)(),{token:z}=(0,N.Fy)(),[W,Z]=(0,i.useState)(!1),[H,V]=(0,i.useState)(!1),[B,U]=(0,i.useState)(!1),K=P(g.id),[G,J]=(0,i.useState)(0),[X,$]=(0,i.useState)(0),[Y,Q]=(0,i.useState)(0),[ee,et]=(0,i.useState)(!1),[er,ea]=(0,i.useState)(!1),[es,en]=(0,i.useState)(!1),ei=F(g.id),[eo,ec]=(0,i.useState)(0),[ed,el]=(0,i.useState)(!1),[eu,em]=(0,i.useState)(!1),[eh,ep]=(0,i.useState)(!1),[ex,eg]=(0,i.useState)(!1),ef=(0,i.useRef)(null),eb=(0,i.useRef)(null),ey=(null==D?void 0:D.is_admin)===!0;(0,i.useEffect)(()=>{E?Z(M(g.id)):Z((0,c.cY)(g.id)),V((0,c.HK)(g.id))},[g.id,E,M]),(0,i.useEffect)(()=>{if(g.article_scores){let e=Array.isArray(g.article_scores)?g.article_scores[0]:g.article_scores;e&&(J(e.score||0),Q(e.comment_count||0))}},[g.article_scores]);let ev=G+X;(0,i.useEffect)(()=>
1{"number"==typeof g.vouch_count&&ec(g.vouch_count)},[g.vouch_count]);let ek=function(e){let t=new Date,r=new Date(e),a=Math.floor((t.getTime()-r.getTime())/1e3);if(a<60)return"just now";let s=Math.floor(a/60);if(s<60)return"".concat(s,"m ago");let n=Math.floor(s/60);if(n<24)return"".concat(n,"h ago");let i=Math.floor(n/24);if(i<30)return"".concat(i,"d ago");let o=Math.floor(i/30);return o<12?"".concat(o,"mo ago"):"".concat(Math.floor(o/12),"y ago")}(g.published_at),ew=new Date(g.published_at).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),ej=(0,s.Zv)(g.title,g.ai_summary||g.summary),eT=e=>{try{return new URL(e).hostname.replace("www.","")}catch(e){return""}},eN=async e=>{if(e.preventDefault(),e.stopPropagation(),!er){ea(!0),Z(!W);try{if(W){let e=await (0,c.sd)(g.id,E,z);e.success?R(g.id):(Z(W),alert(e.error||"Failed to unsave article"))}else{let e=await (0,c.j8)(g.id,E,void 0,z);e.success?I(g.id):(Z(W),alert(e.error||"Failed to save article"))}}catch(e){Z(W),console.error("Save/unsave error:",e),alert("An error occurred. Please try again.")}finally{ea(!1)}}},eS=e=>{e.preventDefault(),(0,d.aw)(g.id),null==C||C(g.id)},e_=async e=>{if(e.preventDefault(),e.stopPropagation(),!E){L();return}if(ee)return;if(!z){console.error("CSRF token not available");return}let t=K?-1:1;O(g.id,!K),$(e=>e+t),et(!0);try{let{data:e}=await j.ZP.post("/api/articles/".concat(g.id,"/vote"),{},{headers:(0,N.iy)(z)});e.success?(O(g.id,e.voted),!K!==e.voted&&$(X)):(O(g.id,K),$(X))}catch(e){O(g.id,K),$(X),console.error("Vote failed:",e)}finally{et(!1)}},eC=async e=>{if(e.preventDefault(),!B)try{U(!0),navigator.share?await navigator.share({title:g.title,url:g.url}):(await navigator.clipboard.writeText(g.url),alert("Link copied to clipboard!"))}catch(e){e instanceof Error&&"AbortError"!==e.name&&console.error("Share failed:",e)}finally{U(!1)}},eA=async e=>{if(e.preventDefault(),e.stopPropagation(),!E){L();return}if(es)return;if(!z){console.error("CSRF token not available");return}let t=!ei,r=t?1:-1;q(g.id,t),ec(e=>e+r),en(!0);try{let{data:e}=await j.ZP.post("/api/vouches/create",{reference_type:"article",reference_id:g.id},{headers:(0,N.iy)(z)});e.success?(q(g.id,e.vouched),e.vouched!==t&&ec(eo),o.ZP.success(e.vouched?"Vouched for this article":"Vouch removed",{duration:2e3,position:"bottom-center"})):(q(g.id,ei),ec(eo))}catch(e){var a,s;q(g.id,ei),ec(eo),console.error("Vouch failed:",e),o.ZP.error((null===(s=e.response)||void 0===s?void 0:null===(a=s.data)||void 0===a?void 0:a.error)||"Failed to vouch",{duration:3e3,position:"bottom-center"})}finally{en(!1)}},eE=e=>{if(e.preventDefault(),e.stopPropagation(),!E){L();return}el(!0)},eD=e=>{e.preventDefault(),e.stopPropagation(),em(!1),ep(!0)},eL=async(e,t)=>{if(z&&!ex){eg(!0);try{let{data:r}=await j.ZP.delete("/api/articles/".concat(g.id,"/delete"),{headers:(0,N.iy)(z),data:{reason:e,notes:t},withCredentials:!0});if(r.success)ep(!1),null==A||A(g.id);else throw Error(r.error||"Failed to delete article")}catch(e){var r,a;throw console.error("Delete failed:",e),Error((null===(a=e.response)||void 0===a?void 0:null===(r=a.data)||void 0===r?void 0:r.error)||e.message||"Failed to delete article")}finally{eg(!1)}}};return(0,i.useEffect)(()=>{let e=e=>{"Escape"===e.key&&eu&&em(!1)};if(eu)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[eu]),(0,i.useEffect)(()=>{let e=e=>{var t,r;let a=e.target,s=!(null===(t=ef.current)||void 0===t?void 0:t.contains(a)),n=!(null===(r=eb.current)||void 0===r?void 0:r.contains(a));s&&n&&em(!1)};if(eu)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[eu]),(0,a.jsxs)("article",{className:(0,n.Z)("group relative flex gap-2 md:gap-3 border-b transition-all duration-200","border-subtle dark:border-subtle-dark","hover:bg-surface-muted dark:hover:bg-surface-muted-dark",{compact:"py-1.5 px-1.5 md:px-3",comfortable:"py-2.5 px-1.5 md:px-3",spacious:"py-3 px-2 md:px-4"}[b],H&&"opacity-60"),"data-sentry-component":"ArticleListItem","data-sentry-source-file":"ArticleListItem.tsx",children:[(0,a.jsxs)("div",{className:"absolute top-2 right-2 z-10 hidden sm:block",ref:ef,children:[(0,a.jsx)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),em(!eu)},"aria-haspopup":"true","aria-expanded":eu,"aria-label":"More actions","aria-controls":"article-more-menu",className:"inline-flex items-center justify-center p-1.5 rounded text-xs border transition-all focus:outline-none focus:ring-2 focus:ring-accent dark:focus:ring-accent-dark focus:ring-offset-1 bg-surface dark:bg-surface-dark text-secondary dark:text-secondary-dark border-subtle dark:border-subtle-dark hover:border-accent/30 dark:hover:border-accent-dark/30 hover:text-primary dark:hover:text-primary-dark focus:ring-offset-surface dark:focus:ring-offset-surface-dark",title:"More actions (Hide, Vouch, Flag)",children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true","data-sentry-element":"svg","data-sentry-source-file":"ArticleListItem.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","data-sentry-element":"path","data-sentry-source-file":"ArticleListItem.tsx"})})}),eu&&(0,a.jsxs)("div",{id:"article-more-menu",role:"menu","aria-orientation":"vertical","aria-labelledby":"article-more-button",className:"absolute right-0 mt-1 w-44 rounded-lg shadow-2xl border z-[9999] animate-in fade-in slide-in-from-top-2 duration-200 bg-surface dark:bg-surface-dark border-subtle dark:border-subtle-dark",children:[(0,a.jsxs)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),eS(e),em(!1)},role:"menuitem",className:"w-full text-left px-3 py-2.5 text-sm rounded-t-lg transition-colors flex items-center gap-2.5 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-accent dark:focus:ring-accent-dark text-primary dark:text-primary-dark hover:bg-surface-muted dark:hover:bg-surface-muted-dark focus:bg-surface-muted dark:focus:bg-surface-muted-dark",children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}),"Hide article"]}),(0,a.jsxs)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),eA(e),em(!1)},disabled:es,role:"menuitem","aria-disabled":es,className:(0,n.Z)("w-full text-left px-3 py-2.5 text-sm transition-colors flex items-center gap-2.5","focus:outline-none focus:ring-2 focus:ring-inset focus:ring-accent dark:focus:ring-accent-dark",es&&"opacity-50 cursor-not-allowed",ei?"text-green-400":"text-primary dark:text-primary-dark hover:bg-surface-muted dark:hover:bg-surface-muted-dark focus:bg-surface-muted dark:focus:bg-surface-muted-dark"),title:E?(0,T.Fz)(null!==(t=null==D?void 0:D.karma)&&void 0!==t?t:0,null==D?void 0:D.is_admin)?"Vouch for quality content":"Requires ".concat(T.LR.VOUCH_CONTENT,"+ karma"):"Login to vouch",children:[es?(0,a.jsx)(v.ZP,{size:"xs",color:"current",inline:!0}):(0,a.jsx)("svg",{className:"w-4 h-4",fill:ei?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),es?"Vouching...":ei?"Vouched (".concat(eo,")"):"Vouch for quality"]}),(0,a.jsxs)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),eE(e),em(!1)},role:"menuitem",className:(0,n.Z)("w-full text-left px-3 py-2.5 text-sm transition-colors flex items-center gap-2.5","focus:outline-none focus:ring-2 focus:ring-inset focus:ring-accent dark:focus:ring-accent-dark","text-primary dark:text-primary-dark hover:bg-surface-muted dark:hover:bg-surface-muted-dark focus:bg-surface-muted dark:focus:bg-surface-muted-dark",!ey&&"rounded-b-lg"),title:E?(0,T.P9)(null!==(r=null==D?void 0:D.karma)&&void 0!==r?r:0,null==D?void 0:D.is_admin)?"Flag inappropriate content":"Requires ".concat(T.LR.FLAG_CONTENT,"+ karma"):"Login to flag",children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 21v-4m0 0V5a2 2 0 012-2h6.5l1 1H21l-3 6 3 6h-8.5l-1-1H5a2 2 0 00-2 2zm9-13.5V9"})}),"Flag content"]}),ey&&(0,a.jsxs)("button",{onClick:eD,role:"menuitem",className:"w-full text-left px-3 py-2.5 text-sm rounded-b-lg transition-colors flex items-center gap-2.5 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-red-500 text-red-500 hover:bg-red-500/10 focus:bg-red-500/10",title:"Delete article (Admin only)",children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete article"]})]})]}),(0,a.jsxs)("div",{className:"flex-shrink-0 w-6 md:w-8 text-right pt-1 flex flex-col items-end gap-2",children:[(0,a.jsxs)("span",{className:"text-xs md:text-sm font-mono font-semibold text-secondary dark:text-secondary-dark",children:[f,"."]}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0.5",children:(0,a.jsx)("button",{onClick:e_,disabled:ee,"aria-label":"Upvote article","aria-pressed":K,className:(0,n.Z)("p-2.5 -m-2.5 transition-colors duration-150 cursor-pointer flex items-center justify-center",K?"text-orange-500":"text-secondary dark:text-secondary-dark hover:text-primary dark:hover:text-primary-dark",ee&&"opacity-50 cursor-not-allowed"),title:E?ee?"Voting...":K?"Remove upvote":"Upvote this article":"Log in to vote",children:ee?(0,a.jsx)(v.ZP,{size:"xs",color:"current",inline:!0}):(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"
1currentColor",className:"pointer-events-none",children:(0,a.jsx)("path",{d:"M7 0 L14 14 L0 14 Z"})})})})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 space-y-2 pr-8",children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-2 flex-wrap",children:[(0,a.jsx)("a",{href:g.url,target:"_blank",rel:"noopener noreferrer nofollow",onClick:()=>V(!0),className:"text-primary dark:text-primary-dark hover:text-accent dark:hover:text-accent-dark transition-colors font-semibold text-lg leading-tight focus:outline-none focus:underline",children:g.title}),eT(g.url)&&(0,a.jsxs)("a",{href:g.url,target:"_blank",rel:"noopener noreferrer nofollow",className:"text-xs transition-colors flex-shrink-0 text-secondary dark:text-secondary-dark hover:text-accent dark:hover:text-accent-dark",children:["(",eT(g.url),")"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs flex-wrap",children:[(0,a.jsxs)("span",{className:"transition-colors text-secondary dark:text-secondary-dark",title:"".concat(ev," points"),children:[ev," ",1===ev?"point":"points"]}),(0,a.jsx)("span",{className:"text-secondary dark:text-secondary-dark opacity-50",children:"â¢"}),(0,a.jsx)("time",{dateTime:g.published_at,title:ew,className:"cursor-help transition-colors text-secondary dark:text-secondary-dark hover:text-primary dark:hover:text-primary-dark",children:ek}),(0,a.jsx)("span",{className:"text-secondary dark:text-secondary-dark opacity-50",children:"â¢"}),(0,a.jsx)("a",{href:"/item/".concat(g.id),onClick:e=>{e.stopPropagation()},className:"transition-colors hover:underline text-secondary dark:text-secondary-dark hover:text-accent dark:hover:text-accent-dark",title:0===Y?"Start the discussion":"View discussion",children:0===Y?"discuss":"".concat(Y," ").concat(1===Y?"comment":"comments")}),ej.length>0&&(0,a.jsx)("span",{className:"text-secondary dark:text-secondary-dark opacity-50",children:"â¢"}),ej.map(e=>{let t=e.replace(/\s+/g,"-"),r=_.includes(t);return(0,a.jsxs)("button",{onClick:e=>{e.stopPropagation(),null==k||k(t)},className:(0,n.Z)("inline-flex items-center px-2 py-0.5 rounded text-xs transition-all cursor-pointer","hover:scale-105 active:scale-95",r?"bg-accent dark:bg-accent-dark text-accent dark:text-accent-dark border border-accent/40 dark:border-accent-dark/40 ring-1 ring-accent/20 dark:ring-accent-dark/20":"bg-accent-soft dark:bg-accent-soft-dark text-accent dark:text-accent-dark border border-accent/30 dark:border-accent-dark/30 hover:bg-accent/20 dark:hover:bg-accent-dark/20 hover:border-accent/40 dark:hover:border-accent-dark/40"),title:"Filter by #".concat(t),children:["#",t]},e)})]}),g.summary&&(0,a.jsx)("p",{className:"text-xs md:text-sm leading-relaxed line-clamp-2 text-secondary dark:text-secondary-dark",children:S(g.summary)}),!g.summary&&g.ai_summary&&"compact"!==b&&(0,a.jsx)("p",{className:"text-xs md:text-sm leading-relaxed line-clamp-2 text-secondary dark:text-secondary-dark",children:S(g.ai_summary)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 md:gap-1.5",children:[y&&(0,a.jsxs)("button",{onClick:e=>{e.preventDefault(),y(g)},className:(0,n.Z)("inline-flex items-center justify-center","min-w-[44px] min-h-[44px] w-11 h-11","md:w-auto md:h-auto md:min-w-0 md:min-h-0","md:gap-1.5 md:px-2.5 md:py-1.5","rounded-full md:rounded","text-xs border transition-all duration-150","bg-accent-soft dark:bg-accent-soft-dark","text-accent dark:text-accent-dark","border-accent/30 dark:border-accent-dark/30","hover:bg-accent/20 dark:hover:bg-accent-dark/20","active:scale-95 active:bg-accent/30 dark:active:bg-accent-dark/30","focus:outline-none focus:ring-2 focus:ring-accent/50 dark:focus:ring-accent-dark/50 focus:ring-offset-1"),title:"View IOCs and ATT&CK mapping","aria-label":"View IOCs and ATT&CK mapping",children:[(0,a.jsxs)("svg",{className:"w-5 h-5 md:w-4 md:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),(0,a.jsx)("span",{className:"hidden md:inline",children:"View"})]}),(0,a.jsxs)("button",{onClick:eN,disabled:er,className:(0,n.Z)("inline-flex items-center justify-center","min-w-[44px] min-h-[44px] w-11 h-11","md:w-auto md:h-auto md:min-w-0 md:min-
1h-0","md:gap-1.5 md:px-2.5 md:py-1.5","rounded-full md:rounded","text-xs border transition-all duration-150","focus:outline-none focus:ring-2 focus:ring-offset-1",er&&"opacity-50 cursor-not-allowed",W?"bg-yellow-500/10 text-yellow-500 border-yellow-500/30 focus:ring-yellow-500/50":"bg-surface dark:bg-surface-dark text-secondary dark:text-secondary-dark border-subtle dark:border-subtle-dark hover:border-yellow-500/30 hover:text-yellow-500 focus:ring-yellow-500/50","active:scale-95"),title:W?"Unsave article":"Save for later","aria-label":W?"Unsave article":"Save for later","aria-pressed":W,children:[er?(0,a.jsx)(v.ZP,{size:"xs",color:"current",inline:!0}):(0,a.jsx)("svg",{className:"w-5 h-5 md:w-4 md:h-4",fill:W?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})}),(0,a.jsx)("span",{className:"hidden md:inline",children:W?"Saved":"Save"})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 md:gap-1.5",children:[(0,a.jsxs)("div",{className:"relative sm:hidden",ref:eb,children:[(0,a.jsx)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),em(!eu)},"aria-haspopup":"true","aria-expanded":eu,"aria-label":"More actions",className:(0,n.Z)("inline-flex items-center justify-center","min-w-[44px] min-h-[44px] w-11 h-11","rounded-full","text-xs border transition-all duration-150","bg-surface dark:bg-surface-dark","text-secondary dark:text-secondary-dark","border-subtle dark:border-subtle-dark","hover:border-accent/30 dark:hover:border-accent-dark/30","active:scale-95","focus:outline-none focus:ring-2 focus:ring-accent/50 dark:focus:ring-accent-dark/50 focus:ring-offset-1"),title:"More actions",children:(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true","data-sentry-element":"svg","data-sentry-source-file":"ArticleListItem.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","data-sentry-element":"path","data-sentry-source-file":"ArticleListItem.tsx"})})}),eu&&(0,a.jsxs)("div",{role:"menu",className:(0,n.Z)("absolute right-0 w-44 rounded-lg shadow-2xl border animate-in fade-in duration-200 bg-surface dark:bg-surface-dark border-subtle dark:border-subtle-dark","z-[9999]",f<=2?"top-full mt-2 slide-in-from-top-2":"bottom-full mb-2 slide-in-from-bottom-2"),children:[(0,a.jsxs)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),eS(e),em(!1)},role:"menuitem",className:"w-full text-left px-3 py-2.5 text-sm rounded-t-lg transition-colors flex items-center gap-2.5 text-primary dark:text-primary-dark hover:bg-surface-muted dark:hover:bg-surface-muted-dark",children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}),"Hide article"]}),(0,a.jsxs)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),eA(e),em(!1)},disabled:es,role:"menuitem",className:(0,n.Z)("w-full text-left px-3 py-2.5 text-sm transition-colors flex items-center gap-2.5",es&&"opacity-50 cursor-not-allowed",ei?"text-green-400":"text-primary dark:text-primary-dark hover:bg-surface-muted dark:hover:bg-surface-muted-dark"),children:[es?(0,a.jsx)(v.ZP,{size:"xs",color:"current",inline:!0}):(0,a.jsx)("svg",{className:"w-4 h-4",fill:ei?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),es?"Vouching...":ei?"Vouched (".concat(eo,")"):"Vouch for quality"]}),(0,a.jsxs)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),eE(e),em(!1)},role:"menuitem",className:(0,n.Z)("w-full text-left px-3 py-2.5 text-sm transition-colors flex items-center gap-2.5","text-primary dark:text-primary-dark hover:bg-surface-muted dark:hover:bg-surface-muted-dark",!ey&&"rounded-b-lg"),children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 21v-4m0 0V5a2 2 0 012-2h6.5l1 1H21l-3 6 3 6h-8.5l-1-1H5a2 2 0 00-2 2zm9-13.5V9"})}),"Flag content"]}),ey&&(0,a.jsxs)("button",{onClick:eD,role:"menuitem",className:"w-full text-left px-3 py-2.5 text-sm rounded-b-lg transition-colors flex items-center gap-2.5 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete article"]})]})]}),(0,a.jsxs)("button",{onClick:eC,disabled:B,className:(0,n.Z)("inline-flex items-center justify-center","min-w-[44px] min-h-[44px] w-11 h-11","md:w-auto md:h-auto md:min-w-0 md:min-
1h-0","md:gap-1.5 md:px-2.5 md:py-1.5","rounded-full md:rounded","text-xs border transition-all duration-150","bg-surface dark:bg-surface-dark","text-secondary dark:text-secondary-dark","border-subtle dark:border-subtle-dark","hover:border-accent/30 dark:hover:border-accent-dark/30","hover:text-accent dark:hover:text-accent-dark","active:scale-95 active:bg-surface-muted dark:active:bg-surface-muted-dark","focus:outline-none focus:ring-2 focus:ring-accent/50 dark:focus:ring-accent-dark/50 focus:ring-offset-1",B&&"opacity-50 cursor-not-allowed"),title:B?"Sharing...":"Share article","aria-label":"Share article",children:[(0,a.jsx)("svg",{className:"w-5 h-5 md:w-4 md:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true","data-sentry-element":"svg","data-sentry-source-file":"ArticleListItem.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z","data-sentry-element":"path","data-sentry-source-file":"ArticleListItem.tsx"})}),(0,a.jsx)("span",{className:"hidden md:inline",children:"Share"})]}),(0,a.jsxs)("a",{href:"/item/".concat(g.id),onClick:e=>{e.stopPropagation()},className:(0,n.Z)("inline-flex items-center justify-center","min-w-[44px] min-h-[44px] w-11 h-11","md:w-auto md:h-auto md:min-w-0 md:min-h-0","md:gap-1.5 md:px-3 md:py-1.5","rounded-full md:rounded","text-xs font-semibold","border-2 transition-all duration-150","bg-accent dark:bg-accent-dark","text-white","border-accent dark:border-accent-dark","shadow-sm","hover:bg-accent/90 dark:hover:bg-accent-dark/90","hover:border-accent/90 dark:hover:border-accent-dark/90","hover:shadow-md","active:scale-95 active:shadow-none","focus:outline-none focus:ring-2 focus:ring-accent/50 dark:focus:ring-accent-dark/50 focus:ring-offset-2"),title:"Comment on this article","aria-label":"Comment on this article",children:[(0,a.jsx)("svg",{className:"w-5 h-5 md:w-4 md:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,"aria-hidden":"true","data-sentry-element":"svg","data-sentry-source-file":"ArticleListItem.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z","data-sentry-element":"path","data-sentry-source-file":"ArticleListItem.tsx"})}),(0,a.jsx)("span",{className:"hidden md:inline",children:"Comment"})]})]})]})]}),(0,a.jsx)(x.Z,{isOpen:ed,onClose:()=>el(!1),referenceType:"article",referenceId:g.id,userKarma:(null==D?void 0:D.karma)||0,isAdmin:(null==D?void 0:D.is_admin)||!1,onSuccess:()=>{o.ZP.success("Content flagged for review",{duration:2e3,position:"bottom-center"})},"data-sentry-element":"FlagModal","data-sentry-source-file":"ArticleListItem.tsx"}),ey&&(0,a.jsx)(w,{isOpen:eh,onClose:()=>ep(!1),onConfirm:eL,articleTitle:g.title,articleSource:g.source,isDeleting:ex})]})},(e,t)=>e.article.id===t.article.id&&e.index===t.index&&e.density===t.density&&JSON.stringify(e.selectedTags)===JSON.stringify(t.selectedTags)&&e.onClick===t.onClick&&e.onTagClick===t.onTagClick&&e.onHide===t.onHide&&e.onDelete===t.onDelete)},99967:function(e,t,r){r.d(t,{Z:function(){return c}});var a=r(85893),s=r(67294),n=r(86010),i=r(33215),o=r(98256);function c(e){let{variant:t="inline",source:r="web",className:c}=e,{token:d}=(0,o.Fy)(),[l,u]=(0,s.useState)(""),[m,h]=(0,s.useState)("idle"),[p,x]=(0,s.useState)(""),g=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),f=async e=>{if(e.preventDefault(),!l.trim()){h("error"),x("Please enter your email address");return}if(!g(l)){h("error"),x("Please enter a valid email address");return}h("loading"),x("");try{let e=await i.ZP.post("/api/newsletter/subscribe",{email:l.trim().toLowerCase(),source:r},{headers:(0,o.iy)(d)});e.data.success?(h("success"),x(e.data.message||"Thanks for subscribing! Check your inbox."),u("")):(h("error"),x(e.data.error||"Something went wrong. Please try again."))}catch(e){var t,a;h("error"),(0,i.IZ)(e)&&(null===(a=e.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.error)?x(e.response.data.error):x("Failed to subscribe. Please try again later.")}},b="modal"===t,y="footer"===t;return(0,a.jsxs)("div",{className:(0,n.Z)("w-full",b&&"mt-6 p-4 rounded-xl bg-gradient-to-br from-accent/5 to-accent/10 dark:from-accent-dark/10 dark:to-accent-dark/5 border border-accent/20 dark:border-accent-dark/20",y&&"p-6 rounded-2xl bg-surface-muted dark:bg-surface-muted-dark border border-subtle dark:border-subtle-dark",!b&&!y&&"p-4 rounded-lg bg-surface dark:bg-surface-dark border border-subtle dark:border-subtle-dark",c),"data-sentry-component":"EmailSubscription","data-sentry-source-file":"EmailSubscription.tsx",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 mb-3",children:[(0,a.jsx)("div",{className:(0,n.Z)("flex-shrink-0 w-10 h-10 rounded-full flex items-center justify-center","bg-accent/10 dark:bg-accent-dark/10"),children:(0,a.jsx)("svg",{className:"w-5 h-5 text-accent dark:text-accent-dark",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true","data-sentry-element":"svg","data-sentry-source-file":"EmailSubscription.tsx",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z","data-sentry-element":"path","data-sentry-source-file":"EmailSubscription.tsx"})})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:(0,n.Z)("font-semibold text-primary dark:text-primary-dark",y?"text-lg":"text-base"),children:"Get Daily Threat Intel"}),(0,a.jsx)("p",{className:"text-sm text-secondary dark:text-secondary-dark mt-0.5",children:"Curated cybersecurity news delivered to your inbox every morning."})]})]}),"success"===m?(0,a.jsxs)("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-success-soft border border-green-200 dark:border-green-800",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-green-600 dark:text-green-400 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),(0,a.jsx)("span",{className:"text-sm text-green-700 dark:text-green-300",children:p})]}):(0,a.jsxs)("form",{onSubmit:f,className:"space-y-3",children:[(0,a.jsxs)("div",{className:(0,n.Z)("flex gap-2",y?"flex-col sm:flex-row":"flex-row"),children:[(0,a.jsx)("div",{className:"relative flex-1",children:(0,a.jsx)("input",{type:"email",value:l,onCh
1ange:e=>{u(e.target.value),"error"===m&&(h("idle"),x(""))},placeholder:"[email protected]",disabled:"loading"===m,"aria-label":"Email address for newsletter","aria-invalid":"error"===m,"aria-describedby":"error"===m?"email-error":void 0,className:(0,n.Z)("w-full px-4 py-3 rounded-lg text-sm","bg-white dark:bg-gray-800","text-primary dark:text-primary-dark","placeholder:text-gray-400 dark:placeholder:text-gray-500","border transition-colors","focus:outline-none focus:ring-2 focus:ring-accent dark:focus:ring-accent-dark focus:border-transparent","disabled:opacity-50 disabled:cursor-not-allowed","error"===m?"border-red-300 dark:border-red-700":"border-gray-200 dark:border-gray-700")})}),(0,a.jsx)("button",{type:"submit",disabled:"loading"===m,className:(0,n.Z)("min-w-[44px] min-h-[44px] px-5 py-3 rounded-lg","font-medium text-sm","bg-accent dark:bg-accent-dark text-white","hover:bg-accent/90 dark:hover:bg-accent-dark/90","focus:outline-none focus:ring-2 focus:ring-accent dark:focus:ring-accent-dark focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed","transition-all duration-200","flex items-center justify-center gap-2",y?"sm:w-auto w-full":"whitespace-nowrap"),children:"loading"===m?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,a.jsx)("span",{children:"Subscribing..."})]}):(0,a.jsx)("span",{children:"Subscribe"})})]}),"error"===m&&p&&(0,a.jsxs)("p",{id:"email-error",className:"text-sm text-red-600 dark:text-red-400 flex items-center gap-1.5",role:"alert",children:[(0,a.jsx)("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),p]}),(0,a.jsxs)("p",{className:"text-xs text-secondary dark:text-secondary-dark",children:["No spam, ever. Unsubscribe anytime."," ",(0,a.jsx)("a",{href:"/privacy",className:"text-accent dark:text-accent-dark hover:underline",children:"Privacy Policy"})]})]})]})}},87203:function(e,t,r){r.d(t,{Z:function(){return n},q:function(){return i}});var a=r(85893),s=r(86010);function n(e){let{isUpdating:t,message:r="Updating...",position:n="inline",size:i="sm",className:o}=e;if(!t)return null;let c=(0,s.Z)("flex items-center gap-2 text-tertiary animate-pulse",{"text-xs":"sm"===i,"text-sm":"md"===i}),d=(0,s.Z)({"":"inline"===n,"fixed top-14 left-1/2 -translate-x-1/2 z-50 bg-surface-elevated px-3 py-1.5 rounded-full shadow-lg border border-subtle":"fixed-top"===n,"fixed bottom-20 left-1/2 -translate-x-1/2 z-50 bg-surface-elevated px-3 py-1.5 rounded-full shadow-lg border border-subtle md:bottom-4":"fixed-bottom"===n});return(0,a.jsxs)("div",{className:(0,s.Z)(c,d,o),role:"status","aria-live":"polite","data-sentry-component":"UpdateIndicator","data-sentry-source-file":"UpdateIndicator.tsx",children:[(0,a.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,a.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"}),(0,a.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}),(0,a.jsx)("span",{children:r})]})}function i(e,t){return e&&void 0!==t}},14303:function(e,t,r){r.d(t,{Nf:function(){return n},aw:function(){return i}});let a="threat_intel_hidden_articles";function s(){try{let e=localStorage.getItem(a);return e?JSON.parse(e):[]}catch(e){return console.error("Failed to get hidden articles:",e),[]}}function n(){try{let e=s();return new Set(e.map(e=>e.articleId))}catch(e){return console.error("Failed to get hidden article IDs:",e),new Set}}function i(e){let t=s();t.find(t=>t.articleId===e)||(t.push({articleId:e,hiddenAt:new Date().toISOString()}),localStorage.setItem(a,JSON.stringify(t)))}},7877:function(e,t,r){r.d(t,{HK:function(){return h},UC:function(){return u},cY:function(){return d},j8:function(){return o},oz:function(){return m},sd:function(){return c},uN:function(){return p},zH:function(){return x},zn:function(){return i}});var a=r(33215),s=r(98256);let n={SAVED_ARTICLES:"threat_intel_saved_articles",READ_ARTICLES:"threat_intel_read_articles"};function i(){try{let e=localStorage.getItem(n.SAVED_ARTICLES);return e?JSON.parse(e):[]}catch(e){return console.error("Failed to get saved articles from localStorage:",e),[]}}async function o(e,t,r,o){if(t)try{let{data:t}=await a.ZP.post("/api/saved-articles/save",{articleId:e},{headers:(0,s.iy)(o)});if(t.success)return{success:!0};return{success:!1,error:t.error||"Failed to save article"}}catch(e){var c,d;return console.error("Failed to save article to database:",e),{success:!1,error:(null===(d=e.response)||void 0===d?void 0:null===(c=d.data)||void 0===c?void 0:c.error)||"Failed to save article"}}else try{let t=i(),a=t.find(t=>t.articleId===e);return a?a.notes=r:t.push({articleId:e,savedAt:new Date().toISOString(),notes:r}),localStorage.setItem(n.SAVED_ARTICLES,JSON.stringify(t)),{success:!0}}catch(e){return console.error("Failed to save article to localStorage:",e),{success:!1,error:"Failed to save article locally"}}}async function c(e,t,r){if(t)try{let{data:t}=await a.ZP.delete("/api/saved-articles/unsave",{data:{articleId:e},headers:(0,s.iy)(r)});if(t.success)return{success:!0};return{success:!1,error:t.error||"Failed to unsave article"}}catch(e){var o,c;return console.error("Failed to unsave article from database:",e),{success:!1,error:(null===(c=e.response)||void 0===c?void 0:null===(o=c.data)||void 0===o?void 0:o.error)||"Failed to unsave article"}}else try{let t=i().filter(t=>t.articleId!==e);return localStorage.setItem(n.SAVED_ARTICLES,JSON.stringify(t)),{success:!0}}catch(e){return console.error("Failed to unsave article from localStorage:",e),{success:!1,error:"Failed to unsave article locally"}}}function d(e){return i().some(t=>t.articleId===e)}function l(){try{let e=localStorage.getItem(n.READ_ARTICLES);return new Set(e?JSON.parse(e):[])}catch(e){return console.error("Failed to get read articles:",e),new Set}}function u(e){let t=l();t.add(e),localStorage.setItem(n.READ_ARTICLES,JSON.stringify(Array.from(t)))}function m(e){let t=l();t.delete(e),localStorage.setItem(n.READ_ARTICLES,JSON.stringify(Array.from(t)))}function h(e){return l().has(e)}async function p(e){try{let t=i();if(0===t.length)return{migrated:0,failed:0,errors:[]};let{data:r}=await a.ZP.post("/api/saved-articles/migrate",{saves:t},{headers:(0,s.iy)(e)});if(r.success)return r.migrated>0&&0===r.failed&&localStorage.removeItem(n.SAVED_ARTICLES),{migrated:r.migrated||0,failed:r.failed||0,errors:r.errors||[]};return{migrated:0,failed:t.length,errors:[r.error||"Migration failed"]}}catch(e){var t,r;return console.error("Migration error:",e),{migrated:0,failed:i().length,errors:[(null===(r=e.response)||void 0===r?void 0:null===(t=r.data)||void 0===t?void 0:t.error)||"Migration failed"]}}}function x(){return i().length>0}},9922:function(e,t,r){r.d(t,{DN:function(){return i},Ff:function(){return s},SO:function(){return n},_c:function(){return o},_i:function(){return a}}),r(33215);let a=async e=>{let t=await fetch(e,{credentials:"include"});if(!t.ok)throw Error("An error occurred while fetching the data.");return t.json()},s={AUTH_ME:"/api/auth/me",USER_PROFILE:e=>"/api/users/".concat(e),USER_PROFILE_AGGREGATED:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;return"/api/users/".concat(e,"/profile?commentsLimit=").concat(t)},USER_COMMENTS:e=>"/api/users/".concat(e,"/comments"),USER_FOLLOWERS:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return"/api/users/".concat(e,"/followers?page=").concat(t,"&limit=50")},USER_FOLLOWING:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return"/api/users/".concat(e,"/following?page=").concat(t,"&limit=50")},FOLLOW_STATUS:e=>"/api/users/".concat(e,"/follow"),ARTICLES:e=>{let t=new URLSearchParams;return t.set("page",String(e.page||1)),t.set("limit",String(e.limit||30)),t.set("mode",e.mode||"ranked"),e.search&&t.set("search",e.search),e.source&&t.set("source",e.source),e.category&&t.set("category",e.category),e.primaryCategory&&t.set("primaryCategory",e.primaryCategory),void 0!==e.hasIOCs&&null!==e.hasIOCs&&t.set("hasIOCs",String(e.hasIOCs)),e.severity&&e.severity.length>0&&t.set("severity",e.severity.join(",")),e.cveSearch&&t.set("cveSearch",e.cveSearch),"/api/articles?".concat(t.toString())},ARTICLES_ALL:e=>"/api/articles?limit=3000&mode=".concat(e),ARTICLE_VOTERS:e=>"/api/articles/".concat(e,"/voters"),COMMENT_VOTERS:e=>"/api/comments/".concat(e,"/voters"),ARTICLE_COMMENTS:(e,t,r)=>"/api/comments/article/".concat(e,"?sort=").concat(t,"&limit=").concat(r),SAVED_ARTICLES:"/api/saved-articles",SUBMISSIONS:e=>e&&"all"!==e?"/api/submissions/my?status=".concat(e):"/api/submissions/my",LEADERBOARD:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return"/api/leaderboard?page=".concat(e)},FOLLOWING_ACTIVITY:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return"/api/activity/following?limit=".concat(e)}
1,ADMIN_USERS:"/api/admin/users",ADMIN_FLAGS:"/api/admin/flags",ADMIN_FEATURE_FLAGS:"/api/admin/feature-flags",ADMIN_VOTING_RINGS:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pending";return"/api/admin/voting-rings?status=".concat(e)},MODERATION_QUEUE:"/api/admin/moderation-queue",USER_SETTINGS:e=>"/api/users/".concat(e)},n={dedupingInterval:6e4,revalidateOnFocus:!1,revalidateOnReconnect:!0,keepPreviousData:!0,errorRetryCount:2},i={dedupingInterval:1e4,refreshInterval:3e4,revalidateOnFocus:!0,revalidateOnReconnect:!0,keepPreviousData:!0},o={dedupingInterval:3e4,revalidateOnFocus:!0,revalidateOnReconnect:!0,keepPreviousData:!0}},25523:function(e,t,r){r.d(t,{BT:function(){return o},GS:function(){return c},bc:function(){return i},cs:function(){return d},mJ:function(){return l},nR:function(){return m}});let a={ipv4:/\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/g,domain:/\b(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\.[a-z]{2,})?\b/gi,cve:/CVE-\d{4}-\d{4,7}/gi,md5:/\b[a-f0-9]{32}\b/gi,sha1:/\b[a-f0-9]{40}\b/gi,sha256:/\b[a-f0-9]{64}\b/gi,email:/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b/g,url:/https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)/gi,btcP2PKH:/\b[1][a-km-zA-HJ-NP-Z1-9]{25,34}\b/g,btcP2SH:/\b[3][a-km-zA-HJ-NP-Z1-9]{25,34}\b/g,btcBech32:/\bbc1[a-z0-9]{39,59}\b/g,ethereum:/\b0x[a-fA-F0-9]{40}\b/g,monero:/\b[48][0-9AB][1-9A-HJ-NP-Za-km-z]{93}\b/g,macAddress:/\b(?:[0-9A-Fa-f]{2}[:-]){5}(?:[0-9A-Fa-f]{2})\b/g,registryKey:/\b(?:HKEY_LOCAL_MACHINE|HKLM|HKEY_CURRENT_USER|HKCU|HKEY_CLASSES_ROOT|HKCR|HKEY_USERS|HKU|HKEY_CURRENT_CONFIG|HKCC)\\[^\s"<>|]+/gi,mutex:/\b(?:Global\\|Local\\|BaseNamedObjects\\)[A-Za-z0-9_\-\.]{8,64}\b/g,userAgent:/(?:User-Agent|user-agent):\s*([^\r\n]{20,200})/gi,sslFingerprint:/\b(?:[0-9A-Fa-f]{2}:){19}[0-9A-Fa-f]{2}\b/g},s=["example.com","localhost.com","test.com","sample.com","domain.com","email.com","company.com","website.com","github.com","twitter.com","facebook.com","linkedin.com","youtube.com","google.com","microsoft.com","apple.com","amazon.com"],n=["0.0.0.0","127.0.0.1","255.255.255.255","192.168.1.1","10.0.0.1"];function i(e){return function(e){let t={ips:[],domains:[],hashes:{md5:[],sha1:[],sha256:[]},cves:[],emails:[],urls:[],cryptoWallets:{bitcoin:[],ethereum:[],monero:[]},macAddresses:[],registryKeys:[],mutexes:[],userAgents:[],sslFingerprints:[]};if(!e)return t;let r=e.match(a.ipv4)||[];t.ips=Array.from(new Set(r.filter(e=>!n.includes(e))));let i=e.match(a.domain)||[];t.domains=Array.from(new Set(i.map(e=>e.toLowerCase()).filter(e=>!s.includes(e))));let o=e.match(a.cve)||[];t.cves=Array.from(new Set(o.map(e=>e.toUpperCase())));let c=e.match(a.md5)||[];t.hashes.md5=Array.from(new Set(c.map(e=>e.toLowerCase())));let d=e.match(a.sha1)||[];t.hashes.sha1=Array.from(new Set(d.map(e=>e.toLowerCase())));let l=e.match(a.sha256)||[];t.hashes.sha256=Array.from(new Set(l.map(e=>e.toLowerCase())));let u=e.match(a.email)||[];t.emails=Array.from(new Set(u.map(e=>e.toLowerCase())));let m=e.match(a.url)||[];t.urls=Array.from(new Set(m));let h=e.match(a.btcP2PKH)||[],p=e.match(a.btcP2SH)||[],x=e.match(a.btcBech32)||[];t.cryptoWallets.bitcoin=Array.from(new Set([...h,...p,...x]));let g=e.match(a.ethereum)||[];t.cryptoWallets.ethereum=Array.from(new Set(g));let f=e.match(a.monero)||[];t.cryptoWallets.monero=Array.from(new Set(f));let b=e.match(a.macAddress)||[];t.macAddresses=Array.from(new Set(b.map(e=>e.toUpperCase())));let y=e.match(a.registryKey)||[];t.registryKeys=Array.from(new Set(y));let v=e.match(a.mutex)||[];t.mutexes=Array.from(new Set(v));let k=Array.from(e.matchAll(a.userAgent),e=>e[1].trim());t.userAgents=Array.from(new Set(k));let w=e.match(a.sslFingerprint)||[];return t.sslFingerprints=Array.from(new Set(w.map(e=>e.toUpperCase()))),t}([e.title,e.ai_summary||e.summary||"",e.content||""].join(" "))}function o(e){let t=[];return e.cves.length>0&&(t.push("# CVEs"),e.cves.forEach(e=>t.push(e)),t.push("")),e.ips.length>
10&&(t.push("# IP Addresses"),e.ips.forEach(e=>t.push(e)),t.push("")),e.domains.length>0&&(t.push("# Domains"),e.domains.forEach(e=>t.push(e)),t.push("")),e.hashes.md5.length>0&&(t.push("# MD5 Hashes"),e.hashes.md5.forEach(e=>t.push(e)),t.push("")),e.hashes.sha1.length>0&&(t.push("# SHA-1 Hashes"),e.hashes.sha1.forEach(e=>t.push(e)),t.push("")),e.hashes.sha256.length>0&&(t.push("# SHA-256 Hashes"),e.hashes.sha256.forEach(e=>t.push(e)),t.push("")),e.emails.length>0&&(t.push("# Email Addresses"),e.emails.forEach(e=>t.push(e)),t.push("")),e.urls.length>0&&(t.push("# URLs"),e.urls.forEach(e=>t.push(e)),t.push("")),t.join("\n")}function c(e){let t=["Type,Value"];return e.cves.forEach(e=>t.push("CVE,".concat(e))),e.ips.forEach(e=>t.push("IP,".concat(e))),e.domains.forEach(e=>t.push("Domain,".concat(e))),e.hashes.md5.forEach(e=>t.push("MD5,".concat(e))),e.hashes.sha1.forEach(e=>t.push("SHA1,".concat(e))),e.hashes.sha256.forEach(e=>t.push("SHA256,".concat(e))),e.emails.forEach(e=>t.push("Email,".concat(e))),e.urls.forEach(e=>t.push('URL,"'.concat(e,'"'))),e.cryptoWallets.bitcoin.forEach(e=>t.push("Bitcoin,".concat(e))),e.cryptoWallets.ethereum.forEach(e=>t.push("Ethereum,".concat(e))),e.cryptoWallets.monero.forEach(e=>t.push("Monero,".concat(e))),e.macAddresses.forEach(e=>t.push("MAC Address,".concat(e))),e.registryKeys.forEach(e=>t.push('Registry Key,"'.concat(e,'"'))),e.mutexes.forEach(e=>t.push("Mutex,".concat(e))),e.userAgents.forEach(e=>t.push('User-Agent,"'.concat(e,'"'))),e.sslFingerprints.forEach(e=>t.push("SSL Fingerprint,".concat(e))),t.join("\n")}function d(e){return JSON.stringify(e,null,2)}function l(e,t){let r={type:"bundle",id:"bundle--".concat(u()),spec_version:"2.1",objects:[]};return e.ips.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Malicious IP: ".concat(e),description:"IP address observed in: ".concat(t),indicator_types:["malicious-activity"],pattern:"[ipv4-addr:value = '".concat(e,"']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["malicious-activity","threat-intelligence"]})}),e.domains.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Malicious Domain: ".concat(e),description:"Domain observed in: ".concat(t),indicator_types:["malicious-activity"],pattern:"[domain-name:value = '".concat(e,"']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["malicious-activity","threat-intelligence"]})}),e.hashes.md5.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Malicious File: ".concat(e),description:"MD5 hash observed in: ".concat(t),indicator_types:["malicious-activity"],pattern:"[file:hashes.MD5 = '".concat(e,"']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["malicious-activity","threat-intelligence"]})}),e.hashes.sha256.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Malicious File: ".concat(e),description:"SHA-256 hash observed in: ".concat(t),indicator_types:["malicious-activity"],pattern:"[file:hashes.'SHA-256' = '".concat(e,"']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["malicious-activity","threat-intelligence"]})}),e.cryptoWallets.bitcoin.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Bitcoin Wallet: ".concat(e),description:"Bitcoin address observed in ransomware activity: ".concat(t),indicator_types:["malicious-activity","anomalous-activity"],pattern:"[x-cryptocurrency-address:value = '".concat(e,"' AND x-cryptocurrency-address:currency = 'BTC']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["ransomware","cryptocurrency","financial-threat"]})}
1),e.cryptoWallets.ethereum.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Ethereum Wallet: ".concat(e),description:"Ethereum address observed in: ".concat(t),indicator_types:["malicious-activity","anomalous-activity"],pattern:"[x-cryptocurrency-address:value = '".concat(e,"' AND x-cryptocurrency-address:currency = 'ETH']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["ransomware","cryptocurrency","financial-threat"]})}),e.cryptoWallets.monero.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Monero Wallet: ".concat(e),description:"Monero address observed in: ".concat(t),indicator_types:["malicious-activity","anomalous-activity"],pattern:"[x-cryptocurrency-address:value = '".concat(e,"' AND x-cryptocurrency-address:currency = 'XMR']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["ransomware","cryptocurrency","privacy-coin","financial-threat"]})}),e.macAddresses.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"MAC Address: ".concat(e),description:"MAC address observed in: ".concat(t),indicator_types:["malicious-activity"],pattern:"[mac-addr:value = '".concat(e,"']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["network-activity","device-tracking"]})}),e.registryKeys.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Registry Key: ".concat(e),description:"Windows Registry key observed in: ".concat(t),indicator_types:["malicious-activity"],pattern:"[windows-registry-key:key = '".concat(e.replace(/\\/g,"\\\\"),"']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["host-based","persistence","windows"]})}),e.mutexes.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Mutex: ".concat(e),description:"Malware mutex observed in: ".concat(t),indicator_types:["malicious-activity"],pattern:"[mutex:name = '".concat(e.replace(/\\/g,"\\\\"),"']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["malware-behavior","synchronization"]})}),e.userAgents.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"Malicious User-Agent",description:"Suspicious User-Agent string observed in: ".concat(t),indicator_types:["malicious-activity","anomalous-activity"],pattern:"[network-traffic:extensions.'http-request-ext'.request_header.'User-Agent' = '".concat(e.replace(/'/g,"\\'"),"']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["network-activity","http-traffic","behavioral"]})}),e.sslFingerprints.forEach(e=>{r.objects.push({type:"indicator",spec_version:"2.1",id:"indicator--".concat(u()),created:new Date().toISOString(),modified:new Date().toISOString(),name:"SSL Certificate Fingerprint: ".concat(e),description:"SSL/TLS certificate fingerprint observed in: ".concat(t),indicator_types:["malicious-activity"],pattern:"[x509-certificate:hashes.'SHA-1' = '".concat(e.replace(/:/g,""),"']"),pattern_type:"stix",pattern_version:"2.1",valid_from:new Date().toISOString(),labels:["network-activity","ssl-tls","certificate"]})}),JSON.stringify(r,null,2)}function u(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function m(e){return e.ips.length+e.domains.length+e.hashes.md5.length+e.hashes.sha1.length+e.hashes.sha256.length+e.cves.length+e.emails.length+e.urls.length}},97585:function(e,t,r){r.d(t,{bG:function(){return n}});
1let a={T1566:{id:"T1566",name:"Phishing",tactic:"Initial Access",description:"Adversaries may send phishing messages to gain access to victim systems.",url:"https://attack.mitre.org/techniques/T1566/"},"T1566.001":{id:"T1566.001",name:"Spearphishing Attachment",tactic:"Initial Access",description:"Adversaries may send spearphishing emails with a malicious attachment.",url:"https://attack.mitre.org/techniques/T1566/001/"},"T1566.002":{id:"T1566.002",name:"Spearphishing Link",tactic:"Initial Access",description:"Adversaries may send spearphishing emails with a malicious link.",url:"https://attack.mitre.org/techniques/T1566/002/"},T1190:{id:"T1190",name:"Exploit Public-Facing Application",tactic:"Initial Access",description:"Adversaries may attempt to exploit a weakness in an Internet-facing host.",url:"https://attack.mitre.org/techniques/T1190/"},T1133:{id:"T1133",name:"External Remote Services",tactic:"Initial Access",description:"Adversaries may leverage external-facing remote services to gain initial access.",url:"https://attack.mitre.org/techniques/T1133/"},T1059:{id:"T1059",name:"Command and Scripting Interpreter",tactic:"Execution",description:"Adversaries may abuse command and script interpreters to execute commands.",url:"https://attack.mitre.org/techniques/T1059/"},"T1059.001":{id:"T1059.001",name:"PowerShell",tactic:"Execution",description:"Adversaries may abuse PowerShell commands and scripts for execution.",url:"https://attack.mitre.org/techniques/T1059/001/"},"T1059.003":{id:"T1059.003",name:"Windows Command Shell",tactic:"Execution",description:"Adversaries may abuse the Windows command shell for execution.",url:"https://attack.mitre.org/techniques/T1059/003/"},T1106:{id:"T1106",name:"Native API",tactic:"Execution",description:"Adversaries may interact with the native OS API to execute behaviors.",url:"https://attack.mitre.org/techniques/T1106/"},T1203:{id:"T1203",name:"Exploitation for Client Execution",tactic:"Execution",description:"Adversaries may exploit software vulnerabilities in client applications.",url:"https://attack.mitre.org/techniques/T1203/"},T1547:{id:"T1547",name:"Boot or Logon Autostart Execution",tactic:"Persistence",description:"Adversaries may configure system settings to automatically execute a program.",url:"https://attack.mitre.org/techniques/T1547/"},T1053:{id:"T1053",name:"Scheduled Task/Job",tactic:"Persistence",description:"Adversaries may abuse task scheduling to execute malicious code.",url:"https://attack.mitre.org/techniques/T1053/"},T1543:{id:"T1543",name:"Create or Modify System Process",tactic:"Persistence",description:"Adversaries may create or modify system-level processes.",url:"https://attack.mitre.org/techniques/T1543/"},T1078:{id:"T1078",name:"Valid Accounts",tactic:"Persistence",description:"Adversaries may obtain and abuse credentials of existing accounts.",url:"https://attack.mitre.org/techniques/T1078/"},T1548:{id:"T1548",name:"Abuse Elevation Control Mechanism",tactic:"Privilege Escalation",description:"Adversaries may circumvent mechanisms designed to control elevate privileges.",url:"https://attack.mitre.org/techniques/T1548/"},T1068:{id:"T1068",name:"Exploitation for Privilege Escalation",tactic:"Privilege Escalation",description:"Adversaries may exploit software vulnerabilities to elevate privileges.",url:"https://attack.mitre.org/techniques/T1068/"},T1134:{id:"T1134",name:"Access Token Manipulation",tactic:"Privilege Escalation",description:"Adversaries may modify access tokens to operate under a different user context.",url:"https://attack.mitre.org/techniques/T1134/"},T1562:{id:"T1562",name:"Impair Defenses",tactic:"Defense Evasion",description:"Adversaries may maliciously modify components to hinder defenses.",url:"https://attack.mitre.org/techniques/T1562/"},T1070:{id:"T1070",name:"Indicator Removal",tactic:"Defense Evasion",description:"Adversaries may delete or modify artifacts to remove evidence.",url:"https://attack.mitre.org/techniques/T1070/"},T1027:{id:"T1027",name:"Obfuscated Files or Information",tactic:"Defense Evasion",description:"Adversaries may obfuscate files or information to avoid detection.",url:"https://attack.mitre.org/techniques/T1027/"},T1036:{id:"T1036",name:"Masquerading",tactic:"Defense Evasion",description:"Adversaries may manipulate file or process features to evade defenses.",url:"https://attack.mitre.org/techniques/T1036/"},T1003:{id:"T1003",name:"OS Credential Dumping",tactic:"Credential Acce
1ss",description:"Adversaries may attempt to dump credentials to obtain account credentials.",url:"https://attack.mitre.org/techniques/T1003/"},"T1003.001":{id:"T1003.001",name:"LSASS Memory",tactic:"Credential Access",description:"Adversaries may attempt to access credential material in LSASS memory.",url:"https://attack.mitre.org/techniques/T1003/001/"},T1555:{id:"T1555",name:"Credentials from Password Stores",tactic:"Credential Access",description:"Adversaries may search for credentials in password stores.",url:"https://attack.mitre.org/techniques/T1555/"},T1110:{id:"T1110",name:"Brute Force",tactic:"Credential Access",description:"Adversaries may use brute force techniques to gain access to accounts.",url:"https://attack.mitre.org/techniques/T1110/"},T1056:{id:"T1056",name:"Input Capture",tactic:"Credential Access",description:"Adversaries may capture user input to obtain credentials.",url:"https://attack.mitre.org/techniques/T1056/"},T1087:{id:"T1087",name:"Account Discovery",tactic:"Discovery",description:"Adversaries may attempt to get a listing of accounts.",url:"https://attack.mitre.org/techniques/T1087/"},T1083:{id:"T1083",name:"File and Directory Discovery",tactic:"Discovery",description:"Adversaries may enumerate files and directories.",url:"https://attack.mitre.org/techniques/T1083/"},T1046:{id:"T1046",name:"Network Service Discovery",tactic:"Discovery",description:"Adversaries may attempt to discover services running on remote hosts.",url:"https://attack.mitre.org/techniques/T1046/"},T1057:{id:"T1057",name:"Process Discovery",tactic:"Discovery",description:"Adversaries may attempt to get information about running processes.",url:"https://attack.mitre.org/techniques/T1057/"},T1082:{id:"T1082",name:"System Information Discovery",tactic:"Discovery",description:"Adversaries may attempt to gather information about the system.",url:"https://attack.mitre.org/techniques/T1082/"},T1021:{id:"T1021",name:"Remote Services",tactic:"Lateral Movement",description:"Adversaries may use valid credentials to access remote systems.",url:"https://attack.mitre.org/techniques/T1021/"},"T1021.001":{id:"T1021.001",name:"Remote Desktop Protocol",tactic:"Lateral Movement",description:"Adversaries may use RDP to perform lateral movement.",url:"https://attack.mitre.org/techniques/T1021/001/"},"T1021.002":{id:"T1021.002",name:"SMB/Windows Admin Shares",tactic:"Lateral Movement",description:"Adversaries may use SMB to interact with a remote network share.",url:"https://attack.mitre.org/techniques/T1021/002/"},T1105:{id:"T1105",name:"Ingress Tool Transfer",tactic:"Command and Control",description:"Adversaries may transfer tools or files from an external system.",url:"https://attack.mitre.org/techniques/T1105/"},T1071:{id:"T1071",name:"Application Layer Protocol",tactic:"Command and Control",description:"Adversaries may communicate using application layer protocols.",url:"https://attack.mitre.org/techniques/T1071/"},"T1071.001":{id:"T1071.001",name:"Web Protocols",tactic:"Command and Control",description:"Adversaries may communicate using HTTP/HTTPS.",url:"https://attack.mitre.org/techniques/T1071/001/"},T1041:{id:"T1041",name:"Exfiltration Over C2 Channel",tactic:"Exfiltration",description:"Adversaries may steal data by exfiltrating over their C2 channel.",url:"https://attack.mitre.org/techniques/T1041/"},T1567:{id:"T1567",name:"Exfiltration Over Web Service",tactic:"Exfiltration",description:"Adversaries may exfiltrate data to cloud storage or file sharing services.",url:"https://attack.mitre.org/techniques/T1567/"},T1486:{id:"T1486",name:"Data Encrypted for Impact",tactic:"Impact",description:"Adversaries may encrypt data on target systems to disrupt availability.",url:"https://attack.mitre.org/techniques/T1486/"},T1490:{id:"T1490",name:"Inhibit System Recovery",tactic:"Impact",description:"Adversaries may delete or remove recovery mechanisms.",url:"https://attack.mitre.org/techniques/T1490/"},T1498:{id:"T1498",name:"Network Denial of Service",tactic:"Impact",description:"Adversaries may perform Network DoS attacks to degrade or block availability.",url:"https://attack.mitre.org/techniques/T1498/"},T1499:{id:"T1499",name:"Endpoint Denial of Service",tactic:"Impact",description:"Adversaries may perform Endpoint DoS attacks to degrade or block availability.",url:"https://attack.mitre.org/techniques/T1499/"}},s={phishing:["T1566","T1566.001","T1566.002"],spearphishing:["T1566.001","T1566.002"],exploit:["T1190","T1068","T1203"],vulnerability:["T1190","T1068"],"zero-day":["T1190","T1068"],vpn:["T1133"],rdp:["T1021.001","T1133"],powershell:["T1059.001"],"cmd.exe":["T1059.003"],"command line":["T1059"],script:["T1059"],macro:["T1203"],"scheduled task":["T1053"],registry:["T1547"],service:["T1543"],backdoor:["T1547"],"privilege escalation":["T1068","T1548"],"uac bypass":["T1548"],token:["T1134"],disable:["T1562"],antivirus:["T1562"],obfuscation:["T1027"],encoding:["T1027"],logs:["T1070"],masquerade:["T1036"],credential:["T1003","T1555"],lsass:["T1003.001"],mimikatz:["T1003.001"],password:["T1003","T1555","T1110"],"brute force":["T1110"],keylogger:["T1056"],reconnaissance:["T1087","T1083","T1046"],scan:["T1046"],enumerate:["T1087","T1083"],"lateral movement":["T1021"],"remote desktop":["T1021.001"],smb:["T1021.002"],c2:["T1071","T1105"],"command and control":["T1071","T1105"],beacon:["T1071"],http:["T1071.001"],https:["T1071.001"],exfiltration:["T1041","T
11567"],"data theft":["T1041","T1567"],"cloud storage":["T1567"],ransomware:["T1486","T1490"],encrypt:["T1486"],wiper:["T1485"],ddos:["T1498","T1499"],"denial of service":["T1498","T1499"]};function n(e){return function(e){let t=e.replace(/srcset="[^"]*"/gi,"").replace(/srcset='[^']*'/gi,"").replace(/href="[^"]*"/gi,"").replace(/href='[^']*'/gi,"").replace(/src="[^"]*"/gi,"").replace(/src='[^']*'/gi,"").replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim();t.toLowerCase();let r=new Set,n={};(t.match(/T\d{4}(?:\.\d{3})?/gi)||[]).forEach(e=>{let t=e.toUpperCase();a[t]&&(r.add(t),n[t]=(n[t]||0)+1)}),Object.entries(s).forEach(e=>{let[a,s]=e;(function(e,t){let r=e.toLowerCase();if("http"===t||"https"===t){let r=/(c2|command.{1,20}control|beacon|malware|backdoor|exfiltrat|trojan|apt)/i,a=RegExp("\\b".concat(t,"\\b"),"i");return e.split(/[.!?]/).some(e=>r.test(e)&&a.test(e))}let a={password:/(dump|steal|harvest|credential|mimikatz|lsass|brute.force)/i,scan:/(reconnaissance|network.scan|port.scan|vulnerability.scan|enumerate)/i,"remote desktop":/(lateral.movement|compromise|exploit|unauthorized)/i,"cloud storage":/(exfiltrat|data.theft|unauthorized|malicious)/i};return a[t]?e.split(/[.!?]/).some(e=>e.toLowerCase().includes(t)&&a[t].test(e)):r.includes(t)})(t,a)&&s.forEach(e=>{r.add(e),n[e]=(n[e]||0)+.3})});let i=Array.from(r).map(e=>a[e]).filter(Boolean).sort((e,t)=>(n[t.id]||0)-(n[e.id]||0)),o=0;return i.forEach(e=>{o+=n[e.id]||0}),{techniques:i,confidence:o>0?Math.min(.25*o,1):0}}([e.title,e.ai_summary||e.summary||"",e.content||""].join(" "))}},38472:function(e,t,r){r.d(t,{Zv:function(){return a}});function a(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,a="".concat(e," ").concat(t||"").toLowerCase(),s=[];return["zero-day","ransomware","malware","phishing","vulnerability","exploit","breach","apt","backdoor","trojan","rootkit","ddos","sql injection","xss","csrf","mitm","supply chain"].forEach(e=>{a.includes(e)&&s.length<r&&s.push(e)}),s}}}]);
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.