var e,t=Object.defineProperty,r=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,c=(e,r,s)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,o=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&c(e,r,t[r]);if(i)for(var r of i(t))n.call(t,r)&&c(e,r,t[r]);return e},l=(e,t)=>r(e,s(t));import{d as m,a as d,l as u,S as p,b as g,c as y,e as v,I as h,A as b,W as f,s as x,g as _,f as S,h as T,r as E,i as C,j as k,w,k as D,o as A,p as N,m as M,n as O,q as R,t as P,C as I,u as B,v as L,x as $,y as G,z as U,B as Y,D as V,E as q,F,G as K,R as j,H as z,J as H,K as Q,L as W,M as J,N as X,O as Z,P as ee,Q as te,T as re,U as se,V as ie,X as ae,Y as ne,Z as ce,_ as oe,$ as le,a0 as me,a1 as de,a2 as ue,a3 as pe,a4 as ge,a5 as ye,a6 as ve,a7 as he,a8 as be,a9 as fe,aa as xe,ab as _e,ac as Se,ad as Te,ae as Ee,af as Ce,ag as ke,ah as we,ai as De,aj as Ae,ak as Ne}from"./chunk-vendor-metrics.2.3.0.js";const Me={main:{},darkMode:!1,fullscreen:!1,todayIsAccessible:!1,isoCode:"en",dateRangeTooLarge:!1,dateRange:{startDate:m().subtract(7,"day").format("YYYY-MM-DD"),endDate:m().subtract(1,"day").format("YYYY-MM-DD")},compareMode:!0,slugButtonDate:"7d",syncStatus:"scheduled",accounts:{shopID:"",url_shop:"",plan:"",first_sync_asked_at:1,start_sync_at:1,next_sync_at:1,last_sync_at:1},planModalOpened:!1,links:{},errorOnKpi:!1};var Oe,Re;(Re=Oe||(Oe={})).SET_DARK_MODE="SET_DARK_MODE",Re.SET_COMPARE_MODE="SET_COMPARE_MODE",Re.SET_DATE_RANGE="SET_DATE_RANGE",Re.SET_SLUG_BUTTON_DATE="SET_SLUG_BUTTON_DATE",Re.SET_ACCOUNT="SET_ACCOUNT",Re.SET_FIRST_SYNC="SET_FIRST_SYNC",Re.SET_LAST_SYNC="SET_LAST_SYNC",Re.SET_START_SYNC="SET_START_SYNC",Re.SET_PLAN_MODAL_OPENED="SET_PLAN_MODAL_OPENED",Re.SET_SHOP_ID="SET_SHOP_ID",Re.SET_PLAN="SET_PLAN",Re.SET_TOKEN="SET_TOKEN",Re.TOGGLE_FULLSCREEN="TOGGLE_FULLSCREEN",Re.SET_TODAY_ACCESSIBLE="SET_TODAY_ACCESSIBLE",Re.SET_ERROR_ON_KPI="SET_ERROR_ON_KPI",Re.SET_MODULES_IS_ENABLED="SET_MODULES_IS_ENABLED";const Pe={[Oe.SET_DARK_MODE](e,t){e.darkMode=t},[Oe.SET_COMPARE_MODE](e,t){e.compareMode=t},[Oe.SET_DATE_RANGE](e,t){const r=m(t.endDate).diff(t.startDate,"month"),s=m(t.endDate).diff(t.startDate,"days"),i=m().diff(t.startDate,"days");e.dateRangeTooLarge=!1,("metrics-advanced"!==e.accounts.plan&&r>=1.5||"metrics-advanced"!==e.accounts.plan&&s+i>=90||"metrics-advanced"===e.accounts.plan&&r>=7||"metrics-advanced"===e.accounts.plan&&s+i>=420)&&(e.dateRangeTooLarge=!0,e.compareMode=!1),e.dateRange=t},[Oe.SET_SLUG_BUTTON_DATE](e,t){e.slugButtonDate=t},[Oe.SET_ACCOUNT](e,t){e.accounts=Object.assign(e.accounts,t),-1!==t.first_sync_asked_at&&(e.syncStatus="scheduled"),-1!==t.last_sync_at&&(e.syncStatus="done"),-1!==t.start_sync_at&&(e.syncStatus="syncing")},[Oe.SET_PLAN](e,t){e.accounts.plan=t.plan},[Oe.SET_FIRST_SYNC](e,t){e.accounts.first_sync_asked_at=t,e.syncStatus="scheduled"},[Oe.SET_LAST_SYNC](e,t){e.accounts.last_sync_at=t,e.accounts.next_sync_at=m().add(1,"day").startOf("day").add(1,"hours").valueOf(),e.syncStatus="done"},[Oe.SET_START_SYNC](e,t){e.accounts.start_sync_at=t,e.syncStatus="syncing"},[Oe.SET_PLAN_MODAL_OPENED](e,t){e.planModalOpened=t},[Oe.SET_SHOP_ID](e,t){e.accounts.shopID=t},[Oe.SET_TOKEN](e,t){sessionStorage.setItem("metricsToken",t.token)},[Oe.TOGGLE_FULLSCREEN](e,t){e.fullscreen=t},[Oe.SET_TODAY_ACCESSIBLE](e,t){e.todayIsAccessible=t},[Oe.SET_ERROR_ON_KPI](e,t){e.errorOnKpi=t},[Oe.SET_MODULES_IS_ENABLED](e,t){e.modulesIsEnabled=t}};var Ie,Be;(Be=Ie||(Ie={})).SET_DARK_MODE="SET_DARK_MODE",Be.SET_COMPARE_MODE="SET_COMPARE_MODE",Be.SET_DATE_RANGE="SET_DATE_RANGE",Be.SET_SLUG_BUTTON_DATE="SET_SLUG_BUTTON_DATE",Be.SET_ADVANCED_PLAN="SET_ADVANCED_PLAN",Be.SET_ACCOUNT="SET_ACCOUNT",Be.SET_FIRST_SYNC="SET_FIRST_SYNC",Be.SET_LAST_SYNC="SET_LAST_SYNC",Be.SET_START_SYNC="SET_START_SYNC",Be.SET_PLAN_MODAL_OPENED="SET_PLAN_MODAL_OPENED",Be.SET_SHOP_ID="SET_SHOP_ID",Be.SET_PLAN="SET_PLAN",Be.SET_TODAY_ACCESSIBLE="SET_TODAY_ACCESSIBLE",Be.RETRIEVE_TOKEN="RETRIEVE_TOKEN",Be.TOGGLE_FULLSCREEN="TOGGLE_FULLSCREEN",Be.SET_ERROR_ON_KPI="SET_ERROR_ON_KPI",Be.SET_MODULES_IS_ENABLED="SET_MODULES_IS_ENABLED";const Le=new
/**
 * 2007-2021 PrestaShop and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2021 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */
