honeycombatomiclib 0.0.13 → 0.0.15
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/components/atoms/input/BeeAutocompleteDropdown.d.ts +1 -1
- package/dist/components/atoms/input/BeeAutocompleteDropdown.d.ts.map +1 -1
- package/dist/components/atoms/input/BeeAutocompleteTag.d.ts +1 -1
- package/dist/components/atoms/input/BeeAutocompleteTag.d.ts.map +1 -1
- package/dist/components/atoms/input/BeeDateInput.d.ts +2 -2
- package/dist/components/atoms/input/BeeDateInput.d.ts.map +1 -1
- package/dist/components/atoms/input/BeeDateTimeInput.d.ts +2 -2
- package/dist/components/atoms/input/BeeDateTimeInput.d.ts.map +1 -1
- package/dist/components/atoms/misc/BeeChip.d.ts +1 -1
- package/dist/components/atoms/misc/BeeChip.d.ts.map +1 -1
- package/dist/components/atoms/misc/BeePositionBadge.d.ts +1 -1
- package/dist/components/atoms/misc/BeePositionBadge.d.ts.map +1 -1
- package/dist/components/atoms/select/BeeColorSelect.d.ts.map +1 -1
- package/dist/components/atoms/select/BeeSwitch.d.ts +2 -1
- package/dist/components/atoms/select/BeeSwitch.d.ts.map +1 -1
- package/dist/components/atoms/select/BeeTreeSelect.d.ts +4 -7
- package/dist/components/atoms/select/BeeTreeSelect.d.ts.map +1 -1
- package/dist/components/molecules/misc/BeeServerStatusInput.d.ts +0 -4
- package/dist/components/molecules/misc/BeeServerStatusInput.d.ts.map +1 -1
- package/dist/index.d.ts +11 -16
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -11
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import require$$0,{jsx,jsxs,Fragment}from"react/jsx-runtime";import*as React fro
|
|
|
16
16
|
* https://www.chartjs.org
|
|
17
17
|
* (c) 2025 Chart.js Contributors
|
|
18
18
|
* Released under the MIT License
|
|
19
|
-
*/class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,n){const r=t.listeners[n],a=t.duration;r.forEach(n=>n({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(i-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let a,s=r.length-1,o=!1;for(;s>=0;--s)a=r[s],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),o=!0):(r[s]=r[r.length-1],r.pop());o&&(n.draw(),this._notify(n,i,e,"progress")),r.length||(i.running=!1,this._notify(n,i,e,"complete"),i.initial=!1),t+=r.length}),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var animator=new Animator;const transparent="transparent",interpolators={boolean:(e,t,i)=>i>.5?t:e,color(e,t,i){const n=color(e||transparent),r=n.valid&&color(t||transparent);return r&&r.valid?r.mix(n,i).hexString():t},number:(e,t,i)=>e+(t-e)*i};class Animation{constructor(e,t,i,n){const r=t[i];n=resolve([e.to,n,r,e.from]);const a=resolve([e.from,r,n]);this._active=!0,this._fn=e.fn||interpolators[e.type||typeof a],this._easing=effects[e.easing]||effects.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,a=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=resolve([e.to,t,n,e.from]),this._from=resolve([e.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,n=this._prop,r=this._from,a=this._loop,s=this._to;let o;if(this._active=r!==s&&(a||t<i),!this._active)return this._target[n]=s,void this._notify(!0);t<0?this._target[n]=r:(o=t/i%2,o=a&&o>1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[n]=this._fn(r,s,o))}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let e=0;e<i.length;e++)i[e][t]()}}class Animations{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!isObject$1(e))return;const t=Object.keys(defaults.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{const r=e[n];if(!isObject$1(r))return;const a={};for(const e of t)a[e]=r[e];(isArray(r.properties)&&r.properties||[n]).forEach(e=>{e!==n&&i.has(e)||i.set(e,a)})})}_animateOptions(e,t){const i=t.options,n=resolveTargetOptions(e,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&awaitAll(e.options.$animations,i).then(()=>{e.options=i},()=>{}),r}_createAnimations(e,t){const i=this._properties,n=[],r=e.$animations||(e.$animations={}),a=Object.keys(t),s=Date.now();let o;for(o=a.length-1;o>=0;--o){const l=a[o];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(e,t));continue}const c=t[l];let h=r[l];const p=i.get(l);if(h){if(p&&h.active()){h.update(p,c,s);continue}h.cancel()}p&&p.duration?(r[l]=h=new Animation(p,e,l,c),n.push(h)):e[l]=c}return n}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const i=this._createAnimations(e,t);return i.length?(animator.add(this._chart,i),!0):void 0}}function awaitAll(e,t){const i=[],n=Object.keys(t);for(let t=0;t<n.length;t++){const r=e[n[t]];r&&r.active()&&i.push(r.wait())}return Promise.all(i)}function resolveTargetOptions(e,t){if(!t)return;let i=e.options;if(i)return i.$shared&&(e.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;e.options=t}function scaleClip(e,t){const i=e&&e.options||{},n=i.reverse,r=void 0===i.min?t:0,a=void 0===i.max?t:0;return{start:n?a:r,end:n?r:a}}function defaultClip(e,t,i){if(!1===i)return!1;const n=scaleClip(e,i),r=scaleClip(t,i);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}function toClip(e){let t,i,n,r;return isObject$1(e)?(t=e.top,i=e.right,n=e.bottom,r=e.left):t=i=n=r=e,{top:t,right:i,bottom:n,left:r,disabled:!1===e}}function getSortedDatasetIndices(e,t){const i=[],n=e._getSortedDatasetMetas(t);let r,a;for(r=0,a=n.length;r<a;++r)i.push(n[r].index);return i}function applyStack(e,t,i,n={}){const r=e.keys,a="single"===n.mode;let s,o,l,c;if(null===t)return;let h=!1;for(s=0,o=r.length;s<o;++s){if(l=+r[s],l===i){if(h=!0,n.all)continue;break}c=e.values[l],isNumberFinite(c)&&(a||0===t||sign(t)===sign(c))&&(t+=c)}return h||n.all?t:0}function convertObjectDataToArray(e,t){const{iScale:i,vScale:n}=t,r="x"===i.axis?"x":"y",a="x"===n.axis?"x":"y",s=Object.keys(e),o=new Array(s.length);let l,c,h;for(l=0,c=s.length;l<c;++l)h=s[l],o[l]={[r]:h,[a]:e[h]};return o}function isStacked(e,t){const i=e&&e.options.stacked;return i||void 0===i&&void 0!==t.stack}function getStackKey(e,t,i){return`${e.id}.${t.id}.${i.stack||i.type}`}function getUserBounds(e){const{min:t,max:i,minDefined:n,maxDefined:r}=e.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}function getOrCreateStack(e,t,i){const n=e[t]||(e[t]={});return n[i]||(n[i]={})}function getLastIndexInStack(e,t,i,n){for(const r of t.getMatchingVisibleMetas(n).reverse()){const t=e[r.index];if(i&&t>0||!i&&t<0)return r.index}return null}function updateStacks(e,t){const{chart:i,_cachedMeta:n}=e,r=i._stacks||(i._stacks={}),{iScale:a,vScale:s,index:o}=n,l=a.axis,c=s.axis,h=getStackKey(a,s,n),p=t.length;let u;for(let e=0;e<p;++e){const i=t[e],{[l]:a,[c]:p}=i;u=(i._stacks||(i._stacks={}))[c]=getOrCreateStack(r,h,a),u[o]=p,u._top=getLastIndexInStack(u,s,!0,n.type),u._bottom=getLastIndexInStack(u,s,!1,n.type);(u._visualValues||(u._visualValues={}))[o]=p}}function getFirstScaleId(e,t){const i=e.scales;return Object.keys(i).filter(e=>i[e].axis===t).shift()}function createDatasetContext(e,t){return createContext(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function createDataContext(e,t,i){return createContext(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:i,index:t,mode:"default",type:"data"})}function clearStacks(e,t){const i=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[n]||void 0===t[n][i])return;delete t[n][i],void 0!==t[n]._visualValues&&void 0!==t[n]._visualValues[i]&&delete t[n]._visualValues[i]}}}const isDirectUpdateMode=e=>"reset"===e||"none"===e,cloneIfNotShared=(e,t)=>t?e:Object.assign({},e),createStack=(e,t,i)=>e&&!t.hidden&&t._stacked&&{keys:getSortedDatasetIndices(i,!0),values:null};class DatasetController{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.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.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=isStacked(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&clearStacks(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),n=(e,t,i,n)=>"x"===e?t:"r"===e?n:i,r=t.xAxisID=valueOrDefault(i.xAxisID,getFirstScaleId(e,"x")),a=t.yAxisID=valueOrDefault(i.yAxisID,getFirstScaleId(e,"y")),s=t.rAxisID=valueOrDefault(i.rAxisID,getFirstScaleId(e,"r")),o=t.indexAxis,l=t.iAxisID=n(o,r,a,s),c=t.vAxisID=n(o,a,r,s);t.xScale=this.getScaleForId(r),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&unlistenArrayEvents(this._data,this),e._stacked&&clearStacks(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(isObject$1(t)){const e=this._cachedMeta;this._data=convertObjectDataToArray(t,e)}else if(i!==t){if(i){unlistenArrayEvents(i,this);const e=this._cachedMeta;clearStacks(e),e._parsed=[]}t&&Object.isExtensible(t)&&listenArrayEvents(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=t._stacked;t._stacked=isStacked(t.vScale,t),t.stack!==i.stack&&(n=!0,clearStacks(t),t.stack=i.stack),this._resyncElements(e),(n||r!==t._stacked)&&(updateStacks(this,t._parsed),t._stacked=isStacked(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:a}=i,s=r.axis;let o,l,c,h=0===e&&t===n.length||i._sorted,p=e>0&&i._parsed[e-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=isArray(n[e])?this.parseArrayData(i,n,e,t):isObject$1(n[e])?this.parseObjectData(i,n,e,t):this.parsePrimitiveData(i,n,e,t);const r=()=>null===l[s]||p&&l[s]<p[s];for(o=0;o<t;++o)i._parsed[o+e]=l=c[o],h&&(r()&&(h=!1),p=l);i._sorted=h}a&&updateStacks(this,c)}parsePrimitiveData(e,t,i,n){const{iScale:r,vScale:a}=e,s=r.axis,o=a.axis,l=r.getLabels(),c=r===a,h=new Array(n);let p,u,d;for(p=0,u=n;p<u;++p)d=p+i,h[p]={[s]:c||r.parse(l[d],d),[o]:a.parse(t[d],d)};return h}parseArrayData(e,t,i,n){const{xScale:r,yScale:a}=e,s=new Array(n);let o,l,c,h;for(o=0,l=n;o<l;++o)c=o+i,h=t[c],s[o]={x:r.parse(h[0],c),y:a.parse(h[1],c)};return s}parseObjectData(e,t,i,n){const{xScale:r,yScale:a}=e,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l=new Array(n);let c,h,p,u;for(c=0,h=n;c<h;++c)p=c+i,u=t[p],l[c]={x:r.parse(resolveObjectKey(u,s),p),y:a.parse(resolveObjectKey(u,o),p)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,i){const n=this.chart,r=this._cachedMeta,a=t[e.axis];return applyStack({keys:getSortedDatasetIndices(n,!0),values:t._stacks[e.axis]._visualValues},a,r.index,{mode:i})}updateRangeFromParsed(e,t,i,n){const r=i[t.axis];let a=null===r?NaN:r;const s=n&&i._stacks[t.axis];n&&s&&(n.values=s,a=applyStack(n,r,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,t){const i=this._cachedMeta,n=i._parsed,r=i._sorted&&e===i.iScale,a=n.length,s=this._getOtherScale(e),o=createStack(t,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=getUserBounds(s);let p,u;function d(){u=n[p];const t=u[s.axis];return!isNumberFinite(u[e.axis])||c>t||h<t}for(p=0;p<a&&(d()||(this.updateRangeFromParsed(l,e,u,o),!r));++p);if(r)for(p=a-1;p>=0;--p)if(!d()){this.updateRangeFromParsed(l,e,u,o);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let n,r,a;for(n=0,r=t.length;n<r;++n)a=t[n][e.axis],isNumberFinite(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,i=t.iScale,n=t.vScale,r=this.getParsed(e);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=toClip(valueOrDefault(this.options.clip,defaultClip(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,i=this._cachedMeta,n=i.data||[],r=t.chartArea,a=[],s=this._drawStart||0,o=this._drawCount||n.length-s,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(e,r,s,o),c=s;c<s+o;++c){const t=n[c];t.hidden||(t.active&&l?a.push(t):t.draw(e,r))}for(c=0;c<a.length;++c)a[c].draw(e,r)}getStyle(e,t){const i=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,t,i){const n=this.getDataset();let r;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];r=t.$context||(t.$context=createDataContext(this.getContext(),e,t)),r.parsed=this.getParsed(e),r.raw=n.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=createDatasetContext(this.chart.getContext(),this.index)),r.dataset=n,r.index=r.datasetIndex=this.index;return r.active=!!t,r.mode=i,r}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",i){const n="active"===t,r=this._cachedDataOpts,a=e+"-"+t,s=r[a],o=this.enableOptionSharing&&defined(i);if(s)return cloneIfNotShared(s,o);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),h=n?[`${e}Hover`,"hover",e,""]:[e,""],p=l.getOptionScopes(this.getDataset(),c),u=Object.keys(defaults.elements[e]),d=l.resolveNamedOptions(p,u,()=>this.getContext(i,n,t),h);return d.$shared&&(d.$shared=o,r[a]=Object.freeze(cloneIfNotShared(d,o))),d}_resolveAnimations(e,t,i){const n=this.chart,r=this._cachedDataOpts,a=`animation-${t}`,s=r[a];if(s)return s;let o;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,t),a=n.getOptionScopes(this.getDataset(),r);o=n.createResolver(a,this.getContext(e,i,t))}const l=new Animations(n,o&&o.animations);return o&&o._cacheable&&(r[a]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||isDirectUpdateMode(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),n=this._sharedOptions,r=this.getSharedOptions(i),a=this.includeOptions(t,r)||r!==n;return this.updateSharedOptions(r,t,i),{sharedOptions:r,includeOptions:a}}updateElement(e,t,i,n){isDirectUpdateMode(n)?Object.assign(e,i):this._resolveAnimations(t,n).update(e,i)}updateSharedOptions(e,t,i){e&&!isDirectUpdateMode(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,n){e.active=n;const r=this.getStyle(t,n);this._resolveAnimations(t,i,n).update(e,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[e,t,i]of this._syncList)this[e](t,i);this._syncList=[];const n=i.length,r=t.length,a=Math.min(r,n);a&&this.parse(0,a),r>n?this._insertElements(n,r-n,e):r<n&&this._removeElements(r,n-r)}_insertElements(e,t,i=!0){const n=this._cachedMeta,r=n.data,a=e+t;let s;const o=e=>{for(e.length+=t,s=e.length-1;s>=a;s--)e[s]=e[s-t]};for(o(r),s=e;s<a;++s)r[s]=new this.dataElementType;this._parsing&&o(n._parsed),this.parse(e,t),i&&this.updateElements(r,e,t,"reset")}updateElements(e,t,i,n){}_removeElements(e,t){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(e,t);i._stacked&&clearStacks(i,n)}i.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,i,n]=e;this[t](i,n)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function getAllScaleValues(e,t){if(!e._cache.$bar){const i=e.getMatchingVisibleMetas(t);let n=[];for(let t=0,r=i.length;t<r;t++)n=n.concat(i[t].controller.getAllParsedValues(e));e._cache.$bar=_arrayUnique(n.sort((e,t)=>e-t))}return e._cache.$bar}function computeMinSampleSize(e){const t=e.iScale,i=getAllScaleValues(t,e.type);let n,r,a,s,o=t._length;const l=()=>{32767!==a&&-32768!==a&&(defined(s)&&(o=Math.min(o,Math.abs(a-s)||o)),s=a)};for(n=0,r=i.length;n<r;++n)a=t.getPixelForValue(i[n]),l();for(s=void 0,n=0,r=t.ticks.length;n<r;++n)a=t.getPixelForTick(n),l();return o}function computeFitCategoryTraits(e,t,i,n){const r=i.barThickness;let a,s;return isNullOrUndef(r)?(a=t.min*i.categoryPercentage,s=i.barPercentage):(a=r*n,s=1),{chunk:a/n,ratio:s,start:t.pixels[e]-a/2}}function computeFlexCategoryTraits(e,t,i,n){const r=t.pixels,a=r[e];let s=e>0?r[e-1]:null,o=e<r.length-1?r[e+1]:null;const l=i.categoryPercentage;null===s&&(s=a-(null===o?t.end-t.start:o-a)),null===o&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/n,ratio:i.barPercentage,start:c}}function parseFloatBar(e,t,i,n){const r=i.parse(e[0],n),a=i.parse(e[1],n),s=Math.min(r,a),o=Math.max(r,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[i.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:a,min:s,max:o}}function parseValue(e,t,i,n){return isArray(e)?parseFloatBar(e,t,i,n):t[i.axis]=i.parse(e,n),t}function parseArrayOrPrimitive(e,t,i,n){const r=e.iScale,a=e.vScale,s=r.getLabels(),o=r===a,l=[];let c,h,p,u;for(c=i,h=i+n;c<h;++c)u=t[c],p={},p[r.axis]=o||r.parse(s[c],c),l.push(parseValue(u,p,a,c));return l}function isFloatBar(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function barSign(e,t,i){return 0!==e?sign(e):(t.isHorizontal()?1:-1)*(t.min>=i?1:-1)}function borderProps(e){let t,i,n,r,a;return e.horizontal?(t=e.base>e.x,i="left",n="right"):(t=e.base<e.y,i="bottom",n="top"),t?(r="end",a="start"):(r="start",a="end"),{start:i,end:n,reverse:t,top:r,bottom:a}}function setBorderSkipped(e,t,i,n){let r=t.borderSkipped;const a={};if(!r)return void(e.borderSkipped=a);if(!0===r)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:o,reverse:l,top:c,bottom:h}=borderProps(e);"middle"===r&&i&&(e.enableBorderRadius=!0,(i._top||0)===n?r=c:(i._bottom||0)===n?r=h:(a[parseEdge(h,s,o,l)]=!0,r=c)),a[parseEdge(r,s,o,l)]=!0,e.borderSkipped=a}function parseEdge(e,t,i,n){return e=n?startEnd(e=swap(e,t,i),i,t):startEnd(e,t,i)}function swap(e,t,i){return e===t?i:e===i?t:e}function startEnd(e,t,i){return"start"===e?t:"end"===e?i:e}function setInflateAmount(e,{inflateAmount:t},i){e.inflateAmount="auto"===t?1===i?.33:0:t}class BarController extends DatasetController{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,t,i,n){return parseArrayOrPrimitive(e,t,i,n)}parseArrayData(e,t,i,n){return parseArrayOrPrimitive(e,t,i,n)}parseObjectData(e,t,i,n){const{iScale:r,vScale:a}=e,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l="x"===r.axis?s:o,c="x"===a.axis?s:o,h=[];let p,u,d,f;for(p=i,u=i+n;p<u;++p)f=t[p],d={},d[r.axis]=r.parse(resolveObjectKey(f,l),p),h.push(parseValue(resolveObjectKey(f,c),d,a,p));return h}updateRangeFromParsed(e,t,i,n){super.updateRangeFromParsed(e,t,i,n);const r=i._custom;r&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,r.min),e.max=Math.max(e.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:i,vScale:n}=t,r=this.getParsed(e),a=r._custom,s=isFloatBar(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,i,n){const r="reset"===n,{index:a,_cachedMeta:{vScale:s}}=this,o=s.getBasePixel(),l=s.isHorizontal(),c=this._getRuler(),{sharedOptions:h,includeOptions:p}=this._getSharedOptions(t,n);for(let u=t;u<t+i;u++){const t=this.getParsed(u),i=r||isNullOrUndef(t[s.axis])?{base:o,head:o}:this._calculateBarValuePixels(u),d=this._calculateBarIndexPixels(u,c),f=(t._stacks||{})[s.axis],m={horizontal:l,base:i.base,enableBorderRadius:!f||isFloatBar(t._custom)||a===f._top||a===f._bottom,x:l?i.head:d.center,y:l?d.center:i.head,height:l?d.size:Math.abs(i.size),width:l?Math.abs(i.size):d.size};p&&(m.options=h||this.resolveDataElementOptions(u,e[u].active?"active":n));const g=m.options||e[u].options;setBorderSkipped(m,g,f,a),setInflateAmount(m,g,c.ratio),this.updateElement(e[u],u,m,n)}}_getStacks(e,t){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(e=>e.controller.options.grouped),r=i.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(t),o=s&&s[i.axis],l=e=>{const t=e._parsed.find(e=>e[i.axis]===o),n=t&&t[e.vScale.axis];if(isNullOrUndef(n)||isNaN(n))return!0};for(const i of n)if((void 0===t||!l(i))&&((!1===r||-1===a.indexOf(i.stack)||void 0===r&&void 0===i.stack)&&a.push(i.stack),i.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(i=>e[i].axis===t).shift()}_getAxis(){const e={},t=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)e[valueOrDefault("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,i){const n=this._getStacks(e,i),r=void 0!==t?n.indexOf(t):-1;return-1===r?n.length-1:r}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,n=[];let r,a;for(r=0,a=t.data.length;r<a;++r)n.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const s=e.barThickness;return{min:s||computeMinSampleSize(t),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:s?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:i,index:n},options:{base:r,minBarLength:a}}=this,s=r||0,o=this.getParsed(e),l=o._custom,c=isFloatBar(l);let h,p,u=o[t.axis],d=0,f=i?this.applyStack(t,o,i):u;f!==u&&(d=f-u,f=u),c&&(u=l.barStart,f=l.barEnd-l.barStart,0!==u&&sign(u)!==sign(l.barEnd)&&(d=0),d+=u);const m=isNullOrUndef(r)||c?d:r;let g=t.getPixelForValue(m);if(h=this.chart.getDataVisibility(e)?t.getPixelForValue(d+f):g,p=h-g,Math.abs(p)<a){p=barSign(p,t,s)*a,u===s&&(g-=p/2);const e=t.getPixelForDecimal(0),r=t.getPixelForDecimal(1),l=Math.min(e,r),d=Math.max(e,r);g=Math.max(Math.min(g,d),l),h=g+p,i&&!c&&(o._stacks[t.axis]._visualValues[n]=t.getValueForPixel(h)-t.getValueForPixel(g))}if(g===t.getPixelForValue(s)){const e=sign(p)*t.getLineWidthForValue(s)/2;g+=e,p-=e}return{size:p,base:g,head:h,center:h+p/2}}_calculateBarIndexPixels(e,t){const i=t.scale,n=this.options,r=n.skipNull,a=valueOrDefault(n.maxBarThickness,1/0);let s,o;const l=this._getAxisCount();if(t.grouped){const i=r?this._getStackCount(e):t.stackCount,c="flex"===n.barThickness?computeFlexCategoryTraits(e,t,n,i*l):computeFitCategoryTraits(e,t,n,i*l),h="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(valueOrDefault(h,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,r?e:void 0)+p;s=c.start+c.chunk*u+c.chunk/2,o=Math.min(a,c.chunk*c.ratio)}else s=i.getPixelForValue(this.getParsed(e)[i.axis],e),o=Math.min(a,t.min*t.ratio);return{base:s-o/2,head:s+o/2,center:s,size:o}}draw(){const e=this._cachedMeta,t=e.vScale,i=e.data,n=i.length;let r=0;for(;r<n;++r)null===this.getParsed(r)[t.axis]||i[r].hidden||i[r].draw(this._ctx)}}function getRatioAndOffset(e,t,i){let n=1,r=1,a=0,s=0;if(t<TAU){const o=e,l=o+t,c=Math.cos(o),h=Math.sin(o),p=Math.cos(l),u=Math.sin(l),d=(e,t,n)=>_angleBetween(e,o,l,!0)?1:Math.max(t,t*i,n,n*i),f=(e,t,n)=>_angleBetween(e,o,l,!0)?-1:Math.min(t,t*i,n,n*i),m=d(0,c,p),g=d(HALF_PI,h,u),v=f(PI,c,p),y=f(PI+HALF_PI,h,u);n=(m-v)/2,r=(g-y)/2,a=-(m+v)/2,s=-(g+y)/2}return{ratioX:n,ratioY:r,offsetX:a,offsetY:s}}class DoughnutController extends DatasetController{static id="doughnut";static 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"};static descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data,{labels:{pointStyle:i,textAlign:n,color:r,useBorderRadius:a,borderRadius:s}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:l.backgroundColor,fontColor:r,hidden:!e.getDataVisibility(o),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:n,pointStyle:i,borderRadius:a&&(s||l.borderRadius),index:o}}):[]}},onClick(e,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,a,s=e=>+i[e];if(isObject$1(i[e])){const{key:e="value"}=this._parsing;s=t=>+resolveObjectKey(i[t],e)}for(r=e,a=e+t;r<a;++r)n._parsed[r]=s(r)}}_getRotation(){return toRadians(this.options.rotation-90)}_getCircumference(){return toRadians(this.options.circumference)}_getRotationExtents(){let e=TAU,t=-TAU;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,r=n._getRotation(),a=n._getCircumference();e=Math.min(e,r),t=Math.max(t,r+a)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:i}=t,n=this._cachedMeta,r=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,s=Math.max((Math.min(i.width,i.height)-a)/2,0),o=Math.min(toPercentage(this.options.cutout,s),1),l=this._getRingWeight(this.index),{circumference:c,rotation:h}=this._getRotationExtents(),{ratioX:p,ratioY:u,offsetX:d,offsetY:f}=getRatioAndOffset(h,c,o),m=(i.width-a)/p,g=(i.height-a)/u,v=Math.max(Math.min(m,g)/2,0),y=toDimension(this.options.radius,v),b=(y-Math.max(y*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=d*y,this.offsetY=f*y,n.total=this.calculateTotal(),this.outerRadius=y-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*l,0),this.updateElements(r,0,r.length,e)}_circumference(e,t){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return t&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||null===n._parsed[e]||n.data[e].hidden?0:this.calculateCircumference(n._parsed[e]*r/TAU)}updateElements(e,t,i,n){const r="reset"===n,a=this.chart,s=a.chartArea,o=a.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&o.animateScale,p=h?0:this.innerRadius,u=h?0:this.outerRadius,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(t,n);let m,g=this._getRotation();for(m=0;m<t;++m)g+=this._circumference(m,r);for(m=t;m<t+i;++m){const t=this._circumference(m,r),i=e[m],a={x:l+this.offsetX,y:c+this.offsetY,startAngle:g,endAngle:g+t,circumference:t,outerRadius:u,innerRadius:p};f&&(a.options=d||this.resolveDataElementOptions(m,i.active?"active":n)),g+=t,this.updateElement(i,m,a,n)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let i,n=0;for(i=0;i<t.length;i++){const r=e._parsed[i];null===r||isNaN(r)||!this.chart.getDataVisibility(i)||t[i].hidden||(n+=Math.abs(r))}return n}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?TAU*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=formatNumber(t._parsed[e],i.options.locale);return{label:n[e]||"",value:r}}getMaxBorderWidth(e){let t=0;const i=this.chart;let n,r,a,s,o;if(!e)for(n=0,r=i.data.datasets.length;n<r;++n)if(i.isDatasetVisible(n)){a=i.getDatasetMeta(n),e=a.data,s=a.controller;break}if(!e)return 0;for(n=0,r=e.length;n<r;++n)o=s.resolveDataElementOptions(n),"inner"!==o.borderAlign&&(t=Math.max(t,o.borderWidth||0,o.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let i=0,n=e.length;i<n;++i){const e=this.resolveDataElementOptions(i);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(t+=this._getRingWeight(i));return t}_getRingWeight(e){return Math.max(valueOrDefault(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class PieController extends DoughnutController{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function abstract(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class DateAdapterBase{static override(e){Object.assign(DateAdapterBase.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return abstract()}parse(){return abstract()}format(){return abstract()}add(){return abstract()}diff(){return abstract()}startOf(){return abstract()}endOf(){return abstract()}}var adapters={_date:DateAdapterBase};function binarySearch(e,t,i,n){const{controller:r,data:a,_sorted:s}=e,o=r._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(o&&t===o.axis&&"r"!==t&&s&&a.length){const s=o._reversePixels?_rlookupByKey:_lookupByKey;if(!n){const n=s(a,t,i);if(l){const{vScale:t}=r._cachedMeta,{_parsed:i}=e,a=i.slice(0,n.lo+1).reverse().findIndex(e=>!isNullOrUndef(e[t.axis]));n.lo-=Math.max(0,a);const s=i.slice(n.hi).findIndex(e=>!isNullOrUndef(e[t.axis]));n.hi+=Math.max(0,s)}return n}if(r._sharedOptions){const e=a[0],n="function"==typeof e.getRange&&e.getRange(t);if(n){const e=s(a,t,i-n),r=s(a,t,i+n);return{lo:e.lo,hi:r.hi}}}}return{lo:0,hi:a.length-1}}function evaluateInteractionItems(e,t,i,n,r){const a=e.getSortedVisibleDatasetMetas(),s=i[t];for(let e=0,i=a.length;e<i;++e){const{index:i,data:o}=a[e],{lo:l,hi:c}=binarySearch(a[e],t,s,r);for(let e=l;e<=c;++e){const t=o[e];t.skip||n(t,i,e)}}}function getDistanceMetricForAxis(e){const t=-1!==e.indexOf("x"),i=-1!==e.indexOf("y");return function(e,n){const r=t?Math.abs(e.x-n.x):0,a=i?Math.abs(e.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(a,2))}}function getIntersectItems(e,t,i,n,r){const a=[];if(!r&&!e.isPointInArea(t))return a;return evaluateInteractionItems(e,i,t,function(i,s,o){(r||_isPointInArea(i,e.chartArea,0))&&i.inRange(t.x,t.y,n)&&a.push({element:i,datasetIndex:s,index:o})},!0),a}function getNearestRadialItems(e,t,i,n){let r=[];return evaluateInteractionItems(e,i,t,function(e,i,a){const{startAngle:s,endAngle:o}=e.getProps(["startAngle","endAngle"],n),{angle:l}=getAngleFromPoint(e,{x:t.x,y:t.y});_angleBetween(l,s,o)&&r.push({element:e,datasetIndex:i,index:a})}),r}function getNearestCartesianItems(e,t,i,n,r,a){let s=[];const o=getDistanceMetricForAxis(i);let l=Number.POSITIVE_INFINITY;return evaluateInteractionItems(e,i,t,function(i,c,h){const p=i.inRange(t.x,t.y,r);if(n&&!p)return;const u=i.getCenterPoint(r);if(!(!!a||e.isPointInArea(u))&&!p)return;const d=o(t,u);d<l?(s=[{element:i,datasetIndex:c,index:h}],l=d):d===l&&s.push({element:i,datasetIndex:c,index:h})}),s}function getNearestItems(e,t,i,n,r,a){return a||e.isPointInArea(t)?"r"!==i||n?getNearestCartesianItems(e,t,i,n,r,a):getNearestRadialItems(e,t,i,r):[]}function getAxisItems(e,t,i,n,r){const a=[],s="x"===i?"inXRange":"inYRange";let o=!1;return evaluateInteractionItems(e,i,t,(e,n,l)=>{e[s]&&e[s](t[i],r)&&(a.push({element:e,datasetIndex:n,index:l}),o=o||e.inRange(t.x,t.y,r))}),n&&!o?[]:a}var Interaction={modes:{index(e,t,i,n){const r=getRelativePosition(t,e),a=i.axis||"x",s=i.includeInvisible||!1,o=i.intersect?getIntersectItems(e,r,a,n,s):getNearestItems(e,r,a,!1,n,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{const t=o[0].index,i=e.data[t];i&&!i.skip&&l.push({element:i,datasetIndex:e.index,index:t})}),l):[]},dataset(e,t,i,n){const r=getRelativePosition(t,e),a=i.axis||"xy",s=i.includeInvisible||!1;let o=i.intersect?getIntersectItems(e,r,a,n,s):getNearestItems(e,r,a,!1,n,s);if(o.length>0){const t=o[0].datasetIndex,i=e.getDatasetMeta(t).data;o=[];for(let e=0;e<i.length;++e)o.push({element:i[e],datasetIndex:t,index:e})}return o},point:(e,t,i,n)=>getIntersectItems(e,getRelativePosition(t,e),i.axis||"xy",n,i.includeInvisible||!1),nearest(e,t,i,n){const r=getRelativePosition(t,e),a=i.axis||"xy",s=i.includeInvisible||!1;return getNearestItems(e,r,a,i.intersect,n,s)},x:(e,t,i,n)=>getAxisItems(e,getRelativePosition(t,e),"x",i.intersect,n),y:(e,t,i,n)=>getAxisItems(e,getRelativePosition(t,e),"y",i.intersect,n)}};const STATIC_POSITIONS=["left","top","right","bottom"];function filterByPosition(e,t){return e.filter(e=>e.pos===t)}function filterDynamicPositionByAxis(e,t){return e.filter(e=>-1===STATIC_POSITIONS.indexOf(e.pos)&&e.box.axis===t)}function sortByWeight(e,t){return e.sort((e,i)=>{const n=t?i:e,r=t?e:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function wrapBoxes(e){const t=[];let i,n,r,a,s,o;for(i=0,n=(e||[]).length;i<n;++i)r=e[i],({position:a,options:{stack:s,stackWeight:o=1}}=r),t.push({index:i,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&a+s,stackWeight:o});return t}function buildStacks(e){const t={};for(const i of e){const{stack:e,pos:n,stackWeight:r}=i;if(!e||!STATIC_POSITIONS.includes(n))continue;const a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=r}return t}function setLayoutDims(e,t){const i=buildStacks(e),{vBoxMaxWidth:n,hBoxMaxHeight:r}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:s}=o.box,l=i[o.stack],c=l&&o.stackWeight/l.weight;o.horizontal?(o.width=c?c*n:s&&t.availableWidth,o.height=r):(o.width=n,o.height=c?c*r:s&&t.availableHeight)}return i}function buildLayoutBoxes(e){const t=wrapBoxes(e),i=sortByWeight(t.filter(e=>e.box.fullSize),!0),n=sortByWeight(filterByPosition(t,"left"),!0),r=sortByWeight(filterByPosition(t,"right")),a=sortByWeight(filterByPosition(t,"top"),!0),s=sortByWeight(filterByPosition(t,"bottom")),o=filterDynamicPositionByAxis(t,"x"),l=filterDynamicPositionByAxis(t,"y");return{fullSize:i,leftAndTop:n.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:filterByPosition(t,"chartArea"),vertical:n.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function getCombinedMax(e,t,i,n){return Math.max(e[i],t[i])+Math.max(e[n],t[n])}function updateMaxPadding(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function updateDims(e,t,i,n){const{pos:r,box:a}=i,s=e.maxPadding;if(!isObject$1(r)){i.size&&(e[r]-=i.size);const t=n[i.stack]||{size:0,count:1};t.size=Math.max(t.size,i.horizontal?a.height:a.width),i.size=t.size/t.count,e[r]+=i.size}a.getPadding&&updateMaxPadding(s,a.getPadding());const o=Math.max(0,t.outerWidth-getCombinedMax(s,e,"left","right")),l=Math.max(0,t.outerHeight-getCombinedMax(s,e,"top","bottom")),c=o!==e.w,h=l!==e.h;return e.w=o,e.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function handleMaxPadding(e){const t=e.maxPadding;function i(i){const n=Math.max(t[i]-e[i],0);return e[i]+=n,n}e.y+=i("top"),e.x+=i("left"),i("right"),i("bottom")}function getMargins(e,t){const i=t.maxPadding;function n(e){const n={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{n[e]=Math.max(t[e],i[e])}),n}return n(e?["left","right"]:["top","bottom"])}function fitBoxes(e,t,i,n){const r=[];let a,s,o,l,c,h;for(a=0,s=e.length,c=0;a<s;++a){o=e[a],l=o.box,l.update(o.width||t.w,o.height||t.h,getMargins(o.horizontal,t));const{same:s,other:p}=updateDims(t,i,o,n);c|=s&&r.length,h=h||p,l.fullSize||r.push(o)}return c&&fitBoxes(r,t,i,n)||h}function setBoxDims(e,t,i,n,r){e.top=i,e.left=t,e.right=t+n,e.bottom=i+r,e.width=n,e.height=r}function placeBoxes(e,t,i,n){const r=i.padding;let{x:a,y:s}=t;for(const o of e){const e=o.box,l=n[o.stack]||{placed:0,weight:1},c=o.stackWeight/l.weight||1;if(o.horizontal){const n=t.w*c,a=l.size||e.height;defined(l.start)&&(s=l.start),e.fullSize?setBoxDims(e,r.left,s,i.outerWidth-r.right-r.left,a):setBoxDims(e,t.left+l.placed,s,n,a),l.start=s,l.placed+=n,s=e.bottom}else{const n=t.h*c,s=l.size||e.width;defined(l.start)&&(a=l.start),e.fullSize?setBoxDims(e,a,r.top,s,i.outerHeight-r.bottom-r.top):setBoxDims(e,a,t.top+l.placed,s,n),l.start=a,l.placed+=n,a=e.right}}t.x=a,t.y=s}var layouts={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const i=e.boxes?e.boxes.indexOf(t):-1;-1!==i&&e.boxes.splice(i,1)},configure(e,t,i){t.fullSize=i.fullSize,t.position=i.position,t.weight=i.weight},update(e,t,i,n){if(!e)return;const r=toPadding(e.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(i-r.height,0),o=buildLayoutBoxes(e.boxes),l=o.vertical,c=o.horizontal;each(e.boxes,e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()});const h=l.reduce((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1,0)||1,p=Object.freeze({outerWidth:t,outerHeight:i,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/h,hBoxMaxHeight:s/2}),u=Object.assign({},r);updateMaxPadding(u,toPadding(n));const d=Object.assign({maxPadding:u,w:a,h:s,x:r.left,y:r.top},r),f=setLayoutDims(l.concat(c),p);fitBoxes(o.fullSize,d,p,f),fitBoxes(l,d,p,f),fitBoxes(c,d,p,f)&&fitBoxes(l,d,p,f),handleMaxPadding(d),placeBoxes(o.leftAndTop,d,p,f),d.x+=d.w,d.y+=d.h,placeBoxes(o.rightAndBottom,d,p,f),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},each(o.chartArea,t=>{const i=t.box;Object.assign(i,e.chartArea),i.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class BasePlatform{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,n){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,n?Math.floor(t/n):i)}}isAttached(e){return!0}updateConfig(e){}}class BasicPlatform extends BasePlatform{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const EXPANDO_KEY="$chartjs",EVENT_TYPES={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},isNullOrEmpty=e=>null===e||""===e;function initCanvas(e,t){const i=e.style,n=e.getAttribute("height"),r=e.getAttribute("width");if(e[EXPANDO_KEY]={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",isNullOrEmpty(r)){const t=readUsedSize(e,"width");void 0!==t&&(e.width=t)}if(isNullOrEmpty(n))if(""===e.style.height)e.height=e.width/(t||2);else{const t=readUsedSize(e,"height");void 0!==t&&(e.height=t)}return e}const eventListenerOptions=!!supportsEventListenerOptions&&{passive:!0};function addListener(e,t,i){e&&e.addEventListener(t,i,eventListenerOptions)}function removeListener(e,t,i){e&&e.canvas&&e.canvas.removeEventListener(t,i,eventListenerOptions)}function fromNativeEvent(e,t){const i=EVENT_TYPES[e.type]||e.type,{x:n,y:r}=getRelativePosition(e,t);return{type:i,chart:t,native:e,x:void 0!==n?n:null,y:void 0!==r?r:null}}function nodeListContains(e,t){for(const i of e)if(i===t||i.contains(t))return!0}function createAttachObserver(e,t,i){const n=e.canvas,r=new MutationObserver(e=>{let t=!1;for(const i of e)t=t||nodeListContains(i.addedNodes,n),t=t&&!nodeListContains(i.removedNodes,n);t&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}function createDetachObserver(e,t,i){const n=e.canvas,r=new MutationObserver(e=>{let t=!1;for(const i of e)t=t||nodeListContains(i.removedNodes,n),t=t&&!nodeListContains(i.addedNodes,n);t&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}const drpListeningCharts=new Map;let oldDevicePixelRatio=0;function onWindowResize(){const e=window.devicePixelRatio;e!==oldDevicePixelRatio&&(oldDevicePixelRatio=e,drpListeningCharts.forEach((t,i)=>{i.currentDevicePixelRatio!==e&&t()}))}function listenDevicePixelRatioChanges(e,t){drpListeningCharts.size||window.addEventListener("resize",onWindowResize),drpListeningCharts.set(e,t)}function unlistenDevicePixelRatioChanges(e){drpListeningCharts.delete(e),drpListeningCharts.size||window.removeEventListener("resize",onWindowResize)}function createResizeObserver(e,t,i){const n=e.canvas,r=n&&_getParentNode(n);if(!r)return;const a=throttled((e,t)=>{const n=r.clientWidth;i(e,t),n<r.clientWidth&&i()},window),s=new ResizeObserver(e=>{const t=e[0],i=t.contentRect.width,n=t.contentRect.height;0===i&&0===n||a(i,n)});return s.observe(r),listenDevicePixelRatioChanges(e,a),s}function releaseObserver(e,t,i){i&&i.disconnect(),"resize"===t&&unlistenDevicePixelRatioChanges(e)}function createProxyAndListen(e,t,i){const n=e.canvas,r=throttled(t=>{null!==e.ctx&&i(fromNativeEvent(t,e))},e);return addListener(n,t,r),r}class DomPlatform extends BasePlatform{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(initCanvas(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[EXPANDO_KEY])return!1;const i=t[EXPANDO_KEY].initial;["height","width"].forEach(e=>{const n=i[e];isNullOrUndef(n)?t.removeAttribute(e):t.setAttribute(e,n)});const n=i.style||{};return Object.keys(n).forEach(e=>{t.style[e]=n[e]}),t.width=t.width,delete t[EXPANDO_KEY],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const n=e.$proxies||(e.$proxies={}),r={attach:createAttachObserver,detach:createDetachObserver,resize:createResizeObserver}[t]||createProxyAndListen;n[t]=r(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),n=i[t];if(!n)return;({attach:releaseObserver,detach:releaseObserver,resize:releaseObserver}[t]||removeListener)(e,t,n),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,n){return getMaximumSize(e,t,i,n)}isAttached(e){const t=e&&_getParentNode(e);return!(!t||!t.isConnected)}}function _detectPlatform(e){return!_isDomSupported()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?BasicPlatform:DomPlatform}class Element{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return isNumber(this.x)&&isNumber(this.y)}getProps(e,t){const i=this.$animations;if(!t||!i)return this;const n={};return e.forEach(e=>{n[e]=i[e]&&i[e].active()?i[e]._to:this[e]}),n}}function autoSkip(e,t){const i=e.options.ticks,n=determineMaxTicks(e),r=Math.min(i.maxTicksLimit||n,n),a=i.major.enabled?getMajorIndices(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return skipMajors(t,c,a,s/r),c;const h=calculateSpacing(a,t,r);if(s>0){let e,i;const n=s>1?Math.round((l-o)/(s-1)):null;for(skip(t,c,h,isNullOrUndef(n)?0:o-n,o),e=0,i=s-1;e<i;e++)skip(t,c,h,a[e],a[e+1]);return skip(t,c,h,l,isNullOrUndef(n)?t.length:l+n),c}return skip(t,c,h),c}function determineMaxTicks(e){const t=e.options.offset,i=e._tickSize(),n=e._length/i+(t?0:1),r=e._maxLength/i;return Math.floor(Math.min(n,r))}function calculateSpacing(e,t,i){const n=getEvenSpacing(e),r=t.length/i;if(!n)return Math.max(r,1);const a=_factorize(n);for(let e=0,t=a.length-1;e<t;e++){const t=a[e];if(t>r)return t}return Math.max(r,1)}function getMajorIndices(e){const t=[];let i,n;for(i=0,n=e.length;i<n;i++)e[i].major&&t.push(i);return t}function skipMajors(e,t,i,n){let r,a=0,s=i[0];for(n=Math.ceil(n),r=0;r<e.length;r++)r===s&&(t.push(e[r]),a++,s=i[a*n])}function skip(e,t,i,n,r){const a=valueOrDefault(n,0),s=Math.min(valueOrDefault(r,e.length),e.length);let o,l,c,h=0;for(i=Math.ceil(i),r&&(o=r-n,i=o/Math.floor(o/i)),c=a;c<0;)h++,c=Math.round(a+h*i);for(l=Math.max(a,0);l<s;l++)l===c&&(t.push(e[l]),h++,c=Math.round(a+h*i))}function getEvenSpacing(e){const t=e.length;let i,n;if(t<2)return!1;for(n=e[0],i=1;i<t;++i)if(e[i]-e[i-1]!==n)return!1;return n}const reverseAlign=e=>"left"===e?"right":"right"===e?"left":e,offsetFromEdge=(e,t,i)=>"top"===t||"left"===t?e[t]+i:e[t]-i,getTicksLimit=(e,t)=>Math.min(t||e,e);function sample(e,t){const i=[],n=e.length/t,r=e.length;let a=0;for(;a<r;a+=n)i.push(e[Math.floor(a)]);return i}function getPixelForGridLine(e,t,i){const n=e.ticks.length,r=Math.min(t,n-1),a=e._startPixel,s=e._endPixel,o=1e-6;let l,c=e.getPixelForTick(r);if(!(i&&(l=1===n?Math.max(c-a,s-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(r-1))/2,c+=r<t?l:-l,c<a-o||c>s+o)))return c}function garbageCollect(e,t){each(e,e=>{const i=e.gc,n=i.length/2;let r;if(n>t){for(r=0;r<n;++r)delete e.data[i[r]];i.splice(0,n)}})}function getTickMarkLength(e){return e.drawTicks?e.tickLength:0}function getTitleHeight(e,t){if(!e.display)return 0;const i=toFont(e.font,t),n=toPadding(e.padding);return(isArray(e.text)?e.text.length:1)*i.lineHeight+n.height}function createScaleContext(e,t){return createContext(e,{scale:t,type:"scale"})}function createTickContext(e,t,i){return createContext(e,{tick:i,index:t,type:"tick"})}function titleAlign(e,t,i){let n=_toLeftRightCenter(e);return(i&&"right"!==t||!i&&"right"===t)&&(n=reverseAlign(n)),n}function titleArgs(e,t,i,n){const{top:r,left:a,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:h}=l;let p,u,d,f=0;const m=s-r,g=o-a;if(e.isHorizontal()){if(u=_alignStartEnd(n,a,o),isObject$1(i)){const e=Object.keys(i)[0],n=i[e];d=h[e].getPixelForValue(n)+m-t}else d="center"===i?(c.bottom+c.top)/2+m-t:offsetFromEdge(e,i,t);p=o-a}else{if(isObject$1(i)){const e=Object.keys(i)[0],n=i[e];u=h[e].getPixelForValue(n)-g+t}else u="center"===i?(c.left+c.right)/2-g+t:offsetFromEdge(e,i,t);d=_alignStartEnd(n,s,r),f="left"===i?-HALF_PI:HALF_PI}return{titleX:u,titleY:d,maxWidth:p,rotation:f}}class Scale extends Element{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:n}=this;return e=finiteOrDefault(e,Number.POSITIVE_INFINITY),t=finiteOrDefault(t,Number.NEGATIVE_INFINITY),i=finiteOrDefault(i,Number.POSITIVE_INFINITY),n=finiteOrDefault(n,Number.NEGATIVE_INFINITY),{min:finiteOrDefault(e,i),max:finiteOrDefault(t,n),minDefined:isNumberFinite(e),maxDefined:isNumberFinite(t)}}getMinMax(e){let t,{min:i,max:n,minDefined:r,maxDefined:a}=this.getUserBounds();if(r&&a)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let o=0,l=s.length;o<l;++o)t=s[o].controller.getMinMax(this,e),r||(i=Math.min(i,t.min)),a||(n=Math.max(n,t.max));return i=a&&i>n?n:i,n=r&&i>n?i:n,{min:finiteOrDefault(i,finiteOrDefault(n,i)),max:finiteOrDefault(n,finiteOrDefault(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){callback(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:n,grace:r,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_addGrace(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=s<this.ticks.length;this._convertTicksToLabels(o?sample(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=autoSkip(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,i=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,i=!i),this._startPixel=e,this._endPixel=t,this._reversePixels=i,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){callback(this.options.afterUpdate,[this])}beforeSetDimensions(){callback(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(){callback(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),callback(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){callback(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let i,n,r;for(i=0,n=e.length;i<n;i++)r=e[i],r.label=callback(t.callback,[r.value,i,e],this)}afterTickToLabelConversion(){callback(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){callback(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,i=getTicksLimit(this.ticks.length,e.ticks.maxTicksLimit),n=t.minRotation||0,r=t.maxRotation;let a,s,o,l=n;if(!this._isVisible()||!t.display||n>=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,p=c.highest.height,u=_limitValue(this.chart.width-h,0,this.maxWidth);a=e.offset?this.maxWidth/i:u/(i-1),h+6>a&&(a=u/(i-(e.offset?.5:1)),s=this.maxHeight-getTickMarkLength(e.grid)-t.padding-getTitleHeight(e.title,this.chart.options.font),o=Math.sqrt(h*h+p*p),l=toDegrees(Math.min(Math.asin(_limitValue((c.highest.height+6)/a,-1,1)),Math.asin(_limitValue(s/o,-1,1))-Math.asin(_limitValue(p/o,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){callback(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:n,grid:r}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const a=getTitleHeight(n,t.options.font);if(s?(e.width=this.maxWidth,e.height=getTickMarkLength(r)+a):(e.height=this.maxHeight,e.width=getTickMarkLength(r)+a),i.display&&this.ticks.length){const{first:t,last:n,widest:r,highest:a}=this._getLabelSizes(),o=2*i.padding,l=toRadians(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const t=i.mirror?0:h*r.width+c*a.height;e.height=Math.min(this.maxHeight,e.height+t+o)}else{const t=i.mirror?0:c*r.width+h*a.height;e.width=Math.min(this.maxWidth,e.width+t+o)}this._calculatePadding(t,n,h,c)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,n){const{ticks:{align:r,padding:a},position:s}=this.options,o=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;o?l?(h=n*e.width,p=i*t.height):(h=i*e.height,p=n*t.width):"start"===r?p=t.width:"end"===r?h=e.width:"inner"!==r&&(h=e.width/2,p=t.width/2),this.paddingLeft=Math.max((h-s+a)*this.width/(this.width-s),0),this.paddingRight=Math.max((p-c+a)*this.width/(this.width-c),0)}else{let i=t.height/2,n=e.height/2;"start"===r?(i=0,n=e.height):"end"===r&&(i=t.height,n=0),this.paddingTop=i+a,this.paddingBottom=n+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(){callback(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,i=e.length;t<i;t++)isNullOrUndef(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=sample(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,i){const{ctx:n,_longestTextCache:r}=this,a=[],s=[],o=Math.floor(t/getTicksLimit(t,i));let l,c,h,p,u,d,f,m,g,v,y,b=0,x=0;for(l=0;l<t;l+=o){if(p=e[l].label,u=this._resolveTickFontOptions(l),n.font=d=u.string,f=r[d]=r[d]||{data:{},gc:[]},m=u.lineHeight,g=v=0,isNullOrUndef(p)||isArray(p)){if(isArray(p))for(c=0,h=p.length;c<h;++c)y=p[c],isNullOrUndef(y)||isArray(y)||(g=_measureText(n,f.data,f.gc,g,y),v+=m)}else g=_measureText(n,f.data,f.gc,g,p),v=m;a.push(g),s.push(v),b=Math.max(g,b),x=Math.max(v,x)}garbageCollect(r,t);const _=a.indexOf(b),S=s.indexOf(x),w=e=>({width:a[e]||0,height:s[e]||0});return{first:w(0),last:w(t-1),widest:w(_),highest:w(S),widths:a,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return _int16Range(this._alignToPixels?_alignPixel(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const i=t[e];return i.$context||(i.$context=createTickContext(this.getContext(),e,i))}return this.$context||(this.$context=createScaleContext(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=toRadians(this.labelRotation),i=Math.abs(Math.cos(t)),n=Math.abs(Math.sin(t)),r=this._getLabelSizes(),a=e.autoSkipPadding||0,s=r?r.widest.width+a:0,o=r?r.highest.height+a:0;return this.isHorizontal()?o*i>s*n?s/i:o/n:o*n<s*i?o/i:s/n}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,i=this.chart,n=this.options,{grid:r,position:a,border:s}=n,o=r.offset,l=this.isHorizontal(),c=this.ticks.length+(o?1:0),h=getTickMarkLength(r),p=[],u=s.setContext(this.getContext()),d=u.display?u.width:0,f=d/2,m=function(e){return _alignPixel(i,e,d)};let g,v,y,b,x,_,S,w,C,P,E,k;if("top"===a)g=m(this.bottom),_=this.bottom-h,w=g-f,P=m(e.top)+f,k=e.bottom;else if("bottom"===a)g=m(this.top),P=e.top,k=m(e.bottom)-f,_=g+f,w=this.top+h;else if("left"===a)g=m(this.right),x=this.right-h,S=g-f,C=m(e.left)+f,E=e.right;else if("right"===a)g=m(this.left),C=e.left,E=m(e.right)-f,x=g+f,S=this.left+h;else if("x"===t){if("center"===a)g=m((e.top+e.bottom)/2+.5);else if(isObject$1(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}P=e.top,k=e.bottom,_=g+f,w=_+h}else if("y"===t){if("center"===a)g=m((e.left+e.right)/2);else if(isObject$1(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}x=g-f,S=x-h,C=e.left,E=e.right}const A=valueOrDefault(n.ticks.maxTicksLimit,c),T=Math.max(1,Math.ceil(c/A));for(v=0;v<c;v+=T){const e=this.getContext(v),t=r.setContext(e),n=s.setContext(e),a=t.lineWidth,c=t.color,h=n.dash||[],u=n.dashOffset,d=t.tickWidth,f=t.tickColor,m=t.tickBorderDash||[],g=t.tickBorderDashOffset;y=getPixelForGridLine(this,v,o),void 0!==y&&(b=_alignPixel(i,y,a),l?x=S=C=E=b:_=w=P=k=b,p.push({tx1:x,ty1:_,tx2:S,ty2:w,x1:C,y1:P,x2:E,y2:k,width:a,color:c,borderDash:h,borderDashOffset:u,tickWidth:d,tickColor:f,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=c,this._borderValue=g,p}_computeLabelItems(e){const t=this.axis,i=this.options,{position:n,ticks:r}=i,a=this.isHorizontal(),s=this.ticks,{align:o,crossAlign:l,padding:c,mirror:h}=r,p=getTickMarkLength(i.grid),u=p+c,d=h?-c:u,f=-toRadians(this.labelRotation),m=[];let g,v,y,b,x,_,S,w,C,P,E,k,A="middle";if("top"===n)_=this.bottom-d,S=this._getXAxisLabelAlignment();else if("bottom"===n)_=this.top+d,S=this._getXAxisLabelAlignment();else if("left"===n){const e=this._getYAxisLabelAlignment(p);S=e.textAlign,x=e.x}else if("right"===n){const e=this._getYAxisLabelAlignment(p);S=e.textAlign,x=e.x}else if("x"===t){if("center"===n)_=(e.top+e.bottom)/2+u;else if(isObject$1(n)){const e=Object.keys(n)[0],t=n[e];_=this.chart.scales[e].getPixelForValue(t)+u}S=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===n)x=(e.left+e.right)/2-u;else if(isObject$1(n)){const e=Object.keys(n)[0],t=n[e];x=this.chart.scales[e].getPixelForValue(t)}S=this._getYAxisLabelAlignment(p).textAlign}"y"===t&&("start"===o?A="top":"end"===o&&(A="bottom"));const T=this._getLabelSizes();for(g=0,v=s.length;g<v;++g){y=s[g],b=y.label;const e=r.setContext(this.getContext(g));w=this.getPixelForTick(g)+r.labelOffset,C=this._resolveTickFontOptions(g),P=C.lineHeight,E=isArray(b)?b.length:1;const t=E/2,i=e.color,o=e.textStrokeColor,c=e.textStrokeWidth;let p,u=S;if(a?(x=w,"inner"===S&&(u=g===v-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),k="top"===n?"near"===l||0!==f?-E*P+P/2:"center"===l?-T.highest.height/2-t*P+P:-T.highest.height+P/2:"near"===l||0!==f?P/2:"center"===l?T.highest.height/2-t*P:T.highest.height-E*P,h&&(k*=-1),0===f||e.showLabelBackdrop||(x+=P/2*Math.sin(f))):(_=w,k=(1-E)*P/2),e.showLabelBackdrop){const t=toPadding(e.backdropPadding),i=T.heights[g],n=T.widths[g];let r=k-t.top,a=0-t.left;switch(A){case"middle":r-=i/2;break;case"bottom":r-=i}switch(S){case"center":a-=n/2;break;case"right":a-=n;break;case"inner":g===v-1?a-=n:g>0&&(a-=n/2)}p={left:a,top:r,width:n+t.width,height:i+t.height,color:e.backdropColor}}m.push({label:b,font:C,textOffset:k,options:{rotation:f,color:i,strokeColor:o,strokeWidth:c,textAlign:u,textBaseline:A,translation:[x,_],backdrop:p}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-toRadians(this.labelRotation))return"top"===e?"left":"right";let i="center";return"start"===t.align?i="left":"end"===t.align?i="right":"inner"===t.align&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:i,mirror:n,padding:r}}=this.options,a=e+r,s=this._getLabelSizes().widest.width;let o,l;return"left"===t?n?(l=this.right+r,"near"===i?o="left":"center"===i?(o="center",l+=s/2):(o="right",l+=s)):(l=this.right-a,"near"===i?o="right":"center"===i?(o="center",l-=s/2):(o="left",l=this.left)):"right"===t?n?(l=this.left+r,"near"===i?o="right":"center"===i?(o="center",l-=s/2):(o="left",l-=s)):(l=this.left+a,"near"===i?o="left":"center"===i?(o="center",l+=s/2):(o="right",l=this.right)):o="right",{textAlign:o,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:i,top:n,width:r,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,n,r,a),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const i=this.ticks.findIndex(t=>t.value===e);if(i>=0){return t.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,a;const s=(e,t,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(e.x,e.y),i.lineTo(t.x,t.y),i.stroke(),i.restore())};if(t.display)for(r=0,a=n.length;r<a;++r){const e=n[r];t.drawOnChartArea&&s({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&s({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:i,grid:n}}=this,r=i.setContext(this.getContext()),a=i.display?r.width:0;if(!a)return;const s=n.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let l,c,h,p;this.isHorizontal()?(l=_alignPixel(e,this.left,a)-a/2,c=_alignPixel(e,this.right,s)+s/2,h=p=o):(h=_alignPixel(e,this.top,a)-a/2,p=_alignPixel(e,this.bottom,s)+s/2,l=c=o),t.save(),t.lineWidth=r.width,t.strokeStyle=r.color,t.beginPath(),t.moveTo(l,h),t.lineTo(c,p),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,i=this._computeLabelArea();i&&clipArea(t,i);const n=this.getLabelItems(e);for(const e of n){const i=e.options,n=e.font;renderText(t,e.label,0,e.textOffset,n,i)}i&&unclipArea(t)}drawTitle(){const{ctx:e,options:{position:t,title:i,reverse:n}}=this;if(!i.display)return;const r=toFont(i.font),a=toPadding(i.padding),s=i.align;let o=r.lineHeight/2;"bottom"===t||"center"===t||isObject$1(t)?(o+=a.bottom,isArray(i.text)&&(o+=r.lineHeight*(i.text.length-1))):o+=a.top;const{titleX:l,titleY:c,maxWidth:h,rotation:p}=titleArgs(this,o,t,s);renderText(e,i.text,0,0,r,{color:i.color,maxWidth:h,rotation:p,textAlign:titleAlign(s,t,n),textBaseline:"middle",translation:[l,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,i=valueOrDefault(e.grid&&e.grid.z,-1),n=valueOrDefault(e.border&&e.border.z,0);return this._isVisible()&&this.draw===Scale.prototype.draw?[{z:i,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,a;for(r=0,a=t.length;r<a;++r){const a=t[r];a[i]!==this.id||e&&a.type!==e||n.push(a)}return n}_resolveTickFontOptions(e){return toFont(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class TypedRegistry{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let i;isIChartComponent(t)&&(i=this.register(t));const n=this.items,r=e.id,a=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in n||(n[r]=e,registerDefaults(e,a,i),this.override&&defaults.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const t=this.items,i=e.id,n=this.scope;i in t&&delete t[i],n&&i in defaults[n]&&(delete defaults[n][i],this.override&&delete overrides[i])}}function registerDefaults(e,t,i){const n=merge(Object.create(null),[i?defaults.get(i):{},defaults.get(t),e.defaults]);defaults.set(t,n),e.defaultRoutes&&routeDefaults(t,e.defaultRoutes),e.descriptors&&defaults.describe(t,e.descriptors)}function routeDefaults(e,t){Object.keys(t).forEach(i=>{const n=i.split("."),r=n.pop(),a=[e].concat(n).join("."),s=t[i].split("."),o=s.pop(),l=s.join(".");defaults.route(a,r,l,o)})}function isIChartComponent(e){return"id"in e&&"defaults"in e}class Registry{constructor(){this.controllers=new TypedRegistry(DatasetController,"datasets",!0),this.elements=new TypedRegistry(Element,"elements"),this.plugins=new TypedRegistry(Object,"plugins"),this.scales=new TypedRegistry(Scale,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(t=>{const n=i||this._getRegistryForType(t);i||n.isForType(t)||n===this.plugins&&t.id?this._exec(e,n,t):each(t,t=>{const n=i||this._getRegistryForType(t);this._exec(e,n,t)})})}_exec(e,t,i){const n=_capitalize(e);callback(i["before"+n],[],i),t[e](i),callback(i["after"+n],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){const n=t.get(e);if(void 0===n)throw new Error('"'+e+'" is not a registered '+i+".");return n}}var registry=new Registry;class PluginService{constructor(){this._init=void 0}notify(e,t,i,n){if("beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),void 0===this._init)return;const r=n?this._descriptors(e).filter(n):this._descriptors(e),a=this._notify(r,e,t,i);return"afterDestroy"===t&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),a}_notify(e,t,i,n){n=n||{};for(const r of e){const e=r.plugin;if(!1===callback(e[i],[t,n,r.options],e)&&n.cancelable)return!1}return!0}invalidate(){isNullOrUndef(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,n=valueOrDefault(i.options&&i.options.plugins,{}),r=allPlugins(i);return!1!==n||t?createDescriptors(e,r,n,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,n=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(n(t,i),e,"stop"),this._notify(n(i,t),e,"start")}}function allPlugins(e){const t={},i=[],n=Object.keys(registry.plugins.items);for(let e=0;e<n.length;e++)i.push(registry.getPlugin(n[e]));const r=e.plugins||[];for(let e=0;e<r.length;e++){const n=r[e];-1===i.indexOf(n)&&(i.push(n),t[n.id]=!0)}return{plugins:i,localIds:t}}function getOpts(e,t){return t||!1!==e?!0===e?{}:e:null}function createDescriptors(e,{plugins:t,localIds:i},n,r){const a=[],s=e.getContext();for(const o of t){const t=o.id,l=getOpts(n[t],r);null!==l&&a.push({plugin:o,options:pluginOpts(e.config,{plugin:o,local:i[t]},l,s)})}return a}function pluginOpts(e,{plugin:t,local:i},n,r){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(n,a);return i&&t.defaults&&s.push(t.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function getIndexAxis(e,t){const i=defaults.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||i.indexAxis||"x"}function getAxisFromDefaultScaleID(e,t){let i=e;return"_index_"===e?i=t:"_value_"===e&&(i="x"===t?"y":"x"),i}function getDefaultScaleIDFromAxis(e,t){return e===t?"_index_":"_value_"}function idMatchesAxis(e){if("x"===e||"y"===e||"r"===e)return e}function axisFromPosition(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function determineAxis(e,...t){if(idMatchesAxis(e))return e;for(const i of t){const t=i.axis||axisFromPosition(i.position)||e.length>1&&idMatchesAxis(e[0].toLowerCase());if(t)return t}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function getAxisFromDataset(e,t,i){if(i[t+"AxisID"]===e)return{axis:t}}function retrieveAxisFromDatasets(e,t){if(t.data&&t.data.datasets){const i=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(i.length)return getAxisFromDataset(e,"x",i[0])||getAxisFromDataset(e,"y",i[0])}return{}}function mergeScaleConfig(e,t){const i=overrides[e.type]||{scales:{}},n=t.scales||{},r=getIndexAxis(e.type,t),a=Object.create(null);return Object.keys(n).forEach(t=>{const s=n[t];if(!isObject$1(s))return console.error(`Invalid scale configuration for scale: ${t}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const o=determineAxis(t,s,retrieveAxisFromDatasets(t,e),defaults.scales[s.type]),l=getDefaultScaleIDFromAxis(o,r),c=i.scales||{};a[t]=mergeIf(Object.create(null),[{axis:o},s,c[o],c[l]])}),e.data.datasets.forEach(i=>{const r=i.type||e.type,s=i.indexAxis||getIndexAxis(r,t),o=(overrides[r]||{}).scales||{};Object.keys(o).forEach(e=>{const t=getAxisFromDefaultScaleID(e,s),r=i[t+"AxisID"]||t;a[r]=a[r]||Object.create(null),mergeIf(a[r],[{axis:t},n[r],o[e]])})}),Object.keys(a).forEach(e=>{const t=a[e];mergeIf(t,[defaults.scales[t.type],defaults.scale])}),a}function initOptions(e){const t=e.options||(e.options={});t.plugins=valueOrDefault(t.plugins,{}),t.scales=mergeScaleConfig(e,t)}function initData(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}function initConfig(e){return(e=e||{}).data=initData(e.data),initOptions(e),e}const keyCache=new Map,keysCached=new Set;function cachedKeys(e,t){let i=keyCache.get(e);return i||(i=t(),keyCache.set(e,i),keysCached.add(i)),i}const addIfFound=(e,t,i)=>{const n=resolveObjectKey(t,i);void 0!==n&&e.add(n)};class Config{constructor(e){this._config=initConfig(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=initData(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),initOptions(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return cachedKeys(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return cachedKeys(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return cachedKeys(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id;return cachedKeys(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let n=i.get(e);return n&&!t||(n=new Map,i.set(e,n)),n}getOptionScopes(e,t,i){const{options:n,type:r}=this,a=this._cachedScopes(e,i),s=a.get(t);if(s)return s;const o=new Set;t.forEach(t=>{e&&(o.add(e),t.forEach(t=>addIfFound(o,e,t))),t.forEach(e=>addIfFound(o,n,e)),t.forEach(e=>addIfFound(o,overrides[r]||{},e)),t.forEach(e=>addIfFound(o,defaults,e)),t.forEach(e=>addIfFound(o,descriptors,e))});const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),keysCached.has(t)&&a.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,overrides[t]||{},defaults.datasets[t]||{},{type:t},defaults,descriptors]}resolveNamedOptions(e,t,i,n=[""]){const r={$shared:!0},{resolver:a,subPrefixes:s}=getResolver(this._resolverCache,e,n);let o=a;if(needContext(a,t)){r.$shared=!1;o=_attachContext(a,i=isFunction(i)?i():i,this.createResolver(e,i,s))}for(const e of t)r[e]=o[e];return r}createResolver(e,t,i=[""],n){const{resolver:r}=getResolver(this._resolverCache,e,i);return isObject$1(t)?_attachContext(r,t,void 0,n):r}}function getResolver(e,t,i){let n=e.get(t);n||(n=new Map,e.set(t,n));const r=i.join();let a=n.get(r);if(!a){a={resolver:_createResolver(t,i),subPrefixes:i.filter(e=>!e.toLowerCase().includes("hover"))},n.set(r,a)}return a}const hasFunction=e=>isObject$1(e)&&Object.getOwnPropertyNames(e).some(t=>isFunction(e[t]));function needContext(e,t){const{isScriptable:i,isIndexable:n}=_descriptors(e);for(const r of t){const t=i(r),a=n(r),s=(a||t)&&e[r];if(t&&(isFunction(s)||hasFunction(s))||a&&isArray(s))return!0}return!1}var version="4.5.1";const KNOWN_POSITIONS=["top","bottom","left","right","chartArea"];function positionIsHorizontal(e,t){return"top"===e||"bottom"===e||-1===KNOWN_POSITIONS.indexOf(e)&&"x"===t}function compare2Level(e,t){return function(i,n){return i[e]===n[e]?i[t]-n[t]:i[e]-n[e]}}function onAnimationsComplete(e){const t=e.chart,i=t.options.animation;t.notifyPlugins("afterRender"),callback(i&&i.onComplete,[e],t)}function onAnimationProgress(e){const t=e.chart,i=t.options.animation;callback(i&&i.onProgress,[e],t)}function getCanvas(e){return _isDomSupported()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const instances={},getChart=e=>{const t=getCanvas(e);return Object.values(instances).filter(e=>e.canvas===t).pop()};function moveNumericKeys(e,t,i){const n=Object.keys(e);for(const r of n){const n=+r;if(n>=t){const a=e[r];delete e[r],(i>0||n>t)&&(e[n+i]=a)}}}function determineLastEvent(e,t,i,n){return i&&"mouseout"!==e.type?n?t:e:null}class Chart{static defaults=defaults;static instances=instances;static overrides=overrides;static registry=registry;static version=version;static getChart=getChart;static register(...e){registry.add(...e),invalidatePlugins()}static unregister(...e){registry.remove(...e),invalidatePlugins()}constructor(e,t){const i=this.config=new Config(t),n=getCanvas(e),r=getChart(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||_detectPlatform(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,a.aspectRatio),o=s&&s.canvas,l=o&&o.height,c=o&&o.width;this.id=uid(),this.ctx=s,this.canvas=o,this.width=c,this.height=l,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 PluginService,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=debounce(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],instances[this.id]=this,s&&o?(animator.listen(this,"complete",onAnimationsComplete),animator.listen(this,"progress",onAnimationProgress),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:n,_aspectRatio:r}=this;return isNullOrUndef(e)?t&&r?r:n?i/n:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return registry}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return clearCanvas(this.canvas,this.ctx),this}stop(){return animator.stop(this),this}resize(e,t){animator.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,e,t,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,retinaScale(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),callback(i.onResize,[this,a],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){each(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,n=Object.keys(i).reduce((e,t)=>(e[t]=!1,e),{});let r=[];t&&(r=r.concat(Object.keys(t).map(e=>{const i=t[e],n=determineAxis(e,i),r="r"===n,a="x"===n;return{options:i,dposition:r?"chartArea":a?"bottom":"left",dtype:r?"radialLinear":a?"category":"linear"}}))),each(r,t=>{const r=t.options,a=r.id,s=determineAxis(a,r),o=valueOrDefault(r.type,t.dtype);void 0!==r.position&&positionIsHorizontal(r.position,s)===positionIsHorizontal(t.dposition)||(r.position=t.dposition),n[a]=!0;let l=null;if(a in i&&i[a].type===o)l=i[a];else{l=new(registry.getScale(o))({id:a,type:o,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,e)}),each(n,(e,t)=>{e||delete i[t]}),each(i,e=>{layouts.configure(this,e,e.options),layouts.addBox(this,e)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((e,t)=>e.index-t.index),i>t){for(let e=t;e<i;++e)this._destroyDatasetMeta(e);e.splice(t,i-t)}this._sortedMetasets=e.slice(0).sort(compare2Level("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,i)=>{0===t.filter(t=>t===e._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=t.length;i<n;i++){const n=t[i];let r=this.getDatasetMeta(i);const a=n.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=a,r.indexAxis=n.indexAxis||getIndexAxis(a,this.options),r.order=n.order||0,r.index=i,r.label=""+n.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const t=registry.getController(a),{datasetElementType:n,dataElementType:s}=defaults.datasets[a];Object.assign(t,{dataElementType:registry.getElement(s),datasetElementType:n&®istry.getElement(n)}),r.controller=new t(this,i),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){each(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let e=0,t=this.data.datasets.length;e<t;e++){const{controller:t}=this.getDatasetMeta(e),i=!n&&-1===r.indexOf(t);t.buildOrUpdateElements(i),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),n||each(r,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(compare2Level("z","_idx"));const{_active:s,_lastEvent:o}=this;o?this._eventHandler(o,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){each(this.scales,e=>{layouts.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);setsEqual(t,i)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:r}of t){moveNumericKeys(e,n,"_removeElements"===i?-r:r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+","+e.splice(1).join(","))),n=i(0);for(let e=1;e<t;e++)if(!setsEqual(n,i(e)))return;return Array.from(n).map(e=>e.split(",")).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;layouts.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],each(this.boxes,e=>{i&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,isFunction(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const i=this.getDatasetMeta(e),n={meta:i,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(t),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(animator.has(this)?this.attached&&!animator.running(this)&&animator.start(this):(this.draw(),onAnimationsComplete({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,i=[];let n,r;for(n=0,r=t.length;n<r;++n){const r=t[n];e&&!r.visible||i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i={meta:e,index:e.index,cancelable:!0},n=getDatasetClipArea(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(n&&clipArea(t,n),e.controller.draw(),n&&unclipArea(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return _isPointInArea(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,n){const r=Interaction.modes[t];return"function"==typeof r?r(this,e,i,n):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let n=i.filter(e=>e&&e._dataset===t).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=createContext(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return"boolean"==typeof i.hidden?!i.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const n=i?"show":"hide",r=this.getDatasetMeta(e),a=r.controller._resolveAnimations(void 0,n);defined(t)?(r.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),a.update(r,{visible:i}),this.update(t=>t.datasetIndex===e?n:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),animator.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),clearCanvas(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete instances[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,i=(i,n)=>{t.addEventListener(this,i,n),e[i]=n},n=(e,t,i)=>{e.offsetX=t,e.offsetY=i,this._eventHandler(e)};each(this.options.events,e=>i(e,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(i,n)=>{t.addEventListener(this,i,n),e[i]=n},n=(i,n)=>{e[i]&&(t.removeEventListener(this,i,n),delete e[i])},r=(e,t)=>{this.canvas&&this.resize(e,t)};let a;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",a)};a=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},t.isAttached(this.canvas)?s():a()}unbindEvents(){each(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},each(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const n=i?"set":"remove";let r,a,s,o;for("dataset"===t&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,o=e.length;s<o;++s){a=e[s];const t=a&&this.getDatasetMeta(a.datasetIndex).controller;t&&t[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],i=e.map(({datasetIndex:e,index:t})=>{const i=this.getDatasetMeta(e);if(!i)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:i.data[t],index:t}});!_elementsEqual(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}isPluginEnabled(e){return 1===this._plugins._cache.filter(t=>t.plugin.id===e).length}_updateHoverStyles(e,t,i){const n=this.options.hover,r=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=r(t,e),s=i?e:r(e,t);a.length&&this.updateHoverStyle(a,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},n=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:n=[],options:r}=this,a=t,s=this._getActiveElements(e,n,i,a),o=_isClickEvent(e),l=determineLastEvent(e,this._lastEvent,i,o);i&&(this._lastEvent=null,callback(r.onHover,[e,s,this],this),o&&callback(r.onClick,[e,s,this],this));const c=!_elementsEqual(s,n);return(c||t)&&(this._active=s,this._updateHoverStyles(s,n,t)),this._lastEvent=l,c}_getActiveElements(e,t,i,n){if("mouseout"===e.type)return[];if(!i)return t;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,n)}}function invalidatePlugins(){return each(Chart.instances,e=>e._plugins.invalidate())}function clipSelf(e,t,i){const{startAngle:n,x:r,y:a,outerRadius:s,innerRadius:o,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,p=Math.min(c/s,_normalizeAngle(n-i));if(e.beginPath(),e.arc(r,a,s-c/2,n+p/2,i-p/2),o>0){const t=Math.min(c/o,_normalizeAngle(n-i));e.arc(r,a,o+c/2,i-t/2,n+t/2,!0)}else{const t=Math.min(c/2,s*_normalizeAngle(n-i));if("round"===h)e.arc(r,a,t,i-PI/2,n+PI/2,!0);else if("bevel"===h){const s=2*t*t,o=-s*Math.cos(i+PI/2)+r,l=-s*Math.sin(i+PI/2)+a,c=s*Math.cos(n+PI/2)+r,h=s*Math.sin(n+PI/2)+a;e.lineTo(o,l),e.lineTo(c,h)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function clipArc(e,t,i){const{startAngle:n,pixelMargin:r,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=r/o;e.beginPath(),e.arc(a,s,o,n-c,i+c),l>r?(c=r/l,e.arc(a,s,l,i+c,n-c,!0)):e.arc(a,s,r,i+HALF_PI,n-HALF_PI),e.closePath(),e.clip()}function toRadiusCorners(e){return _readValueToProps(e,["outerStart","outerEnd","innerStart","innerEnd"])}function parseBorderRadius$1(e,t,i,n){const r=toRadiusCorners(e.options.borderRadius),a=(i-t)/2,s=Math.min(a,n*t/2),o=e=>{const t=(i-Math.min(a,e))*n/2;return _limitValue(e,0,Math.min(a,t))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:_limitValue(r.innerStart,0,s),innerEnd:_limitValue(r.innerEnd,0,s)}}function rThetaToXY(e,t,i,n){return{x:i+e*Math.cos(t),y:n+e*Math.sin(t)}}function pathArc(e,t,i,n,r,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:h}=t,p=Math.max(t.outerRadius+n+i-c,0),u=h>0?h+n+i+c:0;let d=0;const f=r-l;if(n){const e=((h>0?h-n:0)+(p>0?p-n:0))/2;d=(f-(0!==e?f*e/(e+n):f))/2}const m=(f-Math.max(.001,f*p-i/PI)/p)/2,g=l+m+d,v=r-m-d,{outerStart:y,outerEnd:b,innerStart:x,innerEnd:_}=parseBorderRadius$1(t,u,p,v-g),S=p-y,w=p-b,C=g+y/S,P=v-b/w,E=u+x,k=u+_,A=g+x/E,T=v-_/k;if(e.beginPath(),a){const t=(C+P)/2;if(e.arc(s,o,p,C,t),e.arc(s,o,p,t,P),b>0){const t=rThetaToXY(w,P,s,o);e.arc(t.x,t.y,b,P,v+HALF_PI)}const i=rThetaToXY(k,v,s,o);if(e.lineTo(i.x,i.y),_>0){const t=rThetaToXY(k,T,s,o);e.arc(t.x,t.y,_,v+HALF_PI,T+Math.PI)}const n=(v-_/u+(g+x/u))/2;if(e.arc(s,o,u,v-_/u,n,!0),e.arc(s,o,u,n,g+x/u,!0),x>0){const t=rThetaToXY(E,A,s,o);e.arc(t.x,t.y,x,A+Math.PI,g-HALF_PI)}const r=rThetaToXY(S,g,s,o);if(e.lineTo(r.x,r.y),y>0){const t=rThetaToXY(S,C,s,o);e.arc(t.x,t.y,y,g-HALF_PI,C)}}else{e.moveTo(s,o);const t=Math.cos(C)*p+s,i=Math.sin(C)*p+o;e.lineTo(t,i);const n=Math.cos(P)*p+s,r=Math.sin(P)*p+o;e.lineTo(n,r)}e.closePath()}function drawArc(e,t,i,n,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){pathArc(e,t,i,n,l,r);for(let t=0;t<a;++t)e.fill();isNaN(o)||(l=s+(o%TAU||TAU))}return pathArc(e,t,i,n,l,r),e.fill(),l}function drawBorder(e,t,i,n,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:p,borderDashOffset:u,borderRadius:d}=l,f="inner"===l.borderAlign;if(!c)return;e.setLineDash(p||[]),e.lineDashOffset=u,f?(e.lineWidth=2*c,e.lineJoin=h||"round"):(e.lineWidth=c,e.lineJoin=h||"bevel");let m=t.endAngle;if(a){pathArc(e,t,i,n,m,r);for(let t=0;t<a;++t)e.stroke();isNaN(o)||(m=s+(o%TAU||TAU))}f&&clipArc(e,t,m),l.selfJoin&&m-s>=PI&&0===d&&"miter"!==h&&clipSelf(e,t,m),a||(pathArc(e,t,i,n,m,r),e.stroke())}class ArcElement extends Element{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,i){const n=this.getProps(["x","y"],i),{angle:r,distance:a}=getAngleFromPoint(n,{x:e,y:t}),{startAngle:s,endAngle:o,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,u=valueOrDefault(h,o-s),d=_angleBetween(r,s,o)&&s!==o,f=u>=TAU||d,m=_isBetween(a,l+p,c+p);return f&&m}getCenterPoint(e){const{x:t,y:i,startAngle:n,endAngle:r,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:o,spacing:l}=this.options,c=(n+r)/2,h=(a+s+l+o)/2;return{x:t+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,n=(t.offset||0)/4,r=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=i>TAU?Math.floor(i/TAU):0,0===i||this.innerRadius<0||this.outerRadius<0)return;e.save();const s=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(s)*n,Math.sin(s)*n);const o=n*(1-Math.sin(Math.min(PI,i||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,drawArc(e,this,o,r,a),drawBorder(e,this,o,r,a),e.restore()}}function getBarBounds(e,t){const{x:i,y:n,base:r,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,h,p;return e.horizontal?(p=s/2,o=Math.min(i,r),l=Math.max(i,r),c=n-p,h=n+p):(p=a/2,o=i-p,l=i+p,c=Math.min(n,r),h=Math.max(n,r)),{left:o,top:c,right:l,bottom:h}}function skipOrLimit(e,t,i,n){return e?0:_limitValue(t,i,n)}function parseBorderWidth(e,t,i){const n=e.options.borderWidth,r=e.borderSkipped,a=toTRBL(n);return{t:skipOrLimit(r.top,a.top,0,i),r:skipOrLimit(r.right,a.right,0,t),b:skipOrLimit(r.bottom,a.bottom,0,i),l:skipOrLimit(r.left,a.left,0,t)}}function parseBorderRadius(e,t,i){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,a=toTRBLCorners(r),s=Math.min(t,i),o=e.borderSkipped,l=n||isObject$1(r);return{topLeft:skipOrLimit(!l||o.top||o.left,a.topLeft,0,s),topRight:skipOrLimit(!l||o.top||o.right,a.topRight,0,s),bottomLeft:skipOrLimit(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:skipOrLimit(!l||o.bottom||o.right,a.bottomRight,0,s)}}function boundingRects(e){const t=getBarBounds(e),i=t.right-t.left,n=t.bottom-t.top,r=parseBorderWidth(e,i/2,n/2),a=parseBorderRadius(e,i/2,n/2);return{outer:{x:t.left,y:t.top,w:i,h:n,radius:a},inner:{x:t.left+r.l,y:t.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function inRange(e,t,i,n){const r=null===t,a=null===i,s=e&&!(r&&a)&&getBarBounds(e,n);return s&&(r||_isBetween(t,s.left,s.right))&&(a||_isBetween(i,s.top,s.bottom))}function hasRadius(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function addNormalRectPath(e,t){e.rect(t.x,t.y,t.w,t.h)}function inflateRect(e,t,i={}){const n=e.x!==i.x?-t:0,r=e.y!==i.y?-t:0,a=(e.x+e.w!==i.x+i.w?t:0)-n,s=(e.y+e.h!==i.y+i.h?t:0)-r;return{x:e.x+n,y:e.y+r,w:e.w+a,h:e.h+s,radius:e.radius}}class BarElement extends Element{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:a}=boundingRects(this),s=hasRadius(a.radius)?addRoundedRectPath:addNormalRectPath;e.save(),a.w===r.w&&a.h===r.h||(e.beginPath(),s(e,inflateRect(a,t,r)),e.clip(),s(e,inflateRect(r,-t,a)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),s(e,inflateRect(r,t)),e.fillStyle=n,e.fill(),e.restore()}inRange(e,t,i){return inRange(this,e,t,i)}inXRange(e,t){return inRange(this,e,null,t)}inYRange(e,t){return inRange(this,null,e,t)}getCenterPoint(e){const{x:t,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(t+n)/2:t,y:r?i:(i+n)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}const getBoxSize=(e,t)=>{let{boxHeight:i=t,boxWidth:n=t}=e;return e.usePointStyle&&(i=Math.min(i,t),n=e.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(t,i)}},itemsEqual=(e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Legend extends Element{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,i){this.maxWidth=e,this.maxHeight=t,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=callback(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,i)=>e.sort(t,i,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const i=e.labels,n=toFont(i.font),r=n.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:o}=getBoxSize(i,r);let l,c;t.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,r,s,o)+10):(c=this.maxHeight,l=this._fitCols(a,n,s,o)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,i,n){const{ctx:r,maxWidth:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=e;r.textAlign="left",r.textBaseline="middle";let p=-1,u=-c;return this.legendItems.forEach((e,d)=>{const f=i+t/2+r.measureText(e.text).width;(0===d||l[l.length-1]+f+2*s>a)&&(h+=c,l[l.length-(d>0?0:1)]=0,u+=c,p++),o[d]={left:0,top:u,row:p,width:f,height:n},l[l.length-1]+=f+s}),h}_fitCols(e,t,i,n){const{ctx:r,maxHeight:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-e;let h=s,p=0,u=0,d=0,f=0;return this.legendItems.forEach((e,a)=>{const{itemWidth:m,itemHeight:g}=calculateItemSize(i,t,r,e,n);a>0&&u+g+2*s>c&&(h+=p+s,l.push({width:p,height:u}),d+=p+s,f++,p=u=0),o[a]={left:d,top:u,col:f,width:m,height:g},p=Math.max(p,m),u+=g+s}),h+=p,l.push({width:p,height:u}),h}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:i,labels:{padding:n},rtl:r}}=this,a=getRtlAdapter(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=_alignStartEnd(i,this.left+n,this.right-this.lineWidths[r]);for(const o of t)r!==o.row&&(r=o.row,s=_alignStartEnd(i,this.left+n,this.right-this.lineWidths[r])),o.top+=this.top+e+n,o.left=a.leftForLtr(a.x(s),o.width),s+=o.width+n}else{let r=0,s=_alignStartEnd(i,this.top+e+n,this.bottom-this.columnSizes[r].height);for(const o of t)o.col!==r&&(r=o.col,s=_alignStartEnd(i,this.top+e+n,this.bottom-this.columnSizes[r].height)),o.top=s,o.left+=this.left+n,o.left=a.leftForLtr(a.x(o.left),o.width),s+=o.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;clipArea(e,this),this._draw(),unclipArea(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:i,ctx:n}=this,{align:r,labels:a}=e,s=defaults.color,o=getRtlAdapter(e.rtl,this.left,this.width),l=toFont(a.font),{padding:c}=a,h=l.size,p=h/2;let u;this.drawTitle(),n.textAlign=o.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:d,boxHeight:f,itemHeight:m}=getBoxSize(a,h),g=this.isHorizontal(),v=this._computeTitleHeight();u=g?{x:_alignStartEnd(r,this.left+c,this.right-i[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:_alignStartEnd(r,this.top+v+c,this.bottom-t[0].height),line:0},overrideTextDirection(this.ctx,e.textDirection);const y=m+c;this.legendItems.forEach((b,x)=>{n.strokeStyle=b.fontColor,n.fillStyle=b.fontColor;const _=n.measureText(b.text).width,S=o.textAlign(b.textAlign||(b.textAlign=a.textAlign)),w=d+p+_;let C=u.x,P=u.y;o.setWidth(this.width),g?x>0&&C+w+c>this.right&&(P=u.y+=y,u.line++,C=u.x=_alignStartEnd(r,this.left+c,this.right-i[u.line])):x>0&&P+y>this.bottom&&(C=u.x=C+t[u.line].width+c,u.line++,P=u.y=_alignStartEnd(r,this.top+v+c,this.bottom-t[u.line].height));if(function(e,t,i){if(isNaN(d)||d<=0||isNaN(f)||f<0)return;n.save();const r=valueOrDefault(i.lineWidth,1);if(n.fillStyle=valueOrDefault(i.fillStyle,s),n.lineCap=valueOrDefault(i.lineCap,"butt"),n.lineDashOffset=valueOrDefault(i.lineDashOffset,0),n.lineJoin=valueOrDefault(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=valueOrDefault(i.strokeStyle,s),n.setLineDash(valueOrDefault(i.lineDash,[])),a.usePointStyle){const s={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},l=o.xPlus(e,d/2);drawPointLegend(n,s,l,t+p,a.pointStyleWidth&&d)}else{const a=t+Math.max((h-f)/2,0),s=o.leftForLtr(e,d),l=toTRBLCorners(i.borderRadius);n.beginPath(),Object.values(l).some(e=>0!==e)?addRoundedRectPath(n,{x:s,y:a,w:d,h:f,radius:l}):n.rect(s,a,d,f),n.fill(),0!==r&&n.stroke()}n.restore()}(o.x(C),P,b),C=_textX(S,C+d+p,g?C+w:this.right,e.rtl),function(e,t,i){renderText(n,i.text,e,t+m/2,l,{strikethrough:i.hidden,textAlign:o.textAlign(i.textAlign)})}(o.x(C),P,b),g)u.x+=w+c;else if("string"!=typeof b.text){const e=l.lineHeight;u.y+=calculateLegendItemHeight(b,e)+c}else u.y+=y}),restoreTextDirection(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,i=toFont(t.font),n=toPadding(t.padding);if(!t.display)return;const r=getRtlAdapter(e.rtl,this.left,this.width),a=this.ctx,s=t.position,o=i.size/2,l=n.top+o;let c,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),c=this.top+l,h=_alignStartEnd(e.align,h,this.right-p);else{const t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);c=l+_alignStartEnd(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const u=_alignStartEnd(s,h,h+p);a.textAlign=r.textAlign(_toLeftRightCenter(s)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=i.string,renderText(a,t.text,u,c,i)}_computeTitleHeight(){const e=this.options.title,t=toFont(e.font),i=toPadding(e.padding);return e.display?t.lineHeight+i.height:0}_getLegendItemAt(e,t){let i,n,r;if(_isBetween(e,this.left,this.right)&&_isBetween(t,this.top,this.bottom))for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(n=r[i],_isBetween(e,n.left,n.left+n.width)&&_isBetween(t,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(e){const t=this.options;if(!isListened(e.type,t))return;const i=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const n=this._hoveredItem,r=itemsEqual(n,i);n&&!r&&callback(t.onLeave,[e,n,this],this),this._hoveredItem=i,i&&!r&&callback(t.onHover,[e,i,this],this)}else i&&callback(t.onClick,[e,i,this],this)}}function calculateItemSize(e,t,i,n,r){return{itemWidth:calculateItemWidth(n,e,t,i),itemHeight:calculateItemHeight(r,n,t.lineHeight)}}function calculateItemWidth(e,t,i,n){let r=e.text;return r&&"string"!=typeof r&&(r=r.reduce((e,t)=>e.length>t.length?e:t)),t+i.size/2+n.measureText(r).width}function calculateItemHeight(e,t,i){let n=e;return"string"!=typeof t.text&&(n=calculateLegendItemHeight(t,i)),n}function calculateLegendItemHeight(e,t){return t*(e.text?e.text.length:0)}function isListened(e,t){return!("mousemove"!==e&&"mouseout"!==e||!t.onHover&&!t.onLeave)||!(!t.onClick||"click"!==e&&"mouseup"!==e)}var plugin_legend={id:"legend",_element:Legend,start(e,t,i){const n=e.legend=new Legend({ctx:e.ctx,options:i,chart:e});layouts.configure(e,n,i),layouts.addBox(e,n)},stop(e){layouts.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,i){const n=e.legend;layouts.configure(e,n,i),n.options=i},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,i){const n=t.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),t.hidden=!0):(r.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{const l=e.controller.getStyle(i?0:void 0),c=toPadding(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:n||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:s&&(o||l.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const positioners={average(e){if(!e.length)return!1;let t,i,n=new Set,r=0,a=0;for(t=0,i=e.length;t<i;++t){const i=e[t].element;if(i&&i.hasValue()){const e=i.tooltipPosition();n.add(e.x),r+=e.y,++a}}if(0===a||0===n.size)return!1;return{x:[...n].reduce((e,t)=>e+t)/n.size,y:r/a}},nearest(e,t){if(!e.length)return!1;let i,n,r,a=t.x,s=t.y,o=Number.POSITIVE_INFINITY;for(i=0,n=e.length;i<n;++i){const n=e[i].element;if(n&&n.hasValue()){const e=distanceBetweenPoints(t,n.getCenterPoint());e<o&&(o=e,r=n)}}if(r){const e=r.tooltipPosition();a=e.x,s=e.y}return{x:a,y:s}}};function pushOrConcat(e,t){return t&&(isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function splitNewlines(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function createTooltipItem(e,t){const{element:i,datasetIndex:n,index:r}=t,a=e.getDatasetMeta(n).controller,{label:s,value:o}=a.getLabelAndValue(r);return{chart:e,label:s,parsed:a.getParsed(r),raw:e.data.datasets[n].data[r],formattedValue:o,dataset:a.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function getTooltipSize(e,t){const i=e.chart.ctx,{body:n,footer:r,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=toFont(t.bodyFont),c=toFont(t.titleFont),h=toFont(t.footerFont),p=a.length,u=r.length,d=n.length,f=toPadding(t.padding);let m=f.height,g=0,v=n.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,p&&(m+=p*c.lineHeight+(p-1)*t.titleSpacing+t.titleMarginBottom),v){m+=d*(t.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(v-d)*l.lineHeight+(v-1)*t.bodySpacing}u&&(m+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let y=0;const b=function(e){g=Math.max(g,i.measureText(e).width+y)};return i.save(),i.font=c.string,each(e.title,b),i.font=l.string,each(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?s+2+t.boxPadding:0,each(n,e=>{each(e.before,b),each(e.lines,b),each(e.after,b)}),y=0,i.font=h.string,each(e.footer,b),i.restore(),g+=f.width,{width:g,height:m}}function determineYAlign(e,t){const{y:i,height:n}=t;return i<n/2?"top":i>e.height-n/2?"bottom":"center"}function doesNotFitWithAlign(e,t,i,n){const{x:r,width:a}=n,s=i.caretSize+i.caretPadding;return"left"===e&&r+a+s>t.width||("right"===e&&r-a-s<0||void 0)}function determineXAlign(e,t,i,n){const{x:r,width:a}=i,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return"center"===n?c=r<=(o+l)/2?"left":"right":r<=a/2?c="left":r>=s-a/2&&(c="right"),doesNotFitWithAlign(c,e,t,i)&&(c="center"),c}function determineAlignment(e,t,i){const n=i.yAlign||t.yAlign||determineYAlign(e,i);return{xAlign:i.xAlign||t.xAlign||determineXAlign(e,t,i,n),yAlign:n}}function alignX(e,t){let{x:i,width:n}=e;return"right"===t?i-=n:"center"===t&&(i-=n/2),i}function alignY(e,t,i){let{y:n,height:r}=e;return"top"===t?n+=i:n-="bottom"===t?r+i:r/2,n}function getBackgroundPoint(e,t,i,n){const{caretSize:r,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=i,c=r+a,{topLeft:h,topRight:p,bottomLeft:u,bottomRight:d}=toTRBLCorners(s);let f=alignX(t,o);const m=alignY(t,l,c);return"center"===l?"left"===o?f+=c:"right"===o&&(f-=c):"left"===o?f-=Math.max(h,u)+r:"right"===o&&(f+=Math.max(p,d)+r),{x:_limitValue(f,0,n.width-t.width),y:_limitValue(m,0,n.height-t.height)}}function getAlignedX(e,t,i){const n=toPadding(i.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-n.right:e.x+n.left}function getBeforeAfterBodyLines(e){return pushOrConcat([],splitNewlines(e))}function createTooltipContext(e,t,i){return createContext(e,{tooltip:t,tooltipItems:i,type:"tooltip"})}function overrideCallbacks(e,t){const i=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return i?e.override(i):e}const defaultCallbacks={beforeTitle:noop$1,title(e){if(e.length>0){const t=e[0],i=t.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return i[t.dataIndex]}return""},afterTitle:noop$1,beforeBody:noop$1,beforeLabel:noop$1,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const i=e.formattedValue;return isNullOrUndef(i)||(t+=i),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:noop$1,afterBody:noop$1,beforeFooter:noop$1,footer:noop$1,afterFooter:noop$1};function invokeCallbackWithFallback(e,t,i,n){const r=e[t].call(i,n);return void 0===r?defaultCallbacks[t].call(i,n):r}class Tooltip extends Element{static positioners=positioners;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&t.options.animation&&i.animations,r=new Animations(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=createTooltipContext(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,n=invokeCallbackWithFallback(i,"beforeTitle",this,e),r=invokeCallbackWithFallback(i,"title",this,e),a=invokeCallbackWithFallback(i,"afterTitle",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(n)),s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(a)),s}getBeforeBody(e,t){return getBeforeAfterBodyLines(invokeCallbackWithFallback(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:i}=t,n=[];return each(e,e=>{const t={before:[],lines:[],after:[]},r=overrideCallbacks(i,e);pushOrConcat(t.before,splitNewlines(invokeCallbackWithFallback(r,"beforeLabel",this,e))),pushOrConcat(t.lines,invokeCallbackWithFallback(r,"label",this,e)),pushOrConcat(t.after,splitNewlines(invokeCallbackWithFallback(r,"afterLabel",this,e))),n.push(t)}),n}getAfterBody(e,t){return getBeforeAfterBodyLines(invokeCallbackWithFallback(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:i}=t,n=invokeCallbackWithFallback(i,"beforeFooter",this,e),r=invokeCallbackWithFallback(i,"footer",this,e),a=invokeCallbackWithFallback(i,"afterFooter",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(n)),s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(a)),s}_createItems(e){const t=this._active,i=this.chart.data,n=[],r=[],a=[];let s,o,l=[];for(s=0,o=t.length;s<o;++s)l.push(createTooltipItem(this.chart,t[s]));return e.filter&&(l=l.filter((t,n,r)=>e.filter(t,n,r,i))),e.itemSort&&(l=l.sort((t,n)=>e.itemSort(t,n,i))),each(l,t=>{const i=overrideCallbacks(e.callbacks,t);n.push(invokeCallbackWithFallback(i,"labelColor",this,t)),r.push(invokeCallbackWithFallback(i,"labelPointStyle",this,t)),a.push(invokeCallbackWithFallback(i,"labelTextColor",this,t))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=l,l}update(e,t){const i=this.options.setContext(this.getContext()),n=this._active;let r,a=[];if(n.length){const e=positioners[i.position].call(this,n,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const t=this._size=getTooltipSize(this,i),s=Object.assign({},e,t),o=determineAlignment(this.chart,i,s),l=getBackgroundPoint(i,s,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,r={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,n){const r=this.getCaretPosition(e,i,n);t.lineTo(r.x1,r.y1),t.lineTo(r.x2,r.y2),t.lineTo(r.x3,r.y3)}getCaretPosition(e,t,i){const{xAlign:n,yAlign:r}=this,{caretSize:a,cornerRadius:s}=i,{topLeft:o,topRight:l,bottomLeft:c,bottomRight:h}=toTRBLCorners(s),{x:p,y:u}=e,{width:d,height:f}=t;let m,g,v,y,b,x;return"center"===r?(b=u+f/2,"left"===n?(m=p,g=m-a,y=b+a,x=b-a):(m=p+d,g=m+a,y=b-a,x=b+a),v=m):(g="left"===n?p+Math.max(o,c)+a:"right"===n?p+d-Math.max(l,h)-a:this.caretX,"top"===r?(y=u,b=y-a,m=g-a,v=g+a):(y=u+f,b=y+a,m=g+a,v=g-a),x=y),{x1:m,x2:g,x3:v,y1:y,y2:b,y3:x}}drawTitle(e,t,i){const n=this.title,r=n.length;let a,s,o;if(r){const l=getRtlAdapter(i.rtl,this.x,this.width);for(e.x=getAlignedX(this,i.titleAlign,i),t.textAlign=l.textAlign(i.titleAlign),t.textBaseline="middle",a=toFont(i.titleFont),s=i.titleSpacing,t.fillStyle=i.titleColor,t.font=a.string,o=0;o<r;++o)t.fillText(n[o],l.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+s,o+1===r&&(e.y+=i.titleMarginBottom-s)}}_drawColorBox(e,t,i,n,r){const a=this.labelColors[i],s=this.labelPointStyles[i],{boxHeight:o,boxWidth:l}=r,c=toFont(r.bodyFont),h=getAlignedX(this,"left",r),p=n.x(h),u=o<c.lineHeight?(c.lineHeight-o)/2:0,d=t.y+u;if(r.usePointStyle){const t={radius:Math.min(l,o)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=n.leftForLtr(p,l)+l/2,c=d+o/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,drawPoint(e,t,i,c),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,drawPoint(e,t,i,c)}else{e.lineWidth=isObject$1(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const t=n.leftForLtr(p,l),i=n.leftForLtr(n.xPlus(p,1),l-2),s=toTRBLCorners(a.borderRadius);Object.values(s).some(e=>0!==e)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,addRoundedRectPath(e,{x:t,y:d,w:l,h:o,radius:s}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),addRoundedRectPath(e,{x:i,y:d+1,w:l-2,h:o-2,radius:s}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(t,d,l,o),e.strokeRect(t,d,l,o),e.fillStyle=a.backgroundColor,e.fillRect(i,d+1,l-2,o-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:n}=this,{bodySpacing:r,bodyAlign:a,displayColors:s,boxHeight:o,boxWidth:l,boxPadding:c}=i,h=toFont(i.bodyFont);let p=h.lineHeight,u=0;const d=getRtlAdapter(i.rtl,this.x,this.width),f=function(i){t.fillText(i,d.x(e.x+u),e.y+p/2),e.y+=p+r},m=d.textAlign(a);let g,v,y,b,x,_,S;for(t.textAlign=a,t.textBaseline="middle",t.font=h.string,e.x=getAlignedX(this,m,i),t.fillStyle=i.bodyColor,each(this.beforeBody,f),u=s&&"right"!==m?"center"===a?l/2+c:l+2+c:0,b=0,_=n.length;b<_;++b){for(g=n[b],v=this.labelTextColors[b],t.fillStyle=v,each(g.before,f),y=g.lines,s&&y.length&&(this._drawColorBox(t,e,b,d,i),p=Math.max(h.lineHeight,o)),x=0,S=y.length;x<S;++x)f(y[x]),p=h.lineHeight;each(g.after,f)}u=0,p=h.lineHeight,each(this.afterBody,f),e.y-=r}drawFooter(e,t,i){const n=this.footer,r=n.length;let a,s;if(r){const o=getRtlAdapter(i.rtl,this.x,this.width);for(e.x=getAlignedX(this,i.footerAlign,i),e.y+=i.footerMarginTop,t.textAlign=o.textAlign(i.footerAlign),t.textBaseline="middle",a=toFont(i.footerFont),t.fillStyle=i.footerColor,t.font=a.string,s=0;s<r;++s)t.fillText(n[s],o.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+i.footerSpacing}}drawBackground(e,t,i,n){const{xAlign:r,yAlign:a}=this,{x:s,y:o}=e,{width:l,height:c}=i,{topLeft:h,topRight:p,bottomLeft:u,bottomRight:d}=toTRBLCorners(n.cornerRadius);t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.beginPath(),t.moveTo(s+h,o),"top"===a&&this.drawCaret(e,t,i,n),t.lineTo(s+l-p,o),t.quadraticCurveTo(s+l,o,s+l,o+p),"center"===a&&"right"===r&&this.drawCaret(e,t,i,n),t.lineTo(s+l,o+c-d),t.quadraticCurveTo(s+l,o+c,s+l-d,o+c),"bottom"===a&&this.drawCaret(e,t,i,n),t.lineTo(s+u,o+c),t.quadraticCurveTo(s,o+c,s,o+c-u),"center"===a&&"left"===r&&this.drawCaret(e,t,i,n),t.lineTo(s,o+h),t.quadraticCurveTo(s,o,s+h,o),t.closePath(),t.fill(),n.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=positioners[e.position].call(this,this._active,this._eventPosition);if(!i)return;const a=this._size=getTooltipSize(this,e),s=Object.assign({},i,this._size),o=determineAlignment(t,e,s),l=getBackgroundPoint(e,s,o,t);n._to===l.x&&r._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=a.width,this.height=a.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=toPadding(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(e.save(),e.globalAlpha=i,this.drawBackground(r,e,n,t),overrideTextDirection(e,t.textDirection),r.y+=a.top,this.drawTitle(r,e,t),this.drawBody(r,e,t),this.drawFooter(r,e,t),restoreTextDirection(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,n=e.map(({datasetIndex:e,index:t})=>{const i=this.chart.getDatasetMeta(e);if(!i)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:i.data[t],index:t}}),r=!_elementsEqual(i,n),a=this._positionChanged(n,t);(r||a)&&(this._active=n,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,r=this._active||[],a=this._getActiveElements(e,r,t,i),s=this._positionChanged(a,e),o=t||!_elementsEqual(a,r)||s;return o&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),o}_getActiveElements(e,t,i,n){const r=this.options;if("mouseout"===e.type)return[];if(!n)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index));const a=this.chart.getElementsAtEventForMode(e,r.mode,r,i);return r.reverse&&a.reverse(),a}_positionChanged(e,t){const{caretX:i,caretY:n,options:r}=this,a=positioners[r.position].call(this,e,t);return!1!==a&&(i!==a.x||n!==a.y)}}var plugin_tooltip={id:"tooltip",_element:Tooltip,positioners:positioners,afterInit(e,t,i){i&&(e.tooltip=new Tooltip({chart:e,options:i}))},beforeUpdate(e,t,i){e.tooltip&&e.tooltip.initialize(i)},reset(e,t,i){e.tooltip&&e.tooltip.initialize(i)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const i={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",i)}},afterEvent(e,t){if(e.tooltip){const i=t.replay;e.tooltip.handleEvent(t.event,i,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:defaultCallbacks},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const addIfString=(e,t,i,n)=>("string"==typeof t?(i=e.push(t)-1,n.unshift({index:i,label:t})):isNaN(t)&&(i=null),i);function findOrAddLabel(e,t,i,n){const r=e.indexOf(t);if(-1===r)return addIfString(e,t,i,n);return r!==e.lastIndexOf(t)?i:r}const validIndex=(e,t)=>null===e?null:_limitValue(Math.round(e),0,t);function _getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class CategoryScale extends Scale{static id="category";static defaults={ticks:{callback:_getLabelForValue}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:i,label:n}of t)e[i]===n&&e.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(isNullOrUndef(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:findOrAddLabel(i,e,valueOrDefault(t,e),this._addedLabels),validIndex(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(i=0),t||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===e&&t===r.length-1?r:r.slice(e,t+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=e;i<=t;i++)n.push({value:i});return n}getLabelForValue(e){return _getLabelForValue.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function generateTicks$1(e,t){const i=[],{bounds:n,step:r,min:a,max:s,precision:o,count:l,maxTicks:c,maxDigits:h,includeBounds:p}=e,u=r||1,d=c-1,{min:f,max:m}=t,g=!isNullOrUndef(a),v=!isNullOrUndef(s),y=!isNullOrUndef(l),b=(m-f)/(h+1);let x,_,S,w,C=niceNum((m-f)/d/u)*u;if(C<1e-14&&!g&&!v)return[{value:f},{value:m}];w=Math.ceil(m/C)-Math.floor(f/C),w>d&&(C=niceNum(w*C/d/u)*u),isNullOrUndef(o)||(x=Math.pow(10,o),C=Math.ceil(C*x)/x),"ticks"===n?(_=Math.floor(f/C)*C,S=Math.ceil(m/C)*C):(_=f,S=m),g&&v&&r&&almostWhole((s-a)/r,C/1e3)?(w=Math.round(Math.min((s-a)/C,c)),C=(s-a)/w,_=a,S=s):y?(_=g?a:_,S=v?s:S,w=l-1,C=(S-_)/w):(w=(S-_)/C,w=almostEquals(w,Math.round(w),C/1e3)?Math.round(w):Math.ceil(w));const P=Math.max(_decimalPlaces(C),_decimalPlaces(_));x=Math.pow(10,isNullOrUndef(o)?P:o),_=Math.round(_*x)/x,S=Math.round(S*x)/x;let E=0;for(g&&(p&&_!==a?(i.push({value:a}),_<a&&E++,almostEquals(Math.round((_+E*C)*x)/x,a,relativeLabelSize(a,b,e))&&E++):_<a&&E++);E<w;++E){const e=Math.round((_+E*C)*x)/x;if(v&&e>s)break;i.push({value:e})}return v&&p&&S!==s?i.length&&almostEquals(i[i.length-1].value,s,relativeLabelSize(s,b,e))?i[i.length-1].value=s:i.push({value:s}):v&&S!==s||i.push({value:S}),i}function relativeLabelSize(e,t,{horizontal:i,minRotation:n}){const r=toRadians(n),a=(i?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class LinearScaleBase extends Scale{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return isNullOrUndef(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:n,max:r}=this;const a=e=>n=t?n:e,s=e=>r=i?r:e;if(e){const e=sign(n),t=sign(r);e<0&&t<0?s(0):e>0&&t>0&&a(0)}if(n===r){let t=0===r?1:Math.abs(.05*r);s(r+t),e||a(n-t)}this.min=n,this.max=r}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:i,stepSize:n}=e;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=generateTicks$1({maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&_setMinAndMaxByKey(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const n=(i-t)/Math.max(e.length-1,1)/2;t-=n,i+=n}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return formatNumber(e,this.chart.options.locale,this.options.ticks.format)}}class LinearScale extends LinearScaleBase{static id="linear";static defaults={ticks:{callback:Ticks.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=isNumberFinite(e)?e:0,this.max=isNumberFinite(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=toRadians(this.options.ticks.minRotation),n=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,r.lineHeight/n))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const INTERVALS={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}},UNITS=Object.keys(INTERVALS);function sorter(e,t){return e-t}function parse(e,t){if(isNullOrUndef(t))return null;const i=e._adapter,{parser:n,round:r,isoWeekday:a}=e._parseOpts;let s=t;return"function"==typeof n&&(s=n(s)),isNumberFinite(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!isNumber(a)&&!0!==a?i.startOf(s,r):i.startOf(s,"isoWeek",a)),+s)}function determineUnitForAutoTicks(e,t,i,n){const r=UNITS.length;for(let a=UNITS.indexOf(e);a<r-1;++a){const e=INTERVALS[UNITS[a]],r=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((i-t)/(r*e.size))<=n)return UNITS[a]}return UNITS[r-1]}function determineUnitForFormatting(e,t,i,n,r){for(let a=UNITS.length-1;a>=UNITS.indexOf(i);a--){const i=UNITS[a];if(INTERVALS[i].common&&e._adapter.diff(r,n,i)>=t-1)return i}return UNITS[i?UNITS.indexOf(i):0]}function determineMajorUnit(e){for(let t=UNITS.indexOf(e)+1,i=UNITS.length;t<i;++t)if(INTERVALS[UNITS[t]].common)return UNITS[t]}function addTick(e,t,i){if(i){if(i.length){const{lo:n,hi:r}=_lookup(i,t);e[i[n]>=t?i[n]:i[r]]=!0}}else e[t]=!0}function setMajorTicks(e,t,i,n){const r=e._adapter,a=+r.startOf(t[0].value,n),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+r.add(o,1,n))l=i[o],l>=0&&(t[l].major=!0);return t}function ticksFromTimestamps(e,t,i){const n=[],r={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],r[o]=s,n.push({value:o,major:!1});return 0!==a&&i?setMajorTicks(e,n,r,i):n}class TimeScale extends Scale{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const i=e.time||(e.time={}),n=this._adapter=new adapters._date(e.adapters.date);n.init(t),mergeIf(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:parse(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,i=e.time.unit||"day";let{min:n,max:r,minDefined:a,maxDefined:s}=this.getUserBounds();function o(e){a||isNaN(e.min)||(n=Math.min(n,e.min)),s||isNaN(e.max)||(r=Math.max(r,e.max))}a&&s||(o(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||o(this.getMinMax(!1))),n=isNumberFinite(n)&&!isNaN(n)?n:+t.startOf(Date.now(),i),r=isNumberFinite(r)&&!isNaN(r)?r:+t.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],i=e[e.length-1]),{min:t,max:i}}buildTicks(){const e=this.options,t=e.time,i=e.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,a=_filterBetween(n,r,this.max);return this._unit=t.unit||(i.autoSkip?determineUnitForAutoTicks(t.minUnit,this.min,this.max,this._getLabelCapacity(r)):determineUnitForFormatting(this,a.length,t.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?determineMajorUnit(this._unit):void 0,this.initOffsets(n),e.reverse&&a.reverse(),ticksFromTimestamps(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t,i,n=0,r=0;this.options.offset&&e.length&&(t=this.getDecimalForValue(e[0]),n=1===e.length?1-t:(this.getDecimalForValue(e[1])-t)/2,i=this.getDecimalForValue(e[e.length-1]),r=1===e.length?i:(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=_limitValue(n,0,a),r=_limitValue(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,t=this.min,i=this.max,n=this.options,r=n.time,a=r.unit||determineUnitForAutoTicks(r.minUnit,t,i,this._getLabelCapacity(t)),s=valueOrDefault(n.ticks.stepSize,1),o="week"===a&&r.isoWeekday,l=isNumber(o)||!0===o,c={};let h,p,u=t;if(l&&(u=+e.startOf(u,"isoWeek",o)),u=+e.startOf(u,l?"day":a),e.diff(i,t,a)>1e5*s)throw new Error(t+" and "+i+" are too far apart with stepSize of "+s+" "+a);const d="data"===n.ticks.source&&this.getDataTimestamps();for(h=u,p=0;h<i;h=+e.add(h,s,a),p++)addTick(c,h,d);return h!==i&&"ticks"!==n.bounds&&1!==p||addTick(c,h,d),Object.keys(c).sort(sorter).map(e=>+e)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}format(e,t){const i=this.options.time.displayFormats,n=this._unit,r=t||i[n];return this._adapter.format(e,r)}_tickFormatFunction(e,t,i,n){const r=this.options,a=r.ticks.callback;if(a)return callback(a,[e,t,i],this);const s=r.time.displayFormats,o=this._unit,l=this._majorUnit,c=o&&s[o],h=l&&s[l],p=i[t],u=l&&h&&p&&p.major;return this._adapter.format(e,n||(u?h:c))}generateTickLabels(e){let t,i,n;for(t=0,i=e.length;t<i;++t)n=e[t],n.label=this._tickFormatFunction(n.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+i)*t.factor)}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,i=this.ctx.measureText(e).width,n=toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),r=Math.cos(n),a=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:i*r+s*a,h:i*a+s*r}}_getLabelCapacity(e){const t=this.options.time,i=t.displayFormats,n=i[t.unit]||i.millisecond,r=this._tickFormatFunction(e,0,ticksFromTimestamps(this,[e],this._majorUnit),n),a=this._getLabelSize(r),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let e,t,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,t=n.length;e<t;++e)i=i.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const e=this._cache.labels||[];let t,i;if(e.length)return e;const n=this.getLabels();for(t=0,i=n.length;t<i;++t)e.push(parse(this,n[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return _arrayUnique(e.sort(sorter))}}function interpolate(e,t,i){let n,r,a,s,o=0,l=e.length-1;i?(t>=e[o].pos&&t<=e[l].pos&&({lo:o,hi:l}=_lookupByKey(e,"pos",t)),({pos:n,time:a}=e[o]),({pos:r,time:s}=e[l])):(t>=e[o].time&&t<=e[l].time&&({lo:o,hi:l}=_lookupByKey(e,"time",t)),({time:n,pos:a}=e[o]),({time:r,pos:s}=e[l]));const c=r-n;return c?a+(s-a)*(t-n)/c:a}class TimeSeriesScale extends TimeScale{static id="timeseries";static defaults=TimeScale.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=interpolate(t,this.min),this._tableRange=interpolate(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,n=[],r=[];let a,s,o,l,c;for(a=0,s=e.length;a<s;++a)l=e[a],l>=t&&l<=i&&n.push(l);if(n.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(a=0,s=n.length;a<s;++a)c=n[a+1],o=n[a-1],l=n[a],Math.round((c+o)/2)!==l&&r.push({time:l,pos:a/(s-1)});return r}_generate(){const e=this.min,t=this.max;let i=super.getDataTimestamps();return i.includes(e)&&i.length||i.splice(0,0,e),i.includes(t)&&1!==i.length||i.push(t),i.sort((e,t)=>e-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return e=t.length&&i.length?this.normalize(t.concat(i)):t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(interpolate(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return interpolate(this._table,i*this._tableRange+this._minPos,!0)}}const getCSSVariable=(e,t=1,i="#666666")=>{const n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(!n)return console.warn(`CSS variable ${e} not found, using fallback color: ${i}`),i;if(1===t)return n;if(n.startsWith("#")){const e=n.replace("#","");return`rgba(${parseInt(e.substr(0,2),16)}, ${parseInt(e.substr(2,2),16)}, ${parseInt(e.substr(4,2),16)}, ${t})`}return n.startsWith("rgb")?n.startsWith("rgba")?n.replace(/[\d.]+\)$/,`${t})`):n.replace("rgb","rgba").replace(")",`, ${t})`):n};function BasicPriceChart({legend:e,chartOptions:t,noChartDisplay:i,id:n,className:r}){var a;const s=useRef(null),o=useRef(null);return useLayoutEffect(()=>{var e,i;if(!s.current)return;const n=s.current.getContext("2d");if(!n)return;const r=null==n?void 0:n.createLinearGradient(0,0,300,0);return null==r||r.addColorStop(0,getCSSVariable("--secondary-color")),null==r||r.addColorStop(.3,getCSSVariable("--secondary-dark-color")),null==r||r.addColorStop(.7,getCSSVariable("--primary-color")),o.current&&o.current.destroy(),(null===(e=t.data.datasets[0])||void 0===e?void 0:e.backgroundColor)&&(t.data.datasets[0].backgroundColor=[r,"rgba(0, 0, 0, 0.2)"]),(null===(i=t.data.datasets[0])||void 0===i?void 0:i.borderColor)&&(t.data.datasets[0].borderColor=[r,"rgba(0, 0, 0, 0.2)"]),o.current=new Chart(n,t),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}},[t]),jsx("div",{id:n,className:"basic-price-chart"+(r?" "+r:""),children:jsx("div",{className:"basic-price-chart__content",children:(null===(a=t.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?jsx("div",{className:"basic-price-chart__empty",children:null!=i?i:jsx("div",{children:"Kein Chart verfügbar"})}):jsxs(Fragment,{children:[jsx("div",{className:"basic-price-chart__chart",children:jsx("canvas",{ref:s})}),e]})})})}function LvEditingStatusChart({chartOptions:e,legend:t,noChartDisplay:i,id:n,className:r}){var a;const s=useRef(null),o=useRef(null);return useLayoutEffect(()=>{var t,i;if(!s.current)return;const n=s.current.getContext("2d");return n?(o.current&&o.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=[getCSSVariable("--warning-color",.6),getCSSVariable("--valid-color",.6),getCSSVariable("--error-color",.6)]),(null===(i=e.data.datasets[0])||void 0===i?void 0:i.borderColor)&&(e.data.datasets[0].borderColor=[getCSSVariable("--warning-color",.6),getCSSVariable("--valid-color",.6),getCSSVariable("--error-color",.6)]),o.current=new Chart(n,e),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}):void 0},[]),jsx("div",{id:n,className:"lv-editing-status-chart"+(r?" "+r:""),children:jsx("div",{className:"lv-editing-status-chart__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?jsx("div",{className:"lv-editing-status-chart__empty",children:null!=i?i:jsx("div",{children:"Kein Chart verfügbar"})}):jsxs(Fragment,{children:[jsx("div",{className:"lv-editing-status-chart__chart",children:jsx("canvas",{ref:s})}),t]})})})}function LvInsightsChart({chartOptions:e,legend:t,noChartDisplay:i,id:n,className:r}){var a;const s=useRef(null),o=useRef(null),l=[getCSSVariable("--secondary-color",.7),getCSSVariable("--primary-color",.7),getCSSVariable("--info-color",.7),getCSSVariable("--diagram-color-5",.7)],c=[getCSSVariable("--secondary-color",1),getCSSVariable("--primary-color",1),getCSSVariable("--info-color",1),getCSSVariable("--diagram-color-5",1)];return useLayoutEffect(()=>{var t,i;if(!s.current)return;const n=s.current.getContext("2d");return n?(o.current&&o.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=l),(null===(i=e.data.datasets[0])||void 0===i?void 0:i.hoverBackgroundColor)&&(e.data.datasets[0].hoverBackgroundColor=c),o.current=new Chart(n,e),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}):void 0},[]),jsx("div",{id:n,className:"lv-insights"+(r?" "+r:""),children:jsx("div",{className:"lv-insights__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?jsx("div",{className:"lv-insights__empty",children:null!=i?i:jsx("div",{children:"Kein Chart verfügbar"})}):jsxs(Fragment,{children:[jsx("div",{className:"lv-insights__chart",children:jsx("canvas",{ref:s})}),t]})})})}function ContractPotentialsChart({chartOptions:e,legend:t,noChartDisplay:i,id:n,className:r}){var a,s;const o=useRef(null),l=useRef(null);return useLayoutEffect(()=>{var t,i;if(!o.current)return;const n=o.current.getContext("2d");return n?(l.current&&l.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=[getCSSVariable("--secondary-color-50")]),(null===(i=e.data.datasets[1])||void 0===i?void 0:i.backgroundColor)&&(e.data.datasets[1].backgroundColor=[getCSSVariable("--primary-color-68",1)]),l.current=new Chart(n,e),()=>{var e;null===(e=l.current)||void 0===e||e.destroy()}):void 0},[e]),jsx("div",{id:n,className:"contract-potentials"+(r?" "+r:""),children:jsx("div",{className:"contract-potentials__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))&&(null===(s=e.data.datasets[1])||void 0===s?void 0:s.data.every(e=>0===e))?jsx("div",{className:"contract-potentials__empty",children:null!=i?i:jsx("div",{children:"Kein Chart verfügbar"})}):jsxs(Fragment,{children:[jsx("div",{className:"contract-potentials__chart",children:jsx("canvas",{ref:o})}),t]})})})}function BeeLabel({id:e,className:t,value:i,size:n="medium",type:r="neutral"}){const a=null!=e?e:libExports.useId(1,"bee-info-label-")[0];return jsx("span",{id:a,className:"bee-label "+("neutral"===r?" bee-info-neutral-label":"valid"===r?" bee-info-valid-label":"error"===r?" bee-error-label":"")+("small"===n?" bee-info-label-small":"medium"===n?" bee-info-label-medium":"large"===n?" bee-info-label-large":" bee-info-label-medium")+(t?" "+t:""),children:i})}Chart.register(DoughnutController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(PieController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(DoughnutController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(BarController,CategoryScale,LinearScale,BarElement,plugin_tooltip,plugin_legend);const EMPTY_FIELD_PLACEHOLDER=" — ";function BeeTextInput({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,formstate:s="neutral",halfRounded:o,readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){var m;const g=null!==(m=null!=e?e:libExports.useId(1,"bee-txt-input-")[0])&&void 0!==m?m:"bee-txt-input";let v="";l&&(v=" bee-txt-input-readOnly",r=!0);const y="bee-txt-input "+("valid"===s?" bee-txt-input-valid":"error"===s?" bee-txt-input-error":"neutral"===s?" bee-txt-input-neutral":"none"===s?" bee-cur-input-field-neutral":" bee-txt-input-neutral");return jsxs(Fragment,{children:[jsx("div",{id:g,className:"p-float-label bee-txt-input-container"+v+(o?" half-rounded":"")+(t?" "+t:""),children:l&&!n?jsx(BeePlaceholder,{id:g,label:i}):jsxs(Fragment,{children:[jsx(InputText,{id:g+"input",value:null!=n?n:void 0,disabled:null!=r&&r,className:y,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!r&&d&&d(e)}(e),onBlur:e=>function(e){!r&&f&&f(e)}(e)}),i?jsxs("label",{htmlFor:g+"input",className:"bee-txt-input-label",children:[i,c&&i?jsx("span",{className:"bee-txt-input-label-required",children:jsx("span",{className:"bee-txt-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-text-input-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeePlaceholder({id:e,className:t,label:i,disabled:n}){const r=null!=e?e:libExports.useId(1,"bee-placeholder-")[0];return jsx(BeeTextInput,{id:r+"input",label:i,value:EMPTY_FIELD_PLACEHOLDER,className:null!=t?t:"",disabled:null==n||n,readOnly:!0,formstate:"neutral"})}function BeeAutocompleteDropdown({id:e,className:t,label:i,value:n,suggestions:r,disabled:a,statusLabel:s,formstate:o="neutral",readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){const m=null!=e?e:libExports.useId(1,"bee-autocomplete-dropdown-")[0],[g,v]=React__default.useState(null!=r?r:[]),y="bee-autocomplete-dropdown "+("valid"===o?" bee-autocomplete-dropdown-valid":"error"===o?" bee-autocomplete-dropdown-error":"neutral"===o?" bee-autocomplete-dropdown-neutral":"none"===o?" bee-autocomplete-dropdodown-none":" bee-autocomplete-dropdown-neutral");return jsxs(Fragment,{children:[jsx("span",{id:m,className:"p-float-label bee-autocomplete-dropdown-container"+(l?" bee-autocomplete-dropdown-readOnly":"")+(a?" bee-autocomplete-dropdown-disabled":"")+(t?" "+t:""),children:l&&!n?jsx(BeePlaceholder,{id:m,label:i}):jsxs(Fragment,{children:[jsx(AutoComplete,{id:m+"input",value:null!=n?n:void 0,dropdown:!0,suggestions:g,disabled:null!=a&&a,className:y,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!a&&d&&d(e)}(e),onBlur:e=>function(e){!a&&f&&f(e)}(e),completeMethod:e=>{const t=(null!=r?r:[]).filter(t=>String(t).toLowerCase().startsWith(e.query.toLowerCase()));v(t)}}),i?jsxs("label",{htmlFor:m+"input",className:"bee-autocomplete-dropdown-label",children:[i,c&&i?jsx("span",{className:"bee-autocomplete-dropdown-label-required",children:jsx("span",{className:"bee-autocomplete-dropdown-label-required-star",children:" *"})}):null]}):null]})}),"none"!=o&&s?(()=>{const e="medium";return jsx("div",{className:"bee-autocomplete-dropdown-statusLabel",children:"error"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}function BeeAutocompleteTag({id:e,className:t,label:i,value:n,suggestions:r,disabled:a,statusLabel:s,formstate:o="neutral",readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){const m=null!=e?e:libExports.useId(1,"bee-autocomplete-tag-")[0],[g,v]=React__default.useState(null!=r?r:[]);let y="";l&&(y=" bee-autocomplete-tag-readOnly",a=!0);const b="bee-autocomplete-tag "+("valid"===o?" bee-autocomplete-tag-valid":"error"===o?" bee-autocomplete-tag-error":"neutral"===o?" bee-autocomplete-tag-neutral":"none"===o?" bee-cur-input-field-neutral":" bee-autocomplete-tag-neutral"),x="p-float-label bee-autocomplete-tag-container"+y;const _=void 0===n?[]:Array.isArray(n)?n.map(String):[String(n)];return jsxs(Fragment,{children:[jsx("div",{id:m,className:x+(t?" "+t:""),children:l&&!n?jsx(BeePlaceholder,{id:m,label:i}):jsxs(Fragment,{children:[jsx(AutoComplete,{id:m+"input",value:_,multiple:!0,suggestions:g,disabled:null!=a&&a,className:b,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!a&&d&&d(e)}(e),onBlur:e=>function(e){!a&&f&&f(e)}(e),completeMethod:e=>{const t=(null!=r?r:[]).filter(t=>String(t).toLowerCase().startsWith(e.query.toLowerCase()));v(t)}}),i?jsxs("label",{htmlFor:m+"input",className:"bee-autocomplete-tag-label",children:[i,c&&i?jsx("span",{className:"bee-autocomplete-tag-label-required",children:jsx("span",{className:"bee-autocomplete-tag-label-required-star",children:" *"})}):null]}):null]})}),"none"!=o&&s?(()=>{const e="medium";return jsx("div",{className:"bee-autocomplete-tag-statusLabel",children:"error"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}function BeeBadge({id:e,className:t,label:i,type:n="primary",size:r="normal"}){const a=null!=e?e:libExports.useId(1,"bee-badge-")[0];return jsx(Badge,{id:a,value:i,className:"primary"===n?"bee-badge bee-badge-primary":"secondary"===n?"bee-badge bee-badge-secondary":"danger"===n?"bee-badge bee-badge-danger":"bee-badge bee-badge-primary"+(t?" "+t:""),size:r})}function BeeContentHeadline({id:e,className:t,value:i,headlineType:n="h1",type:r="primary"}){const a=null!=e?e:libExports.useId(1,"bee-content-headline-")[0],s="primary"===r?"bee-headline bee-headline-primary":"secondary"===r?"bee-headline bee-headline-secondary":"bee-headline bee-headline-primary"+(t?" "+t:"");return jsx("h1"===n?"h1":"h2"===n?"h2":"h3"===n?"h3":"h4"===n?"h4":"h5"===n?"h5":"h1",{id:a,className:s,children:i})}function BeeContentParagraph({id:e,className:t,value:i,size:n="medium",type:r="primary"}){const a=null!=e?e:libExports.useId(1,"bee-content-paragraph-")[0];return jsx("p",{id:a,className:"bee-content-paragraph"+("xSmall"===n?" bee-content-paragraph-xsmall":"small"===n?" bee-content-paragraph-small":"medium"===n?" bee-content-paragraph-medium":"large"===n?" bee-content-paragraph-large":"xLarge"===n?" bee-content-paragraph-xlarge":" bee-content-paragraph-medium")+("primary"===r?" bee-content-paragraph-primary":"secondary"===r?" bee-content-paragraph-secondary":"")+(t?" "+t:""),children:i})}function BeeLink({id:e,className:t,value:i,href:n,type:r="primary",size:a="medium",onClick:s}){const o=null!=e?e:libExports.useId(1,"bee-link-")[0],l="bee-link"+("primary"===r?" bee-link-primary":"secondary"===r?" bee-link-secondary":" bee-link-default")+("xSmall"===a?" bee-link-size-xSmall":"small"===a?" bee-link-size-small":"medium"===a?" bee-link-size-medium":"large"===a?" bee-link-size-large":"xLarge"===a?" bee-link-size-xLarge":" bee-link-size-medium");return jsx(Fragment,{children:jsx("a",n?{id:o,className:l+(t?" "+t:""),href:n,children:i}:{id:o,className:l+(t?" "+t:""),onClick:e=>function(e){s&&s(e)}(e),children:i})})}function BeeSequencePosition({id:e,className:t,data:i,type:n="primary"}){const r=null!=e?e:libExports.useId(1,"bee-seq-pos-")[0];return jsx("div",{id:r,className:"bee-seq-pos"+("primary"===n?" bee-seq-pos-primary":"secondary"===n?" bee-seq-pos-secondary":"default"===n?" bee-seq-pos-default":" bee-seq-pos-primary")+(t?" "+t:""),children:(()=>{if(i){let e=[];return i.forEach((t,i)=>{e.push(((e,t)=>{const i=(null==e?void 0:e.bold)?"bee-seq-pos-bold":void 0;return jsxs("span",{children:[(null==e?void 0:e.icon)?jsx("i",{className:e.icon}):null,null!=(null==e?void 0:e.label)?jsx("span",{className:i,children:e.label}):null]},`SeqPos_${t}`)})(t,i)),e.push(jsx("i",{className:"pi pi-chevron-right bee-seq-pos-separator"},">_"+i))}),e.pop(),e}})()})}function BeeChipInput({id:e,className:t,label:i,type:n="primary",data:r=[],statusLabel:a,formstate:s="neutral",required:o,disabled:l,readOnly:c,placeholder:h,tooltip:p,tooltipOptions:u,itemTemplate:d,onChange:f}){var m;const g=null!==(m=null!=e?e:libExports.useId(1,"bee-chip-input-")[0])&&void 0!==m?m:"bee-chip-input",v=o?"bee-chip-input-label-required":"",y=o?"bee-chip-input-label-required-star":"";return jsxs("div",{id:g,className:"bee-chip-input p-float-label"+("primary"===n?" bee-chip-input-primary":"secondary"===n?" bee-chip-input-secondary":" bee-chip-input-primary")+(c?" bee-chip-input-readOnly":"")+(l?" bee-chip-input-disabled":"")+("valid"===s?" bee-chip-input-field-valid":"error"===s?" bee-chip-input-field-error":" bee-chip-input-field-neutral")+(t?" "+t:""),children:[jsx(Fragment,{children:c&&!r||c&&r.length<1?jsx(BeePlaceholder,{id:g,label:i}):jsx(Fragment,{children:jsx(Chips,Object.assign({value:r},void 0!==d?{itemTemplate:d}:{},{onChange:e=>function(e){!l&&f&&f(e)}(e),separator:",",addOnBlur:!0,removable:!c,readOnly:null!=c&&c,placeholder:h,tooltip:p,tooltipOptions:u}))})}),i?jsxs("label",{className:"bee-chip-input-label",children:[i,o?jsx("span",{className:v,children:jsx("span",{className:y,children:" *"})}):null]}):null,"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-chip-input-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeCurrencyInput({id:e,className:t,label:i,value:n,showArrow:r,disabled:a,autoFocus:s,minFractionDigits:o,maxFractionDigits:l,max:c,min:h,currency:p="EUR",locale:u="de-DE",statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,name:y,tooltip:b,tooltipOptions:x,onChange:_,onFocusOut:S}){var w;const C=null!==(w=null!=e?e:libExports.useId(1,"bee-cur-input-")[0])&&void 0!==w?w:"bee-cur-input",P=null!=o?o:2,E=null!=l?l:2;let k="";m&&(k=" bee-cur-input-field-readOnly",a=!0);const A=" bee-cur-input-container "+(r?" bee-cur-input-container--showArrow ":""),T="bee-cur-input-field"+("valid"===f?" bee-cur-input-field-valid":"error"===f?" bee-cur-input-field-error":" bee-cur-input-field-neutral")+k,D="icon icon-right-arrow "+(n&&n>0?"up-arrow":n&&n<0?"down-arrow":"");return jsxs("div",{children:[m&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:C,label:i})}):jsxs("div",{className:A+(t?" "+t:""),children:[r?jsx("i",{className:D}):null,jsxs("span",{id:C,className:"p-float-label ",children:[jsx(InputNumber,{id:C+"input",value:null!=n?n:null,disabled:null!=a&&a,minFractionDigits:P,maxFractionDigits:E,max:c,min:h,autoFocus:s,mode:"currency",currency:p,inputId:C+"_input",inputClassName:T,locale:u,placeholder:v,name:y,tooltip:b,tooltipOptions:x,onValueChange:e=>function(e){!a&&_&&_(e)}(e),onBlur:e=>function(e){!a&&S&&S(e)}(e)}),i?jsxs("label",{htmlFor:C+"input",className:"bee-cur-input-label",children:[i,g&&i?jsx("span",{className:"bee-cur-input-label-required",children:jsx("span",{className:"bee-cur-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return jsx("div",{className:"bee-cur-input-statusLabel",children:"error"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeeDateInput({id:e,className:t,label:i,value:n,statusLabel:r,formstate:a="neutral",disabled:s,readOnly:o,required:l,showButtonBar:c,dateFormat:h,view:p,minDate:u,maxDate:d,showMinMaxRange:f,showUTCDate:m,placeholder:g,tooltip:v,tooltipOptions:y,onChange:b,onFocusOut:x,panelClassName:_,locale:S="de"}){var w;const C=null!==(w=null!=e?e:libExports.useId(1,"bee-date-input-")[0])&&void 0!==w?w:"bee-date-input";let P="";o&&(P=" bee-date-input-readOnly",s=!0);const E=`bee-date-input ${"valid"===a?" bee-date-input-valid":"error"===a?" bee-date-input-error":" bee-date-input-neutral"} ${P} ${_||""}`;function k(e){if(!e||Array.isArray(e))return null;let t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset())}function A(e){if(!e||Array.isArray(e))return;let t=new Date(e);return new Date(t.getTime()+6e4*t.getTimezoneOffset())}function T(e){if(e&&!Array.isArray(e))return e instanceof Date?e:new Date(e)}return jsxs(Fragment,{children:[jsx("div",{id:C,className:"p-float-label bee-date-input-container"+(t?" "+t:""),children:o&&!n?jsx(BeePlaceholder,{id:C,label:i}):jsxs(Fragment,{children:[jsx(Calendar,{id:C+"input",value:m&&n?A(n):T(n),disabled:null!=s&&s,className:E,showIcon:!0,showButtonBar:null!=c&&c,dateFormat:null!=h?h:"dd.mm.y",view:null!=p?p:"date",minDate:u?m?A(u):T(u):void 0,maxDate:d?m?A(d):T(d):void 0,showMinMaxRange:null!=f&&f,placeholder:g,tooltip:v,tooltipOptions:y,onChange:e=>function(e){var t;!s&&b&&(m?(e.value=null!==(t=k(e.value))&&void 0!==t?t:new Date,b(e)):b(e))}(e),onBlur:e=>function(e){var t,i;!s&&x&&(m?(e.target.value=null!==(i=null===(t=k(e.target.value))||void 0===t?void 0:t.toString())&&void 0!==i?i:e.target.value,x(e)):x(e))}(e),locale:S}),i?jsxs("label",{htmlFor:C+"input",className:"bee-date-input-label",children:[i,l&&i?jsx("span",{className:"bee-date-input-label-required",children:jsx("span",{className:"bee-date-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=a&&r?(()=>{const e="medium";return jsx("div",{className:"bee-date-input-statusLabel",children:"error"===a&&r?jsx(BeeLabel,{size:e,value:r,type:"error"}):"valid"===a&&r?jsx(BeeLabel,{size:e,value:r,type:"valid"}):"neutral"===a&&r?jsx(BeeLabel,{size:e,value:r,type:"neutral"}):null})})():null]})}function BeeDateTimeInput({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,formstate:s="neutral",readOnly:o,required:l,minDate:c,maxDate:h,showMinMaxRange:p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:m,onFocusOut:g}){var v;const y=null!==(v=null!=e?e:libExports.useId(1,"bee-date-time-input-")[0])&&void 0!==v?v:"bee-date-time-input";let b="";o&&(b=" bee-date-time-input-readOnly",r=!0);const x="bee-date-time-input"+("valid"===s?" bee-date-time-input-valid":"error"===s?" bee-date-time-input-error":"neutral"===s?" bee-date-time-input-neutral":"none"===s?" bee-date-time-field-neutral":" bee-date-time-input-neutral")+b;return jsxs(Fragment,{children:[o&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:y,label:i})}):jsxs("span",{id:y,className:"p-float-label bee-date-time-input-container"+(t?" "+t:""),children:[jsx(Calendar,{showTime:!0,showSeconds:!0,hourFormat:"24",dateFormat:"dd.mm.yy",value:n,disabled:null!=r&&r,className:x,minDate:c?new Date(c):void 0,maxDate:h?new Date(h):void 0,showMinMaxRange:null!=p&&p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:e=>function(e){!r&&m&&m(e)}(e),onBlur:e=>function(e){!r&&g&&g(e)}(e)}),i?jsxs("label",{htmlFor:y+"input",className:"bee-date-time-input-label",children:[i,l&&i?jsx("span",{className:"bee-date-time-input-label-required",children:jsx("span",{className:"bee-date-time-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-date-time-input-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeNumberInput({id:e,className:t,label:i,value:n,showArrow:r,autoFocus:a,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,disabled:h,grouping:p,locale:u="de-DE",statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,tooltip:y,tooltipOptions:b,onChange:x,onFocusOut:_}){var S;const w=null!==(S=null!=e?e:libExports.useId(1,"bee-num-input")[0])&&void 0!==S?S:"bee-num-input";let C="";m&&(C=" bee-num-input-readOnly",h=!0);const P=" bee-num-input-container"+(r?" bee-num-input-container--showArrow":""),E="bee-num-input "+("valid"===f?"bee-num-input-valid":"error"===f?"bee-num-input-error":"bee-num-input-neutral")+C,k="icon icon-right-arrow "+(n&&n>0?"up-arrow":n&&n<0?"down-arrow":"");return jsxs(Fragment,{children:[m&&!n&&0!==n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:w,label:i})}):jsxs("div",{className:"flex-grow-0"+P+(t?" "+t:""),children:[r?jsx("i",{className:k}):null,jsxs("span",{id:w,className:"p-float-label",children:[jsx(InputNumber,{id:w+"input",value:null!=n?n:null,disabled:null!=h&&h,mode:"decimal",autoFocus:a,useGrouping:p,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:u,inputClassName:E,placeholder:v,tooltip:y,tooltipOptions:b,onValueChange:e=>function(e){!h&&x&&x(e)}(e),onBlur:e=>function(e){!h&&_&&_(e)}(e)}),i?jsxs("label",{htmlFor:w+"input",className:"bee-num-input-label",children:[i,g&&i?jsx("span",{className:"bee-num-input-label-required",children:jsx("span",{className:"bee-num-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return jsx("div",{className:"bee-num-input-statusLabel",children:"error"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeePasswordInput({id:e,className:t,label:i,value:n,disabled:r,showPwStrength:a,showHint:s,statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,tooltip:u,tooltipOptions:d,onChange:f,onFocusOut:m}){var g;const v=null!==(g=null!=e?e:libExports.useId(1,"bee-pw-input")[0])&&void 0!==g?g:"bee-pw-input";let y="";c&&(y=" bee-pw-input-readOnly",r=!0);const b="bee-pw-input "+("valid"===l?"bee-pw-input-valid":"error"===l?"bee-pw-input-error":"bee-pw-input-neutral"),x="p-float-label bee-pw-container"+y,_=jsx("h6",{children:"Passwort wählen"});const S=jsxs(Fragment,{children:[jsx(Divider,{}),jsx("p",{className:"mt-2",children:"Suggestions"}),jsxs("ul",{className:"pl-2 ml-2 mt-0",style:{lineHeight:"1.5"},children:[jsx("li",{children:"Mind. einen Kleinbuchstaben"}),jsx("li",{children:"Mind. einen Großbuchstaben"}),jsx("li",{children:"Mind. eine Zahl"}),jsx("li",{children:"Mind. 8 Buchstaben/Zahlen"})]})]});return jsxs(Fragment,{children:[jsx("div",{className:null!=t?t:"",children:c&&!n?jsx(BeePlaceholder,{id:v,label:i}):jsxs("span",{id:v,className:x,children:[jsx(Password,{id:v+"input",value:null!=n?n:void 0,disabled:null!=r&&r,onChange:e=>function(e){!r&&f&&f(e)}(e),onBlur:m,inputClassName:b,toggleMask:!0,feedback:a,header:s?_:null,footer:s?S:null,placeholder:p,tooltip:u,tooltipOptions:d}),i?jsxs("label",{htmlFor:v+"input",className:"bee-pw-input-label",children:[i,h&&i?jsx("span",{className:"bee-pw-input-label-required",children:jsx("span",{className:"bee-pw-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=l&&o?(()=>{const e="medium";return jsx("div",{className:"bee-pw-input-statusLabel",children:"error"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeePercentageInput({id:e,className:t,label:i,value:n,showArrow:r,autoFocus:a,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:h="de-DE",disabled:p,grouping:u,statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,tooltip:y,tooltipOptions:b,onChange:x,onFocusOut:_}){var S;const w=null!==(S=null!=e?e:libExports.useId(1,"bee-percent-input")[0])&&void 0!==S?S:"bee-percent-input",C="icon icon-right-arrow "+(n&&n>0?"up-arrow":n&&n<0?"down-arrow":"");let P="";m&&(P=" bee-percent-input-readOnly",p=!0);const E=" bee-percentage-input-container "+(r?" bee-percentage-input-container--showArrow":""),k="bee-percent-input "+("valid"===f?"bee-percent-input-valid":"error"===f?"bee-percent-input-error":"bee-percent-input-neutral")+P;return jsxs(Fragment,{children:[m&&!n&&0!==n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:w,label:i})}):jsxs("div",{className:"flex-grow-0 "+E+(t?" "+t:""),children:[r?jsx("i",{className:C}):null,jsxs("span",{id:w,className:"p-float-label span-container",children:[jsx(InputNumber,{id:w+"input",value:null!=n?n:null,disabled:null!=p&&p,mode:"decimal",suffix:"%",autoFocus:a,useGrouping:u,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:h,inputClassName:k,placeholder:v,tooltip:y,tooltipOptions:b,onValueChange:e=>function(e){!p&&x&&x(e)}(e),onBlur:e=>function(e){!p&&_&&_(e)}(e)}),i?jsxs("label",{htmlFor:w+"input",className:"bee-percent-input-label",children:[i,g&&i?jsx("span",{className:"bee-percent-input-label-required",children:jsx("span",{className:"bee-percent-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return jsx("div",{className:"bee-percent-input-statusLabel",children:"error"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeeTextArea({id:e,className:t,label:i,value:n,rows:r,disabled:a,autoResize:s,statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,tooltip:u,tooltipOptions:d,onChange:f,onFocusOut:m}){var g;const v=null!==(g=null!=e?e:libExports.useId(1,"bee-ta-input-")[0])&&void 0!==g?g:"bee-ta-input";let y="";c&&(y=" bee-ta-input-readOnly",a=!0);const b=("valid"===l?"bee-ta-input-valid":"error"===l?"bee-ta-input-error":"neutral"===l?"bee-ta-input-neutral":"none"===l?" bee-cur-input-field-neutral":"bee-ta-input-neutral")+y;return jsxs(Fragment,{children:[c&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:v,label:i})}):jsxs("span",{id:v,className:"p-float-label bee-ta-input-container"+(t?" "+t:""),children:[jsx(Fragment,{children:jsx(InputTextarea,{id:v+"input",value:null!=n?n:void 0,rows:r,disabled:null!=a&&a,autoResize:s,className:b,placeholder:p,tooltip:u,tooltipOptions:d,onChange:e=>function(e){!a&&f&&f(e)}(e),onBlur:e=>function(e){!a&&m&&m(e)}(e)})}),i?jsxs("label",{htmlFor:v+"input",className:"bee-ta-input-label",children:[i,h&&i?jsx("span",{className:"bee-ta-input-label-required",children:jsx("span",{className:"bee-ta-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&o?(()=>{const e="medium";return jsx("div",{className:"bee-ta-input-statusLabel",children:"error"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeTimeInput({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,formstate:s="neutral",readOnly:o,required:l,minDate:c,maxDate:h,showMinMaxRange:p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:m,onFocusOut:g}){var v;const y=null!==(v=null!=e?e:libExports.useId(1,"bee-time-input-")[0])&&void 0!==v?v:"bee-time-input";let b="";o&&(b=" bee-time-input-readOnly",r=!0);const x="bee-time-input"+("valid"===s?" bee-time-input-valid":"error"===s?" bee-time-input-error":"neutral"===s?" bee-time-input-neutral":"none"===s?" bee-time-input-field-neutral":" bee-time-input-neutral")+b;return jsxs(Fragment,{children:[o&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:y,label:i})}):jsxs("span",{id:y,className:"p-float-label bee-time-input-container"+(t?" "+t:""),children:[jsx(Calendar,{timeOnly:!0,showTime:!0,hourFormat:"24",value:n,readOnlyInput:null!=o&&o,disabled:null!=r&&r,className:x,minDate:c?new Date(c):void 0,maxDate:h?new Date(h):void 0,showMinMaxRange:null!=p&&p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:e=>function(e){!r&&m&&m(e)}(e),onBlur:e=>function(e){!r&&g&&g(e)}(e)}),i?jsxs("label",{htmlFor:y+"input",className:"bee-time-input-label",children:[i,l&&i?jsx("span",{className:"bee-time-input-label-required",children:jsx("span",{className:"bee-time-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-time-input-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}addLocale("de",{firstDayOfWeek:1,dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["Son","Mon","Die","Mit","Don","Fre","Sam"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen"});var lodash$1={exports:{}},lodash=lodash$1.exports,hasRequiredLodash;
|
|
19
|
+
*/class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,n){const r=t.listeners[n],a=t.duration;r.forEach(n=>n({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(i-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let a,s=r.length-1,o=!1;for(;s>=0;--s)a=r[s],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),o=!0):(r[s]=r[r.length-1],r.pop());o&&(n.draw(),this._notify(n,i,e,"progress")),r.length||(i.running=!1,this._notify(n,i,e,"complete"),i.initial=!1),t+=r.length}),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var animator=new Animator;const transparent="transparent",interpolators={boolean:(e,t,i)=>i>.5?t:e,color(e,t,i){const n=color(e||transparent),r=n.valid&&color(t||transparent);return r&&r.valid?r.mix(n,i).hexString():t},number:(e,t,i)=>e+(t-e)*i};class Animation{constructor(e,t,i,n){const r=t[i];n=resolve([e.to,n,r,e.from]);const a=resolve([e.from,r,n]);this._active=!0,this._fn=e.fn||interpolators[e.type||typeof a],this._easing=effects[e.easing]||effects.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,a=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=resolve([e.to,t,n,e.from]),this._from=resolve([e.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,n=this._prop,r=this._from,a=this._loop,s=this._to;let o;if(this._active=r!==s&&(a||t<i),!this._active)return this._target[n]=s,void this._notify(!0);t<0?this._target[n]=r:(o=t/i%2,o=a&&o>1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[n]=this._fn(r,s,o))}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let e=0;e<i.length;e++)i[e][t]()}}class Animations{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!isObject$1(e))return;const t=Object.keys(defaults.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{const r=e[n];if(!isObject$1(r))return;const a={};for(const e of t)a[e]=r[e];(isArray(r.properties)&&r.properties||[n]).forEach(e=>{e!==n&&i.has(e)||i.set(e,a)})})}_animateOptions(e,t){const i=t.options,n=resolveTargetOptions(e,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&awaitAll(e.options.$animations,i).then(()=>{e.options=i},()=>{}),r}_createAnimations(e,t){const i=this._properties,n=[],r=e.$animations||(e.$animations={}),a=Object.keys(t),s=Date.now();let o;for(o=a.length-1;o>=0;--o){const l=a[o];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(e,t));continue}const c=t[l];let h=r[l];const p=i.get(l);if(h){if(p&&h.active()){h.update(p,c,s);continue}h.cancel()}p&&p.duration?(r[l]=h=new Animation(p,e,l,c),n.push(h)):e[l]=c}return n}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const i=this._createAnimations(e,t);return i.length?(animator.add(this._chart,i),!0):void 0}}function awaitAll(e,t){const i=[],n=Object.keys(t);for(let t=0;t<n.length;t++){const r=e[n[t]];r&&r.active()&&i.push(r.wait())}return Promise.all(i)}function resolveTargetOptions(e,t){if(!t)return;let i=e.options;if(i)return i.$shared&&(e.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;e.options=t}function scaleClip(e,t){const i=e&&e.options||{},n=i.reverse,r=void 0===i.min?t:0,a=void 0===i.max?t:0;return{start:n?a:r,end:n?r:a}}function defaultClip(e,t,i){if(!1===i)return!1;const n=scaleClip(e,i),r=scaleClip(t,i);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}function toClip(e){let t,i,n,r;return isObject$1(e)?(t=e.top,i=e.right,n=e.bottom,r=e.left):t=i=n=r=e,{top:t,right:i,bottom:n,left:r,disabled:!1===e}}function getSortedDatasetIndices(e,t){const i=[],n=e._getSortedDatasetMetas(t);let r,a;for(r=0,a=n.length;r<a;++r)i.push(n[r].index);return i}function applyStack(e,t,i,n={}){const r=e.keys,a="single"===n.mode;let s,o,l,c;if(null===t)return;let h=!1;for(s=0,o=r.length;s<o;++s){if(l=+r[s],l===i){if(h=!0,n.all)continue;break}c=e.values[l],isNumberFinite(c)&&(a||0===t||sign(t)===sign(c))&&(t+=c)}return h||n.all?t:0}function convertObjectDataToArray(e,t){const{iScale:i,vScale:n}=t,r="x"===i.axis?"x":"y",a="x"===n.axis?"x":"y",s=Object.keys(e),o=new Array(s.length);let l,c,h;for(l=0,c=s.length;l<c;++l)h=s[l],o[l]={[r]:h,[a]:e[h]};return o}function isStacked(e,t){const i=e&&e.options.stacked;return i||void 0===i&&void 0!==t.stack}function getStackKey(e,t,i){return`${e.id}.${t.id}.${i.stack||i.type}`}function getUserBounds(e){const{min:t,max:i,minDefined:n,maxDefined:r}=e.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}function getOrCreateStack(e,t,i){const n=e[t]||(e[t]={});return n[i]||(n[i]={})}function getLastIndexInStack(e,t,i,n){for(const r of t.getMatchingVisibleMetas(n).reverse()){const t=e[r.index];if(i&&t>0||!i&&t<0)return r.index}return null}function updateStacks(e,t){const{chart:i,_cachedMeta:n}=e,r=i._stacks||(i._stacks={}),{iScale:a,vScale:s,index:o}=n,l=a.axis,c=s.axis,h=getStackKey(a,s,n),p=t.length;let u;for(let e=0;e<p;++e){const i=t[e],{[l]:a,[c]:p}=i;u=(i._stacks||(i._stacks={}))[c]=getOrCreateStack(r,h,a),u[o]=p,u._top=getLastIndexInStack(u,s,!0,n.type),u._bottom=getLastIndexInStack(u,s,!1,n.type);(u._visualValues||(u._visualValues={}))[o]=p}}function getFirstScaleId(e,t){const i=e.scales;return Object.keys(i).filter(e=>i[e].axis===t).shift()}function createDatasetContext(e,t){return createContext(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function createDataContext(e,t,i){return createContext(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:i,index:t,mode:"default",type:"data"})}function clearStacks(e,t){const i=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[n]||void 0===t[n][i])return;delete t[n][i],void 0!==t[n]._visualValues&&void 0!==t[n]._visualValues[i]&&delete t[n]._visualValues[i]}}}const isDirectUpdateMode=e=>"reset"===e||"none"===e,cloneIfNotShared=(e,t)=>t?e:Object.assign({},e),createStack=(e,t,i)=>e&&!t.hidden&&t._stacked&&{keys:getSortedDatasetIndices(i,!0),values:null};class DatasetController{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.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.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=isStacked(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&clearStacks(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),n=(e,t,i,n)=>"x"===e?t:"r"===e?n:i,r=t.xAxisID=valueOrDefault(i.xAxisID,getFirstScaleId(e,"x")),a=t.yAxisID=valueOrDefault(i.yAxisID,getFirstScaleId(e,"y")),s=t.rAxisID=valueOrDefault(i.rAxisID,getFirstScaleId(e,"r")),o=t.indexAxis,l=t.iAxisID=n(o,r,a,s),c=t.vAxisID=n(o,a,r,s);t.xScale=this.getScaleForId(r),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&unlistenArrayEvents(this._data,this),e._stacked&&clearStacks(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(isObject$1(t)){const e=this._cachedMeta;this._data=convertObjectDataToArray(t,e)}else if(i!==t){if(i){unlistenArrayEvents(i,this);const e=this._cachedMeta;clearStacks(e),e._parsed=[]}t&&Object.isExtensible(t)&&listenArrayEvents(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=t._stacked;t._stacked=isStacked(t.vScale,t),t.stack!==i.stack&&(n=!0,clearStacks(t),t.stack=i.stack),this._resyncElements(e),(n||r!==t._stacked)&&(updateStacks(this,t._parsed),t._stacked=isStacked(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:a}=i,s=r.axis;let o,l,c,h=0===e&&t===n.length||i._sorted,p=e>0&&i._parsed[e-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=isArray(n[e])?this.parseArrayData(i,n,e,t):isObject$1(n[e])?this.parseObjectData(i,n,e,t):this.parsePrimitiveData(i,n,e,t);const r=()=>null===l[s]||p&&l[s]<p[s];for(o=0;o<t;++o)i._parsed[o+e]=l=c[o],h&&(r()&&(h=!1),p=l);i._sorted=h}a&&updateStacks(this,c)}parsePrimitiveData(e,t,i,n){const{iScale:r,vScale:a}=e,s=r.axis,o=a.axis,l=r.getLabels(),c=r===a,h=new Array(n);let p,u,d;for(p=0,u=n;p<u;++p)d=p+i,h[p]={[s]:c||r.parse(l[d],d),[o]:a.parse(t[d],d)};return h}parseArrayData(e,t,i,n){const{xScale:r,yScale:a}=e,s=new Array(n);let o,l,c,h;for(o=0,l=n;o<l;++o)c=o+i,h=t[c],s[o]={x:r.parse(h[0],c),y:a.parse(h[1],c)};return s}parseObjectData(e,t,i,n){const{xScale:r,yScale:a}=e,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l=new Array(n);let c,h,p,u;for(c=0,h=n;c<h;++c)p=c+i,u=t[p],l[c]={x:r.parse(resolveObjectKey(u,s),p),y:a.parse(resolveObjectKey(u,o),p)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,i){const n=this.chart,r=this._cachedMeta,a=t[e.axis];return applyStack({keys:getSortedDatasetIndices(n,!0),values:t._stacks[e.axis]._visualValues},a,r.index,{mode:i})}updateRangeFromParsed(e,t,i,n){const r=i[t.axis];let a=null===r?NaN:r;const s=n&&i._stacks[t.axis];n&&s&&(n.values=s,a=applyStack(n,r,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,t){const i=this._cachedMeta,n=i._parsed,r=i._sorted&&e===i.iScale,a=n.length,s=this._getOtherScale(e),o=createStack(t,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=getUserBounds(s);let p,u;function d(){u=n[p];const t=u[s.axis];return!isNumberFinite(u[e.axis])||c>t||h<t}for(p=0;p<a&&(d()||(this.updateRangeFromParsed(l,e,u,o),!r));++p);if(r)for(p=a-1;p>=0;--p)if(!d()){this.updateRangeFromParsed(l,e,u,o);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let n,r,a;for(n=0,r=t.length;n<r;++n)a=t[n][e.axis],isNumberFinite(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,i=t.iScale,n=t.vScale,r=this.getParsed(e);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=toClip(valueOrDefault(this.options.clip,defaultClip(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,i=this._cachedMeta,n=i.data||[],r=t.chartArea,a=[],s=this._drawStart||0,o=this._drawCount||n.length-s,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(e,r,s,o),c=s;c<s+o;++c){const t=n[c];t.hidden||(t.active&&l?a.push(t):t.draw(e,r))}for(c=0;c<a.length;++c)a[c].draw(e,r)}getStyle(e,t){const i=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,t,i){const n=this.getDataset();let r;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];r=t.$context||(t.$context=createDataContext(this.getContext(),e,t)),r.parsed=this.getParsed(e),r.raw=n.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=createDatasetContext(this.chart.getContext(),this.index)),r.dataset=n,r.index=r.datasetIndex=this.index;return r.active=!!t,r.mode=i,r}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",i){const n="active"===t,r=this._cachedDataOpts,a=e+"-"+t,s=r[a],o=this.enableOptionSharing&&defined(i);if(s)return cloneIfNotShared(s,o);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),h=n?[`${e}Hover`,"hover",e,""]:[e,""],p=l.getOptionScopes(this.getDataset(),c),u=Object.keys(defaults.elements[e]),d=l.resolveNamedOptions(p,u,()=>this.getContext(i,n,t),h);return d.$shared&&(d.$shared=o,r[a]=Object.freeze(cloneIfNotShared(d,o))),d}_resolveAnimations(e,t,i){const n=this.chart,r=this._cachedDataOpts,a=`animation-${t}`,s=r[a];if(s)return s;let o;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,t),a=n.getOptionScopes(this.getDataset(),r);o=n.createResolver(a,this.getContext(e,i,t))}const l=new Animations(n,o&&o.animations);return o&&o._cacheable&&(r[a]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||isDirectUpdateMode(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),n=this._sharedOptions,r=this.getSharedOptions(i),a=this.includeOptions(t,r)||r!==n;return this.updateSharedOptions(r,t,i),{sharedOptions:r,includeOptions:a}}updateElement(e,t,i,n){isDirectUpdateMode(n)?Object.assign(e,i):this._resolveAnimations(t,n).update(e,i)}updateSharedOptions(e,t,i){e&&!isDirectUpdateMode(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,n){e.active=n;const r=this.getStyle(t,n);this._resolveAnimations(t,i,n).update(e,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[e,t,i]of this._syncList)this[e](t,i);this._syncList=[];const n=i.length,r=t.length,a=Math.min(r,n);a&&this.parse(0,a),r>n?this._insertElements(n,r-n,e):r<n&&this._removeElements(r,n-r)}_insertElements(e,t,i=!0){const n=this._cachedMeta,r=n.data,a=e+t;let s;const o=e=>{for(e.length+=t,s=e.length-1;s>=a;s--)e[s]=e[s-t]};for(o(r),s=e;s<a;++s)r[s]=new this.dataElementType;this._parsing&&o(n._parsed),this.parse(e,t),i&&this.updateElements(r,e,t,"reset")}updateElements(e,t,i,n){}_removeElements(e,t){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(e,t);i._stacked&&clearStacks(i,n)}i.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,i,n]=e;this[t](i,n)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function getAllScaleValues(e,t){if(!e._cache.$bar){const i=e.getMatchingVisibleMetas(t);let n=[];for(let t=0,r=i.length;t<r;t++)n=n.concat(i[t].controller.getAllParsedValues(e));e._cache.$bar=_arrayUnique(n.sort((e,t)=>e-t))}return e._cache.$bar}function computeMinSampleSize(e){const t=e.iScale,i=getAllScaleValues(t,e.type);let n,r,a,s,o=t._length;const l=()=>{32767!==a&&-32768!==a&&(defined(s)&&(o=Math.min(o,Math.abs(a-s)||o)),s=a)};for(n=0,r=i.length;n<r;++n)a=t.getPixelForValue(i[n]),l();for(s=void 0,n=0,r=t.ticks.length;n<r;++n)a=t.getPixelForTick(n),l();return o}function computeFitCategoryTraits(e,t,i,n){const r=i.barThickness;let a,s;return isNullOrUndef(r)?(a=t.min*i.categoryPercentage,s=i.barPercentage):(a=r*n,s=1),{chunk:a/n,ratio:s,start:t.pixels[e]-a/2}}function computeFlexCategoryTraits(e,t,i,n){const r=t.pixels,a=r[e];let s=e>0?r[e-1]:null,o=e<r.length-1?r[e+1]:null;const l=i.categoryPercentage;null===s&&(s=a-(null===o?t.end-t.start:o-a)),null===o&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/n,ratio:i.barPercentage,start:c}}function parseFloatBar(e,t,i,n){const r=i.parse(e[0],n),a=i.parse(e[1],n),s=Math.min(r,a),o=Math.max(r,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[i.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:a,min:s,max:o}}function parseValue(e,t,i,n){return isArray(e)?parseFloatBar(e,t,i,n):t[i.axis]=i.parse(e,n),t}function parseArrayOrPrimitive(e,t,i,n){const r=e.iScale,a=e.vScale,s=r.getLabels(),o=r===a,l=[];let c,h,p,u;for(c=i,h=i+n;c<h;++c)u=t[c],p={},p[r.axis]=o||r.parse(s[c],c),l.push(parseValue(u,p,a,c));return l}function isFloatBar(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function barSign(e,t,i){return 0!==e?sign(e):(t.isHorizontal()?1:-1)*(t.min>=i?1:-1)}function borderProps(e){let t,i,n,r,a;return e.horizontal?(t=e.base>e.x,i="left",n="right"):(t=e.base<e.y,i="bottom",n="top"),t?(r="end",a="start"):(r="start",a="end"),{start:i,end:n,reverse:t,top:r,bottom:a}}function setBorderSkipped(e,t,i,n){let r=t.borderSkipped;const a={};if(!r)return void(e.borderSkipped=a);if(!0===r)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:o,reverse:l,top:c,bottom:h}=borderProps(e);"middle"===r&&i&&(e.enableBorderRadius=!0,(i._top||0)===n?r=c:(i._bottom||0)===n?r=h:(a[parseEdge(h,s,o,l)]=!0,r=c)),a[parseEdge(r,s,o,l)]=!0,e.borderSkipped=a}function parseEdge(e,t,i,n){return e=n?startEnd(e=swap(e,t,i),i,t):startEnd(e,t,i)}function swap(e,t,i){return e===t?i:e===i?t:e}function startEnd(e,t,i){return"start"===e?t:"end"===e?i:e}function setInflateAmount(e,{inflateAmount:t},i){e.inflateAmount="auto"===t?1===i?.33:0:t}class BarController extends DatasetController{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,t,i,n){return parseArrayOrPrimitive(e,t,i,n)}parseArrayData(e,t,i,n){return parseArrayOrPrimitive(e,t,i,n)}parseObjectData(e,t,i,n){const{iScale:r,vScale:a}=e,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l="x"===r.axis?s:o,c="x"===a.axis?s:o,h=[];let p,u,d,f;for(p=i,u=i+n;p<u;++p)f=t[p],d={},d[r.axis]=r.parse(resolveObjectKey(f,l),p),h.push(parseValue(resolveObjectKey(f,c),d,a,p));return h}updateRangeFromParsed(e,t,i,n){super.updateRangeFromParsed(e,t,i,n);const r=i._custom;r&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,r.min),e.max=Math.max(e.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:i,vScale:n}=t,r=this.getParsed(e),a=r._custom,s=isFloatBar(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,i,n){const r="reset"===n,{index:a,_cachedMeta:{vScale:s}}=this,o=s.getBasePixel(),l=s.isHorizontal(),c=this._getRuler(),{sharedOptions:h,includeOptions:p}=this._getSharedOptions(t,n);for(let u=t;u<t+i;u++){const t=this.getParsed(u),i=r||isNullOrUndef(t[s.axis])?{base:o,head:o}:this._calculateBarValuePixels(u),d=this._calculateBarIndexPixels(u,c),f=(t._stacks||{})[s.axis],m={horizontal:l,base:i.base,enableBorderRadius:!f||isFloatBar(t._custom)||a===f._top||a===f._bottom,x:l?i.head:d.center,y:l?d.center:i.head,height:l?d.size:Math.abs(i.size),width:l?Math.abs(i.size):d.size};p&&(m.options=h||this.resolveDataElementOptions(u,e[u].active?"active":n));const g=m.options||e[u].options;setBorderSkipped(m,g,f,a),setInflateAmount(m,g,c.ratio),this.updateElement(e[u],u,m,n)}}_getStacks(e,t){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(e=>e.controller.options.grouped),r=i.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(t),o=s&&s[i.axis],l=e=>{const t=e._parsed.find(e=>e[i.axis]===o),n=t&&t[e.vScale.axis];if(isNullOrUndef(n)||isNaN(n))return!0};for(const i of n)if((void 0===t||!l(i))&&((!1===r||-1===a.indexOf(i.stack)||void 0===r&&void 0===i.stack)&&a.push(i.stack),i.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(i=>e[i].axis===t).shift()}_getAxis(){const e={},t=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)e[valueOrDefault("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,i){const n=this._getStacks(e,i),r=void 0!==t?n.indexOf(t):-1;return-1===r?n.length-1:r}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,n=[];let r,a;for(r=0,a=t.data.length;r<a;++r)n.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const s=e.barThickness;return{min:s||computeMinSampleSize(t),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:s?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:i,index:n},options:{base:r,minBarLength:a}}=this,s=r||0,o=this.getParsed(e),l=o._custom,c=isFloatBar(l);let h,p,u=o[t.axis],d=0,f=i?this.applyStack(t,o,i):u;f!==u&&(d=f-u,f=u),c&&(u=l.barStart,f=l.barEnd-l.barStart,0!==u&&sign(u)!==sign(l.barEnd)&&(d=0),d+=u);const m=isNullOrUndef(r)||c?d:r;let g=t.getPixelForValue(m);if(h=this.chart.getDataVisibility(e)?t.getPixelForValue(d+f):g,p=h-g,Math.abs(p)<a){p=barSign(p,t,s)*a,u===s&&(g-=p/2);const e=t.getPixelForDecimal(0),r=t.getPixelForDecimal(1),l=Math.min(e,r),d=Math.max(e,r);g=Math.max(Math.min(g,d),l),h=g+p,i&&!c&&(o._stacks[t.axis]._visualValues[n]=t.getValueForPixel(h)-t.getValueForPixel(g))}if(g===t.getPixelForValue(s)){const e=sign(p)*t.getLineWidthForValue(s)/2;g+=e,p-=e}return{size:p,base:g,head:h,center:h+p/2}}_calculateBarIndexPixels(e,t){const i=t.scale,n=this.options,r=n.skipNull,a=valueOrDefault(n.maxBarThickness,1/0);let s,o;const l=this._getAxisCount();if(t.grouped){const i=r?this._getStackCount(e):t.stackCount,c="flex"===n.barThickness?computeFlexCategoryTraits(e,t,n,i*l):computeFitCategoryTraits(e,t,n,i*l),h="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(valueOrDefault(h,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,r?e:void 0)+p;s=c.start+c.chunk*u+c.chunk/2,o=Math.min(a,c.chunk*c.ratio)}else s=i.getPixelForValue(this.getParsed(e)[i.axis],e),o=Math.min(a,t.min*t.ratio);return{base:s-o/2,head:s+o/2,center:s,size:o}}draw(){const e=this._cachedMeta,t=e.vScale,i=e.data,n=i.length;let r=0;for(;r<n;++r)null===this.getParsed(r)[t.axis]||i[r].hidden||i[r].draw(this._ctx)}}function getRatioAndOffset(e,t,i){let n=1,r=1,a=0,s=0;if(t<TAU){const o=e,l=o+t,c=Math.cos(o),h=Math.sin(o),p=Math.cos(l),u=Math.sin(l),d=(e,t,n)=>_angleBetween(e,o,l,!0)?1:Math.max(t,t*i,n,n*i),f=(e,t,n)=>_angleBetween(e,o,l,!0)?-1:Math.min(t,t*i,n,n*i),m=d(0,c,p),g=d(HALF_PI,h,u),v=f(PI,c,p),y=f(PI+HALF_PI,h,u);n=(m-v)/2,r=(g-y)/2,a=-(m+v)/2,s=-(g+y)/2}return{ratioX:n,ratioY:r,offsetX:a,offsetY:s}}class DoughnutController extends DatasetController{static id="doughnut";static 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"};static descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data,{labels:{pointStyle:i,textAlign:n,color:r,useBorderRadius:a,borderRadius:s}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:l.backgroundColor,fontColor:r,hidden:!e.getDataVisibility(o),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:n,pointStyle:i,borderRadius:a&&(s||l.borderRadius),index:o}}):[]}},onClick(e,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,a,s=e=>+i[e];if(isObject$1(i[e])){const{key:e="value"}=this._parsing;s=t=>+resolveObjectKey(i[t],e)}for(r=e,a=e+t;r<a;++r)n._parsed[r]=s(r)}}_getRotation(){return toRadians(this.options.rotation-90)}_getCircumference(){return toRadians(this.options.circumference)}_getRotationExtents(){let e=TAU,t=-TAU;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,r=n._getRotation(),a=n._getCircumference();e=Math.min(e,r),t=Math.max(t,r+a)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:i}=t,n=this._cachedMeta,r=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,s=Math.max((Math.min(i.width,i.height)-a)/2,0),o=Math.min(toPercentage(this.options.cutout,s),1),l=this._getRingWeight(this.index),{circumference:c,rotation:h}=this._getRotationExtents(),{ratioX:p,ratioY:u,offsetX:d,offsetY:f}=getRatioAndOffset(h,c,o),m=(i.width-a)/p,g=(i.height-a)/u,v=Math.max(Math.min(m,g)/2,0),y=toDimension(this.options.radius,v),b=(y-Math.max(y*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=d*y,this.offsetY=f*y,n.total=this.calculateTotal(),this.outerRadius=y-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*l,0),this.updateElements(r,0,r.length,e)}_circumference(e,t){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return t&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||null===n._parsed[e]||n.data[e].hidden?0:this.calculateCircumference(n._parsed[e]*r/TAU)}updateElements(e,t,i,n){const r="reset"===n,a=this.chart,s=a.chartArea,o=a.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&o.animateScale,p=h?0:this.innerRadius,u=h?0:this.outerRadius,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(t,n);let m,g=this._getRotation();for(m=0;m<t;++m)g+=this._circumference(m,r);for(m=t;m<t+i;++m){const t=this._circumference(m,r),i=e[m],a={x:l+this.offsetX,y:c+this.offsetY,startAngle:g,endAngle:g+t,circumference:t,outerRadius:u,innerRadius:p};f&&(a.options=d||this.resolveDataElementOptions(m,i.active?"active":n)),g+=t,this.updateElement(i,m,a,n)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let i,n=0;for(i=0;i<t.length;i++){const r=e._parsed[i];null===r||isNaN(r)||!this.chart.getDataVisibility(i)||t[i].hidden||(n+=Math.abs(r))}return n}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?TAU*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=formatNumber(t._parsed[e],i.options.locale);return{label:n[e]||"",value:r}}getMaxBorderWidth(e){let t=0;const i=this.chart;let n,r,a,s,o;if(!e)for(n=0,r=i.data.datasets.length;n<r;++n)if(i.isDatasetVisible(n)){a=i.getDatasetMeta(n),e=a.data,s=a.controller;break}if(!e)return 0;for(n=0,r=e.length;n<r;++n)o=s.resolveDataElementOptions(n),"inner"!==o.borderAlign&&(t=Math.max(t,o.borderWidth||0,o.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let i=0,n=e.length;i<n;++i){const e=this.resolveDataElementOptions(i);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(t+=this._getRingWeight(i));return t}_getRingWeight(e){return Math.max(valueOrDefault(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class PieController extends DoughnutController{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function abstract(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class DateAdapterBase{static override(e){Object.assign(DateAdapterBase.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return abstract()}parse(){return abstract()}format(){return abstract()}add(){return abstract()}diff(){return abstract()}startOf(){return abstract()}endOf(){return abstract()}}var adapters={_date:DateAdapterBase};function binarySearch(e,t,i,n){const{controller:r,data:a,_sorted:s}=e,o=r._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(o&&t===o.axis&&"r"!==t&&s&&a.length){const s=o._reversePixels?_rlookupByKey:_lookupByKey;if(!n){const n=s(a,t,i);if(l){const{vScale:t}=r._cachedMeta,{_parsed:i}=e,a=i.slice(0,n.lo+1).reverse().findIndex(e=>!isNullOrUndef(e[t.axis]));n.lo-=Math.max(0,a);const s=i.slice(n.hi).findIndex(e=>!isNullOrUndef(e[t.axis]));n.hi+=Math.max(0,s)}return n}if(r._sharedOptions){const e=a[0],n="function"==typeof e.getRange&&e.getRange(t);if(n){const e=s(a,t,i-n),r=s(a,t,i+n);return{lo:e.lo,hi:r.hi}}}}return{lo:0,hi:a.length-1}}function evaluateInteractionItems(e,t,i,n,r){const a=e.getSortedVisibleDatasetMetas(),s=i[t];for(let e=0,i=a.length;e<i;++e){const{index:i,data:o}=a[e],{lo:l,hi:c}=binarySearch(a[e],t,s,r);for(let e=l;e<=c;++e){const t=o[e];t.skip||n(t,i,e)}}}function getDistanceMetricForAxis(e){const t=-1!==e.indexOf("x"),i=-1!==e.indexOf("y");return function(e,n){const r=t?Math.abs(e.x-n.x):0,a=i?Math.abs(e.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(a,2))}}function getIntersectItems(e,t,i,n,r){const a=[];if(!r&&!e.isPointInArea(t))return a;return evaluateInteractionItems(e,i,t,function(i,s,o){(r||_isPointInArea(i,e.chartArea,0))&&i.inRange(t.x,t.y,n)&&a.push({element:i,datasetIndex:s,index:o})},!0),a}function getNearestRadialItems(e,t,i,n){let r=[];return evaluateInteractionItems(e,i,t,function(e,i,a){const{startAngle:s,endAngle:o}=e.getProps(["startAngle","endAngle"],n),{angle:l}=getAngleFromPoint(e,{x:t.x,y:t.y});_angleBetween(l,s,o)&&r.push({element:e,datasetIndex:i,index:a})}),r}function getNearestCartesianItems(e,t,i,n,r,a){let s=[];const o=getDistanceMetricForAxis(i);let l=Number.POSITIVE_INFINITY;return evaluateInteractionItems(e,i,t,function(i,c,h){const p=i.inRange(t.x,t.y,r);if(n&&!p)return;const u=i.getCenterPoint(r);if(!(!!a||e.isPointInArea(u))&&!p)return;const d=o(t,u);d<l?(s=[{element:i,datasetIndex:c,index:h}],l=d):d===l&&s.push({element:i,datasetIndex:c,index:h})}),s}function getNearestItems(e,t,i,n,r,a){return a||e.isPointInArea(t)?"r"!==i||n?getNearestCartesianItems(e,t,i,n,r,a):getNearestRadialItems(e,t,i,r):[]}function getAxisItems(e,t,i,n,r){const a=[],s="x"===i?"inXRange":"inYRange";let o=!1;return evaluateInteractionItems(e,i,t,(e,n,l)=>{e[s]&&e[s](t[i],r)&&(a.push({element:e,datasetIndex:n,index:l}),o=o||e.inRange(t.x,t.y,r))}),n&&!o?[]:a}var Interaction={modes:{index(e,t,i,n){const r=getRelativePosition(t,e),a=i.axis||"x",s=i.includeInvisible||!1,o=i.intersect?getIntersectItems(e,r,a,n,s):getNearestItems(e,r,a,!1,n,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{const t=o[0].index,i=e.data[t];i&&!i.skip&&l.push({element:i,datasetIndex:e.index,index:t})}),l):[]},dataset(e,t,i,n){const r=getRelativePosition(t,e),a=i.axis||"xy",s=i.includeInvisible||!1;let o=i.intersect?getIntersectItems(e,r,a,n,s):getNearestItems(e,r,a,!1,n,s);if(o.length>0){const t=o[0].datasetIndex,i=e.getDatasetMeta(t).data;o=[];for(let e=0;e<i.length;++e)o.push({element:i[e],datasetIndex:t,index:e})}return o},point:(e,t,i,n)=>getIntersectItems(e,getRelativePosition(t,e),i.axis||"xy",n,i.includeInvisible||!1),nearest(e,t,i,n){const r=getRelativePosition(t,e),a=i.axis||"xy",s=i.includeInvisible||!1;return getNearestItems(e,r,a,i.intersect,n,s)},x:(e,t,i,n)=>getAxisItems(e,getRelativePosition(t,e),"x",i.intersect,n),y:(e,t,i,n)=>getAxisItems(e,getRelativePosition(t,e),"y",i.intersect,n)}};const STATIC_POSITIONS=["left","top","right","bottom"];function filterByPosition(e,t){return e.filter(e=>e.pos===t)}function filterDynamicPositionByAxis(e,t){return e.filter(e=>-1===STATIC_POSITIONS.indexOf(e.pos)&&e.box.axis===t)}function sortByWeight(e,t){return e.sort((e,i)=>{const n=t?i:e,r=t?e:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function wrapBoxes(e){const t=[];let i,n,r,a,s,o;for(i=0,n=(e||[]).length;i<n;++i)r=e[i],({position:a,options:{stack:s,stackWeight:o=1}}=r),t.push({index:i,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&a+s,stackWeight:o});return t}function buildStacks(e){const t={};for(const i of e){const{stack:e,pos:n,stackWeight:r}=i;if(!e||!STATIC_POSITIONS.includes(n))continue;const a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=r}return t}function setLayoutDims(e,t){const i=buildStacks(e),{vBoxMaxWidth:n,hBoxMaxHeight:r}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:s}=o.box,l=i[o.stack],c=l&&o.stackWeight/l.weight;o.horizontal?(o.width=c?c*n:s&&t.availableWidth,o.height=r):(o.width=n,o.height=c?c*r:s&&t.availableHeight)}return i}function buildLayoutBoxes(e){const t=wrapBoxes(e),i=sortByWeight(t.filter(e=>e.box.fullSize),!0),n=sortByWeight(filterByPosition(t,"left"),!0),r=sortByWeight(filterByPosition(t,"right")),a=sortByWeight(filterByPosition(t,"top"),!0),s=sortByWeight(filterByPosition(t,"bottom")),o=filterDynamicPositionByAxis(t,"x"),l=filterDynamicPositionByAxis(t,"y");return{fullSize:i,leftAndTop:n.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:filterByPosition(t,"chartArea"),vertical:n.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function getCombinedMax(e,t,i,n){return Math.max(e[i],t[i])+Math.max(e[n],t[n])}function updateMaxPadding(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function updateDims(e,t,i,n){const{pos:r,box:a}=i,s=e.maxPadding;if(!isObject$1(r)){i.size&&(e[r]-=i.size);const t=n[i.stack]||{size:0,count:1};t.size=Math.max(t.size,i.horizontal?a.height:a.width),i.size=t.size/t.count,e[r]+=i.size}a.getPadding&&updateMaxPadding(s,a.getPadding());const o=Math.max(0,t.outerWidth-getCombinedMax(s,e,"left","right")),l=Math.max(0,t.outerHeight-getCombinedMax(s,e,"top","bottom")),c=o!==e.w,h=l!==e.h;return e.w=o,e.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function handleMaxPadding(e){const t=e.maxPadding;function i(i){const n=Math.max(t[i]-e[i],0);return e[i]+=n,n}e.y+=i("top"),e.x+=i("left"),i("right"),i("bottom")}function getMargins(e,t){const i=t.maxPadding;function n(e){const n={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{n[e]=Math.max(t[e],i[e])}),n}return n(e?["left","right"]:["top","bottom"])}function fitBoxes(e,t,i,n){const r=[];let a,s,o,l,c,h;for(a=0,s=e.length,c=0;a<s;++a){o=e[a],l=o.box,l.update(o.width||t.w,o.height||t.h,getMargins(o.horizontal,t));const{same:s,other:p}=updateDims(t,i,o,n);c|=s&&r.length,h=h||p,l.fullSize||r.push(o)}return c&&fitBoxes(r,t,i,n)||h}function setBoxDims(e,t,i,n,r){e.top=i,e.left=t,e.right=t+n,e.bottom=i+r,e.width=n,e.height=r}function placeBoxes(e,t,i,n){const r=i.padding;let{x:a,y:s}=t;for(const o of e){const e=o.box,l=n[o.stack]||{placed:0,weight:1},c=o.stackWeight/l.weight||1;if(o.horizontal){const n=t.w*c,a=l.size||e.height;defined(l.start)&&(s=l.start),e.fullSize?setBoxDims(e,r.left,s,i.outerWidth-r.right-r.left,a):setBoxDims(e,t.left+l.placed,s,n,a),l.start=s,l.placed+=n,s=e.bottom}else{const n=t.h*c,s=l.size||e.width;defined(l.start)&&(a=l.start),e.fullSize?setBoxDims(e,a,r.top,s,i.outerHeight-r.bottom-r.top):setBoxDims(e,a,t.top+l.placed,s,n),l.start=a,l.placed+=n,a=e.right}}t.x=a,t.y=s}var layouts={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const i=e.boxes?e.boxes.indexOf(t):-1;-1!==i&&e.boxes.splice(i,1)},configure(e,t,i){t.fullSize=i.fullSize,t.position=i.position,t.weight=i.weight},update(e,t,i,n){if(!e)return;const r=toPadding(e.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(i-r.height,0),o=buildLayoutBoxes(e.boxes),l=o.vertical,c=o.horizontal;each(e.boxes,e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()});const h=l.reduce((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1,0)||1,p=Object.freeze({outerWidth:t,outerHeight:i,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/h,hBoxMaxHeight:s/2}),u=Object.assign({},r);updateMaxPadding(u,toPadding(n));const d=Object.assign({maxPadding:u,w:a,h:s,x:r.left,y:r.top},r),f=setLayoutDims(l.concat(c),p);fitBoxes(o.fullSize,d,p,f),fitBoxes(l,d,p,f),fitBoxes(c,d,p,f)&&fitBoxes(l,d,p,f),handleMaxPadding(d),placeBoxes(o.leftAndTop,d,p,f),d.x+=d.w,d.y+=d.h,placeBoxes(o.rightAndBottom,d,p,f),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},each(o.chartArea,t=>{const i=t.box;Object.assign(i,e.chartArea),i.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class BasePlatform{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,n){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,n?Math.floor(t/n):i)}}isAttached(e){return!0}updateConfig(e){}}class BasicPlatform extends BasePlatform{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const EXPANDO_KEY="$chartjs",EVENT_TYPES={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},isNullOrEmpty=e=>null===e||""===e;function initCanvas(e,t){const i=e.style,n=e.getAttribute("height"),r=e.getAttribute("width");if(e[EXPANDO_KEY]={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",isNullOrEmpty(r)){const t=readUsedSize(e,"width");void 0!==t&&(e.width=t)}if(isNullOrEmpty(n))if(""===e.style.height)e.height=e.width/(t||2);else{const t=readUsedSize(e,"height");void 0!==t&&(e.height=t)}return e}const eventListenerOptions=!!supportsEventListenerOptions&&{passive:!0};function addListener(e,t,i){e&&e.addEventListener(t,i,eventListenerOptions)}function removeListener(e,t,i){e&&e.canvas&&e.canvas.removeEventListener(t,i,eventListenerOptions)}function fromNativeEvent(e,t){const i=EVENT_TYPES[e.type]||e.type,{x:n,y:r}=getRelativePosition(e,t);return{type:i,chart:t,native:e,x:void 0!==n?n:null,y:void 0!==r?r:null}}function nodeListContains(e,t){for(const i of e)if(i===t||i.contains(t))return!0}function createAttachObserver(e,t,i){const n=e.canvas,r=new MutationObserver(e=>{let t=!1;for(const i of e)t=t||nodeListContains(i.addedNodes,n),t=t&&!nodeListContains(i.removedNodes,n);t&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}function createDetachObserver(e,t,i){const n=e.canvas,r=new MutationObserver(e=>{let t=!1;for(const i of e)t=t||nodeListContains(i.removedNodes,n),t=t&&!nodeListContains(i.addedNodes,n);t&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}const drpListeningCharts=new Map;let oldDevicePixelRatio=0;function onWindowResize(){const e=window.devicePixelRatio;e!==oldDevicePixelRatio&&(oldDevicePixelRatio=e,drpListeningCharts.forEach((t,i)=>{i.currentDevicePixelRatio!==e&&t()}))}function listenDevicePixelRatioChanges(e,t){drpListeningCharts.size||window.addEventListener("resize",onWindowResize),drpListeningCharts.set(e,t)}function unlistenDevicePixelRatioChanges(e){drpListeningCharts.delete(e),drpListeningCharts.size||window.removeEventListener("resize",onWindowResize)}function createResizeObserver(e,t,i){const n=e.canvas,r=n&&_getParentNode(n);if(!r)return;const a=throttled((e,t)=>{const n=r.clientWidth;i(e,t),n<r.clientWidth&&i()},window),s=new ResizeObserver(e=>{const t=e[0],i=t.contentRect.width,n=t.contentRect.height;0===i&&0===n||a(i,n)});return s.observe(r),listenDevicePixelRatioChanges(e,a),s}function releaseObserver(e,t,i){i&&i.disconnect(),"resize"===t&&unlistenDevicePixelRatioChanges(e)}function createProxyAndListen(e,t,i){const n=e.canvas,r=throttled(t=>{null!==e.ctx&&i(fromNativeEvent(t,e))},e);return addListener(n,t,r),r}class DomPlatform extends BasePlatform{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(initCanvas(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[EXPANDO_KEY])return!1;const i=t[EXPANDO_KEY].initial;["height","width"].forEach(e=>{const n=i[e];isNullOrUndef(n)?t.removeAttribute(e):t.setAttribute(e,n)});const n=i.style||{};return Object.keys(n).forEach(e=>{t.style[e]=n[e]}),t.width=t.width,delete t[EXPANDO_KEY],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const n=e.$proxies||(e.$proxies={}),r={attach:createAttachObserver,detach:createDetachObserver,resize:createResizeObserver}[t]||createProxyAndListen;n[t]=r(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),n=i[t];if(!n)return;({attach:releaseObserver,detach:releaseObserver,resize:releaseObserver}[t]||removeListener)(e,t,n),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,n){return getMaximumSize(e,t,i,n)}isAttached(e){const t=e&&_getParentNode(e);return!(!t||!t.isConnected)}}function _detectPlatform(e){return!_isDomSupported()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?BasicPlatform:DomPlatform}class Element{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return isNumber(this.x)&&isNumber(this.y)}getProps(e,t){const i=this.$animations;if(!t||!i)return this;const n={};return e.forEach(e=>{n[e]=i[e]&&i[e].active()?i[e]._to:this[e]}),n}}function autoSkip(e,t){const i=e.options.ticks,n=determineMaxTicks(e),r=Math.min(i.maxTicksLimit||n,n),a=i.major.enabled?getMajorIndices(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return skipMajors(t,c,a,s/r),c;const h=calculateSpacing(a,t,r);if(s>0){let e,i;const n=s>1?Math.round((l-o)/(s-1)):null;for(skip(t,c,h,isNullOrUndef(n)?0:o-n,o),e=0,i=s-1;e<i;e++)skip(t,c,h,a[e],a[e+1]);return skip(t,c,h,l,isNullOrUndef(n)?t.length:l+n),c}return skip(t,c,h),c}function determineMaxTicks(e){const t=e.options.offset,i=e._tickSize(),n=e._length/i+(t?0:1),r=e._maxLength/i;return Math.floor(Math.min(n,r))}function calculateSpacing(e,t,i){const n=getEvenSpacing(e),r=t.length/i;if(!n)return Math.max(r,1);const a=_factorize(n);for(let e=0,t=a.length-1;e<t;e++){const t=a[e];if(t>r)return t}return Math.max(r,1)}function getMajorIndices(e){const t=[];let i,n;for(i=0,n=e.length;i<n;i++)e[i].major&&t.push(i);return t}function skipMajors(e,t,i,n){let r,a=0,s=i[0];for(n=Math.ceil(n),r=0;r<e.length;r++)r===s&&(t.push(e[r]),a++,s=i[a*n])}function skip(e,t,i,n,r){const a=valueOrDefault(n,0),s=Math.min(valueOrDefault(r,e.length),e.length);let o,l,c,h=0;for(i=Math.ceil(i),r&&(o=r-n,i=o/Math.floor(o/i)),c=a;c<0;)h++,c=Math.round(a+h*i);for(l=Math.max(a,0);l<s;l++)l===c&&(t.push(e[l]),h++,c=Math.round(a+h*i))}function getEvenSpacing(e){const t=e.length;let i,n;if(t<2)return!1;for(n=e[0],i=1;i<t;++i)if(e[i]-e[i-1]!==n)return!1;return n}const reverseAlign=e=>"left"===e?"right":"right"===e?"left":e,offsetFromEdge=(e,t,i)=>"top"===t||"left"===t?e[t]+i:e[t]-i,getTicksLimit=(e,t)=>Math.min(t||e,e);function sample(e,t){const i=[],n=e.length/t,r=e.length;let a=0;for(;a<r;a+=n)i.push(e[Math.floor(a)]);return i}function getPixelForGridLine(e,t,i){const n=e.ticks.length,r=Math.min(t,n-1),a=e._startPixel,s=e._endPixel,o=1e-6;let l,c=e.getPixelForTick(r);if(!(i&&(l=1===n?Math.max(c-a,s-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(r-1))/2,c+=r<t?l:-l,c<a-o||c>s+o)))return c}function garbageCollect(e,t){each(e,e=>{const i=e.gc,n=i.length/2;let r;if(n>t){for(r=0;r<n;++r)delete e.data[i[r]];i.splice(0,n)}})}function getTickMarkLength(e){return e.drawTicks?e.tickLength:0}function getTitleHeight(e,t){if(!e.display)return 0;const i=toFont(e.font,t),n=toPadding(e.padding);return(isArray(e.text)?e.text.length:1)*i.lineHeight+n.height}function createScaleContext(e,t){return createContext(e,{scale:t,type:"scale"})}function createTickContext(e,t,i){return createContext(e,{tick:i,index:t,type:"tick"})}function titleAlign(e,t,i){let n=_toLeftRightCenter(e);return(i&&"right"!==t||!i&&"right"===t)&&(n=reverseAlign(n)),n}function titleArgs(e,t,i,n){const{top:r,left:a,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:h}=l;let p,u,d,f=0;const m=s-r,g=o-a;if(e.isHorizontal()){if(u=_alignStartEnd(n,a,o),isObject$1(i)){const e=Object.keys(i)[0],n=i[e];d=h[e].getPixelForValue(n)+m-t}else d="center"===i?(c.bottom+c.top)/2+m-t:offsetFromEdge(e,i,t);p=o-a}else{if(isObject$1(i)){const e=Object.keys(i)[0],n=i[e];u=h[e].getPixelForValue(n)-g+t}else u="center"===i?(c.left+c.right)/2-g+t:offsetFromEdge(e,i,t);d=_alignStartEnd(n,s,r),f="left"===i?-HALF_PI:HALF_PI}return{titleX:u,titleY:d,maxWidth:p,rotation:f}}class Scale extends Element{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:n}=this;return e=finiteOrDefault(e,Number.POSITIVE_INFINITY),t=finiteOrDefault(t,Number.NEGATIVE_INFINITY),i=finiteOrDefault(i,Number.POSITIVE_INFINITY),n=finiteOrDefault(n,Number.NEGATIVE_INFINITY),{min:finiteOrDefault(e,i),max:finiteOrDefault(t,n),minDefined:isNumberFinite(e),maxDefined:isNumberFinite(t)}}getMinMax(e){let t,{min:i,max:n,minDefined:r,maxDefined:a}=this.getUserBounds();if(r&&a)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let o=0,l=s.length;o<l;++o)t=s[o].controller.getMinMax(this,e),r||(i=Math.min(i,t.min)),a||(n=Math.max(n,t.max));return i=a&&i>n?n:i,n=r&&i>n?i:n,{min:finiteOrDefault(i,finiteOrDefault(n,i)),max:finiteOrDefault(n,finiteOrDefault(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){callback(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:n,grace:r,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_addGrace(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=s<this.ticks.length;this._convertTicksToLabels(o?sample(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=autoSkip(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,i=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,i=!i),this._startPixel=e,this._endPixel=t,this._reversePixels=i,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){callback(this.options.afterUpdate,[this])}beforeSetDimensions(){callback(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(){callback(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),callback(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){callback(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let i,n,r;for(i=0,n=e.length;i<n;i++)r=e[i],r.label=callback(t.callback,[r.value,i,e],this)}afterTickToLabelConversion(){callback(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){callback(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,i=getTicksLimit(this.ticks.length,e.ticks.maxTicksLimit),n=t.minRotation||0,r=t.maxRotation;let a,s,o,l=n;if(!this._isVisible()||!t.display||n>=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,p=c.highest.height,u=_limitValue(this.chart.width-h,0,this.maxWidth);a=e.offset?this.maxWidth/i:u/(i-1),h+6>a&&(a=u/(i-(e.offset?.5:1)),s=this.maxHeight-getTickMarkLength(e.grid)-t.padding-getTitleHeight(e.title,this.chart.options.font),o=Math.sqrt(h*h+p*p),l=toDegrees(Math.min(Math.asin(_limitValue((c.highest.height+6)/a,-1,1)),Math.asin(_limitValue(s/o,-1,1))-Math.asin(_limitValue(p/o,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){callback(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:n,grid:r}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const a=getTitleHeight(n,t.options.font);if(s?(e.width=this.maxWidth,e.height=getTickMarkLength(r)+a):(e.height=this.maxHeight,e.width=getTickMarkLength(r)+a),i.display&&this.ticks.length){const{first:t,last:n,widest:r,highest:a}=this._getLabelSizes(),o=2*i.padding,l=toRadians(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const t=i.mirror?0:h*r.width+c*a.height;e.height=Math.min(this.maxHeight,e.height+t+o)}else{const t=i.mirror?0:c*r.width+h*a.height;e.width=Math.min(this.maxWidth,e.width+t+o)}this._calculatePadding(t,n,h,c)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,n){const{ticks:{align:r,padding:a},position:s}=this.options,o=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;o?l?(h=n*e.width,p=i*t.height):(h=i*e.height,p=n*t.width):"start"===r?p=t.width:"end"===r?h=e.width:"inner"!==r&&(h=e.width/2,p=t.width/2),this.paddingLeft=Math.max((h-s+a)*this.width/(this.width-s),0),this.paddingRight=Math.max((p-c+a)*this.width/(this.width-c),0)}else{let i=t.height/2,n=e.height/2;"start"===r?(i=0,n=e.height):"end"===r&&(i=t.height,n=0),this.paddingTop=i+a,this.paddingBottom=n+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(){callback(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,i=e.length;t<i;t++)isNullOrUndef(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=sample(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,i){const{ctx:n,_longestTextCache:r}=this,a=[],s=[],o=Math.floor(t/getTicksLimit(t,i));let l,c,h,p,u,d,f,m,g,v,y,b=0,x=0;for(l=0;l<t;l+=o){if(p=e[l].label,u=this._resolveTickFontOptions(l),n.font=d=u.string,f=r[d]=r[d]||{data:{},gc:[]},m=u.lineHeight,g=v=0,isNullOrUndef(p)||isArray(p)){if(isArray(p))for(c=0,h=p.length;c<h;++c)y=p[c],isNullOrUndef(y)||isArray(y)||(g=_measureText(n,f.data,f.gc,g,y),v+=m)}else g=_measureText(n,f.data,f.gc,g,p),v=m;a.push(g),s.push(v),b=Math.max(g,b),x=Math.max(v,x)}garbageCollect(r,t);const _=a.indexOf(b),S=s.indexOf(x),w=e=>({width:a[e]||0,height:s[e]||0});return{first:w(0),last:w(t-1),widest:w(_),highest:w(S),widths:a,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return _int16Range(this._alignToPixels?_alignPixel(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const i=t[e];return i.$context||(i.$context=createTickContext(this.getContext(),e,i))}return this.$context||(this.$context=createScaleContext(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=toRadians(this.labelRotation),i=Math.abs(Math.cos(t)),n=Math.abs(Math.sin(t)),r=this._getLabelSizes(),a=e.autoSkipPadding||0,s=r?r.widest.width+a:0,o=r?r.highest.height+a:0;return this.isHorizontal()?o*i>s*n?s/i:o/n:o*n<s*i?o/i:s/n}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,i=this.chart,n=this.options,{grid:r,position:a,border:s}=n,o=r.offset,l=this.isHorizontal(),c=this.ticks.length+(o?1:0),h=getTickMarkLength(r),p=[],u=s.setContext(this.getContext()),d=u.display?u.width:0,f=d/2,m=function(e){return _alignPixel(i,e,d)};let g,v,y,b,x,_,S,w,C,P,E,k;if("top"===a)g=m(this.bottom),_=this.bottom-h,w=g-f,P=m(e.top)+f,k=e.bottom;else if("bottom"===a)g=m(this.top),P=e.top,k=m(e.bottom)-f,_=g+f,w=this.top+h;else if("left"===a)g=m(this.right),x=this.right-h,S=g-f,C=m(e.left)+f,E=e.right;else if("right"===a)g=m(this.left),C=e.left,E=m(e.right)-f,x=g+f,S=this.left+h;else if("x"===t){if("center"===a)g=m((e.top+e.bottom)/2+.5);else if(isObject$1(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}P=e.top,k=e.bottom,_=g+f,w=_+h}else if("y"===t){if("center"===a)g=m((e.left+e.right)/2);else if(isObject$1(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}x=g-f,S=x-h,C=e.left,E=e.right}const A=valueOrDefault(n.ticks.maxTicksLimit,c),T=Math.max(1,Math.ceil(c/A));for(v=0;v<c;v+=T){const e=this.getContext(v),t=r.setContext(e),n=s.setContext(e),a=t.lineWidth,c=t.color,h=n.dash||[],u=n.dashOffset,d=t.tickWidth,f=t.tickColor,m=t.tickBorderDash||[],g=t.tickBorderDashOffset;y=getPixelForGridLine(this,v,o),void 0!==y&&(b=_alignPixel(i,y,a),l?x=S=C=E=b:_=w=P=k=b,p.push({tx1:x,ty1:_,tx2:S,ty2:w,x1:C,y1:P,x2:E,y2:k,width:a,color:c,borderDash:h,borderDashOffset:u,tickWidth:d,tickColor:f,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=c,this._borderValue=g,p}_computeLabelItems(e){const t=this.axis,i=this.options,{position:n,ticks:r}=i,a=this.isHorizontal(),s=this.ticks,{align:o,crossAlign:l,padding:c,mirror:h}=r,p=getTickMarkLength(i.grid),u=p+c,d=h?-c:u,f=-toRadians(this.labelRotation),m=[];let g,v,y,b,x,_,S,w,C,P,E,k,A="middle";if("top"===n)_=this.bottom-d,S=this._getXAxisLabelAlignment();else if("bottom"===n)_=this.top+d,S=this._getXAxisLabelAlignment();else if("left"===n){const e=this._getYAxisLabelAlignment(p);S=e.textAlign,x=e.x}else if("right"===n){const e=this._getYAxisLabelAlignment(p);S=e.textAlign,x=e.x}else if("x"===t){if("center"===n)_=(e.top+e.bottom)/2+u;else if(isObject$1(n)){const e=Object.keys(n)[0],t=n[e];_=this.chart.scales[e].getPixelForValue(t)+u}S=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===n)x=(e.left+e.right)/2-u;else if(isObject$1(n)){const e=Object.keys(n)[0],t=n[e];x=this.chart.scales[e].getPixelForValue(t)}S=this._getYAxisLabelAlignment(p).textAlign}"y"===t&&("start"===o?A="top":"end"===o&&(A="bottom"));const T=this._getLabelSizes();for(g=0,v=s.length;g<v;++g){y=s[g],b=y.label;const e=r.setContext(this.getContext(g));w=this.getPixelForTick(g)+r.labelOffset,C=this._resolveTickFontOptions(g),P=C.lineHeight,E=isArray(b)?b.length:1;const t=E/2,i=e.color,o=e.textStrokeColor,c=e.textStrokeWidth;let p,u=S;if(a?(x=w,"inner"===S&&(u=g===v-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),k="top"===n?"near"===l||0!==f?-E*P+P/2:"center"===l?-T.highest.height/2-t*P+P:-T.highest.height+P/2:"near"===l||0!==f?P/2:"center"===l?T.highest.height/2-t*P:T.highest.height-E*P,h&&(k*=-1),0===f||e.showLabelBackdrop||(x+=P/2*Math.sin(f))):(_=w,k=(1-E)*P/2),e.showLabelBackdrop){const t=toPadding(e.backdropPadding),i=T.heights[g],n=T.widths[g];let r=k-t.top,a=0-t.left;switch(A){case"middle":r-=i/2;break;case"bottom":r-=i}switch(S){case"center":a-=n/2;break;case"right":a-=n;break;case"inner":g===v-1?a-=n:g>0&&(a-=n/2)}p={left:a,top:r,width:n+t.width,height:i+t.height,color:e.backdropColor}}m.push({label:b,font:C,textOffset:k,options:{rotation:f,color:i,strokeColor:o,strokeWidth:c,textAlign:u,textBaseline:A,translation:[x,_],backdrop:p}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-toRadians(this.labelRotation))return"top"===e?"left":"right";let i="center";return"start"===t.align?i="left":"end"===t.align?i="right":"inner"===t.align&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:i,mirror:n,padding:r}}=this.options,a=e+r,s=this._getLabelSizes().widest.width;let o,l;return"left"===t?n?(l=this.right+r,"near"===i?o="left":"center"===i?(o="center",l+=s/2):(o="right",l+=s)):(l=this.right-a,"near"===i?o="right":"center"===i?(o="center",l-=s/2):(o="left",l=this.left)):"right"===t?n?(l=this.left+r,"near"===i?o="right":"center"===i?(o="center",l-=s/2):(o="left",l-=s)):(l=this.left+a,"near"===i?o="left":"center"===i?(o="center",l+=s/2):(o="right",l=this.right)):o="right",{textAlign:o,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:i,top:n,width:r,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,n,r,a),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const i=this.ticks.findIndex(t=>t.value===e);if(i>=0){return t.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,a;const s=(e,t,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(e.x,e.y),i.lineTo(t.x,t.y),i.stroke(),i.restore())};if(t.display)for(r=0,a=n.length;r<a;++r){const e=n[r];t.drawOnChartArea&&s({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&s({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:i,grid:n}}=this,r=i.setContext(this.getContext()),a=i.display?r.width:0;if(!a)return;const s=n.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let l,c,h,p;this.isHorizontal()?(l=_alignPixel(e,this.left,a)-a/2,c=_alignPixel(e,this.right,s)+s/2,h=p=o):(h=_alignPixel(e,this.top,a)-a/2,p=_alignPixel(e,this.bottom,s)+s/2,l=c=o),t.save(),t.lineWidth=r.width,t.strokeStyle=r.color,t.beginPath(),t.moveTo(l,h),t.lineTo(c,p),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,i=this._computeLabelArea();i&&clipArea(t,i);const n=this.getLabelItems(e);for(const e of n){const i=e.options,n=e.font;renderText(t,e.label,0,e.textOffset,n,i)}i&&unclipArea(t)}drawTitle(){const{ctx:e,options:{position:t,title:i,reverse:n}}=this;if(!i.display)return;const r=toFont(i.font),a=toPadding(i.padding),s=i.align;let o=r.lineHeight/2;"bottom"===t||"center"===t||isObject$1(t)?(o+=a.bottom,isArray(i.text)&&(o+=r.lineHeight*(i.text.length-1))):o+=a.top;const{titleX:l,titleY:c,maxWidth:h,rotation:p}=titleArgs(this,o,t,s);renderText(e,i.text,0,0,r,{color:i.color,maxWidth:h,rotation:p,textAlign:titleAlign(s,t,n),textBaseline:"middle",translation:[l,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,i=valueOrDefault(e.grid&&e.grid.z,-1),n=valueOrDefault(e.border&&e.border.z,0);return this._isVisible()&&this.draw===Scale.prototype.draw?[{z:i,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,a;for(r=0,a=t.length;r<a;++r){const a=t[r];a[i]!==this.id||e&&a.type!==e||n.push(a)}return n}_resolveTickFontOptions(e){return toFont(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class TypedRegistry{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let i;isIChartComponent(t)&&(i=this.register(t));const n=this.items,r=e.id,a=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in n||(n[r]=e,registerDefaults(e,a,i),this.override&&defaults.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const t=this.items,i=e.id,n=this.scope;i in t&&delete t[i],n&&i in defaults[n]&&(delete defaults[n][i],this.override&&delete overrides[i])}}function registerDefaults(e,t,i){const n=merge(Object.create(null),[i?defaults.get(i):{},defaults.get(t),e.defaults]);defaults.set(t,n),e.defaultRoutes&&routeDefaults(t,e.defaultRoutes),e.descriptors&&defaults.describe(t,e.descriptors)}function routeDefaults(e,t){Object.keys(t).forEach(i=>{const n=i.split("."),r=n.pop(),a=[e].concat(n).join("."),s=t[i].split("."),o=s.pop(),l=s.join(".");defaults.route(a,r,l,o)})}function isIChartComponent(e){return"id"in e&&"defaults"in e}class Registry{constructor(){this.controllers=new TypedRegistry(DatasetController,"datasets",!0),this.elements=new TypedRegistry(Element,"elements"),this.plugins=new TypedRegistry(Object,"plugins"),this.scales=new TypedRegistry(Scale,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(t=>{const n=i||this._getRegistryForType(t);i||n.isForType(t)||n===this.plugins&&t.id?this._exec(e,n,t):each(t,t=>{const n=i||this._getRegistryForType(t);this._exec(e,n,t)})})}_exec(e,t,i){const n=_capitalize(e);callback(i["before"+n],[],i),t[e](i),callback(i["after"+n],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){const n=t.get(e);if(void 0===n)throw new Error('"'+e+'" is not a registered '+i+".");return n}}var registry=new Registry;class PluginService{constructor(){this._init=void 0}notify(e,t,i,n){if("beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),void 0===this._init)return;const r=n?this._descriptors(e).filter(n):this._descriptors(e),a=this._notify(r,e,t,i);return"afterDestroy"===t&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),a}_notify(e,t,i,n){n=n||{};for(const r of e){const e=r.plugin;if(!1===callback(e[i],[t,n,r.options],e)&&n.cancelable)return!1}return!0}invalidate(){isNullOrUndef(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,n=valueOrDefault(i.options&&i.options.plugins,{}),r=allPlugins(i);return!1!==n||t?createDescriptors(e,r,n,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,n=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(n(t,i),e,"stop"),this._notify(n(i,t),e,"start")}}function allPlugins(e){const t={},i=[],n=Object.keys(registry.plugins.items);for(let e=0;e<n.length;e++)i.push(registry.getPlugin(n[e]));const r=e.plugins||[];for(let e=0;e<r.length;e++){const n=r[e];-1===i.indexOf(n)&&(i.push(n),t[n.id]=!0)}return{plugins:i,localIds:t}}function getOpts(e,t){return t||!1!==e?!0===e?{}:e:null}function createDescriptors(e,{plugins:t,localIds:i},n,r){const a=[],s=e.getContext();for(const o of t){const t=o.id,l=getOpts(n[t],r);null!==l&&a.push({plugin:o,options:pluginOpts(e.config,{plugin:o,local:i[t]},l,s)})}return a}function pluginOpts(e,{plugin:t,local:i},n,r){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(n,a);return i&&t.defaults&&s.push(t.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function getIndexAxis(e,t){const i=defaults.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||i.indexAxis||"x"}function getAxisFromDefaultScaleID(e,t){let i=e;return"_index_"===e?i=t:"_value_"===e&&(i="x"===t?"y":"x"),i}function getDefaultScaleIDFromAxis(e,t){return e===t?"_index_":"_value_"}function idMatchesAxis(e){if("x"===e||"y"===e||"r"===e)return e}function axisFromPosition(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function determineAxis(e,...t){if(idMatchesAxis(e))return e;for(const i of t){const t=i.axis||axisFromPosition(i.position)||e.length>1&&idMatchesAxis(e[0].toLowerCase());if(t)return t}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function getAxisFromDataset(e,t,i){if(i[t+"AxisID"]===e)return{axis:t}}function retrieveAxisFromDatasets(e,t){if(t.data&&t.data.datasets){const i=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(i.length)return getAxisFromDataset(e,"x",i[0])||getAxisFromDataset(e,"y",i[0])}return{}}function mergeScaleConfig(e,t){const i=overrides[e.type]||{scales:{}},n=t.scales||{},r=getIndexAxis(e.type,t),a=Object.create(null);return Object.keys(n).forEach(t=>{const s=n[t];if(!isObject$1(s))return console.error(`Invalid scale configuration for scale: ${t}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const o=determineAxis(t,s,retrieveAxisFromDatasets(t,e),defaults.scales[s.type]),l=getDefaultScaleIDFromAxis(o,r),c=i.scales||{};a[t]=mergeIf(Object.create(null),[{axis:o},s,c[o],c[l]])}),e.data.datasets.forEach(i=>{const r=i.type||e.type,s=i.indexAxis||getIndexAxis(r,t),o=(overrides[r]||{}).scales||{};Object.keys(o).forEach(e=>{const t=getAxisFromDefaultScaleID(e,s),r=i[t+"AxisID"]||t;a[r]=a[r]||Object.create(null),mergeIf(a[r],[{axis:t},n[r],o[e]])})}),Object.keys(a).forEach(e=>{const t=a[e];mergeIf(t,[defaults.scales[t.type],defaults.scale])}),a}function initOptions(e){const t=e.options||(e.options={});t.plugins=valueOrDefault(t.plugins,{}),t.scales=mergeScaleConfig(e,t)}function initData(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}function initConfig(e){return(e=e||{}).data=initData(e.data),initOptions(e),e}const keyCache=new Map,keysCached=new Set;function cachedKeys(e,t){let i=keyCache.get(e);return i||(i=t(),keyCache.set(e,i),keysCached.add(i)),i}const addIfFound=(e,t,i)=>{const n=resolveObjectKey(t,i);void 0!==n&&e.add(n)};class Config{constructor(e){this._config=initConfig(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=initData(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),initOptions(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return cachedKeys(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return cachedKeys(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return cachedKeys(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id;return cachedKeys(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let n=i.get(e);return n&&!t||(n=new Map,i.set(e,n)),n}getOptionScopes(e,t,i){const{options:n,type:r}=this,a=this._cachedScopes(e,i),s=a.get(t);if(s)return s;const o=new Set;t.forEach(t=>{e&&(o.add(e),t.forEach(t=>addIfFound(o,e,t))),t.forEach(e=>addIfFound(o,n,e)),t.forEach(e=>addIfFound(o,overrides[r]||{},e)),t.forEach(e=>addIfFound(o,defaults,e)),t.forEach(e=>addIfFound(o,descriptors,e))});const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),keysCached.has(t)&&a.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,overrides[t]||{},defaults.datasets[t]||{},{type:t},defaults,descriptors]}resolveNamedOptions(e,t,i,n=[""]){const r={$shared:!0},{resolver:a,subPrefixes:s}=getResolver(this._resolverCache,e,n);let o=a;if(needContext(a,t)){r.$shared=!1;o=_attachContext(a,i=isFunction(i)?i():i,this.createResolver(e,i,s))}for(const e of t)r[e]=o[e];return r}createResolver(e,t,i=[""],n){const{resolver:r}=getResolver(this._resolverCache,e,i);return isObject$1(t)?_attachContext(r,t,void 0,n):r}}function getResolver(e,t,i){let n=e.get(t);n||(n=new Map,e.set(t,n));const r=i.join();let a=n.get(r);if(!a){a={resolver:_createResolver(t,i),subPrefixes:i.filter(e=>!e.toLowerCase().includes("hover"))},n.set(r,a)}return a}const hasFunction=e=>isObject$1(e)&&Object.getOwnPropertyNames(e).some(t=>isFunction(e[t]));function needContext(e,t){const{isScriptable:i,isIndexable:n}=_descriptors(e);for(const r of t){const t=i(r),a=n(r),s=(a||t)&&e[r];if(t&&(isFunction(s)||hasFunction(s))||a&&isArray(s))return!0}return!1}var version="4.5.1";const KNOWN_POSITIONS=["top","bottom","left","right","chartArea"];function positionIsHorizontal(e,t){return"top"===e||"bottom"===e||-1===KNOWN_POSITIONS.indexOf(e)&&"x"===t}function compare2Level(e,t){return function(i,n){return i[e]===n[e]?i[t]-n[t]:i[e]-n[e]}}function onAnimationsComplete(e){const t=e.chart,i=t.options.animation;t.notifyPlugins("afterRender"),callback(i&&i.onComplete,[e],t)}function onAnimationProgress(e){const t=e.chart,i=t.options.animation;callback(i&&i.onProgress,[e],t)}function getCanvas(e){return _isDomSupported()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const instances={},getChart=e=>{const t=getCanvas(e);return Object.values(instances).filter(e=>e.canvas===t).pop()};function moveNumericKeys(e,t,i){const n=Object.keys(e);for(const r of n){const n=+r;if(n>=t){const a=e[r];delete e[r],(i>0||n>t)&&(e[n+i]=a)}}}function determineLastEvent(e,t,i,n){return i&&"mouseout"!==e.type?n?t:e:null}class Chart{static defaults=defaults;static instances=instances;static overrides=overrides;static registry=registry;static version=version;static getChart=getChart;static register(...e){registry.add(...e),invalidatePlugins()}static unregister(...e){registry.remove(...e),invalidatePlugins()}constructor(e,t){const i=this.config=new Config(t),n=getCanvas(e),r=getChart(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||_detectPlatform(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,a.aspectRatio),o=s&&s.canvas,l=o&&o.height,c=o&&o.width;this.id=uid(),this.ctx=s,this.canvas=o,this.width=c,this.height=l,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 PluginService,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=debounce(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],instances[this.id]=this,s&&o?(animator.listen(this,"complete",onAnimationsComplete),animator.listen(this,"progress",onAnimationProgress),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:n,_aspectRatio:r}=this;return isNullOrUndef(e)?t&&r?r:n?i/n:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return registry}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return clearCanvas(this.canvas,this.ctx),this}stop(){return animator.stop(this),this}resize(e,t){animator.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,e,t,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,retinaScale(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),callback(i.onResize,[this,a],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){each(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,n=Object.keys(i).reduce((e,t)=>(e[t]=!1,e),{});let r=[];t&&(r=r.concat(Object.keys(t).map(e=>{const i=t[e],n=determineAxis(e,i),r="r"===n,a="x"===n;return{options:i,dposition:r?"chartArea":a?"bottom":"left",dtype:r?"radialLinear":a?"category":"linear"}}))),each(r,t=>{const r=t.options,a=r.id,s=determineAxis(a,r),o=valueOrDefault(r.type,t.dtype);void 0!==r.position&&positionIsHorizontal(r.position,s)===positionIsHorizontal(t.dposition)||(r.position=t.dposition),n[a]=!0;let l=null;if(a in i&&i[a].type===o)l=i[a];else{l=new(registry.getScale(o))({id:a,type:o,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,e)}),each(n,(e,t)=>{e||delete i[t]}),each(i,e=>{layouts.configure(this,e,e.options),layouts.addBox(this,e)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((e,t)=>e.index-t.index),i>t){for(let e=t;e<i;++e)this._destroyDatasetMeta(e);e.splice(t,i-t)}this._sortedMetasets=e.slice(0).sort(compare2Level("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,i)=>{0===t.filter(t=>t===e._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=t.length;i<n;i++){const n=t[i];let r=this.getDatasetMeta(i);const a=n.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=a,r.indexAxis=n.indexAxis||getIndexAxis(a,this.options),r.order=n.order||0,r.index=i,r.label=""+n.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const t=registry.getController(a),{datasetElementType:n,dataElementType:s}=defaults.datasets[a];Object.assign(t,{dataElementType:registry.getElement(s),datasetElementType:n&®istry.getElement(n)}),r.controller=new t(this,i),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){each(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let e=0,t=this.data.datasets.length;e<t;e++){const{controller:t}=this.getDatasetMeta(e),i=!n&&-1===r.indexOf(t);t.buildOrUpdateElements(i),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),n||each(r,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(compare2Level("z","_idx"));const{_active:s,_lastEvent:o}=this;o?this._eventHandler(o,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){each(this.scales,e=>{layouts.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);setsEqual(t,i)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:r}of t){moveNumericKeys(e,n,"_removeElements"===i?-r:r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+","+e.splice(1).join(","))),n=i(0);for(let e=1;e<t;e++)if(!setsEqual(n,i(e)))return;return Array.from(n).map(e=>e.split(",")).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;layouts.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],each(this.boxes,e=>{i&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,isFunction(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const i=this.getDatasetMeta(e),n={meta:i,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(t),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(animator.has(this)?this.attached&&!animator.running(this)&&animator.start(this):(this.draw(),onAnimationsComplete({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,i=[];let n,r;for(n=0,r=t.length;n<r;++n){const r=t[n];e&&!r.visible||i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i={meta:e,index:e.index,cancelable:!0},n=getDatasetClipArea(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(n&&clipArea(t,n),e.controller.draw(),n&&unclipArea(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return _isPointInArea(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,n){const r=Interaction.modes[t];return"function"==typeof r?r(this,e,i,n):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let n=i.filter(e=>e&&e._dataset===t).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=createContext(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return"boolean"==typeof i.hidden?!i.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const n=i?"show":"hide",r=this.getDatasetMeta(e),a=r.controller._resolveAnimations(void 0,n);defined(t)?(r.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),a.update(r,{visible:i}),this.update(t=>t.datasetIndex===e?n:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),animator.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),clearCanvas(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete instances[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,i=(i,n)=>{t.addEventListener(this,i,n),e[i]=n},n=(e,t,i)=>{e.offsetX=t,e.offsetY=i,this._eventHandler(e)};each(this.options.events,e=>i(e,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(i,n)=>{t.addEventListener(this,i,n),e[i]=n},n=(i,n)=>{e[i]&&(t.removeEventListener(this,i,n),delete e[i])},r=(e,t)=>{this.canvas&&this.resize(e,t)};let a;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",a)};a=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},t.isAttached(this.canvas)?s():a()}unbindEvents(){each(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},each(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const n=i?"set":"remove";let r,a,s,o;for("dataset"===t&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,o=e.length;s<o;++s){a=e[s];const t=a&&this.getDatasetMeta(a.datasetIndex).controller;t&&t[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],i=e.map(({datasetIndex:e,index:t})=>{const i=this.getDatasetMeta(e);if(!i)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:i.data[t],index:t}});!_elementsEqual(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}isPluginEnabled(e){return 1===this._plugins._cache.filter(t=>t.plugin.id===e).length}_updateHoverStyles(e,t,i){const n=this.options.hover,r=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=r(t,e),s=i?e:r(e,t);a.length&&this.updateHoverStyle(a,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},n=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:n=[],options:r}=this,a=t,s=this._getActiveElements(e,n,i,a),o=_isClickEvent(e),l=determineLastEvent(e,this._lastEvent,i,o);i&&(this._lastEvent=null,callback(r.onHover,[e,s,this],this),o&&callback(r.onClick,[e,s,this],this));const c=!_elementsEqual(s,n);return(c||t)&&(this._active=s,this._updateHoverStyles(s,n,t)),this._lastEvent=l,c}_getActiveElements(e,t,i,n){if("mouseout"===e.type)return[];if(!i)return t;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,n)}}function invalidatePlugins(){return each(Chart.instances,e=>e._plugins.invalidate())}function clipSelf(e,t,i){const{startAngle:n,x:r,y:a,outerRadius:s,innerRadius:o,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,p=Math.min(c/s,_normalizeAngle(n-i));if(e.beginPath(),e.arc(r,a,s-c/2,n+p/2,i-p/2),o>0){const t=Math.min(c/o,_normalizeAngle(n-i));e.arc(r,a,o+c/2,i-t/2,n+t/2,!0)}else{const t=Math.min(c/2,s*_normalizeAngle(n-i));if("round"===h)e.arc(r,a,t,i-PI/2,n+PI/2,!0);else if("bevel"===h){const s=2*t*t,o=-s*Math.cos(i+PI/2)+r,l=-s*Math.sin(i+PI/2)+a,c=s*Math.cos(n+PI/2)+r,h=s*Math.sin(n+PI/2)+a;e.lineTo(o,l),e.lineTo(c,h)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function clipArc(e,t,i){const{startAngle:n,pixelMargin:r,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=r/o;e.beginPath(),e.arc(a,s,o,n-c,i+c),l>r?(c=r/l,e.arc(a,s,l,i+c,n-c,!0)):e.arc(a,s,r,i+HALF_PI,n-HALF_PI),e.closePath(),e.clip()}function toRadiusCorners(e){return _readValueToProps(e,["outerStart","outerEnd","innerStart","innerEnd"])}function parseBorderRadius$1(e,t,i,n){const r=toRadiusCorners(e.options.borderRadius),a=(i-t)/2,s=Math.min(a,n*t/2),o=e=>{const t=(i-Math.min(a,e))*n/2;return _limitValue(e,0,Math.min(a,t))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:_limitValue(r.innerStart,0,s),innerEnd:_limitValue(r.innerEnd,0,s)}}function rThetaToXY(e,t,i,n){return{x:i+e*Math.cos(t),y:n+e*Math.sin(t)}}function pathArc(e,t,i,n,r,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:h}=t,p=Math.max(t.outerRadius+n+i-c,0),u=h>0?h+n+i+c:0;let d=0;const f=r-l;if(n){const e=((h>0?h-n:0)+(p>0?p-n:0))/2;d=(f-(0!==e?f*e/(e+n):f))/2}const m=(f-Math.max(.001,f*p-i/PI)/p)/2,g=l+m+d,v=r-m-d,{outerStart:y,outerEnd:b,innerStart:x,innerEnd:_}=parseBorderRadius$1(t,u,p,v-g),S=p-y,w=p-b,C=g+y/S,P=v-b/w,E=u+x,k=u+_,A=g+x/E,T=v-_/k;if(e.beginPath(),a){const t=(C+P)/2;if(e.arc(s,o,p,C,t),e.arc(s,o,p,t,P),b>0){const t=rThetaToXY(w,P,s,o);e.arc(t.x,t.y,b,P,v+HALF_PI)}const i=rThetaToXY(k,v,s,o);if(e.lineTo(i.x,i.y),_>0){const t=rThetaToXY(k,T,s,o);e.arc(t.x,t.y,_,v+HALF_PI,T+Math.PI)}const n=(v-_/u+(g+x/u))/2;if(e.arc(s,o,u,v-_/u,n,!0),e.arc(s,o,u,n,g+x/u,!0),x>0){const t=rThetaToXY(E,A,s,o);e.arc(t.x,t.y,x,A+Math.PI,g-HALF_PI)}const r=rThetaToXY(S,g,s,o);if(e.lineTo(r.x,r.y),y>0){const t=rThetaToXY(S,C,s,o);e.arc(t.x,t.y,y,g-HALF_PI,C)}}else{e.moveTo(s,o);const t=Math.cos(C)*p+s,i=Math.sin(C)*p+o;e.lineTo(t,i);const n=Math.cos(P)*p+s,r=Math.sin(P)*p+o;e.lineTo(n,r)}e.closePath()}function drawArc(e,t,i,n,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){pathArc(e,t,i,n,l,r);for(let t=0;t<a;++t)e.fill();isNaN(o)||(l=s+(o%TAU||TAU))}return pathArc(e,t,i,n,l,r),e.fill(),l}function drawBorder(e,t,i,n,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:p,borderDashOffset:u,borderRadius:d}=l,f="inner"===l.borderAlign;if(!c)return;e.setLineDash(p||[]),e.lineDashOffset=u,f?(e.lineWidth=2*c,e.lineJoin=h||"round"):(e.lineWidth=c,e.lineJoin=h||"bevel");let m=t.endAngle;if(a){pathArc(e,t,i,n,m,r);for(let t=0;t<a;++t)e.stroke();isNaN(o)||(m=s+(o%TAU||TAU))}f&&clipArc(e,t,m),l.selfJoin&&m-s>=PI&&0===d&&"miter"!==h&&clipSelf(e,t,m),a||(pathArc(e,t,i,n,m,r),e.stroke())}class ArcElement extends Element{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,i){const n=this.getProps(["x","y"],i),{angle:r,distance:a}=getAngleFromPoint(n,{x:e,y:t}),{startAngle:s,endAngle:o,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,u=valueOrDefault(h,o-s),d=_angleBetween(r,s,o)&&s!==o,f=u>=TAU||d,m=_isBetween(a,l+p,c+p);return f&&m}getCenterPoint(e){const{x:t,y:i,startAngle:n,endAngle:r,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:o,spacing:l}=this.options,c=(n+r)/2,h=(a+s+l+o)/2;return{x:t+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,n=(t.offset||0)/4,r=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=i>TAU?Math.floor(i/TAU):0,0===i||this.innerRadius<0||this.outerRadius<0)return;e.save();const s=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(s)*n,Math.sin(s)*n);const o=n*(1-Math.sin(Math.min(PI,i||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,drawArc(e,this,o,r,a),drawBorder(e,this,o,r,a),e.restore()}}function getBarBounds(e,t){const{x:i,y:n,base:r,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,h,p;return e.horizontal?(p=s/2,o=Math.min(i,r),l=Math.max(i,r),c=n-p,h=n+p):(p=a/2,o=i-p,l=i+p,c=Math.min(n,r),h=Math.max(n,r)),{left:o,top:c,right:l,bottom:h}}function skipOrLimit(e,t,i,n){return e?0:_limitValue(t,i,n)}function parseBorderWidth(e,t,i){const n=e.options.borderWidth,r=e.borderSkipped,a=toTRBL(n);return{t:skipOrLimit(r.top,a.top,0,i),r:skipOrLimit(r.right,a.right,0,t),b:skipOrLimit(r.bottom,a.bottom,0,i),l:skipOrLimit(r.left,a.left,0,t)}}function parseBorderRadius(e,t,i){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,a=toTRBLCorners(r),s=Math.min(t,i),o=e.borderSkipped,l=n||isObject$1(r);return{topLeft:skipOrLimit(!l||o.top||o.left,a.topLeft,0,s),topRight:skipOrLimit(!l||o.top||o.right,a.topRight,0,s),bottomLeft:skipOrLimit(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:skipOrLimit(!l||o.bottom||o.right,a.bottomRight,0,s)}}function boundingRects(e){const t=getBarBounds(e),i=t.right-t.left,n=t.bottom-t.top,r=parseBorderWidth(e,i/2,n/2),a=parseBorderRadius(e,i/2,n/2);return{outer:{x:t.left,y:t.top,w:i,h:n,radius:a},inner:{x:t.left+r.l,y:t.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function inRange(e,t,i,n){const r=null===t,a=null===i,s=e&&!(r&&a)&&getBarBounds(e,n);return s&&(r||_isBetween(t,s.left,s.right))&&(a||_isBetween(i,s.top,s.bottom))}function hasRadius(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function addNormalRectPath(e,t){e.rect(t.x,t.y,t.w,t.h)}function inflateRect(e,t,i={}){const n=e.x!==i.x?-t:0,r=e.y!==i.y?-t:0,a=(e.x+e.w!==i.x+i.w?t:0)-n,s=(e.y+e.h!==i.y+i.h?t:0)-r;return{x:e.x+n,y:e.y+r,w:e.w+a,h:e.h+s,radius:e.radius}}class BarElement extends Element{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:a}=boundingRects(this),s=hasRadius(a.radius)?addRoundedRectPath:addNormalRectPath;e.save(),a.w===r.w&&a.h===r.h||(e.beginPath(),s(e,inflateRect(a,t,r)),e.clip(),s(e,inflateRect(r,-t,a)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),s(e,inflateRect(r,t)),e.fillStyle=n,e.fill(),e.restore()}inRange(e,t,i){return inRange(this,e,t,i)}inXRange(e,t){return inRange(this,e,null,t)}inYRange(e,t){return inRange(this,null,e,t)}getCenterPoint(e){const{x:t,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(t+n)/2:t,y:r?i:(i+n)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}const getBoxSize=(e,t)=>{let{boxHeight:i=t,boxWidth:n=t}=e;return e.usePointStyle&&(i=Math.min(i,t),n=e.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(t,i)}},itemsEqual=(e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Legend extends Element{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,i){this.maxWidth=e,this.maxHeight=t,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=callback(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,i)=>e.sort(t,i,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const i=e.labels,n=toFont(i.font),r=n.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:o}=getBoxSize(i,r);let l,c;t.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,r,s,o)+10):(c=this.maxHeight,l=this._fitCols(a,n,s,o)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,i,n){const{ctx:r,maxWidth:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=e;r.textAlign="left",r.textBaseline="middle";let p=-1,u=-c;return this.legendItems.forEach((e,d)=>{const f=i+t/2+r.measureText(e.text).width;(0===d||l[l.length-1]+f+2*s>a)&&(h+=c,l[l.length-(d>0?0:1)]=0,u+=c,p++),o[d]={left:0,top:u,row:p,width:f,height:n},l[l.length-1]+=f+s}),h}_fitCols(e,t,i,n){const{ctx:r,maxHeight:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-e;let h=s,p=0,u=0,d=0,f=0;return this.legendItems.forEach((e,a)=>{const{itemWidth:m,itemHeight:g}=calculateItemSize(i,t,r,e,n);a>0&&u+g+2*s>c&&(h+=p+s,l.push({width:p,height:u}),d+=p+s,f++,p=u=0),o[a]={left:d,top:u,col:f,width:m,height:g},p=Math.max(p,m),u+=g+s}),h+=p,l.push({width:p,height:u}),h}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:i,labels:{padding:n},rtl:r}}=this,a=getRtlAdapter(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=_alignStartEnd(i,this.left+n,this.right-this.lineWidths[r]);for(const o of t)r!==o.row&&(r=o.row,s=_alignStartEnd(i,this.left+n,this.right-this.lineWidths[r])),o.top+=this.top+e+n,o.left=a.leftForLtr(a.x(s),o.width),s+=o.width+n}else{let r=0,s=_alignStartEnd(i,this.top+e+n,this.bottom-this.columnSizes[r].height);for(const o of t)o.col!==r&&(r=o.col,s=_alignStartEnd(i,this.top+e+n,this.bottom-this.columnSizes[r].height)),o.top=s,o.left+=this.left+n,o.left=a.leftForLtr(a.x(o.left),o.width),s+=o.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;clipArea(e,this),this._draw(),unclipArea(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:i,ctx:n}=this,{align:r,labels:a}=e,s=defaults.color,o=getRtlAdapter(e.rtl,this.left,this.width),l=toFont(a.font),{padding:c}=a,h=l.size,p=h/2;let u;this.drawTitle(),n.textAlign=o.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:d,boxHeight:f,itemHeight:m}=getBoxSize(a,h),g=this.isHorizontal(),v=this._computeTitleHeight();u=g?{x:_alignStartEnd(r,this.left+c,this.right-i[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:_alignStartEnd(r,this.top+v+c,this.bottom-t[0].height),line:0},overrideTextDirection(this.ctx,e.textDirection);const y=m+c;this.legendItems.forEach((b,x)=>{n.strokeStyle=b.fontColor,n.fillStyle=b.fontColor;const _=n.measureText(b.text).width,S=o.textAlign(b.textAlign||(b.textAlign=a.textAlign)),w=d+p+_;let C=u.x,P=u.y;o.setWidth(this.width),g?x>0&&C+w+c>this.right&&(P=u.y+=y,u.line++,C=u.x=_alignStartEnd(r,this.left+c,this.right-i[u.line])):x>0&&P+y>this.bottom&&(C=u.x=C+t[u.line].width+c,u.line++,P=u.y=_alignStartEnd(r,this.top+v+c,this.bottom-t[u.line].height));if(function(e,t,i){if(isNaN(d)||d<=0||isNaN(f)||f<0)return;n.save();const r=valueOrDefault(i.lineWidth,1);if(n.fillStyle=valueOrDefault(i.fillStyle,s),n.lineCap=valueOrDefault(i.lineCap,"butt"),n.lineDashOffset=valueOrDefault(i.lineDashOffset,0),n.lineJoin=valueOrDefault(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=valueOrDefault(i.strokeStyle,s),n.setLineDash(valueOrDefault(i.lineDash,[])),a.usePointStyle){const s={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},l=o.xPlus(e,d/2);drawPointLegend(n,s,l,t+p,a.pointStyleWidth&&d)}else{const a=t+Math.max((h-f)/2,0),s=o.leftForLtr(e,d),l=toTRBLCorners(i.borderRadius);n.beginPath(),Object.values(l).some(e=>0!==e)?addRoundedRectPath(n,{x:s,y:a,w:d,h:f,radius:l}):n.rect(s,a,d,f),n.fill(),0!==r&&n.stroke()}n.restore()}(o.x(C),P,b),C=_textX(S,C+d+p,g?C+w:this.right,e.rtl),function(e,t,i){renderText(n,i.text,e,t+m/2,l,{strikethrough:i.hidden,textAlign:o.textAlign(i.textAlign)})}(o.x(C),P,b),g)u.x+=w+c;else if("string"!=typeof b.text){const e=l.lineHeight;u.y+=calculateLegendItemHeight(b,e)+c}else u.y+=y}),restoreTextDirection(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,i=toFont(t.font),n=toPadding(t.padding);if(!t.display)return;const r=getRtlAdapter(e.rtl,this.left,this.width),a=this.ctx,s=t.position,o=i.size/2,l=n.top+o;let c,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),c=this.top+l,h=_alignStartEnd(e.align,h,this.right-p);else{const t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);c=l+_alignStartEnd(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const u=_alignStartEnd(s,h,h+p);a.textAlign=r.textAlign(_toLeftRightCenter(s)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=i.string,renderText(a,t.text,u,c,i)}_computeTitleHeight(){const e=this.options.title,t=toFont(e.font),i=toPadding(e.padding);return e.display?t.lineHeight+i.height:0}_getLegendItemAt(e,t){let i,n,r;if(_isBetween(e,this.left,this.right)&&_isBetween(t,this.top,this.bottom))for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(n=r[i],_isBetween(e,n.left,n.left+n.width)&&_isBetween(t,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(e){const t=this.options;if(!isListened(e.type,t))return;const i=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const n=this._hoveredItem,r=itemsEqual(n,i);n&&!r&&callback(t.onLeave,[e,n,this],this),this._hoveredItem=i,i&&!r&&callback(t.onHover,[e,i,this],this)}else i&&callback(t.onClick,[e,i,this],this)}}function calculateItemSize(e,t,i,n,r){return{itemWidth:calculateItemWidth(n,e,t,i),itemHeight:calculateItemHeight(r,n,t.lineHeight)}}function calculateItemWidth(e,t,i,n){let r=e.text;return r&&"string"!=typeof r&&(r=r.reduce((e,t)=>e.length>t.length?e:t)),t+i.size/2+n.measureText(r).width}function calculateItemHeight(e,t,i){let n=e;return"string"!=typeof t.text&&(n=calculateLegendItemHeight(t,i)),n}function calculateLegendItemHeight(e,t){return t*(e.text?e.text.length:0)}function isListened(e,t){return!("mousemove"!==e&&"mouseout"!==e||!t.onHover&&!t.onLeave)||!(!t.onClick||"click"!==e&&"mouseup"!==e)}var plugin_legend={id:"legend",_element:Legend,start(e,t,i){const n=e.legend=new Legend({ctx:e.ctx,options:i,chart:e});layouts.configure(e,n,i),layouts.addBox(e,n)},stop(e){layouts.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,i){const n=e.legend;layouts.configure(e,n,i),n.options=i},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,i){const n=t.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),t.hidden=!0):(r.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{const l=e.controller.getStyle(i?0:void 0),c=toPadding(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:n||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:s&&(o||l.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const positioners={average(e){if(!e.length)return!1;let t,i,n=new Set,r=0,a=0;for(t=0,i=e.length;t<i;++t){const i=e[t].element;if(i&&i.hasValue()){const e=i.tooltipPosition();n.add(e.x),r+=e.y,++a}}if(0===a||0===n.size)return!1;return{x:[...n].reduce((e,t)=>e+t)/n.size,y:r/a}},nearest(e,t){if(!e.length)return!1;let i,n,r,a=t.x,s=t.y,o=Number.POSITIVE_INFINITY;for(i=0,n=e.length;i<n;++i){const n=e[i].element;if(n&&n.hasValue()){const e=distanceBetweenPoints(t,n.getCenterPoint());e<o&&(o=e,r=n)}}if(r){const e=r.tooltipPosition();a=e.x,s=e.y}return{x:a,y:s}}};function pushOrConcat(e,t){return t&&(isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function splitNewlines(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function createTooltipItem(e,t){const{element:i,datasetIndex:n,index:r}=t,a=e.getDatasetMeta(n).controller,{label:s,value:o}=a.getLabelAndValue(r);return{chart:e,label:s,parsed:a.getParsed(r),raw:e.data.datasets[n].data[r],formattedValue:o,dataset:a.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function getTooltipSize(e,t){const i=e.chart.ctx,{body:n,footer:r,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=toFont(t.bodyFont),c=toFont(t.titleFont),h=toFont(t.footerFont),p=a.length,u=r.length,d=n.length,f=toPadding(t.padding);let m=f.height,g=0,v=n.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,p&&(m+=p*c.lineHeight+(p-1)*t.titleSpacing+t.titleMarginBottom),v){m+=d*(t.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(v-d)*l.lineHeight+(v-1)*t.bodySpacing}u&&(m+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let y=0;const b=function(e){g=Math.max(g,i.measureText(e).width+y)};return i.save(),i.font=c.string,each(e.title,b),i.font=l.string,each(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?s+2+t.boxPadding:0,each(n,e=>{each(e.before,b),each(e.lines,b),each(e.after,b)}),y=0,i.font=h.string,each(e.footer,b),i.restore(),g+=f.width,{width:g,height:m}}function determineYAlign(e,t){const{y:i,height:n}=t;return i<n/2?"top":i>e.height-n/2?"bottom":"center"}function doesNotFitWithAlign(e,t,i,n){const{x:r,width:a}=n,s=i.caretSize+i.caretPadding;return"left"===e&&r+a+s>t.width||("right"===e&&r-a-s<0||void 0)}function determineXAlign(e,t,i,n){const{x:r,width:a}=i,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return"center"===n?c=r<=(o+l)/2?"left":"right":r<=a/2?c="left":r>=s-a/2&&(c="right"),doesNotFitWithAlign(c,e,t,i)&&(c="center"),c}function determineAlignment(e,t,i){const n=i.yAlign||t.yAlign||determineYAlign(e,i);return{xAlign:i.xAlign||t.xAlign||determineXAlign(e,t,i,n),yAlign:n}}function alignX(e,t){let{x:i,width:n}=e;return"right"===t?i-=n:"center"===t&&(i-=n/2),i}function alignY(e,t,i){let{y:n,height:r}=e;return"top"===t?n+=i:n-="bottom"===t?r+i:r/2,n}function getBackgroundPoint(e,t,i,n){const{caretSize:r,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=i,c=r+a,{topLeft:h,topRight:p,bottomLeft:u,bottomRight:d}=toTRBLCorners(s);let f=alignX(t,o);const m=alignY(t,l,c);return"center"===l?"left"===o?f+=c:"right"===o&&(f-=c):"left"===o?f-=Math.max(h,u)+r:"right"===o&&(f+=Math.max(p,d)+r),{x:_limitValue(f,0,n.width-t.width),y:_limitValue(m,0,n.height-t.height)}}function getAlignedX(e,t,i){const n=toPadding(i.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-n.right:e.x+n.left}function getBeforeAfterBodyLines(e){return pushOrConcat([],splitNewlines(e))}function createTooltipContext(e,t,i){return createContext(e,{tooltip:t,tooltipItems:i,type:"tooltip"})}function overrideCallbacks(e,t){const i=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return i?e.override(i):e}const defaultCallbacks={beforeTitle:noop$1,title(e){if(e.length>0){const t=e[0],i=t.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return i[t.dataIndex]}return""},afterTitle:noop$1,beforeBody:noop$1,beforeLabel:noop$1,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const i=e.formattedValue;return isNullOrUndef(i)||(t+=i),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:noop$1,afterBody:noop$1,beforeFooter:noop$1,footer:noop$1,afterFooter:noop$1};function invokeCallbackWithFallback(e,t,i,n){const r=e[t].call(i,n);return void 0===r?defaultCallbacks[t].call(i,n):r}class Tooltip extends Element{static positioners=positioners;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&t.options.animation&&i.animations,r=new Animations(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=createTooltipContext(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,n=invokeCallbackWithFallback(i,"beforeTitle",this,e),r=invokeCallbackWithFallback(i,"title",this,e),a=invokeCallbackWithFallback(i,"afterTitle",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(n)),s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(a)),s}getBeforeBody(e,t){return getBeforeAfterBodyLines(invokeCallbackWithFallback(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:i}=t,n=[];return each(e,e=>{const t={before:[],lines:[],after:[]},r=overrideCallbacks(i,e);pushOrConcat(t.before,splitNewlines(invokeCallbackWithFallback(r,"beforeLabel",this,e))),pushOrConcat(t.lines,invokeCallbackWithFallback(r,"label",this,e)),pushOrConcat(t.after,splitNewlines(invokeCallbackWithFallback(r,"afterLabel",this,e))),n.push(t)}),n}getAfterBody(e,t){return getBeforeAfterBodyLines(invokeCallbackWithFallback(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:i}=t,n=invokeCallbackWithFallback(i,"beforeFooter",this,e),r=invokeCallbackWithFallback(i,"footer",this,e),a=invokeCallbackWithFallback(i,"afterFooter",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(n)),s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(a)),s}_createItems(e){const t=this._active,i=this.chart.data,n=[],r=[],a=[];let s,o,l=[];for(s=0,o=t.length;s<o;++s)l.push(createTooltipItem(this.chart,t[s]));return e.filter&&(l=l.filter((t,n,r)=>e.filter(t,n,r,i))),e.itemSort&&(l=l.sort((t,n)=>e.itemSort(t,n,i))),each(l,t=>{const i=overrideCallbacks(e.callbacks,t);n.push(invokeCallbackWithFallback(i,"labelColor",this,t)),r.push(invokeCallbackWithFallback(i,"labelPointStyle",this,t)),a.push(invokeCallbackWithFallback(i,"labelTextColor",this,t))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=l,l}update(e,t){const i=this.options.setContext(this.getContext()),n=this._active;let r,a=[];if(n.length){const e=positioners[i.position].call(this,n,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const t=this._size=getTooltipSize(this,i),s=Object.assign({},e,t),o=determineAlignment(this.chart,i,s),l=getBackgroundPoint(i,s,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,r={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,n){const r=this.getCaretPosition(e,i,n);t.lineTo(r.x1,r.y1),t.lineTo(r.x2,r.y2),t.lineTo(r.x3,r.y3)}getCaretPosition(e,t,i){const{xAlign:n,yAlign:r}=this,{caretSize:a,cornerRadius:s}=i,{topLeft:o,topRight:l,bottomLeft:c,bottomRight:h}=toTRBLCorners(s),{x:p,y:u}=e,{width:d,height:f}=t;let m,g,v,y,b,x;return"center"===r?(b=u+f/2,"left"===n?(m=p,g=m-a,y=b+a,x=b-a):(m=p+d,g=m+a,y=b-a,x=b+a),v=m):(g="left"===n?p+Math.max(o,c)+a:"right"===n?p+d-Math.max(l,h)-a:this.caretX,"top"===r?(y=u,b=y-a,m=g-a,v=g+a):(y=u+f,b=y+a,m=g+a,v=g-a),x=y),{x1:m,x2:g,x3:v,y1:y,y2:b,y3:x}}drawTitle(e,t,i){const n=this.title,r=n.length;let a,s,o;if(r){const l=getRtlAdapter(i.rtl,this.x,this.width);for(e.x=getAlignedX(this,i.titleAlign,i),t.textAlign=l.textAlign(i.titleAlign),t.textBaseline="middle",a=toFont(i.titleFont),s=i.titleSpacing,t.fillStyle=i.titleColor,t.font=a.string,o=0;o<r;++o)t.fillText(n[o],l.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+s,o+1===r&&(e.y+=i.titleMarginBottom-s)}}_drawColorBox(e,t,i,n,r){const a=this.labelColors[i],s=this.labelPointStyles[i],{boxHeight:o,boxWidth:l}=r,c=toFont(r.bodyFont),h=getAlignedX(this,"left",r),p=n.x(h),u=o<c.lineHeight?(c.lineHeight-o)/2:0,d=t.y+u;if(r.usePointStyle){const t={radius:Math.min(l,o)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=n.leftForLtr(p,l)+l/2,c=d+o/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,drawPoint(e,t,i,c),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,drawPoint(e,t,i,c)}else{e.lineWidth=isObject$1(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const t=n.leftForLtr(p,l),i=n.leftForLtr(n.xPlus(p,1),l-2),s=toTRBLCorners(a.borderRadius);Object.values(s).some(e=>0!==e)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,addRoundedRectPath(e,{x:t,y:d,w:l,h:o,radius:s}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),addRoundedRectPath(e,{x:i,y:d+1,w:l-2,h:o-2,radius:s}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(t,d,l,o),e.strokeRect(t,d,l,o),e.fillStyle=a.backgroundColor,e.fillRect(i,d+1,l-2,o-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:n}=this,{bodySpacing:r,bodyAlign:a,displayColors:s,boxHeight:o,boxWidth:l,boxPadding:c}=i,h=toFont(i.bodyFont);let p=h.lineHeight,u=0;const d=getRtlAdapter(i.rtl,this.x,this.width),f=function(i){t.fillText(i,d.x(e.x+u),e.y+p/2),e.y+=p+r},m=d.textAlign(a);let g,v,y,b,x,_,S;for(t.textAlign=a,t.textBaseline="middle",t.font=h.string,e.x=getAlignedX(this,m,i),t.fillStyle=i.bodyColor,each(this.beforeBody,f),u=s&&"right"!==m?"center"===a?l/2+c:l+2+c:0,b=0,_=n.length;b<_;++b){for(g=n[b],v=this.labelTextColors[b],t.fillStyle=v,each(g.before,f),y=g.lines,s&&y.length&&(this._drawColorBox(t,e,b,d,i),p=Math.max(h.lineHeight,o)),x=0,S=y.length;x<S;++x)f(y[x]),p=h.lineHeight;each(g.after,f)}u=0,p=h.lineHeight,each(this.afterBody,f),e.y-=r}drawFooter(e,t,i){const n=this.footer,r=n.length;let a,s;if(r){const o=getRtlAdapter(i.rtl,this.x,this.width);for(e.x=getAlignedX(this,i.footerAlign,i),e.y+=i.footerMarginTop,t.textAlign=o.textAlign(i.footerAlign),t.textBaseline="middle",a=toFont(i.footerFont),t.fillStyle=i.footerColor,t.font=a.string,s=0;s<r;++s)t.fillText(n[s],o.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+i.footerSpacing}}drawBackground(e,t,i,n){const{xAlign:r,yAlign:a}=this,{x:s,y:o}=e,{width:l,height:c}=i,{topLeft:h,topRight:p,bottomLeft:u,bottomRight:d}=toTRBLCorners(n.cornerRadius);t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.beginPath(),t.moveTo(s+h,o),"top"===a&&this.drawCaret(e,t,i,n),t.lineTo(s+l-p,o),t.quadraticCurveTo(s+l,o,s+l,o+p),"center"===a&&"right"===r&&this.drawCaret(e,t,i,n),t.lineTo(s+l,o+c-d),t.quadraticCurveTo(s+l,o+c,s+l-d,o+c),"bottom"===a&&this.drawCaret(e,t,i,n),t.lineTo(s+u,o+c),t.quadraticCurveTo(s,o+c,s,o+c-u),"center"===a&&"left"===r&&this.drawCaret(e,t,i,n),t.lineTo(s,o+h),t.quadraticCurveTo(s,o,s+h,o),t.closePath(),t.fill(),n.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=positioners[e.position].call(this,this._active,this._eventPosition);if(!i)return;const a=this._size=getTooltipSize(this,e),s=Object.assign({},i,this._size),o=determineAlignment(t,e,s),l=getBackgroundPoint(e,s,o,t);n._to===l.x&&r._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=a.width,this.height=a.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=toPadding(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(e.save(),e.globalAlpha=i,this.drawBackground(r,e,n,t),overrideTextDirection(e,t.textDirection),r.y+=a.top,this.drawTitle(r,e,t),this.drawBody(r,e,t),this.drawFooter(r,e,t),restoreTextDirection(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,n=e.map(({datasetIndex:e,index:t})=>{const i=this.chart.getDatasetMeta(e);if(!i)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:i.data[t],index:t}}),r=!_elementsEqual(i,n),a=this._positionChanged(n,t);(r||a)&&(this._active=n,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,r=this._active||[],a=this._getActiveElements(e,r,t,i),s=this._positionChanged(a,e),o=t||!_elementsEqual(a,r)||s;return o&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),o}_getActiveElements(e,t,i,n){const r=this.options;if("mouseout"===e.type)return[];if(!n)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index));const a=this.chart.getElementsAtEventForMode(e,r.mode,r,i);return r.reverse&&a.reverse(),a}_positionChanged(e,t){const{caretX:i,caretY:n,options:r}=this,a=positioners[r.position].call(this,e,t);return!1!==a&&(i!==a.x||n!==a.y)}}var plugin_tooltip={id:"tooltip",_element:Tooltip,positioners:positioners,afterInit(e,t,i){i&&(e.tooltip=new Tooltip({chart:e,options:i}))},beforeUpdate(e,t,i){e.tooltip&&e.tooltip.initialize(i)},reset(e,t,i){e.tooltip&&e.tooltip.initialize(i)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const i={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",i)}},afterEvent(e,t){if(e.tooltip){const i=t.replay;e.tooltip.handleEvent(t.event,i,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:defaultCallbacks},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const addIfString=(e,t,i,n)=>("string"==typeof t?(i=e.push(t)-1,n.unshift({index:i,label:t})):isNaN(t)&&(i=null),i);function findOrAddLabel(e,t,i,n){const r=e.indexOf(t);if(-1===r)return addIfString(e,t,i,n);return r!==e.lastIndexOf(t)?i:r}const validIndex=(e,t)=>null===e?null:_limitValue(Math.round(e),0,t);function _getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class CategoryScale extends Scale{static id="category";static defaults={ticks:{callback:_getLabelForValue}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:i,label:n}of t)e[i]===n&&e.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(isNullOrUndef(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:findOrAddLabel(i,e,valueOrDefault(t,e),this._addedLabels),validIndex(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(i=0),t||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===e&&t===r.length-1?r:r.slice(e,t+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=e;i<=t;i++)n.push({value:i});return n}getLabelForValue(e){return _getLabelForValue.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function generateTicks$1(e,t){const i=[],{bounds:n,step:r,min:a,max:s,precision:o,count:l,maxTicks:c,maxDigits:h,includeBounds:p}=e,u=r||1,d=c-1,{min:f,max:m}=t,g=!isNullOrUndef(a),v=!isNullOrUndef(s),y=!isNullOrUndef(l),b=(m-f)/(h+1);let x,_,S,w,C=niceNum((m-f)/d/u)*u;if(C<1e-14&&!g&&!v)return[{value:f},{value:m}];w=Math.ceil(m/C)-Math.floor(f/C),w>d&&(C=niceNum(w*C/d/u)*u),isNullOrUndef(o)||(x=Math.pow(10,o),C=Math.ceil(C*x)/x),"ticks"===n?(_=Math.floor(f/C)*C,S=Math.ceil(m/C)*C):(_=f,S=m),g&&v&&r&&almostWhole((s-a)/r,C/1e3)?(w=Math.round(Math.min((s-a)/C,c)),C=(s-a)/w,_=a,S=s):y?(_=g?a:_,S=v?s:S,w=l-1,C=(S-_)/w):(w=(S-_)/C,w=almostEquals(w,Math.round(w),C/1e3)?Math.round(w):Math.ceil(w));const P=Math.max(_decimalPlaces(C),_decimalPlaces(_));x=Math.pow(10,isNullOrUndef(o)?P:o),_=Math.round(_*x)/x,S=Math.round(S*x)/x;let E=0;for(g&&(p&&_!==a?(i.push({value:a}),_<a&&E++,almostEquals(Math.round((_+E*C)*x)/x,a,relativeLabelSize(a,b,e))&&E++):_<a&&E++);E<w;++E){const e=Math.round((_+E*C)*x)/x;if(v&&e>s)break;i.push({value:e})}return v&&p&&S!==s?i.length&&almostEquals(i[i.length-1].value,s,relativeLabelSize(s,b,e))?i[i.length-1].value=s:i.push({value:s}):v&&S!==s||i.push({value:S}),i}function relativeLabelSize(e,t,{horizontal:i,minRotation:n}){const r=toRadians(n),a=(i?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class LinearScaleBase extends Scale{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return isNullOrUndef(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:n,max:r}=this;const a=e=>n=t?n:e,s=e=>r=i?r:e;if(e){const e=sign(n),t=sign(r);e<0&&t<0?s(0):e>0&&t>0&&a(0)}if(n===r){let t=0===r?1:Math.abs(.05*r);s(r+t),e||a(n-t)}this.min=n,this.max=r}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:i,stepSize:n}=e;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=generateTicks$1({maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&_setMinAndMaxByKey(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const n=(i-t)/Math.max(e.length-1,1)/2;t-=n,i+=n}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return formatNumber(e,this.chart.options.locale,this.options.ticks.format)}}class LinearScale extends LinearScaleBase{static id="linear";static defaults={ticks:{callback:Ticks.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=isNumberFinite(e)?e:0,this.max=isNumberFinite(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=toRadians(this.options.ticks.minRotation),n=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,r.lineHeight/n))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const INTERVALS={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}},UNITS=Object.keys(INTERVALS);function sorter(e,t){return e-t}function parse(e,t){if(isNullOrUndef(t))return null;const i=e._adapter,{parser:n,round:r,isoWeekday:a}=e._parseOpts;let s=t;return"function"==typeof n&&(s=n(s)),isNumberFinite(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!isNumber(a)&&!0!==a?i.startOf(s,r):i.startOf(s,"isoWeek",a)),+s)}function determineUnitForAutoTicks(e,t,i,n){const r=UNITS.length;for(let a=UNITS.indexOf(e);a<r-1;++a){const e=INTERVALS[UNITS[a]],r=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((i-t)/(r*e.size))<=n)return UNITS[a]}return UNITS[r-1]}function determineUnitForFormatting(e,t,i,n,r){for(let a=UNITS.length-1;a>=UNITS.indexOf(i);a--){const i=UNITS[a];if(INTERVALS[i].common&&e._adapter.diff(r,n,i)>=t-1)return i}return UNITS[i?UNITS.indexOf(i):0]}function determineMajorUnit(e){for(let t=UNITS.indexOf(e)+1,i=UNITS.length;t<i;++t)if(INTERVALS[UNITS[t]].common)return UNITS[t]}function addTick(e,t,i){if(i){if(i.length){const{lo:n,hi:r}=_lookup(i,t);e[i[n]>=t?i[n]:i[r]]=!0}}else e[t]=!0}function setMajorTicks(e,t,i,n){const r=e._adapter,a=+r.startOf(t[0].value,n),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+r.add(o,1,n))l=i[o],l>=0&&(t[l].major=!0);return t}function ticksFromTimestamps(e,t,i){const n=[],r={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],r[o]=s,n.push({value:o,major:!1});return 0!==a&&i?setMajorTicks(e,n,r,i):n}class TimeScale extends Scale{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const i=e.time||(e.time={}),n=this._adapter=new adapters._date(e.adapters.date);n.init(t),mergeIf(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:parse(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,i=e.time.unit||"day";let{min:n,max:r,minDefined:a,maxDefined:s}=this.getUserBounds();function o(e){a||isNaN(e.min)||(n=Math.min(n,e.min)),s||isNaN(e.max)||(r=Math.max(r,e.max))}a&&s||(o(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||o(this.getMinMax(!1))),n=isNumberFinite(n)&&!isNaN(n)?n:+t.startOf(Date.now(),i),r=isNumberFinite(r)&&!isNaN(r)?r:+t.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],i=e[e.length-1]),{min:t,max:i}}buildTicks(){const e=this.options,t=e.time,i=e.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,a=_filterBetween(n,r,this.max);return this._unit=t.unit||(i.autoSkip?determineUnitForAutoTicks(t.minUnit,this.min,this.max,this._getLabelCapacity(r)):determineUnitForFormatting(this,a.length,t.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?determineMajorUnit(this._unit):void 0,this.initOffsets(n),e.reverse&&a.reverse(),ticksFromTimestamps(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t,i,n=0,r=0;this.options.offset&&e.length&&(t=this.getDecimalForValue(e[0]),n=1===e.length?1-t:(this.getDecimalForValue(e[1])-t)/2,i=this.getDecimalForValue(e[e.length-1]),r=1===e.length?i:(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=_limitValue(n,0,a),r=_limitValue(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,t=this.min,i=this.max,n=this.options,r=n.time,a=r.unit||determineUnitForAutoTicks(r.minUnit,t,i,this._getLabelCapacity(t)),s=valueOrDefault(n.ticks.stepSize,1),o="week"===a&&r.isoWeekday,l=isNumber(o)||!0===o,c={};let h,p,u=t;if(l&&(u=+e.startOf(u,"isoWeek",o)),u=+e.startOf(u,l?"day":a),e.diff(i,t,a)>1e5*s)throw new Error(t+" and "+i+" are too far apart with stepSize of "+s+" "+a);const d="data"===n.ticks.source&&this.getDataTimestamps();for(h=u,p=0;h<i;h=+e.add(h,s,a),p++)addTick(c,h,d);return h!==i&&"ticks"!==n.bounds&&1!==p||addTick(c,h,d),Object.keys(c).sort(sorter).map(e=>+e)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}format(e,t){const i=this.options.time.displayFormats,n=this._unit,r=t||i[n];return this._adapter.format(e,r)}_tickFormatFunction(e,t,i,n){const r=this.options,a=r.ticks.callback;if(a)return callback(a,[e,t,i],this);const s=r.time.displayFormats,o=this._unit,l=this._majorUnit,c=o&&s[o],h=l&&s[l],p=i[t],u=l&&h&&p&&p.major;return this._adapter.format(e,n||(u?h:c))}generateTickLabels(e){let t,i,n;for(t=0,i=e.length;t<i;++t)n=e[t],n.label=this._tickFormatFunction(n.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+i)*t.factor)}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,i=this.ctx.measureText(e).width,n=toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),r=Math.cos(n),a=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:i*r+s*a,h:i*a+s*r}}_getLabelCapacity(e){const t=this.options.time,i=t.displayFormats,n=i[t.unit]||i.millisecond,r=this._tickFormatFunction(e,0,ticksFromTimestamps(this,[e],this._majorUnit),n),a=this._getLabelSize(r),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let e,t,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,t=n.length;e<t;++e)i=i.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const e=this._cache.labels||[];let t,i;if(e.length)return e;const n=this.getLabels();for(t=0,i=n.length;t<i;++t)e.push(parse(this,n[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return _arrayUnique(e.sort(sorter))}}function interpolate(e,t,i){let n,r,a,s,o=0,l=e.length-1;i?(t>=e[o].pos&&t<=e[l].pos&&({lo:o,hi:l}=_lookupByKey(e,"pos",t)),({pos:n,time:a}=e[o]),({pos:r,time:s}=e[l])):(t>=e[o].time&&t<=e[l].time&&({lo:o,hi:l}=_lookupByKey(e,"time",t)),({time:n,pos:a}=e[o]),({time:r,pos:s}=e[l]));const c=r-n;return c?a+(s-a)*(t-n)/c:a}class TimeSeriesScale extends TimeScale{static id="timeseries";static defaults=TimeScale.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=interpolate(t,this.min),this._tableRange=interpolate(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,n=[],r=[];let a,s,o,l,c;for(a=0,s=e.length;a<s;++a)l=e[a],l>=t&&l<=i&&n.push(l);if(n.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(a=0,s=n.length;a<s;++a)c=n[a+1],o=n[a-1],l=n[a],Math.round((c+o)/2)!==l&&r.push({time:l,pos:a/(s-1)});return r}_generate(){const e=this.min,t=this.max;let i=super.getDataTimestamps();return i.includes(e)&&i.length||i.splice(0,0,e),i.includes(t)&&1!==i.length||i.push(t),i.sort((e,t)=>e-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return e=t.length&&i.length?this.normalize(t.concat(i)):t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(interpolate(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return interpolate(this._table,i*this._tableRange+this._minPos,!0)}}const getCSSVariable=(e,t=1,i="#666666")=>{const n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(!n)return console.warn(`CSS variable ${e} not found, using fallback color: ${i}`),i;if(1===t)return n;if(n.startsWith("#")){const e=n.replace("#","");return`rgba(${parseInt(e.substr(0,2),16)}, ${parseInt(e.substr(2,2),16)}, ${parseInt(e.substr(4,2),16)}, ${t})`}return n.startsWith("rgb")?n.startsWith("rgba")?n.replace(/[\d.]+\)$/,`${t})`):n.replace("rgb","rgba").replace(")",`, ${t})`):n};function BasicPriceChart({legend:e,chartOptions:t,noChartDisplay:i,id:n,className:r}){var a;const s=useRef(null),o=useRef(null);return useLayoutEffect(()=>{var e,i;if(!s.current)return;const n=s.current.getContext("2d");if(!n)return;const r=null==n?void 0:n.createLinearGradient(0,0,300,0);return null==r||r.addColorStop(0,getCSSVariable("--secondary-color")),null==r||r.addColorStop(.3,getCSSVariable("--secondary-dark-color")),null==r||r.addColorStop(.7,getCSSVariable("--primary-color")),o.current&&o.current.destroy(),(null===(e=t.data.datasets[0])||void 0===e?void 0:e.backgroundColor)&&(t.data.datasets[0].backgroundColor=[r,"rgba(0, 0, 0, 0.2)"]),(null===(i=t.data.datasets[0])||void 0===i?void 0:i.borderColor)&&(t.data.datasets[0].borderColor=[r,"rgba(0, 0, 0, 0.2)"]),o.current=new Chart(n,t),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}},[t]),jsx("div",{id:n,className:"basic-price-chart"+(r?" "+r:""),children:jsx("div",{className:"basic-price-chart__content",children:(null===(a=t.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?jsx("div",{className:"basic-price-chart__empty",children:null!=i?i:jsx("div",{children:"Kein Chart verfügbar"})}):jsxs(Fragment,{children:[jsx("div",{className:"basic-price-chart__chart",children:jsx("canvas",{ref:s})}),e]})})})}function LvEditingStatusChart({chartOptions:e,legend:t,noChartDisplay:i,id:n,className:r}){var a;const s=useRef(null),o=useRef(null);return useLayoutEffect(()=>{var t,i;if(!s.current)return;const n=s.current.getContext("2d");return n?(o.current&&o.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=[getCSSVariable("--warning-color",.6),getCSSVariable("--valid-color",.6),getCSSVariable("--error-color",.6)]),(null===(i=e.data.datasets[0])||void 0===i?void 0:i.borderColor)&&(e.data.datasets[0].borderColor=[getCSSVariable("--warning-color",.6),getCSSVariable("--valid-color",.6),getCSSVariable("--error-color",.6)]),o.current=new Chart(n,e),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}):void 0},[]),jsx("div",{id:n,className:"lv-editing-status-chart"+(r?" "+r:""),children:jsx("div",{className:"lv-editing-status-chart__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?jsx("div",{className:"lv-editing-status-chart__empty",children:null!=i?i:jsx("div",{children:"Kein Chart verfügbar"})}):jsxs(Fragment,{children:[jsx("div",{className:"lv-editing-status-chart__chart",children:jsx("canvas",{ref:s})}),t]})})})}function LvInsightsChart({chartOptions:e,legend:t,noChartDisplay:i,id:n,className:r}){var a;const s=useRef(null),o=useRef(null),l=[getCSSVariable("--secondary-color",.7),getCSSVariable("--primary-color",.7),getCSSVariable("--info-color",.7),getCSSVariable("--diagram-color-5",.7)],c=[getCSSVariable("--secondary-color",1),getCSSVariable("--primary-color",1),getCSSVariable("--info-color",1),getCSSVariable("--diagram-color-5",1)];return useLayoutEffect(()=>{var t,i;if(!s.current)return;const n=s.current.getContext("2d");return n?(o.current&&o.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=l),(null===(i=e.data.datasets[0])||void 0===i?void 0:i.hoverBackgroundColor)&&(e.data.datasets[0].hoverBackgroundColor=c),o.current=new Chart(n,e),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}):void 0},[]),jsx("div",{id:n,className:"lv-insights"+(r?" "+r:""),children:jsx("div",{className:"lv-insights__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?jsx("div",{className:"lv-insights__empty",children:null!=i?i:jsx("div",{children:"Kein Chart verfügbar"})}):jsxs(Fragment,{children:[jsx("div",{className:"lv-insights__chart",children:jsx("canvas",{ref:s})}),t]})})})}function ContractPotentialsChart({chartOptions:e,legend:t,noChartDisplay:i,id:n,className:r}){var a,s;const o=useRef(null),l=useRef(null);return useLayoutEffect(()=>{var t,i;if(!o.current)return;const n=o.current.getContext("2d");return n?(l.current&&l.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=[getCSSVariable("--secondary-color-50")]),(null===(i=e.data.datasets[1])||void 0===i?void 0:i.backgroundColor)&&(e.data.datasets[1].backgroundColor=[getCSSVariable("--primary-color-68",1)]),l.current=new Chart(n,e),()=>{var e;null===(e=l.current)||void 0===e||e.destroy()}):void 0},[e]),jsx("div",{id:n,className:"contract-potentials"+(r?" "+r:""),children:jsx("div",{className:"contract-potentials__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))&&(null===(s=e.data.datasets[1])||void 0===s?void 0:s.data.every(e=>0===e))?jsx("div",{className:"contract-potentials__empty",children:null!=i?i:jsx("div",{children:"Kein Chart verfügbar"})}):jsxs(Fragment,{children:[jsx("div",{className:"contract-potentials__chart",children:jsx("canvas",{ref:o})}),t]})})})}function BeeLabel({id:e,className:t,value:i,size:n="medium",type:r="neutral"}){const a=null!=e?e:libExports.useId(1,"bee-info-label-")[0];return jsx("span",{id:a,className:"bee-label "+("neutral"===r?" bee-info-neutral-label":"valid"===r?" bee-info-valid-label":"error"===r?" bee-error-label":"")+("small"===n?" bee-info-label-small":"medium"===n?" bee-info-label-medium":"large"===n?" bee-info-label-large":" bee-info-label-medium")+(t?" "+t:""),children:i})}Chart.register(DoughnutController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(PieController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(DoughnutController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(BarController,CategoryScale,LinearScale,BarElement,plugin_tooltip,plugin_legend);const EMPTY_FIELD_PLACEHOLDER=" — ";function BeeTextInput({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,formstate:s="neutral",halfRounded:o,readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){var m;const g=null!==(m=null!=e?e:libExports.useId(1,"bee-txt-input-")[0])&&void 0!==m?m:"bee-txt-input";let v="";l&&(v=" bee-txt-input-readOnly",r=!0);const y="bee-txt-input "+("valid"===s?" bee-txt-input-valid":"error"===s?" bee-txt-input-error":"neutral"===s?" bee-txt-input-neutral":"none"===s?" bee-cur-input-field-neutral":" bee-txt-input-neutral");return jsxs(Fragment,{children:[jsx("div",{id:g,className:"p-float-label bee-txt-input-container"+v+(o?" half-rounded":"")+(t?" "+t:""),children:l&&!n?jsx(BeePlaceholder,{id:g,label:i}):jsxs(Fragment,{children:[jsx(InputText,{id:g+"input",value:null!=n?n:void 0,disabled:null!=r&&r,className:y,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!r&&d&&d(e)}(e),onBlur:e=>function(e){!r&&f&&f(e)}(e)}),i?jsxs("label",{htmlFor:g+"input",className:"bee-txt-input-label",children:[i,c&&i?jsx("span",{className:"bee-txt-input-label-required",children:jsx("span",{className:"bee-txt-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-text-input-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeePlaceholder({id:e,className:t,label:i,disabled:n}){const r=null!=e?e:libExports.useId(1,"bee-placeholder-")[0];return jsx(BeeTextInput,{id:r+"input",label:i,value:EMPTY_FIELD_PLACEHOLDER,className:null!=t?t:"",disabled:null==n||n,readOnly:!0,formstate:"neutral"})}function BeeAutocompleteDropdown({id:e,className:t,label:i,value:n,suggestions:r,disabled:a,statusLabel:s,formstate:o="neutral",readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){const m=null!=e?e:libExports.useId(1,"bee-autocomplete-dropdown-")[0],[g,v]=React__default.useState(null!=r?r:[]),y="bee-autocomplete-dropdown "+("valid"===o?" bee-autocomplete-dropdown-valid":"error"===o?" bee-autocomplete-dropdown-error":"neutral"===o?" bee-autocomplete-dropdown-neutral":"none"===o?" bee-autocomplete-dropdodown-none":" bee-autocomplete-dropdown-neutral");return jsxs(Fragment,{children:[jsx("span",{id:m,className:"p-float-label bee-autocomplete-dropdown-container"+(l?" bee-autocomplete-dropdown-readOnly":"")+(a?" bee-autocomplete-dropdown-disabled":"")+(t?" "+t:""),children:l&&!n?jsx(BeePlaceholder,{id:m,label:i}):jsxs(Fragment,{children:[jsx(AutoComplete,{id:m+"input",value:null!=n?n:void 0,dropdown:!0,suggestions:g,disabled:null!=a&&a,className:y,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!a&&d&&d(e)}(e),onBlur:e=>function(e){!a&&f&&f(e)}(e),completeMethod:e=>{const t=(null!=r?r:[]).filter(t=>String(t).toLowerCase().startsWith(e.query.toLowerCase()));v(t)}}),i?jsxs("label",{htmlFor:m+"input",className:"bee-autocomplete-dropdown-label",children:[i,c&&i?jsx("span",{className:"bee-autocomplete-dropdown-label-required",children:jsx("span",{className:"bee-autocomplete-dropdown-label-required-star",children:" *"})}):null]}):null]})}),"none"!=o&&s?(()=>{const e="medium";return jsx("div",{className:"bee-autocomplete-dropdown-statusLabel",children:"error"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}function BeeAutocompleteTag({id:e,className:t,label:i,value:n,suggestions:r,disabled:a,statusLabel:s,formstate:o="neutral",readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){const m=null!=e?e:libExports.useId(1,"bee-autocomplete-tag-")[0],[g,v]=React__default.useState(null!=r?r:[]);let y="";l&&(y=" bee-autocomplete-tag-readOnly",a=!0);const b="bee-autocomplete-tag "+("valid"===o?" bee-autocomplete-tag-valid":"error"===o?" bee-autocomplete-tag-error":"neutral"===o?" bee-autocomplete-tag-neutral":"none"===o?" bee-cur-input-field-neutral":" bee-autocomplete-tag-neutral"),x="p-float-label bee-autocomplete-tag-container"+y;const _=void 0===n?[]:Array.isArray(n)?n.map(String):[String(n)];return jsxs(Fragment,{children:[jsx("div",{id:m,className:x+(t?" "+t:""),children:l&&!n?jsx(BeePlaceholder,{id:m,label:i}):jsxs(Fragment,{children:[jsx(AutoComplete,{id:m+"input",value:_,multiple:!0,suggestions:g,disabled:null!=a&&a,className:b,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!a&&d&&d(e)}(e),onBlur:e=>function(e){!a&&f&&f(e)}(e),completeMethod:e=>{const t=(null!=r?r:[]).filter(t=>String(t).toLowerCase().startsWith(e.query.toLowerCase()));v(t)}}),i?jsxs("label",{htmlFor:m+"input",className:"bee-autocomplete-tag-label",children:[i,c&&i?jsx("span",{className:"bee-autocomplete-tag-label-required",children:jsx("span",{className:"bee-autocomplete-tag-label-required-star",children:" *"})}):null]}):null]})}),"none"!=o&&s?(()=>{const e="medium";return jsx("div",{className:"bee-autocomplete-tag-statusLabel",children:"error"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===o&&s?jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}function BeeBadge({id:e,className:t,label:i,type:n="primary",size:r="normal"}){const a=null!=e?e:libExports.useId(1,"bee-badge-")[0];return jsx(Badge,{id:a,value:i,className:"primary"===n?"bee-badge bee-badge-primary":"secondary"===n?"bee-badge bee-badge-secondary":"danger"===n?"bee-badge bee-badge-danger":"bee-badge bee-badge-primary"+(t?" "+t:""),size:r})}function BeeContentHeadline({id:e,className:t,value:i,headlineType:n="h1",type:r="primary"}){const a=null!=e?e:libExports.useId(1,"bee-content-headline-")[0],s="primary"===r?"bee-headline bee-headline-primary":"secondary"===r?"bee-headline bee-headline-secondary":"bee-headline bee-headline-primary"+(t?" "+t:"");return jsx("h1"===n?"h1":"h2"===n?"h2":"h3"===n?"h3":"h4"===n?"h4":"h5"===n?"h5":"h1",{id:a,className:s,children:i})}function BeeContentParagraph({id:e,className:t,value:i,size:n="medium",type:r="primary"}){const a=null!=e?e:libExports.useId(1,"bee-content-paragraph-")[0];return jsx("p",{id:a,className:"bee-content-paragraph"+("xSmall"===n?" bee-content-paragraph-xsmall":"small"===n?" bee-content-paragraph-small":"medium"===n?" bee-content-paragraph-medium":"large"===n?" bee-content-paragraph-large":"xLarge"===n?" bee-content-paragraph-xlarge":" bee-content-paragraph-medium")+("primary"===r?" bee-content-paragraph-primary":"secondary"===r?" bee-content-paragraph-secondary":"")+(t?" "+t:""),children:i})}function BeeLink({id:e,className:t,value:i,href:n,type:r="primary",size:a="medium",onClick:s}){const o=null!=e?e:libExports.useId(1,"bee-link-")[0],l="bee-link"+("primary"===r?" bee-link-primary":"secondary"===r?" bee-link-secondary":" bee-link-default")+("xSmall"===a?" bee-link-size-xSmall":"small"===a?" bee-link-size-small":"medium"===a?" bee-link-size-medium":"large"===a?" bee-link-size-large":"xLarge"===a?" bee-link-size-xLarge":" bee-link-size-medium");return jsx(Fragment,{children:jsx("a",n?{id:o,className:l+(t?" "+t:""),href:n,children:i}:{id:o,className:l+(t?" "+t:""),onClick:e=>function(e){s&&s(e)}(e),children:i})})}function BeeSequencePosition({id:e,className:t,data:i,type:n="primary"}){const r=null!=e?e:libExports.useId(1,"bee-seq-pos-")[0];return jsx("div",{id:r,className:"bee-seq-pos"+("primary"===n?" bee-seq-pos-primary":"secondary"===n?" bee-seq-pos-secondary":"default"===n?" bee-seq-pos-default":" bee-seq-pos-primary")+(t?" "+t:""),children:(()=>{if(i){let e=[];return i.forEach((t,i)=>{e.push(((e,t)=>{const i=(null==e?void 0:e.bold)?"bee-seq-pos-bold":void 0;return jsxs("span",{children:[(null==e?void 0:e.icon)?jsx("i",{className:e.icon}):null,null!=(null==e?void 0:e.label)?jsx("span",{className:i,children:e.label}):null]},`SeqPos_${t}`)})(t,i)),e.push(jsx("i",{className:"pi pi-chevron-right bee-seq-pos-separator"},">_"+i))}),e.pop(),e}})()})}function BeeChipInput({id:e,className:t,label:i,type:n="primary",data:r=[],statusLabel:a,formstate:s="neutral",required:o,disabled:l,readOnly:c,placeholder:h,tooltip:p,tooltipOptions:u,itemTemplate:d,onChange:f}){var m;const g=null!==(m=null!=e?e:libExports.useId(1,"bee-chip-input-")[0])&&void 0!==m?m:"bee-chip-input",v=o?"bee-chip-input-label-required":"",y=o?"bee-chip-input-label-required-star":"";return jsxs("div",{id:g,className:"bee-chip-input p-float-label"+("primary"===n?" bee-chip-input-primary":"secondary"===n?" bee-chip-input-secondary":" bee-chip-input-primary")+(c?" bee-chip-input-readOnly":"")+(l?" bee-chip-input-disabled":"")+("valid"===s?" bee-chip-input-field-valid":"error"===s?" bee-chip-input-field-error":" bee-chip-input-field-neutral")+(t?" "+t:""),children:[jsx(Fragment,{children:c&&!r||c&&r.length<1?jsx(BeePlaceholder,{id:g,label:i}):jsx(Fragment,{children:jsx(Chips,Object.assign({value:r},void 0!==d?{itemTemplate:d}:{},{onChange:e=>function(e){!l&&f&&f(e)}(e),separator:",",addOnBlur:!0,removable:!c,readOnly:null!=c&&c,placeholder:h,tooltip:p,tooltipOptions:u}))})}),i?jsxs("label",{className:"bee-chip-input-label",children:[i,o?jsx("span",{className:v,children:jsx("span",{className:y,children:" *"})}):null]}):null,"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-chip-input-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeCurrencyInput({id:e,className:t,label:i,value:n,showArrow:r,disabled:a,autoFocus:s,minFractionDigits:o,maxFractionDigits:l,max:c,min:h,currency:p="EUR",locale:u="de-DE",statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,name:y,tooltip:b,tooltipOptions:x,onChange:_,onFocusOut:S}){var w;const C=null!==(w=null!=e?e:libExports.useId(1,"bee-cur-input-")[0])&&void 0!==w?w:"bee-cur-input",P=null!=o?o:2,E=null!=l?l:2;let k="";m&&(k=" bee-cur-input-field-readOnly",a=!0);const A=" bee-cur-input-container "+(r?" bee-cur-input-container--showArrow ":""),T="bee-cur-input-field"+("valid"===f?" bee-cur-input-field-valid":"error"===f?" bee-cur-input-field-error":" bee-cur-input-field-neutral")+k,D="icon icon-right-arrow "+(n&&n>0?"up-arrow":n&&n<0?"down-arrow":"");return jsxs("div",{children:[m&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:C,label:i})}):jsxs("div",{className:A+(t?" "+t:""),children:[r?jsx("i",{className:D}):null,jsxs("span",{id:C,className:"p-float-label ",children:[jsx(InputNumber,{id:C+"input",value:null!=n?n:null,disabled:null!=a&&a,minFractionDigits:P,maxFractionDigits:E,max:c,min:h,autoFocus:s,mode:"currency",currency:p,inputId:C+"_input",inputClassName:T,locale:u,placeholder:v,name:y,tooltip:b,tooltipOptions:x,onValueChange:e=>function(e){!a&&_&&_(e)}(e),onBlur:e=>function(e){!a&&S&&S(e)}(e)}),i?jsxs("label",{htmlFor:C+"input",className:"bee-cur-input-label",children:[i,g&&i?jsx("span",{className:"bee-cur-input-label-required",children:jsx("span",{className:"bee-cur-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return jsx("div",{className:"bee-cur-input-statusLabel",children:"error"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeeDateInput({id:e,className:t,label:i,value:n,statusLabel:r,formstate:a="neutral",disabled:s,readOnly:o,required:l,showButtonBar:c,dateFormat:h,view:p,minDate:u,maxDate:d,showMinMaxRange:f,showUTCDate:m,placeholder:g,tooltip:v,tooltipOptions:y,onChange:b,onFocusOut:x,panelClassName:_,locale:S="de"}){var w;const C=null!==(w=null!=e?e:libExports.useId(1,"bee-date-input-")[0])&&void 0!==w?w:"bee-date-input";let P="";o&&(P=" bee-date-input-readOnly",s=!0);const E=`bee-date-input ${"valid"===a?" bee-date-input-valid":"error"===a?" bee-date-input-error":" bee-date-input-neutral"} ${P} ${_||""}`;function k(e){if(!e||Array.isArray(e))return null;let t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset())}function A(e){if(!e||Array.isArray(e))return;let t=new Date(e);return new Date(t.getTime()+6e4*t.getTimezoneOffset())}function T(e){if(e&&!Array.isArray(e))return e instanceof Date?e:new Date(e)}return jsxs(Fragment,{children:[jsx("div",{id:C,className:"p-float-label bee-date-input-container"+(t?" "+t:""),children:o&&!n?jsx(BeePlaceholder,{id:C,label:i}):jsxs(Fragment,{children:[jsx(Calendar,{id:C+"input",value:m&&n?A(n):T(n),disabled:null!=s&&s,className:E,showIcon:!0,showButtonBar:null!=c&&c,dateFormat:null!=h?h:"dd.mm.y",view:null!=p?p:"date",minDate:u?m?A(u):T(u):void 0,maxDate:d?m?A(d):T(d):void 0,showMinMaxRange:null!=f&&f,placeholder:g,tooltip:v,tooltipOptions:y,onChange:e=>function(e){!s&&b&&(m&&(e.value=k(e.value)),b(e))}(e),onBlur:e=>function(e){var t,i;!s&&x&&(m?(e.target.value=null!==(i=null===(t=k(e.target.value))||void 0===t?void 0:t.toString())&&void 0!==i?i:e.target.value,x(e)):x(e))}(e),locale:S}),i?jsxs("label",{htmlFor:C+"input",className:"bee-date-input-label",children:[i,l&&i?jsx("span",{className:"bee-date-input-label-required",children:jsx("span",{className:"bee-date-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=a&&r?(()=>{const e="medium";return jsx("div",{className:"bee-date-input-statusLabel",children:"error"===a&&r?jsx(BeeLabel,{size:e,value:r,type:"error"}):"valid"===a&&r?jsx(BeeLabel,{size:e,value:r,type:"valid"}):"neutral"===a&&r?jsx(BeeLabel,{size:e,value:r,type:"neutral"}):null})})():null]})}function BeeDateTimeInput({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,formstate:s="neutral",readOnly:o,required:l,minDate:c,maxDate:h,showMinMaxRange:p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:m,onFocusOut:g}){var v;const y=null!==(v=null!=e?e:libExports.useId(1,"bee-date-time-input-")[0])&&void 0!==v?v:"bee-date-time-input";let b="";o&&(b=" bee-date-time-input-readOnly",r=!0);const x="bee-date-time-input"+("valid"===s?" bee-date-time-input-valid":"error"===s?" bee-date-time-input-error":"neutral"===s?" bee-date-time-input-neutral":"none"===s?" bee-date-time-field-neutral":" bee-date-time-input-neutral")+b;return jsxs(Fragment,{children:[o&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:y,label:i})}):jsxs("span",{id:y,className:"p-float-label bee-date-time-input-container"+(t?" "+t:""),children:[jsx(Calendar,{showTime:!0,showSeconds:!0,hourFormat:"24",dateFormat:"dd.mm.yy",value:n,disabled:null!=r&&r,className:x,minDate:c?new Date(c):void 0,maxDate:h?new Date(h):void 0,showMinMaxRange:null!=p&&p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:e=>function(e){!r&&m&&m(e)}(e),onBlur:e=>function(e){!r&&g&&g(e)}(e)}),i?jsxs("label",{htmlFor:y+"input",className:"bee-date-time-input-label",children:[i,l&&i?jsx("span",{className:"bee-date-time-input-label-required",children:jsx("span",{className:"bee-date-time-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-date-time-input-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeNumberInput({id:e,className:t,label:i,value:n,showArrow:r,autoFocus:a,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,disabled:h,grouping:p,locale:u="de-DE",statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,tooltip:y,tooltipOptions:b,onChange:x,onFocusOut:_}){var S;const w=null!==(S=null!=e?e:libExports.useId(1,"bee-num-input")[0])&&void 0!==S?S:"bee-num-input";let C="";m&&(C=" bee-num-input-readOnly",h=!0);const P=" bee-num-input-container"+(r?" bee-num-input-container--showArrow":""),E="bee-num-input "+("valid"===f?"bee-num-input-valid":"error"===f?"bee-num-input-error":"bee-num-input-neutral")+C,k="icon icon-right-arrow "+(n&&n>0?"up-arrow":n&&n<0?"down-arrow":"");return jsxs(Fragment,{children:[m&&!n&&0!==n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:w,label:i})}):jsxs("div",{className:"flex-grow-0"+P+(t?" "+t:""),children:[r?jsx("i",{className:k}):null,jsxs("span",{id:w,className:"p-float-label",children:[jsx(InputNumber,{id:w+"input",value:null!=n?n:null,disabled:null!=h&&h,mode:"decimal",autoFocus:a,useGrouping:p,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:u,inputClassName:E,placeholder:v,tooltip:y,tooltipOptions:b,onValueChange:e=>function(e){!h&&x&&x(e)}(e),onBlur:e=>function(e){!h&&_&&_(e)}(e)}),i?jsxs("label",{htmlFor:w+"input",className:"bee-num-input-label",children:[i,g&&i?jsx("span",{className:"bee-num-input-label-required",children:jsx("span",{className:"bee-num-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return jsx("div",{className:"bee-num-input-statusLabel",children:"error"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeePasswordInput({id:e,className:t,label:i,value:n,disabled:r,showPwStrength:a,showHint:s,statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,tooltip:u,tooltipOptions:d,onChange:f,onFocusOut:m}){var g;const v=null!==(g=null!=e?e:libExports.useId(1,"bee-pw-input")[0])&&void 0!==g?g:"bee-pw-input";let y="";c&&(y=" bee-pw-input-readOnly",r=!0);const b="bee-pw-input "+("valid"===l?"bee-pw-input-valid":"error"===l?"bee-pw-input-error":"bee-pw-input-neutral"),x="p-float-label bee-pw-container"+y,_=jsx("h6",{children:"Passwort wählen"});const S=jsxs(Fragment,{children:[jsx(Divider,{}),jsx("p",{className:"mt-2",children:"Suggestions"}),jsxs("ul",{className:"pl-2 ml-2 mt-0",style:{lineHeight:"1.5"},children:[jsx("li",{children:"Mind. einen Kleinbuchstaben"}),jsx("li",{children:"Mind. einen Großbuchstaben"}),jsx("li",{children:"Mind. eine Zahl"}),jsx("li",{children:"Mind. 8 Buchstaben/Zahlen"})]})]});return jsxs(Fragment,{children:[jsx("div",{className:null!=t?t:"",children:c&&!n?jsx(BeePlaceholder,{id:v,label:i}):jsxs("span",{id:v,className:x,children:[jsx(Password,{id:v+"input",value:null!=n?n:void 0,disabled:null!=r&&r,onChange:e=>function(e){!r&&f&&f(e)}(e),onBlur:m,inputClassName:b,toggleMask:!0,feedback:a,header:s?_:null,footer:s?S:null,placeholder:p,tooltip:u,tooltipOptions:d}),i?jsxs("label",{htmlFor:v+"input",className:"bee-pw-input-label",children:[i,h&&i?jsx("span",{className:"bee-pw-input-label-required",children:jsx("span",{className:"bee-pw-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=l&&o?(()=>{const e="medium";return jsx("div",{className:"bee-pw-input-statusLabel",children:"error"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeePercentageInput({id:e,className:t,label:i,value:n,showArrow:r,autoFocus:a,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:h="de-DE",disabled:p,grouping:u,statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,tooltip:y,tooltipOptions:b,onChange:x,onFocusOut:_}){var S;const w=null!==(S=null!=e?e:libExports.useId(1,"bee-percent-input")[0])&&void 0!==S?S:"bee-percent-input",C="icon icon-right-arrow "+(n&&n>0?"up-arrow":n&&n<0?"down-arrow":"");let P="";m&&(P=" bee-percent-input-readOnly",p=!0);const E=" bee-percentage-input-container "+(r?" bee-percentage-input-container--showArrow":""),k="bee-percent-input "+("valid"===f?"bee-percent-input-valid":"error"===f?"bee-percent-input-error":"bee-percent-input-neutral")+P;return jsxs(Fragment,{children:[m&&!n&&0!==n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:w,label:i})}):jsxs("div",{className:"flex-grow-0 "+E+(t?" "+t:""),children:[r?jsx("i",{className:C}):null,jsxs("span",{id:w,className:"p-float-label span-container",children:[jsx(InputNumber,{id:w+"input",value:null!=n?n:null,disabled:null!=p&&p,mode:"decimal",suffix:"%",autoFocus:a,useGrouping:u,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:h,inputClassName:k,placeholder:v,tooltip:y,tooltipOptions:b,onValueChange:e=>function(e){!p&&x&&x(e)}(e),onBlur:e=>function(e){!p&&_&&_(e)}(e)}),i?jsxs("label",{htmlFor:w+"input",className:"bee-percent-input-label",children:[i,g&&i?jsx("span",{className:"bee-percent-input-label-required",children:jsx("span",{className:"bee-percent-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return jsx("div",{className:"bee-percent-input-statusLabel",children:"error"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeeTextArea({id:e,className:t,label:i,value:n,rows:r,disabled:a,autoResize:s,statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,tooltip:u,tooltipOptions:d,onChange:f,onFocusOut:m}){var g;const v=null!==(g=null!=e?e:libExports.useId(1,"bee-ta-input-")[0])&&void 0!==g?g:"bee-ta-input";let y="";c&&(y=" bee-ta-input-readOnly",a=!0);const b=("valid"===l?"bee-ta-input-valid":"error"===l?"bee-ta-input-error":"neutral"===l?"bee-ta-input-neutral":"none"===l?" bee-cur-input-field-neutral":"bee-ta-input-neutral")+y;return jsxs(Fragment,{children:[c&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:v,label:i})}):jsxs("span",{id:v,className:"p-float-label bee-ta-input-container"+(t?" "+t:""),children:[jsx(Fragment,{children:jsx(InputTextarea,{id:v+"input",value:null!=n?n:void 0,rows:r,disabled:null!=a&&a,autoResize:s,className:b,placeholder:p,tooltip:u,tooltipOptions:d,onChange:e=>function(e){!a&&f&&f(e)}(e),onBlur:e=>function(e){!a&&m&&m(e)}(e)})}),i?jsxs("label",{htmlFor:v+"input",className:"bee-ta-input-label",children:[i,h&&i?jsx("span",{className:"bee-ta-input-label-required",children:jsx("span",{className:"bee-ta-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&o?(()=>{const e="medium";return jsx("div",{className:"bee-ta-input-statusLabel",children:"error"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeTimeInput({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,formstate:s="neutral",readOnly:o,required:l,minDate:c,maxDate:h,showMinMaxRange:p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:m,onFocusOut:g}){var v;const y=null!==(v=null!=e?e:libExports.useId(1,"bee-time-input-")[0])&&void 0!==v?v:"bee-time-input";let b="";o&&(b=" bee-time-input-readOnly",r=!0);const x="bee-time-input"+("valid"===s?" bee-time-input-valid":"error"===s?" bee-time-input-error":"neutral"===s?" bee-time-input-neutral":"none"===s?" bee-time-input-field-neutral":" bee-time-input-neutral")+b;return jsxs(Fragment,{children:[o&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:y,label:i})}):jsxs("span",{id:y,className:"p-float-label bee-time-input-container"+(t?" "+t:""),children:[jsx(Calendar,{timeOnly:!0,showTime:!0,hourFormat:"24",value:n,readOnlyInput:null!=o&&o,disabled:null!=r&&r,className:x,minDate:c?new Date(c):void 0,maxDate:h?new Date(h):void 0,showMinMaxRange:null!=p&&p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:e=>function(e){!r&&m&&m(e)}(e),onBlur:e=>function(e){!r&&g&&g(e)}(e)}),i?jsxs("label",{htmlFor:y+"input",className:"bee-time-input-label",children:[i,l&&i?jsx("span",{className:"bee-time-input-label-required",children:jsx("span",{className:"bee-time-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-time-input-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}addLocale("de",{firstDayOfWeek:1,dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["Son","Mon","Die","Mit","Don","Fre","Sam"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen"});var lodash$1={exports:{}},lodash=lodash$1.exports,hasRequiredLodash;
|
|
20
20
|
/**
|
|
21
21
|
* @license
|
|
22
22
|
* Lodash <https://lodash.com/>
|
|
@@ -24,7 +24,7 @@ import require$$0,{jsx,jsxs,Fragment}from"react/jsx-runtime";import*as React fro
|
|
|
24
24
|
* Released under MIT license <https://lodash.com/license>
|
|
25
25
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
26
26
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
27
|
-
*/function requireLodash(){return hasRequiredLodash||(hasRequiredLodash=1,e=lodash$1,t=lodash$1.exports,function(){var i,n="Expected a function",r="__lodash_hash_undefined__",a="__lodash_placeholder__",s=32,o=128,l=256,c=1/0,h=9007199254740991,p=NaN,u=4294967295,d=[["ary",o],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",l]],f="[object Arguments]",m="[object Array]",g="[object Boolean]",v="[object Date]",y="[object Error]",b="[object Function]",x="[object GeneratorFunction]",_="[object Map]",S="[object Number]",w="[object Object]",C="[object Promise]",P="[object RegExp]",E="[object Set]",k="[object String]",A="[object Symbol]",T="[object WeakMap]",D="[object ArrayBuffer]",M="[object DataView]",I="[object Float32Array]",F="[object Float64Array]",j="[object Int8Array]",R="[object Int16Array]",O="[object Int32Array]",B="[object Uint8Array]",L="[object Uint8ClampedArray]",N="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,G=RegExp($.source),U=RegExp(q.source),Y=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ie=/^\s+/,ne=/\s/,re=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,oe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="['’]",Ae="["+xe+"]",Te="["+Ee+"]",De="["+_e+"]",Me="\\d+",Ie="["+Se+"]",Fe="["+we+"]",je="[^"+xe+Ee+Me+Se+we+Ce+"]",Re="\\ud83c[\\udffb-\\udfff]",Oe="[^"+xe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",Le="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="["+Ce+"]",ze="\\u200d",Ve="(?:"+Fe+"|"+je+")",He="(?:"+Ne+"|"+je+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+De+"|"+Re+")?",Ge="["+Pe+"]?",Ue=Ge+qe+"(?:"+ze+"(?:"+[Oe,Be,Le].join("|")+")"+Ge+qe+")*",Ye="(?:"+[Ie,Be,Le].join("|")+")"+Ue,Ke="(?:"+[Oe+De+"?",De,Be,Le,Ae].join("|")+")",Xe=RegExp(ke,"g"),Ze=RegExp(De,"g"),Je=RegExp(Re+"(?="+Re+")|"+Ke+Ue,"g"),Qe=RegExp([Ne+"?"+Fe+"+"+We+"(?="+[Te,Ne,"$"].join("|")+")",He+"+"+$e+"(?="+[Te,Ne+Ve,"$"].join("|")+")",Ne+"?"+Ve+"+"+We,Ne+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Ye].join("|"),"g"),et=RegExp("["+ze+xe+_e+Pe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,rt={};rt[I]=rt[F]=rt[j]=rt[R]=rt[O]=rt[B]=rt[L]=rt[N]=rt[z]=!0,rt[f]=rt[m]=rt[D]=rt[g]=rt[M]=rt[v]=rt[y]=rt[b]=rt[_]=rt[S]=rt[w]=rt[P]=rt[E]=rt[k]=rt[T]=!1;var at={};at[f]=at[m]=at[D]=at[M]=at[g]=at[v]=at[I]=at[F]=at[j]=at[R]=at[O]=at[_]=at[S]=at[w]=at[P]=at[E]=at[k]=at[A]=at[B]=at[L]=at[N]=at[z]=!0,at[y]=at[b]=at[T]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,lt=parseInt,ct="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,ht="object"==typeof self&&self&&self.Object===Object&&self,pt=ct||ht||Function("return this")(),ut=t&&!t.nodeType&&t,dt=ut&&e&&!e.nodeType&&e,ft=dt&&dt.exports===ut,mt=ft&&ct.process,gt=function(){try{var e=dt&&dt.require&&dt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),vt=gt&>.isArrayBuffer,yt=gt&>.isDate,bt=gt&>.isMap,xt=gt&>.isRegExp,_t=gt&>.isSet,St=gt&>.isTypedArray;function wt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function Ct(e,t,i,n){for(var r=-1,a=null==e?0:e.length;++r<a;){var s=e[r];t(n,s,i(s),e)}return n}function Pt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function Et(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function kt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function At(e,t){for(var i=-1,n=null==e?0:e.length,r=0,a=[];++i<n;){var s=e[i];t(s,i,e)&&(a[r++]=s)}return a}function Tt(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Dt(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1}function Mt(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}function It(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}function Ft(e,t,i,n){var r=-1,a=null==e?0:e.length;for(n&&a&&(i=e[++r]);++r<a;)i=t(i,e[r],r,e);return i}function jt(e,t,i,n){var r=null==e?0:e.length;for(n&&r&&(i=e[--r]);r--;)i=t(i,e[r],r,e);return i}function Rt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var Ot=Wt("length");function Bt(e,t,i){var n;return i(e,function(e,i,r){if(t(e,i,r))return n=i,!1}),n}function Lt(e,t,i,n){for(var r=e.length,a=i+(n?1:-1);n?a--:++a<r;)if(t(e[a],a,e))return a;return-1}function Nt(e,t,i){return t==t?function(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1}(e,t,i):Lt(e,Vt,i)}function zt(e,t,i,n){for(var r=i-1,a=e.length;++r<a;)if(n(e[r],t))return r;return-1}function Vt(e){return e!=e}function Ht(e,t){var i=null==e?0:e.length;return i?Gt(e,t)/i:p}function Wt(e){return function(t){return null==t?i:t[e]}}function $t(e){return function(t){return null==e?i:e[t]}}function qt(e,t,i,n,r){return r(e,function(e,r,a){i=n?(n=!1,e):t(i,e,r,a)}),i}function Gt(e,t){for(var n,r=-1,a=e.length;++r<a;){var s=t(e[r]);s!==i&&(n=n===i?s:n+s)}return n}function Ut(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Yt(e){return e?e.slice(0,pi(e)+1).replace(ie,""):e}function Kt(e){return function(t){return e(t)}}function Xt(e,t){return Mt(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var i=-1,n=e.length;++i<n&&Nt(t,e[i],0)>-1;);return i}function Qt(e,t){for(var i=e.length;i--&&Nt(t,e[i],0)>-1;);return i}var ei=$t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ti=$t({"&":"&","<":"<",">":">",'"':""","'":"'"});function ii(e){return"\\"+st[e]}function ni(e){return et.test(e)}function ri(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function ai(e,t){return function(i){return e(t(i))}}function si(e,t){for(var i=-1,n=e.length,r=0,s=[];++i<n;){var o=e[i];o!==t&&o!==a||(e[i]=a,s[r++]=i)}return s}function oi(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function li(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=[e,e]}),i}function ci(e){return ni(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):Ot(e)}function hi(e){return ni(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function pi(e){for(var t=e.length;t--&&ne.test(e.charAt(t)););return t}var ui=$t({"&":"&","<":"<",">":">",""":'"',"'":"'"}),di=function e(t){var ne=(t=null==t?pt:di.defaults(pt.Object(),t,di.pick(pt,it))).Array,xe=t.Date,_e=t.Error,Se=t.Function,we=t.Math,Ce=t.Object,Pe=t.RegExp,Ee=t.String,ke=t.TypeError,Ae=ne.prototype,Te=Se.prototype,De=Ce.prototype,Me=t["__core-js_shared__"],Ie=Te.toString,Fe=De.hasOwnProperty,je=0,Re=function(){var e=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Oe=De.toString,Be=Ie.call(Ce),Le=pt._,Ne=Pe("^"+Ie.call(Fe).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=ft?t.Buffer:i,Ve=t.Symbol,He=t.Uint8Array,We=ze?ze.allocUnsafe:i,$e=ai(Ce.getPrototypeOf,Ce),qe=Ce.create,Ge=De.propertyIsEnumerable,Ue=Ae.splice,Ye=Ve?Ve.isConcatSpreadable:i,Ke=Ve?Ve.iterator:i,Je=Ve?Ve.toStringTag:i,et=function(){try{var e=ca(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ct=xe&&xe.now!==pt.Date.now&&xe.now,ht=t.setTimeout!==pt.setTimeout&&t.setTimeout,ut=we.ceil,dt=we.floor,mt=Ce.getOwnPropertySymbols,gt=ze?ze.isBuffer:i,Ot=t.isFinite,$t=Ae.join,fi=ai(Ce.keys,Ce),mi=we.max,gi=we.min,vi=xe.now,yi=t.parseInt,bi=we.random,xi=Ae.reverse,_i=ca(t,"DataView"),Si=ca(t,"Map"),wi=ca(t,"Promise"),Ci=ca(t,"Set"),Pi=ca(t,"WeakMap"),Ei=ca(Ce,"create"),ki=Pi&&new Pi,Ai={},Ti=Ra(_i),Di=Ra(Si),Mi=Ra(wi),Ii=Ra(Ci),Fi=Ra(Pi),ji=Ve?Ve.prototype:i,Ri=ji?ji.valueOf:i,Oi=ji?ji.toString:i;function Bi(e){if(Js(e)&&!Vs(e)&&!(e instanceof Vi)){if(e instanceof zi)return e;if(Fe.call(e,"__wrapped__"))return Oa(e)}return new zi(e)}var Li=function(){function e(){}return function(t){if(!Zs(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Ni(){}function zi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Vi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=u,this.__views__=[]}function Hi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Wi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function $i(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function qi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new $i;++t<i;)this.add(e[t])}function Gi(e){var t=this.__data__=new Wi(e);this.size=t.size}function Ui(e,t){var i=Vs(e),n=!i&&zs(e),r=!i&&!n&&qs(e),a=!i&&!n&&!r&&so(e),s=i||n||r||a,o=s?Ut(e.length,Ee):[],l=o.length;for(var c in e)!t&&!Fe.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ga(c,l))||o.push(c);return o}function Yi(e){var t=e.length;return t?e[Gn(0,t-1)]:i}function Ki(e,t){return Ia(kr(e),an(t,0,e.length))}function Xi(e){return Ia(kr(e))}function Zi(e,t,n){(n!==i&&!Bs(e[t],n)||n===i&&!(t in e))&&nn(e,t,n)}function Ji(e,t,n){var r=e[t];Fe.call(e,t)&&Bs(r,n)&&(n!==i||t in e)||nn(e,t,n)}function Qi(e,t){for(var i=e.length;i--;)if(Bs(e[i][0],t))return i;return-1}function en(e,t,i,n){return hn(e,function(e,r,a){t(n,e,i(e),a)}),n}function tn(e,t){return e&&Ar(t,To(t),e)}function nn(e,t,i){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function rn(e,t){for(var n=-1,r=t.length,a=ne(r),s=null==e;++n<r;)a[n]=s?i:Co(e,t[n]);return a}function an(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function sn(e,t,n,r,a,s){var o,l=1&t,c=2&t,h=4&t;if(n&&(o=a?n(e,r,a,s):n(e)),o!==i)return o;if(!Zs(e))return e;var p=Vs(e);if(p){if(o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Fe.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return kr(e,o)}else{var u=ua(e),d=u==b||u==x;if(qs(e))return _r(e,l);if(u==w||u==f||d&&!a){if(o=c||d?{}:fa(e),!l)return c?function(e,t){return Ar(e,pa(e),t)}(e,function(e,t){return e&&Ar(t,Do(t),e)}(o,e)):function(e,t){return Ar(e,ha(e),t)}(e,tn(o,e))}else{if(!at[u])return a?e:{};o=function(e,t,i){var n,r=e.constructor;switch(t){case D:return Sr(e);case g:case v:return new r(+e);case M:return function(e,t){var i=t?Sr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case I:case F:case j:case R:case O:case B:case L:case N:case z:return wr(e,i);case _:return new r;case S:case k:return new r(e);case P:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new r;case A:return n=e,Ri?Ce(Ri.call(n)):{}}}(e,u,l)}}s||(s=new Gi);var m=s.get(e);if(m)return m;s.set(e,o),no(e)?e.forEach(function(i){o.add(sn(i,t,n,i,e,s))}):Qs(e)&&e.forEach(function(i,r){o.set(r,sn(i,t,n,r,e,s))});var y=p?i:(h?c?ia:ta:c?Do:To)(e);return Pt(y||e,function(i,r){y&&(i=e[r=i]),Ji(o,r,sn(i,t,n,r,e,s))}),o}function on(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var a=n[r],s=t[a],o=e[a];if(o===i&&!(a in e)||!s(o))return!1}return!0}function ln(e,t,r){if("function"!=typeof e)throw new ke(n);return Aa(function(){e.apply(i,r)},t)}function cn(e,t,i,n){var r=-1,a=Tt,s=!0,o=e.length,l=[],c=t.length;if(!o)return l;i&&(t=Mt(t,Kt(i))),n?(a=Dt,s=!1):t.length>=200&&(a=Zt,s=!1,t=new qi(t));e:for(;++r<o;){var h=e[r],p=null==i?h:i(h);if(h=n||0!==h?h:0,s&&p==p){for(var u=c;u--;)if(t[u]===p)continue e;l.push(h)}else a(t,p,n)||l.push(h)}return l}Bi.templateSettings={escape:Y,evaluate:K,interpolate:X,variable:"",imports:{_:Bi}},Bi.prototype=Ni.prototype,Bi.prototype.constructor=Bi,zi.prototype=Li(Ni.prototype),zi.prototype.constructor=zi,Vi.prototype=Li(Ni.prototype),Vi.prototype.constructor=Vi,Hi.prototype.clear=function(){this.__data__=Ei?Ei(null):{},this.size=0},Hi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hi.prototype.get=function(e){var t=this.__data__;if(Ei){var n=t[e];return n===r?i:n}return Fe.call(t,e)?t[e]:i},Hi.prototype.has=function(e){var t=this.__data__;return Ei?t[e]!==i:Fe.call(t,e)},Hi.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ei&&t===i?r:t,this},Wi.prototype.clear=function(){this.__data__=[],this.size=0},Wi.prototype.delete=function(e){var t=this.__data__,i=Qi(t,e);return!(i<0||(i==t.length-1?t.pop():Ue.call(t,i,1),--this.size,0))},Wi.prototype.get=function(e){var t=this.__data__,n=Qi(t,e);return n<0?i:t[n][1]},Wi.prototype.has=function(e){return Qi(this.__data__,e)>-1},Wi.prototype.set=function(e,t){var i=this.__data__,n=Qi(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},$i.prototype.clear=function(){this.size=0,this.__data__={hash:new Hi,map:new(Si||Wi),string:new Hi}},$i.prototype.delete=function(e){var t=oa(this,e).delete(e);return this.size-=t?1:0,t},$i.prototype.get=function(e){return oa(this,e).get(e)},$i.prototype.has=function(e){return oa(this,e).has(e)},$i.prototype.set=function(e,t){var i=oa(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},qi.prototype.add=qi.prototype.push=function(e){return this.__data__.set(e,r),this},qi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.clear=function(){this.__data__=new Wi,this.size=0},Gi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Gi.prototype.get=function(e){return this.__data__.get(e)},Gi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Wi){var n=i.__data__;if(!Si||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new $i(n)}return i.set(e,t),this.size=i.size,this};var hn=Mr(yn),pn=Mr(bn,!0);function un(e,t){var i=!0;return hn(e,function(e,n,r){return i=!!t(e,n,r)}),i}function dn(e,t,n){for(var r=-1,a=e.length;++r<a;){var s=e[r],o=t(s);if(null!=o&&(l===i?o==o&&!ao(o):n(o,l)))var l=o,c=s}return c}function fn(e,t){var i=[];return hn(e,function(e,n,r){t(e,n,r)&&i.push(e)}),i}function mn(e,t,i,n,r){var a=-1,s=e.length;for(i||(i=ma),r||(r=[]);++a<s;){var o=e[a];t>0&&i(o)?t>1?mn(o,t-1,i,n,r):It(r,o):n||(r[r.length]=o)}return r}var gn=Ir(),vn=Ir(!0);function yn(e,t){return e&&gn(e,t,To)}function bn(e,t){return e&&vn(e,t,To)}function xn(e,t){return At(t,function(t){return Ys(e[t])})}function _n(e,t){for(var n=0,r=(t=vr(t,e)).length;null!=e&&n<r;)e=e[ja(t[n++])];return n&&n==r?e:i}function Sn(e,t,i){var n=t(e);return Vs(e)?n:It(n,i(e))}function wn(e){return null==e?e===i?"[object Undefined]":"[object Null]":Je&&Je in Ce(e)?function(e){var t=Fe.call(e,Je),n=e[Je];try{e[Je]=i;var r=!0}catch(e){}var a=Oe.call(e);return r&&(t?e[Je]=n:delete e[Je]),a}(e):function(e){return Oe.call(e)}(e)}function Cn(e,t){return e>t}function Pn(e,t){return null!=e&&Fe.call(e,t)}function En(e,t){return null!=e&&t in Ce(e)}function kn(e,t,n){for(var r=n?Dt:Tt,a=e[0].length,s=e.length,o=s,l=ne(s),c=1/0,h=[];o--;){var p=e[o];o&&t&&(p=Mt(p,Kt(t))),c=gi(p.length,c),l[o]=!n&&(t||a>=120&&p.length>=120)?new qi(o&&p):i}p=e[0];var u=-1,d=l[0];e:for(;++u<a&&h.length<c;){var f=p[u],m=t?t(f):f;if(f=n||0!==f?f:0,!(d?Zt(d,m):r(h,m,n))){for(o=s;--o;){var g=l[o];if(!(g?Zt(g,m):r(e[o],m,n)))continue e}d&&d.push(m),h.push(f)}}return h}function An(e,t,n){var r=null==(e=Pa(e,t=vr(t,e)))?e:e[ja(Ua(t))];return null==r?i:wt(r,e,n)}function Tn(e){return Js(e)&&wn(e)==f}function Dn(e,t,n,r,a){return e===t||(null==e||null==t||!Js(e)&&!Js(t)?e!=e&&t!=t:function(e,t,n,r,a,s){var o=Vs(e),l=Vs(t),c=o?m:ua(e),h=l?m:ua(t),p=(c=c==f?w:c)==w,u=(h=h==f?w:h)==w,d=c==h;if(d&&qs(e)){if(!qs(t))return!1;o=!0,p=!1}if(d&&!p)return s||(s=new Gi),o||so(e)?Qr(e,t,n,r,a,s):function(e,t,i,n,r,a,s){switch(i){case M:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!a(new He(e),new He(t)));case g:case v:case S:return Bs(+e,+t);case y:return e.name==t.name&&e.message==t.message;case P:case k:return e==t+"";case _:var o=ri;case E:var l=1&n;if(o||(o=oi),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var h=Qr(o(e),o(t),n,r,a,s);return s.delete(e),h;case A:if(Ri)return Ri.call(e)==Ri.call(t)}return!1}(e,t,c,n,r,a,s);if(!(1&n)){var b=p&&Fe.call(e,"__wrapped__"),x=u&&Fe.call(t,"__wrapped__");if(b||x){var C=b?e.value():e,T=x?t.value():t;return s||(s=new Gi),a(C,T,n,r,s)}}return!!d&&(s||(s=new Gi),function(e,t,n,r,a,s){var o=1&n,l=ta(e),c=l.length,h=ta(t),p=h.length;if(c!=p&&!o)return!1;for(var u=c;u--;){var d=l[u];if(!(o?d in t:Fe.call(t,d)))return!1}var f=s.get(e),m=s.get(t);if(f&&m)return f==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=o;++u<c;){var y=e[d=l[u]],b=t[d];if(r)var x=o?r(b,y,d,t,e,s):r(y,b,d,e,t,s);if(!(x===i?y===b||a(y,b,n,r,s):x)){g=!1;break}v||(v="constructor"==d)}if(g&&!v){var _=e.constructor,S=t.constructor;_==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof S&&S instanceof S||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,n,r,a,s))}(e,t,n,r,Dn,a))}function Mn(e,t,n,r){var a=n.length,s=a,o=!r;if(null==e)return!s;for(e=Ce(e);a--;){var l=n[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<s;){var c=(l=n[a])[0],h=e[c],p=l[1];if(o&&l[2]){if(h===i&&!(c in e))return!1}else{var u=new Gi;if(r)var d=r(h,p,c,e,t,u);if(!(d===i?Dn(p,h,3,r,u):d))return!1}}return!0}function In(e){return!(!Zs(e)||(t=e,Re&&Re in t))&&(Ys(e)?Ne:fe).test(Ra(e));var t}function Fn(e){return"function"==typeof e?e:null==e?tl:"object"==typeof e?Vs(e)?Nn(e[0],e[1]):Ln(e):hl(e)}function jn(e){if(!_a(e))return fi(e);var t=[];for(var i in Ce(e))Fe.call(e,i)&&"constructor"!=i&&t.push(i);return t}function Rn(e){if(!Zs(e))return function(e){var t=[];if(null!=e)for(var i in Ce(e))t.push(i);return t}(e);var t=_a(e),i=[];for(var n in e)("constructor"!=n||!t&&Fe.call(e,n))&&i.push(n);return i}function On(e,t){return e<t}function Bn(e,t){var i=-1,n=Ws(e)?ne(e.length):[];return hn(e,function(e,r,a){n[++i]=t(e,r,a)}),n}function Ln(e){var t=la(e);return 1==t.length&&t[0][2]?wa(t[0][0],t[0][1]):function(i){return i===e||Mn(i,e,t)}}function Nn(e,t){return ya(e)&&Sa(t)?wa(ja(e),t):function(n){var r=Co(n,e);return r===i&&r===t?Po(n,e):Dn(t,r,3)}}function zn(e,t,n,r,a){e!==t&&gn(t,function(s,o){if(a||(a=new Gi),Zs(s))!function(e,t,n,r,a,s,o){var l=Ea(e,n),c=Ea(t,n),h=o.get(c);if(h)Zi(e,n,h);else{var p=s?s(l,c,n+"",e,t,o):i,u=p===i;if(u){var d=Vs(c),f=!d&&qs(c),m=!d&&!f&&so(c);p=c,d||f||m?Vs(l)?p=l:$s(l)?p=kr(l):f?(u=!1,p=_r(c,!0)):m?(u=!1,p=wr(c,!0)):p=[]:to(c)||zs(c)?(p=l,zs(l)?p=mo(l):Zs(l)&&!Ys(l)||(p=fa(c))):u=!1}u&&(o.set(c,p),a(p,c,r,s,o),o.delete(c)),Zi(e,n,p)}}(e,t,o,n,zn,r,a);else{var l=r?r(Ea(e,o),s,o+"",e,t,a):i;l===i&&(l=s),Zi(e,o,l)}},Do)}function Vn(e,t){var n=e.length;if(n)return ga(t+=t<0?n:0,n)?e[t]:i}function Hn(e,t,i){t=t.length?Mt(t,function(e){return Vs(e)?function(t){return _n(t,1===e.length?e[0]:e)}:e}):[tl];var n=-1;t=Mt(t,Kt(sa()));var r=Bn(e,function(e,i,r){var a=Mt(t,function(t){return t(e)});return{criteria:a,index:++n,value:e}});return function(e,t){var i=e.length;for(e.sort(t);i--;)e[i]=e[i].value;return e}(r,function(e,t){return function(e,t,i){for(var n=-1,r=e.criteria,a=t.criteria,s=r.length,o=i.length;++n<s;){var l=Cr(r[n],a[n]);if(l)return n>=o?l:l*("desc"==i[n]?-1:1)}return e.index-t.index}(e,t,i)})}function Wn(e,t,i){for(var n=-1,r=t.length,a={};++n<r;){var s=t[n],o=_n(e,s);i(o,s)&&Zn(a,vr(s,e),o)}return a}function $n(e,t,i,n){var r=n?zt:Nt,a=-1,s=t.length,o=e;for(e===t&&(t=kr(t)),i&&(o=Mt(e,Kt(i)));++a<s;)for(var l=0,c=t[a],h=i?i(c):c;(l=r(o,h,l,n))>-1;)o!==e&&Ue.call(o,l,1),Ue.call(e,l,1);return e}function qn(e,t){for(var i=e?t.length:0,n=i-1;i--;){var r=t[i];if(i==n||r!==a){var a=r;ga(r)?Ue.call(e,r,1):cr(e,r)}}return e}function Gn(e,t){return e+dt(bi()*(t-e+1))}function Un(e,t){var i="";if(!e||t<1||t>h)return i;do{t%2&&(i+=e),(t=dt(t/2))&&(e+=e)}while(t);return i}function Yn(e,t){return Ta(Ca(e,t,tl),e+"")}function Kn(e){return Yi(Lo(e))}function Xn(e,t){var i=Lo(e);return Ia(i,an(t,0,i.length))}function Zn(e,t,n,r){if(!Zs(e))return e;for(var a=-1,s=(t=vr(t,e)).length,o=s-1,l=e;null!=l&&++a<s;){var c=ja(t[a]),h=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(a!=o){var p=l[c];(h=r?r(p,c,l):i)===i&&(h=Zs(p)?p:ga(t[a+1])?[]:{})}Ji(l,c,h),l=l[c]}return e}var Jn=ki?function(e,t){return ki.set(e,t),e}:tl,Qn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Jo(t),writable:!0})}:tl;function er(e){return Ia(Lo(e))}function tr(e,t,i){var n=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(i=i>r?r:i)<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var a=ne(r);++n<r;)a[n]=e[n+t];return a}function ir(e,t){var i;return hn(e,function(e,n,r){return!(i=t(e,n,r))}),!!i}function nr(e,t,i){var n=0,r=null==e?n:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;n<r;){var a=n+r>>>1,s=e[a];null!==s&&!ao(s)&&(i?s<=t:s<t)?n=a+1:r=a}return r}return rr(e,t,tl,i)}function rr(e,t,n,r){var a=0,s=null==e?0:e.length;if(0===s)return 0;for(var o=(t=n(t))!=t,l=null===t,c=ao(t),h=t===i;a<s;){var p=dt((a+s)/2),u=n(e[p]),d=u!==i,f=null===u,m=u==u,g=ao(u);if(o)var v=r||m;else v=h?m&&(r||d):l?m&&d&&(r||!f):c?m&&d&&!f&&(r||!g):!f&&!g&&(r?u<=t:u<t);v?a=p+1:s=p}return gi(s,4294967294)}function ar(e,t){for(var i=-1,n=e.length,r=0,a=[];++i<n;){var s=e[i],o=t?t(s):s;if(!i||!Bs(o,l)){var l=o;a[r++]=0===s?0:s}}return a}function sr(e){return"number"==typeof e?e:ao(e)?p:+e}function or(e){if("string"==typeof e)return e;if(Vs(e))return Mt(e,or)+"";if(ao(e))return Oi?Oi.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function lr(e,t,i){var n=-1,r=Tt,a=e.length,s=!0,o=[],l=o;if(i)s=!1,r=Dt;else if(a>=200){var c=t?null:Ur(e);if(c)return oi(c);s=!1,r=Zt,l=new qi}else l=t?[]:o;e:for(;++n<a;){var h=e[n],p=t?t(h):h;if(h=i||0!==h?h:0,s&&p==p){for(var u=l.length;u--;)if(l[u]===p)continue e;t&&l.push(p),o.push(h)}else r(l,p,i)||(l!==o&&l.push(p),o.push(h))}return o}function cr(e,t){var i=-1,n=(t=vr(t,e)).length;if(!n)return!0;for(var r=null==e||"object"!=typeof e&&"function"!=typeof e;++i<n;){var a=t[i];if("string"==typeof a){if("__proto__"===a&&!Fe.call(e,"__proto__"))return!1;if("constructor"===a&&i+1<n&&"string"==typeof t[i+1]&&"prototype"===t[i+1]){if(r&&0===i)continue;return!1}}}var s=Pa(e,t);return null==s||delete s[ja(Ua(t))]}function hr(e,t,i,n){return Zn(e,t,i(_n(e,t)),n)}function pr(e,t,i,n){for(var r=e.length,a=n?r:-1;(n?a--:++a<r)&&t(e[a],a,e););return i?tr(e,n?0:a,n?a+1:r):tr(e,n?a+1:0,n?r:a)}function ur(e,t){var i=e;return i instanceof Vi&&(i=i.value()),Ft(t,function(e,t){return t.func.apply(t.thisArg,It([e],t.args))},i)}function dr(e,t,i){var n=e.length;if(n<2)return n?lr(e[0]):[];for(var r=-1,a=ne(n);++r<n;)for(var s=e[r],o=-1;++o<n;)o!=r&&(a[r]=cn(a[r]||s,e[o],t,i));return lr(mn(a,1),t,i)}function fr(e,t,n){for(var r=-1,a=e.length,s=t.length,o={};++r<a;){var l=r<s?t[r]:i;n(o,e[r],l)}return o}function mr(e){return $s(e)?e:[]}function gr(e){return"function"==typeof e?e:tl}function vr(e,t){return Vs(e)?e:ya(e,t)?[e]:Fa(go(e))}var yr=Yn;function br(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:tr(e,t,n)}var xr=st||function(e){return pt.clearTimeout(e)};function _r(e,t){if(t)return e.slice();var i=e.length,n=We?We(i):new e.constructor(i);return e.copy(n),n}function Sr(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function wr(e,t){var i=t?Sr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Cr(e,t){if(e!==t){var n=e!==i,r=null===e,a=e==e,s=ao(e),o=t!==i,l=null===t,c=t==t,h=ao(t);if(!l&&!h&&!s&&e>t||s&&o&&c&&!l&&!h||r&&o&&c||!n&&c||!a)return 1;if(!r&&!s&&!h&&e<t||h&&n&&a&&!r&&!s||l&&n&&a||!o&&a||!c)return-1}return 0}function Pr(e,t,i,n){for(var r=-1,a=e.length,s=i.length,o=-1,l=t.length,c=mi(a-s,0),h=ne(l+c),p=!n;++o<l;)h[o]=t[o];for(;++r<s;)(p||r<a)&&(h[i[r]]=e[r]);for(;c--;)h[o++]=e[r++];return h}function Er(e,t,i,n){for(var r=-1,a=e.length,s=-1,o=i.length,l=-1,c=t.length,h=mi(a-o,0),p=ne(h+c),u=!n;++r<h;)p[r]=e[r];for(var d=r;++l<c;)p[d+l]=t[l];for(;++s<o;)(u||r<a)&&(p[d+i[s]]=e[r++]);return p}function kr(e,t){var i=-1,n=e.length;for(t||(t=ne(n));++i<n;)t[i]=e[i];return t}function Ar(e,t,n,r){var a=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var l=t[s],c=r?r(n[l],e[l],l,n,e):i;c===i&&(c=e[l]),a?nn(n,l,c):Ji(n,l,c)}return n}function Tr(e,t){return function(i,n){var r=Vs(i)?Ct:en,a=t?t():{};return r(i,e,sa(n,2),a)}}function Dr(e){return Yn(function(t,n){var r=-1,a=n.length,s=a>1?n[a-1]:i,o=a>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(a--,s):i,o&&va(n[0],n[1],o)&&(s=a<3?i:s,a=1),t=Ce(t);++r<a;){var l=n[r];l&&e(t,l,r,s)}return t})}function Mr(e,t){return function(i,n){if(null==i)return i;if(!Ws(i))return e(i,n);for(var r=i.length,a=t?r:-1,s=Ce(i);(t?a--:++a<r)&&!1!==n(s[a],a,s););return i}}function Ir(e){return function(t,i,n){for(var r=-1,a=Ce(t),s=n(t),o=s.length;o--;){var l=s[e?o:++r];if(!1===i(a[l],l,a))break}return t}}function Fr(e){return function(t){var n=ni(t=go(t))?hi(t):i,r=n?n[0]:t.charAt(0),a=n?br(n,1).join(""):t.slice(1);return r[e]()+a}}function jr(e){return function(t){return Ft(Ko(Vo(t).replace(Xe,"")),e,"")}}function Rr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=Li(e.prototype),n=e.apply(i,t);return Zs(n)?n:i}}function Or(e){return function(t,n,r){var a=Ce(t);if(!Ws(t)){var s=sa(n,3);t=To(t),n=function(e){return s(a[e],e,a)}}var o=e(t,n,r);return o>-1?a[s?t[o]:o]:i}}function Br(e){return ea(function(t){var r=t.length,a=r,s=zi.prototype.thru;for(e&&t.reverse();a--;){var o=t[a];if("function"!=typeof o)throw new ke(n);if(s&&!l&&"wrapper"==ra(o))var l=new zi([],!0)}for(a=l?a:r;++a<r;){var c=ra(o=t[a]),h="wrapper"==c?na(o):i;l=h&&ba(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?l[ra(h[0])].apply(l,h[3]):1==o.length&&ba(o)?l[c]():l.thru(o)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&Vs(i))return l.plant(i).value();for(var n=0,a=r?t[n].apply(this,e):i;++n<r;)a=t[n].call(this,a);return a}})}function Lr(e,t,n,r,a,s,l,c,h,p){var u=t&o,d=1&t,f=2&t,m=24&t,g=512&t,v=f?i:Rr(e);return function o(){for(var y=arguments.length,b=ne(y),x=y;x--;)b[x]=arguments[x];if(m)var _=aa(o),S=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(b,_);if(r&&(b=Pr(b,r,a,m)),s&&(b=Er(b,s,l,m)),y-=S,m&&y<p){var w=si(b,_);return qr(e,t,Lr,o.placeholder,n,b,w,c,h,p-y)}var C=d?n:this,P=f?C[e]:e;return y=b.length,c?b=function(e,t){for(var n=e.length,r=gi(t.length,n),a=kr(e);r--;){var s=t[r];e[r]=ga(s,n)?a[s]:i}return e}(b,c):g&&y>1&&b.reverse(),u&&h<y&&(b.length=h),this&&this!==pt&&this instanceof o&&(P=v||Rr(P)),P.apply(C,b)}}function Nr(e,t){return function(i,n){return function(e,t,i,n){return yn(e,function(e,r,a){t(n,i(e),r,a)}),n}(i,e,t(n),{})}}function zr(e,t){return function(n,r){var a;if(n===i&&r===i)return t;if(n!==i&&(a=n),r!==i){if(a===i)return r;"string"==typeof n||"string"==typeof r?(n=or(n),r=or(r)):(n=sr(n),r=sr(r)),a=e(n,r)}return a}}function Vr(e){return ea(function(t){return t=Mt(t,Kt(sa())),Yn(function(i){var n=this;return e(t,function(e){return wt(e,n,i)})})})}function Hr(e,t){var n=(t=t===i?" ":or(t)).length;if(n<2)return n?Un(t,e):t;var r=Un(t,ut(e/ci(t)));return ni(t)?br(hi(r),0,e).join(""):r.slice(0,e)}function Wr(e){return function(t,n,r){return r&&"number"!=typeof r&&va(t,n,r)&&(n=r=i),t=ho(t),n===i?(n=t,t=0):n=ho(n),function(e,t,i,n){for(var r=-1,a=mi(ut((t-e)/(i||1)),0),s=ne(a);a--;)s[n?a:++r]=e,e+=i;return s}(t,n,r=r===i?t<n?1:-1:ho(r),e)}}function $r(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=fo(t),i=fo(i)),e(t,i)}}function qr(e,t,n,r,a,o,l,c,h,p){var u=8&t;t|=u?s:64,4&(t&=~(u?64:s))||(t&=-4);var d=[e,t,a,u?o:i,u?l:i,u?i:o,u?i:l,c,h,p],f=n.apply(i,d);return ba(e)&&ka(f,d),f.placeholder=r,Da(f,e,t)}function Gr(e){var t=we[e];return function(e,i){if(e=fo(e),(i=null==i?0:gi(po(i),292))&&Ot(e)){var n=(go(e)+"e").split("e");return+((n=(go(t(n[0]+"e"+(+n[1]+i)))+"e").split("e"))[0]+"e"+(+n[1]-i))}return t(e)}}var Ur=Ci&&1/oi(new Ci([,-0]))[1]==c?function(e){return new Ci(e)}:sl;function Yr(e){return function(t){var i=ua(t);return i==_?ri(t):i==E?li(t):function(e,t){return Mt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Kr(e,t,r,c,h,p,u,d){var f=2&t;if(!f&&"function"!=typeof e)throw new ke(n);var m=c?c.length:0;if(m||(t&=-97,c=h=i),u=u===i?u:mi(po(u),0),d=d===i?d:po(d),m-=h?h.length:0,64&t){var g=c,v=h;c=h=i}var y=f?i:na(e),b=[e,t,r,c,h,g,v,p,u,d];if(y&&function(e,t){var i=e[1],n=t[1],r=i|n,s=r<131,c=n==o&&8==i||n==o&&i==l&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==i;if(!s&&!c)return e;1&n&&(e[2]=t[2],r|=1&i?0:4);var h=t[3];if(h){var p=e[3];e[3]=p?Pr(p,h,t[4]):h,e[4]=p?si(e[3],a):t[4]}(h=t[5])&&(p=e[5],e[5]=p?Er(p,h,t[6]):h,e[6]=p?si(e[5],a):t[6]),(h=t[7])&&(e[7]=h),n&o&&(e[8]=null==e[8]?t[8]:gi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(b,y),e=b[0],t=b[1],r=b[2],c=b[3],h=b[4],!(d=b[9]=b[9]===i?f?0:e.length:mi(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||16==t?function(e,t,n){var r=Rr(e);return function a(){for(var s=arguments.length,o=ne(s),l=s,c=aa(a);l--;)o[l]=arguments[l];var h=s<3&&o[0]!==c&&o[s-1]!==c?[]:si(o,c);return(s-=h.length)<n?qr(e,t,Lr,a.placeholder,i,o,h,i,i,n-s):wt(this&&this!==pt&&this instanceof a?r:e,this,o)}}(e,t,d):t!=s&&33!=t||h.length?Lr.apply(i,b):function(e,t,i,n){var r=1&t,a=Rr(e);return function t(){for(var s=-1,o=arguments.length,l=-1,c=n.length,h=ne(c+o),p=this&&this!==pt&&this instanceof t?a:e;++l<c;)h[l]=n[l];for(;o--;)h[l++]=arguments[++s];return wt(p,r?i:this,h)}}(e,t,r,c);else var x=function(e,t,i){var n=1&t,r=Rr(e);return function t(){return(this&&this!==pt&&this instanceof t?r:e).apply(n?i:this,arguments)}}(e,t,r);return Da((y?Jn:ka)(x,b),e,t)}function Xr(e,t,n,r){return e===i||Bs(e,De[n])&&!Fe.call(r,n)?t:e}function Zr(e,t,n,r,a,s){return Zs(e)&&Zs(t)&&(s.set(t,e),zn(e,t,i,Zr,s),s.delete(t)),e}function Jr(e){return to(e)?i:e}function Qr(e,t,n,r,a,s){var o=1&n,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var u=-1,d=!0,f=2&n?new qi:i;for(s.set(e,t),s.set(t,e);++u<l;){var m=e[u],g=t[u];if(r)var v=o?r(g,m,u,t,e,s):r(m,g,u,e,t,s);if(v!==i){if(v)continue;d=!1;break}if(f){if(!Rt(t,function(e,t){if(!Zt(f,t)&&(m===e||a(m,e,n,r,s)))return f.push(t)})){d=!1;break}}else if(m!==g&&!a(m,g,n,r,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function ea(e){return Ta(Ca(e,i,Ha),e+"")}function ta(e){return Sn(e,To,ha)}function ia(e){return Sn(e,Do,pa)}var na=ki?function(e){return ki.get(e)}:sl;function ra(e){for(var t=e.name+"",i=Ai[t],n=Fe.call(Ai,t)?i.length:0;n--;){var r=i[n],a=r.func;if(null==a||a==e)return r.name}return t}function aa(e){return(Fe.call(Bi,"placeholder")?Bi:e).placeholder}function sa(){var e=Bi.iteratee||il;return e=e===il?Fn:e,arguments.length?e(arguments[0],arguments[1]):e}function oa(e,t){var i,n,r=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?r["string"==typeof t?"string":"hash"]:r.map}function la(e){for(var t=To(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,Sa(r)]}return t}function ca(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return In(n)?n:i}var ha=mt?function(e){return null==e?[]:(e=Ce(e),At(mt(e),function(t){return Ge.call(e,t)}))}:dl,pa=mt?function(e){for(var t=[];e;)It(t,ha(e)),e=$e(e);return t}:dl,ua=wn;function da(e,t,i){for(var n=-1,r=(t=vr(t,e)).length,a=!1;++n<r;){var s=ja(t[n]);if(!(a=null!=e&&i(e,s)))break;e=e[s]}return a||++n!=r?a:!!(r=null==e?0:e.length)&&Xs(r)&&ga(s,r)&&(Vs(e)||zs(e))}function fa(e){return"function"!=typeof e.constructor||_a(e)?{}:Li($e(e))}function ma(e){return Vs(e)||zs(e)||!!(Ye&&e&&e[Ye])}function ga(e,t){var i=typeof e;return!!(t=null==t?h:t)&&("number"==i||"symbol"!=i&&ge.test(e))&&e>-1&&e%1==0&&e<t}function va(e,t,i){if(!Zs(i))return!1;var n=typeof t;return!!("number"==n?Ws(i)&&ga(t,i.length):"string"==n&&t in i)&&Bs(i[t],e)}function ya(e,t){if(Vs(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ao(e))||J.test(e)||!Z.test(e)||null!=t&&e in Ce(t)}function ba(e){var t=ra(e),i=Bi[t];if("function"!=typeof i||!(t in Vi.prototype))return!1;if(e===i)return!0;var n=na(i);return!!n&&e===n[0]}(_i&&ua(new _i(new ArrayBuffer(1)))!=M||Si&&ua(new Si)!=_||wi&&ua(wi.resolve())!=C||Ci&&ua(new Ci)!=E||Pi&&ua(new Pi)!=T)&&(ua=function(e){var t=wn(e),n=t==w?e.constructor:i,r=n?Ra(n):"";if(r)switch(r){case Ti:return M;case Di:return _;case Mi:return C;case Ii:return E;case Fi:return T}return t});var xa=Me?Ys:fl;function _a(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||De)}function Sa(e){return e==e&&!Zs(e)}function wa(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Ce(n))}}function Ca(e,t,n){return t=mi(t===i?e.length-1:t,0),function(){for(var i=arguments,r=-1,a=mi(i.length-t,0),s=ne(a);++r<a;)s[r]=i[t+r];r=-1;for(var o=ne(t+1);++r<t;)o[r]=i[r];return o[t]=n(s),wt(e,this,o)}}function Pa(e,t){return t.length<2?e:_n(e,tr(t,0,-1))}function Ea(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ka=Ma(Jn),Aa=ht||function(e,t){return pt.setTimeout(e,t)},Ta=Ma(Qn);function Da(e,t,i){var n=t+"";return Ta(e,function(e,t){var i=t.length;if(!i)return e;var n=i-1;return t[n]=(i>1?"& ":"")+t[n],t=t.join(i>2?", ":" "),e.replace(re,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Pt(d,function(i){var n="_."+i[0];t&i[1]&&!Tt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(n),i)))}function Ma(e){var t=0,n=0;return function(){var r=vi(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Ia(e,t){var n=-1,r=e.length,a=r-1;for(t=t===i?r:t;++n<t;){var s=Gn(n,a),o=e[s];e[s]=e[n],e[n]=o}return e.length=t,e}var Fa=function(e){var t=Ms(e,function(e){return 500===i.size&&i.clear(),e}),i=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,i,n,r){t.push(n?r.replace(ce,"$1"):i||e)}),t});function ja(e){if("string"==typeof e||ao(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ra(e){if(null!=e){try{return Ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Oa(e){if(e instanceof Vi)return e.clone();var t=new zi(e.__wrapped__,e.__chain__);return t.__actions__=kr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ba=Yn(function(e,t){return $s(e)?cn(e,mn(t,1,$s,!0)):[]}),La=Yn(function(e,t){var n=Ua(t);return $s(n)&&(n=i),$s(e)?cn(e,mn(t,1,$s,!0),sa(n,2)):[]}),Na=Yn(function(e,t){var n=Ua(t);return $s(n)&&(n=i),$s(e)?cn(e,mn(t,1,$s,!0),i,n):[]});function za(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:po(i);return r<0&&(r=mi(n+r,0)),Lt(e,sa(t,3),r)}function Va(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r-1;return n!==i&&(a=po(n),a=n<0?mi(r+a,0):gi(a,r-1)),Lt(e,sa(t,3),a,!0)}function Ha(e){return null!=e&&e.length?mn(e,1):[]}function Wa(e){return e&&e.length?e[0]:i}var $a=Yn(function(e){var t=Mt(e,mr);return t.length&&t[0]===e[0]?kn(t):[]}),qa=Yn(function(e){var t=Ua(e),n=Mt(e,mr);return t===Ua(n)?t=i:n.pop(),n.length&&n[0]===e[0]?kn(n,sa(t,2)):[]}),Ga=Yn(function(e){var t=Ua(e),n=Mt(e,mr);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?kn(n,i,t):[]});function Ua(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ya=Yn(Ka);function Ka(e,t){return e&&e.length&&t&&t.length?$n(e,t):e}var Xa=ea(function(e,t){var i=null==e?0:e.length,n=rn(e,t);return qn(e,Mt(t,function(e){return ga(e,i)?+e:e}).sort(Cr)),n});function Za(e){return null==e?e:xi.call(e)}var Ja=Yn(function(e){return lr(mn(e,1,$s,!0))}),Qa=Yn(function(e){var t=Ua(e);return $s(t)&&(t=i),lr(mn(e,1,$s,!0),sa(t,2))}),es=Yn(function(e){var t=Ua(e);return t="function"==typeof t?t:i,lr(mn(e,1,$s,!0),i,t)});function ts(e){if(!e||!e.length)return[];var t=0;return e=At(e,function(e){if($s(e))return t=mi(e.length,t),!0}),Ut(t,function(t){return Mt(e,Wt(t))})}function is(e,t){if(!e||!e.length)return[];var n=ts(e);return null==t?n:Mt(n,function(e){return wt(t,i,e)})}var ns=Yn(function(e,t){return $s(e)?cn(e,t):[]}),rs=Yn(function(e){return dr(At(e,$s))}),as=Yn(function(e){var t=Ua(e);return $s(t)&&(t=i),dr(At(e,$s),sa(t,2))}),ss=Yn(function(e){var t=Ua(e);return t="function"==typeof t?t:i,dr(At(e,$s),i,t)}),os=Yn(ts),ls=Yn(function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,is(e,n)});function cs(e){var t=Bi(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ps=ea(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,a=function(t){return rn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vi&&ga(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:hs,args:[a],thisArg:i}),new zi(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(a)}),us=Tr(function(e,t,i){Fe.call(e,i)?++e[i]:nn(e,i,1)}),ds=Or(za),fs=Or(Va);function ms(e,t){return(Vs(e)?Pt:hn)(e,sa(t,3))}function gs(e,t){return(Vs(e)?Et:pn)(e,sa(t,3))}var vs=Tr(function(e,t,i){Fe.call(e,i)?e[i].push(t):nn(e,i,[t])}),ys=Yn(function(e,t,i){var n=-1,r="function"==typeof t,a=Ws(e)?ne(e.length):[];return hn(e,function(e){a[++n]=r?wt(t,e,i):An(e,t,i)}),a}),bs=Tr(function(e,t,i){nn(e,i,t)});function xs(e,t){return(Vs(e)?Mt:Bn)(e,sa(t,3))}var _s=Tr(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]}),Ss=Yn(function(e,t){if(null==e)return[];var i=t.length;return i>1&&va(e,t[0],t[1])?t=[]:i>2&&va(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,mn(t,1),[])}),ws=ct||function(){return pt.Date.now()};function Cs(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Kr(e,o,i,i,i,i,t)}function Ps(e,t){var r;if("function"!=typeof t)throw new ke(n);return e=po(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Es=Yn(function(e,t,i){var n=1;if(i.length){var r=si(i,aa(Es));n|=s}return Kr(e,n,t,i,r)}),ks=Yn(function(e,t,i){var n=3;if(i.length){var r=si(i,aa(ks));n|=s}return Kr(t,n,e,i,r)});function As(e,t,r){var a,s,o,l,c,h,p=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new ke(n);function m(t){var n=a,r=s;return a=s=i,p=t,l=e.apply(r,n)}function g(e){var n=e-h;return h===i||n>=t||n<0||d&&e-p>=o}function v(){var e=ws();if(g(e))return y(e);c=Aa(v,function(e){var i=t-(e-h);return d?gi(i,o-(e-p)):i}(e))}function y(e){return c=i,f&&a?m(e):(a=s=i,l)}function b(){var e=ws(),n=g(e);if(a=arguments,s=this,h=e,n){if(c===i)return function(e){return p=e,c=Aa(v,t),u?m(e):l}(h);if(d)return xr(c),c=Aa(v,t),m(h)}return c===i&&(c=Aa(v,t)),l}return t=fo(t)||0,Zs(r)&&(u=!!r.leading,o=(d="maxWait"in r)?mi(fo(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f),b.cancel=function(){c!==i&&xr(c),p=0,a=h=s=c=i},b.flush=function(){return c===i?l:y(ws())},b}var Ts=Yn(function(e,t){return ln(e,1,t)}),Ds=Yn(function(e,t,i){return ln(e,fo(t)||0,i)});function Ms(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(n);var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],a=i.cache;if(a.has(r))return a.get(r);var s=e.apply(this,n);return i.cache=a.set(r,s)||a,s};return i.cache=new(Ms.Cache||$i),i}function Is(e){if("function"!=typeof e)throw new ke(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ms.Cache=$i;var Fs=yr(function(e,t){var i=(t=1==t.length&&Vs(t[0])?Mt(t[0],Kt(sa())):Mt(mn(t,1),Kt(sa()))).length;return Yn(function(n){for(var r=-1,a=gi(n.length,i);++r<a;)n[r]=t[r].call(this,n[r]);return wt(e,this,n)})}),js=Yn(function(e,t){var n=si(t,aa(js));return Kr(e,s,i,t,n)}),Rs=Yn(function(e,t){var n=si(t,aa(Rs));return Kr(e,64,i,t,n)}),Os=ea(function(e,t){return Kr(e,l,i,i,i,t)});function Bs(e,t){return e===t||e!=e&&t!=t}var Ls=$r(Cn),Ns=$r(function(e,t){return e>=t}),zs=Tn(function(){return arguments}())?Tn:function(e){return Js(e)&&Fe.call(e,"callee")&&!Ge.call(e,"callee")},Vs=ne.isArray,Hs=vt?Kt(vt):function(e){return Js(e)&&wn(e)==D};function Ws(e){return null!=e&&Xs(e.length)&&!Ys(e)}function $s(e){return Js(e)&&Ws(e)}var qs=gt||fl,Gs=yt?Kt(yt):function(e){return Js(e)&&wn(e)==v};function Us(e){if(!Js(e))return!1;var t=wn(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!to(e)}function Ys(e){if(!Zs(e))return!1;var t=wn(e);return t==b||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ks(e){return"number"==typeof e&&e==po(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Zs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Js(e){return null!=e&&"object"==typeof e}var Qs=bt?Kt(bt):function(e){return Js(e)&&ua(e)==_};function eo(e){return"number"==typeof e||Js(e)&&wn(e)==S}function to(e){if(!Js(e)||wn(e)!=w)return!1;var t=$e(e);if(null===t)return!0;var i=Fe.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Ie.call(i)==Be}var io=xt?Kt(xt):function(e){return Js(e)&&wn(e)==P},no=_t?Kt(_t):function(e){return Js(e)&&ua(e)==E};function ro(e){return"string"==typeof e||!Vs(e)&&Js(e)&&wn(e)==k}function ao(e){return"symbol"==typeof e||Js(e)&&wn(e)==A}var so=St?Kt(St):function(e){return Js(e)&&Xs(e.length)&&!!rt[wn(e)]},oo=$r(On),lo=$r(function(e,t){return e<=t});function co(e){if(!e)return[];if(Ws(e))return ro(e)?hi(e):kr(e);if(Ke&&e[Ke])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[Ke]());var t=ua(e);return(t==_?ri:t==E?oi:Lo)(e)}function ho(e){return e?(e=fo(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function po(e){var t=ho(e),i=t%1;return t==t?i?t-i:t:0}function uo(e){return e?an(po(e),0,u):0}function fo(e){if("number"==typeof e)return e;if(ao(e))return p;if(Zs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Zs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var i=de.test(e);return i||me.test(e)?lt(e.slice(2),i?2:8):ue.test(e)?p:+e}function mo(e){return Ar(e,Do(e))}function go(e){return null==e?"":or(e)}var vo=Dr(function(e,t){if(_a(t)||Ws(t))Ar(t,To(t),e);else for(var i in t)Fe.call(t,i)&&Ji(e,i,t[i])}),yo=Dr(function(e,t){Ar(t,Do(t),e)}),bo=Dr(function(e,t,i,n){Ar(t,Do(t),e,n)}),xo=Dr(function(e,t,i,n){Ar(t,To(t),e,n)}),_o=ea(rn),So=Yn(function(e,t){e=Ce(e);var n=-1,r=t.length,a=r>2?t[2]:i;for(a&&va(t[0],t[1],a)&&(r=1);++n<r;)for(var s=t[n],o=Do(s),l=-1,c=o.length;++l<c;){var h=o[l],p=e[h];(p===i||Bs(p,De[h])&&!Fe.call(e,h))&&(e[h]=s[h])}return e}),wo=Yn(function(e){return e.push(i,Zr),wt(Io,i,e)});function Co(e,t,n){var r=null==e?i:_n(e,t);return r===i?n:r}function Po(e,t){return null!=e&&da(e,t,En)}var Eo=Nr(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),e[t]=i},Jo(tl)),ko=Nr(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),Fe.call(e,t)?e[t].push(i):e[t]=[i]},sa),Ao=Yn(An);function To(e){return Ws(e)?Ui(e):jn(e)}function Do(e){return Ws(e)?Ui(e,!0):Rn(e)}var Mo=Dr(function(e,t,i){zn(e,t,i)}),Io=Dr(function(e,t,i,n){zn(e,t,i,n)}),Fo=ea(function(e,t){var i={};if(null==e)return i;var n=!1;t=Mt(t,function(t){return t=vr(t,e),n||(n=t.length>1),t}),Ar(e,ia(e),i),n&&(i=sn(i,7,Jr));for(var r=t.length;r--;)cr(i,t[r]);return i}),jo=ea(function(e,t){return null==e?{}:function(e,t){return Wn(e,t,function(t,i){return Po(e,i)})}(e,t)});function Ro(e,t){if(null==e)return{};var i=Mt(ia(e),function(e){return[e]});return t=sa(t),Wn(e,i,function(e,i){return t(e,i[0])})}var Oo=Yr(To),Bo=Yr(Do);function Lo(e){return null==e?[]:Xt(e,To(e))}var No=jr(function(e,t,i){return t=t.toLowerCase(),e+(i?zo(t):t)});function zo(e){return Yo(go(e).toLowerCase())}function Vo(e){return(e=go(e))&&e.replace(ve,ei).replace(Ze,"")}var Ho=jr(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),Wo=jr(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),$o=Fr("toLowerCase"),qo=jr(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}),Go=jr(function(e,t,i){return e+(i?" ":"")+Yo(t)}),Uo=jr(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),Yo=Fr("toUpperCase");function Ko(e,t,n){return e=go(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(oe)||[]}(e):e.match(t)||[]}var Xo=Yn(function(e,t){try{return wt(e,i,t)}catch(e){return Us(e)?e:new _e(e)}}),Zo=ea(function(e,t){return Pt(t,function(t){t=ja(t),nn(e,t,Es(e[t],e))}),e});function Jo(e){return function(){return e}}var Qo=Br(),el=Br(!0);function tl(e){return e}function il(e){return Fn("function"==typeof e?e:sn(e,1))}var nl=Yn(function(e,t){return function(i){return An(i,e,t)}}),rl=Yn(function(e,t){return function(i){return An(e,i,t)}});function al(e,t,i){var n=To(t),r=xn(t,n);null!=i||Zs(t)&&(r.length||!n.length)||(i=t,t=e,e=this,r=xn(t,To(t)));var a=!(Zs(i)&&"chain"in i&&!i.chain),s=Ys(e);return Pt(r,function(i){var n=t[i];e[i]=n,s&&(e.prototype[i]=function(){var t=this.__chain__;if(a||t){var i=e(this.__wrapped__);return(i.__actions__=kr(this.__actions__)).push({func:n,args:arguments,thisArg:e}),i.__chain__=t,i}return n.apply(e,It([this.value()],arguments))})}),e}function sl(){}var ol=Vr(Mt),ll=Vr(kt),cl=Vr(Rt);function hl(e){return ya(e)?Wt(ja(e)):function(e){return function(t){return _n(t,e)}}(e)}var pl=Wr(),ul=Wr(!0);function dl(){return[]}function fl(){return!1}var ml,gl=zr(function(e,t){return e+t},0),vl=Gr("ceil"),yl=zr(function(e,t){return e/t},1),bl=Gr("floor"),xl=zr(function(e,t){return e*t},1),_l=Gr("round"),Sl=zr(function(e,t){return e-t},0);return Bi.after=function(e,t){if("function"!=typeof t)throw new ke(n);return e=po(e),function(){if(--e<1)return t.apply(this,arguments)}},Bi.ary=Cs,Bi.assign=vo,Bi.assignIn=yo,Bi.assignInWith=bo,Bi.assignWith=xo,Bi.at=_o,Bi.before=Ps,Bi.bind=Es,Bi.bindAll=Zo,Bi.bindKey=ks,Bi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},Bi.chain=cs,Bi.chunk=function(e,t,n){t=(n?va(e,t,n):t===i)?1:mi(po(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var a=0,s=0,o=ne(ut(r/t));a<r;)o[s++]=tr(e,a,a+=t);return o},Bi.compact=function(e){for(var t=-1,i=null==e?0:e.length,n=0,r=[];++t<i;){var a=e[t];a&&(r[n++]=a)}return r},Bi.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ne(e-1),i=arguments[0],n=e;n--;)t[n-1]=arguments[n];return It(Vs(i)?kr(i):[i],mn(t,1))},Bi.cond=function(e){var t=null==e?0:e.length,i=sa();return e=t?Mt(e,function(e){if("function"!=typeof e[1])throw new ke(n);return[i(e[0]),e[1]]}):[],Yn(function(i){for(var n=-1;++n<t;){var r=e[n];if(wt(r[0],this,i))return wt(r[1],this,i)}})},Bi.conforms=function(e){return function(e){var t=To(e);return function(i){return on(i,e,t)}}(sn(e,1))},Bi.constant=Jo,Bi.countBy=us,Bi.create=function(e,t){var i=Li(e);return null==t?i:tn(i,t)},Bi.curry=function e(t,n,r){var a=Kr(t,8,i,i,i,i,i,n=r?i:n);return a.placeholder=e.placeholder,a},Bi.curryRight=function e(t,n,r){var a=Kr(t,16,i,i,i,i,i,n=r?i:n);return a.placeholder=e.placeholder,a},Bi.debounce=As,Bi.defaults=So,Bi.defaultsDeep=wo,Bi.defer=Ts,Bi.delay=Ds,Bi.difference=Ba,Bi.differenceBy=La,Bi.differenceWith=Na,Bi.drop=function(e,t,n){var r=null==e?0:e.length;return r?tr(e,(t=n||t===i?1:po(t))<0?0:t,r):[]},Bi.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?tr(e,0,(t=r-(t=n||t===i?1:po(t)))<0?0:t):[]},Bi.dropRightWhile=function(e,t){return e&&e.length?pr(e,sa(t,3),!0,!0):[]},Bi.dropWhile=function(e,t){return e&&e.length?pr(e,sa(t,3),!0):[]},Bi.fill=function(e,t,n,r){var a=null==e?0:e.length;return a?(n&&"number"!=typeof n&&va(e,t,n)&&(n=0,r=a),function(e,t,n,r){var a=e.length;for((n=po(n))<0&&(n=-n>a?0:a+n),(r=r===i||r>a?a:po(r))<0&&(r+=a),r=n>r?0:uo(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Bi.filter=function(e,t){return(Vs(e)?At:fn)(e,sa(t,3))},Bi.flatMap=function(e,t){return mn(xs(e,t),1)},Bi.flatMapDeep=function(e,t){return mn(xs(e,t),c)},Bi.flatMapDepth=function(e,t,n){return n=n===i?1:po(n),mn(xs(e,t),n)},Bi.flatten=Ha,Bi.flattenDeep=function(e){return null!=e&&e.length?mn(e,c):[]},Bi.flattenDepth=function(e,t){return null!=e&&e.length?mn(e,t=t===i?1:po(t)):[]},Bi.flip=function(e){return Kr(e,512)},Bi.flow=Qo,Bi.flowRight=el,Bi.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,n={};++t<i;){var r=e[t];n[r[0]]=r[1]}return n},Bi.functions=function(e){return null==e?[]:xn(e,To(e))},Bi.functionsIn=function(e){return null==e?[]:xn(e,Do(e))},Bi.groupBy=vs,Bi.initial=function(e){return null!=e&&e.length?tr(e,0,-1):[]},Bi.intersection=$a,Bi.intersectionBy=qa,Bi.intersectionWith=Ga,Bi.invert=Eo,Bi.invertBy=ko,Bi.invokeMap=ys,Bi.iteratee=il,Bi.keyBy=bs,Bi.keys=To,Bi.keysIn=Do,Bi.map=xs,Bi.mapKeys=function(e,t){var i={};return t=sa(t,3),yn(e,function(e,n,r){nn(i,t(e,n,r),e)}),i},Bi.mapValues=function(e,t){var i={};return t=sa(t,3),yn(e,function(e,n,r){nn(i,n,t(e,n,r))}),i},Bi.matches=function(e){return Ln(sn(e,1))},Bi.matchesProperty=function(e,t){return Nn(e,sn(t,1))},Bi.memoize=Ms,Bi.merge=Mo,Bi.mergeWith=Io,Bi.method=nl,Bi.methodOf=rl,Bi.mixin=al,Bi.negate=Is,Bi.nthArg=function(e){return e=po(e),Yn(function(t){return Vn(t,e)})},Bi.omit=Fo,Bi.omitBy=function(e,t){return Ro(e,Is(sa(t)))},Bi.once=function(e){return Ps(2,e)},Bi.orderBy=function(e,t,n,r){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(n=r?i:n)||(n=null==n?[]:[n]),Hn(e,t,n))},Bi.over=ol,Bi.overArgs=Fs,Bi.overEvery=ll,Bi.overSome=cl,Bi.partial=js,Bi.partialRight=Rs,Bi.partition=_s,Bi.pick=jo,Bi.pickBy=Ro,Bi.property=hl,Bi.propertyOf=function(e){return function(t){return null==e?i:_n(e,t)}},Bi.pull=Ya,Bi.pullAll=Ka,Bi.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?$n(e,t,sa(i,2)):e},Bi.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$n(e,t,i,n):e},Bi.pullAt=Xa,Bi.range=pl,Bi.rangeRight=ul,Bi.rearg=Os,Bi.reject=function(e,t){return(Vs(e)?At:fn)(e,Is(sa(t,3)))},Bi.remove=function(e,t){var i=[];if(!e||!e.length)return i;var n=-1,r=[],a=e.length;for(t=sa(t,3);++n<a;){var s=e[n];t(s,n,e)&&(i.push(s),r.push(n))}return qn(e,r),i},Bi.rest=function(e,t){if("function"!=typeof e)throw new ke(n);return Yn(e,t=t===i?t:po(t))},Bi.reverse=Za,Bi.sampleSize=function(e,t,n){return t=(n?va(e,t,n):t===i)?1:po(t),(Vs(e)?Ki:Xn)(e,t)},Bi.set=function(e,t,i){return null==e?e:Zn(e,t,i)},Bi.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Zn(e,t,n,r)},Bi.shuffle=function(e){return(Vs(e)?Xi:er)(e)},Bi.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&va(e,t,n)?(t=0,n=r):(t=null==t?0:po(t),n=n===i?r:po(n)),tr(e,t,n)):[]},Bi.sortBy=Ss,Bi.sortedUniq=function(e){return e&&e.length?ar(e):[]},Bi.sortedUniqBy=function(e,t){return e&&e.length?ar(e,sa(t,2)):[]},Bi.split=function(e,t,n){return n&&"number"!=typeof n&&va(e,t,n)&&(t=n=i),(n=n===i?u:n>>>0)?(e=go(e))&&("string"==typeof t||null!=t&&!io(t))&&!(t=or(t))&&ni(e)?br(hi(e),0,n):e.split(t,n):[]},Bi.spread=function(e,t){if("function"!=typeof e)throw new ke(n);return t=null==t?0:mi(po(t),0),Yn(function(i){var n=i[t],r=br(i,0,t);return n&&It(r,n),wt(e,this,r)})},Bi.tail=function(e){var t=null==e?0:e.length;return t?tr(e,1,t):[]},Bi.take=function(e,t,n){return e&&e.length?tr(e,0,(t=n||t===i?1:po(t))<0?0:t):[]},Bi.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?tr(e,(t=r-(t=n||t===i?1:po(t)))<0?0:t,r):[]},Bi.takeRightWhile=function(e,t){return e&&e.length?pr(e,sa(t,3),!1,!0):[]},Bi.takeWhile=function(e,t){return e&&e.length?pr(e,sa(t,3)):[]},Bi.tap=function(e,t){return t(e),e},Bi.throttle=function(e,t,i){var r=!0,a=!0;if("function"!=typeof e)throw new ke(n);return Zs(i)&&(r="leading"in i?!!i.leading:r,a="trailing"in i?!!i.trailing:a),As(e,t,{leading:r,maxWait:t,trailing:a})},Bi.thru=hs,Bi.toArray=co,Bi.toPairs=Oo,Bi.toPairsIn=Bo,Bi.toPath=function(e){return Vs(e)?Mt(e,ja):ao(e)?[e]:kr(Fa(go(e)))},Bi.toPlainObject=mo,Bi.transform=function(e,t,i){var n=Vs(e),r=n||qs(e)||so(e);if(t=sa(t,4),null==i){var a=e&&e.constructor;i=r?n?new a:[]:Zs(e)&&Ys(a)?Li($e(e)):{}}return(r?Pt:yn)(e,function(e,n,r){return t(i,e,n,r)}),i},Bi.unary=function(e){return Cs(e,1)},Bi.union=Ja,Bi.unionBy=Qa,Bi.unionWith=es,Bi.uniq=function(e){return e&&e.length?lr(e):[]},Bi.uniqBy=function(e,t){return e&&e.length?lr(e,sa(t,2)):[]},Bi.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?lr(e,i,t):[]},Bi.unset=function(e,t){return null==e||cr(e,t)},Bi.unzip=ts,Bi.unzipWith=is,Bi.update=function(e,t,i){return null==e?e:hr(e,t,gr(i))},Bi.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:hr(e,t,gr(n),r)},Bi.values=Lo,Bi.valuesIn=function(e){return null==e?[]:Xt(e,Do(e))},Bi.without=ns,Bi.words=Ko,Bi.wrap=function(e,t){return js(gr(t),e)},Bi.xor=rs,Bi.xorBy=as,Bi.xorWith=ss,Bi.zip=os,Bi.zipObject=function(e,t){return fr(e||[],t||[],Ji)},Bi.zipObjectDeep=function(e,t){return fr(e||[],t||[],Zn)},Bi.zipWith=ls,Bi.entries=Oo,Bi.entriesIn=Bo,Bi.extend=yo,Bi.extendWith=bo,al(Bi,Bi),Bi.add=gl,Bi.attempt=Xo,Bi.camelCase=No,Bi.capitalize=zo,Bi.ceil=vl,Bi.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=fo(n))==n?n:0),t!==i&&(t=(t=fo(t))==t?t:0),an(fo(e),t,n)},Bi.clone=function(e){return sn(e,4)},Bi.cloneDeep=function(e){return sn(e,5)},Bi.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:i)},Bi.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:i)},Bi.conformsTo=function(e,t){return null==t||on(e,t,To(t))},Bi.deburr=Vo,Bi.defaultTo=function(e,t){return null==e||e!=e?t:e},Bi.divide=yl,Bi.endsWith=function(e,t,n){e=go(e),t=or(t);var r=e.length,a=n=n===i?r:an(po(n),0,r);return(n-=t.length)>=0&&e.slice(n,a)==t},Bi.eq=Bs,Bi.escape=function(e){return(e=go(e))&&U.test(e)?e.replace(q,ti):e},Bi.escapeRegExp=function(e){return(e=go(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Bi.every=function(e,t,n){var r=Vs(e)?kt:un;return n&&va(e,t,n)&&(t=i),r(e,sa(t,3))},Bi.find=ds,Bi.findIndex=za,Bi.findKey=function(e,t){return Bt(e,sa(t,3),yn)},Bi.findLast=fs,Bi.findLastIndex=Va,Bi.findLastKey=function(e,t){return Bt(e,sa(t,3),bn)},Bi.floor=bl,Bi.forEach=ms,Bi.forEachRight=gs,Bi.forIn=function(e,t){return null==e?e:gn(e,sa(t,3),Do)},Bi.forInRight=function(e,t){return null==e?e:vn(e,sa(t,3),Do)},Bi.forOwn=function(e,t){return e&&yn(e,sa(t,3))},Bi.forOwnRight=function(e,t){return e&&bn(e,sa(t,3))},Bi.get=Co,Bi.gt=Ls,Bi.gte=Ns,Bi.has=function(e,t){return null!=e&&da(e,t,Pn)},Bi.hasIn=Po,Bi.head=Wa,Bi.identity=tl,Bi.includes=function(e,t,i,n){e=Ws(e)?e:Lo(e),i=i&&!n?po(i):0;var r=e.length;return i<0&&(i=mi(r+i,0)),ro(e)?i<=r&&e.indexOf(t,i)>-1:!!r&&Nt(e,t,i)>-1},Bi.indexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:po(i);return r<0&&(r=mi(n+r,0)),Nt(e,t,r)},Bi.inRange=function(e,t,n){return t=ho(t),n===i?(n=t,t=0):n=ho(n),function(e,t,i){return e>=gi(t,i)&&e<mi(t,i)}(e=fo(e),t,n)},Bi.invoke=Ao,Bi.isArguments=zs,Bi.isArray=Vs,Bi.isArrayBuffer=Hs,Bi.isArrayLike=Ws,Bi.isArrayLikeObject=$s,Bi.isBoolean=function(e){return!0===e||!1===e||Js(e)&&wn(e)==g},Bi.isBuffer=qs,Bi.isDate=Gs,Bi.isElement=function(e){return Js(e)&&1===e.nodeType&&!to(e)},Bi.isEmpty=function(e){if(null==e)return!0;if(Ws(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||qs(e)||so(e)||zs(e)))return!e.length;var t=ua(e);if(t==_||t==E)return!e.size;if(_a(e))return!jn(e).length;for(var i in e)if(Fe.call(e,i))return!1;return!0},Bi.isEqual=function(e,t){return Dn(e,t)},Bi.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Dn(e,t,i,n):!!r},Bi.isError=Us,Bi.isFinite=function(e){return"number"==typeof e&&Ot(e)},Bi.isFunction=Ys,Bi.isInteger=Ks,Bi.isLength=Xs,Bi.isMap=Qs,Bi.isMatch=function(e,t){return e===t||Mn(e,t,la(t))},Bi.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Mn(e,t,la(t),n)},Bi.isNaN=function(e){return eo(e)&&e!=+e},Bi.isNative=function(e){if(xa(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return In(e)},Bi.isNil=function(e){return null==e},Bi.isNull=function(e){return null===e},Bi.isNumber=eo,Bi.isObject=Zs,Bi.isObjectLike=Js,Bi.isPlainObject=to,Bi.isRegExp=io,Bi.isSafeInteger=function(e){return Ks(e)&&e>=-9007199254740991&&e<=h},Bi.isSet=no,Bi.isString=ro,Bi.isSymbol=ao,Bi.isTypedArray=so,Bi.isUndefined=function(e){return e===i},Bi.isWeakMap=function(e){return Js(e)&&ua(e)==T},Bi.isWeakSet=function(e){return Js(e)&&"[object WeakSet]"==wn(e)},Bi.join=function(e,t){return null==e?"":$t.call(e,t)},Bi.kebabCase=Ho,Bi.last=Ua,Bi.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r;return n!==i&&(a=(a=po(n))<0?mi(r+a,0):gi(a,r-1)),t==t?function(e,t,i){for(var n=i+1;n--;)if(e[n]===t)return n;return n}(e,t,a):Lt(e,Vt,a,!0)},Bi.lowerCase=Wo,Bi.lowerFirst=$o,Bi.lt=oo,Bi.lte=lo,Bi.max=function(e){return e&&e.length?dn(e,tl,Cn):i},Bi.maxBy=function(e,t){return e&&e.length?dn(e,sa(t,2),Cn):i},Bi.mean=function(e){return Ht(e,tl)},Bi.meanBy=function(e,t){return Ht(e,sa(t,2))},Bi.min=function(e){return e&&e.length?dn(e,tl,On):i},Bi.minBy=function(e,t){return e&&e.length?dn(e,sa(t,2),On):i},Bi.stubArray=dl,Bi.stubFalse=fl,Bi.stubObject=function(){return{}},Bi.stubString=function(){return""},Bi.stubTrue=function(){return!0},Bi.multiply=xl,Bi.nth=function(e,t){return e&&e.length?Vn(e,po(t)):i},Bi.noConflict=function(){return pt._===this&&(pt._=Le),this},Bi.noop=sl,Bi.now=ws,Bi.pad=function(e,t,i){e=go(e);var n=(t=po(t))?ci(e):0;if(!t||n>=t)return e;var r=(t-n)/2;return Hr(dt(r),i)+e+Hr(ut(r),i)},Bi.padEnd=function(e,t,i){e=go(e);var n=(t=po(t))?ci(e):0;return t&&n<t?e+Hr(t-n,i):e},Bi.padStart=function(e,t,i){e=go(e);var n=(t=po(t))?ci(e):0;return t&&n<t?Hr(t-n,i)+e:e},Bi.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),yi(go(e).replace(ie,""),t||0)},Bi.random=function(e,t,n){if(n&&"boolean"!=typeof n&&va(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ho(e),t===i?(t=e,e=0):t=ho(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var a=bi();return gi(e+a*(t-e+ot("1e-"+((a+"").length-1))),t)}return Gn(e,t)},Bi.reduce=function(e,t,i){var n=Vs(e)?Ft:qt,r=arguments.length<3;return n(e,sa(t,4),i,r,hn)},Bi.reduceRight=function(e,t,i){var n=Vs(e)?jt:qt,r=arguments.length<3;return n(e,sa(t,4),i,r,pn)},Bi.repeat=function(e,t,n){return t=(n?va(e,t,n):t===i)?1:po(t),Un(go(e),t)},Bi.replace=function(){var e=arguments,t=go(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bi.result=function(e,t,n){var r=-1,a=(t=vr(t,e)).length;for(a||(a=1,e=i);++r<a;){var s=null==e?i:e[ja(t[r])];s===i&&(r=a,s=n),e=Ys(s)?s.call(e):s}return e},Bi.round=_l,Bi.runInContext=e,Bi.sample=function(e){return(Vs(e)?Yi:Kn)(e)},Bi.size=function(e){if(null==e)return 0;if(Ws(e))return ro(e)?ci(e):e.length;var t=ua(e);return t==_||t==E?e.size:jn(e).length},Bi.snakeCase=qo,Bi.some=function(e,t,n){var r=Vs(e)?Rt:ir;return n&&va(e,t,n)&&(t=i),r(e,sa(t,3))},Bi.sortedIndex=function(e,t){return nr(e,t)},Bi.sortedIndexBy=function(e,t,i){return rr(e,t,sa(i,2))},Bi.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var n=nr(e,t);if(n<i&&Bs(e[n],t))return n}return-1},Bi.sortedLastIndex=function(e,t){return nr(e,t,!0)},Bi.sortedLastIndexBy=function(e,t,i){return rr(e,t,sa(i,2),!0)},Bi.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var i=nr(e,t,!0)-1;if(Bs(e[i],t))return i}return-1},Bi.startCase=Go,Bi.startsWith=function(e,t,i){return e=go(e),i=null==i?0:an(po(i),0,e.length),t=or(t),e.slice(i,i+t.length)==t},Bi.subtract=Sl,Bi.sum=function(e){return e&&e.length?Gt(e,tl):0},Bi.sumBy=function(e,t){return e&&e.length?Gt(e,sa(t,2)):0},Bi.template=function(e,t,n){var r=Bi.templateSettings;n&&va(e,t,n)&&(t=i),e=go(e),t=bo({},t,r,Xr);var a,s,o=bo({},t.imports,r.imports,Xr),l=To(o),c=Xt(o,l),h=0,p=t.interpolate||ye,u="__p += '",d=Pe((t.escape||ye).source+"|"+p.source+"|"+(p===X?he:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),f="//# sourceURL="+(Fe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,function(t,i,n,r,o,l){return n||(n=r),u+=e.slice(h,l).replace(be,ii),i&&(a=!0,u+="' +\n__e("+i+") +\n'"),o&&(s=!0,u+="';\n"+o+";\n__p += '"),n&&(u+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=l+t.length,t}),u+="';\n";var m=Fe.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new _e("Invalid `variable` option passed into `_.template`")}else u="with (obj) {\n"+u+"\n}\n";u=(s?u.replace(V,""):u).replace(H,"$1").replace(W,"$1;"),u="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var g=Xo(function(){return Se(l,f+"return "+u).apply(i,c)});if(g.source=u,Us(g))throw g;return g},Bi.times=function(e,t){if((e=po(e))<1||e>h)return[];var i=u,n=gi(e,u);t=sa(t),e-=u;for(var r=Ut(n,t);++i<e;)t(i);return r},Bi.toFinite=ho,Bi.toInteger=po,Bi.toLength=uo,Bi.toLower=function(e){return go(e).toLowerCase()},Bi.toNumber=fo,Bi.toSafeInteger=function(e){return e?an(po(e),-9007199254740991,h):0===e?e:0},Bi.toString=go,Bi.toUpper=function(e){return go(e).toUpperCase()},Bi.trim=function(e,t,n){if((e=go(e))&&(n||t===i))return Yt(e);if(!e||!(t=or(t)))return e;var r=hi(e),a=hi(t);return br(r,Jt(r,a),Qt(r,a)+1).join("")},Bi.trimEnd=function(e,t,n){if((e=go(e))&&(n||t===i))return e.slice(0,pi(e)+1);if(!e||!(t=or(t)))return e;var r=hi(e);return br(r,0,Qt(r,hi(t))+1).join("")},Bi.trimStart=function(e,t,n){if((e=go(e))&&(n||t===i))return e.replace(ie,"");if(!e||!(t=or(t)))return e;var r=hi(e);return br(r,Jt(r,hi(t))).join("")},Bi.truncate=function(e,t){var n=30,r="...";if(Zs(t)){var a="separator"in t?t.separator:a;n="length"in t?po(t.length):n,r="omission"in t?or(t.omission):r}var s=(e=go(e)).length;if(ni(e)){var o=hi(e);s=o.length}if(n>=s)return e;var l=n-ci(r);if(l<1)return r;var c=o?br(o,0,l).join(""):e.slice(0,l);if(a===i)return c+r;if(o&&(l+=c.length-l),io(a)){if(e.slice(l).search(a)){var h,p=c;for(a.global||(a=Pe(a.source,go(pe.exec(a))+"g")),a.lastIndex=0;h=a.exec(p);)var u=h.index;c=c.slice(0,u===i?l:u)}}else if(e.indexOf(or(a),l)!=l){var d=c.lastIndexOf(a);d>-1&&(c=c.slice(0,d))}return c+r},Bi.unescape=function(e){return(e=go(e))&&G.test(e)?e.replace($,ui):e},Bi.uniqueId=function(e){var t=++je;return go(e)+t},Bi.upperCase=Uo,Bi.upperFirst=Yo,Bi.each=ms,Bi.eachRight=gs,Bi.first=Wa,al(Bi,(ml={},yn(Bi,function(e,t){Fe.call(Bi.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),Bi.VERSION="4.17.23",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bi[e].placeholder=Bi}),Pt(["drop","take"],function(e,t){Vi.prototype[e]=function(n){n=n===i?1:mi(po(n),0);var r=this.__filtered__&&!t?new Vi(this):this.clone();return r.__filtered__?r.__takeCount__=gi(n,r.__takeCount__):r.__views__.push({size:gi(n,u),type:e+(r.__dir__<0?"Right":"")}),r},Vi.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Pt(["filter","map","takeWhile"],function(e,t){var i=t+1,n=1==i||3==i;Vi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:sa(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}}),Pt(["head","last"],function(e,t){var i="take"+(t?"Right":"");Vi.prototype[e]=function(){return this[i](1).value()[0]}}),Pt(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");Vi.prototype[e]=function(){return this.__filtered__?new Vi(this):this[i](1)}}),Vi.prototype.compact=function(){return this.filter(tl)},Vi.prototype.find=function(e){return this.filter(e).head()},Vi.prototype.findLast=function(e){return this.reverse().find(e)},Vi.prototype.invokeMap=Yn(function(e,t){return"function"==typeof e?new Vi(this):this.map(function(i){return An(i,e,t)})}),Vi.prototype.reject=function(e){return this.filter(Is(sa(e)))},Vi.prototype.slice=function(e,t){e=po(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vi(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=po(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vi.prototype.toArray=function(){return this.take(u)},yn(Vi.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=Bi[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);a&&(Bi.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,l=t instanceof Vi,c=o[0],h=l||Vs(t),p=function(e){var t=a.apply(Bi,It([e],o));return r&&u?t[0]:t};h&&n&&"function"==typeof c&&1!=c.length&&(l=h=!1);var u=this.__chain__,d=!!this.__actions__.length,f=s&&!u,m=l&&!d;if(!s&&h){t=m?t:new Vi(this);var g=e.apply(t,o);return g.__actions__.push({func:hs,args:[p],thisArg:i}),new zi(g,u)}return f&&m?e.apply(this,o):(g=this.thru(p),f?r?g.value()[0]:g.value():g)})}),Pt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ae[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Bi.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var r=this.value();return t.apply(Vs(r)?r:[],e)}return this[i](function(i){return t.apply(Vs(i)?i:[],e)})}}),yn(Vi.prototype,function(e,t){var i=Bi[t];if(i){var n=i.name+"";Fe.call(Ai,n)||(Ai[n]=[]),Ai[n].push({name:t,func:i})}}),Ai[Lr(i,2).name]=[{name:"wrapper",func:i}],Vi.prototype.clone=function(){var e=new Vi(this.__wrapped__);return e.__actions__=kr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=kr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=kr(this.__views__),e},Vi.prototype.reverse=function(){if(this.__filtered__){var e=new Vi(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Vs(e),n=t<0,r=i?e.length:0,a=function(e,t,i){for(var n=-1,r=i.length;++n<r;){var a=i[n],s=a.size;switch(a.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=gi(t,e+s);break;case"takeRight":e=mi(e,t-s)}}return{start:e,end:t}}(0,r,this.__views__),s=a.start,o=a.end,l=o-s,c=n?o:s-1,h=this.__iteratees__,p=h.length,u=0,d=gi(l,this.__takeCount__);if(!i||!n&&r==l&&d==l)return ur(e,this.__actions__);var f=[];e:for(;l--&&u<d;){for(var m=-1,g=e[c+=t];++m<p;){var v=h[m],y=v.iteratee,b=v.type,x=y(g);if(2==b)g=x;else if(!x){if(1==b)continue e;break e}}f[u++]=g}return f},Bi.prototype.at=ps,Bi.prototype.chain=function(){return cs(this)},Bi.prototype.commit=function(){return new zi(this.value(),this.__chain__)},Bi.prototype.next=function(){this.__values__===i&&(this.__values__=co(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bi.prototype.plant=function(e){for(var t,n=this;n instanceof Ni;){var r=Oa(n);r.__index__=0,r.__values__=i,t?a.__wrapped__=r:t=r;var a=r;n=n.__wrapped__}return a.__wrapped__=e,t},Bi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vi){var t=e;return this.__actions__.length&&(t=new Vi(this)),(t=t.reverse()).__actions__.push({func:hs,args:[Za],thisArg:i}),new zi(t,this.__chain__)}return this.thru(Za)},Bi.prototype.toJSON=Bi.prototype.valueOf=Bi.prototype.value=function(){return ur(this.__wrapped__,this.__actions__)},Bi.prototype.first=Bi.prototype.head,Ke&&(Bi.prototype[Ke]=function(){return this}),Bi}();dt?((dt.exports=di)._=di,ut._=di):pt._=di}.call(lodash)),lodash$1.exports;var e,t}var lodashExports=requireLodash(),_=getDefaultExportFromCjs(lodashExports);function BeeArrowDiff({id:e,className:t,value:i,tooltip:n,disabled:r,decimals:a,isRoot:s=!1,locale:o="de-DE"}){const l=null!=e?e:libExports.useId(1,"bee-arrow-diff-")[0],c=r?" disabled":"";let h="";switch(!0){case null==i:break;case i<=-.5:h="bee-arrow bee-arrow-dive";break;case i>-.5&&i<0:h="bee-arrow-dip";break;case 0===i:h="bee-arrow-steady";break;case i>0&&i<.5:h="bee-arrow-bump";break;case i>=.5:h="bee-arrow-jump";break;default:h="bee-arrow-steady"}return jsx("div",{className:null!=t?t:"",children:s||!i&&0!==i?null:jsxs(Fragment,{children:[jsxs("div",{id:l,className:"bee-arrow-diff "+h+c,children:[jsx("div",{className:"bee-arrow-diff-icon",children:jsx("i",{className:"icon-right-arrow bee-arrow"})}),jsxs("div",{className:"bee-arrow-diff-text",children:[new Intl.NumberFormat(o,{style:"decimal",maximumFractionDigits:a||0}).format(100*i),"%"]})]}),n&&!r?jsx(Tooltip$1,{target:".bee-arrow-diff",children:n}):null]})})}function BeeAddEntryCard({id:e,className:t,disabled:i,footer:n,onClick:r}){const a=null!=e?e:libExports.useId(1,"bee-add-entry-card-")[0];return jsxs("div",{id:a,className:"bee-add-entry-card"+(t?" "+t:""),children:[jsx(BeeIconButton,{iconClass:"pi pi-plus",rounded:!0,halfRounded:!1,disabled:null!=i&&i,type:"primary",isLoading:!1,onClick:e=>function(e){!i&&r&&r(e)}(e)}),n&&jsx("div",{className:"bee-add-entry-card-footer",children:n})]})}var extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},__assign.apply(this,arguments)};function __awaiter(e,t,i,n){return new(i||(i=Promise))(function(r,a){function s(e){try{l(n.next(e))}catch(e){a(e)}}function o(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,o)}l((n=n.apply(e,t||[])).next())})}function BeeSkeleton({id:e,className:t,shape:i="rectangle",size:n,width:r,height:a,borderRadius:s,animated:o=!0,showHover:l,showShade:c}){const h=null!=e?e:libExports.useId(1,"bee-skeleton-")[0],p=o?"wave":"none",u=l?" bee-skeleto--hover":"",d=c?" bee-skeleton--shade":"",f="bee-skeleton-rectangle"+u+d+(t?" "+t:""),m=jsx(Skeleton,{className:"bee-skeleton-circle"+u+d+(t?" "+t:""),id:h,shape:"circle",size:n,animation:p,borderRadius:s}),g=jsx(Skeleton,{className:f,id:h,shape:"rectangle",animation:p,width:r,height:a,borderRadius:s});return"circle"===i?m:g}function BeeImage({id:e,className:t,url:i,showPlaceholder:n,secured:r=!1,secureKey:a,alt:s,title:o,titlePosition:l="left",copyright:c,onClick:h}){const p=null!=e?e:libExports.useId(1,"bee-img-")[0],u=p+"-pay",d="100%",f="100%";function m(e,t,i){return __awaiter(this,void 0,void 0,function*(){const n=yield function(e,t){let i=new Headers;return i.set("x-bee-secure",t),fetch(e,{headers:i})}(t,i),r=yield n.blob(),a=URL.createObjectURL(r),s=document.getElementById(e);s&&(s.src=a)})}return jsxs("div",{id:p,onClick:e=>function(e){h&&h(e)}(e),className:"bee-img"+(t?" "+t:""),children:[o?jsx("div",{className:"left"===l?" bee-img-title bee-img-title-left":"center"===l?" bee-img-title bee-img-title-center":"right"===l?" bee-img-title bee-img-title-right":" bee-img-title bee-img-title-left",children:o}):null,n?jsx(BeeSkeleton,{shape:"rectangle",animated:!0,width:"100%",height:"100px"}):r&&a?(m(u,i,a),jsx("img",{id:u,src:"",alt:s,width:d,height:f})):jsx("img",{id:u,src:i,alt:s,width:d,height:f}),c?jsx("footer",{className:"bee-img-copyright",children:jsx("small",{children:c})}):null]})}function BeeAvatar({imageUrl:e,imageKey:t,imageAlt:i,isImageSecured:n,showPlaceholder:r,placeholderFirstname:a,placeholderLastname:s,size:o,type:l,showDelete:c,readOnly:h,disabled:p,onDelete:u,onClick:d,onAdd:f}){const m="bee-avatar"+("primary"===l?" bee-avatar--primary":"secondary"===l?" bee-avatar--secondary":" bee-avatar--light")+("xSmall"===o?" bee-avatar--xsmall":"small"===o?" bee-avatar--small":"medium"===o?" bee-avatar--medium":"large"===o?" bee-avatar--large":"xLarge"===o?" bee-avatar--xlarge":" bee-avatar--medium");return jsx(Fragment,{children:r?jsx(Card,{className:m+" placeholder-avatar",children:a||s?jsx("div",{className:"placeholder-avatar__initials",children:(a?a.substring(0,1):"")+(s?s.substring(0,1):"")}):jsx("i",{className:"pi pi-user placeholder-avatar__icon"})}):jsx(Fragment,{children:e?jsxs(Card,{className:m+" image-avatar",children:[jsx(BeeImage,{url:e,alt:i,title:void 0,titlePosition:"left",copyright:void 0,secured:!0===n,showPlaceholder:!1,onClick:e=>function(e){null==d||d(e)}(e)},t),c&&!h?jsx(BeeIconButton,{iconClass:"pi pi-trash",rounded:!0,disabled:!1,type:"danger",isLoading:!1,onClick:()=>{null==u||u()}}):null]}):jsx(Card,{className:m+" empty-avatar",children:jsx(BeeAddEntryCard,{disabled:p,onClick:e=>function(e){null==f||f(e)}(e)})})})})}function BeeChip({id:e,className:t,label:i,labelTemplate:n,iconClass:r,image:a,imageAlt:s,removable:o,type:l="primary",onRemove:c,onClick:h}){const p=null!=e?e:libExports.useId(1,"bee-chip-")[0];return jsxs("div",{className:(h?"bee-chip-clickable ":"")+("primary"===l?"bee-chip bee-chip-primary":"secondary"===l?"bee-chip bee-chip-secondary":"valid"===l?"bee-chip bee-chip-valid":"info"===l?"bee-chip bee-chip-info":"warn"===l?"bee-chip bee-chip-warn":"error"===l?"bee-chip bee-chip-error":"surface"===l?"bee-chip bee-chip-surface":"bee-chip bee-chip-primary")+(t?" "+t:""),children:[o?jsx("div",{className:"bee-chip-remove-btn",onClick:e=>function(e){c&&c(e)}(e),children:jsx("i",{className:"pi pi-times-circle"})}):null,jsx("div",{onClick:e=>function(e){h&&h(e)}(e),children:jsx(Chip,{id:p,label:null!=i?i:"",template:n,icon:r,image:a,imageAlt:s,className:"bee-chip-content",removable:null!=o&&o,onRemove:e=>(c&&c(e.originalEvent),!0)})})]})}function BeeChipArea({id:e,className:t,label:i,type:n="primary",data:r,required:a,readOnly:s,onClick:o,onRemove:l}){const c=null!=e?e:libExports.useId(1,"bee-chip-area-")[0];return jsxs("div",{id:c,className:"bee-chip-area"+("primary"===n?" bee-chip-area-primary":"secondary"===n?" bee-chip-area-secondary":" bee-chip-area-primary")+(s?" bee-chip-area-readOnly":"")+(t?" "+t:""),children:[jsx(Fragment,{children:s&&!r||s&&r.length<1||!r||r.length<1?jsx(BeePlaceholder,{id:c,label:null!=i?i:""}):jsx(Fragment,{children:r.map(e=>{var t;return jsx("div",{className:"bee-chip-area-chip",children:jsx(BeeChip,{id:e.id,label:null!==(t=e.label)&&void 0!==t?t:"",labelTemplate:e.labelTemplate,removable:!s||!s&&e.removable,onRemove:t=>function(e,t){l&&l(e,t)}(t,e.id),onClick:t=>function(e,t){o&&o(e,t)}(t,e.id)})},e.id)})})}),i?jsxs("label",{className:"bee-chip-area-label",children:[i,a?jsx("span",{className:"bee-chip-area-label-required",children:jsx("span",{className:"bee-chip-area-label-required-star",children:" *"})}):null]}):null]})}function BeeDivider({id:e,className:t,label:i,iconClass:n,border:r="solid",orientation:a="horizontal",align:s="center",type:o="default"}){const l=null!=e?e:libExports.useId(1,"bee-divider-")[0],c=n?n+" mr-2":void 0;let h="";h=i||n?" bee-divider-content":" bee-divider-nocontent";return jsx(Divider,{id:l,type:r,align:s,className:("primary"===o?"bee-divider bee-divider-primary":"secondary"===o?"bee-divider-secondary":"bee-divider-default")+h+(t?" "+t:""),layout:a,children:i||n?jsxs("div",{className:"inline-flex align-items-center bee-divider-label",children:[c?jsx("i",{className:c}):null,i?jsx("b",{children:i}):null]}):null})}function BeeLoadingBar({id:e,className:t,value:i,indeterminate:n=!1,type:r="primary",showValue:a,unit:s}){const o=null!=e?e:libExports.useId(1,"bee-loading-bar-")[0];return jsx(ProgressBar,{id:o,value:i,className:"primary"===r?"bee-loadingbar-primary":"secondary"===r?"bee-loadingbar-secondary":"bee-loadingbar-primary"+(t?" "+t:""),mode:n?"indeterminate":"determinate",showValue:a,unit:s})}function BeeLoadingSpinner({id:e,className:t,strokeWidth:i="2",animationDuration:n="4s",type:r="primary",size:a}){const s=null!=e?e:libExports.useId(1,"bee-loading-spinner-")[0];return jsx(ProgressSpinner,{className:"primary"===r?"bee-loading-spinner-primary":"secondary"===r?"bee-loading-spinner-secondary":"mixed"===r?"bee-loading-spinner-mixed":"bee-loading-spinner-primary"+(t?" "+t:""),id:s,strokeWidth:i,animationDuration:n,style:a?{width:a,height:a}:void 0})}function BeeSlider({id:e,className:t,value:i,min:n=0,max:r=100,step:a=1,disabled:s,orientation:o="horizontal",type:l="primary",onChange:c,onSlideEnd:h}){const p=null!=e?e:libExports.useId(1,"bee-slider-")[0];return jsx(Slider,{id:p,value:i,min:n,max:r,step:a,className:"primary"===l?"bee-slider-primary":"secondary"===l?"bee-slider-secondary":"bee-slider-primary"+(t?" "+t:""),disabled:null!=s&&s,orientation:o,onChange:e=>function(e){!s&&c&&c(e)}(e),onSlideEnd:e=>function(e){!s&&h&&h(e)}(e)})}"function"==typeof SuppressedError&&SuppressedError;var dist={},hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1,Object.defineProperty(dist,"__esModule",{value:!0});var e=require$$0,t=React__default,i=function(){return i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function n(e,t,i){for(var n,r=0,a=t.length;r<a;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}function r(t){var n=t.size,r=void 0===n?25:n,a=t.SVGstrokeColor,s=void 0===a?"currentColor":a,o=t.SVGstorkeWidth,l=void 0===o?0:o,c=t.SVGclassName,h=void 0===c?"star-svg":c,p=t.SVGstyle;return e.jsx("svg",i({className:h,style:p,stroke:s,fill:"currentColor",strokeWidth:l,viewBox:"0 0 24 24",width:r,height:r,xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}))}function a(e,t){switch(t.type){case"PointerMove":return i(i({},e),{hoverValue:t.payload,hoverIndex:t.index});case"PointerLeave":return i(i({},e),{ratingValue:e.ratingValue,hoverIndex:0,hoverValue:null});case"MouseClick":return i(i({},e),{valueIndex:e.hoverIndex,ratingValue:t.payload});default:return e}}function s(){return"undefined"!=typeof window&&window.matchMedia("(pointer: coarse)").matches||"ontouchstart"in window||"undefined"!=typeof navigator&&navigator.maxTouchPoints>0}return function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".style-module_starRatingWrap__q-lJC{display:inline-block;touch-action:none}.style-module_simpleStarRating__nWUxf{display:inline-block;overflow:hidden;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.style-module_fillIcons__6---A{display:inline-block;overflow:hidden;position:absolute;top:0;white-space:nowrap}.style-module_emptyIcons__Bg-FZ{display:inline-block}.style-module_tooltip__tKc3i{background-color:#333;border-radius:5px;color:#fff;display:inline-block;padding:5px 15px;vertical-align:middle}"),dist.Rating=function(o){var l,c,h=o.onClick,p=o.onPointerMove,u=o.onPointerEnter,d=o.onPointerLeave,f=o.initialValue,m=void 0===f?0:f,g=o.iconsCount,v=void 0===g?5:g,y=o.size,b=void 0===y?40:y,x=o.readonly,_=void 0!==x&&x,S=o.rtl,w=void 0!==S&&S,C=o.customIcons,P=void 0===C?[]:C,E=o.allowFraction,k=void 0!==E&&E,A=o.style,T=o.className,D=void 0===T?"react-simple-star-rating":T,M=o.transition,I=void 0!==M&&M,F=o.allowHover,j=void 0===F||F,R=o.disableFillHover,O=void 0!==R&&R,B=o.fillIcon,L=void 0===B?null:B,N=o.fillColor,z=void 0===N?"#ffbc0b":N,V=o.fillColorArray,H=void 0===V?[]:V,W=o.fillStyle,$=o.fillClassName,q=void 0===$?"filled-icons":$,G=o.emptyIcon,U=void 0===G?null:G,Y=o.emptyColor,K=void 0===Y?"#cccccc":Y,X=o.emptyStyle,Z=o.emptyClassName,J=void 0===Z?"empty-icons":Z,Q=o.allowTitleTag,ee=void 0===Q||Q,te=o.showTooltip,ie=void 0!==te&&te,ne=o.tooltipDefaultText,re=void 0===ne?"Your Rate":ne,ae=o.tooltipArray,se=void 0===ae?[]:ae,oe=o.tooltipStyle,le=o.tooltipClassName,ce=void 0===le?"react-simple-star-rating-tooltip":le,he=o.SVGclassName,pe=void 0===he?"star-svg":he,ue=o.titleSeparator,de=void 0===ue?"out of":ue,fe=o.SVGstyle,me=o.SVGstorkeWidth,ge=void 0===me?0:me,ve=o.SVGstrokeColor,ye=void 0===ve?"currentColor":ve,be=t.useReducer(a,{hoverIndex:0,valueIndex:0,ratingValue:m,hoverValue:null}),xe=be[0],_e=xe.ratingValue,Se=xe.hoverValue,we=xe.hoverIndex,Ce=xe.valueIndex,Pe=be[1];t.useEffect(function(){m&&Pe({type:"MouseClick",payload:0})},[m]);var Ee=t.useMemo(function(){return k?2*v:v},[k,v]),ke=t.useMemo(function(){return m>Ee?0:k||Math.floor(m)===m?Math.round(m/v*100):2*Math.ceil(m)*10},[k,m,v,Ee]),Ae=t.useMemo(function(){return(k?2*m-1:m-1)||0},[k,m]),Te=t.useCallback(function(e){return v%2!=0?e/2/10:e*v/100},[v]),De=function(e){for(var t=e.clientX,i=e.currentTarget.children[0].getBoundingClientRect(),n=i.left,r=i.right,a=i.width,s=w?r-t:t-n,o=Ee,l=Math.round(a/Ee),c=0;c<=Ee;c+=1)if(s<=l*c){o=0===c&&s<l?0:c;break}var h=o-1;o>0&&(Pe({type:"PointerMove",payload:100*o/Ee,index:h}),p&&Se&&p(Te(Se),h,e))},Me=function(e){Se&&(Pe({type:"MouseClick",payload:Se}),h&&h(Te(Se),we,e))},Ie=t.useMemo(function(){if(j){if(O){var e=_e&&_e||ke;return Se&&Se>e?Se:e}return Se&&Se||_e&&_e||ke}return _e&&_e||ke},[j,O,Se,_e,ke]);t.useEffect(function(){se.length>Ee&&console.error("tooltipArray Array length is bigger then Icons Count length.")},[se.length,Ee]);var Fe=t.useCallback(function(e){return Se&&e[we]||_e&&e[Ce]||m&&e[Ae]},[Se,we,_e,Ce,m,Ae]),je=t.useMemo(function(){return Se&&Te(Se)||_e&&Te(_e)||m&&Te(ke)},[Se,Te,_e,m,ke]);return e.jsxs("span",i({className:"style-module_starRatingWrap__q-lJC",style:{direction:"".concat(w?"rtl":"ltr")}},{children:[e.jsxs("span",i({className:"".concat("style-module_simpleStarRating__nWUxf"," ").concat(D),style:i({cursor:_?"":"pointer"},A),onPointerMove:_?void 0:De,onPointerEnter:_?void 0:function(e){u&&u(e),s()&&De(e)},onPointerLeave:_?void 0:function(e){s()&&Me(),Pe({type:"PointerLeave"}),d&&d(e)},onClick:_?void 0:Me,"aria-hidden":"true"},{children:[e.jsx("span",i({className:"".concat("style-module_emptyIcons__Bg-FZ"," ").concat(J),style:i({color:K},X)},{children:n([],Array(v)).map(function(i,n){var a;return e.jsx(t.Fragment,{children:(null===(a=P[n])||void 0===a?void 0:a.icon)||U||e.jsx(r,{SVGclassName:pe,SVGstyle:fe,SVGstorkeWidth:ge,SVGstrokeColor:ye,size:b})},n)})})),e.jsx("span",i({className:"".concat("style-module_fillIcons__6---A"," ").concat(q),style:i((l={},l[w?"right":"left"]=0,l.color=Fe(H)||z,l.transition=I?"width .2s ease, color .2s ease":"",l.width="".concat(Ie,"%"),l),W),title:ee?"".concat(je," ").concat(de," ").concat(v):void 0},{children:n([],Array(v)).map(function(i,n){var a;return e.jsx(t.Fragment,{children:(null===(a=P[n])||void 0===a?void 0:a.icon)||L||e.jsx(r,{SVGclassName:pe,SVGstyle:fe,SVGstorkeWidth:ge,SVGstrokeColor:ye,size:b})},n)})}))]})),ie&&e.jsx("span",i({className:"".concat("style-module_tooltip__tKc3i"," ").concat(ce),style:i((c={},c[w?"marginRight":"marginLeft"]=20,c),oe)},{children:(se.length>0?Fe(se):je)||re}))]}))},dist}var distExports=requireDist();function BeeStarBar({id:e,className:t,value:i,stars:n,disabled:r,readOnly:a,type:s="primary",size:o=40,onChange:l}){const c=null!=e?e:libExports.useId(1,"bee-starbar-")[0],h="bee-starbar "+("primary"===s?"bee-starbar-primary":"secondary"===s?"bee-starbar-secondary":"bee-starbar-primary")+(a?" bee-starbar-readonly":"")+(r?" bee-starbar-disabled":"")+(t?" "+t:"");return jsx("div",{id:c,children:jsx(distExports.Rating,{initialValue:(console.log(i/n*100),i/n*100),iconsCount:n,readonly:!(!a&&!r),className:h,allowFraction:!0,size:o,showTooltip:!1,tooltipClassName:"starbar-rating-tooltip",tooltipStyle:{visibility:"hidden",display:"none"},fillColor:r?"var(--surface-500)":"primary"===s?"var(--primary-color)":"secondary"===s?"var(--secondary-color)":"var(--primary-color)",emptyColor:r?"var(--surface-300)":"var(--surface-500)",onClick:e=>function(e){l&&l(e)}(e)})})}function BeeCopyInput({id:e,className:t,label:i,value:n,disabled:r,iconClass:a}){const s=null!=e?e:libExports.useId(1,"bee-copy-input-")[0];return jsx("div",{className:"bee-copy-input",children:jsx(Fragment,{children:n?jsxs("div",{className:"bee-copy-input-link"+(t?" "+t:""),onClick:()=>{n&&navigator.clipboard.writeText(n)},children:[jsx(BeeTextInput,{id:s+"input",label:i,value:n,disabled:null!=r&&r,formstate:"neutral",readOnly:!0,required:!1}),jsx("i",{className:a+" icon"})]}):jsx(BeePlaceholder,{id:s,label:null!=i?i:""})})})}function BeeVisibleItemCount({id:e,className:t,visibleData:i,allData:n,isLoading:r}){return jsx("div",{id:e,className:"bee-visible-item-count"+(r?" isLoading":"")+(t?" "+t:""),children:function(e,t){return e&&e.length>0&&t&&t.length>0&&!r?jsx(Fragment,{children:e.length+" / "+t.length}):jsx(Fragment,{children:"– / –"})}(i,n)})}function BeeBreadcrumb({id:e,className:t,border:i,items:n,type:r="default",isLoading:a}){const s=null!=e?e:libExports.useId(1,"bee-breadcrumb-")[0],o="bee-breadcrumb "+("primary"===r?"bee-breadcrumb-primary":"secondary"===r?"bee-breadcrumb-secondary":"bee-breadcrumb-default")+(i?"":" bee-breadcrumb-no-border")+(t?" "+t:"");return a?jsx(BeeSkeleton,{shape:"rectangle",size:"20",width:"180",height:"20",animated:!0}):jsx("div",{id:s,className:o,children:jsx(BreadCrumb,{model:_.drop(n,1),home:n[0]})})}function BeeTabview({id:e,className:t,type:i="default",tabs:n,activeIndex:r,onChangeIndex:a}){const s=null!=e?e:libExports.useId(1,"bee-tabview-")[0];return jsx("div",{id:s,className:"bee-tabview"+("primary"===i?" bee-tabview-primary":"secondary"===i?" bee-tabview-secondary":" bee-tabview-default")+(t?" "+t:""),children:jsx(TabView,{activeIndex:r,onTabChange:e=>function(e){a&&a(e)}(e),scrollable:!0,children:n.map(e=>jsx(TabPanel,{header:e.title,disabled:e.disabled},"tab_"+e.title))})})}const enter=13,escape=27,ENTER_KEY="Enter";function BeeCheckbox({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,type:s="primary",formstate:o="neutral",stateTrue:l="Ja",stateFalse:c="Nein",required:h,readOnly:p,tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-checkbox-")[0],g=m+"input",v="primary"===s?" bee-checkbox-primary":"secondary"===s?" bee-checkbox-secondary":" bee-checkbox-primary";let y="";p&&(y=" bee-checkbox-readOnly",r=!0);return jsxs("div",{className:null!=t?t:"",title:u,children:[jsxs("span",{id:m,className:"bee-checkbox "+("valid"===o?" bee-checkbox-valid":"error"===o?" bee-checkbox-error":"neutral"===o?" bee-checkbox-neutral":"none"===o?" bee-checkbox-field-neutral":" bee-checkbox-neutral")+y+(r?" bee-checkbox-disabled":"")+v,onKeyDown:e=>{!function(e){e.stopPropagation(),e.key===ENTER_KEY&&f&&f({checked:!n})}(e)},children:[jsxs("label",{className:"bee-checkbox-input",htmlFor:g,children:[p?jsx(Fragment,{children:jsx("i",n?{className:"pi pi-check"}:{className:"pi pi-times"})}):jsx(Checkbox,{inputId:g,checked:null!=n&&n,onChange:e=>function(e){!r&&f&&f(e)}(e),className:v,tooltip:u,tooltipOptions:d}),jsx("span",{className:"bee-checkbox-value",children:!0===n?l:c})]}),null!=i&&""!==i?jsxs("label",{htmlFor:g,className:"bee-checkbox-label",children:[i,h?jsx("span",{className:"bee-checkbox-label-required",children:jsx("span",{className:"bee-checkbox-label-required-star",children:" *"})}):null]}):null]}),"none"!=o&&a?(()=>{const e="medium";return jsx("div",{className:"bee-checkbox-statusLabel",children:"neutral"===o&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):"valid"===o&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"error"===o&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):null})})():null]})}function BeeCheckboxTriState({id:e,className:t,label:i,stateNull:n="Empty",stateFalse:r="False",stateTrue:a="True",value:s,disabled:o,required:l,statusLabel:c,formstate:h="neutral",readOnly:p,tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-tri-checkbox-")[0],g=m+"input";let v="";p&&(v=" bee-tri-state-readOnly",o=!0);const y=i?"bee-tri-state-label":"";const b=!0===s||!1===s?s:null;return jsxs("div",{className:null!=t?t:"",children:[jsxs("div",{id:m,className:"bee-tri-state "+("valid"===h?" bee-tri-state-valid":"error"===h?" bee-tri-state-error":" bee-tri-state-neutral")+v+(o?" bee-tri-state-disabled":"")+(t?" "+t:""),onKeyDown:e=>{!function(e){e.stopPropagation(),e.key===ENTER_KEY&&f&&f({target:{value:!s&&(!1===s?null:null==s||null)}})}(e)},children:[jsxs("label",{className:"bee-tri-state-input",htmlFor:g,children:[p?jsx(Fragment,{children:jsx("i",!0===s?{className:"pi pi-check"}:!1===s?{className:"pi pi-times"}:{className:"pi pi-question"})}):jsx(TriStateCheckbox,{id:g,value:b,onChange:e=>function(e){!o&&f&&f(e)}(e),tooltip:u,tooltipOptions:d}),jsx("span",{className:"bee-tri-state-value",children:!0===s?a:!1===s?r:n})]}),null!=i&&""!==i?jsxs("label",{htmlFor:g,className:y,children:[i,l?jsx("span",{className:"bee-tri-state-label-required",children:jsx("span",{className:"bee-tri-state-label-required-star",children:" *"})}):null]}):null]}),"none"!=h&&c?(()=>{const e="medium";return jsx("div",{className:"bee-checkbox-tristate-statusLabel",children:"error"===h&&c?jsx(BeeLabel,{size:e,value:c,type:"error"}):"valid"===h&&c?jsx(BeeLabel,{size:e,value:c,type:"valid"}):"neutral"===h&&c?jsx(BeeLabel,{size:e,value:c,type:"neutral"}):null})})():null]})}function BeeColorSelect({id:e,className:t,label:i,value:n,inline:r=!1,disabled:a,required:s,statusLabel:o,formstate:l="neutral",readOnly:c,defaultColor:h,format:p="rgb",tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-color-select-")[0],g=m+"input",v=a?" bee-color-select-disabled":"";let y="";c&&(y=" bee-color-select-readOnly",a=!0);function b(e){!a&&f&&f(e)}return jsxs("div",{id:m,className:"bee-color-select"+("valid"===l?" bee-color-select-valid":"error"===l?" bee-color-select-error":" bee-color-select-neutral")+y+v+(t?" "+t:""),children:[i?jsxs("label",{className:i?"bee-color-select-label":"",htmlFor:g,children:[i,s&&i?jsx("span",{className:"bee-color-select-label-required",children:jsx("span",{className:"bee-color-select-label-required-star",children:" *"})}):null]}):null,jsx("div",{className:"bee-color-select-input",children:jsx(ColorPicker,c?{id:g,value:n,defaultColor:h,format:p,onChange:e=>b(e),disabled:null!=a&&a,inline:!1,tooltip:u,tooltipOptions:d}:{id:g,value:n,defaultColor:h,format:p,onChange:e=>b(e),disabled:null!=a&&a,inline:r,tooltip:u,tooltipOptions:d})}),"none"!=l&&o?(()=>{const e="medium";return jsx("div",{className:"bee-color-select-statusLabel",children:"error"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeCurrencySelect({id:e,className:t,label:i,value:n,disabled:r,currency:a="EUR",locale:s="de-DE",statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,min:u,max:d,tooltip:f,tooltipOptions:m,onChange:g}){const v=null!=e?e:libExports.useId(1,"bee-cur-select-")[0],y=v+"input";let b="";c&&(b=" bee-cur-select-readOnly",r=!0);const x="p-float-label bee-cur-select-container"+("valid"===l?" bee-cur-select-valid":"error"===l?" bee-cur-select-error":" bee-cur-select-neutral")+b;return jsxs(Fragment,{children:[c&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:v,label:i})}):jsxs("span",{id:v,className:x+(t?" "+t:""),children:[jsx(InputNumber,{id:y,value:null!=n?n:null,disabled:null!=r&&r,mode:"currency",currency:a,locale:s,showButtons:!0,placeholder:p,min:u,max:d,onValueChange:e=>function(e){!r&&g&&g(e)}(e),tooltip:f,tooltipOptions:m}),i?jsxs("label",{htmlFor:y,children:[i,h&&i?jsx("span",{className:"bee-cur-select-label-required",children:jsx("span",{className:"bee-cur-select-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&o?(()=>{const e="medium";return jsx("div",{className:"bee-cur-select-statusLabel",children:"error"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeDropDown({id:e,className:t,label:i,value:n,valueTemplate:r,itemTemplate:a,options:s,optionLabel:o,optionValue:l,emptyPlaceholder:c,filter:h,filterBy:p,filterPlaceholder:u,disabled:d,statusLabel:f,formstate:m="neutral",readOnly:g,required:v,editable:y,showDelete:b,deleteIcon:x,emptyMessage:_,emptyFilterMessage:S,tooltip:w,tooltipOptions:C,onChange:P}){const E=null!=e?e:libExports.useId(1,"bee-drop-down-")[0],k=E+"input";let A="";g&&(A=" bee-dropdown-readOnly",d=!0);const T=("valid"===m?"bee-dropdown-valid":"error"===m?"bee-dropdown-error":"bee-dropdown-neutral")+A,D=x||"pi pi-times-circle";function M(e){!d&&P&&P(e)}const I=React__default.useCallback((e,t)=>{var n,a;if(!!(null==e||"string"==typeof e&&0===e.length||"object"==typeof e&&0===Object.keys(e).length)){const e=null!==(n=null!=c?c:t.placeholder)&&void 0!==n?n:"string"==typeof i?i:"";return e?"string"==typeof e?jsx("span",{children:e}):e:jsx("span",{children:" "})}const s="function"==typeof r?r(e,t):r,o="string"==typeof s&&0===s.trim().length;if(null!=s&&!1!==s&&!o)return s;const l=null!==(a=null!=c?c:t.placeholder)&&void 0!==a?a:"string"==typeof i?i:"";return l?"string"==typeof l?jsx("span",{children:l}):l:jsx("span",{children:" "})},[c,i,r]);return jsxs("div",{className:"bee-dropdown",children:[g&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:E,label:i})}):jsxs("span",{id:E,className:"p-float-label bee-dropdown-container"+(t?" "+t:""),children:[jsx(Dropdown,{id:k,value:n,valueTemplate:r?I:void 0,options:s,disabled:null!=d&&d,className:T,onChange:e=>M(e),optionLabel:o,optionValue:l,itemTemplate:null!=a?a:void 0,placeholder:c,emptyMessage:null!=_?_:"Keine Einträge gefunden",emptyFilterMessage:S,editable:null!=y&&y,filter:null!=h&&h,filterPlaceholder:u,filterBy:p,tooltip:w,tooltipOptions:C}),i?jsxs("label",{htmlFor:k,children:[i,v&&i?jsx("span",{className:"bee-dropdown-label-required",children:jsx("span",{className:"bee-dropdown-label-required-star",children:" *"})}):null]}):null,n&&b&&jsx("div",{className:"filter-cancel",children:jsx(BeeIconButton,{iconClass:D,rounded:!0,disabled:null!=d&&d,type:"lightPrimary",isLoading:!1,onClick:()=>M({label:"",value:null})})})]}),"none"!=m&&f?(()=>{const e="medium";return jsx("div",{className:"bee-dropdown-statusLabel",children:"error"===m&&f?jsx(BeeLabel,{size:e,value:f,type:"error"}):"valid"===m&&f?jsx(BeeLabel,{size:e,value:f,type:"valid"}):"neutral"===m&&f?jsx(BeeLabel,{size:e,value:f,type:"neutral"}):null})})():null]})}function BeeNumberSelect({id:e,className:t,label:i,value:n,minFractionDigits:r,maxFractionDigits:a,min:s,max:o,stepSize:l,disabled:c,grouping:h=!0,statusLabel:p,formstate:u="neutral",readOnly:d,required:f,placeholder:m,tooltip:g,tooltipOptions:v,onChange:y,onFocusOut:b}){const x=null!=e?e:libExports.useId(1,"bee-num-select-")[0],_=x+"input";let S="";d&&(S=" bee-num-select-readOnly",c=!0);const w="p-float-label bee-num-select-container"+("valid"===u?" bee-num-select-valid":"error"===u?" bee-num-select-error":" bee-num-select-neutral")+S;return jsxs(Fragment,{children:[d&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:x,label:i})}):jsxs("span",{id:x,className:w+(t?" "+t:""),children:[jsx(InputNumber,{id:_,value:null!=n?n:null,disabled:null!=c&&c,mode:"decimal",useGrouping:h,minFractionDigits:r,maxFractionDigits:a,min:s,max:o,showButtons:!0,step:null!=l?l:1,placeholder:m,tooltip:g,tooltipOptions:v,onValueChange:e=>function(e){!c&&y&&y(e)}(e),onBlur:e=>function(e){!c&&b&&b(e)}(e)}),i?jsxs("label",{htmlFor:_,children:[i,f&&i?jsx("span",{className:"bee-num-select-label-required",children:jsx("span",{className:"bee-num-select-label-required-star",children:" *"})}):null]}):null]}),"none"!=u&&p?(()=>{const e="medium";return jsx("div",{className:"bee-num-select-statusLabel",children:"error"===u&&p?jsx(BeeLabel,{size:e,value:p,type:"error"}):"valid"===u&&p?jsx(BeeLabel,{size:e,value:p,type:"valid"}):"neutral"===u&&p?jsx(BeeLabel,{size:e,value:p,type:"neutral"}):null})})():null]})}function BeeSwitch({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,formstate:s="neutral",stateFalse:o="Nein",stateTrue:l="Ja",required:c,readOnly:h,tooltip:p,tooltipOptions:u,onChange:d}){const f=null!=e?e:libExports.useId(1,"bee-switch-")[0],m=f+"input";let g="";h&&(g=" bee-switch-readOnly",r=!0);const v=i?"bee-switch-label":"";const y=!0===n;return jsxs("div",{id:f,className:"bee-switch"+("valid"===s?" bee-switch-valid":"error"===s?" bee-switch-error":" bee-switch-neutral")+g+(r?" bee-switch-disabled":"")+(t?" "+t:""),children:[jsxs("div",{className:"bee-switch-input",children:[jsx(InputSwitch,{inputId:m,checked:y,className:y?"p-inputswitch-checked":void 0,onChange:e=>function(e){!r&&d&&d(e)}(e),disabled:null!=r&&r,tooltip:p,tooltipOptions:u}),jsx("label",{className:"bee-switch-value",htmlFor:m,children:y?l:o})]}),i?jsxs("label",{className:v,htmlFor:m,children:[i,c&&i?jsx("span",{className:"bee-switch-label-required",children:jsx("span",{className:"bee-switch-label-required-star",children:" *"})}):null]}):null,"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-switch-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeTreeSelect({id:e,className:t,label:i,value:n,showDelete:r,options:a,valueTemplate:s,display:o="comma",selectionMode:l="single",placeholder:c,panelClassName:h,filter:p,filterTemplate:u,filterValue:d,filterBy:f,filterPlaceholder:m,disabled:g,readOnly:v,statusLabel:y,formstate:b="neutral",required:x,emptyMessage:_,tooltip:S,tooltipOptions:w,onChange:C,onNodeSelect:P,onHide:E}){var k;const A=null!=e?e:libExports.useId(1,"bee-treeselect-")[0],T=A+"input";let D="";v&&(D=" bee-ts-readOnly",g=!0);const M=("valid"===b?" bee-ts-valid":"error"===b?" bee-ts-error":" bee-ts-neutral")+D,I=" bee-ts-container ",F=p?" bee-ts-panel":" bee-ts-panel bee-ts-invisible-header";function j(e){!g&&C&&C(e)}function R(e){!g&&P&&P(e)}function O(){!g&&E&&E()}const B=React__default.useCallback((e,t)=>{var n,r,a,o;if(!!(null==e||"string"==typeof e&&0===e.length||"object"==typeof e&&0===Object.keys(e).length)){const e=null!==(r=null!==(n=t.placeholder)&&void 0!==n?n:i)&&void 0!==r?r:"";return jsx("span",e?{children:e}:{children:" "})}const l="function"==typeof s?s(e,t):s,c="string"==typeof l&&0===l.trim().length;if(null!=l&&!1!==l&&!c)return l;const h=null!==(o=null!==(a=t.placeholder)&&void 0!==a?a:i)&&void 0!==o?o:"";return jsx("span",h?{children:h}:{children:" "})},[i,c,s]);return jsxs(Fragment,{children:[v&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:A,label:i})}):jsx(Fragment,{children:jsxs("div",{id:A,className:t?t+I:I,children:[jsx("div",{className:!v&&n&&Object.keys(n).length>0?"bee-ts-filter__deleteBtn":"bee-ts-filter__deleteBtn bee-ts-filter--hidden",children:r?jsx(BeeIconButton,{iconClass:"pi pi-times-circle",rounded:!0,disabled:!1,type:"lightPrimary",isLoading:!1,onClick:()=>{j(void 0),R(void 0),O()}}):null}),jsxs("div",{className:"p-float-label",children:[jsx(TreeSelect,{id:T,value:n,valueTemplate:s?B:void 0,options:a,disabled:g,className:M,panelClassName:h?h+F:F,display:o,selectionMode:l,placeholder:null!==(k=null!=c?c:i)&&void 0!==k?k:void 0,filter:p,filterTemplate:u,filterValue:d,filterBy:f,filterPlaceholder:null!=m?m:"Suche",onChange:e=>j(e),onNodeSelect:e=>R(e),onHide:()=>O(),emptyMessage:_,tooltip:S,tooltipOptions:w}),i?jsxs("label",{htmlFor:T,className:"bee-ts-label",children:[i,x&&i?jsx("span",{className:"bee-ts-label-required",children:jsx("span",{className:"bee-ts-label-required-star",children:" *"})}):null]}):null]})]})}),"none"!=b&&y?(()=>{const e="medium";return jsx("div",{className:"bee-ts-statusLabel",children:"error"===b&&y?jsx(BeeLabel,{size:e,value:y,type:"error"}):"valid"===b&&y?jsx(BeeLabel,{size:e,value:y,type:"valid"}):"neutral"===b&&y?jsx(BeeLabel,{size:e,value:y,type:"neutral"}):null})})():null]})}function BeeChipDropdown({id:e,className:t,label:i,value:n,options:r,optionLabel:a,statusLabel:s,disabled:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,maxSelectedLabels:u,filter:d,filterBy:f,filterPlaceholder:m,emptyFilterMessage:g,emptyMessage:v,onChange:y}){const b=null!=e?e:libExports.useId(1,"bee-chip-dropdown-")[0],x=b+"input";let _="";c&&(_=" bee-chip-dropdown-readOnly",o=!0);const S=("valid"===l?"bee-chip-dropdown-valid":"error"===l?"bee-chip-dropdown-error":"bee-chip-dropdown-neutral")+_;return jsxs("div",{children:[c&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:b,label:null!=i?i:""})}):jsxs("span",{id:b,className:"p-float-label bee-chip-dropdown-container"+(t?" "+t:""),children:[jsx(MultiSelect,Object.assign({display:"chip",id:x,value:n,options:r,disabled:null!=o&&o,className:S,onChange:e=>{return t=e,void(!o&&y&&y(t));var t},optionLabel:a,panelHeaderTemplate:e=>{const t=`${e.className} p-multiselect-header bee-chip-dropdown__header`,i="bee-chip-dropdown_selectall",n=`${i}_label`;return jsxs("div",{className:t,children:[e.checkboxElement,jsx("label",{id:n,className:"p-checkbox-label",htmlFor:i,children:"Alle auswählen"})]})},placeholder:p,maxSelectedLabels:u,filter:null!=d&&d,filterBy:f},void 0!==m&&{filterPlaceholder:m},void 0!==v&&{emptyMessage:v},void 0!==g&&{emptyFilterMessage:g})),i?jsxs("label",{htmlFor:x,children:[i,h&&i?jsx("span",{className:"bee-chip-dropdown-label-required",children:jsx("span",{className:"bee-chip-dropdown-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&s?(()=>{const e="medium";return jsx("div",{className:"bee-chip-dropdown-statusLabel",children:"error"===l&&s?jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===l&&s?jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===l&&s?jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}var ChatMessageSourceEnum,ChatParticipantTypeEnum,ServerStatus;function parseParticipantName(e){var t,i;if(!(null==e?void 0:e.trim()))return{firstName:"U",lastName:"N"};const n=e.trim().split(" ").filter(e=>e.length>0);return 0===n.length?{firstName:"U",lastName:"N"}:{firstName:null!==(t=n[0])&&void 0!==t?t:"U",lastName:null!==(i=n[n.length-1])&&void 0!==i?i:"N"}}function BeeChatMessage({maxWindow:e=!1,msg:t,participant:i,project:n,chatMsgSource:r,isCurrentUser:a=!1,showDeleteButton:s=!1,documentIconClass:o="pi pi-file",trashIconClass:l="pi pi-trash",sourceAuditIconClass:c="pi pi-briefcase",sourceLcIconClass:h="pi pi-comments",onMsgDelete:p,onDownload:u}){const d=useMemo(()=>{var e;return null!==(e=null==i?void 0:i.name)&&void 0!==e?e:"Unbekannter Benutzer"},[null==i?void 0:i.name]),f=useMemo(()=>null==i?void 0:i.type,[null==i?void 0:i.type]),{firstName:m,lastName:g}=useMemo(()=>parseParticipantName(d),[d]),v=useMemo(()=>f!==ChatParticipantTypeEnum.USER||a?f===ChatParticipantTypeEnum.USER&&a?"lc-m-chat-message--self":f===ChatParticipantTypeEnum.SYSTEM?"lc-m-chat-message--system":"lc-m-chat-message--otherUser":"lc-m-chat-message--otherUser",[f,a]);function y(e){const t=new Date(e);return`${t.getDate().toString().padStart(2,"0")}.${(t.getMonth()+1).toString().padStart(2,"0")}.${t.getFullYear().toString().slice(-2)} - ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}const b=(null==t?void 0:t.mediaId)&&"object"==typeof t.mediaId?t.mediaId:null;function x(){var t,i;if(!b)return null;const n=null!==(t=b.document)&&void 0!==t?t:b.image;if(!n)return null;const r=null!==(i=n.filename)&&void 0!==i?i:b.document?"Unbekannte Datei":"Unbekanntes Bild";return jsxs("div",{className:"chat-message_media-container",children:[jsx(BeeMixButton,{label:r,iconClass:o,type:"lightPrimary",iconPos:"left",onClick:u}),e&&null!=n.fileSize?jsx(BeeLabel,{value:`Größe: ${n.fileSize}kb`,size:"small",type:"neutral"}):null]})}return jsx("div",{className:"lc-m-chat-message "+v,children:jsxs("div",{className:"chat-message__message-container-avatar",children:[(null==t?void 0:t.deletedAt)?null:t?jsxs("div",{className:"chat-message__message-container",children:[jsxs("div",{className:"chat-message_headline-container align-items-center"+(n===ChatMessageSourceEnum.AUDIT?" pl-0":""),children:[jsxs("div",{className:"chat-message__user-info",children:[n===ChatMessageSourceEnum.AUDIT&&r===ChatMessageSourceEnum.AUDIT&&jsx("i",{className:c}),n===ChatMessageSourceEnum.AUDIT&&r===ChatMessageSourceEnum.LC&&jsx("i",{className:h}),n===ChatMessageSourceEnum.AUDIT&&jsx("div",{className:"mr-1 ml-1",children:jsx(BeeLabel,{value:"||",size:"small",type:"neutral"})}),jsx(BeeLabel,{value:d,size:"small",type:"neutral"})]}),(null==t?void 0:t.createdAt)?jsx(BeeLabel,{value:y(t.createdAt),size:"small",type:"neutral"}):null]}),t.mediaId?x():jsx("div",{className:"chat-message",children:null!==(_=null==t?void 0:t.message)&&void 0!==_?_:"Keine Nachricht"}),s&&a&&p&&jsx(BeeIconButton,{iconClass:l,type:"lightPrimary",rounded:!1,onClick:p})]}):null,jsx(BeeAvatar,{showPlaceholder:!0,placeholderFirstname:m,placeholderLastname:g,showDelete:!1,disabled:!1,size:"xSmall",type:"primary"})]})});var _}!function(e){e.LC="LC",e.AUDIT="AUDIT"}(ChatMessageSourceEnum||(ChatMessageSourceEnum={})),function(e){e.ADMIN="ADMIN",e.USER="USER",e.SYSTEM="SYSTEM"}(ChatParticipantTypeEnum||(ChatParticipantTypeEnum={})),function(e){e.SERVER_STATUS_LOADING="loading",e.SERVER_STATUS_ERROR="error",e.SERVER_STATUS_SUCCESS="success",e.SERVER_STATUS_EXTERNAL_UPDATE="externalUpdate"}(ServerStatus||(ServerStatus={}));const DEFAULT_SUCCESS_TOOLTIP="Änderung gespeichert",DEFAULT_ERROR_TOOLTIP="Die Änderung konnte nicht gespeichert werden",DEFAULT_EXTERNAL_CHANGE_TOOLTIP="Eine andere Person hat dieses Feld soeben bearbeitet";function BeeServerStatusInput({status:e,successIcon:t="pi pi-check",loadingIcon:i,errorIcon:n="pi pi-times",externalChangeIcon:r="pi pi-user",hideIcons:a,children:s,onResetStatus:o,successTooltip:l=DEFAULT_SUCCESS_TOOLTIP,errorTooltip:c=DEFAULT_ERROR_TOOLTIP,externalChangeTooltip:h=DEFAULT_EXTERNAL_CHANGE_TOOLTIP}){const p=e===ServerStatus.SERVER_STATUS_LOADING?"server-status-loading":e===ServerStatus.SERVER_STATUS_ERROR?"server-status-error":e===ServerStatus.SERVER_STATUS_SUCCESS?"server-status-success":e===ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE?"server-status-externalChange":"";return useEffect(()=>{if(e===ServerStatus.SERVER_STATUS_SUCCESS||e===ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE){const e=setTimeout(()=>{null==o||o()},5e3);return()=>clearTimeout(e)}},[e,o]),jsxs("div",{className:e?`serverStatus-input ${p} p-input-icon-right serverStatus-input-icon-right`:"serverStatus-input",children:[jsx(Fragment,{children:s}),e&&!a?jsx(Fragment,{children:e===ServerStatus.SERVER_STATUS_SUCCESS?jsxs(Fragment,{children:[jsx(Tooltip$1,{target:".icon--success",content:l}),jsx("i",{className:t+" icon--success"})]}):e===ServerStatus.SERVER_STATUS_LOADING?jsx(Fragment,{children:i?jsx("i",{className:i+" icon--loading"}):jsx(BeeLoadingSpinner,{strokeWidth:"2",type:"primary"})}):e===ServerStatus.SERVER_STATUS_ERROR?jsxs(Fragment,{children:[jsx(Tooltip$1,{target:".icon--error",content:c}),jsx("i",{className:n+" icon--error"})]}):e===ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE?jsxs(Fragment,{children:[jsx(Tooltip$1,{target:".icon--externalChange",content:h}),jsx("i",{className:r+" icon--externalChange"})]}):null}):null]})}function BeeChangesChip({className:e,values:t,type:i="primary"}){const n=`bee-changes-chip ${`bee-changes-chip--${i}`} ${e?" "+e:""}`;return 0===t.length?null:jsx("div",{className:n,children:function(e){return e.map((e,t)=>{const i=e.value<10?e.value.toString():"9+";return jsxs("div",{className:"bee-changes-chip__icon-wrapper",children:[jsx("i",{className:e.icon}),jsx("div",{}),jsx(Badge,{value:i,severity:"info"})]},t)})}(t)})}function BeeFilterDropDown({id:e,className:t,label:i,value:n,options:r,optionLabel:a,optionValue:s,disabled:o,dropdownIcon:l,deleteIcon:c,statusLabel:h,formstate:p="neutral",readOnly:u,onChange:d}){const f=null!=e?e:libExports.useId(1,"bee-filter-dropdown-")[0],m=f+"input",[g,v]=useState(n);let y="";u&&(y=" bee-filter-dropdown-readOnly",o=!0);const b=("valid"===p?"bee-filter-dropdown-valid":"error"===p?"bee-filter-dropdown-error":"bee-filter-dropdown-neutral")+y,x="p-float-label bee-filter-dropdown-container flex "+(t?" "+t:""),_=null!=c?c:"pi pi-times-circle";useEffect(()=>{v(n)},[n]);return jsxs("div",{className:"bee-filter-dropdown",children:[u&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:f,label:i})}):jsxs("span",{id:f,className:x,children:[jsx(Dropdown,{id:m,value:g,options:r,optionLabel:a,optionValue:s,disabled:null!=o&&o,className:b,dropdownIcon:null!=l?l:"",emptyMessage:"Keine Einträge gefunden",onChange:e=>{return t=e,void(!o&&d&&d(t));var t}}),g&&""!==g?jsx("div",{className:"cancel",children:jsx(BeeIconButton,{iconClass:_,rounded:!0,disabled:o||!1,type:"lightPrimary",isLoading:!1,onClick:()=>{v("")}})}):null,i?jsx("label",{htmlFor:m,children:i}):null]}),"none"!=p&&h?(()=>{const e="medium";return jsx("div",{className:"bee-filter-dropdown-statusLabel",children:"error"===p&&null!=h?jsx(BeeLabel,{size:e,value:String(h),type:"error"}):"valid"===p&&null!=h?jsx(BeeLabel,{size:e,value:String(h),type:"valid"}):"neutral"===p&&null!=h?jsx(BeeLabel,{size:e,value:String(h),type:"neutral"}):null})})():null]})}function BeeFilterTreeSelect({id:e,className:t,label:i,value:n,options:r,valueTemplate:a,display:s="comma",selectionMode:o="single",placeholder:l,filter:c,filterTemplate:h,filterValue:p,filterBy:u,filterPlaceholder:d,confirmBtnText:f,confirmBtnDisabled:m,confirmBtnTooltip:g,deleteIcon:v,disabled:y,readOnly:b,statusLabel:x,formstate:_="neutral",required:S,hideDelete:w,onSelectNodes:C,onChange:P,onHide:E}){const k=null!=e?e:libExports.useId(1,"bee-filter-ts-")[0],A=k+"input",[T,D]=useState(n);let M="";b&&(M=" bee-filter-ts-readOnly",y=!0);const I=("valid"===_?"bee-filter-ts-valid":"error"===_?"bee-filter-ts-error":"bee-filter-ts-neutral")+M,F=" p-float-label bee-filter-ts-container",j=c?"bee-filter-ts-panel":"bee-filter-ts-panel bee-filter-ts-invisible-header",R=v||"pi pi-times-circle";function O(){const e=document.querySelector("body");if(e){const t=new MouseEvent("click",{bubbles:!0,view:window});e.dispatchEvent(t)}}function B(){!y&&E&&E()}useEffect(()=>{D(n)},[n]);return jsxs(Fragment,{children:[b&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:k,label:i})}):jsxs("div",{id:k,className:t?t+F:F,children:[jsx("div",{className:!b&&n&&Object.keys(n).length>0?"bee-filter-ts-filter__deleteBtn":"bee-filter-ts-filter__deleteBtn bee-filter-ts-filter--hidden",children:!T||""===T||w?null:jsx("div",{className:"cancel",children:jsx(BeeIconButton,{iconClass:R,rounded:!0,disabled:y||!1,type:"lightPrimary",isLoading:!1,onClick:()=>{D(""),!y&&C&&(C(void 0),O())}})})}),jsxs("span",{className:"p-float-label",children:[jsx(TreeSelect,{id:A,value:T,options:r,disabled:y||!1,className:I,valueTemplate:a,panelClassName:j,display:null!=s?s:"comma",selectionMode:o,placeholder:l,filter:c,filterTemplate:h,filterValue:p,filterBy:u,filterPlaceholder:d||"Suche",onChange:e=>{D(e.value),function(e){!y&&P&&P(e)}(e)},onHide:()=>{D(n),B()},panelFooterTemplate:()=>jsx("div",{className:"p-d-flex p-jc-end p-ai-center",style:{padding:"1rem"},children:jsx(BeeButton,{label:f||"Übernehmen",type:"secondary",disabled:m||!1,tooltip:m&&g?g:void 0,onClick:()=>{B(),!y&&C&&(C(T),O())}})})}),i?jsxs("label",{htmlFor:A,className:"bee-filter-ts-label",children:[i,S&&i?jsx("span",{className:"bee-filter-ts-label-required",children:jsx("span",{className:"bee-filter-ts-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=_&&x?(()=>{const e="medium";return jsx("div",{className:"bee-filter-ts-statusLabel",children:"error"===_&&null!=x?jsx(BeeLabel,{size:e,value:String(x),type:"error"}):"valid"===_&&null!=x?jsx(BeeLabel,{size:e,value:String(x),type:"valid"}):"neutral"===_&&null!=x?jsx(BeeLabel,{size:e,value:String(x),type:"neutral"}):null})})():null]})}function BeeGalleryImage({id:e,className:t,imageUrl:i,imageKey:n,imageAlt:r,imageTitle:a,imageCopyright:s,isImageSecured:o=!1,showPlaceHolder:l=!1,activateHover:c=!0,readOnly:h,onClick:p,onRemove:u,onAdd:d}){const f=null!=e?e:libExports.useId(1,"bee-gallery-img-")[0];return jsx("div",{id:f,className:"bee-gallery-img "+(h?"bee-gallery-img-readOnly":"")+(c?" bee-gallery-img-hover":" bee-gallery-img-noHover")+" bee-gallery-img-placeholder"+(t?" "+t:""),children:i?jsxs("div",{children:[h?null:jsx("div",{className:"bee-gallery-img-close-button",children:jsx(BeeIconButton,{iconClass:"pi pi-times",rounded:!0,disabled:!1,type:"secondary",isLoading:!1,onClick:e=>function(e){u&&u(e)}(e)})}),jsx("div",{className:"bee-gallery-img-content",children:jsx(BeeImage,{url:i,alt:r,title:a,titlePosition:"left",copyright:s,secured:o,secureKey:o?n:void 0,showPlaceholder:l,onClick:e=>function(e){p&&p(e)}(e)},n)})]}):h?null:jsx("div",{className:"bee-gallery-img-add-button",children:jsx(BeeAddEntryCard,{disabled:h||!1,onClick:e=>function(e){d&&d(e)}(e)})})})}var UserAgent_DEPRECATED_1,hasRequiredUserAgent_DEPRECATED,ExecutionEnvironment_1,hasRequiredExecutionEnvironment,isEventSupported_1,hasRequiredIsEventSupported,normalizeWheel_1,hasRequiredNormalizeWheel$1,normalizeWheel$1,hasRequiredNormalizeWheel;function requireUserAgent_DEPRECATED(){if(hasRequiredUserAgent_DEPRECATED)return UserAgent_DEPRECATED_1;hasRequiredUserAgent_DEPRECATED=1;var e,t,i,n,r,a,s,o,l,c,h,p,u,d,f,m=!1;function g(){if(!m){m=!0;var g=navigator.userAgent,v=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(g),y=/(Mac OS X)|(Windows)|(Linux)/.exec(g);if(p=/\b(iPhone|iP[ao]d)/.exec(g),u=/\b(iP[ao]d)/.exec(g),c=/Android/i.exec(g),d=/FBAN\/\w+;/i.exec(g),f=/Mobile/i.exec(g),h=!!/Win64/.exec(g),v){(e=v[1]?parseFloat(v[1]):v[5]?parseFloat(v[5]):NaN)&&document&&document.documentMode&&(e=document.documentMode);var b=/(?:Trident\/(\d+.\d+))/.exec(g);a=b?parseFloat(b[1])+4:e,t=v[2]?parseFloat(v[2]):NaN,i=v[3]?parseFloat(v[3]):NaN,(n=v[4]?parseFloat(v[4]):NaN)?(v=/(?:Chrome\/(\d+\.\d+))/.exec(g),r=v&&v[1]?parseFloat(v[1]):NaN):r=NaN}else e=t=i=r=n=NaN;if(y){if(y[1]){var x=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(g);s=!x||parseFloat(x[1].replace("_","."))}else s=!1;o=!!y[2],l=!!y[3]}else s=o=l=!1}}var v={ie:function(){return g()||e},ieCompatibilityMode:function(){return g()||a>e},ie64:function(){return v.ie()&&h},firefox:function(){return g()||t},opera:function(){return g()||i},webkit:function(){return g()||n},safari:function(){return v.webkit()},chrome:function(){return g()||r},windows:function(){return g()||o},osx:function(){return g()||s},linux:function(){return g()||l},iphone:function(){return g()||p},mobile:function(){return g()||p||u||c||f},nativeApp:function(){return g()||d},android:function(){return g()||c},ipad:function(){return g()||u}};return UserAgent_DEPRECATED_1=v}function requireExecutionEnvironment(){if(hasRequiredExecutionEnvironment)return ExecutionEnvironment_1;hasRequiredExecutionEnvironment=1;var e=!("undefined"==typeof window||!window.document||!window.document.createElement),t={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:e&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};return ExecutionEnvironment_1=t}function requireIsEventSupported(){if(hasRequiredIsEventSupported)return isEventSupported_1;hasRequiredIsEventSupported=1;var e,t=requireExecutionEnvironment();return t.canUseDOM&&(e=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
|
|
27
|
+
*/function requireLodash(){return hasRequiredLodash||(hasRequiredLodash=1,e=lodash$1,t=lodash$1.exports,function(){var i,n="Expected a function",r="__lodash_hash_undefined__",a="__lodash_placeholder__",s=32,o=128,l=256,c=1/0,h=9007199254740991,p=NaN,u=4294967295,d=[["ary",o],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",l]],f="[object Arguments]",m="[object Array]",g="[object Boolean]",v="[object Date]",y="[object Error]",b="[object Function]",x="[object GeneratorFunction]",_="[object Map]",S="[object Number]",w="[object Object]",C="[object Promise]",P="[object RegExp]",E="[object Set]",k="[object String]",A="[object Symbol]",T="[object WeakMap]",D="[object ArrayBuffer]",M="[object DataView]",I="[object Float32Array]",F="[object Float64Array]",j="[object Int8Array]",R="[object Int16Array]",O="[object Int32Array]",B="[object Uint8Array]",L="[object Uint8ClampedArray]",N="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,G=RegExp($.source),U=RegExp(q.source),Y=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ie=/^\s+/,ne=/\s/,re=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,oe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="['’]",Ae="["+xe+"]",Te="["+Ee+"]",De="["+_e+"]",Me="\\d+",Ie="["+Se+"]",Fe="["+we+"]",je="[^"+xe+Ee+Me+Se+we+Ce+"]",Re="\\ud83c[\\udffb-\\udfff]",Oe="[^"+xe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",Le="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="["+Ce+"]",ze="\\u200d",Ve="(?:"+Fe+"|"+je+")",He="(?:"+Ne+"|"+je+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+De+"|"+Re+")?",Ge="["+Pe+"]?",Ue=Ge+qe+"(?:"+ze+"(?:"+[Oe,Be,Le].join("|")+")"+Ge+qe+")*",Ye="(?:"+[Ie,Be,Le].join("|")+")"+Ue,Ke="(?:"+[Oe+De+"?",De,Be,Le,Ae].join("|")+")",Xe=RegExp(ke,"g"),Ze=RegExp(De,"g"),Je=RegExp(Re+"(?="+Re+")|"+Ke+Ue,"g"),Qe=RegExp([Ne+"?"+Fe+"+"+We+"(?="+[Te,Ne,"$"].join("|")+")",He+"+"+$e+"(?="+[Te,Ne+Ve,"$"].join("|")+")",Ne+"?"+Ve+"+"+We,Ne+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Ye].join("|"),"g"),et=RegExp("["+ze+xe+_e+Pe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,rt={};rt[I]=rt[F]=rt[j]=rt[R]=rt[O]=rt[B]=rt[L]=rt[N]=rt[z]=!0,rt[f]=rt[m]=rt[D]=rt[g]=rt[M]=rt[v]=rt[y]=rt[b]=rt[_]=rt[S]=rt[w]=rt[P]=rt[E]=rt[k]=rt[T]=!1;var at={};at[f]=at[m]=at[D]=at[M]=at[g]=at[v]=at[I]=at[F]=at[j]=at[R]=at[O]=at[_]=at[S]=at[w]=at[P]=at[E]=at[k]=at[A]=at[B]=at[L]=at[N]=at[z]=!0,at[y]=at[b]=at[T]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,lt=parseInt,ct="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,ht="object"==typeof self&&self&&self.Object===Object&&self,pt=ct||ht||Function("return this")(),ut=t&&!t.nodeType&&t,dt=ut&&e&&!e.nodeType&&e,ft=dt&&dt.exports===ut,mt=ft&&ct.process,gt=function(){try{var e=dt&&dt.require&&dt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),vt=gt&>.isArrayBuffer,yt=gt&>.isDate,bt=gt&>.isMap,xt=gt&>.isRegExp,_t=gt&>.isSet,St=gt&>.isTypedArray;function wt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function Ct(e,t,i,n){for(var r=-1,a=null==e?0:e.length;++r<a;){var s=e[r];t(n,s,i(s),e)}return n}function Pt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function Et(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function kt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function At(e,t){for(var i=-1,n=null==e?0:e.length,r=0,a=[];++i<n;){var s=e[i];t(s,i,e)&&(a[r++]=s)}return a}function Tt(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Dt(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1}function Mt(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}function It(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}function Ft(e,t,i,n){var r=-1,a=null==e?0:e.length;for(n&&a&&(i=e[++r]);++r<a;)i=t(i,e[r],r,e);return i}function jt(e,t,i,n){var r=null==e?0:e.length;for(n&&r&&(i=e[--r]);r--;)i=t(i,e[r],r,e);return i}function Rt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var Ot=Wt("length");function Bt(e,t,i){var n;return i(e,function(e,i,r){if(t(e,i,r))return n=i,!1}),n}function Lt(e,t,i,n){for(var r=e.length,a=i+(n?1:-1);n?a--:++a<r;)if(t(e[a],a,e))return a;return-1}function Nt(e,t,i){return t==t?function(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1}(e,t,i):Lt(e,Vt,i)}function zt(e,t,i,n){for(var r=i-1,a=e.length;++r<a;)if(n(e[r],t))return r;return-1}function Vt(e){return e!=e}function Ht(e,t){var i=null==e?0:e.length;return i?Gt(e,t)/i:p}function Wt(e){return function(t){return null==t?i:t[e]}}function $t(e){return function(t){return null==e?i:e[t]}}function qt(e,t,i,n,r){return r(e,function(e,r,a){i=n?(n=!1,e):t(i,e,r,a)}),i}function Gt(e,t){for(var n,r=-1,a=e.length;++r<a;){var s=t(e[r]);s!==i&&(n=n===i?s:n+s)}return n}function Ut(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Yt(e){return e?e.slice(0,pi(e)+1).replace(ie,""):e}function Kt(e){return function(t){return e(t)}}function Xt(e,t){return Mt(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var i=-1,n=e.length;++i<n&&Nt(t,e[i],0)>-1;);return i}function Qt(e,t){for(var i=e.length;i--&&Nt(t,e[i],0)>-1;);return i}var ei=$t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ti=$t({"&":"&","<":"<",">":">",'"':""","'":"'"});function ii(e){return"\\"+st[e]}function ni(e){return et.test(e)}function ri(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function ai(e,t){return function(i){return e(t(i))}}function si(e,t){for(var i=-1,n=e.length,r=0,s=[];++i<n;){var o=e[i];o!==t&&o!==a||(e[i]=a,s[r++]=i)}return s}function oi(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function li(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=[e,e]}),i}function ci(e){return ni(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):Ot(e)}function hi(e){return ni(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function pi(e){for(var t=e.length;t--&&ne.test(e.charAt(t)););return t}var ui=$t({"&":"&","<":"<",">":">",""":'"',"'":"'"}),di=function e(t){var ne=(t=null==t?pt:di.defaults(pt.Object(),t,di.pick(pt,it))).Array,xe=t.Date,_e=t.Error,Se=t.Function,we=t.Math,Ce=t.Object,Pe=t.RegExp,Ee=t.String,ke=t.TypeError,Ae=ne.prototype,Te=Se.prototype,De=Ce.prototype,Me=t["__core-js_shared__"],Ie=Te.toString,Fe=De.hasOwnProperty,je=0,Re=function(){var e=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Oe=De.toString,Be=Ie.call(Ce),Le=pt._,Ne=Pe("^"+Ie.call(Fe).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=ft?t.Buffer:i,Ve=t.Symbol,He=t.Uint8Array,We=ze?ze.allocUnsafe:i,$e=ai(Ce.getPrototypeOf,Ce),qe=Ce.create,Ge=De.propertyIsEnumerable,Ue=Ae.splice,Ye=Ve?Ve.isConcatSpreadable:i,Ke=Ve?Ve.iterator:i,Je=Ve?Ve.toStringTag:i,et=function(){try{var e=ca(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ct=xe&&xe.now!==pt.Date.now&&xe.now,ht=t.setTimeout!==pt.setTimeout&&t.setTimeout,ut=we.ceil,dt=we.floor,mt=Ce.getOwnPropertySymbols,gt=ze?ze.isBuffer:i,Ot=t.isFinite,$t=Ae.join,fi=ai(Ce.keys,Ce),mi=we.max,gi=we.min,vi=xe.now,yi=t.parseInt,bi=we.random,xi=Ae.reverse,_i=ca(t,"DataView"),Si=ca(t,"Map"),wi=ca(t,"Promise"),Ci=ca(t,"Set"),Pi=ca(t,"WeakMap"),Ei=ca(Ce,"create"),ki=Pi&&new Pi,Ai={},Ti=Ra(_i),Di=Ra(Si),Mi=Ra(wi),Ii=Ra(Ci),Fi=Ra(Pi),ji=Ve?Ve.prototype:i,Ri=ji?ji.valueOf:i,Oi=ji?ji.toString:i;function Bi(e){if(Js(e)&&!Vs(e)&&!(e instanceof Vi)){if(e instanceof zi)return e;if(Fe.call(e,"__wrapped__"))return Oa(e)}return new zi(e)}var Li=function(){function e(){}return function(t){if(!Zs(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Ni(){}function zi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Vi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=u,this.__views__=[]}function Hi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Wi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function $i(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function qi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new $i;++t<i;)this.add(e[t])}function Gi(e){var t=this.__data__=new Wi(e);this.size=t.size}function Ui(e,t){var i=Vs(e),n=!i&&zs(e),r=!i&&!n&&qs(e),a=!i&&!n&&!r&&so(e),s=i||n||r||a,o=s?Ut(e.length,Ee):[],l=o.length;for(var c in e)!t&&!Fe.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ga(c,l))||o.push(c);return o}function Yi(e){var t=e.length;return t?e[Gn(0,t-1)]:i}function Ki(e,t){return Ia(kr(e),an(t,0,e.length))}function Xi(e){return Ia(kr(e))}function Zi(e,t,n){(n!==i&&!Bs(e[t],n)||n===i&&!(t in e))&&nn(e,t,n)}function Ji(e,t,n){var r=e[t];Fe.call(e,t)&&Bs(r,n)&&(n!==i||t in e)||nn(e,t,n)}function Qi(e,t){for(var i=e.length;i--;)if(Bs(e[i][0],t))return i;return-1}function en(e,t,i,n){return hn(e,function(e,r,a){t(n,e,i(e),a)}),n}function tn(e,t){return e&&Ar(t,To(t),e)}function nn(e,t,i){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function rn(e,t){for(var n=-1,r=t.length,a=ne(r),s=null==e;++n<r;)a[n]=s?i:Co(e,t[n]);return a}function an(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function sn(e,t,n,r,a,s){var o,l=1&t,c=2&t,h=4&t;if(n&&(o=a?n(e,r,a,s):n(e)),o!==i)return o;if(!Zs(e))return e;var p=Vs(e);if(p){if(o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Fe.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return kr(e,o)}else{var u=ua(e),d=u==b||u==x;if(qs(e))return _r(e,l);if(u==w||u==f||d&&!a){if(o=c||d?{}:fa(e),!l)return c?function(e,t){return Ar(e,pa(e),t)}(e,function(e,t){return e&&Ar(t,Do(t),e)}(o,e)):function(e,t){return Ar(e,ha(e),t)}(e,tn(o,e))}else{if(!at[u])return a?e:{};o=function(e,t,i){var n,r=e.constructor;switch(t){case D:return Sr(e);case g:case v:return new r(+e);case M:return function(e,t){var i=t?Sr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case I:case F:case j:case R:case O:case B:case L:case N:case z:return wr(e,i);case _:return new r;case S:case k:return new r(e);case P:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new r;case A:return n=e,Ri?Ce(Ri.call(n)):{}}}(e,u,l)}}s||(s=new Gi);var m=s.get(e);if(m)return m;s.set(e,o),no(e)?e.forEach(function(i){o.add(sn(i,t,n,i,e,s))}):Qs(e)&&e.forEach(function(i,r){o.set(r,sn(i,t,n,r,e,s))});var y=p?i:(h?c?ia:ta:c?Do:To)(e);return Pt(y||e,function(i,r){y&&(i=e[r=i]),Ji(o,r,sn(i,t,n,r,e,s))}),o}function on(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var a=n[r],s=t[a],o=e[a];if(o===i&&!(a in e)||!s(o))return!1}return!0}function ln(e,t,r){if("function"!=typeof e)throw new ke(n);return Aa(function(){e.apply(i,r)},t)}function cn(e,t,i,n){var r=-1,a=Tt,s=!0,o=e.length,l=[],c=t.length;if(!o)return l;i&&(t=Mt(t,Kt(i))),n?(a=Dt,s=!1):t.length>=200&&(a=Zt,s=!1,t=new qi(t));e:for(;++r<o;){var h=e[r],p=null==i?h:i(h);if(h=n||0!==h?h:0,s&&p==p){for(var u=c;u--;)if(t[u]===p)continue e;l.push(h)}else a(t,p,n)||l.push(h)}return l}Bi.templateSettings={escape:Y,evaluate:K,interpolate:X,variable:"",imports:{_:Bi}},Bi.prototype=Ni.prototype,Bi.prototype.constructor=Bi,zi.prototype=Li(Ni.prototype),zi.prototype.constructor=zi,Vi.prototype=Li(Ni.prototype),Vi.prototype.constructor=Vi,Hi.prototype.clear=function(){this.__data__=Ei?Ei(null):{},this.size=0},Hi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hi.prototype.get=function(e){var t=this.__data__;if(Ei){var n=t[e];return n===r?i:n}return Fe.call(t,e)?t[e]:i},Hi.prototype.has=function(e){var t=this.__data__;return Ei?t[e]!==i:Fe.call(t,e)},Hi.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ei&&t===i?r:t,this},Wi.prototype.clear=function(){this.__data__=[],this.size=0},Wi.prototype.delete=function(e){var t=this.__data__,i=Qi(t,e);return!(i<0||(i==t.length-1?t.pop():Ue.call(t,i,1),--this.size,0))},Wi.prototype.get=function(e){var t=this.__data__,n=Qi(t,e);return n<0?i:t[n][1]},Wi.prototype.has=function(e){return Qi(this.__data__,e)>-1},Wi.prototype.set=function(e,t){var i=this.__data__,n=Qi(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},$i.prototype.clear=function(){this.size=0,this.__data__={hash:new Hi,map:new(Si||Wi),string:new Hi}},$i.prototype.delete=function(e){var t=oa(this,e).delete(e);return this.size-=t?1:0,t},$i.prototype.get=function(e){return oa(this,e).get(e)},$i.prototype.has=function(e){return oa(this,e).has(e)},$i.prototype.set=function(e,t){var i=oa(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},qi.prototype.add=qi.prototype.push=function(e){return this.__data__.set(e,r),this},qi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.clear=function(){this.__data__=new Wi,this.size=0},Gi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Gi.prototype.get=function(e){return this.__data__.get(e)},Gi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Wi){var n=i.__data__;if(!Si||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new $i(n)}return i.set(e,t),this.size=i.size,this};var hn=Mr(yn),pn=Mr(bn,!0);function un(e,t){var i=!0;return hn(e,function(e,n,r){return i=!!t(e,n,r)}),i}function dn(e,t,n){for(var r=-1,a=e.length;++r<a;){var s=e[r],o=t(s);if(null!=o&&(l===i?o==o&&!ao(o):n(o,l)))var l=o,c=s}return c}function fn(e,t){var i=[];return hn(e,function(e,n,r){t(e,n,r)&&i.push(e)}),i}function mn(e,t,i,n,r){var a=-1,s=e.length;for(i||(i=ma),r||(r=[]);++a<s;){var o=e[a];t>0&&i(o)?t>1?mn(o,t-1,i,n,r):It(r,o):n||(r[r.length]=o)}return r}var gn=Ir(),vn=Ir(!0);function yn(e,t){return e&&gn(e,t,To)}function bn(e,t){return e&&vn(e,t,To)}function xn(e,t){return At(t,function(t){return Ys(e[t])})}function _n(e,t){for(var n=0,r=(t=vr(t,e)).length;null!=e&&n<r;)e=e[ja(t[n++])];return n&&n==r?e:i}function Sn(e,t,i){var n=t(e);return Vs(e)?n:It(n,i(e))}function wn(e){return null==e?e===i?"[object Undefined]":"[object Null]":Je&&Je in Ce(e)?function(e){var t=Fe.call(e,Je),n=e[Je];try{e[Je]=i;var r=!0}catch(e){}var a=Oe.call(e);return r&&(t?e[Je]=n:delete e[Je]),a}(e):function(e){return Oe.call(e)}(e)}function Cn(e,t){return e>t}function Pn(e,t){return null!=e&&Fe.call(e,t)}function En(e,t){return null!=e&&t in Ce(e)}function kn(e,t,n){for(var r=n?Dt:Tt,a=e[0].length,s=e.length,o=s,l=ne(s),c=1/0,h=[];o--;){var p=e[o];o&&t&&(p=Mt(p,Kt(t))),c=gi(p.length,c),l[o]=!n&&(t||a>=120&&p.length>=120)?new qi(o&&p):i}p=e[0];var u=-1,d=l[0];e:for(;++u<a&&h.length<c;){var f=p[u],m=t?t(f):f;if(f=n||0!==f?f:0,!(d?Zt(d,m):r(h,m,n))){for(o=s;--o;){var g=l[o];if(!(g?Zt(g,m):r(e[o],m,n)))continue e}d&&d.push(m),h.push(f)}}return h}function An(e,t,n){var r=null==(e=Pa(e,t=vr(t,e)))?e:e[ja(Ua(t))];return null==r?i:wt(r,e,n)}function Tn(e){return Js(e)&&wn(e)==f}function Dn(e,t,n,r,a){return e===t||(null==e||null==t||!Js(e)&&!Js(t)?e!=e&&t!=t:function(e,t,n,r,a,s){var o=Vs(e),l=Vs(t),c=o?m:ua(e),h=l?m:ua(t),p=(c=c==f?w:c)==w,u=(h=h==f?w:h)==w,d=c==h;if(d&&qs(e)){if(!qs(t))return!1;o=!0,p=!1}if(d&&!p)return s||(s=new Gi),o||so(e)?Qr(e,t,n,r,a,s):function(e,t,i,n,r,a,s){switch(i){case M:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!a(new He(e),new He(t)));case g:case v:case S:return Bs(+e,+t);case y:return e.name==t.name&&e.message==t.message;case P:case k:return e==t+"";case _:var o=ri;case E:var l=1&n;if(o||(o=oi),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var h=Qr(o(e),o(t),n,r,a,s);return s.delete(e),h;case A:if(Ri)return Ri.call(e)==Ri.call(t)}return!1}(e,t,c,n,r,a,s);if(!(1&n)){var b=p&&Fe.call(e,"__wrapped__"),x=u&&Fe.call(t,"__wrapped__");if(b||x){var C=b?e.value():e,T=x?t.value():t;return s||(s=new Gi),a(C,T,n,r,s)}}return!!d&&(s||(s=new Gi),function(e,t,n,r,a,s){var o=1&n,l=ta(e),c=l.length,h=ta(t),p=h.length;if(c!=p&&!o)return!1;for(var u=c;u--;){var d=l[u];if(!(o?d in t:Fe.call(t,d)))return!1}var f=s.get(e),m=s.get(t);if(f&&m)return f==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=o;++u<c;){var y=e[d=l[u]],b=t[d];if(r)var x=o?r(b,y,d,t,e,s):r(y,b,d,e,t,s);if(!(x===i?y===b||a(y,b,n,r,s):x)){g=!1;break}v||(v="constructor"==d)}if(g&&!v){var _=e.constructor,S=t.constructor;_==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof S&&S instanceof S||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,n,r,a,s))}(e,t,n,r,Dn,a))}function Mn(e,t,n,r){var a=n.length,s=a,o=!r;if(null==e)return!s;for(e=Ce(e);a--;){var l=n[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<s;){var c=(l=n[a])[0],h=e[c],p=l[1];if(o&&l[2]){if(h===i&&!(c in e))return!1}else{var u=new Gi;if(r)var d=r(h,p,c,e,t,u);if(!(d===i?Dn(p,h,3,r,u):d))return!1}}return!0}function In(e){return!(!Zs(e)||(t=e,Re&&Re in t))&&(Ys(e)?Ne:fe).test(Ra(e));var t}function Fn(e){return"function"==typeof e?e:null==e?tl:"object"==typeof e?Vs(e)?Nn(e[0],e[1]):Ln(e):hl(e)}function jn(e){if(!_a(e))return fi(e);var t=[];for(var i in Ce(e))Fe.call(e,i)&&"constructor"!=i&&t.push(i);return t}function Rn(e){if(!Zs(e))return function(e){var t=[];if(null!=e)for(var i in Ce(e))t.push(i);return t}(e);var t=_a(e),i=[];for(var n in e)("constructor"!=n||!t&&Fe.call(e,n))&&i.push(n);return i}function On(e,t){return e<t}function Bn(e,t){var i=-1,n=Ws(e)?ne(e.length):[];return hn(e,function(e,r,a){n[++i]=t(e,r,a)}),n}function Ln(e){var t=la(e);return 1==t.length&&t[0][2]?wa(t[0][0],t[0][1]):function(i){return i===e||Mn(i,e,t)}}function Nn(e,t){return ya(e)&&Sa(t)?wa(ja(e),t):function(n){var r=Co(n,e);return r===i&&r===t?Po(n,e):Dn(t,r,3)}}function zn(e,t,n,r,a){e!==t&&gn(t,function(s,o){if(a||(a=new Gi),Zs(s))!function(e,t,n,r,a,s,o){var l=Ea(e,n),c=Ea(t,n),h=o.get(c);if(h)Zi(e,n,h);else{var p=s?s(l,c,n+"",e,t,o):i,u=p===i;if(u){var d=Vs(c),f=!d&&qs(c),m=!d&&!f&&so(c);p=c,d||f||m?Vs(l)?p=l:$s(l)?p=kr(l):f?(u=!1,p=_r(c,!0)):m?(u=!1,p=wr(c,!0)):p=[]:to(c)||zs(c)?(p=l,zs(l)?p=mo(l):Zs(l)&&!Ys(l)||(p=fa(c))):u=!1}u&&(o.set(c,p),a(p,c,r,s,o),o.delete(c)),Zi(e,n,p)}}(e,t,o,n,zn,r,a);else{var l=r?r(Ea(e,o),s,o+"",e,t,a):i;l===i&&(l=s),Zi(e,o,l)}},Do)}function Vn(e,t){var n=e.length;if(n)return ga(t+=t<0?n:0,n)?e[t]:i}function Hn(e,t,i){t=t.length?Mt(t,function(e){return Vs(e)?function(t){return _n(t,1===e.length?e[0]:e)}:e}):[tl];var n=-1;t=Mt(t,Kt(sa()));var r=Bn(e,function(e,i,r){var a=Mt(t,function(t){return t(e)});return{criteria:a,index:++n,value:e}});return function(e,t){var i=e.length;for(e.sort(t);i--;)e[i]=e[i].value;return e}(r,function(e,t){return function(e,t,i){for(var n=-1,r=e.criteria,a=t.criteria,s=r.length,o=i.length;++n<s;){var l=Cr(r[n],a[n]);if(l)return n>=o?l:l*("desc"==i[n]?-1:1)}return e.index-t.index}(e,t,i)})}function Wn(e,t,i){for(var n=-1,r=t.length,a={};++n<r;){var s=t[n],o=_n(e,s);i(o,s)&&Zn(a,vr(s,e),o)}return a}function $n(e,t,i,n){var r=n?zt:Nt,a=-1,s=t.length,o=e;for(e===t&&(t=kr(t)),i&&(o=Mt(e,Kt(i)));++a<s;)for(var l=0,c=t[a],h=i?i(c):c;(l=r(o,h,l,n))>-1;)o!==e&&Ue.call(o,l,1),Ue.call(e,l,1);return e}function qn(e,t){for(var i=e?t.length:0,n=i-1;i--;){var r=t[i];if(i==n||r!==a){var a=r;ga(r)?Ue.call(e,r,1):cr(e,r)}}return e}function Gn(e,t){return e+dt(bi()*(t-e+1))}function Un(e,t){var i="";if(!e||t<1||t>h)return i;do{t%2&&(i+=e),(t=dt(t/2))&&(e+=e)}while(t);return i}function Yn(e,t){return Ta(Ca(e,t,tl),e+"")}function Kn(e){return Yi(Lo(e))}function Xn(e,t){var i=Lo(e);return Ia(i,an(t,0,i.length))}function Zn(e,t,n,r){if(!Zs(e))return e;for(var a=-1,s=(t=vr(t,e)).length,o=s-1,l=e;null!=l&&++a<s;){var c=ja(t[a]),h=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(a!=o){var p=l[c];(h=r?r(p,c,l):i)===i&&(h=Zs(p)?p:ga(t[a+1])?[]:{})}Ji(l,c,h),l=l[c]}return e}var Jn=ki?function(e,t){return ki.set(e,t),e}:tl,Qn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Jo(t),writable:!0})}:tl;function er(e){return Ia(Lo(e))}function tr(e,t,i){var n=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(i=i>r?r:i)<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var a=ne(r);++n<r;)a[n]=e[n+t];return a}function ir(e,t){var i;return hn(e,function(e,n,r){return!(i=t(e,n,r))}),!!i}function nr(e,t,i){var n=0,r=null==e?n:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;n<r;){var a=n+r>>>1,s=e[a];null!==s&&!ao(s)&&(i?s<=t:s<t)?n=a+1:r=a}return r}return rr(e,t,tl,i)}function rr(e,t,n,r){var a=0,s=null==e?0:e.length;if(0===s)return 0;for(var o=(t=n(t))!=t,l=null===t,c=ao(t),h=t===i;a<s;){var p=dt((a+s)/2),u=n(e[p]),d=u!==i,f=null===u,m=u==u,g=ao(u);if(o)var v=r||m;else v=h?m&&(r||d):l?m&&d&&(r||!f):c?m&&d&&!f&&(r||!g):!f&&!g&&(r?u<=t:u<t);v?a=p+1:s=p}return gi(s,4294967294)}function ar(e,t){for(var i=-1,n=e.length,r=0,a=[];++i<n;){var s=e[i],o=t?t(s):s;if(!i||!Bs(o,l)){var l=o;a[r++]=0===s?0:s}}return a}function sr(e){return"number"==typeof e?e:ao(e)?p:+e}function or(e){if("string"==typeof e)return e;if(Vs(e))return Mt(e,or)+"";if(ao(e))return Oi?Oi.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function lr(e,t,i){var n=-1,r=Tt,a=e.length,s=!0,o=[],l=o;if(i)s=!1,r=Dt;else if(a>=200){var c=t?null:Ur(e);if(c)return oi(c);s=!1,r=Zt,l=new qi}else l=t?[]:o;e:for(;++n<a;){var h=e[n],p=t?t(h):h;if(h=i||0!==h?h:0,s&&p==p){for(var u=l.length;u--;)if(l[u]===p)continue e;t&&l.push(p),o.push(h)}else r(l,p,i)||(l!==o&&l.push(p),o.push(h))}return o}function cr(e,t){var i=-1,n=(t=vr(t,e)).length;if(!n)return!0;for(var r=null==e||"object"!=typeof e&&"function"!=typeof e;++i<n;){var a=t[i];if("string"==typeof a){if("__proto__"===a&&!Fe.call(e,"__proto__"))return!1;if("constructor"===a&&i+1<n&&"string"==typeof t[i+1]&&"prototype"===t[i+1]){if(r&&0===i)continue;return!1}}}var s=Pa(e,t);return null==s||delete s[ja(Ua(t))]}function hr(e,t,i,n){return Zn(e,t,i(_n(e,t)),n)}function pr(e,t,i,n){for(var r=e.length,a=n?r:-1;(n?a--:++a<r)&&t(e[a],a,e););return i?tr(e,n?0:a,n?a+1:r):tr(e,n?a+1:0,n?r:a)}function ur(e,t){var i=e;return i instanceof Vi&&(i=i.value()),Ft(t,function(e,t){return t.func.apply(t.thisArg,It([e],t.args))},i)}function dr(e,t,i){var n=e.length;if(n<2)return n?lr(e[0]):[];for(var r=-1,a=ne(n);++r<n;)for(var s=e[r],o=-1;++o<n;)o!=r&&(a[r]=cn(a[r]||s,e[o],t,i));return lr(mn(a,1),t,i)}function fr(e,t,n){for(var r=-1,a=e.length,s=t.length,o={};++r<a;){var l=r<s?t[r]:i;n(o,e[r],l)}return o}function mr(e){return $s(e)?e:[]}function gr(e){return"function"==typeof e?e:tl}function vr(e,t){return Vs(e)?e:ya(e,t)?[e]:Fa(go(e))}var yr=Yn;function br(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:tr(e,t,n)}var xr=st||function(e){return pt.clearTimeout(e)};function _r(e,t){if(t)return e.slice();var i=e.length,n=We?We(i):new e.constructor(i);return e.copy(n),n}function Sr(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function wr(e,t){var i=t?Sr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Cr(e,t){if(e!==t){var n=e!==i,r=null===e,a=e==e,s=ao(e),o=t!==i,l=null===t,c=t==t,h=ao(t);if(!l&&!h&&!s&&e>t||s&&o&&c&&!l&&!h||r&&o&&c||!n&&c||!a)return 1;if(!r&&!s&&!h&&e<t||h&&n&&a&&!r&&!s||l&&n&&a||!o&&a||!c)return-1}return 0}function Pr(e,t,i,n){for(var r=-1,a=e.length,s=i.length,o=-1,l=t.length,c=mi(a-s,0),h=ne(l+c),p=!n;++o<l;)h[o]=t[o];for(;++r<s;)(p||r<a)&&(h[i[r]]=e[r]);for(;c--;)h[o++]=e[r++];return h}function Er(e,t,i,n){for(var r=-1,a=e.length,s=-1,o=i.length,l=-1,c=t.length,h=mi(a-o,0),p=ne(h+c),u=!n;++r<h;)p[r]=e[r];for(var d=r;++l<c;)p[d+l]=t[l];for(;++s<o;)(u||r<a)&&(p[d+i[s]]=e[r++]);return p}function kr(e,t){var i=-1,n=e.length;for(t||(t=ne(n));++i<n;)t[i]=e[i];return t}function Ar(e,t,n,r){var a=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var l=t[s],c=r?r(n[l],e[l],l,n,e):i;c===i&&(c=e[l]),a?nn(n,l,c):Ji(n,l,c)}return n}function Tr(e,t){return function(i,n){var r=Vs(i)?Ct:en,a=t?t():{};return r(i,e,sa(n,2),a)}}function Dr(e){return Yn(function(t,n){var r=-1,a=n.length,s=a>1?n[a-1]:i,o=a>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(a--,s):i,o&&va(n[0],n[1],o)&&(s=a<3?i:s,a=1),t=Ce(t);++r<a;){var l=n[r];l&&e(t,l,r,s)}return t})}function Mr(e,t){return function(i,n){if(null==i)return i;if(!Ws(i))return e(i,n);for(var r=i.length,a=t?r:-1,s=Ce(i);(t?a--:++a<r)&&!1!==n(s[a],a,s););return i}}function Ir(e){return function(t,i,n){for(var r=-1,a=Ce(t),s=n(t),o=s.length;o--;){var l=s[e?o:++r];if(!1===i(a[l],l,a))break}return t}}function Fr(e){return function(t){var n=ni(t=go(t))?hi(t):i,r=n?n[0]:t.charAt(0),a=n?br(n,1).join(""):t.slice(1);return r[e]()+a}}function jr(e){return function(t){return Ft(Ko(Vo(t).replace(Xe,"")),e,"")}}function Rr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=Li(e.prototype),n=e.apply(i,t);return Zs(n)?n:i}}function Or(e){return function(t,n,r){var a=Ce(t);if(!Ws(t)){var s=sa(n,3);t=To(t),n=function(e){return s(a[e],e,a)}}var o=e(t,n,r);return o>-1?a[s?t[o]:o]:i}}function Br(e){return ea(function(t){var r=t.length,a=r,s=zi.prototype.thru;for(e&&t.reverse();a--;){var o=t[a];if("function"!=typeof o)throw new ke(n);if(s&&!l&&"wrapper"==ra(o))var l=new zi([],!0)}for(a=l?a:r;++a<r;){var c=ra(o=t[a]),h="wrapper"==c?na(o):i;l=h&&ba(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?l[ra(h[0])].apply(l,h[3]):1==o.length&&ba(o)?l[c]():l.thru(o)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&Vs(i))return l.plant(i).value();for(var n=0,a=r?t[n].apply(this,e):i;++n<r;)a=t[n].call(this,a);return a}})}function Lr(e,t,n,r,a,s,l,c,h,p){var u=t&o,d=1&t,f=2&t,m=24&t,g=512&t,v=f?i:Rr(e);return function o(){for(var y=arguments.length,b=ne(y),x=y;x--;)b[x]=arguments[x];if(m)var _=aa(o),S=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(b,_);if(r&&(b=Pr(b,r,a,m)),s&&(b=Er(b,s,l,m)),y-=S,m&&y<p){var w=si(b,_);return qr(e,t,Lr,o.placeholder,n,b,w,c,h,p-y)}var C=d?n:this,P=f?C[e]:e;return y=b.length,c?b=function(e,t){for(var n=e.length,r=gi(t.length,n),a=kr(e);r--;){var s=t[r];e[r]=ga(s,n)?a[s]:i}return e}(b,c):g&&y>1&&b.reverse(),u&&h<y&&(b.length=h),this&&this!==pt&&this instanceof o&&(P=v||Rr(P)),P.apply(C,b)}}function Nr(e,t){return function(i,n){return function(e,t,i,n){return yn(e,function(e,r,a){t(n,i(e),r,a)}),n}(i,e,t(n),{})}}function zr(e,t){return function(n,r){var a;if(n===i&&r===i)return t;if(n!==i&&(a=n),r!==i){if(a===i)return r;"string"==typeof n||"string"==typeof r?(n=or(n),r=or(r)):(n=sr(n),r=sr(r)),a=e(n,r)}return a}}function Vr(e){return ea(function(t){return t=Mt(t,Kt(sa())),Yn(function(i){var n=this;return e(t,function(e){return wt(e,n,i)})})})}function Hr(e,t){var n=(t=t===i?" ":or(t)).length;if(n<2)return n?Un(t,e):t;var r=Un(t,ut(e/ci(t)));return ni(t)?br(hi(r),0,e).join(""):r.slice(0,e)}function Wr(e){return function(t,n,r){return r&&"number"!=typeof r&&va(t,n,r)&&(n=r=i),t=ho(t),n===i?(n=t,t=0):n=ho(n),function(e,t,i,n){for(var r=-1,a=mi(ut((t-e)/(i||1)),0),s=ne(a);a--;)s[n?a:++r]=e,e+=i;return s}(t,n,r=r===i?t<n?1:-1:ho(r),e)}}function $r(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=fo(t),i=fo(i)),e(t,i)}}function qr(e,t,n,r,a,o,l,c,h,p){var u=8&t;t|=u?s:64,4&(t&=~(u?64:s))||(t&=-4);var d=[e,t,a,u?o:i,u?l:i,u?i:o,u?i:l,c,h,p],f=n.apply(i,d);return ba(e)&&ka(f,d),f.placeholder=r,Da(f,e,t)}function Gr(e){var t=we[e];return function(e,i){if(e=fo(e),(i=null==i?0:gi(po(i),292))&&Ot(e)){var n=(go(e)+"e").split("e");return+((n=(go(t(n[0]+"e"+(+n[1]+i)))+"e").split("e"))[0]+"e"+(+n[1]-i))}return t(e)}}var Ur=Ci&&1/oi(new Ci([,-0]))[1]==c?function(e){return new Ci(e)}:sl;function Yr(e){return function(t){var i=ua(t);return i==_?ri(t):i==E?li(t):function(e,t){return Mt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Kr(e,t,r,c,h,p,u,d){var f=2&t;if(!f&&"function"!=typeof e)throw new ke(n);var m=c?c.length:0;if(m||(t&=-97,c=h=i),u=u===i?u:mi(po(u),0),d=d===i?d:po(d),m-=h?h.length:0,64&t){var g=c,v=h;c=h=i}var y=f?i:na(e),b=[e,t,r,c,h,g,v,p,u,d];if(y&&function(e,t){var i=e[1],n=t[1],r=i|n,s=r<131,c=n==o&&8==i||n==o&&i==l&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==i;if(!s&&!c)return e;1&n&&(e[2]=t[2],r|=1&i?0:4);var h=t[3];if(h){var p=e[3];e[3]=p?Pr(p,h,t[4]):h,e[4]=p?si(e[3],a):t[4]}(h=t[5])&&(p=e[5],e[5]=p?Er(p,h,t[6]):h,e[6]=p?si(e[5],a):t[6]),(h=t[7])&&(e[7]=h),n&o&&(e[8]=null==e[8]?t[8]:gi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(b,y),e=b[0],t=b[1],r=b[2],c=b[3],h=b[4],!(d=b[9]=b[9]===i?f?0:e.length:mi(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||16==t?function(e,t,n){var r=Rr(e);return function a(){for(var s=arguments.length,o=ne(s),l=s,c=aa(a);l--;)o[l]=arguments[l];var h=s<3&&o[0]!==c&&o[s-1]!==c?[]:si(o,c);return(s-=h.length)<n?qr(e,t,Lr,a.placeholder,i,o,h,i,i,n-s):wt(this&&this!==pt&&this instanceof a?r:e,this,o)}}(e,t,d):t!=s&&33!=t||h.length?Lr.apply(i,b):function(e,t,i,n){var r=1&t,a=Rr(e);return function t(){for(var s=-1,o=arguments.length,l=-1,c=n.length,h=ne(c+o),p=this&&this!==pt&&this instanceof t?a:e;++l<c;)h[l]=n[l];for(;o--;)h[l++]=arguments[++s];return wt(p,r?i:this,h)}}(e,t,r,c);else var x=function(e,t,i){var n=1&t,r=Rr(e);return function t(){return(this&&this!==pt&&this instanceof t?r:e).apply(n?i:this,arguments)}}(e,t,r);return Da((y?Jn:ka)(x,b),e,t)}function Xr(e,t,n,r){return e===i||Bs(e,De[n])&&!Fe.call(r,n)?t:e}function Zr(e,t,n,r,a,s){return Zs(e)&&Zs(t)&&(s.set(t,e),zn(e,t,i,Zr,s),s.delete(t)),e}function Jr(e){return to(e)?i:e}function Qr(e,t,n,r,a,s){var o=1&n,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var u=-1,d=!0,f=2&n?new qi:i;for(s.set(e,t),s.set(t,e);++u<l;){var m=e[u],g=t[u];if(r)var v=o?r(g,m,u,t,e,s):r(m,g,u,e,t,s);if(v!==i){if(v)continue;d=!1;break}if(f){if(!Rt(t,function(e,t){if(!Zt(f,t)&&(m===e||a(m,e,n,r,s)))return f.push(t)})){d=!1;break}}else if(m!==g&&!a(m,g,n,r,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function ea(e){return Ta(Ca(e,i,Ha),e+"")}function ta(e){return Sn(e,To,ha)}function ia(e){return Sn(e,Do,pa)}var na=ki?function(e){return ki.get(e)}:sl;function ra(e){for(var t=e.name+"",i=Ai[t],n=Fe.call(Ai,t)?i.length:0;n--;){var r=i[n],a=r.func;if(null==a||a==e)return r.name}return t}function aa(e){return(Fe.call(Bi,"placeholder")?Bi:e).placeholder}function sa(){var e=Bi.iteratee||il;return e=e===il?Fn:e,arguments.length?e(arguments[0],arguments[1]):e}function oa(e,t){var i,n,r=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?r["string"==typeof t?"string":"hash"]:r.map}function la(e){for(var t=To(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,Sa(r)]}return t}function ca(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return In(n)?n:i}var ha=mt?function(e){return null==e?[]:(e=Ce(e),At(mt(e),function(t){return Ge.call(e,t)}))}:dl,pa=mt?function(e){for(var t=[];e;)It(t,ha(e)),e=$e(e);return t}:dl,ua=wn;function da(e,t,i){for(var n=-1,r=(t=vr(t,e)).length,a=!1;++n<r;){var s=ja(t[n]);if(!(a=null!=e&&i(e,s)))break;e=e[s]}return a||++n!=r?a:!!(r=null==e?0:e.length)&&Xs(r)&&ga(s,r)&&(Vs(e)||zs(e))}function fa(e){return"function"!=typeof e.constructor||_a(e)?{}:Li($e(e))}function ma(e){return Vs(e)||zs(e)||!!(Ye&&e&&e[Ye])}function ga(e,t){var i=typeof e;return!!(t=null==t?h:t)&&("number"==i||"symbol"!=i&&ge.test(e))&&e>-1&&e%1==0&&e<t}function va(e,t,i){if(!Zs(i))return!1;var n=typeof t;return!!("number"==n?Ws(i)&&ga(t,i.length):"string"==n&&t in i)&&Bs(i[t],e)}function ya(e,t){if(Vs(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ao(e))||J.test(e)||!Z.test(e)||null!=t&&e in Ce(t)}function ba(e){var t=ra(e),i=Bi[t];if("function"!=typeof i||!(t in Vi.prototype))return!1;if(e===i)return!0;var n=na(i);return!!n&&e===n[0]}(_i&&ua(new _i(new ArrayBuffer(1)))!=M||Si&&ua(new Si)!=_||wi&&ua(wi.resolve())!=C||Ci&&ua(new Ci)!=E||Pi&&ua(new Pi)!=T)&&(ua=function(e){var t=wn(e),n=t==w?e.constructor:i,r=n?Ra(n):"";if(r)switch(r){case Ti:return M;case Di:return _;case Mi:return C;case Ii:return E;case Fi:return T}return t});var xa=Me?Ys:fl;function _a(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||De)}function Sa(e){return e==e&&!Zs(e)}function wa(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Ce(n))}}function Ca(e,t,n){return t=mi(t===i?e.length-1:t,0),function(){for(var i=arguments,r=-1,a=mi(i.length-t,0),s=ne(a);++r<a;)s[r]=i[t+r];r=-1;for(var o=ne(t+1);++r<t;)o[r]=i[r];return o[t]=n(s),wt(e,this,o)}}function Pa(e,t){return t.length<2?e:_n(e,tr(t,0,-1))}function Ea(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ka=Ma(Jn),Aa=ht||function(e,t){return pt.setTimeout(e,t)},Ta=Ma(Qn);function Da(e,t,i){var n=t+"";return Ta(e,function(e,t){var i=t.length;if(!i)return e;var n=i-1;return t[n]=(i>1?"& ":"")+t[n],t=t.join(i>2?", ":" "),e.replace(re,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Pt(d,function(i){var n="_."+i[0];t&i[1]&&!Tt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(n),i)))}function Ma(e){var t=0,n=0;return function(){var r=vi(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Ia(e,t){var n=-1,r=e.length,a=r-1;for(t=t===i?r:t;++n<t;){var s=Gn(n,a),o=e[s];e[s]=e[n],e[n]=o}return e.length=t,e}var Fa=function(e){var t=Ms(e,function(e){return 500===i.size&&i.clear(),e}),i=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,i,n,r){t.push(n?r.replace(ce,"$1"):i||e)}),t});function ja(e){if("string"==typeof e||ao(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ra(e){if(null!=e){try{return Ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Oa(e){if(e instanceof Vi)return e.clone();var t=new zi(e.__wrapped__,e.__chain__);return t.__actions__=kr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ba=Yn(function(e,t){return $s(e)?cn(e,mn(t,1,$s,!0)):[]}),La=Yn(function(e,t){var n=Ua(t);return $s(n)&&(n=i),$s(e)?cn(e,mn(t,1,$s,!0),sa(n,2)):[]}),Na=Yn(function(e,t){var n=Ua(t);return $s(n)&&(n=i),$s(e)?cn(e,mn(t,1,$s,!0),i,n):[]});function za(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:po(i);return r<0&&(r=mi(n+r,0)),Lt(e,sa(t,3),r)}function Va(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r-1;return n!==i&&(a=po(n),a=n<0?mi(r+a,0):gi(a,r-1)),Lt(e,sa(t,3),a,!0)}function Ha(e){return null!=e&&e.length?mn(e,1):[]}function Wa(e){return e&&e.length?e[0]:i}var $a=Yn(function(e){var t=Mt(e,mr);return t.length&&t[0]===e[0]?kn(t):[]}),qa=Yn(function(e){var t=Ua(e),n=Mt(e,mr);return t===Ua(n)?t=i:n.pop(),n.length&&n[0]===e[0]?kn(n,sa(t,2)):[]}),Ga=Yn(function(e){var t=Ua(e),n=Mt(e,mr);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?kn(n,i,t):[]});function Ua(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ya=Yn(Ka);function Ka(e,t){return e&&e.length&&t&&t.length?$n(e,t):e}var Xa=ea(function(e,t){var i=null==e?0:e.length,n=rn(e,t);return qn(e,Mt(t,function(e){return ga(e,i)?+e:e}).sort(Cr)),n});function Za(e){return null==e?e:xi.call(e)}var Ja=Yn(function(e){return lr(mn(e,1,$s,!0))}),Qa=Yn(function(e){var t=Ua(e);return $s(t)&&(t=i),lr(mn(e,1,$s,!0),sa(t,2))}),es=Yn(function(e){var t=Ua(e);return t="function"==typeof t?t:i,lr(mn(e,1,$s,!0),i,t)});function ts(e){if(!e||!e.length)return[];var t=0;return e=At(e,function(e){if($s(e))return t=mi(e.length,t),!0}),Ut(t,function(t){return Mt(e,Wt(t))})}function is(e,t){if(!e||!e.length)return[];var n=ts(e);return null==t?n:Mt(n,function(e){return wt(t,i,e)})}var ns=Yn(function(e,t){return $s(e)?cn(e,t):[]}),rs=Yn(function(e){return dr(At(e,$s))}),as=Yn(function(e){var t=Ua(e);return $s(t)&&(t=i),dr(At(e,$s),sa(t,2))}),ss=Yn(function(e){var t=Ua(e);return t="function"==typeof t?t:i,dr(At(e,$s),i,t)}),os=Yn(ts),ls=Yn(function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,is(e,n)});function cs(e){var t=Bi(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ps=ea(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,a=function(t){return rn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vi&&ga(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:hs,args:[a],thisArg:i}),new zi(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(a)}),us=Tr(function(e,t,i){Fe.call(e,i)?++e[i]:nn(e,i,1)}),ds=Or(za),fs=Or(Va);function ms(e,t){return(Vs(e)?Pt:hn)(e,sa(t,3))}function gs(e,t){return(Vs(e)?Et:pn)(e,sa(t,3))}var vs=Tr(function(e,t,i){Fe.call(e,i)?e[i].push(t):nn(e,i,[t])}),ys=Yn(function(e,t,i){var n=-1,r="function"==typeof t,a=Ws(e)?ne(e.length):[];return hn(e,function(e){a[++n]=r?wt(t,e,i):An(e,t,i)}),a}),bs=Tr(function(e,t,i){nn(e,i,t)});function xs(e,t){return(Vs(e)?Mt:Bn)(e,sa(t,3))}var _s=Tr(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]}),Ss=Yn(function(e,t){if(null==e)return[];var i=t.length;return i>1&&va(e,t[0],t[1])?t=[]:i>2&&va(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,mn(t,1),[])}),ws=ct||function(){return pt.Date.now()};function Cs(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Kr(e,o,i,i,i,i,t)}function Ps(e,t){var r;if("function"!=typeof t)throw new ke(n);return e=po(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Es=Yn(function(e,t,i){var n=1;if(i.length){var r=si(i,aa(Es));n|=s}return Kr(e,n,t,i,r)}),ks=Yn(function(e,t,i){var n=3;if(i.length){var r=si(i,aa(ks));n|=s}return Kr(t,n,e,i,r)});function As(e,t,r){var a,s,o,l,c,h,p=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new ke(n);function m(t){var n=a,r=s;return a=s=i,p=t,l=e.apply(r,n)}function g(e){var n=e-h;return h===i||n>=t||n<0||d&&e-p>=o}function v(){var e=ws();if(g(e))return y(e);c=Aa(v,function(e){var i=t-(e-h);return d?gi(i,o-(e-p)):i}(e))}function y(e){return c=i,f&&a?m(e):(a=s=i,l)}function b(){var e=ws(),n=g(e);if(a=arguments,s=this,h=e,n){if(c===i)return function(e){return p=e,c=Aa(v,t),u?m(e):l}(h);if(d)return xr(c),c=Aa(v,t),m(h)}return c===i&&(c=Aa(v,t)),l}return t=fo(t)||0,Zs(r)&&(u=!!r.leading,o=(d="maxWait"in r)?mi(fo(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f),b.cancel=function(){c!==i&&xr(c),p=0,a=h=s=c=i},b.flush=function(){return c===i?l:y(ws())},b}var Ts=Yn(function(e,t){return ln(e,1,t)}),Ds=Yn(function(e,t,i){return ln(e,fo(t)||0,i)});function Ms(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(n);var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],a=i.cache;if(a.has(r))return a.get(r);var s=e.apply(this,n);return i.cache=a.set(r,s)||a,s};return i.cache=new(Ms.Cache||$i),i}function Is(e){if("function"!=typeof e)throw new ke(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ms.Cache=$i;var Fs=yr(function(e,t){var i=(t=1==t.length&&Vs(t[0])?Mt(t[0],Kt(sa())):Mt(mn(t,1),Kt(sa()))).length;return Yn(function(n){for(var r=-1,a=gi(n.length,i);++r<a;)n[r]=t[r].call(this,n[r]);return wt(e,this,n)})}),js=Yn(function(e,t){var n=si(t,aa(js));return Kr(e,s,i,t,n)}),Rs=Yn(function(e,t){var n=si(t,aa(Rs));return Kr(e,64,i,t,n)}),Os=ea(function(e,t){return Kr(e,l,i,i,i,t)});function Bs(e,t){return e===t||e!=e&&t!=t}var Ls=$r(Cn),Ns=$r(function(e,t){return e>=t}),zs=Tn(function(){return arguments}())?Tn:function(e){return Js(e)&&Fe.call(e,"callee")&&!Ge.call(e,"callee")},Vs=ne.isArray,Hs=vt?Kt(vt):function(e){return Js(e)&&wn(e)==D};function Ws(e){return null!=e&&Xs(e.length)&&!Ys(e)}function $s(e){return Js(e)&&Ws(e)}var qs=gt||fl,Gs=yt?Kt(yt):function(e){return Js(e)&&wn(e)==v};function Us(e){if(!Js(e))return!1;var t=wn(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!to(e)}function Ys(e){if(!Zs(e))return!1;var t=wn(e);return t==b||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ks(e){return"number"==typeof e&&e==po(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Zs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Js(e){return null!=e&&"object"==typeof e}var Qs=bt?Kt(bt):function(e){return Js(e)&&ua(e)==_};function eo(e){return"number"==typeof e||Js(e)&&wn(e)==S}function to(e){if(!Js(e)||wn(e)!=w)return!1;var t=$e(e);if(null===t)return!0;var i=Fe.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Ie.call(i)==Be}var io=xt?Kt(xt):function(e){return Js(e)&&wn(e)==P},no=_t?Kt(_t):function(e){return Js(e)&&ua(e)==E};function ro(e){return"string"==typeof e||!Vs(e)&&Js(e)&&wn(e)==k}function ao(e){return"symbol"==typeof e||Js(e)&&wn(e)==A}var so=St?Kt(St):function(e){return Js(e)&&Xs(e.length)&&!!rt[wn(e)]},oo=$r(On),lo=$r(function(e,t){return e<=t});function co(e){if(!e)return[];if(Ws(e))return ro(e)?hi(e):kr(e);if(Ke&&e[Ke])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[Ke]());var t=ua(e);return(t==_?ri:t==E?oi:Lo)(e)}function ho(e){return e?(e=fo(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function po(e){var t=ho(e),i=t%1;return t==t?i?t-i:t:0}function uo(e){return e?an(po(e),0,u):0}function fo(e){if("number"==typeof e)return e;if(ao(e))return p;if(Zs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Zs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var i=de.test(e);return i||me.test(e)?lt(e.slice(2),i?2:8):ue.test(e)?p:+e}function mo(e){return Ar(e,Do(e))}function go(e){return null==e?"":or(e)}var vo=Dr(function(e,t){if(_a(t)||Ws(t))Ar(t,To(t),e);else for(var i in t)Fe.call(t,i)&&Ji(e,i,t[i])}),yo=Dr(function(e,t){Ar(t,Do(t),e)}),bo=Dr(function(e,t,i,n){Ar(t,Do(t),e,n)}),xo=Dr(function(e,t,i,n){Ar(t,To(t),e,n)}),_o=ea(rn),So=Yn(function(e,t){e=Ce(e);var n=-1,r=t.length,a=r>2?t[2]:i;for(a&&va(t[0],t[1],a)&&(r=1);++n<r;)for(var s=t[n],o=Do(s),l=-1,c=o.length;++l<c;){var h=o[l],p=e[h];(p===i||Bs(p,De[h])&&!Fe.call(e,h))&&(e[h]=s[h])}return e}),wo=Yn(function(e){return e.push(i,Zr),wt(Io,i,e)});function Co(e,t,n){var r=null==e?i:_n(e,t);return r===i?n:r}function Po(e,t){return null!=e&&da(e,t,En)}var Eo=Nr(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),e[t]=i},Jo(tl)),ko=Nr(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),Fe.call(e,t)?e[t].push(i):e[t]=[i]},sa),Ao=Yn(An);function To(e){return Ws(e)?Ui(e):jn(e)}function Do(e){return Ws(e)?Ui(e,!0):Rn(e)}var Mo=Dr(function(e,t,i){zn(e,t,i)}),Io=Dr(function(e,t,i,n){zn(e,t,i,n)}),Fo=ea(function(e,t){var i={};if(null==e)return i;var n=!1;t=Mt(t,function(t){return t=vr(t,e),n||(n=t.length>1),t}),Ar(e,ia(e),i),n&&(i=sn(i,7,Jr));for(var r=t.length;r--;)cr(i,t[r]);return i}),jo=ea(function(e,t){return null==e?{}:function(e,t){return Wn(e,t,function(t,i){return Po(e,i)})}(e,t)});function Ro(e,t){if(null==e)return{};var i=Mt(ia(e),function(e){return[e]});return t=sa(t),Wn(e,i,function(e,i){return t(e,i[0])})}var Oo=Yr(To),Bo=Yr(Do);function Lo(e){return null==e?[]:Xt(e,To(e))}var No=jr(function(e,t,i){return t=t.toLowerCase(),e+(i?zo(t):t)});function zo(e){return Yo(go(e).toLowerCase())}function Vo(e){return(e=go(e))&&e.replace(ve,ei).replace(Ze,"")}var Ho=jr(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),Wo=jr(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),$o=Fr("toLowerCase"),qo=jr(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}),Go=jr(function(e,t,i){return e+(i?" ":"")+Yo(t)}),Uo=jr(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),Yo=Fr("toUpperCase");function Ko(e,t,n){return e=go(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(oe)||[]}(e):e.match(t)||[]}var Xo=Yn(function(e,t){try{return wt(e,i,t)}catch(e){return Us(e)?e:new _e(e)}}),Zo=ea(function(e,t){return Pt(t,function(t){t=ja(t),nn(e,t,Es(e[t],e))}),e});function Jo(e){return function(){return e}}var Qo=Br(),el=Br(!0);function tl(e){return e}function il(e){return Fn("function"==typeof e?e:sn(e,1))}var nl=Yn(function(e,t){return function(i){return An(i,e,t)}}),rl=Yn(function(e,t){return function(i){return An(e,i,t)}});function al(e,t,i){var n=To(t),r=xn(t,n);null!=i||Zs(t)&&(r.length||!n.length)||(i=t,t=e,e=this,r=xn(t,To(t)));var a=!(Zs(i)&&"chain"in i&&!i.chain),s=Ys(e);return Pt(r,function(i){var n=t[i];e[i]=n,s&&(e.prototype[i]=function(){var t=this.__chain__;if(a||t){var i=e(this.__wrapped__);return(i.__actions__=kr(this.__actions__)).push({func:n,args:arguments,thisArg:e}),i.__chain__=t,i}return n.apply(e,It([this.value()],arguments))})}),e}function sl(){}var ol=Vr(Mt),ll=Vr(kt),cl=Vr(Rt);function hl(e){return ya(e)?Wt(ja(e)):function(e){return function(t){return _n(t,e)}}(e)}var pl=Wr(),ul=Wr(!0);function dl(){return[]}function fl(){return!1}var ml,gl=zr(function(e,t){return e+t},0),vl=Gr("ceil"),yl=zr(function(e,t){return e/t},1),bl=Gr("floor"),xl=zr(function(e,t){return e*t},1),_l=Gr("round"),Sl=zr(function(e,t){return e-t},0);return Bi.after=function(e,t){if("function"!=typeof t)throw new ke(n);return e=po(e),function(){if(--e<1)return t.apply(this,arguments)}},Bi.ary=Cs,Bi.assign=vo,Bi.assignIn=yo,Bi.assignInWith=bo,Bi.assignWith=xo,Bi.at=_o,Bi.before=Ps,Bi.bind=Es,Bi.bindAll=Zo,Bi.bindKey=ks,Bi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},Bi.chain=cs,Bi.chunk=function(e,t,n){t=(n?va(e,t,n):t===i)?1:mi(po(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var a=0,s=0,o=ne(ut(r/t));a<r;)o[s++]=tr(e,a,a+=t);return o},Bi.compact=function(e){for(var t=-1,i=null==e?0:e.length,n=0,r=[];++t<i;){var a=e[t];a&&(r[n++]=a)}return r},Bi.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ne(e-1),i=arguments[0],n=e;n--;)t[n-1]=arguments[n];return It(Vs(i)?kr(i):[i],mn(t,1))},Bi.cond=function(e){var t=null==e?0:e.length,i=sa();return e=t?Mt(e,function(e){if("function"!=typeof e[1])throw new ke(n);return[i(e[0]),e[1]]}):[],Yn(function(i){for(var n=-1;++n<t;){var r=e[n];if(wt(r[0],this,i))return wt(r[1],this,i)}})},Bi.conforms=function(e){return function(e){var t=To(e);return function(i){return on(i,e,t)}}(sn(e,1))},Bi.constant=Jo,Bi.countBy=us,Bi.create=function(e,t){var i=Li(e);return null==t?i:tn(i,t)},Bi.curry=function e(t,n,r){var a=Kr(t,8,i,i,i,i,i,n=r?i:n);return a.placeholder=e.placeholder,a},Bi.curryRight=function e(t,n,r){var a=Kr(t,16,i,i,i,i,i,n=r?i:n);return a.placeholder=e.placeholder,a},Bi.debounce=As,Bi.defaults=So,Bi.defaultsDeep=wo,Bi.defer=Ts,Bi.delay=Ds,Bi.difference=Ba,Bi.differenceBy=La,Bi.differenceWith=Na,Bi.drop=function(e,t,n){var r=null==e?0:e.length;return r?tr(e,(t=n||t===i?1:po(t))<0?0:t,r):[]},Bi.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?tr(e,0,(t=r-(t=n||t===i?1:po(t)))<0?0:t):[]},Bi.dropRightWhile=function(e,t){return e&&e.length?pr(e,sa(t,3),!0,!0):[]},Bi.dropWhile=function(e,t){return e&&e.length?pr(e,sa(t,3),!0):[]},Bi.fill=function(e,t,n,r){var a=null==e?0:e.length;return a?(n&&"number"!=typeof n&&va(e,t,n)&&(n=0,r=a),function(e,t,n,r){var a=e.length;for((n=po(n))<0&&(n=-n>a?0:a+n),(r=r===i||r>a?a:po(r))<0&&(r+=a),r=n>r?0:uo(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Bi.filter=function(e,t){return(Vs(e)?At:fn)(e,sa(t,3))},Bi.flatMap=function(e,t){return mn(xs(e,t),1)},Bi.flatMapDeep=function(e,t){return mn(xs(e,t),c)},Bi.flatMapDepth=function(e,t,n){return n=n===i?1:po(n),mn(xs(e,t),n)},Bi.flatten=Ha,Bi.flattenDeep=function(e){return null!=e&&e.length?mn(e,c):[]},Bi.flattenDepth=function(e,t){return null!=e&&e.length?mn(e,t=t===i?1:po(t)):[]},Bi.flip=function(e){return Kr(e,512)},Bi.flow=Qo,Bi.flowRight=el,Bi.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,n={};++t<i;){var r=e[t];n[r[0]]=r[1]}return n},Bi.functions=function(e){return null==e?[]:xn(e,To(e))},Bi.functionsIn=function(e){return null==e?[]:xn(e,Do(e))},Bi.groupBy=vs,Bi.initial=function(e){return null!=e&&e.length?tr(e,0,-1):[]},Bi.intersection=$a,Bi.intersectionBy=qa,Bi.intersectionWith=Ga,Bi.invert=Eo,Bi.invertBy=ko,Bi.invokeMap=ys,Bi.iteratee=il,Bi.keyBy=bs,Bi.keys=To,Bi.keysIn=Do,Bi.map=xs,Bi.mapKeys=function(e,t){var i={};return t=sa(t,3),yn(e,function(e,n,r){nn(i,t(e,n,r),e)}),i},Bi.mapValues=function(e,t){var i={};return t=sa(t,3),yn(e,function(e,n,r){nn(i,n,t(e,n,r))}),i},Bi.matches=function(e){return Ln(sn(e,1))},Bi.matchesProperty=function(e,t){return Nn(e,sn(t,1))},Bi.memoize=Ms,Bi.merge=Mo,Bi.mergeWith=Io,Bi.method=nl,Bi.methodOf=rl,Bi.mixin=al,Bi.negate=Is,Bi.nthArg=function(e){return e=po(e),Yn(function(t){return Vn(t,e)})},Bi.omit=Fo,Bi.omitBy=function(e,t){return Ro(e,Is(sa(t)))},Bi.once=function(e){return Ps(2,e)},Bi.orderBy=function(e,t,n,r){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(n=r?i:n)||(n=null==n?[]:[n]),Hn(e,t,n))},Bi.over=ol,Bi.overArgs=Fs,Bi.overEvery=ll,Bi.overSome=cl,Bi.partial=js,Bi.partialRight=Rs,Bi.partition=_s,Bi.pick=jo,Bi.pickBy=Ro,Bi.property=hl,Bi.propertyOf=function(e){return function(t){return null==e?i:_n(e,t)}},Bi.pull=Ya,Bi.pullAll=Ka,Bi.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?$n(e,t,sa(i,2)):e},Bi.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$n(e,t,i,n):e},Bi.pullAt=Xa,Bi.range=pl,Bi.rangeRight=ul,Bi.rearg=Os,Bi.reject=function(e,t){return(Vs(e)?At:fn)(e,Is(sa(t,3)))},Bi.remove=function(e,t){var i=[];if(!e||!e.length)return i;var n=-1,r=[],a=e.length;for(t=sa(t,3);++n<a;){var s=e[n];t(s,n,e)&&(i.push(s),r.push(n))}return qn(e,r),i},Bi.rest=function(e,t){if("function"!=typeof e)throw new ke(n);return Yn(e,t=t===i?t:po(t))},Bi.reverse=Za,Bi.sampleSize=function(e,t,n){return t=(n?va(e,t,n):t===i)?1:po(t),(Vs(e)?Ki:Xn)(e,t)},Bi.set=function(e,t,i){return null==e?e:Zn(e,t,i)},Bi.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Zn(e,t,n,r)},Bi.shuffle=function(e){return(Vs(e)?Xi:er)(e)},Bi.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&va(e,t,n)?(t=0,n=r):(t=null==t?0:po(t),n=n===i?r:po(n)),tr(e,t,n)):[]},Bi.sortBy=Ss,Bi.sortedUniq=function(e){return e&&e.length?ar(e):[]},Bi.sortedUniqBy=function(e,t){return e&&e.length?ar(e,sa(t,2)):[]},Bi.split=function(e,t,n){return n&&"number"!=typeof n&&va(e,t,n)&&(t=n=i),(n=n===i?u:n>>>0)?(e=go(e))&&("string"==typeof t||null!=t&&!io(t))&&!(t=or(t))&&ni(e)?br(hi(e),0,n):e.split(t,n):[]},Bi.spread=function(e,t){if("function"!=typeof e)throw new ke(n);return t=null==t?0:mi(po(t),0),Yn(function(i){var n=i[t],r=br(i,0,t);return n&&It(r,n),wt(e,this,r)})},Bi.tail=function(e){var t=null==e?0:e.length;return t?tr(e,1,t):[]},Bi.take=function(e,t,n){return e&&e.length?tr(e,0,(t=n||t===i?1:po(t))<0?0:t):[]},Bi.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?tr(e,(t=r-(t=n||t===i?1:po(t)))<0?0:t,r):[]},Bi.takeRightWhile=function(e,t){return e&&e.length?pr(e,sa(t,3),!1,!0):[]},Bi.takeWhile=function(e,t){return e&&e.length?pr(e,sa(t,3)):[]},Bi.tap=function(e,t){return t(e),e},Bi.throttle=function(e,t,i){var r=!0,a=!0;if("function"!=typeof e)throw new ke(n);return Zs(i)&&(r="leading"in i?!!i.leading:r,a="trailing"in i?!!i.trailing:a),As(e,t,{leading:r,maxWait:t,trailing:a})},Bi.thru=hs,Bi.toArray=co,Bi.toPairs=Oo,Bi.toPairsIn=Bo,Bi.toPath=function(e){return Vs(e)?Mt(e,ja):ao(e)?[e]:kr(Fa(go(e)))},Bi.toPlainObject=mo,Bi.transform=function(e,t,i){var n=Vs(e),r=n||qs(e)||so(e);if(t=sa(t,4),null==i){var a=e&&e.constructor;i=r?n?new a:[]:Zs(e)&&Ys(a)?Li($e(e)):{}}return(r?Pt:yn)(e,function(e,n,r){return t(i,e,n,r)}),i},Bi.unary=function(e){return Cs(e,1)},Bi.union=Ja,Bi.unionBy=Qa,Bi.unionWith=es,Bi.uniq=function(e){return e&&e.length?lr(e):[]},Bi.uniqBy=function(e,t){return e&&e.length?lr(e,sa(t,2)):[]},Bi.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?lr(e,i,t):[]},Bi.unset=function(e,t){return null==e||cr(e,t)},Bi.unzip=ts,Bi.unzipWith=is,Bi.update=function(e,t,i){return null==e?e:hr(e,t,gr(i))},Bi.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:hr(e,t,gr(n),r)},Bi.values=Lo,Bi.valuesIn=function(e){return null==e?[]:Xt(e,Do(e))},Bi.without=ns,Bi.words=Ko,Bi.wrap=function(e,t){return js(gr(t),e)},Bi.xor=rs,Bi.xorBy=as,Bi.xorWith=ss,Bi.zip=os,Bi.zipObject=function(e,t){return fr(e||[],t||[],Ji)},Bi.zipObjectDeep=function(e,t){return fr(e||[],t||[],Zn)},Bi.zipWith=ls,Bi.entries=Oo,Bi.entriesIn=Bo,Bi.extend=yo,Bi.extendWith=bo,al(Bi,Bi),Bi.add=gl,Bi.attempt=Xo,Bi.camelCase=No,Bi.capitalize=zo,Bi.ceil=vl,Bi.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=fo(n))==n?n:0),t!==i&&(t=(t=fo(t))==t?t:0),an(fo(e),t,n)},Bi.clone=function(e){return sn(e,4)},Bi.cloneDeep=function(e){return sn(e,5)},Bi.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:i)},Bi.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:i)},Bi.conformsTo=function(e,t){return null==t||on(e,t,To(t))},Bi.deburr=Vo,Bi.defaultTo=function(e,t){return null==e||e!=e?t:e},Bi.divide=yl,Bi.endsWith=function(e,t,n){e=go(e),t=or(t);var r=e.length,a=n=n===i?r:an(po(n),0,r);return(n-=t.length)>=0&&e.slice(n,a)==t},Bi.eq=Bs,Bi.escape=function(e){return(e=go(e))&&U.test(e)?e.replace(q,ti):e},Bi.escapeRegExp=function(e){return(e=go(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Bi.every=function(e,t,n){var r=Vs(e)?kt:un;return n&&va(e,t,n)&&(t=i),r(e,sa(t,3))},Bi.find=ds,Bi.findIndex=za,Bi.findKey=function(e,t){return Bt(e,sa(t,3),yn)},Bi.findLast=fs,Bi.findLastIndex=Va,Bi.findLastKey=function(e,t){return Bt(e,sa(t,3),bn)},Bi.floor=bl,Bi.forEach=ms,Bi.forEachRight=gs,Bi.forIn=function(e,t){return null==e?e:gn(e,sa(t,3),Do)},Bi.forInRight=function(e,t){return null==e?e:vn(e,sa(t,3),Do)},Bi.forOwn=function(e,t){return e&&yn(e,sa(t,3))},Bi.forOwnRight=function(e,t){return e&&bn(e,sa(t,3))},Bi.get=Co,Bi.gt=Ls,Bi.gte=Ns,Bi.has=function(e,t){return null!=e&&da(e,t,Pn)},Bi.hasIn=Po,Bi.head=Wa,Bi.identity=tl,Bi.includes=function(e,t,i,n){e=Ws(e)?e:Lo(e),i=i&&!n?po(i):0;var r=e.length;return i<0&&(i=mi(r+i,0)),ro(e)?i<=r&&e.indexOf(t,i)>-1:!!r&&Nt(e,t,i)>-1},Bi.indexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:po(i);return r<0&&(r=mi(n+r,0)),Nt(e,t,r)},Bi.inRange=function(e,t,n){return t=ho(t),n===i?(n=t,t=0):n=ho(n),function(e,t,i){return e>=gi(t,i)&&e<mi(t,i)}(e=fo(e),t,n)},Bi.invoke=Ao,Bi.isArguments=zs,Bi.isArray=Vs,Bi.isArrayBuffer=Hs,Bi.isArrayLike=Ws,Bi.isArrayLikeObject=$s,Bi.isBoolean=function(e){return!0===e||!1===e||Js(e)&&wn(e)==g},Bi.isBuffer=qs,Bi.isDate=Gs,Bi.isElement=function(e){return Js(e)&&1===e.nodeType&&!to(e)},Bi.isEmpty=function(e){if(null==e)return!0;if(Ws(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||qs(e)||so(e)||zs(e)))return!e.length;var t=ua(e);if(t==_||t==E)return!e.size;if(_a(e))return!jn(e).length;for(var i in e)if(Fe.call(e,i))return!1;return!0},Bi.isEqual=function(e,t){return Dn(e,t)},Bi.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Dn(e,t,i,n):!!r},Bi.isError=Us,Bi.isFinite=function(e){return"number"==typeof e&&Ot(e)},Bi.isFunction=Ys,Bi.isInteger=Ks,Bi.isLength=Xs,Bi.isMap=Qs,Bi.isMatch=function(e,t){return e===t||Mn(e,t,la(t))},Bi.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Mn(e,t,la(t),n)},Bi.isNaN=function(e){return eo(e)&&e!=+e},Bi.isNative=function(e){if(xa(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return In(e)},Bi.isNil=function(e){return null==e},Bi.isNull=function(e){return null===e},Bi.isNumber=eo,Bi.isObject=Zs,Bi.isObjectLike=Js,Bi.isPlainObject=to,Bi.isRegExp=io,Bi.isSafeInteger=function(e){return Ks(e)&&e>=-9007199254740991&&e<=h},Bi.isSet=no,Bi.isString=ro,Bi.isSymbol=ao,Bi.isTypedArray=so,Bi.isUndefined=function(e){return e===i},Bi.isWeakMap=function(e){return Js(e)&&ua(e)==T},Bi.isWeakSet=function(e){return Js(e)&&"[object WeakSet]"==wn(e)},Bi.join=function(e,t){return null==e?"":$t.call(e,t)},Bi.kebabCase=Ho,Bi.last=Ua,Bi.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r;return n!==i&&(a=(a=po(n))<0?mi(r+a,0):gi(a,r-1)),t==t?function(e,t,i){for(var n=i+1;n--;)if(e[n]===t)return n;return n}(e,t,a):Lt(e,Vt,a,!0)},Bi.lowerCase=Wo,Bi.lowerFirst=$o,Bi.lt=oo,Bi.lte=lo,Bi.max=function(e){return e&&e.length?dn(e,tl,Cn):i},Bi.maxBy=function(e,t){return e&&e.length?dn(e,sa(t,2),Cn):i},Bi.mean=function(e){return Ht(e,tl)},Bi.meanBy=function(e,t){return Ht(e,sa(t,2))},Bi.min=function(e){return e&&e.length?dn(e,tl,On):i},Bi.minBy=function(e,t){return e&&e.length?dn(e,sa(t,2),On):i},Bi.stubArray=dl,Bi.stubFalse=fl,Bi.stubObject=function(){return{}},Bi.stubString=function(){return""},Bi.stubTrue=function(){return!0},Bi.multiply=xl,Bi.nth=function(e,t){return e&&e.length?Vn(e,po(t)):i},Bi.noConflict=function(){return pt._===this&&(pt._=Le),this},Bi.noop=sl,Bi.now=ws,Bi.pad=function(e,t,i){e=go(e);var n=(t=po(t))?ci(e):0;if(!t||n>=t)return e;var r=(t-n)/2;return Hr(dt(r),i)+e+Hr(ut(r),i)},Bi.padEnd=function(e,t,i){e=go(e);var n=(t=po(t))?ci(e):0;return t&&n<t?e+Hr(t-n,i):e},Bi.padStart=function(e,t,i){e=go(e);var n=(t=po(t))?ci(e):0;return t&&n<t?Hr(t-n,i)+e:e},Bi.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),yi(go(e).replace(ie,""),t||0)},Bi.random=function(e,t,n){if(n&&"boolean"!=typeof n&&va(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ho(e),t===i?(t=e,e=0):t=ho(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var a=bi();return gi(e+a*(t-e+ot("1e-"+((a+"").length-1))),t)}return Gn(e,t)},Bi.reduce=function(e,t,i){var n=Vs(e)?Ft:qt,r=arguments.length<3;return n(e,sa(t,4),i,r,hn)},Bi.reduceRight=function(e,t,i){var n=Vs(e)?jt:qt,r=arguments.length<3;return n(e,sa(t,4),i,r,pn)},Bi.repeat=function(e,t,n){return t=(n?va(e,t,n):t===i)?1:po(t),Un(go(e),t)},Bi.replace=function(){var e=arguments,t=go(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bi.result=function(e,t,n){var r=-1,a=(t=vr(t,e)).length;for(a||(a=1,e=i);++r<a;){var s=null==e?i:e[ja(t[r])];s===i&&(r=a,s=n),e=Ys(s)?s.call(e):s}return e},Bi.round=_l,Bi.runInContext=e,Bi.sample=function(e){return(Vs(e)?Yi:Kn)(e)},Bi.size=function(e){if(null==e)return 0;if(Ws(e))return ro(e)?ci(e):e.length;var t=ua(e);return t==_||t==E?e.size:jn(e).length},Bi.snakeCase=qo,Bi.some=function(e,t,n){var r=Vs(e)?Rt:ir;return n&&va(e,t,n)&&(t=i),r(e,sa(t,3))},Bi.sortedIndex=function(e,t){return nr(e,t)},Bi.sortedIndexBy=function(e,t,i){return rr(e,t,sa(i,2))},Bi.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var n=nr(e,t);if(n<i&&Bs(e[n],t))return n}return-1},Bi.sortedLastIndex=function(e,t){return nr(e,t,!0)},Bi.sortedLastIndexBy=function(e,t,i){return rr(e,t,sa(i,2),!0)},Bi.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var i=nr(e,t,!0)-1;if(Bs(e[i],t))return i}return-1},Bi.startCase=Go,Bi.startsWith=function(e,t,i){return e=go(e),i=null==i?0:an(po(i),0,e.length),t=or(t),e.slice(i,i+t.length)==t},Bi.subtract=Sl,Bi.sum=function(e){return e&&e.length?Gt(e,tl):0},Bi.sumBy=function(e,t){return e&&e.length?Gt(e,sa(t,2)):0},Bi.template=function(e,t,n){var r=Bi.templateSettings;n&&va(e,t,n)&&(t=i),e=go(e),t=bo({},t,r,Xr);var a,s,o=bo({},t.imports,r.imports,Xr),l=To(o),c=Xt(o,l),h=0,p=t.interpolate||ye,u="__p += '",d=Pe((t.escape||ye).source+"|"+p.source+"|"+(p===X?he:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),f="//# sourceURL="+(Fe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,function(t,i,n,r,o,l){return n||(n=r),u+=e.slice(h,l).replace(be,ii),i&&(a=!0,u+="' +\n__e("+i+") +\n'"),o&&(s=!0,u+="';\n"+o+";\n__p += '"),n&&(u+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=l+t.length,t}),u+="';\n";var m=Fe.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new _e("Invalid `variable` option passed into `_.template`")}else u="with (obj) {\n"+u+"\n}\n";u=(s?u.replace(V,""):u).replace(H,"$1").replace(W,"$1;"),u="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var g=Xo(function(){return Se(l,f+"return "+u).apply(i,c)});if(g.source=u,Us(g))throw g;return g},Bi.times=function(e,t){if((e=po(e))<1||e>h)return[];var i=u,n=gi(e,u);t=sa(t),e-=u;for(var r=Ut(n,t);++i<e;)t(i);return r},Bi.toFinite=ho,Bi.toInteger=po,Bi.toLength=uo,Bi.toLower=function(e){return go(e).toLowerCase()},Bi.toNumber=fo,Bi.toSafeInteger=function(e){return e?an(po(e),-9007199254740991,h):0===e?e:0},Bi.toString=go,Bi.toUpper=function(e){return go(e).toUpperCase()},Bi.trim=function(e,t,n){if((e=go(e))&&(n||t===i))return Yt(e);if(!e||!(t=or(t)))return e;var r=hi(e),a=hi(t);return br(r,Jt(r,a),Qt(r,a)+1).join("")},Bi.trimEnd=function(e,t,n){if((e=go(e))&&(n||t===i))return e.slice(0,pi(e)+1);if(!e||!(t=or(t)))return e;var r=hi(e);return br(r,0,Qt(r,hi(t))+1).join("")},Bi.trimStart=function(e,t,n){if((e=go(e))&&(n||t===i))return e.replace(ie,"");if(!e||!(t=or(t)))return e;var r=hi(e);return br(r,Jt(r,hi(t))).join("")},Bi.truncate=function(e,t){var n=30,r="...";if(Zs(t)){var a="separator"in t?t.separator:a;n="length"in t?po(t.length):n,r="omission"in t?or(t.omission):r}var s=(e=go(e)).length;if(ni(e)){var o=hi(e);s=o.length}if(n>=s)return e;var l=n-ci(r);if(l<1)return r;var c=o?br(o,0,l).join(""):e.slice(0,l);if(a===i)return c+r;if(o&&(l+=c.length-l),io(a)){if(e.slice(l).search(a)){var h,p=c;for(a.global||(a=Pe(a.source,go(pe.exec(a))+"g")),a.lastIndex=0;h=a.exec(p);)var u=h.index;c=c.slice(0,u===i?l:u)}}else if(e.indexOf(or(a),l)!=l){var d=c.lastIndexOf(a);d>-1&&(c=c.slice(0,d))}return c+r},Bi.unescape=function(e){return(e=go(e))&&G.test(e)?e.replace($,ui):e},Bi.uniqueId=function(e){var t=++je;return go(e)+t},Bi.upperCase=Uo,Bi.upperFirst=Yo,Bi.each=ms,Bi.eachRight=gs,Bi.first=Wa,al(Bi,(ml={},yn(Bi,function(e,t){Fe.call(Bi.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),Bi.VERSION="4.17.23",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bi[e].placeholder=Bi}),Pt(["drop","take"],function(e,t){Vi.prototype[e]=function(n){n=n===i?1:mi(po(n),0);var r=this.__filtered__&&!t?new Vi(this):this.clone();return r.__filtered__?r.__takeCount__=gi(n,r.__takeCount__):r.__views__.push({size:gi(n,u),type:e+(r.__dir__<0?"Right":"")}),r},Vi.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Pt(["filter","map","takeWhile"],function(e,t){var i=t+1,n=1==i||3==i;Vi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:sa(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}}),Pt(["head","last"],function(e,t){var i="take"+(t?"Right":"");Vi.prototype[e]=function(){return this[i](1).value()[0]}}),Pt(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");Vi.prototype[e]=function(){return this.__filtered__?new Vi(this):this[i](1)}}),Vi.prototype.compact=function(){return this.filter(tl)},Vi.prototype.find=function(e){return this.filter(e).head()},Vi.prototype.findLast=function(e){return this.reverse().find(e)},Vi.prototype.invokeMap=Yn(function(e,t){return"function"==typeof e?new Vi(this):this.map(function(i){return An(i,e,t)})}),Vi.prototype.reject=function(e){return this.filter(Is(sa(e)))},Vi.prototype.slice=function(e,t){e=po(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vi(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=po(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vi.prototype.toArray=function(){return this.take(u)},yn(Vi.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=Bi[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);a&&(Bi.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,l=t instanceof Vi,c=o[0],h=l||Vs(t),p=function(e){var t=a.apply(Bi,It([e],o));return r&&u?t[0]:t};h&&n&&"function"==typeof c&&1!=c.length&&(l=h=!1);var u=this.__chain__,d=!!this.__actions__.length,f=s&&!u,m=l&&!d;if(!s&&h){t=m?t:new Vi(this);var g=e.apply(t,o);return g.__actions__.push({func:hs,args:[p],thisArg:i}),new zi(g,u)}return f&&m?e.apply(this,o):(g=this.thru(p),f?r?g.value()[0]:g.value():g)})}),Pt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ae[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Bi.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var r=this.value();return t.apply(Vs(r)?r:[],e)}return this[i](function(i){return t.apply(Vs(i)?i:[],e)})}}),yn(Vi.prototype,function(e,t){var i=Bi[t];if(i){var n=i.name+"";Fe.call(Ai,n)||(Ai[n]=[]),Ai[n].push({name:t,func:i})}}),Ai[Lr(i,2).name]=[{name:"wrapper",func:i}],Vi.prototype.clone=function(){var e=new Vi(this.__wrapped__);return e.__actions__=kr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=kr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=kr(this.__views__),e},Vi.prototype.reverse=function(){if(this.__filtered__){var e=new Vi(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Vs(e),n=t<0,r=i?e.length:0,a=function(e,t,i){for(var n=-1,r=i.length;++n<r;){var a=i[n],s=a.size;switch(a.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=gi(t,e+s);break;case"takeRight":e=mi(e,t-s)}}return{start:e,end:t}}(0,r,this.__views__),s=a.start,o=a.end,l=o-s,c=n?o:s-1,h=this.__iteratees__,p=h.length,u=0,d=gi(l,this.__takeCount__);if(!i||!n&&r==l&&d==l)return ur(e,this.__actions__);var f=[];e:for(;l--&&u<d;){for(var m=-1,g=e[c+=t];++m<p;){var v=h[m],y=v.iteratee,b=v.type,x=y(g);if(2==b)g=x;else if(!x){if(1==b)continue e;break e}}f[u++]=g}return f},Bi.prototype.at=ps,Bi.prototype.chain=function(){return cs(this)},Bi.prototype.commit=function(){return new zi(this.value(),this.__chain__)},Bi.prototype.next=function(){this.__values__===i&&(this.__values__=co(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bi.prototype.plant=function(e){for(var t,n=this;n instanceof Ni;){var r=Oa(n);r.__index__=0,r.__values__=i,t?a.__wrapped__=r:t=r;var a=r;n=n.__wrapped__}return a.__wrapped__=e,t},Bi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vi){var t=e;return this.__actions__.length&&(t=new Vi(this)),(t=t.reverse()).__actions__.push({func:hs,args:[Za],thisArg:i}),new zi(t,this.__chain__)}return this.thru(Za)},Bi.prototype.toJSON=Bi.prototype.valueOf=Bi.prototype.value=function(){return ur(this.__wrapped__,this.__actions__)},Bi.prototype.first=Bi.prototype.head,Ke&&(Bi.prototype[Ke]=function(){return this}),Bi}();dt?((dt.exports=di)._=di,ut._=di):pt._=di}.call(lodash)),lodash$1.exports;var e,t}var lodashExports=requireLodash(),_=getDefaultExportFromCjs(lodashExports);function BeeArrowDiff({id:e,className:t,value:i,tooltip:n,disabled:r,decimals:a,isRoot:s=!1,locale:o="de-DE"}){const l=null!=e?e:libExports.useId(1,"bee-arrow-diff-")[0],c=r?" disabled":"";let h="";switch(!0){case null==i:break;case i<=-.5:h="bee-arrow bee-arrow-dive";break;case i>-.5&&i<0:h="bee-arrow-dip";break;case 0===i:h="bee-arrow-steady";break;case i>0&&i<.5:h="bee-arrow-bump";break;case i>=.5:h="bee-arrow-jump";break;default:h="bee-arrow-steady"}return jsx("div",{className:null!=t?t:"",children:s||!i&&0!==i?null:jsxs(Fragment,{children:[jsxs("div",{id:l,className:"bee-arrow-diff "+h+c,children:[jsx("div",{className:"bee-arrow-diff-icon",children:jsx("i",{className:"icon-right-arrow bee-arrow"})}),jsxs("div",{className:"bee-arrow-diff-text",children:[new Intl.NumberFormat(o,{style:"decimal",maximumFractionDigits:a||0}).format(100*i),"%"]})]}),n&&!r?jsx(Tooltip$1,{target:".bee-arrow-diff",children:n}):null]})})}function BeeAddEntryCard({id:e,className:t,disabled:i,footer:n,onClick:r}){const a=null!=e?e:libExports.useId(1,"bee-add-entry-card-")[0];return jsxs("div",{id:a,className:"bee-add-entry-card"+(t?" "+t:""),children:[jsx(BeeIconButton,{iconClass:"pi pi-plus",rounded:!0,halfRounded:!1,disabled:null!=i&&i,type:"primary",isLoading:!1,onClick:e=>function(e){!i&&r&&r(e)}(e)}),n&&jsx("div",{className:"bee-add-entry-card-footer",children:n})]})}var extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},__assign.apply(this,arguments)};function __awaiter(e,t,i,n){return new(i||(i=Promise))(function(r,a){function s(e){try{l(n.next(e))}catch(e){a(e)}}function o(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,o)}l((n=n.apply(e,t||[])).next())})}function BeeSkeleton({id:e,className:t,shape:i="rectangle",size:n,width:r,height:a,borderRadius:s,animated:o=!0,showHover:l,showShade:c}){const h=null!=e?e:libExports.useId(1,"bee-skeleton-")[0],p=o?"wave":"none",u=l?" bee-skeleto--hover":"",d=c?" bee-skeleton--shade":"",f="bee-skeleton-rectangle"+u+d+(t?" "+t:""),m=jsx(Skeleton,{className:"bee-skeleton-circle"+u+d+(t?" "+t:""),id:h,shape:"circle",size:n,animation:p,borderRadius:s}),g=jsx(Skeleton,{className:f,id:h,shape:"rectangle",animation:p,width:r,height:a,borderRadius:s});return"circle"===i?m:g}function BeeImage({id:e,className:t,url:i,showPlaceholder:n,secured:r=!1,secureKey:a,alt:s,title:o,titlePosition:l="left",copyright:c,onClick:h}){const p=null!=e?e:libExports.useId(1,"bee-img-")[0],u=p+"-pay",d="100%",f="100%";function m(e,t,i){return __awaiter(this,void 0,void 0,function*(){const n=yield function(e,t){let i=new Headers;return i.set("x-bee-secure",t),fetch(e,{headers:i})}(t,i),r=yield n.blob(),a=URL.createObjectURL(r),s=document.getElementById(e);s&&(s.src=a)})}return jsxs("div",{id:p,onClick:e=>function(e){h&&h(e)}(e),className:"bee-img"+(t?" "+t:""),children:[o?jsx("div",{className:"left"===l?" bee-img-title bee-img-title-left":"center"===l?" bee-img-title bee-img-title-center":"right"===l?" bee-img-title bee-img-title-right":" bee-img-title bee-img-title-left",children:o}):null,n?jsx(BeeSkeleton,{shape:"rectangle",animated:!0,width:"100%",height:"100px"}):r&&a?(m(u,i,a),jsx("img",{id:u,src:"",alt:s,width:d,height:f})):jsx("img",{id:u,src:i,alt:s,width:d,height:f}),c?jsx("footer",{className:"bee-img-copyright",children:jsx("small",{children:c})}):null]})}function BeeAvatar({imageUrl:e,imageKey:t,imageAlt:i,isImageSecured:n,showPlaceholder:r,placeholderFirstname:a,placeholderLastname:s,size:o,type:l,showDelete:c,readOnly:h,disabled:p,onDelete:u,onClick:d,onAdd:f}){const m="bee-avatar"+("primary"===l?" bee-avatar--primary":"secondary"===l?" bee-avatar--secondary":" bee-avatar--light")+("xSmall"===o?" bee-avatar--xsmall":"small"===o?" bee-avatar--small":"medium"===o?" bee-avatar--medium":"large"===o?" bee-avatar--large":"xLarge"===o?" bee-avatar--xlarge":" bee-avatar--medium");return jsx(Fragment,{children:r?jsx(Card,{className:m+" placeholder-avatar",children:a||s?jsx("div",{className:"placeholder-avatar__initials",children:(a?a.substring(0,1):"")+(s?s.substring(0,1):"")}):jsx("i",{className:"pi pi-user placeholder-avatar__icon"})}):jsx(Fragment,{children:e?jsxs(Card,{className:m+" image-avatar",children:[jsx(BeeImage,{url:e,alt:i,title:void 0,titlePosition:"left",copyright:void 0,secured:!0===n,showPlaceholder:!1,onClick:e=>function(e){null==d||d(e)}(e)},t),c&&!h?jsx(BeeIconButton,{iconClass:"pi pi-trash",rounded:!0,disabled:!1,type:"danger",isLoading:!1,onClick:()=>{null==u||u()}}):null]}):jsx(Card,{className:m+" empty-avatar",children:jsx(BeeAddEntryCard,{disabled:p,onClick:e=>function(e){null==f||f(e)}(e)})})})})}function BeeChip({id:e,className:t,label:i,labelTemplate:n,iconClass:r,image:a,imageAlt:s,removable:o,type:l="primary",onRemove:c,onClick:h}){const p=null!=e?e:libExports.useId(1,"bee-chip-")[0];return jsxs("div",{className:(h?"bee-chip-clickable ":"")+("primary"===l?"bee-chip bee-chip-primary":"secondary"===l?"bee-chip bee-chip-secondary":"valid"===l?"bee-chip bee-chip-valid":"info"===l?"bee-chip bee-chip-info":"warn"===l?"bee-chip bee-chip-warn":"error"===l?"bee-chip bee-chip-error":"surface"===l?"bee-chip bee-chip-surface":"bee-chip bee-chip-primary")+(t?" "+t:""),children:[o?jsx("div",{className:"bee-chip-remove-btn",onClick:e=>function(e){c&&c(e)}(e),children:jsx("i",{className:"pi pi-times-circle"})}):null,jsx("div",{onClick:e=>function(e){h&&h(e)}(e),children:jsx(Chip,{id:p,label:null!=i?i:"",template:n,icon:r,image:a,imageAlt:s,className:"bee-chip-content",removable:null!=o&&o,onRemove:e=>(c&&c(e),!0)})})]})}function BeeChipArea({id:e,className:t,label:i,type:n="primary",data:r,required:a,readOnly:s,onClick:o,onRemove:l}){const c=null!=e?e:libExports.useId(1,"bee-chip-area-")[0];return jsxs("div",{id:c,className:"bee-chip-area"+("primary"===n?" bee-chip-area-primary":"secondary"===n?" bee-chip-area-secondary":" bee-chip-area-primary")+(s?" bee-chip-area-readOnly":"")+(t?" "+t:""),children:[jsx(Fragment,{children:s&&!r||s&&r.length<1||!r||r.length<1?jsx(BeePlaceholder,{id:c,label:null!=i?i:""}):jsx(Fragment,{children:r.map(e=>{var t;return jsx("div",{className:"bee-chip-area-chip",children:jsx(BeeChip,{id:e.id,label:null!==(t=e.label)&&void 0!==t?t:"",labelTemplate:e.labelTemplate,removable:!s||!s&&e.removable,onRemove:t=>function(e,t){l&&l(e,t)}(t,e.id),onClick:t=>function(e,t){o&&o(e,t)}(t,e.id)})},e.id)})})}),i?jsxs("label",{className:"bee-chip-area-label",children:[i,a?jsx("span",{className:"bee-chip-area-label-required",children:jsx("span",{className:"bee-chip-area-label-required-star",children:" *"})}):null]}):null]})}function BeeDivider({id:e,className:t,label:i,iconClass:n,border:r="solid",orientation:a="horizontal",align:s="center",type:o="default"}){const l=null!=e?e:libExports.useId(1,"bee-divider-")[0],c=n?n+" mr-2":void 0;let h="";h=i||n?" bee-divider-content":" bee-divider-nocontent";return jsx(Divider,{id:l,type:r,align:s,className:("primary"===o?"bee-divider bee-divider-primary":"secondary"===o?"bee-divider-secondary":"bee-divider-default")+h+(t?" "+t:""),layout:a,children:i||n?jsxs("div",{className:"inline-flex align-items-center bee-divider-label",children:[c?jsx("i",{className:c}):null,i?jsx("b",{children:i}):null]}):null})}function BeeLoadingBar({id:e,className:t,value:i,indeterminate:n=!1,type:r="primary",showValue:a,unit:s}){const o=null!=e?e:libExports.useId(1,"bee-loading-bar-")[0];return jsx(ProgressBar,{id:o,value:i,className:"primary"===r?"bee-loadingbar-primary":"secondary"===r?"bee-loadingbar-secondary":"bee-loadingbar-primary"+(t?" "+t:""),mode:n?"indeterminate":"determinate",showValue:a,unit:s})}function BeeLoadingSpinner({id:e,className:t,strokeWidth:i="2",animationDuration:n="4s",type:r="primary",size:a}){const s=null!=e?e:libExports.useId(1,"bee-loading-spinner-")[0];return jsx(ProgressSpinner,{className:"primary"===r?"bee-loading-spinner-primary":"secondary"===r?"bee-loading-spinner-secondary":"mixed"===r?"bee-loading-spinner-mixed":"bee-loading-spinner-primary"+(t?" "+t:""),id:s,strokeWidth:i,animationDuration:n,style:a?{width:a,height:a}:void 0})}function BeeSlider({id:e,className:t,value:i,min:n=0,max:r=100,step:a=1,disabled:s,orientation:o="horizontal",type:l="primary",onChange:c,onSlideEnd:h}){const p=null!=e?e:libExports.useId(1,"bee-slider-")[0];return jsx(Slider,{id:p,value:i,min:n,max:r,step:a,className:"primary"===l?"bee-slider-primary":"secondary"===l?"bee-slider-secondary":"bee-slider-primary"+(t?" "+t:""),disabled:null!=s&&s,orientation:o,onChange:e=>function(e){!s&&c&&c(e)}(e),onSlideEnd:e=>function(e){!s&&h&&h(e)}(e)})}"function"==typeof SuppressedError&&SuppressedError;var dist={},hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1,Object.defineProperty(dist,"__esModule",{value:!0});var e=require$$0,t=React__default,i=function(){return i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function n(e,t,i){for(var n,r=0,a=t.length;r<a;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}function r(t){var n=t.size,r=void 0===n?25:n,a=t.SVGstrokeColor,s=void 0===a?"currentColor":a,o=t.SVGstorkeWidth,l=void 0===o?0:o,c=t.SVGclassName,h=void 0===c?"star-svg":c,p=t.SVGstyle;return e.jsx("svg",i({className:h,style:p,stroke:s,fill:"currentColor",strokeWidth:l,viewBox:"0 0 24 24",width:r,height:r,xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}))}function a(e,t){switch(t.type){case"PointerMove":return i(i({},e),{hoverValue:t.payload,hoverIndex:t.index});case"PointerLeave":return i(i({},e),{ratingValue:e.ratingValue,hoverIndex:0,hoverValue:null});case"MouseClick":return i(i({},e),{valueIndex:e.hoverIndex,ratingValue:t.payload});default:return e}}function s(){return"undefined"!=typeof window&&window.matchMedia("(pointer: coarse)").matches||"ontouchstart"in window||"undefined"!=typeof navigator&&navigator.maxTouchPoints>0}return function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".style-module_starRatingWrap__q-lJC{display:inline-block;touch-action:none}.style-module_simpleStarRating__nWUxf{display:inline-block;overflow:hidden;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.style-module_fillIcons__6---A{display:inline-block;overflow:hidden;position:absolute;top:0;white-space:nowrap}.style-module_emptyIcons__Bg-FZ{display:inline-block}.style-module_tooltip__tKc3i{background-color:#333;border-radius:5px;color:#fff;display:inline-block;padding:5px 15px;vertical-align:middle}"),dist.Rating=function(o){var l,c,h=o.onClick,p=o.onPointerMove,u=o.onPointerEnter,d=o.onPointerLeave,f=o.initialValue,m=void 0===f?0:f,g=o.iconsCount,v=void 0===g?5:g,y=o.size,b=void 0===y?40:y,x=o.readonly,_=void 0!==x&&x,S=o.rtl,w=void 0!==S&&S,C=o.customIcons,P=void 0===C?[]:C,E=o.allowFraction,k=void 0!==E&&E,A=o.style,T=o.className,D=void 0===T?"react-simple-star-rating":T,M=o.transition,I=void 0!==M&&M,F=o.allowHover,j=void 0===F||F,R=o.disableFillHover,O=void 0!==R&&R,B=o.fillIcon,L=void 0===B?null:B,N=o.fillColor,z=void 0===N?"#ffbc0b":N,V=o.fillColorArray,H=void 0===V?[]:V,W=o.fillStyle,$=o.fillClassName,q=void 0===$?"filled-icons":$,G=o.emptyIcon,U=void 0===G?null:G,Y=o.emptyColor,K=void 0===Y?"#cccccc":Y,X=o.emptyStyle,Z=o.emptyClassName,J=void 0===Z?"empty-icons":Z,Q=o.allowTitleTag,ee=void 0===Q||Q,te=o.showTooltip,ie=void 0!==te&&te,ne=o.tooltipDefaultText,re=void 0===ne?"Your Rate":ne,ae=o.tooltipArray,se=void 0===ae?[]:ae,oe=o.tooltipStyle,le=o.tooltipClassName,ce=void 0===le?"react-simple-star-rating-tooltip":le,he=o.SVGclassName,pe=void 0===he?"star-svg":he,ue=o.titleSeparator,de=void 0===ue?"out of":ue,fe=o.SVGstyle,me=o.SVGstorkeWidth,ge=void 0===me?0:me,ve=o.SVGstrokeColor,ye=void 0===ve?"currentColor":ve,be=t.useReducer(a,{hoverIndex:0,valueIndex:0,ratingValue:m,hoverValue:null}),xe=be[0],_e=xe.ratingValue,Se=xe.hoverValue,we=xe.hoverIndex,Ce=xe.valueIndex,Pe=be[1];t.useEffect(function(){m&&Pe({type:"MouseClick",payload:0})},[m]);var Ee=t.useMemo(function(){return k?2*v:v},[k,v]),ke=t.useMemo(function(){return m>Ee?0:k||Math.floor(m)===m?Math.round(m/v*100):2*Math.ceil(m)*10},[k,m,v,Ee]),Ae=t.useMemo(function(){return(k?2*m-1:m-1)||0},[k,m]),Te=t.useCallback(function(e){return v%2!=0?e/2/10:e*v/100},[v]),De=function(e){for(var t=e.clientX,i=e.currentTarget.children[0].getBoundingClientRect(),n=i.left,r=i.right,a=i.width,s=w?r-t:t-n,o=Ee,l=Math.round(a/Ee),c=0;c<=Ee;c+=1)if(s<=l*c){o=0===c&&s<l?0:c;break}var h=o-1;o>0&&(Pe({type:"PointerMove",payload:100*o/Ee,index:h}),p&&Se&&p(Te(Se),h,e))},Me=function(e){Se&&(Pe({type:"MouseClick",payload:Se}),h&&h(Te(Se),we,e))},Ie=t.useMemo(function(){if(j){if(O){var e=_e&&_e||ke;return Se&&Se>e?Se:e}return Se&&Se||_e&&_e||ke}return _e&&_e||ke},[j,O,Se,_e,ke]);t.useEffect(function(){se.length>Ee&&console.error("tooltipArray Array length is bigger then Icons Count length.")},[se.length,Ee]);var Fe=t.useCallback(function(e){return Se&&e[we]||_e&&e[Ce]||m&&e[Ae]},[Se,we,_e,Ce,m,Ae]),je=t.useMemo(function(){return Se&&Te(Se)||_e&&Te(_e)||m&&Te(ke)},[Se,Te,_e,m,ke]);return e.jsxs("span",i({className:"style-module_starRatingWrap__q-lJC",style:{direction:"".concat(w?"rtl":"ltr")}},{children:[e.jsxs("span",i({className:"".concat("style-module_simpleStarRating__nWUxf"," ").concat(D),style:i({cursor:_?"":"pointer"},A),onPointerMove:_?void 0:De,onPointerEnter:_?void 0:function(e){u&&u(e),s()&&De(e)},onPointerLeave:_?void 0:function(e){s()&&Me(),Pe({type:"PointerLeave"}),d&&d(e)},onClick:_?void 0:Me,"aria-hidden":"true"},{children:[e.jsx("span",i({className:"".concat("style-module_emptyIcons__Bg-FZ"," ").concat(J),style:i({color:K},X)},{children:n([],Array(v)).map(function(i,n){var a;return e.jsx(t.Fragment,{children:(null===(a=P[n])||void 0===a?void 0:a.icon)||U||e.jsx(r,{SVGclassName:pe,SVGstyle:fe,SVGstorkeWidth:ge,SVGstrokeColor:ye,size:b})},n)})})),e.jsx("span",i({className:"".concat("style-module_fillIcons__6---A"," ").concat(q),style:i((l={},l[w?"right":"left"]=0,l.color=Fe(H)||z,l.transition=I?"width .2s ease, color .2s ease":"",l.width="".concat(Ie,"%"),l),W),title:ee?"".concat(je," ").concat(de," ").concat(v):void 0},{children:n([],Array(v)).map(function(i,n){var a;return e.jsx(t.Fragment,{children:(null===(a=P[n])||void 0===a?void 0:a.icon)||L||e.jsx(r,{SVGclassName:pe,SVGstyle:fe,SVGstorkeWidth:ge,SVGstrokeColor:ye,size:b})},n)})}))]})),ie&&e.jsx("span",i({className:"".concat("style-module_tooltip__tKc3i"," ").concat(ce),style:i((c={},c[w?"marginRight":"marginLeft"]=20,c),oe)},{children:(se.length>0?Fe(se):je)||re}))]}))},dist}var distExports=requireDist();function BeeStarBar({id:e,className:t,value:i,stars:n,disabled:r,readOnly:a,type:s="primary",size:o=40,onChange:l}){const c=null!=e?e:libExports.useId(1,"bee-starbar-")[0],h="bee-starbar "+("primary"===s?"bee-starbar-primary":"secondary"===s?"bee-starbar-secondary":"bee-starbar-primary")+(a?" bee-starbar-readonly":"")+(r?" bee-starbar-disabled":"")+(t?" "+t:"");return jsx("div",{id:c,children:jsx(distExports.Rating,{initialValue:(console.log(i/n*100),i/n*100),iconsCount:n,readonly:!(!a&&!r),className:h,allowFraction:!0,size:o,showTooltip:!1,tooltipClassName:"starbar-rating-tooltip",tooltipStyle:{visibility:"hidden",display:"none"},fillColor:r?"var(--surface-500)":"primary"===s?"var(--primary-color)":"secondary"===s?"var(--secondary-color)":"var(--primary-color)",emptyColor:r?"var(--surface-300)":"var(--surface-500)",onClick:e=>function(e){l&&l(e)}(e)})})}function BeeCopyInput({id:e,className:t,label:i,value:n,disabled:r,iconClass:a}){const s=null!=e?e:libExports.useId(1,"bee-copy-input-")[0];return jsx("div",{className:"bee-copy-input",children:jsx(Fragment,{children:n?jsxs("div",{className:"bee-copy-input-link"+(t?" "+t:""),onClick:()=>{n&&navigator.clipboard.writeText(n)},children:[jsx(BeeTextInput,{id:s+"input",label:i,value:n,disabled:null!=r&&r,formstate:"neutral",readOnly:!0,required:!1}),jsx("i",{className:a+" icon"})]}):jsx(BeePlaceholder,{id:s,label:null!=i?i:""})})})}function BeeVisibleItemCount({id:e,className:t,visibleData:i,allData:n,isLoading:r}){return jsx("div",{id:e,className:"bee-visible-item-count"+(r?" isLoading":"")+(t?" "+t:""),children:function(e,t){return e&&e.length>0&&t&&t.length>0&&!r?jsx(Fragment,{children:e.length+" / "+t.length}):jsx(Fragment,{children:"– / –"})}(i,n)})}function BeeBreadcrumb({id:e,className:t,border:i,items:n,type:r="default",isLoading:a}){const s=null!=e?e:libExports.useId(1,"bee-breadcrumb-")[0],o="bee-breadcrumb "+("primary"===r?"bee-breadcrumb-primary":"secondary"===r?"bee-breadcrumb-secondary":"bee-breadcrumb-default")+(i?"":" bee-breadcrumb-no-border")+(t?" "+t:"");return a?jsx(BeeSkeleton,{shape:"rectangle",size:"20",width:"180",height:"20",animated:!0}):jsx("div",{id:s,className:o,children:jsx(BreadCrumb,{model:_.drop(n,1),home:n[0]})})}function BeeTabview({id:e,className:t,type:i="default",tabs:n,activeIndex:r,onChangeIndex:a}){const s=null!=e?e:libExports.useId(1,"bee-tabview-")[0];return jsx("div",{id:s,className:"bee-tabview"+("primary"===i?" bee-tabview-primary":"secondary"===i?" bee-tabview-secondary":" bee-tabview-default")+(t?" "+t:""),children:jsx(TabView,{activeIndex:r,onTabChange:e=>function(e){a&&a(e)}(e),scrollable:!0,children:n.map(e=>jsx(TabPanel,{header:e.title,disabled:e.disabled},"tab_"+e.title))})})}const enter=13,escape=27,ENTER_KEY="Enter";function BeeCheckbox({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,type:s="primary",formstate:o="neutral",stateTrue:l="Ja",stateFalse:c="Nein",required:h,readOnly:p,tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-checkbox-")[0],g=m+"input",v="primary"===s?" bee-checkbox-primary":"secondary"===s?" bee-checkbox-secondary":" bee-checkbox-primary";let y="";p&&(y=" bee-checkbox-readOnly",r=!0);return jsxs("div",{className:null!=t?t:"",title:u,children:[jsxs("span",{id:m,className:"bee-checkbox "+("valid"===o?" bee-checkbox-valid":"error"===o?" bee-checkbox-error":"neutral"===o?" bee-checkbox-neutral":"none"===o?" bee-checkbox-field-neutral":" bee-checkbox-neutral")+y+(r?" bee-checkbox-disabled":"")+v,onKeyDown:e=>{!function(e){e.stopPropagation(),e.key===ENTER_KEY&&f&&f({checked:!n})}(e)},children:[jsxs("label",{className:"bee-checkbox-input",htmlFor:g,children:[p?jsx(Fragment,{children:jsx("i",n?{className:"pi pi-check"}:{className:"pi pi-times"})}):jsx(Checkbox,{inputId:g,checked:null!=n&&n,onChange:e=>function(e){!r&&f&&f(e)}(e),className:v,tooltip:u,tooltipOptions:d}),jsx("span",{className:"bee-checkbox-value",children:!0===n?l:c})]}),null!=i&&""!==i?jsxs("label",{htmlFor:g,className:"bee-checkbox-label",children:[i,h?jsx("span",{className:"bee-checkbox-label-required",children:jsx("span",{className:"bee-checkbox-label-required-star",children:" *"})}):null]}):null]}),"none"!=o&&a?(()=>{const e="medium";return jsx("div",{className:"bee-checkbox-statusLabel",children:"neutral"===o&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):"valid"===o&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"error"===o&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):null})})():null]})}function BeeCheckboxTriState({id:e,className:t,label:i,stateNull:n="Empty",stateFalse:r="False",stateTrue:a="True",value:s,disabled:o,required:l,statusLabel:c,formstate:h="neutral",readOnly:p,tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-tri-checkbox-")[0],g=m+"input";let v="";p&&(v=" bee-tri-state-readOnly",o=!0);const y=i?"bee-tri-state-label":"";const b=!0===s||!1===s?s:null;return jsxs("div",{className:null!=t?t:"",children:[jsxs("div",{id:m,className:"bee-tri-state "+("valid"===h?" bee-tri-state-valid":"error"===h?" bee-tri-state-error":" bee-tri-state-neutral")+v+(o?" bee-tri-state-disabled":"")+(t?" "+t:""),onKeyDown:e=>{!function(e){e.stopPropagation(),e.key===ENTER_KEY&&f&&f({target:{value:!s&&(!1===s?null:null==s||null)}})}(e)},children:[jsxs("label",{className:"bee-tri-state-input",htmlFor:g,children:[p?jsx(Fragment,{children:jsx("i",!0===s?{className:"pi pi-check"}:!1===s?{className:"pi pi-times"}:{className:"pi pi-question"})}):jsx(TriStateCheckbox,{id:g,value:b,onChange:e=>function(e){!o&&f&&f(e)}(e),tooltip:u,tooltipOptions:d}),jsx("span",{className:"bee-tri-state-value",children:!0===s?a:!1===s?r:n})]}),null!=i&&""!==i?jsxs("label",{htmlFor:g,className:y,children:[i,l?jsx("span",{className:"bee-tri-state-label-required",children:jsx("span",{className:"bee-tri-state-label-required-star",children:" *"})}):null]}):null]}),"none"!=h&&c?(()=>{const e="medium";return jsx("div",{className:"bee-checkbox-tristate-statusLabel",children:"error"===h&&c?jsx(BeeLabel,{size:e,value:c,type:"error"}):"valid"===h&&c?jsx(BeeLabel,{size:e,value:c,type:"valid"}):"neutral"===h&&c?jsx(BeeLabel,{size:e,value:c,type:"neutral"}):null})})():null]})}function BeeColorSelect({id:e,className:t,label:i,value:n,inline:r=!1,disabled:a,required:s,statusLabel:o,formstate:l="neutral",readOnly:c,defaultColor:h="#FF0000",format:p="rgb",tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-color-select-")[0],g=m+"input",v=a?" bee-color-select-disabled":"";let y="";c&&(y=" bee-color-select-readOnly",a=!0);function b(e){!a&&f&&f(e)}const x=null!=n?n:h;return jsxs("div",{id:m,className:"bee-color-select"+("valid"===l?" bee-color-select-valid":"error"===l?" bee-color-select-error":" bee-color-select-neutral")+y+v+(t?" "+t:""),children:[i?jsxs("label",{className:i?"bee-color-select-label":"",htmlFor:g,children:[i,s&&i?jsx("span",{className:"bee-color-select-label-required",children:jsx("span",{className:"bee-color-select-label-required-star",children:" *"})}):null]}):null,jsx("div",{className:"bee-color-select-input",children:jsx(ColorPicker,c?{id:g,value:x,defaultColor:h,format:p,onChange:e=>b(e),disabled:null!=a&&a,inline:!1,tooltip:u,tooltipOptions:d}:{id:g,value:x,defaultColor:h,format:p,onChange:e=>b(e),disabled:null!=a&&a,inline:r,tooltip:u,tooltipOptions:d})}),"none"!=l&&o?(()=>{const e="medium";return jsx("div",{className:"bee-color-select-statusLabel",children:"error"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeCurrencySelect({id:e,className:t,label:i,value:n,disabled:r,currency:a="EUR",locale:s="de-DE",statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,min:u,max:d,tooltip:f,tooltipOptions:m,onChange:g}){const v=null!=e?e:libExports.useId(1,"bee-cur-select-")[0],y=v+"input";let b="";c&&(b=" bee-cur-select-readOnly",r=!0);const x="p-float-label bee-cur-select-container"+("valid"===l?" bee-cur-select-valid":"error"===l?" bee-cur-select-error":" bee-cur-select-neutral")+b;return jsxs(Fragment,{children:[c&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:v,label:i})}):jsxs("span",{id:v,className:x+(t?" "+t:""),children:[jsx(InputNumber,{id:y,value:null!=n?n:null,disabled:null!=r&&r,mode:"currency",currency:a,locale:s,showButtons:!0,placeholder:p,min:u,max:d,onValueChange:e=>function(e){!r&&g&&g(e)}(e),tooltip:f,tooltipOptions:m}),i?jsxs("label",{htmlFor:y,children:[i,h&&i?jsx("span",{className:"bee-cur-select-label-required",children:jsx("span",{className:"bee-cur-select-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&o?(()=>{const e="medium";return jsx("div",{className:"bee-cur-select-statusLabel",children:"error"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeDropDown({id:e,className:t,label:i,value:n,valueTemplate:r,itemTemplate:a,options:s,optionLabel:o,optionValue:l,emptyPlaceholder:c,filter:h,filterBy:p,filterPlaceholder:u,disabled:d,statusLabel:f,formstate:m="neutral",readOnly:g,required:v,editable:y,showDelete:b,deleteIcon:x,emptyMessage:_,emptyFilterMessage:S,tooltip:w,tooltipOptions:C,onChange:P}){const E=null!=e?e:libExports.useId(1,"bee-drop-down-")[0],k=E+"input";let A="";g&&(A=" bee-dropdown-readOnly",d=!0);const T=("valid"===m?"bee-dropdown-valid":"error"===m?"bee-dropdown-error":"bee-dropdown-neutral")+A,D=x||"pi pi-times-circle";function M(e){!d&&P&&P(e)}const I=React__default.useCallback((e,t)=>{var n,a;if(!!(null==e||"string"==typeof e&&0===e.length||"object"==typeof e&&0===Object.keys(e).length)){const e=null!==(n=null!=c?c:t.placeholder)&&void 0!==n?n:"string"==typeof i?i:"";return e?"string"==typeof e?jsx("span",{children:e}):e:jsx("span",{children:" "})}const s="function"==typeof r?r(e,t):r,o="string"==typeof s&&0===s.trim().length;if(null!=s&&!1!==s&&!o)return s;const l=null!==(a=null!=c?c:t.placeholder)&&void 0!==a?a:"string"==typeof i?i:"";return l?"string"==typeof l?jsx("span",{children:l}):l:jsx("span",{children:" "})},[c,i,r]);return jsxs("div",{className:"bee-dropdown",children:[g&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:E,label:i})}):jsxs("span",{id:E,className:"p-float-label bee-dropdown-container"+(t?" "+t:""),children:[jsx(Dropdown,{id:k,value:n,valueTemplate:r?I:void 0,options:s,disabled:null!=d&&d,className:T,onChange:e=>M(e),optionLabel:o,optionValue:l,itemTemplate:null!=a?a:void 0,placeholder:c,emptyMessage:null!=_?_:"Keine Einträge gefunden",emptyFilterMessage:S,editable:null!=y&&y,filter:null!=h&&h,filterPlaceholder:u,filterBy:p,tooltip:w,tooltipOptions:C}),i?jsxs("label",{htmlFor:k,children:[i,v&&i?jsx("span",{className:"bee-dropdown-label-required",children:jsx("span",{className:"bee-dropdown-label-required-star",children:" *"})}):null]}):null,n&&b&&jsx("div",{className:"filter-cancel",children:jsx(BeeIconButton,{iconClass:D,rounded:!0,disabled:null!=d&&d,type:"lightPrimary",isLoading:!1,onClick:()=>M({label:"",value:null})})})]}),"none"!=m&&f?(()=>{const e="medium";return jsx("div",{className:"bee-dropdown-statusLabel",children:"error"===m&&f?jsx(BeeLabel,{size:e,value:f,type:"error"}):"valid"===m&&f?jsx(BeeLabel,{size:e,value:f,type:"valid"}):"neutral"===m&&f?jsx(BeeLabel,{size:e,value:f,type:"neutral"}):null})})():null]})}function BeeNumberSelect({id:e,className:t,label:i,value:n,minFractionDigits:r,maxFractionDigits:a,min:s,max:o,stepSize:l,disabled:c,grouping:h=!0,statusLabel:p,formstate:u="neutral",readOnly:d,required:f,placeholder:m,tooltip:g,tooltipOptions:v,onChange:y,onFocusOut:b}){const x=null!=e?e:libExports.useId(1,"bee-num-select-")[0],_=x+"input";let S="";d&&(S=" bee-num-select-readOnly",c=!0);const w="p-float-label bee-num-select-container"+("valid"===u?" bee-num-select-valid":"error"===u?" bee-num-select-error":" bee-num-select-neutral")+S;return jsxs(Fragment,{children:[d&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:x,label:i})}):jsxs("span",{id:x,className:w+(t?" "+t:""),children:[jsx(InputNumber,{id:_,value:null!=n?n:null,disabled:null!=c&&c,mode:"decimal",useGrouping:h,minFractionDigits:r,maxFractionDigits:a,min:s,max:o,showButtons:!0,step:null!=l?l:1,placeholder:m,tooltip:g,tooltipOptions:v,onValueChange:e=>function(e){!c&&y&&y(e)}(e),onBlur:e=>function(e){!c&&b&&b(e)}(e)}),i?jsxs("label",{htmlFor:_,children:[i,f&&i?jsx("span",{className:"bee-num-select-label-required",children:jsx("span",{className:"bee-num-select-label-required-star",children:" *"})}):null]}):null]}),"none"!=u&&p?(()=>{const e="medium";return jsx("div",{className:"bee-num-select-statusLabel",children:"error"===u&&p?jsx(BeeLabel,{size:e,value:p,type:"error"}):"valid"===u&&p?jsx(BeeLabel,{size:e,value:p,type:"valid"}):"neutral"===u&&p?jsx(BeeLabel,{size:e,value:p,type:"neutral"}):null})})():null]})}function BeeSwitch({id:e,className:t,label:i,value:n,disabled:r,statusLabel:a,formstate:s="neutral",stateFalse:o="Nein",stateTrue:l="Ja",required:c,readOnly:h,tooltip:p,tooltipOptions:u,onChange:d}){const f=null!=e?e:libExports.useId(1,"bee-switch-")[0],m=f+"input";let g="";h&&(g=" bee-switch-readOnly",r=!0);const v=i?"bee-switch-label":"";const y=!0===n;return jsxs("div",{id:f,className:"bee-switch"+("valid"===s?" bee-switch-valid":"error"===s?" bee-switch-error":" bee-switch-neutral")+g+(r?" bee-switch-disabled":"")+(t?" "+t:""),children:[jsxs("div",{className:"bee-switch-input",children:[jsx(InputSwitch,{inputId:m,checked:y,className:y?"p-inputswitch-checked":void 0,onChange:e=>function(e){!r&&d&&d(e)}(e),disabled:null!=r&&r,tooltip:p,tooltipOptions:u}),jsx("label",{className:"bee-switch-value",htmlFor:m,children:y?l:o})]}),i?jsxs("label",{className:v,htmlFor:m,children:[i,c&&i?jsx("span",{className:"bee-switch-label-required",children:jsx("span",{className:"bee-switch-label-required-star",children:" *"})}):null]}):null,"none"!=s&&a?(()=>{const e="medium";return jsx("div",{className:"bee-switch-statusLabel",children:"error"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeTreeSelect({id:e,className:t,label:i,value:n,showDelete:r,options:a,valueTemplate:s,display:o="comma",selectionMode:l="single",placeholder:c,panelClassName:h,filter:p,filterTemplate:u,filterValue:d,filterBy:f,filterPlaceholder:m,disabled:g,readOnly:v,statusLabel:y,formstate:b="neutral",required:x,emptyMessage:_,onChange:S,onNodeSelect:w,onHide:C}){var P;const E=null!=e?e:libExports.useId(1,"bee-treeselect-")[0],k=E+"input";let A="";v&&(A=" bee-ts-readOnly",g=!0);const T=("valid"===b?" bee-ts-valid":"error"===b?" bee-ts-error":" bee-ts-neutral")+A,D=" bee-ts-container ",M=p?" bee-ts-panel":" bee-ts-panel bee-ts-invisible-header";function I(e){!g&&S&&S(e)}function F(e){!g&&w&&w(e)}function j(){!g&&C&&C()}const R=React__default.useCallback((e,t)=>{var n,r,a,o;if(!!(null==e||"string"==typeof e&&0===e.length||"object"==typeof e&&0===Object.keys(e).length)){const e=null!==(r=null!==(n=t.placeholder)&&void 0!==n?n:i)&&void 0!==r?r:"";return jsx("span",e?{children:e}:{children:" "})}const l="function"==typeof s?s(e,t):s,c="string"==typeof l&&0===l.trim().length;if(null!=l&&!1!==l&&!c)return l;const h=null!==(o=null!==(a=t.placeholder)&&void 0!==a?a:i)&&void 0!==o?o:"";return jsx("span",h?{children:h}:{children:" "})},[i,c,s]);return jsxs(Fragment,{children:[v&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:E,label:i})}):jsx(Fragment,{children:jsxs("div",{id:E,className:t?t+D:D,children:[jsx("div",{className:!v&&n&&Object.keys(n).length>0?"bee-ts-filter__deleteBtn":"bee-ts-filter__deleteBtn bee-ts-filter--hidden",children:r?jsx(BeeIconButton,{iconClass:"pi pi-times-circle",rounded:!0,disabled:!1,type:"lightPrimary",isLoading:!1,onClick:()=>{I(void 0),F(void 0),j()}}):null}),jsxs("div",{className:"p-float-label",children:[jsx(TreeSelect,{id:k,value:n,valueTemplate:s?R:void 0,options:a,disabled:g,className:T,panelClassName:h?h+M:M,display:o,selectionMode:l,placeholder:null!==(P=null!=c?c:i)&&void 0!==P?P:void 0,filter:p,filterTemplate:u,filterValue:d,filterBy:f,filterPlaceholder:null!=m?m:"Suche",onChange:e=>I(e),onNodeSelect:e=>F(e),onHide:()=>j(),emptyMessage:_}),i?jsxs("label",{htmlFor:k,className:"bee-ts-label",children:[i,x&&i?jsx("span",{className:"bee-ts-label-required",children:jsx("span",{className:"bee-ts-label-required-star",children:" *"})}):null]}):null]})]})}),"none"!=b&&y?(()=>{const e="medium";return jsx("div",{className:"bee-ts-statusLabel",children:"error"===b&&y?jsx(BeeLabel,{size:e,value:y,type:"error"}):"valid"===b&&y?jsx(BeeLabel,{size:e,value:y,type:"valid"}):"neutral"===b&&y?jsx(BeeLabel,{size:e,value:y,type:"neutral"}):null})})():null]})}function BeeChipDropdown({id:e,className:t,label:i,value:n,options:r,optionLabel:a,statusLabel:s,disabled:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,maxSelectedLabels:u,filter:d,filterBy:f,filterPlaceholder:m,emptyFilterMessage:g,emptyMessage:v,onChange:y}){const b=null!=e?e:libExports.useId(1,"bee-chip-dropdown-")[0],x=b+"input";let _="";c&&(_=" bee-chip-dropdown-readOnly",o=!0);const S=("valid"===l?"bee-chip-dropdown-valid":"error"===l?"bee-chip-dropdown-error":"bee-chip-dropdown-neutral")+_;return jsxs("div",{children:[c&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:b,label:null!=i?i:""})}):jsxs("span",{id:b,className:"p-float-label bee-chip-dropdown-container"+(t?" "+t:""),children:[jsx(MultiSelect,Object.assign({display:"chip",id:x,value:n,options:r,disabled:null!=o&&o,className:S,onChange:e=>{return t=e,void(!o&&y&&y(t));var t},optionLabel:a,panelHeaderTemplate:e=>{const t=`${e.className} p-multiselect-header bee-chip-dropdown__header`,i="bee-chip-dropdown_selectall",n=`${i}_label`;return jsxs("div",{className:t,children:[e.checkboxElement,jsx("label",{id:n,className:"p-checkbox-label",htmlFor:i,children:"Alle auswählen"})]})},placeholder:p,maxSelectedLabels:u,filter:null!=d&&d,filterBy:f},void 0!==m&&{filterPlaceholder:m},void 0!==v&&{emptyMessage:v},void 0!==g&&{emptyFilterMessage:g})),i?jsxs("label",{htmlFor:x,children:[i,h&&i?jsx("span",{className:"bee-chip-dropdown-label-required",children:jsx("span",{className:"bee-chip-dropdown-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&s?(()=>{const e="medium";return jsx("div",{className:"bee-chip-dropdown-statusLabel",children:"error"===l&&s?jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===l&&s?jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===l&&s?jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}var ChatMessageSourceEnum,ChatParticipantTypeEnum,ServerStatus;function parseParticipantName(e){var t,i;if(!(null==e?void 0:e.trim()))return{firstName:"U",lastName:"N"};const n=e.trim().split(" ").filter(e=>e.length>0);return 0===n.length?{firstName:"U",lastName:"N"}:{firstName:null!==(t=n[0])&&void 0!==t?t:"U",lastName:null!==(i=n[n.length-1])&&void 0!==i?i:"N"}}function BeeChatMessage({maxWindow:e=!1,msg:t,participant:i,project:n,chatMsgSource:r,isCurrentUser:a=!1,showDeleteButton:s=!1,documentIconClass:o="pi pi-file",trashIconClass:l="pi pi-trash",sourceAuditIconClass:c="pi pi-briefcase",sourceLcIconClass:h="pi pi-comments",onMsgDelete:p,onDownload:u}){const d=useMemo(()=>{var e;return null!==(e=null==i?void 0:i.name)&&void 0!==e?e:"Unbekannter Benutzer"},[null==i?void 0:i.name]),f=useMemo(()=>null==i?void 0:i.type,[null==i?void 0:i.type]),{firstName:m,lastName:g}=useMemo(()=>parseParticipantName(d),[d]),v=useMemo(()=>f!==ChatParticipantTypeEnum.USER||a?f===ChatParticipantTypeEnum.USER&&a?"lc-m-chat-message--self":f===ChatParticipantTypeEnum.SYSTEM?"lc-m-chat-message--system":"lc-m-chat-message--otherUser":"lc-m-chat-message--otherUser",[f,a]);function y(e){const t=new Date(e);return`${t.getDate().toString().padStart(2,"0")}.${(t.getMonth()+1).toString().padStart(2,"0")}.${t.getFullYear().toString().slice(-2)} - ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}const b=(null==t?void 0:t.mediaId)&&"object"==typeof t.mediaId?t.mediaId:null;function x(){var t,i;if(!b)return null;const n=null!==(t=b.document)&&void 0!==t?t:b.image;if(!n)return null;const r=null!==(i=n.filename)&&void 0!==i?i:b.document?"Unbekannte Datei":"Unbekanntes Bild";return jsxs("div",{className:"chat-message_media-container",children:[jsx(BeeMixButton,{label:r,iconClass:o,type:"lightPrimary",iconPos:"left",onClick:u}),e&&null!=n.fileSize?jsx(BeeLabel,{value:`Größe: ${n.fileSize}kb`,size:"small",type:"neutral"}):null]})}return jsx("div",{className:"lc-m-chat-message "+v,children:jsxs("div",{className:"chat-message__message-container-avatar",children:[(null==t?void 0:t.deletedAt)?null:t?jsxs("div",{className:"chat-message__message-container",children:[jsxs("div",{className:"chat-message_headline-container align-items-center"+(n===ChatMessageSourceEnum.AUDIT?" pl-0":""),children:[jsxs("div",{className:"chat-message__user-info",children:[n===ChatMessageSourceEnum.AUDIT&&r===ChatMessageSourceEnum.AUDIT&&jsx("i",{className:c}),n===ChatMessageSourceEnum.AUDIT&&r===ChatMessageSourceEnum.LC&&jsx("i",{className:h}),n===ChatMessageSourceEnum.AUDIT&&jsx("div",{className:"mr-1 ml-1",children:jsx(BeeLabel,{value:"||",size:"small",type:"neutral"})}),jsx(BeeLabel,{value:d,size:"small",type:"neutral"})]}),(null==t?void 0:t.createdAt)?jsx(BeeLabel,{value:y(t.createdAt),size:"small",type:"neutral"}):null]}),t.mediaId?x():jsx("div",{className:"chat-message",children:null!==(_=null==t?void 0:t.message)&&void 0!==_?_:"Keine Nachricht"}),s&&a&&p&&jsx(BeeIconButton,{iconClass:l,type:"lightPrimary",rounded:!1,onClick:p})]}):null,jsx(BeeAvatar,{showPlaceholder:!0,placeholderFirstname:m,placeholderLastname:g,showDelete:!1,disabled:!1,size:"xSmall",type:"primary"})]})});var _}!function(e){e.LC="LC",e.AUDIT="AUDIT"}(ChatMessageSourceEnum||(ChatMessageSourceEnum={})),function(e){e.ADMIN="ADMIN",e.USER="USER",e.SYSTEM="SYSTEM"}(ChatParticipantTypeEnum||(ChatParticipantTypeEnum={})),function(e){e.SERVER_STATUS_LOADING="loading",e.SERVER_STATUS_ERROR="error",e.SERVER_STATUS_SUCCESS="success",e.SERVER_STATUS_EXTERNAL_UPDATE="externalUpdate"}(ServerStatus||(ServerStatus={}));const DEFAULT_SUCCESS_TOOLTIP="Änderung gespeichert",DEFAULT_ERROR_TOOLTIP="Die Änderung konnte nicht gespeichert werden",DEFAULT_EXTERNAL_CHANGE_TOOLTIP="Eine andere Person hat dieses Feld soeben bearbeitet";function BeeServerStatusInput({status:e,successIcon:t="pi pi-check",loadingIcon:i,errorIcon:n="pi pi-times",externalChangeIcon:r="pi pi-user",hideIcons:a,children:s,onResetStatus:o,successTooltip:l=DEFAULT_SUCCESS_TOOLTIP,errorTooltip:c=DEFAULT_ERROR_TOOLTIP,externalChangeTooltip:h=DEFAULT_EXTERNAL_CHANGE_TOOLTIP}){const p=e===ServerStatus.SERVER_STATUS_LOADING?"server-status-loading":e===ServerStatus.SERVER_STATUS_ERROR?"server-status-error":e===ServerStatus.SERVER_STATUS_SUCCESS?"server-status-success":e===ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE?"server-status-externalChange":"";return useEffect(()=>{if(e===ServerStatus.SERVER_STATUS_SUCCESS||e===ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE){const e=setTimeout(()=>{null==o||o()},5e3);return()=>clearTimeout(e)}},[e,o]),jsxs("div",{className:e?`serverStatus-input ${p} p-input-icon-right serverStatus-input-icon-right`:"serverStatus-input",children:[jsx(Fragment,{children:s}),e&&!a?jsx(Fragment,{children:e===ServerStatus.SERVER_STATUS_SUCCESS?jsxs(Fragment,{children:[jsx(Tooltip$1,{target:".icon--success",content:l}),jsx("i",{className:t+" icon--success"})]}):e===ServerStatus.SERVER_STATUS_LOADING?jsx(Fragment,{children:i?jsx("i",{className:i+" icon--loading"}):jsx(BeeLoadingSpinner,{strokeWidth:"2",type:"primary"})}):e===ServerStatus.SERVER_STATUS_ERROR?jsxs(Fragment,{children:[jsx(Tooltip$1,{target:".icon--error",content:c}),jsx("i",{className:n+" icon--error"})]}):e===ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE?jsxs(Fragment,{children:[jsx(Tooltip$1,{target:".icon--externalChange",content:h}),jsx("i",{className:r+" icon--externalChange"})]}):null}):null]})}function BeeChangesChip({className:e,values:t,type:i="primary"}){const n=`bee-changes-chip ${`bee-changes-chip--${i}`} ${e?" "+e:""}`;return 0===t.length?null:jsx("div",{className:n,children:function(e){return e.map((e,t)=>{const i=e.value<10?e.value.toString():"9+";return jsxs("div",{className:"bee-changes-chip__icon-wrapper",children:[jsx("i",{className:e.icon}),jsx("div",{}),jsx(Badge,{value:i,severity:"info"})]},t)})}(t)})}function BeeFilterDropDown({id:e,className:t,label:i,value:n,options:r,optionLabel:a,optionValue:s,disabled:o,dropdownIcon:l,deleteIcon:c,statusLabel:h,formstate:p="neutral",readOnly:u,onChange:d}){const f=null!=e?e:libExports.useId(1,"bee-filter-dropdown-")[0],m=f+"input",[g,v]=useState(n);let y="";u&&(y=" bee-filter-dropdown-readOnly",o=!0);const b=("valid"===p?"bee-filter-dropdown-valid":"error"===p?"bee-filter-dropdown-error":"bee-filter-dropdown-neutral")+y,x="p-float-label bee-filter-dropdown-container flex "+(t?" "+t:""),_=null!=c?c:"pi pi-times-circle";useEffect(()=>{v(n)},[n]);return jsxs("div",{className:"bee-filter-dropdown",children:[u&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:f,label:i})}):jsxs("span",{id:f,className:x,children:[jsx(Dropdown,{id:m,value:g,options:r,optionLabel:a,optionValue:s,disabled:null!=o&&o,className:b,dropdownIcon:null!=l?l:"",emptyMessage:"Keine Einträge gefunden",onChange:e=>{return t=e,void(!o&&d&&d(t));var t}}),g&&""!==g?jsx("div",{className:"cancel",children:jsx(BeeIconButton,{iconClass:_,rounded:!0,disabled:o||!1,type:"lightPrimary",isLoading:!1,onClick:()=>{v("")}})}):null,i?jsx("label",{htmlFor:m,children:i}):null]}),"none"!=p&&h?(()=>{const e="medium";return jsx("div",{className:"bee-filter-dropdown-statusLabel",children:"error"===p&&null!=h?jsx(BeeLabel,{size:e,value:String(h),type:"error"}):"valid"===p&&null!=h?jsx(BeeLabel,{size:e,value:String(h),type:"valid"}):"neutral"===p&&null!=h?jsx(BeeLabel,{size:e,value:String(h),type:"neutral"}):null})})():null]})}function BeeFilterTreeSelect({id:e,className:t,label:i,value:n,options:r,valueTemplate:a,display:s="comma",selectionMode:o="single",placeholder:l,filter:c,filterTemplate:h,filterValue:p,filterBy:u,filterPlaceholder:d,confirmBtnText:f,confirmBtnDisabled:m,confirmBtnTooltip:g,deleteIcon:v,disabled:y,readOnly:b,statusLabel:x,formstate:_="neutral",required:S,hideDelete:w,onSelectNodes:C,onChange:P,onHide:E}){const k=null!=e?e:libExports.useId(1,"bee-filter-ts-")[0],A=k+"input",[T,D]=useState(n);let M="";b&&(M=" bee-filter-ts-readOnly",y=!0);const I=("valid"===_?"bee-filter-ts-valid":"error"===_?"bee-filter-ts-error":"bee-filter-ts-neutral")+M,F=" p-float-label bee-filter-ts-container",j=c?"bee-filter-ts-panel":"bee-filter-ts-panel bee-filter-ts-invisible-header",R=v||"pi pi-times-circle";function O(){const e=document.querySelector("body");if(e){const t=new MouseEvent("click",{bubbles:!0,view:window});e.dispatchEvent(t)}}function B(){!y&&E&&E()}useEffect(()=>{D(n)},[n]);return jsxs(Fragment,{children:[b&&!n?jsx("div",{className:null!=t?t:"",children:jsx(BeePlaceholder,{id:k,label:i})}):jsxs("div",{id:k,className:t?t+F:F,children:[jsx("div",{className:!b&&n&&Object.keys(n).length>0?"bee-filter-ts-filter__deleteBtn":"bee-filter-ts-filter__deleteBtn bee-filter-ts-filter--hidden",children:!T||""===T||w?null:jsx("div",{className:"cancel",children:jsx(BeeIconButton,{iconClass:R,rounded:!0,disabled:y||!1,type:"lightPrimary",isLoading:!1,onClick:()=>{D(""),!y&&C&&(C(void 0),O())}})})}),jsxs("span",{className:"p-float-label",children:[jsx(TreeSelect,{id:A,value:T,options:r,disabled:y||!1,className:I,valueTemplate:a,panelClassName:j,display:null!=s?s:"comma",selectionMode:o,placeholder:l,filter:c,filterTemplate:h,filterValue:p,filterBy:u,filterPlaceholder:d||"Suche",onChange:e=>{D(e.value),function(e){!y&&P&&P(e)}(e)},onHide:()=>{D(n),B()},panelFooterTemplate:()=>jsx("div",{className:"p-d-flex p-jc-end p-ai-center",style:{padding:"1rem"},children:jsx(BeeButton,{label:f||"Übernehmen",type:"secondary",disabled:m||!1,tooltip:m&&g?g:void 0,onClick:()=>{B(),!y&&C&&(C(T),O())}})})}),i?jsxs("label",{htmlFor:A,className:"bee-filter-ts-label",children:[i,S&&i?jsx("span",{className:"bee-filter-ts-label-required",children:jsx("span",{className:"bee-filter-ts-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=_&&x?(()=>{const e="medium";return jsx("div",{className:"bee-filter-ts-statusLabel",children:"error"===_&&null!=x?jsx(BeeLabel,{size:e,value:String(x),type:"error"}):"valid"===_&&null!=x?jsx(BeeLabel,{size:e,value:String(x),type:"valid"}):"neutral"===_&&null!=x?jsx(BeeLabel,{size:e,value:String(x),type:"neutral"}):null})})():null]})}function BeeGalleryImage({id:e,className:t,imageUrl:i,imageKey:n,imageAlt:r,imageTitle:a,imageCopyright:s,isImageSecured:o=!1,showPlaceHolder:l=!1,activateHover:c=!0,readOnly:h,onClick:p,onRemove:u,onAdd:d}){const f=null!=e?e:libExports.useId(1,"bee-gallery-img-")[0];return jsx("div",{id:f,className:"bee-gallery-img "+(h?"bee-gallery-img-readOnly":"")+(c?" bee-gallery-img-hover":" bee-gallery-img-noHover")+" bee-gallery-img-placeholder"+(t?" "+t:""),children:i?jsxs("div",{children:[h?null:jsx("div",{className:"bee-gallery-img-close-button",children:jsx(BeeIconButton,{iconClass:"pi pi-times",rounded:!0,disabled:!1,type:"secondary",isLoading:!1,onClick:e=>function(e){u&&u(e)}(e)})}),jsx("div",{className:"bee-gallery-img-content",children:jsx(BeeImage,{url:i,alt:r,title:a,titlePosition:"left",copyright:s,secured:o,secureKey:o?n:void 0,showPlaceholder:l,onClick:e=>function(e){p&&p(e)}(e)},n)})]}):h?null:jsx("div",{className:"bee-gallery-img-add-button",children:jsx(BeeAddEntryCard,{disabled:h||!1,onClick:e=>function(e){d&&d(e)}(e)})})})}var UserAgent_DEPRECATED_1,hasRequiredUserAgent_DEPRECATED,ExecutionEnvironment_1,hasRequiredExecutionEnvironment,isEventSupported_1,hasRequiredIsEventSupported,normalizeWheel_1,hasRequiredNormalizeWheel$1,normalizeWheel$1,hasRequiredNormalizeWheel;function requireUserAgent_DEPRECATED(){if(hasRequiredUserAgent_DEPRECATED)return UserAgent_DEPRECATED_1;hasRequiredUserAgent_DEPRECATED=1;var e,t,i,n,r,a,s,o,l,c,h,p,u,d,f,m=!1;function g(){if(!m){m=!0;var g=navigator.userAgent,v=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(g),y=/(Mac OS X)|(Windows)|(Linux)/.exec(g);if(p=/\b(iPhone|iP[ao]d)/.exec(g),u=/\b(iP[ao]d)/.exec(g),c=/Android/i.exec(g),d=/FBAN\/\w+;/i.exec(g),f=/Mobile/i.exec(g),h=!!/Win64/.exec(g),v){(e=v[1]?parseFloat(v[1]):v[5]?parseFloat(v[5]):NaN)&&document&&document.documentMode&&(e=document.documentMode);var b=/(?:Trident\/(\d+.\d+))/.exec(g);a=b?parseFloat(b[1])+4:e,t=v[2]?parseFloat(v[2]):NaN,i=v[3]?parseFloat(v[3]):NaN,(n=v[4]?parseFloat(v[4]):NaN)?(v=/(?:Chrome\/(\d+\.\d+))/.exec(g),r=v&&v[1]?parseFloat(v[1]):NaN):r=NaN}else e=t=i=r=n=NaN;if(y){if(y[1]){var x=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(g);s=!x||parseFloat(x[1].replace("_","."))}else s=!1;o=!!y[2],l=!!y[3]}else s=o=l=!1}}var v={ie:function(){return g()||e},ieCompatibilityMode:function(){return g()||a>e},ie64:function(){return v.ie()&&h},firefox:function(){return g()||t},opera:function(){return g()||i},webkit:function(){return g()||n},safari:function(){return v.webkit()},chrome:function(){return g()||r},windows:function(){return g()||o},osx:function(){return g()||s},linux:function(){return g()||l},iphone:function(){return g()||p},mobile:function(){return g()||p||u||c||f},nativeApp:function(){return g()||d},android:function(){return g()||c},ipad:function(){return g()||u}};return UserAgent_DEPRECATED_1=v}function requireExecutionEnvironment(){if(hasRequiredExecutionEnvironment)return ExecutionEnvironment_1;hasRequiredExecutionEnvironment=1;var e=!("undefined"==typeof window||!window.document||!window.document.createElement),t={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:e&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};return ExecutionEnvironment_1=t}function requireIsEventSupported(){if(hasRequiredIsEventSupported)return isEventSupported_1;hasRequiredIsEventSupported=1;var e,t=requireExecutionEnvironment();return t.canUseDOM&&(e=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
|
|
28
28
|
/**
|
|
29
29
|
* Checks if an event is supported in the current execution environment.
|
|
30
30
|
*
|