@deskhero/dh_ui 1.48.7 → 1.48.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dh_ui.es.js CHANGED
@@ -24837,6 +24837,11 @@ const _sfc_main$c = {
24837
24837
  multipleProp: {
24838
24838
  type: Array,
24839
24839
  required: true
24840
+ },
24841
+ inputFirstValue: {
24842
+ type: String,
24843
+ required: false,
24844
+ default: null
24840
24845
  }
24841
24846
  },
24842
24847
  emits: ["update"],
@@ -24864,6 +24869,9 @@ const _sfc_main$c = {
24864
24869
  });
24865
24870
  }
24866
24871
  }
24872
+ watch(() => props.inputFirstValue, (value) => {
24873
+ multiple[0].input = value;
24874
+ });
24867
24875
  return (_ctx, _cache) => {
24868
24876
  return openBlock(), createElementBlock(Fragment, null, [
24869
24877
  createElementVNode("div", _hoisted_1$c, [
package/dist/dh_ui.umd.js CHANGED
@@ -16,7 +16,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
16
16
  * Released under the MIT License
17
17
  */class rx{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(n,t,o,e){const i=t.listeners[e],a=t.duration;i.forEach(s=>s({chart:n,initial:t.initial,numSteps:a,currentStep:Math.min(o-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=wd.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let t=0;this._charts.forEach((o,e)=>{if(!o.running||!o.items.length)return;const i=o.items;let a=i.length-1,s=!1,l;for(;a>=0;--a)l=i[a],l._active?(l._total>o.duration&&(o.duration=l._total),l.tick(n),s=!0):(i[a]=i[i.length-1],i.pop());s&&(e.draw(),this._notify(e,o,n,"progress")),i.length||(o.running=!1,this._notify(e,o,n,"complete"),o.initial=!1),t+=i.length}),this._lastDate=n,t===0&&(this._running=!1)}_getAnims(n){const t=this._charts;let o=t.get(n);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(n,o)),o}listen(n,t,o){this._getAnims(n).listeners[t].push(o)}add(n,t){!t||!t.length||this._getAnims(n).items.push(...t)}has(n){return this._getAnims(n).items.length>0}start(n){const t=this._charts.get(n);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((o,e)=>Math.max(o,e._duration),0),this._refresh())}running(n){if(!this._running)return!1;const t=this._charts.get(n);return!(!t||!t.running||!t.items.length)}stop(n){const t=this._charts.get(n);if(!t||!t.items.length)return;const o=t.items;let e=o.length-1;for(;e>=0;--e)o[e].cancel();t.items=[],this._notify(n,t,Date.now(),"complete")}remove(n){return this._charts.delete(n)}}var on=new rx;const MM="transparent",ox={boolean(r,n,t){return t>.5?n:r},color(r,n,t){const o=Wd(r||MM),e=o.valid&&Wd(n||MM);return e&&e.valid?e.mix(o,t).hexString():n},number(r,n,t){return r+(n-r)*t}};class ix{constructor(n,t,o,e){const i=t[o];e=Li([n.to,e,i,n.from]);const a=Li([n.from,i,e]);this._active=!0,this._fn=n.fn||ox[n.type||typeof a],this._easing=yr[n.easing]||yr.linear,this._start=Math.floor(Date.now()+(n.delay||0)),this._duration=this._total=Math.floor(n.duration),this._loop=!!n.loop,this._target=t,this._prop=o,this._from=a,this._to=e,this._promises=void 0}active(){return this._active}update(n,t,o){if(this._active){this._notify(!1);const e=this._target[this._prop],i=o-this._start,a=this._duration-i;this._start=o,this._duration=Math.floor(Math.max(a,n.duration)),this._total+=i,this._loop=!!n.loop,this._to=Li([n.to,t,e,n.from]),this._from=Li([n.from,e,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(n){const t=n-this._start,o=this._duration,e=this._prop,i=this._from,a=this._loop,s=this._to;let l;if(this._active=i!==s&&(a||t<o),!this._active){this._target[e]=s,this._notify(!0);return}if(t<0){this._target[e]=i;return}l=t/o%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[e]=this._fn(i,s,l)}wait(){const n=this._promises||(this._promises=[]);return new Promise((t,o)=>{n.push({res:t,rej:o})})}_notify(n){const t=n?"res":"rej",o=this._promises||[];for(let e=0;e<o.length;e++)o[e][t]()}}const ax=["x","y","borderWidth","radius","tension"],sx=["color","borderColor","backgroundColor"];Ae.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const lx=Object.keys(Ae.animation);Ae.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:r=>r!=="onProgress"&&r!=="onComplete"&&r!=="fn"}),Ae.set("animations",{colors:{type:"color",properties:sx},numbers:{type:"number",properties:ax}}),Ae.describe("animations",{_fallback:"animation"}),Ae.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:r=>r|0}}}});class fM{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!ke(n))return;const t=this._properties;Object.getOwnPropertyNames(n).forEach(o=>{const e=n[o];if(!ke(e))return;const i={};for(const a of lx)i[a]=e[a];(Ze(e.properties)&&e.properties||[o]).forEach(a=>{(a===o||!t.has(a))&&t.set(a,i)})})}_animateOptions(n,t){const o=t.options,e=cx(n,o);if(!e)return[];const i=this._createAnimations(e,o);return o.$shared&&ux(n.options.$animations,o).then(()=>{n.options=o},()=>{}),i}_createAnimations(n,t){const o=this._properties,e=[],i=n.$animations||(n.$animations={}),a=Object.keys(t),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const u=a[l];if(u.charAt(0)==="$")continue;if(u==="options"){e.push(...this._animateOptions(n,t));continue}const d=t[u];let M=i[u];const f=o.get(u);if(M)if(f&&M.active()){M.update(f,d,s);continue}else M.cancel();if(!f||!f.duration){n[u]=d;continue}i[u]=M=new ix(f,n,u,d),e.push(M)}return e}update(n,t){if(this._properties.size===0){Object.assign(n,t);return}const o=this._createAnimations(n,t);if(o.length)return on.add(this._chart,o),!0}}function ux(r,n){const t=[],o=Object.keys(n);for(let e=0;e<o.length;e++){const i=r[o[e]];i&&i.active()&&t.push(i.wait())}return Promise.all(t)}function cx(r,n){if(!n)return;let t=r.options;if(!t){r.options=n;return}return t.$shared&&(r.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function gM(r,n){const t=r&&r.options||{},o=t.reverse,e=t.min===void 0?n:0,i=t.max===void 0?n:0;return{start:o?i:e,end:o?e:i}}function dx(r,n,t){if(t===!1)return!1;const o=gM(r,t),e=gM(n,t);return{top:e.end,right:o.end,bottom:e.start,left:o.start}}function Mx(r){let n,t,o,e;return ke(r)?(n=r.top,t=r.right,o=r.bottom,e=r.left):n=t=o=e=r,{top:n,right:t,bottom:o,left:e,disabled:r===!1}}function hM(r,n){const t=[],o=r._getSortedDatasetMetas(n);let e,i;for(e=0,i=o.length;e<i;++e)t.push(o[e].index);return t}function pM(r,n,t,o={}){const e=r.keys,i=o.mode==="single";let a,s,l,u;if(n!==null){for(a=0,s=e.length;a<s;++a){if(l=+e[a],l===t){if(o.all)continue;break}u=r.values[l],ot(u)&&(i||n===0||Gt(n)===Gt(u))&&(n+=u)}return n}}function fx(r){const n=Object.keys(r),t=new Array(n.length);let o,e,i;for(o=0,e=n.length;o<e;++o)i=n[o],t[o]={x:i,y:r[i]};return t}function yM(r,n){const t=r&&r.options.stacked;return t||t===void 0&&n.stack!==void 0}function gx(r,n,t){return`${r.id}.${n.id}.${t.stack||t.type}`}function hx(r){const{min:n,max:t,minDefined:o,maxDefined:e}=r.getUserBounds();return{min:o?n:Number.NEGATIVE_INFINITY,max:e?t:Number.POSITIVE_INFINITY}}function px(r,n,t){const o=r[n]||(r[n]={});return o[t]||(o[t]={})}function NM(r,n,t,o){for(const e of n.getMatchingVisibleMetas(o).reverse()){const i=r[e.index];if(t&&i>0||!t&&i<0)return e.index}return null}function jM(r,n){const{chart:t,_cachedMeta:o}=r,e=t._stacks||(t._stacks={}),{iScale:i,vScale:a,index:s}=o,l=i.axis,u=a.axis,d=gx(i,a,o),M=n.length;let f;for(let p=0;p<M;++p){const y=n[p],{[l]:I,[u]:v}=y,h=y._stacks||(y._stacks={});f=h[u]=px(e,d,I),f[s]=v,f._top=NM(f,a,!0,o.type),f._bottom=NM(f,a,!1,o.type)}}function Il(r,n){const t=r.scales;return Object.keys(t).filter(o=>t[o].axis===n).shift()}function yx(r,n){return Dn(r,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function Nx(r,n,t){return Dn(r,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:t,index:n,mode:"default",type:"data"})}function xr(r,n){const t=r.controller.index,o=r.vScale&&r.vScale.axis;if(!!o){n=n||r._parsed;for(const e of n){const i=e._stacks;if(!i||i[o]===void 0||i[o][t]===void 0)return;delete i[o][t]}}}const ml=r=>r==="reset"||r==="none",IM=(r,n)=>n?r:Object.assign({},r),jx=(r,n,t)=>r&&!n.hidden&&n._stacked&&{keys:hM(t,!0),values:null};class _t{constructor(n,t){this.chart=n,this._ctx=n.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const n=this._cachedMeta;this.configure(),this.linkScales(),n._stacked=yM(n.vScale,n),this.addElements()}updateIndex(n){this.index!==n&&xr(this._cachedMeta),this.index=n}linkScales(){const n=this.chart,t=this._cachedMeta,o=this.getDataset(),e=(M,f,p,y)=>M==="x"?f:M==="r"?y:p,i=t.xAxisID=we(o.xAxisID,Il(n,"x")),a=t.yAxisID=we(o.yAxisID,Il(n,"y")),s=t.rAxisID=we(o.rAxisID,Il(n,"r")),l=t.indexAxis,u=t.iAxisID=e(l,i,a,s),d=t.vAxisID=e(l,a,i,s);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(n){return this.chart.scales[n]}_getOtherScale(n){const t=this._cachedMeta;return n===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const n=this._cachedMeta;this._data&&Ad(this._data,this),n._stacked&&xr(n)}_dataCheck(){const n=this.getDataset(),t=n.data||(n.data=[]),o=this._data;if(ke(t))this._data=fx(t);else if(o!==t){if(o){Ad(o,this);const e=this._cachedMeta;xr(e),e._parsed=[]}t&&Object.isExtensible(t)&&E1(t,this),this._syncList=[],this._data=t}}addElements(){const n=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(n.dataset=new this.datasetElementType)}buildOrUpdateElements(n){const t=this._cachedMeta,o=this.getDataset();let e=!1;this._dataCheck();const i=t._stacked;t._stacked=yM(t.vScale,t),t.stack!==o.stack&&(e=!0,xr(t),t.stack=o.stack),this._resyncElements(n),(e||i!==t._stacked)&&jM(this,t._parsed)}configure(){const n=this.chart.config,t=n.datasetScopeKeys(this._type),o=n.getOptionScopes(this.getDataset(),t,!0);this.options=n.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(n,t){const{_cachedMeta:o,_data:e}=this,{iScale:i,_stacked:a}=o,s=i.axis;let l=n===0&&t===e.length?!0:o._sorted,u=n>0&&o._parsed[n-1],d,M,f;if(this._parsing===!1)o._parsed=e,o._sorted=!0,f=e;else{Ze(e[n])?f=this.parseArrayData(o,e,n,t):ke(e[n])?f=this.parseObjectData(o,e,n,t):f=this.parsePrimitiveData(o,e,n,t);const p=()=>M[s]===null||u&&M[s]<u[s];for(d=0;d<t;++d)o._parsed[d+n]=M=f[d],l&&(p()&&(l=!1),u=M);o._sorted=l}a&&jM(this,f)}parsePrimitiveData(n,t,o,e){const{iScale:i,vScale:a}=n,s=i.axis,l=a.axis,u=i.getLabels(),d=i===a,M=new Array(e);let f,p,y;for(f=0,p=e;f<p;++f)y=f+o,M[f]={[s]:d||i.parse(u[y],y),[l]:a.parse(t[y],y)};return M}parseArrayData(n,t,o,e){const{xScale:i,yScale:a}=n,s=new Array(e);let l,u,d,M;for(l=0,u=e;l<u;++l)d=l+o,M=t[d],s[l]={x:i.parse(M[0],d),y:a.parse(M[1],d)};return s}parseObjectData(n,t,o,e){const{xScale:i,yScale:a}=n,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=new Array(e);let d,M,f,p;for(d=0,M=e;d<M;++d)f=d+o,p=t[f],u[d]={x:i.parse(Nn(p,s),f),y:a.parse(Nn(p,l),f)};return u}getParsed(n){return this._cachedMeta._parsed[n]}getDataElement(n){return this._cachedMeta.data[n]}applyStack(n,t,o){const e=this.chart,i=this._cachedMeta,a=t[n.axis],s={keys:hM(e,!0),values:t._stacks[n.axis]};return pM(s,a,i.index,{mode:o})}updateRangeFromParsed(n,t,o,e){const i=o[t.axis];let a=i===null?NaN:i;const s=e&&o._stacks[t.axis];e&&s&&(e.values=s,a=pM(e,i,this._cachedMeta.index)),n.min=Math.min(n.min,a),n.max=Math.max(n.max,a)}getMinMax(n,t){const o=this._cachedMeta,e=o._parsed,i=o._sorted&&n===o.iScale,a=e.length,s=this._getOtherScale(n),l=jx(t,o,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:M}=hx(s);let f,p;function y(){p=e[f];const I=p[s.axis];return!ot(p[n.axis])||d>I||M<I}for(f=0;f<a&&!(!y()&&(this.updateRangeFromParsed(u,n,p,l),i));++f);if(i){for(f=a-1;f>=0;--f)if(!y()){this.updateRangeFromParsed(u,n,p,l);break}}return u}getAllParsedValues(n){const t=this._cachedMeta._parsed,o=[];let e,i,a;for(e=0,i=t.length;e<i;++e)a=t[e][n.axis],ot(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(n){const t=this._cachedMeta,o=t.iScale,e=t.vScale,i=this.getParsed(n);return{label:o?""+o.getLabelForValue(i[o.axis]):"",value:e?""+e.getLabelForValue(i[e.axis]):""}}_update(n){const t=this._cachedMeta;this.update(n||"default"),t._clip=Mx(we(this.options.clip,dx(t.xScale,t.yScale,this.getMaxOverflow())))}update(n){}draw(){const n=this._ctx,t=this.chart,o=this._cachedMeta,e=o.data||[],i=t.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||e.length-s,u=this.options.drawActiveElementsOnTop;let d;for(o.dataset&&o.dataset.draw(n,i,s,l),d=s;d<s+l;++d){const M=e[d];M.hidden||(M.active&&u?a.push(M):M.draw(n,i))}for(d=0;d<a.length;++d)a[d].draw(n,i)}getStyle(n,t){const o=t?"active":"default";return n===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(n||0,o)}getContext(n,t,o){const e=this.getDataset();let i;if(n>=0&&n<this._cachedMeta.data.length){const a=this._cachedMeta.data[n];i=a.$context||(a.$context=Nx(this.getContext(),n,a)),i.parsed=this.getParsed(n),i.raw=e.data[n],i.index=i.dataIndex=n}else i=this.$context||(this.$context=yx(this.chart.getContext(),this.index)),i.dataset=e,i.index=i.datasetIndex=this.index;return i.active=!!t,i.mode=o,i}resolveDatasetElementOptions(n){return this._resolveElementOptions(this.datasetElementType.id,n)}resolveDataElementOptions(n,t){return this._resolveElementOptions(this.dataElementType.id,t,n)}_resolveElementOptions(n,t="default",o){const e=t==="active",i=this._cachedDataOpts,a=n+"-"+t,s=i[a],l=this.enableOptionSharing&&Dt(o);if(s)return IM(s,l);const u=this.chart.config,d=u.datasetElementScopeKeys(this._type,n),M=e?[`${n}Hover`,"hover",n,""]:[n,""],f=u.getOptionScopes(this.getDataset(),d),p=Object.keys(Ae.elements[n]),y=()=>this.getContext(o,e),I=u.resolveNamedOptions(f,p,y,M);return I.$shared&&(I.$shared=l,i[a]=Object.freeze(IM(I,l))),I}_resolveAnimations(n,t,o){const e=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,s=i[a];if(s)return s;let l;if(e.options.animation!==!1){const d=this.chart.config,M=d.datasetAnimationScopeKeys(this._type,t),f=d.getOptionScopes(this.getDataset(),M);l=d.createResolver(f,this.getContext(n,o,t))}const u=new fM(e,l&&l.animations);return l&&l._cacheable&&(i[a]=Object.freeze(u)),u}getSharedOptions(n){if(!!n.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},n))}includeOptions(n,t){return!t||ml(n)||this.chart._animationsDisabled}_getSharedOptions(n,t){const o=this.resolveDataElementOptions(n,t),e=this._sharedOptions,i=this.getSharedOptions(o),a=this.includeOptions(t,i)||i!==e;return this.updateSharedOptions(i,t,o),{sharedOptions:i,includeOptions:a}}updateElement(n,t,o,e){ml(e)?Object.assign(n,o):this._resolveAnimations(t,e).update(n,o)}updateSharedOptions(n,t,o){n&&!ml(t)&&this._resolveAnimations(void 0,t).update(n,o)}_setStyle(n,t,o,e){n.active=e;const i=this.getStyle(t,e);this._resolveAnimations(t,o,e).update(n,{options:!e&&this.getSharedOptions(i)||i})}removeHoverStyle(n,t,o){this._setStyle(n,o,"active",!1)}setHoverStyle(n,t,o){this._setStyle(n,o,"active",!0)}_removeDatasetHoverStyle(){const n=this._cachedMeta.dataset;n&&this._setStyle(n,void 0,"active",!1)}_setDatasetHoverStyle(){const n=this._cachedMeta.dataset;n&&this._setStyle(n,void 0,"active",!0)}_resyncElements(n){const t=this._data,o=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const e=o.length,i=t.length,a=Math.min(i,e);a&&this.parse(0,a),i>e?this._insertElements(e,i-e,n):i<e&&this._removeElements(i,e-i)}_insertElements(n,t,o=!0){const e=this._cachedMeta,i=e.data,a=n+t;let s;const l=u=>{for(u.length+=t,s=u.length-1;s>=a;s--)u[s]=u[s-t]};for(l(i),s=n;s<a;++s)i[s]=new this.dataElementType;this._parsing&&l(e._parsed),this.parse(n,t),o&&this.updateElements(i,n,t,"reset")}updateElements(n,t,o,e){}_removeElements(n,t){const o=this._cachedMeta;if(this._parsing){const e=o._parsed.splice(n,t);o._stacked&&xr(o,e)}o.data.splice(n,t)}_sync(n){if(this._parsing)this._syncList.push(n);else{const[t,o,e]=n;this[t](o,e)}this.chart._dataChanges.push([this.index,...n])}_onDataPush(){const n=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-n,n])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(n,t){t&&this._sync(["_removeElements",n,t]);const o=arguments.length-2;o&&this._sync(["_insertElements",n,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}_t.defaults={},_t.prototype.datasetElementType=null,_t.prototype.dataElementType=null;function Ix(r,n){if(!r._cache.$bar){const t=r.getMatchingVisibleMetas(n);let o=[];for(let e=0,i=t.length;e<i;e++)o=o.concat(t[e].controller.getAllParsedValues(r));r._cache.$bar=kd(o.sort((e,i)=>e-i))}return r._cache.$bar}function mx(r){const n=r.iScale,t=Ix(n,r.type);let o=n._length,e,i,a,s;const l=()=>{a===32767||a===-32768||(Dt(s)&&(o=Math.min(o,Math.abs(a-s)||o)),s=a)};for(e=0,i=t.length;e<i;++e)a=n.getPixelForValue(t[e]),l();for(s=void 0,e=0,i=n.ticks.length;e<i;++e)a=n.getPixelForTick(e),l();return o}function Dx(r,n,t,o){const e=t.barThickness;let i,a;return Ce(e)?(i=n.min*t.categoryPercentage,a=t.barPercentage):(i=e*o,a=1),{chunk:i/o,ratio:a,start:n.pixels[r]-i/2}}function xx(r,n,t,o){const e=n.pixels,i=e[r];let a=r>0?e[r-1]:null,s=r<e.length-1?e[r+1]:null;const l=t.categoryPercentage;a===null&&(a=i-(s===null?n.end-n.start:s-i)),s===null&&(s=i+i-a);const u=i-(i-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/o,ratio:t.barPercentage,start:u}}function vx(r,n,t,o){const e=t.parse(r[0],o),i=t.parse(r[1],o),a=Math.min(e,i),s=Math.max(e,i);let l=a,u=s;Math.abs(a)>Math.abs(s)&&(l=s,u=a),n[t.axis]=u,n._custom={barStart:l,barEnd:u,start:e,end:i,min:a,max:s}}function mM(r,n,t,o){return Ze(r)?vx(r,n,t,o):n[t.axis]=t.parse(r,o),n}function DM(r,n,t,o){const e=r.iScale,i=r.vScale,a=e.getLabels(),s=e===i,l=[];let u,d,M,f;for(u=t,d=t+o;u<d;++u)f=n[u],M={},M[e.axis]=s||e.parse(a[u],u),l.push(mM(f,M,i,u));return l}function Dl(r){return r&&r.barStart!==void 0&&r.barEnd!==void 0}function bx(r,n,t){return r!==0?Gt(r):(n.isHorizontal()?1:-1)*(n.min>=t?1:-1)}function Tx(r){let n,t,o,e,i;return r.horizontal?(n=r.base>r.x,t="left",o="right"):(n=r.base<r.y,t="bottom",o="top"),n?(e="end",i="start"):(e="start",i="end"),{start:t,end:o,reverse:n,top:e,bottom:i}}function Ax(r,n,t,o){let e=n.borderSkipped;const i={};if(!e){r.borderSkipped=i;return}if(e===!0){r.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:u,bottom:d}=Tx(r);e==="middle"&&t&&(r.enableBorderRadius=!0,(t._top||0)===o?e=u:(t._bottom||0)===o?e=d:(i[xM(d,a,s,l)]=!0,e=u)),i[xM(e,a,s,l)]=!0,r.borderSkipped=i}function xM(r,n,t,o){return o?(r=kx(r,n,t),r=vM(r,t,n)):r=vM(r,n,t),r}function kx(r,n,t){return r===n?t:r===t?n:r}function vM(r,n,t){return r==="start"?n:r==="end"?t:r}function wx(r,{inflateAmount:n},t){r.inflateAmount=n==="auto"?t===1?.33:0:n}class Ci extends _t{parsePrimitiveData(n,t,o,e){return DM(n,t,o,e)}parseArrayData(n,t,o,e){return DM(n,t,o,e)}parseObjectData(n,t,o,e){const{iScale:i,vScale:a}=n,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=i.axis==="x"?s:l,d=a.axis==="x"?s:l,M=[];let f,p,y,I;for(f=o,p=o+e;f<p;++f)I=t[f],y={},y[i.axis]=i.parse(Nn(I,u),f),M.push(mM(Nn(I,d),y,a,f));return M}updateRangeFromParsed(n,t,o,e){super.updateRangeFromParsed(n,t,o,e);const i=o._custom;i&&t===this._cachedMeta.vScale&&(n.min=Math.min(n.min,i.min),n.max=Math.max(n.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(n){const t=this._cachedMeta,{iScale:o,vScale:e}=t,i=this.getParsed(n),a=i._custom,s=Dl(a)?"["+a.start+", "+a.end+"]":""+e.getLabelForValue(i[e.axis]);return{label:""+o.getLabelForValue(i[o.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const n=this._cachedMeta;n.stack=this.getDataset().stack}update(n){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,n)}updateElements(n,t,o,e){const i=e==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),u=s.isHorizontal(),d=this._getRuler(),{sharedOptions:M,includeOptions:f}=this._getSharedOptions(t,e);for(let p=t;p<t+o;p++){const y=this.getParsed(p),I=i||Ce(y[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),v=this._calculateBarIndexPixels(p,d),h=(y._stacks||{})[s.axis],N={horizontal:u,base:I.base,enableBorderRadius:!h||Dl(y._custom)||a===h._top||a===h._bottom,x:u?I.head:v.center,y:u?v.center:I.head,height:u?v.size:Math.abs(I.size),width:u?Math.abs(I.size):v.size};f&&(N.options=M||this.resolveDataElementOptions(p,n[p].active?"active":e));const D=N.options||n[p].options;Ax(N,D,h,a),wx(N,D,d.ratio),this.updateElement(n[p],p,N,e)}}_getStacks(n,t){const{iScale:o}=this._cachedMeta,e=o.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),i=o.options.stacked,a=[],s=l=>{const u=l.controller.getParsed(t),d=u&&u[l.vScale.axis];if(Ce(d)||isNaN(d))return!0};for(const l of e)if(!(t!==void 0&&s(l))&&((i===!1||a.indexOf(l.stack)===-1||i===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===n))break;return a.length||a.push(void 0),a}_getStackCount(n){return this._getStacks(void 0,n).length}_getStackIndex(n,t,o){const e=this._getStacks(n,o),i=t!==void 0?e.indexOf(t):-1;return i===-1?e.length-1:i}_getRuler(){const n=this.options,t=this._cachedMeta,o=t.iScale,e=[];let i,a;for(i=0,a=t.data.length;i<a;++i)e.push(o.getPixelForValue(this.getParsed(i)[o.axis],i));const s=n.barThickness;return{min:s||mx(t),pixels:e,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:n.grouped,ratio:s?1:n.categoryPercentage*n.barPercentage}}_calculateBarValuePixels(n){const{_cachedMeta:{vScale:t,_stacked:o},options:{base:e,minBarLength:i}}=this,a=e||0,s=this.getParsed(n),l=s._custom,u=Dl(l);let d=s[t.axis],M=0,f=o?this.applyStack(t,s,o):d,p,y;f!==d&&(M=f-d,f=d),u&&(d=l.barStart,f=l.barEnd-l.barStart,d!==0&&Gt(d)!==Gt(l.barEnd)&&(M=0),M+=d);const I=!Ce(e)&&!u?e:M;let v=t.getPixelForValue(I);if(this.chart.getDataVisibility(n)?p=t.getPixelForValue(M+f):p=v,y=p-v,Math.abs(y)<i){y=bx(y,t,a)*i,d===a&&(v-=y/2);const h=t.getPixelForDecimal(0),N=t.getPixelForDecimal(1),D=Math.min(h,N),m=Math.max(h,N);v=Math.max(Math.min(v,m),D),p=v+y}if(v===t.getPixelForValue(a)){const h=Gt(y)*t.getLineWidthForValue(a)/2;v+=h,y-=h}return{size:y,base:v,head:p,center:p+y/2}}_calculateBarIndexPixels(n,t){const o=t.scale,e=this.options,i=e.skipNull,a=we(e.maxBarThickness,1/0);let s,l;if(t.grouped){const u=i?this._getStackCount(n):t.stackCount,d=e.barThickness==="flex"?xx(n,t,e,u):Dx(n,t,e,u),M=this._getStackIndex(this.index,this._cachedMeta.stack,i?n:void 0);s=d.start+d.chunk*M+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=o.getPixelForValue(this.getParsed(n)[o.axis],n),l=Math.min(a,t.min*t.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const n=this._cachedMeta,t=n.vScale,o=n.data,e=o.length;let i=0;for(;i<e;++i)this.getParsed(i)[t.axis]!==null&&o[i].draw(this._ctx)}}Ci.id="bar",Ci.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Ci.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class xl extends _t{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(n,t,o,e){const i=super.parsePrimitiveData(n,t,o,e);for(let a=0;a<i.length;a++)i[a]._custom=this.resolveDataElementOptions(a+o).radius;return i}parseArrayData(n,t,o,e){const i=super.parseArrayData(n,t,o,e);for(let a=0;a<i.length;a++){const s=t[o+a];i[a]._custom=we(s[2],this.resolveDataElementOptions(a+o).radius)}return i}parseObjectData(n,t,o,e){const i=super.parseObjectData(n,t,o,e);for(let a=0;a<i.length;a++){const s=t[o+a];i[a]._custom=we(s&&s.r&&+s.r,this.resolveDataElementOptions(a+o).radius)}return i}getMaxOverflow(){const n=this._cachedMeta.data;let t=0;for(let o=n.length-1;o>=0;--o)t=Math.max(t,n[o].size(this.resolveDataElementOptions(o))/2);return t>0&&t}getLabelAndValue(n){const t=this._cachedMeta,{xScale:o,yScale:e}=t,i=this.getParsed(n),a=o.getLabelForValue(i.x),s=e.getLabelForValue(i.y),l=i._custom;return{label:t.label,value:"("+a+", "+s+(l?", "+l:"")+")"}}update(n){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,n)}updateElements(n,t,o,e){const i=e==="reset",{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(t,e),d=a.axis,M=s.axis;for(let f=t;f<t+o;f++){const p=n[f],y=!i&&this.getParsed(f),I={},v=I[d]=i?a.getPixelForDecimal(.5):a.getPixelForValue(y[d]),h=I[M]=i?s.getBasePixel():s.getPixelForValue(y[M]);I.skip=isNaN(v)||isNaN(h),u&&(I.options=l||this.resolveDataElementOptions(f,p.active?"active":e),i&&(I.options.radius=0)),this.updateElement(p,f,I,e)}}resolveDataElementOptions(n,t){const o=this.getParsed(n);let e=super.resolveDataElementOptions(n,t);e.$shared&&(e=Object.assign({},e,{$shared:!1}));const i=e.radius;return t!=="active"&&(e.radius=0),e.radius+=we(o&&o._custom,i),e}}xl.id="bubble",xl.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},xl.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function Lx(r,n,t){let o=1,e=1,i=0,a=0;if(n<Be){const s=r,l=s+n,u=Math.cos(s),d=Math.sin(s),M=Math.cos(l),f=Math.sin(l),p=(D,m,j)=>pr(D,s,l,!0)?1:Math.max(m,m*t,j,j*t),y=(D,m,j)=>pr(D,s,l,!0)?-1:Math.min(m,m*t,j,j*t),I=p(0,u,M),v=p(Xe,d,f),h=y(Je,u,M),N=y(Je+Xe,d,f);o=(I-h)/2,e=(v-N)/2,i=-(I+h)/2,a=-(v+N)/2}return{ratioX:o,ratioY:e,offsetX:i,offsetY:a}}class vr extends _t{constructor(n,t){super(n,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(n,t){const o=this.getDataset().data,e=this._cachedMeta;if(this._parsing===!1)e._parsed=o;else{let i=l=>+o[l];if(ke(o[n])){const{key:l="value"}=this._parsing;i=u=>+Nn(o[u],l)}let a,s;for(a=n,s=n+t;a<s;++a)e._parsed[a]=i(a)}}_getRotation(){return Ct(this.options.rotation-90)}_getCircumference(){return Ct(this.options.circumference)}_getRotationExtents(){let n=Be,t=-Be;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)){const e=this.chart.getDatasetMeta(o).controller,i=e._getRotation(),a=e._getCircumference();n=Math.min(n,i),t=Math.max(t,i+a)}return{rotation:n,circumference:t-n}}update(n){const t=this.chart,{chartArea:o}=t,e=this._cachedMeta,i=e.data,a=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,s=Math.max((Math.min(o.width,o.height)-a)/2,0),l=Math.min(m1(this.options.cutout,s),1),u=this._getRingWeight(this.index),{circumference:d,rotation:M}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:y,offsetY:I}=Lx(M,d,l),v=(o.width-a)/f,h=(o.height-a)/p,N=Math.max(Math.min(v,h)/2,0),D=yd(this.options.radius,N),m=Math.max(D*l,0),j=(D-m)/this._getVisibleDatasetWeightTotal();this.offsetX=y*D,this.offsetY=I*D,e.total=this.calculateTotal(),this.outerRadius=D-j*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-j*u,0),this.updateElements(i,0,i.length,n)}_circumference(n,t){const o=this.options,e=this._cachedMeta,i=this._getCircumference();return t&&o.animation.animateRotate||!this.chart.getDataVisibility(n)||e._parsed[n]===null||e.data[n].hidden?0:this.calculateCircumference(e._parsed[n]*i/Be)}updateElements(n,t,o,e){const i=e==="reset",a=this.chart,s=a.chartArea,u=a.options.animation,d=(s.left+s.right)/2,M=(s.top+s.bottom)/2,f=i&&u.animateScale,p=f?0:this.innerRadius,y=f?0:this.outerRadius,{sharedOptions:I,includeOptions:v}=this._getSharedOptions(t,e);let h=this._getRotation(),N;for(N=0;N<t;++N)h+=this._circumference(N,i);for(N=t;N<t+o;++N){const D=this._circumference(N,i),m=n[N],j={x:d+this.offsetX,y:M+this.offsetY,startAngle:h,endAngle:h+D,circumference:D,outerRadius:y,innerRadius:p};v&&(j.options=I||this.resolveDataElementOptions(N,m.active?"active":e)),h+=D,this.updateElement(m,N,j,e)}}calculateTotal(){const n=this._cachedMeta,t=n.data;let o=0,e;for(e=0;e<t.length;e++){const i=n._parsed[e];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(e)&&!t[e].hidden&&(o+=Math.abs(i))}return o}calculateCircumference(n){const t=this._cachedMeta.total;return t>0&&!isNaN(n)?Be*(Math.abs(n)/t):0}getLabelAndValue(n){const t=this._cachedMeta,o=this.chart,e=o.data.labels||[],i=Dr(t._parsed[n],o.options.locale);return{label:e[n]||"",value:i}}getMaxBorderWidth(n){let t=0;const o=this.chart;let e,i,a,s,l;if(!n){for(e=0,i=o.data.datasets.length;e<i;++e)if(o.isDatasetVisible(e)){a=o.getDatasetMeta(e),n=a.data,s=a.controller;break}}if(!n)return 0;for(e=0,i=n.length;e<i;++e)l=s.resolveDataElementOptions(e),l.borderAlign!=="inner"&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(n){let t=0;for(let o=0,e=n.length;o<e;++o){const i=this.resolveDataElementOptions(o);t=Math.max(t,i.offset||0,i.hoverOffset||0)}return t}_getRingWeightOffset(n){let t=0;for(let o=0;o<n;++o)this.chart.isDatasetVisible(o)&&(t+=this._getRingWeight(o));return t}_getRingWeight(n){return Math.max(we(this.chart.data.datasets[n].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}vr.id="doughnut",vr.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},vr.descriptors={_scriptable:r=>r!=="spacing",_indexable:r=>r!=="spacing"},vr.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){const n=r.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:t}}=r.legend.options;return n.labels.map((o,e)=>{const a=r.getDatasetMeta(0).controller.getStyle(e);return{text:o,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:t,hidden:!r.getDataVisibility(e),index:e}})}return[]}},onClick(r,n,t){t.chart.toggleDataVisibility(n.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(r){let n=r.label;const t=": "+r.formattedValue;return Ze(n)?(n=n.slice(),n[0]+=t):n+=t,n}}}}};class vl extends _t{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(n){const t=this._cachedMeta,{dataset:o,data:e=[],_dataset:i}=t,a=this.chart._animationsDisabled;let{start:s,count:l}=Sd(t,e,a);this._drawStart=s,this._drawCount=l,Od(t)&&(s=0,l=e.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=e;const u=this.resolveDatasetElementOptions(n);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:u},n),this.updateElements(e,s,l,n)}updateElements(n,t,o,e){const i=e==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:d,includeOptions:M}=this._getSharedOptions(t,e),f=a.axis,p=s.axis,{spanGaps:y,segment:I}=this.options,v=Xn(y)?y:Number.POSITIVE_INFINITY,h=this.chart._animationsDisabled||i||e==="none";let N=t>0&&this.getParsed(t-1);for(let D=t;D<t+o;++D){const m=n[D],j=this.getParsed(D),T=h?m:{},L=Ce(j[p]),k=T[f]=a.getPixelForValue(j[f],D),z=T[p]=i||L?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,j,l):j[p],D);T.skip=isNaN(k)||isNaN(z)||L,T.stop=D>0&&Math.abs(j[f]-N[f])>v,I&&(T.parsed=j,T.raw=u.data[D]),M&&(T.options=d||this.resolveDataElementOptions(D,m.active?"active":e)),h||this.updateElement(m,D,T,e),N=j}}getMaxOverflow(){const n=this._cachedMeta,t=n.dataset,o=t.options&&t.options.borderWidth||0,e=n.data||[];if(!e.length)return o;const i=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(o,i,a)/2}draw(){const n=this._cachedMeta;n.dataset.updateControlPoints(this.chart.chartArea,n.iScale.axis),super.draw()}}vl.id="line",vl.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},vl.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class bl extends _t{constructor(n,t){super(n,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(n){const t=this._cachedMeta,o=this.chart,e=o.data.labels||[],i=Dr(t._parsed[n].r,o.options.locale);return{label:e[n]||"",value:i}}parseObjectData(n,t,o,e){return nM.bind(this)(n,t,o,e)}update(n){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,n)}getMinMax(){const n=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return n.data.forEach((o,e)=>{const i=this.getParsed(e).r;!isNaN(i)&&this.chart.getDataVisibility(e)&&(i<t.min&&(t.min=i),i>t.max&&(t.max=i))}),t}_updateRadius(){const n=this.chart,t=n.chartArea,o=n.options,e=Math.min(t.right-t.left,t.bottom-t.top),i=Math.max(e/2,0),a=Math.max(o.cutoutPercentage?i/100*o.cutoutPercentage:1,0),s=(i-a)/n.getVisibleDatasetCount();this.outerRadius=i-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(n,t,o,e){const i=e==="reset",a=this.chart,l=a.options.animation,u=this._cachedMeta.rScale,d=u.xCenter,M=u.yCenter,f=u.getIndexAngle(0)-.5*Je;let p=f,y;const I=360/this.countVisibleElements();for(y=0;y<t;++y)p+=this._computeAngle(y,e,I);for(y=t;y<t+o;y++){const v=n[y];let h=p,N=p+this._computeAngle(y,e,I),D=a.getDataVisibility(y)?u.getDistanceFromCenterForValue(this.getParsed(y).r):0;p=N,i&&(l.animateScale&&(D=0),l.animateRotate&&(h=N=f));const m={x:d,y:M,innerRadius:0,outerRadius:D,startAngle:h,endAngle:N,options:this.resolveDataElementOptions(y,v.active?"active":e)};this.updateElement(v,y,m,e)}}countVisibleElements(){const n=this._cachedMeta;let t=0;return n.data.forEach((o,e)=>{!isNaN(this.getParsed(e).r)&&this.chart.getDataVisibility(e)&&t++}),t}_computeAngle(n,t,o){return this.chart.getDataVisibility(n)?Ct(this.resolveDataElementOptions(n,t).angle||o):0}}bl.id="polarArea",bl.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},bl.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){const n=r.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:t}}=r.legend.options;return n.labels.map((o,e)=>{const a=r.getDatasetMeta(0).controller.getStyle(e);return{text:o,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:t,hidden:!r.getDataVisibility(e),index:e}})}return[]}},onClick(r,n,t){t.chart.toggleDataVisibility(n.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(r){return r.chart.data.labels[r.dataIndex]+": "+r.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class bM extends vr{}bM.id="pie",bM.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Tl extends _t{getLabelAndValue(n){const t=this._cachedMeta.vScale,o=this.getParsed(n);return{label:t.getLabels()[n],value:""+t.getLabelForValue(o[t.axis])}}parseObjectData(n,t,o,e){return nM.bind(this)(n,t,o,e)}update(n){const t=this._cachedMeta,o=t.dataset,e=t.data||[],i=t.iScale.getLabels();if(o.points=e,n!=="resize"){const a=this.resolveDatasetElementOptions(n);this.options.showLine||(a.borderWidth=0);const s={_loop:!0,_fullLoop:i.length===e.length,options:a};this.updateElement(o,void 0,s,n)}this.updateElements(e,0,e.length,n)}updateElements(n,t,o,e){const i=this._cachedMeta.rScale,a=e==="reset";for(let s=t;s<t+o;s++){const l=n[s],u=this.resolveDataElementOptions(s,l.active?"active":e),d=i.getPointPositionForValue(s,this.getParsed(s).r),M=a?i.xCenter:d.x,f=a?i.yCenter:d.y,p={x:M,y:f,angle:d.angle,skip:isNaN(M)||isNaN(f),options:u};this.updateElement(l,s,p,e)}}}Tl.id="radar",Tl.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Tl.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class an{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(n){const{x:t,y:o}=this.getProps(["x","y"],n);return{x:t,y:o}}hasValue(){return Xn(this.x)&&Xn(this.y)}getProps(n,t){const o=this.$animations;if(!t||!o)return this;const e={};return n.forEach(i=>{e[i]=o[i]&&o[i].active()?o[i]._to:this[i]}),e}}an.defaults={},an.defaultRoutes=void 0;const TM={values(r){return Ze(r)?r:""+r},numeric(r,n,t){if(r===0)return"0";const o=this.chart.options.locale;let e,i=r;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(e="scientific"),i=zx(r,t)}const a=xt(Math.abs(i)),s=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:e,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Dr(r,o,l)},logarithmic(r,n,t){if(r===0)return"0";const o=r/Math.pow(10,Math.floor(xt(r)));return o===1||o===2||o===5?TM.numeric.call(this,r,n,t):""}};function zx(r,n){let t=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;return Math.abs(t)>=1&&r!==Math.floor(r)&&(t=r-Math.floor(r)),t}var Ei={formatters:TM};Ae.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(r,n)=>n.lineWidth,tickColor:(r,n)=>n.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ei.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Ae.route("scale.ticks","color","","color"),Ae.route("scale.grid","color","","borderColor"),Ae.route("scale.grid","borderColor","","borderColor"),Ae.route("scale.title","color","","color"),Ae.describe("scale",{_fallback:!1,_scriptable:r=>!r.startsWith("before")&&!r.startsWith("after")&&r!=="callback"&&r!=="parser",_indexable:r=>r!=="borderDash"&&r!=="tickBorderDash"}),Ae.describe("scales",{_fallback:"scale"}),Ae.describe("scale.ticks",{_scriptable:r=>r!=="backdropPadding"&&r!=="callback",_indexable:r=>r!=="backdropPadding"});function Sx(r,n){const t=r.options.ticks,o=t.maxTicksLimit||Ox(r),e=t.major.enabled?Ex(n):[],i=e.length,a=e[0],s=e[i-1],l=[];if(i>o)return _x(n,l,e,i/o),l;const u=Cx(e,n,o);if(i>0){let d,M;const f=i>1?Math.round((s-a)/(i-1)):null;for(_i(n,l,u,Ce(f)?0:a-f,a),d=0,M=i-1;d<M;d++)_i(n,l,u,e[d],e[d+1]);return _i(n,l,u,s,Ce(f)?n.length:s+f),l}return _i(n,l,u),l}function Ox(r){const n=r.options.offset,t=r._tickSize(),o=r._length/t+(n?0:1),e=r._maxLength/t;return Math.floor(Math.min(o,e))}function Cx(r,n,t){const o=Qx(r),e=n.length/t;if(!o)return Math.max(e,1);const i=w1(o);for(let a=0,s=i.length-1;a<s;a++){const l=i[a];if(l>e)return l}return Math.max(e,1)}function Ex(r){const n=[];let t,o;for(t=0,o=r.length;t<o;t++)r[t].major&&n.push(t);return n}function _x(r,n,t,o){let e=0,i=t[0],a;for(o=Math.ceil(o),a=0;a<r.length;a++)a===i&&(n.push(r[a]),e++,i=t[e*o])}function _i(r,n,t,o,e){const i=we(o,0),a=Math.min(we(e,r.length),r.length);let s=0,l,u,d;for(t=Math.ceil(t),e&&(l=e-o,t=l/Math.floor(l/t)),d=i;d<0;)s++,d=Math.round(i+s*t);for(u=Math.max(i,0);u<a;u++)u===d&&(n.push(r[u]),s++,d=Math.round(i+s*t))}function Qx(r){const n=r.length;let t,o;if(n<2)return!1;for(o=r[0],t=1;t<n;++t)if(r[t]-r[t-1]!==o)return!1;return o}const Ux=r=>r==="left"?"right":r==="right"?"left":r,AM=(r,n,t)=>n==="top"||n==="left"?r[n]+t:r[n]-t;function kM(r,n){const t=[],o=r.length/n,e=r.length;let i=0;for(;i<e;i+=o)t.push(r[Math.floor(i)]);return t}function Yx(r,n,t){const o=r.ticks.length,e=Math.min(n,o-1),i=r._startPixel,a=r._endPixel,s=1e-6;let l=r.getPixelForTick(e),u;if(!(t&&(o===1?u=Math.max(l-i,a-l):n===0?u=(r.getPixelForTick(1)-l)/2:u=(l-r.getPixelForTick(e-1))/2,l+=e<n?u:-u,l<i-s||l>a+s)))return l}function Bx(r,n){_e(r,t=>{const o=t.gc,e=o.length/2;let i;if(e>n){for(i=0;i<e;++i)delete t.data[o[i]];o.splice(0,e)}})}function br(r){return r.drawTicks?r.tickLength:0}function wM(r,n){if(!r.display)return 0;const t=yt(r.font,n),o=bt(r.padding);return(Ze(r.text)?r.text.length:1)*t.lineHeight+o.height}function Px(r,n){return Dn(r,{scale:n,type:"scale"})}function Rx(r,n,t){return Dn(r,{tick:t,index:n,type:"tick"})}function Vx(r,n,t){let o=Q1(r);return(t&&n!=="right"||!t&&n==="right")&&(o=Ux(o)),o}function Zx(r,n,t,o){const{top:e,left:i,bottom:a,right:s,chart:l}=r,{chartArea:u,scales:d}=l;let M=0,f,p,y;const I=a-e,v=s-i;if(r.isHorizontal()){if(p=zd(o,i,s),ke(t)){const h=Object.keys(t)[0],N=t[h];y=d[h].getPixelForValue(N)+I-n}else t==="center"?y=(u.bottom+u.top)/2+I-n:y=AM(r,t,n);f=s-i}else{if(ke(t)){const h=Object.keys(t)[0],N=t[h];p=d[h].getPixelForValue(N)-v+n}else t==="center"?p=(u.left+u.right)/2-v+n:p=AM(r,t,n);y=zd(o,a,e),M=t==="left"?-Xe:Xe}return{titleX:p,titleY:y,maxWidth:f,rotation:M}}class Pn extends an{constructor(n){super(),this.id=n.id,this.type=n.type,this.options=void 0,this.ctx=n.ctx,this.chart=n.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(n){this.options=n.setContext(this.getContext()),this.axis=n.axis,this._userMin=this.parse(n.min),this._userMax=this.parse(n.max),this._suggestedMin=this.parse(n.suggestedMin),this._suggestedMax=this.parse(n.suggestedMax)}parse(n,t){return n}getUserBounds(){let{_userMin:n,_userMax:t,_suggestedMin:o,_suggestedMax:e}=this;return n=mt(n,Number.POSITIVE_INFINITY),t=mt(t,Number.NEGATIVE_INFINITY),o=mt(o,Number.POSITIVE_INFINITY),e=mt(e,Number.NEGATIVE_INFINITY),{min:mt(n,o),max:mt(t,e),minDefined:ot(n),maxDefined:ot(t)}}getMinMax(n){let{min:t,max:o,minDefined:e,maxDefined:i}=this.getUserBounds(),a;if(e&&i)return{min:t,max:o};const s=this.getMatchingVisibleMetas();for(let l=0,u=s.length;l<u;++l)a=s[l].controller.getMinMax(this,n),e||(t=Math.min(t,a.min)),i||(o=Math.max(o,a.max));return t=i&&t>o?o:t,o=e&&t>o?t:o,{min:mt(t,mt(o,t)),max:mt(o,mt(t,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const n=this.chart.data;return this.options.labels||(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$e(this.options.beforeUpdate,[this])}update(n,t,o){const{beginAtZero:e,grace:i,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=n,this.maxHeight=t,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=N4(this,i,e),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?kM(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Sx(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let n=this.options.reverse,t,o;this.isHorizontal()?(t=this.left,o=this.right):(t=this.top,o=this.bottom,n=!n),this._startPixel=t,this._endPixel=o,this._reversePixels=n,this._length=o-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){$e(this.options.afterUpdate,[this])}beforeSetDimensions(){$e(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(){$e(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),$e(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){$e(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(n){const t=this.options.ticks;let o,e,i;for(o=0,e=n.length;o<e;o++)i=n[o],i.label=$e(t.callback,[i.value,o,n],this)}afterTickToLabelConversion(){$e(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$e(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const n=this.options,t=n.ticks,o=this.ticks.length,e=t.minRotation||0,i=t.maxRotation;let a=e,s,l,u;if(!this._isVisible()||!t.display||e>=i||o<=1||!this.isHorizontal()){this.labelRotation=e;return}const d=this._getLabelSizes(),M=d.widest.width,f=d.highest.height,p=lt(this.chart.width-M,0,this.maxWidth);s=n.offset?this.maxWidth/o:p/(o-1),M+6>s&&(s=p/(o-(n.offset?.5:1)),l=this.maxHeight-br(n.grid)-t.padding-wM(n.title,this.chart.options.font),u=Math.sqrt(M*M+f*f),a=tl(Math.min(Math.asin(lt((d.highest.height+6)/s,-1,1)),Math.asin(lt(l/u,-1,1))-Math.asin(lt(f/u,-1,1)))),a=Math.max(e,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){$e(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$e(this.options.beforeFit,[this])}fit(){const n={width:0,height:0},{chart:t,options:{ticks:o,title:e,grid:i}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=wM(e,t.options.font);if(s?(n.width=this.maxWidth,n.height=br(i)+l):(n.height=this.maxHeight,n.width=br(i)+l),o.display&&this.ticks.length){const{first:u,last:d,widest:M,highest:f}=this._getLabelSizes(),p=o.padding*2,y=Ct(this.labelRotation),I=Math.cos(y),v=Math.sin(y);if(s){const h=o.mirror?0:v*M.width+I*f.height;n.height=Math.min(this.maxHeight,n.height+h+p)}else{const h=o.mirror?0:I*M.width+v*f.height;n.width=Math.min(this.maxWidth,n.width+h+p)}this._calculatePadding(u,d,v,I)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=n.height):(this.width=n.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(n,t,o,e){const{ticks:{align:i,padding:a},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,M=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?u?(f=e*n.width,p=o*t.height):(f=o*n.height,p=e*t.width):i==="start"?p=t.width:i==="end"?f=n.width:i!=="inner"&&(f=n.width/2,p=t.width/2),this.paddingLeft=Math.max((f-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((p-M+a)*this.width/(this.width-M),0)}else{let d=t.height/2,M=n.height/2;i==="start"?(d=0,M=n.height):i==="end"&&(d=t.height,M=0),this.paddingTop=d+a,this.paddingBottom=M+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){$e(this.options.afterFit,[this])}isHorizontal(){const{axis:n,position:t}=this.options;return t==="top"||t==="bottom"||n==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(n){this.beforeTickToLabelConversion(),this.generateTickLabels(n);let t,o;for(t=0,o=n.length;t<o;t++)Ce(n[t].label)&&(n.splice(t,1),o--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let n=this._labelSizes;if(!n){const t=this.options.ticks.sampleSize;let o=this.ticks;t<o.length&&(o=kM(o,t)),this._labelSizes=n=this._computeLabelSizes(o,o.length)}return n}_computeLabelSizes(n,t){const{ctx:o,_longestTextCache:e}=this,i=[],a=[];let s=0,l=0,u,d,M,f,p,y,I,v,h,N,D;for(u=0;u<t;++u){if(f=n[u].label,p=this._resolveTickFontOptions(u),o.font=y=p.string,I=e[y]=e[y]||{data:{},gc:[]},v=p.lineHeight,h=N=0,!Ce(f)&&!Ze(f))h=Ai(o,I.data,I.gc,h,f),N=v;else if(Ze(f))for(d=0,M=f.length;d<M;++d)D=f[d],!Ce(D)&&!Ze(D)&&(h=Ai(o,I.data,I.gc,h,D),N+=v);i.push(h),a.push(N),s=Math.max(h,s),l=Math.max(N,l)}Bx(e,t);const m=i.indexOf(s),j=a.indexOf(l),T=L=>({width:i[L]||0,height:a[L]||0});return{first:T(0),last:T(t-1),widest:T(m),highest:T(j),widths:i,heights:a}}getLabelForValue(n){return n}getPixelForValue(n,t){return NaN}getValueForPixel(n){}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getPixelForDecimal(n){this._reversePixels&&(n=1-n);const t=this._startPixel+n*this._length;return S1(this._alignToPixels?Qn(this.chart,t,0):t)}getDecimalForPixel(n){const t=(n-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:n,max:t}=this;return n<0&&t<0?t:n>0&&t>0?n:0}getContext(n){const t=this.ticks||[];if(n>=0&&n<t.length){const o=t[n];return o.$context||(o.$context=Rx(this.getContext(),n,o))}return this.$context||(this.$context=Px(this.chart.getContext(),this))}_tickSize(){const n=this.options.ticks,t=Ct(this.labelRotation),o=Math.abs(Math.cos(t)),e=Math.abs(Math.sin(t)),i=this._getLabelSizes(),a=n.autoSkipPadding||0,s=i?i.widest.width+a:0,l=i?i.highest.height+a:0;return this.isHorizontal()?l*o>s*e?s/o:l/e:l*e<s*o?l/o:s/e}_isVisible(){const n=this.options.display;return n!=="auto"?!!n:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(n){const t=this.axis,o=this.chart,e=this.options,{grid:i,position:a}=e,s=i.offset,l=this.isHorizontal(),d=this.ticks.length+(s?1:0),M=br(i),f=[],p=i.setContext(this.getContext()),y=p.drawBorder?p.borderWidth:0,I=y/2,v=function(w){return Qn(o,w,y)};let h,N,D,m,j,T,L,k,z,O,b,g;if(a==="top")h=v(this.bottom),T=this.bottom-M,k=h-I,O=v(n.top)+I,g=n.bottom;else if(a==="bottom")h=v(this.top),O=n.top,g=v(n.bottom)-I,T=h+I,k=this.top+M;else if(a==="left")h=v(this.right),j=this.right-M,L=h-I,z=v(n.left)+I,b=n.right;else if(a==="right")h=v(this.left),z=n.left,b=v(n.right)-I,j=h+I,L=this.left+M;else if(t==="x"){if(a==="center")h=v((n.top+n.bottom)/2+.5);else if(ke(a)){const w=Object.keys(a)[0],C=a[w];h=v(this.chart.scales[w].getPixelForValue(C))}O=n.top,g=n.bottom,T=h+I,k=T+M}else if(t==="y"){if(a==="center")h=v((n.left+n.right)/2);else if(ke(a)){const w=Object.keys(a)[0],C=a[w];h=v(this.chart.scales[w].getPixelForValue(C))}j=h-I,L=j-M,z=n.left,b=n.right}const x=we(e.ticks.maxTicksLimit,d),A=Math.max(1,Math.ceil(d/x));for(N=0;N<d;N+=A){const w=i.setContext(this.getContext(N)),C=w.lineWidth,E=w.color,S=w.borderDash||[],_=w.borderDashOffset,Y=w.tickWidth,U=w.tickColor,Q=w.tickBorderDash||[],B=w.tickBorderDashOffset;D=Yx(this,N,s),D!==void 0&&(m=Qn(o,D,C),l?j=L=z=b=m:T=k=O=g=m,f.push({tx1:j,ty1:T,tx2:L,ty2:k,x1:z,y1:O,x2:b,y2:g,width:C,color:E,borderDash:S,borderDashOffset:_,tickWidth:Y,tickColor:U,tickBorderDash:Q,tickBorderDashOffset:B}))}return this._ticksLength=d,this._borderValue=h,f}_computeLabelItems(n){const t=this.axis,o=this.options,{position:e,ticks:i}=o,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:u,padding:d,mirror:M}=i,f=br(o.grid),p=f+d,y=M?-d:p,I=-Ct(this.labelRotation),v=[];let h,N,D,m,j,T,L,k,z,O,b,g,x="middle";if(e==="top")T=this.bottom-y,L=this._getXAxisLabelAlignment();else if(e==="bottom")T=this.top+y,L=this._getXAxisLabelAlignment();else if(e==="left"){const w=this._getYAxisLabelAlignment(f);L=w.textAlign,j=w.x}else if(e==="right"){const w=this._getYAxisLabelAlignment(f);L=w.textAlign,j=w.x}else if(t==="x"){if(e==="center")T=(n.top+n.bottom)/2+p;else if(ke(e)){const w=Object.keys(e)[0],C=e[w];T=this.chart.scales[w].getPixelForValue(C)+p}L=this._getXAxisLabelAlignment()}else if(t==="y"){if(e==="center")j=(n.left+n.right)/2-p;else if(ke(e)){const w=Object.keys(e)[0],C=e[w];j=this.chart.scales[w].getPixelForValue(C)}L=this._getYAxisLabelAlignment(f).textAlign}t==="y"&&(l==="start"?x="top":l==="end"&&(x="bottom"));const A=this._getLabelSizes();for(h=0,N=s.length;h<N;++h){D=s[h],m=D.label;const w=i.setContext(this.getContext(h));k=this.getPixelForTick(h)+i.labelOffset,z=this._resolveTickFontOptions(h),O=z.lineHeight,b=Ze(m)?m.length:1;const C=b/2,E=w.color,S=w.textStrokeColor,_=w.textStrokeWidth;let Y=L;a?(j=k,L==="inner"&&(h===N-1?Y=this.options.reverse?"left":"right":h===0?Y=this.options.reverse?"right":"left":Y="center"),e==="top"?u==="near"||I!==0?g=-b*O+O/2:u==="center"?g=-A.highest.height/2-C*O+O:g=-A.highest.height+O/2:u==="near"||I!==0?g=O/2:u==="center"?g=A.highest.height/2-C*O:g=A.highest.height-b*O,M&&(g*=-1)):(T=k,g=(1-b)*O/2);let U;if(w.showLabelBackdrop){const Q=bt(w.backdropPadding),B=A.heights[h],V=A.widths[h];let P=T+g-Q.top,R=j-Q.left;switch(x){case"middle":P-=B/2;break;case"bottom":P-=B;break}switch(L){case"center":R-=V/2;break;case"right":R-=V;break}U={left:R,top:P,width:V+Q.width,height:B+Q.height,color:w.backdropColor}}v.push({rotation:I,label:m,font:z,color:E,strokeColor:S,strokeWidth:_,textOffset:g,textAlign:Y,textBaseline:x,translation:[j,T],backdrop:U})}return v}_getXAxisLabelAlignment(){const{position:n,ticks:t}=this.options;if(-Ct(this.labelRotation))return n==="top"?"left":"right";let e="center";return t.align==="start"?e="left":t.align==="end"?e="right":t.align==="inner"&&(e="inner"),e}_getYAxisLabelAlignment(n){const{position:t,ticks:{crossAlign:o,mirror:e,padding:i}}=this.options,a=this._getLabelSizes(),s=n+i,l=a.widest.width;let u,d;return t==="left"?e?(d=this.right+i,o==="near"?u="left":o==="center"?(u="center",d+=l/2):(u="right",d+=l)):(d=this.right-s,o==="near"?u="right":o==="center"?(u="center",d-=l/2):(u="left",d=this.left)):t==="right"?e?(d=this.left+i,o==="near"?u="right":o==="center"?(u="center",d-=l/2):(u="left",d-=l)):(d=this.left+s,o==="near"?u="left":o==="center"?(u="center",d+=l/2):(u="right",d=this.right)):u="right",{textAlign:u,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const n=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:n.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:n.width}}drawBackground(){const{ctx:n,options:{backgroundColor:t},left:o,top:e,width:i,height:a}=this;t&&(n.save(),n.fillStyle=t,n.fillRect(o,e,i,a),n.restore())}getLineWidthForValue(n){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const e=this.ticks.findIndex(i=>i.value===n);return e>=0?t.setContext(this.getContext(e)).lineWidth:0}drawGrid(n){const t=this.options.grid,o=this.ctx,e=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(n));let i,a;const s=(l,u,d)=>{!d.width||!d.color||(o.save(),o.lineWidth=d.width,o.strokeStyle=d.color,o.setLineDash(d.borderDash||[]),o.lineDashOffset=d.borderDashOffset,o.beginPath(),o.moveTo(l.x,l.y),o.lineTo(u.x,u.y),o.stroke(),o.restore())};if(t.display)for(i=0,a=e.length;i<a;++i){const l=e[i];t.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&s({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:n,ctx:t,options:{grid:o}}=this,e=o.setContext(this.getContext()),i=o.drawBorder?e.borderWidth:0;if(!i)return;const a=o.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let l,u,d,M;this.isHorizontal()?(l=Qn(n,this.left,i)-i/2,u=Qn(n,this.right,a)+a/2,d=M=s):(d=Qn(n,this.top,i)-i/2,M=Qn(n,this.bottom,a)+a/2,l=u=s),t.save(),t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,t.beginPath(),t.moveTo(l,d),t.lineTo(u,M),t.stroke(),t.restore()}drawLabels(n){if(!this.options.ticks.display)return;const o=this.ctx,e=this._computeLabelArea();e&&Hd(o,e);const i=this._labelItems||(this._labelItems=this._computeLabelItems(n));let a,s;for(a=0,s=i.length;a<s;++a){const l=i[a],u=l.font,d=l.label;l.backdrop&&(o.fillStyle=l.backdrop.color,o.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let M=l.textOffset;ki(o,d,0,M,u,l)}e&&Fd(o)}drawTitle(){const{ctx:n,options:{position:t,title:o,reverse:e}}=this;if(!o.display)return;const i=yt(o.font),a=bt(o.padding),s=o.align;let l=i.lineHeight/2;t==="bottom"||t==="center"||ke(t)?(l+=a.bottom,Ze(o.text)&&(l+=i.lineHeight*(o.text.length-1))):l+=a.top;const{titleX:u,titleY:d,maxWidth:M,rotation:f}=Zx(this,l,t,s);ki(n,o.text,0,0,i,{color:o.color,maxWidth:M,rotation:f,textAlign:Vx(s,t,e),textBaseline:"middle",translation:[u,d]})}draw(n){!this._isVisible()||(this.drawBackground(),this.drawGrid(n),this.drawBorder(),this.drawTitle(),this.drawLabels(n))}_layers(){const n=this.options,t=n.ticks&&n.ticks.z||0,o=we(n.grid&&n.grid.z,-1);return!this._isVisible()||this.draw!==Pn.prototype.draw?[{z:t,draw:e=>{this.draw(e)}}]:[{z:o,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:o+1,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(n){const t=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",e=[];let i,a;for(i=0,a=t.length;i<a;++i){const s=t[i];s[o]===this.id&&(!n||s.type===n)&&e.push(s)}return e}_resolveTickFontOptions(n){const t=this.options.ticks.setContext(this.getContext(n));return yt(t.font)}_maxDigits(){const n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}}class Qi{constructor(n,t,o){this.type=n,this.scope=t,this.override=o,this.items=Object.create(null)}isForType(n){return Object.prototype.isPrototypeOf.call(this.type.prototype,n.prototype)}register(n){const t=Object.getPrototypeOf(n);let o;Hx(t)&&(o=this.register(t));const e=this.items,i=n.id,a=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+n);return i in e||(e[i]=n,Wx(n,a,o),this.override&&Ae.override(n.id,n.overrides)),a}get(n){return this.items[n]}unregister(n){const t=this.items,o=n.id,e=this.scope;o in t&&delete t[o],e&&o in Ae[e]&&(delete Ae[e][o],this.override&&delete _n[o])}}function Wx(r,n,t){const o=Mr(Object.create(null),[t?Ae.get(t):{},Ae.get(n),r.defaults]);Ae.set(n,o),r.defaultRoutes&&Gx(n,r.defaultRoutes),r.descriptors&&Ae.describe(n,r.descriptors)}function Gx(r,n){Object.keys(n).forEach(t=>{const o=t.split("."),e=o.pop(),i=[r].concat(o).join("."),a=n[t].split("."),s=a.pop(),l=a.join(".");Ae.route(i,e,l,s)})}function Hx(r){return"id"in r&&"defaults"in r}class Fx{constructor(){this.controllers=new Qi(_t,"datasets",!0),this.elements=new Qi(an,"elements"),this.plugins=new Qi(Object,"plugins"),this.scales=new Qi(Pn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...n){this._each("register",n)}remove(...n){this._each("unregister",n)}addControllers(...n){this._each("register",n,this.controllers)}addElements(...n){this._each("register",n,this.elements)}addPlugins(...n){this._each("register",n,this.plugins)}addScales(...n){this._each("register",n,this.scales)}getController(n){return this._get(n,this.controllers,"controller")}getElement(n){return this._get(n,this.elements,"element")}getPlugin(n){return this._get(n,this.plugins,"plugin")}getScale(n){return this._get(n,this.scales,"scale")}removeControllers(...n){this._each("unregister",n,this.controllers)}removeElements(...n){this._each("unregister",n,this.elements)}removePlugins(...n){this._each("unregister",n,this.plugins)}removeScales(...n){this._each("unregister",n,this.scales)}_each(n,t,o){[...t].forEach(e=>{const i=o||this._getRegistryForType(e);o||i.isForType(e)||i===this.plugins&&e.id?this._exec(n,i,e):_e(e,a=>{const s=o||this._getRegistryForType(a);this._exec(n,s,a)})})}_exec(n,t,o){const e=el(n);$e(o["before"+e],[],o),t[n](o),$e(o["after"+e],[],o)}_getRegistryForType(n){for(let t=0;t<this._typedRegistries.length;t++){const o=this._typedRegistries[t];if(o.isForType(n))return o}return this.plugins}_get(n,t,o){const e=t.get(n);if(e===void 0)throw new Error('"'+n+'" is not a registered '+o+".");return e}}var Ht=new Fx;class Al extends _t{update(n){const t=this._cachedMeta,{data:o=[]}=t,e=this.chart._animationsDisabled;let{start:i,count:a}=Sd(t,o,e);if(this._drawStart=i,this._drawCount=a,Od(t)&&(i=0,a=o.length),this.options.showLine){const{dataset:s,_dataset:l}=t;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=o;const u=this.resolveDatasetElementOptions(n);u.segment=this.options.segment,this.updateElement(s,void 0,{animated:!e,options:u},n)}this.updateElements(o,i,a,n)}addElements(){const{showLine:n}=this.options;!this.datasetElementType&&n&&(this.datasetElementType=Ht.getElement("line")),super.addElements()}updateElements(n,t,o,e){const i=e==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,d=this.resolveDataElementOptions(t,e),M=this.getSharedOptions(d),f=this.includeOptions(e,M),p=a.axis,y=s.axis,{spanGaps:I,segment:v}=this.options,h=Xn(I)?I:Number.POSITIVE_INFINITY,N=this.chart._animationsDisabled||i||e==="none";let D=t>0&&this.getParsed(t-1);for(let m=t;m<t+o;++m){const j=n[m],T=this.getParsed(m),L=N?j:{},k=Ce(T[y]),z=L[p]=a.getPixelForValue(T[p],m),O=L[y]=i||k?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,T,l):T[y],m);L.skip=isNaN(z)||isNaN(O)||k,L.stop=m>0&&Math.abs(T[p]-D[p])>h,v&&(L.parsed=T,L.raw=u.data[m]),f&&(L.options=M||this.resolveDataElementOptions(m,j.active?"active":e)),N||this.updateElement(j,m,L,e),D=T}this.updateSharedOptions(M,e,d)}getMaxOverflow(){const n=this._cachedMeta,t=n.data||[];if(!this.options.showLine){let s=0;for(let l=t.length-1;l>=0;--l)s=Math.max(s,t[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const o=n.dataset,e=o.options&&o.options.borderWidth||0;if(!t.length)return e;const i=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(e,i,a)/2}}Al.id="scatter",Al.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Al.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(r){return"("+r.label+", "+r.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Rn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class kl{constructor(n){this.options=n||{}}init(n){}formats(){return Rn()}parse(n,t){return Rn()}format(n,t){return Rn()}add(n,t,o){return Rn()}diff(n,t,o){return Rn()}startOf(n,t,o){return Rn()}endOf(n,t){return Rn()}}kl.override=function(r){Object.assign(kl.prototype,r)};var $x={_date:kl};function Jx(r,n,t,o){const{controller:e,data:i,_sorted:a}=r,s=e._cachedMeta.iScale;if(s&&n===s.axis&&n!=="r"&&a&&i.length){const l=s._reversePixels?O1:En;if(o){if(e._sharedOptions){const u=i[0],d=typeof u.getRange=="function"&&u.getRange(n);if(d){const M=l(i,n,t-d),f=l(i,n,t+d);return{lo:M.lo,hi:f.hi}}}}else return l(i,n,t)}return{lo:0,hi:i.length-1}}function Tr(r,n,t,o,e){const i=r.getSortedVisibleDatasetMetas(),a=t[n];for(let s=0,l=i.length;s<l;++s){const{index:u,data:d}=i[s],{lo:M,hi:f}=Jx(i[s],n,a,e);for(let p=M;p<=f;++p){const y=d[p];y.skip||o(y,u,p)}}}function Xx(r){const n=r.indexOf("x")!==-1,t=r.indexOf("y")!==-1;return function(o,e){const i=n?Math.abs(o.x-e.x):0,a=t?Math.abs(o.y-e.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(a,2))}}function wl(r,n,t,o,e){const i=[];return!e&&!r.isPointInArea(n)||Tr(r,t,n,function(s,l,u){!e&&!mr(s,r.chartArea,0)||s.inRange(n.x,n.y,o)&&i.push({element:s,datasetIndex:l,index:u})},!0),i}function Kx(r,n,t,o){let e=[];function i(a,s,l){const{startAngle:u,endAngle:d}=a.getProps(["startAngle","endAngle"],o),{angle:M}=bd(a,{x:n.x,y:n.y});pr(M,u,d)&&e.push({element:a,datasetIndex:s,index:l})}return Tr(r,t,n,i),e}function qx(r,n,t,o,e,i){let a=[];const s=Xx(t);let l=Number.POSITIVE_INFINITY;function u(d,M,f){const p=d.inRange(n.x,n.y,e);if(o&&!p)return;const y=d.getCenterPoint(e);if(!(!!i||r.isPointInArea(y))&&!p)return;const v=s(n,y);v<l?(a=[{element:d,datasetIndex:M,index:f}],l=v):v===l&&a.push({element:d,datasetIndex:M,index:f})}return Tr(r,t,n,u),a}function Ll(r,n,t,o,e,i){return!i&&!r.isPointInArea(n)?[]:t==="r"&&!o?Kx(r,n,t,e):qx(r,n,t,o,e,i)}function LM(r,n,t,o,e){const i=[],a=t==="x"?"inXRange":"inYRange";let s=!1;return Tr(r,t,n,(l,u,d)=>{l[a](n[t],e)&&(i.push({element:l,datasetIndex:u,index:d}),s=s||l.inRange(n.x,n.y,e))}),o&&!s?[]:i}var ev={evaluateInteractionItems:Tr,modes:{index(r,n,t,o){const e=Yn(n,r),i=t.axis||"x",a=t.includeInvisible||!1,s=t.intersect?wl(r,e,i,o,a):Ll(r,e,i,!1,o,a),l=[];return s.length?(r.getSortedVisibleDatasetMetas().forEach(u=>{const d=s[0].index,M=u.data[d];M&&!M.skip&&l.push({element:M,datasetIndex:u.index,index:d})}),l):[]},dataset(r,n,t,o){const e=Yn(n,r),i=t.axis||"xy",a=t.includeInvisible||!1;let s=t.intersect?wl(r,e,i,o,a):Ll(r,e,i,!1,o,a);if(s.length>0){const l=s[0].datasetIndex,u=r.getDatasetMeta(l).data;s=[];for(let d=0;d<u.length;++d)s.push({element:u[d],datasetIndex:l,index:d})}return s},point(r,n,t,o){const e=Yn(n,r),i=t.axis||"xy",a=t.includeInvisible||!1;return wl(r,e,i,o,a)},nearest(r,n,t,o){const e=Yn(n,r),i=t.axis||"xy",a=t.includeInvisible||!1;return Ll(r,e,i,t.intersect,o,a)},x(r,n,t,o){const e=Yn(n,r);return LM(r,e,"x",t.intersect,o)},y(r,n,t,o){const e=Yn(n,r);return LM(r,e,"y",t.intersect,o)}}};const zM=["left","top","right","bottom"];function Ar(r,n){return r.filter(t=>t.pos===n)}function SM(r,n){return r.filter(t=>zM.indexOf(t.pos)===-1&&t.box.axis===n)}function kr(r,n){return r.sort((t,o)=>{const e=n?o:t,i=n?t:o;return e.weight===i.weight?e.index-i.index:e.weight-i.weight})}function tv(r){const n=[];let t,o,e,i,a,s;for(t=0,o=(r||[]).length;t<o;++t)e=r[t],{position:i,options:{stack:a,stackWeight:s=1}}=e,n.push({index:t,box:e,pos:i,horizontal:e.isHorizontal(),weight:e.weight,stack:a&&i+a,stackWeight:s});return n}function nv(r){const n={};for(const t of r){const{stack:o,pos:e,stackWeight:i}=t;if(!o||!zM.includes(e))continue;const a=n[o]||(n[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return n}function rv(r,n){const t=nv(r),{vBoxMaxWidth:o,hBoxMaxHeight:e}=n;let i,a,s;for(i=0,a=r.length;i<a;++i){s=r[i];const{fullSize:l}=s.box,u=t[s.stack],d=u&&s.stackWeight/u.weight;s.horizontal?(s.width=d?d*o:l&&n.availableWidth,s.height=e):(s.width=o,s.height=d?d*e:l&&n.availableHeight)}return t}function ov(r){const n=tv(r),t=kr(n.filter(u=>u.box.fullSize),!0),o=kr(Ar(n,"left"),!0),e=kr(Ar(n,"right")),i=kr(Ar(n,"top"),!0),a=kr(Ar(n,"bottom")),s=SM(n,"x"),l=SM(n,"y");return{fullSize:t,leftAndTop:o.concat(i),rightAndBottom:e.concat(l).concat(a).concat(s),chartArea:Ar(n,"chartArea"),vertical:o.concat(e).concat(l),horizontal:i.concat(a).concat(s)}}function OM(r,n,t,o){return Math.max(r[t],n[t])+Math.max(r[o],n[o])}function CM(r,n){r.top=Math.max(r.top,n.top),r.left=Math.max(r.left,n.left),r.bottom=Math.max(r.bottom,n.bottom),r.right=Math.max(r.right,n.right)}function iv(r,n,t,o){const{pos:e,box:i}=t,a=r.maxPadding;if(!ke(e)){t.size&&(r[e]-=t.size);const M=o[t.stack]||{size:0,count:1};M.size=Math.max(M.size,t.horizontal?i.height:i.width),t.size=M.size/M.count,r[e]+=t.size}i.getPadding&&CM(a,i.getPadding());const s=Math.max(0,n.outerWidth-OM(a,r,"left","right")),l=Math.max(0,n.outerHeight-OM(a,r,"top","bottom")),u=s!==r.w,d=l!==r.h;return r.w=s,r.h=l,t.horizontal?{same:u,other:d}:{same:d,other:u}}function av(r){const n=r.maxPadding;function t(o){const e=Math.max(n[o]-r[o],0);return r[o]+=e,e}r.y+=t("top"),r.x+=t("left"),t("right"),t("bottom")}function sv(r,n){const t=n.maxPadding;function o(e){const i={left:0,top:0,right:0,bottom:0};return e.forEach(a=>{i[a]=Math.max(n[a],t[a])}),i}return o(r?["left","right"]:["top","bottom"])}function wr(r,n,t,o){const e=[];let i,a,s,l,u,d;for(i=0,a=r.length,u=0;i<a;++i){s=r[i],l=s.box,l.update(s.width||n.w,s.height||n.h,sv(s.horizontal,n));const{same:M,other:f}=iv(n,t,s,o);u|=M&&e.length,d=d||f,l.fullSize||e.push(s)}return u&&wr(e,n,t,o)||d}function Ui(r,n,t,o,e){r.top=t,r.left=n,r.right=n+o,r.bottom=t+e,r.width=o,r.height=e}function EM(r,n,t,o){const e=t.padding;let{x:i,y:a}=n;for(const s of r){const l=s.box,u=o[s.stack]||{count:1,placed:0,weight:1},d=s.stackWeight/u.weight||1;if(s.horizontal){const M=n.w*d,f=u.size||l.height;Dt(u.start)&&(a=u.start),l.fullSize?Ui(l,e.left,a,t.outerWidth-e.right-e.left,f):Ui(l,n.left+u.placed,a,M,f),u.start=a,u.placed+=M,a=l.bottom}else{const M=n.h*d,f=u.size||l.width;Dt(u.start)&&(i=u.start),l.fullSize?Ui(l,i,e.top,f,t.outerHeight-e.bottom-e.top):Ui(l,i,n.top+u.placed,f,M),u.start=i,u.placed+=M,i=l.right}}n.x=i,n.y=a}Ae.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Yi={addBox(r,n){r.boxes||(r.boxes=[]),n.fullSize=n.fullSize||!1,n.position=n.position||"top",n.weight=n.weight||0,n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]},r.boxes.push(n)},removeBox(r,n){const t=r.boxes?r.boxes.indexOf(n):-1;t!==-1&&r.boxes.splice(t,1)},configure(r,n,t){n.fullSize=t.fullSize,n.position=t.position,n.weight=t.weight},update(r,n,t,o){if(!r)return;const e=bt(r.options.layout.padding),i=Math.max(n-e.width,0),a=Math.max(t-e.height,0),s=ov(r.boxes),l=s.vertical,u=s.horizontal;_e(r.boxes,I=>{typeof I.beforeLayout=="function"&&I.beforeLayout()});const d=l.reduce((I,v)=>v.box.options&&v.box.options.display===!1?I:I+1,0)||1,M=Object.freeze({outerWidth:n,outerHeight:t,padding:e,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/d,hBoxMaxHeight:a/2}),f=Object.assign({},e);CM(f,bt(o));const p=Object.assign({maxPadding:f,w:i,h:a,x:e.left,y:e.top},e),y=rv(l.concat(u),M);wr(s.fullSize,p,M,y),wr(l,p,M,y),wr(u,p,M,y)&&wr(l,p,M,y),av(p),EM(s.leftAndTop,p,M,y),p.x+=p.w,p.y+=p.h,EM(s.rightAndBottom,p,M,y),r.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},_e(s.chartArea,I=>{const v=I.box;Object.assign(v,r.chartArea),v.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class _M{acquireContext(n,t){}releaseContext(n){return!1}addEventListener(n,t,o){}removeEventListener(n,t,o){}getDevicePixelRatio(){return 1}getMaximumSize(n,t,o,e){return t=Math.max(0,t||n.width),o=o||n.height,{width:t,height:Math.max(0,e?Math.floor(t/e):o)}}isAttached(n){return!0}updateConfig(n){}}class lv extends _M{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}}const Bi="$chartjs",uv={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},QM=r=>r===null||r==="";function cv(r,n){const t=r.style,o=r.getAttribute("height"),e=r.getAttribute("width");if(r[Bi]={initial:{height:o,width:e,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",QM(e)){const i=aM(r,"width");i!==void 0&&(r.width=i)}if(QM(o))if(r.style.height==="")r.height=r.width/(n||2);else{const i=aM(r,"height");i!==void 0&&(r.height=i)}return r}const UM=P4?{passive:!0}:!1;function dv(r,n,t){r.addEventListener(n,t,UM)}function Mv(r,n,t){r.canvas.removeEventListener(n,t,UM)}function fv(r,n){const t=uv[r.type]||r.type,{x:o,y:e}=Yn(r,n);return{type:t,chart:n,native:r,x:o!==void 0?o:null,y:e!==void 0?e:null}}function Pi(r,n){for(const t of r)if(t===n||t.contains(n))return!0}function gv(r,n,t){const o=r.canvas,e=new MutationObserver(i=>{let a=!1;for(const s of i)a=a||Pi(s.addedNodes,o),a=a&&!Pi(s.removedNodes,o);a&&t()});return e.observe(document,{childList:!0,subtree:!0}),e}function hv(r,n,t){const o=r.canvas,e=new MutationObserver(i=>{let a=!1;for(const s of i)a=a||Pi(s.removedNodes,o),a=a&&!Pi(s.addedNodes,o);a&&t()});return e.observe(document,{childList:!0,subtree:!0}),e}const Lr=new Map;let YM=0;function BM(){const r=window.devicePixelRatio;r!==YM&&(YM=r,Lr.forEach((n,t)=>{t.currentDevicePixelRatio!==r&&n()}))}function pv(r,n){Lr.size||window.addEventListener("resize",BM),Lr.set(r,n)}function yv(r){Lr.delete(r),Lr.size||window.removeEventListener("resize",BM)}function Nv(r,n,t){const o=r.canvas,e=o&&yl(o);if(!e)return;const i=Ld((s,l)=>{const u=e.clientWidth;t(s,l),u<e.clientWidth&&t()},window),a=new ResizeObserver(s=>{const l=s[0],u=l.contentRect.width,d=l.contentRect.height;u===0&&d===0||i(u,d)});return a.observe(e),pv(r,i),a}function zl(r,n,t){t&&t.disconnect(),n==="resize"&&yv(r)}function jv(r,n,t){const o=r.canvas,e=Ld(i=>{r.ctx!==null&&t(fv(i,r))},r,i=>{const a=i[0];return[a,a.offsetX,a.offsetY]});return dv(o,n,e),e}class Iv extends _M{acquireContext(n,t){const o=n&&n.getContext&&n.getContext("2d");return o&&o.canvas===n?(cv(n,t),o):null}releaseContext(n){const t=n.canvas;if(!t[Bi])return!1;const o=t[Bi].initial;["height","width"].forEach(i=>{const a=o[i];Ce(a)?t.removeAttribute(i):t.setAttribute(i,a)});const e=o.style||{};return Object.keys(e).forEach(i=>{t.style[i]=e[i]}),t.width=t.width,delete t[Bi],!0}addEventListener(n,t,o){this.removeEventListener(n,t);const e=n.$proxies||(n.$proxies={}),a={attach:gv,detach:hv,resize:Nv}[t]||jv;e[t]=a(n,t,o)}removeEventListener(n,t){const o=n.$proxies||(n.$proxies={}),e=o[t];if(!e)return;({attach:zl,detach:zl,resize:zl}[t]||Mv)(n,t,e),o[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,o,e){return B4(n,t,o,e)}isAttached(n){const t=yl(n);return!!(t&&t.isConnected)}}function mv(r){return!oM()||typeof OffscreenCanvas!="undefined"&&r instanceof OffscreenCanvas?lv:Iv}class Dv{constructor(){this._init=[]}notify(n,t,o,e){t==="beforeInit"&&(this._init=this._createDescriptors(n,!0),this._notify(this._init,n,"install"));const i=e?this._descriptors(n).filter(e):this._descriptors(n),a=this._notify(i,n,t,o);return t==="afterDestroy"&&(this._notify(i,n,"stop"),this._notify(this._init,n,"uninstall")),a}_notify(n,t,o,e){e=e||{};for(const i of n){const a=i.plugin,s=a[o],l=[t,e,i.options];if($e(s,l,a)===!1&&e.cancelable)return!1}return!0}invalidate(){Ce(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(n){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(n);return this._notifyStateChanges(n),t}_createDescriptors(n,t){const o=n&&n.config,e=we(o.options&&o.options.plugins,{}),i=xv(o);return e===!1&&!t?[]:bv(n,i,e,t)}_notifyStateChanges(n){const t=this._oldCache||[],o=this._cache,e=(i,a)=>i.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(e(t,o),n,"stop"),this._notify(e(o,t),n,"start")}}function xv(r){const n={},t=[],o=Object.keys(Ht.plugins.items);for(let i=0;i<o.length;i++)t.push(Ht.getPlugin(o[i]));const e=r.plugins||[];for(let i=0;i<e.length;i++){const a=e[i];t.indexOf(a)===-1&&(t.push(a),n[a.id]=!0)}return{plugins:t,localIds:n}}function vv(r,n){return!n&&r===!1?null:r===!0?{}:r}function bv(r,{plugins:n,localIds:t},o,e){const i=[],a=r.getContext();for(const s of n){const l=s.id,u=vv(o[l],e);u!==null&&i.push({plugin:s,options:Tv(r.config,{plugin:s,local:t[l]},u,a)})}return i}function Tv(r,{plugin:n,local:t},o,e){const i=r.pluginScopeKeys(n),a=r.getOptionScopes(o,i);return t&&n.defaults&&a.push(n.defaults),r.createResolver(a,e,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Sl(r,n){const t=Ae.datasets[r]||{};return((n.datasets||{})[r]||{}).indexAxis||n.indexAxis||t.indexAxis||"x"}function Av(r,n){let t=r;return r==="_index_"?t=n:r==="_value_"&&(t=n==="x"?"y":"x"),t}function kv(r,n){return r===n?"_index_":"_value_"}function wv(r){if(r==="top"||r==="bottom")return"x";if(r==="left"||r==="right")return"y"}function Ol(r,n){return r==="x"||r==="y"?r:n.axis||wv(n.position)||r.charAt(0).toLowerCase()}function Lv(r,n){const t=_n[r.type]||{scales:{}},o=n.scales||{},e=Sl(r.type,n),i=Object.create(null),a=Object.create(null);return Object.keys(o).forEach(s=>{const l=o[s];if(!ke(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const u=Ol(s,l),d=kv(u,e),M=t.scales||{};i[u]=i[u]||s,a[s]=fr(Object.create(null),[{axis:u},l,M[u],M[d]])}),r.data.datasets.forEach(s=>{const l=s.type||r.type,u=s.indexAxis||Sl(l,n),M=(_n[l]||{}).scales||{};Object.keys(M).forEach(f=>{const p=Av(f,u),y=s[p+"AxisID"]||i[p]||p;a[y]=a[y]||Object.create(null),fr(a[y],[{axis:p},o[y],M[f]])})}),Object.keys(a).forEach(s=>{const l=a[s];fr(l,[Ae.scales[l.type],Ae.scale])}),a}function PM(r){const n=r.options||(r.options={});n.plugins=we(n.plugins,{}),n.scales=Lv(r,n)}function RM(r){return r=r||{},r.datasets=r.datasets||[],r.labels=r.labels||[],r}function zv(r){return r=r||{},r.data=RM(r.data),PM(r),r}const VM=new Map,ZM=new Set;function Ri(r,n){let t=VM.get(r);return t||(t=n(),VM.set(r,t),ZM.add(t)),t}const zr=(r,n,t)=>{const o=Nn(n,t);o!==void 0&&r.add(o)};class Sv{constructor(n){this._config=zv(n),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(n){this._config.type=n}get data(){return this._config.data}set data(n){this._config.data=RM(n)}get options(){return this._config.options}set options(n){this._config.options=n}get plugins(){return this._config.plugins}update(){const n=this._config;this.clearCache(),PM(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return Ri(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return Ri(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return Ri(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){const t=n.id,o=this.type;return Ri(`${o}-plugin-${t}`,()=>[[`plugins.${t}`,...n.additionalOptionScopes||[]]])}_cachedScopes(n,t){const o=this._scopeCache;let e=o.get(n);return(!e||t)&&(e=new Map,o.set(n,e)),e}getOptionScopes(n,t,o){const{options:e,type:i}=this,a=this._cachedScopes(n,o),s=a.get(t);if(s)return s;const l=new Set;t.forEach(d=>{n&&(l.add(n),d.forEach(M=>zr(l,n,M))),d.forEach(M=>zr(l,e,M)),d.forEach(M=>zr(l,_n[i]||{},M)),d.forEach(M=>zr(l,Ae,M)),d.forEach(M=>zr(l,cl,M))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),ZM.has(t)&&a.set(t,u),u}chartOptionScopes(){const{options:n,type:t}=this;return[n,_n[t]||{},Ae.datasets[t]||{},{type:t},Ae,cl]}resolveNamedOptions(n,t,o,e=[""]){const i={$shared:!0},{resolver:a,subPrefixes:s}=WM(this._resolverCache,n,e);let l=a;if(Cv(a,t)){i.$shared=!1,o=jn(o)?o():o;const u=this.createResolver(n,o,s);l=er(a,o,u)}for(const u of t)i[u]=l[u];return i}createResolver(n,t,o=[""],e){const{resolver:i}=WM(this._resolverCache,n,o);return ke(t)?er(i,t,void 0,e):i}}function WM(r,n,t){let o=r.get(n);o||(o=new Map,r.set(n,o));const e=t.join();let i=o.get(e);return i||(i={resolver:gl(n,t),subPrefixes:t.filter(s=>!s.toLowerCase().includes("hover"))},o.set(e,i)),i}const Ov=r=>ke(r)&&Object.getOwnPropertyNames(r).reduce((n,t)=>n||jn(r[t]),!1);function Cv(r,n){const{isScriptable:t,isIndexable:o}=Jd(r);for(const e of n){const i=t(e),a=o(e),s=(a||i)&&r[e];if(i&&(jn(s)||Ov(s))||a&&Ze(s))return!0}return!1}var Ev="3.9.1";const _v=["top","bottom","left","right","chartArea"];function GM(r,n){return r==="top"||r==="bottom"||_v.indexOf(r)===-1&&n==="x"}function HM(r,n){return function(t,o){return t[r]===o[r]?t[n]-o[n]:t[r]-o[r]}}function FM(r){const n=r.chart,t=n.options.animation;n.notifyPlugins("afterRender"),$e(t&&t.onComplete,[r],n)}function Qv(r){const n=r.chart,t=n.options.animation;$e(t&&t.onProgress,[r],n)}function $M(r){return oM()&&typeof r=="string"?r=document.getElementById(r):r&&r.length&&(r=r[0]),r&&r.canvas&&(r=r.canvas),r}const Vi={},JM=r=>{const n=$M(r);return Object.values(Vi).filter(t=>t.canvas===n).pop()};function Uv(r,n,t){const o=Object.keys(r);for(const e of o){const i=+e;if(i>=n){const a=r[e];delete r[e],(t>0||i>n)&&(r[i+t]=a)}}}function Yv(r,n,t,o){return!t||r.type==="mouseout"?null:o?n:r}class Sr{constructor(n,t){const o=this.config=new Sv(t),e=$M(n),i=JM(e);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||mv(e)),this.platform.updateConfig(o);const s=this.platform.acquireContext(e,a.aspectRatio),l=s&&s.canvas,u=l&&l.height,d=l&&l.width;if(this.id=I1(),this.ctx=s,this.canvas=l,this.width=d,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Dv,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=_1(M=>this.update(M),a.resizeDelay||0),this._dataChanges=[],Vi[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}on.listen(this,"complete",FM),on.listen(this,"progress",Qv),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:n,maintainAspectRatio:t},width:o,height:e,_aspectRatio:i}=this;return Ce(n)?t&&i?i:e?o/e:null:n}get data(){return this.config.data}set data(n){this.config.data=n}get options(){return this._options}set options(n){this.config.options=n}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():iM(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Gd(this.canvas,this.ctx),this}stop(){return on.stop(this),this}resize(n,t){on.running(this)?this._resizeBeforeDraw={width:n,height:t}:this._resize(n,t)}_resize(n,t){const o=this.options,e=this.canvas,i=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(e,n,t,i),s=o.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,iM(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),$e(o.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};_e(t,(o,e)=>{o.id=e})}buildOrUpdateScales(){const n=this.options,t=n.scales,o=this.scales,e=Object.keys(o).reduce((a,s)=>(a[s]=!1,a),{});let i=[];t&&(i=i.concat(Object.keys(t).map(a=>{const s=t[a],l=Ol(a,s),u=l==="r",d=l==="x";return{options:s,dposition:u?"chartArea":d?"bottom":"left",dtype:u?"radialLinear":d?"category":"linear"}}))),_e(i,a=>{const s=a.options,l=s.id,u=Ol(l,s),d=we(s.type,a.dtype);(s.position===void 0||GM(s.position,u)!==GM(a.dposition))&&(s.position=a.dposition),e[l]=!0;let M=null;if(l in o&&o[l].type===d)M=o[l];else{const f=Ht.getScale(d);M=new f({id:l,type:d,ctx:this.ctx,chart:this}),o[M.id]=M}M.init(s,n)}),_e(e,(a,s)=>{a||delete o[s]}),_e(o,a=>{Yi.configure(this,a,a.options),Yi.addBox(this,a)})}_updateMetasets(){const n=this._metasets,t=this.data.datasets.length,o=n.length;if(n.sort((e,i)=>e.index-i.index),o>t){for(let e=t;e<o;++e)this._destroyDatasetMeta(e);n.splice(t,o-t)}this._sortedMetasets=n.slice(0).sort(HM("order","index"))}_removeUnreferencedMetasets(){const{_metasets:n,data:{datasets:t}}=this;n.length>t.length&&delete this._stacks,n.forEach((o,e)=>{t.filter(i=>i===o._dataset).length===0&&this._destroyDatasetMeta(e)})}buildOrUpdateControllers(){const n=[],t=this.data.datasets;let o,e;for(this._removeUnreferencedMetasets(),o=0,e=t.length;o<e;o++){const i=t[o];let a=this.getDatasetMeta(o);const s=i.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=s,a.indexAxis=i.indexAxis||Sl(s,this.options),a.order=i.order||0,a.index=o,a.label=""+i.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const l=Ht.getController(s),{datasetElementType:u,dataElementType:d}=Ae.datasets[s];Object.assign(l.prototype,{dataElementType:Ht.getElement(d),datasetElementType:u&&Ht.getElement(u)}),a.controller=new l(this,o),n.push(a.controller)}}return this._updateMetasets(),n}_resetElements(){_e(this.data.datasets,(n,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(n){const t=this.config;t.update();const o=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),e=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:n,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let u=0,d=this.data.datasets.length;u<d;u++){const{controller:M}=this.getDatasetMeta(u),f=!e&&i.indexOf(M)===-1;M.buildOrUpdateElements(f),a=Math.max(+M.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),e||_e(i,u=>{u.reset()}),this._updateDatasets(n),this.notifyPlugins("afterUpdate",{mode:n}),this._layers.sort(HM("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){_e(this.scales,n=>{Yi.removeBox(this,n)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const n=this.options,t=new Set(Object.keys(this._listeners)),o=new Set(n.events);(!Id(t,o)||!!this._responsiveListeners!==n.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:n}=this,t=this._getUniformDataChanges()||[];for(const{method:o,start:e,count:i}of t){const a=o==="_removeElements"?-i:i;Uv(n,e,a)}}_getUniformDataChanges(){const n=this._dataChanges;if(!n||!n.length)return;this._dataChanges=[];const t=this.data.datasets.length,o=i=>new Set(n.filter(a=>a[0]===i).map((a,s)=>s+","+a.splice(1).join(","))),e=o(0);for(let i=1;i<t;i++)if(!Id(e,o(i)))return;return Array.from(e).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(n){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Yi.update(this,this.width,this.height,n);const t=this.chartArea,o=t.width<=0||t.height<=0;this._layers=[],_e(this.boxes,e=>{o&&e.position==="chartArea"||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,i)=>{e._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(n){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:n,cancelable:!0})!==!1){for(let t=0,o=this.data.datasets.length;t<o;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,o=this.data.datasets.length;t<o;++t)this._updateDataset(t,jn(n)?n({datasetIndex:t}):n);this.notifyPlugins("afterDatasetsUpdate",{mode:n})}}_updateDataset(n,t){const o=this.getDatasetMeta(n),e={meta:o,index:n,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",e)!==!1&&(o.controller._update(t),e.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",e))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(on.has(this)?this.attached&&!on.running(this)&&on.start(this):(this.draw(),FM({chart:this})))}draw(){let n;if(this._resizeBeforeDraw){const{width:o,height:e}=this._resizeBeforeDraw;this._resize(o,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(n=0;n<t.length&&t[n].z<=0;++n)t[n].draw(this.chartArea);for(this._drawDatasets();n<t.length;++n)t[n].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(n){const t=this._sortedMetasets,o=[];let e,i;for(e=0,i=t.length;e<i;++e){const a=t[e];(!n||a.visible)&&o.push(a)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const n=this.getSortedVisibleDatasetMetas();for(let t=n.length-1;t>=0;--t)this._drawDataset(n[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(n){const t=this.ctx,o=n._clip,e=!o.disabled,i=this.chartArea,a={meta:n,index:n.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(e&&Hd(t,{left:o.left===!1?0:i.left-o.left,right:o.right===!1?this.width:i.right+o.right,top:o.top===!1?0:i.top-o.top,bottom:o.bottom===!1?this.height:i.bottom+o.bottom}),n.controller.draw(),e&&Fd(t),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(n){return mr(n,this.chartArea,this._minPadding)}getElementsAtEventForMode(n,t,o,e){const i=ev.modes[t];return typeof i=="function"?i(this,n,o,e):[]}getDatasetMeta(n){const t=this.data.datasets[n],o=this._metasets;let e=o.filter(i=>i&&i._dataset===t).pop();return e||(e={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:n,_dataset:t,_parsed:[],_sorted:!1},o.push(e)),e}getContext(){return this.$context||(this.$context=Dn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(n){const t=this.data.datasets[n];if(!t)return!1;const o=this.getDatasetMeta(n);return typeof o.hidden=="boolean"?!o.hidden:!t.hidden}setDatasetVisibility(n,t){const o=this.getDatasetMeta(n);o.hidden=!t}toggleDataVisibility(n){this._hiddenIndices[n]=!this._hiddenIndices[n]}getDataVisibility(n){return!this._hiddenIndices[n]}_updateVisibility(n,t,o){const e=o?"show":"hide",i=this.getDatasetMeta(n),a=i.controller._resolveAnimations(void 0,e);Dt(t)?(i.data[t].hidden=!o,this.update()):(this.setDatasetVisibility(n,o),a.update(i,{visible:o}),this.update(s=>s.datasetIndex===n?e:void 0))}hide(n,t){this._updateVisibility(n,t,!1)}show(n,t){this._updateVisibility(n,t,!0)}_destroyDatasetMeta(n){const t=this._metasets[n];t&&t.controller&&t.controller._destroy(),delete this._metasets[n]}_stop(){let n,t;for(this.stop(),on.remove(this),n=0,t=this.data.datasets.length;n<t;++n)this._destroyDatasetMeta(n)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:n,ctx:t}=this;this._stop(),this.config.clearCache(),n&&(this.unbindEvents(),Gd(n,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete Vi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...n){return this.canvas.toDataURL(...n)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const n=this._listeners,t=this.platform,o=(i,a)=>{t.addEventListener(this,i,a),n[i]=a},e=(i,a,s)=>{i.offsetX=a,i.offsetY=s,this._eventHandler(i)};_e(this.options.events,i=>o(i,e))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const n=this._responsiveListeners,t=this.platform,o=(l,u)=>{t.addEventListener(this,l,u),n[l]=u},e=(l,u)=>{n[l]&&(t.removeEventListener(this,l,u),delete n[l])},i=(l,u)=>{this.canvas&&this.resize(l,u)};let a;const s=()=>{e("attach",s),this.attached=!0,this.resize(),o("resize",i),o("detach",a)};a=()=>{this.attached=!1,e("resize",i),this._stop(),this._resize(0,0),o("attach",s)},t.isAttached(this.canvas)?s():a()}unbindEvents(){_e(this._listeners,(n,t)=>{this.platform.removeEventListener(this,t,n)}),this._listeners={},_e(this._responsiveListeners,(n,t)=>{this.platform.removeEventListener(this,t,n)}),this._responsiveListeners=void 0}updateHoverStyle(n,t,o){const e=o?"set":"remove";let i,a,s,l;for(t==="dataset"&&(i=this.getDatasetMeta(n[0].datasetIndex),i.controller["_"+e+"DatasetHoverStyle"]()),s=0,l=n.length;s<l;++s){a=n[s];const u=a&&this.getDatasetMeta(a.datasetIndex).controller;u&&u[e+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(n){const t=this._active||[],o=n.map(({datasetIndex:i,index:a})=>{const s=this.getDatasetMeta(i);if(!s)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:s.data[a],index:a}});!Ni(o,t)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,t))}notifyPlugins(n,t,o){return this._plugins.notify(this,n,t,o)}_updateHoverStyles(n,t,o){const e=this.options.hover,i=(l,u)=>l.filter(d=>!u.some(M=>d.datasetIndex===M.datasetIndex&&d.index===M.index)),a=i(t,n),s=o?n:i(n,t);a.length&&this.updateHoverStyle(a,e.mode,!1),s.length&&e.mode&&this.updateHoverStyle(s,e.mode,!0)}_eventHandler(n,t){const o={event:n,replay:t,cancelable:!0,inChartArea:this.isPointInArea(n)},e=a=>(a.options.events||this.options.events).includes(n.native.type);if(this.notifyPlugins("beforeEvent",o,e)===!1)return;const i=this._handleEvent(n,t,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,e),(i||o.changed)&&this.render(),this}_handleEvent(n,t,o){const{_active:e=[],options:i}=this,a=t,s=this._getActiveElements(n,e,o,a),l=T1(n),u=Yv(n,this._lastEvent,o,l);o&&(this._lastEvent=null,$e(i.onHover,[n,s,this],this),l&&$e(i.onClick,[n,s,this],this));const d=!Ni(s,e);return(d||t)&&(this._active=s,this._updateHoverStyles(s,e,t)),this._lastEvent=u,d}_getActiveElements(n,t,o,e){if(n.type==="mouseout")return[];if(!o)return t;const i=this.options.hover;return this.getElementsAtEventForMode(n,i.mode,i,e)}}const XM=()=>_e(Sr.instances,r=>r._plugins.invalidate()),xn=!0;Object.defineProperties(Sr,{defaults:{enumerable:xn,value:Ae},instances:{enumerable:xn,value:Vi},overrides:{enumerable:xn,value:_n},registry:{enumerable:xn,value:Ht},version:{enumerable:xn,value:Ev},getChart:{enumerable:xn,value:JM},register:{enumerable:xn,value:(...r)=>{Ht.add(...r),XM()}},unregister:{enumerable:xn,value:(...r)=>{Ht.remove(...r),XM()}}});function KM(r,n,t){const{startAngle:o,pixelMargin:e,x:i,y:a,outerRadius:s,innerRadius:l}=n;let u=e/s;r.beginPath(),r.arc(i,a,s,o-u,t+u),l>e?(u=e/l,r.arc(i,a,l,t+u,o-u,!0)):r.arc(i,a,e,t+Xe,o-Xe),r.closePath(),r.clip()}function Bv(r){return fl(r,["outerStart","outerEnd","innerStart","innerEnd"])}function Pv(r,n,t,o){const e=Bv(r.options.borderRadius),i=(t-n)/2,a=Math.min(i,o*n/2),s=l=>{const u=(t-Math.min(i,l))*o/2;return lt(l,0,Math.min(i,u))};return{outerStart:s(e.outerStart),outerEnd:s(e.outerEnd),innerStart:lt(e.innerStart,0,a),innerEnd:lt(e.innerEnd,0,a)}}function nr(r,n,t,o){return{x:t+r*Math.cos(n),y:o+r*Math.sin(n)}}function Cl(r,n,t,o,e,i){const{x:a,y:s,startAngle:l,pixelMargin:u,innerRadius:d}=n,M=Math.max(n.outerRadius+o+t-u,0),f=d>0?d+o+t+u:0;let p=0;const y=e-l;if(o){const w=d>0?d-o:0,C=M>0?M-o:0,E=(w+C)/2,S=E!==0?y*E/(E+o):y;p=(y-S)/2}const I=Math.max(.001,y*M-t/Je)/M,v=(y-I)/2,h=l+v+p,N=e-v-p,{outerStart:D,outerEnd:m,innerStart:j,innerEnd:T}=Pv(n,f,M,N-h),L=M-D,k=M-m,z=h+D/L,O=N-m/k,b=f+j,g=f+T,x=h+j/b,A=N-T/g;if(r.beginPath(),i){if(r.arc(a,s,M,z,O),m>0){const E=nr(k,O,a,s);r.arc(E.x,E.y,m,O,N+Xe)}const w=nr(g,N,a,s);if(r.lineTo(w.x,w.y),T>0){const E=nr(g,A,a,s);r.arc(E.x,E.y,T,N+Xe,A+Math.PI)}if(r.arc(a,s,f,N-T/f,h+j/f,!0),j>0){const E=nr(b,x,a,s);r.arc(E.x,E.y,j,x+Math.PI,h-Xe)}const C=nr(L,h,a,s);if(r.lineTo(C.x,C.y),D>0){const E=nr(L,z,a,s);r.arc(E.x,E.y,D,h-Xe,z)}}else{r.moveTo(a,s);const w=Math.cos(z)*M+a,C=Math.sin(z)*M+s;r.lineTo(w,C);const E=Math.cos(O)*M+a,S=Math.sin(O)*M+s;r.lineTo(E,S)}r.closePath()}function Rv(r,n,t,o,e){const{fullCircles:i,startAngle:a,circumference:s}=n;let l=n.endAngle;if(i){Cl(r,n,t,o,a+Be,e);for(let u=0;u<i;++u)r.fill();isNaN(s)||(l=a+s%Be,s%Be===0&&(l+=Be))}return Cl(r,n,t,o,l,e),r.fill(),l}function Vv(r,n,t){const{x:o,y:e,startAngle:i,pixelMargin:a,fullCircles:s}=n,l=Math.max(n.outerRadius-a,0),u=n.innerRadius+a;let d;for(t&&KM(r,n,i+Be),r.beginPath(),r.arc(o,e,u,i+Be,i,!0),d=0;d<s;++d)r.stroke();for(r.beginPath(),r.arc(o,e,l,i,i+Be),d=0;d<s;++d)r.stroke()}function Zv(r,n,t,o,e,i){const{options:a}=n,{borderWidth:s,borderJoinStyle:l}=a,u=a.borderAlign==="inner";!s||(u?(r.lineWidth=s*2,r.lineJoin=l||"round"):(r.lineWidth=s,r.lineJoin=l||"bevel"),n.fullCircles&&Vv(r,n,u),u&&KM(r,n,e),Cl(r,n,t,o,e,i),r.stroke())}class El extends an{constructor(n){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,t,o){const e=this.getProps(["x","y"],o),{angle:i,distance:a}=bd(e,{x:n,y:t}),{startAngle:s,endAngle:l,innerRadius:u,outerRadius:d,circumference:M}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],o),f=this.options.spacing/2,y=we(M,l-s)>=Be||pr(i,s,l),I=mi(a,u+f,d+f);return y&&I}getCenterPoint(n){const{x:t,y:o,startAngle:e,endAngle:i,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],n),{offset:l,spacing:u}=this.options,d=(e+i)/2,M=(a+s+u+l)/2;return{x:t+Math.cos(d)*M,y:o+Math.sin(d)*M}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:t,circumference:o}=this,e=(t.offset||0)/2,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=o>Be?Math.floor(o/Be):0,o===0||this.innerRadius<0||this.outerRadius<0)return;n.save();let s=0;if(e){s=e/2;const u=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(u)*s,Math.sin(u)*s),this.circumference>=Je&&(s=e)}n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor;const l=Rv(n,this,s,i,a);Zv(n,this,s,i,l,a),n.restore()}}El.id="arc",El.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},El.defaultRoutes={backgroundColor:"backgroundColor"};function qM(r,n,t=n){r.lineCap=we(t.borderCapStyle,n.borderCapStyle),r.setLineDash(we(t.borderDash,n.borderDash)),r.lineDashOffset=we(t.borderDashOffset,n.borderDashOffset),r.lineJoin=we(t.borderJoinStyle,n.borderJoinStyle),r.lineWidth=we(t.borderWidth,n.borderWidth),r.strokeStyle=we(t.borderColor,n.borderColor)}function Wv(r,n,t){r.lineTo(t.x,t.y)}function Gv(r){return r.stepped?c4:r.tension||r.cubicInterpolationMode==="monotone"?d4:Wv}function ef(r,n,t={}){const o=r.length,{start:e=0,end:i=o-1}=t,{start:a,end:s}=n,l=Math.max(e,a),u=Math.min(i,s),d=e<a&&i<a||e>s&&i>s;return{count:o,start:l,loop:n.loop,ilen:u<l&&!d?o+u-l:u-l}}function Hv(r,n,t,o){const{points:e,options:i}=n,{count:a,start:s,loop:l,ilen:u}=ef(e,t,o),d=Gv(i);let{move:M=!0,reverse:f}=o||{},p,y,I;for(p=0;p<=u;++p)y=e[(s+(f?u-p:p))%a],!y.skip&&(M?(r.moveTo(y.x,y.y),M=!1):d(r,I,y,f,i.stepped),I=y);return l&&(y=e[(s+(f?u:0))%a],d(r,I,y,f,i.stepped)),!!l}function Fv(r,n,t,o){const e=n.points,{count:i,start:a,ilen:s}=ef(e,t,o),{move:l=!0,reverse:u}=o||{};let d=0,M=0,f,p,y,I,v,h;const N=m=>(a+(u?s-m:m))%i,D=()=>{I!==v&&(r.lineTo(d,v),r.lineTo(d,I),r.lineTo(d,h))};for(l&&(p=e[N(0)],r.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=e[N(f)],p.skip)continue;const m=p.x,j=p.y,T=m|0;T===y?(j<I?I=j:j>v&&(v=j),d=(M*d+m)/++M):(D(),r.lineTo(m,j),y=T,M=0,I=v=j),h=j}D()}function _l(r){const n=r.options,t=n.borderDash&&n.borderDash.length;return!r._decimated&&!r._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!t?Fv:Hv}function $v(r){return r.stepped?R4:r.tension||r.cubicInterpolationMode==="monotone"?V4:Bn}function Jv(r,n,t,o){let e=n._path;e||(e=n._path=new Path2D,n.path(e,t,o)&&e.closePath()),qM(r,n.options),r.stroke(e)}function Xv(r,n,t,o){const{segments:e,options:i}=n,a=_l(n);for(const s of e)qM(r,i,s.style),r.beginPath(),a(r,n,s,{start:t,end:t+o-1})&&r.closePath(),r.stroke()}const Kv=typeof Path2D=="function";function qv(r,n,t,o){Kv&&!n.options.segment?Jv(r,n,t,o):Xv(r,n,t,o)}class Zi extends an{constructor(n){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,n&&Object.assign(this,n)}updateControlPoints(n,t){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const e=o.spanGaps?this._loop:this._fullLoop;C4(this._points,o,n,e,t),this._pointsUpdated=!0}}set points(n){this._points=n,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=ex(this,this.options.segment))}first(){const n=this.segments,t=this.points;return n.length&&t[n[0].start]}last(){const n=this.segments,t=this.points,o=n.length;return o&&t[n[o-1].end]}interpolate(n,t){const o=this.options,e=n[t],i=this.points,a=X4(this,{property:t,start:e,end:e});if(!a.length)return;const s=[],l=$v(o);let u,d;for(u=0,d=a.length;u<d;++u){const{start:M,end:f}=a[u],p=i[M],y=i[f];if(p===y){s.push(p);continue}const I=Math.abs((e-p[t])/(y[t]-p[t])),v=l(p,y,I,o.stepped);v[t]=n[t],s.push(v)}return s.length===1?s[0]:s}pathSegment(n,t,o){return _l(this)(n,this,t,o)}path(n,t,o){const e=this.segments,i=_l(this);let a=this._loop;t=t||0,o=o||this.points.length-t;for(const s of e)a&=i(n,this,s,{start:t,end:t+o-1});return!!a}draw(n,t,o,e){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(n.save(),qv(n,this,o,e),n.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Zi.id="line",Zi.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Zi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Zi.descriptors={_scriptable:!0,_indexable:r=>r!=="borderDash"&&r!=="fill"};function tf(r,n,t,o){const e=r.options,{[t]:i}=r.getProps([t],o);return Math.abs(n-i)<e.radius+e.hitRadius}class Ql extends an{constructor(n){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,t,o){const e=this.options,{x:i,y:a}=this.getProps(["x","y"],o);return Math.pow(n-i,2)+Math.pow(t-a,2)<Math.pow(e.hitRadius+e.radius,2)}inXRange(n,t){return tf(this,n,"x",t)}inYRange(n,t){return tf(this,n,"y",t)}getCenterPoint(n){const{x:t,y:o}=this.getProps(["x","y"],n);return{x:t,y:o}}size(n){n=n||this.options||{};let t=n.radius||0;t=Math.max(t,t&&n.hoverRadius||0);const o=t&&n.borderWidth||0;return(t+o)*2}draw(n,t){const o=this.options;this.skip||o.radius<.1||!mr(this,t,this.size(o)/2)||(n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.fillStyle=o.backgroundColor,Ml(n,o,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Ql.id="point",Ql.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Ql.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function nf(r,n){const{x:t,y:o,base:e,width:i,height:a}=r.getProps(["x","y","base","width","height"],n);let s,l,u,d,M;return r.horizontal?(M=a/2,s=Math.min(t,e),l=Math.max(t,e),u=o-M,d=o+M):(M=i/2,s=t-M,l=t+M,u=Math.min(o,e),d=Math.max(o,e)),{left:s,top:u,right:l,bottom:d}}function vn(r,n,t,o){return r?0:lt(n,t,o)}function eb(r,n,t){const o=r.options.borderWidth,e=r.borderSkipped,i=$d(o);return{t:vn(e.top,i.top,0,t),r:vn(e.right,i.right,0,n),b:vn(e.bottom,i.bottom,0,t),l:vn(e.left,i.left,0,n)}}function tb(r,n,t){const{enableBorderRadius:o}=r.getProps(["enableBorderRadius"]),e=r.options.borderRadius,i=qn(e),a=Math.min(n,t),s=r.borderSkipped,l=o||ke(e);return{topLeft:vn(!l||s.top||s.left,i.topLeft,0,a),topRight:vn(!l||s.top||s.right,i.topRight,0,a),bottomLeft:vn(!l||s.bottom||s.left,i.bottomLeft,0,a),bottomRight:vn(!l||s.bottom||s.right,i.bottomRight,0,a)}}function nb(r){const n=nf(r),t=n.right-n.left,o=n.bottom-n.top,e=eb(r,t/2,o/2),i=tb(r,t/2,o/2);return{outer:{x:n.left,y:n.top,w:t,h:o,radius:i},inner:{x:n.left+e.l,y:n.top+e.t,w:t-e.l-e.r,h:o-e.t-e.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(e.t,e.l)),topRight:Math.max(0,i.topRight-Math.max(e.t,e.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(e.b,e.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(e.b,e.r))}}}}function Ul(r,n,t,o){const e=n===null,i=t===null,s=r&&!(e&&i)&&nf(r,o);return s&&(e||mi(n,s.left,s.right))&&(i||mi(t,s.top,s.bottom))}function rb(r){return r.topLeft||r.topRight||r.bottomLeft||r.bottomRight}function ob(r,n){r.rect(n.x,n.y,n.w,n.h)}function Yl(r,n,t={}){const o=r.x!==t.x?-n:0,e=r.y!==t.y?-n:0,i=(r.x+r.w!==t.x+t.w?n:0)-o,a=(r.y+r.h!==t.y+t.h?n:0)-e;return{x:r.x+o,y:r.y+e,w:r.w+i,h:r.h+a,radius:r.radius}}class Wi extends an{constructor(n){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,n&&Object.assign(this,n)}draw(n){const{inflateAmount:t,options:{borderColor:o,backgroundColor:e}}=this,{inner:i,outer:a}=nb(this),s=rb(a.radius)?wi:ob;n.save(),(a.w!==i.w||a.h!==i.h)&&(n.beginPath(),s(n,Yl(a,t,i)),n.clip(),s(n,Yl(i,-t,a)),n.fillStyle=o,n.fill("evenodd")),n.beginPath(),s(n,Yl(i,t)),n.fillStyle=e,n.fill(),n.restore()}inRange(n,t,o){return Ul(this,n,t,o)}inXRange(n,t){return Ul(this,n,null,t)}inYRange(n,t){return Ul(this,null,n,t)}getCenterPoint(n){const{x:t,y:o,base:e,horizontal:i}=this.getProps(["x","y","base","horizontal"],n);return{x:i?(t+e)/2:t,y:i?o:(o+e)/2}}getRange(n){return n==="x"?this.width/2:this.height/2}}Wi.id="bar",Wi.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Wi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const Or={average(r){if(!r.length)return!1;let n,t,o=0,e=0,i=0;for(n=0,t=r.length;n<t;++n){const a=r[n].element;if(a&&a.hasValue()){const s=a.tooltipPosition();o+=s.x,e+=s.y,++i}}return{x:o/i,y:e/i}},nearest(r,n){if(!r.length)return!1;let t=n.x,o=n.y,e=Number.POSITIVE_INFINITY,i,a,s;for(i=0,a=r.length;i<a;++i){const l=r[i].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),d=nl(n,u);d<e&&(e=d,s=l)}}if(s){const l=s.tooltipPosition();t=l.x,o=l.y}return{x:t,y:o}}};function Ft(r,n){return n&&(Ze(n)?Array.prototype.push.apply(r,n):r.push(n)),r}function sn(r){return(typeof r=="string"||r instanceof String)&&r.indexOf(`
18
18
  `)>-1?r.split(`
19
- `):r}function ib(r,n){const{element:t,datasetIndex:o,index:e}=n,i=r.getDatasetMeta(o).controller,{label:a,value:s}=i.getLabelAndValue(e);return{chart:r,label:a,parsed:i.getParsed(e),raw:r.data.datasets[o].data[e],formattedValue:s,dataset:i.getDataset(),dataIndex:e,datasetIndex:o,element:t}}function rf(r,n){const t=r.chart.ctx,{body:o,footer:e,title:i}=r,{boxWidth:a,boxHeight:s}=n,l=yt(n.bodyFont),u=yt(n.titleFont),d=yt(n.footerFont),M=i.length,f=e.length,p=o.length,y=bt(n.padding);let I=y.height,v=0,h=o.reduce((m,j)=>m+j.before.length+j.lines.length+j.after.length,0);if(h+=r.beforeBody.length+r.afterBody.length,M&&(I+=M*u.lineHeight+(M-1)*n.titleSpacing+n.titleMarginBottom),h){const m=n.displayColors?Math.max(s,l.lineHeight):l.lineHeight;I+=p*m+(h-p)*l.lineHeight+(h-1)*n.bodySpacing}f&&(I+=n.footerMarginTop+f*d.lineHeight+(f-1)*n.footerSpacing);let N=0;const D=function(m){v=Math.max(v,t.measureText(m).width+N)};return t.save(),t.font=u.string,_e(r.title,D),t.font=l.string,_e(r.beforeBody.concat(r.afterBody),D),N=n.displayColors?a+2+n.boxPadding:0,_e(o,m=>{_e(m.before,D),_e(m.lines,D),_e(m.after,D)}),N=0,t.font=d.string,_e(r.footer,D),t.restore(),v+=y.width,{width:v,height:I}}function ab(r,n){const{y:t,height:o}=n;return t<o/2?"top":t>r.height-o/2?"bottom":"center"}function sb(r,n,t,o){const{x:e,width:i}=o,a=t.caretSize+t.caretPadding;if(r==="left"&&e+i+a>n.width||r==="right"&&e-i-a<0)return!0}function lb(r,n,t,o){const{x:e,width:i}=t,{width:a,chartArea:{left:s,right:l}}=r;let u="center";return o==="center"?u=e<=(s+l)/2?"left":"right":e<=i/2?u="left":e>=a-i/2&&(u="right"),sb(u,r,n,t)&&(u="center"),u}function of(r,n,t){const o=t.yAlign||n.yAlign||ab(r,t);return{xAlign:t.xAlign||n.xAlign||lb(r,n,t,o),yAlign:o}}function ub(r,n){let{x:t,width:o}=r;return n==="right"?t-=o:n==="center"&&(t-=o/2),t}function cb(r,n,t){let{y:o,height:e}=r;return n==="top"?o+=t:n==="bottom"?o-=e+t:o-=e/2,o}function af(r,n,t,o){const{caretSize:e,caretPadding:i,cornerRadius:a}=r,{xAlign:s,yAlign:l}=t,u=e+i,{topLeft:d,topRight:M,bottomLeft:f,bottomRight:p}=qn(a);let y=ub(n,s);const I=cb(n,l,u);return l==="center"?s==="left"?y+=u:s==="right"&&(y-=u):s==="left"?y-=Math.max(d,f)+e:s==="right"&&(y+=Math.max(M,p)+e),{x:lt(y,0,o.width-n.width),y:lt(I,0,o.height-n.height)}}function Gi(r,n,t){const o=bt(t.padding);return n==="center"?r.x+r.width/2:n==="right"?r.x+r.width-o.right:r.x+o.left}function sf(r){return Ft([],sn(r))}function db(r,n,t){return Dn(r,{tooltip:n,tooltipItems:t,type:"tooltip"})}function lf(r,n){const t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?r.override(t):r}class Bl extends an{constructor(n){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=n.chart||n._chart,this._chart=this.chart,this.options=n.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(n){this.options=n,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const n=this._cachedAnimations;if(n)return n;const t=this.chart,o=this.options.setContext(this.getContext()),e=o.enabled&&t.options.animation&&o.animations,i=new fM(this.chart,e);return e._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=db(this.chart.getContext(),this,this._tooltipItems))}getTitle(n,t){const{callbacks:o}=t,e=o.beforeTitle.apply(this,[n]),i=o.title.apply(this,[n]),a=o.afterTitle.apply(this,[n]);let s=[];return s=Ft(s,sn(e)),s=Ft(s,sn(i)),s=Ft(s,sn(a)),s}getBeforeBody(n,t){return sf(t.callbacks.beforeBody.apply(this,[n]))}getBody(n,t){const{callbacks:o}=t,e=[];return _e(n,i=>{const a={before:[],lines:[],after:[]},s=lf(o,i);Ft(a.before,sn(s.beforeLabel.call(this,i))),Ft(a.lines,s.label.call(this,i)),Ft(a.after,sn(s.afterLabel.call(this,i))),e.push(a)}),e}getAfterBody(n,t){return sf(t.callbacks.afterBody.apply(this,[n]))}getFooter(n,t){const{callbacks:o}=t,e=o.beforeFooter.apply(this,[n]),i=o.footer.apply(this,[n]),a=o.afterFooter.apply(this,[n]);let s=[];return s=Ft(s,sn(e)),s=Ft(s,sn(i)),s=Ft(s,sn(a)),s}_createItems(n){const t=this._active,o=this.chart.data,e=[],i=[],a=[];let s=[],l,u;for(l=0,u=t.length;l<u;++l)s.push(ib(this.chart,t[l]));return n.filter&&(s=s.filter((d,M,f)=>n.filter(d,M,f,o))),n.itemSort&&(s=s.sort((d,M)=>n.itemSort(d,M,o))),_e(s,d=>{const M=lf(n.callbacks,d);e.push(M.labelColor.call(this,d)),i.push(M.labelPointStyle.call(this,d)),a.push(M.labelTextColor.call(this,d))}),this.labelColors=e,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=s,s}update(n,t){const o=this.options.setContext(this.getContext()),e=this._active;let i,a=[];if(!e.length)this.opacity!==0&&(i={opacity:0});else{const s=Or[o.position].call(this,e,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const l=this._size=rf(this,o),u=Object.assign({},s,l),d=of(this.chart,o,u),M=af(o,u,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,i={opacity:1,x:M.x,y:M.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),n&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(n,t,o,e){const i=this.getCaretPosition(n,o,e);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(n,t,o){const{xAlign:e,yAlign:i}=this,{caretSize:a,cornerRadius:s}=o,{topLeft:l,topRight:u,bottomLeft:d,bottomRight:M}=qn(s),{x:f,y:p}=n,{width:y,height:I}=t;let v,h,N,D,m,j;return i==="center"?(m=p+I/2,e==="left"?(v=f,h=v-a,D=m+a,j=m-a):(v=f+y,h=v+a,D=m-a,j=m+a),N=v):(e==="left"?h=f+Math.max(l,d)+a:e==="right"?h=f+y-Math.max(u,M)-a:h=this.caretX,i==="top"?(D=p,m=D-a,v=h-a,N=h+a):(D=p+I,m=D+a,v=h+a,N=h-a),j=D),{x1:v,x2:h,x3:N,y1:D,y2:m,y3:j}}drawTitle(n,t,o){const e=this.title,i=e.length;let a,s,l;if(i){const u=jl(o.rtl,this.x,this.width);for(n.x=Gi(this,o.titleAlign,o),t.textAlign=u.textAlign(o.titleAlign),t.textBaseline="middle",a=yt(o.titleFont),s=o.titleSpacing,t.fillStyle=o.titleColor,t.font=a.string,l=0;l<i;++l)t.fillText(e[l],u.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+s,l+1===i&&(n.y+=o.titleMarginBottom-s)}}_drawColorBox(n,t,o,e,i){const a=this.labelColors[o],s=this.labelPointStyles[o],{boxHeight:l,boxWidth:u,boxPadding:d}=i,M=yt(i.bodyFont),f=Gi(this,"left",i),p=e.x(f),y=l<M.lineHeight?(M.lineHeight-l)/2:0,I=t.y+y;if(i.usePointStyle){const v={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},h=e.leftForLtr(p,u)+u/2,N=I+l/2;n.strokeStyle=i.multiKeyBackground,n.fillStyle=i.multiKeyBackground,Ml(n,v,h,N),n.strokeStyle=a.borderColor,n.fillStyle=a.backgroundColor,Ml(n,v,h,N)}else{n.lineWidth=ke(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,n.strokeStyle=a.borderColor,n.setLineDash(a.borderDash||[]),n.lineDashOffset=a.borderDashOffset||0;const v=e.leftForLtr(p,u-d),h=e.leftForLtr(e.xPlus(p,1),u-d-2),N=qn(a.borderRadius);Object.values(N).some(D=>D!==0)?(n.beginPath(),n.fillStyle=i.multiKeyBackground,wi(n,{x:v,y:I,w:u,h:l,radius:N}),n.fill(),n.stroke(),n.fillStyle=a.backgroundColor,n.beginPath(),wi(n,{x:h,y:I+1,w:u-2,h:l-2,radius:N}),n.fill()):(n.fillStyle=i.multiKeyBackground,n.fillRect(v,I,u,l),n.strokeRect(v,I,u,l),n.fillStyle=a.backgroundColor,n.fillRect(h,I+1,u-2,l-2))}n.fillStyle=this.labelTextColors[o]}drawBody(n,t,o){const{body:e}=this,{bodySpacing:i,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:d}=o,M=yt(o.bodyFont);let f=M.lineHeight,p=0;const y=jl(o.rtl,this.x,this.width),I=function(k){t.fillText(k,y.x(n.x+p),n.y+f/2),n.y+=f+i},v=y.textAlign(a);let h,N,D,m,j,T,L;for(t.textAlign=a,t.textBaseline="middle",t.font=M.string,n.x=Gi(this,v,o),t.fillStyle=o.bodyColor,_e(this.beforeBody,I),p=s&&v!=="right"?a==="center"?u/2+d:u+2+d:0,m=0,T=e.length;m<T;++m){for(h=e[m],N=this.labelTextColors[m],t.fillStyle=N,_e(h.before,I),D=h.lines,s&&D.length&&(this._drawColorBox(t,n,m,y,o),f=Math.max(M.lineHeight,l)),j=0,L=D.length;j<L;++j)I(D[j]),f=M.lineHeight;_e(h.after,I)}p=0,f=M.lineHeight,_e(this.afterBody,I),n.y-=i}drawFooter(n,t,o){const e=this.footer,i=e.length;let a,s;if(i){const l=jl(o.rtl,this.x,this.width);for(n.x=Gi(this,o.footerAlign,o),n.y+=o.footerMarginTop,t.textAlign=l.textAlign(o.footerAlign),t.textBaseline="middle",a=yt(o.footerFont),t.fillStyle=o.footerColor,t.font=a.string,s=0;s<i;++s)t.fillText(e[s],l.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+o.footerSpacing}}drawBackground(n,t,o,e){const{xAlign:i,yAlign:a}=this,{x:s,y:l}=n,{width:u,height:d}=o,{topLeft:M,topRight:f,bottomLeft:p,bottomRight:y}=qn(e.cornerRadius);t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.beginPath(),t.moveTo(s+M,l),a==="top"&&this.drawCaret(n,t,o,e),t.lineTo(s+u-f,l),t.quadraticCurveTo(s+u,l,s+u,l+f),a==="center"&&i==="right"&&this.drawCaret(n,t,o,e),t.lineTo(s+u,l+d-y),t.quadraticCurveTo(s+u,l+d,s+u-y,l+d),a==="bottom"&&this.drawCaret(n,t,o,e),t.lineTo(s+p,l+d),t.quadraticCurveTo(s,l+d,s,l+d-p),a==="center"&&i==="left"&&this.drawCaret(n,t,o,e),t.lineTo(s,l+M),t.quadraticCurveTo(s,l,s+M,l),t.closePath(),t.fill(),e.borderWidth>0&&t.stroke()}_updateAnimationTarget(n){const t=this.chart,o=this.$animations,e=o&&o.x,i=o&&o.y;if(e||i){const a=Or[n.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=rf(this,n),l=Object.assign({},a,this._size),u=of(t,n,l),d=af(n,l,u,t);(e._to!==d.x||i._to!==d.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(n){const t=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(t);const e={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=bt(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(n.save(),n.globalAlpha=o,this.drawBackground(i,n,e,t),H4(n,t.textDirection),i.y+=a.top,this.drawTitle(i,n,t),this.drawBody(i,n,t),this.drawFooter(i,n,t),F4(n,t.textDirection),n.restore())}getActiveElements(){return this._active||[]}setActiveElements(n,t){const o=this._active,e=n.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),i=!Ni(o,e),a=this._positionChanged(e,t);(i||a)&&(this._active=e,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(n,t,o=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const e=this.options,i=this._active||[],a=this._getActiveElements(n,i,t,o),s=this._positionChanged(a,n),l=t||!Ni(a,i)||s;return l&&(this._active=a,(e.enabled||e.external)&&(this._eventPosition={x:n.x,y:n.y},this.update(!0,t))),l}_getActiveElements(n,t,o,e){const i=this.options;if(n.type==="mouseout")return[];if(!e)return t;const a=this.chart.getElementsAtEventForMode(n,i.mode,i,o);return i.reverse&&a.reverse(),a}_positionChanged(n,t){const{caretX:o,caretY:e,options:i}=this,a=Or[i.position].call(this,n,t);return a!==!1&&(o!==a.x||e!==a.y)}}Bl.positioners=Or;var Mb={id:"tooltip",_element:Bl,positioners:Or,afterInit(r,n,t){t&&(r.tooltip=new Bl({chart:r,options:t}))},beforeUpdate(r,n,t){r.tooltip&&r.tooltip.initialize(t)},reset(r,n,t){r.tooltip&&r.tooltip.initialize(t)},afterDraw(r){const n=r.tooltip;if(n&&n._willRender()){const t={tooltip:n};if(r.notifyPlugins("beforeTooltipDraw",t)===!1)return;n.draw(r.ctx),r.notifyPlugins("afterTooltipDraw",t)}},afterEvent(r,n){if(r.tooltip){const t=n.replay;r.tooltip.handleEvent(n.event,t,n.inChartArea)&&(n.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:(r,n)=>n.bodyFont.size,boxWidth:(r,n)=>n.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:nn,title(r){if(r.length>0){const n=r[0],t=n.chart.data.labels,o=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(o>0&&n.dataIndex<o)return t[n.dataIndex]}return""},afterTitle:nn,beforeBody:nn,beforeLabel:nn,label(r){if(this&&this.options&&this.options.mode==="dataset")return r.label+": "+r.formattedValue||r.formattedValue;let n=r.dataset.label||"";n&&(n+=": ");const t=r.formattedValue;return Ce(t)||(n+=t),n},labelColor(r){const t=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(r){const t=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:nn,afterBody:nn,beforeFooter:nn,footer:nn,afterFooter:nn}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:r=>r!=="filter"&&r!=="itemSort"&&r!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const fb=(r,n,t,o)=>(typeof n=="string"?(t=r.push(n)-1,o.unshift({index:t,label:n})):isNaN(n)&&(t=null),t);function gb(r,n,t,o){const e=r.indexOf(n);if(e===-1)return fb(r,n,t,o);const i=r.lastIndexOf(n);return e!==i?t:e}const hb=(r,n)=>r===null?null:lt(Math.round(r),0,n);class Hi extends Pn{constructor(n){super(n),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(n){const t=this._addedLabels;if(t.length){const o=this.getLabels();for(const{index:e,label:i}of t)o[e]===i&&o.splice(e,1);this._addedLabels=[]}super.init(n)}parse(n,t){if(Ce(n))return null;const o=this.getLabels();return t=isFinite(t)&&o[t]===n?t:gb(o,n,we(t,n),this._addedLabels),hb(t,o.length-1)}determineDataLimits(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let{min:o,max:e}=this.getMinMax(!0);this.options.bounds==="ticks"&&(n||(o=0),t||(e=this.getLabels().length-1)),this.min=o,this.max=e}buildTicks(){const n=this.min,t=this.max,o=this.options.offset,e=[];let i=this.getLabels();i=n===0&&t===i.length-1?i:i.slice(n,t+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=n;a<=t;a++)e.push({value:a});return e}getLabelForValue(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(n){return typeof n!="number"&&(n=this.parse(n)),n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getValueForPixel(n){return Math.round(this._startValue+this.getDecimalForPixel(n)*this._valueRange)}getBasePixel(){return this.bottom}}Hi.id="category",Hi.defaults={ticks:{callback:Hi.prototype.getLabelForValue}};function pb(r,n){const t=[],{bounds:e,step:i,min:a,max:s,precision:l,count:u,maxTicks:d,maxDigits:M,includeBounds:f}=r,p=i||1,y=d-1,{min:I,max:v}=n,h=!Ce(a),N=!Ce(s),D=!Ce(u),m=(v-I)/(M+1);let j=Dd((v-I)/y/p)*p,T,L,k,z;if(j<1e-14&&!h&&!N)return[{value:I},{value:v}];z=Math.ceil(v/j)-Math.floor(I/j),z>y&&(j=Dd(z*j/y/p)*p),Ce(l)||(T=Math.pow(10,l),j=Math.ceil(j*T)/T),e==="ticks"?(L=Math.floor(I/j)*j,k=Math.ceil(v/j)*j):(L=I,k=v),h&&N&&i&&L1((s-a)/i,j/1e3)?(z=Math.round(Math.min((s-a)/j,d)),j=(s-a)/z,L=a,k=s):D?(L=h?a:L,k=N?s:k,z=u-1,j=(k-L)/z):(z=(k-L)/j,hr(z,Math.round(z),j/1e3)?z=Math.round(z):z=Math.ceil(z));const O=Math.max(vd(j),vd(L));T=Math.pow(10,Ce(l)?O:l),L=Math.round(L*T)/T,k=Math.round(k*T)/T;let b=0;for(h&&(f&&L!==a?(t.push({value:a}),L<a&&b++,hr(Math.round((L+b*j)*T)/T,a,uf(a,m,r))&&b++):L<a&&b++);b<z;++b)t.push({value:Math.round((L+b*j)*T)/T});return N&&f&&k!==s?t.length&&hr(t[t.length-1].value,s,uf(s,m,r))?t[t.length-1].value=s:t.push({value:s}):(!N||k===s)&&t.push({value:k}),t}function uf(r,n,{horizontal:t,minRotation:o}){const e=Ct(o),i=(t?Math.sin(e):Math.cos(e))||.001,a=.75*n*(""+r).length;return Math.min(n/i,a)}class Fi extends Pn{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return Ce(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){const{beginAtZero:n}=this.options,{minDefined:t,maxDefined:o}=this.getUserBounds();let{min:e,max:i}=this;const a=l=>e=t?e:l,s=l=>i=o?i:l;if(n){const l=Gt(e),u=Gt(i);l<0&&u<0?s(0):l>0&&u>0&&a(0)}if(e===i){let l=1;(i>=Number.MAX_SAFE_INTEGER||e<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(i*.05)),s(i+l),n||a(e-l)}this.min=e,this.max=i}getTickLimit(){const n=this.options.ticks;let{maxTicksLimit:t,stepSize:o}=n,e;return o?(e=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),t=t||11),t&&(e=Math.min(t,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const n=this.options,t=n.ticks;let o=this.getTickLimit();o=Math.max(2,o);const e={maxTicks:o,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},i=this._range||this,a=pb(e,i);return n.bounds==="ticks"&&xd(a,this,"value"),n.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const n=this.ticks;let t=this.min,o=this.max;if(super.configure(),this.options.offset&&n.length){const e=(o-t)/Math.max(n.length-1,1)/2;t-=e,o+=e}this._startValue=t,this._endValue=o,this._valueRange=o-t}getLabelForValue(n){return Dr(n,this.chart.options.locale,this.options.ticks.format)}}class Pl extends Fi{determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=ot(n)?n:0,this.max=ot(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const n=this.isHorizontal(),t=n?this.width:this.height,o=Ct(this.options.ticks.minRotation),e=(n?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/e))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}}Pl.id="linear",Pl.defaults={ticks:{callback:Ei.formatters.numeric}};function cf(r){return r/Math.pow(10,Math.floor(xt(r)))===1}function yb(r,n){const t=Math.floor(xt(n.max)),o=Math.ceil(n.max/Math.pow(10,t)),e=[];let i=mt(r.min,Math.pow(10,Math.floor(xt(n.min)))),a=Math.floor(xt(i)),s=Math.floor(i/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do e.push({value:i,major:cf(i)}),++s,s===10&&(s=1,++a,l=a>=0?1:l),i=Math.round(s*Math.pow(10,a)*l)/l;while(a<t||a===t&&s<o);const u=mt(r.max,i);return e.push({value:u,major:cf(i)}),e}class df extends Pn{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){const o=Fi.prototype.parse.apply(this,[n,t]);if(o===0){this._zero=!0;return}return ot(o)&&o>0?o:null}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=ot(n)?Math.max(0,n):null,this.max=ot(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let o=this.min,e=this.max;const i=l=>o=n?o:l,a=l=>e=t?e:l,s=(l,u)=>Math.pow(10,Math.floor(xt(l))+u);o===e&&(o<=0?(i(1),a(10)):(i(s(o,-1)),a(s(e,1)))),o<=0&&i(s(e,-1)),e<=0&&a(s(o,1)),this._zero&&this.min!==this._suggestedMin&&o===s(this.min,0)&&i(s(o,-1)),this.min=o,this.max=e}buildTicks(){const n=this.options,t={min:this._userMin,max:this._userMax},o=yb(t,this);return n.bounds==="ticks"&&xd(o,this,"value"),n.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(n){return n===void 0?"0":Dr(n,this.chart.options.locale,this.options.ticks.format)}configure(){const n=this.min;super.configure(),this._startValue=xt(n),this._valueRange=xt(this.max)-xt(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(xt(n)-this._startValue)/this._valueRange)}getValueForPixel(n){const t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}}df.id="logarithmic",df.defaults={ticks:{callback:Ei.formatters.logarithmic,major:{enabled:!0}}};function Rl(r){const n=r.ticks;if(n.display&&r.display){const t=bt(n.backdropPadding);return we(n.font&&n.font.size,Ae.font.size)+t.height}return 0}function Nb(r,n,t){return t=Ze(t)?t:[t],{w:l4(r,n.string,t),h:t.length*n.lineHeight}}function Mf(r,n,t,o,e){return r===o||r===e?{start:n-t/2,end:n+t/2}:r<o||r>e?{start:n-t,end:n}:{start:n,end:n+t}}function jb(r){const n={l:r.left+r._padding.left,r:r.right-r._padding.right,t:r.top+r._padding.top,b:r.bottom-r._padding.bottom},t=Object.assign({},n),o=[],e=[],i=r._pointLabels.length,a=r.options.pointLabels,s=a.centerPointLabels?Je/i:0;for(let l=0;l<i;l++){const u=a.setContext(r.getPointLabelContext(l));e[l]=u.padding;const d=r.getPointPosition(l,r.drawingArea+e[l],s),M=yt(u.font),f=Nb(r.ctx,M,r._pointLabels[l]);o[l]=f;const p=Et(r.getIndexAngle(l)+s),y=Math.round(tl(p)),I=Mf(y,d.x,f.w,0,180),v=Mf(y,d.y,f.h,90,270);Ib(t,n,p,I,v)}r.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),r._pointLabelItems=mb(r,o,e)}function Ib(r,n,t,o,e){const i=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t));let s=0,l=0;o.start<n.l?(s=(n.l-o.start)/i,r.l=Math.min(r.l,n.l-s)):o.end>n.r&&(s=(o.end-n.r)/i,r.r=Math.max(r.r,n.r+s)),e.start<n.t?(l=(n.t-e.start)/a,r.t=Math.min(r.t,n.t-l)):e.end>n.b&&(l=(e.end-n.b)/a,r.b=Math.max(r.b,n.b+l))}function mb(r,n,t){const o=[],e=r._pointLabels.length,i=r.options,a=Rl(i)/2,s=r.drawingArea,l=i.pointLabels.centerPointLabels?Je/e:0;for(let u=0;u<e;u++){const d=r.getPointPosition(u,s+a+t[u],l),M=Math.round(tl(Et(d.angle+Xe))),f=n[u],p=vb(d.y,f.h,M),y=Db(M),I=xb(d.x,f.w,y);o.push({x:d.x,y:p,textAlign:y,left:I,top:p,right:I+f.w,bottom:p+f.h})}return o}function Db(r){return r===0||r===180?"center":r<180?"left":"right"}function xb(r,n,t){return t==="right"?r-=n:t==="center"&&(r-=n/2),r}function vb(r,n,t){return t===90||t===270?r-=n/2:(t>270||t<90)&&(r-=n),r}function bb(r,n){const{ctx:t,options:{pointLabels:o}}=r;for(let e=n-1;e>=0;e--){const i=o.setContext(r.getPointLabelContext(e)),a=yt(i.font),{x:s,y:l,textAlign:u,left:d,top:M,right:f,bottom:p}=r._pointLabelItems[e],{backdropColor:y}=i;if(!Ce(y)){const I=qn(i.borderRadius),v=bt(i.backdropPadding);t.fillStyle=y;const h=d-v.left,N=M-v.top,D=f-d+v.width,m=p-M+v.height;Object.values(I).some(j=>j!==0)?(t.beginPath(),wi(t,{x:h,y:N,w:D,h:m,radius:I}),t.fill()):t.fillRect(h,N,D,m)}ki(t,r._pointLabels[e],s,l+a.lineHeight/2,a,{color:i.color,textAlign:u,textBaseline:"middle"})}}function ff(r,n,t,o){const{ctx:e}=r;if(t)e.arc(r.xCenter,r.yCenter,n,0,Be);else{let i=r.getPointPosition(0,n);e.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=r.getPointPosition(a,n),e.lineTo(i.x,i.y)}}function Tb(r,n,t,o){const e=r.ctx,i=n.circular,{color:a,lineWidth:s}=n;!i&&!o||!a||!s||t<0||(e.save(),e.strokeStyle=a,e.lineWidth=s,e.setLineDash(n.borderDash),e.lineDashOffset=n.borderDashOffset,e.beginPath(),ff(r,t,i,o),e.closePath(),e.stroke(),e.restore())}function Ab(r,n,t){return Dn(r,{label:t,index:n,type:"pointLabel"})}class $i extends Fi{constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const n=this._padding=bt(Rl(this.options)/2),t=this.width=this.maxWidth-n.width,o=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+o/2+n.top),this.drawingArea=Math.floor(Math.min(t,o)/2)}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!1);this.min=ot(n)&&!isNaN(n)?n:0,this.max=ot(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Rl(this.options))}generateTickLabels(n){Fi.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,o)=>{const e=$e(this.options.pointLabels.callback,[t,o],this);return e||e===0?e:""}).filter((t,o)=>this.chart.getDataVisibility(o))}fit(){const n=this.options;n.display&&n.pointLabels.display?jb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,o,e){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((o-e)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,o,e))}getIndexAngle(n){const t=Be/(this._pointLabels.length||1),o=this.options.startAngle||0;return Et(n*t+Ct(o))}getDistanceFromCenterForValue(n){if(Ce(n))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(Ce(n))return NaN;const t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){const t=this._pointLabels||[];if(n>=0&&n<t.length){const o=t[n];return Ab(this.getContext(),n,o)}}getPointPosition(n,t,o=0){const e=this.getIndexAngle(n)-Xe+o;return{x:Math.cos(e)*t+this.xCenter,y:Math.sin(e)*t+this.yCenter,angle:e}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){const{left:t,top:o,right:e,bottom:i}=this._pointLabelItems[n];return{left:t,top:o,right:e,bottom:i}}drawBackground(){const{backgroundColor:n,grid:{circular:t}}=this.options;if(n){const o=this.ctx;o.save(),o.beginPath(),ff(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),o.closePath(),o.fillStyle=n,o.fill(),o.restore()}}drawGrid(){const n=this.ctx,t=this.options,{angleLines:o,grid:e}=t,i=this._pointLabels.length;let a,s,l;if(t.pointLabels.display&&bb(this,i),e.display&&this.ticks.forEach((u,d)=>{if(d!==0){s=this.getDistanceFromCenterForValue(u.value);const M=e.setContext(this.getContext(d-1));Tb(this,M,s,i)}}),o.display){for(n.save(),a=i-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:M}=u;!M||!d||(n.lineWidth=M,n.strokeStyle=d,n.setLineDash(u.borderDash),n.lineDashOffset=u.borderDashOffset,s=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,s),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(l.x,l.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){const n=this.ctx,t=this.options,o=t.ticks;if(!o.display)return;const e=this.getIndexAngle(0);let i,a;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(e),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!t.reverse)return;const u=o.setContext(this.getContext(l)),d=yt(u.font);if(i=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){n.font=d.string,a=n.measureText(s.label).width,n.fillStyle=u.backdropColor;const M=bt(u.backdropPadding);n.fillRect(-a/2-M.left,-i-d.size/2-M.top,a+M.width,d.size+M.height)}ki(n,s.label,0,-i,d,{color:u.color})}),n.restore()}drawTitle(){}}$i.id="radialLinear",$i.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ei.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(r){return r},padding:5,centerPointLabels:!1}},$i.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},$i.descriptors={angleLines:{_fallback:"grid"}};const Ji={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}},pt=Object.keys(Ji);function kb(r,n){return r-n}function gf(r,n){if(Ce(n))return null;const t=r._adapter,{parser:o,round:e,isoWeekday:i}=r._parseOpts;let a=n;return typeof o=="function"&&(a=o(a)),ot(a)||(a=typeof o=="string"?t.parse(a,o):t.parse(a)),a===null?null:(e&&(a=e==="week"&&(Xn(i)||i===!0)?t.startOf(a,"isoWeek",i):t.startOf(a,e)),+a)}function hf(r,n,t,o){const e=pt.length;for(let i=pt.indexOf(r);i<e-1;++i){const a=Ji[pt[i]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-n)/(s*a.size))<=o)return pt[i]}return pt[e-1]}function wb(r,n,t,o,e){for(let i=pt.length-1;i>=pt.indexOf(t);i--){const a=pt[i];if(Ji[a].common&&r._adapter.diff(e,o,a)>=n-1)return a}return pt[t?pt.indexOf(t):0]}function Lb(r){for(let n=pt.indexOf(r)+1,t=pt.length;n<t;++n)if(Ji[pt[n]].common)return pt[n]}function pf(r,n,t){if(!t)r[n]=!0;else if(t.length){const{lo:o,hi:e}=rl(t,n),i=t[o]>=n?t[o]:t[e];r[i]=!0}}function zb(r,n,t,o){const e=r._adapter,i=+e.startOf(n[0].value,o),a=n[n.length-1].value;let s,l;for(s=i;s<=a;s=+e.add(s,1,o))l=t[s],l>=0&&(n[l].major=!0);return n}function yf(r,n,t){const o=[],e={},i=n.length;let a,s;for(a=0;a<i;++a)s=n[a],e[s]=a,o.push({value:s,major:!1});return i===0||!t?o:zb(r,o,e,t)}class Xi extends Pn{constructor(n){super(n),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(n,t){const o=n.time||(n.time={}),e=this._adapter=new $x._date(n.adapters.date);e.init(t),fr(o.displayFormats,e.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(n),this._normalized=t.normalized}parse(n,t){return n===void 0?null:gf(this,n)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const n=this.options,t=this._adapter,o=n.time.unit||"day";let{min:e,max:i,minDefined:a,maxDefined:s}=this.getUserBounds();function l(u){!a&&!isNaN(u.min)&&(e=Math.min(e,u.min)),!s&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!a||!s)&&(l(this._getLabelBounds()),(n.bounds!=="ticks"||n.ticks.source!=="labels")&&l(this.getMinMax(!1))),e=ot(e)&&!isNaN(e)?e:+t.startOf(Date.now(),o),i=ot(i)&&!isNaN(i)?i:+t.endOf(Date.now(),o)+1,this.min=Math.min(e,i-1),this.max=Math.max(e+1,i)}_getLabelBounds(){const n=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return n.length&&(t=n[0],o=n[n.length-1]),{min:t,max:o}}buildTicks(){const n=this.options,t=n.time,o=n.ticks,e=o.source==="labels"?this.getLabelTimestamps():this._generate();n.bounds==="ticks"&&e.length&&(this.min=this._userMin||e[0],this.max=this._userMax||e[e.length-1]);const i=this.min,a=this.max,s=C1(e,i,a);return this._unit=t.unit||(o.autoSkip?hf(t.minUnit,this.min,this.max,this._getLabelCapacity(i)):wb(this,s.length,t.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Lb(this._unit),this.initOffsets(e),n.reverse&&s.reverse(),yf(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(n=>+n.value))}initOffsets(n){let t=0,o=0,e,i;this.options.offset&&n.length&&(e=this.getDecimalForValue(n[0]),n.length===1?t=1-e:t=(this.getDecimalForValue(n[1])-e)/2,i=this.getDecimalForValue(n[n.length-1]),n.length===1?o=i:o=(i-this.getDecimalForValue(n[n.length-2]))/2);const a=n.length<3?.5:.25;t=lt(t,0,a),o=lt(o,0,a),this._offsets={start:t,end:o,factor:1/(t+1+o)}}_generate(){const n=this._adapter,t=this.min,o=this.max,e=this.options,i=e.time,a=i.unit||hf(i.minUnit,t,o,this._getLabelCapacity(t)),s=we(i.stepSize,1),l=a==="week"?i.isoWeekday:!1,u=Xn(l)||l===!0,d={};let M=t,f,p;if(u&&(M=+n.startOf(M,"isoWeek",l)),M=+n.startOf(M,u?"day":a),n.diff(o,t,a)>1e5*s)throw new Error(t+" and "+o+" are too far apart with stepSize of "+s+" "+a);const y=e.ticks.source==="data"&&this.getDataTimestamps();for(f=M,p=0;f<o;f=+n.add(f,s,a),p++)pf(d,f,y);return(f===o||e.bounds==="ticks"||p===1)&&pf(d,f,y),Object.keys(d).sort((I,v)=>I-v).map(I=>+I)}getLabelForValue(n){const t=this._adapter,o=this.options.time;return o.tooltipFormat?t.format(n,o.tooltipFormat):t.format(n,o.displayFormats.datetime)}_tickFormatFunction(n,t,o,e){const i=this.options,a=i.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&a[s],d=l&&a[l],M=o[t],f=l&&d&&M&&M.major,p=this._adapter.format(n,e||(f?d:u)),y=i.ticks.callback;return y?$e(y,[p,t,o],this):p}generateTickLabels(n){let t,o,e;for(t=0,o=n.length;t<o;++t)e=n[t],e.label=this._tickFormatFunction(e.value,t,n)}getDecimalForValue(n){return n===null?NaN:(n-this.min)/(this.max-this.min)}getPixelForValue(n){const t=this._offsets,o=this.getDecimalForValue(n);return this.getPixelForDecimal((t.start+o)*t.factor)}getValueForPixel(n){const t=this._offsets,o=this.getDecimalForPixel(n)/t.factor-t.end;return this.min+o*(this.max-this.min)}_getLabelSize(n){const t=this.options.ticks,o=this.ctx.measureText(n).width,e=Ct(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(e),a=Math.sin(e),s=this._resolveTickFontOptions(0).size;return{w:o*i+s*a,h:o*a+s*i}}_getLabelCapacity(n){const t=this.options.time,o=t.displayFormats,e=o[t.unit]||o.millisecond,i=this._tickFormatFunction(n,0,yf(this,[n],this._majorUnit),e),a=this._getLabelSize(i),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let n=this._cache.data||[],t,o;if(n.length)return n;const e=this.getMatchingVisibleMetas();if(this._normalized&&e.length)return this._cache.data=e[0].controller.getAllParsedValues(this);for(t=0,o=e.length;t<o;++t)n=n.concat(e[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const n=this._cache.labels||[];let t,o;if(n.length)return n;const e=this.getLabels();for(t=0,o=e.length;t<o;++t)n.push(gf(this,e[t]));return this._cache.labels=this._normalized?n:this.normalize(n)}normalize(n){return kd(n.sort(kb))}}Xi.id="time",Xi.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function Ki(r,n,t){let o=0,e=r.length-1,i,a,s,l;t?(n>=r[o].pos&&n<=r[e].pos&&({lo:o,hi:e}=En(r,"pos",n)),{pos:i,time:s}=r[o],{pos:a,time:l}=r[e]):(n>=r[o].time&&n<=r[e].time&&({lo:o,hi:e}=En(r,"time",n)),{time:i,pos:s}=r[o],{time:a,pos:l}=r[e]);const u=a-i;return u?s+(l-s)*(n-i)/u:s}class Nf extends Xi{constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=Ki(t,this.min),this._tableRange=Ki(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){const{min:t,max:o}=this,e=[],i=[];let a,s,l,u,d;for(a=0,s=n.length;a<s;++a)u=n[a],u>=t&&u<=o&&e.push(u);if(e.length<2)return[{time:t,pos:0},{time:o,pos:1}];for(a=0,s=e.length;a<s;++a)d=e[a+1],l=e[a-1],u=e[a],Math.round((d+l)/2)!==u&&i.push({time:u,pos:a/(s-1)});return i}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;const t=this.getDataTimestamps(),o=this.getLabelTimestamps();return t.length&&o.length?n=this.normalize(t.concat(o)):n=t.length?t:o,n=this._cache.all=n,n}getDecimalForValue(n){return(Ki(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){const t=this._offsets,o=this.getDecimalForPixel(n)/t.factor-t.end;return Ki(this._table,o*this._tableRange+this._minPos,!0)}}Nf.id="timeseries",Nf.defaults=Xi.defaults;var rr;(function(r){r.ChartRendered="chart:rendered",r.ChartUpdated="chart:updated",r.ChartDestroyed="chart:destroyed",r.LabelsUpdated="labels:updated"})(rr||(rr={}));function qi(r,n,t,o){r(n,t),o!==void 0&&o.emit(rr.ChartRendered)}function Sb(r,n){r.update(),n!==void 0&&n.emit(rr.ChartUpdated)}function ea(r,n){r.destroy(),n!==void 0&&n.emit(rr.ChartDestroyed)}function Ob(r,n){const t={labels:typeof r.labels=="undefined"?[]:[...r.labels],datasets:[]};return jf(t,{...r},n),t}function jf(r,n,t){const o=[];r.datasets=n.datasets.map(e=>{const i=r.datasets.find(a=>a[t]===e[t]);return!i||!e.data||o.includes(i)?{...e}:(o.push(i),Object.assign(i,e),i)})}function Cb(r,n,t){r.data.labels=n,t!==void 0&&t.emit(rr.LabelsUpdated)}function Eb(r,n){r.options={...n}}function _b(r,n){const t=r.datasets.map(e=>e.label),o=n.datasets.map(e=>e.label);return n.datasets.length===r.datasets.length&&t.every((e,i)=>e===o[i])}const Qb="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",Ub="Update ERROR: chart instance not found",Yb=((r,n,t)=>c.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:r},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(o,e){Sr.register(t);const i=c.shallowRef(null),a=c.ref(null);function s(M,f){if(i.value!==null&&ea(c.toRaw(i.value),e),a.value===null)throw new Error(Qb);{const p=Ob(M,o.datasetIdKey),y=a.value.getContext("2d");y!==null&&(i.value=new Sr(y,{type:n,data:c.isProxy(M)?new Proxy(p,{}):p,options:f,plugins:o.plugins}))}}function l(M,f){const p=c.isProxy(M)?c.toRaw(M):{...M},y=c.isProxy(f)?c.toRaw(f):{...f};if(Object.keys(y).length>0){const I=c.toRaw(i.value);_b(p,y)&&I!==null?(jf(I==null?void 0:I.data,p,o.datasetIdKey),p.labels!==void 0&&Cb(I,p.labels,e),d()):(I!==null&&ea(I,e),qi(s,o.chartData,o.chartOptions,e))}else i.value!==null&&ea(c.toRaw(i.value),e),qi(s,o.chartData,o.chartOptions,e)}function u(M){const f=c.toRaw(i.value);f!==null?(Eb(f,M),d()):qi(s,o.chartData,o.chartOptions,e)}function d(){const M=c.toRaw(i.value);M!==null?Sb(M,e):console.error(Ub)}return c.watch(()=>o.chartData,(M,f)=>l(M,f),{deep:!0}),c.watch(()=>o.chartOptions,M=>u(M),{deep:!0}),c.onMounted(()=>{"datasets"in o.chartData&&o.chartData.datasets.length>0&&qi(s,o.chartData,o.chartOptions,e)}),c.onBeforeUnmount(()=>{i.value!==null&&ea(c.toRaw(i.value),e)}),e.expose({chart:i,updateChart:d}),()=>c.h("div",{style:o.styles,class:o.cssClasses},[c.h("canvas",{id:o.chartId,width:o.width,height:o.height,ref:a})])}}))("bar-chart","bar",Ci);var kw="";const Bb={name:"MultiRangeSlider",props:{baseClassName:{type:String,default:"multi-range-slider"},min:{type:Number},max:{type:Number},minValue:{type:Number},maxValue:{type:Number},step:{type:Number,default:1},preventWheel:{type:Boolean,default:!1},ruler:{type:Boolean,default:!0},label:{type:Boolean,default:!0},labels:{type:Array},minCaption:{type:String},maxCaption:{type:String},rangeMargin:{type:Number}},data(){let r=this.labels||[],n=this.min===void 0?0:this.min,t=r.length?r.length-1:100,o=this.max===void 0?t:this.max,e=this.minValue===void 0?25:this.minValue;r.length&&this.minValue===void 0&&(e=1);let i=this.maxValue||75;if(r.length&&this.maxValue===void 0&&(i=r.length-2),o<=n)throw new Error("Invalid props min or max");if(e>i)throw new Error("Invalid props minValue or maxValue");let a=this.rangeMargin===void 0?this.step:this.rangeMargin,s=a%this.step;return s&&(a=a+this.step-s),{valueMin:e<n?n:e,valueMax:i>o?o:i,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:a}},methods:{onBarLeftClick(){this.valueMin-this.step>=this.minimum?this.valueMin-=this.step:this.valueMin=this.minimum},onInnerBarLeftClick(){this.valueMin+this.rangeMarginValue<this.valueMax&&(this.valueMin+=this.step)},onBarRightClick(){this.valueMax+this.step<=this.maximum?this.valueMax+=this.step:this.valueMax=this.maximum},onInnerBarRightClick(){this.valueMax-this.rangeMarginValue>this.valueMin&&(this.valueMax-=this.step)},onInputMinChange(r){let n=parseFloat(r.target.value);n<=this.valueMax-this.rangeMarginValue&&n>=this.minimum?this.valueMin=n:r.target.value=this.valueMin},onInputMaxChange(r){let n=parseFloat(r.target.value);n>=this.valueMin+this.rangeMarginValue&&n<=this.maximum?this.valueMax=n:r.target.value=this.valueMax},onLeftThumbMousedown(r){if(r.preventDefault(),this.startX=r.clientX,r.type==="touchstart")if(r.touches.length===1)this.startX=r.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=r.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(r){this.mouseMoveCounter++;let n=r.clientX;r.type==="touchmove"&&(n=r.touches[0].clientX);let o=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*o;e-=e%this.step,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(r){if(r.preventDefault(),this.startX=r.clientX,r.type==="touchstart")if(r.touches.length===1)this.startX=r.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=r.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(r){this.mouseMoveCounter++;let n=r.clientX;r.type==="touchmove"&&(n=r.touches[0].clientX);let o=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*o;e-=e%this.step,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(r){if(this.preventWheel===!0||!r.shiftKey&&!r.ctrlKey)return;let n=this.step;r.deltaY<0&&(n=-n),r.shiftKey&&r.ctrlKey?this.valueMin+n>=this.minimum&&this.valueMax+n<=this.maximum&&(this.valueMin=this.valueMin+n,this.valueMax=this.valueMax+n):r.ctrlKey?(n=this.valueMax+n,n<this.valueMin+this.rangeMarginValue?n=this.valueMin+this.rangeMarginValue:n>this.maximum&&(n=this.maximum),this.valueMax=n):r.shiftKey&&(n=this.valueMin+n,n<this.minimum?n=this.minimum:n>this.valueMax-this.rangeMarginValue&&(n=this.valueMax-this.rangeMarginValue),this.valueMin=n)},triggerInput(){let r=0;this.step.toString().includes(".")&&(r=2);let n={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(r)),maxValue:parseFloat(this.valueMax.toFixed(r))};this.$emit("input",n)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let r=this.labels||[],n=r.length?r.length-1:100;return this.max===void 0?n:this.max},stepCount(){let r=this.labels||[];return r.length?r.length-1:Math.floor((this.maximum-this.minimum)/this.step)},subStepCount(){return(this.labels||[]).length&&this.step>1?(this.maximum-this.minimum)/this.step:0},barMin(){return(this.valueMin-this.minimum)/(this.maximum-this.minimum)*100},barMax(){return 100-(this.valueMax-this.minimum)/(this.maximum-this.minimum)*100},barMinVal(){let r=0;return this.step.toString().includes(".")&&(r=2),(this.valueMin||0).toFixed(r)},barMaxVal(){let r=0;return this.step.toString().includes(".")&&(r=2),(this.valueMax||100).toFixed(r)},scaleLabels(){let r=this.labels||[];return r.length===0&&(r=[],r.push(this.minimum),r.push(this.maximum)),r}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(r){this.valueMin=r<this.minimum?this.minimum:r},maxValue(r){this.valueMax=r>this.maximum?this.maximum:r}},mounted(){}},Pb={class:"bar"},Rb=["min","max","step","value"],Vb={class:"caption"},Zb={class:"min-caption"},Wb={class:"bar-inner"},Gb=["min","max","step","value"],Hb={class:"caption"},Fb={class:"max-caption"},$b={key:0,class:"ruler"},Jb={key:1,class:"sub-ruler"},Xb={key:2,class:"labels"};function Kb(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([t.baseClassName,e.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:n[10]||(n[10]=c.withModifiers((...a)=>i.onMouseWheel&&i.onMouseWheel(...a),["prevent","stop"]))},[c.createElementVNode("div",Pb,[c.createElementVNode("div",{class:"bar-left",style:c.normalizeStyle({width:i.barMin+"%"}),onClick:n[0]||(n[0]=(...a)=>i.onBarLeftClick&&i.onBarLeftClick(...a))},null,4),c.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:i.minimum,max:i.maximum,step:t.step,value:e.valueMin,onInput:n[1]||(n[1]=c.withModifiers((...a)=>i.onInputMinChange&&i.onInputMinChange(...a),["stop","prevent"]))},null,40,Rb),c.createElementVNode("div",{class:"thumb thumb-left",onMousedown:n[2]||(n[2]=(...a)=>i.onLeftThumbMousedown&&i.onLeftThumbMousedown(...a)),onTouchstart:n[3]||(n[3]=(...a)=>i.onLeftThumbMousedown&&i.onLeftThumbMousedown(...a))},[c.createElementVNode("div",Vb,[c.createElementVNode("span",Zb,c.toDisplayString(t.minCaption||i.barMinVal),1)])],32),c.createElementVNode("div",Wb,[c.createElementVNode("div",{class:"bar-inner-left",onClick:n[4]||(n[4]=(...a)=>i.onInnerBarLeftClick&&i.onInnerBarLeftClick(...a))}),c.createElementVNode("div",{class:"bar-inner-right",onClick:n[5]||(n[5]=(...a)=>i.onInnerBarRightClick&&i.onInnerBarRightClick(...a))})]),c.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:i.minimum,max:i.maximum,step:t.step,value:e.valueMax,onInput:n[6]||(n[6]=c.withModifiers((...a)=>i.onInputMaxChange&&i.onInputMaxChange(...a),["stop","prevent"]))},null,40,Gb),c.createElementVNode("div",{class:"thumb thumb-right",onMousedown:n[7]||(n[7]=(...a)=>i.onRightThumbMousedown&&i.onRightThumbMousedown(...a)),onTouchstart:n[8]||(n[8]=(...a)=>i.onRightThumbMousedown&&i.onRightThumbMousedown(...a))},[c.createElementVNode("div",Hb,[c.createElementVNode("span",Fb,c.toDisplayString(t.maxCaption||i.barMaxVal),1)])],32),c.createElementVNode("div",{class:"bar-right",style:c.normalizeStyle({width:i.barMax+"%"}),onClick:n[9]||(n[9]=(...a)=>i.onBarRightClick&&i.onBarRightClick(...a))},null,4)]),t.ruler?(c.openBlock(),c.createElementBlock("div",$b,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.stepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-rule"}))),128))])):c.createCommentVNode("",!0),i.subStepCount?(c.openBlock(),c.createElementBlock("div",Jb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.subStepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-sub-rule"}))),128))])):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createElementBlock("div",Xb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.scaleLabels,a=>(c.openBlock(),c.createElementBlock("div",{class:"label",key:a},c.toDisplayString(a),1))),128))])):c.createCommentVNode("",!0)],34)}var qb=st(Bb,[["render",Kb]]);const eT=c.defineComponent({components:{DhIcon:Te},props:{mainText:{type:String,default:"Advanced"},filterMissingText:{type:String,default:"Filter Missing"},matchText:{type:String,default:"Match"},excludeText:{type:String,default:"Exclude"}},data(){return{activeFilter:!1,isFilterMissing:!1,isMatch:!1,isExclude:!1}},emits:["match","exclude","filter_missing"],mounted(){this.isMatch=!0},methods:{toggleFilter(){this.activeFilter=!this.activeFilter},matchFilter(){this.isMatch=!0,this.isExclude=!1,this.$emit("match",this.isMatch)},excludeFilter(){this.isMatch=!1,this.isExclude=!0,this.$emit("exclude",this.isExclude)},missingFilter(){this.isFilterMissing=!this.isFilterMissing,this.$emit("filter_missing",this.isFilterMissing),this.isFilterMissing&&this.isMatch?this.matchFilter():this.isFilterMissing&&this.isExclude&&this.excludeFilter()}}}),tT={class:"dh-advanced-filter-container"},nT={class:"advance_section"},rT={key:0},oT={class:"list-none"},iT=["checked"],aT=["checked"],sT=["checked"];function lT(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",tT,[c.createElementVNode("div",nT,[c.createElementVNode("span",{class:"toggle-icon",onClick:n[0]||(n[0]=s=>r.toggleFilter())},[c.createTextVNode(c.toDisplayString(r.mainText)+" ",1),c.createVNode(a,{"icon-name":r.activeFilter?"arrow-up":"arrow-down",size:20},null,8,["icon-name"])]),r.activeFilter?(c.openBlock(),c.createElementBlock("div",rT,[c.renderSlot(r.$slots,"default"),c.createElementVNode("ul",oT,[c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isFilterMissing,name:"number_filter",type:"checkbox",onChange:n[1]||(n[1]=s=>r.missingFilter())},null,40,iT),c.createTextVNode(" "+c.toDisplayString(r.filterMissingText),1)])]),c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isMatch,name:"number_filter",type:"radio",onChange:n[2]||(n[2]=s=>r.matchFilter())},null,40,aT),c.createTextVNode(" "+c.toDisplayString(r.matchText),1)]),c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isExclude,name:"number_filter",type:"radio",onChange:n[3]||(n[3]=s=>r.excludeFilter())},null,40,sT),c.createTextVNode(" "+c.toDisplayString(r.excludeText),1)])])])])):c.createCommentVNode("",!0)])])}var If=st(eT,[["render",lT]]),ww="";Sr.register(Mb,Wi,Hi,Pl);const uT=c.defineComponent({components:{Bar:Yb,MultiRangeSlider:qb,DhAdvancedFilter:If},props:{numberRange:{type:Array,default:()=>[{key:1,count:10}]},width:{type:Number,default:200},height:{type:Number,default:50},chartId:{type:String,default:"bar-chart"},datasetIdKey:{type:String,default:"label"},steps:{type:Number,default:1},includeForm:{type:Boolean,default:!1}},data(){return{chartData:{labels:[],datasets:[{labels:"",data:[],backgroundColor:["#5ea9e5"],borderRadius:1,hoverBackgroundColor:"#e0e0e0"}]},chartOptions:{responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1},ticks:{display:!0}},y:{display:!1,grid:{display:!1},ticks:{display:!1}}}},chartLines:{},min:"1",max:this.maxNumber(this.numberRange),rangeMax:this.numberRange.length,chart_dta:[],BarMinValue:1,BarMaxValue:this.numberRange.length,activeFilter:!1,validated:!1,isMatch:!1,isExclude:!1,isDisable:!1,labels:[]}},mounted(){this.isMatch=!0,this.setChartData(this.numberRange),this.highlightChart(),this.labels=[this.BarMinValue,this.max]},methods:{matchFilter(){if(!this.isDisable){this.isMatch=!0,this.isExclude=!1;var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")}},excludeFilter(){if(!this.isDisable){this.isMatch=!1,this.isExclude=!0;var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#e0e0e0"):this.chartData.datasets[0].backgroundColor.push("#5ea9e5")}},missingFilter(){this.isDisable=!this.isDisable,this.validated=!this.validated;var r=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let n=1;n<=r.length;n++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},changeMin(r){let n=r.target.value;this.min=n||"1",this.BarMinValue=n?this.getFirstIndex(parseInt(n)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(r){let n=r.target.value;this.BarMaxValue=n&&n>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(n)),this.max=n&&n>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):n,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(r){r=this.sortData(r),this.removeChartData();let n=this.chartData.labels;for(let t=0;t<r.length;t++)n.push(r[t].key),this.chart_dta.push(r[t].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(r){const{minValue:n,maxValue:t}=r;this.BarMinValue=n,this.BarMaxValue=t;var o=this.chartData.datasets[0].data;this.min=o[this.BarMinValue]?o[this.BarMinValue]:"1",this.max=o[this.BarMaxValue]?o[this.BarMaxValue]:this.max,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},toggleFilter(){this.activeFilter=!this.activeFilter},removeChartData(){this.chartData.labels=[],this.chartData.datasets[0].data=[],this.chart_dta=[]},sortData(r){return r.slice().sort(function(n,t){return n.count-t.count})},maxNumber(r){if(r.length!=0)return r.reduce((n,t)=>n=n>t.count?n:t.count,0)},getLastIndex(r){let n=this.chartData.datasets[0].data,t=0;for(let o=r;o>=0;o--)if(n.lastIndexOf(o)!==-1){t=n.lastIndexOf(o);break}else continue;return t},getFirstIndex(r){let n=this.chartData.datasets[0].data,t=0;for(let o=r;o<=this.max;o++)if(n.lastIndexOf(o)!==-1){t=n.lastIndexOf(o);break}else continue;return t}}}),cT={class:"dh-range-container"},dT={class:"bar-chart"},MT={key:0,class:"input-group-section"},fT={class:"input-group sb-input"},gT=["disabled","max","value"],hT={class:"input-group sb-input"},pT=["disabled","max","min","value"];function yT(r,n,t,o,e,i){const a=c.resolveComponent("Bar"),s=c.resolveComponent("MultiRangeSlider"),l=c.resolveComponent("dh-advanced-filter");return c.openBlock(),c.createElementBlock("div",cT,[c.createElementVNode("div",dT,[c.createVNode(a,{"chart-data":r.chartData,"chart-id":r.chartId,"chart-options":r.chartOptions,"dataset-id-key":r.datasetIdKey,height:r.height,width:r.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),c.createVNode(s,{"base-class-name":`multi-range-slider range-slider ${r.isDisable}`,label:!0,labels:r.labels,max:r.rangeMax,"max-caption":`${r.max}`,"max-value":r.BarMaxValue,min:1,"min-caption":`${r.min}`,"min-value":r.BarMinValue,"range-margin":0,ruler:!1,step:r.steps,onInput:r.updateBarChart},null,8,["base-class-name","labels","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),r.includeForm?(c.openBlock(),c.createElementBlock("div",MT,[c.createElementVNode("div",fT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${r.validated?"disable":""}`)}," From ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!r.validated,max:`${r.max}`,min:"1",placeholder:"From",type:"number",value:`${r.min}`,onInput:n[0]||(n[0]=u=>r.changeMin(u))},null,40,gT)]),c.createElementVNode("div",hT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${r.validated?"disable":""}`)}," To ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!r.validated,max:`${r.maxNumber(r.numberRange)}`,min:`${r.min}`,placeholder:"To",type:"number",value:`${r.max}`,onInput:n[1]||(n[1]=u=>r.changeMax(u))},null,40,pT)])])):c.createCommentVNode("",!0),c.renderSlot(r.$slots,"input"),c.createVNode(l,{onExclude:r.excludeFilter,onFilter_missing:r.missingFilter,onMatch:r.matchFilter},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"filter")]),_:3},8,["onExclude","onFilter_missing","onMatch"])])}var mf=st(uT,[["render",yT]]),Lw="",zw="";const NT={id:"dp-container"},jT=c.createElementVNode("div",{class:"dp__calendar_range"},[c.createElementVNode("p",null,"From"),c.createElementVNode("p",null,"To")],-1),IT={class:"dp__multi"},mT=["value"],DT=["value"],xT=c.createTextVNode(" Back "),vT=["onClick"],bT=["onClick"],TT=["onClick"],AT=["onClick"],kT=["onClick"],wT=["onClick"],LT=["onClick"],zT=["onClick"],ST=c.createElementVNode("div",{id:"tags",class:"dp__calendar_tags"},null,-1),OT={__name:"AdvancedDatePicker",props:{numberRange:{type:Array,required:!0}},emits:["update"],setup(r,{emit:n}){const t=c.ref(["",""]),o=c.ref(null),e=c.ref(null),i=c.ref(null),a=c.ref(!1),s=c.ref([{label:"Today",range:[new Date,new Date],slot:"today"},{label:"Previous week",range:[Cc(Oc(new Date)),Oc(new Date)],slot:"previousWeek"},{label:"This week",range:[Cc(new Date),k0(new Date)],slot:"week"},{label:"Next week",range:[L0(new Date),w0(new Date().setDate(new Date().getDate()+7))],slot:"nextWeek"},{label:"This month",range:[Pr(new Date),Br(new Date)],slot:"currentMonth"},{label:"Previous month",range:[Pr(It(new Date,1)),Br(It(new Date,1))],slot:"previousMonth"},{label:"Last 3 months",range:[Pr(It(new Date,3)),Br(It(new Date,1))],slot:"threeMonths"},{label:"Last 6 months",range:[Pr(It(new Date,6)),Br(It(new Date,1))],slot:"sixMonths"},{label:"Last year",range:[Xf(new Date),Jf(new Date)],slot:"yearly"}]),l=f=>{t.value=f,console.log(t.value),n("update",t.value)};function u(f){e.value=f.target.value,t.value=[f.target.value,o.value]}function d(f){o.value=f.target.value,t.value=[e.value,f.target.value]}c.onMounted(()=>{i.value.openMenu()});function M(){i.value.openMenu()}return(f,p)=>(c.openBlock(),c.createElementBlock("div",NT,[jT,c.createVNode(c.unref(yi),{ref_key:"datePicker",ref:i,modelValue:t.value,"onUpdate:modelValue":[p[2]||(p[2]=y=>t.value=y),l],"auto-apply":"","day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,"model-type":"dd/MM/yyyy","multi-calendars":"","multi-calendars-solo":"","multi-static":!1,offset:12,position:"left","preset-ranges":s.value,range:"","select-text":"Apply","text-input":"",uid:"advanced",onClosed:M},{"dp-input":c.withCtx(()=>[c.createElementVNode("div",IT,[c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:e.value?e.value:t.value[0],onInput:p[0]||(p[0]=y=>u(y))},null,40,mT),c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:o.value?o.value:t.value[1],onInput:p[1]||(p[1]=y=>d(y))},null,40,DT)])]),"arrow-left":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[xT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"action-select":c.withCtx(()=>[]),previousWeek:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,vT)]))]),week:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,bT)]))]),nextWeek:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,TT)]))]),currentMonth:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,AT)]))]),previousMonth:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,kT)]))]),threeMonths:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,wT)]))]),sixMonths:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,LT)]))]),yearly:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,zT)]))]),_:1},8,["modelValue","preset-ranges"]),c.createVNode(mf,{class:"dp__calendar_range_number","number-range":r.numberRange,steps:1},{input:c.withCtx(()=>[ST]),filter:c.withCtx(()=>[c.createVNode(pd,{data:a.value,label:"Include time",onChange:p[3]||(p[3]=y=>a.value=y)},null,8,["data"])]),_:1},8,["number-range"])]))}},CT=c.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:String,default:()=>"bottom",required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let r=this.$refs.main,n=this.$refs[this.target];["right","left"].includes(this.placement)&&(n.style.top=-(((n==null?void 0:n.offsetHeight)-(r==null?void 0:r.offsetHeight))/2)+"px")}}}),ET=["placement","target","tooltipText","trigger"],_T=["id"],QT={class:"text"};function UT(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:r.placement,target:r.target,tooltipText:r.tooltipText,trigger:r.trigger,onClick:n[0]||(n[0]=a=>r.trigger=="click"?r.showTooltip():null),onMouseover:n[1]||(n[1]=a=>r.tooltip())},[c.renderSlot(r.$slots,"default"),c.createElementVNode("div",{id:r.target,ref:r.target,class:c.normalizeClass(`tooltiptext ${r.show}`)},[c.createElementVNode("span",QT,c.toDisplayString(r.tooltipText),1)],10,_T)],40,ET)}var Df=st(CT,[["render",UT]]),Sw="";const YT={class:"copy__text"},BT=["readonly"],PT={__name:"Copiable",props:{text:{type:String,required:!0},placement:{type:String,default:"bottom"},readonly:{type:Boolean,default:!0}},setup(r){const n=r,t=c.ref(""),o=c.ref("copy text");function e(a){navigator.clipboard.writeText(a),o.value="copied !"}function i(){o.value="copy text"}return c.onMounted(()=>{t.value=n.text}),(a,s)=>(c.openBlock(),c.createElementBlock("span",YT,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l),readonly:r.readonly,type:"text",onInput:i},null,40,BT),[[c.vModelText,t.value]]),c.createVNode(Df,{placement:r.placement,target:"tooltiptext","tooltip-text":o.value,trigger:"hover",onClick:s[1]||(s[1]=l=>e(t.value))},{default:c.withCtx(()=>[c.createVNode(Te,{class:"copy__text_icon","icon-name":"copy",size:18})]),_:1},8,["placement","tooltip-text"])]))}};var Ow="";const RT=c.createTextVNode(" Back "),VT=c.createElementVNode("div",null,"today",-1),ZT={__name:"DatePicker",props:{inline:{type:Boolean,default:!0}},emits:["update"],setup(r,{emit:n}){const t=c.ref(),o=c.ref(null),e=a=>{t.value=a,n("update",t.value)},i=c.ref([{date:en(new Date,0),type:"dot",tooltip:[{text:"Dot with tooltip",color:"blue"}]}]);return(a,s)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.unref(yi),{ref_key:"datePicker",ref:o,modelValue:t.value,"onUpdate:modelValue":[s[0]||(s[0]=l=>t.value=l),e],"day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,inline:r.inline,markers:i.value,"month-name-format":"short",offset:12,placeholder:"MM/DD/YYYY","select-text":"Apply","text-input":"",uid:"base"},{"arrow-left":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[RT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"marker-tooltip":c.withCtx(()=>[VT]),_:1},8,["modelValue","inline","markers"])]))}};var Cw="";const WT=["src"],GT={key:3,class:"menu-item-text-wrapper"};var xf=st(c.defineComponent({__name:"DropdownMenuItem",props:{item:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:r=>["none","ellipsis","fit-content"].includes(r)},iconSize:{type:Number,required:!1,default:24}},setup(r){const n=r;return(t,o)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[r.item.iconUrl?(c.openBlock(),c.createElementBlock("img",{key:0,alt:"icon image",class:"icon icon-url",src:r.item.iconUrl},null,8,WT)):c.createCommentVNode("",!0),r.item.iconUrl?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Te,c.mergeProps({key:1,class:"icon"},{...r.item,size:n.iconSize}),null,16)),r.item.subText?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",{key:2,class:c.normalizeClass(["dh-body-2",r.textEllipsisStyle])},c.toDisplayString(r.item.text),3)),r.item.subText?(c.openBlock(),c.createElementBlock("div",GT,[c.createElementVNode("span",{class:c.normalizeClass(["dh-body-1",r.textEllipsisStyle])},c.toDisplayString(r.item.text),3),c.createElementVNode("span",{class:c.normalizeClass(["dh-body-4-medium",r.textEllipsisStyle])},c.toDisplayString(r.item.subText),3)])):c.createCommentVNode("",!0),r.item.isSelected?(c.openBlock(),c.createBlock(Te,{key:4,class:"icon-blue icon-accept","icon-name":"accept",size:16})):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-3a3f37c0"]]),_w="";const HT=["data-e2e","onClick"],FT={key:1,class:"center-vertical"};var $T=st(c.defineComponent({__name:"DropdownMenu",props:{items:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:r=>["none","ellipsis","fit-content"].includes(r)},iconSize:{type:Number,required:!1,default:24},closeOnClickOutside:{type:Boolean,required:!1,default:!0},zIndex:{type:Number,required:!1,default:100},closeOnItemSelected:{type:Boolean,required:!1,default:!0}},emits:["itemSelected","close"],setup(r,{emit:n}){const t=r;c.onMounted(()=>{document.addEventListener("click",i=>{o(i)})});function o(i){const a=i.target,s=document.querySelector("[data-id='dropdown-menu']");s&&!s.contains(i.target)&&!a.classList.contains("dropdown-toggle")&&t.closeOnClickOutside&&n("close")}function e(i){n("itemSelected",i),t.closeOnItemSelected&&n("close")}return(i,a)=>{const s=c.resolveComponent("router-link");return c.openBlock(),c.createElementBlock("div",{class:"dropdown-menu","data-id":"dropdown-menu",style:c.normalizeStyle({"z-index":t.zIndex})},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.items,l=>(c.openBlock(),c.createElementBlock("div",{key:l.iconName,class:"menu-item","data-e2e":l.dataE2eTag,onClick:u=>e(l)},[l.url?(c.openBlock(),c.createBlock(s,{key:0,class:"center-vertical",to:{path:l.url}},{default:c.withCtx(()=>[c.createVNode(xf,{"icon-size":r.iconSize,item:l,"text-ellipsis-style":r.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]),_:2},1032,["to"])):(c.openBlock(),c.createElementBlock("div",FT,[c.createVNode(xf,{"icon-size":r.iconSize,item:l,"text-ellipsis-style":r.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]))],8,HT))),128))],4)}}}),[["__scopeId","data-v-50b04dea"]]),Uw="";const JT={key:0,class:"invalid-feedback"},XT=c.defineComponent({__name:"Error",props:{errors:{type:Object,required:!1,default:void 0}},setup(r){const n=r;return(t,o)=>{var e;return c.unref(n).errors&&((e=c.unref(n).errors)==null?void 0:e.length)>0?(c.openBlock(),c.createElementBlock("div",JT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.errors,i=>(c.openBlock(),c.createElementBlock("span",{key:i},c.toDisplayString(i),1))),128))])):c.createCommentVNode("",!0)}}}),KT=c.defineComponent({components:{DhIcon:Te},props:{title:{type:String,default:"Advanced"},isAdvancedSettingsOpen:{type:Boolean,default:!1}},data(){return{isAdvancedSettingsCurrentlyOpen:!1}},watch:{isAdvancedSettingsOpen:function(r){this.isAdvancedSettingsCurrentlyOpen=r}},mounted(){this.isAdvancedSettingsCurrentlyOpen=this.isAdvancedSettingsOpen}}),qT={class:"dh-body-1-medium"},eA=c.createTextVNode(" Content ");function tA(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(["advanced-panel-header clickable",{opened:r.isAdvancedSettingsCurrentlyOpen,closed:!r.isAdvancedSettingsCurrentlyOpen}]),"data-e2e":"expansion-panel-button",onClick:n[0]||(n[0]=s=>r.isAdvancedSettingsCurrentlyOpen=!r.isAdvancedSettingsCurrentlyOpen)},[c.createElementVNode("h4",qT,c.toDisplayString(r.title),1),c.createVNode(a,{class:"icon","icon-name":r.isAdvancedSettingsCurrentlyOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])],2),r.isAdvancedSettingsCurrentlyOpen?c.renderSlot(r.$slots,"content",{key:0},()=>[eA]):c.createCommentVNode("",!0)],64)}var nA=st(KT,[["render",tA]]),Yw="";const rA=c.createElementVNode("label",{for:"upload_pdf"},[c.createTextVNode(" Drag and drop file or "),c.createElementVNode("span",{id:"upload"},"browse")],-1),oA={key:1,class:"file__upload_items"},iA={class:"file__upload_list_item"},aA={class:"file__upload_list_item_label"},sA=["title"],lA={key:0,class:"label__antivirus"},uA={key:1,class:"label__antivirus label__antivirus--failed"},cA={key:2,class:"label__antivirus label__antivirus--detected"},dA=c.createElementVNode("br",null,null,-1),MA={key:3},fA={key:4},gA={key:0},hA=["value"],pA=["href"],yA={key:2,class:"file__upload_placeholder"},NA={key:3,class:"file__upload_action"},jA=c.createElementVNode("button",{class:"file__upload_action_cancel"},"Cancel",-1),IA={__name:"FileUpload",props:{uploadProgress:{type:Array,required:!0},errorOccurred:{type:Array,required:!0},virusCheck:{type:Array,required:!0},modelValue:{type:FileList,required:!1,default:void 0},inline:{type:Boolean,required:!1,default:!1},errorMessage:{type:String,required:!1,default:"an error occurred while uploading"},fileSaved:{type:Boolean,required:!1,default:!1},virusCheckText:{type:String,required:!1,default:"Antivirus check ..."},virusCheckFailedText:{type:String,required:!1,default:"Antivirus check failed"},virusDetectedText:{type:String,required:!1,default:"Virus detected"},deleteConfirmationText:{type:String,required:!1,default:"Are you sure you want to delete it permanently? this action will be irreversible"},zIndex:{type:Number,required:!1,default:99}},emits:["update:modelValue","save:modelValue","reload"],setup(r,{emit:n}){const t=r,o=c.ref(null),e=c.ref(!1),i=c.ref([]),a=c.ref([".pdf",".csv",".doc",".jpeg",".mp4",".png",".txt",".xls"]);function s(D,m=2){if(!+D)return"0 Bytes";const j=1024,T=m<0?0:m,L=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],k=Math.floor(Math.log(D)/Math.log(j));return`${parseFloat((D/Math.pow(j,k)).toFixed(T))} ${L[k]}`}function l(D){return a.value.includes(d(D))?d(D).slice(1):"unknown"}function u(D){const m=D.lastIndexOf(".");let j=D.slice(0,m);return j.length<=15?j:j.slice(0,15)+"... "}function d(D){return D.replace(/.*(?=\.)/g,"")}function M(D){D.stopPropagation(),i.value=o.value.files,i.value&&(e.value=!0),n("update:modelValue",i.value)}function f(D){D.stopPropagation(),D.dataTransfer.dropEffect="copy"}function p(D){D.stopPropagation(),e.value=!0,i.value=D.dataTransfer.files,n("update:modelValue",i.value)}function y(D){window.confirm(t.deleteConfirmationText)&&I(D)}function I(D){const m=new DataTransfer;for(let j=0;j<i.value.length;j++){const T=i.value[j];D!==j&&m.items.add(T)}i.value=m.files,i.value.length==0&&(e.value=!1)}function v(){n("save:modelValue",i.value)}function h(D){return URL.createObjectURL(D)}function N(D){D.preventDefault(),n("reload")}return(D,m)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["file__upload",r.inline?"":"file__upload_box"])},[r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:"file__upload_btn",onDragover:m[1]||(m[1]=c.withModifiers(j=>f(j),["prevent"])),onDrop:m[2]||(m[2]=c.withModifiers(j=>p(j),["prevent"]))},[c.createVNode(Te,{class:"file__upload_btn_icon","icon-name":"upload",size:24}),rA,c.createElementVNode("input",{id:"upload_pdf",ref_key:"upload",ref:o,multiple:"",name:"file",type:"file",onInput:m[0]||(m[0]=j=>M(j))},null,544)],32)),e.value?(c.openBlock(),c.createElementBlock("div",oA,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(j,T)=>(c.openBlock(),c.createElementBlock("div",{key:T,class:c.normalizeClass(["file__upload_list",r.inline?"":"file__upload_list_box"])},[c.createVNode(Te,{class:c.normalizeClass(r.errorOccurred[T]?"file__upload_list_icon":""),"icon-name":"file-"+l(j.name),size:40},null,8,["class","icon-name"]),t.uploadProgress[T]==100&&r.fileSaved&&!r.errorOccurred[T]&&r.virusCheck[T]=="loading"?(c.openBlock(),c.createBlock(Te,{key:0,class:"file__upload_list_icon_sub file__upload_list_icon_sub--loading","icon-name":"states",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="failed"?(c.openBlock(),c.createBlock(Te,{key:1,class:"file__upload_list_icon_sub","icon-name":"warning",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="detected"?(c.openBlock(),c.createBlock(Te,{key:2,class:"file__upload_list_icon_sub","icon-name":"danger",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createBlock(Te,{key:3,class:"file__upload_list_icon_sub","icon-name":"error",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),c.createElementVNode("div",iA,[c.createElementVNode("div",aA,[c.createElementVNode("div",null,[c.createElementVNode("span",{title:j.name},c.toDisplayString(u(j.name))+c.toDisplayString(d(j.name)),9,sA),t.uploadProgress[T]==100&&r.fileSaved&&!r.errorOccurred[T]&&r.virusCheck[T]=="loading"?(c.openBlock(),c.createElementBlock("span",lA,[c.createTextVNode(c.toDisplayString(r.virusCheckText)+" ",1),c.createVNode(Te,{class:"file__upload_list_icon_sub--loading","icon-name":"processing",size:18})])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="failed"?(c.openBlock(),c.createElementBlock("span",uA,c.toDisplayString(r.virusCheckFailedText),1)):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="detected"?(c.openBlock(),c.createElementBlock("span",cA,c.toDisplayString(r.virusDetectedText),1)):c.createCommentVNode("",!0),dA,r.fileSaved&&!r.errorOccurred[T]||!r.errorOccurred[T]&&r.virusCheck[T]?(c.openBlock(),c.createElementBlock("span",MA,c.toDisplayString(s(j.size)),1)):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("span",fA,c.toDisplayString(r.errorMessage),1)):c.createCommentVNode("",!0)]),r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",gA,c.toDisplayString(t.uploadProgress[T])+"%",1))]),r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("progress",{key:0,id:"file",max:"100",value:t.uploadProgress[T]},c.toDisplayString(t.uploadProgress[T])+"% ",9,hA))]),r.fileSaved&&!r.virusCheck[T]&&!r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("a",{key:4,class:"file__upload_list_download",download:"",href:h(j)},[c.createVNode(Te,{class:"file__upload_list_download_icon","icon-name":"download",size:24})],8,pA)):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("a",{key:5,class:"file__upload_list_retry",onClick:m[3]||(m[3]=L=>N(L))},[c.createVNode(Te,{class:"file__upload_list_retry_icon","icon-name":"retry",size:24})])):c.createCommentVNode("",!0),t.uploadProgress[T]!==100?(c.openBlock(),c.createBlock(Te,{key:6,class:"file__upload_list_delete","icon-name":"close",size:24,onClick:L=>I(T)},null,8,["onClick"])):(c.openBlock(),c.createBlock(Te,{key:7,class:"file__upload_list_delete","icon-name":"delete",size:24,onClick:L=>y(T)},null,8,["onClick"]))],2))),128))])):c.createCommentVNode("",!0),!e.value&&!r.inline?(c.openBlock(),c.createElementBlock("div",yA," No file selected ")):c.createCommentVNode("",!0),!r.inline&&!r.fileSaved?(c.openBlock(),c.createElementBlock("div",NA,[jA,c.createElementVNode("button",{class:c.normalizeClass(["file__upload_action_done",e.value&&!r.fileSaved?"file__upload_action_done--active":""]),onClick:v}," Done ",2)])):c.createCommentVNode("",!0)],2))}};var Bw="";const mA={class:"input__dropdown"},DA=["placeholder","value"],xA={class:"input__dropdown_second"},vA=["tabindex"],bA=["onClick"],TA=["onClick"],vf={__name:"InputDropdown",props:{list:{type:Array,required:!0},labelProp:{type:String,default:"label"},icon:{type:String,required:!0},placeholderInput:{type:String,default:"Enter value"},tabindex:{type:Number,required:!1,default:0},inputValue:{type:String,required:!1,default:""},inputIndex:{type:Number,required:!1,default:0},inputWidth:{type:String,required:!1,default:"75%"}},emits:["update"],setup(r,{emit:n}){const t=r,o=c.ref(t.list[0].label),e=c.ref(!1),i=c.ref(null);c.onMounted(()=>{n("update","",o.value)});function a(){n("update",i.value.value,o.value,t.inputIndex)}return(s,l)=>(c.openBlock(),c.createElementBlock("div",mA,[c.createElementVNode("input",{ref_key:"name",ref:i,class:"input__dropdown_text",placeholder:r.placeholderInput,style:c.normalizeStyle({width:r.inputWidth}),type:"text",value:r.inputValue,onInput:a},null,44,DA),c.createElementVNode("div",xA,[c.createVNode(Te,{"icon-name":r.icon,size:18},null,8,["icon-name"]),c.createElementVNode("div",{class:"custom__select",tabindex:r.tabindex,onBlur:l[1]||(l[1]=u=>e.value=!1)},[c.createElementVNode("div",{class:c.normalizeClass(["custom__select_selected",{"custom__select--open":e.value}]),onClick:l[0]||(l[0]=u=>e.value=!e.value)},c.toDisplayString(o.value),3),typeof r.list[0]=="object"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,(u,d)=>(c.openBlock(),c.createElementBlock("div",{key:d,onClick:M=>{o.value=u[r.labelProp],e.value=!1,a()}},c.toDisplayString(u[r.labelProp]),9,bA))),128))],2)):c.createCommentVNode("",!0),typeof r.list[0]=="string"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,(u,d)=>(c.openBlock(),c.createElementBlock("div",{key:d,onClick:M=>{o.value=u,e.value=!1,a()}},c.toDisplayString(u),9,TA))),128))],2)):c.createCommentVNode("",!0)],40,vA)])]))}};var Pw="";const AA={class:"input-group-multiple"},kA={class:"input-label"},wA={__name:"InputDropdownMultiple",props:{labelProp:{type:String,default:"Label"},icon:{type:String,required:!0},placeholderInput:{type:String,default:"Enter value"},tabindex:{type:Number,required:!1,default:0},inputIndex:{type:Number,required:!1,default:0},inputWidth:{type:String,required:!1,default:"75%"},multipleProp:{type:Array,required:!0}},emits:["update"],setup(r,{emit:n}){const t=r,o=c.reactive(t.multipleProp);function e(a,s,l){o&&(o.map(u=>{u.id===l&&(u.input=a,u.optionSelected=s)}),n("update",o))}function i(){o&&o.push({id:o.length+1,list:o[0].list,input:null,optionSelected:null})}return(a,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",AA,[c.createElementVNode("label",kA,c.toDisplayString(r.labelProp),1),c.createElementVNode("button",{class:"btn btn-secondary btn-multiple",onClick:i},[c.createVNode(Te,{"icon-name":"plus",size:24})])]),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o,(l,u)=>(c.openBlock(),c.createBlock(vf,{key:u,icon:t.icon,"input-index":l.id,"input-value":l.input,"input-width":t.inputWidth,list:l.list,"placeholder-input":t.placeholderInput,tabindex:t.tabindex,onUpdate:e},null,8,["icon","input-index","input-value","input-width","list","placeholder-input","tabindex"]))),128))],64))}};var Rw="";const LA={class:"input__group"},zA=["placeholder","type","value"],SA={__name:"InputGroup",props:{modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text"},iconName:{type:String,required:!0},widthProp:{type:String,default:"200px"},heightProp:{type:String,default:"30px"},direction:{type:String,default:"right"},placeholder:{type:String,default:"type here"}},emits:["update:modelValue"],setup(r){const n=r;c.useCssVars(o=>({"9bbc973e":t.value,"17a45996":r.widthProp,d5af8106:r.heightProp}));const t=c.ref("row");return c.onMounted(()=>{n.direction=="left"&&(t.value="row-reverse")}),(o,e)=>(c.openBlock(),c.createElementBlock("div",LA,[c.createElementVNode("input",{class:"input__group_field",placeholder:r.placeholder,type:r.inputType,value:r.modelValue,onInput:e[0]||(e[0]=i=>o.$emit("update:modelValue",i.target.value))},null,40,zA),c.createVNode(Te,{class:"input__group_icon","icon-name":r.iconName},null,8,["icon-name"])]))}};var OA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR2SURBVHgBlVVdaFtlGH6+LydJ89OYtHVbf+YyhoPK5uK2G3/oIlTYhRctKApebAiCXowtDLzxIi3sUqnBiiBerF6osGl7J0idqWyD4WSZF3PzZ4tt7Y/NmnRN0yYn5/t8z9e0Ne35Wnwg5Jzzvt/7vO/7vT8MO6BnYDEuPP4TXMi4kIgyxqOrElEAZEZKZLhVHhpJBDPb2WE6wcsDZtwwXEkJGd9G7T9WRJqZ+f6RxONprUp9BDIs3CLJJM7tSLAJkg5xIT6EVSTCSEFLdPKT5ai36hqWzBVj8v+R1IFVM8y0ekcSvuwWop6BfFgaoR8kY0RSf04qRUriSh6l/AzcDY3wRtpgmWUSUhSewFYuITMFwV9MJ5iKzFgTCHfITtcWEhvW/H38NfYpViZ+UZ7Jmn920B3dZxDuPLnljOQsFmYiSY8J+53Xook734nE4v1r+P2rBMoTt1VUqzRC/ThFU85P2m7CCYKxc3bVrhNZRjDpdPHmoxnMXBmErFbgDIncza+RuzGE1QTXQ1k0fElF9OpAJcaZK+5kZuHuKCqlAraDbWzmxmWUJm5pXEH89Y8W49w0cNrBGYWlqTvbFvjTna1oigQoLQKP/ryq0eIooSFOxcCP6AxJaWkkDAEfw/uJ52GaJt658D1yhSmdGdJmJ+iOZEyrQaFeOPss9u3xKXUVHlXN8UO78U2qFx0tbuxv9eOzZDepCr0ZGlsGdUFYR3L04C50H4ugt2s/HkwXsVgqoyXUgLbdQeITtgFFEPK58VR7iFKk81dEuU7m5yWkXmtEo98Ao0jeS12FWeVo3+WnZhT48edJvNl3RTkU8nN8fKoJAWNJE5HdsJJl6SG6WVZhbsyZfuxVlSLwwbtd2NMcUM/2wReOP4Enoy2rVuhbQTRhpep25pGiwBmvZJ2EVcuD8/fewGwloIy1NftUdUlqUkn7glPKWpsblO7flTDO330FFjyORKSd4bBcY9CCYboUXFe3S9UmYmuvNeTJGRrEziTM1q/eJieLaWhAnuDbiQO12cZgLa0Ay1UI+7eyUfqjMwehWymMHHNXqxc57Y003W5aR3YrfwCXsp3KkCvgAfd7wX3073PRLAOGxztxbWqfrudtpC/R9uWrrGa/1KjS6MSXfxzFFxNdsJhXxUmOQbj8+Py35zB07xilh2kyAoom328/K6KRM740mUxtHoz2fRTmBKYfMMxXaP+wCMzcAsyHCyQLomRElayQs+y1tAVUAKnLtdW+3ke8avSRILNGZpPMjlsozlMBUI6u36Ebaz8M+OjiPUHwvc9g9KeyWkqLD13ITdpkG9OBPmcQNPrW3uti7hlYjkq3Z5iSH8vPEslCfSV1Ha7g1EucSt/Exe8krv/qrzMQeMxCUyu3d1WGutt5lW+QyXDZLPf9M26cldAODkfY99zSUU4FvL6+kdoK1xKt4dDbc3G3EUmSQhw7EDLqFSFZmvZtf2bQvm8HHeyA2FvFGPd6TlN0R0iZJj0Lq2NSZiWsLGNsjKOYvjlIbbIN/gUK8Nn86IrnuAAAAABJRU5ErkJggg==";function $t(r){return[null,void 0].indexOf(r)!==-1}function CA(r,n,t){const{object:o,valueProp:e,mode:i}=c.toRefs(r),a=c.getCurrentInstance().proxy,s=t.iv,l=M=>{s.value=d(M);const f=u(M);n.emit("change",f,a),n.emit("input",f),n.emit("update:modelValue",f)},u=M=>o.value||$t(M)?M:Array.isArray(M)?M.map(f=>f[e.value]):M[e.value],d=M=>$t(M)?i.value==="single"?{}:[]:M;return{update:l}}function EA(r,n){const{value:t,modelValue:o,mode:e,valueProp:i}=c.toRefs(r),a=c.ref(e.value!=="single"?[]:{}),s=o&&o.value!==void 0?o:t,l=c.computed(()=>e.value==="single"?a.value[i.value]:a.value.map(d=>d[i.value])),u=c.computed(()=>e.value!=="single"?a.value.map(d=>d[i.value]).join(","):a.value[i.value]);return{iv:a,internalValue:a,ev:s,externalValue:s,textValue:u,plainValue:l}}function _A(r,n,t){const{regex:o}=c.toRefs(r),e=c.getCurrentInstance().proxy,i=t.isOpen,a=t.open,s=c.ref(null),l=c.ref(null),u=()=>{s.value=""},d=p=>{s.value=p.target.value},M=p=>{if(o&&o.value){let y=o.value;typeof y=="string"&&(y=new RegExp(y)),p.key.match(y)||p.preventDefault()}},f=p=>{if(o&&o.value){let I=(p.clipboardData||window.clipboardData).getData("Text"),v=o.value;typeof v=="string"&&(v=new RegExp(v)),I.split("").every(h=>!!h.match(v))||p.preventDefault()}n.emit("paste",p,e)};return c.watch(s,p=>{!i.value&&p&&a(),n.emit("search-change",p,e)}),{search:s,input:l,clearSearch:u,handleSearchInput:d,handleKeypress:M,handlePaste:f}}function QA(r,n,t){const{groupSelect:o,mode:e,groups:i,disabledProp:a}=c.toRefs(r),s=c.ref(null),l=d=>{d===void 0||d!==null&&d[a.value]||i.value&&d&&d.group&&(e.value==="single"||!o.value)||(s.value=d)};return{pointer:s,setPointer:l,clearPointer:()=>{l(null)}}}function ta(r,n=!0){return n?String(r).toLowerCase().trim():String(r).normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().trim()}function UA(r){return Object.prototype.toString.call(r)==="[object Object]"}function YA(r,n){const t=n.slice().sort();return r.length===n.length&&r.slice().sort().every(function(o,e){return o===t[e]})}function BA(r,n,t){const{options:o,mode:e,trackBy:i,limit:a,hideSelected:s,createTag:l,createOption:u,label:d,appendNewTag:M,appendNewOption:f,multipleLabel:p,object:y,loading:I,delay:v,resolveOnLoad:h,minChars:N,filterResults:D,clearOnSearch:m,clearOnSelect:j,valueProp:T,canDeselect:L,max:k,strict:z,closeOnSelect:O,groups:b,reverse:g,infinite:x,groupOptions:A,groupHideEmpty:w,groupSelect:C,onCreate:E,disabledProp:S,searchStart:_}=c.toRefs(r),Y=c.getCurrentInstance().proxy,U=t.iv,Q=t.ev,B=t.search,V=t.clearSearch,P=t.update,R=t.pointer,W=t.clearPointer,G=t.focus,F=t.deactivate,X=t.close,ie=c.ref([]),ee=c.ref([]),ae=c.ref(!1),fe=c.ref(null),Z=c.ref(x.value&&a.value===-1?10:a.value),q=c.computed(()=>l.value||u.value||!1),ce=c.computed(()=>M.value!==void 0?M.value:f.value!==void 0?f.value:!0),ue=c.computed(()=>{if(b.value){let $=ee.value||[],se=[];return $.forEach(Ie=>{Nt(Ie[A.value]).forEach(ne=>{se.push(Object.assign({},ne,Ie[S.value]?{[S.value]:!0}:{}))})}),se}else{let $=Nt(ee.value||[]);return ie.value.length&&($=$.concat(ie.value)),$}}),Ne=c.computed(()=>b.value?De((ee.value||[]).map(($,se)=>{const Ie=Nt($[A.value]);return{...$,index:se,group:!0,[A.value]:Bt(Ie,!1).map(ne=>Object.assign({},ne,$[S.value]?{[S.value]:!0}:{})),__VISIBLE__:Bt(Ie).map(ne=>Object.assign({},ne,$[S.value]?{[S.value]:!0}:{}))}})):[]),Se=c.computed(()=>{let $=ue.value;return g.value&&($=$.reverse()),te.value.length&&($=te.value.concat($)),Bt($)}),be=c.computed(()=>{let $=Se.value;return Z.value>0&&($=$.slice(0,Z.value)),$}),H=c.computed(()=>{switch(e.value){case"single":return!$t(U.value[T.value]);case"multiple":case"tags":return!$t(U.value)&&U.value.length>0}}),K=c.computed(()=>p!==void 0&&p.value!==void 0?p.value(U.value,Y):U.value&&U.value.length>1?`${U.value.length} options selected`:"1 option selected"),re=c.computed(()=>!ue.value.length&&!ae.value&&!te.value.length),le=c.computed(()=>ue.value.length>0&&be.value.length==0&&(B.value&&b.value||!b.value)),te=c.computed(()=>q.value===!1||!B.value?[]:pe(B.value)!==-1?[]:[{[T.value]:B.value,[d.value]:B.value,[oe.value]:B.value,__CREATE__:!0}]),oe=c.computed(()=>i.value||d.value),me=c.computed(()=>{switch(e.value){case"single":return null;case"multiple":case"tags":return[]}}),Qe=c.computed(()=>I.value||ae.value),Oe=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":P($);break;case"multiple":case"tags":P(U.value.concat($));break}n.emit("select",it($),$,Y)},tt=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":Ut();break;case"tags":case"multiple":P(Array.isArray($)?U.value.filter(se=>$.map(Ie=>Ie[T.value]).indexOf(se[T.value])===-1):U.value.filter(se=>se[T.value]!=$[T.value]));break}n.emit("deselect",it($),$,Y)},it=$=>y.value?$:$[T.value],Jt=$=>{tt($)},ln=($,se)=>{if(se.button!==0){se.preventDefault();return}Jt($)},Ut=()=>{n.emit("clear",Y),P(me.value)},gt=$=>{if($.group!==void 0)return e.value==="single"?!1:Ue($[A.value])&&$[A.value].length;switch(e.value){case"single":return!$t(U.value)&&U.value[T.value]==$[T.value];case"tags":case"multiple":return!$t(U.value)&&U.value.map(se=>se[T.value]).indexOf($[T.value])!==-1}},ut=$=>$[S.value]===!0,Xt=()=>k===void 0||k.value===-1||!H.value&&k.value>0?!1:U.value.length>=k.value,Tt=$=>{if(!ut($)){if(E&&E.value&&!gt($)&&$.__CREATE__&&($={...$},delete $.__CREATE__,$=E.value($,Y),$ instanceof Promise)){ae.value=!0,$.then(se=>{ae.value=!1,bn(se)});return}bn($)}},bn=$=>{switch($.__CREATE__&&($={...$},delete $.__CREATE__),e.value){case"single":if($&&gt($)){L.value&&tt($);return}$&&At($),j.value&&V(),O.value&&(W(),X()),$&&Oe($);break;case"multiple":if($&&gt($)){tt($);return}if(Xt())return;$&&(At($),Oe($)),j.value&&V(),s.value&&W(),O.value&&X();break;case"tags":if($&&gt($)){tt($);return}if(Xt())return;$&&At($),j.value&&V(),$&&Oe($),s.value&&W(),O.value&&X();break}O.value||G()},Vn=$=>{if(!(ut($)||e.value==="single"||!C.value)){switch(e.value){case"multiple":case"tags":Yt($[A.value])?tt($[A.value]):Oe($[A.value].filter(se=>U.value.map(Ie=>Ie[T.value]).indexOf(se[T.value])===-1).filter(se=>!se[S.value]).filter((se,Ie)=>U.value.length+1+Ie<=k.value||k.value===-1));break}O.value&&F()}},At=$=>{J($[T.value])===void 0&&q.value&&(n.emit("tag",$[T.value],Y),n.emit("option",$[T.value],Y),ce.value&&je($),V())},Tn=()=>{e.value!=="single"&&Oe(be.value)},Yt=$=>$.find(se=>!gt(se)&&!se[S.value])===void 0,Ue=$=>$.find(se=>!gt(se))===void 0,J=$=>ue.value[ue.value.map(se=>String(se[T.value])).indexOf(String($))],pe=($,se=!0)=>ue.value.map(Ie=>parseInt(Ie[oe.value])==Ie[oe.value]?parseInt(Ie[oe.value]):Ie[oe.value]).indexOf(parseInt($)==$?parseInt($):$),ge=$=>["tags","multiple"].indexOf(e.value)!==-1&&s.value&&gt($),je=$=>{ie.value.push($)},De=$=>w.value?$.filter(se=>B.value?se.__VISIBLE__.length:se[A.value].length):$.filter(se=>B.value?se.__VISIBLE__.length:!0),Bt=($,se=!0)=>{let Ie=$;return B.value&&D.value&&(Ie=Ie.filter(ne=>_.value?ta(ne[oe.value],z.value).startsWith(ta(B.value,z.value)):ta(ne[oe.value],z.value).indexOf(ta(B.value,z.value))!==-1)),s.value&&se&&(Ie=Ie.filter(ne=>!ge(ne))),Ie},Nt=$=>{let se=$;return UA(se)&&(se=Object.keys(se).map(Ie=>{let ne=se[Ie];return{[T.value]:Ie,[oe.value]:ne,[d.value]:ne}})),se=se.map(Ie=>typeof Ie=="object"?Ie:{[T.value]:Ie,[oe.value]:Ie,[d.value]:Ie}),se},Kt=()=>{$t(Q.value)||(U.value=cn(Q.value))},qt=$=>(ae.value=!0,new Promise((se,Ie)=>{o.value(B.value,Y).then(ne=>{ee.value=ne||[],typeof $=="function"&&$(ne),ae.value=!1}).catch(ne=>{console.error(ne),ee.value=[],ae.value=!1}).finally(()=>{se()})})),un=()=>{if(!!H.value)if(e.value==="single"){let $=J(U.value[T.value]);if($!==void 0){let se=$[d.value];U.value[d.value]=se,y.value&&(Q.value[d.value]=se)}}else U.value.forEach(($,se)=>{let Ie=J(U.value[se][T.value]);if(Ie!==void 0){let ne=Ie[d.value];U.value[se][d.value]=ne,y.value&&(Q.value[se][d.value]=ne)}})},Zn=$=>{qt($)},cn=$=>$t($)?e.value==="single"?{}:[]:y.value?$:e.value==="single"?J($)||{}:$.filter(se=>!!J(se)).map(se=>J(se)),Cr=()=>{fe.value=c.watch(B,$=>{$.length<N.value||!$&&N.value!==0||(ae.value=!0,m.value&&(ee.value=[]),setTimeout(()=>{$==B.value&&o.value(B.value,Y).then(se=>{($==B.value||!B.value)&&(ee.value=se,R.value=be.value.filter(Ie=>Ie[S.value]!==!0)[0]||null,ae.value=!1)}).catch(se=>{console.error(se)})},v.value))},{flush:"sync"})};if(e.value!=="single"&&!$t(Q.value)&&!Array.isArray(Q.value))throw new Error(`v-model must be an array when using "${e.value}" mode`);return o&&typeof o.value=="function"?h.value?qt(Kt):y.value==!0&&Kt():(ee.value=o.value,Kt()),v.value>-1&&Cr(),c.watch(v,($,se)=>{fe.value&&fe.value(),$>=0&&Cr()}),c.watch(Q,$=>{if($t($)){U.value=cn($);return}switch(e.value){case"single":(y.value?$[T.value]!=U.value[T.value]:$!=U.value[T.value])&&(U.value=cn($));break;case"multiple":case"tags":YA(y.value?$.map(se=>se[T.value]):$,U.value.map(se=>se[T.value]))||(U.value=cn($));break}},{deep:!0}),c.watch(o,($,se)=>{typeof r.options=="function"?h.value&&(!se||$&&$.toString()!==se.toString())&&qt():(ee.value=r.options,Object.keys(U.value).length||Kt(),un())}),c.watch(d,un),{pfo:Se,fo:be,filteredOptions:be,hasSelected:H,multipleLabelText:K,eo:ue,extendedOptions:ue,fg:Ne,filteredGroups:Ne,noOptions:re,noResults:le,resolving:ae,busy:Qe,offset:Z,select:Oe,deselect:tt,remove:Jt,selectAll:Tn,clear:Ut,isSelected:gt,isDisabled:ut,isMax:Xt,getOption:J,handleOptionClick:Tt,handleGroupClick:Vn,handleTagRemove:ln,refreshOptions:Zn,resolveOptions:qt,refreshLabels:un}}function PA(r,n,t){const{valueProp:o,showOptions:e,searchable:i,groupLabel:a,groups:s,mode:l,groupSelect:u,disabledProp:d}=c.toRefs(r),M=t.fo,f=t.fg,p=t.handleOptionClick,y=t.handleGroupClick,I=t.search,v=t.pointer,h=t.setPointer,N=t.clearPointer,D=t.multiselect,m=t.isOpen,j=c.computed(()=>M.value.filter(P=>!P[d.value])),T=c.computed(()=>f.value.filter(P=>!P[d.value])),L=c.computed(()=>l.value!=="single"&&u.value),k=c.computed(()=>v.value&&v.value.group),z=c.computed(()=>B(v.value)),O=c.computed(()=>{const P=k.value?v.value:B(v.value),R=T.value.map(G=>G[a.value]).indexOf(P[a.value]);let W=T.value[R-1];return W===void 0&&(W=g.value),W}),b=c.computed(()=>{let P=T.value.map(R=>R.label).indexOf(k.value?v.value[a.value]:B(v.value)[a.value])+1;return T.value.length<=P&&(P=0),T.value[P]}),g=c.computed(()=>[...T.value].slice(-1)[0]),x=c.computed(()=>v.value.__VISIBLE__.filter(P=>!P[d.value])[0]),A=c.computed(()=>{const P=z.value.__VISIBLE__.filter(R=>!R[d.value]);return P[P.map(R=>R[o.value]).indexOf(v.value[o.value])-1]}),w=c.computed(()=>{const P=B(v.value).__VISIBLE__.filter(R=>!R[d.value]);return P[P.map(R=>R[o.value]).indexOf(v.value[o.value])+1]}),C=c.computed(()=>[...O.value.__VISIBLE__.filter(P=>!P[d.value])].slice(-1)[0]),E=c.computed(()=>[...g.value.__VISIBLE__.filter(P=>!P[d.value])].slice(-1)[0]),S=P=>!!v.value&&(!P.group&&v.value[o.value]==P[o.value]||P.group!==void 0&&v.value[a.value]==P[a.value])?!0:void 0,_=()=>{h(j.value[0]||null)},Y=()=>{!v.value||v.value[d.value]===!0||(k.value?y(v.value):p(v.value))},U=()=>{if(v.value===null)h((s.value&&L.value?T.value[0]:j.value[0])||null);else if(s.value&&L.value){let P=k.value?x.value:w.value;P===void 0&&(P=b.value),h(P||null)}else{let P=j.value.map(R=>R[o.value]).indexOf(v.value[o.value])+1;j.value.length<=P&&(P=0),h(j.value[P]||null)}c.nextTick(()=>{V()})},Q=()=>{if(v.value===null){let P=j.value[j.value.length-1];s.value&&L.value&&(P=E.value,P===void 0&&(P=g.value)),h(P||null)}else if(s.value&&L.value){let P=k.value?C.value:A.value;P===void 0&&(P=k.value?O.value:z.value),h(P||null)}else{let P=j.value.map(R=>R[o.value]).indexOf(v.value[o.value])-1;P<0&&(P=j.value.length-1),h(j.value[P]||null)}c.nextTick(()=>{V()})},B=P=>T.value.find(R=>R.__VISIBLE__.map(W=>W[o.value]).indexOf(P[o.value])!==-1),V=()=>{let P=D.value.querySelector("[data-pointed]");if(!P)return;let R=P.parentElement.parentElement;s.value&&(R=k.value?P.parentElement.parentElement.parentElement:P.parentElement.parentElement.parentElement.parentElement),P.offsetTop+P.offsetHeight>R.clientHeight+R.scrollTop&&(R.scrollTop=P.offsetTop+P.offsetHeight-R.clientHeight),P.offsetTop<R.scrollTop&&(R.scrollTop=P.offsetTop)};return c.watch(I,P=>{i.value&&(P.length&&e.value?_():N())}),c.watch(m,P=>{if(P){let R=D.value.querySelectorAll("[data-selected]")[0];if(!R)return;let W=R.parentElement.parentElement;c.nextTick(()=>{W.scrollTop>0||(W.scrollTop=R.offsetTop)})}}),{pointer:v,canPointGroups:L,isPointed:S,setPointerFirst:_,selectPointer:Y,forwardPointer:U,backwardPointer:Q}}function RA(r,n,t){const{disabled:o}=c.toRefs(r),e=c.getCurrentInstance().proxy,i=c.ref(!1);return{isOpen:i,open:()=>{i.value||o.value||(i.value=!0,n.emit("open",e))},close:()=>{!i.value||(i.value=!1,n.emit("close",e))}}}function VA(r,n,t){const{searchable:o,disabled:e}=c.toRefs(r),i=t.input,a=t.open,s=t.close,l=t.clearSearch,u=t.isOpen,d=c.ref(null),M=c.ref(null),f=c.ref(null),p=c.ref(!1),y=c.ref(!1),I=c.computed(()=>o.value||e.value?-1:0),v=()=>{o.value&&i.value.blur(),M.value.blur()},h=()=>{o.value&&!e.value&&i.value.focus()},N=(k=!0)=>{e.value||(p.value=!0,k&&a())},D=()=>{p.value=!1,setTimeout(()=>{p.value||(s(),l())},1)};return{multiselect:d,wrapper:M,tags:f,tabindex:I,isActive:p,mouseClicked:y,blur:v,focus:h,activate:N,deactivate:D,handleFocusIn:k=>{k.target.closest("[data-tags]")||k.target.closest("[data-clear]")||N(y.value)},handleFocusOut:()=>{D()},handleCaretClick:()=>{D(),v()},handleMousedown:k=>{y.value=!0,u.value&&(k.target.isEqualNode(M.value)||k.target.isEqualNode(f.value))?setTimeout(()=>{D()},0):document.activeElement.isEqualNode(M.value)&&!u.value&&(console.log(k.target.closest("[data-tags]")),N()),setTimeout(()=>{y.value=!1},0)}}}function ZA(r,n,t){const{mode:o,addTagOn:e,openDirection:i,searchable:a,showOptions:s,valueProp:l,groups:u,addOptionOn:d,createTag:M,createOption:f,reverse:p}=c.toRefs(r),y=c.getCurrentInstance().proxy,I=t.iv,v=t.update,h=t.search,N=t.setPointer,D=t.selectPointer,m=t.backwardPointer,j=t.forwardPointer,T=t.multiselect,L=t.wrapper,k=t.tags,z=t.isOpen,O=t.open,b=t.blur,g=t.fo,x=c.computed(()=>M.value||f.value||!1),A=c.computed(()=>e.value!==void 0?e.value:d.value!==void 0?d.value:["enter"]),w=()=>{o.value==="tags"&&!s.value&&x.value&&a.value&&!u.value&&N(g.value[g.value.map(S=>S[l.value]).indexOf(h.value)])};return{handleKeydown:S=>{n.emit("keydown",S,y);let _,Y;switch(["ArrowLeft","ArrowRight","Enter"].indexOf(S.key)!==-1&&o.value==="tags"&&(_=[...T.value.querySelectorAll("[data-tags] > *")].filter(U=>U!==k.value),Y=_.findIndex(U=>U===document.activeElement)),S.key){case"Backspace":if(o.value==="single"||a.value&&[null,""].indexOf(h.value)===-1||I.value.length===0)return;v([...I.value].slice(0,-1));break;case"Enter":if(S.preventDefault(),S.keyCode===229)return;if(Y!==-1&&Y!==void 0){v([...I.value].filter((U,Q)=>Q!==Y)),Y===_.length-1&&(_.length-1?_[_.length-2].focus():a.value?k.value.querySelector("input").focus():L.value.focus());return}if(A.value.indexOf("enter")===-1&&x.value)return;w(),D();break;case" ":if(!x.value&&!a.value){S.preventDefault(),w(),D();return}if(!x.value)return!1;if(A.value.indexOf("space")===-1&&x.value)return;S.preventDefault(),w(),D();break;case"Tab":case";":case",":if(A.value.indexOf(S.key.toLowerCase())===-1||!x.value)return;w(),D(),S.preventDefault();break;case"Escape":b();break;case"ArrowUp":if(S.preventDefault(),!s.value)return;z.value||O(),m();break;case"ArrowDown":if(S.preventDefault(),!s.value)return;z.value||O(),j();break;case"ArrowLeft":if(a.value&&k.value&&k.value.querySelector("input").selectionStart||S.shiftKey||o.value!=="tags"||!I.value||!I.value.length)return;S.preventDefault(),Y===-1?_[_.length-1].focus():Y>0&&_[Y-1].focus();break;case"ArrowRight":if(Y===-1||S.shiftKey||o.value!=="tags"||!I.value||!I.value.length)return;S.preventDefault(),_.length>Y+1?_[Y+1].focus():a.value?k.value.querySelector("input").focus():a.value||L.value.focus();break}},handleKeyup:S=>{n.emit("keyup",S,y)},preparePointer:w}}function WA(r,n,t){const{classes:o,disabled:e,openDirection:i,showOptions:a}=c.toRefs(r),s=t.isOpen,l=t.isPointed,u=t.isSelected,d=t.isDisabled,M=t.isActive,f=t.canPointGroups,p=t.resolving,y=t.fo,I=c.computed(()=>({container:"multiselect",containerDisabled:"is-disabled",containerOpen:"is-open",containerOpenTop:"is-open-top",containerActive:"is-active",wrapper:"multiselect-wrapper",singleLabel:"multiselect-single-label",singleLabelText:"multiselect-single-label-text",multipleLabel:"multiselect-multiple-label",search:"multiselect-search",tags:"multiselect-tags",tag:"multiselect-tag",tagDisabled:"is-disabled",tagRemove:"multiselect-tag-remove",tagRemoveIcon:"multiselect-tag-remove-icon",tagsSearchWrapper:"multiselect-tags-search-wrapper",tagsSearch:"multiselect-tags-search",tagsSearchCopy:"multiselect-tags-search-copy",placeholder:"multiselect-placeholder",caret:"multiselect-caret",caretOpen:"is-open",clear:"multiselect-clear",clearIcon:"multiselect-clear-icon",spinner:"multiselect-spinner",inifinite:"multiselect-inifite",inifiniteSpinner:"multiselect-inifite-spinner",dropdown:"multiselect-dropdown",dropdownTop:"is-top",dropdownHidden:"is-hidden",options:"multiselect-options",optionsTop:"is-top",group:"multiselect-group",groupLabel:"multiselect-group-label",groupLabelPointable:"is-pointable",groupLabelPointed:"is-pointed",groupLabelSelected:"is-selected",groupLabelDisabled:"is-disabled",groupLabelSelectedPointed:"is-selected is-pointed",groupLabelSelectedDisabled:"is-selected is-disabled",groupOptions:"multiselect-group-options",option:"multiselect-option",optionPointed:"is-pointed",optionSelected:"is-selected",optionDisabled:"is-disabled",optionSelectedPointed:"is-selected is-pointed",optionSelectedDisabled:"is-selected is-disabled",noOptions:"multiselect-no-options",noResults:"multiselect-no-results",fakeInput:"multiselect-fake-input",assist:"multiselect-assistive-text",spacer:"multiselect-spacer",...o.value})),v=c.computed(()=>!!(s.value&&a.value&&(!p.value||p.value&&y.value.length)));return{classList:c.computed(()=>{const N=I.value;return{container:[N.container].concat(e.value?N.containerDisabled:[]).concat(v.value&&i.value==="top"?N.containerOpenTop:[]).concat(v.value&&i.value!=="top"?N.containerOpen:[]).concat(M.value?N.containerActive:[]),wrapper:N.wrapper,spacer:N.spacer,singleLabel:N.singleLabel,singleLabelText:N.singleLabelText,multipleLabel:N.multipleLabel,search:N.search,tags:N.tags,tag:[N.tag].concat(e.value?N.tagDisabled:[]),tagRemove:N.tagRemove,tagRemoveIcon:N.tagRemoveIcon,tagsSearchWrapper:N.tagsSearchWrapper,tagsSearch:N.tagsSearch,tagsSearchCopy:N.tagsSearchCopy,placeholder:N.placeholder,caret:[N.caret].concat(s.value?N.caretOpen:[]),clear:N.clear,clearIcon:N.clearIcon,spinner:N.spinner,inifinite:N.inifinite,inifiniteSpinner:N.inifiniteSpinner,dropdown:[N.dropdown].concat(i.value==="top"?N.dropdownTop:[]).concat(!s.value||!a.value||!v.value?N.dropdownHidden:[]),options:[N.options].concat(i.value==="top"?N.optionsTop:[]),group:N.group,groupLabel:D=>{let m=[N.groupLabel];return l(D)?m.push(u(D)?N.groupLabelSelectedPointed:N.groupLabelPointed):u(D)&&f.value?m.push(d(D)?N.groupLabelSelectedDisabled:N.groupLabelSelected):d(D)&&m.push(N.groupLabelDisabled),f.value&&m.push(N.groupLabelPointable),m},groupOptions:N.groupOptions,option:(D,m)=>{let j=[N.option];return l(D)?j.push(u(D)?N.optionSelectedPointed:N.optionPointed):u(D)?j.push(d(D)?N.optionSelectedDisabled:N.optionSelected):(d(D)||m&&d(m))&&j.push(N.optionDisabled),j},noOptions:N.noOptions,noResults:N.noResults,assist:N.assist,fakeInput:N.fakeInput}}),showDropdown:v}}function GA(r,n,t){const{limit:o,infinite:e}=c.toRefs(r),i=t.isOpen,a=t.offset,s=t.search,l=t.pfo,u=t.eo,d=c.ref(null),M=c.ref(null),f=c.computed(()=>a.value<l.value.length),p=I=>{const{isIntersecting:v,target:h}=I[0];if(v){const N=h.offsetParent,D=N.scrollTop;a.value+=o.value==-1?10:o.value,c.nextTick(()=>{N.scrollTop=D})}},y=()=>{i.value&&a.value<l.value.length?d.value.observe(M.value):!i.value&&d.value&&d.value.disconnect()};return c.watch(i,()=>{!e.value||y()}),c.watch(s,()=>{!e.value||(a.value=o.value,y())},{flush:"post"}),c.watch(u,()=>{!e.value||y()},{immediate:!1,flush:"post"}),c.onMounted(()=>{window&&window.IntersectionObserver&&(d.value=new IntersectionObserver(p))}),{hasMore:f,infiniteLoader:M}}function HA(r,n,t){const{placeholder:o,id:e,valueProp:i,label:a,mode:s,groupLabel:l,aria:u,searchable:d}=c.toRefs(r),M=t.pointer,f=t.iv,p=t.hasSelected,y=t.multipleLabelText,I=c.ref(null),v=c.computed(()=>{let g=[];return e&&e.value&&g.push(e.value),g.push("assist"),g.join("-")}),h=c.computed(()=>{let g=[];return e&&e.value&&g.push(e.value),g.push("multiselect-options"),g.join("-")}),N=c.computed(()=>{let g=[];if(e&&e.value&&g.push(e.value),M.value)return g.push(M.value.group?"multiselect-group":"multiselect-option"),g.push(M.value.group?M.value.index:M.value[i.value]),g.join("-")}),D=c.computed(()=>o.value),m=c.computed(()=>s.value!=="single"),j=c.computed(()=>{let g="";return s.value==="single"&&p.value&&(g+=f.value[a.value]),s.value==="multiple"&&p.value&&(g+=y.value),s.value==="tags"&&p.value&&(g+=f.value.map(x=>x[a.value]).join(", ")),g}),T=c.computed(()=>{let g={...u.value};return d.value&&(g["aria-labelledby"]=g["aria-labelledby"]?`${v.value} ${g["aria-labelledby"]}`:v.value,j.value&&g["aria-label"]&&(g["aria-label"]=`${j.value}, ${g["aria-label"]}`)),g}),L=g=>{let x=[];return e&&e.value&&x.push(e.value),x.push("multiselect-option"),x.push(g[i.value]),x.join("-")},k=g=>{let x=[];return e&&e.value&&x.push(e.value),x.push("multiselect-group"),x.push(g.index),x.join("-")},z=g=>{let x=[];return x.push(g[a.value]),x.join(" ")},O=g=>{let x=[];return x.push(g[l.value]),x.join(" ")},b=g=>`${g} \u274E`;return c.onMounted(()=>{if(e&&e.value&&document&&document.querySelector){let g=document.querySelector(`[for="${e.value}"]`);I.value=g?g.innerText:null}}),{arias:T,ariaLabel:j,ariaAssist:v,ariaControls:h,ariaPlaceholder:D,ariaMultiselectable:m,ariaActiveDescendant:N,ariaOptionId:L,ariaOptionLabel:z,ariaGroupId:k,ariaGroupLabel:O,ariaTagLabel:b}}function FA(r,n,t,o={}){return t.forEach(e=>{e&&(o={...o,...e(r,n,o)})}),o}var Vl={name:"Multiselect",emits:["paste","open","close","select","deselect","input","search-change","tag","option","update:modelValue","change","clear","keydown","keyup"],props:{value:{required:!1},modelValue:{required:!1},options:{type:[Array,Object,Function],required:!1,default:()=>[]},id:{type:[String,Number],required:!1},name:{type:[String,Number],required:!1,default:"multiselect"},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:"label"},trackBy:{type:String,required:!1,default:void 0},valueProp:{type:String,required:!1,default:"value"},placeholder:{type:String,required:!1,default:null},mode:{type:String,required:!1,default:"single"},searchable:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:-1},hideSelected:{type:Boolean,required:!1,default:!0},createTag:{type:Boolean,required:!1,default:void 0},createOption:{type:Boolean,required:!1,default:void 0},appendNewTag:{type:Boolean,required:!1,default:void 0},appendNewOption:{type:Boolean,required:!1,default:void 0},addTagOn:{type:Array,required:!1,default:void 0},addOptionOn:{type:Array,required:!1,default:void 0},caret:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},noOptionsText:{type:String,required:!1,default:"The list is empty"},noResultsText:{type:String,required:!1,default:"No results found"},multipleLabel:{type:Function,required:!1},object:{type:Boolean,required:!1,default:!1},delay:{type:Number,required:!1,default:-1},minChars:{type:Number,required:!1,default:0},resolveOnLoad:{type:Boolean,required:!1,default:!0},filterResults:{type:Boolean,required:!1,default:!0},clearOnSearch:{type:Boolean,required:!1,default:!1},clearOnSelect:{type:Boolean,required:!1,default:!0},canDeselect:{type:Boolean,required:!1,default:!0},canClear:{type:Boolean,required:!1,default:!0},max:{type:Number,required:!1,default:-1},showOptions:{type:Boolean,required:!1,default:!0},required:{type:Boolean,required:!1,default:!1},openDirection:{type:String,required:!1,default:"bottom"},nativeSupport:{type:Boolean,required:!1,default:!1},classes:{type:Object,required:!1,default:()=>({})},strict:{type:Boolean,required:!1,default:!0},closeOnSelect:{type:Boolean,required:!1,default:!0},autocomplete:{type:String,required:!1},groups:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:"label"},groupOptions:{type:String,required:!1,default:"options"},groupHideEmpty:{type:Boolean,required:!1,default:!1},groupSelect:{type:Boolean,required:!1,default:!0},inputType:{type:String,required:!1,default:"text"},attrs:{required:!1,type:Object,default:()=>({})},onCreate:{required:!1,type:Function},disabledProp:{type:String,required:!1,default:"disabled"},searchStart:{type:Boolean,required:!1,default:!1},reverse:{type:Boolean,required:!1,default:!1},regex:{type:[Object,String,RegExp],required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},infinite:{type:Boolean,required:!1,default:!1},aria:{required:!1,type:Object,default:()=>({})}},setup(r,n){return FA(r,n,[EA,QA,RA,_A,CA,VA,BA,GA,PA,ZA,WA,HA])}};const $A=["id","dir"],JA=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],XA=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],KA=["onKeyup","aria-label"],qA=["onClick"],ek=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],tk=["innerHTML"],nk=["id"],rk=["id","aria-label","aria-selected"],ok=["data-pointed","onMouseenter","onClick"],ik=["innerHTML"],ak=["aria-label"],sk=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],lk=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],uk=["innerHTML"],ck=["innerHTML"],dk=["value"],Mk=["name","value"],fk=["name","value"],gk=["id"];function hk(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{ref:"multiselect",class:c.normalizeClass(r.classList.container),id:t.searchable?void 0:t.id,dir:t.rtl?"rtl":void 0,onFocusin:n[10]||(n[10]=(...a)=>r.handleFocusIn&&r.handleFocusIn(...a)),onFocusout:n[11]||(n[11]=(...a)=>r.handleFocusOut&&r.handleFocusOut(...a)),onKeyup:n[12]||(n[12]=(...a)=>r.handleKeyup&&r.handleKeyup(...a)),onKeydown:n[13]||(n[13]=(...a)=>r.handleKeydown&&r.handleKeydown(...a))},[c.createElementVNode("div",c.mergeProps({class:r.classList.wrapper,onMousedown:n[9]||(n[9]=(...a)=>r.handleMousedown&&r.handleMousedown(...a)),ref:"wrapper",tabindex:r.tabindex,"aria-controls":t.searchable?void 0:r.ariaControls,"aria-placeholder":t.searchable?void 0:r.ariaPlaceholder,"aria-expanded":t.searchable?void 0:r.isOpen,"aria-activedescendant":t.searchable?void 0:r.ariaActiveDescendant,"aria-multiselectable":t.searchable?void 0:r.ariaMultiselectable,role:t.searchable?void 0:"combobox"},t.searchable?{}:r.arias),[c.createCommentVNode(" Search "),t.mode!=="tags"&&t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:r.search,value:r.search,class:r.classList.search,autocomplete:t.autocomplete,id:t.searchable?t.id:void 0,onInput:n[0]||(n[0]=(...a)=>r.handleSearchInput&&r.handleSearchInput(...a)),onKeypress:n[1]||(n[1]=(...a)=>r.handleKeypress&&r.handleKeypress(...a)),onPaste:n[2]||(n[2]=c.withModifiers((...a)=>r.handlePaste&&r.handlePaste(...a),["stop"])),ref:"input","aria-controls":r.ariaControls,"aria-placeholder":r.ariaPlaceholder,"aria-expanded":r.isOpen,"aria-activedescendant":r.ariaActiveDescendant,"aria-multiselectable":r.ariaMultiselectable,role:"combobox"},{...t.attrs,...r.arias}),null,16,XA)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Tags (with search) "),t.mode=="tags"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(r.classList.tags),"data-tags":""},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.iv,(a,s,l)=>c.renderSlot(r.$slots,"tag",{option:a,handleTagRemove:r.handleTagRemove,disabled:t.disabled},()=>[(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(r.classList.tag),tabindex:"-1",onKeyup:c.withKeys(u=>r.handleTagRemove(a,u),["enter"]),key:l,"aria-label":r.ariaTagLabel(a[t.label])},[c.createTextVNode(c.toDisplayString(a[t.label])+" ",1),t.disabled?c.createCommentVNode("v-if",!0):(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(r.classList.tagRemove),onClick:u=>r.handleTagRemove(a,u)},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.tagRemoveIcon)},null,2)],10,qA))],42,KA))])),256)),c.createElementVNode("div",{class:c.normalizeClass(r.classList.tagsSearchWrapper),ref:"tags"},[c.createCommentVNode(" Used for measuring search width "),c.createElementVNode("span",{class:c.normalizeClass(r.classList.tagsSearchCopy)},c.toDisplayString(r.search),3),c.createCommentVNode(" Actual search input "),t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:r.search,value:r.search,class:r.classList.tagsSearch,id:t.searchable?t.id:void 0,autocomplete:t.autocomplete,onInput:n[3]||(n[3]=(...a)=>r.handleSearchInput&&r.handleSearchInput(...a)),onKeypress:n[4]||(n[4]=(...a)=>r.handleKeypress&&r.handleKeypress(...a)),onPaste:n[5]||(n[5]=c.withModifiers((...a)=>r.handlePaste&&r.handlePaste(...a),["stop"])),ref:"input","aria-controls":r.ariaControls,"aria-placeholder":r.ariaPlaceholder,"aria-expanded":r.isOpen,"aria-activedescendant":r.ariaActiveDescendant,"aria-multiselectable":r.ariaMultiselectable,role:"combobox"},{...t.attrs,...r.arias}),null,16,ek)):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Single label "),t.mode=="single"&&r.hasSelected&&!r.search&&r.iv?c.renderSlot(r.$slots,"singlelabel",{key:2,value:r.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.singleLabel)},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.singleLabelText)},c.toDisplayString(r.iv[t.label]),3)],2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Multiple label "),t.mode=="multiple"&&r.hasSelected&&!r.search?c.renderSlot(r.$slots,"multiplelabel",{key:3,values:r.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.multipleLabel),innerHTML:r.multipleLabelText},null,10,tk)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Placeholder "),t.placeholder&&!r.hasSelected&&!r.search?c.renderSlot(r.$slots,"placeholder",{key:4},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.placeholder),"aria-hidden":"true"},c.toDisplayString(t.placeholder),3)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Spinner "),t.loading||r.resolving?c.renderSlot(r.$slots,"spinner",{key:5},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.spinner),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Clear "),r.hasSelected&&!t.disabled&&t.canClear&&!r.busy?c.renderSlot(r.$slots,"clear",{key:6,clear:r.clear},()=>[c.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"\u274E",class:c.normalizeClass(r.classList.clear),onClick:n[6]||(n[6]=(...a)=>r.clear&&r.clear(...a)),onKeyup:n[7]||(n[7]=c.withKeys((...a)=>r.clear&&r.clear(...a),["enter"]))},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.clearIcon)},null,2)],34)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Caret "),t.caret&&t.showOptions?c.renderSlot(r.$slots,"caret",{key:7},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.caret),onClick:n[8]||(n[8]=(...a)=>r.handleCaretClick&&r.handleCaretClick(...a)),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0)],16,JA),c.createCommentVNode(" Options "),c.createElementVNode("div",{class:c.normalizeClass(r.classList.dropdown),tabindex:"-1"},[c.renderSlot(r.$slots,"beforelist",{options:r.fo}),c.createElementVNode("ul",{class:c.normalizeClass(r.classList.options),id:r.ariaControls,role:"listbox"},[t.groups?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(r.fg,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.group),key:l,id:r.ariaGroupId(a),"aria-label":r.ariaGroupLabel(a),"aria-selected":r.isSelected(a),role:"option"},[c.createElementVNode("div",{class:c.normalizeClass(r.classList.groupLabel(a)),"data-pointed":r.isPointed(a),onMouseenter:u=>r.setPointer(a,s),onClick:u=>r.handleGroupClick(a)},[c.renderSlot(r.$slots,"grouplabel",{group:a,isSelected:r.isSelected,isPointed:r.isPointed},()=>[c.createElementVNode("span",{innerHTML:a[t.groupLabel]},null,8,ik)])],42,ok),c.createElementVNode("ul",{class:c.normalizeClass(r.classList.groupOptions),"aria-label":r.ariaGroupLabel(a),role:"group"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.__VISIBLE__,(u,d,M)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.option(u,a)),"data-pointed":r.isPointed(u),"data-selected":r.isSelected(u)||void 0,key:M,onMouseenter:f=>r.setPointer(u),onClick:f=>r.handleOptionClick(u),id:r.ariaOptionId(u),"aria-selected":r.isSelected(u),"aria-label":r.ariaOptionLabel(u),role:"option"},[c.renderSlot(r.$slots,"option",{option:u,isSelected:r.isSelected,isPointed:r.isPointed,search:r.search},()=>[c.createElementVNode("span",null,c.toDisplayString(u[t.label]),1)])],42,sk))),128))],10,ak)],10,rk))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(r.fo,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.option(a)),"data-pointed":r.isPointed(a),"data-selected":r.isSelected(a)||void 0,key:l,onMouseenter:u=>r.setPointer(a),onClick:u=>r.handleOptionClick(a),id:r.ariaOptionId(a),"aria-selected":r.isSelected(a),"aria-label":r.ariaOptionLabel(a),role:"option"},[c.renderSlot(r.$slots,"option",{option:a,isSelected:r.isSelected,isPointed:r.isPointed,search:r.search},()=>[c.createElementVNode("span",null,c.toDisplayString(a[t.label]),1)])],42,lk))),128))],10,nk),r.noOptions?c.renderSlot(r.$slots,"nooptions",{key:0},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.noOptions),innerHTML:t.noOptionsText},null,10,uk)]):c.createCommentVNode("v-if",!0),r.noResults?c.renderSlot(r.$slots,"noresults",{key:1},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.noResults),innerHTML:t.noResultsText},null,10,ck)]):c.createCommentVNode("v-if",!0),t.infinite&&r.hasMore?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(r.classList.inifinite),ref:"infiniteLoader"},[c.renderSlot(r.$slots,"infinite",{},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.inifiniteSpinner)},null,2)])],2)):c.createCommentVNode("v-if",!0),c.renderSlot(r.$slots,"afterlist",{options:r.fo})],2),c.createCommentVNode(" Hacky input element to show HTML5 required warning "),t.required?(c.openBlock(),c.createElementBlock("input",{key:0,class:c.normalizeClass(r.classList.fakeInput),tabindex:"-1",value:r.textValue,required:""},null,10,dk)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Native input support "),t.nativeSupport?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[t.mode=="single"?(c.openBlock(),c.createElementBlock("input",{key:0,type:"hidden",name:t.name,value:r.plainValue!==void 0?r.plainValue:""},null,8,Mk)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(r.plainValue,(a,s)=>(c.openBlock(),c.createElementBlock("input",{type:"hidden",name:`${t.name}[]`,value:a,key:s},null,8,fk))),128))],64)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Screen reader assistive text "),t.searchable&&r.hasSelected?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(r.classList.assist),id:r.ariaAssist,"aria-hidden":"true"},c.toDisplayString(r.ariaLabel),11,gk)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Create height for empty input "),c.createElementVNode("div",{class:c.normalizeClass(r.classList.spacer)},null,2)],42,$A)}Vl.render=hk,Vl.__file="src/Multiselect.vue";var Vw="",Zw="";const pk=c.createElementVNode("img",{alt:"",class:"list__item_thumb",src:OA},null,-1),yk={class:"list__item_text"},Nk=c.createElementVNode("div",{id:"list"},null,-1),jk={__name:"InputList",props:{list:{type:Array,required:!0},maxHeight:{type:String,default:"200px"},labelProp:{type:String,default:"label"},idProp:{type:String,default:"value"},selectItems:{type:Array,required:!0}},emits:["update"],setup(r,{emit:n}){const t=r;c.useCssVars(i=>({"1c1e0897":r.maxHeight}));const o=c.ref([]);function e(){n("update",o.value)}return c.watch(()=>t.selectItems,(i,a)=>{if(!i)return;const s=t.list.filter(l=>i.includes(l[t.idProp]));if(JSON.stringify(s)!==JSON.stringify(o.value)&&(o.value=[...o.value,...s],o.value=[...new Set(o.value)]),a.length>i.length){const l=a.filter(u=>!i.includes(u));o.value=o.value.filter(u=>!l.includes(u[t.idProp]))}}),(i,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Vl),{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=s=>o.value=s),label:r.labelProp,mode:"tags",native:!1,object:!0,options:r.list,placeholder:"Start typing a name",searchable:!0,"value-prop":r.idProp,onDeselect:e,onSelect:e},{tag:c.withCtx(({option:s,handleTagRemove:l,disabled:u})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#list"},[c.createElementVNode("div",{class:c.normalizeClass(["list__item",{"is-disabled":u}])},[pk,c.createElementVNode("p",yk,c.toDisplayString(s[r.labelProp]),1),c.createVNode(Te,{class:"list__item_icon","icon-name":"delete",size:24,onClick:d=>l(s,d)},null,8,["onClick"]),c.renderSlot(i.$slots,"default")],2)]))]),_:3},8,["modelValue","label","options","value-prop"]),Nk],64))}},Ik=c.defineComponent({components:{DhIcon:Te},props:{hasCloseButton:{type:Boolean,default:!0},hasSideBar:{type:Boolean,default:!0},hasSideBarButtonBottom:{type:Boolean,default:!0},hasHeader:{type:Boolean,default:!0},hasFooter:{type:Boolean,default:!0},hasFooterButtonRight:{type:Boolean,default:!0},hasBodyScrolling:{type:Boolean,default:!0},sideBarPosition:{type:String,default:"left"},hasCloseConfirmation:{type:Boolean,default:!1},bodyClass:{type:String,default:""},fitContent:{type:Boolean,default:!1}},emits:["close"],mounted(){document.body.classList.add("modal-open")},unmounted(){document.body.classList.remove("modal-open")},methods:{closed(){this.$emit("close",this.hasCloseConfirmation),document.body.classList.remove("modal-open")}}}),mk={class:"modal-content"},Dk={key:0,id:"modal-sidebar",class:"modal-sidebar"},xk={key:0,id:"modalTitle",class:"modal-header"},vk={class:"modal-footer"};function bk(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createBlock(c.Transition,{name:"modal-fade"},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"modal-backdrop",onClick:n[2]||(n[2]=(...s)=>r.closed&&r.closed(...s))},[c.createElementVNode("div",{"aria-describedby":"modalDescription","aria-labelledby":"modalTitle",class:c.normalizeClass(`
19
+ `):r}function ib(r,n){const{element:t,datasetIndex:o,index:e}=n,i=r.getDatasetMeta(o).controller,{label:a,value:s}=i.getLabelAndValue(e);return{chart:r,label:a,parsed:i.getParsed(e),raw:r.data.datasets[o].data[e],formattedValue:s,dataset:i.getDataset(),dataIndex:e,datasetIndex:o,element:t}}function rf(r,n){const t=r.chart.ctx,{body:o,footer:e,title:i}=r,{boxWidth:a,boxHeight:s}=n,l=yt(n.bodyFont),u=yt(n.titleFont),d=yt(n.footerFont),M=i.length,f=e.length,p=o.length,y=bt(n.padding);let I=y.height,v=0,h=o.reduce((m,j)=>m+j.before.length+j.lines.length+j.after.length,0);if(h+=r.beforeBody.length+r.afterBody.length,M&&(I+=M*u.lineHeight+(M-1)*n.titleSpacing+n.titleMarginBottom),h){const m=n.displayColors?Math.max(s,l.lineHeight):l.lineHeight;I+=p*m+(h-p)*l.lineHeight+(h-1)*n.bodySpacing}f&&(I+=n.footerMarginTop+f*d.lineHeight+(f-1)*n.footerSpacing);let N=0;const D=function(m){v=Math.max(v,t.measureText(m).width+N)};return t.save(),t.font=u.string,_e(r.title,D),t.font=l.string,_e(r.beforeBody.concat(r.afterBody),D),N=n.displayColors?a+2+n.boxPadding:0,_e(o,m=>{_e(m.before,D),_e(m.lines,D),_e(m.after,D)}),N=0,t.font=d.string,_e(r.footer,D),t.restore(),v+=y.width,{width:v,height:I}}function ab(r,n){const{y:t,height:o}=n;return t<o/2?"top":t>r.height-o/2?"bottom":"center"}function sb(r,n,t,o){const{x:e,width:i}=o,a=t.caretSize+t.caretPadding;if(r==="left"&&e+i+a>n.width||r==="right"&&e-i-a<0)return!0}function lb(r,n,t,o){const{x:e,width:i}=t,{width:a,chartArea:{left:s,right:l}}=r;let u="center";return o==="center"?u=e<=(s+l)/2?"left":"right":e<=i/2?u="left":e>=a-i/2&&(u="right"),sb(u,r,n,t)&&(u="center"),u}function of(r,n,t){const o=t.yAlign||n.yAlign||ab(r,t);return{xAlign:t.xAlign||n.xAlign||lb(r,n,t,o),yAlign:o}}function ub(r,n){let{x:t,width:o}=r;return n==="right"?t-=o:n==="center"&&(t-=o/2),t}function cb(r,n,t){let{y:o,height:e}=r;return n==="top"?o+=t:n==="bottom"?o-=e+t:o-=e/2,o}function af(r,n,t,o){const{caretSize:e,caretPadding:i,cornerRadius:a}=r,{xAlign:s,yAlign:l}=t,u=e+i,{topLeft:d,topRight:M,bottomLeft:f,bottomRight:p}=qn(a);let y=ub(n,s);const I=cb(n,l,u);return l==="center"?s==="left"?y+=u:s==="right"&&(y-=u):s==="left"?y-=Math.max(d,f)+e:s==="right"&&(y+=Math.max(M,p)+e),{x:lt(y,0,o.width-n.width),y:lt(I,0,o.height-n.height)}}function Gi(r,n,t){const o=bt(t.padding);return n==="center"?r.x+r.width/2:n==="right"?r.x+r.width-o.right:r.x+o.left}function sf(r){return Ft([],sn(r))}function db(r,n,t){return Dn(r,{tooltip:n,tooltipItems:t,type:"tooltip"})}function lf(r,n){const t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?r.override(t):r}class Bl extends an{constructor(n){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=n.chart||n._chart,this._chart=this.chart,this.options=n.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(n){this.options=n,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const n=this._cachedAnimations;if(n)return n;const t=this.chart,o=this.options.setContext(this.getContext()),e=o.enabled&&t.options.animation&&o.animations,i=new fM(this.chart,e);return e._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=db(this.chart.getContext(),this,this._tooltipItems))}getTitle(n,t){const{callbacks:o}=t,e=o.beforeTitle.apply(this,[n]),i=o.title.apply(this,[n]),a=o.afterTitle.apply(this,[n]);let s=[];return s=Ft(s,sn(e)),s=Ft(s,sn(i)),s=Ft(s,sn(a)),s}getBeforeBody(n,t){return sf(t.callbacks.beforeBody.apply(this,[n]))}getBody(n,t){const{callbacks:o}=t,e=[];return _e(n,i=>{const a={before:[],lines:[],after:[]},s=lf(o,i);Ft(a.before,sn(s.beforeLabel.call(this,i))),Ft(a.lines,s.label.call(this,i)),Ft(a.after,sn(s.afterLabel.call(this,i))),e.push(a)}),e}getAfterBody(n,t){return sf(t.callbacks.afterBody.apply(this,[n]))}getFooter(n,t){const{callbacks:o}=t,e=o.beforeFooter.apply(this,[n]),i=o.footer.apply(this,[n]),a=o.afterFooter.apply(this,[n]);let s=[];return s=Ft(s,sn(e)),s=Ft(s,sn(i)),s=Ft(s,sn(a)),s}_createItems(n){const t=this._active,o=this.chart.data,e=[],i=[],a=[];let s=[],l,u;for(l=0,u=t.length;l<u;++l)s.push(ib(this.chart,t[l]));return n.filter&&(s=s.filter((d,M,f)=>n.filter(d,M,f,o))),n.itemSort&&(s=s.sort((d,M)=>n.itemSort(d,M,o))),_e(s,d=>{const M=lf(n.callbacks,d);e.push(M.labelColor.call(this,d)),i.push(M.labelPointStyle.call(this,d)),a.push(M.labelTextColor.call(this,d))}),this.labelColors=e,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=s,s}update(n,t){const o=this.options.setContext(this.getContext()),e=this._active;let i,a=[];if(!e.length)this.opacity!==0&&(i={opacity:0});else{const s=Or[o.position].call(this,e,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const l=this._size=rf(this,o),u=Object.assign({},s,l),d=of(this.chart,o,u),M=af(o,u,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,i={opacity:1,x:M.x,y:M.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),n&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(n,t,o,e){const i=this.getCaretPosition(n,o,e);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(n,t,o){const{xAlign:e,yAlign:i}=this,{caretSize:a,cornerRadius:s}=o,{topLeft:l,topRight:u,bottomLeft:d,bottomRight:M}=qn(s),{x:f,y:p}=n,{width:y,height:I}=t;let v,h,N,D,m,j;return i==="center"?(m=p+I/2,e==="left"?(v=f,h=v-a,D=m+a,j=m-a):(v=f+y,h=v+a,D=m-a,j=m+a),N=v):(e==="left"?h=f+Math.max(l,d)+a:e==="right"?h=f+y-Math.max(u,M)-a:h=this.caretX,i==="top"?(D=p,m=D-a,v=h-a,N=h+a):(D=p+I,m=D+a,v=h+a,N=h-a),j=D),{x1:v,x2:h,x3:N,y1:D,y2:m,y3:j}}drawTitle(n,t,o){const e=this.title,i=e.length;let a,s,l;if(i){const u=jl(o.rtl,this.x,this.width);for(n.x=Gi(this,o.titleAlign,o),t.textAlign=u.textAlign(o.titleAlign),t.textBaseline="middle",a=yt(o.titleFont),s=o.titleSpacing,t.fillStyle=o.titleColor,t.font=a.string,l=0;l<i;++l)t.fillText(e[l],u.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+s,l+1===i&&(n.y+=o.titleMarginBottom-s)}}_drawColorBox(n,t,o,e,i){const a=this.labelColors[o],s=this.labelPointStyles[o],{boxHeight:l,boxWidth:u,boxPadding:d}=i,M=yt(i.bodyFont),f=Gi(this,"left",i),p=e.x(f),y=l<M.lineHeight?(M.lineHeight-l)/2:0,I=t.y+y;if(i.usePointStyle){const v={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},h=e.leftForLtr(p,u)+u/2,N=I+l/2;n.strokeStyle=i.multiKeyBackground,n.fillStyle=i.multiKeyBackground,Ml(n,v,h,N),n.strokeStyle=a.borderColor,n.fillStyle=a.backgroundColor,Ml(n,v,h,N)}else{n.lineWidth=ke(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,n.strokeStyle=a.borderColor,n.setLineDash(a.borderDash||[]),n.lineDashOffset=a.borderDashOffset||0;const v=e.leftForLtr(p,u-d),h=e.leftForLtr(e.xPlus(p,1),u-d-2),N=qn(a.borderRadius);Object.values(N).some(D=>D!==0)?(n.beginPath(),n.fillStyle=i.multiKeyBackground,wi(n,{x:v,y:I,w:u,h:l,radius:N}),n.fill(),n.stroke(),n.fillStyle=a.backgroundColor,n.beginPath(),wi(n,{x:h,y:I+1,w:u-2,h:l-2,radius:N}),n.fill()):(n.fillStyle=i.multiKeyBackground,n.fillRect(v,I,u,l),n.strokeRect(v,I,u,l),n.fillStyle=a.backgroundColor,n.fillRect(h,I+1,u-2,l-2))}n.fillStyle=this.labelTextColors[o]}drawBody(n,t,o){const{body:e}=this,{bodySpacing:i,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:d}=o,M=yt(o.bodyFont);let f=M.lineHeight,p=0;const y=jl(o.rtl,this.x,this.width),I=function(k){t.fillText(k,y.x(n.x+p),n.y+f/2),n.y+=f+i},v=y.textAlign(a);let h,N,D,m,j,T,L;for(t.textAlign=a,t.textBaseline="middle",t.font=M.string,n.x=Gi(this,v,o),t.fillStyle=o.bodyColor,_e(this.beforeBody,I),p=s&&v!=="right"?a==="center"?u/2+d:u+2+d:0,m=0,T=e.length;m<T;++m){for(h=e[m],N=this.labelTextColors[m],t.fillStyle=N,_e(h.before,I),D=h.lines,s&&D.length&&(this._drawColorBox(t,n,m,y,o),f=Math.max(M.lineHeight,l)),j=0,L=D.length;j<L;++j)I(D[j]),f=M.lineHeight;_e(h.after,I)}p=0,f=M.lineHeight,_e(this.afterBody,I),n.y-=i}drawFooter(n,t,o){const e=this.footer,i=e.length;let a,s;if(i){const l=jl(o.rtl,this.x,this.width);for(n.x=Gi(this,o.footerAlign,o),n.y+=o.footerMarginTop,t.textAlign=l.textAlign(o.footerAlign),t.textBaseline="middle",a=yt(o.footerFont),t.fillStyle=o.footerColor,t.font=a.string,s=0;s<i;++s)t.fillText(e[s],l.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+o.footerSpacing}}drawBackground(n,t,o,e){const{xAlign:i,yAlign:a}=this,{x:s,y:l}=n,{width:u,height:d}=o,{topLeft:M,topRight:f,bottomLeft:p,bottomRight:y}=qn(e.cornerRadius);t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.beginPath(),t.moveTo(s+M,l),a==="top"&&this.drawCaret(n,t,o,e),t.lineTo(s+u-f,l),t.quadraticCurveTo(s+u,l,s+u,l+f),a==="center"&&i==="right"&&this.drawCaret(n,t,o,e),t.lineTo(s+u,l+d-y),t.quadraticCurveTo(s+u,l+d,s+u-y,l+d),a==="bottom"&&this.drawCaret(n,t,o,e),t.lineTo(s+p,l+d),t.quadraticCurveTo(s,l+d,s,l+d-p),a==="center"&&i==="left"&&this.drawCaret(n,t,o,e),t.lineTo(s,l+M),t.quadraticCurveTo(s,l,s+M,l),t.closePath(),t.fill(),e.borderWidth>0&&t.stroke()}_updateAnimationTarget(n){const t=this.chart,o=this.$animations,e=o&&o.x,i=o&&o.y;if(e||i){const a=Or[n.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=rf(this,n),l=Object.assign({},a,this._size),u=of(t,n,l),d=af(n,l,u,t);(e._to!==d.x||i._to!==d.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(n){const t=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(t);const e={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=bt(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(n.save(),n.globalAlpha=o,this.drawBackground(i,n,e,t),H4(n,t.textDirection),i.y+=a.top,this.drawTitle(i,n,t),this.drawBody(i,n,t),this.drawFooter(i,n,t),F4(n,t.textDirection),n.restore())}getActiveElements(){return this._active||[]}setActiveElements(n,t){const o=this._active,e=n.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),i=!Ni(o,e),a=this._positionChanged(e,t);(i||a)&&(this._active=e,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(n,t,o=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const e=this.options,i=this._active||[],a=this._getActiveElements(n,i,t,o),s=this._positionChanged(a,n),l=t||!Ni(a,i)||s;return l&&(this._active=a,(e.enabled||e.external)&&(this._eventPosition={x:n.x,y:n.y},this.update(!0,t))),l}_getActiveElements(n,t,o,e){const i=this.options;if(n.type==="mouseout")return[];if(!e)return t;const a=this.chart.getElementsAtEventForMode(n,i.mode,i,o);return i.reverse&&a.reverse(),a}_positionChanged(n,t){const{caretX:o,caretY:e,options:i}=this,a=Or[i.position].call(this,n,t);return a!==!1&&(o!==a.x||e!==a.y)}}Bl.positioners=Or;var Mb={id:"tooltip",_element:Bl,positioners:Or,afterInit(r,n,t){t&&(r.tooltip=new Bl({chart:r,options:t}))},beforeUpdate(r,n,t){r.tooltip&&r.tooltip.initialize(t)},reset(r,n,t){r.tooltip&&r.tooltip.initialize(t)},afterDraw(r){const n=r.tooltip;if(n&&n._willRender()){const t={tooltip:n};if(r.notifyPlugins("beforeTooltipDraw",t)===!1)return;n.draw(r.ctx),r.notifyPlugins("afterTooltipDraw",t)}},afterEvent(r,n){if(r.tooltip){const t=n.replay;r.tooltip.handleEvent(n.event,t,n.inChartArea)&&(n.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:(r,n)=>n.bodyFont.size,boxWidth:(r,n)=>n.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:nn,title(r){if(r.length>0){const n=r[0],t=n.chart.data.labels,o=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(o>0&&n.dataIndex<o)return t[n.dataIndex]}return""},afterTitle:nn,beforeBody:nn,beforeLabel:nn,label(r){if(this&&this.options&&this.options.mode==="dataset")return r.label+": "+r.formattedValue||r.formattedValue;let n=r.dataset.label||"";n&&(n+=": ");const t=r.formattedValue;return Ce(t)||(n+=t),n},labelColor(r){const t=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(r){const t=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:nn,afterBody:nn,beforeFooter:nn,footer:nn,afterFooter:nn}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:r=>r!=="filter"&&r!=="itemSort"&&r!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const fb=(r,n,t,o)=>(typeof n=="string"?(t=r.push(n)-1,o.unshift({index:t,label:n})):isNaN(n)&&(t=null),t);function gb(r,n,t,o){const e=r.indexOf(n);if(e===-1)return fb(r,n,t,o);const i=r.lastIndexOf(n);return e!==i?t:e}const hb=(r,n)=>r===null?null:lt(Math.round(r),0,n);class Hi extends Pn{constructor(n){super(n),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(n){const t=this._addedLabels;if(t.length){const o=this.getLabels();for(const{index:e,label:i}of t)o[e]===i&&o.splice(e,1);this._addedLabels=[]}super.init(n)}parse(n,t){if(Ce(n))return null;const o=this.getLabels();return t=isFinite(t)&&o[t]===n?t:gb(o,n,we(t,n),this._addedLabels),hb(t,o.length-1)}determineDataLimits(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let{min:o,max:e}=this.getMinMax(!0);this.options.bounds==="ticks"&&(n||(o=0),t||(e=this.getLabels().length-1)),this.min=o,this.max=e}buildTicks(){const n=this.min,t=this.max,o=this.options.offset,e=[];let i=this.getLabels();i=n===0&&t===i.length-1?i:i.slice(n,t+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=n;a<=t;a++)e.push({value:a});return e}getLabelForValue(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(n){return typeof n!="number"&&(n=this.parse(n)),n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getValueForPixel(n){return Math.round(this._startValue+this.getDecimalForPixel(n)*this._valueRange)}getBasePixel(){return this.bottom}}Hi.id="category",Hi.defaults={ticks:{callback:Hi.prototype.getLabelForValue}};function pb(r,n){const t=[],{bounds:e,step:i,min:a,max:s,precision:l,count:u,maxTicks:d,maxDigits:M,includeBounds:f}=r,p=i||1,y=d-1,{min:I,max:v}=n,h=!Ce(a),N=!Ce(s),D=!Ce(u),m=(v-I)/(M+1);let j=Dd((v-I)/y/p)*p,T,L,k,z;if(j<1e-14&&!h&&!N)return[{value:I},{value:v}];z=Math.ceil(v/j)-Math.floor(I/j),z>y&&(j=Dd(z*j/y/p)*p),Ce(l)||(T=Math.pow(10,l),j=Math.ceil(j*T)/T),e==="ticks"?(L=Math.floor(I/j)*j,k=Math.ceil(v/j)*j):(L=I,k=v),h&&N&&i&&L1((s-a)/i,j/1e3)?(z=Math.round(Math.min((s-a)/j,d)),j=(s-a)/z,L=a,k=s):D?(L=h?a:L,k=N?s:k,z=u-1,j=(k-L)/z):(z=(k-L)/j,hr(z,Math.round(z),j/1e3)?z=Math.round(z):z=Math.ceil(z));const O=Math.max(vd(j),vd(L));T=Math.pow(10,Ce(l)?O:l),L=Math.round(L*T)/T,k=Math.round(k*T)/T;let b=0;for(h&&(f&&L!==a?(t.push({value:a}),L<a&&b++,hr(Math.round((L+b*j)*T)/T,a,uf(a,m,r))&&b++):L<a&&b++);b<z;++b)t.push({value:Math.round((L+b*j)*T)/T});return N&&f&&k!==s?t.length&&hr(t[t.length-1].value,s,uf(s,m,r))?t[t.length-1].value=s:t.push({value:s}):(!N||k===s)&&t.push({value:k}),t}function uf(r,n,{horizontal:t,minRotation:o}){const e=Ct(o),i=(t?Math.sin(e):Math.cos(e))||.001,a=.75*n*(""+r).length;return Math.min(n/i,a)}class Fi extends Pn{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return Ce(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){const{beginAtZero:n}=this.options,{minDefined:t,maxDefined:o}=this.getUserBounds();let{min:e,max:i}=this;const a=l=>e=t?e:l,s=l=>i=o?i:l;if(n){const l=Gt(e),u=Gt(i);l<0&&u<0?s(0):l>0&&u>0&&a(0)}if(e===i){let l=1;(i>=Number.MAX_SAFE_INTEGER||e<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(i*.05)),s(i+l),n||a(e-l)}this.min=e,this.max=i}getTickLimit(){const n=this.options.ticks;let{maxTicksLimit:t,stepSize:o}=n,e;return o?(e=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),t=t||11),t&&(e=Math.min(t,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const n=this.options,t=n.ticks;let o=this.getTickLimit();o=Math.max(2,o);const e={maxTicks:o,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},i=this._range||this,a=pb(e,i);return n.bounds==="ticks"&&xd(a,this,"value"),n.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const n=this.ticks;let t=this.min,o=this.max;if(super.configure(),this.options.offset&&n.length){const e=(o-t)/Math.max(n.length-1,1)/2;t-=e,o+=e}this._startValue=t,this._endValue=o,this._valueRange=o-t}getLabelForValue(n){return Dr(n,this.chart.options.locale,this.options.ticks.format)}}class Pl extends Fi{determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=ot(n)?n:0,this.max=ot(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const n=this.isHorizontal(),t=n?this.width:this.height,o=Ct(this.options.ticks.minRotation),e=(n?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/e))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}}Pl.id="linear",Pl.defaults={ticks:{callback:Ei.formatters.numeric}};function cf(r){return r/Math.pow(10,Math.floor(xt(r)))===1}function yb(r,n){const t=Math.floor(xt(n.max)),o=Math.ceil(n.max/Math.pow(10,t)),e=[];let i=mt(r.min,Math.pow(10,Math.floor(xt(n.min)))),a=Math.floor(xt(i)),s=Math.floor(i/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do e.push({value:i,major:cf(i)}),++s,s===10&&(s=1,++a,l=a>=0?1:l),i=Math.round(s*Math.pow(10,a)*l)/l;while(a<t||a===t&&s<o);const u=mt(r.max,i);return e.push({value:u,major:cf(i)}),e}class df extends Pn{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){const o=Fi.prototype.parse.apply(this,[n,t]);if(o===0){this._zero=!0;return}return ot(o)&&o>0?o:null}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=ot(n)?Math.max(0,n):null,this.max=ot(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let o=this.min,e=this.max;const i=l=>o=n?o:l,a=l=>e=t?e:l,s=(l,u)=>Math.pow(10,Math.floor(xt(l))+u);o===e&&(o<=0?(i(1),a(10)):(i(s(o,-1)),a(s(e,1)))),o<=0&&i(s(e,-1)),e<=0&&a(s(o,1)),this._zero&&this.min!==this._suggestedMin&&o===s(this.min,0)&&i(s(o,-1)),this.min=o,this.max=e}buildTicks(){const n=this.options,t={min:this._userMin,max:this._userMax},o=yb(t,this);return n.bounds==="ticks"&&xd(o,this,"value"),n.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(n){return n===void 0?"0":Dr(n,this.chart.options.locale,this.options.ticks.format)}configure(){const n=this.min;super.configure(),this._startValue=xt(n),this._valueRange=xt(this.max)-xt(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(xt(n)-this._startValue)/this._valueRange)}getValueForPixel(n){const t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}}df.id="logarithmic",df.defaults={ticks:{callback:Ei.formatters.logarithmic,major:{enabled:!0}}};function Rl(r){const n=r.ticks;if(n.display&&r.display){const t=bt(n.backdropPadding);return we(n.font&&n.font.size,Ae.font.size)+t.height}return 0}function Nb(r,n,t){return t=Ze(t)?t:[t],{w:l4(r,n.string,t),h:t.length*n.lineHeight}}function Mf(r,n,t,o,e){return r===o||r===e?{start:n-t/2,end:n+t/2}:r<o||r>e?{start:n-t,end:n}:{start:n,end:n+t}}function jb(r){const n={l:r.left+r._padding.left,r:r.right-r._padding.right,t:r.top+r._padding.top,b:r.bottom-r._padding.bottom},t=Object.assign({},n),o=[],e=[],i=r._pointLabels.length,a=r.options.pointLabels,s=a.centerPointLabels?Je/i:0;for(let l=0;l<i;l++){const u=a.setContext(r.getPointLabelContext(l));e[l]=u.padding;const d=r.getPointPosition(l,r.drawingArea+e[l],s),M=yt(u.font),f=Nb(r.ctx,M,r._pointLabels[l]);o[l]=f;const p=Et(r.getIndexAngle(l)+s),y=Math.round(tl(p)),I=Mf(y,d.x,f.w,0,180),v=Mf(y,d.y,f.h,90,270);Ib(t,n,p,I,v)}r.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),r._pointLabelItems=mb(r,o,e)}function Ib(r,n,t,o,e){const i=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t));let s=0,l=0;o.start<n.l?(s=(n.l-o.start)/i,r.l=Math.min(r.l,n.l-s)):o.end>n.r&&(s=(o.end-n.r)/i,r.r=Math.max(r.r,n.r+s)),e.start<n.t?(l=(n.t-e.start)/a,r.t=Math.min(r.t,n.t-l)):e.end>n.b&&(l=(e.end-n.b)/a,r.b=Math.max(r.b,n.b+l))}function mb(r,n,t){const o=[],e=r._pointLabels.length,i=r.options,a=Rl(i)/2,s=r.drawingArea,l=i.pointLabels.centerPointLabels?Je/e:0;for(let u=0;u<e;u++){const d=r.getPointPosition(u,s+a+t[u],l),M=Math.round(tl(Et(d.angle+Xe))),f=n[u],p=vb(d.y,f.h,M),y=Db(M),I=xb(d.x,f.w,y);o.push({x:d.x,y:p,textAlign:y,left:I,top:p,right:I+f.w,bottom:p+f.h})}return o}function Db(r){return r===0||r===180?"center":r<180?"left":"right"}function xb(r,n,t){return t==="right"?r-=n:t==="center"&&(r-=n/2),r}function vb(r,n,t){return t===90||t===270?r-=n/2:(t>270||t<90)&&(r-=n),r}function bb(r,n){const{ctx:t,options:{pointLabels:o}}=r;for(let e=n-1;e>=0;e--){const i=o.setContext(r.getPointLabelContext(e)),a=yt(i.font),{x:s,y:l,textAlign:u,left:d,top:M,right:f,bottom:p}=r._pointLabelItems[e],{backdropColor:y}=i;if(!Ce(y)){const I=qn(i.borderRadius),v=bt(i.backdropPadding);t.fillStyle=y;const h=d-v.left,N=M-v.top,D=f-d+v.width,m=p-M+v.height;Object.values(I).some(j=>j!==0)?(t.beginPath(),wi(t,{x:h,y:N,w:D,h:m,radius:I}),t.fill()):t.fillRect(h,N,D,m)}ki(t,r._pointLabels[e],s,l+a.lineHeight/2,a,{color:i.color,textAlign:u,textBaseline:"middle"})}}function ff(r,n,t,o){const{ctx:e}=r;if(t)e.arc(r.xCenter,r.yCenter,n,0,Be);else{let i=r.getPointPosition(0,n);e.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=r.getPointPosition(a,n),e.lineTo(i.x,i.y)}}function Tb(r,n,t,o){const e=r.ctx,i=n.circular,{color:a,lineWidth:s}=n;!i&&!o||!a||!s||t<0||(e.save(),e.strokeStyle=a,e.lineWidth=s,e.setLineDash(n.borderDash),e.lineDashOffset=n.borderDashOffset,e.beginPath(),ff(r,t,i,o),e.closePath(),e.stroke(),e.restore())}function Ab(r,n,t){return Dn(r,{label:t,index:n,type:"pointLabel"})}class $i extends Fi{constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const n=this._padding=bt(Rl(this.options)/2),t=this.width=this.maxWidth-n.width,o=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+o/2+n.top),this.drawingArea=Math.floor(Math.min(t,o)/2)}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!1);this.min=ot(n)&&!isNaN(n)?n:0,this.max=ot(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Rl(this.options))}generateTickLabels(n){Fi.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,o)=>{const e=$e(this.options.pointLabels.callback,[t,o],this);return e||e===0?e:""}).filter((t,o)=>this.chart.getDataVisibility(o))}fit(){const n=this.options;n.display&&n.pointLabels.display?jb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,o,e){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((o-e)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,o,e))}getIndexAngle(n){const t=Be/(this._pointLabels.length||1),o=this.options.startAngle||0;return Et(n*t+Ct(o))}getDistanceFromCenterForValue(n){if(Ce(n))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(Ce(n))return NaN;const t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){const t=this._pointLabels||[];if(n>=0&&n<t.length){const o=t[n];return Ab(this.getContext(),n,o)}}getPointPosition(n,t,o=0){const e=this.getIndexAngle(n)-Xe+o;return{x:Math.cos(e)*t+this.xCenter,y:Math.sin(e)*t+this.yCenter,angle:e}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){const{left:t,top:o,right:e,bottom:i}=this._pointLabelItems[n];return{left:t,top:o,right:e,bottom:i}}drawBackground(){const{backgroundColor:n,grid:{circular:t}}=this.options;if(n){const o=this.ctx;o.save(),o.beginPath(),ff(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),o.closePath(),o.fillStyle=n,o.fill(),o.restore()}}drawGrid(){const n=this.ctx,t=this.options,{angleLines:o,grid:e}=t,i=this._pointLabels.length;let a,s,l;if(t.pointLabels.display&&bb(this,i),e.display&&this.ticks.forEach((u,d)=>{if(d!==0){s=this.getDistanceFromCenterForValue(u.value);const M=e.setContext(this.getContext(d-1));Tb(this,M,s,i)}}),o.display){for(n.save(),a=i-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:M}=u;!M||!d||(n.lineWidth=M,n.strokeStyle=d,n.setLineDash(u.borderDash),n.lineDashOffset=u.borderDashOffset,s=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,s),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(l.x,l.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){const n=this.ctx,t=this.options,o=t.ticks;if(!o.display)return;const e=this.getIndexAngle(0);let i,a;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(e),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!t.reverse)return;const u=o.setContext(this.getContext(l)),d=yt(u.font);if(i=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){n.font=d.string,a=n.measureText(s.label).width,n.fillStyle=u.backdropColor;const M=bt(u.backdropPadding);n.fillRect(-a/2-M.left,-i-d.size/2-M.top,a+M.width,d.size+M.height)}ki(n,s.label,0,-i,d,{color:u.color})}),n.restore()}drawTitle(){}}$i.id="radialLinear",$i.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ei.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(r){return r},padding:5,centerPointLabels:!1}},$i.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},$i.descriptors={angleLines:{_fallback:"grid"}};const Ji={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}},pt=Object.keys(Ji);function kb(r,n){return r-n}function gf(r,n){if(Ce(n))return null;const t=r._adapter,{parser:o,round:e,isoWeekday:i}=r._parseOpts;let a=n;return typeof o=="function"&&(a=o(a)),ot(a)||(a=typeof o=="string"?t.parse(a,o):t.parse(a)),a===null?null:(e&&(a=e==="week"&&(Xn(i)||i===!0)?t.startOf(a,"isoWeek",i):t.startOf(a,e)),+a)}function hf(r,n,t,o){const e=pt.length;for(let i=pt.indexOf(r);i<e-1;++i){const a=Ji[pt[i]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-n)/(s*a.size))<=o)return pt[i]}return pt[e-1]}function wb(r,n,t,o,e){for(let i=pt.length-1;i>=pt.indexOf(t);i--){const a=pt[i];if(Ji[a].common&&r._adapter.diff(e,o,a)>=n-1)return a}return pt[t?pt.indexOf(t):0]}function Lb(r){for(let n=pt.indexOf(r)+1,t=pt.length;n<t;++n)if(Ji[pt[n]].common)return pt[n]}function pf(r,n,t){if(!t)r[n]=!0;else if(t.length){const{lo:o,hi:e}=rl(t,n),i=t[o]>=n?t[o]:t[e];r[i]=!0}}function zb(r,n,t,o){const e=r._adapter,i=+e.startOf(n[0].value,o),a=n[n.length-1].value;let s,l;for(s=i;s<=a;s=+e.add(s,1,o))l=t[s],l>=0&&(n[l].major=!0);return n}function yf(r,n,t){const o=[],e={},i=n.length;let a,s;for(a=0;a<i;++a)s=n[a],e[s]=a,o.push({value:s,major:!1});return i===0||!t?o:zb(r,o,e,t)}class Xi extends Pn{constructor(n){super(n),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(n,t){const o=n.time||(n.time={}),e=this._adapter=new $x._date(n.adapters.date);e.init(t),fr(o.displayFormats,e.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(n),this._normalized=t.normalized}parse(n,t){return n===void 0?null:gf(this,n)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const n=this.options,t=this._adapter,o=n.time.unit||"day";let{min:e,max:i,minDefined:a,maxDefined:s}=this.getUserBounds();function l(u){!a&&!isNaN(u.min)&&(e=Math.min(e,u.min)),!s&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!a||!s)&&(l(this._getLabelBounds()),(n.bounds!=="ticks"||n.ticks.source!=="labels")&&l(this.getMinMax(!1))),e=ot(e)&&!isNaN(e)?e:+t.startOf(Date.now(),o),i=ot(i)&&!isNaN(i)?i:+t.endOf(Date.now(),o)+1,this.min=Math.min(e,i-1),this.max=Math.max(e+1,i)}_getLabelBounds(){const n=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return n.length&&(t=n[0],o=n[n.length-1]),{min:t,max:o}}buildTicks(){const n=this.options,t=n.time,o=n.ticks,e=o.source==="labels"?this.getLabelTimestamps():this._generate();n.bounds==="ticks"&&e.length&&(this.min=this._userMin||e[0],this.max=this._userMax||e[e.length-1]);const i=this.min,a=this.max,s=C1(e,i,a);return this._unit=t.unit||(o.autoSkip?hf(t.minUnit,this.min,this.max,this._getLabelCapacity(i)):wb(this,s.length,t.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Lb(this._unit),this.initOffsets(e),n.reverse&&s.reverse(),yf(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(n=>+n.value))}initOffsets(n){let t=0,o=0,e,i;this.options.offset&&n.length&&(e=this.getDecimalForValue(n[0]),n.length===1?t=1-e:t=(this.getDecimalForValue(n[1])-e)/2,i=this.getDecimalForValue(n[n.length-1]),n.length===1?o=i:o=(i-this.getDecimalForValue(n[n.length-2]))/2);const a=n.length<3?.5:.25;t=lt(t,0,a),o=lt(o,0,a),this._offsets={start:t,end:o,factor:1/(t+1+o)}}_generate(){const n=this._adapter,t=this.min,o=this.max,e=this.options,i=e.time,a=i.unit||hf(i.minUnit,t,o,this._getLabelCapacity(t)),s=we(i.stepSize,1),l=a==="week"?i.isoWeekday:!1,u=Xn(l)||l===!0,d={};let M=t,f,p;if(u&&(M=+n.startOf(M,"isoWeek",l)),M=+n.startOf(M,u?"day":a),n.diff(o,t,a)>1e5*s)throw new Error(t+" and "+o+" are too far apart with stepSize of "+s+" "+a);const y=e.ticks.source==="data"&&this.getDataTimestamps();for(f=M,p=0;f<o;f=+n.add(f,s,a),p++)pf(d,f,y);return(f===o||e.bounds==="ticks"||p===1)&&pf(d,f,y),Object.keys(d).sort((I,v)=>I-v).map(I=>+I)}getLabelForValue(n){const t=this._adapter,o=this.options.time;return o.tooltipFormat?t.format(n,o.tooltipFormat):t.format(n,o.displayFormats.datetime)}_tickFormatFunction(n,t,o,e){const i=this.options,a=i.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&a[s],d=l&&a[l],M=o[t],f=l&&d&&M&&M.major,p=this._adapter.format(n,e||(f?d:u)),y=i.ticks.callback;return y?$e(y,[p,t,o],this):p}generateTickLabels(n){let t,o,e;for(t=0,o=n.length;t<o;++t)e=n[t],e.label=this._tickFormatFunction(e.value,t,n)}getDecimalForValue(n){return n===null?NaN:(n-this.min)/(this.max-this.min)}getPixelForValue(n){const t=this._offsets,o=this.getDecimalForValue(n);return this.getPixelForDecimal((t.start+o)*t.factor)}getValueForPixel(n){const t=this._offsets,o=this.getDecimalForPixel(n)/t.factor-t.end;return this.min+o*(this.max-this.min)}_getLabelSize(n){const t=this.options.ticks,o=this.ctx.measureText(n).width,e=Ct(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(e),a=Math.sin(e),s=this._resolveTickFontOptions(0).size;return{w:o*i+s*a,h:o*a+s*i}}_getLabelCapacity(n){const t=this.options.time,o=t.displayFormats,e=o[t.unit]||o.millisecond,i=this._tickFormatFunction(n,0,yf(this,[n],this._majorUnit),e),a=this._getLabelSize(i),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let n=this._cache.data||[],t,o;if(n.length)return n;const e=this.getMatchingVisibleMetas();if(this._normalized&&e.length)return this._cache.data=e[0].controller.getAllParsedValues(this);for(t=0,o=e.length;t<o;++t)n=n.concat(e[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const n=this._cache.labels||[];let t,o;if(n.length)return n;const e=this.getLabels();for(t=0,o=e.length;t<o;++t)n.push(gf(this,e[t]));return this._cache.labels=this._normalized?n:this.normalize(n)}normalize(n){return kd(n.sort(kb))}}Xi.id="time",Xi.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function Ki(r,n,t){let o=0,e=r.length-1,i,a,s,l;t?(n>=r[o].pos&&n<=r[e].pos&&({lo:o,hi:e}=En(r,"pos",n)),{pos:i,time:s}=r[o],{pos:a,time:l}=r[e]):(n>=r[o].time&&n<=r[e].time&&({lo:o,hi:e}=En(r,"time",n)),{time:i,pos:s}=r[o],{time:a,pos:l}=r[e]);const u=a-i;return u?s+(l-s)*(n-i)/u:s}class Nf extends Xi{constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=Ki(t,this.min),this._tableRange=Ki(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){const{min:t,max:o}=this,e=[],i=[];let a,s,l,u,d;for(a=0,s=n.length;a<s;++a)u=n[a],u>=t&&u<=o&&e.push(u);if(e.length<2)return[{time:t,pos:0},{time:o,pos:1}];for(a=0,s=e.length;a<s;++a)d=e[a+1],l=e[a-1],u=e[a],Math.round((d+l)/2)!==u&&i.push({time:u,pos:a/(s-1)});return i}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;const t=this.getDataTimestamps(),o=this.getLabelTimestamps();return t.length&&o.length?n=this.normalize(t.concat(o)):n=t.length?t:o,n=this._cache.all=n,n}getDecimalForValue(n){return(Ki(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){const t=this._offsets,o=this.getDecimalForPixel(n)/t.factor-t.end;return Ki(this._table,o*this._tableRange+this._minPos,!0)}}Nf.id="timeseries",Nf.defaults=Xi.defaults;var rr;(function(r){r.ChartRendered="chart:rendered",r.ChartUpdated="chart:updated",r.ChartDestroyed="chart:destroyed",r.LabelsUpdated="labels:updated"})(rr||(rr={}));function qi(r,n,t,o){r(n,t),o!==void 0&&o.emit(rr.ChartRendered)}function Sb(r,n){r.update(),n!==void 0&&n.emit(rr.ChartUpdated)}function ea(r,n){r.destroy(),n!==void 0&&n.emit(rr.ChartDestroyed)}function Ob(r,n){const t={labels:typeof r.labels=="undefined"?[]:[...r.labels],datasets:[]};return jf(t,{...r},n),t}function jf(r,n,t){const o=[];r.datasets=n.datasets.map(e=>{const i=r.datasets.find(a=>a[t]===e[t]);return!i||!e.data||o.includes(i)?{...e}:(o.push(i),Object.assign(i,e),i)})}function Cb(r,n,t){r.data.labels=n,t!==void 0&&t.emit(rr.LabelsUpdated)}function Eb(r,n){r.options={...n}}function _b(r,n){const t=r.datasets.map(e=>e.label),o=n.datasets.map(e=>e.label);return n.datasets.length===r.datasets.length&&t.every((e,i)=>e===o[i])}const Qb="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",Ub="Update ERROR: chart instance not found",Yb=((r,n,t)=>c.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:r},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(o,e){Sr.register(t);const i=c.shallowRef(null),a=c.ref(null);function s(M,f){if(i.value!==null&&ea(c.toRaw(i.value),e),a.value===null)throw new Error(Qb);{const p=Ob(M,o.datasetIdKey),y=a.value.getContext("2d");y!==null&&(i.value=new Sr(y,{type:n,data:c.isProxy(M)?new Proxy(p,{}):p,options:f,plugins:o.plugins}))}}function l(M,f){const p=c.isProxy(M)?c.toRaw(M):{...M},y=c.isProxy(f)?c.toRaw(f):{...f};if(Object.keys(y).length>0){const I=c.toRaw(i.value);_b(p,y)&&I!==null?(jf(I==null?void 0:I.data,p,o.datasetIdKey),p.labels!==void 0&&Cb(I,p.labels,e),d()):(I!==null&&ea(I,e),qi(s,o.chartData,o.chartOptions,e))}else i.value!==null&&ea(c.toRaw(i.value),e),qi(s,o.chartData,o.chartOptions,e)}function u(M){const f=c.toRaw(i.value);f!==null?(Eb(f,M),d()):qi(s,o.chartData,o.chartOptions,e)}function d(){const M=c.toRaw(i.value);M!==null?Sb(M,e):console.error(Ub)}return c.watch(()=>o.chartData,(M,f)=>l(M,f),{deep:!0}),c.watch(()=>o.chartOptions,M=>u(M),{deep:!0}),c.onMounted(()=>{"datasets"in o.chartData&&o.chartData.datasets.length>0&&qi(s,o.chartData,o.chartOptions,e)}),c.onBeforeUnmount(()=>{i.value!==null&&ea(c.toRaw(i.value),e)}),e.expose({chart:i,updateChart:d}),()=>c.h("div",{style:o.styles,class:o.cssClasses},[c.h("canvas",{id:o.chartId,width:o.width,height:o.height,ref:a})])}}))("bar-chart","bar",Ci);var kw="";const Bb={name:"MultiRangeSlider",props:{baseClassName:{type:String,default:"multi-range-slider"},min:{type:Number},max:{type:Number},minValue:{type:Number},maxValue:{type:Number},step:{type:Number,default:1},preventWheel:{type:Boolean,default:!1},ruler:{type:Boolean,default:!0},label:{type:Boolean,default:!0},labels:{type:Array},minCaption:{type:String},maxCaption:{type:String},rangeMargin:{type:Number}},data(){let r=this.labels||[],n=this.min===void 0?0:this.min,t=r.length?r.length-1:100,o=this.max===void 0?t:this.max,e=this.minValue===void 0?25:this.minValue;r.length&&this.minValue===void 0&&(e=1);let i=this.maxValue||75;if(r.length&&this.maxValue===void 0&&(i=r.length-2),o<=n)throw new Error("Invalid props min or max");if(e>i)throw new Error("Invalid props minValue or maxValue");let a=this.rangeMargin===void 0?this.step:this.rangeMargin,s=a%this.step;return s&&(a=a+this.step-s),{valueMin:e<n?n:e,valueMax:i>o?o:i,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:a}},methods:{onBarLeftClick(){this.valueMin-this.step>=this.minimum?this.valueMin-=this.step:this.valueMin=this.minimum},onInnerBarLeftClick(){this.valueMin+this.rangeMarginValue<this.valueMax&&(this.valueMin+=this.step)},onBarRightClick(){this.valueMax+this.step<=this.maximum?this.valueMax+=this.step:this.valueMax=this.maximum},onInnerBarRightClick(){this.valueMax-this.rangeMarginValue>this.valueMin&&(this.valueMax-=this.step)},onInputMinChange(r){let n=parseFloat(r.target.value);n<=this.valueMax-this.rangeMarginValue&&n>=this.minimum?this.valueMin=n:r.target.value=this.valueMin},onInputMaxChange(r){let n=parseFloat(r.target.value);n>=this.valueMin+this.rangeMarginValue&&n<=this.maximum?this.valueMax=n:r.target.value=this.valueMax},onLeftThumbMousedown(r){if(r.preventDefault(),this.startX=r.clientX,r.type==="touchstart")if(r.touches.length===1)this.startX=r.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=r.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(r){this.mouseMoveCounter++;let n=r.clientX;r.type==="touchmove"&&(n=r.touches[0].clientX);let o=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*o;e-=e%this.step,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(r){if(r.preventDefault(),this.startX=r.clientX,r.type==="touchstart")if(r.touches.length===1)this.startX=r.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=r.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(r){this.mouseMoveCounter++;let n=r.clientX;r.type==="touchmove"&&(n=r.touches[0].clientX);let o=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*o;e-=e%this.step,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(r){if(this.preventWheel===!0||!r.shiftKey&&!r.ctrlKey)return;let n=this.step;r.deltaY<0&&(n=-n),r.shiftKey&&r.ctrlKey?this.valueMin+n>=this.minimum&&this.valueMax+n<=this.maximum&&(this.valueMin=this.valueMin+n,this.valueMax=this.valueMax+n):r.ctrlKey?(n=this.valueMax+n,n<this.valueMin+this.rangeMarginValue?n=this.valueMin+this.rangeMarginValue:n>this.maximum&&(n=this.maximum),this.valueMax=n):r.shiftKey&&(n=this.valueMin+n,n<this.minimum?n=this.minimum:n>this.valueMax-this.rangeMarginValue&&(n=this.valueMax-this.rangeMarginValue),this.valueMin=n)},triggerInput(){let r=0;this.step.toString().includes(".")&&(r=2);let n={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(r)),maxValue:parseFloat(this.valueMax.toFixed(r))};this.$emit("input",n)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let r=this.labels||[],n=r.length?r.length-1:100;return this.max===void 0?n:this.max},stepCount(){let r=this.labels||[];return r.length?r.length-1:Math.floor((this.maximum-this.minimum)/this.step)},subStepCount(){return(this.labels||[]).length&&this.step>1?(this.maximum-this.minimum)/this.step:0},barMin(){return(this.valueMin-this.minimum)/(this.maximum-this.minimum)*100},barMax(){return 100-(this.valueMax-this.minimum)/(this.maximum-this.minimum)*100},barMinVal(){let r=0;return this.step.toString().includes(".")&&(r=2),(this.valueMin||0).toFixed(r)},barMaxVal(){let r=0;return this.step.toString().includes(".")&&(r=2),(this.valueMax||100).toFixed(r)},scaleLabels(){let r=this.labels||[];return r.length===0&&(r=[],r.push(this.minimum),r.push(this.maximum)),r}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(r){this.valueMin=r<this.minimum?this.minimum:r},maxValue(r){this.valueMax=r>this.maximum?this.maximum:r}},mounted(){}},Pb={class:"bar"},Rb=["min","max","step","value"],Vb={class:"caption"},Zb={class:"min-caption"},Wb={class:"bar-inner"},Gb=["min","max","step","value"],Hb={class:"caption"},Fb={class:"max-caption"},$b={key:0,class:"ruler"},Jb={key:1,class:"sub-ruler"},Xb={key:2,class:"labels"};function Kb(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([t.baseClassName,e.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:n[10]||(n[10]=c.withModifiers((...a)=>i.onMouseWheel&&i.onMouseWheel(...a),["prevent","stop"]))},[c.createElementVNode("div",Pb,[c.createElementVNode("div",{class:"bar-left",style:c.normalizeStyle({width:i.barMin+"%"}),onClick:n[0]||(n[0]=(...a)=>i.onBarLeftClick&&i.onBarLeftClick(...a))},null,4),c.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:i.minimum,max:i.maximum,step:t.step,value:e.valueMin,onInput:n[1]||(n[1]=c.withModifiers((...a)=>i.onInputMinChange&&i.onInputMinChange(...a),["stop","prevent"]))},null,40,Rb),c.createElementVNode("div",{class:"thumb thumb-left",onMousedown:n[2]||(n[2]=(...a)=>i.onLeftThumbMousedown&&i.onLeftThumbMousedown(...a)),onTouchstart:n[3]||(n[3]=(...a)=>i.onLeftThumbMousedown&&i.onLeftThumbMousedown(...a))},[c.createElementVNode("div",Vb,[c.createElementVNode("span",Zb,c.toDisplayString(t.minCaption||i.barMinVal),1)])],32),c.createElementVNode("div",Wb,[c.createElementVNode("div",{class:"bar-inner-left",onClick:n[4]||(n[4]=(...a)=>i.onInnerBarLeftClick&&i.onInnerBarLeftClick(...a))}),c.createElementVNode("div",{class:"bar-inner-right",onClick:n[5]||(n[5]=(...a)=>i.onInnerBarRightClick&&i.onInnerBarRightClick(...a))})]),c.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:i.minimum,max:i.maximum,step:t.step,value:e.valueMax,onInput:n[6]||(n[6]=c.withModifiers((...a)=>i.onInputMaxChange&&i.onInputMaxChange(...a),["stop","prevent"]))},null,40,Gb),c.createElementVNode("div",{class:"thumb thumb-right",onMousedown:n[7]||(n[7]=(...a)=>i.onRightThumbMousedown&&i.onRightThumbMousedown(...a)),onTouchstart:n[8]||(n[8]=(...a)=>i.onRightThumbMousedown&&i.onRightThumbMousedown(...a))},[c.createElementVNode("div",Hb,[c.createElementVNode("span",Fb,c.toDisplayString(t.maxCaption||i.barMaxVal),1)])],32),c.createElementVNode("div",{class:"bar-right",style:c.normalizeStyle({width:i.barMax+"%"}),onClick:n[9]||(n[9]=(...a)=>i.onBarRightClick&&i.onBarRightClick(...a))},null,4)]),t.ruler?(c.openBlock(),c.createElementBlock("div",$b,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.stepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-rule"}))),128))])):c.createCommentVNode("",!0),i.subStepCount?(c.openBlock(),c.createElementBlock("div",Jb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.subStepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-sub-rule"}))),128))])):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createElementBlock("div",Xb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.scaleLabels,a=>(c.openBlock(),c.createElementBlock("div",{class:"label",key:a},c.toDisplayString(a),1))),128))])):c.createCommentVNode("",!0)],34)}var qb=st(Bb,[["render",Kb]]);const eT=c.defineComponent({components:{DhIcon:Te},props:{mainText:{type:String,default:"Advanced"},filterMissingText:{type:String,default:"Filter Missing"},matchText:{type:String,default:"Match"},excludeText:{type:String,default:"Exclude"}},data(){return{activeFilter:!1,isFilterMissing:!1,isMatch:!1,isExclude:!1}},emits:["match","exclude","filter_missing"],mounted(){this.isMatch=!0},methods:{toggleFilter(){this.activeFilter=!this.activeFilter},matchFilter(){this.isMatch=!0,this.isExclude=!1,this.$emit("match",this.isMatch)},excludeFilter(){this.isMatch=!1,this.isExclude=!0,this.$emit("exclude",this.isExclude)},missingFilter(){this.isFilterMissing=!this.isFilterMissing,this.$emit("filter_missing",this.isFilterMissing),this.isFilterMissing&&this.isMatch?this.matchFilter():this.isFilterMissing&&this.isExclude&&this.excludeFilter()}}}),tT={class:"dh-advanced-filter-container"},nT={class:"advance_section"},rT={key:0},oT={class:"list-none"},iT=["checked"],aT=["checked"],sT=["checked"];function lT(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",tT,[c.createElementVNode("div",nT,[c.createElementVNode("span",{class:"toggle-icon",onClick:n[0]||(n[0]=s=>r.toggleFilter())},[c.createTextVNode(c.toDisplayString(r.mainText)+" ",1),c.createVNode(a,{"icon-name":r.activeFilter?"arrow-up":"arrow-down",size:20},null,8,["icon-name"])]),r.activeFilter?(c.openBlock(),c.createElementBlock("div",rT,[c.renderSlot(r.$slots,"default"),c.createElementVNode("ul",oT,[c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isFilterMissing,name:"number_filter",type:"checkbox",onChange:n[1]||(n[1]=s=>r.missingFilter())},null,40,iT),c.createTextVNode(" "+c.toDisplayString(r.filterMissingText),1)])]),c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isMatch,name:"number_filter",type:"radio",onChange:n[2]||(n[2]=s=>r.matchFilter())},null,40,aT),c.createTextVNode(" "+c.toDisplayString(r.matchText),1)]),c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isExclude,name:"number_filter",type:"radio",onChange:n[3]||(n[3]=s=>r.excludeFilter())},null,40,sT),c.createTextVNode(" "+c.toDisplayString(r.excludeText),1)])])])])):c.createCommentVNode("",!0)])])}var If=st(eT,[["render",lT]]),ww="";Sr.register(Mb,Wi,Hi,Pl);const uT=c.defineComponent({components:{Bar:Yb,MultiRangeSlider:qb,DhAdvancedFilter:If},props:{numberRange:{type:Array,default:()=>[{key:1,count:10}]},width:{type:Number,default:200},height:{type:Number,default:50},chartId:{type:String,default:"bar-chart"},datasetIdKey:{type:String,default:"label"},steps:{type:Number,default:1},includeForm:{type:Boolean,default:!1}},data(){return{chartData:{labels:[],datasets:[{labels:"",data:[],backgroundColor:["#5ea9e5"],borderRadius:1,hoverBackgroundColor:"#e0e0e0"}]},chartOptions:{responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1},ticks:{display:!0}},y:{display:!1,grid:{display:!1},ticks:{display:!1}}}},chartLines:{},min:"1",max:this.maxNumber(this.numberRange),rangeMax:this.numberRange.length,chart_dta:[],BarMinValue:1,BarMaxValue:this.numberRange.length,activeFilter:!1,validated:!1,isMatch:!1,isExclude:!1,isDisable:!1,labels:[]}},mounted(){this.isMatch=!0,this.setChartData(this.numberRange),this.highlightChart(),this.labels=[this.BarMinValue,this.max]},methods:{matchFilter(){if(!this.isDisable){this.isMatch=!0,this.isExclude=!1;var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")}},excludeFilter(){if(!this.isDisable){this.isMatch=!1,this.isExclude=!0;var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#e0e0e0"):this.chartData.datasets[0].backgroundColor.push("#5ea9e5")}},missingFilter(){this.isDisable=!this.isDisable,this.validated=!this.validated;var r=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let n=1;n<=r.length;n++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},changeMin(r){let n=r.target.value;this.min=n||"1",this.BarMinValue=n?this.getFirstIndex(parseInt(n)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(r){let n=r.target.value;this.BarMaxValue=n&&n>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(n)),this.max=n&&n>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):n,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(r){r=this.sortData(r),this.removeChartData();let n=this.chartData.labels;for(let t=0;t<r.length;t++)n.push(r[t].key),this.chart_dta.push(r[t].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(r){const{minValue:n,maxValue:t}=r;this.BarMinValue=n,this.BarMaxValue=t;var o=this.chartData.datasets[0].data;this.min=o[this.BarMinValue]?o[this.BarMinValue]:"1",this.max=o[this.BarMaxValue]?o[this.BarMaxValue]:this.max,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},toggleFilter(){this.activeFilter=!this.activeFilter},removeChartData(){this.chartData.labels=[],this.chartData.datasets[0].data=[],this.chart_dta=[]},sortData(r){return r.slice().sort(function(n,t){return n.count-t.count})},maxNumber(r){if(r.length!=0)return r.reduce((n,t)=>n=n>t.count?n:t.count,0)},getLastIndex(r){let n=this.chartData.datasets[0].data,t=0;for(let o=r;o>=0;o--)if(n.lastIndexOf(o)!==-1){t=n.lastIndexOf(o);break}else continue;return t},getFirstIndex(r){let n=this.chartData.datasets[0].data,t=0;for(let o=r;o<=this.max;o++)if(n.lastIndexOf(o)!==-1){t=n.lastIndexOf(o);break}else continue;return t}}}),cT={class:"dh-range-container"},dT={class:"bar-chart"},MT={key:0,class:"input-group-section"},fT={class:"input-group sb-input"},gT=["disabled","max","value"],hT={class:"input-group sb-input"},pT=["disabled","max","min","value"];function yT(r,n,t,o,e,i){const a=c.resolveComponent("Bar"),s=c.resolveComponent("MultiRangeSlider"),l=c.resolveComponent("dh-advanced-filter");return c.openBlock(),c.createElementBlock("div",cT,[c.createElementVNode("div",dT,[c.createVNode(a,{"chart-data":r.chartData,"chart-id":r.chartId,"chart-options":r.chartOptions,"dataset-id-key":r.datasetIdKey,height:r.height,width:r.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),c.createVNode(s,{"base-class-name":`multi-range-slider range-slider ${r.isDisable}`,label:!0,labels:r.labels,max:r.rangeMax,"max-caption":`${r.max}`,"max-value":r.BarMaxValue,min:1,"min-caption":`${r.min}`,"min-value":r.BarMinValue,"range-margin":0,ruler:!1,step:r.steps,onInput:r.updateBarChart},null,8,["base-class-name","labels","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),r.includeForm?(c.openBlock(),c.createElementBlock("div",MT,[c.createElementVNode("div",fT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${r.validated?"disable":""}`)}," From ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!r.validated,max:`${r.max}`,min:"1",placeholder:"From",type:"number",value:`${r.min}`,onInput:n[0]||(n[0]=u=>r.changeMin(u))},null,40,gT)]),c.createElementVNode("div",hT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${r.validated?"disable":""}`)}," To ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!r.validated,max:`${r.maxNumber(r.numberRange)}`,min:`${r.min}`,placeholder:"To",type:"number",value:`${r.max}`,onInput:n[1]||(n[1]=u=>r.changeMax(u))},null,40,pT)])])):c.createCommentVNode("",!0),c.renderSlot(r.$slots,"input"),c.createVNode(l,{onExclude:r.excludeFilter,onFilter_missing:r.missingFilter,onMatch:r.matchFilter},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"filter")]),_:3},8,["onExclude","onFilter_missing","onMatch"])])}var mf=st(uT,[["render",yT]]),Lw="",zw="";const NT={id:"dp-container"},jT=c.createElementVNode("div",{class:"dp__calendar_range"},[c.createElementVNode("p",null,"From"),c.createElementVNode("p",null,"To")],-1),IT={class:"dp__multi"},mT=["value"],DT=["value"],xT=c.createTextVNode(" Back "),vT=["onClick"],bT=["onClick"],TT=["onClick"],AT=["onClick"],kT=["onClick"],wT=["onClick"],LT=["onClick"],zT=["onClick"],ST=c.createElementVNode("div",{id:"tags",class:"dp__calendar_tags"},null,-1),OT={__name:"AdvancedDatePicker",props:{numberRange:{type:Array,required:!0}},emits:["update"],setup(r,{emit:n}){const t=c.ref(["",""]),o=c.ref(null),e=c.ref(null),i=c.ref(null),a=c.ref(!1),s=c.ref([{label:"Today",range:[new Date,new Date],slot:"today"},{label:"Previous week",range:[Cc(Oc(new Date)),Oc(new Date)],slot:"previousWeek"},{label:"This week",range:[Cc(new Date),k0(new Date)],slot:"week"},{label:"Next week",range:[L0(new Date),w0(new Date().setDate(new Date().getDate()+7))],slot:"nextWeek"},{label:"This month",range:[Pr(new Date),Br(new Date)],slot:"currentMonth"},{label:"Previous month",range:[Pr(It(new Date,1)),Br(It(new Date,1))],slot:"previousMonth"},{label:"Last 3 months",range:[Pr(It(new Date,3)),Br(It(new Date,1))],slot:"threeMonths"},{label:"Last 6 months",range:[Pr(It(new Date,6)),Br(It(new Date,1))],slot:"sixMonths"},{label:"Last year",range:[Xf(new Date),Jf(new Date)],slot:"yearly"}]),l=f=>{t.value=f,console.log(t.value),n("update",t.value)};function u(f){e.value=f.target.value,t.value=[f.target.value,o.value]}function d(f){o.value=f.target.value,t.value=[e.value,f.target.value]}c.onMounted(()=>{i.value.openMenu()});function M(){i.value.openMenu()}return(f,p)=>(c.openBlock(),c.createElementBlock("div",NT,[jT,c.createVNode(c.unref(yi),{ref_key:"datePicker",ref:i,modelValue:t.value,"onUpdate:modelValue":[p[2]||(p[2]=y=>t.value=y),l],"auto-apply":"","day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,"model-type":"dd/MM/yyyy","multi-calendars":"","multi-calendars-solo":"","multi-static":!1,offset:12,position:"left","preset-ranges":s.value,range:"","select-text":"Apply","text-input":"",uid:"advanced",onClosed:M},{"dp-input":c.withCtx(()=>[c.createElementVNode("div",IT,[c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:e.value?e.value:t.value[0],onInput:p[0]||(p[0]=y=>u(y))},null,40,mT),c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:o.value?o.value:t.value[1],onInput:p[1]||(p[1]=y=>d(y))},null,40,DT)])]),"arrow-left":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[xT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"action-select":c.withCtx(()=>[]),previousWeek:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,vT)]))]),week:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,bT)]))]),nextWeek:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,TT)]))]),currentMonth:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,AT)]))]),previousMonth:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,kT)]))]),threeMonths:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,wT)]))]),sixMonths:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,LT)]))]),yearly:c.withCtx(({label:y,range:I,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(I)},c.toDisplayString(y),9,zT)]))]),_:1},8,["modelValue","preset-ranges"]),c.createVNode(mf,{class:"dp__calendar_range_number","number-range":r.numberRange,steps:1},{input:c.withCtx(()=>[ST]),filter:c.withCtx(()=>[c.createVNode(pd,{data:a.value,label:"Include time",onChange:p[3]||(p[3]=y=>a.value=y)},null,8,["data"])]),_:1},8,["number-range"])]))}},CT=c.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:String,default:()=>"bottom",required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let r=this.$refs.main,n=this.$refs[this.target];["right","left"].includes(this.placement)&&(n.style.top=-(((n==null?void 0:n.offsetHeight)-(r==null?void 0:r.offsetHeight))/2)+"px")}}}),ET=["placement","target","tooltipText","trigger"],_T=["id"],QT={class:"text"};function UT(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:r.placement,target:r.target,tooltipText:r.tooltipText,trigger:r.trigger,onClick:n[0]||(n[0]=a=>r.trigger=="click"?r.showTooltip():null),onMouseover:n[1]||(n[1]=a=>r.tooltip())},[c.renderSlot(r.$slots,"default"),c.createElementVNode("div",{id:r.target,ref:r.target,class:c.normalizeClass(`tooltiptext ${r.show}`)},[c.createElementVNode("span",QT,c.toDisplayString(r.tooltipText),1)],10,_T)],40,ET)}var Df=st(CT,[["render",UT]]),Sw="";const YT={class:"copy__text"},BT=["readonly"],PT={__name:"Copiable",props:{text:{type:String,required:!0},placement:{type:String,default:"bottom"},readonly:{type:Boolean,default:!0}},setup(r){const n=r,t=c.ref(""),o=c.ref("copy text");function e(a){navigator.clipboard.writeText(a),o.value="copied !"}function i(){o.value="copy text"}return c.onMounted(()=>{t.value=n.text}),(a,s)=>(c.openBlock(),c.createElementBlock("span",YT,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l),readonly:r.readonly,type:"text",onInput:i},null,40,BT),[[c.vModelText,t.value]]),c.createVNode(Df,{placement:r.placement,target:"tooltiptext","tooltip-text":o.value,trigger:"hover",onClick:s[1]||(s[1]=l=>e(t.value))},{default:c.withCtx(()=>[c.createVNode(Te,{class:"copy__text_icon","icon-name":"copy",size:18})]),_:1},8,["placement","tooltip-text"])]))}};var Ow="";const RT=c.createTextVNode(" Back "),VT=c.createElementVNode("div",null,"today",-1),ZT={__name:"DatePicker",props:{inline:{type:Boolean,default:!0}},emits:["update"],setup(r,{emit:n}){const t=c.ref(),o=c.ref(null),e=a=>{t.value=a,n("update",t.value)},i=c.ref([{date:en(new Date,0),type:"dot",tooltip:[{text:"Dot with tooltip",color:"blue"}]}]);return(a,s)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.unref(yi),{ref_key:"datePicker",ref:o,modelValue:t.value,"onUpdate:modelValue":[s[0]||(s[0]=l=>t.value=l),e],"day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,inline:r.inline,markers:i.value,"month-name-format":"short",offset:12,placeholder:"MM/DD/YYYY","select-text":"Apply","text-input":"",uid:"base"},{"arrow-left":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[RT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"marker-tooltip":c.withCtx(()=>[VT]),_:1},8,["modelValue","inline","markers"])]))}};var Cw="";const WT=["src"],GT={key:3,class:"menu-item-text-wrapper"};var xf=st(c.defineComponent({__name:"DropdownMenuItem",props:{item:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:r=>["none","ellipsis","fit-content"].includes(r)},iconSize:{type:Number,required:!1,default:24}},setup(r){const n=r;return(t,o)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[r.item.iconUrl?(c.openBlock(),c.createElementBlock("img",{key:0,alt:"icon image",class:"icon icon-url",src:r.item.iconUrl},null,8,WT)):c.createCommentVNode("",!0),r.item.iconUrl?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Te,c.mergeProps({key:1,class:"icon"},{...r.item,size:n.iconSize}),null,16)),r.item.subText?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",{key:2,class:c.normalizeClass(["dh-body-2",r.textEllipsisStyle])},c.toDisplayString(r.item.text),3)),r.item.subText?(c.openBlock(),c.createElementBlock("div",GT,[c.createElementVNode("span",{class:c.normalizeClass(["dh-body-1",r.textEllipsisStyle])},c.toDisplayString(r.item.text),3),c.createElementVNode("span",{class:c.normalizeClass(["dh-body-4-medium",r.textEllipsisStyle])},c.toDisplayString(r.item.subText),3)])):c.createCommentVNode("",!0),r.item.isSelected?(c.openBlock(),c.createBlock(Te,{key:4,class:"icon-blue icon-accept","icon-name":"accept",size:16})):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-3a3f37c0"]]),_w="";const HT=["data-e2e","onClick"],FT={key:1,class:"center-vertical"};var $T=st(c.defineComponent({__name:"DropdownMenu",props:{items:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:r=>["none","ellipsis","fit-content"].includes(r)},iconSize:{type:Number,required:!1,default:24},closeOnClickOutside:{type:Boolean,required:!1,default:!0},zIndex:{type:Number,required:!1,default:100},closeOnItemSelected:{type:Boolean,required:!1,default:!0}},emits:["itemSelected","close"],setup(r,{emit:n}){const t=r;c.onMounted(()=>{document.addEventListener("click",i=>{o(i)})});function o(i){const a=i.target,s=document.querySelector("[data-id='dropdown-menu']");s&&!s.contains(i.target)&&!a.classList.contains("dropdown-toggle")&&t.closeOnClickOutside&&n("close")}function e(i){n("itemSelected",i),t.closeOnItemSelected&&n("close")}return(i,a)=>{const s=c.resolveComponent("router-link");return c.openBlock(),c.createElementBlock("div",{class:"dropdown-menu","data-id":"dropdown-menu",style:c.normalizeStyle({"z-index":t.zIndex})},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.items,l=>(c.openBlock(),c.createElementBlock("div",{key:l.iconName,class:"menu-item","data-e2e":l.dataE2eTag,onClick:u=>e(l)},[l.url?(c.openBlock(),c.createBlock(s,{key:0,class:"center-vertical",to:{path:l.url}},{default:c.withCtx(()=>[c.createVNode(xf,{"icon-size":r.iconSize,item:l,"text-ellipsis-style":r.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]),_:2},1032,["to"])):(c.openBlock(),c.createElementBlock("div",FT,[c.createVNode(xf,{"icon-size":r.iconSize,item:l,"text-ellipsis-style":r.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]))],8,HT))),128))],4)}}}),[["__scopeId","data-v-50b04dea"]]),Uw="";const JT={key:0,class:"invalid-feedback"},XT=c.defineComponent({__name:"Error",props:{errors:{type:Object,required:!1,default:void 0}},setup(r){const n=r;return(t,o)=>{var e;return c.unref(n).errors&&((e=c.unref(n).errors)==null?void 0:e.length)>0?(c.openBlock(),c.createElementBlock("div",JT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.errors,i=>(c.openBlock(),c.createElementBlock("span",{key:i},c.toDisplayString(i),1))),128))])):c.createCommentVNode("",!0)}}}),KT=c.defineComponent({components:{DhIcon:Te},props:{title:{type:String,default:"Advanced"},isAdvancedSettingsOpen:{type:Boolean,default:!1}},data(){return{isAdvancedSettingsCurrentlyOpen:!1}},watch:{isAdvancedSettingsOpen:function(r){this.isAdvancedSettingsCurrentlyOpen=r}},mounted(){this.isAdvancedSettingsCurrentlyOpen=this.isAdvancedSettingsOpen}}),qT={class:"dh-body-1-medium"},eA=c.createTextVNode(" Content ");function tA(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(["advanced-panel-header clickable",{opened:r.isAdvancedSettingsCurrentlyOpen,closed:!r.isAdvancedSettingsCurrentlyOpen}]),"data-e2e":"expansion-panel-button",onClick:n[0]||(n[0]=s=>r.isAdvancedSettingsCurrentlyOpen=!r.isAdvancedSettingsCurrentlyOpen)},[c.createElementVNode("h4",qT,c.toDisplayString(r.title),1),c.createVNode(a,{class:"icon","icon-name":r.isAdvancedSettingsCurrentlyOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])],2),r.isAdvancedSettingsCurrentlyOpen?c.renderSlot(r.$slots,"content",{key:0},()=>[eA]):c.createCommentVNode("",!0)],64)}var nA=st(KT,[["render",tA]]),Yw="";const rA=c.createElementVNode("label",{for:"upload_pdf"},[c.createTextVNode(" Drag and drop file or "),c.createElementVNode("span",{id:"upload"},"browse")],-1),oA={key:1,class:"file__upload_items"},iA={class:"file__upload_list_item"},aA={class:"file__upload_list_item_label"},sA=["title"],lA={key:0,class:"label__antivirus"},uA={key:1,class:"label__antivirus label__antivirus--failed"},cA={key:2,class:"label__antivirus label__antivirus--detected"},dA=c.createElementVNode("br",null,null,-1),MA={key:3},fA={key:4},gA={key:0},hA=["value"],pA=["href"],yA={key:2,class:"file__upload_placeholder"},NA={key:3,class:"file__upload_action"},jA=c.createElementVNode("button",{class:"file__upload_action_cancel"},"Cancel",-1),IA={__name:"FileUpload",props:{uploadProgress:{type:Array,required:!0},errorOccurred:{type:Array,required:!0},virusCheck:{type:Array,required:!0},modelValue:{type:FileList,required:!1,default:void 0},inline:{type:Boolean,required:!1,default:!1},errorMessage:{type:String,required:!1,default:"an error occurred while uploading"},fileSaved:{type:Boolean,required:!1,default:!1},virusCheckText:{type:String,required:!1,default:"Antivirus check ..."},virusCheckFailedText:{type:String,required:!1,default:"Antivirus check failed"},virusDetectedText:{type:String,required:!1,default:"Virus detected"},deleteConfirmationText:{type:String,required:!1,default:"Are you sure you want to delete it permanently? this action will be irreversible"},zIndex:{type:Number,required:!1,default:99}},emits:["update:modelValue","save:modelValue","reload"],setup(r,{emit:n}){const t=r,o=c.ref(null),e=c.ref(!1),i=c.ref([]),a=c.ref([".pdf",".csv",".doc",".jpeg",".mp4",".png",".txt",".xls"]);function s(D,m=2){if(!+D)return"0 Bytes";const j=1024,T=m<0?0:m,L=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],k=Math.floor(Math.log(D)/Math.log(j));return`${parseFloat((D/Math.pow(j,k)).toFixed(T))} ${L[k]}`}function l(D){return a.value.includes(d(D))?d(D).slice(1):"unknown"}function u(D){const m=D.lastIndexOf(".");let j=D.slice(0,m);return j.length<=15?j:j.slice(0,15)+"... "}function d(D){return D.replace(/.*(?=\.)/g,"")}function M(D){D.stopPropagation(),i.value=o.value.files,i.value&&(e.value=!0),n("update:modelValue",i.value)}function f(D){D.stopPropagation(),D.dataTransfer.dropEffect="copy"}function p(D){D.stopPropagation(),e.value=!0,i.value=D.dataTransfer.files,n("update:modelValue",i.value)}function y(D){window.confirm(t.deleteConfirmationText)&&I(D)}function I(D){const m=new DataTransfer;for(let j=0;j<i.value.length;j++){const T=i.value[j];D!==j&&m.items.add(T)}i.value=m.files,i.value.length==0&&(e.value=!1)}function v(){n("save:modelValue",i.value)}function h(D){return URL.createObjectURL(D)}function N(D){D.preventDefault(),n("reload")}return(D,m)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["file__upload",r.inline?"":"file__upload_box"])},[r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:"file__upload_btn",onDragover:m[1]||(m[1]=c.withModifiers(j=>f(j),["prevent"])),onDrop:m[2]||(m[2]=c.withModifiers(j=>p(j),["prevent"]))},[c.createVNode(Te,{class:"file__upload_btn_icon","icon-name":"upload",size:24}),rA,c.createElementVNode("input",{id:"upload_pdf",ref_key:"upload",ref:o,multiple:"",name:"file",type:"file",onInput:m[0]||(m[0]=j=>M(j))},null,544)],32)),e.value?(c.openBlock(),c.createElementBlock("div",oA,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(j,T)=>(c.openBlock(),c.createElementBlock("div",{key:T,class:c.normalizeClass(["file__upload_list",r.inline?"":"file__upload_list_box"])},[c.createVNode(Te,{class:c.normalizeClass(r.errorOccurred[T]?"file__upload_list_icon":""),"icon-name":"file-"+l(j.name),size:40},null,8,["class","icon-name"]),t.uploadProgress[T]==100&&r.fileSaved&&!r.errorOccurred[T]&&r.virusCheck[T]=="loading"?(c.openBlock(),c.createBlock(Te,{key:0,class:"file__upload_list_icon_sub file__upload_list_icon_sub--loading","icon-name":"states",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="failed"?(c.openBlock(),c.createBlock(Te,{key:1,class:"file__upload_list_icon_sub","icon-name":"warning",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="detected"?(c.openBlock(),c.createBlock(Te,{key:2,class:"file__upload_list_icon_sub","icon-name":"danger",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createBlock(Te,{key:3,class:"file__upload_list_icon_sub","icon-name":"error",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),c.createElementVNode("div",iA,[c.createElementVNode("div",aA,[c.createElementVNode("div",null,[c.createElementVNode("span",{title:j.name},c.toDisplayString(u(j.name))+c.toDisplayString(d(j.name)),9,sA),t.uploadProgress[T]==100&&r.fileSaved&&!r.errorOccurred[T]&&r.virusCheck[T]=="loading"?(c.openBlock(),c.createElementBlock("span",lA,[c.createTextVNode(c.toDisplayString(r.virusCheckText)+" ",1),c.createVNode(Te,{class:"file__upload_list_icon_sub--loading","icon-name":"processing",size:18})])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="failed"?(c.openBlock(),c.createElementBlock("span",uA,c.toDisplayString(r.virusCheckFailedText),1)):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="detected"?(c.openBlock(),c.createElementBlock("span",cA,c.toDisplayString(r.virusDetectedText),1)):c.createCommentVNode("",!0),dA,r.fileSaved&&!r.errorOccurred[T]||!r.errorOccurred[T]&&r.virusCheck[T]?(c.openBlock(),c.createElementBlock("span",MA,c.toDisplayString(s(j.size)),1)):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("span",fA,c.toDisplayString(r.errorMessage),1)):c.createCommentVNode("",!0)]),r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",gA,c.toDisplayString(t.uploadProgress[T])+"%",1))]),r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("progress",{key:0,id:"file",max:"100",value:t.uploadProgress[T]},c.toDisplayString(t.uploadProgress[T])+"% ",9,hA))]),r.fileSaved&&!r.virusCheck[T]&&!r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("a",{key:4,class:"file__upload_list_download",download:"",href:h(j)},[c.createVNode(Te,{class:"file__upload_list_download_icon","icon-name":"download",size:24})],8,pA)):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("a",{key:5,class:"file__upload_list_retry",onClick:m[3]||(m[3]=L=>N(L))},[c.createVNode(Te,{class:"file__upload_list_retry_icon","icon-name":"retry",size:24})])):c.createCommentVNode("",!0),t.uploadProgress[T]!==100?(c.openBlock(),c.createBlock(Te,{key:6,class:"file__upload_list_delete","icon-name":"close",size:24,onClick:L=>I(T)},null,8,["onClick"])):(c.openBlock(),c.createBlock(Te,{key:7,class:"file__upload_list_delete","icon-name":"delete",size:24,onClick:L=>y(T)},null,8,["onClick"]))],2))),128))])):c.createCommentVNode("",!0),!e.value&&!r.inline?(c.openBlock(),c.createElementBlock("div",yA," No file selected ")):c.createCommentVNode("",!0),!r.inline&&!r.fileSaved?(c.openBlock(),c.createElementBlock("div",NA,[jA,c.createElementVNode("button",{class:c.normalizeClass(["file__upload_action_done",e.value&&!r.fileSaved?"file__upload_action_done--active":""]),onClick:v}," Done ",2)])):c.createCommentVNode("",!0)],2))}};var Bw="";const mA={class:"input__dropdown"},DA=["placeholder","value"],xA={class:"input__dropdown_second"},vA=["tabindex"],bA=["onClick"],TA=["onClick"],vf={__name:"InputDropdown",props:{list:{type:Array,required:!0},labelProp:{type:String,default:"label"},icon:{type:String,required:!0},placeholderInput:{type:String,default:"Enter value"},tabindex:{type:Number,required:!1,default:0},inputValue:{type:String,required:!1,default:""},inputIndex:{type:Number,required:!1,default:0},inputWidth:{type:String,required:!1,default:"75%"}},emits:["update"],setup(r,{emit:n}){const t=r,o=c.ref(t.list[0].label),e=c.ref(!1),i=c.ref(null);c.onMounted(()=>{n("update","",o.value)});function a(){n("update",i.value.value,o.value,t.inputIndex)}return(s,l)=>(c.openBlock(),c.createElementBlock("div",mA,[c.createElementVNode("input",{ref_key:"name",ref:i,class:"input__dropdown_text",placeholder:r.placeholderInput,style:c.normalizeStyle({width:r.inputWidth}),type:"text",value:r.inputValue,onInput:a},null,44,DA),c.createElementVNode("div",xA,[c.createVNode(Te,{"icon-name":r.icon,size:18},null,8,["icon-name"]),c.createElementVNode("div",{class:"custom__select",tabindex:r.tabindex,onBlur:l[1]||(l[1]=u=>e.value=!1)},[c.createElementVNode("div",{class:c.normalizeClass(["custom__select_selected",{"custom__select--open":e.value}]),onClick:l[0]||(l[0]=u=>e.value=!e.value)},c.toDisplayString(o.value),3),typeof r.list[0]=="object"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,(u,d)=>(c.openBlock(),c.createElementBlock("div",{key:d,onClick:M=>{o.value=u[r.labelProp],e.value=!1,a()}},c.toDisplayString(u[r.labelProp]),9,bA))),128))],2)):c.createCommentVNode("",!0),typeof r.list[0]=="string"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,(u,d)=>(c.openBlock(),c.createElementBlock("div",{key:d,onClick:M=>{o.value=u,e.value=!1,a()}},c.toDisplayString(u),9,TA))),128))],2)):c.createCommentVNode("",!0)],40,vA)])]))}};var Pw="";const AA={class:"input-group-multiple"},kA={class:"input-label"},wA={__name:"InputDropdownMultiple",props:{labelProp:{type:String,default:"Label"},icon:{type:String,required:!0},placeholderInput:{type:String,default:"Enter value"},tabindex:{type:Number,required:!1,default:0},inputIndex:{type:Number,required:!1,default:0},inputWidth:{type:String,required:!1,default:"75%"},multipleProp:{type:Array,required:!0},inputFirstValue:{type:String,required:!1,default:null}},emits:["update"],setup(r,{emit:n}){const t=r,o=c.reactive(t.multipleProp);function e(a,s,l){o&&(o.map(u=>{u.id===l&&(u.input=a,u.optionSelected=s)}),n("update",o))}function i(){o&&o.push({id:o.length+1,list:o[0].list,input:null,optionSelected:null})}return c.watch(()=>t.inputFirstValue,a=>{o[0].input=a}),(a,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",AA,[c.createElementVNode("label",kA,c.toDisplayString(r.labelProp),1),c.createElementVNode("button",{class:"btn btn-secondary btn-multiple",onClick:i},[c.createVNode(Te,{"icon-name":"plus",size:24})])]),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o,(l,u)=>(c.openBlock(),c.createBlock(vf,{key:u,icon:t.icon,"input-index":l.id,"input-value":l.input,"input-width":t.inputWidth,list:l.list,"placeholder-input":t.placeholderInput,tabindex:t.tabindex,onUpdate:e},null,8,["icon","input-index","input-value","input-width","list","placeholder-input","tabindex"]))),128))],64))}};var Rw="";const LA={class:"input__group"},zA=["placeholder","type","value"],SA={__name:"InputGroup",props:{modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text"},iconName:{type:String,required:!0},widthProp:{type:String,default:"200px"},heightProp:{type:String,default:"30px"},direction:{type:String,default:"right"},placeholder:{type:String,default:"type here"}},emits:["update:modelValue"],setup(r){const n=r;c.useCssVars(o=>({"9bbc973e":t.value,"17a45996":r.widthProp,d5af8106:r.heightProp}));const t=c.ref("row");return c.onMounted(()=>{n.direction=="left"&&(t.value="row-reverse")}),(o,e)=>(c.openBlock(),c.createElementBlock("div",LA,[c.createElementVNode("input",{class:"input__group_field",placeholder:r.placeholder,type:r.inputType,value:r.modelValue,onInput:e[0]||(e[0]=i=>o.$emit("update:modelValue",i.target.value))},null,40,zA),c.createVNode(Te,{class:"input__group_icon","icon-name":r.iconName},null,8,["icon-name"])]))}};var OA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR2SURBVHgBlVVdaFtlGH6+LydJ89OYtHVbf+YyhoPK5uK2G3/oIlTYhRctKApebAiCXowtDLzxIi3sUqnBiiBerF6osGl7J0idqWyD4WSZF3PzZ4tt7Y/NmnRN0yYn5/t8z9e0Ne35Wnwg5Jzzvt/7vO/7vT8MO6BnYDEuPP4TXMi4kIgyxqOrElEAZEZKZLhVHhpJBDPb2WE6wcsDZtwwXEkJGd9G7T9WRJqZ+f6RxONprUp9BDIs3CLJJM7tSLAJkg5xIT6EVSTCSEFLdPKT5ai36hqWzBVj8v+R1IFVM8y0ekcSvuwWop6BfFgaoR8kY0RSf04qRUriSh6l/AzcDY3wRtpgmWUSUhSewFYuITMFwV9MJ5iKzFgTCHfITtcWEhvW/H38NfYpViZ+UZ7Jmn920B3dZxDuPLnljOQsFmYiSY8J+53Xook734nE4v1r+P2rBMoTt1VUqzRC/ThFU85P2m7CCYKxc3bVrhNZRjDpdPHmoxnMXBmErFbgDIncza+RuzGE1QTXQ1k0fElF9OpAJcaZK+5kZuHuKCqlAraDbWzmxmWUJm5pXEH89Y8W49w0cNrBGYWlqTvbFvjTna1oigQoLQKP/ryq0eIooSFOxcCP6AxJaWkkDAEfw/uJ52GaJt658D1yhSmdGdJmJ+iOZEyrQaFeOPss9u3xKXUVHlXN8UO78U2qFx0tbuxv9eOzZDepCr0ZGlsGdUFYR3L04C50H4ugt2s/HkwXsVgqoyXUgLbdQeITtgFFEPK58VR7iFKk81dEuU7m5yWkXmtEo98Ao0jeS12FWeVo3+WnZhT48edJvNl3RTkU8nN8fKoJAWNJE5HdsJJl6SG6WVZhbsyZfuxVlSLwwbtd2NMcUM/2wReOP4Enoy2rVuhbQTRhpep25pGiwBmvZJ2EVcuD8/fewGwloIy1NftUdUlqUkn7glPKWpsblO7flTDO330FFjyORKSd4bBcY9CCYboUXFe3S9UmYmuvNeTJGRrEziTM1q/eJieLaWhAnuDbiQO12cZgLa0Ay1UI+7eyUfqjMwehWymMHHNXqxc57Y003W5aR3YrfwCXsp3KkCvgAfd7wX3073PRLAOGxztxbWqfrudtpC/R9uWrrGa/1KjS6MSXfxzFFxNdsJhXxUmOQbj8+Py35zB07xilh2kyAoom328/K6KRM740mUxtHoz2fRTmBKYfMMxXaP+wCMzcAsyHCyQLomRElayQs+y1tAVUAKnLtdW+3ke8avSRILNGZpPMjlsozlMBUI6u36Ebaz8M+OjiPUHwvc9g9KeyWkqLD13ITdpkG9OBPmcQNPrW3uti7hlYjkq3Z5iSH8vPEslCfSV1Ha7g1EucSt/Exe8krv/qrzMQeMxCUyu3d1WGutt5lW+QyXDZLPf9M26cldAODkfY99zSUU4FvL6+kdoK1xKt4dDbc3G3EUmSQhw7EDLqFSFZmvZtf2bQvm8HHeyA2FvFGPd6TlN0R0iZJj0Lq2NSZiWsLGNsjKOYvjlIbbIN/gUK8Nn86IrnuAAAAABJRU5ErkJggg==";function $t(r){return[null,void 0].indexOf(r)!==-1}function CA(r,n,t){const{object:o,valueProp:e,mode:i}=c.toRefs(r),a=c.getCurrentInstance().proxy,s=t.iv,l=M=>{s.value=d(M);const f=u(M);n.emit("change",f,a),n.emit("input",f),n.emit("update:modelValue",f)},u=M=>o.value||$t(M)?M:Array.isArray(M)?M.map(f=>f[e.value]):M[e.value],d=M=>$t(M)?i.value==="single"?{}:[]:M;return{update:l}}function EA(r,n){const{value:t,modelValue:o,mode:e,valueProp:i}=c.toRefs(r),a=c.ref(e.value!=="single"?[]:{}),s=o&&o.value!==void 0?o:t,l=c.computed(()=>e.value==="single"?a.value[i.value]:a.value.map(d=>d[i.value])),u=c.computed(()=>e.value!=="single"?a.value.map(d=>d[i.value]).join(","):a.value[i.value]);return{iv:a,internalValue:a,ev:s,externalValue:s,textValue:u,plainValue:l}}function _A(r,n,t){const{regex:o}=c.toRefs(r),e=c.getCurrentInstance().proxy,i=t.isOpen,a=t.open,s=c.ref(null),l=c.ref(null),u=()=>{s.value=""},d=p=>{s.value=p.target.value},M=p=>{if(o&&o.value){let y=o.value;typeof y=="string"&&(y=new RegExp(y)),p.key.match(y)||p.preventDefault()}},f=p=>{if(o&&o.value){let I=(p.clipboardData||window.clipboardData).getData("Text"),v=o.value;typeof v=="string"&&(v=new RegExp(v)),I.split("").every(h=>!!h.match(v))||p.preventDefault()}n.emit("paste",p,e)};return c.watch(s,p=>{!i.value&&p&&a(),n.emit("search-change",p,e)}),{search:s,input:l,clearSearch:u,handleSearchInput:d,handleKeypress:M,handlePaste:f}}function QA(r,n,t){const{groupSelect:o,mode:e,groups:i,disabledProp:a}=c.toRefs(r),s=c.ref(null),l=d=>{d===void 0||d!==null&&d[a.value]||i.value&&d&&d.group&&(e.value==="single"||!o.value)||(s.value=d)};return{pointer:s,setPointer:l,clearPointer:()=>{l(null)}}}function ta(r,n=!0){return n?String(r).toLowerCase().trim():String(r).normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().trim()}function UA(r){return Object.prototype.toString.call(r)==="[object Object]"}function YA(r,n){const t=n.slice().sort();return r.length===n.length&&r.slice().sort().every(function(o,e){return o===t[e]})}function BA(r,n,t){const{options:o,mode:e,trackBy:i,limit:a,hideSelected:s,createTag:l,createOption:u,label:d,appendNewTag:M,appendNewOption:f,multipleLabel:p,object:y,loading:I,delay:v,resolveOnLoad:h,minChars:N,filterResults:D,clearOnSearch:m,clearOnSelect:j,valueProp:T,canDeselect:L,max:k,strict:z,closeOnSelect:O,groups:b,reverse:g,infinite:x,groupOptions:A,groupHideEmpty:w,groupSelect:C,onCreate:E,disabledProp:S,searchStart:_}=c.toRefs(r),Y=c.getCurrentInstance().proxy,U=t.iv,Q=t.ev,B=t.search,V=t.clearSearch,P=t.update,R=t.pointer,W=t.clearPointer,G=t.focus,F=t.deactivate,X=t.close,ie=c.ref([]),ee=c.ref([]),ae=c.ref(!1),fe=c.ref(null),Z=c.ref(x.value&&a.value===-1?10:a.value),q=c.computed(()=>l.value||u.value||!1),ce=c.computed(()=>M.value!==void 0?M.value:f.value!==void 0?f.value:!0),ue=c.computed(()=>{if(b.value){let $=ee.value||[],se=[];return $.forEach(Ie=>{Nt(Ie[A.value]).forEach(ne=>{se.push(Object.assign({},ne,Ie[S.value]?{[S.value]:!0}:{}))})}),se}else{let $=Nt(ee.value||[]);return ie.value.length&&($=$.concat(ie.value)),$}}),Ne=c.computed(()=>b.value?De((ee.value||[]).map(($,se)=>{const Ie=Nt($[A.value]);return{...$,index:se,group:!0,[A.value]:Bt(Ie,!1).map(ne=>Object.assign({},ne,$[S.value]?{[S.value]:!0}:{})),__VISIBLE__:Bt(Ie).map(ne=>Object.assign({},ne,$[S.value]?{[S.value]:!0}:{}))}})):[]),Se=c.computed(()=>{let $=ue.value;return g.value&&($=$.reverse()),te.value.length&&($=te.value.concat($)),Bt($)}),be=c.computed(()=>{let $=Se.value;return Z.value>0&&($=$.slice(0,Z.value)),$}),H=c.computed(()=>{switch(e.value){case"single":return!$t(U.value[T.value]);case"multiple":case"tags":return!$t(U.value)&&U.value.length>0}}),K=c.computed(()=>p!==void 0&&p.value!==void 0?p.value(U.value,Y):U.value&&U.value.length>1?`${U.value.length} options selected`:"1 option selected"),re=c.computed(()=>!ue.value.length&&!ae.value&&!te.value.length),le=c.computed(()=>ue.value.length>0&&be.value.length==0&&(B.value&&b.value||!b.value)),te=c.computed(()=>q.value===!1||!B.value?[]:pe(B.value)!==-1?[]:[{[T.value]:B.value,[d.value]:B.value,[oe.value]:B.value,__CREATE__:!0}]),oe=c.computed(()=>i.value||d.value),me=c.computed(()=>{switch(e.value){case"single":return null;case"multiple":case"tags":return[]}}),Qe=c.computed(()=>I.value||ae.value),Oe=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":P($);break;case"multiple":case"tags":P(U.value.concat($));break}n.emit("select",it($),$,Y)},tt=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":Ut();break;case"tags":case"multiple":P(Array.isArray($)?U.value.filter(se=>$.map(Ie=>Ie[T.value]).indexOf(se[T.value])===-1):U.value.filter(se=>se[T.value]!=$[T.value]));break}n.emit("deselect",it($),$,Y)},it=$=>y.value?$:$[T.value],Jt=$=>{tt($)},ln=($,se)=>{if(se.button!==0){se.preventDefault();return}Jt($)},Ut=()=>{n.emit("clear",Y),P(me.value)},gt=$=>{if($.group!==void 0)return e.value==="single"?!1:Ue($[A.value])&&$[A.value].length;switch(e.value){case"single":return!$t(U.value)&&U.value[T.value]==$[T.value];case"tags":case"multiple":return!$t(U.value)&&U.value.map(se=>se[T.value]).indexOf($[T.value])!==-1}},ut=$=>$[S.value]===!0,Xt=()=>k===void 0||k.value===-1||!H.value&&k.value>0?!1:U.value.length>=k.value,Tt=$=>{if(!ut($)){if(E&&E.value&&!gt($)&&$.__CREATE__&&($={...$},delete $.__CREATE__,$=E.value($,Y),$ instanceof Promise)){ae.value=!0,$.then(se=>{ae.value=!1,bn(se)});return}bn($)}},bn=$=>{switch($.__CREATE__&&($={...$},delete $.__CREATE__),e.value){case"single":if($&&gt($)){L.value&&tt($);return}$&&At($),j.value&&V(),O.value&&(W(),X()),$&&Oe($);break;case"multiple":if($&&gt($)){tt($);return}if(Xt())return;$&&(At($),Oe($)),j.value&&V(),s.value&&W(),O.value&&X();break;case"tags":if($&&gt($)){tt($);return}if(Xt())return;$&&At($),j.value&&V(),$&&Oe($),s.value&&W(),O.value&&X();break}O.value||G()},Vn=$=>{if(!(ut($)||e.value==="single"||!C.value)){switch(e.value){case"multiple":case"tags":Yt($[A.value])?tt($[A.value]):Oe($[A.value].filter(se=>U.value.map(Ie=>Ie[T.value]).indexOf(se[T.value])===-1).filter(se=>!se[S.value]).filter((se,Ie)=>U.value.length+1+Ie<=k.value||k.value===-1));break}O.value&&F()}},At=$=>{J($[T.value])===void 0&&q.value&&(n.emit("tag",$[T.value],Y),n.emit("option",$[T.value],Y),ce.value&&je($),V())},Tn=()=>{e.value!=="single"&&Oe(be.value)},Yt=$=>$.find(se=>!gt(se)&&!se[S.value])===void 0,Ue=$=>$.find(se=>!gt(se))===void 0,J=$=>ue.value[ue.value.map(se=>String(se[T.value])).indexOf(String($))],pe=($,se=!0)=>ue.value.map(Ie=>parseInt(Ie[oe.value])==Ie[oe.value]?parseInt(Ie[oe.value]):Ie[oe.value]).indexOf(parseInt($)==$?parseInt($):$),ge=$=>["tags","multiple"].indexOf(e.value)!==-1&&s.value&&gt($),je=$=>{ie.value.push($)},De=$=>w.value?$.filter(se=>B.value?se.__VISIBLE__.length:se[A.value].length):$.filter(se=>B.value?se.__VISIBLE__.length:!0),Bt=($,se=!0)=>{let Ie=$;return B.value&&D.value&&(Ie=Ie.filter(ne=>_.value?ta(ne[oe.value],z.value).startsWith(ta(B.value,z.value)):ta(ne[oe.value],z.value).indexOf(ta(B.value,z.value))!==-1)),s.value&&se&&(Ie=Ie.filter(ne=>!ge(ne))),Ie},Nt=$=>{let se=$;return UA(se)&&(se=Object.keys(se).map(Ie=>{let ne=se[Ie];return{[T.value]:Ie,[oe.value]:ne,[d.value]:ne}})),se=se.map(Ie=>typeof Ie=="object"?Ie:{[T.value]:Ie,[oe.value]:Ie,[d.value]:Ie}),se},Kt=()=>{$t(Q.value)||(U.value=cn(Q.value))},qt=$=>(ae.value=!0,new Promise((se,Ie)=>{o.value(B.value,Y).then(ne=>{ee.value=ne||[],typeof $=="function"&&$(ne),ae.value=!1}).catch(ne=>{console.error(ne),ee.value=[],ae.value=!1}).finally(()=>{se()})})),un=()=>{if(!!H.value)if(e.value==="single"){let $=J(U.value[T.value]);if($!==void 0){let se=$[d.value];U.value[d.value]=se,y.value&&(Q.value[d.value]=se)}}else U.value.forEach(($,se)=>{let Ie=J(U.value[se][T.value]);if(Ie!==void 0){let ne=Ie[d.value];U.value[se][d.value]=ne,y.value&&(Q.value[se][d.value]=ne)}})},Zn=$=>{qt($)},cn=$=>$t($)?e.value==="single"?{}:[]:y.value?$:e.value==="single"?J($)||{}:$.filter(se=>!!J(se)).map(se=>J(se)),Cr=()=>{fe.value=c.watch(B,$=>{$.length<N.value||!$&&N.value!==0||(ae.value=!0,m.value&&(ee.value=[]),setTimeout(()=>{$==B.value&&o.value(B.value,Y).then(se=>{($==B.value||!B.value)&&(ee.value=se,R.value=be.value.filter(Ie=>Ie[S.value]!==!0)[0]||null,ae.value=!1)}).catch(se=>{console.error(se)})},v.value))},{flush:"sync"})};if(e.value!=="single"&&!$t(Q.value)&&!Array.isArray(Q.value))throw new Error(`v-model must be an array when using "${e.value}" mode`);return o&&typeof o.value=="function"?h.value?qt(Kt):y.value==!0&&Kt():(ee.value=o.value,Kt()),v.value>-1&&Cr(),c.watch(v,($,se)=>{fe.value&&fe.value(),$>=0&&Cr()}),c.watch(Q,$=>{if($t($)){U.value=cn($);return}switch(e.value){case"single":(y.value?$[T.value]!=U.value[T.value]:$!=U.value[T.value])&&(U.value=cn($));break;case"multiple":case"tags":YA(y.value?$.map(se=>se[T.value]):$,U.value.map(se=>se[T.value]))||(U.value=cn($));break}},{deep:!0}),c.watch(o,($,se)=>{typeof r.options=="function"?h.value&&(!se||$&&$.toString()!==se.toString())&&qt():(ee.value=r.options,Object.keys(U.value).length||Kt(),un())}),c.watch(d,un),{pfo:Se,fo:be,filteredOptions:be,hasSelected:H,multipleLabelText:K,eo:ue,extendedOptions:ue,fg:Ne,filteredGroups:Ne,noOptions:re,noResults:le,resolving:ae,busy:Qe,offset:Z,select:Oe,deselect:tt,remove:Jt,selectAll:Tn,clear:Ut,isSelected:gt,isDisabled:ut,isMax:Xt,getOption:J,handleOptionClick:Tt,handleGroupClick:Vn,handleTagRemove:ln,refreshOptions:Zn,resolveOptions:qt,refreshLabels:un}}function PA(r,n,t){const{valueProp:o,showOptions:e,searchable:i,groupLabel:a,groups:s,mode:l,groupSelect:u,disabledProp:d}=c.toRefs(r),M=t.fo,f=t.fg,p=t.handleOptionClick,y=t.handleGroupClick,I=t.search,v=t.pointer,h=t.setPointer,N=t.clearPointer,D=t.multiselect,m=t.isOpen,j=c.computed(()=>M.value.filter(P=>!P[d.value])),T=c.computed(()=>f.value.filter(P=>!P[d.value])),L=c.computed(()=>l.value!=="single"&&u.value),k=c.computed(()=>v.value&&v.value.group),z=c.computed(()=>B(v.value)),O=c.computed(()=>{const P=k.value?v.value:B(v.value),R=T.value.map(G=>G[a.value]).indexOf(P[a.value]);let W=T.value[R-1];return W===void 0&&(W=g.value),W}),b=c.computed(()=>{let P=T.value.map(R=>R.label).indexOf(k.value?v.value[a.value]:B(v.value)[a.value])+1;return T.value.length<=P&&(P=0),T.value[P]}),g=c.computed(()=>[...T.value].slice(-1)[0]),x=c.computed(()=>v.value.__VISIBLE__.filter(P=>!P[d.value])[0]),A=c.computed(()=>{const P=z.value.__VISIBLE__.filter(R=>!R[d.value]);return P[P.map(R=>R[o.value]).indexOf(v.value[o.value])-1]}),w=c.computed(()=>{const P=B(v.value).__VISIBLE__.filter(R=>!R[d.value]);return P[P.map(R=>R[o.value]).indexOf(v.value[o.value])+1]}),C=c.computed(()=>[...O.value.__VISIBLE__.filter(P=>!P[d.value])].slice(-1)[0]),E=c.computed(()=>[...g.value.__VISIBLE__.filter(P=>!P[d.value])].slice(-1)[0]),S=P=>!!v.value&&(!P.group&&v.value[o.value]==P[o.value]||P.group!==void 0&&v.value[a.value]==P[a.value])?!0:void 0,_=()=>{h(j.value[0]||null)},Y=()=>{!v.value||v.value[d.value]===!0||(k.value?y(v.value):p(v.value))},U=()=>{if(v.value===null)h((s.value&&L.value?T.value[0]:j.value[0])||null);else if(s.value&&L.value){let P=k.value?x.value:w.value;P===void 0&&(P=b.value),h(P||null)}else{let P=j.value.map(R=>R[o.value]).indexOf(v.value[o.value])+1;j.value.length<=P&&(P=0),h(j.value[P]||null)}c.nextTick(()=>{V()})},Q=()=>{if(v.value===null){let P=j.value[j.value.length-1];s.value&&L.value&&(P=E.value,P===void 0&&(P=g.value)),h(P||null)}else if(s.value&&L.value){let P=k.value?C.value:A.value;P===void 0&&(P=k.value?O.value:z.value),h(P||null)}else{let P=j.value.map(R=>R[o.value]).indexOf(v.value[o.value])-1;P<0&&(P=j.value.length-1),h(j.value[P]||null)}c.nextTick(()=>{V()})},B=P=>T.value.find(R=>R.__VISIBLE__.map(W=>W[o.value]).indexOf(P[o.value])!==-1),V=()=>{let P=D.value.querySelector("[data-pointed]");if(!P)return;let R=P.parentElement.parentElement;s.value&&(R=k.value?P.parentElement.parentElement.parentElement:P.parentElement.parentElement.parentElement.parentElement),P.offsetTop+P.offsetHeight>R.clientHeight+R.scrollTop&&(R.scrollTop=P.offsetTop+P.offsetHeight-R.clientHeight),P.offsetTop<R.scrollTop&&(R.scrollTop=P.offsetTop)};return c.watch(I,P=>{i.value&&(P.length&&e.value?_():N())}),c.watch(m,P=>{if(P){let R=D.value.querySelectorAll("[data-selected]")[0];if(!R)return;let W=R.parentElement.parentElement;c.nextTick(()=>{W.scrollTop>0||(W.scrollTop=R.offsetTop)})}}),{pointer:v,canPointGroups:L,isPointed:S,setPointerFirst:_,selectPointer:Y,forwardPointer:U,backwardPointer:Q}}function RA(r,n,t){const{disabled:o}=c.toRefs(r),e=c.getCurrentInstance().proxy,i=c.ref(!1);return{isOpen:i,open:()=>{i.value||o.value||(i.value=!0,n.emit("open",e))},close:()=>{!i.value||(i.value=!1,n.emit("close",e))}}}function VA(r,n,t){const{searchable:o,disabled:e}=c.toRefs(r),i=t.input,a=t.open,s=t.close,l=t.clearSearch,u=t.isOpen,d=c.ref(null),M=c.ref(null),f=c.ref(null),p=c.ref(!1),y=c.ref(!1),I=c.computed(()=>o.value||e.value?-1:0),v=()=>{o.value&&i.value.blur(),M.value.blur()},h=()=>{o.value&&!e.value&&i.value.focus()},N=(k=!0)=>{e.value||(p.value=!0,k&&a())},D=()=>{p.value=!1,setTimeout(()=>{p.value||(s(),l())},1)};return{multiselect:d,wrapper:M,tags:f,tabindex:I,isActive:p,mouseClicked:y,blur:v,focus:h,activate:N,deactivate:D,handleFocusIn:k=>{k.target.closest("[data-tags]")||k.target.closest("[data-clear]")||N(y.value)},handleFocusOut:()=>{D()},handleCaretClick:()=>{D(),v()},handleMousedown:k=>{y.value=!0,u.value&&(k.target.isEqualNode(M.value)||k.target.isEqualNode(f.value))?setTimeout(()=>{D()},0):document.activeElement.isEqualNode(M.value)&&!u.value&&(console.log(k.target.closest("[data-tags]")),N()),setTimeout(()=>{y.value=!1},0)}}}function ZA(r,n,t){const{mode:o,addTagOn:e,openDirection:i,searchable:a,showOptions:s,valueProp:l,groups:u,addOptionOn:d,createTag:M,createOption:f,reverse:p}=c.toRefs(r),y=c.getCurrentInstance().proxy,I=t.iv,v=t.update,h=t.search,N=t.setPointer,D=t.selectPointer,m=t.backwardPointer,j=t.forwardPointer,T=t.multiselect,L=t.wrapper,k=t.tags,z=t.isOpen,O=t.open,b=t.blur,g=t.fo,x=c.computed(()=>M.value||f.value||!1),A=c.computed(()=>e.value!==void 0?e.value:d.value!==void 0?d.value:["enter"]),w=()=>{o.value==="tags"&&!s.value&&x.value&&a.value&&!u.value&&N(g.value[g.value.map(S=>S[l.value]).indexOf(h.value)])};return{handleKeydown:S=>{n.emit("keydown",S,y);let _,Y;switch(["ArrowLeft","ArrowRight","Enter"].indexOf(S.key)!==-1&&o.value==="tags"&&(_=[...T.value.querySelectorAll("[data-tags] > *")].filter(U=>U!==k.value),Y=_.findIndex(U=>U===document.activeElement)),S.key){case"Backspace":if(o.value==="single"||a.value&&[null,""].indexOf(h.value)===-1||I.value.length===0)return;v([...I.value].slice(0,-1));break;case"Enter":if(S.preventDefault(),S.keyCode===229)return;if(Y!==-1&&Y!==void 0){v([...I.value].filter((U,Q)=>Q!==Y)),Y===_.length-1&&(_.length-1?_[_.length-2].focus():a.value?k.value.querySelector("input").focus():L.value.focus());return}if(A.value.indexOf("enter")===-1&&x.value)return;w(),D();break;case" ":if(!x.value&&!a.value){S.preventDefault(),w(),D();return}if(!x.value)return!1;if(A.value.indexOf("space")===-1&&x.value)return;S.preventDefault(),w(),D();break;case"Tab":case";":case",":if(A.value.indexOf(S.key.toLowerCase())===-1||!x.value)return;w(),D(),S.preventDefault();break;case"Escape":b();break;case"ArrowUp":if(S.preventDefault(),!s.value)return;z.value||O(),m();break;case"ArrowDown":if(S.preventDefault(),!s.value)return;z.value||O(),j();break;case"ArrowLeft":if(a.value&&k.value&&k.value.querySelector("input").selectionStart||S.shiftKey||o.value!=="tags"||!I.value||!I.value.length)return;S.preventDefault(),Y===-1?_[_.length-1].focus():Y>0&&_[Y-1].focus();break;case"ArrowRight":if(Y===-1||S.shiftKey||o.value!=="tags"||!I.value||!I.value.length)return;S.preventDefault(),_.length>Y+1?_[Y+1].focus():a.value?k.value.querySelector("input").focus():a.value||L.value.focus();break}},handleKeyup:S=>{n.emit("keyup",S,y)},preparePointer:w}}function WA(r,n,t){const{classes:o,disabled:e,openDirection:i,showOptions:a}=c.toRefs(r),s=t.isOpen,l=t.isPointed,u=t.isSelected,d=t.isDisabled,M=t.isActive,f=t.canPointGroups,p=t.resolving,y=t.fo,I=c.computed(()=>({container:"multiselect",containerDisabled:"is-disabled",containerOpen:"is-open",containerOpenTop:"is-open-top",containerActive:"is-active",wrapper:"multiselect-wrapper",singleLabel:"multiselect-single-label",singleLabelText:"multiselect-single-label-text",multipleLabel:"multiselect-multiple-label",search:"multiselect-search",tags:"multiselect-tags",tag:"multiselect-tag",tagDisabled:"is-disabled",tagRemove:"multiselect-tag-remove",tagRemoveIcon:"multiselect-tag-remove-icon",tagsSearchWrapper:"multiselect-tags-search-wrapper",tagsSearch:"multiselect-tags-search",tagsSearchCopy:"multiselect-tags-search-copy",placeholder:"multiselect-placeholder",caret:"multiselect-caret",caretOpen:"is-open",clear:"multiselect-clear",clearIcon:"multiselect-clear-icon",spinner:"multiselect-spinner",inifinite:"multiselect-inifite",inifiniteSpinner:"multiselect-inifite-spinner",dropdown:"multiselect-dropdown",dropdownTop:"is-top",dropdownHidden:"is-hidden",options:"multiselect-options",optionsTop:"is-top",group:"multiselect-group",groupLabel:"multiselect-group-label",groupLabelPointable:"is-pointable",groupLabelPointed:"is-pointed",groupLabelSelected:"is-selected",groupLabelDisabled:"is-disabled",groupLabelSelectedPointed:"is-selected is-pointed",groupLabelSelectedDisabled:"is-selected is-disabled",groupOptions:"multiselect-group-options",option:"multiselect-option",optionPointed:"is-pointed",optionSelected:"is-selected",optionDisabled:"is-disabled",optionSelectedPointed:"is-selected is-pointed",optionSelectedDisabled:"is-selected is-disabled",noOptions:"multiselect-no-options",noResults:"multiselect-no-results",fakeInput:"multiselect-fake-input",assist:"multiselect-assistive-text",spacer:"multiselect-spacer",...o.value})),v=c.computed(()=>!!(s.value&&a.value&&(!p.value||p.value&&y.value.length)));return{classList:c.computed(()=>{const N=I.value;return{container:[N.container].concat(e.value?N.containerDisabled:[]).concat(v.value&&i.value==="top"?N.containerOpenTop:[]).concat(v.value&&i.value!=="top"?N.containerOpen:[]).concat(M.value?N.containerActive:[]),wrapper:N.wrapper,spacer:N.spacer,singleLabel:N.singleLabel,singleLabelText:N.singleLabelText,multipleLabel:N.multipleLabel,search:N.search,tags:N.tags,tag:[N.tag].concat(e.value?N.tagDisabled:[]),tagRemove:N.tagRemove,tagRemoveIcon:N.tagRemoveIcon,tagsSearchWrapper:N.tagsSearchWrapper,tagsSearch:N.tagsSearch,tagsSearchCopy:N.tagsSearchCopy,placeholder:N.placeholder,caret:[N.caret].concat(s.value?N.caretOpen:[]),clear:N.clear,clearIcon:N.clearIcon,spinner:N.spinner,inifinite:N.inifinite,inifiniteSpinner:N.inifiniteSpinner,dropdown:[N.dropdown].concat(i.value==="top"?N.dropdownTop:[]).concat(!s.value||!a.value||!v.value?N.dropdownHidden:[]),options:[N.options].concat(i.value==="top"?N.optionsTop:[]),group:N.group,groupLabel:D=>{let m=[N.groupLabel];return l(D)?m.push(u(D)?N.groupLabelSelectedPointed:N.groupLabelPointed):u(D)&&f.value?m.push(d(D)?N.groupLabelSelectedDisabled:N.groupLabelSelected):d(D)&&m.push(N.groupLabelDisabled),f.value&&m.push(N.groupLabelPointable),m},groupOptions:N.groupOptions,option:(D,m)=>{let j=[N.option];return l(D)?j.push(u(D)?N.optionSelectedPointed:N.optionPointed):u(D)?j.push(d(D)?N.optionSelectedDisabled:N.optionSelected):(d(D)||m&&d(m))&&j.push(N.optionDisabled),j},noOptions:N.noOptions,noResults:N.noResults,assist:N.assist,fakeInput:N.fakeInput}}),showDropdown:v}}function GA(r,n,t){const{limit:o,infinite:e}=c.toRefs(r),i=t.isOpen,a=t.offset,s=t.search,l=t.pfo,u=t.eo,d=c.ref(null),M=c.ref(null),f=c.computed(()=>a.value<l.value.length),p=I=>{const{isIntersecting:v,target:h}=I[0];if(v){const N=h.offsetParent,D=N.scrollTop;a.value+=o.value==-1?10:o.value,c.nextTick(()=>{N.scrollTop=D})}},y=()=>{i.value&&a.value<l.value.length?d.value.observe(M.value):!i.value&&d.value&&d.value.disconnect()};return c.watch(i,()=>{!e.value||y()}),c.watch(s,()=>{!e.value||(a.value=o.value,y())},{flush:"post"}),c.watch(u,()=>{!e.value||y()},{immediate:!1,flush:"post"}),c.onMounted(()=>{window&&window.IntersectionObserver&&(d.value=new IntersectionObserver(p))}),{hasMore:f,infiniteLoader:M}}function HA(r,n,t){const{placeholder:o,id:e,valueProp:i,label:a,mode:s,groupLabel:l,aria:u,searchable:d}=c.toRefs(r),M=t.pointer,f=t.iv,p=t.hasSelected,y=t.multipleLabelText,I=c.ref(null),v=c.computed(()=>{let g=[];return e&&e.value&&g.push(e.value),g.push("assist"),g.join("-")}),h=c.computed(()=>{let g=[];return e&&e.value&&g.push(e.value),g.push("multiselect-options"),g.join("-")}),N=c.computed(()=>{let g=[];if(e&&e.value&&g.push(e.value),M.value)return g.push(M.value.group?"multiselect-group":"multiselect-option"),g.push(M.value.group?M.value.index:M.value[i.value]),g.join("-")}),D=c.computed(()=>o.value),m=c.computed(()=>s.value!=="single"),j=c.computed(()=>{let g="";return s.value==="single"&&p.value&&(g+=f.value[a.value]),s.value==="multiple"&&p.value&&(g+=y.value),s.value==="tags"&&p.value&&(g+=f.value.map(x=>x[a.value]).join(", ")),g}),T=c.computed(()=>{let g={...u.value};return d.value&&(g["aria-labelledby"]=g["aria-labelledby"]?`${v.value} ${g["aria-labelledby"]}`:v.value,j.value&&g["aria-label"]&&(g["aria-label"]=`${j.value}, ${g["aria-label"]}`)),g}),L=g=>{let x=[];return e&&e.value&&x.push(e.value),x.push("multiselect-option"),x.push(g[i.value]),x.join("-")},k=g=>{let x=[];return e&&e.value&&x.push(e.value),x.push("multiselect-group"),x.push(g.index),x.join("-")},z=g=>{let x=[];return x.push(g[a.value]),x.join(" ")},O=g=>{let x=[];return x.push(g[l.value]),x.join(" ")},b=g=>`${g} \u274E`;return c.onMounted(()=>{if(e&&e.value&&document&&document.querySelector){let g=document.querySelector(`[for="${e.value}"]`);I.value=g?g.innerText:null}}),{arias:T,ariaLabel:j,ariaAssist:v,ariaControls:h,ariaPlaceholder:D,ariaMultiselectable:m,ariaActiveDescendant:N,ariaOptionId:L,ariaOptionLabel:z,ariaGroupId:k,ariaGroupLabel:O,ariaTagLabel:b}}function FA(r,n,t,o={}){return t.forEach(e=>{e&&(o={...o,...e(r,n,o)})}),o}var Vl={name:"Multiselect",emits:["paste","open","close","select","deselect","input","search-change","tag","option","update:modelValue","change","clear","keydown","keyup"],props:{value:{required:!1},modelValue:{required:!1},options:{type:[Array,Object,Function],required:!1,default:()=>[]},id:{type:[String,Number],required:!1},name:{type:[String,Number],required:!1,default:"multiselect"},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:"label"},trackBy:{type:String,required:!1,default:void 0},valueProp:{type:String,required:!1,default:"value"},placeholder:{type:String,required:!1,default:null},mode:{type:String,required:!1,default:"single"},searchable:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:-1},hideSelected:{type:Boolean,required:!1,default:!0},createTag:{type:Boolean,required:!1,default:void 0},createOption:{type:Boolean,required:!1,default:void 0},appendNewTag:{type:Boolean,required:!1,default:void 0},appendNewOption:{type:Boolean,required:!1,default:void 0},addTagOn:{type:Array,required:!1,default:void 0},addOptionOn:{type:Array,required:!1,default:void 0},caret:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},noOptionsText:{type:String,required:!1,default:"The list is empty"},noResultsText:{type:String,required:!1,default:"No results found"},multipleLabel:{type:Function,required:!1},object:{type:Boolean,required:!1,default:!1},delay:{type:Number,required:!1,default:-1},minChars:{type:Number,required:!1,default:0},resolveOnLoad:{type:Boolean,required:!1,default:!0},filterResults:{type:Boolean,required:!1,default:!0},clearOnSearch:{type:Boolean,required:!1,default:!1},clearOnSelect:{type:Boolean,required:!1,default:!0},canDeselect:{type:Boolean,required:!1,default:!0},canClear:{type:Boolean,required:!1,default:!0},max:{type:Number,required:!1,default:-1},showOptions:{type:Boolean,required:!1,default:!0},required:{type:Boolean,required:!1,default:!1},openDirection:{type:String,required:!1,default:"bottom"},nativeSupport:{type:Boolean,required:!1,default:!1},classes:{type:Object,required:!1,default:()=>({})},strict:{type:Boolean,required:!1,default:!0},closeOnSelect:{type:Boolean,required:!1,default:!0},autocomplete:{type:String,required:!1},groups:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:"label"},groupOptions:{type:String,required:!1,default:"options"},groupHideEmpty:{type:Boolean,required:!1,default:!1},groupSelect:{type:Boolean,required:!1,default:!0},inputType:{type:String,required:!1,default:"text"},attrs:{required:!1,type:Object,default:()=>({})},onCreate:{required:!1,type:Function},disabledProp:{type:String,required:!1,default:"disabled"},searchStart:{type:Boolean,required:!1,default:!1},reverse:{type:Boolean,required:!1,default:!1},regex:{type:[Object,String,RegExp],required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},infinite:{type:Boolean,required:!1,default:!1},aria:{required:!1,type:Object,default:()=>({})}},setup(r,n){return FA(r,n,[EA,QA,RA,_A,CA,VA,BA,GA,PA,ZA,WA,HA])}};const $A=["id","dir"],JA=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],XA=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],KA=["onKeyup","aria-label"],qA=["onClick"],ek=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],tk=["innerHTML"],nk=["id"],rk=["id","aria-label","aria-selected"],ok=["data-pointed","onMouseenter","onClick"],ik=["innerHTML"],ak=["aria-label"],sk=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],lk=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],uk=["innerHTML"],ck=["innerHTML"],dk=["value"],Mk=["name","value"],fk=["name","value"],gk=["id"];function hk(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{ref:"multiselect",class:c.normalizeClass(r.classList.container),id:t.searchable?void 0:t.id,dir:t.rtl?"rtl":void 0,onFocusin:n[10]||(n[10]=(...a)=>r.handleFocusIn&&r.handleFocusIn(...a)),onFocusout:n[11]||(n[11]=(...a)=>r.handleFocusOut&&r.handleFocusOut(...a)),onKeyup:n[12]||(n[12]=(...a)=>r.handleKeyup&&r.handleKeyup(...a)),onKeydown:n[13]||(n[13]=(...a)=>r.handleKeydown&&r.handleKeydown(...a))},[c.createElementVNode("div",c.mergeProps({class:r.classList.wrapper,onMousedown:n[9]||(n[9]=(...a)=>r.handleMousedown&&r.handleMousedown(...a)),ref:"wrapper",tabindex:r.tabindex,"aria-controls":t.searchable?void 0:r.ariaControls,"aria-placeholder":t.searchable?void 0:r.ariaPlaceholder,"aria-expanded":t.searchable?void 0:r.isOpen,"aria-activedescendant":t.searchable?void 0:r.ariaActiveDescendant,"aria-multiselectable":t.searchable?void 0:r.ariaMultiselectable,role:t.searchable?void 0:"combobox"},t.searchable?{}:r.arias),[c.createCommentVNode(" Search "),t.mode!=="tags"&&t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:r.search,value:r.search,class:r.classList.search,autocomplete:t.autocomplete,id:t.searchable?t.id:void 0,onInput:n[0]||(n[0]=(...a)=>r.handleSearchInput&&r.handleSearchInput(...a)),onKeypress:n[1]||(n[1]=(...a)=>r.handleKeypress&&r.handleKeypress(...a)),onPaste:n[2]||(n[2]=c.withModifiers((...a)=>r.handlePaste&&r.handlePaste(...a),["stop"])),ref:"input","aria-controls":r.ariaControls,"aria-placeholder":r.ariaPlaceholder,"aria-expanded":r.isOpen,"aria-activedescendant":r.ariaActiveDescendant,"aria-multiselectable":r.ariaMultiselectable,role:"combobox"},{...t.attrs,...r.arias}),null,16,XA)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Tags (with search) "),t.mode=="tags"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(r.classList.tags),"data-tags":""},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.iv,(a,s,l)=>c.renderSlot(r.$slots,"tag",{option:a,handleTagRemove:r.handleTagRemove,disabled:t.disabled},()=>[(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(r.classList.tag),tabindex:"-1",onKeyup:c.withKeys(u=>r.handleTagRemove(a,u),["enter"]),key:l,"aria-label":r.ariaTagLabel(a[t.label])},[c.createTextVNode(c.toDisplayString(a[t.label])+" ",1),t.disabled?c.createCommentVNode("v-if",!0):(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(r.classList.tagRemove),onClick:u=>r.handleTagRemove(a,u)},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.tagRemoveIcon)},null,2)],10,qA))],42,KA))])),256)),c.createElementVNode("div",{class:c.normalizeClass(r.classList.tagsSearchWrapper),ref:"tags"},[c.createCommentVNode(" Used for measuring search width "),c.createElementVNode("span",{class:c.normalizeClass(r.classList.tagsSearchCopy)},c.toDisplayString(r.search),3),c.createCommentVNode(" Actual search input "),t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:r.search,value:r.search,class:r.classList.tagsSearch,id:t.searchable?t.id:void 0,autocomplete:t.autocomplete,onInput:n[3]||(n[3]=(...a)=>r.handleSearchInput&&r.handleSearchInput(...a)),onKeypress:n[4]||(n[4]=(...a)=>r.handleKeypress&&r.handleKeypress(...a)),onPaste:n[5]||(n[5]=c.withModifiers((...a)=>r.handlePaste&&r.handlePaste(...a),["stop"])),ref:"input","aria-controls":r.ariaControls,"aria-placeholder":r.ariaPlaceholder,"aria-expanded":r.isOpen,"aria-activedescendant":r.ariaActiveDescendant,"aria-multiselectable":r.ariaMultiselectable,role:"combobox"},{...t.attrs,...r.arias}),null,16,ek)):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Single label "),t.mode=="single"&&r.hasSelected&&!r.search&&r.iv?c.renderSlot(r.$slots,"singlelabel",{key:2,value:r.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.singleLabel)},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.singleLabelText)},c.toDisplayString(r.iv[t.label]),3)],2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Multiple label "),t.mode=="multiple"&&r.hasSelected&&!r.search?c.renderSlot(r.$slots,"multiplelabel",{key:3,values:r.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.multipleLabel),innerHTML:r.multipleLabelText},null,10,tk)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Placeholder "),t.placeholder&&!r.hasSelected&&!r.search?c.renderSlot(r.$slots,"placeholder",{key:4},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.placeholder),"aria-hidden":"true"},c.toDisplayString(t.placeholder),3)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Spinner "),t.loading||r.resolving?c.renderSlot(r.$slots,"spinner",{key:5},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.spinner),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Clear "),r.hasSelected&&!t.disabled&&t.canClear&&!r.busy?c.renderSlot(r.$slots,"clear",{key:6,clear:r.clear},()=>[c.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"\u274E",class:c.normalizeClass(r.classList.clear),onClick:n[6]||(n[6]=(...a)=>r.clear&&r.clear(...a)),onKeyup:n[7]||(n[7]=c.withKeys((...a)=>r.clear&&r.clear(...a),["enter"]))},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.clearIcon)},null,2)],34)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Caret "),t.caret&&t.showOptions?c.renderSlot(r.$slots,"caret",{key:7},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.caret),onClick:n[8]||(n[8]=(...a)=>r.handleCaretClick&&r.handleCaretClick(...a)),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0)],16,JA),c.createCommentVNode(" Options "),c.createElementVNode("div",{class:c.normalizeClass(r.classList.dropdown),tabindex:"-1"},[c.renderSlot(r.$slots,"beforelist",{options:r.fo}),c.createElementVNode("ul",{class:c.normalizeClass(r.classList.options),id:r.ariaControls,role:"listbox"},[t.groups?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(r.fg,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.group),key:l,id:r.ariaGroupId(a),"aria-label":r.ariaGroupLabel(a),"aria-selected":r.isSelected(a),role:"option"},[c.createElementVNode("div",{class:c.normalizeClass(r.classList.groupLabel(a)),"data-pointed":r.isPointed(a),onMouseenter:u=>r.setPointer(a,s),onClick:u=>r.handleGroupClick(a)},[c.renderSlot(r.$slots,"grouplabel",{group:a,isSelected:r.isSelected,isPointed:r.isPointed},()=>[c.createElementVNode("span",{innerHTML:a[t.groupLabel]},null,8,ik)])],42,ok),c.createElementVNode("ul",{class:c.normalizeClass(r.classList.groupOptions),"aria-label":r.ariaGroupLabel(a),role:"group"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.__VISIBLE__,(u,d,M)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.option(u,a)),"data-pointed":r.isPointed(u),"data-selected":r.isSelected(u)||void 0,key:M,onMouseenter:f=>r.setPointer(u),onClick:f=>r.handleOptionClick(u),id:r.ariaOptionId(u),"aria-selected":r.isSelected(u),"aria-label":r.ariaOptionLabel(u),role:"option"},[c.renderSlot(r.$slots,"option",{option:u,isSelected:r.isSelected,isPointed:r.isPointed,search:r.search},()=>[c.createElementVNode("span",null,c.toDisplayString(u[t.label]),1)])],42,sk))),128))],10,ak)],10,rk))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(r.fo,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.option(a)),"data-pointed":r.isPointed(a),"data-selected":r.isSelected(a)||void 0,key:l,onMouseenter:u=>r.setPointer(a),onClick:u=>r.handleOptionClick(a),id:r.ariaOptionId(a),"aria-selected":r.isSelected(a),"aria-label":r.ariaOptionLabel(a),role:"option"},[c.renderSlot(r.$slots,"option",{option:a,isSelected:r.isSelected,isPointed:r.isPointed,search:r.search},()=>[c.createElementVNode("span",null,c.toDisplayString(a[t.label]),1)])],42,lk))),128))],10,nk),r.noOptions?c.renderSlot(r.$slots,"nooptions",{key:0},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.noOptions),innerHTML:t.noOptionsText},null,10,uk)]):c.createCommentVNode("v-if",!0),r.noResults?c.renderSlot(r.$slots,"noresults",{key:1},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.noResults),innerHTML:t.noResultsText},null,10,ck)]):c.createCommentVNode("v-if",!0),t.infinite&&r.hasMore?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(r.classList.inifinite),ref:"infiniteLoader"},[c.renderSlot(r.$slots,"infinite",{},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.inifiniteSpinner)},null,2)])],2)):c.createCommentVNode("v-if",!0),c.renderSlot(r.$slots,"afterlist",{options:r.fo})],2),c.createCommentVNode(" Hacky input element to show HTML5 required warning "),t.required?(c.openBlock(),c.createElementBlock("input",{key:0,class:c.normalizeClass(r.classList.fakeInput),tabindex:"-1",value:r.textValue,required:""},null,10,dk)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Native input support "),t.nativeSupport?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[t.mode=="single"?(c.openBlock(),c.createElementBlock("input",{key:0,type:"hidden",name:t.name,value:r.plainValue!==void 0?r.plainValue:""},null,8,Mk)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(r.plainValue,(a,s)=>(c.openBlock(),c.createElementBlock("input",{type:"hidden",name:`${t.name}[]`,value:a,key:s},null,8,fk))),128))],64)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Screen reader assistive text "),t.searchable&&r.hasSelected?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(r.classList.assist),id:r.ariaAssist,"aria-hidden":"true"},c.toDisplayString(r.ariaLabel),11,gk)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Create height for empty input "),c.createElementVNode("div",{class:c.normalizeClass(r.classList.spacer)},null,2)],42,$A)}Vl.render=hk,Vl.__file="src/Multiselect.vue";var Vw="",Zw="";const pk=c.createElementVNode("img",{alt:"",class:"list__item_thumb",src:OA},null,-1),yk={class:"list__item_text"},Nk=c.createElementVNode("div",{id:"list"},null,-1),jk={__name:"InputList",props:{list:{type:Array,required:!0},maxHeight:{type:String,default:"200px"},labelProp:{type:String,default:"label"},idProp:{type:String,default:"value"},selectItems:{type:Array,required:!0}},emits:["update"],setup(r,{emit:n}){const t=r;c.useCssVars(i=>({"1c1e0897":r.maxHeight}));const o=c.ref([]);function e(){n("update",o.value)}return c.watch(()=>t.selectItems,(i,a)=>{if(!i)return;const s=t.list.filter(l=>i.includes(l[t.idProp]));if(JSON.stringify(s)!==JSON.stringify(o.value)&&(o.value=[...o.value,...s],o.value=[...new Set(o.value)]),a.length>i.length){const l=a.filter(u=>!i.includes(u));o.value=o.value.filter(u=>!l.includes(u[t.idProp]))}}),(i,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Vl),{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=s=>o.value=s),label:r.labelProp,mode:"tags",native:!1,object:!0,options:r.list,placeholder:"Start typing a name",searchable:!0,"value-prop":r.idProp,onDeselect:e,onSelect:e},{tag:c.withCtx(({option:s,handleTagRemove:l,disabled:u})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#list"},[c.createElementVNode("div",{class:c.normalizeClass(["list__item",{"is-disabled":u}])},[pk,c.createElementVNode("p",yk,c.toDisplayString(s[r.labelProp]),1),c.createVNode(Te,{class:"list__item_icon","icon-name":"delete",size:24,onClick:d=>l(s,d)},null,8,["onClick"]),c.renderSlot(i.$slots,"default")],2)]))]),_:3},8,["modelValue","label","options","value-prop"]),Nk],64))}},Ik=c.defineComponent({components:{DhIcon:Te},props:{hasCloseButton:{type:Boolean,default:!0},hasSideBar:{type:Boolean,default:!0},hasSideBarButtonBottom:{type:Boolean,default:!0},hasHeader:{type:Boolean,default:!0},hasFooter:{type:Boolean,default:!0},hasFooterButtonRight:{type:Boolean,default:!0},hasBodyScrolling:{type:Boolean,default:!0},sideBarPosition:{type:String,default:"left"},hasCloseConfirmation:{type:Boolean,default:!1},bodyClass:{type:String,default:""},fitContent:{type:Boolean,default:!1}},emits:["close"],mounted(){document.body.classList.add("modal-open")},unmounted(){document.body.classList.remove("modal-open")},methods:{closed(){this.$emit("close",this.hasCloseConfirmation),document.body.classList.remove("modal-open")}}}),mk={class:"modal-content"},Dk={key:0,id:"modal-sidebar",class:"modal-sidebar"},xk={key:0,id:"modalTitle",class:"modal-header"},vk={class:"modal-footer"};function bk(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createBlock(c.Transition,{name:"modal-fade"},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"modal-backdrop",onClick:n[2]||(n[2]=(...s)=>r.closed&&r.closed(...s))},[c.createElementVNode("div",{"aria-describedby":"modalDescription","aria-labelledby":"modalTitle",class:c.normalizeClass(`
20
20
  ${r.hasSideBar?r.sideBarPosition:""}
21
21
  ${r.hasBodyScrolling?"":"modal-auto-height"}
22
22
  ${r.fitContent?"modal modal-fit-content":"modal"}
@@ -31,6 +31,11 @@ declare const _default: import("vue").DefineComponent<{}, {
31
31
  type: ArrayConstructor;
32
32
  required: true;
33
33
  };
34
+ inputFirstValue: {
35
+ type: StringConstructor;
36
+ required: false;
37
+ default: null;
38
+ };
34
39
  }>>;
35
40
  $emit: (event: "update", ...args: any[]) => void;
36
41
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deskhero/dh_ui",
3
- "version": "1.48.7",
3
+ "version": "1.48.8",
4
4
  "files": [
5
5
  "dist"
6
6
  ],