@deskhero/dh_ui 1.28.7 → 1.28.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dh_ui.es.js +1 -0
- package/dist/dh_ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/dh_ui.es.js
CHANGED
|
@@ -24741,6 +24741,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
24741
24741
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
24742
24742
|
createElementVNode("div", {
|
|
24743
24743
|
class: "advanced-panel-header clickable",
|
|
24744
|
+
"data-e2e": "expansion-panel-button",
|
|
24744
24745
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.isAdvancedSettingsOpen = !_ctx.isAdvancedSettingsOpen)
|
|
24745
24746
|
}, [
|
|
24746
24747
|
createElementVNode("h4", _hoisted_1, toDisplayString(_ctx.title), 1),
|
package/dist/dh_ui.umd.js
CHANGED
|
@@ -16,4 +16,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
16
16
|
* Released under the MIT License
|
|
17
17
|
*/class GA{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,i,r){const a=n.listeners[r],o=n.duration;a.forEach(M=>M({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=pl.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const a=i.items;let o=a.length-1,M=!1,u;for(;o>=0;--o)u=a[o],u._active?(u._total>i.duration&&(i.duration=u._total),u.tick(e),M=!0):(a[o]=a[a.length-1],a.pop());M&&(r.draw(),this._notify(r,i,e,"progress")),a.length||(i.running=!1,this._notify(r,i,e,"complete"),i.initial=!1),n+=a.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}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((i,r)=>Math.max(i,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 i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var jt=new GA;const sc="transparent",WA={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Pl(t||sc),r=i.valid&&Pl(e||sc);return r&&r.valid?r.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class $A{constructor(e,n,i,r){const a=n[i];r=kr([e.to,r,a,e.from]);const o=kr([e.from,a,r]);this._active=!0,this._fn=e.fn||WA[e.type||typeof o],this._easing=zn[e.easing]||zn.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=i,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const r=this._target[this._prop],a=i-this._start,o=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=kr([e.to,n,r,e.from]),this._from=kr([e.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,r=this._prop,a=this._from,o=this._loop,M=this._to;let u;if(this._active=a!==M&&(o||n<i),!this._active){this._target[r]=M,this._notify(!0);return}if(n<0){this._target[r]=a;return}u=n/i%2,u=o&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[r]=this._fn(a,M,u)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}}const HA=["x","y","borderWidth","radius","tension"],FA=["color","borderColor","backgroundColor"];ee.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const JA=Object.keys(ee.animation);ee.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),ee.set("animations",{colors:{type:"color",properties:FA},numbers:{type:"number",properties:HA}}),ee.describe("animations",{_fallback:"animation"}),ee.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}});class Mc{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!ne(e))return;const n=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const r=e[i];if(!ne(r))return;const a={};for(const o of JA)a[o]=r[o];(je(r.properties)&&r.properties||[i]).forEach(o=>{(o===i||!n.has(o))&&n.set(o,a)})})}_animateOptions(e,n){const i=n.options,r=KA(e,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&XA(e.options.$animations,i).then(()=>{e.options=i},()=>{}),a}_createAnimations(e,n){const i=this._properties,r=[],a=e.$animations||(e.$animations={}),o=Object.keys(n),M=Date.now();let u;for(u=o.length-1;u>=0;--u){const l=o[u];if(l.charAt(0)==="$")continue;if(l==="options"){r.push(...this._animateOptions(e,n));continue}const c=n[l];let g=a[l];const y=i.get(l);if(g)if(y&&g.active()){g.update(y,c,M);continue}else g.cancel();if(!y||!y.duration){e[l]=c;continue}a[l]=g=new $A(y,e,l,c),r.push(g)}return r}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return jt.add(this._chart,i),!0}}function XA(t,e){const n=[],i=Object.keys(e);for(let r=0;r<i.length;r++){const a=t[i[r]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function KA(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 uc(t,e){const n=t&&t.options||{},i=n.reverse,r=n.min===void 0?e:0,a=n.max===void 0?e:0;return{start:i?a:r,end:i?r:a}}function qA(t,e,n){if(n===!1)return!1;const i=uc(t,n),r=uc(e,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function ez(t){let e,n,i,r;return ne(t)?(e=t.top,n=t.right,i=t.bottom,r=t.left):e=n=i=r=t,{top:e,right:n,bottom:i,left:r,disabled:t===!1}}function lc(t,e){const n=[],i=t._getSortedDatasetMetas(e);let r,a;for(r=0,a=i.length;r<a;++r)n.push(i[r].index);return n}function cc(t,e,n,i={}){const r=t.keys,a=i.mode==="single";let o,M,u,l;if(e!==null){for(o=0,M=r.length;o<M;++o){if(u=+r[o],u===n){if(i.all)continue;break}l=t.values[u],Se(l)&&(a||e===0||Mt(e)===Mt(l))&&(e+=l)}return e}}function tz(t){const e=Object.keys(t),n=new Array(e.length);let i,r,a;for(i=0,r=e.length;i<r;++i)a=e[i],n[i]={x:a,y:t[a]};return n}function gc(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function nz(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function iz(t){const{min:e,max:n,minDefined:i,maxDefined:r}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function rz(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function Nc(t,e,n,i){for(const r of e.getMatchingVisibleMetas(i).reverse()){const a=t[r.index];if(n&&a>0||!n&&a<0)return r.index}return null}function yc(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:M}=i,u=a.axis,l=o.axis,c=nz(a,o,i),g=e.length;let y;for(let j=0;j<g;++j){const I=e[j],{[u]:D,[l]:d}=I,N=I._stacks||(I._stacks={});y=N[l]=rz(r,c,D),y[M]=d,y._top=Nc(y,o,!0,i.type),y._bottom=Nc(y,o,!1,i.type)}}function zs(t,e){const n=t.scales;return Object.keys(n).filter(i=>n[i].axis===e).shift()}function az(t,e){return Ot(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function oz(t,e,n){return Ot(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Sn(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(!!i){e=e||t._parsed;for(const r of e){const a=r._stacks;if(!a||a[i]===void 0||a[i][n]===void 0)return;delete a[i][n]}}}const ps=t=>t==="reset"||t==="none",jc=(t,e)=>e?t:Object.assign({},t),sz=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:lc(n,!0),values:null};class tt{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.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=gc(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Sn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(g,y,j,I)=>g==="x"?y:g==="r"?I:j,a=n.xAxisID=ie(i.xAxisID,zs(e,"x")),o=n.yAxisID=ie(i.yAxisID,zs(e,"y")),M=n.rAxisID=ie(i.rAxisID,zs(e,"r")),u=n.indexAxis,l=n.iAxisID=r(u,a,o,M),c=n.vAxisID=r(u,o,a,M);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(M),n.iScale=this.getScaleForId(l),n.vScale=this.getScaleForId(c)}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&&Al(this._data,this),e._stacked&&Sn(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(ne(n))this._data=tz(n);else if(i!==n){if(i){Al(i,this);const r=this._cachedMeta;Sn(r),r._parsed=[]}n&&Object.isExtensible(n)&&zm(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,i=this.getDataset();let r=!1;this._dataCheck();const a=n._stacked;n._stacked=gc(n.vScale,n),n.stack!==i.stack&&(r=!0,Sn(n),n.stack=i.stack),this._resyncElements(e),(r||a!==n._stacked)&&yc(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:r}=this,{iScale:a,_stacked:o}=i,M=a.axis;let u=e===0&&n===r.length?!0:i._sorted,l=e>0&&i._parsed[e-1],c,g,y;if(this._parsing===!1)i._parsed=r,i._sorted=!0,y=r;else{je(r[e])?y=this.parseArrayData(i,r,e,n):ne(r[e])?y=this.parseObjectData(i,r,e,n):y=this.parsePrimitiveData(i,r,e,n);const j=()=>g[M]===null||l&&g[M]<l[M];for(c=0;c<n;++c)i._parsed[c+e]=g=y[c],u&&(j()&&(u=!1),l=g);i._sorted=u}o&&yc(this,y)}parsePrimitiveData(e,n,i,r){const{iScale:a,vScale:o}=e,M=a.axis,u=o.axis,l=a.getLabels(),c=a===o,g=new Array(r);let y,j,I;for(y=0,j=r;y<j;++y)I=y+i,g[y]={[M]:c||a.parse(l[I],I),[u]:o.parse(n[I],I)};return g}parseArrayData(e,n,i,r){const{xScale:a,yScale:o}=e,M=new Array(r);let u,l,c,g;for(u=0,l=r;u<l;++u)c=u+i,g=n[c],M[u]={x:a.parse(g[0],c),y:o.parse(g[1],c)};return M}parseObjectData(e,n,i,r){const{xScale:a,yScale:o}=e,{xAxisKey:M="x",yAxisKey:u="y"}=this._parsing,l=new Array(r);let c,g,y,j;for(c=0,g=r;c<g;++c)y=c+i,j=n[y],l[c]={x:a.parse(pt(j,M),y),y:o.parse(pt(j,u),y)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,i){const r=this.chart,a=this._cachedMeta,o=n[e.axis],M={keys:lc(r,!0),values:n._stacks[e.axis]};return cc(M,o,a.index,{mode:i})}updateRangeFromParsed(e,n,i,r){const a=i[n.axis];let o=a===null?NaN:a;const M=r&&i._stacks[n.axis];r&&M&&(r.values=M,o=cc(r,a,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const i=this._cachedMeta,r=i._parsed,a=i._sorted&&e===i.iScale,o=r.length,M=this._getOtherScale(e),u=sz(n,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:g}=iz(M);let y,j;function I(){j=r[y];const D=j[M.axis];return!Se(j[e.axis])||c>D||g<D}for(y=0;y<o&&!(!I()&&(this.updateRangeFromParsed(l,e,j,u),a));++y);if(a){for(y=o-1;y>=0;--y)if(!I()){this.updateRangeFromParsed(l,e,j,u);break}}return l}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let r,a,o;for(r=0,a=n.length;r<a;++r)o=n[r][e.axis],Se(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,i=n.iScale,r=n.vScale,a=this.getParsed(e);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=ez(ie(this.options.clip,qA(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],a=n.chartArea,o=[],M=this._drawStart||0,u=this._drawCount||r.length-M,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(e,a,M,u),c=M;c<M+u;++c){const g=r[c];g.hidden||(g.active&&l?o.push(g):g.draw(e,a))}for(c=0;c<o.length;++c)o[c].draw(e,a)}getStyle(e,n){const i=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,n,i){const r=this.getDataset();let a;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];a=o.$context||(o.$context=oz(this.getContext(),e,o)),a.parsed=this.getParsed(e),a.raw=r.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=az(this.chart.getContext(),this.index)),a.dataset=r,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=i,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",i){const r=n==="active",a=this._cachedDataOpts,o=e+"-"+n,M=a[o],u=this.enableOptionSharing&&Ve(i);if(M)return jc(M,u);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),g=r?[`${e}Hover`,"hover",e,""]:[e,""],y=l.getOptionScopes(this.getDataset(),c),j=Object.keys(ee.elements[e]),I=()=>this.getContext(i,r),D=l.resolveNamedOptions(y,j,I,g);return D.$shared&&(D.$shared=u,a[o]=Object.freeze(jc(D,u))),D}_resolveAnimations(e,n,i){const r=this.chart,a=this._cachedDataOpts,o=`animation-${n}`,M=a[o];if(M)return M;let u;if(r.options.animation!==!1){const c=this.chart.config,g=c.datasetAnimationScopeKeys(this._type,n),y=c.getOptionScopes(this.getDataset(),g);u=c.createResolver(y,this.getContext(e,i,n))}const l=new Mc(r,u&&u.animations);return u&&u._cacheable&&(a[o]=Object.freeze(l)),l}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||ps(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),r=this._sharedOptions,a=this.getSharedOptions(i),o=this.includeOptions(n,a)||a!==r;return this.updateSharedOptions(a,n,i),{sharedOptions:a,includeOptions:o}}updateElement(e,n,i,r){ps(r)?Object.assign(e,i):this._resolveAnimations(n,r).update(e,i)}updateSharedOptions(e,n,i){e&&!ps(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,r){e.active=r;const a=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(e,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"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,i=this._cachedMeta.data;for(const[M,u,l]of this._syncList)this[M](u,l);this._syncList=[];const r=i.length,a=n.length,o=Math.min(a,r);o&&this.parse(0,o),a>r?this._insertElements(r,a-r,e):a<r&&this._removeElements(a,r-a)}_insertElements(e,n,i=!0){const r=this._cachedMeta,a=r.data,o=e+n;let M;const u=l=>{for(l.length+=n,M=l.length-1;M>=o;M--)l[M]=l[M-n]};for(u(a),M=e;M<o;++M)a[M]=new this.dataElementType;this._parsing&&u(r._parsed),this.parse(e,n),i&&this.updateElements(a,e,n,"reset")}updateElements(e,n,i,r){}_removeElements(e,n){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(e,n);i._stacked&&Sn(i,r)}i.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,i,r]=e;this[n](i,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 i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}tt.defaults={},tt.prototype.datasetElementType=null,tt.prototype.dataElementType=null;function Mz(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let r=0,a=n.length;r<a;r++)i=i.concat(n[r].controller.getAllParsedValues(t));t._cache.$bar=zl(i.sort((r,a)=>r-a))}return t._cache.$bar}function uz(t){const e=t.iScale,n=Mz(e,t.type);let i=e._length,r,a,o,M;const u=()=>{o===32767||o===-32768||(Ve(M)&&(i=Math.min(i,Math.abs(o-M)||i)),M=o)};for(r=0,a=n.length;r<a;++r)o=e.getPixelForValue(n[r]),u();for(M=void 0,r=0,a=e.ticks.length;r<a;++r)o=e.getPixelForTick(r),u();return i}function lz(t,e,n,i){const r=n.barThickness;let a,o;return oe(r)?(a=e.min*n.categoryPercentage,o=n.barPercentage):(a=r*i,o=1),{chunk:a/i,ratio:o,start:e.pixels[t]-a/2}}function cz(t,e,n,i){const r=e.pixels,a=r[t];let o=t>0?r[t-1]:null,M=t<r.length-1?r[t+1]:null;const u=n.categoryPercentage;o===null&&(o=a-(M===null?e.end-e.start:M-a)),M===null&&(M=a+a-o);const l=a-(a-Math.min(o,M))/2*u;return{chunk:Math.abs(M-o)/2*u/i,ratio:n.barPercentage,start:l}}function gz(t,e,n,i){const r=n.parse(t[0],i),a=n.parse(t[1],i),o=Math.min(r,a),M=Math.max(r,a);let u=o,l=M;Math.abs(o)>Math.abs(M)&&(u=M,l=o),e[n.axis]=l,e._custom={barStart:u,barEnd:l,start:r,end:a,min:o,max:M}}function Ic(t,e,n,i){return je(t)?gz(t,e,n,i):e[n.axis]=n.parse(t,i),e}function dc(t,e,n,i){const r=t.iScale,a=t.vScale,o=r.getLabels(),M=r===a,u=[];let l,c,g,y;for(l=n,c=n+i;l<c;++l)y=e[l],g={},g[r.axis]=M||r.parse(o[l],l),u.push(Ic(y,g,a,l));return u}function Ts(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function Nz(t,e,n){return t!==0?Mt(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function yz(t){let e,n,i,r,a;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(r="end",a="start"):(r="start",a="end"),{start:n,end:i,reverse:e,top:r,bottom:a}}function jz(t,e,n,i){let r=e.borderSkipped;const a={};if(!r){t.borderSkipped=a;return}if(r===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:M,reverse:u,top:l,bottom:c}=yz(t);r==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?r=l:(n._bottom||0)===i?r=c:(a[Dc(c,o,M,u)]=!0,r=l)),a[Dc(r,o,M,u)]=!0,t.borderSkipped=a}function Dc(t,e,n,i){return i?(t=Iz(t,e,n),t=fc(t,n,e)):t=fc(t,e,n),t}function Iz(t,e,n){return t===e?n:t===n?e:t}function fc(t,e,n){return t==="start"?e:t==="end"?n:t}function dz(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class vr extends tt{parsePrimitiveData(e,n,i,r){return dc(e,n,i,r)}parseArrayData(e,n,i,r){return dc(e,n,i,r)}parseObjectData(e,n,i,r){const{iScale:a,vScale:o}=e,{xAxisKey:M="x",yAxisKey:u="y"}=this._parsing,l=a.axis==="x"?M:u,c=o.axis==="x"?M:u,g=[];let y,j,I,D;for(y=i,j=i+r;y<j;++y)D=n[y],I={},I[a.axis]=a.parse(pt(D,l),y),g.push(Ic(pt(D,c),I,o,y));return g}updateRangeFromParsed(e,n,i,r){super.updateRangeFromParsed(e,n,i,r);const a=i._custom;a&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:i,vScale:r}=n,a=this.getParsed(e),o=a._custom,M=Ts(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(a[r.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:M}}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,i,r){const a=r==="reset",{index:o,_cachedMeta:{vScale:M}}=this,u=M.getBasePixel(),l=M.isHorizontal(),c=this._getRuler(),{sharedOptions:g,includeOptions:y}=this._getSharedOptions(n,r);for(let j=n;j<n+i;j++){const I=this.getParsed(j),D=a||oe(I[M.axis])?{base:u,head:u}:this._calculateBarValuePixels(j),d=this._calculateBarIndexPixels(j,c),N=(I._stacks||{})[M.axis],f={horizontal:l,base:D.base,enableBorderRadius:!N||Ts(I._custom)||o===N._top||o===N._bottom,x:l?D.head:d.center,y:l?d.center:D.head,height:l?d.size:Math.abs(D.size),width:l?Math.abs(D.size):d.size};y&&(f.options=g||this.resolveDataElementOptions(j,e[j].active?"active":r));const p=f.options||e[j].options;jz(f,p,N,o),dz(f,p,c.ratio),this.updateElement(e[j],j,f,r)}}_getStacks(e,n){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),a=i.options.stacked,o=[],M=u=>{const l=u.controller.getParsed(n),c=l&&l[u.vScale.axis];if(oe(c)||isNaN(c))return!0};for(const u of r)if(!(n!==void 0&&M(u))&&((a===!1||o.indexOf(u.stack)===-1||a===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,i){const r=this._getStacks(e,i),a=n!==void 0?r.indexOf(n):-1;return a===-1?r.length-1:a}_getRuler(){const e=this.options,n=this._cachedMeta,i=n.iScale,r=[];let a,o;for(a=0,o=n.data.length;a<o;++a)r.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const M=e.barThickness;return{min:M||uz(n),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:M?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:i},options:{base:r,minBarLength:a}}=this,o=r||0,M=this.getParsed(e),u=M._custom,l=Ts(u);let c=M[n.axis],g=0,y=i?this.applyStack(n,M,i):c,j,I;y!==c&&(g=y-c,y=c),l&&(c=u.barStart,y=u.barEnd-u.barStart,c!==0&&Mt(c)!==Mt(u.barEnd)&&(g=0),g+=c);const D=!oe(r)&&!l?r:g;let d=n.getPixelForValue(D);if(this.chart.getDataVisibility(e)?j=n.getPixelForValue(g+y):j=d,I=j-d,Math.abs(I)<a){I=Nz(I,n,o)*a,c===o&&(d-=I/2);const N=n.getPixelForDecimal(0),f=n.getPixelForDecimal(1),p=Math.min(N,f),T=Math.max(N,f);d=Math.max(Math.min(d,T),p),j=d+I}if(d===n.getPixelForValue(o)){const N=Mt(I)*n.getLineWidthForValue(o)/2;d+=N,I-=N}return{size:I,base:d,head:j,center:j+I/2}}_calculateBarIndexPixels(e,n){const i=n.scale,r=this.options,a=r.skipNull,o=ie(r.maxBarThickness,1/0);let M,u;if(n.grouped){const l=a?this._getStackCount(e):n.stackCount,c=r.barThickness==="flex"?cz(e,n,r,l):lz(e,n,r,l),g=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0);M=c.start+c.chunk*g+c.chunk/2,u=Math.min(o,c.chunk*c.ratio)}else M=i.getPixelForValue(this.getParsed(e)[i.axis],e),u=Math.min(o,n.min*n.ratio);return{base:M-u/2,head:M+u/2,center:M,size:u}}draw(){const e=this._cachedMeta,n=e.vScale,i=e.data,r=i.length;let a=0;for(;a<r;++a)this.getParsed(a)[n.axis]!==null&&i[a].draw(this._ctx)}}vr.id="bar",vr.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},vr.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Ls extends tt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,i,r){const a=super.parsePrimitiveData(e,n,i,r);for(let o=0;o<a.length;o++)a[o]._custom=this.resolveDataElementOptions(o+i).radius;return a}parseArrayData(e,n,i,r){const a=super.parseArrayData(e,n,i,r);for(let o=0;o<a.length;o++){const M=n[i+o];a[o]._custom=ie(M[2],this.resolveDataElementOptions(o+i).radius)}return a}parseObjectData(e,n,i,r){const a=super.parseObjectData(e,n,i,r);for(let o=0;o<a.length;o++){const M=n[i+o];a[o]._custom=ie(M&&M.r&&+M.r,this.resolveDataElementOptions(o+i).radius)}return a}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let i=e.length-1;i>=0;--i)n=Math.max(n,e[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,{xScale:i,yScale:r}=n,a=this.getParsed(e),o=i.getLabelForValue(a.x),M=r.getLabelForValue(a.y),u=a._custom;return{label:n.label,value:"("+o+", "+M+(u?", "+u:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,i,r){const a=r==="reset",{iScale:o,vScale:M}=this._cachedMeta,{sharedOptions:u,includeOptions:l}=this._getSharedOptions(n,r),c=o.axis,g=M.axis;for(let y=n;y<n+i;y++){const j=e[y],I=!a&&this.getParsed(y),D={},d=D[c]=a?o.getPixelForDecimal(.5):o.getPixelForValue(I[c]),N=D[g]=a?M.getBasePixel():M.getPixelForValue(I[g]);D.skip=isNaN(d)||isNaN(N),l&&(D.options=u||this.resolveDataElementOptions(y,j.active?"active":r),a&&(D.options.radius=0)),this.updateElement(j,y,D,r)}}resolveDataElementOptions(e,n){const i=this.getParsed(e);let r=super.resolveDataElementOptions(e,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const a=r.radius;return n!=="active"&&(r.radius=0),r.radius+=ie(i&&i._custom,a),r}}Ls.id="bubble",Ls.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Ls.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function Dz(t,e,n){let i=1,r=1,a=0,o=0;if(e<le){const M=t,u=M+e,l=Math.cos(M),c=Math.sin(M),g=Math.cos(u),y=Math.sin(u),j=(p,T,m)=>An(p,M,u,!0)?1:Math.max(T,T*n,m,m*n),I=(p,T,m)=>An(p,M,u,!0)?-1:Math.min(T,T*n,m,m*n),D=j(0,l,g),d=j(ze,c,y),N=I(Ae,l,g),f=I(Ae+ze,c,y);i=(D-N)/2,r=(d-f)/2,a=-(D+N)/2,o=-(d+f)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:o}}class bn extends tt{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 i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let a=u=>+i[u];if(ne(i[e])){const{key:u="value"}=this._parsing;a=l=>+pt(i[l],u)}let o,M;for(o=e,M=e+n;o<M;++o)r._parsed[o]=a(o)}}_getRotation(){return qe(this.options.rotation-90)}_getCircumference(){return qe(this.options.circumference)}_getRotationExtents(){let e=le,n=-le;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const r=this.chart.getDatasetMeta(i).controller,a=r._getRotation(),o=r._getCircumference();e=Math.min(e,a),n=Math.max(n,a+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:i}=n,r=this._cachedMeta,a=r.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,M=Math.max((Math.min(i.width,i.height)-o)/2,0),u=Math.min(um(this.options.cutout,M),1),l=this._getRingWeight(this.index),{circumference:c,rotation:g}=this._getRotationExtents(),{ratioX:y,ratioY:j,offsetX:I,offsetY:D}=Dz(g,c,u),d=(i.width-o)/y,N=(i.height-o)/j,f=Math.max(Math.min(d,N)/2,0),p=gl(this.options.radius,f),T=Math.max(p*u,0),m=(p-T)/this._getVisibleDatasetWeightTotal();this.offsetX=I*p,this.offsetY=D*p,r.total=this.calculateTotal(),this.outerRadius=p-m*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-m*l,0),this.updateElements(a,0,a.length,e)}_circumference(e,n){const i=this.options,r=this._cachedMeta,a=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||r._parsed[e]===null||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*a/le)}updateElements(e,n,i,r){const a=r==="reset",o=this.chart,M=o.chartArea,l=o.options.animation,c=(M.left+M.right)/2,g=(M.top+M.bottom)/2,y=a&&l.animateScale,j=y?0:this.innerRadius,I=y?0:this.outerRadius,{sharedOptions:D,includeOptions:d}=this._getSharedOptions(n,r);let N=this._getRotation(),f;for(f=0;f<n;++f)N+=this._circumference(f,a);for(f=n;f<n+i;++f){const p=this._circumference(f,a),T=e[f],m={x:c+this.offsetX,y:g+this.offsetY,startAngle:N,endAngle:N+p,circumference:p,outerRadius:I,innerRadius:j};d&&(m.options=D||this.resolveDataElementOptions(f,T.active?"active":r)),N+=p,this.updateElement(T,f,m,r)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let i=0,r;for(r=0;r<n.length;r++){const a=e._parsed[r];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?le*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=On(n._parsed[e],i.options.locale);return{label:r[e]||"",value:a}}getMaxBorderWidth(e){let n=0;const i=this.chart;let r,a,o,M,u;if(!e){for(r=0,a=i.data.datasets.length;r<a;++r)if(i.isDatasetVisible(r)){o=i.getDatasetMeta(r),e=o.data,M=o.controller;break}}if(!e)return 0;for(r=0,a=e.length;r<a;++r)u=M.resolveDataElementOptions(r),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let i=0,r=e.length;i<r;++i){const a=this.resolveDataElementOptions(i);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(e){return Math.max(ie(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}bn.id="doughnut",bn.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"},bn.descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"},bn.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n}}=t.legend.options;return e.labels.map((i,r)=>{const o=t.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(t){let e=t.label;const n=": "+t.formattedValue;return je(e)?(e=e.slice(),e[0]+=n):e+=n,e}}}}};class xs extends tt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:i,data:r=[],_dataset:a}=n,o=this.chart._animationsDisabled;let{start:M,count:u}=xl(n,r,o);this._drawStart=M,this._drawCount=u,Ol(n)&&(M=0,u=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=r;const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},e),this.updateElements(r,M,u,e)}updateElements(e,n,i,r){const a=r==="reset",{iScale:o,vScale:M,_stacked:u,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:g}=this._getSharedOptions(n,r),y=o.axis,j=M.axis,{spanGaps:I,segment:D}=this.options,d=rn(I)?I:Number.POSITIVE_INFINITY,N=this.chart._animationsDisabled||a||r==="none";let f=n>0&&this.getParsed(n-1);for(let p=n;p<n+i;++p){const T=e[p],m=this.getParsed(p),O=N?T:{},k=oe(m[j]),Q=O[y]=o.getPixelForValue(m[y],p),Y=O[j]=a||k?M.getBasePixel():M.getPixelForValue(u?this.applyStack(M,m,u):m[j],p);O.skip=isNaN(Q)||isNaN(Y)||k,O.stop=p>0&&Math.abs(m[y]-f[y])>d,D&&(O.parsed=m,O.raw=l.data[p]),g&&(O.options=c||this.resolveDataElementOptions(p,T.active?"active":r)),N||this.updateElement(T,p,O,r),f=m}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,i=n.options&&n.options.borderWidth||0,r=e.data||[];if(!r.length)return i;const a=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,a,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}xs.id="line",xs.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},xs.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Os extends tt{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=On(n._parsed[e].r,i.options.locale);return{label:r[e]||"",value:a}}parseObjectData(e,n,i,r){return Xl.bind(this)(e,n,i,r)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,r)=>{const a=this.getParsed(r).r;!isNaN(a)&&this.chart.getDataVisibility(r)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,i=e.options,r=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(r/2,0),o=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),M=(a-o)/e.getVisibleDatasetCount();this.outerRadius=a-M*this.index,this.innerRadius=this.outerRadius-M}updateElements(e,n,i,r){const a=r==="reset",o=this.chart,u=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,g=l.yCenter,y=l.getIndexAngle(0)-.5*Ae;let j=y,I;const D=360/this.countVisibleElements();for(I=0;I<n;++I)j+=this._computeAngle(I,r,D);for(I=n;I<n+i;I++){const d=e[I];let N=j,f=j+this._computeAngle(I,r,D),p=o.getDataVisibility(I)?l.getDistanceFromCenterForValue(this.getParsed(I).r):0;j=f,a&&(u.animateScale&&(p=0),u.animateRotate&&(N=f=y));const T={x:c,y:g,innerRadius:0,outerRadius:p,startAngle:N,endAngle:f,options:this.resolveDataElementOptions(I,d.active?"active":r)};this.updateElement(d,I,T,r)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&n++}),n}_computeAngle(e,n,i){return this.chart.getDataVisibility(e)?qe(this.resolveDataElementOptions(e,n).angle||i):0}}Os.id="polarArea",Os.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Os.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n}}=t.legend.options;return e.labels.map((i,r)=>{const o=t.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(t){return t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class hc extends bn{}hc.id="pie",hc.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Ss extends tt{getLabelAndValue(e){const n=this._cachedMeta.vScale,i=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(e,n,i,r){return Xl.bind(this)(e,n,i,r)}update(e){const n=this._cachedMeta,i=n.dataset,r=n.data||[],a=n.iScale.getLabels();if(i.points=r,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const M={_loop:!0,_fullLoop:a.length===r.length,options:o};this.updateElement(i,void 0,M,e)}this.updateElements(r,0,r.length,e)}updateElements(e,n,i,r){const a=this._cachedMeta.rScale,o=r==="reset";for(let M=n;M<n+i;M++){const u=e[M],l=this.resolveDataElementOptions(M,u.active?"active":r),c=a.getPointPositionForValue(M,this.getParsed(M).r),g=o?a.xCenter:c.x,y=o?a.yCenter:c.y,j={x:g,y,angle:c.angle,skip:isNaN(g)||isNaN(y),options:l};this.updateElement(u,M,j,r)}}}Ss.id="radar",Ss.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Ss.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class It{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return rn(this.x)&&rn(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const r={};return e.forEach(a=>{r[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),r}}It.defaults={},It.defaultRoutes=void 0;const mc={values(t){return je(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const i=this.chart.options.locale;let r,a=t;if(n.length>1){const l=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(l<1e-4||l>1e15)&&(r="scientific"),a=fz(t,n)}const o=Ge(Math.abs(a)),M=Math.max(Math.min(-1*Math.floor(o),20),0),u={notation:r,minimumFractionDigits:M,maximumFractionDigits:M};return Object.assign(u,this.options.ticks.format),On(t,i,u)},logarithmic(t,e,n){if(t===0)return"0";const i=t/Math.pow(10,Math.floor(Ge(t)));return i===1||i===2||i===5?mc.numeric.call(this,t,e,n):""}};function fz(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Ur={formatters:mc};ee.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ur.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ee.route("scale.ticks","color","","color"),ee.route("scale.grid","color","","borderColor"),ee.route("scale.grid","borderColor","","borderColor"),ee.route("scale.title","color","","color"),ee.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"}),ee.describe("scales",{_fallback:"scale"}),ee.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"});function hz(t,e){const n=t.options.ticks,i=n.maxTicksLimit||mz(t),r=n.major.enabled?zz(e):[],a=r.length,o=r[0],M=r[a-1],u=[];if(a>i)return pz(e,u,r,a/i),u;const l=Az(r,e,i);if(a>0){let c,g;const y=a>1?Math.round((M-o)/(a-1)):null;for(Pr(e,u,l,oe(y)?0:o-y,o),c=0,g=a-1;c<g;c++)Pr(e,u,l,r[c],r[c+1]);return Pr(e,u,l,M,oe(y)?e.length:M+y),u}return Pr(e,u,l),u}function mz(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(i,r))}function Az(t,e,n){const i=Tz(t),r=e.length/n;if(!i)return Math.max(r,1);const a=dm(i);for(let o=0,M=a.length-1;o<M;o++){const u=a[o];if(u>r)return u}return Math.max(r,1)}function zz(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}function pz(t,e,n,i){let r=0,a=n[0],o;for(i=Math.ceil(i),o=0;o<t.length;o++)o===a&&(e.push(t[o]),r++,a=n[r*i])}function Pr(t,e,n,i,r){const a=ie(i,0),o=Math.min(ie(r,t.length),t.length);let M=0,u,l,c;for(n=Math.ceil(n),r&&(u=r-i,n=u/Math.floor(u/n)),c=a;c<0;)M++,c=Math.round(a+M*n);for(l=Math.max(a,0);l<o;l++)l===c&&(e.push(t[l]),M++,c=Math.round(a+M*n))}function Tz(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}const Lz=t=>t==="left"?"right":t==="right"?"left":t,Ac=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n;function zc(t,e){const n=[],i=t.length/e,r=t.length;let a=0;for(;a<r;a+=i)n.push(t[Math.floor(a)]);return n}function xz(t,e,n){const i=t.ticks.length,r=Math.min(e,i-1),a=t._startPixel,o=t._endPixel,M=1e-6;let u=t.getPixelForTick(r),l;if(!(n&&(i===1?l=Math.max(u-a,o-u):e===0?l=(t.getPixelForTick(1)-u)/2:l=(u-t.getPixelForTick(r-1))/2,u+=r<e?l:-l,u<a-M||u>o+M)))return u}function Oz(t,e){Me(t,n=>{const i=n.gc,r=i.length/2;let a;if(r>e){for(a=0;a<r;++a)delete n.data[i[a]];i.splice(0,r)}})}function En(t){return t.drawTicks?t.tickLength:0}function pc(t,e){if(!t.display)return 0;const n=Ze(t.font,e),i=$e(t.padding);return(je(t.text)?t.text.length:1)*n.lineHeight+i.height}function Sz(t,e){return Ot(t,{scale:e,type:"scale"})}function bz(t,e,n){return Ot(t,{tick:n,index:e,type:"tick"})}function Ez(t,e,n){let i=Tm(t);return(n&&e!=="right"||!n&&e==="right")&&(i=Lz(i)),i}function wz(t,e,n,i){const{top:r,left:a,bottom:o,right:M,chart:u}=t,{chartArea:l,scales:c}=u;let g=0,y,j,I;const D=o-r,d=M-a;if(t.isHorizontal()){if(j=Ll(i,a,M),ne(n)){const N=Object.keys(n)[0],f=n[N];I=c[N].getPixelForValue(f)+D-e}else n==="center"?I=(l.bottom+l.top)/2+D-e:I=Ac(t,n,e);y=M-a}else{if(ne(n)){const N=Object.keys(n)[0],f=n[N];j=c[N].getPixelForValue(f)-d+e}else n==="center"?j=(l.left+l.right)/2-d+e:j=Ac(t,n,e);I=Ll(i,o,r),g=n==="left"?-ze:ze}return{titleX:j,titleY:I,maxWidth:y,rotation:g}}class $t extends It{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:i,_suggestedMax:r}=this;return e=Be(e,Number.POSITIVE_INFINITY),n=Be(n,Number.NEGATIVE_INFINITY),i=Be(i,Number.POSITIVE_INFINITY),r=Be(r,Number.NEGATIVE_INFINITY),{min:Be(e,i),max:Be(n,r),minDefined:Se(e),maxDefined:Se(n)}}getMinMax(e){let{min:n,max:i,minDefined:r,maxDefined:a}=this.getUserBounds(),o;if(r&&a)return{min:n,max:i};const M=this.getMatchingVisibleMetas();for(let u=0,l=M.length;u<l;++u)o=M[u].controller.getMinMax(this,e),r||(n=Math.min(n,o.min)),a||(i=Math.max(i,o.max));return n=a&&n>i?i:n,i=r&&n>i?n:i,{min:Be(n,Be(i,n)),max:Be(i,Be(n,i))}}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||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){me(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:r,grace:a,ticks:o}=this.options,M=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=oA(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=M<this.ticks.length;this._convertTicksToLabels(u?zc(this.ticks,M):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=hz(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,e=!e),this._startPixel=n,this._endPixel=i,this._reversePixels=e,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){me(this.options.afterUpdate,[this])}beforeSetDimensions(){me(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(){me(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),me(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){me(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let i,r,a;for(i=0,r=e.length;i<r;i++)a=e[i],a.label=me(n.callback,[a.value,i,e],this)}afterTickToLabelConversion(){me(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){me(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,i=this.ticks.length,r=n.minRotation||0,a=n.maxRotation;let o=r,M,u,l;if(!this._isVisible()||!n.display||r>=a||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const c=this._getLabelSizes(),g=c.widest.width,y=c.highest.height,j=ke(this.chart.width-g,0,this.maxWidth);M=e.offset?this.maxWidth/i:j/(i-1),g+6>M&&(M=j/(i-(e.offset?.5:1)),u=this.maxHeight-En(e.grid)-n.padding-pc(e.title,this.chart.options.font),l=Math.sqrt(g*g+y*y),o=rs(Math.min(Math.asin(ke((c.highest.height+6)/M,-1,1)),Math.asin(ke(u/l,-1,1))-Math.asin(ke(y/l,-1,1)))),o=Math.max(r,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){me(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){me(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:a}}=this,o=this._isVisible(),M=this.isHorizontal();if(o){const u=pc(r,n.options.font);if(M?(e.width=this.maxWidth,e.height=En(a)+u):(e.height=this.maxHeight,e.width=En(a)+u),i.display&&this.ticks.length){const{first:l,last:c,widest:g,highest:y}=this._getLabelSizes(),j=i.padding*2,I=qe(this.labelRotation),D=Math.cos(I),d=Math.sin(I);if(M){const N=i.mirror?0:d*g.width+D*y.height;e.height=Math.min(this.maxHeight,e.height+N+j)}else{const N=i.mirror?0:D*g.width+d*y.height;e.width=Math.min(this.maxWidth,e.width+N+j)}this._calculatePadding(l,c,d,D)}}this._handleMargins(),M?(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,i,r){const{ticks:{align:a,padding:o},position:M}=this.options,u=this.labelRotation!==0,l=M!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,g=this.right-this.getPixelForTick(this.ticks.length-1);let y=0,j=0;u?l?(y=r*e.width,j=i*n.height):(y=i*e.height,j=r*n.width):a==="start"?j=n.width:a==="end"?y=e.width:a!=="inner"&&(y=e.width/2,j=n.width/2),this.paddingLeft=Math.max((y-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((j-g+o)*this.width/(this.width-g),0)}else{let c=n.height/2,g=e.height/2;a==="start"?(c=0,g=e.height):a==="end"&&(c=n.height,g=0),this.paddingTop=c+o,this.paddingBottom=g+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){me(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,i;for(n=0,i=e.length;n<i;n++)oe(e[n].label)&&(e.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=zc(i,n)),this._labelSizes=e=this._computeLabelSizes(i,i.length)}return e}_computeLabelSizes(e,n){const{ctx:i,_longestTextCache:r}=this,a=[],o=[];let M=0,u=0,l,c,g,y,j,I,D,d,N,f,p;for(l=0;l<n;++l){if(y=e[l].label,j=this._resolveTickFontOptions(l),i.font=I=j.string,D=r[I]=r[I]||{data:{},gc:[]},d=j.lineHeight,N=f=0,!oe(y)&&!je(y))N=Er(i,D.data,D.gc,N,y),f=d;else if(je(y))for(c=0,g=y.length;c<g;++c)p=y[c],!oe(p)&&!je(p)&&(N=Er(i,D.data,D.gc,N,p),f+=d);a.push(N),o.push(f),M=Math.max(N,M),u=Math.max(f,u)}Oz(r,n);const T=a.indexOf(M),m=o.indexOf(u),O=k=>({width:a[k]||0,height:o[k]||0});return{first:O(0),last:O(n-1),widest:O(T),highest:O(m),widths:a,heights:o}}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 hm(this._alignToPixels?Bt(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 i=n[e];return i.$context||(i.$context=bz(this.getContext(),e,i))}return this.$context||(this.$context=Sz(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=qe(this.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),a=this._getLabelSizes(),o=e.autoSkipPadding||0,M=a?a.widest.width+o:0,u=a?a.highest.height+o:0;return this.isHorizontal()?u*i>M*r?M/i:u/r:u*r<M*i?u/i:M/r}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,i=this.chart,r=this.options,{grid:a,position:o}=r,M=a.offset,u=this.isHorizontal(),c=this.ticks.length+(M?1:0),g=En(a),y=[],j=a.setContext(this.getContext()),I=j.drawBorder?j.borderWidth:0,D=I/2,d=function(z){return Bt(i,z,I)};let N,f,p,T,m,O,k,Q,Y,U,b,h;if(o==="top")N=d(this.bottom),O=this.bottom-g,Q=N-D,U=d(e.top)+D,h=e.bottom;else if(o==="bottom")N=d(this.top),U=e.top,h=d(e.bottom)-D,O=N+D,Q=this.top+g;else if(o==="left")N=d(this.right),m=this.right-g,k=N-D,Y=d(e.left)+D,b=e.right;else if(o==="right")N=d(this.left),Y=e.left,b=d(e.right)-D,m=N+D,k=this.left+g;else if(n==="x"){if(o==="center")N=d((e.top+e.bottom)/2+.5);else if(ne(o)){const z=Object.keys(o)[0],C=o[z];N=d(this.chart.scales[z].getPixelForValue(C))}U=e.top,h=e.bottom,O=N+D,Q=O+g}else if(n==="y"){if(o==="center")N=d((e.left+e.right)/2);else if(ne(o)){const z=Object.keys(o)[0],C=o[z];N=d(this.chart.scales[z].getPixelForValue(C))}m=N-D,k=m-g,Y=e.left,b=e.right}const S=ie(r.ticks.maxTicksLimit,c),w=Math.max(1,Math.ceil(c/S));for(f=0;f<c;f+=w){const z=a.setContext(this.getContext(f)),C=z.lineWidth,Z=z.color,V=z.borderDash||[],F=z.borderDashOffset,J=z.tickWidth,E=z.tickColor,v=z.tickBorderDash||[],R=z.tickBorderDashOffset;p=xz(this,f,M),p!==void 0&&(T=Bt(i,p,C),u?m=k=Y=b=T:O=Q=U=h=T,y.push({tx1:m,ty1:O,tx2:k,ty2:Q,x1:Y,y1:U,x2:b,y2:h,width:C,color:Z,borderDash:V,borderDashOffset:F,tickWidth:J,tickColor:E,tickBorderDash:v,tickBorderDashOffset:R}))}return this._ticksLength=c,this._borderValue=N,y}_computeLabelItems(e){const n=this.axis,i=this.options,{position:r,ticks:a}=i,o=this.isHorizontal(),M=this.ticks,{align:u,crossAlign:l,padding:c,mirror:g}=a,y=En(i.grid),j=y+c,I=g?-c:j,D=-qe(this.labelRotation),d=[];let N,f,p,T,m,O,k,Q,Y,U,b,h,S="middle";if(r==="top")O=this.bottom-I,k=this._getXAxisLabelAlignment();else if(r==="bottom")O=this.top+I,k=this._getXAxisLabelAlignment();else if(r==="left"){const z=this._getYAxisLabelAlignment(y);k=z.textAlign,m=z.x}else if(r==="right"){const z=this._getYAxisLabelAlignment(y);k=z.textAlign,m=z.x}else if(n==="x"){if(r==="center")O=(e.top+e.bottom)/2+j;else if(ne(r)){const z=Object.keys(r)[0],C=r[z];O=this.chart.scales[z].getPixelForValue(C)+j}k=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")m=(e.left+e.right)/2-j;else if(ne(r)){const z=Object.keys(r)[0],C=r[z];m=this.chart.scales[z].getPixelForValue(C)}k=this._getYAxisLabelAlignment(y).textAlign}n==="y"&&(u==="start"?S="top":u==="end"&&(S="bottom"));const w=this._getLabelSizes();for(N=0,f=M.length;N<f;++N){p=M[N],T=p.label;const z=a.setContext(this.getContext(N));Q=this.getPixelForTick(N)+a.labelOffset,Y=this._resolveTickFontOptions(N),U=Y.lineHeight,b=je(T)?T.length:1;const C=b/2,Z=z.color,V=z.textStrokeColor,F=z.textStrokeWidth;let J=k;o?(m=Q,k==="inner"&&(N===f-1?J=this.options.reverse?"left":"right":N===0?J=this.options.reverse?"right":"left":J="center"),r==="top"?l==="near"||D!==0?h=-b*U+U/2:l==="center"?h=-w.highest.height/2-C*U+U:h=-w.highest.height+U/2:l==="near"||D!==0?h=U/2:l==="center"?h=w.highest.height/2-C*U:h=w.highest.height-b*U,g&&(h*=-1)):(O=Q,h=(1-b)*U/2);let E;if(z.showLabelBackdrop){const v=$e(z.backdropPadding),R=w.heights[N],Le=w.widths[N];let be=O+h-v.top,Ee=m-v.left;switch(S){case"middle":be-=R/2;break;case"bottom":be-=R;break}switch(k){case"center":Ee-=Le/2;break;case"right":Ee-=Le;break}E={left:Ee,top:be,width:Le+v.width,height:R+v.height,color:z.backdropColor}}d.push({rotation:D,label:T,font:Y,color:Z,strokeColor:V,strokeWidth:F,textOffset:h,textAlign:J,textBaseline:S,translation:[m,O],backdrop:E})}return d}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-qe(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:i,mirror:r,padding:a}}=this.options,o=this._getLabelSizes(),M=e+a,u=o.widest.width;let l,c;return n==="left"?r?(c=this.right+a,i==="near"?l="left":i==="center"?(l="center",c+=u/2):(l="right",c+=u)):(c=this.right-M,i==="near"?l="right":i==="center"?(l="center",c-=u/2):(l="left",c=this.left)):n==="right"?r?(c=this.left+a,i==="near"?l="right":i==="center"?(l="center",c-=u/2):(l="left",c-=u)):(c=this.left+M,i==="near"?l="left":i==="center"?(l="center",c+=u/2):(l="right",c=this.right)):l="right",{textAlign:l,x:c}}_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:i,top:r,width:a,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,r,a,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(a=>a.value===e);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let a,o;const M=(u,l,c)=>{!c.width||!c.color||(i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.setLineDash(c.borderDash||[]),i.lineDashOffset=c.borderDashOffset,i.beginPath(),i.moveTo(u.x,u.y),i.lineTo(l.x,l.y),i.stroke(),i.restore())};if(n.display)for(a=0,o=r.length;a<o;++a){const u=r[a];n.drawOnChartArea&&M({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&M({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{grid:i}}=this,r=i.setContext(this.getContext()),a=i.drawBorder?r.borderWidth:0;if(!a)return;const o=i.setContext(this.getContext(0)).lineWidth,M=this._borderValue;let u,l,c,g;this.isHorizontal()?(u=Bt(e,this.left,a)-a/2,l=Bt(e,this.right,o)+o/2,c=g=M):(c=Bt(e,this.top,a)-a/2,g=Bt(e,this.bottom,o)+o/2,u=l=M),n.save(),n.lineWidth=r.borderWidth,n.strokeStyle=r.borderColor,n.beginPath(),n.moveTo(u,c),n.lineTo(l,g),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Zl(i,r);const a=this._labelItems||(this._labelItems=this._computeLabelItems(e));let o,M;for(o=0,M=a.length;o<M;++o){const u=a[o],l=u.font,c=u.label;u.backdrop&&(i.fillStyle=u.backdrop.color,i.fillRect(u.backdrop.left,u.backdrop.top,u.backdrop.width,u.backdrop.height));let g=u.textOffset;wr(i,c,0,g,l,u)}r&&Bl(i)}drawTitle(){const{ctx:e,options:{position:n,title:i,reverse:r}}=this;if(!i.display)return;const a=Ze(i.font),o=$e(i.padding),M=i.align;let u=a.lineHeight/2;n==="bottom"||n==="center"||ne(n)?(u+=o.bottom,je(i.text)&&(u+=a.lineHeight*(i.text.length-1))):u+=o.top;const{titleX:l,titleY:c,maxWidth:g,rotation:y}=wz(this,u,n,M);wr(e,i.text,0,0,a,{color:i.color,maxWidth:g,rotation:y,textAlign:Ez(M,n,r),textBaseline:"middle",translation:[l,c]})}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,i=ie(e.grid&&e.grid.z,-1);return!this._isVisible()||this.draw!==$t.prototype.draw?[{z:n,draw:r=>{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let a,o;for(a=0,o=n.length;a<o;++a){const M=n[a];M[i]===this.id&&(!e||M.type===e)&&r.push(M)}return r}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Ze(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Rr{constructor(e,n,i){this.type=e,this.scope=n,this.override=i,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 i;_z(n)&&(i=this.register(n));const r=this.items,a=e.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in r||(r[a]=e,Cz(e,o,i),this.override&&ee.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,i=e.id,r=this.scope;i in n&&delete n[i],r&&i in ee[r]&&(delete ee[r][i],this.override&&delete Zt[i])}}function Cz(t,e,n){const i=Dn(Object.create(null),[n?ee.get(n):{},ee.get(e),t.defaults]);ee.set(e,i),t.defaultRoutes&&kz(e,t.defaultRoutes),t.descriptors&&ee.describe(e,t.descriptors)}function kz(t,e){Object.keys(e).forEach(n=>{const i=n.split("."),r=i.pop(),a=[t].concat(i).join("."),o=e[n].split("."),M=o.pop(),u=o.join(".");ee.route(a,r,u,M)})}function _z(t){return"id"in t&&"defaults"in t}class Yz{constructor(){this.controllers=new Rr(tt,"datasets",!0),this.elements=new Rr(It,"elements"),this.plugins=new Rr(Object,"plugins"),this.scales=new Rr($t,"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,i){[...n].forEach(r=>{const a=i||this._getRegistryForType(r);i||a.isForType(r)||a===this.plugins&&r.id?this._exec(e,a,r):Me(r,o=>{const M=i||this._getRegistryForType(o);this._exec(e,M,o)})})}_exec(e,n,i){const r=is(e);me(i["before"+r],[],i),n[e](i),me(i["after"+r],[],i)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(e))return i}return this.plugins}_get(e,n,i){const r=n.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return r}}var ut=new Yz;class bs extends tt{update(e){const n=this._cachedMeta,{data:i=[]}=n,r=this.chart._animationsDisabled;let{start:a,count:o}=xl(n,i,r);if(this._drawStart=a,this._drawCount=o,Ol(n)&&(a=0,o=i.length),this.options.showLine){const{dataset:M,_dataset:u}=n;M._chart=this.chart,M._datasetIndex=this.index,M._decimated=!!u._decimated,M.points=i;const l=this.resolveDatasetElementOptions(e);l.segment=this.options.segment,this.updateElement(M,void 0,{animated:!r,options:l},e)}this.updateElements(i,a,o,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=ut.getElement("line")),super.addElements()}updateElements(e,n,i,r){const a=r==="reset",{iScale:o,vScale:M,_stacked:u,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(n,r),g=this.getSharedOptions(c),y=this.includeOptions(r,g),j=o.axis,I=M.axis,{spanGaps:D,segment:d}=this.options,N=rn(D)?D:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||a||r==="none";let p=n>0&&this.getParsed(n-1);for(let T=n;T<n+i;++T){const m=e[T],O=this.getParsed(T),k=f?m:{},Q=oe(O[I]),Y=k[j]=o.getPixelForValue(O[j],T),U=k[I]=a||Q?M.getBasePixel():M.getPixelForValue(u?this.applyStack(M,O,u):O[I],T);k.skip=isNaN(Y)||isNaN(U)||Q,k.stop=T>0&&Math.abs(O[j]-p[j])>N,d&&(k.parsed=O,k.raw=l.data[T]),y&&(k.options=g||this.resolveDataElementOptions(T,m.active?"active":r)),f||this.updateElement(m,T,k,r),p=O}this.updateSharedOptions(g,r,c)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let M=0;for(let u=n.length-1;u>=0;--u)M=Math.max(M,n[u].size(this.resolveDataElementOptions(u))/2);return M>0&&M}const i=e.dataset,r=i.options&&i.options.borderWidth||0;if(!n.length)return r;const a=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,a,o)/2}}bs.id="scatter",bs.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},bs.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(t){return"("+t.label+", "+t.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Ht(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Es{constructor(e){this.options=e||{}}init(e){}formats(){return Ht()}parse(e,n){return Ht()}format(e,n){return Ht()}add(e,n,i){return Ht()}diff(e,n,i){return Ht()}startOf(e,n,i){return Ht()}endOf(e,n){return Ht()}}Es.override=function(t){Object.assign(Es.prototype,t)};var Qz={_date:Es};function vz(t,e,n,i){const{controller:r,data:a,_sorted:o}=t,M=r._cachedMeta.iScale;if(M&&e===M.axis&&e!=="r"&&o&&a.length){const u=M._reversePixels?mm:Rt;if(i){if(r._sharedOptions){const l=a[0],c=typeof l.getRange=="function"&&l.getRange(e);if(c){const g=u(a,e,n-c),y=u(a,e,n+c);return{lo:g.lo,hi:y.hi}}}}else return u(a,e,n)}return{lo:0,hi:a.length-1}}function wn(t,e,n,i,r){const a=t.getSortedVisibleDatasetMetas(),o=n[e];for(let M=0,u=a.length;M<u;++M){const{index:l,data:c}=a[M],{lo:g,hi:y}=vz(a[M],e,o,r);for(let j=g;j<=y;++j){const I=c[j];I.skip||i(I,l,j)}}}function Uz(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(i,r){const a=e?Math.abs(i.x-r.x):0,o=n?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function ws(t,e,n,i,r){const a=[];return!r&&!t.isPointInArea(e)||wn(t,n,e,function(M,u,l){!r&&!xn(M,t.chartArea,0)||M.inRange(e.x,e.y,i)&&a.push({element:M,datasetIndex:u,index:l})},!0),a}function Pz(t,e,n,i){let r=[];function a(o,M,u){const{startAngle:l,endAngle:c}=o.getProps(["startAngle","endAngle"],i),{angle:g}=hl(o,{x:e.x,y:e.y});An(g,l,c)&&r.push({element:o,datasetIndex:M,index:u})}return wn(t,n,e,a),r}function Rz(t,e,n,i,r,a){let o=[];const M=Uz(n);let u=Number.POSITIVE_INFINITY;function l(c,g,y){const j=c.inRange(e.x,e.y,r);if(i&&!j)return;const I=c.getCenterPoint(r);if(!(!!a||t.isPointInArea(I))&&!j)return;const d=M(e,I);d<u?(o=[{element:c,datasetIndex:g,index:y}],u=d):d===u&&o.push({element:c,datasetIndex:g,index:y})}return wn(t,n,e,l),o}function Cs(t,e,n,i,r,a){return!a&&!t.isPointInArea(e)?[]:n==="r"&&!i?Pz(t,e,n,r):Rz(t,e,n,i,r,a)}function Tc(t,e,n,i,r){const a=[],o=n==="x"?"inXRange":"inYRange";let M=!1;return wn(t,n,e,(u,l,c)=>{u[o](e[n],r)&&(a.push({element:u,datasetIndex:l,index:c}),M=M||u.inRange(e.x,e.y,r))}),i&&!M?[]:a}var Zz={evaluateInteractionItems:wn,modes:{index(t,e,n,i){const r=Gt(e,t),a=n.axis||"x",o=n.includeInvisible||!1,M=n.intersect?ws(t,r,a,i,o):Cs(t,r,a,!1,i,o),u=[];return M.length?(t.getSortedVisibleDatasetMetas().forEach(l=>{const c=M[0].index,g=l.data[c];g&&!g.skip&&u.push({element:g,datasetIndex:l.index,index:c})}),u):[]},dataset(t,e,n,i){const r=Gt(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;let M=n.intersect?ws(t,r,a,i,o):Cs(t,r,a,!1,i,o);if(M.length>0){const u=M[0].datasetIndex,l=t.getDatasetMeta(u).data;M=[];for(let c=0;c<l.length;++c)M.push({element:l[c],datasetIndex:u,index:c})}return M},point(t,e,n,i){const r=Gt(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;return ws(t,r,a,i,o)},nearest(t,e,n,i){const r=Gt(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;return Cs(t,r,a,n.intersect,i,o)},x(t,e,n,i){const r=Gt(e,t);return Tc(t,r,"x",n.intersect,i)},y(t,e,n,i){const r=Gt(e,t);return Tc(t,r,"y",n.intersect,i)}}};const Lc=["left","top","right","bottom"];function Cn(t,e){return t.filter(n=>n.pos===e)}function xc(t,e){return t.filter(n=>Lc.indexOf(n.pos)===-1&&n.box.axis===e)}function kn(t,e){return t.sort((n,i)=>{const r=e?i:n,a=e?n:i;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function Bz(t){const e=[];let n,i,r,a,o,M;for(n=0,i=(t||[]).length;n<i;++n)r=t[n],{position:a,options:{stack:o,stackWeight:M=1}}=r,e.push({index:n,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&a+o,stackWeight:M});return e}function Vz(t){const e={};for(const n of t){const{stack:i,pos:r,stackWeight:a}=n;if(!i||!Lc.includes(r))continue;const o=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return e}function Gz(t,e){const n=Vz(t),{vBoxMaxWidth:i,hBoxMaxHeight:r}=e;let a,o,M;for(a=0,o=t.length;a<o;++a){M=t[a];const{fullSize:u}=M.box,l=n[M.stack],c=l&&M.stackWeight/l.weight;M.horizontal?(M.width=c?c*i:u&&e.availableWidth,M.height=r):(M.width=i,M.height=c?c*r:u&&e.availableHeight)}return n}function Wz(t){const e=Bz(t),n=kn(e.filter(l=>l.box.fullSize),!0),i=kn(Cn(e,"left"),!0),r=kn(Cn(e,"right")),a=kn(Cn(e,"top"),!0),o=kn(Cn(e,"bottom")),M=xc(e,"x"),u=xc(e,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:r.concat(u).concat(o).concat(M),chartArea:Cn(e,"chartArea"),vertical:i.concat(r).concat(u),horizontal:a.concat(o).concat(M)}}function Oc(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function Sc(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 $z(t,e,n,i){const{pos:r,box:a}=n,o=t.maxPadding;if(!ne(r)){n.size&&(t[r]-=n.size);const g=i[n.stack]||{size:0,count:1};g.size=Math.max(g.size,n.horizontal?a.height:a.width),n.size=g.size/g.count,t[r]+=n.size}a.getPadding&&Sc(o,a.getPadding());const M=Math.max(0,e.outerWidth-Oc(o,t,"left","right")),u=Math.max(0,e.outerHeight-Oc(o,t,"top","bottom")),l=M!==t.w,c=u!==t.h;return t.w=M,t.h=u,n.horizontal?{same:l,other:c}:{same:c,other:l}}function Hz(t){const e=t.maxPadding;function n(i){const r=Math.max(e[i]-t[i],0);return t[i]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Fz(t,e){const n=e.maxPadding;function i(r){const a={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{a[o]=Math.max(e[o],n[o])}),a}return i(t?["left","right"]:["top","bottom"])}function _n(t,e,n,i){const r=[];let a,o,M,u,l,c;for(a=0,o=t.length,l=0;a<o;++a){M=t[a],u=M.box,u.update(M.width||e.w,M.height||e.h,Fz(M.horizontal,e));const{same:g,other:y}=$z(e,n,M,i);l|=g&&r.length,c=c||y,u.fullSize||r.push(M)}return l&&_n(r,e,n,i)||c}function Zr(t,e,n,i,r){t.top=n,t.left=e,t.right=e+i,t.bottom=n+r,t.width=i,t.height=r}function bc(t,e,n,i){const r=n.padding;let{x:a,y:o}=e;for(const M of t){const u=M.box,l=i[M.stack]||{count:1,placed:0,weight:1},c=M.stackWeight/l.weight||1;if(M.horizontal){const g=e.w*c,y=l.size||u.height;Ve(l.start)&&(o=l.start),u.fullSize?Zr(u,r.left,o,n.outerWidth-r.right-r.left,y):Zr(u,e.left+l.placed,o,g,y),l.start=o,l.placed+=g,o=u.bottom}else{const g=e.h*c,y=l.size||u.width;Ve(l.start)&&(a=l.start),u.fullSize?Zr(u,a,r.top,y,n.outerHeight-r.bottom-r.top):Zr(u,a,e.top+l.placed,y,g),l.start=a,l.placed+=g,a=u.right}}e.x=a,e.y=o}ee.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Br={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,i){if(!t)return;const r=$e(t.options.layout.padding),a=Math.max(e-r.width,0),o=Math.max(n-r.height,0),M=Wz(t.boxes),u=M.vertical,l=M.horizontal;Me(t.boxes,D=>{typeof D.beforeLayout=="function"&&D.beforeLayout()});const c=u.reduce((D,d)=>d.box.options&&d.box.options.display===!1?D:D+1,0)||1,g=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/c,hBoxMaxHeight:o/2}),y=Object.assign({},r);Sc(y,$e(i));const j=Object.assign({maxPadding:y,w:a,h:o,x:r.left,y:r.top},r),I=Gz(u.concat(l),g);_n(M.fullSize,j,g,I),_n(u,j,g,I),_n(l,j,g,I)&&_n(u,j,g,I),Hz(j),bc(M.leftAndTop,j,g,I),j.x+=j.w,j.y+=j.h,bc(M.rightAndBottom,j,g,I),t.chartArea={left:j.left,top:j.top,right:j.left+j.w,bottom:j.top+j.h,height:j.h,width:j.w},Me(M.chartArea,D=>{const d=D.box;Object.assign(d,t.chartArea),d.update(j.w,j.h,{left:0,top:0,right:0,bottom:0})})}};class Ec{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,r){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(e){return!0}updateConfig(e){}}class Jz extends Ec{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Vr="$chartjs",Xz={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},wc=t=>t===null||t==="";function Kz(t,e){const n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[Vr]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",wc(r)){const a=tc(t,"width");a!==void 0&&(t.width=a)}if(wc(i))if(t.style.height==="")t.height=t.width/(e||2);else{const a=tc(t,"height");a!==void 0&&(t.height=a)}return t}const Cc=SA?{passive:!0}:!1;function qz(t,e,n){t.addEventListener(e,n,Cc)}function ep(t,e,n){t.canvas.removeEventListener(e,n,Cc)}function tp(t,e){const n=Xz[t.type]||t.type,{x:i,y:r}=Gt(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Gr(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function np(t,e,n){const i=t.canvas,r=new MutationObserver(a=>{let o=!1;for(const M of a)o=o||Gr(M.addedNodes,i),o=o&&!Gr(M.removedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function ip(t,e,n){const i=t.canvas,r=new MutationObserver(a=>{let o=!1;for(const M of a)o=o||Gr(M.removedNodes,i),o=o&&!Gr(M.addedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const Yn=new Map;let kc=0;function _c(){const t=window.devicePixelRatio;t!==kc&&(kc=t,Yn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function rp(t,e){Yn.size||window.addEventListener("resize",_c),Yn.set(t,e)}function ap(t){Yn.delete(t),Yn.size||window.removeEventListener("resize",_c)}function op(t,e,n){const i=t.canvas,r=i&&hs(i);if(!r)return;const a=Tl((M,u)=>{const l=r.clientWidth;n(M,u),l<r.clientWidth&&n()},window),o=new ResizeObserver(M=>{const u=M[0],l=u.contentRect.width,c=u.contentRect.height;l===0&&c===0||a(l,c)});return o.observe(r),rp(t,a),o}function ks(t,e,n){n&&n.disconnect(),e==="resize"&&ap(t)}function sp(t,e,n){const i=t.canvas,r=Tl(a=>{t.ctx!==null&&n(tp(a,t))},t,a=>{const o=a[0];return[o,o.offsetX,o.offsetY]});return qz(i,e,r),r}class Mp extends Ec{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(Kz(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[Vr])return!1;const i=n[Vr].initial;["height","width"].forEach(a=>{const o=i[a];oe(o)?n.removeAttribute(a):n.setAttribute(a,o)});const r=i.style||{};return Object.keys(r).forEach(a=>{n.style[a]=r[a]}),n.width=n.width,delete n[Vr],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const r=e.$proxies||(e.$proxies={}),o={attach:np,detach:ip,resize:op}[n]||sp;r[n]=o(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),r=i[n];if(!r)return;({attach:ks,detach:ks,resize:ks}[n]||ep)(e,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,r){return OA(e,n,i,r)}isAttached(e){const n=hs(e);return!!(n&&n.isConnected)}}function up(t){return!ql()||typeof OffscreenCanvas!="undefined"&&t instanceof OffscreenCanvas?Jz:Mp}class lp{constructor(){this._init=[]}notify(e,n,i,r){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const a=r?this._descriptors(e).filter(r):this._descriptors(e),o=this._notify(a,e,n,i);return n==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,i,r){r=r||{};for(const a of e){const o=a.plugin,M=o[i],u=[n,r,a.options];if(me(M,u,o)===!1&&r.cancelable)return!1}return!0}invalidate(){oe(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 i=e&&e.config,r=ie(i.options&&i.options.plugins,{}),a=cp(i);return r===!1&&!n?[]:Np(e,a,r,n)}_notifyStateChanges(e){const n=this._oldCache||[],i=this._cache,r=(a,o)=>a.filter(M=>!o.some(u=>M.plugin.id===u.plugin.id));this._notify(r(n,i),e,"stop"),this._notify(r(i,n),e,"start")}}function cp(t){const e={},n=[],i=Object.keys(ut.plugins.items);for(let a=0;a<i.length;a++)n.push(ut.getPlugin(i[a]));const r=t.plugins||[];for(let a=0;a<r.length;a++){const o=r[a];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function gp(t,e){return!e&&t===!1?null:t===!0?{}:t}function Np(t,{plugins:e,localIds:n},i,r){const a=[],o=t.getContext();for(const M of e){const u=M.id,l=gp(i[u],r);l!==null&&a.push({plugin:M,options:yp(t.config,{plugin:M,local:n[u]},l,o)})}return a}function yp(t,{plugin:e,local:n},i,r){const a=t.pluginScopeKeys(e),o=t.getOptionScopes(i,a);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function _s(t,e){const n=ee.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function jp(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function Ip(t,e){return t===e?"_index_":"_value_"}function dp(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Ys(t,e){return t==="x"||t==="y"?t:e.axis||dp(e.position)||t.charAt(0).toLowerCase()}function Dp(t,e){const n=Zt[t.type]||{scales:{}},i=e.scales||{},r=_s(t.type,e),a=Object.create(null),o=Object.create(null);return Object.keys(i).forEach(M=>{const u=i[M];if(!ne(u))return console.error(`Invalid scale configuration for scale: ${M}`);if(u._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${M}`);const l=Ys(M,u),c=Ip(l,r),g=n.scales||{};a[l]=a[l]||M,o[M]=fn(Object.create(null),[{axis:l},u,g[l],g[c]])}),t.data.datasets.forEach(M=>{const u=M.type||t.type,l=M.indexAxis||_s(u,e),g=(Zt[u]||{}).scales||{};Object.keys(g).forEach(y=>{const j=jp(y,l),I=M[j+"AxisID"]||a[j]||j;o[I]=o[I]||Object.create(null),fn(o[I],[{axis:j},i[I],g[y]])})}),Object.keys(o).forEach(M=>{const u=o[M];fn(u,[ee.scales[u.type],ee.scale])}),o}function Yc(t){const e=t.options||(t.options={});e.plugins=ie(e.plugins,{}),e.scales=Dp(t,e)}function Qc(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function fp(t){return t=t||{},t.data=Qc(t.data),Yc(t),t}const vc=new Map,Uc=new Set;function Wr(t,e){let n=vc.get(t);return n||(n=e(),vc.set(t,n),Uc.add(n)),n}const Qn=(t,e,n)=>{const i=pt(e,n);i!==void 0&&t.add(i)};class hp{constructor(e){this._config=fp(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=Qc(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(),Yc(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Wr(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Wr(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Wr(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return Wr(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let r=i.get(e);return(!r||n)&&(r=new Map,i.set(e,r)),r}getOptionScopes(e,n,i){const{options:r,type:a}=this,o=this._cachedScopes(e,i),M=o.get(n);if(M)return M;const u=new Set;n.forEach(c=>{e&&(u.add(e),c.forEach(g=>Qn(u,e,g))),c.forEach(g=>Qn(u,r,g)),c.forEach(g=>Qn(u,Zt[a]||{},g)),c.forEach(g=>Qn(u,ee,g)),c.forEach(g=>Qn(u,Ns,g))});const l=Array.from(u);return l.length===0&&l.push(Object.create(null)),Uc.has(n)&&o.set(n,l),l}chartOptionScopes(){const{options:e,type:n}=this;return[e,Zt[n]||{},ee.datasets[n]||{},{type:n},ee,Ns]}resolveNamedOptions(e,n,i,r=[""]){const a={$shared:!0},{resolver:o,subPrefixes:M}=Pc(this._resolverCache,e,r);let u=o;if(Ap(o,n)){a.$shared=!1,i=Tt(i)?i():i;const l=this.createResolver(e,i,M);u=sn(o,i,l)}for(const l of n)a[l]=u[l];return a}createResolver(e,n,i=[""],r){const{resolver:a}=Pc(this._resolverCache,e,i);return ne(n)?sn(a,n,void 0,r):a}}function Pc(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const r=n.join();let a=i.get(r);return a||(a={resolver:ds(e,n),subPrefixes:n.filter(M=>!M.toLowerCase().includes("hover"))},i.set(r,a)),a}const mp=t=>ne(t)&&Object.getOwnPropertyNames(t).reduce((e,n)=>e||Tt(t[n]),!1);function Ap(t,e){const{isScriptable:n,isIndexable:i}=Gl(t);for(const r of e){const a=n(r),o=i(r),M=(o||a)&&t[r];if(a&&(Tt(M)||mp(M))||o&&je(M))return!0}return!1}var zp="3.9.1";const pp=["top","bottom","left","right","chartArea"];function Rc(t,e){return t==="top"||t==="bottom"||pp.indexOf(t)===-1&&e==="x"}function Zc(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function Bc(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),me(n&&n.onComplete,[t],e)}function Tp(t){const e=t.chart,n=e.options.animation;me(n&&n.onProgress,[t],e)}function Vc(t){return ql()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const $r={},Gc=t=>{const e=Vc(t);return Object.values($r).filter(n=>n.canvas===e).pop()};function Lp(t,e,n){const i=Object.keys(t);for(const r of i){const a=+r;if(a>=e){const o=t[r];delete t[r],(n>0||a>e)&&(t[a+n]=o)}}}function xp(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}class vn{constructor(e,n){const i=this.config=new hp(n),r=Vc(e),a=Gc(r);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||up(r)),this.platform.updateConfig(i);const M=this.platform.acquireContext(r,o.aspectRatio),u=M&&M.canvas,l=u&&u.height,c=u&&u.width;if(this.id=Mm(),this.ctx=M,this.canvas=u,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new lp,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=pm(g=>this.update(g),o.resizeDelay||0),this._dataChanges=[],$r[this.id]=this,!M||!u){console.error("Failed to create chart: can't acquire context from the given item");return}jt.listen(this,"complete",Bc),jt.listen(this,"progress",Tp),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:r,_aspectRatio:a}=this;return oe(e)?n&&a?a:r?i/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}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ec(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rl(this.canvas,this.ctx),this}stop(){return jt.stop(this),this}resize(e,n){jt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,r=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,e,n,a),M=i.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ec(this,M,!0)&&(this.notifyPlugins("resize",{size:o}),me(i.onResize,[this,o],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Me(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,r=Object.keys(i).reduce((o,M)=>(o[M]=!1,o),{});let a=[];n&&(a=a.concat(Object.keys(n).map(o=>{const M=n[o],u=Ys(o,M),l=u==="r",c=u==="x";return{options:M,dposition:l?"chartArea":c?"bottom":"left",dtype:l?"radialLinear":c?"category":"linear"}}))),Me(a,o=>{const M=o.options,u=M.id,l=Ys(u,M),c=ie(M.type,o.dtype);(M.position===void 0||Rc(M.position,l)!==Rc(o.dposition))&&(M.position=o.dposition),r[u]=!0;let g=null;if(u in i&&i[u].type===c)g=i[u];else{const y=ut.getScale(c);g=new y({id:u,type:c,ctx:this.ctx,chart:this}),i[g.id]=g}g.init(M,e)}),Me(r,(o,M)=>{o||delete i[M]}),Me(i,o=>{Br.configure(this,o,o.options),Br.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((r,a)=>r.index-a.index),i>n){for(let r=n;r<i;++r)this._destroyDatasetMeta(r);e.splice(n,i-n)}this._sortedMetasets=e.slice(0).sort(Zc("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((i,r)=>{n.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i<r;i++){const a=n[i];let o=this.getDatasetMeta(i);const M=a.type||this.config.type;if(o.type&&o.type!==M&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=M,o.indexAxis=a.indexAxis||_s(M,this.options),o.order=a.order||0,o.index=i,o.label=""+a.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const u=ut.getController(M),{datasetElementType:l,dataElementType:c}=ee.datasets[M];Object.assign(u.prototype,{dataElementType:ut.getElement(c),datasetElementType:l&&ut.getElement(l)}),o.controller=new u(this,i),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){Me(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 i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let l=0,c=this.data.datasets.length;l<c;l++){const{controller:g}=this.getDatasetMeta(l),y=!r&&a.indexOf(g)===-1;g.buildOrUpdateElements(y),o=Math.max(+g.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),r||Me(a,l=>{l.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Zc("z","_idx"));const{_active:M,_lastEvent:u}=this;u?this._eventHandler(u,!0):M.length&&this._updateHoverStyles(M,M,!0),this.render()}_updateScales(){Me(this.scales,e=>{Br.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!jl(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:a}of n){const o=i==="_removeElements"?-a:a;Lp(e,r,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=a=>new Set(e.filter(o=>o[0]===a).map((o,M)=>M+","+o.splice(1).join(","))),r=i(0);for(let a=1;a<n;a++)if(!jl(r,i(a)))return;return Array.from(r).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Br.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Me(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,a)=>{r._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,Tt(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const i=this.getDatasetMeta(e),r={meta:i,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(jt.has(this)?this.attached&&!jt.running(this)&&jt.start(this):(this.draw(),Bc({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resize(i,r),this._resizeBeforeDraw=null}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,i=[];let r,a;for(r=0,a=n.length;r<a;++r){const o=n[r];(!e||o.visible)&&i.push(o)}return i}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,i=e._clip,r=!i.disabled,a=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&Zl(n,{left:i.left===!1?0:a.left-i.left,right:i.right===!1?this.width:a.right+i.right,top:i.top===!1?0:a.top-i.top,bottom:i.bottom===!1?this.height:a.bottom+i.bottom}),e.controller.draw(),r&&Bl(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return xn(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,r){const a=Zz.modes[n];return typeof a=="function"?a(this,e,i,r):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let r=i.filter(a=>a&&a._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},i.push(r)),r}getContext(){return this.$context||(this.$context=Ot(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const r=i?"show":"hide",a=this.getDatasetMeta(e),o=a.controller._resolveAnimations(void 0,r);Ve(n)?(a.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(a,{visible:i}),this.update(M=>M.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(),jt.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(),Rl(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete $r[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,i=(a,o)=>{n.addEventListener(this,a,o),e[a]=o},r=(a,o,M)=>{a.offsetX=o,a.offsetY=M,this._eventHandler(a)};Me(this.options.events,a=>i(a,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(u,l)=>{n.addEventListener(this,u,l),e[u]=l},r=(u,l)=>{e[u]&&(n.removeEventListener(this,u,l),delete e[u])},a=(u,l)=>{this.canvas&&this.resize(u,l)};let o;const M=()=>{r("attach",M),this.attached=!0,this.resize(),i("resize",a),i("detach",o)};o=()=>{this.attached=!1,r("resize",a),this._stop(),this._resize(0,0),i("attach",M)},n.isAttached(this.canvas)?M():o()}unbindEvents(){Me(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Me(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const r=i?"set":"remove";let a,o,M,u;for(n==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+r+"DatasetHoverStyle"]()),M=0,u=e.length;M<u;++M){o=e[M];const l=o&&this.getDatasetMeta(o.datasetIndex).controller;l&&l[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],i=e.map(({datasetIndex:a,index:o})=>{const M=this.getDatasetMeta(a);if(!M)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:M.data[o],index:o}});!Ar(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}_updateHoverStyles(e,n,i){const r=this.options.hover,a=(u,l)=>u.filter(c=>!l.some(g=>c.datasetIndex===g.datasetIndex&&c.index===g.index)),o=a(n,e),M=i?e:a(e,n);o.length&&this.updateHoverStyle(o,r.mode,!1),M.length&&r.mode&&this.updateHoverStyle(M,r.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},r=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const a=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(a||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:r=[],options:a}=this,o=n,M=this._getActiveElements(e,r,i,o),u=ym(e),l=xp(e,this._lastEvent,i,u);i&&(this._lastEvent=null,me(a.onHover,[e,M,this],this),u&&me(a.onClick,[e,M,this],this));const c=!Ar(M,r);return(c||n)&&(this._active=M,this._updateHoverStyles(M,r,n)),this._lastEvent=l,c}_getActiveElements(e,n,i,r){if(e.type==="mouseout")return[];if(!i)return n;const a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,r)}}const Wc=()=>Me(vn.instances,t=>t._plugins.invalidate()),St=!0;Object.defineProperties(vn,{defaults:{enumerable:St,value:ee},instances:{enumerable:St,value:$r},overrides:{enumerable:St,value:Zt},registry:{enumerable:St,value:ut},version:{enumerable:St,value:zp},getChart:{enumerable:St,value:Gc},register:{enumerable:St,value:(...t)=>{ut.add(...t),Wc()}},unregister:{enumerable:St,value:(...t)=>{ut.remove(...t),Wc()}}});function $c(t,e,n){const{startAngle:i,pixelMargin:r,x:a,y:o,outerRadius:M,innerRadius:u}=e;let l=r/M;t.beginPath(),t.arc(a,o,M,i-l,n+l),u>r?(l=r/u,t.arc(a,o,u,n+l,i-l,!0)):t.arc(a,o,r,n+ze,i-ze),t.closePath(),t.clip()}function Op(t){return Is(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Sp(t,e,n,i){const r=Op(t.options.borderRadius),a=(n-e)/2,o=Math.min(a,i*e/2),M=u=>{const l=(n-Math.min(a,u))*i/2;return ke(u,0,Math.min(a,l))};return{outerStart:M(r.outerStart),outerEnd:M(r.outerEnd),innerStart:ke(r.innerStart,0,o),innerEnd:ke(r.innerEnd,0,o)}}function un(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Qs(t,e,n,i,r,a){const{x:o,y:M,startAngle:u,pixelMargin:l,innerRadius:c}=e,g=Math.max(e.outerRadius+i+n-l,0),y=c>0?c+i+n+l:0;let j=0;const I=r-u;if(i){const z=c>0?c-i:0,C=g>0?g-i:0,Z=(z+C)/2,V=Z!==0?I*Z/(Z+i):I;j=(I-V)/2}const D=Math.max(.001,I*g-n/Ae)/g,d=(I-D)/2,N=u+d+j,f=r-d-j,{outerStart:p,outerEnd:T,innerStart:m,innerEnd:O}=Sp(e,y,g,f-N),k=g-p,Q=g-T,Y=N+p/k,U=f-T/Q,b=y+m,h=y+O,S=N+m/b,w=f-O/h;if(t.beginPath(),a){if(t.arc(o,M,g,Y,U),T>0){const Z=un(Q,U,o,M);t.arc(Z.x,Z.y,T,U,f+ze)}const z=un(h,f,o,M);if(t.lineTo(z.x,z.y),O>0){const Z=un(h,w,o,M);t.arc(Z.x,Z.y,O,f+ze,w+Math.PI)}if(t.arc(o,M,y,f-O/y,N+m/y,!0),m>0){const Z=un(b,S,o,M);t.arc(Z.x,Z.y,m,S+Math.PI,N-ze)}const C=un(k,N,o,M);if(t.lineTo(C.x,C.y),p>0){const Z=un(k,Y,o,M);t.arc(Z.x,Z.y,p,N-ze,Y)}}else{t.moveTo(o,M);const z=Math.cos(Y)*g+o,C=Math.sin(Y)*g+M;t.lineTo(z,C);const Z=Math.cos(U)*g+o,V=Math.sin(U)*g+M;t.lineTo(Z,V)}t.closePath()}function bp(t,e,n,i,r){const{fullCircles:a,startAngle:o,circumference:M}=e;let u=e.endAngle;if(a){Qs(t,e,n,i,o+le,r);for(let l=0;l<a;++l)t.fill();isNaN(M)||(u=o+M%le,M%le===0&&(u+=le))}return Qs(t,e,n,i,u,r),t.fill(),u}function Ep(t,e,n){const{x:i,y:r,startAngle:a,pixelMargin:o,fullCircles:M}=e,u=Math.max(e.outerRadius-o,0),l=e.innerRadius+o;let c;for(n&&$c(t,e,a+le),t.beginPath(),t.arc(i,r,l,a+le,a,!0),c=0;c<M;++c)t.stroke();for(t.beginPath(),t.arc(i,r,u,a,a+le),c=0;c<M;++c)t.stroke()}function wp(t,e,n,i,r,a){const{options:o}=e,{borderWidth:M,borderJoinStyle:u}=o,l=o.borderAlign==="inner";!M||(l?(t.lineWidth=M*2,t.lineJoin=u||"round"):(t.lineWidth=M,t.lineJoin=u||"bevel"),e.fullCircles&&Ep(t,e,l),l&&$c(t,e,r),Qs(t,e,n,i,r,a),t.stroke())}class vs extends It{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,i){const r=this.getProps(["x","y"],i),{angle:a,distance:o}=hl(r,{x:e,y:n}),{startAngle:M,endAngle:u,innerRadius:l,outerRadius:c,circumference:g}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),y=this.options.spacing/2,I=ie(g,u-M)>=le||An(a,M,u),D=Tr(o,l+y,c+y);return I&&D}getCenterPoint(e){const{x:n,y:i,startAngle:r,endAngle:a,innerRadius:o,outerRadius:M}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:u,spacing:l}=this.options,c=(r+a)/2,g=(o+M+l+u)/2;return{x:n+Math.cos(c)*g,y:i+Math.sin(c)*g}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:i}=this,r=(n.offset||0)/2,a=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=i>le?Math.floor(i/le):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let M=0;if(r){M=r/2;const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*M,Math.sin(l)*M),this.circumference>=Ae&&(M=r)}e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor;const u=bp(e,this,M,a,o);wp(e,this,M,a,u,o),e.restore()}}vs.id="arc",vs.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},vs.defaultRoutes={backgroundColor:"backgroundColor"};function Hc(t,e,n=e){t.lineCap=ie(n.borderCapStyle,e.borderCapStyle),t.setLineDash(ie(n.borderDash,e.borderDash)),t.lineDashOffset=ie(n.borderDashOffset,e.borderDashOffset),t.lineJoin=ie(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ie(n.borderWidth,e.borderWidth),t.strokeStyle=ie(n.borderColor,e.borderColor)}function Cp(t,e,n){t.lineTo(n.x,n.y)}function kp(t){return t.stepped?Km:t.tension||t.cubicInterpolationMode==="monotone"?qm:Cp}function Fc(t,e,n={}){const i=t.length,{start:r=0,end:a=i-1}=n,{start:o,end:M}=e,u=Math.max(r,o),l=Math.min(a,M),c=r<o&&a<o||r>M&&a>M;return{count:i,start:u,loop:e.loop,ilen:l<u&&!c?i+l-u:l-u}}function _p(t,e,n,i){const{points:r,options:a}=e,{count:o,start:M,loop:u,ilen:l}=Fc(r,n,i),c=kp(a);let{move:g=!0,reverse:y}=i||{},j,I,D;for(j=0;j<=l;++j)I=r[(M+(y?l-j:j))%o],!I.skip&&(g?(t.moveTo(I.x,I.y),g=!1):c(t,D,I,y,a.stepped),D=I);return u&&(I=r[(M+(y?l:0))%o],c(t,D,I,y,a.stepped)),!!u}function Yp(t,e,n,i){const r=e.points,{count:a,start:o,ilen:M}=Fc(r,n,i),{move:u=!0,reverse:l}=i||{};let c=0,g=0,y,j,I,D,d,N;const f=T=>(o+(l?M-T:T))%a,p=()=>{D!==d&&(t.lineTo(c,d),t.lineTo(c,D),t.lineTo(c,N))};for(u&&(j=r[f(0)],t.moveTo(j.x,j.y)),y=0;y<=M;++y){if(j=r[f(y)],j.skip)continue;const T=j.x,m=j.y,O=T|0;O===I?(m<D?D=m:m>d&&(d=m),c=(g*c+T)/++g):(p(),t.lineTo(T,m),I=O,g=0,D=d=m),N=m}p()}function Us(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Yp:_p}function Qp(t){return t.stepped?bA:t.tension||t.cubicInterpolationMode==="monotone"?EA:Wt}function vp(t,e,n,i){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,i)&&r.closePath()),Hc(t,e.options),t.stroke(r)}function Up(t,e,n,i){const{segments:r,options:a}=e,o=Us(e);for(const M of r)Hc(t,a,M.style),t.beginPath(),o(t,e,M,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const Pp=typeof Path2D=="function";function Rp(t,e,n,i){Pp&&!e.options.segment?vp(t,e,n,i):Up(t,e,n,i)}class Hr extends It{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 i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;AA(this._points,i,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=ZA(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,i=e.length;return i&&n[e[i-1].end]}interpolate(e,n){const i=this.options,r=e[n],a=this.points,o=UA(this,{property:n,start:r,end:r});if(!o.length)return;const M=[],u=Qp(i);let l,c;for(l=0,c=o.length;l<c;++l){const{start:g,end:y}=o[l],j=a[g],I=a[y];if(j===I){M.push(j);continue}const D=Math.abs((r-j[n])/(I[n]-j[n])),d=u(j,I,D,i.stepped);d[n]=e[n],M.push(d)}return M.length===1?M[0]:M}pathSegment(e,n,i){return Us(this)(e,this,n,i)}path(e,n,i){const r=this.segments,a=Us(this);let o=this._loop;n=n||0,i=i||this.points.length-n;for(const M of r)o&=a(e,this,M,{start:n,end:n+i-1});return!!o}draw(e,n,i,r){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),Rp(e,this,i,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Hr.id="line",Hr.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Hr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Hr.descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};function Jc(t,e,n,i){const r=t.options,{[n]:a}=t.getProps([n],i);return Math.abs(e-a)<r.radius+r.hitRadius}class Ps extends It{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,i){const r=this.options,{x:a,y:o}=this.getProps(["x","y"],i);return Math.pow(e-a,2)+Math.pow(n-o,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,n){return Jc(this,e,"x",n)}inYRange(e,n){return Jc(this,e,"y",n)}getCenterPoint(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const i=n&&e.borderWidth||0;return(n+i)*2}draw(e,n){const i=this.options;this.skip||i.radius<.1||!xn(this,n,this.size(i)/2)||(e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.fillStyle=i.backgroundColor,js(e,i,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}Ps.id="point",Ps.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Ps.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Xc(t,e){const{x:n,y:i,base:r,width:a,height:o}=t.getProps(["x","y","base","width","height"],e);let M,u,l,c,g;return t.horizontal?(g=o/2,M=Math.min(n,r),u=Math.max(n,r),l=i-g,c=i+g):(g=a/2,M=n-g,u=n+g,l=Math.min(i,r),c=Math.max(i,r)),{left:M,top:l,right:u,bottom:c}}function bt(t,e,n,i){return t?0:ke(e,n,i)}function Zp(t,e,n){const i=t.options.borderWidth,r=t.borderSkipped,a=Vl(i);return{t:bt(r.top,a.top,0,n),r:bt(r.right,a.right,0,e),b:bt(r.bottom,a.bottom,0,n),l:bt(r.left,a.left,0,e)}}function Bp(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,a=on(r),o=Math.min(e,n),M=t.borderSkipped,u=i||ne(r);return{topLeft:bt(!u||M.top||M.left,a.topLeft,0,o),topRight:bt(!u||M.top||M.right,a.topRight,0,o),bottomLeft:bt(!u||M.bottom||M.left,a.bottomLeft,0,o),bottomRight:bt(!u||M.bottom||M.right,a.bottomRight,0,o)}}function Vp(t){const e=Xc(t),n=e.right-e.left,i=e.bottom-e.top,r=Zp(t,n/2,i/2),a=Bp(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:a},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function Rs(t,e,n,i){const r=e===null,a=n===null,M=t&&!(r&&a)&&Xc(t,i);return M&&(r||Tr(e,M.left,M.right))&&(a||Tr(n,M.top,M.bottom))}function Gp(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Wp(t,e){t.rect(e.x,e.y,e.w,e.h)}function Zs(t,e,n={}){const i=t.x!==n.x?-e:0,r=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-i,o=(t.y+t.h!==n.y+n.h?e:0)-r;return{x:t.x+i,y:t.y+r,w:t.w+a,h:t.h+o,radius:t.radius}}class Fr extends It{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:i,backgroundColor:r}}=this,{inner:a,outer:o}=Vp(this),M=Gp(o.radius)?Cr:Wp;e.save(),(o.w!==a.w||o.h!==a.h)&&(e.beginPath(),M(e,Zs(o,n,a)),e.clip(),M(e,Zs(a,-n,o)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),M(e,Zs(a,n)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,n,i){return Rs(this,e,n,i)}inXRange(e,n){return Rs(this,e,null,n)}inYRange(e,n){return Rs(this,null,e,n)}getCenterPoint(e){const{x:n,y:i,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],e);return{x:a?(n+r)/2:n,y:a?i:(i+r)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}Fr.id="bar",Fr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Fr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const Un={average(t){if(!t.length)return!1;let e,n,i=0,r=0,a=0;for(e=0,n=t.length;e<n;++e){const o=t[e].element;if(o&&o.hasValue()){const M=o.tooltipPosition();i+=M.x,r+=M.y,++a}}return{x:i/a,y:r/a}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,r=Number.POSITIVE_INFINITY,a,o,M;for(a=0,o=t.length;a<o;++a){const u=t[a].element;if(u&&u.hasValue()){const l=u.getCenterPoint(),c=as(e,l);c<r&&(r=c,M=u)}}if(M){const u=M.tooltipPosition();n=u.x,i=u.y}return{x:n,y:i}}};function lt(t,e){return e&&(je(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function dt(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
18
18
|
`)>-1?t.split(`
|
|
19
|
-
`):t}function $p(t,e){const{element:n,datasetIndex:i,index:r}=e,a=t.getDatasetMeta(i).controller,{label:o,value:M}=a.getLabelAndValue(r);return{chart:t,label:o,parsed:a.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:M,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function Kc(t,e){const n=t.chart.ctx,{body:i,footer:r,title:a}=t,{boxWidth:o,boxHeight:M}=e,u=Ze(e.bodyFont),l=Ze(e.titleFont),c=Ze(e.footerFont),g=a.length,y=r.length,j=i.length,I=$e(e.padding);let D=I.height,d=0,N=i.reduce((T,m)=>T+m.before.length+m.lines.length+m.after.length,0);if(N+=t.beforeBody.length+t.afterBody.length,g&&(D+=g*l.lineHeight+(g-1)*e.titleSpacing+e.titleMarginBottom),N){const T=e.displayColors?Math.max(M,u.lineHeight):u.lineHeight;D+=j*T+(N-j)*u.lineHeight+(N-1)*e.bodySpacing}y&&(D+=e.footerMarginTop+y*c.lineHeight+(y-1)*e.footerSpacing);let f=0;const p=function(T){d=Math.max(d,n.measureText(T).width+f)};return n.save(),n.font=l.string,Me(t.title,p),n.font=u.string,Me(t.beforeBody.concat(t.afterBody),p),f=e.displayColors?o+2+e.boxPadding:0,Me(i,T=>{Me(T.before,p),Me(T.lines,p),Me(T.after,p)}),f=0,n.font=c.string,Me(t.footer,p),n.restore(),d+=I.width,{width:d,height:D}}function Hp(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function Fp(t,e,n,i){const{x:r,width:a}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&r+a+o>e.width||t==="right"&&r-a-o<0)return!0}function Jp(t,e,n,i){const{x:r,width:a}=n,{width:o,chartArea:{left:M,right:u}}=t;let l="center";return i==="center"?l=r<=(M+u)/2?"left":"right":r<=a/2?l="left":r>=o-a/2&&(l="right"),Fp(l,t,e,n)&&(l="center"),l}function qc(t,e,n){const i=n.yAlign||e.yAlign||Hp(t,n);return{xAlign:n.xAlign||e.xAlign||Jp(t,e,n,i),yAlign:i}}function Xp(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function Kp(t,e,n){let{y:i,height:r}=t;return e==="top"?i+=n:e==="bottom"?i-=r+n:i-=r/2,i}function eg(t,e,n,i){const{caretSize:r,caretPadding:a,cornerRadius:o}=t,{xAlign:M,yAlign:u}=n,l=r+a,{topLeft:c,topRight:g,bottomLeft:y,bottomRight:j}=on(o);let I=Xp(e,M);const D=Kp(e,u,l);return u==="center"?M==="left"?I+=l:M==="right"&&(I-=l):M==="left"?I-=Math.max(c,y)+r:M==="right"&&(I+=Math.max(g,j)+r),{x:ke(I,0,i.width-e.width),y:ke(D,0,i.height-e.height)}}function Jr(t,e,n){const i=$e(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function tg(t){return lt([],dt(t))}function qp(t,e,n){return Ot(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function ng(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}class Bs extends It{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||e._chart,this._chart=this.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,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,a=new Mc(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=qp(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,r=i.beforeTitle.apply(this,[e]),a=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let M=[];return M=lt(M,dt(r)),M=lt(M,dt(a)),M=lt(M,dt(o)),M}getBeforeBody(e,n){return tg(n.callbacks.beforeBody.apply(this,[e]))}getBody(e,n){const{callbacks:i}=n,r=[];return Me(e,a=>{const o={before:[],lines:[],after:[]},M=ng(i,a);lt(o.before,dt(M.beforeLabel.call(this,a))),lt(o.lines,M.label.call(this,a)),lt(o.after,dt(M.afterLabel.call(this,a))),r.push(o)}),r}getAfterBody(e,n){return tg(n.callbacks.afterBody.apply(this,[e]))}getFooter(e,n){const{callbacks:i}=n,r=i.beforeFooter.apply(this,[e]),a=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let M=[];return M=lt(M,dt(r)),M=lt(M,dt(a)),M=lt(M,dt(o)),M}_createItems(e){const n=this._active,i=this.chart.data,r=[],a=[],o=[];let M=[],u,l;for(u=0,l=n.length;u<l;++u)M.push($p(this.chart,n[u]));return e.filter&&(M=M.filter((c,g,y)=>e.filter(c,g,y,i))),e.itemSort&&(M=M.sort((c,g)=>e.itemSort(c,g,i))),Me(M,c=>{const g=ng(e.callbacks,c);r.push(g.labelColor.call(this,c)),a.push(g.labelPointStyle.call(this,c)),o.push(g.labelTextColor.call(this,c))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=M,M}update(e,n){const i=this.options.setContext(this.getContext()),r=this._active;let a,o=[];if(!r.length)this.opacity!==0&&(a={opacity:0});else{const M=Un[i.position].call(this,r,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const u=this._size=Kc(this,i),l=Object.assign({},M,u),c=qc(this.chart,i,l),g=eg(i,l,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,a={opacity:1,x:g.x,y:g.y,width:u.width,height:u.height,caretX:M.x,caretY:M.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,r){const a=this.getCaretPosition(e,i,r);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,i){const{xAlign:r,yAlign:a}=this,{caretSize:o,cornerRadius:M}=i,{topLeft:u,topRight:l,bottomLeft:c,bottomRight:g}=on(M),{x:y,y:j}=e,{width:I,height:D}=n;let d,N,f,p,T,m;return a==="center"?(T=j+D/2,r==="left"?(d=y,N=d-o,p=T+o,m=T-o):(d=y+I,N=d+o,p=T-o,m=T+o),f=d):(r==="left"?N=y+Math.max(u,c)+o:r==="right"?N=y+I-Math.max(l,g)-o:N=this.caretX,a==="top"?(p=j,T=p-o,d=N-o,f=N+o):(p=j+D,T=p+o,d=N+o,f=N-o),m=p),{x1:d,x2:N,x3:f,y1:p,y2:T,y3:m}}drawTitle(e,n,i){const r=this.title,a=r.length;let o,M,u;if(a){const l=As(i.rtl,this.x,this.width);for(e.x=Jr(this,i.titleAlign,i),n.textAlign=l.textAlign(i.titleAlign),n.textBaseline="middle",o=Ze(i.titleFont),M=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,u=0;u<a;++u)n.fillText(r[u],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+M,u+1===a&&(e.y+=i.titleMarginBottom-M)}}_drawColorBox(e,n,i,r,a){const o=this.labelColors[i],M=this.labelPointStyles[i],{boxHeight:u,boxWidth:l,boxPadding:c}=a,g=Ze(a.bodyFont),y=Jr(this,"left",a),j=r.x(y),I=u<g.lineHeight?(g.lineHeight-u)/2:0,D=n.y+I;if(a.usePointStyle){const d={radius:Math.min(l,u)/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:1},N=r.leftForLtr(j,l)+l/2,f=D+u/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,js(e,d,N,f),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,js(e,d,N,f)}else{e.lineWidth=ne(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const d=r.leftForLtr(j,l-c),N=r.leftForLtr(r.xPlus(j,1),l-c-2),f=on(o.borderRadius);Object.values(f).some(p=>p!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,Cr(e,{x:d,y:D,w:l,h:u,radius:f}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Cr(e,{x:N,y:D+1,w:l-2,h:u-2,radius:f}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(d,D,l,u),e.strokeRect(d,D,l,u),e.fillStyle=o.backgroundColor,e.fillRect(N,D+1,l-2,u-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:r}=this,{bodySpacing:a,bodyAlign:o,displayColors:M,boxHeight:u,boxWidth:l,boxPadding:c}=i,g=Ze(i.bodyFont);let y=g.lineHeight,j=0;const I=As(i.rtl,this.x,this.width),D=function(Q){n.fillText(Q,I.x(e.x+j),e.y+y/2),e.y+=y+a},d=I.textAlign(o);let N,f,p,T,m,O,k;for(n.textAlign=o,n.textBaseline="middle",n.font=g.string,e.x=Jr(this,d,i),n.fillStyle=i.bodyColor,Me(this.beforeBody,D),j=M&&d!=="right"?o==="center"?l/2+c:l+2+c:0,T=0,O=r.length;T<O;++T){for(N=r[T],f=this.labelTextColors[T],n.fillStyle=f,Me(N.before,D),p=N.lines,M&&p.length&&(this._drawColorBox(n,e,T,I,i),y=Math.max(g.lineHeight,u)),m=0,k=p.length;m<k;++m)D(p[m]),y=g.lineHeight;Me(N.after,D)}j=0,y=g.lineHeight,Me(this.afterBody,D),e.y-=a}drawFooter(e,n,i){const r=this.footer,a=r.length;let o,M;if(a){const u=As(i.rtl,this.x,this.width);for(e.x=Jr(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=u.textAlign(i.footerAlign),n.textBaseline="middle",o=Ze(i.footerFont),n.fillStyle=i.footerColor,n.font=o.string,M=0;M<a;++M)n.fillText(r[M],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+i.footerSpacing}}drawBackground(e,n,i,r){const{xAlign:a,yAlign:o}=this,{x:M,y:u}=e,{width:l,height:c}=i,{topLeft:g,topRight:y,bottomLeft:j,bottomRight:I}=on(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(M+g,u),o==="top"&&this.drawCaret(e,n,i,r),n.lineTo(M+l-y,u),n.quadraticCurveTo(M+l,u,M+l,u+y),o==="center"&&a==="right"&&this.drawCaret(e,n,i,r),n.lineTo(M+l,u+c-I),n.quadraticCurveTo(M+l,u+c,M+l-I,u+c),o==="bottom"&&this.drawCaret(e,n,i,r),n.lineTo(M+j,u+c),n.quadraticCurveTo(M,u+c,M,u+c-j),o==="center"&&a==="left"&&this.drawCaret(e,n,i,r),n.lineTo(M,u+g),n.quadraticCurveTo(M,u,M+g,u),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,r=i&&i.x,a=i&&i.y;if(r||a){const o=Un[e.position].call(this,this._active,this._eventPosition);if(!o)return;const M=this._size=Kc(this,e),u=Object.assign({},o,this._size),l=qc(n,e,u),c=eg(e,u,l,n);(r._to!==c.x||a._to!==c.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=M.width,this.height=M.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=$e(n.padding),M=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&M&&(e.save(),e.globalAlpha=i,this.drawBackground(a,e,r,n),_A(e,n.textDirection),a.y+=o.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),YA(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,r=e.map(({datasetIndex:M,index:u})=>{const l=this.chart.getDatasetMeta(M);if(!l)throw new Error("Cannot find a dataset at index "+M);return{datasetIndex:M,element:l.data[u],index:u}}),a=!Ar(i,r),o=this._positionChanged(r,n);(a||o)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,a=this._active||[],o=this._getActiveElements(e,a,n,i),M=this._positionChanged(o,e),u=n||!Ar(o,a)||M;return u&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,i,r){const a=this.options;if(e.type==="mouseout")return[];if(!r)return n;const o=this.chart.getElementsAtEventForMode(e,a.mode,a,i);return a.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:r,options:a}=this,o=Un[a.position].call(this,e,n);return o!==!1&&(i!==o.x||r!==o.y)}}Bs.positioners=Un;var eT={id:"tooltip",_element:Bs,positioners:Un,afterInit(t,e,n){n&&(t.tooltip=new Bs({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)===!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:{beforeTitle:Nt,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:Nt,beforeBody:Nt,beforeLabel:Nt,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 oe(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:Nt,afterBody:Nt,beforeFooter:Nt,footer:Nt,afterFooter:Nt}},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 tT=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function nT(t,e,n,i){const r=t.indexOf(e);if(r===-1)return tT(t,e,n,i);const a=t.lastIndexOf(e);return r!==a?n:r}const iT=(t,e)=>t===null?null:ke(Math.round(t),0,e);class Xr extends $t{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:r,label:a}of n)i[r]===a&&i.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(oe(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:nT(i,e,ie(n,e),this._addedLabels),iT(n,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const e=this.min,n=this.max,i=this.options.offset,r=[];let a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=n;o++)r.push({value:o});return r}getLabelForValue(e){const n=this.getLabels();return e>=0&&e<n.length?n[e]: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}}Xr.id="category",Xr.defaults={ticks:{callback:Xr.prototype.getLabelForValue}};function rT(t,e){const n=[],{bounds:r,step:a,min:o,max:M,precision:u,count:l,maxTicks:c,maxDigits:g,includeBounds:y}=t,j=a||1,I=c-1,{min:D,max:d}=e,N=!oe(o),f=!oe(M),p=!oe(l),T=(d-D)/(g+1);let m=dl((d-D)/I/j)*j,O,k,Q,Y;if(m<1e-14&&!N&&!f)return[{value:D},{value:d}];Y=Math.ceil(d/m)-Math.floor(D/m),Y>I&&(m=dl(Y*m/I/j)*j),oe(u)||(O=Math.pow(10,u),m=Math.ceil(m*O)/O),r==="ticks"?(k=Math.floor(D/m)*m,Q=Math.ceil(d/m)*m):(k=D,Q=d),N&&f&&a&&Dm((M-o)/a,m/1e3)?(Y=Math.round(Math.min((M-o)/m,c)),m=(M-o)/Y,k=o,Q=M):p?(k=N?o:k,Q=f?M:Q,Y=l-1,m=(Q-k)/Y):(Y=(Q-k)/m,mn(Y,Math.round(Y),m/1e3)?Y=Math.round(Y):Y=Math.ceil(Y));const U=Math.max(fl(m),fl(k));O=Math.pow(10,oe(u)?U:u),k=Math.round(k*O)/O,Q=Math.round(Q*O)/O;let b=0;for(N&&(y&&k!==o?(n.push({value:o}),k<o&&b++,mn(Math.round((k+b*m)*O)/O,o,ig(o,T,t))&&b++):k<o&&b++);b<Y;++b)n.push({value:Math.round((k+b*m)*O)/O});return f&&y&&Q!==M?n.length&&mn(n[n.length-1].value,M,ig(M,T,t))?n[n.length-1].value=M:n.push({value:M}):(!f||Q===M)&&n.push({value:Q}),n}function ig(t,e,{horizontal:n,minRotation:i}){const r=qe(i),a=(n?Math.sin(r):Math.cos(r))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}class Kr extends $t{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 oe(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:a}=this;const o=u=>r=n?r:u,M=u=>a=i?a:u;if(e){const u=Mt(r),l=Mt(a);u<0&&l<0?M(0):u>0&&l>0&&o(0)}if(r===a){let u=1;(a>=Number.MAX_SAFE_INTEGER||r<=Number.MIN_SAFE_INTEGER)&&(u=Math.abs(a*.05)),M(a+u),e||o(r-u)}this.min=r,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} 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 i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,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},a=this._range||this,o=rT(r,a);return e.bounds==="ticks"&&Dl(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const r=(i-n)/Math.max(e.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return On(e,this.chart.options.locale,this.options.ticks.format)}}class Vs extends Kr{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Se(e)?e:0,this.max=Se(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=qe(this.options.ticks.minRotation),r=(e?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.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}}Vs.id="linear",Vs.defaults={ticks:{callback:Ur.formatters.numeric}};function rg(t){return t/Math.pow(10,Math.floor(Ge(t)))===1}function aT(t,e){const n=Math.floor(Ge(e.max)),i=Math.ceil(e.max/Math.pow(10,n)),r=[];let a=Be(t.min,Math.pow(10,Math.floor(Ge(e.min)))),o=Math.floor(Ge(a)),M=Math.floor(a/Math.pow(10,o)),u=o<0?Math.pow(10,Math.abs(o)):1;do r.push({value:a,major:rg(a)}),++M,M===10&&(M=1,++o,u=o>=0?1:u),a=Math.round(M*Math.pow(10,o)*u)/u;while(o<n||o===n&&M<i);const l=Be(t.max,a);return r.push({value:l,major:rg(a)}),r}class ag extends $t{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=Kr.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return Se(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Se(e)?Math.max(0,e):null,this.max=Se(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,r=this.max;const a=u=>i=e?i:u,o=u=>r=n?r:u,M=(u,l)=>Math.pow(10,Math.floor(Ge(u))+l);i===r&&(i<=0?(a(1),o(10)):(a(M(i,-1)),o(M(r,1)))),i<=0&&a(M(r,-1)),r<=0&&o(M(i,1)),this._zero&&this.min!==this._suggestedMin&&i===M(this.min,0)&&a(M(i,-1)),this.min=i,this.max=r}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=aT(n,this);return e.bounds==="ticks"&&Dl(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":On(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Ge(e),this._valueRange=Ge(this.max)-Ge(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Ge(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}ag.id="logarithmic",ag.defaults={ticks:{callback:Ur.formatters.logarithmic,major:{enabled:!0}}};function Gs(t){const e=t.ticks;if(e.display&&t.display){const n=$e(e.backdropPadding);return ie(e.font&&e.font.size,ee.font.size)+n.height}return 0}function oT(t,e,n){return n=je(n)?n:[n],{w:Jm(t,e.string,n),h:n.length*e.lineHeight}}function og(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function sT(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),i=[],r=[],a=t._pointLabels.length,o=t.options.pointLabels,M=o.centerPointLabels?Ae/a:0;for(let u=0;u<a;u++){const l=o.setContext(t.getPointLabelContext(u));r[u]=l.padding;const c=t.getPointPosition(u,t.drawingArea+r[u],M),g=Ze(l.font),y=oT(t.ctx,g,t._pointLabels[u]);i[u]=y;const j=et(t.getIndexAngle(u)+M),I=Math.round(rs(j)),D=og(I,c.x,y.w,0,180),d=og(I,c.y,y.h,90,270);MT(n,e,j,D,d)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=uT(t,i,r)}function MT(t,e,n,i,r){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let M=0,u=0;i.start<e.l?(M=(e.l-i.start)/a,t.l=Math.min(t.l,e.l-M)):i.end>e.r&&(M=(i.end-e.r)/a,t.r=Math.max(t.r,e.r+M)),r.start<e.t?(u=(e.t-r.start)/o,t.t=Math.min(t.t,e.t-u)):r.end>e.b&&(u=(r.end-e.b)/o,t.b=Math.max(t.b,e.b+u))}function uT(t,e,n){const i=[],r=t._pointLabels.length,a=t.options,o=Gs(a)/2,M=t.drawingArea,u=a.pointLabels.centerPointLabels?Ae/r:0;for(let l=0;l<r;l++){const c=t.getPointPosition(l,M+o+n[l],u),g=Math.round(rs(et(c.angle+ze))),y=e[l],j=gT(c.y,y.h,g),I=lT(g),D=cT(c.x,y.w,I);i.push({x:c.x,y:j,textAlign:I,left:D,top:j,right:D+y.w,bottom:j+y.h})}return i}function lT(t){return t===0||t===180?"center":t<180?"left":"right"}function cT(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function gT(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function NT(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let r=e-1;r>=0;r--){const a=i.setContext(t.getPointLabelContext(r)),o=Ze(a.font),{x:M,y:u,textAlign:l,left:c,top:g,right:y,bottom:j}=t._pointLabelItems[r],{backdropColor:I}=a;if(!oe(I)){const D=on(a.borderRadius),d=$e(a.backdropPadding);n.fillStyle=I;const N=c-d.left,f=g-d.top,p=y-c+d.width,T=j-g+d.height;Object.values(D).some(m=>m!==0)?(n.beginPath(),Cr(n,{x:N,y:f,w:p,h:T,radius:D}),n.fill()):n.fillRect(N,f,p,T)}wr(n,t._pointLabels[r],M,u+o.lineHeight/2,o,{color:a.color,textAlign:l,textBaseline:"middle"})}}function sg(t,e,n,i){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,le);else{let a=t.getPointPosition(0,e);r.moveTo(a.x,a.y);for(let o=1;o<i;o++)a=t.getPointPosition(o,e),r.lineTo(a.x,a.y)}}function yT(t,e,n,i){const r=t.ctx,a=e.circular,{color:o,lineWidth:M}=e;!a&&!i||!o||!M||n<0||(r.save(),r.strokeStyle=o,r.lineWidth=M,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),sg(t,n,a,i),r.closePath(),r.stroke(),r.restore())}function jT(t,e,n){return Ot(t,{label:n,index:e,type:"pointLabel"})}class qr extends Kr{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=$e(Gs(this.options)/2),n=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=Se(e)&&!isNaN(e)?e:0,this.max=Se(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gs(this.options))}generateTickLabels(e){Kr.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,i)=>{const r=me(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?sT(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,r){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,r))}getIndexAngle(e){const n=le/(this._pointLabels.length||1),i=this.options.startAngle||0;return et(e*n+qe(i))}getDistanceFromCenterForValue(e){if(oe(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(oe(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 i=n[e];return jT(this.getContext(),e,i)}}getPointPosition(e,n,i=0){const r=this.getIndexAngle(e)-ze+i;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:i,right:r,bottom:a}=this._pointLabelItems[e];return{left:n,top:i,right:r,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),sg(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:i,grid:r}=n,a=this._pointLabels.length;let o,M,u;if(n.pointLabels.display&&NT(this,a),r.display&&this.ticks.forEach((l,c)=>{if(c!==0){M=this.getDistanceFromCenterForValue(l.value);const g=r.setContext(this.getContext(c-1));yT(this,g,M,a)}}),i.display){for(e.save(),o=a-1;o>=0;o--){const l=i.setContext(this.getPointLabelContext(o)),{color:c,lineWidth:g}=l;!g||!c||(e.lineWidth=g,e.strokeStyle=c,e.setLineDash(l.borderDash),e.lineDashOffset=l.borderDashOffset,M=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(o,M),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let a,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((M,u)=>{if(u===0&&!n.reverse)return;const l=i.setContext(this.getContext(u)),c=Ze(l.font);if(a=this.getDistanceFromCenterForValue(this.ticks[u].value),l.showLabelBackdrop){e.font=c.string,o=e.measureText(M.label).width,e.fillStyle=l.backdropColor;const g=$e(l.backdropPadding);e.fillRect(-o/2-g.left,-a-c.size/2-g.top,o+g.width,c.size+g.height)}wr(e,M.label,0,-a,c,{color:l.color})}),e.restore()}drawTitle(){}}qr.id="radialLinear",qr.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ur.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}},qr.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},qr.descriptors={angleLines:{_fallback:"grid"}};const ea={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}},Re=Object.keys(ea);function IT(t,e){return t-e}function Mg(t,e){if(oe(e))return null;const n=t._adapter,{parser:i,round:r,isoWeekday:a}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Se(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(r&&(o=r==="week"&&(rn(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,r)),+o)}function ug(t,e,n,i){const r=Re.length;for(let a=Re.indexOf(t);a<r-1;++a){const o=ea[Re[a]],M=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(M*o.size))<=i)return Re[a]}return Re[r-1]}function dT(t,e,n,i,r){for(let a=Re.length-1;a>=Re.indexOf(n);a--){const o=Re[a];if(ea[o].common&&t._adapter.diff(r,i,o)>=e-1)return o}return Re[n?Re.indexOf(n):0]}function DT(t){for(let e=Re.indexOf(t)+1,n=Re.length;e<n;++e)if(ea[Re[e]].common)return Re[e]}function lg(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:r}=os(n,e),a=n[i]>=e?n[i]:n[r];t[a]=!0}}function fT(t,e,n,i){const r=t._adapter,a=+r.startOf(e[0].value,i),o=e[e.length-1].value;let M,u;for(M=a;M<=o;M=+r.add(M,1,i))u=n[M],u>=0&&(e[u].major=!0);return e}function cg(t,e,n){const i=[],r={},a=e.length;let o,M;for(o=0;o<a;++o)M=e[o],r[M]=o,i.push({value:M,major:!1});return a===0||!n?i:fT(t,i,r,n)}class ta extends $t{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 i=e.time||(e.time={}),r=this._adapter=new Qz._date(e.adapters.date);r.init(n),fn(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Mg(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:r,max:a,minDefined:o,maxDefined:M}=this.getUserBounds();function u(l){!o&&!isNaN(l.min)&&(r=Math.min(r,l.min)),!M&&!isNaN(l.max)&&(a=Math.max(a,l.max))}(!o||!M)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),r=Se(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),a=Se(a)&&!isNaN(a)?a:+n.endOf(Date.now(),i)+1,this.min=Math.min(r,a-1),this.max=Math.max(r+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,r=i.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 a=this.min,o=this.max,M=Am(r,a,o);return this._unit=n.unit||(i.autoSkip?ug(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):dT(this,M.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:DT(this._unit),this.initOffsets(r),e.reverse&&M.reverse(),cg(this,M,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e){let n=0,i=0,r,a;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?i=a:i=(a-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=ke(n,0,o),i=ke(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,r=this.options,a=r.time,o=a.unit||ug(a.minUnit,n,i,this._getLabelCapacity(n)),M=ie(a.stepSize,1),u=o==="week"?a.isoWeekday:!1,l=rn(u)||u===!0,c={};let g=n,y,j;if(l&&(g=+e.startOf(g,"isoWeek",u)),g=+e.startOf(g,l?"day":o),e.diff(i,n,o)>1e5*M)throw new Error(n+" and "+i+" are too far apart with stepSize of "+M+" "+o);const I=r.ticks.source==="data"&&this.getDataTimestamps();for(y=g,j=0;y<i;y=+e.add(y,M,o),j++)lg(c,y,I);return(y===i||r.bounds==="ticks"||j===1)&&lg(c,y,I),Object.keys(c).sort((D,d)=>D-d).map(D=>+D)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,n,i,r){const a=this.options,o=a.time.displayFormats,M=this._unit,u=this._majorUnit,l=M&&o[M],c=u&&o[u],g=i[n],y=u&&c&&g&&g.major,j=this._adapter.format(e,r||(y?c:l)),I=a.ticks.callback;return I?me(I,[j,n,i],this):j}generateTickLabels(e){let n,i,r;for(n=0,i=e.length;n<i;++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,i=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,i=this.ctx.measureText(e).width,r=qe(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(r),o=Math.sin(r),M=this._resolveTickFontOptions(0).size;return{w:i*a+M*o,h:i*o+M*a}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,a=this._tickFormatFunction(e,0,cg(this,[e],this._majorUnit),r),o=this._getLabelSize(a),M=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return M>0?M:1}getDataTimestamps(){let e=this._cache.data||[],n,i;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,i=r.length;n<i;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,i;if(e.length)return e;const r=this.getLabels();for(n=0,i=r.length;n<i;++n)e.push(Mg(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return zl(e.sort(IT))}}ta.id="time",ta.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function na(t,e,n){let i=0,r=t.length-1,a,o,M,u;n?(e>=t[i].pos&&e<=t[r].pos&&({lo:i,hi:r}=Rt(t,"pos",e)),{pos:a,time:M}=t[i],{pos:o,time:u}=t[r]):(e>=t[i].time&&e<=t[r].time&&({lo:i,hi:r}=Rt(t,"time",e)),{time:a,pos:M}=t[i],{time:o,pos:u}=t[r]);const l=o-a;return l?M+(u-M)*(e-a)/l:M}class gg extends ta{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=na(n,this.min),this._tableRange=na(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,r=[],a=[];let o,M,u,l,c;for(o=0,M=e.length;o<M;++o)l=e[o],l>=n&&l<=i&&r.push(l);if(r.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,M=r.length;o<M;++o)c=r[o+1],u=r[o-1],l=r[o],Math.round((c+u)/2)!==l&&a.push({time:l,pos:o/(M-1)});return a}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(na(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return na(this._table,i*this._tableRange+this._minPos,!0)}}gg.id="timeseries",gg.defaults=ta.defaults;var ln;(function(t){t.ChartRendered="chart:rendered",t.ChartUpdated="chart:updated",t.ChartDestroyed="chart:destroyed",t.LabelsUpdated="labels:updated"})(ln||(ln={}));function ia(t,e,n,i){t(e,n),i!==void 0&&i.emit(ln.ChartRendered)}function hT(t,e){t.update(),e!==void 0&&e.emit(ln.ChartUpdated)}function ra(t,e){t.destroy(),e!==void 0&&e.emit(ln.ChartDestroyed)}function mT(t,e){const n={labels:typeof t.labels=="undefined"?[]:[...t.labels],datasets:[]};return Ng(n,{...t},e),n}function Ng(t,e,n){const i=[];t.datasets=e.datasets.map(r=>{const a=t.datasets.find(o=>o[n]===r[n]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function AT(t,e,n){t.data.labels=e,n!==void 0&&n.emit(ln.LabelsUpdated)}function zT(t,e){t.options={...e}}function pT(t,e){const n=t.datasets.map(r=>r.label),i=e.datasets.map(r=>r.label);return e.datasets.length===t.datasets.length&&n.every((r,a)=>r===i[a])}const TT="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",LT="Update ERROR: chart instance not found",xT=((t,e,n)=>s.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:t},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(i,r){vn.register(n);const a=s.shallowRef(null),o=s.ref(null);function M(g,y){if(a.value!==null&&ra(s.toRaw(a.value),r),o.value===null)throw new Error(TT);{const j=mT(g,i.datasetIdKey),I=o.value.getContext("2d");I!==null&&(a.value=new vn(I,{type:e,data:s.isProxy(g)?new Proxy(j,{}):j,options:y,plugins:i.plugins}))}}function u(g,y){const j=s.isProxy(g)?s.toRaw(g):{...g},I=s.isProxy(y)?s.toRaw(y):{...y};if(Object.keys(I).length>0){const D=s.toRaw(a.value);pT(j,I)&&D!==null?(Ng(D==null?void 0:D.data,j,i.datasetIdKey),j.labels!==void 0&&AT(D,j.labels,r),c()):(D!==null&&ra(D,r),ia(M,i.chartData,i.chartOptions,r))}else a.value!==null&&ra(s.toRaw(a.value),r),ia(M,i.chartData,i.chartOptions,r)}function l(g){const y=s.toRaw(a.value);y!==null?(zT(y,g),c()):ia(M,i.chartData,i.chartOptions,r)}function c(){const g=s.toRaw(a.value);g!==null?hT(g,r):console.error(LT)}return s.watch(()=>i.chartData,(g,y)=>u(g,y),{deep:!0}),s.watch(()=>i.chartOptions,g=>l(g),{deep:!0}),s.onMounted(()=>{"datasets"in i.chartData&&i.chartData.datasets.length>0&&ia(M,i.chartData,i.chartOptions,r)}),s.onBeforeUnmount(()=>{a.value!==null&&ra(s.toRaw(a.value),r)}),r.expose({chart:a,updateChart:c}),()=>s.h("div",{style:i.styles,class:i.cssClasses},[s.h("canvas",{id:i.chartId,width:i.width,height:i.height,ref:o})])}}))("bar-chart","bar",vr);var cx="";const OT={name:"MultiRangeSlider",props:{baseClassName:{type:String,default:"multi-range-slider"},min:{type:Number},max:{type:Number},minValue:{type:Number},maxValue:{type:Number},step:{type:Number,default:1},preventWheel:{type:Boolean,default:!1},ruler:{type:Boolean,default:!0},label:{type:Boolean,default:!0},labels:{type:Array},minCaption:{type:String},maxCaption:{type:String},rangeMargin:{type:Number}},data(){let t=this.labels||[],e=this.min===void 0?0:this.min,n=t.length?t.length-1:100,i=this.max===void 0?n:this.max,r=this.minValue===void 0?25:this.minValue;t.length&&this.minValue===void 0&&(r=1);let a=this.maxValue||75;if(t.length&&this.maxValue===void 0&&(a=t.length-2),i<=e)throw new Error("Invalid props min or max");if(r>a)throw new Error("Invalid props minValue or maxValue");let o=this.rangeMargin===void 0?this.step:this.rangeMargin,M=o%this.step;return M&&(o=o+this.step-M),{valueMin:r<e?e:r,valueMax:a>i?i:a,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:o}},methods:{onBarLeftClick(){this.valueMin-this.step>=this.minimum?this.valueMin-=this.step:this.valueMin=this.minimum},onInnerBarLeftClick(){this.valueMin+this.rangeMarginValue<this.valueMax&&(this.valueMin+=this.step)},onBarRightClick(){this.valueMax+this.step<=this.maximum?this.valueMax+=this.step:this.valueMax=this.maximum},onInnerBarRightClick(){this.valueMax-this.rangeMarginValue>this.valueMin&&(this.valueMax-=this.step)},onInputMinChange(t){let e=parseFloat(t.target.value);e<=this.valueMax-this.rangeMarginValue&&e>=this.minimum?this.valueMin=e:t.target.value=this.valueMin},onInputMaxChange(t){let e=parseFloat(t.target.value);e>=this.valueMin+this.rangeMarginValue&&e<=this.maximum?this.valueMax=e:t.target.value=this.valueMax},onLeftThumbMousedown(t){if(t.preventDefault(),this.startX=t.clientX,t.type==="touchstart")if(t.touches.length===1)this.startX=t.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=t.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(t){this.mouseMoveCounter++;let e=t.clientX;t.type==="touchmove"&&(e=t.touches[0].clientX);let i=(e-this.startX)/this.barBox.width,r=this.barValue+(this.maximum-this.minimum)*i;r-=r%this.step,r<this.minimum?r=this.minimum:r>this.valueMax-this.rangeMarginValue&&(r=this.valueMax-this.rangeMarginValue),this.valueMin=r},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(t){if(t.preventDefault(),this.startX=t.clientX,t.type==="touchstart")if(t.touches.length===1)this.startX=t.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=t.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(t){this.mouseMoveCounter++;let e=t.clientX;t.type==="touchmove"&&(e=t.touches[0].clientX);let i=(e-this.startX)/this.barBox.width,r=this.barValue+(this.maximum-this.minimum)*i;r-=r%this.step,r<this.valueMin+this.rangeMarginValue?r=this.valueMin+this.rangeMarginValue:r>this.maximum&&(r=this.maximum),this.valueMax=r},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(t){if(this.preventWheel===!0||!t.shiftKey&&!t.ctrlKey)return;let e=this.step;t.deltaY<0&&(e=-e),t.shiftKey&&t.ctrlKey?this.valueMin+e>=this.minimum&&this.valueMax+e<=this.maximum&&(this.valueMin=this.valueMin+e,this.valueMax=this.valueMax+e):t.ctrlKey?(e=this.valueMax+e,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e):t.shiftKey&&(e=this.valueMin+e,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e)},triggerInput(){let t=0;this.step.toString().includes(".")&&(t=2);let e={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(t)),maxValue:parseFloat(this.valueMax.toFixed(t))};this.$emit("input",e)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let t=this.labels||[],e=t.length?t.length-1:100;return this.max===void 0?e:this.max},stepCount(){let t=this.labels||[];return t.length?t.length-1:Math.floor((this.maximum-this.minimum)/this.step)},subStepCount(){return(this.labels||[]).length&&this.step>1?(this.maximum-this.minimum)/this.step:0},barMin(){return(this.valueMin-this.minimum)/(this.maximum-this.minimum)*100},barMax(){return 100-(this.valueMax-this.minimum)/(this.maximum-this.minimum)*100},barMinVal(){let t=0;return this.step.toString().includes(".")&&(t=2),(this.valueMin||0).toFixed(t)},barMaxVal(){let t=0;return this.step.toString().includes(".")&&(t=2),(this.valueMax||100).toFixed(t)},scaleLabels(){let t=this.labels||[];return t.length===0&&(t=[],t.push(this.minimum),t.push(this.maximum)),t}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(t){this.valueMin=t<this.minimum?this.minimum:t},maxValue(t){this.valueMax=t>this.maximum?this.maximum:t}},mounted(){}},ST={class:"bar"},bT=["min","max","step","value"],ET={class:"caption"},wT={class:"min-caption"},CT={class:"bar-inner"},kT=["min","max","step","value"],_T={class:"caption"},YT={class:"max-caption"},QT={key:0,class:"ruler"},vT={key:1,class:"sub-ruler"},UT={key:2,class:"labels"};function PT(t,e,n,i,r,a){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([n.baseClassName,r.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:e[10]||(e[10]=s.withModifiers((...o)=>a.onMouseWheel&&a.onMouseWheel(...o),["prevent","stop"]))},[s.createElementVNode("div",ST,[s.createElementVNode("div",{class:"bar-left",style:s.normalizeStyle({width:a.barMin+"%"}),onClick:e[0]||(e[0]=(...o)=>a.onBarLeftClick&&a.onBarLeftClick(...o))},null,4),s.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:a.minimum,max:a.maximum,step:n.step,value:r.valueMin,onInput:e[1]||(e[1]=s.withModifiers((...o)=>a.onInputMinChange&&a.onInputMinChange(...o),["stop","prevent"]))},null,40,bT),s.createElementVNode("div",{class:"thumb thumb-left",onMousedown:e[2]||(e[2]=(...o)=>a.onLeftThumbMousedown&&a.onLeftThumbMousedown(...o)),onTouchstart:e[3]||(e[3]=(...o)=>a.onLeftThumbMousedown&&a.onLeftThumbMousedown(...o))},[s.createElementVNode("div",ET,[s.createElementVNode("span",wT,s.toDisplayString(n.minCaption||a.barMinVal),1)])],32),s.createElementVNode("div",CT,[s.createElementVNode("div",{class:"bar-inner-left",onClick:e[4]||(e[4]=(...o)=>a.onInnerBarLeftClick&&a.onInnerBarLeftClick(...o))}),s.createElementVNode("div",{class:"bar-inner-right",onClick:e[5]||(e[5]=(...o)=>a.onInnerBarRightClick&&a.onInnerBarRightClick(...o))})]),s.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:a.minimum,max:a.maximum,step:n.step,value:r.valueMax,onInput:e[6]||(e[6]=s.withModifiers((...o)=>a.onInputMaxChange&&a.onInputMaxChange(...o),["stop","prevent"]))},null,40,kT),s.createElementVNode("div",{class:"thumb thumb-right",onMousedown:e[7]||(e[7]=(...o)=>a.onRightThumbMousedown&&a.onRightThumbMousedown(...o)),onTouchstart:e[8]||(e[8]=(...o)=>a.onRightThumbMousedown&&a.onRightThumbMousedown(...o))},[s.createElementVNode("div",_T,[s.createElementVNode("span",YT,s.toDisplayString(n.maxCaption||a.barMaxVal),1)])],32),s.createElementVNode("div",{class:"bar-right",style:s.normalizeStyle({width:a.barMax+"%"}),onClick:e[9]||(e[9]=(...o)=>a.onBarRightClick&&a.onBarRightClick(...o))},null,4)]),n.ruler?(s.openBlock(),s.createElementBlock("div",QT,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.stepCount,o=>(s.openBlock(),s.createElementBlock("div",{key:o,class:"ruler-rule"}))),128))])):s.createCommentVNode("",!0),a.subStepCount?(s.openBlock(),s.createElementBlock("div",vT,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.subStepCount,o=>(s.openBlock(),s.createElementBlock("div",{key:o,class:"ruler-sub-rule"}))),128))])):s.createCommentVNode("",!0),n.label?(s.openBlock(),s.createElementBlock("div",UT,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.scaleLabels,o=>(s.openBlock(),s.createElementBlock("div",{class:"label",key:o},s.toDisplayString(o),1))),128))])):s.createCommentVNode("",!0)],34)}var RT=Ue(OT,[["render",PT]]),gx="";vn.register(eT,Fr,Xr,Vs);const ZT=s.defineComponent({components:{Bar:xT,MultiRangeSlider:RT},props:{numberRange:{type:Array,default:()=>[{key:1,count:10}]},width:{type:Number,default:200},height:{type:Number,default:50},chartId:{type:String,default:"bar-chart"},datasetIdKey:{type:String,default:"label"},steps:{type:Number,default:1}},data(){return{chartData:{labels:[],datasets:[{labels:"",data:[],backgroundColor:["#5ea9e5"],borderRadius:1,hoverBackgroundColor:"#e0e0e0"}]},chartOptions:{responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1},ticks:{display:!0}},y:{display:!1,grid:{display:!1},ticks:{display:!1}}}},chartLines:{},min:"1",max:this.maxNumber(this.numberRange),rangeMax:this.numberRange.length,chart_dta:[],BarMinValue:1,BarMaxValue:this.numberRange.length,activeFilter:!1,validated:!1,isMatch:!1,isExclude:!1,isDisable:!1}},mounted(){this.isMatch=!0,this.setChartData(this.numberRange),this.highlightChart()},methods:{changeMin(t){let e=t.target.value;this.min=e||"1",this.BarMinValue=e?this.getFirstIndex(parseInt(e)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(t){let e=t.target.value;this.BarMaxValue=e&&e>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(e)),this.max=e&&e>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):e,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(t){t=this.sortData(t),this.removeChartData();let e=this.chartData.labels;for(let n=0;n<t.length;n++)e.push(t[n].key),this.chart_dta.push(t[n].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<=t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(t){const{minValue:e,maxValue:n}=t;this.BarMinValue=e,this.BarMaxValue=n;var i=this.chartData.datasets[0].data;this.min=i[this.BarMinValue]?i[this.BarMinValue]:"1",this.max=i[this.BarMaxValue]?i[this.BarMaxValue]:this.max,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},toggleFilter(){this.activeFilter=!this.activeFilter},removeChartData(){this.chartData.labels=[],this.chartData.datasets[0].data=[],this.chart_dta=[]},matchFilter(){if(!this.isDisable){this.isMatch=!0,this.isExclude=!1;var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<=t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")}},excludeFilter(){if(!this.isDisable){this.isMatch=!1,this.isExclude=!0;var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#e0e0e0"):this.chartData.datasets[0].backgroundColor.push("#5ea9e5")}},missingFilter(){this.isDisable=!this.isDisable,this.validated=!this.validated;var t=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let e=1;e<=t.length;e++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},sortData(t){return t.slice().sort(function(e,n){return e.count-n.count})},maxNumber(t){if(t.length!=0)return t.reduce((e,n)=>e=e>n.count?e:n.count,0)},getLastIndex(t){let e=this.chartData.datasets[0].data,n=0;for(let i=t;i>=0;i--)if(e.lastIndexOf(i)!==-1){n=e.lastIndexOf(i);break}else continue;return n},getFirstIndex(t){let e=this.chartData.datasets[0].data,n=0;for(let i=t;i<=this.max;i++)if(e.lastIndexOf(i)!==-1){n=e.lastIndexOf(i);break}else continue;return n}}}),BT={class:"dh-range-container"},VT={class:"bar-chart"},GT={class:"input-group-section"},WT={class:"input-group sb-input"},$T=["disabled","max","value"],HT={class:"input-group sb-input"},FT=["disabled","max","min","value"],JT={class:"advance_section"},XT=s.createTextVNode(" Advanced "),KT={key:0,alt:"arrow",src:ul,width:"20"},qT={key:1,alt:"arrow",src:ll,width:"20"},eL={key:0,class:"list-none"},tL=["checked"],nL=s.createTextVNode(" Filter Missing "),iL=["checked","disabled"],rL=s.createTextVNode(" Match "),aL=["checked","disabled"],oL=s.createTextVNode(" Exclude ");function sL(t,e,n,i,r,a){const o=s.resolveComponent("Bar"),M=s.resolveComponent("MultiRangeSlider");return s.openBlock(),s.createElementBlock("div",BT,[s.createElementVNode("div",VT,[s.createVNode(o,{"chart-data":t.chartData,"chart-id":t.chartId,"chart-options":t.chartOptions,"dataset-id-key":t.datasetIdKey,height:t.height,width:t.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),s.createVNode(M,{"base-class-name":`multi-range-slider range-slider ${t.isDisable}`,label:!1,max:t.rangeMax,"max-caption":`${t.max}`,"max-value":t.BarMaxValue,min:1,"min-caption":`${t.min}`,"min-value":t.BarMinValue,"range-margin":0,ruler:!1,step:t.steps,onInput:t.updateBarChart},null,8,["base-class-name","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),s.createElementVNode("div",GT,[s.createElementVNode("div",WT,[s.createElementVNode("label",{class:s.normalizeClass(`text-2 input-to ${t.validated?"disable":""}`)}," From ",2),s.createElementVNode("input",{class:"form-input text",disabled:!!t.validated,max:`${t.max}`,min:"1",placeholder:"From",type:"number",value:`${t.min}`,onInput:e[0]||(e[0]=u=>t.changeMin(u))},null,40,$T)]),s.createElementVNode("div",HT,[s.createElementVNode("label",{class:s.normalizeClass(`text-2 input-to ${t.validated?"disable":""}`)}," To ",2),s.createElementVNode("input",{class:"form-input text",disabled:!!t.validated,max:`${t.maxNumber(t.numberRange)}`,min:`${t.min}`,placeholder:"To",type:"number",value:`${t.max}`,onInput:e[1]||(e[1]=u=>t.changeMax(u))},null,40,FT)])]),s.createElementVNode("div",JT,[s.createElementVNode("span",{class:"toggle-icon",onClick:e[2]||(e[2]=u=>t.toggleFilter())},[XT,t.activeFilter?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("img",KT)),t.activeFilter?(s.openBlock(),s.createElementBlock("img",qT)):s.createCommentVNode("",!0)]),t.activeFilter?(s.openBlock(),s.createElementBlock("ul",eL,[s.createElementVNode("li",null,[s.createElementVNode("label",null,[s.createElementVNode("input",{checked:t.isDisable,type:"checkbox",onChange:e[3]||(e[3]=u=>t.missingFilter())},null,40,tL),nL])]),s.createElementVNode("li",null,[s.createElementVNode("label",null,[s.createElementVNode("input",{checked:t.isMatch,disabled:!!t.validated,name:"number_filter",type:"radio",onChange:e[4]||(e[4]=u=>t.matchFilter())},null,40,iL),rL]),s.createElementVNode("label",null,[s.createElementVNode("input",{checked:t.isExclude,disabled:!!t.validated,name:"number_filter",type:"radio",onChange:e[5]||(e[5]=u=>t.excludeFilter())},null,40,aL),oL])])])):s.createCommentVNode("",!0)])])}var ML=Ue(ZT,[["render",sL]]),Nx="";const uL={class:"password__panel"},lL=["placeholder","type"],cL={class:"icon is-right"},gL={key:0,class:"password__tooltip"};var NL=Ue(s.defineComponent({__name:"PasswordField",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},tipChars:{type:String,default:"12 Characters"},tipNumbers:{type:String,default:"Numbers"},tipSymbols:{type:String,default:"Symbols"},passwordTooltipDisabled:{type:Boolean,default:!1}},emits:["submit","update:modelValue"],setup(t,{emit:e}){const n=t,i=s.ref(""),r=s.ref(!1),a=s.ref(!1),o=s.ref(!1),M=s.ref(!1),u=s.ref(!1),l=s.ref(!1);function c(){e("submit",i.value),e("update:modelValue",i.value)}function g(){r.value=!0,l.value=!0}function y(){r.value=!1,l.value=!1}function j(){u.value=!u.value}return s.onMounted(()=>()=>i.value=n.modelValue||""),s.watch(n,()=>(i.value=n.modelValue||"",a.value=i.value.length>11,o.value=/\d/.test(i.value),M.value=/[!@#$%^&*)(+=._-]/.test(i.value))),(I,D)=>(s.openBlock(),s.createElementBlock("div",uL,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":D[0]||(D[0]=d=>i.value=d),class:"form__input password__panel_input","data-e2e":"password-input",placeholder:n.placeholder,type:u.value?"text":"password",onFocus:g,onFocusout:y,onKeyup:c},null,40,lL),[[s.vModelDynamic,i.value]]),s.createElementVNode("button",{class:"password__panel_button",type:"button",onClick:j},[s.createElementVNode("span",cL,[s.createVNode(Ce,{active:l.value,"icon-name":u.value?"invisible":"visible",size:20},null,8,["active","icon-name"])])]),r.value&&!n.passwordTooltipDisabled?(s.openBlock(),s.createElementBlock("div",gL,[s.createElementVNode("p",{class:s.normalizeClass(["password__tooltip_text",a.value?"password__tooltip_text--valid":""])},[s.createVNode(Ce,{class:s.normalizeClass(a.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":a.value?"accept":"close",size:16},null,8,["class","icon-name"]),s.createElementVNode("span",null,s.toDisplayString(n.tipChars),1)],2),s.createElementVNode("p",{class:s.normalizeClass(["password__tooltip_text",o.value?"password__tooltip_text--valid":""])},[s.createVNode(Ce,{class:s.normalizeClass(o.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":o.value?"accept":"close",size:16},null,8,["class","icon-name"]),s.createElementVNode("span",null,s.toDisplayString(n.tipNumbers),1)],2),s.createElementVNode("p",{class:s.normalizeClass(["password__tooltip_text",M.value?"password__tooltip_text--valid":""])},[s.createVNode(Ce,{class:s.normalizeClass(M.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":M.value?"accept":"close",size:16},null,8,["class","icon-name"]),s.createElementVNode("span",null,s.toDisplayString(n.tipSymbols),1)],2)])):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3ae35090"]]),jx="";const yL={class:"radio"},jL=["for"],IL=["id","type","value"],dL={class:"radio__label_txt"};var yg=Ue({__name:"RadioBox",props:{type:{type:String,default:"radio"},value:{type:String,required:!0},label:{type:String,required:!0}},emits:["clickBox"],setup(t,{emit:e}){return(n,i)=>(s.openBlock(),s.createElementBlock("div",yL,[s.createElementVNode("label",{class:"radio__label",for:t.value},[s.createElementVNode("input",{id:t.value,class:"radio__input",name:"radiobox",type:t.type,value:t.value,onClick:i[0]||(i[0]=r=>e("clickBox"))},null,8,IL),s.createElementVNode("span",dL,s.toDisplayString(t.label),1)],8,jL)]))}},[["__scopeId","data-v-29696bd5"]]),dx="";const DL={__name:"RadioBoxGroup",props:{orientation:{type:String,default:"horizontal"},type:{type:String,default:"radio"},list:{type:Array,required:!0}},setup(t){const e=s.ref(null);function n(){const i=document.querySelectorAll("input");for(let r=0;r<i.length;r++)i[r].checked?i[r].parentNode.parentNode.classList.add("radio--checked"):i[r].parentNode.parentNode.classList.remove("radio--checked")}return(i,r)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["radio__grp",t.orientation==="vertical"?"radio__vertical":"radio__horizontal"])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.list,a=>(s.openBlock(),s.createBlock(yg,{key:a.key,ref_for:!0,ref_key:"boxes",ref:e,label:a.label,type:t.type,value:a.value,onClickBox:n},null,8,["label","type","value"]))),128))],2))}};var Dx="";const fL={class:"search-panel"},hL=["placeholder"];var mL=Ue(s.defineComponent({__name:"SearchInput",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""}},emits:["submit","clean","update:modelValue"],setup(t,{emit:e}){const n=t,i=s.ref("");function r(){e("submit",i.value),e("update:modelValue",i.value)}function a(){i.value="",e("clean"),e("update:modelValue",i.value)}return s.onMounted(()=>()=>i.value=n.modelValue||""),s.watch(n,()=>i.value=n.modelValue||""),(o,M)=>(s.openBlock(),s.createElementBlock("div",fL,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":M[0]||(M[0]=u=>i.value=u),class:"form-input search-panel-input","data-e2e":"search-input",placeholder:n.placeholder,onKeyup:r},null,40,hL),[[s.vModelText,i.value]]),i.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("button",{key:0,class:"search-panel-button","data-e2e":"search-submit",onClick:r},[s.createVNode(Ce,{active:!0,"icon-name":"search",size:24})])),i.value?(s.openBlock(),s.createElementBlock("button",{key:1,class:"search-panel-button close","data-e2e":"search-close",onClick:a},[s.createVNode(Ce,{class:"icon","icon-name":"close",size:24})])):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-562faa14"]]),hx="";const AL=t=>(s.pushScopeId("data-v-0213b522"),t=t(),s.popScopeId(),t),zL={class:"stepper"},pL=AL(()=>s.createElementVNode("hr",{class:"solid"},null,-1));var TL=Ue(s.defineComponent({__name:"Stepper",props:{maxSteps:{type:Number,default:0},currentStep:{type:Number,default:0}},setup(t){const e=t;function n(){return Array.from(Array(e.maxSteps||0).keys())}return(i,r)=>(s.openBlock(),s.createElementBlock("div",zL,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n(),(a,o)=>(s.openBlock(),s.createElementBlock("div",{key:o,class:"step"},[s.createElementVNode("span",{class:s.normalizeClass(["step-number",{active:a===t.currentStep}])},s.toDisplayString(a+1),3),pL]))),128))]))}}),[["__scopeId","data-v-0213b522"]]);const LL=s.defineComponent({props:{data:{type:Boolean,required:!0,default:!1},label:{type:String,default:"Label"}},data(){return{active:this.data}},emits:["change"],computed:{checkedValue:{get(){return this.data},set(t){this.active=t,this.$emit("change",t)}}}}),xL={class:"dp__options"},OL={class:"dp__options_switch"},SL=s.createElementVNode("span",{class:"dp__options_slider"},null,-1);function bL(t,e,n,i,r,a){return s.openBlock(),s.createElementBlock("div",xL,[s.createElementVNode("span",null,s.toDisplayString(t.label),1),s.createElementVNode("label",OL,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>t.checkedValue=o),name:"switch",type:"checkbox"},null,512),[[s.vModelCheckbox,t.checkedValue]]),SL])])}var EL=Ue(LL,[["render",bL]]);const wL=s.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:Object,default:()=>({placement:"bottom"}),required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let t=this.$refs.main,e=this.$refs[this.target];["right","left"].includes(this.placement)&&(e.style.top=-(((e==null?void 0:e.offsetHeight)-(t==null?void 0:t.offsetHeight))/2)+"px")}}}),CL=["placement","target","tooltipText","trigger"],kL=["id"],_L={class:"text"};function YL(t,e,n,i,r,a){return s.openBlock(),s.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:t.placement,target:t.target,tooltipText:t.tooltipText,trigger:t.trigger,onClick:e[0]||(e[0]=o=>t.trigger=="click"?t.showTooltip():null),onMouseover:e[1]||(e[1]=o=>t.tooltip())},[s.renderSlot(t.$slots,"default"),s.createElementVNode("div",{id:t.target,ref:t.target,class:s.normalizeClass(`tooltiptext ${t.show}`)},[s.createElementVNode("span",_L,s.toDisplayString(t.tooltipText),1)],10,kL)],40,CL)}var QL=Ue(wL,[["render",YL]]),Ax="";const vL={class:"code"};var UL=Ue(s.defineComponent({__name:"VerificationCode",props:{code:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=t,i=s.ref(null),r=s.ref(null),a=s.ref(null),o=s.ref(null),M=s.ref(null),u=s.ref(null);async function l(D){var d,N,f,p,T;switch(D){case 1:break;case 2:(d=i.value)==null||d.focus();break;case 3:(N=r.value)==null||N.focus();break;case 4:(f=a.value)==null||f.focus();break;case 5:(p=o.value)==null||p.focus();break;case 6:(T=M.value)==null||T.focus();break}}async function c(D){var d,N,f,p,T;switch(D){case 1:(d=r.value)==null||d.focus();break;case 2:(N=a.value)==null||N.focus();break;case 3:(f=o.value)==null||f.focus();break;case 4:(p=M.value)==null||p.focus();break;case 5:(T=u.value)==null||T.focus();break}}async function g(D,d){const N=D.key;let f=!0;[{_index:1,nextInput:r},{_index:2,nextInput:a},{_index:3,nextInput:o},{_index:4,nextInput:M},{_index:5,nextInput:u}].forEach(({_index:p,nextInput:T})=>{d===p&&(T.value&&N.match(/^[0-9]+$/)&&T.value.focus({}),f=!1),D.preventDefault()}),N.match(/^[0-9]+$/)&&(D.target.value=N),f&&I()}async function y(D){var N;const d=((N=D.clipboardData)==null?void 0:N.getData("text/plain"))||"";j(d),I()}function j(D){const d=D.replace(/\D/g,"");if(d.length!==6)return;const[N,f,p,T,m,O]=d.split("");i.value&&(i.value.value=N),r.value&&(r.value.value=f),a.value&&(a.value.value=p),o.value&&(o.value.value=T),M.value&&(M.value.value=m),u.value&&(u.value.value=O)}async function I(){var d,N,f,p,T,m;const D=`${(d=i.value)==null?void 0:d.value}${(N=r.value)==null?void 0:N.value}${(f=a.value)==null?void 0:f.value}${(p=o.value)==null?void 0:p.value}${(T=M.value)==null?void 0:T.value}${(m=u.value)==null?void 0:m.value}`;e("submit",D)}return s.onMounted(()=>{n.code&&(j(n.code),I())}),(D,d)=>(s.openBlock(),s.createElementBlock("div",vL,[s.createElementVNode("input",{ref_key:"txtInput1",ref:i,autofocus:"",class:"form-input input-1","data-e2e":"input-1",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[0]||(d[0]=N=>g(N,1)),onKeyup:[d[1]||(d[1]=s.withKeys(N=>l(1),["delete"])),d[2]||(d[2]=s.withKeys(N=>l(1),["left"])),d[3]||(d[3]=s.withKeys(N=>c(1),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput2",ref:r,class:"form-input","data-e2e":"input-2",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[4]||(d[4]=N=>g(N,2)),onKeyup:[d[5]||(d[5]=s.withKeys(N=>l(2),["delete"])),d[6]||(d[6]=s.withKeys(N=>l(2),["left"])),d[7]||(d[7]=s.withKeys(N=>c(2),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput3",ref:a,class:"form-input","data-e2e":"input-3",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[8]||(d[8]=N=>g(N,3)),onKeyup:[d[9]||(d[9]=s.withKeys(N=>l(3),["delete"])),d[10]||(d[10]=s.withKeys(N=>l(3),["left"])),d[11]||(d[11]=s.withKeys(N=>c(3),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput4",ref:o,class:"form-input","data-e2e":"input-4",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[12]||(d[12]=N=>g(N,4)),onKeyup:[d[13]||(d[13]=s.withKeys(N=>l(4),["delete"])),d[14]||(d[14]=s.withKeys(N=>l(4),["left"])),d[15]||(d[15]=s.withKeys(N=>c(4),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput5",ref:M,class:"form-input","data-e2e":"input-5",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[16]||(d[16]=N=>g(N,5)),onKeyup:[d[17]||(d[17]=s.withKeys(N=>l(5),["delete"])),d[18]||(d[18]=s.withKeys(N=>l(5),["left"])),d[19]||(d[19]=s.withKeys(N=>c(5),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput6",ref:u,class:"form-input","data-e2e":"input-6",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[20]||(d[20]=N=>g(N,6)),onKeyup:[d[21]||(d[21]=s.withKeys(N=>l(6),["delete"])),d[22]||(d[22]=s.withKeys(N=>l(6),["left"])),d[23]||(d[23]=s.withKeys(N=>c(6),["right"]))],onPaste:y},null,544)]))}}),[["__scopeId","data-v-7d5513ee"]]);const PL=s.defineComponent({components:{DhIcon:Ce},props:{title:{type:String,default:"Advanced"}},data(){return{isAdvancedSettingsOpen:!1}}}),RL={class:"text-1"},ZL=s.createTextVNode(" Content ");function BL(t,e,n,i,r,a){const o=s.resolveComponent("dh-icon");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",{class:"advanced-panel-header clickable",onClick:e[0]||(e[0]=M=>t.isAdvancedSettingsOpen=!t.isAdvancedSettingsOpen)},[s.createElementVNode("h4",RL,s.toDisplayString(t.title),1),s.createVNode(o,{class:"icon","icon-name":t.isAdvancedSettingsOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])]),t.isAdvancedSettingsOpen?s.renderSlot(t.$slots,"content",{key:0},()=>[ZL]):s.createCommentVNode("",!0)],64)}var VL=Ue(PL,[["render",BL]]);de.DhAdvancedFilter=Og,de.DhDatePicker=b0,de.DhError=w0,de.DhExpansionPanel=VL,de.DhFileUpload=B0,de.DhIcon=Ce,de.DhModal=F0,de.DhNotification=sm,de.DhNumberRange=ML,de.DhPasswordField=NL,de.DhRadioBox=yg,de.DhRadioBoxGroup=DL,de.DhSearchInput=mL,de.DhStepper=TL,de.DhSwitch=EL,de.DhTooltip=QL,de.DhVerificationCode=UL,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
19
|
+
`):t}function $p(t,e){const{element:n,datasetIndex:i,index:r}=e,a=t.getDatasetMeta(i).controller,{label:o,value:M}=a.getLabelAndValue(r);return{chart:t,label:o,parsed:a.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:M,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function Kc(t,e){const n=t.chart.ctx,{body:i,footer:r,title:a}=t,{boxWidth:o,boxHeight:M}=e,u=Ze(e.bodyFont),l=Ze(e.titleFont),c=Ze(e.footerFont),g=a.length,y=r.length,j=i.length,I=$e(e.padding);let D=I.height,d=0,N=i.reduce((T,m)=>T+m.before.length+m.lines.length+m.after.length,0);if(N+=t.beforeBody.length+t.afterBody.length,g&&(D+=g*l.lineHeight+(g-1)*e.titleSpacing+e.titleMarginBottom),N){const T=e.displayColors?Math.max(M,u.lineHeight):u.lineHeight;D+=j*T+(N-j)*u.lineHeight+(N-1)*e.bodySpacing}y&&(D+=e.footerMarginTop+y*c.lineHeight+(y-1)*e.footerSpacing);let f=0;const p=function(T){d=Math.max(d,n.measureText(T).width+f)};return n.save(),n.font=l.string,Me(t.title,p),n.font=u.string,Me(t.beforeBody.concat(t.afterBody),p),f=e.displayColors?o+2+e.boxPadding:0,Me(i,T=>{Me(T.before,p),Me(T.lines,p),Me(T.after,p)}),f=0,n.font=c.string,Me(t.footer,p),n.restore(),d+=I.width,{width:d,height:D}}function Hp(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function Fp(t,e,n,i){const{x:r,width:a}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&r+a+o>e.width||t==="right"&&r-a-o<0)return!0}function Jp(t,e,n,i){const{x:r,width:a}=n,{width:o,chartArea:{left:M,right:u}}=t;let l="center";return i==="center"?l=r<=(M+u)/2?"left":"right":r<=a/2?l="left":r>=o-a/2&&(l="right"),Fp(l,t,e,n)&&(l="center"),l}function qc(t,e,n){const i=n.yAlign||e.yAlign||Hp(t,n);return{xAlign:n.xAlign||e.xAlign||Jp(t,e,n,i),yAlign:i}}function Xp(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function Kp(t,e,n){let{y:i,height:r}=t;return e==="top"?i+=n:e==="bottom"?i-=r+n:i-=r/2,i}function eg(t,e,n,i){const{caretSize:r,caretPadding:a,cornerRadius:o}=t,{xAlign:M,yAlign:u}=n,l=r+a,{topLeft:c,topRight:g,bottomLeft:y,bottomRight:j}=on(o);let I=Xp(e,M);const D=Kp(e,u,l);return u==="center"?M==="left"?I+=l:M==="right"&&(I-=l):M==="left"?I-=Math.max(c,y)+r:M==="right"&&(I+=Math.max(g,j)+r),{x:ke(I,0,i.width-e.width),y:ke(D,0,i.height-e.height)}}function Jr(t,e,n){const i=$e(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function tg(t){return lt([],dt(t))}function qp(t,e,n){return Ot(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function ng(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}class Bs extends It{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||e._chart,this._chart=this.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,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,a=new Mc(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=qp(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,r=i.beforeTitle.apply(this,[e]),a=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let M=[];return M=lt(M,dt(r)),M=lt(M,dt(a)),M=lt(M,dt(o)),M}getBeforeBody(e,n){return tg(n.callbacks.beforeBody.apply(this,[e]))}getBody(e,n){const{callbacks:i}=n,r=[];return Me(e,a=>{const o={before:[],lines:[],after:[]},M=ng(i,a);lt(o.before,dt(M.beforeLabel.call(this,a))),lt(o.lines,M.label.call(this,a)),lt(o.after,dt(M.afterLabel.call(this,a))),r.push(o)}),r}getAfterBody(e,n){return tg(n.callbacks.afterBody.apply(this,[e]))}getFooter(e,n){const{callbacks:i}=n,r=i.beforeFooter.apply(this,[e]),a=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let M=[];return M=lt(M,dt(r)),M=lt(M,dt(a)),M=lt(M,dt(o)),M}_createItems(e){const n=this._active,i=this.chart.data,r=[],a=[],o=[];let M=[],u,l;for(u=0,l=n.length;u<l;++u)M.push($p(this.chart,n[u]));return e.filter&&(M=M.filter((c,g,y)=>e.filter(c,g,y,i))),e.itemSort&&(M=M.sort((c,g)=>e.itemSort(c,g,i))),Me(M,c=>{const g=ng(e.callbacks,c);r.push(g.labelColor.call(this,c)),a.push(g.labelPointStyle.call(this,c)),o.push(g.labelTextColor.call(this,c))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=M,M}update(e,n){const i=this.options.setContext(this.getContext()),r=this._active;let a,o=[];if(!r.length)this.opacity!==0&&(a={opacity:0});else{const M=Un[i.position].call(this,r,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const u=this._size=Kc(this,i),l=Object.assign({},M,u),c=qc(this.chart,i,l),g=eg(i,l,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,a={opacity:1,x:g.x,y:g.y,width:u.width,height:u.height,caretX:M.x,caretY:M.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,r){const a=this.getCaretPosition(e,i,r);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,i){const{xAlign:r,yAlign:a}=this,{caretSize:o,cornerRadius:M}=i,{topLeft:u,topRight:l,bottomLeft:c,bottomRight:g}=on(M),{x:y,y:j}=e,{width:I,height:D}=n;let d,N,f,p,T,m;return a==="center"?(T=j+D/2,r==="left"?(d=y,N=d-o,p=T+o,m=T-o):(d=y+I,N=d+o,p=T-o,m=T+o),f=d):(r==="left"?N=y+Math.max(u,c)+o:r==="right"?N=y+I-Math.max(l,g)-o:N=this.caretX,a==="top"?(p=j,T=p-o,d=N-o,f=N+o):(p=j+D,T=p+o,d=N+o,f=N-o),m=p),{x1:d,x2:N,x3:f,y1:p,y2:T,y3:m}}drawTitle(e,n,i){const r=this.title,a=r.length;let o,M,u;if(a){const l=As(i.rtl,this.x,this.width);for(e.x=Jr(this,i.titleAlign,i),n.textAlign=l.textAlign(i.titleAlign),n.textBaseline="middle",o=Ze(i.titleFont),M=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,u=0;u<a;++u)n.fillText(r[u],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+M,u+1===a&&(e.y+=i.titleMarginBottom-M)}}_drawColorBox(e,n,i,r,a){const o=this.labelColors[i],M=this.labelPointStyles[i],{boxHeight:u,boxWidth:l,boxPadding:c}=a,g=Ze(a.bodyFont),y=Jr(this,"left",a),j=r.x(y),I=u<g.lineHeight?(g.lineHeight-u)/2:0,D=n.y+I;if(a.usePointStyle){const d={radius:Math.min(l,u)/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:1},N=r.leftForLtr(j,l)+l/2,f=D+u/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,js(e,d,N,f),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,js(e,d,N,f)}else{e.lineWidth=ne(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const d=r.leftForLtr(j,l-c),N=r.leftForLtr(r.xPlus(j,1),l-c-2),f=on(o.borderRadius);Object.values(f).some(p=>p!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,Cr(e,{x:d,y:D,w:l,h:u,radius:f}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Cr(e,{x:N,y:D+1,w:l-2,h:u-2,radius:f}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(d,D,l,u),e.strokeRect(d,D,l,u),e.fillStyle=o.backgroundColor,e.fillRect(N,D+1,l-2,u-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:r}=this,{bodySpacing:a,bodyAlign:o,displayColors:M,boxHeight:u,boxWidth:l,boxPadding:c}=i,g=Ze(i.bodyFont);let y=g.lineHeight,j=0;const I=As(i.rtl,this.x,this.width),D=function(Q){n.fillText(Q,I.x(e.x+j),e.y+y/2),e.y+=y+a},d=I.textAlign(o);let N,f,p,T,m,O,k;for(n.textAlign=o,n.textBaseline="middle",n.font=g.string,e.x=Jr(this,d,i),n.fillStyle=i.bodyColor,Me(this.beforeBody,D),j=M&&d!=="right"?o==="center"?l/2+c:l+2+c:0,T=0,O=r.length;T<O;++T){for(N=r[T],f=this.labelTextColors[T],n.fillStyle=f,Me(N.before,D),p=N.lines,M&&p.length&&(this._drawColorBox(n,e,T,I,i),y=Math.max(g.lineHeight,u)),m=0,k=p.length;m<k;++m)D(p[m]),y=g.lineHeight;Me(N.after,D)}j=0,y=g.lineHeight,Me(this.afterBody,D),e.y-=a}drawFooter(e,n,i){const r=this.footer,a=r.length;let o,M;if(a){const u=As(i.rtl,this.x,this.width);for(e.x=Jr(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=u.textAlign(i.footerAlign),n.textBaseline="middle",o=Ze(i.footerFont),n.fillStyle=i.footerColor,n.font=o.string,M=0;M<a;++M)n.fillText(r[M],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+i.footerSpacing}}drawBackground(e,n,i,r){const{xAlign:a,yAlign:o}=this,{x:M,y:u}=e,{width:l,height:c}=i,{topLeft:g,topRight:y,bottomLeft:j,bottomRight:I}=on(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(M+g,u),o==="top"&&this.drawCaret(e,n,i,r),n.lineTo(M+l-y,u),n.quadraticCurveTo(M+l,u,M+l,u+y),o==="center"&&a==="right"&&this.drawCaret(e,n,i,r),n.lineTo(M+l,u+c-I),n.quadraticCurveTo(M+l,u+c,M+l-I,u+c),o==="bottom"&&this.drawCaret(e,n,i,r),n.lineTo(M+j,u+c),n.quadraticCurveTo(M,u+c,M,u+c-j),o==="center"&&a==="left"&&this.drawCaret(e,n,i,r),n.lineTo(M,u+g),n.quadraticCurveTo(M,u,M+g,u),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,r=i&&i.x,a=i&&i.y;if(r||a){const o=Un[e.position].call(this,this._active,this._eventPosition);if(!o)return;const M=this._size=Kc(this,e),u=Object.assign({},o,this._size),l=qc(n,e,u),c=eg(e,u,l,n);(r._to!==c.x||a._to!==c.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=M.width,this.height=M.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=$e(n.padding),M=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&M&&(e.save(),e.globalAlpha=i,this.drawBackground(a,e,r,n),_A(e,n.textDirection),a.y+=o.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),YA(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,r=e.map(({datasetIndex:M,index:u})=>{const l=this.chart.getDatasetMeta(M);if(!l)throw new Error("Cannot find a dataset at index "+M);return{datasetIndex:M,element:l.data[u],index:u}}),a=!Ar(i,r),o=this._positionChanged(r,n);(a||o)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,a=this._active||[],o=this._getActiveElements(e,a,n,i),M=this._positionChanged(o,e),u=n||!Ar(o,a)||M;return u&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,i,r){const a=this.options;if(e.type==="mouseout")return[];if(!r)return n;const o=this.chart.getElementsAtEventForMode(e,a.mode,a,i);return a.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:r,options:a}=this,o=Un[a.position].call(this,e,n);return o!==!1&&(i!==o.x||r!==o.y)}}Bs.positioners=Un;var eT={id:"tooltip",_element:Bs,positioners:Un,afterInit(t,e,n){n&&(t.tooltip=new Bs({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)===!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:{beforeTitle:Nt,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:Nt,beforeBody:Nt,beforeLabel:Nt,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 oe(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:Nt,afterBody:Nt,beforeFooter:Nt,footer:Nt,afterFooter:Nt}},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 tT=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function nT(t,e,n,i){const r=t.indexOf(e);if(r===-1)return tT(t,e,n,i);const a=t.lastIndexOf(e);return r!==a?n:r}const iT=(t,e)=>t===null?null:ke(Math.round(t),0,e);class Xr extends $t{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:r,label:a}of n)i[r]===a&&i.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(oe(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:nT(i,e,ie(n,e),this._addedLabels),iT(n,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const e=this.min,n=this.max,i=this.options.offset,r=[];let a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=n;o++)r.push({value:o});return r}getLabelForValue(e){const n=this.getLabels();return e>=0&&e<n.length?n[e]: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}}Xr.id="category",Xr.defaults={ticks:{callback:Xr.prototype.getLabelForValue}};function rT(t,e){const n=[],{bounds:r,step:a,min:o,max:M,precision:u,count:l,maxTicks:c,maxDigits:g,includeBounds:y}=t,j=a||1,I=c-1,{min:D,max:d}=e,N=!oe(o),f=!oe(M),p=!oe(l),T=(d-D)/(g+1);let m=dl((d-D)/I/j)*j,O,k,Q,Y;if(m<1e-14&&!N&&!f)return[{value:D},{value:d}];Y=Math.ceil(d/m)-Math.floor(D/m),Y>I&&(m=dl(Y*m/I/j)*j),oe(u)||(O=Math.pow(10,u),m=Math.ceil(m*O)/O),r==="ticks"?(k=Math.floor(D/m)*m,Q=Math.ceil(d/m)*m):(k=D,Q=d),N&&f&&a&&Dm((M-o)/a,m/1e3)?(Y=Math.round(Math.min((M-o)/m,c)),m=(M-o)/Y,k=o,Q=M):p?(k=N?o:k,Q=f?M:Q,Y=l-1,m=(Q-k)/Y):(Y=(Q-k)/m,mn(Y,Math.round(Y),m/1e3)?Y=Math.round(Y):Y=Math.ceil(Y));const U=Math.max(fl(m),fl(k));O=Math.pow(10,oe(u)?U:u),k=Math.round(k*O)/O,Q=Math.round(Q*O)/O;let b=0;for(N&&(y&&k!==o?(n.push({value:o}),k<o&&b++,mn(Math.round((k+b*m)*O)/O,o,ig(o,T,t))&&b++):k<o&&b++);b<Y;++b)n.push({value:Math.round((k+b*m)*O)/O});return f&&y&&Q!==M?n.length&&mn(n[n.length-1].value,M,ig(M,T,t))?n[n.length-1].value=M:n.push({value:M}):(!f||Q===M)&&n.push({value:Q}),n}function ig(t,e,{horizontal:n,minRotation:i}){const r=qe(i),a=(n?Math.sin(r):Math.cos(r))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}class Kr extends $t{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 oe(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:a}=this;const o=u=>r=n?r:u,M=u=>a=i?a:u;if(e){const u=Mt(r),l=Mt(a);u<0&&l<0?M(0):u>0&&l>0&&o(0)}if(r===a){let u=1;(a>=Number.MAX_SAFE_INTEGER||r<=Number.MIN_SAFE_INTEGER)&&(u=Math.abs(a*.05)),M(a+u),e||o(r-u)}this.min=r,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} 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 i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,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},a=this._range||this,o=rT(r,a);return e.bounds==="ticks"&&Dl(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const r=(i-n)/Math.max(e.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return On(e,this.chart.options.locale,this.options.ticks.format)}}class Vs extends Kr{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Se(e)?e:0,this.max=Se(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=qe(this.options.ticks.minRotation),r=(e?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.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}}Vs.id="linear",Vs.defaults={ticks:{callback:Ur.formatters.numeric}};function rg(t){return t/Math.pow(10,Math.floor(Ge(t)))===1}function aT(t,e){const n=Math.floor(Ge(e.max)),i=Math.ceil(e.max/Math.pow(10,n)),r=[];let a=Be(t.min,Math.pow(10,Math.floor(Ge(e.min)))),o=Math.floor(Ge(a)),M=Math.floor(a/Math.pow(10,o)),u=o<0?Math.pow(10,Math.abs(o)):1;do r.push({value:a,major:rg(a)}),++M,M===10&&(M=1,++o,u=o>=0?1:u),a=Math.round(M*Math.pow(10,o)*u)/u;while(o<n||o===n&&M<i);const l=Be(t.max,a);return r.push({value:l,major:rg(a)}),r}class ag extends $t{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=Kr.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return Se(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Se(e)?Math.max(0,e):null,this.max=Se(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,r=this.max;const a=u=>i=e?i:u,o=u=>r=n?r:u,M=(u,l)=>Math.pow(10,Math.floor(Ge(u))+l);i===r&&(i<=0?(a(1),o(10)):(a(M(i,-1)),o(M(r,1)))),i<=0&&a(M(r,-1)),r<=0&&o(M(i,1)),this._zero&&this.min!==this._suggestedMin&&i===M(this.min,0)&&a(M(i,-1)),this.min=i,this.max=r}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=aT(n,this);return e.bounds==="ticks"&&Dl(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":On(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Ge(e),this._valueRange=Ge(this.max)-Ge(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Ge(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}ag.id="logarithmic",ag.defaults={ticks:{callback:Ur.formatters.logarithmic,major:{enabled:!0}}};function Gs(t){const e=t.ticks;if(e.display&&t.display){const n=$e(e.backdropPadding);return ie(e.font&&e.font.size,ee.font.size)+n.height}return 0}function oT(t,e,n){return n=je(n)?n:[n],{w:Jm(t,e.string,n),h:n.length*e.lineHeight}}function og(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function sT(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),i=[],r=[],a=t._pointLabels.length,o=t.options.pointLabels,M=o.centerPointLabels?Ae/a:0;for(let u=0;u<a;u++){const l=o.setContext(t.getPointLabelContext(u));r[u]=l.padding;const c=t.getPointPosition(u,t.drawingArea+r[u],M),g=Ze(l.font),y=oT(t.ctx,g,t._pointLabels[u]);i[u]=y;const j=et(t.getIndexAngle(u)+M),I=Math.round(rs(j)),D=og(I,c.x,y.w,0,180),d=og(I,c.y,y.h,90,270);MT(n,e,j,D,d)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=uT(t,i,r)}function MT(t,e,n,i,r){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let M=0,u=0;i.start<e.l?(M=(e.l-i.start)/a,t.l=Math.min(t.l,e.l-M)):i.end>e.r&&(M=(i.end-e.r)/a,t.r=Math.max(t.r,e.r+M)),r.start<e.t?(u=(e.t-r.start)/o,t.t=Math.min(t.t,e.t-u)):r.end>e.b&&(u=(r.end-e.b)/o,t.b=Math.max(t.b,e.b+u))}function uT(t,e,n){const i=[],r=t._pointLabels.length,a=t.options,o=Gs(a)/2,M=t.drawingArea,u=a.pointLabels.centerPointLabels?Ae/r:0;for(let l=0;l<r;l++){const c=t.getPointPosition(l,M+o+n[l],u),g=Math.round(rs(et(c.angle+ze))),y=e[l],j=gT(c.y,y.h,g),I=lT(g),D=cT(c.x,y.w,I);i.push({x:c.x,y:j,textAlign:I,left:D,top:j,right:D+y.w,bottom:j+y.h})}return i}function lT(t){return t===0||t===180?"center":t<180?"left":"right"}function cT(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function gT(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function NT(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let r=e-1;r>=0;r--){const a=i.setContext(t.getPointLabelContext(r)),o=Ze(a.font),{x:M,y:u,textAlign:l,left:c,top:g,right:y,bottom:j}=t._pointLabelItems[r],{backdropColor:I}=a;if(!oe(I)){const D=on(a.borderRadius),d=$e(a.backdropPadding);n.fillStyle=I;const N=c-d.left,f=g-d.top,p=y-c+d.width,T=j-g+d.height;Object.values(D).some(m=>m!==0)?(n.beginPath(),Cr(n,{x:N,y:f,w:p,h:T,radius:D}),n.fill()):n.fillRect(N,f,p,T)}wr(n,t._pointLabels[r],M,u+o.lineHeight/2,o,{color:a.color,textAlign:l,textBaseline:"middle"})}}function sg(t,e,n,i){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,le);else{let a=t.getPointPosition(0,e);r.moveTo(a.x,a.y);for(let o=1;o<i;o++)a=t.getPointPosition(o,e),r.lineTo(a.x,a.y)}}function yT(t,e,n,i){const r=t.ctx,a=e.circular,{color:o,lineWidth:M}=e;!a&&!i||!o||!M||n<0||(r.save(),r.strokeStyle=o,r.lineWidth=M,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),sg(t,n,a,i),r.closePath(),r.stroke(),r.restore())}function jT(t,e,n){return Ot(t,{label:n,index:e,type:"pointLabel"})}class qr extends Kr{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=$e(Gs(this.options)/2),n=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=Se(e)&&!isNaN(e)?e:0,this.max=Se(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gs(this.options))}generateTickLabels(e){Kr.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,i)=>{const r=me(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?sT(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,r){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,r))}getIndexAngle(e){const n=le/(this._pointLabels.length||1),i=this.options.startAngle||0;return et(e*n+qe(i))}getDistanceFromCenterForValue(e){if(oe(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(oe(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 i=n[e];return jT(this.getContext(),e,i)}}getPointPosition(e,n,i=0){const r=this.getIndexAngle(e)-ze+i;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:i,right:r,bottom:a}=this._pointLabelItems[e];return{left:n,top:i,right:r,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),sg(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:i,grid:r}=n,a=this._pointLabels.length;let o,M,u;if(n.pointLabels.display&&NT(this,a),r.display&&this.ticks.forEach((l,c)=>{if(c!==0){M=this.getDistanceFromCenterForValue(l.value);const g=r.setContext(this.getContext(c-1));yT(this,g,M,a)}}),i.display){for(e.save(),o=a-1;o>=0;o--){const l=i.setContext(this.getPointLabelContext(o)),{color:c,lineWidth:g}=l;!g||!c||(e.lineWidth=g,e.strokeStyle=c,e.setLineDash(l.borderDash),e.lineDashOffset=l.borderDashOffset,M=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(o,M),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let a,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((M,u)=>{if(u===0&&!n.reverse)return;const l=i.setContext(this.getContext(u)),c=Ze(l.font);if(a=this.getDistanceFromCenterForValue(this.ticks[u].value),l.showLabelBackdrop){e.font=c.string,o=e.measureText(M.label).width,e.fillStyle=l.backdropColor;const g=$e(l.backdropPadding);e.fillRect(-o/2-g.left,-a-c.size/2-g.top,o+g.width,c.size+g.height)}wr(e,M.label,0,-a,c,{color:l.color})}),e.restore()}drawTitle(){}}qr.id="radialLinear",qr.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ur.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}},qr.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},qr.descriptors={angleLines:{_fallback:"grid"}};const ea={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}},Re=Object.keys(ea);function IT(t,e){return t-e}function Mg(t,e){if(oe(e))return null;const n=t._adapter,{parser:i,round:r,isoWeekday:a}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Se(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(r&&(o=r==="week"&&(rn(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,r)),+o)}function ug(t,e,n,i){const r=Re.length;for(let a=Re.indexOf(t);a<r-1;++a){const o=ea[Re[a]],M=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(M*o.size))<=i)return Re[a]}return Re[r-1]}function dT(t,e,n,i,r){for(let a=Re.length-1;a>=Re.indexOf(n);a--){const o=Re[a];if(ea[o].common&&t._adapter.diff(r,i,o)>=e-1)return o}return Re[n?Re.indexOf(n):0]}function DT(t){for(let e=Re.indexOf(t)+1,n=Re.length;e<n;++e)if(ea[Re[e]].common)return Re[e]}function lg(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:r}=os(n,e),a=n[i]>=e?n[i]:n[r];t[a]=!0}}function fT(t,e,n,i){const r=t._adapter,a=+r.startOf(e[0].value,i),o=e[e.length-1].value;let M,u;for(M=a;M<=o;M=+r.add(M,1,i))u=n[M],u>=0&&(e[u].major=!0);return e}function cg(t,e,n){const i=[],r={},a=e.length;let o,M;for(o=0;o<a;++o)M=e[o],r[M]=o,i.push({value:M,major:!1});return a===0||!n?i:fT(t,i,r,n)}class ta extends $t{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 i=e.time||(e.time={}),r=this._adapter=new Qz._date(e.adapters.date);r.init(n),fn(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Mg(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:r,max:a,minDefined:o,maxDefined:M}=this.getUserBounds();function u(l){!o&&!isNaN(l.min)&&(r=Math.min(r,l.min)),!M&&!isNaN(l.max)&&(a=Math.max(a,l.max))}(!o||!M)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),r=Se(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),a=Se(a)&&!isNaN(a)?a:+n.endOf(Date.now(),i)+1,this.min=Math.min(r,a-1),this.max=Math.max(r+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,r=i.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 a=this.min,o=this.max,M=Am(r,a,o);return this._unit=n.unit||(i.autoSkip?ug(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):dT(this,M.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:DT(this._unit),this.initOffsets(r),e.reverse&&M.reverse(),cg(this,M,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e){let n=0,i=0,r,a;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?i=a:i=(a-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=ke(n,0,o),i=ke(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,r=this.options,a=r.time,o=a.unit||ug(a.minUnit,n,i,this._getLabelCapacity(n)),M=ie(a.stepSize,1),u=o==="week"?a.isoWeekday:!1,l=rn(u)||u===!0,c={};let g=n,y,j;if(l&&(g=+e.startOf(g,"isoWeek",u)),g=+e.startOf(g,l?"day":o),e.diff(i,n,o)>1e5*M)throw new Error(n+" and "+i+" are too far apart with stepSize of "+M+" "+o);const I=r.ticks.source==="data"&&this.getDataTimestamps();for(y=g,j=0;y<i;y=+e.add(y,M,o),j++)lg(c,y,I);return(y===i||r.bounds==="ticks"||j===1)&&lg(c,y,I),Object.keys(c).sort((D,d)=>D-d).map(D=>+D)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,n,i,r){const a=this.options,o=a.time.displayFormats,M=this._unit,u=this._majorUnit,l=M&&o[M],c=u&&o[u],g=i[n],y=u&&c&&g&&g.major,j=this._adapter.format(e,r||(y?c:l)),I=a.ticks.callback;return I?me(I,[j,n,i],this):j}generateTickLabels(e){let n,i,r;for(n=0,i=e.length;n<i;++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,i=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,i=this.ctx.measureText(e).width,r=qe(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(r),o=Math.sin(r),M=this._resolveTickFontOptions(0).size;return{w:i*a+M*o,h:i*o+M*a}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,a=this._tickFormatFunction(e,0,cg(this,[e],this._majorUnit),r),o=this._getLabelSize(a),M=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return M>0?M:1}getDataTimestamps(){let e=this._cache.data||[],n,i;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,i=r.length;n<i;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,i;if(e.length)return e;const r=this.getLabels();for(n=0,i=r.length;n<i;++n)e.push(Mg(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return zl(e.sort(IT))}}ta.id="time",ta.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function na(t,e,n){let i=0,r=t.length-1,a,o,M,u;n?(e>=t[i].pos&&e<=t[r].pos&&({lo:i,hi:r}=Rt(t,"pos",e)),{pos:a,time:M}=t[i],{pos:o,time:u}=t[r]):(e>=t[i].time&&e<=t[r].time&&({lo:i,hi:r}=Rt(t,"time",e)),{time:a,pos:M}=t[i],{time:o,pos:u}=t[r]);const l=o-a;return l?M+(u-M)*(e-a)/l:M}class gg extends ta{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=na(n,this.min),this._tableRange=na(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,r=[],a=[];let o,M,u,l,c;for(o=0,M=e.length;o<M;++o)l=e[o],l>=n&&l<=i&&r.push(l);if(r.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,M=r.length;o<M;++o)c=r[o+1],u=r[o-1],l=r[o],Math.round((c+u)/2)!==l&&a.push({time:l,pos:o/(M-1)});return a}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(na(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return na(this._table,i*this._tableRange+this._minPos,!0)}}gg.id="timeseries",gg.defaults=ta.defaults;var ln;(function(t){t.ChartRendered="chart:rendered",t.ChartUpdated="chart:updated",t.ChartDestroyed="chart:destroyed",t.LabelsUpdated="labels:updated"})(ln||(ln={}));function ia(t,e,n,i){t(e,n),i!==void 0&&i.emit(ln.ChartRendered)}function hT(t,e){t.update(),e!==void 0&&e.emit(ln.ChartUpdated)}function ra(t,e){t.destroy(),e!==void 0&&e.emit(ln.ChartDestroyed)}function mT(t,e){const n={labels:typeof t.labels=="undefined"?[]:[...t.labels],datasets:[]};return Ng(n,{...t},e),n}function Ng(t,e,n){const i=[];t.datasets=e.datasets.map(r=>{const a=t.datasets.find(o=>o[n]===r[n]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function AT(t,e,n){t.data.labels=e,n!==void 0&&n.emit(ln.LabelsUpdated)}function zT(t,e){t.options={...e}}function pT(t,e){const n=t.datasets.map(r=>r.label),i=e.datasets.map(r=>r.label);return e.datasets.length===t.datasets.length&&n.every((r,a)=>r===i[a])}const TT="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",LT="Update ERROR: chart instance not found",xT=((t,e,n)=>s.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:t},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(i,r){vn.register(n);const a=s.shallowRef(null),o=s.ref(null);function M(g,y){if(a.value!==null&&ra(s.toRaw(a.value),r),o.value===null)throw new Error(TT);{const j=mT(g,i.datasetIdKey),I=o.value.getContext("2d");I!==null&&(a.value=new vn(I,{type:e,data:s.isProxy(g)?new Proxy(j,{}):j,options:y,plugins:i.plugins}))}}function u(g,y){const j=s.isProxy(g)?s.toRaw(g):{...g},I=s.isProxy(y)?s.toRaw(y):{...y};if(Object.keys(I).length>0){const D=s.toRaw(a.value);pT(j,I)&&D!==null?(Ng(D==null?void 0:D.data,j,i.datasetIdKey),j.labels!==void 0&&AT(D,j.labels,r),c()):(D!==null&&ra(D,r),ia(M,i.chartData,i.chartOptions,r))}else a.value!==null&&ra(s.toRaw(a.value),r),ia(M,i.chartData,i.chartOptions,r)}function l(g){const y=s.toRaw(a.value);y!==null?(zT(y,g),c()):ia(M,i.chartData,i.chartOptions,r)}function c(){const g=s.toRaw(a.value);g!==null?hT(g,r):console.error(LT)}return s.watch(()=>i.chartData,(g,y)=>u(g,y),{deep:!0}),s.watch(()=>i.chartOptions,g=>l(g),{deep:!0}),s.onMounted(()=>{"datasets"in i.chartData&&i.chartData.datasets.length>0&&ia(M,i.chartData,i.chartOptions,r)}),s.onBeforeUnmount(()=>{a.value!==null&&ra(s.toRaw(a.value),r)}),r.expose({chart:a,updateChart:c}),()=>s.h("div",{style:i.styles,class:i.cssClasses},[s.h("canvas",{id:i.chartId,width:i.width,height:i.height,ref:o})])}}))("bar-chart","bar",vr);var cx="";const OT={name:"MultiRangeSlider",props:{baseClassName:{type:String,default:"multi-range-slider"},min:{type:Number},max:{type:Number},minValue:{type:Number},maxValue:{type:Number},step:{type:Number,default:1},preventWheel:{type:Boolean,default:!1},ruler:{type:Boolean,default:!0},label:{type:Boolean,default:!0},labels:{type:Array},minCaption:{type:String},maxCaption:{type:String},rangeMargin:{type:Number}},data(){let t=this.labels||[],e=this.min===void 0?0:this.min,n=t.length?t.length-1:100,i=this.max===void 0?n:this.max,r=this.minValue===void 0?25:this.minValue;t.length&&this.minValue===void 0&&(r=1);let a=this.maxValue||75;if(t.length&&this.maxValue===void 0&&(a=t.length-2),i<=e)throw new Error("Invalid props min or max");if(r>a)throw new Error("Invalid props minValue or maxValue");let o=this.rangeMargin===void 0?this.step:this.rangeMargin,M=o%this.step;return M&&(o=o+this.step-M),{valueMin:r<e?e:r,valueMax:a>i?i:a,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:o}},methods:{onBarLeftClick(){this.valueMin-this.step>=this.minimum?this.valueMin-=this.step:this.valueMin=this.minimum},onInnerBarLeftClick(){this.valueMin+this.rangeMarginValue<this.valueMax&&(this.valueMin+=this.step)},onBarRightClick(){this.valueMax+this.step<=this.maximum?this.valueMax+=this.step:this.valueMax=this.maximum},onInnerBarRightClick(){this.valueMax-this.rangeMarginValue>this.valueMin&&(this.valueMax-=this.step)},onInputMinChange(t){let e=parseFloat(t.target.value);e<=this.valueMax-this.rangeMarginValue&&e>=this.minimum?this.valueMin=e:t.target.value=this.valueMin},onInputMaxChange(t){let e=parseFloat(t.target.value);e>=this.valueMin+this.rangeMarginValue&&e<=this.maximum?this.valueMax=e:t.target.value=this.valueMax},onLeftThumbMousedown(t){if(t.preventDefault(),this.startX=t.clientX,t.type==="touchstart")if(t.touches.length===1)this.startX=t.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=t.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(t){this.mouseMoveCounter++;let e=t.clientX;t.type==="touchmove"&&(e=t.touches[0].clientX);let i=(e-this.startX)/this.barBox.width,r=this.barValue+(this.maximum-this.minimum)*i;r-=r%this.step,r<this.minimum?r=this.minimum:r>this.valueMax-this.rangeMarginValue&&(r=this.valueMax-this.rangeMarginValue),this.valueMin=r},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(t){if(t.preventDefault(),this.startX=t.clientX,t.type==="touchstart")if(t.touches.length===1)this.startX=t.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=t.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(t){this.mouseMoveCounter++;let e=t.clientX;t.type==="touchmove"&&(e=t.touches[0].clientX);let i=(e-this.startX)/this.barBox.width,r=this.barValue+(this.maximum-this.minimum)*i;r-=r%this.step,r<this.valueMin+this.rangeMarginValue?r=this.valueMin+this.rangeMarginValue:r>this.maximum&&(r=this.maximum),this.valueMax=r},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(t){if(this.preventWheel===!0||!t.shiftKey&&!t.ctrlKey)return;let e=this.step;t.deltaY<0&&(e=-e),t.shiftKey&&t.ctrlKey?this.valueMin+e>=this.minimum&&this.valueMax+e<=this.maximum&&(this.valueMin=this.valueMin+e,this.valueMax=this.valueMax+e):t.ctrlKey?(e=this.valueMax+e,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e):t.shiftKey&&(e=this.valueMin+e,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e)},triggerInput(){let t=0;this.step.toString().includes(".")&&(t=2);let e={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(t)),maxValue:parseFloat(this.valueMax.toFixed(t))};this.$emit("input",e)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let t=this.labels||[],e=t.length?t.length-1:100;return this.max===void 0?e:this.max},stepCount(){let t=this.labels||[];return t.length?t.length-1:Math.floor((this.maximum-this.minimum)/this.step)},subStepCount(){return(this.labels||[]).length&&this.step>1?(this.maximum-this.minimum)/this.step:0},barMin(){return(this.valueMin-this.minimum)/(this.maximum-this.minimum)*100},barMax(){return 100-(this.valueMax-this.minimum)/(this.maximum-this.minimum)*100},barMinVal(){let t=0;return this.step.toString().includes(".")&&(t=2),(this.valueMin||0).toFixed(t)},barMaxVal(){let t=0;return this.step.toString().includes(".")&&(t=2),(this.valueMax||100).toFixed(t)},scaleLabels(){let t=this.labels||[];return t.length===0&&(t=[],t.push(this.minimum),t.push(this.maximum)),t}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(t){this.valueMin=t<this.minimum?this.minimum:t},maxValue(t){this.valueMax=t>this.maximum?this.maximum:t}},mounted(){}},ST={class:"bar"},bT=["min","max","step","value"],ET={class:"caption"},wT={class:"min-caption"},CT={class:"bar-inner"},kT=["min","max","step","value"],_T={class:"caption"},YT={class:"max-caption"},QT={key:0,class:"ruler"},vT={key:1,class:"sub-ruler"},UT={key:2,class:"labels"};function PT(t,e,n,i,r,a){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([n.baseClassName,r.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:e[10]||(e[10]=s.withModifiers((...o)=>a.onMouseWheel&&a.onMouseWheel(...o),["prevent","stop"]))},[s.createElementVNode("div",ST,[s.createElementVNode("div",{class:"bar-left",style:s.normalizeStyle({width:a.barMin+"%"}),onClick:e[0]||(e[0]=(...o)=>a.onBarLeftClick&&a.onBarLeftClick(...o))},null,4),s.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:a.minimum,max:a.maximum,step:n.step,value:r.valueMin,onInput:e[1]||(e[1]=s.withModifiers((...o)=>a.onInputMinChange&&a.onInputMinChange(...o),["stop","prevent"]))},null,40,bT),s.createElementVNode("div",{class:"thumb thumb-left",onMousedown:e[2]||(e[2]=(...o)=>a.onLeftThumbMousedown&&a.onLeftThumbMousedown(...o)),onTouchstart:e[3]||(e[3]=(...o)=>a.onLeftThumbMousedown&&a.onLeftThumbMousedown(...o))},[s.createElementVNode("div",ET,[s.createElementVNode("span",wT,s.toDisplayString(n.minCaption||a.barMinVal),1)])],32),s.createElementVNode("div",CT,[s.createElementVNode("div",{class:"bar-inner-left",onClick:e[4]||(e[4]=(...o)=>a.onInnerBarLeftClick&&a.onInnerBarLeftClick(...o))}),s.createElementVNode("div",{class:"bar-inner-right",onClick:e[5]||(e[5]=(...o)=>a.onInnerBarRightClick&&a.onInnerBarRightClick(...o))})]),s.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:a.minimum,max:a.maximum,step:n.step,value:r.valueMax,onInput:e[6]||(e[6]=s.withModifiers((...o)=>a.onInputMaxChange&&a.onInputMaxChange(...o),["stop","prevent"]))},null,40,kT),s.createElementVNode("div",{class:"thumb thumb-right",onMousedown:e[7]||(e[7]=(...o)=>a.onRightThumbMousedown&&a.onRightThumbMousedown(...o)),onTouchstart:e[8]||(e[8]=(...o)=>a.onRightThumbMousedown&&a.onRightThumbMousedown(...o))},[s.createElementVNode("div",_T,[s.createElementVNode("span",YT,s.toDisplayString(n.maxCaption||a.barMaxVal),1)])],32),s.createElementVNode("div",{class:"bar-right",style:s.normalizeStyle({width:a.barMax+"%"}),onClick:e[9]||(e[9]=(...o)=>a.onBarRightClick&&a.onBarRightClick(...o))},null,4)]),n.ruler?(s.openBlock(),s.createElementBlock("div",QT,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.stepCount,o=>(s.openBlock(),s.createElementBlock("div",{key:o,class:"ruler-rule"}))),128))])):s.createCommentVNode("",!0),a.subStepCount?(s.openBlock(),s.createElementBlock("div",vT,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.subStepCount,o=>(s.openBlock(),s.createElementBlock("div",{key:o,class:"ruler-sub-rule"}))),128))])):s.createCommentVNode("",!0),n.label?(s.openBlock(),s.createElementBlock("div",UT,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.scaleLabels,o=>(s.openBlock(),s.createElementBlock("div",{class:"label",key:o},s.toDisplayString(o),1))),128))])):s.createCommentVNode("",!0)],34)}var RT=Ue(OT,[["render",PT]]),gx="";vn.register(eT,Fr,Xr,Vs);const ZT=s.defineComponent({components:{Bar:xT,MultiRangeSlider:RT},props:{numberRange:{type:Array,default:()=>[{key:1,count:10}]},width:{type:Number,default:200},height:{type:Number,default:50},chartId:{type:String,default:"bar-chart"},datasetIdKey:{type:String,default:"label"},steps:{type:Number,default:1}},data(){return{chartData:{labels:[],datasets:[{labels:"",data:[],backgroundColor:["#5ea9e5"],borderRadius:1,hoverBackgroundColor:"#e0e0e0"}]},chartOptions:{responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1},ticks:{display:!0}},y:{display:!1,grid:{display:!1},ticks:{display:!1}}}},chartLines:{},min:"1",max:this.maxNumber(this.numberRange),rangeMax:this.numberRange.length,chart_dta:[],BarMinValue:1,BarMaxValue:this.numberRange.length,activeFilter:!1,validated:!1,isMatch:!1,isExclude:!1,isDisable:!1}},mounted(){this.isMatch=!0,this.setChartData(this.numberRange),this.highlightChart()},methods:{changeMin(t){let e=t.target.value;this.min=e||"1",this.BarMinValue=e?this.getFirstIndex(parseInt(e)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(t){let e=t.target.value;this.BarMaxValue=e&&e>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(e)),this.max=e&&e>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):e,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(t){t=this.sortData(t),this.removeChartData();let e=this.chartData.labels;for(let n=0;n<t.length;n++)e.push(t[n].key),this.chart_dta.push(t[n].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<=t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(t){const{minValue:e,maxValue:n}=t;this.BarMinValue=e,this.BarMaxValue=n;var i=this.chartData.datasets[0].data;this.min=i[this.BarMinValue]?i[this.BarMinValue]:"1",this.max=i[this.BarMaxValue]?i[this.BarMaxValue]:this.max,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},toggleFilter(){this.activeFilter=!this.activeFilter},removeChartData(){this.chartData.labels=[],this.chartData.datasets[0].data=[],this.chart_dta=[]},matchFilter(){if(!this.isDisable){this.isMatch=!0,this.isExclude=!1;var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<=t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")}},excludeFilter(){if(!this.isDisable){this.isMatch=!1,this.isExclude=!0;var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#e0e0e0"):this.chartData.datasets[0].backgroundColor.push("#5ea9e5")}},missingFilter(){this.isDisable=!this.isDisable,this.validated=!this.validated;var t=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let e=1;e<=t.length;e++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},sortData(t){return t.slice().sort(function(e,n){return e.count-n.count})},maxNumber(t){if(t.length!=0)return t.reduce((e,n)=>e=e>n.count?e:n.count,0)},getLastIndex(t){let e=this.chartData.datasets[0].data,n=0;for(let i=t;i>=0;i--)if(e.lastIndexOf(i)!==-1){n=e.lastIndexOf(i);break}else continue;return n},getFirstIndex(t){let e=this.chartData.datasets[0].data,n=0;for(let i=t;i<=this.max;i++)if(e.lastIndexOf(i)!==-1){n=e.lastIndexOf(i);break}else continue;return n}}}),BT={class:"dh-range-container"},VT={class:"bar-chart"},GT={class:"input-group-section"},WT={class:"input-group sb-input"},$T=["disabled","max","value"],HT={class:"input-group sb-input"},FT=["disabled","max","min","value"],JT={class:"advance_section"},XT=s.createTextVNode(" Advanced "),KT={key:0,alt:"arrow",src:ul,width:"20"},qT={key:1,alt:"arrow",src:ll,width:"20"},eL={key:0,class:"list-none"},tL=["checked"],nL=s.createTextVNode(" Filter Missing "),iL=["checked","disabled"],rL=s.createTextVNode(" Match "),aL=["checked","disabled"],oL=s.createTextVNode(" Exclude ");function sL(t,e,n,i,r,a){const o=s.resolveComponent("Bar"),M=s.resolveComponent("MultiRangeSlider");return s.openBlock(),s.createElementBlock("div",BT,[s.createElementVNode("div",VT,[s.createVNode(o,{"chart-data":t.chartData,"chart-id":t.chartId,"chart-options":t.chartOptions,"dataset-id-key":t.datasetIdKey,height:t.height,width:t.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),s.createVNode(M,{"base-class-name":`multi-range-slider range-slider ${t.isDisable}`,label:!1,max:t.rangeMax,"max-caption":`${t.max}`,"max-value":t.BarMaxValue,min:1,"min-caption":`${t.min}`,"min-value":t.BarMinValue,"range-margin":0,ruler:!1,step:t.steps,onInput:t.updateBarChart},null,8,["base-class-name","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),s.createElementVNode("div",GT,[s.createElementVNode("div",WT,[s.createElementVNode("label",{class:s.normalizeClass(`text-2 input-to ${t.validated?"disable":""}`)}," From ",2),s.createElementVNode("input",{class:"form-input text",disabled:!!t.validated,max:`${t.max}`,min:"1",placeholder:"From",type:"number",value:`${t.min}`,onInput:e[0]||(e[0]=u=>t.changeMin(u))},null,40,$T)]),s.createElementVNode("div",HT,[s.createElementVNode("label",{class:s.normalizeClass(`text-2 input-to ${t.validated?"disable":""}`)}," To ",2),s.createElementVNode("input",{class:"form-input text",disabled:!!t.validated,max:`${t.maxNumber(t.numberRange)}`,min:`${t.min}`,placeholder:"To",type:"number",value:`${t.max}`,onInput:e[1]||(e[1]=u=>t.changeMax(u))},null,40,FT)])]),s.createElementVNode("div",JT,[s.createElementVNode("span",{class:"toggle-icon",onClick:e[2]||(e[2]=u=>t.toggleFilter())},[XT,t.activeFilter?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("img",KT)),t.activeFilter?(s.openBlock(),s.createElementBlock("img",qT)):s.createCommentVNode("",!0)]),t.activeFilter?(s.openBlock(),s.createElementBlock("ul",eL,[s.createElementVNode("li",null,[s.createElementVNode("label",null,[s.createElementVNode("input",{checked:t.isDisable,type:"checkbox",onChange:e[3]||(e[3]=u=>t.missingFilter())},null,40,tL),nL])]),s.createElementVNode("li",null,[s.createElementVNode("label",null,[s.createElementVNode("input",{checked:t.isMatch,disabled:!!t.validated,name:"number_filter",type:"radio",onChange:e[4]||(e[4]=u=>t.matchFilter())},null,40,iL),rL]),s.createElementVNode("label",null,[s.createElementVNode("input",{checked:t.isExclude,disabled:!!t.validated,name:"number_filter",type:"radio",onChange:e[5]||(e[5]=u=>t.excludeFilter())},null,40,aL),oL])])])):s.createCommentVNode("",!0)])])}var ML=Ue(ZT,[["render",sL]]),Nx="";const uL={class:"password__panel"},lL=["placeholder","type"],cL={class:"icon is-right"},gL={key:0,class:"password__tooltip"};var NL=Ue(s.defineComponent({__name:"PasswordField",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},tipChars:{type:String,default:"12 Characters"},tipNumbers:{type:String,default:"Numbers"},tipSymbols:{type:String,default:"Symbols"},passwordTooltipDisabled:{type:Boolean,default:!1}},emits:["submit","update:modelValue"],setup(t,{emit:e}){const n=t,i=s.ref(""),r=s.ref(!1),a=s.ref(!1),o=s.ref(!1),M=s.ref(!1),u=s.ref(!1),l=s.ref(!1);function c(){e("submit",i.value),e("update:modelValue",i.value)}function g(){r.value=!0,l.value=!0}function y(){r.value=!1,l.value=!1}function j(){u.value=!u.value}return s.onMounted(()=>()=>i.value=n.modelValue||""),s.watch(n,()=>(i.value=n.modelValue||"",a.value=i.value.length>11,o.value=/\d/.test(i.value),M.value=/[!@#$%^&*)(+=._-]/.test(i.value))),(I,D)=>(s.openBlock(),s.createElementBlock("div",uL,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":D[0]||(D[0]=d=>i.value=d),class:"form__input password__panel_input","data-e2e":"password-input",placeholder:n.placeholder,type:u.value?"text":"password",onFocus:g,onFocusout:y,onKeyup:c},null,40,lL),[[s.vModelDynamic,i.value]]),s.createElementVNode("button",{class:"password__panel_button",type:"button",onClick:j},[s.createElementVNode("span",cL,[s.createVNode(Ce,{active:l.value,"icon-name":u.value?"invisible":"visible",size:20},null,8,["active","icon-name"])])]),r.value&&!n.passwordTooltipDisabled?(s.openBlock(),s.createElementBlock("div",gL,[s.createElementVNode("p",{class:s.normalizeClass(["password__tooltip_text",a.value?"password__tooltip_text--valid":""])},[s.createVNode(Ce,{class:s.normalizeClass(a.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":a.value?"accept":"close",size:16},null,8,["class","icon-name"]),s.createElementVNode("span",null,s.toDisplayString(n.tipChars),1)],2),s.createElementVNode("p",{class:s.normalizeClass(["password__tooltip_text",o.value?"password__tooltip_text--valid":""])},[s.createVNode(Ce,{class:s.normalizeClass(o.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":o.value?"accept":"close",size:16},null,8,["class","icon-name"]),s.createElementVNode("span",null,s.toDisplayString(n.tipNumbers),1)],2),s.createElementVNode("p",{class:s.normalizeClass(["password__tooltip_text",M.value?"password__tooltip_text--valid":""])},[s.createVNode(Ce,{class:s.normalizeClass(M.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":M.value?"accept":"close",size:16},null,8,["class","icon-name"]),s.createElementVNode("span",null,s.toDisplayString(n.tipSymbols),1)],2)])):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3ae35090"]]),jx="";const yL={class:"radio"},jL=["for"],IL=["id","type","value"],dL={class:"radio__label_txt"};var yg=Ue({__name:"RadioBox",props:{type:{type:String,default:"radio"},value:{type:String,required:!0},label:{type:String,required:!0}},emits:["clickBox"],setup(t,{emit:e}){return(n,i)=>(s.openBlock(),s.createElementBlock("div",yL,[s.createElementVNode("label",{class:"radio__label",for:t.value},[s.createElementVNode("input",{id:t.value,class:"radio__input",name:"radiobox",type:t.type,value:t.value,onClick:i[0]||(i[0]=r=>e("clickBox"))},null,8,IL),s.createElementVNode("span",dL,s.toDisplayString(t.label),1)],8,jL)]))}},[["__scopeId","data-v-29696bd5"]]),dx="";const DL={__name:"RadioBoxGroup",props:{orientation:{type:String,default:"horizontal"},type:{type:String,default:"radio"},list:{type:Array,required:!0}},setup(t){const e=s.ref(null);function n(){const i=document.querySelectorAll("input");for(let r=0;r<i.length;r++)i[r].checked?i[r].parentNode.parentNode.classList.add("radio--checked"):i[r].parentNode.parentNode.classList.remove("radio--checked")}return(i,r)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["radio__grp",t.orientation==="vertical"?"radio__vertical":"radio__horizontal"])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.list,a=>(s.openBlock(),s.createBlock(yg,{key:a.key,ref_for:!0,ref_key:"boxes",ref:e,label:a.label,type:t.type,value:a.value,onClickBox:n},null,8,["label","type","value"]))),128))],2))}};var Dx="";const fL={class:"search-panel"},hL=["placeholder"];var mL=Ue(s.defineComponent({__name:"SearchInput",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""}},emits:["submit","clean","update:modelValue"],setup(t,{emit:e}){const n=t,i=s.ref("");function r(){e("submit",i.value),e("update:modelValue",i.value)}function a(){i.value="",e("clean"),e("update:modelValue",i.value)}return s.onMounted(()=>()=>i.value=n.modelValue||""),s.watch(n,()=>i.value=n.modelValue||""),(o,M)=>(s.openBlock(),s.createElementBlock("div",fL,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":M[0]||(M[0]=u=>i.value=u),class:"form-input search-panel-input","data-e2e":"search-input",placeholder:n.placeholder,onKeyup:r},null,40,hL),[[s.vModelText,i.value]]),i.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("button",{key:0,class:"search-panel-button","data-e2e":"search-submit",onClick:r},[s.createVNode(Ce,{active:!0,"icon-name":"search",size:24})])),i.value?(s.openBlock(),s.createElementBlock("button",{key:1,class:"search-panel-button close","data-e2e":"search-close",onClick:a},[s.createVNode(Ce,{class:"icon","icon-name":"close",size:24})])):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-562faa14"]]),hx="";const AL=t=>(s.pushScopeId("data-v-0213b522"),t=t(),s.popScopeId(),t),zL={class:"stepper"},pL=AL(()=>s.createElementVNode("hr",{class:"solid"},null,-1));var TL=Ue(s.defineComponent({__name:"Stepper",props:{maxSteps:{type:Number,default:0},currentStep:{type:Number,default:0}},setup(t){const e=t;function n(){return Array.from(Array(e.maxSteps||0).keys())}return(i,r)=>(s.openBlock(),s.createElementBlock("div",zL,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n(),(a,o)=>(s.openBlock(),s.createElementBlock("div",{key:o,class:"step"},[s.createElementVNode("span",{class:s.normalizeClass(["step-number",{active:a===t.currentStep}])},s.toDisplayString(a+1),3),pL]))),128))]))}}),[["__scopeId","data-v-0213b522"]]);const LL=s.defineComponent({props:{data:{type:Boolean,required:!0,default:!1},label:{type:String,default:"Label"}},data(){return{active:this.data}},emits:["change"],computed:{checkedValue:{get(){return this.data},set(t){this.active=t,this.$emit("change",t)}}}}),xL={class:"dp__options"},OL={class:"dp__options_switch"},SL=s.createElementVNode("span",{class:"dp__options_slider"},null,-1);function bL(t,e,n,i,r,a){return s.openBlock(),s.createElementBlock("div",xL,[s.createElementVNode("span",null,s.toDisplayString(t.label),1),s.createElementVNode("label",OL,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>t.checkedValue=o),name:"switch",type:"checkbox"},null,512),[[s.vModelCheckbox,t.checkedValue]]),SL])])}var EL=Ue(LL,[["render",bL]]);const wL=s.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:Object,default:()=>({placement:"bottom"}),required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let t=this.$refs.main,e=this.$refs[this.target];["right","left"].includes(this.placement)&&(e.style.top=-(((e==null?void 0:e.offsetHeight)-(t==null?void 0:t.offsetHeight))/2)+"px")}}}),CL=["placement","target","tooltipText","trigger"],kL=["id"],_L={class:"text"};function YL(t,e,n,i,r,a){return s.openBlock(),s.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:t.placement,target:t.target,tooltipText:t.tooltipText,trigger:t.trigger,onClick:e[0]||(e[0]=o=>t.trigger=="click"?t.showTooltip():null),onMouseover:e[1]||(e[1]=o=>t.tooltip())},[s.renderSlot(t.$slots,"default"),s.createElementVNode("div",{id:t.target,ref:t.target,class:s.normalizeClass(`tooltiptext ${t.show}`)},[s.createElementVNode("span",_L,s.toDisplayString(t.tooltipText),1)],10,kL)],40,CL)}var QL=Ue(wL,[["render",YL]]),Ax="";const vL={class:"code"};var UL=Ue(s.defineComponent({__name:"VerificationCode",props:{code:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=t,i=s.ref(null),r=s.ref(null),a=s.ref(null),o=s.ref(null),M=s.ref(null),u=s.ref(null);async function l(D){var d,N,f,p,T;switch(D){case 1:break;case 2:(d=i.value)==null||d.focus();break;case 3:(N=r.value)==null||N.focus();break;case 4:(f=a.value)==null||f.focus();break;case 5:(p=o.value)==null||p.focus();break;case 6:(T=M.value)==null||T.focus();break}}async function c(D){var d,N,f,p,T;switch(D){case 1:(d=r.value)==null||d.focus();break;case 2:(N=a.value)==null||N.focus();break;case 3:(f=o.value)==null||f.focus();break;case 4:(p=M.value)==null||p.focus();break;case 5:(T=u.value)==null||T.focus();break}}async function g(D,d){const N=D.key;let f=!0;[{_index:1,nextInput:r},{_index:2,nextInput:a},{_index:3,nextInput:o},{_index:4,nextInput:M},{_index:5,nextInput:u}].forEach(({_index:p,nextInput:T})=>{d===p&&(T.value&&N.match(/^[0-9]+$/)&&T.value.focus({}),f=!1),D.preventDefault()}),N.match(/^[0-9]+$/)&&(D.target.value=N),f&&I()}async function y(D){var N;const d=((N=D.clipboardData)==null?void 0:N.getData("text/plain"))||"";j(d),I()}function j(D){const d=D.replace(/\D/g,"");if(d.length!==6)return;const[N,f,p,T,m,O]=d.split("");i.value&&(i.value.value=N),r.value&&(r.value.value=f),a.value&&(a.value.value=p),o.value&&(o.value.value=T),M.value&&(M.value.value=m),u.value&&(u.value.value=O)}async function I(){var d,N,f,p,T,m;const D=`${(d=i.value)==null?void 0:d.value}${(N=r.value)==null?void 0:N.value}${(f=a.value)==null?void 0:f.value}${(p=o.value)==null?void 0:p.value}${(T=M.value)==null?void 0:T.value}${(m=u.value)==null?void 0:m.value}`;e("submit",D)}return s.onMounted(()=>{n.code&&(j(n.code),I())}),(D,d)=>(s.openBlock(),s.createElementBlock("div",vL,[s.createElementVNode("input",{ref_key:"txtInput1",ref:i,autofocus:"",class:"form-input input-1","data-e2e":"input-1",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[0]||(d[0]=N=>g(N,1)),onKeyup:[d[1]||(d[1]=s.withKeys(N=>l(1),["delete"])),d[2]||(d[2]=s.withKeys(N=>l(1),["left"])),d[3]||(d[3]=s.withKeys(N=>c(1),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput2",ref:r,class:"form-input","data-e2e":"input-2",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[4]||(d[4]=N=>g(N,2)),onKeyup:[d[5]||(d[5]=s.withKeys(N=>l(2),["delete"])),d[6]||(d[6]=s.withKeys(N=>l(2),["left"])),d[7]||(d[7]=s.withKeys(N=>c(2),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput3",ref:a,class:"form-input","data-e2e":"input-3",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[8]||(d[8]=N=>g(N,3)),onKeyup:[d[9]||(d[9]=s.withKeys(N=>l(3),["delete"])),d[10]||(d[10]=s.withKeys(N=>l(3),["left"])),d[11]||(d[11]=s.withKeys(N=>c(3),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput4",ref:o,class:"form-input","data-e2e":"input-4",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[12]||(d[12]=N=>g(N,4)),onKeyup:[d[13]||(d[13]=s.withKeys(N=>l(4),["delete"])),d[14]||(d[14]=s.withKeys(N=>l(4),["left"])),d[15]||(d[15]=s.withKeys(N=>c(4),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput5",ref:M,class:"form-input","data-e2e":"input-5",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[16]||(d[16]=N=>g(N,5)),onKeyup:[d[17]||(d[17]=s.withKeys(N=>l(5),["delete"])),d[18]||(d[18]=s.withKeys(N=>l(5),["left"])),d[19]||(d[19]=s.withKeys(N=>c(5),["right"]))],onPaste:y},null,544),s.createElementVNode("input",{ref_key:"txtInput6",ref:u,class:"form-input","data-e2e":"input-6",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:d[20]||(d[20]=N=>g(N,6)),onKeyup:[d[21]||(d[21]=s.withKeys(N=>l(6),["delete"])),d[22]||(d[22]=s.withKeys(N=>l(6),["left"])),d[23]||(d[23]=s.withKeys(N=>c(6),["right"]))],onPaste:y},null,544)]))}}),[["__scopeId","data-v-7d5513ee"]]);const PL=s.defineComponent({components:{DhIcon:Ce},props:{title:{type:String,default:"Advanced"}},data(){return{isAdvancedSettingsOpen:!1}}}),RL={class:"text-1"},ZL=s.createTextVNode(" Content ");function BL(t,e,n,i,r,a){const o=s.resolveComponent("dh-icon");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",{class:"advanced-panel-header clickable","data-e2e":"expansion-panel-button",onClick:e[0]||(e[0]=M=>t.isAdvancedSettingsOpen=!t.isAdvancedSettingsOpen)},[s.createElementVNode("h4",RL,s.toDisplayString(t.title),1),s.createVNode(o,{class:"icon","icon-name":t.isAdvancedSettingsOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])]),t.isAdvancedSettingsOpen?s.renderSlot(t.$slots,"content",{key:0},()=>[ZL]):s.createCommentVNode("",!0)],64)}var VL=Ue(PL,[["render",BL]]);de.DhAdvancedFilter=Og,de.DhDatePicker=b0,de.DhError=w0,de.DhExpansionPanel=VL,de.DhFileUpload=B0,de.DhIcon=Ce,de.DhModal=F0,de.DhNotification=sm,de.DhNumberRange=ML,de.DhPasswordField=NL,de.DhRadioBox=yg,de.DhRadioBoxGroup=DL,de.DhSearchInput=mL,de.DhStepper=TL,de.DhSwitch=EL,de.DhTooltip=QL,de.DhVerificationCode=UL,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|