1import{e as w,r as n,f as G,l as h,c as l,o as s,a as o,L as u,t as a,w as g,T as d,g as k,d as C,b as O,F as $}from"#entry";import{_ as j}from"./DlAUqK2U.js";const A={class:"cerebro-actions-panel"},L={class:"action-section"},M={class:"info-grid"},J={class:"info-value code"},P={class:"info-value code"},R={class:"info-value code"},q={class:"action-section"},z={class:"input-group"},H={key:0,class:"status-message"},Q={class:"action-section"},W={key:0,class:"json-config-display"},X={key:1,class:"status-message"},Y={class:"action-section"},Z={key:0,class:"status-message"},_="button",ee="input",te=w({__name:"cerebro-test",setup(E){const{getCerebroId:b,getConfig:y,getSDKVersion:v,getSessionId:m,sendEvent:V,sendUserEvent:F,setCerebroId:x}=h(),i=n(""),c=n(""),f=n(""),I=n(""),D=n(""),p=n(""),r=n("");G(async()=>{await T(),F({account_id:"1234567890"})});const T=async()=>{try{const t=await b();c.value=t}catch(t){console.error("Failed to get initial Cerebro ID:",t),c.value="Error fetching ID"}try{I.value=v()}catch(t){console.error("Failed to get SDK Version:",t),I.value="Error"}try{D.value=await m()}catch(t){console.error("Failed to get Session ID:",t),D.value="Error"}},N=()=>{try{V({eventName:"click_event_test",properties:{page:"cerebro_test_component",timestamp:new Date().toISOString()}}),p.value=`Event 'click_event_test' sent successfully at ${new Date().toLocaleTimeString()}`}catch(t){console.error("Failed to send event:",t),p.value="Failed to send event."}},S=async()=>{try{const t=await b();c.value=t}catch(t){console.error("Failed to get Cerebro ID:",t),c.value="Error fetching ID"}},U=async()=>{if(!i.value.trim()){r.value="Cerebro ID input is empty.",console.warn(r.value);return}try{await x(i.value),r.value=`Cerebro ID successfully set to: ${i.value}`,await S()}catch(t){console.error("Failed to set Cerebro ID:",t),r.value="Error setting Cerebro ID."}},B=async()=>{try{const t=await y();f.value=JSON.stringify(t,null,2)}catch(t){console.error("Failed to get user config:",t),f.value="Error fetching configuration."}};return(t,e)=>(s(),l("div",A,[e[12]||(e[12]=o("h2",null,"Cerebro SDK Test Panel",-1)),o("div",L,[e[5]||(e[5]=o("h3",null,"SDK & Session Information",-1)),o("div",M,[e[1]||(e[1]=o("span",{class:"info-label"},"SDK Version:",-1)),o("span",J,a(I.value),1),e[2]||(e[2]=o("span",{class:"info-label"},"Session ID:",-1)),o("span",P,a(D.value),1),e[3]||(e[3]=o("span",{class:"info-label"},"Current Cerebro ID:",-1)),o("span",R,a(c.value),1)]),(s(),u(d(_),{onClick:S},{default:g(()=>[...e[4]||(e[4]=[C("Refresh Current Cerebro ID",-1)])]),_:1}))]),o("div",q,[e[7]||(e[7]=o("h3",null,"Manage Cerebro ID",-1)),o("div",z,[(s(),u(d(ee),{type:"text",modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=K=>i.value=K),placeholder:"Enter new Cerebro ID",class:"flex-grow"},null,8,["modelValue"])),(s(),u(d(_),{onClick:U},{default:g(()=>[...e[6]||(e[6]=[C("Set Cerebro ID",-1)])]),_:1}))]),r.value?(s(),l("p",H,a(r.value),1)):k("",!0)]),o("div",Q,[e[9]||(e[9]=o("h3",null,"User Configuration",-1)),(s(),u(d(_),{onClick:B},{default:g(()=>[...e[8]||(e[8]=[C("Get User Config",-1)])]),_:1})),f.value?(s(),l("pre",W,a(f.value),1)):(s(),l("p",X,'Click "Get User Config" to view configuration.'))]),o("div",Y,[e[11]||(e[11]=o("h3",null,"Send Event",-1)),(s(),u(d(_),{onClick:N},{default:g(()=>[...e[10]||(e[10]=[C("Send Test Click Event",-1)])]),_:1})),p.value?(s(),l("p",Z,a(p.value),1)):k("",!0)])]))}}),oe=Object.assign(j(te,[["__scopeId","data-v-293929e1"]]),{__name:"CerebroTest"}),re=w({__name:"cerebro-test",setup(E){const{getConfig:b}=h();return(y,v)=>{const m=oe;return s(),l($,null,[v[0]||(v[0]=o("div",null,[o("h1",null,"Cerebro Test")],-1)),O(m)],64)}}});export{re as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.