import{_ as t,a as e,b as i,c as n,i as a,s as r,d as o,e as s,S as l,f as u,g as h,h as c,k as f,m as d,r as v,u as g,v as p,w as m,x as y,y as b,z as x,A as _,t as k,j as w,n as M,B as S,p as P,q as D,l as O,O as A,o as C,E as T,F as R,G as L,H as E,C as I,D as z,$ as F,V,a0 as B,a1 as N,a2 as j,a3 as W,a4 as H,a5 as $,a6 as Y,K as U,a7 as X,a8 as q,a9 as K}from"./client.f99b8a43.js";import{_ as G,h as Z,L as J,c as Q,a as tt,b as et}from"./createOctokit.de4dbb7b.js";function it(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var a,r=e(t);if(n){var o=e(this).constructor;a=Reflect.construct(r,arguments,o)}else a=r.apply(this,arguments);return i(this,a)}}function nt(t){var e,i,n,a,r,o,s,l,v,g,p,m,y,b,x=t[1].name+"",T=("up"===t[1].status?_.i18n.up:_.i18n.down)+"",R=_.i18n.overallUptimeTitle+"",L=t[1].uptime+"",E=(void 0===t[1].showAverageResponseTime||t[1].showAverageResponseTime)&&rt(t);return{c:function(){e=u("h1"),i=u("a"),n=k(x),r=P(),o=u("span"),s=k(T),v=P(),g=u("dl"),p=u("dt"),m=k(R),y=u("dd"),b=k(L),E&&E.c(),this.h()},l:function(t){e=h(t,"H1",{});var a=c(e);i=h(a,"A",{class:!0,href:!0});var l=c(i);n=w(l,x),l.forEach(f),r=D(a),o=h(a,"SPAN",{class:!0});var u=c(o);s=w(u,T),u.forEach(f),a.forEach(f),v=D(t),g=h(t,"DL",{});var d=c(g);p=h(d,"DT",{});var _=c(p);m=w(_,R),_.forEach(f),y=h(d,"DD",{});var k=c(y);b=w(k,L),k.forEach(f),E&&E.l(d),d.forEach(f),this.h()},h:function(){O(i,"class","no-underline svelte-1d3m0a"),O(i,"href",a=t[1].url.startsWith("$")?"#":t[1].url),O(o,"class",l=A("tag ".concat(t[1].status))+" svelte-1d3m0a")},m:function(t,a){d(t,e,a),M(e,i),M(i,n),M(e,r),M(e,o),M(o,s),d(t,v,a),d(t,g,a),M(g,p),M(p,m),M(g,y),M(y,b),E&&E.m(g,null)},p:function(t,e){2&e&&x!==(x=t[1].name+"")&&S(n,x),2&e&&a!==(a=t[1].url.startsWith("$")?"#":t[1].url)&&O(i,"href",a),2&e&&T!==(T=("up"===t[1].status?_.i18n.up:_.i18n.down)+"")&&S(s,T),2&e&&l!==(l=A("tag ".concat(t[1].status))+" svelte-1d3m0a")&&O(o,"class",l),2&e&&L!==(L=t[1].uptime+"")&&S(b,L),void 0===t[1].showAverageResponseTime||t[1].showAverageResponseTime?E?E.p(t,e):((E=rt(t)).c(),E.m(g,null)):E&&(E.d(1),E=null)},i:C,o:C,d:function(t){t&&f(e),t&&f(v),t&&f(g),E&&E.d()}}}function at(t){var e,i;return e=new J({}),{c:function(){T(e.$$.fragment)},l:function(t){R(e.$$.fragment,t)},m:function(t,n){L(e,t,n),i=!0},p:C,i:function(t){i||(y(e.$$.fragment,t),i=!0)},o:function(t){p(e.$$.fragment,t),i=!1},d:function(t){E(e,t)}}}function rt(t){var e,i,n,a,r,o=_.i18n.averageResponseTimeTitle+"",s=t[1].time+"",l=_.i18n.ms+"";return{c:function(){e=u("dt"),i=k(o),n=u("dd"),a=k(s),r=k(l)},l:function(t){e=h(t,"DT",{});var u=c(e);i=w(u,o),u.forEach(f),n=h(t,"DD",{});var d=c(n);a=w(d,s),r=w(d,l),d.forEach(f)},m:function(t,o){d(t,e,o),M(e,i),d(t,n,o),M(n,a),M(n,r)},p:function(t,e){2&e&&s!==(s=t[1].time+"")&&S(a,s)},d:function(t){t&&f(e),t&&f(n)}}}function ot(t){var e,i,n,a,r=[at,nt],o=[];function s(t,e){return t[0]?0:t[1]?1:-1}return~(i=s(t))&&(n=o[i]=r[i](t)),{c:function(){e=u("section"),n&&n.c()},l:function(t){e=h(t,"SECTION",{});var i=c(e);n&&n.l(i),i.forEach(f)},m:function(t,n){d(t,e,n),~i&&o[i].m(e,null),a=!0},p:function(t,a){var l=v(a,1)[0],u=i;(i=s(t))===u?~i&&o[i].p(t,l):(n&&(g(),p(o[u],1,1,(function(){o[u]=null})),m()),~i?((n=o[i])?n.p(t,l):(n=o[i]=r[i](t)).c(),y(n,1),n.m(e,null)):n=null)},i:function(t){a||(y(n),a=!0)},o:function(t){p(n),a=!1},d:function(t){t&&f(e),~i&&o[i].d()}}}function st(t,e,i){var n=e.slug,a=!0,r=(_["status-website"]||{}).apiBaseUrl;r||(r="https://api.github.com");var o=r.includes("api.github.com")?"https://raw.githubusercontent.com":r,s=_.owner,l=_.repo,u=null;return b(G(x.mark((function t(){var e;return x.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("".concat(o,"/").concat(s,"/").concat(l,"/master/history/summary.json"));case 3:return e=t.sent,t.t0=i,t.next=7,e.json();case 7:t.t1=u=t.sent.find((function(t){return t.slug===n})),(0,t.t0)(1,t.t1),t.next=14;break;case 11:t.prev=11,t.t2=t.catch(0),Z(t.t2);case 14:i(0,a=!1);case 15:case"end":return t.stop()}}),t,null,[[0,11]])})))),t.$$set=function(t){"slug"in t&&i(2,n=t.slug)},[a,u,n]}var lt=function(e){t(u,l);var i=it(u);function u(t){var e;return n(this,u),e=i.call(this),a(o(e),t,st,ot,r,{slug:2}),e}return s(u)}();function ut(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var a,r=e(t);if(n){var o=e(this).constructor;a=Reflect.construct(r,arguments,o)}else a=r.apply(this,arguments);return i(this,a)}}function ht(t,e,i){var n=t.slice();return n[6]=e[i],n}function ct(t){for(var e,i,n,a,r=_.i18n.pastIncidents+"",o=t[1],s=[],l=0;l=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0;a--)e.call(i,t[a],a);else for(a=0;ai;)t=t[e.slice(i,n)],n=Ht(e,i=n+1);return t}function Yt(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Ut=function(t){return void 0!==t},Xt=function(t){return"function"==typeof t},qt=function(t,e){if(t.size!==e.size)return!1;var i,n=yt(t);try{for(n.s();!(i=n.n()).done;){var a=i.value;if(!e.has(a))return!1}}catch(t){n.e(t)}finally{n.f()}return!0};var Kt=Math.PI,Gt=2*Kt,Zt=Gt+Kt,Jt=Number.POSITIVE_INFINITY,Qt=Kt/180,te=Kt/2,ee=Kt/4,ie=2*Kt/3,ne=Math.log10,ae=Math.sign;function re(t){var e=Math.round(t);t=se(t,e,t/1e3)?e:t;var i=Math.pow(10,Math.floor(ne(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function oe(t){return!isNaN(parseFloat(t))&&isFinite(t)}function se(t,e,i){return Math.abs(t-e)l&&u3&&void 0!==arguments[3]?arguments[3]:1e-6;return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}var be=function(t){return 0===t||1===t},xe=function(t,e,i){return-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Gt/i)},_e=function(t,e,i){return Math.pow(2,-10*t)*Math.sin((t-e)*Gt/i)+1},ke={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*te)},easeOutSine:function(t){return Math.sin(t*te)},easeInOutSine:function(t){return-.5*(Math.cos(Kt*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return be(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1)))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){return be(t)?t:xe(t,.075,.3)},easeOutElastic:function(t){return be(t)?t:_e(t,.075,.3)},easeInOutElastic:function(t){var e=.1125;return be(t)?t:t<.5?.5*xe(2*t,e,.45):.5+.5*_e(2*t-1,e,.45)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-ke.easeOutBounce(1-t)},easeOutBounce:function(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*ke.easeInBounce(2*t):.5*ke.easeOutBounce(2*t-1)+.5}}; /*! * @kurkle/color v0.2.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela * Released under the MIT License */ function we(t){return t+.5|0}var Me=function(t,e,i){return Math.max(Math.min(t,i),e)};function Se(t){return Me(we(2.55*t),0,255)}function Pe(t){return Me(we(255*t),0,255)}function De(t){return Me(we(t/2.55)/100,0,1)}function Oe(t){return Me(we(100*t),0,100)}var Ae={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},Ce=F("0123456789ABCDEF"),Te=function(t){return Ce[15&t]},Re=function(t){return Ce[(240&t)>>4]+Ce[15&t]},Le=function(t){return(240&t)>>4==(15&t)};function Ee(t){var e=function(t){return Le(t.r)&&Le(t.g)&&Le(t.b)&&Le(t.a)}(t)?Te:Re;return t?"#"+e(t.r)+e(t.g)+e(t.b)+function(t,e){return t<255?e(t):""}(t.a,e):void 0}var Ie=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ze(t,e,i){var n=e*Math.min(i,1-i),a=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return i-n*Math.max(Math.min(a-3,9-a,1),-1)};return[a(0),a(8),a(4)]}function Fe(t,e,i){var n=function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(n+t/60)%6;return i-i*e*Math.max(Math.min(a,4-a,1),0)};return[n(5),n(3),n(1)]}function Ve(t,e,i){var n,a=ze(t,1,.5);for(e+i>1&&(e*=n=1/(e+i),i*=n),n=0;n<3;n++)a[n]*=1-e-i,a[n]+=e;return a}function Be(t){var e,i,n,a=t.r/255,r=t.g/255,o=t.b/255,s=Math.max(a,r,o),l=Math.min(a,r,o),u=(s+l)/2;return s!==l&&(n=s-l,i=u>.5?n/(2-s-l):n/(s+l),e=function(t,e,i,n,a){return t===a?(e-i)/n+(e>16&255,i>>8&255,255&i]}return r}()).transparent=[0,0,0,0]);var e=$e[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}var qe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;var Ke=function(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055},Ge=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)};function Ze(t,e,i){if(t){var n=Be(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=je(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Je(t,e){return t?Object.assign(e||{},t):t}function Qe(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=Pe(t[3]))):(e=Je(t,{r:0,g:0,b:0,a:1})).a=Pe(e.a),e}function ti(t){return"r"===t.charAt(0)?function(t){var e,i,n,a=qe.exec(t),r=255;if(a){if(a[7]!==e){var o=+a[7];r=a[8]?Se(o):Me(255*o,0,255)}return e=+a[1],i=+a[3],n=+a[5],{r:e=255&(a[2]?Se(e):Me(e,0,255)),g:i=255&(a[4]?Se(i):Me(i,0,255)),b:n=255&(a[6]?Se(n):Me(n,0,255)),a:r}}}(t):He(t)}var ei=function(){function t(e){if(n(this,t),e instanceof t)return e;var i,a,r,o,s=V(e);"object"===s?i=Qe(e):"string"===s&&(o=(a=e).length,"#"===a[0]&&(4===o||5===o?r={r:255&17*Ae[a[1]],g:255&17*Ae[a[2]],b:255&17*Ae[a[3]],a:5===o?17*Ae[a[4]]:255}:7!==o&&9!==o||(r={r:Ae[a[1]]<<4|Ae[a[2]],g:Ae[a[3]]<<4|Ae[a[4]],b:Ae[a[5]]<<4|Ae[a[6]],a:9===o?Ae[a[7]]<<4|Ae[a[8]]:255})),i=r||Xe(e)||ti(e)),this._rgb=i,this._valid=!!i}return s(t,[{key:"valid",get:function(){return this._valid}},{key:"rgb",get:function(){var t=Je(this._rgb);return t&&(t.a=De(t.a)),t},set:function(t){this._rgb=Qe(t)}},{key:"rgbString",value:function(){return this._valid?(t=this._rgb)&&(t.a<255?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(De(t.a),")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")")):void 0;var t}},{key:"hexString",value:function(){return this._valid?Ee(this._rgb):void 0}},{key:"hslString",value:function(){return this._valid?function(t){if(t){var e=Be(t),i=e[0],n=Oe(e[1]),a=Oe(e[2]);return t.a<255?"hsla(".concat(i,", ").concat(n,"%, ").concat(a,"%, ").concat(De(t.a),")"):"hsl(".concat(i,", ").concat(n,"%, ").concat(a,"%)")}}(this._rgb):void 0}},{key:"mix",value:function(t,e){if(t){var i,n=this.rgb,a=t.rgb,r=e===i?.5:e,o=2*r-1,s=n.a-a.a,l=((o*s==-1?o:(o+s)/(1+o*s))+1)/2;i=1-l,n.r=255&l*n.r+i*a.r+.5,n.g=255&l*n.g+i*a.g+.5,n.b=255&l*n.b+i*a.b+.5,n.a=r*n.a+(1-r)*a.a,this.rgb=n}return this}},{key:"interpolate",value:function(t,e){return t&&(this._rgb=function(t,e,i){var n=Ge(De(t.r)),a=Ge(De(t.g)),r=Ge(De(t.b));return{r:Pe(Ke(n+i*(Ge(De(e.r))-n))),g:Pe(Ke(a+i*(Ge(De(e.g))-a))),b:Pe(Ke(r+i*(Ge(De(e.b))-r))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}},{key:"clone",value:function(){return new t(this.rgb)}},{key:"alpha",value:function(t){return this._rgb.a=Pe(t),this}},{key:"clearer",value:function(t){return this._rgb.a*=1-t,this}},{key:"greyscale",value:function(){var t=this._rgb,e=we(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}},{key:"opaquer",value:function(t){return this._rgb.a*=1+t,this}},{key:"negate",value:function(){var t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}},{key:"lighten",value:function(t){return Ze(this._rgb,2,t),this}},{key:"darken",value:function(t){return Ze(this._rgb,2,-t),this}},{key:"saturate",value:function(t){return Ze(this._rgb,1,t),this}},{key:"desaturate",value:function(t){return Ze(this._rgb,1,-t),this}},{key:"rotate",value:function(t){return function(t,e){var i=Be(t);i[0]=We(i[0]+e),i=je(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}]),t}();function ii(t){return new ei(t)}function ni(t){if(t&&"object"===V(t)){var e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function ai(t){return ni(t)?t:ii(t)}function ri(t){return ni(t)?t:ii(t).saturate(.5).darken(.1).hexString()}var oi=Object.create(null),si=Object.create(null);function li(t,e){if(!e)return t;for(var i=e.split("."),n=0,a=i.length;nn&&(n=r),n}function di(t,e,i,n){var a=(n=n||{}).data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},r=n.garbageCollect=[],n.font=e),t.save(),t.font=e;var o,s,l,u,h,c=0,f=i.length;for(o=0;oi.length){for(o=0;o0&&t.stroke()}}function mi(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y5&&void 0!==arguments[5]?arguments[5]:{},l=Ot(e)?e:[e],u=s.strokeWidth>0&&""!==s.strokeColor;for(t.save(),t.font=a.string,wi(t,s),r=0;r1;)i(n=r+a>>1)?r=n:a=n;return{lo:r,hi:a}}var Fi=function(t,e,i){return zi(t,i,(function(n){return t[n][e]=i}))};var Bi=["push","pop","shift","splice","unshift"];function Ni(t,e){var i=t._chartjs;if(i){var n=i.listeners,a=n.indexOf(e);-1!==a&&n.splice(a,1),n.length>0||(Bi.forEach((function(e){delete t[e]})),delete t._chartjs)}}function ji(t){var e,i,n=new Set;for(e=0,i=t.length;e1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,a=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return t[0]};Ut(a)||(a=tn("_fallback",t));var o=(et(e={},Symbol.toStringTag,"Object"),et(e,"_cacheable",!0),et(e,"_scopes",t),et(e,"_rootScopes",n),et(e,"_fallback",a),et(e,"_getTarget",r),et(e,"override",(function(e){return Wi([e].concat(F(t)),i,n,a)})),e);return new Proxy(o,{deleteProperty:function(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get:function(e,n){return Xi(e,n,(function(){return Qi(n,i,t,e)}))},getOwnPropertyDescriptor:function(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf:function(){return Reflect.getPrototypeOf(t[0])},has:function(t,e){return en(t).includes(e)},ownKeys:function(t){return en(t)},set:function(t,e,i){var n=t._storage||(t._storage=r());return t[e]=n[e]=i,delete t._keys,!0}})}function Hi(t,e,i,n){var a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:$i(t,n),setContext:function(e){return Hi(t,e,i,n)},override:function(a){return Hi(t.override(a),e,i,n)}};return new Proxy(a,{deleteProperty:function(e,i){return delete e[i],delete t[i],!0},get:function(t,e,i){return Xi(t,e,(function(){return function(t,e,i){var n=t._proxy,a=t._context,r=t._subProxy,o=t._descriptors,s=n[e];Xt(s)&&o.isScriptable(e)&&(s=function(t,e,i,n){var a=i._proxy,r=i._context,o=i._subProxy,s=i._stack;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t),e=e(r,o||n),s.delete(t),Ui(t,e)&&(e=Zi(a._scopes,a,t,e));return e}(e,s,t,i));Ot(s)&&s.length&&(s=function(t,e,i,n){var a=i._proxy,r=i._context,o=i._subProxy,s=i._descriptors;if(Ut(r.index)&&n(t))e=e[r.index%e.length];else if(At(e[0])){var l=e,u=a._scopes.filter((function(t){return t!==l}));e=[];var h,c=yt(l);try{for(c.s();!(h=c.n()).done;){var f=Zi(u,a,t,h.value);e.push(Hi(f,r,o&&o[t],s))}}catch(t){c.e(t)}finally{c.f()}}return e}(e,s,t,o.isIndexable));Ui(e,s)&&(s=Hi(s,a,r&&r[e],o));return s}(t,e,i)}))},getOwnPropertyDescriptor:function(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf:function(){return Reflect.getPrototypeOf(t)},has:function(e,i){return Reflect.has(t,i)},ownKeys:function(){return Reflect.ownKeys(t)},set:function(e,i,n){return t[i]=n,delete e[i],!0}})}function $i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0},i=t._scriptable,n=void 0===i?e.scriptable:i,a=t._indexable,r=void 0===a?e.indexable:a,o=t._allKeys,s=void 0===o?e.allKeys:o;return{allKeys:s,scriptable:n,indexable:r,isScriptable:Xt(n)?n:function(){return n},isIndexable:Xt(r)?r:function(){return r}}}var Yi=function(t,e){return t?t+Yt(e):e},Ui=function(t,e){return At(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object)};function Xi(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];var n=i();return t[e]=n,n}function qi(t,e,i){return Xt(t)?t(e,i):t}var Ki=function(t,e){return!0===t?e:"string"==typeof t?$t(e,t):void 0};function Gi(t,e,i,n,a){var r,o=yt(e);try{for(o.s();!(r=o.n()).done;){var s=r.value,l=Ki(i,s);if(l){t.add(l);var u=qi(l._fallback,i,a);if(Ut(u)&&u!==i&&u!==n)return u}else if(!1===l&&Ut(n)&&i!==n)return null}}catch(t){o.e(t)}finally{o.f()}return!1}function Zi(t,e,i,n){var a=e._rootScopes,r=qi(e._fallback,i,n),o=[].concat(F(t),F(a)),s=new Set;s.add(n);var l=Ji(s,o,i,r||i,n);return null!==l&&((!Ut(r)||r===i||null!==(l=Ji(s,o,r,l,n)))&&Wi(Array.from(s),[""],a,r,(function(){return function(t,e,i){var n=t._getTarget();e in n||(n[e]={});var a=n[e];if(Ot(a)&&At(i))return i;return a}(e,i,n)})))}function Ji(t,e,i,n,a){for(;i;)i=Gi(t,e,i,n,a);return i}function Qi(t,e,i,n){var a,r,o=yt(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(a=tn(Yi(s,t),i),Ut(a))return Ui(t,a)?Zi(i,n,t,a):a}}catch(t){o.e(t)}finally{o.f()}}function tn(t,e){var i,n=yt(e);try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a){var r=a[t];if(Ut(r))return r}}}catch(t){n.e(t)}finally{n.f()}}function en(t){var e=t._keys;return e||(e=t._keys=function(t){var e,i=new Set,n=yt(t);try{for(n.s();!(e=n.n()).done;){var a,r=e.value,o=yt(Object.keys(r).filter((function(t){return!t.startsWith("_")})));try{for(o.s();!(a=o.n()).done;){var s=a.value;i.add(s)}}catch(t){o.e(t)}finally{o.f()}}}catch(t){n.e(t)}finally{n.f()}return Array.from(i)}(t._scopes)),e}function nn(t,e,i,n){var a,r,o,s,l=t.iScale,u=this._parsing.key,h=void 0===u?"r":u,c=new Array(n);for(a=0,r=n;a2&&void 0!==arguments[2]?arguments[2]:"x",o=on(r),s=t.length,l=rn(t,0),u=0;u1&&void 0!==arguments[1]?arguments[1]:"x",r=on(a),o=t.length,s=Array(o).fill(0),l=Array(o),u=rn(t,0);for(e=0;e0||e>0)&&(!i||!i.shadowRoot)}(o,s,t.target))i=o,n=s;else{var u=e.getBoundingClientRect();i=r.clientX-u.left,n=r.clientY-u.top,l=!0}return{x:i,y:n,box:l}}(t,i),u=l.x,h=l.y,c=l.box,f=o.left+(c&&s.left),d=o.top+(c&&s.top),v=e.width,g=e.height;return r&&(v-=o.width+s.width,g-=o.height+s.height),{x:Math.round((u-f)/v*i.width/n),y:Math.round((h-d)/g*i.height/n)}}var yn=function(t){return Math.round(10*t)/10};function bn(t,e,i,n){var a=vn(t),r=pn(a,"margin"),o=dn(a.maxWidth,t,"clientWidth")||Jt,s=dn(a.maxHeight,t,"clientHeight")||Jt,l=function(t,e,i){var n,a;if(void 0===e||void 0===i){var r=fn(t);if(r){var o=r.getBoundingClientRect(),s=vn(r),l=pn(s,"border","width"),u=pn(s,"padding");e=o.width-u.width-l.width,i=o.height-u.height-l.height,n=dn(s.maxWidth,r,"clientWidth"),a=dn(s.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||Jt,maxHeight:a||Jt}}(t,e,i),u=l.width,h=l.height;if("content-box"===a.boxSizing){var c=pn(a,"border","width"),f=pn(a,"padding");u-=f.width+c.width,h-=f.height+c.height}return u=Math.max(0,u-r.width),h=Math.max(0,n?Math.floor(u/n):h-r.height),u=yn(Math.min(u,o,l.maxWidth)),h=yn(Math.min(h,s,l.maxHeight)),u&&!h&&(h=yn(u/2)),{width:u,height:h}}function xn(t,e,i){var n=e||1,a=Math.floor(t.height*n),r=Math.floor(t.width*n);t.height=a/n,t.width=r/n;var o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height="".concat(t.height,"px"),o.style.width="".concat(t.width,"px")),(t.currentDevicePixelRatio!==n||o.height!==a||o.width!==r)&&(t.currentDevicePixelRatio=n,o.height=a,o.width=r,t.ctx.setTransform(n,0,0,n,0,0),!0)}var _n=function(){var t=!1;try{var e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function kn(t,e){var i=function(t,e){return vn(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function wn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Mn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Sn(t,e,i,n){var a={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=wn(t,a,i),s=wn(a,r,i),l=wn(r,e,i),u=wn(o,s,i),h=wn(s,l,i);return wn(u,h,i)}var Pn=new Map;function Dn(t,e,i){return function(t,e){e=e||{};var i=t+JSON.stringify(e),n=Pn.get(i);return n||(n=new Intl.NumberFormat(t,e),Pn.set(i,n)),n}(e,i).format(t)}function On(t,e,i){return t?function(t,e){return{x:function(i){return t+t+e-i},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,i):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}}function An(t,e){var i,n;"ltr"!==e&&"rtl"!==e||(n=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Cn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Tn(t){return"angle"===t?{between:pe,compare:ve,normalize:ge}:{between:ye,compare:function(t,e){return t-e},normalize:function(t){return t}}}function Rn(t){var e=t.start,i=t.end,n=t.count;return{start:e%n,end:i%n,loop:t.loop&&(i-e+1)%n==0,style:t.style}}function Ln(t,e,i){if(!i)return[t];for(var n,a,r,o=i.property,s=i.start,l=i.end,u=e.length,h=Tn(o),c=h.compare,f=h.between,d=h.normalize,v=function(t,e,i){var n,a,r=i.property,o=i.start,s=i.end,l=Tn(r),u=l.between,h=l.normalize,c=e.length,f=t.start,d=t.end,v=t.loop;if(v){for(f+=c,d+=c,n=0,a=c;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}function Wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:Date.now(),i=0;this._charts.forEach((function(n,a){if(n.running&&n.items.length){for(var r,o=n.items,s=o.length-1,l=!1;s>=0;--s)(r=o[s])._active?(r._total>n.duration&&(n.duration=r._total),r.tick(e),l=!0):(o[s]=o[o.length-1],o.pop());l&&(a.draw(),t._notify(a,n,e,"progress")),o.length||(n.running=!1,t._notify(a,n,e,"complete"),n.initial=!1),i+=o.length}})),this._lastDate=e,0===i&&(this._running=!1)}},{key:"_getAnims",value:function(t){var e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}},{key:"listen",value:function(t,e,i){this._getAnims(t).listeners[e].push(i)}},{key:"add",value:function(t,e){var i;e&&e.length&&(i=this._getAnims(t).items).push.apply(i,F(e))}},{key:"has",value:function(t){return this._getAnims(t).items.length>0}},{key:"start",value:function(t){var e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((function(t,e){return Math.max(t,e._duration)}),0),this._refresh())}},{key:"running",value:function(t){if(!this._running)return!1;var e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}},{key:"stop",value:function(t){var e=this._charts.get(t);if(e&&e.items.length){for(var i=e.items,n=i.length-1;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}}},{key:"remove",value:function(t){return this._charts.delete(t)}}]),t}()),$n={boolean:function(t,e,i){return i>.5?e:t},color:function(t,e,i){var n=ai(t||"transparent"),a=n.valid&&ai(e||"transparent");return a&&a.valid?a.mix(n,i).hexString():e},number:function(t,e,i){return t+(e-t)*i}},Yn=function(){function t(e,i,a,r){n(this,t);var o=i[a];r=Ei([e.to,r,o,e.from]);var s=Ei([e.from,o,r]);this._active=!0,this._fn=e.fn||$n[e.type||V(s)],this._easing=ke[e.easing]||ke.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=i,this._prop=a,this._from=s,this._to=r,this._promises=void 0}return s(t,[{key:"active",value:function(){return this._active}},{key:"update",value:function(t,e,i){if(this._active){this._notify(!1);var n=this._target[this._prop],a=i-this._start,r=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Ei([t.to,e,n,t.from]),this._from=Ei([t.from,n,e])}}},{key:"cancel",value:function(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}},{key:"tick",value:function(t){var e,i=t-this._start,n=this._duration,a=this._prop,r=this._from,o=this._loop,s=this._to;if(this._active=r!==s&&(o||i1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[a]=this._fn(r,s,e))}},{key:"wait",value:function(){var t=this._promises||(this._promises=[]);return new Promise((function(e,i){t.push({res:e,rej:i})}))}},{key:"_notify",value:function(t){for(var e=t?"res":"rej",i=this._promises||[],n=0;n=0;--i){var l=o[i];if("$"!==l.charAt(0))if("options"!==l){var u=e[l],h=r[l],c=n.get(l);if(h){if(c&&h.active()){h.update(c,u,s);continue}h.cancel()}c&&c.duration?(r[l]=h=new Yn(c,t,l,u),a.push(h)):t[l]=u}else a.push.apply(a,F(this._animateOptions(t,e)))}return a}},{key:"update",value:function(t,e){if(0!==this._properties.size){var i=this._createAnimations(t,e);return i.length?(Hn.add(this._chart,i),!0):void 0}Object.assign(t,e)}}]),t}();function qn(t,e){var i=t&&t.options||{},n=i.reverse,a=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:n?r:a,end:n?a:r}}function Kn(t,e){var i,n,a=[],r=t._getSortedDatasetMetas(e);for(i=0,n=r.length;i3&&void 0!==arguments[3]?arguments[3]:{},l=t.keys,u="single"===s.mode;if(null!==e){for(n=0,a=l.length;n0||!i&&s<0)return o.index}}catch(t){r.e(t)}finally{r.f()}return null}function ta(t,e){for(var i,n=t.chart,a=t._cachedMeta,r=n._stacks||(n._stacks={}),o=a.iScale,s=a.vScale,l=a.index,u=o.axis,h=s.axis,c=function(t,e,i){return"".concat(t.id,".").concat(e.id,".").concat(i.stack||i.type)}(o,s,a),f=e.length,d=0;d0&&r._parsed[t-1];if(!1===this._parsing)r._parsed=o,r._sorted=!0,a=o;else{a=Ot(o[t])?this.parseArrayData(r,o,t,e):At(o[t])?this.parseObjectData(r,o,t,e):this.parsePrimitiveData(r,o,t,e);for(i=0;ie||d=0;--i)if(!v()){this.updateRangeFromParsed(h,t,n,u);break}return h}},{key:"getAllParsedValues",value:function(t){var e,i,n,a=this._cachedMeta._parsed,r=[];for(e=0,i=a.length;e=0&&t1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0,a="active"===i,r=this._cachedDataOpts,o=t+"-"+i,s=r[o],l=this.enableOptionSharing&&Ut(n);if(s)return aa(s,l);var u=this.chart.config,h=u.datasetElementScopeKeys(this._type,t),c=a?["".concat(t,"Hover"),"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),h),d=Object.keys(ci.elements[t]),v=function(){return e.getContext(n,a)},g=u.resolveNamedOptions(f,d,v,c);return g.$shared&&(g.$shared=l,r[o]=Object.freeze(aa(g,l))),g}},{key:"_resolveAnimations",value:function(t,e,i){var n,a=this.chart,r=this._cachedDataOpts,o="animation-".concat(e),s=r[o];if(s)return s;if(!1!==a.options.animation){var l=this.chart.config,u=l.datasetAnimationScopeKeys(this._type,e),h=l.getOptionScopes(this.getDataset(),u);n=l.createResolver(h,this.getContext(t,i,e))}var c=new Xn(a,n&&n.animations);return n&&n._cacheable&&(r[o]=Object.freeze(c)),c}},{key:"getSharedOptions",value:function(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}},{key:"includeOptions",value:function(t,e){return!e||na(t)||this.chart._animationsDisabled}},{key:"updateElement",value:function(t,e,i,n){na(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}},{key:"updateSharedOptions",value:function(t,e,i){t&&!na(e)&&this._resolveAnimations(void 0,e).update(t,i)}},{key:"_setStyle",value:function(t,e,i,n){t.active=n;var a=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(a)||a})}},{key:"removeHoverStyle",value:function(t,e,i){this._setStyle(t,i,"active",!1)}},{key:"setHoverStyle",value:function(t,e,i){this._setStyle(t,i,"active",!0)}},{key:"_removeDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}},{key:"_setDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}},{key:"_resyncElements",value:function(t){var e,i=this._data,n=this._cachedMeta.data,a=jn(this._syncList);try{for(a.s();!(e=a.n()).done;){var r=v(e.value,3),o=r[0],s=r[1],l=r[2];this[o](s,l)}}catch(t){a.e(t)}finally{a.f()}this._syncList=[];var u=n.length,h=i.length,c=Math.min(h,u);c&&this.parse(0,c),h>u?this._insertElements(u,h-u,t):h2&&void 0!==arguments[2])||arguments[2],a=this._cachedMeta,r=a.data,o=t+e,s=function(t){for(t.length+=e,i=t.length-1;i>=o;i--)t[i]=t[i-e]};for(s(r),i=t;iMath.abs(s)&&(l=s,u=o),e[i.axis]=u,e._custom={barStart:l,barEnd:u,start:a,end:r,min:o,max:s}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function la(t,e,i,n){var a,r,o,s,l=t.iScale,u=t.vScale,h=l.getLabels(),c=l===u,f=[];for(a=i,r=i+n;at.x,i="left",n="right"):(e=t.base=i?1:-1)}(i,a,u)*l,d===u&&(m-=i/2);var y=a.getPixelForDecimal(0),b=a.getPixelForDecimal(1),x=Math.min(y,b),_=Math.max(y,b);e=(m=Math.max(Math.min(m,_),x))+i}if(m===a.getPixelForValue(u)){var k=ae(i)*a.getLineWidthForValue(u)/2;m+=k,i-=k}return{size:i,base:m,head:e,center:e+i/2}}},{key:"_calculateBarIndexPixels",value:function(t,e){var i,n,a=e.scale,r=this.options,o=r.skipNull,s=Rt(r.maxBarThickness,1/0);if(e.grouped){var l=o?this._getStackCount(t):e.stackCount,u="flex"===r.barThickness?function(t,e,i,n){var a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,i=e.xScale,n=e.yScale,a=this.getParsed(t),r=i.getLabelForValue(a.x),o=n.getLabelForValue(a.y),s=a._custom;return{label:e.label,value:"("+r+", "+o+(s?", "+s:"")+")"}}},{key:"update",value:function(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}},{key:"updateElements",value:function(t,e,i,n){for(var a="reset"===n,r=this._cachedMeta,o=r.iScale,s=r.vScale,l=this.resolveDataElementOptions(e,n),u=this.getSharedOptions(l),h=this.includeOptions(n,u),c=o.axis,f=s.axis,d=e;d0&&!isNaN(t)?Gt*(Math.abs(t)/e):0}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=Dn(e._parsed[t],i.options.locale);return{label:n[t]||"",value:a}}},{key:"getMaxBorderWidth",value:function(t){var e,i,n,a,r,o=0,s=this.chart;if(!t)for(e=0,i=s.data.datasets.length;e0&&this.getParsed(e-1),_=e;_0&&Math.abs(w[d]-x[d])>y,m&&(M.parsed=w,M.raw=u.data[_]),f&&(M.options=c||this.resolveDataElementOptions(_,k.active?"active":n)),b||this.updateElement(k,_,M,n),x=w}this.updateSharedOptions(c,n,h)}},{key:"getMaxOverflow",value:function(){var t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;var a=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,r)/2}},{key:"draw",value:function(){var t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),B(e(r.prototype),"draw",this).call(this)}}]),r}();ma.id="line",ma.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},ma.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var ya=function(e){t(a,ra);var i=Nn(a);function a(t,e){var r;return n(this,a),(r=i.call(this,t,e)).innerRadius=void 0,r.outerRadius=void 0,r}return s(a,[{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=Dn(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:a}}},{key:"parseObjectData",value:function(t,e,i,n){return nn.bind(this)(t,e,i,n)}},{key:"update",value:function(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}},{key:"getMinMax",value:function(){var t=this,e=this._cachedMeta,i={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((function(e,n){var a=t.getParsed(n).r;!isNaN(a)&&t.chart.getDataVisibility(n)&&(ai.max&&(i.max=a))})),i}},{key:"_updateRadius",value:function(){var t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(n/2,0),r=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-r*this.index,this.innerRadius=this.outerRadius-r}},{key:"updateElements",value:function(t,e,i,n){var a,r="reset"===n,o=this.chart,s=o.options.animation,l=this._cachedMeta.rScale,u=l.xCenter,h=l.yCenter,c=l.getIndexAngle(0)-.5*Kt,f=c,d=360/this.countVisibleElements();for(a=0;a0){var l=s[0].datasetIndex,u=t.getDatasetMeta(l).data;s=[];for(var h=0;h1){var o=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(o<1e-4||o>1e15)&&(n="scientific"),r=function(t,e){var i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}var s=ne(Math.abs(r)),l=Math.max(Math.min(-1*Math.floor(s),20),0),u={notation:n,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(u,this.options.ticks.format),Dn(t,a,u)},logarithmic:function(t,e,i){if(0===t)return"0";var n=t/Math.pow(10,Math.floor(ne(t)));return 1===n||2===n||5===n?fr.numeric.call(this,t,e,i):""}};var dr={formatters:fr};function vr(t,e){var i=t.options.ticks,n=i.maxTicksLimit||function(t){var e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),a=t._maxLength/i;return Math.floor(Math.min(n,a))}(t),a=i.major.enabled?function(t){var e,i,n=[];for(e=0,i=t.length;en)return function(t,e,i,n){var a,r=0,o=i[0];for(n=Math.ceil(n),a=0;aa)return l}return Math.max(a,1)}(a,e,n);if(r>0){var h,c,f=r>1?Math.round((s-o)/(r-1)):null;for(gr(e,l,u,Dt(f)?0:o-f,o),h=0,c=r-1;hs+l)))return u}function br(t){return t.drawTicks?t.tickLength:0}function xr(t,e){if(!t.display)return 0;var i=Li(t.font,e),n=Ri(t.padding);return(Ot(t.text)?t.text.length:1)*i.lineHeight+n.height}function _r(t,e,i){var n=kt(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=function(t){return"left"===t?"right":"right"===t?"left":t}(n)),n}var kr=function(e){t(a,cr);var i=Nn(a);function a(t){var e;return n(this,a),(e=i.call(this)).id=t.id,e.type=t.type,e.options=void 0,e.ctx=t.ctx,e.chart=t.chart,e.top=void 0,e.bottom=void 0,e.left=void 0,e.right=void 0,e.width=void 0,e.height=void 0,e._margins={left:0,right:0,top:0,bottom:0},e.maxWidth=void 0,e.maxHeight=void 0,e.paddingTop=void 0,e.paddingBottom=void 0,e.paddingLeft=void 0,e.paddingRight=void 0,e.axis=void 0,e.labelRotation=void 0,e.min=void 0,e.max=void 0,e._range=void 0,e.ticks=[],e._gridLineItems=null,e._labelItems=null,e._labelSizes=null,e._length=0,e._maxLength=0,e._longestTextCache={},e._startPixel=void 0,e._endPixel=void 0,e._reversePixels=!1,e._userMax=void 0,e._userMin=void 0,e._suggestedMax=void 0,e._suggestedMin=void 0,e._ticksLength=0,e._borderValue=0,e._cache={},e._dataLimitsCached=!1,e.$context=void 0,e}return s(a,[{key:"init",value:function(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}},{key:"parse",value:function(t,e){return t}},{key:"getUserBounds",value:function(){var t=this._userMin,e=this._userMax,i=this._suggestedMin,n=this._suggestedMax;return t=Tt(t,Number.POSITIVE_INFINITY),e=Tt(e,Number.NEGATIVE_INFINITY),i=Tt(i,Number.POSITIVE_INFINITY),n=Tt(n,Number.NEGATIVE_INFINITY),{min:Tt(t,i),max:Tt(e,n),minDefined:Ct(t),maxDefined:Ct(e)}}},{key:"getMinMax",value:function(t){var e,i=this.getUserBounds(),n=i.min,a=i.max,r=i.minDefined,o=i.maxDefined;if(r&&o)return{min:n,max:a};for(var s=this.getMatchingVisibleMetas(),l=0,u=s.length;la?a:n,Tt(a=r&&n>a?n:a,n)),max:Tt(a,Tt(n,a))}}},{key:"getPadding",value:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}},{key:"getTicks",value:function(){return this.ticks}},{key:"getLabels",value:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}},{key:"beforeLayout",value:function(){this._cache={},this._dataLimitsCached=!1}},{key:"beforeUpdate",value:function(){Et(this.options.beforeUpdate,[this])}},{key:"update",value:function(t,e,i){var n=this.options,a=n.beginAtZero,r=n.grace,o=n.ticks,s=o.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=function(t,e,i){var n=t.min,a=t.max,r=Lt(e,(a-n)/2),o=function(t,e){return i&&0===t?0:t+e};return{min:o(n,-Math.abs(r)),max:o(a,r)}}(this,r,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();var l=s=s||r<=1||!this.isHorizontal())this.labelRotation=o;else{var u=this._getLabelSizes(),h=u.widest.width,c=u.highest.height,f=me(this.chart.width-h,0,this.maxWidth);h+6>(t=n.offset?this.maxWidth/r:f/(r-1))&&(t=f/(r-(n.offset?.5:1)),e=this.maxHeight-br(n.grid)-a.padding-xr(n.title,this.chart.options.font),i=Math.sqrt(h*h+c*c),l=he(Math.min(Math.asin(me((u.highest.height+6)/t,-1,1)),Math.asin(me(e/i,-1,1))-Math.asin(me(c/i,-1,1)))),l=Math.max(o,Math.min(s,l))),this.labelRotation=l}}},{key:"afterCalculateLabelRotation",value:function(){Et(this.options.afterCalculateLabelRotation,[this])}},{key:"afterAutoSkip",value:function(){}},{key:"beforeFit",value:function(){Et(this.options.beforeFit,[this])}},{key:"fit",value:function(){var t={width:0,height:0},e=this.chart,i=this.options,n=i.ticks,a=i.title,r=i.grid,o=this._isVisible(),s=this.isHorizontal();if(o){var l=xr(a,e.options.font);if(s?(t.width=this.maxWidth,t.height=br(r)+l):(t.height=this.maxHeight,t.width=br(r)+l),n.display&&this.ticks.length){var u=this._getLabelSizes(),h=u.first,c=u.last,f=u.widest,d=u.highest,v=2*n.padding,g=ue(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(s){var y=n.mirror?0:m*f.width+p*d.height;t.height=Math.min(this.maxHeight,t.height+y+v)}else{var b=n.mirror?0:p*f.width+m*d.height;t.width=Math.min(this.maxWidth,t.width+b+v)}this._calculatePadding(h,c,m,p)}}this._handleMargins(),s?(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)}},{key:"_calculatePadding",value:function(t,e,i,n){var a=this.options,r=a.ticks,o=r.align,s=r.padding,l=a.position,u=0!==this.labelRotation,h="top"!==l&&"x"===this.axis;if(this.isHorizontal()){var c=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1),d=0,v=0;u?h?(d=n*t.width,v=i*e.height):(d=i*t.height,v=n*e.width):"start"===o?v=e.width:"end"===o?d=t.width:"inner"!==o&&(d=t.width/2,v=e.width/2),this.paddingLeft=Math.max((d-c+s)*this.width/(this.width-c),0),this.paddingRight=Math.max((v-f+s)*this.width/(this.width-f),0)}else{var g=e.height/2,p=t.height/2;"start"===o?(g=0,p=t.height):"end"===o&&(g=e.height,p=0),this.paddingTop=g+s,this.paddingBottom=p+s}}},{key:"_handleMargins",value:function(){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))}},{key:"afterFit",value:function(){Et(this.options.afterFit,[this])}},{key:"isHorizontal",value:function(){var t=this.options,e=t.axis,i=t.position;return"top"===i||"bottom"===i||"x"===e}},{key:"isFullSize",value:function(){return this.options.fullSize}},{key:"_convertTicksToLabels",value:function(t){var e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;ee){for(i=0;ie.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getPixelForDecimal",value:function(t){this._reversePixels&&(t=1-t);var e=this._startPixel+t*this._length;return me(this._alignToPixels?vi(this.chart,e,0):e,-32768,32767)}},{key:"getDecimalForPixel",value:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}},{key:"getBasePixel",value:function(){return this.getPixelForValue(this.getBaseValue())}},{key:"getBaseValue",value:function(){var t=this.min,e=this.max;return t<0&&e<0?e:t>0&&e>0?t:0}},{key:"getContext",value:function(t){var e=this.ticks||[];if(t>=0&&to*n?o/i:s/n:s*n0}},{key:"_computeGridLineItems",value:function(t){var e,i,n,a,r,o,s,l,u,h,c,f,d=this.axis,v=this.chart,g=this.options,p=g.grid,m=g.position,y=p.offset,b=this.isHorizontal(),x=this.ticks.length+(y?1:0),_=br(p),k=[],w=p.setContext(this.getContext()),M=w.drawBorder?w.borderWidth:0,S=M/2,P=function(t){return vi(v,t,M)};if("top"===m)e=P(this.bottom),o=this.bottom-_,l=e-S,h=P(t.top)+S,f=t.bottom;else if("bottom"===m)e=P(this.top),h=t.top,f=P(t.bottom)-S,o=e+S,l=this.top+_;else if("left"===m)e=P(this.right),r=this.right-_,s=e-S,u=P(t.left)+S,c=t.right;else if("right"===m)e=P(this.left),u=t.left,c=P(t.right)-S,r=e+S,s=this.left+_;else if("x"===d){if("center"===m)e=P((t.top+t.bottom)/2+.5);else if(At(m)){var D=Object.keys(m)[0],O=m[D];e=P(this.chart.scales[D].getPixelForValue(O))}h=t.top,f=t.bottom,l=(o=e+S)+_}else if("y"===d){if("center"===m)e=P((t.left+t.right)/2);else if(At(m)){var A=Object.keys(m)[0],C=m[A];e=P(this.chart.scales[A].getPixelForValue(C))}s=(r=e-S)-_,u=t.left,c=t.right}var T=Rt(g.ticks.maxTicksLimit,x),R=Math.max(1,Math.ceil(x/T));for(i=0;i=0?e.setContext(this.getContext(i)).lineWidth:0}},{key:"drawGrid",value:function(t){var e,i,n=this.options.grid,a=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o=function(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(n.display)for(e=0,i=r.length;e3&&void 0!==arguments[3]?arguments[3]:[""],a={$shared:!0},r=Vr(this._resolverCache,t,n),o=r.resolver,s=r.subPrefixes,l=o;if(Nr(o,e)){a.$shared=!1,i=Xt(i)?i():i;var u=this.createResolver(t,i,s);l=Hi(o,i,u)}var h,c=jn(e);try{for(c.s();!(h=c.n()).done;){var f=h.value;a[f]=l[f]}}catch(t){c.e(t)}finally{c.f()}return a}},{key:"createResolver",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],n=arguments.length>3?arguments[3]:void 0,a=Vr(this._resolverCache,t,i),r=a.resolver;return At(e)?Hi(r,e,void 0,n):r}}]),t}();function Vr(t,e,i){var n=t.get(e);n||(n=new Map,t.set(e,n));var a=i.join(),r=n.get(a);r||(r={resolver:Wi(e,i),subPrefixes:i.filter((function(t){return!t.toLowerCase().includes("hover")}))},n.set(a,r));return r}var Br=function(t){return At(t)&&Object.getOwnPropertyNames(t).reduce((function(e,i){return e||Xt(t[i])}),!1)};function Nr(t,e){var i,n=$i(t),a=n.isScriptable,r=n.isIndexable,o=jn(e);try{for(o.s();!(i=o.n()).done;){var s=i.value,l=a(s),u=r(s),h=(u||l)&&t[s];if(l&&(Xt(h)||Br(h))||u&&Ot(h))return!0}}catch(t){o.e(t)}finally{o.f()}return!1}var jr=["top","bottom","left","right","chartArea"];function Wr(t,e){return"top"===t||"bottom"===t||-1===jr.indexOf(t)&&"x"===e}function Hr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function $r(t){var e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Et(i&&i.onComplete,[t],e)}function Yr(t){var e=t.chart,i=e.options.animation;Et(i&&i.onProgress,[t],e)}function Ur(t){return cn()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var Xr={},qr=function(t){var e=Ur(t);return Object.values(Xr).filter((function(t){return t.canvas===e})).pop()};function Kr(t,e,i){for(var n=0,a=Object.keys(t);n=e){var s=t[r];delete t[r],(i>0||o>e)&&(t[o+i]=s)}}}var Gr=function(){function t(e,i){var a=this;n(this,t);var r=this.config=new Fr(i),o=Ur(e),s=qr(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas can be reused.");var l=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||function(t){return!cn()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ga:hr}(o)),this.platform.updateConfig(r);var u,h,c,f=this.platform.acquireContext(o,l.aspectRatio),d=f&&f.canvas,v=d&&d.height,g=d&&d.width;this.id=Pt(),this.ctx=f,this.canvas=d,this.width=g,this.height=v,this._options=l,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 Pr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(u=function(t){return a.update(t)},h=l.resizeDelay||0,function(){for(var t=arguments.length,e=new Array(t),i=0;ie){for(var n=e;ni.length&&delete this._stacks,e.forEach((function(e,n){0===i.filter((function(t){return t===e._dataset})).length&&t._destroyDatasetMeta(n)}))}},{key:"buildOrUpdateControllers",value:function(){var t,e,i=[],n=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=n.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}}},{key:"_drawDataset",value:function(t){var e=this.ctx,i=t._clip,n=!i.disabled,a=this.chartArea,r={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(n&&yi(e,{left:!1===i.left?0:a.left-i.left,right:!1===i.right?this.width:a.right+i.right,top:!1===i.top?0:a.top-i.top,bottom:!1===i.bottom?this.height:a.bottom+i.bottom}),t.controller.draw(),n&&bi(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}},{key:"isPointInArea",value:function(t){return mi(t,this.chartArea,this._minPadding)}},{key:"getElementsAtEventForMode",value:function(t,e,i,n){var a=Ra.modes[e];return"function"==typeof a?a(this,t,i,n):[]}},{key:"getDatasetMeta",value:function(t){var e=this.data.datasets[t],i=this._metasets,n=i.filter((function(t){return t&&t._dataset===e})).pop();return n||(n={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(n)),n}},{key:"getContext",value:function(){return this.$context||(this.$context=Ii(null,{chart:this,type:"chart"}))}},{key:"getVisibleDatasetCount",value:function(){return this.getSortedVisibleDatasetMetas().length}},{key:"isDatasetVisible",value:function(t){var e=this.data.datasets[t];if(!e)return!1;var i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}},{key:"setDatasetVisibility",value:function(t,e){this.getDatasetMeta(t).hidden=!e}},{key:"toggleDataVisibility",value:function(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}},{key:"getDataVisibility",value:function(t){return!this._hiddenIndices[t]}},{key:"_updateVisibility",value:function(t,e,i){var n=i?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,n);Ut(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(a,{visible:i}),this.update((function(e){return e.datasetIndex===t?n:void 0})))}},{key:"hide",value:function(t,e){this._updateVisibility(t,e,!1)}},{key:"show",value:function(t,e){this._updateVisibility(t,e,!0)}},{key:"_destroyDatasetMeta",value:function(t){var e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}},{key:"_stop",value:function(){var t,e;for(this.stop(),Hn.remove(this),t=0,e=this.data.datasets.length;ta?(u=a/l,t.arc(r,o,l,i+u,n-u,!0)):t.arc(r,o,a,i+te,n-te),t.closePath(),t.clip()}function Qr(t,e,i,n){var a=Ai(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),r=(i-e)/2,o=Math.min(r,n*e/2),s=function(t){var e=(i-Math.min(r,t))*n/2;return me(t,0,Math.min(r,e))};return{outerStart:s(a.outerStart),outerEnd:s(a.outerEnd),innerStart:me(a.innerStart,0,o),innerEnd:me(a.innerEnd,0,o)}}function to(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function eo(t,e,i,n,a){var r=e.x,o=e.y,s=e.startAngle,l=e.pixelMargin,u=e.innerRadius,h=Math.max(e.outerRadius+n+i-l,0),c=u>0?u+n+i+l:0,f=0,d=a-s;if(n){var v=((u>0?u-n:0)+(h>0?h-n:0))/2;f=(d-(0!==v?d*v/(v+n):d))/2}var g=(d-Math.max(.001,d*h-i/Kt)/h)/2,p=s+g+f,m=a-g-f,y=Qr(e,c,h,m-p),b=y.outerStart,x=y.outerEnd,_=y.innerStart,k=y.innerEnd,w=h-b,M=h-x,S=p+b/w,P=m-x/M,D=c+_,O=c+k,A=p+_/D,C=m-k/O;if(t.beginPath(),t.arc(r,o,h,S,P),x>0){var T=to(M,P,r,o);t.arc(T.x,T.y,x,P,m+te)}var R=to(O,m,r,o);if(t.lineTo(R.x,R.y),k>0){var L=to(O,C,r,o);t.arc(L.x,L.y,k,m+te,C+Math.PI)}if(t.arc(r,o,c,m-k/c,p+_/c,!0),_>0){var E=to(D,A,r,o);t.arc(E.x,E.y,_,A+Math.PI,p-te)}var I=to(w,p,r,o);if(t.lineTo(I.x,I.y),b>0){var z=to(w,S,r,o);t.arc(z.x,z.y,b,p-te,S)}t.closePath()}function io(t,e,i,n,a){var r=e.options,o=r.borderWidth,s=r.borderJoinStyle,l="inner"===r.borderAlign;o&&(l?(t.lineWidth=2*o,t.lineJoin=s||"round"):(t.lineWidth=o,t.lineJoin=s||"bevel"),e.fullCircles&&function(t,e,i){var n,a=e.x,r=e.y,o=e.startAngle,s=e.pixelMargin,l=e.fullCircles,u=Math.max(e.outerRadius-s,0),h=e.innerRadius+s;for(i&&Jr(t,e,o+Gt),t.beginPath(),t.arc(a,r,h,o+Gt,o,!0),n=0;n=Gt||pe(a,s,l),v=ye(r,u+f,h+f);return d&&v}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),i=e.x,n=e.y,a=e.startAngle,r=e.endAngle,o=e.innerRadius,s=e.outerRadius,l=this.options,u=l.offset,h=(a+r)/2,c=(o+s+l.spacing+u)/2;return{x:i+Math.cos(h)*c,y:n+Math.sin(h)*c}}},{key:"tooltipPosition",value:function(t){return this.getCenterPoint(t)}},{key:"draw",value:function(t){var e=this.options,i=this.circumference,n=(e.offset||0)/2,a=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Gt?Math.floor(i/Gt):0,!(0===i||this.innerRadius<0||this.outerRadius<0)){t.save();var r=0;if(n){r=n/2;var o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*r,Math.sin(o)*r),this.circumference>=Kt&&(r=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;var s=function(t,e,i,n){var a=e.fullCircles,r=e.startAngle,o=e.circumference,s=e.endAngle;if(a){eo(t,e,i,n,r+Gt);for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=Rt(i.borderCapStyle,e.borderCapStyle),t.setLineDash(Rt(i.borderDash,e.borderDash)),t.lineDashOffset=Rt(i.borderDashOffset,e.borderDashOffset),t.lineJoin=Rt(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Rt(i.borderWidth,e.borderWidth),t.strokeStyle=Rt(i.borderColor,e.borderColor)}function ro(t,e,i){t.lineTo(i.x,i.y)}function oo(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.length,a=i.start,r=void 0===a?0:a,o=i.end,s=void 0===o?n-1:o,l=e.start,u=e.end,h=Math.max(r,l),c=Math.min(s,u),f=ru&&s>u;return{count:n,start:h,loop:e.loop,ilen:cl&&(l=M),b=(x*b+w)/++x):(k(),t.lineTo(w,M),o=S,x=0,s=l=M),u=M}k()}function uo(t){var e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?lo:so}no.id="arc",no.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},no.defaultRoutes={backgroundColor:"backgroundColor"};var ho="function"==typeof Path2D;function co(t,e,i,n){ho&&!e.options.segment?function(t,e,i,n){var a=e._path;a||(a=e._path=new Path2D,e.path(a,i,n)&&a.closePath()),ao(t,e.options),t.stroke(a)}(t,e,i,n):function(t,e,i,n){var a,r=e.segments,o=e.options,s=uo(e),l=jn(r);try{for(l.s();!(a=l.n()).done;){var u=a.value;ao(t,o,u.style),t.beginPath(),s(t,e,u,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}}catch(t){l.e(t)}finally{l.f()}}(t,e,i,n)}var fo=function(e){t(a,cr);var i=Nn(a);function a(t){var e;return n(this,a),(e=i.call(this)).animated=!0,e.options=void 0,e._chart=void 0,e._loop=void 0,e._fullLoop=void 0,e._path=void 0,e._points=void 0,e._segments=void 0,e._decimated=!1,e._pointsUpdated=!1,e._datasetIndex=void 0,t&&Object.assign(o(e),t),e}return s(a,[{key:"updateControlPoints",value:function(t,e){var i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){var n=i.spanGaps?this._loop:this._fullLoop;hn(this._points,i,t,n,e),this._pointsUpdated=!0}}},{key:"points",get:function(){return this._points},set:function(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}},{key:"segments",get:function(){return this._segments||(this._segments=function(t,e){var i=t.points,n=t.options.spanGaps,a=i.length;if(!a)return[];var r=!!t._loop,o=function(t,e,i,n){var a=0,r=e-1;if(i&&!n)for(;aa&&t[r%e].skip;)r--;return{start:a,end:r%=e}}(i,a,r,n),s=o.start,l=o.end;return In(t,!0===n?[{start:s,end:l,loop:r}]:function(t,e,i,n){var a,r=t.length,o=[],s=e,l=t[e];for(a=e+1;a<=i;++a){var u=t[a%r];u.skip||u.stop?l.skip||(n=!1,o.push({start:e%r,end:(a-1)%r,loop:n}),e=s=u.stop?a:null):(s=a,l.skip&&(e=a)),l=u}return null!==s&&o.push({start:e%r,end:s%r,loop:n}),o}(i,s,l2&&void 0!==arguments[2]?arguments[2]:{},n=t.x!==i.x?-e:0,a=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-n,o=(t.y+t.h!==i.y+i.h?e:0)-a;return{x:t.x+n,y:t.y+a,w:t.w+r,h:t.h+o,radius:t.radius}}go.id="point",go.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},go.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var ko=function(e){t(a,cr);var i=Nn(a);function a(t){var e;return n(this,a),(e=i.call(this)).options=void 0,e.horizontal=void 0,e.base=void 0,e.width=void 0,e.height=void 0,e.inflateAmount=void 0,t&&Object.assign(o(e),t),e}return s(a,[{key:"draw",value:function(t){var e,i=this.inflateAmount,n=this.options,a=n.borderColor,r=n.backgroundColor,o=yo(this),s=o.inner,l=o.outer,u=(e=l.radius).topLeft||e.topRight||e.bottomLeft||e.bottomRight?Si:xo;t.save(),l.w===s.w&&l.h===s.h||(t.beginPath(),u(t,_o(l,i,s)),t.clip(),u(t,_o(s,-i,l)),t.fillStyle=a,t.fill("evenodd")),t.beginPath(),u(t,_o(s,i)),t.fillStyle=r,t.fill(),t.restore()}},{key:"inRange",value:function(t,e,i){return bo(this,t,e,i)}},{key:"inXRange",value:function(t,e){return bo(this,t,null,e)}},{key:"inYRange",value:function(t,e){return bo(this,null,t,e)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","base","horizontal"],t),i=e.x,n=e.y,a=e.base,r=e.horizontal;return{x:r?(i+a)/2:i,y:r?n:(n+a)/2}}},{key:"getRange",value:function(t){return"x"===t?this.width/2:this.height/2}}]),a}();ko.id="bar",ko.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},ko.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var wo=Object.freeze({__proto__:null,ArcElement:no,LineElement:fo,PointElement:go,BarElement:ko});function Mo(t){if(t._decimated){var e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function So(t){t.data.datasets.forEach((function(t){Mo(t)}))}var Po={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:function(t,e,i){if(i.enabled){var n=t.width;t.data.datasets.forEach((function(e,a){var r=e._data,o=e.indexAxis,s=t.getDatasetMeta(a),l=r||e.data;if("y"!==Ei([o,t.options.indexAxis])&&s.controller.supportsDecimation){var u=t.scales[s.xAxisID];if(("linear"===u.type||"time"===u.type)&&!t.options.parsing){var h=function(t,e){var i=e.length,n=0,a=t.iScale,r=a.getUserBounds(),o=r.min,s=r.max,l=r.minDefined,u=r.maxDefined;return l&&(n=me(Fi(e,a.axis,o).lo,0,i-1)),{start:n,count:u?me(Fi(e,a.axis,s).hi+1,n,i)-n:i-n}}(s,l),c=h.start,f=h.count;if(f<=(i.threshold||4*n))Mo(e);else{var d;switch(Dt(r)&&(e._data=l,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":d=function(t,e,i,n,a){var r=a.samples||n;if(r>=i)return t.slice(e,e+i);var o,s,l,u,h,c=[],f=(i-2)/(r-2),d=0,v=e+i-1,g=e;for(c[d++]=t[g],o=0;ol&&(l=u,s=t[y],h=y);c[d++]=s,g=h}return c[d++]=t[v],c}(l,c,f,n,i);break;case"min-max":d=function(t,e,i,n){var a,r,o,s,l,u,h,c,f,d,v=0,g=0,p=[],m=e+i-1,y=t[e].x,b=t[m].x-y;for(a=e;ad&&(d=s,h=a),v=(g*v+r.x)/++g;else{var _=a-1;if(!Dt(u)&&!Dt(h)){var k=Math.min(u,h),w=Math.max(u,h);k!==c&&k!==_&&p.push(Bn(Bn({},t[k]),{},{x:v})),w!==c&&w!==_&&p.push(Bn(Bn({},t[w]),{},{x:v}))}a>0&&_!==c&&p.push(t[_]),p.push(r),l=x,g=0,f=d=s,u=h=c=a}}return p}(l,c,f,n);break;default:throw new Error("Unsupported decimation algorithm '".concat(i.algorithm,"'"))}e._decimated=d}}}}))}else So(t)},destroy:function(t){So(t)}};function Do(t,e,i,n){if(!n){var a=e[t],r=i[t];return"angle"===t&&(a=ge(a),r=ge(r)),{property:t,start:a,end:r}}}function Oo(t,e,i){for(;e>t;e--){var n=i[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function Ao(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Co(t,e){var i=[],n=!1;return Ot(t)?(n=!0,i=t):i=function(t,e){var i=t||{},n=i.x,a=void 0===n?null:n,r=i.y,o=void 0===r?null:r,s=e.points,l=[];return e.segments.forEach((function(t){var e=t.start,i=t.end;i=Oo(e,i,s);var n=s[e],r=s[i];null!==o?(l.push({x:n.x,y:o}),l.push({x:r.x,y:o})):null!==a&&(l.push({x:a,y:n.y}),l.push({x:a,y:r.y}))})),l}(t,e),i.length?new fo({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function To(t,e,i){var n,a=t[e].fill,r=[e];if(!i)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!Ct(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;r.push(a),a=n.fill}return!1}function Ro(t,e,i){var n=function(t){var e=t.options,i=e.fill,n=Rt(i&&i.target,i);void 0===n&&(n=!!e.backgroundColor);if(!1===n||null===n)return!1;if(!0===n)return"origin";return n}(t);if(At(n))return!isNaN(n.value)&&n;var a=parseFloat(n);return Ct(a)&&Math.floor(a)===a?function(t,e,i,n){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=n)return!1;return i}(n[0],e,a,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Lo(t,e,i){for(var n=[],a=0;a=0;--o){var s=a[o].$filler;s&&(s.line.updateControlPoints(r,s.axis),n&&Fo(t.ctx,s,r))}},beforeDatasetsDraw:function(t,e,i){if("beforeDatasetsDraw"===i.drawTime)for(var n=t.getSortedVisibleDatasetMetas(),a=n.length-1;a>=0;--a){var r=n[a].$filler;r&&Fo(t.ctx,r,t.chartArea)}},beforeDatasetDraw:function(t,e,i){var n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&Fo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Ho=function(t,e){var i=t.boxHeight,n=void 0===i?e:i,a=t.boxWidth,r=void 0===a?e:a;return t.usePointStyle&&(n=Math.min(n,e),r=Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},$o=function(e){t(a,cr);var i=Nn(a);function a(t){var e;return n(this,a),(e=i.call(this))._added=!1,e.legendHitBoxes=[],e._hoveredItem=null,e.doughnutMode=!1,e.chart=t.chart,e.options=t.options,e.ctx=t.ctx,e.legendItems=void 0,e.columnSizes=void 0,e.lineWidths=void 0,e.maxHeight=void 0,e.maxWidth=void 0,e.top=void 0,e.bottom=void 0,e.left=void 0,e.right=void 0,e.height=void 0,e.width=void 0,e._margins=void 0,e.position=void 0,e.weight=void 0,e.fullSize=void 0,e}return s(a,[{key:"update",value:function(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}},{key:"setDimensions",value:function(){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)}},{key:"buildLabels",value:function(){var t=this,e=this.options.labels||{},i=Et(e.generateLabels,[this.chart],this)||[];e.filter&&(i=i.filter((function(i){return e.filter(i,t.chart.data)}))),e.sort&&(i=i.sort((function(i,n){return e.sort(i,n,t.chart.data)}))),this.options.reverse&&i.reverse(),this.legendItems=i}},{key:"fit",value:function(){var t=this.options,e=this.ctx;if(t.display){var i,n,a=t.labels,r=Li(a.font),o=r.size,s=this._computeTitleHeight(),l=Ho(a,o),u=l.boxWidth,h=l.itemHeight;e.font=r.string,this.isHorizontal()?(i=this.maxWidth,n=this._fitRows(s,o,u,h)+10):(n=this.maxHeight,i=this._fitCols(s,o,u,h)+10),this.width=Math.min(i,t.maxWidth||this.maxWidth),this.height=Math.min(n,t.maxHeight||this.maxHeight)}else this.width=this.height=0}},{key:"_fitRows",value:function(t,e,i,n){var a=this.ctx,r=this.maxWidth,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.lineWidths=[0],u=n+o,h=t;a.textAlign="left",a.textBaseline="middle";var c=-1,f=-u;return this.legendItems.forEach((function(t,d){var v=i+e/2+a.measureText(t.text).width;(0===d||l[l.length-1]+v+2*o>r)&&(h+=u,l[l.length-(d>0?0:1)]=0,f+=u,c++),s[d]={left:0,top:f,row:c,width:v,height:n},l[l.length-1]+=v+o})),h}},{key:"_fitCols",value:function(t,e,i,n){var a=this.ctx,r=this.maxHeight,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.columnSizes=[],u=r-t,h=o,c=0,f=0,d=0,v=0;return this.legendItems.forEach((function(t,r){var g=i+e/2+a.measureText(t.text).width;r>0&&f+n+2*o>u&&(h+=c+o,l.push({width:c,height:f}),d+=c+o,v++,c=f=0),s[r]={left:d,top:f,col:v,width:g,height:n},c=Math.max(c,g),f+=n+o})),h+=c,l.push({width:c,height:f}),h}},{key:"adjustHitBoxes",value:function(){if(this.options.display){var t=this._computeTitleHeight(),e=this.legendHitBoxes,i=this.options,n=i.align,a=i.labels.padding,r=On(i.rtl,this.left,this.width);if(this.isHorizontal()){var o,s=0,l=wt(n,this.left+a,this.right-this.lineWidths[s]),u=jn(e);try{for(u.s();!(o=u.n()).done;){var h=o.value;s!==h.row&&(s=h.row,l=wt(n,this.left+a,this.right-this.lineWidths[s])),h.top+=this.top+t+a,h.left=r.leftForLtr(r.x(l),h.width),l+=h.width+a}}catch(t){u.e(t)}finally{u.f()}}else{var c,f=0,d=wt(n,this.top+t+a,this.bottom-this.columnSizes[f].height),v=jn(e);try{for(v.s();!(c=v.n()).done;){var g=c.value;g.col!==f&&(f=g.col,d=wt(n,this.top+t+a,this.bottom-this.columnSizes[f].height)),g.top=d,g.left+=this.left+a,g.left=r.leftForLtr(r.x(g.left),g.width),d+=g.height+a}}catch(t){v.e(t)}finally{v.f()}}}}},{key:"isHorizontal",value:function(){return"top"===this.options.position||"bottom"===this.options.position}},{key:"draw",value:function(){if(this.options.display){var t=this.ctx;yi(t,this),this._draw(),bi(t)}}},{key:"_draw",value:function(){var t,e=this,i=this.options,n=this.columnSizes,a=this.lineWidths,r=this.ctx,o=i.align,s=i.labels,l=ci.color,u=On(i.rtl,this.left,this.width),h=Li(s.font),c=s.color,f=s.padding,d=h.size,v=d/2;this.drawTitle(),r.textAlign=u.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=h.string;var g=Ho(s,d),p=g.boxWidth,m=g.boxHeight,y=g.itemHeight,b=this.isHorizontal(),x=this._computeTitleHeight();t=b?{x:wt(o,this.left+f,this.right-a[0]),y:this.top+f+x,line:0}:{x:this.left+f,y:wt(o,this.top+x+f,this.bottom-n[0].height),line:0},An(this.ctx,i.textDirection);var _=y+f;this.legendItems.forEach((function(g,k){r.strokeStyle=g.fontColor||c,r.fillStyle=g.fontColor||c;var w=r.measureText(g.text).width,M=u.textAlign(g.textAlign||(g.textAlign=s.textAlign)),S=p+v+w,P=t.x,D=t.y;u.setWidth(e.width),b?k>0&&P+S+f>e.right&&(D=t.y+=_,t.line++,P=t.x=wt(o,e.left+f,e.right-a[t.line])):k>0&&D+_>e.bottom&&(P=t.x=P+n[t.line].width+f,t.line++,D=t.y=wt(o,e.top+x+f,e.bottom-n[t.line].height)),function(t,e,i){if(!(isNaN(p)||p<=0||isNaN(m)||m<0)){r.save();var n=Rt(i.lineWidth,1);if(r.fillStyle=Rt(i.fillStyle,l),r.lineCap=Rt(i.lineCap,"butt"),r.lineDashOffset=Rt(i.lineDashOffset,0),r.lineJoin=Rt(i.lineJoin,"miter"),r.lineWidth=n,r.strokeStyle=Rt(i.strokeStyle,l),r.setLineDash(Rt(i.lineDash,[])),s.usePointStyle){var a={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},o=u.xPlus(t,p/2);pi(r,a,o,e+v)}else{var h=e+Math.max((d-m)/2,0),c=u.leftForLtr(t,p),f=Ti(i.borderRadius);r.beginPath(),Object.values(f).some((function(t){return 0!==t}))?Si(r,{x:c,y:h,w:p,h:m,radius:f}):r.rect(c,h,p,m),r.fill(),0!==n&&r.stroke()}r.restore()}}(u.x(P),D,g),P=function(t,e,i,n){return t===(n?"left":"right")?i:"center"===t?(e+i)/2:e}(M,P+p+v,b?P+S:e.right,i.rtl),function(t,e,i){ki(r,i.text,t,e+y/2,h,{strikethrough:i.hidden,textAlign:u.textAlign(i.textAlign)})}(u.x(P),D,g),b?t.x+=S+f:t.y+=_})),Cn(this.ctx,i.textDirection)}},{key:"drawTitle",value:function(){var t=this.options,e=t.title,i=Li(e.font),n=Ri(e.padding);if(e.display){var a,r=On(t.rtl,this.left,this.width),o=this.ctx,s=e.position,l=i.size/2,u=n.top+l,h=this.left,c=this.width;if(this.isHorizontal())c=Math.max.apply(Math,F(this.lineWidths)),a=this.top+u,h=wt(t.align,h,this.right-c);else{var f=this.columnSizes.reduce((function(t,e){return Math.max(t,e.height)}),0);a=u+wt(t.align,this.top,this.bottom-f-t.labels.padding-this._computeTitleHeight())}var d=wt(s,h,h+c);o.textAlign=r.textAlign(kt(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ki(o,e.text,d,a,i)}}},{key:"_computeTitleHeight",value:function(){var t=this.options.title,e=Li(t.font),i=Ri(t.padding);return t.display?e.lineHeight+i.height:0}},{key:"_getLegendItemAt",value:function(t,e){var i,n,a;if(ye(t,this.left,this.right)&&ye(e,this.top,this.bottom))for(a=this.legendHitBoxes,i=0;i-1?t.split("\n"):t}function Qo(t,e){var i=e.element,n=e.datasetIndex,a=e.index,r=t.getDatasetMeta(n).controller,o=r.getLabelAndValue(a),s=o.label,l=o.value;return{chart:t,label:s,parsed:r.getParsed(a),raw:t.data.datasets[n].data[a],formattedValue:l,dataset:r.getDataset(),dataIndex:a,datasetIndex:n,element:i}}function ts(t,e){var i=t.chart.ctx,n=t.body,a=t.footer,r=t.title,o=e.boxWidth,s=e.boxHeight,l=Li(e.bodyFont),u=Li(e.titleFont),h=Li(e.footerFont),c=r.length,f=a.length,d=n.length,v=Ri(e.padding),g=v.height,p=0,m=n.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);(m+=t.beforeBody.length+t.afterBody.length,c&&(g+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),m)&&(g+=d*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(m-d)*l.lineHeight+(m-1)*e.bodySpacing);f&&(g+=e.footerMarginTop+f*h.lineHeight+(f-1)*e.footerSpacing);var y=0,b=function(t){p=Math.max(p,i.measureText(t).width+y)};return i.save(),i.font=u.string,It(t.title,b),i.font=l.string,It(t.beforeBody.concat(t.afterBody),b),y=e.displayColors?o+2+e.boxPadding:0,It(n,(function(t){It(t.before,b),It(t.lines,b),It(t.after,b)})),y=0,i.font=h.string,It(t.footer,b),i.restore(),{width:p+=v.width,height:g}}function es(t,e,i,n){var a=i.x,r=i.width,o=t.width,s=t.chartArea,l=s.left,u=s.right,h="center";return"center"===n?h=a<=(l+u)/2?"left":"right":a<=r/2?h="left":a>=o-r/2&&(h="right"),function(t,e,i,n){var a=n.x,r=n.width,o=i.caretSize+i.caretPadding;return"left"===t&&a+r+o>e.width||"right"===t&&a-r-o<0||void 0}(h,t,e,i)&&(h="center"),h}function is(t,e,i){var n=i.yAlign||e.yAlign||function(t,e){var i=e.y,n=e.height;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||es(t,e,i,n),yAlign:n}}function ns(t,e,i,n){var a=t.caretSize,r=t.caretPadding,o=t.cornerRadius,s=i.xAlign,l=i.yAlign,u=a+r,h=Ti(o),c=h.topLeft,f=h.topRight,d=h.bottomLeft,v=h.bottomRight,g=function(t,e){var i=t.x,n=t.width;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,s),p=function(t,e,i){var n=t.y,a=t.height;return"top"===e?n+=i:n-="bottom"===e?a+i:a/2,n}(e,l,u);return"center"===l?"left"===s?g+=u:"right"===s&&(g-=u):"left"===s?g-=Math.max(c,d)+a:"right"===s&&(g+=Math.max(f,v)+a),{x:me(g,0,n.width-e.width),y:me(p,0,n.height-e.height)}}function as(t,e,i){var n=Ri(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function rs(t){return Zo([],Jo(t))}function os(t,e){var i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}var ss=function(e){t(a,cr);var i=Nn(a);function a(t){var e;return n(this,a),(e=i.call(this)).opacity=0,e._active=[],e._eventPosition=void 0,e._size=void 0,e._cachedAnimations=void 0,e._tooltipItems=[],e.$animations=void 0,e.$context=void 0,e.chart=t.chart||t._chart,e._chart=e.chart,e.options=t.options,e.dataPoints=void 0,e.title=void 0,e.beforeBody=void 0,e.body=void 0,e.afterBody=void 0,e.footer=void 0,e.xAlign=void 0,e.yAlign=void 0,e.x=void 0,e.y=void 0,e.height=void 0,e.width=void 0,e.caretX=void 0,e.caretY=void 0,e.labelColors=void 0,e.labelPointStyles=void 0,e.labelTextColors=void 0,e}return s(a,[{key:"initialize",value:function(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}},{key:"_resolveAnimations",value:function(){var t=this._cachedAnimations;if(t)return t;var e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,a=new Xn(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}},{key:"getContext",value:function(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,Ii(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}},{key:"getTitle",value:function(t,e){var i=e.callbacks,n=i.beforeTitle.apply(this,[t]),a=i.title.apply(this,[t]),r=i.afterTitle.apply(this,[t]),o=[];return o=Zo(o,Jo(n)),o=Zo(o,Jo(a)),o=Zo(o,Jo(r))}},{key:"getBeforeBody",value:function(t,e){return rs(e.callbacks.beforeBody.apply(this,[t]))}},{key:"getBody",value:function(t,e){var i=this,n=e.callbacks,a=[];return It(t,(function(t){var e={before:[],lines:[],after:[]},r=os(n,t);Zo(e.before,Jo(r.beforeLabel.call(i,t))),Zo(e.lines,r.label.call(i,t)),Zo(e.after,Jo(r.afterLabel.call(i,t))),a.push(e)})),a}},{key:"getAfterBody",value:function(t,e){return rs(e.callbacks.afterBody.apply(this,[t]))}},{key:"getFooter",value:function(t,e){var i=e.callbacks,n=i.beforeFooter.apply(this,[t]),a=i.footer.apply(this,[t]),r=i.afterFooter.apply(this,[t]),o=[];return o=Zo(o,Jo(n)),o=Zo(o,Jo(a)),o=Zo(o,Jo(r))}},{key:"_createItems",value:function(t){var e,i,n=this,a=this._active,r=this.chart.data,o=[],s=[],l=[],u=[];for(e=0,i=a.length;e0&&e.stroke()}},{key:"_updateAnimationTarget",value:function(t){var e=this.chart,i=this.$animations,n=i&&i.x,a=i&&i.y;if(n||a){var r=Go[t.position].call(this,this._active,this._eventPosition);if(!r)return;var o=this._size=ts(this,t),s=Object.assign({},r,this._size),l=is(e,t,s),u=ns(t,s,l,e);n._to===u.x&&a._to===u.y||(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=o.width,this.height=o.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}},{key:"_willRender",value:function(){return!!this.opacity}},{key:"draw",value:function(t){var e=this.options.setContext(this.getContext()),i=this.opacity;if(i){this._updateAnimationTarget(e);var n={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;var r=Ri(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(a,t,n,e),An(t,e.textDirection),a.y+=r.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),Cn(t,e.textDirection),t.restore())}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(t,e){var i=this,n=this._active,a=t.map((function(t){var e=t.datasetIndex,n=t.index,a=i.chart.getDatasetMeta(e);if(!a)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:a.data[n],index:n}})),r=!zt(n,a),o=this._positionChanged(a,e);(r||o)&&(this._active=a,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}},{key:"handleEvent",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;var n=this.options,a=this._active||[],r=this._getActiveElements(t,a,e,i),o=this._positionChanged(r,t),s=e||!zt(r,a)||o;return s&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}},{key:"_getActiveElements",value:function(t,e,i,n){var a=this.options;if("mouseout"===t.type)return[];if(!n)return e;var r=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&r.reverse(),r}},{key:"_positionChanged",value:function(t,e){var i=this.caretX,n=this.caretY,a=this.options,r=Go[a.position].call(this,t,e);return!1!==r&&(i!==r.x||n!==r.y)}}]),a}();ss.positioners=Go;var ls={id:"tooltip",_element:ss,positioners:Go,afterInit:function(t,e,i){i&&(t.tooltip=new ss({chart:t,options:i}))},beforeUpdate:function(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset:function(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw:function(t){var e=t.tooltip;if(e&&e._willRender()){var i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent:function(t,e){if(t.tooltip){var 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:function(t,e){return e.bodyFont.size},boxWidth:function(t,e){return e.bodyFont.size},multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Mt,title:function(t){if(t.length>0){var e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex=0&&te.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getValueForPixel",value:function(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}},{key:"getBasePixel",value:function(){return this.bottom}}]),r}();function fs(t,e){var i,n,a,r,o,s,l,u=[],h=t.bounds,c=t.step,f=t.min,d=t.max,v=t.precision,g=t.count,p=t.maxTicks,m=t.maxDigits,y=t.includeBounds,b=c||1,x=p-1,_=e.min,k=e.max,w=!Dt(f),M=!Dt(d),S=!Dt(g),P=(k-_)/(m+1),D=re((k-_)/x/b)*b;if(D<1e-14&&!w&&!M)return[{value:_},{value:k}];(r=Math.ceil(k/D)-Math.floor(_/D))>x&&(D=re(r*D/x/b)*b),Dt(v)||(i=Math.pow(10,v),D=Math.ceil(D*i)/i),"ticks"===h?(n=Math.floor(_/D)*D,a=Math.ceil(k/D)*D):(n=_,a=k),w&&M&&c&&(o=(d-f)/c,s=D/1e3,(l=Math.round(o))-s<=o&&l+s>=o)?(D=(d-f)/(r=Math.round(Math.min((d-f)/D,p))),n=f,a=d):S?D=((a=M?d:a)-(n=w?f:n))/(r=g-1):r=se(r=(a-n)/D,Math.round(r),D/1e3)?Math.round(r):Math.ceil(r);var O=Math.max(ce(D),ce(n));i=Math.pow(10,Dt(v)?O:v),n=Math.round(n*i)/i,a=Math.round(a*i)/i;var A=0;for(w&&(y&&n!==f?(u.push({value:f}),n0&&u>0&&o(0)}if(a===r){var h=1;(r>=Number.MAX_SAFE_INTEGER||a<=Number.MIN_SAFE_INTEGER)&&(h=Math.abs(.05*r)),s(r+h),t||o(a-h)}this.min=a,this.max=r}},{key:"getTickLimit",value:function(){var t,e=this.options.ticks,i=e.maxTicksLimit,n=e.stepSize;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1)>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(n," would result generating up to ").concat(t," ticks. Limiting to 1000.")),t=1e3):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}},{key:"computeTickLimit",value:function(){return Number.POSITIVE_INFINITY}},{key:"buildTicks",value:function(){var t=this.options,e=t.ticks,i=this.getTickLimit(),n=fs({maxTicks:i=Math.max(2,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},this._range||this);return"ticks"===t.bounds&&le(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}},{key:"configure",value:function(){var t=this.ticks,i=this.min,n=this.max;if(B(e(r.prototype),"configure",this).call(this),this.options.offset&&t.length){var a=(n-i)/Math.max(t.length-1,1)/2;i-=a,n+=a}this._startValue=i,this._endValue=n,this._valueRange=n-i}},{key:"getLabelForValue",value:function(t){return Dn(t,this.chart.options.locale,this.options.ticks.format)}}]),r}(),gs=function(e){t(a,vs);var i=Nn(a);function a(){return n(this,a),i.apply(this,arguments)}return s(a,[{key:"determineDataLimits",value:function(){var t=this.getMinMax(!0),e=t.min,i=t.max;this.min=Ct(e)?e:0,this.max=Ct(i)?i:1,this.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){var t=this.isHorizontal(),e=t?this.width:this.height,i=ue(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/n))}},{key:"getPixelForValue",value:function(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}]),a}();function ps(t){return 1===t/Math.pow(10,Math.floor(ne(t)))}gs.id="linear",gs.defaults={ticks:{callback:dr.formatters.numeric}};var ms=function(i){t(r,kr);var a=Nn(r);function r(t){var e;return n(this,r),(e=a.call(this,t)).start=void 0,e.end=void 0,e._startValue=void 0,e._valueRange=0,e}return s(r,[{key:"parse",value:function(t,e){var i=vs.prototype.parse.apply(this,[t,e]);if(0!==i)return Ct(i)&&i>0?i:null;this._zero=!0}},{key:"determineDataLimits",value:function(){var t=this.getMinMax(!0),e=t.min,i=t.max;this.min=Ct(e)?Math.max(0,e):null,this.max=Ct(i)?Math.max(0,i):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}},{key:"handleTickRangeOptions",value:function(){var t=this.getUserBounds(),e=t.minDefined,i=t.maxDefined,n=this.min,a=this.max,r=function(t){return n=e?n:t},o=function(t){return a=i?a:t},s=function(t,e){return Math.pow(10,Math.floor(ne(t))+e)};n===a&&(n<=0?(r(1),o(10)):(r(s(n,-1)),o(s(a,1)))),n<=0&&r(s(a,-1)),a<=0&&o(s(n,1)),this._zero&&this.min!==this._suggestedMin&&n===s(this.min,0)&&r(s(n,-1)),this.min=n,this.max=a}},{key:"buildTicks",value:function(){var t=this.options,e=function(t,e){var i=Math.floor(ne(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),a=[],r=Tt(t.min,Math.pow(10,Math.floor(ne(e.min)))),o=Math.floor(ne(r)),s=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{a.push({value:r,major:ps(r)}),10==++s&&(s=1,l=++o>=0?1:l),r=Math.round(s*Math.pow(10,o)*l)/l}while(oa?{start:e-i,end:e}:{start:e,end:e+i}}function xs(t){for(var e,i,n,a={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},r=Object.assign({},a),o=[],s=[],l=t._pointLabels.length,u=t.options.pointLabels,h=u.centerPointLabels?Kt/l:0,c=0;ce.r&&(s=(n.end-e.r)/r,t.r=Math.max(t.r,e.r+s)),a.starte.b&&(l=(a.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function ks(t){return 0===t||180===t?"center":t<180?"left":"right"}function ws(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ms(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Ss(t,e,i,n){var a=t.ctx;if(i)a.arc(t.xCenter,t.yCenter,e,0,Gt);else{var r=t.getPointPosition(0,e);a.moveTo(r.x,r.y);for(var o=1;o=0&&t2&&void 0!==arguments[2]?arguments[2]:0,n=this.getIndexAngle(t)-te+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}},{key:"getPointPositionForValue",value:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}},{key:"getBasePosition",value:function(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}},{key:"getPointLabelPosition",value:function(t){var e=this._pointLabelItems[t];return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}},{key:"drawBackground",value:function(){var t=this.options,e=t.backgroundColor,i=t.grid.circular;if(e){var n=this.ctx;n.save(),n.beginPath(),Ss(this,this.getDistanceFromCenterForValue(this._endValue),i,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}},{key:"drawGrid",value:function(){var t,e,i,n=this,a=this.ctx,r=this.options,o=r.angleLines,s=r.grid,l=this._pointLabels.length;if(r.pointLabels.display&&function(t,e){for(var i=t.ctx,n=t.options.pointLabels,a=e-1;a>=0;a--){var r=n.setContext(t.getPointLabelContext(a)),o=Li(r.font),s=t._pointLabelItems[a],l=s.x,u=s.y,h=s.textAlign,c=s.left,f=s.top,d=s.right,v=s.bottom,g=r.backdropColor;if(!Dt(g)){var p=Ti(r.borderRadius),m=Ri(r.backdropPadding);i.fillStyle=g;var y=c-m.left,b=f-m.top,x=d-c+m.width,_=v-f+m.height;Object.values(p).some((function(t){return 0!==t}))?(i.beginPath(),Si(i,{x:y,y:b,w:x,h:_,radius:p}),i.fill()):i.fillRect(y,b,x,_)}ki(i,t._pointLabels[a],l,u+o.lineHeight/2,o,{color:r.color,textAlign:h,textBaseline:"middle"})}}(this,l),s.display&&this.ticks.forEach((function(t,i){if(0!==i){e=n.getDistanceFromCenterForValue(t.value);var a=s.setContext(n.getContext(i-1));!function(t,e,i,n){var a=t.ctx,r=e.circular,o=e.color,s=e.lineWidth;!r&&!n||!o||!s||i<0||(a.save(),a.strokeStyle=o,a.lineWidth=s,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),Ss(t,i,r,n),a.closePath(),a.stroke(),a.restore())}(n,a,e,l)}})),o.display){for(a.save(),t=l-1;t>=0;t--){var u=o.setContext(this.getPointLabelContext(t)),h=u.color,c=u.lineWidth;c&&h&&(a.lineWidth=c,a.strokeStyle=h,a.setLineDash(u.borderDash),a.lineDashOffset=u.borderDashOffset,e=this.getDistanceFromCenterForValue(r.ticks.reverse?this.min:this.max),i=this.getPointPosition(t,e),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(i.x,i.y),a.stroke())}a.restore()}}},{key:"drawBorder",value:function(){}},{key:"drawLabels",value:function(){var t=this,e=this.ctx,i=this.options,n=i.ticks;if(n.display){var a,r,o=this.getIndexAngle(0);e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((function(o,s){if(0!==s||i.reverse){var l=n.setContext(t.getContext(s)),u=Li(l.font);if(a=t.getDistanceFromCenterForValue(t.ticks[s].value),l.showLabelBackdrop){e.font=u.string,r=e.measureText(o.label).width,e.fillStyle=l.backdropColor;var h=Ri(l.backdropPadding);e.fillRect(-r/2-h.left,-a-u.size/2-h.top,r+h.width,u.size+h.height)}ki(e,o.label,0,-a,u,{color:l.color})}})),e.restore()}}},{key:"drawTitle",value:function(){}}]),a}();Ps.id="radialLinear",Ps.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:dr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:function(t){return t},padding:5,centerPointLabels:!1}},Ps.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Ps.descriptors={angleLines:{_fallback:"grid"}};var Ds={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}},Os=Object.keys(Ds);function As(t,e){return t-e}function Cs(t,e){if(Dt(e))return null;var i=t._adapter,n=t._parseOpts,a=n.parser,r=n.round,o=n.isoWeekday,s=e;return"function"==typeof a&&(s=a(s)),Ct(s)||(s="string"==typeof a?i.parse(s,a):i.parse(s)),null===s?null:(r&&(s="week"!==r||!oe(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function Ts(t,e,i,n){for(var a=Os.length,r=Os.indexOf(t);r=e?i[a]:i[r]]=!0}}else t[e]=!0}function Ls(t,e,i){var n,a,r=[],o={},s=e.length;for(n=0;n=0&&(e[r].major=!0);return e}(t,r,o,i):r}var Es=function(i){t(r,kr);var a=Nn(r);function r(t){var e;return n(this,r),(e=a.call(this,t))._cache={data:[],labels:[],all:[]},e._unit="day",e._majorUnit=void 0,e._offsets={},e._normalized=!1,e._parseOpts=void 0,e}return s(r,[{key:"init",value:function(t,i){var n=t.time||(t.time={}),a=this._adapter=new Sa._date(t.adapters.date);jt(n.displayFormats,a.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},B(e(r.prototype),"init",this).call(this,t),this._normalized=i.normalized}},{key:"parse",value:function(t,e){return void 0===t?null:Cs(this,t)}},{key:"beforeLayout",value:function(){B(e(r.prototype),"beforeLayout",this).call(this),this._cache={data:[],labels:[],all:[]}}},{key:"determineDataLimits",value:function(){var t=this.options,e=this._adapter,i=t.time.unit||"day",n=this.getUserBounds(),a=n.min,r=n.max,o=n.minDefined,s=n.maxDefined;function l(t){o||isNaN(t.min)||(a=Math.min(a,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),a=Ct(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),r=Ct(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}},{key:"_getLabelBounds",value:function(){var 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}}},{key:"buildTicks",value:function(){var t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);var a=this.min,r=function(t,e,i){for(var n=0,a=t.length;nn&&t[a-1]>i;)a--;return n>0||a=Os.indexOf(i);r--){var o=Os[r];if(Ds[o].common&&t._adapter.diff(a,n,o)>=e-1)return o}return Os[i?Os.indexOf(i):0]}(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(var e=Os.indexOf(t)+1,i=Os.length;e1e5*l)throw new Error(n+" and "+a+" are too far apart with stepSize of "+l+" "+s);var d="data"===r.ticks.source&&this.getDataTimestamps();for(t=f,e=0;t0?o:1}},{key:"getDataTimestamps",value:function(){var t,e,i=this._cache.data||[];if(i.length)return i;var n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[s].pos&&e<=t[l].pos){var u=Fi(t,"pos",e);s=u.lo,l=u.hi}var h=t[s];n=h.pos,r=h.time;var c=t[l];a=c.pos,o=c.time}else{if(e>=t[s].time&&e<=t[l].time){var f=Fi(t,"time",e);s=f.lo,l=f.hi}var d=t[s];n=d.time,r=d.pos;var v=t[l];a=v.time,o=v.pos}var g=a-n;return g?r+(o-r)*(e-n)/g:r}Es.id="time",Es.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};var zs=function(i){t(r,Es);var a=Nn(r);function r(t){var e;return n(this,r),(e=a.call(this,t))._table=[],e._minPos=void 0,e._tableRange=void 0,e}return s(r,[{key:"initOffsets",value:function(){var t=this._getTimestampsForTable(),i=this._table=this.buildLookupTable(t);this._minPos=Is(i,this.min),this._tableRange=Is(i,this.max)-this._minPos,B(e(r.prototype),"initOffsets",this).call(this,t)}},{key:"buildLookupTable",value:function(t){var e,i,n,a,r,o=this.min,s=this.max,l=[],u=[];for(e=0,i=t.length;e=o&&a<=s&&l.push(a);if(l.length<2)return[{time:o,pos:0},{time:s,pos:1}];for(e=0,i=l.length;e