class{constructor(){this.api=this.createApi()}createApi(){const e=d.create({baseURL:"/",timeout:3e4});return e.interceptors.response.use((e=>e.data.status>=400?Promise.reject(e.data.message):e.data),(e=>{Promise.reject(e)})),e}};
/**
 * 2007-2021 PrestaShop and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2021 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */function $e(e){const t=function(e){const t=new FormData;return t.append("ajax","true"),t.append("action",e.action),t.append("controller",e.controller),u.exports.forEach(e.data,((e,r)=>{t.append(r,e)})),t}({action:"ToggleDashboardModules",controller:"AdminAjaxDashboard"});return Le.api.post(e,t)}const Ge={[Ie.SET_TODAY_ACCESSIBLE]({commit:e},t){e(Oe.SET_TODAY_ACCESSIBLE,t)},[Ie.SET_DARK_MODE]({commit:e},t){e(Oe.SET_DARK_MODE,t)},[Ie.SET_DATE_RANGE]({commit:e},t){e(Oe.SET_DATE_RANGE,t)},[Ie.SET_SLUG_BUTTON_DATE]({commit:e},t){e(Oe.SET_SLUG_BUTTON_DATE,t)},[Ie.SET_PLAN]({commit:e},t){e(Oe.SET_PLAN,t)},[Ie.SET_ACCOUNT]({commit:e},t){const r={plan:t.plan,first_sync_asked_at:t.first_sync_asked_at,last_sync_at:t.last_sync_at,shopID:t.shop_id,shop_url:t.shop_url,start_sync_at:t.start_sync_at,email_account:t.email_account};e(Oe.SET_ACCOUNT,r)},[Ie.SET_FIRST_SYNC]({commit:e},t){e(Oe.SET_FIRST_SYNC,t)},[Ie.SET_LAST_SYNC]({commit:e},t){e(Oe.SET_LAST_SYNC,t)},[Ie.SET_START_SYNC]({commit:e},t){e(Oe.SET_START_SYNC,t)},[Ie.SET_PLAN_MODAL_OPENED]({commit:e},t){e(Oe.SET_PLAN_MODAL_OPENED,t)},[Ie.SET_SHOP_ID]({commit:e},t){e(Oe.SET_SHOP_ID,t)},[Ie.TOGGLE_FULLSCREEN]({commit:e},t){e(Oe.TOGGLE_FULLSCREEN,t)},async[Ie.RETRIEVE_TOKEN]({commit:e},t){try{const r=await fetch(`${t}&action=GetOrRefreshToken`),s=await r.json();e(Oe.SET_TOKEN,s)}catch(r){console.error(r)}},[Ie.SET_COMPARE_MODE]({commit:e},t){e(Oe.SET_COMPARE_MODE,t)},[Ie.SET_ERROR_ON_KPI]({commit:e},t){e(Oe.SET_ERROR_ON_KPI,t)},[Ie.SET_MODULES_IS_ENABLED]({commit:e,state:t},r){$e(t.controllersLinks.dashboardAjax).then((t=>!0===(null==t?void 0:t.success)?(e(Oe.SET_MODULES_IS_ENABLED,r),Promise.resolve()):Promise.reject())).catch((()=>Promise.reject()))}};var Ue,Ye;(Ye=Ue||(Ue={})).GET_DARK_MODE="GET_DARK_MODE",Ye.GET_VARIABLES_QUERY="GET_VARIABLES_QUERY",Ye.GET_OPTIONS_QUERY="GET_OPTIONS_QUERY",Ye.GET_SLUG_BUTTON_DATE="GET_SLUG_BUTTON_DATE",Ye.GET_IS_ADVANCED="GET_IS_ADVANCED",Ye.GET_PREVIOUS_DATE_RANGE="GET_PREVIOUS_DATE_RANGE",Ye.GET_PLAN_MODAL_OPENED="GET_PLAN_MODAL_OPENED",Ye.GET_SYNC_STATUS="GET_SYNC_STATUS",Ye.PRODUCT_TOUR_DONE="PRODUCT_TOUR_DONE",Ye.IS_FIRST_SYNC="IS_FIRST_SYNC",Ye.IS_FIRST_ACCESS="IS_FIRST_ACCESS",Ye.HAS_GOOGLE_ACCOUNT="HAS_GOOGLE_ACCOUNT",Ye.TODAY_IS_ACCESSIBLE="TODAY_IS_ACCESSIBLE",Ye.GET_ERROR_ON_KPI="GET_ERROR_ON_KPI",Ye.GET_USER_EMAIL="GET_USER_EMAIL",Ye.PSX_IS_CONNECTED="PSX_IS_CONNECTED",Ye.GA_IS_CONNECTED="GA_IS_CONNECTED",Ye.GET_MODULES_IS_ENABLED="GET_MODULES_IS_ENABLED",Ye.IS_LEGACY_STATS_PAGE="IS_LEGACY_STATS_PAGE";const Ve={[Ue.GET_DARK_MODE]:e=>e.darkMode,[Ue.GET_VARIABLES_QUERY]:e=>({inputData:{TimeDimension:{dateRange:e.dateRange},ShopId:e.accounts.shopID,compareMode:e.compareMode}}),[Ue.GET_OPTIONS_QUERY]:e=>({fetchPolicy:"cache-and-network",clientId:"metrics-free"!==e.accounts.plan&&""!==e.accounts.plan&&-1!==e.accounts.last_sync_at&&"today"!==e.slugButtonDate?"paidClient":"default"}),[Ue.GET_SLUG_BUTTON_DATE]:e=>e.slugButtonDate,[Ue.GET_SYNC_STATUS]:e=>e.syncStatus,[Ue.GET_IS_ADVANCED]:e=>"metrics-free"!==e.accounts.plan&&""!==e.accounts.plan,[Ue.GET_PLAN_MODAL_OPENED]:e=>e.planModalOpened,[Ue.GET_PREVIOUS_DATE_RANGE](e){const t=m(e.dateRange.startDate),r=m(e.dateRange.endDate).diff(t,"day"),s=t.subtract(1,"day");return{startDate:s.subtract(r,"day").format("YYYY-MM-DD"),endDate:s.format("YYYY-MM-DD")}},[Ue.PRODUCT_TOUR_DONE]:e=>e.productTourAdvancedDone?"metrics-advanced":e.productTourFreeDone?"metrics-free":null,[Ue.GET_SYNC_STATUS]:e=>e.syncStatus,[Ue.IS_FIRST_ACCESS]:e=>-1!==e.accounts.first_sync_asked_at&&-1===e.accounts.start_sync_at&&-1===e.accounts.last_sync_at,[Ue.IS_FIRST_SYNC]:e=>-1!==e.accounts.first_sync_asked_at&&-1!==e.accounts.start_sync_at&&-1===e.accounts.last_sync_at,[Ue.HAS_GOOGLE_ACCOUNT]:e=>e.googleAccount&&e.googleAccount.selected,[Ue.TODAY_IS_ACCESSIBLE]:e=>e.todayIsAccessible,[Ue.GET_ERROR_ON_KPI]:e=>e.errorOnKpi,[Ue.GET_USER_EMAIL]:e=>e.user.email,[Ue.PSX_IS_CONNECTED]:e=>e.user.emailIsValidated&&""!==e.user.email,[Ue.GA_IS_CONNECTED]:e=>e.user.gaIsOnboarded,[Ue.GET_MODULES_IS_ENABLED]:e=>e.modulesIsEnabled,[Ue.IS_LEGACY_STATS_PAGE]:e=>e.isLegacyStatsPage},{storePsMetrics:qe,contextPsAccounts:Fe}=window;Object.assign(null==(e=null==qe?void 0:qe.context)?void 0:e.user,Fe?Fe.user:{});const Ke=Object.assign(qe?qe.context:{},o({},Me));Ke.shop.shopUuid&&(Ke.accounts.shopID=Ke.shop.shopUuid),Ke.i18n.isoCode&&(Ke.isoCode=Ke.i18n.isoCode),Ke.controllersLinks&&(Ke.links.faq=Ke.controllersLinks.faq,Ke.links.settings=Ke.controllersLinks.settings);const je={namespaced:!0,state:Ke,mutations:Pe,actions:Ge,getters:Ve},ze={namespaced:!0,state:{menu:[{icon:"",pageName:"tab_overview",title:"menu.overview",isDisabledOnToday:!1},{icon:"DollarSgnIcon",pageName:"tab_business",title:"menu.business",isDisabledOnToday:!0},{icon:"",pageName:"tab_acquisition",title:"menu.acquisition",isDisabledOnToday:!0},{icon:"",pageName:"tab_customer_knowledge",title:"menu.customerKnowledge",isDisabledOnToday:!0}]},getters:{menu:e=>e.menu}},He=new p({encodingType:"aes"}),Qe=y({modules:{main:je,topMenu:ze},plugins:[g({storage:{getItem:e=>He.get(e),setItem:(e,t)=>He.set(e,t),removeItem:e=>He.remove(e)},paths:["main.accounts","main.syncStatus","main.darkMode","main.slugButtonDate","main.dateRange","main.fullscreen"]})]});function We(){return Qe}const Je=new b({link:v({uri:We().state.main.controllersLinks.graphql}),cache:new h}),Xe=sessionStorage.getItem("metricsToken"),Ze=new f({uri:"wss://analytics-api.psessentials.net/graphql",options:{reconnect:!0,connectionParams:{authorization:Xe?`Bearer ${Xe}`:""}}}),et=v({uri:"https://analytics-api.psessentials.net/graphql",credentials:"same-origin",headers:{"Access-Control-Allow-Origin":"*"}}),tt=new b({link:x((({query:e})=>{const t=_(e);return"OperationDefinition"===t.kind&&"subscription"===t.operation}),Ze,S(((e,{headers:t})=>({headers:l(o({},t),{authorization:Xe?`Bearer ${Xe}`:""})}))).concat(et)),cache:new h});var rt=T({setup:()=>({appMode:!1})});const st={key:0},it={class:"metrics-hidden md:metrics-flex metrics-rounded-lg metrics-text-md metrics-my-5"},at=k("div",{class:"\n        metrics-button-date\n        metrics-cursor\n        metrics-border\n        metrics-bg-red-500\n        metrics-text-white\n        metrics-border-gray-400\n        metrics-rounded-l-lg\n      "}," DEV MODE ROUTE ",-1),nt=k("a",null,"preview page",-1),ct=k("a",null,"metrics page",-1);rt.render=function(e,t,r,s,i,a){const n=E("router-link");return e.appMode?(A(),C("div",st,[k("ul",it,[at,k(n,{tag:"li",to:"/preview",class:"\n          metrics-button-date\n          metrics-border\n          metrics-bg-white\n          metrics-border-gray-400\n          metrics-text-gray-700\n          metrics-zoom-in-no-shadow\n        "},{default:w((()=>[nt])),_:1}),k(n,{tag:"li",to:"/",class:"\n          metrics-button-date\n          metrics-border\n          metrics-bg-white\n          metrics-border-gray-400\n          metrics-text-gray-700\n          metrics-zoom-in-no-shadow\n          metrics-rounded-r-lg\n        "},{default:w((()=>[ct])),_:1})])])):D("",!0)};var ot=T({components:{debugBar:rt},setup(){const e=We();e.dispatch("main/RETRIEVE_TOKEN",e.state.main.controllersLinks.accounts),N(M,{default:Je,paidClient:tt})}});const lt={id:"metrics"};ot.render=function(e,t,r,s,i,a){const n=E("debug-bar"),c=E("router-view");return A(),C("div",lt,[k(n),k(c)])};m.extend(O);const mt={cutText(e,t){if(e.split(" ").length>1){const r=e.substring(0,t).split(" ");return r.pop(),r.join(" ")+"..."}return e},formatDate:(e,t)=>m(e).format(t),capitalizeFirstLetter:e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",onlyNumber:e=>e?e.replace(/\D/g,""):"",formatCurrency(e){if(e){const t=e.toString().replace(/\D/g,""),r=t.length%3;let s=t.substr(0,r);const i=t.substr(r).match(/\d{3}/g);let a;return i&&(a=r?".":"",s+=a+i.join(".")),s}return""},timeAgo(e){const t=new Date((e||"").replace(/-/g,"/").replace(/[TZ]/g," ")),r=((new Date).getTime()-t.getTime())/1e3,s=Math.floor(r/86400);return isNaN(s)||s<0||s>=31?m(e).format("MMMM DD, YYYY"):0===s&&((r<60?"just now":r<120&&"1 minute ago")||r<3600&&Math.floor(r/60)+" minutes ago"||r<7200&&"1 hour ago"||r<86400&&Math.floor(r/3600)+" hours ago")||1===s&&"Yesterday"||s<7&&s+" days ago"||s<31&&Math.ceil(s/7)+" weeks ago"},diffTimeByNow(e){const t=m(m().format("YYYY-MM-DD HH:mm:ss").toString()),r=m(m(e).format("YYYY-MM-DD HH:mm:ss").toString()),s=m.duration(r.diff(t)),i=Math.floor(s.asMilliseconds()),a=Math.round(i/864e5),n=Math.round(i%864e5/36e5);let c=Math.round(i%864e5%36e5/6e4);const o=Math.round(i%864e5%36e5%6e4/1e3);return o<30&&o>=0&&(c+=1),{days:a.toString().length<2?"0"+a:a,hours:n.toString().length<2?"0"+n:n,minutes:c.toString().length<2?"0"+c:c,seconds:o.toString().length<2?"0"+o:o}},isset:e=>null!=e&&("object"==typeof e||Array.isArray(e)?Object.keys(e).length:e.toString().length),toRaw:e=>JSON.parse(JSON.stringify(e)),randomNumbers(e,t,r){const s=[0];for(let i=1;i<r;i++)s.push(Math.ceil(Math.random()*(e-t)+t));return s}},dt=e=>{e.config.globalProperties.$h=mt};var ut=T({name:"GlobalChart",props:{type:{type:String,required:!0,default:"line",validator:e=>-1!==["line","pie","doughnut","bar"].indexOf(e)},data:{type:Object,required:!0,default:()=>({})},options:{type:Object,default:()=>({})},width:{type:Number,default:0},height:{type:Number,default:0}},setup(e){const t=R();return P((()=>{e.width&&$(t.value).attr({width:e.width}),e.height&&$(t.value).attr({height:e.height}),(()=>{var r;const s=null==(r=t.value)?void 0:r.getContext("2d"),i=new I.exports.Chart(s,{plugins:[B],type:e.type,data:mt.toRaw(e.data),options:e.options});L(e,(()=>{i.data=mt.toRaw(e.data),i.options=e.options,i.update()}))})()})),{chartRef:t}}});const pt={ref:"chartRef"};ut.render=function(e,t,r,s,i,a){return A(),C("canvas",pt,null,512)};var gt=T({name:"GlobalLoadingIcon",props:{icon:{type:String,default:""},color:{type:String,default:"#2d3748"}}});const yt=k("g",{transform:"matrix(1 0 0 -1 0 80)"},[k("rect",{width:"10",height:"20",rx:"3"},[k("animate",{attributeName:"height",begin:"0s",dur:"4.3s",values:"20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20",calcMode:"linear",repeatCount:"indefinite"})]),k("rect",{x:"15",width:"10",height:"80",rx:"3"},[k("animate",{attributeName:"height",begin:"0s",dur:"2s",values:"80;55;33;5;75;23;73;33;12;14;60;80",calcMode:"linear",repeatCount:"indefinite"})]),k("rect",{x:"30",width:"10",height:"50",rx:"3"},[k("animate",{attributeName:"height",begin:"0s",dur:"1.4s",values:"50;34;78;23;56;23;34;76;80;54;21;50",calcMode:"linear",repeatCount:"indefinite"})]),k("rect",{x:"45",width:"10",height:"30",rx:"3"},[k("animate",{attributeName:"height",begin:"0s",dur:"2s",values:"30;45;13;80;56;72;45;76;34;23;67;30",calcMode:"linear",repeatCount:"indefinite"})])],-1),vt={key:1,width:"20",viewBox:"0 0 57 57",xmlns:"http://www.w3.org/2000/svg",class:"w-full h-full"},ht={fill:"none","fill-rule":"evenodd"},bt={transform:"translate(1 1)"},ft=k("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;5;50;50",calcMode:"linear",repeatCount:"indefinite"},null,-1),xt=k("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",values:"5;27;49;5",calcMode:"linear",repeatCount:"indefinite"},null,-1),_t=k("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",from:"5",to:"5",values:"5;50;50;5",calcMode:"linear",repeatCount:"indefinite"},null,-1),St=k("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",from:"27",to:"27",values:"27;49;5;27",calcMode:"linear",repeatCount:"indefinite"},null,-1),Tt=k("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;50;5;50",calcMode:"linear",repeatCount:"indefinite"},null,-1),Et=k("animate",{attributeName:"cx",from:"49",to:"49",begin:"0s",dur:"2.2s",values:"49;5;27;49",calcMode:"linear",repeatCount:"indefinite"},null,-1),Ct=k("rect",{y:"10",width:"15",height:"120",rx:"6"},[k("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})],-1),kt=k("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[k("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})],-1),wt=k("rect",{x:"60",width:"15",height:"140",rx:"6"},[k("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})],-1),Dt=k("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[k("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})],-1),At=k("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[k("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})],-1),Nt=k("path",{d:"M67.447 58c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10zm9.448 9.447c0 5.523 4.477 10 10 10 5.522 0 10-4.477 10-10s-4.478-10-10-10c-5.523 0-10 4.477-10 10zm-9.448 9.448c-5.523 0-10 4.477-10 10 0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10zM58 67.447c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10z"},[k("animateTransform",{attributeName:"transform",type:"rotate",from:"0 67 67",to:"-360 67 67",dur:"2.5s",repeatCount:"indefinite"})],-1),Mt=k("path",{d:"M28.19 40.31c6.627 0 12-5.374 12-12 0-6.628-5.373-12-12-12-6.628 0-12 5.372-12 12 0 6.626 5.372 12 12 12zm30.72-19.825c4.686 4.687 12.284 4.687 16.97 0 4.686-4.686 4.686-12.284 0-16.97-4.686-4.687-12.284-4.687-16.97 0-4.687 4.686-4.687 12.284 0 16.97zm35.74 7.705c0 6.627 5.37 12 12 12 6.626 0 12-5.373 12-12 0-6.628-5.374-12-12-12-6.63 0-12 5.372-12 12zm19.822 30.72c-4.686 4.686-4.686 12.284 0 16.97 4.687 4.686 12.285 4.686 16.97 0 4.687-4.686 4.687-12.284 0-16.97-4.685-4.687-12.283-4.687-16.97 0zm-7.704 35.74c-6.627 0-12 5.37-12 12 0 6.626 5.373 12 12 12s12-5.374 12-12c0-6.63-5.373-12-12-12zm-30.72 19.822c-4.686-4.686-12.284-4.686-16.97 0-4.686 4.687-4.686 12.285 0 16.97 4.686 4.687 12.284 4.687 16.97 0 4.687-4.685 4.687-12.283 0-16.97zm-35.74-7.704c0-6.627-5.372-12-12-12-6.626 0-12 5.373-12 12s5.374 12 12 12c6.628 0 12-5.373 12-12zm-19.823-30.72c4.687-4.686 4.687-12.284 0-16.97-4.686-4.686-12.284-4.686-16.97 0-4.687 4.686-4.687 12.284 0 16.97 4.686 4.687 12.284 4.687 16.97 0z"},[k("animateTransform",{attributeName:"transform",type:"rotate",from:"0 67 67",to:"360 67 67",dur:"8s",repeatCount:"indefinite"})],-1),Ot=k("circle",{cx:"12.5",cy:"12.5",r:"12.5"},[k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})],-1),Rt=k("circle",{cx:"12.5",cy:"52.5",r:"12.5","fill-opacity":".5"},[k("animate",{attributeName:"fill-opacity",begin:"100ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})],-1),Pt=k("circle",{cx:"52.5",cy:"12.5",r:"12.5"},[k("animate",{attributeName:"fill-opacity",begin:"300ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})],-1),It=k("circle",{cx:"52.5",cy:"52.5",r:"12.5"},[k("animate",{attributeName:"fill-opacity",begin:"600ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})],-1),Bt=k("circle",{cx:"92.5",cy:"12.5",r:"12.5"},[k("animate",{attributeName:"fill-opacity",begin:"800ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})],-1),Lt=k("circle",{cx:"92.5",cy:"52.5",r:"12.5"},[k("animate",{attributeName:"fill-opacity",begin:"400ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})],-1),$t=k("circle",{cx:"12.5",cy:"92.5",r:"12.5"},[k("animate",{attributeName:"fill-opacity",begin:"700ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})],-1),Gt=k("circle",{cx:"52.5",cy:"92.5",r:"12.5"},[k("animate",{attributeName:"fill-opacity",begin:"500ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})],-1),Ut=k("circle",{cx:"92.5",cy:"92.5",r:"12.5"},[k("animate",{attributeName:"fill-opacity",begin:"200ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})],-1),Yt=k("path",{d:"M30.262 57.02L7.195 40.723c-5.84-3.976-7.56-12.06-3.842-18.063 3.715-6 11.467-7.65 17.306-3.68l4.52 3.76 2.6-5.274c3.717-6.002 11.47-7.65 17.305-3.68 5.84 3.97 7.56 12.054 3.842 18.062L34.49 56.118c-.897 1.512-2.793 1.915-4.228.9z","fill-opacity":".5"},[k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.4s",values:"0.5;1;0.5",calcMode:"linear",repeatCount:"indefinite"})],-1),Vt=k("path",{d:"M105.512 56.12l-14.44-24.272c-3.716-6.008-1.996-14.093 3.843-18.062 5.835-3.97 13.588-2.322 17.306 3.68l2.6 5.274 4.52-3.76c5.84-3.97 13.592-2.32 17.307 3.68 3.718 6.003 1.998 14.088-3.842 18.064L109.74 57.02c-1.434 1.014-3.33.61-4.228-.9z","fill-opacity":".5"},[k("animate",{attributeName:"fill-opacity",begin:"0.7s",dur:"1.4s",values:"0.5;1;0.5",calcMode:"linear",repeatCount:"indefinite"})],-1),qt=k("path",{d:"M67.408 57.834l-23.01-24.98c-5.864-6.15-5.864-16.108 0-22.248 5.86-6.14 15.37-6.14 21.234 0L70 16.168l4.368-5.562c5.863-6.14 15.375-6.14 21.235 0 5.863 6.14 5.863 16.098 0 22.247l-23.007 24.98c-1.43 1.556-3.757 1.556-5.188 0z"},null,-1),Ft=k("g",{fill:"none","fill-rule":"evenodd"},[k("g",{transform:"translate(1 1)","stroke-width":"4"},[k("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),k("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[k("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1),Kt=k("g",{fill:"none","fill-rule":"evenodd","stroke-width":"4"},[k("circle",{cx:"22",cy:"22",r:"1"},[k("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),k("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]),k("circle",{cx:"22",cy:"22",r:"1"},[k("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),k("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})])],-1),jt=k("g",{fill:"none","fill-rule":"evenodd",transform:"translate(1 1)","stroke-width":"3"},[k("circle",{cx:"22",cy:"22",r:"6","stroke-opacity":"0"},[k("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]),k("circle",{cx:"22",cy:"22",r:"6","stroke-opacity":"0"},[k("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]),k("circle",{cx:"22",cy:"22",r:"8"},[k("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})])],-1),zt={key:9,width:"20",viewBox:"0 0 58 58",xmlns:"http://www.w3.org/2000/svg",class:"w-full h-full"},Ht={fill:"none","fill-rule":"evenodd"},Qt=k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.3s",values:"1;0;0;0;0;0;0;0",calcMode:"linear",repeatCount:"indefinite"},null,-1),Wt=k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.3s",values:"0;1;0;0;0;0;0;0",calcMode:"linear",repeatCount:"indefinite"},null,-1),Jt=k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.3s",values:"0;0;1;0;0;0;0;0",calcMode:"linear",repeatCount:"indefinite"},null,-1),Xt=k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.3s",values:"0;0;0;1;0;0;0;0",calcMode:"linear",repeatCount:"indefinite"},null,-1),Zt=k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.3s",values:"0;0;0;0;1;0;0;0",calcMode:"linear",repeatCount:"indefinite"},null,-1),er=k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.3s",values:"0;0;0;0;0;1;0;0",calcMode:"linear",repeatCount:"indefinite"},null,-1),tr=k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.3s",values:"0;0;0;0;0;0;1;0",calcMode:"linear",repeatCount:"indefinite"},null,-1),rr=k("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.3s",values:"0;0;0;0;0;0;0;1",calcMode:"linear",repeatCount:"indefinite"},null,-1),sr={key:10,width:"20",viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",class:"w-full h-full"},ir={id:"a",x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%"},ar={fill:"none","fill-rule":"evenodd"},nr={transform:"translate(1 1)"},cr=k("path",{id:"Oval-2",d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#a)","stroke-width":"3"},[k("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"})],-1),or=k("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"},null,-1),lr=k("circle",{cx:"15",cy:"15",r:"15"},[k("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})],-1),mr=k("circle",{cx:"60",cy:"15",r:"9","fill-opacity":"0.3"},[k("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})],-1),dr=k("circle",{cx:"105",cy:"15",r:"15"},[k("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})],-1);gt.render=function(e,t,r,s,i,a){return A(),C("span",null,["audio"==e.icon?(A(),C("svg",{key:0,width:"15",viewBox:"0 0 55 80",xmlns:"http://www.w3.org/2000/svg",fill:e.color,class:"w-full h-full"},[yt],8,["fill"])):"ball-triangle"==e.icon?(A(),C("svg",vt,[k("g",ht,[k("g",bt,[k("circle",{cx:"5",cy:"50",r:"5",fill:e.color},[ft,xt],8,["fill"]),k("circle",{cx:"27",cy:"5",r:"5",fill:e.color},[_t,St],8,["fill"]),k("circle",{cx:"49",cy:"50",r:"5",fill:e.color},[Tt,Et],8,["fill"])])])])):"bars"==e.icon?(A(),C("svg",{key:2,width:"20",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:e.color,class:"w-full h-full"},[Ct,kt,wt,Dt,At],8,["fill"])):"circles"==e.icon?(A(),C("svg",{key:3,width:"20",viewBox:"0 0 135 135",xmlns:"http://www.w3.org/2000/svg",fill:e.color,class:"w-full h-full"},[Nt,Mt],8,["fill"])):"grid"==e.icon?(A(),C("svg",{key:4,width:"20",viewBox:"0 0 105 105",xmlns:"http://www.w3.org/2000/svg",fill:e.color,class:"w-full h-full"},[Ot,Rt,Pt,It,Bt,Lt,$t,Gt,Ut],8,["fill"])):"hearts"==e.icon?(A(),C("svg",{key:5,width:"30",viewBox:"0 0 140 64",xmlns:"http://www.w3.org/2000/svg",fill:e.color,class:"w-full h-full"},[Yt,Vt,qt],8,["fill"])):"oval"==e.icon?(A(),C("svg",{key:6,width:"25",viewBox:"-2 -2 42 42",xmlns:"http://www.w3.org/2000/svg",stroke:e.color,class:"w-full h-full"},[Ft],8,["stroke"])):"puff"==e.icon?(A(),C("svg",{key:7,width:"25",viewBox:"0 0 44 44",xmlns:"http://www.w3.org/2000/svg",stroke:e.color,class:"w-full h-full"},[Kt],8,["stroke"])):"rings"==e.icon?(A(),C("svg",{key:8,width:"30",viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:e.color,class:"w-full h-full"},[jt],8,["stroke"])):"spinning-circles"==e.icon?(A(),C("svg",zt,[k("g",Ht,[k("g",{transform:"translate(2 1)",stroke:e.color,"stroke-width":"1.5"},[k("circle",{cx:"42.601",cy:"11.462",r:"5","fill-opacity":"1",fill:e.color},[Qt],8,["fill"]),k("circle",{cx:"49.063",cy:"27.063",r:"5","fill-opacity":"0",fill:e.color},[Wt],8,["fill"]),k("circle",{cx:"42.601",cy:"42.663",r:"5","fill-opacity":"0",fill:e.color},[Jt],8,["fill"]),k("circle",{cx:"27",cy:"49.125",r:"5","fill-opacity":"0",fill:e.color},[Xt],8,["fill"]),k("circle",{cx:"11.399",cy:"42.663",r:"5","fill-opacity":"0",fill:e.color},[Zt],8,["fill"]),k("circle",{cx:"4.938",cy:"27.063",r:"5","fill-opacity":"0",fill:e.color},[er],8,["fill"]),k("circle",{cx:"11.399",cy:"11.462",r:"5","fill-opacity":"0",fill:e.color},[tr],8,["fill"]),k("circle",{cx:"27",cy:"5",r:"5","fill-opacity":"0",fill:e.color},[rr],8,["fill"])],8,["stroke"])])])):"tail-spin"==e.icon?(A(),C("svg",sr,[k("defs",null,[k("linearGradient",ir,[k("stop",{"stop-color":e.color,"stop-opacity":"0",offset:"0%"},null,8,["stop-color"]),k("stop",{"stop-color":e.color,offset:"100%"},null,8,["stop-color"]),k("stop",{"stop-color":e.color,"stop-opacity":".631",offset:"63.146%"},null,8,["stop-color"])])]),k("g",ar,[k("g",nr,[cr,k("circle",{fill:e.color,cx:"36",cy:"18",r:"1"},[or],8,["fill"])])])])):"three-dots"==e.icon?(A(),C("svg",{key:11,width:"25",viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:e.color,class:"w-full h-full"},[lr,mr,dr],8,["fill"])):D("",!0)])};var ur=T({name:"GlobalTinySlider",directives:{slider:{mounted(e,{value:t}){((e,t)=>{e.tns=G(o({container:e,slideBy:"page",mouseDrag:!0,touch:!1,autoplay:!0,controls:!0,nav:!1,speed:500},t.options))})(e,t.props)},updated(e){(e=>{e.tns.destroy(),e.tns.rebuild()})(e)}}},props:{options:{type:Object,default:()=>({})},refKey:{type:String,default:null}},setup(e,t){const r=R();return P((()=>{(()=>{if(e.refKey){const t=U(`bind[${e.refKey}]`);t&&t(r.value)}})()})),l(o({props:e},t),{sliderRef:r})}});const pr={ref:"sliderRef",class:"tiny-slider"};ur.render=function(e,t,r,s,i,a){const n=Y("slider");return V((A(),C("div",pr,[q(e.$slots,"default")],512)),[[n,{props:e.props,emit:e.emit}]])};var gr=T({name:"GlobalTippyContent",props:{to:{type:String,default:"span"},options:{type:Object,default:()=>({})},refKey:{type:String,default:null}},setup(e){const t=R();return P((()=>{F(`[name="${e.to}"]`,o({plugins:[K],content:t.value,allowHTML:!0,arrow:j,popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport"}}]},animateFill:!1,animation:"shift-away",theme:"light",trigger:"click"},e.options)),(()=>{if(e.refKey){const r=U(`bind[${e.refKey}]`);r&&r(t.value)}})()})),{tippyRef:t}}});const yr={ref:"tippyRef"};gr.render=function(e,t,r,s,i,a){return A(),C("div",yr,[q(e.$slots,"default")],512)};var vr=T({name:"GlobalTippy",props:{show:{type:Boolean,default:!0},content:{type:String,required:!0},tag:{type:String,default:"span"},options:{type:Object,default:()=>({})},refKey:{type:String,default:null}},setup(e){const t=R(),r=()=>{F(t.value,o({plugins:[K],content:e.content,arrow:j,popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport"}}]},animateFill:!1,animation:"shift-away"},e.options))},s=()=>{if(e.refKey){const r=U(`bind[${e.refKey}]`);r&&r(t.value)}};return L((()=>e.show),(e=>{e&&(r(),s())})),P((()=>{r(),s()})),{tippyRef:t}}});vr.render=function(e,t,r,s,i,a){return e.show?(A(),C(z(e.tag),{key:0,ref:"tippyRef"},{default:w((()=>[q(e.$slots,"default")])),_:3},512)):(A(),C(z(e.tag),{key:1},{default:w((()=>[q(e.$slots,"default")])),_:3}))};var hr;(hr=$)("body").on("click",".copy-code",(function(){const e=hr(this).data("target");hr(e).find("textarea")[0].select(),hr(e).find("textarea")[0].setSelectionRange(0,99999),document.execCommand("copy")})),function(e){function t(){e(".metrics-dropdown-box").each((async function(){if(void 0!==e(this).attr("id")&&e(`[data-dropdown-replacer="${e(this).attr("id")}"]`).length&&void 0===e(this).data("dropdown-programmatically")){const t=e(this).attr("id");e(this).removeClass("show"),await setTimeout((()=>{e(`[data-dropdown-replacer="${t}"]`).replaceWith(this),e(this).removeAttr("style"),e(this).removeAttr("data-popper-placement")}),200)}else void 0!==e(this).attr("id")&&!e(`[data-dropdown-replacer="${e(this).attr("id")}"]`).length&&e(this).hasClass("show")&&void 0===e(this).data("dropdown-programmatically")?e(this).remove():"initiate"===e(this).data("dropdown-programmatically")?e(this).attr("data-dropdown-programmatically","showed"):"showed"===e(this).data("dropdown-programmatically")&&e(this).removeAttr("data-dropdown-programmatically")}))}function r(r){const s=e(r).find(".metrics-dropdown-box").first(),i=e(r).find(".metrics-dropdown-toggle"),a=e(r).data("placement")?e(r).data("placement"):"bottom-end",n=`_${Math.random().toString(36).substr(2,9)}`;t(),e(s).length&&("static"===e(r).css("position")&&e(r).css("position","relative"),e(s).css("width",e(s).css("width")),e(`<div data-dropdown-replacer="${n}"></div>`).insertAfter(s),e(s).attr("id",n).appendTo("body"),Q(i[0],s[0],{placement:a}),e(s).addClass("show"))}function s(t){if(e(t).find(".metrics-dropdown-box").length)e(t).find(".metrics-dropdown-box").attr("data-dropdown-programmatically","initiate");else{const t=e("[data-dropdown-replacer]").data("dropdown-replacer");e(`#${t}`).attr("data-dropdown-programmatically","initiate")}r(t)}e("body").on("click",(function(s){const i=e(s.target).closest(".metrics-dropdown"),a=e(i).find(".metrics-dropdown-toggle"),n=e(i).find(".metrics-dropdown-box").first(),c=e(s.target).closest(".metrics-dropdown-box").first(),o=e(s.target).data("dismiss");!e(i).length&&!e(c).length||e(a).length&&!e(n).length||"dropdown"===o?t():e(c).length||r(i)})),e.fn.dropdown=function(r){"show"===r?s(this):"hide"===r?t():"toggle"===r&&function(r){const i=e(r).find(".metrics-dropdown-box").first();e(i).length?s(r):t()}(this)}}($),function(e){const t=[];function r(){let t=52;return e(".modal").each((function(){"auto"!==e(this).css("z-index")&&e(this).css("z-index")>t&&(t=parseInt(e(this).css("z-index")))})),t}function s(t){if(void 0!==e(t)[0])return window.innerWidth-e(t)[0].clientWidth}function i(i){e(`<div data-modal-replacer="${e(i).attr("id")}"></div>`).insertAfter(i),e(i).css({"margin-top":0,"margin-left":0}),e(i).appendTo("body"),setTimeout((()=>{e(i).addClass("show").css("z-index",r()+1)}),200),e("body").css("padding-right",`${parseInt(e("body").css("padding-right"))+s("html")}px`).addClass("overflow-y-hidden"),e(".metrics-modal").removeClass("overflow-y-auto").css("padding-left","0px"),e(i).addClass("overflow-y-auto").css("padding-left",`${s(i)}px`).addClass(e(".metrics-modal.show").length?"metrics-modal__overlap":""),t.forEach((function(r,s){e(i).attr("id")===e(r.el).attr("id")&&"on.show"===r.event&&(t[s].triggerCallback=!0)}))}function a(i){e(i).hasClass("metrics-modal")&&e(i).hasClass("show")&&(e(i).removeClass("show"),setTimeout((()=>{e(i).removeAttr("style").removeClass("metrics-modal__overlap").removeClass("metrics-overflow-y-auto"),e(".metrics-modal").each((function(){parseInt(e(this).css("z-index"))===r()&&e(this).addClass("metrics-overflow-y-auto").css("padding-left",`${s(this)}px`)})),52===r()&&e("body").removeClass("metrics-overflow-y-hidden").css("padding-right",""),e(`[data-modal-replacer="${e(i).attr("id")}"]`).replaceWith(i)}),200),t.forEach((function(r,s){e(i).attr("id")===e(r.el).attr("id")&&"on.hide"===r.event&&(t[s].triggerCallback=!0)})))}e("body").on("click",'a[data-toggle="modal"]',(function(){i(e(this).attr("data-target"))})),e("body").on("click",(function(e){a(e.target)})),e("body").on("click",'[data-dismiss="modal"]',(function(){a(e(this).closest(".modal")[0])})),setInterval((function(){t.forEach((function(e,r){("on.show"===e.event&&e.triggerCallback||"on.hide"===e.event&&e.triggerCallback)&&(e.callback(),t[r].triggerCallback=!1)}))}),300),e.fn.modal=function(r,s){var n;"show"===r?i(this):"hide"===r?a(this):"toggle"===r?e(n=this).hasClass("metrics-modal")&&e(n).hasClass("show")?a(n):i(n):"on.show"===r?function(e,r){t[t.length]={el:e,event:"on.show",triggerCallback:!1,callback:r}}(this,s):"on.hide"===r&&function(e,r){t[t.length]={el:e,event:"on.hide",triggerCallback:!1,callback:r}}(this,s)}}($),function(e){e("body").on("click",'a[data-toggle="tab"]',(function(){e(this).closest(".nav-tabs").find('a[data-toggle="tab"]').removeClass("active"),e(this).addClass("active");const t=e(this).attr("data-target");e(t).closest(".tab-content").find(".tab-content__pane").removeClass("active"),e(t).addClass("active")}))}($);const{storePsMetrics:br}=window,fr=br.context.i18n.isoCode?br.context.i18n.isoCode:"",xr=Object.assign("settings"===br.context.app&&br.settings.translations?br.settings.translations:{},o({},"dashboard"!==br.context.app&&"metrics"!==br.context.app||!br.dashboard.translations?{}:br.dashboard.translations)),_r={};_r[fr]={currency:{style:"currency",currency:br.context.i18n.currencyIsoCode}};const Sr=W({locale:fr,messages:xr,numberFormats:_r,fallbackLocale:"en",globalInjection:!0});m.extend(J);var Tr=T({name:"TopBarButtonDate",setup(){const e=We(),t="metrics_preview"===te().name,{appContext:{config:{globalProperties:{$segment:r}}}}=re(),{t:s}=X(),i=Z((()=>e.state.main.slugButtonDate)),a=Z((()=>e.state.main.todayIsAccessible)),n=Z((()=>e.state.main.accounts.plan)),c=Z((()=>e.getters["main/IS_FIRST_ACCESS"])),d=Z((()=>e.getters["main/IS_FIRST_SYNC"])),u=Z((()=>e.getters["main/GET_IS_ADVANCED"])),p=Z((()=>{const e=new Date;return u.value||e.setDate(e.getDate()-1),e})),g=Z((()=>{const e=new Date;return u.value?(e.setMonth(e.getMonth()-14),e):(e.setMonth(e.getMonth()-3),e)})),y=R(null),v=Z((()=>{const t=e.state.main.dateRange;return"custom"===i.value&&(null==t?void 0:t.startDate)?`${m(t.startDate).locale(e.state.main.isoCode).format("LL")} - ${m(t.endDate).locale(e.state.main.isoCode).format("LL")}`:s("dates.custom")})),h=[{slug:"today",label:s("dates.today"),lessAccessible:"metrics-advanced",disableOnRoute:!0,displayedOnDashboard:!1,onPress:()=>b("today")},{slug:"yesterday",label:s("dates.yesterday"),lessAccessible:"metrics-free",disableOnRoute:!1,displayedOnDashboard:!0,onPress:()=>b("yesterday")},{slug:"7d",label:s("dates.7days"),lessAccessible:"metrics-free",disableOnRoute:!1,displayedOnDashboard:!0,onPress:()=>b("7d")},{slug:"30d",label:s("dates.30days"),lessAccessible:"metrics-free",disableOnRoute:!1,displayedOnDashboard:!0,onPress:()=>b("30d")},{slug:"3m",label:s("dates.3months"),lessAccessible:"metrics-free",disableOnRoute:!1,displayedOnDashboard:!1,onPress:()=>b("3m")},{slug:"6m",label:s("dates.6months"),lessAccessible:"metrics-advanced",disableOnRoute:!1,displayedOnDashboard:!1,onPress:()=>b("6m")},{slug:"custom",label:v,lessAccessible:"metrics-free",disableOnRoute:!1,displayedOnDashboard:!1,onPress:()=>{e.dispatch("main/SET_SLUG_BUTTON_DATE","custom"),e.dispatch("main/SET_ERROR_ON_KPI",!1),y.value.show()}}];P((()=>{const t=document.getElementById("metrics");b(e.getters["main/GET_SLUG_BUTTON_DATE"]),y.value=new ee({element:document.getElementById("top-bar-datepicker"),autoApply:!0,singleMode:!1,numberOfColumns:2,numberOfMonths:2,showWeekNumbers:!0,parentEl:t,maxDate:p.value,minDate:g.value,mobileFriendly:!0,lang:e.state.main.isoCode,dropdowns:{minYear:2010,maxYear:null,months:!0,years:!0},setup:t=>{t.on("selected",((t,r)=>{const s=m(t.dateInstance).locale(e.state.main.isoCode).format("YYYY-MM-DD"),i=m(r.dateInstance).locale(e.state.main.isoCode).format("YYYY-MM-DD");e.dispatch("main/SET_DATE_RANGE",{startDate:s,endDate:i})}))}})}));const b=t=>{r().track("[MTR] Overview Select Date",l(o({module:"ps_metrics"},e.getters["main/GET_USER_EMAIL"]&&{email:e.getters["main/GET_USER_EMAIL"]}),{slug:t}));const s=m();return{today:()=>{const r=s,i=s;e.dispatch("main/SET_SLUG_BUTTON_DATE",t),e.dispatch("main/SET_ERROR_ON_KPI",!1),e.dispatch("main/SET_DATE_RANGE",{startDate:r.locale(e.state.main.isoCode).format("YYYY-MM-DD"),endDate:i.locale(e.state.main.isoCode).format("YYYY-MM-DD")})},yesterday:()=>{const r=s.subtract(1,"day"),i=r;e.dispatch("main/SET_SLUG_BUTTON_DATE",t),e.dispatch("main/SET_ERROR_ON_KPI",!1),e.dispatch("main/SET_DATE_RANGE",{startDate:r.locale(e.state.main.isoCode).format("YYYY-MM-DD"),endDate:i.locale(e.state.main.isoCode).format("YYYY-MM-DD")})},"7d":()=>{const r=s.subtract(7,"day"),i=s.subtract(1,"day");e.dispatch("main/SET_SLUG_BUTTON_DATE",t),e.dispatch("main/SET_ERROR_ON_KPI",!1),e.dispatch("main/SET_DATE_RANGE",{startDate:r.locale(e.state.main.isoCode).format("YYYY-MM-DD"),endDate:i.locale(e.state.main.isoCode).format("YYYY-MM-DD")})},"30d":()=>{const r=s.subtract(30,"day"),i=s.subtract(1,"day");e.dispatch("main/SET_SLUG_BUTTON_DATE",t),e.dispatch("main/SET_ERROR_ON_KPI",!1),e.dispatch("main/SET_DATE_RANGE",{startDate:r.locale(e.state.main.isoCode).format("YYYY-MM-DD"),endDate:i.locale(e.state.main.isoCode).format("YYYY-MM-DD")})},"3m":()=>{const r=s.subtract(3,"month"),i=s.subtract(1,"day");e.dispatch("main/SET_SLUG_BUTTON_DATE",t),e.dispatch("main/SET_ERROR_ON_KPI",!1),e.dispatch("main/SET_DATE_RANGE",{startDate:r.locale(e.state.main.isoCode).format("YYYY-MM-DD"),endDate:i.locale(e.state.main.isoCode).format("YYYY-MM-DD")})},"6m":()=>{const r=s.subtract(6,"month"),i=s.subtract(1,"day");e.dispatch("main/SET_SLUG_BUTTON_DATE",t),e.dispatch("main/SET_ERROR_ON_KPI",!1),e.dispatch("main/SET_DATE_RANGE",{startDate:r.locale(e.state.main.isoCode).format("YYYY-MM-DD"),endDate:i.locale(e.state.main.isoCode).format("YYYY-MM-DD")})}}[t].call()},f=Z((()=>{if("metrics"===e.state.main.app)return h;let r=[];return h.forEach((e=>{(!t||t&&!0===e.displayedOnDashboard)&&r.push(e)})),r}));return{setDateRangeBySlugButton:b,slugButtonDate:i,plan:n,isAccessible:e=>"metrics-free"===e.lessAccessible||n.value===e.lessAccessible,isFirst:e=>"metrics-free"!==e.lessAccessible&&(c.value||d.value),isFirstAccess:c,isFirstSync:d,isAdvanded:u,isFirstAccessFn:e=>"metrics-free"!==e.lessAccessible&&c.value,isFirstSyncFn:e=>"metrics-free"!==e.lessAccessible&&d.value,isDisableOnRoute:e=>e.disableOnRoute&&!a.value,getDisplayedButtons:f,changeSelectDate:function(e){for(var t in h){const r=h[t];r.slug===e.target.value&&(y.value.hide(),r.onPress())}},clickSelectDate:function(e){if("custom"===e.target.value)for(var t in h){const r=h[t];r.slug===e.target.value&&r.onPress()}}}}});const Er={class:"metrics-hidden md:metrics-flex metrics-rounded-lg metrics-text-md",role:"group"},Cr={class:"metrics-flex metrics-items-center metrics-justify-center metrics-truncate"},kr=k("div",{id:"top-bar-datepicker",class:"metrics-w-0 metrics-p-0 metrics-border-none"},null,-1);Tr.render=function(e,t,r,s,i,a){const n=E("clock-icon"),c=E("tippy"),o=E("refresh-cw-icon"),l=E("lock-icon");return A(),C("div",null,[k("div",Er,[(A(!0),C(se,null,ie(e.getDisplayedButtons,((t,r)=>(A(),C("button",{disabled:!e.isAccessible(t)||e.isFirst(t)||e.isDisableOnRoute(t),key:t.slug,type:"button",class:["metrics-button-date metrics-border metrics-text-white",{"active  metrics-text-white metrics-border-theme-43 metrics-bg-theme-43 metrics-cursor-default":e.slugButtonDate===t.slug,"metrics-bg-white metrics-border-gray-400 metrics-text-gray-700 metrics-zoom-in-no-shadow ":e.slugButtonDate!==t.slug,"metrics-rounded-l-lg":0===r,"metrics-rounded-r-lg":r===e.getDisplayedButtons.length-1,"metrics-cursor-not-allowed":!e.isAccessible(t)||e.isFirst(t)||e.isDisableOnRoute(t)}],onClick:ae((e=>t.onPress()),["prevent"])},[k("span",Cr,[e.isFirstAccessFn(t)?(A(),C(c,{key:0,tag:"div",content:e.$t("advancedPlan.menuTooltipWait")},{default:w((()=>[k(n,{class:"metrics-w-4 metrics-h-4 metrics-mr-1"})])),_:1},8,["content"])):e.isFirstSyncFn(t)?(A(),C(c,{key:1,tag:"div",content:e.$t("advancedPlan.menuTooltipWait")},{default:w((()=>[k(o,{class:"metrics-w-4 metrics-h-4 metrics-mr-1"})])),_:1},8,["content"])):e.isAccessible(t)?e.isDisableOnRoute(t)?(A(),C(c,{key:3,tag:"div",content:e.$t("advancedPlan.menuTooltipTodayNotAccessible")},{default:w((()=>[k(l,{class:"metrics-w-4 metrics-h-4 metrics-mr-1"})])),_:1},8,["content"])):D("",!0):(A(),C(c,{key:2,tag:"div",content:e.$t("advancedPlan.menuTooltipLock")},{default:w((()=>[k(l,{class:"metrics-w-4 metrics-h-4 metrics-mr-1"})])),_:1},8,["content"])),ne(" "+ce("string"==typeof t.label?t.label:t.label.value),1)])],10,["disabled","onClick"])))),128)),kr]),k("select",{onChange:t[1]||(t[1]=t=>e.changeSelectDate(t)),onClick:t[2]||(t[2]=t=>e.clickSelectDate(t)),class:"metrics-appearance-none metrics-block md:metrics-hidden metrics-mb-0 metrics-py-2 metrics-px-4 metrics-pr-12 metrics-border-gray-400 metrics-border metrics-box metrics-text-base metrics-select-custom"},[(A(!0),C(se,null,ie(e.getDisplayedButtons,((t,r)=>(A(),C("option",{key:r,disabled:!e.isAccessible(t)||e.isFirst(t)||e.isDisableOnRoute(t),class:"metrics-button-date metrics-border metrics-text-black metrics-ml-auto",selected:e.slugButtonDate===t.slug,value:t.slug},ce("string"==typeof t.label?t.label:t.label.value),9,["disabled","selected","value"])))),128))],32)])};var wr=T({name:"CompareModeSwitcher",setup(){const e=We(),t=Z((()=>e.state.main.compareMode)),r=Z((()=>e.state.main.dateRangeTooLarge)),{appContext:{config:{globalProperties:{$segment:s}}}}=re();return{dateRangeTooLarge:r,compareMode:t,switchMode:()=>{s().track("[MTR] Overview Compare Mode",l(o({module:"ps_metrics"},e.getters["main/GET_USER_EMAIL"]&&{email:e.getters["main/GET_USER_EMAIL"]}),{value:!t.value})),e.dispatch("main/SET_COMPARE_MODE",!t.value)}}}});const Dr={class:"metrics-relative metrics-z-10 metrics-mt-8 metrics-mb-8 sm:metrics-mb-0"},Ar={class:"metrics-flex metrics-items-center"},Nr={id:"metrics-tour-compare-mode",class:"metrics-w-auto metrics-flex metrics-items-center metrics-m-auto sm:metrics-mr-0 sm:metrics-ml-auto metrics-mt-0"};wr.render=function(e,t,r,s,i,a){const n=E("Tippy");return A(),C("div",Dr,[k("div",Ar,[k("div",Nr,[k("div",{class:["metrics-mr-3 metrics-inline-flex",{"metrics-opacity-50":e.dateRangeTooLarge}]},ce(e.$t("compareMode.title")),3),e.dateRangeTooLarge?(A(),C(n,{key:0,tag:"div",content:e.$t("compareMode.dateRangeError"),class:{"metrics-opacity-50":e.dateRangeTooLarge}},{default:w((()=>[k("input",{class:"metrics-input metrics-input--switch metrics-border metrics-border-theme-43",type:"checkbox",checked:e.compareMode,disabled:e.dateRangeTooLarge,onClick:t[1]||(t[1]=(...t)=>e.switchMode&&e.switchMode(...t))},null,8,["checked","disabled"])])),_:1},8,["content","class"])):(A(),C("input",{key:1,class:"metrics-input metrics-input--switch metrics-border metrics-border-theme-43",type:"checkbox",checked:e.compareMode,disabled:e.dateRangeTooLarge,onClick:t[2]||(t[2]=(...t)=>e.switchMode&&e.switchMode(...t))},null,8,["checked","disabled"]))])])])};var Mr=T({name:"AlertConfigurationProblem",setup(){const e=We(),t=Z((()=>e.getters["main/GET_IS_ADVANCED"])),r=Z((()=>e.state.main.maxUserConnections<50&&!t.value)),s=Z((()=>e.state.main.links.faq)),i=Z((()=>e.state.main.errorOnKpi));return{errorConfiguration:Z((()=>r)).value,maxUserConnections:r,goToHelp:()=>{window.location.href=`${s.value}`},errorOnKpi:i}}});const Or={key:0,class:"metrics-relative metrics-pt-5 metrics-z-10"},Rr={class:"metrics-bg-indigo-100 metrics-border-l-4 metrics-border-theme-43 metrics-text-theme-43 metrics-p-4",role:"alert"},Pr={class:"metrics-font-bold"};Mr.render=function(e,t,r,s,i,a){const n=E("i18n-t");return e.errorConfiguration&&e.errorOnKpi?(A(),C("div",Or,[k("div",Rr,[k("p",Pr,ce(e.$t("boxalert.title")),1),k(n,{keypath:"boxalert.text"},oe({linktext:w((()=>[k("span",{class:"metrics-text-theme-43 metrics-cursor-pointer metrics-underline",onClick:t[1]||(t[1]=ae(((...t)=>e.goToHelp&&e.goToHelp(...t)),["prevent"]))},ce(e.$t("boxalert.link")),1)])),_:2},[e.maxUserConnections?{name:"typeerror",fn:w((()=>[ne(ce(e.$t("boxalert.maxUserConnections")),1)]))}:void 0]),1024)])])):D("",!0)};const Ir=(e,t)=>{let r=!1;return e.forEach((e=>{e.pageName!==t.name||e.ignore?!r&&e.subMenu&&(r=Ir(e.subMenu,t)):r=!0})),r},Br=(e,t)=>(e.forEach(((r,s)=>{if("string"!=typeof r){let i=e[s];i.active=(r.pageName===t.name||r.subMenu&&Ir(r.subMenu,t))&&!r.ignore,r.subMenu&&(i.activeDropdown=Ir(r.subMenu,t),i=o(o({},r),Br(r.subMenu,t)))}})),e),Lr=(e,t,r=!1)=>{e.subMenu?e.activeDropdown=!e.activeDropdown:r||t.push({name:e.pageName})};R(!1);const $r=le`query getRevenue($inputData: InputData!) {
  revenueGross(InputData: $inputData) {
    currentValue
    previousValue
  } 
}`,Gr=le`query getOrders($inputData: InputData!) {
  orderSum(InputData: $inputData) {
    currentValue
    previousValue
  }
}`,Ur=le`query getAbandonedCart($inputData: InputData!) {
  cartAbandonedAverage(InputData: $inputData) {
    currentValue
    previousValue
  } 
}`,Yr=le`query getAvgCartValue($inputData: InputData!) {
  orderAverage(InputData: $inputData) {
    currentValue
    previousValue
  } 
}`,Vr=le`query getSessions($inputData: InputData!) {
  sessions(InputData: $inputData) {
    currentValue,
    previousValue
  } 
}`,qr=le`query getUniqueUsers($inputData: InputData!) {
  uniqueUsers(InputData: $inputData) {
    currentValue,
    previousValue
  } 
}`,Fr=le`query getBounceRate($inputData: InputData!) {
  bounceRate(InputData: $inputData) {
    currentValue,
    previousValue
  } 
}`,Kr=le`query getAvgSessions($inputData: InputData!) {
  avgSessions(InputData: $inputData) {
    currentValue,
    previousValue
  } 
}`,jr=le`query getRevenue($inputData: InputData!) {
  revenueGrossGroupByDate(InputData: $inputData) {
    currentPeriod {
      currentValue
      date
    }
    previousPeriod {
      currentValue
      date
    }
  } 
}`,zr=le`
  query getSessions(
    $inputData: InputData!
    $granularity: String!
  ) {
    sessionsGroupByDate(
      InputData: $inputData,
      Granularity: $granularity
    ) {
      currentPeriod {
        currentValue
        date
      }
      previousPeriod {
        currentValue
        date
      }
    }
  }
