hisonvue 1.0.2 → 1.0.4

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.
Files changed (59) hide show
  1. package/dist/{HAccordion-DXNoziwY.mjs → HAccordion-CrCXK2YM.mjs} +2 -2
  2. package/dist/{HAccordion-FatqOgy2.js → HAccordion-DleNf4M-.js} +1 -1
  3. package/dist/{HBaggie-DWSes7QC.js → HBaggie-CtDuqAan.js} +1 -1
  4. package/dist/{HBaggie-C4qcuGl9.mjs → HBaggie-DR86wX0x.mjs} +2 -2
  5. package/dist/{HBanner-D2IVlykU.js → HBanner-BDv5sYCa.js} +1 -1
  6. package/dist/{HBanner-DNOhDRli.mjs → HBanner-D4j3o022.mjs} +2 -2
  7. package/dist/{HButton-Dhyb_Apz.mjs → HButton-BeKvR0cC.mjs} +2 -2
  8. package/dist/{HButton-D3aVYVY3.js → HButton-CkHZhjwN.js} +1 -1
  9. package/dist/{HCalendar-BB0XyvZV.js → HCalendar-BbVDcV_g.js} +1 -1
  10. package/dist/{HCalendar-Bv1mZ6DG.mjs → HCalendar-vI0VJJUJ.mjs} +1 -1
  11. package/dist/{HCaption-BKJlg7ZH.mjs → HCaption-Cf3dj2IG.mjs} +1 -1
  12. package/dist/{HCaption-2Wpf8L9R.js → HCaption-DbjKugnx.js} +1 -1
  13. package/dist/{HChart-H5M0gQB0.mjs → HChart-BITDUWsH.mjs} +1 -1
  14. package/dist/{HChart-BEe_bo5V.js → HChart-CTa5zLah.js} +1 -1
  15. package/dist/{HDrawer-CWkLJyMS.js → HDrawer-BdhP3EDS.js} +1 -1
  16. package/dist/{HDrawer-BYrUd-eA.mjs → HDrawer-vEgPHlwE.mjs} +1 -1
  17. package/dist/{HDropdown-DTaeDC5I.js → HDropdown-BfZUh6z-.js} +1 -1
  18. package/dist/{HDropdown-Dpba4jMR.mjs → HDropdown-BojM0eHC.mjs} +2 -2
  19. package/dist/{HFileset-Qo0JIgMJ.mjs → HFileset-BG5l_qx4.mjs} +1 -1
  20. package/dist/{HFileset-CWDMfYdY.js → HFileset-Cb7WvJLf.js} +1 -1
  21. package/dist/{HGap-B5lrnzJ6.mjs → HGap-CNKNrbB5.mjs} +1 -1
  22. package/dist/{HGap-Bcl_WYxa.js → HGap-CZfD94Bb.js} +1 -1
  23. package/dist/{HGrid-59dIVp9V.mjs → HGrid-BudEkfCU.mjs} +8 -8
  24. package/dist/HGrid-CbxqCD5t.js +1 -0
  25. package/dist/{HImagebox-G-LvB26S.mjs → HImagebox--UAgOadx.mjs} +1 -1
  26. package/dist/{HImagebox-DIYXXh95.js → HImagebox-BPvmvGWb.js} +1 -1
  27. package/dist/{HInput-C9rOBXqc.mjs → HInput-C5otOYZ7.mjs} +1 -1
  28. package/dist/{HInput-PgalO88P.js → HInput-CpbGKZg2.js} +1 -1
  29. package/dist/{HInputGroup-XryXR-6k.js → HInputGroup-BRYFCJDS.js} +1 -1
  30. package/dist/{HInputGroup-BaK14hkQ.mjs → HInputGroup-CV595p3t.mjs} +1 -1
  31. package/dist/{HLabel-jbc0_u5J.mjs → HLabel-DSOf8CAF.mjs} +2 -2
  32. package/dist/{HLabel-CbQeG2R3.js → HLabel-buiY-oWY.js} +1 -1
  33. package/dist/{HLayout-DmTQQmLs.mjs → HLayout-0PWr0ybN.mjs} +1 -1
  34. package/dist/{HLayout-CUwfApcb.js → HLayout-Bu0hB8wf.js} +1 -1
  35. package/dist/{HList-DCupvbju.js → HList-BIKaUFs1.js} +1 -1
  36. package/dist/{HList-rD5kL7cI.mjs → HList-CAYpxvpT.mjs} +2 -2
  37. package/dist/{HModal-eniLW2gp.js → HModal-DDL-MrHu.js} +1 -1
  38. package/dist/{HModal-XDNcukop.mjs → HModal-FqJbINTG.mjs} +1 -1
  39. package/dist/{HNote-BA3umb5e.mjs → HNote-CQVkY196.mjs} +1 -1
  40. package/dist/{HNote-DzeszCEe.js → HNote-Dwbr1_V2.js} +1 -1
  41. package/dist/{HPagination-BS4l4xGP.js → HPagination-DFnrZYhq.js} +1 -1
  42. package/dist/{HPagination-CgufEtL4.mjs → HPagination-DwYSg0IX.mjs} +2 -2
  43. package/dist/{HParagraph-DPFx64UD.js → HParagraph-BFQ0qCCP.js} +1 -1
  44. package/dist/{HParagraph-hCHZmj-4.mjs → HParagraph-DCTkBsye.mjs} +1 -1
  45. package/dist/{HPopup-BfPYzBy6.mjs → HPopup-DNzBPmHh.mjs} +1 -1
  46. package/dist/{HPopup-NBwn8RA4.js → HPopup-hBOpdf7v.js} +1 -1
  47. package/dist/{HSpinner-1UQgVEve.mjs → HSpinner-DN8JhipU.mjs} +1 -1
  48. package/dist/{HSpinner-CMsmFVOv.js → HSpinner-Zl3b9VKW.js} +1 -1
  49. package/dist/{HTable-Dweedemn.js → HTable-8jwoguW_.js} +1 -1
  50. package/dist/{HTable-BUIKSXIR.mjs → HTable-Ci4lTwPm.mjs} +1 -1
  51. package/dist/hisonvue.cjs.js +1 -1
  52. package/dist/hisonvue.css +1 -1
  53. package/dist/hisonvue.es.js +2 -2
  54. package/dist/{index-p1EBArRP.mjs → index-0mmn7cpg.mjs} +2 -2
  55. package/dist/{index-CKU70ocu.js → index-DON-Hfjr.js} +2 -2
  56. package/dist/{setButtonCssEvent-CB-7jMmJ.mjs → setButtonCssEvent-BNLo78yX.mjs} +1 -1
  57. package/dist/{setButtonCssEvent-BoBQS2-T.js → setButtonCssEvent-Dl2nV55A.js} +1 -1
  58. package/package.json +1 -1
  59. package/dist/HGrid-f8xHSk9C.js +0 -1
@@ -74,7 +74,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
74
74
  * Released under the MIT License
