diff --git a/index.js b/index.js index 1083bdc..ddf8267 100644 --- a/index.js +++ b/index.js @@ -29,4 +29,4 @@ E.version="2.29.4",Up(Ct),E.fn=A,E.min=Rb,E.max=Fb,E.now=Eb,E.utc=Ie,E.unix=c0,E * https://www.chartjs.org * (c) 2022 chartjs-adapter-moment Contributors * Released under the MIT license - */const U0={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Kl._date.override(typeof E=="function"?{_id:"moment",formats:function(){return U0},parse:function(e,t){return typeof e=="string"&&typeof t=="string"?e=E(e,t):e instanceof E||(e=E(e)),e.isValid()?e.valueOf():null},format:function(e,t){return E(e).format(t)},add:function(e,t,s){return E(e).add(t,s).valueOf()},diff:function(e,t,s){return E(e).diff(E(t),s)},startOf:function(e,t,s){return e=E(e),t==="isoWeek"?(s=Math.trunc(Math.min(Math.max(0,s),6)),e.isoWeekday(s).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return E(e).endOf(t).valueOf()}}:{});var qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var no={exports:{}};(function(e,t){var s=200,i="__lodash_hash_undefined__",n=800,r=16,a=9007199254740991,o="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",u="[object Date]",f="[object Error]",g="[object Function]",m="[object GeneratorFunction]",v="[object Map]",x="[object Number]",k="[object Null]",D="[object Object]",P="[object Proxy]",T="[object RegExp]",O="[object Set]",N="[object String]",I="[object Undefined]",j="[object WeakMap]",H="[object ArrayBuffer]",nt="[object DataView]",Z="[object Float32Array]",J="[object Float64Array]",Rt="[object Int8Array]",Ut="[object Int16Array]",G="[object Int32Array]",Ot="[object Uint8Array]",_t="[object Uint8ClampedArray]",qt="[object Uint16Array]",Fs="[object Uint32Array]",Ve=/[\\^$.*+?()[\]{}|]/g,ps=/^\[object .+?Constructor\]$/,$e=/^(?:0|[1-9]\d*)$/,ht={};ht[Z]=ht[J]=ht[Rt]=ht[Ut]=ht[G]=ht[Ot]=ht[_t]=ht[qt]=ht[Fs]=!0,ht[o]=ht[l]=ht[H]=ht[h]=ht[nt]=ht[u]=ht[f]=ht[g]=ht[v]=ht[x]=ht[D]=ht[T]=ht[O]=ht[N]=ht[j]=!1;var ms=typeof qi=="object"&&qi&&qi.Object===Object&&qi,Es=typeof self=="object"&&self&&self.Object===Object&&self,Pe=ms||Es||Function("return this")(),yr=t&&!t.nodeType&&t,Is=yr&&!0&&e&&!e.nodeType&&e,vr=Is&&Is.exports===yr,ti=vr&&ms.process,xr=function(){try{var p=Is&&Is.require&&Is.require("util").types;return p||ti&&ti.binding&&ti.binding("util")}catch{}}(),wr=xr&&xr.isTypedArray;function oo(p,y,M){switch(M.length){case 0:return p.call(y);case 1:return p.call(y,M[0]);case 2:return p.call(y,M[0],M[1]);case 3:return p.call(y,M[0],M[1],M[2])}return p.apply(y,M)}function lo(p,y){for(var M=-1,W=Array(p);++M-1}function Mr(p,y){var M=this.__data__,W=ai(M,p);return W<0?(++this.size,M.push([p,y])):M[W][1]=y,this}Le.prototype.clear=kr,Le.prototype.delete=bo,Le.prototype.get=_o,Le.prototype.has=yo,Le.prototype.set=Mr;function We(p){var y=-1,M=p==null?0:p.length;for(this.clear();++y1?M[ct-1]:void 0,Ft=ct>2?M[2]:void 0;for(xt=p.length>3&&typeof xt=="function"?(ct--,xt):void 0,Ft&&Rr(M[0],M[1],Ft)&&(xt=ct<3?void 0:xt,ct=1),y=Object(y);++W-1&&p%1==0&&p0){if(++y>=n)return arguments[0]}else y=0;return p.apply(void 0,arguments)}}function C(p){if(p!=null){try{return si.call(p)}catch{}try{return p+""}catch{}}return""}function R(p,y){return p===y||p!==p&&y!==y}var F=Pr(function(){return arguments}())?Pr:function(p){return Mt(p)&&ve.call(p,"callee")&&!Pt.call(p,"callee")},U=Array.isArray;function $(p){return p!=null&&kt(p.length)&&!vt(p)}function yt(p){return Mt(p)&&$(p)}var gt=$t||cn;function vt(p){if(!st(p))return!1;var y=ys(p);return y==g||y==m||y==c||y==P}function kt(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=a}function st(p){var y=typeof p;return p!=null&&(y=="object"||y=="function")}function Mt(p){return p!=null&&typeof p=="object"}function Xt(p){if(!Mt(p)||ys(p)!=D)return!1;var y=Q(p);if(y===null)return!0;var M=ve.call(y,"constructor")&&y.constructor;return typeof M=="function"&&M instanceof M&&si.call(M)==po}var Wt=wr?co(wr):Do;function Gt(p){return Po(p,di(p))}function di(p){return $(p)?So(p,!0):Co(p)}var an=rn(function(p,y,M){oi(p,y,M)});function on(p){return function(){return p}}function ln(p){return p}function cn(){return!1}e.exports=an})(no,no.exports);const q0=no.exports,uv="";Fi.register(lp,mp,ap,hs,ka,$n,zn,Ii,ip,Yn,Nn);const X0={name:"AreaChart",components:{LineChart:Bp,BarChart:Hp,PieChart:jp},inheritAttrs:!1,props:{type:{type:String,default:"Line",validator:e=>["Line","Bar","Pie"].includes(e)},chartData:{type:Array,default:()=>[]},chartOptions:{type:Object,default(){return{}}},chartLabels:{type:Array,default(){return[]}},label:{type:String,default:""},headerSize:{type:String,default:"medium"},xTitle:{type:String|null,default:null},yTitle:{type:String|null,default:null},download:{type:String|Boolean,default:!1},width:{type:Number,default:null},height:{type:Number,default:null},autoColorize:{type:Boolean,default:!1},autoGreyize:{type:Boolean,default:!1},showLegend:{type:Boolean,default:!0},fill:{type:Boolean|String,default:!0},xTimeAxis:{type:Boolean,default:!1},yVisitsAxis:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1}},computed:{isEmpty(){return!this.chartData||this.chartData.length<1},hasDataForCurrentPeriod(){var e;return!this.isEmpty&&((e=this.chartData)==null?void 0:e.some(t=>t.data&&t.data.length>=1))},fileDownloadStr(){var t;const e=new Date;return String((t=this.download)!=null?t:"MyChart.png").replace(".png","-"+e.getFullYear()+"-"+Number(e.getMonth()+1).toString().padStart(2,"0")+"-"+Number(e.getDate()).toString().padStart(2,"0")+".png")},fullChartOptions(){var e,t;return q0({},this.chartOptions,{animation:{onComplete:this.generateDownloadLink},barPercentage:.5,width:this.width,height:this.height,maintainAspectRatio:!1,borderColor:"#000",borderWidth:1,datasets:{line:{borderWidth:0,pointRadius:0,pointHitRadius:3,pointHoverRadius:3}},plugins:{legend:{maxHeight:75},filler:{propagate:!0},interaction:{},tooltip:{filter:function(s,i,n,r){return!(r.datasets.length>5&&s.raw===0)}}}},this.type==="Pie"?{}:{scales:{xAxis:{afterSetDimensions:s=>{s.maxHeight=25}}}},this.fill?{fill:!0,backgroundColor:typeof this.fill=="string"?this.fill:"#313740"}:{},this.xTimeAxis?{scales:{xAxis:{title:{display:!1,text:(e=this.xTitle)!=null?e:this.$t("simplestats.charts.time","Time")},type:"time",time:{unit:"month",displayFormats:{month:"MMM YYYY"}}}}}:{},this.yVisitsAxis?{scales:{yAxis:{title:{display:!0,text:(t=this.yTitle)!=null?t:this.$t("simplestats.charts.visits","Visits")},beginAtZero:!0}}}:{},this.stacked?{scales:{yAxis:{stacked:!0}}}:{},this.showLegend===!1?{plugins:{legend:{display:!1,title:{display:!1}}},scales:{xAxis:{display:!1,title:{display:!1}},yAxis:{tickLength:5}}}:{})},fullChartData(){const e=this,t=this.chartData.map((s,i)=>{var n;return(n=s.ss_uid)!=null?n:i});return{labels:this.chartLabels,datasets:this.chartData.map(function(s,i){if((e.autoColorize||e.autoGreyize)===!0&&!s.backgroundColor){let n=.3,r=.4;if(e.type==="Pie"){s.backgroundColor=[];const u=e.chartLabels.length>1?e.chartLabels.length:1;let f=0;for(let g of e.chartLabels)s.backgroundColor.push(e.autoColorize?"hsl("+Number(360/u*f).toFixed(0)+","+Number(n*100).toFixed(0)+"%,"+Number(r*100).toFixed(0)+"%)":"hsl(0,0%,"+Number(40+40/u*f).toFixed(0)+"%)"),f++;return s}const a=s.ss_uid?s.ss_uid.split("/"):[""+i];let o=0,l=0,c=1,h=null;a.forEach((u,f)=>{s.ss_uid?f===0?h=t.filter(v=>String(v).includes("/")===!1):h=t.filter(function(v){const x=a.slice(0,f).join("/");return String(v).startsWith(x)}):h=e.chartData.map((v,x)=>x);const g=h.indexOf(s.ss_uid?a.slice(0,f+1).join("/"):i),m=h.length>1?h.length:1;e.autoColorize?f===0?o=1/m*g:(c/=m,l+=c*.8*g,f>1&&(n-=10)):(c/=m,l+=c*g)}),s.backgroundColor="hsl("+Number(o*360).toFixed(0)+", "+Number(n*100*(e.autoGreyize?0:1)).toFixed(0)+"%, "+Number(r*100+l*50).toFixed(0)+"%)"}return s})}}},data(){return{base64image:""}},methods:{generateDownloadLink(){var e;this.download!==!1&&((e=this.$refs.linechart)!=null&&e._data._chart?this.$refs.linechart._data._chart.canvas&&(this.base64image=this.$refs.linechart._data._chart.toBase64Image("image/png")):this.base64image="")}}};var K0=function(){var t=this,s=t._self._c;return s("div",[t.label.length>0?s("k-headline",{attrs:{size:t.headerSize}},[t._v(t._s(t.label))]):t._e(),s("div",{class:"ss-chart ss-"+t.type.toLowerCase()+"-chart"},[t.download!==!1&&t.base64image.length?s("div",{staticClass:"ss-download-link"},[s("a",{attrs:{href:t.base64image,download:t.fileDownloadStr}},[s("k-button",{attrs:{text:"Download",tooltip:"Exports the chart as a PNG file that you can archive or share.",icon:"download"}})],1)]):t._e(),t.hasDataForCurrentPeriod?s("div",{staticClass:"ss-chart-wrapper"},[s(t.type+"Chart",{ref:"linechart",tag:"component",attrs:{"chart-data":t.fullChartData,"chart-options":t.fullChartOptions,height:t.height,width:t.width}})],1):t.isEmpty?s("k-empty",{staticClass:"emptyChart",attrs:{layout:"block"}},[t._v(t._s(t.$t("simplestats.nodatayet","No data yet")))]):s("k-empty",{staticClass:"emptyChart",attrs:{layout:"block"}},[t._v(t._s(t.$t("simplestats.nodatafortimerange","There is no data for the selected time range.")))])],1)],1)},Z0=[],J0=ne(X0,K0,Z0,!1,null,null,null,null);const br=J0.exports,dv="",Q0={extends:Ys,components:{SearchableTable:un,AreaChart:br},data(){return{rows:[],columns:{},chartPeriodLabels:[],visitsOverTimeData:[],pageVisitsOverTimeData:[],languagesOverTimeData:[],globalLanguagesData:[],languagesAreEnabled:!1,userLocale:"en",chartOptions:{animation:{onComplete:this.generateDownloadLink}}}},props:{},computed:{pageVisitsOverTimeDataSorted(){var e;return(e=this.pageVisitsOverTimeData)==null?void 0:e.sort((t,s)=>t.ss_uids.ss_uid?1:0)}},methods:{loadData(e){this.columns=e.pagestatslabels,this.rows=e.pagestatsdata,this.chartPeriodLabels=e.chartperiodlabels,this.visitsOverTimeData=e.visitsovertimedata,this.pageVisitsOverTimeData=e.pagevisitsovertimedata,this.globalLanguagesData=e.globallanguagesdata,this.chartLanguagesLabels=e.chartlanguageslabels,this.languagesOverTimeData=e.languagesovertimedata,this.languagesAreEnabled=e.languagesAreEnabled,this.userLocale=window.panel.$language?window.panel.$language.locale:this.$store.state.i18n?this.$store.state.i18n.locale:""}}};var ty=function(){var t=this,s=t._self._c;return s("k-grid",{attrs:{gutter:"medium"}},[s("k-column",[s("k-headline",{attrs:{size:"medium"}},[t._v(t._s(t.$t("simplestats.visits.visitsovertime","Visits over time")))]),s("area-chart",{attrs:{type:"Bar","chart-data":t.visitsOverTimeData,"chart-options":t.chartOptions,"chart-labels":t.chartPeriodLabels,download:"Site_Visits.png","x-title":t.$t("simplestats.charts.time","Time"),"y-title":t.$t("simplestats.charts.visits","Visits"),height:100,"x-time-axis":!0,"y-visits-axis":!0,"show-legend":!1,fill:!0}})],1),s("k-column",[s("k-headline",{attrs:{size:"medium"}},[t._v(t._s(t.$t("simplestats.visits.pagevisitsovertime")))]),s("area-chart",{attrs:{"chart-data":t.pageVisitsOverTimeDataSorted,"chart-labels":t.chartPeriodLabels,"chart-options":t.chartOptions,download:"Site_PageVisits.png","x-title":t.$t("simplestats.charts.time"),"y-title":t.$t("simplestats.charts.visits"),height:450,stacked:!0,"auto-colorize":!0,"x-time-axis":!0,"y-visits-axis":!0,fill:!0}})],1),t.languagesAreEnabled?s("k-column",{attrs:{width:"3/4"}},[s("area-chart",{attrs:{"chart-data":t.languagesOverTimeData,"chart-labels":t.chartPeriodLabels,"chart-options":t.chartOptions,download:"Site_LanguagesOverTime.png","x-title":t.$t("simplestats.charts.time"),"y-title":t.$t("simplestats.charts.visits"),height:250,stacked:!0,"auto-colorize":!0,fill:!0,"x-time-axis":!0,"y-visits-axis":!0,label:t.$t("simplestats.visits.languagesovertime")}})],1):t._e(),t.languagesAreEnabled?s("k-column",{attrs:{width:"1/4"}},[s("k-headline",[t._v(t._s(t.$t("simplestats.visits.globallanguages")))]),t.globalLanguagesData.length>0?s("area-chart",{attrs:{type:"Pie",download:"Site_LanguagePopularity.png","chart-data":t.globalLanguagesData,"chart-labels":t.chartLanguagesLabels,"chart-options":t.chartOptions,"auto-colorize":!0,height:200,fill:!0}}):t._e()],1):t._e(),s("k-column",[s("searchable-table",{attrs:{columns:t.columns,rows:t.rows,layout:"table",label:t.$t("simplestats.visits.visitedpages")}})],1)],1)},ey=[],sy=ne(Q0,ty,ey,!1,null,null,null,null);const iy=sy.exports,fv="",ny={extends:Ys,components:{AreaChart:br},data(){return{devicesData:[],devicesLabels:[],devicesOverTimeData:[],chartPeriodLabels:[],browsersData:[],browsersLabels:[],systemsData:[],systemsLabels:[]}},methods:{loadData(e){this.devicesData=e.devicesdata,this.devicesLabels=e.deviceslabels,this.browsersData=e.enginesdata,this.browsersLabels=e.engineslabels,this.devicesOverTimeData=e.devicesovertime,this.chartPeriodLabels=e.chartperiodlabels,this.systemsData=e.systemsdata,this.systemsLabels=e.systemslabels}}};var ry=function(){var t=this,s=t._self._c;return s("k-grid",{attrs:{gutter:"medium"}},[s("k-column",{attrs:{width:"1/3"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.devicesData,"chart-labels":t.devicesLabels,download:"Site_Devices.png",label:t.$t("simplestats.devices.graph.devices"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/3"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.browsersData,"chart-labels":t.browsersLabels,download:"Site_BrowserEngines.png",label:t.$t("simplestats.devices.graph.engines"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/3"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.systemsData,"chart-labels":t.systemsLabels,download:"Site_OperatingSystems.png",label:t.$t("simplestats.devices.graph.oses"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/1"}},[s("area-chart",{attrs:{type:"Line","chart-data":t.devicesOverTimeData,"chart-labels":t.chartPeriodLabels,download:"Site_DevicesEvolution.png",label:t.$t("simplestats.devices.graph.devicehistory"),"header-size":"large","x-title":t.$t("simplestats.charts.time"),"y-title":t.$t("simplestats.devices.graph.devicehistory.y"),stacked:!0,fill:!0,"auto-colorize":!0,"x-time-axis":!0,"y-visits-axis":!0,height:300}})],1)],1)},ay=[],oy=ne(ny,ry,ay,!1,null,null,null,null);const ly=oy.exports,gv="",cy={extends:Ys,components:{AreaChart:br,SearchableTable:un},props:{dateFrom:{type:String,required:!0},dateTo:{type:String,required:!0}},data(){return{chartPeriodLabels:[],refererDomainsData:[],refererDomainsLabels:[],refererMediumData:[],refererMediumLabels:[],refererTableData:[],refererTableLabels:{},referersByMediumOverTimeData:[],userLocale:"en",timeOptions:{layout:{padding:{left:5,right:15,top:5,bottom:10}},scales:{xAxes:[{type:"time",time:{unit:"month",displayFormats:{month:"MMM YYYY"}}}],yAxes:[{stacked:!0}]}}}},methods:{loadData(e){this.chartPeriodLabels=e.chartperiodlabels,this.refererDomainsData=e.referersbydomaindata,this.refererDomainsLabels=e.referersbydomainlabels,this.refererMediumData=e.referersbymediumdata,this.refererMediumLabels=e.referersbymediumlabels,this.refererTableData=e.refererstabledata,this.refererTableLabels=e.refererstablelabels,this.referersByMediumOverTimeData=e.referersbymediumovertimedata,this.userLocale=window.panel.$language?window.panel.$language.code:""}}};var hy=function(){var t=this,s=t._self._c;return s("k-grid",{attrs:{gutter:"medium"}},[s("k-column",{attrs:{width:"1/2"}},[t.refererMediumData.length>0?s("area-chart",{attrs:{type:"Pie","chart-data":t.refererMediumData,"chart-labels":t.refererMediumLabels,download:"Site_ReferrersByMedium.png",label:t.$t("simplestats.referers.referersbymedium","Referers by medium"),fill:!0,"auto-colorize":!0,height:200}}):t._e()],1),s("k-column",{attrs:{width:"1/2"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.refererDomainsData,"chart-labels":t.refererDomainsLabels,download:"Site_ReferrersByDomain.png",label:t.$t("simplestats.referers.referersbydomain","Referers by domain"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/1"}},[s("area-chart",{attrs:{type:"Line","chart-data":t.referersByMediumOverTimeData,"chart-labels":t.chartPeriodLabels,download:"Site_ReferersEvolution.png",label:t.$t("simplestats.referers.referersovertime"),"y-title":t.$t("simplestats.charts.hitspermedium","Hits per medium"),stacked:!0,fill:!0,"auto-colorize":!0,"x-time-axis":!0,"y-visits-axis":!0,height:300}})],1),s("k-column",{attrs:{width:"1/1"}},[s("k-line-field")],1),s("k-column",{attrs:{width:"1/1"}},[s("searchable-table",{attrs:{rows:t.refererTableData,columns:t.refererTableLabels,label:t.$t("simplestats.referers.allreferers")}})],1)],1)},uy=[],dy=ne(cy,hy,uy,!1,null,null,null,null);const fy=dy.exports,pv="",gy={extends:"k-pages-section",data(){return{dbHistory:[],dbHistoryLabels:{},upgradeRequired:!1,softwareDbVersion:"unknown",dbVersion:"undefined",dbRequirements:"unknown",dbRequirementsPassed:!0,unlockUpgrade:!1,isUpdatingDb:!1,updateMessage:null,updateMessageTheme:"",databaseLocation:"",databaseSize:""}},components:{SearchableTable:un},filters:{prettyBytes:function(e){if(e=Number(e),typeof e!="number"||isNaN(e))return"?? kb";var t,s,i=e<0,n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"];return i&&(e=-e),e<1?(i?"-":"")+e+" B":(t=Math.min(Math.floor(Math.log(e)/Math.log(1e3)),n.length-1),e=(e/Math.pow(1e3,t)).toFixed(2)*1,s=n[t],(i?"-":"")+e+" "+s)}},created(){this.load()},methods:{load(){this.updateMessage=null,this.$api.get("simplestats/listdbinfo").then(e=>{this.isLoading=!1,this.dbHistoryLabels=e.dbHistoryLabels,this.dbHistory=e.dbHistory,this.upgradeRequired=e.upgradeRequired,this.softwareDbVersion=e.softwareDbVersion,this.dbVersion=e.dbVersion,this.databaseLocation=e.databaseLocation,this.databaseSize=e.databaseSize,this.updateMessage=null}).catch(e=>{this.isLoading=!1,this.updateMessage=e.message,this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3})}),this.$api.get("simplestats/checkrequirements").then(e=>{this.isLoading=!1,this.dbRequirements=e.dbRequirements,this.dbRequirementsPassed=e.dbRequirementsPassed}).catch(e=>{this.isLoading=!1,this.dbRequirements=e.message,this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3})})},acceptUpgrade(e){this.unlockUpgrade=e},requestUpgrade(e){e.stopPropagation(),this.unlockUpgrade?(this.isUpdatingDb=!0,this.updateMessage=null,this.$api.get("simplestats/dbupgrade").then(t=>{this.isUpdatingDb=!1,this.updateMessage=t.message,this.updateMessageTheme=t.status?"positive":"negative"}).catch(t=>{this.isUpdatingDb=!1,this.error=t.message,this.$store.dispatch("notification/open",{type:"error",message:t.message,timeout:5e3})})):this.$store.dispatch("notification/open",{type:"error",message:"Before hitting that button, please ensure to backup your database file !",timeout:5e3})}}};var py=function(){var t=this,s=t._self._c;return s("div",{staticClass:"dbinformation"},[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.title")))]),s("k-headline",[t._v(t._s(t.$t("simplestats.info.db.title")))]),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.file"),value:t.databaseLocation,icon:"file-zip"}}),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.size"),value:t._f("prettyBytes")(t.databaseSize),icon:"download"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.dbversion"),value:t.dbVersion,icon:"bolt"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.softwareversion"),value:t.softwareDbVersion,icon:"bolt"}}),s("br"),s("br"),s("searchable-table",{attrs:{rows:t.dbHistory,columns:t.dbHistoryLabels,label:t.$t("simplestats.info.db.versionhistory")}}),s("k-line-field"),s("k-headline",[t._v(t._s(t.$t("simplestats.info.dbreqs.title")))]),t.dbRequirementsPassed?s("div",[s("k-info-field",{attrs:{theme:"positive",text:t.$t("simplestats.info.dbreqs.positive")}})],1):s("div",[s("k-info-field",{attrs:{theme:"negative",text:t.$t("simplestats.info.dbreqs.negative")}}),s("hr"),t._v(" "+t._s(t.dbRequirements)+" ")],1),s("br"),s("div",{staticClass:"upgrade"},[s("br"),s("br"),t.upgradeRequired?s("div",[t.updateMessage?s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.info.dbupdate.result"),text:t.updateMessage,theme:t.updateMessageTheme}}),s("k-button",{attrs:{theme:"neutral"},on:{click:t.load}},[t._v(t._s(t.$t("simplestats.info.dbupdate.refresh")))])],1):s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.info.dbupdate.required"),theme:"negative",text:t.$t("simplestats.info.dbupdate.requiredmsg")}}),s("br"),s("k-checkbox-input",{attrs:{value:t.unlockUpgrade,label:t.$t("simplestats.info.dbupdate.isbackedup")},on:{input:t.acceptUpgrade}}),s("br"),s("k-button",{attrs:{icon:"bolt"},on:{click:t.requestUpgrade}},[t._v(t._s(t.$t("simplestats.info.dbupdate.go")))]),t.isUpdatingDb?s("k-label",[t._v(t._s(t.$t("simplestats.loading")))]):t._e()],1)]):t.updateMessage==null?s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.info.dbupdate.title"),text:t.$t("simplestats.info.dbupdate.isuptodate"),theme:"positive"}})],1):t.updateMessage!==null?s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.loaderror"),text:t.updateMessage,theme:"negative"}})],1):t._e()])],1)},my=[],by=ne(gy,py,my,!1,null,null,null,null);const _y=by.exports,mv="",yy={extends:Ys,data(){return{saltIsSet:!1,trackingPeriodName:"",trackingSince:"",uniqueSeconds:"",enableReferers:!1,enableDevices:!1,enableVisits:!1,enableVisitLanguages:!1,ignoredRoles:[],ignoredPages:[],ignoredTemplates:[],logFile:"",logLevels:[]}},computed:{trackingFeatures(){var e=[];return this.enableReferers&&e.push(this.$t("simplestats.info.config.tracking.referrers","Referers")),this.enableDevices&&e.push(this.$t("simplestats.info.config.tracking.devices","Devices")),this.enableVisits&&e.push(this.$t("simplestats.info.config.tracking.visits","Page Visits")),this.enableVisitLanguages&&e.push(this.$t("simplestats.info.config.tracking.languages","Page Visitors")),e}},methods:{loadData(e){this.saltIsSet=e.saltIsSet,this.trackingPeriodName=e.trackingPeriodName,this.trackingSince=e.trackingSince,this.uniqueSeconds=e.uniqueSeconds,this.enableReferers=e.enableReferers,this.enableDevices=e.enableDevices,this.enableVisits=e.enableVisits,this.enableVisitLanguages=e.enableVisitLanguages,this.ignoredRoles=e.ignoredRoles,this.ignoredPages=e.ignoredPages,this.logFile=e.logFile,this.logLevels=e.logLevels,this.ignoredTemplates=e.ignoredTemplates}}};var vy=function(){var t=this,s=t._self._c;return s("div",{staticClass:"configuration"},[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.config.title")))]),s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.config.tracking")))]),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.periodname"),value:t.trackingPeriodName,icon:"clock"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.periodsecs"),value:t.uniqueSeconds,after:t.$t("simplestats.charts.seconds"),icon:"clock"}}),s("k-toggle-field",{attrs:{name:"",disabled:!0,label:t.$t("simplestats.info.config.tracking.salted"),value:t.saltIsSet,icon:"key"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.features"),value:t.trackingFeatures,icon:"globe"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.ignore.roles"),value:t.ignoredRoles,icon:"users"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.ignore.ids"),value:t.ignoredPages,icon:"page"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.ignore.templates"),value:t.ignoredTemplates,icon:"page"}}),s("br"),s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.config.log.title")))]),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.log.file"),value:t.logFile,icon:"file-code"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.log.level"),value:t.logLevels,icon:"bug"}}),s("br"),!t.isLoading&&!t.saltIsSet?s("k-info-field",{attrs:{label:t.$t("simplestats.info.config.tracking.unsalted"),theme:"negative",text:t.$t("simplestats.info.config.tracking.unsaltedwarn")}}):t._e()],1)},xy=[],wy=ne(yy,vy,xy,!1,null,null,null,null);const Sy=wy.exports,bv="",ky={name:"list-viewer",props:{arrayData:{type:Array,default:[]},depth:{type:Number,default:0}},methods:{}};var My=function(){var t=this,s=t._self._c;return s("div",[t.arrayData?s("ul",{style:{paddingLeft:20*t.depth+"px"}},t._l(t.arrayData,function(i,n,r){return s("li",t._b({key:n,class:{isChild:t.subpage,"text-danger":t.hasError}},"li",t.arrayData.status,!1),[typeof i=="Array"||typeof i=="object"?s("div",[s("span",[t._v(" "+t._s(n)+" = ")]),(typeof i=="Array"||typeof i=="object")&&t.depth<10?s("list-viewer",{attrs:{"array-data":i,depth:t.depth+1}}):t._e()],1):s("div",[s("span",[t._v(" "+t._s(n)+" = "+t._s(i)+" ")])])])}),0):t._e()])},Dy=[],Cy=ne(ky,My,Dy,!1,null,null,null,null);const Oy=Cy.exports,_v="",Py={name:"TrackingTester",components:{ListViewer:Oy},data(){let e=new Date,t=new Date;return t.setDate(e.getDate()-30),{isLoading:!0,error:"",currentDevice:"",currentUserAgent:this.currentUserAgentJS,customDevice:"",customUserAgent:"",referrerField:"",referrerResponse:null,unlockGenerator:!1,generatorMode:"randommulti",generatorTo:e.toString(),generatorFrom:t.toString(),generatorResponse:null}},created(){this.load()},computed:{currentUserAgentJS(){return navigator.userAgent},formattedCurrentUA(){return this.currentDevice&&this.currentDevice!==""?this.currentDevice.device+" - "+this.currentDevice.system+" - "+this.currentDevice.engine:"-"},formattedCustomUA(){return this.customDevice&&this.customDevice!==""?this.customDevice.device+" - "+this.customDevice.system+" - "+this.customDevice.engine:"-"},formattedReferrer(){return this.referrerResponse?this.referrerResponse.medium?this.referrerResponse.host+" - - "+this.referrerResponse.source+" - "+this.referrerResponse.url+" ("+this.referrerResponse.medium+")":this.referrerResponse.error?this.referrerResponse.error:"Error...":"-"},formattedReferrerUrl(){if(this.referrerResponse){if(this.referrerResponse.url)return this.referrerResponse.url;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"},formattedReferrerSource(){if(this.referrerResponse){if(this.referrerResponse.source)return this.referrerResponse.source;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"},formattedReferrerHost(){if(this.referrerResponse){if(this.referrerResponse.host)return this.referrerResponse.host;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"},formattedReferrerMedium(){if(this.referrerResponse){if(this.referrerResponse.medium)return this.referrerResponse.medium;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"}},methods:{load(){this.$api.get("simplestats/trackingtester").then(e=>{this.isLoading=!1,this.currentDevice=e.currentDeviceInfo,this.currentUserAgent=e.currentUserAgent}).catch(e=>{this.isLoading=!1,this.error=e.message,this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3})})},testReferrer(){this.$api.get("simplestats/trackingtester/referrer?referrer="+encodeURIComponent(this.referrerField)).then(e=>{e&&typeof e.referrerInfo=="string"?this.referrerResponse={error:e.referrerInfo}:e&&typeof e.referrerInfo=="object"?this.referrerResponse=e.referrerInfo:this.referrerResponse={error:"Data format error !"}}).catch(e=>{e&&e.message?this.referrerResponse=e.message:this.referrerResponse="Loading error !"})},testUserAgent(){this.$api.get("simplestats/trackingtester/ua?ua="+encodeURIComponent(this.customUserAgent)).then(e=>{typeof e=="string"?this.customDevice={error:e}:typeof e=="object"?this.customDevice=e:this.customDevice={error:"Data format error !"}}).catch(e=>{e&&e.message?this.customDevice=e.message:this.customDevice="Loading Error !"})},acceptGenerate(e){this.unlockGenerator=e},generateStats(){this.$api.get("simplestats/trackingtester/generatestats?proceed="+(this.unlockGenerator?"yes":"no")+"&from="+new Date(this.generatorFrom).getTime()*.001+"&to="+new Date(this.generatorTo).getTime()*.001+"&mode="+this.generatorMode).then(e=>{this.generatorResponse=e}).catch(e=>{this.generatorResponse={status:"false",error:"Loading Error = "+e.message}})}}};var Ty=function(){var t=this,s=t._self._c;return s("k-grid",{staticClass:"trackingtester",attrs:{gutter:"large"}},[s("k-column",{attrs:{width:"1/1"}},[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.tester.title")))])],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.tester.device")))]),s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.device.currentua"),value:t.currentUserAgent,icon:"display"}}),s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.device.currentdetected"),value:t.formattedCurrentUA,icon:"display"}}),s("k-form",{on:{submit:t.testUserAgent}},[s("k-text-field",{staticClass:"field-with-btn",attrs:{counter:!1,disabled:!1,label:t.$t("simplestats.info.tester.device.customua"),icon:"display"},model:{value:t.customUserAgent,callback:function(i){t.customUserAgent=i},expression:"customUserAgent"}}),s("k-button",{staticClass:"floating-btn",on:{click:t.testUserAgent}},[t._v("Go!")]),this.customDevice?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.device.customdetected"),value:t.formattedCustomUA,icon:"display"}}):t._e()],1),this.customDevice?s("k-box",{attrs:{theme:"info",text:t.$t("simplestats.info.tester.device.note")}}):t._e()],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.tester.generator")))]),s("k-form",{on:{submit:t.generateStats}},[s("k-select-field",{attrs:{label:t.$t("simplestats.info.tester.generator.generatorMode"),options:[{value:"all",text:"Static : all pages"},{value:"randomsingle",text:"Single random page"},{value:"randommulti",text:"Multiple random pages"}]},model:{value:t.generatorMode,callback:function(i){t.generatorMode=i},expression:"generatorMode"}}),s("k-date-field",{attrs:{label:t.$t("simplestats.info.tester.generator.datefrom"),time:!1},model:{value:t.generatorFrom,callback:function(i){t.generatorFrom=i},expression:"generatorFrom"}}),s("k-date-field",{attrs:{label:t.$t("simplestats.info.tester.generator.dateto"),time:!1},model:{value:t.generatorTo,callback:function(i){t.generatorTo=i},expression:"generatorTo"}}),s("k-field",{attrs:{translate:!1,label:t.$t("simplestats.info.tester.generator.unlockgenerator")}},[s("k-checkbox-input",{style:{padding:".5em"},attrs:{value:t.unlockGenerator,theme:"field",novalidate:!0},on:{input:t.acceptGenerate}}),s("k-button",{style:{border:"1px solid black",padding:"0 1em",borderRadius:"3px"},on:{click:t.generateStats}},[t._v("Go!")])],1),t.generatorResponse&&t.generatorResponse.data?s("k-field",{attrs:{translate:!1,label:"Result"}},[s("list-viewer",{staticClass:"k-input",style:{padding:"1em"},attrs:{"array-data":t.generatorResponse.data,"data-theme":"field"}})],1):t._e(),t.generatorResponse&&t.generatorResponse.error?s("k-textarea-field",{attrs:{label:"Error!",buttons:!1,disabled:!0},model:{value:t.generatorResponse.error,callback:function(i){t.$set(t.generatorResponse,"error",i)},expression:"generatorResponse.error"}}):t._e()],1)],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.tester.referrer")))]),s("k-form",{on:{submit:t.testReferrer}},[s("k-text-field",{staticClass:"field-with-btn",attrs:{counter:!1,disabled:!1,label:t.$t("simplestats.info.tester.referrer.field"),icon:"globe"},model:{value:t.referrerField,callback:function(i){t.referrerField=i},expression:"referrerField"}}),s("k-button",{staticClass:"floating-btn",attrs:{name:"btn"},on:{click:t.testReferrer}},[t._v("Go!")]),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.host"),value:t.formattedReferrerHost,icon:"globe"}}):t._e(),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.source"),value:t.formattedReferrerSource,icon:"globe"}}):t._e(),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.medium"),value:t.formattedReferrerMedium,icon:"globe"}}):t._e(),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.url"),value:t.formattedReferrerUrl,icon:"globe"}}):t._e()],1)],1)],1)},Ay=[],Ly=ne(Py,Ty,Ay,!1,null,null,null,null);const Ry=Ly.exports;var ro={exports:{}};(function(e,t){(function(s,i){i(t)})(qi,function(s){s.PipsMode=void 0,function(_){_.Range="range",_.Steps="steps",_.Positions="positions",_.Count="count",_.Values="values"}(s.PipsMode||(s.PipsMode={})),s.PipsType=void 0,function(_){_[_.None=-1]="None",_[_.NoValue=0]="NoValue",_[_.LargeValue=1]="LargeValue",_[_.SmallValue=2]="SmallValue"}(s.PipsType||(s.PipsType={}));function i(_){return n(_)&&typeof _.from=="function"}function n(_){return typeof _=="object"&&typeof _.to=="function"}function r(_){_.parentElement.removeChild(_)}function a(_){return _!=null}function o(_){_.preventDefault()}function l(_){return _.filter(function(d){return this[d]?!1:this[d]=!0},{})}function c(_,d){return Math.round(_/d)*d}function h(_,d){var L=_.getBoundingClientRect(),z=_.ownerDocument,Y=z.documentElement,Q=P(z);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(Q.x=0),d?L.top+Q.y-Y.clientTop:L.left+Q.x-Y.clientLeft}function u(_){return typeof _=="number"&&!isNaN(_)&&isFinite(_)}function f(_,d,L){L>0&&(x(_,d),setTimeout(function(){k(_,d)},L))}function g(_){return Math.max(Math.min(_,100),0)}function m(_){return Array.isArray(_)?_:[_]}function v(_){_=String(_);var d=_.split(".");return d.length>1?d[1].length:0}function x(_,d){_.classList&&!/\s/.test(d)?_.classList.add(d):_.className+=" "+d}function k(_,d){_.classList&&!/\s/.test(d)?_.classList.remove(d):_.className=_.className.replace(new RegExp("(^|\\b)"+d.split(" ").join("|")+"(\\b|$)","gi")," ")}function D(_,d){return _.classList?_.classList.contains(d):new RegExp("\\b"+d+"\\b").test(_.className)}function P(_){var d=window.pageXOffset!==void 0,L=(_.compatMode||"")==="CSS1Compat",z=d?window.pageXOffset:L?_.documentElement.scrollLeft:_.body.scrollLeft,Y=d?window.pageYOffset:L?_.documentElement.scrollTop:_.body.scrollTop;return{x:z,y:Y}}function T(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function O(){var _=!1;try{var d=Object.defineProperty({},"passive",{get:function(){_=!0}});window.addEventListener("test",null,d)}catch{}return _}function N(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function I(_,d){return 100/(d-_)}function j(_,d,L){return d*100/(_[L+1]-_[L])}function H(_,d){return j(_,_[0]<0?d+Math.abs(_[0]):d-_[0],0)}function nt(_,d){return d*(_[1]-_[0])/100+_[0]}function Z(_,d){for(var L=1;_>=d[L];)L+=1;return L}function J(_,d,L){if(L>=_.slice(-1)[0])return 100;var z=Z(L,_),Y=_[z-1],Q=_[z],K=d[z-1],Pt=d[z];return K+H([Y,Q],L)/I(K,Pt)}function Rt(_,d,L){if(L>=100)return _.slice(-1)[0];var z=Z(L,d),Y=_[z-1],Q=_[z],K=d[z-1],Pt=d[z];return nt([Y,Q],(L-K)*I(K,Pt))}function Ut(_,d,L,z){if(z===100)return z;var Y=Z(z,_),Q=_[Y-1],K=_[Y];return L?z-Q>(K-Q)/2?K:Q:d[Y-1]?_[Y-1]+c(z-_[Y-1],d[Y-1]):z}var G=function(){function _(d,L,z){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[z||!1],this.xNumSteps=[!1],this.snap=L;var Y,Q=[];for(Object.keys(d).forEach(function(K){Q.push([m(d[K]),K])}),Q.sort(function(K,Pt){return K[0][0]-Pt[0][0]}),Y=0;Ythis.xPct[Y+1];)Y++;else d===this.xPct[this.xPct.length-1]&&(Y=this.xPct.length-2);!z&&d===this.xPct[Y+1]&&Y++,L===null&&(L=[]);var Q,K=1,Pt=L[Y],tt=0,It=0,ie=0,$t=0;for(z?Q=(d-this.xPct[Y])/(this.xPct[Y+1]-this.xPct[Y]):Q=(this.xPct[Y+1]-d)/(this.xPct[Y+1]-this.xPct[Y]);Pt>0;)tt=this.xPct[Y+1+$t]-this.xPct[Y+$t],L[Y+$t]*K+100-Q*100>100?(It=tt*Q,K=(Pt-100*Q)/L[Y+$t],Q=1):(It=L[Y+$t]*tt/100*K,K=0),z?(ie=ie-It,this.xPct.length+$t>=1&&$t--):(ie=ie+It,this.xPct.length-$t>=1&&$t++),Pt=L[Y+$t]*K;return d+ie},_.prototype.toStepping=function(d){return d=J(this.xVal,this.xPct,d),d},_.prototype.fromStepping=function(d){return Rt(this.xVal,this.xPct,d)},_.prototype.getStep=function(d){return d=Ut(this.xPct,this.xSteps,this.snap,d),d},_.prototype.getDefaultStep=function(d,L,z){var Y=Z(d,this.xPct);return(d===100||L&&d===this.xPct[Y-1])&&(Y=Math.max(Y-1,1)),(this.xVal[Y]-this.xVal[Y-1])/z},_.prototype.getNearbySteps=function(d){var L=Z(d,this.xPct);return{stepBefore:{startValue:this.xVal[L-2],step:this.xNumSteps[L-2],highestStep:this.xHighestCompleteStep[L-2]},thisStep:{startValue:this.xVal[L-1],step:this.xNumSteps[L-1],highestStep:this.xHighestCompleteStep[L-1]},stepAfter:{startValue:this.xVal[L],step:this.xNumSteps[L],highestStep:this.xHighestCompleteStep[L]}}},_.prototype.countStepDecimals=function(){var d=this.xNumSteps.map(v);return Math.max.apply(null,d)},_.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},_.prototype.convert=function(d){return this.getStep(this.toStepping(d))},_.prototype.handleEntryPoint=function(d,L){var z;if(d==="min"?z=0:d==="max"?z=100:z=parseFloat(d),!u(z)||!u(L[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(z),this.xVal.push(L[0]);var Y=Number(L[1]);z?this.xSteps.push(isNaN(Y)?!1:Y):isNaN(Y)||(this.xSteps[0]=Y),this.xHighestCompleteStep.push(0)},_.prototype.handleStepPoint=function(d,L){if(L){if(this.xVal[d]===this.xVal[d+1]){this.xSteps[d]=this.xHighestCompleteStep[d]=this.xVal[d];return}this.xSteps[d]=j([this.xVal[d],this.xVal[d+1]],L,0)/I(this.xPct[d],this.xPct[d+1]);var z=(this.xVal[d+1]-this.xVal[d])/this.xNumSteps[d],Y=Math.ceil(Number(z.toFixed(3))-1),Q=this.xVal[d]+this.xNumSteps[d]*Y;this.xHighestCompleteStep[d]=Q}},_}(),Ot={to:function(_){return _===void 0?"":_.toFixed(2)},from:Number},_t={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},qt={tooltips:".__tooltips",aria:".__aria"};function Fs(_,d){if(!u(d))throw new Error("noUiSlider: 'step' is not numeric.");_.singleStep=d}function Ve(_,d){if(!u(d))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");_.keyboardPageMultiplier=d}function ps(_,d){if(!u(d))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");_.keyboardMultiplier=d}function $e(_,d){if(!u(d))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");_.keyboardDefaultStep=d}function ht(_,d){if(typeof d!="object"||Array.isArray(d))throw new Error("noUiSlider: 'range' is not an object.");if(d.min===void 0||d.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");_.spectrum=new G(d,_.snap||!1,_.singleStep)}function ms(_,d){if(d=m(d),!Array.isArray(d)||!d.length)throw new Error("noUiSlider: 'start' option is incorrect.");_.handles=d.length,_.start=d}function Es(_,d){if(typeof d!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");_.snap=d}function Pe(_,d){if(typeof d!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");_.animate=d}function yr(_,d){if(typeof d!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");_.animationDuration=d}function Is(_,d){var L=[!1],z;if(d==="lower"?d=[!0,!1]:d==="upper"&&(d=[!1,!0]),d===!0||d===!1){for(z=1;z<_.handles;z++)L.push(d);L.push(!1)}else{if(!Array.isArray(d)||!d.length||d.length!==_.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");L=d}_.connect=L}function vr(_,d){switch(d){case"horizontal":_.ort=0;break;case"vertical":_.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function ti(_,d){if(!u(d))throw new Error("noUiSlider: 'margin' option must be numeric.");d!==0&&(_.margin=_.spectrum.getDistance(d))}function xr(_,d){if(!u(d))throw new Error("noUiSlider: 'limit' option must be numeric.");if(_.limit=_.spectrum.getDistance(d),!_.limit||_.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function wr(_,d){var L;if(!u(d)&&!Array.isArray(d))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(d)&&!(d.length===2||u(d[0])||u(d[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(d!==0){for(Array.isArray(d)||(d=[d,d]),_.padding=[_.spectrum.getDistance(d[0]),_.spectrum.getDistance(d[1])],L=0;L<_.spectrum.xNumSteps.length-1;L++)if(_.padding[0][L]<0||_.padding[1][L]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var z=d[0]+d[1],Y=_.spectrum.xVal[0],Q=_.spectrum.xVal[_.spectrum.xVal.length-1];if(z/(Q-Y)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function oo(_,d){switch(d){case"ltr":_.dir=0;break;case"rtl":_.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function lo(_,d){if(typeof d!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var L=d.indexOf("tap")>=0,z=d.indexOf("drag")>=0,Y=d.indexOf("fixed")>=0,Q=d.indexOf("snap")>=0,K=d.indexOf("hover")>=0,Pt=d.indexOf("unconstrained")>=0,tt=d.indexOf("drag-all")>=0,It=d.indexOf("smooth-steps")>=0;if(Y){if(_.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");ti(_,_.start[1]-_.start[0])}if(Pt&&(_.margin||_.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");_.events={tap:L||Q,drag:z,dragAll:tt,smoothSteps:It,fixed:Y,snap:Q,hover:K,unconstrained:Pt}}function co(_,d){if(d!==!1)if(d===!0||n(d)){_.tooltips=[];for(var L=0;L<_.handles;L++)_.tooltips.push(d)}else{if(d=m(d),d.length!==_.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");d.forEach(function(z){if(typeof z!="boolean"&&!n(z))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),_.tooltips=d}}function ho(_,d){if(d.length!==_.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");_.handleAttributes=d}function uo(_,d){if(!n(d))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");_.ariaFormat=d}function fo(_,d){if(!i(d))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");_.format=d}function go(_,d){if(typeof d!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");_.keyboardSupport=d}function ei(_,d){_.documentElement=d}function Xi(_,d){if(typeof d!="string"&&d!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");_.cssPrefix=d}function si(_,d){if(typeof d!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof _.cssPrefix=="string"?(_.cssClasses={},Object.keys(d).forEach(function(L){_.cssClasses[L]=_.cssPrefix+d[L]})):_.cssClasses=d}function ve(_){var d={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Ot,format:Ot},L={step:{r:!1,t:Fs},keyboardPageMultiplier:{r:!1,t:Ve},keyboardMultiplier:{r:!1,t:ps},keyboardDefaultStep:{r:!1,t:$e},start:{r:!0,t:ms},connect:{r:!0,t:Is},direction:{r:!0,t:oo},snap:{r:!1,t:Es},animate:{r:!1,t:Pe},animationDuration:{r:!1,t:yr},range:{r:!0,t:ht},orientation:{r:!1,t:vr},margin:{r:!1,t:ti},limit:{r:!1,t:xr},padding:{r:!1,t:wr},behaviour:{r:!0,t:lo},ariaFormat:{r:!1,t:uo},format:{r:!1,t:fo},tooltips:{r:!1,t:co},keyboardSupport:{r:!0,t:go},documentElement:{r:!1,t:ei},cssPrefix:{r:!0,t:Xi},cssClasses:{r:!0,t:si},handleAttributes:{r:!1,t:ho}},z={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:_t,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};_.format&&!_.ariaFormat&&(_.ariaFormat=_.format),Object.keys(L).forEach(function(tt){if(!a(_[tt])&&z[tt]===void 0){if(L[tt].r)throw new Error("noUiSlider: '"+tt+"' is required.");return}L[tt].t(d,a(_[tt])?_[tt]:z[tt])}),d.pips=_.pips;var Y=document.createElement("div"),Q=Y.style.msTransform!==void 0,K=Y.style.transform!==void 0;d.transformRule=K?"transform":Q?"msTransform":"webkitTransform";var Pt=[["left","top"],["right","bottom"]];return d.style=Pt[d.dir][d.ort],d}function Sr(_,d,L){var z=T(),Y=N(),Q=Y&&O(),K=_,Pt,tt,It,ie,$t,at=d.spectrum,Te=[],Tt=[],Ht=[],Zi=0,Kt={},bs=_.ownerDocument,ii=d.documentElement||bs.documentElement,ni=bs.body,mo=bs.dir==="rtl"||d.ort===1?0:100;function Ae(b,w){var S=bs.createElement("div");return w&&x(S,w),b.appendChild(S),S}function Le(b,w){var S=Ae(b,d.cssClasses.origin),C=Ae(S,d.cssClasses.handle);if(Ae(C,d.cssClasses.touchArea),C.setAttribute("data-handle",String(w)),d.keyboardSupport&&(C.setAttribute("tabindex","0"),C.addEventListener("keydown",function(F){return Do(F,w)})),d.handleAttributes!==void 0){var R=d.handleAttributes[w];Object.keys(R).forEach(function(F){C.setAttribute(F,R[F])})}return C.setAttribute("role","slider"),C.setAttribute("aria-orientation",d.ort?"vertical":"horizontal"),w===0?x(C,d.cssClasses.handleLower):w===d.handles-1&&x(C,d.cssClasses.handleUpper),S}function kr(b,w){return w?Ae(b,d.cssClasses.connect):!1}function bo(b,w){var S=Ae(w,d.cssClasses.connects);tt=[],It=[],It.push(kr(S,b[0]));for(var C=0;C= 2) required for mode 'count'.");for(var w=b.values-1,S=100/w,C=[];w--;)C[w]=w*S;return C.push(100),Cr(C,b.stepped)}return b.mode===s.PipsMode.Positions?Cr(b.values,b.stepped):b.mode===s.PipsMode.Values?b.stepped?b.values.map(function(R){return at.fromStepping(at.getStep(at.toStepping(R)))}):b.values:[]}function Cr(b,w){return b.map(function(S){return at.fromStepping(w?at.getStep(S):S)})}function _s(b){function w(gt,vt){return Number((gt+vt).toFixed(7))}var S=xo(b),C={},R=at.xVal[0],F=at.xVal[at.xVal.length-1],U=!1,$=!1,yt=0;return S=l(S.slice().sort(function(gt,vt){return gt-vt})),S[0]!==R&&(S.unshift(R),U=!0),S[S.length-1]!==F&&(S.push(F),$=!0),S.forEach(function(gt,vt){var kt,st,Mt,Xt=gt,Wt=S[vt+1],Gt,di,an,on,ln,cn,p,y=b.mode===s.PipsMode.Steps;for(y&&(kt=at.xNumSteps[vt]),kt||(kt=Wt-Xt),Wt===void 0&&(Wt=Xt),kt=Math.max(kt,1e-7),st=Xt;st<=Wt;st=w(st,kt)){for(Gt=at.toStepping(st),di=Gt-yt,ln=di/(b.density||1),cn=Math.round(ln),p=di/cn,Mt=1;Mt<=cn;Mt+=1)an=yt+Mt*p,C[an.toFixed(5)]=[at.fromStepping(an),0];on=S.indexOf(st)>-1?s.PipsType.LargeValue:y?s.PipsType.SmallValue:s.PipsType.NoValue,!vt&&U&&st!==Wt&&(on=0),st===Wt&&$||(C[Gt.toFixed(5)]=[st,on]),yt=Gt}}),C}function wo(b,w,S){var C,R,F=bs.createElement("div"),U=(C={},C[s.PipsType.None]="",C[s.PipsType.NoValue]=d.cssClasses.valueNormal,C[s.PipsType.LargeValue]=d.cssClasses.valueLarge,C[s.PipsType.SmallValue]=d.cssClasses.valueSub,C),$=(R={},R[s.PipsType.None]="",R[s.PipsType.NoValue]=d.cssClasses.markerNormal,R[s.PipsType.LargeValue]=d.cssClasses.markerLarge,R[s.PipsType.SmallValue]=d.cssClasses.markerSub,R),yt=[d.cssClasses.valueHorizontal,d.cssClasses.valueVertical],gt=[d.cssClasses.markerHorizontal,d.cssClasses.markerVertical];x(F,d.cssClasses.pips),x(F,d.ort===0?d.cssClasses.pipsHorizontal:d.cssClasses.pipsVertical);function vt(st,Mt){var Xt=Mt===d.cssClasses.value,Wt=Xt?yt:gt,Gt=Xt?U:$;return Mt+" "+Wt[d.ort]+" "+Gt[st]}function kt(st,Mt,Xt){if(Xt=w?w(Mt,Xt):Xt,Xt!==s.PipsType.None){var Wt=Ae(F,!1);Wt.className=vt(Xt,d.cssClasses.marker),Wt.style[d.style]=st+"%",Xt>s.PipsType.NoValue&&(Wt=Ae(F,!1),Wt.className=vt(Xt,d.cssClasses.value),Wt.setAttribute("data-value",String(Mt)),Wt.style[d.style]=st+"%",Wt.innerHTML=String(S.to(Mt)))}}return Object.keys(b).forEach(function(st){kt(st,b[st][0],b[st][1])}),F}function Qi(){ie&&(r(ie),ie=null)}function tn(b){Qi();var w=_s(b),S=b.filter,C=b.format||{to:function(R){return String(Math.round(R))}};return ie=K.appendChild(wo(w,S,C)),ie}function Or(){var b=Pt.getBoundingClientRect(),w="offset"+["Width","Height"][d.ort];return d.ort===0?b.width||Pt[w]:b.height||Pt[w]}function ss(b,w,S,C){var R=function(U){var $=So(U,C.pageOffset,C.target||w);if(!$||Mr()&&!C.doNotReject||D(K,d.cssClasses.tap)&&!C.doNotReject||b===z.start&&$.buttons!==void 0&&$.buttons>1||C.hover&&$.buttons)return!1;Q||$.preventDefault(),$.calcPoint=$.points[d.ort],S($,C)},F=[];return b.split(" ").forEach(function(U){w.addEventListener(U,R,Q?{passive:!0}:!1),F.push([U,R])}),F}function So(b,w,S){var C=b.type.indexOf("touch")===0,R=b.type.indexOf("mouse")===0,F=b.type.indexOf("pointer")===0,U=0,$=0;if(b.type.indexOf("MSPointer")===0&&(F=!0),b.type==="mousedown"&&!b.buttons&&!b.touches)return!1;if(C){var yt=function(kt){var st=kt.target;return st===S||S.contains(st)||b.composed&&b.composedPath().shift()===S};if(b.type==="touchstart"){var gt=Array.prototype.filter.call(b.touches,yt);if(gt.length>1)return!1;U=gt[0].pageX,$=gt[0].pageY}else{var vt=Array.prototype.find.call(b.changedTouches,yt);if(!vt)return!1;U=vt.pageX,$=vt.pageY}}return w=w||P(bs),(R||F)&&(U=b.clientX+w.x,$=b.clientY+w.y),b.pageOffset=w,b.points=[U,$],b.cursor=R||F,b}function ri(b){var w=b-h(Pt,d.ort),S=w*100/Or();return S=g(S),d.dir?100-S:S}function ko(b){var w=100,S=!1;return tt.forEach(function(C,R){if(!We(R)){var F=Tt[R],U=Math.abs(F-b),$=U===100&&w===100,yt=UF;(yt||gt||$)&&(S=R,w=U)}}),S}function ai(b,w){b.type==="mouseout"&&b.target.nodeName==="HTML"&&b.relatedTarget===null&&sn(b,w)}function en(b,w){if(navigator.appVersion.indexOf("MSIE 9")===-1&&b.buttons===0&&w.buttonsProperty!==0)return sn(b,w);var S=(d.dir?-1:1)*(b.calcPoint-w.startCalcPoint),C=S*100/w.baseSize;Tr(S>0,C,w.locations,w.handleNumbers,w.connect)}function sn(b,w){w.handle&&(k(w.handle,d.cssClasses.active),Zi-=1),w.listeners.forEach(function(S){ii.removeEventListener(S[0],S[1])}),Zi===0&&(k(K,d.cssClasses.drag),rn(),b.cursor&&(ni.style.cursor="",ni.removeEventListener("selectstart",o))),d.events.smoothSteps&&(w.handleNumbers.forEach(function(S){is(S,Tt[S],!0,!0,!1,!1)}),w.handleNumbers.forEach(function(S){Nt("update",S)})),w.handleNumbers.forEach(function(S){Nt("change",S),Nt("set",S),Nt("end",S)})}function ys(b,w){if(!w.handleNumbers.some(We)){var S;if(w.handleNumbers.length===1){var C=tt[w.handleNumbers[0]];S=C.children[0],Zi+=1,x(S,d.cssClasses.active)}b.stopPropagation();var R=[],F=ss(z.move,ii,en,{target:b.target,handle:S,connect:w.connect,listeners:R,startCalcPoint:b.calcPoint,baseSize:Or(),pageOffset:b.pageOffset,handleNumbers:w.handleNumbers,buttonsProperty:b.buttons,locations:Tt.slice()}),U=ss(z.end,ii,sn,{target:b.target,handle:S,listeners:R,doNotReject:!0,handleNumbers:w.handleNumbers}),$=ss("mouseout",ii,ai,{target:b.target,handle:S,listeners:R,doNotReject:!0,handleNumbers:w.handleNumbers});R.push.apply(R,F.concat(U,$)),b.cursor&&(ni.style.cursor=getComputedStyle(b.target).cursor,tt.length>1&&x(K,d.cssClasses.drag),ni.addEventListener("selectstart",o,!1)),w.handleNumbers.forEach(function(yt){Nt("start",yt)})}}function Pr(b){b.stopPropagation();var w=ri(b.calcPoint),S=ko(w);S!==!1&&(d.events.snap||f(K,d.cssClasses.tap,d.animationDuration),is(S,w,!0,!0),rn(),Nt("slide",S,!0),Nt("update",S,!0),d.events.snap?ys(b,{handleNumbers:[S]}):(Nt("change",S,!0),Nt("set",S,!0)))}function Mo(b){var w=ri(b.calcPoint),S=at.getStep(w),C=at.fromStepping(S);Object.keys(Kt).forEach(function(R){R.split(".")[0]==="hover"&&Kt[R].forEach(function(F){F.call(ui,C)})})}function Do(b,w){if(Mr()||We(w))return!1;var S=["Left","Right"],C=["Down","Up"],R=["PageDown","PageUp"],F=["Home","End"];d.dir&&!d.ort?S.reverse():d.ort&&!d.dir&&(C.reverse(),R.reverse());var U=b.key.replace("Arrow",""),$=U===R[0],yt=U===R[1],gt=U===C[0]||U===S[0]||$,vt=U===C[1]||U===S[1]||yt,kt=U===F[0],st=U===F[1];if(!gt&&!vt&&!kt&&!st)return!0;b.preventDefault();var Mt;if(vt||gt){var Xt=gt?0:1,Wt=Fr(w),Gt=Wt[Xt];if(Gt===null)return!1;Gt===!1&&(Gt=at.getDefaultStep(Tt[w],gt,d.keyboardDefaultStep)),yt||$?Gt*=d.keyboardPageMultiplier:Gt*=d.keyboardMultiplier,Gt=Math.max(Gt,1e-7),Gt=(gt?-1:1)*Gt,Mt=Te[w]+Gt}else st?Mt=d.spectrum.xVal[d.spectrum.xVal.length-1]:Mt=d.spectrum.xVal[0];return is(w,at.toStepping(Mt),!0,!0),Nt("slide",w),Nt("update",w),Nt("change",w),Nt("set",w),!1}function Co(b){b.fixed||tt.forEach(function(w,S){ss(z.start,w.children[0],ys,{handleNumbers:[S]})}),b.tap&&ss(z.start,Pt,Pr,{}),b.hover&&ss(z.move,Pt,Mo,{hover:!0}),b.drag&&It.forEach(function(w,S){if(!(w===!1||S===0||S===It.length-1)){var C=tt[S-1],R=tt[S],F=[w],U=[C,R],$=[S-1,S];x(w,d.cssClasses.draggable),b.fixed&&(F.push(C.children[0]),F.push(R.children[0])),b.dragAll&&(U=tt,$=Ht),F.forEach(function(yt){ss(z.start,yt,ys,{handles:U,handleNumbers:$,connect:w})})}})}function oi(b,w){Kt[b]=Kt[b]||[],Kt[b].push(w),b.split(".")[0]==="update"&&tt.forEach(function(S,C){Nt("update",C)})}function Oo(b){return b===qt.aria||b===qt.tooltips}function Ns(b){var w=b&&b.split(".")[0],S=w?b.substring(w.length):b;Object.keys(Kt).forEach(function(C){var R=C.split(".")[0],F=C.substring(R.length);(!w||w===R)&&(!S||S===F)&&(!Oo(F)||S===F)&&delete Kt[C]})}function Nt(b,w,S){Object.keys(Kt).forEach(function(C){var R=C.split(".")[0];b===R&&Kt[C].forEach(function(F){F.call(ui,Te.map(d.format.to),w,Te.slice(),S||!1,Tt.slice(),ui)})})}function li(b,w,S,C,R,F,U){var $;return tt.length>1&&!d.events.unconstrained&&(C&&w>0&&($=at.getAbsoluteDistance(b[w-1],d.margin,!1),S=Math.max(S,$)),R&&w1&&d.limit&&(C&&w>0&&($=at.getAbsoluteDistance(b[w-1],d.limit,!1),S=Math.min(S,$)),R&&w1?C.forEach(function(kt,st){var Mt=li(F,kt,F[kt]+w,yt[st],gt[st],!1,$);Mt===!1?w=0:(w=Mt-F[kt],F[kt]=Mt)}):yt=gt=[!0];var vt=!1;C.forEach(function(kt,st){vt=is(kt,S[kt]+w,yt[st],gt[st],!1,$)||vt}),vt&&(C.forEach(function(kt){Nt("update",kt),Nt("slide",kt)}),R!=null&&Nt("drag",U))}function Ar(b,w){return d.dir?100-b-w:b}function Po(b,w){Tt[b]=w,Te[b]=at.fromStepping(w);var S=Ar(w,0)-mo,C="translate("+nn(S+"%","0")+")";tt[b].style[d.transformRule]=C,zs(b),zs(b+1)}function rn(){Ht.forEach(function(b){var w=Tt[b]>50?-1:1,S=3+(tt.length+w*b);tt[b].style.zIndex=String(S)})}function is(b,w,S,C,R,F){return R||(w=li(Tt,b,w,S,C,!1,F)),w===!1?!1:(Po(b,w),!0)}function zs(b){if(It[b]){var w=0,S=100;b!==0&&(w=Tt[b-1]),b!==It.length-1&&(S=Tt[b]);var C=S-w,R="translate("+nn(Ar(w,C)+"%","0")+")",F="scale("+nn(C/100,"1")+")";It[b].style[d.transformRule]=R+" "+F}}function ci(b,w){return b===null||b===!1||b===void 0||(typeof b=="number"&&(b=String(b)),b=d.format.from(b),b!==!1&&(b=at.toStepping(b)),b===!1||isNaN(b))?Tt[w]:b}function hi(b,w,S){var C=m(b),R=Tt[0]===void 0;w=w===void 0?!0:w,d.animate&&!R&&f(K,d.cssClasses.tap,d.animationDuration),Ht.forEach(function($){is($,ci(C[$],$),!0,!1,S)});var F=Ht.length===1?0:1;if(R&&at.hasNoSize()&&(S=!0,Tt[0]=0,Ht.length>1)){var U=100/(Ht.length-1);Ht.forEach(function($){Tt[$]=$*U})}for(;F=0&&bS.stepAfter.startValue&&(R=S.stepAfter.startValue-C),C>S.thisStep.startValue?F=S.thisStep.step:S.stepBefore.step===!1?F=!1:F=C-S.stepBefore.highestStep,w===100?R=null:w===0&&(F=null);var U=at.countStepDecimals();return R!==null&&R!==!1&&(R=Number(R.toFixed(U))),F!==null&&F!==!1&&(F=Number(F.toFixed(U))),[F,R]}function Er(){return Ht.map(Fr)}function Lo(b,w){var S=Rr(),C=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];C.forEach(function(F){b[F]!==void 0&&(L[F]=b[F])});var R=ve(L);C.forEach(function(F){b[F]!==void 0&&(d[F]=R[F])}),at=R.spectrum,d.margin=R.margin,d.limit=R.limit,d.padding=R.padding,d.pips?tn(d.pips):Qi(),d.tooltips?Dr():Ji(),Tt=[],hi(a(b.start)?b.start:S,w)}function Ro(){Pt=_o(K),bo(d.connect,Pt),Co(d.events),hi(d.start),d.pips&&tn(d.pips),d.tooltips&&Dr(),vo()}Ro();var ui={destroy:Ao,steps:Er,on:oi,off:Ns,get:Rr,set:hi,setHandle:Lr,reset:To,__moveHandles:function(b,w,S){Tr(b,w,Tt,S)},options:L,updateOptions:Lo,target:K,removePips:Qi,removeTooltips:Ji,getPositions:function(){return Tt.slice()},getTooltips:function(){return $t},getOrigins:function(){return tt},pips:tn};return ui}function Ki(_,d){if(!_||!_.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+_);if(_.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var L=ve(d),z=Sr(_,L,d);return _.noUiSlider=z,z}var po={__spectrum:G,cssClasses:_t,create:Ki};s.create=Ki,s.cssClasses=_t,s.default=po,Object.defineProperty(s,"__esModule",{value:!0})})})(ro,ro.exports);const Fy=G0(ro.exports);var Ey=["start","slide","update","change","set","end"],Uh={name:"veeno",props:{inputClass:{type:String,default:"custom-slider-input"},inputName:{type:String,default:"custom-slider-value"},options:{type:Object,default:function(){return{start:[20,80],connect:!0,range:{min:0,max:100}}}},vertical:{type:Boolean,default:!1},handles:{type:[Number,Array],default:null},connect:{type:[Boolean,Array,String],default:!1},tooltips:{type:[Boolean,Array],default:!1},step:{type:Number,default:0},range:{type:Object,required:!0,validator:function(e){return!Array.isArray(e)&&typeof e=="object"}},pipsy:{type:[Boolean,Object],default:function(){return!1},validator:function(e){return typeof e=="boolean"||!Array.isArray(e)&&typeof e=="object"}},rtl:{type:Boolean,default:!1},keyboardSupport:{type:Boolean,default:!0},keyboardDefaultStep:{type:Number,default:10},keyboardPageMultiplier:{type:Number,default:5},keyboardMultiplier:{type:Number,default:1},documentElementId:{type:[String,null],default:null},format:{type:Object,default:null},set:{type:[Number,Array],default:null,validator:function(e){return typeof e=="number"||Array.isArray(e)}},behaviour:{type:String,default:"tap",validator:function(e){return["drag","tap","fixed","snap","none"].indexOf(e!==-1)}},getset:{type:Function,default:function(){return function(){return""}}}},created:function(){this.optionz=Object.assign({},this.options,this.$props,this.vertical&&(this.options.orientation="vertical"),this.handles&&(this.options.start=this.handles),this.rtl&&(this.options.direction="rtl"),this.pipsy&&!Object.keys(this.pipsy).length?this.options.pips={mode:"range",density:5}:this.options.pips=this.pipsy)},mounted:function(){var t=this,s=document.getElementById(this.documentElementId);this.optionz.documentElement=s||null;var i=this.$el;this.options.orientation==="vertical"&&(i.style.height="100%"),Fy.create(i,this.optionz),Ey.forEach(function(n){i.noUiSlider.on(n,function(r,a,o,l,c){t.$emit(n,{values:r,handle:a,unencoded:o,tap:l,positions:c}),n==="update"&&t.$emit("input",r)})}),this.getset(i)},render:function(t){var s=t("input",{attrs:{type:"hidden",name:this.name},class:this.inputClass}),i=t("span",Ny,this.$slots.default);return t("div",Iy,[s,i])},data:function(){return{optionz:Object,latestHandleValue:null}},watch:{set:function(t){this.$el.noUiSlider.set(t)}}},Iy={style:{position:"relative"},class:{veeno:!0},attrs:{name:"custom-slider"}},Ny={style:{position:"absolute",top:"-2.5rem"},class:{"veeno-span":!0}};function ao(e){ao.installed||(ao.installed=!0,e.component("veeno",Uh))}var zy={install:ao},_r=null;typeof window<"u"?_r=window.Vue:typeof global<"u"&&(_r=global.Vue),_r&&_r.use(zy);const yv="",Yy={components:{"slider-fixed":{extends:Uh,props:{fixedpips:{type:Array|Boolean,default:!1},tooltips:{type:Boolean|Array|Object,default:!0}},mounted(){var e,t;this.$props.fixedpips&&((t=(e=this.$el)==null?void 0:e.noUiSlider)==null||t.updateOptions({pips:this.$props.fixedpips},!1))}}},mounted(){const e=this.sliderRange;this.dateFrom=this.dateChoices[e.min],this.dateTo=this.dateChoices[e.max],this.updateDateFields(this.timeFrame)},data(){const e=this;let t=null,s=null,i=null,n=null;return{dateFrom:"",dateTo:"",sliderDisplayFormat:"YYYY-MM-DD",staticDateFieldProps:{class:"ss-header-date",calendar:!0,time:!1,times:!1,required:!1,invalid:!1,display:"YYYY-MM-DD"},sliderDateFormatter:{to:function(r){return""+e.dateChoices[Number(r).toFixed(0)]},from:function(r){let a=Number(e.dateChoices.indexOf(r));if(a<0){let o=Number(r.replaceAll("-","")).toFixed(0),l=null;a=0,e.dateChoices.forEach(function(c,h){const u=Number(c.replaceAll("-","")).toFixed(0);(l===null||Math.abs(u-o)0?"
("+Number(Math.abs(r-a)).toFixed(0)+" timeframes)":"")},from:function(r){return 0}},{to:function(r){const a=e.dateChoices.indexOf(e.dateFrom);return""+e.dateChoices[Number(r).toFixed(0)]+(a>0?"
("+Number(Math.abs(r-a)).toFixed(0)+" timeframes)":"")},from:function(r){return 0}}],monthnames:["january","february","march","april","may","june","july","august","september","october","november","december"].map(r=>this.$t("months."+r))}},props:{dateChoices:{type:Array,default(){return[]}}},computed:{sliderRange(){return{min:0,max:this.dateChoices.length-1}},timeFrame(){return[this.dateFrom,this.dateTo]},minDate(){return this.dateChoices.reduce((e,t)=>ee>t?e:t)}},methods:{onSliderSet(e){e&&(this.dateFrom=e.values[0],this.dateTo=e.values[1])},updateDateFields(e){var t,s,i,n;if(!(!Array.isArray(e)||e.length!==2))for(let r=0;r<2;r++){const a=r===0?"dateFrom":"dateTo",o=e[r];if(!o||!o.length)continue;let l=o.split(" ");if(l.length>1&&(this[a]=l[0]),this[a].length&&this.dateChoices){let c=Number(o.replaceAll("-","")).toFixed(0),h=r*(this.dateChoices.length-1),u={i:h,num:Number(this.dateChoices[h].replaceAll("-","")).toFixed(0)};this.dateChoices.forEach(function(m,v){let x=Number(m.replaceAll("-","")).toFixed(0);r===0&&x>c||r===1&&x=u.num||r===1&&x<=u.num)&&(u.i=v,u.num=x)}),this[a]=this.dateChoices[u.i];const f=this.$library.dayjs(this[a]);let g=this.$refs[r===0?"calendarFrom":"calendarTo"];g&&(g.data.dt=f),(t=this.$refs[r===0?"calendarFromDrawer":"calendarToDrawer"])==null||t.close()}(n=(i=(s=this.$refs.slider)==null?void 0:s.$el)==null?void 0:i.noUiSlider)==null||n.set([e[0]?this.dateFrom:null,e[1]?this.dateTo:null],!1,!1)}},onUpdateKirbyDateTo(e){this.updateDateFields([null,e])},onUpdateKirbyDateFrom(e){this.updateDateFields([e,null])}}};var Vy=function(){var t=this,s=t._self._c;return s("k-grid",{staticClass:"ss-timeframe-input",attrs:{gutter:"medium"}},[s("k-column",{attrs:{width:"3/12"}},[s("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("div",{staticClass:"k-date-field-body",attrs:{"data-theme":"field"}},[s("k-input",{ref:"fromDateField",attrs:{autofocus:!1,display:t.staticDateFieldProps.display,min:t.minDate,max:t.maxDate,required:!0,theme:"field",type:"date",icon:"calendar",before:t.$t("simplestats.timeframe.date.from","From")},scopedSlots:t._u([{key:"icon",fn:function(){return[s("k-dropdown",[s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:"calendar",tooltip:t.$t("date.select")},on:{click:function(i){return t.$refs.calendarFromDrawer.toggle()}}}),s("k-dropdown-content",{ref:"calendarFromDrawer",attrs:{align:"right"}},[s("k-calendar",{ref:"calendarFrom",attrs:{value:t.dateFrom+" 00:00:00",min:t.minDate,max:t.maxDate},on:{input:t.onUpdateKirbyDateFrom}})],1)],1)]},proxy:!0}]),model:{value:t.dateFrom,callback:function(i){t.dateFrom=i},expression:"dateFrom"}})],1)])],1),s("k-column",{attrs:{width:"6/12"}},[s("div",{staticClass:"k-range-input ss-timeframe-range"},[s("slider-fixed",{ref:"slider",attrs:{handles:t.timeFrame,set:t.timeFrame,range:t.sliderRange,behaviour:"drag",connect:"",step:1,tooltips:t.sliderDateTooltipsFunc,format:t.sliderDateFormatter,fixedpips:t.sliderStepSettings},on:{update:t.onSliderUpdate,change:t.onSliderChange,set:t.onSliderSet}})],1)]),s("k-column",{attrs:{width:"3/12"}},[s("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("div",{staticClass:"k-date-field-body",attrs:{"data-theme":"field"}},[s("k-input",{ref:"toDateField",attrs:{autofocus:!1,display:t.staticDateFieldProps.display,min:t.minDate,max:t.maxDate,required:!0,theme:"field",type:"date",icon:"calendar",before:t.$t("simplestats.timeframe.date.to","To")},scopedSlots:t._u([{key:"icon",fn:function(){return[s("k-dropdown",[s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:"calendar",tooltip:t.$t("date.select")},on:{click:function(i){return t.$refs.calendarToDrawer.toggle()}}}),s("k-dropdown-content",{ref:"calendarToDrawer",attrs:{align:"right"}},[s("k-calendar",{ref:"calendarTo",attrs:{value:t.dateTo+" 00:00:00",min:t.minDate,max:t.maxDate},on:{input:t.onUpdateKirbyDateTo}})],1)],1)]},proxy:!0}]),model:{value:t.dateTo,callback:function(i){t.dateTo=i},expression:"dateTo"}})],1)])],1)],1)},$y=[],Wy=ne(Yy,Vy,$y,!1,null,null,null,null);const Hy=Wy.exports,vv="",By={components:{Visitors:iu,PageStats:iy,Devices:ly,Referers:fy,DbInformation:_y,Configuration:Sy,TrackingTester:Ry,TimeFrameInput:Hy},data(){return{tab:"",dismissDisclaimer:!1,isLoading:!0}},props:{label:{type:String,default:"Simple Stats"},initialtab:{type:String,default:"pagevisits"},tabs:{type:Array,default:[]},globaltimespan:{type:Array,default:[]},timeframes:{type:Array,default:[]}},watch:{initialtab(e){e&&(this.tab=e)}},mounted(){this.onTab()},methods:{getTabFromLocalStorage(){try{return window.localStorage.getItem("ss-tabs-menu")}catch{}return null},writeTabToLocalStorage(){if(!this.tab||this.length<1)return!1;try{return window.localStorage.setItem("ss-tabs-menu",this.tab),!0}catch{}return!1},onTab(e){var s,i;let t=e;(!e||e.length<1)&&(t=this.getTabFromLocalStorage()),(!t||t.length<1&&this.initialtab)&&(t=this.initialtab),this.tabs.some(n=>n.name===t)||(t=this.tabs[0].name),this.tab=t,this.$root.$view.breadcrumb[0].label=(i=(s=this.tabs.find(n=>n.name===e))==null?void 0:s.label)!=null?i:t,this.$root.$view.breadcrumb[0].link=null,this.writeTabToLocalStorage()}}};var jy=function(){var t=this,s=t._self._c;return s("k-inside",[s("k-view",{staticClass:"k-simplestats-view"},[!t.isLoading&&!t.dismissDisclaimer?s("k-grid",[s("k-column",[s("k-headline",{attrs:{size:"medium",align:"center"}},[t._v(t._s(t.$t("simplestats.disclaimer.title")))]),s("k-text",{attrs:{size:"small",align:"center"}},[s("span",{domProps:{innerHTML:t._s(t.$t("simplestats.disclaimer.text"))}}),s("span",{staticClass:"hover-to-help"},[s("k-icon",{attrs:{type:"question"}}),s("div",{staticClass:"help"},[s("k-text",{attrs:{theme:"help",size:"small",align:"center"}},[t._v(t._s(t.$t("simplestats.disclaimer.dismiss")))])],1)],1),s("br")]),s("br"),s("br")],1)],1):t._e(),s("k-header",{attrs:{tabs:t.tabs,tab:t.tab},on:{tabChange:t.onTab}},[s("template",{slot:"default"},[t._v(" "+t._s(t.label)+" ")]),s("template",{slot:"right"},[s("time-frame-input",{ref:"timeFrame",attrs:{dateChoices:t.timeframes}})],1)],2),t.tab==t.tabs[0].name?s("div",[s("page-stats",{attrs:{dateFrom:t.$refs.timeFrame.dateFrom,dateTo:t.$refs.timeFrame.dateTo,"section-name":"pagestats"}})],1):t.tab==t.tabs[1].name?s("div",[s("devices",{attrs:{dateFrom:t.$refs.timeFrame.dateFrom,dateTo:t.$refs.timeFrame.dateTo,"section-name":"devicestats"}})],1):t.tab==t.tabs[2].name?s("div",[s("referers",{attrs:{dateFrom:t.$refs.timeFrame.dateFrom,dateTo:t.$refs.timeFrame.dateTo,"section-name":"refererstats"}})],1):t.tab==t.tabs[3].name?s("div",[s("k-grid",{attrs:{gutter:"large"}},[s("k-column",{attrs:{width:"1/2"}},[s("configuration",{attrs:{"section-name":"configinfo"}})],1),s("k-column",{attrs:{width:"1/2"}},[s("DbInformation",{attrs:{"section-name":"listdbinfo"}})],1),s("k-column",{attrs:{width:"1/1"}},[s("k-line-field"),s("tracking-tester")],1),s("k-column",{attrs:{width:"1/1"}},[s("k-line-field"),s("visitors",{attrs:{"section-name":"listvisitors"}})],1)],1)],1):s("div",[s("k-empty",[t._v(t._s(t.$t("simplestats.taberror")))])],1)],1)],1)},Uy=[],Gy=ne(By,jy,Uy,!1,null,null,null,null);const qy=Gy.exports,xv="",Xy={extends:Ys,components:{AreaChart:br},data(){return{headline:null,showFullInfo:!1,showTotals:!1,showTimeline:!1,showLanguages:!1,size:"medium",statsdata:null,isLoading:!1,error:"",languagesOverTime:[],visitsOverTimeData:[],languageTotalHits:[],trackedSince:"[unknown]",totalHits:0,averageHits:!1,timespanUnitName:"[unknown]",trackingPeriods:!1,label:"",chartPeriodLabels:[],chartLanguagesLabels:[]}},props:{sectionName:"OnePageStats"},computed:{languagesAreEnabled(){return this.chartLanguagesLabels&&this.chartLanguagesLabels.length>0},sectionSize(){return this.size=="small"||this.size=="compact"?"small":this.size=="medium"||this.size=="normal"?"medium":this.size=="large"||this.size=="huge"?"large":this.size=="tiny"?"tiny":"medium"},chartOptions(){return{animation:{onComplete:this.generateDownloadLink}}}},created(){this.load().then(e=>{var t;this.label=(t=e.label)!=null?t:e.headline,this.showFullInfo=e.showFullInfo,this.showTotals=e.showTotals,this.showTimeline=e.showTimeline,this.showLanguages=e.showLanguages,this.size=e.size,this.statsdata=e.statsdata,this.languagesOverTime=e.statsdata.languagesOverTime,this.visitsOverTimeData=e.statsdata.visitsovertimedata,this.chartPeriodLabels=e.statsdata.chartperiodlabels,this.chartLanguagesLabels=e.statsdata.chartlanguageslabels,this.languageTotalHits=e.statsdata.languageTotalHits,this.trackedSince=e.statsdata.firstVisited,this.lastVisited=e.statsdata.lastVisited,this.averageHits=e.statsdata.averageHits,this.totalHits=e.statsdata.totalHits,this.timespanUnitName=e.statsdata.timespanUnitName,this.trackingPeriods=e.statsdata.trackingPeriods})},mounted(){},methods:{graphFooter(e,t){let s=0,i=0;return e.forEach(function(n){s+=parseInt(n.value),i++}),i<=1?"":"Total: "+s},pieLabel(e,t){var s=t.datasets[e.datasetIndex],i=s.data.reduce(function(a,o,l,c){return a+o}),n=s.data[e.index],r=Math.floor(n/i*100+.5);return t.labels[e.index]+": "+n+" ("+r+"%)"}}};var Ky=function(){var t=this,s=t._self._c;return s("div",{class:{simplestatsonepagedetailssection:!0,small:t.sectionSize=="small",medium:t.sectionSize=="medium",large:t.sectionSize=="large"}},[t.label?s("div",[s("k-headline",{attrs:{size:"medium"}},[s("k-icon",{staticStyle:{display:"inline-block","padding-right":"0.5rem"},attrs:{type:"chart",size:"tiny"}}),t._v(" "+t._s(t.label))],1),s("br")],1):t._e(),t.showFullInfo&&t.showTotals?s("p",[t._v(" This page has been "),s("strong",[t._v("visited "+t._s(t.totalHits)+" times")]),t._v(" since "+t._s(t.trackedSince)+" and was last visited on "+t._s(t.lastVisited)+" which averages to "),s("strong",[t._v(t._s(Math.round(t.averageHits))+" visits per "+t._s(t.timespanUnitName))]),t._v(" using "+t._s(t.trackingPeriods)+" samples. ")]):t.showTotals?s("p",[t._v(" Total hits: "),s("strong",[t._v(t._s(t.totalHits))]),t._v(" ("),s("strong",[t._v(t._s(Math.round(t.averageHits)))]),t._v(" per "+t._s(t.timespanUnitName)+") ")]):t._e(),t.showTotals?s("k-line-field"):t._e(),t.showTimeline?s("div",{staticClass:"detailcolumn visitsovertime"},[s("k-headline",{attrs:{size:"medium"}},[t._v(t._s(t.$t("simplestats.visits.visitsovertime")))]),s("area-chart",{attrs:{"chart-data":t.languagesAreEnabled?t.languagesOverTime:t.visitsOverTimeData,"chart-labels":t.chartPeriodLabels,download:t.languagesAreEnabled?"PageLanguagesOverTime.png":"PageVisitsOverTime.png","x-time-axis":!0,"y-visits-axis":!0,height:this.sectionSize=="small"?240:this.sectionSize=="large"?280:this.sectionSize=="tiny"?120:260,stacked:t.languagesAreEnabled,"chart-options":t.chartOptions,"auto-colorize":!0,"show-legend":t.languagesAreEnabled}}),s("br")],1):t._e(),t.languagesAreEnabled&&t.showLanguages?s("div",{staticClass:"detailcolumn globallanguages"},[s("k-headline",[t._v(t._s(t.$t("simplestats.visits.globallanguages")))]),s("area-chart",{attrs:{type:"Pie",download:"PageGlobalLanguageVisits.png","chart-data":t.languageTotalHits,"chart-labels":t.chartLanguagesLabels,"chart-options":t.chartOptions,"auto-colorize":!0,height:this.sectionSize=="small"?185:this.sectionSize=="large"?225:this.sectionSize=="tiny"?80:205,fill:!0,"show-legend":t.languagesAreEnabled}})],1):t._e()],1)},Zy=[],Jy=ne(Xy,Ky,Zy,!1,null,null,null,null);const Qy=Jy.exports,wv="",tv={props:{value:String|Number,column:Object,field:Object},computed:{percentage(){return Number(this.value*100).toFixed()}}};var ev=function(){var t=this,s=t._self._c;return s("p",{staticClass:"ss-percentage-field-preview"},[s("span",{staticClass:"ss-progress",style:"width: "+t.percentage+"%;"},[t._v(t._s(t.percentage)+"%")])])},sv=[],iv=ne(tv,ev,sv,!1,null,null,null,null);const nv=iv.exports;panel.plugin("daandelange/simplestats",{components:{"k-simplestats-view":qy,"k-tabs":{extends:"k-tabs",mounted(){this.bindTabClicks()},emits:["tabChange"],methods:{bindTabClicks(){const e=this;for(const t of this.$children)t.$el.classList.contains("k-tab-button")&&t.$el.addEventListener("click",function(){e.onClick(t.$vnode.key)})},onClick(e){this.tab!==e&&this.$parent.$emit("tabChange",e)}}},"k-percentage-field-preview":nv},sections:{pagestats:Qy},use:[],devtool:"source-map"})})(); + */const U0={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Kl._date.override(typeof E=="function"?{_id:"moment",formats:function(){return U0},parse:function(e,t){return typeof e=="string"&&typeof t=="string"?e=E(e,t):e instanceof E||(e=E(e)),e.isValid()?e.valueOf():null},format:function(e,t){return E(e).format(t)},add:function(e,t,s){return E(e).add(t,s).valueOf()},diff:function(e,t,s){return E(e).diff(E(t),s)},startOf:function(e,t,s){return e=E(e),t==="isoWeek"?(s=Math.trunc(Math.min(Math.max(0,s),6)),e.isoWeekday(s).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return E(e).endOf(t).valueOf()}}:{});var qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var no={exports:{}};(function(e,t){var s=200,i="__lodash_hash_undefined__",n=800,r=16,a=9007199254740991,o="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",u="[object Date]",f="[object Error]",g="[object Function]",m="[object GeneratorFunction]",v="[object Map]",x="[object Number]",k="[object Null]",D="[object Object]",P="[object Proxy]",T="[object RegExp]",O="[object Set]",N="[object String]",I="[object Undefined]",j="[object WeakMap]",H="[object ArrayBuffer]",nt="[object DataView]",Z="[object Float32Array]",J="[object Float64Array]",Rt="[object Int8Array]",Ut="[object Int16Array]",G="[object Int32Array]",Ot="[object Uint8Array]",_t="[object Uint8ClampedArray]",qt="[object Uint16Array]",Fs="[object Uint32Array]",Ve=/[\\^$.*+?()[\]{}|]/g,ps=/^\[object .+?Constructor\]$/,$e=/^(?:0|[1-9]\d*)$/,ht={};ht[Z]=ht[J]=ht[Rt]=ht[Ut]=ht[G]=ht[Ot]=ht[_t]=ht[qt]=ht[Fs]=!0,ht[o]=ht[l]=ht[H]=ht[h]=ht[nt]=ht[u]=ht[f]=ht[g]=ht[v]=ht[x]=ht[D]=ht[T]=ht[O]=ht[N]=ht[j]=!1;var ms=typeof qi=="object"&&qi&&qi.Object===Object&&qi,Es=typeof self=="object"&&self&&self.Object===Object&&self,Pe=ms||Es||Function("return this")(),yr=t&&!t.nodeType&&t,Is=yr&&!0&&e&&!e.nodeType&&e,vr=Is&&Is.exports===yr,ti=vr&&ms.process,xr=function(){try{var p=Is&&Is.require&&Is.require("util").types;return p||ti&&ti.binding&&ti.binding("util")}catch{}}(),wr=xr&&xr.isTypedArray;function oo(p,y,M){switch(M.length){case 0:return p.call(y);case 1:return p.call(y,M[0]);case 2:return p.call(y,M[0],M[1]);case 3:return p.call(y,M[0],M[1],M[2])}return p.apply(y,M)}function lo(p,y){for(var M=-1,W=Array(p);++M-1}function Mr(p,y){var M=this.__data__,W=ai(M,p);return W<0?(++this.size,M.push([p,y])):M[W][1]=y,this}Le.prototype.clear=kr,Le.prototype.delete=bo,Le.prototype.get=_o,Le.prototype.has=yo,Le.prototype.set=Mr;function We(p){var y=-1,M=p==null?0:p.length;for(this.clear();++y1?M[ct-1]:void 0,Ft=ct>2?M[2]:void 0;for(xt=p.length>3&&typeof xt=="function"?(ct--,xt):void 0,Ft&&Rr(M[0],M[1],Ft)&&(xt=ct<3?void 0:xt,ct=1),y=Object(y);++W-1&&p%1==0&&p0){if(++y>=n)return arguments[0]}else y=0;return p.apply(void 0,arguments)}}function C(p){if(p!=null){try{return si.call(p)}catch{}try{return p+""}catch{}}return""}function R(p,y){return p===y||p!==p&&y!==y}var F=Pr(function(){return arguments}())?Pr:function(p){return Mt(p)&&ve.call(p,"callee")&&!Pt.call(p,"callee")},U=Array.isArray;function $(p){return p!=null&&kt(p.length)&&!vt(p)}function yt(p){return Mt(p)&&$(p)}var gt=$t||cn;function vt(p){if(!st(p))return!1;var y=ys(p);return y==g||y==m||y==c||y==P}function kt(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=a}function st(p){var y=typeof p;return p!=null&&(y=="object"||y=="function")}function Mt(p){return p!=null&&typeof p=="object"}function Xt(p){if(!Mt(p)||ys(p)!=D)return!1;var y=Q(p);if(y===null)return!0;var M=ve.call(y,"constructor")&&y.constructor;return typeof M=="function"&&M instanceof M&&si.call(M)==po}var Wt=wr?co(wr):Do;function Gt(p){return Po(p,di(p))}function di(p){return $(p)?So(p,!0):Co(p)}var an=rn(function(p,y,M){oi(p,y,M)});function on(p){return function(){return p}}function ln(p){return p}function cn(){return!1}e.exports=an})(no,no.exports);const q0=no.exports,uv="";Fi.register(lp,mp,ap,hs,ka,$n,zn,Ii,ip,Yn,Nn);const X0={name:"AreaChart",components:{LineChart:Bp,BarChart:Hp,PieChart:jp},inheritAttrs:!1,props:{type:{type:String,default:"Line",validator:e=>["Line","Bar","Pie"].includes(e)},chartData:{type:Array,default:()=>[]},chartOptions:{type:Object,default(){return{}}},chartLabels:{type:Array,default(){return[]}},label:{type:String,default:""},headerSize:{type:String,default:"medium"},xTitle:{type:String|null,default:null},yTitle:{type:String|null,default:null},download:{type:String|Boolean,default:!1},width:{type:Number,default:null},height:{type:Number,default:null},autoColorize:{type:Boolean,default:!1},autoGreyize:{type:Boolean,default:!1},showLegend:{type:Boolean,default:!0},fill:{type:Boolean|String,default:!0},xTimeAxis:{type:Boolean,default:!1},yVisitsAxis:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1}},computed:{isEmpty(){return!this.chartData||this.chartData.length<1},hasDataForCurrentPeriod(){var e;return!this.isEmpty&&((e=this.chartData)==null?void 0:e.some(t=>t.data&&t.data.length>=1))},fileDownloadStr(){var t;const e=new Date;return String((t=this.download)!=null?t:"MyChart.png").replace(".png","-"+e.getFullYear()+"-"+Number(e.getMonth()+1).toString().padStart(2,"0")+"-"+Number(e.getDate()).toString().padStart(2,"0")+".png")},fullChartOptions(){var e,t;return q0({},this.chartOptions,{animation:{onComplete:this.generateDownloadLink},barPercentage:.5,width:this.width,height:this.height,maintainAspectRatio:!1,borderColor:"#000",borderWidth:1,datasets:{line:{borderWidth:0,pointRadius:0,pointHitRadius:3,pointHoverRadius:3}},plugins:{legend:{maxHeight:75},filler:{propagate:!0},interaction:{},tooltip:{filter:function(s,i,n,r){return!(r.datasets.length>5&&s.raw===0)}}}},this.type==="Pie"?{}:{scales:{xAxis:{afterSetDimensions:s=>{s.maxHeight=25}}}},this.fill?{fill:!0,backgroundColor:typeof this.fill=="string"?this.fill:"#313740"}:{},this.xTimeAxis?{scales:{xAxis:{title:{display:!1,text:(e=this.xTitle)!=null?e:this.$t("simplestats.charts.time","Time")},type:"time",time:{unit:"month",displayFormats:{month:"MMM YYYY"}}}}}:{},this.yVisitsAxis?{scales:{yAxis:{title:{display:!0,text:(t=this.yTitle)!=null?t:this.$t("simplestats.charts.visits","Visits")},beginAtZero:!0}}}:{},this.stacked?{scales:{yAxis:{stacked:!0}}}:{},this.showLegend===!1?{plugins:{legend:{display:!1,title:{display:!1}}},scales:{xAxis:{display:!1,title:{display:!1}},yAxis:{tickLength:5}}}:{})},fullChartData(){const e=this,t=this.chartData.map((s,i)=>{var n;return(n=s.ss_uid)!=null?n:i});return{labels:this.chartLabels,datasets:this.chartData.map(function(s,i){if((e.autoColorize||e.autoGreyize)===!0&&!s.backgroundColor){let n=.3,r=.4;if(e.type==="Pie"){s.backgroundColor=[];const u=e.chartLabels.length>1?e.chartLabels.length:1;let f=0;for(let g of e.chartLabels)s.backgroundColor.push(e.autoColorize?"hsl("+Number(360/u*f).toFixed(0)+","+Number(n*100).toFixed(0)+"%,"+Number(r*100).toFixed(0)+"%)":"hsl(0,0%,"+Number(40+40/u*f).toFixed(0)+"%)"),f++;return s}const a=s.ss_uid?s.ss_uid.split("/"):[""+i];let o=0,l=0,c=1,h=null;a.forEach((u,f)=>{s.ss_uid?f===0?h=t.filter(v=>String(v).includes("/")===!1):h=t.filter(function(v){const x=a.slice(0,f).join("/");return String(v).startsWith(x)}):h=e.chartData.map((v,x)=>x);const g=h.indexOf(s.ss_uid?a.slice(0,f+1).join("/"):i),m=h.length>1?h.length:1;e.autoColorize?f===0?o=1/m*g:(c/=m,l+=c*.8*g,f>1&&(n-=10)):(c/=m,l+=c*g)}),s.backgroundColor="hsl("+Number(o*360).toFixed(0)+", "+Number(n*100*(e.autoGreyize?0:1)).toFixed(0)+"%, "+Number(r*100+l*50).toFixed(0)+"%)"}return s})}}},data(){return{base64image:""}},methods:{generateDownloadLink(){var e;this.download!==!1&&((e=this.$refs.linechart)!=null&&e._data._chart?this.$refs.linechart._data._chart.canvas&&(this.base64image=this.$refs.linechart._data._chart.toBase64Image("image/png")):this.base64image="")}}};var K0=function(){var t=this,s=t._self._c;return s("div",[t.label.length>0?s("k-headline",{attrs:{size:t.headerSize}},[t._v(t._s(t.label))]):t._e(),s("div",{class:"ss-chart ss-"+t.type.toLowerCase()+"-chart"},[t.download!==!1&&t.base64image.length?s("div",{staticClass:"ss-download-link"},[s("a",{attrs:{href:t.base64image,download:t.fileDownloadStr}},[s("k-button",{attrs:{text:"Download",tooltip:"Exports the chart as a PNG file that you can archive or share.",icon:"download"}})],1)]):t._e(),t.hasDataForCurrentPeriod?s("div",{staticClass:"ss-chart-wrapper"},[s(t.type+"Chart",{ref:"linechart",tag:"component",attrs:{"chart-data":t.fullChartData,"chart-options":t.fullChartOptions,height:t.height,width:t.width}})],1):t.isEmpty?s("k-empty",{staticClass:"emptyChart",attrs:{layout:"block"}},[t._v(t._s(t.$t("simplestats.nodatayet","No data yet")))]):s("k-empty",{staticClass:"emptyChart",attrs:{layout:"block"}},[t._v(t._s(t.$t("simplestats.nodatafortimerange","There is no data for the selected time range.")))])],1)],1)},Z0=[],J0=ne(X0,K0,Z0,!1,null,null,null,null);const br=J0.exports,dv="",Q0={extends:Ys,components:{SearchableTable:un,AreaChart:br},data(){return{rows:[],columns:{},chartPeriodLabels:[],visitsOverTimeData:[],pageVisitsOverTimeData:[],languagesOverTimeData:[],globalLanguagesData:[],languagesAreEnabled:!1,userLocale:"en",chartOptions:{animation:{onComplete:this.generateDownloadLink}}}},props:{},computed:{pageVisitsOverTimeDataSorted(){var e;return(e=this.pageVisitsOverTimeData)==null?void 0:e.sort((t,s)=>t.ss_uids.ss_uid?1:0)}},methods:{loadData(e){this.columns=e.pagestatslabels,this.rows=e.pagestatsdata,this.chartPeriodLabels=e.chartperiodlabels,this.visitsOverTimeData=e.visitsovertimedata,this.pageVisitsOverTimeData=e.pagevisitsovertimedata,this.globalLanguagesData=e.globallanguagesdata,this.chartLanguagesLabels=e.chartlanguageslabels,this.languagesOverTimeData=e.languagesovertimedata,this.languagesAreEnabled=e.languagesAreEnabled,this.userLocale=window.panel.$language?window.panel.$language.locale:this.$store.state.i18n?this.$store.state.i18n.locale:""}}};var ty=function(){var t=this,s=t._self._c;return s("k-grid",{attrs:{gutter:"medium"}},[s("k-column",[s("k-headline",{attrs:{size:"medium"}},[t._v(t._s(t.$t("simplestats.visits.visitsovertime","Visits over time")))]),s("area-chart",{attrs:{type:"Bar","chart-data":t.visitsOverTimeData,"chart-options":t.chartOptions,"chart-labels":t.chartPeriodLabels,download:"Site_Visits.png","x-title":t.$t("simplestats.charts.time","Time"),"y-title":t.$t("simplestats.charts.visits","Visits"),height:100,"x-time-axis":!0,"y-visits-axis":!0,"show-legend":!1,fill:!0}})],1),s("k-column",[s("k-headline",{attrs:{size:"medium"}},[t._v(t._s(t.$t("simplestats.visits.pagevisitsovertime")))]),s("area-chart",{attrs:{"chart-data":t.pageVisitsOverTimeDataSorted,"chart-labels":t.chartPeriodLabels,"chart-options":t.chartOptions,download:"Site_PageVisits.png","x-title":t.$t("simplestats.charts.time"),"y-title":t.$t("simplestats.charts.visits"),height:450,stacked:!0,"auto-colorize":!0,"x-time-axis":!0,"y-visits-axis":!0,fill:!0}})],1),t.languagesAreEnabled?s("k-column",{attrs:{width:"3/4"}},[s("area-chart",{attrs:{"chart-data":t.languagesOverTimeData,"chart-labels":t.chartPeriodLabels,"chart-options":t.chartOptions,download:"Site_LanguagesOverTime.png","x-title":t.$t("simplestats.charts.time"),"y-title":t.$t("simplestats.charts.visits"),height:250,stacked:!0,"auto-colorize":!0,fill:!0,"x-time-axis":!0,"y-visits-axis":!0,label:t.$t("simplestats.visits.languagesovertime")}})],1):t._e(),t.languagesAreEnabled?s("k-column",{attrs:{width:"1/4"}},[s("k-headline",[t._v(t._s(t.$t("simplestats.visits.globallanguages")))]),t.globalLanguagesData.length>0?s("area-chart",{attrs:{type:"Pie",download:"Site_LanguagePopularity.png","chart-data":t.globalLanguagesData,"chart-labels":t.chartLanguagesLabels,"chart-options":t.chartOptions,"auto-colorize":!0,height:200,fill:!0}}):t._e()],1):t._e(),s("k-column",[s("searchable-table",{attrs:{columns:t.columns,rows:t.rows,layout:"table",label:t.$t("simplestats.visits.visitedpages")}})],1)],1)},ey=[],sy=ne(Q0,ty,ey,!1,null,null,null,null);const iy=sy.exports,fv="",ny={extends:Ys,components:{AreaChart:br},data(){return{devicesData:[],devicesLabels:[],devicesOverTimeData:[],chartPeriodLabels:[],browsersData:[],browsersLabels:[],systemsData:[],systemsLabels:[]}},methods:{loadData(e){this.devicesData=e.devicesdata,this.devicesLabels=e.deviceslabels,this.browsersData=e.enginesdata,this.browsersLabels=e.engineslabels,this.devicesOverTimeData=e.devicesovertime,this.chartPeriodLabels=e.chartperiodlabels,this.systemsData=e.systemsdata,this.systemsLabels=e.systemslabels}}};var ry=function(){var t=this,s=t._self._c;return s("k-grid",{attrs:{gutter:"medium"}},[s("k-column",{attrs:{width:"1/3"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.devicesData,"chart-labels":t.devicesLabels,download:"Site_Devices.png",label:t.$t("simplestats.devices.graph.devices"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/3"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.browsersData,"chart-labels":t.browsersLabels,download:"Site_BrowserEngines.png",label:t.$t("simplestats.devices.graph.engines"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/3"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.systemsData,"chart-labels":t.systemsLabels,download:"Site_OperatingSystems.png",label:t.$t("simplestats.devices.graph.oses"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/1"}},[s("area-chart",{attrs:{type:"Line","chart-data":t.devicesOverTimeData,"chart-labels":t.chartPeriodLabels,download:"Site_DevicesEvolution.png",label:t.$t("simplestats.devices.graph.devicehistory"),"header-size":"large","x-title":t.$t("simplestats.charts.time"),"y-title":t.$t("simplestats.devices.graph.devicehistory.y"),stacked:!0,fill:!0,"auto-colorize":!0,"x-time-axis":!0,"y-visits-axis":!0,height:300}})],1)],1)},ay=[],oy=ne(ny,ry,ay,!1,null,null,null,null);const ly=oy.exports,gv="",cy={extends:Ys,components:{AreaChart:br,SearchableTable:un},props:{dateFrom:{type:String,required:!0},dateTo:{type:String,required:!0}},data(){return{chartPeriodLabels:[],refererDomainsData:[],refererDomainsLabels:[],refererMediumData:[],refererMediumLabels:[],refererTableData:[],refererTableLabels:{},referersByMediumOverTimeData:[],userLocale:"en",timeOptions:{layout:{padding:{left:5,right:15,top:5,bottom:10}},scales:{xAxes:[{type:"time",time:{unit:"month",displayFormats:{month:"MMM YYYY"}}}],yAxes:[{stacked:!0}]}}}},methods:{loadData(e){this.chartPeriodLabels=e.chartperiodlabels,this.refererDomainsData=e.referersbydomaindata,this.refererDomainsLabels=e.referersbydomainlabels,this.refererMediumData=e.referersbymediumdata,this.refererMediumLabels=e.referersbymediumlabels,this.refererTableData=e.refererstabledata,this.refererTableLabels=e.refererstablelabels,this.referersByMediumOverTimeData=e.referersbymediumovertimedata,this.userLocale=window.panel.$language?window.panel.$language.code:""}}};var hy=function(){var t=this,s=t._self._c;return s("k-grid",{attrs:{gutter:"medium"}},[s("k-column",{attrs:{width:"1/2"}},[t.refererMediumData.length>0?s("area-chart",{attrs:{type:"Pie","chart-data":t.refererMediumData,"chart-labels":t.refererMediumLabels,download:"Site_ReferrersByMedium.png",label:t.$t("simplestats.referers.referersbymedium","Referers by medium"),fill:!0,"auto-colorize":!0,height:200}}):t._e()],1),s("k-column",{attrs:{width:"1/2"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.refererDomainsData,"chart-labels":t.refererDomainsLabels,download:"Site_ReferrersByDomain.png",label:t.$t("simplestats.referers.referersbydomain","Referers by domain"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/1"}},[s("area-chart",{attrs:{type:"Line","chart-data":t.referersByMediumOverTimeData,"chart-labels":t.chartPeriodLabels,download:"Site_ReferersEvolution.png",label:t.$t("simplestats.referers.referersovertime"),"y-title":t.$t("simplestats.charts.hitspermedium","Hits per medium"),stacked:!0,fill:!0,"auto-colorize":!0,"x-time-axis":!0,"y-visits-axis":!0,height:300}})],1),s("k-column",{attrs:{width:"1/1"}},[s("k-line-field")],1),s("k-column",{attrs:{width:"1/1"}},[s("searchable-table",{attrs:{rows:t.refererTableData,columns:t.refererTableLabels,label:t.$t("simplestats.referers.allreferers")}})],1)],1)},uy=[],dy=ne(cy,hy,uy,!1,null,null,null,null);const fy=dy.exports,pv="",gy={extends:"k-pages-section",data(){return{dbHistory:[],dbHistoryLabels:{},upgradeRequired:!1,softwareDbVersion:"unknown",dbVersion:"undefined",dbRequirements:"unknown",dbRequirementsPassed:!0,unlockUpgrade:!1,isUpdatingDb:!1,updateMessage:null,updateMessageTheme:"",databaseLocation:"",databaseSize:""}},components:{SearchableTable:un},filters:{prettyBytes:function(e){if(e=Number(e),typeof e!="number"||isNaN(e))return"?? kb";var t,s,i=e<0,n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"];return i&&(e=-e),e<1?(i?"-":"")+e+" B":(t=Math.min(Math.floor(Math.log(e)/Math.log(1e3)),n.length-1),e=(e/Math.pow(1e3,t)).toFixed(2)*1,s=n[t],(i?"-":"")+e+" "+s)}},created(){this.load()},methods:{load(){this.updateMessage=null,this.$api.get("simplestats/listdbinfo").then(e=>{this.isLoading=!1,this.dbHistoryLabels=e.dbHistoryLabels,this.dbHistory=e.dbHistory,this.upgradeRequired=e.upgradeRequired,this.softwareDbVersion=e.softwareDbVersion,this.dbVersion=e.dbVersion,this.databaseLocation=e.databaseLocation,this.databaseSize=e.databaseSize,this.updateMessage=null}).catch(e=>{this.isLoading=!1,this.updateMessage=e.message,this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3})}),this.$api.get("simplestats/checkrequirements").then(e=>{this.isLoading=!1,this.dbRequirements=e.dbRequirements,this.dbRequirementsPassed=e.dbRequirementsPassed}).catch(e=>{this.isLoading=!1,this.dbRequirements=e.message,this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3})})},acceptUpgrade(e){this.unlockUpgrade=e},requestUpgrade(e){e.stopPropagation(),this.unlockUpgrade?(this.isUpdatingDb=!0,this.updateMessage=null,this.$api.get("simplestats/dbupgrade").then(t=>{this.isUpdatingDb=!1,this.updateMessage=t.message,this.updateMessageTheme=t.status?"positive":"negative"}).catch(t=>{this.isUpdatingDb=!1,this.error=t.message,this.$store.dispatch("notification/open",{type:"error",message:t.message,timeout:5e3})})):this.$store.dispatch("notification/open",{type:"error",message:"Before hitting that button, please ensure to backup your database file !",timeout:5e3})}}};var py=function(){var t=this,s=t._self._c;return s("div",{staticClass:"dbinformation"},[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.title")))]),s("k-headline",[t._v(t._s(t.$t("simplestats.info.db.title")))]),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.file"),value:t.databaseLocation,icon:"file-zip"}}),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.size"),value:t._f("prettyBytes")(t.databaseSize),icon:"download"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.dbversion"),value:t.dbVersion,icon:"bolt"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.softwareversion"),value:t.softwareDbVersion,icon:"bolt"}}),s("br"),s("br"),s("searchable-table",{attrs:{rows:t.dbHistory,columns:t.dbHistoryLabels,label:t.$t("simplestats.info.db.versionhistory")}}),s("k-line-field"),s("k-headline",[t._v(t._s(t.$t("simplestats.info.dbreqs.title")))]),t.dbRequirementsPassed?s("div",[s("k-info-field",{attrs:{theme:"positive",text:t.$t("simplestats.info.dbreqs.positive")}})],1):s("div",[s("k-info-field",{attrs:{theme:"negative",text:t.$t("simplestats.info.dbreqs.negative")}}),s("hr"),t._v(" "+t._s(t.dbRequirements)+" ")],1),s("br"),s("div",{staticClass:"upgrade"},[s("br"),s("br"),t.upgradeRequired?s("div",[t.updateMessage?s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.info.dbupdate.result"),text:t.updateMessage,theme:t.updateMessageTheme}}),s("k-button",{attrs:{theme:"neutral"},on:{click:t.load}},[t._v(t._s(t.$t("simplestats.info.dbupdate.refresh")))])],1):s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.info.dbupdate.required"),theme:"negative",text:t.$t("simplestats.info.dbupdate.requiredmsg")}}),s("br"),s("k-checkbox-input",{attrs:{value:t.unlockUpgrade,label:t.$t("simplestats.info.dbupdate.isbackedup")},on:{input:t.acceptUpgrade}}),s("br"),s("k-button",{attrs:{icon:"bolt"},on:{click:t.requestUpgrade}},[t._v(t._s(t.$t("simplestats.info.dbupdate.go")))]),t.isUpdatingDb?s("k-label",[t._v(t._s(t.$t("simplestats.loading")))]):t._e()],1)]):t.updateMessage==null?s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.info.dbupdate.title"),text:t.$t("simplestats.info.dbupdate.isuptodate"),theme:"positive"}})],1):t.updateMessage!==null?s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.loaderror"),text:t.updateMessage,theme:"negative"}})],1):t._e()])],1)},my=[],by=ne(gy,py,my,!1,null,null,null,null);const _y=by.exports,mv="",yy={extends:Ys,data(){return{saltIsSet:!1,trackingPeriodName:"",trackingSince:"",uniqueSeconds:"",enableReferers:!1,enableDevices:!1,enableVisits:!1,enableVisitLanguages:!1,ignoredRoles:[],ignoredPages:[],ignoredTemplates:[],logFile:"",logLevels:[]}},computed:{trackingFeatures(){var e=[];return this.enableReferers&&e.push(this.$t("simplestats.info.config.tracking.referrers","Referers")),this.enableDevices&&e.push(this.$t("simplestats.info.config.tracking.devices","Devices")),this.enableVisits&&e.push(this.$t("simplestats.info.config.tracking.visits","Page Visits")),this.enableVisitLanguages&&e.push(this.$t("simplestats.info.config.tracking.languages","Page Visitors")),e}},methods:{loadData(e){this.saltIsSet=e.saltIsSet,this.trackingPeriodName=e.trackingPeriodName,this.trackingSince=e.trackingSince,this.uniqueSeconds=e.uniqueSeconds,this.enableReferers=e.enableReferers,this.enableDevices=e.enableDevices,this.enableVisits=e.enableVisits,this.enableVisitLanguages=e.enableVisitLanguages,this.ignoredRoles=e.ignoredRoles,this.ignoredPages=e.ignoredPages,this.logFile=e.logFile,this.logLevels=e.logLevels,this.ignoredTemplates=e.ignoredTemplates}}};var vy=function(){var t=this,s=t._self._c;return s("div",{staticClass:"configuration"},[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.config.title")))]),s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.config.tracking")))]),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.periodname"),value:t.trackingPeriodName,icon:"clock"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.periodsecs"),value:t.uniqueSeconds,after:t.$t("simplestats.charts.seconds"),icon:"clock"}}),s("k-toggle-field",{attrs:{name:"",disabled:!0,label:t.$t("simplestats.info.config.tracking.salted"),value:t.saltIsSet,icon:"key"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.features"),value:t.trackingFeatures,icon:"globe"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.ignore.roles"),value:t.ignoredRoles,icon:"users"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.ignore.ids"),value:t.ignoredPages,icon:"page"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.ignore.templates"),value:t.ignoredTemplates,icon:"page"}}),s("br"),s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.config.log.title")))]),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.log.file"),value:t.logFile,icon:"file-code"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.log.level"),value:t.logLevels,icon:"bug"}}),s("br"),!t.isLoading&&!t.saltIsSet?s("k-info-field",{attrs:{label:t.$t("simplestats.info.config.tracking.unsalted"),theme:"negative",text:t.$t("simplestats.info.config.tracking.unsaltedwarn")}}):t._e()],1)},xy=[],wy=ne(yy,vy,xy,!1,null,null,null,null);const Sy=wy.exports,bv="",ky={name:"list-viewer",props:{arrayData:{type:Array,default:[]},depth:{type:Number,default:0}},methods:{}};var My=function(){var t=this,s=t._self._c;return s("div",[t.arrayData?s("ul",{style:{paddingLeft:20*t.depth+"px"}},t._l(t.arrayData,function(i,n,r){return s("li",t._b({key:n,class:{isChild:t.subpage,"text-danger":t.hasError}},"li",t.arrayData.status,!1),[typeof i=="Array"||typeof i=="object"?s("div",[s("span",[t._v(" "+t._s(n)+" = ")]),(typeof i=="Array"||typeof i=="object")&&t.depth<10?s("list-viewer",{attrs:{"array-data":i,depth:t.depth+1}}):t._e()],1):s("div",[s("span",[t._v(" "+t._s(n)+" = "+t._s(i)+" ")])])])}),0):t._e()])},Dy=[],Cy=ne(ky,My,Dy,!1,null,null,null,null);const Oy=Cy.exports,_v="",Py={name:"TrackingTester",components:{ListViewer:Oy},data(){let e=new Date,t=new Date;return t.setDate(e.getDate()-30),{isLoading:!0,error:"",currentDevice:"",currentUserAgent:this.currentUserAgentJS,customDevice:"",customUserAgent:"",referrerField:"",referrerResponse:null,unlockGenerator:!1,generatorMode:"randommulti",generatorTo:e.toString(),generatorFrom:t.toString(),generatorResponse:null}},created(){this.load()},computed:{currentUserAgentJS(){return navigator.userAgent},formattedCurrentUA(){return this.currentDevice&&this.currentDevice!==""?this.currentDevice.device+" - "+this.currentDevice.system+" - "+this.currentDevice.engine:"-"},formattedCustomUA(){return this.customDevice&&this.customDevice!==""?this.customDevice.device+" - "+this.customDevice.system+" - "+this.customDevice.engine:"-"},formattedReferrer(){return this.referrerResponse?this.referrerResponse.medium?this.referrerResponse.host+" - - "+this.referrerResponse.source+" - "+this.referrerResponse.url+" ("+this.referrerResponse.medium+")":this.referrerResponse.error?this.referrerResponse.error:"Error...":"-"},formattedReferrerUrl(){if(this.referrerResponse){if(this.referrerResponse.url)return this.referrerResponse.url;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"},formattedReferrerSource(){if(this.referrerResponse){if(this.referrerResponse.source)return this.referrerResponse.source;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"},formattedReferrerHost(){if(this.referrerResponse){if(this.referrerResponse.host)return this.referrerResponse.host;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"},formattedReferrerMedium(){if(this.referrerResponse){if(this.referrerResponse.medium)return this.referrerResponse.medium;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"}},methods:{load(){this.$api.get("simplestats/trackingtester").then(e=>{this.isLoading=!1,this.currentDevice=e.currentDeviceInfo,this.currentUserAgent=e.currentUserAgent}).catch(e=>{this.isLoading=!1,this.error=e.message,this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3})})},testReferrer(){this.$api.get("simplestats/trackingtester/referrer?referrer="+encodeURIComponent(this.referrerField)).then(e=>{e&&typeof e.referrerInfo=="string"?this.referrerResponse={error:e.referrerInfo}:e&&typeof e.referrerInfo=="object"?this.referrerResponse=e.referrerInfo:this.referrerResponse={error:"Data format error !"}}).catch(e=>{e&&e.message?this.referrerResponse=e.message:this.referrerResponse="Loading error !"})},testUserAgent(){this.$api.get("simplestats/trackingtester/ua?ua="+encodeURIComponent(this.customUserAgent)).then(e=>{typeof e=="string"?this.customDevice={error:e}:typeof e=="object"?this.customDevice=e:this.customDevice={error:"Data format error !"}}).catch(e=>{e&&e.message?this.customDevice=e.message:this.customDevice="Loading Error !"})},acceptGenerate(e){this.unlockGenerator=e},generateStats(){this.$api.get("simplestats/trackingtester/generatestats?proceed="+(this.unlockGenerator?"yes":"no")+"&from="+new Date(this.generatorFrom).getTime()*.001+"&to="+new Date(this.generatorTo).getTime()*.001+"&mode="+this.generatorMode).then(e=>{this.generatorResponse=e}).catch(e=>{this.generatorResponse={status:"false",error:"Loading Error = "+e.message}})}}};var Ty=function(){var t=this,s=t._self._c;return s("k-grid",{staticClass:"trackingtester",attrs:{gutter:"large"}},[s("k-column",{attrs:{width:"1/1"}},[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.tester.title")))])],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.tester.device")))]),s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.device.currentua"),value:t.currentUserAgent,icon:"display"}}),s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.device.currentdetected"),value:t.formattedCurrentUA,icon:"display"}}),s("k-form",{on:{submit:t.testUserAgent}},[s("k-text-field",{staticClass:"field-with-btn",attrs:{counter:!1,disabled:!1,label:t.$t("simplestats.info.tester.device.customua"),icon:"display"},model:{value:t.customUserAgent,callback:function(i){t.customUserAgent=i},expression:"customUserAgent"}}),s("k-button",{staticClass:"floating-btn",on:{click:t.testUserAgent}},[t._v("Go!")]),this.customDevice?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.device.customdetected"),value:t.formattedCustomUA,icon:"display"}}):t._e()],1),this.customDevice?s("k-box",{attrs:{theme:"info",text:t.$t("simplestats.info.tester.device.note")}}):t._e()],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.tester.generator")))]),s("k-form",{on:{submit:t.generateStats}},[s("k-select-field",{attrs:{label:t.$t("simplestats.info.tester.generator.generatorMode"),options:[{value:"all",text:"Static : all pages"},{value:"randomsingle",text:"Single random page"},{value:"randommulti",text:"Multiple random pages"}]},model:{value:t.generatorMode,callback:function(i){t.generatorMode=i},expression:"generatorMode"}}),s("k-date-field",{attrs:{label:t.$t("simplestats.info.tester.generator.datefrom"),time:!1},model:{value:t.generatorFrom,callback:function(i){t.generatorFrom=i},expression:"generatorFrom"}}),s("k-date-field",{attrs:{label:t.$t("simplestats.info.tester.generator.dateto"),time:!1},model:{value:t.generatorTo,callback:function(i){t.generatorTo=i},expression:"generatorTo"}}),s("k-field",{attrs:{translate:!1,label:t.$t("simplestats.info.tester.generator.unlockgenerator")}},[s("k-checkbox-input",{style:{padding:".5em"},attrs:{value:t.unlockGenerator,theme:"field",novalidate:!0},on:{input:t.acceptGenerate}}),s("k-button",{style:{border:"1px solid black",padding:"0 1em",borderRadius:"3px"},on:{click:t.generateStats}},[t._v("Go!")])],1),t.generatorResponse&&t.generatorResponse.data?s("k-field",{attrs:{translate:!1,label:"Result"}},[s("list-viewer",{staticClass:"k-input",style:{padding:"1em"},attrs:{"array-data":t.generatorResponse.data,"data-theme":"field"}})],1):t._e(),t.generatorResponse&&t.generatorResponse.error?s("k-textarea-field",{attrs:{label:"Error!",buttons:!1,disabled:!0},model:{value:t.generatorResponse.error,callback:function(i){t.$set(t.generatorResponse,"error",i)},expression:"generatorResponse.error"}}):t._e()],1)],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.tester.referrer")))]),s("k-form",{on:{submit:t.testReferrer}},[s("k-text-field",{staticClass:"field-with-btn",attrs:{counter:!1,disabled:!1,label:t.$t("simplestats.info.tester.referrer.field"),icon:"globe"},model:{value:t.referrerField,callback:function(i){t.referrerField=i},expression:"referrerField"}}),s("k-button",{staticClass:"floating-btn",attrs:{name:"btn"},on:{click:t.testReferrer}},[t._v("Go!")]),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.host"),value:t.formattedReferrerHost,icon:"globe"}}):t._e(),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.source"),value:t.formattedReferrerSource,icon:"globe"}}):t._e(),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.medium"),value:t.formattedReferrerMedium,icon:"globe"}}):t._e(),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.url"),value:t.formattedReferrerUrl,icon:"globe"}}):t._e()],1)],1)],1)},Ay=[],Ly=ne(Py,Ty,Ay,!1,null,null,null,null);const Ry=Ly.exports;var ro={exports:{}};(function(e,t){(function(s,i){i(t)})(qi,function(s){s.PipsMode=void 0,function(_){_.Range="range",_.Steps="steps",_.Positions="positions",_.Count="count",_.Values="values"}(s.PipsMode||(s.PipsMode={})),s.PipsType=void 0,function(_){_[_.None=-1]="None",_[_.NoValue=0]="NoValue",_[_.LargeValue=1]="LargeValue",_[_.SmallValue=2]="SmallValue"}(s.PipsType||(s.PipsType={}));function i(_){return n(_)&&typeof _.from=="function"}function n(_){return typeof _=="object"&&typeof _.to=="function"}function r(_){_.parentElement.removeChild(_)}function a(_){return _!=null}function o(_){_.preventDefault()}function l(_){return _.filter(function(d){return this[d]?!1:this[d]=!0},{})}function c(_,d){return Math.round(_/d)*d}function h(_,d){var L=_.getBoundingClientRect(),z=_.ownerDocument,Y=z.documentElement,Q=P(z);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(Q.x=0),d?L.top+Q.y-Y.clientTop:L.left+Q.x-Y.clientLeft}function u(_){return typeof _=="number"&&!isNaN(_)&&isFinite(_)}function f(_,d,L){L>0&&(x(_,d),setTimeout(function(){k(_,d)},L))}function g(_){return Math.max(Math.min(_,100),0)}function m(_){return Array.isArray(_)?_:[_]}function v(_){_=String(_);var d=_.split(".");return d.length>1?d[1].length:0}function x(_,d){_.classList&&!/\s/.test(d)?_.classList.add(d):_.className+=" "+d}function k(_,d){_.classList&&!/\s/.test(d)?_.classList.remove(d):_.className=_.className.replace(new RegExp("(^|\\b)"+d.split(" ").join("|")+"(\\b|$)","gi")," ")}function D(_,d){return _.classList?_.classList.contains(d):new RegExp("\\b"+d+"\\b").test(_.className)}function P(_){var d=window.pageXOffset!==void 0,L=(_.compatMode||"")==="CSS1Compat",z=d?window.pageXOffset:L?_.documentElement.scrollLeft:_.body.scrollLeft,Y=d?window.pageYOffset:L?_.documentElement.scrollTop:_.body.scrollTop;return{x:z,y:Y}}function T(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function O(){var _=!1;try{var d=Object.defineProperty({},"passive",{get:function(){_=!0}});window.addEventListener("test",null,d)}catch{}return _}function N(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function I(_,d){return 100/(d-_)}function j(_,d,L){return d*100/(_[L+1]-_[L])}function H(_,d){return j(_,_[0]<0?d+Math.abs(_[0]):d-_[0],0)}function nt(_,d){return d*(_[1]-_[0])/100+_[0]}function Z(_,d){for(var L=1;_>=d[L];)L+=1;return L}function J(_,d,L){if(L>=_.slice(-1)[0])return 100;var z=Z(L,_),Y=_[z-1],Q=_[z],K=d[z-1],Pt=d[z];return K+H([Y,Q],L)/I(K,Pt)}function Rt(_,d,L){if(L>=100)return _.slice(-1)[0];var z=Z(L,d),Y=_[z-1],Q=_[z],K=d[z-1],Pt=d[z];return nt([Y,Q],(L-K)*I(K,Pt))}function Ut(_,d,L,z){if(z===100)return z;var Y=Z(z,_),Q=_[Y-1],K=_[Y];return L?z-Q>(K-Q)/2?K:Q:d[Y-1]?_[Y-1]+c(z-_[Y-1],d[Y-1]):z}var G=function(){function _(d,L,z){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[z||!1],this.xNumSteps=[!1],this.snap=L;var Y,Q=[];for(Object.keys(d).forEach(function(K){Q.push([m(d[K]),K])}),Q.sort(function(K,Pt){return K[0][0]-Pt[0][0]}),Y=0;Ythis.xPct[Y+1];)Y++;else d===this.xPct[this.xPct.length-1]&&(Y=this.xPct.length-2);!z&&d===this.xPct[Y+1]&&Y++,L===null&&(L=[]);var Q,K=1,Pt=L[Y],tt=0,It=0,ie=0,$t=0;for(z?Q=(d-this.xPct[Y])/(this.xPct[Y+1]-this.xPct[Y]):Q=(this.xPct[Y+1]-d)/(this.xPct[Y+1]-this.xPct[Y]);Pt>0;)tt=this.xPct[Y+1+$t]-this.xPct[Y+$t],L[Y+$t]*K+100-Q*100>100?(It=tt*Q,K=(Pt-100*Q)/L[Y+$t],Q=1):(It=L[Y+$t]*tt/100*K,K=0),z?(ie=ie-It,this.xPct.length+$t>=1&&$t--):(ie=ie+It,this.xPct.length-$t>=1&&$t++),Pt=L[Y+$t]*K;return d+ie},_.prototype.toStepping=function(d){return d=J(this.xVal,this.xPct,d),d},_.prototype.fromStepping=function(d){return Rt(this.xVal,this.xPct,d)},_.prototype.getStep=function(d){return d=Ut(this.xPct,this.xSteps,this.snap,d),d},_.prototype.getDefaultStep=function(d,L,z){var Y=Z(d,this.xPct);return(d===100||L&&d===this.xPct[Y-1])&&(Y=Math.max(Y-1,1)),(this.xVal[Y]-this.xVal[Y-1])/z},_.prototype.getNearbySteps=function(d){var L=Z(d,this.xPct);return{stepBefore:{startValue:this.xVal[L-2],step:this.xNumSteps[L-2],highestStep:this.xHighestCompleteStep[L-2]},thisStep:{startValue:this.xVal[L-1],step:this.xNumSteps[L-1],highestStep:this.xHighestCompleteStep[L-1]},stepAfter:{startValue:this.xVal[L],step:this.xNumSteps[L],highestStep:this.xHighestCompleteStep[L]}}},_.prototype.countStepDecimals=function(){var d=this.xNumSteps.map(v);return Math.max.apply(null,d)},_.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},_.prototype.convert=function(d){return this.getStep(this.toStepping(d))},_.prototype.handleEntryPoint=function(d,L){var z;if(d==="min"?z=0:d==="max"?z=100:z=parseFloat(d),!u(z)||!u(L[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(z),this.xVal.push(L[0]);var Y=Number(L[1]);z?this.xSteps.push(isNaN(Y)?!1:Y):isNaN(Y)||(this.xSteps[0]=Y),this.xHighestCompleteStep.push(0)},_.prototype.handleStepPoint=function(d,L){if(L){if(this.xVal[d]===this.xVal[d+1]){this.xSteps[d]=this.xHighestCompleteStep[d]=this.xVal[d];return}this.xSteps[d]=j([this.xVal[d],this.xVal[d+1]],L,0)/I(this.xPct[d],this.xPct[d+1]);var z=(this.xVal[d+1]-this.xVal[d])/this.xNumSteps[d],Y=Math.ceil(Number(z.toFixed(3))-1),Q=this.xVal[d]+this.xNumSteps[d]*Y;this.xHighestCompleteStep[d]=Q}},_}(),Ot={to:function(_){return _===void 0?"":_.toFixed(2)},from:Number},_t={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},qt={tooltips:".__tooltips",aria:".__aria"};function Fs(_,d){if(!u(d))throw new Error("noUiSlider: 'step' is not numeric.");_.singleStep=d}function Ve(_,d){if(!u(d))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");_.keyboardPageMultiplier=d}function ps(_,d){if(!u(d))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");_.keyboardMultiplier=d}function $e(_,d){if(!u(d))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");_.keyboardDefaultStep=d}function ht(_,d){if(typeof d!="object"||Array.isArray(d))throw new Error("noUiSlider: 'range' is not an object.");if(d.min===void 0||d.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");_.spectrum=new G(d,_.snap||!1,_.singleStep)}function ms(_,d){if(d=m(d),!Array.isArray(d)||!d.length)throw new Error("noUiSlider: 'start' option is incorrect.");_.handles=d.length,_.start=d}function Es(_,d){if(typeof d!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");_.snap=d}function Pe(_,d){if(typeof d!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");_.animate=d}function yr(_,d){if(typeof d!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");_.animationDuration=d}function Is(_,d){var L=[!1],z;if(d==="lower"?d=[!0,!1]:d==="upper"&&(d=[!1,!0]),d===!0||d===!1){for(z=1;z<_.handles;z++)L.push(d);L.push(!1)}else{if(!Array.isArray(d)||!d.length||d.length!==_.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");L=d}_.connect=L}function vr(_,d){switch(d){case"horizontal":_.ort=0;break;case"vertical":_.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function ti(_,d){if(!u(d))throw new Error("noUiSlider: 'margin' option must be numeric.");d!==0&&(_.margin=_.spectrum.getDistance(d))}function xr(_,d){if(!u(d))throw new Error("noUiSlider: 'limit' option must be numeric.");if(_.limit=_.spectrum.getDistance(d),!_.limit||_.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function wr(_,d){var L;if(!u(d)&&!Array.isArray(d))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(d)&&!(d.length===2||u(d[0])||u(d[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(d!==0){for(Array.isArray(d)||(d=[d,d]),_.padding=[_.spectrum.getDistance(d[0]),_.spectrum.getDistance(d[1])],L=0;L<_.spectrum.xNumSteps.length-1;L++)if(_.padding[0][L]<0||_.padding[1][L]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var z=d[0]+d[1],Y=_.spectrum.xVal[0],Q=_.spectrum.xVal[_.spectrum.xVal.length-1];if(z/(Q-Y)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function oo(_,d){switch(d){case"ltr":_.dir=0;break;case"rtl":_.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function lo(_,d){if(typeof d!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var L=d.indexOf("tap")>=0,z=d.indexOf("drag")>=0,Y=d.indexOf("fixed")>=0,Q=d.indexOf("snap")>=0,K=d.indexOf("hover")>=0,Pt=d.indexOf("unconstrained")>=0,tt=d.indexOf("drag-all")>=0,It=d.indexOf("smooth-steps")>=0;if(Y){if(_.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");ti(_,_.start[1]-_.start[0])}if(Pt&&(_.margin||_.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");_.events={tap:L||Q,drag:z,dragAll:tt,smoothSteps:It,fixed:Y,snap:Q,hover:K,unconstrained:Pt}}function co(_,d){if(d!==!1)if(d===!0||n(d)){_.tooltips=[];for(var L=0;L<_.handles;L++)_.tooltips.push(d)}else{if(d=m(d),d.length!==_.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");d.forEach(function(z){if(typeof z!="boolean"&&!n(z))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),_.tooltips=d}}function ho(_,d){if(d.length!==_.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");_.handleAttributes=d}function uo(_,d){if(!n(d))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");_.ariaFormat=d}function fo(_,d){if(!i(d))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");_.format=d}function go(_,d){if(typeof d!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");_.keyboardSupport=d}function ei(_,d){_.documentElement=d}function Xi(_,d){if(typeof d!="string"&&d!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");_.cssPrefix=d}function si(_,d){if(typeof d!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof _.cssPrefix=="string"?(_.cssClasses={},Object.keys(d).forEach(function(L){_.cssClasses[L]=_.cssPrefix+d[L]})):_.cssClasses=d}function ve(_){var d={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Ot,format:Ot},L={step:{r:!1,t:Fs},keyboardPageMultiplier:{r:!1,t:Ve},keyboardMultiplier:{r:!1,t:ps},keyboardDefaultStep:{r:!1,t:$e},start:{r:!0,t:ms},connect:{r:!0,t:Is},direction:{r:!0,t:oo},snap:{r:!1,t:Es},animate:{r:!1,t:Pe},animationDuration:{r:!1,t:yr},range:{r:!0,t:ht},orientation:{r:!1,t:vr},margin:{r:!1,t:ti},limit:{r:!1,t:xr},padding:{r:!1,t:wr},behaviour:{r:!0,t:lo},ariaFormat:{r:!1,t:uo},format:{r:!1,t:fo},tooltips:{r:!1,t:co},keyboardSupport:{r:!0,t:go},documentElement:{r:!1,t:ei},cssPrefix:{r:!0,t:Xi},cssClasses:{r:!0,t:si},handleAttributes:{r:!1,t:ho}},z={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:_t,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};_.format&&!_.ariaFormat&&(_.ariaFormat=_.format),Object.keys(L).forEach(function(tt){if(!a(_[tt])&&z[tt]===void 0){if(L[tt].r)throw new Error("noUiSlider: '"+tt+"' is required.");return}L[tt].t(d,a(_[tt])?_[tt]:z[tt])}),d.pips=_.pips;var Y=document.createElement("div"),Q=Y.style.msTransform!==void 0,K=Y.style.transform!==void 0;d.transformRule=K?"transform":Q?"msTransform":"webkitTransform";var Pt=[["left","top"],["right","bottom"]];return d.style=Pt[d.dir][d.ort],d}function Sr(_,d,L){var z=T(),Y=N(),Q=Y&&O(),K=_,Pt,tt,It,ie,$t,at=d.spectrum,Te=[],Tt=[],Ht=[],Zi=0,Kt={},bs=_.ownerDocument,ii=d.documentElement||bs.documentElement,ni=bs.body,mo=bs.dir==="rtl"||d.ort===1?0:100;function Ae(b,w){var S=bs.createElement("div");return w&&x(S,w),b.appendChild(S),S}function Le(b,w){var S=Ae(b,d.cssClasses.origin),C=Ae(S,d.cssClasses.handle);if(Ae(C,d.cssClasses.touchArea),C.setAttribute("data-handle",String(w)),d.keyboardSupport&&(C.setAttribute("tabindex","0"),C.addEventListener("keydown",function(F){return Do(F,w)})),d.handleAttributes!==void 0){var R=d.handleAttributes[w];Object.keys(R).forEach(function(F){C.setAttribute(F,R[F])})}return C.setAttribute("role","slider"),C.setAttribute("aria-orientation",d.ort?"vertical":"horizontal"),w===0?x(C,d.cssClasses.handleLower):w===d.handles-1&&x(C,d.cssClasses.handleUpper),S}function kr(b,w){return w?Ae(b,d.cssClasses.connect):!1}function bo(b,w){var S=Ae(w,d.cssClasses.connects);tt=[],It=[],It.push(kr(S,b[0]));for(var C=0;C= 2) required for mode 'count'.");for(var w=b.values-1,S=100/w,C=[];w--;)C[w]=w*S;return C.push(100),Cr(C,b.stepped)}return b.mode===s.PipsMode.Positions?Cr(b.values,b.stepped):b.mode===s.PipsMode.Values?b.stepped?b.values.map(function(R){return at.fromStepping(at.getStep(at.toStepping(R)))}):b.values:[]}function Cr(b,w){return b.map(function(S){return at.fromStepping(w?at.getStep(S):S)})}function _s(b){function w(gt,vt){return Number((gt+vt).toFixed(7))}var S=xo(b),C={},R=at.xVal[0],F=at.xVal[at.xVal.length-1],U=!1,$=!1,yt=0;return S=l(S.slice().sort(function(gt,vt){return gt-vt})),S[0]!==R&&(S.unshift(R),U=!0),S[S.length-1]!==F&&(S.push(F),$=!0),S.forEach(function(gt,vt){var kt,st,Mt,Xt=gt,Wt=S[vt+1],Gt,di,an,on,ln,cn,p,y=b.mode===s.PipsMode.Steps;for(y&&(kt=at.xNumSteps[vt]),kt||(kt=Wt-Xt),Wt===void 0&&(Wt=Xt),kt=Math.max(kt,1e-7),st=Xt;st<=Wt;st=w(st,kt)){for(Gt=at.toStepping(st),di=Gt-yt,ln=di/(b.density||1),cn=Math.round(ln),p=di/cn,Mt=1;Mt<=cn;Mt+=1)an=yt+Mt*p,C[an.toFixed(5)]=[at.fromStepping(an),0];on=S.indexOf(st)>-1?s.PipsType.LargeValue:y?s.PipsType.SmallValue:s.PipsType.NoValue,!vt&&U&&st!==Wt&&(on=0),st===Wt&&$||(C[Gt.toFixed(5)]=[st,on]),yt=Gt}}),C}function wo(b,w,S){var C,R,F=bs.createElement("div"),U=(C={},C[s.PipsType.None]="",C[s.PipsType.NoValue]=d.cssClasses.valueNormal,C[s.PipsType.LargeValue]=d.cssClasses.valueLarge,C[s.PipsType.SmallValue]=d.cssClasses.valueSub,C),$=(R={},R[s.PipsType.None]="",R[s.PipsType.NoValue]=d.cssClasses.markerNormal,R[s.PipsType.LargeValue]=d.cssClasses.markerLarge,R[s.PipsType.SmallValue]=d.cssClasses.markerSub,R),yt=[d.cssClasses.valueHorizontal,d.cssClasses.valueVertical],gt=[d.cssClasses.markerHorizontal,d.cssClasses.markerVertical];x(F,d.cssClasses.pips),x(F,d.ort===0?d.cssClasses.pipsHorizontal:d.cssClasses.pipsVertical);function vt(st,Mt){var Xt=Mt===d.cssClasses.value,Wt=Xt?yt:gt,Gt=Xt?U:$;return Mt+" "+Wt[d.ort]+" "+Gt[st]}function kt(st,Mt,Xt){if(Xt=w?w(Mt,Xt):Xt,Xt!==s.PipsType.None){var Wt=Ae(F,!1);Wt.className=vt(Xt,d.cssClasses.marker),Wt.style[d.style]=st+"%",Xt>s.PipsType.NoValue&&(Wt=Ae(F,!1),Wt.className=vt(Xt,d.cssClasses.value),Wt.setAttribute("data-value",String(Mt)),Wt.style[d.style]=st+"%",Wt.innerHTML=String(S.to(Mt)))}}return Object.keys(b).forEach(function(st){kt(st,b[st][0],b[st][1])}),F}function Qi(){ie&&(r(ie),ie=null)}function tn(b){Qi();var w=_s(b),S=b.filter,C=b.format||{to:function(R){return String(Math.round(R))}};return ie=K.appendChild(wo(w,S,C)),ie}function Or(){var b=Pt.getBoundingClientRect(),w="offset"+["Width","Height"][d.ort];return d.ort===0?b.width||Pt[w]:b.height||Pt[w]}function ss(b,w,S,C){var R=function(U){var $=So(U,C.pageOffset,C.target||w);if(!$||Mr()&&!C.doNotReject||D(K,d.cssClasses.tap)&&!C.doNotReject||b===z.start&&$.buttons!==void 0&&$.buttons>1||C.hover&&$.buttons)return!1;Q||$.preventDefault(),$.calcPoint=$.points[d.ort],S($,C)},F=[];return b.split(" ").forEach(function(U){w.addEventListener(U,R,Q?{passive:!0}:!1),F.push([U,R])}),F}function So(b,w,S){var C=b.type.indexOf("touch")===0,R=b.type.indexOf("mouse")===0,F=b.type.indexOf("pointer")===0,U=0,$=0;if(b.type.indexOf("MSPointer")===0&&(F=!0),b.type==="mousedown"&&!b.buttons&&!b.touches)return!1;if(C){var yt=function(kt){var st=kt.target;return st===S||S.contains(st)||b.composed&&b.composedPath().shift()===S};if(b.type==="touchstart"){var gt=Array.prototype.filter.call(b.touches,yt);if(gt.length>1)return!1;U=gt[0].pageX,$=gt[0].pageY}else{var vt=Array.prototype.find.call(b.changedTouches,yt);if(!vt)return!1;U=vt.pageX,$=vt.pageY}}return w=w||P(bs),(R||F)&&(U=b.clientX+w.x,$=b.clientY+w.y),b.pageOffset=w,b.points=[U,$],b.cursor=R||F,b}function ri(b){var w=b-h(Pt,d.ort),S=w*100/Or();return S=g(S),d.dir?100-S:S}function ko(b){var w=100,S=!1;return tt.forEach(function(C,R){if(!We(R)){var F=Tt[R],U=Math.abs(F-b),$=U===100&&w===100,yt=UF;(yt||gt||$)&&(S=R,w=U)}}),S}function ai(b,w){b.type==="mouseout"&&b.target.nodeName==="HTML"&&b.relatedTarget===null&&sn(b,w)}function en(b,w){if(navigator.appVersion.indexOf("MSIE 9")===-1&&b.buttons===0&&w.buttonsProperty!==0)return sn(b,w);var S=(d.dir?-1:1)*(b.calcPoint-w.startCalcPoint),C=S*100/w.baseSize;Tr(S>0,C,w.locations,w.handleNumbers,w.connect)}function sn(b,w){w.handle&&(k(w.handle,d.cssClasses.active),Zi-=1),w.listeners.forEach(function(S){ii.removeEventListener(S[0],S[1])}),Zi===0&&(k(K,d.cssClasses.drag),rn(),b.cursor&&(ni.style.cursor="",ni.removeEventListener("selectstart",o))),d.events.smoothSteps&&(w.handleNumbers.forEach(function(S){is(S,Tt[S],!0,!0,!1,!1)}),w.handleNumbers.forEach(function(S){Nt("update",S)})),w.handleNumbers.forEach(function(S){Nt("change",S),Nt("set",S),Nt("end",S)})}function ys(b,w){if(!w.handleNumbers.some(We)){var S;if(w.handleNumbers.length===1){var C=tt[w.handleNumbers[0]];S=C.children[0],Zi+=1,x(S,d.cssClasses.active)}b.stopPropagation();var R=[],F=ss(z.move,ii,en,{target:b.target,handle:S,connect:w.connect,listeners:R,startCalcPoint:b.calcPoint,baseSize:Or(),pageOffset:b.pageOffset,handleNumbers:w.handleNumbers,buttonsProperty:b.buttons,locations:Tt.slice()}),U=ss(z.end,ii,sn,{target:b.target,handle:S,listeners:R,doNotReject:!0,handleNumbers:w.handleNumbers}),$=ss("mouseout",ii,ai,{target:b.target,handle:S,listeners:R,doNotReject:!0,handleNumbers:w.handleNumbers});R.push.apply(R,F.concat(U,$)),b.cursor&&(ni.style.cursor=getComputedStyle(b.target).cursor,tt.length>1&&x(K,d.cssClasses.drag),ni.addEventListener("selectstart",o,!1)),w.handleNumbers.forEach(function(yt){Nt("start",yt)})}}function Pr(b){b.stopPropagation();var w=ri(b.calcPoint),S=ko(w);S!==!1&&(d.events.snap||f(K,d.cssClasses.tap,d.animationDuration),is(S,w,!0,!0),rn(),Nt("slide",S,!0),Nt("update",S,!0),d.events.snap?ys(b,{handleNumbers:[S]}):(Nt("change",S,!0),Nt("set",S,!0)))}function Mo(b){var w=ri(b.calcPoint),S=at.getStep(w),C=at.fromStepping(S);Object.keys(Kt).forEach(function(R){R.split(".")[0]==="hover"&&Kt[R].forEach(function(F){F.call(ui,C)})})}function Do(b,w){if(Mr()||We(w))return!1;var S=["Left","Right"],C=["Down","Up"],R=["PageDown","PageUp"],F=["Home","End"];d.dir&&!d.ort?S.reverse():d.ort&&!d.dir&&(C.reverse(),R.reverse());var U=b.key.replace("Arrow",""),$=U===R[0],yt=U===R[1],gt=U===C[0]||U===S[0]||$,vt=U===C[1]||U===S[1]||yt,kt=U===F[0],st=U===F[1];if(!gt&&!vt&&!kt&&!st)return!0;b.preventDefault();var Mt;if(vt||gt){var Xt=gt?0:1,Wt=Fr(w),Gt=Wt[Xt];if(Gt===null)return!1;Gt===!1&&(Gt=at.getDefaultStep(Tt[w],gt,d.keyboardDefaultStep)),yt||$?Gt*=d.keyboardPageMultiplier:Gt*=d.keyboardMultiplier,Gt=Math.max(Gt,1e-7),Gt=(gt?-1:1)*Gt,Mt=Te[w]+Gt}else st?Mt=d.spectrum.xVal[d.spectrum.xVal.length-1]:Mt=d.spectrum.xVal[0];return is(w,at.toStepping(Mt),!0,!0),Nt("slide",w),Nt("update",w),Nt("change",w),Nt("set",w),!1}function Co(b){b.fixed||tt.forEach(function(w,S){ss(z.start,w.children[0],ys,{handleNumbers:[S]})}),b.tap&&ss(z.start,Pt,Pr,{}),b.hover&&ss(z.move,Pt,Mo,{hover:!0}),b.drag&&It.forEach(function(w,S){if(!(w===!1||S===0||S===It.length-1)){var C=tt[S-1],R=tt[S],F=[w],U=[C,R],$=[S-1,S];x(w,d.cssClasses.draggable),b.fixed&&(F.push(C.children[0]),F.push(R.children[0])),b.dragAll&&(U=tt,$=Ht),F.forEach(function(yt){ss(z.start,yt,ys,{handles:U,handleNumbers:$,connect:w})})}})}function oi(b,w){Kt[b]=Kt[b]||[],Kt[b].push(w),b.split(".")[0]==="update"&&tt.forEach(function(S,C){Nt("update",C)})}function Oo(b){return b===qt.aria||b===qt.tooltips}function Ns(b){var w=b&&b.split(".")[0],S=w?b.substring(w.length):b;Object.keys(Kt).forEach(function(C){var R=C.split(".")[0],F=C.substring(R.length);(!w||w===R)&&(!S||S===F)&&(!Oo(F)||S===F)&&delete Kt[C]})}function Nt(b,w,S){Object.keys(Kt).forEach(function(C){var R=C.split(".")[0];b===R&&Kt[C].forEach(function(F){F.call(ui,Te.map(d.format.to),w,Te.slice(),S||!1,Tt.slice(),ui)})})}function li(b,w,S,C,R,F,U){var $;return tt.length>1&&!d.events.unconstrained&&(C&&w>0&&($=at.getAbsoluteDistance(b[w-1],d.margin,!1),S=Math.max(S,$)),R&&w1&&d.limit&&(C&&w>0&&($=at.getAbsoluteDistance(b[w-1],d.limit,!1),S=Math.min(S,$)),R&&w1?C.forEach(function(kt,st){var Mt=li(F,kt,F[kt]+w,yt[st],gt[st],!1,$);Mt===!1?w=0:(w=Mt-F[kt],F[kt]=Mt)}):yt=gt=[!0];var vt=!1;C.forEach(function(kt,st){vt=is(kt,S[kt]+w,yt[st],gt[st],!1,$)||vt}),vt&&(C.forEach(function(kt){Nt("update",kt),Nt("slide",kt)}),R!=null&&Nt("drag",U))}function Ar(b,w){return d.dir?100-b-w:b}function Po(b,w){Tt[b]=w,Te[b]=at.fromStepping(w);var S=Ar(w,0)-mo,C="translate("+nn(S+"%","0")+")";tt[b].style[d.transformRule]=C,zs(b),zs(b+1)}function rn(){Ht.forEach(function(b){var w=Tt[b]>50?-1:1,S=3+(tt.length+w*b);tt[b].style.zIndex=String(S)})}function is(b,w,S,C,R,F){return R||(w=li(Tt,b,w,S,C,!1,F)),w===!1?!1:(Po(b,w),!0)}function zs(b){if(It[b]){var w=0,S=100;b!==0&&(w=Tt[b-1]),b!==It.length-1&&(S=Tt[b]);var C=S-w,R="translate("+nn(Ar(w,C)+"%","0")+")",F="scale("+nn(C/100,"1")+")";It[b].style[d.transformRule]=R+" "+F}}function ci(b,w){return b===null||b===!1||b===void 0||(typeof b=="number"&&(b=String(b)),b=d.format.from(b),b!==!1&&(b=at.toStepping(b)),b===!1||isNaN(b))?Tt[w]:b}function hi(b,w,S){var C=m(b),R=Tt[0]===void 0;w=w===void 0?!0:w,d.animate&&!R&&f(K,d.cssClasses.tap,d.animationDuration),Ht.forEach(function($){is($,ci(C[$],$),!0,!1,S)});var F=Ht.length===1?0:1;if(R&&at.hasNoSize()&&(S=!0,Tt[0]=0,Ht.length>1)){var U=100/(Ht.length-1);Ht.forEach(function($){Tt[$]=$*U})}for(;F=0&&bS.stepAfter.startValue&&(R=S.stepAfter.startValue-C),C>S.thisStep.startValue?F=S.thisStep.step:S.stepBefore.step===!1?F=!1:F=C-S.stepBefore.highestStep,w===100?R=null:w===0&&(F=null);var U=at.countStepDecimals();return R!==null&&R!==!1&&(R=Number(R.toFixed(U))),F!==null&&F!==!1&&(F=Number(F.toFixed(U))),[F,R]}function Er(){return Ht.map(Fr)}function Lo(b,w){var S=Rr(),C=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];C.forEach(function(F){b[F]!==void 0&&(L[F]=b[F])});var R=ve(L);C.forEach(function(F){b[F]!==void 0&&(d[F]=R[F])}),at=R.spectrum,d.margin=R.margin,d.limit=R.limit,d.padding=R.padding,d.pips?tn(d.pips):Qi(),d.tooltips?Dr():Ji(),Tt=[],hi(a(b.start)?b.start:S,w)}function Ro(){Pt=_o(K),bo(d.connect,Pt),Co(d.events),hi(d.start),d.pips&&tn(d.pips),d.tooltips&&Dr(),vo()}Ro();var ui={destroy:Ao,steps:Er,on:oi,off:Ns,get:Rr,set:hi,setHandle:Lr,reset:To,__moveHandles:function(b,w,S){Tr(b,w,Tt,S)},options:L,updateOptions:Lo,target:K,removePips:Qi,removeTooltips:Ji,getPositions:function(){return Tt.slice()},getTooltips:function(){return $t},getOrigins:function(){return tt},pips:tn};return ui}function Ki(_,d){if(!_||!_.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+_);if(_.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var L=ve(d),z=Sr(_,L,d);return _.noUiSlider=z,z}var po={__spectrum:G,cssClasses:_t,create:Ki};s.create=Ki,s.cssClasses=_t,s.default=po,Object.defineProperty(s,"__esModule",{value:!0})})})(ro,ro.exports);const Fy=G0(ro.exports);var Ey=["start","slide","update","change","set","end"],Uh={name:"veeno",props:{inputClass:{type:String,default:"custom-slider-input"},inputName:{type:String,default:"custom-slider-value"},options:{type:Object,default:function(){return{start:[20,80],connect:!0,range:{min:0,max:100}}}},vertical:{type:Boolean,default:!1},handles:{type:[Number,Array],default:null},connect:{type:[Boolean,Array,String],default:!1},tooltips:{type:[Boolean,Array],default:!1},step:{type:Number,default:0},range:{type:Object,required:!0,validator:function(e){return!Array.isArray(e)&&typeof e=="object"}},pipsy:{type:[Boolean,Object],default:function(){return!1},validator:function(e){return typeof e=="boolean"||!Array.isArray(e)&&typeof e=="object"}},rtl:{type:Boolean,default:!1},keyboardSupport:{type:Boolean,default:!0},keyboardDefaultStep:{type:Number,default:10},keyboardPageMultiplier:{type:Number,default:5},keyboardMultiplier:{type:Number,default:1},documentElementId:{type:[String,null],default:null},format:{type:Object,default:null},set:{type:[Number,Array],default:null,validator:function(e){return typeof e=="number"||Array.isArray(e)}},behaviour:{type:String,default:"tap",validator:function(e){return["drag","tap","fixed","snap","none"].indexOf(e!==-1)}},getset:{type:Function,default:function(){return function(){return""}}}},created:function(){this.optionz=Object.assign({},this.options,this.$props,this.vertical&&(this.options.orientation="vertical"),this.handles&&(this.options.start=this.handles),this.rtl&&(this.options.direction="rtl"),this.pipsy&&!Object.keys(this.pipsy).length?this.options.pips={mode:"range",density:5}:this.options.pips=this.pipsy)},mounted:function(){var t=this,s=document.getElementById(this.documentElementId);this.optionz.documentElement=s||null;var i=this.$el;this.options.orientation==="vertical"&&(i.style.height="100%"),Fy.create(i,this.optionz),Ey.forEach(function(n){i.noUiSlider.on(n,function(r,a,o,l,c){t.$emit(n,{values:r,handle:a,unencoded:o,tap:l,positions:c}),n==="update"&&t.$emit("input",r)})}),this.getset(i)},render:function(t){var s=t("input",{attrs:{type:"hidden",name:this.name},class:this.inputClass}),i=t("span",Ny,this.$slots.default);return t("div",Iy,[s,i])},data:function(){return{optionz:Object,latestHandleValue:null}},watch:{set:function(t){this.$el.noUiSlider.set(t)}}},Iy={style:{position:"relative"},class:{veeno:!0},attrs:{name:"custom-slider"}},Ny={style:{position:"absolute",top:"-2.5rem"},class:{"veeno-span":!0}};function ao(e){ao.installed||(ao.installed=!0,e.component("veeno",Uh))}var zy={install:ao},_r=null;typeof window<"u"?_r=window.Vue:typeof global<"u"&&(_r=global.Vue),_r&&_r.use(zy);const yv="",Yy={components:{"slider-fixed":{extends:Uh,props:{fixedpips:{type:Array|Boolean,default:!1},tooltips:{type:Boolean|Array|Object,default:!0}},mounted(){var e,t;this.$props.fixedpips&&((t=(e=this.$el)==null?void 0:e.noUiSlider)==null||t.updateOptions({pips:this.$props.fixedpips},!1))}}},mounted(){const e=this.sliderRange;this.dateFrom=this.dateChoices[e.min],this.dateTo=this.dateChoices[e.max],this.updateDateFields(this.timeFrame)},data(){const e=this;let t=null,s=null,i=null,n=null;return{dateFrom:"",dateTo:"",sliderDisplayFormat:"YYYY-MM-DD",staticDateFieldProps:{class:"ss-header-date",calendar:!0,time:!1,times:!1,required:!1,invalid:!1,display:"YYYY-MM-DD"},sliderDateFormatter:{to:function(r){return""+e.dateChoices[Number(r).toFixed(0)]},from:function(r){let a=Number(e.dateChoices.indexOf(r));if(a<0){let o=Number(r.replaceAll("-","")).toFixed(0),l=null;a=0,e.dateChoices.forEach(function(c,h){const u=Number(c.replaceAll("-","")).toFixed(0);(l===null||Math.abs(u-o)0?"
("+Number(Math.abs(r-a)).toFixed(0)+" timeframes)":"")},from:function(r){return 0}},{to:function(r){const a=e.dateChoices.indexOf(e.dateFrom);return""+e.dateChoices[Number(r).toFixed(0)]+(a>0?"
("+Number(Math.abs(r-a)).toFixed(0)+" timeframes)":"")},from:function(r){return 0}}],monthnames:["january","february","march","april","may","june","july","august","september","october","november","december"].map(r=>this.$t("months."+r))}},props:{dateChoices:{type:Array,default(){return[]}}},computed:{sliderRange(){return{min:0,max:this.dateChoices.length-1}},timeFrame(){return[this.dateFrom,this.dateTo]},minDate(){return this.dateChoices.reduce((e,t)=>ee>t?e:t)}},methods:{onSliderSet(e){e&&(this.dateFrom=e.values[0],this.dateTo=e.values[1])},updateDateFields(e){var t,s,i,n;if(!(!Array.isArray(e)||e.length!==2))for(let r=0;r<2;r++){const a=r===0?"dateFrom":"dateTo",o=e[r];if(!o||!o.length)continue;let l=o.split(" ");if(l.length>1&&(this[a]=l[0]),this[a].length&&this.dateChoices){let c=Number(o.replaceAll("-","")).toFixed(0),h=r*(this.dateChoices.length-1),u={i:h,num:Number(this.dateChoices[h].replaceAll("-","")).toFixed(0)};this.dateChoices.forEach(function(m,v){let x=Number(m.replaceAll("-","")).toFixed(0);r===0&&x>c||r===1&&x=u.num||r===1&&x<=u.num)&&(u.i=v,u.num=x)}),this[a]=this.dateChoices[u.i];const f=this.$library.dayjs(this[a]);let g=this.$refs[r===0?"calendarFrom":"calendarTo"];g&&(g.data.dt=f),(t=this.$refs[r===0?"calendarFromDrawer":"calendarToDrawer"])==null||t.close()}(n=(i=(s=this.$refs.slider)==null?void 0:s.$el)==null?void 0:i.noUiSlider)==null||n.set([e[0]?this.dateFrom:null,e[1]?this.dateTo:null],!1,!1)}},onUpdateKirbyDateTo(e){this.updateDateFields([null,e])},onUpdateKirbyDateFrom(e){this.updateDateFields([e,null])}}};var Vy=function(){var t=this,s=t._self._c;return s("k-grid",{staticClass:"ss-timeframe-input",attrs:{gutter:"medium"}},[s("k-column",{attrs:{width:"3/12"}},[s("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("div",{staticClass:"k-date-field-body",attrs:{"data-theme":"field"}},[s("k-input",{ref:"fromDateField",attrs:{autofocus:!1,display:t.staticDateFieldProps.display,min:t.minDate,max:t.maxDate,required:!0,theme:"field",type:"date",icon:"calendar",before:t.$t("simplestats.timeframe.date.from","From")},scopedSlots:t._u([{key:"icon",fn:function(){return[s("k-dropdown",[s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:"calendar",tooltip:t.$t("date.select")},on:{click:function(i){return t.$refs.calendarFromDrawer.toggle()}}}),s("k-dropdown-content",{ref:"calendarFromDrawer",attrs:{align:"right"}},[s("k-calendar",{ref:"calendarFrom",attrs:{value:t.dateFrom+" 00:00:00",min:t.minDate,max:t.maxDate},on:{input:t.onUpdateKirbyDateFrom}})],1)],1)]},proxy:!0}]),model:{value:t.dateFrom,callback:function(i){t.dateFrom=i},expression:"dateFrom"}})],1)])],1),s("k-column",{attrs:{width:"6/12"}},[s("div",{staticClass:"k-range-input ss-timeframe-range"},[s("slider-fixed",{ref:"slider",attrs:{handles:t.timeFrame,set:t.timeFrame,range:t.sliderRange,behaviour:"drag",connect:"",step:1,tooltips:t.sliderDateTooltipsFunc,format:t.sliderDateFormatter,fixedpips:t.sliderStepSettings},on:{update:t.onSliderUpdate,change:t.onSliderChange,set:t.onSliderSet}})],1)]),s("k-column",{attrs:{width:"3/12"}},[s("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("div",{staticClass:"k-date-field-body",attrs:{"data-theme":"field"}},[s("k-input",{ref:"toDateField",attrs:{autofocus:!1,display:t.staticDateFieldProps.display,min:t.minDate,max:t.maxDate,required:!0,theme:"field",type:"date",icon:"calendar",before:t.$t("simplestats.timeframe.date.to","To")},scopedSlots:t._u([{key:"icon",fn:function(){return[s("k-dropdown",[s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:"calendar",tooltip:t.$t("date.select")},on:{click:function(i){return t.$refs.calendarToDrawer.toggle()}}}),s("k-dropdown-content",{ref:"calendarToDrawer",attrs:{align:"right"}},[s("k-calendar",{ref:"calendarTo",attrs:{value:t.dateTo+" 00:00:00",min:t.minDate,max:t.maxDate},on:{input:t.onUpdateKirbyDateTo}})],1)],1)]},proxy:!0}]),model:{value:t.dateTo,callback:function(i){t.dateTo=i},expression:"dateTo"}})],1)])],1)],1)},$y=[],Wy=ne(Yy,Vy,$y,!1,null,null,null,null);const Hy=Wy.exports,vv="",By={components:{Visitors:iu,PageStats:iy,Devices:ly,Referers:fy,DbInformation:_y,Configuration:Sy,TrackingTester:Ry,TimeFrameInput:Hy},data(){return{tab:"",dismissDisclaimer:!1,isLoading:!0}},props:{label:{type:String,default:"Simple Stats"},initialtab:{type:String,default:"pagevisits"},tabs:{type:Array,default:[]},globaltimespan:{type:Array,default:[]},timeframes:{type:Array,default:[]}},watch:{initialtab(e){e&&(this.tab=e)}},mounted(){this.onTab()},methods:{getTabFromLocalStorage(){try{return window.localStorage.getItem("ss-tabs-menu")}catch{}return null},writeTabToLocalStorage(){if(!this.tab||this.length<1)return!1;try{return window.localStorage.setItem("ss-tabs-menu",this.tab),!0}catch{}return!1},onTab(e){var s,i;let t=e;(!e||e.length<1)&&(t=this.getTabFromLocalStorage()),(!t||t.length<1&&this.initialtab)&&(t=this.initialtab),this.tabs.some(n=>n.name===t)||(t=this.tabs[0].name),this.tab=t,this.$root.$view.breadcrumb[0].label=(i=(s=this.tabs.find(n=>n.name===e))==null?void 0:s.label)!=null?i:t,this.$root.$view.breadcrumb[0].link=null,this.writeTabToLocalStorage()}}};var jy=function(){var t=this,s=t._self._c;return s("k-inside",[s("k-view",{staticClass:"k-simplestats-view"},[!t.isLoading&&!t.dismissDisclaimer?s("k-grid",[s("k-column",[s("k-headline",{attrs:{size:"medium",align:"center"}},[t._v(t._s(t.$t("simplestats.disclaimer.title")))]),s("k-text",{attrs:{size:"small",align:"center"}},[s("span",{domProps:{innerHTML:t._s(t.$t("simplestats.disclaimer.text"))}}),s("span",{staticClass:"hover-to-help"},[s("k-icon",{attrs:{type:"question"}}),s("div",{staticClass:"help"},[s("k-text",{attrs:{theme:"help",size:"small",align:"center"}},[t._v(t._s(t.$t("simplestats.disclaimer.dismiss")))])],1)],1),s("br")]),s("br"),s("br")],1)],1):t._e(),s("k-header",{attrs:{tabs:t.tabs,tab:t.tab},on:{tabChange:t.onTab}},[s("template",{slot:"default"},[t._v(" "+t._s(t.label)+" ")]),s("template",{slot:"right"},[s("time-frame-input",{ref:"timeFrame",attrs:{dateChoices:t.timeframes}})],1)],2),t.tab==t.tabs[0].name?s("div",[s("page-stats",{attrs:{dateFrom:t.$refs.timeFrame.dateFrom,dateTo:t.$refs.timeFrame.dateTo,"section-name":"pagestats"}})],1):t.tab==t.tabs[1].name?s("div",[s("devices",{attrs:{dateFrom:t.$refs.timeFrame.dateFrom,dateTo:t.$refs.timeFrame.dateTo,"section-name":"devicestats"}})],1):t.tab==t.tabs[2].name?s("div",[s("referers",{attrs:{dateFrom:t.$refs.timeFrame.dateFrom,dateTo:t.$refs.timeFrame.dateTo,"section-name":"refererstats"}})],1):t.tab==t.tabs[3].name?s("div",[s("k-grid",{attrs:{gutter:"large"}},[s("k-column",{attrs:{width:"1/2"}},[s("configuration",{attrs:{"section-name":"configinfo"}})],1),s("k-column",{attrs:{width:"1/2"}},[s("DbInformation",{attrs:{"section-name":"listdbinfo"}})],1),s("k-column",{attrs:{width:"1/1"}},[s("k-line-field"),s("tracking-tester")],1),s("k-column",{attrs:{width:"1/1"}},[s("k-line-field"),s("visitors",{attrs:{"section-name":"listvisitors"}})],1)],1)],1):s("div",[s("k-empty",[t._v(t._s(t.$t("simplestats.taberror")))])],1)],1)],1)},Uy=[],Gy=ne(By,jy,Uy,!1,null,null,null,null);const qy=Gy.exports,xv="",Xy={extends:Ys,components:{AreaChart:br},data(){return{headline:null,showFullInfo:!1,showTotals:!1,showTimeline:!1,showLanguages:!1,size:"medium",statsdata:null,isLoading:!1,error:"",languagesOverTime:[],visitsOverTimeData:[],languageTotalHits:[],trackedSince:"[unknown]",totalHits:0,averageHits:!1,timespanUnitName:"[unknown]",trackingPeriods:!1,label:"",chartPeriodLabels:[],chartLanguagesLabels:[]}},props:{sectionName:"OnePageStats"},computed:{languagesAreEnabled(){return this.chartLanguagesLabels&&this.chartLanguagesLabels.length>1},sectionSize(){return this.size=="small"||this.size=="compact"?"small":this.size=="medium"||this.size=="normal"?"medium":this.size=="large"||this.size=="huge"?"large":this.size=="tiny"?"tiny":"medium"},chartOptions(){return{animation:{onComplete:this.generateDownloadLink}}}},created(){this.load().then(e=>{var t;this.label=(t=e.label)!=null?t:e.headline,this.showFullInfo=e.showFullInfo,this.showTotals=e.showTotals,this.showTimeline=e.showTimeline,this.showLanguages=e.showLanguages,this.size=e.size,this.statsdata=e.statsdata,this.languagesOverTime=e.statsdata.languagesOverTime,this.visitsOverTimeData=e.statsdata.visitsovertimedata,this.chartPeriodLabels=e.statsdata.chartperiodlabels,this.chartLanguagesLabels=e.statsdata.chartlanguageslabels,this.languageTotalHits=e.statsdata.languageTotalHits,this.trackedSince=e.statsdata.firstVisited,this.lastVisited=e.statsdata.lastVisited,this.averageHits=e.statsdata.averageHits,this.totalHits=e.statsdata.totalHits,this.timespanUnitName=e.statsdata.timespanUnitName,this.trackingPeriods=e.statsdata.trackingPeriods})},mounted(){},methods:{graphFooter(e,t){let s=0,i=0;return e.forEach(function(n){s+=parseInt(n.value),i++}),i<=1?"":"Total: "+s},pieLabel(e,t){var s=t.datasets[e.datasetIndex],i=s.data.reduce(function(a,o,l,c){return a+o}),n=s.data[e.index],r=Math.floor(n/i*100+.5);return t.labels[e.index]+": "+n+" ("+r+"%)"}}};var Ky=function(){var t=this,s=t._self._c;return s("div",{class:{simplestatsonepagedetailssection:!0,small:t.sectionSize=="small",medium:t.sectionSize=="medium",large:t.sectionSize=="large"}},[t.label?s("div",[s("k-headline",{attrs:{size:"medium"}},[s("k-icon",{staticStyle:{display:"inline-block","padding-right":"0.5rem"},attrs:{type:"chart",size:"tiny"}}),t._v(" "+t._s(t.label))],1),s("br")],1):t._e(),t.showFullInfo&&t.showTotals?s("p",[t._v(" This page has been "),s("strong",[t._v("visited "+t._s(t.totalHits)+" times")]),t._v(" since "+t._s(t.trackedSince)+" and was last visited on "+t._s(t.lastVisited)+" which averages to "),s("strong",[t._v(t._s(Math.round(t.averageHits))+" visits per "+t._s(t.timespanUnitName))]),t._v(" using "+t._s(t.trackingPeriods)+" samples. ")]):t.showTotals?s("p",[t._v(" Total hits: "),s("strong",[t._v(t._s(t.totalHits))]),t._v(" ("),s("strong",[t._v(t._s(Math.round(t.averageHits)))]),t._v(" per "+t._s(t.timespanUnitName)+") ")]):t._e(),t.showTotals?s("k-line-field"):t._e(),t.showTimeline?s("div",{staticClass:"detailcolumn visitsovertime"},[s("k-headline",{attrs:{size:"medium"}},[t._v(t._s(t.$t("simplestats.visits.visitsovertime")))]),s("area-chart",{attrs:{"chart-data":t.languagesOverTime,"chart-labels":t.chartPeriodLabels,download:"PageVisitsOverTime.png","x-time-axis":!0,"y-visits-axis":!0,height:this.sectionSize=="small"?240:this.sectionSize=="large"?280:this.sectionSize=="tiny"?120:260,stacked:t.languagesAreEnabled,"chart-options":t.chartOptions,"auto-colorize":!0,"show-legend":t.languagesAreEnabled}}),s("br")],1):t._e(),t.languagesAreEnabled&&t.showLanguages?s("div",{staticClass:"detailcolumn globallanguages"},[s("k-headline",[t._v(t._s(t.$t("simplestats.visits.globallanguages")))]),s("area-chart",{attrs:{type:"Pie",download:"PageGlobalLanguageVisits.png","chart-data":t.languageTotalHits,"chart-labels":t.chartLanguagesLabels,"chart-options":t.chartOptions,"auto-colorize":!0,height:this.sectionSize=="small"?185:this.sectionSize=="large"?225:this.sectionSize=="tiny"?80:205,fill:!0,"show-legend":t.languagesAreEnabled}})],1):t._e()],1)},Zy=[],Jy=ne(Xy,Ky,Zy,!1,null,null,null,null);const Qy=Jy.exports,wv="",tv={props:{value:String|Number,column:Object,field:Object},computed:{percentage(){return Number(this.value*100).toFixed()}}};var ev=function(){var t=this,s=t._self._c;return s("p",{staticClass:"ss-percentage-field-preview"},[s("span",{staticClass:"ss-progress",style:"width: "+t.percentage+"%;"},[t._v(t._s(t.percentage)+"%")])])},sv=[],iv=ne(tv,ev,sv,!1,null,null,null,null);const nv=iv.exports;panel.plugin("daandelange/simplestats",{components:{"k-simplestats-view":qy,"k-tabs":{extends:"k-tabs",mounted(){this.bindTabClicks()},emits:["tabChange"],methods:{bindTabClicks(){const e=this;for(const t of this.$children)t.$el.classList.contains("k-tab-button")&&t.$el.addEventListener("click",function(){e.onClick(t.$vnode.key)})},onClick(e){this.tab!==e&&this.$parent.$emit("tabChange",e)}}},"k-percentage-field-preview":nv},sections:{pagestats:Qy},use:[],devtool:"source-map"})})(); diff --git a/src/components/Sections/OnePageStats.vue b/src/components/Sections/OnePageStats.vue index 2c94bfc..96c8137 100644 --- a/src/components/Sections/OnePageStats.vue +++ b/src/components/Sections/OnePageStats.vue @@ -21,9 +21,9 @@
{{ $t('simplestats.visits.visitsovertime') }} 0; - return this.chartLanguagesLabels && this.chartLanguagesLabels.length > 0; + return this.chartLanguagesLabels && this.chartLanguagesLabels.length > 1; }, sectionSize(){ if(this.size=='small'||this.size=='compact') return 'small';