;function duskyDashboardChart(a){document.querySelector("#dusky_chart_period")&&wp.ajax.post("dusky_filter_dashboard_usage",{data:a?a.target.value:7,nonce:dusky_localize.nonce}).done((function(a){const[e,t,d]=a,o=document.getElementById("dusky_dark_mode_chart"),r=Chart.getChart("dusky_dark_mode_chart");r&&r.destroy(),new Chart(o,{type:d,data:{labels:e,datasets:[{label:"Dark Mode Users (%): ",data:t,borderWidth:2}]},options:{scales:{y:{beginAtZero:!0}}}})})).fail((function(){console.log("fail")}))}!function(a){a(document).ready((function(){a("#dusky_chart_period").on("change",duskyDashboardChart),duskyDashboardChart()}))}(jQuery);