`,Hr=le`
  # Your GraphQL query or mutation goes here
  query sessionsByCategories(
    $inputData: InputData!
    $limit: Float!
    $isoCode: String!
  ) {
    sessionsGroupByCategory(
      InputData: $inputData
      Limit: $limit
      IsoCode: $isoCode
    ) {
      categories {
        previousValue
        currentValue
        category
      }
      total {
        totalCurrent
        totalPrevious
      }
    }
  }
`,Qr=le`query getOrderAverage($inputData: InputData!) {
  orderAverage(InputData: $inputData) {
    currentValue
    previousValue
  }
}`,Wr=le`query getOrderAverageGroupByDate($inputData: InputData!) {
  orderAverageGroupByDate(InputData: $inputData) {
    currentPeriod {
      currentValue
      date
    }
    previousPeriod {
      currentValue
      date
    }
  }
}`,Jr=le`query getOrderSumGroupBySource($inputData: InputData!) {
  orderSumGroupBySource(InputData: $inputData) {
    currentPeriod {
      currentValue
      source
    }
    previousPeriod {
      currentValue
      source
    }
  }
}`,Xr=le`
  query getTopProduct(
    $inputData: InputData!
    $limit: Float!
    $isoCode: String!
  ) {
    productTopSeller(InputData: $inputData, Limit: $limit, IsoCode: $isoCode) {
      currentPeriod {
        id
        name
        quantity
        amount
      }
      previousPeriod {
        id
        name
        quantity
        amount
      }
    }
  }
`,Zr=le`
  query getTopOneProduct(
    $inputData: InputData!
    $limit: Float!
    $isoCode: String!
  ) {
    productTopSeller(InputData: $inputData, Limit: $limit, IsoCode: $isoCode) {
      currentPeriod {
        name
        quantity
        amount
      }
      previousPeriod {
        name
        quantity
        amount
      }
    }
  }
`,es=le`query getOrderSumGroupByDate($inputData: InputData!) {
    orderSumGroupByDate(InputData: $inputData) {
        currentPeriod {
            currentValue
            date
        }
        previousPeriod {
            currentValue
            date
        }
    }
}`,ts=le`
  query revenueByCategory($inputData: InputData!, $isoCode: String!) {
    revenueGrossByCategories(InputData: $inputData, IsoCode: $isoCode) {
      currentValue
      previousValue
      categoryId
      category
    }
  }
`,rs=le`
  # Your GraphQL query or mutation goes here
  query revenueDistribution($inputData: InputData!) {
    revenueDistribution(InputData: $inputData) {
      currentValue
      previousValue
      category
    }
  }
`,ss=le`subscription getAccount($shopId: String!) {
  accountUpgraded(shopId: $shopId) {
    shop_id,
    plan
  } 
}`,is=le`
  subscription getAccount($shopId: String!) {
    accountFirstSync(shopId: $shopId) {
      shop_id
      first_sync_asked_at
    }
  }
`,as=le`
  subscription getAccount($shopId: String!) {
    accountLastSync(shopId: $shopId) {
      shop_id
      last_sync_at
    }
  }
`,ns=le`
  subscription getAccount($shopId: String!) {
    accountStartSync(shopId: $shopId) {
      shop_id
      start_sync_at
    }
  }
`,cs=le`
  query getAccount($shopId: String!) {
    account(shopId: $shopId) {
      shop_id
      plan
      shop_url
      email_account
      last_sync_at
      first_sync_asked_at
      start_sync_at
    }
  }
`,os=le`query getConversionRate($inputData: InputData!) {
  conversionRate(InputData: $inputData) {
    currentValue,
    previousValue
  } 
}`,ls=le`query getTipsCards($category: String, $language: String) {
  tipscards(category: $category, language: $language) {
    uuid
    default_language
    title
    description
    language
    label
    redirect_url
  }
}`,ms=le`
  mutation setProductTourFreeDone($done: Boolean!) {
    setProductTourFreeDone(done: $done)
  }
`,ds=le`
  mutation setProductTourAdvancedDone($done: Boolean!) {
    setProductTourAdvancedDone(done: $done)
  }
`,us=le`
  query getOrders($inputData: InputData!) {
    orderCountPartNewCustomer(InputData: $inputData) {
      currentValue
      previousValue
    }
  }
`,ps=le`
  query getOrders($inputData: InputData!) {
    orderCountPartReturningCustomer(InputData: $inputData) {
      currentValue
      previousValue
    }
  }
`,gs=le`
  query getOrders($inputData: InputData!) {
    orderCountPartByCustomerCategory(InputData: $inputData) {
      currentValue
      previousValue
      category
    }
  }
`,ys=le`
    query revenueGrossGroupByPaymentsMethods($inputData: InputData!) {
    revenueGrossGroupByPaymentsMethods(InputData: $inputData) {
      currentValue,
      paymentMethod
    }
  }
