PageSourceSearch

https://app.oria.global/assets/ClientTopicsView-DutJmIBh.js

js oria.global collected 2026-10-05 07:54:36 UTC 46,523 bytes, 1 lines download raw bytes

1import{d as Ct,aE as Se,c as u,y as _,b8 as St,h as y,b9 as as,f as c,_ as wt,ab as os,b3 as ns,b4 as is,b2 as rs,o as ls,q as Ne,by as pt,db as mt,cm as cs,b0 as X,b1 as ge,d8 as ds,bz as vt,dc as _t,cr as U,aO as us,Z as be,a,t as n,B as ps,C as ms,H as vs,A as _s,E as B,P as g,F as I,r as $,u as Q,a6 as ht,a2 as hs,a1 as fs,b as L,e as f,$ as ft,z as gt,bP as ye,dd as gs,cs as bs}from"./index-DaM-Wkq5.js";import{s as ys,n as Cs,i as Ss,p as ws,A as Ts}from"./projectionPublication-DWPQopss.js";import{_ as ks}from"./DialogModal.vue_vue_type_script_setup_true_lang-BtP4TbZt.js";import{P as Ps}from"./PageTopCluster-BxnqYXRh.js";import{r as bt}from"./analysisBrandTones-CXHuSI9g.js";import{s as Bs}from"./brandMonitoringWarmup-o4RKfnmO.js";import{e as xs}from"./monitoringFullAnalysis-DKPursLL.js";import{p as re,q as Ce,m as Is}from"./promptSubtabEnrichment-Cuv6KoWV.js";import"./dialogTeleportTarget-CdqU1y7t.js";const Ls={key:0,class:"workspace-refresh-overlay"},Rs=Ct({__name:"WorkspaceRefreshOverlay",props:{visible:{type:Boolean},title:{},description:{},statusLabel:{default:""},language:{default:"en-US"}},setup(j){return(p,D)=>(c(),Se(as,{to:"body"},[j.visible?(c(),u("div",Ls,[_(St,{"test-id":"workspace-refresh-overlay",title:j.title,subtitle:j.description,"status-label":j.statusLabel,language:j.language,"progress-mode":"simulated","estimated-duration-ms":2400},null,8,["title","subtitle","status-label","language"])])):y("",!0)]))}}),zs=wt(Rs,[["__scopeId","data-v-1307fd0a"]]),Es={class:"topics-page-top-bar"},$s=["aria-label"],Os={class:"topics-breadcrumb__current"},Ns={class:"topics-header","data-testid":"result-analysis-page-header"},As={class:"topics-header__copy"},qs={class:"topics-header__eyebrow"},Ds={class:"topics-page-top-actions"},Ms={class:"topics-controls-card topics-surface"},Ws={class:"topics-controls-card__copy"},Fs={class:"topics-controls-card__eyebrow"},Us={class:"topics-controls"},js=["aria-label"],Vs={class:"topics-control__label"},Ks={class:"topics-search-field"},Hs={class:"topics-search-field__icon"},Qs=["placeholder"],Gs={class:"topics-control"},Ys={id:"topics-competitor-label",class:"topics-control__label topics-control__label--accent"},Zs=["aria-expanded","disabled"],Js={class:"topics-select-field__icon"},Xs={class:"topics-select-field__value"},ea={key:0},ta={class:"topics-select-field__chevron"},sa={key:0,class:"topics-select-menu__list",role:"listbox","aria-labelledby":"topics-competitor-label","data-testid":"topics-competitor-list"},aa=["aria-selected","disabled","onClick"],oa={key:0},na={key:2},ia={key:3,class:"topics-state-card topics-empty"},ra={key:4,class:"topics-grid"},la={class:"topics-brand-panel__top"},ca={class:"topics-brand-panel__copy"},da={class:"topics-brand-panel__eyebrow"},ua={class:"topics-brand-panel__brand"},pa={class:"topics-brand-panel__count"},ma={class:"topics-sentiment"},va={class:"topics-sentiment__header"},_a={class:"topics-sentiment__heading"},ha={class:"topics-sentiment__icon topics-sentiment__icon--positive"},fa={class:"topics-sentiment__count"},ga={class:"topics-sentiment__body","data-testid":"topics-primary-positive-body"},ba={class:"topics-card-list"},ya=["onClick"],Ca={class:"topics-card__top"},Sa={class:"topics-card__title-wrap"},wa={class:"topics-card__title"},Ta={class:"topics-card__meta-line"},ka={class:"topics-card__bottom"},Pa={class:"topics-card__providers"},Ba=["title"],xa={key:0,class:"topics-card__source"},Ia={key:1,class:"topics-empty topics-empty--reserved"},La={class:"topics-empty__icon"},Ra={class:"topics-sentiment__footer"},za={class:"topics-sentiment"},Ea={class:"topics-sentiment__header"},$a={class:"topics-sentiment__heading"},Oa={class:"topics-sentiment__icon topics-sentiment__icon--negative"},Na={class:"topics-sentiment__count"},Aa={class:"topics-sentiment__body","data-testid":"topics-primary-negative-body"},qa={class:"topics-card-list"},Da=["onClick"],Ma={class:"topics-card__top"},Wa={class:"topics-card__title-wrap"},Fa={class:"topics-card__title"},Ua={class:"topics-card__meta-line"},ja={class:"topics-card__bottom"},Va={class:"topics-card__providers"},Ka=["title"],Ha={key:0,class:"topics-card__source"},Qa={key:1,class:"topics-empty topics-empty--reserved"},Ga={class:"topics-empty__icon"},Ya={class:"topics-sentiment__footer"},Za={class:"topics-brand-panel__top"},Ja={class:"topics-brand-panel__copy"},Xa={class:"topics-brand-panel__eyebrow"},eo={class:"topics-brand-panel__brand"},to={class:"topics-brand-panel__count"},so={class:"topics-sentiment"},ao={class:"topics-sentiment__header"},oo={class:"topics-sentiment__heading"},no={class:"topics-sentiment__icon topics-sentiment__icon--positive"},io={class:"topics-sentiment__count"},ro={class:"topics-sentiment__body","data-testid":"topics-comparison-positive-body"},lo={class:"topics-card-list"},co=["onClick"],uo={class:"topics-card__top"},po={class:"topics-card__title-wrap"},mo={class:"topics-card__title"},vo={class:"topics-card__meta-line"},_o={class:"topics-card__bottom"},ho={class:"topics-card__providers"},fo=["title"],go={key:0,class:"topics-card__source"},bo={key:1,class:"topics-empty topics-empty--reserved"},yo={class:"topics-empty__icon"},Co={class:"topics-sentiment__footer"},So={class:"topics-sentiment"},wo={class:"topics-sentiment__header"},To={class:"topics-sentiment__heading"},ko={class:"topics-sentiment__icon topics-sentiment__icon--negative"},Po={class:"topics-sentiment__count"},Bo={class:"topics-sentiment__body","data-testid":"topics-comparison-negative-body"},xo={class:"topics-card-list"},Io=["onClick"],Lo={class:"topics-card__top"},Ro={class:"topics-card__title-wrap"},zo={class:"topics-card__title"},Eo={class:"topics-card__meta-line"},$o={class:"topics-card__bottom"},Oo={class:"topics-card__providers"},No=["title"],Ao={key:0,class:"topics-card__source"},qo={key:1,class:"topics-empty topics-empty--reserved"},Do={class:"topics-empty__icon"},Mo={class:"topics-sentiment__footer"},Wo={key:1,class:"topics-brand-panel topics-surface","data-testid":"topics-no-comparison-panel"},Fo={class:"topics-empty topics-empty--reserved"},Uo={class:"topics-empty__icon"},jo={role:"status"},Vo={key:1},Ko={key:0,class:"topics-dialog","data-testid":"topics-evidence-dialog"},Ho={class:"pill-row pill-row--wrap"},Qo={class:"pill pill--soft"},Go={class:"pill pill--soft"},Yo={class:"pill pill--soft"},Zo={class:"topics-dialog__summary"},Jo={class:"topics-dialog__summary-copy"},Xo={class:"topics-evidence-list"},en={class:"topics-evidence-card__header"},tn={class:"topics-evidence-card__meta"},sn={key:0},an=["href"],on={class:"topics-evidence-card__snippet"},nn={key:0},rn={key:1},ln={class:"topics-evidence-card__footer"},cn={class:"topics-card__providers"}
1,dn=["title"],un=["onClick"],pn={key:0,class:"topics-evidence-card__context"},mn={key:0},vn={key:1},yt=3,_n=Ct({__name:"ClientTopicsView",props:{brandId:{},executionLlms:{default:()=>[]},executionStatus:{default:""},executionProgressPercent:{default:null},embedded:{type:Boolean,default:!1},immutableSnapshot:{type:Boolean,default:!1},serverOwnedEnrichment:{type:Boolean,default:!1},initialSnapshot:{default:null}},setup(j){const p=j,D=hs(),se=fs(),C=os(),we=ns(),w=is(),h=rs(),v=L(null),O=L(!1),M=L(""),Ae=L(""),qe=L(!1),V=L(!1),ae=L(!1),N=L([]),De=L(!1),Te=L(12),A=L(null),T=L(null),oe=L(new Set),le=L({"primary-positive":!1,"primary-negative":!1,"comparison-positive":!1,"comparison-negative":!1});let ne=0,W=0,q=0,ke=null,ce=null,G=0;function Pe(e){return[...e].map(s=>s.trim()).filter(Boolean).sort((s,o)=>s.localeCompare(o)).join("||")}const Be=f(()=>C.locale==="pt-BR"),Tt=f(()=>{const e=p.executionProgressPercent;return typeof e=="number"&&Number.isFinite(e)?e:Te.value}),kt=f(()=>!0),Me=f(()=>{const e=p.executionStatus.trim().toLowerCase().replace(/[\s_-]/g,"");return!e||["completed","succeeded","success","partial","partiallyfailed","completedwitherrors"].includes(e)}),k=f(()=>bs({brandId:p.brandId,routeRunId:D.query.runId,selectedBrandId:we.selectedBrandId,selectedRunId:we.selectedRunId})),de=f(()=>{var e,s,o,i,l,t,r,m;return((s=(e=v.value)==null?void 0:e.brandName)==null?void 0:s.trim())||((i=(o=h.currentSourcesPage)==null?void 0:o.brandName)==null?void 0:i.trim())||((t=(l=h.currentSourcesPage)==null?void 0:l.primaryBrand)==null?void 0:t.trim())||((m=(r=v.value)==null?void 0:r.primary.brand)==null?void 0:m.trim())||""}),Pt=f(()=>Be.value?"Hierarquia da página de tópicos":"Topics page hierarchy"),Bt=f(()=>Be.value?"Clientes salvos":"Saved clients"),Je=new Set(["product","products","produto","produtos","system","sistema","magazine","network","rede","platform","plataforma","program","programa","seguro","seguros","assist","assistance","universal","viagem","travel"]),xt={"digital care and telehealth":"Cuidado digital e teleatendimento","emotional health and wellbeing":"Saúde emocional e bem-estar","workplace mental health":"Saúde mental no trabalho","affiliate network":"Rede de afiliados","platform ecosystem":"Ecossistema da plataforma","tracking and attribution":"Rastreamento e atribuição","commissions and payouts":"Comissões e repasses","reporting and analytics":"Relatórios e análises","integrations and automation":"Integrações e automação","platform capabilities":"Capacidades da plataforma","implementation complexity":"Complexidade de implementação","vendor comparison":"Comparação entre fornecedores","insurance and coverage":"Planos e cobertura","affordability and payment":"Acessibilidade e pagamento","availability and access":"Disponibilidade e acesso","specialties and care fit":"Especialidades e adequação do cuidado","provider network and support":"Rede profissional e suporte","family experience":"Experiência em família","leisure and pools":"Lazer e piscinas","structure and comfort":"Estrutura e conforto","price and value":"Preço e custo-benefício","cleaning power":"Poder de limpeza","stain removal":"Remoção de manchas","fabric care":"Cuidado com os tecidos","scent and fragrance":"Perfume e fragrância","residue and dissolution":"Resíduos e dissolução","ease of use":"Facilidade de uso",availability:"Disponibilidade",innovation:"Inovação",sustainability:"Sustentabilidade",packaging:"Embalagem","product performance and comfort":"Desempenho e conforto do produto","customer support":"Atendimento ao cliente","quality and trust":"Qualidade e confiança","market expertise":"Experiência no mercado","governance and compliance":"Governança e conformidade","market leadership":"Liderança de mercado","sensitivity and safety":"Sensibilidade e segurança","yield and efficiency":"Rendimento e eficiência"};function It(e,s){const o=U(e);return o?o.split(/\s+/).filter(Boolean).length>1?!1:s.some(l=>{const t=U(l);return!t||t===o?!1:t.startsWith(`${o} `)||t.includes(` ${o} `)||t.endsWith(` ${o}`)||o.length>=3&&t.startsWith(o)&&t.length>
1o.length+1}):!0}const Xe=f(()=>{var i,l,t,r,m,b;const e=((l=(i=h.currentSourcesPage)==null?void 0:i.primaryBrand)==null?void 0:l.trim())||((r=(t=v.value)==null?void 0:t.brandName)==null?void 0:r.trim())||((b=(m=v.value)==null?void 0:m.primary.brand)==null?void 0:b.trim())||"",s=new Set,o=X(e);return N.value.map(ge).filter(S=>{const z=U(S);return!z||Je.has(z)||s.has(z)?!1:(s.add(z),!0)}).filter(S=>X(S)!==o).filter((S,z,ie)=>!It(S,ie))}),K=f(()=>{var l;const e=rt(((l=v.value)==null?void 0:l.comparisonOptions)??[]),s=new Map(e.map(t=>[X(t.brand),t])),o=Xe.value.length?Xe.value:e.map(t=>t.brand),i=new Set;return o.map(t=>{const r=X(t);if(!r||i.has(r))return null;i.add(r);const m=s.get(r);return{brand:ge(t),positiveTopicCount:Math.max(0,(m==null?void 0:m.positiveTopicCount)??0),negativeTopicCount:Math.max(0,(m==null?void 0:m.negativeTopicCount)??0),topicCount:Math.max(0,(m==null?void 0:m.topicCount)??(e.length?0:1)),hasTopicCount:!!m}}).filter(t=>!!t)}),We=f(()=>K.value.filter(e=>e.hasTopicCount&&e.topicCount>0)),Lt=f(()=>We.value.length?We.value:K.value.filter(e=>!e.hasTopicCount||e.topicCount>0)),x=f({get(){var t,r,m;const e=typeof D.query.comparison=="string"?D.query.comparison:"",s=U(e),o=K.value.find(b=>U(b.brand)===s);if(o&&!ue(o))return o.brand;const i=U(((t=v.value)==null?void 0:t.comparison.brand)??""),l=K.value.find(b=>U(b.brand)===i);return l&&!ue(l)?l.brand:((r=Lt.value[0])==null?void 0:r.brand)??((m=K.value[0])==null?void 0:m.brand)??""},set(e){se.replace({query:{...D.query,comparison:e||void 0}})}}),Fe=f(()=>K.value.find(e=>e.brand===x.value)??null),Y=f(()=>{var e;return v.value&&x.value?((e=Ce(v.value,x.value))==null?void 0:e.comparison)??null:null}),Ue=f(()=>!!(k.value&&(p.immutableSnapshot||["completed","succeeded","success","partial","partiallyfailed","completedwitherrors","failed","cancelled","canceled","timedout"].includes(p.executionStatus.trim().toLowerCase().replace(/[\s_-]/g,""))))),H=f(()=>!!(k.value&&(Ue.value||p.serverOwnedEnrichment)));function et(e){return d.value.topicCount(e.topicCount)}function ue(e){return e.hasTopicCount&&e.topicCount<=0&&We.value.length>0}function Rt(e){ue(e)||(V.value=!1,x.value=e.brand)}const tt=f(()=>Ae.value.trim().toLowerCase()),pe=f(()=>{var e;return Ie(((e=v.value)==null?void 0:e.primary.positiveTopics)??[])}),me=f(()=>{var e;return Ie(((e=v.value)==null?void 0:e.primary.negativeTopics)??[])}),ve=f(()=>{var e;return Ie(((e=Y.value)==null?void 0:e.positiveTopics)??[])}),_e=f(()=>{var e;return Ie(((e=Y.value)==null?void 0:e.negativeTopics)??[])}),zt=f(()=>{var e;return bt(((e=v.value)==null?void 0:e.primary.brand)||de.value||"")}),Et=f(()=>{var e;return bt(((e=Y.value)==null?void 0:e.brand)||x.value||"")}),d=f(()=>Be.value?{eyebrow:"Análise narrativa",title:"Tópicos",subtitle:"Compare os temas sustentados pelas fontes citadas e veja como a marca principal e o concorrente aparecem dentro do mesmo recorte compartilhado de LLMs.",rerunSearch:"Refazer busca",newPrompt:"Novo Prompt",toolbarEyebrow:"Controles de comparação de tópicos",toolbarTitle:"Refine a comparação dos tópicos",toolbarSubtitle:"Refine a comparação dos tópicos. Use a busca e o seletor de concorrente abaixo para inspecionar exatamente o mesmo recorte compartilhado de LLMs.",searchTopics:"Pesquisar narrativas",searchPlaceholder:"Ex.: 'Plataforma', 'Preço'...",competitor:"Comparar com marca",searchedBrand:"Marca principal",comparisonBrand:"Concorrente",positiveTopics:"Tópicos positivos",negativeTopics:"Tópicos negativos",snippetsShort:"trech.",sourcesShort:"fontes",score:"score",loading:"Carregando tópicos",loadingDescription:"Organizando trechos citados, agrupando temas e comparando a marca com o concorrente selecionado.",loadingProgressMeta:"Preparando os tópicos, as evidências citadas e a comparação entre marcas.",loadingProgressAria:"Progresso do carregamento de tópicos",loadingAnalysis:"Carregando análise de tópicos",refreshingComparison:"Atualizando comparação",noSavedComparison:"Os tópicos desta comparação ainda não estão disponíveis. Selecione outro concorrente ou tente novamente após o carregamento.",refreshingComparisonDescription:"Buscando o novo concorrente selecionado e reorganizando os temas.",s
1ourceEvidenceEyebrow:"Evidências das fontes",sourceEvidenceTitle:"Enriquecendo evidências de tópicos",sourceEvidenceDescription:"Os tópicos salvos já estão disponíveis. Estamos completando trechos dos artigos em segundo plano.",sourceEvidenceReadyTitle:"Atualização de metadados concluída",sourceEvidenceReadyDescription:"Os tópicos salvos estão totalmente indexados e prontos para leitura.",sourceEvidenceUnavailableTitle:"Evidências das fontes disponíveis",sourceEvidenceUnavailableDescription:"Os tópicos salvos usam as fontes capturadas nesta execução.",sourceEvidenceFailedTitle:"Atualização de metadados incompleta",sourceEvidenceFailedDescription:"Os tópicos salvos continuam disponíveis. Tente novamente para completar os trechos dos artigos.",sourceEvidenceSyncedLabel:"Sincronizado",sourceEvidenceUpdatingLabel:"Atualizando",sourceEvidenceFailedLabel:"Requer atenção",retry:"Tentar novamente",unavailable:"Tópicos indisponíveis",noSourceBackedCompetitors:"Nenhum concorrente confirmado nas fontes foi encontrado para as LLMs selecionadas.",noPositiveTopics:"Nenhum tópico positivo passou pelo filtro de evidências.",noNegativeTopics:"Nenhum tópico negativo passou pelo filtro de evidências.",topicDetails:"Detalhes do tópico",openSource:"Abrir fonte",showContext:"Mostrar contexto",hideContext:"Ocultar contexto",seeAll:e=>`Ver todos ${e}`,seeLess:"Ver menos",topicCount:e=>`${e} ${e===1?"tópico":"tópicos"}`,panelSummary:(e,s)=>`${e} tópicos / ${s} trechos`}:{eyebrow:"Narrative Analysis",title:"Topics",subtitle:"Compare the evidence-backed themes shaping the primary brand and the selected competitor across the same shared LLM slice.",rerunSearch:"Rerun search",newPrompt:"New Prompt",toolbarEyebrow:"Topic comparison controls",toolbarTitle:"Refine topic comparison",toolbarSubtitle:"Refine the topics comparison. Use the search field and competitor selector below to inspect the exact same shared LLM slice.",searchTopics:"Search narratives",searchPlaceholder:"Ex: 'Platform', 'Price'...",competitor:"Compare with brand",searchedBrand:"Primary brand",comparisonBrand:"Competitor",positiveTopics:"Positive Topics",negativeTopics:"Negative Topics",snippetsShort:"snip.",sourcesShort:"sources",score:"score",loading:"Loading Topics",loadingDescription:"Organizing cited snippets, grouping themes, and comparing the brand against the selected competitor.",loadingProgressMeta:"Preparing the topics, cited evidence, and the brand comparison.",loadingProgressAria:"Topics loading progress",loadingAnalysis:"Loading topics analysis",refreshingComparison:"Refreshing comparison",noSavedComparison:"Topics for this comparison are not available yet. Select another competitor or try again after loading.",refreshingComparisonDescription:"Loading the newly selected competitor and rebuilding the topics comparison.",sourceEvidenceEyebrow:"Source evidence",sourceEvidenceTitle:"Enriching topic evidence",sourceEvidenceDescription:"The stored topics are already available. Article snippets are being completed in the background.",sourceEvidenceReadyTitle:"Metadata update complete",sourceEvidenceReadyDescription:"The stored topics are fully indexed and ready to read.",sourceEvidenceUnavailableTitle:"Source evidence available",sourceEvidenceUnavailableDescription:"The stored topics use the captured sources from this run.",sourceEvidenceFailedTitle:"Metadata update incomplete",sourceEvidenceFailedDescription:"The stored topics remain available. Retry to complete the article snippets.",sourceEvidenceSyncedLabel:"Synchronized",sourceEvidenceUpdatingLabel:"Updating",sourceEvidenceFailedLabel:"Needs attention",retry:"Try again",unavailable:"Topics unavailable",noSourceBackedCompetitors:"No competitors confirmed in sources were found for the selected LLMs.",noPositiveTopics:"No positive topics passed the evidence gate.",noNegativeTopics:"No negative topics passed the evidence gate.",topicDetails:"Topic details",openSource:"Open source",showContext:"Show context",hideContext:"Hide context",seeAll:e=>`See all ${e}`,seeLess:"See less",topicCount:e=>`${e} ${e===1?"topic":"topics"}`,panelSummary:(e,s)=>`${e} topics / ${s} snippets`}),$t=f(()=>ae.value),Ot=f(()=>d.value.refreshingComparison),Nt=f(()=>d.value.refreshingComparisonDescription),je=f(()=>{var e;return A.value??((e=v.value)==null?void 0:e.sourceCoverageStatus)??null});ls(()=>{Ve()}),Ne([()=>p.brandId,k,()=>p.executionStatus],()=>{G=0,Ke(),Ve()}),Ne(()=>{var e;return((e=v.value)==null?void 0:e.sourceCoverageStatus)??null},e=>{A.value=e,Ge(e)},{immediate:!0}),Ne(()=>`${h.selectedLlms.join("||")}|${k.value}`,()=>{De.value||(V.value=!1,jt())}),Ne(()=>
1typeof D.query.comparison=="string"?D.query.comparison:"",(e,s)=>{e!==s&&(V.value=!1,!Qt(x.value)&&Ye(!1,"comparison"))});function At(e){const s=[...new Set(e.map(i=>i.trim()).filter(Boolean))],o=["google ai mode","perplexity","chatgpt","gemini"];return s.sort((i,l)=>{const t=o.indexOf(i.toLowerCase()),r=o.indexOf(l.toLowerCase()),m=t>=0?t:o.length,b=r>=0?r:o.length;return m-b})}async function st(e,s){const o=At(s);if(!o.length)return re({brandId:p.brandId,comparisonBrand:"",providers:[],runId:e,locale:C.locale,snapshotSafe:p.immutableSnapshot,includeCatalog:!1,savedProjectionOnly:H.value});let i=null;for(const l of o)try{const t=await re({brandId:p.brandId,comparisonBrand:"",providers:[l],runId:e,locale:C.locale,snapshotSafe:p.immutableSnapshot,includeCatalog:!1,savedProjectionOnly:H.value});if(i??(i=t),Le(t.comparison)>0)return t}catch{}return i??re({brandId:p.brandId,comparisonBrand:"",providers:s,runId:e,locale:C.locale,snapshotSafe:p.immutableSnapshot,includeCatalog:!1,savedProjectionOnly:H.value})}async function qt(e,s){var t;const o=Qe(),i=p.serverOwnedEnrichment&&Me.value;if(!p.immutableSnapshot&&!i&&((t=o==null?void 0:o.sourceCoverageStatus)==null?void 0:t.status)!=="ready")return st(e,s);const l=x.value;try{return await re({brandId:p.brandId,comparisonBrand:l,providers:s,runId:e,locale:C.locale,snapshotSafe:!0,includeCatalog:!0,requireCurrent:!0,savedProjectionOnly:H.value})}catch(r){if(H.value)throw r;return st(e,s)}}async function Ve(e=!1){Ke(),e||(G=0);const s=++q;let o=!1;De.value=!0,M.value="",N.value=!p.serverOwnedEnrichment&&!p.immutableSnapshot&&!Ue.value&&h.brandId===p.brandId?h.sharedBrandCatalog.filter(l=>!l.isAnalyzedBrand).map(l=>l.brandName):[],Mt()?(O.value=!1,fe()):(v.value=null,A.value=null,O.value=!0,Wt()),ae.value=!1,he();try{if(await C.hydrate(),p.serverOwnedEnrichment&&!Me.value&&!v.value)return;const l=k.value||"",t=h.selectedLlms.length?[...h.selectedLlms]:[...p.executionLlms];let r=null,m=null;const b=l?qt(l,t).then(E=>s!==q?null:(v.value=E,A.value=E.sourceCoverageStatus??null,N.value=xe(N.value,(E.comparisonOptions??[]).map(te=>te.brand)),O.value=!1,fe(),E)).catch(E=>(r=E,null)):Promise.resolve(null),S=h.ensureBrand(p.brandId,l,!1,H.value).then(()=>{if(s!==q)return!1;h.includeExecutionLlms(p.executionLlms);const E=h.sharedBrandCatalog.filter(te=>!te.isAnalyzedBrand).map(te=>te.brandName);return N.value=xe(E,N.value),!0}).catch(E=>(m=E,!1)),z=await b;if(s!==q)return;if(z){await S,He(s,z,t),G=0;return}const ie=await S;if(s!==q)return;if(!ie)throw r??m??new Error(d.value.unavailable);const P=++W;if(!await ot(P)||P!==W)return;await Ye(!1),G=0}catch(l){s===q&&!v.value&&(ys(l,G,!!(p.serverOwnedEnrichment||Me.value&&Ue.value))?(G=Cs(G),o=!0,M.value="",O.value=!0,Dt(s)):(M.value=l instanceof Error?l.message:d.value.unavailable,O.value=!1))}finally{s===q&&(o||fe(),De.value=o)}}function Dt(e){const s=ws(G);ce=window.setTimeout(()=>{ce=null,e===q&&Ve(!0)},s)}function Ke(){ce!==null&&(window.clearTimeout(ce),ce=null)}async function He(e,s,o){var m;if(s.comparisonCatalogComplete!==!1)return;const i=A.value??s.sourceCoverageStatus??null;if(at(i))return;const l=k.value||"",t=((m=s.comparison)==null?void 0:m.brand)||x.value,r=Pe(o);try{const b=await re({brandId:p.brandId,comparisonBrand:t,providers:o,runId:l,locale:C.locale,snapshotSafe:p.immutableSnapshot||(i==null?void 0:i.status)==="ready",includeCatalog:!0,requireCurrent:(i==null?void 0:i.status)==="ready",savedProjectionOnly:H.value});if(e!==q||k.value!==l||Pe(h.selectedLlms)!==r)return;const S=x.value||t;v.value=Ce(b,S)??b,A.value=b.sourceCoverageStatus??null,N.value=xe(N.value,(b.comparisonOptions??[]).map(z=>z.brand)),he()}catch{}}function at(e){return!!(e&&["stored","queued","running","waiting_for_extraction","waiting_for_provider_queries"].includes(e.status))}function Mt(){var l;const e=x.value,s=[...h.selectedLlms],o=k.value||"";if(!e||!o||!s.length)return!1;const i=((l=pt(p.brandId,void 0,{runId:o,providers:s,comparisonBrand:e,locale:C.locale}))==null?void 0:l.topics)??null;return!i||!mt(i,{comparisonBrand:e,providers:s,runId:o})?!1:(v.value=Ce(i.page,e)??i.page,A.value=v.value.sourceCoverageStatus??null,!0)}function he(){le.value={"primary-positive":!1,"primary-negative":!1,"comparison-positive":!1,"comparison-negative":!1}}function fe(e=!1){ke!==null&&(window.clearInterval(ke),ke=null),e&&(Te.value=12)}function Wt(){fe(!0),ke=window.setInterval(()=>{const e=Te.value;if(e>=90)return;const s=e<28?8:e<48?5:e<70?3:1;Te.value=Math.min(90,e+s)},180)}async function ot(e){const s=e??++W;if(!p.brandId)return s===W&&(N.value=[]),s===W;
1try{const i=Qe()??await cs(p.brandId,h.selectedLlms,void 0,k.value||void 0,C.locale,{savedProjectionOnly:H.value});if(s!==W)return!1;const l=Ft(i);return s!==W?!1:(N.value=xe(N.value,l),!0)}catch{return s!==W?!1:(N.value=[],!0)}}function Qe(){var i;const e=h.currentSourcesPage;if(!e||h.brandId!==p.brandId)return null;const s=k.value||"";if(s&&e.runId!==s)return null;const o=(i=e.selectedProviders)!=null&&i.length?e.selectedProviders:e.filters.llms;return Pe(o)!==Pe(h.selectedLlms)?null:e}function Ft(e){var t,r,m;const s=((t=e.primaryBrand)==null?void 0:t.trim())||((m=(r=h.currentSourcesPage)==null?void 0:r.primaryBrand)==null?void 0:m.trim())||"",o=X(s),i=new Set;return Ut(e).map(ge).filter(b=>{const S=X(b);return!S||Je.has(S)||i.has(S)||o&&S===o?!1:(i.add(S),!0)})}function Ut(e){const s=h.sharedBrandCatalog.filter(o=>!o.isAnalyzedBrand).map(o=>o.brandName.trim()).filter(Boolean);return s.length?s:[...(e.brandProviderPresence??[]).filter(o=>!o.isPrimary).map(o=>o.brand.trim()),...(e.brandCards??[]).filter(o=>!o.isPrimary).map(o=>o.brand.trim())].filter(Boolean)}function xe(e,s){const o=new Set;return[...e,...s].map(ge).filter(i=>{const l=X(i);return!l||o.has(l)?!1:(o.add(l),!0)})}async function jt(){if(!h.ready)return;M.value="",O.value=!0;const e=++W;!await ot(e)||e!==W||await Ye(!1,"llm")}function Ge(e){Is({brandId:p.brandId,providers:h.selectedLlms,runId:k.value||h.currentRunId||void 0,readOnly:p.immutableSnapshot||p.serverOwnedEnrichment,status:e,onStatus:s=>{A.value=s},onReady:async()=>{const s=v.value;s&&await He(q,s,[...h.selectedLlms])}})}function Vt(){var l,t,r,m;const e=v.value,s=h.currentSourcesPage,o=(e==null?void 0:e.filters)??(s==null?void 0:s.filters)??null,i=(l=e==null?void 0:e.selectedProviders)!=null&&l.length?e.selectedProviders:(t=o==null?void 0:o.llms)!=null&&t.length?o.llms:h.selectedLlms;return{companyName:((r=e==null?void 0:e.brandName)==null?void 0:r.trim())||((m=s==null?void 0:s.brandName)==null?void 0:m.trim())||de.value||"",website:(s==null?void 0:s.website)??"",filters:o,providers:i,promptText:(s==null?void 0:s.promptText)??""}}async function Kt(){if(k.value){try{const s=await gs(k.value),o=[...C.savedBrands,...C.recentBrands].find(i=>i.id===s.brandId);we.beginNewSearch(),await se.push(w.prepareRunDraft(s,o==null?void 0:o.website))}catch{M.value=C.locale==="pt-BR"?"Não foi possível recuperar a pesquisa. Tente novamente.":"Could not restore the search. Please try again."}return}const e=Vt();we.beginNewSearch(),w.reset(e.companyName,"AppV1"),e.website&&w.setWebsite(e.website),e.providers.length&&w.setLlms([...e.providers]),e.filters&&(w.setDatePreset(e.filters.dateRange.preset,e.filters.dateRange.label),w.draft.dateRange={...e.filters.dateRange},w.setCountryCode(e.filters.countryCode),e.filters.wholeCountry?w.setWholeCountry(!0):(w.setWholeCountry(!1),w.setRegion(e.filters.regionCode??null,e.filters.regionName??null),w.setCity(e.filters.cityCode??null,e.filters.cityName??null)),w.setPromptCategories([...e.filters.promptCategories]),w.setDiscoveryMatchMode(e.filters.discoveryMatchMode)),w.setMode("Prompt"),w.setPromptText(e.promptText),w.setKeywords([]),se.push("/search/new")}function Ht(){se.push({name:"search-chooser",query:{brandId:p.brandId,source:"topics"}})}async function Ye(e,s="initial",o=!1){var z,ie;if(!p.brandId||!h.ready)return;const i=++ne,l=k.value||"",t=p.immutableSnapshot?null:await xs({brandId:p.brandId,runId:l,providers:h.selectedLlms,isCurrent:()=>i===ne});if(t&&t.id!==l){await se.replace({name:D.name,params:D.params,query:{...D.query,runId:t.id,promptLock:"1"}});return}const r=x.value;if(!r){v.value=null,M.value=d.value.noSourceBackedCompetitors,O.value=!1,ae.value=!1;return}M.value="",O.value=!v.value,ae.value=s==="comparison"&&!!v.value;const m=[...h.selectedLlms],b=k.value||"";let S=!1;if(s==="initial"&&!o){const P=((z=pt(p.brandId,void 0,b?{runId:b,providers:m,comparisonBrand:r,locale:C.locale}:{providers:m,comparisonBrand:r,locale:C.locale}))==null?void 0:z.topics)??null;if(P&&mt(P,{comparisonBrand:r,providers:m,runId:b})){const J=nt(P.page,r);v.value=J.page,A.value=J.page.sourceCoverageStatus??null,Ge(A.value),he(),O.value=!1,S=!0,J.replacementBrand&&await it(J.replacementBrand);return}}try{const P=Qe(),J=s==="comparison"&&!at(je.value),E=()=>{var ct,dt,ut;return re({brandId:p.brandId,comparisonBrand:r,providers:m,runId:b||void 0,locale:C.locale,snapshotSafe:((ct=je.value)==null?void 0:ct.status)==="ready"||((dt=P==null?void 0:P.sourceCoverageStatus)==null?void 0:dt.status)==="ready"||p.immutableSnapshot,forceFresh:o,includeCatalog:J,requireCurrent:J&&((ut=je.value)==null?void 0:ut.status)==="ready",savedProjectionOnly:H.value})},te=e?await ds(E,d.value.loadingAnalysis):await E();if(i!==ne)return;const F=nt(te,r);v.value=F.page,A.value=F.page.sourceCoverageStatus??null,Ge(A.value),he();const Ze=F.replacementBrand||r;vt(p.brandId,{topics:{page:F.page,comparisonBrand:Ze,providersKey:_t((ie=F.page.selectedProviders)!=null&&ie.length?F.page.selectedProviders:m),runId:b}},void 0,b?{runId:b,providers:m,comparisonBrand:Ze,locale:C.locale}:{providers:m,comparisonBrand:Ze,locale:C.locale}),F.replacementBrand&&await it(F.replacementBrand),F.page.comparisonCatalogComplete===!1&&He(q,F.page,m),!p.embedded&&!p.immutableSnapshot&&Bs(p.brandId)}catch(P){if(i!==ne)return;if(S){console.warn("Unable to refresh warmed topics page.",P);return}if(s==="initial"&&!v.value&&Ss(P))throw P;M.value=P instanceof Error?P.message:d.value.unavailable}finally{i===ne&&(O.value=!1,ae.value=!1)}}function Qt(e){var l;if(!v.value||!e)return!1;const s=Ce(v.value,e);if(!s)return!1;ne+=1,v.value=s,M.value="",O.value=!1,ae.value=!1,he();const o=(l=s.selectedProviders)!=null&&l.length?s.selectedProviders:h.selectedLlms,i=k.value||s.runId||"";return vt(p.brandId,{topics:{page:s,comparisonBrand:e,providersKey:_t(o
1),runId:i}},void 0,i?{runId:i,providers:o,comparisonBrand:e,locale:C.locale}:{providers:o,comparisonBrand:e,locale:C.locale}),!0}function nt(e,s){const o=Gt(e,s);return o?{page:Ce(e,o)??e,replacementBrand:o}:{page:e,replacementBrand:""}}async function it(e){await se.replace({query:{...D.query,comparison:e}})}function Gt(e,s){const o=rt(e.comparisonOptions??[]),i=o.find(r=>r.topicCount>0);if(!i)return"";const l=U(s),t=o.find(r=>U(r.brand)===l);return t!=null&&t.topicCount&&t.topicCount>0||U(i.brand)===l?"":i.brand}function rt(e){const s=new Map;return e.forEach(o=>{const i=ge(o.brand),l=X(i);if(!l)return;const t=s.get(l);s.set(l,{brand:i,positiveTopicCount:Math.max(0,(t==null?void 0:t.positiveTopicCount)??0,o.positiveTopicCount),negativeTopicCount:Math.max(0,(t==null?void 0:t.negativeTopicCount)??0,o.negativeTopicCount),topicCount:Math.max(0,(t==null?void 0:t.topicCount)??0,o.topicCount)})}),Array.from(s.values())}function Ie(e){return tt.value?e.filter(s=>[s.topicName,ee(s.topicName),...s.sources.map(i=>`${i.sourceName} ${i.sourceDomain}`),...s.evidence.map(i=>`${i.snippet} ${i.source.articleTitle} ${i.source.sourceDomain}`)].join(" ").toLowerCase().includes(tt.value)):e}function ee(e){if(!Be.value)return e;const s=e.trim().toLowerCase();return xt[s]??e}function Le(e){return e.positiveTopics.length+e.negativeTopics.length}function Yt(e){return[...e.positiveTopics,...e.negativeTopics].reduce((s,o)=>s+o.supportingSnippetCount,0)}function Zt(e){return d.value.panelSummary(Le(e),Yt(e))}function lt(e){return{"--topics-brand-accent":e.accent,"--topics-brand-surface":e.surface,"--topics-brand-border":e.border,"--topics-brand-text":e.text}}function Re(e){return e>=60?"positive":e>=40?"warning":"neutral"}function R(e){return le.value[e]}function ze(e){le.value={...le.value,[e]:!le.value[e]}}function Ee(e,s){return R(e)?s:s.slice(0,yt)}function $e(e){return e.length>yt}function Z(e){const s=e.sources[0];return(s==null?void 0:s.sourceDomain)||(s==null?void 0:s.sourceName)||""}function Oe(e,s,o){T.value={brand:e,tone:s,card:o},oe.value=new Set,qe.value=!0}function Jt(){qe.value=!1,T.value=null,oe.value=new Set}function Xt(e){const s=new Set(oe.value);s.has(e)?s.delete(e):s.add(e),oe.value=s}function es(e){return Zt({positiveTopics:[e],negativeTopics:[]})}function ts(e){return new Intl.DateTimeFormat(C.locale,{dateStyle:"medium"}).format(new Date(e))}function ss(e,s){if(!s.length)return[{text:e,highlighted:!1}];const o=s.map(t=>({start:Math.max(0,t.start),end:Math.min(e.length,t.start+t.length)})).filter(t=>t.end>t.start).sort((t,r)=>t.start-r.start),i=[];let l=0;return o.forEach(t=>{t.start>l&&i.push({text:e.slice(l,t.start),highlighted:!1}),i.push({text:e.slice(t.start,t.end),highlighted:!0}),l=t.end}),l<e.length&&i.push({text:e.slice(l),highlighted:!1}),i.filter(t=>t.text.length>0)}return us(()=>{q+=1,Ke(),fe()}),(e,s)=>{var o,i,l;return c(),u("section",{class:B(["topics-page",{"topics-page--embedded":j.embedded}])},[j.embedded?y("",!0):(c(),Se(Ps,{key:0,class:"topics-page__page-top"},{meta:be(()=>[a("div",Es,[a("nav",{class:"topics-breadcrumb","aria-label":Pt.value},[_(Q(ft),{class:"topics-breadcrumb__link",to:{name:"brands"}},{default:be(()=>[gt(n(Bt.value),1)]),_:1}),_(g,{name:"arrow-right",tone:"muted",size:"sm"}),de.value?(c(),Se(Q(ft),{key:0,class:"topics-breadcrumb__link",to:{name:"brand-hub",params:{brandId:p.brandId}}},{default:be(()=>[gt(n(de.value),1)]),_:1},8,["to"])):y("",!0),de.value?(c(),Se(g,{key:1,name:"arrow-right",tone:"muted",size:"sm"})):y("",!0),a("span",Os,n(d.value.title),1)],8,$s)])]),default:be(()=>[a("header",Ns,[a("div",As,[a("p",qs,[_(g,{name:"topics",tone:"accent",size:"sm"}),a("span",null,n(d.value.eyebrow),1)]),a("h1",null,n(d.value.title),1),a("p",null,n(d.value.subtitle),1)]),a("div",Ds,[a("button",{type:"button",class:"topics-button topics-button--primary topics-button--rerun","data-testid":"topics-rerun-button",onClick:Kt},[_(g,{name:"refresh",size:"sm"}),a("span",null,n(d.value.rerunSearch),1)]),a("button",{type:"button",class:"topics-button topics-button--secondary topics-button--new-prompt","data-testid":"topics-new-prompt-button",onClick:Ht},[_(g,{name:"plus",size:"sm"}
1),a("span",null,n(d.value.newPrompt),1)])])])]),_:1})),kt.value?(c(),Se(Ts,{key:1})):y("",!0),a("section",Ms,[a("div",Ws,[a("p",Fs,n(d.value.toolbarEyebrow),1),a("h2",null,n(d.value.toolbarTitle),1),a("p",null,n(d.value.toolbarSubtitle),1)]),a("div",Us,[a("label",{class:"topics-control","aria-label":d.value.searchTopics},[a("span",Vs,n(d.value.searchTopics),1),a("span",Ks,[a("span",Hs,[_(g,{name:"search",tone:"muted",size:"sm"})]),ps(a("input",{"onUpdate:modelValue":s[0]||(s[0]=t=>Ae.value=t),type:"search",placeholder:d.value.searchPlaceholder,"data-testid":"topics-search-input"},null,8,Qs),[[ms,Ae.value]])])],8,js),a("div",Gs,[a("span",Ys,n(d.value.competitor),1),a("div",{class:"topics-select-menu","data-testid":"topics-competitor-select",onKeydown:s[2]||(s[2]=vs(_s(t=>V.value=!1,["stop"]),["escape"]))},[a("button",{type:"button",class:B(["topics-select-field",{"is-disabled":!K.value.length}]),"data-testid":"topics-competitor-trigger","aria-haspopup":"listbox","aria-expanded":V.value,"aria-labelledby":"topics-competitor-label",disabled:!K.value.length,onClick:s[1]||(s[1]=t=>V.value=!V.value)},[a("span",Js,[_(g,{name:"filter",tone:"accent",size:"sm"})]),a("span",Xs,[a("span",null,n(((o=Fe.value)==null?void 0:o.brand)??d.value.noSourceBackedCompetitors),1),(i=Fe.value)!=null&&i.hasTopicCount?(c(),u("small",ea,n(et(Fe.value)),1)):y("",!0)]),a("span",ta,[_(g,{name:"chevron",tone:"muted",size:"sm",class:B({"is-flipped":V.value})},null,8,["class"])])],10,Zs),V.value?(c(),u("div",sa,[(c(!0),u(I,null,$(K.value,t=>(c(),u("button",{key:t.brand,type:"button",class:B(["topics-select-menu__option",{"is-selected":t.brand===x.value,"is-disabled":ue(t)}]),role:"option","aria-selected":t.brand===x.value,disabled:ue(t),"data-testid":"topics-competitor-option",onClick:r=>Rt(t)},[a("span",null,n(t.brand),1),t.hasTopicCount?(c(),u("small",oa,n(et(t)),1)):y("",!0)],10,aa))),128))])):y("",!0)],32)])])]),O.value&&!v.value?(c(),u("section",na,[_(St,{"test-id":"topics-loading-state","progress-test-id":"topics-loading-progress",title:d.value.loading,subtitle:d.value.loadingDescription,"status-label":d.value.loadingProgressMeta,language:Q(C).locale,"progress-mode":"real","progress-visual":"bar","progress-value":Tt.value,"progress-aria-label":d.value.loadingProgressAria},null,8,["title","subtitle","status-label","language","progress-value","progress-aria-label"])])):M.value?(c(),u("section",ia,[a("strong",null,n(d.value.unavailable),1),a("p",null,n(M.value),1)])):v.value?(c(),u("section",ra,[a("article",{class:"topics-brand-panel topics-surface","data-testid":"topics-primary-panel",style:ht(lt(zt.value))},[a("header",la,[a("div",ca,[a("p",da,n(d.value.searchedBrand),1),a("h2",ua,[s[7]||(s[7]=a("span",{class:"topics-brand-panel__dot"},null,-1)),a("span",null,n(v.value.primary.brand),1)])]),a("strong",pa,n(d.value.topicCount(Le(v.value.primary))),1)]),a("section",ma,[a("div",va,[a("div",_a,[a("span",ha,[_(g,{name:"check",size:"sm"})]),a("h3",null,n(d.value.positiveTopics),1)]),a("span",fa,n(pe.value.length),1)]),a("div",ga,[pe.value.length?(c(),u("div",{key:0,class:B(["topics-sentiment__viewport",{"is-scrollable":R("primary-positive")}])},[a("div",ba,[(c(!0),u(I,null,$(Ee("primary-positive",pe.value),t=>(c(),u("button",{key:t.id,type:"button",class:"topics-card topics-card--positive","data-testid":"topics-card",onClick:r=>Oe(v.value.primary.brand,"positive",t)},[a("div",Ca,[a("div",Sa,[a("strong",wa,n(ee(t.topicName)),1),a("span",Ta,n(t.supportingSnippetCount)+" "+n(d.value.snippetsShort)+" / "+n(t.sources.length)+" "+n(d.value.sourcesShort),1)]),a("span",{class:B(["topics-score",`topics-score--${Re(t.score)}`])},n(t.score),3)]),a("div",ka,[a("div",Pa,[(c(!0),u(I,null,$(t.llms,r=>(c(),u("span",{key:`${t.id}-${r}`,class:"topics-provider-icon",title:r},[_(g,{name:Q(ye)(r),size:"sm"},null,8,["name"])],8,Ba))),128))]),Z(t)?(c(),u("span",xa,n(Z(t)),1)):y("",!0)])],8,ya))),128))])],2)):(c(),u("div",Ia,[a("span",La,[_(g,{name:"check",tone:"muted",size:"sm"})]),a("p",null,n(d.value.noPositiveTopics),1)]))]),a("div",Ra,[$e(pe.value)?(c(),u("button",{key:0,type:"button",class:"topics-sentiment__toggle","data-testid":"topics-primary-positive-see-all",onClick:s[3]||(s[3]=t=>ze("primary-positive"))},[a("span",null,n(R("primary-positive")?d.value.seeLess:d.value.seeAll(pe.value.length)),1),_(g,{name:"chevron",tone:"muted",size:"sm",class:B({"is-flipped":R("primary-positive")})},null,8,["class"])])):y("",!0)])]),a("section",za,[a("div",Ea,[a("div",$a,[a("span",Oa,[_(g,{name:"close",size:"sm"})]),a("h3",null,n(d.value.negativeTopics),1)]),a("span",Na,n(me.value.length),1)]),a("div",Aa,[me.value.length?(c(),u("div",{key:0,class:B(["topics-sentiment__viewport",{"is-scrollable":R("primary-negative")}])},[a("div",qa,[(c(!0),u(I,null,$(Ee("primary-negative",me.value),t=>(c(),u("button",{key:t.id,type:"button",class:"topics-card topics-card--negative","data-testid":"topics-card",onClick:r=>Oe(v.value.primary.brand,"negative",t)},[a("div",Ma,[a("div",Wa,[a("strong",Fa,n(ee(t.topicName)),1),a("span",Ua,n(t.supportingSnippetCount)+" "+n(d.value.snippetsShort)+" / "+n(t.sources.length)+" "+n(d.value.sourcesSh
1ort),1)]),a("span",{class:B(["topics-score",`topics-score--${Re(t.score)}`])},n(t.score),3)]),a("div",ja,[a("div",Va,[(c(!0),u(I,null,$(t.llms,r=>(c(),u("span",{key:`${t.id}-${r}`,class:"topics-provider-icon",title:r},[_(g,{name:Q(ye)(r),size:"sm"},null,8,["name"])],8,Ka))),128))]),Z(t)?(c(),u("span",Ha,n(Z(t)),1)):y("",!0)])],8,Da))),128))])],2)):(c(),u("div",Qa,[a("span",Ga,[_(g,{name:"close",tone:"muted",size:"sm"})]),a("p",null,n(d.value.noNegativeTopics),1)]))]),a("div",Ya,[$e(me.value)?(c(),u("button",{key:0,type:"button",class:"topics-sentiment__toggle","data-testid":"topics-primary-negative-see-all",onClick:s[4]||(s[4]=t=>ze("primary-negative"))},[a("span",null,n(R("primary-negative")?d.value.seeLess:d.value.seeAll(me.value.length)),1),_(g,{name:"chevron",tone:"muted",size:"sm",class:B({"is-flipped":R("primary-negative")})},null,8,["class"])])):y("",!0)])])],4),(l=Y.value)!=null&&l.brand?(c(),u("article",{key:0,class:"topics-brand-panel topics-surface","data-testid":"topics-comparison-panel",style:ht(lt(Et.value))},[a("header",Za,[a("div",Ja,[a("p",Xa,n(d.value.comparisonBrand),1),a("h2",eo,[s[8]||(s[8]=a("span",{class:"topics-brand-panel__dot"},null,-1)),a("span",null,n(Y.value.brand),1)])]),a("strong",to,n(d.value.topicCount(Le(Y.value))),1)]),a("section",so,[a("div",ao,[a("div",oo,[a("span",no,[_(g,{name:"check",size:"sm"})]),a("h3",null,n(d.value.positiveTopics),1)]),a("span",io,n(ve.value.length),1)]),a("div",ro,[ve.value.length?(c(),u("div",{key:0,class:B(["topics-sentiment__viewport",{"is-scrollable":R("comparison-positive")}])},[a("div",lo,[(c(!0),u(I,null,$(Ee("comparison-positive",ve.value),t=>(c(),u("button",{key:t.id,type:"button",class:"topics-card topics-card--positive","data-testid":"topics-card",onClick:r=>Oe(Y.value.brand,"positive",t)},[a("div",uo,[a("div",po,[a("strong",mo,n(ee(t.topicName)),1),a("span",vo,n(t.supportingSnippetCount)+" "+n(d.value.snippetsShort)+" / "+n(t.sources.length)+" "+n(d.value.sourcesShort),1)]),a("span",{class:B(["topics-score",`topics-score--${Re(t.score)}`])},n(t.score),3)]),a("div",_o,[a("div",ho,[(c(!0),u(I,null,$(t.llms,r=>(c(),u("span",{key:`${t.id}-${r}`,class:"topics-provider-icon",title:r},[_(g,{name:Q(ye)(r),size:"sm"},null,8,["name"])],8,fo))),128))]),Z(t)?(c(),u("span",go,n(Z(t)),1)):y("",!0)])],8,co))),128))])],2)):(c(),u("div",bo,[a("span",yo,[_(g,{name:"check",tone:"muted",size:"sm"})]),a("p",null,n(d.value.noPositiveTopics),1)]))]),a("div",Co,[$e(ve.value)?(c(),u("button",{key:0,type:"button",class:"topics-sentiment__toggle","data-testid":"topics-comparison-positive-see-all",onClick:s[5]||(s[5]=t=>ze("comparison-positive"))},[a("span",null,n(R("comparison-positive")?d.value.seeLess:d.value.seeAll(ve.value.length)),1),_(g,{name:"chevron",tone:"muted",size:"sm",class:B({"is-flipped":R("comparison-positive")})},null,8,["class"])])):y("",!0)])]),a("section",So,[a("div",wo,[a("div",To,[a("span",ko,[_(g,{name:"close",size:"sm"})]),a("h3",null,n(d.value.negativeTopics),1)]),a("span",Po,n(_e.value.length),1)]),a("div",Bo,[_e.value.length?(c(),u("div",{key:0,class:B(["topics-sentiment__viewport",{"is-scrollable":R("comparison-negative")}])},[a("div",xo,[(c(!0),u(I,null,$(Ee("comparison-negative",_e.value),t=>(c(),u("button",{key:t.id,type:"button",class:"topics-card topics-card--negative","data-testid":"topics-card",onClick:r=>Oe(Y.value.brand,"negative",t)},[a("div",Lo,[a("div",Ro,[a("strong",zo,n(ee(t.topicName)),1),a("span",Eo,n(t.supportingSnippetCount)+" "+n(d.value.snippetsShort)+" / "+n(t.sources.length)+" "+n(d.value.sourcesShort),1)]),a("span",{class:B(["topics-score",`topics-score--${Re(t.score)}`])},n(t.score),3)]),a("div",$o,[a("div",Oo,[(c(!0),u(I,null,$(t.llms,r=>(c(),u("span",{key:`${t.id}-${r}`,class:"topics-provider-icon",title:r},[_(g,{name:Q(ye)(r),size:"sm"},null,8,["name"])],8,No))),128))]),Z(t)?(c(),u("span",Ao,n(Z(t)),1)):y("",!0)])],8,Io))),128))])],2)):(c(),u("div",qo,[a("span",Do,[_(g,{name:"close",tone:"muted",size:"sm"})]),a("p",null,n(d.value.noNegativeTopics),1)]))]),a("div",Mo,[$e(_e.value)?(c(),u("button",{key:0,type:"button",class:"topics-sentiment__toggle","data-testid":"topics-comparison-negative-see-all",onClick:s[6]||(s[6]=t=>ze("comparison-negative"))},[a("span",null,n(R("comparison-negative")?d.value.seeLess:d.value.seeAll(_e.value.length)),1),_(g,{name:"chevron",tone:"muted",size:"sm",class:B({"is-flipped":R("comparison-negative")})},null,8,["class"])])):y("",!0)])])],4)):(c(),u("article",Wo,[a("div",Fo,[a("span",Uo,[_(g,{name:"search",tone:"muted",size:"sm"})]),x.value?(c(),u(I,{key:0},[a("strong",null,n(x.value),1),a("p",jo,n(d.value.noSavedComparison),1)],64)):(c(),u("strong",Vo,n(d.value.noSourceBackedCompetitors),1))])]))])):y("",!0),_(ks,{"model-value":qe.value,title:T.value?ee(T.value.card.topicName):d.value.topicDetail
1s,eyebrow:d.value.eyebrow,subtitle:T.value?`${T.value.brand} / ${T.value.tone==="positive"?d.value.positiveTopics:d.value.negativeTopics}`:"",width:"720px","surface-class":"topics-dialog-surface","onUpdate:modelValue":Jt},{default:be(()=>[T.value?(c(),u("div",Ko,[a("div",Ho,[a("span",Qo,n(T.value.brand),1),a("span",Go,n(T.value.card.score)+" "+n(d.value.score),1),a("span",Yo,n(T.value.card.supportingSnippetCount)+" "+n(d.value.snippetsShort),1),(c(!0),u(I,null,$(T.value.card.llms,t=>(c(),u("span",{key:`${T.value.card.id}-${t}-dialog`,class:"pill pill--soft"},n(t),1))),128))]),a("section",Zo,[a("div",Jo,[a("h2",null,n(ee(T.value.card.topicName)),1),a("p",null,n(es(T.value.card)),1)])]),a("div",Xo,[(c(!0),u(I,null,$(T.value.card.evidence,t=>(c(),u("article",{key:t.id,class:"topics-evidence-card"},[a("div",en,[a("div",null,[a("strong",null,n(t.source.articleTitle),1),a("p",null,n(t.source.sourceDomain||t.source.sourceName),1)]),a("div",tn,[t.source.publishedAt?(c(),u("span",sn,n(ts(t.source.publishedAt)),1)):y("",!0),t.source.canonicalUrl?(c(),u("a",{key:1,class:"topics-evidence-card__link",href:t.source.canonicalUrl,target:"_blank",rel:"noreferrer"},n(d.value.openSource),9,an)):y("",!0)])]),a("p",on,[(c(!0),u(I,null,$(ss(t.snippet,t.highlightRanges),(r,m)=>(c(),u(I,{key:`${t.id}-${m}`},[r.highlighted?(c(),u("mark",nn,n(r.text),1)):(c(),u("span",rn,n(r.text),1))],64))),128))]),a("div",ln,[a("div",cn,[(c(!0),u(I,null,$(t.llms,r=>(c(),u("span",{key:`${t.id}-${r}`,class:"topics-provider-icon",title:r},[_(g,{name:Q(ye)(r),size:"sm"},null,8,["name"])],8,dn))),128))]),t.contextBefore||t.contextAfter?(c(),u("button",{key:0,type:"button",class:"topics-dialog-button",onClick:r=>Xt(t.id)},n(oe.value.has(t.id)?d.value.hideContext:d.value.showContext),9,un)):y("",!0)]),oe.value.has(t.id)?(c(),u("div",pn,[t.contextBefore?(c(),u("p",mn,n(t.contextBefore),1)):y("",!0),a("p",null,n(t.snippet),1),t.contextAfter?(c(),u("p",vn,n(t.contextAfter),1)):y("",!0)])):y("",!0)]))),128))])])):y("",!0)]),_:1},8,["model-value","title","eyebrow","subtitle"]),_(zs,{visible:$t.value,title:Ot.value,description:Nt.value,language:Q(C).locale}
1,null,8,["visible","title","description","language"])],2)}}}),kn=wt(_n,[["__scopeId","data-v-bbec80f3"]]);export{kn 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.