1import{e as c,j as v,l as T,r as n,c as u,a5 as g,a4 as w,au as q,b as p}from"./index-DUWew8AW.js";import{R as C}from"./ReportingResource-DVqEy9lw.js";import{_ as I}from"./TikTokDetailsDialog-D9S8nAb1.js";import"./TiktokInsightsReport-DbzAhm-O.js";import"./InsightsReportResource-DM2aCLVa.js";import"./ReportState-D-eTEtEn.js";import"./useReporting-C_ILI5m4.js";import"./PdfCover-C-sFq0YP.js";import"./PartnerResource-CkZM66x5.js";import"./InsightSection-DABUc2ZI.js";import"./StatusColumn-BizYQfqE.js";import"./useChart-D3rrKuZG.js";import"./Chart-BU8UWJuK.js";import"./chart-helper-DXfqRIXi.js";import"./pie-chart-_WYglV61.js";import"./InsightBox-Bm_IHTbs.js";import"./VRating-BWqBPr2Z.js";const x={key:0},A={key:1,class:"flex items-center justify-center h-screen"},U={__name:"TikTokPDF",setup(N){const o=w(),y=g(),s=n(!1),t=n(null),h=n(""),_=n([93]),R=u(()=>Number(o.query.clientId)),m=u(()=>o.query.startDate),f=u(()=>o.query.endDate);async function D(){s.value=!0;try{const a=await q.getManyClients({clientsArray:[R.value],scope:"active"},{withProfiles:!0,withGroup:!0}).then(e=>e.data),r=Array.isArray(a)?a[0]:a;if(!r){t.value={};return}h.value=r.name;const d=r.profiles.filter(e=>_.value.includes(e.profileTypeId));if(d.length===0){t.value={};return}const i={};d.forEach(e=>{i[e.ProfileType.name]||(i[e.ProfileType.name]=[]),i[e.ProfileType.name].push(e.identifier)});const k=[{id:`client-${r.id}`,clientId:r.id,profiles:i}
1],l=await C.getGroupTikTokReport({startDate:m.value,endDate:f.value,profiles:k,noCache:!1}).then(e=>e.data);if(l&&l.length>0){const[e]=l;t.value={...e,report:e.data}}else t.value={}}catch{t.value={}}finally{s.value=!1}}async function P(){await y.replace({query:{...o.query,pdf:!0}}),await D()}return P(),(a,r)=>(p(),c("section",null,[!s.value&&t.value?(p(),c("div",x,[v(I,{client:t.value,"start-date":m.value,"end-date":f.value},null,8,["client","start-date","end-date"])])):(p(),c("div",A,[v(T,{indeterminate:"",size:"64",color:"primary"})]))]))}};export{U 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.