1import{n as g,k as R,r as c,c as l,E as C,d as y}from"./index-C3PRlZvS.js";import{R as Y}from"./ReportingResource-DwBr5aNb.js";import{P as x}from"./PdfCover-kaqprAdv.js";import{P as S}from"./PaidSearchDialog-CZxnh1Sd.js";import"./PartnerResource-Da6bJ3Yo.js";import"./StatusColumn-c7LEMLu9.js";import"./MetricBox-CWq-sier.js";import"./useChart-DIIHRzqt.js";import"./Chart-BT5-f4qM.js";import"./ConversionSegmentsTooltip-0J30v2mS.js";import"./Metric-BMEB_vI5.js";const w={__name:"PaidSearchPDF",setup(D){const t=R(),r=c(!1),e=c(null),f=c(""),p=c([7,70]),d=l(()=>Number(t.query.clientId)),o=l(()=>t.query.startDate),i=l(()=>t.query.endDate),h=l(()=>{if(o.value&&i.value){const s=y(o.value).format("MM/DD/YYYY"),n=y(i.value).format("MM/DD/YYYY");return`${s} - ${n}`}return""});async function m(){r.value=!0;try{const s=await C.getManyClients({clientsArray:[d.value],scope:"active"},{withProfiles:!0,withGroup:!0}).then(a=>a.data),n=Array.isArray(s)?s[0]:s;if(!n){e.value={};return}f.value=n.name;const _=n.profiles.filter(a=>p.value.includes(a.profileTypeId));if(_.length===0){e.value={};return}const P=[{id:`client-${n.id}`,clientId:n.id,profiles:_.map(a=>a.identifier)}],u=await Y.getGroupGoogleAdsReport({startDate:o.value,endDate:i.value,profiles:P,noCache:!1}).then(a=>a.data);if(u&&u.length>0){const[a]=u;e.value=a}else e.value={}}catch{e.value={}}finally{r.value=!1}}async function v(){await m()}return v(),{__sfc:!0,route:t,loading:r,reportData:e,clientName:f,validProfiles:p,clientId:d,startDate:o,endDate:i,formattedDateRange:h,fetchReportData:m,init:v,PdfCover:x,PaidSearchDialog:S}}};var M=function(){var t=this,r=t._self._c,e=t._self._setupProxy;return r("section",[!e.loading&&e.reportData?r("div",[r("div",{staticClass:"text-center"},[r(e.PdfCover,{attrs:{title:"Paid Search Performance Report"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v(t._s(e.clientName))]},proxy:!0},{key:"subheader",fn:function(){return[t._v(t._s(e.formattedDateRange))]},proxy:!0}],null,!1,905852654)})],1),r(e.PaidSearchDialog,{attrs:{"selected-account":e.reportData,"is-pdf":!0}})],1):r("div",{staticClass:"flex items-center justify-center h-screen"},[r("v-progress-circular",{attrs:{indeterminate:"",size:"64",color:"primary"}})],1)])},A=[],I=g(w,M,A,!1,null,null);const B=I.exports;export{B 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.