75
75
  */class zh{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,r){const i=n.listeners[r],a=n.duration;i.forEach(c=>c({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(o-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=kc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,r)=>{if(!o.running||!o.items.length)return;const i=o.items;let a=i.length-1,c=!1,m;for(;a>=0;--a)m=i[a],m._active?(m._total>o.duration&&(o.duration=m._total),m.tick(e),c=!0):(i[a]=i[i.length-1],i.pop());c&&(r.draw(),this._notify(r,o,e,"progress")),i.length||(o.running=!1,this._notify(r,o,e,"complete"),o.initial=!1),n+=i.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,r)=>Math.max(o,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let r=o.length-1;for(;r>=0;--r)o[r].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var An=new zh;const Yl="transparent",Uh={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=Vl(t||Yl),r=o.valid&&Vl(e||Yl);return r&&r.valid?r.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Gh{constructor(e,n,o,r){const i=n[o];r=ei([e.to,r,i,e.from]);const a=ei([e.from,i,r]);this._active=!0,this._fn=e.fn||Uh[e.type||typeof a],this._easing=tr[e.easing]||tr.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const r=this._target[this._prop],i=o-this._start,a=this._duration-i;this._start=o,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=ei([e.to,n,r,e.from]),this._from=ei([e.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,r=this._prop,i=this._from,a=this._loop,c=this._to;let m;if(this._active=i!==c&&(a||n<o),!this._active){this._target[r]=c,this._notify(!0);return}if(n<0){this._target[r]=i;return}m=n/o%2,m=a&&m>1?2-m:m,m=this._easing(Math.min(1,Math.max(0,m))),this._target[r]=this._fn(i,c,m)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let r=0;r<o.length;r++)o[r][n]()}}class Gc{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!yt(e))return;const n=Object.keys(Vt.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{const i=e[r];if(!yt(i))return;const a={};for(const c of n)a[c]=i[c];(Ot(i.properties)&&i.properties||[r]).forEach(c=>{(c===r||!o.has(c))&&o.set(c,a)})})}_animateOptions(e,n){const o=n.options,r=Wh(e,o);if(!r)return[];const i=this._createAnimations(r,o);return o.$shared&&jh(e.options.$animations,o).then(()=>{e.options=o},()=>{}),i}_createAnimations(e,n){const o=this._properties,r=[],i=e.$animations||(e.$animations={}),a=Object.keys(n),c=Date.now();let m;for(m=a.length-1;m>=0;--m){const C=a[m];if(C.charAt(0)==="$")continue;if(C==="options"){r.push(...this._animateOptions(e,n));continue}const L=n[C];let D=i[C];const W=o.get(C);if(D)if(W&&D.active()){D.update(W,L,c);continue}else D.cancel();if(!W||!W.duration){e[C]=L;continue}i[C]=D=new Gh(W,e,C,L),r.push(D)}return r}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return An.add(this._chart,o),!0}}function jh(t,e){const n=[],o=Object.keys(e);for(let r=0;r<o.length;r++){const i=t[o[r]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function Wh(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Kl(t,e){const n=t&&t.options||{},o=n.reverse,r=n.min===void 0?e:0,i=n.max===void 0?e:0;return{start:o?i:r,end:o?r:i}}function qh(t,e,n){if(n===!1)return!1;const o=Kl(t,n),r=Kl(e,n);return{top:r.end,right:o.end,bottom:r.start,left:o.start}}function $h(t){let e,n,o,r;return yt(t)?(e=t.top,n=t.right,o=t.bottom,r=t.left):e=n=o=r=t,{top:e,right:n,bottom:o,left:r,disabled:t===!1}}function jc(t,e){const n=[],o=t._getSortedDatasetMetas(e);let r,i;for(r=0,i=o.length;r<i;++r)n.push(o[r].index);return n}function Xl(t,e,n,o={}){const r=t.keys,i=o.mode==="single";let a,c,m,C;if(e===null)return;let L=!1;for(a=0,c=r.length;a<c;++a){if(m=+r[a],m===n){if(L=!0,o.all)continue;break}C=t.values[m],qt(C)&&(i||e===0||Mn(e)===Mn(C))&&(e+=C)}return!L&&!o.all?0:e}function Yh(t,e){const{iScale:n,vScale:o}=e,r=n.axis==="x"?"x":"y",i=o.axis==="x"?"x":"y",a=Object.keys(t),c=new Array(a.length);let m,C,L;for(m=0,C=a.length;m<C;++m)L=a[m],c[m]={[r]:L,[i]:t[L]};return c}function aa(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Kh(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Xh(t){const{min:e,max:n,minDefined:o,maxDefined:r}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function Jh(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function Jl(t,e,n,o){for(const r of e.getMatchingVisibleMetas(o).reverse()){const i=t[r.index];if(n&&i>0||!n&&i<0)return r.index}return null}function Zl(t,e){const{chart:n,_cachedMeta:o}=t,r=n._stacks||(n._stacks={}),{iScale:i,vScale:a,index:c}=o,m=i.axis,C=a.axis,L=Kh(i,a,o),D=e.length;let W;for(let K=0;K<D;++K){const X=e[K],{[m]:ee,[C]:re}=X,fe=X._stacks||(X._stacks={});W=fe[C]=Jh(r,L,ee),W[c]=re,W._top=Jl(W,a,!0,o.type),W._bottom=Jl(W,a,!1,o.type);const ye=W._visualValues||(W._visualValues={});ye[c]=re}}function la(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Zh(t,e){return qn(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Qh(t,e,n){return qn(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Go(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const r of e){const i=r._stacks;if(!i||i[o]===void 0||i[o][n]===void 0)return;delete i[o][n],i[o]._visualValues!==void 0&&i[o]._visualValues[n]!==void 0&&delete i[o]._visualValues[n]}}}const sa=t=>t==="reset"||t==="none",Ql=(t,e)=>e?t:Object.assign({},t),em=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:jc(n,!0),values:null};class xn{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=aa(e.vScale,e),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(e){this.index!==e&&Go(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),r=(D,W,K,X)=>D==="x"?W:D==="r"?X:K,i=n.xAxisID=st(o.xAxisID,la(e,"x")),a=n.yAxisID=st(o.yAxisID,la(e,"y")),c=n.rAxisID=st(o.rAxisID,la(e,"r")),m=n.indexAxis,C=n.iAxisID=r(m,i,a,c),L=n.vAxisID=r(m,a,i,c);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(C),n.vScale=this.getScaleForId(L)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Hl(this._data,this),e._stacked&&Go(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(yt(n)){const r=this._cachedMeta;this._data=Yh(n,r)}else if(o!==n){if(o){Hl(o,this);const r=this._cachedMeta;Go(r),r._parsed=[]}n&&Object.isExtensible(n)&&Ff(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let r=!1;this._dataCheck();const i=n._stacked;n._stacked=aa(n.vScale,n),n.stack!==o.stack&&(r=!0,Go(n),n.stack=o.stack),this._resyncElements(e),(r||i!==n._stacked)&&(Zl(this,n._parsed),n._stacked=aa(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:r}=this,{iScale:i,_stacked:a}=o,c=i.axis;let m=e===0&&n===r.length?!0:o._sorted,C=e>0&&o._parsed[e-1],L,D,W;if(this._parsing===!1)o._parsed=r,o._sorted=!0,W=r;else{Ot(r[e])?W=this.parseArrayData(o,r,e,n):yt(r[e])?W=this.parseObjectData(o,r,e,n):W=this.parsePrimitiveData(o,r,e,n);const K=()=>D[c]===null||C&&D[c]<C[c];for(L=0;L<n;++L)o._parsed[L+e]=D=W[L],m&&(K()&&(m=!1),C=D);o._sorted=m}a&&Zl(this,W)}parsePrimitiveData(e,n,o,r){const{iScale:i,vScale:a}=e,c=i.axis,m=a.axis,C=i.getLabels(),L=i===a,D=new Array(r);let W,K,X;for(W=0,K=r;W<K;++W)X=W+o,D[W]={[c]:L||i.parse(C[X],X),[m]:a.parse(n[X],X)};return D}parseArrayData(e,n,o,r){const{xScale:i,yScale:a}=e,c=new Array(r);let m,C,L,D;for(m=0,C=r;m<C;++m)L=m+o,D=n[L],c[m]={x:i.parse(D[0],L),y:a.parse(D[1],L)};return c}parseObjectData(e,n,o,r){const{xScale:i,yScale:a}=e,{xAxisKey:c="x",yAxisKey:m="y"}=this._parsing,C=new Array(r);let L,D,W,K;for(L=0,D=r;L<D;++L)W=L+o,K=n[W],C[L]={x:i.parse(jn(K,c),W),y:a.parse(jn(K,m),W)};return C}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const r=this.chart,i=this._cachedMeta,a=n[e.axis],c={keys:jc(r,!0),values:n._stacks[e.axis]._visualValues};return Xl(c,a,i.index,{mode:o})}updateRangeFromParsed(e,n,o,r){const i=o[n.axis];let a=i===null?NaN:i;const c=r&&o._stacks[n.axis];r&&c&&(r.values=c,a=Xl(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const o=this._cachedMeta,r=o._parsed,i=o._sorted&&e===o.iScale,a=r.length,c=this._getOtherScale(e),m=em(n,o,this.chart),C={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:L,max:D}=Xh(c);let W,K;function X(){K=r[W];const ee=K[c.axis];return!qt(K[e.axis])||L>ee||D<ee}for(W=0;W<a&&!(!X()&&(this.updateRangeFromParsed(C,e,K,m),i));++W);if(i){for(W=a-1;W>=0;--W)if(!X()){this.updateRangeFromParsed(C,e,K,m);break}}return C}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let r,i,a;for(r=0,i=n.length;r<i;++r)a=n[r][e.axis],qt(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,r=n.vScale,i=this.getParsed(e);return{label:o?""+o.getLabelForValue(i[o.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=$h(st(this.options.clip,qh(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,r=o.data||[],i=n.chartArea,a=[],c=this._drawStart||0,m=this._drawCount||r.length-c,C=this.options.drawActiveElementsOnTop;let L;for(o.dataset&&o.dataset.draw(e,i,c,m),L=c;L<c+m;++L){const D=r[L];D.hidden||(D.active&&C?a.push(D):D.draw(e,i))}for(L=0;L<a.length;++L)a[L].draw(e,i)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const r=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];i=a.$context||(a.$context=Qh(this.getContext(),e,a)),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=Zh(this.chart.getContext(),this.index)),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=o,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const r=n==="active",i=this._cachedDataOpts,a=e+"-"+n,c=i[a],m=this.enableOptionSharing&&ir(o);if(c)return Ql(c,m);const C=this.chart.config,L=C.datasetElementScopeKeys(this._type,e),D=r?[`${e}Hover`,"hover",e,""]:[e,""],W=C.getOptionScopes(this.getDataset(),L),K=Object.keys(Vt.elements[e]),X=()=>this.getContext(o,r,n),ee=C.resolveNamedOptions(W,K,X,D);return ee.$shared&&(ee.$shared=m,i[a]=Object.freeze(Ql(ee,m))),ee}_resolveAnimations(e,n,o){const r=this.chart,i=this._cachedDataOpts,a=`animation-${n}`,c=i[a];if(c)return c;let m;if(r.options.animation!==!1){const L=this.chart.config,D=L.datasetAnimationScopeKeys(this._type,n),W=L.getOptionScopes(this.getDataset(),D);m=L.createResolver(W,this.getContext(e,o,n))}const C=new Gc(r,m&&m.animations);return m&&m._cacheable&&(i[a]=Object.freeze(C)),C}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||sa(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),r=this._sharedOptions,i=this.getSharedOptions(o),a=this.includeOptions(n,i)||i!==r;return this.updateSharedOptions(i,n,o),{sharedOptions:i,includeOptions:a}}updateElement(e,n,o,r){sa(r)?Object.assign(e,o):this._resolveAnimations(n,r).update(e,o)}updateSharedOptions(e,n,o){e&&!sa(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,r){e.active=r;const i=this.getStyle(n,r);this._resolveAnimations(n,o,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[c,m,C]of this._syncList)this[c](m,C);this._syncList=[];const r=o.length,i=n.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,n,o=!0){const r=this._cachedMeta,i=r.data,a=e+n;let c;const m=C=>{for(C.length+=n,c=C.length-1;c>=a;c--)C[c]=C[c-n]};for(m(i),c=e;c<a;++c)i[c]=new this.dataElementType;this._parsing&&m(r._parsed),this.parse(e,n),o&&this.updateElements(i,e,n,"reset")}updateElements(e,n,o,r){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const r=o._parsed.splice(e,n);o._stacked&&Go(o,r)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,r]=e;this[n](o,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Oe(xn,"defaults",{}),Oe(xn,"datasetElementType",null),Oe(xn,"dataElementType",null);function tm(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let r=0,i=n.length;r<i;r++)o=o.concat(n[r].controller.getAllParsedValues(t));t._cache.$bar=Sc(o.sort((r,i)=>r-i))}return t._cache.$bar}function nm(t){const e=t.iScale,n=tm(e,t.type);let o=e._length,r,i,a,c;const m=()=>{a===32767||a===-32768||(ir(c)&&(o=Math.min(o,Math.abs(a-c)||o)),c=a)};for(r=0,i=n.length;r<i;++r)a=e.getPixelForValue(n[r]),m();for(c=void 0,r=0,i=e.ticks.length;r<i;++r)a=e.getPixelForTick(r),m();return o}function om(t,e,n,o){const r=n.barThickness;let i,a;return vt(r)?(i=e.min*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:e.pixels[t]-i/2}}function rm(t,e,n,o){const r=e.pixels,i=r[t];let a=t>0?r[t-1]:null,c=t<r.length-1?r[t+1]:null;const m=n.categoryPercentage;a===null&&(a=i-(c===null?e.end-e.start:c-i)),c===null&&(c=i+i-a);const C=i-(i-Math.min(a,c))/2*m;return{chunk:Math.abs(c-a)/2*m/o,ratio:n.barPercentage,start:C}}function im(t,e,n,o){const r=n.parse(t[0],o),i=n.parse(t[1],o),a=Math.min(r,i),c=Math.max(r,i);let m=a,C=c;Math.abs(a)>Math.abs(c)&&(m=c,C=a),e[n.axis]=C,e._custom={barStart:m,barEnd:C,start:r,end:i,min:a,max:c}}function Wc(t,e,n,o){return Ot(t)?im(t,e,n,o):e[n.axis]=n.parse(t,o),e}function es(t,e,n,o){const r=t.iScale,i=t.vScale,a=r.getLabels(),c=r===i,m=[];let C,L,D,W;for(C=n,L=n+o;C<L;++C)W=e[C],D={},D[r.axis]=c||r.parse(a[C],C),m.push(Wc(W,D,i,C));return m}function ca(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function am(t,e,n){return t!==0?Mn(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function lm(t){let e,n,o,r,i;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(r="end",i="start"):(r="start",i="end"),{start:n,end:o,reverse:e,top:r,bottom:i}}function sm(t,e,n,o){let r=e.borderSkipped;const i={};if(!r){t.borderSkipped=i;return}if(r===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:c,reverse:m,top:C,bottom:L}=lm(t);r==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?r=C:(n._bottom||0)===o?r=L:(i[ts(L,a,c,m)]=!0,r=C)),i[ts(r,a,c,m)]=!0,t.borderSkipped=i}function ts(t,e,n,o){return o?(t=cm(t,e,n),t=ns(t,n,e)):t=ns(t,e,n),t}function cm(t,e,n){return t===e?n:t===n?e:t}function ns(t,e,n){return t==="start"?e:t==="end"?n:t}function dm(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class mi extends xn{parsePrimitiveData(e,n,o,r){return es(e,n,o,r)}parseArrayData(e,n,o,r){return es(e,n,o,r)}parseObjectData(e,n,o,r){const{iScale:i,vScale:a}=e,{xAxisKey:c="x",yAxisKey:m="y"}=this._parsing,C=i.axis==="x"?c:m,L=a.axis==="x"?c:m,D=[];let W,K,X,ee;for(W=o,K=o+r;W<K;++W)ee=n[W],X={},X[i.axis]=i.parse(jn(ee,C),W),D.push(Wc(jn(ee,L),X,a,W));return D}updateRangeFromParsed(e,n,o,r){super.updateRangeFromParsed(e,n,o,r);const i=o._custom;i&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:r}=n,i=this.getParsed(e),a=i._custom,c=ca(a)?"["+a.start+", "+a.end+"]":""+r.getLabelForValue(i[r.axis]);return{label:""+o.getLabelForValue(i[o.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,r){const i=r==="reset",{index:a,_cachedMeta:{vScale:c}}=this,m=c.getBasePixel(),C=c.isHorizontal(),L=this._getRuler(),{sharedOptions:D,includeOptions:W}=this._getSharedOptions(n,r);for(let K=n;K<n+o;K++){const X=this.getParsed(K),ee=i||vt(X[c.axis])?{base:m,head:m}:this._calculateBarValuePixels(K),re=this._calculateBarIndexPixels(K,L),fe=(X._stacks||{})[c.axis],ye={horizontal:C,base:ee.base,enableBorderRadius:!fe||ca(X._custom)||a===fe._top||a===fe._bottom,x:C?ee.head:re.center,y:C?re.center:ee.head,height:C?re.size:Math.abs(ee.size),width:C?Math.abs(ee.size):re.size};W&&(ye.options=D||this.resolveDataElementOptions(K,e[K].active?"active":r));const xe=ye.options||e[K].options;sm(ye,xe,fe,a),dm(ye,xe,L.ratio),this.updateElement(e[K],K,ye,r)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,r=o.getMatchingVisibleMetas(this._type).filter(L=>L.controller.options.grouped),i=o.options.stacked,a=[],c=this._cachedMeta.controller.getParsed(n),m=c&&c[o.axis],C=L=>{const D=L._parsed.find(K=>K[o.axis]===m),W=D&&D[L.vScale.axis];if(vt(W)||isNaN(W))return!0};for(const L of r)if(!(n!==void 0&&C(L))&&((i===!1||a.indexOf(L.stack)===-1||i===void 0&&L.stack===void 0)&&a.push(L.stack),L.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(o=>e[o].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const o of this.chart.data.datasets)e[st(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,o){const r=this._getStacks(e,o),i=n!==void 0?r.indexOf(n):-1;return i===-1?r.length-1:i}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,r=[];let i,a;for(i=0,a=n.data.length;i<a;++i)r.push(o.getPixelForValue(this.getParsed(i)[o.axis],i));const c=e.barThickness;return{min:c||nm(n),pixels:r,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:r},options:{base:i,minBarLength:a}}=this,c=i||0,m=this.getParsed(e),C=m._custom,L=ca(C);let D=m[n.axis],W=0,K=o?this.applyStack(n,m,o):D,X,ee;K!==D&&(W=K-D,K=D),L&&(D=C.barStart,K=C.barEnd-C.barStart,D!==0&&Mn(D)!==Mn(C.barEnd)&&(W=0),W+=D);const re=!vt(i)&&!L?i:W;let fe=n.getPixelForValue(re);if(this.chart.getDataVisibility(e)?X=n.getPixelForValue(W+K):X=fe,ee=X-fe,Math.abs(ee)<a){ee=am(ee,n,c)*a,D===c&&(fe-=ee/2);const ye=n.getPixelForDecimal(0),xe=n.getPixelForDecimal(1),ke=Math.min(ye,xe),ve=Math.max(ye,xe);fe=Math.max(Math.min(fe,ve),ke),X=fe+ee,o&&!L&&(m._stacks[n.axis]._visualValues[r]=n.getValueForPixel(X)-n.getValueForPixel(fe))}if(fe===n.getPixelForValue(c)){const ye=Mn(ee)*n.getLineWidthForValue(c)/2;fe+=ye,ee-=ye}return{size:ee,base:fe,head:X,center:X+ee/2}}_calculateBarIndexPixels(e,n){const o=n.scale,r=this.options,i=r.skipNull,a=st(r.maxBarThickness,1/0);let c,m;const C=this._getAxisCount();if(n.grouped){const L=i?this._getStackCount(e):n.stackCount,D=r.barThickness==="flex"?rm(e,n,r,L*C):om(e,n,r,L*C),W=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,K=this._getAxis().indexOf(st(W,this.getFirstScaleIdForIndexAxis())),X=this._getStackIndex(this.index,this._cachedMeta.stack,i?e:void 0)+K;c=D.start+D.chunk*X+D.chunk/2,m=Math.min(a,D.chunk*D.ratio)}else c=o.getPixelForValue(this.getParsed(e)[o.axis],e),m=Math.min(a,n.min*n.ratio);return{base:c-m/2,head:c+m/2,center:c,size:m}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,r=o.length;let i=0;for(;i<r;++i)this.getParsed(i)[n.axis]!==null&&!o[i].hidden&&o[i].draw(this._ctx)}}Oe(mi,"id","bar"),Oe(mi,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Oe(mi,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class gi extends xn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,r){const i=super.parsePrimitiveData(e,n,o,r);for(let a=0;a<i.length;a++)i[a]._custom=this.resolveDataElementOptions(a+o).radius;return i}parseArrayData(e,n,o,r){const i=super.parseArrayData(e,n,o,r);for(let a=0;a<i.length;a++){const c=n[o+a];i[a]._custom=st(c[2],this.resolveDataElementOptions(a+o).radius)}return i}parseObjectData(e,n,o,r){const i=super.parseObjectData(e,n,o,r);for(let a=0;a<i.length;a++){const c=n[o+a];i[a]._custom=st(c&&c.r&&+c.r,this.resolveDataElementOptions(a+o).radius)}return i}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:i}=n,a=this.getParsed(e),c=r.getLabelForValue(a.x),m=i.getLabelForValue(a.y),C=a._custom;return{label:o[e]||"",value:"("+c+", "+m+(C?", "+C:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,r){const i=r==="reset",{iScale:a,vScale:c}=this._cachedMeta,{sharedOptions:m,includeOptions:C}=this._getSharedOptions(n,r),L=a.axis,D=c.axis;for(let W=n;W<n+o;W++){const K=e[W],X=!i&&this.getParsed(W),ee={},re=ee[L]=i?a.getPixelForDecimal(.5):a.getPixelForValue(X[L]),fe=ee[D]=i?c.getBasePixel():c.getPixelForValue(X[D]);ee.skip=isNaN(re)||isNaN(fe),C&&(ee.options=m||this.resolveDataElementOptions(W,K.active?"active":r),i&&(ee.options.radius=0)),this.updateElement(K,W,ee,r)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let r=super.resolveDataElementOptions(e,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const i=r.radius;return n!=="active"&&(r.radius=0),r.radius+=st(o&&o._custom,i),r}}Oe(gi,"id","bubble"),Oe(gi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),Oe(gi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function um(t,e,n){let o=1,r=1,i=0,a=0;if(e<Tt){const c=t,m=c+e,C=Math.cos(c),L=Math.sin(c),D=Math.cos(m),W=Math.sin(m),K=(xe,ke,ve)=>ar(xe,c,m,!0)?1:Math.max(ke,ke*n,ve,ve*n),X=(xe,ke,ve)=>ar(xe,c,m,!0)?-1:Math.min(ke,ke*n,ve,ve*n),ee=K(0,C,D),re=K(Pt,L,W),fe=X(It,C,D),ye=X(It+Pt,L,W);o=(ee-fe)/2,r=(re-ye)/2,i=-(ee+fe)/2,a=-(re+ye)/2}return{ratioX:o,ratioY:r,offsetX:i,offsetY:a}}class Mo extends xn{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=o;else{let i=m=>+o[m];if(yt(o[e])){const{key:m="value"}=this._parsing;i=C=>+jn(o[C],m)}let a,c;for(a=e,c=e+n;a<c;++a)r._parsed[a]=i(a)}}_getRotation(){return Cn(this.options.rotation-90)}_getCircumference(){return Cn(this.options.circumference)}_getRotationExtents(){let e=Tt,n=-Tt;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const r=this.chart.getDatasetMeta(o).controller,i=r._getRotation(),a=r._getCircumference();e=Math.min(e,i),n=Math.max(n,i+a)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,r=this._cachedMeta,i=r.data,a=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,c=Math.max((Math.min(o.width,o.height)-a)/2,0),m=Math.min(bf(this.options.cutout,c),1),C=this._getRingWeight(this.index),{circumference:L,rotation:D}=this._getRotationExtents(),{ratioX:W,ratioY:K,offsetX:X,offsetY:ee}=um(D,L,m),re=(o.width-a)/W,fe=(o.height-a)/K,ye=Math.max(Math.min(re,fe)/2,0),xe=vc(this.options.radius,ye),ke=Math.max(xe*m,0),ve=(xe-ke)/this._getVisibleDatasetWeightTotal();this.offsetX=X*xe,this.offsetY=ee*xe,r.total=this.calculateTotal(),this.outerRadius=xe-ve*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-ve*C,0),this.updateElements(i,0,i.length,e)}_circumference(e,n){const o=this.options,r=this._cachedMeta,i=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||r._parsed[e]===null||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*i/Tt)}updateElements(e,n,o,r){const i=r==="reset",a=this.chart,c=a.chartArea,C=a.options.animation,L=(c.left+c.right)/2,D=(c.top+c.bottom)/2,W=i&&C.animateScale,K=W?0:this.innerRadius,X=W?0:this.outerRadius,{sharedOptions:ee,includeOptions:re}=this._getSharedOptions(n,r);let fe=this._getRotation(),ye;for(ye=0;ye<n;++ye)fe+=this._circumference(ye,i);for(ye=n;ye<n+o;++ye){const xe=this._circumference(ye,i),ke=e[ye],ve={x:L+this.offsetX,y:D+this.offsetY,startAngle:fe,endAngle:fe+xe,circumference:xe,outerRadius:X,innerRadius:K};re&&(ve.options=ee||this.resolveDataElementOptions(ye,ke.active?"active":r)),fe+=xe,this.updateElement(ke,ye,ve,r)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,r;for(r=0;r<n.length;r++){const i=e._parsed[r];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(o+=Math.abs(i))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?Tt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,r=o.data.labels||[],i=Ua(n._parsed[e],o.options.locale);return{label:r[e]||"",value:i}}getMaxBorderWidth(e){let n=0;const o=this.chart;let r,i,a,c,m;if(!e){for(r=0,i=o.data.datasets.length;r<i;++r)if(o.isDatasetVisible(r)){a=o.getDatasetMeta(r),e=a.data,c=a.controller;break}}if(!e)return 0;for(r=0,i=e.length;r<i;++r)m=c.resolveDataElementOptions(r),m.borderAlign!=="inner"&&(n=Math.max(n,m.borderWidth||0,m.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,r=e.length;o<r;++o){const i=this.resolveDataElementOptions(o);n=Math.max(n,i.offset||0,i.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(st(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Oe(Mo,"id","doughnut"),Oe(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"}),Oe(Mo,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Oe(Mo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:r}}=e.legend.options;return n.labels.map((i,a)=>{const m=e.getDatasetMeta(0).controller.getStyle(a);return{text:i,fillStyle:m.backgroundColor,strokeStyle:m.borderColor,fontColor:r,lineWidth:m.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class yi extends xn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:r=[],_dataset:i}=n,a=this.chart._animationsDisabled;let{start:c,count:m}=wc(n,r,a);this._drawStart=c,this._drawCount=m,Ac(n)&&(c=0,m=r.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=r;const C=this.resolveDatasetElementOptions(e);this.options.showLine||(C.borderWidth=0),C.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:C},e),this.updateElements(r,c,m,e)}updateElements(e,n,o,r){const i=r==="reset",{iScale:a,vScale:c,_stacked:m,_dataset:C}=this._cachedMeta,{sharedOptions:L,includeOptions:D}=this._getSharedOptions(n,r),W=a.axis,K=c.axis,{spanGaps:X,segment:ee}=this.options,re=ko(X)?X:Number.POSITIVE_INFINITY,fe=this.chart._animationsDisabled||i||r==="none",ye=n+o,xe=e.length;let ke=n>0&&this.getParsed(n-1);for(let ve=0;ve<xe;++ve){const Ee=e[ve],Me=fe?Ee:{};if(ve<n||ve>=ye){Me.skip=!0;continue}const Ie=this.getParsed(ve),Te=vt(Ie[K]),We=Me[W]=a.getPixelForValue(Ie[W],ve),nt=Me[K]=i||Te?c.getBasePixel():c.getPixelForValue(m?this.applyStack(c,Ie,m):Ie[K],ve);Me.skip=isNaN(We)||isNaN(nt)||Te,Me.stop=ve>0&&Math.abs(Ie[W]-ke[W])>re,ee&&(Me.parsed=Ie,Me.raw=C.data[ve]),D&&(Me.options=L||this.resolveDataElementOptions(ve,Ee.active?"active":r)),fe||this.updateElement(Ee,ve,Me,r),ke=Ie}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,r=e.data||[];if(!r.length)return o;const i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(o,i,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Oe(yi,"id","line"),Oe(yi,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Oe(yi,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ca extends Mo{}Oe(Ca,"id","pie"),Oe(Ca,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class pi extends xn{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,r){return gh.bind(this)(e,n,o,r)}update(e){const n=this._cachedMeta,o=n.dataset,r=n.data||[],i=n.iScale.getLabels();if(o.points=r,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const c={_loop:!0,_fullLoop:i.length===r.length,options:a};this.updateElement(o,void 0,c,e)}this.updateElements(r,0,r.length,e)}updateElements(e,n,o,r){const i=this._cachedMeta.rScale,a=r==="reset";for(let c=n;c<n+o;c++){const m=e[c],C=this.resolveDataElementOptions(c,m.active?"active":r),L=i.getPointPositionForValue(c,this.getParsed(c).r),D=a?i.xCenter:L.x,W=a?i.yCenter:L.y,K={x:D,y:W,angle:L.angle,skip:isNaN(D)||isNaN(W),options:C};this.updateElement(m,c,K,r)}}}Oe(pi,"id","radar"),Oe(pi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),Oe(pi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class _i extends xn{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:i}=n,a=this.getParsed(e),c=r.getLabelForValue(a.x),m=i.getLabelForValue(a.y);return{label:o[e]||"",value:"("+c+", "+m+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,r=this.chart._animationsDisabled;let{start:i,count:a}=wc(n,o,r);if(this._drawStart=i,this._drawCount=a,Ac(n)&&(i=0,a=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:m}=n;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!m._decimated,c.points=o;const C=this.resolveDatasetElementOptions(e);C.segment=this.options.segment,this.updateElement(c,void 0,{animated:!r,options:C},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,i,a,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,r){const i=r==="reset",{iScale:a,vScale:c,_stacked:m,_dataset:C}=this._cachedMeta,L=this.resolveDataElementOptions(n,r),D=this.getSharedOptions(L),W=this.includeOptions(r,D),K=a.axis,X=c.axis,{spanGaps:ee,segment:re}=this.options,fe=ko(ee)?ee:Number.POSITIVE_INFINITY,ye=this.chart._animationsDisabled||i||r==="none";let xe=n>0&&this.getParsed(n-1);for(let ke=n;ke<n+o;++ke){const ve=e[ke],Ee=this.getParsed(ke),Me=ye?ve:{},Ie=vt(Ee[X]),Te=Me[K]=a.getPixelForValue(Ee[K],ke),We=Me[X]=i||Ie?c.getBasePixel():c.getPixelForValue(m?this.applyStack(c,Ee,m):Ee[X],ke);Me.skip=isNaN(Te)||isNaN(We)||Ie,Me.stop=ke>0&&Math.abs(Ee[K]-xe[K])>fe,re&&(Me.parsed=Ee,Me.raw=C.data[ke]),W&&(Me.options=D||this.resolveDataElementOptions(ke,ve.active?"active":r)),ye||this.updateElement(ve,ke,Me,r),xe=Ee}this.updateSharedOptions(D,r,L)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let c=0;for(let m=n.length-1;m>=0;--m)c=Math.max(c,n[m].size(this.resolveDataElementOptions(m))/2);return c>0&&c}const o=e.dataset,r=o.options&&o.options.borderWidth||0;if(!n.length)return r;const i=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,i,a)/2}}Oe(_i,"id","scatter"),Oe(_i,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Oe(_i,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function oo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Xa{constructor(e){Oe(this,"options");this.options=e||{}}static override(e){Object.assign(Xa.prototype,e)}init(){}formats(){return oo()}parse(){return oo()}format(){return oo()}add(){return oo()}diff(){return oo()}startOf(){return oo()}endOf(){return oo()}}var fm={_date:Xa};function hm(t,e,n,o){const{controller:r,data:i,_sorted:a}=t,c=r._cachedMeta.iScale,m=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(c&&e===c.axis&&e!=="r"&&a&&i.length){const C=c._reversePixels?Rf:so;if(o){if(r._sharedOptions){const L=i[0],D=typeof L.getRange=="function"&&L.getRange(e);if(D){const W=C(i,e,n-D),K=C(i,e,n+D);return{lo:W.lo,hi:K.hi}}}}else{const L=C(i,e,n);if(m){const{vScale:D}=r._cachedMeta,{_parsed:W}=t,K=W.slice(0,L.lo+1).reverse().findIndex(ee=>!vt(ee[D.axis]));L.lo-=Math.max(0,K);const X=W.slice(L.hi).findIndex(ee=>!vt(ee[D.axis]));L.hi+=Math.max(0,X)}return L}}return{lo:0,hi:i.length-1}}function Oi(t,e,n,o,r){const i=t.getSortedVisibleDatasetMetas(),a=n[e];for(let c=0,m=i.length;c<m;++c){const{index:C,data:L}=i[c],{lo:D,hi:W}=hm(i[c],e,a,r);for(let K=D;K<=W;++K){const X=L[K];X.skip||o(X,C,K)}}}function mm(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,r){const i=e?Math.abs(o.x-r.x):0,a=n?Math.abs(o.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(a,2))}}function da(t,e,n,o,r){const i=[];return!r&&!t.isPointInArea(e)||Oi(t,n,e,function(c,m,C){!r&&!Nn(c,t.chartArea,0)||c.inRange(e.x,e.y,o)&&i.push({element:c,datasetIndex:m,index:C})},!0),i}function gm(t,e,n,o){let r=[];function i(a,c,m){const{startAngle:C,endAngle:L}=a.getProps(["startAngle","endAngle"],o),{angle:D}=Mc(a,{x:e.x,y:e.y});ar(D,C,L)&&r.push({element:a,datasetIndex:c,index:m})}return Oi(t,n,e,i),r}function ym(t,e,n,o,r,i){let a=[];const c=mm(n);let m=Number.POSITIVE_INFINITY;function C(L,D,W){const K=L.inRange(e.x,e.y,r);if(o&&!K)return;const X=L.getCenterPoint(r);if(!(!!i||t.isPointInArea(X))&&!K)return;const re=c(e,X);re<m?(a=[{element:L,datasetIndex:D,index:W}],m=re):re===m&&a.push({element:L,datasetIndex:D,index:W})}return Oi(t,n,e,C),a}function ua(t,e,n,o,r,i){return!i&&!t.isPointInArea(e)?[]:n==="r"&&!o?gm(t,e,n,r):ym(t,e,n,o,r,i)}function os(t,e,n,o,r){const i=[],a=n==="x"?"inXRange":"inYRange";let c=!1;return Oi(t,n,e,(m,C,L)=>{m[a]&&m[a](e[n],r)&&(i.push({element:m,datasetIndex:C,index:L}),c=c||m.inRange(e.x,e.y,r))}),o&&!c?[]:i}var pm={modes:{index(t,e,n,o){const r=ro(e,t),i=n.axis||"x",a=n.includeInvisible||!1,c=n.intersect?da(t,r,i,o,a):ua(t,r,i,!1,o,a),m=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(C=>{const L=c[0].index,D=C.data[L];D&&!D.skip&&m.push({element:D,datasetIndex:C.index,index:L})}),m):[]},dataset(t,e,n,o){const r=ro(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;let c=n.intersect?da(t,r,i,o,a):ua(t,r,i,!1,o,a);if(c.length>0){const m=c[0].datasetIndex,C=t.getDatasetMeta(m).data;c=[];for(let L=0;L<C.length;++L)c.push({element:C[L],datasetIndex:m,index:L})}return c},point(t,e,n,o){const r=ro(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;return da(t,r,i,o,a)},nearest(t,e,n,o){const r=ro(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;return ua(t,r,i,n.intersect,o,a)},x(t,e,n,o){const r=ro(e,t);return os(t,r,"x",n.intersect,o)},y(t,e,n,o){const r=ro(e,t);return os(t,r,"y",n.intersect,o)}}};const qc=["left","top","right","bottom"];function jo(t,e){return t.filter(n=>n.pos===e)}function rs(t,e){return t.filter(n=>qc.indexOf(n.pos)===-1&&n.box.axis===e)}function Wo(t,e){return t.sort((n,o)=>{const r=e?o:n,i=e?n:o;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function _m(t){const e=[];let n,o,r,i,a,c;for(n=0,o=(t||[]).length;n<o;++n)r=t[n],{position:i,options:{stack:a,stackWeight:c=1}}=r,e.push({index:n,box:r,pos:i,horizontal:r.isHorizontal(),weight:r.weight,stack:a&&i+a,stackWeight:c});return e}function vm(t){const e={};for(const n of t){const{stack:o,pos:r,stackWeight:i}=n;if(!o||!qc.includes(r))continue;const a=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return e}function bm(t,e){const n=vm(t),{vBoxMaxWidth:o,hBoxMaxHeight:r}=e;let i,a,c;for(i=0,a=t.length;i<a;++i){c=t[i];const{fullSize:m}=c.box,C=n[c.stack],L=C&&c.stackWeight/C.weight;c.horizontal?(c.width=L?L*o:m&&e.availableWidth,c.height=r):(c.width=o,c.height=L?L*r:m&&e.availableHeight)}return n}function Cm(t){const e=_m(t),n=Wo(e.filter(C=>C.box.fullSize),!0),o=Wo(jo(e,"left"),!0),r=Wo(jo(e,"right")),i=Wo(jo(e,"top"),!0),a=Wo(jo(e,"bottom")),c=rs(e,"x"),m=rs(e,"y");return{fullSize:n,leftAndTop:o.concat(i),rightAndBottom:r.concat(m).concat(a).concat(c),chartArea:jo(e,"chartArea"),vertical:o.concat(r).concat(m),horizontal:i.concat(a).concat(c)}}function is(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function $c(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 Mm(t,e,n,o){const{pos:r,box:i}=n,a=t.maxPadding;if(!yt(r)){n.size&&(t[r]-=n.size);const D=o[n.stack]||{size:0,count:1};D.size=Math.max(D.size,n.horizontal?i.height:i.width),n.size=D.size/D.count,t[r]+=n.size}i.getPadding&&$c(a,i.getPadding());const c=Math.max(0,e.outerWidth-is(a,t,"left","right")),m=Math.max(0,e.outerHeight-is(a,t,"top","bottom")),C=c!==t.w,L=m!==t.h;return t.w=c,t.h=m,n.horizontal?{same:C,other:L}:{same:L,other:C}}function xm(t){const e=t.maxPadding;function n(o){const r=Math.max(e[o]-t[o],0);return t[o]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Sm(t,e){const n=e.maxPadding;function o(r){const i={left:0,top:0,right:0,bottom:0};return r.forEach(a=>{i[a]=Math.max(e[a],n[a])}),i}return o(t?["left","right"]:["top","bottom"])}function Ko(t,e,n,o){const r=[];let i,a,c,m,C,L;for(i=0,a=t.length,C=0;i<a;++i){c=t[i],m=c.box,m.update(c.width||e.w,c.height||e.h,Sm(c.horizontal,e));const{same:D,other:W}=Mm(e,n,c,o);C|=D&&r.length,L=L||W,m.fullSize||r.push(c)}return C&&Ko(r,e,n,o)||L}function ri(t,e,n,o,r){t.top=n,t.left=e,t.right=e+o,t.bottom=n+r,t.width=o,t.height=r}function as(t,e,n,o){const r=n.padding;let{x:i,y:a}=e;for(const c of t){const m=c.box,C=o[c.stack]||{placed:0,weight:1},L=c.stackWeight/C.weight||1;if(c.horizontal){const D=e.w*L,W=C.size||m.height;ir(C.start)&&(a=C.start),m.fullSize?ri(m,r.left,a,n.outerWidth-r.right-r.left,W):ri(m,e.left+C.placed,a,D,W),C.start=a,C.placed+=D,a=m.bottom}else{const D=e.h*L,W=C.size||m.width;ir(C.start)&&(i=C.start),m.fullSize?ri(m,i,r.top,W,n.outerHeight-r.bottom-r.top):ri(m,i,e.top+C.placed,W,D),C.start=i,C.placed+=D,i=m.right}}e.x=i,e.y=a}var Dn={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(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const r=Jt(t.options.layout.padding),i=Math.max(e-r.width,0),a=Math.max(n-r.height,0),c=Cm(t.boxes),m=c.vertical,C=c.horizontal;kt(t.boxes,ee=>{typeof ee.beforeLayout=="function"&&ee.beforeLayout()});const L=m.reduce((ee,re)=>re.box.options&&re.box.options.display===!1?ee:ee+1,0)||1,D=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/L,hBoxMaxHeight:a/2}),W=Object.assign({},r);$c(W,Jt(o));const K=Object.assign({maxPadding:W,w:i,h:a,x:r.left,y:r.top},r),X=bm(m.concat(C),D);Ko(c.fullSize,K,D,X),Ko(m,K,D,X),Ko(C,K,D,X)&&Ko(m,K,D,X),xm(K),as(c.leftAndTop,K,D,X),K.x+=K.w,K.y+=K.h,as(c.rightAndBottom,K,D,X),t.chartArea={left:K.left,top:K.top,right:K.left+K.w,bottom:K.top+K.h,height:K.h,width:K.w},kt(c.chartArea,ee=>{const re=ee.box;Object.assign(re,t.chartArea),re.update(K.w,K.h,{left:0,top:0,right:0,bottom:0})})}};class Yc{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,r){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,r?Math.floor(n/r):o)}}isAttached(e){return!0}updateConfig(e){}}class km extends Yc{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const vi="$chartjs",Im={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ls=t=>t===null||t==="";function Em(t,e){const n=t.style,o=t.getAttribute("height"),r=t.getAttribute("width");if(t[vi]={initial:{height:o,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",ls(r)){const i=jl(t,"width");i!==void 0&&(t.width=i)}if(ls(o))if(t.style.height==="")t.height=t.width/(e||2);else{const i=jl(t,"height");i!==void 0&&(t.height=i)}return t}const Kc=Ah?{passive:!0}:!1;function wm(t,e,n){t&&t.addEventListener(e,n,Kc)}function Am(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Kc)}function Tm(t,e){const n=Im[t.type]||t.type,{x:o,y:r}=ro(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:r!==void 0?r:null}}function wi(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Bm(t,e,n){const o=t.canvas,r=new MutationObserver(i=>{let a=!1;for(const c of i)a=a||wi(c.addedNodes,o),a=a&&!wi(c.removedNodes,o);a&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function Lm(t,e,n){const o=t.canvas,r=new MutationObserver(i=>{let a=!1;for(const c of i)a=a||wi(c.removedNodes,o),a=a&&!wi(c.addedNodes,o);a&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const sr=new Map;let ss=0;function Xc(){const t=window.devicePixelRatio;t!==ss&&(ss=t,sr.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Nm(t,e){sr.size||window.addEventListener("resize",Xc),sr.set(t,e)}function Rm(t){sr.delete(t),sr.size||window.removeEventListener("resize",Xc)}function Hm(t,e,n){const o=t.canvas,r=o&&Ka(o);if(!r)return;const i=Ic((c,m)=>{const C=r.clientWidth;n(c,m),C<r.clientWidth&&n()},window),a=new ResizeObserver(c=>{const m=c[0],C=m.contentRect.width,L=m.contentRect.height;C===0&&L===0||i(C,L)});return a.observe(r),Nm(t,i),a}function fa(t,e,n){n&&n.disconnect(),e==="resize"&&Rm(t)}function Fm(t,e,n){const o=t.canvas,r=Ic(i=>{t.ctx!==null&&n(Tm(i,t))},t);return wm(o,e,r),r}class Om extends Yc{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(Em(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[vi])return!1;const o=n[vi].initial;["height","width"].forEach(i=>{const a=o[i];vt(a)?n.removeAttribute(i):n.setAttribute(i,a)});const r=o.style||{};return Object.keys(r).forEach(i=>{n.style[i]=r[i]}),n.width=n.width,delete n[vi],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const r=e.$proxies||(e.$proxies={}),a={attach:Bm,detach:Lm,resize:Hm}[n]||Fm;r[n]=a(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),r=o[n];if(!r)return;({attach:fa,detach:fa,resize:fa}[n]||Am)(e,n,r),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,r){return wh(e,n,o,r)}isAttached(e){const n=e&&Ka(e);return!!(n&&n.isConnected)}}function Vm(t){return!Ya()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?km:Om}var di;let $n=(di=class{constructor(){Oe(this,"x");Oe(this,"y");Oe(this,"active",!1);Oe(this,"options");Oe(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return ko(this.x)&&ko(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const r={};return e.forEach(i=>{r[i]=o[i]&&o[i].active()?o[i]._to:this[i]}),r}},Oe(di,"defaults",{}),Oe(di,"defaultRoutes"),di);function Pm(t,e){const n=t.options.ticks,o=Dm(t),r=Math.min(n.maxTicksLimit||o,o),i=n.major.enabled?Um(e):[],a=i.length,c=i[0],m=i[a-1],C=[];if(a>r)return Gm(e,C,i,a/r),C;const L=zm(i,e,r);if(a>0){let D,W;const K=a>1?Math.round((m-c)/(a-1)):null;for(ii(e,C,L,vt(K)?0:c-K,c),D=0,W=a-1;D<W;D++)ii(e,C,L,i[D],i[D+1]);return ii(e,C,L,m,vt(K)?e.length:m+K),C}return ii(e,C,L),C}function Dm(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(o,r))}function zm(t,e,n){const o=jm(t),r=e.length/n;if(!o)return Math.max(r,1);const i=wf(o);for(let a=0,c=i.length-1;a<c;a++){const m=i[a];if(m>r)return m}return Math.max(r,1)}function Um(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function Gm(t,e,n,o){let r=0,i=n[0],a;for(o=Math.ceil(o),a=0;a<t.length;a++)a===i&&(e.push(t[a]),r++,i=n[r*o])}function ii(t,e,n,o,r){const i=st(o,0),a=Math.min(st(r,t.length),t.length);let c=0,m,C,L;for(n=Math.ceil(n),r&&(m=r-o,n=m/Math.floor(m/n)),L=i;L<0;)c++,L=Math.round(i+c*n);for(C=Math.max(i,0);C<a;C++)C===L&&(e.push(t[C]),c++,L=Math.round(i+c*n))}function jm(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const Wm=t=>t==="left"?"right":t==="right"?"left":t,cs=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,ds=(t,e)=>Math.min(e||t,t);function us(t,e){const n=[],o=t.length/e,r=t.length;let i=0;for(;i<r;i+=o)n.push(t[Math.floor(i)]);return n}function qm(t,e,n){const o=t.ticks.length,r=Math.min(e,o-1),i=t._startPixel,a=t._endPixel,c=1e-6;let m=t.getPixelForTick(r),C;if(!(n&&(o===1?C=Math.max(m-i,a-m):e===0?C=(t.getPixelForTick(1)-m)/2:C=(m-t.getPixelForTick(r-1))/2,m+=r<e?C:-C,m<i-c||m>a+c)))return m}function $m(t,e){kt(t,n=>{const o=n.gc,r=o.length/2;let i;if(r>e){for(i=0;i<r;++i)delete n.data[o[i]];o.splice(0,r)}})}function qo(t){return t.drawTicks?t.tickLength:0}function fs(t,e){if(!t.display)return 0;const n=$t(t.font,e),o=Jt(t.padding);return(Ot(t.text)?t.text.length:1)*n.lineHeight+o.height}function Ym(t,e){return qn(t,{scale:e,type:"scale"})}function Km(t,e,n){return qn(t,{tick:n,index:e,type:"tick"})}function Xm(t,e,n){let o=Ec(t);return(n&&e!=="right"||!n&&e==="right")&&(o=Wm(o)),o}function Jm(t,e,n,o){const{top:r,left:i,bottom:a,right:c,chart:m}=t,{chartArea:C,scales:L}=m;let D=0,W,K,X;const ee=a-r,re=c-i;if(t.isHorizontal()){if(K=ln(o,i,c),yt(n)){const fe=Object.keys(n)[0],ye=n[fe];X=L[fe].getPixelForValue(ye)+ee-e}else n==="center"?X=(C.bottom+C.top)/2+ee-e:X=cs(t,n,e);W=c-i}else{if(yt(n)){const fe=Object.keys(n)[0],ye=n[fe];K=L[fe].getPixelForValue(ye)-re+e}else n==="center"?K=(C.left+C.right)/2-re+e:K=cs(t,n,e);X=ln(o,a,r),D=n==="left"?-Pt:Pt}return{titleX:K,titleY:X,maxWidth:W,rotation:D}}class Ao extends $n{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:r}=this;return e=_n(e,Number.POSITIVE_INFINITY),n=_n(n,Number.NEGATIVE_INFINITY),o=_n(o,Number.POSITIVE_INFINITY),r=_n(r,Number.NEGATIVE_INFINITY),{min:_n(e,o),max:_n(n,r),minDefined:qt(e),maxDefined:qt(n)}}getMinMax(e){let{min:n,max:o,minDefined:r,maxDefined:i}=this.getUserBounds(),a;if(r&&i)return{min:n,max:o};const c=this.getMatchingVisibleMetas();for(let m=0,C=c.length;m<C;++m)a=c[m].controller.getMinMax(this,e),r||(n=Math.min(n,a.min)),i||(o=Math.max(o,a.max));return n=i&&n>o?o:n,o=r&&n>o?n:o,{min:_n(n,_n(o,n)),max:_n(o,_n(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){wt(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:r,grace:i,ticks:a}=this.options,c=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ih(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const m=c<this.ticks.length;this._convertTicksToLabels(m?us(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Pm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),m&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){wt(this.options.afterUpdate,[this])}beforeSetDimensions(){wt(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(){wt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),wt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){wt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,r,i;for(o=0,r=e.length;o<r;o++)i=e[o],i.label=wt(n.callback,[i.value,o,e],this)}afterTickToLabelConversion(){wt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){wt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=ds(this.ticks.length,e.ticks.maxTicksLimit),r=n.minRotation||0,i=n.maxRotation;let a=r,c,m,C;if(!this._isVisible()||!n.display||r>=i||o<=1||!this.isHorizontal()){this.labelRotation=r;return}const L=this._getLabelSizes(),D=L.widest.width,W=L.highest.height,K=Kt(this.chart.width-D,0,this.maxWidth);c=e.offset?this.maxWidth/o:K/(o-1),D+6>c&&(c=K/(o-(e.offset?.5:1)),m=this.maxHeight-qo(e.grid)-n.padding-fs(e.title,this.chart.options.font),C=Math.sqrt(D*D+W*W),a=Pa(Math.min(Math.asin(Kt((L.highest.height+6)/c,-1,1)),Math.asin(Kt(m/C,-1,1))-Math.asin(Kt(W/C,-1,1)))),a=Math.max(r,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){wt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){wt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:r,grid:i}}=this,a=this._isVisible(),c=this.isHorizontal();if(a){const m=fs(r,n.options.font);if(c?(e.width=this.maxWidth,e.height=qo(i)+m):(e.height=this.maxHeight,e.width=qo(i)+m),o.display&&this.ticks.length){const{first:C,last:L,widest:D,highest:W}=this._getLabelSizes(),K=o.padding*2,X=Cn(this.labelRotation),ee=Math.cos(X),re=Math.sin(X);if(c){const fe=o.mirror?0:re*D.width+ee*W.height;e.height=Math.min(this.maxHeight,e.height+fe+K)}else{const fe=o.mirror?0:ee*D.width+re*W.height;e.width=Math.min(this.maxWidth,e.width+fe+K)}this._calculatePadding(C,L,re,ee)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,r){const{ticks:{align:i,padding:a},position:c}=this.options,m=this.labelRotation!==0,C=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const L=this.getPixelForTick(0)-this.left,D=this.right-this.getPixelForTick(this.ticks.length-1);let W=0,K=0;m?C?(W=r*e.width,K=o*n.height):(W=o*e.height,K=r*n.width):i==="start"?K=n.width:i==="end"?W=e.width:i!=="inner"&&(W=e.width/2,K=n.width/2),this.paddingLeft=Math.max((W-L+a)*this.width/(this.width-L),0),this.paddingRight=Math.max((K-D+a)*this.width/(this.width-D),0)}else{let L=n.height/2,D=e.height/2;i==="start"?(L=0,D=e.height):i==="end"&&(L=n.height,D=0),this.paddingTop=L+a,this.paddingBottom=D+a}}_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(){wt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)vt(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=us(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:r,_longestTextCache:i}=this,a=[],c=[],m=Math.floor(n/ds(n,o));let C=0,L=0,D,W,K,X,ee,re,fe,ye,xe,ke,ve;for(D=0;D<n;D+=m){if(X=e[D].label,ee=this._resolveTickFontOptions(D),r.font=re=ee.string,fe=i[re]=i[re]||{data:{},gc:[]},ye=ee.lineHeight,xe=ke=0,!vt(X)&&!Ot(X))xe=Ii(r,fe.data,fe.gc,xe,X),ke=ye;else if(Ot(X))for(W=0,K=X.length;W<K;++W)ve=X[W],!vt(ve)&&!Ot(ve)&&(xe=Ii(r,fe.data,fe.gc,xe,ve),ke+=ye);a.push(xe),c.push(ke),C=Math.max(xe,C),L=Math.max(ke,L)}$m(i,n);const Ee=a.indexOf(C),Me=c.indexOf(L),Ie=Te=>({width:a[Te]||0,height:c[Te]||0});return{first:Ie(0),last:Ie(n-1),widest:Ie(Ee),highest:Ie(Me),widths:a,heights:c}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Nf(this._alignToPixels?no(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=Km(this.getContext(),e,o))}return this.$context||(this.$context=Ym(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Cn(this.labelRotation),o=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),i=this._getLabelSizes(),a=e.autoSkipPadding||0,c=i?i.widest.width+a:0,m=i?i.highest.height+a:0;return this.isHorizontal()?m*o>c*r?c/o:m/r:m*r<c*o?m/o:c/r}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,r=this.options,{grid:i,position:a,border:c}=r,m=i.offset,C=this.isHorizontal(),D=this.ticks.length+(m?1:0),W=qo(i),K=[],X=c.setContext(this.getContext()),ee=X.display?X.width:0,re=ee/2,fe=function(ut){return no(o,ut,ee)};let ye,xe,ke,ve,Ee,Me,Ie,Te,We,nt,Pe,ot;if(a==="top")ye=fe(this.bottom),Me=this.bottom-W,Te=ye-re,nt=fe(e.top)+re,ot=e.bottom;else if(a==="bottom")ye=fe(this.top),nt=e.top,ot=fe(e.bottom)-re,Me=ye+re,Te=this.top+W;else if(a==="left")ye=fe(this.right),Ee=this.right-W,Ie=ye-re,We=fe(e.left)+re,Pe=e.right;else if(a==="right")ye=fe(this.left),We=e.left,Pe=fe(e.right)-re,Ee=ye+re,Ie=this.left+W;else if(n==="x"){if(a==="center")ye=fe((e.top+e.bottom)/2+.5);else if(yt(a)){const ut=Object.keys(a)[0],Ye=a[ut];ye=fe(this.chart.scales[ut].getPixelForValue(Ye))}nt=e.top,ot=e.bottom,Me=ye+re,Te=Me+W}else if(n==="y"){if(a==="center")ye=fe((e.left+e.right)/2);else if(yt(a)){const ut=Object.keys(a)[0],Ye=a[ut];ye=fe(this.chart.scales[ut].getPixelForValue(Ye))}Ee=ye-re,Ie=Ee-W,We=e.left,Pe=e.right}const mt=st(r.ticks.maxTicksLimit,D),Qe=Math.max(1,Math.ceil(D/mt));for(xe=0;xe<D;xe+=Qe){const ut=this.getContext(xe),Ye=i.setContext(ut),Je=c.setContext(ut),dt=Ye.lineWidth,Dt=Ye.color,Re=Je.dash||[],ft=Je.dashOffset,nn=Ye.tickWidth,Et=Ye.tickColor,_e=Ye.tickBorderDash||[],bt=Ye.tickBorderDashOffset;ke=qm(this,xe,m),ke!==void 0&&(ve=no(o,ke,dt),C?Ee=Ie=We=Pe=ve:Me=Te=nt=ot=ve,K.push({tx1:Ee,ty1:Me,tx2:Ie,ty2:Te,x1:We,y1:nt,x2:Pe,y2:ot,width:dt,color:Dt,borderDash:Re,borderDashOffset:ft,tickWidth:nn,tickColor:Et,tickBorderDash:_e,tickBorderDashOffset:bt}))}return this._ticksLength=D,this._borderValue=ye,K}_computeLabelItems(e){const n=this.axis,o=this.options,{position:r,ticks:i}=o,a=this.isHorizontal(),c=this.ticks,{align:m,crossAlign:C,padding:L,mirror:D}=i,W=qo(o.grid),K=W+L,X=D?-L:K,ee=-Cn(this.labelRotation),re=[];let fe,ye,xe,ke,ve,Ee,Me,Ie,Te,We,nt,Pe,ot="middle";if(r==="top")Ee=this.bottom-X,Me=this._getXAxisLabelAlignment();else if(r==="bottom")Ee=this.top+X,Me=this._getXAxisLabelAlignment();else if(r==="left"){const Qe=this._getYAxisLabelAlignment(W);Me=Qe.textAlign,ve=Qe.x}else if(r==="right"){const Qe=this._getYAxisLabelAlignment(W);Me=Qe.textAlign,ve=Qe.x}else if(n==="x"){if(r==="center")Ee=(e.top+e.bottom)/2+K;else if(yt(r)){const Qe=Object.keys(r)[0],ut=r[Qe];Ee=this.chart.scales[Qe].getPixelForValue(ut)+K}Me=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")ve=(e.left+e.right)/2-K;else if(yt(r)){const Qe=Object.keys(r)[0],ut=r[Qe];ve=this.chart.scales[Qe].getPixelForValue(ut)}Me=this._getYAxisLabelAlignment(W).textAlign}n==="y"&&(m==="start"?ot="top":m==="end"&&(ot="bottom"));const mt=this._getLabelSizes();for(fe=0,ye=c.length;fe<ye;++fe){xe=c[fe],ke=xe.label;const Qe=i.setContext(this.getContext(fe));Ie=this.getPixelForTick(fe)+i.labelOffset,Te=this._resolveTickFontOptions(fe),We=Te.lineHeight,nt=Ot(ke)?ke.length:1;const ut=nt/2,Ye=Qe.color,Je=Qe.textStrokeColor,dt=Qe.textStrokeWidth;let Dt=Me;a?(ve=Ie,Me==="inner"&&(fe===ye-1?Dt=this.options.reverse?"left":"right":fe===0?Dt=this.options.reverse?"right":"left":Dt="center"),r==="top"?C==="near"||ee!==0?Pe=-nt*We+We/2:C==="center"?Pe=-mt.highest.height/2-ut*We+We:Pe=-mt.highest.height+We/2:C==="near"||ee!==0?Pe=We/2:C==="center"?Pe=mt.highest.height/2-ut*We:Pe=mt.highest.height-nt*We,D&&(Pe*=-1),ee!==0&&!Qe.showLabelBackdrop&&(ve+=We/2*Math.sin(ee))):(Ee=Ie,Pe=(1-nt)*We/2);let Re;if(Qe.showLabelBackdrop){const ft=Jt(Qe.backdropPadding),nn=mt.heights[fe],Et=mt.widths[fe];let _e=Pe-ft.top,bt=0-ft.left;switch(ot){case"middle":_e-=nn/2;break;case"bottom":_e-=nn;break}switch(Me){case"center":bt-=Et/2;break;case"right":bt-=Et;break;case"inner":fe===ye-1?bt-=Et:fe>0&&(bt-=Et/2);break}Re={left:bt,top:_e,width:Et+ft.width,height:nn+ft.height,color:Qe.backdropColor}}re.push({label:ke,font:Te,textOffset:Pe,options:{rotation:ee,color:Ye,strokeColor:Je,strokeWidth:dt,textAlign:Dt,textBaseline:ot,translation:[ve,Ee],backdrop:Re}})}return re}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Cn(this.labelRotation))return e==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),c=e+i,m=a.widest.width;let C,L;return n==="left"?r?(L=this.right+i,o==="near"?C="left":o==="center"?(C="center",L+=m/2):(C="right",L+=m)):(L=this.right-c,o==="near"?C="right":o==="center"?(C="center",L-=m/2):(C="left",L=this.left)):n==="right"?r?(L=this.left+i,o==="near"?C="right":o==="center"?(C="center",L-=m/2):(C="left",L-=m)):(L=this.left+c,o==="near"?C="left":o==="center"?(C="center",L+=m/2):(C="right",L=this.right)):C="right",{textAlign:C,x:L}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:r,width:i,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,r,i,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(i=>i.value===e);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,a;const c=(m,C,L)=>{!L.width||!L.color||(o.save(),o.lineWidth=L.width,o.strokeStyle=L.color,o.setLineDash(L.borderDash||[]),o.lineDashOffset=L.borderDashOffset,o.beginPath(),o.moveTo(m.x,m.y),o.lineTo(C.x,C.y),o.stroke(),o.restore())};if(n.display)for(i=0,a=r.length;i<a;++i){const m=r[i];n.drawOnChartArea&&c({x:m.x1,y:m.y1},{x:m.x2,y:m.y2},m),n.drawTicks&&c({x:m.tx1,y:m.ty1},{x:m.tx2,y:m.ty2},{color:m.tickColor,width:m.tickWidth,borderDash:m.tickBorderDash,borderDashOffset:m.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:r}}=this,i=o.setContext(this.getContext()),a=o.display?i.width:0;if(!a)return;const c=r.setContext(this.getContext(0)).lineWidth,m=this._borderValue;let C,L,D,W;this.isHorizontal()?(C=no(e,this.left,a)-a/2,L=no(e,this.right,c)+c/2,D=W=m):(D=no(e,this.top,a)-a/2,W=no(e,this.bottom,c)+c/2,C=L=m),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(C,D),n.lineTo(L,W),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,r=this._computeLabelArea();r&&Ri(o,r);const i=this.getLabelItems(e);for(const a of i){const c=a.options,m=a.font,C=a.label,L=a.textOffset;Io(o,C,0,L,m,c)}r&&Hi(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:r}}=this;if(!o.display)return;const i=$t(o.font),a=Jt(o.padding),c=o.align;let m=i.lineHeight/2;n==="bottom"||n==="center"||yt(n)?(m+=a.bottom,Ot(o.text)&&(m+=i.lineHeight*(o.text.length-1))):m+=a.top;const{titleX:C,titleY:L,maxWidth:D,rotation:W}=Jm(this,m,n,c);Io(e,o.text,0,0,i,{color:o.color,maxWidth:D,rotation:W,textAlign:Xm(c,n,r),textBaseline:"middle",translation:[C,L]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=st(e.grid&&e.grid.z,-1),r=st(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Ao.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:o,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",r=[];let i,a;for(i=0,a=n.length;i<a;++i){const c=n[i];c[o]===this.id&&(!e||c.type===e)&&r.push(c)}return r}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return $t(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ai{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;eg(n)&&(o=this.register(n));const r=this.items,i=e.id,a=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in r||(r[i]=e,Zm(e,a,o),this.override&&Vt.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,r=this.scope;o in n&&delete n[o],r&&o in Vt[r]&&(delete Vt[r][o],this.override&&delete fo[o])}}function Zm(t,e,n){const o=rr(Object.create(null),[n?Vt.get(n):{},Vt.get(e),t.defaults]);Vt.set(e,o),t.defaultRoutes&&Qm(e,t.defaultRoutes),t.descriptors&&Vt.describe(e,t.descriptors)}function Qm(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),r=o.pop(),i=[t].concat(o).join("."),a=e[n].split("."),c=a.pop(),m=a.join(".");Vt.route(i,r,m,c)})}function eg(t){return"id"in t&&"defaults"in t}class tg{constructor(){this.controllers=new ai(xn,"datasets",!0),this.elements=new ai($n,"elements"),this.plugins=new ai(Object,"plugins"),this.scales=new ai(Ao,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(r=>{const i=o||this._getRegistryForType(r);o||i.isForType(r)||i===this.plugins&&r.id?this._exec(e,i,r):kt(r,a=>{const c=o||this._getRegistryForType(a);this._exec(e,c,a)})})}_exec(e,n,o){const r=Va(e);wt(o["before"+r],[],o),n[e](o),wt(o["after"+r],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const r=n.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return r}}var bn=new tg;class ng{constructor(){this._init=[]}notify(e,n,o,r){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const i=r?this._descriptors(e).filter(r):this._descriptors(e),a=this._notify(i,e,n,o);return n==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,n,o,r){r=r||{};for(const i of e){const a=i.plugin,c=a[o],m=[n,r,i.options];if(wt(c,m,a)===!1&&r.cancelable)return!1}return!0}invalidate(){vt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,r=st(o.options&&o.options.plugins,{}),i=og(o);return r===!1&&!n?[]:ig(e,i,r,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,r=(i,a)=>i.filter(c=>!a.some(m=>c.plugin.id===m.plugin.id));this._notify(r(n,o),e,"stop"),this._notify(r(o,n),e,"start")}}function og(t){const e={},n=[],o=Object.keys(bn.plugins.items);for(let i=0;i<o.length;i++)n.push(bn.getPlugin(o[i]));const r=t.plugins||[];for(let i=0;i<r.length;i++){const a=r[i];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function rg(t,e){return!e&&t===!1?null:t===!0?{}:t}function ig(t,{plugins:e,localIds:n},o,r){const i=[],a=t.getContext();for(const c of e){const m=c.id,C=rg(o[m],r);C!==null&&i.push({plugin:c,options:ag(t.config,{plugin:c,local:n[m]},C,a)})}return i}function ag(t,{plugin:e,local:n},o,r){const i=t.pluginScopeKeys(e),a=t.getOptionScopes(o,i);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ma(t,e){const n=Vt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function lg(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function sg(t,e){return t===e?"_index_":"_value_"}function hs(t){if(t==="x"||t==="y"||t==="r")return t}function cg(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function xa(t,...e){if(hs(t))return t;for(const n of e){const o=n.axis||cg(n.position)||t.length>1&&hs(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function ms(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function dg(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return ms(t,"x",n[0])||ms(t,"y",n[0])}return{}}function ug(t,e){const n=fo[t.type]||{scales:{}},o=e.scales||{},r=Ma(t.type,e),i=Object.create(null);return Object.keys(o).forEach(a=>{const c=o[a];if(!yt(c))return console.error(`Invalid scale configuration for scale: ${a}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const m=xa(a,c,dg(a,t),Vt.scales[c.type]),C=sg(m,r),L=n.scales||{};i[a]=Qo(Object.create(null),[{axis:m},c,L[m],L[C]])}),t.data.datasets.forEach(a=>{const c=a.type||t.type,m=a.indexAxis||Ma(c,e),L=(fo[c]||{}).scales||{};Object.keys(L).forEach(D=>{const W=lg(D,m),K=a[W+"AxisID"]||W;i[K]=i[K]||Object.create(null),Qo(i[K],[{axis:W},o[K],L[D]])})}),Object.keys(i).forEach(a=>{const c=i[a];Qo(c,[Vt.scales[c.type],Vt.scale])}),i}function Jc(t){const e=t.options||(t.options={});e.plugins=st(e.plugins,{}),e.scales=ug(t,e)}function Zc(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function fg(t){return t=t||{},t.data=Zc(t.data),Jc(t),t}const gs=new Map,Qc=new Set;function li(t,e){let n=gs.get(t);return n||(n=e(),gs.set(t,n),Qc.add(n)),n}const $o=(t,e,n)=>{const o=jn(e,n);o!==void 0&&t.add(o)};class hg{constructor(e){this._config=fg(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Zc(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Jc(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return li(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return li(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return li(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return li(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let r=o.get(e);return(!r||n)&&(r=new Map,o.set(e,r)),r}getOptionScopes(e,n,o){const{options:r,type:i}=this,a=this._cachedScopes(e,o),c=a.get(n);if(c)return c;const m=new Set;n.forEach(L=>{e&&(m.add(e),L.forEach(D=>$o(m,e,D))),L.forEach(D=>$o(m,r,D)),L.forEach(D=>$o(m,fo[i]||{},D)),L.forEach(D=>$o(m,Vt,D)),L.forEach(D=>$o(m,va,D))});const C=Array.from(m);return C.length===0&&C.push(Object.create(null)),Qc.has(n)&&a.set(n,C),C}chartOptionScopes(){const{options:e,type:n}=this;return[e,fo[n]||{},Vt.datasets[n]||{},{type:n},Vt,va]}resolveNamedOptions(e,n,o,r=[""]){const i={$shared:!0},{resolver:a,subPrefixes:c}=ys(this._resolverCache,e,r);let m=a;if(gg(a,n)){i.$shared=!1,o=Wn(o)?o():o;const C=this.createResolver(e,o,c);m=Eo(a,o,C)}for(const C of n)i[C]=m[C];return i}createResolver(e,n,o=[""],r){const{resolver:i}=ys(this._resolverCache,e,o);return yt(n)?Eo(i,n,void 0,r):i}}function ys(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const r=n.join();let i=o.get(r);return i||(i={resolver:Wa(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},o.set(r,i)),i}const mg=t=>yt(t)&&Object.getOwnPropertyNames(t).some(e=>Wn(t[e]));function gg(t,e){const{isScriptable:n,isIndexable:o}=Lc(t);for(const r of e){const i=n(r),a=o(r),c=(a||i)&&t[r];if(i&&(Wn(c)||mg(c))||a&&Ot(c))return!0}return!1}var yg="4.5.0";const pg=["top","bottom","left","right","chartArea"];function ps(t,e){return t==="top"||t==="bottom"||pg.indexOf(t)===-1&&e==="x"}function _s(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function vs(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),wt(n&&n.onComplete,[t],e)}function _g(t){const e=t.chart,n=e.options.animation;wt(n&&n.onProgress,[t],e)}function ed(t){return Ya()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const bi={},bs=t=>{const e=ed(t);return Object.values(bi).filter(n=>n.canvas===e).pop()};function vg(t,e,n){const o=Object.keys(t);for(const r of o){const i=+r;if(i>=e){const a=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=a)}}}function bg(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}class mn{static register(...e){bn.add(...e),Cs()}static unregister(...e){bn.remove(...e),Cs()}constructor(e,n){const o=this.config=new hg(n),r=ed(e),i=bs(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Vm(r)),this.platform.updateConfig(o);const c=this.platform.acquireContext(r,a.aspectRatio),m=c&&c.canvas,C=m&&m.height,L=m&&m.width;if(this.id=vf(),this.ctx=c,this.canvas=m,this.width=L,this.height=C,this._options=a,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 ng,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Of(D=>this.update(D),a.resizeDelay||0),this._dataChanges=[],bi[this.id]=this,!c||!m){console.error("Failed to create chart: can't acquire context from the given item");return}An.listen(this,"complete",vs),An.listen(this,"progress",_g),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:r,_aspectRatio:i}=this;return vt(e)?n&&i?i:r?o/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return bn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Gl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Dl(this.canvas,this.ctx),this}stop(){return An.stop(this),this}resize(e,n){An.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,r=this.canvas,i=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,n,i),c=o.devicePixelRatio||this.platform.getDevicePixelRatio(),m=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Gl(this,c,!0)&&(this.notifyPlugins("resize",{size:a}),wt(o.onResize,[this,a],this),this.attached&&this._doResize(m)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};kt(n,(o,r)=>{o.id=r})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,r=Object.keys(o).reduce((a,c)=>(a[c]=!1,a),{});let i=[];n&&(i=i.concat(Object.keys(n).map(a=>{const c=n[a],m=xa(a,c),C=m==="r",L=m==="x";return{options:c,dposition:C?"chartArea":L?"bottom":"left",dtype:C?"radialLinear":L?"category":"linear"}}))),kt(i,a=>{const c=a.options,m=c.id,C=xa(m,c),L=st(c.type,a.dtype);(c.position===void 0||ps(c.position,C)!==ps(a.dposition))&&(c.position=a.dposition),r[m]=!0;let D=null;if(m in o&&o[m].type===L)D=o[m];else{const W=bn.getScale(L);D=new W({id:m,type:L,ctx:this.ctx,chart:this}),o[D.id]=D}D.init(c,e)}),kt(r,(a,c)=>{a||delete o[c]}),kt(o,a=>{Dn.configure(this,a,a.options),Dn.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((r,i)=>r.index-i.index),o>n){for(let r=n;r<o;++r)this._destroyDatasetMeta(r);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(_s("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,r)=>{n.filter(i=>i===o._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,r;for(this._removeUnreferencedMetasets(),o=0,r=n.length;o<r;o++){const i=n[o];let a=this.getDatasetMeta(o);const c=i.type||this.config.type;if(a.type&&a.type!==c&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=c,a.indexAxis=i.indexAxis||Ma(c,this.options),a.order=i.order||0,a.index=o,a.label=""+i.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const m=bn.getController(c),{datasetElementType:C,dataElementType:L}=Vt.datasets[c];Object.assign(m,{dataElementType:bn.getElement(L),datasetElementType:C&&bn.getElement(C)}),a.controller=new m(this,o),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){kt(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let C=0,L=this.data.datasets.length;C<L;C++){const{controller:D}=this.getDatasetMeta(C),W=!r&&i.indexOf(D)===-1;D.buildOrUpdateElements(W),a=Math.max(+D.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),r||kt(i,C=>{C.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(_s("z","_idx"));const{_active:c,_lastEvent:m}=this;m?this._eventHandler(m,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){kt(this.scales,e=>{Dn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!Bl(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:r,count:i}of n){const a=o==="_removeElements"?-i:i;vg(e,r,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=i=>new Set(e.filter(a=>a[0]===i).map((a,c)=>c+","+a.splice(1).join(","))),r=o(0);for(let i=1;i<n;i++)if(!Bl(r,o(i)))return;return Array.from(r).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Dn.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],kt(this.boxes,r=>{o&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Wn(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),r={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(o.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(An.has(this)?this.attached&&!An.running(this)&&An.start(this):(this.draw(),vs({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(o,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let r,i;for(r=0,i=n.length;r<i;++r){const a=n[r];(!e||a.visible)&&o.push(a)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o={meta:e,index:e.index,cancelable:!0},r=Uc(this,e);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&Ri(n,r),e.controller.draw(),r&&Hi(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return Nn(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,r){const i=pm.modes[n];return typeof i=="function"?i(this,e,o,r):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let r=o.filter(i=>i&&i._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(r)),r}getContext(){return this.$context||(this.$context=qn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const r=o?"show":"hide",i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);ir(n)?(i.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),a.update(i,{visible:o}),this.update(c=>c.datasetIndex===e?r:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),An.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Dl(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete bi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(i,a)=>{n.addEventListener(this,i,a),e[i]=a},r=(i,a,c)=>{i.offsetX=a,i.offsetY=c,this._eventHandler(i)};kt(this.options.events,i=>o(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(m,C)=>{n.addEventListener(this,m,C),e[m]=C},r=(m,C)=>{e[m]&&(n.removeEventListener(this,m,C),delete e[m])},i=(m,C)=>{this.canvas&&this.resize(m,C)};let a;const c=()=>{r("attach",c),this.attached=!0,this.resize(),o("resize",i),o("detach",a)};a=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),o("attach",c)},n.isAttached(this.canvas)?c():a()}unbindEvents(){kt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},kt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const r=o?"set":"remove";let i,a,c,m;for(n==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),c=0,m=e.length;c<m;++c){a=e[c];const C=a&&this.getDatasetMeta(a.datasetIndex).controller;C&&C[r+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:i,index:a})=>{const c=this.getDatasetMeta(i);if(!c)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:c.data[a],index:a}});!xi(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const r=this.options.hover,i=(m,C)=>m.filter(L=>!C.some(D=>L.datasetIndex===D.datasetIndex&&L.index===D.index)),a=i(n,e),c=o?e:i(e,n);a.length&&this.updateHoverStyle(a,r.mode,!1),c.length&&r.mode&&this.updateHoverStyle(c,r.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},r=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,r)===!1)return;const i=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,r),(i||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:r=[],options:i}=this,a=n,c=this._getActiveElements(e,r,o,a),m=kf(e),C=bg(e,this._lastEvent,o,m);o&&(this._lastEvent=null,wt(i.onHover,[e,c,this],this),m&&wt(i.onClick,[e,c,this],this));const L=!xi(c,r);return(L||n)&&(this._active=c,this._updateHoverStyles(c,r,n)),this._lastEvent=C,L}_getActiveElements(e,n,o,r){if(e.type==="mouseout")return[];if(!o)return n;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}}Oe(mn,"defaults",Vt),Oe(mn,"instances",bi),Oe(mn,"overrides",fo),Oe(mn,"registry",bn),Oe(mn,"version",yg),Oe(mn,"getChart",bs);function Cs(){return kt(mn.instances,t=>t._plugins.invalidate())}function Cg(t,e,n){const{startAngle:o,x:r,y:i,outerRadius:a,innerRadius:c,options:m}=e,{borderWidth:C,borderJoinStyle:L}=m,D=Math.min(C/a,Yt(o-n));if(t.beginPath(),t.arc(r,i,a-C/2,o+D/2,n-D/2),c>0){const W=Math.min(C/c,Yt(o-n));t.arc(r,i,c+C/2,n-W/2,o+W/2,!0)}else{const W=Math.min(C/2,a*Yt(o-n));if(L==="round")t.arc(r,i,W,n-It/2,o+It/2,!0);else if(L==="bevel"){const K=2*W*W,X=-K*Math.cos(n+It/2)+r,ee=-K*Math.sin(n+It/2)+i,re=K*Math.cos(o+It/2)+r,fe=K*Math.sin(o+It/2)+i;t.lineTo(X,ee),t.lineTo(re,fe)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function Mg(t,e,n){const{startAngle:o,pixelMargin:r,x:i,y:a,outerRadius:c,innerRadius:m}=e;let C=r/c;t.beginPath(),t.arc(i,a,c,o-C,n+C),m>r?(C=r/m,t.arc(i,a,m,n+C,o-C,!0)):t.arc(i,a,r,n+Pt,o-Pt),t.closePath(),t.clip()}function xg(t){return ja(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Sg(t,e,n,o){const r=xg(t.options.borderRadius),i=(n-e)/2,a=Math.min(i,o*e/2),c=m=>{const C=(n-Math.min(i,m))*o/2;return Kt(m,0,Math.min(i,C))};return{outerStart:c(r.outerStart),outerEnd:c(r.outerEnd),innerStart:Kt(r.innerStart,0,a),innerEnd:Kt(r.innerEnd,0,a)}}function Co(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Ai(t,e,n,o,r,i){const{x:a,y:c,startAngle:m,pixelMargin:C,innerRadius:L}=e,D=Math.max(e.outerRadius+o+n-C,0),W=L>0?L+o+n+C:0;let K=0;const X=r-m;if(o){const Qe=L>0?L-o:0,ut=D>0?D-o:0,Ye=(Qe+ut)/2,Je=Ye!==0?X*Ye/(Ye+o):X;K=(X-Je)/2}const ee=Math.max(.001,X*D-n/It)/D,re=(X-ee)/2,fe=m+re+K,ye=r-re-K,{outerStart:xe,outerEnd:ke,innerStart:ve,innerEnd:Ee}=Sg(e,W,D,ye-fe),Me=D-xe,Ie=D-ke,Te=fe+xe/Me,We=ye-ke/Ie,nt=W+ve,Pe=W+Ee,ot=fe+ve/nt,mt=ye-Ee/Pe;if(t.beginPath(),i){const Qe=(Te+We)/2;if(t.arc(a,c,D,Te,Qe),t.arc(a,c,D,Qe,We),ke>0){const dt=Co(Ie,We,a,c);t.arc(dt.x,dt.y,ke,We,ye+Pt)}const ut=Co(Pe,ye,a,c);if(t.lineTo(ut.x,ut.y),Ee>0){const dt=Co(Pe,mt,a,c);t.arc(dt.x,dt.y,Ee,ye+Pt,mt+Math.PI)}const Ye=(ye-Ee/W+(fe+ve/W))/2;if(t.arc(a,c,W,ye-Ee/W,Ye,!0),t.arc(a,c,W,Ye,fe+ve/W,!0),ve>0){const dt=Co(nt,ot,a,c);t.arc(dt.x,dt.y,ve,ot+Math.PI,fe-Pt)}const Je=Co(Me,fe,a,c);if(t.lineTo(Je.x,Je.y),xe>0){const dt=Co(Me,Te,a,c);t.arc(dt.x,dt.y,xe,fe-Pt,Te)}}else{t.moveTo(a,c);const Qe=Math.cos(Te)*D+a,ut=Math.sin(Te)*D+c;t.lineTo(Qe,ut);const Ye=Math.cos(We)*D+a,Je=Math.sin(We)*D+c;t.lineTo(Ye,Je)}t.closePath()}function kg(t,e,n,o,r){const{fullCircles:i,startAngle:a,circumference:c}=e;let m=e.endAngle;if(i){Ai(t,e,n,o,m,r);for(let C=0;C<i;++C)t.fill();isNaN(c)||(m=a+(c%Tt||Tt))}return Ai(t,e,n,o,m,r),t.fill(),m}function Ig(t,e,n,o,r){const{fullCircles:i,startAngle:a,circumference:c,options:m}=e,{borderWidth:C,borderJoinStyle:L,borderDash:D,borderDashOffset:W,borderRadius:K}=m,X=m.borderAlign==="inner";if(!C)return;t.setLineDash(D||[]),t.lineDashOffset=W,X?(t.lineWidth=C*2,t.lineJoin=L||"round"):(t.lineWidth=C,t.lineJoin=L||"bevel");let ee=e.endAngle;if(i){Ai(t,e,n,o,ee,r);for(let re=0;re<i;++re)t.stroke();isNaN(c)||(ee=a+(c%Tt||Tt))}X&&Mg(t,e,ee),m.selfJoin&&ee-a>=It&&K===0&&L!=="miter"&&Cg(t,e,ee),i||(Ai(t,e,n,o,ee,r),t.stroke())}class Xo extends $n{constructor(n){super();Oe(this,"circumference");Oe(this,"endAngle");Oe(this,"fullCircles");Oe(this,"innerRadius");Oe(this,"outerRadius");Oe(this,"pixelMargin");Oe(this,"startAngle");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,n&&Object.assign(this,n)}inRange(n,o,r){const i=this.getProps(["x","y"],r),{angle:a,distance:c}=Mc(i,{x:n,y:o}),{startAngle:m,endAngle:C,innerRadius:L,outerRadius:D,circumference:W}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),K=(this.options.spacing+this.options.borderWidth)/2,X=st(W,C-m),ee=ar(a,m,C)&&m!==C,re=X>=Tt||ee,fe=Ln(c,L+K,D+K);return re&&fe}getCenterPoint(n){const{x:o,y:r,startAngle:i,endAngle:a,innerRadius:c,outerRadius:m}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:C,spacing:L}=this.options,D=(i+a)/2,W=(c+m+L+C)/2;return{x:o+Math.cos(D)*W,y:r+Math.sin(D)*W}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:r}=this,i=(o.offset||0)/4,a=(o.spacing||0)/2,c=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=r>Tt?Math.floor(r/Tt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const m=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(m)*i,Math.sin(m)*i);const C=1-Math.sin(Math.min(It,r||0)),L=i*C;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,kg(n,this,L,a,c),Ig(n,this,L,a,c),n.restore()}}Oe(Xo,"id","arc"),Oe(Xo,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),Oe(Xo,"defaultRoutes",{backgroundColor:"backgroundColor"}),Oe(Xo,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function td(t,e,n=e){t.lineCap=st(n.borderCapStyle,e.borderCapStyle),t.setLineDash(st(n.borderDash,e.borderDash)),t.lineDashOffset=st(n.borderDashOffset,e.borderDashOffset),t.lineJoin=st(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=st(n.borderWidth,e.borderWidth),t.strokeStyle=st(n.borderColor,e.borderColor)}function Eg(t,e,n){t.lineTo(n.x,n.y)}function wg(t){return t.stepped?Xf:t.tension||t.cubicInterpolationMode==="monotone"?Jf:Eg}function nd(t,e,n={}){const o=t.length,{start:r=0,end:i=o-1}=n,{start:a,end:c}=e,m=Math.max(r,a),C=Math.min(i,c),L=r<a&&i<a||r>c&&i>c;return{count:o,start:m,loop:e.loop,ilen:C<m&&!L?o+C-m:C-m}}function Ag(t,e,n,o){const{points:r,options:i}=e,{count:a,start:c,loop:m,ilen:C}=nd(r,n,o),L=wg(i);let{move:D=!0,reverse:W}=o||{},K,X,ee;for(K=0;K<=C;++K)X=r[(c+(W?C-K:K))%a],!X.skip&&(D?(t.moveTo(X.x,X.y),D=!1):L(t,ee,X,W,i.stepped),ee=X);return m&&(X=r[(c+(W?C:0))%a],L(t,ee,X,W,i.stepped)),!!m}function Tg(t,e,n,o){const r=e.points,{count:i,start:a,ilen:c}=nd(r,n,o),{move:m=!0,reverse:C}=o||{};let L=0,D=0,W,K,X,ee,re,fe;const ye=ke=>(a+(C?c-ke:ke))%i,xe=()=>{ee!==re&&(t.lineTo(L,re),t.lineTo(L,ee),t.lineTo(L,fe))};for(m&&(K=r[ye(0)],t.moveTo(K.x,K.y)),W=0;W<=c;++W){if(K=r[ye(W)],K.skip)continue;const ke=K.x,ve=K.y,Ee=ke|0;Ee===X?(ve<ee?ee=ve:ve>re&&(re=ve),L=(D*L+ke)/++D):(xe(),t.lineTo(ke,ve),X=Ee,D=0,ee=re=ve),fe=ve}xe()}function Sa(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Tg:Ag}function Bg(t){return t.stepped?Th:t.tension||t.cubicInterpolationMode==="monotone"?Bh:io}function Lg(t,e,n,o){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,o)&&r.closePath()),td(t,e.options),t.stroke(r)}function Ng(t,e,n,o){const{segments:r,options:i}=e,a=Sa(e);for(const c of r)td(t,i,c.style),t.beginPath(),a(t,e,c,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const Rg=typeof Path2D=="function";function Hg(t,e,n,o){Rg&&!e.options.segment?Lg(t,e,n,o):Ng(t,e,n,o)}class zn extends $n{constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const r=o.spanGaps?this._loop:this._fullLoop;Mh(this._points,o,e,r,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Oh(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,r=e[n],i=this.points,a=zc(this,{property:n,start:r,end:r});if(!a.length)return;const c=[],m=Bg(o);let C,L;for(C=0,L=a.length;C<L;++C){const{start:D,end:W}=a[C],K=i[D],X=i[W];if(K===X){c.push(K);continue}const ee=Math.abs((r-K[n])/(X[n]-K[n])),re=m(K,X,ee,o.stepped);re[n]=e[n],c.push(re)}return c.length===1?c[0]:c}pathSegment(e,n,o){return Sa(this)(e,this,n,o)}path(e,n,o){const r=this.segments,i=Sa(this);let a=this._loop;n=n||0,o=o||this.points.length-n;for(const c of r)a&=i(e,this,c,{start:n,end:n+o-1});return!!a}draw(e,n,o,r){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),Hg(e,this,o,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Oe(zn,"id","line"),Oe(zn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Oe(zn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Oe(zn,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Ms(t,e,n,o){const r=t.options,{[n]:i}=t.getProps([n],o);return Math.abs(e-i)<r.radius+r.hitRadius}class Ci extends $n{constructor(n){super();Oe(this,"parsed");Oe(this,"skip");Oe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,r){const i=this.options,{x:a,y:c}=this.getProps(["x","y"],r);return Math.pow(n-a,2)+Math.pow(o-c,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(n,o){return Ms(this,n,"x",o)}inYRange(n,o){return Ms(this,n,"y",o)}getCenterPoint(n){const{x:o,y:r}=this.getProps(["x","y"],n);return{x:o,y:r}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const r=o&&n.borderWidth||0;return(o+r)*2}draw(n,o){const r=this.options;this.skip||r.radius<.1||!Nn(this,o,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,ba(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Oe(Ci,"id","point"),Oe(Ci,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Oe(Ci,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function od(t,e){const{x:n,y:o,base:r,width:i,height:a}=t.getProps(["x","y","base","width","height"],e);let c,m,C,L,D;return t.horizontal?(D=a/2,c=Math.min(n,r),m=Math.max(n,r),C=o-D,L=o+D):(D=i/2,c=n-D,m=n+D,C=Math.min(o,r),L=Math.max(o,r)),{left:c,top:C,right:m,bottom:L}}function Un(t,e,n,o){return t?0:Kt(e,n,o)}function Fg(t,e,n){const o=t.options.borderWidth,r=t.borderSkipped,i=Bc(o);return{t:Un(r.top,i.top,0,n),r:Un(r.right,i.right,0,e),b:Un(r.bottom,i.bottom,0,n),l:Un(r.left,i.left,0,e)}}function Og(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,i=co(r),a=Math.min(e,n),c=t.borderSkipped,m=o||yt(r);return{topLeft:Un(!m||c.top||c.left,i.topLeft,0,a),topRight:Un(!m||c.top||c.right,i.topRight,0,a),bottomLeft:Un(!m||c.bottom||c.left,i.bottomLeft,0,a),bottomRight:Un(!m||c.bottom||c.right,i.bottomRight,0,a)}}function Vg(t){const e=od(t),n=e.right-e.left,o=e.bottom-e.top,r=Fg(t,n/2,o/2),i=Og(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:i},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:o-r.t-r.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,i.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(r.b,r.r))}}}}function ha(t,e,n,o){const r=e===null,i=n===null,c=t&&!(r&&i)&&od(t,o);return c&&(r||Ln(e,c.left,c.right))&&(i||Ln(n,c.top,c.bottom))}function Pg(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Dg(t,e){t.rect(e.x,e.y,e.w,e.h)}function ma(t,e,n={}){const o=t.x!==n.x?-e:0,r=t.y!==n.y?-e:0,i=(t.x+t.w!==n.x+n.w?e:0)-o,a=(t.y+t.h!==n.y+n.h?e:0)-r;return{x:t.x+o,y:t.y+r,w:t.w+i,h:t.h+a,radius:t.radius}}class Mi extends $n{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:r}}=this,{inner:i,outer:a}=Vg(this),c=Pg(a.radius)?lr:Dg;e.save(),(a.w!==i.w||a.h!==i.h)&&(e.beginPath(),c(e,ma(a,n,i)),e.clip(),c(e,ma(i,-n,a)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),c(e,ma(i,n)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,n,o){return ha(this,e,n,o)}inXRange(e,n){return ha(this,e,null,n)}inYRange(e,n){return ha(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:r,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{x:i?(n+r)/2:n,y:i?o:(o+r)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}Oe(Mi,"id","bar"),Oe(Mi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Oe(Mi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function zg(t,e,n){const o=t.segments,r=t.points,i=e.points,a=[];for(const c of o){let{start:m,end:C}=c;C=Vi(m,C,r);const L=ka(n,r[m],r[C],c.loop);if(!e.segments){a.push({source:c,target:L,start:r[m],end:r[C]});continue}const D=zc(e,L);for(const W of D){const K=ka(n,i[W.start],i[W.end],W.loop),X=Dc(c,r,K);for(const ee of X)a.push({source:ee,target:W,start:{[n]:xs(L,K,"start",Math.max)},end:{[n]:xs(L,K,"end",Math.min)}})}}return a}function ka(t,e,n,o){if(o)return;let r=e[t],i=n[t];return t==="angle"&&(r=Yt(r),i=Yt(i)),{property:t,start:r,end:i}}function Ug(t,e){const{x:n=null,y:o=null}=t||{},r=e.points,i=[];return e.segments.forEach(({start:a,end:c})=>{c=Vi(a,c,r);const m=r[a],C=r[c];o!==null?(i.push({x:m.x,y:o}),i.push({x:C.x,y:o})):n!==null&&(i.push({x:n,y:m.y}),i.push({x:n,y:C.y}))}),i}function Vi(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function xs(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function rd(t,e){let n=[],o=!1;return Ot(t)?(o=!0,n=t):n=Ug(t,e),n.length?new zn({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Ss(t){return t&&t.fill!==!1}function Gg(t,e,n){let r=t[e].fill;const i=[e];let a;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!qt(r))return r;if(a=t[r],!a)return!1;if(a.visible)return r;i.push(r),r=a.fill}return!1}function jg(t,e,n){const o=Yg(t);if(yt(o))return isNaN(o.value)?!1:o;let r=parseFloat(o);return qt(r)&&Math.floor(r)===r?Wg(o[0],e,r,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Wg(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function qg(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:yt(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function $g(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:yt(t)?o=t.value:o=e.getBaseValue(),o}function Yg(t){const e=t.options,n=e.fill;let o=st(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function Kg(t){const{scale:e,index:n,line:o}=t,r=[],i=o.segments,a=o.points,c=Xg(e,n);c.push(rd({x:null,y:e.bottom},o));for(let m=0;m<i.length;m++){const C=i[m];for(let L=C.start;L<=C.end;L++)Jg(r,a[L],c)}return new zn({points:r,options:{}})}function Xg(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let r=0;r<o.length;r++){const i=o[r];if(i.index===e)break;i.hidden||n.unshift(i.dataset)}return n}function Jg(t,e,n){const o=[];for(let r=0;r<n.length;r++){const i=n[r],{first:a,last:c,point:m}=Zg(i,e,"x");if(!(!m||a&&c)){if(a)o.unshift(m);else if(t.push(m),!c)break}}t.push(...o)}function Zg(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const r=o[n],i=t.segments,a=t.points;let c=!1,m=!1;for(let C=0;C<i.length;C++){const L=i[C],D=a[L.start][n],W=a[L.end][n];if(Ln(r,D,W)){c=r===D,m=r===W;break}}return{first:c,last:m,point:o}}class id{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:r,y:i,radius:a}=this;return n=n||{start:0,end:Tt},e.arc(r,i,a,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:r}=this,i=e.angle;return{x:n+Math.cos(i)*r,y:o+Math.sin(i)*r,angle:i}}}function Qg(t){const{chart:e,fill:n,line:o}=t;if(qt(n))return ey(e,n);if(n==="stack")return Kg(t);if(n==="shape")return!0;const r=ty(t);return r instanceof id?r:rd(r,o)}function ey(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function ty(t){return(t.scale||{}).getPointPositionForValue?oy(t):ny(t)}function ny(t){const{scale:e={},fill:n}=t,o=qg(n,e);if(qt(o)){const r=e.isHorizontal();return{x:r?o:null,y:r?null:o}}return null}function oy(t){const{scale:e,fill:n}=t,o=e.options,r=e.getLabels().length,i=o.reverse?e.max:e.min,a=$g(n,e,i),c=[];if(o.grid.circular){const m=e.getPointPositionForValue(0,i);return new id({x:m.x,y:m.y,radius:e.getDistanceFromCenterForValue(a)})}for(let m=0;m<r;++m)c.push(e.getPointPositionForValue(m,a));return c}function ga(t,e,n){const o=Qg(e),{chart:r,index:i,line:a,scale:c,axis:m}=e,C=a.options,L=C.fill,D=C.backgroundColor,{above:W=D,below:K=D}=L||{},X=r.getDatasetMeta(i),ee=Uc(r,X);o&&a.points.length&&(Ri(t,n),ry(t,{line:a,target:o,above:W,below:K,area:n,scale:c,axis:m,clip:ee}),Hi(t))}function ry(t,e){const{line:n,target:o,above:r,below:i,area:a,scale:c,clip:m}=e,C=n._loop?"angle":e.axis;t.save();let L=i;i!==r&&(C==="x"?(ks(t,o,a.top),ya(t,{line:n,target:o,color:r,scale:c,property:C,clip:m}),t.restore(),t.save(),ks(t,o,a.bottom)):C==="y"&&(Is(t,o,a.left),ya(t,{line:n,target:o,color:i,scale:c,property:C,clip:m}),t.restore(),t.save(),Is(t,o,a.right),L=r)),ya(t,{line:n,target:o,color:L,scale:c,property:C,clip:m}),t.restore()}function ks(t,e,n){const{segments:o,points:r}=e;let i=!0,a=!1;t.beginPath();for(const c of o){const{start:m,end:C}=c,L=r[m],D=r[Vi(m,C,r)];i?(t.moveTo(L.x,L.y),i=!1):(t.lineTo(L.x,n),t.lineTo(L.x,L.y)),a=!!e.pathSegment(t,c,{move:a}),a?t.closePath():t.lineTo(D.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Is(t,e,n){const{segments:o,points:r}=e;let i=!0,a=!1;t.beginPath();for(const c of o){const{start:m,end:C}=c,L=r[m],D=r[Vi(m,C,r)];i?(t.moveTo(L.x,L.y),i=!1):(t.lineTo(n,L.y),t.lineTo(L.x,L.y)),a=!!e.pathSegment(t,c,{move:a}),a?t.closePath():t.lineTo(n,D.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function ya(t,e){const{line:n,target:o,property:r,color:i,scale:a,clip:c}=e,m=zg(n,o,r);for(const{source:C,target:L,start:D,end:W}of m){const{style:{backgroundColor:K=i}={}}=C,X=o!==!0;t.save(),t.fillStyle=K,iy(t,a,c,X&&ka(r,D,W)),t.beginPath();const ee=!!n.pathSegment(t,C);let re;if(X){ee?t.closePath():Es(t,o,W,r);const fe=!!o.pathSegment(t,L,{move:ee,reverse:!0});re=ee&&fe,re||Es(t,o,D,r)}t.closePath(),t.fill(re?"evenodd":"nonzero"),t.restore()}}function iy(t,e,n,o){const r=e.chart.chartArea,{property:i,start:a,end:c}=o||{};if(i==="x"||i==="y"){let m,C,L,D;i==="x"?(m=a,C=r.top,L=c,D=r.bottom):(m=r.left,C=a,L=r.right,D=c),t.beginPath(),n&&(m=Math.max(m,n.left),L=Math.min(L,n.right),C=Math.max(C,n.top),D=Math.min(D,n.bottom)),t.rect(m,C,L-m,D-C),t.clip()}}function Es(t,e,n,o){const r=e.interpolate(n,o);r&&t.lineTo(r.x,r.y)}var ay={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,r=[];let i,a,c,m;for(a=0;a<o;++a)i=t.getDatasetMeta(a),c=i.dataset,m=null,c&&c.options&&c instanceof zn&&(m={visible:t.isDatasetVisible(a),index:a,fill:jg(c,a,o),chart:t,axis:i.controller.options.indexAxis,scale:i.vScale,line:c}),i.$filler=m,r.push(m);for(a=0;a<o;++a)m=r[a],!(!m||m.fill===!1)&&(m.fill=Gg(r,a,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",r=t.getSortedVisibleDatasetMetas(),i=t.chartArea;for(let a=r.length-1;a>=0;--a){const c=r[a].$filler;c&&(c.line.updateControlPoints(i,c.axis),o&&c.fill&&ga(t.ctx,c,i))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let r=o.length-1;r>=0;--r){const i=o[r].$filler;Ss(i)&&ga(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!Ss(o)||n.drawTime!=="beforeDatasetDraw"||ga(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ws=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},ly=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class As extends $n{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,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 e=this.options.labels||{};let n=wt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,r)=>e.sort(o,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,r=$t(o.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:c,itemHeight:m}=ws(o,i);let C,L;n.font=r.string,this.isHorizontal()?(C=this.maxWidth,L=this._fitRows(a,i,c,m)+10):(L=this.maxHeight,C=this._fitCols(a,r,c,m)+10),this.width=Math.min(C,e.maxWidth||this.maxWidth),this.height=Math.min(L,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,r){const{ctx:i,maxWidth:a,options:{labels:{padding:c}}}=this,m=this.legendHitBoxes=[],C=this.lineWidths=[0],L=r+c;let D=e;i.textAlign="left",i.textBaseline="middle";let W=-1,K=-L;return this.legendItems.forEach((X,ee)=>{const re=o+n/2+i.measureText(X.text).width;(ee===0||C[C.length-1]+re+2*c>a)&&(D+=L,C[C.length-(ee>0?0:1)]=0,K+=L,W++),m[ee]={left:0,top:K,row:W,width:re,height:r},C[C.length-1]+=re+c}),D}_fitCols(e,n,o,r){const{ctx:i,maxHeight:a,options:{labels:{padding:c}}}=this,m=this.legendHitBoxes=[],C=this.columnSizes=[],L=a-e;let D=c,W=0,K=0,X=0,ee=0;return this.legendItems.forEach((re,fe)=>{const{itemWidth:ye,itemHeight:xe}=sy(o,n,i,re,r);fe>0&&K+xe+2*c>L&&(D+=W+c,C.push({width:W,height:K}),X+=W+c,ee++,W=K=0),m[fe]={left:X,top:K,col:ee,width:ye,height:xe},W=Math.max(W,ye),K+=xe+c}),D+=W,C.push({width:W,height:K}),D}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:r},rtl:i}}=this,a=xo(i,this.left,this.width);if(this.isHorizontal()){let c=0,m=ln(o,this.left+r,this.right-this.lineWidths[c]);for(const C of n)c!==C.row&&(c=C.row,m=ln(o,this.left+r,this.right-this.lineWidths[c])),C.top+=this.top+e+r,C.left=a.leftForLtr(a.x(m),C.width),m+=C.width+r}else{let c=0,m=ln(o,this.top+e+r,this.bottom-this.columnSizes[c].height);for(const C of n)C.col!==c&&(c=C.col,m=ln(o,this.top+e+r,this.bottom-this.columnSizes[c].height)),C.top=m,C.left+=this.left+r,C.left=a.leftForLtr(a.x(C.left),C.width),m+=C.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Ri(e,this),this._draw(),Hi(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:r}=this,{align:i,labels:a}=e,c=Vt.color,m=xo(e.rtl,this.left,this.width),C=$t(a.font),{padding:L}=a,D=C.size,W=D/2;let K;this.drawTitle(),r.textAlign=m.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=C.string;const{boxWidth:X,boxHeight:ee,itemHeight:re}=ws(a,D),fe=function(Ee,Me,Ie){if(isNaN(X)||X<=0||isNaN(ee)||ee<0)return;r.save();const Te=st(Ie.lineWidth,1);if(r.fillStyle=st(Ie.fillStyle,c),r.lineCap=st(Ie.lineCap,"butt"),r.lineDashOffset=st(Ie.lineDashOffset,0),r.lineJoin=st(Ie.lineJoin,"miter"),r.lineWidth=Te,r.strokeStyle=st(Ie.strokeStyle,c),r.setLineDash(st(Ie.lineDash,[])),a.usePointStyle){const We={radius:ee*Math.SQRT2/2,pointStyle:Ie.pointStyle,rotation:Ie.rotation,borderWidth:Te},nt=m.xPlus(Ee,X/2),Pe=Me+W;Tc(r,We,nt,Pe,a.pointStyleWidth&&X)}else{const We=Me+Math.max((D-ee)/2,0),nt=m.leftForLtr(Ee,X),Pe=co(Ie.borderRadius);r.beginPath(),Object.values(Pe).some(ot=>ot!==0)?lr(r,{x:nt,y:We,w:X,h:ee,radius:Pe}):r.rect(nt,We,X,ee),r.fill(),Te!==0&&r.stroke()}r.restore()},ye=function(Ee,Me,Ie){Io(r,Ie.text,Ee,Me+re/2,C,{strikethrough:Ie.hidden,textAlign:m.textAlign(Ie.textAlign)})},xe=this.isHorizontal(),ke=this._computeTitleHeight();xe?K={x:ln(i,this.left+L,this.right-o[0]),y:this.top+L+ke,line:0}:K={x:this.left+L,y:ln(i,this.top+ke+L,this.bottom-n[0].height),line:0},Oc(this.ctx,e.textDirection);const ve=re+L;this.legendItems.forEach((Ee,Me)=>{r.strokeStyle=Ee.fontColor,r.fillStyle=Ee.fontColor;const Ie=r.measureText(Ee.text).width,Te=m.textAlign(Ee.textAlign||(Ee.textAlign=a.textAlign)),We=X+W+Ie;let nt=K.x,Pe=K.y;m.setWidth(this.width),xe?Me>0&&nt+We+L>this.right&&(Pe=K.y+=ve,K.line++,nt=K.x=ln(i,this.left+L,this.right-o[K.line])):Me>0&&Pe+ve>this.bottom&&(nt=K.x=nt+n[K.line].width+L,K.line++,Pe=K.y=ln(i,this.top+ke+L,this.bottom-n[K.line].height));const ot=m.x(nt);if(fe(ot,Pe,Ee),nt=Vf(Te,nt+X+W,xe?nt+We:this.right,e.rtl),ye(m.x(nt),Pe,Ee),xe)K.x+=We+L;else if(typeof Ee.text!="string"){const mt=C.lineHeight;K.y+=ad(Ee,mt)+L}else K.y+=ve}),Vc(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=$t(n.font),r=Jt(n.padding);if(!n.display)return;const i=xo(e.rtl,this.left,this.width),a=this.ctx,c=n.position,m=o.size/2,C=r.top+m;let L,D=this.left,W=this.width;if(this.isHorizontal())W=Math.max(...this.lineWidths),L=this.top+C,D=ln(e.align,D,this.right-W);else{const X=this.columnSizes.reduce((ee,re)=>Math.max(ee,re.height),0);L=C+ln(e.align,this.top,this.bottom-X-e.labels.padding-this._computeTitleHeight())}const K=ln(c,D,D+W);a.textAlign=i.textAlign(Ec(c)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=o.string,Io(a,n.text,K,L,o)}_computeTitleHeight(){const e=this.options.title,n=$t(e.font),o=Jt(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,r,i;if(Ln(e,this.left,this.right)&&Ln(n,this.top,this.bottom)){for(i=this.legendHitBoxes,o=0;o<i.length;++o)if(r=i[o],Ln(e,r.left,r.left+r.width)&&Ln(n,r.top,r.top+r.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!uy(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const r=this._hoveredItem,i=ly(r,o);r&&!i&&wt(n.onLeave,[e,r,this],this),this._hoveredItem=o,o&&!i&&wt(n.onHover,[e,o,this],this)}else o&&wt(n.onClick,[e,o,this],this)}}function sy(t,e,n,o,r){const i=cy(o,t,e,n),a=dy(r,o,e.lineHeight);return{itemWidth:i,itemHeight:a}}function cy(t,e,n,o){let r=t.text;return r&&typeof r!="string"&&(r=r.reduce((i,a)=>i.length>a.length?i:a)),e+n.size/2+o.measureText(r).width}function dy(t,e,n){let o=t;return typeof e.text!="string"&&(o=ad(e,n)),o}function ad(t,e){const n=t.text?t.text.length:0;return e*n}function uy(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var fy={id:"legend",_element:As,start(t,e,n){const o=t.legend=new As({ctx:t.ctx,options:n,chart:t});Dn.configure(t,o,n),Dn.addBox(t,o)},stop(t){Dn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;Dn.configure(t,o,n),o.options=n},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,n){const o=e.datasetIndex,r=n.chart;r.isDatasetVisible(o)?(r.hide(o),e.hidden=!0):(r.show(o),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:n,pointStyle:o,textAlign:r,color:i,useBorderRadius:a,borderRadius:c}}=t.legend.options;return t._getSortedDatasetMetas().map(m=>{const C=m.controller.getStyle(n?0:void 0),L=Jt(C.borderWidth);return{text:e[m.index].label,fillStyle:C.backgroundColor,fontColor:i,hidden:!m.visible,lineCap:C.borderCapStyle,lineDash:C.borderDash,lineDashOffset:C.borderDashOffset,lineJoin:C.borderJoinStyle,lineWidth:(L.width+L.height)/4,strokeStyle:C.borderColor,pointStyle:o||C.pointStyle,rotation:C.rotation,textAlign:r||C.textAlign,borderRadius:a&&(c||C.borderRadius),datasetIndex:m.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)}}};const Jo={average(t){if(!t.length)return!1;let e,n,o=new Set,r=0,i=0;for(e=0,n=t.length;e<n;++e){const c=t[e].element;if(c&&c.hasValue()){const m=c.tooltipPosition();o.add(m.x),r+=m.y,++i}}return i===0||o.size===0?!1:{x:[...o].reduce((c,m)=>c+m)/o.size,y:r/i}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,r=Number.POSITIVE_INFINITY,i,a,c;for(i=0,a=t.length;i<a;++i){const m=t[i].element;if(m&&m.hasValue()){const C=m.getCenterPoint(),L=_a(e,C);L<r&&(r=L,c=m)}}if(c){const m=c.tooltipPosition();n=m.x,o=m.y}return{x:n,y:o}}};function vn(t,e){return e&&(Ot(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Tn(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
76
76
  `)>-1?t.split(`
77
- `):t}function hy(t,e){const{element:n,datasetIndex:o,index:r}=e,i=t.getDatasetMeta(o).controller,{label:a,value:c}=i.getLabelAndValue(r);return{chart:t,label:a,parsed:i.getParsed(r),raw:t.data.datasets[o].data[r],formattedValue:c,dataset:i.getDataset(),dataIndex:r,datasetIndex:o,element:n}}function Ts(t,e){const n=t.chart.ctx,{body:o,footer:r,title:i}=t,{boxWidth:a,boxHeight:c}=e,m=$t(e.bodyFont),C=$t(e.titleFont),L=$t(e.footerFont),D=i.length,W=r.length,K=o.length,X=Jt(e.padding);let ee=X.height,re=0,fe=o.reduce((ke,ve)=>ke+ve.before.length+ve.lines.length+ve.after.length,0);if(fe+=t.beforeBody.length+t.afterBody.length,D&&(ee+=D*C.lineHeight+(D-1)*e.titleSpacing+e.titleMarginBottom),fe){const ke=e.displayColors?Math.max(c,m.lineHeight):m.lineHeight;ee+=K*ke+(fe-K)*m.lineHeight+(fe-1)*e.bodySpacing}W&&(ee+=e.footerMarginTop+W*L.lineHeight+(W-1)*e.footerSpacing);let ye=0;const xe=function(ke){re=Math.max(re,n.measureText(ke).width+ye)};return n.save(),n.font=C.string,kt(t.title,xe),n.font=m.string,kt(t.beforeBody.concat(t.afterBody),xe),ye=e.displayColors?a+2+e.boxPadding:0,kt(o,ke=>{kt(ke.before,xe),kt(ke.lines,xe),kt(ke.after,xe)}),ye=0,n.font=L.string,kt(t.footer,xe),n.restore(),re+=X.width,{width:re,height:ee}}function my(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function gy(t,e,n,o){const{x:r,width:i}=o,a=n.caretSize+n.caretPadding;if(t==="left"&&r+i+a>e.width||t==="right"&&r-i-a<0)return!0}function yy(t,e,n,o){const{x:r,width:i}=n,{width:a,chartArea:{left:c,right:m}}=t;let C="center";return o==="center"?C=r<=(c+m)/2?"left":"right":r<=i/2?C="left":r>=a-i/2&&(C="right"),gy(C,t,e,n)&&(C="center"),C}function Bs(t,e,n){const o=n.yAlign||e.yAlign||my(t,n);return{xAlign:n.xAlign||e.xAlign||yy(t,e,n,o),yAlign:o}}function py(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function _y(t,e,n){let{y:o,height:r}=t;return e==="top"?o+=n:e==="bottom"?o-=r+n:o-=r/2,o}function Ls(t,e,n,o){const{caretSize:r,caretPadding:i,cornerRadius:a}=t,{xAlign:c,yAlign:m}=n,C=r+i,{topLeft:L,topRight:D,bottomLeft:W,bottomRight:K}=co(a);let X=py(e,c);const ee=_y(e,m,C);return m==="center"?c==="left"?X+=C:c==="right"&&(X-=C):c==="left"?X-=Math.max(L,W)+r:c==="right"&&(X+=Math.max(D,K)+r),{x:Kt(X,0,o.width-e.width),y:Kt(ee,0,o.height-e.height)}}function si(t,e,n){const o=Jt(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Ns(t){return vn([],Tn(t))}function vy(t,e,n){return qn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Rs(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const ld={beforeTitle:wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:wn,beforeBody:wn,beforeLabel:wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return vt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:wn,afterBody:wn,beforeFooter:wn,footer:wn,afterFooter:wn};function Qt(t,e,n,o){const r=t[e].call(n,o);return typeof r>"u"?ld[e].call(n,o):r}class Ia extends $n{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&n.options.animation&&o.animations,i=new Gc(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=vy(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,r=Qt(o,"beforeTitle",this,e),i=Qt(o,"title",this,e),a=Qt(o,"afterTitle",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}getBeforeBody(e,n){return Ns(Qt(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,r=[];return kt(e,i=>{const a={before:[],lines:[],after:[]},c=Rs(o,i);vn(a.before,Tn(Qt(c,"beforeLabel",this,i))),vn(a.lines,Qt(c,"label",this,i)),vn(a.after,Tn(Qt(c,"afterLabel",this,i))),r.push(a)}),r}getAfterBody(e,n){return Ns(Qt(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,r=Qt(o,"beforeFooter",this,e),i=Qt(o,"footer",this,e),a=Qt(o,"afterFooter",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}_createItems(e){const n=this._active,o=this.chart.data,r=[],i=[],a=[];let c=[],m,C;for(m=0,C=n.length;m<C;++m)c.push(hy(this.chart,n[m]));return e.filter&&(c=c.filter((L,D,W)=>e.filter(L,D,W,o))),e.itemSort&&(c=c.sort((L,D)=>e.itemSort(L,D,o))),kt(c,L=>{const D=Rs(e.callbacks,L);r.push(Qt(D,"labelColor",this,L)),i.push(Qt(D,"labelPointStyle",this,L)),a.push(Qt(D,"labelTextColor",this,L))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=c,c}update(e,n){const o=this.options.setContext(this.getContext()),r=this._active;let i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{const c=Jo[o.position].call(this,r,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const m=this._size=Ts(this,o),C=Object.assign({},c,m),L=Bs(this.chart,o,C),D=Ls(o,C,L,this.chart);this.xAlign=L.xAlign,this.yAlign=L.yAlign,i={opacity:1,x:D.x,y:D.y,width:m.width,height:m.height,caretX:c.x,caretY:c.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,r){const i=this.getCaretPosition(e,o,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,o){const{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:c}=o,{topLeft:m,topRight:C,bottomLeft:L,bottomRight:D}=co(c),{x:W,y:K}=e,{width:X,height:ee}=n;let re,fe,ye,xe,ke,ve;return i==="center"?(ke=K+ee/2,r==="left"?(re=W,fe=re-a,xe=ke+a,ve=ke-a):(re=W+X,fe=re+a,xe=ke-a,ve=ke+a),ye=re):(r==="left"?fe=W+Math.max(m,L)+a:r==="right"?fe=W+X-Math.max(C,D)-a:fe=this.caretX,i==="top"?(xe=K,ke=xe-a,re=fe-a,ye=fe+a):(xe=K+ee,ke=xe+a,re=fe+a,ye=fe-a),ve=xe),{x1:re,x2:fe,x3:ye,y1:xe,y2:ke,y3:ve}}drawTitle(e,n,o){const r=this.title,i=r.length;let a,c,m;if(i){const C=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.titleAlign,o),n.textAlign=C.textAlign(o.titleAlign),n.textBaseline="middle",a=$t(o.titleFont),c=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,m=0;m<i;++m)n.fillText(r[m],C.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+c,m+1===i&&(e.y+=o.titleMarginBottom-c)}}_drawColorBox(e,n,o,r,i){const a=this.labelColors[o],c=this.labelPointStyles[o],{boxHeight:m,boxWidth:C}=i,L=$t(i.bodyFont),D=si(this,"left",i),W=r.x(D),K=m<L.lineHeight?(L.lineHeight-m)/2:0,X=n.y+K;if(i.usePointStyle){const ee={radius:Math.min(C,m)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},re=r.leftForLtr(W,C)+C/2,fe=X+m/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,ba(e,ee,re,fe),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,ba(e,ee,re,fe)}else{e.lineWidth=yt(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const ee=r.leftForLtr(W,C),re=r.leftForLtr(r.xPlus(W,1),C-2),fe=co(a.borderRadius);Object.values(fe).some(ye=>ye!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,lr(e,{x:ee,y:X,w:C,h:m,radius:fe}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),lr(e,{x:re,y:X+1,w:C-2,h:m-2,radius:fe}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(ee,X,C,m),e.strokeRect(ee,X,C,m),e.fillStyle=a.backgroundColor,e.fillRect(re,X+1,C-2,m-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:c,boxHeight:m,boxWidth:C,boxPadding:L}=o,D=$t(o.bodyFont);let W=D.lineHeight,K=0;const X=xo(o.rtl,this.x,this.width),ee=function(Ie){n.fillText(Ie,X.x(e.x+K),e.y+W/2),e.y+=W+i},re=X.textAlign(a);let fe,ye,xe,ke,ve,Ee,Me;for(n.textAlign=a,n.textBaseline="middle",n.font=D.string,e.x=si(this,re,o),n.fillStyle=o.bodyColor,kt(this.beforeBody,ee),K=c&&re!=="right"?a==="center"?C/2+L:C+2+L:0,ke=0,Ee=r.length;ke<Ee;++ke){for(fe=r[ke],ye=this.labelTextColors[ke],n.fillStyle=ye,kt(fe.before,ee),xe=fe.lines,c&&xe.length&&(this._drawColorBox(n,e,ke,X,o),W=Math.max(D.lineHeight,m)),ve=0,Me=xe.length;ve<Me;++ve)ee(xe[ve]),W=D.lineHeight;kt(fe.after,ee)}K=0,W=D.lineHeight,kt(this.afterBody,ee),e.y-=i}drawFooter(e,n,o){const r=this.footer,i=r.length;let a,c;if(i){const m=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=m.textAlign(o.footerAlign),n.textBaseline="middle",a=$t(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,c=0;c<i;++c)n.fillText(r[c],m.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o.footerSpacing}}drawBackground(e,n,o,r){const{xAlign:i,yAlign:a}=this,{x:c,y:m}=e,{width:C,height:L}=o,{topLeft:D,topRight:W,bottomLeft:K,bottomRight:X}=co(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(c+D,m),a==="top"&&this.drawCaret(e,n,o,r),n.lineTo(c+C-W,m),n.quadraticCurveTo(c+C,m,c+C,m+W),a==="center"&&i==="right"&&this.drawCaret(e,n,o,r),n.lineTo(c+C,m+L-X),n.quadraticCurveTo(c+C,m+L,c+C-X,m+L),a==="bottom"&&this.drawCaret(e,n,o,r),n.lineTo(c+K,m+L),n.quadraticCurveTo(c,m+L,c,m+L-K),a==="center"&&i==="left"&&this.drawCaret(e,n,o,r),n.lineTo(c,m+D),n.quadraticCurveTo(c,m,c+D,m),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,r=o&&o.x,i=o&&o.y;if(r||i){const a=Jo[e.position].call(this,this._active,this._eventPosition);if(!a)return;const c=this._size=Ts(this,e),m=Object.assign({},a,this._size),C=Bs(n,e,m),L=Ls(e,m,C,n);(r._to!==L.x||i._to!==L.y)&&(this.xAlign=C.xAlign,this.yAlign=C.yAlign,this.width=c.width,this.height=c.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,L))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=Jt(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=o,this.drawBackground(i,e,r,n),Oc(e,n.textDirection),i.y+=a.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),Vc(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,r=e.map(({datasetIndex:c,index:m})=>{const C=this.chart.getDatasetMeta(c);if(!C)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:C.data[m],index:m}}),i=!xi(o,r),a=this._positionChanged(r,n);(i||a)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],a=this._getActiveElements(e,i,n,o),c=this._positionChanged(a,e),m=n||!xi(a,i)||c;return m&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),m}_getActiveElements(e,n,o,r){const i=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,i.mode,i,o);return i.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:o,caretY:r,options:i}=this,a=Jo[i.position].call(this,e,n);return a!==!1&&(o!==a.x||r!==a.y)}}Oe(Ia,"positioners",Jo);var by={id:"tooltip",_element:Ia,positioners:Jo,afterInit(t,e,n){n&&(t.tooltip=new Ia({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,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:ld},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Cy=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function My(t,e,n,o){const r=t.indexOf(e);if(r===-1)return Cy(t,e,n,o);const i=t.lastIndexOf(e);return r!==i?n:r}const xy=(t,e)=>t===null?null:Kt(Math.round(t),0,e);function Hs(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ea extends Ao{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:r,label:i}of n)o[r]===i&&o.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(vt(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:My(o,e,st(n,e),this._addedLabels),xy(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(r=this.getLabels().length-1)),this.min=o,this.max=r}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,r=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=e;a<=n;a++)r.push({value:a});return r}getLabelForValue(e){return Hs.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Oe(Ea,"id","category"),Oe(Ea,"defaults",{ticks:{callback:Hs}});function Sy(t,e){const n=[],{bounds:r,step:i,min:a,max:c,precision:m,count:C,maxTicks:L,maxDigits:D,includeBounds:W}=t,K=i||1,X=L-1,{min:ee,max:re}=e,fe=!vt(a),ye=!vt(c),xe=!vt(C),ke=(re-ee)/(D+1);let ve=Nl((re-ee)/X/K)*K,Ee,Me,Ie,Te;if(ve<1e-14&&!fe&&!ye)return[{value:ee},{value:re}];Te=Math.ceil(re/ve)-Math.floor(ee/ve),Te>X&&(ve=Nl(Te*ve/X/K)*K),vt(m)||(Ee=Math.pow(10,m),ve=Math.ceil(ve*Ee)/Ee),r==="ticks"?(Me=Math.floor(ee/ve)*ve,Ie=Math.ceil(re/ve)*ve):(Me=ee,Ie=re),fe&&ye&&i&&Tf((c-a)/i,ve/1e3)?(Te=Math.round(Math.min((c-a)/ve,L)),ve=(c-a)/Te,Me=a,Ie=c):xe?(Me=fe?a:Me,Ie=ye?c:Ie,Te=C-1,ve=(Ie-Me)/Te):(Te=(Ie-Me)/ve,er(Te,Math.round(Te),ve/1e3)?Te=Math.round(Te):Te=Math.ceil(Te));const We=Math.max(Rl(ve),Rl(Me));Ee=Math.pow(10,vt(m)?We:m),Me=Math.round(Me*Ee)/Ee,Ie=Math.round(Ie*Ee)/Ee;let nt=0;for(fe&&(W&&Me!==a?(n.push({value:a}),Me<a&&nt++,er(Math.round((Me+nt*ve)*Ee)/Ee,a,Fs(a,ke,t))&&nt++):Me<a&&nt++);nt<Te;++nt){const Pe=Math.round((Me+nt*ve)*Ee)/Ee;if(ye&&Pe>c)break;n.push({value:Pe})}return ye&&W&&Ie!==c?n.length&&er(n[n.length-1].value,c,Fs(c,ke,t))?n[n.length-1].value=c:n.push({value:c}):(!ye||Ie===c)&&n.push({value:Ie}),n}function Fs(t,e,{horizontal:n,minRotation:o}){const r=Cn(o),i=(n?Math.sin(r):Math.cos(r))||.001,a=.75*e*(""+t).length;return Math.min(e/i,a)}class wa extends Ao{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return vt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:r,max:i}=this;const a=m=>r=n?r:m,c=m=>i=o?i:m;if(e){const m=Mn(r),C=Mn(i);m<0&&C<0?c(0):m>0&&C>0&&a(0)}if(r===i){let m=i===0?1:Math.abs(i*.05);c(i+m),e||a(r-m)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,r;return o?(r=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const r={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,a=Sy(r,i);return e.bounds==="ticks"&&Bf(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const r=(o-n)/Math.max(e.length-1,1)/2;n-=r,o+=r}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return Ua(e,this.chart.options.locale,this.options.ticks.format)}}class Aa extends wa{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=qt(e)?e:0,this.max=qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Cn(this.options.ticks.minRotation),r=(e?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Oe(Aa,"id","linear"),Oe(Aa,"defaults",{ticks:{callback:Ga.formatters.numeric}});function Ta(t){const e=t.ticks;if(e.display&&t.display){const n=Jt(e.backdropPadding);return st(e.font&&e.font.size,Vt.font.size)+n.height}return 0}function ky(t,e,n){return n=Ot(n)?n:[n],{w:Kf(t,e.string,n),h:n.length*e.lineHeight}}function Os(t,e,n,o,r){return t===o||t===r?{start:e-n/2,end:e+n/2}:t<o||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function Iy(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},n=Object.assign({},e),o=[],r=[],i=t._pointLabels.length,a=t.options.pointLabels,c=a.centerPointLabels?It/i:0;for(let m=0;m<i;m++){const C=a.setContext(t.getPointLabelContext(m));r[m]=C.padding;const L=t.getPointPosition(m,t.drawingArea+r[m],c),D=$t(C.font),W=ky(t.ctx,D,t._pointLabels[m]);o[m]=W;const K=Yt(t.getIndexAngle(m)+c),X=Math.round(Pa(K)),ee=Os(X,L.x,W.w,0,180),re=Os(X,L.y,W.h,90,270);Ey(n,e,K,ee,re)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=Ty(t,o,r)}function Ey(t,e,n,o,r){const i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let c=0,m=0;o.start<e.l?(c=(e.l-o.start)/i,t.l=Math.min(t.l,e.l-c)):o.end>e.r&&(c=(o.end-e.r)/i,t.r=Math.max(t.r,e.r+c)),r.start<e.t?(m=(e.t-r.start)/a,t.t=Math.min(t.t,e.t-m)):r.end>e.b&&(m=(r.end-e.b)/a,t.b=Math.max(t.b,e.b+m))}function wy(t,e,n){const o=t.drawingArea,{extra:r,additionalAngle:i,padding:a,size:c}=n,m=t.getPointPosition(e,o+r+a,i),C=Math.round(Pa(Yt(m.angle+Pt))),L=Ny(m.y,c.h,C),D=By(C),W=Ly(m.x,c.w,D);return{visible:!0,x:m.x,y:L,textAlign:D,left:W,top:L,right:W+c.w,bottom:L+c.h}}function Ay(t,e){if(!e)return!0;const{left:n,top:o,right:r,bottom:i}=t;return!(Nn({x:n,y:o},e)||Nn({x:n,y:i},e)||Nn({x:r,y:o},e)||Nn({x:r,y:i},e))}function Ty(t,e,n){const o=[],r=t._pointLabels.length,i=t.options,{centerPointLabels:a,display:c}=i.pointLabels,m={extra:Ta(i)/2,additionalAngle:a?It/r:0};let C;for(let L=0;L<r;L++){m.padding=n[L],m.size=e[L];const D=wy(t,L,m);o.push(D),c==="auto"&&(D.visible=Ay(D,C),D.visible&&(C=D))}return o}function By(t){return t===0||t===180?"center":t<180?"left":"right"}function Ly(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Ny(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Ry(t,e,n){const{left:o,top:r,right:i,bottom:a}=n,{backdropColor:c}=e;if(!vt(c)){const m=co(e.borderRadius),C=Jt(e.backdropPadding);t.fillStyle=c;const L=o-C.left,D=r-C.top,W=i-o+C.width,K=a-r+C.height;Object.values(m).some(X=>X!==0)?(t.beginPath(),lr(t,{x:L,y:D,w:W,h:K,radius:m}),t.fill()):t.fillRect(L,D,W,K)}}function Hy(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let r=e-1;r>=0;r--){const i=t._pointLabelItems[r];if(!i.visible)continue;const a=o.setContext(t.getPointLabelContext(r));Ry(n,a,i);const c=$t(a.font),{x:m,y:C,textAlign:L}=i;Io(n,t._pointLabels[r],m,C+c.lineHeight/2,c,{color:a.color,textAlign:L,textBaseline:"middle"})}}function sd(t,e,n,o){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,Tt);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=t.getPointPosition(a,e),r.lineTo(i.x,i.y)}}function Fy(t,e,n,o,r){const i=t.ctx,a=e.circular,{color:c,lineWidth:m}=e;!a&&!o||!c||!m||n<0||(i.save(),i.strokeStyle=c,i.lineWidth=m,i.setLineDash(r.dash||[]),i.lineDashOffset=r.dashOffset,i.beginPath(),sd(t,n,a,o),i.closePath(),i.stroke(),i.restore())}function Oy(t,e,n){return qn(t,{label:n,index:e,type:"pointLabel"})}class Zo extends wa{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Jt(Ta(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=qt(e)&&!isNaN(e)?e:0,this.max=qt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ta(this.options))}generateTickLabels(e){wa.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const r=wt(this.options.pointLabels.callback,[n,o],this);return r||r===0?r:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?Iy(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,r){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,r))}getIndexAngle(e){const n=Tt/(this._pointLabels.length||1),o=this.options.startAngle||0;return Yt(e*n+Cn(o))}getDistanceFromCenterForValue(e){if(vt(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(vt(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return Oy(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const r=this.getIndexAngle(e)-Pt+o;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:r,bottom:i}=this._pointLabelItems[e];return{left:n,top:o,right:r,bottom:i}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),sd(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:r,border:i}=n,a=this._pointLabels.length;let c,m,C;if(n.pointLabels.display&&Hy(this,a),r.display&&this.ticks.forEach((L,D)=>{if(D!==0||D===0&&this.min<0){m=this.getDistanceFromCenterForValue(L.value);const W=this.getContext(D),K=r.setContext(W),X=i.setContext(W);Fy(this,K,m,a,X)}}),o.display){for(e.save(),c=a-1;c>=0;c--){const L=o.setContext(this.getPointLabelContext(c)),{color:D,lineWidth:W}=L;!W||!D||(e.lineWidth=W,e.strokeStyle=D,e.setLineDash(L.borderDash),e.lineDashOffset=L.borderDashOffset,m=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),C=this.getPointPosition(c,m),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(C.x,C.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const r=this.getIndexAngle(0);let i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,m)=>{if(m===0&&this.min>=0&&!n.reverse)return;const C=o.setContext(this.getContext(m)),L=$t(C.font);if(i=this.getDistanceFromCenterForValue(this.ticks[m].value),C.showLabelBackdrop){e.font=L.string,a=e.measureText(c.label).width,e.fillStyle=C.backdropColor;const D=Jt(C.backdropPadding);e.fillRect(-a/2-D.left,-i-L.size/2-D.top,a+D.width,L.size+D.height)}Io(e,c.label,0,-i,L,{color:C.color,strokeColor:C.textStrokeColor,strokeWidth:C.textStrokeWidth})}),e.restore()}drawTitle(){}}Oe(Zo,"id","radialLinear"),Oe(Zo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ga.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Oe(Zo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Oe(Zo,"descriptors",{angleLines:{_fallback:"grid"}});const Pi={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}},tn=Object.keys(Pi);function Vs(t,e){return t-e}function Ps(t,e){if(vt(e))return null;const n=t._adapter,{parser:o,round:r,isoWeekday:i}=t._parseOpts;let a=e;return typeof o=="function"&&(a=o(a)),qt(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(r&&(a=r==="week"&&(ko(i)||i===!0)?n.startOf(a,"isoWeek",i):n.startOf(a,r)),+a)}function Ds(t,e,n,o){const r=tn.length;for(let i=tn.indexOf(t);i<r-1;++i){const a=Pi[tn[i]],c=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(c*a.size))<=o)return tn[i]}return tn[r-1]}function Vy(t,e,n,o,r){for(let i=tn.length-1;i>=tn.indexOf(n);i--){const a=tn[i];if(Pi[a].common&&t._adapter.diff(r,o,a)>=e-1)return a}return tn[n?tn.indexOf(n):0]}function Py(t){for(let e=tn.indexOf(t)+1,n=tn.length;e<n;++e)if(Pi[tn[e]].common)return tn[e]}function zs(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:r}=Da(n,e),i=n[o]>=e?n[o]:n[r];t[i]=!0}}function Dy(t,e,n,o){const r=t._adapter,i=+r.startOf(e[0].value,o),a=e[e.length-1].value;let c,m;for(c=i;c<=a;c=+r.add(c,1,o))m=n[c],m>=0&&(e[m].major=!0);return e}function Us(t,e,n){const o=[],r={},i=e.length;let a,c;for(a=0;a<i;++a)c=e[a],r[c]=a,o.push({value:c,major:!1});return i===0||!n?o:Dy(t,o,r,n)}class Ti extends Ao{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),r=this._adapter=new fm._date(e.adapters.date);r.init(n),Qo(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ps(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:r,max:i,minDefined:a,maxDefined:c}=this.getUserBounds();function m(C){!a&&!isNaN(C.min)&&(r=Math.min(r,C.min)),!c&&!isNaN(C.max)&&(i=Math.max(i,C.max))}(!a||!c)&&(m(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&m(this.getMinMax(!1))),r=qt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),o),i=qt(i)&&!isNaN(i)?i:+n.endOf(Date.now(),o)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,r=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,a=this.max,c=Hf(r,i,a);return this._unit=n.unit||(o.autoSkip?Ds(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):Vy(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Py(this._unit),this.initOffsets(r),e.reverse&&c.reverse(),Us(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?o=i:o=(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=Kt(n,0,a),o=Kt(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,r=this.options,i=r.time,a=i.unit||Ds(i.minUnit,n,o,this._getLabelCapacity(n)),c=st(r.ticks.stepSize,1),m=a==="week"?i.isoWeekday:!1,C=ko(m)||m===!0,L={};let D=n,W,K;if(C&&(D=+e.startOf(D,"isoWeek",m)),D=+e.startOf(D,C?"day":a),e.diff(o,n,a)>1e5*c)throw new Error(n+" and "+o+" are too far apart with stepSize of "+c+" "+a);const X=r.ticks.source==="data"&&this.getDataTimestamps();for(W=D,K=0;W<o;W=+e.add(W,c,a),K++)zs(L,W,X);return(W===o||r.bounds==="ticks"||K===1)&&zs(L,W,X),Object.keys(L).sort(Vs).map(ee=>+ee)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,i=this._unit,a=n||r[i];return this._adapter.format(e,a)}_tickFormatFunction(e,n,o,r){const i=this.options,a=i.ticks.callback;if(a)return wt(a,[e,n,o],this);const c=i.time.displayFormats,m=this._unit,C=this._majorUnit,L=m&&c[m],D=C&&c[C],W=o[n],K=C&&D&&W&&W.major;return this._adapter.format(e,r||(K?D:L))}generateTickLabels(e){let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n],r.label=this._tickFormatFunction(r.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,r=Cn(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(r),a=Math.sin(r),c=this._resolveTickFontOptions(0).size;return{w:o*i+c*a,h:o*a+c*i}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,r=o[n.unit]||o.millisecond,i=this._tickFormatFunction(e,0,Us(this,[e],this._majorUnit),r),a=this._getLabelSize(i),c=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,o=r.length;n<o;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const r=this.getLabels();for(n=0,o=r.length;n<o;++n)e.push(Ps(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Sc(e.sort(Vs))}}Oe(Ti,"id","time"),Oe(Ti,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ci(t,e,n){let o=0,r=t.length-1,i,a,c,m;n?(e>=t[o].pos&&e<=t[r].pos&&({lo:o,hi:r}=so(t,"pos",e)),{pos:i,time:c}=t[o],{pos:a,time:m}=t[r]):(e>=t[o].time&&e<=t[r].time&&({lo:o,hi:r}=so(t,"time",e)),{time:i,pos:c}=t[o],{time:a,pos:m}=t[r]);const C=a-i;return C?c+(m-c)*(e-i)/C:c}class Gs extends Ti{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ci(n,this.min),this._tableRange=ci(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,r=[],i=[];let a,c,m,C,L;for(a=0,c=e.length;a<c;++a)C=e[a],C>=n&&C<=o&&r.push(C);if(r.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,c=r.length;a<c;++a)L=r[a+1],m=r[a-1],C=r[a],Math.round((L+m)/2)!==C&&i.push({time:C,pos:a/(c-1)});return i}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((r,i)=>r-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(ci(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return ci(this._table,o*this._tableRange+this._minPos,!0)}}Oe(Gs,"id","timeseries"),Oe(Gs,"defaults",Ti.defaults);mn.register(mi,yi,pi,Ca,Mo,gi,_i,Xo,zn,Mi,Ci,Ea,Aa,Zo,by,fy,ay);const zy=t=>{const e=t.component.chart;e&&Object.assign(mn.defaults,e)},Uy=t=>{t.event.cssEvent.textbox_onBeforeFocus&&(ce.event.cssEvent.textbox_onBeforeFocus=t.event.cssEvent.textbox_onBeforeFocus),t.event.cssEvent.textbox_onAfterFocus&&(ce.event.cssEvent.textbox_onAfterFocus=t.event.cssEvent.textbox_onAfterFocus),t.event.cssEvent.textbox_onBeforeBlur&&(ce.event.cssEvent.textbox_onBeforeBlur=t.event.cssEvent.textbox_onBeforeBlur),t.event.cssEvent.textbox_onAfterBlur&&(ce.event.cssEvent.textbox_onAfterBlur=t.event.cssEvent.textbox_onAfterBlur),t.event.cssEvent.textbox_onBeforeClick&&(ce.event.cssEvent.textbox_onBeforeClick=t.event.cssEvent.textbox_onBeforeClick),t.event.cssEvent.textbox_onAfterClick&&(ce.event.cssEvent.textbox_onAfterClick=t.event.cssEvent.textbox_onAfterClick),t.event.cssEvent.textbox_onBeforeMouseover&&(ce.event.cssEvent.textbox_onBeforeMouseover=t.event.cssEvent.textbox_onBeforeMouseover),t.event.cssEvent.textbox_onAfterMouseover&&(ce.event.cssEvent.textbox_onAfterMouseover=t.event.cssEvent.textbox_onAfterMouseover),t.event.cssEvent.textbox_onBeforeMouseout&&(ce.event.cssEvent.textbox_onBeforeMouseout=t.event.cssEvent.textbox_onBeforeMouseout),t.event.cssEvent.textbox_onAfterMouseout&&(ce.event.cssEvent.textbox_onAfterMouseout=t.event.cssEvent.textbox_onAfterMouseout),t.event.cssEvent.textbox_onBeforeTouchstart&&(ce.event.cssEvent.textbox_onBeforeTouchstart=t.event.cssEvent.textbox_onBeforeTouchstart),t.event.cssEvent.textbox_onAfterTouchstart&&(ce.event.cssEvent.textbox_onAfterTouchstart=t.event.cssEvent.textbox_onAfterTouchstart),t.event.cssEvent.textbox_onBeforeTouchend&&(ce.event.cssEvent.textbox_onBeforeTouchend=t.event.cssEvent.textbox_onBeforeTouchend),t.event.cssEvent.textbox_onAfterTouchend&&(ce.event.cssEvent.textbox_onAfterTouchend=t.event.cssEvent.textbox_onAfterTouchend),t.event.cssEvent.button_onBeforeFocus&&(ce.event.cssEvent.button_onBeforeFocus=t.event.cssEvent.button_onBeforeFocus),t.event.cssEvent.button_onAfterFocus&&(ce.event.cssEvent.button_onAfterFocus=t.event.cssEvent.button_onAfterFocus),t.event.cssEvent.button_onBeforeBlur&&(ce.event.cssEvent.button_onBeforeBlur=t.event.cssEvent.button_onBeforeBlur),t.event.cssEvent.button_onAfterBlur&&(ce.event.cssEvent.button_onAfterBlur=t.event.cssEvent.button_onAfterBlur),t.event.cssEvent.button_onBeforeClick&&(ce.event.cssEvent.button_onBeforeClick=t.event.cssEvent.button_onBeforeClick),t.event.cssEvent.button_onAfterClick&&(ce.event.cssEvent.button_onAfterClick=t.event.cssEvent.button_onAfterClick),t.event.cssEvent.button_onBeforeMouseover&&(ce.event.cssEvent.button_onBeforeMouseover=t.event.cssEvent.button_onBeforeMouseover),t.event.cssEvent.button_onAfterMouseover&&(ce.event.cssEvent.button_onAfterMouseover=t.event.cssEvent.button_onAfterMouseover),t.event.cssEvent.button_onBeforeMouseout&&(ce.event.cssEvent.button_onBeforeMouseout=t.event.cssEvent.button_onBeforeMouseout),t.event.cssEvent.button_onAfterMouseout&&(ce.event.cssEvent.button_onAfterMouseout=t.event.cssEvent.button_onAfterMouseout),t.event.cssEvent.button_onBeforeTouchstart&&(ce.event.cssEvent.button_onBeforeTouchstart=t.event.cssEvent.button_onBeforeTouchstart),t.event.cssEvent.button_onAfterTouchstart&&(ce.event.cssEvent.button_onAfterTouchstart=t.event.cssEvent.button_onAfterTouchstart),t.event.cssEvent.button_onBeforeTouchend&&(ce.event.cssEvent.button_onBeforeTouchend=t.event.cssEvent.button_onBeforeTouchend),t.event.cssEvent.button_onAfterTouchend&&(ce.event.cssEvent.button_onAfterTouchend=t.event.cssEvent.button_onAfterTouchend),t.event.cssEvent.input_onBeforeFocus&&(ce.event.cssEvent.input_onBeforeFocus=t.event.cssEvent.input_onBeforeFocus),t.event.cssEvent.input_onAfterFocus&&(ce.event.cssEvent.input_onAfterFocus=t.event.cssEvent.input_onAfterFocus),t.event.cssEvent.input_onBeforeBlur&&(ce.event.cssEvent.input_onBeforeBlur=t.event.cssEvent.input_onBeforeBlur),t.event.cssEvent.input_onAfterBlur&&(ce.event.cssEvent.input_onAfterBlur=t.event.cssEvent.input_onAfterBlur),t.event.cssEvent.input_onBeforeMouseover&&(ce.event.cssEvent.input_onBeforeMouseover=t.event.cssEvent.input_onBeforeMouseover),t.event.cssEvent.input_onAfterMouseover&&(ce.event.cssEvent.input_onAfterMouseover=t.event.cssEvent.input_onAfterMouseover),t.event.cssEvent.input_onBeforeMouseout&&(ce.event.cssEvent.input_onBeforeMouseout=t.event.cssEvent.input_onBeforeMouseout),t.event.cssEvent.input_onAfterMouseout&&(ce.event.cssEvent.input_onAfterMouseout=t.event.cssEvent.input_onAfterMouseout),t.event.cssEvent.input_onBeforeTouchstart&&(ce.event.cssEvent.input_onBeforeTouchstart=t.event.cssEvent.input_onBeforeTouchstart),t.event.cssEvent.input_onAfterTouchstart&&(ce.event.cssEvent.input_onAfterTouchstart=t.event.cssEvent.input_onAfterTouchstart),t.event.cssEvent.input_onBeforeTouchend&&(ce.event.cssEvent.input_onBeforeTouchend=t.event.cssEvent.input_onBeforeTouchend),t.event.cssEvent.input_onAfterTouchend&&(ce.event.cssEvent.input_onAfterTouchend=t.event.cssEvent.input_onAfterTouchend),ce.componentStyle={size:t.componentStyle.size,filledColor:t.componentStyle.filledColor,emptyColor:t.componentStyle.emptyColor,filledTextColor:t.componentStyle.filledTextColor,emptyTextColor:t.componentStyle.emptyTextColor,primaryColor:t.componentStyle.primaryColor,mutedColor:t.componentStyle.mutedColor,infoColor:t.componentStyle.infoColor,successColor:t.componentStyle.successColor,dangerColor:t.componentStyle.dangerColor,warningColor:t.componentStyle.warningColor,invertColor:t.componentStyle.invertColor,minHeightS:t.componentStyle.minHeightS,minHeightM:t.componentStyle.minHeightM,minHeightL:t.componentStyle.minHeightL,minHeightXL:t.componentStyle.minHeightXL,fontSizeS:t.componentStyle.fontSizeS,fontSizeM:t.componentStyle.fontSizeM,fontSizeL:t.componentStyle.fontSizeL,fontSizeXL:t.componentStyle.fontSizeXL,primaryInvertColor:null,mutedInvertColor:null,infoInvertColor:null,successInvertColor:null,dangerInvertColor:null,warningInvertColor:null,filledInvertColor:null,emptyInvertColor:null,filledTextInvertColor:null,emptyTextInvertColor:null,componentColor:{primary:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},muted:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},info:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},success:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},danger:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},warning:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null}}},ce.componentConfig={filesetSize:t.component.filesetSize??1/0,filesetTotalSize:t.component.filesetTotalSize??1/0};const e=Yu(t),n=qu(t);ce.note=e,ce.grid=n,zy(t),ce.component={accordionList:{},baggieList:{},bannerList:{},buttonList:{},calendarList:{},captionList:{},chartList:{},drawerList:{},dropdownList:{},filesetList:{},gapList:{},imageboxList:{},inputList:{},inputGroupList:{},labelList:{},layoutList:{},listList:{},modalList:{},paginationList:{},paragraphList:{},popupList:{},spinnerList:{},tableList:{}}};function Bt(t,e){return ao.defineComponent({name:`${e}SSRWrapper`,setup(n,{slots:o,attrs:r}){const i=ao.ref(null);return ao.onMounted(async()=>{const a=await t();i.value=ao.markRaw(a.default)}),()=>i.value?ao.h(i.value,{...r},o):null}})}const Ba=ao.ref("pc"),Gy=()=>ao.readonly(Ba),jy=()=>{if(typeof window>"u")return;const t=()=>{const e=tu(window.innerWidth);Ba.value!==e&&(Ba.value=e)};t(),window.addEventListener("resize",()=>{requestAnimationFrame(t)})},Bi="rgba(147,191,207,1)",cd="rgba(158,158,158,1)",dd="rgba(96,150,180,1)",ud="rgba(95,141,78,1)",fd="rgba(247,113,109,1)",hd="rgba(255,193,98,1)",Ja="rgba(48,48,48,1)",Za="rgba(255,255,255,1)",md="rgba(255,255,255,1)",La=()=>{const t=Ra.getVanillanoteConfig(),e=Na.getVanillagridConfig();e.footerFormula={$$COUNT_CHECK:function(r){let i=0;return r.forEach(a=>{a==="Y"&&(i=i+1)}),String(i)}},e.dataType={img:{cellStyle:{justifyContent:"center",textAlign:"center",padding:"0"},onSelected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.setProperty("opacity","0.2")},onUnselected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.removeProperty("opacity")},getValue:function(r,i){return i||null},getText:function(r,i){return i?i.alt:null},getChildNode:function(r,i){const a=document.createElement("span");if(!i||!i.value)return a;a.style.display="flex",a.style.alignItems="center",a.style.position="relative",a.style.overflow="hidden",a.style.width="100%";const c=document.createElement("img"),m=document.createElement("span");return c.style.width="100%",c.style.zIndex="1",c.src=i.value.src,c.alt=i.text,m.style.position="absolute",m.style.fontSize="12px",$s(dn(un.component.getGrid(r).getGridInfo().cssInfo.selectCellBackColor))?m.style.color="black":m.style.color="white",m.style.textAlign="left",m.style.display="inline-block",m.style.width="100%",m.style.whiteSpace="normal",m.style.wordBreak="break-all",m.textContent=i.text,c.gridId=r,c.cellRow=i.rowIndex,c.cellCol=i.colIndex,a.append(c),a.append(m),a.addEventListener("click",function(C){un.component.getGrid(r).setTargetCell(C.target.cellRow,C.target.cellCol)}),a.addEventListener("dblclick",function(C){un.component.getGrid(r).editCell(C.target.cellRow,C.target.cellCol)}),a},getEditor:function(r,i,a,c,m){if(!a.value)return null;const C=document.createElement("input");return C.setAttribute("type","text"),C.style.width=r.offsetWidth+"px",C.style.height=r.scrollHeight+C.offsetHeight-C.clientHeight+"px",C.style.position="absolute",C.style.zIndex="200",C.value=a.text,C.addEventListener("keydown",function(L){switch(L.key){case"Enter":c(),L.stopPropagation(),L.preventDefault();break;case"Escape":m(),L.stopPropagation(),L.preventDefault();break;case"Tab":c(),L.stopPropagation(),L.preventDefault();break;case"F2":c(),L.stopPropagation(),L.preventDefault();break}}),C},getEditedValue:function(r,i,a){if(!a.value)return null;const c=a.value;return c.alt=r.value,c},getFilterValue:function(r,i){return i?"title : "+i.alt:null},getSortValue:function(r,i){return i?i.alt:null},getCopyValue:function(r,i){return i?i.alt:null},getPasteValue:function(r,i,a){if(!i.value)return null;const c=i.value;return c.alt=a,c}},radio:{cellStyle:{justifyContent:"center",textAlign:"center"},onSelectedAndKeyDown:function(r,i,a){return(r.key==="Enter"||r.key===" ")&&(un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0),r.stopPropagation(),r.preventDefault()),!1},onClick:function(r,i,a){un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0)},getValue:function(r,i){return i},getText:function(r,i){return i==="Y"?"true":"false"},getChildNode:function(r,i){const a=document.createElement("input");return a.setAttribute("type","radio"),a.setAttribute("name",i.name?i.name:i.colIndex),a.setAttribute("value",""+i.rowIndex),a._gridId=r,a.rowIndex=i.rowIndex,a.colIndex=i.colIndex,a.checked=i.value==="Y",a},getFilterValue:function(r,i){return i==="Y"?"●":"○"}},tree:{cellStyle:{justifyContent:"left",textAlign:"left"},getValue:function(r,i){return i.constructor===Object?i:{title:i,toggle:!1}},getText:function(r,i){return i?i.title:null},getChildNode:function(r,i){if(!i.value)return document.createElement("span");const a=document.createElement("div");a.style.width="100%";const c=document.createElement("span");c.textContent=i.text,c.style.display="inline-block",c.style.marginLeft="10px",c.style.maxWidth="90%",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.addEventListener("click",D=>{L(D,r,i)});const m=document.createElement("span");m.classList.add("far"),i.value.toggle?m.textContent="-":m.textContent="+",m.style.fontSize="0.85em",m.addEventListener("click",D=>{L(D,r,i)});const C=un.component.getGrid(r);i.colIndex+1<=C.getColCount()&&C.getCellDataType(i.rowIndex,i.colIndex+1)!=="tree"&&(i.value.toggle?C.setCellDataType(i.rowIndex,i.colIndex+1,C.getColDataType(i.colIndex+1)):C.setCellDataType(i.rowIndex,i.colIndex+1,"none"));for(let D=i.colIndex;D>3;D--)if(C.getCellDataType(i.rowIndex,D)==="tree"){const W=C.getCellValue(i.rowIndex,D-1);W&&!W.toggle&&(c.textContent="...");break}(i.rowIndex===1||i.rowIndex>1&&C.getCellText(i.rowIndex-1,i.colIndex)!==i.text)&&(a.append(m),a.append(c));function L(D,W,K){const X=un.component.getGrid(W),ee=!K.value.toggle;function re(ye,xe){let ke;const ve=X.getCellText(ye,xe);if(ye===1)ke=ye;else for(let Me=ye;Me>1;Me--)if(X.getCellText(Me,xe)===ve){ke=Me;break}const Ee={title:ve,toggle:!0};for(let Me=ke;Me<=X.getRowCount()&&ve===X.getCellText(Me,xe);Me++)if(X.setCellValue(Me,xe,Ee),Me!==ke)X.getCellDataType(Me,xe+1)==="tree"?(Me===1||X.getCellText(Me,xe+1)!==X.getCellText(Me-1,xe+1))&&X.setRowVisible(Me,!0):X.setRowVisible(Me,!0);else for(let Ie=xe+1;Ie<=X.getColCount();Ie++)if(X.getCellDataType(Me,Ie)==="tree"){X.setCellValue(Me,Ie,X.getCellValue(Me,Ie));break}}function fe(ye,xe){let ke=ye;const ve=X.getCellText(ye,xe);if(ve)for(let Ee=ke;Ee<=X.getRowCount()&&ve===X.getCellText(Ee,xe);Ee++){Ee!==ke&&X.setRowVisible(Ee,!1);for(let Me=xe;Me<=X.getColCount();Me++)if(X.getCellDataType(Ee,Me)==="tree"){const Ie=X.getCellValue(Ee,Me);Ie&&(Ie.toggle=!1,X.setCellValue(Ee,Me,Ie))}}}if(ee)for(let ye=K.colIndex;ye>2;ye--)re(K.rowIndex,ye);else fe(K.rowIndex,K.colIndex)}return a}},none:{getChildNode:function(r,i){return document.createElement("span")}}};const n=mn.defaults;return{dateFormat:en.DateFormat["yyyy-MM-dd"],timeFormat:en.TimeFormat["HH:mm:ss"],datetimeFormat:en.DateTimeFormat["yyyy-MM-dd HH:mm:ss"],yearFormat:en.YearFormat.yyyy,monthFormat:en.MonthFormat.M,yearMonthFormat:en.YearMonthFormat["yyyy-MM"],dayFormat:en.DayFormat.d,dayOfWeekFormat:en.DayOfWeekFormat.d,hourFormat:en.HourFormat.h,hourMinuteFormat:en.HourMinuteFormat["hh:mm"],minuteFormat:en.MinuteFormat.m,secondFormat:en.SecondFormat.s,numberFormat:"#,##0.##",LESSOREQ_0X7FF_BYTE:2,LESSOREQ_0XFFFF_BYTE:3,GREATER_0XFFFF_BYTE:4,shieldURL:"",exposeIpList:["0:0:0:0:0:0:0:1"],isFreeze:!0,isPossibleGoBack:!1,isPossibleOpenDevTool:!1,doDetectDevTool(){},convertValue(r){return r},protocol:"http://",domain:"localhost:8080",controllerPath:"/hison-api-link",timeout:1e4,webSocketProtocol:"ws://",webSocketEndPoint:"/hison-websocket-endpoint",cachingLimit:10,beforeGetRequest(r,i){return!0},beforePostRequest(r,i){return!0},beforePutRequest(r,i){return!0},beforePatchRequest(r,i){return!0},beforeDeleteRequest(r,i){return!0},afterGetRequest(r){return!0},afterPostRequest(r){return!0},afterPutRequest(r){return!0},afterPatchRequest(r){return!0},afterDeleteRequest(r){return!0},beforeGetUrlRequest(r,i){return!0},beforePostUrlRequest(r,i,a){return!0},beforePutUrlRequest(r,i,a){return!0},beforePatchUrlRequest(r,i,a){return!0},beforeDeleteUrlRequest(r,i,a){return!0},afterGetUrlRequest(r){return!0},afterPostUrlRequest(r){return!0},afterPutUrlRequest(r){return!0},afterPatchUrlRequest(r){return!0},afterDeleteUrlRequest(r){return!0},interceptApiResult(r,i){return!0},interceptApiError(r){return!0},component:{note:t,grid:e,chart:n,filesetTotalSize:1/0,filesetSize:1/0},componentStyle:{size:lo.m,filledColor:Bi,emptyColor:md,filledTextColor:Za,emptyTextColor:Ja,primaryColor:Bi,mutedColor:cd,infoColor:dd,successColor:ud,dangerColor:fd,warningColor:hd,invertColor:!1,minHeightS:1.7,minHeightM:1.95,minHeightL:2.25,minHeightXL:2.55,fontSizeS:.7,fontSizeM:.75,fontSizeL:.85,fontSizeXL:1},event:{cssEvent:{textbox_onBeforeFocus:r=>!0,textbox_onAfterFocus:r=>{},textbox_onBeforeBlur:r=>!0,textbox_onAfterBlur:r=>{},textbox_onBeforeClick:r=>!0,textbox_onAfterClick:r=>{},textbox_onBeforeMouseover:r=>!0,textbox_onAfterMouseover:r=>{},textbox_onBeforeMouseout:r=>!0,textbox_onAfterMouseout:r=>{},textbox_onBeforeTouchstart:r=>!0,textbox_onAfterTouchstart:r=>{},textbox_onBeforeTouchend:r=>!0,textbox_onAfterTouchend:r=>{},button_onBeforeFocus:r=>!0,button_onAfterFocus:r=>{},button_onBeforeBlur:r=>!0,button_onAfterBlur:r=>{},button_onBeforeClick:r=>!0,button_onAfterClick:r=>{},button_onBeforeMouseover:r=>!0,button_onAfterMouseover:r=>{},button_onBeforeMouseout:r=>!0,button_onAfterMouseout:r=>{},button_onBeforeTouchstart:r=>!0,button_onAfterTouchstart:r=>{},button_onBeforeTouchend:r=>!0,button_onAfterTouchend:r=>{},input_onBeforeFocus:r=>!0,input_onAfterFocus:r=>{},input_onBeforeBlur:r=>!0,input_onAfterBlur:r=>{},input_onBeforeMouseover:r=>!0,input_onAfterMouseover:r=>{},input_onBeforeMouseout:r=>!0,input_onAfterMouseout:r=>{},input_onBeforeTouchstart:r=>!0,input_onAfterTouchstart:r=>{},input_onBeforeTouchend:r=>!0,input_onAfterTouchend:r=>{}}}}},gd=()=>{const t=ce.componentStyle;t.primaryColor=t.primaryColor?dn(t.primaryColor):Bi,t.mutedColor=t.mutedColor?dn(t.mutedColor):cd,t.infoColor=t.infoColor?dn(t.infoColor):dd,t.successColor=t.successColor?dn(t.successColor):ud,t.dangerColor=t.dangerColor?dn(t.dangerColor):fd,t.warningColor=t.warningColor?dn(t.warningColor):hd,t.filledColor=t.filledColor?dn(t.filledColor):Bi,t.emptyColor=t.emptyColor?dn(t.emptyColor):md,t.filledTextColor=t.filledTextColor?dn(t.filledTextColor):Za,t.emptyTextColor=t.emptyTextColor?dn(t.emptyTextColor):Ja,t.primaryInvertColor=hn(t.primaryColor),t.mutedInvertColor=hn(t.mutedColor),t.infoInvertColor=hn(t.infoColor),t.successInvertColor=hn(t.successColor),t.dangerInvertColor=hn(t.dangerColor),t.warningInvertColor=hn(t.warningColor),t.filledInvertColor=hn(t.filledColor),t.emptyInvertColor=hn(t.emptyColor),t.filledTextInvertColor=hn(t.filledTextColor),t.emptyTextInvertColor=hn(t.emptyTextColor);const e=t.componentColor;vo(e.primary,t.invertColor?t.primaryInvertColor:t.primaryColor),vo(e.muted,t.invertColor?t.mutedInvertColor:t.mutedColor),vo(e.info,t.invertColor?t.infoInvertColor:t.infoColor),vo(e.success,t.invertColor?t.successInvertColor:t.successColor),vo(e.danger,t.invertColor?t.dangerInvertColor:t.dangerColor),vo(e.warning,t.invertColor?t.warningInvertColor:t.warningColor);const n=`
77
+ `):t}function hy(t,e){const{element:n,datasetIndex:o,index:r}=e,i=t.getDatasetMeta(o).controller,{label:a,value:c}=i.getLabelAndValue(r);return{chart:t,label:a,parsed:i.getParsed(r),raw:t.data.datasets[o].data[r],formattedValue:c,dataset:i.getDataset(),dataIndex:r,datasetIndex:o,element:n}}function Ts(t,e){const n=t.chart.ctx,{body:o,footer:r,title:i}=t,{boxWidth:a,boxHeight:c}=e,m=$t(e.bodyFont),C=$t(e.titleFont),L=$t(e.footerFont),D=i.length,W=r.length,K=o.length,X=Jt(e.padding);let ee=X.height,re=0,fe=o.reduce((ke,ve)=>ke+ve.before.length+ve.lines.length+ve.after.length,0);if(fe+=t.beforeBody.length+t.afterBody.length,D&&(ee+=D*C.lineHeight+(D-1)*e.titleSpacing+e.titleMarginBottom),fe){const ke=e.displayColors?Math.max(c,m.lineHeight):m.lineHeight;ee+=K*ke+(fe-K)*m.lineHeight+(fe-1)*e.bodySpacing}W&&(ee+=e.footerMarginTop+W*L.lineHeight+(W-1)*e.footerSpacing);let ye=0;const xe=function(ke){re=Math.max(re,n.measureText(ke).width+ye)};return n.save(),n.font=C.string,kt(t.title,xe),n.font=m.string,kt(t.beforeBody.concat(t.afterBody),xe),ye=e.displayColors?a+2+e.boxPadding:0,kt(o,ke=>{kt(ke.before,xe),kt(ke.lines,xe),kt(ke.after,xe)}),ye=0,n.font=L.string,kt(t.footer,xe),n.restore(),re+=X.width,{width:re,height:ee}}function my(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function gy(t,e,n,o){const{x:r,width:i}=o,a=n.caretSize+n.caretPadding;if(t==="left"&&r+i+a>e.width||t==="right"&&r-i-a<0)return!0}function yy(t,e,n,o){const{x:r,width:i}=n,{width:a,chartArea:{left:c,right:m}}=t;let C="center";return o==="center"?C=r<=(c+m)/2?"left":"right":r<=i/2?C="left":r>=a-i/2&&(C="right"),gy(C,t,e,n)&&(C="center"),C}function Bs(t,e,n){const o=n.yAlign||e.yAlign||my(t,n);return{xAlign:n.xAlign||e.xAlign||yy(t,e,n,o),yAlign:o}}function py(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function _y(t,e,n){let{y:o,height:r}=t;return e==="top"?o+=n:e==="bottom"?o-=r+n:o-=r/2,o}function Ls(t,e,n,o){const{caretSize:r,caretPadding:i,cornerRadius:a}=t,{xAlign:c,yAlign:m}=n,C=r+i,{topLeft:L,topRight:D,bottomLeft:W,bottomRight:K}=co(a);let X=py(e,c);const ee=_y(e,m,C);return m==="center"?c==="left"?X+=C:c==="right"&&(X-=C):c==="left"?X-=Math.max(L,W)+r:c==="right"&&(X+=Math.max(D,K)+r),{x:Kt(X,0,o.width-e.width),y:Kt(ee,0,o.height-e.height)}}function si(t,e,n){const o=Jt(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Ns(t){return vn([],Tn(t))}function vy(t,e,n){return qn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Rs(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const ld={beforeTitle:wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:wn,beforeBody:wn,beforeLabel:wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return vt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:wn,afterBody:wn,beforeFooter:wn,footer:wn,afterFooter:wn};function Qt(t,e,n,o){const r=t[e].call(n,o);return typeof r>"u"?ld[e].call(n,o):r}class Ia extends $n{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&n.options.animation&&o.animations,i=new Gc(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=vy(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,r=Qt(o,"beforeTitle",this,e),i=Qt(o,"title",this,e),a=Qt(o,"afterTitle",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}getBeforeBody(e,n){return Ns(Qt(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,r=[];return kt(e,i=>{const a={before:[],lines:[],after:[]},c=Rs(o,i);vn(a.before,Tn(Qt(c,"beforeLabel",this,i))),vn(a.lines,Qt(c,"label",this,i)),vn(a.after,Tn(Qt(c,"afterLabel",this,i))),r.push(a)}),r}getAfterBody(e,n){return Ns(Qt(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,r=Qt(o,"beforeFooter",this,e),i=Qt(o,"footer",this,e),a=Qt(o,"afterFooter",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}_createItems(e){const n=this._active,o=this.chart.data,r=[],i=[],a=[];let c=[],m,C;for(m=0,C=n.length;m<C;++m)c.push(hy(this.chart,n[m]));return e.filter&&(c=c.filter((L,D,W)=>e.filter(L,D,W,o))),e.itemSort&&(c=c.sort((L,D)=>e.itemSort(L,D,o))),kt(c,L=>{const D=Rs(e.callbacks,L);r.push(Qt(D,"labelColor",this,L)),i.push(Qt(D,"labelPointStyle",this,L)),a.push(Qt(D,"labelTextColor",this,L))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=c,c}update(e,n){const o=this.options.setContext(this.getContext()),r=this._active;let i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{const c=Jo[o.position].call(this,r,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const m=this._size=Ts(this,o),C=Object.assign({},c,m),L=Bs(this.chart,o,C),D=Ls(o,C,L,this.chart);this.xAlign=L.xAlign,this.yAlign=L.yAlign,i={opacity:1,x:D.x,y:D.y,width:m.width,height:m.height,caretX:c.x,caretY:c.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,r){const i=this.getCaretPosition(e,o,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,o){const{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:c}=o,{topLeft:m,topRight:C,bottomLeft:L,bottomRight:D}=co(c),{x:W,y:K}=e,{width:X,height:ee}=n;let re,fe,ye,xe,ke,ve;return i==="center"?(ke=K+ee/2,r==="left"?(re=W,fe=re-a,xe=ke+a,ve=ke-a):(re=W+X,fe=re+a,xe=ke-a,ve=ke+a),ye=re):(r==="left"?fe=W+Math.max(m,L)+a:r==="right"?fe=W+X-Math.max(C,D)-a:fe=this.caretX,i==="top"?(xe=K,ke=xe-a,re=fe-a,ye=fe+a):(xe=K+ee,ke=xe+a,re=fe+a,ye=fe-a),ve=xe),{x1:re,x2:fe,x3:ye,y1:xe,y2:ke,y3:ve}}drawTitle(e,n,o){const r=this.title,i=r.length;let a,c,m;if(i){const C=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.titleAlign,o),n.textAlign=C.textAlign(o.titleAlign),n.textBaseline="middle",a=$t(o.titleFont),c=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,m=0;m<i;++m)n.fillText(r[m],C.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+c,m+1===i&&(e.y+=o.titleMarginBottom-c)}}_drawColorBox(e,n,o,r,i){const a=this.labelColors[o],c=this.labelPointStyles[o],{boxHeight:m,boxWidth:C}=i,L=$t(i.bodyFont),D=si(this,"left",i),W=r.x(D),K=m<L.lineHeight?(L.lineHeight-m)/2:0,X=n.y+K;if(i.usePointStyle){const ee={radius:Math.min(C,m)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},re=r.leftForLtr(W,C)+C/2,fe=X+m/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,ba(e,ee,re,fe),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,ba(e,ee,re,fe)}else{e.lineWidth=yt(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const ee=r.leftForLtr(W,C),re=r.leftForLtr(r.xPlus(W,1),C-2),fe=co(a.borderRadius);Object.values(fe).some(ye=>ye!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,lr(e,{x:ee,y:X,w:C,h:m,radius:fe}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),lr(e,{x:re,y:X+1,w:C-2,h:m-2,radius:fe}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(ee,X,C,m),e.strokeRect(ee,X,C,m),e.fillStyle=a.backgroundColor,e.fillRect(re,X+1,C-2,m-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:c,boxHeight:m,boxWidth:C,boxPadding:L}=o,D=$t(o.bodyFont);let W=D.lineHeight,K=0;const X=xo(o.rtl,this.x,this.width),ee=function(Ie){n.fillText(Ie,X.x(e.x+K),e.y+W/2),e.y+=W+i},re=X.textAlign(a);let fe,ye,xe,ke,ve,Ee,Me;for(n.textAlign=a,n.textBaseline="middle",n.font=D.string,e.x=si(this,re,o),n.fillStyle=o.bodyColor,kt(this.beforeBody,ee),K=c&&re!=="right"?a==="center"?C/2+L:C+2+L:0,ke=0,Ee=r.length;ke<Ee;++ke){for(fe=r[ke],ye=this.labelTextColors[ke],n.fillStyle=ye,kt(fe.before,ee),xe=fe.lines,c&&xe.length&&(this._drawColorBox(n,e,ke,X,o),W=Math.max(D.lineHeight,m)),ve=0,Me=xe.length;ve<Me;++ve)ee(xe[ve]),W=D.lineHeight;kt(fe.after,ee)}K=0,W=D.lineHeight,kt(this.afterBody,ee),e.y-=i}drawFooter(e,n,o){const r=this.footer,i=r.length;let a,c;if(i){const m=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=m.textAlign(o.footerAlign),n.textBaseline="middle",a=$t(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,c=0;c<i;++c)n.fillText(r[c],m.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o.footerSpacing}}drawBackground(e,n,o,r){const{xAlign:i,yAlign:a}=this,{x:c,y:m}=e,{width:C,height:L}=o,{topLeft:D,topRight:W,bottomLeft:K,bottomRight:X}=co(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(c+D,m),a==="top"&&this.drawCaret(e,n,o,r),n.lineTo(c+C-W,m),n.quadraticCurveTo(c+C,m,c+C,m+W),a==="center"&&i==="right"&&this.drawCaret(e,n,o,r),n.lineTo(c+C,m+L-X),n.quadraticCurveTo(c+C,m+L,c+C-X,m+L),a==="bottom"&&this.drawCaret(e,n,o,r),n.lineTo(c+K,m+L),n.quadraticCurveTo(c,m+L,c,m+L-K),a==="center"&&i==="left"&&this.drawCaret(e,n,o,r),n.lineTo(c,m+D),n.quadraticCurveTo(c,m,c+D,m),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,r=o&&o.x,i=o&&o.y;if(r||i){const a=Jo[e.position].call(this,this._active,this._eventPosition);if(!a)return;const c=this._size=Ts(this,e),m=Object.assign({},a,this._size),C=Bs(n,e,m),L=Ls(e,m,C,n);(r._to!==L.x||i._to!==L.y)&&(this.xAlign=C.xAlign,this.yAlign=C.yAlign,this.width=c.width,this.height=c.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,L))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=Jt(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=o,this.drawBackground(i,e,r,n),Oc(e,n.textDirection),i.y+=a.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),Vc(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,r=e.map(({datasetIndex:c,index:m})=>{const C=this.chart.getDatasetMeta(c);if(!C)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:C.data[m],index:m}}),i=!xi(o,r),a=this._positionChanged(r,n);(i||a)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],a=this._getActiveElements(e,i,n,o),c=this._positionChanged(a,e),m=n||!xi(a,i)||c;return m&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),m}_getActiveElements(e,n,o,r){const i=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,i.mode,i,o);return i.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:o,caretY:r,options:i}=this,a=Jo[i.position].call(this,e,n);return a!==!1&&(o!==a.x||r!==a.y)}}Oe(Ia,"positioners",Jo);var by={id:"tooltip",_element:Ia,positioners:Jo,afterInit(t,e,n){n&&(t.tooltip=new Ia({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,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:ld},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Cy=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function My(t,e,n,o){const r=t.indexOf(e);if(r===-1)return Cy(t,e,n,o);const i=t.lastIndexOf(e);return r!==i?n:r}const xy=(t,e)=>t===null?null:Kt(Math.round(t),0,e);function Hs(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ea extends Ao{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:r,label:i}of n)o[r]===i&&o.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(vt(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:My(o,e,st(n,e),this._addedLabels),xy(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(r=this.getLabels().length-1)),this.min=o,this.max=r}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,r=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=e;a<=n;a++)r.push({value:a});return r}getLabelForValue(e){return Hs.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Oe(Ea,"id","category"),Oe(Ea,"defaults",{ticks:{callback:Hs}});function Sy(t,e){const n=[],{bounds:r,step:i,min:a,max:c,precision:m,count:C,maxTicks:L,maxDigits:D,includeBounds:W}=t,K=i||1,X=L-1,{min:ee,max:re}=e,fe=!vt(a),ye=!vt(c),xe=!vt(C),ke=(re-ee)/(D+1);let ve=Nl((re-ee)/X/K)*K,Ee,Me,Ie,Te;if(ve<1e-14&&!fe&&!ye)return[{value:ee},{value:re}];Te=Math.ceil(re/ve)-Math.floor(ee/ve),Te>X&&(ve=Nl(Te*ve/X/K)*K),vt(m)||(Ee=Math.pow(10,m),ve=Math.ceil(ve*Ee)/Ee),r==="ticks"?(Me=Math.floor(ee/ve)*ve,Ie=Math.ceil(re/ve)*ve):(Me=ee,Ie=re),fe&&ye&&i&&Tf((c-a)/i,ve/1e3)?(Te=Math.round(Math.min((c-a)/ve,L)),ve=(c-a)/Te,Me=a,Ie=c):xe?(Me=fe?a:Me,Ie=ye?c:Ie,Te=C-1,ve=(Ie-Me)/Te):(Te=(Ie-Me)/ve,er(Te,Math.round(Te),ve/1e3)?Te=Math.round(Te):Te=Math.ceil(Te));const We=Math.max(Rl(ve),Rl(Me));Ee=Math.pow(10,vt(m)?We:m),Me=Math.round(Me*Ee)/Ee,Ie=Math.round(Ie*Ee)/Ee;let nt=0;for(fe&&(W&&Me!==a?(n.push({value:a}),Me<a&&nt++,er(Math.round((Me+nt*ve)*Ee)/Ee,a,Fs(a,ke,t))&&nt++):Me<a&&nt++);nt<Te;++nt){const Pe=Math.round((Me+nt*ve)*Ee)/Ee;if(ye&&Pe>c)break;n.push({value:Pe})}return ye&&W&&Ie!==c?n.length&&er(n[n.length-1].value,c,Fs(c,ke,t))?n[n.length-1].value=c:n.push({value:c}):(!ye||Ie===c)&&n.push({value:Ie}),n}function Fs(t,e,{horizontal:n,minRotation:o}){const r=Cn(o),i=(n?Math.sin(r):Math.cos(r))||.001,a=.75*e*(""+t).length;return Math.min(e/i,a)}class wa extends Ao{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return vt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:r,max:i}=this;const a=m=>r=n?r:m,c=m=>i=o?i:m;if(e){const m=Mn(r),C=Mn(i);m<0&&C<0?c(0):m>0&&C>0&&a(0)}if(r===i){let m=i===0?1:Math.abs(i*.05);c(i+m),e||a(r-m)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,r;return o?(r=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const r={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,a=Sy(r,i);return e.bounds==="ticks"&&Bf(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const r=(o-n)/Math.max(e.length-1,1)/2;n-=r,o+=r}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return Ua(e,this.chart.options.locale,this.options.ticks.format)}}class Aa extends wa{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=qt(e)?e:0,this.max=qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Cn(this.options.ticks.minRotation),r=(e?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Oe(Aa,"id","linear"),Oe(Aa,"defaults",{ticks:{callback:Ga.formatters.numeric}});function Ta(t){const e=t.ticks;if(e.display&&t.display){const n=Jt(e.backdropPadding);return st(e.font&&e.font.size,Vt.font.size)+n.height}return 0}function ky(t,e,n){return n=Ot(n)?n:[n],{w:Kf(t,e.string,n),h:n.length*e.lineHeight}}function Os(t,e,n,o,r){return t===o||t===r?{start:e-n/2,end:e+n/2}:t<o||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function Iy(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},n=Object.assign({},e),o=[],r=[],i=t._pointLabels.length,a=t.options.pointLabels,c=a.centerPointLabels?It/i:0;for(let m=0;m<i;m++){const C=a.setContext(t.getPointLabelContext(m));r[m]=C.padding;const L=t.getPointPosition(m,t.drawingArea+r[m],c),D=$t(C.font),W=ky(t.ctx,D,t._pointLabels[m]);o[m]=W;const K=Yt(t.getIndexAngle(m)+c),X=Math.round(Pa(K)),ee=Os(X,L.x,W.w,0,180),re=Os(X,L.y,W.h,90,270);Ey(n,e,K,ee,re)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=Ty(t,o,r)}function Ey(t,e,n,o,r){const i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let c=0,m=0;o.start<e.l?(c=(e.l-o.start)/i,t.l=Math.min(t.l,e.l-c)):o.end>e.r&&(c=(o.end-e.r)/i,t.r=Math.max(t.r,e.r+c)),r.start<e.t?(m=(e.t-r.start)/a,t.t=Math.min(t.t,e.t-m)):r.end>e.b&&(m=(r.end-e.b)/a,t.b=Math.max(t.b,e.b+m))}function wy(t,e,n){const o=t.drawingArea,{extra:r,additionalAngle:i,padding:a,size:c}=n,m=t.getPointPosition(e,o+r+a,i),C=Math.round(Pa(Yt(m.angle+Pt))),L=Ny(m.y,c.h,C),D=By(C),W=Ly(m.x,c.w,D);return{visible:!0,x:m.x,y:L,textAlign:D,left:W,top:L,right:W+c.w,bottom:L+c.h}}function Ay(t,e){if(!e)return!0;const{left:n,top:o,right:r,bottom:i}=t;return!(Nn({x:n,y:o},e)||Nn({x:n,y:i},e)||Nn({x:r,y:o},e)||Nn({x:r,y:i},e))}function Ty(t,e,n){const o=[],r=t._pointLabels.length,i=t.options,{centerPointLabels:a,display:c}=i.pointLabels,m={extra:Ta(i)/2,additionalAngle:a?It/r:0};let C;for(let L=0;L<r;L++){m.padding=n[L],m.size=e[L];const D=wy(t,L,m);o.push(D),c==="auto"&&(D.visible=Ay(D,C),D.visible&&(C=D))}return o}function By(t){return t===0||t===180?"center":t<180?"left":"right"}function Ly(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Ny(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Ry(t,e,n){const{left:o,top:r,right:i,bottom:a}=n,{backdropColor:c}=e;if(!vt(c)){const m=co(e.borderRadius),C=Jt(e.backdropPadding);t.fillStyle=c;const L=o-C.left,D=r-C.top,W=i-o+C.width,K=a-r+C.height;Object.values(m).some(X=>X!==0)?(t.beginPath(),lr(t,{x:L,y:D,w:W,h:K,radius:m}),t.fill()):t.fillRect(L,D,W,K)}}function Hy(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let r=e-1;r>=0;r--){const i=t._pointLabelItems[r];if(!i.visible)continue;const a=o.setContext(t.getPointLabelContext(r));Ry(n,a,i);const c=$t(a.font),{x:m,y:C,textAlign:L}=i;Io(n,t._pointLabels[r],m,C+c.lineHeight/2,c,{color:a.color,textAlign:L,textBaseline:"middle"})}}function sd(t,e,n,o){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,Tt);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=t.getPointPosition(a,e),r.lineTo(i.x,i.y)}}function Fy(t,e,n,o,r){const i=t.ctx,a=e.circular,{color:c,lineWidth:m}=e;!a&&!o||!c||!m||n<0||(i.save(),i.strokeStyle=c,i.lineWidth=m,i.setLineDash(r.dash||[]),i.lineDashOffset=r.dashOffset,i.beginPath(),sd(t,n,a,o),i.closePath(),i.stroke(),i.restore())}function Oy(t,e,n){return qn(t,{label:n,index:e,type:"pointLabel"})}class Zo extends wa{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Jt(Ta(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=qt(e)&&!isNaN(e)?e:0,this.max=qt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ta(this.options))}generateTickLabels(e){wa.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const r=wt(this.options.pointLabels.callback,[n,o],this);return r||r===0?r:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?Iy(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,r){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,r))}getIndexAngle(e){const n=Tt/(this._pointLabels.length||1),o=this.options.startAngle||0;return Yt(e*n+Cn(o))}getDistanceFromCenterForValue(e){if(vt(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(vt(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return Oy(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const r=this.getIndexAngle(e)-Pt+o;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:r,bottom:i}=this._pointLabelItems[e];return{left:n,top:o,right:r,bottom:i}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),sd(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:r,border:i}=n,a=this._pointLabels.length;let c,m,C;if(n.pointLabels.display&&Hy(this,a),r.display&&this.ticks.forEach((L,D)=>{if(D!==0||D===0&&this.min<0){m=this.getDistanceFromCenterForValue(L.value);const W=this.getContext(D),K=r.setContext(W),X=i.setContext(W);Fy(this,K,m,a,X)}}),o.display){for(e.save(),c=a-1;c>=0;c--){const L=o.setContext(this.getPointLabelContext(c)),{color:D,lineWidth:W}=L;!W||!D||(e.lineWidth=W,e.strokeStyle=D,e.setLineDash(L.borderDash),e.lineDashOffset=L.borderDashOffset,m=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),C=this.getPointPosition(c,m),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(C.x,C.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const r=this.getIndexAngle(0);let i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,m)=>{if(m===0&&this.min>=0&&!n.reverse)return;const C=o.setContext(this.getContext(m)),L=$t(C.font);if(i=this.getDistanceFromCenterForValue(this.ticks[m].value),C.showLabelBackdrop){e.font=L.string,a=e.measureText(c.label).width,e.fillStyle=C.backdropColor;const D=Jt(C.backdropPadding);e.fillRect(-a/2-D.left,-i-L.size/2-D.top,a+D.width,L.size+D.height)}Io(e,c.label,0,-i,L,{color:C.color,strokeColor:C.textStrokeColor,strokeWidth:C.textStrokeWidth})}),e.restore()}drawTitle(){}}Oe(Zo,"id","radialLinear"),Oe(Zo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ga.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Oe(Zo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Oe(Zo,"descriptors",{angleLines:{_fallback:"grid"}});const Pi={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}},tn=Object.keys(Pi);function Vs(t,e){return t-e}function Ps(t,e){if(vt(e))return null;const n=t._adapter,{parser:o,round:r,isoWeekday:i}=t._parseOpts;let a=e;return typeof o=="function"&&(a=o(a)),qt(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(r&&(a=r==="week"&&(ko(i)||i===!0)?n.startOf(a,"isoWeek",i):n.startOf(a,r)),+a)}function Ds(t,e,n,o){const r=tn.length;for(let i=tn.indexOf(t);i<r-1;++i){const a=Pi[tn[i]],c=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(c*a.size))<=o)return tn[i]}return tn[r-1]}function Vy(t,e,n,o,r){for(let i=tn.length-1;i>=tn.indexOf(n);i--){const a=tn[i];if(Pi[a].common&&t._adapter.diff(r,o,a)>=e-1)return a}return tn[n?tn.indexOf(n):0]}function Py(t){for(let e=tn.indexOf(t)+1,n=tn.length;e<n;++e)if(Pi[tn[e]].common)return tn[e]}function zs(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:r}=Da(n,e),i=n[o]>=e?n[o]:n[r];t[i]=!0}}function Dy(t,e,n,o){const r=t._adapter,i=+r.startOf(e[0].value,o),a=e[e.length-1].value;let c,m;for(c=i;c<=a;c=+r.add(c,1,o))m=n[c],m>=0&&(e[m].major=!0);return e}function Us(t,e,n){const o=[],r={},i=e.length;let a,c;for(a=0;a<i;++a)c=e[a],r[c]=a,o.push({value:c,major:!1});return i===0||!n?o:Dy(t,o,r,n)}class Ti extends Ao{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),r=this._adapter=new fm._date(e.adapters.date);r.init(n),Qo(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ps(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:r,max:i,minDefined:a,maxDefined:c}=this.getUserBounds();function m(C){!a&&!isNaN(C.min)&&(r=Math.min(r,C.min)),!c&&!isNaN(C.max)&&(i=Math.max(i,C.max))}(!a||!c)&&(m(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&m(this.getMinMax(!1))),r=qt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),o),i=qt(i)&&!isNaN(i)?i:+n.endOf(Date.now(),o)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,r=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,a=this.max,c=Hf(r,i,a);return this._unit=n.unit||(o.autoSkip?Ds(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):Vy(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Py(this._unit),this.initOffsets(r),e.reverse&&c.reverse(),Us(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?o=i:o=(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=Kt(n,0,a),o=Kt(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,r=this.options,i=r.time,a=i.unit||Ds(i.minUnit,n,o,this._getLabelCapacity(n)),c=st(r.ticks.stepSize,1),m=a==="week"?i.isoWeekday:!1,C=ko(m)||m===!0,L={};let D=n,W,K;if(C&&(D=+e.startOf(D,"isoWeek",m)),D=+e.startOf(D,C?"day":a),e.diff(o,n,a)>1e5*c)throw new Error(n+" and "+o+" are too far apart with stepSize of "+c+" "+a);const X=r.ticks.source==="data"&&this.getDataTimestamps();for(W=D,K=0;W<o;W=+e.add(W,c,a),K++)zs(L,W,X);return(W===o||r.bounds==="ticks"||K===1)&&zs(L,W,X),Object.keys(L).sort(Vs).map(ee=>+ee)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,i=this._unit,a=n||r[i];return this._adapter.format(e,a)}_tickFormatFunction(e,n,o,r){const i=this.options,a=i.ticks.callback;if(a)return wt(a,[e,n,o],this);const c=i.time.displayFormats,m=this._unit,C=this._majorUnit,L=m&&c[m],D=C&&c[C],W=o[n],K=C&&D&&W&&W.major;return this._adapter.format(e,r||(K?D:L))}generateTickLabels(e){let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n],r.label=this._tickFormatFunction(r.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,r=Cn(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(r),a=Math.sin(r),c=this._resolveTickFontOptions(0).size;return{w:o*i+c*a,h:o*a+c*i}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,r=o[n.unit]||o.millisecond,i=this._tickFormatFunction(e,0,Us(this,[e],this._majorUnit),r),a=this._getLabelSize(i),c=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,o=r.length;n<o;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const r=this.getLabels();for(n=0,o=r.length;n<o;++n)e.push(Ps(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Sc(e.sort(Vs))}}Oe(Ti,"id","time"),Oe(Ti,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ci(t,e,n){let o=0,r=t.length-1,i,a,c,m;n?(e>=t[o].pos&&e<=t[r].pos&&({lo:o,hi:r}=so(t,"pos",e)),{pos:i,time:c}=t[o],{pos:a,time:m}=t[r]):(e>=t[o].time&&e<=t[r].time&&({lo:o,hi:r}=so(t,"time",e)),{time:i,pos:c}=t[o],{time:a,pos:m}=t[r]);const C=a-i;return C?c+(m-c)*(e-i)/C:c}class Gs extends Ti{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ci(n,this.min),this._tableRange=ci(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,r=[],i=[];let a,c,m,C,L;for(a=0,c=e.length;a<c;++a)C=e[a],C>=n&&C<=o&&r.push(C);if(r.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,c=r.length;a<c;++a)L=r[a+1],m=r[a-1],C=r[a],Math.round((L+m)/2)!==C&&i.push({time:C,pos:a/(c-1)});return i}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((r,i)=>r-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(ci(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return ci(this._table,o*this._tableRange+this._minPos,!0)}}Oe(Gs,"id","timeseries"),Oe(Gs,"defaults",Ti.defaults);mn.register(mi,yi,pi,Ca,Mo,gi,_i,Xo,zn,Mi,Ci,Ea,Aa,Zo,by,fy,ay);const zy=t=>{const e=t.component.chart;e&&Object.assign(mn.defaults,e)},Uy=t=>{t.event.cssEvent.textbox_onBeforeFocus&&(ce.event.cssEvent.textbox_onBeforeFocus=t.event.cssEvent.textbox_onBeforeFocus),t.event.cssEvent.textbox_onAfterFocus&&(ce.event.cssEvent.textbox_onAfterFocus=t.event.cssEvent.textbox_onAfterFocus),t.event.cssEvent.textbox_onBeforeBlur&&(ce.event.cssEvent.textbox_onBeforeBlur=t.event.cssEvent.textbox_onBeforeBlur),t.event.cssEvent.textbox_onAfterBlur&&(ce.event.cssEvent.textbox_onAfterBlur=t.event.cssEvent.textbox_onAfterBlur),t.event.cssEvent.textbox_onBeforeClick&&(ce.event.cssEvent.textbox_onBeforeClick=t.event.cssEvent.textbox_onBeforeClick),t.event.cssEvent.textbox_onAfterClick&&(ce.event.cssEvent.textbox_onAfterClick=t.event.cssEvent.textbox_onAfterClick),t.event.cssEvent.textbox_onBeforeMouseover&&(ce.event.cssEvent.textbox_onBeforeMouseover=t.event.cssEvent.textbox_onBeforeMouseover),t.event.cssEvent.textbox_onAfterMouseover&&(ce.event.cssEvent.textbox_onAfterMouseover=t.event.cssEvent.textbox_onAfterMouseover),t.event.cssEvent.textbox_onBeforeMouseout&&(ce.event.cssEvent.textbox_onBeforeMouseout=t.event.cssEvent.textbox_onBeforeMouseout),t.event.cssEvent.textbox_onAfterMouseout&&(ce.event.cssEvent.textbox_onAfterMouseout=t.event.cssEvent.textbox_onAfterMouseout),t.event.cssEvent.textbox_onBeforeTouchstart&&(ce.event.cssEvent.textbox_onBeforeTouchstart=t.event.cssEvent.textbox_onBeforeTouchstart),t.event.cssEvent.textbox_onAfterTouchstart&&(ce.event.cssEvent.textbox_onAfterTouchstart=t.event.cssEvent.textbox_onAfterTouchstart),t.event.cssEvent.textbox_onBeforeTouchend&&(ce.event.cssEvent.textbox_onBeforeTouchend=t.event.cssEvent.textbox_onBeforeTouchend),t.event.cssEvent.textbox_onAfterTouchend&&(ce.event.cssEvent.textbox_onAfterTouchend=t.event.cssEvent.textbox_onAfterTouchend),t.event.cssEvent.button_onBeforeFocus&&(ce.event.cssEvent.button_onBeforeFocus=t.event.cssEvent.button_onBeforeFocus),t.event.cssEvent.button_onAfterFocus&&(ce.event.cssEvent.button_onAfterFocus=t.event.cssEvent.button_onAfterFocus),t.event.cssEvent.button_onBeforeBlur&&(ce.event.cssEvent.button_onBeforeBlur=t.event.cssEvent.button_onBeforeBlur),t.event.cssEvent.button_onAfterBlur&&(ce.event.cssEvent.button_onAfterBlur=t.event.cssEvent.button_onAfterBlur),t.event.cssEvent.button_onBeforeClick&&(ce.event.cssEvent.button_onBeforeClick=t.event.cssEvent.button_onBeforeClick),t.event.cssEvent.button_onAfterClick&&(ce.event.cssEvent.button_onAfterClick=t.event.cssEvent.button_onAfterClick),t.event.cssEvent.button_onBeforeMouseover&&(ce.event.cssEvent.button_onBeforeMouseover=t.event.cssEvent.button_onBeforeMouseover),t.event.cssEvent.button_onAfterMouseover&&(ce.event.cssEvent.button_onAfterMouseover=t.event.cssEvent.button_onAfterMouseover),t.event.cssEvent.button_onBeforeMouseout&&(ce.event.cssEvent.button_onBeforeMouseout=t.event.cssEvent.button_onBeforeMouseout),t.event.cssEvent.button_onAfterMouseout&&(ce.event.cssEvent.button_onAfterMouseout=t.event.cssEvent.button_onAfterMouseout),t.event.cssEvent.button_onBeforeTouchstart&&(ce.event.cssEvent.button_onBeforeTouchstart=t.event.cssEvent.button_onBeforeTouchstart),t.event.cssEvent.button_onAfterTouchstart&&(ce.event.cssEvent.button_onAfterTouchstart=t.event.cssEvent.button_onAfterTouchstart),t.event.cssEvent.button_onBeforeTouchend&&(ce.event.cssEvent.button_onBeforeTouchend=t.event.cssEvent.button_onBeforeTouchend),t.event.cssEvent.button_onAfterTouchend&&(ce.event.cssEvent.button_onAfterTouchend=t.event.cssEvent.button_onAfterTouchend),t.event.cssEvent.input_onBeforeFocus&&(ce.event.cssEvent.input_onBeforeFocus=t.event.cssEvent.input_onBeforeFocus),t.event.cssEvent.input_onAfterFocus&&(ce.event.cssEvent.input_onAfterFocus=t.event.cssEvent.input_onAfterFocus),t.event.cssEvent.input_onBeforeBlur&&(ce.event.cssEvent.input_onBeforeBlur=t.event.cssEvent.input_onBeforeBlur),t.event.cssEvent.input_onAfterBlur&&(ce.event.cssEvent.input_onAfterBlur=t.event.cssEvent.input_onAfterBlur),t.event.cssEvent.input_onBeforeMouseover&&(ce.event.cssEvent.input_onBeforeMouseover=t.event.cssEvent.input_onBeforeMouseover),t.event.cssEvent.input_onAfterMouseover&&(ce.event.cssEvent.input_onAfterMouseover=t.event.cssEvent.input_onAfterMouseover),t.event.cssEvent.input_onBeforeMouseout&&(ce.event.cssEvent.input_onBeforeMouseout=t.event.cssEvent.input_onBeforeMouseout),t.event.cssEvent.input_onAfterMouseout&&(ce.event.cssEvent.input_onAfterMouseout=t.event.cssEvent.input_onAfterMouseout),t.event.cssEvent.input_onBeforeTouchstart&&(ce.event.cssEvent.input_onBeforeTouchstart=t.event.cssEvent.input_onBeforeTouchstart),t.event.cssEvent.input_onAfterTouchstart&&(ce.event.cssEvent.input_onAfterTouchstart=t.event.cssEvent.input_onAfterTouchstart),t.event.cssEvent.input_onBeforeTouchend&&(ce.event.cssEvent.input_onBeforeTouchend=t.event.cssEvent.input_onBeforeTouchend),t.event.cssEvent.input_onAfterTouchend&&(ce.event.cssEvent.input_onAfterTouchend=t.event.cssEvent.input_onAfterTouchend),ce.componentStyle={size:t.componentStyle.size,filledColor:t.componentStyle.filledColor,emptyColor:t.componentStyle.emptyColor,filledTextColor:t.componentStyle.filledTextColor,emptyTextColor:t.componentStyle.emptyTextColor,primaryColor:t.componentStyle.primaryColor,mutedColor:t.componentStyle.mutedColor,infoColor:t.componentStyle.infoColor,successColor:t.componentStyle.successColor,dangerColor:t.componentStyle.dangerColor,warningColor:t.componentStyle.warningColor,invertColor:t.componentStyle.invertColor,minHeightS:t.componentStyle.minHeightS,minHeightM:t.componentStyle.minHeightM,minHeightL:t.componentStyle.minHeightL,minHeightXL:t.componentStyle.minHeightXL,fontSizeS:t.componentStyle.fontSizeS,fontSizeM:t.componentStyle.fontSizeM,fontSizeL:t.componentStyle.fontSizeL,fontSizeXL:t.componentStyle.fontSizeXL,primaryInvertColor:null,mutedInvertColor:null,infoInvertColor:null,successInvertColor:null,dangerInvertColor:null,warningInvertColor:null,filledInvertColor:null,emptyInvertColor:null,filledTextInvertColor:null,emptyTextInvertColor:null,componentColor:{primary:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},muted:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},info:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},success:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},danger:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},warning:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null}}},ce.componentConfig={filesetSize:t.component.filesetSize??1/0,filesetTotalSize:t.component.filesetTotalSize??1/0};const e=Yu(t),n=qu(t);ce.note=e,ce.grid=n,zy(t),ce.component={accordionList:{},baggieList:{},bannerList:{},buttonList:{},calendarList:{},captionList:{},chartList:{},drawerList:{},dropdownList:{},filesetList:{},gapList:{},imageboxList:{},inputList:{},inputGroupList:{},labelList:{},layoutList:{},listList:{},modalList:{},paginationList:{},paragraphList:{},popupList:{},spinnerList:{},tableList:{}}};function Bt(t,e){return ao.defineComponent({name:`${e}SSRWrapper`,setup(n,{slots:o,attrs:r}){const i=ao.ref(null);return ao.onMounted(async()=>{const a=await t();i.value=ao.markRaw(a.default)}),()=>i.value?ao.h(i.value,{...r},o):null}})}const Ba=ao.ref("pc"),Gy=()=>ao.readonly(Ba),jy=()=>{if(typeof window>"u")return;const t=()=>{const e=tu(window.innerWidth);Ba.value!==e&&(Ba.value=e)};t(),window.addEventListener("resize",()=>{requestAnimationFrame(t)})},Bi="rgba(19,70,134,1)",cd="rgba(158,158,158,1)",dd="rgba(96,150,180,1)",ud="rgba(95,141,78,1)",fd="rgba(247,113,109,1)",hd="rgba(255,193,98,1)",Ja="rgba(48,48,48,1)",Za="rgba(255,255,255,1)",md="rgba(255,255,255,1)",La=()=>{const t=Ra.getVanillanoteConfig(),e=Na.getVanillagridConfig();e.footerFormula={$$COUNT_CHECK:function(r){let i=0;return r.forEach(a=>{a==="Y"&&(i=i+1)}),String(i)}},e.dataType={img:{cellStyle:{justifyContent:"center",textAlign:"center",padding:"0"},onSelected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.setProperty("opacity","0.2")},onUnselected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.removeProperty("opacity")},getValue:function(r,i){return i||null},getText:function(r,i){return i?i.alt:null},getChildNode:function(r,i){const a=document.createElement("span");if(!i||!i.value)return a;a.style.display="flex",a.style.alignItems="center",a.style.position="relative",a.style.overflow="hidden",a.style.width="100%";const c=document.createElement("img"),m=document.createElement("span");return c.style.width="100%",c.style.zIndex="1",c.src=i.value.src,c.alt=i.text,m.style.position="absolute",m.style.fontSize="12px",$s(dn(un.component.getGrid(r).getGridInfo().cssInfo.selectCellBackColor))?m.style.color="black":m.style.color="white",m.style.textAlign="left",m.style.display="inline-block",m.style.width="100%",m.style.whiteSpace="normal",m.style.wordBreak="break-all",m.textContent=i.text,c.gridId=r,c.cellRow=i.rowIndex,c.cellCol=i.colIndex,a.append(c),a.append(m),a.addEventListener("click",function(C){un.component.getGrid(r).setTargetCell(C.target.cellRow,C.target.cellCol)}),a.addEventListener("dblclick",function(C){un.component.getGrid(r).editCell(C.target.cellRow,C.target.cellCol)}),a},getEditor:function(r,i,a,c,m){if(!a.value)return null;const C=document.createElement("input");return C.setAttribute("type","text"),C.style.width=r.offsetWidth+"px",C.style.height=r.scrollHeight+C.offsetHeight-C.clientHeight+"px",C.style.position="absolute",C.style.zIndex="200",C.value=a.text,C.addEventListener("keydown",function(L){switch(L.key){case"Enter":c(),L.stopPropagation(),L.preventDefault();break;case"Escape":m(),L.stopPropagation(),L.preventDefault();break;case"Tab":c(),L.stopPropagation(),L.preventDefault();break;case"F2":c(),L.stopPropagation(),L.preventDefault();break}}),C},getEditedValue:function(r,i,a){if(!a.value)return null;const c=a.value;return c.alt=r.value,c},getFilterValue:function(r,i){return i?"title : "+i.alt:null},getSortValue:function(r,i){return i?i.alt:null},getCopyValue:function(r,i){return i?i.alt:null},getPasteValue:function(r,i,a){if(!i.value)return null;const c=i.value;return c.alt=a,c}},radio:{cellStyle:{justifyContent:"center",textAlign:"center"},onSelectedAndKeyDown:function(r,i,a){return(r.key==="Enter"||r.key===" ")&&(un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0),r.stopPropagation(),r.preventDefault()),!1},onClick:function(r,i,a){un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0)},getValue:function(r,i){return i},getText:function(r,i){return i==="Y"?"true":"false"},getChildNode:function(r,i){const a=document.createElement("input");return a.setAttribute("type","radio"),a.setAttribute("name",i.name?i.name:i.colIndex),a.setAttribute("value",""+i.rowIndex),a._gridId=r,a.rowIndex=i.rowIndex,a.colIndex=i.colIndex,a.checked=i.value==="Y",a},getFilterValue:function(r,i){return i==="Y"?"●":"○"}},tree:{cellStyle:{justifyContent:"left",textAlign:"left"},getValue:function(r,i){return i.constructor===Object?i:{title:i,toggle:!1}},getText:function(r,i){return i?i.title:null},getChildNode:function(r,i){if(!i.value)return document.createElement("span");const a=document.createElement("div");a.style.width="100%";const c=document.createElement("span");c.textContent=i.text,c.style.display="inline-block",c.style.marginLeft="10px",c.style.maxWidth="90%",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.addEventListener("click",D=>{L(D,r,i)});const m=document.createElement("span");m.classList.add("far"),i.value.toggle?m.textContent="-":m.textContent="+",m.style.fontSize="0.85em",m.addEventListener("click",D=>{L(D,r,i)});const C=un.component.getGrid(r);i.colIndex+1<=C.getColCount()&&C.getCellDataType(i.rowIndex,i.colIndex+1)!=="tree"&&(i.value.toggle?C.setCellDataType(i.rowIndex,i.colIndex+1,C.getColDataType(i.colIndex+1)):C.setCellDataType(i.rowIndex,i.colIndex+1,"none"));for(let D=i.colIndex;D>3;D--)if(C.getCellDataType(i.rowIndex,D)==="tree"){const W=C.getCellValue(i.rowIndex,D-1);W&&!W.toggle&&(c.textContent="...");break}(i.rowIndex===1||i.rowIndex>1&&C.getCellText(i.rowIndex-1,i.colIndex)!==i.text)&&(a.append(m),a.append(c));function L(D,W,K){const X=un.component.getGrid(W),ee=!K.value.toggle;function re(ye,xe){let ke;const ve=X.getCellText(ye,xe);if(ye===1)ke=ye;else for(let Me=ye;Me>1;Me--)if(X.getCellText(Me,xe)===ve){ke=Me;break}const Ee={title:ve,toggle:!0};for(let Me=ke;Me<=X.getRowCount()&&ve===X.getCellText(Me,xe);Me++)if(X.setCellValue(Me,xe,Ee),Me!==ke)X.getCellDataType(Me,xe+1)==="tree"?(Me===1||X.getCellText(Me,xe+1)!==X.getCellText(Me-1,xe+1))&&X.setRowVisible(Me,!0):X.setRowVisible(Me,!0);else for(let Ie=xe+1;Ie<=X.getColCount();Ie++)if(X.getCellDataType(Me,Ie)==="tree"){X.setCellValue(Me,Ie,X.getCellValue(Me,Ie));break}}function fe(ye,xe){let ke=ye;const ve=X.getCellText(ye,xe);if(ve)for(let Ee=ke;Ee<=X.getRowCount()&&ve===X.getCellText(Ee,xe);Ee++){Ee!==ke&&X.setRowVisible(Ee,!1);for(let Me=xe;Me<=X.getColCount();Me++)if(X.getCellDataType(Ee,Me)==="tree"){const Ie=X.getCellValue(Ee,Me);Ie&&(Ie.toggle=!1,X.setCellValue(Ee,Me,Ie))}}}if(ee)for(let ye=K.colIndex;ye>2;ye--)re(K.rowIndex,ye);else fe(K.rowIndex,K.colIndex)}return a}},none:{getChildNode:function(r,i){return document.createElement("span")}}};const n=mn.defaults;return{dateFormat:en.DateFormat["yyyy-MM-dd"],timeFormat:en.TimeFormat["HH:mm:ss"],datetimeFormat:en.DateTimeFormat["yyyy-MM-dd HH:mm:ss"],yearFormat:en.YearFormat.yyyy,monthFormat:en.MonthFormat.M,yearMonthFormat:en.YearMonthFormat["yyyy-MM"],dayFormat:en.DayFormat.d,dayOfWeekFormat:en.DayOfWeekFormat.d,hourFormat:en.HourFormat.h,hourMinuteFormat:en.HourMinuteFormat["hh:mm"],minuteFormat:en.MinuteFormat.m,secondFormat:en.SecondFormat.s,numberFormat:"#,##0.##",LESSOREQ_0X7FF_BYTE:2,LESSOREQ_0XFFFF_BYTE:3,GREATER_0XFFFF_BYTE:4,shieldURL:"",exposeIpList:["0:0:0:0:0:0:0:1"],isFreeze:!0,isPossibleGoBack:!1,isPossibleOpenDevTool:!1,doDetectDevTool(){},convertValue(r){return r},protocol:"http://",domain:"localhost:8080",controllerPath:"/hison-api-link",timeout:1e4,webSocketProtocol:"ws://",webSocketEndPoint:"/hison-websocket-endpoint",cachingLimit:10,beforeGetRequest(r,i){return!0},beforePostRequest(r,i){return!0},beforePutRequest(r,i){return!0},beforePatchRequest(r,i){return!0},beforeDeleteRequest(r,i){return!0},afterGetRequest(r){return!0},afterPostRequest(r){return!0},afterPutRequest(r){return!0},afterPatchRequest(r){return!0},afterDeleteRequest(r){return!0},beforeGetUrlRequest(r,i){return!0},beforePostUrlRequest(r,i,a){return!0},beforePutUrlRequest(r,i,a){return!0},beforePatchUrlRequest(r,i,a){return!0},beforeDeleteUrlRequest(r,i,a){return!0},afterGetUrlRequest(r){return!0},afterPostUrlRequest(r){return!0},afterPutUrlRequest(r){return!0},afterPatchUrlRequest(r){return!0},afterDeleteUrlRequest(r){return!0},interceptApiResult(r,i){return!0},interceptApiError(r){return!0},component:{note:t,grid:e,chart:n,filesetTotalSize:1/0,filesetSize:1/0},componentStyle:{size:lo.m,filledColor:Bi,emptyColor:md,filledTextColor:Za,emptyTextColor:Ja,primaryColor:Bi,mutedColor:cd,infoColor:dd,successColor:ud,dangerColor:fd,warningColor:hd,invertColor:!1,minHeightS:1.7,minHeightM:1.95,minHeightL:2.25,minHeightXL:2.55,fontSizeS:.7,fontSizeM:.75,fontSizeL:.85,fontSizeXL:1},event:{cssEvent:{textbox_onBeforeFocus:r=>!0,textbox_onAfterFocus:r=>{},textbox_onBeforeBlur:r=>!0,textbox_onAfterBlur:r=>{},textbox_onBeforeClick:r=>!0,textbox_onAfterClick:r=>{},textbox_onBeforeMouseover:r=>!0,textbox_onAfterMouseover:r=>{},textbox_onBeforeMouseout:r=>!0,textbox_onAfterMouseout:r=>{},textbox_onBeforeTouchstart:r=>!0,textbox_onAfterTouchstart:r=>{},textbox_onBeforeTouchend:r=>!0,textbox_onAfterTouchend:r=>{},button_onBeforeFocus:r=>!0,button_onAfterFocus:r=>{},button_onBeforeBlur:r=>!0,button_onAfterBlur:r=>{},button_onBeforeClick:r=>!0,button_onAfterClick:r=>{},button_onBeforeMouseover:r=>!0,button_onAfterMouseover:r=>{},button_onBeforeMouseout:r=>!0,button_onAfterMouseout:r=>{},button_onBeforeTouchstart:r=>!0,button_onAfterTouchstart:r=>{},button_onBeforeTouchend:r=>!0,button_onAfterTouchend:r=>{},input_onBeforeFocus:r=>!0,input_onAfterFocus:r=>{},input_onBeforeBlur:r=>!0,input_onAfterBlur:r=>{},input_onBeforeMouseover:r=>!0,input_onAfterMouseover:r=>{},input_onBeforeMouseout:r=>!0,input_onAfterMouseout:r=>{},input_onBeforeTouchstart:r=>!0,input_onAfterTouchstart:r=>{},input_onBeforeTouchend:r=>!0,input_onAfterTouchend:r=>{}}}}},gd=()=>{const t=ce.componentStyle;t.primaryColor=t.primaryColor?dn(t.primaryColor):Bi,t.mutedColor=t.mutedColor?dn(t.mutedColor):cd,t.infoColor=t.infoColor?dn(t.infoColor):dd,t.successColor=t.successColor?dn(t.successColor):ud,t.dangerColor=t.dangerColor?dn(t.dangerColor):fd,t.warningColor=t.warningColor?dn(t.warningColor):hd,t.filledColor=t.filledColor?dn(t.filledColor):Bi,t.emptyColor=t.emptyColor?dn(t.emptyColor):md,t.filledTextColor=t.filledTextColor?dn(t.filledTextColor):Za,t.emptyTextColor=t.emptyTextColor?dn(t.emptyTextColor):Ja,t.primaryInvertColor=hn(t.primaryColor),t.mutedInvertColor=hn(t.mutedColor),t.infoInvertColor=hn(t.infoColor),t.successInvertColor=hn(t.successColor),t.dangerInvertColor=hn(t.dangerColor),t.warningInvertColor=hn(t.warningColor),t.filledInvertColor=hn(t.filledColor),t.emptyInvertColor=hn(t.emptyColor),t.filledTextInvertColor=hn(t.filledTextColor),t.emptyTextInvertColor=hn(t.emptyTextColor);const e=t.componentColor;vo(e.primary,t.invertColor?t.primaryInvertColor:t.primaryColor),vo(e.muted,t.invertColor?t.mutedInvertColor:t.mutedColor),vo(e.info,t.invertColor?t.infoInvertColor:t.infoColor),vo(e.success,t.invertColor?t.successInvertColor:t.successColor),vo(e.danger,t.invertColor?t.dangerInvertColor:t.dangerColor),vo(e.warning,t.invertColor?t.warningInvertColor:t.warningColor);const n=`
78
78
  :root {
79
79
  --hison-filledColor: ${t.invertColor?t.filledInvertColor:t.filledColor};
80
80
  --hison-emptyColor: ${t.invertColor?t.emptyInvertColor:t.emptyColor};
@@ -150,4 +150,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
150
150
  --hison-l-font-size: ${t.fontSizeL};
151
151
  --hison-xl-font-size: ${t.fontSizeXL};
152
152
  }
153
- `.trim(),o="hisonvue-css-variables";let r=document.getElementById(o);r&&r.remove(),r=document.createElement("style"),r.id=o,r.textContent=n,document.head.appendChild(r)},Wy=(t,e)=>{qd(t,e),t.setMaxFilesetSize=o=>{ce.componentConfig.filesetSize=o},t.setMaxFilesetTotalSize=o=>{ce.componentConfig.filesetTotalSize=o},t.getMaxFilesetSize=()=>ce.componentConfig.filesetSize,t.getMaxFilesetTotalSize=()=>ce.componentConfig.filesetTotalSize,t.cssEvent={setButtonOnBefoerFocus(o){ce.event.cssEvent.button_onBeforeFocus=o},setButtonOnAfterFocus(o){ce.event.cssEvent.button_onAfterFocus=o},setButtonOnBefoerBlur(o){ce.event.cssEvent.button_onBeforeBlur=o},setButtonOnAfterBlur(o){ce.event.cssEvent.button_onAfterBlur=o},setButtonOnBefoerClick(o){ce.event.cssEvent.button_onBeforeClick=o},setButtonOnAfterClick(o){ce.event.cssEvent.button_onAfterClick=o},setButtonOnBeforeMouseover(o){ce.event.cssEvent.button_onBeforeMouseover=o},setButtonOnAfterMouseover(o){ce.event.cssEvent.button_onAfterMouseover=o},setButtonOnBeforeMouseout(o){ce.event.cssEvent.button_onBeforeMouseout=o},setButtonOnAfterMouseout(o){ce.event.cssEvent.button_onAfterMouseout=o},setButtonOnBeforeTouchstart(o){ce.event.cssEvent.button_onBeforeTouchstart=o},setButtonOnAfterTouchstart(o){ce.event.cssEvent.button_onAfterTouchstart=o},setButtonOnBeforeTouchend(o){ce.event.cssEvent.button_onBeforeTouchend=o},setButtonOnAfterTouchend(o){ce.event.cssEvent.button_onAfterTouchend=o},setInputOnBefoerFocus(o){ce.event.cssEvent.input_onBeforeFocus=o},setInputOnAfterFocus(o){ce.event.cssEvent.input_onAfterFocus=o},setInputOnBefoerBlur(o){ce.event.cssEvent.input_onBeforeBlur=o},setInputOnAfterBlur(o){ce.event.cssEvent.input_onAfterBlur=o},setInputOnBeforeMouseover(o){ce.event.cssEvent.input_onBeforeMouseover=o},setInputOnAfterMouseover(o){ce.event.cssEvent.input_onAfterMouseover=o},setInputOnBeforeMouseout(o){ce.event.cssEvent.input_onBeforeMouseout=o},setInputOnAfterMouseout(o){ce.event.cssEvent.input_onAfterMouseout=o},setInputOnBeforeTouchstart(o){ce.event.cssEvent.input_onBeforeTouchstart=o},setInputOnAfterTouchstart(o){ce.event.cssEvent.input_onAfterTouchstart=o},setInputOnBeforeTouchend(o){ce.event.cssEvent.input_onBeforeTouchend=o},setInputOnAfterTouchend(o){ce.event.cssEvent.input_onAfterTouchend=o}};const n=()=>{typeof window<"u"&&(gd(),gu())};t.style={setSize(o){ce.componentStyle.size=o,n()},setFilledColor(o){ce.componentStyle.filledColor=o,n()},setEmptyColor(o){ce.componentStyle.emptyColor=o,n()},setFilledTextColor(o){ce.componentStyle.filledTextColor=o,n()},setEmptyTextColor(o){ce.componentStyle.emptyTextColor=o,n()},setPrimaryColor(o){ce.componentStyle.primaryColor=o,n()},setMutedColor(o){ce.componentStyle.mutedColor=o,n()},setInfoColor(o){ce.componentStyle.infoColor=o,n()},setSuccessColor(o){ce.componentStyle.successColor=o,n()},setDangerColor(o){ce.componentStyle.dangerColor=o,n()},setWarningColor(o){ce.componentStyle.warningColor=o,n()},setInvertColor(o){ce.componentStyle.invertColor=o,n()},getFilledColor(){return ce.componentStyle.filledColor},getEmptyColor(){return ce.componentStyle.emptyColor},getFilledTextColor(){return ce.componentStyle.filledTextColor},getEmptyTextColor(){return ce.componentStyle.emptyTextColor},getPrimaryColor(){return ce.componentStyle.primaryColor},getPrimaryButtonColor(){return ce.componentStyle.componentColor.primary.buttonColor},getPrimaryBorderColor(){return ce.componentStyle.componentColor.primary.borderColor},getPrimaryShadowColor(){return ce.componentStyle.componentColor.primary.shadowColor},getPrimaryHoverColor(){return ce.componentStyle.componentColor.primary.hoverColor},getPrimaryActiveColor(){return ce.componentStyle.componentColor.primary.activeColor},getPrimaryRowHoverColor(){return ce.componentStyle.componentColor.primary.rowHoverColor},getPrimaryStripeColor(){return ce.componentStyle.componentColor.primary.stripeColor},getMutedColor(){return ce.componentStyle.mutedColor},getMutedButtonColor(){return ce.componentStyle.componentColor.muted.buttonColor},getMutedBorderColor(){return ce.componentStyle.componentColor.muted.borderColor},getMutedShadowColor(){return ce.componentStyle.componentColor.muted.shadowColor},getMutedHoverColor(){return ce.componentStyle.componentColor.muted.hoverColor},getMutedActiveColor(){return ce.componentStyle.componentColor.muted.activeColor},getMutedRowHoverColor(){return ce.componentStyle.componentColor.muted.rowHoverColor},getMutedStripeColor(){return ce.componentStyle.componentColor.muted.stripeColor},getInfoColor(){return ce.componentStyle.infoColor},getInfoButtonColor(){return ce.componentStyle.componentColor.info.buttonColor},getInfoBorderColor(){return ce.componentStyle.componentColor.info.borderColor},getInfoShadowColor(){return ce.componentStyle.componentColor.info.shadowColor},getInfoHoverColor(){return ce.componentStyle.componentColor.info.hoverColor},getInfoActiveColor(){return ce.componentStyle.componentColor.info.activeColor},getInfoRowHoverColor(){return ce.componentStyle.componentColor.info.rowHoverColor},getInfoStripeColor(){return ce.componentStyle.componentColor.info.stripeColor},getSuccessColor(){return ce.componentStyle.successColor},getSuccessButtonColor(){return ce.componentStyle.componentColor.success.buttonColor},getSuccessBorderColor(){return ce.componentStyle.componentColor.success.borderColor},getSuccessShadowColor(){return ce.componentStyle.componentColor.success.shadowColor},getSuccessHoverColor(){return ce.componentStyle.componentColor.success.hoverColor},getSuccessActiveColor(){return ce.componentStyle.componentColor.success.activeColor},getSuccessRowHoverColor(){return ce.componentStyle.componentColor.success.rowHoverColor},getSuccessStripeColor(){return ce.componentStyle.componentColor.success.stripeColor},getDangerColor(){return ce.componentStyle.dangerColor},getDangerButtonColor(){return ce.componentStyle.componentColor.danger.buttonColor},getDangerBorderColor(){return ce.componentStyle.componentColor.danger.borderColor},getDangerShadowColor(){return ce.componentStyle.componentColor.danger.shadowColor},getDangerHoverColor(){return ce.componentStyle.componentColor.danger.hoverColor},getDangerActiveColor(){return ce.componentStyle.componentColor.danger.activeColor},getDangerRowHoverColor(){return ce.componentStyle.componentColor.danger.rowHoverColor},getDangerStripeColor(){return ce.componentStyle.componentColor.danger.stripeColor},getWarningColor(){return ce.componentStyle.warningColor},getWarningButtonColor(){return ce.componentStyle.componentColor.warning.buttonColor},getWarningBorderColor(){return ce.componentStyle.componentColor.warning.borderColor},getWarningShadowColor(){return ce.componentStyle.componentColor.warning.shadowColor},getWarningHoverColor(){return ce.componentStyle.componentColor.warning.hoverColor},getWarningActiveColor(){return ce.componentStyle.componentColor.warning.activeColor},getWarningRowHoverColor(){return ce.componentStyle.componentColor.warning.rowHoverColor},getWarningStripeColor(){return ce.componentStyle.componentColor.warning.stripeColor},isInvertColor(){return ce.componentStyle.invertColor}},t.component={},t.component.getAccordion=o=>ce.component.accordionList[o],t.component.getBaggie=o=>ce.component.baggieList[o],t.component.getBanner=o=>ce.component.bannerList[o],t.component.getButton=o=>ce.component.buttonList[o],t.component.getCalendar=o=>ce.component.calendarList[o],t.component.getCaption=o=>ce.component.captionList[o],t.component.getChart=o=>ce.component.chartList[o],t.component.getDrawer=o=>ce.component.drawerList[o],t.component.getDropdown=o=>ce.component.dropdownList[o],t.component.getGap=o=>ce.component.gapList[o],t.component.getFileset=o=>ce.component.filesetList[o],t.component.getGrid=o=>ce.grid.getGrid(o),t.component.getImagebox=o=>ce.component.imageboxList[o],t.component.getInput=o=>ce.component.inputList[o],t.component.getInputGroup=o=>ce.component.inputGroupList[o],t.component.getLabel=o=>ce.component.labelList[o],t.component.getLayout=o=>ce.component.layoutList[o],t.component.getList=o=>ce.component.listList[o],t.component.getModal=o=>ce.component.modalList[o],t.component.getNote=o=>ce.note.getNote(o),t.component.getPagination=o=>ce.component.paginationList[o],t.component.getParagraph=o=>ce.component.paragraphList[o],t.component.getPopup=o=>ce.component.popupList[o],t.component.getSpinner=o=>ce.component.spinnerList[o],t.component.getTable=o=>ce.component.tableList[o]},yd=Bt(()=>Promise.resolve().then(()=>require("./HAccordion-FatqOgy2.js")),"HAccordion"),pd=Bt(()=>Promise.resolve().then(()=>require("./HBaggie-DWSes7QC.js")),"HBaggie"),_d=Bt(()=>Promise.resolve().then(()=>require("./HBanner-D2IVlykU.js")),"HBanner"),vd=Bt(()=>Promise.resolve().then(()=>require("./HButton-D3aVYVY3.js")),"HButton"),bd=Bt(()=>Promise.resolve().then(()=>require("./HCalendar-BB0XyvZV.js")),"HCalendar"),Cd=Bt(()=>Promise.resolve().then(()=>require("./HCaption-2Wpf8L9R.js")),"HCaption"),Md=Bt(()=>Promise.resolve().then(()=>require("./HChart-BEe_bo5V.js")),"HChart"),xd=Bt(()=>Promise.resolve().then(()=>require("./HDrawer-CWkLJyMS.js")),"HDrawer"),Sd=Bt(()=>Promise.resolve().then(()=>require("./HDropdown-DTaeDC5I.js")),"HDropdown"),kd=Bt(()=>Promise.resolve().then(()=>require("./HFileset-CWDMfYdY.js")),"HFileset"),Id=Bt(()=>Promise.resolve().then(()=>require("./HGap-Bcl_WYxa.js")),"HGap"),Ed=Bt(()=>Promise.resolve().then(()=>require("./HGrid-f8xHSk9C.js")),"HGrid"),wd=Bt(()=>Promise.resolve().then(()=>require("./HImagebox-DIYXXh95.js")),"HImagebox"),Ad=Bt(()=>Promise.resolve().then(()=>require("./HInput-PgalO88P.js")),"HInput"),Td=Bt(()=>Promise.resolve().then(()=>require("./HInputGroup-XryXR-6k.js")),"HInputGroup"),Bd=Bt(()=>Promise.resolve().then(()=>require("./HLabel-CbQeG2R3.js")),"HLabel"),Ld=Bt(()=>Promise.resolve().then(()=>require("./HLayout-CUwfApcb.js")),"HLayout"),Nd=Bt(()=>Promise.resolve().then(()=>require("./HList-DCupvbju.js")),"HList"),Rd=Bt(()=>Promise.resolve().then(()=>require("./HModal-eniLW2gp.js")),"HModal"),Hd=Bt(()=>Promise.resolve().then(()=>require("./HNote-DzeszCEe.js")),"HNote"),Fd=Bt(()=>Promise.resolve().then(()=>require("./HPagination-BS4l4xGP.js")),"HPagination"),Od=Bt(()=>Promise.resolve().then(()=>require("./HParagraph-DPFx64UD.js")),"HParagraph"),Vd=Bt(()=>Promise.resolve().then(()=>require("./HPopup-NBwn8RA4.js")),"HPopup"),Pd=Bt(()=>Promise.resolve().then(()=>require("./HSpinner-CMsmFVOv.js")),"HSpinner"),Dd=Bt(()=>Promise.resolve().then(()=>require("./HTable-Dweedemn.js")),"HTable"),ce={event:{cssEvent:{}}},un=en.createHison(),qy={install(t,e){const n=La();e?Object.keys(n).forEach(o=>{o in e||(e[o]=n[o])}):e=La(),Uy(e),Wy(un,e),typeof window<"u"&&gd(),jy(),t.provide("hison",un),t.component("HAccordion",yd),t.component("HBaggie",pd),t.component("HBanner",_d),t.component("HButton",vd),t.component("HCalendar",bd),t.component("HCaption",Cd),t.component("HChart",Md),t.component("HDrawer",xd),t.component("HDropdown",Sd),t.component("HFileset",kd),t.component("HGap",Id),t.component("HGrid",Ed),t.component("HImagebox",wd),t.component("HInput",Ad),t.component("HInputGroup",Td),t.component("HLabel",Bd),t.component("HLayout",Ld),t.component("HList",Nd),t.component("HModal",Rd),t.component("HNote",Hd),t.component("HPagination",Fd),t.component("HParagraph",Od),t.component("HPopup",Vd),t.component("HSpinner",Pd),t.component("HTable",Dd)}};exports.BACKGROUND_TYPE_VALUES=Mu;exports.BACK_IMAGE_ALIGN_VALUES=vu;exports.BACK_IMAGE_STYLE_VALUES=Cu;exports.BACK_IMAGE_VERTICAL_ALIGN_VALUES=bu;exports.BackImageAlign=Ks;exports.BackImageRepeat=Js;exports.BackImageVerticalAlign=Xs;exports.BackgroundType=Zs;exports.COLOR_SET_VALUES=Pu;exports.CSS_VAR_RE=uc;exports.Chart=mn;exports.Color=Ys;exports.DATA_STATUS_VALUES=zu;exports.DROPDOWN_TRIGGER_VALUES=Lu;exports.DataStatus=fc;exports.DayOfWeek=hc;exports.DropdownTrigger=sc;exports.EDIT_MODE_VALUES=Bu;exports.EditMode=lc;exports.GRID_ALIGN_VALUES=Ou;exports.GRID_DATE_FORMAT_VALUES=Hu;exports.GRID_MONTH_FORMAT_VALUES=Fu;exports.GRID_VERTICAL_ALIGN_VALUES=Vu;exports.HAccordionClientOnly=yd;exports.HBaggieClientOnly=pd;exports.HBannerClientOnly=_d;exports.HButtonClientOnly=vd;exports.HCalendarClientOnly=bd;exports.HCalendarTimeFormat=gc;exports.HCalendarView=mc;exports.HCaptionClientOnly=Cd;exports.HChartClientOnly=Md;exports.HDrawerClientOnly=xd;exports.HDropdownClientOnly=Sd;exports.HEX_COLOR_RE=dc;exports.HFilesetClientOnly=kd;exports.HGapClientOnly=Id;exports.HGapLine=rc;exports.HGapLineStyle=ic;exports.HGridClientOnly=Ed;exports.HImageboxClientOnly=wd;exports.HInputClientOnly=Ad;exports.HInputGroupClientOnly=Td;exports.HLabelClientOnly=Bd;exports.HLayoutClientOnly=Ld;exports.HListClientOnly=Nd;exports.HModalClientOnly=Rd;exports.HNoteClientOnly=Hd;exports.HPaginationClientOnly=Fd;exports.HParagraphClientOnly=Od;exports.HPopupClientOnly=Vd;exports.HSpinnerClientOnly=Pd;exports.HTableClientOnly=Dd;exports.H_CALENDAR_TIME_FORMAT_VALUES=Gu;exports.H_CALENDAR_VIEW_VALUES=Uu;exports.H_GAP_LINE_STYLE_VALUES=Au;exports.H_GAP_RULE_VALUES=wu;exports.Hisonjs_bundleExports=en;exports.INPUT_TYPE_VALUES=Tu;exports.InputType=ac;exports.MODAL_PLACEMENT_VALUES=xu;exports.ModalPlacement=Qs;exports.NOTE_MODE_BY_DEVICE_VALUES=ju;exports.SCREEN_POSITION_VALUES=Su;exports.SELECTION_POLICY_VALUES=Ru;exports.SPINNER_TYPE_VALUES=ku;exports.ScreenPosition=ec;exports.Size=lo;exports.SpinnerType=tc;exports.TEXT_ALIGN_VALUES=Nu;exports.TOOL_POSITION_VALUES=Wu;exports.TextAlign=cc;exports.VERTICAL_ALIGN_VALUES=Iu;exports.Vanillagrid2_bundleExports=Na;exports.Vanillanote2_bundleExports=Ra;exports.VerticalAlign=nc;exports.WHITE_SPACE_VALUES=Eu;exports.WhiteSpace=oc;exports.addComponentNameToClass=iu;exports.applyOpacityToRgba=fu;exports.extractPrefixedClasses=au;exports.extractResponsiveClasses=ru;exports.getDefaultHisonConfig=La;exports.getDigitsOnly=eu;exports.getHexCodeFromColorText=cu;exports.getIndexSpecificClassNameFromClassList=js;exports.getInvertColor=hn;exports.getMaskValue=Qd;exports.getRGBAFromColorText=du;exports.getSpecificClassValueFromClassList=ou;exports.getUUID=Xd;exports.hison=un;exports.hisonCloser=ce;exports.hisonvue=qy;exports.isCssColorLike=Du;exports.isNullOrUndefined=Kd;exports.normalizeToRgba=dn;exports.registerReloadable=hu;exports.reloadHisonComponent=yu;exports.toClassString=Ws;exports.unregisterReloadable=mu;exports.useDevice=Gy;
153
+ `.trim(),o="hisonvue-css-variables";let r=document.getElementById(o);r&&r.remove(),r=document.createElement("style"),r.id=o,r.textContent=n,document.head.appendChild(r)},Wy=(t,e)=>{qd(t,e),t.setMaxFilesetSize=o=>{ce.componentConfig.filesetSize=o},t.setMaxFilesetTotalSize=o=>{ce.componentConfig.filesetTotalSize=o},t.getMaxFilesetSize=()=>ce.componentConfig.filesetSize,t.getMaxFilesetTotalSize=()=>ce.componentConfig.filesetTotalSize,t.cssEvent={setButtonOnBefoerFocus(o){ce.event.cssEvent.button_onBeforeFocus=o},setButtonOnAfterFocus(o){ce.event.cssEvent.button_onAfterFocus=o},setButtonOnBefoerBlur(o){ce.event.cssEvent.button_onBeforeBlur=o},setButtonOnAfterBlur(o){ce.event.cssEvent.button_onAfterBlur=o},setButtonOnBefoerClick(o){ce.event.cssEvent.button_onBeforeClick=o},setButtonOnAfterClick(o){ce.event.cssEvent.button_onAfterClick=o},setButtonOnBeforeMouseover(o){ce.event.cssEvent.button_onBeforeMouseover=o},setButtonOnAfterMouseover(o){ce.event.cssEvent.button_onAfterMouseover=o},setButtonOnBeforeMouseout(o){ce.event.cssEvent.button_onBeforeMouseout=o},setButtonOnAfterMouseout(o){ce.event.cssEvent.button_onAfterMouseout=o},setButtonOnBeforeTouchstart(o){ce.event.cssEvent.button_onBeforeTouchstart=o},setButtonOnAfterTouchstart(o){ce.event.cssEvent.button_onAfterTouchstart=o},setButtonOnBeforeTouchend(o){ce.event.cssEvent.button_onBeforeTouchend=o},setButtonOnAfterTouchend(o){ce.event.cssEvent.button_onAfterTouchend=o},setInputOnBefoerFocus(o){ce.event.cssEvent.input_onBeforeFocus=o},setInputOnAfterFocus(o){ce.event.cssEvent.input_onAfterFocus=o},setInputOnBefoerBlur(o){ce.event.cssEvent.input_onBeforeBlur=o},setInputOnAfterBlur(o){ce.event.cssEvent.input_onAfterBlur=o},setInputOnBeforeMouseover(o){ce.event.cssEvent.input_onBeforeMouseover=o},setInputOnAfterMouseover(o){ce.event.cssEvent.input_onAfterMouseover=o},setInputOnBeforeMouseout(o){ce.event.cssEvent.input_onBeforeMouseout=o},setInputOnAfterMouseout(o){ce.event.cssEvent.input_onAfterMouseout=o},setInputOnBeforeTouchstart(o){ce.event.cssEvent.input_onBeforeTouchstart=o},setInputOnAfterTouchstart(o){ce.event.cssEvent.input_onAfterTouchstart=o},setInputOnBeforeTouchend(o){ce.event.cssEvent.input_onBeforeTouchend=o},setInputOnAfterTouchend(o){ce.event.cssEvent.input_onAfterTouchend=o}};const n=()=>{typeof window<"u"&&(gd(),gu())};t.style={setSize(o){ce.componentStyle.size=o,n()},setFilledColor(o){ce.componentStyle.filledColor=o,n()},setEmptyColor(o){ce.componentStyle.emptyColor=o,n()},setFilledTextColor(o){ce.componentStyle.filledTextColor=o,n()},setEmptyTextColor(o){ce.componentStyle.emptyTextColor=o,n()},setPrimaryColor(o){ce.componentStyle.primaryColor=o,n()},setMutedColor(o){ce.componentStyle.mutedColor=o,n()},setInfoColor(o){ce.componentStyle.infoColor=o,n()},setSuccessColor(o){ce.componentStyle.successColor=o,n()},setDangerColor(o){ce.componentStyle.dangerColor=o,n()},setWarningColor(o){ce.componentStyle.warningColor=o,n()},setInvertColor(o){ce.componentStyle.invertColor=o,n()},getFilledColor(){return ce.componentStyle.filledColor},getEmptyColor(){return ce.componentStyle.emptyColor},getFilledTextColor(){return ce.componentStyle.filledTextColor},getEmptyTextColor(){return ce.componentStyle.emptyTextColor},getPrimaryColor(){return ce.componentStyle.primaryColor},getPrimaryButtonColor(){return ce.componentStyle.componentColor.primary.buttonColor},getPrimaryBorderColor(){return ce.componentStyle.componentColor.primary.borderColor},getPrimaryShadowColor(){return ce.componentStyle.componentColor.primary.shadowColor},getPrimaryHoverColor(){return ce.componentStyle.componentColor.primary.hoverColor},getPrimaryActiveColor(){return ce.componentStyle.componentColor.primary.activeColor},getPrimaryRowHoverColor(){return ce.componentStyle.componentColor.primary.rowHoverColor},getPrimaryStripeColor(){return ce.componentStyle.componentColor.primary.stripeColor},getMutedColor(){return ce.componentStyle.mutedColor},getMutedButtonColor(){return ce.componentStyle.componentColor.muted.buttonColor},getMutedBorderColor(){return ce.componentStyle.componentColor.muted.borderColor},getMutedShadowColor(){return ce.componentStyle.componentColor.muted.shadowColor},getMutedHoverColor(){return ce.componentStyle.componentColor.muted.hoverColor},getMutedActiveColor(){return ce.componentStyle.componentColor.muted.activeColor},getMutedRowHoverColor(){return ce.componentStyle.componentColor.muted.rowHoverColor},getMutedStripeColor(){return ce.componentStyle.componentColor.muted.stripeColor},getInfoColor(){return ce.componentStyle.infoColor},getInfoButtonColor(){return ce.componentStyle.componentColor.info.buttonColor},getInfoBorderColor(){return ce.componentStyle.componentColor.info.borderColor},getInfoShadowColor(){return ce.componentStyle.componentColor.info.shadowColor},getInfoHoverColor(){return ce.componentStyle.componentColor.info.hoverColor},getInfoActiveColor(){return ce.componentStyle.componentColor.info.activeColor},getInfoRowHoverColor(){return ce.componentStyle.componentColor.info.rowHoverColor},getInfoStripeColor(){return ce.componentStyle.componentColor.info.stripeColor},getSuccessColor(){return ce.componentStyle.successColor},getSuccessButtonColor(){return ce.componentStyle.componentColor.success.buttonColor},getSuccessBorderColor(){return ce.componentStyle.componentColor.success.borderColor},getSuccessShadowColor(){return ce.componentStyle.componentColor.success.shadowColor},getSuccessHoverColor(){return ce.componentStyle.componentColor.success.hoverColor},getSuccessActiveColor(){return ce.componentStyle.componentColor.success.activeColor},getSuccessRowHoverColor(){return ce.componentStyle.componentColor.success.rowHoverColor},getSuccessStripeColor(){return ce.componentStyle.componentColor.success.stripeColor},getDangerColor(){return ce.componentStyle.dangerColor},getDangerButtonColor(){return ce.componentStyle.componentColor.danger.buttonColor},getDangerBorderColor(){return ce.componentStyle.componentColor.danger.borderColor},getDangerShadowColor(){return ce.componentStyle.componentColor.danger.shadowColor},getDangerHoverColor(){return ce.componentStyle.componentColor.danger.hoverColor},getDangerActiveColor(){return ce.componentStyle.componentColor.danger.activeColor},getDangerRowHoverColor(){return ce.componentStyle.componentColor.danger.rowHoverColor},getDangerStripeColor(){return ce.componentStyle.componentColor.danger.stripeColor},getWarningColor(){return ce.componentStyle.warningColor},getWarningButtonColor(){return ce.componentStyle.componentColor.warning.buttonColor},getWarningBorderColor(){return ce.componentStyle.componentColor.warning.borderColor},getWarningShadowColor(){return ce.componentStyle.componentColor.warning.shadowColor},getWarningHoverColor(){return ce.componentStyle.componentColor.warning.hoverColor},getWarningActiveColor(){return ce.componentStyle.componentColor.warning.activeColor},getWarningRowHoverColor(){return ce.componentStyle.componentColor.warning.rowHoverColor},getWarningStripeColor(){return ce.componentStyle.componentColor.warning.stripeColor},isInvertColor(){return ce.componentStyle.invertColor}},t.component={},t.component.getAccordion=o=>ce.component.accordionList[o],t.component.getBaggie=o=>ce.component.baggieList[o],t.component.getBanner=o=>ce.component.bannerList[o],t.component.getButton=o=>ce.component.buttonList[o],t.component.getCalendar=o=>ce.component.calendarList[o],t.component.getCaption=o=>ce.component.captionList[o],t.component.getChart=o=>ce.component.chartList[o],t.component.getDrawer=o=>ce.component.drawerList[o],t.component.getDropdown=o=>ce.component.dropdownList[o],t.component.getGap=o=>ce.component.gapList[o],t.component.getFileset=o=>ce.component.filesetList[o],t.component.getGrid=o=>ce.grid.getGrid(o),t.component.getImagebox=o=>ce.component.imageboxList[o],t.component.getInput=o=>ce.component.inputList[o],t.component.getInputGroup=o=>ce.component.inputGroupList[o],t.component.getLabel=o=>ce.component.labelList[o],t.component.getLayout=o=>ce.component.layoutList[o],t.component.getList=o=>ce.component.listList[o],t.component.getModal=o=>ce.component.modalList[o],t.component.getNote=o=>ce.note.getNote(o),t.component.getPagination=o=>ce.component.paginationList[o],t.component.getParagraph=o=>ce.component.paragraphList[o],t.component.getPopup=o=>ce.component.popupList[o],t.component.getSpinner=o=>ce.component.spinnerList[o],t.component.getTable=o=>ce.component.tableList[o]},yd=Bt(()=>Promise.resolve().then(()=>require("./HAccordion-DleNf4M-.js")),"HAccordion"),pd=Bt(()=>Promise.resolve().then(()=>require("./HBaggie-CtDuqAan.js")),"HBaggie"),_d=Bt(()=>Promise.resolve().then(()=>require("./HBanner-BDv5sYCa.js")),"HBanner"),vd=Bt(()=>Promise.resolve().then(()=>require("./HButton-CkHZhjwN.js")),"HButton"),bd=Bt(()=>Promise.resolve().then(()=>require("./HCalendar-BbVDcV_g.js")),"HCalendar"),Cd=Bt(()=>Promise.resolve().then(()=>require("./HCaption-DbjKugnx.js")),"HCaption"),Md=Bt(()=>Promise.resolve().then(()=>require("./HChart-CTa5zLah.js")),"HChart"),xd=Bt(()=>Promise.resolve().then(()=>require("./HDrawer-BdhP3EDS.js")),"HDrawer"),Sd=Bt(()=>Promise.resolve().then(()=>require("./HDropdown-BfZUh6z-.js")),"HDropdown"),kd=Bt(()=>Promise.resolve().then(()=>require("./HFileset-Cb7WvJLf.js")),"HFileset"),Id=Bt(()=>Promise.resolve().then(()=>require("./HGap-CZfD94Bb.js")),"HGap"),Ed=Bt(()=>Promise.resolve().then(()=>require("./HGrid-CbxqCD5t.js")),"HGrid"),wd=Bt(()=>Promise.resolve().then(()=>require("./HImagebox-BPvmvGWb.js")),"HImagebox"),Ad=Bt(()=>Promise.resolve().then(()=>require("./HInput-CpbGKZg2.js")),"HInput"),Td=Bt(()=>Promise.resolve().then(()=>require("./HInputGroup-BRYFCJDS.js")),"HInputGroup"),Bd=Bt(()=>Promise.resolve().then(()=>require("./HLabel-buiY-oWY.js")),"HLabel"),Ld=Bt(()=>Promise.resolve().then(()=>require("./HLayout-Bu0hB8wf.js")),"HLayout"),Nd=Bt(()=>Promise.resolve().then(()=>require("./HList-BIKaUFs1.js")),"HList"),Rd=Bt(()=>Promise.resolve().then(()=>require("./HModal-DDL-MrHu.js")),"HModal"),Hd=Bt(()=>Promise.resolve().then(()=>require("./HNote-Dwbr1_V2.js")),"HNote"),Fd=Bt(()=>Promise.resolve().then(()=>require("./HPagination-DFnrZYhq.js")),"HPagination"),Od=Bt(()=>Promise.resolve().then(()=>require("./HParagraph-BFQ0qCCP.js")),"HParagraph"),Vd=Bt(()=>Promise.resolve().then(()=>require("./HPopup-hBOpdf7v.js")),"HPopup"),Pd=Bt(()=>Promise.resolve().then(()=>require("./HSpinner-Zl3b9VKW.js")),"HSpinner"),Dd=Bt(()=>Promise.resolve().then(()=>require("./HTable-8jwoguW_.js")),"HTable"),ce={event:{cssEvent:{}}},un=en.createHison(),qy={install(t,e){const n=La();e?Object.keys(n).forEach(o=>{o in e||(e[o]=n[o])}):e=La(),Uy(e),Wy(un,e),typeof window<"u"&&gd(),jy(),t.provide("hison",un),t.component("HAccordion",yd),t.component("HBaggie",pd),t.component("HBanner",_d),t.component("HButton",vd),t.component("HCalendar",bd),t.component("HCaption",Cd),t.component("HChart",Md),t.component("HDrawer",xd),t.component("HDropdown",Sd),t.component("HFileset",kd),t.component("HGap",Id),t.component("HGrid",Ed),t.component("HImagebox",wd),t.component("HInput",Ad),t.component("HInputGroup",Td),t.component("HLabel",Bd),t.component("HLayout",Ld),t.component("HList",Nd),t.component("HModal",Rd),t.component("HNote",Hd),t.component("HPagination",Fd),t.component("HParagraph",Od),t.component("HPopup",Vd),t.component("HSpinner",Pd),t.component("HTable",Dd)}};exports.BACKGROUND_TYPE_VALUES=Mu;exports.BACK_IMAGE_ALIGN_VALUES=vu;exports.BACK_IMAGE_STYLE_VALUES=Cu;exports.BACK_IMAGE_VERTICAL_ALIGN_VALUES=bu;exports.BackImageAlign=Ks;exports.BackImageRepeat=Js;exports.BackImageVerticalAlign=Xs;exports.BackgroundType=Zs;exports.COLOR_SET_VALUES=Pu;exports.CSS_VAR_RE=uc;exports.Chart=mn;exports.Color=Ys;exports.DATA_STATUS_VALUES=zu;exports.DROPDOWN_TRIGGER_VALUES=Lu;exports.DataStatus=fc;exports.DayOfWeek=hc;exports.DropdownTrigger=sc;exports.EDIT_MODE_VALUES=Bu;exports.EditMode=lc;exports.GRID_ALIGN_VALUES=Ou;exports.GRID_DATE_FORMAT_VALUES=Hu;exports.GRID_MONTH_FORMAT_VALUES=Fu;exports.GRID_VERTICAL_ALIGN_VALUES=Vu;exports.HAccordionClientOnly=yd;exports.HBaggieClientOnly=pd;exports.HBannerClientOnly=_d;exports.HButtonClientOnly=vd;exports.HCalendarClientOnly=bd;exports.HCalendarTimeFormat=gc;exports.HCalendarView=mc;exports.HCaptionClientOnly=Cd;exports.HChartClientOnly=Md;exports.HDrawerClientOnly=xd;exports.HDropdownClientOnly=Sd;exports.HEX_COLOR_RE=dc;exports.HFilesetClientOnly=kd;exports.HGapClientOnly=Id;exports.HGapLine=rc;exports.HGapLineStyle=ic;exports.HGridClientOnly=Ed;exports.HImageboxClientOnly=wd;exports.HInputClientOnly=Ad;exports.HInputGroupClientOnly=Td;exports.HLabelClientOnly=Bd;exports.HLayoutClientOnly=Ld;exports.HListClientOnly=Nd;exports.HModalClientOnly=Rd;exports.HNoteClientOnly=Hd;exports.HPaginationClientOnly=Fd;exports.HParagraphClientOnly=Od;exports.HPopupClientOnly=Vd;exports.HSpinnerClientOnly=Pd;exports.HTableClientOnly=Dd;exports.H_CALENDAR_TIME_FORMAT_VALUES=Gu;exports.H_CALENDAR_VIEW_VALUES=Uu;exports.H_GAP_LINE_STYLE_VALUES=Au;exports.H_GAP_RULE_VALUES=wu;exports.Hisonjs_bundleExports=en;exports.INPUT_TYPE_VALUES=Tu;exports.InputType=ac;exports.MODAL_PLACEMENT_VALUES=xu;exports.ModalPlacement=Qs;exports.NOTE_MODE_BY_DEVICE_VALUES=ju;exports.SCREEN_POSITION_VALUES=Su;exports.SELECTION_POLICY_VALUES=Ru;exports.SPINNER_TYPE_VALUES=ku;exports.ScreenPosition=ec;exports.Size=lo;exports.SpinnerType=tc;exports.TEXT_ALIGN_VALUES=Nu;exports.TOOL_POSITION_VALUES=Wu;exports.TextAlign=cc;exports.VERTICAL_ALIGN_VALUES=Iu;exports.Vanillagrid2_bundleExports=Na;exports.Vanillanote2_bundleExports=Ra;exports.VerticalAlign=nc;exports.WHITE_SPACE_VALUES=Eu;exports.WhiteSpace=oc;exports.addComponentNameToClass=iu;exports.applyOpacityToRgba=fu;exports.extractPrefixedClasses=au;exports.extractResponsiveClasses=ru;exports.getDefaultHisonConfig=La;exports.getDigitsOnly=eu;exports.getHexCodeFromColorText=cu;exports.getIndexSpecificClassNameFromClassList=js;exports.getInvertColor=hn;exports.getMaskValue=Qd;exports.getRGBAFromColorText=du;exports.getSpecificClassValueFromClassList=ou;exports.getUUID=Xd;exports.hison=un;exports.hisonCloser=ce;exports.hisonvue=qy;exports.isCssColorLike=Du;exports.isNullOrUndefined=Kd;exports.normalizeToRgba=dn;exports.registerReloadable=hu;exports.reloadHisonComponent=yu;exports.toClassString=Ws;exports.unregisterReloadable=mu;exports.useDevice=Gy;