/*! For license information please see wpDashboard-35c9a830.js.LICENSE.txt */
(window.wpackiowpqEformcommonJsonp=window.wpackiowpqEformcommonJsonp||[]).push([[5],{10:function(e,a,o){"use strict";o.r(a);var r=o(0),s=o(1),t=o.n(s),d=o(3),n=o.n(d),i=o(4),l=o.n(i);t.a.extend(l.a),t.a.extend(n.a),r.d.register(r.b,r.a,r.i,r.e,r.f,r.m,r.n,r.k,r.c,r.h,r.g,r.l,r.j);const c={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"};function u(e,a){return new r.d(e,{type:"bar",options:{indexAxis:"y",scales:{y:{grid:{display:!1},stacked:!0},x:{beginAtZero:!0,grid:{display:!1}}},responsive:!0,maintainAspectRatio:!1},data:a})}r.o._date.override({_id:"dayjs",formats:()=>c,parse(e,a){const o=typeof e;return null===e||"undefined"===o?null:"string"===o&&"string"==typeof a?t()(e,a).isValid()?t()(e,a).valueOf():null:e instanceof t.a?null:t()(e).isValid()?t()(e).valueOf():null},format:(e,a)=>t()(e).format(a),add:(e,a,o)=>t()(e).add(a,o).valueOf(),diff:(e,a,o)=>t()(e).diff(t()(a),o),startOf(e,a,o){if("isoWeek"===a){const a="number"==typeof o&&o>0&&o<7?o:1;return t()(e).isoWeekday(a).startOf("day").valueOf()}return t()(e).startOf(a).valueOf()},endOf:(e,a)=>t()(e).endOf(a).valueOf()}),document.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelector("#wpeform_dashboard_widget");if(e)if(e.querySelector(".wpeform-dashboard-widget__onboard")){const a=e.querySelector("#wpeform-dashboard-widget__fakegraph-canvas");a&&u(a,{labels:["Contact","Payment","Quiz","Newsletter"],datasets:[{label:WPEFormDashboardL10n.submissions,axis:"y",data:[10,20,5,8],backgroundColor:["#72aee6","#72aee6","#72aee6","#72aee6"],borderColor:["#72aee6","#72aee6","#72aee6","#72aee6"]},{label:WPEFormDashboardL10n.views,axis:"y",data:[45,88,10,54],backgroundColor:["#9ec2e6","#9ec2e6","#9ec2e6","#9ec2e6"],borderColor:["#9ec2e6","#9ec2e6","#9ec2e6","#9ec2e6"]}]})}else if(e.querySelector(".wpeform-dashboard-widget__stats-data")){const s=e.querySelector("#wpeform-dashboard-widget__graph-canvas-submissions");if(s)try{var a;const e=JSON.parse(null!==(a=s.dataset.submissionsGraph)&&void 0!==a?a:""),o={label:WPEFormDashboardL10n.submissions,fill:!0,data:[],borderColor:"#72aee6",backgroundColor:"#9ec2e6",borderWidth:2,tension:.4};null==e||e.forEach((e=>{const a=t.a.utc(e.period,"YYYY-MM-DD").local();o.data.push({x:a.toISOString(),y:e.submissionCount})})),function(e,a,o){new r.d(e,{type:"line",options:{plugins:{legend:{display:!1}},scales:{y:{display:!0,stacked:!1,grid:{display:!1}},x:{display:!0,grid:{display:!1},type:"time",time:{unit:"day",isoWeekday:1,displayFormats:{day:o},tooltipFormat:o}}},maintainAspectRatio:!1},data:a})}(s,{datasets:[o]},WPEFormDashboardL10n.chartDateFormat)}catch(e){console.error(e)}const d=e.querySelector("#wpeform-dashboard-widget__graph-canvas-forms");if(d)try{var o;const e=JSON.parse(null!==(o=d.dataset.performingForms)&&void 0!==o?o:""),a={label:WPEFormDashboardL10n.submissions,axis:"y",data:[],backgroundColor:[],borderColor:[]},r={label:WPEFormDashboardL10n.views,axis:"y",data:[],backgroundColor:[],borderColor:[]},s=[];null==e||e.forEach((e=>{s.push(e.formName),a.data.push(e.submissionCount),r.data.push(e.viewCount),a.backgroundColor.push("#72aee6"),r.backgroundColor.push("#9ec2e6")})),u(d,{labels:s,datasets:[a,r]})}catch(e){console.error(e)}}}))},9:function(e,a,o){o(2),e.exports=o(10)}},[[9,0,4]]]);
//# sourceMappingURL=wpDashboard-35c9a830.js.map