`;var vs=T({components:{TopBarButtonDate:Tr,CompareModeSwitcher:wr,AlertConfigurationProblem:Mr},setup(){const{t:e}=X(),t=te(),r=pe(),s=We(),{appContext:{config:{globalProperties:{$segment:i}}}}=re(),a=R([]),n=Z((()=>Br(s.state.topMenu.menu,t))),c=R({shopId:s.state.main.accounts.shopID}),d=R({title:"",description:""}),u=Z((()=>s.state.main.fullscreen)),p=Z((()=>s.getters["main/GET_IS_ADVANCED"])),g=Z((()=>s.state.main.controllersLinks.metrics)),y=Z((()=>s.getters["main/PRODUCT_TOUR_DONE"])),{tourAdvanced:v,tourFree:h}=(e=>{const t={compareMode:{element:"#metrics-tour-compare-mode",popover:{title:e("tour.compareMode.title"),description:e("tour.compareMode.description")}},options:{element:"#metrics-tour-options",popover:{title:e("tour.options.title"),description:e("tour.options.description"),position:"left"}},panel:{element:".metrics-top-nav>ul",stageBackground:"white",popover:{title:e("tour.panels.title"),description:e("tour.panels.description")}},feedback:{element:"#metrics-tour-feedback",popover:{title:e("tour.feedback.title"),description:e("tour.feedback.description"),position:"top"}},tooltip:{element:"#metrics-tour-tips-card",popover:{title:e("tour.tips.title"),description:e("tour.tips.description"),position:"top"}}};return{tourFree:[{element:"#subtab-AdminStats",popover:{title:e("tour.start.title"),description:e("tour.start.description"),position:"right"},stageBackground:"#202226"},{element:".metrics-search",popover:{title:e("tour.daterange.title"),description:e("tour.daterange.description")}},t.options,t.panel,t.compareMode,{element:"#metrics-tour-box-upgrade",popover:{title:e("tour.advanced.title"),description:e("tour.advanced.description")}},t.feedback,l(o({},t.tooltip),{beforeSelect:()=>{setTimeout((()=>{$(".driver-next-btn").addClass("metrics-bg-theme-44 metrics-border-theme-44")}),500)}})],tourAdvanced:[{element:"#metrics-tour-start",popover:{title:e("tour.advanced_start.title"),description:e("tour.advanced_start.description")}},{element:".metrics-search",popover:{title:e("tour.advanced_daterange.title"),description:e("tour.advanced_daterange.description")}},t.panel,{element:"#metrics-tour-sync",popover:{title:e("tour.advanced_sync.title"),description:e("tour.advanced_sync.description")}},l(o({},t.feedback),{beforeSelect:()=>{setTimeout((()=>{$(".driver-next-btn").addClass("metrics-bg-theme-44 metrics-border-theme-44")}),500)}})]}})(e),b=R(!1),f=$("#metrics")[0],x=R(0),_=Z((()=>`metrics-bg-gray-248 metrics-z-50 metrics-shadow-md metrics--mx-3 sm:metrics--mx-8 metrics-px-3 sm:metrics-px-8 metrics-pt-0 sm:metrics-pt-0 metrics-pt-0 ${b.value?"metrics-relative metrics-mt-0":"metrics-sticky"} ${u.value?"metrics-top-0":"metrics-top-1"}`));let S=parseInt(function(){for(var e="metrics_visits=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var s=t[r];" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(e))return s.substring(e.length,s.length)}return""}());S||(S=0),S+=1,i().identify(s.state.main.accounts.shopID,{domain:s.state.main.shop.domain,name:s.state.main.user.email?s.state.main.user.email.split("@")[0]:"",email:s.state.main.user.email,language:s.state.main.isoCode,version_ps:s.state.main.version_ps,mtr_module_version:s.state.main.version_module,mtr_plan:s.state.main.accounts.plan,mtr_nb_visits:S,mtr_last_activity_date:m().format("YYYY-MM-DD"),mtr_connected:s.getters["main/PSX_IS_CONNECTED"],mtr_ga_connected:s.getters["main/GA_IS_CONNECTED"],mtr_product_tour_free:s.state.main.productTourFreeDone,mtr_product_tour_advanced:s.state.main.productTourAdvancedDone,mtr_product_tour_free_date:s.state.main.productTourFreeDoneDate,mtr_product_tour_advanced_date:s.state.main.productTourAdvancedDoneDate}),function(e){var t=new Date;t.setTime(t.getTime()+5184e6);var r="expires="+t.toUTCString();document.cookie="metrics_visits="+e+";"+r+";path=/"}(S);const{mutate:T,error:E}=me(ms),{mutate:C,error:k}=me(ds);L((()=>[E.value,k.value]),(([e,t])=>{if(!(x.value<3))throw e||t;e&&T({done:!0}),t&&C({done:!0}),x.value++})),L((()=>b.value),(e=>{e?f.classList.add("noscroll"):f.classList.remove("noscroll")}));const w=t=>{let r;r=void 0!==t?t:p.value?"metrics-advanced":"metrics-free",i().track("[MTR] Overview Metrics Start Tour",l(o({module:"ps_metrics"},s.getters["main/GET_USER_EMAIL"]&&{email:s.getters["main/GET_USER_EMAIL"]}),{tour:r}));const a={"metrics-free":h,"metrics-advanced":v},n=new ge({className:"metrics-box",stageBackground:"#f1f5f8",keyboardControl:!0,closeBtnText:e("tour.closeButton"),prevBtnText:e("tour.previousButton"),nextBtnText:e("tour.nextButton"),doneBtnText:e("tour.doneButton"),onHighlighted:e=>{var t=ye(a[r],(t=>$(t.element)[0]===e.getNode()));t&&t.beforeSelect&&t.beforeSelect()},onNext:e=>{ye(a[r],(t=>$(t.element)[0]===e.getNode()))&&i().track("[MTR] Overview Next Product Tour",l(o({module:"ps_metrics"},s.getters["main/GET_USER_EMAIL"]&&{email:s.getters["main/GET_USER_EMAIL"]}),{tour:r}))},onReset:()=>{b.value=!1,window.scrollTo(0,0),"metrics-advanced"===r?C({done:!0}):T({done:!0})}});if(b.value=!0,f.scroll(0,0),!a[r]){b.value=!1;const t=e("tour.noTourForPlanAvailable",r);throw new Error(t)}n.defineSteps(a[r]),setTimeout((()=>{n.start()}),0)};P((()=>{const e=y.value;(!e||"metrics-free"===e&&!0===p.value)&&setTimeout((()=>{w(p.value?"metrics-advanced":"metrics-free")}),2e3)}));const D=Z((()=>s.state.main.todayIsAccessible)),A=Z((()=>s.getters["main/GET_SLUG_BUTTON_DATE"])),{result:N}=de(ss,c,{fetchPolicy:"network-only",clientId:"paidClient"}),{result:M}=de(is,c,{fetchPolicy:"network-only",clientId:"paidClient"}),{result:O}=de(as,c,{fetchPolicy:"network-only",clientId:"paidClient"}),{result:I}=de(ns,c,{fetchPolicy:"network-only",clientId:"paidClient"}),B=Z((()=>s.state.main.links.faq)),G=Z((()=>s.state.main.links.settings)),U=function(){for(var e="1f7f8a936d0bf02d1a36ae49bb4f010c=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var s=t[r];" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(e))return s.substring(e.length,s.length)}return""}();if(U){const e=JSON.parse(U);s.dispatch("main/SET_ACCOUNT",e)}else{localStorage.clear();const{result:e,loading:t,error:r}=ue(cs,c,{fetchPolicy:"network-only",clientId:"paidClient"});L(e,(e=>{s.dispatch("main/SET_ACCOUNT",e.account),function(e){var t=new Date;t.setTime(t.getTime()+864e5);var r="expires="+t.toUTCString();document.cookie="1f7f8a936d0bf02d1a36ae49bb4f010c="+JSON.stringify(e)+";"+r+";path=/"}(e.account)}))}L(N,(e=>{s.dispatch("main/SET_PLAN",e.accountUpgraded)})),L(M,(e=>{s.dispatch("main/SET_FIRST_SYNC",e.accountFirstSync.first_sync_asked_at)})),L(O,(e=>{s.dispatch("main/SET_LAST_SYNC",e.accountLastSync.last_sync_at)})),L(I,(e=>{s.dispatch("main/SET_START_SYNC",e.accountStartSync.start_sync_at)})),L(Z((()=>t.path)),(()=>{a.value=mt.toRaw(n.value)})),P((()=>{a.value=mt.toRaw(n.value)}));const Y=R(!1),V=e=>D.value&&e.isDisabledOnToday&&"today"===A.value;return{formattedMenu:a,router:r,linkTo:Lr,goToHelp:()=>{window.location.href=`${B.value}`},goToSettings:()=>{i().track("[MTR] Overview Go To Settings",o({module:"ps_metrics"},s.getters["main/GET_USER_EMAIL"]&&{email:s.getters["main/GET_USER_EMAIL"]})),window.location.href=`${G.value}`},toggleFullscreen:()=>{i().track("[MTR] Overview Full Screen",l(o({module:"ps_metrics"},s.getters["main/GET_USER_EMAIL"]&&{email:s.getters["main/GET_USER_EMAIL"]}),{fullScreen:!u.value})),Y.value||(Y.value=!0,s.dispatch("main/TOGGLE_FULLSCREEN",!u.value),window.location.href=`${g.value}&fullscreen=${u.value}`)},fullscreen:u,startTour:w,showTourText:d,topBarClasses:_,isDisabled:V,changeSelectNav:function(e,t){for(var r in a.value){const s=a.value[r];s.title===e.target.value&&Lr(s,t,V(s))}}}}}),hs="/modules/ps_metrics/views/assets/logo-ps-metrics.7e5c2dc7.png",bs="/modules/ps_metrics/views/assets/icon-ps-metrics.61b9cf11.png";const fs={class:"metrics-h-screen"},xs={class:"metrics-top-bar-boxed metrics-flex metrics-items-center"},_s=k("span",{id:"metrics-tour-start"},[k("img",{alt:"Prestashop Metrics",class:"metrics-h-7 metrics-hidden xl:metrics-flex",src:hs}),k("img",{alt:"Prestashop Metrics",class:"metrics-h-7 metrics-flex xl:metrics-hidden",src:bs})],-1),Ss={class:"\n            metrics-intro-x metrics-relative metrics-ml-auto metrics-mr-auto\n          "},Ts={class:"metrics-search metrics-block"},Es={class:"\n                sm:metrics-ml-auto\n                metrics-mt-0 metrics-relative metrics-text-gray-700\n                dark:metrics-text-gray-300\n              "},Cs={id:"metrics-tour-options",class:"metrics-flex metrics-items-center"},ks={class:"\n              metrics-intro-x metrics-relative metrics-mr-2 metrics-ml-2\n              lg:metrics-mr-1\n              xl:metrics-mr-2\n              lg:metrics-ml-1\n              xl:metrics-ml-2\n              metrics-cursor-pointer metrics-hidden\n              lg:metrics-block\n            "},ws={class:"\n              metrics-intro-x metrics-relative metrics-mr-2 metrics-ml-2\n              lg:metrics-mr-1\n              xl:metrics-mr-2\n              lg:metrics-ml-1\n              xl:metrics-ml-2\n              metrics-cursor-pointer metrics-hidden\n              lg:metrics-block\n            "},Ds={class:"\n              metrics-intro-x metrics-relative metrics-mr-2 metrics-ml-2\n              lg:metrics-mr-1\n              xl:metrics-mr-2\n              lg:metrics-ml-1\n              xl:metrics-ml-2\n              metrics-cursor-pointer\n            "},As={class:"metrics-pt-0 metrics-top-nav metrics-z-0"},Ns={class:"metrics-hidden md:metrics-flex"},Ms={class:"metrics-top-menu__title"},Os={class:"metrics-top-menu__title"},Rs={class:"metrics-content metrics-z-0"};vs.render=function(e,t,r,s,i,a){const n=E("router-link"),c=E("top-bar-button-date"),o=E("maximize-icon"),l=E("minimize-icon"),m=E("tippy"),d=E("help-circle-icon"),u=E("settings-icon"),p=E("alert-configuration-problem"),g=E("compare-mode-switcher"),y=E("chevron-down-icon"),v=E("router-view");return A(),C("div",fs,[k("div",{id:"metrics-tour-topbar",class:e.topBarClasses},[k("div",xs,[k(n,{tag:"a",to:"/",class:"metrics--intro-x metrics-flex metrics-mr-0 xl:metrics-mr-5"},{default:w((()=>[_s])),_:1}),k("div",Ss,[k("div",Ts,[k("div",Es,[k(c)])])]),k("span",Cs,[k("div",ks,[k(m,{tag:"span",content:e.$t("menuDropdown.fullscreen")},{default:w((()=>[e.fullscreen?(A(),C(l,{key:1,onClick:t[2]||(t[2]=ae((t=>e.toggleFullscreen()),["prevent"]))})):(A(),C(o,{key:0,onClick:t[1]||(t[1]=ae((t=>e.toggleFullscreen()),["prevent"]))}))])),_:1},8,["content"])]),k("div",ws,[k(m,{tag:"span",content:e.$t("menuDropdown.faq")},{default:w((()=>[k(d,{onClick:t[3]||(t[3]=ae((t=>e.startTour()),["prevent"]))})])),_:1},8,["content"])]),k("div",Ds,[k(m,{tag:"span",content:e.$t("menuDropdown.settings")},{default:w((()=>[k(u,{onClick:t[4]||(t[4]=ae((t=>e.goToSettings()),["prevent"]))})])),_:1},8,["content"])])])])],2),k(p),k(g),k("nav",As,[k("ul",Ns,[(A(!0),C(se,null,ie(e.formattedMenu,((t,r)=>(A(),C("li",{key:r},[e.isDisabled(t)?(A(),C(m,{key:0,tag:"span",content:e.$t("advancedPlan.menuTooltipMenuOnTodayNotAccessible"),refKey:t.pageName},{default:w((()=>[k("a",{href:"javascript:;",class:["metrics-top-menu",{"metrics-top-menu--active":t.active,"metrics-cursor-not-allowed":e.isDisabled(t)}],onClick:r=>e.linkTo(t,e.router,e.isDisabled(t))},[k("div",Ms,[ne(ce(e.$t(t.title))+" ",1),t.subMenu?(A(),C(y,{key:0,class:"metrics-top-menu__sub-icon"})):D("",!0)])],10,["onClick"])])),_:2},1032,["content","refKey"])):(A(),C("a",{key:1,href:"javascript:;",class:["metrics-top-menu",{"metrics-top-menu--active":t.active,"metrics-cursor-not-allowed":e.isDisabled(t)}],onClick:r=>e.linkTo(t,e.router,e.isDisabled(t))},[k("div",Os,[ne(ce(e.$t(t.title))+" ",1),t.subMenu?(A(),C(y,{key:0,class:"metrics-top-menu__sub-icon"})):D("",!0)])],10,["onClick"]))])))),128))]),k("select",{onChange:t[5]||(t[5]=t=>e.changeSelectNav(t,e.router)),class:"metrics-appearance-none metrics-bg-gray-248 metrics-block md:metrics-hidden metrics-py-2 metrics-px-4 metrics-pr-12 metrics-box metrics-border-none metrics-shadow-none metrics-rounded-b-none metrics-text-sm metrics-select-custom"},[(A(!0),C(se,null,ie(e.formattedMenu,((t,r)=>(A(),C("option",{key:r,disabled:e.isDisabled(t),selected:t.active,value:t.title},ce(e.$t(t.title)),9,["disabled","selected","value"])))),128))],32)]),k("div",Rs,[k(v)])])};var Ps=T({components:{},setup(){P((()=>{$("body").removeClass("app").removeClass("login").addClass("error-page")}))}});const Is={class:"container"},Bs={class:"\n        error-page\n        flex flex-col\n        lg:flex-row\n        items-center\n        justify-center\n        h-screen\n        text-center\n        lg:text-left\n      "},Ls={class:"-intro-x lg:mr-20"},$s=ve('<div class="text-white mt-10 lg:mt-0"><div class="intro-x text-8xl font-medium">404</div><div class="intro-x text-xl lg:text-3xl font-medium mt-5"> Oops. This page has gone missing. </div><div class="intro-x text-lg mt-3"> You may have mistyped the address or the page may have moved. </div><button class="\n            intro-x\n            button button--lg\n            border border-white\n            dark:border-dark-5 dark:text-gray-300\n            mt-10\n          "> Back to Home </button></div>',1);Ps.render=function(e,t,r,s,i,a){return A(),C("div",Is,[k("div",Bs,[k("div",Ls,[k("img",{alt:"RxD Tailwind HTML Admin Template",class:"h-48 lg:h-auto",src:require("@/assets/images/error-illustration.svg")},null,8,["src"])]),$s])])};var Gs=T({name:"LoaderBoxNumber"});const Us={class:"metrics-grid metrics-grid-cols-4 metrics-gap-1 metrics-h-full"},Ys=ve('<div class="metrics-col-span-1 metrics-h-8 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-col-span-2 metrics-h-3"></div><div class="metrics-h-3 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse metrics-items-start"></div><div class="metrics-h-6 metrics-col-span-2 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse metrics-mt-3"></div><div class="metrics-col-span-3 metrics-h-1"></div><div class="metrics-col-span-3 metrics-h-3 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div>',6);Gs.render=function(e,t,r,s,i,a){return A(),C("div",Us,[Ys])};var Vs=T({name:"BoxAnalyticsMustBeLinked",props:{horizontal:{type:Boolean,default:!1},largeIcon:{type:Boolean,default:!1}},setup(){const e=he();return{linkToSettings:()=>{window.location=e.state.main.configurationLink}}}}),qs="/modules/ps_metrics/views/assets/oh.678b5724.svg";const Fs={class:"metrics-flex metrics-h-full metrics-w-full metrics-items-center metrics-justify-center"},Ks={class:"metrics-w-full"},js={class:"metrics-justify-center metrics-flex metrics-mb-5"},zs={class:"metrics-mt-3 metrics-intro-x"},Hs={class:"metrics-text-center metrics-text-gray-777 metrics-text-xs"};Vs.render=function(e,t,r,s,i,a){const n=E("i18n-t");return A(),C("div",null,[k("div",Fs,[k("div",Ks,[k("div",{class:["metrics-intro-x",{"metrics-float-left metrics-pl-6":e.horizontal}]},[k("div",js,[k("img",{alt:"Prestashop Metrics",class:e.largeIcon?"metrics-w-20":"metrics-w-10",src:qs},null,2)])],2),k("div",zs,[k("div",Hs,[k(n,{keypath:"error.analyticsSentence"},{linktext:w((()=>[k("span",{class:"metrics-text-theme-43 metrics-cursor-pointer metrics-underline",onClick:t[1]||(t[1]=(...t)=>e.linkToSettings&&e.linkToSettings(...t))},ce(e.$t("error.analyticsSentenceLink")),1)])),_:1})])])])])])};var Qs=T({name:"ReportNumber",props:{result:{type:Object,default:()=>({})},isCurrency:{type:Boolean,default:!1},isPercent:{type:Boolean,default:!1},isTime:{type:Boolean,default:!1},tippyContentKey:{type:String,default:"boxNumber.revenueGross"},icon:{type:String,default:"ShoppingCartIcon"},title:{type:String,default:""},positiveIsLower:{type:Boolean,default:!1}},setup:function(e){const t=We(),r=Z((()=>t.state.main.compareMode)),s=Z((()=>e.result.currentValue)),i=Z((()=>e.result.previousValue)),a=Z((()=>Math.round(100*(parseFloat(s.value)+Number.EPSILON))/100)),n=Z((()=>s.value-i.value)),c=Z((()=>Math.round(100*(n.value+Number.EPSILON))/100)),o=Z((()=>{let t;return t=i.value>=1?e.isPercent?Number(s.value-i.value):Number((s.value-i.value)/i.value*100):Number(100*s.value),Math.round(100*(t+Number.EPSILON))/100})),l=Z((()=>{const e=o.value;return(e<0?-1*e:e).toFixed(0)})),m=Z((()=>{const t=Math.sign(o.value);return e.positiveIsLower?t<=0:t>=0})),{t:d}=X(),u=Z((()=>{let e=l.value+"% ";return e+=m.value?d("boxNumber.higher"):d("boxNumber.lower"),e+=" "+d("boxNumber.thanLastPeriod"),e}));return{formatTime:e=>{const t=~~(e/3600),r=~~(e%3600/60),s=~~e%60;let i="";return t>0&&(i+=t+":"+(r<10?"0":"")),i+=r+"'"+(s<10?"0":""),i+=s+"''",i},currentValue:s,previousValue:i,percentCompare:o,isPositive:m,compareMode:r,diffValue:n,diffValueClean:c,percentCompareAbsolute:l,currentValueClean:a,tippyContent:u}}}),Ws="/modules/ps_metrics/views/assets/google-analytics.1156bc74.png";const Js={class:"metrics-flex"},Xs={key:0,class:"metrics-report-box__icon",src:Ws,alt:"logo google analytics"},Zs={key:1,class:"metrics-ml-auto  metrics-flex metrics-items-center"},ei={class:"metrics-text-2xl metrics-font-bold dark:metrics-text-theme-white metrics-mt-3"},ti={class:"metrics-text-gray-777 metrics-flex metrics-justify-between metrics-items-center metrics-relative metrics-h-5"},ri={class:"metrics-truncate metrics-ellipsis metrics-bg-white metrics-top-0 metrics-pr-1.5 hover:metrics-overflow-visible hover:metrics-absolute"},si={class:"metrics-flex metrics-justify-self-end metrics-ml-auto "};Qs.render=function(e,t,r,s,i,a){const n=E("ArrowUpRightIcon"),c=E("ArrowDownRightIcon"),o=E("Tippy"),l=E("InfoIcon");return A(),C("div",null,[k("div",Js,["AnalyticsIcon"===e.icon?(A(),C("img",Xs)):D("",!0),e.compareMode?(A(),C("div",Zs,[k(o,{tag:"div",class:[" metrics-report-box__indicator metrics-cursor-pointer metrics-m-0 metrics-p-0 sm:metrics-text-xs metrics-text-lg",e.isPositive?"metrics-text-theme-44":"metrics-text-theme-45"],content:e.tippyContent},{default:w((()=>[e.isTime?D("",!0):(A(),C(se,{key:0},[ne(ce(e.diffValue>0?"+":" ")+" "+ce(e.isCurrency?e.$n(e.diffValueClean,"currency"):e.isPercent?`${e.diffValueClean.toFixed(0)} pt`:e.diffValueClean),1)],64)),e.isPositive?(A(),C(n,{key:1,class:"metrics-w-4 metrics-h-4 metrics-ml-2"})):(A(),C(c,{key:2,class:"metrics-w-4 metrics-h-4 metrics-ml-2"})),e.isPercent?D("",!0):(A(),C(se,{key:3},[ne(ce(e.percentCompareAbsolute)+"% ",1)],64))])),_:1},8,["class","content"])])):D("",!0)]),k("div",ei,ce(e.isCurrency?e.$n(e.currentValue,"currency"):e.isPercent?`${e.currentValueClean} %`:e.isTime?e.formatTime(e.currentValue):e.currentValueClean),1),k("div",ti,[k("span",ri,ce(e.title),1),k("div",si,[k(o,{tag:"div",content:e.$t(e.tippyContentKey)},{default:w((()=>[k(l,{class:"metrics-h-auto  metrics-w-5 lg:metrics-w-3 "})])),_:1},8,["content"])])])])};var ii=T({name:"ReportNumber",props:{isCurrency:{type:Boolean,default:!1},isPercent:{type:Boolean,default:!1},isTime:{type:Boolean,default:!1},tippyContentKey:{type:String,default:"boxNumber.revenueGross"},icon:{type:String,default:"ShoppingCartIcon"},title:{type:String,default:""},positiveIsLower:{type:Boolean,default:!1}},setup:function(e){const t=We(),r=Z((()=>t.state.main.compareMode)),s=Z((()=>be.datatype.number(1e4))),i=Z((()=>be.datatype.number(5e3))),a=Z((()=>Math.round(100*(parseFloat(s.value)+Number.EPSILON))/100)),n=Z((()=>s.value-i.value)),c=Z((()=>Math.round(100*(n.value+Number.EPSILON))/100)),o=Z((()=>{let t;return t=i.value>=1?e.isPercent?Number(s.value-i.value):Number((s.value-i.value)/i.value*100):Number(100*s.value),Math.round(100*(t+Number.EPSILON))/100})),l=Z((()=>{const e=o.value;return(e<0?-1*e:e).toFixed(0)})),m=Z((()=>{const t=Math.sign(o.value);return e.positiveIsLower?t<=0:t>=0})),{t:d}=X(),u=Z((()=>{let e=l.value+"% ";return e+=m.value?d("boxNumber.higher"):d("boxNumber.lower"),e+=" "+d("boxNumber.thanLastPeriod"),e}));return{formatTime:e=>{const t=~~(e/3600),r=~~(e%3600/60),s=~~e%60;let i="";return t>0&&(i+=t+":"+(r<10?"0":"")),i+=r+"''"+(s<10?"0":""),i+=s+"'",i},currentValue:s,previousValue:i,percentCompare:o,isPositive:m,compareMode:r,diffValue:n,diffValueClean:c,percentCompareAbsolute:l,currentValueClean:a,tippyContent:u}}});const ai={class:"metrics-flex"},ni={key:0,class:"metrics-report-box__icon",src:Ws,alt:"logo google analytics"},ci={key:1,class:"metrics-ml-auto  metrics-flex metrics-items-center"},oi={key:0,class:"metrics-blur-md"},li={key:3,class:"metrics-blur-md"},mi={class:"metrics-text-2xl metrics-font-bold dark:metrics-text-theme-white metrics-mt-3 metrics-blur-md"},di={class:"metrics-text-gray-777 metrics-flex metrics-justify-between metrics-items-center metrics-relative metrics-h-5"},ui={class:"metrics-truncate metrics-ellipsis metrics-bg-white metrics-top-0 metrics-pr-1.5 hover:metrics-overflow-visible hover:metrics-absolute"},pi={class:"metrics-flex metrics-justify-self-end metrics-ml-auto "};ii.render=function(e,t,r,s,i,a){const n=E("ArrowUpRightIcon"),c=E("ArrowDownRightIcon"),o=E("InfoIcon"),l=E("Tippy");return A(),C("div",null,[k("div",ai,["AnalyticsIcon"===e.icon?(A(),C("img",ni)):D("",!0),e.compareMode?(A(),C("div",ci,[k("div",{class:["metrics-report-box__indicator metrics-cursor-pointer metrics-m-0 metrics-p-0",e.isPositive?"metrics-text-theme-44":"metrics-text-theme-45"]},[e.isTime?D("",!0):(A(),C("span",oi,ce(e.diffValue>0?"+":" ")+" "+ce(e.isCurrency?e.$n(e.diffValueClean,"currency"):e.isPercent?`${e.diffValueClean.toFixed(0)} pt`:e.diffValueClean),1)),e.isPositive?(A(),C(n,{key:1,class:"metrics-w-4 metrics-h-4 metrics-ml-2"})):(A(),C(c,{key:2,class:"metrics-w-4 metrics-h-4 metrics-ml-2"})),e.isPercent?D("",!0):(A(),C("span",li,ce(e.percentCompareAbsolute)+"%",1))],2)])):D("",!0)]),k("div",mi,ce(e.isCurrency?e.$n(e.currentValue,"currency"):e.isPercent?`${e.currentValueClean} %`:e.isTime?e.formatTime(e.currentValue):e.currentValueClean),1),k("div",di,[k("span",ui,ce(e.title),1),k("div",pi,[k(l,{tag:"div",content:e.$t(e.tippyContentKey)},{default:w((()=>[k(o,{class:"metrics-w-3 metrics-h-auto"})])),_:1},8,["content"])])])])};var gi=T({name:"BoxError",props:{retry:{type:Function,default:()=>1},horizontal:{type:Boolean,default:!1},largeIcon:{type:Boolean,default:!1}},setup(e){We().dispatch("main/SET_ERROR_ON_KPI",!0);return{launchRetry:function(){e.retry()}}}});const yi={class:"metrics-flex metrics-h-full metrics-w-full metrics-items-center metrics-justify-center"},vi={class:"metrics-justify-center metrics-flex metrics-mb-5"},hi={class:"metrics-mt-3 metrics-intro-x"},bi={class:"metrics-text-center metrics-text-gray-777"},fi={class:"metrics-text-xs"},xi={class:"metrics-text-xs metrics-mt-1"};gi.render=function(e,t,r,s,i,a){return A(),C("div",null,[k("div",yi,[k("div",{class:["metrics-w-full",{"metrics-h-28 metrics-pt-4":e.horizontal}]},[k("div",{class:["metrics-intro-x",{"metrics-float-left metrics-pl-6":e.horizontal}]},[k("div",vi,[k("img",{alt:"Prestashop Metrics",class:e.largeIcon?"metrics-w-20":"metrics-w-10",src:qs},null,2)])],2),k("div",hi,[k("div",bi,[k("div",fi,ce(e.$t("error.sentence")),1),k("div",xi,[k("span",{class:" metrics-text-theme-43 metrics-cursor-pointer metrics-underline metrics-m-auto",onClick:t[1]||(t[1]=ae(((...t)=>e.launchRetry&&e.launchRetry(...t)),["prevent"]))},ce(e.$t("error.button")),1)])])])],2)])])};var _i=T({name:"ReportBoxNumber",props:{title:{type:String,default:""},query:{type:Object,default:()=>({})},dimension:{type:String,default:"revenueGross"},isCurrency:{type:Boolean,default:!1},isPercent:{type:Boolean,default:!1},isTime:{type:Boolean,default:!1},faker:{type:Boolean,default:!1},tippyContentKey:{type:String,default:"boxNumber.revenueGross"},icon:{type:String,default:"ShoppingCartIcon"},mustBeGoogleLinked:{type:Boolean,default:!1},positiveIsLower:{type:Boolean,default:!1}},components:{LoaderBoxNumber:Gs,BoxAnalyticsMustBeLinked:Vs,BoxError:gi,ReportNumber:Qs,FakerReportNumber:ii},setup:function(e){const t=We(),r=Z((()=>t.getters["main/GET_VARIABLES_QUERY"])),s=Z((()=>t.getters["main/GET_OPTIONS_QUERY"]));if(e.faker)return{faker:!0,result:[!0]};const{result:i,loading:a,error:n,refetch:c}=ue(e.query,r,s.value),o=Z((()=>e.mustBeGoogleLinked&&!t.getters["main/HAS_GOOGLE_ACCOUNT"]));return{result:fe(i,0,(t=>t[e.dimension])),loading:a,error:n,refetch:c,showAnalyticsLinkBox:o}}});const Si={key:0,class:"metrics-box metrics-p-5 metrics-border-theme-5 metrics-border"},Ti={key:1,class:"metrics-box metrics-p-5 metrics-border-theme-5 metrics-border"},Ei={key:2,class:"metrics-box metrics-p-5 metrics-h-full metrics-w-full metrics-border-theme-5 metrics-border"},Ci={key:3,class:"metrics-box metrics-p-5 metrics-h-full metrics-border-theme-5 metrics-border"};_i.render=function(e,t,r,s,i,a){const n=E("BoxAnalyticsMustBeLinked"),c=E("LoaderBoxNumber"),o=E("BoxError"),l=E("FakerReportNumber"),m=E("ReportNumber");return A(),C("div",{key:e.title,class:"metrics-report-box metrics-h-full"},[e.showAnalyticsLinkBox?(A(),C("div",Si,[k(n)])):e.loading?(A(),C("div",Ti,[k(c)])):e.error?(A(),C("div",Ei,[k(o,{retry:e.refetch},null,8,["retry"])])):e.result?(A(),C("div",Ci,[e.faker?(A(),C(l,{key:0,icon:e.icon,isCurrency:e.isCurrency,isPercent:e.isPercent,isTime:e.isTime,title:e.title,tippyContentKey:e.tippyContentKey,positiveIsLower:e.positiveIsLower},null,8,["icon","isCurrency","isPercent","isTime","title","tippyContentKey","positiveIsLower"])):(A(),C(m,{key:1,icon:e.icon,isCurrency:e.isCurrency,isPercent:e.isPercent,isTime:e.isTime,result:e.result,title:e.title,tippyContentKey:e.tippyContentKey,positiveIsLower:e.positiveIsLower},null,8,["icon","isCurrency","isPercent","isTime","result","title","tippyContentKey","positiveIsLower"]))])):D("",!0)])};var ki=T({name:"BoxUpgradePlanModal",props:{canBeClosed:{type:Boolean,default:!1}},setup(){const e=he(),t=Z((()=>e.getters["main/IS_FIRST_ACCESS"]));return{isFirstSync:Z((()=>e.getters["main/IS_FIRST_SYNC"])),isFirstAccess:t,closeModal:()=>{e.dispatch("main/SET_PLAN_MODAL_OPENED",!1)},registerAdvancedplan:()=>{window.location=e.state.main.configurationLink}}}});const wi={class:"metrics-bg-blur-md metrics-top-0 metrics-bottom-0 metrics-left-0 metrics-right-0 metrics-z-50 metrics-absolute metrics-col-span-12 md:metrics-col-span-6 xl:metrics-col-span-12 xxl:metrics-col-span-12 xl:metrics-col-start-1 xl:metrics-row-start-1 xxl:metrics-col-start-auto xxl:metrics-row-start-auto metrics-mt-3"},Di={class:"metrics-flex metrics-h-full metrics-w-full metrics-items-start metrics-mt-20 metrics-justify-center"},Ai={class:"metrics-box metrics-grid metrics-box-border-gradient metrics-p-8"},Ni={class:"metrics-intro-x"},Mi={class:"metrics-justify-center metrics-flex metrics-mb-5"},Oi={key:0,class:"metrics-flex metrics-items-center metrics-text-theme-43"},Ri={class:"metrics-ml-3 metrics-font-bold metrics-text-center"},Pi={key:1,class:"metrics-flex metrics-items-center metrics-text-theme-43"},Ii={class:"metrics-ml-3 metrics-font-bold metrics-text-center"},Bi={class:"metrics-mt-2 metrics-intro-x metrics-px-8"},Li={class:"metrics-my-2 metrics-text-center metrics-text-gray-777"},$i={class:"metrics-text-xs metrics-truncate"},Gi={class:"metrics-text-xs metrics-truncate"};ki.render=function(e,t,r,s,i,a){const n=E("xIcon"),c=E("ClockIcon"),o=E("RefreshCwIcon");return A(),C("div",wi,[k("div",Di,[k("div",Ai,[k("div",Ni,[e.canBeClosed?(A(),C("span",{key:0,onClick:t[1]||(t[1]=t=>e.closeModal())},[k(n,{class:"metrics-w-6 metrics-h-6 metrics-w-1 metrics-float-right metrics-top-0  metrics-cursor-pointer"})])):D("",!0),k("div",Mi,[e.isFirstAccess?(A(),C("div",Oi,[k(c,{class:"metrics-w-5"}),k("h2",Ri,ce(e.$t("advancedPlan.sync.scheduled")),1)])):D("",!0),e.isFirstSync?(A(),C("div",Pi,[k(o,{class:"metrics-w-5"}),k("h2",Ii,ce(e.$t("advancedPlan.sync.syncing")),1)])):D("",!0)])]),k("div",Bi,[k("div",Li,[k("div",$i,ce(e.$t("advancedPlan.sync.sentence1")),1),k("div",Gi,ce(e.$t("advancedPlan.sync.sentence2")),1)])])])])])};var Ui=T({name:"BoxUpgradePlanModal",props:{canBeClosed:{type:Boolean,default:!1}},setup(){const e=he(),{appContext:{config:{globalProperties:{$segment:t}}}}=re();return{closeModal:()=>{e.dispatch("main/SET_PLAN_MODAL_OPENED",!1)},registerAdvancedplan:()=>{t().track("[MTR] Overview Upgrade Plan",o({module:"ps_metrics"},e.getters["main/GET_USER_EMAIL"]&&{email:e.getters["main/GET_USER_EMAIL"]})),window.location=e.state.main.controllersLinks.plans}}}});const Yi={class:"metrics-bg-blur-md metrics-top-0 metrics-bottom-0 metrics-left-0 metrics-right-0 metrics-z-50 metrics-absolute metrics-col-span-12 md:metrics-col-span-6 xl:metrics-col-span-12 xxl:metrics-col-span-12 xl:metrics-col-start-1 xl:metrics-row-start-1 xxl:metrics-col-start-auto xxl:metrics-row-start-auto metrics-mt-3"},Vi={class:"metrics-flex metrics-h-full metrics-w-full metrics-items-start metrics-mt-20 metrics-justify-center"},qi={class:"metrics-box metrics-grid metrics-box-border-gradient md:metrics-p-8 metrics-p-2"},Fi={class:"metrics-intro-x"},Ki={class:"metrics-justify-center metrics-flex metrics-mb-5 metrics-mx-5"},ji={key:1,class:"metrics-font-bold metrics-text-center"},zi={key:2,class:"metrics-font-bold metrics-text-center"},Hi={class:"metrics-mt-2 metrics-intro-x metrics-px-8"},Qi={class:"metrics-my-2"},Wi={class:"metrics-font-medium metrics-truncate"},Ji={class:"metrics-text-justify metrics-mt-1"},Xi={class:"metrics-m-5 metrics-list-disc"},Zi={class:"metrics-font-medium metrics-flex metrics-mt-5"};Ui.render=function(e,t,r,s,i,a){const n=E("xIcon"),c=E("lockIcon");return A(),C("div",Yi,[k("div",Vi,[k("div",qi,[k("div",Fi,[e.canBeClosed?(A(),C("span",{key:0,onClick:t[1]||(t[1]=t=>e.closeModal())},[k(n,{class:"metrics-w-6 metrics-h-6 metrics-w-1 metrics-float-right metrics-top-0 metrics-cursor-pointer"})])):D("",!0),k("div",Ki,[k(c,{class:"metrics-w-10 metrics-h-10 metrics-w-1"})]),e.canBeClosed?(A(),C("h2",zi,ce(e.$t("advancedPlan.upgradeModal.modalTitleUpgrade")),1)):(A(),C("h2",ji,ce(e.$t("advancedPlan.upgradeModal.modalTitle")),1))]),k("div",Hi,[k("div",Qi,[k("div",Wi,ce(e.$t("advancedPlan.upgradeModal.header")),1),k("div",Ji,[k("ul",Xi,[k("li",null,ce(e.$t("advancedPlan.upgradeModal.listitem.1")),1),k("li",null,ce(e.$t("advancedPlan.upgradeModal.listitem.2")),1),k("li",null,ce(e.$t("advancedPlan.upgradeModal.listitem.3")),1)]),ne(" "+ce(e.$t("advancedPlan.upgradeModal.footer")),1)]),k("div",Zi,[k("button",{type:"button",class:"metrics-button metrics-zoom-in metrics-button--lg metrics-border metrics-bg-theme-43 metrics-border-theme-43 dark:metrics-border-dark-5 metrics-text-white metrics-m-auto",onClick:t[2]||(t[2]=(...t)=>e.registerAdvancedplan&&e.registerAdvancedplan(...t))},ce(e.$t("advancedPlan.upgradeModal.button")),1)])])])])])])};var ea=T({name:"BoxUpgradePlan",setup(){const e=he(),t="metrics_preview"===te().name,r=Z((()=>e.state.main.newVersionAvailable)),{appContext:{config:{globalProperties:{$segment:s}}}}=re();return{isOnDashboard:t,openUpgradePlanModal:()=>{s().track("[MTR] Overview Upgrade Plan",o({module:"ps_metrics"},e.getters["main/GET_USER_EMAIL"]&&{email:e.getters["main/GET_USER_EMAIL"]})),window.location=e.state.main.controllersLinks.plans},newVersionAvailable:r}}});const ta={key:0,class:"metrics-intro-x metrics-flex metrics-items-center metrics-h-10"},ra={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-auto"},sa={class:"metrics-mt-2 metrics-intro-x"},ia={class:"metrics-box metrics-bg-white metrics-box-border-gradient metrics-text-center"},aa={class:"metrics-p-5"},na={class:"metrics-font-medium metrics-text-gray-777"},ca={class:"metrics-text-center metrics-mt-1 metrics-flex metrics-justify-center"},oa={class:"metrics-m-auto metrics-mt-5 metrics-text-gray-777 metrics-w-42"},la={class:"metrics-mb-3"},ma={class:"metrics-mb-3"},da={class:"metrics-font-medium metrics-flex metrics-mt-5"};ea.render=function(e,t,r,s,i,a){return A(),C("div",{id:"metrics-tour-box-upgrade",class:["metrics-col-span-12 sm:metrics-col-span-6 md:metrics-col-span-4 xxl:metrics-col-start-auto xxl:metrics-row-start-auto sm:metrics-mt-0",e.isOnDashboard?"md:metrics-col-span-6":"xxl:metrics-col-span-12"]},[e.isOnDashboard?D("",!0):(A(),C("div",ta,[k("h2",ra,ce(e.$t("advancedPlan.advancedPlan")),1)])),k("div",sa,[k("div",ia,[k("div",aa,[k("div",na,ce(e.$t("advancedPlan.upgrade.header")),1),k("div",ca,[k("ul",oa,[k("li",la,ce(e.$t("advancedPlan.upgrade.listitem.1")),1),k("li",ma,ce(e.$t("advancedPlan.upgrade.listitem.2")),1),k("li",null,ce(e.$t("advancedPlan.upgrade.listitem.3")),1)])]),k("div",da,[k("button",{type:"button",onClick:t[1]||(t[1]=(...t)=>e.openUpgradePlanModal&&e.openUpgradePlanModal(...t)),class:"metrics-button metrics-zoom-in metrics-button--lg metrics-border metrics-bg-theme-43 metrics-border-theme-43 dark:metrics-border-dark-5 metrics-text-white metrics-m-auto"},ce(e.$t("advancedPlan.upgrade.button")),1)])])])])],2)};var ua=T({name:"BoxSynchronization",setup(){const e=We(),t="metrics_preview"===te().name,{appContext:{config:{globalProperties:{$segment:r}}}}=re(),{t:s}=X(),i=Z((()=>e.getters["main/GET_SYNC_STATUS"])),a=Z((()=>({scheduled:()=>(r().track("[MTR] Overview Status Sync Scheduled",o({module:"ps_metrics"},e.getters["main/GET_USER_EMAIL"]&&{email:e.getters["main/GET_USER_EMAIL"]})),{class:"metrics-text-theme-43",text:s("advancedPlan.sync.scheduled")}),done:()=>(r().track("[MTR] Overview Status Sync Done",o({module:"ps_metrics"},e.getters["main/GET_USER_EMAIL"]&&{email:e.getters["main/GET_USER_EMAIL"]})),{class:"metrics-text-green-500",text:s("advancedPlan.sync.done")}),syncing:()=>(r().track("[MTR] Overview Status Sync Syncing",o({module:"ps_metrics"},e.getters["main/GET_USER_EMAIL"]&&{email:e.getters["main/GET_USER_EMAIL"]})),{class:"metrics-text-theme-43",text:s("advancedPlan.sync.syncing")})}[i.value].call()))),n=Z((()=>{const t=e.state.main.accounts.last_sync_at;if(-1===e.state.main.accounts.last_sync_at)return!1;const r=m(t).locale(e.state.main.isoCode).format("LL");return(m().isAfter(m(t),"day")||m().isSame(m(t),"day"))&&e.dispatch("main/SET_LAST_SYNC",t),r})),c=Z((()=>e.state.main.accounts.next_sync_at||-1===e.state.main.accounts.next_sync_at?1===e.state.main.accounts.next_sync_at?m().add(1,"day").startOf("day").locale(e.state.main.isoCode).format("LLLL"):m(e.state.main.accounts.next_sync_at).locale(e.state.main.isoCode).format("LLLL"):m(e.state.main.accounts.next_sync_at).add(1,"day").startOf("day").locale(e.state.main.isoCode).format("LLLL")));return{isOnDashboard:t,openUpgradePlanModal:()=>{e.dispatch("main/SET_PLAN_MODAL_OPENED",!0)},statusClass:a,syncStatus:i,lastSync:n,nextSync:c}}});const pa={key:0,class:"metrics-intro-x metrics-flex metrics-items-center metrics-h-10"},ga=k("h2",{class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-auto metrics-flex"},[k("span",null,"Plan"),k("div",{class:"metrics-ml-4 metrics-font-normal metrics-text-sm metrics-text-white metrics-box metrics-pt-1 metrics-pb-1 metrics-pl-4 metrics-pr-4 metrics-bg-gradient-to-r metrics-from-yellow-400 metrics-to-pink-500"}," ADVANCED ")],-1),ya={class:"metrics-mt-2 metrics-intro-x"},va={class:"metrics-box metrics-bg-white metrics-box-border-gradient metrics-text-center"},ha={class:"metrics-p-5"},ba={class:"metrics-pb-10 metrics-text-sm metrics-text-gray-777 metrics-flex metrics-justify-center metrics-items-center"},fa={class:"metrics-mt-1 metrics-pb-10"},xa={class:"metrics-flex metrics-items-center metrics-justify-center"},_a={class:"metrics-text-sm metrics-text-gray-777"},Sa={class:"metrics-pb-5 metrics-font-semibold metrics-text-sm"},Ta={class:"metrics-text-xs metrics-text-gray-777"};ua.render=function(e,t,r,s,i,a){const n=E("InfoIcon"),c=E("Tippy"),o=E("CheckCircleIcon"),l=E("ClockIcon"),m=E("RefreshCwIcon");return A(),C("div",{id:"metrics-tour-sync",class:["metrics-col-span-12 sm:metrics-col-span-6 md:metrics-col-span-4 xl:metrics-col-start-auto xl:metrics-row-start-auto xxl:metrics-col-start-auto xxl:metrics-row-start-auto sm:metrics-mt-0 xxl:metrics-mt-2",e.isOnDashboard?"md:metrics-col-span-6":"xxl:metrics-col-span-12"]},[e.isOnDashboard?D("",!0):(A(),C("div",pa,[ga])),k("div",ya,[k("div",va,[k("div",ha,[k("div",ba,[k("span",null,ce(e.$t("advancedPlan.sync.statusTitle")),1),k(c,{tag:"div",class:"metrics-text-sm",content:e.$t("advancedPlan.sync.statusTooltip")},{default:w((()=>[k(n,{class:"metrics-w-5 lg:metrics-w-3 metrics-ml-1"})])),_:1},8,["content"])]),k("div",fa,[k("span",xa,[k("span",{class:["metrics-text-base metrics-font-medium",e.statusClass.class]},[V(k(o,{key:"done",class:["metrics-m-auto metrics-mb-2 metrics-h-6",e.statusClass.class]},null,8,["class"]),[[xe,"done"===e.syncStatus]]),V(k(l,{key:"scheduled",class:["metrics-m-auto metrics-mb-2 metrics-h-6",e.statusClass.class]},null,8,["class"]),[[xe,"scheduled"===e.syncStatus]]),V(k(m,{key:"syncing",class:["metrics-m-auto metrics-mb-2 metrics-h-6",e.statusClass.class]},null,8,["class"]),[[xe,"syncing"===e.syncStatus]]),ne(" "+ce(e.statusClass.text),1)],2)])]),e.lastSync?(A(),C(se,{key:0},[k("div",_a,ce(e.$t("advancedPlan.sync.lastSync")),1),k("div",Sa,ce(e.lastSync),1)],64)):D("",!0),k("div",Ta,ce(e.$t("advancedPlan.sync.nextSync"))+" "+ce(e.nextSync),1)])])])],2)};var Ea=T({name:"BoxNextFeatures",setup(){const e=We(),t="metrics_preview"===te().name,{appContext:{config:{globalProperties:{$segment:r}}}}=re();return{isOnDashboard:t,goToFeedback:()=>{r().track("[MTR] Overview Open Next Features",o({module:"ps_metrics"},e.getters["main/GET_USER_EMAIL"]&&{email:e.getters["main/GET_USER_EMAIL"]})),window.open("https://portal.productboard.com/prestashop/1-prestashop-feedback-the-place-to-share-your-feedback-on-prestashop-s-next-features/tabs/11-prestashop-metrics","_blank")}}}});const Ca={key:0,class:"metrics-intro-x metrics-flex metrics-items-center metrics-h-10"},ka={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-auto"},wa={class:"metrics-mt-2 metrics-intro-x"},Da={class:"metrics-box metrics-border-theme-5 metrics-border"},Aa={class:"metrics-p-5"},Na={class:"metrics-flex metrics-justify-center metrics-text-sm metrics-m-0"},Ma={class:"metrics-text-gray-777 metrics-flex"},Oa={class:"metrics-m-auto metrics-mt-3 metrics-mb-0"},Ra={class:"metrics-flex metrics-my-3 metrics-items-center"},Pa={class:"metrics-flex metrics-my-3 metrics-items-center"},Ia={class:"metrics-flex metrics-my-3 metrics-items-center"},Ba={class:"metrics-font-medium metrics-flex metrics-mt-3"};Ea.render=function(e,t,r,s,i,a){const n=E("MailIcon"),c=E("UploadIcon"),o=E("ActivityIcon");return A(),C("div",{id:"metrics-tour-feedback",class:["metrics-col-span-12 sm:metrics-col-span-6 md:metrics-col-span-4 xxl:metrics-col-start-auto xxl:metrics-row-start-auto sm:metrics-mt-0",e.isOnDashboard?"md:metrics-col-span-6":"xxl:metrics-col-span-12"]},[e.isOnDashboard?D("",!0):(A(),C("div",Ca,[k("h2",ka,ce(e.$t("nextfeatures.title")),1)])),k("div",wa,[k("div",Da,[k("div",Aa,[k("h2",Na,ce(e.$t("nextfeatures.comingSoon")),1),k("div",Ma,[k("ul",Oa,[k("li",null,[k("span",Ra,[k(n,{class:"metrics-mr-3 metrics-w-5"}),ne(" "+ce(e.$t("nextfeatures.weekly")),1)])]),k("li",null,[k("span",Pa,[k(c,{class:"metrics-mr-3 metrics-w-5"}),ne(ce(e.$t("nextfeatures.export")),1)])]),k("li",null,[k("span",Ia,[k(o,{name:"ActivityIcon",class:"metrics-mr-3 metrics-w-5"}),ne(ce(e.$t("nextfeatures.newKpi")),1)])])])]),k("div",Ba,[k("button",{type:"button",class:"metrics-button metrics-button--md metrics-border metrics-bg-white hover:metrics-bg-theme-43 metrics-border-theme-43 dark:metrics-border-dark-5 metrics-text-theme-43 hover:metrics-text-white metrics-m-auto",onClick:t[1]||(t[1]=(...t)=>e.goToFeedback&&e.goToFeedback(...t))},ce(e.$t("nextfeatures.feedbackButton")),1)])])])])],2)};var La=T({props:{canBeClosed:{type:Boolean,default:!0},canScrollBody:{type:Boolean,default:!0},name:{type:String,default:"modal-dialog"}},setup(e,{emit:t}){const r=R(null),s=()=>{t("ModalClose")};return _e(r,(()=>{e.canBeClosed&&(s(),t("ModalClose"))})),{closeModal:s,modal:r}}});const $a={class:"metrics-flex metrics-h-full metrics-items-center metrics-justify-center metrics-shadow-xl metrics-overflow-auto"},Ga={class:"metrics-box metrics-max-h-full lg:metrics-w-6/12 metrics-p-8 metrics-box-border metrics-overflow-auto metrics-w-11/12",ref:"modal"},Ua={class:"metrics-intro-x"},Ya={class:"metrics-justify-center metrics-flex metrics-mb-5 metrics-mx-5"},Va={class:"metrics-mt-2 metrics-intro-x lg:metrics-px-8 metrics-px-2"},qa={class:"metrics-my-2 metrics-text-center metrics-text-gray-777"},Fa={class:"metrics-font-medium metrics-flex metrics-mt-5"};La.render=function(e,t,r,s,i,a){const n=E("xIcon");return A(),C("div",{id:e.name,class:"metrics-bg-blur-md metrics-modal metrics-top-0 metrics-bottom-0 metrics-left-0 metrics-right-0 metrics-z-50 metrics-fixed metrics-col-span-12 md:metrics-col-span-6 xl:metrics-col-span-12 xxl:metrics-col-span-12 xl:metrics-col-start-1 xl:metrics-row-start-1 xxl:metrics-col-start-auto xxl:metrics-row-start-auto metrics-mt-3"},[k("div",$a,[k("div",Ga,[k("div",Ua,[e.canBeClosed?(A(),C("span",{key:0,onClick:t[1]||(t[1]=t=>e.closeModal())},[k(n,{class:"metrics-w-6 metrics-h-6 metrics-w-1 metrics-float-right metrics-top-0 metrics-cursor-pointer"})])):D("",!0),k("div",Ya,[q(e.$slots,"header")]),k("div",Va,[k("div",qa,[q(e.$slots,"default")]),k("div",Fa,[q(e.$slots,"footer")])])])],512)])],8,["id"])};var Ka=T({name:"LoaderBoxTipscards"});const ja={class:"metrics-grid metrics-grid-cols-4 metrics-gap-1 metrics-h-full metrics-p-5"},za=ve('<div class="metrics-col-span-12 metrics-h-4 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-20 metrics-col-span-12 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse metrics-mt-4"></div><div class="metrics-col-span-1 metrics-h-4 metrics-bg-gray-400 metrics-animate-pulse metrics-mt-1"></div><div class="metrics-col-span-2 metrics-h-4 "></div><div class="metrics-col-span-9 metrics-h-4 metrics-bg-gray-400 metrics-animate-pulse metrics-mt-1"></div>',5);Ka.render=function(e,t,r,s,i,a){return A(),C("div",ja,[za])};var Ha=T({name:"BoxNoData",props:{retry:{type:Function,default:()=>1},horizontal:{type:Boolean,default:!1},tipscards:{type:Boolean,default:!1},largeIcon:{type:Boolean,default:!1}}});const Qa={class:"metrics-flex metrics-h-full metrics-w-full metrics-items-center metrics-justify-center"},Wa={class:"metrics-justify-center metrics-flex metrics-mb-5"},Ja={class:"metrics-mt-3 metrics-intro-x"},Xa={class:"metrics-text-xs"};Ha.render=function(e,t,r,s,i,a){return A(),C("div",null,[k("div",Qa,[k("div",{class:["metrics-w-full",{"metrics-mt-4":e.horizontal}]},[k("div",{class:["metrics-intro-x",{"metrics-float-left metrics-pl-6":e.horizontal}]},[k("div",Wa,[k("img",{alt:"Prestashop Metrics",class:e.largeIcon?"metrics-w-20":"metrics-w-10",src:qs},null,2)])],2),k("div",Ja,[k("div",{class:["metrics-text-center metrics-text-gray-777",{"metrics-mt-8":e.horizontal}]},[k("div",Xa,[e.tipscards?(A(),C(se,{key:0},[ne(ce(e.$t("nodata.noTipscard")),1)],64)):(A(),C(se,{key:1},[ne(ce(e.$t("nodata.sentence")),1)],64))])],2)])],2)])])};var Za=T({components:{BoxNoData:Ha,ModalDialog:La,LoaderBoxTipscards:Ka,BoxError:gi},name:"BoxTipsCard",props:{query:{type:Object,default:()=>({})},dimension:{type:String,default:"tipscards"},label:{type:String,default:null},additionnalQueryParams:{type:Object,default:()=>({label:""})}},setup(e){const t=We(),r=Z((()=>o({},e.additionnalQueryParams))),s=R(),i=R({title:"",description:"",label:"",redirect_url:""}),{appContext:{config:{globalProperties:{$segment:a}}}}=re();N("bind[importantNotesRef]",(e=>{s.value=e}));const{result:n,loading:c,error:l,refetch:m}=ue(e.query,r,{fetchPolicy:"network-only",clientId:"paidClient"});return{result:n,loading:c,error:l,refetch:m,tipscards:fe(n,[],(t=>t[e.dimension])),sliderOptions:{prevButton:"#tipscardsprev",nextButton:"#tipscardsnext",autoHeight:!0,autoplayTimeout:1e4},description:e=>e.substring(0,150)+"...",selectedTipscard:i,selectTipsCard:e=>{a().track("[MTR] Overview Selected Tips Cards",o(o({module:"ps_metrics"},e),t.getters["main/GET_USER_EMAIL"]&&{email:t.getters["main/GET_USER_EMAIL"]})),$("#modal-tipscard").modal("show"),i.value=o({},e)},goToAddons:e=>{a().track("[MTR] Overview Tips Go To Addons",o(o({module:"ps_metrics"},t.getters["main/GET_USER_EMAIL"]&&{email:t.getters["main/GET_USER_EMAIL"]}),e))},closeModal:()=>{$("#modal-tipscard").modal("hide")},formatTipsCardNumber:function(e,t){return parseFloat(e)+1+"/"+t}}}});const en={id:"metrics-tour-tips-card",class:"\n      metrics-col-span-12\n      sm:metrics-col-span-6\n      md:metrics-col-span-4\n      xxl:metrics-col-span-12\n      xxl:metrics-col-start-auto\n      xxl:metrics-row-start-auto\n      sm:metrics-mt-0\n    "},tn={class:"metrics-intro-x metrics-flex metrics-items-center metrics-h-10"},rn={class:"\n          metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-auto\n        "},sn={class:"\n            metrics-slick-navigator\n            metrics-button\n            metrics-px-2\n            metrics-border\n            metrics-border-gray-400\n            dark:metrics-border-dark-5\n            metrics-flex metrics-items-center metrics-text-gray-700\n            dark:metrics-text-gray-600\n            metrics-mr-2\n          ",id:"tipscardsprev"},an={class:"\n            metrics-slick-navigator\n            metrics-button\n            metrics-px-2\n            metrics-border\n            metrics-border-gray-400\n            dark:metrics-border-dark-5\n            metrics-flex metrics-items-center metrics-text-gray-700\n            dark:metrics-text-gray-600\n          ",id:"tipscardsnext"},nn={class:"metrics-mt-2 metrics-intro-x"},cn={key:0,class:"metrics-box metrics-border-theme-5 metrics-border"},on={key:1,class:"metrics-box metrics-border-theme-5 metrics-border"},ln={class:"metrics-p-5"},mn={key:2,class:"metrics-box metrics-border-theme-5 metrics-border"},dn={class:"metrics-p-5"},un={key:3,class:"metrics-box metrics-border-theme-5 metrics-border"},pn={class:"metrics-text-small metrics-font-medium"},gn={class:"metrics-font-medium metrics-flex metrics-mt-5"},yn={class:"metrics-text-gray-777"},vn={class:"metrics-text-lg metrics-font-medium metrics-mb-3"},hn={class:"\n            metrics-flex metrics-items-center metrics-justify-end metrics-w-full\n          "};Za.render=function(e,t,r,s,i,a){const n=E("ChevronLeftIcon"),c=E("ChevronRightIcon"),o=E("LoaderBoxTipscards"),l=E("BoxError"),m=E("BoxNoData"),d=E("TinySlider"),u=E("ModalDialog");return A(),C("div",en,[k("div",tn,[k("h2",rn,ce(e.$t("tipscards.boxTitle")),1),!e.loading&&e.tipscards.length>0?(A(),C(se,{key:0},[k("button",sn,[k(n,{class:"metrics-w-4 metrics-h-4"})]),k("button",an,[k(c,{class:"metrics-w-4 metrics-h-4"})])],64)):D("",!0)]),k("div",nn,[e.loading?(A(),C("div",cn,[k(o)])):e.error?(A(),C("div",on,[k("div",ln,[k(l)])])):0==e.tipscards.length?(A(),C("div",mn,[k("div",dn,[k(m,{tipscards:!0})])])):!e.loading&&e.tipscards.length>0?(A(),C("div",un,[k(d,{refKey:"importantNotesRef",options:e.sliderOptions},{default:w((()=>[(A(!0),C(se,null,ie(e.tipscards,((t,r,s)=>(A(),C("div",{class:"metrics-p-5",key:s},[k("div",pn,ce(t.title),1),k("div",{class:"metrics-text-gray-777 metrics-text-justify metrics-mt-4",innerHTML:e.description(t.description)},null,8,["innerHTML"]),k("div",gn,[k("div",yn,ce(e.formatTipsCardNumber(r,e.tipscards.length)),1),k("button",{type:"button",onClick:r=>e.selectTipsCard(t),class:"\n                  metrics-button metrics-button--sm\n                  metrics-border metrics-border-gray-300\n                  dark:metrics-border-dark-5\n                  metrics-text-gray-777 metrics-ml-auto\n                "},ce(e.$t("tipscards.viewTip")),9,["onClick"])])])))),128))])),_:1},8,["options"])])):D("",!0)]),k(u,{onModalClose:e.closeModal,name:"modal-tipscard"},{header:w((()=>[k("h2",vn,ce(e.selectedTipscard.title),1)])),footer:w((()=>[k("div",hn,[e.selectedTipscard.redirect_url?(A(),C("a",{key:0,href:e.selectedTipscard.redirect_url,onClick:t[1]||(t[1]=t=>e.goToAddons(e.selectedTipscard)),target:"_blank",class:"\n              metrics-button\n              metrics-zoom-in\n              metrics-border\n              metrics-bg-theme-43\n              metrics-border-theme-43\n              dark:metrics-border-dark-5\n              metrics-text-white\n            "},ce(e.$t("tipscards.showModuleButton")),9,["href"])):D("",!0)])])),default:w((()=>[k("div",{class:"metrics-max-w-xl metrics-m-auto metrics-text-left",innerHTML:e.selectedTipscard.description},null,8,["innerHTML"])])),_:1},8,["onModalClose"])])};var bn=T({name:"BoxNewVersion",setup(){const e=We(),t="metrics_preview"===te().name,r=R(!1),s=Z((()=>e.state.main.newVersionAvailable));return{isOnDashboard:t,loading:r,goToUpgrade:()=>{r.value=!0,localStorage.clear(),window.location.href=e.state.main.controllersLinks.upgrade},newVersionAvailable:s}}});const fn={key:0,class:"metrics-intro-x metrics-flex metrics-items-center metrics-h-10"},xn={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-auto"},_n={class:"metrics-mt-2 metrics-intro-x"},Sn={class:"metrics-box metrics-border-theme-5 metrics-border"},Tn={class:"metrics-p-5"},En={class:"metrics-text-dark metrics-text-center"},Cn={class:"metrics-relative metrics-h-9 metrics-w-9 metrics-m-auto metrics-mb-5 metrics-pt-2"},kn=k("div",{class:"metrics-bg-theme-45 metrics-rounded-full metrics-h-2.5 metrics-w-2.5 metrics-absolute metrics-top-3.5 metrics-right-2"},null,-1),wn={class:"metrics-font-medium metrics-flex metrics-mt-5"};bn.render=function(e,t,r,s,i,a){const n=E("BellIcon"),c=E("LoaderIcon");return e.newVersionAvailable?(A(),C("div",{key:0,class:["metrics-col-span-12 sm:metrics-col-span-6 md:metrics-col-span-4 xxl:metrics-col-start-auto xxl:metrics-row-start-auto sm:metrics-mt-0 xxl:metrics-mt-5",e.isOnDashboard?"md:metrics-col-span-6":"xxl:metrics-col-span-12"]},[e.isOnDashboard?D("",!0):(A(),C("div",fn,[k("h2",xn,ce(e.$t("newversionavailable.title")),1)])),k("div",_n,[k("div",Sn,[k("div",Tn,[k("div",En,[k("div",Cn,[kn,k(n,{class:" metrics-text-theme-43 metrics-shake metrics-h-7 metrics-w-7 metrics-m-auto metrics-mt-2"})]),ne(" "+ce(e.$t("newversionavailable.description")),1)]),k("div",wn,[k("button",{type:"button",class:"metrics-m-auto metrics-button metrics-zoom-in metrics-border metrics-bg-theme-43 metrics-border-theme-43 dark:metrics-border-dark-5 metrics-text-white",onClick:t[1]||(t[1]=(...t)=>e.goToUpgrade&&e.goToUpgrade(...t))},[e.loading?(A(),C(c,{key:0,class:"metrics-w-5 metrics-spin-slow"})):(A(),C(se,{key:1},[ne(ce(e.$t("newversionavailable.button")),1)],64))])])])])])],2)):D("",!0)};var Dn=T({name:"BoxModuleUpgraded",setup(){const e=We(),t=Z((()=>e.state.main.moduleUpgraded)),r=Z((()=>e.state.main.version_module)),s=R(!1);return{moduleUpgraded:t,currentVersion:r,CloseBox:()=>{s.value=!0},forceClose:s}}});const An={key:0,class:"metrics-col-span-12 sm:metrics-col-span-6  md:metrics-col-span-4 xxl:metrics-col-span-12 sm:metrics-mt-0"},Nn=k("div",{class:"metrics-intro-x metrics-flex metrics-items-center"},null,-1),Mn={class:"metrics-mt-5 metrics-intro-x"},On={class:"metrics-box metrics-border metrics-border-theme-44"},Rn={class:"metrics-p-5"},Pn={class:"metrics-text-dark metrics-text-center"},In={class:"metrics-relative metrics-h-9 metrics-w-9 metrics-m-auto metrics-mb-5 metrics-pt-2"},Bn={class:"metrics-font-bold metrics-mt-2"},Ln=k("div",{class:"metrics-font-medium metrics-flex metrics-mt-5"},null,-1);Dn.render=function(e,t,r,s,i,a){const n=E("xIcon"),c=E("CheckCircleIcon");return e.moduleUpgraded&&!e.forceClose?(A(),C("div",An,[Nn,k("div",Mn,[k("div",On,[k("div",Rn,[k("div",Pn,[k(n,{class:"metrics-w-4 metrics-h-4 metrics-w-1 metrics-float-right metrics-top-0 metrics-cursor-pointer",onClick:e.CloseBox},null,8,["onClick"]),k("div",In,[k(c,{class:" metrics-text-theme-44 metrics-bell-shake metrics-h-7 metrics-w-7 metrics-m-auto metrics-mt-2"})]),k("div",null,[ne(ce(e.$t("moduleUpgraded.title"))+" ",1),k("div",Bn,ce(e.currentVersion),1)])]),Ln])])])])):D("",!0)};var $n=T({name:"RightSection",props:{tipscardsLabel:{type:String,default:""}},components:{BoxUpgradePlan:ea,BoxSynchronization:ua,BoxNextFeatures:Ea,BoxTipsCard:Za,BoxNewVersionAvailable:bn,BoxModuleUpgraded:Dn},setup(e){const t=he(),r=Z((()=>t.getters["main/GET_IS_ADVANCED"])),s=Z((()=>t.getters["main/IS_FIRST_ACCESS"])),i=Z((()=>t.getters["main/IS_FIRST_SYNC"])),a=Z((()=>({category:e.tipscardsLabel,language:t.state.main.isoCode})));return{advancedPlan:r,tipsCards:ls,additionnalQueryTipscards:a,isFirstAccess:s,isFirstSync:i}}});const Gn={class:"xxl:metrics-pl-6 l:metrics-pl-3 metrics-grid metrics-grid-cols-12 metrics-gap-y-6 metrics-gap-x-6 xxl:metrics-gap-x-0 xxl:metrics-mt-5"};$n.render=function(e,t,r,s,i,a){const n=E("BoxModuleUpgraded"),c=E("BoxNewVersionAvailable"),o=E("BoxUpgradePlan"),l=E("BoxSynchronization"),m=E("BoxNextFeatures"),d=E("BoxTipsCard");return A(),C("div",Gn,[k(n),k(c),e.advancedPlan?(A(),C(l,{key:1})):(A(),C(o,{key:0})),k(m),k(d,{query:e.tipsCards,additionnalQueryParams:e.additionnalQueryTipscards},null,8,["query","additionnalQueryParams"])])};var Un=T({name:"LoaderBoxHighlight"});const Yn={class:"metrics-grid metrics-grid-cols-4 metrics-gap-1 metrics-h-28"},Vn=ve('<div class="metrics-col-span-3 metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-col-span-2 metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-col-span-2 metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-col-span-1 metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-col-span-2 metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div>',6);Un.render=function(e,t,r,s,i,a){return A(),C("div",Yn,[Vn])};var qn=T({name:"HighlightText",components:{BoxNoData:Ha},props:{keyTranslate:{type:String,default:""},typeValue:{type:String,default:"percent"},typeKpi:{type:String,default:"evolution"},dimension:{type:String,default:"orderAverage"},result:{type:Object},isSession:{type:Boolean,default:!1},total:{type:Object,default:()=>({})}},setup:function(e){const t={percent_evolution:()=>{let t=e.result?e.result.currentValue:0,r=e.result?e.result.previousValue:0;if(e.isSession&&e.total&&e.total.totalCurrent&&(t=Number(t/e.total.totalCurrent*100).toFixed(0)),0===t&&0===r)return"NO_DATA";const s=Z((()=>(r=0===r?1:r,((t-r)/r*100).toFixed(0)))),i=Z((()=>{const e=parseInt(s.value);return(e<0?-1*e:e).toFixed(0)})),a=Z((()=>Math.sign(Number.parseFloat(s.value))>=0)),n=Z((()=>a.value?"highlight.increased":"highlight.decreased")),c=Z((()=>({"metrics-text-theme-44 metrics-font-bold":a.value,"metrics-text-theme-45 metrics-font-bold":!a.value})));return{valueKpi:s.value,valueKpiAbsolute:i.value,suffixSymbol:"%",highlight:n.value,classHighlightColor:c.value}},percent_best:()=>{const t=e.result&&e.result[0];if(!t)return"NO_DATA";const r=t.category;let s=0;return s=e.isSession&&e.total&&e.total.totalCurrent?(parseInt(t.currentValue)/parseInt(e.total.totalCurrent)*100).toFixed(0):t.currentValue,{productKpi:r,valueKpi:s,valueKpiAbsolute:s,suffixSymbol:"%",highlight:"",classHighlightColor:""}},currency_best:()=>{var t,r=null==(t=null==e?void 0:e.result)?void 0:t.currentPeriod[0];return r?{productKpi:r.name?r.name:r.category,valueKpi:r.amount?r.amount:r.currentValue,suffixSymbol:"",highlight:"",classHighlightColor:""}:"NO_DATA"},currency_top:()=>{var t=e.result&&e.result[0];if(!t)return"NO_DATA";var r=t.name?t.name:t.category,s=t.amount?t.amount:t.currentValue;return{productKpi:r,valueKpi:s,valueKpiAbsolute:s,suffixSymbol:"",highlight:"",classHighlightColor:""}}},r=`${e.typeValue}_${e.typeKpi}`;if(!t[r])throw new Error(`[HighlightText] Unable to calculate highlight strategy for ${e.typeValue}-${e.typeKpi} !`);let s;const i=R(""),a=R(!1);try{s=t[r](),"NO_DATA"===s&&(a.value=!0)}catch(n){i.value=n}return{finalResult:s,noData:a,errorDetected:i}}});const Fn={class:"metrics-text-base metrics-m-auto metrics-w-full"},Kn={key:0,class:"metrics-h-32"},jn={key:1},zn={key:0,class:"metrics-text-xl metrics-font-bold"},Hn={key:1,class:"metrics-text-2xl metrics-font-bold"},Qn={class:"metrics-font-bold"},Wn={class:"metrics-font-bold"};qn.render=function(e,t,r,s,i,a){const n=E("box-no-data"),c=E("i18n-t");return A(),C("span",Fn,[e.noData?(A(),C("div",Kn,[k(n)])):""!==e.errorDetected?(A(),C("div",jn," Unable to compute data : "+ce(e.errorDetected),1)):(A(),C(c,{key:2,keypath:e.keyTranslate,tag:"span"},{highlight:w((()=>[k("span",{class:e.finalResult.classHighlightColor},ce(e.$t(e.finalResult.highlight)),3)])),value:w((()=>["currency"==e.typeValue?(A(),C("span",zn,ce(e.$n(e.finalResult.valueKpi,"currency")),1)):(A(),C("span",Hn,ce(e.finalResult.valueKpiAbsolute),1))])),product:w((()=>[k("span",Qn,ce(e.finalResult.productKpi),1)])),symbol:w((()=>[k("span",Wn,ce(e.finalResult.suffixSymbol),1)])),_:1},8,["keypath"]))])};var Jn=T({name:"FakerHighlightText",props:{keyTranslate:{type:String,default:""},typeValue:{type:String,default:"percent"},typeKpi:{type:String,default:"evolution"},dimension:{type:String,default:"orderAverage"},isSession:{type:Boolean,default:!1}},setup:function(e){const t={percent_evolution:()=>{let t=be.datatype.number({min:1,max:2e3}),r=be.datatype.number({min:1,max:2e3});const s={totalCurrent:be.datatype.number({min:1,max:2e3}),totalPrevious:be.datatype.number({min:1,max:2e3})};e.isSession&&s&&s.totalCurrent&&(t=Number(t/s.totalCurrent*100).toFixed(0));const i=Z((()=>(r=0===r?1:r,((t-r)/r*100).toFixed(0)))),a=Z((()=>{const e=parseInt(i.value);return(e<0?-1*e:e).toFixed(0)})),n=Z((()=>Math.sign(Number.parseFloat(i.value))>=0)),c=Z((()=>n.value?"highlight.increased":"highlight.decreased")),o=Z((()=>({"metrics-text-theme-44 metrics-font-bold":n.value,"metrics-text-theme-45 metrics-font-bold":!n.value})));return{valueKpi:i.value,valueKpiAbsolute:a.value,symbol:"%",highlight:c.value,classHighlightColor:o.value}},percent_best:()=>{const e=be.commerce.productName(),t=Math.floor(Math.random()*Math.floor(2e3));return{productKpi:e,valueKpi:t,valueKpiAbsolute:t,symbol:"%",highlight:"",classHighlightColor:""}},currency_best:()=>({productKpi:be.commerce.productName(),valueKpi:Math.floor(Math.random()*Math.floor(2e3)),symbol:"",highlight:"",classHighlightColor:""}),currency_top:()=>{var e=be.commerce.productName(),t=Math.floor(Math.random()*Math.floor(2e3));return{productKpi:e,valueKpi:t,valueKpiAbsolute:t,symbol:"",highlight:"",classHighlightColor:""}}},r=`${e.typeValue}_${e.typeKpi}`;if(!t[r])throw new Error(`[HighlightText] Unable to calculate highlight strategy for ${e.typeValue}-${e.typeKpi} !`);let s;const i=R(null),a=R(!1);try{s=t[r](),"NO_DATA"===s&&(a.value=!0)}catch(n){i.value=n}return{datas:s,noData:a,error:i}}});const Xn={class:"metrics-text-base metrics-m-auto metrics-w-full"},Zn={key:0,class:"metrics-text-xl metrics-font-bold metrics-blur-md"},ec={key:1,class:"metrics-text-2xl metrics-font-bold metrics-blur-md"},tc={class:"metrics-font-bold metrics-blur-md"},rc={class:"metrics-font-bold"};Jn.render=function(e,t,r,s,i,a){const n=E("i18n-t");return A(),C("span",Xn,[k(n,{keypath:e.keyTranslate,tag:"span"},{highlight:w((()=>[k("span",{class:e.datas.classHighlightColor},ce(e.$t(e.datas.highlight)),3)])),value:w((()=>["currency"==e.datas.typeValue?(A(),C("span",Zn,ce(e.$n(e.datas.valueKpi,"currency")),1)):(A(),C("span",ec,ce(e.datas.valueKpiAbsolute),1))])),product:w((()=>[k("span",tc,ce(e.datas.productKpi),1)])),symbol:w((()=>[k("span",rc,ce(e.datas.symbol),1)])),_:1},8,["keypath"])])};var sc=T({name:"BoxHighlight",props:{keyTranslate:{type:String,default:""},isSession:{type:Boolean,default:!1},query:{type:Object,default:()=>({})},typeValue:{type:String,default:"percent"},typeKpi:{type:String,default:"evolution"},dimension:{type:String,default:"orderAverage"},additionnalQueryParams:{type:Object,default:()=>({})},faker:{type:Boolean,default:!1},tippyContentKey:{type:String,required:!1,default:""},mustBeGoogleLinked:{type:Boolean,default:!1},disabledNetworkRequest:{type:Boolean,default:!1}},components:{FakerHighlightText:Jn,HighlightText:qn,LoaderBoxHighlight:Un,BoxError:gi,BoxAnalyticsMustBeLinked:Vs},setup(e){const t=We();if(e.faker)return{faker:!0,result:[!0],showAnalyticsLinkBox:!1,loading:!1,error:!1,resultDimension:[!1],total:[!1]};const r=Z((()=>o(o({},t.getters["main/GET_VARIABLES_QUERY"]),e.additionnalQueryParams))),s=Z((()=>{const r=t.getters["main/GET_OPTIONS_QUERY"];return e.disabledNetworkRequest&&(r.fetchPolicy="no-cache"),r})),{result:i,loading:a,error:n,refetch:c}=ue(e.query,r,s.value);let l={};e.isSession&&(l=fe(i,0,(t=>t[e.dimension].total)));return{total:l,result:i,loading:a,error:n,resultDimension:fe(i,0,(t=>e.isSession?t[e.dimension].categories:t[e.dimension])),refetch:c,showAnalyticsLinkBox:Z((()=>e.mustBeGoogleLinked&&!t.getters["main/HAS_GOOGLE_ACCOUNT"]))}}});const ic={class:"metrics-report-box"},ac={key:0,class:"metrics-box metrics-p-5 metrics-border-theme-5 metrics-border"},nc={key:1,class:"metrics-box metrics-p-5 metrics-border-theme-5 metrics-border"},cc={key:2,class:"metrics-box metrics-p-5 metrics-h-full metrics-w-full metrics-border-theme-5 metrics-border"},oc={key:3,class:"metrics-box metrics-p-5 metrics-border-theme-5 metrics-border"},lc={class:"metrics-text-xl metrics-flex dark:metrics-text-theme-white metrics-leading-8 sm:metrics-h-20 metrics-h-auto metrics-text-center"};sc.render=function(e,t,r,s,i,a){const n=E("BoxAnalyticsMustBeLinked"),c=E("LoaderBoxHighlight"),o=E("BoxError"),l=E("FakerHighlightText"),m=E("HighlightText");return A(),C("div",ic,[e.showAnalyticsLinkBox?(A(),C("div",ac,[k(n)])):e.loading?(A(),C("div",nc,[k(c)])):e.error?(A(),C("div",cc,[e.error?(A(),C(o,{key:0,retry:e.refetch},null,8,["retry"])):D("",!0)])):e.result?(A(),C("div",oc,[k("div",lc,[e.faker?(A(),C(l,{key:0,result:e.resultDimension,typeValue:e.typeValue,typeKpi:e.typeKpi,dimension:e.dimension,keyTranslate:e.keyTranslate,total:e.total,isSession:e.isSession},null,8,["result","typeValue","typeKpi","dimension","keyTranslate","total","isSession"])):(A(),C(m,{key:1,result:e.resultDimension,typeValue:e.typeValue,typeKpi:e.typeKpi,dimension:e.dimension,keyTranslate:e.keyTranslate,total:e.total,isSession:e.isSession},null,8,["result","typeValue","typeKpi","dimension","keyTranslate","total","isSession"]))])])):D("",!0)])},m.extend(Se),m.extend(Te),m.extend(Ee);var mc=T({name:"ReportLineChart",props:{width:{type:Number,default:0},height:{type:Number,default:0},data:{type:Object,default:()=>({})},isCurrency:{type:Boolean,default:!1},isSession:{type:Boolean,default:!1},granularity:{type:String,default:"day"}},setup(e){const t=We(),{n:r,t:s}=X(),i=Z((()=>t.getters["main/GET_PREVIOUS_DATE_RANGE"])),a=re(),n=Z((()=>e.data.currentPeriod)),c=Z((()=>e.data.previousPeriod)),o=Z((()=>t.state.main.darkMode)),l=Z((()=>t.state.main.compareMode)),d=e=>({day:()=>m(e).locale(t.state.main.isoCode).format("dd D MM "),week:()=>`${s("graph.legend.week")} ${m(e).locale(t.state.main.isoCode).format("ww")}`,month:()=>m(e).locale(t.state.main.isoCode).format("MMM YY"),hour:()=>m(e).locale(t.state.main.isoCode).format("dd D HH")}[p.granularity].call()),u=(e,t)=>{const r=[];for(let s=0;s<t.length;s++)r[s]=0;return e.map((e=>{const s=(e=>({day:()=>m(e).format("YYYY-MM-DD"),week:()=>`${m(e).year()}-${m(e).format("ww")}`,month:()=>`${m(e).year()}-${m(e).format("MM")}`,hour:()=>m(e).format("YYYY-MM-DD HH:00:00")}[p.granularity].call()))(e.date),i=t.indexOf(s);0!==r[i]?r[i]=parseInt(r[i])+parseInt(e.currentValue):r[i]=parseInt(e.currentValue)})),r},p=Ce({granularity:e.granularity,dateCurrentLabels:a.appContext.config.globalProperties.$dr(t.state.main.dateRange.startDate,t.state.main.dateRange.endDate,e.granularity),datePreviousLabels:a.appContext.config.globalProperties.$dr(i.value.startDate,i.value.endDate,e.granularity)}),g={dataChartCurrentPeriod:u(n.value,p.dateCurrentLabels),dataChartPreviousPeriod:l.value?u(c.value,p.datePreviousLabels):null},y=Ce(g);L((()=>e.granularity),(e=>{p.granularity=e,p.dateCurrentLabels=a.appContext.config.globalProperties.$dr(t.state.main.dateRange.startDate,t.state.main.dateRange.endDate,e),p.datePreviousLabels=a.appContext.config.globalProperties.$dr(i.value.startDate,i.value.endDate,e),y.dataChartCurrentPeriod=u(n.value,p.dateCurrentLabels),y.dataChartPreviousPeriod=u(c.value,p.datePreviousLabels)}));return{dataChart:Z((()=>({labels:p.dateCurrentLabels,datasets:[{label:"Current period",borderColor:"#34219E",backgroundColor:"#34219E",fill:!1,labels:p.dateCurrentLabels,data:y.dataChartCurrentPeriod,borderWidth:2,pointRadius:0},{label:"Previous period",borderColor:"#525760",backgroundColor:"#525760",fill:!1,labels:p.datePreviousLabels,data:y.dataChartPreviousPeriod,borderWidth:2,borderDash:[2,2],pointRadius:0}]}))),options:Z((()=>({legend:{display:!1},hover:{mode:"index",intersect:!1},tooltips:!1,plugins:{datalabels:{formatter:function(t,s){const i=e.isCurrency?r(t,"currency"):t;return 1===s.datasetIndex?s.active?i+"\n"+d(s.dataset.labels[s.dataIndex]):"":s.active?i:""},display:function(e){return e.active},align:function(e){return 1===e.datasetIndex?e.active&&e.dataIndex>=e.dataset.labels.length-5?"left":e.active&&e.dataIndex<=e.dataset.labels.length-5?"right":"center":e.active&&e.dataIndex<=1?"top":e.active&&e.dataIndex>=1?"left":"center"},backgroundColor:e=>e.active?e.dataset.backgroundColor:"white",borderColor:e=>e.dataset.borderColor,borderRadius:e=>e.active?0:32,borderWidth:1,color:e=>e.active?"white":e.dataset.backgroundColor,font:{weight:"bold"},offset:e=>(e.dataIndex>=e.dataset.labels.length-3&&e.datasetIndex,15),textAlign:"center"}},scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:15,fontSize:"12",fontColor:o.value?"#718096":"#777777",callback:function(e){return d(e)}},gridLines:{display:!1}}],yAxes:[{ticks:{min:0,fontSize:"12",fontColor:o.value?"#718096":"#777777",callback:function(t){return e.isCurrency?r(t,"currency"):t}},gridLines:{color:o.value?"#718096":"#D8D8D8",zeroLineColor:o.value?"#718096":"#D8D8D8",borderDash:[2,2],zeroLineBorderDash:[2,2],drawBorder:!1}}]}})))}}});mc.render=function(e,t,r,s,i,a){const n=E("Chart");return A(),C(n,{type:"line",width:e.width,height:e.height,data:e.dataChart,options:e.options},null,8,["width","height","data","options"])};var dc=T({name:"LineChart",components:{ReportLineChart:mc},props:{isCurrency:{type:Boolean,default:!1},isSession:{type:Boolean,default:!1},granularity:{type:String,default:""},dataChart:{type:Array,default:()=>[]}}});dc.render=function(e,t,r,s,i,a){const n=E("ReportLineChart");return A(),C("div",null,[k(n,{granularity:e.granularity,"is-session":e.isSession,"is-currency":e.isCurrency,height:169,class:"metrics-mt-6",data:e.dataChart},null,8,["granularity","is-session","is-currency","data"])])};var uc={name:"BarChartLoader",components:{}};const pc={style:{width:"517px",height:"210px"}},gc={class:"metrics-mt-2 metrics-flex metrics-h-full metrics-content-around metrics-justify-around metrics-items-end metrics-pl-5 metrics-pr-5 metrics-border-l-2 metrics-border-b-2 metrics-border-gray-300 metrics-animate-pulse"};uc.render=function(e,t,r,s,i,a){return A(),C("div",pc,[k("div",gc,[(A(),C(se,null,ie([60,90,130,150,160,170,60,120,140,10],((e,t)=>k("div",{key:t,style:[`height: ${e}px`,{width:"35px"}],class:"metrics-bg-gray-300 metrics-rounded-sm metrics-rounded-b-none"},null,4))),64))])])};var yc=T({name:"ReportEvolutionNumber",props:{isCurrency:{type:Boolean,default:!1},total:{type:Object,default:()=>({})},type:{type:String,default:"current"}},setup:e=>({value:"current"===e.type?e.total.currentValue:e.total.previousValue})});yc.render=function(e,t,r,s,i,a){return A(),C("div",null,ce(e.isCurrency?e.$n(e.value,"currency"):e.value),1)};var vc=T({name:"FakerReportEvolutionNumber",props:{isCurrency:{type:Boolean,default:!1}},setup:()=>({value:be.datatype.number({min:1,max:2e3})})});const hc={class:"metrics-blur-md"};vc.render=function(e,t,r,s,i,a){return A(),C("div",hc,ce(e.isCurrency?e.$n(e.value,"currency"):e.value),1)};var bc=T({name:"FakerLineChart",components:{ReportLineChart:mc},props:{isCurrency:{type:Boolean,default:!1},isSession:{type:Boolean,default:!1},granularity:{type:String,default:""}},setup(e){const t="month"===e.granularity||"week"===e.granularity?100:10;return{dataChart:{currentPeriod:new Array(24).fill(null).map((()=>({date:m(be.date.recent(t)).format("YYYY-MM-DD HH:MM:ss"),currentValue:be.datatype.number(2e3)}))),previousPeriod:new Array(24).fill(null).map((()=>({date:m(be.date.recent(3*t)).format("YYYY-MM-DD HH:MM:ss"),currentValue:be.datatype.number(2e3)})))}}}});const fc={class:"metrics-blur-md"};bc.render=function(e,t,r,s,i,a){const n=E("ReportLineChart");return A(),C("div",fc,[k(n,{granularity:e.granularity,"is-session":e.isSession,"is-currency":e.isCurrency,height:169,class:"metrics-mt-6",data:e.dataChart},null,8,["granularity","is-session","is-currency","data"])])};var xc=T({name:"BoxEvolution",components:{BarChartLoader:uc,BoxError:gi,BoxNoData:Ha,BoxAnalyticsMustBeLinked:Vs,ReportEvolutionNumber:yc,FakerReportEvolutionNumber:vc,LineChart:dc,FakerLineChart:bc},props:{isCurrency:{type:Boolean,default:!1},title:{type:String,default:"Evolution"},queries:{type:Object,default:()=>({})},dimensions:{type:Object,default:()=>({})},isSession:{type:Boolean,default:!1},faker:{type:Boolean,default:!1},showAllGranularity:{type:Boolean,default:!1},tippyContentKey:{type:String,default:"graph.sessionsEvolution"},mustBeGoogleLinked:{type:Boolean,default:!1}},setup(e){const t=We(),{appContext:{config:{globalProperties:{$segment:r}}}}=re(),s=Z((()=>{const r=e.isSession&&v?{granularity:v.value}:{};return o(o({},t.getters["main/GET_VARIABLES_QUERY"]),r)})),i=Z((()=>t.getters["main/GET_OPTIONS_QUERY"])),a=Z((()=>t.state.main.compareMode)),n=R(e.queries),c=R(e.dimensions),{t:d}=X(),u=Z((()=>t.getters["main/GET_PREVIOUS_DATE_RANGE"])),p=Z((()=>m(u.value.endDate).diff(m(u.value.startDate),"days"))),g=[{slug:"hour",label:d("tabsBody.dates.hour"),onPress:()=>h("hour"),dateRangeMinMax:{min:0,max:2}},{slug:"day",label:d("tabsBody.dates.day"),onPress:()=>h("day"),dateRangeMinMax:{min:2,max:60}},{slug:"week",label:d("tabsBody.dates.week"),onPress:()=>h("week"),dateRangeMinMax:{min:21,max:180}},{slug:"month",label:d("tabsBody.dates.month"),onPress:()=>h("month"),dateRangeMinMax:{min:60,max:1/0}}],y=Z((()=>e.showAllGranularity?g:g.filter((e=>p.value>=e.dateRangeMinMax.min&&p.value<=e.dateRangeMinMax.max)))),v=R(y.value[0].slug);L((()=>t.getters["main/GET_PREVIOUS_DATE_RANGE"]),(()=>{-1===ke(y.value,{slug:v.value})&&h(y.value[0].slug)}));const h=e=>{r().track("[MTR] Overview Select Granularity",l(o({module:"ps_metrics"},t.getters["main/GET_USER_EMAIL"]&&{email:t.getters["main/GET_USER_EMAIL"]}),{slug:e})),v.value=e};if(e.faker)return{faker:!0,TotalValues:[!0],resultTotal:[!0],resultEvolution:[!0],compareMode:a,granularity:v,buttonStateAvailable:y};const{result:b,loading:f,error:x,refetch:_}=ue(n.value[0],s,i.value),{result:S,loading:T,error:E,refetch:C}=ue(n.value[1],s,i.value),k=fe(b,0,(e=>parseInt(Number(e[c.value[0]].currentValue).toFixed(0)))),w=fe(b,0,(e=>parseInt(Number(e[c.value[0]].previousValue).toFixed(0)))),D=fe(b,0,(e=>e[c.value[0]])),A=fe(S,[],(e=>e[c.value[1]])),N=Z((()=>e.mustBeGoogleLinked&&!t.getters["main/HAS_GOOGLE_ACCOUNT"])),M=Z((()=>{const e=k.value,t=w.value;return 0===parseInt(e)&&0===parseInt(t)}));return{compareMode:a,granularity:v,buttonStateAvailable:y,resultTotal:b,resultEvolution:S,loadingTotal:f,loadingEvolution:T,TotalValues:D,dataChart:A,error:x||E,refetch:()=>{_(),C()},noData:M,showAnalyticsLinkBox:N}}});const _c={class:"metrics-intro-y metrics-flex metrics-items-center metrics-h-10"},Sc={class:"\n          metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-5\n          hover:metrics-overflow-visible hover:metrics-absolute\n          metrics-overflow-hidden metrics-z-10 metrics-bg-gray-248\n        "},Tc={class:"\n          metrics-ml-auto metrics-mt-0 metrics-flex metrics-text-gray-700\n          dark:metrics-text-gray-300\n        "},Ec={id:"metrics-evolution-datepickers",class:"metrics-flex metrics-rounded-lg metrics-text-md",role:"group"},Cc={class:"metrics-flex",style:{"align-items":"center","justify-content":"center"}},kc={class:"\n        metrics-intro-y\n        metrics-box\n        metrics-p-5\n        metrics-mt-2\n        metrics-border-theme-5\n        metrics-border\n      "},wc={class:"metrics-flex metrics-flex-row xl:metrics-items-center"},Dc={class:"metrics-flex"},Ac={key:0,class:"metrics-h-7 metrics-flex metrics-items-center"},Nc={key:1,class:"\n                metrics-text-theme-43\n                dark:metrics-text-gray-300\n                metrics-text-lg\n                xl:metrics-text-xl\n                metrics-font-bold\n              "},Mc={key:2,class:"\n                metrics-text-theme-43\n                dark:metrics-text-gray-300\n                metrics-text-lg\n                xl:metrics-text-xl\n                metrics-font-bold\n              "},Oc={class:"metrics-mt-0.5 metrics-text-theme-43"},Rc=k("div",{class:"\n              metrics-w-px\n              metrics-h-12\n              metrics-border\n              metrics-border-r\n              metrics-border-dashed\n              metrics-border-gray-300\n              dark:metrics-border-dark-5\n              metrics-mx-4\n              xl:metrics-mx-6\n            "},null,-1),Pc={key:0,class:"metrics-h-7 metrics-flex metrics-items-center"},Ic={key:1,class:"\n                metrics-text-theme-43\n                dark:metrics-text-gray-300\n                metrics-text-lg\n                xl:metrics-text-xl\n                metrics-font-bold\n              "},Bc={key:2,class:"\n                metrics-text-gray-777 metrics-text-lg\n                xl:metrics-text-xl\n                metrics-font-medium\n              "},Lc={key:3,class:"metrics-mt-0.5 metrics-text-gray-777"},$c={class:"metrics-self-start metrics-ml-auto"},Gc={key:0,class:"metrics-p-5 metrics-mt-10"},Uc={key:1,class:"metrics-flex metrics-justify-center"},Yc={key:2,class:"metrics-mt-4 metrics-h-full metrics-w-full metrics-mt-10"},Vc={key:3,class:"\n          metrics-mt-4 metrics-h-full metrics-w-full metrics-mt-16 metrics-pb-16\n        "},qc={key:4,class:"metrics-report-chart"};xc.render=function(e,t,r,s,i,a){const n=E("LoadingIcon"),c=E("FakerReportEvolutionNumber"),o=E("ReportEvolutionNumber"),l=E("InfoIcon"),m=E("Tippy"),d=E("BoxAnalyticsMustBeLinked"),u=E("BarChartLoader"),p=E("BoxError"),g=E("BoxNoData"),y=E("FakerLineChart"),v=E("LineChart");return A(),C("div",null,[k("div",_c,[k("h2",Sc,ce(e.title),1),k("div",Tc,[k("div",Ec,[(A(!0),C(se,null,ie(e.buttonStateAvailable,((t,r)=>(A(),C("button",{key:t.slug,type:"button",class:["\n              metrics-button-date\n              metrics-border\n              metrics-text-white\n              metrics-ml-auto\n            ",{" metrics-text-white metrics-border-theme-43 metrics-bg-theme-43 metrics-cursor-default":e.granularity===t.slug,"metrics-bg-white metrics-border-gray-400 metrics-text-gray-700 metrics-zoom-in-no-shadow":e.granularity!==t.slug,"metrics-rounded-l-lg":0===r,"metrics-rounded-r-lg":r===e.buttonStateAvailable.length-1}],onClick:ae((e=>t.onPress()),["prevent"])},[k("span",Cc,ce(t.label),1)],10,["onClick"])))),128))])])]),k("div",kc,[k("div",wc,[k("div",Dc,[k("div",null,[e.loadingTotal?(A(),C("div",Ac,[k(n,{icon:"three-dots",class:"metrics-w-8"})])):e.error?(A(),C("div",Nc," - ")):e.TotalValues?(A(),C("div",Mc,[e.faker?(A(),C(c,{key:0,isCurrency:e.isCurrency},null,8,["isCurrency"])):(A(),C(o,{key:1,isCurrency:e.isCurrency,total:e.TotalValues},null,8,["isCurrency","total"]))])):D("",!0),k("div",Oc,ce(e.$t("graph.currentPeriod")),1)]),Rc,k("div",null,[e.loadingTotal?(A(),C("div",Pc,[k(n,{icon:"three-dots",class:"metrics-w-8"})])):e.error?(A(),C("div",Ic," - ")):e.TotalValues&&e.compareMode?(A(),C("div",Bc,[e.faker?(A(),C(c,{key:0,isCurrency:e.isCurrency},null,8,["isCurrency"])):(A(),C(o,{key:1,isCurrency:e.isCurrency,total:e.TotalValues,type:"previous"},null,8,["isCurrency","total"]))])):D("",!0),e.compareMode?(A(),C("div",Lc,ce(e.$t("graph.lastPeriod")),1)):D("",!0)])]),k("div",$c,[k(m,{tag:"div",content:e.$t(e.tippyContentKey)},{default:w((()=>[k(l,{class:"\n                metrics-w-5\n                lg:metrics-w-3\n                metrics-h-auto metrics-text-gray-777\n              "})])),_:1},8,["content"])])]),e.showAnalyticsLinkBox?(A(),C("div",Gc,[k(d,{"large-icon":""})])):e.loadingEvolution?(A(),C("div",Uc,[k(u)])):e.error?(A(),C("div",Yc,[k(p,{retry:e.refetch,"large-icon":""},null,8,["retry"])])):e.noData?(A(),C("div",Vc,[k(g,{"large-icon":""})])):e.resultEvolution?(A(),C("div",qc,[e.faker?(A(),C(y,{key:0,granularity:e.granularity,"is-session":e.isSession,"is-currency":e.isCurrency,dataChart:e.dataChart},null,8,["granularity","is-session","is-currency","dataChart"])):(A(),C(v,{key:1,granularity:e.granularity,"is-session":e.isSession,"is-currency":e.isCurrency,dataChart:e.dataChart},null,8,["granularity","is-session","is-currency","dataChart"]))])):D("",!0)])])};var Fc=T({name:"ReportDonutChart",props:{width:{type:Number,default:0},height:{type:Number,default:0},data:{type:Object,default:()=>({})}},emits:["hover:chartElement"],setup(e,{emit:t}){const r=We(),s=Z((()=>r.state.main.darkMode)),i=Z((()=>{const t={data:[],dataPrevious:[],labels:[],colors:[]};return e.data.map((e=>{t.labels.push(e.category),t.data.push(e.currentValue),t.colors.push(e.color)})),t}));return{dataChart:Z((()=>({labels:i.value.labels,datasets:[{data:i.value.data,backgroundColor:i.value.colors,hoverBackgroundColor:i.value.colors,borderWidth:5,borderColor:s.value?"#303953":"#fff"}]}))),options:Z((()=>({plugins:{datalabels:{display:!1}},legend:{display:!1},cutoutPercentage:80,tooltips:{enabled:!1},hover:{index:"index",intersect:!1,onHover:function(e,r){t("hover:chartElement",r[0])}}})))}}});Fc.render=function(e,t,r,s,i,a){const n=E("Chart");return A(),C(n,{type:"doughnut",width:e.width,height:e.height,data:e.dataChart,options:e.options},null,8,["width","height","data","options"])};var Kc=T({name:"BoxDistribution",components:{ReportDonutChart:Fc},props:{isSession:{type:Boolean,default:!1},total:{type:String,default:"0"},result:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]}},setup(e){const t=re(),r=Z((()=>t.appContext.config.globalProperties.$c(e.data.length))),s=Z((()=>e.data.map(((t,s)=>{const i=t.currentValue/parseInt(e.total)*100,a=parseFloat(t.currentValue).toFixed(2);return l(o({},t),{percentage:i.toFixed(2),currentValue:a,color:r.value[s]})})))),i=R(0),{t:a}=X(),n=Z((()=>{var e;return null==(e=s.value[i.value])?void 0:e.percentage})),c=Z((()=>{var e,t,r;if(null==(e=s.value[i.value])?void 0:e.paymentMethod)return null==(t=s.value[i.value])?void 0:t.paymentMethod;const n=null==(r=s.value[i.value])?void 0:r.category;return a("graph.legend."+n.replace(" ","_"))}));return{dataChart:s,getHoveredChartIndex:e=>{i.value=e?e._index:0},hoveredDataName:c,hoveredDataPercentage:n,itemName:e=>e.paymentMethod?e.paymentMethod:a("graph.legend."+e.category.replace(" ","_"))}}});const jc={class:"metrics-relative"},zc={class:"metrics-absolute metrics-w-full metrics-h-full metrics-flex metrics-flex-col metrics-items-center metrics-justify-center metrics-top-0 metrics-left-0 metrics--z-10"},Hc={class:"metrics-text-sm sm:metrics-text-base md:metrics-text-base lg:metrics-text-base xl:metrics-text-sm metrics-truncated metrics-w-9/12 metrics-text-center"},Qc={class:"metrics-text-xl sm:metrics-text-base md:metrics-text-base lg:metrics-text-base xl:metrics-text-xl metrics-font-medium"},Wc={class:"metrics-mt-5"},Jc={class:"metrics-truncate metrics-text-sm"},Xc=k("div",{class:"metrics-h-px metrics-flex-1 metrics-border metrics-border-r metrics-border-dashed metrics-border-gray-300 metrics-mx-3 xl:metrics-hidden"},null,-1),Zc={class:"metrics-font-medium xl:metrics-ml-auto"};Kc.render=function(e,t,r,s,i,a){const n=E("ReportDonutChart"),c=E("Tippy");return A(),C("div",null,[k("div",jc,[k(n,{height:300,data:e.dataChart,class:"metrics-mt-3 metrics-z-50","onHover:chartElement":t[1]||(t[1]=t=>e.getHoveredChartIndex(t))},null,8,["data"]),k("div",zc,[k("div",Hc,ce(e.hoveredDataName),1),k("div",Qc,ce(e.hoveredDataPercentage)+"% ",1)])]),k("div",Wc,[(A(!0),C(se,null,ie(e.dataChart.slice(0,4),(t=>(A(),C("div",{key:t.currentValue,class:"metrics-flex metrics-items-center metrics-mb-3"},[k("div",{class:"metrics-w-2 metrics-h-2 metrics-rounded-full metrics-mr-3",style:"background-color:"+t.color},null,4),k("span",Jc,ce(e.itemName(t)),1),Xc,k("span",Zc,[k(c,{tag:"div",content:`${t.currentValue}`},{default:w((()=>[ne(ce(t.percentage)+"% ",1)])),_:2},1032,["content"])])])))),128))])])};var eo=T({name:"FakerBoxDistribution",components:{ReportDonutChart:Fc},props:{limit:{type:Number,default:4},category:{type:Array,default:()=>[]}},setup(e){const t=new Array(e.limit).fill(null).map(((t,r)=>({id:be.datatype.number({min:100,max:999}),currentValue:be.datatype.number({min:0,max:500}),previousValue:be.datatype.number({min:0,max:500}),category:e.category[r],percentage:25}))),r=be.datatype.number({min:1,max:2e3}),s=re(),i=Z((()=>s.appContext.config.globalProperties.$c(t.length))),a=Z((()=>t.map(((e,t)=>{const s=e.currentValue/r*100,a=parseFloat(e.currentValue).toFixed(2);return l(o({},e),{percentage:s.toFixed(2),currentValue:a,color:i.value[t]})})))),n=R(0),c=Z((()=>{var e;return null==(e=a.value[n.value])?void 0:e.percentage})),m=Z((()=>{var e;return null==(e=a.value[n.value])?void 0:e.category}));return{dataChart:a,getHoveredChartIndex:e=>{n.value=e?e._index:0},hoveredDataName:m,hoveredDataPercentage:c}}});const to={class:"metrics-relative"},ro={class:"metrics-absolute metrics-w-full metrics-h-full metrics-flex metrics-flex-col metrics-items-center metrics-justify-center metrics-top-0 metrics-left-0 metrics--z-10 "},so={class:"metrics-text-sm sm:metrics-text-base md:metrics-text-base lg:metrics-text-base xl:metrics-text-sm metrics-truncated metrics-w-9/12 metrics-text-center "},io={class:"metrics-text-xl sm:metrics-text-base md:metrics-text-base lg:metrics-text-base xl:metrics-text-xl metrics-font-medium metrics-blur-md"},ao={class:"metrics-mt-5"},no={class:"metrics-truncate metrics-text-sm"},co=k("div",{class:"metrics-h-px metrics-flex-1 metrics-border metrics-border-r metrics-border-dashed metrics-border-gray-300 metrics-mx-3 xl:metrics-hidden"},null,-1),oo={class:"metrics-font-medium xl:metrics-ml-auto metrics-blur-md"};eo.render=function(e,t,r,s,i,a){const n=E("ReportDonutChart");return A(),C("div",null,[k("div",to,[k(n,{height:300,data:e.dataChart,class:"metrics-mt-3 metrics-z-50","onHover:chartElement":t[1]||(t[1]=t=>e.getHoveredChartIndex(t))},null,8,["data"]),k("div",ro,[k("div",so,ce(e.$t(`graph.legend.${e.hoveredDataName.replace(" ","_")}`)),1),k("div",io,ce(e.hoveredDataPercentage)+"% ",1)])]),k("div",ao,[(A(!0),C(se,null,ie(e.dataChart.slice(0,4),(t=>(A(),C("div",{key:t.currentValue,class:"metrics-flex metrics-items-center metrics-mb-3"},[k("div",{class:"metrics-w-2 metrics-h-2 metrics-rounded-full metrics-mr-3",style:"background-color:"+t.color},null,4),k("span",no,ce(e.$t(`graph.legend.${t.category.replace(" ","_")}`)),1),co,k("span",oo,ce(t.percentage)+"% ",1)])))),128))])])};var lo=T({name:"LoaderBoxHighlight"});const mo=ve('<div class="metrics-relative metrics-rounded-full metrics-h-36 metrics-w-36 metrics-animate-pulse metrics-m-auto"><div class="metrics-rounded-full metrics-w-full metrics-h-full metrics-bg-gray-400 metrics-mt-2"></div><div class="metrics-top-0 metrics-left-0 metrics-right-0 metrics-bottom-0 metrics-m-auto metrics-h-24 metrics-w-24 metrics-absolute metrics-bg-white metrics-rounded-full"><div class="metrics-w-full metrics-h-full metrics-m-auto"></div></div></div><div class="metrics-grid metrics-grid-cols-1 metrics-gap-1 metrics-mt-5"><div class="metrics-col-span-1 metrics-flex metrics-my-1.5"><div class="metrics-h-4 metrics-w-6 metrics-rounded-full metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-4 metrics-w-full metrics-ml-4 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div></div><div class="metrics-col-span-1 metrics-flex metrics-my-1.5"><div class="metrics-h-4 metrics-w-6 metrics-rounded-full metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-4 metrics-w-full metrics-ml-4 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div></div><div class="metrics-col-span-1 metrics-flex metrics-my-1.5"><div class="metrics-h-4 metrics-w-6 metrics-rounded-full metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-4 metrics-w-full metrics-ml-4 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div></div><div class="metrics-col-span-1 metrics-flex metrics-my-1.5"><div class="metrics-h-4 metrics-w-6 metrics-rounded-full metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-4 metrics-w-full metrics-ml-4 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div></div></div>',2);lo.render=function(e,t,r,s,i,a){return A(),C("div",null,[mo])};var uo=T({name:"BoxDistribution",components:{BoxError:gi,FakerDonutChart:eo,DonutChart:Kc,LoaderBoxDistribution:lo,BoxNoData:Ha,BoxAnalyticsMustBeLinked:Vs},props:{title:{type:String,default:"Distribution"},query:{type:Object,default:()=>({})},dimension:{type:String,default:"sessionsGroupByCategory"},additionnalQueryParams:{type:Object,default:()=>({limit:20,isoCode:"fr"})},faker:{type:Boolean,default:!1},fakerLimit:{type:Number,default:4},fakerLabels:{type:Array,default:()=>[]},isSession:{type:Boolean,default:!1},tippyContentKey:{type:String,default:""},mustBeGoogleLinked:{type:Boolean,default:!1}},setup(e){if(e.faker)return{faker:!0,result:[!0]};const t=We(),r=re(),s=Z((()=>o(o({},t.getters["main/GET_VARIABLES_QUERY"]),e.additionnalQueryParams))),i=t.getters["main/GET_OPTIONS_QUERY"],{result:a,loading:n,error:c,refetch:m}=ue(e.query,s,i),d=fe(a,[],(t=>e.isSession?t[e.dimension].categories:t[e.dimension])),u=Z((()=>e.isSession?fe(a,[],(t=>t[e.dimension].total.totalCurrent)).value:d.value.reduce(((e,t)=>parseInt(e+=t.currentValue)),0))),p=Z((()=>0===u.value)),g=Z((()=>r.appContext.config.globalProperties.$c(d.value.length))),y=Z((()=>d.value.map(((e,t)=>{const r=e.currentValue/parseInt(u.value)*100,s=parseFloat(e.currentValue).toFixed(2);return l(o({},e),{percentage:r.toFixed(2),currentValue:s,color:g.value[t]})})))),v=Z((()=>e.mustBeGoogleLinked&&!t.getters["main/HAS_GOOGLE_ACCOUNT"]));return{total:u,dataChart:y,result:a,loading:n,error:c,refetch:m,noData:p,showAnalyticsLinkBox:v}}});const po={class:"metrics-intro-y metrics-flex metrics-items-center metrics-h-10"},go={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-5 hover:metrics-overflow-visible metrics-overflow-hidden"},yo=k("div",{class:"sm:ml-auto mt-3 sm:mt-0 relative text-gray-700 dark:text-gray-300"},null,-1),vo={class:"metrics-intro-y metrics-box metrics-p-5 metrics-pt-2 metrics-mt-2 metrics-border-theme-5 metrics-border"},ho={class:"metrics-absolute metrics-top-5 metrics-right-5 metrics-z-50"},bo={key:0,class:"metrics-mt-16"},fo={key:2,class:"metrics-mt-16"},xo={key:3,class:"metrics-mt-16 metrics-pb-16"};uo.render=function(e,t,r,s,i,a){const n=E("InfoIcon"),c=E("Tippy"),o=E("BoxAnalyticsMustBeLinked"),l=E("LoaderBoxDistribution"),m=E("BoxError"),d=E("BoxNoData"),u=E("FakerDonutChart"),p=E("DonutChart");return A(),C("div",null,[k("div",po,[k("h2",go,ce(e.title),1),yo]),k("div",vo,[k("div",ho,[k(c,{tag:"div",content:e.$t(e.tippyContentKey)},{default:w((()=>[k(n,{class:"metrics-w-5 lg:metrics-w-3 metrics-h-auto"})])),_:1},8,["content"])]),e.showAnalyticsLinkBox?(A(),C("div",bo,[k(o,{"large-icon":""})])):e.loading?(A(),C(l,{key:1})):e.error?(A(),C("div",fo,[k(m,{retry:e.refetch,"large-icon":""},null,8,["retry"])])):e.noData?(A(),C("div",xo,[k(d,{"large-icon":""})])):e.result?(A(),C(se,{key:4},[e.faker?(A(),C(u,{key:0,category:e.fakerLabels,limit:e.fakerLimit},null,8,["category","limit"])):(A(),C(p,{key:1,data:e.dataChart,result:e.result,total:e.total},null,8,["data","result","total"]))],64)):D("",!0)])])};var _o=T({name:"Acquisition",components:{BoxUpgradePlanModal:Ui,ReportBoxNumber:_i,RightSection:$n,BoxHighlight:sc,BoxEvolution:xc,BoxDistribution:uo,BoxSyncStatusModal:ki},setup(){const e=R(""),t=R(),r=he(),s=Z((()=>r.getters["main/GET_IS_ADVANCED"])),i=Z((()=>r.getters["main/IS_FIRST_ACCESS"])),a=Z((()=>r.getters["main/IS_FIRST_SYNC"])),n=Z((()=>r.state.main.isoCode)),c=[Vr,zr];N("bind[importantNotesRef]",(e=>{t.value=e}));const o=Z((()=>r.getters["main/GET_PLAN_MODAL_OPENED"]));s.value||setTimeout((function(){r.dispatch("main/SET_PLAN_MODAL_OPENED",!0)}),5e3);return{advancedPlan:s,upgradePlanModalOpened:o,isFirstAccess:i,isFirstSync:a,sessions:Vr,uniqueUsers:qr,salesReportFilter:e,prevImportantNotes:()=>{t.value.tns.goTo("prev")},nextImportantNotes:()=>{t.value.tns.goTo("next")},sessionsByDate:zr,arrayQuerySessions:c,sessionsByCategories:Hr,arrayDimensionsSessions:["sessions","sessionsGroupByDate"],isoCode:n,fakerLabels:["Direct","Social","Email","Affiliates"]}}});const So={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6"},To={class:"metrics-relative metrics-col-span-12 xxl:metrics-col-span-9 metrics-grid metrics-grid-cols-12 metrics-gap-6 metrics-content-start"},Eo={class:"md:metrics-col-span-6 metrics-col-span-12 metrics-mt-5 metrics-z-0"},Co={class:"metrics-intro-y metrics-flex metrics-items-center metrics-h-10 "},ko={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-5"},wo={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6"},Do={class:"metrics-col-span-12 sm:metrics-col-span-12 xl:metrics-col-span-12 metrics-intro-y metrics-mt-2"},Ao={class:"md:metrics-col-span-6 metrics-col-span-12 metrics-z-0 md:metrics-mt-5  metrics-mt-2"},No={class:"metrics-intro-y metrics-flex metrics-items-center metrics-h-10"},Mo={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-5"},Oo={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6 metrics-mt-2 "},Ro={class:"metrics-col-span-12 sm:metrics-col-span-6 xl:metrics-col-span-6 metrics-intro-y"},Po={class:"metrics-col-span-12 sm:metrics-col-span-6 xl:metrics-col-span-6 metrics-intro-y"},Io={class:"metrics-col-span-12 lg:metrics-col-span-6 lg:metrics-mt-8 sm:metrics-mt-0"},Bo={class:"metrics-col-span-12 sm:metrics-col-span-6 lg:metrics-col-span-3  lg:metrics-mt-8 sm:metrics-mt-0"},Lo={class:"metrics-z-0 metrics-col-span-12 xxl:metrics-col-span-3 xxl:metrics-border-l metrics-border-theme-5 metrics--mb-10 metrics-pb-10"};_o.render=function(e,t,r,s,i,a){const n=E("BoxSyncStatusModal"),c=E("BoxUpgradePlanModal"),o=E("BoxHighlight"),l=E("ReportBoxNumber"),m=E("BoxEvolution"),d=E("BoxDistribution"),u=E("RightSection");return A(),C("div",So,[k("div",To,[e.isFirstAccess||e.isFirstSync?(A(),C(n,{key:0})):e.upgradePlanModalOpened?(A(),C(c,{key:1,canBeClosed:""})):D("",!0),k("div",Eo,[k("div",Co,[k("h2",ko,ce(e.$t("tabs.highlights")),1)]),k("div",wo,[k("div",Do,[k(o,{"key-translate":"highlight.topSourceTraffic",query:e.sessionsByCategories,typeValue:"percent",typeKpi:"best",isSession:"",dimension:"sessionsGroupByCategory",additionnalQueryParams:{isoCode:e.isoCode,limit:1},faker:!e.advancedPlan,"must-be-google-linked":!0,tippyContentKey:"highlight.topSourceTrafficTooltip"},null,8,["query","additionnalQueryParams","faker"])])])]),k("div",Ao,[k("div",No,[k("h2",Mo,ce(e.$t("tabs.report")),1)]),k("div",Oo,[k("div",Ro,[k(l,{title:e.$t("boxNumber.sessions"),query:e.sessions,dimension:"sessions",faker:!e.advancedPlan,"tippy-content-key":e.$t("boxNumber.sessionsTooltip"),"must-be-google-linked":!0,icon:"AnalyticsIcon"},null,8,["title","query","faker","tippy-content-key"])]),k("div",Po,[k(l,{title:e.$t("boxNumber.uniqueVisits"),query:e.uniqueUsers,dimension:"uniqueUsers",faker:!e.advancedPlan,"tippy-content-key":e.$t("boxNumber.uniqueVisitsTooltip"),"must-be-google-linked":!0,icon:"AnalyticsIcon"},null,8,["title","query","faker","tippy-content-key"])])])]),k("div",Io,[k(m,{title:e.$t("graph.sessionsEvolution"),queries:e.arrayQuerySessions,dimensions:e.arrayDimensionsSessions,"is-session":!0,faker:!e.advancedPlan,tippyContentKey:"graph.sessionsEvolutionTooltip","must-be-google-linked":!0},null,8,["title","queries","dimensions","faker"])]),k("div",Bo,[k(d,{title:e.$t("graph.trafficDistribution"),query:e.sessionsByCategories,dimension:"sessionsGroupByCategory",isSession:!0,faker:!e.advancedPlan,tippyContentKey:"graph.trafficDistributionTooltip","must-be-google-linked":!0,fakerLabels:e.fakerLabels},null,8,["title","query","faker","fakerLabels"])])]),k("div",Lo,[k(u,{tipscardsLabel:""})])])};var $o=T({name:"ReportTable",components:{BoxNoData:Ha},props:{products:{type:Array,default:()=>[]},previousProducts:{type:Array,default:()=>[]}},setup(e){const t=R(e.products),r=R(e.previousProducts),s=We(),i=Z((()=>s.state.main.compareMode));return{topProductsWithPerf:Z((()=>{let e=[];for(const s in t.value){let i="up";if(r.value.length)for(const e in r.value)if(r.value[e].id===t.value[s].id){if(s===e){i="equal";break}if(s<e){i="down";break}}const a=JSON.parse(JSON.stringify(t[s]));a.progress=i,e.push(a)}return e})),compareMode:i}}});const Go={key:0,class:"metrics-table metrics-table-fixed metrics-w-full"},Uo={key:0,class:" metrics-w-6 metrics-border-b-2 dark:metrics-border-dark-5 whitespace-nowrap metrics-bg-white metrics-p-1"},Yo={class:"metrics-w-3/5 metrics-border-b-2 dark:metrics-border-dark-5 whitespace-nowrap metrics-bg-white metrics-p-1"},Vo={class:"metrics-w-1/5 metrics-border-b-2 dark:metrics-border-dark-5 whitespace-nowrap metrics-bg-white metrics-p-1 metrics-text-right"},qo={class:"metrics-w-1/5 metrics-border-b-2 dark:metrics-border-dark-5 whitespace-nowrap metrics-bg-white metrics-p-1 metrics-text-right"},Fo={key:0,class:"metrics-relative"},Ko={key:2,class:"metrics-w-4 metrics-text-theme-43 metrics-absolute metrics-top-1 metrics-left-0 metrics-text-center"},jo={class:"metrics-w-3/5 metrics-p-1.5 metrics-relative"},zo={class:"metrics-bg-white metrics-truncate hover:metrics-absolute metrics-top-1.5 metrics-pr-1"},Ho={class:"metrics-w-1/5 metrics-p-1.5 metrics-text-right"},Qo={class:"metrics-w-1/5 metrics-p-1.5 metrics-text-right"},Wo={key:1};$o.render=function(e,t,r,s,i,a){const n=E("Tippy"),c=E("arrowUpIcon"),o=E("arrowDownIcon"),l=E("BoxNoData");return A(),C("div",null,[e.topProductsWithPerf.length>0?(A(),C("table",Go,[k("thead",null,[k("tr",null,[e.compareMode?(A(),C("th",Uo)):D("",!0),k("th",Yo,[k(n,{tag:"div",content:e.$t("business.top10.tippy.product")},{default:w((()=>[ne(ce(e.$t("business.top10.product")),1)])),_:1},8,["content"])]),k("th",Vo,[k(n,{tag:"div",content:e.$t("business.top10.tippy.orders")},{default:w((()=>[ne(ce(e.$t("business.top10.orders")),1)])),_:1},8,["content"])]),k("th",qo,ce(e.$t("business.top10.amount")),1)])]),k("tbody",null,[(A(!0),C(se,null,ie(e.topProductsWithPerf,((t,r,s)=>(A(),C("tr",{key:s,class:"metrics-border-b last:metrics-b-0 dark:metrics-border-dark-5"},[e.compareMode?(A(),C("td",Fo,["up"===t.progress?(A(),C(c,{key:0,class:"metrics-w-4 metrics-text-theme-44 metrics-absolute metrics-top-1 metrics-left-0"})):"down"===t.progress?(A(),C(o,{key:1,class:"metrics-w-4 metrics-text-theme-45 metrics-absolute metrics-top-1 metrics-left-0"})):(A(),C("div",Ko," = "))])):D("",!0),k("td",jo,[k("div",zo,ce(t.name),1)]),k("td",Ho,ce(t.quantity),1),k("td",Qo,ce(e.$n(t.amount,"currency")),1)])))),128))])])):(A(),C("div",Wo,[k(l,{"large-icon":""})]))])};var Jo=T({name:"FakerReportTable",setup:()=>({products:new Array(10).fill(null).map(((e,t)=>({id:t,name:be.commerce.productName(),quantity:be.datatype.number(2e3),amount:be.datatype.number(2e3)}))).sort(((e,t)=>e.amount-t.amount))})});const Xo={key:0,class:"metrics-table metrics-table-fixed metrics-w-full"},Zo={class:"metrics-w-3/5 metrics-border-b-2 dark:metrics-border-dark-5 whitespace-nowrap metrics-bg-white metrics-p-1"},el={class:"metrics-w-1/5 metrics-border-b-2 dark:metrics-border-dark-5 whitespace-nowrap metrics-bg-white metrics-p-1 metrics-text-right"},tl={class:"metrics-w-1/5 metrics-border-b-2 dark:metrics-border-dark-5 whitespace-nowrap metrics-bg-white metrics-p-1 metrics-text-right"},rl={class:"metrics-w-3/5 metrics-p-1.5 metrics-relative"},sl={class:"metrics-bg-white metrics-truncate hover:metrics-absolute metrics-top-1.5 metrics-pr-1 metrics-blur-md"},il={class:"metrics-w-1/5 metrics-p-1.5 metrics-text-right metrics-blur-md"},al={class:"metrics-w-1/5 metrics-p-1.5 metrics-text-right metrics-blur-md"};Jo.render=function(e,t,r,s,i,a){const n=E("Tippy");return A(),C("div",null,[e.products.length>0?(A(),C("table",Xo,[k("thead",null,[k("tr",null,[k("th",Zo,[k(n,{tag:"div",content:e.$t("business.top10.tippy.product")},{default:w((()=>[ne(ce(e.$t("business.top10.product")),1)])),_:1},8,["content"])]),k("th",el,[k(n,{tag:"div",content:e.$t("business.top10.tippy.orders")},{default:w((()=>[ne(ce(e.$t("business.top10.orders")),1)])),_:1},8,["content"])]),k("th",tl,ce(e.$t("business.top10.amount")),1)])]),k("tbody",null,[(A(!0),C(se,null,ie(e.products,(t=>(A(),C("tr",{key:t.id,class:"metrics-border-b last:metrics-b-0 dark:metrics-border-dark-5"},[k("td",rl,[k("div",sl,ce(t.name),1)]),k("td",il,ce(t.quantity),1),k("td",al,ce(e.$n(t.amount,"currency")),1)])))),128))])])):D("",!0)])};var nl=T({name:"LoaderBoxTable"});const cl={class:"metrics-grid metrics-grid-cols-4 metrics-gap-2 metrics-h-full metrics-p-5"},ol=ve('<div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div><div class="metrics-h-6 metrics-rounded-sm metrics-bg-gray-400 metrics-animate-pulse"></div>',32);nl.render=function(e,t,r,s,i,a){return A(),C("div",cl,[ol])};var ll=T({name:"BoxReportTable",props:{title:{type:String,default:""},query:{type:Object,default:()=>({})},dimension:{type:String,default:"productTopSeller"},faker:{type:Boolean,default:!1},additionnalQueryParams:{type:Object,default:()=>({})},tippyContentKey:{type:String,default:""},disabledNetworkRequest:{type:Boolean,default:!1}},components:{FakerReportTable:Jo,ReportTable:$o,BoxError:gi,LoaderBoxTable:nl},setup(e){if(e.faker)return{faker:!0,resultTop10Product:!0};const t=We(),r=Z((()=>o(o({},t.getters["main/GET_VARIABLES_QUERY"]),e.additionnalQueryParams))),s=Z((()=>{const r=t.getters["main/GET_OPTIONS_QUERY"];return e.disabledNetworkRequest&&(r.fetchPolicy="no-cache"),r})),{result:i,loading:a,error:n,refetch:c}=ue(e.query,r,s.value);return{resultTop10Product:i,loading:a,error:n,products:fe(i,[],(t=>t[e.dimension].currentPeriod)),previousProducts:fe(i,[],(t=>t[e.dimension].previousPeriod)),refetch:c}}});const ml={class:"metrics-intro-y metrics-block sm:metrics-flex metrics-items-center metrics-h-10"},dl={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-5"},ul={class:"metrics-intro-y metrics-box metrics-p-5 metrics-mt-2 metrics-border-theme-5 metrics-border"},pl={key:0,class:"metrics-absolute metrics-top-5 metrics-right-5 metrics-z-50"},gl={key:2,class:"metrics-mt-20 metrics-pb-20"};ll.render=function(e,t,r,s,i,a){const n=E("InfoIcon"),c=E("Tippy"),o=E("LoaderBoxTable"),l=E("BoxError"),m=E("FakerReportTable"),d=E("ReportTable");return A(),C("div",null,[k("div",ml,[k("h2",dl,ce(e.title),1)]),k("div",ul,[e.tippyContentKey?(A(),C("div",pl,[k(c,{tag:"div",content:e.$t(e.tippyContentKey)},{default:w((()=>[k(n,{class:"metrics-w-5 lg:metrics-w-3 metrics-h-auto"})])),_:1},8,["content"])])):D("",!0),e.loading?(A(),C(o,{key:1})):e.error?(A(),C("div",gl,[k(l,{retry:e.refetch},null,8,["retry"])])):e.resultTop10Product?(A(),C(se,{key:3},[e.faker?(A(),C(m,{key:0})):(A(),C(d,{key:1,products:e.products,previousProducts:e.previousProducts},null,8,["products","previousProducts"]))],64)):D("",!0)])])};var yl=T({name:"Business",components:{BoxUpgradePlanModal:Ui,BoxReportTable:ll,BoxEvolution:xc,BoxHighlight:sc,BoxDistribution:uo,RightSection:$n,BoxSyncStatusModal:ki},setup(){const e=he(),t=Z((()=>e.state.main.isoCode)),r=Z((()=>e.getters["main/GET_IS_ADVANCED"])),s=Z((()=>e.getters["main/IS_FIRST_ACCESS"])),i=Z((()=>e.getters["main/IS_FIRST_SYNC"])),a=[Gr,es],n=Z((()=>e.getters["main/GET_PLAN_MODAL_OPENED"]));return r.value||setTimeout((function(){e.dispatch("main/SET_PLAN_MODAL_OPENED",!0)}),5e3),{advancedPlan:r,upgradePlanModalOpened:n,getTopProduct:Xr,getTopOneProduct:Zr,arrayQueryOrder:a,revenueByCategory:ts,revenueGrossGroupByDistribution:rs,revenueGrossGroupByPaymentsMethods:ys,ArrayDimensionOrderAverage:["orderSum","orderSumGroupByDate"],isFirstSync:i,isFirstAccess:s,isoCode:t,fakerLabels:["revenuenet","refund","shipping","tax"],fakerLabelsPaymentsMethods:["Credit card","E-Transaction","Paypal","Bank transfer"]}}});const vl={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6"},hl={class:"metrics-relative metrics-col-span-12 xxl:metrics-col-span-9 metrics-grid metrics-grid-cols-12 metrics-gap-6 metrics-content-start"},bl={class:"md:metrics-col-span-6 metrics-col-span-12 metrics-mt-5 metrics-z-0"},fl={class:"metrics-intro-y metrics-flex metrics-items-center metrics-h-10"},xl={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-5"},_l={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6"},Sl={class:"metrics-col-span-12 sm:metrics-col-span-12 metrics-intro-y metrics-mt-2"},Tl={class:"metrics-col-span-12 sm:metrics-col-span-12 xl:metrics-col-span-12 metrics-intro-y"},El={class:"md:metrics-col-span-6 metrics-col-span-12 lg:metrics-mt-5  metrics-mt-2"},Cl={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6"},kl={class:"metrics-col-span-12 sm:metrics-col-span-6 xl:metrics-col-span-6 metrics-intro-y"},wl={class:"metrics-col-span-12 sm:metrics-col-span-6 xl:metrics-col-span-6 metrics-intro-y"},Dl={class:"metrics-col-span-12 lg:metrics-col-span-6 lg:metrics-mt-8 sm:metrics-mt-0"},Al={class:"metrics-col-span-12 lg:metrics-col-span-6 lg:metrics-mt-8 metrics-mt-2"},Nl={class:"metrics-z-0 metrics-col-span-12 xxl:metrics-col-span-3 xxl:metrics-border-l metrics-border-theme-5 metrics--mb-10 metrics-pb-10"};yl.render=function(e,t,r,s,i,a){const n=E("BoxSyncStatusModal"),c=E("BoxUpgradePlanModal"),o=E("BoxHighlight"),l=E("BoxDistribution"),m=E("BoxEvolution"),d=E("BoxReportTable"),u=E("RightSection");return A(),C("div",vl,[k("div",hl,[e.isFirstAccess||e.isFirstSync?(A(),C(n,{key:0})):e.upgradePlanModalOpened?(A(),C(c,{key:1,canBeClosed:""})):D("",!0),k("div",bl,[k("div",fl,[k("h2",xl,ce(e.$t("tabs.highlights")),1)]),k("div",_l,[k("div",Sl,[k(o,{"key-translate":"highlight.topCategory",query:e.revenueByCategory,typeValue:"currency",typeKpi:"top",dimension:"revenueGrossByCategories",additionnalQueryParams:{isoCode:e.isoCode},faker:!e.advancedPlan},null,8,["query","additionnalQueryParams","faker"])]),k("div",Tl,[k(o,{"key-translate":"highlight.topProduct",query:e.getTopOneProduct,typeValue:"currency",typeKpi:"best",dimension:"productTopSeller",additionnalQueryParams:{limit:1,isoCode:e.isoCode},"disabled-network-request":"",faker:!e.advancedPlan},null,8,["query","additionnalQueryParams","faker"])])])]),k("div",El,[k("div",Cl,[k("div",kl,[k(l,{title:e.$t("graph.grossRevenueDistribution"),query:e.revenueGrossGroupByDistribution,dimension:"revenueDistribution",faker:!e.advancedPlan,fakerLabels:e.fakerLabels,tippyContentKey:e.$t("graph.grossRevenueDistributionTooltip")},null,8,["title","query","faker","fakerLabels","tippyContentKey"])]),k("div",wl,[k(l,{title:e.$t("graph.revenueGrossByPaymentsMethods"),query:e.revenueGrossGroupByPaymentsMethods,dimension:"revenueGrossGroupByPaymentsMethods",faker:!e.advancedPlan,"faker-labels":e.fakerLabelsPaymentsMethods,"tippy-content-key":e.$t("graph.revenueGrossByPaymentsMethodsTooltip")},null,8,["title","query","faker","faker-labels","tippy-content-key"])])])]),k("div",Dl,[k(m,{title:e.$t("graph.ordersEvolution"),queries:e.arrayQueryOrder,dimensions:e.ArrayDimensionOrderAverage,faker:!e.advancedPlan,tippyContentKey:"graph.ordersEvolutionTooltip"},null,8,["title","queries","dimensions","faker"])]),k("div",Al,[k(d,{title:e.$t("graph.top10Products"),query:e.getTopProduct,faker:!e.advancedPlan,dimension:"productTopSeller",additionnalQueryParams:{limit:10,isoCode:e.isoCode},"disabled-network-request":""},null,8,["title","query","faker","additionnalQueryParams"])])]),k("div",Nl,[k(u)])])};var Ml=T({name:"CustomerKnowledge",components:{ReportBoxNumber:_i,BoxHighlight:sc,BoxDistribution:uo,BoxEvolution:xc,BoxUpgradePlanModal:Ui,RightSection:$n,BoxSyncStatusModal:ki},setup(){const e=R(""),t=R(),r=he(),s=Z((()=>r.getters["main/GET_IS_ADVANCED"])),i=Z((()=>r.getters["main/IS_FIRST_ACCESS"])),a=Z((()=>r.getters["main/IS_FIRST_SYNC"])),n=[Qr,Wr],c=Z((()=>r.getters["main/GET_PLAN_MODAL_OPENED"]));s.value||setTimeout((function(){r.dispatch("main/SET_PLAN_MODAL_OPENED",!0)}),5e3),N("bind[importantNotesRef]",(e=>{t.value=e}));return{orderSumGroupBySource:Jr,orderAverage:Qr,isFirstAccess:i,orderCountPartNewCustomer:us,orderCountPartByCustomerCategory:gs,orderCountPartReturningCustomer:ps,isFirstSync:a,ArrayQueryOrderAverage:n,ArrayDimensionOrderAverage:["orderAverage","orderAverageGroupByDate"],bounceRate:Fr,avgSessions:Kr,cartAbandonedAverage:Ur,avgCartValue:Yr,salesReportFilter:e,upgradePlanModalOpened:c,advancedPlan:s,prevImportantNotes:()=>{t.value.tns.goTo("prev")},nextImportantNotes:()=>{t.value.tns.goTo("next")},fakerLimit:2,fakerLabels:["new_customer","returning_customer"]}}});const Ol={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6"},Rl={class:"metrics-relative metrics-col-span-12 xxl:metrics-col-span-9 metrics-grid metrics-grid-cols-12 metrics-gap-6 metrics-content-start"},Pl={class:"md:metrics-col-span-6 metrics-col-span-12 metrics-mt-5 metrics-z-0"},Il={class:"metrics-intro-y metrics-flex metrics-items-center metrics-h-10"},Bl={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-5"},Ll={class:"metrics-grid metrics-grid-cols-12"},$l={class:"metrics-col-span-12 sm:metrics-col-span-12 xl:metrics-col-span-12 metrics-intro-y metrics-mt-2 metrics-mb-5"},Gl={class:"metrics-col-span-12 sm:metrics-col-span-12 xl:metrics-col-span-12 metrics-intro-y"},Ul={class:"md:metrics-col-span-6 metrics-col-span-12 metrics-z-0 md:metrics-mt-5  metrics-mt-2"},Yl={class:"metrics-intro-y metrics-flex metrics-items-center metrics-h-10"},Vl={class:"metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-5"},ql={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6 metrics-mt-2 metrics-mb-5"},Fl={class:"metrics-col-span-12 sm:metrics-col-span-6 xl:metrics-col-span-6 metrics-intro-y"},Kl={class:"metrics-col-span-12 sm:metrics-col-span-6 xl:metrics-col-span-6 metrics-intro-y"},jl={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6 metrics-mt-2"},zl={class:"metrics-col-span-12 sm:metrics-col-span-6 xl:metrics-col-span-6 metrics-intro-y"},Hl={class:"metrics-col-span-12 sm:metrics-col-span-6 xl:metrics-col-span-6 metrics-intro-y"},Ql={class:"metrics-col-span-12 lg:metrics-col-span-6 lg:metrics-mt-8 sm:metrics-mt-0"},Wl={class:"metrics-col-span-12 sm:metrics-col-span-6 lg:metrics-col-span-3  lg:metrics-mt-8 sm:metrics-mt-0 "},Jl={class:"metrics-z-0 metrics-col-span-12 xxl:metrics-col-span-3 xxl:metrics-border-l metrics-border-theme-5 metrics--mb-10 metrics-pb-10"};Ml.render=function(e,t,r,s,i,a){const n=E("BoxSyncStatusModal"),c=E("BoxUpgradePlanModal"),o=E("BoxHighlight"),l=E("ReportBoxNumber"),m=E("BoxEvolution"),d=E("BoxDistribution"),u=E("RightSection");return A(),C("div",Ol,[k("div",Rl,[e.isFirstAccess||e.isFirstSync?(A(),C(n,{key:0})):e.upgradePlanModalOpened?(A(),C(c,{key:1,canBeClosed:""})):D("",!0),k("div",Pl,[k("div",Il,[k("h2",Bl,ce(e.$t("tabs.highlights")),1)]),k("div",Ll,[k("div",$l,[k(o,{"key-translate":"highlight.averageCart",query:e.orderAverage,typeValue:"percent",typeKpi:"evolution",dimension:"orderAverage",faker:!e.advancedPlan},null,8,["query","faker"])]),k("div",Gl,[k(o,{"key-translate":"highlight.repeatCustomer",query:e.orderCountPartReturningCustomer,typeValue:"percent",typeKpi:"evolution",dimension:"orderCountPartReturningCustomer",faker:!e.advancedPlan,tippyContentKey:"highlight.repeatCustomerTooltip"},null,8,["query","faker"])])])]),k("div",Ul,[k("div",Yl,[k("h2",Vl,ce(e.$t("tabs.report")),1)]),k("div",ql,[k("div",Fl,[k(l,{title:e.$t("boxNumber.averageCartValue"),query:e.avgCartValue,dimension:"orderAverage","is-currency":!0,faker:!e.advancedPlan,"tippy-content-key":e.$t("boxNumber.averageCartValueTooltip")},null,8,["title","query","faker","tippy-content-key"])]),k("div",Kl,[k(l,{title:e.$t("boxNumber.cartAbandonedRate"),query:e.cartAbandonedAverage,dimension:"cartAbandonedAverage","is-percent":!0,faker:!e.advancedPlan,"tippy-content-key":e.$t("boxNumber.cartAbandonedRateTooltip"),"positive-is-lower":!0},null,8,["title","query","faker","tippy-content-key"])])]),k("div",jl,[k("div",zl,[k(l,{title:e.$t("boxNumber.bounceRate"),query:e.bounceRate,dimension:"bounceRate","is-percent":!0,faker:!e.advancedPlan,icon:"AnalyticsIcon","tippy-content-key":e.$t("boxNumber.bounceRateTooltip"),"must-be-google-linked":!0,"positive-is-lower":!0},null,8,["title","query","faker","tippy-content-key"])]),k("div",Hl,[k(l,{title:e.$t("boxNumber.averageSessionDuration"),query:e.avgSessions,dimension:"avgSessions","is-time":!0,faker:!e.advancedPlan,icon:"AnalyticsIcon","tippy-content-key":e.$t("boxNumber.averageSessionDurationTooltip"),"must-be-google-linked":!0},null,8,["title","query","faker","tippy-content-key"])])])]),k("div",Ql,[k(m,{title:e.$t("graph.averageCartEvolution"),queries:e.ArrayQueryOrderAverage,dimensions:e.ArrayDimensionOrderAverage,"is-currency":!0,faker:!e.advancedPlan,tippyContentKey:"graph.averageCartEvolutionTooltip"},null,8,["title","queries","dimensions","faker"])]),k("div",Wl,[k(d,{title:e.$t("graph.customerDistribution"),query:e.orderCountPartByCustomerCategory,dimension:"orderCountPartByCustomerCategory",faker:!e.advancedPlan,tippyContentKey:"graph.customerDistributionTooltip",fakerLabels:e.fakerLabels,fakerLimit:e.fakerLimit},null,8,["title","query","faker","fakerLabels","fakerLimit"])])]),k("div",Jl,[k(u)])])};var Xl=T({name:"BoxAnalyticsMustBeLinked",props:{horizontal:{type:Boolean,default:!1}},setup(){const e=he();return{linkToSettings:()=>{window.location=e.state.main.configurationLink}}}});const Zl={class:"metrics-flex metrics-h-full metrics-w-full metrics-items-center metrics-justify-center metrics-box metrics-p-5 metrics-border-theme-5 metrics-border"},em={class:"metrics-w-full "},tm=k("div",{class:"metrics-intro-x"},[k("div",{class:"metrics-justify-center metrics-flex metrics-mb-2"},[k("img",{alt:"Prestashop Metrics",class:"metrics-w-10",src:qs})])],-1),rm={class:"metrics-mt-3 metrics-intro-x"},sm={class:"metrics-text-center metrics-text-gray-777 metrics-text-xs"};Xl.render=function(e,t,r,s,i,a){const n=E("i18n-t");return A(),C("div",null,[k("div",Zl,[k("div",em,[tm,k("div",rm,[k("div",sm,[k(n,{keypath:"error.analyticsSentence"},{linktext:w((()=>[k("span",{class:"metrics-text-theme-43 metrics-cursor-pointer metrics-underline",onClick:t[1]||(t[1]=(...t)=>e.linkToSettings&&e.linkToSettings(...t))},ce(e.$t("error.analyticsSentenceLink")),1)])),_:1})])])])])])};var im=T({name:"Dashboard",components:{BoxAnalyticsMustBeLinkedLarge:Xl,ReportBoxNumber:_i,BoxEvolution:xc,RightSection:$n,BoxReportTable:ll},setup(){const e=R(""),t=R(),r=Z((()=>i.state.main.isoCode)),s=[$r,jr],i=he();N("bind[importantNotesRef]",(e=>{t.value=e}));const a=Z((()=>i.getters["main/HAS_GOOGLE_ACCOUNT"]));return{conversionRate:os,sessions:Vr,uniqueUsers:qr,bounceRate:Fr,avgSessions:Kr,revenueGross:$r,orderSum:Gr,cartAbandonedAverage:Ur,avgCartValue:Yr,salesReportFilter:e,revenueByDate:jr,sessionsByDate:zr,arrayQueryRevenue:s,arrayDimensionsRevenue:["revenueGross","revenueGrossGroupByDate"],showAnalyticsLinkBox:a,getTopProduct:Xr,isoCode:r}}});const am={class:"metrics-grid metrics-grid-cols-12 metrics-gap-6"},nm={class:"\n        metrics-relative metrics-col-span-12\n        xxl:metrics-col-span-9\n        metrics-grid metrics-grid-cols-12 metrics-gap-6 metrics-content-start\n      "},cm={class:"metrics-col-span-12 metrics-mt-5 metrics-z-0"},om={class:"metrics-intro-y metrics-flex metrics-items-center metrics-h-10"},lm={class:"\n              metrics-text-lg metrics-font-medium metrics-truncate metrics-mr-5\n            "},mm={class:"\n            metrics-grid\n            metrics-grid-cols-12\n            metrics-gap-6\n            metrics-mt-2\n            metrics-mb-5\n          "},dm={class:"\n              metrics-col-span-12\n              sm:metrics-col-span-6\n              lg:metrics-col-span-3\n              metrics-intro-y\n            "},um={class:"\n              metrics-col-span-12\n              sm:metrics-col-span-6\n              lg:metrics-col-span-3\n              metrics-intro-y\n            "},pm={class:"\n              metrics-col-span-12\n              sm:metrics-col-span-6\n              lg:metrics-col-span-3\n              metrics-intro-y\n            "},gm={class:"\n              metrics-col-span-12\n              sm:metrics-col-span-6\n              lg:metrics-col-span-3\n              metrics-intro-y\n            "},ym={key:0,class:"metrics-grid metrics-grid-cols-12 metrics-gap-6 metrics-mt-2"},vm={class:"\n              metrics-col-span-12\n              sm:metrics-col-span-6\n              lg:metrics-col-span-3\n              metrics-intro-y\n            "},hm={class:"\n              metrics-col-span-12\n              sm:metrics-col-span-6\n              lg:metrics-col-span-3\n              metrics-intro-y\n            "},bm={class:"\n              metrics-col-span-12\n              sm:metrics-col-span-6\n              lg:metrics-col-span-3\n              metrics-intro-y\n            "},fm={class:"\n              metrics-col-span-12\n              sm:metrics-col-span-6\n              lg:metrics-col-span-3\n              metrics-intro-y\n            "},xm={key:1,class:"metrics-grid metrics-grid-cols-12 metrics-gap-6 metrics-mt-2"},_m={class:"metrics-col-span-12 metrics-intro-y"},Sm={class:"\n          metrics-col-span-12\n          lg:metrics-col-span-6 lg:metrics-mt-8\n          sm:metrics-mt-0\n        "},Tm={class:"\n          metrics-col-span-12\n          lg:metrics-col-span-6 lg:metrics-mt-8\n          sm:metrics-mt-0\n        "},Em={class:"\n        metrics-z-0 metrics-col-span-12\n        xxl:metrics-col-span-3 xxl:metrics-border-l\n        metrics-border-theme-5 metrics--mb-10 metrics-pb-10\n      "};im.render=function(e,t,r,s,i,a){const n=E("ReportBoxNumber"),c=E("BoxAnalyticsMustBeLinkedLarge"),o=E("BoxEvolution"),l=E("BoxReportTable"),m=E("RightSection");return A(),C("div",am,[k("div",nm,[k("div",cm,[k("div",om,[k("h2",lm,ce(e.$t("tabs.overviewTitle")),1)]),k("div",mm,[k("div",dm,[k(n,{"is-currency":!0,title:e.$t("boxNumber.revenueGross"),query:e.revenueGross,dimension:"revenueGross","tippy-content-key":e.$t("boxNumber.revenueGrossTooltip")},null,8,["title","query","tippy-content-key"])]),k("div",um,[k(n,{title:e.$t("boxNumber.orderSum"),query:e.orderSum,dimension:"orderSum","tippy-content-key":e.$t("boxNumber.orderSumTooltip")},null,8,["title","query","tippy-content-key"])]),k("div",pm,[k(n,{"is-currency":!0,title:e.$t("boxNumber.orderAverage"),query:e.avgCartValue,dimension:"orderAverage","tippy-content-key":e.$t("boxNumber.orderAverageTooltip")},null,8,["title","query","tippy-content-key"])]),k("div",gm,[k(n,{"is-percent":!0,title:e.$t("boxNumber.cartAbandonedRate"),query:e.cartAbandonedAverage,dimension:"cartAbandonedAverage","tippy-content-key":e.$t("boxNumber.cartAbandonedRateTooltip"),"positive-is-lower":!0},null,8,["title","query","tippy-content-key"])])]),e.showAnalyticsLinkBox?(A(),C("div",ym,[k("div",vm,[k(n,{"is-percent":!0,title:e.$t("boxNumber.conversionRate"),query:e.conversionRate,dimension:"conversionRate",icon:"AnalyticsIcon","tippy-content-key":e.$t("boxNumber.conversionRateTooltip"),"must-be-google-linked":!0},null,8,["title","query","tippy-content-key"])]),k("div",hm,[k(n,{title:e.$t("boxNumber.uniqueSession"),query:e.uniqueUsers,dimension:"uniqueUsers",icon:"AnalyticsIcon","tippy-content-key":e.$t("boxNumber.uniqueSessionTooltip"),"must-be-google-linked":!0},null,8,["title","query","tippy-content-key"])]),k("div",bm,[k(n,{"is-percent":!0,title:e.$t("boxNumber.bounceRate"),query:e.bounceRate,dimension:"bounceRate",icon:"AnalyticsIcon","tippy-content-key":e.$t("boxNumber.bounceRateTooltip"),"must-be-google-linked":!0,"positive-is-lower":!0},null,8,["title","query","tippy-content-key"])]),k("div",fm,[k(n,{"is-time":!0,title:e.$t("boxNumber.averageSessionDuration"),query:e.avgSessions,dimension:"avgSessions",icon:"AnalyticsIcon","tippy-content-key":e.$t("boxNumber.averageSessionDurationTooltip"),"must-be-google-linked":!0},null,8,["title","query","tippy-content-key"])])])):(A(),C("div",xm,[k("div",_m,[k(c)])]))]),k("div",Sm,[k(o,{"is-currency":!0,title:e.$t("graph.salesEvolution"),dimensions:e.arrayDimensionsRevenue,queries:e.arrayQueryRevenue,tippyContentKey:e.$t("graph.salesEvolutionTooltip")},null,8,["title","dimensions","queries","tippyContentKey"])]),k("div",Tm,[k(l,{title:e.$t("graph.top10Products"),query:e.getTopProduct,faker:!1,dimension:"productTopSeller",additionnalQueryParams:{limit:10,isoCode:e.isoCode}},null,8,["title","query","additionnalQueryParams"])])]),k("div",Em,[k(m)])])};var Cm=T({setup:()=>({})});Cm.render=function(e,t,r,s,i,a){const n=E("router-view");return A(),C(n)};const km=new class{constructor(){this.get=e=>{let t=localStorage.getItem(e);if(null===t)return null;t=JSON.parse(t);return new Date(t.expires)<new Date?(localStorage.removeItem(e),null):t.value},this.set=(e,t,r)=>{const s=(new Date).getTime(),i=new Date(s+6e4*r);localStorage.setItem(e,JSON.stringify({value:t,expires:i}))}}};var wm=T({name:"LegacyModulesHandler",setup(){const e=he(),t=R(!0),r=Z((()=>e.getters["main/GET_MODULES_IS_ENABLED"])),s=Z((()=>e.getters["main/PSX_IS_CONNECTED"])),i=Z((()=>e.getters["main/IS_LEGACY_STATS_PAGE"]));return P((()=>{const e=km.get("psmetricsEnableDashboardModulesAlert");t.value=null===e})),{modulesIsEnabled:r,psxIsConnected:s,display:t,isLegacyStatsPage:i,close:()=>{km.set("psmetricsEnableDashboardModulesAlert",!0,43200),t.value=!1},toggleModules:()=>{e.dispatch("main/SET_MODULES_IS_ENABLED",!r.value).then((()=>{location.reload()}))}}}});const Dm={key:0,class:"\n        metrics-bg-indigo-100\n        metrics-border-l-4\n        metrics-border-theme-43\n        metrics-text-theme-43\n        metrics-p-4\n        metrics-relative\n      ",role:"alert"},Am={key:0,class:"metrics-pr-6"},Nm={class:"\n          metrics-absolute\n          metrics-top-0\n          metrics-bottom-0\n          metrics-right-0\n          metrics-px-4\n          metrics-py-3\n        "},Mm=k("path",{d:"M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z"},null,-1);wm.render=function(e,t,r,s,i,a){return A(),C("div",null,[!e.isLegacyStatsPage&&e.psxIsConnected&&e.display?(A(),C("div",Dm,[e.modulesIsEnabled?(A(),C("span",Am,[ne(ce(e.$t("alerts.disableDashboardModules.text"))+". ",1),k("a",{class:"\n              metrics-text-theme-43\n              hover:metrics-text-indigo-500\n              metrics-font-semibold\n            ",onClick:t[1]||(t[1]=ae((t=>e.toggleModules()),["prevent"])),href:"#"},ce(e.$t("alerts.disableDashboardModules.cta"))+". ",1)])):(A(),C(se,{key:1},[ne(ce(e.$t("alerts.enableDashboardModules.text"))+". ",1),k("a",{class:"\n            metrics-text-theme-43\n            hover:metrics-text-indigo-500\n            metrics-font-semibold\n          ",onClick:t[2]||(t[2]=ae((t=>e.toggleModules()),["prevent"])),href:"#"},ce(e.$t("alerts.enableDashboardModules.cta"))+". ",1)],64)),k("span",Nm,[(A(),C("svg",{class:"\n            metrics-fill-current metrics-h-6 metrics-w-6 metrics-text-theme-43\n            hover:metrics-text-indigo-500\n          ",role:"button",viewBox:"0 0 20 20",onClick:t[3]||(t[3]=(...t)=>e.close&&e.close(...t))},[Mm]))])])):D("",!0)])};var Om=T({components:{TopBarButtonDate:Tr,ReportBoxNumber:_i,BoxSynchronization:ua,BoxNextFeatures:Ea,BoxNewVersionAvailable:bn,BoxUpgradePlan:ea,LegacyModulesHandler:wm},setup(){const e=he(),t=e.state.main.canShowDashboard,r=Z((()=>e.state.main.user.email)),s=Z((()=>e.state.main.metricsLink)),i=Z((()=>e.state.main.configurationLink));let a=R(!0),n=!1,c="1f7f8a936d0bf02d1a36ae49bb4f010c";P((()=>{const t=m(),r=t.subtract(7,"day"),s=t.subtract(1,"day");e.dispatch("main/SET_SLUG_BUTTON_DATE","7d"),e.dispatch("main/SET_ERROR_ON_KPI",!1),e.dispatch("main/SET_DATE_RANGE",{startDate:r.locale(e.state.main.isoCode).format("YYYY-MM-DD"),endDate:s.locale(e.state.main.isoCode).format("YYYY-MM-DD")}),e.dispatch("main/SET_COMPARE_MODE",!0);const i=u();let c;if(e.state.main.shop.shopUuid&&!i){const t={shopId:e.state.main.shop.shopUuid},{result:r}=ue(cs,t);c=fe(r,void 0,(e=>e)),c.data&&(localStorage.clear(),p(c.data.account))}else c=JSON.parse(i);n="metrics-advanced"===c.plan,a.value=!1}));const{appContext:{config:{globalProperties:{$segment:d}}}}=re(),u=()=>{const e=c+"=",t=document.cookie.split(";");for(let r=0;r<t.length;r++){let s=t[r];for(;" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(e))return s.substring(e.length,s.length)}return""},p=e=>{const t=new Date;t.setTime(t.getTime()+864e5);const r="expires="+t.toUTCString();document.cookie=c+"="+JSON.stringify(e)+";"+r+";path=/"};return{metricsIsConfigured:t,account:{},loading:a,metricsAdvanced:n,redirectToSettings:()=>{d().track("[MTR] Dashboard Start Setup",l(o({},""!=r.value&&{email:r}),{module:"ps_metrics"})),window.location.href=i.value},getCookieAccount:u,setCookieAccount:p,redirectToMetrics:()=>{d().track("[MTR] Dashboard Open Metrics",o({module:"ps_metrics"},""!==e.state.main.user.email&&{email:e.state.main.user.email})),window.location.href=s.value},revenueGross:$r,orderSum:Gr,conversionRate:os,uniqueUsers:qr}}});const Rm={id:"psmetricsApp",class:"dashboard metrics-mb-5"},Pm={key:0},Im={id:"metrics-preview"},Bm={class:"metrics-bg-white"},Lm={class:"metrics-preview-header metrics-flex"},$m=k("img",{class:"metrics-h-6 metrics-w-6",src:bs},null,-1),Gm={class:"metrics-uppercase metrics-px-2.5"},Um={class:"metrics-m-5"},Ym={class:"metrics-flex metrics-justify-between"},Vm={class:"metrics-mb-4 metrics-text-gray-600 metrics-italic"},qm={key:0,class:"metrics-grid metrics-grid-cols-12 metrics-gap-3"},Fm={class:"\n                  metrics-flex\n                  metrics-col-span-12\n                  metrics-justify-center\n                  metrics-items-center\n                  metrics-mt-2\n                "},Km={class:"metrics-mr-3"},jm={key:1},zm={id:"metrics-preview"},Hm={class:"metrics-preview-header metrics-flex"},Qm=k("img",{class:"metrics-h-6 metrics-w-6",src:bs},null,-1),Wm={class:"metrics-uppercase metrics-px-2.5"},Jm={class:"metrics-p-5 metrics-bg-white"},Xm={class:"metrics-flex metrics-justify-evenly metrics-items-center"},Zm=k("div",{class:"metrics-p-0 sm:metrics-col-span-3"},[k("img",{class:"metrics-w-48",src:hs})],-1),ed={class:"sm:metrics-col-span-8"},td={class:"metrics-float-right metrics-py-5"};Om.render=function(e,t,r,s,i,a){const n=E("TopBarButtonDate"),c=E("ReportBoxNumber"),o=E("BoxNewVersionAvailable"),l=E("BoxSynchronization"),m=E("BoxUpgradePlan"),d=E("BoxNextFeatures"),u=E("LegacyModulesHandler");return A(),C("div",Rm,[e.metricsIsConfigured?(A(),C("div",Pm,[k("div",Im,[k("div",Bm,[k("div",Lm,[$m,k("span",Gm,ce(e.$t("general.title")),1)]),k("div",Um,[k("div",Ym,[k(n,{class:"metrics-mb-4"}),k("span",Vm,ce(e.$t("dates.comparedWithPreviousPeriod")),1)]),e.loading?D("",!0):(A(),C("div",qm,[k(c,{class:"\n                  metrics-col-span-12\n                  sm:metrics-col-span-6\n                  xl:metrics-col-span-3\n                  metrics-intro-y\n                ","is-currency":!0,title:e.$t("boxNumber.revenueGross"),query:e.revenueGross,dimension:"revenueGross","tippy-content-key":e.$t("boxNumber.revenueGrossTooltip")},null,8,["title","query","tippy-content-key"]),k(c,{class:"\n                  metrics-col-span-12\n                  sm:metrics-col-span-6\n                  xl:metrics-col-span-3\n                  metrics-intro-y\n                ",title:e.$t("boxNumber.orderSum"),query:e.orderSum,dimension:"orderSum","tippy-content-key":e.$t("boxNumber.orderSumTooltip")},null,8,["title","query","tippy-content-key"]),k(c,{class:"\n                  metrics-col-span-12\n                  sm:metrics-col-span-6\n                  xl:metrics-col-span-3\n                  metrics-intro-y\n                ","is-percent":!0,title:e.$t("boxNumber.conversionRate"),query:e.conversionRate,dimension:"conversionRate",icon:"AnalyticsIcon","tippy-content-key":e.$t("boxNumber.conversionRateTooltip"),"must-be-google-linked":!0},null,8,["title","query","tippy-content-key"]),k(c,{class:"\n                  metrics-col-span-12\n                  sm:metrics-col-span-6\n                  xl:metrics-col-span-3\n                  metrics-intro-y\n                ",title:e.$t("boxNumber.uniqueSession"),query:e.uniqueUsers,dimension:"uniqueUsers",icon:"AnalyticsIcon","tippy-content-key":e.$t("boxNumber.uniqueSessionTooltip"),"must-be-google-linked":!0},null,8,["title","query","tippy-content-key"]),k("div",Fm,[k("span",Km,ce(e.$t("general.textBeforeOpenMetrics")),1),k("button",{type:"button",class:"\n                    metrics-button metrics-button--md\n                    metrics-zoom-in\n                    metrics-border\n                    metrics-bg-theme-43\n                    metrics-border-theme-43\n                    dark:metrics-border-dark-5\n                    metrics-text-white\n                  ",onClick:t[1]||(t[1]=t=>e.redirectToMetrics())},ce(e.$t("general.openMetrics")),1)]),k(o,{"show-title":!1}),e.metricsAdvanced?(A(),C(l,{key:0,"show-title":!1,account:e.account},null,8,["account"])):(A(),C(m,{key:1,"show-title":!1})),k(d,{"show-title":!1})]))])])])])):(A(),C("div",jm,[k("div",zm,[k("div",Hm,[Qm,k("span",Wm,ce(e.$t("general.title")),1)]),k("div",Jm,[k("div",Xm,[Zm,k("div",ed,[k("h1",null,ce(e.$t("incentivePanel.title")),1),k("div",null,[k("ul",null,[k("li",null,ce(e.$t("incentivePanel.gather")),1),k("li",null,ce(e.$t("incentivePanel.monitor")),1),k("li",null,ce(e.$t("incentivePanel.decisions")),1)]),k("div",td,[k("button",{type:"button",class:"\n                      metrics-button metrics-button--md\n                      metrics-border metrics-bg-theme-43 metrics-border-theme-43\n                      dark:metrics-border-dark-5\n                      metrics-text-white metrics-m-auto\n                    ",onClick:t[2]||(t[2]=t=>e.redirectToSettings())},ce(e.$t("incentivePanel.link")),1)])])])])])])])),k(u,{class:"metrics-mt-4"})])};const rd=We(),sd=[{path:"/",component:Cm,children:[{path:"",component:vs,children:[{path:"",name:"tab_overview",component:im,meta:{todayIsAccessible:!0}},{path:"business",name:"tab_business",component:yl,meta:{todayIsAccessible:!1}},{path:"customer-knowledge",name:"tab_customer_knowledge",component:Ml,meta:{todayIsAccessible:!1}},{path:"acquisition",name:"tab_acquisition",component:_o,meta:{todayIsAccessible:!1}}]}]},{path:"/preview",name:"metrics_preview",component:Om,meta:{exclude:!0}},{path:"/:pathMatch(.*)*",component:Ps,meta:{exclude:!0}}],id=we({history:De(),routes:sd,scrollBehavior:(e,t,r)=>r||{left:0,top:0}});id.beforeEach(((e,t,r)=>{rd.dispatch("main/SET_TODAY_ACCESSIBLE",!!e.meta.todayIsAccessible&&e.meta.todayIsAccessible),rd.dispatch("main/SET_ERROR_ON_KPI",!1),rd.getters["main/GET_PLAN_MODAL_OPENED"]&&rd.dispatch("main/SET_PLAN_MODAL_OPENED",!1),"metrics_preview"!==e.name&&"dashboard"===rd.state.main.app?r({name:"metrics_preview"}):r(),r()}));const ad=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#00BCD4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722"];const nd=e=>{e.config.globalProperties.$c=e=>function(e){if(e>ad.length)throw new Error("getRamdomColor: too much elements taken than available colors");return ad.slice(0,e)}(e)};function cd(e,t,r){const s=[];let i=m(e);const a=m(t);for(;i<=a;)s.push(m(i).format("YYYY-MM-DD")),i=m(i).add(1,"days");return"week"===r?s.map((e=>`${m(e).year()}-${m(e).format("ww")}`)).filter(od):"month"===r?function(e){return e.map((e=>`${m(e).year()}-${m(e).format("MM")}`)).filter(od)}(s):"hour"===r?function(e){const t=[];for(let r=0;r<24;r++){let s="";s=r<=9?e[0]+" 0"+r+":00:00":e[0]+" "+r+":00:00",t.push(s)}return t}(s):s}function od(e,t,r){return r.indexOf(e)===t}m.extend(Se),m.extend(Te);const ld=e=>{e.config.globalProperties.$dr=(e,t,r)=>cd(e,t,r)};const md=Ae(ot).use(Qe).use(id).use(Sr);var dd;md.use(Ne,{router:id,debug:!1,id:"iqrIKrNdu66IoCgzyHPeaaUweBKZmJmC",pageCategory:"[MTR]"}),(e=>{e.component("Tippy",vr),e.component("Chart",ut),e.component("TippyContent",gr),e.component("LoadingIcon",gt),e.component("TinySlider",ur);for(const[t,r]of Object.entries(H))r.props.size.default="24",e.component(t,r)})(md),(dd=md).use(dt),dd.use(nd),dd.use(ld),md.mount("#app");
