From f3bc7b4d984795e5bbc16c322febee715efbd55f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 19 Dec 2022 11:16:24 +0000 Subject: [PATCH] Bundle embedded web app --- static/web/404.html | 4 ++-- static/web/404/index.html | 4 ++-- .../_next/static/chunks/236-f876fd1a47451d45.js | 17 ----------------- ...27e35386277e.js => 7066-524305b22bfbc967.js} | 2 +- .../static/chunks/8245-e589f4c6673abc2b.js | 17 +++++++++++++++++ .../static/chunks/ee8b1517-9cf421a7da630c58.js | 6 ------ .../static/chunks/ee8b1517-c2bace5e006cd9c6.js | 6 ++++++ ...513.js => hardware-info-afa06ef51937f55f.js} | 2 +- ...cb6.js => stream-health-26c387527539722e.js} | 2 +- ...26618.js => viewer-info-359b6b1bdfc50de3.js} | 2 +- ...d59027d2c31.js => video-ff4917f8414b83db.js} | 2 +- ...d08775a251c.js => index-364351964706eb84.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/emojis/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/config/streamkeys/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 ++-- 43 files changed, 64 insertions(+), 64 deletions(-) delete mode 100644 static/web/_next/static/chunks/236-f876fd1a47451d45.js rename static/web/_next/static/chunks/{8245-b34a27e35386277e.js => 7066-524305b22bfbc967.js} (99%) create mode 100644 static/web/_next/static/chunks/8245-e589f4c6673abc2b.js delete mode 100644 static/web/_next/static/chunks/ee8b1517-9cf421a7da630c58.js create mode 100644 static/web/_next/static/chunks/ee8b1517-c2bace5e006cd9c6.js rename static/web/_next/static/chunks/pages/admin/{hardware-info-c3e778b57a2b1513.js => hardware-info-afa06ef51937f55f.js} (99%) rename static/web/_next/static/chunks/pages/admin/{stream-health-8f1f5efaa8ebdcb6.js => stream-health-26c387527539722e.js} (99%) rename static/web/_next/static/chunks/pages/admin/{viewer-info-028b7180ef826618.js => viewer-info-359b6b1bdfc50de3.js} (98%) rename static/web/_next/static/chunks/pages/embed/{video-04abad59027d2c31.js => video-ff4917f8414b83db.js} (98%) rename static/web/_next/static/chunks/pages/{index-49786d08775a251c.js => index-364351964706eb84.js} (99%) rename static/web/_next/static/{pPurWOaetFtZdDX44pOoU => pgO_dCEG6ksRzmGL_PJKC}/_buildManifest.js (83%) rename static/web/_next/static/{pPurWOaetFtZdDX44pOoU => pgO_dCEG6ksRzmGL_PJKC}/_ssgManifest.js (100%) diff --git a/static/web/404.html b/static/web/404.html index b86948271..2cbd0b166 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 b86948271..2cbd0b166 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/236-f876fd1a47451d45.js b/static/web/_next/static/chunks/236-f876fd1a47451d45.js deleted file mode 100644 index ad1e4cce2..000000000 --- a/static/web/_next/static/chunks/236-f876fd1a47451d45.js +++ /dev/null @@ -1,17 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[236],{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},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,st.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rt.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};t.Z=function(e){var t,n=u.useContext(s.E_),o=n.getPrefixCls,c=n.direction,d=e.prefixCls,f=e.type,h=void 0===f?"horizontal":f,m=e.orientation,g=void 0===m?"center":m,y=e.orientationMargin,v=e.className,p=e.children,b=e.dashed,w=e.plain,M=l(e,["prefixCls","type","orientation","orientationMargin","className","children","dashed","plain"]),k=o("divider",d),Z=g.length>0?"-".concat(g):g,C=!!p,O="left"===g&&null!=y,P="right"===g&&null!=y,S=i()(k,"".concat(k,"-").concat(h),(t={},(0,r.Z)(t,"".concat(k,"-with-text"),C),(0,r.Z)(t,"".concat(k,"-with-text").concat(Z),C),(0,r.Z)(t,"".concat(k,"-dashed"),!!b),(0,r.Z)(t,"".concat(k,"-plain"),!!w),(0,r.Z)(t,"".concat(k,"-rtl"),"rtl"===c),(0,r.Z)(t,"".concat(k,"-no-default-orientation-margin-left"),O),(0,r.Z)(t,"".concat(k,"-no-default-orientation-margin-right"),P),t),v),E=(0,a.Z)((0,a.Z)({},O&&{marginLeft:y}),P&&{marginRight:y});return u.createElement("div",(0,a.Z)({className:S},M,{role:"separator"}),p&&"vertical"!==h&&u.createElement("span",{className:"".concat(k,"-inner-text"),style:E},p))}},86559:function(e,t,n){n.d(t,{Z:function(){return c}});var a,r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function o(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var i={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},u={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(e){return function(t,n){var a;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):r;a=e.formattingValues[o]||e.formattingValues[r]}else{var i=e.defaultWidth,u=null!=n&&n.width?String(n.width):e.defaultWidth;a=e.values[u]||e.values[i]}return a[e.argumentCallback?e.argumentCallback(t):t]}}function l(e){return function(t){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var u=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(var n=0;n0?"in "+a:a+" ago":a},formatLong:i,formatRelative:function(e,t,n,a){return u[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:s({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:s({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:s({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(a={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(a.matchPattern);if(!n)return null;var r=n[0],o=e.match(a.parsePattern);if(!o)return null;var i=a.valueCallback?a.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}}},84314:function(e,t,n){n.d(t,{j:function(){return r}});var a={};function r(){return a}},24262:function(e,t,n){n.d(t,{Z:function(){return a}});function a(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}},83946:function(e,t,n){n.d(t,{Z:function(){return a}});function a(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}},77349:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(83946),r=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,r.Z)(e),i=(0,a.Z)(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}},11640:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(83946),r=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,r.Z)(e),i=(0,a.Z)(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var u=n.getDate(),s=new Date(n.getTime());return(s.setMonth(n.getMonth()+i+1,0),u>=s.getDate())?s:(n.setFullYear(s.getFullYear(),s.getMonth(),u),n)}},75401:function(e,t,n){n.d(t,{Z:function(){return u}});var a=n(24262),r=n(19013),o=n(13882);function i(e){(0,o.Z)(1,arguments);var t=(0,r.Z)(e);return t.setHours(0,0,0,0),t}function u(e,t){(0,o.Z)(2,arguments);var n=i(e),r=i(t);return Math.round((n.getTime()-(0,a.Z)(n)-(r.getTime()-(0,a.Z)(r)))/864e5)}},68730:function(e,t,n){n.d(t,{Z:function(){return v}});var a=n(49474),r=n(77349),o=n(11640),i=n(19013),u=n(13882),s=n(83946);function l(e){return(l="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 c(e,t){if((0,u.Z)(2,arguments),!t||"object"!==l(t))return new Date(NaN);var n=t.years?(0,s.Z)(t.years):0,a=t.months?(0,s.Z)(t.months):0,c=t.weeks?(0,s.Z)(t.weeks):0,d=t.days?(0,s.Z)(t.days):0,f=t.hours?(0,s.Z)(t.hours):0,h=t.minutes?(0,s.Z)(t.minutes):0,m=t.seconds?(0,s.Z)(t.seconds):0,g=(0,i.Z)(e),y=a||n?(0,o.Z)(g,a+12*n):g,v=d||c?(0,r.Z)(y,d+7*c):y;return new Date(v.getTime()+1e3*(m+60*(h+60*f)))}var d=n(75401);function f(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}var h=n(59910),m=n(93645),g=n(82161),y=n(11699);function v(e){(0,u.Z)(1,arguments);var t=(0,i.Z)(e.start),n=(0,i.Z)(e.end);if(isNaN(t.getTime()))throw RangeError("Start Date is invalid");if(isNaN(n.getTime()))throw RangeError("End Date is invalid");var r={};r.years=Math.abs(function(e,t){(0,u.Z)(2,arguments);var n=(0,i.Z)(e),r=(0,i.Z)(t),o=(0,a.Z)(n,r),s=Math.abs(function(e,t){(0,u.Z)(2,arguments);var n=(0,i.Z)(e),a=(0,i.Z)(t);return n.getFullYear()-a.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);var l=(0,a.Z)(n,r)===-o,c=o*(s-Number(l));return 0===c?0:c}(n,t));var o=(0,a.Z)(n,t),s=c(t,{years:o*r.years});r.months=Math.abs((0,g.Z)(n,s));var l=c(s,{months:o*r.months});r.days=Math.abs(function(e,t){(0,u.Z)(2,arguments);var n=(0,i.Z)(e),a=(0,i.Z)(t),r=f(n,a),o=Math.abs((0,d.Z)(n,a));n.setDate(n.getDate()-r*o);var s=Number(f(n,a)===-r),l=r*(o-s);return 0===l?0:l}(n,l));var v=c(l,{days:o*r.days});r.hours=Math.abs(function(e,t,n){(0,u.Z)(2,arguments);var a=(0,h.Z)(e,t)/36e5;return(0,m.u)(null==n?void 0:n.roundingMethod)(a)}(n,v));var p=c(v,{hours:o*r.hours});r.minutes=Math.abs(function(e,t,n){(0,u.Z)(2,arguments);var a=(0,h.Z)(e,t)/6e4;return(0,m.u)(null==n?void 0:n.roundingMethod)(a)}(n,p));var b=c(p,{minutes:o*r.minutes});return r.seconds=Math.abs((0,y.Z)(n,b)),r}},49218:function(e,t,n){n.d(t,{y1:function(){return x}});var a="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function r(e,t,n,a){e.addEventListener?e.addEventListener(t,n,a):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function o(e,t){for(var n=t.slice(0,t.length-1),a=0;a=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var u={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":a?173:189,"=":a?61:187,";":a?59:186,"'":222,"[":219,"]":221,"\\":220},s={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},l={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},c={16:!1,18:!1,17:!1,91:!1},d={},f=1;f<20;f++)u["f".concat(f)]=111+f;var h=[],m=!1,g="all",y=[],v=function(e){return u[e.toLowerCase()]||s[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function p(e){g=e||"all"}function b(){return g||"all"}var w=function(e){var t=e.key,n=e.scope,a=e.method,r=e.splitKey,u=void 0===r?"+":r;i(t).forEach(function(e){var t=e.split(u),r=t.length,i=t[r-1],l="*"===i?"*":v(i);if(d[l]){n||(n=b());var c=r>1?o(s,t):[];d[l]=d[l].filter(function(e){return!((!a||e.method===a)&&e.scope===n&&function(e,t){for(var n=e.length>=t.length?e:t,a=e.length>=t.length?t:e,r=!0,o=0;o0,c)Object.prototype.hasOwnProperty.call(c,o)&&(!c[o]&&t.mods.indexOf(+o)>-1||c[o]&&-1===t.mods.indexOf(+o))&&(r=!1);(0!==t.mods.length||c[16]||c[18]||c[17]||c[91])&&!r&&"*"!==t.shortcut||!1!==t.method(e,t)||(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function k(e,t){var n=d["*"],a=e.keyCode||e.which||e.charCode;if(Z.filter.call(this,e)){if((93===a||224===a)&&(a=91),-1===h.indexOf(a)&&229!==a&&h.push(a),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(t){var n=l[t];e[t]&&-1===h.indexOf(n)?h.push(n):!e[t]&&h.indexOf(n)>-1?h.splice(h.indexOf(n),1):"metaKey"===t&&e[t]&&3===h.length&&!(e.ctrlKey||e.shiftKey||e.altKey)&&(h=h.slice(h.indexOf(n)))}),a in c){for(var r in c[a]=!0,s)s[r]===a&&(Z[r]=!0);if(!n)return}for(var o in c)Object.prototype.hasOwnProperty.call(c,o)&&(c[o]=e[l[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===h.indexOf(17)&&h.push(17),-1===h.indexOf(18)&&h.push(18),c[17]=!0,c[18]=!0);var i=b();if(n)for(var u=0;u1&&(l=o(s,e)),(e="*"===(e=e[e.length-1])?"*":v(e))in d||(d[e]=[]),d[e].push({keyup:b,keydown:w,scope:f,mods:l,shortcut:u[p],method:n,key:u[p],splitKey:M,element:g});void 0!==g&&(a=g,!(y.indexOf(a)>-1))&&window&&(y.push(g),r(g,"keydown",function(e){k(e,g)},C),m||(m=!0,r(window,"focus",function(){h=[]},C)),r(g,"keyup",function(e){k(e,g),function(e){var t=e.keyCode||e.which||e.charCode,n=h.indexOf(t);if(n>=0&&h.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&h.splice(0,h.length),(93===t||224===t)&&(t=91),t in c)for(var a in c[t]=!1,s)s[a]===t&&(Z[a]=!1)}(e)},C))}var C={setScope:p,getScope:b,deleteScope:function(e,t){var n,a;for(var r in e||(e=b()),d)if(Object.prototype.hasOwnProperty.call(d,r))for(a=0,n=d[r];a1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(d).forEach(function(n){var a=d[n].find(function(n){return n.scope===t&&n.shortcut===e});a&&a.method&&a.method()})},unbind:function(e){if(void 0===e)Object.keys(d).forEach(function(e){return delete d[e]});else if(Array.isArray(e))e.forEach(function(e){e.key&&w(e)});else if("object"==typeof e)e.key&&w(e);else if("string"==typeof e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;at.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rt.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};t.Z=function(e){var t,n=u.useContext(s.E_),o=n.getPrefixCls,c=n.direction,d=e.prefixCls,f=e.type,h=void 0===f?"horizontal":f,m=e.orientation,g=void 0===m?"center":m,y=e.orientationMargin,v=e.className,p=e.children,b=e.dashed,w=e.plain,M=l(e,["prefixCls","type","orientation","orientationMargin","className","children","dashed","plain"]),k=o("divider",d),Z=g.length>0?"-".concat(g):g,C=!!p,O="left"===g&&null!=y,P="right"===g&&null!=y,S=i()(k,"".concat(k,"-").concat(h),(t={},(0,r.Z)(t,"".concat(k,"-with-text"),C),(0,r.Z)(t,"".concat(k,"-with-text").concat(Z),C),(0,r.Z)(t,"".concat(k,"-dashed"),!!b),(0,r.Z)(t,"".concat(k,"-plain"),!!w),(0,r.Z)(t,"".concat(k,"-rtl"),"rtl"===c),(0,r.Z)(t,"".concat(k,"-no-default-orientation-margin-left"),O),(0,r.Z)(t,"".concat(k,"-no-default-orientation-margin-right"),P),t),v),E=(0,a.Z)((0,a.Z)({},O&&{marginLeft:y}),P&&{marginRight:y});return u.createElement("div",(0,a.Z)({className:S},M,{role:"separator"}),p&&"vertical"!==h&&u.createElement("span",{className:"".concat(k,"-inner-text"),style:E},p))}},86559:function(e,t,n){n.d(t,{Z:function(){return c}});var a,r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function o(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var i={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},u={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(e){return function(t,n){var a;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):r;a=e.formattingValues[o]||e.formattingValues[r]}else{var i=e.defaultWidth,u=null!=n&&n.width?String(n.width):e.defaultWidth;a=e.values[u]||e.values[i]}return a[e.argumentCallback?e.argumentCallback(t):t]}}function l(e){return function(t){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var u=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(var n=0;n0?"in "+a:a+" ago":a},formatLong:i,formatRelative:function(e,t,n,a){return u[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:s({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:s({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:s({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(a={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(a.matchPattern);if(!n)return null;var r=n[0],o=e.match(a.parsePattern);if(!o)return null;var i=a.valueCallback?a.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}}},84314:function(e,t,n){n.d(t,{j:function(){return r}});var a={};function r(){return a}},24262:function(e,t,n){n.d(t,{Z:function(){return a}});function a(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}},83946:function(e,t,n){n.d(t,{Z:function(){return a}});function a(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}},77349:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(83946),r=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,r.Z)(e),i=(0,a.Z)(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}},11640:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(83946),r=n(19013),o=n(13882);function i(e,t){(0,o.Z)(2,arguments);var n=(0,r.Z)(e),i=(0,a.Z)(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var u=n.getDate(),s=new Date(n.getTime());return(s.setMonth(n.getMonth()+i+1,0),u>=s.getDate())?s:(n.setFullYear(s.getFullYear(),s.getMonth(),u),n)}},75401:function(e,t,n){n.d(t,{Z:function(){return u}});var a=n(24262),r=n(19013),o=n(13882);function i(e){(0,o.Z)(1,arguments);var t=(0,r.Z)(e);return t.setHours(0,0,0,0),t}function u(e,t){(0,o.Z)(2,arguments);var n=i(e),r=i(t);return Math.round((n.getTime()-(0,a.Z)(n)-(r.getTime()-(0,a.Z)(r)))/864e5)}},68730:function(e,t,n){n.d(t,{Z:function(){return v}});var a=n(49474),r=n(77349),o=n(11640),i=n(19013),u=n(13882),s=n(83946);function l(e){return(l="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 c(e,t){if((0,u.Z)(2,arguments),!t||"object"!==l(t))return new Date(NaN);var n=t.years?(0,s.Z)(t.years):0,a=t.months?(0,s.Z)(t.months):0,c=t.weeks?(0,s.Z)(t.weeks):0,d=t.days?(0,s.Z)(t.days):0,f=t.hours?(0,s.Z)(t.hours):0,h=t.minutes?(0,s.Z)(t.minutes):0,m=t.seconds?(0,s.Z)(t.seconds):0,g=(0,i.Z)(e),y=a||n?(0,o.Z)(g,a+12*n):g,v=d||c?(0,r.Z)(y,d+7*c):y;return new Date(v.getTime()+1e3*(m+60*(h+60*f)))}var d=n(75401);function f(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}var h=n(59910),m=n(93645),g=n(82161),y=n(11699);function v(e){(0,u.Z)(1,arguments);var t=(0,i.Z)(e.start),n=(0,i.Z)(e.end);if(isNaN(t.getTime()))throw RangeError("Start Date is invalid");if(isNaN(n.getTime()))throw RangeError("End Date is invalid");var r={};r.years=Math.abs(function(e,t){(0,u.Z)(2,arguments);var n=(0,i.Z)(e),r=(0,i.Z)(t),o=(0,a.Z)(n,r),s=Math.abs(function(e,t){(0,u.Z)(2,arguments);var n=(0,i.Z)(e),a=(0,i.Z)(t);return n.getFullYear()-a.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);var l=(0,a.Z)(n,r)===-o,c=o*(s-Number(l));return 0===c?0:c}(n,t));var o=(0,a.Z)(n,t),s=c(t,{years:o*r.years});r.months=Math.abs((0,g.Z)(n,s));var l=c(s,{months:o*r.months});r.days=Math.abs(function(e,t){(0,u.Z)(2,arguments);var n=(0,i.Z)(e),a=(0,i.Z)(t),r=f(n,a),o=Math.abs((0,d.Z)(n,a));n.setDate(n.getDate()-r*o);var s=Number(f(n,a)===-r),l=r*(o-s);return 0===l?0:l}(n,l));var v=c(l,{days:o*r.days});r.hours=Math.abs(function(e,t,n){(0,u.Z)(2,arguments);var a=(0,h.Z)(e,t)/36e5;return(0,m.u)(null==n?void 0:n.roundingMethod)(a)}(n,v));var p=c(v,{hours:o*r.hours});r.minutes=Math.abs(function(e,t,n){(0,u.Z)(2,arguments);var a=(0,h.Z)(e,t)/6e4;return(0,m.u)(null==n?void 0:n.roundingMethod)(a)}(n,p));var b=c(p,{minutes:o*r.minutes});return r.seconds=Math.abs((0,y.Z)(n,b)),r}},49218:function(e,t,n){n.d(t,{y1:function(){return x}});var a="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function r(e,t,n,a){e.addEventListener?e.addEventListener(t,n,a):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function o(e,t){for(var n=t.slice(0,t.length-1),a=0;a=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var u={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":a?173:189,"=":a?61:187,";":a?59:186,"'":222,"[":219,"]":221,"\\":220},s={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},l={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},c={16:!1,18:!1,17:!1,91:!1},d={},f=1;f<20;f++)u["f".concat(f)]=111+f;var h=[],m=!1,g="all",y=[],v=function(e){return u[e.toLowerCase()]||s[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function p(e){g=e||"all"}function b(){return g||"all"}var w=function(e){var t=e.key,n=e.scope,a=e.method,r=e.splitKey,u=void 0===r?"+":r;i(t).forEach(function(e){var t=e.split(u),r=t.length,i=t[r-1],l="*"===i?"*":v(i);if(d[l]){n||(n=b());var c=r>1?o(s,t):[];d[l]=d[l].filter(function(e){return!((!a||e.method===a)&&e.scope===n&&function(e,t){for(var n=e.length>=t.length?e:t,a=e.length>=t.length?t:e,r=!0,o=0;o0,c)Object.prototype.hasOwnProperty.call(c,o)&&(!c[o]&&t.mods.indexOf(+o)>-1||c[o]&&-1===t.mods.indexOf(+o))&&(r=!1);(0!==t.mods.length||c[16]||c[18]||c[17]||c[91])&&!r&&"*"!==t.shortcut||!1!==t.method(e,t)||(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function k(e,t){var n=d["*"],a=e.keyCode||e.which||e.charCode;if(Z.filter.call(this,e)){if((93===a||224===a)&&(a=91),-1===h.indexOf(a)&&229!==a&&h.push(a),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(t){var n=l[t];e[t]&&-1===h.indexOf(n)?h.push(n):!e[t]&&h.indexOf(n)>-1?h.splice(h.indexOf(n),1):"metaKey"===t&&e[t]&&3===h.length&&!(e.ctrlKey||e.shiftKey||e.altKey)&&(h=h.slice(h.indexOf(n)))}),a in c){for(var r in c[a]=!0,s)s[r]===a&&(Z[r]=!0);if(!n)return}for(var o in c)Object.prototype.hasOwnProperty.call(c,o)&&(c[o]=e[l[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===h.indexOf(17)&&h.push(17),-1===h.indexOf(18)&&h.push(18),c[17]=!0,c[18]=!0);var i=b();if(n)for(var u=0;u1&&(l=o(s,e)),(e="*"===(e=e[e.length-1])?"*":v(e))in d||(d[e]=[]),d[e].push({keyup:b,keydown:w,scope:f,mods:l,shortcut:u[p],method:n,key:u[p],splitKey:M,element:g});void 0!==g&&(a=g,!(y.indexOf(a)>-1))&&window&&(y.push(g),r(g,"keydown",function(e){k(e,g)},C),m||(m=!0,r(window,"focus",function(){h=[]},C)),r(g,"keyup",function(e){k(e,g),function(e){var t=e.keyCode||e.which||e.charCode,n=h.indexOf(t);if(n>=0&&h.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&h.splice(0,h.length),(93===t||224===t)&&(t=91),t in c)for(var a in c[t]=!1,s)s[a]===t&&(Z[a]=!1)}(e)},C))}var C={setScope:p,getScope:b,deleteScope:function(e,t){var n,a;for(var r in e||(e=b()),d)if(Object.prototype.hasOwnProperty.call(d,r))for(a=0,n=d[r];a1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(d).forEach(function(n){var a=d[n].find(function(n){return n.scope===t&&n.shortcut===e});a&&a.method&&a.method()})},unbind:function(e){if(void 0===e)Object.keys(d).forEach(function(e){return delete d[e]});else if(Array.isArray(e))e.forEach(function(e){e.key&&w(e)});else if("object"==typeof e)e.key&&w(e);else if("string"==typeof e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a=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},P=function(t,e){t.scales.x.title.display=!0,t.scales.x.title.text=e},E=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,P,E),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,P,E,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,l=o[n];return tr(l)&&s.isScriptable(n)&&(l=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),eS(t,e)&&(e=eD(o._scopes,o,t,e)),e}(n,l,e,r)),F(l)&&l.length&&(l=function(e,n,r,o){let{_proxy:i,_context:a,_subProxy:s,_descriptors:l}=r;if(tn(a.index)&&o(e))n=n[a.index%n.length];else if(B(n[0])){let c=n,u=i._scopes.filter(t=>t!==c);for(let f of(n=[],c)){let h=eD(u,i,e,f);n.push(t(h,a,s&&s[e],l))}}return n}(n,l,e,s.isIndexable)),eS(n,l)&&(l=t(l,i,a&&a[n],s)),l})(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 eA},aA:function(){return e4},aB:function(){return tQ},aC:function(){return e8},aD:function(){return el},aE:function(){return tk},aF:function(){return j},aG:function(){return tM},aH:function(){return tb},aI:function(){return tv},aJ:function(){return ty},aK:function(){return t_},aL:function(){return t8},aM:function(){return td},aN:function(){return eo},aO:function(){return tL},aP:function(){return tD},aa:function(){return eO},ab:function(){return q},ac:function(){return R},ad:function(){return tY},ae:function(){return eG},af:function(){return ea},ag:function(){return to},ah:function(){return Q},ai:function(){return ti},aj:function(){return tE},ak:function(){return ex},al:function(){return eH},am:function(){return nn},an:function(){return ne},ao:function(){return e5},ap:function(){return e6},aq:function(){return e2},ar:function(){return eh},as:function(){return ep},at:function(){return es},au:function(){return eg},av:function(){return ev},aw:function(){return eM},ax:function(){return nt},ay:function(){return tO},az:function(){return e3},b:function(){return F},c:function(){return t0},d:function(){return en},e:function(){return tK},f:function(){return tt},g:function(){return I},h:function(){return tn},i:function(){return B},j:function(){return ek},k:function(){return L},l:function(){return tB},m:function(){return H},n:function(){return Y},o:function(){return t3},p:function(){return tT},q:function(){return tX},r:function(){return tW},s:function(){return tg},t:function(){return tw},u:function(){return tI},v:function(){return W},w:function(){return t$},x:function(){return tx},y:function(){return eF},z:function(){return eZ}});let a=(t,e,n)=>Math.max(Math.min(t,n),e);function s(t){return a(i(2.55*t),0,255)}function l(t){return a(i(255*t),0,255)}function c(t){return a(i(t/2.55)/100,0,1)}function u(t){return a(i(100*t),0,100)}let f={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},h=[..."0123456789ABCDEF"],p=t=>h[15&t],d=t=>h[(240&t)>>4]+h[15&t],g=t=>(240&t)>>4==(15&t),y=t=>g(t.r)&&g(t.g)&&g(t.b)&&g(t.a),b=(t,e)=>t<255?e(t):"",m=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function x(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 v(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 M(t,e,n){let r;let o=x(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 w(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 S(t,e,n){if(t){let r=w(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,0===e?360:1)),r=z(x,r,void 0,void 0),t.r=r[0],t.g=r[1],t.b=r[2]}}function P(t,e){return t?Object.assign(e||{},t):t}function E(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=l(t[3]))):(e=P(t,{r:0,g:0,b:0,a:1})).a=l(e.a),e}class D{constructor(t){let e;if(t instanceof D)return t;let n=typeof t;if("object"===n)e=E(t);else if("string"===n){var o,i;i=t.length,"#"===t[0]&&(4===i||5===i?o={r:255&17*f[t[1]],g:255&17*f[t[2]],b:255&17*f[t[3]],a:5===i?17*f[t[4]]:255}:(7===i||9===i)&&(o={r:f[t[1]]<<4|f[t[2]],g:f[t[3]]<<4|f[t[4]],b:f[t[5]]<<4|f[t[6]],a:9===i?f[t[7]]<<4|f[t[8]]:255})),e=o||function(t){r||((r=function(){let t,e,n,r,o;let i={},a=Object.keys(k),s=Object.keys(C);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=A.exec(t),i=255;if(o){if(o[7]!==e){let l=+o[7];i=o[8]?s(l):a(255*l,0,255)}return e=+o[1],n=+o[3],r=+o[5],{r:e=255&(o[2]?s(e):a(e,0,255)),g:n=255&(o[4]?s(n):a(n,0,255)),b:r=255&(o[6]?s(r):a(r,0,255)),a:i}}}(t):function(t){let e;let n=m.exec(t),r=255;if(!n)return;n[5]!==e&&(r=n[6]?s(+n[5]):l(+n[5]));let o=_(+n[2]),i=+n[3]/100,a=+n[4]/100;return{r:(e="hwb"===n[1]?z(M,o,i,a):"hsv"===n[1]?z(v,o,i,a):z(x,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=P(this._rgb);return t&&(t.a=c(t.a)),t}set rgb(t){this._rgb=E(t)}rgbString(){var t;return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${c(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0}hexString(){var t,e;return this._valid?(e=y(t=this._rgb)?p:d,t?"#"+e(t.r)+e(t.g)+e(t.b)+b(t.a,e):void 0):void 0}hslString(){return this._valid?function(t){if(!t)return;let e=w(t),n=e[0],r=u(e[1]),o=u(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${o}%, ${c(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(c(t.r)),o=T(c(t.g)),i=T(c(t.b));return{r:l(O(r+n*(T(c(e.r))-r))),g:l(O(o+n*(T(c(e.g))-o))),b:l(O(i+n*(T(c(e.b))-i))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new D(this.rgb)}alpha(t){return this._rgb.a=l(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=i(.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 S(this._rgb,2,t),this}darken(t){return S(this._rgb,2,-t),this}saturate(t){return S(this._rgb,1,t),this}desaturate(t){return S(this._rgb,1,-t),this}rotate(t){var e,n;return(n=w(e=this._rgb))[0]=_(n[0]+t),n=z(x,n,void 0,void 0),e.r=n[0],e.g=n[1],e.b=n[2],this}}/*! + * Chart.js v4.1.0 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + */ function j(){}let R=(o=0,()=>o++);function L(t){return null==t}function F(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 B(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function I(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function N(t,e){return I(t)?t:e}function W(t,e){return void 0===t?e:t}let H=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,Y=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function U(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function V(t,e,n,r){let o,i,a;if(F(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 tt(t,e){let n=G[e]||(G[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 te(t){return t.charAt(0).toUpperCase()+t.slice(1)}let tn=t=>void 0!==t,tr=t=>"function"==typeof t,to=(t,e)=>{if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0};function ti(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}let ta=Math.PI,ts=2*ta,tl=ts+ta,tc=Number.POSITIVE_INFINITY,tu=ta/180,tf=ta/2,th=ta/4,tp=2*ta/3,td=Math.log10,tg=Math.sign;function ty(t,e,n){return Math.abs(t-e)t-e).pop(),n}function tx(t){return!isNaN(parseFloat(t))&&isFinite(t)}function tv(t,e){let n=Math.round(t);return n-e<=t&&n+e>=t}function tM(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 tD(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 tj=(t,e,n,r)=>tD(t,n,r?r=>{let o=t[r][e];return ot[r][e]tD(t,n,r=>t[r][e]>=n);function tL(t,e,n){let r=0,o=t.length;for(;rr&&t[o-1]>n;)o--;return r>0||o{let n="_onData"+te(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 tI(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||(tF.forEach(e=>{delete t[e]}),delete t._chartjs)}function tN(t){let e,n;let r=new Set;for(e=0,n=t.length;e{r=!1,t.apply(e,n)}))}}function tY(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}let tU=t=>"start"===t?"left":"end"===t?"right":"center",tV=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2,tQ=(t,e,n,r)=>t===(r?"left":"right")?n:"center"===t?(e+n)/2:e;function tX(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=tS(Math.min(tj(s,a.axis,c).lo,n?r:tj(e,l,a.getPixelForValue(c)).lo),0,r-1)),i=h?tS(Math.max(tj(s,a.axis,u,!0).hi+1,n?0:tj(e,l,a.getPixelForValue(u),!0).hi+1),o,r)-o:r-o}return{start:o,count:i}}function t$(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 tJ=t=>0===t||1===t,tZ=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*ts/n)),tq=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*ts/n)+1,tK={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*tf)+1,easeOutSine:t=>Math.sin(t*tf),easeInOutSine:t=>-.5*(Math.cos(ta*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=>tJ(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=>tJ(t)?t:tZ(t,.075,.3),easeOutElastic:t=>tJ(t)?t:tq(t,.075,.3),easeInOutElastic:t=>tJ(t)?t:t<.5?.5*tZ(2*t,.1125,.45):.5+.5*tq(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-tK.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*tK.easeInBounce(2*t):.5*tK.easeOutBounce(2*t-1)+.5};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 D(t)}function t1(t){return tG(t)?t:new D(t).saturate(.5).darken(.1).hexString()}let t2=["x","y","borderWidth","radius","tension"],t5=["color","borderColor","backgroundColor"],t6=new Map;function t3(t,e,n){return(function(t,e){e=e||{};let n=t+JSON.stringify(e),r=t6.get(n);return r||(r=new Intl.NumberFormat(t,e),t6.set(n,r)),r})(e,n).format(t)}let t4={values:t=>F(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=td(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),t3(t,o,u)},logarithmic(t,e,n){if(0===t)return"0";let r=n[e].significand||t/Math.pow(10,Math.floor(td(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?t4.numeric.call(this,t,e,n):""}};var t8={formatters:t4};let t7=Object.create(null),t9=Object.create(null);function et(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),this.apply(e)}set(t,e){return ee(this,t,e)}get(t){return et(this,t)}describe(t,e){return ee(t9,t,e)}override(t,e){return ee(t7,t,e)}route(t,e,n,r){let o=et(this,t),i=et(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 B(t)?Object.assign({},e,t):W(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:t5},numbers:{type:"number",properties:t2}}),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:t8.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 er(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 eo(t,e,n,r){let o,i,a,s,l;let c=(r=r||{}).data=r.data||{},u=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(c=r.data={},u=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let f=0,h=n.length;for(o=0;on.length){for(o=0;o0&&t.stroke()}}function ec(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]),L(i.rotation)||a.rotate(i.rotation),i.color&&(a.fillStyle=i.color),i.textAlign&&(a.textAlign=i.textAlign),i.textBaseline&&(a.textBaseline=i.textBaseline),s=0;s+t||0;function ex(t,e){let n={},r=B(e),o=r?Object.keys(e):e,i=B(t)?r?n=>W(t[n],t[e[n]]):e=>t[e]:()=>t;for(let a of o)n[a]=em(i(a));return n}function ev(t){return ex(t,{top:"y",right:"x",bottom:"y",left:"x"})}function eM(t){return ex(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ew(t){let e=ev(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ez(t,e){t=t||{},e=e||en.font;let n=W(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let r=W(t.style,e.style);r&&!(""+r).match(eb)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);let o={family:W(t.family,e.family),lineHeight:function(t,e){let n=(""+t).match(ey);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}(W(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:W(t.weight,e.weight),string:""};return o.string=!o||L(o.size)||L(o.family)?null:(o.style?o.style+" ":"")+(o.weight?o.weight+" ":"")+o.size+"px "+o.family,o}function e_(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 ek(t,e){return Object.assign(Object.create(t),e)}function eA(t,e=[""],n=t,r,o=()=>t[0]){tn(r)||(r=eR("_fallback",t));let i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:r,_getTarget:o,override:o=>eA([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(tn(o=eR(eT(i,t),n)))return eS(t,o)?eD(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)=>eL(t).includes(e),ownKeys:t=>eL(t),set(t,e,n){let r=t._storage||(t._storage=o());return t[e]=r[e]=n,delete t._keys,!0}})}function eO(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:tr(n)?n:()=>n,isIndexable:tr(r)?r:()=>r}}let eT=(t,e)=>t?t+te(e):e,eS=(t,e)=>B(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 eE=(t,e)=>!0===t?e:"string"==typeof t?tt(e,t):void 0;function eD(t,e,n,r){var o;let i=e._rootScopes,a=tr(o=e._fallback)?o(n,r):o,s=[...t,...i],l=new Set;l.add(r);let c=ej(l,s,n,a||n,r);return!(null===c||tn(a)&&a!==n&&null===(c=ej(l,s,a,c,r)))&&eA(Array.from(l),[""],i,a,()=>(function(t,e,n){let r=t._getTarget();e in r||(r[e]={});let o=r[e];return F(o)&&B(n)?n:o||{}})(e,n,r))}function ej(t,e,n,r,o){for(;n;)n=function(t,e,n,r,o){for(let i of e){let a=eE(n,i);if(a){var s;t.add(a);let l=tr(s=a._fallback)?s(n,o):s;if(tn(l)&&l!==n&&l!==r)return l}else if(!1===a&&tn(r)&&n!==r)return null}return!1}(t,e,n,r,o);return n}function eR(t,e){for(let n of e){if(!n)continue;let r=n[t];if(tn(r))return r}}function eL(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 eF(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 eW(t,e,n){return Math.max(Math.min(t,n),e)}function eH(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=eN(e),a=t.length,s=Array(a).fill(0),l=Array(a),c=eI(t,0);for(n=0;nt.ownerDocument.defaultView.getComputedStyle(t,null),eX=["top","right","bottom","left"];function e$(t,e,n){let r={};n=n?"-"+n:"";for(let o=0;o<4;o++){let i=eX[o];r[i]=parseFloat(t[e+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}let eJ=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function eZ(t,e){if("native"in t)return t;let{canvas:n,currentDevicePixelRatio:r}=e,o=eQ(n),i="border-box"===o.boxSizing,a=e$(o,"padding"),s=e$(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(eJ(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 eq=t=>Math.round(10*t)/10;function eK(t,e,n,r){let o=eQ(t),i=e$(o,"margin"),a=eV(o.maxWidth,t,"clientWidth")||tc,s=eV(o.maxHeight,t,"clientHeight")||tc,l=function(t,e,n){let r,o;if(void 0===e||void 0===n){let i=eU(t);if(i){let a=i.getBoundingClientRect(),s=eQ(i),l=e$(s,"border","width"),c=e$(s,"padding");e=a.width-c.width-l.width,n=a.height-c.height-l.height,r=eV(s.maxWidth,i,"clientWidth"),o=eV(s.maxHeight,i,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:r||tc,maxHeight:o||tc}}(t,e,n),{width:c,height:u}=l;if("content-box"===o.boxSizing){let f=e$(o,"border","width"),h=e$(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=eq(Math.min(c,a,l.maxWidth)),u=eq(Math.min(u,s,l.maxHeight)),c&&!u&&(u=eq(c/2)),(void 0!==e||void 0!==n)&&r&&l.height&&u>l.height&&(c=eq(Math.floor((u=l.height)*r))),{width:c,height:u}}function eG(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 e0=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 e1(t,e){let n=eQ(t).getPropertyValue(e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function e2(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function e5(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 e6(t,e,n,r){let o={x:t.cp2x,y:t.cp2y},i={x:e.cp1x,y:e.cp1y},a=e2(t,o,n),s=e2(o,i,n),l=e2(i,e,n),c=e2(a,s,n),u=e2(s,l,n);return e2(c,u,n)}function e3(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 e4(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 e8(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function e7(t){return"angle"===t?{between:tT,compare:tA,normalize:tO}:{between:tE,compare:(t,e)=>t-e,normalize:t=>t}}function e9({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 nt(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}=e7(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}=e7(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(e9({start:x,end:_,loop:g,count:c,style:y})),x=null),C=_,i=r);return null!==x&&b.push(e9({start:x,end:d,loop:g,count:c,style:y})),b}function ne(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 nr(t,[{start:a,end:s,loop:i}],n,e);let l=!!t._fullLoop&&0===a&&s===o-1;return nr(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: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/ee8b1517-c2bace5e006cd9c6.js b/static/web/_next/static/chunks/ee8b1517-c2bace5e006cd9c6.js new file mode 100644 index 000000000..6f61d3e08 --- /dev/null +++ b/static/web/_next/static/chunks/ee8b1517-c2bace5e006cd9c6.js @@ -0,0 +1,6 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2196],{23148:function(t,e,i){i.d(e,{kL:function(){return tN},zX:function(){return e2}});var s=i(9676),a=new /*! + * Chart.js v4.1.0 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + */ class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){let a=e.listeners[s],n=e.duration;a.forEach(s=>s({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],void 0!==n[s]._visualValues&&void 0!==n[s]._visualValues[i]&&delete n[s]._visualValues[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,e),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;e{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}}var C=Object.freeze({__proto__:null,BarController:class extends v{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,s){return M(t,e,i,s)}parseArrayData(t,e,i,s){return M(t,e,i,s)}parseObjectData(t,e,i,a){let n,r,o,l;let{iScale:h,vScale:d}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,g="x"===h.axis?c:u,p="x"===d.axis?c:u,f=[];for(n=i,r=i+a;nt.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=h?1:-1))*l,g===h&&(b-=i/2);let _=a.getPixelForDecimal(0),v=a.getPixelForDecimal(1);e=(b=Math.max(Math.min(b,Math.max(_,v)),Math.min(_,v)))+i,n&&!u&&(d._stacks[a.axis]._visualValues[r]=a.getValueForPixel(e)-a.getValueForPixel(b))}if(b===a.getPixelForValue(h)){let y=(0,s.s)(i)*a.getLineWidthForValue(h)/2;b+=y,i-=y}return{size:i,base:b,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:D,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 L(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class E{static override(t){Object.assign(E.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return L()}parse(){return L()}format(){return L()}add(){return L()}diff(){return L()}startOf(){return L()}endOf(){return L()}}var O={_date:E};function A(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 R={evaluateInteractionItems:A,modes:{index(t,e,i,a){let n=(0,s.z)(e,t),r=i.axis||"x",o=i.includeInvisible||!1,l=i.intersect?T(t,n,r,a,o):F(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?T(t,n,r,a,o):F(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 B(t,e){return t.filter(t=>-1===I.indexOf(t.pos)&&t.box.axis===e)}function N(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 H(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function j(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 W(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&&j(o,r.getPadding());let h=Math.max(0,e.outerWidth-H(o,t,"left","right")),d=Math.max(0,e.outerHeight-H(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&&W(c,e,i,a)||d}function $(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 U(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?$(h,n.left,o,i.outerWidth-n.right-n.left,g):$(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?$(h,r,n.top,f,i.outerHeight-n.bottom-n.top):$(h,r,e.top+d.placed,f,p),d.start=r,d.placed+=p,r=h.right}}e.x=r,e.y=o}var Y={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=N(V(e,"left"),!0),a=N(V(e,"right")),n=N(V(e,"top"),!0),r=N(V(e,"bottom")),o=B(e,"x"),l=B(e,"y");return{fullSize:i,leftAndTop:s.concat(n),rightAndBottom:a.concat(l).concat(r).concat(o),chartArea:V(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);j(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||!I.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 Q{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 X extends Q{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let q="$chartjs",G={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},K=t=>null===t||""===t,J=!!s.K&&{passive:!0};function Z(t,e,i){t.canvas.removeEventListener(e,i,J)}function tt(t,e){for(let i of t)if(i===e||i.contains(e))return!0}function te(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let a of t)e=(e=e||tt(a.addedNodes,s))&&!tt(a.removedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function ti(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let a of t)e=(e=e||tt(a.removedNodes,s))&&!tt(a.addedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}let ts=new Map,ta=0;function tn(){let t=window.devicePixelRatio;t!==ta&&(ta=t,ts.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function tr(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),ts.size||window.addEventListener("resize",tn),ts.set(t,r),o}function to(t,e,i){i&&i.disconnect(),"resize"===e&&(ts.delete(t),ts.size||window.removeEventListener("resize",tn))}function tl(t,e,i){let a=t.canvas,n=(0,s.L)(e=>{null!==t.ctx&&i(function(t,e){let i=G[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,J)}(a,e,n),n}class th extends Q{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[q]={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",K(n)){let r=(0,s.J)(t,"width");void 0!==r&&(t.width=r)}if(K(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[q])return!1;let i=e[q].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[q],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={});s[e]=(({attach:te,detach:ti,resize:tr})[e]||tl)(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];s&&((({attach:to,detach:to,resize:to})[e]||Z)(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 td{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 tc(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,tg=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function tp(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||[]}getLabelItems(t=this.chart.chartArea){let e=this._labelItems||(this._labelItems=this._computeLabelItems(t));return e}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(tc(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-tf(a.grid)-n.padding-tm(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=tm(a,e.options.font);if(o?(t.width=this.maxWidth,t.height=tf(n)+l):(t.height=this.maxHeight,t.width=tf(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=tf(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=tf(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 t_=new class{constructor(){this.controllers=new tx(v,"datasets",!0),this.elements=new tx(td,"elements"),this.plugins=new tx(Object,"plugins"),this.scales=new tx(tb,"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 ty(t,e){let i=s.d.datasets[t]||{},a=(e.datasets||{})[t]||{};return a.indexAxis||e.indexAxis||i.indexAxis||"x"}function tM(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&&tM(t[0].toLowerCase(),e)))return t;throw Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function tw(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=ty(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=tM(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||ty(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 tk(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}let tS=new Map,tP=new Set;function tD(t,e){let i=tS.get(t);return i||(i=e(),tS.set(t,i),tP.add(i)),i}let tC=(t,e,i)=>{let a=(0,s.f)(e,i);void 0!==a&&t.add(a)};class tL{constructor(t){var e;this._config=((e=(e=t)||{}).data=tk(e.data),tw(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=tk(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(),tw(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tD(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return tD(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return tD(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return tD(`${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=>tC(l,t,e))),e.forEach(t=>tC(l,a,t)),e.forEach(t=>tC(l,s.a3[n]||{},t)),e.forEach(t=>tC(l,s.d,t)),e.forEach(t=>tC(l,s.a6,t))});let h=Array.from(l);return 0===h.length&&h.push(Object.create(null)),tP.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}=tE(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)||tO(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}=tE(this._resolverCache,t,i);return(0,s.i)(e)?(0,s.a8)(n,e,void 0,a):n}}function tE(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 tO=t=>(0,s.i)(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||(0,s.a7)(t[i]),!1),tA=["top","bottom","left","right","chartArea"];function tT(t,e){return"top"===t||"bottom"===t||-1===tA.indexOf(t)&&"x"===e}function tF(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function tz(t){let e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),(0,s.Q)(i&&i.onComplete,[t],e)}function tR(t){let e=t.chart,i=e.options.animation;(0,s.Q)(i&&i.onProgress,[t],e)}function tI(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 tV={},tB=t=>{let e=tI(t);return Object.values(tV).filter(t=>t.canvas===e).pop()};class tN{static defaults=s.d;static instances=tV;static overrides=s.a3;static registry=t_;static version="4.1.0";static getChart=tB;static register(...t){t_.add(...t),tH()}static unregister(...t){t_.remove(...t),tH()}constructor(t,e){let i=this.config=new tL(e),n=tI(t),r=tB(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?X:th)),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 tv,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=[],tV[this.id]=this,!l||!h){console.error("Failed to create chart: can't acquire context from the given item");return}a.listen(this,"complete",tz),a.listen(this,"progress",tR),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 t_}_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=tM(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=tM(r,n),l=(0,s.v)(n.type,e.dtype);(void 0===n.position||tT(n.position,o)!==tT(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=t_.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=>{Y.configure(this,t,t.options),Y.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(tF("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=>{Y.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;Y.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=R.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 tH(){return(0,s.F)(tN.instances,t=>t._plugins.invalidate())}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 td{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 td{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 td{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,forceOverride:!1},beforeLayout(t,e,i){let s;if(!i.enabled)return;let{options:{elements:a},data:{datasets:n}}=t.config;if(!i.forceOverride&&(t9(n)||a&&t9(a)))return;let r=(s=0,(e,i)=>{var a,n,r,o,l,h;let d=t.getDatasetMeta(i).controller;d instanceof P?(a=e,n=s,a.backgroundColor=a.data.map(()=>t7(n++)),s=n):d instanceof D?(r=e,o=s,r.backgroundColor=r.data.map(()=>t8(o++)),s=o):d&&(l=e,h=s,l.borderColor=t7(h),l.backgroundColor=t8(h),s=++h)});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});Y.configure(t,s,i),Y.addBox(t,s)},stop(t){Y.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){let s=t.legend;Y.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});Y.configure(t,s,i),Y.addBox(t,s),eb.set(t,s)},stop(t){Y.removeBox(t,eb.get(t)),eb.delete(t)},beforeUpdate(t,e,i){let s=eb.get(t);Y.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});Y.configure(t,i,e),Y.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){let e=t.titleBlock;Y.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){let s=t.titleBlock;Y.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 tb{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 tb{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 O._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=[C,t3,eL,e1]}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/hardware-info-c3e778b57a2b1513.js b/static/web/_next/static/chunks/pages/admin/hardware-info-afa06ef51937f55f.js similarity index 99% rename from static/web/_next/static/chunks/pages/admin/hardware-info-c3e778b57a2b1513.js rename to static/web/_next/static/chunks/pages/admin/hardware-info-afa06ef51937f55f.js index 504347a03..199469e74 100644 --- a/static/web/_next/static/chunks/pages/admin/hardware-info-c3e778b57a2b1513.js +++ b/static/web/_next/static/chunks/pages/admin/hardware-info-afa06ef51937f55f.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(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,575,5101,5577,4763,236,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,575,5101,5577,4763,8245,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-8f1f5efaa8ebdcb6.js b/static/web/_next/static/chunks/pages/admin/stream-health-26c387527539722e.js similarity index 99% rename from static/web/_next/static/chunks/pages/admin/stream-health-8f1f5efaa8ebdcb6.js rename to static/web/_next/static/chunks/pages/admin/stream-health-26c387527539722e.js index ad5b5e55e..029455c01 100644 --- a/static/web/_next/static/chunks/pages/admin/stream-health-8f1f5efaa8ebdcb6.js +++ b/static/web/_next/static/chunks/pages/admin/stream-health-26c387527539722e.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(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,Z;let[F,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==F?void 0:F.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:F},{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===(e=null===(t=ee[0])||void 0===t?void 0:t.data[ee[0].data.length-1])||void 0===e?void 0:e.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===(Z=J[0])||void 0===Z?void 0:Z.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":"unset",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,575,5101,4763,236,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,Z;let[F,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==F?void 0:F.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:F},{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===(e=null===(t=ee[0])||void 0===t?void 0:t.data[ee[0].data.length-1])||void 0===e?void 0:e.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===(Z=J[0])||void 0===Z?void 0:Z.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":"unset",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,575,5101,4763,8245,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-028b7180ef826618.js b/static/web/_next/static/chunks/pages/admin/viewer-info-359b6b1bdfc50de3.js similarity index 98% rename from static/web/_next/static/chunks/pages/admin/viewer-info-028b7180ef826618.js rename to static/web/_next/static/chunks/pages/admin/viewer-info-359b6b1bdfc50de3.js index 71a8ebba5..2458cf533 100644 --- a/static/web/_next/static/chunks/pages/admin/viewer-info-028b7180ef826618.js +++ b/static/web/_next/static/chunks/pages/admin/viewer-info-359b6b1bdfc50de3.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(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,575,5938,5101,5577,4763,236,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,575,5938,5101,5577,4763,8245,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/chunks/pages/embed/video-04abad59027d2c31.js b/static/web/_next/static/chunks/pages/embed/video-ff4917f8414b83db.js similarity index 98% rename from static/web/_next/static/chunks/pages/embed/video-04abad59027d2c31.js rename to static/web/_next/static/chunks/pages/embed/video-ff4917f8414b83db.js index ce77dffab..08a054b8d 100644 --- a/static/web/_next/static/chunks/pages/embed/video-04abad59027d2c31.js +++ b/static/web/_next/static/chunks/pages/embed/video-ff4917f8414b83db.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3126,5202],{61357:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/embed/video",function(){return s(29942)}])},51513:function(e,n,s){"use strict";s.d(n,{R:function(){return l}});var t=s(85893),a=s(27049),i=s(24019),r=s(45938),o=s(88335),c=s.n(o);let l=e=>{let n,{streamName:s,customText:o,lastLive:l,notificationsEnabled:d,fediverseAccount:u,onNotifyClick:f,onFollowClick:_}=e;return n=o||(!o&&d&&u?(0,t.jsxs)("span",{children:["This stream is offline. You can"," ",(0,t.jsx)("span",{role:"link",tabIndex:0,className:c().actionLink,onClick:f,children:"be notified"})," ","the next time ",s," goes live or"," ",(0,t.jsx)("span",{role:"link",tabIndex:0,className:c().actionLink,onClick:_,children:"follow"})," ",u," on the Fediverse."]}):!o&&d?(0,t.jsxs)("span",{children:["This stream is offline."," ",(0,t.jsx)("span",{role:"link",tabIndex:0,className:c().actionLink,onClick:f,children:"Be notified"})," ","the next time ",s," goes live."]}):!o&&u?(0,t.jsxs)("span",{children:["This stream is offline."," ",(0,t.jsx)("span",{role:"link",tabIndex:0,className:c().actionLink,onClick:_,children:"Follow"})," ",u," on the Fediverse to see the next time ",s," goes live."]}):"This stream is offline. Check back soon!"),(0,t.jsx)("div",{id:"offline-banner",className:c().outerContainer,children:(0,t.jsxs)("div",{className:c().innerContainer,children:[(0,t.jsx)("div",{className:c().header,children:s}),(0,t.jsx)(a.Z,{className:c().separator}),(0,t.jsx)("div",{className:c().bodyText,children:n}),l&&(0,t.jsxs)("div",{className:c().lastLiveDate,children:[(0,t.jsx)(i.Z,{className:c().clockIcon}),"Last live ".concat((0,r.Z)(new Date(l))," ago.")]})]})})}},69357:function(e,n,s){"use strict";s.d(n,{X:function(){return d}});var t=s(85893),a=s(45938),i=s(68730),r=s(67294),o=s(31326),c=s(37970),l=s.n(c);let d=e=>{let n,{online:s,lastConnectTime:c,lastDisconnectTime:d,viewerCount:u}=e,[,f]=(0,r.useState)(new Date);(0,r.useEffect)(()=>{let e=setInterval(()=>f(new Date),1e3);return()=>{clearInterval(e)}},[]);let _="";if(s&&c){let x=function(e){let n=(0,i.Z)({start:e,end:new Date});return n.days>1?"".concat(n.days," days ").concat(n.hours," hours"):n.hours>=1?"".concat(n.hours," hours ").concat(n.minutes," minutes"):"".concat(n.minutes," minutes ").concat(n.seconds," seconds")}(new Date(c));_=s?"Live for ".concat(x):"Offline",n=u>0&&(0,t.jsxs)("div",{className:l().right,children:[(0,t.jsx)("span",{children:(0,t.jsx)(o.Z,{})}),(0,t.jsx)("span",{children:" ".concat(u)})]})}else!s&&(_="Offline",d&&(n="Last live ".concat((0,a.Z)(new Date(d))," ago.")));return(0,t.jsxs)("div",{className:l().statusbar,children:[(0,t.jsx)("div",{children:_}),(0,t.jsx)("div",{children:n})]})};d.defaultProps={lastConnectTime:null,lastDisconnectTime:null}},29942:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return l}});var t=s(85893);s(67294);var a=s(4480),i=s(77466),r=s(51513),o=s(69357),c=s(8888);function l(){let e=(0,a.sJ)(i.RI),n=(0,a.sJ)(i.g1),{name:s}=n,{offlineMessage:l}=n,{viewerCount:d,lastConnectTime:u,lastDisconnectTime:f}=e,_=(0,a.sJ)(i.YW);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.me,{}),(0,t.jsxs)("div",{className:"video-embed",children:[_&&(0,t.jsx)(c.OwncastPlayer,{source:"/hls/stream.m3u8",online:_}),!_&&(0,t.jsx)(r.R,{streamName:s,customText:l,notificationsEnabled:!1}),_&&(0,t.jsx)(o.X,{online:_,lastConnectTime:u,lastDisconnectTime:f,viewerCount:d})]})]})}},88335:function(e){e.exports={outerContainer:"OfflineBanner_outerContainer__3AbsB",innerContainer:"OfflineBanner_innerContainer__zTm13",bodyText:"OfflineBanner_bodyText__nNNy0",separator:"OfflineBanner_separator___j_Ss",lastLiveDate:"OfflineBanner_lastLiveDate___UZdO",clockIcon:"OfflineBanner_clockIcon__s0DB_",header:"OfflineBanner_header__Vu20o",footer:"OfflineBanner_footer__o3Zl5",actionLink:"OfflineBanner_actionLink__b4Mwa"}},37970:function(e){e.exports={statusbar:"Statusbar_statusbar__AtVnB"}},10434:function(e){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var n=1;n{let n,{streamName:s,customText:o,lastLive:l,notificationsEnabled:d,fediverseAccount:u,onNotifyClick:f,onFollowClick:_}=e;return n=o||(!o&&d&&u?(0,t.jsxs)("span",{children:["This stream is offline. You can"," ",(0,t.jsx)("span",{role:"link",tabIndex:0,className:c().actionLink,onClick:f,children:"be notified"})," ","the next time ",s," goes live or"," ",(0,t.jsx)("span",{role:"link",tabIndex:0,className:c().actionLink,onClick:_,children:"follow"})," ",u," on the Fediverse."]}):!o&&d?(0,t.jsxs)("span",{children:["This stream is offline."," ",(0,t.jsx)("span",{role:"link",tabIndex:0,className:c().actionLink,onClick:f,children:"Be notified"})," ","the next time ",s," goes live."]}):!o&&u?(0,t.jsxs)("span",{children:["This stream is offline."," ",(0,t.jsx)("span",{role:"link",tabIndex:0,className:c().actionLink,onClick:_,children:"Follow"})," ",u," on the Fediverse to see the next time ",s," goes live."]}):"This stream is offline. Check back soon!"),(0,t.jsx)("div",{id:"offline-banner",className:c().outerContainer,children:(0,t.jsxs)("div",{className:c().innerContainer,children:[(0,t.jsx)("div",{className:c().header,children:s}),(0,t.jsx)(a.Z,{className:c().separator}),(0,t.jsx)("div",{className:c().bodyText,children:n}),l&&(0,t.jsxs)("div",{className:c().lastLiveDate,children:[(0,t.jsx)(i.Z,{className:c().clockIcon}),"Last live ".concat((0,r.Z)(new Date(l))," ago.")]})]})})}},69357:function(e,n,s){"use strict";s.d(n,{X:function(){return d}});var t=s(85893),a=s(45938),i=s(68730),r=s(67294),o=s(31326),c=s(37970),l=s.n(c);let d=e=>{let n,{online:s,lastConnectTime:c,lastDisconnectTime:d,viewerCount:u}=e,[,f]=(0,r.useState)(new Date);(0,r.useEffect)(()=>{let e=setInterval(()=>f(new Date),1e3);return()=>{clearInterval(e)}},[]);let _="";if(s&&c){let x=function(e){let n=(0,i.Z)({start:e,end:new Date});return n.days>1?"".concat(n.days," days ").concat(n.hours," hours"):n.hours>=1?"".concat(n.hours," hours ").concat(n.minutes," minutes"):"".concat(n.minutes," minutes ").concat(n.seconds," seconds")}(new Date(c));_=s?"Live for ".concat(x):"Offline",n=u>0&&(0,t.jsxs)("div",{className:l().right,children:[(0,t.jsx)("span",{children:(0,t.jsx)(o.Z,{})}),(0,t.jsx)("span",{children:" ".concat(u)})]})}else!s&&(_="Offline",d&&(n="Last live ".concat((0,a.Z)(new Date(d))," ago.")));return(0,t.jsxs)("div",{className:l().statusbar,children:[(0,t.jsx)("div",{children:_}),(0,t.jsx)("div",{children:n})]})};d.defaultProps={lastConnectTime:null,lastDisconnectTime:null}},29942:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return l}});var t=s(85893);s(67294);var a=s(4480),i=s(77466),r=s(51513),o=s(69357),c=s(8888);function l(){let e=(0,a.sJ)(i.RI),n=(0,a.sJ)(i.g1),{name:s}=n,{offlineMessage:l}=n,{viewerCount:d,lastConnectTime:u,lastDisconnectTime:f}=e,_=(0,a.sJ)(i.YW);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.me,{}),(0,t.jsxs)("div",{className:"video-embed",children:[_&&(0,t.jsx)(c.OwncastPlayer,{source:"/hls/stream.m3u8",online:_}),!_&&(0,t.jsx)(r.R,{streamName:s,customText:l,notificationsEnabled:!1}),_&&(0,t.jsx)(o.X,{online:_,lastConnectTime:u,lastDisconnectTime:f,viewerCount:d})]})]})}},88335:function(e){e.exports={outerContainer:"OfflineBanner_outerContainer__3AbsB",innerContainer:"OfflineBanner_innerContainer__zTm13",bodyText:"OfflineBanner_bodyText__nNNy0",separator:"OfflineBanner_separator___j_Ss",lastLiveDate:"OfflineBanner_lastLiveDate___UZdO",clockIcon:"OfflineBanner_clockIcon__s0DB_",header:"OfflineBanner_header__Vu20o",footer:"OfflineBanner_footer__o3Zl5",actionLink:"OfflineBanner_actionLink__b4Mwa"}},37970:function(e){e.exports={statusbar:"Statusbar_statusbar__AtVnB"}},10434:function(e){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var n=1;nn.e(4761).then(n.bind(n,14761)).then(e=>e.Modal),{loadableGenerated:{webpack:()=>[14761]}}),S=y()(()=>Promise.all([n.e(8909),n.e(8119),n.e(9096)]).then(n.bind(n,59096)).then(e=>e.NameChangeModal),{loadableGenerated:{webpack:()=>[59096]}}),Z=y()(()=>Promise.all([n.e(575),n.e(4208)]).then(n.bind(n,44208)).then(e=>e.AuthModal),{loadableGenerated:{webpack:()=>[44208]}}),L=e=>{let{username:t}=e,[n,s]=(0,g.useState)(!1),[l,i]=(0,g.useState)(!1),[a,r]=(0,_.FV)(b.ZA),v=(0,_.sJ)(b.Q),y=()=>{r(!a)},C=()=>{s(!0)};(0,w.y1)("c",y,{enableOnContentEditable:!1},[a]);let L=(0,_.sJ)(b.db);if(!L)return null;let{displayName:F}=L,T=(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(m.Z,{}),onClick:()=>C(),children:"Change name"},"0"),(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(x.Z,{}),onClick:()=>i(!0),children:"Authenticate"},"1"),v.chatAvailable&&(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(p.Z,{}),onClick:()=>y(),children:a?"Hide Chat":"Show Chat"},"3")]});return(0,o.jsxs)("div",{id:"user-menu",className:"".concat(k().root),children:[(0,o.jsx)(d.Z,{overlay:T,trigger:["click"],children:(0,o.jsx)(h.Z,{type:"primary",icon:(0,o.jsx)(f.Z,{style:{marginRight:".5rem"}}),children:(0,o.jsxs)(u.Z,{children:[t||F,(0,o.jsx)(j.Z,{})]})})}),(0,o.jsx)(N,{title:"Change Chat Display Name",open:n,handleCancel:()=>s(!1),children:(0,o.jsx)(S,{})}),(0,o.jsx)(N,{title:"Authenticate",open:l,handleCancel:()=>i(!1),children:(0,o.jsx)(Z,{})})]})};var F=n(50738),T=n(31764),A=n.n(T);let{Header:D}=s.Z,E=e=>{let{name:t="Your stream title",chatAvailable:n,chatDisabled:s}=e;return(0,o.jsxs)(D,{className:r()(["".concat(A().header)],"global-header"),children:[(0,o.jsxs)("div",{className:"".concat(A().logo),children:[(0,o.jsx)("div",{id:"header-logo",children:(0,o.jsx)(F.C,{variant:"contrast"})}),(0,o.jsx)("span",{id:"global-header-text",children:t})]}),n&&!s&&(0,o.jsx)(L,{}),!n&&!s&&(0,o.jsx)(l.Z,{title:"Chat is available when the stream is live.",placement:"left",children:(0,o.jsx)(i.Z,{style:{cursor:"pointer"},children:"Chat offline"})})]})};var M=E},14761:function(e,t,n){"use strict";n.r(t),n.d(t,{Modal:function(){return d}});var o=n(85893),s=n(85402),l=n(26303),i=n(11382),a=n(67294),r=n(77011),c=n.n(r);let d=e=>{let{title:t,url:n,open:r,handleOk:d,handleCancel:h,afterClose:u,height:m,width:x,children:p}=e,[f,j]=(0,a.useState)(!!n),_="100%",g="520px";n&&(_="70vh",g="900px");let w={padding:"0px",minHeight:m,height:null!=m?m:_},v=n&&(0,o.jsx)("iframe",{title:t,src:n,width:"100%",height:"100%",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",frameBorder:"0",allowFullScreen:!0,style:{display:"block"},onLoad:()=>j(!1)});return(0,o.jsx)(s.Z,{title:t,open:r,onOk:d,onCancel:h,afterClose:u,bodyStyle:w,width:null!=x?x:g,zIndex:999,footer:null,centered:!0,destroyOnClose:!0,children:(0,o.jsxs)("div",{id:"modal-container",style:{height:"100%"},children:[f&&(0,o.jsx)(l.Z,{active:f,style:{padding:"10px"},paragraph:{rows:10}}),v&&(0,o.jsx)("div",{style:{display:f?"none":"inline"},children:v}),p&&(0,o.jsx)("div",{className:c().content,children:p}),f&&(0,o.jsx)(i.Z,{className:c().spinner,spinning:f,size:"large"})]})})};t.default=d,d.defaultProps={url:void 0,children:void 0,handleOk:void 0,handleCancel:void 0,afterClose:void 0}},51513:function(e,t,n){"use strict";n.d(t,{R:function(){return c}});var o=n(85893),s=n(27049),l=n(24019),i=n(45938),a=n(88335),r=n.n(a);let c=e=>{let t,{streamName:n,customText:a,lastLive:c,notificationsEnabled:d,fediverseAccount:h,onNotifyClick:u,onFollowClick:m}=e;return t=a||(!a&&d&&h?(0,o.jsxs)("span",{children:["This stream is offline. You can"," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:u,children:"be notified"})," ","the next time ",n," goes live or"," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:m,children:"follow"})," ",h," on the Fediverse."]}):!a&&d?(0,o.jsxs)("span",{children:["This stream is offline."," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:u,children:"Be notified"})," ","the next time ",n," goes live."]}):!a&&h?(0,o.jsxs)("span",{children:["This stream is offline."," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:m,children:"Follow"})," ",h," on the Fediverse to see the next time ",n," goes live."]}):"This stream is offline. Check back soon!"),(0,o.jsx)("div",{id:"offline-banner",className:r().outerContainer,children:(0,o.jsxs)("div",{className:r().innerContainer,children:[(0,o.jsx)("div",{className:r().header,children:n}),(0,o.jsx)(s.Z,{className:r().separator}),(0,o.jsx)("div",{className:r().bodyText,children:t}),c&&(0,o.jsxs)("div",{className:r().lastLiveDate,children:[(0,o.jsx)(l.Z,{className:r().clockIcon}),"Last live ".concat((0,i.Z)(new Date(c))," ago.")]})]})})}},69357:function(e,t,n){"use strict";n.d(t,{X:function(){return d}});var o=n(85893),s=n(45938),l=n(68730),i=n(67294),a=n(31326),r=n(37970),c=n.n(r);let d=e=>{let t,{online:n,lastConnectTime:r,lastDisconnectTime:d,viewerCount:h}=e,[,u]=(0,i.useState)(new Date);(0,i.useEffect)(()=>{let e=setInterval(()=>u(new Date),1e3);return()=>{clearInterval(e)}},[]);let m="";if(n&&r){let x=function(e){let t=(0,l.Z)({start:e,end:new Date});return t.days>1?"".concat(t.days," days ").concat(t.hours," hours"):t.hours>=1?"".concat(t.hours," hours ").concat(t.minutes," minutes"):"".concat(t.minutes," minutes ").concat(t.seconds," seconds")}(new Date(r));m=n?"Live for ".concat(x):"Offline",t=h>0&&(0,o.jsxs)("div",{className:c().right,children:[(0,o.jsx)("span",{children:(0,o.jsx)(a.Z,{})}),(0,o.jsx)("span",{children:" ".concat(h)})]})}else!n&&(m="Offline",d&&(t="Last live ".concat((0,s.Z)(new Date(d))," ago.")));return(0,o.jsxs)("div",{className:c().statusbar,children:[(0,o.jsx)("div",{children:m}),(0,o.jsx)("div",{children:t})]})};d.defaultProps={lastConnectTime:null,lastDisconnectTime:null}},6511:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eq}});var o=n(85893),s=n(97183),l=n(4480),i=n(9008),a=n.n(i),r=n(67294),c=n(77466),d=n(90575),h=n(26303),u=n(94184),m=n.n(u),x=n(5152),p=n.n(x),f=n(72581),j=n(10808),_=n.n(j);let g=e=>{let{content:t}=e;return(0,o.jsx)("div",{className:_().pageContentContainer,id:"custom-page-content",children:(0,o.jsx)("div",{className:_().customPageContent,dangerouslySetInnerHTML:{__html:t}})})};var w=n(17725),v=n.n(w),y=n(87412),b=n(12341),C=n.n(b);let k=p()(()=>Promise.all([n.e(1272),n.e(8700),n.e(3729),n.e(4977),n.e(1496)]).then(n.bind(n,94977)).then(e=>e.ChatContainer),{loadableGenerated:{webpack:()=>[94977]}}),N=()=>{let e=(0,l.sJ)(c.db),t=(0,l.sJ)(c.pH);if(!e)return null;let{id:n,isModerator:s,displayName:i}=e;return(0,o.jsx)(y.ZP,{className:C().root,collapsedWidth:0,width:320,children:(0,o.jsx)(k,{messages:t,usernameToHighlight:i,chatUserId:n,isModerator:s})})};var S=n(67917),Z=n.n(S);let L=e=>{let{version:t}=e;return(0,o.jsxs)("footer",{className:Z().footer,children:[(0,o.jsxs)("span",{children:["Powered by ",(0,o.jsx)("a",{href:"https://owncast.online",children:t})]}),(0,o.jsxs)("span",{className:Z().links,children:[(0,o.jsx)("a",{href:"https://owncast.online/docs",target:"_blank",rel:"noreferrer",children:"Documentation"}),(0,o.jsx)("a",{href:"https://owncast.online/help",target:"_blank",rel:"noreferrer",children:"Contribute"}),(0,o.jsx)("a",{href:"https://github.com/owncast/owncast",target:"_blank",rel:"noreferrer",children:"Source"})]})]})};var F=n(12270),T=n.n(F);let A=e=>{let{children:t}=e;return(0,o.jsx)("div",{className:"".concat(T().row),children:t})};var D=n(71577),E=n(13959),M=n.n(E);let H=e=>{let{action:t,primary:n=!0,externalActionSelected:s}=e,{title:l,description:i,icon:a,color:r}=t;return(0,o.jsxs)(D.Z,{type:n?"primary":"default",className:m()(["".concat(M().button),"action-button"]),onClick:()=>s(t),style:{backgroundColor:r},children:[a&&(0,o.jsx)("img",{src:a,className:"".concat(M().icon),alt:i}),l]})};var I=n(51513),B=n(34447);let O=e=>{let{onClick:t,props:n}=e;return(0,o.jsx)(D.Z,{...n,type:"primary",className:M().button,icon:(0,o.jsx)(B.Z,{}),onClick:t,id:"follow-button",children:"Follow"})};var z=n(71578);let R=e=>{let{onClick:t,text:n}=e;return(0,o.jsx)(D.Z,{type:"primary",className:"".concat(M().button),icon:(0,o.jsx)(z.Z,{}),onClick:t,id:"notify-button",children:n||"Notify"})};var J=n(53731),P=n(79216),U=n(74933),G=n.n(U);let q=e=>{let{src:t}=e;return(0,o.jsx)("div",{className:G().root,children:(0,o.jsx)("div",{className:G().container,children:(0,o.jsx)(P.Z,{src:t,alt:"Logo",className:G().image,rootClassName:G().image})})})};var Y=n(25675),V=n.n(Y),Q=n(573),W=n.n(Q);let K=e=>{let{links:t}=e;return(0,o.jsx)("div",{className:W().links,children:t.map(e=>(0,o.jsx)("a",{href:e.url,className:W().link,target:"_blank",rel:"noreferrer me",children:(0,o.jsx)(V(),{src:e.icon||"/img/platformlogos/default.svg",alt:e.platform,title:e.platform,className:W().link,width:"30",height:"30"})},e.platform))})};var X=n(47900),$=n.n(X);let ee=e=>{let{name:t,title:n,summary:s,logo:l,tags:i,links:a}=e;return(0,o.jsx)("div",{className:$().root,children:(0,o.jsxs)("div",{className:$().logoTitleSection,children:[(0,o.jsx)("div",{className:$().logo,children:(0,o.jsx)(q,{src:l})}),(0,o.jsxs)("div",{className:$().titleSection,children:[(0,o.jsx)("div",{className:m()($().title,$().row,"header-title"),children:t}),(0,o.jsx)("div",{className:m()($().subtitle,$().row,"header-subtitle"),children:(0,o.jsx)(J.Z,{children:n||s})}),(0,o.jsx)("div",{className:m()($().tagList,$().row),children:i.length>0&&i.map(e=>(0,o.jsxs)("span",{children:["#",e,"\xa0"]},e))}),(0,o.jsx)("div",{className:m()($().socialLinks,$().row),children:(0,o.jsx)(K,{links:a})})]})]})})};var et=n(69357),en=n(71230),eo=n(15746),es=n(3698),el=n(24093),ei=n(69833),ea=n.n(ei);let er=e=>{let{follower:t}=e;return(0,o.jsx)("div",{className:m()([ea().follower,"followers-follower"]),children:(0,o.jsx)("a",{href:t.link,target:"_blank",rel:"noreferrer",children:(0,o.jsxs)(en.Z,{wrap:!1,children:[(0,o.jsx)(eo.Z,{span:6,children:(0,o.jsx)(el.C,{src:t.image,alt:"Avatar",className:ea().avatar,children:(0,o.jsx)("img",{src:"/logo",alt:"Logo",className:ea().placeholder})})}),(0,o.jsxs)(eo.Z,{children:[(0,o.jsx)(en.Z,{children:t.name}),(0,o.jsx)(en.Z,{className:ea().account,children:t.username})]})]})})})};var ec=n(21890),ed=n.n(ec);let eh=e=>{let{name:t,onFollowButtonClick:n}=e,[s,l]=(0,r.useState)([]),[i,a]=(0,r.useState)(0),[c,d]=(0,r.useState)(1),[u,m]=(0,r.useState)(!0),x=async()=>{try{let e=await fetch("".concat("/api/followers","?page=").concat(c)),t=await e.json(),{results:n,total:o}=t;l(n),a(o)}catch(s){console.error(s)}};(0,r.useEffect)(()=>{x()},[]),(0,r.useEffect)(()=>{x()},[c]),(0,r.useEffect)(()=>{m(!1)},[s]);let p=(0,o.jsxs)("div",{className:ed().noFollowers,id:"followers-collection",children:[(0,o.jsx)("h2",{children:"Be the first follower!"}),(0,o.jsxs)("p",{children:["Owncast"!==t?t:"This server"," is a part of the"," ",(0,o.jsx)("a",{href:"https://owncast.online/join-fediverse",children:"Fediverse"}),", an interconnected network of independent users and servers."]}),(0,o.jsxs)("p",{children:["By following ","Owncast"!==t?t:"this server"," you'll be able to get updates from the stream, share it with others, and show your appreciation when it goes live, all from your own Fediverse account."]}),(0,o.jsx)(O,{onClick:n})]}),f=(0,o.jsx)(h.Z,{active:!0,paragraph:{rows:3}});return u?f:(null==s?void 0:s.length)?(0,o.jsxs)("div",{className:ed().followers,id:"followers-collection",children:[(0,o.jsx)(en.Z,{wrap:!0,gutter:[10,10],children:s.map(e=>(0,o.jsx)(eo.Z,{children:(0,o.jsx)(er,{follower:e},e.link)},e.link))}),(0,o.jsx)(es.Z,{current:c,pageSize:24,total:Math.ceil(i/24)||1,onChange(e){d(e)},hideOnSinglePage:!0})]}):p};var eu=n(14761),em=n(66516),ex=n(38504),ep=n(49647),ef=n(60198),ej=n(89705),e_=n(97038),eg=n.n(e_);let ew="notify",ev="follow",ey=e=>{let{actions:t,externalActionSelected:n,notifyItemSelected:s,followItemSelected:l,showFollowItem:i,showNotifyItem:a}=e,r=e=>{if(e.key===ew){s();return}if(e.key===ev){l();return}let o=t.find(t=>t.url===e.key);n(o)},c=t.map(e=>({key:e.url,label:(0,o.jsxs)("span",{className:eg().item,children:[e.icon&&(0,o.jsx)("img",{className:eg().icon,src:e.icon,alt:e.title})," ",e.title]})}));i&&c.unshift({key:ev,label:(0,o.jsxs)("span",{className:eg().item,children:[(0,o.jsx)(ep.Z,{className:eg().icon})," Follow this stream"]})}),a&&c.unshift({key:ew,label:(0,o.jsxs)("span",{className:eg().item,children:[(0,o.jsx)(ef.Z,{className:eg().icon}),"Notify when live"]})});let d=(0,o.jsx)(em.Z,{items:c,onClick:r});return(0,o.jsx)(ex.Z,{overlay:d,placement:"bottomRight",trigger:["click"],className:eg().menu,children:(0,o.jsx)("div",{className:eg().buttonWrap,children:(0,o.jsx)(D.Z,{type:"default",onClick:e=>e.preventDefault(),size:"large",icon:(0,o.jsx)(ej.Z,{size:6,style:{rotate:"90deg"}})})})})};var eb=n(26713),eC=n(11382),ek=n(14670),eN=n(69677),eS=n(66009),eZ=n.n(eS);let eL=e=>{let{handleClose:t,account:n,name:s}=e,[l,i]=(0,r.useState)(null),[a,c]=(0,r.useState)(!1),[d,h]=(0,r.useState)(!1),[u,m]=(0,r.useState)(null),x=e=>{i(e),function(e){let t=e.replace(/^@+/,"");return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())}(e)?c(!0):c(!1)},p=()=>{window.open("https://owncast.online/join-fediverse","_blank")},f=async()=>{if(a){h(!0);try{let e=l.replace(/^@+/,""),n=await fetch("/api/remotefollow",{method:"POST",body:JSON.stringify({account:e})}),o=await n.json();if(o.redirectUrl&&(window.open(o.redirectUrl,"_blank"),t()),!o.success){m(o.message),h(!1);return}if(!o.redirectUrl){m("Unable to follow."),h(!1);return}}catch(s){m(s.message)}h(!1)}};return(0,o.jsxs)(eb.Z,{direction:"vertical",id:"follow-modal",children:[(0,o.jsxs)("div",{className:eZ().header,children:["By following this stream you'll get notified on the Fediverse when it goes live. Now is a great time to",(0,o.jsx)("a",{href:"https://owncast.online/join-fediverse",target:"_blank",rel:"noreferrer",children:"\xa0learn about the Fediverse\xa0"}),"if it's new to you."]}),(0,o.jsxs)(eC.Z,{spinning:d,children:[u&&(0,o.jsx)(ek.Z,{message:"Follow Error",description:u,type:"error",showIcon:!0}),(0,o.jsxs)("div",{className:eZ().account,children:[(0,o.jsx)("img",{src:"/logo",alt:"logo",className:eZ().logo}),(0,o.jsxs)("div",{className:eZ().username,children:[(0,o.jsx)("div",{className:eZ().name,children:s}),(0,o.jsx)("div",{children:n})]})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:eZ().instructions,children:"Enter your username @server to follow"}),(0,o.jsx)(eN.Z,{value:l,size:"large",onChange:e=>x(e.target.value),placeholder:"Your fediverse account @account@server",defaultValue:l}),(0,o.jsx)("div",{className:eZ().footer,children:"You'll be redirected to your Fediverse server and asked to confirm the action."})]}),(0,o.jsxs)(eb.Z,{className:eZ().buttons,children:[(0,o.jsx)(D.Z,{disabled:!a,type:"primary",onClick:f,children:"Follow"}),(0,o.jsx)(D.Z,{onClick:p,type:"primary",children:"Join the Fediverse"})]})]})]})},{Content:eF}=s.Z,eT=p()(()=>n.e(6160).then(n.bind(n,66160)).then(e=>e.BrowserNotifyModal),{loadableGenerated:{webpack:()=>[66160]}}),eA=p()(()=>n.e(7815).then(n.bind(n,17815)).then(e=>e.NotifyReminderPopup),{loadableGenerated:{webpack:()=>[17815]}}),eD=p()(()=>Promise.all([n.e(2544),n.e(7902),n.e(2239),n.e(5202)]).then(n.bind(n,8888)).then(e=>e.OwncastPlayer),{loadableGenerated:{webpack:()=>[8888]}}),eE=p()(()=>Promise.all([n.e(1272),n.e(8700),n.e(3729),n.e(4977),n.e(1496)]).then(n.bind(n,94977)).then(e=>e.ChatContainer),{loadableGenerated:{webpack:()=>[94977]}}),eM=e=>{let{name:t,streamTitle:n,summary:s,tags:l,socialHandles:i,extraPageContent:a,setShowFollowModal:r}=e,c=(0,o.jsx)(g,{content:a}),h=(0,o.jsx)(eh,{name:t,onFollowButtonClick:()=>r(!0)});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:v().lowerHalf,children:(0,o.jsx)(ee,{name:t,title:n,summary:s,tags:l,links:i,logo:"/logo"})}),(0,o.jsx)("div",{className:v().lowerSection,children:(0,o.jsx)(d.Z,{defaultActiveKey:"0",items:[{label:"About",key:"2",children:c},{label:"Followers",key:"3",children:h}]})})]})},eH=e=>{let{name:t,streamTitle:n,summary:s,tags:l,socialHandles:i,extraPageContent:a,messages:c,currentUser:h,showChat:u,actions:x,setExternalActionToDisplay:p,setShowNotifyPopup:f,setShowFollowModal:j}=e;if(!h)return null;let _=(0,r.useRef)(),{id:w,displayName:y}=h,b=u&&(0,o.jsx)(eE,{messages:c,usernameToHighlight:y,chatUserId:w,isModerator:!1}),C=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ee,{name:t,title:n,summary:s,tags:l,links:i,logo:"/logo"}),(0,o.jsx)(g,{content:a})]}),k=(0,o.jsx)(eh,{name:t,onFollowButtonClick:()=>j(!0)}),N="".concat(function(e){let[t,n]=(0,r.useState)(0),o=()=>{if(!e.current)return;let t=e.current.getBoundingClientRect().top,{innerHeight:o}=window;n(o-t)};return(0,r.useEffect)(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[]),t}(_),"px"),S=(e,t)=>(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start"},children:[(0,o.jsx)(t,{...e,style:{width:"85%"}}),(0,o.jsx)(ey,{showFollowItem:!0,showNotifyItem:!0,actions:x,externalActionSelected:p,notifyItemSelected:()=>f(!0),followItemSelected:()=>j(!0)})]});return(0,o.jsx)("div",{className:m()(v().lowerSectionMobile),ref:_,style:{height:N},children:(0,o.jsx)(d.Z,{defaultActiveKey:"0",items:[u&&{label:"Chat",key:"0",children:b},{label:"About",key:"2",children:C},{label:"Followers",key:"3",children:k}],renderTabBar:S})})},eI=e=>{let{externalActionToDisplay:t,setExternalActionToDisplay:n}=e,{title:s,description:l,url:i}=t;return(0,o.jsx)(eu.Modal,{title:l||s,url:i,open:!!t,height:"80vh",handleCancel:()=>n(null)})},eB=()=>{let e=(0,l.sJ)(c.Q),t=(0,l.sJ)(c.g1),n=(0,l.sJ)(c.pT),s=(0,l.sJ)(c.di),i=(0,l.sJ)(c.db),[a,d]=(0,l.FV)(c.hz),u=(0,l.sJ)(c.j$),m=(0,l.sJ)(c.YW),{viewerCount:x,lastConnectTime:p,lastDisconnectTime:j,streamTitle:_}=(0,l.sJ)(c.RI),{extraPageContent:g,version:w,name:y,summary:b,socialHandles:C,tags:k,externalActions:S,offlineMessage:Z,chatDisabled:F,federation:T,notifications:D}=t,[E,M]=(0,r.useState)(!1),[B,z]=(0,r.useState)(!1),[J,P]=(0,r.useState)(!1),{account:U}=T,{browser:G}=D,{enabled:q}=G,[Y,V]=(0,r.useState)(null),Q=e=>{let{openExternally:t,url:n}=e;t?window.open(n,"_blank"):V(e)},W=S.map(e=>(0,o.jsx)(H,{action:e,externalActionSelected:Q},e.url)),K=()=>{let e=parseInt((0,f.$o)(f.dA.userVisitCount),10);Number.isNaN(e)&&(e=0),(0,f.qQ)(f.dA.userVisitCount,e+1),e>2&&!(0,f.$o)(f.dA.hasDisplayedNotificationModal)&&M(!0)},X=()=>{z(!1),M(!1),(0,f.qQ)(f.dA.hasDisplayedNotificationModal,!0)},$=()=>{let e=window.innerWidth;void 0===a&&(e<=768?d(!0):d(!1)),!a&&e<=768&&d(!0),a&&e>768&&d(!1)};(0,r.useEffect)(()=>(K(),$(),window.addEventListener("resize",$),()=>{window.removeEventListener("resize",$)}),[]);let ee=!F&&s&&n;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:v().main,children:[(0,o.jsxs)(eF,{className:v().root,children:[(0,o.jsxs)("div",{className:v().mainSection,children:[(0,o.jsxs)("div",{className:v().topSection,children:[e.appLoading&&(0,o.jsx)(h.Z,{loading:!0,active:!0,paragraph:{rows:7}}),m&&(0,o.jsx)(eD,{source:"/hls/stream.m3u8",online:m}),!m&&!e.appLoading&&(0,o.jsx)(I.R,{streamName:y,customText:Z,notificationsEnabled:q,fediverseAccount:U,lastLive:j,onNotifyClick:()=>z(!0),onFollowClick:()=>P(!0)}),m&&(0,o.jsx)(et.X,{online:m,lastConnectTime:p,lastDisconnectTime:j,viewerCount:x})]}),(0,o.jsx)("div",{className:v().midSection,children:(0,o.jsxs)("div",{className:v().buttonsLogoTitleSection,children:[!a&&(0,o.jsxs)(A,{children:[W,(0,o.jsx)(O,{size:"small",onClick:()=>P(!0)}),(0,o.jsx)(eA,{open:E,notificationClicked:()=>z(!0),notificationClosed:()=>X(),children:(0,o.jsx)(R,{onClick:()=>z(!0)})})]}),(0,o.jsx)(eu.Modal,{title:"Browser Notifications",open:B,afterClose:()=>X(),handleCancel:()=>X(),children:(0,o.jsx)(eT,{})})]})}),a?(0,o.jsx)(eH,{name:y,streamTitle:_,summary:b,tags:k,socialHandles:C,extraPageContent:g,messages:u,currentUser:i,showChat:ee,actions:S,setExternalActionToDisplay:Q,setShowNotifyPopup:z,setShowFollowModal:P}):(0,o.jsx)(eM,{name:y,streamTitle:_,summary:b,tags:k,socialHandles:C,extraPageContent:g,setShowFollowModal:P}),(0,o.jsx)(L,{version:w})]}),ee&&!a&&(0,o.jsx)(N,{})]}),!a&&!1]}),Y&&(0,o.jsx)(eI,{externalActionToDisplay:Y,setExternalActionToDisplay:V}),(0,o.jsx)(eu.Modal,{title:"Follow ".concat(y),open:J,handleCancel:()=>P(!1),width:"550px",children:(0,o.jsx)(eL,{account:U,name:y,handleClose:()=>P(!1)})})]})};var eO=n(37527),ez=n(85402);let eR=e=>{let{title:t,message:n}=e;return(0,o.jsx)(ez.Z,{title:t,visible:!0,footer:null,closable:!1,keyboard:!1,width:900,centered:!0,className:"modal",children:(0,o.jsx)("p",{style:{fontSize:"1.3rem"},children:n})})},eJ=()=>{let e=(0,l.sJ)(c.j$),t=(0,l.sJ)(c.RI),n=!1,o="",s=()=>{n=!0,o=window.document.title},i=()=>{n=!1,window.document.title=o},a=()=>{window.addEventListener("blur",s),window.addEventListener("focus",i)};return(0,r.useEffect)(()=>(o=window.document.title,a(),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",s)}),[]),(0,r.useEffect)(()=>{let{online:e}=t;n&&e&&(window.document.title="\uD83D\uDCAC :: ".concat(o))},[e]),(0,r.useEffect)(()=>{if(!n)return;let{online:e}=t;e?window.document.title=" \uD83D\uDFE2 :: ".concat(o):e||(window.document.title=" \uD83D\uDD34 :: ".concat(o))},[c.RI]),null},eP=()=>(0,o.jsx)("script",{id:"server-side-hydration",nonce:"{{.Nonce}}",dangerouslySetInnerHTML:{__html:"\n window.configHydration = {{.ServerConfigJSON}};\n window.statusHydration = {{.StatusJSON}};\n "}}),eU=()=>{let e=(0,l.sJ)(c.g1),{appearanceVariables:t,customStyles:n}=e,s=Object.keys(t).filter(e=>!!t[e]).map(e=>"--".concat(e,": ").concat(t[e]));return(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n :root {\n ".concat(s.join(";\n"),"\n }\n ").concat(n,"\n ")}})},eG=()=>{let e=(0,l.sJ)(c.g1),{name:t,title:n,customStyles:i}=e,d=(0,l.sJ)(c.di),h=(0,l.sJ)(c.ap),u=(0,r.useRef)(null),{chatDisabled:m}=e;return(0,r.useEffect)(()=>{!function(e){let t=e=>{let t=e.getAttribute("rel");e.setAttribute("rel","".concat(t," noopener noreferrer"))};e.querySelectorAll("a").forEach(e=>t(e));let n=new MutationObserver(function(e){for(let n of e)for(let o of n.addedNodes)o instanceof HTMLElement&&"a"===o.tagName.toLowerCase()&&t(o)});n.observe(e,{attributes:!1,childList:!0,subtree:!0})}(u.current)},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(a(),{children:[(0,o.jsx)(eP,{}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"57x57",href:"/img/favicon/apple-icon-57x57.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"60x60",href:"/img/favicon/apple-icon-60x60.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"72x72",href:"/img/favicon/apple-icon-72x72.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"76x76",href:"/img/favicon/apple-icon-76x76.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"114x114",href:"/img/favicon/apple-icon-114x114.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"120x120",href:"/img/favicon/apple-icon-120x120.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"144x144",href:"/img/favicon/apple-icon-144x144.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"152x152",href:"/img/favicon/apple-icon-152x152.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/img/favicon/apple-icon-180x180.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"192x192",href:"/img/favicon/android-icon-192x192.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/img/favicon/favicon-32x32.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"96x96",href:"/img/favicon/favicon-96x96.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/img/favicon/favicon-16x16.png"}),(0,o.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,o.jsx)("link",{href:"/api/auth/provider/indieauth"}),(0,o.jsx)("meta",{name:"msapplication-TileColor",content:"#ffffff"}),(0,o.jsx)("meta",{name:"msapplication-TileImage",content:"/img/favicon/ms-icon-144x144.png"}),(0,o.jsx)("meta",{name:"theme-color",content:"#ffffff"}),(0,o.jsx)("style",{children:i}),(0,o.jsx)("base",{target:"_blank"})]}),(0,o.jsxs)(a(),{children:[t?(0,o.jsx)("title",{children:t}):(0,o.jsx)("title",{children:"{{.Name}}"}),(0,o.jsx)("meta",{name:"description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"og:title",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"og:site_name",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"og:url",content:"{{.RequestedURL}}"}),(0,o.jsx)("meta",{property:"og:description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"og:type",content:"video.other"}),(0,o.jsx)("meta",{property:"video:tag",content:"{{.TagsString}}"}),(0,o.jsx)("meta",{property:"og:image",content:"{{.RequestedURL}}{{.Thumbnail}}"}),(0,o.jsx)("meta",{property:"og:image:url",content:"{{.RequestedURL}}{{.Thumbnail}}"}),(0,o.jsx)("meta",{property:"og:image:alt",content:"{{.RequestedURL}}{{.Image}}"}),(0,o.jsx)("meta",{property:"og:video",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"og:video:secure_url",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"og:video:height",content:"315"}),(0,o.jsx)("meta",{property:"og:video:width",content:"560"}),(0,o.jsx)("meta",{property:"og:video:type",content:"text/html"}),(0,o.jsx)("meta",{property:"og:video:actor",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"twitter:title",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"twitter:url",content:"{{.RequestedURL}}"}),(0,o.jsx)("meta",{property:"twitter:description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"twitter:image",content:"{{.Image}}"}),(0,o.jsx)("meta",{property:"twitter:card",content:"player"}),(0,o.jsx)("meta",{property:"twitter:player",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"twitter:player:width",content:"560"}),(0,o.jsx)("meta",{property:"twitter:player:height",content:"315"})]}),(0,o.jsx)(c.me,{}),(0,o.jsx)(eJ,{}),(0,o.jsx)(eU,{}),(0,o.jsxs)(s.Z,{ref:u,style:{minHeight:"100vh"},children:[(0,o.jsx)(eO.h,{name:n||t,chatAvailable:d,chatDisabled:m}),(0,o.jsx)(eB,{}),h&&(0,o.jsx)(eR,{title:h.title,message:h.message})]})]})};function eq(){return(0,o.jsx)(eG,{})}},13959:function(e){e.exports={button:"ActionButton_button__z5Z2c",icon:"ActionButton_icon__EPp7Q"}},97038:function(e){e.exports={item:"ActionButtonMenu_item__OJQdr",buttonWrap:"ActionButtonMenu_buttonWrap__WQ9kt",icon:"ActionButtonMenu_icon__edY1D",menu:"ActionButtonMenu_menu__GChDk"}},12270:function(e){e.exports={row:"ActionButtonRow_row__SiEGe"}},47900:function(e){e.exports={root:"ContentHeader_root__HaUG0",row:"ContentHeader_row__9Q8gH",logoTitleSection:"ContentHeader_logoTitleSection__Z8pUc",logo:"ContentHeader_logo__wo_HN",titleSection:"ContentHeader_titleSection___6Y15",title:"ContentHeader_title__E_DsI",subtitle:"ContentHeader_subtitle__n1Wew",tagList:"ContentHeader_tagList__rx3jY"}},79252:function(e){e.exports={root:"UserDropdown_root__IdxfQ","ant-space":"UserDropdown_ant-space__XJTZ3","ant-space-item":"UserDropdown_ant-space-item__w4nC2"}},66009:function(e){e.exports={header:"FollowModal_header__la1ji",buttons:"FollowModal_buttons__tt4Mc",instructions:"FollowModal_instructions__HiKFF",footer:"FollowModal_footer__AjucH",account:"FollowModal_account__cmHkm",logo:"FollowModal_logo__Ew8xK",username:"FollowModal_username__A_OTw",name:"FollowModal_name__Sf_TP"}},17725:function(e){e.exports={root:"Content_root__h1mNK",mainSection:"Content_mainSection__Gk78Y",topSection:"Content_topSection__JIZi0",lowerSection:"Content_lowerSection__BZHYI",lowerSectionMobile:"Content_lowerSectionMobile__hRr0_",leftCol:"Content_leftCol__U2TDq",loadingSpinner:"Content_loadingSpinner__mDlYC",main:"Content_main__XVf63"}},10808:function(e){e.exports={pageContentContainer:"CustomPageContent_pageContentContainer__EG4tU",customPageContent:"CustomPageContent_customPageContent__Mr981",summary:"CustomPageContent_summary___Zgps"}},67917:function(e){e.exports={footer:"Footer_footer__mPuvf",links:"Footer_links__7bBxV"}},31764:function(e){e.exports={header:"Header_header__U4Ro1",logo:"Header_logo__HLZ6Z"}},74933:function(e){e.exports={root:"Logo_root__jKiJC",container:"Logo_container__A4UYT",image:"Logo_image__Ahkom"}},77011:function(e){e.exports={spinner:"Modal_spinner__GiSS0",content:"Modal_content__h9my9"}},88335:function(e){e.exports={outerContainer:"OfflineBanner_outerContainer__3AbsB",innerContainer:"OfflineBanner_innerContainer__zTm13",bodyText:"OfflineBanner_bodyText__nNNy0",separator:"OfflineBanner_separator___j_Ss",lastLiveDate:"OfflineBanner_lastLiveDate___UZdO",clockIcon:"OfflineBanner_clockIcon__s0DB_",header:"OfflineBanner_header__Vu20o",footer:"OfflineBanner_footer__o3Zl5",actionLink:"OfflineBanner_actionLink__b4Mwa"}},12341:function(e){e.exports={root:"Sidebar_root__8HE0A"}},573:function(e){e.exports={link:"SocialLinks_link___CcSm",links:"SocialLinks_links__gOAb7"}},37970:function(e){e.exports={statusbar:"Statusbar_statusbar__AtVnB"}},21890:function(e){e.exports={followers:"FollowerCollection_followers__e_EUS",noFollowers:"FollowerCollection_noFollowers__UaCVW"}},69833:function(e){e.exports={follower:"SingleFollower_follower__EyBDI",avatar:"SingleFollower_avatar__V9jHG",account:"SingleFollower_account__Z66vo",placeholder:"SingleFollower_placeholder__CgsfJ"}}},function(e){e.O(0,[8909,3903,4267,575,5938,6395,1082,5360,8245,8793,7466,9774,2888,179],function(){return e(e.s=48312)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{48312:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(6511)}])},37527:function(e,t,n){"use strict";n.d(t,{h:function(){return E},Z:function(){return M}});var o=n(85893),s=n(97183),l=n(94199),i=n(20550),a=n(94184),r=n.n(a),c=n(66516),d=n(38504),h=n(71577),u=n(26713),m=n(86548),x=n(94149),p=n(38545),f=n(87547),j=n(39398),_=n(4480),g=n(67294),w=n(49218),v=n(5152),y=n.n(v),b=n(77466),C=n(79252),k=n.n(C);let N=y()(()=>n.e(4761).then(n.bind(n,14761)).then(e=>e.Modal),{loadableGenerated:{webpack:()=>[14761]}}),S=y()(()=>Promise.all([n.e(8909),n.e(8119),n.e(9096)]).then(n.bind(n,59096)).then(e=>e.NameChangeModal),{loadableGenerated:{webpack:()=>[59096]}}),Z=y()(()=>Promise.all([n.e(575),n.e(4208)]).then(n.bind(n,44208)).then(e=>e.AuthModal),{loadableGenerated:{webpack:()=>[44208]}}),L=e=>{let{username:t}=e,[n,s]=(0,g.useState)(!1),[l,i]=(0,g.useState)(!1),[a,r]=(0,_.FV)(b.ZA),v=(0,_.sJ)(b.Q),y=()=>{r(!a)},C=()=>{s(!0)};(0,w.y1)("c",y,{enableOnContentEditable:!1},[a]);let L=(0,_.sJ)(b.db);if(!L)return null;let{displayName:F}=L,T=(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(m.Z,{}),onClick:()=>C(),children:"Change name"},"0"),(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(x.Z,{}),onClick:()=>i(!0),children:"Authenticate"},"1"),v.chatAvailable&&(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(p.Z,{}),onClick:()=>y(),children:a?"Hide Chat":"Show Chat"},"3")]});return(0,o.jsxs)("div",{id:"user-menu",className:"".concat(k().root),children:[(0,o.jsx)(d.Z,{overlay:T,trigger:["click"],children:(0,o.jsx)(h.Z,{type:"primary",icon:(0,o.jsx)(f.Z,{style:{marginRight:".5rem"}}),children:(0,o.jsxs)(u.Z,{children:[t||F,(0,o.jsx)(j.Z,{})]})})}),(0,o.jsx)(N,{title:"Change Chat Display Name",open:n,handleCancel:()=>s(!1),children:(0,o.jsx)(S,{})}),(0,o.jsx)(N,{title:"Authenticate",open:l,handleCancel:()=>i(!1),children:(0,o.jsx)(Z,{})})]})};var F=n(50738),T=n(31764),A=n.n(T);let{Header:D}=s.Z,E=e=>{let{name:t="Your stream title",chatAvailable:n,chatDisabled:s}=e;return(0,o.jsxs)(D,{className:r()(["".concat(A().header)],"global-header"),children:[(0,o.jsxs)("div",{className:"".concat(A().logo),children:[(0,o.jsx)("div",{id:"header-logo",children:(0,o.jsx)(F.C,{variant:"contrast"})}),(0,o.jsx)("span",{id:"global-header-text",children:t})]}),n&&!s&&(0,o.jsx)(L,{}),!n&&!s&&(0,o.jsx)(l.Z,{title:"Chat is available when the stream is live.",placement:"left",children:(0,o.jsx)(i.Z,{style:{cursor:"pointer"},children:"Chat offline"})})]})};var M=E},14761:function(e,t,n){"use strict";n.r(t),n.d(t,{Modal:function(){return d}});var o=n(85893),s=n(85402),l=n(26303),i=n(11382),a=n(67294),r=n(77011),c=n.n(r);let d=e=>{let{title:t,url:n,open:r,handleOk:d,handleCancel:h,afterClose:u,height:m,width:x,children:p}=e,[f,j]=(0,a.useState)(!!n),_="100%",g="520px";n&&(_="70vh",g="900px");let w={padding:"0px",minHeight:m,height:null!=m?m:_},v=n&&(0,o.jsx)("iframe",{title:t,src:n,width:"100%",height:"100%",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",frameBorder:"0",allowFullScreen:!0,style:{display:"block"},onLoad:()=>j(!1)});return(0,o.jsx)(s.Z,{title:t,open:r,onOk:d,onCancel:h,afterClose:u,bodyStyle:w,width:null!=x?x:g,zIndex:999,footer:null,centered:!0,destroyOnClose:!0,children:(0,o.jsxs)("div",{id:"modal-container",style:{height:"100%"},children:[f&&(0,o.jsx)(l.Z,{active:f,style:{padding:"10px"},paragraph:{rows:10}}),v&&(0,o.jsx)("div",{style:{display:f?"none":"inline"},children:v}),p&&(0,o.jsx)("div",{className:c().content,children:p}),f&&(0,o.jsx)(i.Z,{className:c().spinner,spinning:f,size:"large"})]})})};t.default=d,d.defaultProps={url:void 0,children:void 0,handleOk:void 0,handleCancel:void 0,afterClose:void 0}},51513:function(e,t,n){"use strict";n.d(t,{R:function(){return c}});var o=n(85893),s=n(27049),l=n(24019),i=n(45938),a=n(88335),r=n.n(a);let c=e=>{let t,{streamName:n,customText:a,lastLive:c,notificationsEnabled:d,fediverseAccount:h,onNotifyClick:u,onFollowClick:m}=e;return t=a||(!a&&d&&h?(0,o.jsxs)("span",{children:["This stream is offline. You can"," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:u,children:"be notified"})," ","the next time ",n," goes live or"," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:m,children:"follow"})," ",h," on the Fediverse."]}):!a&&d?(0,o.jsxs)("span",{children:["This stream is offline."," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:u,children:"Be notified"})," ","the next time ",n," goes live."]}):!a&&h?(0,o.jsxs)("span",{children:["This stream is offline."," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:m,children:"Follow"})," ",h," on the Fediverse to see the next time ",n," goes live."]}):"This stream is offline. Check back soon!"),(0,o.jsx)("div",{id:"offline-banner",className:r().outerContainer,children:(0,o.jsxs)("div",{className:r().innerContainer,children:[(0,o.jsx)("div",{className:r().header,children:n}),(0,o.jsx)(s.Z,{className:r().separator}),(0,o.jsx)("div",{className:r().bodyText,children:t}),c&&(0,o.jsxs)("div",{className:r().lastLiveDate,children:[(0,o.jsx)(l.Z,{className:r().clockIcon}),"Last live ".concat((0,i.Z)(new Date(c))," ago.")]})]})})}},69357:function(e,t,n){"use strict";n.d(t,{X:function(){return d}});var o=n(85893),s=n(45938),l=n(68730),i=n(67294),a=n(31326),r=n(37970),c=n.n(r);let d=e=>{let t,{online:n,lastConnectTime:r,lastDisconnectTime:d,viewerCount:h}=e,[,u]=(0,i.useState)(new Date);(0,i.useEffect)(()=>{let e=setInterval(()=>u(new Date),1e3);return()=>{clearInterval(e)}},[]);let m="";if(n&&r){let x=function(e){let t=(0,l.Z)({start:e,end:new Date});return t.days>1?"".concat(t.days," days ").concat(t.hours," hours"):t.hours>=1?"".concat(t.hours," hours ").concat(t.minutes," minutes"):"".concat(t.minutes," minutes ").concat(t.seconds," seconds")}(new Date(r));m=n?"Live for ".concat(x):"Offline",t=h>0&&(0,o.jsxs)("div",{className:c().right,children:[(0,o.jsx)("span",{children:(0,o.jsx)(a.Z,{})}),(0,o.jsx)("span",{children:" ".concat(h)})]})}else!n&&(m="Offline",d&&(t="Last live ".concat((0,s.Z)(new Date(d))," ago.")));return(0,o.jsxs)("div",{className:c().statusbar,children:[(0,o.jsx)("div",{children:m}),(0,o.jsx)("div",{children:t})]})};d.defaultProps={lastConnectTime:null,lastDisconnectTime:null}},6511:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eq}});var o=n(85893),s=n(97183),l=n(4480),i=n(9008),a=n.n(i),r=n(67294),c=n(77466),d=n(90575),h=n(26303),u=n(94184),m=n.n(u),x=n(5152),p=n.n(x),f=n(72581),j=n(10808),_=n.n(j);let g=e=>{let{content:t}=e;return(0,o.jsx)("div",{className:_().pageContentContainer,id:"custom-page-content",children:(0,o.jsx)("div",{className:_().customPageContent,dangerouslySetInnerHTML:{__html:t}})})};var w=n(17725),v=n.n(w),y=n(87412),b=n(12341),C=n.n(b);let k=p()(()=>Promise.all([n.e(1272),n.e(8700),n.e(3729),n.e(4977),n.e(1496)]).then(n.bind(n,94977)).then(e=>e.ChatContainer),{loadableGenerated:{webpack:()=>[94977]}}),N=()=>{let e=(0,l.sJ)(c.db),t=(0,l.sJ)(c.pH);if(!e)return null;let{id:n,isModerator:s,displayName:i}=e;return(0,o.jsx)(y.ZP,{className:C().root,collapsedWidth:0,width:320,children:(0,o.jsx)(k,{messages:t,usernameToHighlight:i,chatUserId:n,isModerator:s})})};var S=n(67917),Z=n.n(S);let L=e=>{let{version:t}=e;return(0,o.jsxs)("footer",{className:Z().footer,children:[(0,o.jsxs)("span",{children:["Powered by ",(0,o.jsx)("a",{href:"https://owncast.online",children:t})]}),(0,o.jsxs)("span",{className:Z().links,children:[(0,o.jsx)("a",{href:"https://owncast.online/docs",target:"_blank",rel:"noreferrer",children:"Documentation"}),(0,o.jsx)("a",{href:"https://owncast.online/help",target:"_blank",rel:"noreferrer",children:"Contribute"}),(0,o.jsx)("a",{href:"https://github.com/owncast/owncast",target:"_blank",rel:"noreferrer",children:"Source"})]})]})};var F=n(12270),T=n.n(F);let A=e=>{let{children:t}=e;return(0,o.jsx)("div",{className:"".concat(T().row),children:t})};var D=n(71577),E=n(13959),M=n.n(E);let H=e=>{let{action:t,primary:n=!0,externalActionSelected:s}=e,{title:l,description:i,icon:a,color:r}=t;return(0,o.jsxs)(D.Z,{type:n?"primary":"default",className:m()(["".concat(M().button),"action-button"]),onClick:()=>s(t),style:{backgroundColor:r},children:[a&&(0,o.jsx)("img",{src:a,className:"".concat(M().icon),alt:i}),l]})};var I=n(51513),B=n(34447);let O=e=>{let{onClick:t,props:n}=e;return(0,o.jsx)(D.Z,{...n,type:"primary",className:M().button,icon:(0,o.jsx)(B.Z,{}),onClick:t,id:"follow-button",children:"Follow"})};var z=n(71578);let R=e=>{let{onClick:t,text:n}=e;return(0,o.jsx)(D.Z,{type:"primary",className:"".concat(M().button),icon:(0,o.jsx)(z.Z,{}),onClick:t,id:"notify-button",children:n||"Notify"})};var J=n(53731),P=n(79216),U=n(74933),G=n.n(U);let q=e=>{let{src:t}=e;return(0,o.jsx)("div",{className:G().root,children:(0,o.jsx)("div",{className:G().container,children:(0,o.jsx)(P.Z,{src:t,alt:"Logo",className:G().image,rootClassName:G().image})})})};var Y=n(25675),V=n.n(Y),Q=n(573),W=n.n(Q);let K=e=>{let{links:t}=e;return(0,o.jsx)("div",{className:W().links,children:t.map(e=>(0,o.jsx)("a",{href:e.url,className:W().link,target:"_blank",rel:"noreferrer me",children:(0,o.jsx)(V(),{src:e.icon||"/img/platformlogos/default.svg",alt:e.platform,title:e.platform,className:W().link,width:"30",height:"30"})},e.platform))})};var X=n(47900),$=n.n(X);let ee=e=>{let{name:t,title:n,summary:s,logo:l,tags:i,links:a}=e;return(0,o.jsx)("div",{className:$().root,children:(0,o.jsxs)("div",{className:$().logoTitleSection,children:[(0,o.jsx)("div",{className:$().logo,children:(0,o.jsx)(q,{src:l})}),(0,o.jsxs)("div",{className:$().titleSection,children:[(0,o.jsx)("div",{className:m()($().title,$().row,"header-title"),children:t}),(0,o.jsx)("div",{className:m()($().subtitle,$().row,"header-subtitle"),children:(0,o.jsx)(J.Z,{children:n||s})}),(0,o.jsx)("div",{className:m()($().tagList,$().row),children:i.length>0&&i.map(e=>(0,o.jsxs)("span",{children:["#",e,"\xa0"]},e))}),(0,o.jsx)("div",{className:m()($().socialLinks,$().row),children:(0,o.jsx)(K,{links:a})})]})]})})};var et=n(69357),en=n(71230),eo=n(15746),es=n(3698),el=n(24093),ei=n(69833),ea=n.n(ei);let er=e=>{let{follower:t}=e;return(0,o.jsx)("div",{className:m()([ea().follower,"followers-follower"]),children:(0,o.jsx)("a",{href:t.link,target:"_blank",rel:"noreferrer",children:(0,o.jsxs)(en.Z,{wrap:!1,children:[(0,o.jsx)(eo.Z,{span:6,children:(0,o.jsx)(el.C,{src:t.image,alt:"Avatar",className:ea().avatar,children:(0,o.jsx)("img",{src:"/logo",alt:"Logo",className:ea().placeholder})})}),(0,o.jsxs)(eo.Z,{children:[(0,o.jsx)(en.Z,{children:t.name}),(0,o.jsx)(en.Z,{className:ea().account,children:t.username})]})]})})})};var ec=n(21890),ed=n.n(ec);let eh=e=>{let{name:t,onFollowButtonClick:n}=e,[s,l]=(0,r.useState)([]),[i,a]=(0,r.useState)(0),[c,d]=(0,r.useState)(1),[u,m]=(0,r.useState)(!0),x=async()=>{try{let e=await fetch("".concat("/api/followers","?page=").concat(c)),t=await e.json(),{results:n,total:o}=t;l(n),a(o)}catch(s){console.error(s)}};(0,r.useEffect)(()=>{x()},[]),(0,r.useEffect)(()=>{x()},[c]),(0,r.useEffect)(()=>{m(!1)},[s]);let p=(0,o.jsxs)("div",{className:ed().noFollowers,id:"followers-collection",children:[(0,o.jsx)("h2",{children:"Be the first follower!"}),(0,o.jsxs)("p",{children:["Owncast"!==t?t:"This server"," is a part of the"," ",(0,o.jsx)("a",{href:"https://owncast.online/join-fediverse",children:"Fediverse"}),", an interconnected network of independent users and servers."]}),(0,o.jsxs)("p",{children:["By following ","Owncast"!==t?t:"this server"," you'll be able to get updates from the stream, share it with others, and show your appreciation when it goes live, all from your own Fediverse account."]}),(0,o.jsx)(O,{onClick:n})]}),f=(0,o.jsx)(h.Z,{active:!0,paragraph:{rows:3}});return u?f:(null==s?void 0:s.length)?(0,o.jsxs)("div",{className:ed().followers,id:"followers-collection",children:[(0,o.jsx)(en.Z,{wrap:!0,gutter:[10,10],children:s.map(e=>(0,o.jsx)(eo.Z,{children:(0,o.jsx)(er,{follower:e},e.link)},e.link))}),(0,o.jsx)(es.Z,{current:c,pageSize:24,total:Math.ceil(i/24)||1,onChange(e){d(e)},hideOnSinglePage:!0})]}):p};var eu=n(14761),em=n(66516),ex=n(38504),ep=n(49647),ef=n(60198),ej=n(89705),e_=n(97038),eg=n.n(e_);let ew="notify",ev="follow",ey=e=>{let{actions:t,externalActionSelected:n,notifyItemSelected:s,followItemSelected:l,showFollowItem:i,showNotifyItem:a}=e,r=e=>{if(e.key===ew){s();return}if(e.key===ev){l();return}let o=t.find(t=>t.url===e.key);n(o)},c=t.map(e=>({key:e.url,label:(0,o.jsxs)("span",{className:eg().item,children:[e.icon&&(0,o.jsx)("img",{className:eg().icon,src:e.icon,alt:e.title})," ",e.title]})}));i&&c.unshift({key:ev,label:(0,o.jsxs)("span",{className:eg().item,children:[(0,o.jsx)(ep.Z,{className:eg().icon})," Follow this stream"]})}),a&&c.unshift({key:ew,label:(0,o.jsxs)("span",{className:eg().item,children:[(0,o.jsx)(ef.Z,{className:eg().icon}),"Notify when live"]})});let d=(0,o.jsx)(em.Z,{items:c,onClick:r});return(0,o.jsx)(ex.Z,{overlay:d,placement:"bottomRight",trigger:["click"],className:eg().menu,children:(0,o.jsx)("div",{className:eg().buttonWrap,children:(0,o.jsx)(D.Z,{type:"default",onClick:e=>e.preventDefault(),size:"large",icon:(0,o.jsx)(ej.Z,{size:6,style:{rotate:"90deg"}})})})})};var eb=n(26713),eC=n(11382),ek=n(14670),eN=n(69677),eS=n(66009),eZ=n.n(eS);let eL=e=>{let{handleClose:t,account:n,name:s}=e,[l,i]=(0,r.useState)(null),[a,c]=(0,r.useState)(!1),[d,h]=(0,r.useState)(!1),[u,m]=(0,r.useState)(null),x=e=>{i(e),function(e){let t=e.replace(/^@+/,"");return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())}(e)?c(!0):c(!1)},p=()=>{window.open("https://owncast.online/join-fediverse","_blank")},f=async()=>{if(a){h(!0);try{let e=l.replace(/^@+/,""),n=await fetch("/api/remotefollow",{method:"POST",body:JSON.stringify({account:e})}),o=await n.json();if(o.redirectUrl&&(window.open(o.redirectUrl,"_blank"),t()),!o.success){m(o.message),h(!1);return}if(!o.redirectUrl){m("Unable to follow."),h(!1);return}}catch(s){m(s.message)}h(!1)}};return(0,o.jsxs)(eb.Z,{direction:"vertical",id:"follow-modal",children:[(0,o.jsxs)("div",{className:eZ().header,children:["By following this stream you'll get notified on the Fediverse when it goes live. Now is a great time to",(0,o.jsx)("a",{href:"https://owncast.online/join-fediverse",target:"_blank",rel:"noreferrer",children:"\xa0learn about the Fediverse\xa0"}),"if it's new to you."]}),(0,o.jsxs)(eC.Z,{spinning:d,children:[u&&(0,o.jsx)(ek.Z,{message:"Follow Error",description:u,type:"error",showIcon:!0}),(0,o.jsxs)("div",{className:eZ().account,children:[(0,o.jsx)("img",{src:"/logo",alt:"logo",className:eZ().logo}),(0,o.jsxs)("div",{className:eZ().username,children:[(0,o.jsx)("div",{className:eZ().name,children:s}),(0,o.jsx)("div",{children:n})]})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:eZ().instructions,children:"Enter your username @server to follow"}),(0,o.jsx)(eN.Z,{value:l,size:"large",onChange:e=>x(e.target.value),placeholder:"Your fediverse account @account@server",defaultValue:l}),(0,o.jsx)("div",{className:eZ().footer,children:"You'll be redirected to your Fediverse server and asked to confirm the action."})]}),(0,o.jsxs)(eb.Z,{className:eZ().buttons,children:[(0,o.jsx)(D.Z,{disabled:!a,type:"primary",onClick:f,children:"Follow"}),(0,o.jsx)(D.Z,{onClick:p,type:"primary",children:"Join the Fediverse"})]})]})]})},{Content:eF}=s.Z,eT=p()(()=>n.e(6160).then(n.bind(n,66160)).then(e=>e.BrowserNotifyModal),{loadableGenerated:{webpack:()=>[66160]}}),eA=p()(()=>n.e(7815).then(n.bind(n,17815)).then(e=>e.NotifyReminderPopup),{loadableGenerated:{webpack:()=>[17815]}}),eD=p()(()=>Promise.all([n.e(2544),n.e(7902),n.e(2239),n.e(5202)]).then(n.bind(n,8888)).then(e=>e.OwncastPlayer),{loadableGenerated:{webpack:()=>[8888]}}),eE=p()(()=>Promise.all([n.e(1272),n.e(8700),n.e(3729),n.e(4977),n.e(1496)]).then(n.bind(n,94977)).then(e=>e.ChatContainer),{loadableGenerated:{webpack:()=>[94977]}}),eM=e=>{let{name:t,streamTitle:n,summary:s,tags:l,socialHandles:i,extraPageContent:a,setShowFollowModal:r}=e,c=(0,o.jsx)(g,{content:a}),h=(0,o.jsx)(eh,{name:t,onFollowButtonClick:()=>r(!0)});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:v().lowerHalf,children:(0,o.jsx)(ee,{name:t,title:n,summary:s,tags:l,links:i,logo:"/logo"})}),(0,o.jsx)("div",{className:v().lowerSection,children:(0,o.jsx)(d.Z,{defaultActiveKey:"0",items:[{label:"About",key:"2",children:c},{label:"Followers",key:"3",children:h}]})})]})},eH=e=>{let{name:t,streamTitle:n,summary:s,tags:l,socialHandles:i,extraPageContent:a,messages:c,currentUser:h,showChat:u,actions:x,setExternalActionToDisplay:p,setShowNotifyPopup:f,setShowFollowModal:j}=e;if(!h)return null;let _=(0,r.useRef)(),{id:w,displayName:y}=h,b=u&&(0,o.jsx)(eE,{messages:c,usernameToHighlight:y,chatUserId:w,isModerator:!1}),C=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ee,{name:t,title:n,summary:s,tags:l,links:i,logo:"/logo"}),(0,o.jsx)(g,{content:a})]}),k=(0,o.jsx)(eh,{name:t,onFollowButtonClick:()=>j(!0)}),N="".concat(function(e){let[t,n]=(0,r.useState)(0),o=()=>{if(!e.current)return;let t=e.current.getBoundingClientRect().top,{innerHeight:o}=window;n(o-t)};return(0,r.useEffect)(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[]),t}(_),"px"),S=(e,t)=>(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start"},children:[(0,o.jsx)(t,{...e,style:{width:"85%"}}),(0,o.jsx)(ey,{showFollowItem:!0,showNotifyItem:!0,actions:x,externalActionSelected:p,notifyItemSelected:()=>f(!0),followItemSelected:()=>j(!0)})]});return(0,o.jsx)("div",{className:m()(v().lowerSectionMobile),ref:_,style:{height:N},children:(0,o.jsx)(d.Z,{defaultActiveKey:"0",items:[u&&{label:"Chat",key:"0",children:b},{label:"About",key:"2",children:C},{label:"Followers",key:"3",children:k}],renderTabBar:S})})},eI=e=>{let{externalActionToDisplay:t,setExternalActionToDisplay:n}=e,{title:s,description:l,url:i}=t;return(0,o.jsx)(eu.Modal,{title:l||s,url:i,open:!!t,height:"80vh",handleCancel:()=>n(null)})},eB=()=>{let e=(0,l.sJ)(c.Q),t=(0,l.sJ)(c.g1),n=(0,l.sJ)(c.pT),s=(0,l.sJ)(c.di),i=(0,l.sJ)(c.db),[a,d]=(0,l.FV)(c.hz),u=(0,l.sJ)(c.j$),m=(0,l.sJ)(c.YW),{viewerCount:x,lastConnectTime:p,lastDisconnectTime:j,streamTitle:_}=(0,l.sJ)(c.RI),{extraPageContent:g,version:w,name:y,summary:b,socialHandles:C,tags:k,externalActions:S,offlineMessage:Z,chatDisabled:F,federation:T,notifications:D}=t,[E,M]=(0,r.useState)(!1),[B,z]=(0,r.useState)(!1),[J,P]=(0,r.useState)(!1),{account:U}=T,{browser:G}=D,{enabled:q}=G,[Y,V]=(0,r.useState)(null),Q=e=>{let{openExternally:t,url:n}=e;t?window.open(n,"_blank"):V(e)},W=S.map(e=>(0,o.jsx)(H,{action:e,externalActionSelected:Q},e.url)),K=()=>{let e=parseInt((0,f.$o)(f.dA.userVisitCount),10);Number.isNaN(e)&&(e=0),(0,f.qQ)(f.dA.userVisitCount,e+1),e>2&&!(0,f.$o)(f.dA.hasDisplayedNotificationModal)&&M(!0)},X=()=>{z(!1),M(!1),(0,f.qQ)(f.dA.hasDisplayedNotificationModal,!0)},$=()=>{let e=window.innerWidth;void 0===a&&(e<=768?d(!0):d(!1)),!a&&e<=768&&d(!0),a&&e>768&&d(!1)};(0,r.useEffect)(()=>(K(),$(),window.addEventListener("resize",$),()=>{window.removeEventListener("resize",$)}),[]);let ee=!F&&s&&n;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:v().main,children:[(0,o.jsxs)(eF,{className:v().root,children:[(0,o.jsxs)("div",{className:v().mainSection,children:[(0,o.jsxs)("div",{className:v().topSection,children:[e.appLoading&&(0,o.jsx)(h.Z,{loading:!0,active:!0,paragraph:{rows:7}}),m&&(0,o.jsx)(eD,{source:"/hls/stream.m3u8",online:m}),!m&&!e.appLoading&&(0,o.jsx)(I.R,{streamName:y,customText:Z,notificationsEnabled:q,fediverseAccount:U,lastLive:j,onNotifyClick:()=>z(!0),onFollowClick:()=>P(!0)}),m&&(0,o.jsx)(et.X,{online:m,lastConnectTime:p,lastDisconnectTime:j,viewerCount:x})]}),(0,o.jsx)("div",{className:v().midSection,children:(0,o.jsxs)("div",{className:v().buttonsLogoTitleSection,children:[!a&&(0,o.jsxs)(A,{children:[W,(0,o.jsx)(O,{size:"small",onClick:()=>P(!0)}),(0,o.jsx)(eA,{open:E,notificationClicked:()=>z(!0),notificationClosed:()=>X(),children:(0,o.jsx)(R,{onClick:()=>z(!0)})})]}),(0,o.jsx)(eu.Modal,{title:"Browser Notifications",open:B,afterClose:()=>X(),handleCancel:()=>X(),children:(0,o.jsx)(eT,{})})]})}),a?(0,o.jsx)(eH,{name:y,streamTitle:_,summary:b,tags:k,socialHandles:C,extraPageContent:g,messages:u,currentUser:i,showChat:ee,actions:S,setExternalActionToDisplay:Q,setShowNotifyPopup:z,setShowFollowModal:P}):(0,o.jsx)(eM,{name:y,streamTitle:_,summary:b,tags:k,socialHandles:C,extraPageContent:g,setShowFollowModal:P}),(0,o.jsx)(L,{version:w})]}),ee&&!a&&(0,o.jsx)(N,{})]}),!a&&!1]}),Y&&(0,o.jsx)(eI,{externalActionToDisplay:Y,setExternalActionToDisplay:V}),(0,o.jsx)(eu.Modal,{title:"Follow ".concat(y),open:J,handleCancel:()=>P(!1),width:"550px",children:(0,o.jsx)(eL,{account:U,name:y,handleClose:()=>P(!1)})})]})};var eO=n(37527),ez=n(85402);let eR=e=>{let{title:t,message:n}=e;return(0,o.jsx)(ez.Z,{title:t,visible:!0,footer:null,closable:!1,keyboard:!1,width:900,centered:!0,className:"modal",children:(0,o.jsx)("p",{style:{fontSize:"1.3rem"},children:n})})},eJ=()=>{let e=(0,l.sJ)(c.j$),t=(0,l.sJ)(c.RI),n=!1,o="",s=()=>{n=!0,o=window.document.title},i=()=>{n=!1,window.document.title=o},a=()=>{window.addEventListener("blur",s),window.addEventListener("focus",i)};return(0,r.useEffect)(()=>(o=window.document.title,a(),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",s)}),[]),(0,r.useEffect)(()=>{let{online:e}=t;n&&e&&(window.document.title="\uD83D\uDCAC :: ".concat(o))},[e]),(0,r.useEffect)(()=>{if(!n)return;let{online:e}=t;e?window.document.title=" \uD83D\uDFE2 :: ".concat(o):e||(window.document.title=" \uD83D\uDD34 :: ".concat(o))},[c.RI]),null},eP=()=>(0,o.jsx)("script",{id:"server-side-hydration",nonce:"{{.Nonce}}",dangerouslySetInnerHTML:{__html:"\n window.configHydration = {{.ServerConfigJSON}};\n window.statusHydration = {{.StatusJSON}};\n "}}),eU=()=>{let e=(0,l.sJ)(c.g1),{appearanceVariables:t,customStyles:n}=e,s=Object.keys(t).filter(e=>!!t[e]).map(e=>"--".concat(e,": ").concat(t[e]));return(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n :root {\n ".concat(s.join(";\n"),"\n }\n ").concat(n,"\n ")}})},eG=()=>{let e=(0,l.sJ)(c.g1),{name:t,title:n,customStyles:i}=e,d=(0,l.sJ)(c.di),h=(0,l.sJ)(c.ap),u=(0,r.useRef)(null),{chatDisabled:m}=e;return(0,r.useEffect)(()=>{!function(e){let t=e=>{let t=e.getAttribute("rel");e.setAttribute("rel","".concat(t," noopener noreferrer"))};e.querySelectorAll("a").forEach(e=>t(e));let n=new MutationObserver(function(e){for(let n of e)for(let o of n.addedNodes)o instanceof HTMLElement&&"a"===o.tagName.toLowerCase()&&t(o)});n.observe(e,{attributes:!1,childList:!0,subtree:!0})}(u.current)},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(a(),{children:[(0,o.jsx)(eP,{}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"57x57",href:"/img/favicon/apple-icon-57x57.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"60x60",href:"/img/favicon/apple-icon-60x60.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"72x72",href:"/img/favicon/apple-icon-72x72.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"76x76",href:"/img/favicon/apple-icon-76x76.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"114x114",href:"/img/favicon/apple-icon-114x114.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"120x120",href:"/img/favicon/apple-icon-120x120.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"144x144",href:"/img/favicon/apple-icon-144x144.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"152x152",href:"/img/favicon/apple-icon-152x152.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/img/favicon/apple-icon-180x180.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"192x192",href:"/img/favicon/android-icon-192x192.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/img/favicon/favicon-32x32.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"96x96",href:"/img/favicon/favicon-96x96.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/img/favicon/favicon-16x16.png"}),(0,o.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,o.jsx)("link",{href:"/api/auth/provider/indieauth"}),(0,o.jsx)("meta",{name:"msapplication-TileColor",content:"#ffffff"}),(0,o.jsx)("meta",{name:"msapplication-TileImage",content:"/img/favicon/ms-icon-144x144.png"}),(0,o.jsx)("meta",{name:"theme-color",content:"#ffffff"}),(0,o.jsx)("style",{children:i}),(0,o.jsx)("base",{target:"_blank"})]}),(0,o.jsxs)(a(),{children:[t?(0,o.jsx)("title",{children:t}):(0,o.jsx)("title",{children:"{{.Name}}"}),(0,o.jsx)("meta",{name:"description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"og:title",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"og:site_name",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"og:url",content:"{{.RequestedURL}}"}),(0,o.jsx)("meta",{property:"og:description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"og:type",content:"video.other"}),(0,o.jsx)("meta",{property:"video:tag",content:"{{.TagsString}}"}),(0,o.jsx)("meta",{property:"og:image",content:"{{.RequestedURL}}{{.Thumbnail}}"}),(0,o.jsx)("meta",{property:"og:image:url",content:"{{.RequestedURL}}{{.Thumbnail}}"}),(0,o.jsx)("meta",{property:"og:image:alt",content:"{{.RequestedURL}}{{.Image}}"}),(0,o.jsx)("meta",{property:"og:video",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"og:video:secure_url",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"og:video:height",content:"315"}),(0,o.jsx)("meta",{property:"og:video:width",content:"560"}),(0,o.jsx)("meta",{property:"og:video:type",content:"text/html"}),(0,o.jsx)("meta",{property:"og:video:actor",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"twitter:title",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"twitter:url",content:"{{.RequestedURL}}"}),(0,o.jsx)("meta",{property:"twitter:description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"twitter:image",content:"{{.Image}}"}),(0,o.jsx)("meta",{property:"twitter:card",content:"player"}),(0,o.jsx)("meta",{property:"twitter:player",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"twitter:player:width",content:"560"}),(0,o.jsx)("meta",{property:"twitter:player:height",content:"315"})]}),(0,o.jsx)(c.me,{}),(0,o.jsx)(eJ,{}),(0,o.jsx)(eU,{}),(0,o.jsxs)(s.Z,{ref:u,style:{minHeight:"100vh"},children:[(0,o.jsx)(eO.h,{name:n||t,chatAvailable:d,chatDisabled:m}),(0,o.jsx)(eB,{}),h&&(0,o.jsx)(eR,{title:h.title,message:h.message})]})]})};function eq(){return(0,o.jsx)(eG,{})}},13959:function(e){e.exports={button:"ActionButton_button__z5Z2c",icon:"ActionButton_icon__EPp7Q"}},97038:function(e){e.exports={item:"ActionButtonMenu_item__OJQdr",buttonWrap:"ActionButtonMenu_buttonWrap__WQ9kt",icon:"ActionButtonMenu_icon__edY1D",menu:"ActionButtonMenu_menu__GChDk"}},12270:function(e){e.exports={row:"ActionButtonRow_row__SiEGe"}},47900:function(e){e.exports={root:"ContentHeader_root__HaUG0",row:"ContentHeader_row__9Q8gH",logoTitleSection:"ContentHeader_logoTitleSection__Z8pUc",logo:"ContentHeader_logo__wo_HN",titleSection:"ContentHeader_titleSection___6Y15",title:"ContentHeader_title__E_DsI",subtitle:"ContentHeader_subtitle__n1Wew",tagList:"ContentHeader_tagList__rx3jY"}},79252:function(e){e.exports={root:"UserDropdown_root__IdxfQ","ant-space":"UserDropdown_ant-space__XJTZ3","ant-space-item":"UserDropdown_ant-space-item__w4nC2"}},66009:function(e){e.exports={header:"FollowModal_header__la1ji",buttons:"FollowModal_buttons__tt4Mc",instructions:"FollowModal_instructions__HiKFF",footer:"FollowModal_footer__AjucH",account:"FollowModal_account__cmHkm",logo:"FollowModal_logo__Ew8xK",username:"FollowModal_username__A_OTw",name:"FollowModal_name__Sf_TP"}},17725:function(e){e.exports={root:"Content_root__h1mNK",mainSection:"Content_mainSection__Gk78Y",topSection:"Content_topSection__JIZi0",lowerSection:"Content_lowerSection__BZHYI",lowerSectionMobile:"Content_lowerSectionMobile__hRr0_",leftCol:"Content_leftCol__U2TDq",loadingSpinner:"Content_loadingSpinner__mDlYC",main:"Content_main__XVf63"}},10808:function(e){e.exports={pageContentContainer:"CustomPageContent_pageContentContainer__EG4tU",customPageContent:"CustomPageContent_customPageContent__Mr981",summary:"CustomPageContent_summary___Zgps"}},67917:function(e){e.exports={footer:"Footer_footer__mPuvf",links:"Footer_links__7bBxV"}},31764:function(e){e.exports={header:"Header_header__U4Ro1",logo:"Header_logo__HLZ6Z"}},74933:function(e){e.exports={root:"Logo_root__jKiJC",container:"Logo_container__A4UYT",image:"Logo_image__Ahkom"}},77011:function(e){e.exports={spinner:"Modal_spinner__GiSS0",content:"Modal_content__h9my9"}},88335:function(e){e.exports={outerContainer:"OfflineBanner_outerContainer__3AbsB",innerContainer:"OfflineBanner_innerContainer__zTm13",bodyText:"OfflineBanner_bodyText__nNNy0",separator:"OfflineBanner_separator___j_Ss",lastLiveDate:"OfflineBanner_lastLiveDate___UZdO",clockIcon:"OfflineBanner_clockIcon__s0DB_",header:"OfflineBanner_header__Vu20o",footer:"OfflineBanner_footer__o3Zl5",actionLink:"OfflineBanner_actionLink__b4Mwa"}},12341:function(e){e.exports={root:"Sidebar_root__8HE0A"}},573:function(e){e.exports={link:"SocialLinks_link___CcSm",links:"SocialLinks_links__gOAb7"}},37970:function(e){e.exports={statusbar:"Statusbar_statusbar__AtVnB"}},21890:function(e){e.exports={followers:"FollowerCollection_followers__e_EUS",noFollowers:"FollowerCollection_noFollowers__UaCVW"}},69833:function(e){e.exports={follower:"SingleFollower_follower__EyBDI",avatar:"SingleFollower_avatar__V9jHG",account:"SingleFollower_account__Z66vo",placeholder:"SingleFollower_placeholder__CgsfJ"}}},function(e){e.O(0,[8909,3903,4267,575,5938,6395,1082,5360,7066,8793,7466,9774,2888,179],function(){return e(e.s=48312)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/pPurWOaetFtZdDX44pOoU/_buildManifest.js b/static/web/_next/static/pgO_dCEG6ksRzmGL_PJKC/_buildManifest.js similarity index 83% rename from static/web/_next/static/pPurWOaetFtZdDX44pOoU/_buildManifest.js rename to static/web/_next/static/pgO_dCEG6ksRzmGL_PJKC/_buildManifest.js index 9e12a66cf..08344f6b0 100644 --- a/static/web/_next/static/pPurWOaetFtZdDX44pOoU/_buildManifest.js +++ b/static/web/_next/static/pgO_dCEG6ksRzmGL_PJKC/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,a,c,e,i,t,n,d,f,h,o,m,b,u,k,g,j,r,p,l,_,w,v,y,I,B,F,A,D){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/api/:path*"},{source:"/hls/:path*"},{source:"/img/:path*"},{source:"/logo"},{source:"/thumbnail.jpg"}],fallback:[]},"/":[a,s,c,t,n,f,b,u,r,"static/chunks/8793-fb39c89e6ac1a77e.js",h,"static/css/089ea92974e6f7ca.css","static/chunks/pages/index-49786d08775a251c.js"],"/_error":["static/chunks/pages/_error-02cc11fd74b4e5ff.js"],"/admin":[a,s,c,e,i,t,n,d,o,u,"static/chunks/8676-c38bd41883242e8e.js","static/chunks/pages/admin-f61cf9b387d8362c.js"],"/admin/access-tokens":[a,s,c,e,i,"static/chunks/pages/admin/access-tokens-91177ddb58bd90ee.js"],"/admin/actions":[k,a,s,c,e,p,"static/chunks/pages/admin/actions-7483f9b4cbcfc09b.js"],"/admin/chat/emojis":[a,s,c,e,m,l,"static/chunks/pages/admin/chat/emojis-9dba07537ae5965f.js"],"/admin/chat/messages":[k,a,s,c,e,i,n,_,"static/chunks/pages/admin/chat/messages-047de84a2e00ae32.js"],"/admin/chat/users":[k,a,s,c,e,i,t,n,_,"static/chunks/pages/admin/chat/users-cccb0365f7f2b068.js"],"/admin/config/appearance":[w,b,v,y,"static/css/6c8941159bdd16f6.css","static/chunks/pages/admin/config/appearance-7e36c5c106f93636.js"],"/admin/config/streamkeys":[a,s,c,e,p,"static/chunks/pages/admin/config/streamkeys-6a3f2badc0712b01.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-ebd8215757f41c6c.js"],"/admin/config-public-details":[w,a,s,c,e,m,v,l,"static/chunks/7022-3b2d41956634908e.js","static/chunks/pages/admin/config-public-details-496d14bd2df3187b.js"],"/admin/config-server-details":[I,"static/chunks/pages/admin/config-server-details-fafadf003f21dada.js"],"/admin/config-social-items":[a,s,c,e,"static/chunks/pages/admin/config-social-items-b791a665eeb4c2aa.js"],"/admin/config-storage":["static/chunks/pages/admin/config-storage-deb117562bb5cc59.js"],"/admin/config-video":[a,s,c,e,I,"static/chunks/6962-f197cc126c73fb7f.js","static/chunks/pages/admin/config-video-ea088d6f81d33fcc.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-8c2d451ee44fb398.js"],"/admin/hardware-info":[g,i,t,d,m,o,j,"static/chunks/pages/admin/hardware-info-c3e778b57a2b1513.js"],"/admin/help":[t,d,b,y,"static/chunks/7830-37f6f9f7aaae2bbf.js","static/chunks/pages/admin/help-cf85d400d1ada208.js"],"/admin/logs":[a,s,c,e,i,u,"static/chunks/pages/admin/logs-162fcb457a63183f.js"],"/admin/stream-health":[g,i,t,d,o,j,"static/chunks/2934-c96a01cbf005d5a7.js","static/chunks/pages/admin/stream-health-8f1f5efaa8ebdcb6.js"],"/admin/upgrade":[a,s,c,e,"static/chunks/2069-c5012847917b76df.js","static/chunks/pages/admin/upgrade-41783a74d59f851b.js"],"/admin/viewer-info":[g,a,s,c,e,i,t,n,d,m,o,j,"static/chunks/pages/admin/viewer-info-028b7180ef826618.js"],"/admin/webhooks":[a,s,c,e,"static/chunks/pages/admin/webhooks-852ecc4a76a501ad.js"],"/embed/chat/readonly":[B,F,f,A,h,D,"static/css/e2479775241cd5e1.css","static/chunks/pages/embed/chat/readonly-1d789cb2de5c6857.js"],"/embed/chat/readwrite":[B,F,s,f,A,"static/chunks/911-9156415c36038fd8.js",h,D,"static/css/d97e63babcccad86.css","static/chunks/pages/embed/chat/readwrite-9c8509e8be1ad34b.js"],"/embed/video":["static/chunks/d6e1aeb5-0705bf43bcd6af77.js",n,f,"static/css/7c735c05af084bb2.css","static/chunks/7902-139b487986de3737.js",r,h,"static/chunks/2239-de44814eef43316f.js","static/css/f065863129f648da.css","static/chunks/pages/embed/video-04abad59027d2c31.js"],sortedPages:["/","/_app","/_error","/admin","/admin/access-tokens","/admin/actions","/admin/chat/emojis","/admin/chat/messages","/admin/chat/users","/admin/config/appearance","/admin/config/streamkeys","/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-6d59cce6f69e27ae.js","static/chunks/4267-cfe0f573c442773c.js","static/chunks/2206-8da9006b177e3283.js","static/chunks/8091-5d2e0cdb05cd1ef7.js","static/chunks/575-11393a44fd60b818.js","static/chunks/5938-b5bac17e4fa31c49.js","static/chunks/5101-e2c6238798b20535.js","static/chunks/6395-f04016ae318b5e91.js","static/chunks/7466-1e76829814bac0c3.js","static/chunks/4763-00b0de2ecc334aed.js","static/chunks/5577-ce77da4314c60f70.js","static/chunks/1082-51b9f63c6446d49d.js","static/chunks/5360-fbeb63371734b066.js","static/chunks/29107295-1453a3860b50f70e.js","static/chunks/ee8b1517-9cf421a7da630c58.js","static/chunks/236-f876fd1a47451d45.js","static/chunks/8245-b34a27e35386277e.js","static/chunks/8119-57984c2c349ea105.js","static/chunks/2938-98037ce4e714d752.js","static/chunks/9550-db4a457e5e1bbbcf.js","static/chunks/4ad82c5e-573627f1f4333b92.js","static/chunks/1943-6310cc9ae4d0ffc3.js","static/chunks/1938-c04d908728a12ddb.js","static/chunks/3286-716fef4ced844a4d.js","static/chunks/d3048c20-93c008b4ff3ddb0e.js","static/chunks/d2094a0f-95b09167d4c8b805.js","static/chunks/3729-e88e6289f5436bb5.js","static/chunks/4977-cca63b780fb2a427.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,n,d,f,h,o,m,b,u,k,g,j,r,p,l,_,w,v,y,I,B,F,A,D){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/api/:path*"},{source:"/hls/:path*"},{source:"/img/:path*"},{source:"/logo"},{source:"/thumbnail.jpg"}],fallback:[]},"/":[a,s,c,t,n,f,b,u,r,"static/chunks/8793-fb39c89e6ac1a77e.js",h,"static/css/089ea92974e6f7ca.css","static/chunks/pages/index-364351964706eb84.js"],"/_error":["static/chunks/pages/_error-02cc11fd74b4e5ff.js"],"/admin":[a,s,c,e,i,t,n,d,o,u,"static/chunks/8676-c38bd41883242e8e.js","static/chunks/pages/admin-f61cf9b387d8362c.js"],"/admin/access-tokens":[a,s,c,e,i,"static/chunks/pages/admin/access-tokens-91177ddb58bd90ee.js"],"/admin/actions":[k,a,s,c,e,p,"static/chunks/pages/admin/actions-7483f9b4cbcfc09b.js"],"/admin/chat/emojis":[a,s,c,e,m,l,"static/chunks/pages/admin/chat/emojis-9dba07537ae5965f.js"],"/admin/chat/messages":[k,a,s,c,e,i,n,_,"static/chunks/pages/admin/chat/messages-047de84a2e00ae32.js"],"/admin/chat/users":[k,a,s,c,e,i,t,n,_,"static/chunks/pages/admin/chat/users-cccb0365f7f2b068.js"],"/admin/config/appearance":[w,b,v,y,"static/css/6c8941159bdd16f6.css","static/chunks/pages/admin/config/appearance-7e36c5c106f93636.js"],"/admin/config/streamkeys":[a,s,c,e,p,"static/chunks/pages/admin/config/streamkeys-6a3f2badc0712b01.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-ebd8215757f41c6c.js"],"/admin/config-public-details":[w,a,s,c,e,m,v,l,"static/chunks/7022-3b2d41956634908e.js","static/chunks/pages/admin/config-public-details-496d14bd2df3187b.js"],"/admin/config-server-details":[I,"static/chunks/pages/admin/config-server-details-fafadf003f21dada.js"],"/admin/config-social-items":[a,s,c,e,"static/chunks/pages/admin/config-social-items-b791a665eeb4c2aa.js"],"/admin/config-storage":["static/chunks/pages/admin/config-storage-deb117562bb5cc59.js"],"/admin/config-video":[a,s,c,e,I,"static/chunks/6962-f197cc126c73fb7f.js","static/chunks/pages/admin/config-video-ea088d6f81d33fcc.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-8c2d451ee44fb398.js"],"/admin/hardware-info":[g,i,t,d,m,o,j,"static/chunks/pages/admin/hardware-info-afa06ef51937f55f.js"],"/admin/help":[t,d,b,y,"static/chunks/7830-37f6f9f7aaae2bbf.js","static/chunks/pages/admin/help-cf85d400d1ada208.js"],"/admin/logs":[a,s,c,e,i,u,"static/chunks/pages/admin/logs-162fcb457a63183f.js"],"/admin/stream-health":[g,i,t,d,o,j,"static/chunks/2934-c96a01cbf005d5a7.js","static/chunks/pages/admin/stream-health-26c387527539722e.js"],"/admin/upgrade":[a,s,c,e,"static/chunks/2069-c5012847917b76df.js","static/chunks/pages/admin/upgrade-41783a74d59f851b.js"],"/admin/viewer-info":[g,a,s,c,e,i,t,n,d,m,o,j,"static/chunks/pages/admin/viewer-info-359b6b1bdfc50de3.js"],"/admin/webhooks":[a,s,c,e,"static/chunks/pages/admin/webhooks-852ecc4a76a501ad.js"],"/embed/chat/readonly":[B,F,f,A,h,D,"static/css/e2479775241cd5e1.css","static/chunks/pages/embed/chat/readonly-1d789cb2de5c6857.js"],"/embed/chat/readwrite":[B,F,s,f,A,"static/chunks/911-9156415c36038fd8.js",h,D,"static/css/d97e63babcccad86.css","static/chunks/pages/embed/chat/readwrite-9c8509e8be1ad34b.js"],"/embed/video":["static/chunks/d6e1aeb5-0705bf43bcd6af77.js",n,f,"static/css/7c735c05af084bb2.css","static/chunks/7902-139b487986de3737.js",r,h,"static/chunks/2239-de44814eef43316f.js","static/css/f065863129f648da.css","static/chunks/pages/embed/video-ff4917f8414b83db.js"],sortedPages:["/","/_app","/_error","/admin","/admin/access-tokens","/admin/actions","/admin/chat/emojis","/admin/chat/messages","/admin/chat/users","/admin/config/appearance","/admin/config/streamkeys","/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-6d59cce6f69e27ae.js","static/chunks/4267-cfe0f573c442773c.js","static/chunks/2206-8da9006b177e3283.js","static/chunks/8091-5d2e0cdb05cd1ef7.js","static/chunks/575-11393a44fd60b818.js","static/chunks/5938-b5bac17e4fa31c49.js","static/chunks/5101-e2c6238798b20535.js","static/chunks/6395-f04016ae318b5e91.js","static/chunks/7466-1e76829814bac0c3.js","static/chunks/4763-00b0de2ecc334aed.js","static/chunks/5577-ce77da4314c60f70.js","static/chunks/1082-51b9f63c6446d49d.js","static/chunks/5360-fbeb63371734b066.js","static/chunks/29107295-1453a3860b50f70e.js","static/chunks/ee8b1517-c2bace5e006cd9c6.js","static/chunks/8245-e589f4c6673abc2b.js","static/chunks/7066-524305b22bfbc967.js","static/chunks/8119-57984c2c349ea105.js","static/chunks/2938-98037ce4e714d752.js","static/chunks/9550-db4a457e5e1bbbcf.js","static/chunks/4ad82c5e-573627f1f4333b92.js","static/chunks/1943-6310cc9ae4d0ffc3.js","static/chunks/1938-c04d908728a12ddb.js","static/chunks/3286-716fef4ced844a4d.js","static/chunks/d3048c20-93c008b4ff3ddb0e.js","static/chunks/d2094a0f-95b09167d4c8b805.js","static/chunks/3729-e88e6289f5436bb5.js","static/chunks/4977-cca63b780fb2a427.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/static/web/_next/static/pPurWOaetFtZdDX44pOoU/_ssgManifest.js b/static/web/_next/static/pgO_dCEG6ksRzmGL_PJKC/_ssgManifest.js similarity index 100% rename from static/web/_next/static/pPurWOaetFtZdDX44pOoU/_ssgManifest.js rename to static/web/_next/static/pgO_dCEG6ksRzmGL_PJKC/_ssgManifest.js diff --git a/static/web/admin/access-tokens/index.html b/static/web/admin/access-tokens/index.html index 940282934..88af0b074 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 24c2f0639..487a6e37c 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/emojis/index.html b/static/web/admin/chat/emojis/index.html index 57676d7f1..20b5633ca 100644 --- a/static/web/admin/chat/emojis/index.html +++ b/static/web/admin/chat/emojis/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Emojis

Here you can upload new custom emojis for usage in the chat. When uploading a new emoji, the filename will be used as emoji name.
NameEmoji
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Emojis

Here you can upload new custom emojis for usage in the chat. When uploading a new emoji, the filename will be used as emoji name.
NameEmoji
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 68112737d..29547d832 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 f9e7c4def..d41ea1486 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 004c7e1e6..19702d2e6 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 bfbe5d3a5..751acc270 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 208812a20..eadbf9ebc 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 f4f9854eb..29e3d2e26 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 c7ae6613a..be509ac12 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 356063611..2ee332a90 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 3e5275b57..b84bfa8e6 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 780323a5f..ad413e6eb 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 85fa5d9b9..b0d67ec52 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/config/streamkeys/index.html b/static/web/admin/config/streamkeys/index.html index c9df365b9..6d688da70 100644 --- a/static/web/admin/config/streamkeys/index.html +++ b/static/web/admin/config/streamkeys/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Streaming Keys

A streaming key is used with your broadcasting software to authenticate itself to Owncast. Most people will only need one. However, if you share a server with others or you want different keys for different broadcasting sources you can add more here.
These keys are unrelated to the admin password and will not grant you access to make changes to Owncast's configuration.
Read more about broadcasting at the documentation.
KeyComment
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Streaming Keys

A streaming key is used with your broadcasting software to authenticate itself to Owncast. Most people will only need one. However, if you share a server with others or you want different keys for different broadcasting sources you can add more here.
These keys are unrelated to the admin password and will not grant you access to make changes to Owncast's configuration.
Read more about broadcasting at the documentation.
KeyComment
No data

\ 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 3a2c77e93..7183c7e79 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 e1dc409e0..0f871fda4 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 bcdcf41de..f9f384c07 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 55e34a142..568c90799 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 b3c633cd2..6e0bdfbdb 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.

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.

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 032c87ae1..b85cc139c 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 9ff8e8267..47caa245f 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 d875e5de5..4ce8cae77 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 9de684bcd..15369e4fe 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 d3699898a..086a761e3 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 cff4f1bdd..8b6daacf7 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 498495c66..4d507be01 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 6d6cbcc35..5c6da070e 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 131b094a0..aabd6659e 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