From 7f00ca9f4e250510bdef5e6b80ac633e4f44b5c4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 24 Nov 2022 10:55:22 +0000 Subject: [PATCH] Bundle embedded web app --- static/web/404.html | 4 ++-- static/web/404/index.html | 4 ++-- .../static/chunks/2139-2d5c6f4e28f188e2.js | 17 ----------------- .../_next/static/chunks/236-f876fd1a47451d45.js | 17 +++++++++++++++++ .../static/chunks/3fff1979-f01cca2aefcfdf97.js | 6 ------ .../static/chunks/ee8b1517-9cf421a7da630c58.js | 6 ++++++ ...a2f.js => hardware-info-34c5be89db1620b1.js} | 2 +- ...446.js => stream-health-6ff3e3e38deacd0c.js} | 2 +- ...457ce.js => viewer-info-1518736f920a85d9.js} | 2 +- .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 static/web/admin/access-tokens/index.html | 2 +- static/web/admin/actions/index.html | 2 +- static/web/admin/chat/messages/index.html | 2 +- static/web/admin/chat/users/index.html | 2 +- static/web/admin/config-chat/index.html | 2 +- static/web/admin/config-federation/index.html | 2 +- static/web/admin/config-notify/index.html | 2 +- .../web/admin/config-public-details/index.html | 2 +- .../web/admin/config-server-details/index.html | 2 +- static/web/admin/config-social-items/index.html | 2 +- static/web/admin/config-storage/index.html | 2 +- static/web/admin/config-video/index.html | 2 +- static/web/admin/config/appearance/index.html | 2 +- static/web/admin/federation/actions/index.html | 2 +- .../web/admin/federation/followers/index.html | 2 +- static/web/admin/hardware-info/index.html | 2 +- static/web/admin/help/index.html | 2 +- static/web/admin/index.html | 2 +- static/web/admin/logs/index.html | 2 +- static/web/admin/stream-health/index.html | 2 +- static/web/admin/upgrade/index.html | 2 +- static/web/admin/viewer-info/index.html | 2 +- static/web/admin/webhooks/index.html | 2 +- static/web/embed/chat/readonly/index.html | 2 +- static/web/embed/chat/readwrite/index.html | 2 +- static/web/embed/video/index.html | 2 +- static/web/index.html | 4 ++-- 38 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 static/web/_next/static/chunks/2139-2d5c6f4e28f188e2.js create mode 100644 static/web/_next/static/chunks/236-f876fd1a47451d45.js delete mode 100644 static/web/_next/static/chunks/3fff1979-f01cca2aefcfdf97.js create mode 100644 static/web/_next/static/chunks/ee8b1517-9cf421a7da630c58.js rename static/web/_next/static/chunks/pages/admin/{hardware-info-ab778720aa460a2f.js => hardware-info-34c5be89db1620b1.js} (95%) rename static/web/_next/static/chunks/pages/admin/{stream-health-8d96e58eb87c0446.js => stream-health-6ff3e3e38deacd0c.js} (96%) rename static/web/_next/static/chunks/pages/admin/{viewer-info-60ba10fda4e457ce.js => viewer-info-1518736f920a85d9.js} (93%) rename static/web/_next/static/{q1n6V5Sv1p0oT-5ZJPSmc => eTNBHC4gaJduSysl1jvZg}/_buildManifest.js (76%) rename static/web/_next/static/{q1n6V5Sv1p0oT-5ZJPSmc => eTNBHC4gaJduSysl1jvZg}/_ssgManifest.js (100%) diff --git a/static/web/404.html b/static/web/404.html index 62ccb924e..6836df10a 100644 --- a/static/web/404.html +++ b/static/web/404.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/static/web/404/index.html b/static/web/404/index.html index 62ccb924e..6836df10a 100644 --- a/static/web/404/index.html +++ b/static/web/404/index.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/static/web/_next/static/chunks/2139-2d5c6f4e28f188e2.js b/static/web/_next/static/chunks/2139-2d5c6f4e28f188e2.js deleted file mode 100644 index 1b11b65ab..000000000 --- a/static/web/_next/static/chunks/2139-2d5c6f4e28f188e2.js +++ /dev/null @@ -1,17 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2139],{92616:function(t){t.exports=function(){"use strict";function t(t){return"[object Array]"===Object.prototype.toString.call(t)}function e(t){return t instanceof Function}function n(t){return"[object Object]"===Object.prototype.toString.call(t)&&!e(t)&&t instanceof Object}function r(e,o){var i;for(i in o)"__proto__"!==i&&(n(o[i])||t(o[i])?(n(o[i])&&!n(e[i])&&(e[i]={}),t(o[i])&&!t(e[i])&&(e[i]=[]),r(e[i],o[i])):void 0!==o[i]&&(e[i]=o[i]))}function o(t,e){var n={};return r(n,t),r(n,e),n}var i=/^(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)$/i;function a(t){return""+t}function s(t){return parseFloat(t)}function l(t){var e,n,r,o;if("object"!=typeof t){if("number"==typeof t)t=new Date(1e3*t);else{if(e=(t=""+t).match(i))return n=parseInt(e[1],10),r=parseInt(e[3],10)-1,o=parseInt(e[5],10),new Date(n,r,o);var a=t.replace(/ /,"T").replace(" ","").replace("UTC","Z");t=new Date(Date.parse(a)||t)}}return t}function c(e){if(!t(e)){var n,r=[];for(n in e)e.hasOwnProperty(n)&&r.push([n,e[n]]);e=r}return e}function u(t,e,n,r,i,a,s,l){return function(c,u,f){var h=c.data,p=o({},t);return p=o(p,f||{}),(c.singleSeriesFormat||"legend"in u)&&e(p,u.legend,c.singleSeriesFormat),u.title&&n(p,u.title),"min"in u?r(p,u.min):!function(t){var e,n,r;for(e=0;e=6}function x(t){return"number"==typeof t}var v=["bytes","KB","MB","GB","TB","PB","EB"];function M(t,e,n,r){t=t||"",n.prefix&&(e<0&&(e*=-1,t+="-"),t+=n.prefix);var o=n.suffix||"",i=n.precision,a=n.round;if(n.byteScale){var s,l=r?n.byteScale:e;l>=0x1000000000000000?(e/=0x1000000000000000,s=6):l>=0x4000000000000?(e/=0x4000000000000,s=5):l>=1099511627776?(e/=1099511627776,s=4):l>=1073741824?(e/=1073741824,s=3):l>=1048576?(e/=1048576,s=2):l>=1024?(e/=1024,s=1):s=0,void 0===i&&void 0===a&&(e>=1023.5&&s=1e3?4:3),o=" "+v[s]}if(void 0!==i&&void 0!==a)throw Error("Use either round or precision, not both");if(!r&&(void 0===i||(e=e.toPrecision(i),n.zeros||(e=parseFloat(e))),void 0!==a)){if(a<0){var c=Math.pow(10,-1*a);e=parseInt((1*e/c).toFixed(0))*c}else e=e.toFixed(a),n.zeros||(e=parseFloat(e))}if(n.thousands||n.decimal){var u=(e=""+e).split(".");e=u[0],n.thousands&&(e=e.replace(/\B(?=(\d{3})+(?!\d))/g,n.thousands)),u.length>1&&(e+=(n.decimal||".")+u[1])}return t+e+o}function w(t,e,n){return n in e?e[n]:n in t.options?t.options[n]:null}var z={maintainAspectRatio:!1,animation:!1,plugins:{legend:{},tooltip:{displayColors:!1,callbacks:{}},title:{font:{size:20},color:"#333"}},interaction:{}},_={scales:{y:{ticks:{maxTicksLimit:4},title:{font:{size:16},color:"#333"},grid:{}},x:{grid:{drawOnChartArea:!1},title:{font:{size:16},color:"#333"},time:{},ticks:{}}}},C=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#651067"],k=function(t,e,n){void 0!==e?(t.plugins.legend.display=!!e,e&&!0!==e&&(t.plugins.legend.position=e)):n&&(t.plugins.legend.display=!1)},A=function(t,e){t.plugins.title.display=!0,t.plugins.title.text=e},O=function(t,e){null!==e&&(t.scales.x.min=s(e))},T=function(t,e){t.scales.x.max=s(e)},S=function(t,e){t.scales.x.stacked=!!e,t.scales.y.stacked=!!e},E=function(t,e){t.scales.x.title.display=!0,t.scales.x.title.text=e},P=function(t,e){t.scales.y.title.display=!0,t.scales.y.title.text=e},j=function(t,e){var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?"rgba("+parseInt(n[1],16)+", "+parseInt(n[2],16)+", "+parseInt(n[3],16)+", "+e+")":t},D=function(t){return null!=t},R=function(t,e,n){var r=Math.ceil(t.element.offsetWidth/4/e.labels.length);r>25?r=25:r<10&&(r=10),n.scales.x.ticks.callback||(n.scales.x.ticks.callback=function(t){return(t=""+this.getLabelForValue(t)).length>r?t.substring(0,r-2)+"...":t})},L=function(e,n,r){var o={prefix:e.options.prefix,suffix:e.options.suffix,thousands:e.options.thousands,decimal:e.options.decimal,precision:e.options.precision,round:e.options.round,zeros:e.options.zeros};if(e.options.bytes){var i=e.data;"pie"===r&&(i=[{data:i}]);for(var a=0,s=0;sa&&(a=l.data[c][1]);for(var u=1;a>=1024;)u*=1024,a/=1024;o.byteScale=u}if("pie"!==r){var f=n.scales.y;"bar"===r&&(f=n.scales.x),o.byteScale&&(f.ticks.stepSize||(f.ticks.stepSize=o.byteScale/2),f.ticks.maxTicksLimit||(f.ticks.maxTicksLimit=4)),f.ticks.callback||(f.ticks.callback=function(t){return M("",t,o,!0)})}if(!n.plugins.tooltip.callbacks.label){if("scatter"===r)n.plugins.tooltip.callbacks.label=function(t){var e=t.dataset.label||"";return e&&(e+=": "),e+"("+t.label+", "+t.formattedValue+")"};else if("bubble"===r)n.plugins.tooltip.callbacks.label=function(t){var e=t.dataset.label||"";e&&(e+=": ");var n=t.raw;return e+"("+n.x+", "+n.y+", "+n.v+")"};else if("pie"===r)n.plugins.tooltip.callbacks.label=function(e){var n=e.label;return t(n)?(n=n.slice(),n[0]+=": "):n+=": ",M(n,e.parsed,o)};else{var h="bar"===r?"x":"y";n.plugins.tooltip.callbacks.label=function(t){if(null!==t.parsed[h]){var e=t.dataset.label||"";return e&&(e+=": "),M(e,t.parsed[h],o)}}}}},F=u(o(z,_),k,A,function(t,e){null!==e&&(t.scales.y.min=s(e))},function(t,e){t.scales.y.max=s(e)},S,E,P),I=function(e,n,r){var i=[],a=[],c=e.options.colors||C,u=!0,f=!0,h=!0,m=!0,x=!0,v=!0,M=e.data,z=0;if("bubble"===r)for(var _=0;_z&&(z=k.data[A][2]);var O,T,S,E,P,R,L=[],F=[];if("bar"===r||"column"===r||"number"!==e.xtype&&"bubble"!==e.xtype){var I,B,N,H,W,Y=[];for(T=0;T0){var tt,te,tn,tr=(D(K)?l(K):a[0]).getTime(),to=(D(G)?l(G):a[0]).getTime();for(T=1;Tto&&(to=ti)}var ta=(to-tr)/864e5;if(!n.scales.x.time.unit&&(m||ta>3650?(n.scales.x.time.unit="year",tn=365):h||ta>300?(n.scales.x.time.unit="month",tn=30):u||ta>10?(n.scales.x.time.unit="day",tn=1):x||ta>.5?(n.scales.x.time.displayFormats={hour:"MMM d, h a"},n.scales.x.time.unit="hour",tn=1/24):v&&(n.scales.x.time.displayFormats={minute:"h:mm a"},n.scales.x.time.unit="minute",tn=1/24/60),tn&&ta>0)){var ts=e.element.offsetWidth;if(ts>0){var tl=Math.ceil(ta/tn/(ts/100));f&&1===tn&&(tl=7*Math.ceil(tl/7)),n.scales.x.time.stepSize=tl}}!n.scales.x.time.tooltipFormat&&(u?n.scales.x.time.tooltipFormat="PP":x?n.scales.x.time.tooltipFormat="MMM d, h a":v&&(n.scales.x.time.tooltipFormat="h:mm a"))}return{labels:a,datasets:i}},B=function(t){this.name="chartjs",this.library=t};B.prototype.renderLineChart=function(t,e){var n={};!t.options.max&&function(t){var e,n,r;for(e=0;e● '+M(this.series.name+": ",this.y,o)+"
"})},V=function(t){this.name="highcharts",this.library=t};V.prototype.renderLineChart=function(t,e){var n={};"areaspline"===(e=e||"spline")&&(n={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),!1===t.options.curve&&("areaspline"===e?e="area":"spline"===e&&(e="line"));var r,o,i,a=Y(t,t.options,n);"number"===t.xtype?a.xAxis.type=a.xAxis.type||"linear":a.xAxis.type="string"===t.xtype?"category":"datetime",a.chart.type||(a.chart.type=e),U(t,a,e);var s=t.data;for(o=0;o0)return!1;return!0}function tc(t,e,n){if(t.addEventListener)return t.addEventListener(e,n,!1),n;var r=function(){return n.call(t,window.event)};return t.attachEvent("on"+e,r),r}function tu(t,e,n){t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)}function tf(t,e){if(t===e)return!1;for(;e&&e!==t;)e=e.parentNode;return e===t}to.prototype.renderLineChart=function(t){var e=this;this.waitForLoaded(t,function(){var n={};!1===t.options.curve&&(n.curveType="none"),!1===t.options.points&&(n.pointSize=0);var r=tn(t,t.options,n),o=e.createDataTable(t.data,t.xtype);e.drawChart(t,"LineChart",o,r)})},to.prototype.renderPieChart=function(t){var e=this;this.waitForLoaded(t,function(){var n={chartArea:{top:"10%",height:"80%"},legend:{}};t.options.colors&&(n.colors=t.options.colors),t.options.donut&&(n.pieHole=.5),"legend"in t.options&&J(n,t.options.legend),t.options.title&&Z(n,t.options.title);var r=o(o($,n),t.options.library||{}),i=new e.library.visualization.DataTable;i.addColumn("string",""),i.addColumn("number","Value"),i.addRows(t.data),e.drawChart(t,"PieChart",i,r)})},to.prototype.renderColumnChart=function(t){var e=this;this.waitForLoaded(t,function(){var n=tn(t,t.options),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"ColumnChart",r,n)})},to.prototype.renderBarChart=function(t){var e=this;this.waitForLoaded(t,function(){var n=u($,J,Z,q,K,G,tt,te)(t,t.options,{hAxis:{gridlines:{color:"#ccc"}}}),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"BarChart",r,n)})},to.prototype.renderAreaChart=function(t){var e=this;this.waitForLoaded(t,function(){var n=tn(t,t.options,{isStacked:!0,pointSize:0,areaOpacity:.5}),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"AreaChart",r,n)})},to.prototype.renderGeoChart=function(t){var e=this;this.waitForLoaded(t,"geochart",function(){var n=o(o($,{legend:"none",colorAxis:{colors:t.options.colors||["#f6c7b6","#ce502d"]}}),t.options.library||{}),r=new e.library.visualization.DataTable;r.addColumn("string",""),r.addColumn("number",t.options.label||"Value"),r.addRows(t.data),e.drawChart(t,"GeoChart",r,n)})},to.prototype.renderScatterChart=function(t){var e=this;this.waitForLoaded(t,function(){var n,r,o,i,a=tn(t,t.options,{}),s=t.data,l=[];for(n=0;n0)throw Error("No charting library found for "+t);throw Error("No charting libraries found - be sure to include one before your charts")})(t,n),n.options.download&&!n.__downloadAttached&&"chartjs"===n.adapter&&(o=(r=n).element,i=document.createElement("a"),!0===(a=r.options.download)?a={}:"string"==typeof a&&(a={filename:a}),i.download=a.filename||"chart.png",i.style.position="absolute",i.style.top="20px",i.style.right="20px",i.style.zIndex=1e3,i.style.lineHeight="20px",i.target="_blank",(s=document.createElement("img")).alt="Download",s.style.border="none",s.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==",i.appendChild(s),o.style.position="relative",r.__downloadAttached=!0,r.__enterEvent=tc(o,"mouseover",function(t){var e=t.relatedTarget;e&&(e===this||tf(this,e))||!r.options.download||(i.href=r.toImage(a),o.appendChild(i))}),r.__leaveEvent=tc(o,"mouseout",function(t){var e=t.relatedTarget;e&&(e===this||tf(this,e))||!i.parentNode||i.parentNode.removeChild(i)}))}(this.__chartName(),this)},tz.prototype.__config=function(){return ty};var t_={LineChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this)},e.prototype.__chartName=function(){return"LineChart"},e}(tz),PieChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ts(this)},e.prototype.__chartName=function(){return"PieChart"},e}(tz),ColumnChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this,null,!0)},e.prototype.__chartName=function(){return"ColumnChart"},e}(tz),BarChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this,null,!0)},e.prototype.__chartName=function(){return"BarChart"},e}(tz),AreaChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this)},e.prototype.__chartName=function(){return"AreaChart"},e}(tz),GeoChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ts(this)},e.prototype.__chartName=function(){return"GeoChart"},e}(tz),ScatterChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this,"number")},e.prototype.__chartName=function(){return"ScatterChart"},e}(tz),BubbleChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this,"bubble")},e.prototype.__chartName=function(){return"BubbleChart"},e}(tz),Timeline:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){var t,e=this.rawData;for(t=0;tt(e,n,r,o),override:i=>t(e.override(i),n,r,o)};return new Proxy(i,{deleteProperty:(t,n)=>(delete t[n],delete e[n],!0),get:(e,n,r)=>eC(e,n,()=>(function(e,n,r){let{_proxy:o,_context:i,_subProxy:a,_descriptors:s}=e,u=o[n];return O(u)&&s.isScriptable(n)&&(u=function(t,e,n,r){let{_proxy:o,_context:i,_subProxy:a,_stack:s}=n;if(s.has(t))throw Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);return s.add(t),e=e(i,a||r),s.delete(t),e_(t,e)&&(e=eA(o._scopes,o,t,e)),e}(n,u,e,r)),l(u)&&u.length&&(u=function(e,n,r,o){let{_proxy:i,_context:a,_subProxy:s,_descriptors:l}=r;if(A(a.index)&&o(e))n=n[a.index%n.length];else if(c(n[0])){let u=n,f=i._scopes.filter(t=>t!==u);for(let h of(n=[],u)){let p=eA(f,i,e,h);n.push(t(p,a,s&&s[e],l))}}return n}(n,u,e,s.isIndexable)),e_(n,u)&&(u=t(u,i,a&&a[n],s)),u})(e,n,r)),getOwnPropertyDescriptor:(t,n)=>t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,n)=>Reflect.has(e,n),ownKeys:()=>Reflect.ownKeys(e),set:(t,n,r)=>(e[n]=r,delete t[n],!0)})}},aA:function(){return e1},aB:function(){return e2},aC:function(){return tb},aD:function(){return e5},aE:function(){return en},aF:function(){return i},aG:function(){return q},aH:function(){return Q},aI:function(){return H},aJ:function(){return V},aK:function(){return U},aL:function(){return J},aM:function(){return t7},aN:function(){return ts},aO:function(){return to},aa:function(){return eM},ab:function(){return ew},ac:function(){return w},ad:function(){return a},ae:function(){return td},af:function(){return eX},ag:function(){return et},ah:function(){return T},ai:function(){return b},aj:function(){return S},ak:function(){return tr},al:function(){return ep},am:function(){return eL},an:function(){return e7},ao:function(){return e8},ap:function(){return eq},aq:function(){return eK},ar:function(){return eZ},as:function(){return ea},at:function(){return es},au:function(){return ee},av:function(){return ec},aw:function(){return ed},ax:function(){return eg},ay:function(){return e4},az:function(){return G},b:function(){return l},c:function(){return t0},d:function(){return t4},e:function(){return tz},f:function(){return C},g:function(){return u},h:function(){return ev},i:function(){return c},j:function(){return A},k:function(){return s},l:function(){return tc},m:function(){return p},n:function(){return d},o:function(){return e0},p:function(){return tt},q:function(){return tm},r:function(){return th},s:function(){return N},t:function(){return X},u:function(){return tu},v:function(){return h},w:function(){return tx},x:function(){return Y},y:function(){return eE},z:function(){return B}});let a=(o=0,function(){return o++});function s(t){return null==t}function l(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function c(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}let u=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function f(t,e){return u(t)?t:e}function h(t,e){return void 0===t?e:t}let p=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,d=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function g(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function y(t,e,n,r){let o,i,a;if(l(t)){if(i=t.length,r)for(o=i-1;o>=0;o--)e.call(n,t[o],o);else for(o=0;ot,x:t=>t.x,y:t=>t.y};function C(t,e){let n=_[e]||(_[e]=function(t){let e=function(t){let e=t.split("."),n=[],r="";for(let o of e)(r+=o).endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(t);return t=>{for(let n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function k(t){return t.charAt(0).toUpperCase()+t.slice(1)}let A=t=>void 0!==t,O=t=>"function"==typeof t,T=(t,e)=>{if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0};function S(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}let E=Math.PI,P=2*E,j=P+E,D=Number.POSITIVE_INFINITY,R=E/180,L=E/2,F=E/4,I=2*E/3,B=Math.log10,N=Math.sign;function H(t){let e=Math.round(t);t=U(t,e,t/1e3)?e:t;let n=Math.pow(10,Math.floor(B(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function W(t){let e;let n=[],r=Math.sqrt(t);for(e=1;et-e).pop(),n}function Y(t){return!isNaN(parseFloat(t))&&isFinite(t)}function U(t,e,n){return Math.abs(t-e)=t}function Q(t,e,n){let r,o,i;for(r=0,o=t.length;rl&&c=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function to(t,e,n){let r;n=n||(n=>t[n]1;)n(r=i+o>>1)?i=r:o=r;return{lo:i,hi:o}}let ti=(t,e,n,r)=>to(t,n,r?r=>t[r][e]<=n:r=>t[r][e]to(t,n,r=>t[r][e]>=n);function ts(t,e,n){let r=0,o=t.length;for(;rr&&t[o-1]>n;)o--;return r>0||o{let n="_onData"+k(e),r=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){let o=r.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"==typeof t[n]&&t[n](...e)}),o}})})}function tu(t,e){let n=t._chartjs;if(!n)return;let r=n.listeners,o=r.indexOf(e);-1!==o&&r.splice(o,1),r.length>0||(tl.forEach(e=>{delete t[e]}),delete t._chartjs)}function tf(t){let e,n;let r=new Set;for(e=0,n=t.length;eArray.prototype.slice.call(t)),o=!1,i=[];return function(...n){i=r(n),o||(o=!0,th.call(window,()=>{o=!1,t.apply(e,i)}))}}function td(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}let tg=t=>"start"===t?"left":"end"===t?"right":"center",ty=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2,tb=(t,e,n,r)=>t===(r?"left":"right")?n:"center"===t?(e+n)/2:e;function tm(t,e,n){let r=e.length,o=0,i=r;if(t._sorted){let{iScale:a,_parsed:s}=t,l=a.axis,{min:c,max:u,minDefined:f,maxDefined:h}=a.getUserBounds();f&&(o=te(Math.min(ti(s,a.axis,c).lo,n?r:ti(e,l,a.getPixelForValue(c)).lo),0,r-1)),i=h?te(Math.max(ti(s,a.axis,u,!0).hi+1,n?0:ti(e,l,a.getPixelForValue(u),!0).hi+1),o,r)-o:r-o}return{start:o,count:i}}function tx(t){let{xScale:e,yScale:n,_scaleRanges:r}=t,o={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=o,!0;let i=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,o),i}let tv=t=>0===t||1===t,tM=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*P/n)),tw=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*P/n)+1,tz={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*L)+1,easeOutSine:t=>Math.sin(t*L),easeInOutSine:t=>-.5*(Math.cos(E*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>tv(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(-Math.pow(2,-10*(2*t-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>tv(t)?t:tM(t,.075,.3),easeOutElastic:t=>tv(t)?t:tw(t,.075,.3),easeInOutElastic:t=>tv(t)?t:t<.5?.5*tM(2*t,.1125,.45):.5+.5*tw(2*t-1,.1125,.45),easeInBack:t=>t*t*(2.70158*t-1.70158),easeOutBack:t=>(t-=1)*t*(2.70158*t+1.70158)+1,easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-tz.easeOutBounce(1-t),easeOutBounce:t=>t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375,easeInOutBounce:t=>t<.5?.5*tz.easeInBounce(2*t):.5*tz.easeOutBounce(2*t-1)+.5};/*! - * @kurkle/color v0.2.1 - * https://github.com/kurkle/color#readme - * (c) 2022 Jukka Kurkela - * Released under the MIT License - */ function t_(t){return t+.5|0}let tC=(t,e,n)=>Math.max(Math.min(t,n),e);function tk(t){return tC(t_(2.55*t),0,255)}function tA(t){return tC(t_(255*t),0,255)}function tO(t){return tC(t_(t/2.55)/100,0,1)}function tT(t){return tC(t_(100*t),0,100)}let tS={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},tE=[..."0123456789ABCDEF"],tP=t=>tE[15&t],tj=t=>tE[(240&t)>>4]+tE[15&t],tD=t=>(240&t)>>4==(15&t),tR=t=>tD(t.r)&&tD(t.g)&&tD(t.b)&&tD(t.a),tL=(t,e)=>t<255?e(t):"",tF=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function tI(t,e,n){let r=e*Math.min(n,1-n),o=(e,o=(e+t/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function tB(t,e,n){let r=(r,o=(r+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function tN(t,e,n){let r;let o=tI(t,1,.5);for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)o[r]*=1-e-n,o[r]+=e;return o}function tH(t){let e,n,r;let o=t.r/255,i=t.g/255,a=t.b/255,s=Math.max(o,i,a),l=Math.min(o,i,a),c=(s+l)/2;return s!==l&&(r=s-l,n=c>.5?r/(2-s-l):r/(s+l),e=60*(e=o===s?(i-a)/r+(it<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,t$=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function tJ(t,e,n){if(t){let r=tH(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,0===e?360:1)),r=tW(tI,r,void 0,void 0),t.r=r[0],t.g=r[1],t.b=r[2]}}function tZ(t,e){return t?Object.assign(e||{},t):t}function tq(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=tA(t[3]))):(e=tZ(t,{r:0,g:0,b:0,a:1})).a=tA(e.a),e}class tK{constructor(t){let e;if(t instanceof tK)return t;let n=typeof t;if("object"===n)e=tq(t);else if("string"===n){var o,i;i=t.length,"#"===t[0]&&(4===i||5===i?o={r:255&17*tS[t[1]],g:255&17*tS[t[2]],b:255&17*tS[t[3]],a:5===i?17*tS[t[4]]:255}:(7===i||9===i)&&(o={r:tS[t[1]]<<4|tS[t[2]],g:tS[t[3]]<<4|tS[t[4]],b:tS[t[5]]<<4|tS[t[6]],a:9===i?tS[t[7]]<<4|tS[t[8]]:255})),e=o||function(t){r||((r=function(){let t,e,n,r,o;let i={},a=Object.keys(tV),s=Object.keys(tU);for(t=0;t>16&255,n>>8&255,255&n]}return i}()).transparent=[0,0,0,0]);let e=r[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||("r"===t.charAt(0)?function(t){let e,n,r;let o=tQ.exec(t),i=255;if(o){if(o[7]!==e){let a=+o[7];i=o[8]?tk(a):tC(255*a,0,255)}return e=+o[1],n=+o[3],r=+o[5],{r:e=255&(o[2]?tk(e):tC(e,0,255)),g:n=255&(o[4]?tk(n):tC(n,0,255)),b:r=255&(o[6]?tk(r):tC(r,0,255)),a:i}}}(t):function(t){let e;let n=tF.exec(t),r=255;if(!n)return;n[5]!==e&&(r=n[6]?tk(+n[5]):tA(+n[5]));let o=tY(+n[2]),i=+n[3]/100,a=+n[4]/100;return{r:(e="hwb"===n[1]?tW(tN,o,i,a):"hsv"===n[1]?tW(tB,o,i,a):tW(tI,o,i,a))[0],g:e[1],b:e[2],a:r}}(t))}this._rgb=e,this._valid=!!e}get valid(){return this._valid}get rgb(){var t=tZ(this._rgb);return t&&(t.a=tO(t.a)),t}set rgb(t){this._rgb=tq(t)}rgbString(){var t;return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${tO(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0}hexString(){var t,e;return this._valid?(e=tR(t=this._rgb)?tP:tj,t?"#"+e(t.r)+e(t.g)+e(t.b)+tL(t.a,e):void 0):void 0}hslString(){return this._valid?function(t){if(!t)return;let e=tH(t),n=e[0],r=tT(e[1]),o=tT(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${o}%, ${tO(t.a)})`:`hsl(${n}, ${r}%, ${o}%)`}(this._rgb):void 0}mix(t,e){if(t){let n;let r=this.rgb,o=t.rgb,i=e===n?.5:e,a=2*i-1,s=r.a-o.a,l=((a*s==-1?a:(a+s)/(1+a*s))+1)/2;n=1-l,r.r=255&l*r.r+n*o.r+.5,r.g=255&l*r.g+n*o.g+.5,r.b=255&l*r.b+n*o.b+.5,r.a=i*r.a+(1-i)*o.a,this.rgb=r}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){let r=t$(tO(t.r)),o=t$(tO(t.g)),i=t$(tO(t.b));return{r:tA(tX(r+n*(t$(tO(e.r))-r))),g:tA(tX(o+n*(t$(tO(e.g))-o))),b:tA(tX(i+n*(t$(tO(e.b))-i))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new tK(this.rgb)}alpha(t){return this._rgb.a=tA(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=t_(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return tJ(this._rgb,2,t),this}darken(t){return tJ(this._rgb,2,-t),this}saturate(t){return tJ(this._rgb,1,t),this}desaturate(t){return tJ(this._rgb,1,-t),this}rotate(t){var e,n;return(n=tH(e=this._rgb))[0]=tY(n[0]+t),n=tW(tI,n,void 0,void 0),e.r=n[0],e.g=n[1],e.b=n[2],this}}function tG(t){if(t&&"object"==typeof t){let e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function t0(t){return tG(t)?t:new tK(t)}function t1(t){return tG(t)?t:new tK(t).saturate(.5).darken(.1).hexString()}let t2=Object.create(null),t5=Object.create(null);function t6(t,e){if(!e)return t;let n=e.split(".");for(let r=0,o=n.length;rt.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>t1(e.backgroundColor),this.hoverBorderColor=(t,e)=>t1(e.borderColor),this.hoverColor=(t,e)=>t1(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return t3(this,t,e)}get(t){return t6(this,t)}describe(t,e){return t3(t5,t,e)}override(t,e){return t3(t2,t,e)}route(t,e,n,r){let o=t6(this,t),i=t6(this,n),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let t=this[a],e=i[r];return c(t)?Object.assign({},e,t):h(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function t8(t,e,n,r,o){let i=e[o];return i||(i=e[o]=t.measureText(o).width,n.push(o)),i>r&&(r=i),r}function t7(t,e,n,r){let o,i,a,s,c;let u=(r=r||{}).data=r.data||{},f=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(u=r.data={},f=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let h=0,p=n.length;for(o=0;on.length){for(o=0;o0&&t.stroke()}}function er(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&""!==i.strokeColor;for(t.save(),t.font=o.string,a=t,i.translation&&a.translate(i.translation[0],i.translation[1]),s(i.rotation)||a.rotate(i.rotation),i.color&&(a.fillStyle=i.color),i.textAlign&&(a.textAlign=i.textAlign),i.textBaseline&&(a.textBaseline=i.textBaseline),c=0;c+t||0;function ep(t,e){let n={},r=c(e),o=r?Object.keys(e):e,i=c(t)?r?n=>h(t[n],t[e[n]]):e=>t[e]:()=>t;for(let a of o)n[a]=eh(i(a));return n}function ed(t){return ep(t,{top:"y",right:"x",bottom:"y",left:"x"})}function eg(t){return ep(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ey(t){let e=ed(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function eb(t,e){t=t||{},e=e||t4.font;let n=h(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let r=h(t.style,e.style);r&&!(""+r).match(ef)&&(console.warn('Invalid font style specified: "'+r+'"'),r="");let o={family:h(t.family,e.family),lineHeight:function(t,e){let n=(""+t).match(eu);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}(h(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:h(t.weight,e.weight),string:""};return o.string=!o||s(o.size)||s(o.family)?null:(o.style?o.style+" ":"")+(o.weight?o.weight+" ":"")+o.size+"px "+o.family,o}function em(t,e,n,r){let o,i,a,s=!0;for(o=0,i=t.length;on&&0===t?0:t+e;return{min:a(r,-Math.abs(i)),max:a(o,i)}}function ev(t,e){return Object.assign(Object.create(t),e)}function eM(t,e=[""],n=t,r,o=()=>t[0]){A(r)||(r=eT("_fallback",t));let i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:r,_getTarget:o,override:o=>eM([o,...t],e,n,r)};return new Proxy(i,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,r)=>eC(n,r,()=>(function(t,e,n,r){let o;for(let i of e)if(A(o=eT(ez(i,t),n)))return e_(t,o)?eA(n,r,t,o):o})(r,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>eS(t).includes(e),ownKeys:t=>eS(t),set(t,e,n){let r=t._storage||(t._storage=o());return t[e]=r[e]=n,delete t._keys,!0}})}function ew(t,e={scriptable:!0,indexable:!0}){let{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:n,indexable:r,isScriptable:O(n)?n:()=>n,isIndexable:O(r)?r:()=>r}}let ez=(t,e)=>t?t+k(e):e,e_=(t,e)=>c(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function eC(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];let r=n();return t[e]=r,r}let ek=(t,e)=>!0===t?e:"string"==typeof t?C(e,t):void 0;function eA(t,e,n,r){var o;let i=e._rootScopes,a=O(o=e._fallback)?o(n,r):o,s=[...t,...i],u=new Set;u.add(r);let f=eO(u,s,n,a||n,r);return!(null===f||A(a)&&a!==n&&null===(f=eO(u,s,a,f,r)))&&eM(Array.from(u),[""],i,a,()=>(function(t,e,n){let r=t._getTarget();e in r||(r[e]={});let o=r[e];return l(o)&&c(n)?n:o})(e,n,r))}function eO(t,e,n,r,o){for(;n;)n=function(t,e,n,r,o){for(let i of e){let a=ek(n,i);if(a){var s;t.add(a);let l=O(s=a._fallback)?s(n,o):s;if(A(l)&&l!==n&&l!==r)return l}else if(!1===a&&A(r)&&n!==r)return null}return!1}(t,e,n,r,o);return n}function eT(t,e){for(let n of e){if(!n)continue;let r=n[t];if(A(r))return r}}function eS(t){let e=t._keys;return e||(e=t._keys=function(t){let e=new Set;for(let n of t)for(let r of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(r);return Array.from(e)}(t._scopes)),e}function eE(t,e,n,r){let o,i,a;let{iScale:s}=t,{key:l="r"}=this._parsing,c=Array(r);for(o=0;oe"x"===t?"y":"x";function eR(t,e,n){return Math.max(Math.min(t,n),e)}function eL(t,e,n,r,o){let i,a,s,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){let n,r,o;let i=eD(e),a=t.length,s=Array(a).fill(0),l=Array(a),c=ej(t,0);for(n=0;nwindow.getComputedStyle(t,null),eH=["top","right","bottom","left"];function eW(t,e,n){let r={};n=n?"-"+n:"";for(let o=0;o<4;o++){let i=eH[o];r[i]=parseFloat(t[e+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}let eY=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function eU(t,e){if("native"in t)return t;let{canvas:n,currentDevicePixelRatio:r}=e,o=eN(n),i="border-box"===o.boxSizing,a=eW(o,"padding"),s=eW(o,"border","width"),{x:l,y:c,box:u}=function(t,e){let n,r;let o=t.touches,i=o&&o.length?o[0]:t,{offsetX:a,offsetY:s}=i,l=!1;if(eY(a,s,t.target))n=a,r=s;else{let c=e.getBoundingClientRect();n=i.clientX-c.left,r=i.clientY-c.top,l=!0}return{x:n,y:r,box:l}}(t,n),f=a.left+(u&&s.left),h=a.top+(u&&s.top),{width:p,height:d}=e;return i&&(p-=a.width+s.width,d-=a.height+s.height),{x:Math.round((l-f)/p*n.width/r),y:Math.round((c-h)/d*n.height/r)}}let eV=t=>Math.round(10*t)/10;function eQ(t,e,n,r){let o=eN(t),i=eW(o,"margin"),a=eB(o.maxWidth,t,"clientWidth")||D,s=eB(o.maxHeight,t,"clientHeight")||D,l=function(t,e,n){let r,o;if(void 0===e||void 0===n){let i=eI(t);if(i){let a=i.getBoundingClientRect(),s=eN(i),l=eW(s,"border","width"),c=eW(s,"padding");e=a.width-c.width-l.width,n=a.height-c.height-l.height,r=eB(s.maxWidth,i,"clientWidth"),o=eB(s.maxHeight,i,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:r||D,maxHeight:o||D}}(t,e,n),{width:c,height:u}=l;if("content-box"===o.boxSizing){let f=eW(o,"border","width"),h=eW(o,"padding");c-=h.width+f.width,u-=h.height+f.height}return c=Math.max(0,c-i.width),u=Math.max(0,r?Math.floor(c/r):u-i.height),c=eV(Math.min(c,a,l.maxWidth)),u=eV(Math.min(u,s,l.maxHeight)),c&&!u&&(u=eV(c/2)),{width:c,height:u}}function eX(t,e,n){let r=e||1,o=Math.floor(t.height*r),i=Math.floor(t.width*r);t.height=o/r,t.width=i/r;let a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==r||a.height!==o||a.width!==i)&&(t.currentDevicePixelRatio=r,a.height=o,a.width=i,t.ctx.setTransform(r,0,0,r,0,0),!0)}let e$=function(){let t=!1;try{let e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(n){}return t}();function eJ(t,e){let n=eN(t).getPropertyValue(e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function eZ(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function eq(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:"middle"===r?n<.5?t.y:e.y:"after"===r?n<1?t.y:e.y:n>0?e.y:t.y}}function eK(t,e,n,r){let o={x:t.cp2x,y:t.cp2y},i={x:e.cp1x,y:e.cp1y},a=eZ(t,o,n),s=eZ(o,i,n),l=eZ(i,e,n),c=eZ(a,s,n),u=eZ(s,l,n);return eZ(c,u,n)}let eG=new Map;function e0(t,e,n){return(function(t,e){e=e||{};let n=t+JSON.stringify(e),r=eG.get(n);return r||(r=new Intl.NumberFormat(t,e),eG.set(n,r)),r})(e,n).format(t)}function e1(t,e,n){var r;return t?(r=n,{x:t=>e+e+r-t,setWidth(t){r=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function e2(t,e){let n,r;("ltr"===e||"rtl"===e)&&(r=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function e5(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function e6(t){return"angle"===t?{between:tt,compare:K,normalize:G}:{between:tr,compare:(t,e)=>t-e,normalize:t=>t}}function e3({start:t,end:e,count:n,loop:r,style:o}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n==0,style:o}}function e4(t,e,n){let r,o,i;if(!n)return[t];let{property:a,start:s,end:l}=n,c=e.length,{compare:u,between:f,normalize:h}=e6(a),{start:p,end:d,loop:g,style:y}=function(t,e,n){let r;let{property:o,start:i,end:a}=n,{between:s,normalize:l}=e6(o),c=e.length,{start:u,end:f,loop:h}=t;if(h){for(u+=c,f+=c,r=0;rf(s,i,r)&&0!==u(s,i),M=()=>0===u(l,r)||f(l,i,r),w=()=>m||v(),z=()=>!m||M();for(let _=p,C=p;_<=d;++_)(o=e[_%c]).skip||(r=h(o[a]))===i||(m=f(r,s,l),null===x&&w()&&(x=0===u(r,s)?_:C),null!==x&&z()&&(b.push(e3({start:x,end:_,loop:g,count:c,style:y})),x=null),C=_,i=r);return null!==x&&b.push(e3({start:x,end:d,loop:g,count:c,style:y})),b}function e8(t,e){let n=[],r=t.segments;for(let o=0;oo&&t[i%e].skip;)i--;return i%=e,{start:o,end:i}}(n,o,i,r);if(!0===r)return e9(t,[{start:a,end:s,loop:i}],n,e);let l=!!t._fullLoop&&0===a&&s===o-1;return e9(t,function(t,e,n,r){let o;let i=t.length,a=[],s=e,l=t[e];for(o=e+1;o<=n;++o){let c=t[o%i];c.skip||c.stop?l.skip||(r=!1,a.push({start:e%i,end:(o-1)%i,loop:r}),e=s=c.stop?o:null):(s=o,l.skip&&(e=o)),l=c}return null!==s&&a.push({start:e%i,end:s%i,loop:r}),a}(n,a,s=6}function x(t){return"number"==typeof t}var v=["bytes","KB","MB","GB","TB","PB","EB"];function M(t,e,n,r){t=t||"",n.prefix&&(e<0&&(e*=-1,t+="-"),t+=n.prefix);var o=n.suffix||"",i=n.precision,a=n.round;if(n.byteScale){var s,l=r?n.byteScale:e;l>=0x1000000000000000?(e/=0x1000000000000000,s=6):l>=0x4000000000000?(e/=0x4000000000000,s=5):l>=1099511627776?(e/=1099511627776,s=4):l>=1073741824?(e/=1073741824,s=3):l>=1048576?(e/=1048576,s=2):l>=1024?(e/=1024,s=1):s=0,void 0===i&&void 0===a&&(e>=1023.5&&s=1e3?4:3),o=" "+v[s]}if(void 0!==i&&void 0!==a)throw Error("Use either round or precision, not both");if(!r&&(void 0===i||(e=e.toPrecision(i),n.zeros||(e=parseFloat(e))),void 0!==a)){if(a<0){var c=Math.pow(10,-1*a);e=parseInt((1*e/c).toFixed(0))*c}else e=e.toFixed(a),n.zeros||(e=parseFloat(e))}if(n.thousands||n.decimal){var u=(e=""+e).split(".");e=u[0],n.thousands&&(e=e.replace(/\B(?=(\d{3})+(?!\d))/g,n.thousands)),u.length>1&&(e+=(n.decimal||".")+u[1])}return t+e+o}function w(t,e,n){return n in e?e[n]:n in t.options?t.options[n]:null}var z={maintainAspectRatio:!1,animation:!1,plugins:{legend:{},tooltip:{displayColors:!1,callbacks:{}},title:{font:{size:20},color:"#333"}},interaction:{}},_={scales:{y:{ticks:{maxTicksLimit:4},title:{font:{size:16},color:"#333"},grid:{}},x:{grid:{drawOnChartArea:!1},title:{font:{size:16},color:"#333"},time:{},ticks:{}}}},C=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#651067"],k=function(t,e,n){void 0!==e?(t.plugins.legend.display=!!e,e&&!0!==e&&(t.plugins.legend.position=e)):n&&(t.plugins.legend.display=!1)},A=function(t,e){t.plugins.title.display=!0,t.plugins.title.text=e},O=function(t,e){null!==e&&(t.scales.x.min=s(e))},T=function(t,e){t.scales.x.max=s(e)},S=function(t,e){t.scales.x.stacked=!!e,t.scales.y.stacked=!!e},E=function(t,e){t.scales.x.title.display=!0,t.scales.x.title.text=e},P=function(t,e){t.scales.y.title.display=!0,t.scales.y.title.text=e},D=function(t,e){var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?"rgba("+parseInt(n[1],16)+", "+parseInt(n[2],16)+", "+parseInt(n[3],16)+", "+e+")":t},j=function(t){return null!=t},R=function(t,e,n){var r=Math.ceil(t.element.offsetWidth/4/e.labels.length);r>25?r=25:r<10&&(r=10),n.scales.x.ticks.callback||(n.scales.x.ticks.callback=function(t){return(t=""+this.getLabelForValue(t)).length>r?t.substring(0,r-2)+"...":t})},L=function(e,n,r){var o={prefix:e.options.prefix,suffix:e.options.suffix,thousands:e.options.thousands,decimal:e.options.decimal,precision:e.options.precision,round:e.options.round,zeros:e.options.zeros};if(e.options.bytes){var i=e.data;"pie"===r&&(i=[{data:i}]);for(var a=0,s=0;sa&&(a=l.data[c][1]);for(var u=1;a>=1024;)u*=1024,a/=1024;o.byteScale=u}if("pie"!==r){var f=n.scales.y;"bar"===r&&(f=n.scales.x),o.byteScale&&(f.ticks.stepSize||(f.ticks.stepSize=o.byteScale/2),f.ticks.maxTicksLimit||(f.ticks.maxTicksLimit=4)),f.ticks.callback||(f.ticks.callback=function(t){return M("",t,o,!0)})}if(!n.plugins.tooltip.callbacks.label){if("scatter"===r)n.plugins.tooltip.callbacks.label=function(t){var e=t.dataset.label||"";return e&&(e+=": "),e+"("+t.label+", "+t.formattedValue+")"};else if("bubble"===r)n.plugins.tooltip.callbacks.label=function(t){var e=t.dataset.label||"";e&&(e+=": ");var n=t.raw;return e+"("+n.x+", "+n.y+", "+n.v+")"};else if("pie"===r)n.plugins.tooltip.callbacks.label=function(e){var n=e.label;return t(n)?(n=n.slice(),n[0]+=": "):n+=": ",M(n,e.parsed,o)};else{var h="bar"===r?"x":"y";n.plugins.tooltip.callbacks.label=function(t){if(null!==t.parsed[h]){var e=t.dataset.label||"";return e&&(e+=": "),M(e,t.parsed[h],o)}}}}},F=u(o(z,_),k,A,function(t,e){null!==e&&(t.scales.y.min=s(e))},function(t,e){t.scales.y.max=s(e)},S,E,P),B=function(e,n,r){var i=[],a=[],c=e.options.colors||C,u=!0,f=!0,h=!0,m=!0,x=!0,v=!0,M=e.data,z=0;if("bubble"===r)for(var _=0;_z&&(z=k.data[A][2]);var O,T,S,E,P,R,L=[],F=[];if("bar"===r||"column"===r||"number"!==e.xtype&&"bubble"!==e.xtype){var B,I,N,W,H,Y=[];for(T=0;T0){var tt,te,tn,tr=(j(K)?l(K):a[0]).getTime(),to=(j(G)?l(G):a[0]).getTime();for(T=1;Tto&&(to=ti)}var ta=(to-tr)/864e5;if(!n.scales.x.time.unit&&(m||ta>3650?(n.scales.x.time.unit="year",tn=365):h||ta>300?(n.scales.x.time.unit="month",tn=30):u||ta>10?(n.scales.x.time.unit="day",tn=1):x||ta>.5?(n.scales.x.time.displayFormats={hour:"MMM d, h a"},n.scales.x.time.unit="hour",tn=1/24):v&&(n.scales.x.time.displayFormats={minute:"h:mm a"},n.scales.x.time.unit="minute",tn=1/24/60),tn&&ta>0)){var ts=e.element.offsetWidth;if(ts>0){var tl=Math.ceil(ta/tn/(ts/100));f&&1===tn&&(tl=7*Math.ceil(tl/7)),n.scales.x.time.stepSize=tl}}!n.scales.x.time.tooltipFormat&&(u?n.scales.x.time.tooltipFormat="PP":x?n.scales.x.time.tooltipFormat="MMM d, h a":v&&(n.scales.x.time.tooltipFormat="h:mm a"))}return{labels:a,datasets:i}},I=function(t){this.name="chartjs",this.library=t};I.prototype.renderLineChart=function(t,e){var n={};!t.options.max&&function(t){var e,n,r;for(e=0;e● '+M(this.series.name+": ",this.y,o)+"
"})},V=function(t){this.name="highcharts",this.library=t};V.prototype.renderLineChart=function(t,e){var n={};"areaspline"===(e=e||"spline")&&(n={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),!1===t.options.curve&&("areaspline"===e?e="area":"spline"===e&&(e="line"));var r,o,i,a=Y(t,t.options,n);"number"===t.xtype?a.xAxis.type=a.xAxis.type||"linear":a.xAxis.type="string"===t.xtype?"category":"datetime",a.chart.type||(a.chart.type=e),U(t,a,e);var s=t.data;for(o=0;o0)return!1;return!0}function tc(t,e,n){if(t.addEventListener)return t.addEventListener(e,n,!1),n;var r=function(){return n.call(t,window.event)};return t.attachEvent("on"+e,r),r}function tu(t,e,n){t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)}function tf(t,e){if(t===e)return!1;for(;e&&e!==t;)e=e.parentNode;return e===t}to.prototype.renderLineChart=function(t){var e=this;this.waitForLoaded(t,function(){var n={};!1===t.options.curve&&(n.curveType="none"),!1===t.options.points&&(n.pointSize=0);var r=tn(t,t.options,n),o=e.createDataTable(t.data,t.xtype);e.drawChart(t,"LineChart",o,r)})},to.prototype.renderPieChart=function(t){var e=this;this.waitForLoaded(t,function(){var n={chartArea:{top:"10%",height:"80%"},legend:{}};t.options.colors&&(n.colors=t.options.colors),t.options.donut&&(n.pieHole=.5),"legend"in t.options&&J(n,t.options.legend),t.options.title&&Z(n,t.options.title);var r=o(o($,n),t.options.library||{}),i=new e.library.visualization.DataTable;i.addColumn("string",""),i.addColumn("number","Value"),i.addRows(t.data),e.drawChart(t,"PieChart",i,r)})},to.prototype.renderColumnChart=function(t){var e=this;this.waitForLoaded(t,function(){var n=tn(t,t.options),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"ColumnChart",r,n)})},to.prototype.renderBarChart=function(t){var e=this;this.waitForLoaded(t,function(){var n=u($,J,Z,q,K,G,tt,te)(t,t.options,{hAxis:{gridlines:{color:"#ccc"}}}),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"BarChart",r,n)})},to.prototype.renderAreaChart=function(t){var e=this;this.waitForLoaded(t,function(){var n=tn(t,t.options,{isStacked:!0,pointSize:0,areaOpacity:.5}),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"AreaChart",r,n)})},to.prototype.renderGeoChart=function(t){var e=this;this.waitForLoaded(t,"geochart",function(){var n=o(o($,{legend:"none",colorAxis:{colors:t.options.colors||["#f6c7b6","#ce502d"]}}),t.options.library||{}),r=new e.library.visualization.DataTable;r.addColumn("string",""),r.addColumn("number",t.options.label||"Value"),r.addRows(t.data),e.drawChart(t,"GeoChart",r,n)})},to.prototype.renderScatterChart=function(t){var e=this;this.waitForLoaded(t,function(){var n,r,o,i,a=tn(t,t.options,{}),s=t.data,l=[];for(n=0;n0)throw Error("No charting library found for "+t);throw Error("No charting libraries found - be sure to include one before your charts")})(t,n),n.options.download&&!n.__downloadAttached&&"chartjs"===n.adapter&&(o=(r=n).element,i=document.createElement("a"),!0===(a=r.options.download)?a={}:"string"==typeof a&&(a={filename:a}),i.download=a.filename||"chart.png",i.style.position="absolute",i.style.top="20px",i.style.right="20px",i.style.zIndex=1e3,i.style.lineHeight="20px",i.target="_blank",(s=document.createElement("img")).alt="Download",s.style.border="none",s.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==",i.appendChild(s),o.style.position="relative",r.__downloadAttached=!0,r.__enterEvent=tc(o,"mouseover",function(t){var e=t.relatedTarget;e&&(e===this||tf(this,e))||!r.options.download||(i.href=r.toImage(a),o.appendChild(i))}),r.__leaveEvent=tc(o,"mouseout",function(t){var e=t.relatedTarget;e&&(e===this||tf(this,e))||!i.parentNode||i.parentNode.removeChild(i)}))}(this.__chartName(),this)},tz.prototype.__config=function(){return ty};var t_={LineChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this)},e.prototype.__chartName=function(){return"LineChart"},e}(tz),PieChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ts(this)},e.prototype.__chartName=function(){return"PieChart"},e}(tz),ColumnChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this,null,!0)},e.prototype.__chartName=function(){return"ColumnChart"},e}(tz),BarChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this,null,!0)},e.prototype.__chartName=function(){return"BarChart"},e}(tz),AreaChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this)},e.prototype.__chartName=function(){return"AreaChart"},e}(tz),GeoChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ts(this)},e.prototype.__chartName=function(){return"GeoChart"},e}(tz),ScatterChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this,"number")},e.prototype.__chartName=function(){return"ScatterChart"},e}(tz),BubbleChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ta(this,"bubble")},e.prototype.__chartName=function(){return"BubbleChart"},e}(tz),Timeline:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){var t,e=this.rawData;for(t=0;tt(e,n,r,o),override:i=>t(e.override(i),n,r,o)};return new Proxy(i,{deleteProperty:(t,n)=>(delete t[n],delete e[n],!0),get:(e,n,r)=>eP(e,n,()=>(function(e,n,r){let{_proxy:o,_context:i,_subProxy:a,_descriptors:s}=e,u=o[n];return O(u)&&s.isScriptable(n)&&(u=function(t,e,n,r){let{_proxy:o,_context:i,_subProxy:a,_stack:s}=n;if(s.has(t))throw Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);return s.add(t),e=e(i,a||r),s.delete(t),eE(t,e)&&(e=ej(o._scopes,o,t,e)),e}(n,u,e,r)),l(u)&&u.length&&(u=function(e,n,r,o){let{_proxy:i,_context:a,_subProxy:s,_descriptors:l}=r;if(A(a.index)&&o(e))n=n[a.index%n.length];else if(c(n[0])){let u=n,f=i._scopes.filter(t=>t!==u);for(let h of(n=[],u)){let p=ej(f,i,e,h);n.push(t(p,a,s&&s[e],l))}}return n}(n,u,e,s.isIndexable)),eE(n,u)&&(u=t(u,i,a&&a[n],s)),u})(e,n,r)),getOwnPropertyDescriptor:(t,n)=>t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,n)=>Reflect.has(e,n),ownKeys:()=>Reflect.ownKeys(e),set:(t,n,r)=>(e[n]=r,delete t[n],!0)})}},a9:function(){return eO},aA:function(){return e8},aB:function(){return tb},aC:function(){return e7},aD:function(){return ec},aE:function(){return q},aF:function(){return i},aG:function(){return Q},aH:function(){return H},aI:function(){return V},aJ:function(){return W},aK:function(){return J},aL:function(){return t7},aM:function(){return I},aN:function(){return ei},aO:function(){return ts},aP:function(){return to},aa:function(){return eT},ab:function(){return w},ac:function(){return a},ad:function(){return td},ae:function(){return e0},af:function(){return es},ag:function(){return T},ah:function(){return b},ai:function(){return S},aj:function(){return tr},ak:function(){return ev},al:function(){return eY},am:function(){return nr},an:function(){return nn},ao:function(){return e6},ap:function(){return e3},aq:function(){return e5},ar:function(){return ep},as:function(){return ed},at:function(){return el},au:function(){return ey},av:function(){return eM},aw:function(){return ew},ax:function(){return ne},ay:function(){return G},az:function(){return e4},b:function(){return l},c:function(){return t1},d:function(){return er},e:function(){return t_},f:function(){return C},g:function(){return u},h:function(){return A},i:function(){return c},j:function(){return eA},k:function(){return s},l:function(){return tc},m:function(){return p},n:function(){return d},o:function(){return t4},p:function(){return tt},q:function(){return tm},r:function(){return th},s:function(){return N},t:function(){return X},u:function(){return tu},v:function(){return h},w:function(){return tx},x:function(){return U},y:function(){return eB},z:function(){return eq}});let a=(o=0,()=>o++);function s(t){return null==t}function l(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function c(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function u(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function f(t,e){return u(t)?t:e}function h(t,e){return void 0===t?e:t}let p=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,d=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function g(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function y(t,e,n,r){let o,i,a;if(l(t)){if(i=t.length,r)for(o=i-1;o>=0;o--)e.call(n,t[o],o);else for(o=0;ot,x:t=>t.x,y:t=>t.y};function C(t,e){let n=_[e]||(_[e]=function(t){let e=function(t){let e=t.split("."),n=[],r="";for(let o of e)(r+=o).endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(t);return t=>{for(let n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function k(t){return t.charAt(0).toUpperCase()+t.slice(1)}let A=t=>void 0!==t,O=t=>"function"==typeof t,T=(t,e)=>{if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0};function S(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}let E=Math.PI,P=2*E,D=P+E,j=Number.POSITIVE_INFINITY,R=E/180,L=E/2,F=E/4,B=2*E/3,I=Math.log10,N=Math.sign;function W(t,e,n){return Math.abs(t-e)t-e).pop(),n}function U(t){return!isNaN(parseFloat(t))&&isFinite(t)}function V(t,e){let n=Math.round(t);return n-e<=t&&n+e>=t}function Q(t,e,n){let r,o,i;for(r=0,o=t.length;rl&&c=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function to(t,e,n){let r;n=n||(n=>t[n]1;)n(r=i+o>>1)?i=r:o=r;return{lo:i,hi:o}}let ti=(t,e,n,r)=>to(t,n,r?r=>{let o=t[r][e];return ot[r][e]to(t,n,r=>t[r][e]>=n);function ts(t,e,n){let r=0,o=t.length;for(;rr&&t[o-1]>n;)o--;return r>0||o{let n="_onData"+k(e),r=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){let o=r.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"==typeof t[n]&&t[n](...e)}),o}})})}function tu(t,e){let n=t._chartjs;if(!n)return;let r=n.listeners,o=r.indexOf(e);-1!==o&&r.splice(o,1),r.length>0||(tl.forEach(e=>{delete t[e]}),delete t._chartjs)}function tf(t){let e,n;let r=new Set;for(e=0,n=t.length;e{n=!1,t.apply(e,r)}))}}function td(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}let tg=t=>"start"===t?"left":"end"===t?"right":"center",ty=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2,tb=(t,e,n,r)=>t===(r?"left":"right")?n:"center"===t?(e+n)/2:e;function tm(t,e,n){let r=e.length,o=0,i=r;if(t._sorted){let{iScale:a,_parsed:s}=t,l=a.axis,{min:c,max:u,minDefined:f,maxDefined:h}=a.getUserBounds();f&&(o=te(Math.min(ti(s,a.axis,c).lo,n?r:ti(e,l,a.getPixelForValue(c)).lo),0,r-1)),i=h?te(Math.max(ti(s,a.axis,u,!0).hi+1,n?0:ti(e,l,a.getPixelForValue(u),!0).hi+1),o,r)-o:r-o}return{start:o,count:i}}function tx(t){let{xScale:e,yScale:n,_scaleRanges:r}=t,o={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=o,!0;let i=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,o),i}let tv=t=>0===t||1===t,tM=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*P/n)),tw=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*P/n)+1,tz={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*L)+1,easeOutSine:t=>Math.sin(t*L),easeInOutSine:t=>-.5*(Math.cos(E*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>tv(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(-Math.pow(2,-10*(2*t-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>tv(t)?t:tM(t,.075,.3),easeOutElastic:t=>tv(t)?t:tw(t,.075,.3),easeInOutElastic:t=>tv(t)?t:t<.5?.5*tM(2*t,.1125,.45):.5+.5*tw(2*t-1,.1125,.45),easeInBack:t=>t*t*(2.70158*t-1.70158),easeOutBack:t=>(t-=1)*t*(2.70158*t+1.70158)+1,easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-tz.easeOutBounce(1-t),easeOutBounce:t=>t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375,easeInOutBounce:t=>t<.5?.5*tz.easeInBounce(2*t):.5*tz.easeOutBounce(2*t-1)+.5};var t_=tz;/*! + * @kurkle/color v0.2.1 + * https://github.com/kurkle/color#readme + * (c) 2022 Jukka Kurkela + * Released under the MIT License + */ function tC(t){return t+.5|0}let tk=(t,e,n)=>Math.max(Math.min(t,n),e);function tA(t){return tk(tC(2.55*t),0,255)}function tO(t){return tk(tC(255*t),0,255)}function tT(t){return tk(tC(t/2.55)/100,0,1)}function tS(t){return tk(tC(100*t),0,100)}let tE={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},tP=[..."0123456789ABCDEF"],tD=t=>tP[15&t],tj=t=>tP[(240&t)>>4]+tP[15&t],tR=t=>(240&t)>>4==(15&t),tL=t=>tR(t.r)&&tR(t.g)&&tR(t.b)&&tR(t.a),tF=(t,e)=>t<255?e(t):"",tB=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function tI(t,e,n){let r=e*Math.min(n,1-n),o=(e,o=(e+t/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function tN(t,e,n){let r=(r,o=(r+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function tW(t,e,n){let r;let o=tI(t,1,.5);for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)o[r]*=1-e-n,o[r]+=e;return o}function tH(t){let e,n,r;let o=t.r/255,i=t.g/255,a=t.b/255,s=Math.max(o,i,a),l=Math.min(o,i,a),c=(s+l)/2;return s!==l&&(r=s-l,n=c>.5?r/(2-s-l):r/(s+l),e=60*(e=o===s?(i-a)/r+(it<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,tJ=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function tZ(t,e,n){if(t){let r=tH(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,0===e?360:1)),r=tY(tI,r,void 0,void 0),t.r=r[0],t.g=r[1],t.b=r[2]}}function tq(t,e){return t?Object.assign(e||{},t):t}function tK(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=tO(t[3]))):(e=tq(t,{r:0,g:0,b:0,a:1})).a=tO(e.a),e}class tG{constructor(t){let e;if(t instanceof tG)return t;let n=typeof t;if("object"===n)e=tK(t);else if("string"===n){var o,i;i=t.length,"#"===t[0]&&(4===i||5===i?o={r:255&17*tE[t[1]],g:255&17*tE[t[2]],b:255&17*tE[t[3]],a:5===i?17*tE[t[4]]:255}:(7===i||9===i)&&(o={r:tE[t[1]]<<4|tE[t[2]],g:tE[t[3]]<<4|tE[t[4]],b:tE[t[5]]<<4|tE[t[6]],a:9===i?tE[t[7]]<<4|tE[t[8]]:255})),e=o||function(t){r||((r=function(){let t,e,n,r,o;let i={},a=Object.keys(tQ),s=Object.keys(tV);for(t=0;t>16&255,n>>8&255,255&n]}return i}()).transparent=[0,0,0,0]);let e=r[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||("r"===t.charAt(0)?function(t){let e,n,r;let o=tX.exec(t),i=255;if(o){if(o[7]!==e){let a=+o[7];i=o[8]?tA(a):tk(255*a,0,255)}return e=+o[1],n=+o[3],r=+o[5],{r:e=255&(o[2]?tA(e):tk(e,0,255)),g:n=255&(o[4]?tA(n):tk(n,0,255)),b:r=255&(o[6]?tA(r):tk(r,0,255)),a:i}}}(t):function(t){let e;let n=tB.exec(t),r=255;if(!n)return;n[5]!==e&&(r=n[6]?tA(+n[5]):tO(+n[5]));let o=tU(+n[2]),i=+n[3]/100,a=+n[4]/100;return{r:(e="hwb"===n[1]?tY(tW,o,i,a):"hsv"===n[1]?tY(tN,o,i,a):tY(tI,o,i,a))[0],g:e[1],b:e[2],a:r}}(t))}this._rgb=e,this._valid=!!e}get valid(){return this._valid}get rgb(){var t=tq(this._rgb);return t&&(t.a=tT(t.a)),t}set rgb(t){this._rgb=tK(t)}rgbString(){var t;return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${tT(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0}hexString(){var t,e;return this._valid?(e=tL(t=this._rgb)?tD:tj,t?"#"+e(t.r)+e(t.g)+e(t.b)+tF(t.a,e):void 0):void 0}hslString(){return this._valid?function(t){if(!t)return;let e=tH(t),n=e[0],r=tS(e[1]),o=tS(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${o}%, ${tT(t.a)})`:`hsl(${n}, ${r}%, ${o}%)`}(this._rgb):void 0}mix(t,e){if(t){let n;let r=this.rgb,o=t.rgb,i=e===n?.5:e,a=2*i-1,s=r.a-o.a,l=((a*s==-1?a:(a+s)/(1+a*s))+1)/2;n=1-l,r.r=255&l*r.r+n*o.r+.5,r.g=255&l*r.g+n*o.g+.5,r.b=255&l*r.b+n*o.b+.5,r.a=i*r.a+(1-i)*o.a,this.rgb=r}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){let r=tJ(tT(t.r)),o=tJ(tT(t.g)),i=tJ(tT(t.b));return{r:tO(t$(r+n*(tJ(tT(e.r))-r))),g:tO(t$(o+n*(tJ(tT(e.g))-o))),b:tO(t$(i+n*(tJ(tT(e.b))-i))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new tG(this.rgb)}alpha(t){return this._rgb.a=tO(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=tC(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return tZ(this._rgb,2,t),this}darken(t){return tZ(this._rgb,2,-t),this}saturate(t){return tZ(this._rgb,1,t),this}desaturate(t){return tZ(this._rgb,1,-t),this}rotate(t){var e,n;return(n=tH(e=this._rgb))[0]=tU(n[0]+t),n=tY(tI,n,void 0,void 0),e.r=n[0],e.g=n[1],e.b=n[2],this}}function t0(t){if(t&&"object"==typeof t){let e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function t1(t){return t0(t)?t:new tG(t)}function t2(t){return t0(t)?t:new tG(t).saturate(.5).darken(.1).hexString()}let t5=["x","y","borderWidth","radius","tension"],t6=["color","borderColor","backgroundColor"],t3=new Map;function t4(t,e,n){return(function(t,e){e=e||{};let n=t+JSON.stringify(e),r=t3.get(n);return r||(r=new Intl.NumberFormat(t,e),t3.set(n,r)),r})(e,n).format(t)}let t8={values:t=>l(t)?t:""+t,numeric(t,e,n){let r;if(0===t)return"0";let o=this.chart.options.locale,i=t;if(n.length>1){let a;let s=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(s<1e-4||s>1e15)&&(r="scientific"),Math.abs(a=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value)>=1&&t!==Math.floor(t)&&(a=t-Math.floor(t)),i=a}let l=I(Math.abs(i)),c=Math.max(Math.min(-1*Math.floor(l),20),0),u={notation:r,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(u,this.options.ticks.format),t4(t,o,u)},logarithmic(t,e,n){if(0===t)return"0";let r=n[e].significand||t/Math.pow(10,Math.floor(I(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?t8.numeric.call(this,t,e,n):""}};var t7={formatters:t8};let t9=Object.create(null),et=Object.create(null);function ee(t,e){if(!e)return t;let n=e.split(".");for(let r=0,o=n.length;rt.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>t2(e.backgroundColor),this.hoverBorderColor=(t,e)=>t2(e.borderColor),this.hoverColor=(t,e)=>t2(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return en(this,t,e)}get(t){return ee(this,t)}describe(t,e){return en(et,t,e)}override(t,e){return en(t9,t,e)}route(t,e,n,r){let o=ee(this,t),i=ee(this,n),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let t=this[a],e=i[r];return c(t)?Object.assign({},e,t):h(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach(t=>t(this))}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:t6},numbers:{type:"number",properties:t5}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:t7.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function eo(t,e,n,r,o){let i=e[o];return i||(i=e[o]=t.measureText(o).width,n.push(o)),i>r&&(r=i),r}function ei(t,e,n,r){let o,i,a,s,c;let u=(r=r||{}).data=r.data||{},f=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(u=r.data={},f=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let h=0,p=n.length;for(o=0;on.length){for(o=0;o0&&t.stroke()}}function eu(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&""!==i.strokeColor;for(t.save(),t.font=o.string,a=t,i.translation&&a.translate(i.translation[0],i.translation[1]),s(i.rotation)||a.rotate(i.rotation),i.color&&(a.fillStyle=i.color),i.textAlign&&(a.textAlign=i.textAlign),i.textBaseline&&(a.textBaseline=i.textBaseline),c=0;c+t||0;function ev(t,e){let n={},r=c(e),o=r?Object.keys(e):e,i=c(t)?r?n=>h(t[n],t[e[n]]):e=>t[e]:()=>t;for(let a of o)n[a]=ex(i(a));return n}function eM(t){return ev(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ew(t){return ev(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ez(t){let e=eM(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function e_(t,e){t=t||{},e=e||er.font;let n=h(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let r=h(t.style,e.style);r&&!(""+r).match(em)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);let o={family:h(t.family,e.family),lineHeight:function(t,e){let n=(""+t).match(eb);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}(h(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:h(t.weight,e.weight),string:""};return o.string=!o||s(o.size)||s(o.family)?null:(o.style?o.style+" ":"")+(o.weight?o.weight+" ":"")+o.size+"px "+o.family,o}function eC(t,e,n,r){let o,i,a,s=!0;for(o=0,i=t.length;on&&0===t?0:t+e;return{min:a(r,-Math.abs(i)),max:a(o,i)}}function eA(t,e){return Object.assign(Object.create(t),e)}function eO(t,e=[""],n=t,r,o=()=>t[0]){A(r)||(r=eL("_fallback",t));let i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:r,_getTarget:o,override:o=>eO([o,...t],e,n,r)};return new Proxy(i,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,r)=>eP(n,r,()=>(function(t,e,n,r){let o;for(let i of e)if(A(o=eL(eS(i,t),n)))return eE(t,o)?ej(n,r,t,o):o})(r,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>eF(t).includes(e),ownKeys:t=>eF(t),set(t,e,n){let r=t._storage||(t._storage=o());return t[e]=r[e]=n,delete t._keys,!0}})}function eT(t,e={scriptable:!0,indexable:!0}){let{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:n,indexable:r,isScriptable:O(n)?n:()=>n,isIndexable:O(r)?r:()=>r}}let eS=(t,e)=>t?t+k(e):e,eE=(t,e)=>c(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function eP(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];let r=n();return t[e]=r,r}let eD=(t,e)=>!0===t?e:"string"==typeof t?C(e,t):void 0;function ej(t,e,n,r){var o;let i=e._rootScopes,a=O(o=e._fallback)?o(n,r):o,s=[...t,...i],u=new Set;u.add(r);let f=eR(u,s,n,a||n,r);return!(null===f||A(a)&&a!==n&&null===(f=eR(u,s,a,f,r)))&&eO(Array.from(u),[""],i,a,()=>(function(t,e,n){let r=t._getTarget();e in r||(r[e]={});let o=r[e];return l(o)&&c(n)?n:o||{}})(e,n,r))}function eR(t,e,n,r,o){for(;n;)n=function(t,e,n,r,o){for(let i of e){let a=eD(n,i);if(a){var s;t.add(a);let l=O(s=a._fallback)?s(n,o):s;if(A(l)&&l!==n&&l!==r)return l}else if(!1===a&&A(r)&&n!==r)return null}return!1}(t,e,n,r,o);return n}function eL(t,e){for(let n of e){if(!n)continue;let r=n[t];if(A(r))return r}}function eF(t){let e=t._keys;return e||(e=t._keys=function(t){let e=new Set;for(let n of t)for(let r of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(r);return Array.from(e)}(t._scopes)),e}function eB(t,e,n,r){let o,i,a;let{iScale:s}=t,{key:l="r"}=this._parsing,c=Array(r);for(o=0;oe"x"===t?"y":"x";function eH(t,e,n){return Math.max(Math.min(t,n),e)}function eY(t,e,n,r,o){let i,a,s,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){let n,r,o;let i=eW(e),a=t.length,s=Array(a).fill(0),l=Array(a),c=eN(t,0);for(n=0;nt.ownerDocument.defaultView.getComputedStyle(t,null),e$=["top","right","bottom","left"];function eJ(t,e,n){let r={};n=n?"-"+n:"";for(let o=0;o<4;o++){let i=e$[o];r[i]=parseFloat(t[e+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}let eZ=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function eq(t,e){if("native"in t)return t;let{canvas:n,currentDevicePixelRatio:r}=e,o=eX(n),i="border-box"===o.boxSizing,a=eJ(o,"padding"),s=eJ(o,"border","width"),{x:l,y:c,box:u}=function(t,e){let n,r;let o=t.touches,i=o&&o.length?o[0]:t,{offsetX:a,offsetY:s}=i,l=!1;if(eZ(a,s,t.target))n=a,r=s;else{let c=e.getBoundingClientRect();n=i.clientX-c.left,r=i.clientY-c.top,l=!0}return{x:n,y:r,box:l}}(t,n),f=a.left+(u&&s.left),h=a.top+(u&&s.top),{width:p,height:d}=e;return i&&(p-=a.width+s.width,d-=a.height+s.height),{x:Math.round((l-f)/p*n.width/r),y:Math.round((c-h)/d*n.height/r)}}let eK=t=>Math.round(10*t)/10;function eG(t,e,n,r){let o=eX(t),i=eJ(o,"margin"),a=eQ(o.maxWidth,t,"clientWidth")||j,s=eQ(o.maxHeight,t,"clientHeight")||j,l=function(t,e,n){let r,o;if(void 0===e||void 0===n){let i=eV(t);if(i){let a=i.getBoundingClientRect(),s=eX(i),l=eJ(s,"border","width"),c=eJ(s,"padding");e=a.width-c.width-l.width,n=a.height-c.height-l.height,r=eQ(s.maxWidth,i,"clientWidth"),o=eQ(s.maxHeight,i,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:r||j,maxHeight:o||j}}(t,e,n),{width:c,height:u}=l;if("content-box"===o.boxSizing){let f=eJ(o,"border","width"),h=eJ(o,"padding");c-=h.width+f.width,u-=h.height+f.height}return c=Math.max(0,c-i.width),u=Math.max(0,r?Math.floor(c/r):u-i.height),c=eK(Math.min(c,a,l.maxWidth)),u=eK(Math.min(u,s,l.maxHeight)),c&&!u&&(u=eK(c/2)),(void 0!==e||void 0!==n)&&r&&l.height&&u>l.height&&(c=eK(Math.floor((u=l.height)*r))),{width:c,height:u}}function e0(t,e,n){let r=e||1,o=Math.floor(t.height*r),i=Math.floor(t.width*r);t.height=o/r,t.width=i/r;let a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==r||a.height!==o||a.width!==i)&&(t.currentDevicePixelRatio=r,a.height=o,a.width=i,t.ctx.setTransform(r,0,0,r,0,0),!0)}let e1=function(){let t=!1;try{let e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(n){}return t}();function e2(t,e){let n=eX(t).getPropertyValue(e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function e5(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function e6(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:"middle"===r?n<.5?t.y:e.y:"after"===r?n<1?t.y:e.y:n>0?e.y:t.y}}function e3(t,e,n,r){let o={x:t.cp2x,y:t.cp2y},i={x:e.cp1x,y:e.cp1y},a=e5(t,o,n),s=e5(o,i,n),l=e5(i,e,n),c=e5(a,s,n),u=e5(s,l,n);return e5(c,u,n)}function e4(t,e,n){var r;return t?(r=n,{x:t=>e+e+r-t,setWidth(t){r=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function e8(t,e){let n,r;("ltr"===e||"rtl"===e)&&(r=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function e7(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function e9(t){return"angle"===t?{between:tt,compare:K,normalize:G}:{between:tr,compare:(t,e)=>t-e,normalize:t=>t}}function nt({start:t,end:e,count:n,loop:r,style:o}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n==0,style:o}}function ne(t,e,n){let r,o,i;if(!n)return[t];let{property:a,start:s,end:l}=n,c=e.length,{compare:u,between:f,normalize:h}=e9(a),{start:p,end:d,loop:g,style:y}=function(t,e,n){let r;let{property:o,start:i,end:a}=n,{between:s,normalize:l}=e9(o),c=e.length,{start:u,end:f,loop:h}=t;if(h){for(u+=c,f+=c,r=0;rf(s,i,r)&&0!==u(s,i),M=()=>0===u(l,r)||f(l,i,r),w=()=>m||v(),z=()=>!m||M();for(let _=p,C=p;_<=d;++_)(o=e[_%c]).skip||(r=h(o[a]))===i||(m=f(r,s,l),null===x&&w()&&(x=0===u(r,s)?_:C),null!==x&&z()&&(b.push(nt({start:x,end:_,loop:g,count:c,style:y})),x=null),C=_,i=r);return null!==x&&b.push(nt({start:x,end:d,loop:g,count:c,style:y})),b}function nn(t,e){let n=[],r=t.segments;for(let o=0;oo&&t[i%e].skip;)i--;return i%=e,{start:o,end:i}}(n,o,i,r);if(!0===r)return no(t,[{start:a,end:s,loop:i}],n,e);let l=!!t._fullLoop&&0===a&&s===o-1;return no(t,function(t,e,n,r){let o;let i=t.length,a=[],s=e,l=t[e];for(o=e+1;o<=n;++o){let c=t[o%i];c.skip||c.stop?l.skip||(r=!1,a.push({start:e%i,end:(o-1)%i,loop:r}),e=s=c.stop?o:null):(s=o,l.skip&&(e=o)),l=c}return null!==s&&a.push({start:e%i,end:s%i,loop:r}),a}(n,a,ss({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=s.r.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{let a;if(!i.running||!i.items.length)return;let r=i.items,n=r.length-1,o=!1;for(;n>=0;--n)(a=r[n])._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),o=!0):(r[n]=r[r.length-1],r.pop());o&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){let e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!!e&&!!e.running&&!!e.items.length}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let i=e.items,s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};let r="transparent",n={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){let a=(0,s.c)(t||r),n=a.valid&&(0,s.c)(e||r);return n&&n.valid?n.mix(a,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class o{constructor(t,e,i,a){let r=e[i];a=(0,s.a)([t.to,a,r,t.from]);let o=(0,s.a)([t.from,r,a]);this._active=!0,this._fn=t.fn||n[t.type||typeof o],this._easing=s.e[t.easing]||s.e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=a,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);let a=this._target[this._prop],r=i-this._start,n=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=(0,s.a)([t.to,e,a,t.from]),this._from=(0,s.a)([t.from,a,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e;let i=t-this._start,s=this._duration,a=this._prop,r=this._from,n=this._loop,o=this._to;if(this._active=r!==o&&(n||i1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[a]=this._fn(r,o,e)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let s=0;s"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),s.d.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),s.d.describe("animations",{_fallback:"animation"}),s.d.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class h{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!(0,s.i)(t))return;let e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{let a=t[i];if(!(0,s.i)(a))return;let r={};for(let n of l)r[n]=a[n];((0,s.b)(a.properties)&&a.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,r)})})}_animateOptions(t,e){let i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i){t.options=e;return}return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}(t,i);if(!s)return[];let a=this._createAnimations(s,i);return i.$shared&&(function(t,e){let i=[],s=Object.keys(e);for(let a=0;a{t.options=i},()=>{}),a}_createAnimations(t,e){let i;let s=this._properties,a=[],r=t.$animations||(t.$animations={}),n=Object.keys(e),l=Date.now();for(i=n.length-1;i>=0;--i){let h=n[i];if("$"===h.charAt(0))continue;if("options"===h){a.push(...this._animateOptions(t,e));continue}let d=e[h],c=r[h],u=s.get(h);if(c){if(u&&c.active()){c.update(u,d,l);continue}c.cancel()}if(!u||!u.duration){t[h]=d;continue}r[h]=c=new o(u,t,h,d),a.push(c)}return a}update(t,e){if(0===this._properties.size){Object.assign(t,e);return}let i=this._createAnimations(t,e);if(i.length)return a.add(this._chart,i),!0}}function d(t,e){let i=t&&t.options||{},s=i.reverse,a=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:s?r:a,end:s?a:r}}function c(t,e){let i,s;let a=[],r=t._getSortedDatasetMetas(e);for(i=0,s=r.length;i0||!i&&r<0)return a.index}return null}function f(t,e){let i;let{chart:s,_cachedMeta:a}=t,r=s._stacks||(s._stacks={}),{iScale:n,vScale:o,index:l}=a,h=n.axis,d=o.axis,c=`${n.id}.${o.id}.${a.stack||a.type}`,u=e.length;for(let g=0;gi[t].axis===e).shift()}function b(t,e){let i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s)for(let a of e=e||t._parsed){let r=a._stacks;if(!r||void 0===r[s]||void 0===r[s][i])return;delete r[s][i]}}let x=t=>"reset"===t||"none"===t,_=(t,e)=>e?t:Object.assign({},t),v=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:c(i,!0),values:null};class y{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=g(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&b(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),a=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,r=e.xAxisID=(0,s.v)(i.xAxisID,m(t,"x")),n=e.yAxisID=(0,s.v)(i.yAxisID,m(t,"y")),o=e.rAxisID=(0,s.v)(i.rAxisID,m(t,"r")),l=e.indexAxis,h=e.iAxisID=a(l,r,n,o),d=e.vAxisID=a(l,n,r,o);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&(0,s.u)(this._data,this),t._stacked&&b(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if((0,s.i)(e))this._data=function(t){let e,i,s;let a=Object.keys(t),r=Array(a.length);for(e=0,i=a.length;e0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=o,n._sorted=!0,r=o;else{r=(0,s.b)(o[t])?this.parseArrayData(n,o,t,e):(0,s.i)(o[t])?this.parseObjectData(n,o,t,e):this.parsePrimitiveData(n,o,t,e);let g=()=>null===a[d]||u&&a[d]e||g=0;--i)if(!p()){this.updateRangeFromParsed(c,t,a,d);break}}return c}getAllParsedValues(t){let e,i,a;let r=this._cachedMeta._parsed,n=[];for(e=0,i=r.length;e=0&&tthis.getContext(i,a),f=h.resolveNamedOptions(u,g,p,c);return f.$shared&&(f.$shared=l,r[n]=Object.freeze(_(f,l))),f}_resolveAnimations(t,e,i){let s;let a=this.chart,r=this._cachedDataOpts,n=`animation-${e}`,o=r[n];if(o)return o;if(!1!==a.options.animation){let l=this.chart.config,d=l.datasetAnimationScopeKeys(this._type,e),c=l.getOptionScopes(this.getDataset(),d);s=l.createResolver(c,this.getContext(t,i,e))}let u=new h(a,s&&s.animations);return s&&s._cacheable&&(r[n]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||x(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,a=this.getSharedOptions(i),r=this.includeOptions(e,a)||a!==s;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:r}}updateElement(t,e,i,s){x(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!x(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;let a=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[s,a,r]of this._syncList)this[s](a,r);this._syncList=[];let n=i.length,o=e.length,l=Math.min(o,n);l&&this.parse(0,l),o>n?this._insertElements(n,o-n,t):o{for(t.length+=e,s=t.length-1;s>=n;s--)t[s]=t[s-e]};for(o(r),s=t;sMath.abs(o)&&(l=o,h=n),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:a,end:r,min:n,max:o}}(t,e,i,a):e[i.axis]=i.parse(t,a),e}function k(t,e,i,s){let a,r,n,o;let l=t.iScale,h=t.vScale,d=l.getLabels(),c=l===h,u=[];for(a=i,r=i+s;at.x,r="left",n="right"):(a=t.baset.controller.options.grouped),r=i.options.stacked,n=[],o=t=>{let i=t.controller.getParsed(e),a=i&&i[t.vScale.axis];if((0,s.k)(a)||isNaN(a))return!0};for(let l of a)if(!(void 0!==e&&o(l))&&((!1===r||-1===n.indexOf(l.stack)||void 0===r&&void 0===l.stack)&&n.push(l.stack),l.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){let s=this._getStacks(t,i),a=void 0!==e?s.indexOf(e):-1;return -1===a?s.length-1:a}_getRuler(){let t,e;let i=this.options,a=this._cachedMeta,r=a.iScale,n=[];for(t=0,e=a.data.length;tt-e))}return t._cache.$bar}(n,t.type),l=n._length,h=()=>{32767!==a&&-32768!==a&&((0,s.j)(r)&&(l=Math.min(l,Math.abs(a-r)||l)),r=a)};for(e=0,i=o.length;e=l?1:-1))*o,u===l&&(m-=i/2);let x=a.getPixelForDecimal(0),_=a.getPixelForDecimal(1);e=(m=Math.max(Math.min(m,Math.max(x,_)),Math.min(x,_)))+i}if(m===a.getPixelForValue(l)){let v=(0,s.s)(i)*a.getLineWidthForValue(l)/2;m+=v,i-=v}return{size:i,base:m,head:e,center:e+i/2}}_calculateBarIndexPixels(t,e){let i,a;let r=e.scale,n=this.options,o=n.skipNull,l=(0,s.v)(n.maxBarThickness,1/0);if(e.grouped){let h=o?this._getStackCount(t):e.stackCount,d="flex"===n.barThickness?function(t,e,i,s){let a=e.pixels,r=a[t],n=t>0?a[t-1]:null,o=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,{xScale:i,yScale:s}=e,a=this.getParsed(t),r=i.getLabelForValue(a.x),n=s.getLabelForValue(a.y),o=a._custom;return{label:e.label,value:"("+r+", "+n+(o?", "+o:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){let a="reset"===s,{iScale:r,vScale:n}=this._cachedMeta,{sharedOptions:o,includeOptions:l}=this._getSharedOptions(e,s),h=r.axis,d=n.axis;for(let c=e;c""}}}};class O extends y{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let i=this.getDataset().data,a=this._cachedMeta;if(!1===this._parsing)a._parsed=i;else{let r,n,o=t=>+i[t];if((0,s.i)(i[t])){let{key:l="value"}=this._parsing;o=t=>+(0,s.f)(i[t],l)}for(r=t,n=t+e;r(0,s.p)(e,t,l,!0)?1:Math.max(a,a*i,r,r*i),p=(e,a,r)=>(0,s.p)(e,t,l,!0)?-1:Math.min(a,a*i,r,r*i),f=g(0,h,c),m=g(s.H,d,u),b=p(s.P,h,c),x=p(s.P+s.H,d,u);a=(f-b)/2,r=(m-x)/2,n=-(f+b)/2,o=-(m+x)/2}return{ratioX:a,ratioY:r,offsetX:n,offsetY:o}}(c,d,l),m=(i.width-n)/u,b=(i.height-n)/g,x=(0,s.n)(this.options.radius,Math.max(Math.min(m,b)/2,0)),_=(x-Math.max(x*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*x,this.offsetY=f*x,a.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){let i=this.options,a=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===a._parsed[t]||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*r/s.T)}updateElements(t,e,i,s){let a;let r="reset"===s,n=this.chart,o=n.chartArea,l=n.options,h=l.animation,d=(o.left+o.right)/2,c=(o.top+o.bottom)/2,u=r&&h.animateScale,g=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:f,includeOptions:m}=this._getSharedOptions(e,s),b=this._getRotation();for(a=0;a0&&!isNaN(t)?s.T*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=(0,s.o)(e._parsed[t],i.options.locale);return{label:a[t]||"",value:r}}getMaxBorderWidth(t){let e,i,s,a,r,n=0,o=this.chart;if(!t){for(e=0,i=o.data.datasets.length;e"spacing"!==t,_indexable:t=>"spacing"!==t},O.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,s)=>{let a=t.getDatasetMeta(0),r=a.controller.getStyle(s);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label,i=": "+t.formattedValue;return(0,s.b)(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class L extends y{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:i,data:a=[],_dataset:r}=e,n=this.chart._animationsDisabled,{start:o,count:l}=(0,s.q)(e,a,n);this._drawStart=o,this._drawCount=l,(0,s.w)(e)&&(o=0,l=a.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=a;let h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!n,options:h},t),this.updateElements(a,o,l,t)}updateElements(t,e,i,a){let r="reset"===a,{iScale:n,vScale:o,_stacked:l,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(e,a),u=n.axis,g=o.axis,{spanGaps:p,segment:f}=this.options,m=(0,s.x)(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===a,x=e>0&&this.getParsed(e-1);for(let _=e;_0&&Math.abs(y[u]-x[u])>m,f&&(M.parsed=y,M.raw=h.data[_]),c&&(M.options=d||this.resolveDataElementOptions(_,v.active?"active":a)),b||this.updateElement(v,_,M,a),x=y}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;let a=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,a,r)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}L.id="line",L.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},L.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class E extends y{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=(0,s.o)(e._parsed[t].r,i.options.locale);return{label:a[t]||"",value:r}}parseObjectData(t,e,i,a){return s.y.bind(this)(t,e,i,a)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,i)=>{let s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(s/2,0),r=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),n=(a-r)/t.getVisibleDatasetCount();this.outerRadius=a-n*this.index,this.innerRadius=this.outerRadius-n}updateElements(t,e,i,a){let r;let n="reset"===a,o=this.chart,l=o.options,h=l.animation,d=this._cachedMeta.rScale,c=d.xCenter,u=d.yCenter,g=d.getIndexAngle(0)-.5*s.P,p=g,f=360/this.countVisibleElements();for(r=0;r{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?(0,s.t)(this.resolveDataElementOptions(t,e).angle||i):0}}E.id="polarArea",E.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},E.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,s)=>{let a=t.getDatasetMeta(0),r=a.controller.getStyle(s);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class A extends O{}A.id="pie",A.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class T extends y{getLabelAndValue(t){let e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,a){return s.y.bind(this)(t,e,i,a)}update(t){let e=this._cachedMeta,i=e.dataset,s=e.data||[],a=e.iScale.getLabels();if(i.points=s,"resize"!==t){let r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);let n={_loop:!0,_fullLoop:a.length===s.length,options:r};this.updateElement(i,void 0,n,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){let a=this._cachedMeta.rScale,r="reset"===s;for(let n=e;n{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),s}}z.defaults={},z.defaultRoutes=void 0;let R={values:t=>(0,s.b)(t)?t:""+t,numeric(t,e,i){let a;if(0===t)return"0";let r=this.chart.options.locale,n=t;if(i.length>1){let o;let l=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(l<1e-4||l>1e15)&&(a="scientific"),Math.abs(o=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value)>=1&&t!==Math.floor(t)&&(o=t-Math.floor(t)),n=o}let h=(0,s.z)(Math.abs(n)),d=Math.max(Math.min(-1*Math.floor(h),20),0),c={notation:a,minimumFractionDigits:d,maximumFractionDigits:d};return Object.assign(c,this.options.ticks.format),(0,s.o)(t,r,c)},logarithmic(t,e,i){if(0===t)return"0";let a=t/Math.pow(10,Math.floor((0,s.z)(t)));return 1===a||2===a||5===a?R.numeric.call(this,t,e,i):""}};var F={formatters:R};function I(t,e,i,a,r){let n,o,l;let h=(0,s.v)(a,0),d=Math.min((0,s.v)(r,t.length),t.length),c=0;for(i=Math.ceil(i),r&&(i=(n=r-a)/Math.floor(n/i)),l=h;l<0;)l=Math.round(h+ ++c*i);for(o=Math.max(h,0);oe.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:F.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),s.d.route("scale.ticks","color","","color"),s.d.route("scale.grid","color","","borderColor"),s.d.route("scale.grid","borderColor","","borderColor"),s.d.route("scale.title","color","","color"),s.d.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),s.d.describe("scales",{_fallback:"scale"}),s.d.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});let V=t=>"left"===t?"right":"right"===t?"left":t,B=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function N(t,e){let i=[],s=t.length/e,a=t.length,r=0;for(;ra?a:i,a=r&&i>a?i:a,{min:(0,s.B)(i,(0,s.B)(a,i)),max:(0,s.B)(a,(0,s.B)(i,a))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,s.C)(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:a,grace:r,ticks:n}=this.options,o=n.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,s.D)(this,r,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=oa)return function(t,e,i,s){let a,r=0,n=i[0];for(a=0,s=Math.ceil(s);ar)return h}return Math.max(r,1)}(r,e,a);if(n>0){let c,u;let g=n>1?Math.round((l-o)/(n-1)):null;for(I(e,h,d,(0,s.k)(g)?0:o-g,o),c=0,u=n-1;c=l||n<=1||!this.isHorizontal()){this.labelRotation=o;return}let d=this._getLabelSizes(),c=d.widest.width,u=d.highest.height,g=(0,s.E)(this.chart.width-c,0,this.maxWidth);c+6>(t=a.offset?this.maxWidth/n:g/(n-1))&&(t=g/(n-(a.offset?.5:1)),e=this.maxHeight-H(a.grid)-r.padding-W(a.title,this.chart.options.font),i=Math.sqrt(c*c+u*u),h=Math.max(o,Math.min(l,h=(0,s.F)(Math.min(Math.asin((0,s.E)((d.highest.height+6)/t,-1,1)),Math.asin((0,s.E)(e/i,-1,1))-Math.asin((0,s.E)(u/i,-1,1))))))),this.labelRotation=h}afterCalculateLabelRotation(){(0,s.C)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,s.C)(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:a,grid:r}}=this,n=this._isVisible(),o=this.isHorizontal();if(n){let l=W(a,e.options.font);if(o?(t.width=this.maxWidth,t.height=H(r)+l):(t.height=this.maxHeight,t.width=H(r)+l),i.display&&this.ticks.length){let{first:h,last:d,widest:c,highest:u}=this._getLabelSizes(),g=2*i.padding,p=(0,s.t)(this.labelRotation),f=Math.cos(p),m=Math.sin(p);if(o){let b=i.mirror?0:m*c.width+f*u.height;t.height=Math.min(this.maxHeight,t.height+b+g)}else{let x=i.mirror?0:f*c.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+x+g)}this._calculatePadding(h,d,m,f)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){let{ticks:{align:a,padding:r},position:n}=this.options,o=0!==this.labelRotation,l="top"!==n&&"x"===this.axis;if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),c=0,u=0;o?l?(c=s*t.width,u=i*e.height):(c=i*t.height,u=s*e.width):"start"===a?u=e.width:"end"===a?c=t.width:"inner"!==a&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((u-d+r)*this.width/(this.width-d),0)}else{let g=e.height/2,p=t.height/2;"start"===a?(g=0,p=t.height):"end"===a&&(g=e.height,p=0),this.paddingTop=g+r,this.paddingBottom=p+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,s.C)(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{let i;let s=t.gc,a=s.length/2;if(a>e){for(i=0;i({width:m[t]||0,height:b[t]||0});return{first:M(0),last:M(e-1),widest:M(v),highest:M(y),widths:m,heights:b}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return(0,s.I)(this._alignToPixels?(0,s.J)(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){var e,i;let a=this.ticks||[];if(t>=0&&to*a?o/i:l/a:l*a0}_computeGridLineItems(t){let e,i,a,r,n,o,l,h,d,c,u,g;let p=this.axis,f=this.chart,m=this.options,{grid:b,position:x}=m,_=b.offset,v=this.isHorizontal(),y=this.ticks,M=y.length+(_?1:0),k=H(b),w=[],S=b.setContext(this.getContext()),P=S.drawBorder?S.borderWidth:0,D=P/2,C=function(t){return(0,s.J)(f,t,P)};if("top"===x)e=C(this.bottom),o=this.bottom-k,h=e-D,c=C(t.top)+D,g=t.bottom;else if("bottom"===x)e=C(this.top),c=t.top,g=C(t.bottom)-D,o=e+D,h=this.top+k;else if("left"===x)e=C(this.right),n=this.right-k,l=e-D,d=C(t.left)+D,u=t.right;else if("right"===x)e=C(this.left),d=t.left,u=C(t.right)-D,n=e+D,l=this.left+k;else if("x"===p){if("center"===x)e=C((t.top+t.bottom)/2+.5);else if((0,s.i)(x)){let O=Object.keys(x)[0],L=x[O];e=C(this.chart.scales[O].getPixelForValue(L))}c=t.top,g=t.bottom,h=(o=e+D)+k}else if("y"===p){if("center"===x)e=C((t.left+t.right)/2);else if((0,s.i)(x)){let E=Object.keys(x)[0],A=x[E];e=C(this.chart.scales[E].getPixelForValue(A))}l=(n=e-D)-k,d=t.left,u=t.right}let T=(0,s.v)(m.ticks.maxTicksLimit,M),z=Math.max(1,Math.ceil(M/T));for(i=0;io+1e-6)))return l}(this,i,_))&&(r=(0,s.J)(f,a,F),v?n=l=d=u=r:o=h=c=g=r,w.push({tx1:n,ty1:o,tx2:l,ty2:h,x1:d,y1:c,x2:u,y2:g,width:F,color:I,borderDash:V,borderDashOffset:B,tickWidth:N,tickColor:W,tickBorderDash:j,tickBorderDashOffset:$}))}return this._ticksLength=M,this._borderValue=e,w}_computeLabelItems(t){let e,i,a,r,n,o,l,h,d,c,u;let g=this.axis,p=this.options,{position:f,ticks:m}=p,b=this.isHorizontal(),x=this.ticks,{align:_,crossAlign:v,padding:y,mirror:M}=m,k=H(p.grid),w=k+y,S=M?-y:w,P=-(0,s.t)(this.labelRotation),D=[],C="middle";if("top"===f)n=this.bottom-S,o=this._getXAxisLabelAlignment();else if("bottom"===f)n=this.top+S,o=this._getXAxisLabelAlignment();else if("left"===f){let O=this._getYAxisLabelAlignment(k);o=O.textAlign,r=O.x}else if("right"===f){let L=this._getYAxisLabelAlignment(k);o=L.textAlign,r=L.x}else if("x"===g){if("center"===f)n=(t.top+t.bottom)/2+w;else if((0,s.i)(f)){let E=Object.keys(f)[0],A=f[E];n=this.chart.scales[E].getPixelForValue(A)+w}o=this._getXAxisLabelAlignment()}else if("y"===g){if("center"===f)r=(t.left+t.right)/2-w;else if((0,s.i)(f)){let T=Object.keys(f)[0],z=f[T];r=this.chart.scales[T].getPixelForValue(z)}o=this._getYAxisLabelAlignment(k).textAlign}"y"===g&&("start"===_?C="top":"end"===_&&(C="bottom"));let R=this._getLabelSizes();for(e=0,i=x.length;ee.value===t);if(s>=0){let a=e.setContext(this.getContext(s));return a.lineWidth}return 0}drawGrid(t){let e,i;let s=this.options.grid,a=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),n=(t,e,i)=>{i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(s.display)for(e=0,i=r.length;e{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){let e,i;let s=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",r=[];for(e=0,i=s.length;e{let a=i.split("."),r=a.pop(),n=[t].concat(a).join("."),o=e[i].split("."),l=o.pop(),h=o.join(".");s.d.route(n,r,h,l)})}(e,t.defaultRoutes),t.descriptors&&s.d.describe(e,t.descriptors)}(t,n,e),this.override&&s.d.override(t.id,t.overrides)),n}get(t){return this.items[t]}unregister(t){let e=this.items,i=t.id,a=this.scope;i in e&&delete e[i],a&&i in s.d[a]&&(delete s.d[a][i],this.override&&delete s.U[i])}}var U=new class{constructor(){this.controllers=new $(y,"datasets",!0),this.elements=new $(z,"elements"),this.plugins=new $(Object,"plugins"),this.scales=new $(j,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{let a=i||this._getRegistryForType(e);i||a.isForType(e)||a===this.plugins&&e.id?this._exec(t,a,e):(0,s.Q)(e,e=>{let s=i||this._getRegistryForType(e);this._exec(t,s,e)})})}_exec(t,e,i){let a=(0,s.W)(t);(0,s.C)(i["before"+a],[],i),e[t](i),(0,s.C)(i["after"+a],[],i)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let v=e;v0&&Math.abs(M[g]-_[g])>b,m&&(k.parsed=M,k.raw=h.data[v]),u&&(k.options=c||this.resolveDataElementOptions(v,y.active?"active":a)),x||this.updateElement(y,v,k,a),_=M}this.updateSharedOptions(c,a,d)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let i=0;for(let s=e.length-1;s>=0;--s)i=Math.max(i,e[s].size(this.resolveDataElementOptions(s))/2);return i>0&&i}let a=t.dataset,r=a.options&&a.options.borderWidth||0;if(!e.length)return r;let n=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,n,o)/2}}Y.id="scatter",Y.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Y.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var K=Object.freeze({__proto__:null,BarController:D,BubbleController:C,DoughnutController:O,LineController:L,PolarAreaController:E,PieController:A,RadarController:T,ScatterController:Y});function Q(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class X{constructor(t){this.options=t||{}}init(t){}formats(){return Q()}parse(t,e){return Q()}format(t,e){return Q()}add(t,e,i){return Q()}diff(t,e,i){return Q()}startOf(t,e,i){return Q()}endOf(t,e){return Q()}}X.override=function(t){Object.assign(X.prototype,t)};var G={_date:X};function q(t,e,i,a,r){let n=t.getSortedVisibleDatasetMetas(),o=i[e];for(let l=0,h=n.length;l{t[n](e[i],a)&&(r.push({element:t,datasetIndex:s,index:l}),o=o||t.inRange(e.x,e.y,a))}),s&&!o)?[]:r}var te={evaluateInteractionItems:q,modes:{index(t,e,i,a){let r=(0,s.X)(e,t),n=i.axis||"x",o=i.includeInvisible||!1,l=i.intersect?J(t,r,n,a,o):Z(t,r,n,!1,a,o),h=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{let e=l[0].index,i=t.data[e];i&&!i.skip&&h.push({element:i,datasetIndex:t.index,index:e})}),h):[]},dataset(t,e,i,a){let r=(0,s.X)(e,t),n=i.axis||"xy",o=i.includeInvisible||!1,l=i.intersect?J(t,r,n,a,o):Z(t,r,n,!1,a,o);if(l.length>0){let h=l[0].datasetIndex,d=t.getDatasetMeta(h).data;l=[];for(let c=0;ct.pos===e)}function ta(t,e){return t.filter(t=>-1===ti.indexOf(t.pos)&&t.box.axis===e)}function tr(t,e){return t.sort((t,i)=>{let s=e?i:t,a=e?t:i;return s.weight===a.weight?s.index-a.index:s.weight-a.weight})}function tn(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function to(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function tl(t,e,i,a){let r,n,o,l,h,d;let c=[];for(r=0,n=t.length,h=0;r{s[t]=Math.max(e[t],i[t])}),s}(t?["left","right"]:["top","bottom"])}(o.horizontal,e));let{same:u,other:g}=function(t,e,i,a){let{pos:r,box:n}=i,o=t.maxPadding;if(!(0,s.i)(r)){i.size&&(t[r]-=i.size);let l=a[i.stack]||{size:0,count:1};l.size=Math.max(l.size,i.horizontal?n.height:n.width),i.size=l.size/l.count,t[r]+=i.size}n.getPadding&&to(o,n.getPadding());let h=Math.max(0,e.outerWidth-tn(o,t,"left","right")),d=Math.max(0,e.outerHeight-tn(o,t,"top","bottom")),c=h!==t.w,u=d!==t.h;return t.w=h,t.h=d,i.horizontal?{same:c,other:u}:{same:u,other:c}}(e,i,o,a);h|=u&&c.length,d=d||g,l.fullSize||c.push(o)}return h&&tl(c,e,i,a)||d}function th(t,e,i,s,a){t.top=i,t.left=e,t.right=e+s,t.bottom=i+a,t.width=s,t.height=a}function td(t,e,i,a){let r=i.padding,{x:n,y:o}=e;for(let l of t){let h=l.box,d=a[l.stack]||{count:1,placed:0,weight:1},c=l.stackWeight/d.weight||1;if(l.horizontal){let u=e.w*c,g=d.size||h.height;(0,s.j)(d.start)&&(o=d.start),h.fullSize?th(h,r.left,o,i.outerWidth-r.right-r.left,g):th(h,e.left+d.placed,o,u,g),d.start=o,d.placed+=u,o=h.bottom}else{let p=e.h*c,f=d.size||h.width;(0,s.j)(d.start)&&(n=d.start),h.fullSize?th(h,n,r.top,f,i.outerHeight-r.bottom-r.top):th(h,n,e.top+d.placed,f,p),d.start=n,d.placed+=p,n=h.right}}e.x=n,e.y=o}s.d.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var tc={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){let i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,a){if(!t)return;let r=(0,s.K)(t.options.layout.padding),n=Math.max(e-r.width,0),o=Math.max(i-r.height,0),l=function(t){let e=function(t){let e,i,s,a,r,n;let o=[];for(e=0,i=(t||[]).length;et.box.fullSize),!0),s=tr(ts(e,"left"),!0),a=tr(ts(e,"right")),r=tr(ts(e,"top"),!0),n=tr(ts(e,"bottom")),o=ta(e,"x"),l=ta(e,"y");return{fullSize:i,leftAndTop:s.concat(r),rightAndBottom:a.concat(l).concat(n).concat(o),chartArea:ts(e,"chartArea"),vertical:s.concat(a).concat(l),horizontal:r.concat(n).concat(o)}}(t.boxes),h=l.vertical,d=l.horizontal;(0,s.Q)(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});let c=h.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:n,availableHeight:o,vBoxMaxWidth:n/2/c,hBoxMaxHeight:o/2}),g=Object.assign({},r);to(g,(0,s.K)(a));let p=Object.assign({maxPadding:g,w:n,h:o,x:r.left,y:r.top},r),f=function(t,e){let i,s,a;let r=function(t){let e={};for(let i of t){let{stack:s,pos:a,stackWeight:r}=i;if(!s||!ti.includes(a))continue;let n=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});n.count++,n.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;for(i=0,s=t.length;i{let i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class tu{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class tg extends tu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let tp="$chartjs",tf={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},tm=t=>null===t||""===t,tb=!!s.a5&&{passive:!0};function tx(t,e,i){t.canvas.removeEventListener(e,i,tb)}function t_(t,e){for(let i of t)if(i===e||i.contains(e))return!0}function tv(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let a of t)e=(e=e||t_(a.addedNodes,s))&&!t_(a.removedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function ty(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let a of t)e=(e=e||t_(a.removedNodes,s))&&!t_(a.addedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}let tM=new Map,tk=0;function tw(){let t=window.devicePixelRatio;t!==tk&&(tk=t,tM.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function tS(t,e,i){let a=t.canvas,r=a&&(0,s.a2)(a);if(!r)return;let n=(0,s.a4)((t,e)=>{let s=r.clientWidth;i(t,e),s{let e=t[0],i=e.contentRect.width,s=e.contentRect.height;(0!==i||0!==s)&&n(i,s)});return o.observe(r),tM.size||window.addEventListener("resize",tw),tM.set(t,n),o}function tP(t,e,i){i&&i.disconnect(),"resize"===e&&(tM.delete(t),tM.size||window.removeEventListener("resize",tw))}function tD(t,e,i){let a=t.canvas,r=(0,s.a4)(e=>{null!==t.ctx&&i(function(t,e){let i=tf[t.type]||t.type,{x:a,y:r}=(0,s.X)(t,e);return{type:i,chart:e,native:t,x:void 0!==a?a:null,y:void 0!==r?r:null}}(e,t))},t,t=>{let e=t[0];return[e,e.offsetX,e.offsetY]});return!function(t,e,i){t.addEventListener(e,i,tb)}(a,e,r),r}class tC extends tu{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(!function(t,e){let i=t.style,a=t.getAttribute("height"),r=t.getAttribute("width");if(t[tp]={initial:{height:a,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",tm(r)){let n=(0,s.a3)(t,"width");void 0!==n&&(t.width=n)}if(tm(a)){if(""===t.style.height)t.height=t.width/(e||2);else{let o=(0,s.a3)(t,"height");void 0!==o&&(t.height=o)}}}(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[tp])return!1;let i=e[tp].initial;["height","width"].forEach(t=>{let a=i[t];(0,s.k)(a)?e.removeAttribute(t):e.setAttribute(t,a)});let a=i.style||{};return Object.keys(a).forEach(t=>{e.style[t]=a[t]}),e.width=e.width,delete e[tp],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={});s[e]=(({attach:tv,detach:ty,resize:tS})[e]||tD)(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];s&&((({attach:tP,detach:tP,resize:tP})[e]||tx)(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,a){return(0,s.a1)(t,e,i,a)}isAttached(t){let e=(0,s.a2)(t);return!!(e&&e.isConnected)}}class tO{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let a=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(a,t,e,i);return"afterDestroy"===e&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,i,a){for(let r of(a=a||{},t)){let n=r.plugin,o=n[i],l=[e,a,r.options];if(!1===(0,s.C)(o,l,n)&&a.cancelable)return!1}return!0}invalidate(){(0,s.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let i=t&&t.config,a=(0,s.v)(i.options&&i.options.plugins,{}),r=function(t){let e={},i=[],s=Object.keys(U.plugins.items);for(let a=0;at.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function tL(t,e){let i=s.d.datasets[t]||{},a=(e.datasets||{})[t]||{};return a.indexAxis||e.indexAxis||i.indexAxis||"x"}function tE(t,e){var i;return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase()}function tA(t){let e=t.options||(t.options={});e.plugins=(0,s.v)(e.plugins,{}),e.scales=function(t,e){let i=s.U[t.type]||{scales:{}},a=e.scales||{},r=tL(t.type,e),n=Object.create(null),o=Object.create(null);return Object.keys(a).forEach(t=>{let e=a[t];if(!(0,s.i)(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);let l=tE(t,e),h=i.scales||{};n[l]=n[l]||t,o[t]=(0,s.ac)(Object.create(null),[{axis:l},e,h[l],h[l===r?"_index_":"_value_"]])}),t.data.datasets.forEach(i=>{let r=i.type||t.type,l=i.indexAxis||tL(r,e),h=s.U[r]||{},d=h.scales||{};Object.keys(d).forEach(t=>{let e;let r=(e=t,"_index_"===t?e=l:"_value_"===t&&(e="x"===l?"y":"x"),e),h=i[r+"AxisID"]||n[r]||r;o[h]=o[h]||Object.create(null),(0,s.ac)(o[h],[{axis:r},a[h],d[t]])})}),Object.keys(o).forEach(t=>{let e=o[t];(0,s.ac)(e,[s.d.scales[e.type],s.d.scale])}),o}(t,e)}function tT(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}let tz=new Map,tR=new Set;function tF(t,e){let i=tz.get(t);return i||(i=e(),tz.set(t,i),tR.add(i)),i}let tI=(t,e,i)=>{let a=(0,s.f)(e,i);void 0!==a&&t.add(a)};class tV{constructor(t){var e;this._config=((e=(e=t)||{}).data=tT(e.data),tA(e),e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=tT(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),tA(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tF(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return tF(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return tF(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return tF(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let i=this._scopeCache,s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){let{options:a,type:r}=this,n=this._cachedScopes(t,i),o=n.get(e);if(o)return o;let l=new Set;e.forEach(e=>{t&&(l.add(t),e.forEach(e=>tI(l,t,e))),e.forEach(t=>tI(l,a,t)),e.forEach(t=>tI(l,s.U[r]||{},t)),e.forEach(t=>tI(l,s.d,t)),e.forEach(t=>tI(l,s.a7,t))});let h=Array.from(l);return 0===h.length&&h.push(Object.create(null)),tR.has(e)&&n.set(e,h),h}chartOptionScopes(){let{options:t,type:e}=this;return[t,s.U[e]||{},s.d.datasets[e]||{},{type:e},s.d,s.a7]}resolveNamedOptions(t,e,i,a=[""]){let r={$shared:!0},{resolver:n,subPrefixes:o}=tB(this._resolverCache,t,a),l=n;if(function(t,e){let{isScriptable:i,isIndexable:a}=(0,s.ab)(t);for(let r of e){let n=i(r),o=a(r),l=(o||n)&&t[r];if(n&&((0,s.a8)(l)||tN(l))||o&&(0,s.b)(l))return!0}return!1}(n,e)){r.$shared=!1,i=(0,s.a8)(i)?i():i;let h=this.createResolver(t,i,o);l=(0,s.a9)(n,i,h)}for(let d of e)r[d]=l[d];return r}createResolver(t,e,i=[""],a){let{resolver:r}=tB(this._resolverCache,t,i);return(0,s.i)(e)?(0,s.a9)(r,e,void 0,a):r}}function tB(t,e,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let r=i.join(),n=a.get(r);if(!n){let o=(0,s.aa)(e,i);n={resolver:o,subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},a.set(r,n)}return n}let tN=t=>(0,s.i)(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||(0,s.a8)(t[i]),!1),tH=["top","bottom","left","right","chartArea"];function tW(t,e){return"top"===t||"bottom"===t||-1===tH.indexOf(t)&&"x"===e}function tj(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function t$(t){let e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),(0,s.C)(i&&i.onComplete,[t],e)}function tU(t){let e=t.chart,i=e.options.animation;(0,s.C)(i&&i.onProgress,[t],e)}function tY(t){return(0,s.a6)()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}let tK={},tQ=t=>{let e=tY(t);return Object.values(tK).filter(t=>t.canvas===e).pop()};class tX{constructor(t,e){let i=this.config=new tV(e),r=tY(t),n=tQ(r);if(n)throw Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");let o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||(!(0,s.a6)()||"undefined"!=typeof OffscreenCanvas&&r instanceof OffscreenCanvas?tg:tC)),this.platform.updateConfig(i);let l=this.platform.acquireContext(r,o.aspectRatio),h=l&&l.canvas,d=h&&h.height,c=h&&h.width;if(this.id=(0,s.ad)(),this.ctx=l,this.canvas=h,this.width=c,this.height=d,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new tO,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,s.ae)(t=>this.update(t),o.resizeDelay||0),this._dataChanges=[],tK[this.id]=this,!l||!h){console.error("Failed to create chart: can't acquire context from the given item");return}a.listen(this,"complete",t$),a.listen(this,"progress",tU),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:a,_aspectRatio:r}=this;return(0,s.k)(t)?e&&r?r:a?i/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,s.af)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,s.ag)(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,a=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,n=this.platform.getMaximumSize(a,t,e,r),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=n.width,this.height=n.height,this._aspectRatio=this.aspectRatio,(0,s.af)(this,o,!0)&&(this.notifyPlugins("resize",{size:n}),(0,s.C)(i.onResize,[this,n],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let t=this.options,e=t.scales||{};(0,s.Q)(e,(t,e)=>{t.id=e})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,a=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{}),r=[];e&&(r=r.concat(Object.keys(e).map(t=>{let i=e[t],s=tE(t,i),a="r"===s,r="x"===s;return{options:i,dposition:a?"chartArea":r?"bottom":"left",dtype:a?"radialLinear":r?"category":"linear"}}))),(0,s.Q)(r,e=>{let r=e.options,n=r.id,o=tE(n,r),l=(0,s.v)(r.type,e.dtype);(void 0===r.position||tW(r.position,o)!==tW(e.dposition))&&(r.position=e.dposition),a[n]=!0;let h=null;if(n in i&&i[n].type===l)h=i[n];else{let d=U.getScale(l);i[(h=new d({id:n,type:l,ctx:this.ctx,chart:this})).id]=h}h.init(r,t)}),(0,s.Q)(a,(t,e)=>{t||delete i[e]}),(0,s.Q)(i,t=>{tc.configure(this,t,t.options),tc.addBox(this,t)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let s=e;se.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){let t,e;let i=[],a=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=a.length;t{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let n=0;for(let o=0,l=this.data.datasets.length;o{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(tj("z","_idx"));let{_active:c,_lastEvent:u}=this;u?this._eventHandler(u,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){(0,s.Q)(this.scales,t=>{tc.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(0,s.ah)(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:i,start:s,count:a}of e){let r="_removeElements"===i?-a:a;!function(t,e,i){let s=Object.keys(t);for(let a of s){let r=+a;if(r>=e){let n=t[a];delete t[a],(i>0||r>e)&&(t[r+i]=n)}}}(t,s,r)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),a=i(0);for(let r=1;rt.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;tc.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],(0,s.Q)(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i=t._clip,a=!i.disabled,r=this.chartArea,n={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(a&&(0,s.L)(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),a&&(0,s.N)(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return(0,s.$)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){let a=te.modes[e];return"function"==typeof a?a(this,t,i,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,s=i.filter(t=>t&&t._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=(0,s.h)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){let i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let a=i?"show":"hide",r=this.getDatasetMeta(t),n=r.controller._resolveAnimations(void 0,a);(0,s.j)(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(r,{visible:i}),this.update(e=>e.datasetIndex===t?a:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),a.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},a=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};(0,s.Q)(this.options.events,t=>i(t,a))}bindResponsiveEvents(){let t;this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,i=this.platform,s=(t,s)=>{i.addEventListener(this,t,s),e[t]=s},a=(t,s)=>{e[t]&&(i.removeEventListener(this,t,s),delete e[t])},r=(t,e)=>{this.canvas&&this.resize(t,e)},n=()=>{a("attach",n),this.attached=!0,this.resize(),s("resize",r),s("detach",t)};t=()=>{this.attached=!1,a("resize",r),this._stop(),this._resize(0,0),s("attach",n)},i.isAttached(this.canvas)?n():t()}unbindEvents(){(0,s.Q)(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},(0,s.Q)(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let s,a,r;let n=i?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+n+"DatasetHoverStyle"](),a=0,r=t.length;a{let i=this.getDatasetMeta(t);if(!i)throw Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),a=!(0,s.ai)(i,e);a&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){let s=this.options.hover,a=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),r=a(e,t),n=i?t:a(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),n.length&&s.mode&&this.updateHoverStyle(n,s.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;let a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){var a;let{_active:r=[],options:n}=this,o=this._getActiveElements(t,r,i,e),l=(0,s.aj)(t),h=(a=this._lastEvent,i&&"mouseout"!==t.type?l?a:t:null);i&&(this._lastEvent=null,(0,s.C)(n.onHover,[t,o,this],this),l&&(0,s.C)(n.onClick,[t,o,this],this));let d=!(0,s.ai)(o,r);return(d||e)&&(this._active=o,this._updateHoverStyles(o,r,e)),this._lastEvent=h,d}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,s)}}let tG=()=>(0,s.Q)(tX.instances,t=>t._plugins.invalidate());function tq(t,e,i){let{startAngle:a,pixelMargin:r,x:n,y:o,outerRadius:l,innerRadius:h}=e,d=r/l;t.beginPath(),t.arc(n,o,l,a-d,i+d),h>r?(d=r/h,t.arc(n,o,h,i+d,a-d,!0)):t.arc(n,o,r,i+s.H,a-s.H),t.closePath(),t.clip()}function tJ(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function tZ(t,e,i,a,r,n){let{x:o,y:l,startAngle:h,pixelMargin:d,innerRadius:c}=e,u=Math.max(e.outerRadius+a+i-d,0),g=c>0?c+a+i+d:0,p=0,f=r-h;if(a){let m=((c>0?c-a:0)+(u>0?u-a:0))/2;p=(f-(0!==m?f*m/(m+a):f))/2}let b=Math.max(.001,f*u-i/s.P)/u,x=(f-b)/2,_=h+x+p,v=r-x-p,{outerStart:y,outerEnd:M,innerStart:k,innerEnd:w}=function(t,e,i,a){var r;let n=(r=t.options.borderRadius,(0,s.al)(r,["outerStart","outerEnd","innerStart","innerEnd"])),o=(i-e)/2,l=Math.min(o,a*e/2),h=t=>(0,s.E)(t,0,Math.min(o,(i-Math.min(o,t))*a/2));return{outerStart:h(n.outerStart),outerEnd:h(n.outerEnd),innerStart:(0,s.E)(n.innerStart,0,l),innerEnd:(0,s.E)(n.innerEnd,0,l)}}(e,g,u,v-_),S=u-y,P=u-M,D=_+y/S,C=v-M/P,O=g+k,L=g+w,E=_+k/O,A=v-w/L;if(t.beginPath(),n){if(t.arc(o,l,u,D,C),M>0){let T=tJ(P,C,o,l);t.arc(T.x,T.y,M,C,v+s.H)}let z=tJ(L,v,o,l);if(t.lineTo(z.x,z.y),w>0){let R=tJ(L,A,o,l);t.arc(R.x,R.y,w,v+s.H,A+Math.PI)}if(t.arc(o,l,g,v-w/g,_+k/g,!0),k>0){let F=tJ(O,E,o,l);t.arc(F.x,F.y,k,E+Math.PI,_-s.H)}let I=tJ(S,_,o,l);if(t.lineTo(I.x,I.y),y>0){let V=tJ(S,D,o,l);t.arc(V.x,V.y,y,_-s.H,D)}}else t.moveTo(o,l),t.lineTo(Math.cos(D)*u+o,Math.sin(D)*u+l),t.lineTo(Math.cos(C)*u+o,Math.sin(C)*u+l);t.closePath()}Object.defineProperties(tX,{defaults:{enumerable:!0,value:s.d},instances:{enumerable:!0,value:tK},overrides:{enumerable:!0,value:s.U},registry:{enumerable:!0,value:U},version:{enumerable:!0,value:"3.9.1"},getChart:{enumerable:!0,value:tQ},register:{enumerable:!0,value(...t){U.add(...t),tG()}},unregister:{enumerable:!0,value(...t){U.remove(...t),tG()}}});class t0 extends z{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){let a=this.getProps(["x","y"],i),{angle:r,distance:n}=(0,s.a0)(a,{x:t,y:e}),{startAngle:o,endAngle:l,innerRadius:h,outerRadius:d,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2,g=(0,s.v)(c,l-o),p=g>=s.T||(0,s.p)(r,o,l),f=(0,s.ak)(n,h+u,d+u);return p&&f}getCenterPoint(t){let{x:e,y:i,startAngle:s,endAngle:a,innerRadius:r,outerRadius:n}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:o,spacing:l}=this.options,h=(s+a)/2,d=(r+n+l+o)/2;return{x:e+Math.cos(h)*d,y:i+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:i}=this,a=(e.offset||0)/2,r=(e.spacing||0)/2,n=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>s.T?Math.floor(i/s.T):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(a){o=a/2;let l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*o,Math.sin(l)*o),this.circumference>=s.P&&(o=a)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;let h=function(t,e,i,a,r){let{fullCircles:n,startAngle:o,circumference:l}=e,h=e.endAngle;if(n){tZ(t,e,i,a,o+s.T,r);for(let d=0;do&&r>o)?s+h-l:h-l}}function t3(t,e,i,a){let r,n,o;let{points:l,options:h}=e,{count:d,start:c,loop:u,ilen:g}=t5(l,i,a),p=h.stepped?s.as:h.tension||"monotone"===h.cubicInterpolationMode?s.at:t2,{move:f=!0,reverse:m}=a||{};for(r=0;r<=g;++r)(n=l[(c+(m?g-r:r))%d]).skip||(f?(t.moveTo(n.x,n.y),f=!1):p(t,o,n,m,h.stepped),o=n);return u&&p(t,o,n=l[(c+(m?g:0))%d],m,h.stepped),!!u}function t6(t,e,i,s){let a,r,n,o,l,h;let d=e.points,{count:c,start:u,ilen:g}=t5(d,i,s),{move:p=!0,reverse:f}=s||{},m=0,b=0,x=t=>(u+(f?g-t:t))%c,_=()=>{o!==l&&(t.lineTo(m,l),t.lineTo(m,o),t.lineTo(m,h))};for(p&&(r=d[x(0)],t.moveTo(r.x,r.y)),a=0;a<=g;++a){if((r=d[x(a)]).skip)continue;let v=r.x,y=r.y,M=0|v;M===n?(yl&&(l=y),m=(b*m+v)/++b):(_(),t.lineTo(v,y),n=M,b=0,o=l=y),h=y}_()}function t4(t){let e=t.options,i=e.borderDash&&e.borderDash.length,s=!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!i;return s?t6:t3}t0.id="arc",t0.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},t0.defaultRoutes={backgroundColor:"backgroundColor"};let t7="function"==typeof Path2D;class t8 extends z{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){let a=i.spanGaps?this._loop:this._fullLoop;(0,s.am)(this._points,i,t,a,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,s.an)(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){let i,a;let r=this.options,n=t[e],o=this.points,l=(0,s.ao)(this,{property:e,start:n,end:n});if(!l.length)return;let h=[],d=r.stepped?s.ap:r.tension||"monotone"===r.cubicInterpolationMode?s.aq:s.ar;for(i=0,a=l.length;i"borderDash"!==t&&"fill"!==t};class et extends z{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){let s=this.options,{x:a,y:r}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-r,2){el(t)})}function ed(t,e,i,a){if(a)return;let r=e[t],n=i[t];return"angle"===t&&(r=(0,s.az)(r),n=(0,s.az)(n)),{property:t,start:r,end:n}}function ec(t,e,i){for(;e>t;e--){let s=i[e];if(!isNaN(s.x)&&!isNaN(s.y))break}return e}function eu(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function eg(t,e){let i=[],a=!1;return(0,s.b)(t)?(a=!0,i=t):i=function(t,e){let{x:i=null,y:s=null}=t||{},a=e.points,r=[];return e.segments.forEach(({start:t,end:e})=>{e=ec(t,e,a);let n=a[t],o=a[e];null!==s?(r.push({x:n.x,y:s}),r.push({x:o.x,y:s})):null!==i&&(r.push({x:i,y:n.y}),r.push({x:i,y:o.y}))}),r}(t,e),i.length?new t8({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function ep(t){return t&&!1!==t.fill}class ef{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){let{x:a,y:r,radius:n}=this;return e=e||{start:0,end:s.T},t.arc(a,r,n,e.end,e.start,!0),!i.bounds}interpolate(t){let{x:e,y:i,radius:s}=this,a=t.angle;return{x:e+Math.cos(a)*s,y:i+Math.sin(a)*s,angle:a}}}function em(t,e,i){let a=function(t){let{chart:e,fill:i,line:a}=t;if((0,s.g)(i))return function(t,e){let i=t.getDatasetMeta(e),s=i&&t.isDatasetVisible(e);return s?i.dataset:null}(e,i);if("stack"===i)return function(t){let{scale:e,index:i,line:a}=t,r=[],n=a.segments,o=a.points,l=function(t,e){let i=[],s=t.getMatchingVisibleMetas("line");for(let a=0;a{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}},ey=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class eM extends z{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=(0,s.C)(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,i)=>t.sort(e,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let t,e;let{options:i,ctx:a}=this;if(!i.display){this.width=this.height=0;return}let r=i.labels,n=(0,s.O)(r.font),o=n.size,l=this._computeTitleHeight(),{boxWidth:h,itemHeight:d}=ev(r,o);a.font=n.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(l,o,h,d)+10):(e=this.maxHeight,t=this._fitCols(l,o,h,d)+10),this.width=Math.min(t,i.maxWidth||this.maxWidth),this.height=Math.min(e,i.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){let{ctx:a,maxWidth:r,options:{labels:{padding:n}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+n,d=t;a.textAlign="left",a.textBaseline="middle";let c=-1,u=-h;return this.legendItems.forEach((t,g)=>{let p=i+e/2+a.measureText(t.text).width;(0===g||l[l.length-1]+p+2*n>r)&&(d+=h,l[l.length-(g>0?0:1)]=0,u+=h,c++),o[g]={left:0,top:u,row:c,width:p,height:s},l[l.length-1]+=p+n}),d}_fitCols(t,e,i,s){let{ctx:a,maxHeight:r,options:{labels:{padding:n}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],h=r-t,d=n,c=0,u=0,g=0,p=0;return this.legendItems.forEach((t,r)=>{let f=i+e/2+a.measureText(t.text).width;r>0&&u+s+2*n>h&&(d+=c+n,l.push({width:c,height:u}),g+=c+n,p++,c=u=0),o[r]={left:g,top:u,col:p,width:f,height:s},c=Math.max(c,f),u+=s+n}),d+=c,l.push({width:c,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:a},rtl:r}}=this,n=(0,s.aA)(r,this.left,this.width);if(this.isHorizontal()){let o=0,l=(0,s.S)(i,this.left+a,this.right-this.lineWidths[o]);for(let h of e)o!==h.row&&(o=h.row,l=(0,s.S)(i,this.left+a,this.right-this.lineWidths[o])),h.top+=this.top+t+a,h.left=n.leftForLtr(n.x(l),h.width),l+=h.width+a}else{let d=0,c=(0,s.S)(i,this.top+t+a,this.bottom-this.columnSizes[d].height);for(let u of e)u.col!==d&&(d=u.col,c=(0,s.S)(i,this.top+t+a,this.bottom-this.columnSizes[d].height)),u.top=c,u.left+=this.left+a,u.left=n.leftForLtr(n.x(u.left),u.width),c+=u.height+a}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){let t=this.ctx;(0,s.L)(t,this),this._draw(),(0,s.N)(t)}}_draw(){let t;let{options:e,columnSizes:i,lineWidths:a,ctx:r}=this,{align:n,labels:o}=e,l=s.d.color,h=(0,s.aA)(e.rtl,this.left,this.width),d=(0,s.O)(o.font),{color:c,padding:u}=o,g=d.size,p=g/2;this.drawTitle(),r.textAlign=h.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=d.string;let{boxWidth:f,boxHeight:m,itemHeight:b}=ev(o,g),x=function(t,e,i){if(isNaN(f)||f<=0||isNaN(m)||m<0)return;r.save();let a=(0,s.v)(i.lineWidth,1);if(r.fillStyle=(0,s.v)(i.fillStyle,l),r.lineCap=(0,s.v)(i.lineCap,"butt"),r.lineDashOffset=(0,s.v)(i.lineDashOffset,0),r.lineJoin=(0,s.v)(i.lineJoin,"miter"),r.lineWidth=a,r.strokeStyle=(0,s.v)(i.strokeStyle,l),r.setLineDash((0,s.v)(i.lineDash,[])),o.usePointStyle){let n={radius:m*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:a},d=h.xPlus(t,f/2);(0,s.aE)(r,n,d,e+p,o.pointStyleWidth&&f)}else{let c=e+Math.max((g-m)/2,0),u=h.leftForLtr(t,f),b=(0,s.ax)(i.borderRadius);r.beginPath(),Object.values(b).some(t=>0!==t)?(0,s.av)(r,{x:u,y:c,w:f,h:m,radius:b}):r.rect(u,c,f,m),r.fill(),0!==a&&r.stroke()}r.restore()},_=function(t,e,i){(0,s.M)(r,i.text,t,e+b/2,d,{strikethrough:i.hidden,textAlign:h.textAlign(i.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();t=v?{x:(0,s.S)(n,this.left+u,this.right-a[0]),y:this.top+u+y,line:0}:{x:this.left+u,y:(0,s.S)(n,this.top+y+u,this.bottom-i[0].height),line:0},(0,s.aB)(this.ctx,e.textDirection);let M=b+u;this.legendItems.forEach((l,d)=>{r.strokeStyle=l.fontColor||c,r.fillStyle=l.fontColor||c;let g=r.measureText(l.text).width,m=h.textAlign(l.textAlign||(l.textAlign=o.textAlign)),b=f+p+g,k=t.x,w=t.y;h.setWidth(this.width),v?d>0&&k+b+u>this.right&&(w=t.y+=M,t.line++,k=t.x=(0,s.S)(n,this.left+u,this.right-a[t.line])):d>0&&w+M>this.bottom&&(k=t.x=k+i[t.line].width+u,t.line++,w=t.y=(0,s.S)(n,this.top+y+u,this.bottom-i[t.line].height));let S=h.x(k);x(S,w,l),k=(0,s.aC)(m,k+f+p,v?k+b:this.right,e.rtl),_(h.x(k),w,l),v?t.x+=b+u:t.y+=M}),(0,s.aD)(this.ctx,e.textDirection)}drawTitle(){let t;let e=this.options,i=e.title,a=(0,s.O)(i.font),r=(0,s.K)(i.padding);if(!i.display)return;let n=(0,s.aA)(e.rtl,this.left,this.width),o=this.ctx,l=i.position,h=a.size/2,d=r.top+h,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),t=this.top+d,c=(0,s.S)(e.align,c,this.right-u);else{let g=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=d+(0,s.S)(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}let p=(0,s.S)(l,c,c+u);o.textAlign=n.textAlign((0,s.R)(l)),o.textBaseline="middle",o.strokeStyle=i.color,o.fillStyle=i.color,o.font=a.string,(0,s.M)(o,i.text,p,t,a)}_computeTitleHeight(){let t=this.options.title,e=(0,s.O)(t.font),i=(0,s.K)(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,a,r;if((0,s.ak)(t,this.left,this.right)&&(0,s.ak)(e,this.top,this.bottom)){for(i=0,r=this.legendHitBoxes;i-1?t.split("\n"):t}function eC(t,e){let i=t.chart.ctx,{body:a,footer:r,title:n}=t,{boxWidth:o,boxHeight:l}=e,h=(0,s.O)(e.bodyFont),d=(0,s.O)(e.titleFont),c=(0,s.O)(e.footerFont),u=n.length,g=r.length,p=a.length,f=(0,s.K)(e.padding),m=f.height,b=0,x=a.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(x+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*d.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),x){let _=e.displayColors?Math.max(l,h.lineHeight):h.lineHeight;m+=p*_+(x-p)*h.lineHeight+(x-1)*e.bodySpacing}g&&(m+=e.footerMarginTop+g*c.lineHeight+(g-1)*e.footerSpacing);let v=0,y=function(t){b=Math.max(b,i.measureText(t).width+v)};return i.save(),i.font=d.string,(0,s.Q)(t.title,y),i.font=h.string,(0,s.Q)(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?o+2+e.boxPadding:0,(0,s.Q)(a,t=>{(0,s.Q)(t.before,y),(0,s.Q)(t.lines,y),(0,s.Q)(t.after,y)}),v=0,i.font=c.string,(0,s.Q)(t.footer,y),i.restore(),b+=f.width,{width:b,height:m}}function eO(t,e,i){let s=i.yAlign||e.yAlign||function(t,e){let{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||function(t,e,i,s){let{x:a,width:r}=i,{width:n,chartArea:{left:o,right:l}}=t,h="center";return"center"===s?h=a<=(o+l)/2?"left":"right":a<=r/2?h="left":a>=n-r/2&&(h="right"),function(t,e,i,s){let{x:a,width:r}=s,n=i.caretSize+i.caretPadding;if("left"===t&&a+r+n>e.width||"right"===t&&a-r-n<0)return!0}(h,t,e,i)&&(h="center"),h}(t,e,i,s),yAlign:s}}function eL(t,e,i,a){let{caretSize:r,caretPadding:n,cornerRadius:o}=t,{xAlign:l,yAlign:h}=i,d=r+n,{topLeft:c,topRight:u,bottomLeft:g,bottomRight:p}=(0,s.ax)(o),f=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,l),m=function(t,e,i){let{y:s,height:a}=t;return"top"===e?s+=i:"bottom"===e?s-=a+i:s-=a/2,s}(e,h,d);return"center"===h?"left"===l?f+=d:"right"===l&&(f-=d):"left"===l?f-=Math.max(c,g)+r:"right"===l&&(f+=Math.max(u,p)+r),{x:(0,s.E)(f,0,a.width-e.width),y:(0,s.E)(m,0,a.height-e.height)}}function eE(t,e,i){let a=(0,s.K)(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-a.right:t.x+a.left}function eA(t,e){let i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class eT extends z{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,a=new h(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){var t,e;return this.$context||(this.$context=(t=this.chart.getContext(),e=this._tooltipItems,(0,s.h)(t,{tooltip:this,tooltipItems:e,type:"tooltip"})))}getTitle(t,e){let{callbacks:i}=e,s=i.beforeTitle.apply(this,[t]),a=i.title.apply(this,[t]),r=i.afterTitle.apply(this,[t]),n=[];return n=eP(n,eD(s)),n=eP(n,eD(a)),n=eP(n,eD(r))}getBeforeBody(t,e){return eP([],eD(e.callbacks.beforeBody.apply(this,[t])))}getBody(t,e){let{callbacks:i}=e,a=[];return(0,s.Q)(t,t=>{let e={before:[],lines:[],after:[]},s=eA(i,t);eP(e.before,eD(s.beforeLabel.call(this,t))),eP(e.lines,s.label.call(this,t)),eP(e.after,eD(s.afterLabel.call(this,t))),a.push(e)}),a}getAfterBody(t,e){return eP([],eD(e.callbacks.afterBody.apply(this,[t])))}getFooter(t,e){let{callbacks:i}=e,s=i.beforeFooter.apply(this,[t]),a=i.footer.apply(this,[t]),r=i.afterFooter.apply(this,[t]),n=[];return n=eP(n,eD(s)),n=eP(n,eD(a)),n=eP(n,eD(r))}_createItems(t){let e,i;let a=this._active,r=this.chart.data,n=[],o=[],l=[],h=[];for(e=0,i=a.length;et.filter(e,i,s,r))),t.itemSort&&(h=h.sort((e,i)=>t.itemSort(e,i,r))),(0,s.Q)(h,e=>{let i=eA(t.callbacks,e);n.push(i.labelColor.call(this,e)),o.push(i.labelPointStyle.call(this,e)),l.push(i.labelTextColor.call(this,e))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=l,this.dataPoints=h,h}update(t,e){let i;let s=this.options.setContext(this.getContext()),a=this._active,r=[];if(a.length){let n=eS[s.position].call(this,a,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);let o=this._size=eC(this,s),l=Object.assign({},n,o),h=eO(this.chart,s,l),d=eL(s,l,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,i={opacity:1,x:d.x,y:d.y,width:o.width,height:o.height,caretX:n.x,caretY:n.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=r,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){let a=this.getCaretPosition(t,i,s);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){let a,r,n,o,l,h;let{xAlign:d,yAlign:c}=this,{caretSize:u,cornerRadius:g}=i,{topLeft:p,topRight:f,bottomLeft:m,bottomRight:b}=(0,s.ax)(g),{x:x,y:_}=t,{width:v,height:y}=e;return"center"===c?(l=_+y/2,"left"===d?(r=(a=x)-u,o=l+u,h=l-u):(r=(a=x+v)+u,o=l-u,h=l+u),n=a):(r="left"===d?x+Math.max(p,m)+u:"right"===d?x+v-Math.max(f,b)-u:this.caretX,"top"===c?(l=(o=_)-u,a=r-u,n=r+u):(l=(o=_+y)+u,a=r+u,n=r-u),h=o),{x1:a,x2:r,x3:n,y1:o,y2:l,y3:h}}drawTitle(t,e,i){let a,r,n;let o=this.title,l=o.length;if(l){let h=(0,s.aA)(i.rtl,this.x,this.width);for(n=0,t.x=eE(this,i.titleAlign,i),e.textAlign=h.textAlign(i.titleAlign),e.textBaseline="middle",a=(0,s.O)(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string;n0!==t)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,(0,s.av)(t,{x:_,y:f,w:h,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),(0,s.av)(t,{x:v,y:f+1,w:h-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(_,f,h,l),t.strokeRect(_,f,h,l),t.fillStyle=n.backgroundColor,t.fillRect(v,f+1,h-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let a,r,n,o,l,h,d;let{body:c}=this,{bodySpacing:u,bodyAlign:g,displayColors:p,boxHeight:f,boxWidth:m,boxPadding:b}=i,x=(0,s.O)(i.bodyFont),_=x.lineHeight,v=0,y=(0,s.aA)(i.rtl,this.x,this.width),M=function(i){e.fillText(i,y.x(t.x+v),t.y+_/2),t.y+=_+u},k=y.textAlign(g);for(e.textAlign=g,e.textBaseline="middle",e.font=x.string,t.x=eE(this,k,i),e.fillStyle=i.bodyColor,(0,s.Q)(this.beforeBody,M),v=p&&"right"!==k?"center"===g?m/2+b:m+2+b:0,o=0,h=c.length;o0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){let r=eS[t.position].call(this,this._active,this._eventPosition);if(!r)return;let n=this._size=eC(this,t),o=Object.assign({},r,this._size),l=eO(e,t,o),h=eL(t,o,l,e);(s._to!==h.x||a._to!==h.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=n.width,this.height=n.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let a={width:this.width,height:this.height},r={x:this.x,y:this.y};i=.001>Math.abs(i)?0:i;let n=(0,s.K)(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,a,e),(0,s.aB)(t,e.textDirection),r.y+=n.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),(0,s.aD)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,a=t.map(({datasetIndex:t,index:e})=>{let i=this.chart.getDatasetMeta(t);if(!i)throw Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),r=!(0,s.ai)(i,a),n=this._positionChanged(a,e);(r||n)&&(this._active=a,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let a=this.options,r=this._active||[],n=this._getActiveElements(t,r,e,i),o=this._positionChanged(n,t),l=e||!(0,s.ai)(n,r)||o;return l&&(this._active=n,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,s){let a=this.options;if("mouseout"===t.type)return[];if(!s)return e;let r=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&r.reverse(),r}_positionChanged(t,e){let{caretX:i,caretY:s,options:a}=this,r=eS[a.position].call(this,t,e);return!1!==r&&(i!==r.x||s!==r.y)}}eT.positioners=eS;var ez={id:"tooltip",_element:eT,positioners:eS,afterInit(t,e,i){i&&(t.tooltip=new eT({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){let i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:s.aF,title(t){if(t.length>0){let e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},eR=Object.freeze({__proto__:null,Decimation:{id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate(t,e,i){if(!i.enabled){eh(t);return}let a=t.width;t.data.datasets.forEach((e,r)=>{let n;let{_data:o,indexAxis:l}=e,h=t.getDatasetMeta(r),d=o||e.data;if("y"===(0,s.a)([l,t.options.indexAxis])||!h.controller.supportsDecimation)return;let c=t.scales[h.xAxisID];if("linear"!==c.type&&"time"!==c.type||t.options.parsing)return;let{start:u,count:g}=function(t,e){let i;let a=e.length,r=0,{iScale:n}=t,{min:o,max:l,minDefined:h,maxDefined:d}=n.getUserBounds();return h&&(r=(0,s.E)((0,s.Z)(e,n.axis,o).lo,0,a-1)),i=d?(0,s.E)((0,s.Z)(e,n.axis,l).hi+1,r,a)-r:a-r,{start:r,count:i}}(h,d),p=i.threshold||4*a;if(g<=p){el(e);return}switch((0,s.k)(o)&&(e._data=d,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":n=function(t,e,i,s,a){let r,n,o,l,h;let d=a.samples||s;if(d>=i)return t.slice(e,e+i);let c=[],u=(i-2)/(d-2),g=0,p=e;for(r=0,c[g++]=t[p];ro&&(o=l,n=t[f],h=f);c[g++]=n,p=h}return c[g++]=t[e+i-1],c}(d,u,g,a,i);break;case"min-max":n=function(t,e,i,a){let r,n,o,l,h,d,c,u,g,p,f=0,m=0,b=[],x=t[e].x,_=t[e+i-1].x,v=_-x;for(r=e;rp&&(p=l,c=r),f=(m*f+n.x)/++m;else{let M=r-1;if(!(0,s.k)(d)&&!(0,s.k)(c)){let k=Math.min(d,c),w=Math.max(d,c);k!==u&&k!==M&&b.push({...t[k],x:f}),w!==u&&w!==M&&b.push({...t[w],x:f})}r>0&&M!==u&&b.push(t[M]),b.push(n),h=y,m=0,g=p=l,d=c=u=r}}return b}(d,u,g,a);break;default:throw Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=n})},destroy(t){eh(t)}},Filler:{id:"filler",afterDatasetsUpdate(t,e,i){let a,r,n,o;let l=(t.data.datasets||[]).length,h=[];for(r=0;r=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}(n,r,l),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:n}),a.$filler=o,h.push(o);for(r=0;r=0;--n){let o=a[n].$filler;o&&(o.line.updateControlPoints(r,o.axis),s&&o.fill&&em(t.ctx,o,r))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;let s=t.getSortedVisibleDatasetMetas();for(let a=s.length-1;a>=0;--a){let r=s[a].$filler;ep(r)&&em(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,i){let s=e.meta.$filler;ep(s)&&"beforeDatasetDraw"===i.drawTime&&em(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Legend:{id:"legend",_element:eM,start(t,e,i){let s=t.legend=new eM({ctx:t.ctx,options:i,chart:t});tc.configure(t,s,i),tc.addBox(t,s)},stop(t){tc.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){let s=t.legend;tc.configure(t,s,i),s.options=i},afterUpdate(t){let e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){let s=e.datasetIndex,a=i.chart;a.isDatasetVisible(s)?(a.hide(s),e.hidden=!0):(a.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:a,textAlign:r,color:n}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{let o=t.controller.getStyle(i?0:void 0),l=(0,s.K)(o.borderWidth);return{text:e[t.index].label,fillStyle:o.backgroundColor,fontColor:n,hidden:!t.visible,lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:o.borderColor,pointStyle:a||o.pointStyle,rotation:o.rotation,textAlign:r||o.textAlign,borderRadius:0,datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},SubTitle:{id:"subtitle",start(t,e,i){let s=new ek({ctx:t.ctx,options:i,chart:t});tc.configure(t,s,i),tc.addBox(t,s),ew.set(t,s)},stop(t){tc.removeBox(t,ew.get(t)),ew.delete(t)},beforeUpdate(t,e,i){let s=ew.get(t);tc.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Title:{id:"title",_element:ek,start(t,e,i){!function(t,e){let i=new ek({ctx:t.ctx,options:e,chart:t});tc.configure(t,i,e),tc.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){let e=t.titleBlock;tc.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){let s=t.titleBlock;tc.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Tooltip:ez});let eF=(t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i),eI=(t,e)=>null===t?null:(0,s.E)(Math.round(t),0,e);class eV extends j{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let i=this.getLabels();for(let{index:s,label:a}of e)i[s]===a&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,s.k)(t))return null;let i=this.getLabels();return eI(e=isFinite(e)&&i[e]===t?e:function(t,e,i,s){let a=t.indexOf(e);if(-1===a)return eF(t,e,i,s);let r=t.lastIndexOf(e);return a!==r?i:a}(i,t,(0,s.v)(e,t),this._addedLabels),i.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:i,max:s}=this.getMinMax(!0);"ticks"!==this.options.bounds||(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){let t=this.min,e=this.max,i=this.options.offset,s=[],a=this.getLabels();a=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let r=t;r<=e;r++)s.push({value:r});return s}getLabelForValue(t){let e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function eB(t,e,{horizontal:i,minRotation:a}){let r=(0,s.t)(a),n=.75*e*(""+t).length;return Math.min(e/((i?Math.sin(r):Math.cos(r))||.001),n)}eV.id="category",eV.defaults={ticks:{callback:eV.prototype.getLabelForValue}};class eN extends j{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return(0,s.k)(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:a,max:r}=this,n=t=>a=e?a:t,o=t=>r=i?r:t;if(t){let l=(0,s.s)(a),h=(0,s.s)(r);l<0&&h<0?o(0):l>0&&h>0&&n(0)}if(a===r){let d=1;(r>=Number.MAX_SAFE_INTEGER||a<=Number.MIN_SAFE_INTEGER)&&(d=Math.abs(.05*r)),o(r+d),t||n(a-d)}this.min=a,this.max=r}getTickLimit(){let t;let e=this.options.ticks,{maxTicksLimit:i,stepSize:s}=e;return s?(t=Math.ceil(this.max/s)-Math.floor(this.min/s)+1)>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let a={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},r=this._range||this,n=function(t,e){let i,a,r,n;let o=[],{bounds:l,step:h,min:d,max:c,precision:u,count:g,maxTicks:p,maxDigits:f,includeBounds:m}=t,b=h||1,x=p-1,{min:_,max:v}=e,y=!(0,s.k)(d),M=!(0,s.k)(c),k=!(0,s.k)(g),w=(v-_)/(f+1),S=(0,s.aI)((v-_)/x/b)*b;if(S<1e-14&&!y&&!M)return[{value:_},{value:v}];(n=Math.ceil(v/S)-Math.floor(_/S))>x&&(S=(0,s.aI)(n*S/x/b)*b),(0,s.k)(u)||(S=Math.ceil(S*(i=Math.pow(10,u)))/i),"ticks"===l?(a=Math.floor(_/S)*S,r=Math.ceil(v/S)*S):(a=_,r=v),y&&M&&h&&(0,s.aJ)((c-d)/h,S/1e3)?(n=Math.round(Math.min((c-d)/S,p)),S=(c-d)/n,a=d,r=c):k?(a=y?d:a,S=((r=M?c:r)-a)/(n=g-1)):(n=(r-a)/S,n=(0,s.aK)(n,Math.round(n),S/1e3)?Math.round(n):Math.ceil(n));let P=Math.max((0,s.aL)(S),(0,s.aL)(a));i=Math.pow(10,(0,s.k)(u)?P:u),a=Math.round(a*i)/i,r=Math.round(r*i)/i;let D=0;for(y&&(m&&a!==d?(o.push({value:d}),a0?i:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=(0,s.g)(t)?Math.max(0,t):null,this.max=(0,s.g)(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,a=this.max,r=e=>i=t?i:e,n=t=>a=e?a:t,o=(t,e)=>Math.pow(10,Math.floor((0,s.z)(t))+e);i===a&&(i<=0?(r(1),n(10)):(r(o(i,-1)),n(o(a,1)))),i<=0&&r(o(a,-1)),a<=0&&n(o(i,1)),this._zero&&this.min!==this._suggestedMin&&i===o(this.min,0)&&r(o(i,-1)),this.min=i,this.max=a}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},i=function(t,e){let i=Math.floor((0,s.z)(e.max)),a=Math.ceil(e.max/Math.pow(10,i)),r=[],n=(0,s.B)(t.min,Math.pow(10,Math.floor((0,s.z)(e.min)))),o=Math.floor((0,s.z)(n)),l=Math.floor(n/Math.pow(10,o)),h=o<0?Math.pow(10,Math.abs(o)):1;do r.push({value:n,major:eW(n)}),10==++l&&(l=1,h=++o>=0?1:h),n=Math.round(l*Math.pow(10,o)*h)/h;while(oa?{start:e-i,end:e}:{start:e,end:e+i}}function eY(t,e,i,a){let{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,s.T);else{let n=t.getPointPosition(0,e);r.moveTo(n.x,n.y);for(let o=1;o{let i=(0,s.C)(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){let t=this.options;t.display&&t.pointLabels.display?function(t){let e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),a=[],r=[],n=t._pointLabels.length,o=t.options.pointLabels,l=o.centerPointLabels?s.P/n:0;for(let h=0;he.r&&(o=(s.end-e.r)/r,t.r=Math.max(t.r,e.r+o)),a.starte.b&&(l=(a.end-e.b)/n,t.b=Math.max(t.b,e.b+l))}(i,e,m,x,_)}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){let a=[],r=t._pointLabels.length,n=t.options,o=e$(n)/2,l=t.drawingArea,h=n.pointLabels.centerPointLabels?s.P/r:0;for(let d=0;d270||m<90)&&(c-=u),c),_=0===m||180===m?"center":m<180?"left":"right",v=(g=f.x,p=b.w,"right"===_?g-=p:"center"===_&&(g-=p/2),g);a.push({x:f.x,y:x,textAlign:_,left:v,top:x,right:v+b.w,bottom:x+b.h})}return a}(t,a,r)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){let e=s.T/(this._pointLabels.length||1),i=this.options.startAngle||0;return(0,s.az)(t*e+(0,s.t)(i))}getDistanceFromCenterForValue(t){if((0,s.k)(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if((0,s.k)(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t=0;r--){let n=a.setContext(t.getPointLabelContext(r)),o=(0,s.O)(n.font),{x:l,y:h,textAlign:d,left:c,top:u,right:g,bottom:p}=t._pointLabelItems[r],{backdropColor:f}=n;if(!(0,s.k)(f)){let m=(0,s.ax)(n.borderRadius),b=(0,s.K)(n.backdropPadding);i.fillStyle=f;let x=c-b.left,_=u-b.top,v=g-c+b.width,y=p-u+b.height;Object.values(m).some(t=>0!==t)?(i.beginPath(),(0,s.av)(i,{x:x,y:_,w:v,h:y,radius:m}),i.fill()):i.fillRect(x,_,v,y)}(0,s.M)(i,t._pointLabels[r],l,h+o.lineHeight/2,o,{color:n.color,textAlign:d,textBaseline:"middle"})}}(this,l),o.display&&this.ticks.forEach((t,i)=>{if(0!==i){e=this.getDistanceFromCenterForValue(t.value);let s=o.setContext(this.getContext(i-1));!function(t,e,i,s){let a=t.ctx,r=e.circular,{color:n,lineWidth:o}=e;(r||s)&&n&&o&&!(i<0)&&(a.save(),a.strokeStyle=n,a.lineWidth=o,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),eY(t,i,r,s),a.closePath(),a.stroke(),a.restore())}(this,s,e,l)}}),n.display){for(a.save(),t=l-1;t>=0;t--){let h=n.setContext(this.getPointLabelContext(t)),{color:d,lineWidth:c}=h;c&&d&&(a.lineWidth=c,a.strokeStyle=d,a.setLineDash(h.borderDash),a.lineDashOffset=h.borderDashOffset,e=this.getDistanceFromCenterForValue(r.ticks.reverse?this.min:this.max),i=this.getPointPosition(t,e),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(i.x,i.y),a.stroke())}a.restore()}}drawBorder(){}drawLabels(){let t,e;let i=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;let n=this.getIndexAngle(0);i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(n),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((n,o)=>{if(0===o&&!a.reverse)return;let l=r.setContext(this.getContext(o)),h=(0,s.O)(l.font);if(t=this.getDistanceFromCenterForValue(this.ticks[o].value),l.showLabelBackdrop){i.font=h.string,e=i.measureText(n.label).width,i.fillStyle=l.backdropColor;let d=(0,s.K)(l.backdropPadding);i.fillRect(-e/2-d.left,-t-h.size/2-d.top,e+d.width,h.size+d.height)}(0,s.M)(i,n.label,0,-t,h,{color:l.color})}),i.restore()}drawTitle(){}}eK.id="radialLinear",eK.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:F.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},eK.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},eK.descriptors={angleLines:{_fallback:"grid"}};let eQ={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},eX=Object.keys(eQ);function eG(t,e){return t-e}function eq(t,e){if((0,s.k)(e))return null;let i=t._adapter,{parser:a,round:r,isoWeekday:n}=t._parseOpts,o=e;return("function"==typeof a&&(o=a(o)),(0,s.g)(o)||(o="string"==typeof a?i.parse(o,a):i.parse(o)),null===o)?null:(r&&(o="week"===r&&((0,s.x)(n)||!0===n)?i.startOf(o,"isoWeek",n):i.startOf(o,r)),+o)}function eJ(t,e,i,s){let a=eX.length;for(let r=eX.indexOf(t);r=e?i[a]:i[r];t[n]=!0}}else t[e]=!0}function e0(t,e,i){let s,a;let r=[],n={},o=e.length;for(s=0;s=0&&(e[r].major=!0);return e}(t,r,n,i):r}class e1 extends j{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){let i=t.time||(t.time={}),a=this._adapter=new G._date(t.adapters.date);a.init(e),(0,s.ac)(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:eq(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,i=t.time.unit||"day",{min:a,max:r,minDefined:n,maxDefined:o}=this.getUserBounds();function l(t){n||isNaN(t.min)||(a=Math.min(a,t.min)),o||isNaN(t.max)||(r=Math.max(r,t.max))}n&&o||(l(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&l(this.getMinMax(!1))),a=(0,s.g)(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),r=(0,s.g)(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){let t=this.options,e=t.time,i=t.ticks,a="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);let r=this.min,n=this.max,o=(0,s.aN)(a,r,n);return this._unit=e.unit||(i.autoSkip?eJ(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(t,e,i,s,a){for(let r=eX.length-1;r>=eX.indexOf(i);r--){let n=eX[r];if(eQ[n].common&&t._adapter.diff(a,s,n)>=e-1)return n}return eX[i?eX.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=eX.indexOf(t)+1,i=eX.length;e+t.value))}initOffsets(t){let e,i,a=0,r=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),a=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),r=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);let n=t.length<3?.5:.25;a=(0,s.E)(a,0,n),r=(0,s.E)(r,0,n),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){let t,e;let i=this._adapter,a=this.min,r=this.max,n=this.options,o=n.time,l=o.unit||eJ(o.minUnit,a,r,this._getLabelCapacity(a)),h=(0,s.v)(o.stepSize,1),d="week"===l&&o.isoWeekday,c=(0,s.x)(d)||!0===d,u={},g=a;if(c&&(g=+i.startOf(g,"isoWeek",d)),g=+i.startOf(g,c?"day":l),i.diff(r,a,l)>1e5*h)throw Error(a+" and "+r+" are too far apart with stepSize of "+h+" "+l);let p="data"===n.ticks.source&&this.getDataTimestamps();for(t=g,e=0;tt-e).map(t=>+t)}getLabelForValue(t){let e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,a){let r=this.options,n=r.time.displayFormats,o=this._unit,l=this._majorUnit,h=o&&n[o],d=l&&n[l],c=i[e],u=l&&d&&c&&c.major,g=this._adapter.format(t,a||(u?d:h)),p=r.ticks.callback;return p?(0,s.C)(p,[g,e,i],this):g}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e0?n:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t=t[l].pos&&e<=t[h].pos&&({lo:l,hi:h}=(0,s.Z)(t,"pos",e)),{pos:a,time:n}=t[l],{pos:r,time:o}=t[h]):(e>=t[l].time&&e<=t[h].time&&({lo:l,hi:h}=(0,s.Z)(t,"time",e)),{time:a,pos:n}=t[l],{time:r,pos:o}=t[h]);let d=r-a;return d?n+(o-n)*(e-a)/d:n}e1.id="time",e1.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class e5 extends e1{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=e2(e,this.min),this._tableRange=e2(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let e,i,s;let{min:a,max:r}=this,n=[],o=[];for(e=0,i=t.length;e=a&&s<=r&&n.push(s);if(n.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(e=0,i=n.length;es({chart:t,initial:e.initial,numSteps:n,currentStep:Math.min(i-e.start,n)}))}_refresh(){this._request||(this._running=!0,this._request=s.r.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{let a;if(!i.running||!i.items.length)return;let n=i.items,r=n.length-1,o=!1;for(;r>=0;--r)(a=n[r])._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),o=!0):(n[r]=n[n.length-1],n.pop());o&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){let e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!!e&&!!e.running&&!!e.items.length}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let i=e.items,s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};let n="transparent",r={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){let a=(0,s.c)(t||n),r=a.valid&&(0,s.c)(e||n);return r&&r.valid?r.mix(a,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class o{constructor(t,e,i,a){let n=e[i];a=(0,s.a)([t.to,a,n,t.from]);let o=(0,s.a)([t.from,n,a]);this._active=!0,this._fn=t.fn||r[t.type||typeof o],this._easing=s.e[t.easing]||s.e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=a,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);let a=this._target[this._prop],n=i-this._start,r=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=(0,s.a)([t.to,e,a,t.from]),this._from=(0,s.a)([t.from,a,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e;let i=t-this._start,s=this._duration,a=this._prop,n=this._from,r=this._loop,o=this._to;if(this._active=n!==o&&(r||i1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[a]=this._fn(n,o,e)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let s=0;s{let n=t[a];if(!(0,s.i)(n))return;let r={};for(let o of e)r[o]=n[o];((0,s.b)(n.properties)&&n.properties||[a]).forEach(t=>{t!==a&&i.has(t)||i.set(t,r)})})}_animateOptions(t,e){let i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i){t.options=e;return}return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}(t,i);if(!s)return[];let a=this._createAnimations(s,i);return i.$shared&&(function(t,e){let i=[],s=Object.keys(e);for(let a=0;a{t.options=i},()=>{}),a}_createAnimations(t,e){let i;let s=this._properties,a=[],n=t.$animations||(t.$animations={}),r=Object.keys(e),l=Date.now();for(i=r.length-1;i>=0;--i){let h=r[i];if("$"===h.charAt(0))continue;if("options"===h){a.push(...this._animateOptions(t,e));continue}let d=e[h],c=n[h],u=s.get(h);if(c){if(u&&c.active()){c.update(u,d,l);continue}c.cancel()}if(!u||!u.duration){t[h]=d;continue}n[h]=c=new o(u,t,h,d),a.push(c)}return a}update(t,e){if(0===this._properties.size){Object.assign(t,e);return}let i=this._createAnimations(t,e);if(i.length)return a.add(this._chart,i),!0}}function h(t,e){let i=t&&t.options||{},s=i.reverse,a=void 0===i.min?e:0,n=void 0===i.max?e:0;return{start:s?n:a,end:s?a:n}}function d(t,e){let i,s;let a=[],n=t._getSortedDatasetMetas(e);for(i=0,s=n.length;i0||!i&&n<0)return a.index}return null}function p(t,e){let i;let{chart:s,_cachedMeta:a}=t,n=s._stacks||(s._stacks={}),{iScale:r,vScale:o,index:l}=a,h=r.axis,d=o.axis,c=`${r.id}.${o.id}.${a.stack||a.type}`,u=e.length;for(let p=0;pi[t].axis===e).shift()}function m(t,e){let i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s)for(let a of e=e||t._parsed){let n=a._stacks;if(!n||void 0===n[s]||void 0===n[s][i])return;delete n[s][i]}}let b=t=>"reset"===t||"none"===t,x=(t,e)=>e?t:Object.assign({},t),_=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:d(i,!0),values:null};class v{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=u(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&m(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),a=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=(0,s.v)(i.xAxisID,f(t,"x")),r=e.yAxisID=(0,s.v)(i.yAxisID,f(t,"y")),o=e.rAxisID=(0,s.v)(i.rAxisID,f(t,"r")),l=e.indexAxis,h=e.iAxisID=a(l,n,r,o),d=e.vAxisID=a(l,r,n,o);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&(0,s.u)(this._data,this),t._stacked&&m(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if((0,s.i)(e))this._data=function(t){let e,i,s;let a=Object.keys(t),n=Array(a.length);for(e=0,i=a.length;e0&&r._parsed[t-1];if(!1===this._parsing)r._parsed=o,r._sorted=!0,n=o;else{n=(0,s.b)(o[t])?this.parseArrayData(r,o,t,e):(0,s.i)(o[t])?this.parseObjectData(r,o,t,e):this.parsePrimitiveData(r,o,t,e);let g=()=>null===a[d]||u&&a[d]e||g=0;--i)if(!p()){this.updateRangeFromParsed(c,t,a,d);break}}return c}getAllParsedValues(t){let e,i,a;let n=this._cachedMeta._parsed,r=[];for(e=0,i=n.length;e=0&&tthis.getContext(i,a),f=h.resolveNamedOptions(u,g,p,c);return f.$shared&&(f.$shared=l,n[r]=Object.freeze(x(f,l))),f}_resolveAnimations(t,e,i){let s;let a=this.chart,n=this._cachedDataOpts,r=`animation-${e}`,o=n[r];if(o)return o;if(!1!==a.options.animation){let h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),c=h.getOptionScopes(this.getDataset(),d);s=h.createResolver(c,this.getContext(t,i,e))}let u=new l(a,s&&s.animations);return s&&s._cacheable&&(n[r]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||b(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,a=this.getSharedOptions(i),n=this.includeOptions(e,a)||a!==s;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:n}}updateElement(t,e,i,s){b(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!b(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;let a=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[s,a,n]of this._syncList)this[s](a,n);this._syncList=[];let r=i.length,o=e.length,l=Math.min(o,r);l&&this.parse(0,l),o>r?this._insertElements(r,o-r,t):o{for(t.length+=e,s=t.length-1;s>=r;s--)t[s]=t[s-e]};for(o(n),s=t;sMath.abs(o)&&(l=o,h=r),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:a,end:n,min:r,max:o}}(t,e,i,a):e[i.axis]=i.parse(t,a),e}function M(t,e,i,s){let a,n,r,o;let l=t.iScale,h=t.vScale,d=l.getLabels(),c=l===h,u=[];for(a=i,n=i+s;a"spacing"!==t,_indexable:t=>"spacing"!==t};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((e,a)=>{let n=t.getDatasetMeta(0),r=n.controller.getStyle(a);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let i=this.getDataset().data,a=this._cachedMeta;if(!1===this._parsing)a._parsed=i;else{let n,r,o=t=>+i[t];if((0,s.i)(i[t])){let{key:l="value"}=this._parsing;o=t=>+(0,s.f)(i[t],l)}for(n=t,r=t+e;n(0,s.p)(e,t,l,!0)?1:Math.max(a,a*i,n,n*i),p=(e,a,n)=>(0,s.p)(e,t,l,!0)?-1:Math.min(a,a*i,n,n*i),f=g(0,h,c),m=g(s.H,d,u),b=p(s.P,h,c),x=p(s.P+s.H,d,u);a=(f-b)/2,n=(m-x)/2,r=-(f+b)/2,o=-(m+x)/2}return{ratioX:a,ratioY:n,offsetX:r,offsetY:o}}(c,d,l),m=(i.width-r)/u,b=(i.height-r)/g,x=(0,s.n)(this.options.radius,Math.max(Math.min(m,b)/2,0)),_=(x-Math.max(x*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*x,this.offsetY=f*x,a.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){let i=this.options,a=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===a._parsed[t]||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*n/s.T)}updateElements(t,e,i,s){let a;let n="reset"===s,r=this.chart,o=r.chartArea,l=r.options,h=l.animation,d=(o.left+o.right)/2,c=(o.top+o.bottom)/2,u=n&&h.animateScale,g=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:f,includeOptions:m}=this._getSharedOptions(e,s),b=this._getRotation();for(a=0;a0&&!isNaN(t)?s.T*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,a=i.data.labels||[],n=(0,s.o)(e._parsed[t],i.options.locale);return{label:a[t]||"",value:n}}getMaxBorderWidth(t){let e,i,s,a,n,r=0,o=this.chart;if(!t){for(e=0,i=o.data.datasets.length;et.x,n="left",r="right"):(a=t.baset.controller.options.grouped),n=i.options.stacked,r=[],o=t=>{let i=t.controller.getParsed(e),a=i&&i[t.vScale.axis];if((0,s.k)(a)||isNaN(a))return!0};for(let l of a)if(!(void 0!==e&&o(l))&&((!1===n||-1===r.indexOf(l.stack)||void 0===n&&void 0===l.stack)&&r.push(l.stack),l.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){let s=this._getStacks(t,i),a=void 0!==e?s.indexOf(e):-1;return -1===a?s.length-1:a}_getRuler(){let t,e;let i=this.options,a=this._cachedMeta,n=a.iScale,r=[];for(t=0,e=a.data.length;tt-e))}return t._cache.$bar}(r,t.type),l=r._length,h=()=>{32767!==a&&-32768!==a&&((0,s.h)(n)&&(l=Math.min(l,Math.abs(a-n)||l)),n=a)};for(e=0,i=o.length;e=l?1:-1))*o,u===l&&(m-=i/2);let x=a.getPixelForDecimal(0),_=a.getPixelForDecimal(1);e=(m=Math.max(Math.min(m,Math.max(x,_)),Math.min(x,_)))+i}if(m===a.getPixelForValue(l)){let v=(0,s.s)(i)*a.getLineWidthForValue(l)/2;m+=v,i-=v}return{size:i,base:m,head:e,center:e+i/2}}_calculateBarIndexPixels(t,e){let i,a;let n=e.scale,r=this.options,o=r.skipNull,l=(0,s.v)(r.maxBarThickness,1/0);if(e.grouped){let h=o?this._getStackCount(t):e.stackCount,d="flex"===r.barThickness?function(t,e,i,s){let a=e.pixels,n=a[t],r=t>0?a[t-1]:null,o=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=e,n=this.getParsed(t),r=s.getLabelForValue(n.x),o=a.getLabelForValue(n.y),l=n._custom;return{label:i[t]||"",value:"("+r+", "+o+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){let a="reset"===s,{iScale:n,vScale:r}=this._cachedMeta,{sharedOptions:o,includeOptions:l}=this._getSharedOptions(e,s),h=n.axis,d=r.axis;for(let c=e;c0&&this.getParsed(e-1);for(let y=0;y<_;++y){let M=t[y],w=b?M:{};if(y=x){w.skip=!0;continue}let k=this.getParsed(y),S=(0,s.k)(k[g]),P=w[u]=r.getPixelForValue(k[u],y),D=w[g]=n||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,k,l):k[g],y);w.skip=isNaN(P)||isNaN(D)||S,w.stop=y>0&&Math.abs(k[u]-v[u])>m,f&&(w.parsed=k,w.raw=h.data[y]),c&&(w.options=d||this.resolveDataElementOptions(y,M.active?"active":a)),b||this.updateElement(M,y,w,a),v=k}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;let a=s[0].size(this.resolveDataElementOptions(0)),n=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,a,n)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PolarAreaController:class extends v{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((e,a)=>{let n=t.getDatasetMeta(0),r=n.controller.getStyle(a);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,a=i.data.labels||[],n=(0,s.o)(e._parsed[t].r,i.options.locale);return{label:a[t]||"",value:n}}parseObjectData(t,e,i,a){return s.y.bind(this)(t,e,i,a)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,i)=>{let s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(s/2,0),n=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),r=(a-n)/t.getVisibleDatasetCount();this.outerRadius=a-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,a){let n;let r="reset"===a,o=this.chart,l=o.options,h=l.animation,d=this._cachedMeta.rScale,c=d.xCenter,u=d.yCenter,g=d.getIndexAngle(0)-.5*s.P,p=g,f=360/this.countVisibleElements();for(n=0;n{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?(0,s.t)(this.resolveDataElementOptions(t,e).angle||i):0}},PieController:class extends P{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},RadarController:class extends v{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){let e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,a){return s.y.bind(this)(t,e,i,a)}update(t){let e=this._cachedMeta,i=e.dataset,s=e.data||[],a=e.iScale.getLabels();if(i.points=s,"resize"!==t){let n=this.resolveDatasetElementOptions(t);this.options.showLine||(n.borderWidth=0);let r={_loop:!0,_fullLoop:a.length===s.length,options:n};this.updateElement(i,void 0,r,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){let a=this._cachedMeta.rScale,n="reset"===s;for(let r=e;r0&&this.getParsed(e-1);for(let v=e;v0&&Math.abs(M[g]-_[g])>b,m&&(w.parsed=M,w.raw=h.data[v]),u&&(w.options=c||this.resolveDataElementOptions(v,y.active?"active":a)),x||this.updateElement(y,v,w,a),_=M}this.updateSharedOptions(c,a,d)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let i=0;for(let s=e.length-1;s>=0;--s)i=Math.max(i,e[s].size(this.resolveDataElementOptions(s))/2);return i>0&&i}let a=t.dataset,n=a.options&&a.options.borderWidth||0;if(!e.length)return n;let r=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,r,o)/2}}});function C(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class L{static override(t){Object.assign(L.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return C()}parse(){return C()}format(){return C()}add(){return C()}diff(){return C()}startOf(){return C()}endOf(){return C()}}var E={_date:L};function O(t,e,i,a,n){let r=t.getSortedVisibleDatasetMetas(),o=i[e];for(let l=0,h=r.length;l{t[r](e[i],a)&&(n.push({element:t,datasetIndex:s,index:l}),o=o||t.inRange(e.x,e.y,a))}),s&&!o)?[]:n}var z={evaluateInteractionItems:O,modes:{index(t,e,i,a){let n=(0,s.z)(e,t),r=i.axis||"x",o=i.includeInvisible||!1,l=i.intersect?A(t,n,r,a,o):T(t,n,r,!1,a,o),h=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{let e=l[0].index,i=t.data[e];i&&!i.skip&&h.push({element:i,datasetIndex:t.index,index:e})}),h):[]},dataset(t,e,i,a){let n=(0,s.z)(e,t),r=i.axis||"xy",o=i.includeInvisible||!1,l=i.intersect?A(t,n,r,a,o):T(t,n,r,!1,a,o);if(l.length>0){let h=l[0].datasetIndex,d=t.getDatasetMeta(h).data;l=[];for(let c=0;ct.pos===e)}function V(t,e){return t.filter(t=>-1===R.indexOf(t.pos)&&t.box.axis===e)}function B(t,e){return t.sort((t,i)=>{let s=e?i:t,a=e?t:i;return s.weight===a.weight?s.index-a.index:s.weight-a.weight})}function N(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function H(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function j(t,e,i,a){let n,r,o,l,h,d;let c=[];for(n=0,r=t.length,h=0;n{s[t]=Math.max(e[t],i[t])}),s}(t?["left","right"]:["top","bottom"])}(o.horizontal,e));let{same:u,other:g}=function(t,e,i,a){let{pos:n,box:r}=i,o=t.maxPadding;if(!(0,s.i)(n)){i.size&&(t[n]-=i.size);let l=a[i.stack]||{size:0,count:1};l.size=Math.max(l.size,i.horizontal?r.height:r.width),i.size=l.size/l.count,t[n]+=i.size}r.getPadding&&H(o,r.getPadding());let h=Math.max(0,e.outerWidth-N(o,t,"left","right")),d=Math.max(0,e.outerHeight-N(o,t,"top","bottom")),c=h!==t.w,u=d!==t.h;return t.w=h,t.h=d,i.horizontal?{same:c,other:u}:{same:u,other:c}}(e,i,o,a);h|=u&&c.length,d=d||g,l.fullSize||c.push(o)}return h&&j(c,e,i,a)||d}function W(t,e,i,s,a){t.top=i,t.left=e,t.right=e+s,t.bottom=i+a,t.width=s,t.height=a}function $(t,e,i,a){let n=i.padding,{x:r,y:o}=e;for(let l of t){let h=l.box,d=a[l.stack]||{count:1,placed:0,weight:1},c=l.stackWeight/d.weight||1;if(l.horizontal){let u=e.w*c,g=d.size||h.height;(0,s.h)(d.start)&&(o=d.start),h.fullSize?W(h,n.left,o,i.outerWidth-n.right-n.left,g):W(h,e.left+d.placed,o,u,g),d.start=o,d.placed+=u,o=h.bottom}else{let p=e.h*c,f=d.size||h.width;(0,s.h)(d.start)&&(r=d.start),h.fullSize?W(h,r,n.top,f,i.outerHeight-n.bottom-n.top):W(h,r,e.top+d.placed,f,p),d.start=r,d.placed+=p,r=h.right}}e.x=r,e.y=o}var U={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){let i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,a){if(!t)return;let n=(0,s.E)(t.options.layout.padding),r=Math.max(e-n.width,0),o=Math.max(i-n.height,0),l=function(t){let e=function(t){let e,i,s,a,n,r;let o=[];for(e=0,i=(t||[]).length;et.box.fullSize),!0),s=B(I(e,"left"),!0),a=B(I(e,"right")),n=B(I(e,"top"),!0),r=B(I(e,"bottom")),o=V(e,"x"),l=V(e,"y");return{fullSize:i,leftAndTop:s.concat(n),rightAndBottom:a.concat(l).concat(r).concat(o),chartArea:I(e,"chartArea"),vertical:s.concat(a).concat(l),horizontal:n.concat(r).concat(o)}}(t.boxes),h=l.vertical,d=l.horizontal;(0,s.F)(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});let c=h.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/c,hBoxMaxHeight:o/2}),g=Object.assign({},n);H(g,(0,s.E)(a));let p=Object.assign({maxPadding:g,w:r,h:o,x:n.left,y:n.top},n),f=function(t,e){let i,s,a;let n=function(t){let e={};for(let i of t){let{stack:s,pos:a,stackWeight:n}=i;if(!s||!R.includes(a))continue;let r=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=n}return e}(t),{vBoxMaxWidth:r,hBoxMaxHeight:o}=e;for(i=0,s=t.length;i{let i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Y{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Q extends Y{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let X="$chartjs",q={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},G=t=>null===t||""===t,K=!!s.K&&{passive:!0};function J(t,e,i){t.canvas.removeEventListener(e,i,K)}function Z(t,e){for(let i of t)if(i===e||i.contains(e))return!0}function tt(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let a of t)e=(e=e||Z(a.addedNodes,s))&&!Z(a.removedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function te(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let a of t)e=(e=e||Z(a.removedNodes,s))&&!Z(a.addedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}let ti=new Map,ts=0;function ta(){let t=window.devicePixelRatio;t!==ts&&(ts=t,ti.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function tn(t,e,i){let a=t.canvas,n=a&&(0,s.I)(a);if(!n)return;let r=(0,s.L)((t,e)=>{let s=n.clientWidth;i(t,e),s{let e=t[0],i=e.contentRect.width,s=e.contentRect.height;(0!==i||0!==s)&&r(i,s)});return o.observe(n),ti.size||window.addEventListener("resize",ta),ti.set(t,r),o}function tr(t,e,i){i&&i.disconnect(),"resize"===e&&(ti.delete(t),ti.size||window.removeEventListener("resize",ta))}function to(t,e,i){let a=t.canvas,n=(0,s.L)(e=>{null!==t.ctx&&i(function(t,e){let i=q[t.type]||t.type,{x:a,y:n}=(0,s.z)(t,e);return{type:i,chart:e,native:t,x:void 0!==a?a:null,y:void 0!==n?n:null}}(e,t))},t);return!function(t,e,i){t.addEventListener(e,i,K)}(a,e,n),n}class tl extends Y{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(!function(t,e){let i=t.style,a=t.getAttribute("height"),n=t.getAttribute("width");if(t[X]={initial:{height:a,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",G(n)){let r=(0,s.J)(t,"width");void 0!==r&&(t.width=r)}if(G(a)){if(""===t.style.height)t.height=t.width/(e||2);else{let o=(0,s.J)(t,"height");void 0!==o&&(t.height=o)}}}(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[X])return!1;let i=e[X].initial;["height","width"].forEach(t=>{let a=i[t];(0,s.k)(a)?e.removeAttribute(t):e.setAttribute(t,a)});let a=i.style||{};return Object.keys(a).forEach(t=>{e.style[t]=a[t]}),e.width=e.width,delete e[X],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={});s[e]=(({attach:tt,detach:te,resize:tn})[e]||to)(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];s&&((({attach:tr,detach:tr,resize:tr})[e]||J)(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,a){return(0,s.G)(t,e,i,a)}isAttached(t){let e=(0,s.I)(t);return!!(e&&e.isConnected)}}class th{static defaults={};static defaultRoutes=void 0;active=!1;tooltipPosition(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return(0,s.x)(this.x)&&(0,s.x)(this.y)}getProps(t,e){let i=this.$animations;if(!e||!i)return this;let s={};return t.forEach(t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),s}}function td(t,e,i,a,n){let r,o,l;let h=(0,s.v)(a,0),d=Math.min((0,s.v)(n,t.length),t.length),c=0;for(i=Math.ceil(i),n&&(i=(r=n-a)/Math.floor(r/i)),l=h;l<0;)l=Math.round(h+ ++c*i);for(o=Math.max(h,0);o"left"===t?"right":"right"===t?"left":t,tu=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function tg(t,e){let i=[],s=t.length/e,a=t.length,n=0;for(;na?a:i,a=n&&i>a?i:a,{min:(0,s.O)(i,(0,s.O)(a,i)),max:(0,s.O)(a,(0,s.O)(i,a))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,s.Q)(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:a,grace:n,ticks:r}=this.options,o=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,s.R)(this,n,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=on)return function(t,e,i,s){let a,n=0,r=i[0];for(a=0,s=Math.ceil(s);an)return h}return Math.max(n,1)}(r,e,n);if(o>0){let u,g;let p=o>1?Math.round((h-l)/(o-1)):null;for(td(e,d,c,(0,s.k)(p)?0:l-p,l),u=0,g=o-1;u=l||r<=1||!this.isHorizontal()){this.labelRotation=o;return}let d=this._getLabelSizes(),c=d.widest.width,u=d.highest.height,g=(0,s.S)(this.chart.width-c,0,this.maxWidth);c+6>(t=a.offset?this.maxWidth/r:g/(r-1))&&(t=g/(r-(a.offset?.5:1)),e=this.maxHeight-tp(a.grid)-n.padding-tf(a.title,this.chart.options.font),i=Math.sqrt(c*c+u*u),h=Math.max(o,Math.min(l,h=(0,s.U)(Math.min(Math.asin((0,s.S)((d.highest.height+6)/t,-1,1)),Math.asin((0,s.S)(e/i,-1,1))-Math.asin((0,s.S)(u/i,-1,1))))))),this.labelRotation=h}afterCalculateLabelRotation(){(0,s.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,s.Q)(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:a,grid:n}}=this,r=this._isVisible(),o=this.isHorizontal();if(r){let l=tf(a,e.options.font);if(o?(t.width=this.maxWidth,t.height=tp(n)+l):(t.height=this.maxHeight,t.width=tp(n)+l),i.display&&this.ticks.length){let{first:h,last:d,widest:c,highest:u}=this._getLabelSizes(),g=2*i.padding,p=(0,s.t)(this.labelRotation),f=Math.cos(p),m=Math.sin(p);if(o){let b=i.mirror?0:m*c.width+f*u.height;t.height=Math.min(this.maxHeight,t.height+b+g)}else{let x=i.mirror?0:f*c.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+x+g)}this._calculatePadding(h,d,m,f)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){let{ticks:{align:a,padding:n},position:r}=this.options,o=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),c=0,u=0;o?l?(c=s*t.width,u=i*e.height):(c=i*t.height,u=s*e.width):"start"===a?u=e.width:"end"===a?c=t.width:"inner"!==a&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-h+n)*this.width/(this.width-h),0),this.paddingRight=Math.max((u-d+n)*this.width/(this.width-d),0)}else{let g=e.height/2,p=t.height/2;"start"===a?(g=0,p=t.height):"end"===a&&(g=e.height,p=0),this.paddingTop=g+n,this.paddingBottom=p+n}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,s.Q)(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{let i;let s=t.gc,a=s.length/2;if(a>e){for(i=0;i({width:m[t]||0,height:b[t]||0});return{first:M(0),last:M(e-1),widest:M(v),highest:M(y),widths:m,heights:b}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return(0,s.W)(this._alignToPixels?(0,s.X)(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){var e,i;let a=this.ticks||[];if(t>=0&&to*a?o/i:l/a:l*a0}_computeGridLineItems(t){let e,i,a,n,r,o,l,h,d,c,u,g;let p=this.axis,f=this.chart,m=this.options,{grid:b,position:x,border:_}=m,v=b.offset,y=this.isHorizontal(),M=this.ticks,w=M.length+(v?1:0),k=tp(b),S=[],P=_.setContext(this.getContext()),D=P.display?P.width:0,C=D/2,L=function(t){return(0,s.X)(f,t,D)};if("top"===x)e=L(this.bottom),o=this.bottom-k,h=e-C,c=L(t.top)+C,g=t.bottom;else if("bottom"===x)e=L(this.top),c=t.top,g=L(t.bottom)-C,o=e+C,h=this.top+k;else if("left"===x)e=L(this.right),r=this.right-k,l=e-C,d=L(t.left)+C,u=t.right;else if("right"===x)e=L(this.left),d=t.left,u=L(t.right)-C,r=e+C,l=this.left+k;else if("x"===p){if("center"===x)e=L((t.top+t.bottom)/2+.5);else if((0,s.i)(x)){let E=Object.keys(x)[0],O=x[E];e=L(this.chart.scales[E].getPixelForValue(O))}c=t.top,g=t.bottom,h=(o=e+C)+k}else if("y"===p){if("center"===x)e=L((t.left+t.right)/2);else if((0,s.i)(x)){let A=Object.keys(x)[0],T=x[A];e=L(this.chart.scales[A].getPixelForValue(T))}l=(r=e-C)-k,d=t.left,u=t.right}let F=(0,s.v)(m.ticks.maxTicksLimit,w),z=Math.max(1,Math.ceil(w/F));for(i=0;io+1e-6)))return l}(this,i,v))&&(n=(0,s.X)(f,a,B),y?r=l=d=u=n:o=h=c=g=n,S.push({tx1:r,ty1:o,tx2:l,ty2:h,x1:d,y1:c,x2:u,y2:g,width:B,color:N,borderDash:H,borderDashOffset:j,tickWidth:W,tickColor:$,tickBorderDash:U,tickBorderDashOffset:Y}))}return this._ticksLength=w,this._borderValue=e,S}_computeLabelItems(t){let e,i,a,n,r,o,l,h,d,c,u;let g=this.axis,p=this.options,{position:f,ticks:m}=p,b=this.isHorizontal(),x=this.ticks,{align:_,crossAlign:v,padding:y,mirror:M}=m,w=tp(p.grid),k=w+y,S=M?-y:k,P=-(0,s.t)(this.labelRotation),D=[],C="middle";if("top"===f)r=this.bottom-S,o=this._getXAxisLabelAlignment();else if("bottom"===f)r=this.top+S,o=this._getXAxisLabelAlignment();else if("left"===f){let L=this._getYAxisLabelAlignment(w);o=L.textAlign,n=L.x}else if("right"===f){let E=this._getYAxisLabelAlignment(w);o=E.textAlign,n=E.x}else if("x"===g){if("center"===f)r=(t.top+t.bottom)/2+k;else if((0,s.i)(f)){let O=Object.keys(f)[0],A=f[O];r=this.chart.scales[O].getPixelForValue(A)+k}o=this._getXAxisLabelAlignment()}else if("y"===g){if("center"===f)n=(t.left+t.right)/2-k;else if((0,s.i)(f)){let T=Object.keys(f)[0],F=f[T];n=this.chart.scales[T].getPixelForValue(F)}o=this._getYAxisLabelAlignment(w).textAlign}"y"===g&&("start"===_?C="top":"end"===_&&(C="bottom"));let z=this._getLabelSizes();for(e=0,i=x.length;ee.value===t);if(s>=0){let a=e.setContext(this.getContext(s));return a.lineWidth}return 0}drawGrid(t){let e,i;let s=this.options.grid,a=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),r=(t,e,i)=>{i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(s.display)for(e=0,i=n.length;e{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){let e,i;let s=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",n=[];for(e=0,i=s.length;e{let a=i.split("."),n=a.pop(),r=[t].concat(a).join("."),o=e[i].split("."),l=o.pop(),h=o.join(".");s.d.route(r,n,h,l)})}(e,t.defaultRoutes),t.descriptors&&s.d.describe(e,t.descriptors)}(t,r,e),this.override&&s.d.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){let e=this.items,i=t.id,a=this.scope;i in e&&delete e[i],a&&i in s.d[a]&&(delete s.d[a][i],this.override&&delete s.a3[i])}}var tx=new class{constructor(){this.controllers=new tb(v,"datasets",!0),this.elements=new tb(th,"elements"),this.plugins=new tb(Object,"plugins"),this.scales=new tb(tm,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{let a=i||this._getRegistryForType(e);i||a.isForType(e)||a===this.plugins&&e.id?this._exec(t,a,e):(0,s.F)(e,e=>{let s=i||this._getRegistryForType(e);this._exec(t,s,e)})})}_exec(t,e,i){let a=(0,s.a5)(t);(0,s.Q)(i["before"+a],[],i),e[t](i),(0,s.Q)(i["after"+a],[],i)}_getRegistryForType(t){for(let e=0;et.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function tv(t,e){let i=s.d.datasets[t]||{},a=(e.datasets||{})[t]||{};return a.indexAxis||e.indexAxis||i.indexAxis||"x"}function ty(t,e){var i;if("x"===t||"y"===t||"r"===t||(t=e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&ty(t[0].toLowerCase(),e)))return t;throw Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function tM(t){let e=t.options||(t.options={});e.plugins=(0,s.v)(e.plugins,{}),e.scales=function(t,e){let i=s.a3[t.type]||{scales:{}},a=e.scales||{},n=tv(t.type,e),r=Object.create(null);return Object.keys(a).forEach(t=>{let e=a[t];if(!(0,s.i)(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);let o=ty(t,e),l=i.scales||{};r[t]=(0,s.ab)(Object.create(null),[{axis:o},e,l[o],l[o===n?"_index_":"_value_"]])}),t.data.datasets.forEach(i=>{let n=i.type||t.type,o=i.indexAxis||tv(n,e),l=s.a3[n]||{},h=l.scales||{};Object.keys(h).forEach(t=>{let e;let n=(e=t,"_index_"===t?e=o:"_value_"===t&&(e="x"===o?"y":"x"),e),l=i[n+"AxisID"]||n;r[l]=r[l]||Object.create(null),(0,s.ab)(r[l],[{axis:n},a[l],h[t]])})}),Object.keys(r).forEach(t=>{let e=r[t];(0,s.ab)(e,[s.d.scales[e.type],s.d.scale])}),r}(t,e)}function tw(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}let tk=new Map,tS=new Set;function tP(t,e){let i=tk.get(t);return i||(i=e(),tk.set(t,i),tS.add(i)),i}let tD=(t,e,i)=>{let a=(0,s.f)(e,i);void 0!==a&&t.add(a)};class tC{constructor(t){var e;this._config=((e=(e=t)||{}).data=tw(e.data),tM(e),e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=tw(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),tM(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tP(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return tP(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return tP(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return tP(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let i=this._scopeCache,s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){let{options:a,type:n}=this,r=this._cachedScopes(t,i),o=r.get(e);if(o)return o;let l=new Set;e.forEach(e=>{t&&(l.add(t),e.forEach(e=>tD(l,t,e))),e.forEach(t=>tD(l,a,t)),e.forEach(t=>tD(l,s.a3[n]||{},t)),e.forEach(t=>tD(l,s.d,t)),e.forEach(t=>tD(l,s.a6,t))});let h=Array.from(l);return 0===h.length&&h.push(Object.create(null)),tS.has(e)&&r.set(e,h),h}chartOptionScopes(){let{options:t,type:e}=this;return[t,s.a3[e]||{},s.d.datasets[e]||{},{type:e},s.d,s.a6]}resolveNamedOptions(t,e,i,a=[""]){let n={$shared:!0},{resolver:r,subPrefixes:o}=tL(this._resolverCache,t,a),l=r;if(function(t,e){let{isScriptable:i,isIndexable:a}=(0,s.aa)(t);for(let n of e){let r=i(n),o=a(n),l=(o||r)&&t[n];if(r&&((0,s.a7)(l)||tE(l))||o&&(0,s.b)(l))return!0}return!1}(r,e)){n.$shared=!1,i=(0,s.a7)(i)?i():i;let h=this.createResolver(t,i,o);l=(0,s.a8)(r,i,h)}for(let d of e)n[d]=l[d];return n}createResolver(t,e,i=[""],a){let{resolver:n}=tL(this._resolverCache,t,i);return(0,s.i)(e)?(0,s.a8)(n,e,void 0,a):n}}function tL(t,e,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let n=i.join(),r=a.get(n);if(!r){let o=(0,s.a9)(e,i);r={resolver:o,subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},a.set(n,r)}return r}let tE=t=>(0,s.i)(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||(0,s.a7)(t[i]),!1),tO=["top","bottom","left","right","chartArea"];function tA(t,e){return"top"===t||"bottom"===t||-1===tO.indexOf(t)&&"x"===e}function tT(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function tF(t){let e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),(0,s.Q)(i&&i.onComplete,[t],e)}function tz(t){let e=t.chart,i=e.options.animation;(0,s.Q)(i&&i.onProgress,[t],e)}function tR(t){return(0,s.M)()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}let tI={},tV=t=>{let e=tR(t);return Object.values(tI).filter(t=>t.canvas===e).pop()};class tB{static defaults=s.d;static instances=tI;static overrides=s.a3;static registry=tx;static version="4.0.1";static getChart=tV;static register(...t){tx.add(...t),tN()}static unregister(...t){tx.remove(...t),tN()}constructor(t,e){let i=this.config=new tC(e),n=tR(t),r=tV(n);if(r)throw Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");let o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||(!(0,s.M)()||"undefined"!=typeof OffscreenCanvas&&n instanceof OffscreenCanvas?Q:tl)),this.platform.updateConfig(i);let l=this.platform.acquireContext(n,o.aspectRatio),h=l&&l.canvas,d=h&&h.height,c=h&&h.width;if(this.id=(0,s.ac)(),this.ctx=l,this.canvas=h,this.width=c,this.height=d,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new t_,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,s.ad)(t=>this.update(t),o.resizeDelay||0),this._dataChanges=[],tI[this.id]=this,!l||!h){console.error("Failed to create chart: can't acquire context from the given item");return}a.listen(this,"complete",tF),a.listen(this,"progress",tz),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:a,_aspectRatio:n}=this;return(0,s.k)(t)?e&&n?n:a?i/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return tx}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,s.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,s.af)(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,a=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(a,t,e,n),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,(0,s.ae)(this,o,!0)&&(this.notifyPlugins("resize",{size:r}),(0,s.Q)(i.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let t=this.options,e=t.scales||{};(0,s.F)(e,(t,e)=>{t.id=e})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,a=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{}),n=[];e&&(n=n.concat(Object.keys(e).map(t=>{let i=e[t],s=ty(t,i),a="r"===s,n="x"===s;return{options:i,dposition:a?"chartArea":n?"bottom":"left",dtype:a?"radialLinear":n?"category":"linear"}}))),(0,s.F)(n,e=>{let n=e.options,r=n.id,o=ty(r,n),l=(0,s.v)(n.type,e.dtype);(void 0===n.position||tA(n.position,o)!==tA(e.dposition))&&(n.position=e.dposition),a[r]=!0;let h=null;if(r in i&&i[r].type===l)h=i[r];else{let d=tx.getScale(l);i[(h=new d({id:r,type:l,ctx:this.ctx,chart:this})).id]=h}h.init(n,t)}),(0,s.F)(a,(t,e)=>{t||delete i[e]}),(0,s.F)(i,t=>{U.configure(this,t,t.options),U.addBox(this,t)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let s=e;se.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){let t,e;let i=[],a=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=a.length;t{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;let n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let o=0,l=this.data.datasets.length;o{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(tT("z","_idx"));let{_active:c,_lastEvent:u}=this;u?this._eventHandler(u,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){(0,s.F)(this.scales,t=>{U.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(0,s.ag)(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:i,start:s,count:a}of e){let n="_removeElements"===i?-a:a;!function(t,e,i){let s=Object.keys(t);for(let a of s){let n=+a;if(n>=e){let r=t[a];delete t[a],(i>0||n>e)&&(t[n+i]=r)}}}(t,s,n)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),a=i(0);for(let n=1;nt.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;U.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],(0,s.F)(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i=t._clip,a=!i.disabled,n=function(t){let{xScale:e,yScale:i}=t;if(e&&i)return{left:e.left,right:e.right,top:i.top,bottom:i.bottom}}(t)||this.chartArea,r={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(a&&(0,s.Y)(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),a&&(0,s.$)(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return(0,s.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){let a=z.modes[e];return"function"==typeof a?a(this,t,i,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,s=i.filter(t=>t&&t._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=(0,s.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){let i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let a=i?"show":"hide",n=this.getDatasetMeta(t),r=n.controller._resolveAnimations(void 0,a);(0,s.h)(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(n,{visible:i}),this.update(e=>e.datasetIndex===t?a:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),a.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},a=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};(0,s.F)(this.options.events,t=>i(t,a))}bindResponsiveEvents(){let t;this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,i=this.platform,s=(t,s)=>{i.addEventListener(this,t,s),e[t]=s},a=(t,s)=>{e[t]&&(i.removeEventListener(this,t,s),delete e[t])},n=(t,e)=>{this.canvas&&this.resize(t,e)},r=()=>{a("attach",r),this.attached=!0,this.resize(),s("resize",n),s("detach",t)};t=()=>{this.attached=!1,a("resize",n),this._stop(),this._resize(0,0),s("attach",r)},i.isAttached(this.canvas)?r():t()}unbindEvents(){(0,s.F)(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},(0,s.F)(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let s,a,n;let r=i?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+r+"DatasetHoverStyle"](),a=0,n=t.length;a{let i=this.getDatasetMeta(t);if(!i)throw Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),a=!(0,s.ah)(i,e);a&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){let s=this.options.hover,a=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),n=a(e,t),r=i?t:a(t,e);n.length&&this.updateHoverStyle(n,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;let a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){var a;let{_active:n=[],options:r}=this,o=this._getActiveElements(t,n,i,e),l=(0,s.ai)(t),h=(a=this._lastEvent,i&&"mouseout"!==t.type?l?a:t:null);i&&(this._lastEvent=null,(0,s.Q)(r.onHover,[t,o,this],this),l&&(0,s.Q)(r.onClick,[t,o,this],this));let d=!(0,s.ah)(o,n);return(d||e)&&(this._active=o,this._updateHoverStyles(o,n,e)),this._lastEvent=h,d}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,s)}}function tN(){return(0,s.F)(tB.instances,t=>t._plugins.invalidate())}var tH=tB;function tj(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function tW(t,e,i,a,n,r){let{x:o,y:l,startAngle:h,pixelMargin:d,innerRadius:c}=e,u=Math.max(e.outerRadius+a+i-d,0),g=c>0?c+a+i+d:0,p=0,f=n-h;if(a){let m=((c>0?c-a:0)+(u>0?u-a:0))/2;p=(f-(0!==m?f*m/(m+a):f))/2}let b=Math.max(.001,f*u-i/s.P)/u,x=(f-b)/2,_=h+x+p,v=n-x-p,{outerStart:y,outerEnd:M,innerStart:w,innerEnd:k}=function(t,e,i,a){var n;let r=(n=t.options.borderRadius,(0,s.ak)(n,["outerStart","outerEnd","innerStart","innerEnd"])),o=(i-e)/2,l=Math.min(o,a*e/2),h=t=>(0,s.S)(t,0,Math.min(o,(i-Math.min(o,t))*a/2));return{outerStart:h(r.outerStart),outerEnd:h(r.outerEnd),innerStart:(0,s.S)(r.innerStart,0,l),innerEnd:(0,s.S)(r.innerEnd,0,l)}}(e,g,u,v-_),S=u-y,P=u-M,D=_+y/S,C=v-M/P,L=g+w,E=g+k,O=_+w/L,A=v-k/E;if(t.beginPath(),r){let T=(D+C)/2;if(t.arc(o,l,u,D,T),t.arc(o,l,u,T,C),M>0){let F=tj(P,C,o,l);t.arc(F.x,F.y,M,C,v+s.H)}let z=tj(E,v,o,l);if(t.lineTo(z.x,z.y),k>0){let R=tj(E,A,o,l);t.arc(R.x,R.y,k,v+s.H,A+Math.PI)}let I=(v-k/g+(_+w/g))/2;if(t.arc(o,l,g,v-k/g,I,!0),t.arc(o,l,g,I,_+w/g,!0),w>0){let V=tj(L,O,o,l);t.arc(V.x,V.y,w,O+Math.PI,_-s.H)}let B=tj(S,_,o,l);if(t.lineTo(B.x,B.y),y>0){let N=tj(S,D,o,l);t.arc(N.x,N.y,y,_-s.H,D)}}else t.moveTo(o,l),t.lineTo(Math.cos(D)*u+o,Math.sin(D)*u+l),t.lineTo(Math.cos(C)*u+o,Math.sin(C)*u+l);t.closePath()}function t$(t,e,i=e){t.lineCap=(0,s.v)(i.borderCapStyle,e.borderCapStyle),t.setLineDash((0,s.v)(i.borderDash,e.borderDash)),t.lineDashOffset=(0,s.v)(i.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,s.v)(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,s.v)(i.borderWidth,e.borderWidth),t.strokeStyle=(0,s.v)(i.borderColor,e.borderColor)}function tU(t,e,i){t.lineTo(i.x,i.y)}function tY(t,e,i={}){let s=t.length,{start:a=0,end:n=s-1}=i,{start:r,end:o}=e,l=Math.max(a,r),h=Math.min(n,o);return{count:s,start:l,loop:e.loop,ilen:ho&&n>o)?s+h-l:h-l}}function tQ(t,e,i,a){let n,r,o;let{points:l,options:h}=e,{count:d,start:c,loop:u,ilen:g}=tY(l,i,a),p=h.stepped?s.ar:h.tension||"monotone"===h.cubicInterpolationMode?s.as:tU,{move:f=!0,reverse:m}=a||{};for(n=0;n<=g;++n)(r=l[(c+(m?g-n:n))%d]).skip||(f?(t.moveTo(r.x,r.y),f=!1):p(t,o,r,m,h.stepped),o=r);return u&&p(t,o,r=l[(c+(m?g:0))%d],m,h.stepped),!!u}function tX(t,e,i,s){let a,n,r,o,l,h;let d=e.points,{count:c,start:u,ilen:g}=tY(d,i,s),{move:p=!0,reverse:f}=s||{},m=0,b=0,x=t=>(u+(f?g-t:t))%c,_=()=>{o!==l&&(t.lineTo(m,l),t.lineTo(m,o),t.lineTo(m,h))};for(p&&(n=d[x(0)],t.moveTo(n.x,n.y)),a=0;a<=g;++a){if((n=d[x(a)]).skip)continue;let v=n.x,y=n.y,M=0|v;M===r?(yl&&(l=y),m=(b*m+v)/++b):(_(),t.lineTo(v,y),r=M,b=0,o=l=y),h=y}_()}function tq(t){let e=t.options,i=e.borderDash&&e.borderDash.length,s=!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!i;return s?tX:tQ}let tG="function"==typeof Path2D;class tK extends th{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){let a=i.spanGaps?this._loop:this._fullLoop;(0,s.al)(this._points,i,t,a,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,s.am)(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){let i,a;let n=this.options,r=t[e],o=this.points,l=(0,s.an)(this,{property:e,start:r,end:r});if(!l.length)return;let h=[],d=n.stepped?s.ao:n.tension||"monotone"===n.cubicInterpolationMode?s.ap:s.aq;for(i=0,a=l.length;i=s.T||(0,s.p)(n,o,l),f=(0,s.aj)(r,h+u,d+u);return p&&f}getCenterPoint(t){let{x:e,y:i,startAngle:s,endAngle:a,innerRadius:n,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:o,spacing:l}=this.options,h=(s+a)/2,d=(n+r+l+o)/2;return{x:e+Math.cos(h)*d,y:i+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:i}=this,a=(e.offset||0)/4,n=(e.spacing||0)/2,r=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>s.T?Math.floor(i/s.T):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*a,Math.sin(o)*a);let l=1-Math.sin(Math.min(s.P,i||0)),h=a*l;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,a,n){let{fullCircles:r,startAngle:o,circumference:l}=e,h=e.endAngle;if(r){tW(t,e,i,a,h,n);for(let d=0;dn?(d=n/h,t.arc(r,o,h,i+d,a-d,!0)):t.arc(r,o,n,i+s.H,a-s.H),t.closePath(),t.clip()}(t,e,g),r||(tW(t,e,i,a,g,n),t.stroke())}(t,this,h,n,r),t.restore()}},LineElement:tK,PointElement:class extends th{static id="point";static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){let s=this.options,{x:a,y:n}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-n,2)t.replace("rgb(","rgba(").replace(")",", 0.5)"));function t7(t){return t6[t%t6.length]}function t8(t){return t4[t%t4.length]}function t9(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function et(t){if(t._decimated){let e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function ee(t){t.data.datasets.forEach(t=>{et(t)})}function ei(t,e,i,a){if(a)return;let n=e[t],r=i[t];return"angle"===t&&(n=(0,s.ay)(n),r=(0,s.ay)(r)),{property:t,start:n,end:r}}function es(t,e,i){for(;e>t;e--){let s=i[e];if(!isNaN(s.x)&&!isNaN(s.y))break}return e}function ea(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function en(t,e){let i=[],a=!1;return(0,s.b)(t)?(a=!0,i=t):i=function(t,e){let{x:i=null,y:s=null}=t||{},a=e.points,n=[];return e.segments.forEach(({start:t,end:e})=>{e=es(t,e,a);let r=a[t],o=a[e];null!==s?(n.push({x:r.x,y:s}),n.push({x:o.x,y:s})):null!==i&&(n.push({x:i,y:r.y}),n.push({x:i,y:o.y}))}),n}(t,e),i.length?new tK({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function er(t){return t&&!1!==t.fill}class eo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){let{x:a,y:n,radius:r}=this;return e=e||{start:0,end:s.T},t.arc(a,n,r,e.end,e.start,!0),!i.bounds}interpolate(t){let{x:e,y:i,radius:s}=this,a=t.angle;return{x:e+Math.cos(a)*s,y:i+Math.sin(a)*s,angle:a}}}function el(t,e,i){let a=function(t){let{chart:e,fill:i,line:a}=t;if((0,s.g)(i))return function(t,e){let i=t.getDatasetMeta(e),s=i&&t.isDatasetVisible(e);return s?i.dataset:null}(e,i);if("stack"===i)return function(t){let{scale:e,index:i,line:a}=t,n=[],r=a.segments,o=a.points,l=function(t,e){let i=[],s=t.getMatchingVisibleMetas("line");for(let a=0;a{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}},eg=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class ep extends th{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=(0,s.Q)(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,i)=>t.sort(e,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let t,e;let{options:i,ctx:a}=this;if(!i.display){this.width=this.height=0;return}let n=i.labels,r=(0,s.a0)(n.font),o=r.size,l=this._computeTitleHeight(),{boxWidth:h,itemHeight:d}=eu(n,o);a.font=r.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(l,o,h,d)+10):(e=this.maxHeight,t=this._fitCols(l,r,h,d)+10),this.width=Math.min(t,i.maxWidth||this.maxWidth),this.height=Math.min(e,i.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){let{ctx:a,maxWidth:n,options:{labels:{padding:r}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+r,d=t;a.textAlign="left",a.textBaseline="middle";let c=-1,u=-h;return this.legendItems.forEach((t,g)=>{let p=i+e/2+a.measureText(t.text).width;(0===g||l[l.length-1]+p+2*r>n)&&(d+=h,l[l.length-(g>0?0:1)]=0,u+=h,c++),o[g]={left:0,top:u,row:c,width:p,height:s},l[l.length-1]+=p+r}),d}_fitCols(t,e,i,s){let{ctx:a,maxHeight:n,options:{labels:{padding:r}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],h=n-t,d=r,c=0,u=0,g=0,p=0;return this.legendItems.forEach((t,n)=>{let{itemWidth:f,itemHeight:m}=function(t,e,i,s,a){var n;let r,o;let l=((r=s.text)&&"string"!=typeof r&&(r=r.reduce((t,e)=>t.length>e.length?t:e)),t+e.size/2+i.measureText(r).width),h=(n=e.lineHeight,o=a,"string"!=typeof s.text&&(o=ef(s,n)),o);return{itemWidth:l,itemHeight:h}}(i,e,a,t,s);n>0&&u+m+2*r>h&&(d+=c+r,l.push({width:c,height:u}),g+=c+r,p++,c=u=0),o[n]={left:g,top:u,col:p,width:f,height:m},c=Math.max(c,f),u+=m+r}),d+=c,l.push({width:c,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:a},rtl:n}}=this,r=(0,s.az)(n,this.left,this.width);if(this.isHorizontal()){let o=0,l=(0,s.a2)(i,this.left+a,this.right-this.lineWidths[o]);for(let h of e)o!==h.row&&(o=h.row,l=(0,s.a2)(i,this.left+a,this.right-this.lineWidths[o])),h.top+=this.top+t+a,h.left=r.leftForLtr(r.x(l),h.width),l+=h.width+a}else{let d=0,c=(0,s.a2)(i,this.top+t+a,this.bottom-this.columnSizes[d].height);for(let u of e)u.col!==d&&(d=u.col,c=(0,s.a2)(i,this.top+t+a,this.bottom-this.columnSizes[d].height)),u.top=c,u.left+=this.left+a,u.left=r.leftForLtr(r.x(u.left),u.width),c+=u.height+a}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){let t=this.ctx;(0,s.Y)(t,this),this._draw(),(0,s.$)(t)}}_draw(){let t;let{options:e,columnSizes:i,lineWidths:a,ctx:n}=this,{align:r,labels:o}=e,l=s.d.color,h=(0,s.az)(e.rtl,this.left,this.width),d=(0,s.a0)(o.font),{padding:c}=o,u=d.size,g=u/2;this.drawTitle(),n.textAlign=h.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=d.string;let{boxWidth:p,boxHeight:f,itemHeight:m}=eu(o,u),b=function(t,e,i){if(isNaN(p)||p<=0||isNaN(f)||f<0)return;n.save();let a=(0,s.v)(i.lineWidth,1);if(n.fillStyle=(0,s.v)(i.fillStyle,l),n.lineCap=(0,s.v)(i.lineCap,"butt"),n.lineDashOffset=(0,s.v)(i.lineDashOffset,0),n.lineJoin=(0,s.v)(i.lineJoin,"miter"),n.lineWidth=a,n.strokeStyle=(0,s.v)(i.strokeStyle,l),n.setLineDash((0,s.v)(i.lineDash,[])),o.usePointStyle){let r={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:a},d=h.xPlus(t,p/2);(0,s.aD)(n,r,d,e+g,o.pointStyleWidth&&p)}else{let c=e+Math.max((u-f)/2,0),m=h.leftForLtr(t,p),b=(0,s.aw)(i.borderRadius);n.beginPath(),Object.values(b).some(t=>0!==t)?(0,s.au)(n,{x:m,y:c,w:p,h:f,radius:b}):n.rect(m,c,p,f),n.fill(),0!==a&&n.stroke()}n.restore()},x=function(t,e,i){(0,s.Z)(n,i.text,t,e+m/2,d,{strikethrough:i.hidden,textAlign:h.textAlign(i.textAlign)})},_=this.isHorizontal(),v=this._computeTitleHeight();t=_?{x:(0,s.a2)(r,this.left+c,this.right-a[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:(0,s.a2)(r,this.top+v+c,this.bottom-i[0].height),line:0},(0,s.aA)(this.ctx,e.textDirection);let y=m+c;this.legendItems.forEach((l,u)=>{n.strokeStyle=l.fontColor,n.fillStyle=l.fontColor;let f=n.measureText(l.text).width,m=h.textAlign(l.textAlign||(l.textAlign=o.textAlign)),M=p+g+f,w=t.x,k=t.y;h.setWidth(this.width),_?u>0&&w+M+c>this.right&&(k=t.y+=y,t.line++,w=t.x=(0,s.a2)(r,this.left+c,this.right-a[t.line])):u>0&&k+y>this.bottom&&(w=t.x=w+i[t.line].width+c,t.line++,k=t.y=(0,s.a2)(r,this.top+v+c,this.bottom-i[t.line].height));let S=h.x(w);if(b(S,k,l),w=(0,s.aB)(m,w+p+g,_?w+M:this.right,e.rtl),x(h.x(w),k,l),_)t.x+=M+c;else if("string"!=typeof l.text){let P=d.lineHeight;t.y+=ef(l,P)}else t.y+=y}),(0,s.aC)(this.ctx,e.textDirection)}drawTitle(){let t;let e=this.options,i=e.title,a=(0,s.a0)(i.font),n=(0,s.E)(i.padding);if(!i.display)return;let r=(0,s.az)(e.rtl,this.left,this.width),o=this.ctx,l=i.position,h=a.size/2,d=n.top+h,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),t=this.top+d,c=(0,s.a2)(e.align,c,this.right-u);else{let g=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=d+(0,s.a2)(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}let p=(0,s.a2)(l,c,c+u);o.textAlign=r.textAlign((0,s.a1)(l)),o.textBaseline="middle",o.strokeStyle=i.color,o.fillStyle=i.color,o.font=a.string,(0,s.Z)(o,i.text,p,t,a)}_computeTitleHeight(){let t=this.options.title,e=(0,s.a0)(t.font),i=(0,s.E)(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,a,n;if((0,s.aj)(t,this.left,this.right)&&(0,s.aj)(e,this.top,this.bottom)){for(i=0,n=this.legendHitBoxes;i-1?t.split("\n"):t}function ey(t,e){let i=t.chart.ctx,{body:a,footer:n,title:r}=t,{boxWidth:o,boxHeight:l}=e,h=(0,s.a0)(e.bodyFont),d=(0,s.a0)(e.titleFont),c=(0,s.a0)(e.footerFont),u=r.length,g=n.length,p=a.length,f=(0,s.E)(e.padding),m=f.height,b=0,x=a.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(x+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*d.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),x){let _=e.displayColors?Math.max(l,h.lineHeight):h.lineHeight;m+=p*_+(x-p)*h.lineHeight+(x-1)*e.bodySpacing}g&&(m+=e.footerMarginTop+g*c.lineHeight+(g-1)*e.footerSpacing);let v=0,y=function(t){b=Math.max(b,i.measureText(t).width+v)};return i.save(),i.font=d.string,(0,s.F)(t.title,y),i.font=h.string,(0,s.F)(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?o+2+e.boxPadding:0,(0,s.F)(a,t=>{(0,s.F)(t.before,y),(0,s.F)(t.lines,y),(0,s.F)(t.after,y)}),v=0,i.font=c.string,(0,s.F)(t.footer,y),i.restore(),b+=f.width,{width:b,height:m}}function eM(t,e,i){let s=i.yAlign||e.yAlign||function(t,e){let{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||function(t,e,i,s){let{x:a,width:n}=i,{width:r,chartArea:{left:o,right:l}}=t,h="center";return"center"===s?h=a<=(o+l)/2?"left":"right":a<=n/2?h="left":a>=r-n/2&&(h="right"),function(t,e,i,s){let{x:a,width:n}=s,r=i.caretSize+i.caretPadding;if("left"===t&&a+n+r>e.width||"right"===t&&a-n-r<0)return!0}(h,t,e,i)&&(h="center"),h}(t,e,i,s),yAlign:s}}function ew(t,e,i,a){let{caretSize:n,caretPadding:r,cornerRadius:o}=t,{xAlign:l,yAlign:h}=i,d=n+r,{topLeft:c,topRight:u,bottomLeft:g,bottomRight:p}=(0,s.aw)(o),f=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,l),m=function(t,e,i){let{y:s,height:a}=t;return"top"===e?s+=i:"bottom"===e?s-=a+i:s-=a/2,s}(e,h,d);return"center"===h?"left"===l?f+=d:"right"===l&&(f-=d):"left"===l?f-=Math.max(c,g)+n:"right"===l&&(f+=Math.max(u,p)+n),{x:(0,s.S)(f,0,a.width-e.width),y:(0,s.S)(m,0,a.height-e.height)}}function ek(t,e,i){let a=(0,s.E)(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-a.right:t.x+a.left}function eS(t,e){let i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}let eP={beforeTitle:s.aF,title(t){if(t.length>0){let e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex{let e={before:[],lines:[],after:[]},s=eS(i,t);e_(e.before,ev(eD(s,"beforeLabel",this,t))),e_(e.lines,eD(s,"label",this,t)),e_(e.after,ev(eD(s,"afterLabel",this,t))),a.push(e)}),a}getAfterBody(t,e){return e_([],ev(eD(e.callbacks,"afterBody",this,t)))}getFooter(t,e){let{callbacks:i}=e,s=eD(i,"beforeFooter",this,t),a=eD(i,"footer",this,t),n=eD(i,"afterFooter",this,t),r=[];return r=e_(r,ev(s)),r=e_(r,ev(a)),r=e_(r,ev(n))}_createItems(t){let e,i;let a=this._active,n=this.chart.data,r=[],o=[],l=[],h=[];for(e=0,i=a.length;et.filter(e,i,s,n))),t.itemSort&&(h=h.sort((e,i)=>t.itemSort(e,i,n))),(0,s.F)(h,e=>{let i=eS(t.callbacks,e);r.push(eD(i,"labelColor",this,e)),o.push(eD(i,"labelPointStyle",this,e)),l.push(eD(i,"labelTextColor",this,e))}),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=l,this.dataPoints=h,h}update(t,e){let i;let s=this.options.setContext(this.getContext()),a=this._active,n=[];if(a.length){let r=ex[s.position].call(this,a,this._eventPosition);n=this._createItems(s),this.title=this.getTitle(n,s),this.beforeBody=this.getBeforeBody(n,s),this.body=this.getBody(n,s),this.afterBody=this.getAfterBody(n,s),this.footer=this.getFooter(n,s);let o=this._size=ey(this,s),l=Object.assign({},r,o),h=eM(this.chart,s,l),d=ew(s,l,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,i={opacity:1,x:d.x,y:d.y,width:o.width,height:o.height,caretX:r.x,caretY:r.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=n,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){let a=this.getCaretPosition(t,i,s);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){let a,n,r,o,l,h;let{xAlign:d,yAlign:c}=this,{caretSize:u,cornerRadius:g}=i,{topLeft:p,topRight:f,bottomLeft:m,bottomRight:b}=(0,s.aw)(g),{x:x,y:_}=t,{width:v,height:y}=e;return"center"===c?(l=_+y/2,"left"===d?(n=(a=x)-u,o=l+u,h=l-u):(n=(a=x+v)+u,o=l-u,h=l+u),r=a):(n="left"===d?x+Math.max(p,m)+u:"right"===d?x+v-Math.max(f,b)-u:this.caretX,"top"===c?(l=(o=_)-u,a=n-u,r=n+u):(l=(o=_+y)+u,a=n+u,r=n-u),h=o),{x1:a,x2:n,x3:r,y1:o,y2:l,y3:h}}drawTitle(t,e,i){let a,n,r;let o=this.title,l=o.length;if(l){let h=(0,s.az)(i.rtl,this.x,this.width);for(r=0,t.x=ek(this,i.titleAlign,i),e.textAlign=h.textAlign(i.titleAlign),e.textBaseline="middle",a=(0,s.a0)(i.titleFont),n=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string;r0!==t)?(t.beginPath(),t.fillStyle=n.multiKeyBackground,(0,s.au)(t,{x:_,y:f,w:h,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),(0,s.au)(t,{x:v,y:f+1,w:h-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(_,f,h,l),t.strokeRect(_,f,h,l),t.fillStyle=r.backgroundColor,t.fillRect(v,f+1,h-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let a,n,r,o,l,h,d;let{body:c}=this,{bodySpacing:u,bodyAlign:g,displayColors:p,boxHeight:f,boxWidth:m,boxPadding:b}=i,x=(0,s.a0)(i.bodyFont),_=x.lineHeight,v=0,y=(0,s.az)(i.rtl,this.x,this.width),M=function(i){e.fillText(i,y.x(t.x+v),t.y+_/2),t.y+=_+u},w=y.textAlign(g);for(e.textAlign=g,e.textBaseline="middle",e.font=x.string,t.x=ek(this,w,i),e.fillStyle=i.bodyColor,(0,s.F)(this.beforeBody,M),v=p&&"right"!==w?"center"===g?m/2+b:m+2+b:0,o=0,h=c.length;o0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){let n=ex[t.position].call(this,this._active,this._eventPosition);if(!n)return;let r=this._size=ey(this,t),o=Object.assign({},n,this._size),l=eM(e,t,o),h=ew(t,o,l,e);(s._to!==h.x||a._to!==h.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=r.width,this.height=r.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let a={width:this.width,height:this.height},n={x:this.x,y:this.y};i=.001>Math.abs(i)?0:i;let r=(0,s.E)(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,a,e),(0,s.aA)(t,e.textDirection),n.y+=r.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),(0,s.aC)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,a=t.map(({datasetIndex:t,index:e})=>{let i=this.chart.getDatasetMeta(t);if(!i)throw Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),n=!(0,s.ah)(i,a),r=this._positionChanged(a,e);(n||r)&&(this._active=a,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let a=this.options,n=this._active||[],r=this._getActiveElements(t,n,e,i),o=this._positionChanged(r,t),l=e||!(0,s.ah)(r,n)||o;return l&&(this._active=r,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,s){let a=this.options;if("mouseout"===t.type)return[];if(!s)return e;let n=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&n.reverse(),n}_positionChanged(t,e){let{caretX:i,caretY:s,options:a}=this,n=ex[a.position].call(this,t,e);return!1!==n&&(i!==n.x||s!==n.y)}}var eL=Object.freeze({__proto__:null,Colors:{id:"colors",defaults:{enabled:!0},beforeLayout(t,e,i){if(!i.enabled)return;let{type:s,options:{elements:a},data:{datasets:n}}=t.config;if(t9(n)||a&&t9(a))return;let r=function(t){if("doughnut"===t||"pie"===t){let e;return e=0,t=>{t.backgroundColor=t.data.map(()=>t7(e++))}}if("polarArea"===t){let i;return i=0,t=>{t.backgroundColor=t.data.map(()=>t8(i++))}}return(t,e)=>{t.borderColor=t7(e),t.backgroundColor=t8(e)}}(s);n.forEach(r)}},Decimation:{id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate(t,e,i){if(!i.enabled){ee(t);return}let a=t.width;t.data.datasets.forEach((e,n)=>{let r;let{_data:o,indexAxis:l}=e,h=t.getDatasetMeta(n),d=o||e.data;if("y"===(0,s.a)([l,t.options.indexAxis])||!h.controller.supportsDecimation)return;let c=t.scales[h.xAxisID];if("linear"!==c.type&&"time"!==c.type||t.options.parsing)return;let{start:u,count:g}=function(t,e){let i;let a=e.length,n=0,{iScale:r}=t,{min:o,max:l,minDefined:h,maxDefined:d}=r.getUserBounds();return h&&(n=(0,s.S)((0,s.B)(e,r.axis,o).lo,0,a-1)),i=d?(0,s.S)((0,s.B)(e,r.axis,l).hi+1,n,a)-n:a-n,{start:n,count:i}}(h,d),p=i.threshold||4*a;if(g<=p){et(e);return}switch((0,s.k)(o)&&(e._data=d,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":r=function(t,e,i,s,a){let n,r,o,l,h;let d=a.samples||s;if(d>=i)return t.slice(e,e+i);let c=[],u=(i-2)/(d-2),g=0,p=e;for(n=0,c[g++]=t[p];no&&(o=l,r=t[f],h=f);c[g++]=r,p=h}return c[g++]=t[e+i-1],c}(d,u,g,a,i);break;case"min-max":r=function(t,e,i,a){let n,r,o,l,h,d,c,u,g,p,f=0,m=0,b=[],x=t[e].x,_=t[e+i-1].x,v=_-x;for(n=e;np&&(p=l,c=n),f=(m*f+r.x)/++m;else{let M=n-1;if(!(0,s.k)(d)&&!(0,s.k)(c)){let w=Math.min(d,c),k=Math.max(d,c);w!==u&&w!==M&&b.push({...t[w],x:f}),k!==u&&k!==M&&b.push({...t[k],x:f})}n>0&&M!==u&&b.push(t[M]),b.push(r),h=y,m=0,g=p=l,d=c=u=n}}return b}(d,u,g,a);break;default:throw Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=r})},destroy(t){ee(t)}},Filler:{id:"filler",afterDatasetsUpdate(t,e,i){let a,n,r,o;let l=(t.data.datasets||[]).length,h=[];for(n=0;n=i)&&n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}(r,n,l),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:r}),a.$filler=o,h.push(o);for(n=0;n=0;--r){let o=a[r].$filler;o&&(o.line.updateControlPoints(n,o.axis),s&&o.fill&&el(t.ctx,o,n))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;let s=t.getSortedVisibleDatasetMetas();for(let a=s.length-1;a>=0;--a){let n=s[a].$filler;er(n)&&el(t.ctx,n,t.chartArea)}},beforeDatasetDraw(t,e,i){let s=e.meta.$filler;er(s)&&"beforeDatasetDraw"===i.drawTime&&el(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Legend:{id:"legend",_element:ep,start(t,e,i){let s=t.legend=new ep({ctx:t.ctx,options:i,chart:t});U.configure(t,s,i),U.addBox(t,s)},stop(t){U.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){let s=t.legend;U.configure(t,s,i),s.options=i},afterUpdate(t){let e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){let s=e.datasetIndex,a=i.chart;a.isDatasetVisible(s)?(a.hide(s),e.hidden=!0):(a.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:a,textAlign:n,color:r,useBorderRadius:o,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{let h=t.controller.getStyle(i?0:void 0),d=(0,s.E)(h.borderWidth);return{text:e[t.index].label,fillStyle:h.backgroundColor,fontColor:r,hidden:!t.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:h.borderColor,pointStyle:a||h.pointStyle,rotation:h.rotation,textAlign:n||h.textAlign,borderRadius:o&&(l||h.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},SubTitle:{id:"subtitle",start(t,e,i){let s=new em({ctx:t.ctx,options:i,chart:t});U.configure(t,s,i),U.addBox(t,s),eb.set(t,s)},stop(t){U.removeBox(t,eb.get(t)),eb.delete(t)},beforeUpdate(t,e,i){let s=eb.get(t);U.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Title:{id:"title",_element:em,start(t,e,i){!function(t,e){let i=new em({ctx:t.ctx,options:e,chart:t});U.configure(t,i,e),U.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){let e=t.titleBlock;U.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){let s=t.titleBlock;U.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Tooltip:{id:"tooltip",_element:eC,positioners:ex,afterInit(t,e,i){i&&(t.tooltip=new eC({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){let i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:eP},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});let eE=(t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i),eO=(t,e)=>null===t?null:(0,s.S)(Math.round(t),0,e);function eA(t){let e=this.getLabels();return t>=0&&ta=e?a:t,o=t=>n=i?n:t;if(t){let l=(0,s.s)(a),h=(0,s.s)(n);l<0&&h<0?o(0):l>0&&h>0&&r(0)}if(a===n){let d=0===n?1:Math.abs(.05*n);o(n+d),t||r(a-d)}this.min=a,this.max=n}getTickLimit(){let t;let e=this.options.ticks,{maxTicksLimit:i,stepSize:s}=e;return s?(t=Math.ceil(this.max/s)-Math.floor(this.min/s)+1)>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let a={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},n=this._range||this,r=function(t,e){let i,a,n,r;let o=[],{bounds:l,step:h,min:d,max:c,precision:u,count:g,maxTicks:p,maxDigits:f,includeBounds:m}=t,b=h||1,x=p-1,{min:_,max:v}=e,y=!(0,s.k)(d),M=!(0,s.k)(c),w=!(0,s.k)(g),k=(v-_)/(f+1),S=(0,s.aH)((v-_)/x/b)*b;if(S<1e-14&&!y&&!M)return[{value:_},{value:v}];(r=Math.ceil(v/S)-Math.floor(_/S))>x&&(S=(0,s.aH)(r*S/x/b)*b),(0,s.k)(u)||(S=Math.ceil(S*(i=Math.pow(10,u)))/i),"ticks"===l?(a=Math.floor(_/S)*S,n=Math.ceil(v/S)*S):(a=_,n=v),y&&M&&h&&(0,s.aI)((c-d)/h,S/1e3)?(r=Math.round(Math.min((c-d)/S,p)),S=(c-d)/r,a=d,n=c):w?(a=y?d:a,S=((n=M?c:n)-a)/(r=g-1)):(r=(n-a)/S,r=(0,s.aJ)(r,Math.round(r),S/1e3)?Math.round(r):Math.ceil(r));let P=Math.max((0,s.aK)(S),(0,s.aK)(a));i=Math.pow(10,(0,s.k)(u)?P:u),a=Math.round(a*i)/i,n=Math.round(n*i)/i;let D=0;for(y&&(m&&a!==d?(o.push({value:d}),aMath.floor((0,s.aM)(t)),eI=(t,e)=>Math.pow(10,eR(t)+e);function eV(t){let e=t/Math.pow(10,eR(t));return 1===e}function eB(t,e,i){let s=Math.pow(10,i);return Math.ceil(e/s)-Math.floor(t/s)}class eN extends tm{static id="logarithmic";static defaults={ticks:{callback:s.aL.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let i=eF.prototype.parse.apply(this,[t,e]);if(0===i){this._zero=!0;return}return(0,s.g)(i)&&i>0?i:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=(0,s.g)(t)?Math.max(0,t):null,this.max=(0,s.g)(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!(0,s.g)(this._userMin)&&(this.min=t===eI(this.min,0)?eI(this.min,-1):eI(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,s=this.max,a=e=>i=t?i:e,n=t=>s=e?s:t;i===s&&(i<=0?(a(1),n(10)):(a(eI(i,-1)),n(eI(s,1)))),i<=0&&a(eI(s,-1)),s<=0&&n(eI(i,1)),this.min=i,this.max=s}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},i=function(t,{min:e,max:i}){e=(0,s.O)(t.min,e);let a=[],n=eR(e),r=function(t,e){let i=eR(e-t);for(;eB(t,e,i)>10;)i++;for(;10>eB(t,e,i);)i--;return Math.min(i,eR(t))}(e,i),o=r<0?Math.pow(10,Math.abs(r)):1,l=Math.pow(10,r),h=n>r?Math.pow(10,n):0,d=Math.round((e-h)*o)/o,c=Math.floor((e-h)/l/10)*l*10,u=Math.floor((d-c)/Math.pow(10,r)),g=(0,s.O)(t.min,Math.round((h+c+u*Math.pow(10,r))*o)/o);for(;g=10?u=u<15?15:20:u++,u>=20&&(u=2,o=++r>=0?1:o),g=Math.round((h+c+u*Math.pow(10,r))*o)/o;let p=(0,s.O)(t.max,g);return a.push({value:p,major:eV(p),significand:u}),a}(e,this);return"ticks"===t.bounds&&(0,s.aG)(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return void 0===t?"0":(0,s.o)(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=(0,s.aM)(t),this._valueRange=(0,s.aM)(this.max)-(0,s.aM)(t)}getPixelForValue(t){return((void 0===t||0===t)&&(t=this.min),null===t||isNaN(t))?NaN:this.getPixelForDecimal(t===this.min?0:((0,s.aM)(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function eH(t){let e=t.ticks;if(e.display&&t.display){let i=(0,s.E)(e.backdropPadding);return(0,s.v)(e.font&&e.font.size,s.d.font.size)+i.height}return 0}function ej(t,e,i,s,a){return t===s||t===a?{start:e-i/2,end:e+i/2}:ta?{start:e-i,end:e}:{start:e,end:e+i}}function eW(t,e,i,a){let{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,s.T);else{let r=t.getPointPosition(0,e);n.moveTo(r.x,r.y);for(let o=1;ot,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=(0,s.E)(eH(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=(0,s.g)(t)&&!isNaN(t)?t:0,this.max=(0,s.g)(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/eH(this.options))}generateTickLabels(t){eF.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{let i=(0,s.Q)(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){let t=this.options;t.display&&t.pointLabels.display?function(t){let e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),a=[],n=[],r=t._pointLabels.length,o=t.options.pointLabels,l=o.centerPointLabels?s.P/r:0;for(let h=0;he.r&&(o=(s.end-e.r)/n,t.r=Math.max(t.r,e.r+o)),a.starte.b&&(l=(a.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}(i,e,m,x,_)}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){let a=[],n=t._pointLabels.length,r=t.options,o=eH(r)/2,l=t.drawingArea,h=r.pointLabels.centerPointLabels?s.P/n:0;for(let d=0;d270||m<90)&&(c-=u),c),_=0===m||180===m?"center":m<180?"left":"right",v=(g=f.x,p=b.w,"right"===_?g-=p:"center"===_&&(g-=p/2),g);a.push({x:f.x,y:x,textAlign:_,left:v,top:x,right:v+b.w,bottom:x+b.h})}return a}(t,a,n)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){let e=s.T/(this._pointLabels.length||1),i=this.options.startAngle||0;return(0,s.ay)(t*e+(0,s.t)(i))}getDistanceFromCenterForValue(t){if((0,s.k)(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if((0,s.k)(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t=0;n--){let r=a.setContext(t.getPointLabelContext(n)),o=(0,s.a0)(r.font),{x:l,y:h,textAlign:d,left:c,top:u,right:g,bottom:p}=t._pointLabelItems[n],{backdropColor:f}=r;if(!(0,s.k)(f)){let m=(0,s.aw)(r.borderRadius),b=(0,s.E)(r.backdropPadding);i.fillStyle=f;let x=c-b.left,_=u-b.top,v=g-c+b.width,y=p-u+b.height;Object.values(m).some(t=>0!==t)?(i.beginPath(),(0,s.au)(i,{x:x,y:_,w:v,h:y,radius:m}),i.fill()):i.fillRect(x,_,v,y)}(0,s.Z)(i,t._pointLabels[n],l,h+o.lineHeight/2,o,{color:r.color,textAlign:d,textBaseline:"middle"})}}(this,h),o.display&&this.ticks.forEach((t,i)=>{if(0!==i){e=this.getDistanceFromCenterForValue(t.value);let s=this.getContext(i),a=o.setContext(s),n=l.setContext(s);!function(t,e,i,s,a){let n=t.ctx,r=e.circular,{color:o,lineWidth:l}=e;(r||s)&&o&&l&&!(i<0)&&(n.save(),n.strokeStyle=o,n.lineWidth=l,n.setLineDash(a.dash),n.lineDashOffset=a.dashOffset,n.beginPath(),eW(t,i,r,s),n.closePath(),n.stroke(),n.restore())}(this,a,e,h,n)}}),r.display){for(a.save(),t=h-1;t>=0;t--){let d=r.setContext(this.getPointLabelContext(t)),{color:c,lineWidth:u}=d;u&&c&&(a.lineWidth=u,a.strokeStyle=c,a.setLineDash(d.borderDash),a.lineDashOffset=d.borderDashOffset,e=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),i=this.getPointPosition(t,e),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(i.x,i.y),a.stroke())}a.restore()}}drawBorder(){}drawLabels(){let t,e;let i=this.ctx,a=this.options,n=a.ticks;if(!n.display)return;let r=this.getIndexAngle(0);i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(r),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((r,o)=>{if(0===o&&!a.reverse)return;let l=n.setContext(this.getContext(o)),h=(0,s.a0)(l.font);if(t=this.getDistanceFromCenterForValue(this.ticks[o].value),l.showLabelBackdrop){i.font=h.string,e=i.measureText(r.label).width,i.fillStyle=l.backdropColor;let d=(0,s.E)(l.backdropPadding);i.fillRect(-e/2-d.left,-t-h.size/2-d.top,e+d.width,h.size+d.height)}(0,s.Z)(i,r.label,0,-t,h,{color:l.color})}),i.restore()}drawTitle(){}}let eU={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},eY=Object.keys(eU);function eQ(t,e){return t-e}function eX(t,e){if((0,s.k)(e))return null;let i=t._adapter,{parser:a,round:n,isoWeekday:r}=t._parseOpts,o=e;return("function"==typeof a&&(o=a(o)),(0,s.g)(o)||(o="string"==typeof a?i.parse(o,a):i.parse(o)),null===o)?null:(n&&(o="week"===n&&((0,s.x)(r)||!0===r)?i.startOf(o,"isoWeek",r):i.startOf(o,n)),+o)}function eq(t,e,i,s){let a=eY.length;for(let n=eY.indexOf(t);n=e?i[a]:i[n];t[r]=!0}}else t[e]=!0}function eK(t,e,i){let s,a;let n=[],r={},o=e.length;for(s=0;s=0&&(e[n].major=!0);return e}(t,n,r,i):n}class eJ extends tm{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){let i=t.time||(t.time={}),a=this._adapter=new E._date(t.adapters.date);a.init(e),(0,s.ab)(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:eX(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,i=t.time.unit||"day",{min:a,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();function l(t){r||isNaN(t.min)||(a=Math.min(a,t.min)),o||isNaN(t.max)||(n=Math.max(n,t.max))}r&&o||(l(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&l(this.getMinMax(!1))),a=(0,s.g)(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),n=(0,s.g)(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,n-1),this.max=Math.max(a+1,n)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){let t=this.options,e=t.time,i=t.ticks,a="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);let n=this.min,r=this.max,o=(0,s.aO)(a,n,r);return this._unit=e.unit||(i.autoSkip?eq(e.minUnit,this.min,this.max,this._getLabelCapacity(n)):function(t,e,i,s,a){for(let n=eY.length-1;n>=eY.indexOf(i);n--){let r=eY[n];if(eU[r].common&&t._adapter.diff(a,s,r)>=e-1)return r}return eY[i?eY.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=eY.indexOf(t)+1,i=eY.length;e+t.value))}initOffsets(t=[]){let e,i,a=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),a=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);let r=t.length<3?.5:.25;a=(0,s.S)(a,0,r),n=(0,s.S)(n,0,r),this._offsets={start:a,end:n,factor:1/(a+1+n)}}_generate(){let t,e;let i=this._adapter,a=this.min,n=this.max,r=this.options,o=r.time,l=o.unit||eq(o.minUnit,a,n,this._getLabelCapacity(a)),h=(0,s.v)(r.ticks.stepSize,1),d="week"===l&&o.isoWeekday,c=(0,s.x)(d)||!0===d,u={},g=a;if(c&&(g=+i.startOf(g,"isoWeek",d)),g=+i.startOf(g,c?"day":l),i.diff(n,a,l)>1e5*h)throw Error(a+" and "+n+" are too far apart with stepSize of "+h+" "+l);let p="data"===r.ticks.source&&this.getDataTimestamps();for(t=g,e=0;tt-e).map(t=>+t)}getLabelForValue(t){let e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,a){let n=this.options,r=n.ticks.callback;if(r)return(0,s.Q)(r,[t,e,i],this);let o=n.time.displayFormats,l=this._unit,h=this._majorUnit,d=l&&o[l],c=h&&o[h],u=i[e],g=h&&c&&u&&u.major;return this._adapter.format(t,a||(g?c:d))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t=t[l].pos&&e<=t[h].pos&&({lo:l,hi:h}=(0,s.B)(t,"pos",e)),{pos:a,time:r}=t[l],{pos:n,time:o}=t[h]):(e>=t[l].time&&e<=t[h].time&&({lo:l,hi:h}=(0,s.B)(t,"time",e)),{time:a,pos:r}=t[l],{time:n,pos:o}=t[h]);let d=n-a;return d?r+(o-r)*(e-a)/d:r}class e0 extends eJ{static id="timeseries";static defaults=eJ.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=eZ(e,this.min),this._tableRange=eZ(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let e,i,s;let{min:a,max:n}=this,r=[],o=[];for(e=0,i=t.length;e=a&&s<=n&&r.push(s);if(r.length<2)return[{time:a,pos:0},{time:n,pos:1}];for(e=0,i=r.length;ee.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:ez,LogarithmicScale:eN,RadialLinearScale:e$,TimeScale:eJ,TimeSeriesScale:e0});let e2=[D,t3,eL,e1]}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/hardware-info-ab778720aa460a2f.js b/static/web/_next/static/chunks/pages/admin/hardware-info-34c5be89db1620b1.js similarity index 95% rename from static/web/_next/static/chunks/pages/admin/hardware-info-ab778720aa460a2f.js rename to static/web/_next/static/chunks/pages/admin/hardware-info-34c5be89db1620b1.js index 58a0826b2..a24bd2278 100644 --- a/static/web/_next/static/chunks/pages/admin/hardware-info-ab778720aa460a2f.js +++ b/static/web/_next/static/chunks/pages/admin/hardware-info-34c5be89db1620b1.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1487],{57838:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(97685),o=n(67294);function i(){var e=o.useReducer(function(e){return e+1},0);return(0,r.Z)(e,2)[1]}},24308:function(e,t,n){"use strict";n.d(t,{c4:function(){return i}});var r=n(4942),o=n(87462),i=["xxl","xl","lg","md","sm","xs"],a={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},l=new Map,c=-1,s={};t.ZP={matchHandlers:{},dispatch:function(e){return s=e,l.forEach(function(e){return e(s)}),l.size>=1},subscribe:function(e){return l.size||this.register(),c+=1,l.set(c,e),e(s),c},unsubscribe:function(e){l.delete(e),l.size||this.unregister()},unregister:function(){var e=this;Object.keys(a).forEach(function(t){var n=a[t],r=e.matchHandlers[n];null==r||r.mql.removeListener(null==r?void 0:r.listener)}),l.clear()},register:function(){var e=this;Object.keys(a).forEach(function(t){var n=a[t],i=function(n){var i=n.matches;e.dispatch((0,o.Z)((0,o.Z)({},s),(0,r.Z)({},t,i)))},l=window.matchMedia(n);l.addListener(i),e.matchHandlers[n]={mql:l,listener:i},i(l)})}}},99096:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/hardware-info",function(){return n(51795)}])},94185:function(e,t,n){"use strict";n.d(t,{k:function(){return u}});var r=n(85893),o=n(29217),i=n(92616),a=n.n(i),l=n(58091),c=n(60727);function s(e){let t={};return e.forEach(e=>{let n=new Date(e.time),r=(0,l.Z)(n,"H:mma");t[r]=e.value}),t}a().use(o.Z);let u=e=>{let{data:t,title:n,color:o,unit:i,dataCollections:a,yFlipped:l,yLogarithmic:u}=e,d=[];t&&t.length>0&&d.push({name:n,color:o,data:s(t)}),a.forEach(e=>{d.push({name:e.name,data:s(e.data),color:e.color,dataset:e.options})});let f={scales:{y:{reverse:!1,type:"linear"},x:{type:"time"}}};return f.scales.y.reverse=l,f.scales.y.type=u?"logarithmic":"linear",(0,r.jsx)("div",{className:"line-chart-container",children:(0,r.jsx)(c.wW,{xtitle:"Time",ytitle:n,suffix:i,legend:"bottom",color:o,data:d,download:n,library:f})})};u.defaultProps={dataCollections:[],data:[],title:"",yFlipped:!1,yLogarithmic:!1}},57390:function(e,t,n){"use strict";n.d(t,{m:function(){return p}});var r=n(85893),o=n(84485),i=n(97910),a=n(74763),l=n(59652);let{Text:c}=o.Z,s={title:"",value:0,prefix:null,suffix:null,color:"",progress:!1,centered:!1,formatter:null},u=e=>{let{prefix:t,value:n,suffix:o,title:i}=e;return(0,r.jsxs)("div",{children:[t,(0,r.jsx)("div",{children:(0,r.jsx)(c,{type:"secondary",children:i})}),(0,r.jsx)("div",{children:(0,r.jsxs)(c,{type:"secondary",children:[n,o||"%"]})})]})},d=e=>{let{title:t,value:n,prefix:o,suffix:a,color:l}=e,c=(0,r.jsx)(u,{prefix:o,value:n,suffix:a,title:t});return(0,r.jsx)(i.Z,{type:"dashboard",percent:n,width:120,strokeColor:{"0%":l,"90%":n>90?"red":l},format:()=>c})};d.defaultProps=s;let f=e=>{let{title:t,value:n,prefix:o,formatter:i}=e;return(0,r.jsx)(a.Z,{title:t,value:n,prefix:o,formatter:i})};f.defaultProps=s;let p=e=>{let{progress:t,centered:n}=e,o=t?d:f;return(0,r.jsx)(l.Z,{type:"inner",children:(0,r.jsx)("div",{style:n?{display:"flex",alignItems:"center",justifyContent:"center"}:{},children:(0,r.jsx)(o,{...e})})})};p.defaultProps=s},51795:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var r=n(85893),o=n(1413),i=n(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z"}}]},name:"laptop",theme:"outlined"},l=n(42135),c=function(e,t){return i.createElement(l.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:t,icon:a}))};c.displayName="LaptopOutlined";var s=i.forwardRef(c),u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z"}}]},name:"bulb",theme:"outlined"},d=function(e,t){return i.createElement(l.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:t,icon:u}))};d.displayName="BulbOutlined";var f=i.forwardRef(d),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},v=function(e,t){return i.createElement(l.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:t,icon:p}))};v.displayName="SaveOutlined";var m=i.forwardRef(v),h=n(84485),g=n(71230),x=n(15746),y=n(64777),w=n(94185),b=n(57390);function Z(){var e,t,n;let[o,a]=(0,i.useState)({cpu:[],memory:[],disk:[],message:""}),l=async()=>{try{let e=await (0,y.rQ)(y.nx);a({...e})}catch(t){a({...o,message:t.message})}};if((0,i.useEffect)(()=>{let e=null;return l(),e=setInterval(l,y.NE),()=>{clearInterval(e)}},[]),!o.cpu)return null;let c=null===(e=o.cpu[o.cpu.length-1])||void 0===e?void 0:e.value,u=null===(t=o.memory[o.memory.length-1])||void 0===t?void 0:t.value,d=null===(n=o.disk[o.disk.length-1])||void 0===n?void 0:n.value,p=[{name:"CPU",color:"#B63FFF",data:o.cpu},{name:"Memory",color:"#2087E2",data:o.memory},{name:"Disk",color:"#FF7700",data:o.disk}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Z.Title,{children:"Hardware Info"}),(0,r.jsx)("br",{}),(0,r.jsxs)("div",{children:[(0,r.jsxs)(g.Z,{gutter:[16,16],justify:"space-around",children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(b.m,{title:p[0].name,value:"".concat(Math.round(c)||0),prefix:(0,r.jsx)(s,{style:{color:p[0].color}}),color:p[0].color,progress:!0,centered:!0})}),(0,r.jsx)(x.Z,{children:(0,r.jsx)(b.m,{title:p[1].name,value:"".concat(Math.round(u)||0),prefix:(0,r.jsx)(f,{style:{color:p[1].color}}),color:p[1].color,progress:!0,centered:!0})}),(0,r.jsx)(x.Z,{children:(0,r.jsx)(b.m,{title:p[2].name,value:"".concat(Math.round(d)||0),prefix:(0,r.jsx)(m,{style:{color:p[2].color}}),color:p[2].color,progress:!0,centered:!0})})]}),(0,r.jsx)(w.k,{title:"% used",dataCollections:p,color:"#FF7700",unit:"%"})]})]})}},60057:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(4942),o=n(1413),i=n(97685),a=n(45987),l=n(67294),c=n(81263),s=n(94184),u=n.n(s),d={adjustX:1,adjustY:1},f=[0,0],p={topLeft:{points:["bl","tl"],overflow:d,offset:[0,-4],targetOffset:f},topCenter:{points:["bc","tc"],overflow:d,offset:[0,-4],targetOffset:f},topRight:{points:["br","tr"],overflow:d,offset:[0,-4],targetOffset:f},bottomLeft:{points:["tl","bl"],overflow:d,offset:[0,4],targetOffset:f},bottomCenter:{points:["tc","bc"],overflow:d,offset:[0,4],targetOffset:f},bottomRight:{points:["tr","br"],overflow:d,offset:[0,4],targetOffset:f}},v=n(15105),m=n(75164),h=n(88603),g=v.Z.ESC,x=v.Z.TAB,y=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"],w=l.forwardRef(function(e,t){var n,s,d,f,v,w,b,Z,j,C,E,k,N,V,O,M,P=e.arrow,z=void 0!==P&&P,H=e.prefixCls,F=void 0===H?"rc-dropdown":H,L=e.transitionName,R=e.animation,_=e.align,T=e.placement,A=e.placements,S=e.getPopupContainer,B=e.showAction,I=e.hideAction,W=e.overlayClassName,D=e.overlayStyle,X=e.visible,q=e.trigger,Q=void 0===q?["hover"]:q,U=e.autoFocus,Y=(0,a.Z)(e,y),G=l.useState(),J=(0,i.Z)(G,2),K=J[0],$=J[1],ee="visible"in e?X:K,et=l.useRef(null);l.useImperativeHandle(t,function(){return et.current}),d=(s={visible:ee,setTriggerVisible:$,triggerRef:et,onVisibleChange:e.onVisibleChange,autoFocus:U}).visible,f=s.setTriggerVisible,v=s.triggerRef,w=s.onVisibleChange,b=s.autoFocus,Z=l.useRef(!1),j=function(){if(d&&v.current){var e,t,n,r;null===(e=v.current)||void 0===e||null===(t=e.triggerRef)||void 0===t||null===(n=t.current)||void 0===n||null===(r=n.focus)||void 0===r||r.call(n),f(!1),"function"==typeof w&&w(!1)}},C=function(){var e,t,n,r,o=(0,h.tS)(null===(e=v.current)||void 0===e?void 0:null===(t=e.popupRef)||void 0===t?void 0:null===(n=t.current)||void 0===n?void 0:null===(r=n.getElement)||void 0===r?void 0:r.call(n))[0];return null!=o&&!!o.focus&&(o.focus(),Z.current=!0,!0)},E=function(e){switch(e.keyCode){case g:j();break;case x:var t=!1;Z.current||(t=C()),t?e.preventDefault():j()}},l.useEffect(function(){return d?(window.addEventListener("keydown",E),b&&(0,m.Z)(C,3),function(){window.removeEventListener("keydown",E),Z.current=!1}):function(){Z.current=!1}},[d]);var en=function(){var t=e.overlay;return"function"==typeof t?t():t},er=function(){var e=en();return l.createElement(l.Fragment,null,z&&l.createElement("div",{className:"".concat(F,"-arrow")}),e)},eo=I;return eo||-1===Q.indexOf("contextMenu")||(eo=["click"]),l.createElement(c.Z,(0,o.Z)((0,o.Z)({builtinPlacements:void 0===A?p:A},Y),{},{prefixCls:F,ref:et,popupClassName:u()(W,(0,r.Z)({},"".concat(F,"-show-arrow"),z)),popupStyle:D,action:Q,showAction:B,hideAction:eo||[],popupPlacement:void 0===T?"bottomLeft":T,popupAlign:_,popupTransitionName:L,popupAnimation:R,popupVisible:ee,stretch:(k=e.minOverlayWidthMatchTrigger,N=e.alignPoint,"minOverlayWidthMatchTrigger"in e?k:!N)?"minWidth":"",popup:"function"==typeof e.overlay?er:er(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;$(t),"function"==typeof n&&n(t)},onPopupClick:function(t){var n=e.onOverlayClick;$(!1),n&&n(t)},getPopupContainer:S}),(O=(V=e.children).props?V.props:{},M=u()(O.className,void 0!==(n=e.openClassName)?n:"".concat(F,"-open")),ee&&V?l.cloneElement(V,{className:M}):V))})}},function(e){e.O(0,[2757,8091,4381,5101,4763,2139,7910,9774,2888,179],function(){return e(e.s=99096)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1487],{57838:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(97685),o=n(67294);function i(){var e=o.useReducer(function(e){return e+1},0);return(0,r.Z)(e,2)[1]}},24308:function(e,t,n){"use strict";n.d(t,{c4:function(){return i}});var r=n(4942),o=n(87462),i=["xxl","xl","lg","md","sm","xs"],a={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},l=new Map,c=-1,s={};t.ZP={matchHandlers:{},dispatch:function(e){return s=e,l.forEach(function(e){return e(s)}),l.size>=1},subscribe:function(e){return l.size||this.register(),c+=1,l.set(c,e),e(s),c},unsubscribe:function(e){l.delete(e),l.size||this.unregister()},unregister:function(){var e=this;Object.keys(a).forEach(function(t){var n=a[t],r=e.matchHandlers[n];null==r||r.mql.removeListener(null==r?void 0:r.listener)}),l.clear()},register:function(){var e=this;Object.keys(a).forEach(function(t){var n=a[t],i=function(n){var i=n.matches;e.dispatch((0,o.Z)((0,o.Z)({},s),(0,r.Z)({},t,i)))},l=window.matchMedia(n);l.addListener(i),e.matchHandlers[n]={mql:l,listener:i},i(l)})}}},99096:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/hardware-info",function(){return n(51795)}])},94185:function(e,t,n){"use strict";n.d(t,{k:function(){return u}});var r=n(85893),o=n(9085),i=n(92616),a=n.n(i),l=n(58091),c=n(60727);function s(e){let t={};return e.forEach(e=>{let n=new Date(e.time),r=(0,l.Z)(n,"H:mma");t[r]=e.value}),t}a().use(o.ZP);let u=e=>{let{data:t,title:n,color:o,unit:i,dataCollections:a,yFlipped:l,yLogarithmic:u}=e,d=[];t&&t.length>0&&d.push({name:n,color:o,data:s(t)}),a.forEach(e=>{d.push({name:e.name,data:s(e.data),color:e.color,dataset:e.options})});let f={scales:{y:{reverse:!1,type:"linear"},x:{type:"time"}}};return f.scales.y.reverse=l,f.scales.y.type=u?"logarithmic":"linear",(0,r.jsx)("div",{className:"line-chart-container",children:(0,r.jsx)(c.wW,{xtitle:"Time",ytitle:n,suffix:i,legend:"bottom",color:o,data:d,download:n,library:f})})};u.defaultProps={dataCollections:[],data:[],title:"",yFlipped:!1,yLogarithmic:!1}},57390:function(e,t,n){"use strict";n.d(t,{m:function(){return p}});var r=n(85893),o=n(84485),i=n(97910),a=n(74763),l=n(59652);let{Text:c}=o.Z,s={title:"",value:0,prefix:null,suffix:null,color:"",progress:!1,centered:!1,formatter:null},u=e=>{let{prefix:t,value:n,suffix:o,title:i}=e;return(0,r.jsxs)("div",{children:[t,(0,r.jsx)("div",{children:(0,r.jsx)(c,{type:"secondary",children:i})}),(0,r.jsx)("div",{children:(0,r.jsxs)(c,{type:"secondary",children:[n,o||"%"]})})]})},d=e=>{let{title:t,value:n,prefix:o,suffix:a,color:l}=e,c=(0,r.jsx)(u,{prefix:o,value:n,suffix:a,title:t});return(0,r.jsx)(i.Z,{type:"dashboard",percent:n,width:120,strokeColor:{"0%":l,"90%":n>90?"red":l},format:()=>c})};d.defaultProps=s;let f=e=>{let{title:t,value:n,prefix:o,formatter:i}=e;return(0,r.jsx)(a.Z,{title:t,value:n,prefix:o,formatter:i})};f.defaultProps=s;let p=e=>{let{progress:t,centered:n}=e,o=t?d:f;return(0,r.jsx)(l.Z,{type:"inner",children:(0,r.jsx)("div",{style:n?{display:"flex",alignItems:"center",justifyContent:"center"}:{},children:(0,r.jsx)(o,{...e})})})};p.defaultProps=s},51795:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var r=n(85893),o=n(1413),i=n(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z"}}]},name:"laptop",theme:"outlined"},l=n(42135),c=function(e,t){return i.createElement(l.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:t,icon:a}))};c.displayName="LaptopOutlined";var s=i.forwardRef(c),u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z"}}]},name:"bulb",theme:"outlined"},d=function(e,t){return i.createElement(l.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:t,icon:u}))};d.displayName="BulbOutlined";var f=i.forwardRef(d),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},v=function(e,t){return i.createElement(l.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:t,icon:p}))};v.displayName="SaveOutlined";var m=i.forwardRef(v),h=n(84485),g=n(71230),x=n(15746),y=n(64777),w=n(94185),b=n(57390);function Z(){var e,t,n;let[o,a]=(0,i.useState)({cpu:[],memory:[],disk:[],message:""}),l=async()=>{try{let e=await (0,y.rQ)(y.nx);a({...e})}catch(t){a({...o,message:t.message})}};if((0,i.useEffect)(()=>{let e=null;return l(),e=setInterval(l,y.NE),()=>{clearInterval(e)}},[]),!o.cpu)return null;let c=null===(e=o.cpu[o.cpu.length-1])||void 0===e?void 0:e.value,u=null===(t=o.memory[o.memory.length-1])||void 0===t?void 0:t.value,d=null===(n=o.disk[o.disk.length-1])||void 0===n?void 0:n.value,p=[{name:"CPU",color:"#B63FFF",data:o.cpu},{name:"Memory",color:"#2087E2",data:o.memory},{name:"Disk",color:"#FF7700",data:o.disk}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Z.Title,{children:"Hardware Info"}),(0,r.jsx)("br",{}),(0,r.jsxs)("div",{children:[(0,r.jsxs)(g.Z,{gutter:[16,16],justify:"space-around",children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(b.m,{title:p[0].name,value:"".concat(Math.round(c)||0),prefix:(0,r.jsx)(s,{style:{color:p[0].color}}),color:p[0].color,progress:!0,centered:!0})}),(0,r.jsx)(x.Z,{children:(0,r.jsx)(b.m,{title:p[1].name,value:"".concat(Math.round(u)||0),prefix:(0,r.jsx)(f,{style:{color:p[1].color}}),color:p[1].color,progress:!0,centered:!0})}),(0,r.jsx)(x.Z,{children:(0,r.jsx)(b.m,{title:p[2].name,value:"".concat(Math.round(d)||0),prefix:(0,r.jsx)(m,{style:{color:p[2].color}}),color:p[2].color,progress:!0,centered:!0})})]}),(0,r.jsx)(w.k,{title:"% used",dataCollections:p,color:"#FF7700",unit:"%"})]})]})}},60057:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(4942),o=n(1413),i=n(97685),a=n(45987),l=n(67294),c=n(81263),s=n(94184),u=n.n(s),d={adjustX:1,adjustY:1},f=[0,0],p={topLeft:{points:["bl","tl"],overflow:d,offset:[0,-4],targetOffset:f},topCenter:{points:["bc","tc"],overflow:d,offset:[0,-4],targetOffset:f},topRight:{points:["br","tr"],overflow:d,offset:[0,-4],targetOffset:f},bottomLeft:{points:["tl","bl"],overflow:d,offset:[0,4],targetOffset:f},bottomCenter:{points:["tc","bc"],overflow:d,offset:[0,4],targetOffset:f},bottomRight:{points:["tr","br"],overflow:d,offset:[0,4],targetOffset:f}},v=n(15105),m=n(75164),h=n(88603),g=v.Z.ESC,x=v.Z.TAB,y=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"],w=l.forwardRef(function(e,t){var n,s,d,f,v,w,b,Z,j,C,E,k,N,V,O,P,M=e.arrow,z=void 0!==M&&M,H=e.prefixCls,F=void 0===H?"rc-dropdown":H,L=e.transitionName,R=e.animation,_=e.align,T=e.placement,A=e.placements,S=e.getPopupContainer,B=e.showAction,I=e.hideAction,W=e.overlayClassName,D=e.overlayStyle,X=e.visible,q=e.trigger,Q=void 0===q?["hover"]:q,U=e.autoFocus,Y=(0,a.Z)(e,y),G=l.useState(),J=(0,i.Z)(G,2),K=J[0],$=J[1],ee="visible"in e?X:K,et=l.useRef(null);l.useImperativeHandle(t,function(){return et.current}),d=(s={visible:ee,setTriggerVisible:$,triggerRef:et,onVisibleChange:e.onVisibleChange,autoFocus:U}).visible,f=s.setTriggerVisible,v=s.triggerRef,w=s.onVisibleChange,b=s.autoFocus,Z=l.useRef(!1),j=function(){if(d&&v.current){var e,t,n,r;null===(e=v.current)||void 0===e||null===(t=e.triggerRef)||void 0===t||null===(n=t.current)||void 0===n||null===(r=n.focus)||void 0===r||r.call(n),f(!1),"function"==typeof w&&w(!1)}},C=function(){var e,t,n,r,o=(0,h.tS)(null===(e=v.current)||void 0===e?void 0:null===(t=e.popupRef)||void 0===t?void 0:null===(n=t.current)||void 0===n?void 0:null===(r=n.getElement)||void 0===r?void 0:r.call(n))[0];return null!=o&&!!o.focus&&(o.focus(),Z.current=!0,!0)},E=function(e){switch(e.keyCode){case g:j();break;case x:var t=!1;Z.current||(t=C()),t?e.preventDefault():j()}},l.useEffect(function(){return d?(window.addEventListener("keydown",E),b&&(0,m.Z)(C,3),function(){window.removeEventListener("keydown",E),Z.current=!1}):function(){Z.current=!1}},[d]);var en=function(){var t=e.overlay;return"function"==typeof t?t():t},er=function(){var e=en();return l.createElement(l.Fragment,null,z&&l.createElement("div",{className:"".concat(F,"-arrow")}),e)},eo=I;return eo||-1===Q.indexOf("contextMenu")||(eo=["click"]),l.createElement(c.Z,(0,o.Z)((0,o.Z)({builtinPlacements:void 0===A?p:A},Y),{},{prefixCls:F,ref:et,popupClassName:u()(W,(0,r.Z)({},"".concat(F,"-show-arrow"),z)),popupStyle:D,action:Q,showAction:B,hideAction:eo||[],popupPlacement:void 0===T?"bottomLeft":T,popupAlign:_,popupTransitionName:L,popupAnimation:R,popupVisible:ee,stretch:(k=e.minOverlayWidthMatchTrigger,N=e.alignPoint,"minOverlayWidthMatchTrigger"in e?k:!N)?"minWidth":"",popup:"function"==typeof e.overlay?er:er(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;$(t),"function"==typeof n&&n(t)},onPopupClick:function(t){var n=e.onOverlayClick;$(!1),n&&n(t)},getPopupContainer:S}),(O=(V=e.children).props?V.props:{},P=u()(O.className,void 0!==(n=e.openClassName)?n:"".concat(F,"-open")),ee&&V?l.cloneElement(V,{className:P}):V))})}},function(e){e.O(0,[2196,8091,4381,5101,4763,236,7910,9774,2888,179],function(){return e(e.s=99096)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/stream-health-8d96e58eb87c0446.js b/static/web/_next/static/chunks/pages/admin/stream-health-6ff3e3e38deacd0c.js similarity index 96% rename from static/web/_next/static/chunks/pages/admin/stream-health-8d96e58eb87c0446.js rename to static/web/_next/static/chunks/pages/admin/stream-health-6ff3e3e38deacd0c.js index d7dffab7c..b1e7b2f43 100644 --- a/static/web/_next/static/chunks/pages/admin/stream-health-8d96e58eb87c0446.js +++ b/static/web/_next/static/chunks/pages/admin/stream-health-6ff3e3e38deacd0c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2885],{16791:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/stream-health",function(){return a(17253)}])},94185:function(e,t,a){"use strict";a.d(t,{k:function(){return c}});var i=a(85893),r=a(29217),n=a(92616),s=a.n(n),o=a(58091),l=a(60727);function d(e){let t={};return e.forEach(e=>{let a=new Date(e.time),i=(0,o.Z)(a,"H:mma");t[i]=e.value}),t}s().use(r.Z);let c=e=>{let{data:t,title:a,color:r,unit:n,dataCollections:s,yFlipped:o,yLogarithmic:c}=e,u=[];t&&t.length>0&&u.push({name:a,color:r,data:d(t)}),s.forEach(e=>{u.push({name:e.name,data:d(e.data),color:e.color,dataset:e.options})});let h={scales:{y:{reverse:!1,type:"linear"},x:{type:"time"}}};return h.scales.y.reverse=o,h.scales.y.type=c?"logarithmic":"linear",(0,i.jsx)("div",{className:"line-chart-container",children:(0,i.jsx)(l.wW,{xtitle:"Time",ytitle:a,suffix:n,legend:"bottom",color:r,data:u,download:a,library:h})})};c.defaultProps={dataCollections:[],data:[],title:"",yFlipped:!1,yLogarithmic:!1}},28073:function(e,t,a){"use strict";a.d(t,{j:function(){return x}});var i=a(85893),r=a(8751),n=a(11475),s=a(71230),o=a(15746),l=a(74763),d=a(84485),c=a(14670),u=a(71577),h=a(41664),y=a.n(h),p=a(67294),m=a(99519);let x=e=>{let{showTroubleshootButton:t}=e,a=(0,p.useContext)(m.aC),{health:h}=a;if(!h)return null;let{healthy:x,healthPercentage:g,message:f,representation:w}=h,v="#3f8600",j="info";return g<80?(v="#cf000f",j="error"):g<30&&(v="#f0ad4e",j="error"),(0,i.jsxs)("div",{children:[(0,i.jsxs)(s.Z,{gutter:8,children:[(0,i.jsx)(o.Z,{span:12,children:(0,i.jsx)(l.Z,{title:"Healthy Stream",value:x?"Yes":"No",valueStyle:{color:v},prefix:x?(0,i.jsx)(r.Z,{}):(0,i.jsx)(n.Z,{})})}),(0,i.jsx)(o.Z,{span:12,children:(0,i.jsx)(l.Z,{title:"Playback Health",value:g,valueStyle:{color:v},suffix:"%"})})]}),(0,i.jsx)(s.Z,{style:{display:w<100&&0!==w?"grid":"none"},children:(0,i.jsxs)(d.Z.Text,{type:"secondary",style:{textAlign:"center",fontSize:"0.7em",opacity:"0.3"},children:["Stream health represents ",w,"% of all known players. Other player status is unknown."]})}),(0,i.jsx)(s.Z,{gutter:16,style:{width:"100%",display:f?"grid":"none",marginTop:"10px"},children:(0,i.jsx)(o.Z,{span:24,children:(0,i.jsx)(c.Z,{message:f,type:j,showIcon:!0,action:t&&(0,i.jsx)(y(),{passHref:!0,href:"/stream-health",children:(0,i.jsx)(u.Z,{size:"small",type:"text",style:{color:"black"},children:"TROUBLESHOOT"})})})})})]})};x.defaultProps={showTroubleshootButton:!0}},17253:function(e,t,a){"use strict";a.r(t);var i=a(85893),r=a(84485),n=a(14670),s=a(11382),o=a(26713),l=a(71230),d=a(15746),c=a(59652),u=a(74763),h=a(67294),y=a(93069),p=a(24019),m=a(28058),x=a(64777),g=a(94185),f=a(28073);let w=e=>{let{title:t,description:a}=e;return(0,i.jsxs)("div",{className:"description-box",children:[(0,i.jsx)(r.Z.Title,{children:t}),(0,i.jsx)(r.Z.Paragraph,{children:a})]})},v=()=>{var e,t,a,v,j,b,F;let[Z,k]=(0,h.useState)([]),[S,P]=(0,h.useState)([]),[T,N]=(0,h.useState)(),[C,D]=(0,h.useState)(),[E,L]=(0,h.useState)([]),[B,I]=(0,h.useState)([]),[_,q]=(0,h.useState)([]),[O,H]=(0,h.useState)([]),[M,V]=(0,h.useState)([]),[R,z]=(0,h.useState)([]),[A,Q]=(0,h.useState)([]),[Y,X]=(0,h.useState)([]),[U,W]=(0,h.useState)(0),$=async()=>{try{let e=await (0,x.rQ)(x.N$);k(e.errors),P(e.qualityVariantChanges),D(e.highestLatency),N(e.lowestLatency),L(e.medianLatency),I(e.medianSegmentDownloadDuration),q(e.maximumSegmentDownloadDuration),H(e.minimumSegmentDownloadDuration),V(e.minPlayerBitrate),z(e.medianPlayerBitrate),Q(e.maxPlayerBitrate),X(e.availableBitrates),W(e.segmentLength-.3)}catch(t){console.error(t)}};(0,h.useEffect)(()=>{let e=null;return $(),e=setInterval($,x.NE),()=>{clearInterval(e)}},[]);let G=(0,i.jsxs)("div",{children:[(0,i.jsx)(r.Z.Title,{children:"Stream Performance"}),(0,i.jsx)(n.Z,{type:"info",message:" Data has not yet been collected. Once a stream has begun and viewers are watching this page will be available."}),(0,i.jsx)(s.Z,{size:"large",children:(0,i.jsx)("div",{style:{marginTop:"50px",height:"100px"}})})]});if(!(null==Z?void 0:Z.length)||!(null==E?void 0:E.length)||!(null==B?void 0:B.length))return G;let J=[{name:"Errors",color:"#B63FFF",options:{radius:3},data:Z},{name:"Quality changes",color:"#2087E2",options:{radius:2},data:S}],K=[{name:"Max download duration",color:"#B63FFF",options:{radius:2},data:_},{name:"Median download duration",color:"#00FFFF",options:{radius:2},data:B},{name:"Min download duration",color:"#02FD0D",options:{radius:2},data:O},{name:"Approximate limit",color:"#003FFF",data:B.map(e=>({time:e.time,value:U})),options:{radius:0}}],ee=[{name:"Lowest player speed",color:"#B63FFF",data:M,options:{radius:2}},{name:"Median player speed",color:"#00FFFF",data:R,options:{radius:2}},{name:"Maximum player speed",color:"#02FD0D",data:A,options:{radius:2}}];Y.forEach(e=>{ee.push({name:"Available bitrate",color:"#003FFF",data:M.map(t=>({time:t.time,value:e})),options:{radius:0}})});let et=null===(t=null===(e=ee[0])||void 0===e?void 0:e.data[ee[0].data.length-1])||void 0===t?void 0:t.value,ea=null===(a=B[B.length-1])||void 0===a?void 0:a.value,ei=Y[0],er=(null===(v=E[E.length-1])||void 0===v?void 0:v.value)||0,en=(null===(j=C[C.length-1])||void 0===j?void 0:j.value)||0,es=(null===(b=T[T.length-1])||void 0===b?void 0:b.value)||0,eo=(Number(en)+Number(es)+Number(er))/3,el=0,ed=(null===(F=J[0])||void 0===F?void 0:F.data.length)||0;if(ed>5){let ec=J[0].data.slice(-5);el=ec.reduce((e,t)=>e+Number(t.value),0)}else el=J[0].data.reduce((e,t)=>e+Number(t.value),0);let eu=et>0||ea>0||el>0,eh=null,ey=null;0!==et&&etU&&(ey="Your viewers may be consuming your video slower than required. This may be due to slow networks or your latency configuration. You need to decrease the amount of time viewers are taking to consume your video. Consider adding a lower quality with a lower bitrate or experiment with increasing the latency buffer setting.");let ep=el>0?"#B63FFF":"#FFFFFF",em={display:"flex",alignItems:"center",justifyContent:"center",height:"80px"};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Z.Title,{children:"Stream Performance"}),(0,i.jsx)(r.Z.Paragraph,{children:"This tool hopes to help you identify and troubleshoot problems you may be experiencing with your stream. It aims to aggregate experiences across your viewers, meaning one viewer with an exceptionally bad experience may throw off numbers for the whole, especially with a low number of viewers."}),(0,i.jsx)(r.Z.Paragraph,{children:"The data is only collected by those using the Owncast web interface and is unable to gain insight into external players people may be using such as VLC, MPV, QuickTime, etc."}),(0,i.jsxs)(o.Z,{direction:"vertical",size:"middle",children:[(0,i.jsx)(l.Z,{justify:"space-around",children:(0,i.jsx)(d.Z,{style:{width:"100%"},children:(0,i.jsx)(c.Z,{type:"inner",children:(0,i.jsx)(f.j,{showTroubleshootButton:!1})})})}),(0,i.jsxs)(l.Z,{gutter:[16,16],justify:"space-around",style:{display:eu?"flex":"none"},children:[(0,i.jsx)(d.Z,{children:(0,i.jsx)(c.Z,{type:"inner",children:(0,i.jsx)("div",{style:em,children:(0,i.jsx)(u.Z,{title:"Viewer Playback Speed",value:"".concat(et),prefix:(0,i.jsx)(y.Z,{style:{marginRight:"5px"}}),precision:0,suffix:"kbps"})})})}),(0,i.jsx)(d.Z,{children:(0,i.jsx)(c.Z,{type:"inner",children:(0,i.jsx)("div",{style:em,children:(0,i.jsx)(u.Z,{title:"Viewer Latency",value:"".concat(eo),prefix:(0,i.jsx)(p.Z,{style:{marginRight:"5px"}}),precision:0,suffix:"seconds"})})})}),(0,i.jsx)(d.Z,{children:(0,i.jsx)(c.Z,{type:"inner",children:(0,i.jsx)("div",{style:em,children:(0,i.jsx)(u.Z,{title:"Recent Playback Errors",value:"".concat(el||0),valueStyle:{color:ep},prefix:(0,i.jsx)(m.Z,{style:{marginRight:"5px"}}),suffix:""})})})})]}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(w,{title:"Video Segment Download",description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Z.Paragraph,{children:"Once a video segment takes too long to download a viewer will experience buffering. If you see slow downloads you should offer a lower quality for your viewers, or find other ways, possibly an external storage provider, a CDN or a faster network, to improve your stream quality. Increasing your latency buffer can also help for some viewers."}),(0,i.jsx)(r.Z.Paragraph,{children:"In short, once the pink line consistently gets near the blue line, your stream is likely experiencing problems for viewers."})]})}),ey&&(0,i.jsx)(n.Z,{message:"Slow downloads",description:ey,type:"error",showIcon:!0}),(0,i.jsx)(g.k,{title:"Seconds",dataCollections:K,color:"#FF7700",unit:"s",yLogarithmic:!0})]}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(w,{title:"Player Network Speed",description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Z.Paragraph,{children:"The playback bitrate of your viewers. Once somebody's bitrate drops below the lowest video variant bitrate they will experience buffering. If you see viewers with slow connections trying to play your video you should consider offering an additional, lower quality."}),(0,i.jsx)(r.Z.Paragraph,{children:"In short, once the pink line gets near the lowest blue line, your stream is likely experiencing problems for at least one of your viewers."})]})}),eh&&(0,i.jsx)(n.Z,{message:"Low bandwidth viewers",description:eh,type:"error",showIcon:!0}),(0,i.jsx)(g.k,{title:"Lowest Player Bitrate",dataCollections:ee,color:"#FF7700",unit:"kbps",yLogarithmic:!0})]}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(w,{title:"Errors and Quality Changes",description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Z.Paragraph,{children:"Recent number of errors, including buffering, and quality changes from across all your viewers. Errors can occur for many reasons, including browser issues, plugins, wifi problems, and they don't all represent fatal issues or something you have control over."}),"A quality change is not necessarily a negative thing, but if it's excessive and coinciding with errors you should consider adding another quality variant.",(0,i.jsx)(r.Z.Paragraph,{})]})}),(0,i.jsx)(g.k,{title:"#",dataCollections:J,color:"#FF7700",unit:""})]}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(w,{title:"Viewer Latency",description:"An approximate number of seconds that your viewers are behind your live video. The largest cause of latency spikes is buffering. High latency itself is not a problem, and optimizing for low latency can result in buffering, resulting in even higher latency."}),(0,i.jsx)(g.k,{title:"Seconds",dataCollections:[{name:"Median stream latency",color:"#00FFFF",options:{radius:2},data:E},{name:"Lowest stream latency",color:"#02FD0D",options:{radius:2},data:T},{name:"Highest stream latency",color:"#B63FFF",options:{radius:2},data:C}],color:"#FF7700",unit:"s"})]})]})]})};t.default=v}},function(e){e.O(0,[2757,8091,4381,5101,4763,2139,2934,9774,2888,179],function(){return e(e.s=16791)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2885],{16791:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/stream-health",function(){return a(17253)}])},94185:function(e,t,a){"use strict";a.d(t,{k:function(){return c}});var i=a(85893),r=a(9085),n=a(92616),s=a.n(n),o=a(58091),l=a(60727);function d(e){let t={};return e.forEach(e=>{let a=new Date(e.time),i=(0,o.Z)(a,"H:mma");t[i]=e.value}),t}s().use(r.ZP);let c=e=>{let{data:t,title:a,color:r,unit:n,dataCollections:s,yFlipped:o,yLogarithmic:c}=e,u=[];t&&t.length>0&&u.push({name:a,color:r,data:d(t)}),s.forEach(e=>{u.push({name:e.name,data:d(e.data),color:e.color,dataset:e.options})});let h={scales:{y:{reverse:!1,type:"linear"},x:{type:"time"}}};return h.scales.y.reverse=o,h.scales.y.type=c?"logarithmic":"linear",(0,i.jsx)("div",{className:"line-chart-container",children:(0,i.jsx)(l.wW,{xtitle:"Time",ytitle:a,suffix:n,legend:"bottom",color:r,data:u,download:a,library:h})})};c.defaultProps={dataCollections:[],data:[],title:"",yFlipped:!1,yLogarithmic:!1}},28073:function(e,t,a){"use strict";a.d(t,{j:function(){return x}});var i=a(85893),r=a(8751),n=a(11475),s=a(71230),o=a(15746),l=a(74763),d=a(84485),c=a(14670),u=a(71577),h=a(41664),y=a.n(h),p=a(67294),m=a(99519);let x=e=>{let{showTroubleshootButton:t}=e,a=(0,p.useContext)(m.aC),{health:h}=a;if(!h)return null;let{healthy:x,healthPercentage:g,message:f,representation:w}=h,v="#3f8600",j="info";return g<80?(v="#cf000f",j="error"):g<30&&(v="#f0ad4e",j="error"),(0,i.jsxs)("div",{children:[(0,i.jsxs)(s.Z,{gutter:8,children:[(0,i.jsx)(o.Z,{span:12,children:(0,i.jsx)(l.Z,{title:"Healthy Stream",value:x?"Yes":"No",valueStyle:{color:v},prefix:x?(0,i.jsx)(r.Z,{}):(0,i.jsx)(n.Z,{})})}),(0,i.jsx)(o.Z,{span:12,children:(0,i.jsx)(l.Z,{title:"Playback Health",value:g,valueStyle:{color:v},suffix:"%"})})]}),(0,i.jsx)(s.Z,{style:{display:w<100&&0!==w?"grid":"none"},children:(0,i.jsxs)(d.Z.Text,{type:"secondary",style:{textAlign:"center",fontSize:"0.7em",opacity:"0.3"},children:["Stream health represents ",w,"% of all known players. Other player status is unknown."]})}),(0,i.jsx)(s.Z,{gutter:16,style:{width:"100%",display:f?"grid":"none",marginTop:"10px"},children:(0,i.jsx)(o.Z,{span:24,children:(0,i.jsx)(c.Z,{message:f,type:j,showIcon:!0,action:t&&(0,i.jsx)(y(),{passHref:!0,href:"/stream-health",children:(0,i.jsx)(u.Z,{size:"small",type:"text",style:{color:"black"},children:"TROUBLESHOOT"})})})})})]})};x.defaultProps={showTroubleshootButton:!0}},17253:function(e,t,a){"use strict";a.r(t);var i=a(85893),r=a(84485),n=a(14670),s=a(11382),o=a(26713),l=a(71230),d=a(15746),c=a(59652),u=a(74763),h=a(67294),y=a(93069),p=a(24019),m=a(28058),x=a(64777),g=a(94185),f=a(28073);let w=e=>{let{title:t,description:a}=e;return(0,i.jsxs)("div",{className:"description-box",children:[(0,i.jsx)(r.Z.Title,{children:t}),(0,i.jsx)(r.Z.Paragraph,{children:a})]})},v=()=>{var e,t,a,v,j,b,F;let[Z,k]=(0,h.useState)([]),[S,P]=(0,h.useState)([]),[T,N]=(0,h.useState)(),[C,D]=(0,h.useState)(),[E,L]=(0,h.useState)([]),[B,I]=(0,h.useState)([]),[_,q]=(0,h.useState)([]),[O,H]=(0,h.useState)([]),[M,V]=(0,h.useState)([]),[R,z]=(0,h.useState)([]),[A,Q]=(0,h.useState)([]),[Y,X]=(0,h.useState)([]),[U,W]=(0,h.useState)(0),$=async()=>{try{let e=await (0,x.rQ)(x.N$);k(e.errors),P(e.qualityVariantChanges),D(e.highestLatency),N(e.lowestLatency),L(e.medianLatency),I(e.medianSegmentDownloadDuration),q(e.maximumSegmentDownloadDuration),H(e.minimumSegmentDownloadDuration),V(e.minPlayerBitrate),z(e.medianPlayerBitrate),Q(e.maxPlayerBitrate),X(e.availableBitrates),W(e.segmentLength-.3)}catch(t){console.error(t)}};(0,h.useEffect)(()=>{let e=null;return $(),e=setInterval($,x.NE),()=>{clearInterval(e)}},[]);let G=(0,i.jsxs)("div",{children:[(0,i.jsx)(r.Z.Title,{children:"Stream Performance"}),(0,i.jsx)(n.Z,{type:"info",message:" Data has not yet been collected. Once a stream has begun and viewers are watching this page will be available."}),(0,i.jsx)(s.Z,{size:"large",children:(0,i.jsx)("div",{style:{marginTop:"50px",height:"100px"}})})]});if(!(null==Z?void 0:Z.length)||!(null==E?void 0:E.length)||!(null==B?void 0:B.length))return G;let J=[{name:"Errors",color:"#B63FFF",options:{radius:3},data:Z},{name:"Quality changes",color:"#2087E2",options:{radius:2},data:S}],K=[{name:"Max download duration",color:"#B63FFF",options:{radius:2},data:_},{name:"Median download duration",color:"#00FFFF",options:{radius:2},data:B},{name:"Min download duration",color:"#02FD0D",options:{radius:2},data:O},{name:"Approximate limit",color:"#003FFF",data:B.map(e=>({time:e.time,value:U})),options:{radius:0}}],ee=[{name:"Lowest player speed",color:"#B63FFF",data:M,options:{radius:2}},{name:"Median player speed",color:"#00FFFF",data:R,options:{radius:2}},{name:"Maximum player speed",color:"#02FD0D",data:A,options:{radius:2}}];Y.forEach(e=>{ee.push({name:"Available bitrate",color:"#003FFF",data:M.map(t=>({time:t.time,value:e})),options:{radius:0}})});let et=null===(t=null===(e=ee[0])||void 0===e?void 0:e.data[ee[0].data.length-1])||void 0===t?void 0:t.value,ea=null===(a=B[B.length-1])||void 0===a?void 0:a.value,ei=Y[0],er=(null===(v=E[E.length-1])||void 0===v?void 0:v.value)||0,en=(null===(j=C[C.length-1])||void 0===j?void 0:j.value)||0,es=(null===(b=T[T.length-1])||void 0===b?void 0:b.value)||0,eo=(Number(en)+Number(es)+Number(er))/3,el=0,ed=(null===(F=J[0])||void 0===F?void 0:F.data.length)||0;if(ed>5){let ec=J[0].data.slice(-5);el=ec.reduce((e,t)=>e+Number(t.value),0)}else el=J[0].data.reduce((e,t)=>e+Number(t.value),0);let eu=et>0||ea>0||el>0,eh=null,ey=null;0!==et&&etU&&(ey="Your viewers may be consuming your video slower than required. This may be due to slow networks or your latency configuration. You need to decrease the amount of time viewers are taking to consume your video. Consider adding a lower quality with a lower bitrate or experiment with increasing the latency buffer setting.");let ep=el>0?"#B63FFF":"#FFFFFF",em={display:"flex",alignItems:"center",justifyContent:"center",height:"80px"};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Z.Title,{children:"Stream Performance"}),(0,i.jsx)(r.Z.Paragraph,{children:"This tool hopes to help you identify and troubleshoot problems you may be experiencing with your stream. It aims to aggregate experiences across your viewers, meaning one viewer with an exceptionally bad experience may throw off numbers for the whole, especially with a low number of viewers."}),(0,i.jsx)(r.Z.Paragraph,{children:"The data is only collected by those using the Owncast web interface and is unable to gain insight into external players people may be using such as VLC, MPV, QuickTime, etc."}),(0,i.jsxs)(o.Z,{direction:"vertical",size:"middle",children:[(0,i.jsx)(l.Z,{justify:"space-around",children:(0,i.jsx)(d.Z,{style:{width:"100%"},children:(0,i.jsx)(c.Z,{type:"inner",children:(0,i.jsx)(f.j,{showTroubleshootButton:!1})})})}),(0,i.jsxs)(l.Z,{gutter:[16,16],justify:"space-around",style:{display:eu?"flex":"none"},children:[(0,i.jsx)(d.Z,{children:(0,i.jsx)(c.Z,{type:"inner",children:(0,i.jsx)("div",{style:em,children:(0,i.jsx)(u.Z,{title:"Viewer Playback Speed",value:"".concat(et),prefix:(0,i.jsx)(y.Z,{style:{marginRight:"5px"}}),precision:0,suffix:"kbps"})})})}),(0,i.jsx)(d.Z,{children:(0,i.jsx)(c.Z,{type:"inner",children:(0,i.jsx)("div",{style:em,children:(0,i.jsx)(u.Z,{title:"Viewer Latency",value:"".concat(eo),prefix:(0,i.jsx)(p.Z,{style:{marginRight:"5px"}}),precision:0,suffix:"seconds"})})})}),(0,i.jsx)(d.Z,{children:(0,i.jsx)(c.Z,{type:"inner",children:(0,i.jsx)("div",{style:em,children:(0,i.jsx)(u.Z,{title:"Recent Playback Errors",value:"".concat(el||0),valueStyle:{color:ep},prefix:(0,i.jsx)(m.Z,{style:{marginRight:"5px"}}),suffix:""})})})})]}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(w,{title:"Video Segment Download",description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Z.Paragraph,{children:"Once a video segment takes too long to download a viewer will experience buffering. If you see slow downloads you should offer a lower quality for your viewers, or find other ways, possibly an external storage provider, a CDN or a faster network, to improve your stream quality. Increasing your latency buffer can also help for some viewers."}),(0,i.jsx)(r.Z.Paragraph,{children:"In short, once the pink line consistently gets near the blue line, your stream is likely experiencing problems for viewers."})]})}),ey&&(0,i.jsx)(n.Z,{message:"Slow downloads",description:ey,type:"error",showIcon:!0}),(0,i.jsx)(g.k,{title:"Seconds",dataCollections:K,color:"#FF7700",unit:"s",yLogarithmic:!0})]}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(w,{title:"Player Network Speed",description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Z.Paragraph,{children:"The playback bitrate of your viewers. Once somebody's bitrate drops below the lowest video variant bitrate they will experience buffering. If you see viewers with slow connections trying to play your video you should consider offering an additional, lower quality."}),(0,i.jsx)(r.Z.Paragraph,{children:"In short, once the pink line gets near the lowest blue line, your stream is likely experiencing problems for at least one of your viewers."})]})}),eh&&(0,i.jsx)(n.Z,{message:"Low bandwidth viewers",description:eh,type:"error",showIcon:!0}),(0,i.jsx)(g.k,{title:"Lowest Player Bitrate",dataCollections:ee,color:"#FF7700",unit:"kbps",yLogarithmic:!0})]}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(w,{title:"Errors and Quality Changes",description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Z.Paragraph,{children:"Recent number of errors, including buffering, and quality changes from across all your viewers. Errors can occur for many reasons, including browser issues, plugins, wifi problems, and they don't all represent fatal issues or something you have control over."}),"A quality change is not necessarily a negative thing, but if it's excessive and coinciding with errors you should consider adding another quality variant.",(0,i.jsx)(r.Z.Paragraph,{})]})}),(0,i.jsx)(g.k,{title:"#",dataCollections:J,color:"#FF7700",unit:""})]}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(w,{title:"Viewer Latency",description:"An approximate number of seconds that your viewers are behind your live video. The largest cause of latency spikes is buffering. High latency itself is not a problem, and optimizing for low latency can result in buffering, resulting in even higher latency."}),(0,i.jsx)(g.k,{title:"Seconds",dataCollections:[{name:"Median stream latency",color:"#00FFFF",options:{radius:2},data:E},{name:"Lowest stream latency",color:"#02FD0D",options:{radius:2},data:T},{name:"Highest stream latency",color:"#B63FFF",options:{radius:2},data:C}],color:"#FF7700",unit:"s"})]})]})]})};t.default=v}},function(e){e.O(0,[2196,8091,4381,5101,4763,236,2934,9774,2888,179],function(){return e(e.s=16791)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/viewer-info-60ba10fda4e457ce.js b/static/web/_next/static/chunks/pages/admin/viewer-info-1518736f920a85d9.js similarity index 93% rename from static/web/_next/static/chunks/pages/admin/viewer-info-60ba10fda4e457ce.js rename to static/web/_next/static/chunks/pages/admin/viewer-info-1518736f920a85d9.js index bd9947d77..4846784a8 100644 --- a/static/web/_next/static/chunks/pages/admin/viewer-info-60ba10fda4e457ce.js +++ b/static/web/_next/static/chunks/pages/admin/viewer-info-1518736f920a85d9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6109],{87547:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),a=n(67294),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},s=n(42135),o=function(e,t){return a.createElement(s.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:i}))};o.displayName="UserOutlined";var l=a.forwardRef(o)},77349:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(83946),a=n(19013),i=n(13882);function s(e,t){(0,i.Z)(2,arguments);var n=(0,a.Z)(e),s=(0,r.Z)(t);return isNaN(s)?new Date(NaN):(s&&n.setDate(n.getDate()+s),n)}},11640:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(83946),a=n(19013),i=n(13882);function s(e,t){(0,i.Z)(2,arguments);var n=(0,a.Z)(e),s=(0,r.Z)(t);if(isNaN(s))return new Date(NaN);if(!s)return n;var o=n.getDate(),l=new Date(n.getTime());return(l.setMonth(n.getMonth()+s+1,0),o>=l.getDate())?l:(n.setFullYear(l.getFullYear(),l.getMonth(),o),n)}},23279:function(e,t,n){var r=n(13218),a=n(7771),i=n(14841),s=Math.max,o=Math.min;e.exports=function(e,t,n){var l,u,c,d,f,m,h=0,x=!1,y=!1,p=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(t){var n=l,r=u;return l=u=void 0,h=t,d=e.apply(r,n)}function Z(e){var n=e-m,r=e-h;return void 0===m||n>=t||n<0||y&&r>=c}function g(){var e,n,r,i=a();if(Z(i))return w(i);f=setTimeout(g,(e=i-m,n=i-h,r=t-e,y?o(r,c-n):r))}function w(e){return(f=void 0,p&&l)?v(e):(l=u=void 0,d)}function j(){var e,n=a(),r=Z(n);if(l=arguments,u=this,m=n,r){if(void 0===f)return h=e=m,f=setTimeout(g,t),x?v(e):d;if(y)return clearTimeout(f),f=setTimeout(g,t),v(m)}return void 0===f&&(f=setTimeout(g,t)),d}return t=i(t)||0,r(n)&&(x=!!n.leading,c=(y="maxWait"in n)?s(i(n.maxWait)||0,t):c,p="trailing"in n?!!n.trailing:p),j.cancel=function(){void 0!==f&&clearTimeout(f),h=0,l=m=u=f=void 0},j.flush=function(){return void 0===f?d:w(a())},j}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},92794:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/viewer-info",function(){return n(1555)}])},94185:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r=n(85893),a=n(29217),i=n(92616),s=n.n(i),o=n(58091),l=n(60727);function u(e){let t={};return e.forEach(e=>{let n=new Date(e.time),r=(0,o.Z)(n,"H:mma");t[r]=e.value}),t}s().use(a.Z);let c=e=>{let{data:t,title:n,color:a,unit:i,dataCollections:s,yFlipped:o,yLogarithmic:c}=e,d=[];t&&t.length>0&&d.push({name:n,color:a,data:u(t)}),s.forEach(e=>{d.push({name:e.name,data:u(e.data),color:e.color,dataset:e.options})});let f={scales:{y:{reverse:!1,type:"linear"},x:{type:"time"}}};return f.scales.y.reverse=o,f.scales.y.type=c?"logarithmic":"linear",(0,r.jsx)("div",{className:"line-chart-container",children:(0,r.jsx)(l.wW,{xtitle:"Time",ytitle:n,suffix:i,legend:"bottom",color:a,data:d,download:n,library:f})})};c.defaultProps={dataCollections:[],data:[],title:"",yFlipped:!1,yLogarithmic:!1}},57390:function(e,t,n){"use strict";n.d(t,{m:function(){return m}});var r=n(85893),a=n(84485),i=n(97910),s=n(74763),o=n(59652);let{Text:l}=a.Z,u={title:"",value:0,prefix:null,suffix:null,color:"",progress:!1,centered:!1,formatter:null},c=e=>{let{prefix:t,value:n,suffix:a,title:i}=e;return(0,r.jsxs)("div",{children:[t,(0,r.jsx)("div",{children:(0,r.jsx)(l,{type:"secondary",children:i})}),(0,r.jsx)("div",{children:(0,r.jsxs)(l,{type:"secondary",children:[n,a||"%"]})})]})},d=e=>{let{title:t,value:n,prefix:a,suffix:s,color:o}=e,l=(0,r.jsx)(c,{prefix:a,value:n,suffix:s,title:t});return(0,r.jsx)(i.Z,{type:"dashboard",percent:n,width:120,strokeColor:{"0%":o,"90%":n>90?"red":o},format:()=>l})};d.defaultProps=u;let f=e=>{let{title:t,value:n,prefix:a,formatter:i}=e;return(0,r.jsx)(s.Z,{title:t,value:n,prefix:a,formatter:i})};f.defaultProps=u;let m=e=>{let{progress:t,centered:n}=e,a=t?d:f;return(0,r.jsx)(o.Z,{type:"inner",children:(0,r.jsx)("div",{style:n?{display:"flex",alignItems:"center",justifyContent:"center"}:{},children:(0,r.jsx)(a,{...e})})})};m.defaultProps=u},1555:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return C}});var r=n(85893),a=n(67294),i=n(66516),s=n(84485),o=n(71230),l=n(15746),u=n(14670),c=n(11382),d=n(38504),f=n(87547),m=n(80882),h=n(77349),x=n(13882),y=n(83946),p=n(11640);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){if((0,x.Z)(2,arguments),!t||"object"!==v(t))return new Date(NaN);var n=t.years?(0,y.Z)(t.years):0,r=t.months?(0,y.Z)(t.months):0,a=t.weeks?(0,y.Z)(t.weeks):0,i=t.days?(0,y.Z)(t.days):0,s=t.hours?(0,y.Z)(t.hours):0,o=t.minutes?(0,y.Z)(t.minutes):0,l=t.seconds?(0,y.Z)(t.seconds):0,u=function(e,t){(0,x.Z)(2,arguments);var n=(0,y.Z)(t);return(0,h.Z)(e,-n)}(function(e,t){(0,x.Z)(2,arguments);var n=(0,y.Z)(t);return(0,p.Z)(e,-n)}(e,r+12*n),i+7*a);return new Date(u.getTime()-1e3*(l+60*(o+60*s)))}var g=n(19013),w=n(94185),j=n(57390),S=n(52206),b=n(45938),D=n(70241);let N=e=>{let{data:t}=e;return(0,r.jsx)(S.Z,{pagination:{hideOnSinglePage:!0},className:"table-container",columns:[{title:"User Agent",dataIndex:"userAgent",key:"userAgent",render:e=>(0,D.AB)(e)},{title:"Location",dataIndex:"geo",key:"geo",render:e=>e?"".concat(e.regionName,", ").concat(e.countryCode):"-"},{title:"Watch Time",dataIndex:"firstSeen",key:"firstSeen",defaultSortOrder:"ascend",render:e=>(0,b.Z)(new Date(e)),sorter:(e,t)=>new Date(e.firstSeen).getTime()-new Date(t.firstSeen).getTime(),sortDirections:["descend","ascend"]}],dataSource:t,size:"small",rowKey:"id"})};var T=n(99519),k=n(64777);function C(){let e;let t=(0,a.useContext)(T.aC),{online:n,broadcaster:h,viewerCount:y,overallPeakViewerCount:p,sessionPeakViewerCount:v}=t||{};h&&h.time&&(e=new Date(h.time));let S=[{title:"Current stream",start:e},{title:"Last 12 hours",start:Z(new Date,{hours:12})},{title:"Last 24 hours",start:Z(new Date,{hours:24})},{title:"Last 7 days",start:Z(new Date,{days:7})},{title:"Last 30 days",start:Z(new Date,{days:30})},{title:"Last 3 months",start:Z(new Date,{months:3})},{title:"Last 6 months",start:Z(new Date,{months:6})}],[b,D]=(0,a.useState)(!0),[C,_]=(0,a.useState)([]),[E,M]=(0,a.useState)([]),[I,L]=(0,a.useState)(S[1]),P=async()=>{try{let e="".concat(k.iV,"?windowStart=").concat(function(e){return(0,x.Z)(1,arguments),Math.floor(function(e){return(0,x.Z)(1,arguments),(0,g.Z)(e).getTime()}(e)/1e3)}(I.start)),t=await (0,k.rQ)(e);_(t),D(!1)}catch(n){console.log("==== error",n)}try{let r=await (0,k.rQ)(k.a_);M(r)}catch(a){console.log("==== error",a)}};(0,a.useEffect)(()=>{let e=null;return(P(),n)?(e=setInterval(P,6e4),()=>{clearInterval(e)}):()=>[]},[n,I]);let A=e=>{let{key:t}=e;L(S[t])},O=(0,r.jsxs)(i.Z,{children:[n&&e&&(0,r.jsx)(i.Z.Item,{onClick:A,children:S[0].title},"0"),S.slice(1).map((e,t)=>(0,r.jsx)(i.Z.Item,{onClick:A,children:e.title},t+1))]});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z.Title,{children:"Viewer Info"}),(0,r.jsx)("br",{}),(0,r.jsxs)(o.Z,{gutter:[16,16],justify:"space-around",children:[n&&(0,r.jsx)(l.Z,{span:8,md:8,children:(0,r.jsx)(j.m,{title:"Current viewers",value:y.toString(),prefix:(0,r.jsx)(f.Z,{})})}),(0,r.jsx)(l.Z,{md:n?8:12,children:(0,r.jsx)(j.m,{title:n?"Max viewers this stream":"Max viewers last stream",value:v.toString(),prefix:(0,r.jsx)(f.Z,{})})}),(0,r.jsx)(l.Z,{md:n?8:12,children:(0,r.jsx)(j.m,{title:"All-time max viewers",value:p.toString(),prefix:(0,r.jsx)(f.Z,{})})})]}),!C.length&&(0,r.jsx)(u.Z,{style:{marginTop:"10px"},banner:!0,message:"Please wait",description:"No viewer data has been collected yet.",type:"info"}),(0,r.jsxs)(c.Z,{spinning:!C.length||b,children:[(0,r.jsx)(d.Z,{overlay:O,trigger:["click"],children:(0,r.jsxs)("button",{type:"button",style:{float:"right",background:"transparent",border:"unset"},children:[I.title," ",(0,r.jsx)(m.Z,{})]})}),C.length>0&&(0,r.jsx)(w.k,{title:"Viewers",data:C,color:"#2087E2",unit:""}),(0,r.jsx)(N,{data:E})]})]})}}},function(e){e.O(0,[2757,8909,3903,4267,2206,8091,4381,5938,5101,4763,2139,7910,9774,2888,179],function(){return e(e.s=92794)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6109],{87547:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),a=n(67294),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},s=n(42135),o=function(e,t){return a.createElement(s.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:i}))};o.displayName="UserOutlined";var l=a.forwardRef(o)},77349:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(83946),a=n(19013),i=n(13882);function s(e,t){(0,i.Z)(2,arguments);var n=(0,a.Z)(e),s=(0,r.Z)(t);return isNaN(s)?new Date(NaN):(s&&n.setDate(n.getDate()+s),n)}},11640:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(83946),a=n(19013),i=n(13882);function s(e,t){(0,i.Z)(2,arguments);var n=(0,a.Z)(e),s=(0,r.Z)(t);if(isNaN(s))return new Date(NaN);if(!s)return n;var o=n.getDate(),l=new Date(n.getTime());return(l.setMonth(n.getMonth()+s+1,0),o>=l.getDate())?l:(n.setFullYear(l.getFullYear(),l.getMonth(),o),n)}},23279:function(e,t,n){var r=n(13218),a=n(7771),i=n(14841),s=Math.max,o=Math.min;e.exports=function(e,t,n){var l,u,c,d,f,m,h=0,x=!1,y=!1,p=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(t){var n=l,r=u;return l=u=void 0,h=t,d=e.apply(r,n)}function Z(e){var n=e-m,r=e-h;return void 0===m||n>=t||n<0||y&&r>=c}function g(){var e,n,r,i=a();if(Z(i))return w(i);f=setTimeout(g,(e=i-m,n=i-h,r=t-e,y?o(r,c-n):r))}function w(e){return(f=void 0,p&&l)?v(e):(l=u=void 0,d)}function j(){var e,n=a(),r=Z(n);if(l=arguments,u=this,m=n,r){if(void 0===f)return h=e=m,f=setTimeout(g,t),x?v(e):d;if(y)return clearTimeout(f),f=setTimeout(g,t),v(m)}return void 0===f&&(f=setTimeout(g,t)),d}return t=i(t)||0,r(n)&&(x=!!n.leading,c=(y="maxWait"in n)?s(i(n.maxWait)||0,t):c,p="trailing"in n?!!n.trailing:p),j.cancel=function(){void 0!==f&&clearTimeout(f),h=0,l=m=u=f=void 0},j.flush=function(){return void 0===f?d:w(a())},j}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},92794:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/viewer-info",function(){return n(1555)}])},94185:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r=n(85893),a=n(9085),i=n(92616),s=n.n(i),o=n(58091),l=n(60727);function u(e){let t={};return e.forEach(e=>{let n=new Date(e.time),r=(0,o.Z)(n,"H:mma");t[r]=e.value}),t}s().use(a.ZP);let c=e=>{let{data:t,title:n,color:a,unit:i,dataCollections:s,yFlipped:o,yLogarithmic:c}=e,d=[];t&&t.length>0&&d.push({name:n,color:a,data:u(t)}),s.forEach(e=>{d.push({name:e.name,data:u(e.data),color:e.color,dataset:e.options})});let f={scales:{y:{reverse:!1,type:"linear"},x:{type:"time"}}};return f.scales.y.reverse=o,f.scales.y.type=c?"logarithmic":"linear",(0,r.jsx)("div",{className:"line-chart-container",children:(0,r.jsx)(l.wW,{xtitle:"Time",ytitle:n,suffix:i,legend:"bottom",color:a,data:d,download:n,library:f})})};c.defaultProps={dataCollections:[],data:[],title:"",yFlipped:!1,yLogarithmic:!1}},57390:function(e,t,n){"use strict";n.d(t,{m:function(){return m}});var r=n(85893),a=n(84485),i=n(97910),s=n(74763),o=n(59652);let{Text:l}=a.Z,u={title:"",value:0,prefix:null,suffix:null,color:"",progress:!1,centered:!1,formatter:null},c=e=>{let{prefix:t,value:n,suffix:a,title:i}=e;return(0,r.jsxs)("div",{children:[t,(0,r.jsx)("div",{children:(0,r.jsx)(l,{type:"secondary",children:i})}),(0,r.jsx)("div",{children:(0,r.jsxs)(l,{type:"secondary",children:[n,a||"%"]})})]})},d=e=>{let{title:t,value:n,prefix:a,suffix:s,color:o}=e,l=(0,r.jsx)(c,{prefix:a,value:n,suffix:s,title:t});return(0,r.jsx)(i.Z,{type:"dashboard",percent:n,width:120,strokeColor:{"0%":o,"90%":n>90?"red":o},format:()=>l})};d.defaultProps=u;let f=e=>{let{title:t,value:n,prefix:a,formatter:i}=e;return(0,r.jsx)(s.Z,{title:t,value:n,prefix:a,formatter:i})};f.defaultProps=u;let m=e=>{let{progress:t,centered:n}=e,a=t?d:f;return(0,r.jsx)(o.Z,{type:"inner",children:(0,r.jsx)("div",{style:n?{display:"flex",alignItems:"center",justifyContent:"center"}:{},children:(0,r.jsx)(a,{...e})})})};m.defaultProps=u},1555:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return C}});var r=n(85893),a=n(67294),i=n(66516),s=n(84485),o=n(71230),l=n(15746),u=n(14670),c=n(11382),d=n(38504),f=n(87547),m=n(80882),h=n(77349),x=n(13882),y=n(83946),p=n(11640);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){if((0,x.Z)(2,arguments),!t||"object"!==v(t))return new Date(NaN);var n=t.years?(0,y.Z)(t.years):0,r=t.months?(0,y.Z)(t.months):0,a=t.weeks?(0,y.Z)(t.weeks):0,i=t.days?(0,y.Z)(t.days):0,s=t.hours?(0,y.Z)(t.hours):0,o=t.minutes?(0,y.Z)(t.minutes):0,l=t.seconds?(0,y.Z)(t.seconds):0,u=function(e,t){(0,x.Z)(2,arguments);var n=(0,y.Z)(t);return(0,h.Z)(e,-n)}(function(e,t){(0,x.Z)(2,arguments);var n=(0,y.Z)(t);return(0,p.Z)(e,-n)}(e,r+12*n),i+7*a);return new Date(u.getTime()-1e3*(l+60*(o+60*s)))}var g=n(19013),w=n(94185),j=n(57390),S=n(52206),b=n(45938),D=n(70241);let N=e=>{let{data:t}=e;return(0,r.jsx)(S.Z,{pagination:{hideOnSinglePage:!0},className:"table-container",columns:[{title:"User Agent",dataIndex:"userAgent",key:"userAgent",render:e=>(0,D.AB)(e)},{title:"Location",dataIndex:"geo",key:"geo",render:e=>e?"".concat(e.regionName,", ").concat(e.countryCode):"-"},{title:"Watch Time",dataIndex:"firstSeen",key:"firstSeen",defaultSortOrder:"ascend",render:e=>(0,b.Z)(new Date(e)),sorter:(e,t)=>new Date(e.firstSeen).getTime()-new Date(t.firstSeen).getTime(),sortDirections:["descend","ascend"]}],dataSource:t,size:"small",rowKey:"id"})};var T=n(99519),k=n(64777);function C(){let e;let t=(0,a.useContext)(T.aC),{online:n,broadcaster:h,viewerCount:y,overallPeakViewerCount:p,sessionPeakViewerCount:v}=t||{};h&&h.time&&(e=new Date(h.time));let S=[{title:"Current stream",start:e},{title:"Last 12 hours",start:Z(new Date,{hours:12})},{title:"Last 24 hours",start:Z(new Date,{hours:24})},{title:"Last 7 days",start:Z(new Date,{days:7})},{title:"Last 30 days",start:Z(new Date,{days:30})},{title:"Last 3 months",start:Z(new Date,{months:3})},{title:"Last 6 months",start:Z(new Date,{months:6})}],[b,D]=(0,a.useState)(!0),[C,_]=(0,a.useState)([]),[E,M]=(0,a.useState)([]),[I,P]=(0,a.useState)(S[1]),L=async()=>{try{let e="".concat(k.iV,"?windowStart=").concat(function(e){return(0,x.Z)(1,arguments),Math.floor(function(e){return(0,x.Z)(1,arguments),(0,g.Z)(e).getTime()}(e)/1e3)}(I.start)),t=await (0,k.rQ)(e);_(t),D(!1)}catch(n){console.log("==== error",n)}try{let r=await (0,k.rQ)(k.a_);M(r)}catch(a){console.log("==== error",a)}};(0,a.useEffect)(()=>{let e=null;return(L(),n)?(e=setInterval(L,6e4),()=>{clearInterval(e)}):()=>[]},[n,I]);let A=e=>{let{key:t}=e;P(S[t])},O=(0,r.jsxs)(i.Z,{children:[n&&e&&(0,r.jsx)(i.Z.Item,{onClick:A,children:S[0].title},"0"),S.slice(1).map((e,t)=>(0,r.jsx)(i.Z.Item,{onClick:A,children:e.title},t+1))]});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z.Title,{children:"Viewer Info"}),(0,r.jsx)("br",{}),(0,r.jsxs)(o.Z,{gutter:[16,16],justify:"space-around",children:[n&&(0,r.jsx)(l.Z,{span:8,md:8,children:(0,r.jsx)(j.m,{title:"Current viewers",value:y.toString(),prefix:(0,r.jsx)(f.Z,{})})}),(0,r.jsx)(l.Z,{md:n?8:12,children:(0,r.jsx)(j.m,{title:n?"Max viewers this stream":"Max viewers last stream",value:v.toString(),prefix:(0,r.jsx)(f.Z,{})})}),(0,r.jsx)(l.Z,{md:n?8:12,children:(0,r.jsx)(j.m,{title:"All-time max viewers",value:p.toString(),prefix:(0,r.jsx)(f.Z,{})})})]}),!C.length&&(0,r.jsx)(u.Z,{style:{marginTop:"10px"},banner:!0,message:"Please wait",description:"No viewer data has been collected yet.",type:"info"}),(0,r.jsxs)(c.Z,{spinning:!C.length||b,children:[(0,r.jsx)(d.Z,{overlay:O,trigger:["click"],children:(0,r.jsxs)("button",{type:"button",style:{float:"right",background:"transparent",border:"unset"},children:[I.title," ",(0,r.jsx)(m.Z,{})]})}),C.length>0&&(0,r.jsx)(w.k,{title:"Viewers",data:C,color:"#2087E2",unit:""}),(0,r.jsx)(N,{data:E})]})]})}}},function(e){e.O(0,[2196,8909,3903,4267,2206,8091,4381,5938,5101,4763,236,7910,9774,2888,179],function(){return e(e.s=92794)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/q1n6V5Sv1p0oT-5ZJPSmc/_buildManifest.js b/static/web/_next/static/eTNBHC4gaJduSysl1jvZg/_buildManifest.js similarity index 76% rename from static/web/_next/static/q1n6V5Sv1p0oT-5ZJPSmc/_buildManifest.js rename to static/web/_next/static/eTNBHC4gaJduSysl1jvZg/_buildManifest.js index 91bd128e3..d2e1e49a4 100644 --- a/static/web/_next/static/q1n6V5Sv1p0oT-5ZJPSmc/_buildManifest.js +++ b/static/web/_next/static/eTNBHC4gaJduSysl1jvZg/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,a,c,e,i,t,d,n,f,h,b,o,m,u,k,r,g,j,p,l,_,w,v,y,I,B,F){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/api/:path*"},{source:"/hls/:path*"},{source:"/img/:path*"},{source:"/logo"},{source:"/thumbnail.jpg"}],fallback:[]},"/":[a,s,c,t,d,f,o,m,g,"static/chunks/4466-96a54095a7a235f9.js",h,"static/css/901e2e696ed480dd.css","static/chunks/pages/index-08253d4ef17adb43.js"],"/_error":["static/chunks/pages/_error-02cc11fd74b4e5ff.js"],"/admin":[a,s,c,e,i,t,d,n,b,m,"static/chunks/8676-c38bd41883242e8e.js","static/chunks/pages/admin-75288f493201279e.js"],"/admin/access-tokens":[a,s,c,e,i,"static/chunks/pages/admin/access-tokens-91177ddb58bd90ee.js"],"/admin/actions":[a,s,c,e,"static/chunks/pages/admin/actions-9eeca8440633457f.js"],"/admin/chat/messages":[j,a,s,c,e,i,d,p,"static/chunks/pages/admin/chat/messages-7e88922542839f8a.js"],"/admin/chat/users":[j,a,s,c,e,i,t,d,p,"static/chunks/pages/admin/chat/users-072de9838f91e5fb.js"],"/admin/config/appearance":[l,o,_,w,"static/css/6c8941159bdd16f6.css","static/chunks/pages/admin/config/appearance-be1829febefc4db6.js"],"/admin/config-chat":["static/chunks/pages/admin/config-chat-fab037451220beb1.js"],"/admin/config-federation":["static/chunks/8572-deca358d1a965d80.js","static/chunks/pages/admin/config-federation-3e7e0a54acf1bd9b.js"],"/admin/config-notify":["static/chunks/pages/admin/config-notify-b525013f97b7a9a9.js"],"/admin/config-public-details":[l,a,s,c,e,u,_,"static/chunks/1043-3f08d4917e3aa7e7.js","static/chunks/pages/admin/config-public-details-085c048afcb776d7.js"],"/admin/config-server-details":[v,"static/chunks/pages/admin/config-server-details-a148074a13faf6b7.js"],"/admin/config-social-items":[a,s,c,e,"static/chunks/pages/admin/config-social-items-f022d29681248095.js"],"/admin/config-storage":["static/chunks/pages/admin/config-storage-cbcd9a6a6455390c.js"],"/admin/config-video":[a,s,c,e,v,"static/chunks/6962-f197cc126c73fb7f.js","static/chunks/pages/admin/config-video-5e04088ce814f271.js"],"/admin/federation/actions":[a,s,c,e,i,"static/chunks/pages/admin/federation/actions-d79f77b8b18148ad.js"],"/admin/federation/followers":[a,s,c,e,i,t,"static/chunks/pages/admin/federation/followers-0cddb891db616443.js"],"/admin/hardware-info":[k,i,t,n,b,r,u,"static/chunks/pages/admin/hardware-info-ab778720aa460a2f.js"],"/admin/help":[t,n,o,w,"static/chunks/7830-37f6f9f7aaae2bbf.js","static/chunks/pages/admin/help-1963799991a3eee0.js"],"/admin/logs":[a,s,c,e,i,m,"static/chunks/pages/admin/logs-c494c4dc6f214d8b.js"],"/admin/stream-health":[k,i,t,n,b,r,"static/chunks/2934-4a8cbef0e0cea1a5.js","static/chunks/pages/admin/stream-health-8d96e58eb87c0446.js"],"/admin/upgrade":[a,s,c,e,"static/chunks/2069-e3384794326f4767.js","static/chunks/pages/admin/upgrade-41783a74d59f851b.js"],"/admin/viewer-info":[k,a,s,c,e,i,t,d,n,b,r,u,"static/chunks/pages/admin/viewer-info-60ba10fda4e457ce.js"],"/admin/webhooks":[a,s,c,e,"static/chunks/pages/admin/webhooks-c59eaaf1fe4ac78c.js"],"/embed/chat/readonly":[y,I,f,B,h,F,"static/css/4913162dac9a95fc.css","static/chunks/pages/embed/chat/readonly-67babfd67c1bbe6e.js"],"/embed/chat/readwrite":[y,I,s,f,B,"static/chunks/911-9156415c36038fd8.js",h,F,"static/css/4b32f6bf48cc9a1c.css","static/chunks/pages/embed/chat/readwrite-98f900d6cb9a2d39.js"],"/embed/video":["static/chunks/d6e1aeb5-998a8438d86f867e.js",d,f,"static/css/7c735c05af084bb2.css","static/chunks/7902-139b487986de3737.js",g,h,"static/chunks/2239-ceff4252276e3d5e.js","static/css/f065863129f648da.css","static/chunks/pages/embed/video-58a5d6ba4b2bb819.js"],sortedPages:["/","/_app","/_error","/admin","/admin/access-tokens","/admin/actions","/admin/chat/messages","/admin/chat/users","/admin/config/appearance","/admin/config-chat","/admin/config-federation","/admin/config-notify","/admin/config-public-details","/admin/config-server-details","/admin/config-social-items","/admin/config-storage","/admin/config-video","/admin/federation/actions","/admin/federation/followers","/admin/hardware-info","/admin/help","/admin/logs","/admin/stream-health","/admin/upgrade","/admin/viewer-info","/admin/webhooks","/embed/chat/readonly","/embed/chat/readwrite","/embed/video"]}}("static/chunks/3903-37c1af34070ecbf4.js","static/chunks/8909-a395a0ce823f9797.js","static/chunks/4267-cfe0f573c442773c.js","static/chunks/2206-e3f24e552029bbca.js","static/chunks/8091-5d2e0cdb05cd1ef7.js","static/chunks/4381-3dc1e6927d726454.js","static/chunks/5938-b5bac17e4fa31c49.js","static/chunks/5101-e7798e997c291884.js","static/chunks/6395-e4a02973025beaca.js","static/chunks/7466-1e76829814bac0c3.js","static/chunks/4763-cd081ceb0032736f.js","static/chunks/1082-98b1d2f1eae8f1cb.js","static/chunks/5360-2adf520bd8bbb9c6.js","static/chunks/7910-44b63d030e4b1767.js","static/chunks/3fff1979-f01cca2aefcfdf97.js","static/chunks/2139-2d5c6f4e28f188e2.js","static/chunks/8245-b34a27e35386277e.js","static/chunks/29107295-1453a3860b50f70e.js","static/chunks/9550-db4a457e5e1bbbcf.js","static/chunks/4ad82c5e-0279a86e0328570f.js","static/chunks/1943-2e24959fcef510e6.js","static/chunks/1938-540c13593ccef671.js","static/chunks/3286-716fef4ced844a4d.js","static/chunks/d3048c20-b61d7fb6003662e6.js","static/chunks/d2094a0f-ffa3d9fcb172f7b4.js","static/chunks/2852-bdd68deecc4d3e7e.js","static/chunks/4977-ecbc50443dc5370e.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(s,a,c,e,i,t,d,n,f,h,o,b,m,u,k,r,g,j,p,l,_,w,v,y,I,B,F){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/api/:path*"},{source:"/hls/:path*"},{source:"/img/:path*"},{source:"/logo"},{source:"/thumbnail.jpg"}],fallback:[]},"/":[a,s,c,t,d,f,b,m,g,"static/chunks/4466-96a54095a7a235f9.js",h,"static/css/901e2e696ed480dd.css","static/chunks/pages/index-08253d4ef17adb43.js"],"/_error":["static/chunks/pages/_error-02cc11fd74b4e5ff.js"],"/admin":[a,s,c,e,i,t,d,n,o,m,"static/chunks/8676-c38bd41883242e8e.js","static/chunks/pages/admin-75288f493201279e.js"],"/admin/access-tokens":[a,s,c,e,i,"static/chunks/pages/admin/access-tokens-91177ddb58bd90ee.js"],"/admin/actions":[a,s,c,e,"static/chunks/pages/admin/actions-9eeca8440633457f.js"],"/admin/chat/messages":[j,a,s,c,e,i,d,p,"static/chunks/pages/admin/chat/messages-7e88922542839f8a.js"],"/admin/chat/users":[j,a,s,c,e,i,t,d,p,"static/chunks/pages/admin/chat/users-072de9838f91e5fb.js"],"/admin/config/appearance":[l,b,_,w,"static/css/6c8941159bdd16f6.css","static/chunks/pages/admin/config/appearance-be1829febefc4db6.js"],"/admin/config-chat":["static/chunks/pages/admin/config-chat-fab037451220beb1.js"],"/admin/config-federation":["static/chunks/8572-deca358d1a965d80.js","static/chunks/pages/admin/config-federation-3e7e0a54acf1bd9b.js"],"/admin/config-notify":["static/chunks/pages/admin/config-notify-b525013f97b7a9a9.js"],"/admin/config-public-details":[l,a,s,c,e,u,_,"static/chunks/1043-3f08d4917e3aa7e7.js","static/chunks/pages/admin/config-public-details-085c048afcb776d7.js"],"/admin/config-server-details":[v,"static/chunks/pages/admin/config-server-details-a148074a13faf6b7.js"],"/admin/config-social-items":[a,s,c,e,"static/chunks/pages/admin/config-social-items-f022d29681248095.js"],"/admin/config-storage":["static/chunks/pages/admin/config-storage-cbcd9a6a6455390c.js"],"/admin/config-video":[a,s,c,e,v,"static/chunks/6962-f197cc126c73fb7f.js","static/chunks/pages/admin/config-video-5e04088ce814f271.js"],"/admin/federation/actions":[a,s,c,e,i,"static/chunks/pages/admin/federation/actions-d79f77b8b18148ad.js"],"/admin/federation/followers":[a,s,c,e,i,t,"static/chunks/pages/admin/federation/followers-0cddb891db616443.js"],"/admin/hardware-info":[k,i,t,n,o,r,u,"static/chunks/pages/admin/hardware-info-34c5be89db1620b1.js"],"/admin/help":[t,n,b,w,"static/chunks/7830-37f6f9f7aaae2bbf.js","static/chunks/pages/admin/help-1963799991a3eee0.js"],"/admin/logs":[a,s,c,e,i,m,"static/chunks/pages/admin/logs-c494c4dc6f214d8b.js"],"/admin/stream-health":[k,i,t,n,o,r,"static/chunks/2934-4a8cbef0e0cea1a5.js","static/chunks/pages/admin/stream-health-6ff3e3e38deacd0c.js"],"/admin/upgrade":[a,s,c,e,"static/chunks/2069-e3384794326f4767.js","static/chunks/pages/admin/upgrade-41783a74d59f851b.js"],"/admin/viewer-info":[k,a,s,c,e,i,t,d,n,o,r,u,"static/chunks/pages/admin/viewer-info-1518736f920a85d9.js"],"/admin/webhooks":[a,s,c,e,"static/chunks/pages/admin/webhooks-c59eaaf1fe4ac78c.js"],"/embed/chat/readonly":[y,I,f,B,h,F,"static/css/4913162dac9a95fc.css","static/chunks/pages/embed/chat/readonly-67babfd67c1bbe6e.js"],"/embed/chat/readwrite":[y,I,s,f,B,"static/chunks/911-9156415c36038fd8.js",h,F,"static/css/4b32f6bf48cc9a1c.css","static/chunks/pages/embed/chat/readwrite-98f900d6cb9a2d39.js"],"/embed/video":["static/chunks/d6e1aeb5-998a8438d86f867e.js",d,f,"static/css/7c735c05af084bb2.css","static/chunks/7902-139b487986de3737.js",g,h,"static/chunks/2239-ceff4252276e3d5e.js","static/css/f065863129f648da.css","static/chunks/pages/embed/video-58a5d6ba4b2bb819.js"],sortedPages:["/","/_app","/_error","/admin","/admin/access-tokens","/admin/actions","/admin/chat/messages","/admin/chat/users","/admin/config/appearance","/admin/config-chat","/admin/config-federation","/admin/config-notify","/admin/config-public-details","/admin/config-server-details","/admin/config-social-items","/admin/config-storage","/admin/config-video","/admin/federation/actions","/admin/federation/followers","/admin/hardware-info","/admin/help","/admin/logs","/admin/stream-health","/admin/upgrade","/admin/viewer-info","/admin/webhooks","/embed/chat/readonly","/embed/chat/readwrite","/embed/video"]}}("static/chunks/3903-37c1af34070ecbf4.js","static/chunks/8909-a395a0ce823f9797.js","static/chunks/4267-cfe0f573c442773c.js","static/chunks/2206-e3f24e552029bbca.js","static/chunks/8091-5d2e0cdb05cd1ef7.js","static/chunks/4381-3dc1e6927d726454.js","static/chunks/5938-b5bac17e4fa31c49.js","static/chunks/5101-e7798e997c291884.js","static/chunks/6395-e4a02973025beaca.js","static/chunks/7466-1e76829814bac0c3.js","static/chunks/4763-cd081ceb0032736f.js","static/chunks/1082-98b1d2f1eae8f1cb.js","static/chunks/5360-2adf520bd8bbb9c6.js","static/chunks/7910-44b63d030e4b1767.js","static/chunks/ee8b1517-9cf421a7da630c58.js","static/chunks/236-f876fd1a47451d45.js","static/chunks/8245-b34a27e35386277e.js","static/chunks/29107295-1453a3860b50f70e.js","static/chunks/9550-db4a457e5e1bbbcf.js","static/chunks/4ad82c5e-0279a86e0328570f.js","static/chunks/1943-2e24959fcef510e6.js","static/chunks/1938-540c13593ccef671.js","static/chunks/3286-716fef4ced844a4d.js","static/chunks/d3048c20-b61d7fb6003662e6.js","static/chunks/d2094a0f-ffa3d9fcb172f7b4.js","static/chunks/2852-bdd68deecc4d3e7e.js","static/chunks/4977-ecbc50443dc5370e.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/static/web/_next/static/q1n6V5Sv1p0oT-5ZJPSmc/_ssgManifest.js b/static/web/_next/static/eTNBHC4gaJduSysl1jvZg/_ssgManifest.js similarity index 100% rename from static/web/_next/static/q1n6V5Sv1p0oT-5ZJPSmc/_ssgManifest.js rename to static/web/_next/static/eTNBHC4gaJduSysl1jvZg/_ssgManifest.js diff --git a/static/web/admin/access-tokens/index.html b/static/web/admin/access-tokens/index.html index 05b2ea792..839a35dd3 100644 --- a/static/web/admin/access-tokens/index.html +++ b/static/web/admin/access-tokens/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No data

\ No newline at end of file diff --git a/static/web/admin/actions/index.html b/static/web/admin/actions/index.html index 15139b668..9e6897f43 100644 --- a/static/web/admin/actions/index.html +++ b/static/web/admin/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No data

\ No newline at end of file diff --git a/static/web/admin/chat/messages/index.html b/static/web/admin/chat/messages/index.html index 7e844d9eb..7e9f42879 100644 --- a/static/web/admin/chat/messages/index.html +++ b/static/web/admin/chat/messages/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No data
\ No newline at end of file diff --git a/static/web/admin/chat/users/index.html b/static/web/admin/chat/users/index.html index 6dfae6d57..1b55dacca 100644 --- a/static/web/admin/chat/users/index.html +++ b/static/web/admin/chat/users/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file diff --git a/static/web/admin/config-chat/index.html b/static/web/admin/config-chat/index.html index c70287ea1..154cf19eb 100644 --- a/static/web/admin/config-chat/index.html +++ b/static/web/admin/config-chat/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config-federation/index.html b/static/web/admin/config-federation/index.html index 311dd3430..58d3be4ec 100644 --- a/static/web/admin/config-federation/index.html +++ b/static/web/admin/config-federation/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config-notify/index.html b/static/web/admin/config-notify/index.html index d73a92d14..173ffea69 100644 --- a/static/web/admin/config-notify/index.html +++ b/static/web/admin/config-notify/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Social

Enabling the Fediverse social features will not just alert people to when you go live, but also enable other functionality.

Fediverse social features: Disabled

Custom

Build your own notifications by using custom webhooks.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Social

Enabling the Fediverse social features will not just alert people to when you go live, but also enable other functionality.

Fediverse social features: Disabled

Custom

Build your own notifications by using custom webhooks.

\ No newline at end of file diff --git a/static/web/admin/config-public-details/index.html b/static/web/admin/config-public-details/index.html index d1ab28816..8719a2a96 100644 --- a/static/web/admin/config-public-details/index.html +++ b/static/web/admin/config-public-details/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

General Settings

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

General Settings

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file diff --git a/static/web/admin/config-server-details/index.html b/static/web/admin/config-server-details/index.html index 15a9c9dba..5808f193c 100644 --- a/static/web/admin/config-server-details/index.html +++ b/static/web/admin/config-server-details/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Server Settings

You should change your stream key from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Server Settings

You should change your stream key from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file diff --git a/static/web/admin/config-social-items/index.html b/static/web/admin/config-social-items/index.html index f8b48433f..ef5e6c5be 100644 --- a/static/web/admin/config-social-items/index.html +++ b/static/web/admin/config-social-items/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file diff --git a/static/web/admin/config-storage/index.html b/static/web/admin/config-storage/index.html index 2c3574636..5e51ac512 100644 --- a/static/web/admin/config-storage/index.html +++ b/static/web/admin/config-storage/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Storage

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Storage

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file diff --git a/static/web/admin/config-video/index.html b/static/web/admin/config-video/index.html index eca6c8888..c7565dc2f 100644 --- a/static/web/admin/config-video/index.html +++ b/static/web/admin/config-video/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file diff --git a/static/web/admin/config/appearance/index.html b/static/web/admin/config/appearance/index.html index 3a7271d07..9ceabbe72 100644 --- a/static/web/admin/config/appearance/index.html +++ b/static/web/admin/config/appearance/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
Loading...
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
Loading...
\ No newline at end of file diff --git a/static/web/admin/federation/actions/index.html b/static/web/admin/federation/actions/index.html index 86b2b6a40..a3e9ef883 100644 --- a/static/web/admin/federation/actions/index.html +++ b/static/web/admin/federation/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No data
\ No newline at end of file diff --git a/static/web/admin/federation/followers/index.html b/static/web/admin/federation/followers/index.html index 99793562f..298aafde0 100644 --- a/static/web/admin/federation/followers/index.html +++ b/static/web/admin/federation/followers/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No data
\ No newline at end of file diff --git a/static/web/admin/hardware-info/index.html b/static/web/admin/hardware-info/index.html index 04c45d939..16557ad3e 100644 --- a/static/web/admin/hardware-info/index.html +++ b/static/web/admin/hardware-info/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


CPU
0%
Memory
0%
Disk
0%
Loading...
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


CPU
0%
Memory
0%
Disk
0%
Loading...
\ No newline at end of file diff --git a/static/web/admin/help/index.html b/static/web/admin/help/index.html index 2ffd5da89..7dcfa8ba0 100644 --- a/static/web/admin/help/index.html +++ b/static/web/admin/help/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file diff --git a/static/web/admin/index.html b/static/web/admin/index.html index 76c52a504..2bd3761a4 100644 --- a/static/web/admin/index.html +++ b/static/web/admin/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Use your broadcasting software
Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Use your broadcasting software
Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file diff --git a/static/web/admin/logs/index.html b/static/web/admin/logs/index.html index c734d7795..4ff825bb5 100644 --- a/static/web/admin/logs/index.html +++ b/static/web/admin/logs/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/stream-health/index.html b/static/web/admin/stream-health/index.html index 80e53c0f7..795a6f7aa 100644 --- a/static/web/admin/stream-health/index.html +++ b/static/web/admin/stream-health/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file diff --git a/static/web/admin/upgrade/index.html b/static/web/admin/upgrade/index.html index 70a37a0a3..cf67497ac 100644 --- a/static/web/admin/upgrade/index.html +++ b/static/web/admin/upgrade/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No data
\ No newline at end of file diff --git a/static/web/admin/viewer-info/index.html b/static/web/admin/viewer-info/index.html index bee516e60..a78ec100f 100644 --- a/static/web/admin/viewer-info/index.html +++ b/static/web/admin/viewer-info/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No data
\ No newline at end of file diff --git a/static/web/admin/webhooks/index.html b/static/web/admin/webhooks/index.html index 330d0399c..b5e02a70f 100644 --- a/static/web/admin/webhooks/index.html +++ b/static/web/admin/webhooks/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No data

\ No newline at end of file diff --git a/static/web/embed/chat/readonly/index.html b/static/web/embed/chat/readonly/index.html index 385baed4d..968c45f91 100644 --- a/static/web/embed/chat/readonly/index.html +++ b/static/web/embed/chat/readonly/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/static/web/embed/chat/readwrite/index.html b/static/web/embed/chat/readwrite/index.html index ae704db0a..e5c4821c7 100644 --- a/static/web/embed/chat/readwrite/index.html +++ b/static/web/embed/chat/readwrite/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/static/web/embed/video/index.html b/static/web/embed/video/index.html index 59cf6d0f4..881335650 100644 --- a/static/web/embed/video/index.html +++ b/static/web/embed/video/index.html @@ -1 +1 @@ -
This stream is offline. Check back soon!
\ No newline at end of file +
This stream is offline. Check back soon!
\ No newline at end of file diff --git a/static/web/index.html b/static/web/index.html index bc93dece2..ab758e30f 100644 --- a/static/web/index.html +++ b/static/web/index.html @@ -1,9 +1,9 @@ {{.Name}}
{{.Name}}
Logo
Preview
\ No newline at end of file +
Logo
Preview
\ No newline at end of file