lit-litelements 2.1.6 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,27 +1,27 @@
1
- function t(t,e,i,n){var o,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a}function e(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function i(t,e,i,n){return new(i||(i=Promise))((function(o,s){function a(t){try{l(n.next(t))}catch(t){s(t)}}function r(t){try{l(n.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,r)}l((n=n.apply(t,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;
1
+ function t(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r}function e(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function i(t,e,i,s){return new(i||(i=Promise))((function(n,o){function r(t){try{l(s.next(t))}catch(t){o(t)}}function a(t){try{l(s.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,a)}l((s=s.apply(t,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const n=globalThis,o=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),a=new WeakMap;class r{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&a.set(e,t))}return t}toString(){return this.cssText}}const l=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,s))(e)})(t):t
7
+ const s=globalThis,n=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),r=new WeakMap;class a{constructor(t,e,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(n&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&r.set(e,t))}return t}toString(){return this.cssText}}const l=n?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */,{is:h,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:u,getOwnPropertySymbols:g,getPrototypeOf:p}=Object,M=globalThis,f=M.trustedTypes,A=f?f.emptyScript:"",m=M.reactiveElementPolyfillSupport,b=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?A:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},v=(t,e)=>!h(t,e),_={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:v};Symbol.metadata??=Symbol("metadata"),M.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_;if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),n=this.getPropertyDescriptor(t,i,e);void 0!==n&&c(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){const{get:n,set:o}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return n?.call(this)},set(e){const s=n?.call(this);o.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??_}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...u(t),...g(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(o)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=n.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(void 0!==n&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,n=i._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=i.getPropertyOptions(n),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=n,this[n]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??v)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=new Map,y[b("finalized")]=new Map,m?.({ReactiveElement:y}),(M.reactiveElementVersions??=[]).push("2.0.4");
12
+ */,{is:h,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:u,getOwnPropertySymbols:f,getPrototypeOf:p}=Object,g=globalThis,m=g.trustedTypes,b=m?m.emptyScript:"",x=g.reactiveElementPolyfillSupport,_=(t,e)=>t,y={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},v=(t,e)=>!h(t,e),w={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:v};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=new WeakMap;class M extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&c(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const o=s?.call(this);n.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...u(t),...f(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(n)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),n=s.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:y).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:y;this._$Em=s,this[s]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??v)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}M.elementStyles=[],M.shadowRootOptions={mode:"open"},M[_("elementProperties")]=new Map,M[_("finalized")]=new Map,x?.({ReactiveElement:M}),(g.reactiveElementVersions??=[]).push("2.0.4");
13
13
  /**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- const S=globalThis,C=S.trustedTypes,D=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,w="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,R="?"+L,k=`<${R}>`,I=document,H=()=>I.createComment(""),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,E="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z=/-->/g,$=/>/g,F=RegExp(`>|${E}(?:([^\\s"'>=/]+)(${E}*=${E}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),N=/'/g,V=/"/g,B=/^(?:script|style|textarea|title)$/i,W=(t=>function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return{_$litType$:t,strings:e,values:n}})(1),j=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),Y=new WeakMap,X=I.createTreeWalker(I,129);function q(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==D?D.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,n=[];let o,s=2===e?"<svg>":"",a=T;for(let e=0;e<i;e++){const i=t[e];let r,l,h=-1,c=0;for(;c<i.length&&(a.lastIndex=c,l=a.exec(i),null!==l);)c=a.lastIndex,a===T?"!--"===l[1]?a=z:void 0!==l[1]?a=$:void 0!==l[2]?(B.test(l[2])&&(o=RegExp("</"+l[2],"g")),a=F):void 0!==l[3]&&(a=F):a===F?">"===l[0]?(a=o??T,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,r=l[1],a=void 0===l[3]?F:'"'===l[3]?V:N):a===V||a===N?a=F:a===z||a===$?a=T:(a=F,o=void 0);const d=a===F&&t[e+1].startsWith("/>")?" ":"";s+=a===T?i+k:h>=0?(n.push(r),i.slice(0,h)+w+i.slice(h)+L+d):i+L+(-2===h?e:d)}return[q(t,s+(t[i]||"<?>")+(2===e?"</svg>":"")),n]};class Z{constructor(t,e){let i,{strings:n,_$litType$:o}=t;this.parts=[];let s=0,a=0;const r=n.length-1,l=this.parts,[h,c]=K(n,o);if(this.el=Z.createElement(h,e),X.currentNode=this.el.content,2===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=X.nextNode())&&l.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(w)){const e=c[a++],n=i.getAttribute(t).split(L),o=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:o[2],strings:n,ctor:"."===o[1]?et:"?"===o[1]?it:"@"===o[1]?nt:tt}),i.removeAttribute(t)}else t.startsWith(L)&&(l.push({type:6,index:s}),i.removeAttribute(t));if(B.test(i.tagName)){const t=i.textContent.split(L),e=t.length-1;if(e>0){i.textContent=C?C.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],H()),X.nextNode(),l.push({type:2,index:++s});i.append(t[e],H())}}}else if(8===i.nodeType)if(i.data===R)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(L,t+1));)l.push({type:7,index:s}),t+=L.length-1}s++}}static createElement(t,e){const i=I.createElement("template");return i.innerHTML=t,i}}function G(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=arguments.length>3?arguments[3]:void 0;if(e===j)return e;let o=void 0!==n?i._$Co?.[n]:i._$Cl;const s=P(e)?void 0:e._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(!1),void 0===s?o=void 0:(o=new s(t),o._$AT(t,i,n)),void 0!==n?(i._$Co??=[])[n]=o:i._$Cl=o),void 0!==o&&(e=G(t,o._$AS(t,e.values),o,n)),e}class J{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,n=(t?.creationScope??I).importNode(e,!0);X.currentNode=n;let o=X.nextNode(),s=0,a=0,r=i[0];for(;void 0!==r;){if(s===r.index){let e;2===r.type?e=new Q(o,o.nextSibling,this,t):1===r.type?e=new r.ctor(o,r.name,r.strings,this,t):6===r.type&&(e=new ot(o,this,t)),this._$AV.push(e),r=i[++a]}s!==r?.index&&(o=X.nextNode(),s++)}return X.currentNode=I,n}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,n){this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t){t=G(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),P(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==j&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>O(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==U&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(I.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,n="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Z.createElement(q(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(e);else{const t=new J(n,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=Y.get(t.strings);return void 0===e&&Y.set(t.strings,e=new Z(t)),e}k(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new Q(this.S(H()),this.S(H()),this,this.options)):i=e[n],i._$AI(o),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,n,o){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=U}_$AI(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;const o=this.strings;let s=!1;if(void 0===o)t=G(this,t,e,0),s=!P(t)||t!==this._$AH&&t!==j,s&&(this._$AH=t);else{const n=t;let a,r;for(t=o[0],a=0;a<o.length-1;a++)r=G(this,n[i+a],e,a),r===j&&(r=this._$AH[a]),s||=!P(r)||r!==this._$AH[a],r===U?t=U:t!==U&&(t+=(r??"")+o[a+1]),this._$AH[a]=r}s&&!n&&this.j(t)}j(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===U?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==U)}}class nt extends tt{constructor(t,e,i,n,o){super(t,e,i,n,o),this.type=5}_$AI(t){if((t=G(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??U)===j)return;const e=this._$AH,i=t===U&&e!==U||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==U&&(e===U||i);i&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ot{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const st=S.litHtmlPolyfillSupport;st?.(Z,Q),(S.litHtmlVersions??=[]).push("3.1.4");
18
+ const k=globalThis,S=k.trustedTypes,A=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,D="?"+C,O=`<${D}>`,E=document,T=()=>E.createComment(""),R=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,I="[ \t\n\f\r]",z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,F=/>/g,V=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,N=/"/g,B=/^(?:script|style|textarea|title)$/i,W=(t=>function(e){for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return{_$litType$:t,strings:e,values:s}})(1),j=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),Y=new WeakMap,X=E.createTreeWalker(E,129);function q(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==A?A.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,s=[];let n,o=2===e?"<svg>":"",r=z;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,l=r.exec(i),null!==l);)c=r.lastIndex,r===z?"!--"===l[1]?r=$:void 0!==l[1]?r=F:void 0!==l[2]?(B.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=V):void 0!==l[3]&&(r=V):r===V?">"===l[0]?(r=n??z,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?V:'"'===l[3]?N:H):r===N||r===H?r=V:r===$||r===F?r=z:(r=V,n=void 0);const d=r===V&&t[e+1].startsWith("/>")?" ":"";o+=r===z?i+O:h>=0?(s.push(a),i.slice(0,h)+P+i.slice(h)+C+d):i+C+(-2===h?e:d)}return[q(t,o+(t[i]||"<?>")+(2===e?"</svg>":"")),s]};class Z{constructor(t,e){let i,{strings:s,_$litType$:n}=t;this.parts=[];let o=0,r=0;const a=s.length-1,l=this.parts,[h,c]=K(s,n);if(this.el=Z.createElement(h,e),X.currentNode=this.el.content,2===n){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=X.nextNode())&&l.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(P)){const e=c[r++],s=i.getAttribute(t).split(C),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?et:"?"===n[1]?it:"@"===n[1]?st:tt}),i.removeAttribute(t)}else t.startsWith(C)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(B.test(i.tagName)){const t=i.textContent.split(C),e=t.length-1;if(e>0){i.textContent=S?S.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],T()),X.nextNode(),l.push({type:2,index:++o});i.append(t[e],T())}}}else if(8===i.nodeType)if(i.data===D)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(C,t+1));)l.push({type:7,index:o}),t+=C.length-1}o++}}static createElement(t,e){const i=E.createElement("template");return i.innerHTML=t,i}}function G(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===j)return e;let n=void 0!==s?i._$Co?.[s]:i._$Cl;const o=R(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(t),n._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=n:i._$Cl=n),void 0!==n&&(e=G(t,n._$AS(t,e.values),n,s)),e}class J{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??E).importNode(e,!0);X.currentNode=s;let n=X.nextNode(),o=0,r=0,a=i[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new Q(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new nt(n,this,t)),this._$AV.push(e),a=i[++r]}o!==a?.index&&(n=X.nextNode(),o++)}return X.currentNode=E,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t){t=G(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),R(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==j&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>L(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==U&&R(this._$AH)?this._$AA.nextSibling.data=t:this.T(E.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Z.createElement(q(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new J(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=Y.get(t.strings);return void 0===e&&Y.set(t.strings,e=new Z(t)),e}k(t){L(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new Q(this.S(T()),this.S(T()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=U}_$AI(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;const n=this.strings;let o=!1;if(void 0===n)t=G(this,t,e,0),o=!R(t)||t!==this._$AH&&t!==j,o&&(this._$AH=t);else{const s=t;let r,a;for(t=n[0],r=0;r<n.length-1;r++)a=G(this,s[i+r],e,r),a===j&&(a=this._$AH[r]),o||=!R(a)||a!==this._$AH[r],a===U?t=U:t!==U&&(t+=(a??"")+n[r+1]),this._$AH[r]=a}o&&!s&&this.j(t)}j(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===U?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==U)}}class st extends tt{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t){if((t=G(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??U)===j)return;const e=this._$AH,i=t===U&&e!==U||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,s=t!==U&&(e===U||i);i&&this.element.removeEventListener(this.name,this,e),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class nt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const ot=k.litHtmlPolyfillSupport;ot?.(Z,Q),(k.litHtmlVersions??=[]).push("3.1.4");
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
23
  */
24
- class at extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const n=i?.renderBefore??e;let o=n._$litPart$;if(void 0===o){const t=i?.renderBefore??null;n._$litPart$=o=new Q(e.insertBefore(H(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return j}}at._$litElement$=!0,at.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:at});const rt=globalThis.litElementPolyfillSupport;rt?.({LitElement:at}),(globalThis.litElementVersions??=[]).push("4.0.6");
24
+ class rt extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let n=s._$litPart$;if(void 0===n){const t=i?.renderBefore??null;s._$litPart$=n=new Q(e.insertBefore(T(),t),t,void 0,i??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return j}}rt._$litElement$=!0,rt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:rt});const at=globalThis.litElementPolyfillSupport;at?.({LitElement:rt}),(globalThis.litElementVersions??=[]).push("4.0.6");
25
25
  /**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
@@ -32,7 +32,7 @@ const lt=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)
32
32
  * @license
33
33
  * Copyright 2017 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
35
- */,ht={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:v},ct=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ht,e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;const{kind:n,metadata:o}=i;let s=globalThis.litPropertyMetadata.get(o);if(void 0===s&&globalThis.litPropertyMetadata.set(o,s=new Map),s.set(i.name,t),"accessor"===n){const{name:n}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(n,o,t)},init(e){return void 0!==e&&this.P(n,void 0,t),e}}}if("setter"===n){const{name:n}=i;return function(i){const o=this[n];e.call(this,i),this.requestUpdate(n,o,t)}}throw Error("Unsupported decorator location: "+n)};function dt(t){return(e,i)=>"object"==typeof i?ct(t,e,i):((t,e,i)=>{const n=e.hasOwnProperty(i);return e.constructor.createProperty(i,n?{...t,wrapped:!0}:t),n?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}const ut={spinner1:"lds-dual-ring",spinner2:"lds-circle",spinner3:"loader",spinner4:"lds-hourglass",spinner5:"loader-3rd",spinner6:"loader-ying-yang",spinner7:"loader-in-out-circle",spinner8:"loader-arrow",spinner9:"loader-jump-stair",spinner10:"loader-yin-yang-2",spinner11:"loader-sent-email"},gt=(function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];const o=1===t.length?t[0]:i.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new r(o,t,s)})`
35
+ */,ht={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:v},ct=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ht,e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;const{kind:s,metadata:n}=i;let o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),o.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const n=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,n,t)},init(e){return void 0!==e&&this.P(s,void 0,t),e}}}if("setter"===s){const{name:s}=i;return function(i){const n=this[s];e.call(this,i),this.requestUpdate(s,n,t)}}throw Error("Unsupported decorator location: "+s)};function dt(t){return(e,i)=>"object"==typeof i?ct(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,s?{...t,wrapped:!0}:t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}const ut={spinner1:"lds-dual-ring",spinner2:"lds-circle",spinner3:"loader",spinner4:"lds-hourglass",spinner5:"loader-3rd",spinner6:"loader-ying-yang",spinner7:"loader-in-out-circle",spinner8:"loader-arrow",spinner9:"loader-jump-stair",spinner10:"loader-yin-yang-2",spinner11:"loader-sent-email"},ft=(function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];const n=1===t.length?t[0]:i.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new a(n,t,o)})`
36
36
  .spin-container {
37
37
  display: flex;
38
38
  justify-content: center;
@@ -510,20 +510,20 @@ const lt=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)
510
510
  opacity: 0;
511
511
  }
512
512
  }
513
- `;let pt=class extends at{constructor(){super(...arguments),this.name="spinner1",this.size="64px",this.backgroundColor="rgb(153, 153, 153)",this.center=!1}updated(t){t.has("size")&&this.style.setProperty("--lds-dual-ring-size",this.size),t.has("backgroundColor")&&this.style.setProperty("--lds-backgroundColor",this.backgroundColor)}render(){return W`
513
+ `;let pt=class extends rt{constructor(){super(...arguments),this.name="spinner1",this.size="64px",this.backgroundColor="rgb(153, 153, 153)",this.center=!1}updated(t){t.has("size")&&this.style.setProperty("--lds-dual-ring-size",this.size),t.has("backgroundColor")&&this.style.setProperty("--lds-backgroundColor",this.backgroundColor)}render(){return W`
514
514
  <div class="${this.center?"spin-container":""}">
515
515
  <div class="${ut[this.name]}"></div>
516
516
  </div>
517
- `}};function Mt(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}
517
+ `}};function gt(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}
518
518
  /*!
519
519
  * @kurkle/color v0.3.2
520
520
  * https://github.com/kurkle/color#readme
521
521
  * (c) 2023 Jukka Kurkela
522
522
  * Released under the MIT License
523
- */(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ft(t){return t+.5|0}pt.styles=[gt],t([dt({type:String}),e("design:type",Object)],pt.prototype,"name",void 0),t([dt({type:String}),e("design:type",Object)],pt.prototype,"size",void 0),t([dt({type:String}),e("design:type",Object)],pt.prototype,"backgroundColor",void 0),t([dt({type:Boolean}),e("design:type",Object)],pt.prototype,"center",void 0),pt=t([lt("loading-spinner-element")],pt);const At=(t,e,i)=>Math.max(Math.min(t,i),e);function mt(t){return At(ft(2.55*t),0,255)}function bt(t){return At(ft(255*t),0,255)}function xt(t){return At(ft(t/2.55)/100,0,1)}function vt(t){return At(ft(100*t),0,100)}const _t={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},yt=[..."0123456789ABCDEF"],St=t=>yt[15&t],Ct=t=>yt[(240&t)>>4]+yt[15&t],Dt=t=>(240&t)>>4==(15&t);function wt(t){var e=(t=>Dt(t.r)&&Dt(t.g)&&Dt(t.b)&&Dt(t.a))(t)?St:Ct;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Lt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Rt(t,e,i){const n=e*Math.min(i,1-i),o=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return i-n*Math.max(Math.min(o-3,9-o,1),-1)};return[o(0),o(8),o(4)]}function kt(t,e,i){const n=function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(n+t/60)%6;return i-i*e*Math.max(Math.min(o,4-o,1),0)};return[n(5),n(3),n(1)]}function It(t,e,i){const n=Rt(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function Ht(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,h;return o!==s&&(h=o-s,l=a>.5?h/(2-o-s):h/(o+s),r=function(t,e,i,n,o){return t===o?(e-i)/n+(e<i?6:0):e===o?(i-t)/n+2:(t-e)/n+4}(e,i,n,h,o),r=60*r+.5),[0|r,l||0,a]}function Pt(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(bt)}function Ot(t,e,i){return Pt(Rt,t,e,i)}function Et(t){return(t%360+360)%360}function Tt(t){const e=Lt.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?mt(+e[5]):bt(+e[5]));const o=Et(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Pt(It,t,e,i)}(o,s,a):"hsv"===e[1]?function(t,e,i){return Pt(kt,t,e,i)}(o,s,a):Ot(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}const zt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},$t={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Ft;function Nt(t){Ft||(Ft=function(){const t={},e=Object.keys($t),i=Object.keys(zt);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,zt[s]);s=parseInt($t[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}(),Ft.transparent=[0,0,0,0]);const e=Ft[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Vt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Bt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Wt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function jt(t,e,i){if(t){let n=Ht(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ot(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Ut(t,e){return t?Object.assign(e||{},t):t}function Yt(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=bt(t[3]))):(e=Ut(t,{r:0,g:0,b:0,a:1})).a=bt(e.a),e}function Xt(t){return"r"===t.charAt(0)?function(t){const e=Vt.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=e[8]?mt(t):At(255*t,0,255)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?mt(i):At(i,0,255)),n=255&(e[4]?mt(n):At(n,0,255)),o=255&(e[6]?mt(o):At(o,0,255)),{r:i,g:n,b:o,a:s}}}(t):Tt(t)}class qt{constructor(t){if(t instanceof qt)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=Yt(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*_t[n[1]],g:255&17*_t[n[2]],b:255&17*_t[n[3]],a:5===s?17*_t[n[4]]:255}:7!==s&&9!==s||(o={r:_t[n[1]]<<4|_t[n[2]],g:_t[n[3]]<<4|_t[n[4]],b:_t[n[5]]<<4|_t[n[6]],a:9===s?_t[n[7]]<<4|_t[n[8]]:255})),i=o||Nt(t)||Xt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Ut(this._rgb);return t&&(t.a=xt(t.a)),t}set rgb(t){this._rgb=Yt(t)}rgbString(){return this._valid?function(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${xt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}(this._rgb):void 0}hexString(){return this._valid?wt(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=Ht(t),i=e[0],n=vt(e[1]),o=vt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${xt(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,r=i.a-n.a,l=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;o=1-l,i.r=255&l*i.r+o*n.r+.5,i.g=255&l*i.g+o*n.g+.5,i.b=255&l*i.b+o*n.b+.5,i.a=s*i.a+(1-s)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=Wt(xt(t.r)),o=Wt(xt(t.g)),s=Wt(xt(t.b));return{r:bt(Bt(n+i*(Wt(xt(e.r))-n))),g:bt(Bt(o+i*(Wt(xt(e.g))-o))),b:bt(Bt(s+i*(Wt(xt(e.b))-s))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new qt(this.rgb)}alpha(t){return this._rgb.a=bt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=ft(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return jt(this._rgb,2,t),this}darken(t){return jt(this._rgb,2,-t),this}saturate(t){return jt(this._rgb,1,t),this}desaturate(t){return jt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Ht(t);i[0]=Et(i[0]+e),i=Ot(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}
523
+ */(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function mt(t){return t+.5|0}pt.styles=[ft],t([dt({type:String}),e("design:type",Object)],pt.prototype,"name",void 0),t([dt({type:String}),e("design:type",Object)],pt.prototype,"size",void 0),t([dt({type:String}),e("design:type",Object)],pt.prototype,"backgroundColor",void 0),t([dt({type:Boolean}),e("design:type",Object)],pt.prototype,"center",void 0),pt=t([lt("loading-spinner-element")],pt);const bt=(t,e,i)=>Math.max(Math.min(t,i),e);function xt(t){return bt(mt(2.55*t),0,255)}function _t(t){return bt(mt(255*t),0,255)}function yt(t){return bt(mt(t/2.55)/100,0,1)}function vt(t){return bt(mt(100*t),0,100)}const wt={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},Mt=[..."0123456789ABCDEF"],kt=t=>Mt[15&t],St=t=>Mt[(240&t)>>4]+Mt[15&t],At=t=>(240&t)>>4==(15&t);function Pt(t){var e=(t=>At(t.r)&&At(t.g)&&At(t.b)&&At(t.a))(t)?kt:St;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Ct=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Dt(t,e,i){const s=e*Math.min(i,1-i),n=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return i-s*Math.max(Math.min(n-3,9-n,1),-1)};return[n(0),n(8),n(4)]}function Ot(t,e,i){const s=function(s){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(s+t/60)%6;return i-i*e*Math.max(Math.min(n,4-n,1),0)};return[s(5),s(3),s(1)]}function Et(t,e,i){const s=Dt(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function Tt(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),r=(n+o)/2;let a,l,h;return n!==o&&(h=n-o,l=r>.5?h/(2-n-o):h/(n+o),a=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,h,n),a=60*a+.5),[0|a,l||0,r]}function Rt(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(_t)}function Lt(t,e,i){return Rt(Dt,t,e,i)}function It(t){return(t%360+360)%360}function zt(t){const e=Ct.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?xt(+e[5]):_t(+e[5]));const n=It(+e[2]),o=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Rt(Et,t,e,i)}(n,o,r):"hsv"===e[1]?function(t,e,i){return Rt(Ot,t,e,i)}(n,o,r):Lt(n,o,r),{r:i[0],g:i[1],b:i[2],a:s}}const $t={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Ft={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Vt;function Ht(t){Vt||(Vt=function(){const t={},e=Object.keys(Ft),i=Object.keys($t);let s,n,o,r,a;for(s=0;s<e.length;s++){for(r=a=e[s],n=0;n<i.length;n++)o=i[n],a=a.replace(o,$t[o]);o=parseInt(Ft[r],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),Vt.transparent=[0,0,0,0]);const e=Vt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Nt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Bt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Wt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function jt(t,e,i){if(t){let s=Tt(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=Lt(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function Ut(t,e){return t?Object.assign(e||{},t):t}function Yt(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=_t(t[3]))):(e=Ut(t,{r:0,g:0,b:0,a:1})).a=_t(e.a),e}function Xt(t){return"r"===t.charAt(0)?function(t){const e=Nt.exec(t);let i,s,n,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?xt(t):bt(255*t,0,255)}return i=+e[1],s=+e[3],n=+e[5],i=255&(e[2]?xt(i):bt(i,0,255)),s=255&(e[4]?xt(s):bt(s,0,255)),n=255&(e[6]?xt(n):bt(n,0,255)),{r:i,g:s,b:n,a:o}}}(t):zt(t)}class qt{constructor(t){if(t instanceof qt)return t;const e=typeof t;let i;var s,n,o;"object"===e?i=Yt(t):"string"===e&&(o=(s=t).length,"#"===s[0]&&(4===o||5===o?n={r:255&17*wt[s[1]],g:255&17*wt[s[2]],b:255&17*wt[s[3]],a:5===o?17*wt[s[4]]:255}:7!==o&&9!==o||(n={r:wt[s[1]]<<4|wt[s[2]],g:wt[s[3]]<<4|wt[s[4]],b:wt[s[5]]<<4|wt[s[6]],a:9===o?wt[s[7]]<<4|wt[s[8]]:255})),i=n||Ht(t)||Xt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Ut(this._rgb);return t&&(t.a=yt(t.a)),t}set rgb(t){this._rgb=Yt(t)}rgbString(){return this._valid?function(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${yt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}(this._rgb):void 0}hexString(){return this._valid?Pt(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=Tt(t),i=e[0],s=vt(e[1]),n=vt(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${yt(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const o=e===n?.5:e,r=2*o-1,a=i.a-s.a,l=((r*a==-1?r:(r+a)/(1+r*a))+1)/2;n=1-l,i.r=255&l*i.r+n*s.r+.5,i.g=255&l*i.g+n*s.g+.5,i.b=255&l*i.b+n*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=Wt(yt(t.r)),n=Wt(yt(t.g)),o=Wt(yt(t.b));return{r:_t(Bt(s+i*(Wt(yt(e.r))-s))),g:_t(Bt(n+i*(Wt(yt(e.g))-n))),b:_t(Bt(o+i*(Wt(yt(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new qt(this.rgb)}alpha(t){return this._rgb.a=_t(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=mt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return jt(this._rgb,2,t),this}darken(t){return jt(this._rgb,2,-t),this}saturate(t){return jt(this._rgb,1,t),this}desaturate(t){return jt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Tt(t);i[0]=It(i[0]+e),i=Lt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}
524
524
  /*!
525
525
  * Chart.js v4.4.5
526
526
  * https://www.chartjs.org
527
527
  * (c) 2024 Chart.js Contributors
528
528
  * Released under the MIT License
529
- */function Kt(){}const Zt=(()=>{let t=0;return()=>t++})();function Gt(t){return null==t}function Jt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Qt(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function te(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function ee(t,e){return te(t)?t:e}function ie(t,e){return void 0===t?e:t}const ne=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function oe(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function se(t,e,i,n){let o,s,a;if(Jt(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(Qt(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function ae(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function re(t){if(Jt(t))return t.map(re);if(Qt(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=re(t[i[o]]);return e}return t}function le(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function he(t,e,i,n){if(!le(t))return;const o=e[t],s=i[t];Qt(o)&&Qt(s)?ce(o,s,n):e[t]=re(s)}function ce(t,e,i){const n=Jt(e)?e:[e],o=n.length;if(!Qt(t))return t;const s=(i=i||{}).merger||he;let a;for(let e=0;e<o;++e){if(a=n[e],!Qt(a))continue;const o=Object.keys(a);for(let e=0,n=o.length;e<n;++e)s(o[e],t,a,i)}return t}function de(t,e){return ce(t,e,{merger:ue})}function ue(t,e,i){if(!le(t))return;const n=e[t],o=i[t];Qt(n)&&Qt(o)?de(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=re(o))}const ge={"":t=>t,x:t=>t.x,y:t=>t.y};function pe(t,e){const i=ge[e]||(ge[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function Me(t){return t.charAt(0).toUpperCase()+t.slice(1)}const fe=t=>void 0!==t,Ae=t=>"function"==typeof t,me=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const be=Math.PI,xe=2*be,ve=xe+be,_e=Number.POSITIVE_INFINITY,ye=be/180,Se=be/2,Ce=be/4,De=2*be/3,we=Math.log10,Le=Math.sign;function Re(t,e,i){return Math.abs(t-e)<i}function ke(t){const e=Math.round(t);t=Re(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(we(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Ie(t){return!isNaN(parseFloat(t))&&isFinite(t)}function He(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Pe(t){return t*(be/180)}function Oe(t){return t*(180/be)}function Ee(t){if(!te(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Te(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*be&&(s+=xe),{angle:s,distance:o}}function ze(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $e(t,e){return(t-e+ve)%xe-be}function Fe(t){return(t%xe+xe)%xe}function Ne(t,e,i,n){const o=Fe(t),s=Fe(e),a=Fe(i),r=Fe(s-o),l=Fe(a-o),h=Fe(o-s),c=Fe(o-a);return o===s||o===a||n&&s===a||r>l&&h<c}function Ve(t,e,i){return Math.max(e,Math.min(i,t))}function Be(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e-6;return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function We(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const je=(t,e,i,n)=>We(t,i,n?n=>{const o=t[n][e];return o<i||o===i&&t[n+1][e]===i}:n=>t[n][e]<i),Ue=(t,e,i)=>We(t,i,(n=>t[n][e]>=i));const Ye=["push","pop","shift","splice","unshift"];function Xe(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(Ye.forEach((e=>{delete t[e]})),delete t._chartjs)}function qe(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Ke="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Ze(t,e){let i=[],n=!1;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];i=s,n||(n=!0,Ke.call(window,(()=>{n=!1,t.apply(e,i)})))}}const Ge=t=>"start"===t?"left":"end"===t?"right":"center",Je=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Qe(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:h,max:c,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(o=Ve(Math.min(je(r,l,h).lo,i?n:je(e,l,a.getPixelForValue(h)).lo),0,n-1)),s=u?Ve(Math.max(je(r,a.axis,c,!0).hi+1,i?0:je(e,l,a.getPixelForValue(c),!0).hi+1),o,n)-o:n-o}return{start:o,count:s}}function ti(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}const ei=t=>0===t||1===t,ii=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*xe/i),ni=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*xe/i)+1,oi={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=>1-Math.cos(t*Se),easeOutSine:t=>Math.sin(t*Se),easeInOutSine:t=>-.5*(Math.cos(be*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ei(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),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=>ei(t)?t:ii(t,.075,.3),easeOutElastic:t=>ei(t)?t:ni(t,.075,.3),easeInOutElastic(t){const e=.1125;return ei(t)?t:t<.5?.5*ii(2*t,e,.45):.5+.5*ni(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let 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:t=>1-oi.easeOutBounce(1-t),easeOutBounce(t){const 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:t=>t<.5?.5*oi.easeInBounce(2*t):.5*oi.easeOutBounce(2*t-1)+.5};function si(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function ai(t){return si(t)?t:new qt(t)}function ri(t){return si(t)?t:new qt(t).saturate(.5).darken(.1).hexString()}const li=["x","y","borderWidth","radius","tension"],hi=["color","borderColor","backgroundColor"];const ci=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ci.get(i);return n||(n=new Intl.NumberFormat(t,e),ci.set(i,n)),n}(e,i).format(t)}const ui={values:t=>Jt(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let 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)}const a=we(Math.abs(s)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(we(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?ui.numeric.call(this,t,e,i):""}};var gi={formatters:ui};const pi=Object.create(null),Mi=Object.create(null);function fi(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function Ai(t,e,i){return"string"==typeof e?ce(fi(t,e),i):ce(fi(t,""),e)}class mi{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.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)=>ri(e.backgroundColor),this.hoverBorderColor=(t,e)=>ri(e.borderColor),this.hoverColor=(t,e)=>ri(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 Ai(this,t,e)}get(t){return fi(this,t)}describe(t,e){return Ai(Mi,t,e)}override(t,e){return Ai(pi,t,e)}route(t,e,i,n){const o=fi(this,t),s=fi(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return Qt(t)?Object.assign({},e,t):ie(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach((t=>t(this)))}}var bi=new mi({_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:hi},numbers:{type:"number",properties:li}}),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",clip:!0,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:gi.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 xi(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function vi(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,h,c,d,u;for(l=0;l<r;l++)if(d=i[l],null==d||Jt(d)){if(Jt(d))for(h=0,c=d.length;h<c;h++)u=d[h],null==u||Jt(u)||(a=xi(t,o,s,a,u))}else a=xi(t,o,s,a,d);t.restore();const g=s.length/2;if(g>i.length){for(l=0;l<g;l++)delete o[s[l]];s.splice(0,g)}return a}function _i(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function yi(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Si(t,e,i,n){Ci(t,e,i,n,null)}function Ci(t,e,i,n,o){let s,a,r,l,h,c,d,u;const g=e.pointStyle,p=e.rotation,M=e.radius;let f=(p||0)*ye;if(g&&"object"==typeof g&&(s=g.toString(),"[object HTMLImageElement]"===s||"[object HTMLCanvasElement]"===s))return t.save(),t.translate(i,n),t.rotate(f),t.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),void t.restore();if(!(isNaN(M)||M<=0)){switch(t.beginPath(),g){default:o?t.ellipse(i,n,o/2,M,0,0,xe):t.arc(i,n,M,0,xe),t.closePath();break;case"triangle":c=o?o/2:M,t.moveTo(i+Math.sin(f)*c,n-Math.cos(f)*M),f+=De,t.lineTo(i+Math.sin(f)*c,n-Math.cos(f)*M),f+=De,t.lineTo(i+Math.sin(f)*c,n-Math.cos(f)*M),t.closePath();break;case"rectRounded":h=.516*M,l=M-h,a=Math.cos(f+Ce)*l,d=Math.cos(f+Ce)*(o?o/2-h:l),r=Math.sin(f+Ce)*l,u=Math.sin(f+Ce)*(o?o/2-h:l),t.arc(i-d,n-r,h,f-be,f-Se),t.arc(i+u,n-a,h,f-Se,f),t.arc(i+d,n+r,h,f,f+Se),t.arc(i-u,n+a,h,f+Se,f+be),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*M,c=o?o/2:l,t.rect(i-c,n-l,2*c,2*l);break}f+=Ce;case"rectRot":d=Math.cos(f)*(o?o/2:M),a=Math.cos(f)*M,r=Math.sin(f)*M,u=Math.sin(f)*(o?o/2:M),t.moveTo(i-d,n-r),t.lineTo(i+u,n-a),t.lineTo(i+d,n+r),t.lineTo(i-u,n+a),t.closePath();break;case"crossRot":f+=Ce;case"cross":d=Math.cos(f)*(o?o/2:M),a=Math.cos(f)*M,r=Math.sin(f)*M,u=Math.sin(f)*(o?o/2:M),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a);break;case"star":d=Math.cos(f)*(o?o/2:M),a=Math.cos(f)*M,r=Math.sin(f)*M,u=Math.sin(f)*(o?o/2:M),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a),f+=Ce,d=Math.cos(f)*(o?o/2:M),a=Math.cos(f)*M,r=Math.sin(f)*M,u=Math.sin(f)*(o?o/2:M),t.moveTo(i-d,n-r),t.lineTo(i+d,n+r),t.moveTo(i+u,n-a),t.lineTo(i-u,n+a);break;case"line":a=o?o/2:Math.cos(f)*M,r=Math.sin(f)*M,t.moveTo(i-a,n-r),t.lineTo(i+a,n+r);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(f)*(o?o/2:M),n+Math.sin(f)*M);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Di(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function wi(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Li(t){t.restore()}function Ri(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function ki(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Ii(t,e,i,n,o){if(o.strikethrough||o.underline){const s=t.measureText(n),a=e-s.actualBoundingBoxLeft,r=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,h=i+s.actualBoundingBoxDescent,c=o.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(a,c),t.lineTo(r,c),t.stroke()}}function Hi(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function Pi(t,e,i,n,o){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=Jt(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,h;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Gt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<a.length;++l)h=a[l],s.backdrop&&Hi(t,s.backdrop),r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),Gt(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(h,i,n,s.maxWidth)),t.fillText(h,i,n,s.maxWidth),Ii(t,i,n,h,s),n+=Number(o.lineHeight);t.restore()}function Oi(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,1.5*be,be,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,be,Se,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,Se,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-Se,!0),t.lineTo(i+a.topLeft,n)}const Ei=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Ti=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zi(t,e){const i=(""+t).match(Ei);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const $i=t=>+t||0;function Fi(t,e){const i={},n=Qt(e),o=n?Object.keys(e):e,s=Qt(t)?n?i=>ie(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=$i(s(t));return i}function Ni(t){return Fi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Vi(t){return Fi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Bi(t){const e=Ni(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Wi(t,e){t=t||{},e=e||bi.font;let i=ie(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=ie(t.style,e.style);n&&!(""+n).match(Ti)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const o={family:ie(t.family,e.family),lineHeight:zi(ie(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:ie(t.weight,e.weight),string:""};return o.string=function(t){return!t||Gt(t.size)||Gt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(o),o}function ji(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&Jt(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function Ui(t,e){return Object.assign(Object.create(t),e)}function Yi(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],i=arguments.length>3?arguments[3]:void 0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>t[0];const o=(arguments.length>2?arguments[2]:void 0)||t;void 0===i&&(i=on("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:n,override:n=>Yi([n,...t],e,o,i)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Gi(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=on(Ki(s,t),i),void 0!==o)return Zi(t,o)?en(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>sn(t).includes(e),ownKeys:t=>sn(t),set(t,e,i){const o=t._storage||(t._storage=n());return t[e]=o[e]=i,delete t._keys,!0}})}function Xi(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:qi(t,n),setContext:e=>Xi(t,e,i,n),override:o=>Xi(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Gi(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];Ae(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(s,a||n);r.delete(t),Zi(t,l)&&(l=en(o._scopes,o,t,l));return l}(e,r,t,i));Jt(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(void 0!==s.index&&n(t))return e[s.index%e.length];if(Qt(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=en(n,o,t,l);e.push(Xi(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));Zi(e,r)&&(r=Xi(r,o,s&&s[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function qi(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:Ae(i)?i:()=>i,isIndexable:Ae(n)?n:()=>n}}const Ki=(t,e)=>t?t+Me(e):e,Zi=(t,e)=>Qt(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Gi(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const n=i();return t[e]=n,n}function Ji(t,e,i){return Ae(t)?t(e,i):t}const Qi=(t,e)=>!0===t?e:"string"==typeof t?pe(e,t):void 0;function tn(t,e,i,n,o){for(const s of e){const e=Qi(i,s);if(e){t.add(e);const s=Ji(e._fallback,i,o);if(void 0!==s&&s!==i&&s!==n)return s}else if(!1===e&&void 0!==n&&i!==n)return null}return!1}function en(t,e,i,n){const o=e._rootScopes,s=Ji(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=nn(r,a,i,s||i,n);return null!==l&&((void 0===s||s===i||(l=nn(r,a,s,l,n),null!==l))&&Yi(Array.from(r),[""],o,s,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];if(Jt(o)&&Qt(i))return i;return o||{}}(e,i,n))))}function nn(t,e,i,n,o){for(;i;)i=tn(t,e,i,n,o);return i}function on(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function sn(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function an(t,e,i,n){const{iScale:o}=t,{key:s="r"}=this._parsing,a=new Array(n);let r,l,h,c;for(r=0,l=n;r<l;++r)h=r+i,c=e[h],a[r]={r:o.parse(pe(c,s),h)};return a}const rn=Number.EPSILON||1e-14,ln=(t,e)=>e<t.length&&!t[e].skip&&t[e],hn=t=>"x"===t?"y":"x";function cn(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=ze(s,o),l=ze(a,s);let h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=n*h,u=n*c;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function dn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const i=hn(e),n=t.length,o=Array(n).fill(0),s=Array(n);let a,r,l,h=ln(t,0);for(a=0;a<n;++a)if(r=l,l=h,h=ln(t,a+1),l){if(h){const t=h[e]-l[e];o[a]=0!==t?(h[i]-l[i])/t:0}s[a]=r?h?Le(o[a-1])!==Le(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(t,e,i){const n=t.length;let o,s,a,r,l,h=ln(t,0);for(let c=0;c<n-1;++c)l=h,h=ln(t,c+1),l&&h&&(Re(e[c],0,rn)?i[c]=i[c+1]=0:(o=i[c]/e[c],s=i[c+1]/e[c],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[c]=o*a*e[c],i[c+1]=s*a*e[c])))}(t,o,s),function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";const n=hn(i),o=t.length;let s,a,r,l=ln(t,0);for(let h=0;h<o;++h){if(a=r,r=l,l=ln(t,h+1),!r)continue;const o=r[i],c=r[n];a&&(s=(o-a[i])/3,r[`cp1${i}`]=o-s,r[`cp1${n}`]=c-s*e[h]),l&&(s=(l[i]-o)/3,r[`cp2${i}`]=o+s,r[`cp2${n}`]=c+s*e[h])}}(t,s,e)}function un(t,e,i){return Math.max(Math.min(t,i),e)}function gn(t,e,i,n,o){let s,a,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)dn(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)r=t[s],l=cn(i,r,t[Math.min(s+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,n,o,s,a,r=Di(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&Di(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=un(o.cp1x,e.left,e.right),o.cp1y=un(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=un(o.cp2x,e.left,e.right),o.cp2y=un(o.cp2y,e.top,e.bottom)))}(t,i)}function pn(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Mn(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function fn(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const An=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const mn=["top","right","bottom","left"];function bn(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=mn[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const xn=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function vn(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,o=An(i),s="border-box"===o.boxSizing,a=bn(o,"padding"),r=bn(o,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:o,offsetY:s}=n;let a,r,l=!1;if(xn(o,s,t.target))a=o,r=s;else{const t=e.getBoundingClientRect();a=n.clientX-t.left,r=n.clientY-t.top,l=!0}return{x:a,y:r,box:l}}(t,i),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:g,height:p}=e;return s&&(g-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-d)/g*i.width/n),y:Math.round((h-u)/p*i.height/n)}}const _n=t=>Math.round(10*t)/10;function yn(t,e,i,n){const o=An(t),s=bn(o,"margin"),a=fn(o.maxWidth,t,"clientWidth")||_e,r=fn(o.maxHeight,t,"clientHeight")||_e,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=t&&Mn(t);if(s){const t=s.getBoundingClientRect(),a=An(s),r=bn(a,"border","width"),l=bn(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=fn(a.maxWidth,s,"clientWidth"),o=fn(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||_e,maxHeight:o||_e}}(t,e,i);let{width:h,height:c}=l;if("content-box"===o.boxSizing){const t=bn(o,"border","width"),e=bn(o,"padding");h-=e.width+t.width,c-=e.height+t.height}h=Math.max(0,h-s.width),c=Math.max(0,n?h/n:c-s.height),h=_n(Math.min(h,a,l.maxWidth)),c=_n(Math.min(c,r,l.maxHeight)),h&&!c&&(c=_n(h/2));return(void 0!==e||void 0!==i)&&n&&l.height&&c>l.height&&(c=l.height,h=_n(Math.floor(c*n))),{width:h,height:c}}function Sn(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==o||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=o,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Cn=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};pn()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Dn(t,e){const i=function(t,e){return An(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 Ln(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 Rn(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=wn(t,o,i),r=wn(o,s,i),l=wn(s,e,i),h=wn(a,r,i),c=wn(r,l,i);return wn(h,c,i)}function kn(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function In(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Hn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Pn(t){return"angle"===t?{between:Ne,compare:$e,normalize:Fe}:{between:Be,compare:(t,e)=>t-e,normalize:t=>t}}function On(t){let{start:e,end:i,count:n,loop:o,style:s}=t;return{start:e%n,end:i%n,loop:o&&(i-e+1)%n==0,style:s}}function En(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:h}=Pn(n),{start:c,end:d,loop:u,style:g}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=Pn(n),l=e.length;let h,c,{start:d,end:u,loop:g}=t;if(g){for(d+=l,u+=l,h=0,c=l;h<c&&a(r(e[d%l][n]),o,s);++h)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:g,style:t.style}}(t,e,i),p=[];let M,f,A,m=!1,b=null;const x=()=>m||l(o,A,M)&&0!==r(o,A),v=()=>!m||0===r(s,M)||l(s,A,M);for(let t=c,i=c;t<=d;++t)f=e[t%a],f.skip||(M=h(f[n]),M!==A&&(m=l(M,o,s),null===b&&x()&&(b=0===r(M,o)?t:i),null!==b&&v()&&(p.push(On({start:b,end:t,loop:u,count:a,style:g})),b=null),i=t,A=M));return null!==b&&p.push(On({start:b,end:d,loop:u,count:a,style:g})),p}function Tn(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=En(n[o],t.points,e);s.length&&i.push(...s)}return i}function zn(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const o=t._chart.getContext(),s=$n(t.options),{_datasetIndex:a,options:{spanGaps:r}}=t,l=i.length,h=[];let c=s,d=e[0].start,u=d;function g(t,e,n,o){const s=r?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=s;for(;i[e%l].skip;)e+=s;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:n,style:o}),c=o,d=e%l)}}for(const t of e){d=r?d:t.start;let e,s=i[d%l];for(u=d+1;u<=t.end;u++){const r=i[u%l];e=$n(n.setContext(Ui(o,{type:"segment",p0:s,p1:r,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),Fn(e,c)&&g(d,u-1,t.loop,c),s=r,c=e}d<u-1&&g(d,u-1,t.loop,c)}return h}(t,e,i,n):e}function $n(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Fn(t,e){if(!e)return!1;const i=[],n=function(t,e){return si(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}class Nn{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach((n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){this._request||(this._running=!0,this._request=Ke.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const o=i.items;let s,a=o.length-1,r=!1;for(;a>=0;--a)s=o[a],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,i,t,"progress")),o.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=o.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let 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){const 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;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Vn=new Nn;const Bn="transparent",Wn={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=ai(t||Bn),o=n.valid&&ai(e||Bn);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class jn{constructor(t,e,i,n){const o=e[i];n=ji([t.to,n,o,t.from]);const s=ji([t.from,o,n]);this._active=!0,this._fn=t.fn||Wn[t.type||typeof s],this._easing=oi[t.easing]||oi.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=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],o=i-this._start,s=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ji([t.to,e,n,t.from]),this._from=ji([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,o=this._from,s=this._loop,a=this._to;let r;if(this._active=o!==a&&(s||e<i),!this._active)return this._target[n]=a,void this._notify(!0);e<0?this._target[n]=o:(r=e/i%2,r=s&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[n]=this._fn(o,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class Un{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Qt(t))return;const e=Object.keys(bi.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((n=>{const o=t[n];if(!Qt(o))return;const s={};for(const t of e)s[t]=o[t];(Jt(o.properties)&&o.properties||[n]).forEach((t=>{t!==n&&i.has(t)||i.set(t,s)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const h=e[l];let c=o[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,a);continue}c.cancel()}d&&d.duration?(o[l]=c=new jn(d,t,l,h),n.push(c)):t[l]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Vn.add(this._chart,i),!0):void 0}}function Yn(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function Xn(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function qn(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.keys,s="single"===n.mode;let a,r,l,h;if(null!==e){for(a=0,r=o.length;a<r;++a){if(l=+o[a],l===i){if(n.all)continue;break}h=t.values[l],te(h)&&(s||0===e||Le(e)===Le(h))&&(e+=h)}return e}}function Kn(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Zn(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function Gn(t,e,i,n){for(const o of e.getMatchingVisibleMetas(n).reverse()){const e=t[o.index];if(i&&e>0||!i&&e<0)return o.index}return null}function Jn(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:r}=n,l=s.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,a,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:s,[h]:d}=i;u=(i._stacks||(i._stacks={}))[h]=Zn(o,c,s),u[r]=d,u._top=Gn(u,a,!0,n.type),u._bottom=Gn(u,a,!1,n.type);(u._visualValues||(u._visualValues={}))[r]=d}}function Qn(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function to(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const eo=t=>"reset"===t||"none"===t,io=(t,e)=>e?t:Object.assign({},t);class no{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(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Kn(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&&to(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,o=e.xAxisID=ie(i.xAxisID,Qn(t,"x")),s=e.yAxisID=ie(i.yAxisID,Qn(t,"y")),a=e.rAxisID=ie(i.rAxisID,Qn(t,"r")),r=e.indexAxis,l=e.iAxisID=n(r,o,s,a),h=e.vAxisID=n(r,s,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Xe(this._data,this),t._stacked&&to(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(Qt(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:n}=e,o="x"===i.axis?"x":"y",s="x"===n.axis?"x":"y",a=Object.keys(t),r=new Array(a.length);let l,h,c;for(l=0,h=a.length;l<h;++l)c=a[l],r[l]={[o]:c,[s]:t[c]};return r}(e,t)}else if(i!==e){if(i){Xe(i,this);const t=this._cachedMeta;to(t),t._parsed=[]}e&&Object.isExtensible(e)&&(o=this,(n=e)._chartjs?n._chartjs.listeners.push(o):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),Ye.forEach((t=>{const e="_onData"+Me(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];const a=i.apply(this,o);return n._chartjs.listeners.forEach((t=>{"function"==typeof t[e]&&t[e](...o)})),a}})})))),this._syncList=[],this._data=e}var n,o}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Kn(e.vScale,e),e.stack!==i.stack&&(n=!0,to(e),e.stack=i.stack),this._resyncElements(t),(n||o!==e._stacked)&&(Jn(this,e._parsed),e._stacked=Kn(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:o,_stacked:s}=i,a=o.axis;let r,l,h,c=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,h=n;else{h=Jt(n[t])?this.parseArrayData(i,n,t,e):Qt(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const o=()=>null===l[a]||d&&l[a]<d[a];for(r=0;r<e;++r)i._parsed[r+t]=l=h[r],c&&(o()&&(c=!1),d=l);i._sorted=c}s&&Jn(this,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,a=o.axis,r=s.axis,l=o.getLabels(),h=o===s,c=new Array(n);let d,u,g;for(d=0,u=n;d<u;++d)g=d+i,c[d]={[a]:h||o.parse(l[g],g),[r]:s.parse(e[g],g)};return c}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,a=new Array(n);let r,l,h,c;for(r=0,l=n;r<l;++r)h=r+i,c=e[h],a[r]={x:o.parse(c[0],h),y:s.parse(c[1],h)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(n);let h,c,d,u;for(h=0,c=n;h<c;++h)d=h+i,u=e[d],l[h]={x:o.parse(pe(u,a),d),y:s.parse(pe(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,s=e[t.axis];return qn({keys:Xn(n,!0),values:e._stacks[t.axis]._visualValues},s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,s=qn(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,o=i._sorted&&t===i.iScale,s=n.length,a=this._getOtherScale(t),r=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:Xn(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(a);let d,u;function g(){u=n[d];const e=u[a.axis];return!te(u[t.axis])||h>e||c<e}for(d=0;d<s&&(g()||(this.updateRangeFromParsed(l,t,u,r),!o));++d);if(o)for(d=s-1;d>=0;--d)if(!g()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],te(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,o;return Qt(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o,disabled:!1===t}}(ie(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=Yn(t,i),o=Yn(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],o=e.chartArea,s=[],a=this._drawStart||0,r=this._drawCount||n.length-a,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,o,a,r),h=a;h<a+r;++h){const e=n[h];e.hidden||(e.active&&l?s.push(e):e.draw(t,o))}for(h=0;h<s.length;++h)s[h].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];o=e.$context||(e.$context=function(t,e,i){return Ui(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=function(t,e){return Ui(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2?arguments[2]:void 0;const n="active"===e,o=this._cachedDataOpts,s=t+"-"+e,a=o[s],r=this.enableOptionSharing&&fe(i);if(a)return io(a,r);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=n?[`${t}Hover`,"hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),h),u=Object.keys(bi.elements[t]),g=l.resolveNamedOptions(d,u,(()=>this.getContext(i,n,e)),c);return g.$shared&&(g.$shared=r,o[s]=Object.freeze(io(g,r))),g}_resolveAnimations(t,e,i){const n=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,a=o[s];if(a)return a;let r;if(!1!==n.options.animation){const n=this.chart.config,o=n.datasetAnimationScopeKeys(this._type,e),s=n.getOptionScopes(this.getDataset(),o);r=n.createResolver(s,this.getContext(t,i,e))}const l=new Un(n,r&&r.animations);return r&&r._cacheable&&(o[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||eo(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(i),s=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:s}}updateElement(t,e,i,n){eo(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!eo(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,o=e.length,s=Math.min(o,n);s&&this.parse(0,s),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=this._cachedMeta,o=n.data,s=t+e;let a;const r=t=>{for(t.length+=e,a=t.length-1;a>=s;a--)t[a]=t[a-e]};for(r(o),a=t;a<s;++a)o[a]=new this.dataElementType;this._parsing&&r(n._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&to(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function oo(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,o=i.length;e<o;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=qe(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let n,o,s,a,r=e._length;const l=()=>{32767!==s&&-32768!==s&&(fe(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(n=0,o=i.length;n<o;++n)s=e.getPixelForValue(i[n]),l();for(a=void 0,n=0,o=e.ticks.length;n<o;++n)s=e.getPixelForTick(n),l();return r}function so(t,e,i,n){return Jt(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(o,s),r=Math.max(o,s);let l=a,h=r;Math.abs(a)>Math.abs(r)&&(l=r,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:o,end:s,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function ao(t,e,i,n){const o=t.iScale,s=t.vScale,a=o.getLabels(),r=o===s,l=[];let h,c,d,u;for(h=i,c=i+n;h<c;++h)u=e[h],d={},d[o.axis]=r||o.parse(a[h],h),l.push(so(u,d,s,h));return l}function ro(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function lo(t,e,i,n){let o=e.borderSkipped;const s={};if(!o)return void(t.borderSkipped=s);if(!0===o)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:r,reverse:l,top:h,bottom:c}=function(t){let e,i,n,o,s;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(o="end",s="start"):(o="start",s="end"),{start:i,end:n,reverse:e,top:o,bottom:s}}(t);"middle"===o&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?o=h:(i._bottom||0)===n?o=c:(s[ho(c,a,r,l)]=!0,o=h)),s[ho(o,a,r,l)]=!0,t.borderSkipped=s}function ho(t,e,i,n){var o,s,a;return n?(a=i,t=co(t=(o=t)===(s=e)?a:o===a?s:o,i,e)):t=co(t,e,i),t}function co(t,e,i){return"start"===t?e:"end"===t?i:t}function uo(t,e,i){let{inflateAmount:n}=e;t.inflateAmount="auto"===n?1===i?.33:0:n}Mt(no,"defaults",{}),Mt(no,"datasetElementType",null),Mt(no,"dataElementType",null);class go extends no{parsePrimitiveData(t,e,i,n){return ao(t,e,i,n)}parseArrayData(t,e,i,n){return ao(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===o.axis?a:r,h="x"===s.axis?a:r,c=[];let d,u,g,p;for(d=i,u=i+n;d<u;++d)p=e[d],g={},g[o.axis]=o.parse(pe(p,l),d),c.push(so(pe(p,h),g,s,d));return c}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),s=o._custom,a=ro(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o="reset"===n,{index:s,_cachedMeta:{vScale:a}}=this,r=a.getBasePixel(),l=a.isHorizontal(),h=this._getRuler(),{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,n);for(let u=e;u<e+i;u++){const e=this.getParsed(u),i=o||Gt(e[a.axis])?{base:r,head:r}:this._calculateBarValuePixels(u),g=this._calculateBarIndexPixels(u,h),p=(e._stacks||{})[a.axis],M={horizontal:l,base:i.base,enableBorderRadius:!p||ro(e._custom)||s===p._top||s===p._bottom,x:l?i.head:g.center,y:l?g.center:i.head,height:l?g.size:Math.abs(i.size),width:l?Math.abs(i.size):g.size};d&&(M.options=c||this.resolveDataElementOptions(u,t[u].active?"active":n));const f=M.options||t[u].options;lo(M,f,p,s),uo(M,f,h.ratio),this.updateElement(t[u],u,M,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),o=i.options.stacked,s=[],a=this._cachedMeta.controller.getParsed(e),r=a&&a[i.axis],l=t=>{const e=t._parsed.find((t=>t[i.axis]===r)),n=e&&e[t.vScale.axis];if(Gt(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!l(i))&&((!1===o||-1===s.indexOf(i.stack)||void 0===o&&void 0===i.stack)&&s.push(i.stack),i.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let o,s;for(o=0,s=e.data.length;o<s;++o)n.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const a=t.barThickness;return{min:a||oo(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:o,minBarLength:s}}=this,a=o||0,r=this.getParsed(t),l=r._custom,h=ro(l);let c,d,u=r[e.axis],g=0,p=i?this.applyStack(e,r,i):u;p!==u&&(g=p-u,p=u),h&&(u=l.barStart,p=l.barEnd-l.barStart,0!==u&&Le(u)!==Le(l.barEnd)&&(g=0),g+=u);const M=Gt(o)||h?g:o;let f=e.getPixelForValue(M);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(g+p):f,d=c-f,Math.abs(d)<s){d=function(t,e,i){return 0!==t?Le(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(d,e,a)*s,u===a&&(f-=d/2);const t=e.getPixelForDecimal(0),o=e.getPixelForDecimal(1),l=Math.min(t,o),g=Math.max(t,o);f=Math.max(Math.min(f,g),l),c=f+d,i&&!h&&(r._stacks[e.axis]._visualValues[n]=e.getValueForPixel(c)-e.getValueForPixel(f))}if(f===e.getPixelForValue(a)){const t=Le(d)*e.getLineWidthForValue(a)/2;f+=t,d-=t}return{size:d,base:f,head:c,center:c+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,o=n.skipNull,s=ie(n.maxBarThickness,1/0);let a,r;if(e.grouped){const i=o?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===r?e.end-e.start:r-s)),null===r&&(r=s+s-a);const h=s-(s-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:i.barPercentage,start:h}}(t,e,n,i):function(t,e,i,n){const o=i.barThickness;let s,a;return Gt(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}(t,e,n,i),h=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=l.start+l.chunk*h+l.chunk/2,r=Math.min(s,l.chunk*l.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),r=Math.min(s,e.min*e.ratio);return{base:a-r/2,head:a+r/2,center:a,size:r}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let o=0;for(;o<n;++o)null===this.getParsed(o)[e.axis]||i[o].hidden||i[o].draw(this._ctx)}}Mt(go,"id","bar"),Mt(go,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Mt(go,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class po extends no{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const o=super.parsePrimitiveData(t,e,i,n);for(let t=0;t<o.length;t++)o[t]._custom=this.resolveDataElementOptions(t+i).radius;return o}parseArrayData(t,e,i,n){const o=super.parseArrayData(t,e,i,n);for(let t=0;t<o.length;t++){const n=e[i+t];o[t]._custom=ie(n[2],this.resolveDataElementOptions(t+i).radius)}return o}parseObjectData(t,e,i,n){const o=super.parseObjectData(t,e,i,n);for(let t=0;t<o.length;t++){const n=e[i+t];o[t]._custom=ie(n&&n.r&&+n.r,this.resolveDataElementOptions(t+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:o}=e,s=this.getParsed(t),a=n.getLabelForValue(s.x),r=o.getLabelForValue(s.y),l=s._custom;return{label:i[t]||"",value:"("+a+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,n),h=s.axis,c=a.axis;for(let d=e;d<e+i;d++){const e=t[d],i=!o&&this.getParsed(d),u={},g=u[h]=o?s.getPixelForDecimal(.5):s.getPixelForValue(i[h]),p=u[c]=o?a.getBasePixel():a.getPixelForValue(i[c]);u.skip=isNaN(g)||isNaN(p),l&&(u.options=r||this.resolveDataElementOptions(d,e.active?"active":n),o&&(u.options.radius=0)),this.updateElement(e,d,u,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=ie(i&&i._custom,o),n}}Mt(po,"id","bubble"),Mt(po,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),Mt(po,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});class Mo extends no{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){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let o,s,a=t=>+i[t];if(Qt(i[t])){const{key:t="value"}=this._parsing;a=e=>+pe(i[e],t)}for(o=t,s=t+e;o<s;++o)n._parsed[o]=a(o)}}_getRotation(){return Pe(this.options.rotation-90)}_getCircumference(){return Pe(this.options.circumference)}_getRotationExtents(){let t=xe,e=-xe;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,o=n._getRotation(),s=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,o=n.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-s)/2,0),r=Math.min((l=this.options.cutout,h=a,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:+l/h),1);var l,h;const c=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:g,ratioY:p,offsetX:M,offsetY:f}=function(t,e,i){let n=1,o=1,s=0,a=0;if(e<xe){const r=t,l=r+e,h=Math.cos(r),c=Math.sin(r),d=Math.cos(l),u=Math.sin(l),g=(t,e,n)=>Ne(t,r,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>Ne(t,r,l,!0)?-1:Math.min(e,e*i,n,n*i),M=g(0,h,d),f=g(Se,c,u),A=p(be,h,d),m=p(be+Se,c,u);n=(M-A)/2,o=(f-m)/2,s=-(M+A)/2,a=-(f+m)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:a}}(u,d,r),A=(i.width-s)/g,m=(i.height-s)/p,b=Math.max(Math.min(A,m)/2,0),x=ne(this.options.radius,b),v=(x-Math.max(x*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=M*x,this.offsetY=f*x,n.total=this.calculateTotal(),this.outerRadius=x-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/xe)}updateElements(t,e,i,n){const o="reset"===n,s=this.chart,a=s.chartArea,r=s.options.animation,l=(a.left+a.right)/2,h=(a.top+a.bottom)/2,c=o&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:g,includeOptions:p}=this._getSharedOptions(e,n);let M,f=this._getRotation();for(M=0;M<e;++M)f+=this._circumference(M,o);for(M=e;M<e+i;++M){const e=this._circumference(M,o),i=t[M],s={x:l+this.offsetX,y:h+this.offsetY,startAngle:f,endAngle:f+e,circumference:e,outerRadius:u,innerRadius:d};p&&(s.options=g||this.resolveDataElementOptions(M,i.active?"active":n)),f+=e,this.updateElement(i,M,s,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const o=t._parsed[i];null===o||isNaN(o)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?xe*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,o,s,a,r;if(!t)for(n=0,o=i.data.datasets.length;n<o;++n)if(i.isDatasetVisible(n)){s=i.getDatasetMeta(n),t=s.data,a=s.controller;break}if(!t)return 0;for(n=0,o=t.length;n<o;++n)r=a.resolveDataElementOptions(n),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(ie(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Mt(Mo,"id","doughnut"),Mt(Mo,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),Mt(Mo,"descriptors",{_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),Mt(Mo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map(((e,o)=>{const s=t.getDatasetMeta(0).controller.getStyle(o);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,fontColor:n,lineWidth:s.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class fo extends no{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:o}=e,s=this.chart._animationsDisabled;let{start:a,count:r}=Qe(e,n,s);this._drawStart=a,this._drawCount=r,ti(e)&&(a=0,r=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(n,a,r,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:a,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,n),d=s.axis,u=a.axis,{spanGaps:g,segment:p}=this.options,M=Ie(g)?g:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||o||"none"===n,A=e+i,m=t.length;let b=e>0&&this.getParsed(e-1);for(let i=0;i<m;++i){const g=t[i],m=f?g:{};if(i<e||i>=A){m.skip=!0;continue}const x=this.getParsed(i),v=Gt(x[u]),_=m[d]=s.getPixelForValue(x[d],i),y=m[u]=o||v?a.getBasePixel():a.getPixelForValue(r?this.applyStack(a,x,r):x[u],i);m.skip=isNaN(_)||isNaN(y)||v,m.stop=i>0&&Math.abs(x[d]-b[d])>M,p&&(m.parsed=x,m.raw=l.data[i]),c&&(m.options=h||this.resolveDataElementOptions(i,g.active?"active":n)),f||this.updateElement(g,i,m,n),b=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Mt(fo,"id","line"),Mt(fo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Mt(fo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ao extends no{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,i,n){return an.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),s=(o-Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,i,n){const o="reset"===n,s=this.chart,a=s.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,h=r.yCenter,c=r.getIndexAngle(0)-.5*be;let d,u=c;const g=360/this.countVisibleElements();for(d=0;d<e;++d)u+=this._computeAngle(d,n,g);for(d=e;d<e+i;d++){const e=t[d];let i=u,p=u+this._computeAngle(d,n,g),M=s.getDataVisibility(d)?r.getDistanceFromCenterForValue(this.getParsed(d).r):0;u=p,o&&(a.animateScale&&(M=0),a.animateRotate&&(i=p=c));const f={x:l,y:h,innerRadius:0,outerRadius:M,startAngle:i,endAngle:p,options:this.resolveDataElementOptions(d,e.active?"active":n)};this.updateElement(e,d,f,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Pe(this.resolveDataElementOptions(t,e).angle||i):0}}Mt(Ao,"id","polarArea"),Mt(Ao,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Mt(Ao,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map(((e,o)=>{const s=t.getDatasetMeta(0).controller.getStyle(o);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,fontColor:n,lineWidth:s.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}}))}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}}});class mo extends Mo{}Mt(mo,"id","pie"),Mt(mo,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class bo extends no{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return an.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===n.length,options:e};this.updateElement(i,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a<e+i;a++){const e=t[a],i=this.resolveDataElementOptions(a,e.active?"active":n),r=o.getPointPositionForValue(a,this.getParsed(a).r),l=s?o.xCenter:r.x,h=s?o.yCenter:r.y,c={x:l,y:h,angle:r.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,a,c,n)}}}Mt(bo,"id","radar"),Mt(bo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),Mt(bo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class xo extends no{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:o}=e,s=this.getParsed(t),a=n.getLabelForValue(s.x),r=o.getLabelForValue(s.y);return{label:i[t]||"",value:"("+a+", "+r+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:o,count:s}=Qe(e,i,n);if(this._drawStart=o,this._drawCount=s,ti(e)&&(o=0,s=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:s}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const a=this.resolveDatasetElementOptions(t);a.segment=this.options.segment,this.updateElement(o,void 0,{animated:!n,options:a},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,o,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:a,_stacked:r,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),c=this.getSharedOptions(h),d=this.includeOptions(n,c),u=s.axis,g=a.axis,{spanGaps:p,segment:M}=this.options,f=Ie(p)?p:Number.POSITIVE_INFINITY,A=this.chart._animationsDisabled||o||"none"===n;let m=e>0&&this.getParsed(e-1);for(let h=e;h<e+i;++h){const e=t[h],i=this.getParsed(h),p=A?e:{},b=Gt(i[g]),x=p[u]=s.getPixelForValue(i[u],h),v=p[g]=o||b?a.getBasePixel():a.getPixelForValue(r?this.applyStack(a,i,r):i[g],h);p.skip=isNaN(x)||isNaN(v)||b,p.stop=h>0&&Math.abs(i[u]-m[u])>f,M&&(p.parsed=i,p.raw=l.data[h]),d&&(p.options=c||this.resolveDataElementOptions(h,e.active?"active":n)),A||this.updateElement(e,h,p,n),m=i}this.updateSharedOptions(c,n,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const o=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,s)/2}}Mt(xo,"id","scatter"),Mt(xo,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Mt(xo,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var vo=Object.freeze({__proto__:null,BarController:go,BubbleController:po,DoughnutController:Mo,LineController:fo,PieController:mo,PolarAreaController:Ao,RadarController:bo,ScatterController:xo});function _o(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class yo{static override(t){Object.assign(yo.prototype,t)}constructor(t){Mt(this,"options",void 0),this.options=t||{}}init(){}formats(){return _o()}parse(){return _o()}format(){return _o()}add(){return _o()}diff(){return _o()}startOf(){return _o()}endOf(){return _o()}}var So=yo;function Co(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&a&&s.length){const t=r._reversePixels?Ue:je;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function Do(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:r}=s[t],{lo:l,hi:h}=Co(s[t],e,a,o);for(let t=l;t<=h;++t){const e=r[t];e.skip||n(e,i,t)}}}function wo(t,e,i,n,o){const s=[];if(!o&&!t.isPointInArea(e))return s;return Do(t,i,e,(function(i,a,r){(o||Di(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&s.push({element:i,datasetIndex:a,index:r})}),!0),s}function Lo(t,e,i,n,o,s){let a=[];const r=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let l=Number.POSITIVE_INFINITY;return Do(t,i,e,(function(i,h,c){const d=i.inRange(e.x,e.y,o);if(n&&!d)return;const u=i.getCenterPoint(o);if(!(!!s||t.isPointInArea(u))&&!d)return;const g=r(e,u);g<l?(a=[{element:i,datasetIndex:h,index:c}],l=g):g===l&&a.push({element:i,datasetIndex:h,index:c})})),a}function Ro(t,e,i,n,o,s){return s||t.isPointInArea(e)?"r"!==i||n?Lo(t,e,i,n,o,s):function(t,e,i,n){let o=[];return Do(t,i,e,(function(t,i,s){const{startAngle:a,endAngle:r}=t.getProps(["startAngle","endAngle"],n),{angle:l}=Te(t,{x:e.x,y:e.y});Ne(l,a,r)&&o.push({element:t,datasetIndex:i,index:s})})),o}(t,e,i,o):[]}function ko(t,e,i,n,o){const s=[],a="x"===i?"inXRange":"inYRange";let r=!1;return Do(t,i,e,((t,n,l)=>{t[a]&&t[a](e[i],o)&&(s.push({element:t,datasetIndex:n,index:l}),r=r||t.inRange(e.x,e.y,o))})),n&&!r?[]:s}var Io={evaluateInteractionItems:Do,modes:{index(t,e,i,n){const o=vn(e,t),s=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?wo(t,o,s,n,a):Ro(t,o,s,!1,n,a),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,n){const o=vn(e,t),s=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?wo(t,o,s,n,a):Ro(t,o,s,!1,n,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;t<i.length;++t)r.push({element:i[t],datasetIndex:e,index:t})}return r},point:(t,e,i,n)=>wo(t,vn(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const o=vn(e,t),s=i.axis||"xy",a=i.includeInvisible||!1;return Ro(t,o,s,i.intersect,n,a)},x:(t,e,i,n)=>ko(t,vn(e,t),"x",i.intersect,n),y:(t,e,i,n)=>ko(t,vn(e,t),"y",i.intersect,n)}};const Ho=["left","top","right","bottom"];function Po(t,e){return t.filter((t=>t.pos===e))}function Oo(t,e){return t.filter((t=>-1===Ho.indexOf(t.pos)&&t.box.axis===e))}function Eo(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function To(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:o}=i;if(!t||!Ho.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let s,a,r;for(s=0,a=t.length;s<a;++s){r=t[s];const{fullSize:a}=r.box,l=i[r.stack],h=l&&r.stackWeight/l.weight;r.horizontal?(r.width=h?h*n:a&&e.availableWidth,r.height=o):(r.width=n,r.height=h?h*o:a&&e.availableHeight)}return i}function zo(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function $o(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 Fo(t,e,i,n){const{pos:o,box:s}=i,a=t.maxPadding;if(!Qt(o)){i.size&&(t[o]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[o]+=i.size}s.getPadding&&$o(a,s.getPadding());const r=Math.max(0,e.outerWidth-zo(a,t,"left","right")),l=Math.max(0,e.outerHeight-zo(a,t,"top","bottom")),h=r!==t.w,c=l!==t.h;return t.w=r,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function No(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Vo(t,e,i,n){const o=[];let s,a,r,l,h,c;for(s=0,a=t.length,h=0;s<a;++s){r=t[s],l=r.box,l.update(r.width||e.w,r.height||e.h,No(r.horizontal,e));const{same:a,other:d}=Fo(e,i,r,n);h|=a&&o.length,c=c||d,l.fullSize||o.push(r)}return h&&Vo(o,e,i,n)||c}function Bo(t,e,i,n,o){t.top=i,t.left=e,t.right=e+n,t.bottom=i+o,t.width=n,t.height=o}function Wo(t,e,i,n){const o=i.padding;let{x:s,y:a}=e;for(const r of t){const t=r.box,l=n[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/l.weight||1;if(r.horizontal){const n=e.w*h,s=l.size||t.height;fe(l.start)&&(a=l.start),t.fullSize?Bo(t,o.left,a,i.outerWidth-o.right-o.left,s):Bo(t,e.left+l.placed,a,n,s),l.start=a,l.placed+=n,a=t.bottom}else{const n=e.h*h,a=l.size||t.width;fe(l.start)&&(s=l.start),t.fullSize?Bo(t,s,o.top,a,i.outerHeight-o.bottom-o.top):Bo(t,s,e.top+l.placed,a,n),l.start=s,l.placed+=n,s=t.right}}e.x=s,e.y=a}var jo={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){const 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,n){if(!t)return;const o=Bi(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(i-o.height,0),r=function(t){const e=function(t){const e=[];let i,n,o,s,a,r;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],({position:s,options:{stack:a,stackWeight:r=1}}=o),e.push({index:i,box:o,pos:s,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&s+a,stackWeight:r});return e}(t),i=Eo(e.filter((t=>t.box.fullSize)),!0),n=Eo(Po(e,"left"),!0),o=Eo(Po(e,"right")),s=Eo(Po(e,"top"),!0),a=Eo(Po(e,"bottom")),r=Oo(e,"x"),l=Oo(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:Po(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,h=r.horizontal;se(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/c,hBoxMaxHeight:a/2}),u=Object.assign({},o);$o(u,Bi(n));const g=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o),p=To(l.concat(h),d);Vo(r.fullSize,g,d,p),Vo(l,g,d,p),Vo(h,g,d,p)&&Vo(l,g,d,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(g),Wo(r.leftAndTop,g,d,p),g.x+=g.w,g.y+=g.h,Wo(r.rightAndBottom,g,d,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},se(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class Uo{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Yo extends Uo{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Xo="$chartjs",qo={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ko=t=>null===t||""===t;const Zo=!!Cn&&{passive:!0};function Go(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,Zo)}function Jo(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Qo(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Jo(i.addedNodes,n),e=e&&!Jo(i.removedNodes,n);e&&i()}));return o.observe(document,{childList:!0,subtree:!0}),o}function ts(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Jo(i.removedNodes,n),e=e&&!Jo(i.addedNodes,n);e&&i()}));return o.observe(document,{childList:!0,subtree:!0}),o}const es=new Map;let is=0;function ns(){const t=window.devicePixelRatio;t!==is&&(is=t,es.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function os(t,e,i){const n=t.canvas,o=n&&Mn(n);if(!o)return;const s=Ze(((t,e)=>{const n=o.clientWidth;i(t,e),n<o.clientWidth&&i()}),window),a=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||s(i,n)}));return a.observe(o),function(t,e){es.size||window.addEventListener("resize",ns),es.set(t,e)}(t,s),a}function ss(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){es.delete(t),es.size||window.removeEventListener("resize",ns)}(t)}function as(t,e,i){const n=t.canvas,o=Ze((e=>{null!==t.ctx&&i(function(t,e){const i=qo[t.type]||t.type,{x:n,y:o}=vn(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,Zo)}(n,e,o),o}class rs extends Uo{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[Xo]={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ko(o)){const e=Dn(t,"width");void 0!==e&&(t.width=e)}if(Ko(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Dn(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Xo])return!1;const i=e[Xo].initial;["height","width"].forEach((t=>{const n=i[t];Gt(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[Xo],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:Qo,detach:ts,resize:os}[e]||as;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:ss,detach:ss,resize:ss}[e]||Go)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return yn(t,e,i,n)}isAttached(t){const e=t&&Mn(t);return!(!e||!e.isConnected)}}class ls{constructor(){Mt(this,"x",void 0),Mt(this,"y",void 0),Mt(this,"active",!1),Mt(this,"options",void 0),Mt(this,"$animations",void 0)}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Ie(this.x)&&Ie(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}function hs(t,e){const i=t.options.ticks,n=function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=Math.min(i.maxTicksLimit||n,n),s=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],a=s.length,r=s[0],l=s[a-1],h=[];if(a>o)return function(t,e,i,n){let o,s=0,a=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===a&&(e.push(t[o]),s++,a=i[s*n])}(e,h,s,a/o),h;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(s,e,o);if(a>0){let t,i;const n=a>1?Math.round((l-r)/(a-1)):null;for(cs(e,h,c,Gt(n)?0:r-n,r),t=0,i=a-1;t<i;t++)cs(e,h,c,s[t],s[t+1]);return cs(e,h,c,l,Gt(n)?e.length:l+n),h}return cs(e,h,c),h}function cs(t,e,i,n,o){const s=ie(n,0),a=Math.min(ie(o,t.length),t.length);let r,l,h,c=0;for(i=Math.ceil(i),o&&(r=o-n,i=r/Math.floor(r/i)),h=s;h<0;)c++,h=Math.round(s+c*i);for(l=Math.max(s,0);l<a;l++)l===h&&(e.push(t[l]),c++,h=Math.round(s+c*i))}Mt(ls,"defaults",{}),Mt(ls,"defaultRoutes",void 0);const ds=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,us=(t,e)=>Math.min(e||t,t);function gs(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function ps(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,a=t._endPixel,r=1e-6;let l,h=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(h-s,a-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(o-1))/2,h+=o<e?l:-l,h<s-r||h>a+r)))return h}function Ms(t){return t.drawTicks?t.tickLength:0}function fs(t,e){if(!t.display)return 0;const i=Wi(t.font,e),n=Bi(t.padding);return(Jt(t.text)?t.text.length:1)*i.lineHeight+n.height}function As(t,e,i){let n=Ge(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class ms extends ls{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(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)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=ee(t,Number.POSITIVE_INFINITY),e=ee(e,Number.NEGATIVE_INFINITY),i=ee(i,Number.POSITIVE_INFINITY),n=ee(n,Number.NEGATIVE_INFINITY),{min:ee(t,i),max:ee(e,n),minDefined:te(t),maxDefined:te(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:o,maxDefined:s}=this.getUserBounds();if(o&&s)return{min:i,max:n};const a=this.getMatchingVisibleMetas();for(let r=0,l=a.length;r<l;++r)e=a[r].controller.getMinMax(this,t),o||(i=Math.min(i,e.min)),s||(n=Math.max(n,e.max));return i=s&&i>n?n:i,n=o&&i>n?i:n,{min:ee(i,ee(n,i)),max:ee(n,ee(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){oe(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:s}=this.options,a=s.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){const{min:n,max:o}=t,s=ne(e,(o-n)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(n,-Math.abs(s)),max:a(o,s)}}(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a<this.ticks.length;this._convertTicksToLabels(r?gs(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=hs(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){oe(this.options.afterUpdate,[this])}beforeSetDimensions(){oe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){oe(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),oe(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){oe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,o;for(i=0,n=t.length;i<n;i++)o=t[i],o.label=oe(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){oe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){oe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=us(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let s,a,r,l=n;if(!this._isVisible()||!e.display||n>=o||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=Ve(this.chart.width-c,0,this.maxWidth);s=t.offset?this.maxWidth/i:u/(i-1),c+6>s&&(s=u/(i-(t.offset?.5:1)),a=this.maxHeight-Ms(t.grid)-e.padding-fs(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=Oe(Math.min(Math.asin(Ve((h.highest.height+6)/s,-1,1)),Math.asin(Ve(a/r,-1,1))-Math.asin(Ve(d/r,-1,1)))),l=Math.max(n,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){oe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){oe(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const s=fs(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ms(o)+s):(t.height=this.maxHeight,t.width=Ms(o)+s),i.display&&this.ticks.length){const{first:e,last:n,widest:o,highest:s}=this._getLabelSizes(),r=2*i.padding,l=Pe(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*o.width+h*s.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:h*o.width+c*s.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,n,c,h)}}this._handleMargins(),a?(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,n){const{ticks:{align:o,padding:s},position:a}=this.options,r=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=n*t.width,d=i*e.height):(c=i*t.height,d=n*e.width):"start"===o?d=e.width:"end"===o?c=t.width:"inner"!==o&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+s)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-h+s)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===o?(i=0,n=t.height):"end"===o&&(i=e.height,n=0),this.paddingTop=i+s,this.paddingBottom=n+s}}_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(){oe(this.options.afterFit,[this])}isHorizontal(){const{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<i;e++)Gt(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=gs(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:n,_longestTextCache:o}=this,s=[],a=[],r=Math.floor(e/us(e,i));let l,h,c,d,u,g,p,M,f,A,m,b=0,x=0;for(l=0;l<e;l+=r){if(d=t[l].label,u=this._resolveTickFontOptions(l),n.font=g=u.string,p=o[g]=o[g]||{data:{},gc:[]},M=u.lineHeight,f=A=0,Gt(d)||Jt(d)){if(Jt(d))for(h=0,c=d.length;h<c;++h)m=d[h],Gt(m)||Jt(m)||(f=xi(n,p.data,p.gc,f,m),A+=M)}else f=xi(n,p.data,p.gc,f,d),A=M;s.push(f),a.push(A),b=Math.max(f,b),x=Math.max(A,x)}!function(t,e){se(t,(t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}}))}(o,e);const v=s.indexOf(b),_=a.indexOf(x),y=t=>({width:s[t]||0,height:a[t]||0});return{first:y(0),last:y(e-1),widest:y(v),highest:y(_),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Ve(this._alignToPixels?_i(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return Ui(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=Ui(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Pe(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,r=o?o.highest.height+s:0;return this.isHorizontal()?r*i>a*n?a/i:r/n:r*n<a*i?r/i:a/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:s,border:a}=n,r=o.offset,l=this.isHorizontal(),h=this.ticks.length+(r?1:0),c=Ms(o),d=[],u=a.setContext(this.getContext()),g=u.display?u.width:0,p=g/2,M=function(t){return _i(i,t,g)};let f,A,m,b,x,v,_,y,S,C,D,w;if("top"===s)f=M(this.bottom),v=this.bottom-c,y=f-p,C=M(t.top)+p,w=t.bottom;else if("bottom"===s)f=M(this.top),C=t.top,w=M(t.bottom)-p,v=f+p,y=this.top+c;else if("left"===s)f=M(this.right),x=this.right-c,_=f-p,S=M(t.left)+p,D=t.right;else if("right"===s)f=M(this.left),S=t.left,D=M(t.right)-p,x=f+p,_=this.left+c;else if("x"===e){if("center"===s)f=M((t.top+t.bottom)/2+.5);else if(Qt(s)){const t=Object.keys(s)[0],e=s[t];f=M(this.chart.scales[t].getPixelForValue(e))}C=t.top,w=t.bottom,v=f+p,y=v+c}else if("y"===e){if("center"===s)f=M((t.left+t.right)/2);else if(Qt(s)){const t=Object.keys(s)[0],e=s[t];f=M(this.chart.scales[t].getPixelForValue(e))}x=f-p,_=x-c,S=t.left,D=t.right}const L=ie(n.ticks.maxTicksLimit,h),R=Math.max(1,Math.ceil(h/L));for(A=0;A<h;A+=R){const t=this.getContext(A),e=o.setContext(t),n=a.setContext(t),s=e.lineWidth,h=e.color,c=n.dash||[],u=n.dashOffset,g=e.tickWidth,p=e.tickColor,M=e.tickBorderDash||[],f=e.tickBorderDashOffset;m=ps(this,A,r),void 0!==m&&(b=_i(i,m,s),l?x=_=S=D=b:v=y=C=w=b,d.push({tx1:x,ty1:v,tx2:_,ty2:y,x1:S,y1:C,x2:D,y2:w,width:s,color:h,borderDash:c,borderDashOffset:u,tickWidth:g,tickColor:p,tickBorderDash:M,tickBorderDashOffset:f}))}return this._ticksLength=h,this._borderValue=f,d}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:o}=i,s=this.isHorizontal(),a=this.ticks,{align:r,crossAlign:l,padding:h,mirror:c}=o,d=Ms(i.grid),u=d+h,g=c?-h:u,p=-Pe(this.labelRotation),M=[];let f,A,m,b,x,v,_,y,S,C,D,w,L="middle";if("top"===n)v=this.bottom-g,_=this._getXAxisLabelAlignment();else if("bottom"===n)v=this.top+g,_=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(d);_=t.textAlign,x=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(d);_=t.textAlign,x=t.x}else if("x"===e){if("center"===n)v=(t.top+t.bottom)/2+u;else if(Qt(n)){const t=Object.keys(n)[0],e=n[t];v=this.chart.scales[t].getPixelForValue(e)+u}_=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)x=(t.left+t.right)/2-u;else if(Qt(n)){const t=Object.keys(n)[0],e=n[t];x=this.chart.scales[t].getPixelForValue(e)}_=this._getYAxisLabelAlignment(d).textAlign}"y"===e&&("start"===r?L="top":"end"===r&&(L="bottom"));const R=this._getLabelSizes();for(f=0,A=a.length;f<A;++f){m=a[f],b=m.label;const t=o.setContext(this.getContext(f));y=this.getPixelForTick(f)+o.labelOffset,S=this._resolveTickFontOptions(f),C=S.lineHeight,D=Jt(b)?b.length:1;const e=D/2,i=t.color,r=t.textStrokeColor,h=t.textStrokeWidth;let d,u=_;if(s?(x=y,"inner"===_&&(u=f===A-1?this.options.reverse?"left":"right":0===f?this.options.reverse?"right":"left":"center"),w="top"===n?"near"===l||0!==p?-D*C+C/2:"center"===l?-R.highest.height/2-e*C+C:-R.highest.height+C/2:"near"===l||0!==p?C/2:"center"===l?R.highest.height/2-e*C:R.highest.height-D*C,c&&(w*=-1),0===p||t.showLabelBackdrop||(x+=C/2*Math.sin(p))):(v=y,w=(1-D)*C/2),t.showLabelBackdrop){const e=Bi(t.backdropPadding),i=R.heights[f],n=R.widths[f];let o=w-e.top,s=0-e.left;switch(L){case"middle":o-=i/2;break;case"bottom":o-=i}switch(_){case"center":s-=n/2;break;case"right":s-=n;break;case"inner":f===A-1?s-=n:f>0&&(s-=n/2)}d={left:s,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}M.push({label:b,font:S,textOffset:w,options:{rotation:p,color:i,strokeColor:r,strokeWidth:h,textAlign:u,textBaseline:L,translation:[x,v],backdrop:d}})}return M}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Pe(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:o}}=this.options,s=t+o,a=this._getLabelSizes().widest.width;let r,l;return"left"===e?n?(l=this.right+o,"near"===i?r="left":"center"===i?(r="center",l+=a/2):(r="right",l+=a)):(l=this.right-s,"near"===i?r="right":"center"===i?(r="center",l-=a/2):(r="left",l=this.left)):"right"===e?n?(l=this.left+o,"near"===i?r="right":"center"===i?(r="center",l-=a/2):(r="left",l-=a)):(l=this.left+s,"near"===i?r="left":"center"===i?(r="center",l+=a/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(o=0,s=n.length;o<s;++o){const t=n[o];e.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:n}}=this,o=i.setContext(this.getContext()),s=i.display?o.width:0;if(!s)return;const a=n.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,h,c,d;this.isHorizontal()?(l=_i(t,this.left,s)-s/2,h=_i(t,this.right,a)+a/2,c=d=r):(c=_i(t,this.top,s)-s/2,d=_i(t,this.bottom,a)+a/2,l=h=r),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(l,c),e.lineTo(h,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&wi(e,i);const n=this.getLabelItems(t);for(const t of n){const i=t.options,n=t.font;Pi(e,t.label,0,t.textOffset,n,i)}i&&Li(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const o=Wi(i.font),s=Bi(i.padding),a=i.align;let r=o.lineHeight/2;"bottom"===e||"center"===e||Qt(e)?(r+=s.bottom,Jt(i.text)&&(r+=o.lineHeight*(i.text.length-1))):r+=s.top;const{titleX:l,titleY:h,maxWidth:c,rotation:d}=function(t,e,i,n){const{top:o,left:s,bottom:a,right:r,chart:l}=t,{chartArea:h,scales:c}=l;let d,u,g,p=0;const M=a-o,f=r-s;if(t.isHorizontal()){if(u=Je(n,s,r),Qt(i)){const t=Object.keys(i)[0],n=i[t];g=c[t].getPixelForValue(n)+M-e}else g="center"===i?(h.bottom+h.top)/2+M-e:ds(t,i,e);d=r-s}else{if(Qt(i)){const t=Object.keys(i)[0],n=i[t];u=c[t].getPixelForValue(n)-f+e}else u="center"===i?(h.left+h.right)/2-f+e:ds(t,i,e);g=Je(n,a,o),p="left"===i?-Se:Se}return{titleX:u,titleY:g,maxWidth:d,rotation:p}}(this,r,e,a);Pi(t,i.text,0,0,o,{color:i.color,maxWidth:c,rotation:d,textAlign:As(a,e,n),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=ie(t.grid&&t.grid.z,-1),n=ie(t.border&&t.border.z,0);return this._isVisible()&&this.draw===ms.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let o,s;for(o=0,s=e.length;o<s;++o){const s=e[o];s[i]!==this.id||t&&s.type!==t||n.push(s)}return n}_resolveTickFontOptions(t){return Wi(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class bs{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,function(t,e,i){const n=ce(Object.create(null),[i?bi.get(i):{},bi.get(e),t.defaults]);bi.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");bi.route(s,o,l,r)}))}(e,t.defaultRoutes);t.descriptors&&bi.describe(e,t.descriptors)}(t,s,i),this.override&&bi.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in bi[n]&&(delete bi[n][i],this.override&&delete pi[i])}}class xs{constructor(){this.controllers=new bs(no,"datasets",!0),this.elements=new bs(ls,"elements"),this.plugins=new bs(Object,"plugins"),this.scales=new bs(ms,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e)}remove(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e)}addControllers(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.controllers)}addElements(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.elements)}addPlugins(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.plugins)}addScales(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,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(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.controllers)}removeElements(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.elements)}removePlugins(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.plugins)}removeScales(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):se(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=Me(t);oe(i["before"+n],[],i),e[t](i),oe(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var vs=new xs;class _s{constructor(){this._init=[]}notify(t,e,i,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),s=this._notify(o,t,e,i);return"afterDestroy"===e&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===oe(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){Gt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=ie(i.options&&i.options.plugins,{}),o=function(t){const e={},i=[],n=Object.keys(vs.plugins.items);for(let t=0;t<n.length;t++)i.push(vs.getPlugin(n[t]));const o=t.plugins||[];for(let t=0;t<o.length;t++){const n=o[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,e,i,n){let{plugins:o,localIds:s}=e;const a=[],r=t.getContext();for(const e of o){const o=e.id,l=ys(i[o],n);null!==l&&a.push({plugin:e,options:Ss(t.config,{plugin:e,local:s[o]},l,r)})}return a}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function ys(t,e){return e||!1!==t?!0===t?{}:t:null}function Ss(t,e,i,n){let{plugin:o,local:s}=e;const a=t.pluginScopeKeys(o),r=t.getOptionScopes(i,a);return s&&o.defaults&&r.push(o.defaults),t.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Cs(t,e){const i=bi.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ds(t){if("x"===t||"y"===t||"r"===t)return t}function ws(t){if(Ds(t))return t;for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];for(const e of i){const i=e.axis||("top"===(o=e.position)||"bottom"===o?"x":"left"===o||"right"===o?"y":void 0)||t.length>1&&Ds(t[0].toLowerCase());if(i)return i}var o;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Ls(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Rs(t,e){const i=pi[t.type]||{scales:{}},n=e.scales||{},o=Cs(t.type,e),s=Object.create(null);return Object.keys(n).forEach((e=>{const a=n[e];if(!Qt(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=ws(e,a,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Ls(t,"x",i[0])||Ls(t,"y",i[0])}return{}}(e,t),bi.scales[a.type]),l=function(t,e){return t===e?"_index_":"_value_"}(r,o),h=i.scales||{};s[e]=de(Object.create(null),[{axis:r},a,h[r],h[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,a=i.indexAxis||Cs(o,e),r=(pi[o]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),o=i[e+"AxisID"]||e;s[o]=s[o]||Object.create(null),de(s[o],[{axis:e},n[o],r[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];de(e,[bi.scales[e.type],bi.scale])})),s}function ks(t){const e=t.options||(t.options={});e.plugins=ie(e.plugins,{}),e.scales=Rs(t,e)}function Is(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Hs=new Map,Ps=new Set;function Os(t,e){let i=Hs.get(t);return i||(i=e(),Hs.set(t,i),Ps.add(i)),i}const Es=(t,e,i)=>{const n=pe(e,i);void 0!==n&&t.add(n)};class Ts{constructor(t){this._config=function(t){return(t=t||{}).data=Is(t.data),ks(t),t}(t),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=Is(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ks(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Os(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Os(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Os(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Os(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Es(r,t,e)))),e.forEach((t=>Es(r,n,t))),e.forEach((t=>Es(r,pi[o]||{},t))),e.forEach((t=>Es(r,bi,t))),e.forEach((t=>Es(r,Mi,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Ps.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,pi[e]||{},bi.datasets[e]||{},{type:e},bi,Mi]}resolveNamedOptions(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""];const o={$shared:!0},{resolver:s,subPrefixes:a}=zs(this._resolverCache,t,n);let r=s;if(function(t,e){const{isScriptable:i,isIndexable:n}=qi(t);for(const o of e){const e=i(o),s=n(o),a=(s||e)&&t[o];if(e&&(Ae(a)||$s(a))||s&&Jt(a))return!0}return!1}(s,e)){o.$shared=!1;r=Xi(s,i=Ae(i)?i():i,this.createResolver(t,i,a))}for(const t of e)o[t]=r[t];return o}createResolver(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],n=arguments.length>3?arguments[3]:void 0;const{resolver:o}=zs(this._resolverCache,t,i);return Qt(e)?Xi(o,e,void 0,n):o}}function zs(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);if(!s){s={resolver:Yi(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)}return s}const $s=t=>Qt(t)&&Object.getOwnPropertyNames(t).some((e=>Ae(t[e])));const Fs=["top","bottom","left","right","chartArea"];function Ns(t,e){return"top"===t||"bottom"===t||-1===Fs.indexOf(t)&&"x"===e}function Vs(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Bs(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),oe(i&&i.onComplete,[t],e)}function Ws(t){const e=t.chart,i=e.options.animation;oe(i&&i.onProgress,[t],e)}function js(t){return pn()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Us={},Ys=t=>{const e=js(t);return Object.values(Us).filter((t=>t.canvas===e)).pop()};function Xs(t,e,i){const n=Object.keys(t);for(const o of n){const n=+o;if(n>=e){const s=t[o];delete t[o],(i>0||n>e)&&(t[n+i]=s)}}}function qs(t,e,i){return t.options.clip?t[i]:e[i]}class Ks{static register(){vs.add(...arguments),Zs()}static unregister(){vs.remove(...arguments),Zs()}constructor(t,e){const i=this.config=new Ts(e),n=js(t),o=Ys(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!pn()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Yo:rs}(n)),this.platform.updateConfig(i);const a=this.platform.acquireContext(n,s.aspectRatio),r=a&&a.canvas,l=r&&r.height,h=r&&r.width;this.id=Zt(),this.ctx=a,this.canvas=r,this.width=h,this.height=l,this._options=s,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 _s,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return e?(clearTimeout(i),i=setTimeout(t,e,o)):t.apply(this,o),e}}((t=>this.update(t)),s.resizeDelay||0),this._dataChanges=[],Us[this.id]=this,a&&r?(Vn.listen(this,"complete",Bs),Vn.listen(this,"progress",Ws),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return Gt(t)?e&&o?o:n?i/n: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 vs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Sn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return yi(this.canvas,this.ctx),this}stop(){return Vn.stop(this),this}resize(t,e){Vn.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(n,t,e,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Sn(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),oe(i.onResize,[this,s],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){se(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const i=e[t],n=ws(t,i),o="r"===n,s="x"===n;return{options:i,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),se(o,(e=>{const o=e.options,s=o.id,a=ws(s,o),r=ie(o.type,e.dtype);void 0!==o.position&&Ns(o.position,a)===Ns(e.dposition)||(o.position=e.dposition),n[s]=!0;let l=null;if(s in i&&i[s].type===r)l=i[s];else{l=new(vs.getScale(r))({id:s,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(o,t)})),se(n,((t,e)=>{t||delete i[e]})),se(i,(t=>{jo.configure(this,t,t.options),jo.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Vs("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let o=this.getDatasetMeta(i);const s=n.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=s,o.indexAxis=n.indexAxis||Cs(s,this.options),o.order=n.order||0,o.index=i,o.label=""+n.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const e=vs.getController(s),{datasetElementType:n,dataElementType:a}=bi.datasets[s];Object.assign(e,{dataElementType:vs.getElement(a),datasetElementType:n&&vs.getElement(n)}),o.controller=new e(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){se(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===o.indexOf(e);e.buildOrUpdateElements(i),s=Math.max(+e.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),n||se(o,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Vs("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){se(this.scales,(t=>{jo.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);me(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:o}of e){Xs(t,n,"_removeElements"===i?-o:o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let t=1;t<e;t++)if(!me(n,i(t)))return;return Array.from(n).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;jo.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],se(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 t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Ae(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Vn.has(this)?this.attached&&!Vn.running(this)&&Vn.start(this):(this.draw(),Bs({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,o=function(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:qs(i,e,"left"),right:qs(i,e,"right"),top:qs(n,e,"top"),bottom:qs(n,e,"bottom")}:e}(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(n&&wi(e,{left:!1===i.left?0:o.left-i.left,right:!1===i.right?this.width:o.right+i.right,top:!1===i.top?0:o.top-i.top,bottom:!1===i.bottom?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&Li(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Di(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const o=Io.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>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}getContext(){return this.$context||(this.$context=Ui(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,n);fe(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(o,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Vn.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),yi(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Us[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(){return this.canvas.toDataURL(...arguments)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};se(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},o=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",s)};s=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():s()}unbindEvents(){se(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},se(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,a,r;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){s=t[a];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((t=>{let{datasetIndex:e,index:i}=t;const n=this.getDatasetMeta(e);if(!n)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:n.data[i],index:i}}));!ae(i,e)&&(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){const n=this.options.hover,o=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),s=o(e,t),a=i?t:o(t,e);s.length&&this.updateHoverStyle(s,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:o}=this,s=e,a=this._getActiveElements(t,n,i,s),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,oe(o.onHover,[t,a,this],this),r&&oe(o.onClick,[t,a,this],this));const h=!ae(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}function Zs(){return se(Ks.instances,(t=>t._plugins.invalidate()))}function Gs(t,e,i,n){const o=Fi(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const s=(i-e)/2,a=Math.min(s,n*e/2),r=t=>{const e=(i-Math.min(s,t))*n/2;return Ve(t,0,Math.min(s,e))};return{outerStart:r(o.outerStart),outerEnd:r(o.outerEnd),innerStart:Ve(o.innerStart,0,a),innerEnd:Ve(o.innerEnd,0,a)}}function Js(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Qs(t,e,i,n,o,s){const{x:a,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+n+i-h,0),u=c>0?c+n+i+h:0;let g=0;const p=o-l;if(n){const t=((c>0?c-n:0)+(d>0?d-n:0))/2;g=(p-(0!==t?p*t/(t+n):p))/2}const M=(p-Math.max(.001,p*d-i/be)/d)/2,f=l+M+g,A=o-M-g,{outerStart:m,outerEnd:b,innerStart:x,innerEnd:v}=Gs(e,u,d,A-f),_=d-m,y=d-b,S=f+m/_,C=A-b/y,D=u+x,w=u+v,L=f+x/D,R=A-v/w;if(t.beginPath(),s){const e=(S+C)/2;if(t.arc(a,r,d,S,e),t.arc(a,r,d,e,C),b>0){const e=Js(y,C,a,r);t.arc(e.x,e.y,b,C,A+Se)}const i=Js(w,A,a,r);if(t.lineTo(i.x,i.y),v>0){const e=Js(w,R,a,r);t.arc(e.x,e.y,v,A+Se,R+Math.PI)}const n=(A-v/u+(f+x/u))/2;if(t.arc(a,r,u,A-v/u,n,!0),t.arc(a,r,u,n,f+x/u,!0),x>0){const e=Js(D,L,a,r);t.arc(e.x,e.y,x,L+Math.PI,f-Se)}const o=Js(_,f,a,r);if(t.lineTo(o.x,o.y),m>0){const e=Js(_,S,a,r);t.arc(e.x,e.y,m,f-Se,S)}}else{t.moveTo(a,r);const e=Math.cos(S)*d+a,i=Math.sin(S)*d+r;t.lineTo(e,i);const n=Math.cos(C)*d+a,o=Math.sin(C)*d+r;t.lineTo(n,o)}t.closePath()}function ta(t,e,i,n,o){const{fullCircles:s,startAngle:a,circumference:r,options:l}=e,{borderWidth:h,borderJoinStyle:c,borderDash:d,borderDashOffset:u}=l,g="inner"===l.borderAlign;if(!h)return;t.setLineDash(d||[]),t.lineDashOffset=u,g?(t.lineWidth=2*h,t.lineJoin=c||"round"):(t.lineWidth=h,t.lineJoin=c||"bevel");let p=e.endAngle;if(s){Qs(t,e,i,n,p,o);for(let e=0;e<s;++e)t.stroke();isNaN(r)||(p=a+(r%xe||xe))}g&&function(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:a,outerRadius:r,innerRadius:l}=e;let h=o/r;t.beginPath(),t.arc(s,a,r,n-h,i+h),l>o?(h=o/l,t.arc(s,a,l,i+h,n-h,!0)):t.arc(s,a,o,i+Se,n-Se),t.closePath(),t.clip()}(t,e,p),s||(Qs(t,e,i,n,p,o),t.stroke())}Mt(Ks,"defaults",bi),Mt(Ks,"instances",Us),Mt(Ks,"overrides",pi),Mt(Ks,"registry",vs),Mt(Ks,"version","4.4.5"),Mt(Ks,"getChart",Ys);class ea extends ls{constructor(t){super(),Mt(this,"circumference",void 0),Mt(this,"endAngle",void 0),Mt(this,"fullCircles",void 0),Mt(this,"innerRadius",void 0),Mt(this,"outerRadius",void 0),Mt(this,"pixelMargin",void 0),Mt(this,"startAngle",void 0),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=Te(n,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,u=ie(c,r-a),g=Ne(o,a,r)&&a!==r,p=u>=xe||g,M=Be(s,l+d,h+d);return p&&M}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,h=(n+o)/2,c=(s+a+l+r)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/4,o=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>xe?Math.floor(i/xe):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*n,Math.sin(a)*n);const r=n*(1-Math.sin(Math.min(be,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,n,o){const{fullCircles:s,startAngle:a,circumference:r}=e;let l=e.endAngle;if(s){Qs(t,e,i,n,l,o);for(let e=0;e<s;++e)t.fill();isNaN(r)||(l=a+(r%xe||xe))}Qs(t,e,i,n,l,o),t.fill()}(t,this,r,o,s),ta(t,this,r,o,s),t.restore()}}function ia(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=ie(i.borderCapStyle,e.borderCapStyle),t.setLineDash(ie(i.borderDash,e.borderDash)),t.lineDashOffset=ie(i.borderDashOffset,e.borderDashOffset),t.lineJoin=ie(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ie(i.borderWidth,e.borderWidth),t.strokeStyle=ie(i.borderColor,e.borderColor)}function na(t,e,i){t.lineTo(i.x,i.y)}function oa(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=t.length,{start:o=0,end:s=n-1}=i,{start:a,end:r}=e,l=Math.max(o,a),h=Math.min(s,r),c=o<a&&s<a||o>r&&s>r;return{count:n,start:l,loop:e.loop,ilen:h<l&&!c?n+h-l:h-l}}function sa(t,e,i,n){const{points:o,options:s}=e,{count:a,start:r,loop:l,ilen:h}=oa(o,i,n),c=function(t){return t.stepped?Ri:t.tension||"monotone"===t.cubicInterpolationMode?ki:na}(s);let d,u,g,{move:p=!0,reverse:M}=n||{};for(d=0;d<=h;++d)u=o[(r+(M?h-d:d))%a],u.skip||(p?(t.moveTo(u.x,u.y),p=!1):c(t,g,u,M,s.stepped),g=u);return l&&(u=o[(r+(M?h:0))%a],c(t,g,u,M,s.stepped)),!!l}function aa(t,e,i,n){const o=e.points,{count:s,start:a,ilen:r}=oa(o,i,n),{move:l=!0,reverse:h}=n||{};let c,d,u,g,p,M,f=0,A=0;const m=t=>(a+(h?r-t:t))%s,b=()=>{g!==p&&(t.lineTo(f,p),t.lineTo(f,g),t.lineTo(f,M))};for(l&&(d=o[m(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=o[m(c)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<g?g=i:i>p&&(p=i),f=(A*f+e)/++A):(b(),t.lineTo(e,i),u=n,A=0,g=p=i),M=i}b()}function ra(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?aa:sa}Mt(ea,"id","arc"),Mt(ea,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Mt(ea,"defaultRoutes",{backgroundColor:"backgroundColor"}),Mt(ea,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t});const la="function"==typeof Path2D;function ha(t,e,i,n){la&&!e.options.segment?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),ia(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,a=ra(e);for(const r of o)ia(t,s,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class ca extends ls{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){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;gn(this._points,i,t,n,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=function(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);return zn(t,!0===n?[{start:a,end:r,loop:s}]:function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(i,a,r<a?r+o:r,!!t._fullLoop&&0===a&&r===o-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],o=this.points,s=Tn(this,{property:e,start:n,end:n});if(!s.length)return;const a=[],r=function(t){return t.stepped?Ln:t.tension||"monotone"===t.cubicInterpolationMode?Rn:wn}(i);let l,h;for(l=0,h=s.length;l<h;++l){const{start:h,end:c}=s[l],d=o[h],u=o[c];if(d===u){a.push(d);continue}const g=r(d,u,Math.abs((n-d[e])/(u[e]-d[e])),i.stepped);g[e]=t[e],a.push(g)}return 1===a.length?a[0]:a}pathSegment(t,e,i){return ra(this)(t,this,e,i)}path(t,e,i){const n=this.segments,o=ra(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const a of n)s&=o(t,this,a,{start:e,end:e+i-1});return!!s}draw(t,e,i,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),ha(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function da(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}Mt(ca,"id","line"),Mt(ca,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Mt(ca,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Mt(ca,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t});class ua extends ls{constructor(t){super(),Mt(this,"parsed",void 0),Mt(this,"skip",void 0),Mt(this,"stop",void 0),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){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return da(this,t,"x",e)}inYRange(t,e){return da(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Di(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Si(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function ga(t,e){const{x:i,y:n,base:o,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,h,c,d;return t.horizontal?(d=a/2,r=Math.min(i,o),l=Math.max(i,o),h=n-d,c=n+d):(d=s/2,r=i-d,l=i+d,h=Math.min(n,o),c=Math.max(n,o)),{left:r,top:h,right:l,bottom:c}}function pa(t,e,i,n){return t?0:Ve(e,i,n)}function Ma(t){const e=ga(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=t.borderSkipped,s=Ni(n);return{t:pa(o.top,s.top,0,i),r:pa(o.right,s.right,0,e),b:pa(o.bottom,s.bottom,0,i),l:pa(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=Vi(o),a=Math.min(e,i),r=t.borderSkipped,l=n||Qt(o);return{topLeft:pa(!l||r.top||r.left,s.topLeft,0,a),topRight:pa(!l||r.top||r.right,s.topRight,0,a),bottomLeft:pa(!l||r.bottom||r.left,s.bottomLeft,0,a),bottomRight:pa(!l||r.bottom||r.right,s.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function fa(t,e,i,n){const o=null===e,s=null===i,a=t&&!(o&&s)&&ga(t,n);return a&&(o||Be(e,a.left,a.right))&&(s||Be(i,a.top,a.bottom))}function Aa(t,e){t.rect(e.x,e.y,e.w,e.h)}function ma(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=t.x!==i.x?-e:0,o=t.y!==i.y?-e:0,s=(t.x+t.w!==i.x+i.w?e:0)-n,a=(t.y+t.h!==i.y+i.h?e:0)-o;return{x:t.x+n,y:t.y+o,w:t.w+s,h:t.h+a,radius:t.radius}}Mt(ua,"id","point"),Mt(ua,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Mt(ua,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class ba extends ls{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:o,outer:s}=Ma(this),a=(r=s.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?Oi:Aa;var r;t.save(),s.w===o.w&&s.h===o.h||(t.beginPath(),a(t,ma(s,e,o)),t.clip(),a(t,ma(o,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,ma(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return fa(this,t,e,i)}inXRange(t,e){return fa(this,t,null,e)}inYRange(t,e){return fa(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Mt(ba,"id","bar"),Mt(ba,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Mt(ba,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var xa=Object.freeze({__proto__:null,ArcElement:ea,BarElement:ba,LineElement:ca,PointElement:ua});const va=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],_a=va.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function ya(t){return va[t%va.length]}function Sa(t){return _a[t%_a.length]}function Ca(t){let e=0;return(i,n)=>{const o=t.getDatasetMeta(n).controller;o instanceof Mo?e=function(t,e){return t.backgroundColor=t.data.map((()=>ya(e++))),e}(i,e):o instanceof Ao?e=function(t,e){return t.backgroundColor=t.data.map((()=>Sa(e++))),e}(i,e):o&&(e=function(t,e){return t.borderColor=ya(e),t.backgroundColor=Sa(e),++e}(i,e))}}function Da(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var wa={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:n},options:o}=t.config,{elements:s}=o,a=Da(n)||(r=o)&&(r.borderColor||r.backgroundColor)||s&&Da(s)||"rgba(0,0,0,0.1)"!==bi.borderColor||"rgba(0,0,0,0.1)"!==bi.backgroundColor;var r;if(!i.forceOverride&&a)return;const l=Ca(t);n.forEach(l)}};function La(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Ra(t){t.data.datasets.forEach((t=>{La(t)}))}var ka={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Ra(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:a}=e,r=t.getDatasetMeta(o),l=s||e.data;if("y"===ji([a,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const h=t.scales[r.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let{start:c,count:d}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:a,max:r,minDefined:l,maxDefined:h}=s.getUserBounds();return l&&(o=Ve(je(e,s.axis,a).lo,0,i-1)),n=h?Ve(je(e,s.axis,r).hi+1,o,i)-o:i-o,{start:o,count:n}}(r,l);if(d<=(i.threshold||4*n))return void La(e);let u;switch(Gt(s)&&(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":u=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(s-2);let l=0;const h=e+i-1;let c,d,u,g,p,M=e;for(a[l++]=t[M],c=0;c<s-2;c++){let n,o=0,s=0;const h=Math.floor((c+1)*r)+1+e,f=Math.min(Math.floor((c+2)*r)+1,i)+e,A=f-h;for(n=h;n<f;n++)o+=t[n].x,s+=t[n].y;o/=A,s/=A;const m=Math.floor(c*r)+1+e,b=Math.min(Math.floor((c+1)*r)+1,i)+e,{x:x,y:v}=t[M];for(u=g=-1,n=m;n<b;n++)g=.5*Math.abs((x-o)*(t[n].y-v)-(x-t[n].x)*(s-v)),g>u&&(u=g,d=t[n],p=n);a[l++]=d,M=p}return a[l++]=t[h],a}(l,c,d,n,i);break;case"min-max":u=function(t,e,i,n){let o,s,a,r,l,h,c,d,u,g,p=0,M=0;const f=[],A=e+i-1,m=t[e].x,b=t[A].x-m;for(o=e;o<e+i;++o){s=t[o],a=(s.x-m)/b*n,r=s.y;const e=0|a;if(e===l)r<u?(u=r,h=o):r>g&&(g=r,c=o),p=(M*p+s.x)/++M;else{const i=o-1;if(!Gt(h)&&!Gt(c)){const e=Math.min(h,c),n=Math.max(h,c);e!==d&&e!==i&&f.push({...t[e],x:p}),n!==d&&n!==i&&f.push({...t[n],x:p})}o>0&&i!==d&&f.push(t[i]),f.push(s),l=e,M=0,u=g=r,h=c=d=o}}return f}(l,c,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Ra(t)}};function Ia(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=Fe(o),s=Fe(s)),{property:t,start:o,end:s}}function Ha(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Pa(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Oa(t,e){let i=[],n=!1;return Jt(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((t=>{let{start:e,end:a}=t;a=Ha(e,a,o);const r=o[e],l=o[a];null!==n?(s.push({x:r.x,y:n}),s.push({x:l.x,y:n})):null!==i&&(s.push({x:i,y:r.y}),s.push({x:i,y:l.y}))})),s}(t,e),i.length?new ca({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Ea(t){return t&&!1!==t.fill}function Ta(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!te(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function za(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=ie(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(Qt(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return te(o)&&Math.floor(o)===o?function(t,e,i,n){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=n)return!1;return i}(n[0],e,o,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function $a(t,e,i){const n=[];for(let o=0;o<i.length;o++){const s=i[o],{first:a,last:r,point:l}=Fa(s,e,"x");if(!(!l||a&&r))if(a)n.unshift(l);else if(t.push(l),!r)break}t.push(...n)}function Fa(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],s=t.segments,a=t.points;let r=!1,l=!1;for(let t=0;t<s.length;t++){const e=s[t],n=a[e.start][i],h=a[e.end][i];if(Be(o,n,h)){r=o===n,l=o===h;break}}return{first:r,last:l,point:n}}class Na{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return e=e||{start:0,end:xe},t.arc(n,o,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function Va(t){const{chart:e,fill:i,line:n}=t;if(te(i))return function(t,e){const i=t.getDatasetMeta(e),n=i&&t.isDatasetVisible(e);return n?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,o=[],s=n.segments,a=n.points,r=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t<n.length;t++){const o=n[t];if(o.index===e)break;o.hidden||i.unshift(o.dataset)}return i}(e,i);r.push(Oa({x:null,y:e.bottom},n));for(let t=0;t<s.length;t++){const e=s[t];for(let t=e.start;t<=e.end;t++)$a(o,a[t],r)}return new ca({points:o,options:{}})}(t);if("shape"===i)return!0;const o=function(t){const e=t.scale||{};if(e.getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=n.reverse?e.max:e.min,a=function(t,e,i){let n;return n="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:Qt(t)?t.value:e.getBaseValue(),n}(i,e,s),r=[];if(n.grid.circular){const t=e.getPointPositionForValue(0,s);return new Na({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(a)})}for(let t=0;t<o;++t)r.push(e.getPointPositionForValue(t,a));return r}(t);return function(t){const{scale:e={},fill:i}=t,n=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:Qt(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(te(n)){const t=e.isHorizontal();return{x:t?n:null,y:t?null:n}}return null}(t)}(t);return o instanceof Na?o:Oa(o,n)}function Ba(t,e,i){const n=Va(e),{line:o,scale:s,axis:a}=e,r=o.options,l=r.fill,h=r.backgroundColor,{above:c=h,below:d=h}=l||{};n&&o.points.length&&(wi(t,i),function(t,e){const{line:i,target:n,above:o,below:s,area:a,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==o&&(Wa(t,n,a.top),ja(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore(),t.save(),Wa(t,n,a.bottom));ja(t,{line:i,target:n,color:s,scale:r,property:l}),t.restore()}(t,{line:o,target:n,above:c,below:d,area:i,scale:s,axis:a}),Li(t))}function Wa(t,e,i){const{segments:n,points:o}=e;let s=!0,a=!1;t.beginPath();for(const r of n){const{start:n,end:l}=r,h=o[n],c=o[Ha(n,l,o)];s?(t.moveTo(h.x,h.y),s=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),a=!!e.pathSegment(t,r,{move:a}),a?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function ja(t,e){const{line:i,target:n,property:o,color:s,scale:a}=e,r=function(t,e,i){const n=t.segments,o=t.points,s=e.points,a=[];for(const t of n){let{start:n,end:r}=t;r=Ha(n,r,o);const l=Ia(i,o[n],o[r],t.loop);if(!e.segments){a.push({source:t,target:l,start:o[n],end:o[r]});continue}const h=Tn(e,l);for(const e of h){const n=Ia(i,s[e.start],s[e.end],e.loop),r=En(t,o,n);for(const t of r)a.push({source:t,target:e,start:{[i]:Pa(l,n,"start",Math.max)},end:{[i]:Pa(l,n,"end",Math.min)}})}}return a}(i,n,o);for(const{source:e,target:l,start:h,end:c}of r){const{style:{backgroundColor:r=s}={}}=e,d=!0!==n;t.save(),t.fillStyle=r,Ua(t,a,d&&Ia(o,h,c)),t.beginPath();const u=!!i.pathSegment(t,e);let g;if(d){u?t.closePath():Ya(t,n,c,o);const e=!!n.pathSegment(t,l,{move:u,reverse:!0});g=u&&e,g||Ya(t,n,h,o)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function Ua(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:a,end:r}=i||{};"x"===s&&(t.beginPath(),t.rect(a,n,r-a,o-n),t.clip())}function Ya(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}var Xa={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,o=[];let s,a,r,l;for(a=0;a<n;++a)s=t.getDatasetMeta(a),r=s.dataset,l=null,r&&r.options&&r instanceof ca&&(l={visible:t.isDatasetVisible(a),index:a,fill:za(r,a,n),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:r}),s.$filler=l,o.push(l);for(a=0;a<n;++a)l=o[a],l&&!1!==l.fill&&(l.fill=Ta(o,a,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,o=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&i.fill&&Ba(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;Ea(i)&&Ba(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;Ea(n)&&"beforeDatasetDraw"===i.drawTime&&Ba(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const qa=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class Ka extends ls{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(){const t=this.options.labels||{};let e=oe(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(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=Wi(i.font),o=n.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:r}=qa(i,o);let l,h;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(s,o,a,r)+10):(h=this.maxHeight,l=this._fitCols(s,n,a,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+a;let c=t;o.textAlign="left",o.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,g)=>{const p=i+e/2+o.measureText(t.text).width;(0===g||l[l.length-1]+p+2*a>s)&&(c+=h,l[l.length-(g>0?0:1)]=0,u+=h,d++),r[g]={left:0,top:u,row:d,width:p,height:n},l[l.length-1]+=p+a})),c}_fitCols(t,e,i,n){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=s-t;let c=a,d=0,u=0,g=0,p=0;return this.legendItems.forEach(((t,s)=>{const{itemWidth:M,itemHeight:f}=function(t,e,i,n,o){const s=function(t,e,i,n){let o=t.text;o&&"string"!=typeof o&&(o=o.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+n.measureText(o).width}(n,t,e,i),a=function(t,e,i){let n=t;"string"!=typeof e.text&&(n=Za(e,i));return n}(o,n,e.lineHeight);return{itemWidth:s,itemHeight:a}}(i,e,o,t,n);s>0&&u+f+2*a>h&&(c+=d+a,l.push({width:d,height:u}),g+=d+a,p++,d=u=0),r[s]={left:g,top:u,col:p,width:M,height:f},d=Math.max(d,M),u+=f+a})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:o}}=this,s=kn(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=Je(i,this.left+n,this.right-this.lineWidths[o]);for(const r of e)o!==r.row&&(o=r.row,a=Je(i,this.left+n,this.right-this.lineWidths[o])),r.top+=this.top+t+n,r.left=s.leftForLtr(s.x(a),r.width),a+=r.width+n}else{let o=0,a=Je(i,this.top+t+n,this.bottom-this.columnSizes[o].height);for(const r of e)r.col!==o&&(o=r.col,a=Je(i,this.top+t+n,this.bottom-this.columnSizes[o].height)),r.top=a,r.left+=this.left+n,r.left=s.leftForLtr(s.x(r.left),r.width),a+=r.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;wi(t,this),this._draw(),Li(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:o,labels:s}=t,a=bi.color,r=kn(t.rtl,this.left,this.width),l=Wi(s.font),{padding:h}=s,c=l.size,d=c/2;let u;this.drawTitle(),n.textAlign=r.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:g,boxHeight:p,itemHeight:M}=qa(s,c),f=this.isHorizontal(),A=this._computeTitleHeight();u=f?{x:Je(o,this.left+h,this.right-i[0]),y:this.top+h+A,line:0}:{x:this.left+h,y:Je(o,this.top+A+h,this.bottom-e[0].height),line:0},In(this.ctx,t.textDirection);const m=M+h;this.legendItems.forEach(((b,x)=>{n.strokeStyle=b.fontColor,n.fillStyle=b.fontColor;const v=n.measureText(b.text).width,_=r.textAlign(b.textAlign||(b.textAlign=s.textAlign)),y=g+d+v;let S=u.x,C=u.y;r.setWidth(this.width),f?x>0&&S+y+h>this.right&&(C=u.y+=m,u.line++,S=u.x=Je(o,this.left+h,this.right-i[u.line])):x>0&&C+m>this.bottom&&(S=u.x=S+e[u.line].width+h,u.line++,C=u.y=Je(o,this.top+A+h,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;n.save();const o=ie(i.lineWidth,1);if(n.fillStyle=ie(i.fillStyle,a),n.lineCap=ie(i.lineCap,"butt"),n.lineDashOffset=ie(i.lineDashOffset,0),n.lineJoin=ie(i.lineJoin,"miter"),n.lineWidth=o,n.strokeStyle=ie(i.strokeStyle,a),n.setLineDash(ie(i.lineDash,[])),s.usePointStyle){const a={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:o},l=r.xPlus(t,g/2);Ci(n,a,l,e+d,s.pointStyleWidth&&g)}else{const s=e+Math.max((c-p)/2,0),a=r.leftForLtr(t,g),l=Vi(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?Oi(n,{x:a,y:s,w:g,h:p,radius:l}):n.rect(a,s,g,p),n.fill(),0!==o&&n.stroke()}n.restore()}(r.x(S),C,b),S=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(_,S+g+d,f?S+y:this.right,t.rtl),function(t,e,i){Pi(n,i.text,t,e+M/2,l,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(S),C,b),f)u.x+=y+h;else if("string"!=typeof b.text){const t=l.lineHeight;u.y+=Za(b,t)+h}else u.y+=m})),Hn(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Wi(e.font),n=Bi(e.padding);if(!e.display)return;const o=kn(t.rtl,this.left,this.width),s=this.ctx,a=e.position,r=i.size/2,l=n.top+r;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=Je(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+Je(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=Je(a,c,c+d);s.textAlign=o.textAlign(Ge(a)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,Pi(s,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=Wi(t.font),i=Bi(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,o;if(Be(t,this.left,this.right)&&Be(e,this.top,this.bottom))for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(n=o[i],Be(t,n.left,n.left+n.width)&&Be(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const n=this._hoveredItem,o=((t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index)(n,i);n&&!o&&oe(e.onLeave,[t,n,this],this),this._hoveredItem=i,i&&!o&&oe(e.onHover,[t,i,this],this)}else i&&oe(e.onClick,[t,i,this],this)}}function Za(t,e){return e*(t.text?t.text.length:0)}var Ga={id:"legend",_element:Ka,start(t,e,i){const n=t.legend=new Ka({ctx:t.ctx,options:i,chart:t});jo.configure(t,n,i),jo.addBox(t,n)},stop(t){jo.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;jo.configure(t,n,i),n.options=i},afterUpdate(t){const 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){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s,useBorderRadius:a,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),h=Bi(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:l.borderColor,pointStyle:n||l.pointStyle,rotation:l.rotation,textAlign:o||l.textAlign,borderRadius:a&&(r||l.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)}}};class Ja extends ls{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=Jt(i.text)?i.text.length:1;this._padding=Bi(i.padding);const o=n*Wi(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:o,options:s}=this,a=s.align;let r,l,h,c=0;return this.isHorizontal()?(l=Je(a,i,o),h=e+t,r=o-i):("left"===s.position?(l=i+t,h=Je(a,n,e),c=-.5*be):(l=o-t,h=Je(a,e,n),c=.5*be),r=n-e),{titleX:l,titleY:h,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Wi(e.font),n=i.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:a,rotation:r}=this._drawArgs(n);Pi(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:r,textAlign:Ge(e.align),textBaseline:"middle",translation:[o,s]})}}var Qa={id:"title",_element:Ja,start(t,e,i){!function(t,e){const i=new Ja({ctx:t.ctx,options:e,chart:t});jo.configure(t,i,e),jo.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;jo.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;jo.configure(t,n,i),n.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}};const tr=new WeakMap;var er={id:"subtitle",start(t,e,i){const n=new Ja({ctx:t.ctx,options:i,chart:t});jo.configure(t,n,i),jo.addBox(t,n),tr.set(t,n)},stop(t){jo.removeBox(t,tr.get(t)),tr.delete(t)},beforeUpdate(t,e,i){const n=tr.get(t);jo.configure(t,n,i),n.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}};const ir={average(t){if(!t.length)return!1;let e,i,n=new Set,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n.add(t.x),o+=t.y,++s}}if(0===s||0===n.size)return!1;const a=[...n].reduce(((t,e)=>t+e))/n.size;return{x:a,y:o/s}},nearest(t,e){if(!t.length)return!1;let i,n,o,s=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=ze(e,n.getCenterPoint());t<r&&(r=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function nr(t,e){return e&&(Jt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function or(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function sr(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:a,value:r}=s.getLabelAndValue(o);return{chart:t,label:a,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:r,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function ar(t,e){const i=t.chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:a,boxHeight:r}=e,l=Wi(e.bodyFont),h=Wi(e.titleFont),c=Wi(e.footerFont),d=s.length,u=o.length,g=n.length,p=Bi(e.padding);let M=p.height,f=0,A=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(A+=t.beforeBody.length+t.afterBody.length,d&&(M+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),A){M+=g*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(A-g)*l.lineHeight+(A-1)*e.bodySpacing}u&&(M+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let m=0;const b=function(t){f=Math.max(f,i.measureText(t).width+m)};return i.save(),i.font=h.string,se(t.title,b),i.font=l.string,se(t.beforeBody.concat(t.afterBody),b),m=e.displayColors?a+2+e.boxPadding:0,se(n,(t=>{se(t.before,b),se(t.lines,b),se(t.after,b)})),m=0,i.font=c.string,se(t.footer,b),i.restore(),f+=p.width,{width:f,height:M}}function rr(t,e,i,n){const{x:o,width:s}=i,{width:a,chartArea:{left:r,right:l}}=t;let h="center";return"center"===n?h=o<=(r+l)/2?"left":"right":o<=s/2?h="left":o>=a-s/2&&(h="right"),function(t,e,i,n){const{x:o,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&o+s+a>e.width||"right"===t&&o-s-a<0||void 0}(h,t,e,i)&&(h="center"),h}function lr(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||rr(t,e,i,n),yAlign:n}}function hr(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,h=o+s,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:g}=Vi(a);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,r);const M=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,h);return"center"===l?"left"===r?p+=h:"right"===r&&(p-=h):"left"===r?p-=Math.max(c,u)+o:"right"===r&&(p+=Math.max(d,g)+o),{x:Ve(p,0,n.width-e.width),y:Ve(M,0,n.height-e.height)}}function cr(t,e,i){const n=Bi(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function dr(t){return nr([],or(t))}function ur(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const gr={beforeTitle:Kt,title(t){if(t.length>0){const 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<n)return i[e.dataIndex]}return""},afterTitle:Kt,beforeBody:Kt,beforeLabel:Kt,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return Gt(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Kt,afterBody:Kt,beforeFooter:Kt,footer:Kt,afterFooter:Kt};function pr(t,e,i,n){const o=t[e].call(i,n);return void 0===o?gr[e].call(i,n):o}class Mr extends ls{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,o=new Un(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,Ui(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=pr(i,"beforeTitle",this,t),o=pr(i,"title",this,t),s=pr(i,"afterTitle",this,t);let a=[];return a=nr(a,or(n)),a=nr(a,or(o)),a=nr(a,or(s)),a}getBeforeBody(t,e){return dr(pr(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return se(t,(t=>{const e={before:[],lines:[],after:[]},o=ur(i,t);nr(e.before,or(pr(o,"beforeLabel",this,t))),nr(e.lines,pr(o,"label",this,t)),nr(e.after,or(pr(o,"afterLabel",this,t))),n.push(e)})),n}getAfterBody(t,e){return dr(pr(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=pr(i,"beforeFooter",this,t),o=pr(i,"footer",this,t),s=pr(i,"afterFooter",this,t);let a=[];return a=nr(a,or(n)),a=nr(a,or(o)),a=nr(a,or(s)),a}_createItems(t){const e=this._active,i=this.chart.data,n=[],o=[],s=[];let a,r,l=[];for(a=0,r=e.length;a<r;++a)l.push(sr(this.chart,e[a]));return t.filter&&(l=l.filter(((e,n,o)=>t.filter(e,n,o,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),se(l,(e=>{const i=ur(t.callbacks,e);n.push(pr(i,"labelColor",this,e)),o.push(pr(i,"labelPointStyle",this,e)),s.push(pr(i,"labelTextColor",this,e))})),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let o,s=[];if(n.length){const t=ir[i.position].call(this,n,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const e=this._size=ar(this,i),a=Object.assign({},t,e),r=lr(this.chart,i,a),l=hr(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,o={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:s,cornerRadius:a}=i,{topLeft:r,topRight:l,bottomLeft:h,bottomRight:c}=Vi(a),{x:d,y:u}=t,{width:g,height:p}=e;let M,f,A,m,b,x;return"center"===o?(b=u+p/2,"left"===n?(M=d,f=M-s,m=b+s,x=b-s):(M=d+g,f=M+s,m=b-s,x=b+s),A=M):(f="left"===n?d+Math.max(r,h)+s:"right"===n?d+g-Math.max(l,c)-s:this.caretX,"top"===o?(m=u,b=m-s,M=f-s,A=f+s):(m=u+p,b=m+s,M=f+s,A=f-s),x=m),{x1:M,x2:f,x3:A,y1:m,y2:b,y3:x}}drawTitle(t,e,i){const n=this.title,o=n.length;let s,a,r;if(o){const l=kn(i.rtl,this.x,this.width);for(t.x=cr(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=Wi(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,r=0;r<o;++r)e.fillText(n[r],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,r+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,n,o){const s=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:r,boxWidth:l}=o,h=Wi(o.bodyFont),c=cr(this,"left",o),d=n.x(c),u=r<h.lineHeight?(h.lineHeight-r)/2:0,g=e.y+u;if(o.usePointStyle){const e={radius:Math.min(l,r)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},i=n.leftForLtr(d,l)+l/2,h=g+r/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Si(t,e,i,h),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Si(t,e,i,h)}else{t.lineWidth=Qt(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const e=n.leftForLtr(d,l),i=n.leftForLtr(n.xPlus(d,1),l-2),a=Vi(s.borderRadius);Object.values(a).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Oi(t,{x:e,y:g,w:l,h:r,radius:a}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Oi(t,{x:i,y:g+1,w:l-2,h:r-2,radius:a}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,g,l,r),t.strokeRect(e,g,l,r),t.fillStyle=s.backgroundColor,t.fillRect(i,g+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:r,boxWidth:l,boxPadding:h}=i,c=Wi(i.bodyFont);let d=c.lineHeight,u=0;const g=kn(i.rtl,this.x,this.width),p=function(i){e.fillText(i,g.x(t.x+u),t.y+d/2),t.y+=d+o},M=g.textAlign(s);let f,A,m,b,x,v,_;for(e.textAlign=s,e.textBaseline="middle",e.font=c.string,t.x=cr(this,M,i),e.fillStyle=i.bodyColor,se(this.beforeBody,p),u=a&&"right"!==M?"center"===s?l/2+h:l+2+h:0,b=0,v=n.length;b<v;++b){for(f=n[b],A=this.labelTextColors[b],e.fillStyle=A,se(f.before,p),m=f.lines,a&&m.length&&(this._drawColorBox(e,t,b,g,i),d=Math.max(c.lineHeight,r)),x=0,_=m.length;x<_;++x)p(m[x]),d=c.lineHeight;se(f.after,p)}u=0,d=c.lineHeight,se(this.afterBody,p),t.y-=o}drawFooter(t,e,i){const n=this.footer,o=n.length;let s,a;if(o){const r=kn(i.rtl,this.x,this.width);for(t.x=cr(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=r.textAlign(i.footerAlign),e.textBaseline="middle",s=Wi(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,a=0;a<o;++a)e.fillText(n[a],r.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:a,y:r}=t,{width:l,height:h}=i,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:g}=Vi(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+c,r),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l-d,r),e.quadraticCurveTo(a+l,r,a+l,r+d),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(a+l,r+h-g),e.quadraticCurveTo(a+l,r+h,a+l-g,r+h),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+u,r+h),e.quadraticCurveTo(a,r+h,a,r+h-u),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(a,r+c),e.quadraticCurveTo(a,r,a+c,r),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,o=i&&i.y;if(n||o){const i=ir[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=ar(this,t),a=Object.assign({},i,this._size),r=lr(e,t,a),l=hr(t,a,r,e);n._to===l.x&&o._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=Bi(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,n,e),In(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Hn(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((t=>{let{datasetIndex:e,index:i}=t;const n=this.chart.getDatasetMeta(e);if(!n)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:n.data[i],index:i}})),o=!ae(i,n),s=this._positionChanged(n,e);(o||s)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,i),a=this._positionChanged(s,t),r=e||!ae(s,o)||a;return r&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,n){const o=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const s=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=ir[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}Mt(Mr,"positioners",ir);var fr={id:"tooltip",_element:Mr,positioners:ir,afterInit(t,e,i){i&&(t.tooltip=new Mr({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){const e=t.tooltip;if(e&&e._willRender()){const 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){const 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:gr},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"]},Ar=Object.freeze({__proto__:null,Colors:wa,Decimation:ka,Filler:Xa,Legend:Ga,SubTitle:er,Title:Qa,Tooltip:fr});function mr(t,e,i,n){const o=t.indexOf(e);if(-1===o)return((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n);return o!==t.lastIndexOf(e)?i:o}function br(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class xr extends ms{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Gt(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Ve(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:mr(i,t,ie(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let o=this.getLabels();o=0===t&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){return br.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function vr(t,e){const i=[],{bounds:n,step:o,min:s,max:a,precision:r,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=t,u=o||1,g=h-1,{min:p,max:M}=e,f=!Gt(s),A=!Gt(a),m=!Gt(l),b=(M-p)/(c+1);let x,v,_,y,S=ke((M-p)/g/u)*u;if(S<1e-14&&!f&&!A)return[{value:p},{value:M}];y=Math.ceil(M/S)-Math.floor(p/S),y>g&&(S=ke(y*S/g/u)*u),Gt(r)||(x=Math.pow(10,r),S=Math.ceil(S*x)/x),"ticks"===n?(v=Math.floor(p/S)*S,_=Math.ceil(M/S)*S):(v=p,_=M),f&&A&&o&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-s)/o,S/1e3)?(y=Math.round(Math.min((a-s)/S,h)),S=(a-s)/y,v=s,_=a):m?(v=f?s:v,_=A?a:_,y=l-1,S=(_-v)/y):(y=(_-v)/S,y=Re(y,Math.round(y),S/1e3)?Math.round(y):Math.ceil(y));const C=Math.max(Ee(S),Ee(v));x=Math.pow(10,Gt(r)?C:r),v=Math.round(v*x)/x,_=Math.round(_*x)/x;let D=0;for(f&&(d&&v!==s?(i.push({value:s}),v<s&&D++,Re(Math.round((v+D*S)*x)/x,s,_r(s,b,t))&&D++):v<s&&D++);D<y;++D){const t=Math.round((v+D*S)*x)/x;if(A&&t>a)break;i.push({value:t})}return A&&d&&_!==a?i.length&&Re(i[i.length-1].value,a,_r(a,b,t))?i[i.length-1].value=a:i.push({value:a}):A&&_!==a||i.push({value:_}),i}function _r(t,e,i){let{horizontal:n,minRotation:o}=i;const s=Pe(o),a=(n?Math.sin(s):Math.cos(s))||.001,r=.75*e*(""+t).length;return Math.min(e/a,r)}Mt(xr,"id","category"),Mt(xr,"defaults",{ticks:{callback:br}});class yr extends ms{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Gt(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:o}=this;const s=t=>n=e?n:t,a=t=>o=i?o:t;if(t){const t=Le(n),e=Le(o);t<0&&e<0?a(0):t>0&&e>0&&s(0)}if(n===o){let e=0===o?1:Math.abs(.05*o);a(o+e),t||s(n-e)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=vr({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},this._range||this);return"ticks"===t.bounds&&He(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale,this.options.ticks.format)}}class Sr extends yr{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=te(t)?t:0,this.max=te(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Pe(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Mt(Sr,"id","linear"),Mt(Sr,"defaults",{ticks:{callback:gi.formatters.numeric}});const Cr=t=>Math.floor(we(t)),Dr=(t,e)=>Math.pow(10,Cr(t)+e);function wr(t){return 1===t/Math.pow(10,Cr(t))}function Lr(t,e,i){const n=Math.pow(10,i),o=Math.floor(t/n);return Math.ceil(e/n)-o}function Rr(t,e){let{min:i,max:n}=e;i=ee(t.min,i);const o=[],s=Cr(i);let a=function(t,e){let i=Cr(e-t);for(;Lr(t,e,i)>10;)i++;for(;Lr(t,e,i)<10;)i--;return Math.min(i,Cr(t))}(i,n),r=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),h=s>a?Math.pow(10,s):0,c=Math.round((i-h)*r)/r,d=Math.floor((i-h)/l/10)*l*10;let u=Math.floor((c-d)/Math.pow(10,a)),g=ee(t.min,Math.round((h+d+u*Math.pow(10,a))*r)/r);for(;g<n;)o.push({value:g,major:wr(g),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(a++,u=2,r=a>=0?1:r),g=Math.round((h+d+u*Math.pow(10,a))*r)/r;const p=ee(t.max,g);return o.push({value:p,major:wr(p),significand:u}),o}class kr extends ms{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=yr.prototype.parse.apply(this,[t,e]);if(0!==i)return te(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=te(t)?Math.max(0,t):null,this.max=te(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!te(this._userMin)&&(this.min=t===Dr(this.min,0)?Dr(this.min,-1):Dr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const o=e=>i=t?i:e,s=t=>n=e?n:t;i===n&&(i<=0?(o(1),s(10)):(o(Dr(i,-1)),s(Dr(n,1)))),i<=0&&o(Dr(n,-1)),n<=0&&s(Dr(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=Rr({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&He(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":di(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=we(t),this._valueRange=we(this.max)-we(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(we(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Ir(t){const e=t.ticks;if(e.display&&t.display){const t=Bi(e.backdropPadding);return ie(e.font&&e.font.size,bi.font.size)+t.height}return 0}function Hr(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Pr(t){const 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),n=[],o=[],s=t._pointLabels.length,a=t.options.pointLabels,r=a.centerPointLabels?be/s:0;for(let d=0;d<s;d++){const s=a.setContext(t.getPointLabelContext(d));o[d]=s.padding;const u=t.getPointPosition(d,t.drawingArea+o[d],r),g=Wi(s.font),p=(l=t.ctx,h=g,c=Jt(c=t._pointLabels[d])?c:[c],{w:vi(l,h.string,c),h:c.length*h.lineHeight});n[d]=p;const M=Fe(t.getIndexAngle(d)+r),f=Math.round(Oe(M));Or(i,e,M,Hr(f,u.x,p.w,0,180),Hr(f,u.y,p.h,90,270))}var l,h,c;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const n=[],o=t._pointLabels.length,s=t.options,{centerPointLabels:a,display:r}=s.pointLabels,l={extra:Ir(s)/2,additionalAngle:a?be/o:0};let h;for(let s=0;s<o;s++){l.padding=i[s],l.size=e[s];const o=Er(t,s,l);n.push(o),"auto"===r&&(o.visible=Tr(o,h),o.visible&&(h=o))}return n}(t,n,o)}function Or(t,e,i,n,o){const s=Math.abs(Math.sin(i)),a=Math.abs(Math.cos(i));let r=0,l=0;n.start<e.l?(r=(e.l-n.start)/s,t.l=Math.min(t.l,e.l-r)):n.end>e.r&&(r=(n.end-e.r)/s,t.r=Math.max(t.r,e.r+r)),o.start<e.t?(l=(e.t-o.start)/a,t.t=Math.min(t.t,e.t-l)):o.end>e.b&&(l=(o.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function Er(t,e,i){const n=t.drawingArea,{extra:o,additionalAngle:s,padding:a,size:r}=i,l=t.getPointPosition(e,n+o+a,s),h=Math.round(Oe(Fe(l.angle+Se))),c=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,r.h,h),d=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(h),u=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,r.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:u,top:c,right:u+r.w,bottom:c+r.h}}function Tr(t,e){if(!e)return!0;const{left:i,top:n,right:o,bottom:s}=t;return!(Di({x:i,y:n},e)||Di({x:i,y:s},e)||Di({x:o,y:n},e)||Di({x:o,y:s},e))}function zr(t,e,i){const{left:n,top:o,right:s,bottom:a}=i,{backdropColor:r}=e;if(!Gt(r)){const i=Vi(e.borderRadius),l=Bi(e.backdropPadding);t.fillStyle=r;const h=n-l.left,c=o-l.top,d=s-n+l.width,u=a-o+l.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),Oi(t,{x:h,y:c,w:d,h:u,radius:i}),t.fill()):t.fillRect(h,c,d,u)}}function $r(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,xe);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}Mt(kr,"id","logarithmic"),Mt(kr,"defaults",{ticks:{callback:gi.formatters.logarithmic,major:{enabled:!0}}});class Fr extends yr{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Bi(Ir(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(){const{min:t,max:e}=this.getMinMax(!1);this.min=te(t)&&!isNaN(t)?t:0,this.max=te(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ir(this.options))}generateTickLabels(t){yr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=oe(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Pr(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){return Fe(t*(xe/(this._pointLabels.length||1))+Pe(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(Gt(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Gt(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return Ui(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=this.getIndexAngle(t)-Se+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),$r(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n,border:o}=e,s=this._pointLabels.length;let a,r,l;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=t._pointLabelItems[o];if(!e.visible)continue;const s=n.setContext(t.getPointLabelContext(o));zr(i,s,e);const a=Wi(s.font),{x:r,y:l,textAlign:h}=e;Pi(i,t._pointLabels[o],r,l+a.lineHeight/2,a,{color:s.color,textAlign:h,textBaseline:"middle"})}}(this,s),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),a=n.setContext(i),l=o.setContext(i);!function(t,e,i,n,o){const s=t.ctx,a=e.circular,{color:r,lineWidth:l}=e;!a&&!n||!r||!l||i<0||(s.save(),s.strokeStyle=r,s.lineWidth=l,s.setLineDash(o.dash||[]),s.lineDashOffset=o.dashOffset,s.beginPath(),$r(t,i,a,n),s.closePath(),s.stroke(),s.restore())}(this,a,r,s,l)}})),i.display){for(t.save(),a=s-1;a>=0;a--){const n=i.setContext(this.getPointLabelContext(a)),{color:o,lineWidth:s}=n;s&&o&&(t.lineWidth=s,t.strokeStyle=o,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,r=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(a,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,a)=>{if(0===a&&this.min>=0&&!e.reverse)return;const r=i.setContext(this.getContext(a)),l=Wi(r.font);if(o=this.getDistanceFromCenterForValue(this.ticks[a].value),r.showLabelBackdrop){t.font=l.string,s=t.measureText(n.label).width,t.fillStyle=r.backdropColor;const e=Bi(r.backdropPadding);t.fillRect(-s/2-e.left,-o-l.size/2-e.top,s+e.width,l.size+e.height)}Pi(t,n.label,0,-o,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})})),t.restore()}drawTitle(){}}Mt(Fr,"id","radialLinear"),Mt(Fr,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:gi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}}),Mt(Fr,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Mt(Fr,"descriptors",{angleLines:{_fallback:"grid"}});const Nr={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}},Vr=Object.keys(Nr);function Br(t,e){return t-e}function Wr(t,e){if(Gt(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),te(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(o&&(a="week"!==o||!Ie(s)&&!0!==s?i.startOf(a,o):i.startOf(a,"isoWeek",s)),+a)}function jr(t,e,i,n){const o=Vr.length;for(let s=Vr.indexOf(t);s<o-1;++s){const t=Nr[Vr[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return Vr[s]}return Vr[o-1]}function Ur(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=We(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function Yr(t,e,i){const n=[],o={},s=e.length;let a,r;for(a=0;a<s;++a)r=e[a],o[r]=a,n.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),a=e[e.length-1].value;let r,l;for(r=s;r<=a;r=+o.add(r,1,n))l=i[r],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class Xr extends ms{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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=t.time||(t.time={}),n=this._adapter=new So(t.adapters.date);n.init(e),de(i.displayFormats,n.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:Wr(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:o,minDefined:s,maxDefined:a}=this.getUserBounds();function r(t){s||isNaN(t.min)||(n=Math.min(n,t.min)),a||isNaN(t.max)||(o=Math.max(o,t.max))}s&&a||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),n=te(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),o=te(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const 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]);const o=this.min,s=function(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}(n,o,this.max);return this._unit=e.unit||(i.autoSkip?jr(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):function(t,e,i,n,o){for(let s=Vr.length-1;s>=Vr.indexOf(i);s--){const i=Vr[s];if(Nr[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return Vr[i?Vr.indexOf(i):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Vr.indexOf(t)+1,i=Vr.length;e<i;++e)if(Nr[Vr[e]].common)return Vr[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&s.reverse(),Yr(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(){let t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=0,o=0;this.options.offset&&i.length&&(t=this.getDecimalForValue(i[0]),n=1===i.length?1-t:(this.getDecimalForValue(i[1])-t)/2,e=this.getDecimalForValue(i[i.length-1]),o=1===i.length?e:(e-this.getDecimalForValue(i[i.length-2]))/2);const s=i.length<3?.5:.25;n=Ve(n,0,s),o=Ve(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,s=o.unit||jr(o.minUnit,e,i,this._getLabelCapacity(e)),a=ie(n.ticks.stepSize,1),r="week"===s&&o.isoWeekday,l=Ie(r)||!0===r,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":s),t.diff(i,e,s)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+s);const g="data"===n.ticks.source&&this.getDataTimestamps();for(c=u,d=0;c<i;c=+t.add(c,a,s),d++)Ur(h,c,g);return c!==i&&"ticks"!==n.bounds&&1!==d||Ur(h,c,g),Object.keys(h).sort(Br).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,n=this._unit,o=e||i[n];return this._adapter.format(t,o)}_tickFormatFunction(t,e,i,n){const o=this.options,s=o.ticks.callback;if(s)return oe(s,[t,e,i],this);const a=o.time.displayFormats,r=this._unit,l=this._majorUnit,h=r&&a[r],c=l&&a[l],d=i[e],u=l&&c&&d&&d.major;return this._adapter.format(t,n||(u?c:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=Pe(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),s=Math.sin(n),a=this._resolveTickFontOptions(0).size;return{w:i*o+a*s,h:i*s+a*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,Yr(this,[t],this._majorUnit),n),s=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(Wr(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return qe(t.sort(Br))}}function qr(t,e,i){let n,o,s,a,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=je(t,"pos",e)),({pos:n,time:s}=t[r]),({pos:o,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=je(t,"time",e)),({time:n,pos:s}=t[r]),({time:o,pos:a}=t[l]));const h=o-n;return h?s+(a-s)*(e-n)/h:s}Mt(Xr,"id","time"),Mt(Xr,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});class Kr extends Xr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=qr(e,this.min),this._tableRange=qr(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let s,a,r,l,h;for(s=0,a=t.length;s<a;++s)l=t[s],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,a=n.length;s<a;++s)h=n[s+1],r=n[s-1],l=n[s],Math.round((h+r)/2)!==l&&o.push({time:l,pos:s/(a-1)});return o}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(qr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return qr(this._table,i*this._tableRange+this._minPos,!0)}}Mt(Kr,"id","timeseries"),Mt(Kr,"defaults",Xr.defaults);const Zr=[vo,xa,Ar,Object.freeze({__proto__:null,CategoryScale:xr,LinearScale:Sr,LogarithmicScale:kr,RadialLinearScale:Fr,TimeScale:Xr,TimeSeriesScale:Kr})];Ks.register(...Zr);var Gr=Ks;let Jr=class extends at{constructor(){super(),this.stockData=[],this.chart=null,this.customLinePlugin={id:"customLinePlugin",afterDraw:function(t){if(t.tooltip&&t.tooltip._active&&t.tooltip._active.length){const e=t.ctx,i=t.tooltip._active[0].element.x,n=t.scales.yPrice.top,o=t.scales.yPrice.bottom;e.save(),e.beginPath(),e.moveTo(i,n),e.lineTo(i,o),e.lineWidth=1,e.strokeStyle="rgba(0, 0, 0, 0.5)",e.stroke(),e.restore()}}},this.stockData=[{date:"2024-11-12 09:30:00",open:513.77,low:513.35,high:513.91,close:513.525,volume:208724,MACDLine:null,SignalLine:"N/A",MACDHistogram:"N/A"},{date:"2024-11-12 09:31:00",open:513.47,low:513.26,high:513.79,close:513.26,volume:95712,MACDLine:null,SignalLine:"N/A",MACDHistogram:"N/A"},{date:"2024-11-12 09:32:00",open:513.2506,low:512.93,high:513.3802,close:512.97,volume:75903,MACDLine:null,SignalLine:"N/A",MACDHistogram:"N/A"},{date:"2024-11-12 09:33:00",open:512.9501,low:512.94,high:513.6376,close:513.3599,volume:112487,MACDLine:null,SignalLine:"N/A",MACDHistogram:"N/A"},{date:"2024-11-12 09:34:00",open:513.35,low:513.22,high:513.74,close:513.645,volume:57747,MA5:513.35,MACDLine:null,SignalLine:"N/A",MACDHistogram:"N/A"},{date:"2024-11-12 09:35:00",open:513.69,low:513.69,high:514.15,close:514.11,volume:93928,MA5:513.47,MACDLine:null,SignalLine:"N/A",MACDHistogram:"N/A"},{date:"2024-11-12 09:36:00",open:514.3817,low:514.3817,high:514.3817,close:514.3817,volume:0,MA5:513.69,MACDLine:null,SignalLine:"N/A",MACDHistogram:"N/A"},{date:"2024-11-12 09:37:00",open:514.2,low:514.2,high:514.2,close:514.2,volume:108877,MA5:513.94,MACDLine:null,SignalLine:"N/A",MACDHistogram:"N/A"},{date:"2024-11-12 09:38:00",open:514.23,low:514.1101,high:514.32,close:514.28,volume:64735,MA5:514.12,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:39:00",open:514.27,low:513.84,high:514.33,close:514.04,volume:88442,MA5:514.2,MA10:513.78,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:40:00",open:514.03,low:513.97,high:514.24,close:514.21,volume:69898,MA5:514.22,MA10:513.85,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:41:00",open:514.16,low:513.94,high:514.1773,close:514.0237,volume:182608,MA5:514.15,MA10:513.92,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:42:00",open:514.09,low:513.54,high:514.11,close:513.655,volume:50536,MA5:514.04,MA10:513.99,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:43:00",open:513.6401,low:513.6,high:513.8,close:513.6,volume:40360,MA5:513.91,MA10:514.01,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:44:00",open:513.6,low:513.55,high:513.73,close:513.73,volume:25745,MA5:513.84,MA10:514.02,RSI:54.37436951123643,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:45:00",open:513.715,low:513.61,high:513.86,close:513.67,volume:34227,MA5:513.74,MA10:513.98,RSI:59.3700974053932,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:46:00",open:513.74,low:513.4238,high:513.78,close:513.51,volume:32408,MA5:513.63,MA10:513.89,RSI:65.48382401685426,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:47:00",open:513.58,low:513.43,high:513.72,close:513.6901,volume:33806,MA5:513.64,MA10:513.84,RSI:60.39175331536918,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:48:00",open:513.71,low:513.64,high:513.8099,close:513.77,volume:39170,MA5:513.67,MA10:513.79,RSI:55.98259734809251,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:49:00",open:513.73,low:513.73,high:513.94,close:513.9009,volume:76299,MA5:513.71,MA10:513.78,MA20:513.78,RSI:47.05669961796869,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:50:00",open:513.88,low:513.76,high:513.9799,close:513.92,volume:30575,MA5:513.76,MA10:513.75,MA20:513.8,RSI:40.511675802454214,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:51:00",open:513.93,low:513.85,high:514.168,close:514.15,volume:39062,MA5:513.89,MA10:513.76,MA20:513.84,RSI:43.880281936293244,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:52:00",open:514.16,low:514.16,high:514.39,close:514.23,volume:50359,MA5:513.99,MA10:513.82,MA20:513.9,RSI:41.90532924137255,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:53:00",open:514.21,low:514.17,high:514.43,close:514.3394,volume:48311,MA5:514.11,MA10:513.89,MA20:513.95,RSI:46.460000059517775,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:54:00",open:514.33,low:513.99,high:514.33,close:514.09,volume:49359,MA5:514.15,MA10:513.93,MA20:513.98,RSI:42.33777059496813,MACDLine:null,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:55:00",open:514.09,low:514.0898,high:514.36,close:514.16,volume:58009,MA5:514.19,MA10:513.98,MA20:513.98,RSI:45.93687544480104,MACDLine:.06367001561454799,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:56:00",open:514.15,low:514.13,high:514.38,close:514.38,volume:47741,MA5:514.24,MA10:514.06,MA20:513.98,RSI:54.44189569280378,MACDLine:.06370281306237757,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:57:00",open:514.375,low:514.33,high:514.66,close:514.53,volume:114634,MA5:514.3,MA10:514.15,MA20:513.99,RSI:55.874859470304294,MACDLine:.055508997251308756,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:58:00",open:514.5899,low:513.98,high:514.5899,close:514.04,volume:110607,MA5:514.24,MA10:514.17,MA20:513.98,RSI:53.16948831157574,MACDLine:.05609785056526562,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 09:59:00",open:514.02,low:513.96,high:514.44,close:514.29,volume:118526,MA5:514.28,MA10:514.21,MA20:513.99,RSI:54.60428611314252,MACDLine:.06233456369591295,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 10:00:00",open:514.28,low:514.155,high:514.42,close:514.4,volume:57649,MA5:514.33,MA10:514.26,MA20:514,RSI:58.514261262281785,MACDLine:.08247182934701414,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 10:01:00",open:514.38,low:514.091,high:514.38,close:514.23,volume:40636,MA5:514.3,MA10:514.27,MA20:514.01,RSI:55.158120917274196,MACDLine:.12219289453310012,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 10:02:00",open:514.23,low:513.8801,high:514.2667,close:513.89,volume:70607,MA5:514.17,MA10:514.23,MA20:514.03,RSI:53.6121772751449,MACDLine:.18633588472278007,SignalLine:null,MACDHistogram:null},{date:"2024-11-12 10:03:00",open:513.88,low:513.44,high:513.9599,close:513.4699,volume:87266,MA5:514.06,MA10:514.15,MA20:514.02,RSI:51.04463045804655,MACDLine:.20242550660543657,SignalLine:.07517952532070896,MACDHistogram:.1272459812847276},{date:"2024-11-12 10:04:00",open:513.44,low:513.15,high:513.56,close:513.17,volume:110698,MA5:513.83,MA10:514.06,MA20:513.99,RSI:50.67472311577938,MACDLine:.2111446166212545,SignalLine:.07805690274724919,MACDHistogram:.1330877138740053},{date:"2024-11-12 10:05:00",open:513.2,low:513.14,high:513.41,close:513.21,volume:88286,MA5:513.59,MA10:513.96,MA20:513.97,RSI:46.122656855371645,MACDLine:.17938399534523342,SignalLine:.0816454251684671,MACDHistogram:.09773857017676632},{date:"2024-11-12 10:06:00",open:513.19,low:513.04,high:513.3293,close:513.11,volume:43767,MA5:513.37,MA10:513.83,MA20:513.95,RSI:44.467403445362294,MACDLine:.1995370351659176,SignalLine:.08817953214775669,MACDHistogram:.1113575030181609},{date:"2024-11-12 10:07:00",open:513.1,low:513,high:513.25,close:513,volume:79772,MA5:513.19,MA10:513.68,MA20:513.91,RSI:42.21300280380452,MACDLine:.19298055820752325,SignalLine:.09619995254337946,MACDHistogram:.09678060566414379},{date:"2024-11-12 10:08:00",open:513.01,low:512.9,high:513.29,close:513.29,volume:104637,MA5:513.16,MA10:513.61,MA20:513.89,RSI:46.18169514255478,MACDLine:.11429166495213394,SignalLine:.10466629975524609,MACDHistogram:.00962536519688785},{date:"2024-11-12 10:09:00",open:513.2988,low:513.17,high:513.48,close:513.4084,volume:55090,MA5:513.2,MA10:513.52,MA20:513.87,RSI:44.82986495395134,MACDLine:-.008933673929618635,SignalLine:.11021491735730408,MACDHistogram:-.11914859128692272},{date:"2024-11-12 10:10:00",open:513.37,low:513.36,high:514,close:513.97,volume:81057,MA5:513.36,MA10:513.47,MA20:513.87,RSI:40.46571975845501,MACDLine:-.05306588939049561,SignalLine:.10722042306335508,MACDHistogram:-.1602863124538507},{date:"2024-11-12 10:11:00",open:513.94,low:513.9,high:514.16,close:514.1499,volume:70451,MA5:513.56,MA10:513.47,MA20:513.87,RSI:37.32694688308577,MACDLine:-.15436823146046663,SignalLine:.08744155764849884,MACDHistogram:-.24180978910896547},{date:"2024-11-12 10:12:00",open:514.16,low:514.07,high:514.22,close:514.19,volume:71274,MA5:513.8,MA10:513.5,MA20:513.87,RSI:44.432807338305146,MACDLine:-.3052033192448107,SignalLine:.05869557040926441,MACDHistogram:-.36389888965407513},{date:"2024-11-12 10:13:00",open:514.15,low:513.6101,high:514.15,close:513.6101,volume:48629,MA5:513.87,MA10:513.51,MA20:513.83,RSI:38.92446768198878,MACDLine:-.43502187391868574,SignalLine:.020583308856266885,MACDHistogram:-.45560518277495266},{date:"2024-11-12 10:14:00",open:513.62,low:513.51,high:513.85,close:513.81,volume:26001,MA5:513.95,MA10:513.57,MA20:513.82,RSI:36.346406774883576,MACDLine:-.5183266928090688,SignalLine:-.019116862765974747,MACDHistogram:-.4992098300430941},{date:"2024-11-12 10:15:00",open:513.855,low:513.79,high:513.95,close:513.86,volume:17789,MA5:513.92,MA10:513.64,MA20:513.8,RSI:38.69008019873182,MACDLine:-.5285153642975047,SignalLine:-.07378033724894784,MACDHistogram:-.45473502704855684},{date:"2024-11-12 10:16:00",open:513.85,low:513.75,high:513.98,close:513.92,volume:22803,MA5:513.88,MA10:513.72,MA20:513.78,RSI:43.953587820348,MACDLine:-.48404613606203384,SignalLine:-.1404705611130656,MACDHistogram:-.34357557494896823},{date:"2024-11-12 10:17:00",open:513.92,low:513.62,high:513.99,close:513.62,volume:34033,MA5:513.76,MA10:513.78,MA20:513.73,RSI:52.08303449749058,MACDLine:-.4200283773169531,SignalLine:-.20416111762936548,MACDHistogram:-.2158672596875876},{date:"2024-11-12 10:18:00",open:513.58,low:513.471,high:513.64,close:513.56,volume:81614,MA5:513.75,MA10:513.81,MA20:513.71,RSI:59.360942169448265,MACDLine:-.3212998433939447,SignalLine:-.2529679785543022,MACDHistogram:-.06833186483964249},{date:"2024-11-12 10:19:00",open:513.55,low:513.48,high:513.7,close:513.53,volume:47362,MA5:513.7,MA10:513.82,MA20:513.67,MA50:513.82,RSI:58.6452361837668,MACDLine:-.17815178964656297,SignalLine:-.30294350084525384,MACDHistogram:.12479171119869087},{date:"2024-11-12 10:20:00",open:513.54,low:513.33,high:513.63,close:513.63,volume:37048,MA5:513.65,MA10:513.79,MA20:513.63,MA50:513.82,RSI:61.145049905956355,MACDLine:-.08501297501413774,SignalLine:-.34008731819145066,MACDHistogram:.2550743431773129},{date:"2024-11-12 10:21:00",open:513.635,low:513.52,high:513.72,close:513.55,volume:27423,MA5:513.58,MA10:513.73,MA20:513.6,MA50:513.83,RSI:63.92845969572022,MACDLine:.007538937116919442,SignalLine:-.3488083179281106,MACDHistogram:.35634725504503006},{date:"2024-11-12 10:22:00",open:513.475,low:513.36,high:513.5675,close:513.5675,volume:27078,MA5:513.57,MA10:513.67,MA20:513.58,MA50:513.84,RSI:59.404551069870365,MACDLine:.0301177204241867,SignalLine:-.32725492893046687,MACDHistogram:.35737264935465357},{date:"2024-11-12 10:23:00",open:513.6,low:513.6,high:513.82,close:513.7,volume:57018,MA5:513.6,MA10:513.67,MA20:513.59,MA50:513.85,RSI:57.37802728858545,MACDLine:.031825655184775314,SignalLine:-.2794869879608164,MACDHistogram:.3113126431455917},{date:"2024-11-12 10:24:00",open:513.72,low:513.5605,high:513.7691,close:513.7,volume:17564,MA5:513.63,MA10:513.66,MA20:513.62,MA50:513.85,RSI:45.36558313980579,MACDLine:-.018476953978051824,SignalLine:-.2172298938766443,MACDHistogram:.19875293989859247},{date:"2024-11-12 10:25:00",open:513.71,low:513.64,high:513.8449,close:513.66,volume:20430,MA5:513.64,MA10:513.64,MA20:513.64,MA50:513.84,RSI:40.36628444990181,MACDLine:.04520556238480822,SignalLine:-.1505258333302969,MACDHistogram:.19573139571510512},{date:"2024-11-12 10:26:00",open:513.64,low:513.58,high:513.94,close:513.92,volume:42619,MA5:513.71,MA10:513.64,MA20:513.68,MA50:513.83,RSI:39.21504031156026,MACDLine:.08839516599880426,SignalLine:-.08315019733363285,MACDHistogram:.1715453633324371},{date:"2024-11-12 10:27:00",open:513.935,low:513.92,high:514.07,close:513.98,volume:78720,MA5:513.79,MA10:513.68,MA20:513.73,MA50:513.83,RSI:52.93882573338233,MACDLine:.1109623303788112,SignalLine:-.023612785818554888,MACDHistogram:.1345751161973661},{date:"2024-11-12 10:28:00",open:513.97,low:513.6101,high:513.97,close:513.63,volume:36452,MA5:513.78,MA10:513.69,MA20:513.75,MA50:513.81,RSI:47.00197790859453,MACDLine:.0946613317455558,SignalLine:.015021965138447141,MACDHistogram:.07963936660710866},{date:"2024-11-12 10:29:00",open:513.6495,low:513.6495,high:513.8401,close:513.75,volume:27937,MA5:513.79,MA10:513.71,MA20:513.77,MA50:513.81,RSI:45.40227159711073,MACDLine:.09385225593746327,SignalLine:.04003070017659337,MACDHistogram:.0538215557608699},{date:"2024-11-12 10:30:00",open:513.76,low:513.6025,high:513.86,close:513.69,volume:49828,MA5:513.79,MA10:513.71,MA20:513.75,MA50:513.8,RSI:43.50202464804573,MACDLine:.08055482091049271,SignalLine:.04815364094151185,MACDHistogram:.032401179968980856},{date:"2024-11-12 10:31:00",open:513.67,low:513.67,high:514.14,close:514.055,volume:47460,MA5:513.82,MA10:513.77,MA20:513.75,MA50:513.8,RSI:51.886483308230595,MACDLine:.07673802462636559,SignalLine:.052662621070843144,MACDHistogram:.024075403555522443},{date:"2024-11-12 10:32:00",open:514.06,low:513.91,high:514.115,close:513.91,volume:30947,MA5:513.81,MA10:513.8,MA20:513.73,MA50:513.8,RSI:53.81265635120632,MACDLine:.049222942465576125,SignalLine:.0578718625423601,MACDHistogram:-.008648920076783972},{date:"2024-11-12 10:33:00",open:513.88,low:513.72,high:513.88,close:513.78,volume:28622,MA5:513.84,MA10:513.81,MA20:513.74,MA50:513.81,RSI:54.75641598752003,MACDLine:.026696812980844697,SignalLine:.07695906667246308,MACDHistogram:-.05026225369161838},{date:"2024-11-12 10:34:00",open:513.82,low:513.82,high:514.04,close:514.04,volume:38173,MA5:513.89,MA10:513.84,MA20:513.75,MA50:513.81,RSI:52.15944410379031,MACDLine:.02557514497698321,SignalLine:.08489744274437679,MACDHistogram:-.059322297767393575},{date:"2024-11-12 10:35:00",open:514.04,low:513.9,high:514.07,close:513.96,volume:33567,MA5:513.95,MA10:513.87,MA20:513.76,MA50:513.82,RSI:54.48257218043081,MACDLine:.013188941161502044,SignalLine:.08402301193076991,MACDHistogram:-.07083407076926787},{date:"2024-11-12 10:36:00",open:513.98,low:513.8,high:514.09,close:513.8,volume:42045,MA5:513.9,MA10:513.86,MA20:513.75,MA50:513.82,RSI:54.067017456256636,MACDLine:.046357256420151316,SignalLine:.0772881823187596,MACDHistogram:-.030930925898608283},{date:"2024-11-12 10:37:00",open:513.8,low:513.73,high:514.1399,close:514.1399,volume:35308,MA5:513.94,MA10:513.88,MA20:513.78,MA50:513.83,RSI:50.91652099939892,MACDLine:.10575525507499606,SignalLine:.07294489496206055,MACDHistogram:.032810360112935505},{date:"2024-11-12 10:38:00",open:514.15,low:514.05,high:514.22,close:514.15,volume:27648,MA5:514.02,MA10:513.93,MA20:513.81,MA50:513.84,RSI:50.91652099939892,MACDLine:.12883989692068099,SignalLine:.06771805471820988,MACDHistogram:.061121842202471105},{date:"2024-11-12 10:39:00",open:514.1599,low:513.73,high:514.1599,close:513.77,volume:29550,MA5:513.96,MA10:513.93,MA20:513.82,MA50:513.84,RSI:51.84209606865361,MACDLine:.09520189583031424,SignalLine:.06450886317013918,MACDHistogram:.030693032660175062},{date:"2024-11-12 10:40:00",open:513.77,low:513.67,high:513.81,close:513.81,volume:25874,MA5:513.93,MA10:513.94,MA20:513.83,MA50:513.84,RSI:45.90707805912907,MACDLine:.13589154686280835,SignalLine:.06145157280608258,MACDHistogram:.07443997405672578},{date:"2024-11-12 10:41:00",open:513.81,low:513.7546,high:513.8997,close:513.87,volume:14263,MA5:513.95,MA10:513.92,MA20:513.84,MA50:513.83,RSI:44.43980325794018,MACDLine:.1654133698627902,SignalLine:.06450873039120919,MACDHistogram:.10090463947158101},{date:"2024-11-12 10:42:00",open:513.83,low:513.79,high:513.945,close:513.81,volume:14430,MA5:513.88,MA10:513.91,MA20:513.86,MA50:513.82,RSI:52.09381846135198,MACDLine:.21479702947567603,SignalLine:.07396170974380031,MACDHistogram:.1408353197318757},{date:"2024-11-12 10:43:00",open:513.79,low:513.64,high:513.84,close:513.71,volume:36586,MA5:513.79,MA10:513.91,MA20:513.86,MA50:513.81,RSI:49.31456002903672,MACDLine:.18099512549827068,SignalLine:.0860583509355046,MACDHistogram:.09493677456276609},{date:"2024-11-12 10:44:00",open:513.71,low:513.485,high:513.72,close:513.485,volume:62585,MA5:513.74,MA10:513.85,MA20:513.85,MA50:513.8,RSI:50.67963393929637,MACDLine:.16310985714164872,SignalLine:.10427570337900523,MACDHistogram:.05883415376264349},{date:"2024-11-12 10:45:00",open:513.46,low:513.36,high:513.58,close:513.52,volume:89430,MA5:513.68,MA10:513.81,MA20:513.84,MA50:513.78,RSI:41.53830499191717,MACDLine:.1642365166989066,SignalLine:.1187553151187187,MACDHistogram:.0454812015801879},{date:"2024-11-12 10:46:00",open:513.53,low:513.5,high:513.84,close:513.8,volume:80785,MA5:513.66,MA10:513.81,MA20:513.83,MA50:513.77,RSI:44.58675717490531,MACDLine:.12764928556373434,SignalLine:.12200533012964936,MACDHistogram:.005643955434084982},{date:"2024-11-12 10:47:00",open:513.81,low:513.5088,high:513.89,close:513.54,volume:35934,MA5:513.61,MA10:513.75,MA20:513.81,MA50:513.75,RSI:47.48815001034929,MACDLine:.09320304821574155,SignalLine:.12029668843189145,MACDHistogram:-.027093640216149906},{date:"2024-11-12 10:48:00",open:513.53,low:513.52,high:513.86,close:513.86,volume:19826,MA5:513.64,MA10:513.72,MA20:513.82,MA50:513.75,RSI:40.269762343229694,MACDLine:.08433598820840871,SignalLine:.12657038658228575,MACDHistogram:-.04223439837387705},{date:"2024-11-12 10:49:00",open:513.85,low:513.79,high:513.99,close:513.81,volume:61597,MA5:513.71,MA10:513.72,MA20:513.83,MA50:513.74,RSI:41.91600844056144,MACDLine:.02397350815238042,SignalLine:.12424009651215509,MACDHistogram:-.10026658835977467},{date:"2024-11-12 10:50:00",open:513.83,low:513.81,high:513.95,close:513.85,volume:29018,MA5:513.77,MA10:513.73,MA20:513.83,MA50:513.73,RSI:45.35975947910718,MACDLine:-.04885749014681551,SignalLine:.1139467781744963,MACDHistogram:-.1628042683213118},{date:"2024-11-12 10:51:00",open:513.83,low:513.7601,high:513.975,close:513.78,volume:35982,MA5:513.77,MA10:513.72,MA20:513.82,MA50:513.72,RSI:34.79152703880028,MACDLine:-.06866930993737697,SignalLine:.08873421534920138,MACDHistogram:-.15740352528657836},{date:"2024-11-12 10:52:00",open:513.8,low:513.74,high:513.87,close:513.755,volume:29334,MA5:513.81,MA10:513.71,MA20:513.81,MA50:513.72,RSI:34.441659838697745,MACDLine:-.07783029723475465,SignalLine:.06566898781193406,MACDHistogram:-.1434992850466887},{date:"2024-11-12 10:53:00",open:513.75,low:513.5,high:513.8,close:513.505,volume:25879,MA5:513.74,MA10:513.69,MA20:513.8,MA50:513.72,RSI:42.38693073055289,MACDLine:-.09610006215257272,SignalLine:.0413087704795054,MACDHistogram:-.13740883263207812},{date:"2024-11-12 10:54:00",open:513.51,low:513.31,high:513.69,close:513.34,volume:47845,MA5:513.65,MA10:513.68,MA20:513.76,MA50:513.72,RSI:41.057878306448146,MACDLine:-.13671201574368297,SignalLine:.010576833924655096,MACDHistogram:-.14728884966833805},{date:"2024-11-12 10:55:00",open:513.33,low:513.33,high:513.58,close:513.53,volume:30791,MA5:513.58,MA10:513.68,MA20:513.74,MA50:513.73,RSI:39.1011209558472,MACDLine:-.1561590980983283,SignalLine:-.018691278985114718,MACDHistogram:-.13746781911321357},{date:"2024-11-12 10:56:00",open:513.52,low:513.09,high:513.57,close:513.14,volume:84820,MA5:513.45,MA10:513.61,MA20:513.71,MA50:513.73,RSI:40.34481706717682,MACDLine:-.14318196905855984,SignalLine:-.046664860785328784,MACDHistogram:-.09651710827323107},{date:"2024-11-12 10:57:00",open:513.13,low:512.91,high:513.24,close:513.2185,volume:88510,MA5:513.35,MA10:513.58,MA20:513.66,MA50:513.73,RSI:42.43362884747098,MACDLine:-.10468124117073785,SignalLine:-.07941507303376316,MACDHistogram:-.025266168136974687},{date:"2024-11-12 10:58:00",open:513.2288,low:513.05,high:513.34,close:513.06,volume:65647,MA5:513.26,MA10:513.5,MA20:513.61,MA50:513.73,RSI:47.58043485404445,MACDLine:-.1243085849768022,SignalLine:-.10526221833029907,MACDHistogram:-.019046366646503124},{date:"2024-11-12 10:59:00",open:513.02,low:512.8237,high:513.02,close:512.9799,volume:81677,MA5:513.19,MA10:513.42,MA20:513.57,MA50:513.72,RSI:46.64567927990266,MACDLine:-.11227936074419631,SignalLine:-.11936340037616996,MACDHistogram:.007084039631973654},{date:"2024-11-12 11:00:00",open:512.96,low:512.95,high:513.18,close:513.14,volume:58149,MA5:513.11,MA10:513.34,MA20:513.54,MA50:513.7,RSI:38.498751085890795,MACDLine:-.1361652692946791,SignalLine:-.13203692298586822,MACDHistogram:-.004128346308810871},{date:"2024-11-12 11:01:00",open:513.2,low:512.99,high:513.29,close:513.09,volume:41530,MA5:513.1,MA10:513.28,MA20:513.5,MA50:513.68,RSI:44.336049874007024,MACDLine:-.16459906138197766,SignalLine:-.1455885794236466,MACDHistogram:-.01901048195833105},{date:"2024-11-12 11:02:00",open:513.14,low:513.12,high:513.44,close:513.3,volume:38365,MA5:513.11,MA10:513.23,MA20:513.47,MA50:513.66,RSI:32.66863475231352,MACDLine:-.22075129693519102,SignalLine:-.15796070874141507,MACDHistogram:-.06279058819377595},{date:"2024-11-12 11:03:00",open:513.295,low:513.2699,high:513.47,close:513.2999,volume:19065,MA5:513.16,MA10:513.21,MA20:513.45,MA50:513.66,RSI:33.69329394666174,MACDLine:-.2485644950858159,SignalLine:-.1632728819908481,MACDHistogram:-.0852916130949678},{date:"2024-11-12 11:04:00",open:513.29,low:513.13,high:513.46,close:513.3808,volume:25683,MA5:513.24,MA10:513.21,MA20:513.44,MA50:513.65,RSI:32.111499763411956,MACDLine:-.28033022079682723,SignalLine:-.16505132796397806,MACDHistogram:-.11527889283284917},{date:"2024-11-12 11:05:00",open:513.38,low:513.05,high:513.38,close:513.09,volume:26037,MA5:513.23,MA10:513.17,MA20:513.42,MA50:513.63,RSI:33.40652176107804,MACDLine:-.3074882165836925,SignalLine:-.1705186676903326,MACDHistogram:-.1369695488933599},{date:"2024-11-12 11:06:00",open:513.16,low:513.06,high:513.2401,close:513.09,volume:24445,MA5:513.23,MA10:513.16,MA20:513.39,MA50:513.62,RSI:33.85937003294454,MACDLine:-.3083336844194946,SignalLine:-.1869780243202313,MACDHistogram:-.1213556600992633},{date:"2024-11-12 11:07:00",open:513.06,low:512.92,high:513.15,close:513.12,volume:30547,MA5:513.2,MA10:513.16,MA20:513.37,MA50:513.61,RSI:38.73512322040272,MACDLine:-.3415097734110759,SignalLine:-.20264538415608857,MACDHistogram:-.13886438925498734},{date:"2024-11-12 11:08:00",open:513.06,low:512.92,high:513.15,close:513.12,volume:30547,MA5:513.16,MA10:513.16,MA20:513.33,MA50:513.6,RSI:42.484438621917356,MACDLine:-.31772347574712967,SignalLine:-.22523689000906164,MACDHistogram:-.09248658573806803},{date:"2024-11-12 11:09:00",open:513.05,low:512.9004,high:513.08,close:512.9299,volume:14100,MA5:513.07,MA10:513.16,MA20:513.29,MA50:513.59,MA100:513.7,RSI:35.8444686792115,MACDLine:-.314760259808736,SignalLine:-.24750479518765728,MACDHistogram:-.06725546462107873},{date:"2024-11-12 11:10:00",open:512.95,low:512.8,high:513.01,close:512.89,volume:25060,MA5:513.03,MA10:513.13,MA20:513.24,MA50:513.57,MA100:513.7,RSI:45.95696609293783,MACDLine:-.3027306967774166,SignalLine:-.26823122863907717,MACDHistogram:-.03449946813833943},{date:"2024-11-12 11:11:00",open:512.93,low:512.84,high:513.03,close:512.97,volume:38596,MA5:513.01,MA10:513.12,MA20:513.2,MA50:513.56,MA100:513.69,RSI:42.9486565722357,MACDLine:-.2717914261916121,SignalLine:-.2801012115650487,MACDHistogram:.008309785373436573},{date:"2024-11-12 11:12:00",open:512.99,low:512.78,high:513.03,close:512.8,volume:32613,MA5:512.94,MA10:513.07,MA20:513.15,MA50:513.54,MA100:513.69,RSI:47.95333965450166,MACDLine:-.24291342735386934,SignalLine:-.2879853906848569,MACDHistogram:.04507196333098756},{date:"2024-11-12 11:13:00",open:512.75,low:512.51,high:512.8499,close:512.83,volume:180621,MA5:512.88,MA10:513.02,MA20:513.12,MA50:513.53,MA100:513.69,RSI:50.72721258655708,MACDLine:-.2238304044394681,SignalLine:-.2898991831568643,MACDHistogram:.06606877871739619},{date:"2024-11-12 11:14:00",open:512.84,low:512.6125,high:512.88,close:512.67,volume:49571,MA5:512.83,MA10:512.95,MA20:513.08,MA50:513.51,MA100:513.68,RSI:44.80106389708828,MACDLine:-.21534508567322064,SignalLine:-.28550192480015724,MACDHistogram:.0701568391269366},{date:"2024-11-12 11:15:00",open:512.67,low:512.665,high:512.8,close:512.69,volume:51394,MA5:512.79,MA10:512.91,MA20:513.04,MA50:513.49,MA100:513.66,RSI:46.42013453275565,MACDLine:-.2135097139290565,SignalLine:-.2797939848953229,MACDHistogram:.06628427096626643},{date:"2024-11-12 11:16:00",open:512.7,low:512.7,high:512.8,close:512.76,volume:27134,MA5:512.75,MA10:512.88,MA20:513.02,MA50:513.46,MA100:513.65,RSI:37.62947462962666,MACDLine:-.22699024360940712,SignalLine:-.2643650377663847,MACDHistogram:.03737479415697759},{date:"2024-11-12 11:17:00",open:512.752,low:512.74,high:512.92,close:512.8699,volume:111958,MA5:512.76,MA10:512.85,MA20:513,MA50:513.44,MA100:513.63,RSI:37.63220471069707,MACDLine:-.20044662522161616,SignalLine:-.25102542827119845,MACDHistogram:.05057880304958229},{date:"2024-11-12 11:18:00",open:512.87,low:512.78,high:512.97,close:512.94,volume:54038,MA5:512.79,MA10:512.83,MA20:513,MA50:513.43,MA100:513.62,RSI:34.037105044643994,MACDLine:-.17568809229442195,SignalLine:-.23509172038681403,MACDHistogram:.05940362809239208},{date:"2024-11-12 11:19:00",open:512.9307,low:512.93,high:513.27,close:513.27,volume:39506,MA5:512.91,MA10:512.87,MA20:513.01,MA50:513.42,MA100:513.61,RSI:42.146148621645914,MACDLine:-.17665901074303747,SignalLine:-.2181819762891634,MACDHistogram:.04152296554612592},{date:"2024-11-12 11:20:00",open:513.29,low:513.19,high:513.35,close:513.2,volume:45155,MA5:513.01,MA10:512.9,MA20:513.02,MA50:513.41,MA100:513.6,RSI:42.14614862164592,MACDLine:-.19412867013397772,SignalLine:-.2047796138135512,MACDHistogram:.010650943679573477},{date:"2024-11-12 11:21:00",open:513.24,low:512.99,high:513.24,close:513.1699,volume:25392,MA5:513.09,MA10:512.92,MA20:513.02,MA50:513.39,MA100:513.59,RSI:40.89355750943005,MACDLine:-.16703898200910317,SignalLine:-.19524616042847165,MACDHistogram:.028207178419368484},{date:"2024-11-12 11:22:00",open:513.17,low:513.0201,high:513.23,close:513.09,volume:21423,MA5:513.13,MA10:512.95,MA20:513.01,MA50:513.37,MA100:513.59,RSI:40.89355750943005,MACDLine:-.1627072130642091,SignalLine:-.18810009942572253,MACDHistogram:.025392886361513434},{date:"2024-11-12 11:23:00",open:513,low:512.77,high:513.06,close:512.8,volume:26925,MA5:513.11,MA10:512.95,MA20:512.98,MA50:513.35,MA100:513.58,RSI:46.38012119692315,MACDLine:-.1667134685117162,SignalLine:-.181288852863848,MACDHistogram:.014575384352131793},{date:"2024-11-12 11:24:00",open:512.8,low:512.55,high:512.8,close:512.61,volume:39942,MA5:512.97,MA10:512.94,MA20:512.95,MA50:513.33,MA100:513.57,RSI:47.62546968734027,MACDLine:-.15478743864991884,SignalLine:-.17323363759754587,MACDHistogram:.01844619894762703},{date:"2024-11-12 11:25:00",open:512.63,low:512.57,high:512.77,close:512.64,volume:20417,MA5:512.86,MA10:512.93,MA20:512.92,MA50:513.3,MA100:513.56,RSI:44.8694404010023,MACDLine:-.1529583977915081,SignalLine:-.15979448609458055,MACDHistogram:.006836088303072446},{date:"2024-11-12 11:26:00",open:512.67,low:512.67,high:512.96,close:512.96,volume:15575,MA5:512.82,MA10:512.95,MA20:512.92,MA50:513.28,MA100:513.55,RSI:50.068202418090806,MACDLine:-.10868048167344568,SignalLine:-.14963145131282166,MACDHistogram:.04095096963937597},{date:"2024-11-12 11:27:00",open:512.97,low:512.77,high:513.02,close:512.82,volume:117379,MA5:512.77,MA10:512.95,MA20:512.9,MA50:513.26,MA100:513.54,RSI:49.10184230265305,MACDLine:-.06505767991291123,SignalLine:-.14311729106742158,MACDHistogram:.07805961115451035},{date:"2024-11-12 11:28:00",open:512.81,low:512.75,high:512.84,close:512.83,volume:11039,MA5:512.77,MA10:512.94,MA20:512.89,MA50:513.23,MA100:513.54,RSI:54.306970321704675,MACDLine:-.010178283048958292,SignalLine:-.1347318611485176,MACDHistogram:.1245535780995593},{date:"2024-11-12 11:29:00",open:512.85,low:512.83,high:512.92,close:512.8601,volume:87148,MA5:512.82,MA10:512.9,MA20:512.88,MA50:513.21,MA100:513.53,RSI:53.73774295009242,MACDLine:.03217146761096501,SignalLine:-.11988265890215256,MACDHistogram:.15205412651311756},{date:"2024-11-12 11:30:00",open:512.8734,low:512.81,high:513.01,close:513.005,volume:27271,MA5:512.9,MA10:512.88,MA20:512.89,MA50:513.2,MA100:513.52,RSI:51.78567340164489,MACDLine:.07322920074238937,SignalLine:-.10809357812541491,MACDHistogram:.1813227788678043},{date:"2024-11-12 11:31:00",open:512.98,low:512.87,high:513.08,close:512.97,volume:27536,MA5:512.9,MA10:512.86,MA20:512.89,MA50:513.18,MA100:513.5,RSI:48.625343893971525,MACDLine:.034893009928509855,SignalLine:-.09444016939071637,MACDHistogram:.12933317931922622},{date:"2024-11-12 11:32:00",open:512.95,low:512.84,high:512.985,close:512.88,volume:14898,MA5:512.91,MA10:512.84,MA20:512.89,MA50:513.16,MA100:513.49,RSI:46.5502508518555,MACDLine:.0008000098724778582,SignalLine:-.07637184461046641,MACDHistogram:.07717185448294427},{date:"2024-11-12 11:33:00",open:512.86,low:512.77,high:512.9,close:512.8298,volume:19964,MA5:512.91,MA10:512.84,MA20:512.89,MA50:513.14,MA100:513.48,RSI:35.089443338760745,MACDLine:-.03325396488799015,SignalLine:-.056767946100603296,MACDHistogram:.023513981212613146},{date:"2024-11-12 11:34:00",open:512.85,low:512.76,high:512.88,close:512.84,volume:29460,MA5:512.9,MA10:512.86,MA20:512.9,MA50:513.13,MA100:513.46,RSI:36.63678537587393,MACDLine:-.06098243500207445,SignalLine:-.03272033317787709,MACDHistogram:-.02826210182419736},{date:"2024-11-12 11:35:00",open:512.78,low:512.72,high:513.03,close:512.99,volume:32862,MA5:512.9,MA10:512.9,MA20:512.92,MA50:513.12,MA100:513.45,RSI:37.293423156558994,MACDLine:-.058404119620490746,SignalLine:-.013730296053984946,MACDHistogram:-.0446738235665058},{date:"2024-11-12 11:36:00",open:513.02,low:512.89,high:513.02,close:512.91,volume:11067,MA5:512.89,MA10:512.89,MA20:512.92,MA50:513.1,MA100:513.44,RSI:39.01711348057274,MACDLine:-.024799737157081836,SignalLine:-.0008984500892533758,MACDHistogram:-.02390128706782846},{date:"2024-11-12 11:37:00",open:512.926,low:512.4801,high:512.95,close:512.53,volume:33727,MA5:512.82,MA10:512.86,MA20:512.91,MA50:513.08,MA100:513.42,RSI:46.21640363587884,MACDLine:.015325125363915504,SignalLine:.0014215081506728537,MACDHistogram:.01390361721324265},{date:"2024-11-12 11:38:00",open:512.51,low:512.4,high:512.64,close:512.43,volume:33466,MA5:512.74,MA10:512.82,MA20:512.88,MA50:513.05,MA100:513.4,RSI:52.0604458361547,MACDLine:-.010265688296271946,SignalLine:-.006265981714400185,MACDHistogram:-.003999706581871761},{date:"2024-11-12 11:39:00",open:512.45,low:512.25,high:512.5099,close:512.34,volume:59514,MA5:512.64,MA10:512.77,MA20:512.84,MA50:513.02,MA100:513.38,RSI:51.15487720115692,MACDLine:-.012597734992823462,SignalLine:-.026139777328597572,MACDHistogram:.01354204233577411},{date:"2024-11-12 11:40:00",open:512.33,low:512.32,high:512.62,close:512.52,volume:51171,MA5:512.55,MA10:512.72,MA20:512.8,MA50:513,MA100:513.36,RSI:39.91258266668328,MACDLine:-.0301546711765468,SignalLine:-.04139797414287443,MACDHistogram:.011243302966327633},{date:"2024-11-12 11:41:00",open:512.52,low:512.36,high:512.57,close:512.505,volume:38848,MA5:512.46,MA10:512.68,MA20:512.77,MA50:512.97,MA100:513.35,RSI:44.02948676493745,MACDLine:-.053670547233878096,SignalLine:-.051947470146712506,MACDHistogram:-.0017230770871655907},{date:"2024-11-12 11:42:00",open:512.54,low:512.34,high:512.56,close:512.45,volume:43785,MA5:512.45,MA10:512.63,MA20:512.74,MA50:512.94,MA100:513.33,RSI:43.64392948818911,MACDLine:-.10117596653287819,SignalLine:-.05662084646139309,MACDHistogram:-.0445551200714851},{date:"2024-11-12 11:43:00",open:512.475,low:512.2599,high:512.5,close:512.2699,volume:13122,MA5:512.42,MA10:512.58,MA20:512.71,MA50:512.92,MA100:513.32,RSI:42.53757220781655,MACDLine:-.14161923310678048,SignalLine:-.05553044932622275,MACDHistogram:-.08608878378055773},{date:"2024-11-12 11:44:00",open:512.3,low:512.25,high:512.37,close:512.27,volume:26815,MA5:512.4,MA10:512.52,MA20:512.69,MA50:512.9,MA100:513.31,RSI:37.00987325080673,MACDLine:-.16775199541586971,SignalLine:-.054812031752655754,MACDHistogram:-.11293996366321396},{date:"2024-11-12 11:45:00",open:512.26,low:512.17,high:512.4599,close:512.4599,volume:47269,MA5:512.39,MA10:512.47,MA20:512.68,MA50:512.88,MA100:513.3,RSI:37.82601573645686,MACDLine:-.16401232846612857,SignalLine:-.062315105401549234,MACDHistogram:-.10169722306457933},{date:"2024-11-12 11:46:00",open:512.4152,low:512.152,high:512.44,close:512.21,volume:28553,MA5:512.33,MA10:512.4,MA20:512.65,MA50:512.86,MA100:513.29,RSI:39.92844078196906,MACDLine:-.1707109742361581,SignalLine:-.08172516309291541,MACDHistogram:-.0889858111432427},{date:"2024-11-12 11:47:00",open:512.22,low:512.16,high:512.43,close:512.18,volume:32848,MA5:512.28,MA10:512.36,MA20:512.61,MA50:512.84,MA100:513.28,RSI:41.111958077023196,MACDLine:-.2116949043029308,SignalLine:-.09959003179207629,MACDHistogram:-.11210487251085452},{date:"2024-11-12 11:48:00",open:512.1595,low:512.02,high:512.21,close:512.1275,volume:57555,MA5:512.25,MA10:512.33,MA20:512.58,MA50:512.82,MA100:513.27,RSI:40.78077606481958,MACDLine:-.255389376434664,SignalLine:-.1213381059918895,MACDHistogram:-.13405127044277448},{date:"2024-11-12 11:49:00",open:512.13,low:512.015,high:512.18,close:512.02,volume:50734,MA5:512.2,MA10:512.3,MA20:512.54,MA50:512.8,MA100:513.26,RSI:35.854580114937036,MACDLine:-.26417192993460503,SignalLine:-.14413396469572518,MACDHistogram:-.12003796523887986},{date:"2024-11-12 11:50:00",open:512.02,low:511.98,high:512.56,close:512.55,volume:95767,MA5:512.22,MA10:512.3,MA20:512.51,MA50:512.79,MA100:513.25,RSI:37.39513849863742,MACDLine:-.27248461560282067,SignalLine:-.16674981906118694,MACDHistogram:-.10573479654163373},{date:"2024-11-12 11:51:00",open:512.54,low:512.48,high:512.8401,close:512.83,volume:58010,MA5:512.34,MA10:512.34,MA20:512.51,MA50:512.78,MA100:513.23,RSI:46.139182699885225,MACDLine:-.2629857581741817,SignalLine:-.18314328219326412,MACDHistogram:-.07984247598091757},{date:"2024-11-12 11:52:00",open:512.82,low:512.695,high:512.97,close:512.97,volume:68968,MA5:512.5,MA10:512.39,MA20:512.51,MA50:512.78,MA100:513.22,RSI:48.935271230678104,MACDLine:-.25852742366453185,SignalLine:-.19352429446488503,MACDHistogram:-.06500312919964682},{date:"2024-11-12 11:53:00",open:512.98,low:512.95,high:513.17,close:513.0825,volume:82049,MA5:512.69,MA10:512.47,MA20:512.52,MA50:512.77,MA100:513.21,RSI:51.54582309491208,MACDLine:-.2639492960006464,SignalLine:-.19996736922713887,MACDHistogram:-.06398192677350756},{date:"2024-11-12 11:54:00",open:513.07,low:513.01,high:513.18,close:513.01,volume:146048,MA5:512.89,MA10:512.54,MA20:512.53,MA50:512.76,MA100:513.21,RSI:46.21741729904859,MACDLine:-.26081213238614964,SignalLine:-.20895612941739145,MACDHistogram:-.0518560029687582},{date:"2024-11-12 11:55:00",open:512.92,low:512.92,high:513.02,close:512.97,volume:25130,MA5:512.97,MA10:512.6,MA20:512.53,MA50:512.76,MA100:513.2,RSI:46.614076218041795,MACDLine:-.2233881579924173,SignalLine:-.21851741821269977,MACDHistogram:-.004870739779717526},{date:"2024-11-12 11:56:00",open:512.93,low:512.72,high:512.95,close:512.75,volume:31776,MA5:512.96,MA10:512.65,MA20:512.52,MA50:512.75,MA100:513.19,RSI:48.01719715211619,MACDLine:-.16938318474103653,SignalLine:-.220223046690142,MACDHistogram:.050839861949105475},{date:"2024-11-12 11:57:00",open:512.71,low:512.34,high:512.74,close:512.39,volume:59222,MA5:512.84,MA10:512.67,MA20:512.52,MA50:512.74,MA100:513.17,RSI:52.854782647498745,MACDLine:-.146007627103927,SignalLine:-.21143146425401152,MACDHistogram:.06542383715008451},{date:"2024-11-12 11:58:00",open:512.4,low:512.18,high:512.4163,close:512.33,volume:31259,MA5:512.69,MA10:512.69,MA20:512.51,MA50:512.72,MA100:513.16,RSI:52.852333620048555,MACDLine:-.08323144078008227,SignalLine:-.19824634783386313,MACDHistogram:.11501490705378087},{date:"2024-11-12 11:59:00",open:512.33,low:512.1899,high:512.3599,close:512.245,volume:13365,MA5:512.54,MA10:512.71,MA20:512.51,MA50:512.71,MA100:513.15,RSI:48.09811169081467,MACDLine:-.010202469279079196,SignalLine:-.17968678089162377,MACDHistogram:.16948431161254457},{date:"2024-11-12 12:00:00",open:512.23,low:512.02,high:512.29,close:512.2,volume:43665,MA5:512.38,MA10:512.68,MA20:512.49,MA50:512.7,MA100:513.13,RSI:54.857579397151795,MACDLine:.08406727208080156,SignalLine:-.1588620365709843,MACDHistogram:.24292930865178586},{date:"2024-11-12 12:01:00",open:512.25,low:512.03,high:512.27,close:512.1088,volume:36905,MA5:512.25,MA10:512.61,MA20:512.47,MA50:512.68,MA100:513.12,RSI:55.73064903860474,MACDLine:.22434876345914745,SignalLine:-.1339456897975974,MACDHistogram:.35829445325674486},{date:"2024-11-12 12:02:00",open:512.25,low:512.03,high:512.27,close:512.1088,volume:36905,MA5:512.2,MA10:512.52,MA20:512.45,MA50:512.67,MA100:513.11,RSI:57.21023199854358,MACDLine:.28326297589535443,SignalLine:-.10144478824683514,MACDHistogram:.38470776414218955},{date:"2024-11-12 12:03:00",open:512.1,low:512.07,high:512.24,close:512.15,volume:31657,MA5:512.16,MA10:512.43,MA20:512.45,MA50:512.65,MA100:513.09,RSI:60.25166866070717,MACDLine:.26779329102805605,SignalLine:-.06160295221200651,MACDHistogram:.32939624324006256},{date:"2024-11-12 12:04:00",open:512.2,low:512.195,high:512.56,close:512.5468,volume:45638,MA5:512.22,MA10:512.38,MA20:512.46,MA50:512.65,MA100:513.08,RSI:47.46581268632913,MACDLine:.2150622635642776,SignalLine:-.021156650766903817,MACDHistogram:.23621891433118142},{date:"2024-11-12 12:05:00",open:512.52,low:512.4685,high:512.6,close:512.52,volume:72815,MA5:512.29,MA10:512.33,MA20:512.46,MA50:512.65,MA100:513.07,RSI:37.62263271223006,MACDLine:.124830119222338,SignalLine:.01589998272662936,MACDHistogram:.10893013649570864},{date:"2024-11-12 12:06:00",open:512.49,low:512.36,high:512.51,close:512.41,volume:23849,MA5:512.35,MA10:512.3,MA20:512.47,MA50:512.64,MA100:513.05,RSI:31.67928511721395,MACDLine:.04622719870997116,SignalLine:.056376885184268456,MACDHistogram:-.010149686474297294},{date:"2024-11-12 12:07:00",open:512.37,low:512.275,high:512.43,close:512.32,volume:51112,MA5:512.39,MA10:512.29,MA20:512.48,MA50:512.63,MA100:513.04,RSI:26.450204173273647,MACDLine:-.041571106361516286,SignalLine:.09127896667535614,MACDHistogram:-.1328500730368724},{date:"2024-11-12 12:08:00",open:512.2299,low:512.13,high:512.3,close:512.23,volume:41455,MA5:512.41,MA10:512.28,MA20:512.49,MA50:512.61,MA100:513.02,RSI:27.719795005094284,MACDLine:-.11066536328758048,SignalLine:.11664932566396496,MACDHistogram:-.22731468895154544},{date:"2024-11-12 12:09:00",open:512.2299,low:512.13,high:512.3,close:512.23,volume:41455,MA5:512.34,MA10:512.28,MA20:512.5,MA50:512.59,MA100:513.01,RSI:28.418630896226972,MACDLine:-.1418349004799211,SignalLine:.12479483905975582,MACDHistogram:-.2666297395396769},{date:"2024-11-12 12:10:00",open:512.245,low:512.21,high:512.34,close:512.34,volume:36800,MA5:512.31,MA10:512.3,MA20:512.49,MA50:512.58,MA100:512.99,RSI:32.61840481022466,MACDLine:-.16689151121659052,SignalLine:.0999063579599079,MACDHistogram:-.2667978691764984},{date:"2024-11-12 12:11:00",open:512.37,low:512.16,high:512.37,close:512.2599,volume:47032,MA5:512.28,MA10:512.31,MA20:512.46,MA50:512.56,MA100:512.97,RSI:42.06397578284821,MACDLine:-.16492607239376866,SignalLine:.05406720347604626,MACDHistogram:-.21899327586981493},{date:"2024-11-12 12:12:00",open:512.225,low:511.87,high:512.255,close:511.922,volume:41241,MA5:512.2,MA10:512.29,MA20:512.41,MA50:512.53,MA100:512.95,RSI:44.037546431927844,MACDLine:-.17495453306139552,SignalLine:.0006356815880438141,MACDHistogram:-.17559021464943933},{date:"2024-11-12 12:13:00",open:511.98,low:511.9,high:512.03,close:511.94,volume:33325,MA5:512.14,MA10:512.27,MA20:512.35,MA50:512.52,MA100:512.94,RSI:46.93432946841927,MACDLine:-.1711733387418235,SignalLine:-.052970963906014634,MACDHistogram:-.11820237483580887},{date:"2024-11-12 12:14:00",open:511.93,low:511.92,high:512.12,close:512.05,volume:21778,MA5:512.1,MA10:512.22,MA20:512.3,MA50:512.51,MA100:512.92,RSI:48.50277091184905,MACDLine:-.1690930021558188,SignalLine:-.09742123468810279,MACDHistogram:-.071671767467716},{date:"2024-11-12 12:15:00",open:512.06,low:511.98,high:512.21,close:512.09,volume:19933,MA5:512.05,MA10:512.18,MA20:512.26,MA50:512.5,MA100:512.9,RSI:51.75777014325489,MACDLine:-.18034111070016934,SignalLine:-.1333333430376213,MACDHistogram:-.04700776766254805},{date:"2024-11-12 12:16:00",open:512.11,low:512.11,high:512.21,close:512.18,volume:51547,MA5:512.04,MA10:512.16,MA20:512.23,MA50:512.48,MA100:512.88,RSI:51.75777014325489,MACDLine:-.21992918945022666,SignalLine:-.15627390220664755,MACDHistogram:-.0636552872435791},{date:"2024-11-12 12:17:00",open:512.18,low:512.02,high:512.19,close:512.09,volume:21991,MA5:512.07,MA10:512.13,MA20:512.21,MA50:512.47,MA100:512.86,RSI:50.46283352343061,MACDLine:-.24003282175362983,SignalLine:-.16767603693641434,MACDHistogram:-.0723567848172155},{date:"2024-11-12 12:18:00",open:512.1,low:511.97,high:512.2,close:512.03,volume:79468,MA5:512.09,MA10:512.11,MA20:512.2,MA50:512.45,MA100:512.84,RSI:34.81479347840211,MACDLine:-.23551007139553803,SignalLine:-.17413632105053764,MACDHistogram:-.061373750345000394},{date:"2024-11-12 12:19:00",open:512.0299,low:511.922,high:512.084102,close:512.084102,volume:8102,MA5:512.09,MA10:512.1,MA20:512.19,MA50:512.43,MA100:512.82,RSI:35.518450864135275,MACDLine:-.20909361444546448,SignalLine:-.17594752350902443,MACDHistogram:-.033146090936440054},{date:"2024-11-12 12:20:00",open:512.06,low:511.84,high:512.06,close:511.875,volume:124272,MA5:512.05,MA10:512.05,MA20:512.17,MA50:512.41,MA100:512.8,RSI:38.482858762965435,MACDLine:-.17286252045528272,SignalLine:-.17870288628783837,MACDHistogram:.0058403658325556496},{date:"2024-11-12 12:21:00",open:511.89,low:511.72,high:511.91,close:511.8,volume:29048,MA5:511.98,MA10:512.01,MA20:512.16,MA50:512.39,MA100:512.78,RSI:41.08821018072446,MACDLine:-.13864956019210695,SignalLine:-.17963997459444908,MACDHistogram:.040990414402342135},{date:"2024-11-12 12:22:00",open:511.8,low:511.7101,high:511.92,close:511.73,volume:36883,MA5:511.9,MA10:511.99,MA20:512.14,MA50:512.36,MA100:512.76,RSI:43.84453075423427,MACDLine:-.14132829730795038,SignalLine:-.1817566335576055,MACDHistogram:.04042833624965511},{date:"2024-11-12 12:23:00",open:511.7,low:511.69,high:511.83,close:511.81,volume:18741,MA5:511.86,MA10:511.97,MA20:512.12,MA50:512.34,MA100:512.74,RSI:43.84453075423427,MACDLine:-.16289165562955077,SignalLine:-.18492254140805217,MACDHistogram:.022030885778501402},{date:"2024-11-12 12:24:00",open:511.81,low:511.79,high:512.04,close:511.9,volume:49189,MA5:511.82,MA10:511.96,MA20:512.09,MA50:512.33,MA100:512.73,RSI:39.57256807591175,MACDLine:-.13330100889629648,SignalLine:-.1860678990850229,MACDHistogram:.052766890188726406},{date:"2024-11-12 12:25:00",open:511.92,low:511.92,high:512.07,close:512,volume:61528,MA5:511.85,MA10:511.95,MA20:512.06,MA50:512.31,MA100:512.71,RSI:41.71851709129257,MACDLine:-.10960093239100388,SignalLine:-.17760257649372194,MACDHistogram:.06800164410271806},{date:"2024-11-12 12:26:00",open:512,low:511.9866,high:512.32,close:512.255,volume:87592,MA5:511.94,MA10:511.96,MA20:512.06,MA50:512.29,MA100:512.7,RSI:52.97053834190443,MACDLine:-.10579318481677547,SignalLine:-.16199501517874496,MACDHistogram:.05620183036196949},{date:"2024-11-12 12:27:00",open:512.26,low:512.2402,high:512.43,close:512.315,volume:58942,MA5:512.06,MA10:511.98,MA20:512.06,MA50:512.29,MA100:512.68,RSI:52.33461551968626,MACDLine:-.11614484977019401,SignalLine:-.14361625112454668,MACDHistogram:.027471401354352665},{date:"2024-11-12 12:28:00",open:512.29,low:512.115,high:512.29,close:512.15,volume:17452,MA5:512.12,MA10:511.99,MA20:512.05,MA50:512.28,MA100:512.67,RSI:48.37325227447645,MACDLine:-.14430504976860448,SignalLine:-.12724691029431723,MACDHistogram:-.01705813947428725},{date:"2024-11-12 12:29:00",open:512.21,low:512.146076,high:512.39,close:512.3325,volume:20258,MA5:512.21,MA10:512.02,MA20:512.06,MA50:512.28,MA100:512.65,RSI:46.88265420009469,MACDLine:-.15745344976994602,SignalLine:-.11584300775407586,MACDHistogram:-.041610442015870164},{date:"2024-11-12 12:30:00",open:512.325,low:512.28,high:512.4,close:512.35,volume:17428,MA5:512.28,MA10:512.06,MA20:512.06,MA50:512.28,MA100:512.64,RSI:43.47275581911603,MACDLine:-.13016499377499713,SignalLine:-.11014136964456808,MACDHistogram:-.020023624130429046},{date:"2024-11-12 12:31:00",open:512.35,low:512.25,high:512.48,close:512.45,volume:24785,MA5:512.32,MA10:512.13,MA20:512.07,MA50:512.28,MA100:512.62,RSI:46.22844123195903,MACDLine:-.11293951003199254,SignalLine:-.10234463772872252,MACDHistogram:-.010594872303270025},{date:"2024-11-12 12:32:00",open:512.46,low:512.28,high:512.46,close:512.32,volume:43048,MA5:512.32,MA10:512.19,MA20:512.09,MA50:512.28,MA100:512.61,RSI:48.11656807571138,MACDLine:-.06643256154495703,SignalLine:-.08720788325351544,MACDHistogram:.02077532170855842},{date:"2024-11-12 12:33:00",open:512.3,low:512.3,high:512.53,close:512.53,volume:20262,MA5:512.4,MA10:512.26,MA20:512.12,MA50:512.28,MA100:512.6,RSI:46.27943824723424,MACDLine:-.007451946399100962,SignalLine:-.07568460184282019,MACDHistogram:.06823265544371923},{date:"2024-11-12 12:34:00",open:512.52,low:512.41,high:512.54,close:512.41,volume:26319,MA5:512.41,MA10:512.31,MA20:512.14,MA50:512.28,MA100:512.59,RSI:53.01671079579663,MACDLine:.06590079433465235,SignalLine:-.06720551920577426,MACDHistogram:.13310631354042662},{date:"2024-11-12 12:35:00",open:512.4,low:512.31,high:512.5,close:512.49,volume:17954,MA5:512.44,MA10:512.36,MA20:512.16,MA50:512.28,MA100:512.58,RSI:55.71825408244663,MACDLine:.13674882640816577,SignalLine:-.05755860280302397,MACDHistogram:.19430742921118974},{date:"2024-11-12 12:36:00",open:512.47,low:512.41,high:512.6,close:512.41,volume:24084,MA5:512.43,MA10:512.38,MA20:512.17,MA50:512.29,MA100:512.57,RSI:58.29258615172044,MACDLine:.21151487714337236,SignalLine:-.042912041061231455,MACDHistogram:.25442691820460384},{date:"2024-11-12 12:37:00",open:512.38,low:512.26,high:512.38,close:512.28,volume:27823,MA5:512.42,MA10:512.37,MA20:512.18,MA50:512.29,MA100:512.56,RSI:56.142175428163924,MACDLine:.27287714732335644,SignalLine:-.0175637888843882,MACDHistogram:.29044093620774464},{date:"2024-11-12 12:38:00",open:512.3099,low:512.26,high:512.44,close:512.36,volume:24671,MA5:512.39,MA10:512.39,MA20:512.19,MA50:512.29,MA100:512.56,RSI:53.645464705683196,MACDLine:.2700525954827526,SignalLine:.017408626337001264,MACDHistogram:.2526439691457514},{date:"2024-11-12 12:39:00",open:512.3395,low:512.25,high:512.36,close:512.33,volume:11872,MA5:512.37,MA10:512.39,MA20:512.2,MA50:512.3,MA100:512.55,RSI:50.7529599599988,MACDLine:.25789394792650455,SignalLine:.054302031365000863,MACDHistogram:.2035919165615037},{date:"2024-11-12 12:40:00",open:512.2896,low:512.21,high:512.37,close:512.25,volume:38992,MA5:512.33,MA10:512.38,MA20:512.22,MA50:512.29,MA100:512.54,RSI:42.215038074671824,MACDLine:.28287845307579573,SignalLine:.09611241671424922,MACDHistogram:.1867660363615465},{date:"2024-11-12 12:41:00",open:512.19,low:512.0501,high:512.34,close:512.2799,volume:42449,MA5:512.3,MA10:512.37,MA20:512.25,MA50:512.28,MA100:512.53,RSI:39.94002673594833,MACDLine:.2821258985126178,SignalLine:.13674866127905078,MACDHistogram:.14537723723356705},{date:"2024-11-12 12:42:00",open:512.28,low:512.02,high:512.28,close:512.0275,volume:20445,MA5:512.25,MA10:512.34,MA20:512.26,MA50:512.26,MA100:512.52,RSI:44.40419717123677,MACDLine:.2846071703462485,SignalLine:.1727988131985887,MACDHistogram:.1118083571476598},{date:"2024-11-12 12:43:00",open:512.03,low:511.86,high:512.03,close:511.89,volume:28583,MA5:512.16,MA10:512.27,MA20:512.27,MA50:512.24,MA100:512.51,RSI:37.194362891964474,MACDLine:.26072534391795443,SignalLine:.19952331791457278,MACDHistogram:.06120202600338165},{date:"2024-11-12 12:44:00",open:511.9,low:511.82,high:511.9881,close:511.87,volume:16862,MA5:512.06,MA10:512.22,MA20:512.26,MA50:512.22,MA100:512.49,RSI:36.46066642397482,MACDLine:.2505238077288823,SignalLine:.21521694079117454,MACDHistogram:.03530686693770774},{date:"2024-11-12 12:45:00",open:511.8999,low:511.64,high:511.96,close:511.7,volume:204507,MA5:511.95,MA10:512.14,MA20:512.25,MA50:512.19,MA100:512.48,RSI:32.261834385356124,MACDLine:.20422347888052172,SignalLine:.2161424567031251,MACDHistogram:-.011918977822603372},{date:"2024-11-12 12:46:00",open:511.72,low:511.57,high:511.76,close:511.7,volume:44726,MA5:511.84,MA10:512.07,MA20:512.22,MA50:512.17,MA100:512.46,RSI:35.0584811318152,MACDLine:.15373271036679625,SignalLine:.20195878404806727,MACDHistogram:-.04822607368127102},{date:"2024-11-12 12:47:00",open:511.72,low:511.62,high:511.76,close:511.68,volume:17636,MA5:511.77,MA10:512.01,MA20:512.19,MA50:512.16,MA100:512.45,RSI:25.352098238434053,MACDLine:.07428838094932644,SignalLine:.18493533118939592,MACDHistogram:-.11064695024006949},{date:"2024-11-12 12:48:00",open:511.6999,low:511.6,high:511.99,close:511.69,volume:65065,MA5:511.73,MA10:511.94,MA20:512.17,MA50:512.14,MA100:512.43,RSI:27.535890765383115,MACDLine:-.009210212320908795,SignalLine:.16669567700511878,MACDHistogram:-.17590588932602758},{date:"2024-11-12 12:49:00",open:511.71,low:511.5,high:511.72,close:511.5401,volume:38822,MA5:511.66,MA10:511.86,MA20:512.13,MA50:512.13,MA100:512.42,MA200:513.06,RSI:23.45417228676675,MACDLine:-.0757235410066528,SignalLine:.13764998298744954,MACDHistogram:-.21337352399410234},{date:"2024-11-12 12:50:00",open:511.551,low:511.49,high:511.64,close:511.52,volume:27974,MA5:511.63,MA10:511.79,MA20:512.09,MA50:512.12,MA100:512.41,MA200:513.05,RSI:24.748625915741485,MACDLine:-.16002639265997232,SignalLine:.10153100410615748,MACDHistogram:-.26155739676612977},{date:"2024-11-12 12:51:00",open:511.525,low:511.51,high:511.66,close:511.54,volume:29891,MA5:511.59,MA10:511.72,MA20:512.04,MA50:512.11,MA100:512.39,MA200:513.04,RSI:26.996898372207028,MACDLine:-.2451543757860577,SignalLine:.05576196254613472,MACDHistogram:-.30091633833219245},{date:"2024-11-12 12:52:00",open:511.5201,low:511.235,high:511.5201,close:511.27,volume:67876,MA5:511.51,MA10:511.64,MA20:511.99,MA50:512.09,MA100:512.38,MA200:513.04,RSI:22.9997338273744,MACDLine:-.3104973015101109,SignalLine:.0045211172031797975,MACDHistogram:-.3150184187132907},{date:"2024-11-12 12:53:00",open:511.2699,low:511.23,high:511.32,close:511.3,volume:52456,MA5:511.43,MA10:511.58,MA20:511.93,MA50:512.07,MA100:512.36,MA200:513.02,RSI:23.446767540266066,MACDLine:-.3900914023213886,SignalLine:-.05697955542824583,MACDHistogram:-.33311184689314277},{date:"2024-11-12 12:54:00",open:511.2994,low:511.21,high:511.45,close:511.43,volume:53796,MA5:511.41,MA10:511.54,MA20:511.88,MA50:512.05,MA100:512.35,MA200:513.01,RSI:24.632280015138022,MACDLine:-.45382799786864325,SignalLine:-.12228031400543772,MACDHistogram:-.33154768386320554},{date:"2024-11-12 12:55:00",open:511.44,low:511.27,high:511.4653,close:511.32,volume:29527,MA5:511.37,MA10:511.5,MA20:511.82,MA50:512.03,MA100:512.34,MA200:513,RSI:23.2861296832571,MACDLine:-.4907597543980273,SignalLine:-.19128357009849623,MACDHistogram:-.2994761842995311},{date:"2024-11-12 12:56:00",open:511.31,low:510.6501,high:511.32,close:510.73,volume:105571,MA5:511.21,MA10:511.4,MA20:511.74,MA50:511.99,MA100:512.32,MA200:512.98,RSI:27.077033306306078,MACDLine:-.5321597817588781,SignalLine:-.2576765578604519,MACDHistogram:-.2744832238984262},{date:"2024-11-12 12:57:00",open:510.7,low:510.35,high:510.7,close:510.45,volume:109590,MA5:511.05,MA10:511.28,MA20:511.64,MA50:511.95,MA100:512.29,MA200:512.96,RSI:29.50699287560434,MACDLine:-.5453334925829267,SignalLine:-.31979314424533767,MACDHistogram:-.22554034833758907},{date:"2024-11-12 12:58:00",open:510.42,low:510.15,high:510.57,close:510.16,volume:81421,MA5:510.82,MA10:511.13,MA20:511.53,MA50:511.91,MA100:512.26,MA200:512.94,RSI:29.869037252967047,MACDLine:-.5755249054153637,SignalLine:-.3808105450550089,MACDHistogram:-.19471436036035483},{date:"2024-11-12 12:59:00",open:510.14,low:510.1,high:510.45,close:510.1,volume:80570,MA5:510.55,MA10:510.98,MA20:511.42,MA50:511.87,MA100:512.23,MA200:512.92,RSI:33.07183398656302,MACDLine:-.5942706737154708,SignalLine:-.43600658315376806,MACDHistogram:-.15826409056170276},{date:"2024-11-12 13:00:00",open:510.08,low:509.83,high:510.21,close:510.08,volume:142255,MA5:510.3,MA10:510.84,MA20:511.31,MA50:511.83,MA100:512.2,MA200:512.9,RSI:33.07183398656302,MACDLine:-.6333349718189538,SignalLine:-.48371963499569565,MACDHistogram:-.14961533682325817},{date:"2024-11-12 13:01:00",open:510.06,low:509.85,high:510.3,close:510.08,volume:91509,MA5:510.17,MA10:510.69,MA20:511.2,MA50:511.78,MA100:512.17,MA200:512.88,RSI:33.435521136545674,MACDLine:-.6508012581718958,SignalLine:-.5270252183670918,MACDHistogram:-.123776039804804},{date:"2024-11-12 13:02:00",open:510.08,low:510.08,high:510.62,close:510.5399,volume:89535,MA5:510.19,MA10:510.62,MA20:511.13,MA50:511.75,MA100:512.14,MA200:512.87,RSI:33.09391899053499,MACDLine:-.6801905726343875,SignalLine:-.5612586723785176,MACDHistogram:-.11893190025586997},{date:"2024-11-12 13:03:00",open:510.5,low:510.41,high:510.71,close:510.55,volume:81655,MA5:510.27,MA10:510.54,MA20:511.06,MA50:511.73,MA100:512.12,MA200:512.85,RSI:35.63975050779125,MACDLine:-.7347901620372568,SignalLine:-.5881163410059861,MACDHistogram:-.1466738210312707},{date:"2024-11-12 13:04:00",open:510.54,low:510.21,high:510.55,close:510.23,volume:37941,MA5:510.3,MA10:510.42,MA20:510.98,MA50:511.69,MA100:512.1,MA200:512.83,RSI:35.98442229431818,MACDLine:-.7490639628818485,SignalLine:-.6124554876579758,MACDHistogram:-.13660847522387276},{date:"2024-11-12 13:05:00",open:510.21,low:510.18,high:510.45,close:510.3099,volume:67123,MA5:510.34,MA10:510.32,MA20:510.91,MA50:511.65,MA100:512.07,MA200:512.82,RSI:35.407251831744745,MACDLine:-.7800961383179583,SignalLine:-.6325294141327501,MACDHistogram:-.14756672418520822},{date:"2024-11-12 13:06:00",open:510.29,low:510.03,high:510.35,close:510.08,volume:67759,MA5:510.34,MA10:510.26,MA20:510.83,MA50:511.61,MA100:512.05,MA200:512.8,RSI:39.91902712734999,MACDLine:-.8533758074990487,SignalLine:-.654328394520206,MACDHistogram:-.19904741297884276},{date:"2024-11-12 13:07:00",open:510.1,low:510.02,high:510.14,close:510.095,volume:95713,MA5:510.25,MA10:510.22,MA20:510.75,MA50:511.57,MA100:512.02,MA200:512.78,RSI:39.11861703049359,MACDLine:-.9240298462356691,SignalLine:-.6740292667964165,MACDHistogram:-.2500005794392526},{date:"2024-11-12 13:08:00",open:510.095,low:510.07,high:510.34,close:510.26,volume:75093,MA5:510.19,MA10:510.23,MA20:510.68,MA50:511.54,MA100:511.99,MA200:512.76,RSI:35.67015439020177,MACDLine:-.9276511124596709,SignalLine:-.6939689150666529,MACDHistogram:-.233682197393018},{date:"2024-11-12 13:09:00",open:510.27,low:510.25,high:510.5,close:510.47,volume:78891,MA5:510.24,MA10:510.27,MA20:510.63,MA50:511.5,MA100:511.97,MA200:512.75,RSI:37.33158454896709,MACDLine:-.8977436942589065,SignalLine:-.7091274008785777,MACDHistogram:-.18861629338032881},{date:"2024-11-12 13:10:00",open:510.4724,low:510.459648,high:510.69,close:510.65,volume:93135,MA5:510.31,MA10:510.33,MA20:510.58,MA50:511.48,MA100:511.95,MA200:512.73,RSI:48.60760877908448,MACDLine:-.8163310449298251,SignalLine:-.7237089365552483,MACDHistogram:-.09262210837457685},{date:"2024-11-12 13:11:00",open:510.645,low:510.6104,high:510.76,close:510.64,volume:124044,MA5:510.42,MA10:510.38,MA20:510.54,MA50:511.46,MA100:511.92,MA200:512.71,RSI:56.07105960920369,MACDLine:-.7281086300417314,SignalLine:-.7345885275354634,MACDHistogram:.006479897493732012},{date:"2024-11-12 13:12:00",open:510.62,low:510.61,high:510.7099,close:510.67,volume:21671,MA5:510.54,MA10:510.4,MA20:510.51,MA50:511.44,MA100:511.9,MA200:512.7,RSI:65.78558121340505,MACDLine:-.6245504404203075,SignalLine:-.7345381189100151,MACDHistogram:.10998767848970759},{date:"2024-11-12 13:13:00",open:510.68,low:510.665,high:510.98,close:510.98,volume:79366,MA5:510.68,MA10:510.44,MA20:510.49,MA50:511.42,MA100:511.88,MA200:512.68,RSI:68.05066136571551,MACDLine:-.5084517992610245,SignalLine:-.7309066579170567,MACDHistogram:.2224548586560322},{date:"2024-11-12 13:14:00",open:510.9701,low:510.89,high:511.06,close:511.02,volume:48271,MA5:510.79,MA10:510.52,MA20:510.47,MA50:511.4,MA100:511.86,MA200:512.66,RSI:68.78370953639538,MACDLine:-.45896296201027553,SignalLine:-.7186092878168313,MACDHistogram:.2596463258065558},{date:"2024-11-12 13:15:00",open:511.03,low:511.02,high:511.275,close:511.15,volume:40536,MA5:510.89,MA10:510.6,MA20:510.46,MA50:511.38,MA100:511.85,MA200:512.65,RSI:68.78370953639538,MACDLine:-.4196784757446608,SignalLine:-.6849176578962769,MACDHistogram:.2652391821516161},{date:"2024-11-12 13:16:00",open:511.16,low:511.11,high:511.32,close:511.1399,volume:41192,MA5:510.99,MA10:510.71,MA20:510.48,MA50:511.36,MA100:511.83,MA200:512.63,RSI:60.30573827613475,MACDLine:-.3212604081730319,SignalLine:-.6251396108114289,MACDHistogram:.30387920263839696},{date:"2024-11-12 13:17:00",open:511.12,low:511.05,high:511.25,close:511.22,volume:38180,MA5:511.1,MA10:510.82,MA20:510.52,MA50:511.34,MA100:511.81,MA200:512.62,RSI:60.084671419292754,MACDLine:-.22266119598992873,SignalLine:-.5495117353993684,MACDHistogram:.32685053940943964},{date:"2024-11-12 13:18:00",open:511.22,low:511.2,high:511.34,close:511.26,volume:538823,MA5:511.16,MA10:510.92,MA20:510.58,MA50:511.32,MA100:511.8,MA200:512.6,RSI:71.85850867558997,MACDLine:-.09126640231636429,SignalLine:-.4624537456844839,MACDHistogram:.3711873433681196},{date:"2024-11-12 13:19:00",open:511.215,low:511.21,high:511.722,close:511.59,volume:71787,MA5:511.27,MA10:511.03,MA20:510.65,MA50:511.31,MA100:511.8,MA200:512.59,RSI:70.5191191085986,MACDLine:.06013228200612275,SignalLine:-.3739844208731486,MACDHistogram:.43411670287927134},{date:"2024-11-12 13:20:00",open:511.65,low:511.3836,high:511.65,close:511.3836,volume:45369,MA5:511.32,MA10:511.11,MA20:510.72,MA50:511.29,MA100:511.78,MA200:512.57,RSI:80.79317670833586,MACDLine:.21537013316680031,SignalLine:-.2854533685810029,MACDHistogram:.5008235017478032},{date:"2024-11-12 13:21:00",open:511.34,low:511.34,high:511.5399,close:511.46,volume:24648,MA5:511.38,MA10:511.19,MA20:510.78,MA50:511.27,MA100:511.77,MA200:512.56,RSI:80.62213236860887,MACDLine:.3463774248930349,SignalLine:-.20067910062117672,MACDHistogram:.5470565255142117},{date:"2024-11-12 13:22:00",open:511.47,low:510.96,high:511.47,close:511.0124,volume:57359,MA5:511.34,MA10:511.22,MA20:510.81,MA50:511.24,MA100:511.76,MA200:512.54,RSI:78.6830992293325,MACDLine:.41626124197063064,SignalLine:-.12373592596121476,MACDHistogram:.5399971679318454},{date:"2024-11-12 13:23:00",open:511.02,low:511.01,high:511.27,close:511.27,volume:63739,MA5:511.34,MA10:511.25,MA20:510.84,MA50:511.22,MA100:511.75,MA200:512.53,RSI:75.82411100474864,MACDLine:.4776582413392134,SignalLine:-.03992916694894956,MACDHistogram:.517587408288163},{date:"2024-11-12 13:24:00",open:511.28,low:511.09,high:511.3,close:511.2484,volume:34792,MA5:511.27,MA10:511.27,MA20:510.9,MA50:511.19,MA100:511.74,MA200:512.52,RSI:72.9349952862542,MACDLine:.5231844733864932,SignalLine:.05500816024997825,MACDHistogram:.468176313136515},{date:"2024-11-12 13:25:00",open:511.24,low:511.16,high:511.25,close:511.18,volume:19881,MA5:511.23,MA10:511.28,MA20:510.94,MA50:511.17,MA100:511.73,MA200:512.51,RSI:73.38742062409153,MACDLine:.5199370899503037,SignalLine:.1490753023557308,MACDHistogram:.37086178759457294},{date:"2024-11-12 13:26:00",open:511.15,low:511.11,high:511.27,close:511.205,volume:37943,MA5:511.18,MA10:511.28,MA20:511,MA50:511.14,MA100:511.72,MA200:512.5,RSI:72.91946489004857,MACDLine:.512156799237971,SignalLine:.24200942694214567,MACDHistogram:.2701473722958253},{date:"2024-11-12 13:27:00",open:511.21,low:511.145,high:511.28,close:511.225,volume:19340,MA5:511.23,MA10:511.28,MA20:511.05,MA50:511.12,MA100:511.71,MA200:512.5,RSI:67.42298189972834,MACDLine:.4848131292852713,SignalLine:.3253283842567732,MACDHistogram:.15948474502849813},{date:"2024-11-12 13:28:00",open:511.22,low:511.168,high:511.3696,close:511.3696,volume:26447,MA5:511.25,MA10:511.29,MA20:511.11,MA50:511.1,MA100:511.7,MA200:512.49,RSI:66.61100321057441,MACDLine:.49705283593783633,SignalLine:.3916274098194358,MACDHistogram:.10542542611840056},{date:"2024-11-12 13:29:00",open:511.36,low:511.35,high:511.51,close:511.43,volume:49272,MA5:511.28,MA10:511.28,MA20:511.16,MA50:511.08,MA100:511.69,MA200:512.48,RSI:63.89520929274994,MACDLine:.5004169293607674,SignalLine:.4356917289825946,MACDHistogram:.06472520037817281},{date:"2024-11-12 13:30:00",open:511.38,low:511.38,high:511.7,close:511.6899,volume:29177,MA5:511.38,MA10:511.31,MA20:511.21,MA50:511.07,MA100:511.68,MA200:512.46,RSI:64.27235659280517,MACDLine:.474304671448067,SignalLine:.45802030500498453,MACDHistogram:.016284366443082454},{date:"2024-11-12 13:31:00",open:511.68,low:511.68,high:511.78,close:511.76,volume:49500,MA5:511.49,MA10:511.34,MA20:511.26,MA50:511.06,MA100:511.67,MA200:512.45,RSI:62.64877540705427,MACDLine:.3954507761275181,SignalLine:.468460070763573,MACDHistogram:-.07300929463605488},{date:"2024-11-12 13:32:00",open:511.79,low:511.79,high:512.07,close:512.0499,volume:68792,MA5:511.66,MA10:511.44,MA20:511.33,MA50:511.06,MA100:511.66,MA200:512.44,RSI:61.84475574605267,MACDLine:.3268074293565064,SignalLine:.4661605281196629,MACDHistogram:-.1393530987631565},{date:"2024-11-12 13:33:00",open:512.05,low:511.9,high:512.06,close:511.9701,volume:44187,MA5:511.78,MA10:511.51,MA20:511.38,MA50:511.07,MA100:511.65,MA200:512.43,RSI:54.310351748957,MACDLine:.2407105405054608,SignalLine:.45190454180295536,MACDHistogram:-.21119400129749455},{date:"2024-11-12 13:34:00",open:511.96,low:511.9001,high:512.11,close:512.05,volume:35015,MA5:511.9,MA10:511.59,MA20:511.43,MA50:511.07,MA100:511.64,MA200:512.43,RSI:61.345777979453025,MACDLine:.2417547217827405,SignalLine:.43489640476611824,MACDHistogram:-.19314168298337775},{date:"2024-11-12 13:35:00",open:512.06,low:512.0551,high:512.54,close:512.2801,volume:88381,MA5:512.02,MA10:511.7,MA20:511.49,MA50:511.08,MA100:511.64,MA200:512.42,RSI:59.544484313802954,MACDLine:.22047868084166566,SignalLine:.4155813061481551,MACDHistogram:-.19510262530648942},{date:"2024-11-12 13:36:00",open:512.32,low:512.235,high:512.39,close:512.235,volume:46582,MA5:512.12,MA10:511.81,MA20:511.54,MA50:511.09,MA100:511.63,MA200:512.41,RSI:79.76623268472649,MACDLine:.22007938959183093,SignalLine:.398273350363876,MACDHistogram:-.17819396077204508},{date:"2024-11-12 13:37:00",open:512.26,low:512.13,high:512.31,close:512.139,volume:19286,MA5:512.13,MA10:511.9,MA20:511.59,MA50:511.1,MA100:511.63,MA200:512.4,RSI:75.27981154532795,MACDLine:.23670895763893895,SignalLine:.37357847897038593,MACDHistogram:-.13686952133144697},{date:"2024-11-12 13:38:00",open:512.142,low:512.0401,high:512.25,close:512.0625,volume:40253,MA5:512.15,MA10:511.97,MA20:511.63,MA50:511.11,MA100:511.63,MA200:512.39,RSI:76.60228889540831,MACDLine:.26020038510790755,SignalLine:.34186886637279057,MACDHistogram:-.08166848126488302},{date:"2024-11-12 13:39:00",open:512.08,low:511.97,high:512.14,close:512.0299,volume:38896,MA5:512.15,MA10:512.03,MA20:511.65,MA50:511.12,MA100:511.62,MA200:512.39,RSI:80.77485852495647,MACDLine:.3153447105667624,SignalLine:.3087599151039715,MACDHistogram:.006584795462790893},{date:"2024-11-12 13:40:00",open:512.01,low:512.01,high:512.1,close:512.06,volume:19542,MA5:512.11,MA10:512.06,MA20:511.69,MA50:511.13,MA100:511.62,MA200:512.38,RSI:80.41275357913317,MACDLine:.36161481745330093,SignalLine:.28708719984808484,MACDHistogram:.07452761760521609},{date:"2024-11-12 13:41:00",open:512.12,low:512.0499,high:512.16,close:512.0699,volume:19339,MA5:512.07,MA10:512.09,MA20:511.72,MA50:511.14,MA100:511.62,MA200:512.37,RSI:80.13480591510586,MACDLine:.4199157201709909,SignalLine:.27715714247097945,MACDHistogram:.14275857770001144},{date:"2024-11-12 13:42:00",open:512.07,low:512.03,high:512.21,close:512.1583,volume:41936,MA5:512.08,MA10:512.11,MA20:511.77,MA50:511.16,MA100:511.62,MA200:512.36,RSI:78.04302730846614,MACDLine:.4442311891645545,SignalLine:.2862687929623591,MACDHistogram:.15796239620219543},{date:"2024-11-12 13:43:00",open:512.14,low:512.14,high:512.3899,close:512.26,volume:158716,MA5:512.12,MA10:512.13,MA20:511.82,MA50:511.18,MA100:511.62,MA200:512.36,RSI:77.10807562194083,MACDLine:.4704675704738861,SignalLine:.2973973107572637,MACDHistogram:.17307025971662238},{date:"2024-11-12 13:44:00",open:512.26,low:512.24,high:512.48,close:512.41,volume:21002,MA5:512.19,MA10:512.17,MA20:511.88,MA50:511.2,MA100:511.62,MA200:512.35,RSI:72.41478121646091,MACDLine:.4554570234109292,SignalLine:.31662696823616326,MACDHistogram:.13883005517476593},{date:"2024-11-12 13:45:00",open:512.42,low:512.3,high:512.43,close:512.4101,volume:19078,MA5:512.26,MA10:512.18,MA20:511.94,MA50:511.22,MA100:511.62,MA200:512.34,RSI:70.9216705314025,MACDLine:.48207182300097884,SignalLine:.34076386289724636,MACDHistogram:.14130796010373248},{date:"2024-11-12 13:46:00",open:512.44,low:512.31,high:512.47,close:512.41,volume:19256,MA5:512.33,MA10:512.2,MA20:512,MA50:511.25,MA100:511.62,MA200:512.34,RSI:63.29164463440503,MACDLine:.483519486143166,SignalLine:.36677758921182324,MACDHistogram:.11674189693134274},{date:"2024-11-12 13:47:00",open:512.4,low:512.37,high:512.5699,close:512.41,volume:18359,MA5:512.38,MA10:512.23,MA20:512.06,MA50:511.29,MA100:511.62,MA200:512.33,RSI:67.84177403491628,MACDLine:.45230294730072274,SignalLine:.39342189023780216,MACDHistogram:.05888105706292057},{date:"2024-11-12 13:48:00",open:512.41,low:512.25,high:512.4802,close:512.37,volume:23295,MA5:512.4,MA10:512.26,MA20:512.11,MA50:511.33,MA100:511.62,MA200:512.32,RSI:65.5383571359952,MACDLine:.3902010675810743,SignalLine:.4129411851555621,MACDHistogram:-.022740117574487795},{date:"2024-11-12 13:49:00",open:512.35,low:512.29,high:512.38,close:512.3,volume:11570,MA5:512.38,MA10:512.29,MA20:512.16,MA50:511.38,MA100:511.62,MA200:512.32,RSI:57.373576579765086,MACDLine:.3611066528468996,SignalLine:.42577277708112743,MACDHistogram:-.06466612423422785},{date:"2024-11-12 13:50:00",open:512.29,low:512.285,high:512.63,close:512.6,volume:57074,MA5:512.42,MA10:512.34,MA20:512.2,MA50:511.43,MA100:511.63,MA200:512.31,RSI:59.95904032547825,MACDLine:.3435402303628621,SignalLine:.4272370413086616,MACDHistogram:-.0836968109457995},{date:"2024-11-12 13:51:00",open:512.6,low:512.39,high:512.62,close:512.44,volume:28184,MA5:512.42,MA10:512.38,MA20:512.24,MA50:511.48,MA100:511.63,MA200:512.3,RSI:65.82186222312278,MACDLine:.32841886595070946,SignalLine:.4229885043446884,MACDHistogram:-.09456963839397892},{date:"2024-11-12 13:52:00",open:512.45,low:512.45,high:512.54,close:512.47,volume:20723,MA5:512.44,MA10:512.41,MA20:512.26,MA50:511.51,MA100:511.63,MA200:512.29,RSI:70.95573433480514,MACDLine:.3132309591417197,SignalLine:.41111873781238895,MACDHistogram:-.09788777867066922},{date:"2024-11-12 13:53:00",open:512.46,low:512.28,high:512.51,close:512.485,volume:54109,MA5:512.46,MA10:512.43,MA20:512.28,MA50:511.55,MA100:511.64,MA200:512.29,RSI:73.21542477703827,MACDLine:.3015259441361877,SignalLine:.40003416641275386,MACDHistogram:-.09850822227656614},{date:"2024-11-12 13:54:00",open:512.49,low:512.49,high:512.66,close:512.6579,volume:39940,MA5:512.53,MA10:512.46,MA20:512.31,MA50:511.6,MA100:511.65,MA200:512.28,RSI:72.46357118670834,MACDLine:.28998498397811545,SignalLine:.3795247522656976,MACDHistogram:-.08953976828758214},{date:"2024-11-12 13:55:00",open:512.65,low:512.645,high:513.01,close:513,volume:58797,MA5:512.61,MA10:512.51,MA20:512.35,MA50:511.66,MA100:511.66,MA200:512.28,RSI:72.22546021802972,MACDLine:.26884964960936486,SignalLine:.35352606879633053,MACDHistogram:-.08467641918696567},{date:"2024-11-12 13:56:00",open:513.02,low:512.91,high:513.13,close:513.11,volume:69e3,MA5:512.74,MA10:512.58,MA20:512.39,MA50:511.72,MA100:511.66,MA200:512.27,RSI:70.080291098245,MACDLine:.24355473702087238,SignalLine:.3288318491702325,MACDHistogram:-.08527711214936012},{date:"2024-11-12 13:57:00",open:513.11,low:513,high:513.25,close:513.17,volume:81914,MA5:512.88,MA10:512.66,MA20:512.44,MA50:511.78,MA100:511.68,MA200:512.27,RSI:67.38966108724856,MACDLine:.22379061605113293,SignalLine:.31348954456752204,MACDHistogram:-.08969892851638911},{date:"2024-11-12 13:58:00",open:513.18,low:513,high:513.275,close:513.01,volume:47618,MA5:512.99,MA10:512.72,MA20:512.49,MA50:511.83,MA100:511.68,MA200:512.26,RSI:62.80909699614252,MACDLine:.2279754563254528,SignalLine:.30158526749767767,MACDHistogram:-.07360981117222487},{date:"2024-11-12 13:59:00",open:513,low:512.84,high:513,close:512.88,volume:69779,MA5:513.03,MA10:512.78,MA20:512.53,MA50:511.88,MA100:511.69,MA200:512.26,RSI:62.805862830954545,MACDLine:.22885464581997894,SignalLine:.29109652678138154,MACDHistogram:-.062241880961402596},{date:"2024-11-12 14:00:00",open:512.87,low:512.77,high:512.95,close:512.89,volume:43439,MA5:513.01,MA10:512.81,MA20:512.58,MA50:511.93,MA100:511.7,MA200:512.25,RSI:62.810934793624064,MACDLine:.2467112891990837,SignalLine:.2817659419890496,MACDHistogram:-.03505465278996589},{date:"2024-11-12 14:01:00",open:512.94,low:512.8825,high:513.02,close:512.946896,volume:26857,MA5:512.98,MA10:512.86,MA20:512.62,MA50:511.97,MA100:511.71,MA200:512.25,RSI:62.810934793624064,MACDLine:.3017041498146682,SignalLine:.273899687700882,MACDHistogram:.027804462113786177},{date:"2024-11-12 14:02:00",open:512.9,low:512.86,high:512.95,close:512.95,volume:22622,MA5:512.94,MA10:512.91,MA20:512.66,MA50:512.02,MA100:511.73,MA200:512.24,RSI:64.61050852666895,MACDLine:.30964261336680465,SignalLine:.2669931235920556,MACDHistogram:.04264948977474903},{date:"2024-11-12 14:03:00",open:512.935,low:512.74,high:512.95,close:512.78,volume:29211,MA5:512.89,MA10:512.94,MA20:512.68,MA50:512.05,MA100:511.74,MA200:512.24,RSI:67.76548636975002,MACDLine:.34199108701511705,SignalLine:.2612451584955407,MACDHistogram:.08074592851957635},{date:"2024-11-12 14:04:00",open:512.81,low:512.81,high:512.93,close:512.9001,volume:14193,MA5:512.89,MA10:512.96,MA20:512.71,MA50:512.09,MA100:511.75,MA200:512.24,RSI:59.99060724972724,MACDLine:.3711087230243493,SignalLine:.25934403571708464,MACDHistogram:.11176468730726463},{date:"2024-11-12 14:05:00",open:512.94,low:512.81,high:512.97,close:512.86,volume:46425,MA5:512.89,MA10:512.95,MA20:512.73,MA50:512.13,MA100:511.76,MA200:512.23,RSI:68.12857306530957,MACDLine:.40346746974114467,SignalLine:.2632913603911377,MACDHistogram:.14017610935000696},{date:"2024-11-12 14:06:00",open:512.89,low:512.89,high:513.01,close:512.98,volume:41447,MA5:512.89,MA10:512.94,MA20:512.76,MA50:512.16,MA100:511.76,MA200:512.23,RSI:67.3576144209801,MACDLine:.4164916523543525,SignalLine:.2731665464761389,MACDHistogram:.14332510587821357},{date:"2024-11-12 14:07:00",open:512.98,low:512.91,high:513.1599,close:512.92,volume:100208,MA5:512.89,MA10:512.91,MA20:512.79,MA50:512.2,MA100:511.77,MA200:512.23,RSI:66.98684671171736,MACDLine:.3743459123101047,SignalLine:.2844643190138104,MACDHistogram:.0898815932962943},{date:"2024-11-12 14:08:00",open:512.91,low:512.86,high:512.9999,close:512.86,volume:35792,MA5:512.9,MA10:512.9,MA20:512.81,MA50:512.23,MA100:511.78,MA200:512.22,RSI:62.41785191354346,MACDLine:.3157083181109783,SignalLine:.2983667373122683,MACDHistogram:.01734158079871001},{date:"2024-11-12 14:09:00",open:512.88,low:512.86,high:512.985,close:512.95,volume:43470,MA5:512.91,MA10:512.9,MA20:512.84,MA50:512.26,MA100:511.78,MA200:512.22,RSI:49.60307337528319,MACDLine:.24734312234238587,SignalLine:.31128059934056446,MACDHistogram:-.06393747699817859},{date:"2024-11-12 14:10:00",open:512.94,low:512.74,high:512.96,close:512.95,volume:94886,MA5:512.93,MA10:512.91,MA20:512.86,MA50:512.29,MA100:511.79,MA200:512.21,RSI:43.89066049477753,MACDLine:.21081382705460783,SignalLine:.31367471172203854,MACDHistogram:-.10286088466743071},{date:"2024-11-12 14:11:00",open:512.955,low:512.8983,high:513.01,close:512.91,volume:50773,MA5:512.92,MA10:512.91,MA20:512.88,MA50:512.32,MA100:511.79,MA200:512.21,RSI:40.473212915846915,MACDLine:.19349441631197806,SignalLine:.314682736310847,MACDHistogram:-.12118831999886892},{date:"2024-11-12 14:12:00",open:512.905,low:512.84,high:512.97,close:512.915,volume:62437,MA5:512.92,MA10:512.9,MA20:512.91,MA50:512.35,MA100:511.8,MA200:512.2,RSI:47.661364474756496,MACDLine:.17358281327233271,SignalLine:.30785564863477943,MACDHistogram:-.13427283536244672},{date:"2024-11-12 14:13:00",open:512.915,low:512.8,high:512.9791,close:512.87,volume:48669,MA5:512.92,MA10:512.91,MA20:512.93,MA50:512.39,MA100:511.8,MA200:512.2,RSI:55.03589276103452,MACDLine:.14228061719961715,SignalLine:.292042380037387,MACDHistogram:-.14976176283776982},{date:"2024-11-12 14:14:00",open:512.86,low:512.85,high:512.96,close:512.96,volume:30248,MA5:512.92,MA10:512.92,MA20:512.94,MA50:512.42,MA100:511.81,MA200:512.2,RSI:54.53339718289173,MACDLine:.10430312887115178,SignalLine:.26418610761144756,MACDHistogram:-.15988297874029578},{date:"2024-11-12 14:15:00",open:512.94,low:512.9,high:513.0862,close:513.04,volume:38698,MA5:512.94,MA10:512.94,MA20:512.94,MA50:512.46,MA100:511.81,MA200:512.2,RSI:51.680502565291796,MACDLine:.08805836189367255,SignalLine:.22610972142572133,MACDHistogram:-.13805135953204878},{date:"2024-11-12 14:16:00",open:513.0799,low:512.95,high:513.11,close:512.9701,volume:29329,MA5:512.95,MA10:512.93,MA20:512.94,MA50:512.49,MA100:511.82,MA200:512.2,RSI:51.52641995962017,MACDLine:.07518873768765388,SignalLine:.1890506737046255,MACDHistogram:-.11386193601697162},{date:"2024-11-12 14:17:00",open:512.95,low:512.91,high:513.03,close:513,volume:16482,MA5:512.97,MA10:512.94,MA20:512.93,MA50:512.53,MA100:511.83,MA200:512.19,RSI:61.499938859251806,MACDLine:.05652476297098019,SignalLine:.15738626260303729,MACDHistogram:-.1008614996320571},{date:"2024-11-12 14:18:00",open:513,low:512.99,high:513.13,close:513.04,volume:43044,MA5:513,MA10:512.96,MA20:512.93,MA50:512.56,MA100:511.83,MA200:512.19,RSI:55.90024882303362,MACDLine:.018571475053022368,SignalLine:.13489704766820013,MACDHistogram:-.11632557261517776},{date:"2024-11-12 14:19:00",open:513.025,low:513,high:513.13,close:513.055,volume:11472,MA5:513.02,MA10:512.97,MA20:512.94,MA50:512.59,MA100:511.84,MA200:512.19,RSI:58.54005713800134,MACDLine:-.010613579344749269,SignalLine:.1159178528215982,MACDHistogram:-.12653143216634746},{date:"2024-11-12 14:20:00",open:513.08,low:512.98,high:513.13,close:513.13,volume:17861,MA5:513.04,MA10:512.99,MA20:512.95,MA50:512.62,MA100:511.85,MA200:512.19,RSI:52.27779333510724,MACDLine:-.01664157853110737,SignalLine:.09652371194900324,MACDHistogram:-.1131652904801106},{date:"2024-11-12 14:21:00",open:513.145921,low:513.11,high:513.24,close:513.23,volume:26939,MA5:513.09,MA10:513.02,MA20:512.96,MA50:512.65,MA100:511.86,MA200:512.2,RSI:56.22038496413771,MACDLine:-.010149438168582492,SignalLine:.07725893661817086,MACDHistogram:-.08740837478675335},{date:"2024-11-12 14:22:00",open:513.23,low:512.991,high:513.26,close:513.1397,volume:35135,MA5:513.12,MA10:513.04,MA20:512.97,MA50:512.67,MA100:511.87,MA200:512.19,RSI:60.45393229820329,MACDLine:.00635724917663083,SignalLine:.061003516472809285,MACDHistogram:-.054646267296178455},{date:"2024-11-12 14:23:00",open:513.1499,low:513.09,high:513.18,close:513.14,volume:13693,MA5:513.14,MA10:513.07,MA20:512.99,MA50:512.7,MA100:511.88,MA200:512.19,RSI:55.82008096740297,MACDLine:.037078770127436655,SignalLine:.05017861337322366,MACDHistogram:-.013099843245787002},{date:"2024-11-12 14:24:00",open:513.14,low:513.14,high:513.46,close:513.29,volume:47992,MA5:513.19,MA10:513.1,MA20:513.01,MA50:512.72,MA100:511.9,MA200:512.19,RSI:55.820080967402966,MACDLine:.05826036566645598,SignalLine:.04070867624311143,MACDHistogram:.01755168942334455},{date:"2024-11-12 14:25:00",open:513.31,low:513.31,high:513.41,close:513.3501,volume:33595,MA5:513.23,MA10:513.13,MA20:513.03,MA50:512.74,MA100:511.91,MA200:512.19,RSI:58.44448338894397,MACDLine:.08084836047214594,SignalLine:.03208866088197582,MACDHistogram:.048759699590170125},{date:"2024-11-12 14:26:00",open:513.35,low:512.98,high:513.35,close:513.11,volume:46560,MA5:513.21,MA10:513.15,MA20:513.04,MA50:512.76,MA100:511.93,MA200:512.19,RSI:58.21646468104781,MACDLine:.09279378859901044,SignalLine:.025979635359724727,MACDHistogram:.06681415323928572},{date:"2024-11-12 14:27:00",open:513.11,low:512.9703,high:513.14,close:513.1,volume:29981,MA5:513.2,MA10:513.16,MA20:513.05,MA50:512.78,MA100:511.94,MA200:512.19,RSI:61.014361479751074,MACDLine:.09771517811941521,SignalLine:.027831675436400315,MACDHistogram:.0698835026830149},{date:"2024-11-12 14:28:00",open:513.1093,low:513.0201,high:513.175,close:513.065,volume:18544,MA5:513.18,MA10:513.16,MA20:513.06,MA50:512.8,MA100:511.95,MA200:512.19,RSI:57.19369704186716,MACDLine:.11688699997114327,SignalLine:.03744298913168771,MACDHistogram:.07944401083945556},{date:"2024-11-12 14:29:00",open:513.05,low:513.02,high:513.12,close:513.08,volume:124962,MA5:513.14,MA10:513.16,MA20:513.07,MA50:512.82,MA100:511.97,MA200:512.2,RSI:53.426334094981144,MACDLine:.12091304168029637,SignalLine:.050964131047386486,MACDHistogram:.0699489106329099},{date:"2024-11-12 14:30:00",open:513.11,low:512.99,high:513.14,close:512.9901,volume:20117,MA5:513.07,MA10:513.15,MA20:513.07,MA50:512.84,MA100:511.98,MA200:512.2,RSI:57.534628517538486,MACDLine:.12982827249197726,SignalLine:.06624252335137873,MACDHistogram:.06358574914059853},{date:"2024-11-12 14:31:00",open:513,low:512.99,high:513.18,close:513.16,volume:15252,MA5:513.08,MA10:513.14,MA20:513.08,MA50:512.86,MA100:512,MA200:512.2,RSI:56.196733579201336,MACDLine:.13541857403720314,SignalLine:.08121384189506571,MACDHistogram:.05420473214213743},{date:"2024-11-12 14:32:00",open:513.16,low:513.105,high:513.2299,close:513.1998,volume:12390,MA5:513.1,MA10:513.15,MA20:513.1,MA50:512.88,MA100:512.02,MA200:512.2,RSI:54.41256297763088,MACDLine:.139384106932539,SignalLine:.09224760983697297,MACDHistogram:.04713649709556603},{date:"2024-11-12 14:33:00",open:513.205,low:513.09,high:513.21,close:513.12,volume:20409,MA5:513.11,MA10:513.15,MA20:513.11,MA50:512.9,MA100:512.04,MA200:512.2,RSI:53.75668135892169,MACDLine:.12161816372724843,SignalLine:.10074442087960223,MACDHistogram:.020873742847646204},{date:"2024-11-12 14:34:00",open:513.13,low:513.11,high:513.26,close:513.26,volume:25479,MA5:513.15,MA10:513.14,MA20:513.12,MA50:512.92,MA100:512.06,MA200:512.2,RSI:50.44659678226616,MACDLine:.11330064110916283,SignalLine:.1057184359814663,MACDHistogram:.0075822051276965285},{date:"2024-11-12 14:35:00",open:513.235,low:513.2001,high:513.28,close:513.255,volume:16831,MA5:513.2,MA10:513.13,MA20:513.13,MA50:512.93,MA100:512.08,MA200:512.21,RSI:45.62801372905013,MACDLine:.11225026655142756,SignalLine:.10894959782708026,MACDHistogram:.003300668724347297},{date:"2024-11-12 14:36:00",open:513.26,low:513.2,high:513.32,close:513.32,volume:24386,MA5:513.23,MA10:513.15,MA20:513.15,MA50:512.95,MA100:512.1,MA200:512.21,RSI:49.67860397719392,MACDLine:.0847677846023771,SignalLine:.11175820275399652,MACDHistogram:-.026990418151619414},{date:"2024-11-12 14:37:00",open:513.3,low:513.3,high:513.4699,close:513.4578,volume:54639,MA5:513.28,MA10:513.19,MA20:513.17,MA50:512.97,MA100:512.13,MA200:512.21,RSI:49.66481896339146,MACDLine:.03927533986598064,SignalLine:.11047600344970983,MACDHistogram:-.07120066358372919},{date:"2024-11-12 14:38:00",open:513.44,low:513.2501,high:513.56,close:513.27,volume:44180,MA5:513.31,MA10:513.21,MA20:513.19,MA50:512.99,MA100:512.16,MA200:512.21,RSI:42.32999230621616,MACDLine:.03109516000426993,SignalLine:.10786674389206319,MACDHistogram:-.07677158388779326},{date:"2024-11-12 14:39:00",open:513.27,low:513.23,high:513.39,close:513.2708,volume:79806,MA5:513.31,MA10:513.23,MA20:513.2,MA50:513.01,MA100:512.19,MA200:512.21,RSI:39.02421052947379,MACDLine:.021256528108096973,SignalLine:.10237636174208467,MACDHistogram:-.0811198336339877},{date:"2024-11-12 14:40:00",open:513.27,low:513.19,high:513.3664,close:513.3664,volume:44393,MA5:513.34,MA10:513.27,MA20:513.21,MA50:513.03,MA100:512.23,MA200:512.21,RSI:49.56374074446466,MACDLine:.025298761169892714,SignalLine:.09411580866830505,MACDHistogram:-.06881704749841233},{date:"2024-11-12 14:41:00",open:513.41,low:513.405,high:513.4802,close:513.4201,volume:23220,MA5:513.36,MA10:513.29,MA20:513.22,MA50:513.05,MA100:512.26,MA200:512.22,RSI:50.08690063759009,MACDLine:.035290138479126654,SignalLine:.08279873410224656,MACDHistogram:-.047508595623119904},{date:"2024-11-12 14:42:00",open:513.4,low:513.33,high:513.46,close:513.41,volume:14261,MA5:513.35,MA10:513.32,MA20:513.23,MA50:513.06,MA100:512.29,MA200:512.22,RSI:51.86615390124125,MACDLine:.058864730775894714,SignalLine:.0730938766959961,MACDHistogram:-.014229145920101383},{date:"2024-11-12 14:43:00",open:513.42,low:513.42,high:513.58,close:513.47,volume:209170,MA5:513.39,MA10:513.35,MA20:513.25,MA50:513.08,MA100:512.32,MA200:512.22,RSI:51.17593623959873,MACDLine:.05989026885970361,SignalLine:.06304218559270441,MACDHistogram:-.0031519167330008035},{date:"2024-11-12 14:44:00",open:513.45,low:513.3422,high:513.47,close:513.3422,volume:14892,MA5:513.4,MA10:513.36,MA20:513.25,MA50:513.1,MA100:512.35,MA200:512.22,RSI:55.61410936056585,MACDLine:.05861900628508465,SignalLine:.05074016535302362,MACDHistogram:.00787884093206103},{date:"2024-11-12 14:45:00",open:513.35,low:513.16,high:513.4,close:513.215,volume:49139,MA5:513.37,MA10:513.35,MA20:513.24,MA50:513.1,MA100:512.38,MA200:512.23,RSI:47.646388906515355,MACDLine:.07417722741661237,SignalLine:.04223326054068525,MACDHistogram:.03194396687592712},{date:"2024-11-12 14:46:00",open:513.22,low:513.22,high:513.32,close:513.3101,volume:21941,MA5:513.35,MA10:513.35,MA20:513.25,MA50:513.11,MA100:512.41,MA200:512.23,RSI:45.51903904772499,MACDLine:.0744471427165081,SignalLine:.0429727407093614,MACDHistogram:.0314744020071467},{date:"2024-11-12 14:47:00",open:513.31,low:513.2855,high:513.37,close:513.3,volume:14720,MA5:513.33,MA10:513.34,MA20:513.26,MA50:513.11,MA100:512.44,MA200:512.23,RSI:49.24454759522518,MACDLine:.08450878525991357,SignalLine:.04594213588563426,MACDHistogram:.0385666493742793},{date:"2024-11-12 14:48:00",open:513.31,low:513.24,high:513.31,close:513.3,volume:11617,MA5:513.29,MA10:513.34,MA20:513.28,MA50:513.11,MA100:512.47,MA200:512.23,RSI:41.43613671089537,MACDLine:.07744333577511497,SignalLine:.05211353783001858,MACDHistogram:.02532979794509639},{date:"2024-11-12 14:49:00",open:513.3,low:513.25,high:513.3499,close:513.25,volume:15799,MA5:513.28,MA10:513.34,MA20:513.28,MA50:513.12,MA100:512.5,MA200:512.24,RSI:41.64862643040008,MACDLine:.04489080445773652,SignalLine:.058817231995050054,MACDHistogram:-.013926427537313532},{date:"2024-11-12 14:50:00",open:513.22,low:513.201,high:513.3312,close:513.21,volume:23268,MA5:513.27,MA10:513.32,MA20:513.3,MA50:513.13,MA100:512.53,MA200:512.24,RSI:37.79809171283182,MACDLine:.053456980056921566,SignalLine:.06469900537403091,MACDHistogram:-.011242025317109341},{date:"2024-11-12 14:51:00",open:513.21,low:513.15,high:513.25,close:513.2,volume:133520,MA5:513.25,MA10:513.3,MA20:513.3,MA50:513.13,MA100:512.55,MA200:512.24,RSI:28.511476163789723,MACDLine:.06798461538448919,SignalLine:.06615757402356495,MACDHistogram:.0018270413609242364}]}firstUpdated(){this._createChart()}willUpdate(t){return i(this,void 0,void 0,(function*(){t.has("stockData")&&(this.chart?this._updateChart():this._createChart())}))}_getChartData(){return{dates:this.stockData.map((t=>t.date)),closePrices:this.stockData.map((t=>t.close)),ma5:this.stockData.map((t=>{var e;return null!==(e=t.MA5)&&void 0!==e?e:null})),ma10:this.stockData.map((t=>{var e;return null!==(e=t.MA10)&&void 0!==e?e:null})),ma20:this.stockData.map((t=>{var e;return null!==(e=t.MA20)&&void 0!==e?e:null})),ma50:this.stockData.map((t=>{var e;return null!==(e=t.MA50)&&void 0!==e?e:null})),ma100:this.stockData.map((t=>{var e;return null!==(e=t.MA100)&&void 0!==e?e:null})),ma200:this.stockData.map((t=>{var e;return null!==(e=t.MA200)&&void 0!==e?e:null})),RSI:this.stockData.map((t=>{var e;return null!==(e=t.RSI)&&void 0!==e?e:null})),MACDLine:this.stockData.map((t=>{var e;return null!==(e=t.MACDLine)&&void 0!==e?e:null})),SignalLine:this.stockData.map((t=>{var e;return null!==(e=t.SignalLine)&&void 0!==e?e:null})),MACDHistogram:this.stockData.map((t=>{var e;return null!==(e=t.MACDHistogram)&&void 0!==e?e:null})),volumes:this.stockData.map((t=>{var e;return null!==(e=t.volume)&&void 0!==e?e:0}))}}_updateChart(){if(this.chart){const{dates:t,closePrices:e,ma5:i,ma10:n,ma20:o,ma50:s,ma100:a,ma200:r,RSI:l,MACDLine:h,SignalLine:c,MACDHistogram:d,volumes:u}=this._getChartData();this.chart.data.labels=t,this.chart.data.datasets[0].data=l,this.chart.data.datasets[1].data=d,this.chart.data.datasets[2].data=c,this.chart.data.datasets[3].data=h,this.chart.data.datasets[4].data=e,this.chart.data.datasets[5].data=o,this.chart.data.datasets[6].data=s,this.chart.data.datasets[7].data=a,this.chart.data.datasets[8].data=r,this.chart.data.datasets[9].data=u,this.chart.data.datasets[10].data=n,this.chart.data.datasets[11].data=i,this.chart.update()}}_createChart(){var t;const{dates:e,closePrices:i,ma5:n,ma10:o,ma20:s,ma50:a,ma100:r,ma200:l,RSI:h,MACDLine:c,SignalLine:d,MACDHistogram:u,volumes:g}=this._getChartData(),p=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("stockChart");if(!p)return;const M=p.getContext("2d");M&&(this.chart&&this.chart.destroy(),Gr.register(this.customLinePlugin),this.chart=new Gr(M,{type:"line",data:{labels:e,datasets:[{label:"RSI",data:h,borderColor:"rgba(15, 92, 92, 1)",backgroundColor:"rgba(15, 92, 92, 0.2)",fill:!1,borderWidth:2,yAxisID:"yRSI",pointRadius:1,pointHoverRadius:3,hidden:!0},{label:"MACDHistogram",data:u,borderColor:"rgba(175, 92, 92, 1)",backgroundColor:"rgba(175, 92, 92, 0.2)",fill:!1,borderWidth:2,yAxisID:"yMACD",hidden:!0,pointRadius:1,pointHoverRadius:3},{label:"SignalLine",data:d,borderColor:"rgba(75, 92, 192, 1)",backgroundColor:"rgba(75, 92, 192, 0.2)",fill:!1,borderWidth:1,yAxisID:"yMACD",hidden:!0,pointRadius:1,pointHoverRadius:3},{label:"MACDLine",data:c,borderColor:"rgba(175, 192, 192, 1)",backgroundColor:"rgba(175, 192, 192, 0.2)",fill:!1,borderWidth:1,yAxisID:"yMACD",hidden:!0,pointRadius:1,pointHoverRadius:3},{label:"Close Price",data:i,borderColor:"rgba(75, 192, 192, 1)",backgroundColor:"rgba(75, 192, 192, 0.2)",fill:!0,borderWidth:1,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"MA20",data:s,borderColor:"rgba(255, 99, 132, 1)",backgroundColor:"rgba(255, 99, 132, 0.2)",fill:!1,borderWidth:2,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"MA50",data:a,borderColor:"rgba(255, 206, 86, 1)",backgroundColor:"rgba(255, 206, 86, 0.2)",fill:!1,borderWidth:2,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"MA100",data:r,borderColor:"rgba(153, 102, 25, 1)",backgroundColor:"rgba(153, 102, 25, 0.2)",fill:!1,borderWidth:2,yAxisID:"yPrice",hidden:!0,pointRadius:1,pointHoverRadius:3},{label:"MA200",data:l,borderColor:"rgba(153, 102, 255, 1)",backgroundColor:"rgba(153, 102, 255, 0.2)",fill:!1,borderWidth:2,yAxisID:"yPrice",hidden:!0,pointRadius:1,pointHoverRadius:3},{label:"Volume",data:g,yAxisID:"yVolume",fill:!0,backgroundColor:"rgba(252, 3, 57, 0.5)",borderWidth:1,hidden:!0,pointRadius:1,pointHoverRadius:3},{label:"MA10",data:o,borderColor:"rgba(153, 12, 25, 1)",backgroundColor:"rgba(153, 12, 25, 0.2)",fill:!1,borderWidth:1,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"MA5",data:n,borderColor:"rgba(13, 12, 25, 1)",backgroundColor:"rgba(13, 12, 25, 0.2)",fill:!1,borderWidth:1,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3}]},options:{responsive:!0,scales:{yPrice:{type:"linear",position:"left",beginAtZero:!1,title:{display:!0,text:"Price"}},yRSI:{type:"linear",position:"right",beginAtZero:!0,title:{display:!0,text:"RSI"},grid:{drawOnChartArea:!1}},yMACD:{type:"linear",position:"right",beginAtZero:!0,title:{display:!0,text:"MACD"},grid:{drawOnChartArea:!1}},yVolume:{type:"linear",position:"left",beginAtZero:!0,title:{display:!0,text:"Volume"},grid:{drawOnChartArea:!1}}},interaction:{mode:"index",intersect:!1},plugins:{tooltip:{mode:"index",axis:"x"}}}}))}render(){return W`<canvas id="stockChart"></canvas>`}};t([dt({type:Array}),e("design:type",Array)],Jr.prototype,"stockData",void 0),Jr=t([lt("stock-chart-display"),e("design:paramtypes",[])],Jr);
529
+ */function Kt(){}const Zt=(()=>{let t=0;return()=>t++})();function Gt(t){return null==t}function Jt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Qt(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function te(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function ee(t,e){return te(t)?t:e}function ie(t,e){return void 0===t?e:t}const se=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ne(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function oe(t,e,i,s){let n,o,r;if(Jt(t))if(o=t.length,s)for(n=o-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;n<o;n++)e.call(i,t[n],n);else if(Qt(t))for(r=Object.keys(t),o=r.length,n=0;n<o;n++)e.call(i,t[r[n]],r[n])}function re(t,e){let i,s,n,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],o=e[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function ae(t){if(Jt(t))return t.map(ae);if(Qt(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=ae(t[i[n]]);return e}return t}function le(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function he(t,e,i,s){if(!le(t))return;const n=e[t],o=i[t];Qt(n)&&Qt(o)?ce(n,o,s):e[t]=ae(o)}function ce(t,e,i){const s=Jt(e)?e:[e],n=s.length;if(!Qt(t))return t;const o=(i=i||{}).merger||he;let r;for(let e=0;e<n;++e){if(r=s[e],!Qt(r))continue;const n=Object.keys(r);for(let e=0,s=n.length;e<s;++e)o(n[e],t,r,i)}return t}function de(t,e){return ce(t,e,{merger:ue})}function ue(t,e,i){if(!le(t))return;const s=e[t],n=i[t];Qt(s)&&Qt(n)?de(s,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ae(n))}const fe={"":t=>t,x:t=>t.x,y:t=>t.y};function pe(t,e){const i=fe[e]||(fe[e]=function(t){const e=function(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function ge(t){return t.charAt(0).toUpperCase()+t.slice(1)}const me=t=>void 0!==t,be=t=>"function"==typeof t,xe=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const _e=Math.PI,ye=2*_e,ve=ye+_e,we=Number.POSITIVE_INFINITY,Me=_e/180,ke=_e/2,Se=_e/4,Ae=2*_e/3,Pe=Math.log10,Ce=Math.sign;function De(t,e,i){return Math.abs(t-e)<i}function Oe(t){const e=Math.round(t);t=De(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Pe(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function Ee(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Te(t,e,i){let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Re(t){return t*(_e/180)}function Le(t){return t*(180/_e)}function Ie(t){if(!te(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function ze(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let o=Math.atan2(s,i);return o<-.5*_e&&(o+=ye),{angle:o,distance:n}}function $e(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Fe(t,e){return(t-e+ve)%ye-_e}function Ve(t){return(t%ye+ye)%ye}function He(t,e,i,s){const n=Ve(t),o=Ve(e),r=Ve(i),a=Ve(o-n),l=Ve(r-n),h=Ve(n-o),c=Ve(n-r);return n===o||n===r||s&&o===r||a>l&&h<c}function Ne(t,e,i){return Math.max(e,Math.min(i,t))}function Be(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e-6;return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function We(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,o=0;for(;n-o>1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const je=(t,e,i,s)=>We(t,i,s?s=>{const n=t[s][e];return n<i||n===i&&t[s+1][e]===i}:s=>t[s][e]<i),Ue=(t,e,i)=>We(t,i,(s=>t[s][e]>=i));const Ye=["push","pop","shift","splice","unshift"];function Xe(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(Ye.forEach((e=>{delete t[e]})),delete t._chartjs)}function qe(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Ke="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Ze(t,e){let i=[],s=!1;return function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];i=o,s||(s=!0,Ke.call(window,(()=>{s=!1,t.apply(e,i)})))}}const Ge=t=>"start"===t?"left":"end"===t?"right":"center",Je=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Qe(t,e,i){const s=e.length;let n=0,o=s;if(t._sorted){const{iScale:r,_parsed:a}=t,l=r.axis,{min:h,max:c,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(n=Ne(Math.min(je(a,l,h).lo,i?s:je(e,l,r.getPixelForValue(h)).lo),0,s-1)),o=u?Ne(Math.max(je(a,r.axis,c,!0).hi+1,i?0:je(e,l,r.getPixelForValue(c),!0).hi+1),n,s)-n:s-n}return{start:n,count:o}}function ti(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}const ei=t=>0===t||1===t,ii=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*ye/i),si=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*ye/i)+1,ni={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=>1-Math.cos(t*ke),easeOutSine:t=>Math.sin(t*ke),easeInOutSine:t=>-.5*(Math.cos(_e*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ei(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),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=>ei(t)?t:ii(t,.075,.3),easeOutElastic:t=>ei(t)?t:si(t,.075,.3),easeInOutElastic(t){const e=.1125;return ei(t)?t:t<.5?.5*ii(2*t,e,.45):.5+.5*si(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let 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:t=>1-ni.easeOutBounce(1-t),easeOutBounce(t){const 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:t=>t<.5?.5*ni.easeInBounce(2*t):.5*ni.easeOutBounce(2*t-1)+.5};function oi(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function ri(t){return oi(t)?t:new qt(t)}function ai(t){return oi(t)?t:new qt(t).saturate(.5).darken(.1).hexString()}const li=["x","y","borderWidth","radius","tension"],hi=["color","borderColor","backgroundColor"];const ci=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=ci.get(i);return s||(s=new Intl.NumberFormat(t,e),ci.set(i,s)),s}(e,i).format(t)}const ui={values:t=>Jt(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let 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)}const r=Pe(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,s,l)},logarithmic(t,e,i){if(0===t)return"0";const s=i[e].significand||t/Math.pow(10,Math.floor(Pe(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?ui.numeric.call(this,t,e,i):""}};var fi={formatters:ui};const pi=Object.create(null),gi=Object.create(null);function mi(t,e){if(!e)return t;const i=e.split(".");for(let e=0,s=i.length;e<s;++e){const s=i[e];t=t[s]||(t[s]=Object.create(null))}return t}function bi(t,e,i){return"string"==typeof e?ce(mi(t,e),i):ce(mi(t,""),e)}class xi{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.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)=>ai(e.backgroundColor),this.hoverBorderColor=(t,e)=>ai(e.borderColor),this.hoverColor=(t,e)=>ai(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 bi(this,t,e)}get(t){return mi(this,t)}describe(t,e){return bi(gi,t,e)}override(t,e){return bi(pi,t,e)}route(t,e,i,s){const n=mi(this,t),o=mi(this,i),r="_"+e;Object.defineProperties(n,{[r]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=o[s];return Qt(t)?Object.assign({},e,t):ie(t,e)},set(t){this[r]=t}}})}apply(t){t.forEach((t=>t(this)))}}var _i=new xi({_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:hi},numbers:{type:"number",properties:li}}),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",clip:!0,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:fi.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 yi(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function vi(t,e,i,s){let n=(s=s||{}).data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(n=s.data={},o=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let r=0;const a=i.length;let l,h,c,d,u;for(l=0;l<a;l++)if(d=i[l],null==d||Jt(d)){if(Jt(d))for(h=0,c=d.length;h<c;h++)u=d[h],null==u||Jt(u)||(r=yi(t,n,o,r,u))}else r=yi(t,n,o,r,d);t.restore();const f=o.length/2;if(f>i.length){for(l=0;l<f;l++)delete n[o[l]];o.splice(0,f)}return r}function wi(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function Mi(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function ki(t,e,i,s){Si(t,e,i,s,null)}function Si(t,e,i,s,n){let o,r,a,l,h,c,d,u;const f=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*Me;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,s),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),f){default:n?t.ellipse(i,s,n/2,g,0,0,ye):t.arc(i,s,g,0,ye),t.closePath();break;case"triangle":c=n?n/2:g,t.moveTo(i+Math.sin(m)*c,s-Math.cos(m)*g),m+=Ae,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*g),m+=Ae,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*g),t.closePath();break;case"rectRounded":h=.516*g,l=g-h,r=Math.cos(m+Se)*l,d=Math.cos(m+Se)*(n?n/2-h:l),a=Math.sin(m+Se)*l,u=Math.sin(m+Se)*(n?n/2-h:l),t.arc(i-d,s-a,h,m-_e,m-ke),t.arc(i+u,s-r,h,m-ke,m),t.arc(i+d,s+a,h,m,m+ke),t.arc(i-u,s+r,h,m+ke,m+_e),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,c=n?n/2:l,t.rect(i-c,s-l,2*c,2*l);break}m+=Se;case"rectRot":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),t.moveTo(i-d,s-a),t.lineTo(i+u,s-r),t.lineTo(i+d,s+a),t.lineTo(i-u,s+r),t.closePath();break;case"crossRot":m+=Se;case"cross":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),t.moveTo(i-d,s-a),t.lineTo(i+d,s+a),t.moveTo(i+u,s-r),t.lineTo(i-u,s+r);break;case"star":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),t.moveTo(i-d,s-a),t.lineTo(i+d,s+a),t.moveTo(i+u,s-r),t.lineTo(i-u,s+r),m+=Se,d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),t.moveTo(i-d,s-a),t.lineTo(i+d,s+a),t.moveTo(i+u,s-r),t.lineTo(i-u,s+r);break;case"line":r=n?n/2:Math.cos(m)*g,a=Math.sin(m)*g,t.moveTo(i-r,s-a),t.lineTo(i+r,s+a);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(m)*(n?n/2:g),s+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Ai(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Pi(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Ci(t){t.restore()}function Di(t,e,i,s,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===n!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Oi(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function Ei(t,e,i,s,n){if(n.strikethrough||n.underline){const o=t.measureText(s),r=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,h=i+o.actualBoundingBoxDescent,c=n.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(r,c),t.lineTo(a,c),t.stroke()}}function Ti(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function Ri(t,e,i,s,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const r=Jt(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let l,h;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Gt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l<r.length;++l)h=r[l],o.backdrop&&Ti(t,o.backdrop),a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),Gt(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,i,s,o.maxWidth)),t.fillText(h,i,s,o.maxWidth),Ei(t,i,s,h,o),s+=Number(n.lineHeight);t.restore()}function Li(t,e){const{x:i,y:s,w:n,h:o,radius:r}=e;t.arc(i+r.topLeft,s+r.topLeft,r.topLeft,1.5*_e,_e,!0),t.lineTo(i,s+o-r.bottomLeft),t.arc(i+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,_e,ke,!0),t.lineTo(i+n-r.bottomRight,s+o),t.arc(i+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,ke,0,!0),t.lineTo(i+n,s+r.topRight),t.arc(i+n-r.topRight,s+r.topRight,r.topRight,0,-ke,!0),t.lineTo(i+r.topLeft,s)}const Ii=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,zi=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function $i(t,e){const i=(""+t).match(Ii);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const Fi=t=>+t||0;function Vi(t,e){const i={},s=Qt(e),n=s?Object.keys(e):e,o=Qt(t)?s?i=>ie(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=Fi(o(t));return i}function Hi(t){return Vi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ni(t){return Vi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Bi(t){const e=Hi(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Wi(t,e){t=t||{},e=e||_i.font;let i=ie(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=ie(t.style,e.style);s&&!(""+s).match(zi)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:ie(t.family,e.family),lineHeight:$i(ie(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:ie(t.weight,e.weight),string:""};return n.string=function(t){return!t||Gt(t.size)||Gt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function ji(t,e,i,s){let n,o,r,a=!0;for(n=0,o=t.length;n<o;++n)if(r=t[n],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),a=!1),void 0!==i&&Jt(r)&&(r=r[i%r.length],a=!1),void 0!==r))return s&&!a&&(s.cacheable=!1),r}function Ui(t,e){return Object.assign(Object.create(t),e)}function Yi(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>t[0];const n=(arguments.length>2?arguments[2]:void 0)||t;void 0===i&&(i=ss("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:i,_getTarget:s,override:s=>Yi([s,...t],e,n,i)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>Gi(i,s,(()=>function(t,e,i,s){let n;for(const o of e)if(n=ss(Ki(o,t),i),void 0!==n)return Zi(t,n)?es(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ns(t).includes(e),ownKeys:t=>ns(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function Xi(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:qi(t,s),setContext:e=>Xi(t,e,i,s),override:n=>Xi(t.override(n),e,i,s)};return new Proxy(n,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Gi(t,e,(()=>function(t,e,i){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=t;let a=s[e];be(a)&&r.isScriptable(e)&&(a=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,r||s);a.delete(t),Zi(t,l)&&(l=es(n._scopes,n,t,l));return l}(e,a,t,i));Jt(a)&&a.length&&(a=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=i;if(void 0!==o.index&&s(t))return e[o.index%e.length];if(Qt(e[0])){const i=e,s=n._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=es(s,n,t,l);e.push(Xi(i,o,r&&r[t],a))}}return e}(e,a,t,r.isIndexable));Zi(e,a)&&(a=Xi(a,n,o&&o[e],r));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function qi(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:be(i)?i:()=>i,isIndexable:be(s)?s:()=>s}}const Ki=(t,e)=>t?t+ge(e):e,Zi=(t,e)=>Qt(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Gi(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const s=i();return t[e]=s,s}function Ji(t,e,i){return be(t)?t(e,i):t}const Qi=(t,e)=>!0===t?e:"string"==typeof t?pe(e,t):void 0;function ts(t,e,i,s,n){for(const o of e){const e=Qi(i,o);if(e){t.add(e);const o=Ji(e._fallback,i,n);if(void 0!==o&&o!==i&&o!==s)return o}else if(!1===e&&void 0!==s&&i!==s)return null}return!1}function es(t,e,i,s){const n=e._rootScopes,o=Ji(e._fallback,i,s),r=[...t,...n],a=new Set;a.add(s);let l=is(a,r,i,o||i,s);return null!==l&&((void 0===o||o===i||(l=is(a,r,o,l,s),null!==l))&&Yi(Array.from(a),[""],n,o,(()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];if(Jt(n)&&Qt(i))return i;return n||{}}(e,i,s))))}function is(t,e,i,s,n){for(;i;)i=ts(t,e,i,s,n);return i}function ss(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function ns(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function os(t,e,i,s){const{iScale:n}=t,{key:o="r"}=this._parsing,r=new Array(s);let a,l,h,c;for(a=0,l=s;a<l;++a)h=a+i,c=e[h],r[a]={r:n.parse(pe(c,o),h)};return r}const rs=Number.EPSILON||1e-14,as=(t,e)=>e<t.length&&!t[e].skip&&t[e],ls=t=>"x"===t?"y":"x";function hs(t,e,i,s){const n=t.skip?e:t,o=e,r=i.skip?e:i,a=$e(o,n),l=$e(r,o);let h=a/(a+l),c=l/(a+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=s*h,u=s*c;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function cs(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const i=ls(e),s=t.length,n=Array(s).fill(0),o=Array(s);let r,a,l,h=as(t,0);for(r=0;r<s;++r)if(a=l,l=h,h=as(t,r+1),l){if(h){const t=h[e]-l[e];n[r]=0!==t?(h[i]-l[i])/t:0}o[r]=a?h?Ce(n[r-1])!==Ce(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}!function(t,e,i){const s=t.length;let n,o,r,a,l,h=as(t,0);for(let c=0;c<s-1;++c)l=h,h=as(t,c+1),l&&h&&(De(e[c],0,rs)?i[c]=i[c+1]=0:(n=i[c]/e[c],o=i[c+1]/e[c],a=Math.pow(n,2)+Math.pow(o,2),a<=9||(r=3/Math.sqrt(a),i[c]=n*r*e[c],i[c+1]=o*r*e[c])))}(t,n,o),function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";const s=ls(i),n=t.length;let o,r,a,l=as(t,0);for(let h=0;h<n;++h){if(r=a,a=l,l=as(t,h+1),!a)continue;const n=a[i],c=a[s];r&&(o=(n-r[i])/3,a[`cp1${i}`]=n-o,a[`cp1${s}`]=c-o*e[h]),l&&(o=(l[i]-n)/3,a[`cp2${i}`]=n+o,a[`cp2${s}`]=c+o*e[h])}}(t,o,e)}function ds(t,e,i){return Math.max(Math.min(t,i),e)}function us(t,e,i,s,n){let o,r,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)cs(t,n);else{let i=s?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o)a=t[o],l=hs(i,a,t[Math.min(o+1,r-(s?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,s,n,o,r,a=Ai(t[0],e);for(i=0,s=t.length;i<s;++i)r=o,o=a,a=i<s-1&&Ai(t[i+1],e),o&&(n=t[i],r&&(n.cp1x=ds(n.cp1x,e.left,e.right),n.cp1y=ds(n.cp1y,e.top,e.bottom)),a&&(n.cp2x=ds(n.cp2x,e.left,e.right),n.cp2y=ds(n.cp2y,e.top,e.bottom)))}(t,i)}function fs(){return"undefined"!=typeof window&&"undefined"!=typeof document}function ps(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function gs(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}const ms=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const bs=["top","right","bottom","left"];function xs(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=bs[n];s[o]=parseFloat(t[e+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const _s=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function ys(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=ms(i),o="border-box"===n.boxSizing,r=xs(n,"padding"),a=xs(n,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:o}=s;let r,a,l=!1;if(_s(n,o,t.target))r=n,a=o;else{const t=e.getBoundingClientRect();r=s.clientX-t.left,a=s.clientY-t.top,l=!0}return{x:r,y:a,box:l}}(t,i),d=r.left+(c&&a.left),u=r.top+(c&&a.top);let{width:f,height:p}=e;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/f*i.width/s),y:Math.round((h-u)/p*i.height/s)}}const vs=t=>Math.round(10*t)/10;function ws(t,e,i,s){const n=ms(t),o=xs(n,"margin"),r=gs(n.maxWidth,t,"clientWidth")||we,a=gs(n.maxHeight,t,"clientHeight")||we,l=function(t,e,i){let s,n;if(void 0===e||void 0===i){const o=t&&ps(t);if(o){const t=o.getBoundingClientRect(),r=ms(o),a=xs(r,"border","width"),l=xs(r,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,s=gs(r.maxWidth,o,"clientWidth"),n=gs(r.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||we,maxHeight:n||we}}(t,e,i);let{width:h,height:c}=l;if("content-box"===n.boxSizing){const t=xs(n,"border","width"),e=xs(n,"padding");h-=e.width+t.width,c-=e.height+t.height}h=Math.max(0,h-o.width),c=Math.max(0,s?h/s:c-o.height),h=vs(Math.min(h,r,l.maxWidth)),c=vs(Math.min(c,a,l.maxHeight)),h&&!c&&(c=vs(h/2));return(void 0!==e||void 0!==i)&&s&&l.height&&c>l.height&&(c=l.height,h=vs(Math.floor(c*s))),{width:h,height:c}}function Ms(t,e,i){const s=e||1,n=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||r.height!==n||r.width!==o)&&(t.currentDevicePixelRatio=s,r.height=n,r.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0)}const ks=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};fs()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Ss(t,e){const i=function(t,e){return ms(t).getPropertyValue(e)}(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function As(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ps(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function Cs(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},r=As(t,n,i),a=As(n,o,i),l=As(o,e,i),h=As(r,a,i),c=As(a,l,i);return As(h,c,i)}function Ds(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Os(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function Es(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ts(t){return"angle"===t?{between:He,compare:Fe,normalize:Ve}:{between:Be,compare:(t,e)=>t-e,normalize:t=>t}}function Rs(t){let{start:e,end:i,count:s,loop:n,style:o}=t;return{start:e%s,end:i%s,loop:n&&(i-e+1)%s==0,style:o}}function Ls(t,e,i){if(!i)return[t];const{property:s,start:n,end:o}=i,r=e.length,{compare:a,between:l,normalize:h}=Ts(s),{start:c,end:d,loop:u,style:f}=function(t,e,i){const{property:s,start:n,end:o}=i,{between:r,normalize:a}=Ts(s),l=e.length;let h,c,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,h=0,c=l;h<c&&r(a(e[d%l][s]),n,o);++h)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),p=[];let g,m,b,x=!1,_=null;const y=()=>x||l(n,b,g)&&0!==a(n,b),v=()=>!x||0===a(o,g)||l(o,b,g);for(let t=c,i=c;t<=d;++t)m=e[t%r],m.skip||(g=h(m[s]),g!==b&&(x=l(g,n,o),null===_&&y()&&(_=0===a(g,n)?t:i),null!==_&&v()&&(p.push(Rs({start:_,end:t,loop:u,count:r,style:f})),_=null),i=t,b=g));return null!==_&&p.push(Rs({start:_,end:d,loop:u,count:r,style:f})),p}function Is(t,e){const i=[],s=t.segments;for(let n=0;n<s.length;n++){const o=Ls(s[n],t.points,e);o.length&&i.push(...o)}return i}function zs(t,e,i,s){return s&&s.setContext&&i?function(t,e,i,s){const n=t._chart.getContext(),o=$s(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=i.length,h=[];let c=o,d=e[0].start,u=d;function f(t,e,s,n){const o=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=o;for(;i[e%l].skip;)e+=o;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:s,style:n}),c=n,d=e%l)}}for(const t of e){d=a?d:t.start;let e,o=i[d%l];for(u=d+1;u<=t.end;u++){const a=i[u%l];e=$s(s.setContext(Ui(n,{type:"segment",p0:o,p1:a,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),Fs(e,c)&&f(d,u-1,t.loop,c),o=a,c=e}d<u-1&&f(d,u-1,t.loop,c)}return h}(t,e,i,s):e}function $s(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Fs(t,e){if(!e)return!1;const i=[],s=function(t,e){return oi(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,s)!==JSON.stringify(e,s)}class Vs{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.listeners[s],o=e.duration;n.forEach((s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=Ke.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,r=n.length-1,a=!1;for(;r>=0;--r)o=n[r],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(n[r]=n[n.length-1],n.pop());a&&(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){const e=this._charts;let 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){const 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;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let 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)}}var Hs=new Vs;const Ns="transparent",Bs={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=ri(t||Ns),n=s.valid&&ri(e||Ns);return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Ws{constructor(t,e,i,s){const n=e[i];s=ji([t.to,s,n,t.from]);const o=ji([t.from,n,s]);this._active=!0,this._fn=t.fn||Bs[t.type||typeof o],this._easing=ni[t.easing]||ni.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=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,o=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=ji([t.to,e,s,t.from]),this._from=ji([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,r=this._to;let a;if(this._active=n!==r&&(o||e<i),!this._active)return this._target[s]=r,void this._notify(!0);e<0?this._target[s]=n:(a=e/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(n,r,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class js{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Qt(t))return;const e=Object.keys(_i.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((s=>{const n=t[s];if(!Qt(n))return;const o={};for(const t of e)o[t]=n[t];(Jt(n.properties)&&n.properties||[s]).forEach((t=>{t!==s&&i.has(t)||i.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e<s.length;e++){const n=t[s[e]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const h=e[l];let c=n[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,r);continue}c.cancel()}d&&d.duration?(n[l]=c=new Ws(d,t,l,h),s.push(c)):t[l]=h}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Hs.add(this._chart,i),!0):void 0}}function Us(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function Ys(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n<o;++n)i.push(s[n].index);return i}function Xs(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=t.keys,o="single"===s.mode;let r,a,l,h;if(null!==e){for(r=0,a=n.length;r<a;++r){if(l=+n[r],l===i){if(s.all)continue;break}h=t.values[l],te(h)&&(o||0===e||Ce(e)===Ce(h))&&(e+=h)}return e}}function qs(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Ks(t,e,i){const s=t[e]||(t[e]={});return s[i]||(s[i]={})}function Zs(t,e,i,s){for(const n of e.getMatchingVisibleMetas(s).reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function Gs(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,h=r.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,r,s),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:o,[h]:d}=i;u=(i._stacks||(i._stacks={}))[h]=Ks(n,c,o),u[a]=d,u._top=Zs(u,r,!0,s.type),u._bottom=Zs(u,r,!1,s.type);(u._visualValues||(u._visualValues={}))[a]=d}}function Js(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function Qs(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}const tn=t=>"reset"===t||"none"===t,en=(t,e)=>e?t:Object.assign({},t);class sn{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(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=qs(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&&Qs(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=ie(i.xAxisID,Js(t,"x")),o=e.yAxisID=ie(i.yAxisID,Js(t,"y")),r=e.rAxisID=ie(i.rAxisID,Js(t,"r")),a=e.indexAxis,l=e.iAxisID=s(a,n,o,r),h=e.vAxisID=s(a,o,n,r);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Xe(this._data,this),t._stacked&&Qs(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(Qt(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:s}=e,n="x"===i.axis?"x":"y",o="x"===s.axis?"x":"y",r=Object.keys(t),a=new Array(r.length);let l,h,c;for(l=0,h=r.length;l<h;++l)c=r[l],a[l]={[n]:c,[o]:t[c]};return a}(e,t)}else if(i!==e){if(i){Xe(i,this);const t=this._cachedMeta;Qs(t),t._parsed=[]}e&&Object.isExtensible(e)&&(n=this,(s=e)._chartjs?s._chartjs.listeners.push(n):(Object.defineProperty(s,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[n]}}),Ye.forEach((t=>{const e="_onData"+ge(t),i=s[t];Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const r=i.apply(this,n);return s._chartjs.listeners.forEach((t=>{"function"==typeof t[e]&&t[e](...n)})),r}})})))),this._syncList=[],this._data=e}var s,n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=qs(e.vScale,e),e.stack!==i.stack&&(s=!0,Qs(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&(Gs(this,e._parsed),e._stacked=qs(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:n,_stacked:o}=i,r=n.axis;let a,l,h,c=0===t&&e===s.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,h=s;else{h=Jt(s[t])?this.parseArrayData(i,s,t,e):Qt(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const n=()=>null===l[r]||d&&l[r]<d[r];for(a=0;a<e;++a)i._parsed[a+t]=l=h[a],c&&(n()&&(c=!1),d=l);i._sorted=c}o&&Gs(this,h)}parsePrimitiveData(t,e,i,s){const{iScale:n,vScale:o}=t,r=n.axis,a=o.axis,l=n.getLabels(),h=n===o,c=new Array(s);let d,u,f;for(d=0,u=s;d<u;++d)f=d+i,c[d]={[r]:h||n.parse(l[f],f),[a]:o.parse(e[f],f)};return c}parseArrayData(t,e,i,s){const{xScale:n,yScale:o}=t,r=new Array(s);let a,l,h,c;for(a=0,l=s;a<l;++a)h=a+i,c=e[h],r[a]={x:n.parse(c[0],h),y:o.parse(c[1],h)};return r}parseObjectData(t,e,i,s){const{xScale:n,yScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l=new Array(s);let h,c,d,u;for(h=0,c=s;h<c;++h)d=h+i,u=e[d],l[h]={x:n.parse(pe(u,r),d),y:o.parse(pe(u,a),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this.chart,n=this._cachedMeta,o=e[t.axis];return Xs({keys:Ys(s,!0),values:e._stacks[t.axis]._visualValues},o,n.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const n=i[e.axis];let o=null===n?NaN:n;const r=s&&i._stacks[e.axis];s&&r&&(s.values=r,o=Xs(s,n,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,n=i._sorted&&t===i.iScale,o=s.length,r=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:Ys(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(r);let d,u;function f(){u=s[d];const e=u[r.axis];return!te(u[t.axis])||h>e||c<e}for(d=0;d<o&&(f()||(this.updateRangeFromParsed(l,t,u,a),!n));++d);if(n)for(d=o-1;d>=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,o;for(s=0,n=e.length;s<n;++s)o=e[s][t.axis],te(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:s?""+s.getLabelForValue(n[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,s,n;return Qt(t)?(e=t.top,i=t.right,s=t.bottom,n=t.left):e=i=s=n=t,{top:e,right:i,bottom:s,left:n,disabled:!1===t}}(ie(this.options.clip,function(t,e,i){if(!1===i)return!1;const s=Us(t,i),n=Us(e,i);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],n=e.chartArea,o=[],r=this._drawStart||0,a=this._drawCount||s.length-r,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,n,r,a),h=r;h<r+a;++h){const e=s[h];e.hidden||(e.active&&l?o.push(e):e.draw(t,n))}for(h=0;h<o.length;++h)o[h].draw(t,n)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];n=e.$context||(e.$context=function(t,e,i){return Ui(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),n.parsed=this.getParsed(t),n.raw=s.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=function(t,e){return Ui(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),n.dataset=s,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2?arguments[2]:void 0;const s="active"===e,n=this._cachedDataOpts,o=t+"-"+e,r=n[o],a=this.enableOptionSharing&&me(i);if(r)return en(r,a);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=s?[`${t}Hover`,"hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),h),u=Object.keys(_i.elements[t]),f=l.resolveNamedOptions(d,u,(()=>this.getContext(i,s,e)),c);return f.$shared&&(f.$shared=a,n[o]=Object.freeze(en(f,a))),f}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,r=n[o];if(r)return r;let a;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);a=s.createResolver(o,this.getContext(t,i,e))}const l=new js(s,a&&a.animations);return a&&a._cacheable&&(n[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||tn(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){tn(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!tn(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n<s&&this._removeElements(n,s-n)}_insertElements(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=this._cachedMeta,n=s.data,o=t+e;let r;const a=t=>{for(t.length+=e,r=t.length-1;r>=o;r--)t[r]=t[r-e]};for(a(n),r=t;r<o;++r)n[r]=new this.dataElementType;this._parsing&&a(s._parsed),this.parse(t,e),i&&this.updateElements(n,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&Qs(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function nn(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;e<n;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=qe(s.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let s,n,o,r,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(me(r)&&(a=Math.min(a,Math.abs(o-r)||a)),r=o)};for(s=0,n=i.length;s<n;++s)o=e.getPixelForValue(i[s]),l();for(r=void 0,s=0,n=e.ticks.length;s<n;++s)o=e.getPixelForTick(s),l();return a}function on(t,e,i,s){return Jt(t)?function(t,e,i,s){const n=i.parse(t[0],s),o=i.parse(t[1],s),r=Math.min(n,o),a=Math.max(n,o);let l=r,h=a;Math.abs(r)>Math.abs(a)&&(l=a,h=r),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:n,end:o,min:r,max:a}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function rn(t,e,i,s){const n=t.iScale,o=t.vScale,r=n.getLabels(),a=n===o,l=[];let h,c,d,u;for(h=i,c=i+s;h<c;++h)u=e[h],d={},d[n.axis]=a||n.parse(r[h],h),l.push(on(u,d,o,h));return l}function an(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function ln(t,e,i,s){let n=e.borderSkipped;const o={};if(!n)return void(t.borderSkipped=o);if(!0===n)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:a,reverse:l,top:h,bottom:c}=function(t){let e,i,s,n,o;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.base<t.y,i="bottom",s="top"),e?(n="end",o="start"):(n="start",o="end"),{start:i,end:s,reverse:e,top:n,bottom:o}}(t);"middle"===n&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?n=h:(i._bottom||0)===s?n=c:(o[hn(c,r,a,l)]=!0,n=h)),o[hn(n,r,a,l)]=!0,t.borderSkipped=o}function hn(t,e,i,s){var n,o,r;return s?(r=i,t=cn(t=(n=t)===(o=e)?r:n===r?o:n,i,e)):t=cn(t,e,i),t}function cn(t,e,i){return"start"===t?e:"end"===t?i:t}function dn(t,e,i){let{inflateAmount:s}=e;t.inflateAmount="auto"===s?1===i?.33:0:s}gt(sn,"defaults",{}),gt(sn,"datasetElementType",null),gt(sn,"dataElementType",null);class un extends sn{parsePrimitiveData(t,e,i,s){return rn(t,e,i,s)}parseArrayData(t,e,i,s){return rn(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:n,vScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l="x"===n.axis?r:a,h="x"===o.axis?r:a,c=[];let d,u,f,p;for(d=i,u=i+s;d<u;++d)p=e[d],f={},f[n.axis]=n.parse(pe(p,l),d),c.push(on(pe(p,h),f,o,d));return c}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const n=i._custom;n&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,n.min),t.max=Math.max(t.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,n=this.getParsed(t),o=n._custom,r=an(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(n[s.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const n="reset"===s,{index:o,_cachedMeta:{vScale:r}}=this,a=r.getBasePixel(),l=r.isHorizontal(),h=this._getRuler(),{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,s);for(let u=e;u<e+i;u++){const e=this.getParsed(u),i=n||Gt(e[r.axis])?{base:a,head:a}:this._calculateBarValuePixels(u),f=this._calculateBarIndexPixels(u,h),p=(e._stacks||{})[r.axis],g={horizontal:l,base:i.base,enableBorderRadius:!p||an(e._custom)||o===p._top||o===p._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};d&&(g.options=c||this.resolveDataElementOptions(u,t[u].active?"active":s));const m=g.options||t[u].options;ln(g,m,p,o),dn(g,m,h.ratio),this.updateElement(t[u],u,g,s)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),n=i.options.stacked,o=[],r=this._cachedMeta.controller.getParsed(e),a=r&&r[i.axis],l=t=>{const e=t._parsed.find((t=>t[i.axis]===a)),s=e&&e[t.vScale.axis];if(Gt(s)||isNaN(s))return!0};for(const i of s)if((void 0===e||!l(i))&&((!1===n||-1===o.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n<o;++n)s.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));const r=t.barThickness;return{min:r||nn(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:n,minBarLength:o}}=this,r=n||0,a=this.getParsed(t),l=a._custom,h=an(l);let c,d,u=a[e.axis],f=0,p=i?this.applyStack(e,a,i):u;p!==u&&(f=p-u,p=u),h&&(u=l.barStart,p=l.barEnd-l.barStart,0!==u&&Ce(u)!==Ce(l.barEnd)&&(f=0),f+=u);const g=Gt(n)||h?f:n;let m=e.getPixelForValue(g);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(f+p):m,d=c-m,Math.abs(d)<o){d=function(t,e,i){return 0!==t?Ce(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(d,e,r)*o,u===r&&(m-=d/2);const t=e.getPixelForDecimal(0),n=e.getPixelForDecimal(1),l=Math.min(t,n),f=Math.max(t,n);m=Math.max(Math.min(m,f),l),c=m+d,i&&!h&&(a._stacks[e.axis]._visualValues[s]=e.getValueForPixel(c)-e.getValueForPixel(m))}if(m===e.getPixelForValue(r)){const t=Ce(d)*e.getLineWidthForValue(r)/2;m+=t,d-=t}return{size:d,base:m,head:c,center:c+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,n=s.skipNull,o=ie(s.maxBarThickness,1/0);let r,a;if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,l="flex"===s.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let r=t>0?n[t-1]:null,a=t<n.length-1?n[t+1]:null;const l=i.categoryPercentage;null===r&&(r=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-r);const h=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/s,ratio:i.barPercentage,start:h}}(t,e,s,i):function(t,e,i,s){const n=i.barThickness;let o,r;return Gt(n)?(o=e.min*i.categoryPercentage,r=i.barPercentage):(o=n*s,r=1),{chunk:o/s,ratio:r,start:e.pixels[t]-o/2}}(t,e,s,i),h=this._getStackIndex(this.index,this._cachedMeta.stack,n?t:void 0);r=l.start+l.chunk*h+l.chunk/2,a=Math.min(o,l.chunk*l.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),a=Math.min(o,e.min*e.ratio);return{base:r-a/2,head:r+a/2,center:r,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let n=0;for(;n<s;++n)null===this.getParsed(n)[e.axis]||i[n].hidden||i[n].draw(this._ctx)}}gt(un,"id","bar"),gt(un,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),gt(un,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class fn extends sn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const n=super.parsePrimitiveData(t,e,i,s);for(let t=0;t<n.length;t++)n[t]._custom=this.resolveDataElementOptions(t+i).radius;return n}parseArrayData(t,e,i,s){const n=super.parseArrayData(t,e,i,s);for(let t=0;t<n.length;t++){const s=e[i+t];n[t]._custom=ie(s[2],this.resolveDataElementOptions(t+i).radius)}return n}parseObjectData(t,e,i,s){const n=super.parseObjectData(t,e,i,s);for(let t=0;t<n.length;t++){const s=e[i+t];n[t]._custom=ie(s&&s.r&&+s.r,this.resolveDataElementOptions(t+i).radius)}return n}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:n}=e,o=this.getParsed(t),r=s.getLabelForValue(o.x),a=n.getLabelForValue(o.y),l=o._custom;return{label:i[t]||"",value:"("+r+", "+a+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,s),h=o.axis,c=r.axis;for(let d=e;d<e+i;d++){const e=t[d],i=!n&&this.getParsed(d),u={},f=u[h]=n?o.getPixelForDecimal(.5):o.getPixelForValue(i[h]),p=u[c]=n?r.getBasePixel():r.getPixelForValue(i[c]);u.skip=isNaN(f)||isNaN(p),l&&(u.options=a||this.resolveDataElementOptions(d,e.active?"active":s),n&&(u.options.radius=0)),this.updateElement(e,d,u,s)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const n=s.radius;return"active"!==e&&(s.radius=0),s.radius+=ie(i&&i._custom,n),s}}gt(fn,"id","bubble"),gt(fn,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),gt(fn,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});class pn extends sn{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){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,o,r=t=>+i[t];if(Qt(i[t])){const{key:t="value"}=this._parsing;r=e=>+pe(i[e],t)}for(n=t,o=t+e;n<o;++n)s._parsed[n]=r(n)}}_getRotation(){return Re(this.options.rotation-90)}_getCircumference(){return Re(this.options.circumference)}_getRotationExtents(){let t=ye,e=-ye;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,n=s._getRotation(),o=s._getCircumference();t=Math.min(t,n),e=Math.max(e,n+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,n=s.data,o=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-o)/2,0),a=Math.min((l=this.options.cutout,h=r,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:+l/h),1);var l,h;const c=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:m}=function(t,e,i){let s=1,n=1,o=0,r=0;if(e<ye){const a=t,l=a+e,h=Math.cos(a),c=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(t,e,s)=>He(t,a,l,!0)?1:Math.max(e,e*i,s,s*i),p=(t,e,s)=>He(t,a,l,!0)?-1:Math.min(e,e*i,s,s*i),g=f(0,h,d),m=f(ke,c,u),b=p(_e,h,d),x=p(_e+ke,c,u);s=(g-b)/2,n=(m-x)/2,o=-(g+b)/2,r=-(m+x)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:r}}(u,d,a),b=(i.width-o)/f,x=(i.height-o)/p,_=Math.max(Math.min(b,x)/2,0),y=se(this.options.radius,_),v=(y-Math.max(y*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*y,this.offsetY=m*y,s.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*c,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/ye)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,r=o.chartArea,a=o.options.animation,l=(r.left+r.right)/2,h=(r.top+r.bottom)/2,c=n&&a.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,s);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,n);for(g=e;g<e+i;++g){const e=this._circumference(g,n),i=t[g],o={x:l+this.offsetX,y:h+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:u,innerRadius:d};p&&(o.options=f||this.resolveDataElementOptions(g,i.active?"active":s)),m+=e,this.updateElement(i,g,o,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,s=0;for(i=0;i<e.length;i++){const n=t._parsed[i];null===n||isNaN(n)||!this.chart.getDataVisibility(i)||e[i].hidden||(s+=Math.abs(n))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?ye*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=di(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,r,a;if(!t)for(s=0,n=i.data.datasets.length;s<n;++s)if(i.isDatasetVisible(s)){o=i.getDatasetMeta(s),t=o.data,r=o.controller;break}if(!t)return 0;for(s=0,n=t.length;s<n;++s)a=r.resolveDataElementOptions(s),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(ie(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}gt(pn,"id","doughnut"),gt(pn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),gt(pn,"descriptors",{_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),gt(pn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class gn extends sn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:n}=e,o=this.chart._animationsDisabled;let{start:r,count:a}=Qe(e,s,o);this._drawStart=r,this._drawCount=a,ti(e)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!n._decimated,i.points=s;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(s,r,a,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,s),d=o.axis,u=r.axis,{spanGaps:f,segment:p}=this.options,g=Ee(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||n||"none"===s,b=e+i,x=t.length;let _=e>0&&this.getParsed(e-1);for(let i=0;i<x;++i){const f=t[i],x=m?f:{};if(i<e||i>=b){x.skip=!0;continue}const y=this.getParsed(i),v=Gt(y[u]),w=x[d]=o.getPixelForValue(y[d],i),M=x[u]=n||v?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,y,a):y[u],i);x.skip=isNaN(w)||isNaN(M)||v,x.stop=i>0&&Math.abs(y[d]-_[d])>g,p&&(x.parsed=y,x.raw=l.data[i]),c&&(x.options=h||this.resolveDataElementOptions(i,f.active?"active":s)),m||this.updateElement(f,i,x,s),_=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}gt(gn,"id","line"),gt(gn,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),gt(gn,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class mn extends sn{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=di(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return os.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,r=o.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,h=a.yCenter,c=a.getIndexAngle(0)-.5*_e;let d,u=c;const f=360/this.countVisibleElements();for(d=0;d<e;++d)u+=this._computeAngle(d,s,f);for(d=e;d<e+i;d++){const e=t[d];let i=u,p=u+this._computeAngle(d,s,f),g=o.getDataVisibility(d)?a.getDistanceFromCenterForValue(this.getParsed(d).r):0;u=p,n&&(r.animateScale&&(g=0),r.animateRotate&&(i=p=c));const m={x:l,y:h,innerRadius:0,outerRadius:g,startAngle:i,endAngle:p,options:this.resolveDataElementOptions(d,e.active?"active":s)};this.updateElement(e,d,m,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Re(this.resolveDataElementOptions(t,e).angle||i):0}}gt(mn,"id","polarArea"),gt(mn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),gt(mn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}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}}});class bn extends pn{}gt(bn,"id","pie"),gt(bn,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class xn extends sn{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return os.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,o="reset"===s;for(let r=e;r<e+i;r++){const e=t[r],i=this.resolveDataElementOptions(r,e.active?"active":s),a=n.getPointPositionForValue(r,this.getParsed(r).r),l=o?n.xCenter:a.x,h=o?n.yCenter:a.y,c={x:l,y:h,angle:a.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,r,c,s)}}}gt(xn,"id","radar"),gt(xn,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),gt(xn,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class _n extends sn{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:n}=e,o=this.getParsed(t),r=s.getLabelForValue(o.x),a=n.getLabelForValue(o.y);return{label:i[t]||"",value:"("+r+", "+a+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:n,count:o}=Qe(e,i,s);if(this._drawStart=n,this._drawCount=o,ti(e)&&(n=0,o=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:n,_dataset:o}=e;n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=i;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment,this.updateElement(n,void 0,{animated:!s,options:r},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,n,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),c=this.getSharedOptions(h),d=this.includeOptions(s,c),u=o.axis,f=r.axis,{spanGaps:p,segment:g}=this.options,m=Ee(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||n||"none"===s;let x=e>0&&this.getParsed(e-1);for(let h=e;h<e+i;++h){const e=t[h],i=this.getParsed(h),p=b?e:{},_=Gt(i[f]),y=p[u]=o.getPixelForValue(i[u],h),v=p[f]=n||_?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,i,a):i[f],h);p.skip=isNaN(y)||isNaN(v)||_,p.stop=h>0&&Math.abs(i[u]-x[u])>m,g&&(p.parsed=i,p.raw=l.data[h]),d&&(p.options=c||this.resolveDataElementOptions(h,e.active?"active":s)),b||this.updateElement(e,h,p,s),x=i}this.updateSharedOptions(c,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const n=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,n,o)/2}}gt(_n,"id","scatter"),gt(_n,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),gt(_n,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var yn=Object.freeze({__proto__:null,BarController:un,BubbleController:fn,DoughnutController:pn,LineController:gn,PieController:bn,PolarAreaController:mn,RadarController:xn,ScatterController:_n});function vn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class wn{static override(t){Object.assign(wn.prototype,t)}constructor(t){gt(this,"options",void 0),this.options=t||{}}init(){}formats(){return vn()}parse(){return vn()}format(){return vn()}add(){return vn()}diff(){return vn()}startOf(){return vn()}endOf(){return vn()}}var Mn=wn;function kn(t,e,i,s){const{controller:n,data:o,_sorted:r}=t,a=n._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&r&&o.length){const t=a._reversePixels?Ue:je;if(!s)return t(o,e,i);if(n._sharedOptions){const s=o[0],n="function"==typeof s.getRange&&s.getRange(e);if(n){const s=t(o,e,i-n),r=t(o,e,i+n);return{lo:s.lo,hi:r.hi}}}}return{lo:0,hi:o.length-1}}function Sn(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=o.length;t<i;++t){const{index:i,data:a}=o[t],{lo:l,hi:h}=kn(o[t],e,r,n);for(let t=l;t<=h;++t){const e=a[t];e.skip||s(e,i,t)}}}function An(t,e,i,s,n){const o=[];if(!n&&!t.isPointInArea(e))return o;return Sn(t,i,e,(function(i,r,a){(n||Ai(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&o.push({element:i,datasetIndex:r,index:a})}),!0),o}function Pn(t,e,i,s,n,o){let r=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){const n=e?Math.abs(t.x-s.x):0,o=i?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2))}}(i);let l=Number.POSITIVE_INFINITY;return Sn(t,i,e,(function(i,h,c){const d=i.inRange(e.x,e.y,n);if(s&&!d)return;const u=i.getCenterPoint(n);if(!(!!o||t.isPointInArea(u))&&!d)return;const f=a(e,u);f<l?(r=[{element:i,datasetIndex:h,index:c}],l=f):f===l&&r.push({element:i,datasetIndex:h,index:c})})),r}function Cn(t,e,i,s,n,o){return o||t.isPointInArea(e)?"r"!==i||s?Pn(t,e,i,s,n,o):function(t,e,i,s){let n=[];return Sn(t,i,e,(function(t,i,o){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],s),{angle:l}=ze(t,{x:e.x,y:e.y});He(l,r,a)&&n.push({element:t,datasetIndex:i,index:o})})),n}(t,e,i,n):[]}function Dn(t,e,i,s,n){const o=[],r="x"===i?"inXRange":"inYRange";let a=!1;return Sn(t,i,e,((t,s,l)=>{t[r]&&t[r](e[i],n)&&(o.push({element:t,datasetIndex:s,index:l}),a=a||t.inRange(e.x,e.y,n))})),s&&!a?[]:o}var On={evaluateInteractionItems:Sn,modes:{index(t,e,i,s){const n=ys(e,t),o=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?An(t,n,o,s,r):Cn(t,n,o,!1,s,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,s){const n=ys(e,t),o=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?An(t,n,o,s,r):Cn(t,n,o,!1,s,r);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,s)=>An(t,ys(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=ys(e,t),o=i.axis||"xy",r=i.includeInvisible||!1;return Cn(t,n,o,i.intersect,s,r)},x:(t,e,i,s)=>Dn(t,ys(e,t),"x",i.intersect,s),y:(t,e,i,s)=>Dn(t,ys(e,t),"y",i.intersect,s)}};const En=["left","top","right","bottom"];function Tn(t,e){return t.filter((t=>t.pos===e))}function Rn(t,e){return t.filter((t=>-1===En.indexOf(t.pos)&&t.box.axis===e))}function Ln(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function In(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!En.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,r,a;for(o=0,r=t.length;o<r;++o){a=t[o];const{fullSize:r}=a.box,l=i[a.stack],h=l&&a.stackWeight/l.weight;a.horizontal?(a.width=h?h*s:r&&e.availableWidth,a.height=n):(a.width=s,a.height=h?h*n:r&&e.availableHeight)}return i}function zn(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function $n(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 Fn(t,e,i,s){const{pos:n,box:o}=i,r=t.maxPadding;if(!Qt(n)){i.size&&(t[n]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[n]+=i.size}o.getPadding&&$n(r,o.getPadding());const a=Math.max(0,e.outerWidth-zn(r,t,"left","right")),l=Math.max(0,e.outerHeight-zn(r,t,"top","bottom")),h=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function Vn(t,e){const i=e.maxPadding;function s(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function Hn(t,e,i,s){const n=[];let o,r,a,l,h,c;for(o=0,r=t.length,h=0;o<r;++o){a=t[o],l=a.box,l.update(a.width||e.w,a.height||e.h,Vn(a.horizontal,e));const{same:r,other:d}=Fn(e,i,a,s);h|=r&&n.length,c=c||d,l.fullSize||n.push(a)}return h&&Hn(n,e,i,s)||c}function Nn(t,e,i,s,n){t.top=i,t.left=e,t.right=e+s,t.bottom=i+n,t.width=s,t.height=n}function Bn(t,e,i,s){const n=i.padding;let{x:o,y:r}=e;for(const a of t){const t=a.box,l=s[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/l.weight||1;if(a.horizontal){const s=e.w*h,o=l.size||t.height;me(l.start)&&(r=l.start),t.fullSize?Nn(t,n.left,r,i.outerWidth-n.right-n.left,o):Nn(t,e.left+l.placed,r,s,o),l.start=r,l.placed+=s,r=t.bottom}else{const s=e.h*h,r=l.size||t.width;me(l.start)&&(o=l.start),t.fullSize?Nn(t,o,n.top,r,i.outerHeight-n.bottom-n.top):Nn(t,o,e.top+l.placed,r,s),l.start=o,l.placed+=s,o=t.right}}e.x=o,e.y=r}var Wn={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){const 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,s){if(!t)return;const n=Bi(t.options.layout.padding),o=Math.max(e-n.width,0),r=Math.max(i-n.height,0),a=function(t){const e=function(t){const e=[];let i,s,n,o,r,a;for(i=0,s=(t||[]).length;i<s;++i)n=t[i],({position:o,options:{stack:r,stackWeight:a=1}}=n),e.push({index:i,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&o+r,stackWeight:a});return e}(t),i=Ln(e.filter((t=>t.box.fullSize)),!0),s=Ln(Tn(e,"left"),!0),n=Ln(Tn(e,"right")),o=Ln(Tn(e,"top"),!0),r=Ln(Tn(e,"bottom")),a=Rn(e,"x"),l=Rn(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:Tn(e,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}(t.boxes),l=a.vertical,h=a.horizontal;oe(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/c,hBoxMaxHeight:r/2}),u=Object.assign({},n);$n(u,Bi(s));const f=Object.assign({maxPadding:u,w:o,h:r,x:n.left,y:n.top},n),p=In(l.concat(h),d);Hn(a.fullSize,f,d,p),Hn(l,f,d,p),Hn(h,f,d,p)&&Hn(l,f,d,p),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Bn(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,Bn(a.rightAndBottom,f,d,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},oe(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class jn{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 Un extends jn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Yn="$chartjs",Xn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},qn=t=>null===t||""===t;const Kn=!!ks&&{passive:!0};function Zn(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,Kn)}function Gn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Jn(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Gn(i.addedNodes,s),e=e&&!Gn(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function Qn(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Gn(i.removedNodes,s),e=e&&!Gn(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const to=new Map;let eo=0;function io(){const t=window.devicePixelRatio;t!==eo&&(eo=t,to.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function so(t,e,i){const s=t.canvas,n=s&&ps(s);if(!n)return;const o=Ze(((t,e)=>{const s=n.clientWidth;i(t,e),s<n.clientWidth&&i()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return r.observe(n),function(t,e){to.size||window.addEventListener("resize",io),to.set(t,e)}(t,o),r}function no(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){to.delete(t),to.size||window.removeEventListener("resize",io)}(t)}function oo(t,e,i){const s=t.canvas,n=Ze((e=>{null!==t.ctx&&i(function(t,e){const i=Xn[t.type]||t.type,{x:s,y:n}=ys(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,Kn)}(s,e,n),n}class ro extends jn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t[Yn]={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",qn(n)){const e=Ss(t,"width");void 0!==e&&(t.width=e)}if(qn(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Ss(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Yn])return!1;const i=e[Yn].initial;["height","width"].forEach((t=>{const s=i[t];Gt(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e[Yn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:Jn,detach:Qn,resize:so}[e]||oo;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:no,detach:no,resize:no}[e]||Zn)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return ws(t,e,i,s)}isAttached(t){const e=t&&ps(t);return!(!e||!e.isConnected)}}class ao{constructor(){gt(this,"x",void 0),gt(this,"y",void 0),gt(this,"active",!1),gt(this,"options",void 0),gt(this,"$animations",void 0)}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Ee(this.x)&&Ee(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach((t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}function lo(t,e){const i=t.options.ticks,s=function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),n=Math.min(i.maxTicksLimit||s,s),o=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}(e):[],r=o.length,a=o[0],l=o[r-1],h=[];if(r>n)return function(t,e,i,s){let n,o=0,r=i[0];for(s=Math.ceil(s),n=0;n<t.length;n++)n===r&&(e.push(t[n]),o++,r=i[o*s])}(e,h,o,r/n),h;const c=function(t,e,i){const s=function(t){const e=t.length;let i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}(t),n=e.length/i;if(!s)return Math.max(n,1);const o=function(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s==0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(s);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>n)return e}return Math.max(n,1)}(o,e,n);if(r>0){let t,i;const s=r>1?Math.round((l-a)/(r-1)):null;for(ho(e,h,c,Gt(s)?0:a-s,a),t=0,i=r-1;t<i;t++)ho(e,h,c,o[t],o[t+1]);return ho(e,h,c,l,Gt(s)?e.length:l+s),h}return ho(e,h,c),h}function ho(t,e,i,s,n){const o=ie(s,0),r=Math.min(ie(n,t.length),t.length);let a,l,h,c=0;for(i=Math.ceil(i),n&&(a=n-s,i=a/Math.floor(a/i)),h=o;h<0;)c++,h=Math.round(o+c*i);for(l=Math.max(o,0);l<r;l++)l===h&&(e.push(t[l]),c++,h=Math.round(o+c*i))}gt(ao,"defaults",{}),gt(ao,"defaultRoutes",void 0);const co=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,uo=(t,e)=>Math.min(e||t,t);function fo(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;o<n;o+=s)i.push(t[Math.floor(o)]);return i}function po(t,e,i){const s=t.ticks.length,n=Math.min(e,s-1),o=t._startPixel,r=t._endPixel,a=1e-6;let l,h=t.getPixelForTick(n);if(!(i&&(l=1===s?Math.max(h-o,r-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(n-1))/2,h+=n<e?l:-l,h<o-a||h>r+a)))return h}function go(t){return t.drawTicks?t.tickLength:0}function mo(t,e){if(!t.display)return 0;const i=Wi(t.font,e),s=Bi(t.padding);return(Jt(t.text)?t.text.length:1)*i.lineHeight+s.height}function bo(t,e,i){let s=Ge(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class xo extends ao{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(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)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=ee(t,Number.POSITIVE_INFINITY),e=ee(e,Number.NEGATIVE_INFINITY),i=ee(i,Number.POSITIVE_INFINITY),s=ee(s,Number.NEGATIVE_INFINITY),{min:ee(t,i),max:ee(e,s),minDefined:te(t),maxDefined:te(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:i,max:s};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;a<l;++a)e=r[a].controller.getMinMax(this,t),n||(i=Math.min(i,e.min)),o||(s=Math.max(s,e.max));return i=o&&i>s?s:i,s=n&&i>s?i:s,{min:ee(i,ee(s,i)),max:ee(s,ee(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ne(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:o}=this.options,r=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){const{min:s,max:n}=t,o=se(e,(n-s)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(s,-Math.abs(o)),max:r(n,o)}}(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?fo(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=lo(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ne(this.options.afterUpdate,[this])}beforeSetDimensions(){ne(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){ne(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ne(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ne(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,n;for(i=0,s=t.length;i<s;i++)n=t[i],n.label=ne(e.callback,[n.value,i,t],this)}afterTickToLabelConversion(){ne(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ne(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=uo(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,n=e.maxRotation;let o,r,a,l=s;if(!this._isVisible()||!e.display||s>=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=Ne(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),c+6>o&&(o=u/(i-(t.offset?.5:1)),r=this.maxHeight-go(t.grid)-e.padding-mo(t.title,this.chart.options.font),a=Math.sqrt(c*c+d*d),l=Le(Math.min(Math.asin(Ne((h.highest.height+6)/o,-1,1)),Math.asin(Ne(r/a,-1,1))-Math.asin(Ne(d/a,-1,1)))),l=Math.max(s,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){ne(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ne(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const o=mo(s,e.options.font);if(r?(t.width=this.maxWidth,t.height=go(n)+o):(t.height=this.maxHeight,t.width=go(n)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:o}=this._getLabelSizes(),a=2*i.padding,l=Re(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(r){const e=i.mirror?0:c*n.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:h*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,s,c,h)}}this._handleMargins(),r?(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){const{ticks:{align:n,padding:o},position:r}=this.options,a=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;a?l?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-r+o)*this.width/(this.width-r),0),this.paddingRight=Math.max((d-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_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(){ne(this.options.afterFit,[this])}isHorizontal(){const{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<i;e++)Gt(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=fo(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:n}=this,o=[],r=[],a=Math.floor(e/uo(e,i));let l,h,c,d,u,f,p,g,m,b,x,_=0,y=0;for(l=0;l<e;l+=a){if(d=t[l].label,u=this._resolveTickFontOptions(l),s.font=f=u.string,p=n[f]=n[f]||{data:{},gc:[]},g=u.lineHeight,m=b=0,Gt(d)||Jt(d)){if(Jt(d))for(h=0,c=d.length;h<c;++h)x=d[h],Gt(x)||Jt(x)||(m=yi(s,p.data,p.gc,m,x),b+=g)}else m=yi(s,p.data,p.gc,m,d),b=g;o.push(m),r.push(b),_=Math.max(m,_),y=Math.max(b,y)}!function(t,e){oe(t,(t=>{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n<s;++n)delete t.data[i[n]];i.splice(0,s)}}))}(n,e);const v=o.indexOf(_),w=r.indexOf(y),M=t=>({width:o[t]||0,height:r[t]||0});return{first:M(0),last:M(e-1),widest:M(v),highest:M(w),widths:o,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Ne(this._alignToPixels?wi(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return Ui(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=Ui(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Re(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),n=this._getLabelSizes(),o=t.autoSkipPadding||0,r=n?n.widest.width+o:0,a=n?n.highest.height+o:0;return this.isHorizontal()?a*i>r*s?r/i:a/s:a*s<r*i?a/i:r/s}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:o,border:r}=s,a=n.offset,l=this.isHorizontal(),h=this.ticks.length+(a?1:0),c=go(n),d=[],u=r.setContext(this.getContext()),f=u.display?u.width:0,p=f/2,g=function(t){return wi(i,t,f)};let m,b,x,_,y,v,w,M,k,S,A,P;if("top"===o)m=g(this.bottom),v=this.bottom-c,M=m-p,S=g(t.top)+p,P=t.bottom;else if("bottom"===o)m=g(this.top),S=t.top,P=g(t.bottom)-p,v=m+p,M=this.top+c;else if("left"===o)m=g(this.right),y=this.right-c,w=m-p,k=g(t.left)+p,A=t.right;else if("right"===o)m=g(this.left),k=t.left,A=g(t.right)-p,y=m+p,w=this.left+c;else if("x"===e){if("center"===o)m=g((t.top+t.bottom)/2+.5);else if(Qt(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}S=t.top,P=t.bottom,v=m+p,M=v+c}else if("y"===e){if("center"===o)m=g((t.left+t.right)/2);else if(Qt(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}y=m-p,w=y-c,k=t.left,A=t.right}const C=ie(s.ticks.maxTicksLimit,h),D=Math.max(1,Math.ceil(h/C));for(b=0;b<h;b+=D){const t=this.getContext(b),e=n.setContext(t),s=r.setContext(t),o=e.lineWidth,h=e.color,c=s.dash||[],u=s.dashOffset,f=e.tickWidth,p=e.tickColor,g=e.tickBorderDash||[],m=e.tickBorderDashOffset;x=po(this,b,a),void 0!==x&&(_=wi(i,x,o),l?y=w=k=A=_:v=M=S=P=_,d.push({tx1:y,ty1:v,tx2:w,ty2:M,x1:k,y1:S,x2:A,y2:P,width:o,color:h,borderDash:c,borderDashOffset:u,tickWidth:f,tickColor:p,tickBorderDash:g,tickBorderDashOffset:m}))}return this._ticksLength=h,this._borderValue=m,d}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:n}=i,o=this.isHorizontal(),r=this.ticks,{align:a,crossAlign:l,padding:h,mirror:c}=n,d=go(i.grid),u=d+h,f=c?-h:u,p=-Re(this.labelRotation),g=[];let m,b,x,_,y,v,w,M,k,S,A,P,C="middle";if("top"===s)v=this.bottom-f,w=this._getXAxisLabelAlignment();else if("bottom"===s)v=this.top+f,w=this._getXAxisLabelAlignment();else if("left"===s){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,y=t.x}else if("right"===s){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,y=t.x}else if("x"===e){if("center"===s)v=(t.top+t.bottom)/2+u;else if(Qt(s)){const t=Object.keys(s)[0],e=s[t];v=this.chart.scales[t].getPixelForValue(e)+u}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===s)y=(t.left+t.right)/2-u;else if(Qt(s)){const t=Object.keys(s)[0],e=s[t];y=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(d).textAlign}"y"===e&&("start"===a?C="top":"end"===a&&(C="bottom"));const D=this._getLabelSizes();for(m=0,b=r.length;m<b;++m){x=r[m],_=x.label;const t=n.setContext(this.getContext(m));M=this.getPixelForTick(m)+n.labelOffset,k=this._resolveTickFontOptions(m),S=k.lineHeight,A=Jt(_)?_.length:1;const e=A/2,i=t.color,a=t.textStrokeColor,h=t.textStrokeWidth;let d,u=w;if(o?(y=M,"inner"===w&&(u=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),P="top"===s?"near"===l||0!==p?-A*S+S/2:"center"===l?-D.highest.height/2-e*S+S:-D.highest.height+S/2:"near"===l||0!==p?S/2:"center"===l?D.highest.height/2-e*S:D.highest.height-A*S,c&&(P*=-1),0===p||t.showLabelBackdrop||(y+=S/2*Math.sin(p))):(v=M,P=(1-A)*S/2),t.showLabelBackdrop){const e=Bi(t.backdropPadding),i=D.heights[m],s=D.widths[m];let n=P-e.top,o=0-e.left;switch(C){case"middle":n-=i/2;break;case"bottom":n-=i}switch(w){case"center":o-=s/2;break;case"right":o-=s;break;case"inner":m===b-1?o-=s:m>0&&(o-=s/2)}d={left:o,top:n,width:s+e.width,height:i+e.height,color:t.backdropColor}}g.push({label:_,font:k,textOffset:P,options:{rotation:p,color:i,strokeColor:a,strokeWidth:h,textAlign:u,textBaseline:C,translation:[y,v],backdrop:d}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Re(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:n}}=this.options,o=t+n,r=this._getLabelSizes().widest.width;let a,l;return"left"===e?s?(l=this.right+n,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l+=r)):(l=this.right-o,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l=this.left)):"right"===e?s?(l=this.left+n,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l-=r)):(l=this.left+o,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:n,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,n,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const r=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n<o;++n){const t=s[n];e.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,n=i.setContext(this.getContext()),o=i.display?n.width:0;if(!o)return;const r=s.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,h,c,d;this.isHorizontal()?(l=wi(t,this.left,o)-o/2,h=wi(t,this.right,r)+r/2,c=d=a):(c=wi(t,this.top,o)-o/2,d=wi(t,this.bottom,r)+r/2,l=h=a),e.save(),e.lineWidth=n.width,e.strokeStyle=n.color,e.beginPath(),e.moveTo(l,c),e.lineTo(h,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&Pi(e,i);const s=this.getLabelItems(t);for(const t of s){const i=t.options,s=t.font;Ri(e,t.label,0,t.textOffset,s,i)}i&&Ci(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const n=Wi(i.font),o=Bi(i.padding),r=i.align;let a=n.lineHeight/2;"bottom"===e||"center"===e||Qt(e)?(a+=o.bottom,Jt(i.text)&&(a+=n.lineHeight*(i.text.length-1))):a+=o.top;const{titleX:l,titleY:h,maxWidth:c,rotation:d}=function(t,e,i,s){const{top:n,left:o,bottom:r,right:a,chart:l}=t,{chartArea:h,scales:c}=l;let d,u,f,p=0;const g=r-n,m=a-o;if(t.isHorizontal()){if(u=Je(s,o,a),Qt(i)){const t=Object.keys(i)[0],s=i[t];f=c[t].getPixelForValue(s)+g-e}else f="center"===i?(h.bottom+h.top)/2+g-e:co(t,i,e);d=a-o}else{if(Qt(i)){const t=Object.keys(i)[0],s=i[t];u=c[t].getPixelForValue(s)-m+e}else u="center"===i?(h.left+h.right)/2-m+e:co(t,i,e);f=Je(s,r,n),p="left"===i?-ke:ke}return{titleX:u,titleY:f,maxWidth:d,rotation:p}}(this,a,e,r);Ri(t,i.text,0,0,n,{color:i.color,maxWidth:c,rotation:d,textAlign:bo(r,e,s),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=ie(t.grid&&t.grid.z,-1),s=ie(t.border&&t.border.z,0);return this._isVisible()&&this.draw===xo.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];o[i]!==this.id||t&&o.type!==t||s.push(o)}return s}_resolveTickFontOptions(t){return Wi(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class _o{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const s=this.items,n=t.id,o=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);return n in s||(s[n]=t,function(t,e,i){const s=ce(Object.create(null),[i?_i.get(i):{},_i.get(e),t.defaults]);_i.set(e,s),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),r=e[i].split("."),a=r.pop(),l=r.join(".");_i.route(o,n,l,a)}))}(e,t.defaultRoutes);t.descriptors&&_i.describe(e,t.descriptors)}(t,o,i),this.override&&_i.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in _i[s]&&(delete _i[s][i],this.override&&delete pi[i])}}class yo{constructor(){this.controllers=new _o(sn,"datasets",!0),this.elements=new _o(ao,"elements"),this.plugins=new _o(Object,"plugins"),this.scales=new _o(xo,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e)}remove(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e)}addControllers(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.controllers)}addElements(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.elements)}addPlugins(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.plugins)}addScales(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,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(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.controllers)}removeElements(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.elements)}removePlugins(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.plugins)}removeScales(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):oe(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=ge(t);ne(i["before"+s],[],i),e[t](i),ne(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(void 0===s)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var vo=new yo;class wo{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,s){s=s||{};for(const n of t){const t=n.plugin;if(!1===ne(t[i],[e,s,n.options],t)&&s.cancelable)return!1}return!0}invalidate(){Gt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=ie(i.options&&i.options.plugins,{}),n=function(t){const e={},i=[],s=Object.keys(vo.plugins.items);for(let t=0;t<s.length;t++)i.push(vo.getPlugin(s[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const s=n[t];-1===i.indexOf(s)&&(i.push(s),e[s.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==s||e?function(t,e,i,s){let{plugins:n,localIds:o}=e;const r=[],a=t.getContext();for(const e of n){const n=e.id,l=Mo(i[n],s);null!==l&&r.push({plugin:e,options:ko(t.config,{plugin:e,local:o[n]},l,a)})}return r}(t,n,s,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(t,e)=>t.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 Mo(t,e){return e||!1!==t?!0===t?{}:t:null}function ko(t,e,i,s){let{plugin:n,local:o}=e;const r=t.pluginScopeKeys(n),a=t.getOptionScopes(i,r);return o&&n.defaults&&a.push(n.defaults),t.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function So(t,e){const i=_i.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ao(t){if("x"===t||"y"===t||"r"===t)return t}function Po(t){if(Ao(t))return t;for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];for(const e of i){const i=e.axis||("top"===(n=e.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||t.length>1&&Ao(t[0].toLowerCase());if(i)return i}var n;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Co(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Do(t,e){const i=pi[t.type]||{scales:{}},s=e.scales||{},n=So(t.type,e),o=Object.create(null);return Object.keys(s).forEach((e=>{const r=s[e];if(!Qt(r))return console.error(`Invalid scale configuration for scale: ${e}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const a=Po(e,r,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Co(t,"x",i[0])||Co(t,"y",i[0])}return{}}(e,t),_i.scales[r.type]),l=function(t,e){return t===e?"_index_":"_value_"}(a,n),h=i.scales||{};o[e]=de(Object.create(null),[{axis:a},r,h[a],h[l]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,r=i.indexAxis||So(n,e),a=(pi[n]||{}).scales||{};Object.keys(a).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),n=i[e+"AxisID"]||e;o[n]=o[n]||Object.create(null),de(o[n],[{axis:e},s[n],a[t]])}))})),Object.keys(o).forEach((t=>{const e=o[t];de(e,[_i.scales[e.type],_i.scale])})),o}function Oo(t){const e=t.options||(t.options={});e.plugins=ie(e.plugins,{}),e.scales=Do(t,e)}function Eo(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const To=new Map,Ro=new Set;function Lo(t,e){let i=To.get(t);return i||(i=e(),To.set(t,i),Ro.add(i)),i}const Io=(t,e,i)=>{const s=pe(e,i);void 0!==s&&t.add(s)};class zo{constructor(t){this._config=function(t){return(t=t||{}).data=Eo(t.data),Oo(t),t}(t),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=Eo(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Oo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Lo(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Lo(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Lo(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Lo(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,o=this._cachedScopes(t,i),r=o.get(e);if(r)return r;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>Io(a,t,e)))),e.forEach((t=>Io(a,s,t))),e.forEach((t=>Io(a,pi[n]||{},t))),e.forEach((t=>Io(a,_i,t))),e.forEach((t=>Io(a,gi,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),Ro.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,pi[e]||{},_i.datasets[e]||{},{type:e},_i,gi]}resolveNamedOptions(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""];const n={$shared:!0},{resolver:o,subPrefixes:r}=$o(this._resolverCache,t,s);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:s}=qi(t);for(const n of e){const e=i(n),o=s(n),r=(o||e)&&t[n];if(e&&(be(r)||Fo(r))||o&&Jt(r))return!0}return!1}(o,e)){n.$shared=!1;a=Xi(o,i=be(i)?i():i,this.createResolver(t,i,r))}for(const t of e)n[t]=a[t];return n}createResolver(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],s=arguments.length>3?arguments[3]:void 0;const{resolver:n}=$o(this._resolverCache,t,i);return Qt(e)?Xi(n,e,void 0,s):n}}function $o(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);if(!o){o={resolver:Yi(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)}return o}const Fo=t=>Qt(t)&&Object.getOwnPropertyNames(t).some((e=>be(t[e])));const Vo=["top","bottom","left","right","chartArea"];function Ho(t,e){return"top"===t||"bottom"===t||-1===Vo.indexOf(t)&&"x"===e}function No(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function Bo(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),ne(i&&i.onComplete,[t],e)}function Wo(t){const e=t.chart,i=e.options.animation;ne(i&&i.onProgress,[t],e)}function jo(t){return fs()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Uo={},Yo=t=>{const e=jo(t);return Object.values(Uo).filter((t=>t.canvas===e)).pop()};function Xo(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}function qo(t,e,i){return t.options.clip?t[i]:e[i]}class Ko{static register(){vo.add(...arguments),Zo()}static unregister(){vo.remove(...arguments),Zo()}constructor(t,e){const i=this.config=new zo(e),s=jo(t),n=Yo(s);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!fs()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Un:ro}(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,l=a&&a.height,h=a&&a.width;this.id=Zt(),this.ctx=r,this.canvas=a,this.width=h,this.height=l,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 wo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(){for(var s=arguments.length,n=new Array(s),o=0;o<s;o++)n[o]=arguments[o];return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],Uo[this.id]=this,r&&a?(Hs.listen(this,"complete",Bo),Hs.listen(this,"progress",Wo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:n}=this;return Gt(t)?e&&n?n:s?i/s: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 vo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ms(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Mi(this.canvas,this.ctx),this}stop(){return Hs.stop(this),this}resize(t,e){Hs.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,n),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Ms(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),ne(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){oe(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=Po(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),oe(n,(e=>{const n=e.options,o=n.id,r=Po(o,n),a=ie(n.type,e.dtype);void 0!==n.position&&Ho(n.position,r)===Ho(e.dposition)||(n.position=e.dposition),s[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(vo.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,t)})),oe(s,((t,e)=>{t||delete i[e]})),oe(i,(t=>{Wn.configure(this,t,t.options),Wn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(No("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const s=e[i];let n=this.getDatasetMeta(i);const o=s.type||this.config.type;if(n.type&&n.type!==o&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=o,n.indexAxis=s.indexAxis||So(o,this.options),n.order=s.order||0,n.index=i,n.label=""+s.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const e=vo.getController(o),{datasetElementType:s,dataElementType:r}=_i.datasets[o];Object.assign(e,{dataElementType:vo.getElement(r),datasetElementType:s&&vo.getElement(s)}),n.controller=new e(this,i),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){oe(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!s&&-1===n.indexOf(e);e.buildOrUpdateElements(i),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),s||oe(n,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(No("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){oe(this.scales,(t=>{Wn.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);xe(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){Xo(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;t<e;t++)if(!xe(s,i(t)))return;return Array.from(s).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Wn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],oe(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 t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,be(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Hs.has(this)?this.attached&&!Hs.running(this)&&Hs.start(this):(this.draw(),Bo({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,n;for(s=0,n=e.length;s<n;++s){const n=e[s];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=function(t,e){const{xScale:i,yScale:s}=t;return i&&s?{left:qo(i,e,"left"),right:qo(i,e,"right"),top:qo(s,e,"top"),bottom:qo(s,e,"bottom")}:e}(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&Pi(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(),s&&Ci(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Ai(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=On.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let 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=Ui(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,s);me(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Hs.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Mi(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Uo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(){return this.canvas.toDataURL(...arguments)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};oe(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():o()}unbindEvents(){oe(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},oe(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,r,a;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=t.length;r<a;++r){o=t[r];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((t=>{let{datasetIndex:e,index:i}=t;const s=this.getDatasetMeta(e);if(!s)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:s.data[i],index:i}}));!re(i,e)&&(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){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),r=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(t,e){const 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;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,o=e,r=this._getActiveElements(t,s,i,o),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,ne(n.onHover,[t,r,this],this),a&&ne(n.onClick,[t,r,this],this));const h=!re(r,s);return(h||e)&&(this._active=r,this._updateHoverStyles(r,s,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}function Zo(){return oe(Ko.instances,(t=>t._plugins.invalidate()))}function Go(t,e,i,s){const n=Vi(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,r=Math.min(o,s*e/2),a=t=>{const e=(i-Math.min(o,t))*s/2;return Ne(t,0,Math.min(o,e))};return{outerStart:a(n.outerStart),outerEnd:a(n.outerEnd),innerStart:Ne(n.innerStart,0,r),innerEnd:Ne(n.innerEnd,0,r)}}function Jo(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function Qo(t,e,i,s,n,o){const{x:r,y:a,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-h,0),u=c>0?c+s+i+h:0;let f=0;const p=n-l;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;f=(p-(0!==t?p*t/(t+s):p))/2}const g=(p-Math.max(.001,p*d-i/_e)/d)/2,m=l+g+f,b=n-g-f,{outerStart:x,outerEnd:_,innerStart:y,innerEnd:v}=Go(e,u,d,b-m),w=d-x,M=d-_,k=m+x/w,S=b-_/M,A=u+y,P=u+v,C=m+y/A,D=b-v/P;if(t.beginPath(),o){const e=(k+S)/2;if(t.arc(r,a,d,k,e),t.arc(r,a,d,e,S),_>0){const e=Jo(M,S,r,a);t.arc(e.x,e.y,_,S,b+ke)}const i=Jo(P,b,r,a);if(t.lineTo(i.x,i.y),v>0){const e=Jo(P,D,r,a);t.arc(e.x,e.y,v,b+ke,D+Math.PI)}const s=(b-v/u+(m+y/u))/2;if(t.arc(r,a,u,b-v/u,s,!0),t.arc(r,a,u,s,m+y/u,!0),y>0){const e=Jo(A,C,r,a);t.arc(e.x,e.y,y,C+Math.PI,m-ke)}const n=Jo(w,m,r,a);if(t.lineTo(n.x,n.y),x>0){const e=Jo(w,k,r,a);t.arc(e.x,e.y,x,m-ke,k)}}else{t.moveTo(r,a);const e=Math.cos(k)*d+r,i=Math.sin(k)*d+a;t.lineTo(e,i);const s=Math.cos(S)*d+r,n=Math.sin(S)*d+a;t.lineTo(s,n)}t.closePath()}function tr(t,e,i,s,n){const{fullCircles:o,startAngle:r,circumference:a,options:l}=e,{borderWidth:h,borderJoinStyle:c,borderDash:d,borderDashOffset:u}=l,f="inner"===l.borderAlign;if(!h)return;t.setLineDash(d||[]),t.lineDashOffset=u,f?(t.lineWidth=2*h,t.lineJoin=c||"round"):(t.lineWidth=h,t.lineJoin=c||"bevel");let p=e.endAngle;if(o){Qo(t,e,i,s,p,n);for(let e=0;e<o;++e)t.stroke();isNaN(a)||(p=r+(a%ye||ye))}f&&function(t,e,i){const{startAngle:s,pixelMargin:n,x:o,y:r,outerRadius:a,innerRadius:l}=e;let h=n/a;t.beginPath(),t.arc(o,r,a,s-h,i+h),l>n?(h=n/l,t.arc(o,r,l,i+h,s-h,!0)):t.arc(o,r,n,i+ke,s-ke),t.closePath(),t.clip()}(t,e,p),o||(Qo(t,e,i,s,p,n),t.stroke())}gt(Ko,"defaults",_i),gt(Ko,"instances",Uo),gt(Ko,"overrides",pi),gt(Ko,"registry",vo),gt(Ko,"version","4.4.5"),gt(Ko,"getChart",Yo);class er extends ao{constructor(t){super(),gt(this,"circumference",void 0),gt(this,"endAngle",void 0),gt(this,"fullCircles",void 0),gt(this,"innerRadius",void 0),gt(this,"outerRadius",void 0),gt(this,"pixelMargin",void 0),gt(this,"startAngle",void 0),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:o}=ze(s,{x:t,y:e}),{startAngle:r,endAngle:a,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,u=ie(c,a-r),f=He(n,r,a)&&r!==a,p=u>=ye||f,g=Be(o,l+d,h+d);return p&&g}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:a,spacing:l}=this.options,h=(s+n)/2,c=(o+r+l+a)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,n=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>ye?Math.floor(i/ye):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*s,Math.sin(r)*s);const a=s*(1-Math.sin(Math.min(_e,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,s,n){const{fullCircles:o,startAngle:r,circumference:a}=e;let l=e.endAngle;if(o){Qo(t,e,i,s,l,n);for(let e=0;e<o;++e)t.fill();isNaN(a)||(l=r+(a%ye||ye))}Qo(t,e,i,s,l,n),t.fill()}(t,this,a,n,o),tr(t,this,a,n,o),t.restore()}}function ir(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=ie(i.borderCapStyle,e.borderCapStyle),t.setLineDash(ie(i.borderDash,e.borderDash)),t.lineDashOffset=ie(i.borderDashOffset,e.borderDashOffset),t.lineJoin=ie(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ie(i.borderWidth,e.borderWidth),t.strokeStyle=ie(i.borderColor,e.borderColor)}function sr(t,e,i){t.lineTo(i.x,i.y)}function nr(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=t.length,{start:n=0,end:o=s-1}=i,{start:r,end:a}=e,l=Math.max(n,r),h=Math.min(o,a),c=n<r&&o<r||n>a&&o>a;return{count:s,start:l,loop:e.loop,ilen:h<l&&!c?s+h-l:h-l}}function or(t,e,i,s){const{points:n,options:o}=e,{count:r,start:a,loop:l,ilen:h}=nr(n,i,s),c=function(t){return t.stepped?Di:t.tension||"monotone"===t.cubicInterpolationMode?Oi:sr}(o);let d,u,f,{move:p=!0,reverse:g}=s||{};for(d=0;d<=h;++d)u=n[(a+(g?h-d:d))%r],u.skip||(p?(t.moveTo(u.x,u.y),p=!1):c(t,f,u,g,o.stepped),f=u);return l&&(u=n[(a+(g?h:0))%r],c(t,f,u,g,o.stepped)),!!l}function rr(t,e,i,s){const n=e.points,{count:o,start:r,ilen:a}=nr(n,i,s),{move:l=!0,reverse:h}=s||{};let c,d,u,f,p,g,m=0,b=0;const x=t=>(r+(h?a-t:t))%o,_=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(d=n[x(0)],t.moveTo(d.x,d.y)),c=0;c<=a;++c){if(d=n[x(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(i<f?f=i:i>p&&(p=i),m=(b*m+e)/++b):(_(),t.lineTo(e,i),u=s,b=0,f=p=i),g=i}_()}function ar(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?rr:or}gt(er,"id","arc"),gt(er,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),gt(er,"defaultRoutes",{backgroundColor:"backgroundColor"}),gt(er,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t});const lr="function"==typeof Path2D;function hr(t,e,i,s){lr&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),ir(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,r=ar(e);for(const a of n)ir(t,o,a.style),t.beginPath(),r(t,e,a,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class cr extends ao{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){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;us(this._points,i,t,s,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=function(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const o=!!t._loop,{start:r,end:a}=function(t,e,i,s){let n=0,o=e-1;if(i&&!s)for(;n<e&&!t[n].skip;)n++;for(;n<e&&t[n].skip;)n++;for(n%=e,i&&(o+=n);o>n&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);return zs(t,!0===s?[{start:r,end:a,loop:o}]:function(t,e,i,s){const n=t.length,o=[];let r,a=e,l=t[e];for(r=e+1;r<=i;++r){const i=t[r%n];i.skip||i.stop?l.skip||(s=!1,o.push({start:e%n,end:(r-1)%n,loop:s}),e=a=i.stop?r:null):(a=r,l.skip&&(e=r)),l=i}return null!==a&&o.push({start:e%n,end:a%n,loop:s}),o}(i,r,a<r?a+n:a,!!t._fullLoop&&0===r&&a===n-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],n=this.points,o=Is(this,{property:e,start:s,end:s});if(!o.length)return;const r=[],a=function(t){return t.stepped?Ps:t.tension||"monotone"===t.cubicInterpolationMode?Cs:As}(i);let l,h;for(l=0,h=o.length;l<h;++l){const{start:h,end:c}=o[l],d=n[h],u=n[c];if(d===u){r.push(d);continue}const f=a(d,u,Math.abs((s-d[e])/(u[e]-d[e])),i.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return ar(this)(t,this,e,i)}path(t,e,i){const s=this.segments,n=ar(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const r of s)o&=n(t,this,r,{start:e,end:e+i-1});return!!o}draw(t,e,i,s){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(t.save(),hr(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function dr(t,e,i,s){const n=t.options,{[i]:o}=t.getProps([i],s);return Math.abs(e-o)<n.radius+n.hitRadius}gt(cr,"id","line"),gt(cr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),gt(cr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),gt(cr,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t});class ur extends ao{constructor(t){super(),gt(this,"parsed",void 0),gt(this,"skip",void 0),gt(this,"stop",void 0),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){const s=this.options,{x:n,y:o}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-o,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return dr(this,t,"x",e)}inYRange(t,e){return dr(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Ai(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,ki(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function fr(t,e){const{x:i,y:s,base:n,width:o,height:r}=t.getProps(["x","y","base","width","height"],e);let a,l,h,c,d;return t.horizontal?(d=r/2,a=Math.min(i,n),l=Math.max(i,n),h=s-d,c=s+d):(d=o/2,a=i-d,l=i+d,h=Math.min(s,n),c=Math.max(s,n)),{left:a,top:h,right:l,bottom:c}}function pr(t,e,i,s){return t?0:Ne(e,i,s)}function gr(t){const e=fr(t),i=e.right-e.left,s=e.bottom-e.top,n=function(t,e,i){const s=t.options.borderWidth,n=t.borderSkipped,o=Hi(s);return{t:pr(n.top,o.top,0,i),r:pr(n.right,o.right,0,e),b:pr(n.bottom,o.bottom,0,i),l:pr(n.left,o.left,0,e)}}(t,i/2,s/2),o=function(t,e,i){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,o=Ni(n),r=Math.min(e,i),a=t.borderSkipped,l=s||Qt(n);return{topLeft:pr(!l||a.top||a.left,o.topLeft,0,r),topRight:pr(!l||a.top||a.right,o.topRight,0,r),bottomLeft:pr(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:pr(!l||a.bottom||a.right,o.bottomRight,0,r)}}(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:o},inner:{x:e.left+n.l,y:e.top+n.t,w:i-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function mr(t,e,i,s){const n=null===e,o=null===i,r=t&&!(n&&o)&&fr(t,s);return r&&(n||Be(e,r.left,r.right))&&(o||Be(i,r.top,r.bottom))}function br(t,e){t.rect(e.x,e.y,e.w,e.h)}function xr(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=t.x!==i.x?-e:0,n=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-s,r=(t.y+t.h!==i.y+i.h?e:0)-n;return{x:t.x+s,y:t.y+n,w:t.w+o,h:t.h+r,radius:t.radius}}gt(ur,"id","point"),gt(ur,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),gt(ur,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class _r extends ao{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:n,outer:o}=gr(this),r=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?Li:br;var a;t.save(),o.w===n.w&&o.h===n.h||(t.beginPath(),r(t,xr(o,e,n)),t.clip(),r(t,xr(n,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,xr(n,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return mr(this,t,e,i)}inXRange(t,e){return mr(this,t,null,e)}inYRange(t,e){return mr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:n}=this.getProps(["x","y","base","horizontal"],t);return{x:n?(e+s)/2:e,y:n?i:(i+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}gt(_r,"id","bar"),gt(_r,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),gt(_r,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var yr=Object.freeze({__proto__:null,ArcElement:er,BarElement:_r,LineElement:cr,PointElement:ur});const vr=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],wr=vr.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Mr(t){return vr[t%vr.length]}function kr(t){return wr[t%wr.length]}function Sr(t){let e=0;return(i,s)=>{const n=t.getDatasetMeta(s).controller;n instanceof pn?e=function(t,e){return t.backgroundColor=t.data.map((()=>Mr(e++))),e}(i,e):n instanceof mn?e=function(t,e){return t.backgroundColor=t.data.map((()=>kr(e++))),e}(i,e):n&&(e=function(t,e){return t.borderColor=Mr(e),t.backgroundColor=kr(e),++e}(i,e))}}function Ar(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Pr={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:s},options:n}=t.config,{elements:o}=n,r=Ar(s)||(a=n)&&(a.borderColor||a.backgroundColor)||o&&Ar(o)||"rgba(0,0,0,0.1)"!==_i.borderColor||"rgba(0,0,0,0.1)"!==_i.backgroundColor;var a;if(!i.forceOverride&&r)return;const l=Sr(t);s.forEach(l)}};function Cr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Dr(t){t.data.datasets.forEach((t=>{Cr(t)}))}var Or={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Dr(t);const s=t.width;t.data.datasets.forEach(((e,n)=>{const{_data:o,indexAxis:r}=e,a=t.getDatasetMeta(n),l=o||e.data;if("y"===ji([r,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const h=t.scales[a.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let{start:c,count:d}=function(t,e){const i=e.length;let s,n=0;const{iScale:o}=t,{min:r,max:a,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(n=Ne(je(e,o.axis,r).lo,0,i-1)),s=h?Ne(je(e,o.axis,a).hi+1,n,i)-n:i-n,{start:n,count:s}}(a,l);if(d<=(i.threshold||4*s))return void Cr(e);let u;switch(Gt(o)&&(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":u=function(t,e,i,s,n){const o=n.samples||s;if(o>=i)return t.slice(e,e+i);const r=[],a=(i-2)/(o-2);let l=0;const h=e+i-1;let c,d,u,f,p,g=e;for(r[l++]=t[g],c=0;c<o-2;c++){let s,n=0,o=0;const h=Math.floor((c+1)*a)+1+e,m=Math.min(Math.floor((c+2)*a)+1,i)+e,b=m-h;for(s=h;s<m;s++)n+=t[s].x,o+=t[s].y;n/=b,o/=b;const x=Math.floor(c*a)+1+e,_=Math.min(Math.floor((c+1)*a)+1,i)+e,{x:y,y:v}=t[g];for(u=f=-1,s=x;s<_;s++)f=.5*Math.abs((y-n)*(t[s].y-v)-(y-t[s].x)*(o-v)),f>u&&(u=f,d=t[s],p=s);r[l++]=d,g=p}return r[l++]=t[h],r}(l,c,d,s,i);break;case"min-max":u=function(t,e,i,s){let n,o,r,a,l,h,c,d,u,f,p=0,g=0;const m=[],b=e+i-1,x=t[e].x,_=t[b].x-x;for(n=e;n<e+i;++n){o=t[n],r=(o.x-x)/_*s,a=o.y;const e=0|r;if(e===l)a<u?(u=a,h=n):a>f&&(f=a,c=n),p=(g*p+o.x)/++g;else{const i=n-1;if(!Gt(h)&&!Gt(c)){const e=Math.min(h,c),s=Math.max(h,c);e!==d&&e!==i&&m.push({...t[e],x:p}),s!==d&&s!==i&&m.push({...t[s],x:p})}n>0&&i!==d&&m.push(t[i]),m.push(o),l=e,g=0,u=f=a,h=c=d=n}}return m}(l,c,d,s);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Dr(t)}};function Er(t,e,i,s){if(s)return;let n=e[t],o=i[t];return"angle"===t&&(n=Ve(n),o=Ve(o)),{property:t,start:n,end:o}}function Tr(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Rr(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function Lr(t,e){let i=[],s=!1;return Jt(t)?(s=!0,i=t):i=function(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,o=[];return e.segments.forEach((t=>{let{start:e,end:r}=t;r=Tr(e,r,n);const a=n[e],l=n[r];null!==s?(o.push({x:a.x,y:s}),o.push({x:l.x,y:s})):null!==i&&(o.push({x:i,y:a.y}),o.push({x:i,y:l.y}))})),o}(t,e),i.length?new cr({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function Ir(t){return t&&!1!==t.fill}function zr(t,e,i){let s=t[e].fill;const n=[e];let o;if(!i)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!te(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function $r(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=ie(i&&i.target,i);void 0===s&&(s=!!e.backgroundColor);if(!1===s||null===s)return!1;if(!0===s)return"origin";return s}(t);if(Qt(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return te(n)&&Math.floor(n)===n?function(t,e,i,s){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=s)return!1;return i}(s[0],e,n,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Fr(t,e,i){const s=[];for(let n=0;n<i.length;n++){const o=i[n],{first:r,last:a,point:l}=Vr(o,e,"x");if(!(!l||r&&a))if(r)s.unshift(l);else if(t.push(l),!a)break}t.push(...s)}function Vr(t,e,i){const s=t.interpolate(e,i);if(!s)return{};const n=s[i],o=t.segments,r=t.points;let a=!1,l=!1;for(let t=0;t<o.length;t++){const e=o[t],s=r[e.start][i],h=r[e.end][i];if(Be(n,s,h)){a=n===s,l=n===h;break}}return{first:a,last:l,point:s}}class Hr{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:s,y:n,radius:o}=this;return e=e||{start:0,end:ye},t.arc(s,n,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:s}=this,n=t.angle;return{x:e+Math.cos(n)*s,y:i+Math.sin(n)*s,angle:n}}}function Nr(t){const{chart:e,fill:i,line:s}=t;if(te(i))return function(t,e){const i=t.getDatasetMeta(e),s=i&&t.isDatasetVisible(e);return s?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:s}=t,n=[],o=s.segments,r=s.points,a=function(t,e){const i=[],s=t.getMatchingVisibleMetas("line");for(let t=0;t<s.length;t++){const n=s[t];if(n.index===e)break;n.hidden||i.unshift(n.dataset)}return i}(e,i);a.push(Lr({x:null,y:e.bottom},s));for(let t=0;t<o.length;t++){const e=o[t];for(let t=e.start;t<=e.end;t++)Fr(n,r[t],a)}return new cr({points:n,options:{}})}(t);if("shape"===i)return!0;const n=function(t){const e=t.scale||{};if(e.getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,s=e.options,n=e.getLabels().length,o=s.reverse?e.max:e.min,r=function(t,e,i){let s;return s="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:Qt(t)?t.value:e.getBaseValue(),s}(i,e,o),a=[];if(s.grid.circular){const t=e.getPointPositionForValue(0,o);return new Hr({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<n;++t)a.push(e.getPointPositionForValue(t,r));return a}(t);return function(t){const{scale:e={},fill:i}=t,s=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:Qt(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(te(s)){const t=e.isHorizontal();return{x:t?s:null,y:t?null:s}}return null}(t)}(t);return n instanceof Hr?n:Lr(n,s)}function Br(t,e,i){const s=Nr(e),{line:n,scale:o,axis:r}=e,a=n.options,l=a.fill,h=a.backgroundColor,{above:c=h,below:d=h}=l||{};s&&n.points.length&&(Pi(t,i),function(t,e){const{line:i,target:s,above:n,below:o,area:r,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==n&&(Wr(t,s,r.top),jr(t,{line:i,target:s,color:n,scale:a,property:l}),t.restore(),t.save(),Wr(t,s,r.bottom));jr(t,{line:i,target:s,color:o,scale:a,property:l}),t.restore()}(t,{line:n,target:s,above:c,below:d,area:i,scale:o,axis:r}),Ci(t))}function Wr(t,e,i){const{segments:s,points:n}=e;let o=!0,r=!1;t.beginPath();for(const a of s){const{start:s,end:l}=a,h=n[s],c=n[Tr(s,l,n)];o?(t.moveTo(h.x,h.y),o=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function jr(t,e){const{line:i,target:s,property:n,color:o,scale:r}=e,a=function(t,e,i){const s=t.segments,n=t.points,o=e.points,r=[];for(const t of s){let{start:s,end:a}=t;a=Tr(s,a,n);const l=Er(i,n[s],n[a],t.loop);if(!e.segments){r.push({source:t,target:l,start:n[s],end:n[a]});continue}const h=Is(e,l);for(const e of h){const s=Er(i,o[e.start],o[e.end],e.loop),a=Ls(t,n,s);for(const t of a)r.push({source:t,target:e,start:{[i]:Rr(l,s,"start",Math.max)},end:{[i]:Rr(l,s,"end",Math.min)}})}}return r}(i,s,n);for(const{source:e,target:l,start:h,end:c}of a){const{style:{backgroundColor:a=o}={}}=e,d=!0!==s;t.save(),t.fillStyle=a,Ur(t,r,d&&Er(n,h,c)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():Yr(t,s,c,n);const e=!!s.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||Yr(t,s,h,n)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function Ur(t,e,i){const{top:s,bottom:n}=e.chart.chartArea,{property:o,start:r,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(r,s,a-r,n-s),t.clip())}function Yr(t,e,i,s){const n=e.interpolate(i,s);n&&t.lineTo(n.x,n.y)}var Xr={id:"filler",afterDatasetsUpdate(t,e,i){const s=(t.data.datasets||[]).length,n=[];let o,r,a,l;for(r=0;r<s;++r)o=t.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof cr&&(l={visible:t.isDatasetVisible(r),index:r,fill:$r(a,r,s),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,n.push(l);for(r=0;r<s;++r)l=n[r],l&&!1!==l.fill&&(l.fill=zr(n,r,i.propagate))},beforeDraw(t,e,i){const s="beforeDraw"===i.drawTime,n=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),s&&i.fill&&Br(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;Ir(i)&&Br(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;Ir(s)&&"beforeDatasetDraw"===i.drawTime&&Br(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const qr=(t,e)=>{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)}};class Kr extends ao{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(){const t=this.options.labels||{};let e=ne(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(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=Wi(i.font),n=s.size,o=this._computeTitleHeight(),{boxWidth:r,itemHeight:a}=qr(i,n);let l,h;e.font=s.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,n,r,a)+10):(h=this.maxHeight,l=this._fitCols(o,s,r,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+r;let c=t;n.textAlign="left",n.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+n.measureText(t.text).width;(0===f||l[l.length-1]+p+2*r>o)&&(c+=h,l[l.length-(f>0?0:1)]=0,u+=h,d++),a[f]={left:0,top:u,row:d,width:p,height:s},l[l.length-1]+=p+r})),c}_fitCols(t,e,i,s){const{ctx:n,maxHeight:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=r,d=0,u=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const{itemWidth:g,itemHeight:m}=function(t,e,i,s,n){const o=function(t,e,i,s){let n=t.text;n&&"string"!=typeof n&&(n=n.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+s.measureText(n).width}(s,t,e,i),r=function(t,e,i){let s=t;"string"!=typeof e.text&&(s=Zr(e,i));return s}(n,s,e.lineHeight);return{itemWidth:o,itemHeight:r}}(i,e,n,t,s);o>0&&u+m+2*r>h&&(c+=d+r,l.push({width:d,height:u}),f+=d+r,p++,d=u=0),a[o]={left:f,top:u,col:p,width:g,height:m},d=Math.max(d,g),u+=m+r})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,o=Ds(n,this.left,this.width);if(this.isHorizontal()){let n=0,r=Je(i,this.left+s,this.right-this.lineWidths[n]);for(const a of e)n!==a.row&&(n=a.row,r=Je(i,this.left+s,this.right-this.lineWidths[n])),a.top+=this.top+t+s,a.left=o.leftForLtr(o.x(r),a.width),r+=a.width+s}else{let n=0,r=Je(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const a of e)a.col!==n&&(n=a.col,r=Je(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),a.top=r,a.left+=this.left+s,a.left=o.leftForLtr(o.x(a.left),a.width),r+=a.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Pi(t,this),this._draw(),Ci(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:o}=t,r=_i.color,a=Ds(t.rtl,this.left,this.width),l=Wi(o.font),{padding:h}=o,c=l.size,d=c/2;let u;this.drawTitle(),s.textAlign=a.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=l.string;const{boxWidth:f,boxHeight:p,itemHeight:g}=qr(o,c),m=this.isHorizontal(),b=this._computeTitleHeight();u=m?{x:Je(n,this.left+h,this.right-i[0]),y:this.top+h+b,line:0}:{x:this.left+h,y:Je(n,this.top+b+h,this.bottom-e[0].height),line:0},Os(this.ctx,t.textDirection);const x=g+h;this.legendItems.forEach(((_,y)=>{s.strokeStyle=_.fontColor,s.fillStyle=_.fontColor;const v=s.measureText(_.text).width,w=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),M=f+d+v;let k=u.x,S=u.y;a.setWidth(this.width),m?y>0&&k+M+h>this.right&&(S=u.y+=x,u.line++,k=u.x=Je(n,this.left+h,this.right-i[u.line])):y>0&&S+x>this.bottom&&(k=u.x=k+e[u.line].width+h,u.line++,S=u.y=Je(n,this.top+b+h,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;s.save();const n=ie(i.lineWidth,1);if(s.fillStyle=ie(i.fillStyle,r),s.lineCap=ie(i.lineCap,"butt"),s.lineDashOffset=ie(i.lineDashOffset,0),s.lineJoin=ie(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=ie(i.strokeStyle,r),s.setLineDash(ie(i.lineDash,[])),o.usePointStyle){const r={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=a.xPlus(t,f/2);Si(s,r,l,e+d,o.pointStyleWidth&&f)}else{const o=e+Math.max((c-p)/2,0),r=a.leftForLtr(t,f),l=Ni(i.borderRadius);s.beginPath(),Object.values(l).some((t=>0!==t))?Li(s,{x:r,y:o,w:f,h:p,radius:l}):s.rect(r,o,f,p),s.fill(),0!==n&&s.stroke()}s.restore()}(a.x(k),S,_),k=((t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e)(w,k+f+d,m?k+M:this.right,t.rtl),function(t,e,i){Ri(s,i.text,t,e+g/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(k),S,_),m)u.x+=M+h;else if("string"!=typeof _.text){const t=l.lineHeight;u.y+=Zr(_,t)+h}else u.y+=x})),Es(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Wi(e.font),s=Bi(e.padding);if(!e.display)return;const n=Ds(t.rtl,this.left,this.width),o=this.ctx,r=e.position,a=i.size/2,l=s.top+a;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=Je(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+Je(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=Je(r,c,c+d);o.textAlign=n.textAlign(Ge(r)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,Ri(o,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=Wi(t.font),i=Bi(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(Be(t,this.left,this.right)&&Be(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;i<n.length;++i)if(s=n[i],Be(t,s.left,s.left+s.width)&&Be(e,s.top,s.top+s.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const s=this._hoveredItem,n=((t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index)(s,i);s&&!n&&ne(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!n&&ne(e.onHover,[t,i,this],this)}else i&&ne(e.onClick,[t,i,this],this)}}function Zr(t,e){return e*(t.text?t.text.length:0)}var Gr={id:"legend",_element:Kr,start(t,e,i){const s=t.legend=new Kr({ctx:t.ctx,options:i,chart:t});Wn.configure(t,s,i),Wn.addBox(t,s)},stop(t){Wn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const s=t.legend;Wn.configure(t,s,i),s.options=i},afterUpdate(t){const 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){const s=e.datasetIndex,n=i.chart;n.isDatasetVisible(s)?(n.hide(s),e.hidden=!0):(n.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),h=Bi(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:l.borderColor,pointStyle:s||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:r&&(a||l.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)}}};class Jr extends ao{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=Jt(i.text)?i.text.length:1;this._padding=Bi(i.padding);const n=s*Wi(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:o}=this,r=o.align;let a,l,h,c=0;return this.isHorizontal()?(l=Je(r,i,n),h=e+t,a=n-i):("left"===o.position?(l=i+t,h=Je(r,s,e),c=-.5*_e):(l=n-t,h=Je(r,e,s),c=.5*_e),a=s-e),{titleX:l,titleY:h,maxWidth:a,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Wi(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:o,maxWidth:r,rotation:a}=this._drawArgs(s);Ri(t,e.text,0,0,i,{color:e.color,maxWidth:r,rotation:a,textAlign:Ge(e.align),textBaseline:"middle",translation:[n,o]})}}var Qr={id:"title",_element:Jr,start(t,e,i){!function(t,e){const i=new Jr({ctx:t.ctx,options:e,chart:t});Wn.configure(t,i,e),Wn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Wn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;Wn.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}};const ta=new WeakMap;var ea={id:"subtitle",start(t,e,i){const s=new Jr({ctx:t.ctx,options:i,chart:t});Wn.configure(t,s,i),Wn.addBox(t,s),ta.set(t,s)},stop(t){Wn.removeBox(t,ta.get(t)),ta.delete(t)},beforeUpdate(t,e,i){const s=ta.get(t);Wn.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}};const ia={average(t){if(!t.length)return!1;let e,i,s=new Set,n=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();s.add(t.x),n+=t.y,++o}}if(0===o||0===s.size)return!1;const r=[...s].reduce(((t,e)=>t+e))/s.size;return{x:r,y:n/o}},nearest(t,e){if(!t.length)return!1;let i,s,n,o=e.x,r=e.y,a=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i<s;++i){const s=t[i].element;if(s&&s.hasValue()){const t=$e(e,s.getCenterPoint());t<a&&(a=t,n=s)}}if(n){const t=n.tooltipPosition();o=t.x,r=t.y}return{x:o,y:r}}};function sa(t,e){return e&&(Jt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function na(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function oa(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:t,label:r,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function ra(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:r,boxHeight:a}=e,l=Wi(e.bodyFont),h=Wi(e.titleFont),c=Wi(e.footerFont),d=o.length,u=n.length,f=s.length,p=Bi(e.padding);let g=p.height,m=0,b=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,d&&(g+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}u&&(g+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let x=0;const _=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=h.string,oe(t.title,_),i.font=l.string,oe(t.beforeBody.concat(t.afterBody),_),x=e.displayColors?r+2+e.boxPadding:0,oe(s,(t=>{oe(t.before,_),oe(t.lines,_),oe(t.after,_)})),x=0,i.font=c.string,oe(t.footer,_),i.restore(),m+=p.width,{width:m,height:g}}function aa(t,e,i,s){const{x:n,width:o}=i,{width:r,chartArea:{left:a,right:l}}=t;let h="center";return"center"===s?h=n<=(a+l)/2?"left":"right":n<=o/2?h="left":n>=r-o/2&&(h="right"),function(t,e,i,s){const{x:n,width:o}=s,r=i.caretSize+i.caretPadding;return"left"===t&&n+o+r>e.width||"right"===t&&n-o-r<0||void 0}(h,t,e,i)&&(h="center"),h}function la(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||aa(t,e,i,s),yAlign:s}}function ha(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=t,{xAlign:a,yAlign:l}=i,h=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Ni(r);let p=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,a);const g=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,l,h);return"center"===l?"left"===a?p+=h:"right"===a&&(p-=h):"left"===a?p-=Math.max(c,u)+n:"right"===a&&(p+=Math.max(d,f)+n),{x:Ne(p,0,s.width-e.width),y:Ne(g,0,s.height-e.height)}}function ca(t,e,i){const s=Bi(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function da(t){return sa([],na(t))}function ua(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const fa={beforeTitle:Kt,title(t){if(t.length>0){const 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<s)return i[e.dataIndex]}return""},afterTitle:Kt,beforeBody:Kt,beforeLabel:Kt,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return Gt(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Kt,afterBody:Kt,beforeFooter:Kt,footer:Kt,afterFooter:Kt};function pa(t,e,i,s){const n=t[e].call(i,s);return void 0===n?fa[e].call(i,s):n}class ga extends ao{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new js(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,Ui(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,s=pa(i,"beforeTitle",this,t),n=pa(i,"title",this,t),o=pa(i,"afterTitle",this,t);let r=[];return r=sa(r,na(s)),r=sa(r,na(n)),r=sa(r,na(o)),r}getBeforeBody(t,e){return da(pa(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return oe(t,(t=>{const e={before:[],lines:[],after:[]},n=ua(i,t);sa(e.before,na(pa(n,"beforeLabel",this,t))),sa(e.lines,pa(n,"label",this,t)),sa(e.after,na(pa(n,"afterLabel",this,t))),s.push(e)})),s}getAfterBody(t,e){return da(pa(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=pa(i,"beforeFooter",this,t),n=pa(i,"footer",this,t),o=pa(i,"afterFooter",this,t);let r=[];return r=sa(r,na(s)),r=sa(r,na(n)),r=sa(r,na(o)),r}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],o=[];let r,a,l=[];for(r=0,a=e.length;r<a;++r)l.push(oa(this.chart,e[r]));return t.filter&&(l=l.filter(((e,s,n)=>t.filter(e,s,n,i)))),t.itemSort&&(l=l.sort(((e,s)=>t.itemSort(e,s,i)))),oe(l,(e=>{const i=ua(t.callbacks,e);s.push(pa(i,"labelColor",this,e)),n.push(pa(i,"labelPointStyle",this,e)),o.push(pa(i,"labelTextColor",this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=ia[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=ra(this,i),r=Object.assign({},t,e),a=la(this.chart,i,r),l=ha(i,r,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:l,bottomLeft:h,bottomRight:c}=Ni(r),{x:d,y:u}=t,{width:f,height:p}=e;let g,m,b,x,_,y;return"center"===n?(_=u+p/2,"left"===s?(g=d,m=g-o,x=_+o,y=_-o):(g=d+f,m=g+o,x=_-o,y=_+o),b=g):(m="left"===s?d+Math.max(a,h)+o:"right"===s?d+f-Math.max(l,c)-o:this.caretX,"top"===n?(x=u,_=x-o,g=m-o,b=m+o):(x=u+p,_=x+o,g=m+o,b=m-o),y=x),{x1:g,x2:m,x3:b,y1:x,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let o,r,a;if(n){const l=Ds(i.rtl,this.x,this.width);for(t.x=ca(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=Wi(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a<n;++a)e.fillText(s[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r,a+1===n&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,s,n){const o=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:a,boxWidth:l}=n,h=Wi(n.bodyFont),c=ca(this,"left",n),d=s.x(c),u=a<h.lineHeight?(h.lineHeight-a)/2:0,f=e.y+u;if(n.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=s.leftForLtr(d,l)+l/2,h=f+a/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,ki(t,e,i,h),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,ki(t,e,i,h)}else{t.lineWidth=Qt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=s.leftForLtr(d,l),i=s.leftForLtr(s.xPlus(d,1),l-2),r=Ni(o.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,Li(t,{x:e,y:f,w:l,h:a,radius:r}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Li(t,{x:i,y:f+1,w:l-2,h:a-2,radius:r}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:h}=i,c=Wi(i.bodyFont);let d=c.lineHeight,u=0;const f=Ds(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+n},g=f.textAlign(o);let m,b,x,_,y,v,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=ca(this,g,i),e.fillStyle=i.bodyColor,oe(this.beforeBody,p),u=r&&"right"!==g?"center"===o?l/2+h:l+2+h:0,_=0,v=s.length;_<v;++_){for(m=s[_],b=this.labelTextColors[_],e.fillStyle=b,oe(m.before,p),x=m.lines,r&&x.length&&(this._drawColorBox(e,t,_,f,i),d=Math.max(c.lineHeight,a)),y=0,w=x.length;y<w;++y)p(x[y]),d=c.lineHeight;oe(m.after,p)}u=0,d=c.lineHeight,oe(this.afterBody,p),t.y-=n}drawFooter(t,e,i){const s=this.footer,n=s.length;let o,r;if(n){const a=Ds(i.rtl,this.x,this.width);for(t.x=ca(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",o=Wi(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,r=0;r<n;++r)e.fillText(s[r],a.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:n,yAlign:o}=this,{x:r,y:a}=t,{width:l,height:h}=i,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Ni(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(r+c,a),"top"===o&&this.drawCaret(t,e,i,s),e.lineTo(r+l-d,a),e.quadraticCurveTo(r+l,a,r+l,a+d),"center"===o&&"right"===n&&this.drawCaret(t,e,i,s),e.lineTo(r+l,a+h-f),e.quadraticCurveTo(r+l,a+h,r+l-f,a+h),"bottom"===o&&this.drawCaret(t,e,i,s),e.lineTo(r+u,a+h),e.quadraticCurveTo(r,a+h,r,a+h-u),"center"===o&&"left"===n&&this.drawCaret(t,e,i,s),e.lineTo(r,a+c),e.quadraticCurveTo(r,a,r+c,a),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=ia[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=ra(this,t),r=Object.assign({},i,this._size),a=la(e,t,r),l=ha(t,r,a,e);s._to===l.x&&n._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Bi(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),Os(t,e.textDirection),n.y+=o.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),Es(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((t=>{let{datasetIndex:e,index:i}=t;const s=this.chart.getDatasetMeta(e);if(!s)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:s.data[i],index:i}})),n=!re(i,s),o=this._positionChanged(s,e);(n||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],o=this._getActiveElements(t,n,e,i),r=this._positionChanged(o,t),a=e||!re(o,n)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=ia[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}gt(ga,"positioners",ia);var ma={id:"tooltip",_element:ga,positioners:ia,afterInit(t,e,i){i&&(t.tooltip=new ga({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){const e=t.tooltip;if(e&&e._willRender()){const 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){const 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:fa},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"]},ba=Object.freeze({__proto__:null,Colors:Pr,Decimation:Or,Filler:Xr,Legend:Gr,SubTitle:ea,Title:Qr,Tooltip:ma});function xa(t,e,i,s){const n=t.indexOf(e);if(-1===n)return((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}function _a(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class ya extends xo{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Gt(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Ne(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:xa(i,t,ie(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){return _a.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function va(t,e){const i=[],{bounds:s,step:n,min:o,max:r,precision:a,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=t,u=n||1,f=h-1,{min:p,max:g}=e,m=!Gt(o),b=!Gt(r),x=!Gt(l),_=(g-p)/(c+1);let y,v,w,M,k=Oe((g-p)/f/u)*u;if(k<1e-14&&!m&&!b)return[{value:p},{value:g}];M=Math.ceil(g/k)-Math.floor(p/k),M>f&&(k=Oe(M*k/f/u)*u),Gt(a)||(y=Math.pow(10,a),k=Math.ceil(k*y)/y),"ticks"===s?(v=Math.floor(p/k)*k,w=Math.ceil(g/k)*k):(v=p,w=g),m&&b&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-o)/n,k/1e3)?(M=Math.round(Math.min((r-o)/k,h)),k=(r-o)/M,v=o,w=r):x?(v=m?o:v,w=b?r:w,M=l-1,k=(w-v)/M):(M=(w-v)/k,M=De(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(Ie(k),Ie(v));y=Math.pow(10,Gt(a)?S:a),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let A=0;for(m&&(d&&v!==o?(i.push({value:o}),v<o&&A++,De(Math.round((v+A*k)*y)/y,o,wa(o,_,t))&&A++):v<o&&A++);A<M;++A){const t=Math.round((v+A*k)*y)/y;if(b&&t>r)break;i.push({value:t})}return b&&d&&w!==r?i.length&&De(i[i.length-1].value,r,wa(r,_,t))?i[i.length-1].value=r:i.push({value:r}):b&&w!==r||i.push({value:w}),i}function wa(t,e,i){let{horizontal:s,minRotation:n}=i;const o=Re(n),r=(s?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/r,a)}gt(ya,"id","category"),gt(ya,"defaults",{ticks:{callback:_a}});class Ma extends xo{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Gt(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this;const o=t=>s=e?s:t,r=t=>n=i?n:t;if(t){const t=Ce(s),e=Ce(n);t<0&&e<0?r(0):t>0&&e>0&&o(0)}if(s===n){let e=0===n?1:Math.abs(.05*n);r(n+e),t||o(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=va({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},this._range||this);return"ticks"===t.bounds&&Te(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale,this.options.ticks.format)}}class ka extends Ma{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=te(t)?t:0,this.max=te(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Re(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}gt(ka,"id","linear"),gt(ka,"defaults",{ticks:{callback:fi.formatters.numeric}});const Sa=t=>Math.floor(Pe(t)),Aa=(t,e)=>Math.pow(10,Sa(t)+e);function Pa(t){return 1===t/Math.pow(10,Sa(t))}function Ca(t,e,i){const s=Math.pow(10,i),n=Math.floor(t/s);return Math.ceil(e/s)-n}function Da(t,e){let{min:i,max:s}=e;i=ee(t.min,i);const n=[],o=Sa(i);let r=function(t,e){let i=Sa(e-t);for(;Ca(t,e,i)>10;)i++;for(;Ca(t,e,i)<10;)i--;return Math.min(i,Sa(t))}(i,s),a=r<0?Math.pow(10,Math.abs(r)):1;const l=Math.pow(10,r),h=o>r?Math.pow(10,o):0,c=Math.round((i-h)*a)/a,d=Math.floor((i-h)/l/10)*l*10;let u=Math.floor((c-d)/Math.pow(10,r)),f=ee(t.min,Math.round((h+d+u*Math.pow(10,r))*a)/a);for(;f<s;)n.push({value:f,major:Pa(f),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(r++,u=2,a=r>=0?1:a),f=Math.round((h+d+u*Math.pow(10,r))*a)/a;const p=ee(t.max,f);return n.push({value:p,major:Pa(p),significand:u}),n}class Oa extends xo{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Ma.prototype.parse.apply(this,[t,e]);if(0!==i)return te(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=te(t)?Math.max(0,t):null,this.max=te(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!te(this._userMin)&&(this.min=t===Aa(this.min,0)?Aa(this.min,-1):Aa(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,o=t=>s=e?s:t;i===s&&(i<=0?(n(1),o(10)):(n(Aa(i,-1)),o(Aa(s,1)))),i<=0&&n(Aa(s,-1)),s<=0&&o(Aa(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=Da({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&Te(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":di(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Pe(t),this._valueRange=Pe(this.max)-Pe(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Pe(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Ea(t){const e=t.ticks;if(e.display&&t.display){const t=Bi(e.backdropPadding);return ie(e.font&&e.font.size,_i.font.size)+t.height}return 0}function Ta(t,e,i,s,n){return t===s||t===n?{start:e-i/2,end:e+i/2}:t<s||t>n?{start:e-i,end:e}:{start:e,end:e+i}}function Ra(t){const 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),s=[],n=[],o=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?_e/o:0;for(let d=0;d<o;d++){const o=r.setContext(t.getPointLabelContext(d));n[d]=o.padding;const u=t.getPointPosition(d,t.drawingArea+n[d],a),f=Wi(o.font),p=(l=t.ctx,h=f,c=Jt(c=t._pointLabels[d])?c:[c],{w:vi(l,h.string,c),h:c.length*h.lineHeight});s[d]=p;const g=Ve(t.getIndexAngle(d)+a),m=Math.round(Le(g));La(i,e,g,Ta(m,u.x,p.w,0,180),Ta(m,u.y,p.h,90,270))}var l,h,c;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const s=[],n=t._pointLabels.length,o=t.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:Ea(o)/2,additionalAngle:r?_e/n:0};let h;for(let o=0;o<n;o++){l.padding=i[o],l.size=e[o];const n=Ia(t,o,l);s.push(n),"auto"===a&&(n.visible=za(n,h),n.visible&&(h=n))}return s}(t,s,n)}function La(t,e,i,s,n){const o=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let a=0,l=0;s.start<e.l?(a=(e.l-s.start)/o,t.l=Math.min(t.l,e.l-a)):s.end>e.r&&(a=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),n.start<e.t?(l=(e.t-n.start)/r,t.t=Math.min(t.t,e.t-l)):n.end>e.b&&(l=(n.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function Ia(t,e,i){const s=t.drawingArea,{extra:n,additionalAngle:o,padding:r,size:a}=i,l=t.getPointPosition(e,s+n+r,o),h=Math.round(Le(Ve(l.angle+ke))),c=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,a.h,h),d=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(h),u=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,a.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:u,top:c,right:u+a.w,bottom:c+a.h}}function za(t,e){if(!e)return!0;const{left:i,top:s,right:n,bottom:o}=t;return!(Ai({x:i,y:s},e)||Ai({x:i,y:o},e)||Ai({x:n,y:s},e)||Ai({x:n,y:o},e))}function $a(t,e,i){const{left:s,top:n,right:o,bottom:r}=i,{backdropColor:a}=e;if(!Gt(a)){const i=Ni(e.borderRadius),l=Bi(e.backdropPadding);t.fillStyle=a;const h=s-l.left,c=n-l.top,d=o-s+l.width,u=r-n+l.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),Li(t,{x:h,y:c,w:d,h:u,radius:i}),t.fill()):t.fillRect(h,c,d,u)}}function Fa(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,ye);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let o=1;o<s;o++)i=t.getPointPosition(o,e),n.lineTo(i.x,i.y)}}gt(Oa,"id","logarithmic"),gt(Oa,"defaults",{ticks:{callback:fi.formatters.logarithmic,major:{enabled:!0}}});class Va extends Ma{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Bi(Ea(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(){const{min:t,max:e}=this.getMinMax(!1);this.min=te(t)&&!isNaN(t)?t:0,this.max=te(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ea(this.options))}generateTickLabels(t){Ma.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=ne(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Ra(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){return Ve(t*(ye/(this._pointLabels.length||1))+Re(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(Gt(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Gt(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return Ui(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.getIndexAngle(t)-ke+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:s,bottom:n}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:n}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Fa(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:s,border:n}=e,o=this._pointLabels.length;let r,a,l;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:s}}=t;for(let n=e-1;n>=0;n--){const e=t._pointLabelItems[n];if(!e.visible)continue;const o=s.setContext(t.getPointLabelContext(n));$a(i,o,e);const r=Wi(o.font),{x:a,y:l,textAlign:h}=e;Ri(i,t._pointLabels[n],a,l+r.lineHeight/2,r,{color:o.color,textAlign:h,textBaseline:"middle"})}}(this,o),s.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){a=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),r=s.setContext(i),l=n.setContext(i);!function(t,e,i,s,n){const o=t.ctx,r=e.circular,{color:a,lineWidth:l}=e;!r&&!s||!a||!l||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(n.dash||[]),o.lineDashOffset=n.dashOffset,o.beginPath(),Fa(t,i,r,s),o.closePath(),o.stroke(),o.restore())}(this,r,a,o,l)}})),i.display){for(t.save(),r=o-1;r>=0;r--){const s=i.setContext(this.getPointLabelContext(r)),{color:n,lineWidth:o}=s;o&&n&&(t.lineWidth=o,t.strokeStyle=n,t.setLineDash(s.borderDash),t.lineDashOffset=s.borderDashOffset,a=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(r,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let n,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,r)=>{if(0===r&&this.min>=0&&!e.reverse)return;const a=i.setContext(this.getContext(r)),l=Wi(a.font);if(n=this.getDistanceFromCenterForValue(this.ticks[r].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(s.label).width,t.fillStyle=a.backdropColor;const e=Bi(a.backdropPadding);t.fillRect(-o/2-e.left,-n-l.size/2-e.top,o+e.width,l.size+e.height)}Ri(t,s.label,0,-n,l,{color:a.color,strokeColor:a.textStrokeColor,strokeWidth:a.textStrokeWidth})})),t.restore()}drawTitle(){}}gt(Va,"id","radialLinear"),gt(Va,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:fi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}}),gt(Va,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),gt(Va,"descriptors",{angleLines:{_fallback:"grid"}});const Ha={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}},Na=Object.keys(Ha);function Ba(t,e){return t-e}function Wa(t,e){if(Gt(e))return null;const i=t._adapter,{parser:s,round:n,isoWeekday:o}=t._parseOpts;let r=e;return"function"==typeof s&&(r=s(r)),te(r)||(r="string"==typeof s?i.parse(r,s):i.parse(r)),null===r?null:(n&&(r="week"!==n||!Ee(o)&&!0!==o?i.startOf(r,n):i.startOf(r,"isoWeek",o)),+r)}function ja(t,e,i,s){const n=Na.length;for(let o=Na.indexOf(t);o<n-1;++o){const t=Ha[Na[o]],n=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(n*t.size))<=s)return Na[o]}return Na[n-1]}function Ua(t,e,i){if(i){if(i.length){const{lo:s,hi:n}=We(i,e);t[i[s]>=e?i[s]:i[n]]=!0}}else t[e]=!0}function Ya(t,e,i){const s=[],n={},o=e.length;let r,a;for(r=0;r<o;++r)a=e[r],n[a]=r,s.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,s){const n=t._adapter,o=+n.startOf(e[0].value,s),r=e[e.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=i[a],l>=0&&(e[l].major=!0);return e}(t,s,n,i):s}class Xa extends xo{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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=t.time||(t.time={}),s=this._adapter=new Mn(t.adapters.date);s.init(e),de(i.displayFormats,s.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:Wa(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:n,minDefined:o,maxDefined:r}=this.getUserBounds();function a(t){o||isNaN(t.min)||(s=Math.min(s,t.min)),r||isNaN(t.max)||(n=Math.max(n,t.max))}o&&r||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),s=te(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),n=te(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,n-1),this.max=Math.max(s+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const n=this.min,o=function(t,e,i){let s=0,n=t.length;for(;s<n&&t[s]<e;)s++;for(;n>s&&t[n-1]>i;)n--;return s>0||n<t.length?t.slice(s,n):t}(s,n,this.max);return this._unit=e.unit||(i.autoSkip?ja(e.minUnit,this.min,this.max,this._getLabelCapacity(n)):function(t,e,i,s,n){for(let o=Na.length-1;o>=Na.indexOf(i);o--){const i=Na[o];if(Ha[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return Na[i?Na.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=Na.indexOf(t)+1,i=Na.length;e<i;++e)if(Ha[Na[e]].common)return Na[e]}(this._unit):void 0,this.initOffsets(s),t.reverse&&o.reverse(),Ya(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(){let t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=0,n=0;this.options.offset&&i.length&&(t=this.getDecimalForValue(i[0]),s=1===i.length?1-t:(this.getDecimalForValue(i[1])-t)/2,e=this.getDecimalForValue(i[i.length-1]),n=1===i.length?e:(e-this.getDecimalForValue(i[i.length-2]))/2);const o=i.length<3?.5:.25;s=Ne(s,0,o),n=Ne(n,0,o),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,n=s.time,o=n.unit||ja(n.minUnit,e,i,this._getLabelCapacity(e)),r=ie(s.ticks.stepSize,1),a="week"===o&&n.isoWeekday,l=Ee(a)||!0===a,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",a)),u=+t.startOf(u,l?"day":o),t.diff(i,e,o)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+o);const f="data"===s.ticks.source&&this.getDataTimestamps();for(c=u,d=0;c<i;c=+t.add(c,r,o),d++)Ua(h,c,f);return c!==i&&"ticks"!==s.bounds&&1!==d||Ua(h,c,f),Object.keys(h).sort(Ba).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,s=this._unit,n=e||i[s];return this._adapter.format(t,n)}_tickFormatFunction(t,e,i,s){const n=this.options,o=n.ticks.callback;if(o)return ne(o,[t,e,i],this);const r=n.time.displayFormats,a=this._unit,l=this._majorUnit,h=a&&r[a],c=l&&r[l],d=i[e],u=l&&c&&d&&d.major;return this._adapter.format(t,s||(u?c:h))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=Re(this.isHorizontal()?e.maxRotation:e.minRotation),n=Math.cos(s),o=Math.sin(s),r=this._resolveTickFontOptions(0).size;return{w:i*n+r*o,h:i*o+r*n}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,n=this._tickFormatFunction(t,0,Ya(this,[t],this._majorUnit),s),o=this._getLabelSize(n),r=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return r>0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t<e;++t)i=i.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(Wa(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return qe(t.sort(Ba))}}function qa(t,e,i){let s,n,o,r,a=0,l=t.length-1;i?(e>=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=je(t,"pos",e)),({pos:s,time:o}=t[a]),({pos:n,time:r}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=je(t,"time",e)),({time:s,pos:o}=t[a]),({time:n,pos:r}=t[l]));const h=n-s;return h?o+(r-o)*(e-s)/h:o}gt(Xa,"id","time"),gt(Xa,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});class Ka extends Xa{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=qa(e,this.min),this._tableRange=qa(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let o,r,a,l,h;for(o=0,r=t.length;o<r;++o)l=t[o],l>=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o<r;++o)h=s[o+1],a=s[o-1],l=s[o],Math.round((h+a)/2)!==l&&n.push({time:l,pos:o/(r-1)});return n}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(qa(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return qa(this._table,i*this._tableRange+this._minPos,!0)}}gt(Ka,"id","timeseries"),gt(Ka,"defaults",Xa.defaults);const Za=[yn,yr,ba,Object.freeze({__proto__:null,CategoryScale:ya,LinearScale:ka,LogarithmicScale:Oa,RadialLinearScale:Va,TimeScale:Xa,TimeSeriesScale:Ka})];Ko.register(...Za);var Ga=Ko;let Ja=class extends rt{constructor(){super(),this.stockData=[],this.chart=null,this.customLinePlugin={id:"customLinePlugin",afterDraw:function(t){if(t.tooltip&&t.tooltip._active&&t.tooltip._active.length){const e=t.ctx,i=t.tooltip._active[0].element.x,s=t.scales.yPrice.top,n=t.scales.yPrice.bottom;e.save(),e.beginPath(),e.moveTo(i,s),e.lineTo(i,n),e.lineWidth=1,e.strokeStyle="rgba(0, 0, 0, 0.5)",e.stroke(),e.restore()}}},this.stockData=[]}firstUpdated(){this._createChart()}willUpdate(t){return i(this,void 0,void 0,(function*(){t.has("stockData")&&(this.chart?this._updateChart():this._createChart())}))}_getChartData(){return{dates:this.stockData.map((t=>t.date)),closePrices:this.stockData.map((t=>t.close)),ma5:this.stockData.map((t=>{var e;return null!==(e=t.MA5)&&void 0!==e?e:null})),ma10:this.stockData.map((t=>{var e;return null!==(e=t.MA10)&&void 0!==e?e:null})),ma20:this.stockData.map((t=>{var e;return null!==(e=t.MA20)&&void 0!==e?e:null})),ma50:this.stockData.map((t=>{var e;return null!==(e=t.MA50)&&void 0!==e?e:null})),ma100:this.stockData.map((t=>{var e;return null!==(e=t.MA100)&&void 0!==e?e:null})),ma200:this.stockData.map((t=>{var e;return null!==(e=t.MA200)&&void 0!==e?e:null})),RSI:this.stockData.map((t=>{var e;return null!==(e=t.RSI)&&void 0!==e?e:null})),MACDLine:this.stockData.map((t=>{var e;return null!==(e=t.MACDLine)&&void 0!==e?e:null})),SignalLine:this.stockData.map((t=>{var e;return null!==(e=t.SignalLine)&&void 0!==e?e:null})),MACDHistogram:this.stockData.map((t=>{var e;return null!==(e=t.MACDHistogram)&&void 0!==e?e:null})),volumes:this.stockData.map((t=>{var e;return null!==(e=t.volume)&&void 0!==e?e:0}))}}_updateChart(){if(this.chart){const{dates:t,closePrices:e,ma5:i,ma10:s,ma20:n,ma50:o,ma100:r,ma200:a,RSI:l,MACDLine:h,SignalLine:c,MACDHistogram:d,volumes:u}=this._getChartData();this.chart.data.labels=t,this.chart.data.datasets[0].data=l,this.chart.data.datasets[1].data=d,this.chart.data.datasets[2].data=c,this.chart.data.datasets[3].data=h,this.chart.data.datasets[4].data=e,this.chart.data.datasets[5].data=n,this.chart.data.datasets[6].data=o,this.chart.data.datasets[7].data=r,this.chart.data.datasets[8].data=a,this.chart.data.datasets[9].data=u,this.chart.data.datasets[10].data=s,this.chart.data.datasets[11].data=i,this.chart.update()}}_createChart(){var t;const{dates:e,closePrices:i,ma5:s,ma10:n,ma20:o,ma50:r,ma100:a,ma200:l,RSI:h,MACDLine:c,SignalLine:d,MACDHistogram:u,volumes:f}=this._getChartData(),p=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("stockChart");if(!p)return;const g=p.getContext("2d");g&&(this.chart&&this.chart.destroy(),Ga.register(this.customLinePlugin),this.chart=new Ga(g,{type:"line",data:{labels:e,datasets:[{label:"RSI",data:h,borderColor:"rgba(15, 92, 92, 1)",backgroundColor:"rgba(15, 92, 92, 0.2)",fill:!1,borderWidth:2,yAxisID:"yRSI",pointRadius:1,pointHoverRadius:3,hidden:!0},{label:"MACDHistogram",data:u,borderColor:"rgba(175, 92, 92, 1)",backgroundColor:"rgba(175, 92, 92, 0.2)",fill:!1,borderWidth:2,yAxisID:"yMACD",hidden:!0,pointRadius:1,pointHoverRadius:3},{label:"SignalLine",data:d,borderColor:"rgba(75, 92, 192, 1)",backgroundColor:"rgba(75, 92, 192, 0.2)",fill:!1,borderWidth:1,yAxisID:"yMACD",hidden:!0,pointRadius:1,pointHoverRadius:3},{label:"MACDLine",data:c,borderColor:"rgba(175, 192, 192, 1)",backgroundColor:"rgba(175, 192, 192, 0.2)",fill:!1,borderWidth:1,yAxisID:"yMACD",hidden:!0,pointRadius:1,pointHoverRadius:3},{label:"Close Price",data:i,borderColor:"rgba(75, 192, 192, 1)",backgroundColor:"rgba(75, 192, 192, 0.2)",fill:!0,borderWidth:1,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"MA20",data:o,borderColor:"rgba(255, 99, 132, 1)",backgroundColor:"rgba(255, 99, 132, 0.2)",fill:!1,borderWidth:2,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"MA50",data:r,borderColor:"rgba(255, 206, 86, 1)",backgroundColor:"rgba(255, 206, 86, 0.2)",fill:!1,borderWidth:2,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"MA100",data:a,borderColor:"rgba(153, 102, 25, 1)",backgroundColor:"rgba(153, 102, 25, 0.2)",fill:!1,borderWidth:2,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"MA200",data:l,borderColor:"rgba(153, 102, 255, 1)",backgroundColor:"rgba(153, 102, 255, 0.2)",fill:!1,borderWidth:2,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"Volume",data:f,yAxisID:"yVolume",fill:!0,backgroundColor:"rgba(252, 3, 57, 0.5)",borderWidth:1,pointRadius:1,pointHoverRadius:3},{label:"MA10",data:n,borderColor:"rgba(153, 12, 25, 1)",backgroundColor:"rgba(153, 12, 25, 0.2)",fill:!1,borderWidth:1,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3},{label:"MA5",data:s,borderColor:"rgba(13, 12, 25, 1)",backgroundColor:"rgba(13, 12, 25, 0.2)",fill:!1,borderWidth:1,yAxisID:"yPrice",pointRadius:1,pointHoverRadius:3}]},options:{responsive:!0,scales:{yPrice:{type:"linear",position:"left",beginAtZero:!1,title:{display:!0,text:"Price"}},yRSI:{type:"linear",position:"right",beginAtZero:!0,title:{display:!0,text:"RSI"},grid:{drawOnChartArea:!1}},yMACD:{type:"linear",position:"right",beginAtZero:!0,title:{display:!0,text:"MACD"},grid:{drawOnChartArea:!1}},yVolume:{type:"linear",position:"left",beginAtZero:!0,title:{display:!0,text:"Volume"},grid:{drawOnChartArea:!1}}},interaction:{mode:"index",intersect:!1},plugins:{tooltip:{mode:"index",axis:"x"}}}}))}render(){return W`<canvas id="stockChart"></canvas>`}};t([dt({type:Array}),e("design:type",Array)],Ja.prototype,"stockData",void 0),Ja=t([lt("stock-chart-display"),e("design:paramtypes",[])],Ja);