scope 0.5.2__tar.gz → 0.5.3__tar.gz
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.
- {scope-0.5.2 → scope-0.5.3}/PKG-INFO +1 -1
- {scope-0.5.2 → scope-0.5.3}/scope/__init__.py +1 -1
- {scope-0.5.2 → scope-0.5.3}/scope/formats.py +19 -1
- {scope-0.5.2 → scope-0.5.3}/scope/writer.py +2 -3
- scope-0.5.2/viewer/dist/assets/index-CJdmJY5V.js → scope-0.5.3/viewer/dist/assets/index-B4vKLOLB.js +1 -1
- scope-0.5.2/viewer/dist/assets/index-BhT_iF0t.css → scope-0.5.3/viewer/dist/assets/index-DlmV1_Hx.css +1 -1
- {scope-0.5.2 → scope-0.5.3}/viewer/dist/index.html +2 -2
- {scope-0.5.2 → scope-0.5.3}/README.md +0 -0
- {scope-0.5.2 → scope-0.5.3}/requirements.txt +0 -0
- {scope-0.5.2 → scope-0.5.3}/scope/reader.py +0 -0
- {scope-0.5.2 → scope-0.5.3}/setup.py +0 -0
- {scope-0.5.2 → scope-0.5.3}/tests/test_float.py +0 -0
- {scope-0.5.2 → scope-0.5.3}/tests/test_image.py +0 -0
- {scope-0.5.2 → scope-0.5.3}/tests/test_video.py +0 -0
- {scope-0.5.2 → scope-0.5.3}/viewer/__init__.py +0 -0
- {scope-0.5.2 → scope-0.5.3}/viewer/__main__.py +0 -0
- {scope-0.5.2 → scope-0.5.3}/viewer/config.py +0 -0
- {scope-0.5.2 → scope-0.5.3}/viewer/dist/assets/material-symbols-DplPX30d.woff2 +0 -0
- {scope-0.5.2 → scope-0.5.3}/viewer/dist/favicon.png +0 -0
- {scope-0.5.2 → scope-0.5.3}/viewer/dist/logo.png +0 -0
- {scope-0.5.2 → scope-0.5.3}/viewer/filesystems.py +0 -0
- {scope-0.5.2 → scope-0.5.3}/viewer/server.py +0 -0
|
@@ -13,7 +13,14 @@ class Float:
|
|
|
13
13
|
return 'float'
|
|
14
14
|
|
|
15
15
|
def valid(self, x):
|
|
16
|
-
|
|
16
|
+
if isinstance(x, (int, float)):
|
|
17
|
+
return True
|
|
18
|
+
if isinstance(x, np.ndarray):
|
|
19
|
+
return x.ndim == 0 and np.isreal(x)
|
|
20
|
+
return False
|
|
21
|
+
|
|
22
|
+
def convert(self, x):
|
|
23
|
+
return np.asarray(x, np.float64)
|
|
17
24
|
|
|
18
25
|
def create(self, path):
|
|
19
26
|
pass
|
|
@@ -40,6 +47,9 @@ class Text:
|
|
|
40
47
|
def valid(self, x):
|
|
41
48
|
return isinstance(x, str)
|
|
42
49
|
|
|
50
|
+
def convert(self, x):
|
|
51
|
+
return x
|
|
52
|
+
|
|
43
53
|
def create(self, path):
|
|
44
54
|
path.mkdir(exist_ok=True)
|
|
45
55
|
|
|
@@ -71,10 +81,14 @@ class Image:
|
|
|
71
81
|
|
|
72
82
|
def valid(self, x):
|
|
73
83
|
return (
|
|
84
|
+
isinstance(x, np.ndarray) and
|
|
74
85
|
x.dtype == np.uint8 and
|
|
75
86
|
x.ndim == 3 and
|
|
76
87
|
x.shape[-1] in (1, 3))
|
|
77
88
|
|
|
89
|
+
def convert(self, x):
|
|
90
|
+
return x
|
|
91
|
+
|
|
78
92
|
def create(self, path):
|
|
79
93
|
path.mkdir(exist_ok=True)
|
|
80
94
|
|
|
@@ -112,10 +126,14 @@ class Video:
|
|
|
112
126
|
|
|
113
127
|
def valid(self, x):
|
|
114
128
|
return (
|
|
129
|
+
isinstance(x, np.ndarray) and
|
|
115
130
|
x.dtype == np.uint8 and
|
|
116
131
|
x.ndim == 4 and
|
|
117
132
|
x.shape[-1] in (1, 3))
|
|
118
133
|
|
|
134
|
+
def convert(self, x):
|
|
135
|
+
return x
|
|
136
|
+
|
|
119
137
|
def create(self, path):
|
|
120
138
|
path.mkdir(exist_ok=True)
|
|
121
139
|
|
|
@@ -37,7 +37,7 @@ class Writer:
|
|
|
37
37
|
self.logdir.mkdir(parents=True, exist_ok=True)
|
|
38
38
|
self.workers = workers
|
|
39
39
|
self.rng = np.random.default_rng(seed=None)
|
|
40
|
-
self.fmts =
|
|
40
|
+
self.fmts = formats
|
|
41
41
|
self.cols = {}
|
|
42
42
|
if workers:
|
|
43
43
|
self.pool = concurrent.futures.ThreadPoolExecutor(workers, 'scope')
|
|
@@ -48,8 +48,6 @@ class Writer:
|
|
|
48
48
|
step = int(step)
|
|
49
49
|
mapping = dict(*args, **kwargs)
|
|
50
50
|
for key, value in mapping.items():
|
|
51
|
-
if not isinstance(value, str):
|
|
52
|
-
value = np.asarray(value)
|
|
53
51
|
if key not in self.cols:
|
|
54
52
|
assert re.match(r'[a-z0-9_]+(/[a-z0-9_]+)?', key), key
|
|
55
53
|
for fmt in self.fmts:
|
|
@@ -64,6 +62,7 @@ class Writer:
|
|
|
64
62
|
if not col.fmt.valid(value):
|
|
65
63
|
raise ValueError(
|
|
66
64
|
f"Key '{key}' contains invalid value {self._info(value)}")
|
|
65
|
+
value = col.fmt.convert(value)
|
|
67
66
|
col.steps.append(step)
|
|
68
67
|
col.values.append(value)
|
|
69
68
|
|
scope-0.5.2/viewer/dist/assets/index-CJdmJY5V.js → scope-0.5.3/viewer/dist/assets/index-B4vKLOLB.js
RENAMED
|
@@ -31,4 +31,4 @@ var Xu=Object.defineProperty;var qu=(e,t,s)=>t in e?Xu(e,t,{enumerable:!0,config
|
|
|
31
31
|
* Released under the MIT License
|
|
32
32
|
*/class nm{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,s,n,i){const o=s.listeners[i],r=s.duration;o.forEach(a=>a({chart:t,initial:s.initial,numSteps:r,currentStep:Math.min(n-s.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=pu.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let s=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const o=n.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),o.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),s+=o.length}),this._lastDate=t,s===0&&(this._running=!1)}_getAnims(t){const s=this._charts;let n=s.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},s.set(t,n)),n}listen(t,s,n){this._getAnims(t).listeners[s].push(n)}add(t,s){!s||!s.length||this._getAnims(t).items.push(...s)}has(t){return this._getAnims(t).items.length>0}start(t){const s=this._charts.get(t);s&&(s.running=!0,s.start=Date.now(),s.duration=s.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const s=this._charts.get(t);return!(!s||!s.running||!s.items.length)}stop(t){const s=this._charts.get(t);if(!s||!s.items.length)return;const n=s.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();s.items=[],this._notify(t,s,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ve=new nm;const Ga="transparent",im={boolean(e,t,s){return s>.5?t:e},color(e,t,s){const n=Va(e||Ga),i=n.valid&&Va(t||Ga);return i&&i.valid?i.mix(n,s).hexString():t},number(e,t,s){return e+(t-e)*s}};class om{constructor(t,s,n,i){const o=s[n];i=Yn([t.to,i,o,t.from]);const r=Yn([t.from,o,i]);this._active=!0,this._fn=t.fn||im[t.type||typeof r],this._easing=pn[t.easing]||pn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=s,this._prop=n,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(t,s,n){if(this._active){this._notify(!1);const i=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Yn([t.to,s,i,t.from]),this._from=Yn([t.from,i,s])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const s=t-this._start,n=this._duration,i=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||s<n),!this._active){this._target[i]=a,this._notify(!0);return}if(s<0){this._target[i]=o;return}l=s/n%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((s,n)=>{t.push({res:s,rej:n})})}_notify(t){const s=t?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][s]()}}class Au{constructor(t,s){this._chart=t,this._properties=new Map,this.configure(s)}configure(t){if(!tt(t))return;const s=Object.keys(vt.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!tt(o))return;const r={};for(const a of s)r[a]=o[a];(St(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!n.has(a))&&n.set(a,r)})})}_animateOptions(t,s){const n=s.options,i=am(t,n);if(!i)return[];const o=this._createAnimations(i,n);return n.$shared&&rm(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,s){const n=this._properties,i=[],o=t.$animations||(t.$animations={}),r=Object.keys(s),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,s));continue}const u=s[c];let f=o[c];const h=n.get(c);if(f)if(h&&f.active()){f.update(h,u,a);continue}else f.cancel();if(!h||!h.duration){t[c]=u;continue}o[c]=f=new om(h,t,c,u),i.push(f)}return i}update(t,s){if(this._properties.size===0){Object.assign(t,s);return}const n=this._createAnimations(t,s);if(n.length)return ve.add(this._chart,n),!0}}function rm(e,t){const s=[],n=Object.keys(t);for(let i=0;i<n.length;i++){const o=e[n[i]];o&&o.active()&&s.push(o.wait())}return Promise.all(s)}function am(e,t){if(!t)return;let s=e.options;if(!s){e.options=t;return}return s.$shared&&(e.options=s=Object.assign({},s,{$shared:!1,$animations:{}})),s}function Za(e,t){const s=e&&e.options||{},n=s.reverse,i=s.min===void 0?t:0,o=s.max===void 0?t:0;return{start:n?o:i,end:n?i:o}}function lm(e,t,s){if(s===!1)return!1;const n=Za(e,s),i=Za(t,s);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function cm(e){let t,s,n,i;return tt(e)?(t=e.top,s=e.right,n=e.bottom,i=e.left):t=s=n=i=e,{top:t,right:s,bottom:n,left:i,disabled:e===!1}}function Du(e,t){const s=[],n=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=n.length;i<o;++i)s.push(n[i].index);return s}function Ja(e,t,s,n={}){const i=e.keys,o=n.mode==="single";let r,a,l,c;if(t!==null){for(r=0,a=i.length;r<a;++r){if(l=+i[r],l===s){if(n.all)continue;break}c=e.values[l],It(c)&&(o||t===0||be(t)===be(c))&&(t+=c)}return t}}function um(e,t){const{iScale:s,vScale:n}=t,i=s.axis==="x"?"x":"y",o=n.axis==="x"?"x":"y",r=Object.keys(e),a=new Array(r.length);let l,c,u;for(l=0,c=r.length;l<c;++l)u=r[l],a[l]={[i]:u,[o]:e[u]};return a}function vo(e,t){const s=e&&e.options.stacked;return s||s===void 0&&t.stack!==void 0}function fm(e,t,s){return`${e.id}.${t.id}.${s.stack||s.type}`}function hm(e){const{min:t,max:s,minDefined:n,maxDefined:i}=e.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:i?s:Number.POSITIVE_INFINITY}}function dm(e,t,s){const n=e[t]||(e[t]={});return n[s]||(n[s]={})}function Qa(e,t,s,n){for(const i of t.getMatchingVisibleMetas(n).reverse()){const o=e[i.index];if(s&&o>0||!s&&o<0)return i.index}return null}function tl(e,t){const{chart:s,_cachedMeta:n}=e,i=s._stacks||(s._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,u=fm(o,r,n),f=t.length;let h;for(let d=0;d<f;++d){const m=t[d],{[l]:p,[c]:_}=m,v=m._stacks||(m._stacks={});h=v[c]=dm(i,u,p),h[a]=_,h._top=Qa(h,r,!0,n.type),h._bottom=Qa(h,r,!1,n.type);const S=h._visualValues||(h._visualValues={});S[a]=_}}function wo(e,t){const s=e.scales;return Object.keys(s).filter(n=>s[n].axis===t).shift()}function pm(e,t){return Ms(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function gm(e,t,s){return Ms(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:s,index:t,mode:"default",type:"data"})}function Ys(e,t){const s=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[n]===void 0||o[n][s]===void 0)return;delete o[n][s],o[n]._visualValues!==void 0&&o[n]._visualValues[s]!==void 0&&delete o[n]._visualValues[s]}}}const So=e=>e==="reset"||e==="none",el=(e,t)=>t?e:Object.assign({},e),mm=(e,t,s)=>e&&!t.hidden&&t._stacked&&{keys:Du(s,!0),values:null};class ys{constructor(t,s){this.chart=t,this._ctx=t.ctx,this.index=s,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=vo(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ys(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,s=this._cachedMeta,n=this.getDataset(),i=(f,h,d,m)=>f==="x"?h:f==="r"?m:d,o=s.xAxisID=lt(n.xAxisID,wo(t,"x")),r=s.yAxisID=lt(n.yAxisID,wo(t,"y")),a=s.rAxisID=lt(n.rAxisID,wo(t,"r")),l=s.indexAxis,c=s.iAxisID=i(l,o,r,a),u=s.vAxisID=i(l,r,o,a);s.xScale=this.getScaleForId(o),s.yScale=this.getScaleForId(r),s.rScale=this.getScaleForId(a),s.iScale=this.getScaleForId(c),s.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const s=this._cachedMeta;return t===s.iScale?s.vScale:s.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Fa(this._data,this),t._stacked&&Ys(t)}_dataCheck(){const t=this.getDataset(),s=t.data||(t.data=[]),n=this._data;if(tt(s)){const i=this._cachedMeta;this._data=um(s,i)}else if(n!==s){if(n){Fa(n,this);const i=this._cachedMeta;Ys(i),i._parsed=[]}s&&Object.isExtensible(s)&&Jp(s,this),this._syncList=[],this._data=s}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const s=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const o=s._stacked;s._stacked=vo(s.vScale,s),s.stack!==n.stack&&(i=!0,Ys(s),s.stack=n.stack),this._resyncElements(t),(i||o!==s._stacked)&&(tl(this,s._parsed),s._stacked=vo(s.vScale,s))}configure(){const t=this.chart.config,s=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),s,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,s){const{_cachedMeta:n,_data:i}=this,{iScale:o,_stacked:r}=n,a=o.axis;let l=t===0&&s===i.length?!0:n._sorted,c=t>0&&n._parsed[t-1],u,f,h;if(this._parsing===!1)n._parsed=i,n._sorted=!0,h=i;else{St(i[t])?h=this.parseArrayData(n,i,t,s):tt(i[t])?h=this.parseObjectData(n,i,t,s):h=this.parsePrimitiveData(n,i,t,s);const d=()=>f[a]===null||c&&f[a]<c[a];for(u=0;u<s;++u)n._parsed[u+t]=f=h[u],l&&(d()&&(l=!1),c=f);n._sorted=l}r&&tl(this,h)}parsePrimitiveData(t,s,n,i){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),u=o===r,f=new Array(i);let h,d,m;for(h=0,d=i;h<d;++h)m=h+n,f[h]={[a]:u||o.parse(c[m],m),[l]:r.parse(s[m],m)};return f}parseArrayData(t,s,n,i){const{xScale:o,yScale:r}=t,a=new Array(i);let l,c,u,f;for(l=0,c=i;l<c;++l)u=l+n,f=s[u],a[l]={x:o.parse(f[0],u),y:r.parse(f[1],u)};return a}parseObjectData(t,s,n,i){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,f,h,d;for(u=0,f=i;u<f;++u)h=u+n,d=s[h],c[u]={x:o.parse(Bs(d,a),h),y:r.parse(Bs(d,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,s,n){const i=this.chart,o=this._cachedMeta,r=s[t.axis],a={keys:Du(i,!0),values:s._stacks[t.axis]._visualValues};return Ja(a,r,o.index,{mode:n})}updateRangeFromParsed(t,s,n,i){const o=n[s.axis];let r=o===null?NaN:o;const a=i&&n._stacks[s.axis];i&&a&&(i.values=a,r=Ja(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,s){const n=this._cachedMeta,i=n._parsed,o=n._sorted&&t===n.iScale,r=i.length,a=this._getOtherScale(t),l=mm(s,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=hm(a);let h,d;function m(){d=i[h];const p=d[a.axis];return!It(d[t.axis])||u>p||f<p}for(h=0;h<r&&!(!m()&&(this.updateRangeFromParsed(c,t,d,l),o));++h);if(o){for(h=r-1;h>=0;--h)if(!m()){this.updateRangeFromParsed(c,t,d,l);break}}return c}getAllParsedValues(t){const s=this._cachedMeta._parsed,n=[];let i,o,r;for(i=0,o=s.length;i<o;++i)r=s[i][t.axis],It(r)&&n.push(r);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const s=this._cachedMeta,n=s.iScale,i=s.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const s=this._cachedMeta;this.update(t||"default"),s._clip=cm(lt(this.options.clip,lm(s.xScale,s.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,s=this.chart,n=this._cachedMeta,i=n.data||[],o=s.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(n.dataset&&n.dataset.draw(t,o,a,l),u=a;u<a+l;++u){const f=i[u];f.hidden||(f.active&&c?r.push(f):f.draw(t,o))}for(u=0;u<r.length;++u)r[u].draw(t,o)}getStyle(t,s){const n=s?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,s,n){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=gm(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=pm(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!s,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,s){return this._resolveElementOptions(this.dataElementType.id,s,t)}_resolveElementOptions(t,s="default",n){const i=s==="active",o=this._cachedDataOpts,r=t+"-"+s,a=o[r],l=this.enableOptionSharing&&Tn(n);if(a)return el(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),f=i?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),u),d=Object.keys(vt.elements[t]),m=()=>this.getContext(n,i,s),p=c.resolveNamedOptions(h,d,m,f);return p.$shared&&(p.$shared=l,o[r]=Object.freeze(el(p,l))),p}_resolveAnimations(t,s,n){const i=this.chart,o=this._cachedDataOpts,r=`animation-${s}`,a=o[r];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,s),h=u.getOptionScopes(this.getDataset(),f);l=u.createResolver(h,this.getContext(t,n,s))}const c=new Au(i,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,s){return!s||So(t)||this.chart._animationsDisabled}_getSharedOptions(t,s){const n=this.resolveDataElementOptions(t,s),i=this._sharedOptions,o=this.getSharedOptions(n),r=this.includeOptions(s,o)||o!==i;return this.updateSharedOptions(o,s,n),{sharedOptions:o,includeOptions:r}}updateElement(t,s,n,i){So(i)?Object.assign(t,n):this._resolveAnimations(s,i).update(t,n)}updateSharedOptions(t,s,n){t&&!So(s)&&this._resolveAnimations(void 0,s).update(t,n)}_setStyle(t,s,n,i){t.active=i;const o=this.getStyle(s,i);this._resolveAnimations(s,n,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,s,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,s,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const s=this._data,n=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=n.length,o=s.length,r=Math.min(o,i);r&&this.parse(0,r),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,s,n=!0){const i=this._cachedMeta,o=i.data,r=t+s;let a;const l=c=>{for(c.length+=s,a=c.length-1;a>=r;a--)c[a]=c[a-s]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,s),n&&this.updateElements(o,t,s,"reset")}updateElements(t,s,n,i){}_removeElements(t,s){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,s);n._stacked&&Ys(n,i)}n.data.splice(t,s)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[s,n,i]=t;this[s](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,s){s&&this._sync(["_removeElements",t,s]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}$(ys,"defaults",{}),$(ys,"datasetElementType",null),$(ys,"dataElementType",null);function bm(e,t){if(!e._cache.$bar){const s=e.getMatchingVisibleMetas(t);let n=[];for(let i=0,o=s.length;i<o;i++)n=n.concat(s[i].controller.getAllParsedValues(e));e._cache.$bar=du(n.sort((i,o)=>i-o))}return e._cache.$bar}function _m(e){const t=e.iScale,s=bm(t,e.type);let n=t._length,i,o,r,a;const l=()=>{r===32767||r===-32768||(Tn(a)&&(n=Math.min(n,Math.abs(r-a)||n)),a=r)};for(i=0,o=s.length;i<o;++i)r=t.getPixelForValue(s[i]),l();for(a=void 0,i=0,o=t.ticks.length;i<o;++i)r=t.getPixelForTick(i),l();return n}function xm(e,t,s,n){const i=s.barThickness;let o,r;return ct(i)?(o=t.min*s.categoryPercentage,r=s.barPercentage):(o=i*n,r=1),{chunk:o/n,ratio:r,start:t.pixels[e]-o/2}}function ym(e,t,s,n){const i=t.pixels,o=i[e];let r=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const l=s.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:s.barPercentage,start:c}}function vm(e,t,s,n){const i=s.parse(e[0],n),o=s.parse(e[1],n),r=Math.min(i,o),a=Math.max(i,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[s.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:r,max:a}}function Eu(e,t,s,n){return St(e)?vm(e,t,s,n):t[s.axis]=s.parse(e,n),t}function sl(e,t,s,n){const i=e.iScale,o=e.vScale,r=i.getLabels(),a=i===o,l=[];let c,u,f,h;for(c=s,u=s+n;c<u;++c)h=t[c],f={},f[i.axis]=a||i.parse(r[c],c),l.push(Eu(h,f,o,c));return l}function Mo(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function wm(e,t,s){return e!==0?be(e):(t.isHorizontal()?1:-1)*(t.min>=s?1:-1)}function Sm(e){let t,s,n,i,o;return e.horizontal?(t=e.base>e.x,s="left",n="right"):(t=e.base<e.y,s="bottom",n="top"),t?(i="end",o="start"):(i="start",o="end"),{start:s,end:n,reverse:t,top:i,bottom:o}}function Mm(e,t,s,n){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:u}=Sm(e);i==="middle"&&s&&(e.enableBorderRadius=!0,(s._top||0)===n?i=c:(s._bottom||0)===n?i=u:(o[nl(u,r,a,l)]=!0,i=c)),o[nl(i,r,a,l)]=!0,e.borderSkipped=o}function nl(e,t,s,n){return n?(e=km(e,t,s),e=il(e,s,t)):e=il(e,t,s),e}function km(e,t,s){return e===t?s:e===s?t:e}function il(e,t,s){return e==="start"?t:e==="end"?s:e}function Cm(e,{inflateAmount:t},s){e.inflateAmount=t==="auto"?s===1?.33:0:t}class hi extends ys{parsePrimitiveData(t,s,n,i){return sl(t,s,n,i)}parseArrayData(t,s,n,i){return sl(t,s,n,i)}parseObjectData(t,s,n,i){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,u=r.axis==="x"?a:l,f=[];let h,d,m,p;for(h=n,d=n+i;h<d;++h)p=s[h],m={},m[o.axis]=o.parse(Bs(p,c),h),f.push(Eu(Bs(p,u),m,r,h));return f}updateRangeFromParsed(t,s,n,i){super.updateRangeFromParsed(t,s,n,i);const o=n._custom;o&&s===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const s=this._cachedMeta,{iScale:n,vScale:i}=s,o=this.getParsed(t),r=o._custom,a=Mo(r)?"["+r.start+", "+r.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const s=this._cachedMeta;this.updateElements(s.data,0,s.data.length,t)}updateElements(t,s,n,i){const o=i==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(s,i);for(let d=s;d<s+n;d++){const m=this.getParsed(d),p=o||ct(m[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(d),_=this._calculateBarIndexPixels(d,u),v=(m._stacks||{})[a.axis],S={horizontal:c,base:p.base,enableBorderRadius:!v||Mo(m._custom)||r===v._top||r===v._bottom,x:c?p.head:_.center,y:c?_.center:p.head,height:c?_.size:Math.abs(p.size),width:c?Math.abs(p.size):_.size};h&&(S.options=f||this.resolveDataElementOptions(d,t[d].active?"active":i));const w=S.options||t[d].options;Mm(S,w,v,r),Cm(S,w,u.ratio),this.updateElement(t[d],d,S,i)}}_getStacks(t,s){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=n.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(s),l=a&&a[n.axis],c=u=>{const f=u._parsed.find(d=>d[n.axis]===l),h=f&&f[u.vScale.axis];if(ct(h)||isNaN(h))return!0};for(const u of i)if(!(s!==void 0&&c(u))&&((o===!1||r.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&r.push(u.stack),u.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,s,n){const i=this._getStacks(t,n),o=s!==void 0?i.indexOf(s):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,s=this._cachedMeta,n=s.iScale,i=[];let o,r;for(o=0,r=s.data.length;o<r;++o)i.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const a=t.barThickness;return{min:a||_m(s),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:s,_stacked:n,index:i},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,u=Mo(c);let f=l[s.axis],h=0,d=n?this.applyStack(s,l,n):f,m,p;d!==f&&(h=d-f,d=f),u&&(f=c.barStart,d=c.barEnd-c.barStart,f!==0&&be(f)!==be(c.barEnd)&&(h=0),h+=f);const _=!ct(o)&&!u?o:h;let v=s.getPixelForValue(_);if(this.chart.getDataVisibility(t)?m=s.getPixelForValue(h+d):m=v,p=m-v,Math.abs(p)<r){p=wm(p,s,a)*r,f===a&&(v-=p/2);const S=s.getPixelForDecimal(0),w=s.getPixelForDecimal(1),y=Math.min(S,w),x=Math.max(S,w);v=Math.max(Math.min(v,x),y),m=v+p,n&&!u&&(l._stacks[s.axis]._visualValues[i]=s.getValueForPixel(m)-s.getValueForPixel(v))}if(v===s.getPixelForValue(a)){const S=be(p)*s.getLineWidthForValue(a)/2;v+=S,p-=S}return{size:p,base:v,head:m,center:m+p/2}}_calculateBarIndexPixels(t,s){const n=s.scale,i=this.options,o=i.skipNull,r=lt(i.maxBarThickness,1/0);let a,l;if(s.grouped){const c=o?this._getStackCount(t):s.stackCount,u=i.barThickness==="flex"?ym(t,s,i,c):xm(t,s,i,c),f=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=u.start+u.chunk*f+u.chunk/2,l=Math.min(r,u.chunk*u.ratio)}else a=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(r,s.min*s.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,s=t.vScale,n=t.data,i=n.length;let o=0;for(;o<i;++o)this.getParsed(o)[s.axis]!==null&&!n[o].hidden&&n[o].draw(this._ctx)}}$(hi,"id","bar"),$(hi,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),$(hi,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class di extends ys{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const s=this._cachedMeta,{dataset:n,data:i=[],_dataset:o}=s,r=this.chart._animationsDisabled;let{start:a,count:l}=bu(s,i,r);this._drawStart=a,this._drawCount=l,_u(s)&&(a=0,l=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,s,n,i){const o=i==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(s,i),h=r.axis,d=a.axis,{spanGaps:m,segment:p}=this.options,_=Vs(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||i==="none",S=s+n,w=t.length;let y=s>0&&this.getParsed(s-1);for(let x=0;x<w;++x){const k=t[x],C=v?k:{};if(x<s||x>=S){C.skip=!0;continue}const P=this.getParsed(x),E=ct(P[d]),B=C[h]=r.getPixelForValue(P[h],x),N=C[d]=o||E?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,P,l):P[d],x);C.skip=isNaN(B)||isNaN(N)||E,C.stop=x>0&&Math.abs(P[h]-y[h])>_,p&&(C.parsed=P,C.raw=c.data[x]),f&&(C.options=u||this.resolveDataElementOptions(x,k.active?"active":i)),v||this.updateElement(k,x,C,i),y=P}}getMaxOverflow(){const t=this._cachedMeta,s=t.dataset,n=s.options&&s.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const o=i[0].size(this.resolveDataElementOptions(0)),r=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}$(di,"id","line"),$(di,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),$(di,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class pi extends ys{getLabelAndValue(t){const s=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:o}=s,r=this.getParsed(t),a=i.getLabelForValue(r.x),l=o.getLabelForValue(r.y);return{label:n[t]||"",value:"("+a+", "+l+")"}}update(t){const s=this._cachedMeta,{data:n=[]}=s,i=this.chart._animationsDisabled;let{start:o,count:r}=bu(s,n,i);if(this._drawStart=o,this._drawCount=r,_u(s)&&(o=0,r=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=s;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=n;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},t)}else this.datasetElementType&&(delete s.dataset,this.datasetElementType=!1);this.updateElements(n,o,r,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,s,n,i){const o=i==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(s,i),f=this.getSharedOptions(u),h=this.includeOptions(i,f),d=r.axis,m=a.axis,{spanGaps:p,segment:_}=this.options,v=Vs(p)?p:Number.POSITIVE_INFINITY,S=this.chart._animationsDisabled||o||i==="none";let w=s>0&&this.getParsed(s-1);for(let y=s;y<s+n;++y){const x=t[y],k=this.getParsed(y),C=S?x:{},P=ct(k[m]),E=C[d]=r.getPixelForValue(k[d],y),B=C[m]=o||P?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[m],y);C.skip=isNaN(E)||isNaN(B)||P,C.stop=y>0&&Math.abs(k[d]-w[d])>v,_&&(C.parsed=k,C.raw=c.data[y]),h&&(C.options=f||this.resolveDataElementOptions(y,x.active?"active":i)),S||this.updateElement(x,y,C,i),w=k}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const t=this._cachedMeta,s=t.data||[];if(!this.options.showLine){let a=0;for(let l=s.length-1;l>=0;--l)a=Math.max(a,s[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!s.length)return i;const o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,o,r)/2}}$(pi,"id","scatter"),$(pi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),$(pi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function fs(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Nr{constructor(t){$(this,"options");this.options=t||{}}static override(t){Object.assign(Nr.prototype,t)}init(){}formats(){return fs()}parse(){return fs()}format(){return fs()}add(){return fs()}diff(){return fs()}startOf(){return fs()}endOf(){return fs()}}var Tm={_date:Nr};function Pm(e,t,s,n){const{controller:i,data:o,_sorted:r}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?Gp:bs;if(n){if(i._sharedOptions){const c=o[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const f=l(o,t,s-u),h=l(o,t,s+u);return{lo:f.lo,hi:h.hi}}}}else return l(o,t,s)}return{lo:0,hi:o.length-1}}function zn(e,t,s,n,i){const o=e.getSortedVisibleDatasetMetas(),r=s[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:f,hi:h}=Pm(o[a],t,r,i);for(let d=f;d<=h;++d){const m=u[d];m.skip||n(m,c,d)}}}function Om(e){const t=e.indexOf("x")!==-1,s=e.indexOf("y")!==-1;return function(n,i){const o=t?Math.abs(n.x-i.x):0,r=s?Math.abs(n.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function ko(e,t,s,n,i){const o=[];return!i&&!e.isPointInArea(t)||zn(e,s,t,function(a,l,c){!i&&!Pn(a,e.chartArea,0)||a.inRange(t.x,t.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Am(e,t,s,n){let i=[];function o(r,a,l){const{startAngle:c,endAngle:u}=r.getProps(["startAngle","endAngle"],n),{angle:f}=Yp(r,{x:t.x,y:t.y});fu(f,c,u)&&i.push({element:r,datasetIndex:a,index:l})}return zn(e,s,t,o),i}function Dm(e,t,s,n,i,o){let r=[];const a=Om(s);let l=Number.POSITIVE_INFINITY;function c(u,f,h){const d=u.inRange(t.x,t.y,i);if(n&&!d)return;const m=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(m))&&!d)return;const _=a(t,m);_<l?(r=[{element:u,datasetIndex:f,index:h}],l=_):_===l&&r.push({element:u,datasetIndex:f,index:h})}return zn(e,s,t,c),r}function Co(e,t,s,n,i,o){return!o&&!e.isPointInArea(t)?[]:s==="r"&&!n?Am(e,t,s,i):Dm(e,t,s,n,i,o)}function ol(e,t,s,n,i){const o=[],r=s==="x"?"inXRange":"inYRange";let a=!1;return zn(e,s,t,(l,c,u)=>{l[r]&&l[r](t[s],i)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),n&&!a?[]:o}var Em={evaluateInteractionItems:zn,modes:{index(e,t,s,n){const i=de(t,e),o=s.axis||"x",r=s.includeInvisible||!1,a=s.intersect?ko(e,i,o,n,r):Co(e,i,o,!1,n,r),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,f=c.data[u];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,s,n){const i=de(t,e),o=s.axis||"xy",r=s.includeInvisible||!1;let a=s.intersect?ko(e,i,o,n,r):Co(e,i,o,!1,n,r);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,s,n){const i=de(t,e),o=s.axis||"xy",r=s.includeInvisible||!1;return ko(e,i,o,n,r)},nearest(e,t,s,n){const i=de(t,e),o=s.axis||"xy",r=s.includeInvisible||!1;return Co(e,i,o,s.intersect,n,r)},x(e,t,s,n){const i=de(t,e);return ol(e,i,"x",s.intersect,n)},y(e,t,s,n){const i=de(t,e);return ol(e,i,"y",s.intersect,n)}}};const Iu=["left","top","right","bottom"];function Xs(e,t){return e.filter(s=>s.pos===t)}function rl(e,t){return e.filter(s=>Iu.indexOf(s.pos)===-1&&s.box.axis===t)}function qs(e,t){return e.sort((s,n)=>{const i=t?n:s,o=t?s:n;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function Im(e){const t=[];let s,n,i,o,r,a;for(s=0,n=(e||[]).length;s<n;++s)i=e[s],{position:o,options:{stack:r,stackWeight:a=1}}=i,t.push({index:s,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:r&&o+r,stackWeight:a});return t}function Rm(e){const t={};for(const s of e){const{stack:n,pos:i,stackWeight:o}=s;if(!n||!Iu.includes(i))continue;const r=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function Lm(e,t){const s=Rm(e),{vBoxMaxWidth:n,hBoxMaxHeight:i}=t;let o,r,a;for(o=0,r=e.length;o<r;++o){a=e[o];const{fullSize:l}=a.box,c=s[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*n:l&&t.availableWidth,a.height=i):(a.width=n,a.height=u?u*i:l&&t.availableHeight)}return s}function Fm(e){const t=Im(e),s=qs(t.filter(c=>c.box.fullSize),!0),n=qs(Xs(t,"left"),!0),i=qs(Xs(t,"right")),o=qs(Xs(t,"top"),!0),r=qs(Xs(t,"bottom")),a=rl(t,"x"),l=rl(t,"y");return{fullSize:s,leftAndTop:n.concat(o),rightAndBottom:i.concat(l).concat(r).concat(a),chartArea:Xs(t,"chartArea"),vertical:n.concat(i).concat(l),horizontal:o.concat(r).concat(a)}}function al(e,t,s,n){return Math.max(e[s],t[s])+Math.max(e[n],t[n])}function Ru(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function zm(e,t,s,n){const{pos:i,box:o}=s,r=e.maxPadding;if(!tt(i)){s.size&&(e[i]-=s.size);const f=n[s.stack]||{size:0,count:1};f.size=Math.max(f.size,s.horizontal?o.height:o.width),s.size=f.size/f.count,e[i]+=s.size}o.getPadding&&Ru(r,o.getPadding());const a=Math.max(0,t.outerWidth-al(r,e,"left","right")),l=Math.max(0,t.outerHeight-al(r,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,s.horizontal?{same:c,other:u}:{same:u,other:c}}function Bm(e){const t=e.maxPadding;function s(n){const i=Math.max(t[n]-e[n],0);return e[n]+=i,i}e.y+=s("top"),e.x+=s("left"),s("right"),s("bottom")}function Vm(e,t){const s=t.maxPadding;function n(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(r=>{o[r]=Math.max(t[r],s[r])}),o}return n(e?["left","right"]:["top","bottom"])}function sn(e,t,s,n){const i=[];let o,r,a,l,c,u;for(o=0,r=e.length,c=0;o<r;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,Vm(a.horizontal,t));const{same:f,other:h}=zm(t,s,a,n);c|=f&&i.length,u=u||h,l.fullSize||i.push(a)}return c&&sn(i,t,s,n)||u}function Gn(e,t,s,n,i){e.top=s,e.left=t,e.right=t+n,e.bottom=s+i,e.width=n,e.height=i}function ll(e,t,s,n){const i=s.padding;let{x:o,y:r}=t;for(const a of e){const l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const f=t.w*u,h=c.size||l.height;Tn(c.start)&&(r=c.start),l.fullSize?Gn(l,i.left,r,s.outerWidth-i.right-i.left,h):Gn(l,t.left+c.placed,r,f,h),c.start=r,c.placed+=f,r=l.bottom}else{const f=t.h*u,h=c.size||l.width;Tn(c.start)&&(o=c.start),l.fullSize?Gn(l,o,i.top,h,s.outerHeight-i.bottom-i.top):Gn(l,o,t.top+c.placed,h,f),c.start=o,c.placed+=f,o=l.right}}t.x=o,t.y=r}var Xe={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(s){t.draw(s)}}]},e.boxes.push(t)},removeBox(e,t){const s=e.boxes?e.boxes.indexOf(t):-1;s!==-1&&e.boxes.splice(s,1)},configure(e,t,s){t.fullSize=s.fullSize,t.position=s.position,t.weight=s.weight},update(e,t,s,n){if(!e)return;const i=Ie(e.options.layout.padding),o=Math.max(t-i.width,0),r=Math.max(s-i.height,0),a=Fm(e.boxes),l=a.vertical,c=a.horizontal;rt(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,_)=>_.box.options&&_.box.options.display===!1?p:p+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:s,padding:i,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),h=Object.assign({},i);Ru(h,Ie(n));const d=Object.assign({maxPadding:h,w:o,h:r,x:i.left,y:i.top},i),m=Lm(l.concat(c),f);sn(a.fullSize,d,f,m),sn(l,d,f,m),sn(c,d,f,m)&&sn(l,d,f,m),Bm(d),ll(a.leftAndTop,d,f,m),d.x+=d.w,d.y+=d.h,ll(a.rightAndBottom,d,f,m),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},rt(a.chartArea,p=>{const _=p.box;Object.assign(_,e.chartArea),_.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class Lu{acquireContext(t,s){}releaseContext(t){return!1}addEventListener(t,s,n){}removeEventListener(t,s,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,s,n,i){return s=Math.max(0,s||t.width),n=n||t.height,{width:s,height:Math.max(0,i?Math.floor(s/i):n)}}isAttached(t){return!0}updateConfig(t){}}class Nm extends Lu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const gi="$chartjs",$m={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},cl=e=>e===null||e==="";function Hm(e,t){const s=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e[gi]={initial:{height:n,width:i,style:{display:s.display,height:s.height,width:s.width}}},s.display=s.display||"block",s.boxSizing=s.boxSizing||"border-box",cl(i)){const o=Ka(e,"width");o!==void 0&&(e.width=o)}if(cl(n))if(e.style.height==="")e.height=e.width/(t||2);else{const o=Ka(e,"height");o!==void 0&&(e.height=o)}return e}const Fu=Hg?{passive:!0}:!1;function jm(e,t,s){e&&e.addEventListener(t,s,Fu)}function Wm(e,t,s){e&&e.canvas&&e.canvas.removeEventListener(t,s,Fu)}function Um(e,t){const s=$m[e.type]||e.type,{x:n,y:i}=de(e,t);return{type:s,chart:t,native:e,x:n!==void 0?n:null,y:i!==void 0?i:null}}function Ii(e,t){for(const s of e)if(s===t||s.contains(t))return!0}function Km(e,t,s){const n=e.canvas,i=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ii(a.addedNodes,n),r=r&&!Ii(a.removedNodes,n);r&&s()});return i.observe(document,{childList:!0,subtree:!0}),i}function Ym(e,t,s){const n=e.canvas,i=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ii(a.removedNodes,n),r=r&&!Ii(a.addedNodes,n);r&&s()});return i.observe(document,{childList:!0,subtree:!0}),i}const On=new Map;let ul=0;function zu(){const e=window.devicePixelRatio;e!==ul&&(ul=e,On.forEach((t,s)=>{s.currentDevicePixelRatio!==e&&t()}))}function Xm(e,t){On.size||window.addEventListener("resize",zu),On.set(e,t)}function qm(e){On.delete(e),On.size||window.removeEventListener("resize",zu)}function Gm(e,t,s){const n=e.canvas,i=n&&Vr(n);if(!i)return;const o=gu((a,l)=>{const c=i.clientWidth;s(a,l),c<i.clientWidth&&s()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return r.observe(i),Xm(e,o),r}function To(e,t,s){s&&s.disconnect(),t==="resize"&&qm(e)}function Zm(e,t,s){const n=e.canvas,i=gu(o=>{e.ctx!==null&&s(Um(o,e))},e);return jm(n,t,i),i}class Jm extends Lu{acquireContext(t,s){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(Hm(t,s),n):null}releaseContext(t){const s=t.canvas;if(!s[gi])return!1;const n=s[gi].initial;["height","width"].forEach(o=>{const r=n[o];ct(r)?s.removeAttribute(o):s.setAttribute(o,r)});const i=n.style||{};return Object.keys(i).forEach(o=>{s.style[o]=i[o]}),s.width=s.width,delete s[gi],!0}addEventListener(t,s,n){this.removeEventListener(t,s);const i=t.$proxies||(t.$proxies={}),r={attach:Km,detach:Ym,resize:Gm}[s]||Zm;i[s]=r(t,s,n)}removeEventListener(t,s){const n=t.$proxies||(t.$proxies={}),i=n[s];if(!i)return;({attach:To,detach:To,resize:To}[s]||Wm)(t,s,i),n[s]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,s,n,i){return $g(t,s,n,i)}isAttached(t){const s=t&&Vr(t);return!!(s&&s.isConnected)}}function Qm(e){return!Br()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Nm:Jm}var ni;let ks=(ni=class{constructor(){$(this,"x");$(this,"y");$(this,"active",!1);$(this,"options");$(this,"$animations")}tooltipPosition(t){const{x:s,y:n}=this.getProps(["x","y"],t);return{x:s,y:n}}hasValue(){return Vs(this.x)&&Vs(this.y)}getProps(t,s){const n=this.$animations;if(!s||!n)return this;const i={};return t.forEach(o=>{i[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),i}},$(ni,"defaults",{}),$(ni,"defaultRoutes"),ni);function tb(e,t){const s=e.options.ticks,n=eb(e),i=Math.min(s.maxTicksLimit||n,n),o=s.major.enabled?nb(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>i)return ib(t,c,o,r/i),c;const u=sb(o,t,i);if(r>0){let f,h;const d=r>1?Math.round((l-a)/(r-1)):null;for(Zn(t,c,u,ct(d)?0:a-d,a),f=0,h=r-1;f<h;f++)Zn(t,c,u,o[f],o[f+1]);return Zn(t,c,u,l,ct(d)?t.length:l+d),c}return Zn(t,c,u),c}function eb(e){const t=e.options.offset,s=e._tickSize(),n=e._length/s+(t?0:1),i=e._maxLength/s;return Math.floor(Math.min(n,i))}function sb(e,t,s){const n=ob(e),i=t.length/s;if(!n)return Math.max(i,1);const o=Wp(n);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>i)return l}return Math.max(i,1)}function nb(e){const t=[];let s,n;for(s=0,n=e.length;s<n;s++)e[s].major&&t.push(s);return t}function ib(e,t,s,n){let i=0,o=s[0],r;for(n=Math.ceil(n),r=0;r<e.length;r++)r===o&&(t.push(e[r]),i++,o=s[i*n])}function Zn(e,t,s,n,i){const o=lt(n,0),r=Math.min(lt(i,e.length),e.length);let a=0,l,c,u;for(s=Math.ceil(s),i&&(l=i-n,s=l/Math.floor(l/s)),u=o;u<0;)a++,u=Math.round(o+a*s);for(c=Math.max(o,0);c<r;c++)c===u&&(t.push(e[c]),a++,u=Math.round(o+a*s))}function ob(e){const t=e.length;let s,n;if(t<2)return!1;for(n=e[0],s=1;s<t;++s)if(e[s]-e[s-1]!==n)return!1;return n}const rb=e=>e==="left"?"right":e==="right"?"left":e,fl=(e,t,s)=>t==="top"||t==="left"?e[t]+s:e[t]-s,hl=(e,t)=>Math.min(t||e,e);function dl(e,t){const s=[],n=e.length/t,i=e.length;let o=0;for(;o<i;o+=n)s.push(e[Math.floor(o)]);return s}function ab(e,t,s){const n=e.ticks.length,i=Math.min(t,n-1),o=e._startPixel,r=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(s&&(n===1?c=Math.max(l-o,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-a||l>r+a)))return l}function lb(e,t){rt(e,s=>{const n=s.gc,i=n.length/2;let o;if(i>t){for(o=0;o<i;++o)delete s.data[n[o]];n.splice(0,i)}})}function Gs(e){return e.drawTicks?e.tickLength:0}function pl(e,t){if(!e.display)return 0;const s=te(e.font,t),n=Ie(e.padding);return(St(e.text)?e.text.length:1)*s.lineHeight+n.height}function cb(e,t){return Ms(e,{scale:t,type:"scale"})}function ub(e,t,s){return Ms(e,{tick:s,index:t,type:"tick"})}function fb(e,t,s){let n=mu(e);return(s&&t!=="right"||!s&&t==="right")&&(n=rb(n)),n}function hb(e,t,s,n){const{top:i,left:o,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let f=0,h,d,m;const p=r-i,_=a-o;if(e.isHorizontal()){if(d=dn(n,o,a),tt(s)){const v=Object.keys(s)[0],S=s[v];m=u[v].getPixelForValue(S)+p-t}else s==="center"?m=(c.bottom+c.top)/2+p-t:m=fl(e,s,t);h=a-o}else{if(tt(s)){const v=Object.keys(s)[0],S=s[v];d=u[v].getPixelForValue(S)-_+t}else s==="center"?d=(c.left+c.right)/2-_+t:d=fl(e,s,t);m=dn(n,r,i),f=s==="left"?-ie:ie}return{titleX:d,titleY:m,maxWidth:h,rotation:f}}class Cs extends ks{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,s){return t}getUserBounds(){let{_userMin:t,_userMax:s,_suggestedMin:n,_suggestedMax:i}=this;return t=Kt(t,Number.POSITIVE_INFINITY),s=Kt(s,Number.NEGATIVE_INFINITY),n=Kt(n,Number.POSITIVE_INFINITY),i=Kt(i,Number.NEGATIVE_INFINITY),{min:Kt(t,n),max:Kt(s,i),minDefined:It(t),maxDefined:It(s)}}getMinMax(t){let{min:s,max:n,minDefined:i,maxDefined:o}=this.getUserBounds(),r;if(i&&o)return{min:s,max:n};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),i||(s=Math.min(s,r.min)),o||(n=Math.max(n,r.max));return s=o&&s>n?n:s,n=i&&s>n?s:n,{min:Kt(s,Kt(n,s)),max:Kt(n,Kt(s,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){_t(this.options.beforeUpdate,[this])}update(t,s,n){const{beginAtZero:i,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=s,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=xg(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?dl(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=tb(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,s,n;this.isHorizontal()?(s=this.left,n=this.right):(s=this.top,n=this.bottom,t=!t),this._startPixel=s,this._endPixel=n,this._reversePixels=t,this._length=n-s,this._alignToPixels=this.options.alignToPixels}afterUpdate(){_t(this.options.afterUpdate,[this])}beforeSetDimensions(){_t(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(){_t(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),_t(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){_t(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const s=this.options.ticks;let n,i,o;for(n=0,i=t.length;n<i;n++)o=t[n],o.label=_t(s.callback,[o.value,n,t],this)}afterTickToLabelConversion(){_t(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){_t(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,s=t.ticks,n=hl(this.ticks.length,t.ticks.maxTicksLimit),i=s.minRotation||0,o=s.maxRotation;let r=i,a,l,c;if(!this._isVisible()||!s.display||i>=o||n<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,h=u.highest.height,d=qt(this.chart.width-f,0,this.maxWidth);a=t.offset?this.maxWidth/n:d/(n-1),f+6>a&&(a=d/(n-(t.offset?.5:1)),l=this.maxHeight-Gs(t.grid)-s.padding-pl(t.title,this.chart.options.font),c=Math.sqrt(f*f+h*h),r=Kp(Math.min(Math.asin(qt((u.highest.height+6)/a,-1,1)),Math.asin(qt(l/c,-1,1))-Math.asin(qt(h/c,-1,1)))),r=Math.max(i,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){_t(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){_t(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:s,options:{ticks:n,title:i,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=pl(i,s.options.font);if(a?(t.width=this.maxWidth,t.height=Gs(o)+l):(t.height=this.maxHeight,t.width=Gs(o)+l),n.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:h}=this._getLabelSizes(),d=n.padding*2,m=ms(this.labelRotation),p=Math.cos(m),_=Math.sin(m);if(a){const v=n.mirror?0:_*f.width+p*h.height;t.height=Math.min(this.maxHeight,t.height+v+d)}else{const v=n.mirror?0:p*f.width+_*h.height;t.width=Math.min(this.maxWidth,t.width+v+d)}this._calculatePadding(c,u,_,p)}}this._handleMargins(),a?(this.width=this._length=s.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=s.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,s,n,i){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;l?c?(h=i*t.width,d=n*s.height):(h=n*t.height,d=i*s.width):o==="start"?d=s.width:o==="end"?h=t.width:o!=="inner"&&(h=t.width/2,d=s.width/2),this.paddingLeft=Math.max((h-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((d-f+r)*this.width/(this.width-f),0)}else{let u=s.height/2,f=t.height/2;o==="start"?(u=0,f=t.height):o==="end"&&(u=s.height,f=0),this.paddingTop=u+r,this.paddingBottom=f+r}}_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(){_t(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:s}=this.options;return s==="top"||s==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let s,n;for(s=0,n=t.length;s<n;s++)ct(t[s].label)&&(t.splice(s,1),n--,s--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const s=this.options.ticks.sampleSize;let n=this.ticks;s<n.length&&(n=dl(n,s)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,s,n){const{ctx:i,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(s/hl(s,n));let c=0,u=0,f,h,d,m,p,_,v,S,w,y,x;for(f=0;f<s;f+=l){if(m=t[f].label,p=this._resolveTickFontOptions(f),i.font=_=p.string,v=o[_]=o[_]||{data:{},gc:[]},S=p.lineHeight,w=y=0,!ct(m)&&!St(m))w=$a(i,v.data,v.gc,w,m),y=S;else if(St(m))for(h=0,d=m.length;h<d;++h)x=m[h],!ct(x)&&!St(x)&&(w=$a(i,v.data,v.gc,w,x),y+=S);r.push(w),a.push(y),c=Math.max(w,c),u=Math.max(y,u)}lb(o,s);const k=r.indexOf(c),C=a.indexOf(u),P=E=>({width:r[E]||0,height:a[E]||0});return{first:P(0),last:P(s-1),widest:P(k),highest:P(C),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,s){return NaN}getValueForPixel(t){}getPixelForTick(t){const s=this.ticks;return t<0||t>s.length-1?null:this.getPixelForValue(s[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const s=this._startPixel+t*this._length;return qp(this._alignToPixels?us(this.chart,s,0):s)}getDecimalForPixel(t){const s=(t-this._startPixel)/this._length;return this._reversePixels?1-s:s}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:s}=this;return t<0&&s<0?s:t>0&&s>0?t:0}getContext(t){const s=this.ticks||[];if(t>=0&&t<s.length){const n=s[t];return n.$context||(n.$context=ub(this.getContext(),t,n))}return this.$context||(this.$context=cb(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,s=ms(this.labelRotation),n=Math.abs(Math.cos(s)),i=Math.abs(Math.sin(s)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*n>a*i?a/n:l/i:l*i<a*n?l/n:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const s=this.axis,n=this.chart,i=this.options,{grid:o,position:r,border:a}=i,l=o.offset,c=this.isHorizontal(),f=this.ticks.length+(l?1:0),h=Gs(o),d=[],m=a.setContext(this.getContext()),p=m.display?m.width:0,_=p/2,v=function(q){return us(n,q,p)};let S,w,y,x,k,C,P,E,B,N,L,Z;if(r==="top")S=v(this.bottom),C=this.bottom-h,E=S-_,N=v(t.top)+_,Z=t.bottom;else if(r==="bottom")S=v(this.top),N=t.top,Z=v(t.bottom)-_,C=S+_,E=this.top+h;else if(r==="left")S=v(this.right),k=this.right-h,P=S-_,B=v(t.left)+_,L=t.right;else if(r==="right")S=v(this.left),B=t.left,L=v(t.right)-_,k=S+_,P=this.left+h;else if(s==="x"){if(r==="center")S=v((t.top+t.bottom)/2+.5);else if(tt(r)){const q=Object.keys(r)[0],G=r[q];S=v(this.chart.scales[q].getPixelForValue(G))}N=t.top,Z=t.bottom,C=S+_,E=C+h}else if(s==="y"){if(r==="center")S=v((t.left+t.right)/2);else if(tt(r)){const q=Object.keys(r)[0],G=r[q];S=v(this.chart.scales[q].getPixelForValue(G))}k=S-_,P=k-h,B=t.left,L=t.right}const ht=lt(i.ticks.maxTicksLimit,f),it=Math.max(1,Math.ceil(f/ht));for(w=0;w<f;w+=it){const q=this.getContext(w),G=o.setContext(q),et=a.setContext(q),Gt=G.lineWidth,se=G.color,Zt=et.dash||[],Ct=et.dashOffset,Ve=G.tickWidth,_e=G.tickColor,is=G.tickBorderDash||[],$t=G.tickBorderDashOffset;y=ab(this,w,l),y!==void 0&&(x=us(n,y,Gt),c?k=P=B=L=x:C=E=N=Z=x,d.push({tx1:k,ty1:C,tx2:P,ty2:E,x1:B,y1:N,x2:L,y2:Z,width:Gt,color:se,borderDash:Zt,borderDashOffset:Ct,tickWidth:Ve,tickColor:_e,tickBorderDash:is,tickBorderDashOffset:$t}))}return this._ticksLength=f,this._borderValue=S,d}_computeLabelItems(t){const s=this.axis,n=this.options,{position:i,ticks:o}=n,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:f}=o,h=Gs(n.grid),d=h+u,m=f?-u:d,p=-ms(this.labelRotation),_=[];let v,S,w,y,x,k,C,P,E,B,N,L,Z="middle";if(i==="top")k=this.bottom-m,C=this._getXAxisLabelAlignment();else if(i==="bottom")k=this.top+m,C=this._getXAxisLabelAlignment();else if(i==="left"){const it=this._getYAxisLabelAlignment(h);C=it.textAlign,x=it.x}else if(i==="right"){const it=this._getYAxisLabelAlignment(h);C=it.textAlign,x=it.x}else if(s==="x"){if(i==="center")k=(t.top+t.bottom)/2+d;else if(tt(i)){const it=Object.keys(i)[0],q=i[it];k=this.chart.scales[it].getPixelForValue(q)+d}C=this._getXAxisLabelAlignment()}else if(s==="y"){if(i==="center")x=(t.left+t.right)/2-d;else if(tt(i)){const it=Object.keys(i)[0],q=i[it];x=this.chart.scales[it].getPixelForValue(q)}C=this._getYAxisLabelAlignment(h).textAlign}s==="y"&&(l==="start"?Z="top":l==="end"&&(Z="bottom"));const ht=this._getLabelSizes();for(v=0,S=a.length;v<S;++v){w=a[v],y=w.label;const it=o.setContext(this.getContext(v));P=this.getPixelForTick(v)+o.labelOffset,E=this._resolveTickFontOptions(v),B=E.lineHeight,N=St(y)?y.length:1;const q=N/2,G=it.color,et=it.textStrokeColor,Gt=it.textStrokeWidth;let se=C;r?(x=P,C==="inner"&&(v===S-1?se=this.options.reverse?"left":"right":v===0?se=this.options.reverse?"right":"left":se="center"),i==="top"?c==="near"||p!==0?L=-N*B+B/2:c==="center"?L=-ht.highest.height/2-q*B+B:L=-ht.highest.height+B/2:c==="near"||p!==0?L=B/2:c==="center"?L=ht.highest.height/2-q*B:L=ht.highest.height-N*B,f&&(L*=-1),p!==0&&!it.showLabelBackdrop&&(x+=B/2*Math.sin(p))):(k=P,L=(1-N)*B/2);let Zt;if(it.showLabelBackdrop){const Ct=Ie(it.backdropPadding),Ve=ht.heights[v],_e=ht.widths[v];let is=L-Ct.top,$t=0-Ct.left;switch(Z){case"middle":is-=Ve/2;break;case"bottom":is-=Ve;break}switch(C){case"center":$t-=_e/2;break;case"right":$t-=_e;break;case"inner":v===S-1?$t-=_e:v>0&&($t-=_e/2);break}Zt={left:$t,top:is,width:_e+Ct.width,height:Ve+Ct.height,color:it.backdropColor}}_.push({label:y,font:E,textOffset:L,options:{rotation:p,color:G,strokeColor:et,strokeWidth:Gt,textAlign:se,textBaseline:Z,translation:[x,k],backdrop:Zt}})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:s}=this.options;if(-ms(this.labelRotation))return t==="top"?"left":"right";let i="center";return s.align==="start"?i="left":s.align==="end"?i="right":s.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:s,ticks:{crossAlign:n,mirror:i,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,u;return s==="left"?i?(u=this.right+o,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u=this.left)):s==="right"?i?(u=this.left+o,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,s=this.options.position;if(s==="left"||s==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(s==="top"||s==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:s},left:n,top:i,width:o,height:r}=this;s&&(t.save(),t.fillStyle=s,t.fillRect(n,i,o,r),t.restore())}getLineWidthForValue(t){const s=this.options.grid;if(!this._isVisible()||!s.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?s.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const s=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,u)=>{!u.width||!u.color||(n.save(),n.lineWidth=u.width,n.strokeStyle=u.color,n.setLineDash(u.borderDash||[]),n.lineDashOffset=u.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(s.display)for(o=0,r=i.length;o<r;++o){const l=i[o];s.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),s.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:s,options:{border:n,grid:i}}=this,o=n.setContext(this.getContext()),r=n.display?o.width:0;if(!r)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,f,h;this.isHorizontal()?(c=us(t,this.left,r)-r/2,u=us(t,this.right,a)+a/2,f=h=l):(f=us(t,this.top,r)-r/2,h=us(t,this.bottom,a)+a/2,c=u=l),s.save(),s.lineWidth=o.width,s.strokeStyle=o.color,s.beginPath(),s.moveTo(c,f),s.lineTo(u,h),s.stroke(),s.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,i=this._computeLabelArea();i&&yu(n,i);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,u=r.textOffset;Qo(n,c,0,u,l,a)}i&&vu(n)}drawTitle(){const{ctx:t,options:{position:s,title:n,reverse:i}}=this;if(!n.display)return;const o=te(n.font),r=Ie(n.padding),a=n.align;let l=o.lineHeight/2;s==="bottom"||s==="center"||tt(s)?(l+=r.bottom,St(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=r.top;const{titleX:c,titleY:u,maxWidth:f,rotation:h}=hb(this,l,s,a);Qo(t,n.text,0,0,o,{color:n.color,maxWidth:f,rotation:h,textAlign:fb(a,s,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,s=t.ticks&&t.ticks.z||0,n=lt(t.grid&&t.grid.z,-1),i=lt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Cs.prototype.draw?[{z:s,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:s,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const s=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let o,r;for(o=0,r=s.length;o<r;++o){const a=s[o];a[n]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const s=this.options.ticks.setContext(this.getContext(t));return te(s.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Jn{constructor(t,s,n){this.type=t,this.scope=s,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const s=Object.getPrototypeOf(t);let n;gb(s)&&(n=this.register(s));const i=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,db(t,r,n),this.override&&vt.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const s=this.items,n=t.id,i=this.scope;n in s&&delete s[n],i&&n in vt[i]&&(delete vt[i][n],this.override&&delete Ss[n])}}function db(e,t,s){const n=Cn(Object.create(null),[s?vt.get(s):{},vt.get(t),e.defaults]);vt.set(t,n),e.defaultRoutes&&pb(t,e.defaultRoutes),e.descriptors&&vt.describe(t,e.descriptors)}function pb(e,t){Object.keys(t).forEach(s=>{const n=s.split("."),i=n.pop(),o=[e].concat(n).join("."),r=t[s].split("."),a=r.pop(),l=r.join(".");vt.route(o,i,l,a)})}function gb(e){return"id"in e&&"defaults"in e}class mb{constructor(){this.controllers=new Jn(ys,"datasets",!0),this.elements=new Jn(ks,"elements"),this.plugins=new Jn(Object,"plugins"),this.scales=new Jn(Cs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,s,n){[...s].forEach(i=>{const o=n||this._getRegistryForType(i);n||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):rt(i,r=>{const a=n||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,s,n){const i=Ar(t);_t(n["before"+i],[],n),s[t](n),_t(n["after"+i],[],n)}_getRegistryForType(t){for(let s=0;s<this._typedRegistries.length;s++){const n=this._typedRegistries[s];if(n.isForType(t))return n}return this.plugins}_get(t,s,n){const i=s.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var fe=new mb;class bb{constructor(){this._init=[]}notify(t,s,n,i){s==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),r=this._notify(o,t,s,n);return s==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,s,n,i){i=i||{};for(const o of t){const r=o.plugin,a=r[n],l=[s,i,o.options];if(_t(a,l,r)===!1&&i.cancelable)return!1}return!0}invalidate(){ct(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const s=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),s}_createDescriptors(t,s){const n=t&&t.config,i=lt(n.options&&n.options.plugins,{}),o=_b(n);return i===!1&&!s?[]:yb(t,o,i,s)}_notifyStateChanges(t){const s=this._oldCache||[],n=this._cache,i=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(i(s,n),t,"stop"),this._notify(i(n,s),t,"start")}}function _b(e){const t={},s=[],n=Object.keys(fe.plugins.items);for(let o=0;o<n.length;o++)s.push(fe.getPlugin(n[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const r=i[o];s.indexOf(r)===-1&&(s.push(r),t[r.id]=!0)}return{plugins:s,localIds:t}}function xb(e,t){return!t&&e===!1?null:e===!0?{}:e}function yb(e,{plugins:t,localIds:s},n,i){const o=[],r=e.getContext();for(const a of t){const l=a.id,c=xb(n[l],i);c!==null&&o.push({plugin:a,options:vb(e.config,{plugin:a,local:s[l]},c,r)})}return o}function vb(e,{plugin:t,local:s},n,i){const o=e.pluginScopeKeys(t),r=e.getOptionScopes(n,o);return s&&t.defaults&&r.push(t.defaults),e.createResolver(r,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function er(e,t){const s=vt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||s.indexAxis||"x"}function wb(e,t){let s=e;return e==="_index_"?s=t:e==="_value_"&&(s=t==="x"?"y":"x"),s}function Sb(e,t){return e===t?"_index_":"_value_"}function gl(e){if(e==="x"||e==="y"||e==="r")return e}function Mb(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function sr(e,...t){if(gl(e))return e;for(const s of t){const n=s.axis||Mb(s.position)||e.length>1&&gl(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function ml(e,t,s){if(s[t+"AxisID"]===e)return{axis:t}}function kb(e,t){if(t.data&&t.data.datasets){const s=t.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(s.length)return ml(e,"x",s[0])||ml(e,"y",s[0])}return{}}function Cb(e,t){const s=Ss[e.type]||{scales:{}},n=t.scales||{},i=er(e.type,t),o=Object.create(null);return Object.keys(n).forEach(r=>{const a=n[r];if(!tt(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=sr(r,a,kb(r,e),vt.scales[a.type]),c=Sb(l,i),u=s.scales||{};o[r]=fn(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(r=>{const a=r.type||e.type,l=r.indexAxis||er(a,t),u=(Ss[a]||{}).scales||{};Object.keys(u).forEach(f=>{const h=wb(f,l),d=r[h+"AxisID"]||h;o[d]=o[d]||Object.create(null),fn(o[d],[{axis:h},n[d],u[f]])})}),Object.keys(o).forEach(r=>{const a=o[r];fn(a,[vt.scales[a.type],vt.scale])}),o}function Bu(e){const t=e.options||(e.options={});t.plugins=lt(t.plugins,{}),t.scales=Cb(e,t)}function Vu(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Tb(e){return e=e||{},e.data=Vu(e.data),Bu(e),e}const bl=new Map,Nu=new Set;function Qn(e,t){let s=bl.get(e);return s||(s=t(),bl.set(e,s),Nu.add(s)),s}const Zs=(e,t,s)=>{const n=Bs(t,s);n!==void 0&&e.add(n)};class Pb{constructor(t){this._config=Tb(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Vu(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Bu(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Qn(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,s){return Qn(`${t}.transition.${s}`,()=>[[`datasets.${t}.transitions.${s}`,`transitions.${s}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,s){return Qn(`${t}-${s}`,()=>[[`datasets.${t}.elements.${s}`,`datasets.${t}`,`elements.${s}`,""]])}pluginScopeKeys(t){const s=t.id,n=this.type;return Qn(`${n}-plugin-${s}`,()=>[[`plugins.${s}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,s){const n=this._scopeCache;let i=n.get(t);return(!i||s)&&(i=new Map,n.set(t,i)),i}getOptionScopes(t,s,n){const{options:i,type:o}=this,r=this._cachedScopes(t,n),a=r.get(s);if(a)return a;const l=new Set;s.forEach(u=>{t&&(l.add(t),u.forEach(f=>Zs(l,t,f))),u.forEach(f=>Zs(l,i,f)),u.forEach(f=>Zs(l,Ss[o]||{},f)),u.forEach(f=>Zs(l,vt,f)),u.forEach(f=>Zs(l,Zo,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Nu.has(s)&&r.set(s,c),c}chartOptionScopes(){const{options:t,type:s}=this;return[t,Ss[s]||{},vt.datasets[s]||{},{type:s},vt,Zo]}resolveNamedOptions(t,s,n,i=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=_l(this._resolverCache,t,i);let l=r;if(Ab(r,s)){o.$shared=!1,n=Qe(n)?n():n;const c=this.createResolver(t,n,a);l=Ns(r,n,c)}for(const c of s)o[c]=l[c];return o}createResolver(t,s,n=[""],i){const{resolver:o}=_l(this._resolverCache,t,n);return tt(s)?Ns(o,s,void 0,i):o}}function _l(e,t,s){let n=e.get(t);n||(n=new Map,e.set(t,n));const i=s.join();let o=n.get(i);return o||(o={resolver:Lr(t,s),subPrefixes:s.filter(a=>!a.toLowerCase().includes("hover"))},n.set(i,o)),o}const Ob=e=>tt(e)&&Object.getOwnPropertyNames(e).some(t=>Qe(e[t]));function Ab(e,t){const{isScriptable:s,isIndexable:n}=Mu(e);for(const i of t){const o=s(i),r=n(i),a=(r||o)&&e[i];if(o&&(Qe(a)||Ob(a))||r&&St(a))return!0}return!1}var Db="4.4.5";const Eb=["top","bottom","left","right","chartArea"];function xl(e,t){return e==="top"||e==="bottom"||Eb.indexOf(e)===-1&&t==="x"}function yl(e,t){return function(s,n){return s[e]===n[e]?s[t]-n[t]:s[e]-n[e]}}function vl(e){const t=e.chart,s=t.options.animation;t.notifyPlugins("afterRender"),_t(s&&s.onComplete,[e],t)}function Ib(e){const t=e.chart,s=t.options.animation;_t(s&&s.onProgress,[e],t)}function $u(e){return Br()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const mi={},wl=e=>{const t=$u(e);return Object.values(mi).filter(s=>s.canvas===t).pop()};function Rb(e,t,s){const n=Object.keys(e);for(const i of n){const o=+i;if(o>=t){const r=e[i];delete e[i],(s>0||o>t)&&(e[o+s]=r)}}}function Lb(e,t,s,n){return!s||e.type==="mouseout"?null:n?t:e}function ti(e,t,s){return e.options.clip?e[s]:t[s]}function Fb(e,t){const{xScale:s,yScale:n}=e;return s&&n?{left:ti(s,t,"left"),right:ti(s,t,"right"),top:ti(n,t,"top"),bottom:ti(n,t,"bottom")}:t}class ke{static register(...t){fe.add(...t),Sl()}static unregister(...t){fe.remove(...t),Sl()}constructor(t,s){const n=this.config=new Pb(s),i=$u(t),o=wl(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Qm(i)),this.platform.updateConfig(n);const a=this.platform.acquireContext(i,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Lp(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=r,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 bb,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Qp(f=>this.update(f),r.resizeDelay||0),this._dataChanges=[],mi[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ve.listen(this,"complete",vl),ve.listen(this,"progress",Ib),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:s},width:n,height:i,_aspectRatio:o}=this;return ct(t)?s&&o?o:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return fe}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ua(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ha(this.canvas,this.ctx),this}stop(){return ve.stop(this),this}resize(t,s){ve.running(this)?this._resizeBeforeDraw={width:t,height:s}:this._resize(t,s)}_resize(t,s){const n=this.options,i=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(i,t,s,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Ua(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),_t(n.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const s=this.options.scales||{};rt(s,(n,i)=>{n.id=i})}buildOrUpdateScales(){const t=this.options,s=t.scales,n=this.scales,i=Object.keys(n).reduce((r,a)=>(r[a]=!1,r),{});let o=[];s&&(o=o.concat(Object.keys(s).map(r=>{const a=s[r],l=sr(r,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),rt(o,r=>{const a=r.options,l=a.id,c=sr(l,a),u=lt(a.type,r.dtype);(a.position===void 0||xl(a.position,c)!==xl(r.dposition))&&(a.position=r.dposition),i[l]=!0;let f=null;if(l in n&&n[l].type===u)f=n[l];else{const h=fe.getScale(u);f=new h({id:l,type:u,ctx:this.ctx,chart:this}),n[f.id]=f}f.init(a,t)}),rt(i,(r,a)=>{r||delete n[a]}),rt(n,r=>{Xe.configure(this,r,r.options),Xe.addBox(this,r)})}_updateMetasets(){const t=this._metasets,s=this.data.datasets.length,n=t.length;if(t.sort((i,o)=>i.index-o.index),n>s){for(let i=s;i<n;++i)this._destroyDatasetMeta(i);t.splice(s,n-s)}this._sortedMetasets=t.slice(0).sort(yl("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:s}}=this;t.length>s.length&&delete this._stacks,t.forEach((n,i)=>{s.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],s=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=s.length;n<i;n++){const o=s[n];let r=this.getDatasetMeta(n);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=a,r.indexAxis=o.indexAxis||er(a,this.options),r.order=o.order||0,r.index=n,r.label=""+o.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{const l=fe.getController(a),{datasetElementType:c,dataElementType:u}=vt.datasets[a];Object.assign(l,{dataElementType:fe.getElement(u),datasetElementType:c&&fe.getElement(c)}),r.controller=new l(this,n),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){rt(this.data.datasets,(t,s)=>{this.getDatasetMeta(s).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const s=this.config;s.update();const n=this._options=s.createResolver(s.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),h=!i&&o.indexOf(f)===-1;f.buildOrUpdateElements(h),r=Math.max(+f.getMaxOverflow(),r)}r=this._minPadding=n.layout.autoPadding?r:0,this._updateLayout(r),i||rt(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yl("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){rt(this.scales,t=>{Xe.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,s=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!Ea(s,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,s=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:o}of s){const r=n==="_removeElements"?-o:o;Rb(t,i,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const s=this.data.datasets.length,n=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),i=n(0);for(let o=1;o<s;o++)if(!Ea(i,n(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Xe.update(this,this.width,this.height,t);const s=this.chartArea,n=s.width<=0||s.height<=0;this._layers=[],rt(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let s=0,n=this.data.datasets.length;s<n;++s)this.getDatasetMeta(s).controller.configure();for(let s=0,n=this.data.datasets.length;s<n;++s)this._updateDataset(s,Qe(t)?t({datasetIndex:s}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,s){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:s,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(n.controller._update(s),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ve.has(this)?this.attached&&!ve.running(this)&&ve.start(this):(this.draw(),vl({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const s=this._layers;for(t=0;t<s.length&&s[t].z<=0;++t)s[t].draw(this.chartArea);for(this._drawDatasets();t<s.length;++t)s[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const s=this._sortedMetasets,n=[];let i,o;for(i=0,o=s.length;i<o;++i){const r=s[i];(!t||r.visible)&&n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let s=t.length-1;s>=0;--s)this._drawDataset(t[s]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const s=this.ctx,n=t._clip,i=!n.disabled,o=Fb(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&yu(s,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),t.controller.draw(),i&&vu(s),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Pn(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,s,n,i){const o=Em.modes[s];return typeof o=="function"?o(this,t,n,i):[]}getDatasetMeta(t){const s=this.data.datasets[t],n=this._metasets;let i=n.filter(o=>o&&o._dataset===s).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:s&&s.order||0,index:t,_dataset:s,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=Ms(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const s=this.data.datasets[t];if(!s)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!s.hidden}setDatasetVisibility(t,s){const n=this.getDatasetMeta(t);n.hidden=!s}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,s,n){const i=n?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,i);Tn(s)?(o.data[s].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),r.update(o,{visible:n}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,s){this._updateVisibility(t,s,!1)}show(t,s){this._updateVisibility(t,s,!0)}_destroyDatasetMeta(t){const s=this._metasets[t];s&&s.controller&&s.controller._destroy(),delete this._metasets[t]}_stop(){let t,s;for(this.stop(),ve.remove(this),t=0,s=this.data.datasets.length;t<s;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:s}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ha(t,s),this.platform.releaseContext(s),this.canvas=null,this.ctx=null),delete mi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,s=this.platform,n=(o,r)=>{s.addEventListener(this,o,r),t[o]=r},i=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};rt(this.options.events,o=>n(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,s=this.platform,n=(l,c)=>{s.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(s.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{i("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",r)};r=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),n("attach",a)},s.isAttached(this.canvas)?a():r()}unbindEvents(){rt(this._listeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._listeners={},rt(this._responsiveListeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,s,n){const i=n?"set":"remove";let o,r,a,l;for(s==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[i+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const s=this._active||[],n=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Oi(n,s)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,s))}notifyPlugins(t,s,n){return this._plugins.notify(this,t,s,n)}isPluginEnabled(t){return this._plugins._cache.filter(s=>s.plugin.id===t).length===1}_updateHoverStyles(t,s,n){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),r=o(s,t),a=n?t:o(t,s);r.length&&this.updateHoverStyle(r,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,s){const n={event:t,replay:s,cancelable:!0,inChartArea:this.isPointInArea(t)},i=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;const o=this._handleEvent(t,s,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(o||n.changed)&&this.render(),this}_handleEvent(t,s,n){const{_active:i=[],options:o}=this,r=s,a=this._getActiveElements(t,i,n,r),l=$p(t),c=Lb(t,this._lastEvent,n,l);n&&(this._lastEvent=null,_t(o.onHover,[t,a,this],this),l&&_t(o.onClick,[t,a,this],this));const u=!Oi(a,i);return(u||s)&&(this._active=a,this._updateHoverStyles(a,i,s)),this._lastEvent=c,u}_getActiveElements(t,s,n,i){if(t.type==="mouseout")return[];if(!n)return s;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}}$(ke,"defaults",vt),$(ke,"instances",mi),$(ke,"overrides",Ss),$(ke,"registry",fe),$(ke,"version",Db),$(ke,"getChart",wl);function Sl(){return rt(ke.instances,e=>e._plugins.invalidate())}function Hu(e,t,s=t){e.lineCap=lt(s.borderCapStyle,t.borderCapStyle),e.setLineDash(lt(s.borderDash,t.borderDash)),e.lineDashOffset=lt(s.borderDashOffset,t.borderDashOffset),e.lineJoin=lt(s.borderJoinStyle,t.borderJoinStyle),e.lineWidth=lt(s.borderWidth,t.borderWidth),e.strokeStyle=lt(s.borderColor,t.borderColor)}function zb(e,t,s){e.lineTo(s.x,s.y)}function Bb(e){return e.stepped?ug:e.tension||e.cubicInterpolationMode==="monotone"?fg:zb}function ju(e,t,s={}){const n=e.length,{start:i=0,end:o=n-1}=s,{start:r,end:a}=t,l=Math.max(i,r),c=Math.min(o,a),u=i<r&&o<r||i>a&&o>a;return{count:n,start:l,loop:t.loop,ilen:c<l&&!u?n+c-l:c-l}}function Vb(e,t,s,n){const{points:i,options:o}=t,{count:r,start:a,loop:l,ilen:c}=ju(i,s,n),u=Bb(o);let{move:f=!0,reverse:h}=n||{},d,m,p;for(d=0;d<=c;++d)m=i[(a+(h?c-d:d))%r],!m.skip&&(f?(e.moveTo(m.x,m.y),f=!1):u(e,p,m,h,o.stepped),p=m);return l&&(m=i[(a+(h?c:0))%r],u(e,p,m,h,o.stepped)),!!l}function Nb(e,t,s,n){const i=t.points,{count:o,start:r,ilen:a}=ju(i,s,n),{move:l=!0,reverse:c}=n||{};let u=0,f=0,h,d,m,p,_,v;const S=y=>(r+(c?a-y:y))%o,w=()=>{p!==_&&(e.lineTo(u,_),e.lineTo(u,p),e.lineTo(u,v))};for(l&&(d=i[S(0)],e.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=i[S(h)],d.skip)continue;const y=d.x,x=d.y,k=y|0;k===m?(x<p?p=x:x>_&&(_=x),u=(f*u+y)/++f):(w(),e.lineTo(y,x),m=k,f=0,p=_=x),v=x}w()}function nr(e){const t=e.options,s=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!s?Nb:Vb}function $b(e){return e.stepped?jg:e.tension||e.cubicInterpolationMode==="monotone"?Wg:ps}function Hb(e,t,s,n){let i=t._path;i||(i=t._path=new Path2D,t.path(i,s,n)&&i.closePath()),Hu(e,t.options),e.stroke(i)}function jb(e,t,s,n){const{segments:i,options:o}=t,r=nr(t);for(const a of i)Hu(e,o,a.style),e.beginPath(),r(e,t,a,{start:s,end:s+n-1})&&e.closePath(),e.stroke()}const Wb=typeof Path2D=="function";function Ub(e,t,s,n){Wb&&!t.options.segment?Hb(e,t,s,n):jb(e,t,s,n)}class nn extends ks{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,s){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;Lg(this._points,n,t,i,s),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=tm(this,this.options.segment))}first(){const t=this.segments,s=this.points;return t.length&&s[t[0].start]}last(){const t=this.segments,s=this.points,n=t.length;return n&&s[t[n-1].end]}interpolate(t,s){const n=this.options,i=t[s],o=this.points,r=Zg(this,{property:s,start:i,end:i});if(!r.length)return;const a=[],l=$b(n);let c,u;for(c=0,u=r.length;c<u;++c){const{start:f,end:h}=r[c],d=o[f],m=o[h];if(d===m){a.push(d);continue}const p=Math.abs((i-d[s])/(m[s]-d[s])),_=l(d,m,p,n.stepped);_[s]=t[s],a.push(_)}return a.length===1?a[0]:a}pathSegment(t,s,n){return nr(this)(t,this,s,n)}path(t,s,n){const i=this.segments,o=nr(this);let r=this._loop;s=s||0,n=n||this.points.length-s;for(const a of i)r&=o(t,this,a,{start:s,end:s+n-1});return!!r}draw(t,s,n,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Ub(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}$(nn,"id","line"),$(nn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),$(nn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),$(nn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Ml(e,t,s,n){const i=e.options,{[s]:o}=e.getProps([s],n);return Math.abs(t-o)<i.radius+i.hitRadius}class bi extends ks{constructor(s){super();$(this,"parsed");$(this,"skip");$(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,s&&Object.assign(this,s)}inRange(s,n,i){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],i);return Math.pow(s-r,2)+Math.pow(n-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(s,n){return Ml(this,s,"x",n)}inYRange(s,n){return Ml(this,s,"y",n)}getCenterPoint(s){const{x:n,y:i}=this.getProps(["x","y"],s);return{x:n,y:i}}size(s){s=s||this.options||{};let n=s.radius||0;n=Math.max(n,n&&s.hoverRadius||0);const i=n&&s.borderWidth||0;return(n+i)*2}draw(s,n){const i=this.options;this.skip||i.radius<.1||!Pn(this,n,this.size(i)/2)||(s.strokeStyle=i.borderColor,s.lineWidth=i.borderWidth,s.fillStyle=i.backgroundColor,Jo(s,i,this.x,this.y))}getRange(){const s=this.options||{};return s.radius+s.hitRadius}}$(bi,"id","point"),$(bi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),$(bi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Wu(e,t){const{x:s,y:n,base:i,width:o,height:r}=e.getProps(["x","y","base","width","height"],t);let a,l,c,u,f;return e.horizontal?(f=r/2,a=Math.min(s,i),l=Math.max(s,i),c=n-f,u=n+f):(f=o/2,a=s-f,l=s+f,c=Math.min(n,i),u=Math.max(n,i)),{left:a,top:c,right:l,bottom:u}}function qe(e,t,s,n){return e?0:qt(t,s,n)}function Kb(e,t,s){const n=e.options.borderWidth,i=e.borderSkipped,o=Su(n);return{t:qe(i.top,o.top,0,s),r:qe(i.right,o.right,0,t),b:qe(i.bottom,o.bottom,0,s),l:qe(i.left,o.left,0,t)}}function Yb(e,t,s){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=mn(i),r=Math.min(t,s),a=e.borderSkipped,l=n||tt(i);return{topLeft:qe(!l||a.top||a.left,o.topLeft,0,r),topRight:qe(!l||a.top||a.right,o.topRight,0,r),bottomLeft:qe(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:qe(!l||a.bottom||a.right,o.bottomRight,0,r)}}function Xb(e){const t=Wu(e),s=t.right-t.left,n=t.bottom-t.top,i=Kb(e,s/2,n/2),o=Yb(e,s/2,n/2);return{outer:{x:t.left,y:t.top,w:s,h:n,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:s-i.l-i.r,h:n-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function Po(e,t,s,n){const i=t===null,o=s===null,a=e&&!(i&&o)&&Wu(e,n);return a&&(i||Go(t,a.left,a.right))&&(o||Go(s,a.top,a.bottom))}function qb(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Gb(e,t){e.rect(t.x,t.y,t.w,t.h)}function Oo(e,t,s={}){const n=e.x!==s.x?-t:0,i=e.y!==s.y?-t:0,o=(e.x+e.w!==s.x+s.w?t:0)-n,r=(e.y+e.h!==s.y+s.h?t:0)-i;return{x:e.x+n,y:e.y+i,w:e.w+o,h:e.h+r,radius:e.radius}}class _i extends ks{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:s,options:{borderColor:n,backgroundColor:i}}=this,{inner:o,outer:r}=Xb(this),a=qb(r.radius)?tr:Gb;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,Oo(r,s,o)),t.clip(),a(t,Oo(o,-s,r)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,Oo(o,s)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,s,n){return Po(this,t,s,n)}inXRange(t,s){return Po(this,t,null,s)}inYRange(t,s){return Po(this,null,t,s)}getCenterPoint(t){const{x:s,y:n,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(s+i)/2:s,y:o?n:(n+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}$(_i,"id","bar"),$(_i,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),$(_i,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class Uu extends ks{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,s){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=s;const i=St(n.text)?n.text.length:1;this._padding=Ie(n.padding);const o=i*te(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:s,left:n,bottom:i,right:o,options:r}=this,a=r.align;let l=0,c,u,f;return this.isHorizontal()?(u=dn(a,n,o),f=s+t,c=o-n):(r.position==="left"?(u=n+t,f=dn(a,i,s),l=kt*-.5):(u=o-t,f=dn(a,s,i),l=kt*.5),c=i-s),{titleX:u,titleY:f,maxWidth:c,rotation:l}}draw(){const t=this.ctx,s=this.options;if(!s.display)return;const n=te(s.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Qo(t,s.text,0,0,n,{color:s.color,maxWidth:l,rotation:c,textAlign:mu(s.align),textBaseline:"middle",translation:[r,a]})}}function Zb(e,t){const s=new Uu({ctx:e.ctx,options:t,chart:e});Xe.configure(e,s,t),Xe.addBox(e,s),e.titleBlock=s}var Jb={id:"title",_element:Uu,start(e,t,s){Zb(e,s)},stop(e){const t=e.titleBlock;Xe.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,s){const n=e.titleBlock;Xe.configure(e,n,s),n.options=s},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const on={average(e){if(!e.length)return!1;let t,s,n=new Set,i=0,o=0;for(t=0,s=e.length;t<s;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();n.add(l.x),i+=l.y,++o}}return o===0||n.size===0?!1:{x:[...n].reduce((a,l)=>a+l)/n.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let s=t.x,n=t.y,i=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=e.length;o<r;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=qo(t,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();s=l.x,n=l.y}return{x:s,y:n}}};function ce(e,t){return t&&(St(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function we(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
33
33
|
`)>-1?e.split(`
|
|
34
|
-
`):e}function Qb(e,t){const{element:s,datasetIndex:n,index:i}=t,o=e.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:e,label:r,parsed:o.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:n,element:s}}function kl(e,t){const s=e.chart.ctx,{body:n,footer:i,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=te(t.bodyFont),c=te(t.titleFont),u=te(t.footerFont),f=o.length,h=i.length,d=n.length,m=Ie(t.padding);let p=m.height,_=0,v=n.reduce((y,x)=>y+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(p+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),v){const y=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=d*y+(v-d)*l.lineHeight+(v-1)*t.bodySpacing}h&&(p+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let S=0;const w=function(y){_=Math.max(_,s.measureText(y).width+S)};return s.save(),s.font=c.string,rt(e.title,w),s.font=l.string,rt(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?r+2+t.boxPadding:0,rt(n,y=>{rt(y.before,w),rt(y.lines,w),rt(y.after,w)}),S=0,s.font=u.string,rt(e.footer,w),s.restore(),_+=m.width,{width:_,height:p}}function t_(e,t){const{y:s,height:n}=t;return s<n/2?"top":s>e.height-n/2?"bottom":"center"}function e_(e,t,s,n){const{x:i,width:o}=n,r=s.caretSize+s.caretPadding;if(e==="left"&&i+o+r>t.width||e==="right"&&i-o-r<0)return!0}function s_(e,t,s,n){const{x:i,width:o}=s,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return n==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),e_(c,e,t,s)&&(c="center"),c}function Cl(e,t,s){const n=s.yAlign||t.yAlign||t_(e,s);return{xAlign:s.xAlign||t.xAlign||s_(e,t,s,n),yAlign:n}}function n_(e,t){let{x:s,width:n}=e;return t==="right"?s-=n:t==="center"&&(s-=n/2),s}function i_(e,t,s){let{y:n,height:i}=e;return t==="top"?n+=s:t==="bottom"?n-=i+s:n-=i/2,n}function Tl(e,t,s,n){const{caretSize:i,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=s,c=i+o,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:d}=mn(r);let m=n_(t,a);const p=i_(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,h)+i:a==="right"&&(m+=Math.max(f,d)+i),{x:qt(m,0,n.width-t.width),y:qt(p,0,n.height-t.height)}}function ei(e,t,s){const n=Ie(s.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function Pl(e){return ce([],we(e))}function o_(e,t,s){return Ms(e,{tooltip:t,tooltipItems:s,type:"tooltip"})}function Ol(e,t){const s=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return s?e.override(s):e}const Ku={beforeTitle:ye,title(e){if(e.length>0){const t=e[0],s=t.chart.data.labels,n=s?s.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return s[t.dataIndex]}return""},afterTitle:ye,beforeBody:ye,beforeLabel:ye,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const s=e.formattedValue;return ct(s)||(t+=s),t},labelColor(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:s.borderColor,backgroundColor:s.backgroundColor,borderWidth:s.borderWidth,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:s.pointStyle,rotation:s.rotation}},afterLabel:ye,afterBody:ye,beforeFooter:ye,footer:ye,afterFooter:ye};function Bt(e,t,s,n){const i=e[t].call(s,n);return typeof i>"u"?Ku[t].call(s,n):i}class ir extends ks{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const s=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&s.options.animation&&n.animations,o=new Au(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=o_(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,s){const{callbacks:n}=s,i=Bt(n,"beforeTitle",this,t),o=Bt(n,"title",this,t),r=Bt(n,"afterTitle",this,t);let a=[];return a=ce(a,we(i)),a=ce(a,we(o)),a=ce(a,we(r)),a}getBeforeBody(t,s){return Pl(Bt(s.callbacks,"beforeBody",this,t))}getBody(t,s){const{callbacks:n}=s,i=[];return rt(t,o=>{const r={before:[],lines:[],after:[]},a=Ol(n,o);ce(r.before,we(Bt(a,"beforeLabel",this,o))),ce(r.lines,Bt(a,"label",this,o)),ce(r.after,we(Bt(a,"afterLabel",this,o))),i.push(r)}),i}getAfterBody(t,s){return Pl(Bt(s.callbacks,"afterBody",this,t))}getFooter(t,s){const{callbacks:n}=s,i=Bt(n,"beforeFooter",this,t),o=Bt(n,"footer",this,t),r=Bt(n,"afterFooter",this,t);let a=[];return a=ce(a,we(i)),a=ce(a,we(o)),a=ce(a,we(r)),a}_createItems(t){const s=this._active,n=this.chart.data,i=[],o=[],r=[];let a=[],l,c;for(l=0,c=s.length;l<c;++l)a.push(Qb(this.chart,s[l]));return t.filter&&(a=a.filter((u,f,h)=>t.filter(u,f,h,n))),t.itemSort&&(a=a.sort((u,f)=>t.itemSort(u,f,n))),rt(a,u=>{const f=Ol(t.callbacks,u);i.push(Bt(f,"labelColor",this,u)),o.push(Bt(f,"labelPointStyle",this,u)),r.push(Bt(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,s){const n=this.options.setContext(this.getContext()),i=this._active;let o,r=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=on[n.position].call(this,i,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);const l=this._size=kl(this,n),c=Object.assign({},a,l),u=Cl(this.chart,n,c),f=Tl(n,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:s})}drawCaret(t,s,n,i){const o=this.getCaretPosition(t,n,i);s.lineTo(o.x1,o.y1),s.lineTo(o.x2,o.y2),s.lineTo(o.x3,o.y3)}getCaretPosition(t,s,n){const{xAlign:i,yAlign:o}=this,{caretSize:r,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:f}=mn(a),{x:h,y:d}=t,{width:m,height:p}=s;let _,v,S,w,y,x;return o==="center"?(y=d+p/2,i==="left"?(_=h,v=_-r,w=y+r,x=y-r):(_=h+m,v=_+r,w=y-r,x=y+r),S=_):(i==="left"?v=h+Math.max(l,u)+r:i==="right"?v=h+m-Math.max(c,f)-r:v=this.caretX,o==="top"?(w=d,y=w-r,_=v-r,S=v+r):(w=d+p,y=w+r,_=v+r,S=v-r),x=w),{x1:_,x2:v,x3:S,y1:w,y2:y,y3:x}}drawTitle(t,s,n){const i=this.title,o=i.length;let r,a,l;if(o){const c=yo(n.rtl,this.x,this.width);for(t.x=ei(this,n.titleAlign,n),s.textAlign=c.textAlign(n.titleAlign),s.textBaseline="middle",r=te(n.titleFont),a=n.titleSpacing,s.fillStyle=n.titleColor,s.font=r.string,l=0;l<o;++l)s.fillText(i[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,s,n,i,o){const r=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,u=te(o.bodyFont),f=ei(this,"left",o),h=i.x(f),d=l<u.lineHeight?(u.lineHeight-l)/2:0,m=s.y+d;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},_=i.leftForLtr(h,c)+c/2,v=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Jo(t,p,_,v),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Jo(t,p,_,v)}else{t.lineWidth=tt(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const p=i.leftForLtr(h,c),_=i.leftForLtr(i.xPlus(h,1),c-2),v=mn(r.borderRadius);Object.values(v).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,tr(t,{x:p,y:m,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),tr(t,{x:_,y:m+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,m,c,l),t.strokeRect(p,m,c,l),t.fillStyle=r.backgroundColor,t.fillRect(_,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,s,n){const{body:i}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=n,f=te(n.bodyFont);let h=f.lineHeight,d=0;const m=yo(n.rtl,this.x,this.width),p=function(P){s.fillText(P,m.x(t.x+d),t.y+h/2),t.y+=h+o},_=m.textAlign(r);let v,S,w,y,x,k,C;for(s.textAlign=r,s.textBaseline="middle",s.font=f.string,t.x=ei(this,_,n),s.fillStyle=n.bodyColor,rt(this.beforeBody,p),d=a&&_!=="right"?r==="center"?c/2+u:c+2+u:0,y=0,k=i.length;y<k;++y){for(v=i[y],S=this.labelTextColors[y],s.fillStyle=S,rt(v.before,p),w=v.lines,a&&w.length&&(this._drawColorBox(s,t,y,m,n),h=Math.max(f.lineHeight,l)),x=0,C=w.length;x<C;++x)p(w[x]),h=f.lineHeight;rt(v.after,p)}d=0,h=f.lineHeight,rt(this.afterBody,p),t.y-=o}drawFooter(t,s,n){const i=this.footer,o=i.length;let r,a;if(o){const l=yo(n.rtl,this.x,this.width);for(t.x=ei(this,n.footerAlign,n),t.y+=n.footerMarginTop,s.textAlign=l.textAlign(n.footerAlign),s.textBaseline="middle",r=te(n.footerFont),s.fillStyle=n.footerColor,s.font=r.string,a=0;a<o;++a)s.fillText(i[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+n.footerSpacing}}drawBackground(t,s,n,i){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:u}=n,{topLeft:f,topRight:h,bottomLeft:d,bottomRight:m}=mn(i.cornerRadius);s.fillStyle=i.backgroundColor,s.strokeStyle=i.borderColor,s.lineWidth=i.borderWidth,s.beginPath(),s.moveTo(a+f,l),r==="top"&&this.drawCaret(t,s,n,i),s.lineTo(a+c-h,l),s.quadraticCurveTo(a+c,l,a+c,l+h),r==="center"&&o==="right"&&this.drawCaret(t,s,n,i),s.lineTo(a+c,l+u-m),s.quadraticCurveTo(a+c,l+u,a+c-m,l+u),r==="bottom"&&this.drawCaret(t,s,n,i),s.lineTo(a+d,l+u),s.quadraticCurveTo(a,l+u,a,l+u-d),r==="center"&&o==="left"&&this.drawCaret(t,s,n,i),s.lineTo(a,l+f),s.quadraticCurveTo(a,l,a+f,l),s.closePath(),s.fill(),i.borderWidth>0&&s.stroke()}_updateAnimationTarget(t){const s=this.chart,n=this.$animations,i=n&&n.x,o=n&&n.y;if(i||o){const r=on[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=kl(this,t),l=Object.assign({},r,this._size),c=Cl(s,t,l),u=Tl(t,l,c,s);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const s=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(s);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const r=Ie(s.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;s.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,i,s),Yg(t,s.textDirection),o.y+=r.top,this.drawTitle(o,t,s),this.drawBody(o,t,s),this.drawFooter(o,t,s),Xg(t,s.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,s){const n=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Oi(n,i),r=this._positionChanged(i,s);(o||r)&&(this._active=i,this._eventPosition=s,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,s,n=!0){if(s&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],r=this._getActiveElements(t,o,s,n),a=this._positionChanged(r,t),l=s||!Oi(r,o)||a;return l&&(this._active=r,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,s))),l}_getActiveElements(t,s,n,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return s.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&r.reverse(),r}_positionChanged(t,s){const{caretX:n,caretY:i,options:o}=this,r=on[o.position].call(this,t,s);return r!==!1&&(n!==r.x||i!==r.y)}}$(ir,"positioners",on);var r_={id:"tooltip",_element:ir,positioners:on,afterInit(e,t,s){s&&(e.tooltip=new ir({chart:e,options:s}))},beforeUpdate(e,t,s){e.tooltip&&e.tooltip.initialize(s)},reset(e,t,s){e.tooltip&&e.tooltip.initialize(s)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const s={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...s,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",s)}},afterEvent(e,t){if(e.tooltip){const s=t.replay;e.tooltip.handleEvent(t.event,s,t.inChartArea)&&(t.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:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.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:Ku},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const a_=(e,t,s,n)=>(typeof t=="string"?(s=e.push(t)-1,n.unshift({index:s,label:t})):isNaN(t)&&(s=null),s);function l_(e,t,s,n){const i=e.indexOf(t);if(i===-1)return a_(e,t,s,n);const o=e.lastIndexOf(t);return i!==o?s:i}const c_=(e,t)=>e===null?null:qt(Math.round(e),0,t);function Al(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class or extends Cs{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const s=this._addedLabels;if(s.length){const n=this.getLabels();for(const{index:i,label:o}of s)n[i]===o&&n.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,s){if(ct(t))return null;const n=this.getLabels();return s=isFinite(s)&&n[s]===t?s:l_(n,t,lt(s,t),this._addedLabels),c_(s,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:s}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),s||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,s=this.max,n=this.options.offset,i=[];let o=this.getLabels();o=t===0&&s===o.length-1?o:o.slice(t,s+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=t;r<=s;r++)i.push({value:r});return i}getLabelForValue(t){return Al.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const s=this.ticks;return t<0||t>s.length-1?null:this.getPixelForValue(s[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}$(or,"id","category"),$(or,"defaults",{ticks:{callback:Al}});function u_(e,t){const s=[],{bounds:i,step:o,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:f,includeBounds:h}=e,d=o||1,m=u-1,{min:p,max:_}=t,v=!ct(r),S=!ct(a),w=!ct(c),y=(_-p)/(f+1);let x=Ra((_-p)/m/d)*d,k,C,P,E;if(x<1e-14&&!v&&!S)return[{value:p},{value:_}];E=Math.ceil(_/x)-Math.floor(p/x),E>m&&(x=Ra(E*x/m/d)*d),ct(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),i==="ticks"?(C=Math.floor(p/x)*x,P=Math.ceil(_/x)*x):(C=p,P=_),v&&S&&o&&Up((a-r)/o,x/1e3)?(E=Math.round(Math.min((a-r)/x,u)),x=(a-r)/E,C=r,P=a):w?(C=v?r:C,P=S?a:P,E=c-1,x=(P-C)/E):(E=(P-C)/x,hn(E,Math.round(E),x/1e3)?E=Math.round(E):E=Math.ceil(E));const B=Math.max(La(x),La(C));k=Math.pow(10,ct(l)?B:l),C=Math.round(C*k)/k,P=Math.round(P*k)/k;let N=0;for(v&&(h&&C!==r?(s.push({value:r}),C<r&&N++,hn(Math.round((C+N*x)*k)/k,r,Dl(r,y,e))&&N++):C<r&&N++);N<E;++N){const L=Math.round((C+N*x)*k)/k;if(S&&L>a)break;s.push({value:L})}return S&&h&&P!==a?s.length&&hn(s[s.length-1].value,a,Dl(a,y,e))?s[s.length-1].value=a:s.push({value:a}):(!S||P===a)&&s.push({value:P}),s}function Dl(e,t,{horizontal:s,minRotation:n}){const i=ms(n),o=(s?Math.sin(i):Math.cos(i))||.001,r=.75*t*(""+e).length;return Math.min(t/o,r)}class Yu extends Cs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,s){return ct(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:s,maxDefined:n}=this.getUserBounds();let{min:i,max:o}=this;const r=l=>i=s?i:l,a=l=>o=n?o:l;if(t){const l=be(i),c=be(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:s,stepSize:n}=t,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),s=s||11),s&&(i=Math.min(s,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,s=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:s.precision,step:s.stepSize,count:s.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:s.minRotation||0,includeBounds:s.includeBounds!==!1},o=this._range||this,r=u_(i,o);return t.bounds==="ticks"&&uu(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let s=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-s)/Math.max(t.length-1,1)/2;s-=i,n+=i}this._startValue=s,this._endValue=n,this._valueRange=n-s}getLabelForValue(t){return Ir(t,this.chart.options.locale,this.options.ticks.format)}}class rr extends Yu{determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=It(t)?t:0,this.max=It(s)?s:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),s=t?this.width:this.height,n=ms(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(s/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}$(rr,"id","linear"),$(rr,"defaults",{ticks:{callback:Rr.formatters.numeric}});const An=e=>Math.floor(Ye(e)),hs=(e,t)=>Math.pow(10,An(e)+t);function El(e){return e/Math.pow(10,An(e))===1}function Il(e,t,s){const n=Math.pow(10,s),i=Math.floor(e/n);return Math.ceil(t/n)-i}function f_(e,t){const s=t-e;let n=An(s);for(;Il(e,t,n)>10;)n++;for(;Il(e,t,n)<10;)n--;return Math.min(n,An(e))}function h_(e,{min:t,max:s}){t=Kt(e.min,t);const n=[],i=An(t);let o=f_(t,s),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*r)/r,u=Math.floor((t-l)/a/10)*a*10;let f=Math.floor((c-u)/Math.pow(10,o)),h=Kt(e.min,Math.round((l+u+f*Math.pow(10,o))*r)/r);for(;h<s;)n.push({value:h,major:El(h),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,r=o>=0?1:r),h=Math.round((l+u+f*Math.pow(10,o))*r)/r;const d=Kt(e.max,h);return n.push({value:d,major:El(d),significand:f}),n}class ar extends Cs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,s){const n=Yu.prototype.parse.apply(this,[t,s]);if(n===0){this._zero=!0;return}return It(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=It(t)?Math.max(0,t):null,this.max=It(s)?Math.max(0,s):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!It(this._userMin)&&(this.min=t===hs(this.min,0)?hs(this.min,-1):hs(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:s}=this.getUserBounds();let n=this.min,i=this.max;const o=a=>n=t?n:a,r=a=>i=s?i:a;n===i&&(n<=0?(o(1),r(10)):(o(hs(n,-1)),r(hs(i,1)))),n<=0&&o(hs(i,-1)),i<=0&&r(hs(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,s={min:this._userMin,max:this._userMax},n=h_(s,this);return t.bounds==="ticks"&&uu(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Ir(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ye(t),this._valueRange=Ye(this.max)-Ye(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ye(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const s=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+s*this._valueRange)}}$(ar,"id","logarithmic"),$(ar,"defaults",{ticks:{callback:Rr.formatters.logarithmic,major:{enabled:!0}}});const Qi={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}},Nt=Object.keys(Qi);function Rl(e,t){return e-t}function Ll(e,t){if(ct(t))return null;const s=e._adapter,{parser:n,round:i,isoWeekday:o}=e._parseOpts;let r=t;return typeof n=="function"&&(r=n(r)),It(r)||(r=typeof n=="string"?s.parse(r,n):s.parse(r)),r===null?null:(i&&(r=i==="week"&&(Vs(o)||o===!0)?s.startOf(r,"isoWeek",o):s.startOf(r,i)),+r)}function Fl(e,t,s,n){const i=Nt.length;for(let o=Nt.indexOf(e);o<i-1;++o){const r=Qi[Nt[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((s-t)/(a*r.size))<=n)return Nt[o]}return Nt[i-1]}function d_(e,t,s,n,i){for(let o=Nt.length-1;o>=Nt.indexOf(s);o--){const r=Nt[o];if(Qi[r].common&&e._adapter.diff(i,n,r)>=t-1)return r}return Nt[s?Nt.indexOf(s):0]}function p_(e){for(let t=Nt.indexOf(e)+1,s=Nt.length;t<s;++t)if(Qi[Nt[t]].common)return Nt[t]}function zl(e,t,s){if(!s)e[t]=!0;else if(s.length){const{lo:n,hi:i}=Dr(s,t),o=s[n]>=t?s[n]:s[i];e[o]=!0}}function g_(e,t,s,n){const i=e._adapter,o=+i.startOf(t[0].value,n),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+i.add(a,1,n))l=s[a],l>=0&&(t[l].major=!0);return t}function Bl(e,t,s){const n=[],i={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],i[a]=r,n.push({value:a,major:!1});return o===0||!s?n:g_(e,n,i,s)}class Ri extends Cs{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,s={}){const n=t.time||(t.time={}),i=this._adapter=new Tm._date(t.adapters.date);i.init(s),fn(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=s.normalized}parse(t,s){return t===void 0?null:Ll(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,s=this._adapter,n=t.time.unit||"day";let{min:i,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=It(i)&&!isNaN(i)?i:+s.startOf(Date.now(),n),o=It(o)&&!isNaN(o)?o:+s.endOf(Date.now(),n)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let s=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(s=t[0],n=t[t.length-1]),{min:s,max:n}}buildTicks(){const t=this.options,s=t.time,n=t.ticks,i=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,r=this.max,a=Zp(i,o,r);return this._unit=s.unit||(n.autoSkip?Fl(s.minUnit,this.min,this.max,this._getLabelCapacity(o)):d_(this,a.length,s.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:p_(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),Bl(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let s=0,n=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?s=1-i:s=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;s=qt(s,0,r),n=qt(n,0,r),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,s=this.min,n=this.max,i=this.options,o=i.time,r=o.unit||Fl(o.minUnit,s,n,this._getLabelCapacity(s)),a=lt(i.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Vs(l)||l===!0,u={};let f=s,h,d;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":r),t.diff(n,s,r)>1e5*a)throw new Error(s+" and "+n+" are too far apart with stepSize of "+a+" "+r);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,d=0;h<n;h=+t.add(h,a,r),d++)zl(u,h,m);return(h===n||i.bounds==="ticks"||d===1)&&zl(u,h,m),Object.keys(u).sort(Rl).map(p=>+p)}getLabelForValue(t){const s=this._adapter,n=this.options.time;return n.tooltipFormat?s.format(t,n.tooltipFormat):s.format(t,n.displayFormats.datetime)}format(t,s){const i=this.options.time.displayFormats,o=this._unit,r=s||i[o];return this._adapter.format(t,r)}_tickFormatFunction(t,s,n,i){const o=this.options,r=o.ticks.callback;if(r)return _t(r,[t,s,n],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],f=c&&a[c],h=n[s],d=c&&f&&h&&h.major;return this._adapter.format(t,i||(d?f:u))}generateTickLabels(t){let s,n,i;for(s=0,n=t.length;s<n;++s)i=t[s],i.label=this._tickFormatFunction(i.value,s,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const s=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((s.start+n)*s.factor)}getValueForPixel(t){const s=this._offsets,n=this.getDecimalForPixel(t)/s.factor-s.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const s=this.options.ticks,n=this.ctx.measureText(t).width,i=ms(this.isHorizontal()?s.maxRotation:s.minRotation),o=Math.cos(i),r=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*r,h:n*r+a*o}}_getLabelCapacity(t){const s=this.options.time,n=s.displayFormats,i=n[s.unit]||n.millisecond,o=this._tickFormatFunction(t,0,Bl(this,[t],this._majorUnit),i),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],s,n;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(s=0,n=i.length;s<n;++s)t=t.concat(i[s].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let s,n;if(t.length)return t;const i=this.getLabels();for(s=0,n=i.length;s<n;++s)t.push(Ll(this,i[s]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return du(t.sort(Rl))}}$(Ri,"id","time"),$(Ri,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function si(e,t,s){let n=0,i=e.length-1,o,r,a,l;s?(t>=e[n].pos&&t<=e[i].pos&&({lo:n,hi:i}=bs(e,"pos",t)),{pos:o,time:a}=e[n],{pos:r,time:l}=e[i]):(t>=e[n].time&&t<=e[i].time&&({lo:n,hi:i}=bs(e,"time",t)),{time:o,pos:a}=e[n],{time:r,pos:l}=e[i]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Vl extends Ri{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),s=this._table=this.buildLookupTable(t);this._minPos=si(s,this.min),this._tableRange=si(s,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:s,max:n}=this,i=[],o=[];let r,a,l,c,u;for(r=0,a=t.length;r<a;++r)c=t[r],c>=s&&c<=n&&i.push(c);if(i.length<2)return[{time:s,pos:0},{time:n,pos:1}];for(r=0,a=i.length;r<a;++r)u=i[r+1],l=i[r-1],c=i[r],Math.round((u+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,s=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(s)||n.length===1)&&n.push(s),n.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const s=this.getDataTimestamps(),n=this.getLabelTimestamps();return s.length&&n.length?t=this.normalize(s.concat(n)):t=s.length?s:n,t=this._cache.all=t,t}getDecimalForValue(t){return(si(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const s=this._offsets,n=this.getDecimalForPixel(t)/s.factor-s.end;return si(this._table,n*this._tableRange+this._minPos,!0)}}$(Vl,"id","timeseries"),$(Vl,"defaults",Ri.defaults);const m_={class:"content layoutCol"},b_={class:"legend"},__={__name:"CardFloat",props:{name:{type:String,required:!0},cols:{type:Array,required:!0}},setup(e){const t=e,s=w=>w.some(y=>y===null)?null:w.reduce((y,x)=>y+x)/w.length,n=hp(w=>{const y=X.availableCols.value[w];let x=y.steps.map((k,C)=>({x:k,y:y.values[C]}));return X.options.binsize&&(x=p(x,X.options.binsize,s)),{label:y.run,data:x,fill:!1,pointRadius:0,borderWidth:1,col:y}});mt(()=>[t.cols,X.availableCols],()=>{const w=t.cols.filter(y=>y in X.availableCols.value);n.setTo(w);for(const y of w)if(y in n.value){const x=n.value[y].col,k=X.availableCols.value[y];x!==k&&n.add(y,!0)}},{deep:!0,immediate:!0}),mt(()=>X.options.binsize,()=>{n.refresh()},{deep:!0});const i=Mt(()=>t.cols.sort().filter(w=>w in n.value).map(w=>n.value[w]).map((w,y)=>({...w,borderColor:u[y%u.length]}))),o=Mt(()=>t.cols.filter(w=>X.pendingCols.value.has(w)).length>0),r={x:Number.MAX_VALUE,y:-Number.MAX_VALUE},a=bt(r),l=Mc("root");let c=null;const u=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffd92e","#a65628","#f781bf","#999999"],f=Mt(()=>i.value.map(w=>{const y=m(w.data,a.value.x),x=w.data[y].x,k=w.data[y].y,C=x.toLocaleString("en-US");let P;return k===null?P="NaN":.01<=Math.abs(k)&&Math.abs(k)<=1e4?P=k.toFixed(3):P=k.toExponential(2),{run:w.label,color:w.borderColor,step:x,value:k,formattedStep:C,formattedValue:P}}).filter(w=>w!==null).sort((w,y)=>{const x=Math.abs(w.value-a.value.y),k=Math.abs(y.value-a.value.y);return x-k}));Ui(()=>{const w=l.value.$el.querySelector("canvas");c=d(w),h()}),mt(()=>i,()=>h(),{deep:2});function h(){if(c===null)return;const w=i.value.slice();for(const y of w){let x=[],k=!0;for(const[C,P]of y.data.entries())P.y===null&&(k.y!==null||C==y.data.length-1)&&x.push({x:P.x,y:0}),k=P;x.length&&w.push({data:x,borderWidth:0,backgroundColor:y.borderColor,showLine:!1,pointStyle:"triangle",pointRadius:10,pointHoverRadius:10})}c.data.datasets=w,c.updateDebounced()}function d(w){const y=new ke(w,{type:"line",data:{datasets:[]},options:{animation:!1,responsive:!0,maintainAspectRatio:!1,resizeDelay:10,pointHoverRadius:0,parsing:!1,scales:{x:{type:"linear",position:"bottom",maxRotation:0},y:{type:"linear",position:"left",maxRotation:0}},plugins:{tooltip:{enabled:!1},zoom:{enabled:!0,onMove:x=>{a.value=x}}}}});return y.updateDebounced=S(()=>y.update("none"),200),y}function m(w,y){if(!w.length)return null;let x=0,k=1/0;for(const[C,P]of w.entries()){const E=Math.abs(P.x-y);E<=k&&(x=C,k=E)}return x}function p(w,y,x){const k=[];let C=null,P=null,E=[];for(const[B,N]of w.entries())P=(Math.round(N.x/y)+.5)*y,P!==C&&(E.length&&k.push({x:C,y:x(E)}),E.length=0,C=P),E.push(N.y);return E.length&&P!==null&&k.push({x:C,y:x(E)}),k}let _=null;function v(w){if(!f.value.length)return;const y=l.value.$el.querySelector(".legend");let x=y.scrollLeft+w.deltaX,k=y.scrollTop+w.deltaY;x=Math.max(0,Math.min(x,y.scrollWidth-y.offsetWidth)),k=Math.max(0,Math.min(k,y.scrollHeight-y.offsetHeight));const C=Date.now();_!==null&&C-_>100&&x==y.scrollLeft&&k==y.scrollTop||(_=C,y.scrollTo({left:x,top:k,behavior:"instant"}),w.preventDefault())}const S=(w,y,x)=>{let k=null;return function(){let C=this,P=arguments;const E=!k;clearTimeout(k),k=setTimeout(()=>{k=null,E||w.apply(C,P)},y),E&&setTimeout(()=>w.apply(C,P))}};return(w,y)=>(Y(),pe(Zi,{name:t.name,loading:o.value,scrollX:!1,scrollY:!1,ref_key:"root",ref:l},{default:Pe(()=>[H("div",m_,[H("div",{class:"chart",onWheel:v},y[0]||(y[0]=[H("canvas",null,null,-1)]),32),H("div",b_,[(Y(!0),at(yt,null,En(f.value,x=>(Y(),at("div",{class:"entry",key:x.run},[H("div",{style:Vi({background:x.color})},null,4),H("div",null,gt(x.run),1),H("div",null,gt(x.formattedStep),1),H("div",null,gt(x.formattedValue),1)]))),128))])])]),_:1},8,["name","loading"]))}},x_=ns(__,[["__scopeId","data-v-d7630433"]]),y_=["title"],v_=["title"],w_={class:"count"},S_={class:"step"},M_={class:"player"},k_=["controls","url"],C_=["src"],T_={key:0,class:"icon spinner"},P_={__name:"CardVideo",props:{name:{type:String,required:!0},cols:{type:Array,required:!0}},setup(e){const t=e,s=Mt(()=>t.cols.filter(x=>x in X.availableCols.value).sort().toReversed().map(x=>X.availableCols.value[x])),n=Mt(()=>t.cols.filter(x=>X.pendingCols.value.has(x)).length>0),i=Mt(()=>s.value.map(x=>{const k=o(x.steps,X.options.stepsel),C=x.values[k];return{run:x.run,url:`/api/file/${C}`,steps:x.steps,values:x.values,selectedIndex:k,selectedStep:x.steps[k],maxStep:Math.max(...x.steps)}}));function o(x,k){if(k===null)return x.length-1;let C=0,P=1/0;for(const[E,B]of x.entries()){const N=Math.abs(B-k);N<=P&&(C=E,P=N)}return P===1/0?null:C}const r=bt(!1),a=bt(!1),l=bt(!0),c=bt(new Set),u=Mc("root");function f(){return[...u.value.$el.querySelectorAll("video")]}function h(){f().map(x=>x.play()),r.value=!0}function d(){f().map(x=>x.pause()),r.value=!1}function m(){r.value=!1,f().map(x=>{x.pause(),c.value.add(x.getAttribute("url")),x.currentTime=0})}function p(){a.value=!a.value}function _(){l.value=!l.value}let v=0,S=0;function w(x){const k=Date.now();if(!v||k-v>200){v=k;return}if(!x.target.duration||S&&k-S<200)return;v=k,S=k,c.value.add(x.target.getAttribute("url"));const C=x.target.currentTime;setTimeout(()=>{f().filter(P=>P!==x.target).filter(P=>P.paused).filter(P=>P.duration).forEach(P=>{c.value.add(P.getAttribute("url")),P.currentTime=Math.min(C,P.duration)})},10)}function y(x){c.value.delete(x.target.getAttribute("url"))}return(x,k)=>(Y(),pe(Zi,{name:t.name,loading:n.value,scrollX:a.value,scrollY:!0,ref_key:"root",ref:u},{buttons:Pe(()=>[H("span",{class:"btn icon",onClick:p,title:a.value?"Small size":"Large size"},gt(a.value?"zoom_out":"zoom_in"),9,y_),H("span",{class:"btn icon",onClick:_,title:l.value?"Hide controls":"Show controls"},gt(l.value?"videogame_asset_off":"videogame_asset"),9,v_),H("span",{class:"btn icon",onClick:m,title:"Stop all"},"stop"),r.value?(Y(),at("span",{key:0,class:"btn icon",onClick:d,title:"Pause all"},"pause")):ge("",!0),r.value?ge("",!0):(Y(),at("span",{key:1,class:"btn icon",onClick:h,title:"Play all"},"play_arrow"))]),default:Pe(()=>[(Y(!0),at(yt,null,En(i.value,C=>(Y(),at("div",{key:C.url,class:Ze(["entry",{large:a.value}])},[H("h3",null,gt(C.run),1),H("span",w_,"Index: "+gt(C.selectedIndex)+"/"+gt(C.steps.length),1),H("span",S_,"Step: "+gt(C.selectedStep)+"/"+gt(C.maxStep),1),k[0]||(k[0]=H("br",null,null,-1)),H("div",M_,[C.steps.length?(Y(),at("video",{key:0,controls:l.value,loop:"",tabindex:"-1",url:C.url,onSeeking:w,onSeeked:y},[H("source",{src:C.url},null,8,C_)],40,k_)):ge("",!0),pt(Mr,null,{default:Pe(()=>[c.value.has(C.url)?(Y(),at("span",T_,"progress_activity")):ge("",!0)]),_:2},1024)])],2))),128))]),_:1},8,["name","loading","scrollX"]))}},O_=ns(P_,[["__scopeId","data-v-f1b7e045"]]),A_={class:"entry"},D_={class:"count"},E_={class:"step"},I_=["innerHTML"],R_={key:1,class:"icon spinner"},L_={__name:"CardText",props:{name:{type:String,required:!0},cols:{type:Array,required:!0}},setup(e){const t=e,s=bt({}),n=bt(new Set),i=Mt(()=>t.cols.filter(l=>l in X.availableCols.value).sort().toReversed().map(l=>X.availableCols.value[l])),o=Mt(()=>t.cols.filter(l=>X.pendingCols.value.has(l)).length>0||n.size>0),r=Mt(()=>i.value.map(l=>{const c=a(l.steps,X.options.stepsel),u=l.values[c];return{run:l.run,file:u,steps:l.steps,values:l.values,selectedIndex:c,selectedStep:l.steps[c],maxStep:Math.max(...l.steps)}}));mt(()=>r,()=>{const l=new Set(r.value.map(c=>c.file));Object.keys(s.value).filter(c=>!l.has(c)).map(c=>delete s.value[c]),[...l].filter(c=>!(c in s.value)).map(c=>(n.value.add(c),c)).map(c=>X.get(`/api/file/${c}`).then(u=>s.value[u.id]=u).finally(()=>n.value.delete(c)))},{deep:2});function a(l,c){if(c===null)return l.length-1;let u=0,f=1/0;for(const[h,d]of l.entries()){const m=Math.abs(d-c);m<=f&&(u=h,f=m)}return f===1/0?null:u}return(l,c)=>(Y(),pe(Zi,{name:t.name,loading:o.value,scrollX:!1,scrollY:!0},{default:Pe(()=>[(Y(!0),at(yt,null,En(r.value,u=>(Y(),at("div",A_,[H("h3",null,gt(u.run),1),H("span",D_,"Index: "+gt(u.selectedIndex)+"/"+gt(u.steps.length),1),H("span",E_,"Step: "+gt(u.selectedStep)+"/"+gt(u.maxStep),1),c[0]||(c[0]=H("br",null,null,-1)),u.file in s.value?(Y(),at("pre",{key:0,innerHTML:s.value[u.file].text},null,8,I_)):(Y(),at("span",R_,"progress_activity"))]))),256))]),_:1},8,["name","loading"]))}},F_=ns(L_,[["__scopeId","data-v-fe727dd4"]]),z_={class:"header layoutRow focusgroup"},B_=["title"],V_={class:"content layoutRow"},N_={class:"right layoutCol"},$_={class:"left layoutCol"},H_={class:"center"},j_=["focusCols"],W_={__name:"App",setup(e){tu(i=>({"2aaae728":t.columns}));const t=ss(Be("settings",{columns:3,dark:!1}));mt(()=>t,i=>ze("settings",i),{deep:!0});function s(){t.columns=t.columns%5+1}const n=bt(!1);return document.addEventListener("keydown",i=>{i.key=="Tab"&&(n.value=!0),Bd(i)}),document.addEventListener("mousedown",i=>{n.value=!1}),(i,o)=>(Y(),at("div",{class:Ze(["app layoutCol",{dark:t.dark,keyboardMode:n.value}])},[H("div",z_,[o[5]||(o[5]=H("span",{class:"logo"},null,-1)),o[6]||(o[6]=H("h1",null,"Scope",-1)),o[7]||(o[7]=H("span",{class:"fill"},null,-1)),H("button",{class:"btn icon",onClick:o[0]||(o[0]=(...r)=>Ot(X).refresh&&Ot(X).refresh(...r)),title:"Refresh"},"refresh"),H("button",{class:"btn icon",onClick:s,title:"Change layout"},"view_column"),H("button",{class:"btn icon",onClick:o[1]||(o[1]=r=>t.dark=!t.dark),title:t.dark?"Light mode":"Dark mode"},gt(t.dark?"light_mode":"dark_mode"),9,B_)]),H("div",V_,[H("div",N_,[pt(mo,{items:Ot(X).availableExps.value,modelValue:Ot(X).selExps.value,"onUpdate:modelValue":o[2]||(o[2]=r=>Ot(X).selExps.value=r),reverse:!0,loading:!!Ot(X).pendingEids.value,storageKey:"selectorFolders",title:"Folders",class:"selector"},null,8,["items","modelValue","loading"]),pt(mo,{items:Ot(X).availableRuns.value,modelValue:Ot(X).selRuns.value,"onUpdate:modelValue":o[3]||(o[3]=r=>Ot(X).selRuns.value=r),loading:!!Ot(X).pendingExps.value.size,storageKey:"selectorRuns",title:"Runs",class:"selector"},null,8,["items","modelValue","loading"])]),H("div",$_,[pt(mo,{items:Ot(X).availableMets.value,modelValue:Ot(X).selMets.value,"onUpdate:modelValue":o[4]||(o[4]=r=>Ot(X).selMets.value=r),loading:!!Ot(X).pendingRuns.value.size,storageKey:"selectorMets",title:"Metrics",class:"selector"},null,8,["items","modelValue","loading"]),pt(rp,{class:"options"})]),H("div",H_,[H("div",{class:"cards focusgroup",focusCols:t.columns},[(Y(!0),at(yt,null,En(Ot(X).availableCards.value,r=>(Y(),at(yt,{key:r.name},[r.ext=="float"?(Y(),pe(x_,{key:0,name:r.name,cols:r.cols,class:"card"},null,8,["name","cols"])):r.ext=="txt"?(Y(),pe(F_,{key:1,name:r.name,cols:r.cols,class:"card"},null,8,["name","cols"])):["mp4","webm"].includes(r.ext)?(Y(),pe(O_,{key:2,name:r.name,cols:r.cols,class:"card"},null,8,["name","cols"])):(Y(),pe(Zi,{key:3,name:r.name,class:"card"},{default:Pe(()=>[wr(" Unknown metric type: "+gt(r.ext),1)]),_:2},1032,["name"]))],64))),128))],8,j_)])])],2))}},U_=ns(W_,[["__scopeId","data-v-4a148b8b"]]),K_={id:"zoom",events:["mousemove","mousedown","mouseup","mouseout"],afterInit:function(e,t,s){e.zoom={options:s,canvasPos:null,dataPos:null,dragStart:null,dragging:!1,updating:!1,prevMouseUp:0,prevMouseDown:0,mouseUpListener:null};for(const n of this.events)e.options.events.indexOf(n)<0&&e.options.events.push(n);e.zoom.mouseUpListener=n=>{this.stopDrag(e)},e.zoom.moveDebounced=Y_(n=>{this.move(e,de(n,e))},3),document.addEventListener("mouseup",e.zoom.mouseUpListener)},afterDestroy:function(e){document.removeEventListener("mouseup",e.zoom.mouseUpListener)},afterEvent:function(e,t){if(t.event.type=="mousemove"&&e.zoom.moveDebounced(t.event),t.event.type=="mousedown"){this.move(e,de(t.event,e));const s=Date.now();s-e.zoom.prevMouseDown<100||(e.zoom.dragStart=e.zoom.dataPos.x,e.zoom.dragging=!0,e.zoom.prevMouseDown=s)}if(t.event.type=="mouseup"){this.move(e,de(t.event,e));const s=Date.now();s-e.zoom.prevMouseUp<500?this.reset(e):e.zoom.dragging&&this.stopDrag(e),e.zoom.dragging=!1,e.zoom.prevMouseUp=s}t.event.type=="mouseout"&&e.zoom.onLeave&&e.zoom.onLeave()},afterDraw:function(e,t){if(e.zoom.dataPos===null)return;const{x:s,y:n}=this.scales(e),i=s.getPixelForValue(e.zoom.dataPos.x),o=n.getPixelForValue(n.min),r=n.getPixelForValue(n.max);if(e.zoom.dragging){const a=s.getPixelForValue(e.zoom.dragStart);e.ctx.beginPath(),e.ctx.rect(a,o,i-a,r-o),e.ctx.lineWidth=1,e.ctx.strokeStyle="rgba(127,127,127,0.8)",e.ctx.fillStyle="rgba(127,127,127,0.1)",e.ctx.fill(),e.ctx.fillStyle="",e.ctx.stroke(),e.ctx.closePath()}else e.ctx.beginPath(),e.ctx.moveTo(i,o),e.ctx.lineWidth=1,e.ctx.strokeStyle="rgba(127,127,127,0.8)",e.ctx.lineTo(i,r),e.ctx.stroke();return!0},move:function(e,t){const{x:s,y:n}=this.scales(e);let i=s.getValueForPixel(t.x),o=n.getValueForPixel(t.y);i=Math.max(s.min,Math.min(i,s.max)),o=Math.max(n.min,Math.min(o,n.max)),e.zoom.canvasPos=t,e.zoom.dataPos={x:i,y:o},this.updateOnce(e),e.zoom.options.onMove&&e.zoom.options.onMove(e.zoom.dataPos)},zoom:function(e,t,s){if(e.zoom.dragging=!1,t===s){this.updateOnce(e);return}e.options.scales.x.min=t,e.options.scales.x.max=s,this.updateOnce(e),this.move(e,e.zoom.canvasPos),e.zoom.options.onZoom&&e.zoom.options.onZoom(t,s)},reset:function(e){e.zoom.dragging=!1,delete e.options.scales.x.min,delete e.options.scales.x.max,this.updateOnce(e),this.move(e,e.zoom.canvasPos),e.zoom.options.onReset&&e.zoom.options.onReset()},updateOnce:function(e){e.zoom.updating||(e.zoom.updating=!0,e.update("none"),e.zoom.updating=!1)},stopDrag:function(e){if(!e.zoom.dragging)return;e.zoom.dragging=!1;const t=e.zoom.dataPos.x,s=Math.min(e.zoom.dragStart,t),n=Math.max(e.zoom.dragStart,t);this.zoom(e,s,n)},scales:function(e){return{x:e.scales.x,y:e.scales.y}}},Y_=(e,t,s)=>{let n=null;return function(){let i=this,o=arguments;const r=!n;clearTimeout(n),n=setTimeout(()=>{n=null,r||e.apply(i,o)},t),r&&setTimeout(()=>e.apply(i,o))}};ke.register(di,pi,hi,nn,bi,_i,rr,ar,Jb,or,r_,K_);const X_=kd(U_);X_.mount("body");document.fonts.load('24px "Material Symbols Outlined"').then(e=>{e.length?document.body.classList.add("icon-font-loaded"):console.error("Failed to load icon font")});
|
|
34
|
+
`):e}function Qb(e,t){const{element:s,datasetIndex:n,index:i}=t,o=e.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:e,label:r,parsed:o.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:n,element:s}}function kl(e,t){const s=e.chart.ctx,{body:n,footer:i,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=te(t.bodyFont),c=te(t.titleFont),u=te(t.footerFont),f=o.length,h=i.length,d=n.length,m=Ie(t.padding);let p=m.height,_=0,v=n.reduce((y,x)=>y+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(p+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),v){const y=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=d*y+(v-d)*l.lineHeight+(v-1)*t.bodySpacing}h&&(p+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let S=0;const w=function(y){_=Math.max(_,s.measureText(y).width+S)};return s.save(),s.font=c.string,rt(e.title,w),s.font=l.string,rt(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?r+2+t.boxPadding:0,rt(n,y=>{rt(y.before,w),rt(y.lines,w),rt(y.after,w)}),S=0,s.font=u.string,rt(e.footer,w),s.restore(),_+=m.width,{width:_,height:p}}function t_(e,t){const{y:s,height:n}=t;return s<n/2?"top":s>e.height-n/2?"bottom":"center"}function e_(e,t,s,n){const{x:i,width:o}=n,r=s.caretSize+s.caretPadding;if(e==="left"&&i+o+r>t.width||e==="right"&&i-o-r<0)return!0}function s_(e,t,s,n){const{x:i,width:o}=s,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return n==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),e_(c,e,t,s)&&(c="center"),c}function Cl(e,t,s){const n=s.yAlign||t.yAlign||t_(e,s);return{xAlign:s.xAlign||t.xAlign||s_(e,t,s,n),yAlign:n}}function n_(e,t){let{x:s,width:n}=e;return t==="right"?s-=n:t==="center"&&(s-=n/2),s}function i_(e,t,s){let{y:n,height:i}=e;return t==="top"?n+=s:t==="bottom"?n-=i+s:n-=i/2,n}function Tl(e,t,s,n){const{caretSize:i,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=s,c=i+o,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:d}=mn(r);let m=n_(t,a);const p=i_(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,h)+i:a==="right"&&(m+=Math.max(f,d)+i),{x:qt(m,0,n.width-t.width),y:qt(p,0,n.height-t.height)}}function ei(e,t,s){const n=Ie(s.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function Pl(e){return ce([],we(e))}function o_(e,t,s){return Ms(e,{tooltip:t,tooltipItems:s,type:"tooltip"})}function Ol(e,t){const s=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return s?e.override(s):e}const Ku={beforeTitle:ye,title(e){if(e.length>0){const t=e[0],s=t.chart.data.labels,n=s?s.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return s[t.dataIndex]}return""},afterTitle:ye,beforeBody:ye,beforeLabel:ye,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const s=e.formattedValue;return ct(s)||(t+=s),t},labelColor(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:s.borderColor,backgroundColor:s.backgroundColor,borderWidth:s.borderWidth,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:s.pointStyle,rotation:s.rotation}},afterLabel:ye,afterBody:ye,beforeFooter:ye,footer:ye,afterFooter:ye};function Bt(e,t,s,n){const i=e[t].call(s,n);return typeof i>"u"?Ku[t].call(s,n):i}class ir extends ks{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const s=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&s.options.animation&&n.animations,o=new Au(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=o_(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,s){const{callbacks:n}=s,i=Bt(n,"beforeTitle",this,t),o=Bt(n,"title",this,t),r=Bt(n,"afterTitle",this,t);let a=[];return a=ce(a,we(i)),a=ce(a,we(o)),a=ce(a,we(r)),a}getBeforeBody(t,s){return Pl(Bt(s.callbacks,"beforeBody",this,t))}getBody(t,s){const{callbacks:n}=s,i=[];return rt(t,o=>{const r={before:[],lines:[],after:[]},a=Ol(n,o);ce(r.before,we(Bt(a,"beforeLabel",this,o))),ce(r.lines,Bt(a,"label",this,o)),ce(r.after,we(Bt(a,"afterLabel",this,o))),i.push(r)}),i}getAfterBody(t,s){return Pl(Bt(s.callbacks,"afterBody",this,t))}getFooter(t,s){const{callbacks:n}=s,i=Bt(n,"beforeFooter",this,t),o=Bt(n,"footer",this,t),r=Bt(n,"afterFooter",this,t);let a=[];return a=ce(a,we(i)),a=ce(a,we(o)),a=ce(a,we(r)),a}_createItems(t){const s=this._active,n=this.chart.data,i=[],o=[],r=[];let a=[],l,c;for(l=0,c=s.length;l<c;++l)a.push(Qb(this.chart,s[l]));return t.filter&&(a=a.filter((u,f,h)=>t.filter(u,f,h,n))),t.itemSort&&(a=a.sort((u,f)=>t.itemSort(u,f,n))),rt(a,u=>{const f=Ol(t.callbacks,u);i.push(Bt(f,"labelColor",this,u)),o.push(Bt(f,"labelPointStyle",this,u)),r.push(Bt(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,s){const n=this.options.setContext(this.getContext()),i=this._active;let o,r=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=on[n.position].call(this,i,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);const l=this._size=kl(this,n),c=Object.assign({},a,l),u=Cl(this.chart,n,c),f=Tl(n,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:s})}drawCaret(t,s,n,i){const o=this.getCaretPosition(t,n,i);s.lineTo(o.x1,o.y1),s.lineTo(o.x2,o.y2),s.lineTo(o.x3,o.y3)}getCaretPosition(t,s,n){const{xAlign:i,yAlign:o}=this,{caretSize:r,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:f}=mn(a),{x:h,y:d}=t,{width:m,height:p}=s;let _,v,S,w,y,x;return o==="center"?(y=d+p/2,i==="left"?(_=h,v=_-r,w=y+r,x=y-r):(_=h+m,v=_+r,w=y-r,x=y+r),S=_):(i==="left"?v=h+Math.max(l,u)+r:i==="right"?v=h+m-Math.max(c,f)-r:v=this.caretX,o==="top"?(w=d,y=w-r,_=v-r,S=v+r):(w=d+p,y=w+r,_=v+r,S=v-r),x=w),{x1:_,x2:v,x3:S,y1:w,y2:y,y3:x}}drawTitle(t,s,n){const i=this.title,o=i.length;let r,a,l;if(o){const c=yo(n.rtl,this.x,this.width);for(t.x=ei(this,n.titleAlign,n),s.textAlign=c.textAlign(n.titleAlign),s.textBaseline="middle",r=te(n.titleFont),a=n.titleSpacing,s.fillStyle=n.titleColor,s.font=r.string,l=0;l<o;++l)s.fillText(i[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,s,n,i,o){const r=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,u=te(o.bodyFont),f=ei(this,"left",o),h=i.x(f),d=l<u.lineHeight?(u.lineHeight-l)/2:0,m=s.y+d;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},_=i.leftForLtr(h,c)+c/2,v=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Jo(t,p,_,v),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Jo(t,p,_,v)}else{t.lineWidth=tt(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const p=i.leftForLtr(h,c),_=i.leftForLtr(i.xPlus(h,1),c-2),v=mn(r.borderRadius);Object.values(v).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,tr(t,{x:p,y:m,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),tr(t,{x:_,y:m+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,m,c,l),t.strokeRect(p,m,c,l),t.fillStyle=r.backgroundColor,t.fillRect(_,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,s,n){const{body:i}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=n,f=te(n.bodyFont);let h=f.lineHeight,d=0;const m=yo(n.rtl,this.x,this.width),p=function(P){s.fillText(P,m.x(t.x+d),t.y+h/2),t.y+=h+o},_=m.textAlign(r);let v,S,w,y,x,k,C;for(s.textAlign=r,s.textBaseline="middle",s.font=f.string,t.x=ei(this,_,n),s.fillStyle=n.bodyColor,rt(this.beforeBody,p),d=a&&_!=="right"?r==="center"?c/2+u:c+2+u:0,y=0,k=i.length;y<k;++y){for(v=i[y],S=this.labelTextColors[y],s.fillStyle=S,rt(v.before,p),w=v.lines,a&&w.length&&(this._drawColorBox(s,t,y,m,n),h=Math.max(f.lineHeight,l)),x=0,C=w.length;x<C;++x)p(w[x]),h=f.lineHeight;rt(v.after,p)}d=0,h=f.lineHeight,rt(this.afterBody,p),t.y-=o}drawFooter(t,s,n){const i=this.footer,o=i.length;let r,a;if(o){const l=yo(n.rtl,this.x,this.width);for(t.x=ei(this,n.footerAlign,n),t.y+=n.footerMarginTop,s.textAlign=l.textAlign(n.footerAlign),s.textBaseline="middle",r=te(n.footerFont),s.fillStyle=n.footerColor,s.font=r.string,a=0;a<o;++a)s.fillText(i[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+n.footerSpacing}}drawBackground(t,s,n,i){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:u}=n,{topLeft:f,topRight:h,bottomLeft:d,bottomRight:m}=mn(i.cornerRadius);s.fillStyle=i.backgroundColor,s.strokeStyle=i.borderColor,s.lineWidth=i.borderWidth,s.beginPath(),s.moveTo(a+f,l),r==="top"&&this.drawCaret(t,s,n,i),s.lineTo(a+c-h,l),s.quadraticCurveTo(a+c,l,a+c,l+h),r==="center"&&o==="right"&&this.drawCaret(t,s,n,i),s.lineTo(a+c,l+u-m),s.quadraticCurveTo(a+c,l+u,a+c-m,l+u),r==="bottom"&&this.drawCaret(t,s,n,i),s.lineTo(a+d,l+u),s.quadraticCurveTo(a,l+u,a,l+u-d),r==="center"&&o==="left"&&this.drawCaret(t,s,n,i),s.lineTo(a,l+f),s.quadraticCurveTo(a,l,a+f,l),s.closePath(),s.fill(),i.borderWidth>0&&s.stroke()}_updateAnimationTarget(t){const s=this.chart,n=this.$animations,i=n&&n.x,o=n&&n.y;if(i||o){const r=on[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=kl(this,t),l=Object.assign({},r,this._size),c=Cl(s,t,l),u=Tl(t,l,c,s);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const s=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(s);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const r=Ie(s.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;s.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,i,s),Yg(t,s.textDirection),o.y+=r.top,this.drawTitle(o,t,s),this.drawBody(o,t,s),this.drawFooter(o,t,s),Xg(t,s.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,s){const n=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Oi(n,i),r=this._positionChanged(i,s);(o||r)&&(this._active=i,this._eventPosition=s,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,s,n=!0){if(s&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],r=this._getActiveElements(t,o,s,n),a=this._positionChanged(r,t),l=s||!Oi(r,o)||a;return l&&(this._active=r,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,s))),l}_getActiveElements(t,s,n,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return s.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&r.reverse(),r}_positionChanged(t,s){const{caretX:n,caretY:i,options:o}=this,r=on[o.position].call(this,t,s);return r!==!1&&(n!==r.x||i!==r.y)}}$(ir,"positioners",on);var r_={id:"tooltip",_element:ir,positioners:on,afterInit(e,t,s){s&&(e.tooltip=new ir({chart:e,options:s}))},beforeUpdate(e,t,s){e.tooltip&&e.tooltip.initialize(s)},reset(e,t,s){e.tooltip&&e.tooltip.initialize(s)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const s={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...s,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",s)}},afterEvent(e,t){if(e.tooltip){const s=t.replay;e.tooltip.handleEvent(t.event,s,t.inChartArea)&&(t.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:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.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:Ku},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const a_=(e,t,s,n)=>(typeof t=="string"?(s=e.push(t)-1,n.unshift({index:s,label:t})):isNaN(t)&&(s=null),s);function l_(e,t,s,n){const i=e.indexOf(t);if(i===-1)return a_(e,t,s,n);const o=e.lastIndexOf(t);return i!==o?s:i}const c_=(e,t)=>e===null?null:qt(Math.round(e),0,t);function Al(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class or extends Cs{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const s=this._addedLabels;if(s.length){const n=this.getLabels();for(const{index:i,label:o}of s)n[i]===o&&n.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,s){if(ct(t))return null;const n=this.getLabels();return s=isFinite(s)&&n[s]===t?s:l_(n,t,lt(s,t),this._addedLabels),c_(s,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:s}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),s||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,s=this.max,n=this.options.offset,i=[];let o=this.getLabels();o=t===0&&s===o.length-1?o:o.slice(t,s+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=t;r<=s;r++)i.push({value:r});return i}getLabelForValue(t){return Al.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const s=this.ticks;return t<0||t>s.length-1?null:this.getPixelForValue(s[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}$(or,"id","category"),$(or,"defaults",{ticks:{callback:Al}});function u_(e,t){const s=[],{bounds:i,step:o,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:f,includeBounds:h}=e,d=o||1,m=u-1,{min:p,max:_}=t,v=!ct(r),S=!ct(a),w=!ct(c),y=(_-p)/(f+1);let x=Ra((_-p)/m/d)*d,k,C,P,E;if(x<1e-14&&!v&&!S)return[{value:p},{value:_}];E=Math.ceil(_/x)-Math.floor(p/x),E>m&&(x=Ra(E*x/m/d)*d),ct(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),i==="ticks"?(C=Math.floor(p/x)*x,P=Math.ceil(_/x)*x):(C=p,P=_),v&&S&&o&&Up((a-r)/o,x/1e3)?(E=Math.round(Math.min((a-r)/x,u)),x=(a-r)/E,C=r,P=a):w?(C=v?r:C,P=S?a:P,E=c-1,x=(P-C)/E):(E=(P-C)/x,hn(E,Math.round(E),x/1e3)?E=Math.round(E):E=Math.ceil(E));const B=Math.max(La(x),La(C));k=Math.pow(10,ct(l)?B:l),C=Math.round(C*k)/k,P=Math.round(P*k)/k;let N=0;for(v&&(h&&C!==r?(s.push({value:r}),C<r&&N++,hn(Math.round((C+N*x)*k)/k,r,Dl(r,y,e))&&N++):C<r&&N++);N<E;++N){const L=Math.round((C+N*x)*k)/k;if(S&&L>a)break;s.push({value:L})}return S&&h&&P!==a?s.length&&hn(s[s.length-1].value,a,Dl(a,y,e))?s[s.length-1].value=a:s.push({value:a}):(!S||P===a)&&s.push({value:P}),s}function Dl(e,t,{horizontal:s,minRotation:n}){const i=ms(n),o=(s?Math.sin(i):Math.cos(i))||.001,r=.75*t*(""+e).length;return Math.min(t/o,r)}class Yu extends Cs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,s){return ct(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:s,maxDefined:n}=this.getUserBounds();let{min:i,max:o}=this;const r=l=>i=s?i:l,a=l=>o=n?o:l;if(t){const l=be(i),c=be(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:s,stepSize:n}=t,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),s=s||11),s&&(i=Math.min(s,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,s=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:s.precision,step:s.stepSize,count:s.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:s.minRotation||0,includeBounds:s.includeBounds!==!1},o=this._range||this,r=u_(i,o);return t.bounds==="ticks"&&uu(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let s=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-s)/Math.max(t.length-1,1)/2;s-=i,n+=i}this._startValue=s,this._endValue=n,this._valueRange=n-s}getLabelForValue(t){return Ir(t,this.chart.options.locale,this.options.ticks.format)}}class rr extends Yu{determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=It(t)?t:0,this.max=It(s)?s:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),s=t?this.width:this.height,n=ms(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(s/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}$(rr,"id","linear"),$(rr,"defaults",{ticks:{callback:Rr.formatters.numeric}});const An=e=>Math.floor(Ye(e)),hs=(e,t)=>Math.pow(10,An(e)+t);function El(e){return e/Math.pow(10,An(e))===1}function Il(e,t,s){const n=Math.pow(10,s),i=Math.floor(e/n);return Math.ceil(t/n)-i}function f_(e,t){const s=t-e;let n=An(s);for(;Il(e,t,n)>10;)n++;for(;Il(e,t,n)<10;)n--;return Math.min(n,An(e))}function h_(e,{min:t,max:s}){t=Kt(e.min,t);const n=[],i=An(t);let o=f_(t,s),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*r)/r,u=Math.floor((t-l)/a/10)*a*10;let f=Math.floor((c-u)/Math.pow(10,o)),h=Kt(e.min,Math.round((l+u+f*Math.pow(10,o))*r)/r);for(;h<s;)n.push({value:h,major:El(h),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,r=o>=0?1:r),h=Math.round((l+u+f*Math.pow(10,o))*r)/r;const d=Kt(e.max,h);return n.push({value:d,major:El(d),significand:f}),n}class ar extends Cs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,s){const n=Yu.prototype.parse.apply(this,[t,s]);if(n===0){this._zero=!0;return}return It(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=It(t)?Math.max(0,t):null,this.max=It(s)?Math.max(0,s):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!It(this._userMin)&&(this.min=t===hs(this.min,0)?hs(this.min,-1):hs(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:s}=this.getUserBounds();let n=this.min,i=this.max;const o=a=>n=t?n:a,r=a=>i=s?i:a;n===i&&(n<=0?(o(1),r(10)):(o(hs(n,-1)),r(hs(i,1)))),n<=0&&o(hs(i,-1)),i<=0&&r(hs(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,s={min:this._userMin,max:this._userMax},n=h_(s,this);return t.bounds==="ticks"&&uu(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Ir(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ye(t),this._valueRange=Ye(this.max)-Ye(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ye(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const s=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+s*this._valueRange)}}$(ar,"id","logarithmic"),$(ar,"defaults",{ticks:{callback:Rr.formatters.logarithmic,major:{enabled:!0}}});const Qi={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}},Nt=Object.keys(Qi);function Rl(e,t){return e-t}function Ll(e,t){if(ct(t))return null;const s=e._adapter,{parser:n,round:i,isoWeekday:o}=e._parseOpts;let r=t;return typeof n=="function"&&(r=n(r)),It(r)||(r=typeof n=="string"?s.parse(r,n):s.parse(r)),r===null?null:(i&&(r=i==="week"&&(Vs(o)||o===!0)?s.startOf(r,"isoWeek",o):s.startOf(r,i)),+r)}function Fl(e,t,s,n){const i=Nt.length;for(let o=Nt.indexOf(e);o<i-1;++o){const r=Qi[Nt[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((s-t)/(a*r.size))<=n)return Nt[o]}return Nt[i-1]}function d_(e,t,s,n,i){for(let o=Nt.length-1;o>=Nt.indexOf(s);o--){const r=Nt[o];if(Qi[r].common&&e._adapter.diff(i,n,r)>=t-1)return r}return Nt[s?Nt.indexOf(s):0]}function p_(e){for(let t=Nt.indexOf(e)+1,s=Nt.length;t<s;++t)if(Qi[Nt[t]].common)return Nt[t]}function zl(e,t,s){if(!s)e[t]=!0;else if(s.length){const{lo:n,hi:i}=Dr(s,t),o=s[n]>=t?s[n]:s[i];e[o]=!0}}function g_(e,t,s,n){const i=e._adapter,o=+i.startOf(t[0].value,n),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+i.add(a,1,n))l=s[a],l>=0&&(t[l].major=!0);return t}function Bl(e,t,s){const n=[],i={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],i[a]=r,n.push({value:a,major:!1});return o===0||!s?n:g_(e,n,i,s)}class Ri extends Cs{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,s={}){const n=t.time||(t.time={}),i=this._adapter=new Tm._date(t.adapters.date);i.init(s),fn(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=s.normalized}parse(t,s){return t===void 0?null:Ll(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,s=this._adapter,n=t.time.unit||"day";let{min:i,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=It(i)&&!isNaN(i)?i:+s.startOf(Date.now(),n),o=It(o)&&!isNaN(o)?o:+s.endOf(Date.now(),n)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let s=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(s=t[0],n=t[t.length-1]),{min:s,max:n}}buildTicks(){const t=this.options,s=t.time,n=t.ticks,i=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,r=this.max,a=Zp(i,o,r);return this._unit=s.unit||(n.autoSkip?Fl(s.minUnit,this.min,this.max,this._getLabelCapacity(o)):d_(this,a.length,s.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:p_(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),Bl(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let s=0,n=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?s=1-i:s=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;s=qt(s,0,r),n=qt(n,0,r),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,s=this.min,n=this.max,i=this.options,o=i.time,r=o.unit||Fl(o.minUnit,s,n,this._getLabelCapacity(s)),a=lt(i.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Vs(l)||l===!0,u={};let f=s,h,d;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":r),t.diff(n,s,r)>1e5*a)throw new Error(s+" and "+n+" are too far apart with stepSize of "+a+" "+r);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,d=0;h<n;h=+t.add(h,a,r),d++)zl(u,h,m);return(h===n||i.bounds==="ticks"||d===1)&&zl(u,h,m),Object.keys(u).sort(Rl).map(p=>+p)}getLabelForValue(t){const s=this._adapter,n=this.options.time;return n.tooltipFormat?s.format(t,n.tooltipFormat):s.format(t,n.displayFormats.datetime)}format(t,s){const i=this.options.time.displayFormats,o=this._unit,r=s||i[o];return this._adapter.format(t,r)}_tickFormatFunction(t,s,n,i){const o=this.options,r=o.ticks.callback;if(r)return _t(r,[t,s,n],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],f=c&&a[c],h=n[s],d=c&&f&&h&&h.major;return this._adapter.format(t,i||(d?f:u))}generateTickLabels(t){let s,n,i;for(s=0,n=t.length;s<n;++s)i=t[s],i.label=this._tickFormatFunction(i.value,s,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const s=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((s.start+n)*s.factor)}getValueForPixel(t){const s=this._offsets,n=this.getDecimalForPixel(t)/s.factor-s.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const s=this.options.ticks,n=this.ctx.measureText(t).width,i=ms(this.isHorizontal()?s.maxRotation:s.minRotation),o=Math.cos(i),r=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*r,h:n*r+a*o}}_getLabelCapacity(t){const s=this.options.time,n=s.displayFormats,i=n[s.unit]||n.millisecond,o=this._tickFormatFunction(t,0,Bl(this,[t],this._majorUnit),i),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],s,n;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(s=0,n=i.length;s<n;++s)t=t.concat(i[s].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let s,n;if(t.length)return t;const i=this.getLabels();for(s=0,n=i.length;s<n;++s)t.push(Ll(this,i[s]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return du(t.sort(Rl))}}$(Ri,"id","time"),$(Ri,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function si(e,t,s){let n=0,i=e.length-1,o,r,a,l;s?(t>=e[n].pos&&t<=e[i].pos&&({lo:n,hi:i}=bs(e,"pos",t)),{pos:o,time:a}=e[n],{pos:r,time:l}=e[i]):(t>=e[n].time&&t<=e[i].time&&({lo:n,hi:i}=bs(e,"time",t)),{time:o,pos:a}=e[n],{time:r,pos:l}=e[i]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Vl extends Ri{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),s=this._table=this.buildLookupTable(t);this._minPos=si(s,this.min),this._tableRange=si(s,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:s,max:n}=this,i=[],o=[];let r,a,l,c,u;for(r=0,a=t.length;r<a;++r)c=t[r],c>=s&&c<=n&&i.push(c);if(i.length<2)return[{time:s,pos:0},{time:n,pos:1}];for(r=0,a=i.length;r<a;++r)u=i[r+1],l=i[r-1],c=i[r],Math.round((u+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,s=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(s)||n.length===1)&&n.push(s),n.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const s=this.getDataTimestamps(),n=this.getLabelTimestamps();return s.length&&n.length?t=this.normalize(s.concat(n)):t=s.length?s:n,t=this._cache.all=t,t}getDecimalForValue(t){return(si(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const s=this._offsets,n=this.getDecimalForPixel(t)/s.factor-s.end;return si(this._table,n*this._tableRange+this._minPos,!0)}}$(Vl,"id","timeseries"),$(Vl,"defaults",Ri.defaults);const m_={class:"content layoutCol"},b_={class:"legend"},__={__name:"CardFloat",props:{name:{type:String,required:!0},cols:{type:Array,required:!0}},setup(e){const t=e,s=w=>w.some(y=>y===null)?null:w.reduce((y,x)=>y+x)/w.length,n=hp(w=>{const y=X.availableCols.value[w];let x=y.steps.map((k,C)=>({x:k,y:y.values[C]}));return X.options.binsize&&(x=p(x,X.options.binsize,s)),{label:y.run,data:x,fill:!1,pointRadius:0,borderWidth:1,col:y}});mt(()=>[t.cols,X.availableCols],()=>{const w=t.cols.filter(y=>y in X.availableCols.value);n.setTo(w);for(const y of w)if(y in n.value){const x=n.value[y].col,k=X.availableCols.value[y];x!==k&&n.add(y,!0)}},{deep:!0,immediate:!0}),mt(()=>X.options.binsize,()=>{n.refresh()},{deep:!0});const i=Mt(()=>t.cols.sort().filter(w=>w in n.value).map(w=>n.value[w]).map((w,y)=>({...w,borderColor:u[y%u.length]}))),o=Mt(()=>t.cols.filter(w=>X.pendingCols.value.has(w)).length>0),r={x:Number.MAX_VALUE,y:-Number.MAX_VALUE},a=bt(r),l=Mc("root");let c=null;const u=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffd92e","#a65628","#f781bf","#999999"],f=Mt(()=>i.value.map(w=>{const y=m(w.data,a.value.x),x=w.data[y].x,k=w.data[y].y,C=x.toLocaleString("en-US");let P;return k===null?P="NaN":.01<=Math.abs(k)&&Math.abs(k)<=1e4?P=k.toFixed(3):P=k.toExponential(2),{run:w.label,color:w.borderColor,step:x,value:k,formattedStep:C,formattedValue:P}}).filter(w=>w!==null).sort((w,y)=>{const x=Math.abs(w.value-a.value.y),k=Math.abs(y.value-a.value.y);return x-k}));Ui(()=>{const w=l.value.$el.querySelector("canvas");c=d(w),h()}),mt(()=>i,()=>h(),{deep:2});function h(){if(c===null)return;const w=i.value.slice();for(const y of w){let x=[],k=!0;for(const[C,P]of y.data.entries())P.y===null&&(k.y!==null||C==y.data.length-1)&&x.push({x:P.x,y:0}),k=P;x.length&&w.push({data:x,borderWidth:0,backgroundColor:y.borderColor,showLine:!1,pointStyle:"triangle",pointRadius:10,pointHoverRadius:10})}c.data.datasets=w,c.updateDebounced()}function d(w){const y=new ke(w,{type:"line",data:{datasets:[]},options:{animation:!1,responsive:!0,maintainAspectRatio:!1,resizeDelay:10,pointHoverRadius:0,parsing:!1,scales:{x:{type:"linear",position:"bottom",maxRotation:0},y:{type:"linear",position:"left",maxRotation:0}},plugins:{tooltip:{enabled:!1},zoom:{enabled:!0,onMove:x=>{a.value=x}}}}});return y.updateDebounced=S(()=>y.update("none"),200),y}function m(w,y){if(!w.length)return null;let x=0,k=1/0;for(const[C,P]of w.entries()){const E=Math.abs(P.x-y);E<=k&&(x=C,k=E)}return x}function p(w,y,x){const k=[];let C=null,P=null,E=[];for(const[B,N]of w.entries())P=(Math.round(N.x/y)+.5)*y,P!==C&&(E.length&&k.push({x:C,y:x(E)}),E.length=0,C=P),E.push(N.y);return E.length&&P!==null&&k.push({x:C,y:x(E)}),k}let _=null;function v(w){if(!f.value.length)return;const y=l.value.$el.querySelector(".legend");let x=y.scrollLeft+w.deltaX,k=y.scrollTop+w.deltaY;x=Math.max(0,Math.min(x,y.scrollWidth-y.offsetWidth)),k=Math.max(0,Math.min(k,y.scrollHeight-y.offsetHeight));const C=Date.now();_!==null&&C-_>100&&x==y.scrollLeft&&k==y.scrollTop||(_=C,y.scrollTo({left:x,top:k,behavior:"instant"}),w.preventDefault())}const S=(w,y,x)=>{let k=null;return function(){let C=this,P=arguments;const E=!k;clearTimeout(k),k=setTimeout(()=>{k=null,E||w.apply(C,P)},y),E&&setTimeout(()=>w.apply(C,P))}};return(w,y)=>(Y(),pe(Zi,{name:t.name,loading:o.value,scrollX:!1,scrollY:!1,ref_key:"root",ref:l},{default:Pe(()=>[H("div",m_,[H("div",{class:"chart",onWheel:v},y[0]||(y[0]=[H("canvas",null,null,-1)]),32),H("div",b_,[(Y(!0),at(yt,null,En(f.value,x=>(Y(),at("div",{class:"entry",key:x.run},[H("div",{style:Vi({background:x.color})},null,4),H("div",null,gt(x.run),1),H("div",null,gt(x.formattedStep),1),H("div",null,gt(x.formattedValue),1)]))),128))])])]),_:1},8,["name","loading"]))}},x_=ns(__,[["__scopeId","data-v-0d1edac4"]]),y_=["title"],v_=["title"],w_={class:"count"},S_={class:"step"},M_={class:"player"},k_=["controls","url"],C_=["src"],T_={key:0,class:"icon spinner"},P_={__name:"CardVideo",props:{name:{type:String,required:!0},cols:{type:Array,required:!0}},setup(e){const t=e,s=Mt(()=>t.cols.filter(x=>x in X.availableCols.value).sort().toReversed().map(x=>X.availableCols.value[x])),n=Mt(()=>t.cols.filter(x=>X.pendingCols.value.has(x)).length>0),i=Mt(()=>s.value.map(x=>{const k=o(x.steps,X.options.stepsel),C=x.values[k];return{run:x.run,url:`/api/file/${C}`,steps:x.steps,values:x.values,selectedIndex:k,selectedStep:x.steps[k],maxStep:Math.max(...x.steps)}}));function o(x,k){if(k===null)return x.length-1;let C=0,P=1/0;for(const[E,B]of x.entries()){const N=Math.abs(B-k);N<=P&&(C=E,P=N)}return P===1/0?null:C}const r=bt(!1),a=bt(!1),l=bt(!0),c=bt(new Set),u=Mc("root");function f(){return[...u.value.$el.querySelectorAll("video")]}function h(){f().map(x=>x.play()),r.value=!0}function d(){f().map(x=>x.pause()),r.value=!1}function m(){r.value=!1,f().map(x=>{x.pause(),c.value.add(x.getAttribute("url")),x.currentTime=0})}function p(){a.value=!a.value}function _(){l.value=!l.value}let v=0,S=0;function w(x){const k=Date.now();if(!v||k-v>200){v=k;return}if(!x.target.duration||S&&k-S<200)return;v=k,S=k,c.value.add(x.target.getAttribute("url"));const C=x.target.currentTime;setTimeout(()=>{f().filter(P=>P!==x.target).filter(P=>P.paused).filter(P=>P.duration).forEach(P=>{c.value.add(P.getAttribute("url")),P.currentTime=Math.min(C,P.duration)})},10)}function y(x){c.value.delete(x.target.getAttribute("url"))}return(x,k)=>(Y(),pe(Zi,{name:t.name,loading:n.value,scrollX:a.value,scrollY:!0,ref_key:"root",ref:u},{buttons:Pe(()=>[H("span",{class:"btn icon",onClick:p,title:a.value?"Small size":"Large size"},gt(a.value?"zoom_out":"zoom_in"),9,y_),H("span",{class:"btn icon",onClick:_,title:l.value?"Hide controls":"Show controls"},gt(l.value?"videogame_asset_off":"videogame_asset"),9,v_),H("span",{class:"btn icon",onClick:m,title:"Stop all"},"stop"),r.value?(Y(),at("span",{key:0,class:"btn icon",onClick:d,title:"Pause all"},"pause")):ge("",!0),r.value?ge("",!0):(Y(),at("span",{key:1,class:"btn icon",onClick:h,title:"Play all"},"play_arrow"))]),default:Pe(()=>[(Y(!0),at(yt,null,En(i.value,C=>(Y(),at("div",{key:C.url,class:Ze(["entry",{large:a.value}])},[H("h3",null,gt(C.run),1),H("span",w_,"Index: "+gt(C.selectedIndex)+"/"+gt(C.steps.length),1),H("span",S_,"Step: "+gt(C.selectedStep)+"/"+gt(C.maxStep),1),k[0]||(k[0]=H("br",null,null,-1)),H("div",M_,[C.steps.length?(Y(),at("video",{key:0,controls:l.value,loop:"",tabindex:"-1",url:C.url,onSeeking:w,onSeeked:y},[H("source",{src:C.url},null,8,C_)],40,k_)):ge("",!0),pt(Mr,null,{default:Pe(()=>[c.value.has(C.url)?(Y(),at("span",T_,"progress_activity")):ge("",!0)]),_:2},1024)])],2))),128))]),_:1},8,["name","loading","scrollX"]))}},O_=ns(P_,[["__scopeId","data-v-f1b7e045"]]),A_={class:"entry"},D_={class:"count"},E_={class:"step"},I_=["innerHTML"],R_={key:1,class:"icon spinner"},L_={__name:"CardText",props:{name:{type:String,required:!0},cols:{type:Array,required:!0}},setup(e){const t=e,s=bt({}),n=bt(new Set),i=Mt(()=>t.cols.filter(l=>l in X.availableCols.value).sort().toReversed().map(l=>X.availableCols.value[l])),o=Mt(()=>t.cols.filter(l=>X.pendingCols.value.has(l)).length>0||n.size>0),r=Mt(()=>i.value.map(l=>{const c=a(l.steps,X.options.stepsel),u=l.values[c];return{run:l.run,file:u,steps:l.steps,values:l.values,selectedIndex:c,selectedStep:l.steps[c],maxStep:Math.max(...l.steps)}}));mt(()=>r,()=>{const l=new Set(r.value.map(c=>c.file));Object.keys(s.value).filter(c=>!l.has(c)).map(c=>delete s.value[c]),[...l].filter(c=>!(c in s.value)).map(c=>(n.value.add(c),c)).map(c=>X.get(`/api/file/${c}`).then(u=>s.value[u.id]=u).finally(()=>n.value.delete(c)))},{deep:2});function a(l,c){if(c===null)return l.length-1;let u=0,f=1/0;for(const[h,d]of l.entries()){const m=Math.abs(d-c);m<=f&&(u=h,f=m)}return f===1/0?null:u}return(l,c)=>(Y(),pe(Zi,{name:t.name,loading:o.value,scrollX:!1,scrollY:!0},{default:Pe(()=>[(Y(!0),at(yt,null,En(r.value,u=>(Y(),at("div",A_,[H("h3",null,gt(u.run),1),H("span",D_,"Index: "+gt(u.selectedIndex)+"/"+gt(u.steps.length),1),H("span",E_,"Step: "+gt(u.selectedStep)+"/"+gt(u.maxStep),1),c[0]||(c[0]=H("br",null,null,-1)),u.file in s.value?(Y(),at("pre",{key:0,innerHTML:s.value[u.file].text},null,8,I_)):(Y(),at("span",R_,"progress_activity"))]))),256))]),_:1},8,["name","loading"]))}},F_=ns(L_,[["__scopeId","data-v-fe727dd4"]]),z_={class:"header layoutRow focusgroup"},B_=["title"],V_={class:"content layoutRow"},N_={class:"right layoutCol"},$_={class:"left layoutCol"},H_={class:"center"},j_=["focusCols"],W_={__name:"App",setup(e){tu(i=>({"2aaae728":t.columns}));const t=ss(Be("settings",{columns:3,dark:!1}));mt(()=>t,i=>ze("settings",i),{deep:!0});function s(){t.columns=t.columns%5+1}const n=bt(!1);return document.addEventListener("keydown",i=>{i.key=="Tab"&&(n.value=!0),Bd(i)}),document.addEventListener("mousedown",i=>{n.value=!1}),(i,o)=>(Y(),at("div",{class:Ze(["app layoutCol",{dark:t.dark,keyboardMode:n.value}])},[H("div",z_,[o[5]||(o[5]=H("span",{class:"logo"},null,-1)),o[6]||(o[6]=H("h1",null,"Scope",-1)),o[7]||(o[7]=H("span",{class:"fill"},null,-1)),H("button",{class:"btn icon",onClick:o[0]||(o[0]=(...r)=>Ot(X).refresh&&Ot(X).refresh(...r)),title:"Refresh"},"refresh"),H("button",{class:"btn icon",onClick:s,title:"Change layout"},"view_column"),H("button",{class:"btn icon",onClick:o[1]||(o[1]=r=>t.dark=!t.dark),title:t.dark?"Light mode":"Dark mode"},gt(t.dark?"light_mode":"dark_mode"),9,B_)]),H("div",V_,[H("div",N_,[pt(mo,{items:Ot(X).availableExps.value,modelValue:Ot(X).selExps.value,"onUpdate:modelValue":o[2]||(o[2]=r=>Ot(X).selExps.value=r),reverse:!0,loading:!!Ot(X).pendingEids.value,storageKey:"selectorFolders",title:"Folders",class:"selector"},null,8,["items","modelValue","loading"]),pt(mo,{items:Ot(X).availableRuns.value,modelValue:Ot(X).selRuns.value,"onUpdate:modelValue":o[3]||(o[3]=r=>Ot(X).selRuns.value=r),loading:!!Ot(X).pendingExps.value.size,storageKey:"selectorRuns",title:"Runs",class:"selector"},null,8,["items","modelValue","loading"])]),H("div",$_,[pt(mo,{items:Ot(X).availableMets.value,modelValue:Ot(X).selMets.value,"onUpdate:modelValue":o[4]||(o[4]=r=>Ot(X).selMets.value=r),loading:!!Ot(X).pendingRuns.value.size,storageKey:"selectorMets",title:"Metrics",class:"selector"},null,8,["items","modelValue","loading"]),pt(rp,{class:"options"})]),H("div",H_,[H("div",{class:"cards focusgroup",focusCols:t.columns},[(Y(!0),at(yt,null,En(Ot(X).availableCards.value,r=>(Y(),at(yt,{key:r.name},[r.ext=="float"?(Y(),pe(x_,{key:0,name:r.name,cols:r.cols,class:"card"},null,8,["name","cols"])):r.ext=="txt"?(Y(),pe(F_,{key:1,name:r.name,cols:r.cols,class:"card"},null,8,["name","cols"])):["mp4","webm"].includes(r.ext)?(Y(),pe(O_,{key:2,name:r.name,cols:r.cols,class:"card"},null,8,["name","cols"])):(Y(),pe(Zi,{key:3,name:r.name,class:"card"},{default:Pe(()=>[wr(" Unknown metric type: "+gt(r.ext),1)]),_:2},1032,["name"]))],64))),128))],8,j_)])])],2))}},U_=ns(W_,[["__scopeId","data-v-4a148b8b"]]),K_={id:"zoom",events:["mousemove","mousedown","mouseup","mouseout"],afterInit:function(e,t,s){e.zoom={options:s,canvasPos:null,dataPos:null,dragStart:null,dragging:!1,updating:!1,prevMouseUp:0,prevMouseDown:0,mouseUpListener:null};for(const n of this.events)e.options.events.indexOf(n)<0&&e.options.events.push(n);e.zoom.mouseUpListener=n=>{this.stopDrag(e)},e.zoom.moveDebounced=Y_(n=>{this.move(e,de(n,e))},3),document.addEventListener("mouseup",e.zoom.mouseUpListener)},afterDestroy:function(e){document.removeEventListener("mouseup",e.zoom.mouseUpListener)},afterEvent:function(e,t){if(t.event.type=="mousemove"&&e.zoom.moveDebounced(t.event),t.event.type=="mousedown"){this.move(e,de(t.event,e));const s=Date.now();s-e.zoom.prevMouseDown<100||(e.zoom.dragStart=e.zoom.dataPos.x,e.zoom.dragging=!0,e.zoom.prevMouseDown=s)}if(t.event.type=="mouseup"){this.move(e,de(t.event,e));const s=Date.now();s-e.zoom.prevMouseUp<500?this.reset(e):e.zoom.dragging&&this.stopDrag(e),e.zoom.dragging=!1,e.zoom.prevMouseUp=s}t.event.type=="mouseout"&&e.zoom.onLeave&&e.zoom.onLeave()},afterDraw:function(e,t){if(e.zoom.dataPos===null)return;const{x:s,y:n}=this.scales(e),i=s.getPixelForValue(e.zoom.dataPos.x),o=n.getPixelForValue(n.min),r=n.getPixelForValue(n.max);if(e.zoom.dragging){const a=s.getPixelForValue(e.zoom.dragStart);e.ctx.beginPath(),e.ctx.rect(a,o,i-a,r-o),e.ctx.lineWidth=1,e.ctx.strokeStyle="rgba(127,127,127,0.8)",e.ctx.fillStyle="rgba(127,127,127,0.1)",e.ctx.fill(),e.ctx.fillStyle="",e.ctx.stroke(),e.ctx.closePath()}else e.ctx.beginPath(),e.ctx.moveTo(i,o),e.ctx.lineWidth=1,e.ctx.strokeStyle="rgba(127,127,127,0.8)",e.ctx.lineTo(i,r),e.ctx.stroke();return!0},move:function(e,t){const{x:s,y:n}=this.scales(e);let i=s.getValueForPixel(t.x),o=n.getValueForPixel(t.y);i=Math.max(s.min,Math.min(i,s.max)),o=Math.max(n.min,Math.min(o,n.max)),e.zoom.canvasPos=t,e.zoom.dataPos={x:i,y:o},this.updateOnce(e),e.zoom.options.onMove&&e.zoom.options.onMove(e.zoom.dataPos)},zoom:function(e,t,s){if(e.zoom.dragging=!1,t===s){this.updateOnce(e);return}e.options.scales.x.min=t,e.options.scales.x.max=s,this.updateOnce(e),this.move(e,e.zoom.canvasPos),e.zoom.options.onZoom&&e.zoom.options.onZoom(t,s)},reset:function(e){e.zoom.dragging=!1,delete e.options.scales.x.min,delete e.options.scales.x.max,this.updateOnce(e),this.move(e,e.zoom.canvasPos),e.zoom.options.onReset&&e.zoom.options.onReset()},updateOnce:function(e){e.zoom.updating||(e.zoom.updating=!0,e.update("none"),e.zoom.updating=!1)},stopDrag:function(e){if(!e.zoom.dragging)return;e.zoom.dragging=!1;const t=e.zoom.dataPos.x,s=Math.min(e.zoom.dragStart,t),n=Math.max(e.zoom.dragStart,t);this.zoom(e,s,n)},scales:function(e){return{x:e.scales.x,y:e.scales.y}}},Y_=(e,t,s)=>{let n=null;return function(){let i=this,o=arguments;const r=!n;clearTimeout(n),n=setTimeout(()=>{n=null,r||e.apply(i,o)},t),r&&setTimeout(()=>e.apply(i,o))}};ke.register(di,pi,hi,nn,bi,_i,rr,ar,Jb,or,r_,K_);const X_=kd(U_);X_.mount("body");document.fonts.load('24px "Material Symbols Outlined"').then(e=>{e.length?document.body.classList.add("icon-font-loaded"):console.error("Failed to load icon font")});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*,*:before,*:after{box-sizing:border-box;font-weight:400;margin:0}label,input,button{font-size:1rem;min-width:0;border:none;background:none;text-align:left;line-height:1}html,body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:14px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layoutCol{display:flex;overflow:hidden;flex-direction:column}.layoutRow{display:flex;overflow:hidden;flex-direction:row}.fill{flex:1 1}.app{--fg1: #000;--fg2: #333;--fg3: #999;--bg1: #fff;--bg2: #f5f5f5;--bg3: #eee;--br: #ddd;--focus: #00aaff}.app.dark{color-scheme:dark;--fg1: #eee;--fg2: #ddd;--fg3: #aaa;--bg1: #333;--bg2: #222;--bg3: #111;--br: #444;--focus: #00aaff}.app{background:var(--bg1)}.dark .logo{filter:invert()}*{scrollbar-color:rgba(127,127,127,.3) transparent}h2{font-size:1.4rem;font-weight:500;color:var(--fg1)}input{font-family:monospace}@font-face{font-family:Material Symbols Outlined;font-style:normal;font-weight:400;src:url(/assets/material-symbols-DplPX30d.woff2) format("woff2")}.icon{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased;-webkit-user-select:none;user-select:none;vertical-align:middle}.icon.filled{font-variation-settings:"FILL" 1}.icon{opacity:0}.icon-font-loaded .icon{opacity:inherit}.btn{flex:0 0 content;display:inline-block;cursor:pointer;padding:.4rem;border-radius:.5rem;color:var(--fg2);border:none;background-color:transparent}.btn:hover,.btn:focus{background-color:var(--bg2);outline:none}.btn:active{background:var(--bg3)}.btn+.btn{margin-left:.1rem}.btn,.smooth{transition:background-color .1s linear,color .1s linear}input:focus,button:focus,:focus-visible{outline:none}.keyboardMode .btn:focus,.keyboardMode .focusOutline:focus,.keyboardMode .focusOutline:focus-visible,.keyboardMode .focusOutline:focus-within{outline:2px solid var(--focus)!important;outline-offset:-2px!important}.keyboardMode *{transition:none}.v-enter-active,.v-leave-active{transition:opacity .5s ease!important}.v-enter-from,.v-leave-to{opacity:0!important}.spinner{color:var(--fg3);height:1em;width:1em;animation:spinner 1.5s infinite linear running}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.label[data-v-4a082148]{flex:1 1;margin:.3rem 0;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.field[data-v-4a082148]{flex:1 1;color:var(--fg3);background:var(--bg2);border:none;padding:.4rem .4rem .3rem;border-radius:.5rem}.field[data-v-4a082148]:focus-within{background:var(--bg3)}input[data-v-4a082148]{border:none;background:transparent;margin:0;padding:0 .3rem}input[data-v-4a082148]{color:var(--fg2)}input[data-v-4a082148]::placeholder{color:var(--fg3)}input[data-v-4a082148]:focus{outline:none}input[data-v-4a082148]{text-align:var(--3f579659)}.label .icon[data-v-4a082148]{margin:-.3rem .5rem -.3rem 0}.field .icon[data-v-4a082148]{font-size:1.5rem;color:var(--fg3)}.header[data-v-4d2a021d]{flex:0 0 content;padding-right:1rem}h2[data-v-4d2a021d]{flex:1 0 content;margin:0 .1rem .5rem}.spinner[data-v-4d2a021d]{margin-right:-.15rem}.inputs[data-v-4d2a021d]{flex:0 0 content;align-items:center;padding:0 .5rem .4rem 0}.input[data-v-4d2a021d]{margin-right:.3rem}.list[data-v-4d2a021d]{flex:1 1 content;overflow-y:auto;margin:0 0 1rem;padding:0 1rem 0 0}.entry[data-v-4d2a021d]{display:inline-flex;align-items:center;cursor:pointer;line-height:1;font-family:monospace;border-radius:.4rem;color:var(--fg2);padding:.2rem .3rem .2rem .1rem}.entry[data-v-4d2a021d]:hover,.entry[data-v-4d2a021d]:focus{background:var(--bg2);outline:none}.name[data-v-4d2a021d]{padding-left:.3rem;word-break:break-word}.missing[data-v-4d2a021d]{color:var(--fg3)}.options[data-v-bfe3e1df]{display:flex;flex-direction:column}h2[data-v-bfe3e1df]{margin:0 0 .9rem}.input[data-v-bfe3e1df]{margin:0 0 .5rem}.card[data-v-a0668772]{padding:1rem 0 0;background:var(--bg1);border-radius:.2rem}.header[data-v-a0668772]{flex:0 0 content;display:flex;margin:0 1rem}.content[data-v-a0668772]{flex:1 1 content;margin:1rem;overflow:hidden}.scrollX[data-v-a0668772]{overflow-x:scroll;margin-bottom:0;padding-bottom:1rem}.scrollY[data-v-a0668772]{overflow-y:auto;margin-right:0;padding-right:1rem}h2[data-v-a0668772]{flex:1 1 content;margin:0;word-break:break-word}.buttons[data-v-a0668772]{flex:0 0 content;margin:-.4rem;margin-left:0;max-width:50%;display:block;direction:rtl;text-align:right}.buttons .spinner[data-v-a0668772]{margin:.4rem}.zoom.card[data-v-a0668772]{position:absolute;height:inherit;max-height:inherit;aspect-ratio:auto;top:2rem;right:2rem;bottom:2rem;left:2rem;z-index:1}.zoom.card[data-v-a0668772]{border:2px solid var(--br)}.content[data-v-
|
|
1
|
+
*,*:before,*:after{box-sizing:border-box;font-weight:400;margin:0}label,input,button{font-size:1rem;min-width:0;border:none;background:none;text-align:left;line-height:1}html,body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:14px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layoutCol{display:flex;overflow:hidden;flex-direction:column}.layoutRow{display:flex;overflow:hidden;flex-direction:row}.fill{flex:1 1}.app{--fg1: #000;--fg2: #333;--fg3: #999;--bg1: #fff;--bg2: #f5f5f5;--bg3: #eee;--br: #ddd;--focus: #00aaff}.app.dark{color-scheme:dark;--fg1: #eee;--fg2: #ddd;--fg3: #aaa;--bg1: #333;--bg2: #222;--bg3: #111;--br: #444;--focus: #00aaff}.app{background:var(--bg1)}.dark .logo{filter:invert()}*{scrollbar-color:rgba(127,127,127,.3) transparent}h2{font-size:1.4rem;font-weight:500;color:var(--fg1)}input{font-family:monospace}@font-face{font-family:Material Symbols Outlined;font-style:normal;font-weight:400;src:url(/assets/material-symbols-DplPX30d.woff2) format("woff2")}.icon{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased;-webkit-user-select:none;user-select:none;vertical-align:middle}.icon.filled{font-variation-settings:"FILL" 1}.icon{opacity:0}.icon-font-loaded .icon{opacity:inherit}.btn{flex:0 0 content;display:inline-block;cursor:pointer;padding:.4rem;border-radius:.5rem;color:var(--fg2);border:none;background-color:transparent}.btn:hover,.btn:focus{background-color:var(--bg2);outline:none}.btn:active{background:var(--bg3)}.btn+.btn{margin-left:.1rem}.btn,.smooth{transition:background-color .1s linear,color .1s linear}input:focus,button:focus,:focus-visible{outline:none}.keyboardMode .btn:focus,.keyboardMode .focusOutline:focus,.keyboardMode .focusOutline:focus-visible,.keyboardMode .focusOutline:focus-within{outline:2px solid var(--focus)!important;outline-offset:-2px!important}.keyboardMode *{transition:none}.v-enter-active,.v-leave-active{transition:opacity .5s ease!important}.v-enter-from,.v-leave-to{opacity:0!important}.spinner{color:var(--fg3);height:1em;width:1em;animation:spinner 1.5s infinite linear running}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.label[data-v-4a082148]{flex:1 1;margin:.3rem 0;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.field[data-v-4a082148]{flex:1 1;color:var(--fg3);background:var(--bg2);border:none;padding:.4rem .4rem .3rem;border-radius:.5rem}.field[data-v-4a082148]:focus-within{background:var(--bg3)}input[data-v-4a082148]{border:none;background:transparent;margin:0;padding:0 .3rem}input[data-v-4a082148]{color:var(--fg2)}input[data-v-4a082148]::placeholder{color:var(--fg3)}input[data-v-4a082148]:focus{outline:none}input[data-v-4a082148]{text-align:var(--3f579659)}.label .icon[data-v-4a082148]{margin:-.3rem .5rem -.3rem 0}.field .icon[data-v-4a082148]{font-size:1.5rem;color:var(--fg3)}.header[data-v-4d2a021d]{flex:0 0 content;padding-right:1rem}h2[data-v-4d2a021d]{flex:1 0 content;margin:0 .1rem .5rem}.spinner[data-v-4d2a021d]{margin-right:-.15rem}.inputs[data-v-4d2a021d]{flex:0 0 content;align-items:center;padding:0 .5rem .4rem 0}.input[data-v-4d2a021d]{margin-right:.3rem}.list[data-v-4d2a021d]{flex:1 1 content;overflow-y:auto;margin:0 0 1rem;padding:0 1rem 0 0}.entry[data-v-4d2a021d]{display:inline-flex;align-items:center;cursor:pointer;line-height:1;font-family:monospace;border-radius:.4rem;color:var(--fg2);padding:.2rem .3rem .2rem .1rem}.entry[data-v-4d2a021d]:hover,.entry[data-v-4d2a021d]:focus{background:var(--bg2);outline:none}.name[data-v-4d2a021d]{padding-left:.3rem;word-break:break-word}.missing[data-v-4d2a021d]{color:var(--fg3)}.options[data-v-bfe3e1df]{display:flex;flex-direction:column}h2[data-v-bfe3e1df]{margin:0 0 .9rem}.input[data-v-bfe3e1df]{margin:0 0 .5rem}.card[data-v-a0668772]{padding:1rem 0 0;background:var(--bg1);border-radius:.2rem}.header[data-v-a0668772]{flex:0 0 content;display:flex;margin:0 1rem}.content[data-v-a0668772]{flex:1 1 content;margin:1rem;overflow:hidden}.scrollX[data-v-a0668772]{overflow-x:scroll;margin-bottom:0;padding-bottom:1rem}.scrollY[data-v-a0668772]{overflow-y:auto;margin-right:0;padding-right:1rem}h2[data-v-a0668772]{flex:1 1 content;margin:0;word-break:break-word}.buttons[data-v-a0668772]{flex:0 0 content;margin:-.4rem;margin-left:0;max-width:50%;display:block;direction:rtl;text-align:right}.buttons .spinner[data-v-a0668772]{margin:.4rem}.zoom.card[data-v-a0668772]{position:absolute;height:inherit;max-height:inherit;aspect-ratio:auto;top:2rem;right:2rem;bottom:2rem;left:2rem;z-index:1}.zoom.card[data-v-a0668772]{border:2px solid var(--br)}.content[data-v-0d1edac4]{height:100%;width:100%;overflow:hidden}.chart[data-v-0d1edac4]{flex:1 1 100%;position:relative;overflow:hidden}[data-v-0d1edac4] .reset-zoom{display:none}.legend[data-v-0d1edac4]{flex:0 0 content;max-height:40%;width:100%;display:flex;flex-direction:column;overflow:auto;margin:1.5rem 0 0}.entry[data-v-0d1edac4]{width:100%;display:flex;align-items:center;margin-bottom:.5rem}.entry[data-v-0d1edac4]{line-height:.95;font-family:monospace}.entry div[data-v-0d1edac4]:nth-child(1){flex:0 0 1rem;margin-right:.5rem;width:1rem;height:100%;min-height:1rem;border-radius:.2rem}.entry div[data-v-0d1edac4]:nth-child(2){flex:1 1 content;margin-right:.5rem;word-break:break-all;min-width:10rem}.entry div[data-v-0d1edac4]:nth-child(3){flex:0 0 10ch;margin-right:.5rem;text-align:right}.entry div[data-v-0d1edac4]:nth-child(4){flex:0 0 10ch;padding-right:.5rem;text-align:right}.entry[data-v-f1b7e045]{margin:1rem 0 0}.entry[data-v-f1b7e045]:first-child{margin-top:0}h3[data-v-f1b7e045]{margin:0;word-break:break-all}video[data-v-f1b7e045]{max-width:100%;max-height:25rem}.large video[data-v-f1b7e045]{max-width:inherit;max-height:inherit;min-height:20vh;min-width:20vh}.player[data-v-f1b7e045]{position:relative;display:inline-flex;background:#0000001a}.spinner[data-v-f1b7e045]{display:block;position:absolute;top:50%;left:50%;margin:-.5em;font-size:3rem}.count[data-v-f1b7e045],.step[data-v-f1b7e045]{display:inline-block;margin:.2rem .5rem .2rem 0}.entry[data-v-fe727dd4]{margin:1rem 0 0}.entry[data-v-fe727dd4]:first-child{margin-top:0}h3[data-v-fe727dd4]{margin:0;word-break:break-all}pre[data-v-fe727dd4]{margin:.3rem 0 0;padding:.3rem;font-family:monospace;background:var(--bg2);color:var(--fg2);border-radius:.2rem;overflow:auto}.count[data-v-fe727dd4],.step[data-v-fe727dd4]{display:inline-block;margin:.2rem .5rem .2rem 0}.app[data-v-4a148b8b]{height:100vh;width:100vw;background:var(--bg1);color:var(--fg1)}.header[data-v-4a148b8b]{flex:0 0 content;align-items:center;padding:1rem;-webkit-user-select:none;user-select:none}.footer[data-v-4a148b8b]{flex:0 0 3rem;align-items:center;padding:1rem}.content[data-v-4a148b8b]{flex:1 1}.center[data-v-4a148b8b]{flex:1 1 20rem;overflow:auto;background:var(--bg3)}.left[data-v-4a148b8b],.right[data-v-4a148b8b]{flex:0 1 20rem;max-width:20%}.left[data-v-4a148b8b]{order:1}.center[data-v-4a148b8b]{order:2}.right[data-v-4a148b8b]{order:3}.header .logo[data-v-4a148b8b]{display:inline-block;padding-left:1.3em;width:1em;height:1em;font-size:1.8rem;background:url(/logo.png) no-repeat;background-size:contain}.header h1[data-v-4a148b8b]{font-size:1.8rem;font-weight:500;line-height:1}.header .btn[data-v-4a148b8b]{margin-left:.5rem}.selector[data-v-4a148b8b]{flex:1 1 0;overflow:hidden;padding:1rem 0 0 1rem}.options[data-v-4a148b8b]{flex:1 1 0;padding:1rem}.spacer[data-v-4a148b8b]{flex:1 1 0}.cards[data-v-4a148b8b]{--columns: var(--2aaae728);width:100%;display:grid;grid-template-columns:repeat(var(--columns),1fr);gap:1rem;overflow:auto;padding:.8rem 1rem 1rem}.card[data-v-4a148b8b]{height:30rem;max-height:80vh;border-radius:.5rem}.header[data-v-4a148b8b],.selector[data-v-4a148b8b],.options[data-v-4a148b8b]{border-bottom:.2rem solid var(--bg3)}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" href="/favicon.png">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
7
|
<title>Scope</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-B4vKLOLB.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DlmV1_Hx.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="app"></div>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|