1import{aP as d,aQ as r,aH as s}from"./index-CpeGhXo5.js";const l=d()(r((i,t)=>({incidents:[],timelineEvents:[],fetchIncidents:async()=>{try{const n=await s.get("/sysadmin/incidents"),a=Array.isArray(n.data)?n.data:[];i({incidents:a})}catch(n){console.error("[IncidentStore] API failed, keeping local data",n)}},addIncident:async n=>{try{const a=await s.post("/sysadmin/incidents",n),e=a.data?.data||a.data;i({incidents:[e,...t().incidents]})}catch(a){console.error("API failed, falling back to local state",a),i({incidents:[n,...t().incidents]})}},updateIncident:async(n,a)=>{try{const e=await s.patch(`/sysadmin/incidents/${n}`,a);i({incidents:t().incidents.map(c=>c.id===n?e.data:c)})}catch(e){console.error("API failed, falling back to local state",e),i({incidents:t().incidents.map(c=>c.id===n?{...c,...a}:c)})}},deleteIncident:async n=>{try{await s.delete(`/sysadmin/incidents/${n}`),i({incidents:t().incidents.filter(a=>a.id!==n)})}catch(a){console.error("API failed, falling back to local state",a),i({incidents:t().incidents.filter(e=>e.id!==n)})}},addTimelineEvent:n=>{i({timelineEvents:[{...n,id:`EVT-INC-${Date.now()}`},...t().timelineEvents]})}}),{name:"incident-store"}));export{l as u};
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.