import{_ as w,a as A}from"./DCtuMFER.js";import{_ as F}from"./DXaD0OjS.js";import{_ as I}from"./CyO5g1gb.js";import{_ as v}from"./BwmWgpbG.js";import{_ as B}from"./DbksU3dH.js";import{_ as M}from"./DPmE0egs.js";import{_ as P}from"./BY0xeA_q.js";import{d as T,N as j,a3 as q,i as K,P as L,a4 as O,e as m,o,a,l as u,c as p,w as _,m as r,F as g,r as V,q as U}from"./B08CJtNn.js";import"./laKVya4-.js";import"./MxJSE5eV.js";import"./BTwP6ady.js";import"./BXavTXDM.js";import"./CqE4Z78-.js";import"./fTZc3uM5.js";import"./88opOQSr.js";import"./eHv8qUqa.js";import"./rOCSnSVW.js";import"./gjovfe2x.js";import"./CUy7HhdT.js";import"./CRXJzjwR.js";import"./xjUEazAQ.js";import"./aIDcP5lR.js";import"./NkNhW2e0.js";import"./BmXXXyAy.js";const W={key:0,class:"flex flex-col o_gap-6 @container/simpleresult"},z="insecureElements",ke=T({__name:"elements-[pid]-[sid]",setup(G){const{kapi:y}=j(),{setCachedData:k,addTimeToProcessedData:d}=q(),f=K(),{sid:i,pid:b}=f.params;if(!i)throw new Error("sid is required");const{trackFirstSeen:C}=L(),{data:c,error:h,refresh:E}=O(`metrics-elements${i||0}`,async()=>await y("CheckInsecureContent").then(e=>e.getInsecureElements(Number(i))),{transform:e=>{if(Object.keys(e.results).length===0)return d({results:[]},0);C(Number(b),Number(i),f.name);const l={results:Object.values(e.results).map(t=>({component:t.component,elements:t.insecure_elements?.map(s=>typeof s=="string"?s:{content:s.url,status:{text:s.status,color:"error"}})||[],error:t.error||""}))};return d(l)},getCachedData:(e,l,t)=>{if(!(t.cause==="refresh:manual"||t.cause==="refresh:hook"))return k(e)}});return(e,l)=>{const t=w,s=F,D=A,x=I,S=v,$=B,R=M,H=P;return o(),m("div",null,[a(s,{"page-key":"pMonitoringSecurityElements"},{title:_(()=>[a(t,{title:"pMonitoringSecurityElements","info-type":z})]),_:1}),r(c)?.results?(o(),m(g,{key:0},[a(D,{"data-count":r(c).results.length,class:"o_mb-6"},null,8,["data-count"]),r(c).results.length?(o(),m("div",W,[(o(!0),m(g,null,V(r(c).results,(n,N)=>(o(),p(R,{key:N,"component-info":n.component},{default:_(()=>[a(x,{status:n.elements.length?"danger":"success",title:n.elements.length?e.$t("insecureResults.errorHeadline",{n:n.elements.length}):e.$t("insecureResults.noErrorHeadline"),description:n.elements.length?e.$t("insecureResults.errorSubline"):e.$t("insecureResults.noErrorSubline"),class:"o_mb-2"},null,8,["status","title","description"]),n.elements.length?(o(),p($,{key:0,title:e.$t("insecureResults.errorList"),color:"error",variant:"subtle",icon:r(U).icoError,class:"o_mt-6"},{description:_(()=>[a(S,{entries:n.elements,class:"font-medium"},null,8,["entries"])]),_:2},1032,["title","icon"])):u("",!0)]),_:2},1032,["component-info"]))),128))])):u("",!0)],64)):u("",!0),r(h)?(o(),p(H,{key:1,error:r(h),refresh:r(E)},null,8,["error","refresh"])):u("",!0)])}}});export{ke as default};
