1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jspdf.es.min-DuEs_oGr.js","assets/index-BTKcJhd6.js"])))=>i.map(i=>d[i]); 2import{r as o,aG as Oe,w as Te,aw as ze,x as Ke,a_ as Be,u as $e,t as G,j as e,L as ae,f as re,a as We,U as Ve,i as ne,M as Ge,aH as se,C as Fe,_ as ie}from"./index-BTKcJhd6.js";import{C as Me}from"./CzechMap-B1AjuyrC.js";import{B as oe}from"./badge-ZcDDQ5ll.js";import{A as le}from"./arrow-left-BY_ct31A.js";import{D as Ze}from"./download-CLVtPmCT.js";import{C as Ue}from"./calendar-CAsbmYHX.js";import{L as de}from"./link-2-DsT_t6P_.js";import{E as He}from"./eye-Dn6D3CTj.js";import{M as qe,P as Je}from"./percent-CE3K6hQR.js";import{C as Xe}from"./chart-column-CPCnR5Io.js";import{o as J,p as ve,q as Ye,t as ye,v as be,w as Qe,x as et,y as ce,z as tt,r as je,D as at,c as ke,A as rt,S as nt,B as st,E as Pe,F as it,G as ot,H as lt,I as dt,J as ct,e as pt,K as ut,Z as mt,L as ht,M as xt,N as Se,O as pe,P as ue,Q as ft,U as gt,V as T,W as vt,_ as yt,i as bt,$ as jt,a0 as kt,a1 as Pt,R as $,n as F,X as M,Y as Z,T as W}from"./CartesianChart-DBLN_clj.js";import{g as St,A as Nt,D as wt,a as At,b as me}from"./AreaChart-BY9_scR8.js";import{L as U,P as It,a as Ct}from"./PieChart-CIZby0bP.js";import{S as Et,b as Dt,B as Lt,a as he,C as _t}from"./BarChart-CIf6m3Jo.js";var Ne=(t,a,n,r)=>ye(t,"xAxis",a,r),we=(t,a,n,r)=>be(t,"xAxis",a,r),Ae=(t,a,n,r)=>ye(t,"yAxis",n,r),Ie=(t,a,n,r)=>be(t,"yAxis",n,r),Rt=J([ve,Ne,Ae,we,Ie],(t,a,n,r,s)=>et(t,"xAxis")?ce(a,r,!1):ce(n,s,!1)),Ot=(t,a,n,r,s)=>s;function Tt(t){return t.type==="line"}var zt=J([Qe,Ot],(t,a)=>t.filter(Tt).find(n=>n.id===a)),Kt=J([ve,Ne,Ae,we,Ie,zt,Rt,Ye],(t,a,n,r,s,l,d,c)=>{var{chartData:p,dataStartIndex:u,dataEndIndex:x}=c;if(!(l==null||a==null||n==null||r==null||s==null||r.length===0||s.length===0||d==null||t!=="horizontal"&&t!=="vertical")){var{dataKey:h,data:f}=l,m;if(f!=null&&f.length>0?m=f:m=p?.slice(u,x+1),m!=null)return na({layout:t,xAxis:a,yAxis:n,xAxisTicks:r,yAxisTicks:s,dataKey:h,bandSize:d,displayedData:m})}}),Bt=["id"],$t=["type","layout","connectNulls","needClip","shape"],Wt=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function B(){return B=Object.assign?Object.assign.bind():function(t){for(var a=1;a<arguments.length;a++){var n=arguments[a];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},B.apply(null,arguments)}function xe(t,a){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);a&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function N(t){for(var a=1;a<arguments.length;a++){var n=arguments[a]!=null?arguments[a]:{};a%2?xe(Object(n),!0).forEach(function(r){Vt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Vt(t,a,n){return(a=Gt(a))in t?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,t}function Gt(t){var a=Ft(t,"string");return typeof a=="symbol"?a:a+""}
2function Ft(t,a){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,a);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(t)}function X(t,a){if(t==null)return{};var n,r,s=Mt(t,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)n=l[r],a.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function Mt(t,a){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(a.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var Zt=t=>{var{dataKey:a,name:n,stroke:r,legendType:s,hide:l}=t;return[{inactive:l,dataKey:a,type:s,color:r,value:Pe(n,a),payload:t}]},Ut=o.memo(t=>{var{dataKey:a,data:n,stroke:r,strokeWidth:s,fill:l,name:d,hide:c,unit:p,tooltipType:u,id:x}=t,h={dataDefinedOnItem:n,getPosition:ot,settings:{stroke:r,strokeWidth:s,fill:l,dataKey:a,nameKey:void 0,name:Pe(d,a),hide:c,type:u,color:r,unit:p,graphicalItemId:x}};return o.createElement(it,{tooltipEntrySettings:h})}),Ce=(t,a)=>"".concat(a,"px ").concat(t,"px");function Ht(t,a){for(var n=t.length%2!==0?[...t,0]:t,r=[],s=0;s<a;++s)r.push(...n);return r}var qt=(t,a,n)=>{var r=n.reduce((f,m)=>f+m,0);if(!r)return Ce(a,t);for(var s=Math.floor(t/r),l=t%r,d=[],c=0,p=0;c<n.length;p+=(u=n[c])!==null&&u!==void 0?u:0,++c){var u,x=n[c];if(x!=null&&p+x>l){d=[...n.slice(0,c),l-p];break}}var h=d.length%2===0?[0,a]:[a];return[...Ht(n,s),...d,...h].map(f=>"".concat(f,"px")).join(", ")};function Jt(t){var{clipPathId:a,points:n,props:r}=t,{dot:s,dataKey:l,needClip:d}=r,{id:c}=r,p=X(r,Bt),u=jt(p);return o.createElement(wt,{points:n,dot:s,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:u,needClip:d,clipPathId:a})}function Xt(t){var{showLabels:a,children:n,points:r}
2=t,s=o.useMemo(()=>r?.map(l=>{var d,c,p={x:(d=l.x)!==null&&d!==void 0?d:0,y:(c=l.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return N(N({},p),{},{value:l.value,payload:l.payload,viewBox:p,parentViewBox:void 0,fill:void 0})}),[r]);return o.createElement(yt,{value:a?s:void 0},n)}function fe(t){var{clipPathId:a,pathRef:n,points:r,strokeDasharray:s,props:l}=t,{type:d,layout:c,connectNulls:p,needClip:u,shape:x}=l,h=X(l,$t),f=N(N({},bt(h)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(a,")"):void 0,points:r,type:d,layout:c,connectNulls:p,strokeDasharray:s??l.strokeDasharray});return o.createElement(o.Fragment,null,r?.length>1&&o.createElement(Dt,B({shapeType:"curve",option:x},f,{pathRef:n})),o.createElement(Jt,{points:r,clipPathId:a,props:l}))}function Yt(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function Qt(t){var{clipPathId:a,props:n,pathRef:r,previousPointsRef:s,longestAnimatedLengthRef:l}=t,{points:d,strokeDasharray:c,isAnimationActive:p,animationBegin:u,animationDuration:x,animationEasing:h,animateNewValues:f,width:m,height:b,onAnimationEnd:i,onAnimationStart:v}=n,g=s.current,y=ft(d,"recharts-line-"),j=o.useRef(y),[w,A]=o.useState(!1),C=!w,_=o.useCallback(()=>{typeof i=="function"&&i(),A(!1)},[i]),E=o.useCallback(()=>{typeof v=="function"&&v(),A(!0)},[v]),P=Yt(r.current),R=o.useRef(0);j.current!==y&&(R.current=l.current,j.current=y);var Y=R.current;return o.createElement(Xt,{points:d,showLabels:C},n.children,o.createElement(gt,{animationId:y,begin:u,duration:x,isActive:p,easing:h,onAnimationEnd:_,onAnimationStart:E,key:y},D=>{var De=T(Y,P+Y,D),V=Math.min(De,P),O;if(p)if(c){var Le="".concat(c).split(/[,\s]+/gim).map(S=>parseFloat(S));O=qt(V,P,Le)}else O=Ce(P,V);else O=c==null?void 0:String(c);if(D>0&&P>0&&(s.current=d,l.current=Math.max(l.current,V)),g){var _e=g.length/d.length,Q=D===1?d:d.map((S,Re)=>{var ee=Math.floor(Re*_e);if(g[ee]){var te=g[ee];return N(N({},S),{},{x:T(te.x,S.x,D),y:T(te.y,S.y,D)})}return f?N(N({},S),{},{x:T(m*2,S.x,D),y:T(b/2,S.y,D)}):N(N({},S),{},{x:S.x,y:S.y})});return s.current=Q,o.createElement(fe,{props:n,points:Q,clipPathId:a,pathRef:r,strokeDasharray:O})}return o.createElement(fe,{props:n,points:d,clipPathId:a,pathRef:r,strokeDasharray:O})}),o.createElement(vt,{label:n.label}))}function ea(t){var{clipPathId:a,props:n}=t,r=o.useRef(null),s=o.useRef(0),l=o.useRef(null);return o.createElement(Qt,{props:n,clipPathId:a,previousPointsRef:r,longestAnimatedLengthRef:s,pathRef:l})}var ta=(t,a)=>{var n,r;return{x:(n=t.x)!==null&&n!==void 0?n:void 0,y:(r=t.y)!==null&&r!==void 0?r:void 0,value:t.value,errorVal:Se(t.payload,a)}};class aa extends o.Component{render(){var{hide:a,dot:n,points:r,className:s,xAxisId:l,yAxisId:d,top:c,left:p,width:u,height:x,id:h,needClip:f,zIndex:m}=this.props;if(a)return null;var b=Oe("recharts-line",s),i=h,{r:v,strokeWidth:g}=St(n),y=ut(n),j=v*2+g,w=f?"url(#clipPath-".concat(y?"":"dots-").concat(i,")"):void 0;return o.createElement(mt,{zIndex:m},o.createElement(ht,{className:b},f&&o.createElement("defs",null,o.createElement(xt,{clipPathId:i,xAxisId:l,yAxisId:d}),!y&&o.createElement("clipPath",{id:"clipPath-dots-".concat(i)},o.createElement("rect",{x:p-j/2,y:c-j/2,width:u+j,height:x+j}))),o.createElement(Et,{xAxisId:l,yAxisId:d,data:r,dataPointFormatter:ta,errorBarOffset:0},o.createElement(ea,{props:this.props,clipPathId:i}))),o.createElement(Nt,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:w}))}}var Ee={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:at.line,type:"linear"};function ra(t){var a=je(t,Ee),{activeDot:n,animateNewValues:r,animationBegin:s,animationDuration:l,animationEasing:d,connectNulls:c,dot:p,hide:u,isAnimationActive:x,label:h,legendType:f,xAxisId:m,yAxisId:b,id:i}=a,v=X(a,Wt),{needClip:g}=lt(m,b),y=dt(),j=ct(),w=ke(),A=pt(R=>Kt(R,m,b,w,i));if(j!=="horizontal"&&j!=="vertical"||A==null||y==null)return null;var{height:C,width:_,x:E,y:P}=y;return o.createElement(aa,B({},v,{id:i,connectNulls:c,dot:p,activeDot:n,animateNewValues:r,animationBegin:s,animationDuration:l,animationEasing:d,isAnimationActive:x,hide:u,label:h,legendT
2ype:f,xAxisId:m,yAxisId:b,points:A,layout:j,height:C,width:_,left:E,top:P,needClip:g}))}function na(t){var{layout:a,xAxis:n,yAxis:r,xAxisTicks:s,yAxisTicks:l,dataKey:d,bandSize:c,displayedData:p}=t;return p.map((u,x)=>{var h=Se(u,d);if(a==="horizontal"){var f=pe({axis:n,ticks:s,bandSize:c,entry:u,index:x}),m=ue(h)?null:r.scale.map(h);return{x:f,y:m??null,value:h,payload:u}}var b=ue(h)?null:n.scale.map(h),i=pe({axis:r,ticks:l,bandSize:c,entry:u,index:x});return b==null||i==null?null:{x:b,y:i,value:h,payload:u}}).filter(Boolean)}function sa(t){var a=je(t,Ee),n=ke();return o.createElement(rt,{id:a.id,type:"line"},r=>o.createElement(o.Fragment,null,o.createElement(nt,{legendPayload:Zt(a)}),o.createElement(Ut,{dataKey:a.dataKey,data:a.data,stroke:a.stroke,strokeWidth:a.strokeWidth,fill:a.fill,name:a.name,hide:a.hide,unit:a.unit,tooltipType:a.tooltipType,id:r}),o.createElement(st,{type:"line",id:r,data:a.data,xAxisId:a.xAxisId,yAxisId:a.yAxisId,zAxisId:0,dataKey:a.dataKey,hide:a.hide,isPanorama:n}),o.createElement(ra,B({},a,{id:r}))))}var q=o.memo(sa,tt);q.displayName="Line";var ia=["axis"],oa=o.forwardRef((t,a)=>o.createElement(kt,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ia,tooltipPayloadSearcher:Pt,categoricalChartProps:t,ref:a}));const la=Te({method:"GET"}).middleware([ze]).handler(Ke("1772e2fdf792171257ab7d29286d724378a8401194b9da9132cf804fae3d48e4")),ge={home_top:"Homepage â nahoÅe",home_mid:"Homepage â uprostÅed",home_bottom:"Homepage â dole",article_top:"Detail Älánku â nahoÅe",article_inline:"Detail Älánku â v textu",sidebar:"Sidebar",skin:"Skin (pÅes celou stránku)"},k=["hsl(210 90% 56%)","hsl(160 70% 45%)","hsl(38 92% 55%)","hsl(340 80% 58%)","hsl(265 70% 60%)","hsl(15 85% 55%)"];function I(t){return t.toLocaleString("cs-CZ")}function H(t){return t?new Date(t).toLocaleDateString("cs-CZ"):"â"}function Pa(){const{id:t}=Be.useParams(),a=$e(la),[n,r]=o.useState(30),[s,l]=o.useState(null),[d,c]=o.useState(!0),[p,u]=o.useState(!1),x=o.useRef(null);o.useEffect(()=>{let i=!0;return c(!0),a({data:{bannerId:t,days:n}}).then(v=>{i&&l(v)}).catch(v=>{G.error(v instanceof Error?v.message:"Chyba naÄÃtánÃ")}).finally(()=>i&&c(!1)),()=>{i=!1}},[t,n,a]);const h=async()=>{if(!(!x.current||!s)){u(!0);try{const[{default:i},{default:v}]=await Promise.all([ie(()=>import("./html2canvas-pro.esm-9xys3ejh.js"),[]),ie(()=>import("./jspdf.es.min-DuEs_oGr.js").then(R=>R.j),__vite__mapDeps([0,1]))]),g=await i(x.current,{scale:2,backgroundColor:getComputedStyle(document.body).backgroundColor||"#fff",useCORS:!0}),y=new v({orientation:"p",unit:"mm",format:"a4"}),j=y.internal.pageSize.getWidth(),w=y.internal.pageSize.getHeight(),A=j,C=g.height*A/g.width,_=g.toDataURL("image/jpeg",.92);let E=C,P=0;for(y.addImage(_,"JPEG",0,P,A,C),E-=w;E>0;)P-=w,y.addPage(),y.addImage(_,"JPEG",0,P,A,C),E-=w;y.save(`kampan-${s.banner.name.replace(/[^\w-]+/g,"_")}-${new Date().toISOString().slice(0,10)}.pdf`),G.success("PDF staženo")}catch(i){G.error(i instanceof Error?i.message:"Export selhal")}finally{u(!1)}}},f=()=>{if(!s)return;const i=`Reporting kampanÄ: ${s.banner.name}`,v=[`Reporting kampanÄ banneru "${s.banner.name}"`,`ObdobÃ: poslednÃch ${s.range.days} dnÃ`,`UmÃstÄnÃ: ${ge[s.banner.placement]??s.banner.placement}`,"",`Imprese: ${I(s.totals.impressions)}`,`Prokliky: ${I(s.totals.clicks)}`,`CTR: ${s.totals.ctr} %`,`Unikátnà návÅ¡tÄvnÃci: ${I(s.totals.uniqueVisitors)}`,"","Top regiony:",...s.regions.slice(0,5).map(g=>` ⢠${g.region}: ${g.count} prokliků`),"","Top stránky:",...s.topPages.slice(0,5).map(g=>` ⢠${g.page}: ${g.imp} imp / ${g.clk} klik / ${g.ctr} %`),"",`Detailnà pÅehled (web): ${window.location.href}`,"","â TV i-VysoÄina.CZ reporting"].join(` 3`);window.location.href=`mailto:?subject=${encodeURIComponent(i)}&body=${encodeURIComponent(v)}`};if(d)return e.jsxs("div",{children:[e.jsxs(ae,{to:"/admin_phm/bannery",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",children:[e.jsx(le,{className:"h-3.5 w-3.5"})," ZpÄt na bannery"]}),e.jsx("p",{className:"mt-6 text-muted-foreground",children:"NaÄÃtám detail kampanÄâ¦"})]});if(!s)return e.jsx("p",{className:"text-muted-foreground",children:"Data nedostupná."});const m=s.regions.map(i=>({region:i.region,count:i.count})),b=s.cities.map(i=>({lat:i.lat,lon:i.lon,city:i.city,region:i.region,count:i.count}));return e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs(ae,{to:"/admin_phm/bannery",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[e.jsx(le,{className:"h-3.5 w-3.5"})," ZpÄt na bannery"]}),e.jsx("h1",{className:"mt-1 font-display text-3xl font-bold",children:"Detail kampanÄ"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("select",{className:"h-9 rounded-md border border-input bg-transparent px-3 text-sm",value:n,onChange:i=>r(Number(i.target.value)),children:[e.jsx("option",{value:7,children:"PoslednÃch 7 dnÃ"}),e.jsx("option",{value:30,children:"PoslednÃch 30 dnÃ"}),e.jsx("option",{value:90,children:"PoslednÃch 90 dnÃ"}),e.jsx("option",{value:365,children:"PoslednÃch 365 dnÃ"})]}),e.jsxs(re,{variant:"outline",onClick:f,children:[e.jsx(We,{className:"mr-1 h-4 w-4"})," Odeslat e-mailem"]}),e.jsxs(re,{onClick:h,disabled:p,children:[e.jsx(Ze,{className:"mr-1 h-4 w-4"})," ",p?"Generujiâ¦":"Stáhnout PDF"]})]})]}),e.jsxs("div",{ref:x,className:"mt-6 space-y-6 rounded-2xl bg-background p-6",children:[e.jsxs("header",{className:"flex flex-wrap items-start justify-between gap-4 border-b border-border pb-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Reporting kampanÄ"}),e.jsx("h2",{className:"mt-1 font-display text-2xl font-bold",children:s.banner.name}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(oe,{variant:"secondary",children:ge[s.banner.placement]??s.banner.placement}),e.jsx(oe,{variant:s.banner.active?"default":"outline",children:s.banner.active?"AktivnÃ":"NeaktivnÃ"}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(Ue,{className:"h-3 w-3"}),H(s.banner.starts_at)," â ",H(s.banner.ends_at)==="â"?"â":H(s.banner.ends_at)]}),s.banner.link_url&&e.jsxs("a",{href:s.banner.link_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:[e.jsx(de,{className:"h-3 w-3"})," CÃlová URL"]})]})]}),e.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:[e.jsxs("p",{children:["ObdobÃ: poslednÃch ",s.range.days," dnÃ"]}),e.jsxs("p",{children:["Vygenerováno: ",new Date().toLocaleStr
3ing("cs-CZ")]})]})]}),e.jsxs("section",{className:"grid grid-cols-2 gap-3 md:grid-cols-5",children:[e.jsx(z,{icon:He,label:"Imprese",value:I(s.totals.impressions),accent:"hsl(210 90% 56%)"}),e.jsx(z,{icon:qe,label:"Prokliky",value:I(s.totals.clicks),accent:"hsl(160 70% 45%)"}),e.jsx(z,{icon:Je,label:"CTR",value:`${s.totals.ctr} %`,accent:"hsl(38 92% 55%)"}),e.jsx(z,{icon:Ve,label:"Unik. návÅ¡tÄvnÃci",value:I(s.totals.uniqueVisitors),accent:"hsl(265 70% 60%)"}),e.jsx(z,{icon:ne,label:"Varianty A/B",value:String(s.totals.variantsCount),accent:"hsl(340 80% 58%)"})]}),e.jsx(L,{icon:Xe,title:"Vývoj v Äase",subtitle:"Imprese, prokliky a CTR po dnech",children:s.dailySeries.length===0?e.jsx(K,{}):e.jsx($,{width:"100%",height:280,children:e.jsxs(At,{data:s.dailySeries,children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"impG",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:k[0],stopOpacity:.4}),e.jsx("stop",{offset:"100%",stopColor:k[0],stopOpacity:0})]}),e.jsxs("linearGradient",{id:"clkG",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:k[1],stopOpacity:.5}),e.jsx("stop",{offset:"100%",stopColor:k[1],stopOpacity:0})]})]}),e.jsx(F,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),e.jsx(M,{dataKey:"day",stroke:"hsl(var(--muted-foreground))",tick:{fontSize:11}}),e.jsx(Z,{stroke:"hsl(var(--muted-foreground))",tick:{fontSize:11}}),e.jsx(W,{contentStyle:{background:"hsl(var(--background))",border:"1px solid hsl(var(--border))",fontSize:12}}),e.jsx(U,{wrapperStyle:{fontSize:12}}),e.jsx(me,{type:"monotone",dataKey:"imp",name:"Imprese",stroke:k[0],fill:"url(#impG)"}),e.jsx(me,{type:"monotone",dataKey:"clk",name:"Prokliky",stroke:k[1],fill:"url(#clkG)"})]})})}),e.jsx(L,{icon:Ge,title:"Geografie prokliků",subtitle:"Kde lidé kliknuli â kraje ÄR + mÄsta",children:m.length===0&&b.length===0?e.jsx(K,{hint:"ZatÃm nemáme geo data k prokliky. SbÃrá se z relacà návÅ¡tÄvnÃků (ipwho.is)."}):e.jsxs("div",{className:"grid gap-4 lg:grid-cols-[1fr_280px]",children:[e.jsx(Me,{regions:m,points:b}),e.jsxs("div",{children:[e.jsx("h4",{className:"mb-2 text-xs uppercase tracking-wider text-muted-foreground",children:"Top regiony"}),e.jsxs("ul",{className:"space-y-1",children:[m.slice(0,10).map(i=>e.jsxs("li",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"truncate",children:i.region}),e.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:i.count})]},i.region)),m.length===0&&e.jsx("li",{className:"text-xs text-muted-foreground",children:"Žádné regiony."})]})]})]})}),e.jsxs("section",{className:"grid gap-4 lg:grid-cols-2",children:[e.jsxs(L,{icon:ne,title:"Výkon variant",subtitle:"A/B testing",children:[s.variantStats.length===0?e.jsx(K,{}):e.jsx($,{width:"100%",height:240,children:e.jsxs(Lt,{data:s.variantStats,children:[e.jsx(F,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),e.jsx(M,{dataKey:"label",stroke:"hsl(var(--muted-foreground))",tick:{fontSize:11}}),e.jsx(Z,{stroke:"hsl(var(--muted-foreground))",tick:{fontSize:11}}),e.jsx(W,{contentStyle:{background:"hsl(var(--background))",border:"1px solid hsl(var(--border))",fontSize:12}}),e.jsx(U,{wrapperStyle:{fontSize:12}}),e.jsx(he,{dataKey:"imp",name:"Imprese",fill:k[0],radius:[6,6,0,0]}),e.jsx(he,{dataKey:"clk",name:"Prokliky",fill:k[1],radius:[6,6,0,0]})]})}),e.jsx("ul",{className:"mt-3 space-y-1 text-xs",children:s.variantStats.map(i=>e.jsxs("li",{className:"flex items-center justify-between",children:[e.jsx("span",{children:i.label}),e.jsxs("span",{className:"font-mono text-muted-foreground",children:[i.imp," imp · ",i.clk," klik · ",e.jsxs("span",{className:"text-primary",children:[i.ctr," %"]})]})]},i.idx))})]}),e.jsx(L,{icon:se,title:"Zdroje návÅ¡tÄv",subtitle:"Odkud uživatelé pÅicházejÃ",children:s.sources.length===0?e.jsx(K,{}):e.jsx($,{width:"100%",height:240,children:e.jsxs(It,{children:[e.jsx(Ct,{data:s.sources,dataKey:"count",nameKey:"source",cx:"50%",cy:"50%",outerRadius:80,label:i=>`${i.name??"?"} (${i.value??0})`,children:s.sources.map((i,v)=>e.jsx(_t,{fill:k[v%k.length]},v))}),e.jsx(W,{contentStyle:{background:"hsl(var(--background))",border:"1px solid hsl(var(--border))",fontSize:12}})]})})})]}),e.jsxs("section",{className:"grid gap-4 lg:grid-cols-2",children:[e.jsx(L,{icon:Fe,title:"Aktivita v průbÄhu dne",subtitle:"Suma za zvolené obdobÃ",children:e.jsx($,{width:"100%",height:220,children:e.jsxs(oa,{data:s.hourly,children:[e.jsx(F,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),e.jsx(M,{dataKey:"hour",stroke:"hsl(var(--muted-foreground))",tick:{fontSize:11}}),e.jsx(Z,{stroke:"hsl(var(--muted-foreground))",tick:{fontSize:11}}),e.jsx(W,{contentStyle:{background:"hsl(var(--background))",border:"1px solid hsl(var(--border))",fontSize:12}}),e.jsx(U,{wrapperStyle:{fontSize:12}}),e.jsx(q,{type:"monotone",dataKey:"imp",name:"Imprese",stroke:k[0],dot:!1,strokeWidth:2}),e.jsx(q,{type:"monotone",dataKey:"clk",name:"Prokliky",stroke:k[1],dot:!1,strokeWidth:2})]})})}),e.jsx(L,{icon:de,title:"Top stránky",subtitle:"Kde se banner zobrazuje a kliká",children:s.topPages.length===0?e.jsx(K,{}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"text-xs uppercase text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-2 py-2 text-left",children:"Stránka"}),e.jsx("th",{className:"px-2 py-2 text-right",children:"Imp"}),e.jsx("th",{className:"px-2 py-2 text-right",children:"Klik"}),e.jsx("th",{className:"px-2 py-2 text-right",children:"CTR"})]})}),e.jsx("tbody",{children:s.topPages.map(i=>e.jsxs("tr",{className:"border-t border-border",children:[e.jsx("td",{className:"px-2 py-1.5 truncate",title:i.page,children:i.page}),e.jsx("td",{className:"px-2 py-1.5 text-right font-mono text-xs",children:I(i.imp)}),e.jsx("td",{className:"px-2 py-1.5 text-right font-mono text-xs",children:I(i.clk)}),e.jsxs("td",{className:"px-2 py-1.5 text-right font-mono text-xs text-primary",children:[i.ctr," %"]})]},i.page))})]})})})]}),s.referrers.length>0&&e.jsx(L,{icon:se,title:"Top referrer domény",subtitle:"Externà weby, ze kterých uživatelé pÅicházejÃ",children:e.jsx("ul",{className:"grid grid-cols-2 gap-2 text-sm md:grid-cols-3",children:s.referrers.map(i=>e.jsxs("li",{className:"flex items-center justify-between rounded-md border border-border bg-surface/50 px-3 py-1.5",children:[e.jsx("span",{className:"truncate",children:i.host}),e.jsx("span",{className:"ml-2 font-mono text-xs text-muted-foreground",children:i.count})]},i.host))})}),e.jsxs("footer",{className:"border-t border-border pt-3 text-center text-[10px] text-muted-foreground",children:["TV i-VysoÄina.CZ · Reporting kampanà · ",new Date().toLocaleStr
3ing("cs-CZ")]})]})]})}function z({icon:t,label:a,value:n,accent:r}){return e.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(t,{className:"h-3.5 w-3.5",style:{color:r}}),e.jsx("span",{className:"uppercase tracking-wider",children:a})]}),e.jsx("div",{className:"mt-2 font-display text-2xl font-bold",style:{color:r},children:n})]})}function L({icon:t,title:a,subtitle:n,children:r}){return e.jsxs("section",{className:"rounded-xl border border-border bg-card p-4",children:[e.jsxs("header",{className:"mb-3 flex items-center gap-2",children:[e.jsx(t,{className:"h-4 w-4 text-primary"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:a}),n&&e.jsx("p",{className:"text-xs text-muted-foreground",children:n})]})]}),r]})}function K({hint:t}){return e.jsx("p",{className:"py-6 text-center text-xs text-muted-foreground",children:t??"Pro toto obdobà nemáme žádná data."})}export{Pa as component};
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.