pangea-lib 2.11.611 → 2.11.613

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/main.cjs.js CHANGED
@@ -791,7 +791,7 @@ A1.version="2.30.1";qs1(N2);A1.fn=L1;A1.min=Fl1;A1.max=Dl1;A1.now=Pl1;A1.utc=ve;
791
791
  * Released under the MIT License
792
792
  */class Kx1{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(a,t,c,r){const n=t.listeners[r],i=t.duration;n.forEach(s=>s({chart:a,initial:t.initial,numSteps:i,currentStep:Math.min(c-t.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=HV.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(a=Date.now()){let t=0;this._charts.forEach((c,r)=>{if(!c.running||!c.items.length)return;const n=c.items;let i=n.length-1,s=!1,l;for(;i>=0;--i)l=n[i],l._active?(l._total>c.duration&&(c.duration=l._total),l.tick(a),s=!0):(n[i]=n[n.length-1],n.pop());s&&(r.draw(),this._notify(r,c,a,"progress")),n.length||(c.running=!1,this._notify(r,c,a,"complete"),c.initial=!1),t+=n.length}),this._lastDate=a,t===0&&(this._running=!1)}_getAnims(a){const t=this._charts;let c=t.get(a);return c||(c={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(a,c)),c}listen(a,t,c){this._getAnims(a).listeners[t].push(c)}add(a,t){!t||!t.length||this._getAnims(a).items.push(...t)}has(a){return this._getAnims(a).items.length>0}start(a){const t=this._charts.get(a);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((c,r)=>Math.max(c,r._duration),0),this._refresh())}running(a){if(!this._running)return!1;const t=this._charts.get(a);return!(!t||!t.running||!t.items.length)}stop(a){const t=this._charts.get(a);if(!t||!t.items.length)return;const c=t.items;let r=c.length-1;for(;r>=0;--r)c[r].cancel();t.items=[],this._notify(a,t,Date.now(),"complete")}remove(a){return this._charts.delete(a)}}var Ve=new Kx1;const af="transparent",Jx1={boolean(e,a,t){return t>.5?a:e},color(e,a,t){const c=Yl(e||af),r=c.valid&&Yl(a||af);return r&&r.valid?r.mix(c,t).hexString():a},number(e,a,t){return e+(a-e)*t}};class eC1{constructor(a,t,c,r){const n=t[c];r=J8([a.to,r,n,a.from]);const i=J8([a.from,n,r]);this._active=!0,this._fn=a.fn||Jx1[a.type||typeof i],this._easing=M5[a.easing]||M5.linear,this._start=Math.floor(Date.now()+(a.delay||0)),this._duration=this._total=Math.floor(a.duration),this._loop=!!a.loop,this._target=t,this._prop=c,this._from=i,this._to=r,this._promises=void 0}active(){return this._active}update(a,t,c){if(this._active){this._notify(!1);const r=this._target[this._prop],n=c-this._start,i=this._duration-n;this._start=c,this._duration=Math.floor(Math.max(i,a.duration)),this._total+=n,this._loop=!!a.loop,this._to=J8([a.to,t,r,a.from]),this._from=J8([a.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(a){const t=a-this._start,c=this._duration,r=this._prop,n=this._from,i=this._loop,s=this._to;let l;if(this._active=n!==s&&(i||t<c),!this._active){this._target[r]=s,this._notify(!0);return}if(t<0){this._target[r]=n;return}l=t/c%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(n,s,l)}wait(){const a=this._promises||(this._promises=[]);return new Promise((t,c)=>{a.push({res:t,rej:c})})}_notify(a){const t=a?"res":"rej",c=this._promises||[];for(let r=0;r<c.length;r++)c[r][t]()}}class RV{constructor(a,t){this._chart=a,this._properties=new Map,this.configure(t)}configure(a){if(!a2(a))return;const t=Object.keys(P2.animation),c=this._properties;Object.getOwnPropertyNames(a).forEach(r=>{const n=a[r];if(!a2(n))return;const i={};for(const s of t)i[s]=n[s];(_2(n.properties)&&n.properties||[r]).forEach(s=>{(s===r||!c.has(s))&&c.set(s,i)})})}_animateOptions(a,t){const c=t.options,r=tC1(a,c);if(!r)return[];const n=this._createAnimations(r,c);return c.$shared&&aC1(a.options.$animations,c).then(()=>{a.options=c},()=>{}),n}_createAnimations(a,t){const c=this._properties,r=[],n=a.$animations||(a.$animations={}),i=Object.keys(t),s=Date.now();let l;for(l=i.length-1;l>=0;--l){const f=i[l];if(f.charAt(0)==="$")continue;if(f==="options"){r.push(...this._animateOptions(a,t));continue}const u=t[f];let h=n[f];const d=c.get(f);if(h)if(d&&h.active()){h.update(d,u,s);continue}else h.cancel();if(!d||!d.duration){a[f]=u;continue}n[f]=h=new eC1(d,a,f,u),r.push(h)}return r}update(a,t){if(this._properties.size===0){Object.assign(a,t);return}const c=this._createAnimations(a,t);if(c.length)return Ve.add(this._chart,c),!0}}function aC1(e,a){const t=[],c=Object.keys(a);for(let r=0;r<c.length;r++){const n=e[c[r]];n&&n.active()&&t.push(n.wait())}return Promise.all(t)}function tC1(e,a){if(!a)return;let t=e.options;if(!t){e.options=a;return}return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function tf(e,a){const t=e&&e.options||{},c=t.reverse,r=t.min===void 0?a:0,n=t.max===void 0?a:0;return{start:c?n:r,end:c?r:n}}function cC1(e,a,t){if(t===!1)return!1;const c=tf(e,t),r=tf(a,t);return{top:r.end,right:c.end,bottom:r.start,left:c.start}}function rC1(e){let a,t,c,r;return a2(e)?(a=e.top,t=e.right,c=e.bottom,r=e.left):a=t=c=r=e,{top:a,right:t,bottom:c,left:r,disabled:e===!1}}function IV(e,a){const t=[],c=e._getSortedDatasetMetas(a);let r,n;for(r=0,n=c.length;r<n;++r)t.push(c[r].index);return t}function cf(e,a,t,c={}){const r=e.keys,n=c.mode==="single";let i,s,l,f;if(a===null)return;let u=!1;for(i=0,s=r.length;i<s;++i){if(l=+r[i],l===t){if(u=!0,c.all)continue;break}f=e.values[l],j2(f)&&(n||a===0||he(a)===he(f))&&(a+=f)}return!u&&!c.all?0:a}function nC1(e,a){const{iScale:t,vScale:c}=a,r=t.axis==="x"?"x":"y",n=c.axis==="x"?"x":"y",i=Object.keys(e),s=new Array(i.length);let l,f,u;for(l=0,f=i.length;l<f;++l)u=i[l],s[l]={[r]:u,[n]:e[u]};return s}function xr(e,a){const t=e&&e.options.stacked;return t||t===void 0&&a.stack!==void 0}function iC1(e,a,t){return`${e.id}.${a.id}.${t.stack||t.type}`}function sC1(e){const{min:a,max:t,minDefined:c,maxDefined:r}=e.getUserBounds();return{min:c?a:Number.NEGATIVE_INFINITY,max:r?t:Number.POSITIVE_INFINITY}}function oC1(e,a,t){const c=e[a]||(e[a]={});return c[t]||(c[t]={})}function rf(e,a,t,c){for(const r of a.getMatchingVisibleMetas(c).reverse()){const n=e[r.index];if(t&&n>0||!t&&n<0)return r.index}return null}function nf(e,a){const{chart:t,_cachedMeta:c}=e,r=t._stacks||(t._stacks={}),{iScale:n,vScale:i,index:s}=c,l=n.axis,f=i.axis,u=iC1(n,i,c),h=a.length;let d;for(let m=0;m<h;++m){const p=a[m],{[l]:v,[f]:g}=p,x=p._stacks||(p._stacks={});d=x[f]=oC1(r,u,v),d[s]=g,d._top=rf(d,i,!0,c.type),d._bottom=rf(d,i,!1,c.type);const z=d._visualValues||(d._visualValues={});z[s]=g}}function Cr(e,a){const t=e.scales;return Object.keys(t).filter(c=>t[c].axis===a).shift()}function lC1(e,a){return R0(e,{active:!1,dataset:void 0,datasetIndex:a,index:a,mode:"default",type:"dataset"})}function fC1(e,a,t){return R0(e,{active:!1,dataIndex:a,parsed:void 0,raw:void 0,element:t,index:a,mode:"default",type:"data"})}function U8(e,a){const t=e.controller.index,c=e.vScale&&e.vScale.axis;if(c){a=a||e._parsed;for(const r of a){const n=r._stacks;if(!n||n[c]===void 0||n[c][t]===void 0)return;delete n[c][t],n[c]._visualValues!==void 0&&n[c]._visualValues[t]!==void 0&&delete n[c]._visualValues[t]}}}const zr=e=>e==="reset"||e==="none",sf=(e,a)=>a?e:Object.assign({},e),uC1=(e,a,t)=>e&&!a.hidden&&a._stacked&&{keys:IV(t,!0),values:null};class $4{constructor(a,t){this.chart=a,this._ctx=a.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 a=this._cachedMeta;this.configure(),this.linkScales(),a._stacked=xr(a.vScale,a),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(a){this.index!==a&&U8(this._cachedMeta),this.index=a}linkScales(){const a=this.chart,t=this._cachedMeta,c=this.getDataset(),r=(h,d,m,p)=>h==="x"?d:h==="r"?p:m,n=t.xAxisID=q1(c.xAxisID,Cr(a,"x")),i=t.yAxisID=q1(c.yAxisID,Cr(a,"y")),s=t.rAxisID=q1(c.rAxisID,Cr(a,"r")),l=t.indexAxis,f=t.iAxisID=r(l,n,i,s),u=t.vAxisID=r(l,i,n,s);t.xScale=this.getScaleForId(n),t.yScale=this.getScaleForId(i),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(f),t.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(a){return this.chart.scales[a]}_getOtherScale(a){const t=this._cachedMeta;return a===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const a=this._cachedMeta;this._data&&$l(this._data,this),a._stacked&&U8(a)}_dataCheck(){const a=this.getDataset(),t=a.data||(a.data=[]),c=this._data;if(a2(t)){const r=this._cachedMeta;this._data=nC1(t,r)}else if(c!==t){if(c){$l(c,this);const r=this._cachedMeta;U8(r),r._parsed=[]}t&&Object.isExtensible(t)&&Zg1(t,this),this._syncList=[],this._data=t}}addElements(){const a=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(a.dataset=new this.datasetElementType)}buildOrUpdateElements(a){const t=this._cachedMeta,c=this.getDataset();let r=!1;this._dataCheck();const n=t._stacked;t._stacked=xr(t.vScale,t),t.stack!==c.stack&&(r=!0,U8(t),t.stack=c.stack),this._resyncElements(a),(r||n!==t._stacked)&&(nf(this,t._parsed),t._stacked=xr(t.vScale,t))}configure(){const a=this.chart.config,t=a.datasetScopeKeys(this._type),c=a.getOptionScopes(this.getDataset(),t,!0);this.options=a.createResolver(c,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(a,t){const{_cachedMeta:c,_data:r}=this,{iScale:n,_stacked:i}=c,s=n.axis;let l=a===0&&t===r.length?!0:c._sorted,f=a>0&&c._parsed[a-1],u,h,d;if(this._parsing===!1)c._parsed=r,c._sorted=!0,d=r;else{_2(r[a])?d=this.parseArrayData(c,r,a,t):a2(r[a])?d=this.parseObjectData(c,r,a,t):d=this.parsePrimitiveData(c,r,a,t);const m=()=>h[s]===null||f&&h[s]<f[s];for(u=0;u<t;++u)c._parsed[u+a]=h=d[u],l&&(m()&&(l=!1),f=h);c._sorted=l}i&&nf(this,d)}parsePrimitiveData(a,t,c,r){const{iScale:n,vScale:i}=a,s=n.axis,l=i.axis,f=n.getLabels(),u=n===i,h=new Array(r);let d,m,p;for(d=0,m=r;d<m;++d)p=d+c,h[d]={[s]:u||n.parse(f[p],p),[l]:i.parse(t[p],p)};return h}parseArrayData(a,t,c,r){const{xScale:n,yScale:i}=a,s=new Array(r);let l,f,u,h;for(l=0,f=r;l<f;++l)u=l+c,h=t[u],s[l]={x:n.parse(h[0],u),y:i.parse(h[1],u)};return s}parseObjectData(a,t,c,r){const{xScale:n,yScale:i}=a,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,f=new Array(r);let u,h,d,m;for(u=0,h=r;u<h;++u)d=u+c,m=t[d],f[u]={x:n.parse(T0(m,s),d),y:i.parse(T0(m,l),d)};return f}getParsed(a){return this._cachedMeta._parsed[a]}getDataElement(a){return this._cachedMeta.data[a]}applyStack(a,t,c){const r=this.chart,n=this._cachedMeta,i=t[a.axis],s={keys:IV(r,!0),values:t._stacks[a.axis]._visualValues};return cf(s,i,n.index,{mode:c})}updateRangeFromParsed(a,t,c,r){const n=c[t.axis];let i=n===null?NaN:n;const s=r&&c._stacks[t.axis];r&&s&&(r.values=s,i=cf(r,n,this._cachedMeta.index)),a.min=Math.min(a.min,i),a.max=Math.max(a.max,i)}getMinMax(a,t){const c=this._cachedMeta,r=c._parsed,n=c._sorted&&a===c.iScale,i=r.length,s=this._getOtherScale(a),l=uC1(t,c,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=sC1(s);let d,m;function p(){m=r[d];const v=m[s.axis];return!j2(m[a.axis])||u>v||h<v}for(d=0;d<i&&!(!p()&&(this.updateRangeFromParsed(f,a,m,l),n));++d);if(n){for(d=i-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(f,a,m,l);break}}return f}getAllParsedValues(a){const t=this._cachedMeta._parsed,c=[];let r,n,i;for(r=0,n=t.length;r<n;++r)i=t[r][a.axis],j2(i)&&c.push(i);return c}getMaxOverflow(){return!1}getLabelAndValue(a){const t=this._cachedMeta,c=t.iScale,r=t.vScale,n=this.getParsed(a);return{label:c?""+c.getLabelForValue(n[c.axis]):"",value:r?""+r.getLabelForValue(n[r.axis]):""}}_update(a){const t=this._cachedMeta;this.update(a||"default"),t._clip=rC1(q1(this.options.clip,cC1(t.xScale,t.yScale,this.getMaxOverflow())))}update(a){}draw(){const a=this._ctx,t=this.chart,c=this._cachedMeta,r=c.data||[],n=t.chartArea,i=[],s=this._drawStart||0,l=this._drawCount||r.length-s,f=this.options.drawActiveElementsOnTop;let u;for(c.dataset&&c.dataset.draw(a,n,s,l),u=s;u<s+l;++u){const h=r[u];h.hidden||(h.active&&f?i.push(h):h.draw(a,n))}for(u=0;u<i.length;++u)i[u].draw(a,n)}getStyle(a,t){const c=t?"active":"default";return a===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(c):this.resolveDataElementOptions(a||0,c)}getContext(a,t,c){const r=this.getDataset();let n;if(a>=0&&a<this._cachedMeta.data.length){const i=this._cachedMeta.data[a];n=i.$context||(i.$context=fC1(this.getContext(),a,i)),n.parsed=this.getParsed(a),n.raw=r.data[a],n.index=n.dataIndex=a}else n=this.$context||(this.$context=lC1(this.chart.getContext(),this.index)),n.dataset=r,n.index=n.datasetIndex=this.index;return n.active=!!t,n.mode=c,n}resolveDatasetElementOptions(a){return this._resolveElementOptions(this.datasetElementType.id,a)}resolveDataElementOptions(a,t){return this._resolveElementOptions(this.dataElementType.id,t,a)}_resolveElementOptions(a,t="default",c){const r=t==="active",n=this._cachedDataOpts,i=a+"-"+t,s=n[i],l=this.enableOptionSharing&&Q5(c);if(s)return sf(s,l);const f=this.chart.config,u=f.datasetElementScopeKeys(this._type,a),h=r?[`${a}Hover`,"hover",a,""]:[a,""],d=f.getOptionScopes(this.getDataset(),u),m=Object.keys(P2.elements[a]),p=()=>this.getContext(c,r,t),v=f.resolveNamedOptions(d,m,p,h);return v.$shared&&(v.$shared=l,n[i]=Object.freeze(sf(v,l))),v}_resolveAnimations(a,t,c){const r=this.chart,n=this._cachedDataOpts,i=`animation-${t}`,s=n[i];if(s)return s;let l;if(r.options.animation!==!1){const u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,t),d=u.getOptionScopes(this.getDataset(),h);l=u.createResolver(d,this.getContext(a,c,t))}const f=new RV(r,l&&l.animations);return l&&l._cacheable&&(n[i]=Object.freeze(f)),f}getSharedOptions(a){if(a.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},a))}includeOptions(a,t){return!t||zr(a)||this.chart._animationsDisabled}_getSharedOptions(a,t){const c=this.resolveDataElementOptions(a,t),r=this._sharedOptions,n=this.getSharedOptions(c),i=this.includeOptions(t,n)||n!==r;return this.updateSharedOptions(n,t,c),{sharedOptions:n,includeOptions:i}}updateElement(a,t,c,r){zr(r)?Object.assign(a,c):this._resolveAnimations(t,r).update(a,c)}updateSharedOptions(a,t,c){a&&!zr(t)&&this._resolveAnimations(void 0,t).update(a,c)}_setStyle(a,t,c,r){a.active=r;const n=this.getStyle(t,r);this._resolveAnimations(t,c,r).update(a,{options:!r&&this.getSharedOptions(n)||n})}removeHoverStyle(a,t,c){this._setStyle(a,c,"active",!1)}setHoverStyle(a,t,c){this._setStyle(a,c,"active",!0)}_removeDatasetHoverStyle(){const a=this._cachedMeta.dataset;a&&this._setStyle(a,void 0,"active",!1)}_setDatasetHoverStyle(){const a=this._cachedMeta.dataset;a&&this._setStyle(a,void 0,"active",!0)}_resyncElements(a){const t=this._data,c=this._cachedMeta.data;for(const[s,l,f]of this._syncList)this[s](l,f);this._syncList=[];const r=c.length,n=t.length,i=Math.min(n,r);i&&this.parse(0,i),n>r?this._insertElements(r,n-r,a):n<r&&this._removeElements(n,r-n)}_insertElements(a,t,c=!0){const r=this._cachedMeta,n=r.data,i=a+t;let s;const l=f=>{for(f.length+=t,s=f.length-1;s>=i;s--)f[s]=f[s-t]};for(l(n),s=a;s<i;++s)n[s]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(a,t),c&&this.updateElements(n,a,t,"reset")}updateElements(a,t,c,r){}_removeElements(a,t){const c=this._cachedMeta;if(this._parsing){const r=c._parsed.splice(a,t);c._stacked&&U8(c,r)}c.data.splice(a,t)}_sync(a){if(this._parsing)this._syncList.push(a);else{const[t,c,r]=a;this[t](c,r)}this.chart._dataChanges.push([this.index,...a])}_onDataPush(){const a=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-a,a])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(a,t){t&&this._sync(["_removeElements",a,t]);const c=arguments.length-2;c&&this._sync(["_insertElements",a,c])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}l1($4,"defaults",{}),l1($4,"datasetElementType",null),l1($4,"dataElementType",null);function hC1(e,a){if(!e._cache.$bar){const t=e.getMatchingVisibleMetas(a);let c=[];for(let r=0,n=t.length;r<n;r++)c=c.concat(t[r].controller.getAllParsedValues(e));e._cache.$bar=MV(c.sort((r,n)=>r-n))}return e._cache.$bar}function dC1(e){const a=e.iScale,t=hC1(a,e.type);let c=a._length,r,n,i,s;const l=()=>{i===32767||i===-32768||(Q5(s)&&(c=Math.min(c,Math.abs(i-s)||c)),s=i)};for(r=0,n=t.length;r<n;++r)i=a.getPixelForValue(t[r]),l();for(s=void 0,r=0,n=a.ticks.length;r<n;++r)i=a.getPixelForTick(r),l();return c}function mC1(e,a,t,c){const r=t.barThickness;let n,i;return s2(r)?(n=a.min*t.categoryPercentage,i=t.barPercentage):(n=r*c,i=1),{chunk:n/c,ratio:i,start:a.pixels[e]-n/2}}function pC1(e,a,t,c){const r=a.pixels,n=r[e];let i=e>0?r[e-1]:null,s=e<r.length-1?r[e+1]:null;const l=t.categoryPercentage;i===null&&(i=n-(s===null?a.end-a.start:s-n)),s===null&&(s=n+n-i);const f=n-(n-Math.min(i,s))/2*l;return{chunk:Math.abs(s-i)/2*l/c,ratio:t.barPercentage,start:f}}function vC1(e,a,t,c){const r=t.parse(e[0],c),n=t.parse(e[1],c),i=Math.min(r,n),s=Math.max(r,n);let l=i,f=s;Math.abs(i)>Math.abs(s)&&(l=s,f=i),a[t.axis]=f,a._custom={barStart:l,barEnd:f,start:r,end:n,min:i,max:s}}function $V(e,a,t,c){return _2(e)?vC1(e,a,t,c):a[t.axis]=t.parse(e,c),a}function of(e,a,t,c){const r=e.iScale,n=e.vScale,i=r.getLabels(),s=r===n,l=[];let f,u,h,d;for(f=t,u=t+c;f<u;++f)d=a[f],h={},h[r.axis]=s||r.parse(i[f],f),l.push($V(d,h,n,f));return l}function Mr(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function gC1(e,a,t){return e!==0?he(e):(a.isHorizontal()?1:-1)*(a.min>=t?1:-1)}function xC1(e){let a,t,c,r,n;return e.horizontal?(a=e.base>e.x,t="left",c="right"):(a=e.base<e.y,t="bottom",c="top"),a?(r="end",n="start"):(r="start",n="end"),{start:t,end:c,reverse:a,top:r,bottom:n}}function CC1(e,a,t,c){let r=a.borderSkipped;const n={};if(!r){e.borderSkipped=n;return}if(r===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:i,end:s,reverse:l,top:f,bottom:u}=xC1(e);r==="middle"&&t&&(e.enableBorderRadius=!0,(t._top||0)===c?r=f:(t._bottom||0)===c?r=u:(n[lf(u,i,s,l)]=!0,r=f)),n[lf(r,i,s,l)]=!0,e.borderSkipped=n}function lf(e,a,t,c){return c?(e=zC1(e,a,t),e=ff(e,t,a)):e=ff(e,a,t),e}function zC1(e,a,t){return e===a?t:e===t?a:e}function ff(e,a,t){return e==="start"?a:e==="end"?t:e}function MC1(e,{inflateAmount:a},t){e.inflateAmount=a==="auto"?t===1?.33:0:a}class It extends $4{parsePrimitiveData(a,t,c,r){return of(a,t,c,r)}parseArrayData(a,t,c,r){return of(a,t,c,r)}parseObjectData(a,t,c,r){const{iScale:n,vScale:i}=a,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,f=n.axis==="x"?s:l,u=i.axis==="x"?s:l,h=[];let d,m,p,v;for(d=c,m=c+r;d<m;++d)v=t[d],p={},p[n.axis]=n.parse(T0(v,f),d),h.push($V(T0(v,u),p,i,d));return h}updateRangeFromParsed(a,t,c,r){super.updateRangeFromParsed(a,t,c,r);const n=c._custom;n&&t===this._cachedMeta.vScale&&(a.min=Math.min(a.min,n.min),a.max=Math.max(a.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(a){const t=this._cachedMeta,{iScale:c,vScale:r}=t,n=this.getParsed(a),i=n._custom,s=Mr(i)?"["+i.start+", "+i.end+"]":""+r.getLabelForValue(n[r.axis]);return{label:""+c.getLabelForValue(n[c.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const a=this._cachedMeta;a.stack=this.getDataset().stack}update(a){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,a)}updateElements(a,t,c,r){const n=r==="reset",{index:i,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),f=s.isHorizontal(),u=this._getRuler(),{sharedOptions:h,includeOptions:d}=this._getSharedOptions(t,r);for(let m=t;m<t+c;m++){const p=this.getParsed(m),v=n||s2(p[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(m),g=this._calculateBarIndexPixels(m,u),x=(p._stacks||{})[s.axis],z={horizontal:f,base:v.base,enableBorderRadius:!x||Mr(p._custom)||i===x._top||i===x._bottom,x:f?v.head:g.center,y:f?g.center:v.head,height:f?g.size:Math.abs(v.size),width:f?Math.abs(v.size):g.size};d&&(z.options=h||this.resolveDataElementOptions(m,a[m].active?"active":r));const C=z.options||a[m].options;CC1(z,C,x,i),MC1(z,C,u.ratio),this.updateElement(a[m],m,z,r)}}_getStacks(a,t){const{iScale:c}=this._cachedMeta,r=c.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),n=c.options.stacked,i=[],s=this._cachedMeta.controller.getParsed(t),l=s&&s[c.axis],f=u=>{const h=u._parsed.find(m=>m[c.axis]===l),d=h&&h[u.vScale.axis];if(s2(d)||isNaN(d))return!0};for(const u of r)if(!(t!==void 0&&f(u))&&((n===!1||i.indexOf(u.stack)===-1||n===void 0&&u.stack===void 0)&&i.push(u.stack),u.index===a))break;return i.length||i.push(void 0),i}_getStackCount(a){return this._getStacks(void 0,a).length}_getStackIndex(a,t,c){const r=this._getStacks(a,c),n=t!==void 0?r.indexOf(t):-1;return n===-1?r.length-1:n}_getRuler(){const a=this.options,t=this._cachedMeta,c=t.iScale,r=[];let n,i;for(n=0,i=t.data.length;n<i;++n)r.push(c.getPixelForValue(this.getParsed(n)[c.axis],n));const s=a.barThickness;return{min:s||dC1(t),pixels:r,start:c._startPixel,end:c._endPixel,stackCount:this._getStackCount(),scale:c,grouped:a.grouped,ratio:s?1:a.categoryPercentage*a.barPercentage}}_calculateBarValuePixels(a){const{_cachedMeta:{vScale:t,_stacked:c,index:r},options:{base:n,minBarLength:i}}=this,s=n||0,l=this.getParsed(a),f=l._custom,u=Mr(f);let h=l[t.axis],d=0,m=c?this.applyStack(t,l,c):h,p,v;m!==h&&(d=m-h,m=h),u&&(h=f.barStart,m=f.barEnd-f.barStart,h!==0&&he(h)!==he(f.barEnd)&&(d=0),d+=h);const g=!s2(n)&&!u?n:d;let x=t.getPixelForValue(g);if(this.chart.getDataVisibility(a)?p=t.getPixelForValue(d+m):p=x,v=p-x,Math.abs(v)<i){v=gC1(v,t,s)*i,h===s&&(x-=v/2);const z=t.getPixelForDecimal(0),C=t.getPixelForDecimal(1),y=Math.min(z,C),b=Math.max(z,C);x=Math.max(Math.min(x,b),y),p=x+v,c&&!u&&(l._stacks[t.axis]._visualValues[r]=t.getValueForPixel(p)-t.getValueForPixel(x))}if(x===t.getPixelForValue(s)){const z=he(v)*t.getLineWidthForValue(s)/2;x+=z,v-=z}return{size:v,base:x,head:p,center:p+v/2}}_calculateBarIndexPixels(a,t){const c=t.scale,r=this.options,n=r.skipNull,i=q1(r.maxBarThickness,1/0);let s,l;if(t.grouped){const f=n?this._getStackCount(a):t.stackCount,u=r.barThickness==="flex"?pC1(a,t,r,f):mC1(a,t,r,f),h=this._getStackIndex(this.index,this._cachedMeta.stack,n?a:void 0);s=u.start+u.chunk*h+u.chunk/2,l=Math.min(i,u.chunk*u.ratio)}else s=c.getPixelForValue(this.getParsed(a)[c.axis],a),l=Math.min(i,t.min*t.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const a=this._cachedMeta,t=a.vScale,c=a.data,r=c.length;let n=0;for(;n<r;++n)this.getParsed(n)[t.axis]!==null&&!c[n].hidden&&c[n].draw(this._ctx)}}l1(It,"id","bar"),l1(It,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),l1(It,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class $t extends $4{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(a,t,c,r){const n=super.parsePrimitiveData(a,t,c,r);for(let i=0;i<n.length;i++)n[i]._custom=this.resolveDataElementOptions(i+c).radius;return n}parseArrayData(a,t,c,r){const n=super.parseArrayData(a,t,c,r);for(let i=0;i<n.length;i++){const s=t[c+i];n[i]._custom=q1(s[2],this.resolveDataElementOptions(i+c).radius)}return n}parseObjectData(a,t,c,r){const n=super.parseObjectData(a,t,c,r);for(let i=0;i<n.length;i++){const s=t[c+i];n[i]._custom=q1(s&&s.r&&+s.r,this.resolveDataElementOptions(i+c).radius)}return n}getMaxOverflow(){const a=this._cachedMeta.data;let t=0;for(let c=a.length-1;c>=0;--c)t=Math.max(t,a[c].size(this.resolveDataElementOptions(c))/2);return t>0&&t}getLabelAndValue(a){const t=this._cachedMeta,c=this.chart.data.labels||[],{xScale:r,yScale:n}=t,i=this.getParsed(a),s=r.getLabelForValue(i.x),l=n.getLabelForValue(i.y),f=i._custom;return{label:c[a]||"",value:"("+s+", "+l+(f?", "+f:"")+")"}}update(a){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,a)}updateElements(a,t,c,r){const n=r==="reset",{iScale:i,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:f}=this._getSharedOptions(t,r),u=i.axis,h=s.axis;for(let d=t;d<t+c;d++){const m=a[d],p=!n&&this.getParsed(d),v={},g=v[u]=n?i.getPixelForDecimal(.5):i.getPixelForValue(p[u]),x=v[h]=n?s.getBasePixel():s.getPixelForValue(p[h]);v.skip=isNaN(g)||isNaN(x),f&&(v.options=l||this.resolveDataElementOptions(d,m.active?"active":r),n&&(v.options.radius=0)),this.updateElement(m,d,v,r)}}resolveDataElementOptions(a,t){const c=this.getParsed(a);let r=super.resolveDataElementOptions(a,t);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const n=r.radius;return t!=="active"&&(r.radius=0),r.radius+=q1(c&&c._custom,n),r}}l1($t,"id","bubble"),l1($t,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),l1($t,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function HC1(e,a,t){let c=1,r=1,n=0,i=0;if(a<A2){const s=e,l=s+a,f=Math.cos(s),u=Math.sin(s),h=Math.cos(l),d=Math.sin(l),m=(C,y,b)=>K5(C,s,l,!0)?1:Math.max(y,y*t,b,b*t),p=(C,y,b)=>K5(C,s,l,!0)?-1:Math.min(y,y*t,b,b*t),v=m(0,f,h),g=m(t3,u,d),x=p(S2,f,h),z=p(S2+t3,u,d);c=(v-x)/2,r=(g-z)/2,n=-(v+x)/2,i=-(g+z)/2}return{ratioX:c,ratioY:r,offsetX:n,offsetY:i}}class f6 extends $4{constructor(a,t){super(a,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(a,t){const c=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=c;else{let n=l=>+c[l];if(a2(c[a])){const{key:l="value"}=this._parsing;n=f=>+T0(c[f],l)}let i,s;for(i=a,s=a+t;i<s;++i)r._parsed[i]=n(i)}}_getRotation(){return D4(this.options.rotation-90)}_getCircumference(){return D4(this.options.circumference)}_getRotationExtents(){let a=A2,t=-A2;for(let c=0;c<this.chart.data.datasets.length;++c)if(this.chart.isDatasetVisible(c)&&this.chart.getDatasetMeta(c).type===this._type){const r=this.chart.getDatasetMeta(c).controller,n=r._getRotation(),i=r._getCircumference();a=Math.min(a,n),t=Math.max(t,n+i)}return{rotation:a,circumference:t-a}}update(a){const t=this.chart,{chartArea:c}=t,r=this._cachedMeta,n=r.data,i=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,s=Math.max((Math.min(c.width,c.height)-i)/2,0),l=Math.min(Dg1(this.options.cutout,s),1),f=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:d,ratioY:m,offsetX:p,offsetY:v}=HC1(h,u,l),g=(c.width-i)/d,x=(c.height-i)/m,z=Math.max(Math.min(g,x)/2,0),C=vV(this.options.radius,z),y=Math.max(C*l,0),b=(C-y)/this._getVisibleDatasetWeightTotal();this.offsetX=p*C,this.offsetY=v*C,r.total=this.calculateTotal(),this.outerRadius=C-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*f,0),this.updateElements(n,0,n.length,a)}_circumference(a,t){const c=this.options,r=this._cachedMeta,n=this._getCircumference();return t&&c.animation.animateRotate||!this.chart.getDataVisibility(a)||r._parsed[a]===null||r.data[a].hidden?0:this.calculateCircumference(r._parsed[a]*n/A2)}updateElements(a,t,c,r){const n=r==="reset",i=this.chart,s=i.chartArea,f=i.options.animation,u=(s.left+s.right)/2,h=(s.top+s.bottom)/2,d=n&&f.animateScale,m=d?0:this.innerRadius,p=d?0:this.outerRadius,{sharedOptions:v,includeOptions:g}=this._getSharedOptions(t,r);let x=this._getRotation(),z;for(z=0;z<t;++z)x+=this._circumference(z,n);for(z=t;z<t+c;++z){const C=this._circumference(z,n),y=a[z],b={x:u+this.offsetX,y:h+this.offsetY,startAngle:x,endAngle:x+C,circumference:C,outerRadius:p,innerRadius:m};g&&(b.options=v||this.resolveDataElementOptions(z,y.active?"active":r)),x+=C,this.updateElement(y,z,b,r)}}calculateTotal(){const a=this._cachedMeta,t=a.data;let c=0,r;for(r=0;r<t.length;r++){const n=a._parsed[r];n!==null&&!isNaN(n)&&this.chart.getDataVisibility(r)&&!t[r].hidden&&(c+=Math.abs(n))}return c}calculateCircumference(a){const t=this._cachedMeta.total;return t>0&&!isNaN(a)?A2*(Math.abs(a)/t):0}getLabelAndValue(a){const t=this._cachedMeta,c=this.chart,r=c.data.labels||[],n=Ta(t._parsed[a],c.options.locale);return{label:r[a]||"",value:n}}getMaxBorderWidth(a){let t=0;const c=this.chart;let r,n,i,s,l;if(!a){for(r=0,n=c.data.datasets.length;r<n;++r)if(c.isDatasetVisible(r)){i=c.getDatasetMeta(r),a=i.data,s=i.controller;break}}if(!a)return 0;for(r=0,n=a.length;r<n;++r)l=s.resolveDataElementOptions(r),l.borderAlign!=="inner"&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(a){let t=0;for(let c=0,r=a.length;c<r;++c){const n=this.resolveDataElementOptions(c);t=Math.max(t,n.offset||0,n.hoverOffset||0)}return t}_getRingWeightOffset(a){let t=0;for(let c=0;c<a;++c)this.chart.isDatasetVisible(c)&&(t+=this._getRingWeight(c));return t}_getRingWeight(a){return Math.max(q1(this.chart.data.datasets[a].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}l1(f6,"id","doughnut"),l1(f6,"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"}),l1(f6,"descriptors",{_scriptable:a=>a!=="spacing",_indexable:a=>a!=="spacing"&&!a.startsWith("borderDash")&&!a.startsWith("hoverBorderDash")}),l1(f6,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(a){const t=a.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:c,color:r}}=a.legend.options;return t.labels.map((n,i)=>{const l=a.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:c,hidden:!a.getDataVisibility(i),index:i}})}return[]}},onClick(a,t,c){c.chart.toggleDataVisibility(t.index),c.chart.update()}}}});class Ut extends $4{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(a){const t=this._cachedMeta,{dataset:c,data:r=[],_dataset:n}=t,i=this.chart._animationsDisabled;let{start:s,count:l}=bV(t,r,i);this._drawStart=s,this._drawCount=l,VV(t)&&(s=0,l=r.length),c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!n._decimated,c.points=r;const f=this.resolveDatasetElementOptions(a);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(c,void 0,{animated:!i,options:f},a),this.updateElements(r,s,l,a)}updateElements(a,t,c,r){const n=r==="reset",{iScale:i,vScale:s,_stacked:l,_dataset:f}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(t,r),d=i.axis,m=s.axis,{spanGaps:p,segment:v}=this.options,g=C8(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||n||r==="none",z=t+c,C=a.length;let y=t>0&&this.getParsed(t-1);for(let b=0;b<C;++b){const w=a[b],H=x?w:{};if(b<t||b>=z){H.skip=!0;continue}const T=this.getParsed(b),A=s2(T[m]),U=H[d]=i.getPixelForValue(T[d],b),D=H[m]=n||A?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,T,l):T[m],b);H.skip=isNaN(U)||isNaN(D)||A,H.stop=b>0&&Math.abs(T[d]-y[d])>g,v&&(H.parsed=T,H.raw=f.data[b]),h&&(H.options=u||this.resolveDataElementOptions(b,w.active?"active":r)),x||this.updateElement(w,b,H,r),y=T}}getMaxOverflow(){const a=this._cachedMeta,t=a.dataset,c=t.options&&t.options.borderWidth||0,r=a.data||[];if(!r.length)return c;const n=r[0].size(this.resolveDataElementOptions(0)),i=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(c,n,i)/2}draw(){const a=this._cachedMeta;a.dataset.updateControlPoints(this.chart.chartArea,a.iScale.axis),super.draw()}}l1(Ut,"id","line"),l1(Ut,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),l1(Ut,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class y5 extends $4{constructor(a,t){super(a,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(a){const t=this._cachedMeta,c=this.chart,r=c.data.labels||[],n=Ta(t._parsed[a].r,c.options.locale);return{label:r[a]||"",value:n}}parseObjectData(a,t,c,r){return TV.bind(this)(a,t,c,r)}update(a){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,a)}getMinMax(){const a=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return a.data.forEach((c,r)=>{const n=this.getParsed(r).r;!isNaN(n)&&this.chart.getDataVisibility(r)&&(n<t.min&&(t.min=n),n>t.max&&(t.max=n))}),t}_updateRadius(){const a=this.chart,t=a.chartArea,c=a.options,r=Math.min(t.right-t.left,t.bottom-t.top),n=Math.max(r/2,0),i=Math.max(c.cutoutPercentage?n/100*c.cutoutPercentage:1,0),s=(n-i)/a.getVisibleDatasetCount();this.outerRadius=n-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(a,t,c,r){const n=r==="reset",i=this.chart,l=i.options.animation,f=this._cachedMeta.rScale,u=f.xCenter,h=f.yCenter,d=f.getIndexAngle(0)-.5*S2;let m=d,p;const v=360/this.countVisibleElements();for(p=0;p<t;++p)m+=this._computeAngle(p,r,v);for(p=t;p<t+c;p++){const g=a[p];let x=m,z=m+this._computeAngle(p,r,v),C=i.getDataVisibility(p)?f.getDistanceFromCenterForValue(this.getParsed(p).r):0;m=z,n&&(l.animateScale&&(C=0),l.animateRotate&&(x=z=d));const y={x:u,y:h,innerRadius:0,outerRadius:C,startAngle:x,endAngle:z,options:this.resolveDataElementOptions(p,g.active?"active":r)};this.updateElement(g,p,y,r)}}countVisibleElements(){const a=this._cachedMeta;let t=0;return a.data.forEach((c,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&t++}),t}_computeAngle(a,t,c){return this.chart.getDataVisibility(a)?D4(this.resolveDataElementOptions(a,t).angle||c):0}}l1(y5,"id","polarArea"),l1(y5,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),l1(y5,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(a){const t=a.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:c,color:r}}=a.legend.options;return t.labels.map((n,i)=>{const l=a.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:c,hidden:!a.getDataVisibility(i),index:i}})}return[]}},onClick(a,t,c){c.chart.toggleDataVisibility(t.index),c.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Ln extends f6{}l1(Ln,"id","pie"),l1(Ln,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Wt extends $4{getLabelAndValue(a){const t=this._cachedMeta.vScale,c=this.getParsed(a);return{label:t.getLabels()[a],value:""+t.getLabelForValue(c[t.axis])}}parseObjectData(a,t,c,r){return TV.bind(this)(a,t,c,r)}update(a){const t=this._cachedMeta,c=t.dataset,r=t.data||[],n=t.iScale.getLabels();if(c.points=r,a!=="resize"){const i=this.resolveDatasetElementOptions(a);this.options.showLine||(i.borderWidth=0);const s={_loop:!0,_fullLoop:n.length===r.length,options:i};this.updateElement(c,void 0,s,a)}this.updateElements(r,0,r.length,a)}updateElements(a,t,c,r){const n=this._cachedMeta.rScale,i=r==="reset";for(let s=t;s<t+c;s++){const l=a[s],f=this.resolveDataElementOptions(s,l.active?"active":r),u=n.getPointPositionForValue(s,this.getParsed(s).r),h=i?n.xCenter:u.x,d=i?n.yCenter:u.y,m={x:h,y:d,angle:u.angle,skip:isNaN(h)||isNaN(d),options:f};this.updateElement(l,s,m,r)}}}l1(Wt,"id","radar"),l1(Wt,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),l1(Wt,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Yt extends $4{getLabelAndValue(a){const t=this._cachedMeta,c=this.chart.data.labels||[],{xScale:r,yScale:n}=t,i=this.getParsed(a),s=r.getLabelForValue(i.x),l=n.getLabelForValue(i.y);return{label:c[a]||"",value:"("+s+", "+l+")"}}update(a){const t=this._cachedMeta,{data:c=[]}=t,r=this.chart._animationsDisabled;let{start:n,count:i}=bV(t,c,r);if(this._drawStart=n,this._drawCount=i,VV(t)&&(n=0,i=c.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:l}=t;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=c;const f=this.resolveDatasetElementOptions(a);f.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:f},a)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(c,n,i,a)}addElements(){const{showLine:a}=this.options;!this.datasetElementType&&a&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(a,t,c,r){const n=r==="reset",{iScale:i,vScale:s,_stacked:l,_dataset:f}=this._cachedMeta,u=this.resolveDataElementOptions(t,r),h=this.getSharedOptions(u),d=this.includeOptions(r,h),m=i.axis,p=s.axis,{spanGaps:v,segment:g}=this.options,x=C8(v)?v:Number.POSITIVE_INFINITY,z=this.chart._animationsDisabled||n||r==="none";let C=t>0&&this.getParsed(t-1);for(let y=t;y<t+c;++y){const b=a[y],w=this.getParsed(y),H=z?b:{},T=s2(w[p]),A=H[m]=i.getPixelForValue(w[m],y),U=H[p]=n||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,w,l):w[p],y);H.skip=isNaN(A)||isNaN(U)||T,H.stop=y>0&&Math.abs(w[m]-C[m])>x,g&&(H.parsed=w,H.raw=f.data[y]),d&&(H.options=h||this.resolveDataElementOptions(y,b.active?"active":r)),z||this.updateElement(b,y,H,r),C=w}this.updateSharedOptions(h,r,u)}getMaxOverflow(){const a=this._cachedMeta,t=a.data||[];if(!this.options.showLine){let s=0;for(let l=t.length-1;l>=0;--l)s=Math.max(s,t[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const c=a.dataset,r=c.options&&c.options.borderWidth||0;if(!t.length)return r;const n=t[0].size(this.resolveDataElementOptions(0)),i=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,n,i)/2}}l1(Yt,"id","scatter"),l1(Yt,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),l1(Yt,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var yC1=Object.freeze({__proto__:null,BarController:It,BubbleController:$t,DoughnutController:f6,LineController:Ut,PieController:Ln,PolarAreaController:y5,RadarController:Wt,ScatterController:Yt});function Z0(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ws{constructor(a){l1(this,"options");this.options=a||{}}static override(a){Object.assign(ws.prototype,a)}init(){}formats(){return Z0()}parse(){return Z0()}format(){return Z0()}add(){return Z0()}diff(){return Z0()}startOf(){return Z0()}endOf(){return Z0()}}var bC1={_date:ws};function VC1(e,a,t,c){const{controller:r,data:n,_sorted:i}=e,s=r._cachedMeta.iScale;if(s&&a===s.axis&&a!=="r"&&i&&n.length){const l=s._reversePixels?Gg1:Fe;if(c){if(r._sharedOptions){const f=n[0],u=typeof f.getRange=="function"&&f.getRange(a);if(u){const h=l(n,a,t-u),d=l(n,a,t+u);return{lo:h.lo,hi:d.hi}}}}else return l(n,a,t)}return{lo:0,hi:n.length-1}}function Ea(e,a,t,c,r){const n=e.getSortedVisibleDatasetMetas(),i=t[a];for(let s=0,l=n.length;s<l;++s){const{index:f,data:u}=n[s],{lo:h,hi:d}=VC1(n[s],a,i,r);for(let m=h;m<=d;++m){const p=u[m];p.skip||c(p,f,m)}}}function wC1(e){const a=e.indexOf("x")!==-1,t=e.indexOf("y")!==-1;return function(c,r){const n=a?Math.abs(c.x-r.x):0,i=t?Math.abs(c.y-r.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}}function Hr(e,a,t,c,r){const n=[];return!r&&!e.isPointInArea(a)||Ea(e,t,a,function(s,l,f){!r&&!De(s,e.chartArea,0)||s.inRange(a.x,a.y,c)&&n.push({element:s,datasetIndex:l,index:f})},!0),n}function LC1(e,a,t,c){let r=[];function n(i,s,l){const{startAngle:f,endAngle:u}=i.getProps(["startAngle","endAngle"],c),{angle:h}=CV(i,{x:a.x,y:a.y});K5(h,f,u)&&r.push({element:i,datasetIndex:s,index:l})}return Ea(e,t,a,n),r}function _C1(e,a,t,c,r,n){let i=[];const s=wC1(t);let l=Number.POSITIVE_INFINITY;function f(u,h,d){const m=u.inRange(a.x,a.y,r);if(c&&!m)return;const p=u.getCenterPoint(r);if(!(!!n||e.isPointInArea(p))&&!m)return;const g=s(a,p);g<l?(i=[{element:u,datasetIndex:h,index:d}],l=g):g===l&&i.push({element:u,datasetIndex:h,index:d})}return Ea(e,t,a,f),i}function yr(e,a,t,c,r,n){return!n&&!e.isPointInArea(a)?[]:t==="r"&&!c?LC1(e,a,t,r):_C1(e,a,t,c,r,n)}function uf(e,a,t,c,r){const n=[],i=t==="x"?"inXRange":"inYRange";let s=!1;return Ea(e,t,a,(l,f,u)=>{l[i]&&l[i](a[t],r)&&(n.push({element:l,datasetIndex:f,index:u}),s=s||l.inRange(a.x,a.y,r))}),c&&!s?[]:n}var kC1={evaluateInteractionItems:Ea,modes:{index(e,a,t,c){const r=a6(a,e),n=t.axis||"x",i=t.includeInvisible||!1,s=t.intersect?Hr(e,r,n,c,i):yr(e,r,n,!1,c,i),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(f=>{const u=s[0].index,h=f.data[u];h&&!h.skip&&l.push({element:h,datasetIndex:f.index,index:u})}),l):[]},dataset(e,a,t,c){const r=a6(a,e),n=t.axis||"xy",i=t.includeInvisible||!1;let s=t.intersect?Hr(e,r,n,c,i):yr(e,r,n,!1,c,i);if(s.length>0){const l=s[0].datasetIndex,f=e.getDatasetMeta(l).data;s=[];for(let u=0;u<f.length;++u)s.push({element:f[u],datasetIndex:l,index:u})}return s},point(e,a,t,c){const r=a6(a,e),n=t.axis||"xy",i=t.includeInvisible||!1;return Hr(e,r,n,c,i)},nearest(e,a,t,c){const r=a6(a,e),n=t.axis||"xy",i=t.includeInvisible||!1;return yr(e,r,n,t.intersect,c,i)},x(e,a,t,c){const r=a6(a,e);return uf(e,r,"x",t.intersect,c)},y(e,a,t,c){const r=a6(a,e);return uf(e,r,"y",t.intersect,c)}}};const UV=["left","top","right","bottom"];function W8(e,a){return e.filter(t=>t.pos===a)}function hf(e,a){return e.filter(t=>UV.indexOf(t.pos)===-1&&t.box.axis===a)}function Y8(e,a){return e.sort((t,c)=>{const r=a?c:t,n=a?t:c;return r.weight===n.weight?r.index-n.index:r.weight-n.weight})}function AC1(e){const a=[];let t,c,r,n,i,s;for(t=0,c=(e||[]).length;t<c;++t)r=e[t],{position:n,options:{stack:i,stackWeight:s=1}}=r,a.push({index:t,box:r,pos:n,horizontal:r.isHorizontal(),weight:r.weight,stack:i&&n+i,stackWeight:s});return a}function SC1(e){const a={};for(const t of e){const{stack:c,pos:r,stackWeight:n}=t;if(!c||!UV.includes(r))continue;const i=a[c]||(a[c]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=n}return a}function NC1(e,a){const t=SC1(e),{vBoxMaxWidth:c,hBoxMaxHeight:r}=a;let n,i,s;for(n=0,i=e.length;n<i;++n){s=e[n];const{fullSize:l}=s.box,f=t[s.stack],u=f&&s.stackWeight/f.weight;s.horizontal?(s.width=u?u*c:l&&a.availableWidth,s.height=r):(s.width=c,s.height=u?u*r:l&&a.availableHeight)}return t}function TC1(e){const a=AC1(e),t=Y8(a.filter(f=>f.box.fullSize),!0),c=Y8(W8(a,"left"),!0),r=Y8(W8(a,"right")),n=Y8(W8(a,"top"),!0),i=Y8(W8(a,"bottom")),s=hf(a,"x"),l=hf(a,"y");return{fullSize:t,leftAndTop:c.concat(n),rightAndBottom:r.concat(l).concat(i).concat(s),chartArea:W8(a,"chartArea"),vertical:c.concat(r).concat(l),horizontal:n.concat(i).concat(s)}}function df(e,a,t,c){return Math.max(e[t],a[t])+Math.max(e[c],a[c])}function WV(e,a){e.top=Math.max(e.top,a.top),e.left=Math.max(e.left,a.left),e.bottom=Math.max(e.bottom,a.bottom),e.right=Math.max(e.right,a.right)}function EC1(e,a,t,c){const{pos:r,box:n}=t,i=e.maxPadding;if(!a2(r)){t.size&&(e[r]-=t.size);const h=c[t.stack]||{size:0,count:1};h.size=Math.max(h.size,t.horizontal?n.height:n.width),t.size=h.size/h.count,e[r]+=t.size}n.getPadding&&WV(i,n.getPadding());const s=Math.max(0,a.outerWidth-df(i,e,"left","right")),l=Math.max(0,a.outerHeight-df(i,e,"top","bottom")),f=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,t.horizontal?{same:f,other:u}:{same:u,other:f}}function FC1(e){const a=e.maxPadding;function t(c){const r=Math.max(a[c]-e[c],0);return e[c]+=r,r}e.y+=t("top"),e.x+=t("left"),t("right"),t("bottom")}function DC1(e,a){const t=a.maxPadding;function c(r){const n={left:0,top:0,right:0,bottom:0};return r.forEach(i=>{n[i]=Math.max(a[i],t[i])}),n}return c(e?["left","right"]:["top","bottom"])}function e5(e,a,t,c){const r=[];let n,i,s,l,f,u;for(n=0,i=e.length,f=0;n<i;++n){s=e[n],l=s.box,l.update(s.width||a.w,s.height||a.h,DC1(s.horizontal,a));const{same:h,other:d}=EC1(a,t,s,c);f|=h&&r.length,u=u||d,l.fullSize||r.push(s)}return f&&e5(r,a,t,c)||u}function mt(e,a,t,c,r){e.top=t,e.left=a,e.right=a+c,e.bottom=t+r,e.width=c,e.height=r}function mf(e,a,t,c){const r=t.padding;let{x:n,y:i}=a;for(const s of e){const l=s.box,f=c[s.stack]||{count:1,placed:0,weight:1},u=s.stackWeight/f.weight||1;if(s.horizontal){const h=a.w*u,d=f.size||l.height;Q5(f.start)&&(i=f.start),l.fullSize?mt(l,r.left,i,t.outerWidth-r.right-r.left,d):mt(l,a.left+f.placed,i,h,d),f.start=i,f.placed+=h,i=l.bottom}else{const h=a.h*u,d=f.size||l.width;Q5(f.start)&&(n=f.start),l.fullSize?mt(l,n,r.top,d,t.outerHeight-r.bottom-r.top):mt(l,n,a.top+f.placed,d,h),f.start=n,f.placed+=h,n=l.right}}a.x=n,a.y=i}var P3={addBox(e,a){e.boxes||(e.boxes=[]),a.fullSize=a.fullSize||!1,a.position=a.position||"top",a.weight=a.weight||0,a._layers=a._layers||function(){return[{z:0,draw(t){a.draw(t)}}]},e.boxes.push(a)},removeBox(e,a){const t=e.boxes?e.boxes.indexOf(a):-1;t!==-1&&e.boxes.splice(t,1)},configure(e,a,t){a.fullSize=t.fullSize,a.position=t.position,a.weight=t.weight},update(e,a,t,c){if(!e)return;const r=$3(e.options.layout.padding),n=Math.max(a-r.width,0),i=Math.max(t-r.height,0),s=TC1(e.boxes),l=s.vertical,f=s.horizontal;p2(e.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const u=l.reduce((v,g)=>g.box.options&&g.box.options.display===!1?v:v+1,0)||1,h=Object.freeze({outerWidth:a,outerHeight:t,padding:r,availableWidth:n,availableHeight:i,vBoxMaxWidth:n/2/u,hBoxMaxHeight:i/2}),d=Object.assign({},r);WV(d,$3(c));const m=Object.assign({maxPadding:d,w:n,h:i,x:r.left,y:r.top},r),p=NC1(l.concat(f),h);e5(s.fullSize,m,h,p),e5(l,m,h,p),e5(f,m,h,p)&&e5(l,m,h,p),FC1(m),mf(s.leftAndTop,m,h,p),m.x+=m.w,m.y+=m.h,mf(s.rightAndBottom,m,h,p),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},p2(s.chartArea,v=>{const g=v.box;Object.assign(g,e.chartArea),g.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class YV{acquireContext(a,t){}releaseContext(a){return!1}addEventListener(a,t,c){}removeEventListener(a,t,c){}getDevicePixelRatio(){return 1}getMaximumSize(a,t,c,r){return t=Math.max(0,t||a.width),c=c||a.height,{width:t,height:Math.max(0,r?Math.floor(t/r):c)}}isAttached(a){return!0}updateConfig(a){}}class PC1 extends YV{acquireContext(a){return a&&a.getContext&&a.getContext("2d")||null}updateConfig(a){a.options.animation=!1}}const jt="$chartjs",BC1={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},pf=e=>e===null||e==="";function OC1(e,a){const t=e.style,c=e.getAttribute("height"),r=e.getAttribute("width");if(e[jt]={initial:{height:c,width:r,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",pf(r)){const n=Ql(e,"width");n!==void 0&&(e.width=n)}if(pf(c))if(e.style.height==="")e.height=e.width/(a||2);else{const n=Ql(e,"height");n!==void 0&&(e.height=n)}return e}const jV=Ix1?{passive:!0}:!1;function RC1(e,a,t){e&&e.addEventListener(a,t,jV)}function IC1(e,a,t){e&&e.canvas&&e.canvas.removeEventListener(a,t,jV)}function $C1(e,a){const t=BC1[e.type]||e.type,{x:c,y:r}=a6(e,a);return{type:t,chart:a,native:e,x:c!==void 0?c:null,y:r!==void 0?r:null}}function b7(e,a){for(const t of e)if(t===a||t.contains(a))return!0}function UC1(e,a,t){const c=e.canvas,r=new MutationObserver(n=>{let i=!1;for(const s of n)i=i||b7(s.addedNodes,c),i=i&&!b7(s.removedNodes,c);i&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function WC1(e,a,t){const c=e.canvas,r=new MutationObserver(n=>{let i=!1;for(const s of n)i=i||b7(s.removedNodes,c),i=i&&!b7(s.addedNodes,c);i&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}const ea=new Map;let vf=0;function qV(){const e=window.devicePixelRatio;e!==vf&&(vf=e,ea.forEach((a,t)=>{t.currentDevicePixelRatio!==e&&a()}))}function YC1(e,a){ea.size||window.addEventListener("resize",qV),ea.set(e,a)}function jC1(e){ea.delete(e),ea.size||window.removeEventListener("resize",qV)}function qC1(e,a,t){const c=e.canvas,r=c&&Vs(c);if(!r)return;const n=yV((s,l)=>{const f=r.clientWidth;t(s,l),f<r.clientWidth&&t()},window),i=new ResizeObserver(s=>{const l=s[0],f=l.contentRect.width,u=l.contentRect.height;f===0&&u===0||n(f,u)});return i.observe(r),YC1(e,n),i}function br(e,a,t){t&&t.disconnect(),a==="resize"&&jC1(e)}function GC1(e,a,t){const c=e.canvas,r=yV(n=>{e.ctx!==null&&t($C1(n,e))},e);return RC1(c,a,r),r}class XC1 extends YV{acquireContext(a,t){const c=a&&a.getContext&&a.getContext("2d");return c&&c.canvas===a?(OC1(a,t),c):null}releaseContext(a){const t=a.canvas;if(!t[jt])return!1;const c=t[jt].initial;["height","width"].forEach(n=>{const i=c[n];s2(i)?t.removeAttribute(n):t.setAttribute(n,i)});const r=c.style||{};return Object.keys(r).forEach(n=>{t.style[n]=r[n]}),t.width=t.width,delete t[jt],!0}addEventListener(a,t,c){this.removeEventListener(a,t);const r=a.$proxies||(a.$proxies={}),i={attach:UC1,detach:WC1,resize:qC1}[t]||GC1;r[t]=i(a,t,c)}removeEventListener(a,t){const c=a.$proxies||(a.$proxies={}),r=c[t];if(!r)return;({attach:br,detach:br,resize:br}[t]||IC1)(a,t,r),c[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(a,t,c,r){return Rx1(a,t,c,r)}isAttached(a){const t=a&&Vs(a);return!!(t&&t.isConnected)}}function ZC1(e){return!bs()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?PC1:XC1}class q4{constructor(){l1(this,"x");l1(this,"y");l1(this,"active",!1);l1(this,"options");l1(this,"$animations")}tooltipPosition(a){const{x:t,y:c}=this.getProps(["x","y"],a);return{x:t,y:c}}hasValue(){return C8(this.x)&&C8(this.y)}getProps(a,t){const c=this.$animations;if(!t||!c)return this;const r={};return a.forEach(n=>{r[n]=c[n]&&c[n].active()?c[n]._to:this[n]}),r}}l1(q4,"defaults",{}),l1(q4,"defaultRoutes");function QC1(e,a){const t=e.options.ticks,c=KC1(e),r=Math.min(t.maxTicksLimit||c,c),n=t.major.enabled?ez1(a):[],i=n.length,s=n[0],l=n[i-1],f=[];if(i>r)return az1(a,f,n,i/r),f;const u=JC1(n,a,r);if(i>0){let h,d;const m=i>1?Math.round((l-s)/(i-1)):null;for(pt(a,f,u,s2(m)?0:s-m,s),h=0,d=i-1;h<d;h++)pt(a,f,u,n[h],n[h+1]);return pt(a,f,u,l,s2(m)?a.length:l+m),f}return pt(a,f,u),f}function KC1(e){const a=e.options.offset,t=e._tickSize(),c=e._length/t+(a?0:1),r=e._maxLength/t;return Math.floor(Math.min(c,r))}function JC1(e,a,t){const c=tz1(e),r=a.length/t;if(!c)return Math.max(r,1);const n=Wg1(c);for(let i=0,s=n.length-1;i<s;i++){const l=n[i];if(l>r)return l}return Math.max(r,1)}function ez1(e){const a=[];let t,c;for(t=0,c=e.length;t<c;t++)e[t].major&&a.push(t);return a}function az1(e,a,t,c){let r=0,n=t[0],i;for(c=Math.ceil(c),i=0;i<e.length;i++)i===n&&(a.push(e[i]),r++,n=t[r*c])}function pt(e,a,t,c,r){const n=q1(c,0),i=Math.min(q1(r,e.length),e.length);let s=0,l,f,u;for(t=Math.ceil(t),r&&(l=r-c,t=l/Math.floor(l/t)),u=n;u<0;)s++,u=Math.round(n+s*t);for(f=Math.max(n,0);f<i;f++)f===u&&(a.push(e[f]),s++,u=Math.round(n+s*t))}function tz1(e){const a=e.length;let t,c;if(a<2)return!1;for(c=e[0],t=1;t<a;++t)if(e[t]-e[t-1]!==c)return!1;return c}const cz1=e=>e==="left"?"right":e==="right"?"left":e,gf=(e,a,t)=>a==="top"||a==="left"?e[a]+t:e[a]-t,xf=(e,a)=>Math.min(a||e,e);function Cf(e,a){const t=[],c=e.length/a,r=e.length;let n=0;for(;n<r;n+=c)t.push(e[Math.floor(n)]);return t}function rz1(e,a,t){const c=e.ticks.length,r=Math.min(a,c-1),n=e._startPixel,i=e._endPixel,s=1e-6;let l=e.getPixelForTick(r),f;if(!(t&&(c===1?f=Math.max(l-n,i-l):a===0?f=(e.getPixelForTick(1)-l)/2:f=(l-e.getPixelForTick(r-1))/2,l+=r<a?f:-f,l<n-s||l>i+s)))return l}function nz1(e,a){p2(e,t=>{const c=t.gc,r=c.length/2;let n;if(r>a){for(n=0;n<r;++n)delete t.data[c[n]];c.splice(0,r)}})}function j8(e){return e.drawTicks?e.tickLength:0}function zf(e,a){if(!e.display)return 0;const t=m3(e.font,a),c=$3(e.padding);return(_2(e.text)?e.text.length:1)*t.lineHeight+c.height}function iz1(e,a){return R0(e,{scale:a,type:"scale"})}function sz1(e,a,t){return R0(e,{tick:t,index:a,type:"tick"})}function oz1(e,a,t){let c=xs(e);return(t&&a!=="right"||!t&&a==="right")&&(c=cz1(c)),c}function lz1(e,a,t,c){const{top:r,left:n,bottom:i,right:s,chart:l}=e,{chartArea:f,scales:u}=l;let h=0,d,m,p;const v=i-r,g=s-n;if(e.isHorizontal()){if(m=T3(c,n,s),a2(t)){const x=Object.keys(t)[0],z=t[x];p=u[x].getPixelForValue(z)+v-a}else t==="center"?p=(f.bottom+f.top)/2+v-a:p=gf(e,t,a);d=s-n}else{if(a2(t)){const x=Object.keys(t)[0],z=t[x];m=u[x].getPixelForValue(z)-g+a}else t==="center"?m=(f.left+f.right)/2-g+a:m=gf(e,t,a);p=T3(c,i,r),h=t==="left"?-t3:t3}return{titleX:m,titleY:p,maxWidth:d,rotation:h}}class S6 extends q4{constructor(a){super(),this.id=a.id,this.type=a.type,this.options=void 0,this.ctx=a.ctx,this.chart=a.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(a){this.options=a.setContext(this.getContext()),this.axis=a.axis,this._userMin=this.parse(a.min),this._userMax=this.parse(a.max),this._suggestedMin=this.parse(a.suggestedMin),this._suggestedMax=this.parse(a.suggestedMax)}parse(a,t){return a}getUserBounds(){let{_userMin:a,_userMax:t,_suggestedMin:c,_suggestedMax:r}=this;return a=s4(a,Number.POSITIVE_INFINITY),t=s4(t,Number.NEGATIVE_INFINITY),c=s4(c,Number.POSITIVE_INFINITY),r=s4(r,Number.NEGATIVE_INFINITY),{min:s4(a,c),max:s4(t,r),minDefined:j2(a),maxDefined:j2(t)}}getMinMax(a){let{min:t,max:c,minDefined:r,maxDefined:n}=this.getUserBounds(),i;if(r&&n)return{min:t,max:c};const s=this.getMatchingVisibleMetas();for(let l=0,f=s.length;l<f;++l)i=s[l].controller.getMinMax(this,a),r||(t=Math.min(t,i.min)),n||(c=Math.max(c,i.max));return t=n&&t>c?c:t,c=r&&t>c?t:c,{min:s4(t,s4(c,t)),max:s4(c,s4(t,c))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const a=this.chart.data;return this.options.labels||(this.isHorizontal()?a.xLabels:a.yLabels)||a.labels||[]}getLabelItems(a=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(a))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){H2(this.options.beforeUpdate,[this])}update(a,t,c){const{beginAtZero:r,grace:n,ticks:i}=this.options,s=i.sampleSize;this.beforeUpdate(),this.maxWidth=a,this.maxHeight=t,this._margins=c=Object.assign({left:0,right:0,top:0,bottom:0},c),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+c.left+c.right:this.height+c.top+c.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=xx1(this,n,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?Cf(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||i.source==="auto")&&(this.ticks=QC1(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let a=this.options.reverse,t,c;this.isHorizontal()?(t=this.left,c=this.right):(t=this.top,c=this.bottom,a=!a),this._startPixel=t,this._endPixel=c,this._reversePixels=a,this._length=c-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){H2(this.options.afterUpdate,[this])}beforeSetDimensions(){H2(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(){H2(this.options.afterSetDimensions,[this])}_callHooks(a){this.chart.notifyPlugins(a,this.getContext()),H2(this.options[a],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){H2(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(a){const t=this.options.ticks;let c,r,n;for(c=0,r=a.length;c<r;c++)n=a[c],n.label=H2(t.callback,[n.value,c,a],this)}afterTickToLabelConversion(){H2(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){H2(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const a=this.options,t=a.ticks,c=xf(this.ticks.length,a.ticks.maxTicksLimit),r=t.minRotation||0,n=t.maxRotation;let i=r,s,l,f;if(!this._isVisible()||!t.display||r>=n||c<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),h=u.widest.width,d=u.highest.height,m=H3(this.chart.width-h,0,this.maxWidth);s=a.offset?this.maxWidth/c:m/(c-1),h+6>s&&(s=m/(c-(a.offset?.5:1)),l=this.maxHeight-j8(a.grid)-t.padding-zf(a.title,this.chart.options.font),f=Math.sqrt(h*h+d*d),i=vs(Math.min(Math.asin(H3((u.highest.height+6)/s,-1,1)),Math.asin(H3(l/f,-1,1))-Math.asin(H3(d/f,-1,1)))),i=Math.max(r,Math.min(n,i))),this.labelRotation=i}afterCalculateLabelRotation(){H2(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){H2(this.options.beforeFit,[this])}fit(){const a={width:0,height:0},{chart:t,options:{ticks:c,title:r,grid:n}}=this,i=this._isVisible(),s=this.isHorizontal();if(i){const l=zf(r,t.options.font);if(s?(a.width=this.maxWidth,a.height=j8(n)+l):(a.height=this.maxHeight,a.width=j8(n)+l),c.display&&this.ticks.length){const{first:f,last:u,widest:h,highest:d}=this._getLabelSizes(),m=c.padding*2,p=D4(this.labelRotation),v=Math.cos(p),g=Math.sin(p);if(s){const x=c.mirror?0:g*h.width+v*d.height;a.height=Math.min(this.maxHeight,a.height+x+m)}else{const x=c.mirror?0:v*h.width+g*d.height;a.width=Math.min(this.maxWidth,a.width+x+m)}this._calculatePadding(f,u,g,v)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=a.height):(this.width=a.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(a,t,c,r){const{ticks:{align:n,padding:i},position:s}=this.options,l=this.labelRotation!==0,f=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,m=0;l?f?(d=r*a.width,m=c*t.height):(d=c*a.height,m=r*t.width):n==="start"?m=t.width:n==="end"?d=a.width:n!=="inner"&&(d=a.width/2,m=t.width/2),this.paddingLeft=Math.max((d-u+i)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-h+i)*this.width/(this.width-h),0)}else{let u=t.height/2,h=a.height/2;n==="start"?(u=0,h=a.height):n==="end"&&(u=t.height,h=0),this.paddingTop=u+i,this.paddingBottom=h+i}}_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(){H2(this.options.afterFit,[this])}isHorizontal(){const{axis:a,position:t}=this.options;return t==="top"||t==="bottom"||a==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(a){this.beforeTickToLabelConversion(),this.generateTickLabels(a);let t,c;for(t=0,c=a.length;t<c;t++)s2(a[t].label)&&(a.splice(t,1),c--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let a=this._labelSizes;if(!a){const t=this.options.ticks.sampleSize;let c=this.ticks;t<c.length&&(c=Cf(c,t)),this._labelSizes=a=this._computeLabelSizes(c,c.length,this.options.ticks.maxTicksLimit)}return a}_computeLabelSizes(a,t,c){const{ctx:r,_longestTextCache:n}=this,i=[],s=[],l=Math.floor(t/xf(t,c));let f=0,u=0,h,d,m,p,v,g,x,z,C,y,b;for(h=0;h<t;h+=l){if(p=a[h].label,v=this._resolveTickFontOptions(h),r.font=g=v.string,x=n[g]=n[g]||{data:{},gc:[]},z=v.lineHeight,C=y=0,!s2(p)&&!_2(p))C=H7(r,x.data,x.gc,C,p),y=z;else if(_2(p))for(d=0,m=p.length;d<m;++d)b=p[d],!s2(b)&&!_2(b)&&(C=H7(r,x.data,x.gc,C,b),y+=z);i.push(C),s.push(y),f=Math.max(C,f),u=Math.max(y,u)}nz1(n,t);const w=i.indexOf(f),H=s.indexOf(u),T=A=>({width:i[A]||0,height:s[A]||0});return{first:T(0),last:T(t-1),widest:T(w),highest:T(H),widths:i,heights:s}}getLabelForValue(a){return a}getPixelForValue(a,t){return NaN}getValueForPixel(a){}getPixelForTick(a){const t=this.ticks;return a<0||a>t.length-1?null:this.getPixelForValue(t[a].value)}getPixelForDecimal(a){this._reversePixels&&(a=1-a);const t=this._startPixel+a*this._length;return qg1(this._alignToPixels?X0(this.chart,t,0):t)}getDecimalForPixel(a){const t=(a-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:a,max:t}=this;return a<0&&t<0?t:a>0&&t>0?a:0}getContext(a){const t=this.ticks||[];if(a>=0&&a<t.length){const c=t[a];return c.$context||(c.$context=sz1(this.getContext(),a,c))}return this.$context||(this.$context=iz1(this.chart.getContext(),this))}_tickSize(){const a=this.options.ticks,t=D4(this.labelRotation),c=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),n=this._getLabelSizes(),i=a.autoSkipPadding||0,s=n?n.widest.width+i:0,l=n?n.highest.height+i:0;return this.isHorizontal()?l*c>s*r?s/c:l/r:l*r<s*c?l/c:s/r}_isVisible(){const a=this.options.display;return a!=="auto"?!!a:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(a){const t=this.axis,c=this.chart,r=this.options,{grid:n,position:i,border:s}=r,l=n.offset,f=this.isHorizontal(),h=this.ticks.length+(l?1:0),d=j8(n),m=[],p=s.setContext(this.getContext()),v=p.display?p.width:0,g=v/2,x=function(O){return X0(c,O,v)};let z,C,y,b,w,H,T,A,U,D,k,j;if(i==="top")z=x(this.bottom),H=this.bottom-d,A=z-g,D=x(a.top)+g,j=a.bottom;else if(i==="bottom")z=x(this.top),D=a.top,j=x(a.bottom)-g,H=z+g,A=this.top+d;else if(i==="left")z=x(this.right),w=this.right-d,T=z-g,U=x(a.left)+g,k=a.right;else if(i==="right")z=x(this.left),U=a.left,k=x(a.right)-g,w=z+g,T=this.left+d;else if(t==="x"){if(i==="center")z=x((a.top+a.bottom)/2+.5);else if(a2(i)){const O=Object.keys(i)[0],X=i[O];z=x(this.chart.scales[O].getPixelForValue(X))}D=a.top,j=a.bottom,H=z+g,A=H+d}else if(t==="y"){if(i==="center")z=x((a.left+a.right)/2);else if(a2(i)){const O=Object.keys(i)[0],X=i[O];z=x(this.chart.scales[O].getPixelForValue(X))}w=z-g,T=w-d,U=a.left,k=a.right}const c1=q1(r.ticks.maxTicksLimit,h),F=Math.max(1,Math.ceil(h/c1));for(C=0;C<h;C+=F){const O=this.getContext(C),X=n.setContext(O),f1=s.setContext(O),J=X.lineWidth,v1=X.color,r1=f1.dash||[],S=f1.dashOffset,_=X.tickWidth,P=X.tickColor,q=X.tickBorderDash||[],B=X.tickBorderDashOffset;y=rz1(this,C,l),y!==void 0&&(b=X0(c,y,J),f?w=T=U=k=b:H=A=D=j=b,m.push({tx1:w,ty1:H,tx2:T,ty2:A,x1:U,y1:D,x2:k,y2:j,width:J,color:v1,borderDash:r1,borderDashOffset:S,tickWidth:_,tickColor:P,tickBorderDash:q,tickBorderDashOffset:B}))}return this._ticksLength=h,this._borderValue=z,m}_computeLabelItems(a){const t=this.axis,c=this.options,{position:r,ticks:n}=c,i=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:f,padding:u,mirror:h}=n,d=j8(c.grid),m=d+u,p=h?-u:m,v=-D4(this.labelRotation),g=[];let x,z,C,y,b,w,H,T,A,U,D,k,j="middle";if(r==="top")w=this.bottom-p,H=this._getXAxisLabelAlignment();else if(r==="bottom")w=this.top+p,H=this._getXAxisLabelAlignment();else if(r==="left"){const F=this._getYAxisLabelAlignment(d);H=F.textAlign,b=F.x}else if(r==="right"){const F=this._getYAxisLabelAlignment(d);H=F.textAlign,b=F.x}else if(t==="x"){if(r==="center")w=(a.top+a.bottom)/2+m;else if(a2(r)){const F=Object.keys(r)[0],O=r[F];w=this.chart.scales[F].getPixelForValue(O)+m}H=this._getXAxisLabelAlignment()}else if(t==="y"){if(r==="center")b=(a.left+a.right)/2-m;else if(a2(r)){const F=Object.keys(r)[0],O=r[F];b=this.chart.scales[F].getPixelForValue(O)}H=this._getYAxisLabelAlignment(d).textAlign}t==="y"&&(l==="start"?j="top":l==="end"&&(j="bottom"));const c1=this._getLabelSizes();for(x=0,z=s.length;x<z;++x){C=s[x],y=C.label;const F=n.setContext(this.getContext(x));T=this.getPixelForTick(x)+n.labelOffset,A=this._resolveTickFontOptions(x),U=A.lineHeight,D=_2(y)?y.length:1;const O=D/2,X=F.color,f1=F.textStrokeColor,J=F.textStrokeWidth;let v1=H;i?(b=T,H==="inner"&&(x===z-1?v1=this.options.reverse?"left":"right":x===0?v1=this.options.reverse?"right":"left":v1="center"),r==="top"?f==="near"||v!==0?k=-D*U+U/2:f==="center"?k=-c1.highest.height/2-O*U+U:k=-c1.highest.height+U/2:f==="near"||v!==0?k=U/2:f==="center"?k=c1.highest.height/2-O*U:k=c1.highest.height-D*U,h&&(k*=-1),v!==0&&!F.showLabelBackdrop&&(b+=U/2*Math.sin(v))):(w=T,k=(1-D)*U/2);let r1;if(F.showLabelBackdrop){const S=$3(F.backdropPadding),_=c1.heights[x],P=c1.widths[x];let q=k-S.top,B=0-S.left;switch(j){case"middle":q-=_/2;break;case"bottom":q-=_;break}switch(H){case"center":B-=P/2;break;case"right":B-=P;break;case"inner":x===z-1?B-=P:x>0&&(B-=P/2);break}r1={left:B,top:q,width:P+S.width,height:_+S.height,color:F.backdropColor}}g.push({label:y,font:A,textOffset:k,options:{rotation:v,color:X,strokeColor:f1,strokeWidth:J,textAlign:v1,textBaseline:j,translation:[b,w],backdrop:r1}})}return g}_getXAxisLabelAlignment(){const{position:a,ticks:t}=this.options;if(-D4(this.labelRotation))return a==="top"?"left":"right";let r="center";return t.align==="start"?r="left":t.align==="end"?r="right":t.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(a){const{position:t,ticks:{crossAlign:c,mirror:r,padding:n}}=this.options,i=this._getLabelSizes(),s=a+n,l=i.widest.width;let f,u;return t==="left"?r?(u=this.right+n,c==="near"?f="left":c==="center"?(f="center",u+=l/2):(f="right",u+=l)):(u=this.right-s,c==="near"?f="right":c==="center"?(f="center",u-=l/2):(f="left",u=this.left)):t==="right"?r?(u=this.left+n,c==="near"?f="right":c==="center"?(f="center",u-=l/2):(f="left",u-=l)):(u=this.left+s,c==="near"?f="left":c==="center"?(f="center",u+=l/2):(f="right",u=this.right)):f="right",{textAlign:f,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const a=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:a.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:a.width}}drawBackground(){const{ctx:a,options:{backgroundColor:t},left:c,top:r,width:n,height:i}=this;t&&(a.save(),a.fillStyle=t,a.fillRect(c,r,n,i),a.restore())}getLineWidthForValue(a){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const r=this.ticks.findIndex(n=>n.value===a);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(a){const t=this.options.grid,c=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(a));let n,i;const s=(l,f,u)=>{!u.width||!u.color||(c.save(),c.lineWidth=u.width,c.strokeStyle=u.color,c.setLineDash(u.borderDash||[]),c.lineDashOffset=u.borderDashOffset,c.beginPath(),c.moveTo(l.x,l.y),c.lineTo(f.x,f.y),c.stroke(),c.restore())};if(t.display)for(n=0,i=r.length;n<i;++n){const l=r[n];t.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:a,ctx:t,options:{border:c,grid:r}}=this,n=c.setContext(this.getContext()),i=c.display?n.width:0;if(!i)return;const s=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let f,u,h,d;this.isHorizontal()?(f=X0(a,this.left,i)-i/2,u=X0(a,this.right,s)+s/2,h=d=l):(h=X0(a,this.top,i)-i/2,d=X0(a,this.bottom,s)+s/2,f=u=l),t.save(),t.lineWidth=n.width,t.strokeStyle=n.color,t.beginPath(),t.moveTo(f,h),t.lineTo(u,d),t.stroke(),t.restore()}drawLabels(a){if(!this.options.ticks.display)return;const c=this.ctx,r=this._computeLabelArea();r&&Tc(c,r);const n=this.getLabelItems(a);for(const i of n){const s=i.options,l=i.font,f=i.label,u=i.textOffset;H6(c,f,0,u,l,s)}r&&Ec(c)}drawTitle(){const{ctx:a,options:{position:t,title:c,reverse:r}}=this;if(!c.display)return;const n=m3(c.font),i=$3(c.padding),s=c.align;let l=n.lineHeight/2;t==="bottom"||t==="center"||a2(t)?(l+=i.bottom,_2(c.text)&&(l+=n.lineHeight*(c.text.length-1))):l+=i.top;const{titleX:f,titleY:u,maxWidth:h,rotation:d}=lz1(this,l,t,s);H6(a,c.text,0,0,n,{color:c.color,maxWidth:h,rotation:d,textAlign:oz1(s,t,r),textBaseline:"middle",translation:[f,u]})}draw(a){this._isVisible()&&(this.drawBackground(),this.drawGrid(a),this.drawBorder(),this.drawTitle(),this.drawLabels(a))}_layers(){const a=this.options,t=a.ticks&&a.ticks.z||0,c=q1(a.grid&&a.grid.z,-1),r=q1(a.border&&a.border.z,0);return!this._isVisible()||this.draw!==S6.prototype.draw?[{z:t,draw:n=>{this.draw(n)}}]:[{z:c,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(a){const t=this.chart.getSortedVisibleDatasetMetas(),c=this.axis+"AxisID",r=[];let n,i;for(n=0,i=t.length;n<i;++n){const s=t[n];s[c]===this.id&&(!a||s.type===a)&&r.push(s)}return r}_resolveTickFontOptions(a){const t=this.options.ticks.setContext(this.getContext(a));return m3(t.font)}_maxDigits(){const a=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/a}}class vt{constructor(a,t,c){this.type=a,this.scope=t,this.override=c,this.items=Object.create(null)}isForType(a){return Object.prototype.isPrototypeOf.call(this.type.prototype,a.prototype)}register(a){const t=Object.getPrototypeOf(a);let c;hz1(t)&&(c=this.register(t));const r=this.items,n=a.id,i=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+a);return n in r||(r[n]=a,fz1(a,i,c),this.override&&P2.override(a.id,a.overrides)),i}get(a){return this.items[a]}unregister(a){const t=this.items,c=a.id,r=this.scope;c in t&&delete t[c],r&&c in P2[r]&&(delete P2[r][c],this.override&&delete M6[c])}}function fz1(e,a,t){const c=Z5(Object.create(null),[t?P2.get(t):{},P2.get(a),e.defaults]);P2.set(a,c),e.defaultRoutes&&uz1(a,e.defaultRoutes),e.descriptors&&P2.describe(a,e.descriptors)}function uz1(e,a){Object.keys(a).forEach(t=>{const c=t.split("."),r=c.pop(),n=[e].concat(c).join("."),i=a[t].split("."),s=i.pop(),l=i.join(".");P2.route(n,r,l,s)})}function hz1(e){return"id"in e&&"defaults"in e}class dz1{constructor(){this.controllers=new vt($4,"datasets",!0),this.elements=new vt(q4,"elements"),this.plugins=new vt(Object,"plugins"),this.scales=new vt(S6,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...a){this._each("register",a)}remove(...a){this._each("unregister",a)}addControllers(...a){this._each("register",a,this.controllers)}addElements(...a){this._each("register",a,this.elements)}addPlugins(...a){this._each("register",a,this.plugins)}addScales(...a){this._each("register",a,this.scales)}getController(a){return this._get(a,this.controllers,"controller")}getElement(a){return this._get(a,this.elements,"element")}getPlugin(a){return this._get(a,this.plugins,"plugin")}getScale(a){return this._get(a,this.scales,"scale")}removeControllers(...a){this._each("unregister",a,this.controllers)}removeElements(...a){this._each("unregister",a,this.elements)}removePlugins(...a){this._each("unregister",a,this.plugins)}removeScales(...a){this._each("unregister",a,this.scales)}_each(a,t,c){[...t].forEach(r=>{const n=c||this._getRegistryForType(r);c||n.isForType(r)||n===this.plugins&&r.id?this._exec(a,n,r):p2(r,i=>{const s=c||this._getRegistryForType(i);this._exec(a,s,i)})})}_exec(a,t,c){const r=ps(a);H2(c["before"+r],[],c),t[a](c),H2(c["after"+r],[],c)}_getRegistryForType(a){for(let t=0;t<this._typedRegistries.length;t++){const c=this._typedRegistries[t];if(c.isForType(a))return c}return this.plugins}_get(a,t,c){const r=t.get(a);if(r===void 0)throw new Error('"'+a+'" is not a registered '+c+".");return r}}var te=new dz1;class mz1{constructor(){this._init=[]}notify(a,t,c,r){t==="beforeInit"&&(this._init=this._createDescriptors(a,!0),this._notify(this._init,a,"install"));const n=r?this._descriptors(a).filter(r):this._descriptors(a),i=this._notify(n,a,t,c);return t==="afterDestroy"&&(this._notify(n,a,"stop"),this._notify(this._init,a,"uninstall")),i}_notify(a,t,c,r){r=r||{};for(const n of a){const i=n.plugin,s=i[c],l=[t,r,n.options];if(H2(s,l,i)===!1&&r.cancelable)return!1}return!0}invalidate(){s2(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(a){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(a);return this._notifyStateChanges(a),t}_createDescriptors(a,t){const c=a&&a.config,r=q1(c.options&&c.options.plugins,{}),n=pz1(c);return r===!1&&!t?[]:gz1(a,n,r,t)}_notifyStateChanges(a){const t=this._oldCache||[],c=this._cache,r=(n,i)=>n.filter(s=>!i.some(l=>s.plugin.id===l.plugin.id));this._notify(r(t,c),a,"stop"),this._notify(r(c,t),a,"start")}}function pz1(e){const a={},t=[],c=Object.keys(te.plugins.items);for(let n=0;n<c.length;n++)t.push(te.getPlugin(c[n]));const r=e.plugins||[];for(let n=0;n<r.length;n++){const i=r[n];t.indexOf(i)===-1&&(t.push(i),a[i.id]=!0)}return{plugins:t,localIds:a}}function vz1(e,a){return!a&&e===!1?null:e===!0?{}:e}function gz1(e,{plugins:a,localIds:t},c,r){const n=[],i=e.getContext();for(const s of a){const l=s.id,f=vz1(c[l],r);f!==null&&n.push({plugin:s,options:xz1(e.config,{plugin:s,local:t[l]},f,i)})}return n}function xz1(e,{plugin:a,local:t},c,r){const n=e.pluginScopeKeys(a),i=e.getOptionScopes(c,n);return t&&a.defaults&&i.push(a.defaults),e.createResolver(i,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function _n(e,a){const t=P2.datasets[e]||{};return((a.datasets||{})[e]||{}).indexAxis||a.indexAxis||t.indexAxis||"x"}function Cz1(e,a){let t=e;return e==="_index_"?t=a:e==="_value_"&&(t=a==="x"?"y":"x"),t}function zz1(e,a){return e===a?"_index_":"_value_"}function Mf(e){if(e==="x"||e==="y"||e==="r")return e}function Mz1(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function kn(e,...a){if(Mf(e))return e;for(const t of a){const c=t.axis||Mz1(t.position)||e.length>1&&Mf(e[0].toLowerCase());if(c)return c}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Hf(e,a,t){if(t[a+"AxisID"]===e)return{axis:a}}function Hz1(e,a){if(a.data&&a.data.datasets){const t=a.data.datasets.filter(c=>c.xAxisID===e||c.yAxisID===e);if(t.length)return Hf(e,"x",t[0])||Hf(e,"y",t[0])}return{}}function yz1(e,a){const t=M6[e.type]||{scales:{}},c=a.scales||{},r=_n(e.type,a),n=Object.create(null);return Object.keys(c).forEach(i=>{const s=c[i];if(!a2(s))return console.error(`Invalid scale configuration for scale: ${i}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${i}`);const l=kn(i,s,Hz1(i,e),P2.scales[s.type]),f=zz1(l,r),u=t.scales||{};n[i]=C5(Object.create(null),[{axis:l},s,u[l],u[f]])}),e.data.datasets.forEach(i=>{const s=i.type||e.type,l=i.indexAxis||_n(s,a),u=(M6[s]||{}).scales||{};Object.keys(u).forEach(h=>{const d=Cz1(h,l),m=i[d+"AxisID"]||d;n[m]=n[m]||Object.create(null),C5(n[m],[{axis:d},c[m],u[h]])})}),Object.keys(n).forEach(i=>{const s=n[i];C5(s,[P2.scales[s.type],P2.scale])}),n}function GV(e){const a=e.options||(e.options={});a.plugins=q1(a.plugins,{}),a.scales=yz1(e,a)}function XV(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function bz1(e){return e=e||{},e.data=XV(e.data),GV(e),e}const yf=new Map,ZV=new Set;function gt(e,a){let t=yf.get(e);return t||(t=a(),yf.set(e,t),ZV.add(t)),t}const q8=(e,a,t)=>{const c=T0(a,t);c!==void 0&&e.add(c)};class Vz1{constructor(a){this._config=bz1(a),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(a){this._config.type=a}get data(){return this._config.data}set data(a){this._config.data=XV(a)}get options(){return this._config.options}set options(a){this._config.options=a}get plugins(){return this._config.plugins}update(){const a=this._config;this.clearCache(),GV(a)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(a){return gt(a,()=>[[`datasets.${a}`,""]])}datasetAnimationScopeKeys(a,t){return gt(`${a}.transition.${t}`,()=>[[`datasets.${a}.transitions.${t}`,`transitions.${t}`],[`datasets.${a}`,""]])}datasetElementScopeKeys(a,t){return gt(`${a}-${t}`,()=>[[`datasets.${a}.elements.${t}`,`datasets.${a}`,`elements.${t}`,""]])}pluginScopeKeys(a){const t=a.id,c=this.type;return gt(`${c}-plugin-${t}`,()=>[[`plugins.${t}`,...a.additionalOptionScopes||[]]])}_cachedScopes(a,t){const c=this._scopeCache;let r=c.get(a);return(!r||t)&&(r=new Map,c.set(a,r)),r}getOptionScopes(a,t,c){const{options:r,type:n}=this,i=this._cachedScopes(a,c),s=i.get(t);if(s)return s;const l=new Set;t.forEach(u=>{a&&(l.add(a),u.forEach(h=>q8(l,a,h))),u.forEach(h=>q8(l,r,h)),u.forEach(h=>q8(l,M6[n]||{},h)),u.forEach(h=>q8(l,P2,h)),u.forEach(h=>q8(l,Vn,h))});const f=Array.from(l);return f.length===0&&f.push(Object.create(null)),ZV.has(t)&&i.set(t,f),f}chartOptionScopes(){const{options:a,type:t}=this;return[a,M6[t]||{},P2.datasets[t]||{},{type:t},P2,Vn]}resolveNamedOptions(a,t,c,r=[""]){const n={$shared:!0},{resolver:i,subPrefixes:s}=bf(this._resolverCache,a,r);let l=i;if(Lz1(i,t)){n.$shared=!1,c=E0(c)?c():c;const f=this.createResolver(a,c,s);l=z8(i,c,f)}for(const f of t)n[f]=l[f];return n}createResolver(a,t,c=[""],r){const{resolver:n}=bf(this._resolverCache,a,c);return a2(t)?z8(n,t,void 0,r):n}}function bf(e,a,t){let c=e.get(a);c||(c=new Map,e.set(a,c));const r=t.join();let n=c.get(r);return n||(n={resolver:Ms(a,t),subPrefixes:t.filter(s=>!s.toLowerCase().includes("hover"))},c.set(r,n)),n}const wz1=e=>a2(e)&&Object.getOwnPropertyNames(e).some(a=>E0(e[a]));function Lz1(e,a){const{isScriptable:t,isIndexable:c}=kV(e);for(const r of a){const n=t(r),i=c(r),s=(i||n)&&e[r];if(n&&(E0(s)||wz1(s))||i&&_2(s))return!0}return!1}var _z1="4.4.6";const kz1=["top","bottom","left","right","chartArea"];function Vf(e,a){return e==="top"||e==="bottom"||kz1.indexOf(e)===-1&&a==="x"}function wf(e,a){return function(t,c){return t[e]===c[e]?t[a]-c[a]:t[e]-c[e]}}function Lf(e){const a=e.chart,t=a.options.animation;a.notifyPlugins("afterRender"),H2(t&&t.onComplete,[e],a)}function Az1(e){const a=e.chart,t=a.options.animation;H2(t&&t.onProgress,[e],a)}function QV(e){return bs()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const qt={},_f=e=>{const a=QV(e);return Object.values(qt).filter(t=>t.canvas===a).pop()};function Sz1(e,a,t){const c=Object.keys(e);for(const r of c){const n=+r;if(n>=a){const i=e[r];delete e[r],(t>0||n>a)&&(e[n+t]=i)}}}function Nz1(e,a,t,c){return!t||e.type==="mouseout"?null:c?a:e}function xt(e,a,t){return e.options.clip?e[t]:a[t]}function Tz1(e,a){const{xScale:t,yScale:c}=e;return t&&c?{left:xt(t,a,"left"),right:xt(t,a,"right"),top:xt(c,a,"top"),bottom:xt(c,a,"bottom")}:a}class Ae{static register(...a){te.add(...a),kf()}static unregister(...a){te.remove(...a),kf()}constructor(a,t){const c=this.config=new Vz1(t),r=QV(a),n=_f(r);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const i=c.createResolver(c.chartOptionScopes(),this.getContext());this.platform=new(c.platform||ZC1(r)),this.platform.updateConfig(c);const s=this.platform.acquireContext(r,i.aspectRatio),l=s&&s.canvas,f=l&&l.height,u=l&&l.width;if(this.id=Fg1(),this.ctx=s,this.canvas=l,this.width=u,this.height=f,this._options=i,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 mz1,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Qg1(h=>this.update(h),i.resizeDelay||0),this._dataChanges=[],qt[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ve.listen(this,"complete",Lf),Ve.listen(this,"progress",Az1),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:a,maintainAspectRatio:t},width:c,height:r,_aspectRatio:n}=this;return s2(a)?t&&n?n:r?c/r:null:a}get data(){return this.config.data}set data(a){this.config.data=a}get options(){return this._options}set options(a){this.config.options=a}get registry(){return te}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Zl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ql(this.canvas,this.ctx),this}stop(){return Ve.stop(this),this}resize(a,t){Ve.running(this)?this._resizeBeforeDraw={width:a,height:t}:this._resize(a,t)}_resize(a,t){const c=this.options,r=this.canvas,n=c.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(r,a,t,n),s=c.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,Zl(this,s,!0)&&(this.notifyPlugins("resize",{size:i}),H2(c.onResize,[this,i],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};p2(t,(c,r)=>{c.id=r})}buildOrUpdateScales(){const a=this.options,t=a.scales,c=this.scales,r=Object.keys(c).reduce((i,s)=>(i[s]=!1,i),{});let n=[];t&&(n=n.concat(Object.keys(t).map(i=>{const s=t[i],l=kn(i,s),f=l==="r",u=l==="x";return{options:s,dposition:f?"chartArea":u?"bottom":"left",dtype:f?"radialLinear":u?"category":"linear"}}))),p2(n,i=>{const s=i.options,l=s.id,f=kn(l,s),u=q1(s.type,i.dtype);(s.position===void 0||Vf(s.position,f)!==Vf(i.dposition))&&(s.position=i.dposition),r[l]=!0;let h=null;if(l in c&&c[l].type===u)h=c[l];else{const d=te.getScale(u);h=new d({id:l,type:u,ctx:this.ctx,chart:this}),c[h.id]=h}h.init(s,a)}),p2(r,(i,s)=>{i||delete c[s]}),p2(c,i=>{P3.configure(this,i,i.options),P3.addBox(this,i)})}_updateMetasets(){const a=this._metasets,t=this.data.datasets.length,c=a.length;if(a.sort((r,n)=>r.index-n.index),c>t){for(let r=t;r<c;++r)this._destroyDatasetMeta(r);a.splice(t,c-t)}this._sortedMetasets=a.slice(0).sort(wf("order","index"))}_removeUnreferencedMetasets(){const{_metasets:a,data:{datasets:t}}=this;a.length>t.length&&delete this._stacks,a.forEach((c,r)=>{t.filter(n=>n===c._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const a=[],t=this.data.datasets;let c,r;for(this._removeUnreferencedMetasets(),c=0,r=t.length;c<r;c++){const n=t[c];let i=this.getDatasetMeta(c);const s=n.type||this.config.type;if(i.type&&i.type!==s&&(this._destroyDatasetMeta(c),i=this.getDatasetMeta(c)),i.type=s,i.indexAxis=n.indexAxis||_n(s,this.options),i.order=n.order||0,i.index=c,i.label=""+n.label,i.visible=this.isDatasetVisible(c),i.controller)i.controller.updateIndex(c),i.controller.linkScales();else{const l=te.getController(s),{datasetElementType:f,dataElementType:u}=P2.datasets[s];Object.assign(l,{dataElementType:te.getElement(u),datasetElementType:f&&te.getElement(f)}),i.controller=new l(this,c),a.push(i.controller)}}return this._updateMetasets(),a}_resetElements(){p2(this.data.datasets,(a,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(a){const t=this.config;t.update();const c=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!c.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:a,cancelable:!0})===!1)return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let f=0,u=this.data.datasets.length;f<u;f++){const{controller:h}=this.getDatasetMeta(f),d=!r&&n.indexOf(h)===-1;h.buildOrUpdateElements(d),i=Math.max(+h.getMaxOverflow(),i)}i=this._minPadding=c.layout.autoPadding?i:0,this._updateLayout(i),r||p2(n,f=>{f.reset()}),this._updateDatasets(a),this.notifyPlugins("afterUpdate",{mode:a}),this._layers.sort(wf("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){p2(this.scales,a=>{P3.removeBox(this,a)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const a=this.options,t=new Set(Object.keys(this._listeners)),c=new Set(a.events);(!Bl(t,c)||!!this._responsiveListeners!==a.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:a}=this,t=this._getUniformDataChanges()||[];for(const{method:c,start:r,count:n}of t){const i=c==="_removeElements"?-n:n;Sz1(a,r,i)}}_getUniformDataChanges(){const a=this._dataChanges;if(!a||!a.length)return;this._dataChanges=[];const t=this.data.datasets.length,c=n=>new Set(a.filter(i=>i[0]===n).map((i,s)=>s+","+i.splice(1).join(","))),r=c(0);for(let n=1;n<t;n++)if(!Bl(r,c(n)))return;return Array.from(r).map(n=>n.split(",")).map(n=>({method:n[1],start:+n[2],count:+n[3]}))}_updateLayout(a){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;P3.update(this,this.width,this.height,a);const t=this.chartArea,c=t.width<=0||t.height<=0;this._layers=[],p2(this.boxes,r=>{c&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,n)=>{r._idx=n}),this.notifyPlugins("afterLayout")}_updateDatasets(a){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:a,cancelable:!0})!==!1){for(let t=0,c=this.data.datasets.length;t<c;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,c=this.data.datasets.length;t<c;++t)this._updateDataset(t,E0(a)?a({datasetIndex:t}):a);this.notifyPlugins("afterDatasetsUpdate",{mode:a})}}_updateDataset(a,t){const c=this.getDatasetMeta(a),r={meta:c,index:a,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(c.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ve.has(this)?this.attached&&!Ve.running(this)&&Ve.start(this):(this.draw(),Lf({chart:this})))}draw(){let a;if(this._resizeBeforeDraw){const{width:c,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(c,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(a=0;a<t.length&&t[a].z<=0;++a)t[a].draw(this.chartArea);for(this._drawDatasets();a<t.length;++a)t[a].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(a){const t=this._sortedMetasets,c=[];let r,n;for(r=0,n=t.length;r<n;++r){const i=t[r];(!a||i.visible)&&c.push(i)}return c}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const a=this.getSortedVisibleDatasetMetas();for(let t=a.length-1;t>=0;--t)this._drawDataset(a[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(a){const t=this.ctx,c=a._clip,r=!c.disabled,n=Tz1(a,this.chartArea),i={meta:a,index:a.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(r&&Tc(t,{left:c.left===!1?0:n.left-c.left,right:c.right===!1?this.width:n.right+c.right,top:c.top===!1?0:n.top-c.top,bottom:c.bottom===!1?this.height:n.bottom+c.bottom}),a.controller.draw(),r&&Ec(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(a){return De(a,this.chartArea,this._minPadding)}getElementsAtEventForMode(a,t,c,r){const n=kC1.modes[t];return typeof n=="function"?n(this,a,c,r):[]}getDatasetMeta(a){const t=this.data.datasets[a],c=this._metasets;let r=c.filter(n=>n&&n._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:a,_dataset:t,_parsed:[],_sorted:!1},c.push(r)),r}getContext(){return this.$context||(this.$context=R0(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(a){const t=this.data.datasets[a];if(!t)return!1;const c=this.getDatasetMeta(a);return typeof c.hidden=="boolean"?!c.hidden:!t.hidden}setDatasetVisibility(a,t){const c=this.getDatasetMeta(a);c.hidden=!t}toggleDataVisibility(a){this._hiddenIndices[a]=!this._hiddenIndices[a]}getDataVisibility(a){return!this._hiddenIndices[a]}_updateVisibility(a,t,c){const r=c?"show":"hide",n=this.getDatasetMeta(a),i=n.controller._resolveAnimations(void 0,r);Q5(t)?(n.data[t].hidden=!c,this.update()):(this.setDatasetVisibility(a,c),i.update(n,{visible:c}),this.update(s=>s.datasetIndex===a?r:void 0))}hide(a,t){this._updateVisibility(a,t,!1)}show(a,t){this._updateVisibility(a,t,!0)}_destroyDatasetMeta(a){const t=this._metasets[a];t&&t.controller&&t.controller._destroy(),delete this._metasets[a]}_stop(){let a,t;for(this.stop(),Ve.remove(this),a=0,t=this.data.datasets.length;a<t;++a)this._destroyDatasetMeta(a)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:a,ctx:t}=this;this._stop(),this.config.clearCache(),a&&(this.unbindEvents(),ql(a,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete qt[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...a){return this.canvas.toDataURL(...a)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const a=this._listeners,t=this.platform,c=(n,i)=>{t.addEventListener(this,n,i),a[n]=i},r=(n,i,s)=>{n.offsetX=i,n.offsetY=s,this._eventHandler(n)};p2(this.options.events,n=>c(n,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const a=this._responsiveListeners,t=this.platform,c=(l,f)=>{t.addEventListener(this,l,f),a[l]=f},r=(l,f)=>{a[l]&&(t.removeEventListener(this,l,f),delete a[l])},n=(l,f)=>{this.canvas&&this.resize(l,f)};let i;const s=()=>{r("attach",s),this.attached=!0,this.resize(),c("resize",n),c("detach",i)};i=()=>{this.attached=!1,r("resize",n),this._stop(),this._resize(0,0),c("attach",s)},t.isAttached(this.canvas)?s():i()}unbindEvents(){p2(this._listeners,(a,t)=>{this.platform.removeEventListener(this,t,a)}),this._listeners={},p2(this._responsiveListeners,(a,t)=>{this.platform.removeEventListener(this,t,a)}),this._responsiveListeners=void 0}updateHoverStyle(a,t,c){const r=c?"set":"remove";let n,i,s,l;for(t==="dataset"&&(n=this.getDatasetMeta(a[0].datasetIndex),n.controller["_"+r+"DatasetHoverStyle"]()),s=0,l=a.length;s<l;++s){i=a[s];const f=i&&this.getDatasetMeta(i.datasetIndex).controller;f&&f[r+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(a){const t=this._active||[],c=a.map(({datasetIndex:n,index:i})=>{const s=this.getDatasetMeta(n);if(!s)throw new Error("No dataset found at index "+n);return{datasetIndex:n,element:s.data[i],index:i}});!C7(c,t)&&(this._active=c,this._lastEvent=null,this._updateHoverStyles(c,t))}notifyPlugins(a,t,c){return this._plugins.notify(this,a,t,c)}isPluginEnabled(a){return this._plugins._cache.filter(t=>t.plugin.id===a).length===1}_updateHoverStyles(a,t,c){const r=this.options.hover,n=(l,f)=>l.filter(u=>!f.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),i=n(t,a),s=c?a:n(a,t);i.length&&this.updateHoverStyle(i,r.mode,!1),s.length&&r.mode&&this.updateHoverStyle(s,r.mode,!0)}_eventHandler(a,t){const c={event:a,replay:t,cancelable:!0,inChartArea:this.isPointInArea(a)},r=i=>(i.options.events||this.options.events).includes(a.native.type);if(this.notifyPlugins("beforeEvent",c,r)===!1)return;const n=this._handleEvent(a,t,c.inChartArea);return c.cancelable=!1,this.notifyPlugins("afterEvent",c,r),(n||c.changed)&&this.render(),this}_handleEvent(a,t,c){const{_active:r=[],options:n}=this,i=t,s=this._getActiveElements(a,r,c,i),l=Ig1(a),f=Nz1(a,this._lastEvent,c,l);c&&(this._lastEvent=null,H2(n.onHover,[a,s,this],this),l&&H2(n.onClick,[a,s,this],this));const u=!C7(s,r);return(u||t)&&(this._active=s,this._updateHoverStyles(s,r,t)),this._lastEvent=f,u}_getActiveElements(a,t,c,r){if(a.type==="mouseout")return[];if(!c)return t;const n=this.options.hover;return this.getElementsAtEventForMode(a,n.mode,n,r)}}l1(Ae,"defaults",P2),l1(Ae,"instances",qt),l1(Ae,"overrides",M6),l1(Ae,"registry",te),l1(Ae,"version",_z1),l1(Ae,"getChart",_f);function kf(){return p2(Ae.instances,e=>e._plugins.invalidate())}function Ez1(e,a,t){const{startAngle:c,pixelMargin:r,x:n,y:i,outerRadius:s,innerRadius:l}=a;let f=r/s;e.beginPath(),e.arc(n,i,s,c-f,t+f),l>r?(f=r/l,e.arc(n,i,l,t+f,c-f,!0)):e.arc(n,i,r,t+t3,c-t3),e.closePath(),e.clip()}function Fz1(e){return zs(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Dz1(e,a,t,c){const r=Fz1(e.options.borderRadius),n=(t-a)/2,i=Math.min(n,c*a/2),s=l=>{const f=(t-Math.min(n,l))*c/2;return H3(l,0,Math.min(n,f))};return{outerStart:s(r.outerStart),outerEnd:s(r.outerEnd),innerStart:H3(r.innerStart,0,i),innerEnd:H3(r.innerEnd,0,i)}}function j6(e,a,t,c){return{x:t+e*Math.cos(a),y:c+e*Math.sin(a)}}function V7(e,a,t,c,r,n){const{x:i,y:s,startAngle:l,pixelMargin:f,innerRadius:u}=a,h=Math.max(a.outerRadius+c+t-f,0),d=u>0?u+c+t+f:0;let m=0;const p=r-l;if(c){const F=u>0?u-c:0,O=h>0?h-c:0,X=(F+O)/2,f1=X!==0?p*X/(X+c):p;m=(p-f1)/2}const v=Math.max(.001,p*h-t/S2)/h,g=(p-v)/2,x=l+g+m,z=r-g-m,{outerStart:C,outerEnd:y,innerStart:b,innerEnd:w}=Dz1(a,d,h,z-x),H=h-C,T=h-y,A=x+C/H,U=z-y/T,D=d+b,k=d+w,j=x+b/D,c1=z-w/k;if(e.beginPath(),n){const F=(A+U)/2;if(e.arc(i,s,h,A,F),e.arc(i,s,h,F,U),y>0){const J=j6(T,U,i,s);e.arc(J.x,J.y,y,U,z+t3)}const O=j6(k,z,i,s);if(e.lineTo(O.x,O.y),w>0){const J=j6(k,c1,i,s);e.arc(J.x,J.y,w,z+t3,c1+Math.PI)}const X=(z-w/d+(x+b/d))/2;if(e.arc(i,s,d,z-w/d,X,!0),e.arc(i,s,d,X,x+b/d,!0),b>0){const J=j6(D,j,i,s);e.arc(J.x,J.y,b,j+Math.PI,x-t3)}const f1=j6(H,x,i,s);if(e.lineTo(f1.x,f1.y),C>0){const J=j6(H,A,i,s);e.arc(J.x,J.y,C,x-t3,A)}}else{e.moveTo(i,s);const F=Math.cos(A)*h+i,O=Math.sin(A)*h+s;e.lineTo(F,O);const X=Math.cos(U)*h+i,f1=Math.sin(U)*h+s;e.lineTo(X,f1)}e.closePath()}function Pz1(e,a,t,c,r){const{fullCircles:n,startAngle:i,circumference:s}=a;let l=a.endAngle;if(n){V7(e,a,t,c,l,r);for(let f=0;f<n;++f)e.fill();isNaN(s)||(l=i+(s%A2||A2))}return V7(e,a,t,c,l,r),e.fill(),l}function Bz1(e,a,t,c,r){const{fullCircles:n,startAngle:i,circumference:s,options:l}=a,{borderWidth:f,borderJoinStyle:u,borderDash:h,borderDashOffset:d}=l,m=l.borderAlign==="inner";if(!f)return;e.setLineDash(h||[]),e.lineDashOffset=d,m?(e.lineWidth=f*2,e.lineJoin=u||"round"):(e.lineWidth=f,e.lineJoin=u||"bevel");let p=a.endAngle;if(n){V7(e,a,t,c,p,r);for(let v=0;v<n;++v)e.stroke();isNaN(s)||(p=i+(s%A2||A2))}m&&Ez1(e,a,p),n||(V7(e,a,t,c,p,r),e.stroke())}class a5 extends q4{constructor(t){super();l1(this,"circumference");l1(this,"endAngle");l1(this,"fullCircles");l1(this,"innerRadius");l1(this,"outerRadius");l1(this,"pixelMargin");l1(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,c,r){const n=this.getProps(["x","y"],r),{angle:i,distance:s}=CV(n,{x:t,y:c}),{startAngle:l,endAngle:f,innerRadius:u,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),m=(this.options.spacing+this.options.borderWidth)/2,p=q1(d,f-l),v=K5(i,l,f)&&l!==f,g=p>=A2||v,x=Ee(s,u+m,h+m);return g&&x}getCenterPoint(t){const{x:c,y:r,startAngle:n,endAngle:i,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:f,spacing:u}=this.options,h=(n+i)/2,d=(s+l+u+f)/2;return{x:c+Math.cos(h)*d,y:r+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:c,circumference:r}=this,n=(c.offset||0)/4,i=(c.spacing||0)/2,s=c.circular;if(this.pixelMargin=c.borderAlign==="inner"?.33:0,this.fullCircles=r>A2?Math.floor(r/A2):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*n,Math.sin(l)*n);const f=1-Math.sin(Math.min(S2,r||0)),u=n*f;t.fillStyle=c.backgroundColor,t.strokeStyle=c.borderColor,Pz1(t,this,u,i,s),Bz1(t,this,u,i,s),t.restore()}}l1(a5,"id","arc"),l1(a5,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),l1(a5,"defaultRoutes",{backgroundColor:"backgroundColor"}),l1(a5,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"});function KV(e,a,t=a){e.lineCap=q1(t.borderCapStyle,a.borderCapStyle),e.setLineDash(q1(t.borderDash,a.borderDash)),e.lineDashOffset=q1(t.borderDashOffset,a.borderDashOffset),e.lineJoin=q1(t.borderJoinStyle,a.borderJoinStyle),e.lineWidth=q1(t.borderWidth,a.borderWidth),e.strokeStyle=q1(t.borderColor,a.borderColor)}function Oz1(e,a,t){e.lineTo(t.x,t.y)}function Rz1(e){return e.stepped?lx1:e.tension||e.cubicInterpolationMode==="monotone"?fx1:Oz1}function JV(e,a,t={}){const c=e.length,{start:r=0,end:n=c-1}=t,{start:i,end:s}=a,l=Math.max(r,i),f=Math.min(n,s),u=r<i&&n<i||r>s&&n>s;return{count:c,start:l,loop:a.loop,ilen:f<l&&!u?c+f-l:f-l}}function Iz1(e,a,t,c){const{points:r,options:n}=a,{count:i,start:s,loop:l,ilen:f}=JV(r,t,c),u=Rz1(n);let{move:h=!0,reverse:d}=c||{},m,p,v;for(m=0;m<=f;++m)p=r[(s+(d?f-m:m))%i],!p.skip&&(h?(e.moveTo(p.x,p.y),h=!1):u(e,v,p,d,n.stepped),v=p);return l&&(p=r[(s+(d?f:0))%i],u(e,v,p,d,n.stepped)),!!l}function $z1(e,a,t,c){const r=a.points,{count:n,start:i,ilen:s}=JV(r,t,c),{move:l=!0,reverse:f}=c||{};let u=0,h=0,d,m,p,v,g,x;const z=y=>(i+(f?s-y:y))%n,C=()=>{v!==g&&(e.lineTo(u,g),e.lineTo(u,v),e.lineTo(u,x))};for(l&&(m=r[z(0)],e.moveTo(m.x,m.y)),d=0;d<=s;++d){if(m=r[z(d)],m.skip)continue;const y=m.x,b=m.y,w=y|0;w===p?(b<v?v=b:b>g&&(g=b),u=(h*u+y)/++h):(C(),e.lineTo(y,b),p=w,h=0,v=g=b),x=b}C()}function An(e){const a=e.options,t=a.borderDash&&a.borderDash.length;return!e._decimated&&!e._loop&&!a.tension&&a.cubicInterpolationMode!=="monotone"&&!a.stepped&&!t?$z1:Iz1}function Uz1(e){return e.stepped?$x1:e.tension||e.cubicInterpolationMode==="monotone"?Ux1:t6}function Wz1(e,a,t,c){let r=a._path;r||(r=a._path=new Path2D,a.path(r,t,c)&&r.closePath()),KV(e,a.options),e.stroke(r)}function Yz1(e,a,t,c){const{segments:r,options:n}=a,i=An(a);for(const s of r)KV(e,n,s.style),e.beginPath(),i(e,a,s,{start:t,end:t+c-1})&&e.closePath(),e.stroke()}const jz1=typeof Path2D=="function";function qz1(e,a,t,c){jz1&&!a.options.segment?Wz1(e,a,t,c):Yz1(e,a,t,c)}class p0 extends q4{constructor(a){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,a&&Object.assign(this,a)}updateControlPoints(a,t){const c=this.options;if((c.tension||c.cubicInterpolationMode==="monotone")&&!c.stepped&&!this._pointsUpdated){const r=c.spanGaps?this._loop:this._fullLoop;Ex1(this._points,c,a,r,t),this._pointsUpdated=!0}}set points(a){this._points=a,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Xx1(this,this.options.segment))}first(){const a=this.segments,t=this.points;return a.length&&t[a[0].start]}last(){const a=this.segments,t=this.points,c=a.length;return c&&t[a[c-1].end]}interpolate(a,t){const c=this.options,r=a[t],n=this.points,i=OV(this,{property:t,start:r,end:r});if(!i.length)return;const s=[],l=Uz1(c);let f,u;for(f=0,u=i.length;f<u;++f){const{start:h,end:d}=i[f],m=n[h],p=n[d];if(m===p){s.push(m);continue}const v=Math.abs((r-m[t])/(p[t]-m[t])),g=l(m,p,v,c.stepped);g[t]=a[t],s.push(g)}return s.length===1?s[0]:s}pathSegment(a,t,c){return An(this)(a,this,t,c)}path(a,t,c){const r=this.segments,n=An(this);let i=this._loop;t=t||0,c=c||this.points.length-t;for(const s of r)i&=n(a,this,s,{start:t,end:t+c-1});return!!i}draw(a,t,c,r){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(a.save(),qz1(a,this,c,r),a.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}l1(p0,"id","line"),l1(p0,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),l1(p0,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),l1(p0,"descriptors",{_scriptable:!0,_indexable:a=>a!=="borderDash"&&a!=="fill"});function Af(e,a,t,c){const r=e.options,{[t]:n}=e.getProps([t],c);return Math.abs(a-n)<r.radius+r.hitRadius}class Gt extends q4{constructor(t){super();l1(this,"parsed");l1(this,"skip");l1(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,c,r){const n=this.options,{x:i,y:s}=this.getProps(["x","y"],r);return Math.pow(t-i,2)+Math.pow(c-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,c){return Af(this,t,"x",c)}inYRange(t,c){return Af(this,t,"y",c)}getCenterPoint(t){const{x:c,y:r}=this.getProps(["x","y"],t);return{x:c,y:r}}size(t){t=t||this.options||{};let c=t.radius||0;c=Math.max(c,c&&t.hoverRadius||0);const r=c&&t.borderWidth||0;return(c+r)*2}draw(t,c){const r=this.options;this.skip||r.radius<.1||!De(this,c,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,wn(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}l1(Gt,"id","point"),l1(Gt,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),l1(Gt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function ew(e,a){const{x:t,y:c,base:r,width:n,height:i}=e.getProps(["x","y","base","width","height"],a);let s,l,f,u,h;return e.horizontal?(h=i/2,s=Math.min(t,r),l=Math.max(t,r),f=c-h,u=c+h):(h=n/2,s=t-h,l=t+h,f=Math.min(c,r),u=Math.max(c,r)),{left:s,top:f,right:l,bottom:u}}function v0(e,a,t,c){return e?0:H3(a,t,c)}function Gz1(e,a,t){const c=e.options.borderWidth,r=e.borderSkipped,n=_V(c);return{t:v0(r.top,n.top,0,t),r:v0(r.right,n.right,0,a),b:v0(r.bottom,n.bottom,0,t),l:v0(r.left,n.left,0,a)}}function Xz1(e,a,t){const{enableBorderRadius:c}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,n=p6(r),i=Math.min(a,t),s=e.borderSkipped,l=c||a2(r);return{topLeft:v0(!l||s.top||s.left,n.topLeft,0,i),topRight:v0(!l||s.top||s.right,n.topRight,0,i),bottomLeft:v0(!l||s.bottom||s.left,n.bottomLeft,0,i),bottomRight:v0(!l||s.bottom||s.right,n.bottomRight,0,i)}}function Zz1(e){const a=ew(e),t=a.right-a.left,c=a.bottom-a.top,r=Gz1(e,t/2,c/2),n=Xz1(e,t/2,c/2);return{outer:{x:a.left,y:a.top,w:t,h:c,radius:n},inner:{x:a.left+r.l,y:a.top+r.t,w:t-r.l-r.r,h:c-r.t-r.b,radius:{topLeft:Math.max(0,n.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,n.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,n.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,n.bottomRight-Math.max(r.b,r.r))}}}}function Vr(e,a,t,c){const r=a===null,n=t===null,s=e&&!(r&&n)&&ew(e,c);return s&&(r||Ee(a,s.left,s.right))&&(n||Ee(t,s.top,s.bottom))}function Qz1(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Kz1(e,a){e.rect(a.x,a.y,a.w,a.h)}function wr(e,a,t={}){const c=e.x!==t.x?-a:0,r=e.y!==t.y?-a:0,n=(e.x+e.w!==t.x+t.w?a:0)-c,i=(e.y+e.h!==t.y+t.h?a:0)-r;return{x:e.x+c,y:e.y+r,w:e.w+n,h:e.h+i,radius:e.radius}}class Xt extends q4{constructor(a){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,a&&Object.assign(this,a)}draw(a){const{inflateAmount:t,options:{borderColor:c,backgroundColor:r}}=this,{inner:n,outer:i}=Zz1(this),s=Qz1(i.radius)?J5:Kz1;a.save(),(i.w!==n.w||i.h!==n.h)&&(a.beginPath(),s(a,wr(i,t,n)),a.clip(),s(a,wr(n,-t,i)),a.fillStyle=c,a.fill("evenodd")),a.beginPath(),s(a,wr(n,t)),a.fillStyle=r,a.fill(),a.restore()}inRange(a,t,c){return Vr(this,a,t,c)}inXRange(a,t){return Vr(this,a,null,t)}inYRange(a,t){return Vr(this,null,a,t)}getCenterPoint(a){const{x:t,y:c,base:r,horizontal:n}=this.getProps(["x","y","base","horizontal"],a);return{x:n?(t+r)/2:t,y:n?c:(c+r)/2}}getRange(a){return a==="x"?this.width/2:this.height/2}}l1(Xt,"id","bar"),l1(Xt,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),l1(Xt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Jz1=Object.freeze({__proto__:null,ArcElement:a5,BarElement:Xt,LineElement:p0,PointElement:Gt});const Sn=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Sf=Sn.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function aw(e){return Sn[e%Sn.length]}function tw(e){return Sf[e%Sf.length]}function eM1(e,a){return e.borderColor=aw(a),e.backgroundColor=tw(a),++a}function aM1(e,a){return e.backgroundColor=e.data.map(()=>aw(a++)),a}function tM1(e,a){return e.backgroundColor=e.data.map(()=>tw(a++)),a}function cM1(e){let a=0;return(t,c)=>{const r=e.getDatasetMeta(c).controller;r instanceof f6?a=aM1(t,a):r instanceof y5?a=tM1(t,a):r&&(a=eM1(t,a))}}function Nf(e){let a;for(a in e)if(e[a].borderColor||e[a].backgroundColor)return!0;return!1}function rM1(e){return e&&(e.borderColor||e.backgroundColor)}function nM1(){return P2.borderColor!=="rgba(0,0,0,0.1)"||P2.backgroundColor!=="rgba(0,0,0,0.1)"}var iM1={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,a,t){if(!t.enabled)return;const{data:{datasets:c},options:r}=e.config,{elements:n}=r,i=Nf(c)||rM1(r)||n&&Nf(n)||nM1();if(!t.forceOverride&&i)return;const s=cM1(e);c.forEach(s)}};function sM1(e,a,t,c,r){const n=r.samples||c;if(n>=t)return e.slice(a,a+t);const i=[],s=(t-2)/(n-2);let l=0;const f=a+t-1;let u=a,h,d,m,p,v;for(i[l++]=e[u],h=0;h<n-2;h++){let g=0,x=0,z;const C=Math.floor((h+1)*s)+1+a,y=Math.min(Math.floor((h+2)*s)+1,t)+a,b=y-C;for(z=C;z<y;z++)g+=e[z].x,x+=e[z].y;g/=b,x/=b;const w=Math.floor(h*s)+1+a,H=Math.min(Math.floor((h+1)*s)+1,t)+a,{x:T,y:A}=e[u];for(m=p=-1,z=w;z<H;z++)p=.5*Math.abs((T-g)*(e[z].y-A)-(T-e[z].x)*(x-A)),p>m&&(m=p,d=e[z],v=z);i[l++]=d,u=v}return i[l++]=e[f],i}function oM1(e,a,t,c){let r=0,n=0,i,s,l,f,u,h,d,m,p,v;const g=[],x=a+t-1,z=e[a].x,y=e[x].x-z;for(i=a;i<a+t;++i){s=e[i],l=(s.x-z)/y*c,f=s.y;const b=l|0;if(b===u)f<p?(p=f,h=i):f>v&&(v=f,d=i),r=(n*r+s.x)/++n;else{const w=i-1;if(!s2(h)&&!s2(d)){const H=Math.min(h,d),T=Math.max(h,d);H!==m&&H!==w&&g.push({...e[H],x:r}),T!==m&&T!==w&&g.push({...e[T],x:r})}i>0&&w!==m&&g.push(e[w]),g.push(s),u=b,n=0,p=v=f,h=d=m=i}}return g}function cw(e){if(e._decimated){const a=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:a})}}function Tf(e){e.data.datasets.forEach(a=>{cw(a)})}function lM1(e,a){const t=a.length;let c=0,r;const{iScale:n}=e,{min:i,max:s,minDefined:l,maxDefined:f}=n.getUserBounds();return l&&(c=H3(Fe(a,n.axis,i).lo,0,t-1)),f?r=H3(Fe(a,n.axis,s).hi+1,c,t)-c:r=t-c,{start:c,count:r}}var fM1={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,a,t)=>{if(!t.enabled){Tf(e);return}const c=e.width;e.data.datasets.forEach((r,n)=>{const{_data:i,indexAxis:s}=r,l=e.getDatasetMeta(n),f=i||r.data;if(J8([s,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:h,count:d}=lM1(l,f);const m=t.threshold||4*c;if(d<=m){cw(r);return}s2(i)&&(r._data=f,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let p;switch(t.algorithm){case"lttb":p=sM1(f,h,d,c,t);break;case"min-max":p=oM1(f,h,d,c);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}r._decimated=p})},destroy(e){Tf(e)}};function uM1(e,a,t){const c=e.segments,r=e.points,n=a.points,i=[];for(const s of c){let{start:l,end:f}=s;f=Ls(l,f,r);const u=Nn(t,r[l],r[f],s.loop);if(!a.segments){i.push({source:s,target:u,start:r[l],end:r[f]});continue}const h=OV(a,u);for(const d of h){const m=Nn(t,n[d.start],n[d.end],d.loop),p=BV(s,r,m);for(const v of p)i.push({source:v,target:d,start:{[t]:Ef(u,m,"start",Math.max)},end:{[t]:Ef(u,m,"end",Math.min)}})}}return i}function Nn(e,a,t,c){if(c)return;let r=a[e],n=t[e];return e==="angle"&&(r=o4(r),n=o4(n)),{property:e,start:r,end:n}}function hM1(e,a){const{x:t=null,y:c=null}=e||{},r=a.points,n=[];return a.segments.forEach(({start:i,end:s})=>{s=Ls(i,s,r);const l=r[i],f=r[s];c!==null?(n.push({x:l.x,y:c}),n.push({x:f.x,y:c})):t!==null&&(n.push({x:t,y:l.y}),n.push({x:t,y:f.y}))}),n}function Ls(e,a,t){for(;a>e;a--){const c=t[a];if(!isNaN(c.x)&&!isNaN(c.y))break}return a}function Ef(e,a,t,c){return e&&a?c(e[t],a[t]):e?e[t]:a?a[t]:0}function rw(e,a){let t=[],c=!1;return _2(e)?(c=!0,t=e):t=hM1(e,a),t.length?new p0({points:t,options:{tension:0},_loop:c,_fullLoop:c}):null}function Ff(e){return e&&e.fill!==!1}function dM1(e,a,t){let r=e[a].fill;const n=[a];let i;if(!t)return r;for(;r!==!1&&n.indexOf(r)===-1;){if(!j2(r))return r;if(i=e[r],!i)return!1;if(i.visible)return r;n.push(r),r=i.fill}return!1}function mM1(e,a,t){const c=xM1(e);if(a2(c))return isNaN(c.value)?!1:c;let r=parseFloat(c);return j2(r)&&Math.floor(r)===r?pM1(c[0],a,r,t):["origin","start","end","stack","shape"].indexOf(c)>=0&&c}function pM1(e,a,t,c){return(e==="-"||e==="+")&&(t=a+t),t===a||t<0||t>=c?!1:t}function vM1(e,a){let t=null;return e==="start"?t=a.bottom:e==="end"?t=a.top:a2(e)?t=a.getPixelForValue(e.value):a.getBasePixel&&(t=a.getBasePixel()),t}function gM1(e,a,t){let c;return e==="start"?c=t:e==="end"?c=a.options.reverse?a.min:a.max:a2(e)?c=e.value:c=a.getBaseValue(),c}function xM1(e){const a=e.options,t=a.fill;let c=q1(t&&t.target,t);return c===void 0&&(c=!!a.backgroundColor),c===!1||c===null?!1:c===!0?"origin":c}function CM1(e){const{scale:a,index:t,line:c}=e,r=[],n=c.segments,i=c.points,s=zM1(a,t);s.push(rw({x:null,y:a.bottom},c));for(let l=0;l<n.length;l++){const f=n[l];for(let u=f.start;u<=f.end;u++)MM1(r,i[u],s)}return new p0({points:r,options:{}})}function zM1(e,a){const t=[],c=e.getMatchingVisibleMetas("line");for(let r=0;r<c.length;r++){const n=c[r];if(n.index===a)break;n.hidden||t.unshift(n.dataset)}return t}function MM1(e,a,t){const c=[];for(let r=0;r<t.length;r++){const n=t[r],{first:i,last:s,point:l}=HM1(n,a,"x");if(!(!l||i&&s)){if(i)c.unshift(l);else if(e.push(l),!s)break}}e.push(...c)}function HM1(e,a,t){const c=e.interpolate(a,t);if(!c)return{};const r=c[t],n=e.segments,i=e.points;let s=!1,l=!1;for(let f=0;f<n.length;f++){const u=n[f],h=i[u.start][t],d=i[u.end][t];if(Ee(r,h,d)){s=r===h,l=r===d;break}}return{first:s,last:l,point:c}}class nw{constructor(a){this.x=a.x,this.y=a.y,this.radius=a.radius}pathSegment(a,t,c){const{x:r,y:n,radius:i}=this;return t=t||{start:0,end:A2},a.arc(r,n,i,t.end,t.start,!0),!c.bounds}interpolate(a){const{x:t,y:c,radius:r}=this,n=a.angle;return{x:t+Math.cos(n)*r,y:c+Math.sin(n)*r,angle:n}}}function yM1(e){const{chart:a,fill:t,line:c}=e;if(j2(t))return bM1(a,t);if(t==="stack")return CM1(e);if(t==="shape")return!0;const r=VM1(e);return r instanceof nw?r:rw(r,c)}function bM1(e,a){const t=e.getDatasetMeta(a);return t&&e.isDatasetVisible(a)?t.dataset:null}function VM1(e){return(e.scale||{}).getPointPositionForValue?LM1(e):wM1(e)}function wM1(e){const{scale:a={},fill:t}=e,c=vM1(t,a);if(j2(c)){const r=a.isHorizontal();return{x:r?c:null,y:r?null:c}}return null}function LM1(e){const{scale:a,fill:t}=e,c=a.options,r=a.getLabels().length,n=c.reverse?a.max:a.min,i=gM1(t,a,n),s=[];if(c.grid.circular){const l=a.getPointPositionForValue(0,n);return new nw({x:l.x,y:l.y,radius:a.getDistanceFromCenterForValue(i)})}for(let l=0;l<r;++l)s.push(a.getPointPositionForValue(l,i));return s}function Lr(e,a,t){const c=yM1(a),{line:r,scale:n,axis:i}=a,s=r.options,l=s.fill,f=s.backgroundColor,{above:u=f,below:h=f}=l||{};c&&r.points.length&&(Tc(e,t),_M1(e,{line:r,target:c,above:u,below:h,area:t,scale:n,axis:i}),Ec(e))}function _M1(e,a){const{line:t,target:c,above:r,below:n,area:i,scale:s}=a,l=t._loop?"angle":a.axis;e.save(),l==="x"&&n!==r&&(Df(e,c,i.top),Pf(e,{line:t,target:c,color:r,scale:s,property:l}),e.restore(),e.save(),Df(e,c,i.bottom)),Pf(e,{line:t,target:c,color:n,scale:s,property:l}),e.restore()}function Df(e,a,t){const{segments:c,points:r}=a;let n=!0,i=!1;e.beginPath();for(const s of c){const{start:l,end:f}=s,u=r[l],h=r[Ls(l,f,r)];n?(e.moveTo(u.x,u.y),n=!1):(e.lineTo(u.x,t),e.lineTo(u.x,u.y)),i=!!a.pathSegment(e,s,{move:i}),i?e.closePath():e.lineTo(h.x,t)}e.lineTo(a.first().x,t),e.closePath(),e.clip()}function Pf(e,a){const{line:t,target:c,property:r,color:n,scale:i}=a,s=uM1(t,c,r);for(const{source:l,target:f,start:u,end:h}of s){const{style:{backgroundColor:d=n}={}}=l,m=c!==!0;e.save(),e.fillStyle=d,kM1(e,i,m&&Nn(r,u,h)),e.beginPath();const p=!!t.pathSegment(e,l);let v;if(m){p?e.closePath():Bf(e,c,h,r);const g=!!c.pathSegment(e,f,{move:p,reverse:!0});v=p&&g,v||Bf(e,c,u,r)}e.closePath(),e.fill(v?"evenodd":"nonzero"),e.restore()}}function kM1(e,a,t){const{top:c,bottom:r}=a.chart.chartArea,{property:n,start:i,end:s}=t||{};n==="x"&&(e.beginPath(),e.rect(i,c,s-i,r-c),e.clip())}function Bf(e,a,t,c){const r=a.interpolate(t,c);r&&e.lineTo(r.x,r.y)}var AM1={id:"filler",afterDatasetsUpdate(e,a,t){const c=(e.data.datasets||[]).length,r=[];let n,i,s,l;for(i=0;i<c;++i)n=e.getDatasetMeta(i),s=n.dataset,l=null,s&&s.options&&s instanceof p0&&(l={visible:e.isDatasetVisible(i),index:i,fill:mM1(s,i,c),chart:e,axis:n.controller.options.indexAxis,scale:n.vScale,line:s}),n.$filler=l,r.push(l);for(i=0;i<c;++i)l=r[i],!(!l||l.fill===!1)&&(l.fill=dM1(r,i,t.propagate))},beforeDraw(e,a,t){const c=t.drawTime==="beforeDraw",r=e.getSortedVisibleDatasetMetas(),n=e.chartArea;for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;s&&(s.line.updateControlPoints(n,s.axis),c&&s.fill&&Lr(e.ctx,s,n))}},beforeDatasetsDraw(e,a,t){if(t.drawTime!=="beforeDatasetsDraw")return;const c=e.getSortedVisibleDatasetMetas();for(let r=c.length-1;r>=0;--r){const n=c[r].$filler;Ff(n)&&Lr(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,a,t){const c=a.meta.$filler;!Ff(c)||t.drawTime!=="beforeDatasetDraw"||Lr(e.ctx,c,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Of=(e,a)=>{let{boxHeight:t=a,boxWidth:c=a}=e;return e.usePointStyle&&(t=Math.min(t,a),c=e.pointStyleWidth||Math.min(c,a)),{boxWidth:c,boxHeight:t,itemHeight:Math.max(a,t)}},SM1=(e,a)=>e!==null&&a!==null&&e.datasetIndex===a.datasetIndex&&e.index===a.index;class Rf extends q4{constructor(a){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=a.chart,this.options=a.options,this.ctx=a.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(a,t,c){this.maxWidth=a,this.maxHeight=t,this._margins=c,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 a=this.options.labels||{};let t=H2(a.generateLabels,[this.chart],this)||[];a.filter&&(t=t.filter(c=>a.filter(c,this.chart.data))),a.sort&&(t=t.sort((c,r)=>a.sort(c,r,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:a,ctx:t}=this;if(!a.display){this.width=this.height=0;return}const c=a.labels,r=m3(c.font),n=r.size,i=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Of(c,n);let f,u;t.font=r.string,this.isHorizontal()?(f=this.maxWidth,u=this._fitRows(i,n,s,l)+10):(u=this.maxHeight,f=this._fitCols(i,r,s,l)+10),this.width=Math.min(f,a.maxWidth||this.maxWidth),this.height=Math.min(u,a.maxHeight||this.maxHeight)}_fitRows(a,t,c,r){const{ctx:n,maxWidth:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],f=this.lineWidths=[0],u=r+s;let h=a;n.textAlign="left",n.textBaseline="middle";let d=-1,m=-u;return this.legendItems.forEach((p,v)=>{const g=c+t/2+n.measureText(p.text).width;(v===0||f[f.length-1]+g+2*s>i)&&(h+=u,f[f.length-(v>0?0:1)]=0,m+=u,d++),l[v]={left:0,top:m,row:d,width:g,height:r},f[f.length-1]+=g+s}),h}_fitCols(a,t,c,r){const{ctx:n,maxHeight:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],f=this.columnSizes=[],u=i-a;let h=s,d=0,m=0,p=0,v=0;return this.legendItems.forEach((g,x)=>{const{itemWidth:z,itemHeight:C}=NM1(c,t,n,g,r);x>0&&m+C+2*s>u&&(h+=d+s,f.push({width:d,height:m}),p+=d+s,v++,d=m=0),l[x]={left:p,top:m,col:v,width:z,height:C},d=Math.max(d,z),m+=C+s}),h+=d,f.push({width:d,height:m}),h}adjustHitBoxes(){if(!this.options.display)return;const a=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:c,labels:{padding:r},rtl:n}}=this,i=s8(n,this.left,this.width);if(this.isHorizontal()){let s=0,l=T3(c,this.left+r,this.right-this.lineWidths[s]);for(const f of t)s!==f.row&&(s=f.row,l=T3(c,this.left+r,this.right-this.lineWidths[s])),f.top+=this.top+a+r,f.left=i.leftForLtr(i.x(l),f.width),l+=f.width+r}else{let s=0,l=T3(c,this.top+a+r,this.bottom-this.columnSizes[s].height);for(const f of t)f.col!==s&&(s=f.col,l=T3(c,this.top+a+r,this.bottom-this.columnSizes[s].height)),f.top=l,f.left+=this.left+r,f.left=i.leftForLtr(i.x(f.left),f.width),l+=f.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const a=this.ctx;Tc(a,this),this._draw(),Ec(a)}}_draw(){const{options:a,columnSizes:t,lineWidths:c,ctx:r}=this,{align:n,labels:i}=a,s=P2.color,l=s8(a.rtl,this.left,this.width),f=m3(i.font),{padding:u}=i,h=f.size,d=h/2;let m;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=f.string;const{boxWidth:p,boxHeight:v,itemHeight:g}=Of(i,h),x=function(w,H,T){if(isNaN(p)||p<=0||isNaN(v)||v<0)return;r.save();const A=q1(T.lineWidth,1);if(r.fillStyle=q1(T.fillStyle,s),r.lineCap=q1(T.lineCap,"butt"),r.lineDashOffset=q1(T.lineDashOffset,0),r.lineJoin=q1(T.lineJoin,"miter"),r.lineWidth=A,r.strokeStyle=q1(T.strokeStyle,s),r.setLineDash(q1(T.lineDash,[])),i.usePointStyle){const U={radius:v*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:A},D=l.xPlus(w,p/2),k=H+d;LV(r,U,D,k,i.pointStyleWidth&&p)}else{const U=H+Math.max((h-v)/2,0),D=l.leftForLtr(w,p),k=p6(T.borderRadius);r.beginPath(),Object.values(k).some(j=>j!==0)?J5(r,{x:D,y:U,w:p,h:v,radius:k}):r.rect(D,U,p,v),r.fill(),A!==0&&r.stroke()}r.restore()},z=function(w,H,T){H6(r,T.text,w,H+g/2,f,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},C=this.isHorizontal(),y=this._computeTitleHeight();C?m={x:T3(n,this.left+u,this.right-c[0]),y:this.top+u+y,line:0}:m={x:this.left+u,y:T3(n,this.top+y+u,this.bottom-t[0].height),line:0},FV(this.ctx,a.textDirection);const b=g+u;this.legendItems.forEach((w,H)=>{r.strokeStyle=w.fontColor,r.fillStyle=w.fontColor;const T=r.measureText(w.text).width,A=l.textAlign(w.textAlign||(w.textAlign=i.textAlign)),U=p+d+T;let D=m.x,k=m.y;l.setWidth(this.width),C?H>0&&D+U+u>this.right&&(k=m.y+=b,m.line++,D=m.x=T3(n,this.left+u,this.right-c[m.line])):H>0&&k+b>this.bottom&&(D=m.x=D+t[m.line].width+u,m.line++,k=m.y=T3(n,this.top+y+u,this.bottom-t[m.line].height));const j=l.x(D);if(x(j,k,w),D=Kg1(A,D+p+d,C?D+U:this.right,a.rtl),z(l.x(D),k,w),C)m.x+=U+u;else if(typeof w.text!="string"){const c1=f.lineHeight;m.y+=iw(w,c1)+u}else m.y+=b}),DV(this.ctx,a.textDirection)}drawTitle(){const a=this.options,t=a.title,c=m3(t.font),r=$3(t.padding);if(!t.display)return;const n=s8(a.rtl,this.left,this.width),i=this.ctx,s=t.position,l=c.size/2,f=r.top+l;let u,h=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+f,h=T3(a.align,h,this.right-d);else{const p=this.columnSizes.reduce((v,g)=>Math.max(v,g.height),0);u=f+T3(a.align,this.top,this.bottom-p-a.labels.padding-this._computeTitleHeight())}const m=T3(s,h,h+d);i.textAlign=n.textAlign(xs(s)),i.textBaseline="middle",i.strokeStyle=t.color,i.fillStyle=t.color,i.font=c.string,H6(i,t.text,m,u,c)}_computeTitleHeight(){const a=this.options.title,t=m3(a.font),c=$3(a.padding);return a.display?t.lineHeight+c.height:0}_getLegendItemAt(a,t){let c,r,n;if(Ee(a,this.left,this.right)&&Ee(t,this.top,this.bottom)){for(n=this.legendHitBoxes,c=0;c<n.length;++c)if(r=n[c],Ee(a,r.left,r.left+r.width)&&Ee(t,r.top,r.top+r.height))return this.legendItems[c]}return null}handleEvent(a){const t=this.options;if(!FM1(a.type,t))return;const c=this._getLegendItemAt(a.x,a.y);if(a.type==="mousemove"||a.type==="mouseout"){const r=this._hoveredItem,n=SM1(r,c);r&&!n&&H2(t.onLeave,[a,r,this],this),this._hoveredItem=c,c&&!n&&H2(t.onHover,[a,c,this],this)}else c&&H2(t.onClick,[a,c,this],this)}}function NM1(e,a,t,c,r){const n=TM1(c,e,a,t),i=EM1(r,c,a.lineHeight);return{itemWidth:n,itemHeight:i}}function TM1(e,a,t,c){let r=e.text;return r&&typeof r!="string"&&(r=r.reduce((n,i)=>n.length>i.length?n:i)),a+t.size/2+c.measureText(r).width}function EM1(e,a,t){let c=e;return typeof a.text!="string"&&(c=iw(a,t)),c}function iw(e,a){const t=e.text?e.text.length:0;return a*t}function FM1(e,a){return!!((e==="mousemove"||e==="mouseout")&&(a.onHover||a.onLeave)||a.onClick&&(e==="click"||e==="mouseup"))}var DM1={id:"legend",_element:Rf,start(e,a,t){const c=e.legend=new Rf({ctx:e.ctx,options:t,chart:e});P3.configure(e,c,t),P3.addBox(e,c)},stop(e){P3.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,a,t){const c=e.legend;P3.configure(e,c,t),c.options=t},afterUpdate(e){const a=e.legend;a.buildLabels(),a.adjustHitBoxes()},afterEvent(e,a){a.replay||e.legend.handleEvent(a.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,a,t){const c=a.datasetIndex,r=t.chart;r.isDatasetVisible(c)?(r.hide(c),a.hidden=!0):(r.show(c),a.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const a=e.data.datasets,{labels:{usePointStyle:t,pointStyle:c,textAlign:r,color:n,useBorderRadius:i,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const f=l.controller.getStyle(t?0:void 0),u=$3(f.borderWidth);return{text:a[l.index].label,fillStyle:f.backgroundColor,fontColor:n,hidden:!l.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:f.borderColor,pointStyle:c||f.pointStyle,rotation:f.rotation,textAlign:r||f.textAlign,borderRadius:i&&(s||f.borderRadius),datasetIndex:l.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)}}};class _s extends q4{constructor(a){super(),this.chart=a.chart,this.options=a.options,this.ctx=a.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(a,t){const c=this.options;if(this.left=0,this.top=0,!c.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=a,this.height=this.bottom=t;const r=_2(c.text)?c.text.length:1;this._padding=$3(c.padding);const n=r*m3(c.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const a=this.options.position;return a==="top"||a==="bottom"}_drawArgs(a){const{top:t,left:c,bottom:r,right:n,options:i}=this,s=i.align;let l=0,f,u,h;return this.isHorizontal()?(u=T3(s,c,n),h=t+a,f=n-c):(i.position==="left"?(u=c+a,h=T3(s,r,t),l=S2*-.5):(u=n-a,h=T3(s,t,r),l=S2*.5),f=r-t),{titleX:u,titleY:h,maxWidth:f,rotation:l}}draw(){const a=this.ctx,t=this.options;if(!t.display)return;const c=m3(t.font),n=c.lineHeight/2+this._padding.top,{titleX:i,titleY:s,maxWidth:l,rotation:f}=this._drawArgs(n);H6(a,t.text,0,0,c,{color:t.color,maxWidth:l,rotation:f,textAlign:xs(t.align),textBaseline:"middle",translation:[i,s]})}}function PM1(e,a){const t=new _s({ctx:e.ctx,options:a,chart:e});P3.configure(e,t,a),P3.addBox(e,t),e.titleBlock=t}var BM1={id:"title",_element:_s,start(e,a,t){PM1(e,t)},stop(e){const a=e.titleBlock;P3.removeBox(e,a),delete e.titleBlock},beforeUpdate(e,a,t){const c=e.titleBlock;P3.configure(e,c,t),c.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ct=new WeakMap;var OM1={id:"subtitle",start(e,a,t){const c=new _s({ctx:e.ctx,options:t,chart:e});P3.configure(e,c,t),P3.addBox(e,c),Ct.set(e,c)},stop(e){P3.removeBox(e,Ct.get(e)),Ct.delete(e)},beforeUpdate(e,a,t){const c=Ct.get(e);P3.configure(e,c,t),c.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const t5={average(e){if(!e.length)return!1;let a,t,c=new Set,r=0,n=0;for(a=0,t=e.length;a<t;++a){const s=e[a].element;if(s&&s.hasValue()){const l=s.tooltipPosition();c.add(l.x),r+=l.y,++n}}return n===0||c.size===0?!1:{x:[...c].reduce((s,l)=>s+l)/c.size,y:r/n}},nearest(e,a){if(!e.length)return!1;let t=a.x,c=a.y,r=Number.POSITIVE_INFINITY,n,i,s;for(n=0,i=e.length;n<i;++n){const l=e[n].element;if(l&&l.hasValue()){const f=l.getCenterPoint(),u=bn(a,f);u<r&&(r=u,s=l)}}if(s){const l=s.tooltipPosition();t=l.x,c=l.y}return{x:t,y:c}}};function ee(e,a){return a&&(_2(a)?Array.prototype.push.apply(e,a):e.push(a)),e}function we(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
793
793
  `)>-1?e.split(`
794
- `):e}function RM1(e,a){const{element:t,datasetIndex:c,index:r}=a,n=e.getDatasetMeta(c).controller,{label:i,value:s}=n.getLabelAndValue(r);return{chart:e,label:i,parsed:n.getParsed(r),raw:e.data.datasets[c].data[r],formattedValue:s,dataset:n.getDataset(),dataIndex:r,datasetIndex:c,element:t}}function If(e,a){const t=e.chart.ctx,{body:c,footer:r,title:n}=e,{boxWidth:i,boxHeight:s}=a,l=m3(a.bodyFont),f=m3(a.titleFont),u=m3(a.footerFont),h=n.length,d=r.length,m=c.length,p=$3(a.padding);let v=p.height,g=0,x=c.reduce((y,b)=>y+b.before.length+b.lines.length+b.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,h&&(v+=h*f.lineHeight+(h-1)*a.titleSpacing+a.titleMarginBottom),x){const y=a.displayColors?Math.max(s,l.lineHeight):l.lineHeight;v+=m*y+(x-m)*l.lineHeight+(x-1)*a.bodySpacing}d&&(v+=a.footerMarginTop+d*u.lineHeight+(d-1)*a.footerSpacing);let z=0;const C=function(y){g=Math.max(g,t.measureText(y).width+z)};return t.save(),t.font=f.string,p2(e.title,C),t.font=l.string,p2(e.beforeBody.concat(e.afterBody),C),z=a.displayColors?i+2+a.boxPadding:0,p2(c,y=>{p2(y.before,C),p2(y.lines,C),p2(y.after,C)}),z=0,t.font=u.string,p2(e.footer,C),t.restore(),g+=p.width,{width:g,height:v}}function IM1(e,a){const{y:t,height:c}=a;return t<c/2?"top":t>e.height-c/2?"bottom":"center"}function $M1(e,a,t,c){const{x:r,width:n}=c,i=t.caretSize+t.caretPadding;if(e==="left"&&r+n+i>a.width||e==="right"&&r-n-i<0)return!0}function UM1(e,a,t,c){const{x:r,width:n}=t,{width:i,chartArea:{left:s,right:l}}=e;let f="center";return c==="center"?f=r<=(s+l)/2?"left":"right":r<=n/2?f="left":r>=i-n/2&&(f="right"),$M1(f,e,a,t)&&(f="center"),f}function $f(e,a,t){const c=t.yAlign||a.yAlign||IM1(e,t);return{xAlign:t.xAlign||a.xAlign||UM1(e,a,t,c),yAlign:c}}function WM1(e,a){let{x:t,width:c}=e;return a==="right"?t-=c:a==="center"&&(t-=c/2),t}function YM1(e,a,t){let{y:c,height:r}=e;return a==="top"?c+=t:a==="bottom"?c-=r+t:c-=r/2,c}function Uf(e,a,t,c){const{caretSize:r,caretPadding:n,cornerRadius:i}=e,{xAlign:s,yAlign:l}=t,f=r+n,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:m}=p6(i);let p=WM1(a,s);const v=YM1(a,l,f);return l==="center"?s==="left"?p+=f:s==="right"&&(p-=f):s==="left"?p-=Math.max(u,d)+r:s==="right"&&(p+=Math.max(h,m)+r),{x:H3(p,0,c.width-a.width),y:H3(v,0,c.height-a.height)}}function zt(e,a,t){const c=$3(t.padding);return a==="center"?e.x+e.width/2:a==="right"?e.x+e.width-c.right:e.x+c.left}function Wf(e){return ee([],we(e))}function jM1(e,a,t){return R0(e,{tooltip:a,tooltipItems:t,type:"tooltip"})}function Yf(e,a){const t=a&&a.dataset&&a.dataset.tooltip&&a.dataset.tooltip.callbacks;return t?e.override(t):e}const sw={beforeTitle:be,title(e){if(e.length>0){const a=e[0],t=a.chart.data.labels,c=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return a.dataset.label||"";if(a.label)return a.label;if(c>0&&a.dataIndex<c)return t[a.dataIndex]}return""},afterTitle:be,beforeBody:be,beforeLabel:be,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let a=e.dataset.label||"";a&&(a+=": ");const t=e.formattedValue;return s2(t)||(a+=t),a},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:be,afterBody:be,beforeFooter:be,footer:be,afterFooter:be};function J3(e,a,t,c){const r=e[a].call(t,c);return typeof r>"u"?sw[a].call(t,c):r}class Tn extends q4{constructor(a){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=a.chart,this.options=a.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(a){this.options=a,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const a=this._cachedAnimations;if(a)return a;const t=this.chart,c=this.options.setContext(this.getContext()),r=c.enabled&&t.options.animation&&c.animations,n=new RV(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=jM1(this.chart.getContext(),this,this._tooltipItems))}getTitle(a,t){const{callbacks:c}=t,r=J3(c,"beforeTitle",this,a),n=J3(c,"title",this,a),i=J3(c,"afterTitle",this,a);let s=[];return s=ee(s,we(r)),s=ee(s,we(n)),s=ee(s,we(i)),s}getBeforeBody(a,t){return Wf(J3(t.callbacks,"beforeBody",this,a))}getBody(a,t){const{callbacks:c}=t,r=[];return p2(a,n=>{const i={before:[],lines:[],after:[]},s=Yf(c,n);ee(i.before,we(J3(s,"beforeLabel",this,n))),ee(i.lines,J3(s,"label",this,n)),ee(i.after,we(J3(s,"afterLabel",this,n))),r.push(i)}),r}getAfterBody(a,t){return Wf(J3(t.callbacks,"afterBody",this,a))}getFooter(a,t){const{callbacks:c}=t,r=J3(c,"beforeFooter",this,a),n=J3(c,"footer",this,a),i=J3(c,"afterFooter",this,a);let s=[];return s=ee(s,we(r)),s=ee(s,we(n)),s=ee(s,we(i)),s}_createItems(a){const t=this._active,c=this.chart.data,r=[],n=[],i=[];let s=[],l,f;for(l=0,f=t.length;l<f;++l)s.push(RM1(this.chart,t[l]));return a.filter&&(s=s.filter((u,h,d)=>a.filter(u,h,d,c))),a.itemSort&&(s=s.sort((u,h)=>a.itemSort(u,h,c))),p2(s,u=>{const h=Yf(a.callbacks,u);r.push(J3(h,"labelColor",this,u)),n.push(J3(h,"labelPointStyle",this,u)),i.push(J3(h,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=n,this.labelTextColors=i,this.dataPoints=s,s}update(a,t){const c=this.options.setContext(this.getContext()),r=this._active;let n,i=[];if(!r.length)this.opacity!==0&&(n={opacity:0});else{const s=t5[c.position].call(this,r,this._eventPosition);i=this._createItems(c),this.title=this.getTitle(i,c),this.beforeBody=this.getBeforeBody(i,c),this.body=this.getBody(i,c),this.afterBody=this.getAfterBody(i,c),this.footer=this.getFooter(i,c);const l=this._size=If(this,c),f=Object.assign({},s,l),u=$f(this.chart,c,f),h=Uf(c,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,n={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=i,this.$context=void 0,n&&this._resolveAnimations().update(this,n),a&&c.external&&c.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(a,t,c,r){const n=this.getCaretPosition(a,c,r);t.lineTo(n.x1,n.y1),t.lineTo(n.x2,n.y2),t.lineTo(n.x3,n.y3)}getCaretPosition(a,t,c){const{xAlign:r,yAlign:n}=this,{caretSize:i,cornerRadius:s}=c,{topLeft:l,topRight:f,bottomLeft:u,bottomRight:h}=p6(s),{x:d,y:m}=a,{width:p,height:v}=t;let g,x,z,C,y,b;return n==="center"?(y=m+v/2,r==="left"?(g=d,x=g-i,C=y+i,b=y-i):(g=d+p,x=g+i,C=y-i,b=y+i),z=g):(r==="left"?x=d+Math.max(l,u)+i:r==="right"?x=d+p-Math.max(f,h)-i:x=this.caretX,n==="top"?(C=m,y=C-i,g=x-i,z=x+i):(C=m+v,y=C+i,g=x+i,z=x-i),b=C),{x1:g,x2:x,x3:z,y1:C,y2:y,y3:b}}drawTitle(a,t,c){const r=this.title,n=r.length;let i,s,l;if(n){const f=s8(c.rtl,this.x,this.width);for(a.x=zt(this,c.titleAlign,c),t.textAlign=f.textAlign(c.titleAlign),t.textBaseline="middle",i=m3(c.titleFont),s=c.titleSpacing,t.fillStyle=c.titleColor,t.font=i.string,l=0;l<n;++l)t.fillText(r[l],f.x(a.x),a.y+i.lineHeight/2),a.y+=i.lineHeight+s,l+1===n&&(a.y+=c.titleMarginBottom-s)}}_drawColorBox(a,t,c,r,n){const i=this.labelColors[c],s=this.labelPointStyles[c],{boxHeight:l,boxWidth:f}=n,u=m3(n.bodyFont),h=zt(this,"left",n),d=r.x(h),m=l<u.lineHeight?(u.lineHeight-l)/2:0,p=t.y+m;if(n.usePointStyle){const v={radius:Math.min(f,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=r.leftForLtr(d,f)+f/2,x=p+l/2;a.strokeStyle=n.multiKeyBackground,a.fillStyle=n.multiKeyBackground,wn(a,v,g,x),a.strokeStyle=i.borderColor,a.fillStyle=i.backgroundColor,wn(a,v,g,x)}else{a.lineWidth=a2(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,a.strokeStyle=i.borderColor,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset||0;const v=r.leftForLtr(d,f),g=r.leftForLtr(r.xPlus(d,1),f-2),x=p6(i.borderRadius);Object.values(x).some(z=>z!==0)?(a.beginPath(),a.fillStyle=n.multiKeyBackground,J5(a,{x:v,y:p,w:f,h:l,radius:x}),a.fill(),a.stroke(),a.fillStyle=i.backgroundColor,a.beginPath(),J5(a,{x:g,y:p+1,w:f-2,h:l-2,radius:x}),a.fill()):(a.fillStyle=n.multiKeyBackground,a.fillRect(v,p,f,l),a.strokeRect(v,p,f,l),a.fillStyle=i.backgroundColor,a.fillRect(g,p+1,f-2,l-2))}a.fillStyle=this.labelTextColors[c]}drawBody(a,t,c){const{body:r}=this,{bodySpacing:n,bodyAlign:i,displayColors:s,boxHeight:l,boxWidth:f,boxPadding:u}=c,h=m3(c.bodyFont);let d=h.lineHeight,m=0;const p=s8(c.rtl,this.x,this.width),v=function(T){t.fillText(T,p.x(a.x+m),a.y+d/2),a.y+=d+n},g=p.textAlign(i);let x,z,C,y,b,w,H;for(t.textAlign=i,t.textBaseline="middle",t.font=h.string,a.x=zt(this,g,c),t.fillStyle=c.bodyColor,p2(this.beforeBody,v),m=s&&g!=="right"?i==="center"?f/2+u:f+2+u:0,y=0,w=r.length;y<w;++y){for(x=r[y],z=this.labelTextColors[y],t.fillStyle=z,p2(x.before,v),C=x.lines,s&&C.length&&(this._drawColorBox(t,a,y,p,c),d=Math.max(h.lineHeight,l)),b=0,H=C.length;b<H;++b)v(C[b]),d=h.lineHeight;p2(x.after,v)}m=0,d=h.lineHeight,p2(this.afterBody,v),a.y-=n}drawFooter(a,t,c){const r=this.footer,n=r.length;let i,s;if(n){const l=s8(c.rtl,this.x,this.width);for(a.x=zt(this,c.footerAlign,c),a.y+=c.footerMarginTop,t.textAlign=l.textAlign(c.footerAlign),t.textBaseline="middle",i=m3(c.footerFont),t.fillStyle=c.footerColor,t.font=i.string,s=0;s<n;++s)t.fillText(r[s],l.x(a.x),a.y+i.lineHeight/2),a.y+=i.lineHeight+c.footerSpacing}}drawBackground(a,t,c,r){const{xAlign:n,yAlign:i}=this,{x:s,y:l}=a,{width:f,height:u}=c,{topLeft:h,topRight:d,bottomLeft:m,bottomRight:p}=p6(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(s+h,l),i==="top"&&this.drawCaret(a,t,c,r),t.lineTo(s+f-d,l),t.quadraticCurveTo(s+f,l,s+f,l+d),i==="center"&&n==="right"&&this.drawCaret(a,t,c,r),t.lineTo(s+f,l+u-p),t.quadraticCurveTo(s+f,l+u,s+f-p,l+u),i==="bottom"&&this.drawCaret(a,t,c,r),t.lineTo(s+m,l+u),t.quadraticCurveTo(s,l+u,s,l+u-m),i==="center"&&n==="left"&&this.drawCaret(a,t,c,r),t.lineTo(s,l+h),t.quadraticCurveTo(s,l,s+h,l),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(a){const t=this.chart,c=this.$animations,r=c&&c.x,n=c&&c.y;if(r||n){const i=t5[a.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=If(this,a),l=Object.assign({},i,this._size),f=$f(t,a,l),u=Uf(a,l,f,t);(r._to!==u.x||n._to!==u.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(a){const t=this.options.setContext(this.getContext());let c=this.opacity;if(!c)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},n={x:this.x,y:this.y};c=Math.abs(c)<.001?0:c;const i=$3(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(a.save(),a.globalAlpha=c,this.drawBackground(n,a,r,t),FV(a,t.textDirection),n.y+=i.top,this.drawTitle(n,a,t),this.drawBody(n,a,t),this.drawFooter(n,a,t),DV(a,t.textDirection),a.restore())}getActiveElements(){return this._active||[]}setActiveElements(a,t){const c=this._active,r=a.map(({datasetIndex:s,index:l})=>{const f=this.chart.getDatasetMeta(s);if(!f)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:f.data[l],index:l}}),n=!C7(c,r),i=this._positionChanged(r,t);(n||i)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(a,t,c=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,n=this._active||[],i=this._getActiveElements(a,n,t,c),s=this._positionChanged(i,a),l=t||!C7(i,n)||s;return l&&(this._active=i,(r.enabled||r.external)&&(this._eventPosition={x:a.x,y:a.y},this.update(!0,t))),l}_getActiveElements(a,t,c,r){const n=this.options;if(a.type==="mouseout")return[];if(!r)return t.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const i=this.chart.getElementsAtEventForMode(a,n.mode,n,c);return n.reverse&&i.reverse(),i}_positionChanged(a,t){const{caretX:c,caretY:r,options:n}=this,i=t5[n.position].call(this,a,t);return i!==!1&&(c!==i.x||r!==i.y)}}l1(Tn,"positioners",t5);var qM1={id:"tooltip",_element:Tn,positioners:t5,afterInit(e,a,t){t&&(e.tooltip=new Tn({chart:e,options:t}))},beforeUpdate(e,a,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,a,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){const a=e.tooltip;if(a&&a._willRender()){const t={tooltip:a};if(e.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0})===!1)return;a.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,a){if(e.tooltip){const t=a.replay;e.tooltip.handleEvent(a.event,t,a.inChartArea)&&(a.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,a)=>a.bodyFont.size,boxWidth:(e,a)=>a.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:sw},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},GM1=Object.freeze({__proto__:null,Colors:iM1,Decimation:fM1,Filler:AM1,Legend:DM1,SubTitle:OM1,Title:BM1,Tooltip:qM1});const XM1=(e,a,t,c)=>(typeof a=="string"?(t=e.push(a)-1,c.unshift({index:t,label:a})):isNaN(a)&&(t=null),t);function ZM1(e,a,t,c){const r=e.indexOf(a);if(r===-1)return XM1(e,a,t,c);const n=e.lastIndexOf(a);return r!==n?t:r}const QM1=(e,a)=>e===null?null:H3(Math.round(e),0,a);function jf(e){const a=this.getLabels();return e>=0&&e<a.length?a[e]:e}class En extends S6{constructor(a){super(a),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(a){const t=this._addedLabels;if(t.length){const c=this.getLabels();for(const{index:r,label:n}of t)c[r]===n&&c.splice(r,1);this._addedLabels=[]}super.init(a)}parse(a,t){if(s2(a))return null;const c=this.getLabels();return t=isFinite(t)&&c[t]===a?t:ZM1(c,a,q1(t,a),this._addedLabels),QM1(t,c.length-1)}determineDataLimits(){const{minDefined:a,maxDefined:t}=this.getUserBounds();let{min:c,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(a||(c=0),t||(r=this.getLabels().length-1)),this.min=c,this.max=r}buildTicks(){const a=this.min,t=this.max,c=this.options.offset,r=[];let n=this.getLabels();n=a===0&&t===n.length-1?n:n.slice(a,t+1),this._valueRange=Math.max(n.length-(c?0:1),1),this._startValue=this.min-(c?.5:0);for(let i=a;i<=t;i++)r.push({value:i});return r}getLabelForValue(a){return jf.call(this,a)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(a){return typeof a!="number"&&(a=this.parse(a)),a===null?NaN:this.getPixelForDecimal((a-this._startValue)/this._valueRange)}getPixelForTick(a){const t=this.ticks;return a<0||a>t.length-1?null:this.getPixelForValue(t[a].value)}getValueForPixel(a){return Math.round(this._startValue+this.getDecimalForPixel(a)*this._valueRange)}getBasePixel(){return this.bottom}}l1(En,"id","category"),l1(En,"defaults",{ticks:{callback:jf}});function KM1(e,a){const t=[],{bounds:r,step:n,min:i,max:s,precision:l,count:f,maxTicks:u,maxDigits:h,includeBounds:d}=e,m=n||1,p=u-1,{min:v,max:g}=a,x=!s2(i),z=!s2(s),C=!s2(f),y=(g-v)/(h+1);let b=Rl((g-v)/p/m)*m,w,H,T,A;if(b<1e-14&&!x&&!z)return[{value:v},{value:g}];A=Math.ceil(g/b)-Math.floor(v/b),A>p&&(b=Rl(A*b/p/m)*m),s2(l)||(w=Math.pow(10,l),b=Math.ceil(b*w)/w),r==="ticks"?(H=Math.floor(v/b)*b,T=Math.ceil(g/b)*b):(H=v,T=g),x&&z&&n&&Yg1((s-i)/n,b/1e3)?(A=Math.round(Math.min((s-i)/b,u)),b=(s-i)/A,H=i,T=s):C?(H=x?i:H,T=z?s:T,A=f-1,b=(T-H)/A):(A=(T-H)/b,z5(A,Math.round(A),b/1e3)?A=Math.round(A):A=Math.ceil(A));const U=Math.max(Il(b),Il(H));w=Math.pow(10,s2(l)?U:l),H=Math.round(H*w)/w,T=Math.round(T*w)/w;let D=0;for(x&&(d&&H!==i?(t.push({value:i}),H<i&&D++,z5(Math.round((H+D*b)*w)/w,i,qf(i,y,e))&&D++):H<i&&D++);D<A;++D){const k=Math.round((H+D*b)*w)/w;if(z&&k>s)break;t.push({value:k})}return z&&d&&T!==s?t.length&&z5(t[t.length-1].value,s,qf(s,y,e))?t[t.length-1].value=s:t.push({value:s}):(!z||T===s)&&t.push({value:T}),t}function qf(e,a,{horizontal:t,minRotation:c}){const r=D4(c),n=(t?Math.sin(r):Math.cos(r))||.001,i=.75*a*(""+e).length;return Math.min(a/n,i)}class w7 extends S6{constructor(a){super(a),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(a,t){return s2(a)||(typeof a=="number"||a instanceof Number)&&!isFinite(+a)?null:+a}handleTickRangeOptions(){const{beginAtZero:a}=this.options,{minDefined:t,maxDefined:c}=this.getUserBounds();let{min:r,max:n}=this;const i=l=>r=t?r:l,s=l=>n=c?n:l;if(a){const l=he(r),f=he(n);l<0&&f<0?s(0):l>0&&f>0&&i(0)}if(r===n){let l=n===0?1:Math.abs(n*.05);s(n+l),a||i(r-l)}this.min=r,this.max=n}getTickLimit(){const a=this.options.ticks;let{maxTicksLimit:t,stepSize:c}=a,r;return c?(r=Math.ceil(this.max/c)-Math.floor(this.min/c)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${c} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),t=t||11),t&&(r=Math.min(t,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const a=this.options,t=a.ticks;let c=this.getTickLimit();c=Math.max(2,c);const r={maxTicks:c,bounds:a.bounds,min:a.min,max:a.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},n=this._range||this,i=KM1(r,n);return a.bounds==="ticks"&&xV(i,this,"value"),a.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const a=this.ticks;let t=this.min,c=this.max;if(super.configure(),this.options.offset&&a.length){const r=(c-t)/Math.max(a.length-1,1)/2;t-=r,c+=r}this._startValue=t,this._endValue=c,this._valueRange=c-t}getLabelForValue(a){return Ta(a,this.chart.options.locale,this.options.ticks.format)}}class Fn extends w7{determineDataLimits(){const{min:a,max:t}=this.getMinMax(!0);this.min=j2(a)?a:0,this.max=j2(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const a=this.isHorizontal(),t=a?this.width:this.height,c=D4(this.options.ticks.minRotation),r=(a?Math.sin(c):Math.cos(c))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,n.lineHeight/r))}getPixelForValue(a){return a===null?NaN:this.getPixelForDecimal((a-this._startValue)/this._valueRange)}getValueForPixel(a){return this._startValue+this.getDecimalForPixel(a)*this._valueRange}}l1(Fn,"id","linear"),l1(Fn,"defaults",{ticks:{callback:Nc.formatters.numeric}});const aa=e=>Math.floor(m0(e)),Q0=(e,a)=>Math.pow(10,aa(e)+a);function Gf(e){return e/Math.pow(10,aa(e))===1}function Xf(e,a,t){const c=Math.pow(10,t),r=Math.floor(e/c);return Math.ceil(a/c)-r}function JM1(e,a){const t=a-e;let c=aa(t);for(;Xf(e,a,c)>10;)c++;for(;Xf(e,a,c)<10;)c--;return Math.min(c,aa(e))}function eH1(e,{min:a,max:t}){a=s4(e.min,a);const c=[],r=aa(a);let n=JM1(a,t),i=n<0?Math.pow(10,Math.abs(n)):1;const s=Math.pow(10,n),l=r>n?Math.pow(10,r):0,f=Math.round((a-l)*i)/i,u=Math.floor((a-l)/s/10)*s*10;let h=Math.floor((f-u)/Math.pow(10,n)),d=s4(e.min,Math.round((l+u+h*Math.pow(10,n))*i)/i);for(;d<t;)c.push({value:d,major:Gf(d),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(n++,h=2,i=n>=0?1:i),d=Math.round((l+u+h*Math.pow(10,n))*i)/i;const m=s4(e.max,d);return c.push({value:m,major:Gf(m),significand:h}),c}class Dn extends S6{constructor(a){super(a),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(a,t){const c=w7.prototype.parse.apply(this,[a,t]);if(c===0){this._zero=!0;return}return j2(c)&&c>0?c:null}determineDataLimits(){const{min:a,max:t}=this.getMinMax(!0);this.min=j2(a)?Math.max(0,a):null,this.max=j2(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!j2(this._userMin)&&(this.min=a===Q0(this.min,0)?Q0(this.min,-1):Q0(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:a,maxDefined:t}=this.getUserBounds();let c=this.min,r=this.max;const n=s=>c=a?c:s,i=s=>r=t?r:s;c===r&&(c<=0?(n(1),i(10)):(n(Q0(c,-1)),i(Q0(r,1)))),c<=0&&n(Q0(r,-1)),r<=0&&i(Q0(c,1)),this.min=c,this.max=r}buildTicks(){const a=this.options,t={min:this._userMin,max:this._userMax},c=eH1(t,this);return a.bounds==="ticks"&&xV(c,this,"value"),a.reverse?(c.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),c}getLabelForValue(a){return a===void 0?"0":Ta(a,this.chart.options.locale,this.options.ticks.format)}configure(){const a=this.min;super.configure(),this._startValue=m0(a),this._valueRange=m0(this.max)-m0(a)}getPixelForValue(a){return(a===void 0||a===0)&&(a=this.min),a===null||isNaN(a)?NaN:this.getPixelForDecimal(a===this.min?0:(m0(a)-this._startValue)/this._valueRange)}getValueForPixel(a){const t=this.getDecimalForPixel(a);return Math.pow(10,this._startValue+t*this._valueRange)}}l1(Dn,"id","logarithmic"),l1(Dn,"defaults",{ticks:{callback:Nc.formatters.logarithmic,major:{enabled:!0}}});function Pn(e){const a=e.ticks;if(a.display&&e.display){const t=$3(a.backdropPadding);return q1(a.font&&a.font.size,P2.font.size)+t.height}return 0}function aH1(e,a,t){return t=_2(t)?t:[t],{w:ox1(e,a.string,t),h:t.length*a.lineHeight}}function Zf(e,a,t,c,r){return e===c||e===r?{start:a-t/2,end:a+t/2}:e<c||e>r?{start:a-t,end:a}:{start:a,end:a+t}}function tH1(e){const a={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},a),c=[],r=[],n=e._pointLabels.length,i=e.options.pointLabels,s=i.centerPointLabels?S2/n:0;for(let l=0;l<n;l++){const f=i.setContext(e.getPointLabelContext(l));r[l]=f.padding;const u=e.getPointPosition(l,e.drawingArea+r[l],s),h=m3(f.font),d=aH1(e.ctx,h,e._pointLabels[l]);c[l]=d;const m=o4(e.getIndexAngle(l)+s),p=Math.round(vs(m)),v=Zf(p,u.x,d.w,0,180),g=Zf(p,u.y,d.h,90,270);cH1(t,a,m,v,g)}e.setCenterPoint(a.l-t.l,t.r-a.r,a.t-t.t,t.b-a.b),e._pointLabelItems=iH1(e,c,r)}function cH1(e,a,t,c,r){const n=Math.abs(Math.sin(t)),i=Math.abs(Math.cos(t));let s=0,l=0;c.start<a.l?(s=(a.l-c.start)/n,e.l=Math.min(e.l,a.l-s)):c.end>a.r&&(s=(c.end-a.r)/n,e.r=Math.max(e.r,a.r+s)),r.start<a.t?(l=(a.t-r.start)/i,e.t=Math.min(e.t,a.t-l)):r.end>a.b&&(l=(r.end-a.b)/i,e.b=Math.max(e.b,a.b+l))}function rH1(e,a,t){const c=e.drawingArea,{extra:r,additionalAngle:n,padding:i,size:s}=t,l=e.getPointPosition(a,c+r+i,n),f=Math.round(vs(o4(l.angle+t3))),u=lH1(l.y,s.h,f),h=sH1(f),d=oH1(l.x,s.w,h);return{visible:!0,x:l.x,y:u,textAlign:h,left:d,top:u,right:d+s.w,bottom:u+s.h}}function nH1(e,a){if(!a)return!0;const{left:t,top:c,right:r,bottom:n}=e;return!(De({x:t,y:c},a)||De({x:t,y:n},a)||De({x:r,y:c},a)||De({x:r,y:n},a))}function iH1(e,a,t){const c=[],r=e._pointLabels.length,n=e.options,{centerPointLabels:i,display:s}=n.pointLabels,l={extra:Pn(n)/2,additionalAngle:i?S2/r:0};let f;for(let u=0;u<r;u++){l.padding=t[u],l.size=a[u];const h=rH1(e,u,l);c.push(h),s==="auto"&&(h.visible=nH1(h,f),h.visible&&(f=h))}return c}function sH1(e){return e===0||e===180?"center":e<180?"left":"right"}function oH1(e,a,t){return t==="right"?e-=a:t==="center"&&(e-=a/2),e}function lH1(e,a,t){return t===90||t===270?e-=a/2:(t>270||t<90)&&(e-=a),e}function fH1(e,a,t){const{left:c,top:r,right:n,bottom:i}=t,{backdropColor:s}=a;if(!s2(s)){const l=p6(a.borderRadius),f=$3(a.backdropPadding);e.fillStyle=s;const u=c-f.left,h=r-f.top,d=n-c+f.width,m=i-r+f.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),J5(e,{x:u,y:h,w:d,h:m,radius:l}),e.fill()):e.fillRect(u,h,d,m)}}function uH1(e,a){const{ctx:t,options:{pointLabels:c}}=e;for(let r=a-1;r>=0;r--){const n=e._pointLabelItems[r];if(!n.visible)continue;const i=c.setContext(e.getPointLabelContext(r));fH1(t,i,n);const s=m3(i.font),{x:l,y:f,textAlign:u}=n;H6(t,e._pointLabels[r],l,f+s.lineHeight/2,s,{color:i.color,textAlign:u,textBaseline:"middle"})}}function ow(e,a,t,c){const{ctx:r}=e;if(t)r.arc(e.xCenter,e.yCenter,a,0,A2);else{let n=e.getPointPosition(0,a);r.moveTo(n.x,n.y);for(let i=1;i<c;i++)n=e.getPointPosition(i,a),r.lineTo(n.x,n.y)}}function hH1(e,a,t,c,r){const n=e.ctx,i=a.circular,{color:s,lineWidth:l}=a;!i&&!c||!s||!l||t<0||(n.save(),n.strokeStyle=s,n.lineWidth=l,n.setLineDash(r.dash||[]),n.lineDashOffset=r.dashOffset,n.beginPath(),ow(e,t,i,c),n.closePath(),n.stroke(),n.restore())}function dH1(e,a,t){return R0(e,{label:t,index:a,type:"pointLabel"})}class c5 extends w7{constructor(a){super(a),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const a=this._padding=$3(Pn(this.options)/2),t=this.width=this.maxWidth-a.width,c=this.height=this.maxHeight-a.height;this.xCenter=Math.floor(this.left+t/2+a.left),this.yCenter=Math.floor(this.top+c/2+a.top),this.drawingArea=Math.floor(Math.min(t,c)/2)}determineDataLimits(){const{min:a,max:t}=this.getMinMax(!1);this.min=j2(a)&&!isNaN(a)?a:0,this.max=j2(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Pn(this.options))}generateTickLabels(a){w7.prototype.generateTickLabels.call(this,a),this._pointLabels=this.getLabels().map((t,c)=>{const r=H2(this.options.pointLabels.callback,[t,c],this);return r||r===0?r:""}).filter((t,c)=>this.chart.getDataVisibility(c))}fit(){const a=this.options;a.display&&a.pointLabels.display?tH1(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(a,t,c,r){this.xCenter+=Math.floor((a-t)/2),this.yCenter+=Math.floor((c-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(a,t,c,r))}getIndexAngle(a){const t=A2/(this._pointLabels.length||1),c=this.options.startAngle||0;return o4(a*t+D4(c))}getDistanceFromCenterForValue(a){if(s2(a))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-a)*t:(a-this.min)*t}getValueForDistanceFromCenter(a){if(s2(a))return NaN;const t=a/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(a){const t=this._pointLabels||[];if(a>=0&&a<t.length){const c=t[a];return dH1(this.getContext(),a,c)}}getPointPosition(a,t,c=0){const r=this.getIndexAngle(a)-t3+c;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(a,t){return this.getPointPosition(a,this.getDistanceFromCenterForValue(t))}getBasePosition(a){return this.getPointPositionForValue(a||0,this.getBaseValue())}getPointLabelPosition(a){const{left:t,top:c,right:r,bottom:n}=this._pointLabelItems[a];return{left:t,top:c,right:r,bottom:n}}drawBackground(){const{backgroundColor:a,grid:{circular:t}}=this.options;if(a){const c=this.ctx;c.save(),c.beginPath(),ow(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),c.closePath(),c.fillStyle=a,c.fill(),c.restore()}}drawGrid(){const a=this.ctx,t=this.options,{angleLines:c,grid:r,border:n}=t,i=this._pointLabels.length;let s,l,f;if(t.pointLabels.display&&uH1(this,i),r.display&&this.ticks.forEach((u,h)=>{if(h!==0||h===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const d=this.getContext(h),m=r.setContext(d),p=n.setContext(d);hH1(this,m,l,i,p)}}),c.display){for(a.save(),s=i-1;s>=0;s--){const u=c.setContext(this.getPointLabelContext(s)),{color:h,lineWidth:d}=u;!d||!h||(a.lineWidth=d,a.strokeStyle=h,a.setLineDash(u.borderDash),a.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),f=this.getPointPosition(s,l),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(f.x,f.y),a.stroke())}a.restore()}}drawBorder(){}drawLabels(){const a=this.ctx,t=this.options,c=t.ticks;if(!c.display)return;const r=this.getIndexAngle(0);let n,i;a.save(),a.translate(this.xCenter,this.yCenter),a.rotate(r),a.textAlign="center",a.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;const f=c.setContext(this.getContext(l)),u=m3(f.font);if(n=this.getDistanceFromCenterForValue(this.ticks[l].value),f.showLabelBackdrop){a.font=u.string,i=a.measureText(s.label).width,a.fillStyle=f.backdropColor;const h=$3(f.backdropPadding);a.fillRect(-i/2-h.left,-n-u.size/2-h.top,i+h.width,u.size+h.height)}H6(a,s.label,0,-n,u,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),a.restore()}drawTitle(){}}l1(c5,"id","radialLinear"),l1(c5,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Nc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(a){return a},padding:5,centerPointLabels:!1}}),l1(c5,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),l1(c5,"descriptors",{angleLines:{_fallback:"grid"}});const Dc={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}},c4=Object.keys(Dc);function Qf(e,a){return e-a}function Kf(e,a){if(s2(a))return null;const t=e._adapter,{parser:c,round:r,isoWeekday:n}=e._parseOpts;let i=a;return typeof c=="function"&&(i=c(i)),j2(i)||(i=typeof c=="string"?t.parse(i,c):t.parse(i)),i===null?null:(r&&(i=r==="week"&&(C8(n)||n===!0)?t.startOf(i,"isoWeek",n):t.startOf(i,r)),+i)}function Jf(e,a,t,c){const r=c4.length;for(let n=c4.indexOf(e);n<r-1;++n){const i=Dc[c4[n]],s=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((t-a)/(s*i.size))<=c)return c4[n]}return c4[r-1]}function mH1(e,a,t,c,r){for(let n=c4.length-1;n>=c4.indexOf(t);n--){const i=c4[n];if(Dc[i].common&&e._adapter.diff(r,c,i)>=a-1)return i}return c4[t?c4.indexOf(t):0]}function pH1(e){for(let a=c4.indexOf(e)+1,t=c4.length;a<t;++a)if(Dc[c4[a]].common)return c4[a]}function eu(e,a,t){if(!t)e[a]=!0;else if(t.length){const{lo:c,hi:r}=gs(t,a),n=t[c]>=a?t[c]:t[r];e[n]=!0}}function vH1(e,a,t,c){const r=e._adapter,n=+r.startOf(a[0].value,c),i=a[a.length-1].value;let s,l;for(s=n;s<=i;s=+r.add(s,1,c))l=t[s],l>=0&&(a[l].major=!0);return a}function au(e,a,t){const c=[],r={},n=a.length;let i,s;for(i=0;i<n;++i)s=a[i],r[s]=i,c.push({value:s,major:!1});return n===0||!t?c:vH1(e,c,r,t)}class ta extends S6{constructor(a){super(a),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(a,t={}){const c=a.time||(a.time={}),r=this._adapter=new bC1._date(a.adapters.date);r.init(t),C5(c.displayFormats,r.formats()),this._parseOpts={parser:c.parser,round:c.round,isoWeekday:c.isoWeekday},super.init(a),this._normalized=t.normalized}parse(a,t){return a===void 0?null:Kf(this,a)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const a=this.options,t=this._adapter,c=a.time.unit||"day";let{min:r,max:n,minDefined:i,maxDefined:s}=this.getUserBounds();function l(f){!i&&!isNaN(f.min)&&(r=Math.min(r,f.min)),!s&&!isNaN(f.max)&&(n=Math.max(n,f.max))}(!i||!s)&&(l(this._getLabelBounds()),(a.bounds!=="ticks"||a.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=j2(r)&&!isNaN(r)?r:+t.startOf(Date.now(),c),n=j2(n)&&!isNaN(n)?n:+t.endOf(Date.now(),c)+1,this.min=Math.min(r,n-1),this.max=Math.max(r+1,n)}_getLabelBounds(){const a=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;return a.length&&(t=a[0],c=a[a.length-1]),{min:t,max:c}}buildTicks(){const a=this.options,t=a.time,c=a.ticks,r=c.source==="labels"?this.getLabelTimestamps():this._generate();a.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const n=this.min,i=this.max,s=Xg1(r,n,i);return this._unit=t.unit||(c.autoSkip?Jf(t.minUnit,this.min,this.max,this._getLabelCapacity(n)):mH1(this,s.length,t.minUnit,this.min,this.max)),this._majorUnit=!c.major.enabled||this._unit==="year"?void 0:pH1(this._unit),this.initOffsets(r),a.reverse&&s.reverse(),au(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(a=>+a.value))}initOffsets(a=[]){let t=0,c=0,r,n;this.options.offset&&a.length&&(r=this.getDecimalForValue(a[0]),a.length===1?t=1-r:t=(this.getDecimalForValue(a[1])-r)/2,n=this.getDecimalForValue(a[a.length-1]),a.length===1?c=n:c=(n-this.getDecimalForValue(a[a.length-2]))/2);const i=a.length<3?.5:.25;t=H3(t,0,i),c=H3(c,0,i),this._offsets={start:t,end:c,factor:1/(t+1+c)}}_generate(){const a=this._adapter,t=this.min,c=this.max,r=this.options,n=r.time,i=n.unit||Jf(n.minUnit,t,c,this._getLabelCapacity(t)),s=q1(r.ticks.stepSize,1),l=i==="week"?n.isoWeekday:!1,f=C8(l)||l===!0,u={};let h=t,d,m;if(f&&(h=+a.startOf(h,"isoWeek",l)),h=+a.startOf(h,f?"day":i),a.diff(c,t,i)>1e5*s)throw new Error(t+" and "+c+" are too far apart with stepSize of "+s+" "+i);const p=r.ticks.source==="data"&&this.getDataTimestamps();for(d=h,m=0;d<c;d=+a.add(d,s,i),m++)eu(u,d,p);return(d===c||r.bounds==="ticks"||m===1)&&eu(u,d,p),Object.keys(u).sort(Qf).map(v=>+v)}getLabelForValue(a){const t=this._adapter,c=this.options.time;return c.tooltipFormat?t.format(a,c.tooltipFormat):t.format(a,c.displayFormats.datetime)}format(a,t){const r=this.options.time.displayFormats,n=this._unit,i=t||r[n];return this._adapter.format(a,i)}_tickFormatFunction(a,t,c,r){const n=this.options,i=n.ticks.callback;if(i)return H2(i,[a,t,c],this);const s=n.time.displayFormats,l=this._unit,f=this._majorUnit,u=l&&s[l],h=f&&s[f],d=c[t],m=f&&h&&d&&d.major;return this._adapter.format(a,r||(m?h:u))}generateTickLabels(a){let t,c,r;for(t=0,c=a.length;t<c;++t)r=a[t],r.label=this._tickFormatFunction(r.value,t,a)}getDecimalForValue(a){return a===null?NaN:(a-this.min)/(this.max-this.min)}getPixelForValue(a){const t=this._offsets,c=this.getDecimalForValue(a);return this.getPixelForDecimal((t.start+c)*t.factor)}getValueForPixel(a){const t=this._offsets,c=this.getDecimalForPixel(a)/t.factor-t.end;return this.min+c*(this.max-this.min)}_getLabelSize(a){const t=this.options.ticks,c=this.ctx.measureText(a).width,r=D4(this.isHorizontal()?t.maxRotation:t.minRotation),n=Math.cos(r),i=Math.sin(r),s=this._resolveTickFontOptions(0).size;return{w:c*n+s*i,h:c*i+s*n}}_getLabelCapacity(a){const t=this.options.time,c=t.displayFormats,r=c[t.unit]||c.millisecond,n=this._tickFormatFunction(a,0,au(this,[a],this._majorUnit),r),i=this._getLabelSize(n),s=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return s>0?s:1}getDataTimestamps(){let a=this._cache.data||[],t,c;if(a.length)return a;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(t=0,c=r.length;t<c;++t)a=a.concat(r[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(a)}getLabelTimestamps(){const a=this._cache.labels||[];let t,c;if(a.length)return a;const r=this.getLabels();for(t=0,c=r.length;t<c;++t)a.push(Kf(this,r[t]));return this._cache.labels=this._normalized?a:this.normalize(a)}normalize(a){return MV(a.sort(Qf))}}l1(ta,"id","time"),l1(ta,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Mt(e,a,t){let c=0,r=e.length-1,n,i,s,l;t?(a>=e[c].pos&&a<=e[r].pos&&({lo:c,hi:r}=Fe(e,"pos",a)),{pos:n,time:s}=e[c],{pos:i,time:l}=e[r]):(a>=e[c].time&&a<=e[r].time&&({lo:c,hi:r}=Fe(e,"time",a)),{time:n,pos:s}=e[c],{time:i,pos:l}=e[r]);const f=i-n;return f?s+(l-s)*(a-n)/f:s}class Bn extends ta{constructor(a){super(a),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const a=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(a);this._minPos=Mt(t,this.min),this._tableRange=Mt(t,this.max)-this._minPos,super.initOffsets(a)}buildLookupTable(a){const{min:t,max:c}=this,r=[],n=[];let i,s,l,f,u;for(i=0,s=a.length;i<s;++i)f=a[i],f>=t&&f<=c&&r.push(f);if(r.length<2)return[{time:t,pos:0},{time:c,pos:1}];for(i=0,s=r.length;i<s;++i)u=r[i+1],l=r[i-1],f=r[i],Math.round((u+l)/2)!==f&&n.push({time:f,pos:i/(s-1)});return n}_generate(){const a=this.min,t=this.max;let c=super.getDataTimestamps();return(!c.includes(a)||!c.length)&&c.splice(0,0,a),(!c.includes(t)||c.length===1)&&c.push(t),c.sort((r,n)=>r-n)}_getTimestampsForTable(){let a=this._cache.all||[];if(a.length)return a;const t=this.getDataTimestamps(),c=this.getLabelTimestamps();return t.length&&c.length?a=this.normalize(t.concat(c)):a=t.length?t:c,a=this._cache.all=a,a}getDecimalForValue(a){return(Mt(this._table,a)-this._minPos)/this._tableRange}getValueForPixel(a){const t=this._offsets,c=this.getDecimalForPixel(a)/t.factor-t.end;return Mt(this._table,c*this._tableRange+this._minPos,!0)}}l1(Bn,"id","timeseries"),l1(Bn,"defaults",ta.defaults);var gH1=Object.freeze({__proto__:null,CategoryScale:En,LinearScale:Fn,LogarithmicScale:Dn,RadialLinearScale:c5,TimeScale:ta,TimeSeriesScale:Bn});const xH1=[yC1,Jz1,GM1,gH1];var CH1=typeof global=="object"&&global&&global.Object===Object&&global;const lw=CH1;var zH1=typeof self=="object"&&self&&self.Object===Object&&self,MH1=lw||zH1||Function("return this")();const Ce=MH1;var HH1=Ce.Symbol;const F0=HH1;var fw=Object.prototype,yH1=fw.hasOwnProperty,bH1=fw.toString,G8=F0?F0.toStringTag:void 0;function VH1(e){var a=yH1.call(e,G8),t=e[G8];try{e[G8]=void 0;var c=!0}catch{}var r=bH1.call(e);return c&&(a?e[G8]=t:delete e[G8]),r}var wH1=Object.prototype,LH1=wH1.toString;function _H1(e){return LH1.call(e)}var kH1="[object Null]",AH1="[object Undefined]",tu=F0?F0.toStringTag:void 0;function Fa(e){return e==null?e===void 0?AH1:kH1:tu&&tu in Object(e)?VH1(e):_H1(e)}function y6(e){return e!=null&&typeof e=="object"}var SH1=Array.isArray;const H8=SH1;function Da(e){var a=typeof e;return e!=null&&(a=="object"||a=="function")}var NH1="[object AsyncFunction]",TH1="[object Function]",EH1="[object GeneratorFunction]",FH1="[object Proxy]";function uw(e){if(!Da(e))return!1;var a=Fa(e);return a==TH1||a==EH1||a==NH1||a==FH1}var DH1=Ce["__core-js_shared__"];const _r=DH1;var cu=function(){var e=/[^.]+$/.exec(_r&&_r.keys&&_r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function PH1(e){return!!cu&&cu in e}var BH1=Function.prototype,OH1=BH1.toString;function N6(e){if(e!=null){try{return OH1.call(e)}catch{}try{return e+""}catch{}}return""}var RH1=/[\\^$.*+?()[\]{}|]/g,IH1=/^\[object .+?Constructor\]$/,$H1=Function.prototype,UH1=Object.prototype,WH1=$H1.toString,YH1=UH1.hasOwnProperty,jH1=RegExp("^"+WH1.call(YH1).replace(RH1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qH1(e){if(!Da(e)||PH1(e))return!1;var a=uw(e)?jH1:IH1;return a.test(N6(e))}function GH1(e,a){return e==null?void 0:e[a]}function T6(e,a){var t=GH1(e,a);return qH1(t)?t:void 0}var XH1=T6(Ce,"WeakMap");const On=XH1;var ru=Object.create,ZH1=function(){function e(){}return function(a){if(!Da(a))return{};if(ru)return ru(a);e.prototype=a;var t=new e;return e.prototype=void 0,t}}();const QH1=ZH1;function KH1(e,a){var t=-1,c=e.length;for(a||(a=Array(c));++t<c;)a[t]=e[t];return a}var JH1=function(){try{var e=T6(Object,"defineProperty");return e({},"",{}),e}catch{}}();const nu=JH1;function ey1(e,a){for(var t=-1,c=e==null?0:e.length;++t<c&&a(e[t],t,e)!==!1;);return e}var ay1=9007199254740991,ty1=/^(?:0|[1-9]\d*)$/;function cy1(e,a){var t=typeof e;return a=a??ay1,!!a&&(t=="number"||t!="symbol"&&ty1.test(e))&&e>-1&&e%1==0&&e<a}function hw(e,a,t){a=="__proto__"&&nu?nu(e,a,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[a]=t}function ks(e,a){return e===a||e!==e&&a!==a}var ry1=Object.prototype,ny1=ry1.hasOwnProperty;function dw(e,a,t){var c=e[a];(!(ny1.call(e,a)&&ks(c,t))||t===void 0&&!(a in e))&&hw(e,a,t)}function Pc(e,a,t,c){var r=!t;t||(t={});for(var n=-1,i=a.length;++n<i;){var s=a[n],l=c?c(t[s],e[s],s,t,e):void 0;l===void 0&&(l=e[s]),r?hw(t,s,l):dw(t,s,l)}return t}var iy1=9007199254740991;function mw(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=iy1}function As(e){return e!=null&&mw(e.length)&&!uw(e)}var sy1=Object.prototype;function Bc(e){var a=e&&e.constructor,t=typeof a=="function"&&a.prototype||sy1;return e===t}function oy1(e,a){for(var t=-1,c=Array(e);++t<e;)c[t]=a(t);return c}var ly1="[object Arguments]";function iu(e){return y6(e)&&Fa(e)==ly1}var pw=Object.prototype,fy1=pw.hasOwnProperty,uy1=pw.propertyIsEnumerable,hy1=iu(function(){return arguments}())?iu:function(e){return y6(e)&&fy1.call(e,"callee")&&!uy1.call(e,"callee")};const vw=hy1;function dy1(){return!1}var gw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,su=gw&&typeof module=="object"&&module&&!module.nodeType&&module,my1=su&&su.exports===gw,ou=my1?Ce.Buffer:void 0,py1=ou?ou.isBuffer:void 0,vy1=py1||dy1;const ca=vy1;var gy1="[object Arguments]",xy1="[object Array]",Cy1="[object Boolean]",zy1="[object Date]",My1="[object Error]",Hy1="[object Function]",yy1="[object Map]",by1="[object Number]",Vy1="[object Object]",wy1="[object RegExp]",Ly1="[object Set]",_y1="[object String]",ky1="[object WeakMap]",Ay1="[object ArrayBuffer]",Sy1="[object DataView]",Ny1="[object Float32Array]",Ty1="[object Float64Array]",Ey1="[object Int8Array]",Fy1="[object Int16Array]",Dy1="[object Int32Array]",Py1="[object Uint8Array]",By1="[object Uint8ClampedArray]",Oy1="[object Uint16Array]",Ry1="[object Uint32Array]",w2={};w2[Ny1]=w2[Ty1]=w2[Ey1]=w2[Fy1]=w2[Dy1]=w2[Py1]=w2[By1]=w2[Oy1]=w2[Ry1]=!0;w2[gy1]=w2[xy1]=w2[Ay1]=w2[Cy1]=w2[Sy1]=w2[zy1]=w2[My1]=w2[Hy1]=w2[yy1]=w2[by1]=w2[Vy1]=w2[wy1]=w2[Ly1]=w2[_y1]=w2[ky1]=!1;function Iy1(e){return y6(e)&&mw(e.length)&&!!w2[Fa(e)]}function Ss(e){return function(a){return e(a)}}var xw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,b5=xw&&typeof module=="object"&&module&&!module.nodeType&&module,$y1=b5&&b5.exports===xw,kr=$y1&&lw.process,Uy1=function(){try{var e=b5&&b5.require&&b5.require("util").types;return e||kr&&kr.binding&&kr.binding("util")}catch{}}();const y8=Uy1;var lu=y8&&y8.isTypedArray,Wy1=lu?Ss(lu):Iy1;const Ns=Wy1;var Yy1=Object.prototype,jy1=Yy1.hasOwnProperty;function Cw(e,a){var t=H8(e),c=!t&&vw(e),r=!t&&!c&&ca(e),n=!t&&!c&&!r&&Ns(e),i=t||c||r||n,s=i?oy1(e.length,String):[],l=s.length;for(var f in e)(a||jy1.call(e,f))&&!(i&&(f=="length"||r&&(f=="offset"||f=="parent")||n&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||cy1(f,l)))&&s.push(f);return s}function zw(e,a){return function(t){return e(a(t))}}var qy1=zw(Object.keys,Object);const Gy1=qy1;var Xy1=Object.prototype,Zy1=Xy1.hasOwnProperty;function Mw(e){if(!Bc(e))return Gy1(e);var a=[];for(var t in Object(e))Zy1.call(e,t)&&t!="constructor"&&a.push(t);return a}function Ts(e){return As(e)?Cw(e):Mw(e)}function Qy1(e){var a=[];if(e!=null)for(var t in Object(e))a.push(t);return a}var Ky1=Object.prototype,Jy1=Ky1.hasOwnProperty;function eb1(e){if(!Da(e))return Qy1(e);var a=Bc(e),t=[];for(var c in e)c=="constructor"&&(a||!Jy1.call(e,c))||t.push(c);return t}function Es(e){return As(e)?Cw(e,!0):eb1(e)}var ab1=T6(Object,"create");const ra=ab1;function tb1(){this.__data__=ra?ra(null):{},this.size=0}function cb1(e){var a=this.has(e)&&delete this.__data__[e];return this.size-=a?1:0,a}var rb1="__lodash_hash_undefined__",nb1=Object.prototype,ib1=nb1.hasOwnProperty;function sb1(e){var a=this.__data__;if(ra){var t=a[e];return t===rb1?void 0:t}return ib1.call(a,e)?a[e]:void 0}var ob1=Object.prototype,lb1=ob1.hasOwnProperty;function fb1(e){var a=this.__data__;return ra?a[e]!==void 0:lb1.call(a,e)}var ub1="__lodash_hash_undefined__";function hb1(e,a){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ra&&a===void 0?ub1:a,this}function b6(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a<t;){var c=e[a];this.set(c[0],c[1])}}b6.prototype.clear=tb1;b6.prototype.delete=cb1;b6.prototype.get=sb1;b6.prototype.has=fb1;b6.prototype.set=hb1;function db1(){this.__data__=[],this.size=0}function Oc(e,a){for(var t=e.length;t--;)if(ks(e[t][0],a))return t;return-1}var mb1=Array.prototype,pb1=mb1.splice;function vb1(e){var a=this.__data__,t=Oc(a,e);if(t<0)return!1;var c=a.length-1;return t==c?a.pop():pb1.call(a,t,1),--this.size,!0}function gb1(e){var a=this.__data__,t=Oc(a,e);return t<0?void 0:a[t][1]}function xb1(e){return Oc(this.__data__,e)>-1}function Cb1(e,a){var t=this.__data__,c=Oc(t,e);return c<0?(++this.size,t.push([e,a])):t[c][1]=a,this}function Je(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a<t;){var c=e[a];this.set(c[0],c[1])}}Je.prototype.clear=db1;Je.prototype.delete=vb1;Je.prototype.get=gb1;Je.prototype.has=xb1;Je.prototype.set=Cb1;var zb1=T6(Ce,"Map");const na=zb1;function Mb1(){this.size=0,this.__data__={hash:new b6,map:new(na||Je),string:new b6}}function Hb1(e){var a=typeof e;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?e!=="__proto__":e===null}function Rc(e,a){var t=e.__data__;return Hb1(a)?t[typeof a=="string"?"string":"hash"]:t.map}function yb1(e){var a=Rc(this,e).delete(e);return this.size-=a?1:0,a}function bb1(e){return Rc(this,e).get(e)}function Vb1(e){return Rc(this,e).has(e)}function wb1(e,a){var t=Rc(this,e),c=t.size;return t.set(e,a),this.size+=t.size==c?0:1,this}function E6(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a<t;){var c=e[a];this.set(c[0],c[1])}}E6.prototype.clear=Mb1;E6.prototype.delete=yb1;E6.prototype.get=bb1;E6.prototype.has=Vb1;E6.prototype.set=wb1;function Hw(e,a){for(var t=-1,c=a.length,r=e.length;++t<c;)e[r+t]=a[t];return e}var Lb1=zw(Object.getPrototypeOf,Object);const yw=Lb1;function _b1(){this.__data__=new Je,this.size=0}function kb1(e){var a=this.__data__,t=a.delete(e);return this.size=a.size,t}function Ab1(e){return this.__data__.get(e)}function Sb1(e){return this.__data__.has(e)}var Nb1=200;function Tb1(e,a){var t=this.__data__;if(t instanceof Je){var c=t.__data__;if(!na||c.length<Nb1-1)return c.push([e,a]),this.size=++t.size,this;t=this.__data__=new E6(c)}return t.set(e,a),this.size=t.size,this}function Re(e){var a=this.__data__=new Je(e);this.size=a.size}Re.prototype.clear=_b1;Re.prototype.delete=kb1;Re.prototype.get=Ab1;Re.prototype.has=Sb1;Re.prototype.set=Tb1;function Eb1(e,a){return e&&Pc(a,Ts(a),e)}function Fb1(e,a){return e&&Pc(a,Es(a),e)}var bw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fu=bw&&typeof module=="object"&&module&&!module.nodeType&&module,Db1=fu&&fu.exports===bw,uu=Db1?Ce.Buffer:void 0,hu=uu?uu.allocUnsafe:void 0;function Pb1(e,a){if(a)return e.slice();var t=e.length,c=hu?hu(t):new e.constructor(t);return e.copy(c),c}function Bb1(e,a){for(var t=-1,c=e==null?0:e.length,r=0,n=[];++t<c;){var i=e[t];a(i,t,e)&&(n[r++]=i)}return n}function Vw(){return[]}var Ob1=Object.prototype,Rb1=Ob1.propertyIsEnumerable,du=Object.getOwnPropertySymbols,Ib1=du?function(e){return e==null?[]:(e=Object(e),Bb1(du(e),function(a){return Rb1.call(e,a)}))}:Vw;const Fs=Ib1;function $b1(e,a){return Pc(e,Fs(e),a)}var Ub1=Object.getOwnPropertySymbols,Wb1=Ub1?function(e){for(var a=[];e;)Hw(a,Fs(e)),e=yw(e);return a}:Vw;const ww=Wb1;function Yb1(e,a){return Pc(e,ww(e),a)}function Lw(e,a,t){var c=a(e);return H8(e)?c:Hw(c,t(e))}function Rn(e){return Lw(e,Ts,Fs)}function jb1(e){return Lw(e,Es,ww)}var qb1=T6(Ce,"DataView");const In=qb1;var Gb1=T6(Ce,"Promise");const $n=Gb1;var Xb1=T6(Ce,"Set");const Un=Xb1;var mu="[object Map]",Zb1="[object Object]",pu="[object Promise]",vu="[object Set]",gu="[object WeakMap]",xu="[object DataView]",Qb1=N6(In),Kb1=N6(na),Jb1=N6($n),eV1=N6(Un),aV1=N6(On),c6=Fa;(In&&c6(new In(new ArrayBuffer(1)))!=xu||na&&c6(new na)!=mu||$n&&c6($n.resolve())!=pu||Un&&c6(new Un)!=vu||On&&c6(new On)!=gu)&&(c6=function(e){var a=Fa(e),t=a==Zb1?e.constructor:void 0,c=t?N6(t):"";if(c)switch(c){case Qb1:return xu;case Kb1:return mu;case Jb1:return pu;case eV1:return vu;case aV1:return gu}return a});const b8=c6;var tV1=Object.prototype,cV1=tV1.hasOwnProperty;function rV1(e){var a=e.length,t=new e.constructor(a);return a&&typeof e[0]=="string"&&cV1.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var nV1=Ce.Uint8Array;const L7=nV1;function Ds(e){var a=new e.constructor(e.byteLength);return new L7(a).set(new L7(e)),a}function iV1(e,a){var t=a?Ds(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var sV1=/\w*$/;function oV1(e){var a=new e.constructor(e.source,sV1.exec(e));return a.lastIndex=e.lastIndex,a}var Cu=F0?F0.prototype:void 0,zu=Cu?Cu.valueOf:void 0;function lV1(e){return zu?Object(zu.call(e)):{}}function fV1(e,a){var t=a?Ds(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var uV1="[object Boolean]",hV1="[object Date]",dV1="[object Map]",mV1="[object Number]",pV1="[object RegExp]",vV1="[object Set]",gV1="[object String]",xV1="[object Symbol]",CV1="[object ArrayBuffer]",zV1="[object DataView]",MV1="[object Float32Array]",HV1="[object Float64Array]",yV1="[object Int8Array]",bV1="[object Int16Array]",VV1="[object Int32Array]",wV1="[object Uint8Array]",LV1="[object Uint8ClampedArray]",_V1="[object Uint16Array]",kV1="[object Uint32Array]";function AV1(e,a,t){var c=e.constructor;switch(a){case CV1:return Ds(e);case uV1:case hV1:return new c(+e);case zV1:return iV1(e,t);case MV1:case HV1:case yV1:case bV1:case VV1:case wV1:case LV1:case _V1:case kV1:return fV1(e,t);case dV1:return new c;case mV1:case gV1:return new c(e);case pV1:return oV1(e);case vV1:return new c;case xV1:return lV1(e)}}function SV1(e){return typeof e.constructor=="function"&&!Bc(e)?QH1(yw(e)):{}}var NV1="[object Map]";function TV1(e){return y6(e)&&b8(e)==NV1}var Mu=y8&&y8.isMap,EV1=Mu?Ss(Mu):TV1;const FV1=EV1;var DV1="[object Set]";function PV1(e){return y6(e)&&b8(e)==DV1}var Hu=y8&&y8.isSet,BV1=Hu?Ss(Hu):PV1;const OV1=BV1;var RV1=1,IV1=2,$V1=4,_w="[object Arguments]",UV1="[object Array]",WV1="[object Boolean]",YV1="[object Date]",jV1="[object Error]",kw="[object Function]",qV1="[object GeneratorFunction]",GV1="[object Map]",XV1="[object Number]",Aw="[object Object]",ZV1="[object RegExp]",QV1="[object Set]",KV1="[object String]",JV1="[object Symbol]",ew1="[object WeakMap]",aw1="[object ArrayBuffer]",tw1="[object DataView]",cw1="[object Float32Array]",rw1="[object Float64Array]",nw1="[object Int8Array]",iw1="[object Int16Array]",sw1="[object Int32Array]",ow1="[object Uint8Array]",lw1="[object Uint8ClampedArray]",fw1="[object Uint16Array]",uw1="[object Uint32Array]",M2={};M2[_w]=M2[UV1]=M2[aw1]=M2[tw1]=M2[WV1]=M2[YV1]=M2[cw1]=M2[rw1]=M2[nw1]=M2[iw1]=M2[sw1]=M2[GV1]=M2[XV1]=M2[Aw]=M2[ZV1]=M2[QV1]=M2[KV1]=M2[JV1]=M2[ow1]=M2[lw1]=M2[fw1]=M2[uw1]=!0;M2[jV1]=M2[kw]=M2[ew1]=!1;function Zt(e,a,t,c,r,n){var i,s=a&RV1,l=a&IV1,f=a&$V1;if(t&&(i=r?t(e,c,r,n):t(e)),i!==void 0)return i;if(!Da(e))return e;var u=H8(e);if(u){if(i=rV1(e),!s)return KH1(e,i)}else{var h=b8(e),d=h==kw||h==qV1;if(ca(e))return Pb1(e,s);if(h==Aw||h==_w||d&&!r){if(i=l||d?{}:SV1(e),!s)return l?Yb1(e,Fb1(i,e)):$b1(e,Eb1(i,e))}else{if(!M2[h])return r?e:{};i=AV1(e,h,s)}}n||(n=new Re);var m=n.get(e);if(m)return m;n.set(e,i),OV1(e)?e.forEach(function(g){i.add(Zt(g,a,t,g,e,n))}):FV1(e)&&e.forEach(function(g,x){i.set(x,Zt(g,a,t,x,e,n))});var p=f?l?jb1:Rn:l?Es:Ts,v=u?void 0:p(e);return ey1(v||e,function(g,x){v&&(x=g,g=e[x]),dw(i,x,Zt(g,a,t,x,e,n))}),i}var hw1=1,dw1=4;function X8(e){return Zt(e,hw1|dw1)}var mw1="__lodash_hash_undefined__";function pw1(e){return this.__data__.set(e,mw1),this}function vw1(e){return this.__data__.has(e)}function _7(e){var a=-1,t=e==null?0:e.length;for(this.__data__=new E6;++a<t;)this.add(e[a])}_7.prototype.add=_7.prototype.push=pw1;_7.prototype.has=vw1;function gw1(e,a){for(var t=-1,c=e==null?0:e.length;++t<c;)if(a(e[t],t,e))return!0;return!1}function xw1(e,a){return e.has(a)}var Cw1=1,zw1=2;function Sw(e,a,t,c,r,n){var i=t&Cw1,s=e.length,l=a.length;if(s!=l&&!(i&&l>s))return!1;var f=n.get(e),u=n.get(a);if(f&&u)return f==a&&u==e;var h=-1,d=!0,m=t&zw1?new _7:void 0;for(n.set(e,a),n.set(a,e);++h<s;){var p=e[h],v=a[h];if(c)var g=i?c(v,p,h,a,e,n):c(p,v,h,e,a,n);if(g!==void 0){if(g)continue;d=!1;break}if(m){if(!gw1(a,function(x,z){if(!xw1(m,z)&&(p===x||r(p,x,t,c,n)))return m.push(z)})){d=!1;break}}else if(!(p===v||r(p,v,t,c,n))){d=!1;break}}return n.delete(e),n.delete(a),d}function Mw1(e){var a=-1,t=Array(e.size);return e.forEach(function(c,r){t[++a]=[r,c]}),t}function Hw1(e){var a=-1,t=Array(e.size);return e.forEach(function(c){t[++a]=c}),t}var yw1=1,bw1=2,Vw1="[object Boolean]",ww1="[object Date]",Lw1="[object Error]",_w1="[object Map]",kw1="[object Number]",Aw1="[object RegExp]",Sw1="[object Set]",Nw1="[object String]",Tw1="[object Symbol]",Ew1="[object ArrayBuffer]",Fw1="[object DataView]",yu=F0?F0.prototype:void 0,Ar=yu?yu.valueOf:void 0;function Dw1(e,a,t,c,r,n,i){switch(t){case Fw1:if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case Ew1:return!(e.byteLength!=a.byteLength||!n(new L7(e),new L7(a)));case Vw1:case ww1:case kw1:return ks(+e,+a);case Lw1:return e.name==a.name&&e.message==a.message;case Aw1:case Nw1:return e==a+"";case _w1:var s=Mw1;case Sw1:var l=c&yw1;if(s||(s=Hw1),e.size!=a.size&&!l)return!1;var f=i.get(e);if(f)return f==a;c|=bw1,i.set(e,a);var u=Sw(s(e),s(a),c,r,n,i);return i.delete(e),u;case Tw1:if(Ar)return Ar.call(e)==Ar.call(a)}return!1}var Pw1=1,Bw1=Object.prototype,Ow1=Bw1.hasOwnProperty;function Rw1(e,a,t,c,r,n){var i=t&Pw1,s=Rn(e),l=s.length,f=Rn(a),u=f.length;if(l!=u&&!i)return!1;for(var h=l;h--;){var d=s[h];if(!(i?d in a:Ow1.call(a,d)))return!1}var m=n.get(e),p=n.get(a);if(m&&p)return m==a&&p==e;var v=!0;n.set(e,a),n.set(a,e);for(var g=i;++h<l;){d=s[h];var x=e[d],z=a[d];if(c)var C=i?c(z,x,d,a,e,n):c(x,z,d,e,a,n);if(!(C===void 0?x===z||r(x,z,t,c,n):C)){v=!1;break}g||(g=d=="constructor")}if(v&&!g){var y=e.constructor,b=a.constructor;y!=b&&"constructor"in e&&"constructor"in a&&!(typeof y=="function"&&y instanceof y&&typeof b=="function"&&b instanceof b)&&(v=!1)}return n.delete(e),n.delete(a),v}var Iw1=1,bu="[object Arguments]",Vu="[object Array]",Ht="[object Object]",$w1=Object.prototype,wu=$w1.hasOwnProperty;function Uw1(e,a,t,c,r,n){var i=H8(e),s=H8(a),l=i?Vu:b8(e),f=s?Vu:b8(a);l=l==bu?Ht:l,f=f==bu?Ht:f;var u=l==Ht,h=f==Ht,d=l==f;if(d&&ca(e)){if(!ca(a))return!1;i=!0,u=!1}if(d&&!u)return n||(n=new Re),i||Ns(e)?Sw(e,a,t,c,r,n):Dw1(e,a,l,t,c,r,n);if(!(t&Iw1)){var m=u&&wu.call(e,"__wrapped__"),p=h&&wu.call(a,"__wrapped__");if(m||p){var v=m?e.value():e,g=p?a.value():a;return n||(n=new Re),r(v,g,t,c,n)}}return d?(n||(n=new Re),Rw1(e,a,t,c,r,n)):!1}function Nw(e,a,t,c,r){return e===a?!0:e==null||a==null||!y6(e)&&!y6(a)?e!==e&&a!==a:Uw1(e,a,t,c,Nw,r)}var Ww1="[object Map]",Yw1="[object Set]",jw1=Object.prototype,qw1=jw1.hasOwnProperty;function Gw1(e){if(e==null)return!0;if(As(e)&&(H8(e)||typeof e=="string"||typeof e.splice=="function"||ca(e)||Ns(e)||vw(e)))return!e.length;var a=b8(e);if(a==Ww1||a==Yw1)return!e.size;if(Bc(e))return!Mw(e).length;for(var t in e)if(qw1.call(e,t))return!1;return!0}function Lu(e,a){return Nw(e,a)}var Xw1=Object.defineProperty,Zw1=Object.defineProperties,Qw1=Object.getOwnPropertyDescriptors,_u=Object.getOwnPropertySymbols,Kw1=Object.prototype.hasOwnProperty,Jw1=Object.prototype.propertyIsEnumerable,ku=(e,a,t)=>a in e?Xw1(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,eL1=(e,a)=>{for(var t in a||(a={}))Kw1.call(a,t)&&ku(e,t,a[t]);if(_u)for(var t of _u(a))Jw1.call(a,t)&&ku(e,t,a[t]);return e},aL1=(e,a)=>Zw1(e,Qw1(a));function tL1(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(a=>`${a.charAt(0).toUpperCase()}${a.slice(1)}`).join("")}var I0=(e,a)=>{const t={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},c=tL1(e);return o.defineComponent({name:c,props:t,emits:{"labels:update":()=>!0,"chart:update":r=>!0,"chart:destroy":()=>!0,"chart:render":r=>!0},setup(r,{emit:n,expose:i}){const s=o.ref(null),l=`${r.chartId}`;let f=o.shallowRef(null);o.watch(()=>r.chartData,u,{deep:!0}),o.watch(()=>r.options,g=>{f.value&&g&&(f.value.options=X8(g),p())},{deep:!0});function u(g){if(f.value){let x=f.value;Lu(g.labels,f.value.data.labels)||(x.data.labels=g.labels,d()),Lu(g.datasets,f.value.data.datasets)||g.datasets.forEach((z,C)=>{var y,b;if(Gw1(z))x.data.datasets=[];else{const w=X8(x.data),H=Object.keys((b=(y=w.datasets)==null?void 0:y[C])!=null?b:{}),T=Object.keys(z);H.filter(U=>U!=="_meta"&&T.indexOf(U)===-1).forEach(U=>{x.data.datasets[C]&&delete x.data.datasets[C][U]});for(const U in z){const D=X8(z[U]);x.data.datasets[C]||(x.data.datasets[C]={}),z.hasOwnProperty(U)&&D!=null&&x&&(x.data.datasets[C][U]=D)}}}),p()}else f.value&&v(),h()}function h(){s.value?(f.value=new Ae(s.value,{data:X8(r.chartData),type:a,options:X8(r.options),plugins:r.plugins}),m()):console.error(`Error on component ${c}, canvas cannot be rendered. Check if the render appends server-side`)}function d(){n("labels:update"),r.onLabelsUpdate&&r.onLabelsUpdate()}function m(){f.value&&(n("chart:render",f.value),r.onChartRender&&r.onChartRender(f.value))}function p(){f.value&&(f.value.update(),n("chart:update",f.value),r.onChartUpdate&&r.onChartUpdate(f.value))}function v(){f.value&&f.value.destroy(),n("chart:destroy"),r.onChartDestroy&&r.onChartDestroy()}return o.onMounted(h),o.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),i({canvasRef:s,renderChart:h,chartInstance:f,canvasId:l,update:p}),()=>o.h("div",{style:aL1(eL1({maxWidth:"100%"},r.styles),{position:"relative"}),class:r.cssClasses},[o.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:r.width,height:r.height,ref:s})])}})};I0("bar-chart","bar");var cL1=I0("doughnut-chart","doughnut");I0("line-chart","line");I0("pie-chart","pie");I0("polar-chart","polarArea");I0("radar-chart","radar");I0("bubble-chart","bubble");I0("scatter-chart","scatter");const rL1=o.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){Ae.register(...xH1);const a={responsive:!0};return(t,c)=>(o.openBlock(),o.createBlock(o.unref(cL1),{chartData:t.data,options:t.options||a},null,8,["chartData","options"]))}}),nL1={key:0},iL1={key:1,class:"barcodes-container"},sL1=o.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){return(a,t)=>a.barcodes.length?(o.openBlock(),o.createElementBlock("div",iL1,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.barcodes,c=>(o.openBlock(),o.createElementBlock("span",{class:"barcode",key:c},[o.createVNode(x3,{icon:"barcode"}),o.createTextVNode("   "+o.toDisplayString(c),1)]))),128))])):(o.openBlock(),o.createElementBlock("span",nL1,"-"))}});const oL1=Y1(sL1,[["__scopeId","data-v-5291a54d"]]),lL1=["textContent"],fL1=["textContent"],uL1=o.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},withoutBackground:{type:Boolean}},setup(e){const a=e,t=o.computed(()=>a.datetime instanceof Date),c=o.computed(()=>t.value?new Intl.DateTimeFormat(o7(),{dateStyle:"medium"}).format(a.datetime):"-"),r=o.computed(()=>t.value?new Intl.DateTimeFormat(o7(),{hour:"2-digit",minute:"2-digit"}).format(a.datetime):"");return(n,i)=>{const s=o.resolveDirective("tooltip");return t.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["datetime-container",{"datetime-container__with-background":!n.withoutBackground}])},[o.createVNode(x3,{icon:"calendar-days"}),o.createElementVNode("span",{textContent:o.toDisplayString(c.value)},null,8,fL1)],2)),[[s,r.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(c.value)},null,8,lL1))}}});const hL1=Y1(uL1,[["__scopeId","data-v-cfeec1a4"]]),dL1={class:"info-card"},mL1={class:"info-card--icon-container"},pL1={class:"info-card--content-container"},vL1={class:"info-card--content"},gL1=["textContent"],xL1=o.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){o.useCssVars(i=>({"0816b123":r.value,"389d6c82":n.value}));const a=e,t=o.computed(()=>{if(a.type==="info")return"circle-info";if(a.type==="success")return"circle-check";if(a.type==="error")return"circle-xmark";if(a.type==="warning")return"circle-exclamation"}),c=o.computed(()=>{if(a.type==="info")return"aqua";if(a.type==="success")return"success";if(a.type==="error")return"danger";if(a.type==="warning")return"warning"}),r=o.computed(()=>`rgba(var(--pga-color-${c.value}-rgb), 0.8)`),n=o.computed(()=>`var(--pga-color-${c.value}-contrast)`);return(i,s)=>{const l=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",dL1,[o.createElementVNode("div",mL1,[o.createVNode(l,{class:"info-card--icon",icon:t.value},null,8,["icon"])]),o.createElementVNode("div",pL1,[o.createElementVNode("div",vL1,[i.info?(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(i.info)},null,8,gL1)):o.renderSlot(i.$slots,"default",{key:1},void 0,!0)])])])}}});const CL1=Y1(xL1,[["__scopeId","data-v-3f4f4235"]]),zL1={key:0,class:"no-items-container"},ML1={key:1,class:"no-items"},HL1=o.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const a=e,t=k3("pgaDisplayNoItems"),c=o.computed(()=>{var n;return!(((n=a.items)==null?void 0:n.length)>0)}),r=o.computed(()=>a.label?a.label:t("noItemsText"));return(n,i)=>c.value?(o.openBlock(),o.createElementBlock("div",zL1,[n.isLoading?(o.openBlock(),o.createBlock(_a,{key:0})):(o.openBlock(),o.createElementBlock("div",ML1,[n.preventDisplayIcon?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(x3,{key:0,class:"no-items--icon",icon:n.icon},null,8,["icon"])),o.createVNode(xe,{class:"no-items--text",text:r.value},null,8,["text"])]))])):o.createCommentVNode("",!0)}});const Tw=Y1(HL1,[["__scopeId","data-v-bd030077"]]),yL1=["textContent"],bL1={key:0,class:"price-sign",textContent:"$"},VL1=["textContent"],wL1=o.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},numOfDecimals:{},withoutSign:{type:Boolean},withoutBackground:{type:Boolean},isPositive:{type:Boolean,default:void 0}},setup(e){const a=e,t=o.computed(()=>a.price!==void 0),c=o.computed(()=>t.value?typeof a.price=="string"?a.price:l7(a.price,a.numOfDecimals):"-"),r=o.computed(()=>a.tooltipPrice===void 0?"":typeof a.tooltipPrice=="string"?a.tooltipPrice:`$ ${l7(a.tooltipPrice,a.numOfDecimals)}`);return(n,i)=>{const s=o.resolveDirective("tooltip");return t.value?o.withDirectives((o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["price-container",{"price-container__with-background":!n.withoutBackground}])},[n.withoutSign?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",bL1)),o.createElementVNode("span",{class:o.normalizeClass(["price",{price__positive:n.isPositive===!0,price__negative:n.isPositive===!1}]),textContent:o.toDisplayString(c.value)},null,10,VL1)],2)),[[s,r.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(c.value)},null,8,yL1))}}});const LL1=Y1(wL1,[["__scopeId","data-v-2a11260c"]]),_L1=o.defineComponent({__name:"PgaForm",props:{width:{default:"100%"}},setup(e){return o.useCssVars(a=>({dc4cd4cc:a.width})),(a,t)=>(o.openBlock(),o.createElementBlock("form",{class:"form",onSubmit:t[0]||(t[0]=o.withModifiers(()=>{},["prevent"]))},[o.renderSlot(a.$slots,"default",{},void 0,!0)],32))}});const Ew=Y1(_L1,[["__scopeId","data-v-572279a3"]]);const kL1={},AL1={class:"form-row"};function SL1(e,a){return o.openBlock(),o.createElementBlock("div",AL1,[o.renderSlot(e.$slots,"default",{},void 0,!0)])}const NL1=Y1(kL1,[["render",SL1],["__scopeId","data-v-21181519"]]);function Au(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,c)}return t}function s0(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?Au(Object(t),!0).forEach(function(c){TL1(e,c,t[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Au(Object(t)).forEach(function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(t,c))})}return e}function TL1(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function Su(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((t,c)=>(a.includes(c)||(t[c]=o.unref(e[c])),t),{})}function k7(e){return typeof e=="function"}function EL1(e){return o.isReactive(e)||o.isReadonly(e)}function Fw(e,a,t){let c=e;const r=a.split(".");for(let n=0;n<r.length;n++){if(!c[r[n]])return t;c=c[r[n]]}return c}function Sr(e,a,t){return o.computed(()=>e.some(c=>Fw(a,c,{[t]:!1})[t]))}function Nu(e,a,t){return o.computed(()=>e.reduce((c,r)=>{const n=Fw(a,r,{[t]:!1})[t]||[];return c.concat(n)},[]))}function Dw(e,a,t,c){return e.call(c,o.unref(a),o.unref(t),c)}function Pw(e){return e.$valid!==void 0?!e.$valid:!e}function FL1(e,a,t,c,r,n,i){let{$lazy:s,$rewardEarly:l}=r,f=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8?arguments[8]:void 0,h=arguments.length>9?arguments[9]:void 0,d=arguments.length>10?arguments[10]:void 0;const m=o.ref(!!c.value),p=o.ref(0);t.value=!1;const v=o.watch([a,c].concat(f,d),()=>{if(s&&!c.value||l&&!h.value&&!t.value)return;let g;try{g=Dw(e,a,u,i)}catch(x){g=Promise.reject(x)}p.value++,t.value=!!p.value,m.value=!1,Promise.resolve(g).then(x=>{p.value--,t.value=!!p.value,n.value=x,m.value=Pw(x)}).catch(x=>{p.value--,t.value=!!p.value,n.value=x,m.value=!0})},{immediate:!0,deep:typeof a=="object"});return{$invalid:m,$unwatch:v}}function DL1(e,a,t,c,r,n,i,s){let{$lazy:l,$rewardEarly:f}=c;const u=()=>({}),h=o.computed(()=>{if(l&&!t.value||f&&!s.value)return!1;let d=!0;try{const m=Dw(e,a,i,n);r.value=m,d=Pw(m)}catch(m){r.value=m}return d});return{$unwatch:u,$invalid:h}}function PL1(e,a,t,c,r,n,i,s,l,f,u){const h=o.ref(!1),d=e.$params||{},m=o.ref(null);let p,v;e.$async?{$invalid:p,$unwatch:v}=FL1(e.$validator,a,h,t,c,m,r,e.$watchTargets,l,f,u):{$invalid:p,$unwatch:v}=DL1(e.$validator,a,t,c,m,r,l,f);const g=e.$message;return{$message:k7(g)?o.computed(()=>g(Su({$pending:h,$invalid:p,$params:Su(d),$model:a,$response:m,$validator:n,$propertyPath:s,$property:i}))):g||"",$params:d,$pending:h,$invalid:p,$response:m,$unwatch:v}}function BL1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=o.unref(e),t=Object.keys(a),c={},r={},n={};let i=null;return t.forEach(s=>{const l=a[s];switch(!0){case k7(l.$validator):c[s]=l;break;case k7(l):c[s]={$validator:l};break;case s==="$validationGroups":i=l;break;case s.startsWith("$"):n[s]=l;break;default:r[s]=l}}),{rules:c,nestedValidators:r,config:n,validationGroups:i}}const OL1="__root";function RL1(e,a,t,c,r,n,i,s,l){const f=Object.keys(e),u=c.get(r,e),h=o.ref(!1),d=o.ref(!1),m=o.ref(0);if(u){if(!u.$partial)return u;u.$unwatch(),h.value=u.$dirty.value}const p={$dirty:h,$path:r,$touch:()=>{h.value||(h.value=!0)},$reset:()=>{h.value&&(h.value=!1)},$commit:()=>{}};return f.length?(f.forEach(v=>{p[v]=PL1(e[v],a,p.$dirty,n,i,v,t,r,l,d,m)}),p.$externalResults=o.computed(()=>s.value?[].concat(s.value).map((v,g)=>({$propertyPath:r,$property:t,$validator:"$externalResults",$uid:`${r}-externalResult-${g}`,$message:v,$params:{},$response:null,$pending:!1})):[]),p.$invalid=o.computed(()=>{const v=f.some(g=>o.unref(p[g].$invalid));return d.value=v,!!p.$externalResults.value.length||v}),p.$pending=o.computed(()=>f.some(v=>o.unref(p[v].$pending))),p.$error=o.computed(()=>p.$dirty.value?p.$pending.value||p.$invalid.value:!1),p.$silentErrors=o.computed(()=>f.filter(v=>o.unref(p[v].$invalid)).map(v=>{const g=p[v];return o.reactive({$propertyPath:r,$property:t,$validator:v,$uid:`${r}-${v}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(p.$externalResults.value)),p.$errors=o.computed(()=>p.$dirty.value?p.$silentErrors.value:[]),p.$unwatch=()=>f.forEach(v=>{p[v].$unwatch()}),p.$commit=()=>{d.value=!0,m.value=Date.now()},c.set(r,e,p),p):(u&&c.set(r,e,p),p)}function IL1(e,a,t,c,r,n,i){const s=Object.keys(e);return s.length?s.reduce((l,f)=>(l[f]=Wn({validations:e[f],state:a,key:f,parentKey:t,resultsCache:c,globalConfig:r,instance:n,externalResults:i}),l),{}):{}}function $L1(e,a,t){const c=o.computed(()=>[a,t].filter(p=>p).reduce((p,v)=>p.concat(Object.values(o.unref(v))),[])),r=o.computed({get(){return e.$dirty.value||(c.value.length?c.value.every(p=>p.$dirty):!1)},set(p){e.$dirty.value=p}}),n=o.computed(()=>{const p=o.unref(e.$silentErrors)||[],v=c.value.filter(g=>(o.unref(g).$silentErrors||[]).length).reduce((g,x)=>g.concat(...x.$silentErrors),[]);return p.concat(v)}),i=o.computed(()=>{const p=o.unref(e.$errors)||[],v=c.value.filter(g=>(o.unref(g).$errors||[]).length).reduce((g,x)=>g.concat(...x.$errors),[]);return p.concat(v)}),s=o.computed(()=>c.value.some(p=>p.$invalid)||o.unref(e.$invalid)||!1),l=o.computed(()=>c.value.some(p=>o.unref(p.$pending))||o.unref(e.$pending)||!1),f=o.computed(()=>c.value.some(p=>p.$dirty)||c.value.some(p=>p.$anyDirty)||r.value),u=o.computed(()=>r.value?l.value||s.value:!1),h=()=>{e.$touch(),c.value.forEach(p=>{p.$touch()})},d=()=>{e.$commit(),c.value.forEach(p=>{p.$commit()})},m=()=>{e.$reset(),c.value.forEach(p=>{p.$reset()})};return c.value.length&&c.value.every(p=>p.$dirty)&&h(),{$dirty:r,$errors:i,$invalid:s,$anyDirty:f,$error:u,$pending:l,$touch:h,$reset:m,$silentErrors:n,$commit:d}}function Wn(e){let{validations:a,state:t,key:c,parentKey:r,childResults:n,resultsCache:i,globalConfig:s={},instance:l,externalResults:f}=e;const u=r?`${r}.${c}`:c,{rules:h,nestedValidators:d,config:m,validationGroups:p}=BL1(a),v=s0(s0({},s),m),g=c?o.computed(()=>{const v1=o.unref(t);return v1?o.unref(v1[c]):void 0}):t,x=s0({},o.unref(f)||{}),z=o.computed(()=>{const v1=o.unref(f);return c?v1?o.unref(v1[c]):void 0:v1}),C=RL1(h,g,c,i,u,v,l,z,t),y=IL1(d,g,u,i,v,l,z),b={};p&&Object.entries(p).forEach(v1=>{let[r1,S]=v1;b[r1]={$invalid:Sr(S,y,"$invalid"),$error:Sr(S,y,"$error"),$pending:Sr(S,y,"$pending"),$errors:Nu(S,y,"$errors"),$silentErrors:Nu(S,y,"$silentErrors")}});const{$dirty:w,$errors:H,$invalid:T,$anyDirty:A,$error:U,$pending:D,$touch:k,$reset:j,$silentErrors:c1,$commit:F}=$L1(C,y,n),O=c?o.computed({get:()=>o.unref(g),set:v1=>{w.value=!0;const r1=o.unref(t),S=o.unref(f);S&&(S[c]=x[c]),o.isRef(r1[c])?r1[c].value=v1:r1[c]=v1}}):null;c&&v.$autoDirty&&o.watch(g,()=>{w.value||k();const v1=o.unref(f);v1&&(v1[c]=x[c])},{flush:"sync"});async function X(){return k(),v.$rewardEarly&&(F(),await o.nextTick()),await o.nextTick(),new Promise(v1=>{if(!D.value)return v1(!T.value);const r1=o.watch(D,()=>{v1(!T.value),r1()})})}function f1(v1){return(n.value||{})[v1]}function J(){o.isRef(f)?f.value=x:Object.keys(x).length===0?Object.keys(f).forEach(v1=>{delete f[v1]}):Object.assign(f,x)}return o.reactive(s0(s0(s0({},C),{},{$model:O,$dirty:w,$error:U,$errors:H,$invalid:T,$anyDirty:A,$pending:D,$touch:k,$reset:j,$path:u||OL1,$silentErrors:c1,$validate:X,$commit:F},n&&{$getResultsForChild:f1,$clearExternalResults:J,$validationGroups:b}),y))}class UL1{constructor(){this.storage=new Map}set(a,t,c){this.storage.set(a,{rules:t,result:c})}checkRulesValidity(a,t,c){const r=Object.keys(c),n=Object.keys(t);return n.length!==r.length||!n.every(s=>r.includes(s))?!1:n.every(s=>t[s].$params?Object.keys(t[s].$params).every(l=>o.unref(c[s].$params[l])===o.unref(t[s].$params[l])):!0)}get(a,t){const c=this.storage.get(a);if(!c)return;const{rules:r,result:n}=c,i=this.checkRulesValidity(a,t,r),s=n.$unwatch?n.$unwatch:()=>({});return i?n:{$dirty:n.$dirty,$partial:!0,$unwatch:s}}}const Qt={COLLECT_ALL:!0,COLLECT_NONE:!1},Tu=Symbol("vuelidate#injectChildResults"),Eu=Symbol("vuelidate#removeChildResults");function WL1(e){let{$scope:a,instance:t}=e;const c={},r=o.ref([]),n=o.computed(()=>r.value.reduce((u,h)=>(u[h]=o.unref(c[h]),u),{}));function i(u,h){let{$registerAs:d,$scope:m,$stopPropagation:p}=h;p||a===Qt.COLLECT_NONE||m===Qt.COLLECT_NONE||a!==Qt.COLLECT_ALL&&a!==m||(c[d]=u,r.value.push(d))}t.__vuelidateInjectInstances=[].concat(t.__vuelidateInjectInstances||[],i);function s(u){r.value=r.value.filter(h=>h!==u),delete c[u]}t.__vuelidateRemoveInstances=[].concat(t.__vuelidateRemoveInstances||[],s);const l=o.inject(Tu,[]);o.provide(Tu,t.__vuelidateInjectInstances);const f=o.inject(Eu,[]);return o.provide(Eu,t.__vuelidateRemoveInstances),{childResults:n,sendValidationResultsToParent:l,removeValidationResultsFromParent:f}}function Bw(e){return new Proxy(e,{get(a,t){return typeof a[t]=="object"?Bw(a[t]):o.computed(()=>a[t])}})}let Fu=0;function YL1(e,a){var t;let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(c=e,e=void 0,a=void 0);let{$registerAs:r,$scope:n=Qt.COLLECT_ALL,$stopPropagation:i,$externalResults:s,currentVueInstance:l}=c;const f=l||((t=o.getCurrentInstance())===null||t===void 0?void 0:t.proxy),u=f?f.$options:{};r||(Fu+=1,r=`_vuelidate_${Fu}`);const h=o.ref({}),d=new UL1,{childResults:m,sendValidationResultsToParent:p,removeValidationResultsFromParent:v}=f?WL1({$scope:n,instance:f}):{childResults:o.ref({})};if(!e&&u.validations){const g=u.validations;a=o.ref({}),o.onBeforeMount(()=>{a.value=f,o.watch(()=>k7(g)?g.call(a.value,new Bw(a.value)):g,x=>{h.value=Wn({validations:x,state:a,childResults:m,resultsCache:d,globalConfig:c,instance:f,externalResults:s||f.vuelidateExternalResults})},{immediate:!0})}),c=u.validationsConfig||c}else{const g=o.isRef(e)||EL1(e)?e:o.reactive(e||{});o.watch(g,x=>{h.value=Wn({validations:x,state:a,childResults:m,resultsCache:d,globalConfig:c,instance:f??{},externalResults:s})},{immediate:!0})}return f&&(p.forEach(g=>g(h,{$registerAs:r,$scope:n,$stopPropagation:i})),o.onBeforeUnmount(()=>v.forEach(g=>g(r)))),o.computed(()=>s0(s0({},o.unref(h.value)),m.value))}function Du(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,c)}return t}function ia(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?Du(Object(t),!0).forEach(function(c){jL1(e,c,t[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Du(Object(t)).forEach(function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(t,c))})}return e}function jL1(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function A7(e){return typeof e=="function"}function Yn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ic(e){return A7(e.$validator)?ia({},e):{$validator:e}}function Ow(e){return typeof e=="object"?e.$valid:e}function Rw(e){return e.$validator||e}function qL1(e,a){if(!Yn(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!Yn(a)&&!A7(a))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const t=Ic(a);return t.$params=ia(ia({},t.$params||{}),e),t}function GL1(e,a){if(!A7(e)&&typeof o.unref(e)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);if(!Yn(a)&&!A7(a))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const t=Ic(a);return t.$message=e,t}function XL1(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const t=Ic(e);return ia(ia({},t),{},{$async:!0,$watchTargets:a})}function ZL1(e){return{$validator(a){for(var t=arguments.length,c=new Array(t>1?t-1:0),r=1;r<t;r++)c[r-1]=arguments[r];return o.unref(a).reduce((n,i,s)=>{const l=Object.entries(i).reduce((f,u)=>{let[h,d]=u;const m=e[h]||{},p=Object.entries(m).reduce((v,g)=>{let[x,z]=g;const y=Rw(z).call(this,d,i,s,...c),b=Ow(y);if(v.$data[x]=y,v.$data.$invalid=!b||!!v.$data.$invalid,v.$data.$error=v.$data.$invalid,!b){let w=z.$message||"";const H=z.$params||{};typeof w=="function"&&(w=w({$pending:!1,$invalid:!b,$params:H,$model:d,$response:y})),v.$errors.push({$property:h,$message:w,$params:H,$response:y,$model:d,$pending:!1,$validator:x})}return{$valid:v.$valid&&b,$data:v.$data,$errors:v.$errors}},{$valid:!0,$data:{},$errors:[]});return f.$data[h]=p.$data,f.$errors[h]=p.$errors,{$valid:f.$valid&&p.$valid,$data:f.$data,$errors:f.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:n.$valid&&l.$valid,$data:n.$data.concat(l.$data),$errors:n.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:a=>{let{$response:t}=a;return t?t.$errors.map(c=>Object.values(c).map(r=>r.map(n=>n.$message)).reduce((r,n)=>r.concat(n),[])):[]}}}const Pa=e=>{if(e=o.unref(e),Array.isArray(e))return!!e.length;if(e==null)return!1;if(e===!1)return!0;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(let a in e)return!0;return!1}return!!String(e).length},Ps=e=>(e=o.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function $0(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];return c=>(c=o.unref(c),!Pa(c)||a.every(r=>(r.lastIndex=0,r.test(c))))}var n4=Object.freeze({__proto__:null,forEach:ZL1,len:Ps,normalizeValidatorObject:Ic,regex:$0,req:Pa,unwrap:o.unref,unwrapNormalizedValidator:Rw,unwrapValidatorResponse:Ow,withAsync:XL1,withMessage:GL1,withParams:qL1});$0(/^[a-zA-Z]*$/);$0(/^[a-zA-Z0-9]*$/);$0(/^\d*(\.\d+)?$/);const QL1=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;$0(QL1);function KL1(e){return a=>!Pa(a)||Ps(a)<=o.unref(e)}function JL1(e){return{$validator:KL1(e),$message:a=>{let{$params:t}=a;return`The maximum length allowed is ${t.max}`},$params:{max:e,type:"maxLength"}}}function e_1(e){return a=>!Pa(a)||Ps(a)>=o.unref(e)}function a_1(e){return{$validator:e_1(e),$message:a=>{let{$params:t}=a;return`This field should be at least ${t.min} characters long`},$params:{min:e,type:"minLength"}}}function t_1(e){return typeof e=="string"&&(e=e.trim()),Pa(e)}var jn={$validator:t_1,$message:"Value is required",$params:{type:"required"}};const c_1=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;$0(c_1);var r_1=$0(/(^[0-9]*$)|(^-[0-9]+$)/),n_1={$validator:r_1,$message:"Value is not an integer",$params:{type:"integer"}};$0(/^[-]?\d*(\.\d+)?$/);const i_1=o.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){o.useCssVars(t=>({f8e89dac:o.unref(a).input.height,"2a0421ea":o.unref(a).input.iconWidth,"8ece64be":o.unref(a).input.borderRadius,"01746c74":o.unref(a).input.backgroundColorFocus,"013b83ac":o.unref(a).input.backgroundColorHover}));const{formOptions:a}=_3.storeToRefs(I3());return(t,c)=>(o.openBlock(),o.createBlock(c3,{class:o.normalizeClass(["input-right-button",{"input-right-button__with-background":t.withBackground}]),buttonType:"flat",icon:t.icon,tabindex:"-1"},null,8,["class","icon"]))}});const S7=Y1(i_1,[["__scopeId","data-v-03b4f4d6"]]),s_1={class:"input-container"},o_1={class:"input-content"},l_1=["type","placeholder","autofocus","disabled"],Nr="",f_1=o.defineComponent({__name:"PgaInput",props:o.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:a,emit:t}){o.useCssVars(w=>({"4fdd10c3":o.unref(i).input.height,"4bdbaff5":o.unref(i).input.padding,"1a9c687b":o.unref(i).input.borderColor,"51c0567a":o.unref(i).input.borderRadius,"787346b9":o.unref(i).input.backgroundColor,"0f40a65e":o.unref(i).input.colorFocus,"45421c55":o.unref(i).input.backgroundColorDisabled,"8c044518":o.unref(i).input.paddingWithIcon,"249a5368":o.unref(i).input.placeholderColor}));const c=o.useModel(e,"modelValue"),r=e,n=t;a({focus:p});const{formOptions:i}=_3.storeToRefs(I3()),s=o.ref(),l=o.ref(Nr),f=o.ref(!1),u=o.computed(()=>{if(r.placeholder)return H0(r.placeholder)}),h=o.computed(()=>r.type==="password"),d=o.computed(()=>h.value?!1:!!(!r.disabled&&l.value)),m=o.computed(()=>!!(h.value||d.value));o.watch(c,w=>y(w),{immediate:!0});function p(){var w;(w=s.value)==null||w.focus()}function v(){r.type==="number"&&!l.value&&(l.value=Nr)}function g(){r.type==="number"&&!l.value&&(l.value=C())}function x(){b(Nr),n("valueCleared")}function z(w){return w===""?null:r.type==="number"&&r.integer&&typeof w=="number"?Math.round(w):w}function C(w){const H=typeof w>"u"?c.value:w;return H===null?"":H}function y(w){const H=z(w);return c.value=H,l.value=C(H),H}function b(w){const H=y(w);n("change",H)}return(w,H)=>(o.openBlock(),o.createBlock(Ke,{label:w.label,withOptionalLabel:w.withOptionalLabel,withLabelSpace:w.withLabelSpace,errors:w.errors,grow:w.grow},{default:o.withCtx(()=>[o.createElementVNode("div",s_1,[o.createElementVNode("div",o_1,[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":H[0]||(H[0]=T=>l.value=T),class:o.normalizeClass(["input",{input__disabled:w.disabled,"input__with-btn":m.value}]),type:f.value?"text":w.type,placeholder:u.value,autofocus:w.autofocus,disabled:w.disabled,onInput:H[1]||(H[1]=T=>b(l.value)),onKeyup:H[2]||(H[2]=o.withKeys(T=>n("enter"),["enter"])),onFocus:H[3]||(H[3]=T=>v()),onBlur:H[4]||(H[4]=T=>g())},null,42,l_1),[[o.vModelDynamic,l.value]]),h.value?(o.openBlock(),o.createBlock(S7,{key:0,icon:f.value?"eye-slash":"eye",withBackground:"",onClick:H[5]||(H[5]=T=>f.value=!f.value)},null,8,["icon"])):d.value?(o.openBlock(),o.createBlock(S7,{key:1,icon:"xmark",onClick:H[6]||(H[6]=T=>x())})):o.createCommentVNode("",!0)]),o.renderSlot(w.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const N7=Y1(f_1,[["__scopeId","data-v-4e1c9d88"]]),u_1={class:"user-icon-container"},h_1=o.defineComponent({__name:"PgaLoginForm",props:{isLoading:{type:Boolean}},emits:["login"],setup(e,{emit:a}){class t{constructor(){l1(this,"username","");l1(this,"password","")}}const c=a,r=k3("pgaLoginForm"),n={username:{required:n4.withMessage(()=>r("inputValidationErrorUsernameRequired"),jn)},password:{required:n4.withMessage(()=>r("inputValidationErrorPasswordRequired"),jn)}},i=o.ref(new t),s=YL1(n,i);async function l(){await s.value.$validate()&&c("login",i.value)}return(f,u)=>(o.openBlock(),o.createBlock(Ew,{class:"login-form"},{default:o.withCtx(()=>[o.createElementVNode("div",u_1,[o.createVNode(x3,{class:"user-icon",icon:"user"})]),o.createVNode(N7,{modelValue:i.value.username,"onUpdate:modelValue":u[0]||(u[0]=h=>i.value.username=h),label:o.unref(r)("inputLabelUsername"),errors:o.unref(s).username.$errors,disabled:f.isLoading},null,8,["modelValue","label","errors","disabled"]),o.createVNode(N7,{modelValue:i.value.password,"onUpdate:modelValue":u[1]||(u[1]=h=>i.value.password=h),type:"password",label:o.unref(r)("inputLabelPassword"),errors:o.unref(s).password.$errors,disabled:f.isLoading},null,8,["modelValue","label","errors","disabled"]),o.createVNode(c3,{type:"submit",icon:"right-to-bracket",text:o.unref(r)("loginBtn"),isLoading:f.isLoading,onClick:u[2]||(u[2]=h=>l())},null,8,["text","isLoading"])]),_:1}))}});const d_1=Y1(h_1,[["__scopeId","data-v-d3a09f59"]]),m_1={class:"pga-checkbox"},p_1=["textContent"],v_1=o.defineComponent({__name:"PgaCheckbox",props:o.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=o.useModel(e,"modelValue");return(t,c)=>(o.openBlock(),o.createElementBlock("label",m_1,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>a.value=r),type:"checkbox"},null,512),[[o.vModelCheckbox,a.value]]),t.label?(o.openBlock(),o.createElementBlock("span",{key:0,class:"checkbox--label",textContent:o.toDisplayString(t.label)},null,8,p_1)):o.createCommentVNode("",!0)]))}});const g_1=Y1(v_1,[["__scopeId","data-v-89f11c66"]]),x_1={class:"colors-container"},C_1=o.defineComponent({__name:"PgaColorSelector",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({fe5cd23e:o.unref(t).input.padding,f9a60d32:o.unref(t).input.borderColor,"097c39e4":o.unref(t).input.borderRadius}));const a=o.useModel(e,"modelValue"),{formOptions:t}=_3.storeToRefs(I3());return(c,r)=>(o.openBlock(),o.createBlock(Ke,{label:c.label,withOptionalLabel:c.withOptionalLabel,withLabelSpace:c.withLabelSpace,errors:c.errors,grow:c.grow},{default:o.withCtx(()=>[o.createElementVNode("div",x_1,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(m5),n=>(o.openBlock(),o.createBlock(c3,{key:n,buttonType:a.value===n?"outlined":"flat",color:a.value===n?"primary":"first",disabled:c.disabled,onClick:i=>a.value=n},{default:o.withCtx(()=>[o.createVNode(Cb,{color:n},null,8,["color"])]),_:2},1032,["buttonType","color","disabled","onClick"]))),128))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const z_1=Y1(C_1,[["__scopeId","data-v-ec1f389c"]]),M_1={class:"icons-container"},H_1=o.defineComponent({__name:"PgaIconSelector",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(r=>({adce17e0:o.unref(t).input.padding,51142716:o.unref(t).input.borderColor,"2b7f2982":o.unref(t).input.borderRadius}));const a=o.useModel(e,"modelValue"),{formOptions:t}=_3.storeToRefs(I3()),c=["star","heart","envelope","plus","minus","pen","edit","check","trash","file","clipboard","bell","calendar","clock","money-check-dollar","gift","percent","magnifying-glass-dollar","house","car","store","gamepad","mobile","school","shirt","user-doctor","face-smile","face-frown-open","cog","lock","bug","camera","code","headphones","wifi","user","search","home","arrow-right-arrow-left","circle"];return(r,n)=>(o.openBlock(),o.createBlock(Ke,{label:r.label,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,errors:r.errors,grow:r.grow},{default:o.withCtx(()=>[o.createElementVNode("div",M_1,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(c,i=>o.createVNode(c3,{key:i,icon:i,buttonType:a.value===i?"outlined":"flat",color:a.value===i?"primary":"grey",width:"2.5em",disabled:r.disabled,onClick:s=>a.value=i},null,8,["icon","buttonType","color","disabled","onClick"])),64))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const y_1=Y1(H_1,[["__scopeId","data-v-276ff5b1"]]),w0=_3.defineStore("pga-notifications",()=>{const e=o.ref(1),a=o.ref([]);return{currentId:e,notifications:a}});function Iw(e,a){const t=w0().currentId++,c={id:t,type:e,message:a,timeout:void 0},r=I3().notificationsOptions.timeoutTime;return r!=="none"&&(c.timeout=setTimeout(()=>Bs(t),r)),w0().notifications.push(c),t}function Bs(e){const a=w0().notifications.find(c=>c.id===e);a&&a.timeout&&clearTimeout(a.timeout);const t=w0().notifications.filter(c=>c.id!==e);w0().notifications=t}function $w(){w0().notifications.forEach(e=>{e.timeout&&clearTimeout(e.timeout)}),w0().notifications=[]}const b_1={class:"input-file"},V_1=["accept","disabled"],w_1={class:"input-file--name-container"},L_1=["textContent"],__1=o.defineComponent({__name:"PgaInputFile",props:{label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},acceptedFormats:{default:"*"},errors:{},disabled:{type:Boolean},grow:{}},emits:["newFile"],setup(e,{expose:a,emit:t}){o.useCssVars(z=>({"85d5b71e":o.unref(n).input.borderColor,"0341cd78":o.unref(n).input.borderRadius,"77a117af":o.unref(n).input.backgroundColor,d97f9266:o.unref(n).input.backgroundColorHover,"493ad16a":o.unref(n).input.backgroundColorDisabled}));const c=e,r=t;a({click:p,resetInput:v});const{formOptions:n}=_3.storeToRefs(I3()),i=k3("pgaInputFile"),s=o.ref(),l=o.ref(),f=o.ref(!1),u=o.ref(!1),h=o.computed(()=>c.acceptedFormats==="*"?"*":c.acceptedFormats.map(z=>`.${z}`).join(",")),d=o.computed(()=>f.value&&!u.value&&!c.disabled||!l.value?{icon:"upload"}:x(l.value)?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}),m=o.computed(()=>l.value?l.value.name:i("selectFileLabel"));function p(){var z;(z=s.value)==null||z.click()}function v(){l.value=null,s.value&&(s.value.value="")}function g(z){f.value=!1;const y=z.target.files[0];y&&(l.value=y,x(y)?r("newFile",y):Iw("danger",()=>i("newFileError")))}function x(z){if(!z)return!1;if(c.acceptedFormats==="*")return!0;const C=z.name.split(".").pop();return!!c.acceptedFormats.includes(C)}return(z,C)=>(o.openBlock(),o.createBlock(Ke,{label:z.label,withOptionalLabel:z.withOptionalLabel,withLabelSpace:z.withLabelSpace,errors:z.errors,grow:z.grow},{default:o.withCtx(()=>[o.createElementVNode("div",b_1,[o.createElementVNode("input",{ref_key:"inputRef",ref:s,id:"input-file",class:"input-file--input",type:"file",accept:h.value,disabled:z.disabled,onChange:C[0]||(C[0]=y=>g(y))},null,40,V_1),o.createElementVNode("label",{for:"input-file",class:o.normalizeClass(["input-file--custom-input",{"input-file--custom-input__disabled":z.disabled}]),onMouseenter:C[4]||(C[4]=y=>f.value=!0),onMouseleave:C[5]||(C[5]=y=>f.value=!1)},[o.createVNode(x3,{class:"input-file--icon",icon:d.value.icon,color:d.value.color},null,8,["icon","color"]),o.createElementVNode("div",w_1,[o.createElementVNode("span",{class:"input-file--name",textContent:o.toDisplayString(m.value)},null,8,L_1)]),l.value?(o.openBlock(),o.createBlock(c3,{key:0,text:o.unref(i)("removeBtn"),buttonType:"flat",color:"danger",size:"xs",disabled:z.disabled,onMouseenter:C[1]||(C[1]=y=>u.value=!0),onMouseleave:C[2]||(C[2]=y=>u.value=!1),onClick:C[3]||(C[3]=o.withModifiers(y=>v(),["prevent"]))},null,8,["text","disabled"])):o.createCommentVNode("",!0)],34)])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const Os=Y1(__1,[["__scopeId","data-v-17525c07"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Uw=1252,k_1=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Rs={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Is=function(e){k_1.indexOf(e)!=-1&&(Uw=Rs[0]=e)};function A_1(){Is(1252)}var P4=function(e){Is(e)};function Ww(){P4(1200),A_1()}function Pu(e){for(var a=[],t=0,c=e.length;t<c;++t)a[t]=e.charCodeAt(t);return a}function S_1(e){for(var a=[],t=0;t<e.length>>1;++t)a[t]=String.fromCharCode(e.charCodeAt(2*t)+(e.charCodeAt(2*t+1)<<8));return a.join("")}function Yw(e){for(var a=[],t=0;t<e.length>>1;++t)a[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return a.join("")}var r5=function(e){var a=e.charCodeAt(0),t=e.charCodeAt(1);return a==255&&t==254?S_1(e.slice(2)):a==254&&t==255?Yw(e.slice(2)):a==65279?e.slice(1):e},yt=function(a){return String.fromCharCode(a)},Bu=function(a){return String.fromCharCode(a)},o0,g0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Ou(e){for(var a="",t=0,c=0,r=0,n=0,i=0,s=0,l=0,f=0;f<e.length;)t=e.charCodeAt(f++),n=t>>2,c=e.charCodeAt(f++),i=(t&3)<<4|c>>4,r=e.charCodeAt(f++),s=(c&15)<<2|r>>6,l=r&63,isNaN(c)?s=l=64:isNaN(r)&&(l=64),a+=g0.charAt(n)+g0.charAt(i)+g0.charAt(s)+g0.charAt(l);return a}function h4(e){var a="",t=0,c=0,r=0,n=0,i=0,s=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f<e.length;)n=g0.indexOf(e.charAt(f++)),i=g0.indexOf(e.charAt(f++)),t=n<<2|i>>4,a+=String.fromCharCode(t),s=g0.indexOf(e.charAt(f++)),c=(i&15)<<4|s>>2,s!==64&&(a+=String.fromCharCode(c)),l=g0.indexOf(e.charAt(f++)),r=(s&3)<<6|l,l!==64&&(a+=String.fromCharCode(r));return a}var t2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),F6=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(a,t){return t?new Buffer(a,t):new Buffer(a)}:Buffer.from.bind(Buffer)}return function(){}}();function D0(e){return t2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Ru(e){return t2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var T4=function(a){return t2?F6(a,"binary"):a.split("").map(function(t){return t.charCodeAt(0)&255})};function D6(e){if(Array.isArray(e))return e.map(function(c){return String.fromCharCode(c)}).join("");for(var a=[],t=0;t<e.length;++t)a[t]=String.fromCharCode(e[t]);return a.join("")}function $s(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return $s(new Uint8Array(e));for(var a=new Array(e.length),t=0;t<e.length;++t)a[t]=e[t];return a}var l0=t2?function(e){return Buffer.concat(e.map(function(a){return Buffer.isBuffer(a)?a:F6(a)}))}:function(e){if(typeof Uint8Array<"u"){var a=0,t=0;for(a=0;a<e.length;++a)t+=e[a].length;var c=new Uint8Array(t),r=0;for(a=0,t=0;a<e.length;t+=r,++a)if(r=e[a].length,e[a]instanceof Uint8Array)c.set(e[a],t);else{if(typeof e[a]=="string")throw"wtf";c.set(new Uint8Array(e[a]),t)}return c}return[].concat.apply([],e.map(function(n){return Array.isArray(n)?n:[].slice.call(n)}))};function N_1(e){for(var a=[],t=0,c=e.length+250,r=D0(e.length+255),n=0;n<e.length;++n){var i=e.charCodeAt(n);if(i<128)r[t++]=i;else if(i<2048)r[t++]=192|i>>6&31,r[t++]=128|i&63;else if(i>=55296&&i<57344){i=(i&1023)+64;var s=e.charCodeAt(++n)&1023;r[t++]=240|i>>8&7,r[t++]=128|i>>2&63,r[t++]=128|s>>6&15|(i&3)<<4,r[t++]=128|s&63}else r[t++]=224|i>>12&15,r[t++]=128|i>>6&63,r[t++]=128|i&63;t>c&&(a.push(r.slice(0,t)),t=0,r=D0(65535),c=65530)}return a.push(r.slice(0,t)),l0(a)}var X3=/\u0000/g,n5=/[\u0001-\u0006]/g;function o8(e){for(var a="",t=e.length-1;t>=0;)a+=e.charAt(t--);return a}function B4(e,a){var t=""+e;return t.length>=a?t:W2("0",a-t.length)+t}function Us(e,a){var t=""+e;return t.length>=a?t:W2(" ",a-t.length)+t}function T7(e,a){var t=""+e;return t.length>=a?t:t+W2(" ",a-t.length)}function T_1(e,a){var t=""+Math.round(e);return t.length>=a?t:W2("0",a-t.length)+t}function E_1(e,a){var t=""+e;return t.length>=a?t:W2("0",a-t.length)+t}var Iu=Math.pow(2,32);function q6(e,a){if(e>Iu||e<-Iu)return T_1(e,a);var t=Math.round(e);return E_1(t,a)}function E7(e,a){return a=a||0,e.length>=7+a&&(e.charCodeAt(a)|32)===103&&(e.charCodeAt(a+1)|32)===101&&(e.charCodeAt(a+2)|32)===110&&(e.charCodeAt(a+3)|32)===101&&(e.charCodeAt(a+4)|32)===114&&(e.charCodeAt(a+5)|32)===97&&(e.charCodeAt(a+6)|32)===108}var $u=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Tr=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function F_1(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var j1={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Uu={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},D_1={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function F7(e,a,t){for(var c=e<0?-1:1,r=e*c,n=0,i=1,s=0,l=1,f=0,u=0,h=Math.floor(r);f<a&&(h=Math.floor(r),s=h*i+n,u=h*f+l,!(r-h<5e-8));)r=1/(r-h),n=i,i=s,l=f,f=u;if(u>a&&(f>a?(u=l,s=n):(u=f,s=i)),!t)return[0,c*s,u];var d=Math.floor(c*s/u);return[d,c*s-d*u,u]}function u6(e,a,t){if(e>2958465||e<0)return null;var c=e|0,r=Math.floor(86400*(e-c)),n=0,i=[],s={D:c,T:r,u:86400*(e-c)-r,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),a&&a.date1904&&(c+=1462),s.u>.9999&&(s.u=0,++r==86400&&(s.T=r=0,++c,++s.D)),c===60)i=t?[1317,10,29]:[1900,2,29],n=3;else if(c===0)i=t?[1317,8,29]:[1900,1,0],n=6;else{c>60&&--c;var l=new Date(1900,0,1);l.setDate(l.getDate()+c-1),i=[l.getFullYear(),l.getMonth()+1,l.getDate()],n=l.getDay(),c<60&&(n=(n+6)%7),t&&(n=$_1(l,i))}return s.y=i[0],s.m=i[1],s.d=i[2],s.S=r%60,r=Math.floor(r/60),s.M=r%60,r=Math.floor(r/60),s.H=r,s.q=n,s}var jw=new Date(1899,11,31,0,0,0),P_1=jw.getTime(),B_1=new Date(1900,2,1,0,0,0);function qw(e,a){var t=e.getTime();return a?t-=1461*24*60*60*1e3:e>=B_1&&(t+=24*60*60*1e3),(t-(P_1+(e.getTimezoneOffset()-jw.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Ws(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function O_1(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function R_1(e){var a=e<0?12:11,t=Ws(e.toFixed(12));return t.length<=a||(t=e.toPrecision(10),t.length<=a)?t:e.toExponential(5)}function I_1(e){var a=Ws(e.toFixed(11));return a.length>(e<0?12:11)||a==="0"||a==="-0"?e.toPrecision(6):a}function sa(e){var a=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),t;return a>=-4&&a<=-1?t=e.toPrecision(10+a):Math.abs(a)<=9?t=R_1(e):a===10?t=e.toFixed(10).substr(0,12):t=I_1(e),Ws(O_1(t.toUpperCase()))}function V6(e,a){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):sa(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return M4(14,qw(e,a&&a.date1904),a)}throw new Error("unsupported value in General format: "+e)}function $_1(e,a){a[0]-=581;var t=e.getDay();return e<60&&(t=(t+6)%7),t}function U_1(e,a,t,c){var r="",n=0,i=0,s=t.y,l,f=0;switch(e){case 98:s=t.y+543;case 121:switch(a.length){case 1:case 2:l=s%100,f=2;break;default:l=s%1e4,f=4;break}break;case 109:switch(a.length){case 1:case 2:l=t.m,f=a.length;break;case 3:return Tr[t.m-1][1];case 5:return Tr[t.m-1][0];default:return Tr[t.m-1][2]}break;case 100:switch(a.length){case 1:case 2:l=t.d,f=a.length;break;case 3:return $u[t.q][0];default:return $u[t.q][1]}break;case 104:switch(a.length){case 1:case 2:l=1+(t.H+11)%12,f=a.length;break;default:throw"bad hour format: "+a}break;case 72:switch(a.length){case 1:case 2:l=t.H,f=a.length;break;default:throw"bad hour format: "+a}break;case 77:switch(a.length){case 1:case 2:l=t.M,f=a.length;break;default:throw"bad minute format: "+a}break;case 115:if(a!="s"&&a!="ss"&&a!=".0"&&a!=".00"&&a!=".000")throw"bad second format: "+a;return t.u===0&&(a=="s"||a=="ss")?B4(t.S,a.length):(c>=2?i=c===3?1e3:100:i=c===1?10:1,n=Math.round(i*(t.S+t.u)),n>=60*i&&(n=0),a==="s"?n===0?"0":""+n/i:(r=B4(n,2+c),a==="ss"?r.substr(0,2):"."+r.substr(2,a.length-1)));case 90:switch(a){case"[h]":case"[hh]":l=t.D*24+t.H;break;case"[m]":case"[mm]":l=(t.D*24+t.H)*60+t.M;break;case"[s]":case"[ss]":l=((t.D*24+t.H)*60+t.M)*60+Math.round(t.S+t.u);break;default:throw"bad abstime format: "+a}f=a.length===3?1:2;break;case 101:l=s,f=1;break}var u=f>0?B4(l,f):"";return u}function x0(e){var a=3;if(e.length<=a)return e;for(var t=e.length%a,c=e.substr(0,t);t!=e.length;t+=a)c+=(c.length>0?",":"")+e.substr(t,a);return c}var Gw=/%/g;function W_1(e,a,t){var c=a.replace(Gw,""),r=a.length-c.length;return Ie(e,c,t*Math.pow(10,2*r))+W2("%",r)}function Y_1(e,a,t){for(var c=a.length-1;a.charCodeAt(c-1)===44;)--c;return Ie(e,a.substr(0,c),t/Math.pow(10,3*(a.length-c)))}function Xw(e,a){var t,c=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+Xw(e,-a);var r=e.indexOf(".");r===-1&&(r=e.indexOf("E"));var n=Math.floor(Math.log(a)*Math.LOG10E)%r;if(n<0&&(n+=r),t=(a/Math.pow(10,n)).toPrecision(c+1+(r+n)%r),t.indexOf("e")===-1){var i=Math.floor(Math.log(a)*Math.LOG10E);for(t.indexOf(".")===-1?t=t.charAt(0)+"."+t.substr(1)+"E+"+(i-t.length+n):t+="E+"+(i-n);t.substr(0,2)==="0.";)t=t.charAt(0)+t.substr(2,r)+"."+t.substr(2+r),t=t.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(r+n)%r)+"."+u.substr(n)+"E"})}else t=a.toExponential(c);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}var Zw=/# (\?+)( ?)\/( ?)(\d+)/;function j_1(e,a,t){var c=parseInt(e[4],10),r=Math.round(a*c),n=Math.floor(r/c),i=r-n*c,s=c;return t+(n===0?"":""+n)+" "+(i===0?W2(" ",e[1].length+1+e[4].length):Us(i,e[1].length)+e[2]+"/"+e[3]+B4(s,e[4].length))}function q_1(e,a,t){return t+(a===0?"":""+a)+W2(" ",e[1].length+2+e[4].length)}var Qw=/^#*0*\.([0#]+)/,Kw=/\).*[0#]/,Jw=/\(###\) ###\\?-####/;function j3(e){for(var a="",t,c=0;c!=e.length;++c)switch(t=e.charCodeAt(c)){case 35:break;case 63:a+=" ";break;case 48:a+="0";break;default:a+=String.fromCharCode(t)}return a}function Wu(e,a){var t=Math.pow(10,a);return""+Math.round(e*t)/t}function Yu(e,a){var t=e-Math.floor(e),c=Math.pow(10,a);return a<(""+Math.round(t*c)).length?0:Math.round(t*c)}function G_1(e,a){return a<(""+Math.round((e-Math.floor(e))*Math.pow(10,a))).length?1:0}function X_1(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function g4(e,a,t){if(e.charCodeAt(0)===40&&!a.match(Kw)){var c=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?g4("n",c,t):"("+g4("n",c,-t)+")"}if(a.charCodeAt(a.length-1)===44)return Y_1(e,a,t);if(a.indexOf("%")!==-1)return W_1(e,a,t);if(a.indexOf("E")!==-1)return Xw(a,t);if(a.charCodeAt(0)===36)return"$"+g4(e,a.substr(a.charAt(1)==" "?2:1),t);var r,n,i,s,l=Math.abs(t),f=t<0?"-":"";if(a.match(/^00+$/))return f+q6(l,a.length);if(a.match(/^[#?]+$/))return r=q6(t,0),r==="0"&&(r=""),r.length>a.length?r:j3(a.substr(0,a.length-r.length))+r;if(n=a.match(Zw))return j_1(n,l,f);if(a.match(/^#+0+$/))return f+q6(l,a.length-a.indexOf("0"));if(n=a.match(Qw))return r=Wu(t,n[1].length).replace(/^([^\.]+)$/,"$1."+j3(n[1])).replace(/\.$/,"."+j3(n[1])).replace(/\.(\d*)$/,function(p,v){return"."+v+W2("0",j3(n[1]).length-v.length)}),a.indexOf("0.")!==-1?r:r.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),n=a.match(/^(0*)\.(#*)$/))return f+Wu(l,n[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=a.match(/^#{1,3},##0(\.?)$/))return f+x0(q6(l,0));if(n=a.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+g4(e,a,-t):x0(""+(Math.floor(t)+G_1(t,n[1].length)))+"."+B4(Yu(t,n[1].length),n[1].length);if(n=a.match(/^#,#*,#0/))return g4(e,a.replace(/^#,#*,/,""),t);if(n=a.match(/^([0#]+)(\\?-([0#]+))+$/))return r=o8(g4(e,a.replace(/[\\-]/g,""),t)),i=0,o8(o8(a.replace(/\\/g,"")).replace(/[0#]/g,function(p){return i<r.length?r.charAt(i++):p==="0"?"0":""}));if(a.match(Jw))return r=g4(e,"##########",t),"("+r.substr(0,3)+") "+r.substr(3,3)+"-"+r.substr(6);var u="";if(n=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(n[4].length,7),s=F7(l,Math.pow(10,i)-1,!1),r=""+f,u=Ie("n",n[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),r+=u+n[2]+"/"+n[3],u=T7(s[2],i),u.length<n[4].length&&(u=j3(n[4].substr(n[4].length-u.length))+u),r+=u,r;if(n=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(n[1].length,n[4].length),7),s=F7(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Us(s[1],i)+n[2]+"/"+n[3]+T7(s[2],i):W2(" ",2*i+1+n[2].length+n[3].length));if(n=a.match(/^[#0?]+$/))return r=q6(t,0),a.length<=r.length?r:j3(a.substr(0,a.length-r.length))+r;if(n=a.match(/^([#0?]+)\.([#0]+)$/)){r=""+t.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),i=r.indexOf(".");var h=a.indexOf(".")-i,d=a.length-r.length-h;return j3(a.substr(0,h)+r+a.substr(a.length-d))}if(n=a.match(/^00,000\.([#0]*0)$/))return i=Yu(t,n[1].length),t<0?"-"+g4(e,a,-t):x0(X_1(t)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?B4(0,3-p.length):"")+p})+"."+B4(i,n[1].length);switch(a){case"###,##0.00":return g4(e,"#,##0.00",t);case"###,###":case"##,###":case"#,###":var m=x0(q6(l,0));return m!=="0"?f+m:"";case"###,###.00":return g4(e,"###,##0.00",t).replace(/^0\./,".");case"#,###.00":return g4(e,"#,##0.00",t).replace(/^0\./,".")}throw new Error("unsupported format |"+a+"|")}function Z_1(e,a,t){for(var c=a.length-1;a.charCodeAt(c-1)===44;)--c;return Ie(e,a.substr(0,c),t/Math.pow(10,3*(a.length-c)))}function Q_1(e,a,t){var c=a.replace(Gw,""),r=a.length-c.length;return Ie(e,c,t*Math.pow(10,2*r))+W2("%",r)}function eL(e,a){var t,c=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+eL(e,-a);var r=e.indexOf(".");r===-1&&(r=e.indexOf("E"));var n=Math.floor(Math.log(a)*Math.LOG10E)%r;if(n<0&&(n+=r),t=(a/Math.pow(10,n)).toPrecision(c+1+(r+n)%r),!t.match(/[Ee]/)){var i=Math.floor(Math.log(a)*Math.LOG10E);t.indexOf(".")===-1?t=t.charAt(0)+"."+t.substr(1)+"E+"+(i-t.length+n):t+="E+"+(i-n),t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(r+n)%r)+"."+u.substr(n)+"E"})}else t=a.toExponential(c);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}function ae(e,a,t){if(e.charCodeAt(0)===40&&!a.match(Kw)){var c=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?ae("n",c,t):"("+ae("n",c,-t)+")"}if(a.charCodeAt(a.length-1)===44)return Z_1(e,a,t);if(a.indexOf("%")!==-1)return Q_1(e,a,t);if(a.indexOf("E")!==-1)return eL(a,t);if(a.charCodeAt(0)===36)return"$"+ae(e,a.substr(a.charAt(1)==" "?2:1),t);var r,n,i,s,l=Math.abs(t),f=t<0?"-":"";if(a.match(/^00+$/))return f+B4(l,a.length);if(a.match(/^[#?]+$/))return r=""+t,t===0&&(r=""),r.length>a.length?r:j3(a.substr(0,a.length-r.length))+r;if(n=a.match(Zw))return q_1(n,l,f);if(a.match(/^#+0+$/))return f+B4(l,a.length-a.indexOf("0"));if(n=a.match(Qw))return r=(""+t).replace(/^([^\.]+)$/,"$1."+j3(n[1])).replace(/\.$/,"."+j3(n[1])),r=r.replace(/\.(\d*)$/,function(p,v){return"."+v+W2("0",j3(n[1]).length-v.length)}),a.indexOf("0.")!==-1?r:r.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),n=a.match(/^(0*)\.(#*)$/))return f+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=a.match(/^#{1,3},##0(\.?)$/))return f+x0(""+l);if(n=a.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+ae(e,a,-t):x0(""+t)+"."+W2("0",n[1].length);if(n=a.match(/^#,#*,#0/))return ae(e,a.replace(/^#,#*,/,""),t);if(n=a.match(/^([0#]+)(\\?-([0#]+))+$/))return r=o8(ae(e,a.replace(/[\\-]/g,""),t)),i=0,o8(o8(a.replace(/\\/g,"")).replace(/[0#]/g,function(p){return i<r.length?r.charAt(i++):p==="0"?"0":""}));if(a.match(Jw))return r=ae(e,"##########",t),"("+r.substr(0,3)+") "+r.substr(3,3)+"-"+r.substr(6);var u="";if(n=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(n[4].length,7),s=F7(l,Math.pow(10,i)-1,!1),r=""+f,u=Ie("n",n[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),r+=u+n[2]+"/"+n[3],u=T7(s[2],i),u.length<n[4].length&&(u=j3(n[4].substr(n[4].length-u.length))+u),r+=u,r;if(n=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(n[1].length,n[4].length),7),s=F7(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Us(s[1],i)+n[2]+"/"+n[3]+T7(s[2],i):W2(" ",2*i+1+n[2].length+n[3].length));if(n=a.match(/^[#0?]+$/))return r=""+t,a.length<=r.length?r:j3(a.substr(0,a.length-r.length))+r;if(n=a.match(/^([#0]+)\.([#0]+)$/)){r=""+t.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),i=r.indexOf(".");var h=a.indexOf(".")-i,d=a.length-r.length-h;return j3(a.substr(0,h)+r+a.substr(a.length-d))}if(n=a.match(/^00,000\.([#0]*0)$/))return t<0?"-"+ae(e,a,-t):x0(""+t).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?B4(0,3-p.length):"")+p})+"."+B4(0,n[1].length);switch(a){case"###,###":case"##,###":case"#,###":var m=x0(""+l);return m!=="0"?f+m:"";default:if(a.match(/\.[0#?]*$/))return ae(e,a.slice(0,a.lastIndexOf(".")),t)+j3(a.slice(a.lastIndexOf(".")))}throw new Error("unsupported format |"+a+"|")}function Ie(e,a,t){return(t|0)===t?ae(e,a,t):g4(e,a,t)}function K_1(e){for(var a=[],t=!1,c=0,r=0;c<e.length;++c)switch(e.charCodeAt(c)){case 34:t=!t;break;case 95:case 42:case 92:++c;break;case 59:a[a.length]=e.substr(r,c-r),r=c+1}if(a[a.length]=e.substr(r),t===!0)throw new Error("Format |"+e+"| unterminated string ");return a}var aL=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function N8(e){for(var a=0,t="",c="";a<e.length;)switch(t=e.charAt(a)){case"G":E7(e,a)&&(a+=6),a++;break;case'"':for(;e.charCodeAt(++a)!==34&&a<e.length;);++a;break;case"\\":a+=2;break;case"_":a+=2;break;case"@":++a;break;case"B":case"b":if(e.charAt(a+1)==="1"||e.charAt(a+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(a,3).toUpperCase()==="A/P"||e.substr(a,5).toUpperCase()==="AM/PM"||e.substr(a,5).toUpperCase()==="上午/下午")return!0;++a;break;case"[":for(c=t;e.charAt(a++)!=="]"&&a<e.length;)c+=e.charAt(a);if(c.match(aL))return!0;break;case".":case"0":case"#":for(;a<e.length&&("0#?.,E+-%".indexOf(t=e.charAt(++a))>-1||t=="\\"&&e.charAt(a+1)=="-"&&"0#".indexOf(e.charAt(a+2))>-1););break;case"?":for(;e.charAt(++a)===t;);break;case"*":++a,(e.charAt(a)==" "||e.charAt(a)=="*")&&++a;break;case"(":case")":++a;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;a<e.length&&"0123456789".indexOf(e.charAt(++a))>-1;);break;case" ":++a;break;default:++a;break}return!1}function J_1(e,a,t,c){for(var r=[],n="",i=0,s="",l="t",f,u,h,d="H";i<e.length;)switch(s=e.charAt(i)){case"G":if(!E7(e,i))throw new Error("unrecognized character "+s+" in "+e);r[r.length]={t:"G",v:"General"},i+=7;break;case'"':for(n="";(h=e.charCodeAt(++i))!==34&&i<e.length;)n+=String.fromCharCode(h);r[r.length]={t:"t",v:n},++i;break;case"\\":var m=e.charAt(++i),p=m==="("||m===")"?m:"t";r[r.length]={t:p,v:m},++i;break;case"_":r[r.length]={t:"t",v:" "},i+=2;break;case"@":r[r.length]={t:"T",v:a},++i;break;case"B":case"b":if(e.charAt(i+1)==="1"||e.charAt(i+1)==="2"){if(f==null&&(f=u6(a,t,e.charAt(i+1)==="2"),f==null))return"";r[r.length]={t:"X",v:e.substr(i,2)},l=s,i+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(a<0||f==null&&(f=u6(a,t),f==null))return"";for(n=s;++i<e.length&&e.charAt(i).toLowerCase()===s;)n+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=d),r[r.length]={t:s,v:n},l=s;break;case"A":case"a":case"上":var v={t:s,v:s};if(f==null&&(f=u6(a,t)),e.substr(i,3).toUpperCase()==="A/P"?(f!=null&&(v.v=f.H>=12?"P":"A"),v.t="T",d="h",i+=3):e.substr(i,5).toUpperCase()==="AM/PM"?(f!=null&&(v.v=f.H>=12?"PM":"AM"),v.t="T",i+=5,d="h"):e.substr(i,5).toUpperCase()==="上午/下午"?(f!=null&&(v.v=f.H>=12?"下午":"上午"),v.t="T",i+=5,d="h"):(v.t="t",++i),f==null&&v.t==="T")return"";r[r.length]=v,l=s;break;case"[":for(n=s;e.charAt(i++)!=="]"&&i<e.length;)n+=e.charAt(i);if(n.slice(-1)!=="]")throw'unterminated "[" block: |'+n+"|";if(n.match(aL)){if(f==null&&(f=u6(a,t),f==null))return"";r[r.length]={t:"Z",v:n.toLowerCase()},l=n.charAt(1)}else n.indexOf("$")>-1&&(n=(n.match(/\$([^-\[\]]*)/)||[])[1]||"$",N8(e)||(r[r.length]={t:"t",v:n}));break;case".":if(f!=null){for(n=s;++i<e.length&&(s=e.charAt(i))==="0";)n+=s;r[r.length]={t:"s",v:n};break}case"0":case"#":for(n=s;++i<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(i))>-1;)n+=s;r[r.length]={t:"n",v:n};break;case"?":for(n=s;e.charAt(++i)===s;)n+=s;r[r.length]={t:s,v:n},l=s;break;case"*":++i,(e.charAt(i)==" "||e.charAt(i)=="*")&&++i;break;case"(":case")":r[r.length]={t:c===1?"t":s,v:s},++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(n=s;i<e.length&&"0123456789".indexOf(e.charAt(++i))>-1;)n+=e.charAt(i);r[r.length]={t:"D",v:n};break;case" ":r[r.length]={t:s,v:s},++i;break;case"$":r[r.length]={t:"t",v:"$"},++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);r[r.length]={t:"t",v:s},++i;break}var g=0,x=0,z;for(i=r.length-1,l="t";i>=0;--i)switch(r[i].t){case"h":case"H":r[i].t=d,l="h",g<1&&(g=1);break;case"s":(z=r[i].v.match(/\.0+$/))&&(x=Math.max(x,z[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":l=r[i].t;break;case"m":l==="s"&&(r[i].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&r[i].v.match(/[Hh]/)&&(g=1),g<2&&r[i].v.match(/[Mm]/)&&(g=2),g<3&&r[i].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M),f.M>=60&&(f.M=0,++f.H);break;case 2:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M);break}var C="",y;for(i=0;i<r.length;++i)switch(r[i].t){case"t":case"T":case" ":case"D":break;case"X":r[i].v="",r[i].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":r[i].v=U_1(r[i].t.charCodeAt(0),r[i].v,f,x),r[i].t="t";break;case"n":case"?":for(y=i+1;r[y]!=null&&((s=r[y].t)==="?"||s==="D"||(s===" "||s==="t")&&r[y+1]!=null&&(r[y+1].t==="?"||r[y+1].t==="t"&&r[y+1].v==="/")||r[i].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(r[y].v==="/"||r[y].v===" "&&r[y+1]!=null&&r[y+1].t=="?"));)r[i].v+=r[y].v,r[y]={v:"",t:";"},++y;C+=r[i].v,i=y-1;break;case"G":r[i].t="t",r[i].v=V6(a,t);break}var b="",w,H;if(C.length>0){C.charCodeAt(0)==40?(w=a<0&&C.charCodeAt(0)===45?-a:a,H=Ie("n",C,w)):(w=a<0&&c>1?-a:a,H=Ie("n",C,w),w<0&&r[0]&&r[0].t=="t"&&(H=H.substr(1),r[0].v="-"+r[0].v)),y=H.length-1;var T=r.length;for(i=0;i<r.length;++i)if(r[i]!=null&&r[i].t!="t"&&r[i].v.indexOf(".")>-1){T=i;break}var A=r.length;if(T===r.length&&H.indexOf("E")===-1){for(i=r.length-1;i>=0;--i)r[i]==null||"n?".indexOf(r[i].t)===-1||(y>=r[i].v.length-1?(y-=r[i].v.length,r[i].v=H.substr(y+1,r[i].v.length)):y<0?r[i].v="":(r[i].v=H.substr(0,y+1),y=-1),r[i].t="t",A=i);y>=0&&A<r.length&&(r[A].v=H.substr(0,y+1)+r[A].v)}else if(T!==r.length&&H.indexOf("E")===-1){for(y=H.indexOf(".")-1,i=T;i>=0;--i)if(!(r[i]==null||"n?".indexOf(r[i].t)===-1)){for(u=r[i].v.indexOf(".")>-1&&i===T?r[i].v.indexOf(".")-1:r[i].v.length-1,b=r[i].v.substr(u+1);u>=0;--u)y>=0&&(r[i].v.charAt(u)==="0"||r[i].v.charAt(u)==="#")&&(b=H.charAt(y--)+b);r[i].v=b,r[i].t="t",A=i}for(y>=0&&A<r.length&&(r[A].v=H.substr(0,y+1)+r[A].v),y=H.indexOf(".")+1,i=T;i<r.length;++i)if(!(r[i]==null||"n?(".indexOf(r[i].t)===-1&&i!==T)){for(u=r[i].v.indexOf(".")>-1&&i===T?r[i].v.indexOf(".")+1:0,b=r[i].v.substr(0,u);u<r[i].v.length;++u)y<H.length&&(b+=H.charAt(y++));r[i].v=b,r[i].t="t",A=i}}}for(i=0;i<r.length;++i)r[i]!=null&&"n?".indexOf(r[i].t)>-1&&(w=c>1&&a<0&&i>0&&r[i-1].v==="-"?-a:a,r[i].v=Ie(r[i].t,r[i].v,w),r[i].t="t");var U="";for(i=0;i!==r.length;++i)r[i]!=null&&(U+=r[i].v);return U}var ju=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function qu(e,a){if(a==null)return!1;var t=parseFloat(a[2]);switch(a[1]){case"=":if(e==t)return!0;break;case">":if(e>t)return!0;break;case"<":if(e<t)return!0;break;case"<>":if(e!=t)return!0;break;case">=":if(e>=t)return!0;break;case"<=":if(e<=t)return!0;break}return!1}function ek1(e,a){var t=K_1(e),c=t.length,r=t[c-1].indexOf("@");if(c<4&&r>-1&&--c,t.length>4)throw new Error("cannot find right format for |"+t.join("|")+"|");if(typeof a!="number")return[4,t.length===4||r>-1?t[t.length-1]:"@"];switch(t.length){case 1:t=r>-1?["General","General","General",t[0]]:[t[0],t[0],t[0],"@"];break;case 2:t=r>-1?[t[0],t[0],t[0],t[1]]:[t[0],t[1],t[0],"@"];break;case 3:t=r>-1?[t[0],t[1],t[0],t[2]]:[t[0],t[1],t[2],"@"];break}var n=a>0?t[0]:a<0?t[1]:t[2];if(t[0].indexOf("[")===-1&&t[1].indexOf("[")===-1)return[c,n];if(t[0].match(/\[[=<>]/)!=null||t[1].match(/\[[=<>]/)!=null){var i=t[0].match(ju),s=t[1].match(ju);return qu(a,i)?[c,t[0]]:qu(a,s)?[c,t[1]]:[c,t[i!=null&&s!=null?2:1]]}return[c,n]}function M4(e,a,t){t==null&&(t={});var c="";switch(typeof e){case"string":e=="m/d/yy"&&t.dateNF?c=t.dateNF:c=e;break;case"number":e==14&&t.dateNF?c=t.dateNF:c=(t.table!=null?t.table:j1)[e],c==null&&(c=t.table&&t.table[Uu[e]]||j1[Uu[e]]),c==null&&(c=D_1[e]||"General");break}if(E7(c,0))return V6(a,t);a instanceof Date&&(a=qw(a,t.date1904));var r=ek1(c,a);if(E7(r[1]))return V6(a,t);if(a===!0)a="TRUE";else if(a===!1)a="FALSE";else if(a===""||a==null)return"";return J_1(r[1],a,t,r[0])}function g6(e,a){if(typeof a!="number"){a=+a||-1;for(var t=0;t<392;++t){if(j1[t]==null){a<0&&(a=t);continue}if(j1[t]==e){a=t;break}}a<0&&(a=391)}return j1[a]=e,a}function tL(){j1=F_1()}var ak1={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},cL=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function tk1(e){var a=typeof e=="number"?j1[e]:e;return a=a.replace(cL,"(\\d+)"),new RegExp("^"+a+"$")}function ck1(e,a,t){var c=-1,r=-1,n=-1,i=-1,s=-1,l=-1;(a.match(cL)||[]).forEach(function(h,d){var m=parseInt(t[d+1],10);switch(h.toLowerCase().charAt(0)){case"y":c=m;break;case"d":n=m;break;case"h":i=m;break;case"s":l=m;break;case"m":i>=0?s=m:r=m;break}}),l>=0&&s==-1&&r>=0&&(s=r,r=-1);var f=(""+(c>=0?c:new Date().getFullYear())).slice(-4)+"-"+("00"+(r>=1?r:1)).slice(-2)+"-"+("00"+(n>=1?n:1)).slice(-2);f.length==7&&(f="0"+f),f.length==8&&(f="20"+f);var u=("00"+(i>=0?i:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return i==-1&&s==-1&&l==-1?f:c==-1&&r==-1&&n==-1?u:f+"T"+u}var rk1=function(){var e={};e.version="1.2.0";function a(){for(var H=0,T=new Array(256),A=0;A!=256;++A)H=A,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,T[A]=H;return typeof Int32Array<"u"?new Int32Array(T):T}var t=a();function c(H){var T=0,A=0,U=0,D=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(U=0;U!=256;++U)D[U]=H[U];for(U=0;U!=256;++U)for(A=H[U],T=256+U;T<4096;T+=256)A=D[T]=A>>>8^H[A&255];var k=[];for(U=1;U!=16;++U)k[U-1]=typeof Int32Array<"u"?D.subarray(U*256,U*256+256):D.slice(U*256,U*256+256);return k}var r=c(t),n=r[0],i=r[1],s=r[2],l=r[3],f=r[4],u=r[5],h=r[6],d=r[7],m=r[8],p=r[9],v=r[10],g=r[11],x=r[12],z=r[13],C=r[14];function y(H,T){for(var A=T^-1,U=0,D=H.length;U<D;)A=A>>>8^t[(A^H.charCodeAt(U++))&255];return~A}function b(H,T){for(var A=T^-1,U=H.length-15,D=0;D<U;)A=C[H[D++]^A&255]^z[H[D++]^A>>8&255]^x[H[D++]^A>>16&255]^g[H[D++]^A>>>24]^v[H[D++]]^p[H[D++]]^m[H[D++]]^d[H[D++]]^h[H[D++]]^u[H[D++]]^f[H[D++]]^l[H[D++]]^s[H[D++]]^i[H[D++]]^n[H[D++]]^t[H[D++]];for(U+=15;D<U;)A=A>>>8^t[(A^H[D++])&255];return~A}function w(H,T){for(var A=T^-1,U=0,D=H.length,k=0,j=0;U<D;)k=H.charCodeAt(U++),k<128?A=A>>>8^t[(A^k)&255]:k<2048?(A=A>>>8^t[(A^(192|k>>6&31))&255],A=A>>>8^t[(A^(128|k&63))&255]):k>=55296&&k<57344?(k=(k&1023)+64,j=H.charCodeAt(U++)&1023,A=A>>>8^t[(A^(240|k>>8&7))&255],A=A>>>8^t[(A^(128|k>>2&63))&255],A=A>>>8^t[(A^(128|j>>6&15|(k&3)<<4))&255],A=A>>>8^t[(A^(128|j&63))&255]):(A=A>>>8^t[(A^(224|k>>12&15))&255],A=A>>>8^t[(A^(128|k>>6&63))&255],A=A>>>8^t[(A^(128|k&63))&255]);return~A}return e.table=t,e.bstr=y,e.buf=b,e.str=w,e}(),r2=function(){var a={};a.version="1.2.1";function t(N,G){for(var R=N.split("/"),W=G.split("/"),Z=0,Q=0,o1=Math.min(R.length,W.length);Z<o1;++Z){if(Q=R[Z].length-W[Z].length)return Q;if(R[Z]!=W[Z])return R[Z]<W[Z]?-1:1}return R.length-W.length}function c(N){if(N.charAt(N.length-1)=="/")return N.slice(0,-1).indexOf("/")===-1?N:c(N.slice(0,-1));var G=N.lastIndexOf("/");return G===-1?N:N.slice(0,G+1)}function r(N){if(N.charAt(N.length-1)=="/")return r(N.slice(0,-1));var G=N.lastIndexOf("/");return G===-1?N:N.slice(G+1)}function n(N,G){typeof G=="string"&&(G=new Date(G));var R=G.getHours();R=R<<6|G.getMinutes(),R=R<<5|G.getSeconds()>>>1,N.write_shift(2,R);var W=G.getFullYear()-1980;W=W<<4|G.getMonth()+1,W=W<<5|G.getDate(),N.write_shift(2,W)}function i(N){var G=N.read_shift(2)&65535,R=N.read_shift(2)&65535,W=new Date,Z=R&31;R>>>=5;var Q=R&15;R>>>=4,W.setMilliseconds(0),W.setFullYear(R+1980),W.setMonth(Q-1),W.setDate(Z);var o1=G&31;G>>>=5;var u1=G&63;return G>>>=6,W.setHours(G),W.setMinutes(u1),W.setSeconds(o1<<1),W}function s(N){V3(N,0);for(var G={},R=0;N.l<=N.length-4;){var W=N.read_shift(2),Z=N.read_shift(2),Q=N.l+Z,o1={};switch(W){case 21589:R=N.read_shift(1),R&1&&(o1.mtime=N.read_shift(4)),Z>5&&(R&2&&(o1.atime=N.read_shift(4)),R&4&&(o1.ctime=N.read_shift(4))),o1.mtime&&(o1.mt=new Date(o1.mtime*1e3));break}N.l=Q,G[W]=o1}return G}var l;function f(){return l||(l={})}function u(N,G){if(N[0]==80&&N[1]==75)return k1(N,G);if((N[0]|32)==109&&(N[1]|32)==105)return F8(N,G);if(N.length<512)throw new Error("CFB file size "+N.length+" < 512");var R=3,W=512,Z=0,Q=0,o1=0,u1=0,M=0,L=[],E=N.slice(0,512);V3(E,0);var Y=h(E);switch(R=Y[0],R){case 3:W=512;break;case 4:W=4096;break;case 0:if(Y[1]==0)return k1(N,G);default:throw new Error("Major Version: Expected 3 or 4 saw "+R)}W!==512&&(E=N.slice(0,W),V3(E,28));var K=N.slice(0,W);d(E,R);var t1=E.read_shift(4,"i");if(R===3&&t1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+t1);E.l+=4,o1=E.read_shift(4,"i"),E.l+=4,E.chk("00100000","Mini Stream Cutoff Size: "),u1=E.read_shift(4,"i"),Z=E.read_shift(4,"i"),M=E.read_shift(4,"i"),Q=E.read_shift(4,"i");for(var e1=-1,h1=0;h1<109&&(e1=E.read_shift(4,"i"),!(e1<0));++h1)L[h1]=e1;var M1=m(N,W);g(M,Q,M1,W,L);var V1=z(M1,o1,L,W);V1[o1].name="!Directory",Z>0&&u1!==j&&(V1[u1].name="!MiniFAT"),V1[L[0]].name="!FAT",V1.fat_addrs=L,V1.ssz=W;var x1={},P1=[],D1=[],Z1=[];C(o1,V1,M1,P1,Z,x1,D1,u1),p(D1,Z1,P1),P1.shift();var E1={FileIndex:D1,FullPaths:Z1};return G&&G.raw&&(E1.raw={header:K,sectors:M1}),E1}function h(N){if(N[N.l]==80&&N[N.l+1]==75)return[0,0];N.chk(c1,"Header Signature: "),N.l+=16;var G=N.read_shift(2,"u");return[N.read_shift(2,"u"),G]}function d(N,G){var R=9;switch(N.l+=2,R=N.read_shift(2)){case 9:if(G!=3)throw new Error("Sector Shift: Expected 9 saw "+R);break;case 12:if(G!=4)throw new Error("Sector Shift: Expected 12 saw "+R);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+R)}N.chk("0600","Mini Sector Shift: "),N.chk("000000000000","Reserved: ")}function m(N,G){for(var R=Math.ceil(N.length/G)-1,W=[],Z=1;Z<R;++Z)W[Z-1]=N.slice(Z*G,(Z+1)*G);return W[R-1]=N.slice(R*G),W}function p(N,G,R){for(var W=0,Z=0,Q=0,o1=0,u1=0,M=R.length,L=[],E=[];W<M;++W)L[W]=E[W]=W,G[W]=R[W];for(;u1<E.length;++u1)W=E[u1],Z=N[W].L,Q=N[W].R,o1=N[W].C,L[W]===W&&(Z!==-1&&L[Z]!==Z&&(L[W]=L[Z]),Q!==-1&&L[Q]!==Q&&(L[W]=L[Q])),o1!==-1&&(L[o1]=W),Z!==-1&&W!=L[W]&&(L[Z]=L[W],E.lastIndexOf(Z)<u1&&E.push(Z)),Q!==-1&&W!=L[W]&&(L[Q]=L[W],E.lastIndexOf(Q)<u1&&E.push(Q));for(W=1;W<M;++W)L[W]===W&&(Q!==-1&&L[Q]!==Q?L[W]=L[Q]:Z!==-1&&L[Z]!==Z&&(L[W]=L[Z]));for(W=1;W<M;++W)if(N[W].type!==0){if(u1=W,u1!=L[u1])do u1=L[u1],G[W]=G[u1]+"/"+G[W];while(u1!==0&&L[u1]!==-1&&u1!=L[u1]);L[W]=-1}for(G[0]+="/",W=1;W<M;++W)N[W].type!==2&&(G[W]+="/")}function v(N,G,R){for(var W=N.start,Z=N.size,Q=[],o1=W;R&&Z>0&&o1>=0;)Q.push(G.slice(o1*k,o1*k+k)),Z-=k,o1=r6(R,o1*4);return Q.length===0?u3(0):l0(Q).slice(0,N.size)}function g(N,G,R,W,Z){var Q=j;if(N===j){if(G!==0)throw new Error("DIFAT chain shorter than expected")}else if(N!==-1){var o1=R[N],u1=(W>>>2)-1;if(!o1)return;for(var M=0;M<u1&&(Q=r6(o1,M*4))!==j;++M)Z.push(Q);g(r6(o1,W-4),G-1,R,W,Z)}}function x(N,G,R,W,Z){var Q=[],o1=[];Z||(Z=[]);var u1=W-1,M=0,L=0;for(M=G;M>=0;){Z[M]=!0,Q[Q.length]=M,o1.push(N[M]);var E=R[Math.floor(M*4/W)];if(L=M*4&u1,W<4+L)throw new Error("FAT boundary crossed: "+M+" 4 "+W);if(!N[E])break;M=r6(N[E],L)}return{nodes:Q,data:ch([o1])}}function z(N,G,R,W){var Z=N.length,Q=[],o1=[],u1=[],M=[],L=W-1,E=0,Y=0,K=0,t1=0;for(E=0;E<Z;++E)if(u1=[],K=E+G,K>=Z&&(K-=Z),!o1[K]){M=[];var e1=[];for(Y=K;Y>=0;){e1[Y]=!0,o1[Y]=!0,u1[u1.length]=Y,M.push(N[Y]);var h1=R[Math.floor(Y*4/W)];if(t1=Y*4&L,W<4+t1)throw new Error("FAT boundary crossed: "+Y+" 4 "+W);if(!N[h1]||(Y=r6(N[h1],t1),e1[Y]))break}Q[K]={nodes:u1,data:ch([M])}}return Q}function C(N,G,R,W,Z,Q,o1,u1){for(var M=0,L=W.length?2:0,E=G[N].data,Y=0,K=0,t1;Y<E.length;Y+=128){var e1=E.slice(Y,Y+128);V3(e1,64),K=e1.read_shift(2),t1=Xs(e1,0,K-L),W.push(t1);var h1={name:t1,type:e1.read_shift(1),color:e1.read_shift(1),L:e1.read_shift(4,"i"),R:e1.read_shift(4,"i"),C:e1.read_shift(4,"i"),clsid:e1.read_shift(16),state:e1.read_shift(4,"i"),start:0,size:0},M1=e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2);M1!==0&&(h1.ct=y(e1,e1.l-8));var V1=e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2);V1!==0&&(h1.mt=y(e1,e1.l-8)),h1.start=e1.read_shift(4,"i"),h1.size=e1.read_shift(4,"i"),h1.size<0&&h1.start<0&&(h1.size=h1.type=0,h1.start=j,h1.name=""),h1.type===5?(M=h1.start,Z>0&&M!==j&&(G[M].name="!StreamData")):h1.size>=4096?(h1.storage="fat",G[h1.start]===void 0&&(G[h1.start]=x(R,h1.start,G.fat_addrs,G.ssz)),G[h1.start].name=h1.name,h1.content=G[h1.start].data.slice(0,h1.size)):(h1.storage="minifat",h1.size<0?h1.size=0:M!==j&&h1.start!==j&&G[M]&&(h1.content=v(h1,G[M].data,(G[u1]||{}).data))),h1.content&&V3(h1.content,0),Q[t1]=h1,o1.push(h1)}}function y(N,G){return new Date((l4(N,G+4)/1e7*Math.pow(2,32)+l4(N,G)/1e7-11644473600)*1e3)}function b(N,G){return f(),u(l.readFileSync(N),G)}function w(N,G){var R=G&&G.type;switch(R||t2&&Buffer.isBuffer(N)&&(R="buffer"),R||"base64"){case"file":return b(N,G);case"base64":return u(T4(h4(N)),G);case"binary":return u(T4(N),G)}return u(N,G)}function H(N,G){var R=G||{},W=R.root||"Root Entry";if(N.FullPaths||(N.FullPaths=[]),N.FileIndex||(N.FileIndex=[]),N.FullPaths.length!==N.FileIndex.length)throw new Error("inconsistent CFB structure");N.FullPaths.length===0&&(N.FullPaths[0]=W+"/",N.FileIndex[0]={name:W,type:5}),R.CLSID&&(N.FileIndex[0].clsid=R.CLSID),T(N)}function T(N){var G="Sh33tJ5";if(!r2.find(N,"/"+G)){var R=u3(4);R[0]=55,R[1]=R[3]=50,R[2]=54,N.FileIndex.push({name:G,type:2,content:R,size:4,L:69,R:69,C:69}),N.FullPaths.push(N.FullPaths[0]+G),A(N)}}function A(N,G){H(N);for(var R=!1,W=!1,Z=N.FullPaths.length-1;Z>=0;--Z){var Q=N.FileIndex[Z];switch(Q.type){case 0:W?R=!0:(N.FileIndex.pop(),N.FullPaths.pop());break;case 1:case 2:case 5:W=!0,isNaN(Q.R*Q.L*Q.C)&&(R=!0),Q.R>-1&&Q.L>-1&&Q.R==Q.L&&(R=!0);break;default:R=!0;break}}if(!(!R&&!G)){var o1=new Date(1987,1,19),u1=0,M=Object.create?Object.create(null):{},L=[];for(Z=0;Z<N.FullPaths.length;++Z)M[N.FullPaths[Z]]=!0,N.FileIndex[Z].type!==0&&L.push([N.FullPaths[Z],N.FileIndex[Z]]);for(Z=0;Z<L.length;++Z){var E=c(L[Z][0]);W=M[E],W||(L.push([E,{name:r(E).replace("/",""),type:1,clsid:O,ct:o1,mt:o1,content:null}]),M[E]=!0)}for(L.sort(function(t1,e1){return t(t1[0],e1[0])}),N.FullPaths=[],N.FileIndex=[],Z=0;Z<L.length;++Z)N.FullPaths[Z]=L[Z][0],N.FileIndex[Z]=L[Z][1];for(Z=0;Z<L.length;++Z){var Y=N.FileIndex[Z],K=N.FullPaths[Z];if(Y.name=r(K).replace("/",""),Y.L=Y.R=Y.C=-(Y.color=1),Y.size=Y.content?Y.content.length:0,Y.start=0,Y.clsid=Y.clsid||O,Z===0)Y.C=L.length>1?1:-1,Y.size=0,Y.type=5;else if(K.slice(-1)=="/"){for(u1=Z+1;u1<L.length&&c(N.FullPaths[u1])!=K;++u1);for(Y.C=u1>=L.length?-1:u1,u1=Z+1;u1<L.length&&c(N.FullPaths[u1])!=c(K);++u1);Y.R=u1>=L.length?-1:u1,Y.type=1}else c(N.FullPaths[Z+1]||"")==c(K)&&(Y.R=Z+1),Y.type=2}}}function U(N,G){var R=G||{};if(R.fileType=="mad")return Wa(N,R);switch(A(N),R.fileType){case"zip":return b3(N,R)}var W=function(t1){for(var e1=0,h1=0,M1=0;M1<t1.FileIndex.length;++M1){var V1=t1.FileIndex[M1];if(V1.content){var x1=V1.content.length;x1>0&&(x1<4096?e1+=x1+63>>6:h1+=x1+511>>9)}}for(var P1=t1.FullPaths.length+3>>2,D1=e1+7>>3,Z1=e1+127>>7,E1=D1+h1+P1+Z1,Q1=E1+127>>7,b2=Q1<=109?0:Math.ceil((Q1-109)/127);E1+Q1+b2+127>>7>Q1;)b2=++Q1<=109?0:Math.ceil((Q1-109)/127);var X2=[1,b2,Q1,Z1,P1,h1,e1,0];return t1.FileIndex[0].size=e1<<6,X2[7]=(t1.FileIndex[0].start=X2[0]+X2[1]+X2[2]+X2[3]+X2[4]+X2[5])+(X2[6]+7>>3),X2}(N),Z=u3(W[7]<<9),Q=0,o1=0;{for(Q=0;Q<8;++Q)Z.write_shift(1,F[Q]);for(Q=0;Q<8;++Q)Z.write_shift(2,0);for(Z.write_shift(2,62),Z.write_shift(2,3),Z.write_shift(2,65534),Z.write_shift(2,9),Z.write_shift(2,6),Q=0;Q<3;++Q)Z.write_shift(2,0);for(Z.write_shift(4,0),Z.write_shift(4,W[2]),Z.write_shift(4,W[0]+W[1]+W[2]+W[3]-1),Z.write_shift(4,0),Z.write_shift(4,4096),Z.write_shift(4,W[3]?W[0]+W[1]+W[2]-1:j),Z.write_shift(4,W[3]),Z.write_shift(-4,W[1]?W[0]-1:j),Z.write_shift(4,W[1]),Q=0;Q<109;++Q)Z.write_shift(-4,Q<W[2]?W[1]+Q:-1)}if(W[1])for(o1=0;o1<W[1];++o1){for(;Q<236+o1*127;++Q)Z.write_shift(-4,Q<W[2]?W[1]+Q:-1);Z.write_shift(-4,o1===W[1]-1?j:o1+1)}var u1=function(t1){for(o1+=t1;Q<o1-1;++Q)Z.write_shift(-4,Q+1);t1&&(++Q,Z.write_shift(-4,j))};for(o1=Q=0,o1+=W[1];Q<o1;++Q)Z.write_shift(-4,X.DIFSECT);for(o1+=W[2];Q<o1;++Q)Z.write_shift(-4,X.FATSECT);u1(W[3]),u1(W[4]);for(var M=0,L=0,E=N.FileIndex[0];M<N.FileIndex.length;++M)E=N.FileIndex[M],E.content&&(L=E.content.length,!(L<4096)&&(E.start=o1,u1(L+511>>9)));for(u1(W[6]+7>>3);Z.l&511;)Z.write_shift(-4,X.ENDOFCHAIN);for(o1=Q=0,M=0;M<N.FileIndex.length;++M)E=N.FileIndex[M],E.content&&(L=E.content.length,!(!L||L>=4096)&&(E.start=o1,u1(L+63>>6)));for(;Z.l&511;)Z.write_shift(-4,X.ENDOFCHAIN);for(Q=0;Q<W[4]<<2;++Q){var Y=N.FullPaths[Q];if(!Y||Y.length===0){for(M=0;M<17;++M)Z.write_shift(4,0);for(M=0;M<3;++M)Z.write_shift(4,-1);for(M=0;M<12;++M)Z.write_shift(4,0);continue}E=N.FileIndex[Q],Q===0&&(E.start=E.size?E.start-1:j);var K=Q===0&&R.root||E.name;if(L=2*(K.length+1),Z.write_shift(64,K,"utf16le"),Z.write_shift(2,L),Z.write_shift(1,E.type),Z.write_shift(1,E.color),Z.write_shift(-4,E.L),Z.write_shift(-4,E.R),Z.write_shift(-4,E.C),E.clsid)Z.write_shift(16,E.clsid,"hex");else for(M=0;M<4;++M)Z.write_shift(4,0);Z.write_shift(4,E.state||0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,E.start),Z.write_shift(4,E.size),Z.write_shift(4,0)}for(Q=1;Q<N.FileIndex.length;++Q)if(E=N.FileIndex[Q],E.size>=4096)if(Z.l=E.start+1<<9,t2&&Buffer.isBuffer(E.content))E.content.copy(Z,Z.l,0,E.size),Z.l+=E.size+511&-512;else{for(M=0;M<E.size;++M)Z.write_shift(1,E.content[M]);for(;M&511;++M)Z.write_shift(1,0)}for(Q=1;Q<N.FileIndex.length;++Q)if(E=N.FileIndex[Q],E.size>0&&E.size<4096)if(t2&&Buffer.isBuffer(E.content))E.content.copy(Z,Z.l,0,E.size),Z.l+=E.size+63&-64;else{for(M=0;M<E.size;++M)Z.write_shift(1,E.content[M]);for(;M&63;++M)Z.write_shift(1,0)}if(t2)Z.l=Z.length;else for(;Z.l<Z.length;)Z.write_shift(1,0);return Z}function D(N,G){var R=N.FullPaths.map(function(M){return M.toUpperCase()}),W=R.map(function(M){var L=M.split("/");return L[L.length-(M.slice(-1)=="/"?2:1)]}),Z=!1;G.charCodeAt(0)===47?(Z=!0,G=R[0].slice(0,-1)+G):Z=G.indexOf("/")!==-1;var Q=G.toUpperCase(),o1=Z===!0?R.indexOf(Q):W.indexOf(Q);if(o1!==-1)return N.FileIndex[o1];var u1=!Q.match(n5);for(Q=Q.replace(X3,""),u1&&(Q=Q.replace(n5,"!")),o1=0;o1<R.length;++o1)if((u1?R[o1].replace(n5,"!"):R[o1]).replace(X3,"")==Q||(u1?W[o1].replace(n5,"!"):W[o1]).replace(X3,"")==Q)return N.FileIndex[o1];return null}var k=64,j=-2,c1="d0cf11e0a1b11ae1",F=[208,207,17,224,161,177,26,225],O="00000000000000000000000000000000",X={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:j,FREESECT:-1,HEADER_SIGNATURE:c1,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:O,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function f1(N,G,R){f();var W=U(N,R);l.writeFileSync(G,W)}function J(N){for(var G=new Array(N.length),R=0;R<N.length;++R)G[R]=String.fromCharCode(N[R]);return G.join("")}function v1(N,G){var R=U(N,G);switch(G&&G.type||"buffer"){case"file":return f(),l.writeFileSync(G.filename,R),R;case"binary":return typeof R=="string"?R:J(R);case"base64":return Ou(typeof R=="string"?R:J(R));case"buffer":if(t2)return Buffer.isBuffer(R)?R:F6(R);case"array":return typeof R=="string"?T4(R):R}return R}var r1;function S(N){try{var G=N.InflateRaw,R=new G;if(R._processChunk(new Uint8Array([3,0]),R._finishFlushFlag),R.bytesRead)r1=N;else throw new Error("zlib does not expose bytesRead")}catch(W){console.error("cannot use native zlib: "+(W.message||W))}}function _(N,G){if(!r1)return p1(N,G);var R=r1.InflateRaw,W=new R,Z=W._processChunk(N.slice(N.l),W._finishFlushFlag);return N.l+=W.bytesRead,Z}function P(N){return r1?r1.deflateRawSync(N):U1(N)}var q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],B=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],I=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function d1(N){var G=(N<<1|N<<11)&139536|(N<<5|N<<15)&558144;return(G>>16|G>>8|G)&255}for(var n1=typeof Uint8Array<"u",m1=n1?new Uint8Array(256):[],z1=0;z1<256;++z1)m1[z1]=d1(z1);function V(N,G){var R=m1[N&255];return G<=8?R>>>8-G:(R=R<<8|m1[N>>8&255],G<=16?R>>>16-G:(R=R<<8|m1[N>>16&255],R>>>24-G))}function g1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=6?0:N[W+1]<<8))>>>R&3}function b1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=5?0:N[W+1]<<8))>>>R&7}function i1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=4?0:N[W+1]<<8))>>>R&15}function _1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=3?0:N[W+1]<<8))>>>R&31}function a1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=1?0:N[W+1]<<8))>>>R&127}function C1(N,G,R){var W=G&7,Z=G>>>3,Q=(1<<R)-1,o1=N[Z]>>>W;return R<8-W||(o1|=N[Z+1]<<8-W,R<16-W)||(o1|=N[Z+2]<<16-W,R<24-W)||(o1|=N[Z+3]<<24-W),o1&Q}function I1(N,G,R){var W=G&7,Z=G>>>3;return W<=5?N[Z]|=(R&7)<<W:(N[Z]|=R<<W&255,N[Z+1]=(R&7)>>8-W),G+3}function T1(N,G,R){var W=G&7,Z=G>>>3;return R=(R&1)<<W,N[Z]|=R,G+1}function g2(N,G,R){var W=G&7,Z=G>>>3;return R<<=W,N[Z]|=R&255,R>>>=8,N[Z+1]=R,G+8}function F1(N,G,R){var W=G&7,Z=G>>>3;return R<<=W,N[Z]|=R&255,R>>>=8,N[Z+1]=R&255,N[Z+2]=R>>>8,G+16}function r3(N,G){var R=N.length,W=2*R>G?2*R:G+5,Z=0;if(R>=G)return N;if(t2){var Q=Ru(W);if(N.copy)N.copy(Q);else for(;Z<N.length;++Z)Q[Z]=N[Z];return Q}else if(n1){var o1=new Uint8Array(W);if(o1.set)o1.set(N);else for(;Z<R;++Z)o1[Z]=N[Z];return o1}return N.length=W,N}function z2(N){for(var G=new Array(N),R=0;R<N;++R)G[R]=0;return G}function C3(N,G,R){var W=1,Z=0,Q=0,o1=0,u1=0,M=N.length,L=n1?new Uint16Array(32):z2(32);for(Q=0;Q<32;++Q)L[Q]=0;for(Q=M;Q<R;++Q)N[Q]=0;M=N.length;var E=n1?new Uint16Array(M):z2(M);for(Q=0;Q<M;++Q)L[Z=N[Q]]++,W<Z&&(W=Z),E[Q]=0;for(L[0]=0,Q=1;Q<=W;++Q)L[Q+16]=u1=u1+L[Q-1]<<1;for(Q=0;Q<M;++Q)u1=N[Q],u1!=0&&(E[Q]=L[u1+16]++);var Y=0;for(Q=0;Q<M;++Q)if(Y=N[Q],Y!=0)for(u1=V(E[Q],W)>>W-Y,o1=(1<<W+4-Y)-1;o1>=0;--o1)G[u1|o1<<Y]=Y&15|Q<<4;return W}var E2=n1?new Uint16Array(512):z2(512),I2=n1?new Uint16Array(32):z2(32);if(!n1){for(var $2=0;$2<512;++$2)E2[$2]=0;for($2=0;$2<32;++$2)I2[$2]=0}(function(){for(var N=[],G=0;G<32;G++)N.push(5);C3(N,I2,32);var R=[];for(G=0;G<=143;G++)R.push(8);for(;G<=255;G++)R.push(9);for(;G<=279;G++)R.push(7);for(;G<=287;G++)R.push(8);C3(R,E2,288)})();var o3=function(){for(var G=n1?new Uint8Array(32768):[],R=0,W=0;R<I.length-1;++R)for(;W<I[R+1];++W)G[W]=R;for(;W<32768;++W)G[W]=29;var Z=n1?new Uint8Array(259):[];for(R=0,W=0;R<B.length-1;++R)for(;W<B[R+1];++W)Z[W]=R;function Q(u1,M){for(var L=0;L<u1.length;){var E=Math.min(65535,u1.length-L),Y=L+E==u1.length;for(M.write_shift(1,+Y),M.write_shift(2,E),M.write_shift(2,~E&65535);E-- >0;)M[M.l++]=u1[L++]}return M.l}function o1(u1,M){for(var L=0,E=0,Y=n1?new Uint16Array(32768):[];E<u1.length;){var K=Math.min(65535,u1.length-E);if(K<10){for(L=I1(M,L,+(E+K==u1.length)),L&7&&(L+=8-(L&7)),M.l=L/8|0,M.write_shift(2,K),M.write_shift(2,~K&65535);K-- >0;)M[M.l++]=u1[E++];L=M.l*8;continue}L=I1(M,L,+(E+K==u1.length)+2);for(var t1=0;K-- >0;){var e1=u1[E];t1=(t1<<5^e1)&32767;var h1=-1,M1=0;if((h1=Y[t1])&&(h1|=E&-32768,h1>E&&(h1-=32768),h1<E))for(;u1[h1+M1]==u1[E+M1]&&M1<250;)++M1;if(M1>2){e1=Z[M1],e1<=22?L=g2(M,L,m1[e1+1]>>1)-1:(g2(M,L,3),L+=5,g2(M,L,m1[e1-23]>>5),L+=3);var V1=e1<8?0:e1-4>>2;V1>0&&(F1(M,L,M1-B[e1]),L+=V1),e1=G[E-h1],L=g2(M,L,m1[e1]>>3),L-=3;var x1=e1<4?0:e1-2>>1;x1>0&&(F1(M,L,E-h1-I[e1]),L+=x1);for(var P1=0;P1<M1;++P1)Y[t1]=E&32767,t1=(t1<<5^u1[E])&32767,++E;K-=M1-1}else e1<=143?e1=e1+48:L=T1(M,L,1),L=g2(M,L,m1[e1]),Y[t1]=E&32767,++E}L=g2(M,L,0)-1}return M.l=(L+7)/8|0,M.l}return function(M,L){return M.length<8?Q(M,L):o1(M,L)}}();function U1(N){var G=u3(50+Math.floor(N.length*1.1)),R=o3(N,G);return G.slice(0,R)}var x2=n1?new Uint16Array(32768):z2(32768),l3=n1?new Uint16Array(32768):z2(32768),d2=n1?new Uint16Array(128):z2(128),A3=1,Z4=1;function s1(N,G){var R=_1(N,G)+257;G+=5;var W=_1(N,G)+1;G+=5;var Z=i1(N,G)+4;G+=4;for(var Q=0,o1=n1?new Uint8Array(19):z2(19),u1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=1,L=n1?new Uint8Array(8):z2(8),E=n1?new Uint8Array(8):z2(8),Y=o1.length,K=0;K<Z;++K)o1[q[K]]=Q=b1(N,G),M<Q&&(M=Q),L[Q]++,G+=3;var t1=0;for(L[0]=0,K=1;K<=M;++K)E[K]=t1=t1+L[K-1]<<1;for(K=0;K<Y;++K)(t1=o1[K])!=0&&(u1[K]=E[t1]++);var e1=0;for(K=0;K<Y;++K)if(e1=o1[K],e1!=0){t1=m1[u1[K]]>>8-e1;for(var h1=(1<<7-e1)-1;h1>=0;--h1)d2[t1|h1<<e1]=e1&7|K<<3}var M1=[];for(M=1;M1.length<R+W;)switch(t1=d2[a1(N,G)],G+=t1&7,t1>>>=3){case 16:for(Q=3+g1(N,G),G+=2,t1=M1[M1.length-1];Q-- >0;)M1.push(t1);break;case 17:for(Q=3+b1(N,G),G+=3;Q-- >0;)M1.push(0);break;case 18:for(Q=11+a1(N,G),G+=7;Q-- >0;)M1.push(0);break;default:M1.push(t1),M<t1&&(M=t1);break}var V1=M1.slice(0,R),x1=M1.slice(R);for(K=R;K<286;++K)V1[K]=0;for(K=W;K<30;++K)x1[K]=0;return A3=C3(V1,x2,286),Z4=C3(x1,l3,30),G}function H1(N,G){if(N[0]==3&&!(N[1]&3))return[D0(G),2];for(var R=0,W=0,Z=Ru(G||1<<18),Q=0,o1=Z.length>>>0,u1=0,M=0;!(W&1);){if(W=b1(N,R),R+=3,W>>>1)W>>1==1?(u1=9,M=5):(R=s1(N,R),u1=A3,M=Z4);else{R&7&&(R+=8-(R&7));var L=N[R>>>3]|N[(R>>>3)+1]<<8;if(R+=32,L>0)for(!G&&o1<Q+L&&(Z=r3(Z,Q+L),o1=Z.length);L-- >0;)Z[Q++]=N[R>>>3],R+=8;continue}for(;;){!G&&o1<Q+32767&&(Z=r3(Z,Q+32767),o1=Z.length);var E=C1(N,R,u1),Y=W>>>1==1?E2[E]:x2[E];if(R+=Y&15,Y>>>=4,!(Y>>>8&255))Z[Q++]=Y;else{if(Y==256)break;Y-=257;var K=Y<8?0:Y-4>>2;K>5&&(K=0);var t1=Q+B[Y];K>0&&(t1+=C1(N,R,K),R+=K),E=C1(N,R,M),Y=W>>>1==1?I2[E]:l3[E],R+=Y&15,Y>>>=4;var e1=Y<4?0:Y-2>>1,h1=I[Y];for(e1>0&&(h1+=C1(N,R,e1),R+=e1),!G&&o1<t1&&(Z=r3(Z,t1+100),o1=Z.length);Q<t1;)Z[Q]=Z[Q-h1],++Q}}}return G?[Z,R+7>>>3]:[Z.slice(0,Q),R+7>>>3]}function p1(N,G){var R=N.slice(N.l||0),W=H1(R,G);return N.l+=W[1],W[0]}function w1(N,G){if(N)typeof console<"u"&&console.error(G);else throw new Error(G)}function k1(N,G){var R=N;V3(R,0);var W=[],Z=[],Q={FileIndex:W,FullPaths:Z};H(Q,{root:G.root});for(var o1=R.length-4;(R[o1]!=80||R[o1+1]!=75||R[o1+2]!=5||R[o1+3]!=6)&&o1>=0;)--o1;R.l=o1+4,R.l+=4;var u1=R.read_shift(2);R.l+=6;var M=R.read_shift(4);for(R.l=M,o1=0;o1<u1;++o1){R.l+=20;var L=R.read_shift(4),E=R.read_shift(4),Y=R.read_shift(2),K=R.read_shift(2),t1=R.read_shift(2);R.l+=8;var e1=R.read_shift(4),h1=s(R.slice(R.l+Y,R.l+Y+K));R.l+=Y+K+t1;var M1=R.l;R.l=e1+4,f3(R,L,E,Q,h1),R.l=M1}return Q}function f3(N,G,R,W,Z){N.l+=2;var Q=N.read_shift(2),o1=N.read_shift(2),u1=i(N);if(Q&8257)throw new Error("Unsupported ZIP encryption");for(var M=N.read_shift(4),L=N.read_shift(4),E=N.read_shift(4),Y=N.read_shift(2),K=N.read_shift(2),t1="",e1=0;e1<Y;++e1)t1+=String.fromCharCode(N[N.l++]);if(K){var h1=s(N.slice(N.l,N.l+K));(h1[21589]||{}).mt&&(u1=h1[21589].mt),((Z||{})[21589]||{}).mt&&(u1=Z[21589].mt)}N.l+=K;var M1=N.slice(N.l,N.l+L);switch(o1){case 8:M1=_(N,E);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+o1)}var V1=!1;Q&8&&(M=N.read_shift(4),M==134695760&&(M=N.read_shift(4),V1=!0),L=N.read_shift(4),E=N.read_shift(4)),L!=G&&w1(V1,"Bad compressed size: "+G+" != "+L),E!=R&&w1(V1,"Bad uncompressed size: "+R+" != "+E),K4(W,t1,M1,{unsafe:!0,mt:u1})}function b3(N,G){var R=G||{},W=[],Z=[],Q=u3(1),o1=R.compression?8:0,u1=0,M=0,L=0,E=0,Y=0,K=N.FullPaths[0],t1=K,e1=N.FileIndex[0],h1=[],M1=0;for(M=1;M<N.FullPaths.length;++M)if(t1=N.FullPaths[M].slice(K.length),e1=N.FileIndex[M],!(!e1.size||!e1.content||t1=="Sh33tJ5")){var V1=E,x1=u3(t1.length);for(L=0;L<t1.length;++L)x1.write_shift(1,t1.charCodeAt(L)&127);x1=x1.slice(0,x1.l),h1[Y]=rk1.buf(e1.content,0);var P1=e1.content;o1==8&&(P1=P(P1)),Q=u3(30),Q.write_shift(4,67324752),Q.write_shift(2,20),Q.write_shift(2,u1),Q.write_shift(2,o1),e1.mt?n(Q,e1.mt):Q.write_shift(4,0),Q.write_shift(-4,h1[Y]),Q.write_shift(4,P1.length),Q.write_shift(4,e1.content.length),Q.write_shift(2,x1.length),Q.write_shift(2,0),E+=Q.length,W.push(Q),E+=x1.length,W.push(x1),E+=P1.length,W.push(P1),Q=u3(46),Q.write_shift(4,33639248),Q.write_shift(2,0),Q.write_shift(2,20),Q.write_shift(2,u1),Q.write_shift(2,o1),Q.write_shift(4,0),Q.write_shift(-4,h1[Y]),Q.write_shift(4,P1.length),Q.write_shift(4,e1.content.length),Q.write_shift(2,x1.length),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(4,0),Q.write_shift(4,V1),M1+=Q.l,Z.push(Q),M1+=x1.length,Z.push(x1),++Y}return Q=u3(22),Q.write_shift(4,101010256),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,Y),Q.write_shift(2,Y),Q.write_shift(4,M1),Q.write_shift(4,E),Q.write_shift(2,0),l0([l0(W),l0(Z),Q])}var K3={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function He(N,G){if(N.ctype)return N.ctype;var R=N.name||"",W=R.match(/\.([^\.]+)$/);return W&&K3[W[1]]||G&&(W=(R=G).match(/[\.\\]([^\.\\])+$/),W&&K3[W[1]])?K3[W[1]]:"application/octet-stream"}function Q4(N){for(var G=Ou(N),R=[],W=0;W<G.length;W+=76)R.push(G.slice(W,W+76));return R.join(`\r
794
+ `):e}function RM1(e,a){const{element:t,datasetIndex:c,index:r}=a,n=e.getDatasetMeta(c).controller,{label:i,value:s}=n.getLabelAndValue(r);return{chart:e,label:i,parsed:n.getParsed(r),raw:e.data.datasets[c].data[r],formattedValue:s,dataset:n.getDataset(),dataIndex:r,datasetIndex:c,element:t}}function If(e,a){const t=e.chart.ctx,{body:c,footer:r,title:n}=e,{boxWidth:i,boxHeight:s}=a,l=m3(a.bodyFont),f=m3(a.titleFont),u=m3(a.footerFont),h=n.length,d=r.length,m=c.length,p=$3(a.padding);let v=p.height,g=0,x=c.reduce((y,b)=>y+b.before.length+b.lines.length+b.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,h&&(v+=h*f.lineHeight+(h-1)*a.titleSpacing+a.titleMarginBottom),x){const y=a.displayColors?Math.max(s,l.lineHeight):l.lineHeight;v+=m*y+(x-m)*l.lineHeight+(x-1)*a.bodySpacing}d&&(v+=a.footerMarginTop+d*u.lineHeight+(d-1)*a.footerSpacing);let z=0;const C=function(y){g=Math.max(g,t.measureText(y).width+z)};return t.save(),t.font=f.string,p2(e.title,C),t.font=l.string,p2(e.beforeBody.concat(e.afterBody),C),z=a.displayColors?i+2+a.boxPadding:0,p2(c,y=>{p2(y.before,C),p2(y.lines,C),p2(y.after,C)}),z=0,t.font=u.string,p2(e.footer,C),t.restore(),g+=p.width,{width:g,height:v}}function IM1(e,a){const{y:t,height:c}=a;return t<c/2?"top":t>e.height-c/2?"bottom":"center"}function $M1(e,a,t,c){const{x:r,width:n}=c,i=t.caretSize+t.caretPadding;if(e==="left"&&r+n+i>a.width||e==="right"&&r-n-i<0)return!0}function UM1(e,a,t,c){const{x:r,width:n}=t,{width:i,chartArea:{left:s,right:l}}=e;let f="center";return c==="center"?f=r<=(s+l)/2?"left":"right":r<=n/2?f="left":r>=i-n/2&&(f="right"),$M1(f,e,a,t)&&(f="center"),f}function $f(e,a,t){const c=t.yAlign||a.yAlign||IM1(e,t);return{xAlign:t.xAlign||a.xAlign||UM1(e,a,t,c),yAlign:c}}function WM1(e,a){let{x:t,width:c}=e;return a==="right"?t-=c:a==="center"&&(t-=c/2),t}function YM1(e,a,t){let{y:c,height:r}=e;return a==="top"?c+=t:a==="bottom"?c-=r+t:c-=r/2,c}function Uf(e,a,t,c){const{caretSize:r,caretPadding:n,cornerRadius:i}=e,{xAlign:s,yAlign:l}=t,f=r+n,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:m}=p6(i);let p=WM1(a,s);const v=YM1(a,l,f);return l==="center"?s==="left"?p+=f:s==="right"&&(p-=f):s==="left"?p-=Math.max(u,d)+r:s==="right"&&(p+=Math.max(h,m)+r),{x:H3(p,0,c.width-a.width),y:H3(v,0,c.height-a.height)}}function zt(e,a,t){const c=$3(t.padding);return a==="center"?e.x+e.width/2:a==="right"?e.x+e.width-c.right:e.x+c.left}function Wf(e){return ee([],we(e))}function jM1(e,a,t){return R0(e,{tooltip:a,tooltipItems:t,type:"tooltip"})}function Yf(e,a){const t=a&&a.dataset&&a.dataset.tooltip&&a.dataset.tooltip.callbacks;return t?e.override(t):e}const sw={beforeTitle:be,title(e){if(e.length>0){const a=e[0],t=a.chart.data.labels,c=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return a.dataset.label||"";if(a.label)return a.label;if(c>0&&a.dataIndex<c)return t[a.dataIndex]}return""},afterTitle:be,beforeBody:be,beforeLabel:be,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let a=e.dataset.label||"";a&&(a+=": ");const t=e.formattedValue;return s2(t)||(a+=t),a},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:be,afterBody:be,beforeFooter:be,footer:be,afterFooter:be};function J3(e,a,t,c){const r=e[a].call(t,c);return typeof r>"u"?sw[a].call(t,c):r}class Tn extends q4{constructor(a){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=a.chart,this.options=a.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(a){this.options=a,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const a=this._cachedAnimations;if(a)return a;const t=this.chart,c=this.options.setContext(this.getContext()),r=c.enabled&&t.options.animation&&c.animations,n=new RV(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=jM1(this.chart.getContext(),this,this._tooltipItems))}getTitle(a,t){const{callbacks:c}=t,r=J3(c,"beforeTitle",this,a),n=J3(c,"title",this,a),i=J3(c,"afterTitle",this,a);let s=[];return s=ee(s,we(r)),s=ee(s,we(n)),s=ee(s,we(i)),s}getBeforeBody(a,t){return Wf(J3(t.callbacks,"beforeBody",this,a))}getBody(a,t){const{callbacks:c}=t,r=[];return p2(a,n=>{const i={before:[],lines:[],after:[]},s=Yf(c,n);ee(i.before,we(J3(s,"beforeLabel",this,n))),ee(i.lines,J3(s,"label",this,n)),ee(i.after,we(J3(s,"afterLabel",this,n))),r.push(i)}),r}getAfterBody(a,t){return Wf(J3(t.callbacks,"afterBody",this,a))}getFooter(a,t){const{callbacks:c}=t,r=J3(c,"beforeFooter",this,a),n=J3(c,"footer",this,a),i=J3(c,"afterFooter",this,a);let s=[];return s=ee(s,we(r)),s=ee(s,we(n)),s=ee(s,we(i)),s}_createItems(a){const t=this._active,c=this.chart.data,r=[],n=[],i=[];let s=[],l,f;for(l=0,f=t.length;l<f;++l)s.push(RM1(this.chart,t[l]));return a.filter&&(s=s.filter((u,h,d)=>a.filter(u,h,d,c))),a.itemSort&&(s=s.sort((u,h)=>a.itemSort(u,h,c))),p2(s,u=>{const h=Yf(a.callbacks,u);r.push(J3(h,"labelColor",this,u)),n.push(J3(h,"labelPointStyle",this,u)),i.push(J3(h,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=n,this.labelTextColors=i,this.dataPoints=s,s}update(a,t){const c=this.options.setContext(this.getContext()),r=this._active;let n,i=[];if(!r.length)this.opacity!==0&&(n={opacity:0});else{const s=t5[c.position].call(this,r,this._eventPosition);i=this._createItems(c),this.title=this.getTitle(i,c),this.beforeBody=this.getBeforeBody(i,c),this.body=this.getBody(i,c),this.afterBody=this.getAfterBody(i,c),this.footer=this.getFooter(i,c);const l=this._size=If(this,c),f=Object.assign({},s,l),u=$f(this.chart,c,f),h=Uf(c,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,n={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=i,this.$context=void 0,n&&this._resolveAnimations().update(this,n),a&&c.external&&c.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(a,t,c,r){const n=this.getCaretPosition(a,c,r);t.lineTo(n.x1,n.y1),t.lineTo(n.x2,n.y2),t.lineTo(n.x3,n.y3)}getCaretPosition(a,t,c){const{xAlign:r,yAlign:n}=this,{caretSize:i,cornerRadius:s}=c,{topLeft:l,topRight:f,bottomLeft:u,bottomRight:h}=p6(s),{x:d,y:m}=a,{width:p,height:v}=t;let g,x,z,C,y,b;return n==="center"?(y=m+v/2,r==="left"?(g=d,x=g-i,C=y+i,b=y-i):(g=d+p,x=g+i,C=y-i,b=y+i),z=g):(r==="left"?x=d+Math.max(l,u)+i:r==="right"?x=d+p-Math.max(f,h)-i:x=this.caretX,n==="top"?(C=m,y=C-i,g=x-i,z=x+i):(C=m+v,y=C+i,g=x+i,z=x-i),b=C),{x1:g,x2:x,x3:z,y1:C,y2:y,y3:b}}drawTitle(a,t,c){const r=this.title,n=r.length;let i,s,l;if(n){const f=s8(c.rtl,this.x,this.width);for(a.x=zt(this,c.titleAlign,c),t.textAlign=f.textAlign(c.titleAlign),t.textBaseline="middle",i=m3(c.titleFont),s=c.titleSpacing,t.fillStyle=c.titleColor,t.font=i.string,l=0;l<n;++l)t.fillText(r[l],f.x(a.x),a.y+i.lineHeight/2),a.y+=i.lineHeight+s,l+1===n&&(a.y+=c.titleMarginBottom-s)}}_drawColorBox(a,t,c,r,n){const i=this.labelColors[c],s=this.labelPointStyles[c],{boxHeight:l,boxWidth:f}=n,u=m3(n.bodyFont),h=zt(this,"left",n),d=r.x(h),m=l<u.lineHeight?(u.lineHeight-l)/2:0,p=t.y+m;if(n.usePointStyle){const v={radius:Math.min(f,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=r.leftForLtr(d,f)+f/2,x=p+l/2;a.strokeStyle=n.multiKeyBackground,a.fillStyle=n.multiKeyBackground,wn(a,v,g,x),a.strokeStyle=i.borderColor,a.fillStyle=i.backgroundColor,wn(a,v,g,x)}else{a.lineWidth=a2(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,a.strokeStyle=i.borderColor,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset||0;const v=r.leftForLtr(d,f),g=r.leftForLtr(r.xPlus(d,1),f-2),x=p6(i.borderRadius);Object.values(x).some(z=>z!==0)?(a.beginPath(),a.fillStyle=n.multiKeyBackground,J5(a,{x:v,y:p,w:f,h:l,radius:x}),a.fill(),a.stroke(),a.fillStyle=i.backgroundColor,a.beginPath(),J5(a,{x:g,y:p+1,w:f-2,h:l-2,radius:x}),a.fill()):(a.fillStyle=n.multiKeyBackground,a.fillRect(v,p,f,l),a.strokeRect(v,p,f,l),a.fillStyle=i.backgroundColor,a.fillRect(g,p+1,f-2,l-2))}a.fillStyle=this.labelTextColors[c]}drawBody(a,t,c){const{body:r}=this,{bodySpacing:n,bodyAlign:i,displayColors:s,boxHeight:l,boxWidth:f,boxPadding:u}=c,h=m3(c.bodyFont);let d=h.lineHeight,m=0;const p=s8(c.rtl,this.x,this.width),v=function(T){t.fillText(T,p.x(a.x+m),a.y+d/2),a.y+=d+n},g=p.textAlign(i);let x,z,C,y,b,w,H;for(t.textAlign=i,t.textBaseline="middle",t.font=h.string,a.x=zt(this,g,c),t.fillStyle=c.bodyColor,p2(this.beforeBody,v),m=s&&g!=="right"?i==="center"?f/2+u:f+2+u:0,y=0,w=r.length;y<w;++y){for(x=r[y],z=this.labelTextColors[y],t.fillStyle=z,p2(x.before,v),C=x.lines,s&&C.length&&(this._drawColorBox(t,a,y,p,c),d=Math.max(h.lineHeight,l)),b=0,H=C.length;b<H;++b)v(C[b]),d=h.lineHeight;p2(x.after,v)}m=0,d=h.lineHeight,p2(this.afterBody,v),a.y-=n}drawFooter(a,t,c){const r=this.footer,n=r.length;let i,s;if(n){const l=s8(c.rtl,this.x,this.width);for(a.x=zt(this,c.footerAlign,c),a.y+=c.footerMarginTop,t.textAlign=l.textAlign(c.footerAlign),t.textBaseline="middle",i=m3(c.footerFont),t.fillStyle=c.footerColor,t.font=i.string,s=0;s<n;++s)t.fillText(r[s],l.x(a.x),a.y+i.lineHeight/2),a.y+=i.lineHeight+c.footerSpacing}}drawBackground(a,t,c,r){const{xAlign:n,yAlign:i}=this,{x:s,y:l}=a,{width:f,height:u}=c,{topLeft:h,topRight:d,bottomLeft:m,bottomRight:p}=p6(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(s+h,l),i==="top"&&this.drawCaret(a,t,c,r),t.lineTo(s+f-d,l),t.quadraticCurveTo(s+f,l,s+f,l+d),i==="center"&&n==="right"&&this.drawCaret(a,t,c,r),t.lineTo(s+f,l+u-p),t.quadraticCurveTo(s+f,l+u,s+f-p,l+u),i==="bottom"&&this.drawCaret(a,t,c,r),t.lineTo(s+m,l+u),t.quadraticCurveTo(s,l+u,s,l+u-m),i==="center"&&n==="left"&&this.drawCaret(a,t,c,r),t.lineTo(s,l+h),t.quadraticCurveTo(s,l,s+h,l),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(a){const t=this.chart,c=this.$animations,r=c&&c.x,n=c&&c.y;if(r||n){const i=t5[a.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=If(this,a),l=Object.assign({},i,this._size),f=$f(t,a,l),u=Uf(a,l,f,t);(r._to!==u.x||n._to!==u.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(a){const t=this.options.setContext(this.getContext());let c=this.opacity;if(!c)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},n={x:this.x,y:this.y};c=Math.abs(c)<.001?0:c;const i=$3(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(a.save(),a.globalAlpha=c,this.drawBackground(n,a,r,t),FV(a,t.textDirection),n.y+=i.top,this.drawTitle(n,a,t),this.drawBody(n,a,t),this.drawFooter(n,a,t),DV(a,t.textDirection),a.restore())}getActiveElements(){return this._active||[]}setActiveElements(a,t){const c=this._active,r=a.map(({datasetIndex:s,index:l})=>{const f=this.chart.getDatasetMeta(s);if(!f)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:f.data[l],index:l}}),n=!C7(c,r),i=this._positionChanged(r,t);(n||i)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(a,t,c=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,n=this._active||[],i=this._getActiveElements(a,n,t,c),s=this._positionChanged(i,a),l=t||!C7(i,n)||s;return l&&(this._active=i,(r.enabled||r.external)&&(this._eventPosition={x:a.x,y:a.y},this.update(!0,t))),l}_getActiveElements(a,t,c,r){const n=this.options;if(a.type==="mouseout")return[];if(!r)return t.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const i=this.chart.getElementsAtEventForMode(a,n.mode,n,c);return n.reverse&&i.reverse(),i}_positionChanged(a,t){const{caretX:c,caretY:r,options:n}=this,i=t5[n.position].call(this,a,t);return i!==!1&&(c!==i.x||r!==i.y)}}l1(Tn,"positioners",t5);var qM1={id:"tooltip",_element:Tn,positioners:t5,afterInit(e,a,t){t&&(e.tooltip=new Tn({chart:e,options:t}))},beforeUpdate(e,a,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,a,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){const a=e.tooltip;if(a&&a._willRender()){const t={tooltip:a};if(e.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0})===!1)return;a.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,a){if(e.tooltip){const t=a.replay;e.tooltip.handleEvent(a.event,t,a.inChartArea)&&(a.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,a)=>a.bodyFont.size,boxWidth:(e,a)=>a.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:sw},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},GM1=Object.freeze({__proto__:null,Colors:iM1,Decimation:fM1,Filler:AM1,Legend:DM1,SubTitle:OM1,Title:BM1,Tooltip:qM1});const XM1=(e,a,t,c)=>(typeof a=="string"?(t=e.push(a)-1,c.unshift({index:t,label:a})):isNaN(a)&&(t=null),t);function ZM1(e,a,t,c){const r=e.indexOf(a);if(r===-1)return XM1(e,a,t,c);const n=e.lastIndexOf(a);return r!==n?t:r}const QM1=(e,a)=>e===null?null:H3(Math.round(e),0,a);function jf(e){const a=this.getLabels();return e>=0&&e<a.length?a[e]:e}class En extends S6{constructor(a){super(a),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(a){const t=this._addedLabels;if(t.length){const c=this.getLabels();for(const{index:r,label:n}of t)c[r]===n&&c.splice(r,1);this._addedLabels=[]}super.init(a)}parse(a,t){if(s2(a))return null;const c=this.getLabels();return t=isFinite(t)&&c[t]===a?t:ZM1(c,a,q1(t,a),this._addedLabels),QM1(t,c.length-1)}determineDataLimits(){const{minDefined:a,maxDefined:t}=this.getUserBounds();let{min:c,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(a||(c=0),t||(r=this.getLabels().length-1)),this.min=c,this.max=r}buildTicks(){const a=this.min,t=this.max,c=this.options.offset,r=[];let n=this.getLabels();n=a===0&&t===n.length-1?n:n.slice(a,t+1),this._valueRange=Math.max(n.length-(c?0:1),1),this._startValue=this.min-(c?.5:0);for(let i=a;i<=t;i++)r.push({value:i});return r}getLabelForValue(a){return jf.call(this,a)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(a){return typeof a!="number"&&(a=this.parse(a)),a===null?NaN:this.getPixelForDecimal((a-this._startValue)/this._valueRange)}getPixelForTick(a){const t=this.ticks;return a<0||a>t.length-1?null:this.getPixelForValue(t[a].value)}getValueForPixel(a){return Math.round(this._startValue+this.getDecimalForPixel(a)*this._valueRange)}getBasePixel(){return this.bottom}}l1(En,"id","category"),l1(En,"defaults",{ticks:{callback:jf}});function KM1(e,a){const t=[],{bounds:r,step:n,min:i,max:s,precision:l,count:f,maxTicks:u,maxDigits:h,includeBounds:d}=e,m=n||1,p=u-1,{min:v,max:g}=a,x=!s2(i),z=!s2(s),C=!s2(f),y=(g-v)/(h+1);let b=Rl((g-v)/p/m)*m,w,H,T,A;if(b<1e-14&&!x&&!z)return[{value:v},{value:g}];A=Math.ceil(g/b)-Math.floor(v/b),A>p&&(b=Rl(A*b/p/m)*m),s2(l)||(w=Math.pow(10,l),b=Math.ceil(b*w)/w),r==="ticks"?(H=Math.floor(v/b)*b,T=Math.ceil(g/b)*b):(H=v,T=g),x&&z&&n&&Yg1((s-i)/n,b/1e3)?(A=Math.round(Math.min((s-i)/b,u)),b=(s-i)/A,H=i,T=s):C?(H=x?i:H,T=z?s:T,A=f-1,b=(T-H)/A):(A=(T-H)/b,z5(A,Math.round(A),b/1e3)?A=Math.round(A):A=Math.ceil(A));const U=Math.max(Il(b),Il(H));w=Math.pow(10,s2(l)?U:l),H=Math.round(H*w)/w,T=Math.round(T*w)/w;let D=0;for(x&&(d&&H!==i?(t.push({value:i}),H<i&&D++,z5(Math.round((H+D*b)*w)/w,i,qf(i,y,e))&&D++):H<i&&D++);D<A;++D){const k=Math.round((H+D*b)*w)/w;if(z&&k>s)break;t.push({value:k})}return z&&d&&T!==s?t.length&&z5(t[t.length-1].value,s,qf(s,y,e))?t[t.length-1].value=s:t.push({value:s}):(!z||T===s)&&t.push({value:T}),t}function qf(e,a,{horizontal:t,minRotation:c}){const r=D4(c),n=(t?Math.sin(r):Math.cos(r))||.001,i=.75*a*(""+e).length;return Math.min(a/n,i)}class w7 extends S6{constructor(a){super(a),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(a,t){return s2(a)||(typeof a=="number"||a instanceof Number)&&!isFinite(+a)?null:+a}handleTickRangeOptions(){const{beginAtZero:a}=this.options,{minDefined:t,maxDefined:c}=this.getUserBounds();let{min:r,max:n}=this;const i=l=>r=t?r:l,s=l=>n=c?n:l;if(a){const l=he(r),f=he(n);l<0&&f<0?s(0):l>0&&f>0&&i(0)}if(r===n){let l=n===0?1:Math.abs(n*.05);s(n+l),a||i(r-l)}this.min=r,this.max=n}getTickLimit(){const a=this.options.ticks;let{maxTicksLimit:t,stepSize:c}=a,r;return c?(r=Math.ceil(this.max/c)-Math.floor(this.min/c)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${c} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),t=t||11),t&&(r=Math.min(t,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const a=this.options,t=a.ticks;let c=this.getTickLimit();c=Math.max(2,c);const r={maxTicks:c,bounds:a.bounds,min:a.min,max:a.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},n=this._range||this,i=KM1(r,n);return a.bounds==="ticks"&&xV(i,this,"value"),a.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const a=this.ticks;let t=this.min,c=this.max;if(super.configure(),this.options.offset&&a.length){const r=(c-t)/Math.max(a.length-1,1)/2;t-=r,c+=r}this._startValue=t,this._endValue=c,this._valueRange=c-t}getLabelForValue(a){return Ta(a,this.chart.options.locale,this.options.ticks.format)}}class Fn extends w7{determineDataLimits(){const{min:a,max:t}=this.getMinMax(!0);this.min=j2(a)?a:0,this.max=j2(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const a=this.isHorizontal(),t=a?this.width:this.height,c=D4(this.options.ticks.minRotation),r=(a?Math.sin(c):Math.cos(c))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,n.lineHeight/r))}getPixelForValue(a){return a===null?NaN:this.getPixelForDecimal((a-this._startValue)/this._valueRange)}getValueForPixel(a){return this._startValue+this.getDecimalForPixel(a)*this._valueRange}}l1(Fn,"id","linear"),l1(Fn,"defaults",{ticks:{callback:Nc.formatters.numeric}});const aa=e=>Math.floor(m0(e)),Q0=(e,a)=>Math.pow(10,aa(e)+a);function Gf(e){return e/Math.pow(10,aa(e))===1}function Xf(e,a,t){const c=Math.pow(10,t),r=Math.floor(e/c);return Math.ceil(a/c)-r}function JM1(e,a){const t=a-e;let c=aa(t);for(;Xf(e,a,c)>10;)c++;for(;Xf(e,a,c)<10;)c--;return Math.min(c,aa(e))}function eH1(e,{min:a,max:t}){a=s4(e.min,a);const c=[],r=aa(a);let n=JM1(a,t),i=n<0?Math.pow(10,Math.abs(n)):1;const s=Math.pow(10,n),l=r>n?Math.pow(10,r):0,f=Math.round((a-l)*i)/i,u=Math.floor((a-l)/s/10)*s*10;let h=Math.floor((f-u)/Math.pow(10,n)),d=s4(e.min,Math.round((l+u+h*Math.pow(10,n))*i)/i);for(;d<t;)c.push({value:d,major:Gf(d),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(n++,h=2,i=n>=0?1:i),d=Math.round((l+u+h*Math.pow(10,n))*i)/i;const m=s4(e.max,d);return c.push({value:m,major:Gf(m),significand:h}),c}class Dn extends S6{constructor(a){super(a),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(a,t){const c=w7.prototype.parse.apply(this,[a,t]);if(c===0){this._zero=!0;return}return j2(c)&&c>0?c:null}determineDataLimits(){const{min:a,max:t}=this.getMinMax(!0);this.min=j2(a)?Math.max(0,a):null,this.max=j2(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!j2(this._userMin)&&(this.min=a===Q0(this.min,0)?Q0(this.min,-1):Q0(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:a,maxDefined:t}=this.getUserBounds();let c=this.min,r=this.max;const n=s=>c=a?c:s,i=s=>r=t?r:s;c===r&&(c<=0?(n(1),i(10)):(n(Q0(c,-1)),i(Q0(r,1)))),c<=0&&n(Q0(r,-1)),r<=0&&i(Q0(c,1)),this.min=c,this.max=r}buildTicks(){const a=this.options,t={min:this._userMin,max:this._userMax},c=eH1(t,this);return a.bounds==="ticks"&&xV(c,this,"value"),a.reverse?(c.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),c}getLabelForValue(a){return a===void 0?"0":Ta(a,this.chart.options.locale,this.options.ticks.format)}configure(){const a=this.min;super.configure(),this._startValue=m0(a),this._valueRange=m0(this.max)-m0(a)}getPixelForValue(a){return(a===void 0||a===0)&&(a=this.min),a===null||isNaN(a)?NaN:this.getPixelForDecimal(a===this.min?0:(m0(a)-this._startValue)/this._valueRange)}getValueForPixel(a){const t=this.getDecimalForPixel(a);return Math.pow(10,this._startValue+t*this._valueRange)}}l1(Dn,"id","logarithmic"),l1(Dn,"defaults",{ticks:{callback:Nc.formatters.logarithmic,major:{enabled:!0}}});function Pn(e){const a=e.ticks;if(a.display&&e.display){const t=$3(a.backdropPadding);return q1(a.font&&a.font.size,P2.font.size)+t.height}return 0}function aH1(e,a,t){return t=_2(t)?t:[t],{w:ox1(e,a.string,t),h:t.length*a.lineHeight}}function Zf(e,a,t,c,r){return e===c||e===r?{start:a-t/2,end:a+t/2}:e<c||e>r?{start:a-t,end:a}:{start:a,end:a+t}}function tH1(e){const a={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},a),c=[],r=[],n=e._pointLabels.length,i=e.options.pointLabels,s=i.centerPointLabels?S2/n:0;for(let l=0;l<n;l++){const f=i.setContext(e.getPointLabelContext(l));r[l]=f.padding;const u=e.getPointPosition(l,e.drawingArea+r[l],s),h=m3(f.font),d=aH1(e.ctx,h,e._pointLabels[l]);c[l]=d;const m=o4(e.getIndexAngle(l)+s),p=Math.round(vs(m)),v=Zf(p,u.x,d.w,0,180),g=Zf(p,u.y,d.h,90,270);cH1(t,a,m,v,g)}e.setCenterPoint(a.l-t.l,t.r-a.r,a.t-t.t,t.b-a.b),e._pointLabelItems=iH1(e,c,r)}function cH1(e,a,t,c,r){const n=Math.abs(Math.sin(t)),i=Math.abs(Math.cos(t));let s=0,l=0;c.start<a.l?(s=(a.l-c.start)/n,e.l=Math.min(e.l,a.l-s)):c.end>a.r&&(s=(c.end-a.r)/n,e.r=Math.max(e.r,a.r+s)),r.start<a.t?(l=(a.t-r.start)/i,e.t=Math.min(e.t,a.t-l)):r.end>a.b&&(l=(r.end-a.b)/i,e.b=Math.max(e.b,a.b+l))}function rH1(e,a,t){const c=e.drawingArea,{extra:r,additionalAngle:n,padding:i,size:s}=t,l=e.getPointPosition(a,c+r+i,n),f=Math.round(vs(o4(l.angle+t3))),u=lH1(l.y,s.h,f),h=sH1(f),d=oH1(l.x,s.w,h);return{visible:!0,x:l.x,y:u,textAlign:h,left:d,top:u,right:d+s.w,bottom:u+s.h}}function nH1(e,a){if(!a)return!0;const{left:t,top:c,right:r,bottom:n}=e;return!(De({x:t,y:c},a)||De({x:t,y:n},a)||De({x:r,y:c},a)||De({x:r,y:n},a))}function iH1(e,a,t){const c=[],r=e._pointLabels.length,n=e.options,{centerPointLabels:i,display:s}=n.pointLabels,l={extra:Pn(n)/2,additionalAngle:i?S2/r:0};let f;for(let u=0;u<r;u++){l.padding=t[u],l.size=a[u];const h=rH1(e,u,l);c.push(h),s==="auto"&&(h.visible=nH1(h,f),h.visible&&(f=h))}return c}function sH1(e){return e===0||e===180?"center":e<180?"left":"right"}function oH1(e,a,t){return t==="right"?e-=a:t==="center"&&(e-=a/2),e}function lH1(e,a,t){return t===90||t===270?e-=a/2:(t>270||t<90)&&(e-=a),e}function fH1(e,a,t){const{left:c,top:r,right:n,bottom:i}=t,{backdropColor:s}=a;if(!s2(s)){const l=p6(a.borderRadius),f=$3(a.backdropPadding);e.fillStyle=s;const u=c-f.left,h=r-f.top,d=n-c+f.width,m=i-r+f.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),J5(e,{x:u,y:h,w:d,h:m,radius:l}),e.fill()):e.fillRect(u,h,d,m)}}function uH1(e,a){const{ctx:t,options:{pointLabels:c}}=e;for(let r=a-1;r>=0;r--){const n=e._pointLabelItems[r];if(!n.visible)continue;const i=c.setContext(e.getPointLabelContext(r));fH1(t,i,n);const s=m3(i.font),{x:l,y:f,textAlign:u}=n;H6(t,e._pointLabels[r],l,f+s.lineHeight/2,s,{color:i.color,textAlign:u,textBaseline:"middle"})}}function ow(e,a,t,c){const{ctx:r}=e;if(t)r.arc(e.xCenter,e.yCenter,a,0,A2);else{let n=e.getPointPosition(0,a);r.moveTo(n.x,n.y);for(let i=1;i<c;i++)n=e.getPointPosition(i,a),r.lineTo(n.x,n.y)}}function hH1(e,a,t,c,r){const n=e.ctx,i=a.circular,{color:s,lineWidth:l}=a;!i&&!c||!s||!l||t<0||(n.save(),n.strokeStyle=s,n.lineWidth=l,n.setLineDash(r.dash||[]),n.lineDashOffset=r.dashOffset,n.beginPath(),ow(e,t,i,c),n.closePath(),n.stroke(),n.restore())}function dH1(e,a,t){return R0(e,{label:t,index:a,type:"pointLabel"})}class c5 extends w7{constructor(a){super(a),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const a=this._padding=$3(Pn(this.options)/2),t=this.width=this.maxWidth-a.width,c=this.height=this.maxHeight-a.height;this.xCenter=Math.floor(this.left+t/2+a.left),this.yCenter=Math.floor(this.top+c/2+a.top),this.drawingArea=Math.floor(Math.min(t,c)/2)}determineDataLimits(){const{min:a,max:t}=this.getMinMax(!1);this.min=j2(a)&&!isNaN(a)?a:0,this.max=j2(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Pn(this.options))}generateTickLabels(a){w7.prototype.generateTickLabels.call(this,a),this._pointLabels=this.getLabels().map((t,c)=>{const r=H2(this.options.pointLabels.callback,[t,c],this);return r||r===0?r:""}).filter((t,c)=>this.chart.getDataVisibility(c))}fit(){const a=this.options;a.display&&a.pointLabels.display?tH1(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(a,t,c,r){this.xCenter+=Math.floor((a-t)/2),this.yCenter+=Math.floor((c-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(a,t,c,r))}getIndexAngle(a){const t=A2/(this._pointLabels.length||1),c=this.options.startAngle||0;return o4(a*t+D4(c))}getDistanceFromCenterForValue(a){if(s2(a))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-a)*t:(a-this.min)*t}getValueForDistanceFromCenter(a){if(s2(a))return NaN;const t=a/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(a){const t=this._pointLabels||[];if(a>=0&&a<t.length){const c=t[a];return dH1(this.getContext(),a,c)}}getPointPosition(a,t,c=0){const r=this.getIndexAngle(a)-t3+c;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(a,t){return this.getPointPosition(a,this.getDistanceFromCenterForValue(t))}getBasePosition(a){return this.getPointPositionForValue(a||0,this.getBaseValue())}getPointLabelPosition(a){const{left:t,top:c,right:r,bottom:n}=this._pointLabelItems[a];return{left:t,top:c,right:r,bottom:n}}drawBackground(){const{backgroundColor:a,grid:{circular:t}}=this.options;if(a){const c=this.ctx;c.save(),c.beginPath(),ow(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),c.closePath(),c.fillStyle=a,c.fill(),c.restore()}}drawGrid(){const a=this.ctx,t=this.options,{angleLines:c,grid:r,border:n}=t,i=this._pointLabels.length;let s,l,f;if(t.pointLabels.display&&uH1(this,i),r.display&&this.ticks.forEach((u,h)=>{if(h!==0||h===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const d=this.getContext(h),m=r.setContext(d),p=n.setContext(d);hH1(this,m,l,i,p)}}),c.display){for(a.save(),s=i-1;s>=0;s--){const u=c.setContext(this.getPointLabelContext(s)),{color:h,lineWidth:d}=u;!d||!h||(a.lineWidth=d,a.strokeStyle=h,a.setLineDash(u.borderDash),a.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),f=this.getPointPosition(s,l),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(f.x,f.y),a.stroke())}a.restore()}}drawBorder(){}drawLabels(){const a=this.ctx,t=this.options,c=t.ticks;if(!c.display)return;const r=this.getIndexAngle(0);let n,i;a.save(),a.translate(this.xCenter,this.yCenter),a.rotate(r),a.textAlign="center",a.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;const f=c.setContext(this.getContext(l)),u=m3(f.font);if(n=this.getDistanceFromCenterForValue(this.ticks[l].value),f.showLabelBackdrop){a.font=u.string,i=a.measureText(s.label).width,a.fillStyle=f.backdropColor;const h=$3(f.backdropPadding);a.fillRect(-i/2-h.left,-n-u.size/2-h.top,i+h.width,u.size+h.height)}H6(a,s.label,0,-n,u,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),a.restore()}drawTitle(){}}l1(c5,"id","radialLinear"),l1(c5,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Nc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(a){return a},padding:5,centerPointLabels:!1}}),l1(c5,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),l1(c5,"descriptors",{angleLines:{_fallback:"grid"}});const Dc={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}},c4=Object.keys(Dc);function Qf(e,a){return e-a}function Kf(e,a){if(s2(a))return null;const t=e._adapter,{parser:c,round:r,isoWeekday:n}=e._parseOpts;let i=a;return typeof c=="function"&&(i=c(i)),j2(i)||(i=typeof c=="string"?t.parse(i,c):t.parse(i)),i===null?null:(r&&(i=r==="week"&&(C8(n)||n===!0)?t.startOf(i,"isoWeek",n):t.startOf(i,r)),+i)}function Jf(e,a,t,c){const r=c4.length;for(let n=c4.indexOf(e);n<r-1;++n){const i=Dc[c4[n]],s=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((t-a)/(s*i.size))<=c)return c4[n]}return c4[r-1]}function mH1(e,a,t,c,r){for(let n=c4.length-1;n>=c4.indexOf(t);n--){const i=c4[n];if(Dc[i].common&&e._adapter.diff(r,c,i)>=a-1)return i}return c4[t?c4.indexOf(t):0]}function pH1(e){for(let a=c4.indexOf(e)+1,t=c4.length;a<t;++a)if(Dc[c4[a]].common)return c4[a]}function eu(e,a,t){if(!t)e[a]=!0;else if(t.length){const{lo:c,hi:r}=gs(t,a),n=t[c]>=a?t[c]:t[r];e[n]=!0}}function vH1(e,a,t,c){const r=e._adapter,n=+r.startOf(a[0].value,c),i=a[a.length-1].value;let s,l;for(s=n;s<=i;s=+r.add(s,1,c))l=t[s],l>=0&&(a[l].major=!0);return a}function au(e,a,t){const c=[],r={},n=a.length;let i,s;for(i=0;i<n;++i)s=a[i],r[s]=i,c.push({value:s,major:!1});return n===0||!t?c:vH1(e,c,r,t)}class ta extends S6{constructor(a){super(a),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(a,t={}){const c=a.time||(a.time={}),r=this._adapter=new bC1._date(a.adapters.date);r.init(t),C5(c.displayFormats,r.formats()),this._parseOpts={parser:c.parser,round:c.round,isoWeekday:c.isoWeekday},super.init(a),this._normalized=t.normalized}parse(a,t){return a===void 0?null:Kf(this,a)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const a=this.options,t=this._adapter,c=a.time.unit||"day";let{min:r,max:n,minDefined:i,maxDefined:s}=this.getUserBounds();function l(f){!i&&!isNaN(f.min)&&(r=Math.min(r,f.min)),!s&&!isNaN(f.max)&&(n=Math.max(n,f.max))}(!i||!s)&&(l(this._getLabelBounds()),(a.bounds!=="ticks"||a.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=j2(r)&&!isNaN(r)?r:+t.startOf(Date.now(),c),n=j2(n)&&!isNaN(n)?n:+t.endOf(Date.now(),c)+1,this.min=Math.min(r,n-1),this.max=Math.max(r+1,n)}_getLabelBounds(){const a=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;return a.length&&(t=a[0],c=a[a.length-1]),{min:t,max:c}}buildTicks(){const a=this.options,t=a.time,c=a.ticks,r=c.source==="labels"?this.getLabelTimestamps():this._generate();a.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const n=this.min,i=this.max,s=Xg1(r,n,i);return this._unit=t.unit||(c.autoSkip?Jf(t.minUnit,this.min,this.max,this._getLabelCapacity(n)):mH1(this,s.length,t.minUnit,this.min,this.max)),this._majorUnit=!c.major.enabled||this._unit==="year"?void 0:pH1(this._unit),this.initOffsets(r),a.reverse&&s.reverse(),au(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(a=>+a.value))}initOffsets(a=[]){let t=0,c=0,r,n;this.options.offset&&a.length&&(r=this.getDecimalForValue(a[0]),a.length===1?t=1-r:t=(this.getDecimalForValue(a[1])-r)/2,n=this.getDecimalForValue(a[a.length-1]),a.length===1?c=n:c=(n-this.getDecimalForValue(a[a.length-2]))/2);const i=a.length<3?.5:.25;t=H3(t,0,i),c=H3(c,0,i),this._offsets={start:t,end:c,factor:1/(t+1+c)}}_generate(){const a=this._adapter,t=this.min,c=this.max,r=this.options,n=r.time,i=n.unit||Jf(n.minUnit,t,c,this._getLabelCapacity(t)),s=q1(r.ticks.stepSize,1),l=i==="week"?n.isoWeekday:!1,f=C8(l)||l===!0,u={};let h=t,d,m;if(f&&(h=+a.startOf(h,"isoWeek",l)),h=+a.startOf(h,f?"day":i),a.diff(c,t,i)>1e5*s)throw new Error(t+" and "+c+" are too far apart with stepSize of "+s+" "+i);const p=r.ticks.source==="data"&&this.getDataTimestamps();for(d=h,m=0;d<c;d=+a.add(d,s,i),m++)eu(u,d,p);return(d===c||r.bounds==="ticks"||m===1)&&eu(u,d,p),Object.keys(u).sort(Qf).map(v=>+v)}getLabelForValue(a){const t=this._adapter,c=this.options.time;return c.tooltipFormat?t.format(a,c.tooltipFormat):t.format(a,c.displayFormats.datetime)}format(a,t){const r=this.options.time.displayFormats,n=this._unit,i=t||r[n];return this._adapter.format(a,i)}_tickFormatFunction(a,t,c,r){const n=this.options,i=n.ticks.callback;if(i)return H2(i,[a,t,c],this);const s=n.time.displayFormats,l=this._unit,f=this._majorUnit,u=l&&s[l],h=f&&s[f],d=c[t],m=f&&h&&d&&d.major;return this._adapter.format(a,r||(m?h:u))}generateTickLabels(a){let t,c,r;for(t=0,c=a.length;t<c;++t)r=a[t],r.label=this._tickFormatFunction(r.value,t,a)}getDecimalForValue(a){return a===null?NaN:(a-this.min)/(this.max-this.min)}getPixelForValue(a){const t=this._offsets,c=this.getDecimalForValue(a);return this.getPixelForDecimal((t.start+c)*t.factor)}getValueForPixel(a){const t=this._offsets,c=this.getDecimalForPixel(a)/t.factor-t.end;return this.min+c*(this.max-this.min)}_getLabelSize(a){const t=this.options.ticks,c=this.ctx.measureText(a).width,r=D4(this.isHorizontal()?t.maxRotation:t.minRotation),n=Math.cos(r),i=Math.sin(r),s=this._resolveTickFontOptions(0).size;return{w:c*n+s*i,h:c*i+s*n}}_getLabelCapacity(a){const t=this.options.time,c=t.displayFormats,r=c[t.unit]||c.millisecond,n=this._tickFormatFunction(a,0,au(this,[a],this._majorUnit),r),i=this._getLabelSize(n),s=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return s>0?s:1}getDataTimestamps(){let a=this._cache.data||[],t,c;if(a.length)return a;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(t=0,c=r.length;t<c;++t)a=a.concat(r[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(a)}getLabelTimestamps(){const a=this._cache.labels||[];let t,c;if(a.length)return a;const r=this.getLabels();for(t=0,c=r.length;t<c;++t)a.push(Kf(this,r[t]));return this._cache.labels=this._normalized?a:this.normalize(a)}normalize(a){return MV(a.sort(Qf))}}l1(ta,"id","time"),l1(ta,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Mt(e,a,t){let c=0,r=e.length-1,n,i,s,l;t?(a>=e[c].pos&&a<=e[r].pos&&({lo:c,hi:r}=Fe(e,"pos",a)),{pos:n,time:s}=e[c],{pos:i,time:l}=e[r]):(a>=e[c].time&&a<=e[r].time&&({lo:c,hi:r}=Fe(e,"time",a)),{time:n,pos:s}=e[c],{time:i,pos:l}=e[r]);const f=i-n;return f?s+(l-s)*(a-n)/f:s}class Bn extends ta{constructor(a){super(a),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const a=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(a);this._minPos=Mt(t,this.min),this._tableRange=Mt(t,this.max)-this._minPos,super.initOffsets(a)}buildLookupTable(a){const{min:t,max:c}=this,r=[],n=[];let i,s,l,f,u;for(i=0,s=a.length;i<s;++i)f=a[i],f>=t&&f<=c&&r.push(f);if(r.length<2)return[{time:t,pos:0},{time:c,pos:1}];for(i=0,s=r.length;i<s;++i)u=r[i+1],l=r[i-1],f=r[i],Math.round((u+l)/2)!==f&&n.push({time:f,pos:i/(s-1)});return n}_generate(){const a=this.min,t=this.max;let c=super.getDataTimestamps();return(!c.includes(a)||!c.length)&&c.splice(0,0,a),(!c.includes(t)||c.length===1)&&c.push(t),c.sort((r,n)=>r-n)}_getTimestampsForTable(){let a=this._cache.all||[];if(a.length)return a;const t=this.getDataTimestamps(),c=this.getLabelTimestamps();return t.length&&c.length?a=this.normalize(t.concat(c)):a=t.length?t:c,a=this._cache.all=a,a}getDecimalForValue(a){return(Mt(this._table,a)-this._minPos)/this._tableRange}getValueForPixel(a){const t=this._offsets,c=this.getDecimalForPixel(a)/t.factor-t.end;return Mt(this._table,c*this._tableRange+this._minPos,!0)}}l1(Bn,"id","timeseries"),l1(Bn,"defaults",ta.defaults);var gH1=Object.freeze({__proto__:null,CategoryScale:En,LinearScale:Fn,LogarithmicScale:Dn,RadialLinearScale:c5,TimeScale:ta,TimeSeriesScale:Bn});const xH1=[yC1,Jz1,GM1,gH1];var CH1=typeof global=="object"&&global&&global.Object===Object&&global;const lw=CH1;var zH1=typeof self=="object"&&self&&self.Object===Object&&self,MH1=lw||zH1||Function("return this")();const Ce=MH1;var HH1=Ce.Symbol;const F0=HH1;var fw=Object.prototype,yH1=fw.hasOwnProperty,bH1=fw.toString,G8=F0?F0.toStringTag:void 0;function VH1(e){var a=yH1.call(e,G8),t=e[G8];try{e[G8]=void 0;var c=!0}catch{}var r=bH1.call(e);return c&&(a?e[G8]=t:delete e[G8]),r}var wH1=Object.prototype,LH1=wH1.toString;function _H1(e){return LH1.call(e)}var kH1="[object Null]",AH1="[object Undefined]",tu=F0?F0.toStringTag:void 0;function Fa(e){return e==null?e===void 0?AH1:kH1:tu&&tu in Object(e)?VH1(e):_H1(e)}function y6(e){return e!=null&&typeof e=="object"}var SH1=Array.isArray;const H8=SH1;function Da(e){var a=typeof e;return e!=null&&(a=="object"||a=="function")}var NH1="[object AsyncFunction]",TH1="[object Function]",EH1="[object GeneratorFunction]",FH1="[object Proxy]";function uw(e){if(!Da(e))return!1;var a=Fa(e);return a==TH1||a==EH1||a==NH1||a==FH1}var DH1=Ce["__core-js_shared__"];const _r=DH1;var cu=function(){var e=/[^.]+$/.exec(_r&&_r.keys&&_r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function PH1(e){return!!cu&&cu in e}var BH1=Function.prototype,OH1=BH1.toString;function N6(e){if(e!=null){try{return OH1.call(e)}catch{}try{return e+""}catch{}}return""}var RH1=/[\\^$.*+?()[\]{}|]/g,IH1=/^\[object .+?Constructor\]$/,$H1=Function.prototype,UH1=Object.prototype,WH1=$H1.toString,YH1=UH1.hasOwnProperty,jH1=RegExp("^"+WH1.call(YH1).replace(RH1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qH1(e){if(!Da(e)||PH1(e))return!1;var a=uw(e)?jH1:IH1;return a.test(N6(e))}function GH1(e,a){return e==null?void 0:e[a]}function T6(e,a){var t=GH1(e,a);return qH1(t)?t:void 0}var XH1=T6(Ce,"WeakMap");const On=XH1;var ru=Object.create,ZH1=function(){function e(){}return function(a){if(!Da(a))return{};if(ru)return ru(a);e.prototype=a;var t=new e;return e.prototype=void 0,t}}();const QH1=ZH1;function KH1(e,a){var t=-1,c=e.length;for(a||(a=Array(c));++t<c;)a[t]=e[t];return a}var JH1=function(){try{var e=T6(Object,"defineProperty");return e({},"",{}),e}catch{}}();const nu=JH1;function ey1(e,a){for(var t=-1,c=e==null?0:e.length;++t<c&&a(e[t],t,e)!==!1;);return e}var ay1=9007199254740991,ty1=/^(?:0|[1-9]\d*)$/;function cy1(e,a){var t=typeof e;return a=a??ay1,!!a&&(t=="number"||t!="symbol"&&ty1.test(e))&&e>-1&&e%1==0&&e<a}function hw(e,a,t){a=="__proto__"&&nu?nu(e,a,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[a]=t}function ks(e,a){return e===a||e!==e&&a!==a}var ry1=Object.prototype,ny1=ry1.hasOwnProperty;function dw(e,a,t){var c=e[a];(!(ny1.call(e,a)&&ks(c,t))||t===void 0&&!(a in e))&&hw(e,a,t)}function Pc(e,a,t,c){var r=!t;t||(t={});for(var n=-1,i=a.length;++n<i;){var s=a[n],l=c?c(t[s],e[s],s,t,e):void 0;l===void 0&&(l=e[s]),r?hw(t,s,l):dw(t,s,l)}return t}var iy1=9007199254740991;function mw(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=iy1}function As(e){return e!=null&&mw(e.length)&&!uw(e)}var sy1=Object.prototype;function Bc(e){var a=e&&e.constructor,t=typeof a=="function"&&a.prototype||sy1;return e===t}function oy1(e,a){for(var t=-1,c=Array(e);++t<e;)c[t]=a(t);return c}var ly1="[object Arguments]";function iu(e){return y6(e)&&Fa(e)==ly1}var pw=Object.prototype,fy1=pw.hasOwnProperty,uy1=pw.propertyIsEnumerable,hy1=iu(function(){return arguments}())?iu:function(e){return y6(e)&&fy1.call(e,"callee")&&!uy1.call(e,"callee")};const vw=hy1;function dy1(){return!1}var gw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,su=gw&&typeof module=="object"&&module&&!module.nodeType&&module,my1=su&&su.exports===gw,ou=my1?Ce.Buffer:void 0,py1=ou?ou.isBuffer:void 0,vy1=py1||dy1;const ca=vy1;var gy1="[object Arguments]",xy1="[object Array]",Cy1="[object Boolean]",zy1="[object Date]",My1="[object Error]",Hy1="[object Function]",yy1="[object Map]",by1="[object Number]",Vy1="[object Object]",wy1="[object RegExp]",Ly1="[object Set]",_y1="[object String]",ky1="[object WeakMap]",Ay1="[object ArrayBuffer]",Sy1="[object DataView]",Ny1="[object Float32Array]",Ty1="[object Float64Array]",Ey1="[object Int8Array]",Fy1="[object Int16Array]",Dy1="[object Int32Array]",Py1="[object Uint8Array]",By1="[object Uint8ClampedArray]",Oy1="[object Uint16Array]",Ry1="[object Uint32Array]",w2={};w2[Ny1]=w2[Ty1]=w2[Ey1]=w2[Fy1]=w2[Dy1]=w2[Py1]=w2[By1]=w2[Oy1]=w2[Ry1]=!0;w2[gy1]=w2[xy1]=w2[Ay1]=w2[Cy1]=w2[Sy1]=w2[zy1]=w2[My1]=w2[Hy1]=w2[yy1]=w2[by1]=w2[Vy1]=w2[wy1]=w2[Ly1]=w2[_y1]=w2[ky1]=!1;function Iy1(e){return y6(e)&&mw(e.length)&&!!w2[Fa(e)]}function Ss(e){return function(a){return e(a)}}var xw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,b5=xw&&typeof module=="object"&&module&&!module.nodeType&&module,$y1=b5&&b5.exports===xw,kr=$y1&&lw.process,Uy1=function(){try{var e=b5&&b5.require&&b5.require("util").types;return e||kr&&kr.binding&&kr.binding("util")}catch{}}();const y8=Uy1;var lu=y8&&y8.isTypedArray,Wy1=lu?Ss(lu):Iy1;const Ns=Wy1;var Yy1=Object.prototype,jy1=Yy1.hasOwnProperty;function Cw(e,a){var t=H8(e),c=!t&&vw(e),r=!t&&!c&&ca(e),n=!t&&!c&&!r&&Ns(e),i=t||c||r||n,s=i?oy1(e.length,String):[],l=s.length;for(var f in e)(a||jy1.call(e,f))&&!(i&&(f=="length"||r&&(f=="offset"||f=="parent")||n&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||cy1(f,l)))&&s.push(f);return s}function zw(e,a){return function(t){return e(a(t))}}var qy1=zw(Object.keys,Object);const Gy1=qy1;var Xy1=Object.prototype,Zy1=Xy1.hasOwnProperty;function Mw(e){if(!Bc(e))return Gy1(e);var a=[];for(var t in Object(e))Zy1.call(e,t)&&t!="constructor"&&a.push(t);return a}function Ts(e){return As(e)?Cw(e):Mw(e)}function Qy1(e){var a=[];if(e!=null)for(var t in Object(e))a.push(t);return a}var Ky1=Object.prototype,Jy1=Ky1.hasOwnProperty;function eb1(e){if(!Da(e))return Qy1(e);var a=Bc(e),t=[];for(var c in e)c=="constructor"&&(a||!Jy1.call(e,c))||t.push(c);return t}function Es(e){return As(e)?Cw(e,!0):eb1(e)}var ab1=T6(Object,"create");const ra=ab1;function tb1(){this.__data__=ra?ra(null):{},this.size=0}function cb1(e){var a=this.has(e)&&delete this.__data__[e];return this.size-=a?1:0,a}var rb1="__lodash_hash_undefined__",nb1=Object.prototype,ib1=nb1.hasOwnProperty;function sb1(e){var a=this.__data__;if(ra){var t=a[e];return t===rb1?void 0:t}return ib1.call(a,e)?a[e]:void 0}var ob1=Object.prototype,lb1=ob1.hasOwnProperty;function fb1(e){var a=this.__data__;return ra?a[e]!==void 0:lb1.call(a,e)}var ub1="__lodash_hash_undefined__";function hb1(e,a){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ra&&a===void 0?ub1:a,this}function b6(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a<t;){var c=e[a];this.set(c[0],c[1])}}b6.prototype.clear=tb1;b6.prototype.delete=cb1;b6.prototype.get=sb1;b6.prototype.has=fb1;b6.prototype.set=hb1;function db1(){this.__data__=[],this.size=0}function Oc(e,a){for(var t=e.length;t--;)if(ks(e[t][0],a))return t;return-1}var mb1=Array.prototype,pb1=mb1.splice;function vb1(e){var a=this.__data__,t=Oc(a,e);if(t<0)return!1;var c=a.length-1;return t==c?a.pop():pb1.call(a,t,1),--this.size,!0}function gb1(e){var a=this.__data__,t=Oc(a,e);return t<0?void 0:a[t][1]}function xb1(e){return Oc(this.__data__,e)>-1}function Cb1(e,a){var t=this.__data__,c=Oc(t,e);return c<0?(++this.size,t.push([e,a])):t[c][1]=a,this}function Je(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a<t;){var c=e[a];this.set(c[0],c[1])}}Je.prototype.clear=db1;Je.prototype.delete=vb1;Je.prototype.get=gb1;Je.prototype.has=xb1;Je.prototype.set=Cb1;var zb1=T6(Ce,"Map");const na=zb1;function Mb1(){this.size=0,this.__data__={hash:new b6,map:new(na||Je),string:new b6}}function Hb1(e){var a=typeof e;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?e!=="__proto__":e===null}function Rc(e,a){var t=e.__data__;return Hb1(a)?t[typeof a=="string"?"string":"hash"]:t.map}function yb1(e){var a=Rc(this,e).delete(e);return this.size-=a?1:0,a}function bb1(e){return Rc(this,e).get(e)}function Vb1(e){return Rc(this,e).has(e)}function wb1(e,a){var t=Rc(this,e),c=t.size;return t.set(e,a),this.size+=t.size==c?0:1,this}function E6(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a<t;){var c=e[a];this.set(c[0],c[1])}}E6.prototype.clear=Mb1;E6.prototype.delete=yb1;E6.prototype.get=bb1;E6.prototype.has=Vb1;E6.prototype.set=wb1;function Hw(e,a){for(var t=-1,c=a.length,r=e.length;++t<c;)e[r+t]=a[t];return e}var Lb1=zw(Object.getPrototypeOf,Object);const yw=Lb1;function _b1(){this.__data__=new Je,this.size=0}function kb1(e){var a=this.__data__,t=a.delete(e);return this.size=a.size,t}function Ab1(e){return this.__data__.get(e)}function Sb1(e){return this.__data__.has(e)}var Nb1=200;function Tb1(e,a){var t=this.__data__;if(t instanceof Je){var c=t.__data__;if(!na||c.length<Nb1-1)return c.push([e,a]),this.size=++t.size,this;t=this.__data__=new E6(c)}return t.set(e,a),this.size=t.size,this}function Re(e){var a=this.__data__=new Je(e);this.size=a.size}Re.prototype.clear=_b1;Re.prototype.delete=kb1;Re.prototype.get=Ab1;Re.prototype.has=Sb1;Re.prototype.set=Tb1;function Eb1(e,a){return e&&Pc(a,Ts(a),e)}function Fb1(e,a){return e&&Pc(a,Es(a),e)}var bw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fu=bw&&typeof module=="object"&&module&&!module.nodeType&&module,Db1=fu&&fu.exports===bw,uu=Db1?Ce.Buffer:void 0,hu=uu?uu.allocUnsafe:void 0;function Pb1(e,a){if(a)return e.slice();var t=e.length,c=hu?hu(t):new e.constructor(t);return e.copy(c),c}function Bb1(e,a){for(var t=-1,c=e==null?0:e.length,r=0,n=[];++t<c;){var i=e[t];a(i,t,e)&&(n[r++]=i)}return n}function Vw(){return[]}var Ob1=Object.prototype,Rb1=Ob1.propertyIsEnumerable,du=Object.getOwnPropertySymbols,Ib1=du?function(e){return e==null?[]:(e=Object(e),Bb1(du(e),function(a){return Rb1.call(e,a)}))}:Vw;const Fs=Ib1;function $b1(e,a){return Pc(e,Fs(e),a)}var Ub1=Object.getOwnPropertySymbols,Wb1=Ub1?function(e){for(var a=[];e;)Hw(a,Fs(e)),e=yw(e);return a}:Vw;const ww=Wb1;function Yb1(e,a){return Pc(e,ww(e),a)}function Lw(e,a,t){var c=a(e);return H8(e)?c:Hw(c,t(e))}function Rn(e){return Lw(e,Ts,Fs)}function jb1(e){return Lw(e,Es,ww)}var qb1=T6(Ce,"DataView");const In=qb1;var Gb1=T6(Ce,"Promise");const $n=Gb1;var Xb1=T6(Ce,"Set");const Un=Xb1;var mu="[object Map]",Zb1="[object Object]",pu="[object Promise]",vu="[object Set]",gu="[object WeakMap]",xu="[object DataView]",Qb1=N6(In),Kb1=N6(na),Jb1=N6($n),eV1=N6(Un),aV1=N6(On),c6=Fa;(In&&c6(new In(new ArrayBuffer(1)))!=xu||na&&c6(new na)!=mu||$n&&c6($n.resolve())!=pu||Un&&c6(new Un)!=vu||On&&c6(new On)!=gu)&&(c6=function(e){var a=Fa(e),t=a==Zb1?e.constructor:void 0,c=t?N6(t):"";if(c)switch(c){case Qb1:return xu;case Kb1:return mu;case Jb1:return pu;case eV1:return vu;case aV1:return gu}return a});const b8=c6;var tV1=Object.prototype,cV1=tV1.hasOwnProperty;function rV1(e){var a=e.length,t=new e.constructor(a);return a&&typeof e[0]=="string"&&cV1.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var nV1=Ce.Uint8Array;const L7=nV1;function Ds(e){var a=new e.constructor(e.byteLength);return new L7(a).set(new L7(e)),a}function iV1(e,a){var t=a?Ds(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var sV1=/\w*$/;function oV1(e){var a=new e.constructor(e.source,sV1.exec(e));return a.lastIndex=e.lastIndex,a}var Cu=F0?F0.prototype:void 0,zu=Cu?Cu.valueOf:void 0;function lV1(e){return zu?Object(zu.call(e)):{}}function fV1(e,a){var t=a?Ds(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var uV1="[object Boolean]",hV1="[object Date]",dV1="[object Map]",mV1="[object Number]",pV1="[object RegExp]",vV1="[object Set]",gV1="[object String]",xV1="[object Symbol]",CV1="[object ArrayBuffer]",zV1="[object DataView]",MV1="[object Float32Array]",HV1="[object Float64Array]",yV1="[object Int8Array]",bV1="[object Int16Array]",VV1="[object Int32Array]",wV1="[object Uint8Array]",LV1="[object Uint8ClampedArray]",_V1="[object Uint16Array]",kV1="[object Uint32Array]";function AV1(e,a,t){var c=e.constructor;switch(a){case CV1:return Ds(e);case uV1:case hV1:return new c(+e);case zV1:return iV1(e,t);case MV1:case HV1:case yV1:case bV1:case VV1:case wV1:case LV1:case _V1:case kV1:return fV1(e,t);case dV1:return new c;case mV1:case gV1:return new c(e);case pV1:return oV1(e);case vV1:return new c;case xV1:return lV1(e)}}function SV1(e){return typeof e.constructor=="function"&&!Bc(e)?QH1(yw(e)):{}}var NV1="[object Map]";function TV1(e){return y6(e)&&b8(e)==NV1}var Mu=y8&&y8.isMap,EV1=Mu?Ss(Mu):TV1;const FV1=EV1;var DV1="[object Set]";function PV1(e){return y6(e)&&b8(e)==DV1}var Hu=y8&&y8.isSet,BV1=Hu?Ss(Hu):PV1;const OV1=BV1;var RV1=1,IV1=2,$V1=4,_w="[object Arguments]",UV1="[object Array]",WV1="[object Boolean]",YV1="[object Date]",jV1="[object Error]",kw="[object Function]",qV1="[object GeneratorFunction]",GV1="[object Map]",XV1="[object Number]",Aw="[object Object]",ZV1="[object RegExp]",QV1="[object Set]",KV1="[object String]",JV1="[object Symbol]",ew1="[object WeakMap]",aw1="[object ArrayBuffer]",tw1="[object DataView]",cw1="[object Float32Array]",rw1="[object Float64Array]",nw1="[object Int8Array]",iw1="[object Int16Array]",sw1="[object Int32Array]",ow1="[object Uint8Array]",lw1="[object Uint8ClampedArray]",fw1="[object Uint16Array]",uw1="[object Uint32Array]",M2={};M2[_w]=M2[UV1]=M2[aw1]=M2[tw1]=M2[WV1]=M2[YV1]=M2[cw1]=M2[rw1]=M2[nw1]=M2[iw1]=M2[sw1]=M2[GV1]=M2[XV1]=M2[Aw]=M2[ZV1]=M2[QV1]=M2[KV1]=M2[JV1]=M2[ow1]=M2[lw1]=M2[fw1]=M2[uw1]=!0;M2[jV1]=M2[kw]=M2[ew1]=!1;function Zt(e,a,t,c,r,n){var i,s=a&RV1,l=a&IV1,f=a&$V1;if(t&&(i=r?t(e,c,r,n):t(e)),i!==void 0)return i;if(!Da(e))return e;var u=H8(e);if(u){if(i=rV1(e),!s)return KH1(e,i)}else{var h=b8(e),d=h==kw||h==qV1;if(ca(e))return Pb1(e,s);if(h==Aw||h==_w||d&&!r){if(i=l||d?{}:SV1(e),!s)return l?Yb1(e,Fb1(i,e)):$b1(e,Eb1(i,e))}else{if(!M2[h])return r?e:{};i=AV1(e,h,s)}}n||(n=new Re);var m=n.get(e);if(m)return m;n.set(e,i),OV1(e)?e.forEach(function(g){i.add(Zt(g,a,t,g,e,n))}):FV1(e)&&e.forEach(function(g,x){i.set(x,Zt(g,a,t,x,e,n))});var p=f?l?jb1:Rn:l?Es:Ts,v=u?void 0:p(e);return ey1(v||e,function(g,x){v&&(x=g,g=e[x]),dw(i,x,Zt(g,a,t,x,e,n))}),i}var hw1=1,dw1=4;function X8(e){return Zt(e,hw1|dw1)}var mw1="__lodash_hash_undefined__";function pw1(e){return this.__data__.set(e,mw1),this}function vw1(e){return this.__data__.has(e)}function _7(e){var a=-1,t=e==null?0:e.length;for(this.__data__=new E6;++a<t;)this.add(e[a])}_7.prototype.add=_7.prototype.push=pw1;_7.prototype.has=vw1;function gw1(e,a){for(var t=-1,c=e==null?0:e.length;++t<c;)if(a(e[t],t,e))return!0;return!1}function xw1(e,a){return e.has(a)}var Cw1=1,zw1=2;function Sw(e,a,t,c,r,n){var i=t&Cw1,s=e.length,l=a.length;if(s!=l&&!(i&&l>s))return!1;var f=n.get(e),u=n.get(a);if(f&&u)return f==a&&u==e;var h=-1,d=!0,m=t&zw1?new _7:void 0;for(n.set(e,a),n.set(a,e);++h<s;){var p=e[h],v=a[h];if(c)var g=i?c(v,p,h,a,e,n):c(p,v,h,e,a,n);if(g!==void 0){if(g)continue;d=!1;break}if(m){if(!gw1(a,function(x,z){if(!xw1(m,z)&&(p===x||r(p,x,t,c,n)))return m.push(z)})){d=!1;break}}else if(!(p===v||r(p,v,t,c,n))){d=!1;break}}return n.delete(e),n.delete(a),d}function Mw1(e){var a=-1,t=Array(e.size);return e.forEach(function(c,r){t[++a]=[r,c]}),t}function Hw1(e){var a=-1,t=Array(e.size);return e.forEach(function(c){t[++a]=c}),t}var yw1=1,bw1=2,Vw1="[object Boolean]",ww1="[object Date]",Lw1="[object Error]",_w1="[object Map]",kw1="[object Number]",Aw1="[object RegExp]",Sw1="[object Set]",Nw1="[object String]",Tw1="[object Symbol]",Ew1="[object ArrayBuffer]",Fw1="[object DataView]",yu=F0?F0.prototype:void 0,Ar=yu?yu.valueOf:void 0;function Dw1(e,a,t,c,r,n,i){switch(t){case Fw1:if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case Ew1:return!(e.byteLength!=a.byteLength||!n(new L7(e),new L7(a)));case Vw1:case ww1:case kw1:return ks(+e,+a);case Lw1:return e.name==a.name&&e.message==a.message;case Aw1:case Nw1:return e==a+"";case _w1:var s=Mw1;case Sw1:var l=c&yw1;if(s||(s=Hw1),e.size!=a.size&&!l)return!1;var f=i.get(e);if(f)return f==a;c|=bw1,i.set(e,a);var u=Sw(s(e),s(a),c,r,n,i);return i.delete(e),u;case Tw1:if(Ar)return Ar.call(e)==Ar.call(a)}return!1}var Pw1=1,Bw1=Object.prototype,Ow1=Bw1.hasOwnProperty;function Rw1(e,a,t,c,r,n){var i=t&Pw1,s=Rn(e),l=s.length,f=Rn(a),u=f.length;if(l!=u&&!i)return!1;for(var h=l;h--;){var d=s[h];if(!(i?d in a:Ow1.call(a,d)))return!1}var m=n.get(e),p=n.get(a);if(m&&p)return m==a&&p==e;var v=!0;n.set(e,a),n.set(a,e);for(var g=i;++h<l;){d=s[h];var x=e[d],z=a[d];if(c)var C=i?c(z,x,d,a,e,n):c(x,z,d,e,a,n);if(!(C===void 0?x===z||r(x,z,t,c,n):C)){v=!1;break}g||(g=d=="constructor")}if(v&&!g){var y=e.constructor,b=a.constructor;y!=b&&"constructor"in e&&"constructor"in a&&!(typeof y=="function"&&y instanceof y&&typeof b=="function"&&b instanceof b)&&(v=!1)}return n.delete(e),n.delete(a),v}var Iw1=1,bu="[object Arguments]",Vu="[object Array]",Ht="[object Object]",$w1=Object.prototype,wu=$w1.hasOwnProperty;function Uw1(e,a,t,c,r,n){var i=H8(e),s=H8(a),l=i?Vu:b8(e),f=s?Vu:b8(a);l=l==bu?Ht:l,f=f==bu?Ht:f;var u=l==Ht,h=f==Ht,d=l==f;if(d&&ca(e)){if(!ca(a))return!1;i=!0,u=!1}if(d&&!u)return n||(n=new Re),i||Ns(e)?Sw(e,a,t,c,r,n):Dw1(e,a,l,t,c,r,n);if(!(t&Iw1)){var m=u&&wu.call(e,"__wrapped__"),p=h&&wu.call(a,"__wrapped__");if(m||p){var v=m?e.value():e,g=p?a.value():a;return n||(n=new Re),r(v,g,t,c,n)}}return d?(n||(n=new Re),Rw1(e,a,t,c,r,n)):!1}function Nw(e,a,t,c,r){return e===a?!0:e==null||a==null||!y6(e)&&!y6(a)?e!==e&&a!==a:Uw1(e,a,t,c,Nw,r)}var Ww1="[object Map]",Yw1="[object Set]",jw1=Object.prototype,qw1=jw1.hasOwnProperty;function Gw1(e){if(e==null)return!0;if(As(e)&&(H8(e)||typeof e=="string"||typeof e.splice=="function"||ca(e)||Ns(e)||vw(e)))return!e.length;var a=b8(e);if(a==Ww1||a==Yw1)return!e.size;if(Bc(e))return!Mw(e).length;for(var t in e)if(qw1.call(e,t))return!1;return!0}function Lu(e,a){return Nw(e,a)}var Xw1=Object.defineProperty,Zw1=Object.defineProperties,Qw1=Object.getOwnPropertyDescriptors,_u=Object.getOwnPropertySymbols,Kw1=Object.prototype.hasOwnProperty,Jw1=Object.prototype.propertyIsEnumerable,ku=(e,a,t)=>a in e?Xw1(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,eL1=(e,a)=>{for(var t in a||(a={}))Kw1.call(a,t)&&ku(e,t,a[t]);if(_u)for(var t of _u(a))Jw1.call(a,t)&&ku(e,t,a[t]);return e},aL1=(e,a)=>Zw1(e,Qw1(a));function tL1(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(a=>`${a.charAt(0).toUpperCase()}${a.slice(1)}`).join("")}var I0=(e,a)=>{const t={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},c=tL1(e);return o.defineComponent({name:c,props:t,emits:{"labels:update":()=>!0,"chart:update":r=>!0,"chart:destroy":()=>!0,"chart:render":r=>!0},setup(r,{emit:n,expose:i}){const s=o.ref(null),l=`${r.chartId}`;let f=o.shallowRef(null);o.watch(()=>r.chartData,u,{deep:!0}),o.watch(()=>r.options,g=>{f.value&&g&&(f.value.options=X8(g),p())},{deep:!0});function u(g){if(f.value){let x=f.value;Lu(g.labels,f.value.data.labels)||(x.data.labels=g.labels,d()),Lu(g.datasets,f.value.data.datasets)||g.datasets.forEach((z,C)=>{var y,b;if(Gw1(z))x.data.datasets=[];else{const w=X8(x.data),H=Object.keys((b=(y=w.datasets)==null?void 0:y[C])!=null?b:{}),T=Object.keys(z);H.filter(U=>U!=="_meta"&&T.indexOf(U)===-1).forEach(U=>{x.data.datasets[C]&&delete x.data.datasets[C][U]});for(const U in z){const D=X8(z[U]);x.data.datasets[C]||(x.data.datasets[C]={}),z.hasOwnProperty(U)&&D!=null&&x&&(x.data.datasets[C][U]=D)}}}),p()}else f.value&&v(),h()}function h(){s.value?(f.value=new Ae(s.value,{data:X8(r.chartData),type:a,options:X8(r.options),plugins:r.plugins}),m()):console.error(`Error on component ${c}, canvas cannot be rendered. Check if the render appends server-side`)}function d(){n("labels:update"),r.onLabelsUpdate&&r.onLabelsUpdate()}function m(){f.value&&(n("chart:render",f.value),r.onChartRender&&r.onChartRender(f.value))}function p(){f.value&&(f.value.update(),n("chart:update",f.value),r.onChartUpdate&&r.onChartUpdate(f.value))}function v(){f.value&&f.value.destroy(),n("chart:destroy"),r.onChartDestroy&&r.onChartDestroy()}return o.onMounted(h),o.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),i({canvasRef:s,renderChart:h,chartInstance:f,canvasId:l,update:p}),()=>o.h("div",{style:aL1(eL1({maxWidth:"100%"},r.styles),{position:"relative"}),class:r.cssClasses},[o.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:r.width,height:r.height,ref:s})])}})};I0("bar-chart","bar");var cL1=I0("doughnut-chart","doughnut");I0("line-chart","line");I0("pie-chart","pie");I0("polar-chart","polarArea");I0("radar-chart","radar");I0("bubble-chart","bubble");I0("scatter-chart","scatter");const rL1=o.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){Ae.register(...xH1);const a={responsive:!0};return(t,c)=>(o.openBlock(),o.createBlock(o.unref(cL1),{chartData:t.data,options:t.options||a},null,8,["chartData","options"]))}}),nL1={key:0},iL1={key:1,class:"barcodes-container"},sL1=o.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){return(a,t)=>a.barcodes.length?(o.openBlock(),o.createElementBlock("div",iL1,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.barcodes,c=>(o.openBlock(),o.createElementBlock("span",{class:"barcode",key:c},[o.createVNode(x3,{icon:"barcode"}),o.createTextVNode("   "+o.toDisplayString(c),1)]))),128))])):(o.openBlock(),o.createElementBlock("span",nL1,"-"))}});const oL1=Y1(sL1,[["__scopeId","data-v-5291a54d"]]),lL1=["textContent"],fL1=["textContent"],uL1=o.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},withoutBackground:{type:Boolean}},setup(e){const a=e,t=o.computed(()=>a.datetime instanceof Date),c=o.computed(()=>t.value?new Intl.DateTimeFormat(o7(),{dateStyle:"medium"}).format(a.datetime):"-"),r=o.computed(()=>t.value?new Intl.DateTimeFormat(o7(),{hour:"2-digit",minute:"2-digit"}).format(a.datetime):"");return(n,i)=>{const s=o.resolveDirective("tooltip");return t.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["datetime-container",{"datetime-container__with-background":!n.withoutBackground}])},[o.createVNode(x3,{icon:"calendar-days"}),o.createElementVNode("span",{textContent:o.toDisplayString(c.value)},null,8,fL1)],2)),[[s,r.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(c.value)},null,8,lL1))}}});const hL1=Y1(uL1,[["__scopeId","data-v-cfeec1a4"]]),dL1={class:"info-card"},mL1={class:"info-card--icon-container"},pL1={class:"info-card--content-container"},vL1={class:"info-card--content"},gL1=["textContent"],xL1=o.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){o.useCssVars(i=>({"0816b123":r.value,"389d6c82":n.value}));const a=e,t=o.computed(()=>{if(a.type==="info")return"circle-info";if(a.type==="success")return"circle-check";if(a.type==="error")return"circle-xmark";if(a.type==="warning")return"circle-exclamation"}),c=o.computed(()=>{if(a.type==="info")return"aqua";if(a.type==="success")return"success";if(a.type==="error")return"danger";if(a.type==="warning")return"warning"}),r=o.computed(()=>`rgba(var(--pga-color-${c.value}-rgb), 0.8)`),n=o.computed(()=>`var(--pga-color-${c.value}-contrast)`);return(i,s)=>{const l=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",dL1,[o.createElementVNode("div",mL1,[o.createVNode(l,{class:"info-card--icon",icon:t.value},null,8,["icon"])]),o.createElementVNode("div",pL1,[o.createElementVNode("div",vL1,[i.info?(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(i.info)},null,8,gL1)):o.renderSlot(i.$slots,"default",{key:1},void 0,!0)])])])}}});const CL1=Y1(xL1,[["__scopeId","data-v-3f4f4235"]]),zL1={key:0,class:"no-items-container"},ML1={key:1,class:"no-items"},HL1=o.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const a=e,t=k3("pgaDisplayNoItems"),c=o.computed(()=>{var n;return!(((n=a.items)==null?void 0:n.length)>0)}),r=o.computed(()=>a.label?a.label:t("noItemsText"));return(n,i)=>c.value?(o.openBlock(),o.createElementBlock("div",zL1,[n.isLoading?(o.openBlock(),o.createBlock(_a,{key:0})):(o.openBlock(),o.createElementBlock("div",ML1,[n.preventDisplayIcon?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(x3,{key:0,class:"no-items--icon",icon:n.icon},null,8,["icon"])),o.createVNode(xe,{class:"no-items--text",text:r.value},null,8,["text"])]))])):o.createCommentVNode("",!0)}});const Tw=Y1(HL1,[["__scopeId","data-v-bd030077"]]),yL1=["textContent"],bL1={key:0,class:"price-sign",textContent:"$"},VL1=["textContent"],wL1=o.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},numOfDecimals:{},withoutSign:{type:Boolean},withoutBackground:{type:Boolean},isPositive:{type:Boolean,default:void 0}},setup(e){const a=e,t=o.computed(()=>a.price!==void 0),c=o.computed(()=>t.value?typeof a.price=="string"?a.price:l7(a.price,a.numOfDecimals):"-"),r=o.computed(()=>a.tooltipPrice===void 0?"":typeof a.tooltipPrice=="string"?a.tooltipPrice:`$ ${l7(a.tooltipPrice,a.numOfDecimals)}`);return(n,i)=>{const s=o.resolveDirective("tooltip");return t.value?o.withDirectives((o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["price-container",{"price-container__with-background":!n.withoutBackground}])},[n.withoutSign?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",bL1)),o.createElementVNode("span",{class:o.normalizeClass(["price",{price__positive:n.isPositive===!0,price__negative:n.isPositive===!1}]),textContent:o.toDisplayString(c.value)},null,10,VL1)],2)),[[s,r.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(c.value)},null,8,yL1))}}});const LL1=Y1(wL1,[["__scopeId","data-v-4fda6b06"]]),_L1=o.defineComponent({__name:"PgaForm",props:{width:{default:"100%"}},setup(e){return o.useCssVars(a=>({dc4cd4cc:a.width})),(a,t)=>(o.openBlock(),o.createElementBlock("form",{class:"form",onSubmit:t[0]||(t[0]=o.withModifiers(()=>{},["prevent"]))},[o.renderSlot(a.$slots,"default",{},void 0,!0)],32))}});const Ew=Y1(_L1,[["__scopeId","data-v-572279a3"]]);const kL1={},AL1={class:"form-row"};function SL1(e,a){return o.openBlock(),o.createElementBlock("div",AL1,[o.renderSlot(e.$slots,"default",{},void 0,!0)])}const NL1=Y1(kL1,[["render",SL1],["__scopeId","data-v-21181519"]]);function Au(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,c)}return t}function s0(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?Au(Object(t),!0).forEach(function(c){TL1(e,c,t[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Au(Object(t)).forEach(function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(t,c))})}return e}function TL1(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function Su(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((t,c)=>(a.includes(c)||(t[c]=o.unref(e[c])),t),{})}function k7(e){return typeof e=="function"}function EL1(e){return o.isReactive(e)||o.isReadonly(e)}function Fw(e,a,t){let c=e;const r=a.split(".");for(let n=0;n<r.length;n++){if(!c[r[n]])return t;c=c[r[n]]}return c}function Sr(e,a,t){return o.computed(()=>e.some(c=>Fw(a,c,{[t]:!1})[t]))}function Nu(e,a,t){return o.computed(()=>e.reduce((c,r)=>{const n=Fw(a,r,{[t]:!1})[t]||[];return c.concat(n)},[]))}function Dw(e,a,t,c){return e.call(c,o.unref(a),o.unref(t),c)}function Pw(e){return e.$valid!==void 0?!e.$valid:!e}function FL1(e,a,t,c,r,n,i){let{$lazy:s,$rewardEarly:l}=r,f=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8?arguments[8]:void 0,h=arguments.length>9?arguments[9]:void 0,d=arguments.length>10?arguments[10]:void 0;const m=o.ref(!!c.value),p=o.ref(0);t.value=!1;const v=o.watch([a,c].concat(f,d),()=>{if(s&&!c.value||l&&!h.value&&!t.value)return;let g;try{g=Dw(e,a,u,i)}catch(x){g=Promise.reject(x)}p.value++,t.value=!!p.value,m.value=!1,Promise.resolve(g).then(x=>{p.value--,t.value=!!p.value,n.value=x,m.value=Pw(x)}).catch(x=>{p.value--,t.value=!!p.value,n.value=x,m.value=!0})},{immediate:!0,deep:typeof a=="object"});return{$invalid:m,$unwatch:v}}function DL1(e,a,t,c,r,n,i,s){let{$lazy:l,$rewardEarly:f}=c;const u=()=>({}),h=o.computed(()=>{if(l&&!t.value||f&&!s.value)return!1;let d=!0;try{const m=Dw(e,a,i,n);r.value=m,d=Pw(m)}catch(m){r.value=m}return d});return{$unwatch:u,$invalid:h}}function PL1(e,a,t,c,r,n,i,s,l,f,u){const h=o.ref(!1),d=e.$params||{},m=o.ref(null);let p,v;e.$async?{$invalid:p,$unwatch:v}=FL1(e.$validator,a,h,t,c,m,r,e.$watchTargets,l,f,u):{$invalid:p,$unwatch:v}=DL1(e.$validator,a,t,c,m,r,l,f);const g=e.$message;return{$message:k7(g)?o.computed(()=>g(Su({$pending:h,$invalid:p,$params:Su(d),$model:a,$response:m,$validator:n,$propertyPath:s,$property:i}))):g||"",$params:d,$pending:h,$invalid:p,$response:m,$unwatch:v}}function BL1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=o.unref(e),t=Object.keys(a),c={},r={},n={};let i=null;return t.forEach(s=>{const l=a[s];switch(!0){case k7(l.$validator):c[s]=l;break;case k7(l):c[s]={$validator:l};break;case s==="$validationGroups":i=l;break;case s.startsWith("$"):n[s]=l;break;default:r[s]=l}}),{rules:c,nestedValidators:r,config:n,validationGroups:i}}const OL1="__root";function RL1(e,a,t,c,r,n,i,s,l){const f=Object.keys(e),u=c.get(r,e),h=o.ref(!1),d=o.ref(!1),m=o.ref(0);if(u){if(!u.$partial)return u;u.$unwatch(),h.value=u.$dirty.value}const p={$dirty:h,$path:r,$touch:()=>{h.value||(h.value=!0)},$reset:()=>{h.value&&(h.value=!1)},$commit:()=>{}};return f.length?(f.forEach(v=>{p[v]=PL1(e[v],a,p.$dirty,n,i,v,t,r,l,d,m)}),p.$externalResults=o.computed(()=>s.value?[].concat(s.value).map((v,g)=>({$propertyPath:r,$property:t,$validator:"$externalResults",$uid:`${r}-externalResult-${g}`,$message:v,$params:{},$response:null,$pending:!1})):[]),p.$invalid=o.computed(()=>{const v=f.some(g=>o.unref(p[g].$invalid));return d.value=v,!!p.$externalResults.value.length||v}),p.$pending=o.computed(()=>f.some(v=>o.unref(p[v].$pending))),p.$error=o.computed(()=>p.$dirty.value?p.$pending.value||p.$invalid.value:!1),p.$silentErrors=o.computed(()=>f.filter(v=>o.unref(p[v].$invalid)).map(v=>{const g=p[v];return o.reactive({$propertyPath:r,$property:t,$validator:v,$uid:`${r}-${v}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(p.$externalResults.value)),p.$errors=o.computed(()=>p.$dirty.value?p.$silentErrors.value:[]),p.$unwatch=()=>f.forEach(v=>{p[v].$unwatch()}),p.$commit=()=>{d.value=!0,m.value=Date.now()},c.set(r,e,p),p):(u&&c.set(r,e,p),p)}function IL1(e,a,t,c,r,n,i){const s=Object.keys(e);return s.length?s.reduce((l,f)=>(l[f]=Wn({validations:e[f],state:a,key:f,parentKey:t,resultsCache:c,globalConfig:r,instance:n,externalResults:i}),l),{}):{}}function $L1(e,a,t){const c=o.computed(()=>[a,t].filter(p=>p).reduce((p,v)=>p.concat(Object.values(o.unref(v))),[])),r=o.computed({get(){return e.$dirty.value||(c.value.length?c.value.every(p=>p.$dirty):!1)},set(p){e.$dirty.value=p}}),n=o.computed(()=>{const p=o.unref(e.$silentErrors)||[],v=c.value.filter(g=>(o.unref(g).$silentErrors||[]).length).reduce((g,x)=>g.concat(...x.$silentErrors),[]);return p.concat(v)}),i=o.computed(()=>{const p=o.unref(e.$errors)||[],v=c.value.filter(g=>(o.unref(g).$errors||[]).length).reduce((g,x)=>g.concat(...x.$errors),[]);return p.concat(v)}),s=o.computed(()=>c.value.some(p=>p.$invalid)||o.unref(e.$invalid)||!1),l=o.computed(()=>c.value.some(p=>o.unref(p.$pending))||o.unref(e.$pending)||!1),f=o.computed(()=>c.value.some(p=>p.$dirty)||c.value.some(p=>p.$anyDirty)||r.value),u=o.computed(()=>r.value?l.value||s.value:!1),h=()=>{e.$touch(),c.value.forEach(p=>{p.$touch()})},d=()=>{e.$commit(),c.value.forEach(p=>{p.$commit()})},m=()=>{e.$reset(),c.value.forEach(p=>{p.$reset()})};return c.value.length&&c.value.every(p=>p.$dirty)&&h(),{$dirty:r,$errors:i,$invalid:s,$anyDirty:f,$error:u,$pending:l,$touch:h,$reset:m,$silentErrors:n,$commit:d}}function Wn(e){let{validations:a,state:t,key:c,parentKey:r,childResults:n,resultsCache:i,globalConfig:s={},instance:l,externalResults:f}=e;const u=r?`${r}.${c}`:c,{rules:h,nestedValidators:d,config:m,validationGroups:p}=BL1(a),v=s0(s0({},s),m),g=c?o.computed(()=>{const v1=o.unref(t);return v1?o.unref(v1[c]):void 0}):t,x=s0({},o.unref(f)||{}),z=o.computed(()=>{const v1=o.unref(f);return c?v1?o.unref(v1[c]):void 0:v1}),C=RL1(h,g,c,i,u,v,l,z,t),y=IL1(d,g,u,i,v,l,z),b={};p&&Object.entries(p).forEach(v1=>{let[r1,S]=v1;b[r1]={$invalid:Sr(S,y,"$invalid"),$error:Sr(S,y,"$error"),$pending:Sr(S,y,"$pending"),$errors:Nu(S,y,"$errors"),$silentErrors:Nu(S,y,"$silentErrors")}});const{$dirty:w,$errors:H,$invalid:T,$anyDirty:A,$error:U,$pending:D,$touch:k,$reset:j,$silentErrors:c1,$commit:F}=$L1(C,y,n),O=c?o.computed({get:()=>o.unref(g),set:v1=>{w.value=!0;const r1=o.unref(t),S=o.unref(f);S&&(S[c]=x[c]),o.isRef(r1[c])?r1[c].value=v1:r1[c]=v1}}):null;c&&v.$autoDirty&&o.watch(g,()=>{w.value||k();const v1=o.unref(f);v1&&(v1[c]=x[c])},{flush:"sync"});async function X(){return k(),v.$rewardEarly&&(F(),await o.nextTick()),await o.nextTick(),new Promise(v1=>{if(!D.value)return v1(!T.value);const r1=o.watch(D,()=>{v1(!T.value),r1()})})}function f1(v1){return(n.value||{})[v1]}function J(){o.isRef(f)?f.value=x:Object.keys(x).length===0?Object.keys(f).forEach(v1=>{delete f[v1]}):Object.assign(f,x)}return o.reactive(s0(s0(s0({},C),{},{$model:O,$dirty:w,$error:U,$errors:H,$invalid:T,$anyDirty:A,$pending:D,$touch:k,$reset:j,$path:u||OL1,$silentErrors:c1,$validate:X,$commit:F},n&&{$getResultsForChild:f1,$clearExternalResults:J,$validationGroups:b}),y))}class UL1{constructor(){this.storage=new Map}set(a,t,c){this.storage.set(a,{rules:t,result:c})}checkRulesValidity(a,t,c){const r=Object.keys(c),n=Object.keys(t);return n.length!==r.length||!n.every(s=>r.includes(s))?!1:n.every(s=>t[s].$params?Object.keys(t[s].$params).every(l=>o.unref(c[s].$params[l])===o.unref(t[s].$params[l])):!0)}get(a,t){const c=this.storage.get(a);if(!c)return;const{rules:r,result:n}=c,i=this.checkRulesValidity(a,t,r),s=n.$unwatch?n.$unwatch:()=>({});return i?n:{$dirty:n.$dirty,$partial:!0,$unwatch:s}}}const Qt={COLLECT_ALL:!0,COLLECT_NONE:!1},Tu=Symbol("vuelidate#injectChildResults"),Eu=Symbol("vuelidate#removeChildResults");function WL1(e){let{$scope:a,instance:t}=e;const c={},r=o.ref([]),n=o.computed(()=>r.value.reduce((u,h)=>(u[h]=o.unref(c[h]),u),{}));function i(u,h){let{$registerAs:d,$scope:m,$stopPropagation:p}=h;p||a===Qt.COLLECT_NONE||m===Qt.COLLECT_NONE||a!==Qt.COLLECT_ALL&&a!==m||(c[d]=u,r.value.push(d))}t.__vuelidateInjectInstances=[].concat(t.__vuelidateInjectInstances||[],i);function s(u){r.value=r.value.filter(h=>h!==u),delete c[u]}t.__vuelidateRemoveInstances=[].concat(t.__vuelidateRemoveInstances||[],s);const l=o.inject(Tu,[]);o.provide(Tu,t.__vuelidateInjectInstances);const f=o.inject(Eu,[]);return o.provide(Eu,t.__vuelidateRemoveInstances),{childResults:n,sendValidationResultsToParent:l,removeValidationResultsFromParent:f}}function Bw(e){return new Proxy(e,{get(a,t){return typeof a[t]=="object"?Bw(a[t]):o.computed(()=>a[t])}})}let Fu=0;function YL1(e,a){var t;let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(c=e,e=void 0,a=void 0);let{$registerAs:r,$scope:n=Qt.COLLECT_ALL,$stopPropagation:i,$externalResults:s,currentVueInstance:l}=c;const f=l||((t=o.getCurrentInstance())===null||t===void 0?void 0:t.proxy),u=f?f.$options:{};r||(Fu+=1,r=`_vuelidate_${Fu}`);const h=o.ref({}),d=new UL1,{childResults:m,sendValidationResultsToParent:p,removeValidationResultsFromParent:v}=f?WL1({$scope:n,instance:f}):{childResults:o.ref({})};if(!e&&u.validations){const g=u.validations;a=o.ref({}),o.onBeforeMount(()=>{a.value=f,o.watch(()=>k7(g)?g.call(a.value,new Bw(a.value)):g,x=>{h.value=Wn({validations:x,state:a,childResults:m,resultsCache:d,globalConfig:c,instance:f,externalResults:s||f.vuelidateExternalResults})},{immediate:!0})}),c=u.validationsConfig||c}else{const g=o.isRef(e)||EL1(e)?e:o.reactive(e||{});o.watch(g,x=>{h.value=Wn({validations:x,state:a,childResults:m,resultsCache:d,globalConfig:c,instance:f??{},externalResults:s})},{immediate:!0})}return f&&(p.forEach(g=>g(h,{$registerAs:r,$scope:n,$stopPropagation:i})),o.onBeforeUnmount(()=>v.forEach(g=>g(r)))),o.computed(()=>s0(s0({},o.unref(h.value)),m.value))}function Du(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,c)}return t}function ia(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?Du(Object(t),!0).forEach(function(c){jL1(e,c,t[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Du(Object(t)).forEach(function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(t,c))})}return e}function jL1(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function A7(e){return typeof e=="function"}function Yn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ic(e){return A7(e.$validator)?ia({},e):{$validator:e}}function Ow(e){return typeof e=="object"?e.$valid:e}function Rw(e){return e.$validator||e}function qL1(e,a){if(!Yn(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!Yn(a)&&!A7(a))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const t=Ic(a);return t.$params=ia(ia({},t.$params||{}),e),t}function GL1(e,a){if(!A7(e)&&typeof o.unref(e)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);if(!Yn(a)&&!A7(a))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const t=Ic(a);return t.$message=e,t}function XL1(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const t=Ic(e);return ia(ia({},t),{},{$async:!0,$watchTargets:a})}function ZL1(e){return{$validator(a){for(var t=arguments.length,c=new Array(t>1?t-1:0),r=1;r<t;r++)c[r-1]=arguments[r];return o.unref(a).reduce((n,i,s)=>{const l=Object.entries(i).reduce((f,u)=>{let[h,d]=u;const m=e[h]||{},p=Object.entries(m).reduce((v,g)=>{let[x,z]=g;const y=Rw(z).call(this,d,i,s,...c),b=Ow(y);if(v.$data[x]=y,v.$data.$invalid=!b||!!v.$data.$invalid,v.$data.$error=v.$data.$invalid,!b){let w=z.$message||"";const H=z.$params||{};typeof w=="function"&&(w=w({$pending:!1,$invalid:!b,$params:H,$model:d,$response:y})),v.$errors.push({$property:h,$message:w,$params:H,$response:y,$model:d,$pending:!1,$validator:x})}return{$valid:v.$valid&&b,$data:v.$data,$errors:v.$errors}},{$valid:!0,$data:{},$errors:[]});return f.$data[h]=p.$data,f.$errors[h]=p.$errors,{$valid:f.$valid&&p.$valid,$data:f.$data,$errors:f.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:n.$valid&&l.$valid,$data:n.$data.concat(l.$data),$errors:n.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:a=>{let{$response:t}=a;return t?t.$errors.map(c=>Object.values(c).map(r=>r.map(n=>n.$message)).reduce((r,n)=>r.concat(n),[])):[]}}}const Pa=e=>{if(e=o.unref(e),Array.isArray(e))return!!e.length;if(e==null)return!1;if(e===!1)return!0;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(let a in e)return!0;return!1}return!!String(e).length},Ps=e=>(e=o.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function $0(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];return c=>(c=o.unref(c),!Pa(c)||a.every(r=>(r.lastIndex=0,r.test(c))))}var n4=Object.freeze({__proto__:null,forEach:ZL1,len:Ps,normalizeValidatorObject:Ic,regex:$0,req:Pa,unwrap:o.unref,unwrapNormalizedValidator:Rw,unwrapValidatorResponse:Ow,withAsync:XL1,withMessage:GL1,withParams:qL1});$0(/^[a-zA-Z]*$/);$0(/^[a-zA-Z0-9]*$/);$0(/^\d*(\.\d+)?$/);const QL1=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;$0(QL1);function KL1(e){return a=>!Pa(a)||Ps(a)<=o.unref(e)}function JL1(e){return{$validator:KL1(e),$message:a=>{let{$params:t}=a;return`The maximum length allowed is ${t.max}`},$params:{max:e,type:"maxLength"}}}function e_1(e){return a=>!Pa(a)||Ps(a)>=o.unref(e)}function a_1(e){return{$validator:e_1(e),$message:a=>{let{$params:t}=a;return`This field should be at least ${t.min} characters long`},$params:{min:e,type:"minLength"}}}function t_1(e){return typeof e=="string"&&(e=e.trim()),Pa(e)}var jn={$validator:t_1,$message:"Value is required",$params:{type:"required"}};const c_1=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;$0(c_1);var r_1=$0(/(^[0-9]*$)|(^-[0-9]+$)/),n_1={$validator:r_1,$message:"Value is not an integer",$params:{type:"integer"}};$0(/^[-]?\d*(\.\d+)?$/);const i_1=o.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){o.useCssVars(t=>({f8e89dac:o.unref(a).input.height,"2a0421ea":o.unref(a).input.iconWidth,"8ece64be":o.unref(a).input.borderRadius,"01746c74":o.unref(a).input.backgroundColorFocus,"013b83ac":o.unref(a).input.backgroundColorHover}));const{formOptions:a}=_3.storeToRefs(I3());return(t,c)=>(o.openBlock(),o.createBlock(c3,{class:o.normalizeClass(["input-right-button",{"input-right-button__with-background":t.withBackground}]),buttonType:"flat",icon:t.icon,tabindex:"-1"},null,8,["class","icon"]))}});const S7=Y1(i_1,[["__scopeId","data-v-03b4f4d6"]]),s_1={class:"input-container"},o_1={class:"input-content"},l_1=["type","placeholder","autofocus","disabled"],Nr="",f_1=o.defineComponent({__name:"PgaInput",props:o.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:a,emit:t}){o.useCssVars(w=>({"4fdd10c3":o.unref(i).input.height,"4bdbaff5":o.unref(i).input.padding,"1a9c687b":o.unref(i).input.borderColor,"51c0567a":o.unref(i).input.borderRadius,"787346b9":o.unref(i).input.backgroundColor,"0f40a65e":o.unref(i).input.colorFocus,"45421c55":o.unref(i).input.backgroundColorDisabled,"8c044518":o.unref(i).input.paddingWithIcon,"249a5368":o.unref(i).input.placeholderColor}));const c=o.useModel(e,"modelValue"),r=e,n=t;a({focus:p});const{formOptions:i}=_3.storeToRefs(I3()),s=o.ref(),l=o.ref(Nr),f=o.ref(!1),u=o.computed(()=>{if(r.placeholder)return H0(r.placeholder)}),h=o.computed(()=>r.type==="password"),d=o.computed(()=>h.value?!1:!!(!r.disabled&&l.value)),m=o.computed(()=>!!(h.value||d.value));o.watch(c,w=>y(w),{immediate:!0});function p(){var w;(w=s.value)==null||w.focus()}function v(){r.type==="number"&&!l.value&&(l.value=Nr)}function g(){r.type==="number"&&!l.value&&(l.value=C())}function x(){b(Nr),n("valueCleared")}function z(w){return w===""?null:r.type==="number"&&r.integer&&typeof w=="number"?Math.round(w):w}function C(w){const H=typeof w>"u"?c.value:w;return H===null?"":H}function y(w){const H=z(w);return c.value=H,l.value=C(H),H}function b(w){const H=y(w);n("change",H)}return(w,H)=>(o.openBlock(),o.createBlock(Ke,{label:w.label,withOptionalLabel:w.withOptionalLabel,withLabelSpace:w.withLabelSpace,errors:w.errors,grow:w.grow},{default:o.withCtx(()=>[o.createElementVNode("div",s_1,[o.createElementVNode("div",o_1,[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":H[0]||(H[0]=T=>l.value=T),class:o.normalizeClass(["input",{input__disabled:w.disabled,"input__with-btn":m.value}]),type:f.value?"text":w.type,placeholder:u.value,autofocus:w.autofocus,disabled:w.disabled,onInput:H[1]||(H[1]=T=>b(l.value)),onKeyup:H[2]||(H[2]=o.withKeys(T=>n("enter"),["enter"])),onFocus:H[3]||(H[3]=T=>v()),onBlur:H[4]||(H[4]=T=>g())},null,42,l_1),[[o.vModelDynamic,l.value]]),h.value?(o.openBlock(),o.createBlock(S7,{key:0,icon:f.value?"eye-slash":"eye",withBackground:"",onClick:H[5]||(H[5]=T=>f.value=!f.value)},null,8,["icon"])):d.value?(o.openBlock(),o.createBlock(S7,{key:1,icon:"xmark",onClick:H[6]||(H[6]=T=>x())})):o.createCommentVNode("",!0)]),o.renderSlot(w.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const N7=Y1(f_1,[["__scopeId","data-v-4e1c9d88"]]),u_1={class:"user-icon-container"},h_1=o.defineComponent({__name:"PgaLoginForm",props:{isLoading:{type:Boolean}},emits:["login"],setup(e,{emit:a}){class t{constructor(){l1(this,"username","");l1(this,"password","")}}const c=a,r=k3("pgaLoginForm"),n={username:{required:n4.withMessage(()=>r("inputValidationErrorUsernameRequired"),jn)},password:{required:n4.withMessage(()=>r("inputValidationErrorPasswordRequired"),jn)}},i=o.ref(new t),s=YL1(n,i);async function l(){await s.value.$validate()&&c("login",i.value)}return(f,u)=>(o.openBlock(),o.createBlock(Ew,{class:"login-form"},{default:o.withCtx(()=>[o.createElementVNode("div",u_1,[o.createVNode(x3,{class:"user-icon",icon:"user"})]),o.createVNode(N7,{modelValue:i.value.username,"onUpdate:modelValue":u[0]||(u[0]=h=>i.value.username=h),label:o.unref(r)("inputLabelUsername"),errors:o.unref(s).username.$errors,disabled:f.isLoading},null,8,["modelValue","label","errors","disabled"]),o.createVNode(N7,{modelValue:i.value.password,"onUpdate:modelValue":u[1]||(u[1]=h=>i.value.password=h),type:"password",label:o.unref(r)("inputLabelPassword"),errors:o.unref(s).password.$errors,disabled:f.isLoading},null,8,["modelValue","label","errors","disabled"]),o.createVNode(c3,{type:"submit",icon:"right-to-bracket",text:o.unref(r)("loginBtn"),isLoading:f.isLoading,onClick:u[2]||(u[2]=h=>l())},null,8,["text","isLoading"])]),_:1}))}});const d_1=Y1(h_1,[["__scopeId","data-v-d3a09f59"]]),m_1={class:"pga-checkbox"},p_1=["textContent"],v_1=o.defineComponent({__name:"PgaCheckbox",props:o.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=o.useModel(e,"modelValue");return(t,c)=>(o.openBlock(),o.createElementBlock("label",m_1,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>a.value=r),type:"checkbox"},null,512),[[o.vModelCheckbox,a.value]]),t.label?(o.openBlock(),o.createElementBlock("span",{key:0,class:"checkbox--label",textContent:o.toDisplayString(t.label)},null,8,p_1)):o.createCommentVNode("",!0)]))}});const g_1=Y1(v_1,[["__scopeId","data-v-89f11c66"]]),x_1={class:"colors-container"},C_1=o.defineComponent({__name:"PgaColorSelector",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({fe5cd23e:o.unref(t).input.padding,f9a60d32:o.unref(t).input.borderColor,"097c39e4":o.unref(t).input.borderRadius}));const a=o.useModel(e,"modelValue"),{formOptions:t}=_3.storeToRefs(I3());return(c,r)=>(o.openBlock(),o.createBlock(Ke,{label:c.label,withOptionalLabel:c.withOptionalLabel,withLabelSpace:c.withLabelSpace,errors:c.errors,grow:c.grow},{default:o.withCtx(()=>[o.createElementVNode("div",x_1,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(m5),n=>(o.openBlock(),o.createBlock(c3,{key:n,buttonType:a.value===n?"outlined":"flat",color:a.value===n?"primary":"first",disabled:c.disabled,onClick:i=>a.value=n},{default:o.withCtx(()=>[o.createVNode(Cb,{color:n},null,8,["color"])]),_:2},1032,["buttonType","color","disabled","onClick"]))),128))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const z_1=Y1(C_1,[["__scopeId","data-v-ec1f389c"]]),M_1={class:"icons-container"},H_1=o.defineComponent({__name:"PgaIconSelector",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(r=>({adce17e0:o.unref(t).input.padding,51142716:o.unref(t).input.borderColor,"2b7f2982":o.unref(t).input.borderRadius}));const a=o.useModel(e,"modelValue"),{formOptions:t}=_3.storeToRefs(I3()),c=["star","heart","envelope","plus","minus","pen","edit","check","trash","file","clipboard","bell","calendar","clock","money-check-dollar","gift","percent","magnifying-glass-dollar","house","car","store","gamepad","mobile","school","shirt","user-doctor","face-smile","face-frown-open","cog","lock","bug","camera","code","headphones","wifi","user","search","home","arrow-right-arrow-left","circle"];return(r,n)=>(o.openBlock(),o.createBlock(Ke,{label:r.label,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,errors:r.errors,grow:r.grow},{default:o.withCtx(()=>[o.createElementVNode("div",M_1,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(c,i=>o.createVNode(c3,{key:i,icon:i,buttonType:a.value===i?"outlined":"flat",color:a.value===i?"primary":"grey",width:"2.5em",disabled:r.disabled,onClick:s=>a.value=i},null,8,["icon","buttonType","color","disabled","onClick"])),64))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const y_1=Y1(H_1,[["__scopeId","data-v-276ff5b1"]]),w0=_3.defineStore("pga-notifications",()=>{const e=o.ref(1),a=o.ref([]);return{currentId:e,notifications:a}});function Iw(e,a){const t=w0().currentId++,c={id:t,type:e,message:a,timeout:void 0},r=I3().notificationsOptions.timeoutTime;return r!=="none"&&(c.timeout=setTimeout(()=>Bs(t),r)),w0().notifications.push(c),t}function Bs(e){const a=w0().notifications.find(c=>c.id===e);a&&a.timeout&&clearTimeout(a.timeout);const t=w0().notifications.filter(c=>c.id!==e);w0().notifications=t}function $w(){w0().notifications.forEach(e=>{e.timeout&&clearTimeout(e.timeout)}),w0().notifications=[]}const b_1={class:"input-file"},V_1=["accept","disabled"],w_1={class:"input-file--name-container"},L_1=["textContent"],__1=o.defineComponent({__name:"PgaInputFile",props:{label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},acceptedFormats:{default:"*"},errors:{},disabled:{type:Boolean},grow:{}},emits:["newFile"],setup(e,{expose:a,emit:t}){o.useCssVars(z=>({"85d5b71e":o.unref(n).input.borderColor,"0341cd78":o.unref(n).input.borderRadius,"77a117af":o.unref(n).input.backgroundColor,d97f9266:o.unref(n).input.backgroundColorHover,"493ad16a":o.unref(n).input.backgroundColorDisabled}));const c=e,r=t;a({click:p,resetInput:v});const{formOptions:n}=_3.storeToRefs(I3()),i=k3("pgaInputFile"),s=o.ref(),l=o.ref(),f=o.ref(!1),u=o.ref(!1),h=o.computed(()=>c.acceptedFormats==="*"?"*":c.acceptedFormats.map(z=>`.${z}`).join(",")),d=o.computed(()=>f.value&&!u.value&&!c.disabled||!l.value?{icon:"upload"}:x(l.value)?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}),m=o.computed(()=>l.value?l.value.name:i("selectFileLabel"));function p(){var z;(z=s.value)==null||z.click()}function v(){l.value=null,s.value&&(s.value.value="")}function g(z){f.value=!1;const y=z.target.files[0];y&&(l.value=y,x(y)?r("newFile",y):Iw("danger",()=>i("newFileError")))}function x(z){if(!z)return!1;if(c.acceptedFormats==="*")return!0;const C=z.name.split(".").pop();return!!c.acceptedFormats.includes(C)}return(z,C)=>(o.openBlock(),o.createBlock(Ke,{label:z.label,withOptionalLabel:z.withOptionalLabel,withLabelSpace:z.withLabelSpace,errors:z.errors,grow:z.grow},{default:o.withCtx(()=>[o.createElementVNode("div",b_1,[o.createElementVNode("input",{ref_key:"inputRef",ref:s,id:"input-file",class:"input-file--input",type:"file",accept:h.value,disabled:z.disabled,onChange:C[0]||(C[0]=y=>g(y))},null,40,V_1),o.createElementVNode("label",{for:"input-file",class:o.normalizeClass(["input-file--custom-input",{"input-file--custom-input__disabled":z.disabled}]),onMouseenter:C[4]||(C[4]=y=>f.value=!0),onMouseleave:C[5]||(C[5]=y=>f.value=!1)},[o.createVNode(x3,{class:"input-file--icon",icon:d.value.icon,color:d.value.color},null,8,["icon","color"]),o.createElementVNode("div",w_1,[o.createElementVNode("span",{class:"input-file--name",textContent:o.toDisplayString(m.value)},null,8,L_1)]),l.value?(o.openBlock(),o.createBlock(c3,{key:0,text:o.unref(i)("removeBtn"),buttonType:"flat",color:"danger",size:"xs",disabled:z.disabled,onMouseenter:C[1]||(C[1]=y=>u.value=!0),onMouseleave:C[2]||(C[2]=y=>u.value=!1),onClick:C[3]||(C[3]=o.withModifiers(y=>v(),["prevent"]))},null,8,["text","disabled"])):o.createCommentVNode("",!0)],34)])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const Os=Y1(__1,[["__scopeId","data-v-17525c07"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Uw=1252,k_1=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Rs={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Is=function(e){k_1.indexOf(e)!=-1&&(Uw=Rs[0]=e)};function A_1(){Is(1252)}var P4=function(e){Is(e)};function Ww(){P4(1200),A_1()}function Pu(e){for(var a=[],t=0,c=e.length;t<c;++t)a[t]=e.charCodeAt(t);return a}function S_1(e){for(var a=[],t=0;t<e.length>>1;++t)a[t]=String.fromCharCode(e.charCodeAt(2*t)+(e.charCodeAt(2*t+1)<<8));return a.join("")}function Yw(e){for(var a=[],t=0;t<e.length>>1;++t)a[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return a.join("")}var r5=function(e){var a=e.charCodeAt(0),t=e.charCodeAt(1);return a==255&&t==254?S_1(e.slice(2)):a==254&&t==255?Yw(e.slice(2)):a==65279?e.slice(1):e},yt=function(a){return String.fromCharCode(a)},Bu=function(a){return String.fromCharCode(a)},o0,g0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Ou(e){for(var a="",t=0,c=0,r=0,n=0,i=0,s=0,l=0,f=0;f<e.length;)t=e.charCodeAt(f++),n=t>>2,c=e.charCodeAt(f++),i=(t&3)<<4|c>>4,r=e.charCodeAt(f++),s=(c&15)<<2|r>>6,l=r&63,isNaN(c)?s=l=64:isNaN(r)&&(l=64),a+=g0.charAt(n)+g0.charAt(i)+g0.charAt(s)+g0.charAt(l);return a}function h4(e){var a="",t=0,c=0,r=0,n=0,i=0,s=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f<e.length;)n=g0.indexOf(e.charAt(f++)),i=g0.indexOf(e.charAt(f++)),t=n<<2|i>>4,a+=String.fromCharCode(t),s=g0.indexOf(e.charAt(f++)),c=(i&15)<<4|s>>2,s!==64&&(a+=String.fromCharCode(c)),l=g0.indexOf(e.charAt(f++)),r=(s&3)<<6|l,l!==64&&(a+=String.fromCharCode(r));return a}var t2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),F6=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(a,t){return t?new Buffer(a,t):new Buffer(a)}:Buffer.from.bind(Buffer)}return function(){}}();function D0(e){return t2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Ru(e){return t2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var T4=function(a){return t2?F6(a,"binary"):a.split("").map(function(t){return t.charCodeAt(0)&255})};function D6(e){if(Array.isArray(e))return e.map(function(c){return String.fromCharCode(c)}).join("");for(var a=[],t=0;t<e.length;++t)a[t]=String.fromCharCode(e[t]);return a.join("")}function $s(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return $s(new Uint8Array(e));for(var a=new Array(e.length),t=0;t<e.length;++t)a[t]=e[t];return a}var l0=t2?function(e){return Buffer.concat(e.map(function(a){return Buffer.isBuffer(a)?a:F6(a)}))}:function(e){if(typeof Uint8Array<"u"){var a=0,t=0;for(a=0;a<e.length;++a)t+=e[a].length;var c=new Uint8Array(t),r=0;for(a=0,t=0;a<e.length;t+=r,++a)if(r=e[a].length,e[a]instanceof Uint8Array)c.set(e[a],t);else{if(typeof e[a]=="string")throw"wtf";c.set(new Uint8Array(e[a]),t)}return c}return[].concat.apply([],e.map(function(n){return Array.isArray(n)?n:[].slice.call(n)}))};function N_1(e){for(var a=[],t=0,c=e.length+250,r=D0(e.length+255),n=0;n<e.length;++n){var i=e.charCodeAt(n);if(i<128)r[t++]=i;else if(i<2048)r[t++]=192|i>>6&31,r[t++]=128|i&63;else if(i>=55296&&i<57344){i=(i&1023)+64;var s=e.charCodeAt(++n)&1023;r[t++]=240|i>>8&7,r[t++]=128|i>>2&63,r[t++]=128|s>>6&15|(i&3)<<4,r[t++]=128|s&63}else r[t++]=224|i>>12&15,r[t++]=128|i>>6&63,r[t++]=128|i&63;t>c&&(a.push(r.slice(0,t)),t=0,r=D0(65535),c=65530)}return a.push(r.slice(0,t)),l0(a)}var X3=/\u0000/g,n5=/[\u0001-\u0006]/g;function o8(e){for(var a="",t=e.length-1;t>=0;)a+=e.charAt(t--);return a}function B4(e,a){var t=""+e;return t.length>=a?t:W2("0",a-t.length)+t}function Us(e,a){var t=""+e;return t.length>=a?t:W2(" ",a-t.length)+t}function T7(e,a){var t=""+e;return t.length>=a?t:t+W2(" ",a-t.length)}function T_1(e,a){var t=""+Math.round(e);return t.length>=a?t:W2("0",a-t.length)+t}function E_1(e,a){var t=""+e;return t.length>=a?t:W2("0",a-t.length)+t}var Iu=Math.pow(2,32);function q6(e,a){if(e>Iu||e<-Iu)return T_1(e,a);var t=Math.round(e);return E_1(t,a)}function E7(e,a){return a=a||0,e.length>=7+a&&(e.charCodeAt(a)|32)===103&&(e.charCodeAt(a+1)|32)===101&&(e.charCodeAt(a+2)|32)===110&&(e.charCodeAt(a+3)|32)===101&&(e.charCodeAt(a+4)|32)===114&&(e.charCodeAt(a+5)|32)===97&&(e.charCodeAt(a+6)|32)===108}var $u=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Tr=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function F_1(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var j1={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Uu={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},D_1={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function F7(e,a,t){for(var c=e<0?-1:1,r=e*c,n=0,i=1,s=0,l=1,f=0,u=0,h=Math.floor(r);f<a&&(h=Math.floor(r),s=h*i+n,u=h*f+l,!(r-h<5e-8));)r=1/(r-h),n=i,i=s,l=f,f=u;if(u>a&&(f>a?(u=l,s=n):(u=f,s=i)),!t)return[0,c*s,u];var d=Math.floor(c*s/u);return[d,c*s-d*u,u]}function u6(e,a,t){if(e>2958465||e<0)return null;var c=e|0,r=Math.floor(86400*(e-c)),n=0,i=[],s={D:c,T:r,u:86400*(e-c)-r,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),a&&a.date1904&&(c+=1462),s.u>.9999&&(s.u=0,++r==86400&&(s.T=r=0,++c,++s.D)),c===60)i=t?[1317,10,29]:[1900,2,29],n=3;else if(c===0)i=t?[1317,8,29]:[1900,1,0],n=6;else{c>60&&--c;var l=new Date(1900,0,1);l.setDate(l.getDate()+c-1),i=[l.getFullYear(),l.getMonth()+1,l.getDate()],n=l.getDay(),c<60&&(n=(n+6)%7),t&&(n=$_1(l,i))}return s.y=i[0],s.m=i[1],s.d=i[2],s.S=r%60,r=Math.floor(r/60),s.M=r%60,r=Math.floor(r/60),s.H=r,s.q=n,s}var jw=new Date(1899,11,31,0,0,0),P_1=jw.getTime(),B_1=new Date(1900,2,1,0,0,0);function qw(e,a){var t=e.getTime();return a?t-=1461*24*60*60*1e3:e>=B_1&&(t+=24*60*60*1e3),(t-(P_1+(e.getTimezoneOffset()-jw.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Ws(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function O_1(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function R_1(e){var a=e<0?12:11,t=Ws(e.toFixed(12));return t.length<=a||(t=e.toPrecision(10),t.length<=a)?t:e.toExponential(5)}function I_1(e){var a=Ws(e.toFixed(11));return a.length>(e<0?12:11)||a==="0"||a==="-0"?e.toPrecision(6):a}function sa(e){var a=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),t;return a>=-4&&a<=-1?t=e.toPrecision(10+a):Math.abs(a)<=9?t=R_1(e):a===10?t=e.toFixed(10).substr(0,12):t=I_1(e),Ws(O_1(t.toUpperCase()))}function V6(e,a){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):sa(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return M4(14,qw(e,a&&a.date1904),a)}throw new Error("unsupported value in General format: "+e)}function $_1(e,a){a[0]-=581;var t=e.getDay();return e<60&&(t=(t+6)%7),t}function U_1(e,a,t,c){var r="",n=0,i=0,s=t.y,l,f=0;switch(e){case 98:s=t.y+543;case 121:switch(a.length){case 1:case 2:l=s%100,f=2;break;default:l=s%1e4,f=4;break}break;case 109:switch(a.length){case 1:case 2:l=t.m,f=a.length;break;case 3:return Tr[t.m-1][1];case 5:return Tr[t.m-1][0];default:return Tr[t.m-1][2]}break;case 100:switch(a.length){case 1:case 2:l=t.d,f=a.length;break;case 3:return $u[t.q][0];default:return $u[t.q][1]}break;case 104:switch(a.length){case 1:case 2:l=1+(t.H+11)%12,f=a.length;break;default:throw"bad hour format: "+a}break;case 72:switch(a.length){case 1:case 2:l=t.H,f=a.length;break;default:throw"bad hour format: "+a}break;case 77:switch(a.length){case 1:case 2:l=t.M,f=a.length;break;default:throw"bad minute format: "+a}break;case 115:if(a!="s"&&a!="ss"&&a!=".0"&&a!=".00"&&a!=".000")throw"bad second format: "+a;return t.u===0&&(a=="s"||a=="ss")?B4(t.S,a.length):(c>=2?i=c===3?1e3:100:i=c===1?10:1,n=Math.round(i*(t.S+t.u)),n>=60*i&&(n=0),a==="s"?n===0?"0":""+n/i:(r=B4(n,2+c),a==="ss"?r.substr(0,2):"."+r.substr(2,a.length-1)));case 90:switch(a){case"[h]":case"[hh]":l=t.D*24+t.H;break;case"[m]":case"[mm]":l=(t.D*24+t.H)*60+t.M;break;case"[s]":case"[ss]":l=((t.D*24+t.H)*60+t.M)*60+Math.round(t.S+t.u);break;default:throw"bad abstime format: "+a}f=a.length===3?1:2;break;case 101:l=s,f=1;break}var u=f>0?B4(l,f):"";return u}function x0(e){var a=3;if(e.length<=a)return e;for(var t=e.length%a,c=e.substr(0,t);t!=e.length;t+=a)c+=(c.length>0?",":"")+e.substr(t,a);return c}var Gw=/%/g;function W_1(e,a,t){var c=a.replace(Gw,""),r=a.length-c.length;return Ie(e,c,t*Math.pow(10,2*r))+W2("%",r)}function Y_1(e,a,t){for(var c=a.length-1;a.charCodeAt(c-1)===44;)--c;return Ie(e,a.substr(0,c),t/Math.pow(10,3*(a.length-c)))}function Xw(e,a){var t,c=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+Xw(e,-a);var r=e.indexOf(".");r===-1&&(r=e.indexOf("E"));var n=Math.floor(Math.log(a)*Math.LOG10E)%r;if(n<0&&(n+=r),t=(a/Math.pow(10,n)).toPrecision(c+1+(r+n)%r),t.indexOf("e")===-1){var i=Math.floor(Math.log(a)*Math.LOG10E);for(t.indexOf(".")===-1?t=t.charAt(0)+"."+t.substr(1)+"E+"+(i-t.length+n):t+="E+"+(i-n);t.substr(0,2)==="0.";)t=t.charAt(0)+t.substr(2,r)+"."+t.substr(2+r),t=t.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(r+n)%r)+"."+u.substr(n)+"E"})}else t=a.toExponential(c);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}var Zw=/# (\?+)( ?)\/( ?)(\d+)/;function j_1(e,a,t){var c=parseInt(e[4],10),r=Math.round(a*c),n=Math.floor(r/c),i=r-n*c,s=c;return t+(n===0?"":""+n)+" "+(i===0?W2(" ",e[1].length+1+e[4].length):Us(i,e[1].length)+e[2]+"/"+e[3]+B4(s,e[4].length))}function q_1(e,a,t){return t+(a===0?"":""+a)+W2(" ",e[1].length+2+e[4].length)}var Qw=/^#*0*\.([0#]+)/,Kw=/\).*[0#]/,Jw=/\(###\) ###\\?-####/;function j3(e){for(var a="",t,c=0;c!=e.length;++c)switch(t=e.charCodeAt(c)){case 35:break;case 63:a+=" ";break;case 48:a+="0";break;default:a+=String.fromCharCode(t)}return a}function Wu(e,a){var t=Math.pow(10,a);return""+Math.round(e*t)/t}function Yu(e,a){var t=e-Math.floor(e),c=Math.pow(10,a);return a<(""+Math.round(t*c)).length?0:Math.round(t*c)}function G_1(e,a){return a<(""+Math.round((e-Math.floor(e))*Math.pow(10,a))).length?1:0}function X_1(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function g4(e,a,t){if(e.charCodeAt(0)===40&&!a.match(Kw)){var c=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?g4("n",c,t):"("+g4("n",c,-t)+")"}if(a.charCodeAt(a.length-1)===44)return Y_1(e,a,t);if(a.indexOf("%")!==-1)return W_1(e,a,t);if(a.indexOf("E")!==-1)return Xw(a,t);if(a.charCodeAt(0)===36)return"$"+g4(e,a.substr(a.charAt(1)==" "?2:1),t);var r,n,i,s,l=Math.abs(t),f=t<0?"-":"";if(a.match(/^00+$/))return f+q6(l,a.length);if(a.match(/^[#?]+$/))return r=q6(t,0),r==="0"&&(r=""),r.length>a.length?r:j3(a.substr(0,a.length-r.length))+r;if(n=a.match(Zw))return j_1(n,l,f);if(a.match(/^#+0+$/))return f+q6(l,a.length-a.indexOf("0"));if(n=a.match(Qw))return r=Wu(t,n[1].length).replace(/^([^\.]+)$/,"$1."+j3(n[1])).replace(/\.$/,"."+j3(n[1])).replace(/\.(\d*)$/,function(p,v){return"."+v+W2("0",j3(n[1]).length-v.length)}),a.indexOf("0.")!==-1?r:r.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),n=a.match(/^(0*)\.(#*)$/))return f+Wu(l,n[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=a.match(/^#{1,3},##0(\.?)$/))return f+x0(q6(l,0));if(n=a.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+g4(e,a,-t):x0(""+(Math.floor(t)+G_1(t,n[1].length)))+"."+B4(Yu(t,n[1].length),n[1].length);if(n=a.match(/^#,#*,#0/))return g4(e,a.replace(/^#,#*,/,""),t);if(n=a.match(/^([0#]+)(\\?-([0#]+))+$/))return r=o8(g4(e,a.replace(/[\\-]/g,""),t)),i=0,o8(o8(a.replace(/\\/g,"")).replace(/[0#]/g,function(p){return i<r.length?r.charAt(i++):p==="0"?"0":""}));if(a.match(Jw))return r=g4(e,"##########",t),"("+r.substr(0,3)+") "+r.substr(3,3)+"-"+r.substr(6);var u="";if(n=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(n[4].length,7),s=F7(l,Math.pow(10,i)-1,!1),r=""+f,u=Ie("n",n[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),r+=u+n[2]+"/"+n[3],u=T7(s[2],i),u.length<n[4].length&&(u=j3(n[4].substr(n[4].length-u.length))+u),r+=u,r;if(n=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(n[1].length,n[4].length),7),s=F7(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Us(s[1],i)+n[2]+"/"+n[3]+T7(s[2],i):W2(" ",2*i+1+n[2].length+n[3].length));if(n=a.match(/^[#0?]+$/))return r=q6(t,0),a.length<=r.length?r:j3(a.substr(0,a.length-r.length))+r;if(n=a.match(/^([#0?]+)\.([#0]+)$/)){r=""+t.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),i=r.indexOf(".");var h=a.indexOf(".")-i,d=a.length-r.length-h;return j3(a.substr(0,h)+r+a.substr(a.length-d))}if(n=a.match(/^00,000\.([#0]*0)$/))return i=Yu(t,n[1].length),t<0?"-"+g4(e,a,-t):x0(X_1(t)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?B4(0,3-p.length):"")+p})+"."+B4(i,n[1].length);switch(a){case"###,##0.00":return g4(e,"#,##0.00",t);case"###,###":case"##,###":case"#,###":var m=x0(q6(l,0));return m!=="0"?f+m:"";case"###,###.00":return g4(e,"###,##0.00",t).replace(/^0\./,".");case"#,###.00":return g4(e,"#,##0.00",t).replace(/^0\./,".")}throw new Error("unsupported format |"+a+"|")}function Z_1(e,a,t){for(var c=a.length-1;a.charCodeAt(c-1)===44;)--c;return Ie(e,a.substr(0,c),t/Math.pow(10,3*(a.length-c)))}function Q_1(e,a,t){var c=a.replace(Gw,""),r=a.length-c.length;return Ie(e,c,t*Math.pow(10,2*r))+W2("%",r)}function eL(e,a){var t,c=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+eL(e,-a);var r=e.indexOf(".");r===-1&&(r=e.indexOf("E"));var n=Math.floor(Math.log(a)*Math.LOG10E)%r;if(n<0&&(n+=r),t=(a/Math.pow(10,n)).toPrecision(c+1+(r+n)%r),!t.match(/[Ee]/)){var i=Math.floor(Math.log(a)*Math.LOG10E);t.indexOf(".")===-1?t=t.charAt(0)+"."+t.substr(1)+"E+"+(i-t.length+n):t+="E+"+(i-n),t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(r+n)%r)+"."+u.substr(n)+"E"})}else t=a.toExponential(c);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}function ae(e,a,t){if(e.charCodeAt(0)===40&&!a.match(Kw)){var c=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?ae("n",c,t):"("+ae("n",c,-t)+")"}if(a.charCodeAt(a.length-1)===44)return Z_1(e,a,t);if(a.indexOf("%")!==-1)return Q_1(e,a,t);if(a.indexOf("E")!==-1)return eL(a,t);if(a.charCodeAt(0)===36)return"$"+ae(e,a.substr(a.charAt(1)==" "?2:1),t);var r,n,i,s,l=Math.abs(t),f=t<0?"-":"";if(a.match(/^00+$/))return f+B4(l,a.length);if(a.match(/^[#?]+$/))return r=""+t,t===0&&(r=""),r.length>a.length?r:j3(a.substr(0,a.length-r.length))+r;if(n=a.match(Zw))return q_1(n,l,f);if(a.match(/^#+0+$/))return f+B4(l,a.length-a.indexOf("0"));if(n=a.match(Qw))return r=(""+t).replace(/^([^\.]+)$/,"$1."+j3(n[1])).replace(/\.$/,"."+j3(n[1])),r=r.replace(/\.(\d*)$/,function(p,v){return"."+v+W2("0",j3(n[1]).length-v.length)}),a.indexOf("0.")!==-1?r:r.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),n=a.match(/^(0*)\.(#*)$/))return f+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=a.match(/^#{1,3},##0(\.?)$/))return f+x0(""+l);if(n=a.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+ae(e,a,-t):x0(""+t)+"."+W2("0",n[1].length);if(n=a.match(/^#,#*,#0/))return ae(e,a.replace(/^#,#*,/,""),t);if(n=a.match(/^([0#]+)(\\?-([0#]+))+$/))return r=o8(ae(e,a.replace(/[\\-]/g,""),t)),i=0,o8(o8(a.replace(/\\/g,"")).replace(/[0#]/g,function(p){return i<r.length?r.charAt(i++):p==="0"?"0":""}));if(a.match(Jw))return r=ae(e,"##########",t),"("+r.substr(0,3)+") "+r.substr(3,3)+"-"+r.substr(6);var u="";if(n=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(n[4].length,7),s=F7(l,Math.pow(10,i)-1,!1),r=""+f,u=Ie("n",n[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),r+=u+n[2]+"/"+n[3],u=T7(s[2],i),u.length<n[4].length&&(u=j3(n[4].substr(n[4].length-u.length))+u),r+=u,r;if(n=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(n[1].length,n[4].length),7),s=F7(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Us(s[1],i)+n[2]+"/"+n[3]+T7(s[2],i):W2(" ",2*i+1+n[2].length+n[3].length));if(n=a.match(/^[#0?]+$/))return r=""+t,a.length<=r.length?r:j3(a.substr(0,a.length-r.length))+r;if(n=a.match(/^([#0]+)\.([#0]+)$/)){r=""+t.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),i=r.indexOf(".");var h=a.indexOf(".")-i,d=a.length-r.length-h;return j3(a.substr(0,h)+r+a.substr(a.length-d))}if(n=a.match(/^00,000\.([#0]*0)$/))return t<0?"-"+ae(e,a,-t):x0(""+t).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?B4(0,3-p.length):"")+p})+"."+B4(0,n[1].length);switch(a){case"###,###":case"##,###":case"#,###":var m=x0(""+l);return m!=="0"?f+m:"";default:if(a.match(/\.[0#?]*$/))return ae(e,a.slice(0,a.lastIndexOf(".")),t)+j3(a.slice(a.lastIndexOf(".")))}throw new Error("unsupported format |"+a+"|")}function Ie(e,a,t){return(t|0)===t?ae(e,a,t):g4(e,a,t)}function K_1(e){for(var a=[],t=!1,c=0,r=0;c<e.length;++c)switch(e.charCodeAt(c)){case 34:t=!t;break;case 95:case 42:case 92:++c;break;case 59:a[a.length]=e.substr(r,c-r),r=c+1}if(a[a.length]=e.substr(r),t===!0)throw new Error("Format |"+e+"| unterminated string ");return a}var aL=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function N8(e){for(var a=0,t="",c="";a<e.length;)switch(t=e.charAt(a)){case"G":E7(e,a)&&(a+=6),a++;break;case'"':for(;e.charCodeAt(++a)!==34&&a<e.length;);++a;break;case"\\":a+=2;break;case"_":a+=2;break;case"@":++a;break;case"B":case"b":if(e.charAt(a+1)==="1"||e.charAt(a+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(a,3).toUpperCase()==="A/P"||e.substr(a,5).toUpperCase()==="AM/PM"||e.substr(a,5).toUpperCase()==="上午/下午")return!0;++a;break;case"[":for(c=t;e.charAt(a++)!=="]"&&a<e.length;)c+=e.charAt(a);if(c.match(aL))return!0;break;case".":case"0":case"#":for(;a<e.length&&("0#?.,E+-%".indexOf(t=e.charAt(++a))>-1||t=="\\"&&e.charAt(a+1)=="-"&&"0#".indexOf(e.charAt(a+2))>-1););break;case"?":for(;e.charAt(++a)===t;);break;case"*":++a,(e.charAt(a)==" "||e.charAt(a)=="*")&&++a;break;case"(":case")":++a;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;a<e.length&&"0123456789".indexOf(e.charAt(++a))>-1;);break;case" ":++a;break;default:++a;break}return!1}function J_1(e,a,t,c){for(var r=[],n="",i=0,s="",l="t",f,u,h,d="H";i<e.length;)switch(s=e.charAt(i)){case"G":if(!E7(e,i))throw new Error("unrecognized character "+s+" in "+e);r[r.length]={t:"G",v:"General"},i+=7;break;case'"':for(n="";(h=e.charCodeAt(++i))!==34&&i<e.length;)n+=String.fromCharCode(h);r[r.length]={t:"t",v:n},++i;break;case"\\":var m=e.charAt(++i),p=m==="("||m===")"?m:"t";r[r.length]={t:p,v:m},++i;break;case"_":r[r.length]={t:"t",v:" "},i+=2;break;case"@":r[r.length]={t:"T",v:a},++i;break;case"B":case"b":if(e.charAt(i+1)==="1"||e.charAt(i+1)==="2"){if(f==null&&(f=u6(a,t,e.charAt(i+1)==="2"),f==null))return"";r[r.length]={t:"X",v:e.substr(i,2)},l=s,i+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(a<0||f==null&&(f=u6(a,t),f==null))return"";for(n=s;++i<e.length&&e.charAt(i).toLowerCase()===s;)n+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=d),r[r.length]={t:s,v:n},l=s;break;case"A":case"a":case"上":var v={t:s,v:s};if(f==null&&(f=u6(a,t)),e.substr(i,3).toUpperCase()==="A/P"?(f!=null&&(v.v=f.H>=12?"P":"A"),v.t="T",d="h",i+=3):e.substr(i,5).toUpperCase()==="AM/PM"?(f!=null&&(v.v=f.H>=12?"PM":"AM"),v.t="T",i+=5,d="h"):e.substr(i,5).toUpperCase()==="上午/下午"?(f!=null&&(v.v=f.H>=12?"下午":"上午"),v.t="T",i+=5,d="h"):(v.t="t",++i),f==null&&v.t==="T")return"";r[r.length]=v,l=s;break;case"[":for(n=s;e.charAt(i++)!=="]"&&i<e.length;)n+=e.charAt(i);if(n.slice(-1)!=="]")throw'unterminated "[" block: |'+n+"|";if(n.match(aL)){if(f==null&&(f=u6(a,t),f==null))return"";r[r.length]={t:"Z",v:n.toLowerCase()},l=n.charAt(1)}else n.indexOf("$")>-1&&(n=(n.match(/\$([^-\[\]]*)/)||[])[1]||"$",N8(e)||(r[r.length]={t:"t",v:n}));break;case".":if(f!=null){for(n=s;++i<e.length&&(s=e.charAt(i))==="0";)n+=s;r[r.length]={t:"s",v:n};break}case"0":case"#":for(n=s;++i<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(i))>-1;)n+=s;r[r.length]={t:"n",v:n};break;case"?":for(n=s;e.charAt(++i)===s;)n+=s;r[r.length]={t:s,v:n},l=s;break;case"*":++i,(e.charAt(i)==" "||e.charAt(i)=="*")&&++i;break;case"(":case")":r[r.length]={t:c===1?"t":s,v:s},++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(n=s;i<e.length&&"0123456789".indexOf(e.charAt(++i))>-1;)n+=e.charAt(i);r[r.length]={t:"D",v:n};break;case" ":r[r.length]={t:s,v:s},++i;break;case"$":r[r.length]={t:"t",v:"$"},++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);r[r.length]={t:"t",v:s},++i;break}var g=0,x=0,z;for(i=r.length-1,l="t";i>=0;--i)switch(r[i].t){case"h":case"H":r[i].t=d,l="h",g<1&&(g=1);break;case"s":(z=r[i].v.match(/\.0+$/))&&(x=Math.max(x,z[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":l=r[i].t;break;case"m":l==="s"&&(r[i].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&r[i].v.match(/[Hh]/)&&(g=1),g<2&&r[i].v.match(/[Mm]/)&&(g=2),g<3&&r[i].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M),f.M>=60&&(f.M=0,++f.H);break;case 2:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M);break}var C="",y;for(i=0;i<r.length;++i)switch(r[i].t){case"t":case"T":case" ":case"D":break;case"X":r[i].v="",r[i].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":r[i].v=U_1(r[i].t.charCodeAt(0),r[i].v,f,x),r[i].t="t";break;case"n":case"?":for(y=i+1;r[y]!=null&&((s=r[y].t)==="?"||s==="D"||(s===" "||s==="t")&&r[y+1]!=null&&(r[y+1].t==="?"||r[y+1].t==="t"&&r[y+1].v==="/")||r[i].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(r[y].v==="/"||r[y].v===" "&&r[y+1]!=null&&r[y+1].t=="?"));)r[i].v+=r[y].v,r[y]={v:"",t:";"},++y;C+=r[i].v,i=y-1;break;case"G":r[i].t="t",r[i].v=V6(a,t);break}var b="",w,H;if(C.length>0){C.charCodeAt(0)==40?(w=a<0&&C.charCodeAt(0)===45?-a:a,H=Ie("n",C,w)):(w=a<0&&c>1?-a:a,H=Ie("n",C,w),w<0&&r[0]&&r[0].t=="t"&&(H=H.substr(1),r[0].v="-"+r[0].v)),y=H.length-1;var T=r.length;for(i=0;i<r.length;++i)if(r[i]!=null&&r[i].t!="t"&&r[i].v.indexOf(".")>-1){T=i;break}var A=r.length;if(T===r.length&&H.indexOf("E")===-1){for(i=r.length-1;i>=0;--i)r[i]==null||"n?".indexOf(r[i].t)===-1||(y>=r[i].v.length-1?(y-=r[i].v.length,r[i].v=H.substr(y+1,r[i].v.length)):y<0?r[i].v="":(r[i].v=H.substr(0,y+1),y=-1),r[i].t="t",A=i);y>=0&&A<r.length&&(r[A].v=H.substr(0,y+1)+r[A].v)}else if(T!==r.length&&H.indexOf("E")===-1){for(y=H.indexOf(".")-1,i=T;i>=0;--i)if(!(r[i]==null||"n?".indexOf(r[i].t)===-1)){for(u=r[i].v.indexOf(".")>-1&&i===T?r[i].v.indexOf(".")-1:r[i].v.length-1,b=r[i].v.substr(u+1);u>=0;--u)y>=0&&(r[i].v.charAt(u)==="0"||r[i].v.charAt(u)==="#")&&(b=H.charAt(y--)+b);r[i].v=b,r[i].t="t",A=i}for(y>=0&&A<r.length&&(r[A].v=H.substr(0,y+1)+r[A].v),y=H.indexOf(".")+1,i=T;i<r.length;++i)if(!(r[i]==null||"n?(".indexOf(r[i].t)===-1&&i!==T)){for(u=r[i].v.indexOf(".")>-1&&i===T?r[i].v.indexOf(".")+1:0,b=r[i].v.substr(0,u);u<r[i].v.length;++u)y<H.length&&(b+=H.charAt(y++));r[i].v=b,r[i].t="t",A=i}}}for(i=0;i<r.length;++i)r[i]!=null&&"n?".indexOf(r[i].t)>-1&&(w=c>1&&a<0&&i>0&&r[i-1].v==="-"?-a:a,r[i].v=Ie(r[i].t,r[i].v,w),r[i].t="t");var U="";for(i=0;i!==r.length;++i)r[i]!=null&&(U+=r[i].v);return U}var ju=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function qu(e,a){if(a==null)return!1;var t=parseFloat(a[2]);switch(a[1]){case"=":if(e==t)return!0;break;case">":if(e>t)return!0;break;case"<":if(e<t)return!0;break;case"<>":if(e!=t)return!0;break;case">=":if(e>=t)return!0;break;case"<=":if(e<=t)return!0;break}return!1}function ek1(e,a){var t=K_1(e),c=t.length,r=t[c-1].indexOf("@");if(c<4&&r>-1&&--c,t.length>4)throw new Error("cannot find right format for |"+t.join("|")+"|");if(typeof a!="number")return[4,t.length===4||r>-1?t[t.length-1]:"@"];switch(t.length){case 1:t=r>-1?["General","General","General",t[0]]:[t[0],t[0],t[0],"@"];break;case 2:t=r>-1?[t[0],t[0],t[0],t[1]]:[t[0],t[1],t[0],"@"];break;case 3:t=r>-1?[t[0],t[1],t[0],t[2]]:[t[0],t[1],t[2],"@"];break}var n=a>0?t[0]:a<0?t[1]:t[2];if(t[0].indexOf("[")===-1&&t[1].indexOf("[")===-1)return[c,n];if(t[0].match(/\[[=<>]/)!=null||t[1].match(/\[[=<>]/)!=null){var i=t[0].match(ju),s=t[1].match(ju);return qu(a,i)?[c,t[0]]:qu(a,s)?[c,t[1]]:[c,t[i!=null&&s!=null?2:1]]}return[c,n]}function M4(e,a,t){t==null&&(t={});var c="";switch(typeof e){case"string":e=="m/d/yy"&&t.dateNF?c=t.dateNF:c=e;break;case"number":e==14&&t.dateNF?c=t.dateNF:c=(t.table!=null?t.table:j1)[e],c==null&&(c=t.table&&t.table[Uu[e]]||j1[Uu[e]]),c==null&&(c=D_1[e]||"General");break}if(E7(c,0))return V6(a,t);a instanceof Date&&(a=qw(a,t.date1904));var r=ek1(c,a);if(E7(r[1]))return V6(a,t);if(a===!0)a="TRUE";else if(a===!1)a="FALSE";else if(a===""||a==null)return"";return J_1(r[1],a,t,r[0])}function g6(e,a){if(typeof a!="number"){a=+a||-1;for(var t=0;t<392;++t){if(j1[t]==null){a<0&&(a=t);continue}if(j1[t]==e){a=t;break}}a<0&&(a=391)}return j1[a]=e,a}function tL(){j1=F_1()}var ak1={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},cL=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function tk1(e){var a=typeof e=="number"?j1[e]:e;return a=a.replace(cL,"(\\d+)"),new RegExp("^"+a+"$")}function ck1(e,a,t){var c=-1,r=-1,n=-1,i=-1,s=-1,l=-1;(a.match(cL)||[]).forEach(function(h,d){var m=parseInt(t[d+1],10);switch(h.toLowerCase().charAt(0)){case"y":c=m;break;case"d":n=m;break;case"h":i=m;break;case"s":l=m;break;case"m":i>=0?s=m:r=m;break}}),l>=0&&s==-1&&r>=0&&(s=r,r=-1);var f=(""+(c>=0?c:new Date().getFullYear())).slice(-4)+"-"+("00"+(r>=1?r:1)).slice(-2)+"-"+("00"+(n>=1?n:1)).slice(-2);f.length==7&&(f="0"+f),f.length==8&&(f="20"+f);var u=("00"+(i>=0?i:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return i==-1&&s==-1&&l==-1?f:c==-1&&r==-1&&n==-1?u:f+"T"+u}var rk1=function(){var e={};e.version="1.2.0";function a(){for(var H=0,T=new Array(256),A=0;A!=256;++A)H=A,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,H=H&1?-306674912^H>>>1:H>>>1,T[A]=H;return typeof Int32Array<"u"?new Int32Array(T):T}var t=a();function c(H){var T=0,A=0,U=0,D=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(U=0;U!=256;++U)D[U]=H[U];for(U=0;U!=256;++U)for(A=H[U],T=256+U;T<4096;T+=256)A=D[T]=A>>>8^H[A&255];var k=[];for(U=1;U!=16;++U)k[U-1]=typeof Int32Array<"u"?D.subarray(U*256,U*256+256):D.slice(U*256,U*256+256);return k}var r=c(t),n=r[0],i=r[1],s=r[2],l=r[3],f=r[4],u=r[5],h=r[6],d=r[7],m=r[8],p=r[9],v=r[10],g=r[11],x=r[12],z=r[13],C=r[14];function y(H,T){for(var A=T^-1,U=0,D=H.length;U<D;)A=A>>>8^t[(A^H.charCodeAt(U++))&255];return~A}function b(H,T){for(var A=T^-1,U=H.length-15,D=0;D<U;)A=C[H[D++]^A&255]^z[H[D++]^A>>8&255]^x[H[D++]^A>>16&255]^g[H[D++]^A>>>24]^v[H[D++]]^p[H[D++]]^m[H[D++]]^d[H[D++]]^h[H[D++]]^u[H[D++]]^f[H[D++]]^l[H[D++]]^s[H[D++]]^i[H[D++]]^n[H[D++]]^t[H[D++]];for(U+=15;D<U;)A=A>>>8^t[(A^H[D++])&255];return~A}function w(H,T){for(var A=T^-1,U=0,D=H.length,k=0,j=0;U<D;)k=H.charCodeAt(U++),k<128?A=A>>>8^t[(A^k)&255]:k<2048?(A=A>>>8^t[(A^(192|k>>6&31))&255],A=A>>>8^t[(A^(128|k&63))&255]):k>=55296&&k<57344?(k=(k&1023)+64,j=H.charCodeAt(U++)&1023,A=A>>>8^t[(A^(240|k>>8&7))&255],A=A>>>8^t[(A^(128|k>>2&63))&255],A=A>>>8^t[(A^(128|j>>6&15|(k&3)<<4))&255],A=A>>>8^t[(A^(128|j&63))&255]):(A=A>>>8^t[(A^(224|k>>12&15))&255],A=A>>>8^t[(A^(128|k>>6&63))&255],A=A>>>8^t[(A^(128|k&63))&255]);return~A}return e.table=t,e.bstr=y,e.buf=b,e.str=w,e}(),r2=function(){var a={};a.version="1.2.1";function t(N,G){for(var R=N.split("/"),W=G.split("/"),Z=0,Q=0,o1=Math.min(R.length,W.length);Z<o1;++Z){if(Q=R[Z].length-W[Z].length)return Q;if(R[Z]!=W[Z])return R[Z]<W[Z]?-1:1}return R.length-W.length}function c(N){if(N.charAt(N.length-1)=="/")return N.slice(0,-1).indexOf("/")===-1?N:c(N.slice(0,-1));var G=N.lastIndexOf("/");return G===-1?N:N.slice(0,G+1)}function r(N){if(N.charAt(N.length-1)=="/")return r(N.slice(0,-1));var G=N.lastIndexOf("/");return G===-1?N:N.slice(G+1)}function n(N,G){typeof G=="string"&&(G=new Date(G));var R=G.getHours();R=R<<6|G.getMinutes(),R=R<<5|G.getSeconds()>>>1,N.write_shift(2,R);var W=G.getFullYear()-1980;W=W<<4|G.getMonth()+1,W=W<<5|G.getDate(),N.write_shift(2,W)}function i(N){var G=N.read_shift(2)&65535,R=N.read_shift(2)&65535,W=new Date,Z=R&31;R>>>=5;var Q=R&15;R>>>=4,W.setMilliseconds(0),W.setFullYear(R+1980),W.setMonth(Q-1),W.setDate(Z);var o1=G&31;G>>>=5;var u1=G&63;return G>>>=6,W.setHours(G),W.setMinutes(u1),W.setSeconds(o1<<1),W}function s(N){V3(N,0);for(var G={},R=0;N.l<=N.length-4;){var W=N.read_shift(2),Z=N.read_shift(2),Q=N.l+Z,o1={};switch(W){case 21589:R=N.read_shift(1),R&1&&(o1.mtime=N.read_shift(4)),Z>5&&(R&2&&(o1.atime=N.read_shift(4)),R&4&&(o1.ctime=N.read_shift(4))),o1.mtime&&(o1.mt=new Date(o1.mtime*1e3));break}N.l=Q,G[W]=o1}return G}var l;function f(){return l||(l={})}function u(N,G){if(N[0]==80&&N[1]==75)return k1(N,G);if((N[0]|32)==109&&(N[1]|32)==105)return F8(N,G);if(N.length<512)throw new Error("CFB file size "+N.length+" < 512");var R=3,W=512,Z=0,Q=0,o1=0,u1=0,M=0,L=[],E=N.slice(0,512);V3(E,0);var Y=h(E);switch(R=Y[0],R){case 3:W=512;break;case 4:W=4096;break;case 0:if(Y[1]==0)return k1(N,G);default:throw new Error("Major Version: Expected 3 or 4 saw "+R)}W!==512&&(E=N.slice(0,W),V3(E,28));var K=N.slice(0,W);d(E,R);var t1=E.read_shift(4,"i");if(R===3&&t1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+t1);E.l+=4,o1=E.read_shift(4,"i"),E.l+=4,E.chk("00100000","Mini Stream Cutoff Size: "),u1=E.read_shift(4,"i"),Z=E.read_shift(4,"i"),M=E.read_shift(4,"i"),Q=E.read_shift(4,"i");for(var e1=-1,h1=0;h1<109&&(e1=E.read_shift(4,"i"),!(e1<0));++h1)L[h1]=e1;var M1=m(N,W);g(M,Q,M1,W,L);var V1=z(M1,o1,L,W);V1[o1].name="!Directory",Z>0&&u1!==j&&(V1[u1].name="!MiniFAT"),V1[L[0]].name="!FAT",V1.fat_addrs=L,V1.ssz=W;var x1={},P1=[],D1=[],Z1=[];C(o1,V1,M1,P1,Z,x1,D1,u1),p(D1,Z1,P1),P1.shift();var E1={FileIndex:D1,FullPaths:Z1};return G&&G.raw&&(E1.raw={header:K,sectors:M1}),E1}function h(N){if(N[N.l]==80&&N[N.l+1]==75)return[0,0];N.chk(c1,"Header Signature: "),N.l+=16;var G=N.read_shift(2,"u");return[N.read_shift(2,"u"),G]}function d(N,G){var R=9;switch(N.l+=2,R=N.read_shift(2)){case 9:if(G!=3)throw new Error("Sector Shift: Expected 9 saw "+R);break;case 12:if(G!=4)throw new Error("Sector Shift: Expected 12 saw "+R);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+R)}N.chk("0600","Mini Sector Shift: "),N.chk("000000000000","Reserved: ")}function m(N,G){for(var R=Math.ceil(N.length/G)-1,W=[],Z=1;Z<R;++Z)W[Z-1]=N.slice(Z*G,(Z+1)*G);return W[R-1]=N.slice(R*G),W}function p(N,G,R){for(var W=0,Z=0,Q=0,o1=0,u1=0,M=R.length,L=[],E=[];W<M;++W)L[W]=E[W]=W,G[W]=R[W];for(;u1<E.length;++u1)W=E[u1],Z=N[W].L,Q=N[W].R,o1=N[W].C,L[W]===W&&(Z!==-1&&L[Z]!==Z&&(L[W]=L[Z]),Q!==-1&&L[Q]!==Q&&(L[W]=L[Q])),o1!==-1&&(L[o1]=W),Z!==-1&&W!=L[W]&&(L[Z]=L[W],E.lastIndexOf(Z)<u1&&E.push(Z)),Q!==-1&&W!=L[W]&&(L[Q]=L[W],E.lastIndexOf(Q)<u1&&E.push(Q));for(W=1;W<M;++W)L[W]===W&&(Q!==-1&&L[Q]!==Q?L[W]=L[Q]:Z!==-1&&L[Z]!==Z&&(L[W]=L[Z]));for(W=1;W<M;++W)if(N[W].type!==0){if(u1=W,u1!=L[u1])do u1=L[u1],G[W]=G[u1]+"/"+G[W];while(u1!==0&&L[u1]!==-1&&u1!=L[u1]);L[W]=-1}for(G[0]+="/",W=1;W<M;++W)N[W].type!==2&&(G[W]+="/")}function v(N,G,R){for(var W=N.start,Z=N.size,Q=[],o1=W;R&&Z>0&&o1>=0;)Q.push(G.slice(o1*k,o1*k+k)),Z-=k,o1=r6(R,o1*4);return Q.length===0?u3(0):l0(Q).slice(0,N.size)}function g(N,G,R,W,Z){var Q=j;if(N===j){if(G!==0)throw new Error("DIFAT chain shorter than expected")}else if(N!==-1){var o1=R[N],u1=(W>>>2)-1;if(!o1)return;for(var M=0;M<u1&&(Q=r6(o1,M*4))!==j;++M)Z.push(Q);g(r6(o1,W-4),G-1,R,W,Z)}}function x(N,G,R,W,Z){var Q=[],o1=[];Z||(Z=[]);var u1=W-1,M=0,L=0;for(M=G;M>=0;){Z[M]=!0,Q[Q.length]=M,o1.push(N[M]);var E=R[Math.floor(M*4/W)];if(L=M*4&u1,W<4+L)throw new Error("FAT boundary crossed: "+M+" 4 "+W);if(!N[E])break;M=r6(N[E],L)}return{nodes:Q,data:ch([o1])}}function z(N,G,R,W){var Z=N.length,Q=[],o1=[],u1=[],M=[],L=W-1,E=0,Y=0,K=0,t1=0;for(E=0;E<Z;++E)if(u1=[],K=E+G,K>=Z&&(K-=Z),!o1[K]){M=[];var e1=[];for(Y=K;Y>=0;){e1[Y]=!0,o1[Y]=!0,u1[u1.length]=Y,M.push(N[Y]);var h1=R[Math.floor(Y*4/W)];if(t1=Y*4&L,W<4+t1)throw new Error("FAT boundary crossed: "+Y+" 4 "+W);if(!N[h1]||(Y=r6(N[h1],t1),e1[Y]))break}Q[K]={nodes:u1,data:ch([M])}}return Q}function C(N,G,R,W,Z,Q,o1,u1){for(var M=0,L=W.length?2:0,E=G[N].data,Y=0,K=0,t1;Y<E.length;Y+=128){var e1=E.slice(Y,Y+128);V3(e1,64),K=e1.read_shift(2),t1=Xs(e1,0,K-L),W.push(t1);var h1={name:t1,type:e1.read_shift(1),color:e1.read_shift(1),L:e1.read_shift(4,"i"),R:e1.read_shift(4,"i"),C:e1.read_shift(4,"i"),clsid:e1.read_shift(16),state:e1.read_shift(4,"i"),start:0,size:0},M1=e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2);M1!==0&&(h1.ct=y(e1,e1.l-8));var V1=e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2);V1!==0&&(h1.mt=y(e1,e1.l-8)),h1.start=e1.read_shift(4,"i"),h1.size=e1.read_shift(4,"i"),h1.size<0&&h1.start<0&&(h1.size=h1.type=0,h1.start=j,h1.name=""),h1.type===5?(M=h1.start,Z>0&&M!==j&&(G[M].name="!StreamData")):h1.size>=4096?(h1.storage="fat",G[h1.start]===void 0&&(G[h1.start]=x(R,h1.start,G.fat_addrs,G.ssz)),G[h1.start].name=h1.name,h1.content=G[h1.start].data.slice(0,h1.size)):(h1.storage="minifat",h1.size<0?h1.size=0:M!==j&&h1.start!==j&&G[M]&&(h1.content=v(h1,G[M].data,(G[u1]||{}).data))),h1.content&&V3(h1.content,0),Q[t1]=h1,o1.push(h1)}}function y(N,G){return new Date((l4(N,G+4)/1e7*Math.pow(2,32)+l4(N,G)/1e7-11644473600)*1e3)}function b(N,G){return f(),u(l.readFileSync(N),G)}function w(N,G){var R=G&&G.type;switch(R||t2&&Buffer.isBuffer(N)&&(R="buffer"),R||"base64"){case"file":return b(N,G);case"base64":return u(T4(h4(N)),G);case"binary":return u(T4(N),G)}return u(N,G)}function H(N,G){var R=G||{},W=R.root||"Root Entry";if(N.FullPaths||(N.FullPaths=[]),N.FileIndex||(N.FileIndex=[]),N.FullPaths.length!==N.FileIndex.length)throw new Error("inconsistent CFB structure");N.FullPaths.length===0&&(N.FullPaths[0]=W+"/",N.FileIndex[0]={name:W,type:5}),R.CLSID&&(N.FileIndex[0].clsid=R.CLSID),T(N)}function T(N){var G="Sh33tJ5";if(!r2.find(N,"/"+G)){var R=u3(4);R[0]=55,R[1]=R[3]=50,R[2]=54,N.FileIndex.push({name:G,type:2,content:R,size:4,L:69,R:69,C:69}),N.FullPaths.push(N.FullPaths[0]+G),A(N)}}function A(N,G){H(N);for(var R=!1,W=!1,Z=N.FullPaths.length-1;Z>=0;--Z){var Q=N.FileIndex[Z];switch(Q.type){case 0:W?R=!0:(N.FileIndex.pop(),N.FullPaths.pop());break;case 1:case 2:case 5:W=!0,isNaN(Q.R*Q.L*Q.C)&&(R=!0),Q.R>-1&&Q.L>-1&&Q.R==Q.L&&(R=!0);break;default:R=!0;break}}if(!(!R&&!G)){var o1=new Date(1987,1,19),u1=0,M=Object.create?Object.create(null):{},L=[];for(Z=0;Z<N.FullPaths.length;++Z)M[N.FullPaths[Z]]=!0,N.FileIndex[Z].type!==0&&L.push([N.FullPaths[Z],N.FileIndex[Z]]);for(Z=0;Z<L.length;++Z){var E=c(L[Z][0]);W=M[E],W||(L.push([E,{name:r(E).replace("/",""),type:1,clsid:O,ct:o1,mt:o1,content:null}]),M[E]=!0)}for(L.sort(function(t1,e1){return t(t1[0],e1[0])}),N.FullPaths=[],N.FileIndex=[],Z=0;Z<L.length;++Z)N.FullPaths[Z]=L[Z][0],N.FileIndex[Z]=L[Z][1];for(Z=0;Z<L.length;++Z){var Y=N.FileIndex[Z],K=N.FullPaths[Z];if(Y.name=r(K).replace("/",""),Y.L=Y.R=Y.C=-(Y.color=1),Y.size=Y.content?Y.content.length:0,Y.start=0,Y.clsid=Y.clsid||O,Z===0)Y.C=L.length>1?1:-1,Y.size=0,Y.type=5;else if(K.slice(-1)=="/"){for(u1=Z+1;u1<L.length&&c(N.FullPaths[u1])!=K;++u1);for(Y.C=u1>=L.length?-1:u1,u1=Z+1;u1<L.length&&c(N.FullPaths[u1])!=c(K);++u1);Y.R=u1>=L.length?-1:u1,Y.type=1}else c(N.FullPaths[Z+1]||"")==c(K)&&(Y.R=Z+1),Y.type=2}}}function U(N,G){var R=G||{};if(R.fileType=="mad")return Wa(N,R);switch(A(N),R.fileType){case"zip":return b3(N,R)}var W=function(t1){for(var e1=0,h1=0,M1=0;M1<t1.FileIndex.length;++M1){var V1=t1.FileIndex[M1];if(V1.content){var x1=V1.content.length;x1>0&&(x1<4096?e1+=x1+63>>6:h1+=x1+511>>9)}}for(var P1=t1.FullPaths.length+3>>2,D1=e1+7>>3,Z1=e1+127>>7,E1=D1+h1+P1+Z1,Q1=E1+127>>7,b2=Q1<=109?0:Math.ceil((Q1-109)/127);E1+Q1+b2+127>>7>Q1;)b2=++Q1<=109?0:Math.ceil((Q1-109)/127);var X2=[1,b2,Q1,Z1,P1,h1,e1,0];return t1.FileIndex[0].size=e1<<6,X2[7]=(t1.FileIndex[0].start=X2[0]+X2[1]+X2[2]+X2[3]+X2[4]+X2[5])+(X2[6]+7>>3),X2}(N),Z=u3(W[7]<<9),Q=0,o1=0;{for(Q=0;Q<8;++Q)Z.write_shift(1,F[Q]);for(Q=0;Q<8;++Q)Z.write_shift(2,0);for(Z.write_shift(2,62),Z.write_shift(2,3),Z.write_shift(2,65534),Z.write_shift(2,9),Z.write_shift(2,6),Q=0;Q<3;++Q)Z.write_shift(2,0);for(Z.write_shift(4,0),Z.write_shift(4,W[2]),Z.write_shift(4,W[0]+W[1]+W[2]+W[3]-1),Z.write_shift(4,0),Z.write_shift(4,4096),Z.write_shift(4,W[3]?W[0]+W[1]+W[2]-1:j),Z.write_shift(4,W[3]),Z.write_shift(-4,W[1]?W[0]-1:j),Z.write_shift(4,W[1]),Q=0;Q<109;++Q)Z.write_shift(-4,Q<W[2]?W[1]+Q:-1)}if(W[1])for(o1=0;o1<W[1];++o1){for(;Q<236+o1*127;++Q)Z.write_shift(-4,Q<W[2]?W[1]+Q:-1);Z.write_shift(-4,o1===W[1]-1?j:o1+1)}var u1=function(t1){for(o1+=t1;Q<o1-1;++Q)Z.write_shift(-4,Q+1);t1&&(++Q,Z.write_shift(-4,j))};for(o1=Q=0,o1+=W[1];Q<o1;++Q)Z.write_shift(-4,X.DIFSECT);for(o1+=W[2];Q<o1;++Q)Z.write_shift(-4,X.FATSECT);u1(W[3]),u1(W[4]);for(var M=0,L=0,E=N.FileIndex[0];M<N.FileIndex.length;++M)E=N.FileIndex[M],E.content&&(L=E.content.length,!(L<4096)&&(E.start=o1,u1(L+511>>9)));for(u1(W[6]+7>>3);Z.l&511;)Z.write_shift(-4,X.ENDOFCHAIN);for(o1=Q=0,M=0;M<N.FileIndex.length;++M)E=N.FileIndex[M],E.content&&(L=E.content.length,!(!L||L>=4096)&&(E.start=o1,u1(L+63>>6)));for(;Z.l&511;)Z.write_shift(-4,X.ENDOFCHAIN);for(Q=0;Q<W[4]<<2;++Q){var Y=N.FullPaths[Q];if(!Y||Y.length===0){for(M=0;M<17;++M)Z.write_shift(4,0);for(M=0;M<3;++M)Z.write_shift(4,-1);for(M=0;M<12;++M)Z.write_shift(4,0);continue}E=N.FileIndex[Q],Q===0&&(E.start=E.size?E.start-1:j);var K=Q===0&&R.root||E.name;if(L=2*(K.length+1),Z.write_shift(64,K,"utf16le"),Z.write_shift(2,L),Z.write_shift(1,E.type),Z.write_shift(1,E.color),Z.write_shift(-4,E.L),Z.write_shift(-4,E.R),Z.write_shift(-4,E.C),E.clsid)Z.write_shift(16,E.clsid,"hex");else for(M=0;M<4;++M)Z.write_shift(4,0);Z.write_shift(4,E.state||0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,E.start),Z.write_shift(4,E.size),Z.write_shift(4,0)}for(Q=1;Q<N.FileIndex.length;++Q)if(E=N.FileIndex[Q],E.size>=4096)if(Z.l=E.start+1<<9,t2&&Buffer.isBuffer(E.content))E.content.copy(Z,Z.l,0,E.size),Z.l+=E.size+511&-512;else{for(M=0;M<E.size;++M)Z.write_shift(1,E.content[M]);for(;M&511;++M)Z.write_shift(1,0)}for(Q=1;Q<N.FileIndex.length;++Q)if(E=N.FileIndex[Q],E.size>0&&E.size<4096)if(t2&&Buffer.isBuffer(E.content))E.content.copy(Z,Z.l,0,E.size),Z.l+=E.size+63&-64;else{for(M=0;M<E.size;++M)Z.write_shift(1,E.content[M]);for(;M&63;++M)Z.write_shift(1,0)}if(t2)Z.l=Z.length;else for(;Z.l<Z.length;)Z.write_shift(1,0);return Z}function D(N,G){var R=N.FullPaths.map(function(M){return M.toUpperCase()}),W=R.map(function(M){var L=M.split("/");return L[L.length-(M.slice(-1)=="/"?2:1)]}),Z=!1;G.charCodeAt(0)===47?(Z=!0,G=R[0].slice(0,-1)+G):Z=G.indexOf("/")!==-1;var Q=G.toUpperCase(),o1=Z===!0?R.indexOf(Q):W.indexOf(Q);if(o1!==-1)return N.FileIndex[o1];var u1=!Q.match(n5);for(Q=Q.replace(X3,""),u1&&(Q=Q.replace(n5,"!")),o1=0;o1<R.length;++o1)if((u1?R[o1].replace(n5,"!"):R[o1]).replace(X3,"")==Q||(u1?W[o1].replace(n5,"!"):W[o1]).replace(X3,"")==Q)return N.FileIndex[o1];return null}var k=64,j=-2,c1="d0cf11e0a1b11ae1",F=[208,207,17,224,161,177,26,225],O="00000000000000000000000000000000",X={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:j,FREESECT:-1,HEADER_SIGNATURE:c1,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:O,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function f1(N,G,R){f();var W=U(N,R);l.writeFileSync(G,W)}function J(N){for(var G=new Array(N.length),R=0;R<N.length;++R)G[R]=String.fromCharCode(N[R]);return G.join("")}function v1(N,G){var R=U(N,G);switch(G&&G.type||"buffer"){case"file":return f(),l.writeFileSync(G.filename,R),R;case"binary":return typeof R=="string"?R:J(R);case"base64":return Ou(typeof R=="string"?R:J(R));case"buffer":if(t2)return Buffer.isBuffer(R)?R:F6(R);case"array":return typeof R=="string"?T4(R):R}return R}var r1;function S(N){try{var G=N.InflateRaw,R=new G;if(R._processChunk(new Uint8Array([3,0]),R._finishFlushFlag),R.bytesRead)r1=N;else throw new Error("zlib does not expose bytesRead")}catch(W){console.error("cannot use native zlib: "+(W.message||W))}}function _(N,G){if(!r1)return p1(N,G);var R=r1.InflateRaw,W=new R,Z=W._processChunk(N.slice(N.l),W._finishFlushFlag);return N.l+=W.bytesRead,Z}function P(N){return r1?r1.deflateRawSync(N):U1(N)}var q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],B=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],I=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function d1(N){var G=(N<<1|N<<11)&139536|(N<<5|N<<15)&558144;return(G>>16|G>>8|G)&255}for(var n1=typeof Uint8Array<"u",m1=n1?new Uint8Array(256):[],z1=0;z1<256;++z1)m1[z1]=d1(z1);function V(N,G){var R=m1[N&255];return G<=8?R>>>8-G:(R=R<<8|m1[N>>8&255],G<=16?R>>>16-G:(R=R<<8|m1[N>>16&255],R>>>24-G))}function g1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=6?0:N[W+1]<<8))>>>R&3}function b1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=5?0:N[W+1]<<8))>>>R&7}function i1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=4?0:N[W+1]<<8))>>>R&15}function _1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=3?0:N[W+1]<<8))>>>R&31}function a1(N,G){var R=G&7,W=G>>>3;return(N[W]|(R<=1?0:N[W+1]<<8))>>>R&127}function C1(N,G,R){var W=G&7,Z=G>>>3,Q=(1<<R)-1,o1=N[Z]>>>W;return R<8-W||(o1|=N[Z+1]<<8-W,R<16-W)||(o1|=N[Z+2]<<16-W,R<24-W)||(o1|=N[Z+3]<<24-W),o1&Q}function I1(N,G,R){var W=G&7,Z=G>>>3;return W<=5?N[Z]|=(R&7)<<W:(N[Z]|=R<<W&255,N[Z+1]=(R&7)>>8-W),G+3}function T1(N,G,R){var W=G&7,Z=G>>>3;return R=(R&1)<<W,N[Z]|=R,G+1}function g2(N,G,R){var W=G&7,Z=G>>>3;return R<<=W,N[Z]|=R&255,R>>>=8,N[Z+1]=R,G+8}function F1(N,G,R){var W=G&7,Z=G>>>3;return R<<=W,N[Z]|=R&255,R>>>=8,N[Z+1]=R&255,N[Z+2]=R>>>8,G+16}function r3(N,G){var R=N.length,W=2*R>G?2*R:G+5,Z=0;if(R>=G)return N;if(t2){var Q=Ru(W);if(N.copy)N.copy(Q);else for(;Z<N.length;++Z)Q[Z]=N[Z];return Q}else if(n1){var o1=new Uint8Array(W);if(o1.set)o1.set(N);else for(;Z<R;++Z)o1[Z]=N[Z];return o1}return N.length=W,N}function z2(N){for(var G=new Array(N),R=0;R<N;++R)G[R]=0;return G}function C3(N,G,R){var W=1,Z=0,Q=0,o1=0,u1=0,M=N.length,L=n1?new Uint16Array(32):z2(32);for(Q=0;Q<32;++Q)L[Q]=0;for(Q=M;Q<R;++Q)N[Q]=0;M=N.length;var E=n1?new Uint16Array(M):z2(M);for(Q=0;Q<M;++Q)L[Z=N[Q]]++,W<Z&&(W=Z),E[Q]=0;for(L[0]=0,Q=1;Q<=W;++Q)L[Q+16]=u1=u1+L[Q-1]<<1;for(Q=0;Q<M;++Q)u1=N[Q],u1!=0&&(E[Q]=L[u1+16]++);var Y=0;for(Q=0;Q<M;++Q)if(Y=N[Q],Y!=0)for(u1=V(E[Q],W)>>W-Y,o1=(1<<W+4-Y)-1;o1>=0;--o1)G[u1|o1<<Y]=Y&15|Q<<4;return W}var E2=n1?new Uint16Array(512):z2(512),I2=n1?new Uint16Array(32):z2(32);if(!n1){for(var $2=0;$2<512;++$2)E2[$2]=0;for($2=0;$2<32;++$2)I2[$2]=0}(function(){for(var N=[],G=0;G<32;G++)N.push(5);C3(N,I2,32);var R=[];for(G=0;G<=143;G++)R.push(8);for(;G<=255;G++)R.push(9);for(;G<=279;G++)R.push(7);for(;G<=287;G++)R.push(8);C3(R,E2,288)})();var o3=function(){for(var G=n1?new Uint8Array(32768):[],R=0,W=0;R<I.length-1;++R)for(;W<I[R+1];++W)G[W]=R;for(;W<32768;++W)G[W]=29;var Z=n1?new Uint8Array(259):[];for(R=0,W=0;R<B.length-1;++R)for(;W<B[R+1];++W)Z[W]=R;function Q(u1,M){for(var L=0;L<u1.length;){var E=Math.min(65535,u1.length-L),Y=L+E==u1.length;for(M.write_shift(1,+Y),M.write_shift(2,E),M.write_shift(2,~E&65535);E-- >0;)M[M.l++]=u1[L++]}return M.l}function o1(u1,M){for(var L=0,E=0,Y=n1?new Uint16Array(32768):[];E<u1.length;){var K=Math.min(65535,u1.length-E);if(K<10){for(L=I1(M,L,+(E+K==u1.length)),L&7&&(L+=8-(L&7)),M.l=L/8|0,M.write_shift(2,K),M.write_shift(2,~K&65535);K-- >0;)M[M.l++]=u1[E++];L=M.l*8;continue}L=I1(M,L,+(E+K==u1.length)+2);for(var t1=0;K-- >0;){var e1=u1[E];t1=(t1<<5^e1)&32767;var h1=-1,M1=0;if((h1=Y[t1])&&(h1|=E&-32768,h1>E&&(h1-=32768),h1<E))for(;u1[h1+M1]==u1[E+M1]&&M1<250;)++M1;if(M1>2){e1=Z[M1],e1<=22?L=g2(M,L,m1[e1+1]>>1)-1:(g2(M,L,3),L+=5,g2(M,L,m1[e1-23]>>5),L+=3);var V1=e1<8?0:e1-4>>2;V1>0&&(F1(M,L,M1-B[e1]),L+=V1),e1=G[E-h1],L=g2(M,L,m1[e1]>>3),L-=3;var x1=e1<4?0:e1-2>>1;x1>0&&(F1(M,L,E-h1-I[e1]),L+=x1);for(var P1=0;P1<M1;++P1)Y[t1]=E&32767,t1=(t1<<5^u1[E])&32767,++E;K-=M1-1}else e1<=143?e1=e1+48:L=T1(M,L,1),L=g2(M,L,m1[e1]),Y[t1]=E&32767,++E}L=g2(M,L,0)-1}return M.l=(L+7)/8|0,M.l}return function(M,L){return M.length<8?Q(M,L):o1(M,L)}}();function U1(N){var G=u3(50+Math.floor(N.length*1.1)),R=o3(N,G);return G.slice(0,R)}var x2=n1?new Uint16Array(32768):z2(32768),l3=n1?new Uint16Array(32768):z2(32768),d2=n1?new Uint16Array(128):z2(128),A3=1,Z4=1;function s1(N,G){var R=_1(N,G)+257;G+=5;var W=_1(N,G)+1;G+=5;var Z=i1(N,G)+4;G+=4;for(var Q=0,o1=n1?new Uint8Array(19):z2(19),u1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=1,L=n1?new Uint8Array(8):z2(8),E=n1?new Uint8Array(8):z2(8),Y=o1.length,K=0;K<Z;++K)o1[q[K]]=Q=b1(N,G),M<Q&&(M=Q),L[Q]++,G+=3;var t1=0;for(L[0]=0,K=1;K<=M;++K)E[K]=t1=t1+L[K-1]<<1;for(K=0;K<Y;++K)(t1=o1[K])!=0&&(u1[K]=E[t1]++);var e1=0;for(K=0;K<Y;++K)if(e1=o1[K],e1!=0){t1=m1[u1[K]]>>8-e1;for(var h1=(1<<7-e1)-1;h1>=0;--h1)d2[t1|h1<<e1]=e1&7|K<<3}var M1=[];for(M=1;M1.length<R+W;)switch(t1=d2[a1(N,G)],G+=t1&7,t1>>>=3){case 16:for(Q=3+g1(N,G),G+=2,t1=M1[M1.length-1];Q-- >0;)M1.push(t1);break;case 17:for(Q=3+b1(N,G),G+=3;Q-- >0;)M1.push(0);break;case 18:for(Q=11+a1(N,G),G+=7;Q-- >0;)M1.push(0);break;default:M1.push(t1),M<t1&&(M=t1);break}var V1=M1.slice(0,R),x1=M1.slice(R);for(K=R;K<286;++K)V1[K]=0;for(K=W;K<30;++K)x1[K]=0;return A3=C3(V1,x2,286),Z4=C3(x1,l3,30),G}function H1(N,G){if(N[0]==3&&!(N[1]&3))return[D0(G),2];for(var R=0,W=0,Z=Ru(G||1<<18),Q=0,o1=Z.length>>>0,u1=0,M=0;!(W&1);){if(W=b1(N,R),R+=3,W>>>1)W>>1==1?(u1=9,M=5):(R=s1(N,R),u1=A3,M=Z4);else{R&7&&(R+=8-(R&7));var L=N[R>>>3]|N[(R>>>3)+1]<<8;if(R+=32,L>0)for(!G&&o1<Q+L&&(Z=r3(Z,Q+L),o1=Z.length);L-- >0;)Z[Q++]=N[R>>>3],R+=8;continue}for(;;){!G&&o1<Q+32767&&(Z=r3(Z,Q+32767),o1=Z.length);var E=C1(N,R,u1),Y=W>>>1==1?E2[E]:x2[E];if(R+=Y&15,Y>>>=4,!(Y>>>8&255))Z[Q++]=Y;else{if(Y==256)break;Y-=257;var K=Y<8?0:Y-4>>2;K>5&&(K=0);var t1=Q+B[Y];K>0&&(t1+=C1(N,R,K),R+=K),E=C1(N,R,M),Y=W>>>1==1?I2[E]:l3[E],R+=Y&15,Y>>>=4;var e1=Y<4?0:Y-2>>1,h1=I[Y];for(e1>0&&(h1+=C1(N,R,e1),R+=e1),!G&&o1<t1&&(Z=r3(Z,t1+100),o1=Z.length);Q<t1;)Z[Q]=Z[Q-h1],++Q}}}return G?[Z,R+7>>>3]:[Z.slice(0,Q),R+7>>>3]}function p1(N,G){var R=N.slice(N.l||0),W=H1(R,G);return N.l+=W[1],W[0]}function w1(N,G){if(N)typeof console<"u"&&console.error(G);else throw new Error(G)}function k1(N,G){var R=N;V3(R,0);var W=[],Z=[],Q={FileIndex:W,FullPaths:Z};H(Q,{root:G.root});for(var o1=R.length-4;(R[o1]!=80||R[o1+1]!=75||R[o1+2]!=5||R[o1+3]!=6)&&o1>=0;)--o1;R.l=o1+4,R.l+=4;var u1=R.read_shift(2);R.l+=6;var M=R.read_shift(4);for(R.l=M,o1=0;o1<u1;++o1){R.l+=20;var L=R.read_shift(4),E=R.read_shift(4),Y=R.read_shift(2),K=R.read_shift(2),t1=R.read_shift(2);R.l+=8;var e1=R.read_shift(4),h1=s(R.slice(R.l+Y,R.l+Y+K));R.l+=Y+K+t1;var M1=R.l;R.l=e1+4,f3(R,L,E,Q,h1),R.l=M1}return Q}function f3(N,G,R,W,Z){N.l+=2;var Q=N.read_shift(2),o1=N.read_shift(2),u1=i(N);if(Q&8257)throw new Error("Unsupported ZIP encryption");for(var M=N.read_shift(4),L=N.read_shift(4),E=N.read_shift(4),Y=N.read_shift(2),K=N.read_shift(2),t1="",e1=0;e1<Y;++e1)t1+=String.fromCharCode(N[N.l++]);if(K){var h1=s(N.slice(N.l,N.l+K));(h1[21589]||{}).mt&&(u1=h1[21589].mt),((Z||{})[21589]||{}).mt&&(u1=Z[21589].mt)}N.l+=K;var M1=N.slice(N.l,N.l+L);switch(o1){case 8:M1=_(N,E);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+o1)}var V1=!1;Q&8&&(M=N.read_shift(4),M==134695760&&(M=N.read_shift(4),V1=!0),L=N.read_shift(4),E=N.read_shift(4)),L!=G&&w1(V1,"Bad compressed size: "+G+" != "+L),E!=R&&w1(V1,"Bad uncompressed size: "+R+" != "+E),K4(W,t1,M1,{unsafe:!0,mt:u1})}function b3(N,G){var R=G||{},W=[],Z=[],Q=u3(1),o1=R.compression?8:0,u1=0,M=0,L=0,E=0,Y=0,K=N.FullPaths[0],t1=K,e1=N.FileIndex[0],h1=[],M1=0;for(M=1;M<N.FullPaths.length;++M)if(t1=N.FullPaths[M].slice(K.length),e1=N.FileIndex[M],!(!e1.size||!e1.content||t1=="Sh33tJ5")){var V1=E,x1=u3(t1.length);for(L=0;L<t1.length;++L)x1.write_shift(1,t1.charCodeAt(L)&127);x1=x1.slice(0,x1.l),h1[Y]=rk1.buf(e1.content,0);var P1=e1.content;o1==8&&(P1=P(P1)),Q=u3(30),Q.write_shift(4,67324752),Q.write_shift(2,20),Q.write_shift(2,u1),Q.write_shift(2,o1),e1.mt?n(Q,e1.mt):Q.write_shift(4,0),Q.write_shift(-4,h1[Y]),Q.write_shift(4,P1.length),Q.write_shift(4,e1.content.length),Q.write_shift(2,x1.length),Q.write_shift(2,0),E+=Q.length,W.push(Q),E+=x1.length,W.push(x1),E+=P1.length,W.push(P1),Q=u3(46),Q.write_shift(4,33639248),Q.write_shift(2,0),Q.write_shift(2,20),Q.write_shift(2,u1),Q.write_shift(2,o1),Q.write_shift(4,0),Q.write_shift(-4,h1[Y]),Q.write_shift(4,P1.length),Q.write_shift(4,e1.content.length),Q.write_shift(2,x1.length),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(4,0),Q.write_shift(4,V1),M1+=Q.l,Z.push(Q),M1+=x1.length,Z.push(x1),++Y}return Q=u3(22),Q.write_shift(4,101010256),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,Y),Q.write_shift(2,Y),Q.write_shift(4,M1),Q.write_shift(4,E),Q.write_shift(2,0),l0([l0(W),l0(Z),Q])}var K3={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function He(N,G){if(N.ctype)return N.ctype;var R=N.name||"",W=R.match(/\.([^\.]+)$/);return W&&K3[W[1]]||G&&(W=(R=G).match(/[\.\\]([^\.\\])+$/),W&&K3[W[1]])?K3[W[1]]:"application/octet-stream"}function Q4(N){for(var G=Ou(N),R=[],W=0;W<G.length;W+=76)R.push(G.slice(W,W+76));return R.join(`\r
795
795
  `)+`\r
796
796
  `}function i4(N){var G=N.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(L){var E=L.charCodeAt(0).toString(16).toUpperCase();return"="+(E.length==1?"0"+E:E)});G=G.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),G.charAt(0)==`
797
797
  `&&(G="=0D"+G.slice(1)),G=G.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
@@ -828,4 +828,4 @@ A1.version="2.30.1";qs1(N2);A1.fn=L1;A1.min=Fl1;A1.max=Dl1;A1.now=Pl1;A1.utc=ve;
828
828
  `),t=o2(a.replace(/<[^>]*>/g,""));return[t]}var Eh={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function C_(e,a){var t=a||{},c=Gs(e),r=[],n,i,s={name:""},l="",f=0,u,h,d={},m=[],p=t.dense?[]:{},v,g,x={value:""},z="",C=0,y=[],b=-1,w=-1,H={s:{r:1e6,c:1e7},e:{r:0,c:0}},T=0,A={},U=[],D={},k=0,j=0,c1=[],F=1,O=1,X=[],f1={Names:[]},J={},v1=["",""],r1=[],S={},_="",P=0,q=!1,B=!1,I=0;for(la.lastIndex=0,c=c.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");v=la.exec(c);)switch(v[3]=v[3].replace(/_.*$/,"")){case"table":case"工作表":v[1]==="/"?(H.e.c>=H.s.c&&H.e.r>=H.s.r?p["!ref"]=n2(H):p["!ref"]="A1:A1",t.sheetRows>0&&t.sheetRows<=H.e.r&&(p["!fullref"]=p["!ref"],H.e.r=t.sheetRows-1,p["!ref"]=n2(H)),U.length&&(p["!merges"]=U),c1.length&&(p["!rows"]=c1),u.name=u.名称||u.name,typeof JSON<"u"&&JSON.stringify(u),m.push(u.name),d[u.name]=p,B=!1):v[0].charAt(v[0].length-2)!=="/"&&(u=$1(v[0],!1),b=w=-1,H.s.r=H.s.c=1e7,H.e.r=H.e.c=0,p=t.dense?[]:{},U=[],c1=[],B=!0);break;case"table-row-group":v[1]==="/"?--T:++T;break;case"table-row":case"行":if(v[1]==="/"){b+=F,F=1;break}if(h=$1(v[0],!1),h.行号?b=h.行号-1:b==-1&&(b=0),F=+h["number-rows-repeated"]||1,F<10)for(I=0;I<F;++I)T>0&&(c1[b+I]={level:T});w=-1;break;case"covered-table-cell":v[1]!=="/"&&++w,t.sheetStubs&&(t.dense?(p[b]||(p[b]=[]),p[b][w]={t:"z"}):p[W1({r:b,c:w})]={t:"z"}),z="",y=[];break;case"table-cell":case"数据":if(v[0].charAt(v[0].length-2)==="/")++w,x=$1(v[0],!1),O=parseInt(x["number-columns-repeated"]||"1",10),g={t:"z",v:null},x.formula&&t.cellFormula!=!1&&(g.f=_h(o2(x.formula))),(x.数据类型||x["value-type"])=="string"&&(g.t="s",g.v=o2(x["string-value"]||""),t.dense?(p[b]||(p[b]=[]),p[b][w]=g):p[W1({r:b,c:w})]=g),w+=O-1;else if(v[1]!=="/"){++w,z="",C=0,y=[],O=1;var d1=F?b+F-1:b;if(w>H.e.c&&(H.e.c=w),w<H.s.c&&(H.s.c=w),b<H.s.r&&(H.s.r=b),d1>H.e.r&&(H.e.r=d1),x=$1(v[0],!1),r1=[],S={},g={t:x.数据类型||x["value-type"],v:null},t.cellFormula)if(x.formula&&(x.formula=o2(x.formula)),x["number-matrix-columns-spanned"]&&x["number-matrix-rows-spanned"]&&(k=parseInt(x["number-matrix-rows-spanned"],10)||0,j=parseInt(x["number-matrix-columns-spanned"],10)||0,D={s:{r:b,c:w},e:{r:b+k-1,c:w+j-1}},g.F=n2(D),X.push([D,g.F])),x.formula)g.f=_h(x.formula);else for(I=0;I<X.length;++I)b>=X[I][0].s.r&&b<=X[I][0].e.r&&w>=X[I][0].s.c&&w<=X[I][0].e.c&&(g.F=X[I][1]);switch((x["number-columns-spanned"]||x["number-rows-spanned"])&&(k=parseInt(x["number-rows-spanned"],10)||0,j=parseInt(x["number-columns-spanned"],10)||0,D={s:{r:b,c:w},e:{r:b+k-1,c:w+j-1}},U.push(D)),x["number-columns-repeated"]&&(O=parseInt(x["number-columns-repeated"],10)),g.t){case"boolean":g.t="b",g.v=D2(x["boolean-value"]);break;case"float":g.t="n",g.v=parseFloat(x.value);break;case"percentage":g.t="n",g.v=parseFloat(x.value);break;case"currency":g.t="n",g.v=parseFloat(x.value);break;case"date":g.t="d",g.v=y3(x["date-value"]),t.cellDates||(g.t="n",g.v=Q3(g.v)),g.z="m/d/yy";break;case"time":g.t="n",g.v=sk1(x["time-value"])/86400,t.cellDates&&(g.t="d",g.v=$c(g.v)),g.z="HH:MM:SS";break;case"number":g.t="n",g.v=parseFloat(x.数据数值);break;default:if(g.t==="string"||g.t==="text"||!g.t)g.t="s",x["string-value"]!=null&&(z=o2(x["string-value"]),y=[]);else throw new Error("Unsupported value type "+g.t)}}else{if(q=!1,g.t==="s"&&(g.v=z||"",y.length&&(g.R=y),q=C==0),J.Target&&(g.l=J),r1.length>0&&(g.c=r1,r1=[]),z&&t.cellText!==!1&&(g.w=z),q&&(g.t="z",delete g.v),(!q||t.sheetStubs)&&!(t.sheetRows&&t.sheetRows<=b))for(var n1=0;n1<F;++n1){if(O=parseInt(x["number-columns-repeated"]||"1",10),t.dense)for(p[b+n1]||(p[b+n1]=[]),p[b+n1][w]=n1==0?g:w3(g);--O>0;)p[b+n1][w+O]=w3(g);else for(p[W1({r:b+n1,c:w})]=g;--O>0;)p[W1({r:b+n1,c:w+O})]=w3(g);H.e.c<=w&&(H.e.c=w)}O=parseInt(x["number-columns-repeated"]||"1",10),w+=O-1,O=0,g={},z="",y=[]}J={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(v[1]==="/"){if((n=r.pop())[0]!==v[3])throw"Bad state: "+n}else v[0].charAt(v[0].length-2)!=="/"&&r.push([v[3],!0]);break;case"annotation":if(v[1]==="/"){if((n=r.pop())[0]!==v[3])throw"Bad state: "+n;S.t=z,y.length&&(S.R=y),S.a=_,r1.push(S)}else v[0].charAt(v[0].length-2)!=="/"&&r.push([v[3],!1]);_="",P=0,z="",C=0,y=[];break;case"creator":v[1]==="/"?_=c.slice(P,v.index):P=v.index+v[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if(v[1]==="/"){if((n=r.pop())[0]!==v[3])throw"Bad state: "+n}else v[0].charAt(v[0].length-2)!=="/"&&r.push([v[3],!1]);z="",C=0,y=[];break;case"scientific-number":break;case"currency-symbol":break;case"currency-style":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if(v[1]==="/"){if(A[s.name]=l,(n=r.pop())[0]!==v[3])throw"Bad state: "+n}else v[0].charAt(v[0].length-2)!=="/"&&(l="",s=$1(v[0],!1),r.push([v[3],!0]));break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":case"page-layout":break;case"style":break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":switch(r[r.length-1][0]){case"time-style":case"date-style":i=$1(v[0],!1),l+=Eh[v[3]][i.style==="long"?1:0];break}break;case"fraction":break;case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(r[r.length-1][0]){case"time-style":case"date-style":i=$1(v[0],!1),l+=Eh[v[3]][i.style==="long"?1:0];break}break;case"boolean-style":break;case"boolean":break;case"text-style":break;case"text":if(v[0].slice(-2)==="/>")break;if(v[1]==="/")switch(r[r.length-1][0]){case"number-style":case"date-style":case"time-style":l+=c.slice(f,v.index);break}else f=v.index+v[0].length;break;case"named-range":i=$1(v[0],!1),v1=Or(i["cell-range-address"]);var m1={Name:i.name,Ref:v1[0]+"!"+v1[1]};B&&(m1.Sheet=m.length),f1.Names.push(m1);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":case"电子表格":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":case"文本串":if(["master-styles"].indexOf(r[r.length-1][0])>-1)break;if(v[1]==="/"&&(!x||!x["string-value"])){var z1=qD1(c.slice(C,v.index));z=(z.length>0?z+`
829
829
  `:"")+z1[0]}else $1(v[0],!1),C=v.index+v[0].length;break;case"s":break;case"database-range":if(v[1]==="/")break;try{v1=Or($1(v[0])["target-range-address"]),d[v1[0]]["!autofilter"]={ref:v1[1]}}catch{}break;case"date":break;case"object":break;case"title":case"标题":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break;case"database-ranges":break;case"filter":break;case"filter-and":break;case"filter-or":break;case"filter-condition":break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":break;case"event-listener":break;case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":break;case"properties":break;case"property":break;case"a":if(v[1]!=="/"){if(J=$1(v[0],!1),!J.href)break;J.Target=o2(J.href),delete J.href,J.Target.charAt(0)=="#"&&J.Target.indexOf(".")>-1?(v1=Or(J.Target.slice(1)),J.Target="#"+v1[0]+"!"+v1[1]):J.Target.match(/^\.\.[\\\/]/)&&(J.Target=J.Target.slice(3))}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(v[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(t.WTF)throw new Error(v)}}var V={Sheets:d,SheetNames:m,Workbook:f1};return t.bookSheets&&delete V.Sheets,V}function Fh(e,a){a=a||{},x4(e,"META-INF/manifest.xml")&&lA1(i3(e,"META-INF/manifest.xml"),a);var t=f4(e,"content.xml");if(!t)throw new Error("Missing content.xml in ODS / UOF file");var c=C_(y2(t),a);return x4(e,"meta.xml")&&(c.Props=NL(i3(e,"meta.xml"))),c}function Dh(e,a){return C_(e,a)}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function so(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function e9(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):y2(D6(e))}function a9(e){var a=e.reduce(function(r,n){return r+n.length},0),t=new Uint8Array(a),c=0;return e.forEach(function(r){t.set(r,c),c+=r.length}),t}function Ph(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>>24}function GD1(e,a){for(var t=(e[a+15]&127)<<7|e[a+14]>>1,c=e[a+14]&1,r=a+13;r>=a;--r)c=c*256+e[r];return(e[a+15]&128?-c:c)*Math.pow(10,t-6176)}function da(e,a){var t=a?a[0]:0,c=e[t]&127;e:if(e[t++]>=128&&(c|=(e[t]&127)<<7,e[t++]<128||(c|=(e[t]&127)<<14,e[t++]<128)||(c|=(e[t]&127)<<21,e[t++]<128)||(c+=(e[t]&127)*Math.pow(2,28),++t,e[t++]<128)||(c+=(e[t]&127)*Math.pow(2,35),++t,e[t++]<128)||(c+=(e[t]&127)*Math.pow(2,42),++t,e[t++]<128)))break e;return a&&(a[0]=t),c}function v3(e){var a=0,t=e[a]&127;e:if(e[a++]>=128){if(t|=(e[a]&127)<<7,e[a++]<128||(t|=(e[a]&127)<<14,e[a++]<128)||(t|=(e[a]&127)<<21,e[a++]<128))break e;t|=(e[a]&127)<<28}return t}function B3(e){for(var a=[],t=[0];t[0]<e.length;){var c=t[0],r=da(e,t),n=r&7;r=Math.floor(r/8);var i=0,s;if(r==0)break;switch(n){case 0:{for(var l=t[0];e[t[0]++]>=128;);s=e.slice(l,t[0])}break;case 5:i=4,s=e.slice(t[0],t[0]+i),t[0]+=i;break;case 1:i=8,s=e.slice(t[0],t[0]+i),t[0]+=i;break;case 2:i=da(e,t),s=e.slice(t[0],t[0]+i),t[0]+=i;break;case 3:case 4:default:throw new Error("PB Type ".concat(n," for Field ").concat(r," at offset ").concat(c))}var f={data:s,type:n};a[r]==null?a[r]=[f]:a[r].push(f)}return a}function oo(e,a){return(e==null?void 0:e.map(function(t){return a(t.data)}))||[]}function XD1(e){for(var a,t=[],c=[0];c[0]<e.length;){var r=da(e,c),n=B3(e.slice(c[0],c[0]+r));c[0]+=r;var i={id:v3(n[1][0].data),messages:[]};n[2].forEach(function(s){var l=B3(s.data),f=v3(l[3][0].data);i.messages.push({meta:l,data:e.slice(c[0],c[0]+f)}),c[0]+=f}),(a=n[3])!=null&&a[0]&&(i.merge=v3(n[3][0].data)>>>0>0),t.push(i)}return t}function ZD1(e,a){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var t=[0],c=da(a,t),r=[];t[0]<a.length;){var n=a[t[0]]&3;if(n==0){var i=a[t[0]++]>>2;if(i<60)++i;else{var s=i-59;i=a[t[0]],s>1&&(i|=a[t[0]+1]<<8),s>2&&(i|=a[t[0]+2]<<16),s>3&&(i|=a[t[0]+3]<<24),i>>>=0,i++,t[0]+=s}r.push(a.slice(t[0],t[0]+i)),t[0]+=i;continue}else{var l=0,f=0;if(n==1?(f=(a[t[0]]>>2&7)+4,l=(a[t[0]++]&224)<<3,l|=a[t[0]++]):(f=(a[t[0]++]>>2)+1,n==2?(l=a[t[0]]|a[t[0]+1]<<8,t[0]+=2):(l=(a[t[0]]|a[t[0]+1]<<8|a[t[0]+2]<<16|a[t[0]+3]<<24)>>>0,t[0]+=4)),r=[a9(r)],l==0)throw new Error("Invalid offset 0");if(l>r[0].length)throw new Error("Invalid offset beyond length");if(f>=l)for(r.push(r[0].slice(-l)),f-=l;f>=r[r.length-1].length;)r.push(r[r.length-1]),f-=r[r.length-1].length;r.push(r[0].slice(-l,-l+f))}}var u=a9(r);if(u.length!=c)throw new Error("Unexpected length: ".concat(u.length," != ").concat(c));return u}function QD1(e){for(var a=[],t=0;t<e.length;){var c=e[t++],r=e[t]|e[t+1]<<8|e[t+2]<<16;t+=3,a.push(ZD1(c,e.slice(t,t+r))),t+=r}if(t!==e.length)throw new Error("data is not a valid framed stream!");return a9(a)}function KD1(e,a,t,c){var r=so(e),n=r.getUint32(4,!0),i=(c>1?12:8)+Ph(n&(c>1?3470:398))*4,s=-1,l=-1,f=NaN,u=new Date(2001,0,1);n&512&&(s=r.getUint32(i,!0),i+=4),i+=Ph(n&(c>1?12288:4096))*4,n&16&&(l=r.getUint32(i,!0),i+=4),n&32&&(f=r.getFloat64(i,!0),i+=8),n&64&&(u.setTime(u.getTime()+r.getFloat64(i,!0)*1e3),i+=8);var h;switch(e[2]){case 0:break;case 2:h={t:"n",v:f};break;case 3:h={t:"s",v:a[l]};break;case 5:h={t:"d",v:u};break;case 6:h={t:"b",v:f>0};break;case 7:h={t:"n",v:f/86400};break;case 8:h={t:"e",v:0};break;case 9:if(s>-1)h={t:"s",v:t[s]};else if(l>-1)h={t:"s",v:a[l]};else if(!isNaN(f))h={t:"n",v:f};else throw new Error("Unsupported cell type ".concat(e.slice(0,4)));break;default:throw new Error("Unsupported cell type ".concat(e.slice(0,4)))}return h}function JD1(e,a,t){var c=so(e),r=c.getUint32(8,!0),n=12,i=-1,s=-1,l=NaN,f=NaN,u=new Date(2001,0,1);r&1&&(l=GD1(e,n),n+=16),r&2&&(f=c.getFloat64(n,!0),n+=8),r&4&&(u.setTime(u.getTime()+c.getFloat64(n,!0)*1e3),n+=8),r&8&&(s=c.getUint32(n,!0),n+=4),r&16&&(i=c.getUint32(n,!0),n+=4);var h;switch(e[1]){case 0:break;case 2:h={t:"n",v:l};break;case 3:h={t:"s",v:a[s]};break;case 5:h={t:"d",v:u};break;case 6:h={t:"b",v:f>0};break;case 7:h={t:"n",v:f/86400};break;case 8:h={t:"e",v:0};break;case 9:if(i>-1)h={t:"s",v:t[i]};else throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(r&31," : ").concat(e.slice(0,4)));break;case 10:h={t:"n",v:l};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(r&31," : ").concat(e.slice(0,4)))}return h}function eP1(e,a,t){switch(e[0]){case 0:case 1:case 2:case 3:return KD1(e,a,t,e[0]);case 5:return JD1(e,a,t);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function L0(e){var a=B3(e);return da(a[1][0].data)}function Bh(e,a){var t=B3(a.data),c=v3(t[1][0].data),r=t[3],n=[];return(r||[]).forEach(function(i){var s=B3(i.data),l=v3(s[1][0].data)>>>0;switch(c){case 1:n[l]=e9(s[3][0].data);break;case 8:{var f=e[L0(s[9][0].data)][0],u=B3(f.data),h=e[L0(u[1][0].data)][0],d=v3(h.meta[1][0].data);if(d!=2001)throw new Error("2000 unexpected reference to ".concat(d));var m=B3(h.data);n[l]=m[3].map(function(p){return e9(p.data)}).join("")}break}}),n}function aP1(e,a){var t,c,r,n,i,s,l,f,u,h,d,m,p,v,g=B3(e),x=v3(g[1][0].data)>>>0,z=v3(g[2][0].data)>>>0,C=((c=(t=g[8])==null?void 0:t[0])==null?void 0:c.data)&&v3(g[8][0].data)>0||!1,y,b;if((n=(r=g[7])==null?void 0:r[0])!=null&&n.data&&a!=0)y=(s=(i=g[7])==null?void 0:i[0])==null?void 0:s.data,b=(f=(l=g[6])==null?void 0:l[0])==null?void 0:f.data;else if((h=(u=g[4])==null?void 0:u[0])!=null&&h.data&&a!=1)y=(m=(d=g[4])==null?void 0:d[0])==null?void 0:m.data,b=(v=(p=g[3])==null?void 0:p[0])==null?void 0:v.data;else throw"NUMBERS Tile missing ".concat(a," cell storage");for(var w=C?4:1,H=so(y),T=[],A=0;A<y.length/2;++A){var U=H.getUint16(A*2,!0);U<65535&&T.push([A,U])}if(T.length!=z)throw"Expected ".concat(z," cells, found ").concat(T.length);var D=[];for(A=0;A<T.length-1;++A)D[T[A][0]]=b.subarray(T[A][1]*w,T[A+1][1]*w);return T.length>=1&&(D[T[T.length-1][0]]=b.subarray(T[T.length-1][1]*w)),{R:x,cells:D}}function tP1(e,a){var t,c=B3(a.data),r=(t=c==null?void 0:c[7])!=null&&t[0]?v3(c[7][0].data)>>>0>0?1:0:-1,n=oo(c[5],function(i){return aP1(i,r)});return{nrows:v3(c[4][0].data)>>>0,data:n.reduce(function(i,s){return i[s.R]||(i[s.R]=[]),s.cells.forEach(function(l,f){if(i[s.R][f])throw new Error("Duplicate cell r=".concat(s.R," c=").concat(f));i[s.R][f]=l}),i},[])}}function cP1(e,a,t){var c,r=B3(a.data),n={s:{r:0,c:0},e:{r:0,c:0}};if(n.e.r=(v3(r[6][0].data)>>>0)-1,n.e.r<0)throw new Error("Invalid row varint ".concat(r[6][0].data));if(n.e.c=(v3(r[7][0].data)>>>0)-1,n.e.c<0)throw new Error("Invalid col varint ".concat(r[7][0].data));t["!ref"]=n2(n);var i=B3(r[4][0].data),s=Bh(e,e[L0(i[4][0].data)][0]),l=(c=i[17])!=null&&c[0]?Bh(e,e[L0(i[17][0].data)][0]):[],f=B3(i[3][0].data),u=0;f[1].forEach(function(h){var d=B3(h.data),m=e[L0(d[2][0].data)][0],p=v3(m.meta[1][0].data);if(p!=6002)throw new Error("6001 unexpected reference to ".concat(p));var v=tP1(e,m);v.data.forEach(function(g,x){g.forEach(function(z,C){var y=W1({r:u+x,c:C}),b=eP1(z,s,l);b&&(t[y]=b)})}),u+=v.nrows})}function rP1(e,a){var t=B3(a.data),c={"!ref":"A1"},r=e[L0(t[2][0].data)],n=v3(r[0].meta[1][0].data);if(n!=6001)throw new Error("6000 unexpected reference to ".concat(n));return cP1(e,r[0],c),c}function nP1(e,a){var t,c=B3(a.data),r={name:(t=c[1])!=null&&t[0]?e9(c[1][0].data):"",sheets:[]},n=oo(c[2],L0);return n.forEach(function(i){e[i].forEach(function(s){var l=v3(s.meta[1][0].data);l==6e3&&r.sheets.push(rP1(e,s))})}),r}function iP1(e,a){var t=uo(),c=B3(a.data),r=oo(c[1],L0);if(r.forEach(function(n){e[n].forEach(function(i){var s=v3(i.meta[1][0].data);if(s==2){var l=nP1(e,i);l.sheets.forEach(function(f,u){ho(t,f,u==0?l.name:l.name+"_"+u,!0)})}})}),t.SheetNames.length==0)throw new Error("Empty NUMBERS file");return t}function Ir(e){var a,t,c,r,n={},i=[];if(e.FullPaths.forEach(function(l){if(l.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(l){if(l.name.match(/\.iwa$/)){var f;try{f=QD1(l.content)}catch(h){return console.log("?? "+l.content.length+" "+(h.message||h))}var u;try{u=XD1(f)}catch(h){return console.log("## "+(h.message||h))}u.forEach(function(h){n[h.id]=h.messages,i.push(h.id)})}}),!i.length)throw new Error("File has no messages");var s=((r=(c=(t=(a=n==null?void 0:n[1])==null?void 0:a[0])==null?void 0:t.meta)==null?void 0:c[1])==null?void 0:r[0].data)&&v3(n[1][0].meta[1][0].data)==1&&n[1][0];if(s||i.forEach(function(l){n[l].forEach(function(f){var u=v3(f.meta[1][0].data)>>>0;if(u==1)if(!s)s=f;else throw new Error("Document has multiple roots")})}),!s)throw new Error("Cannot find Document root");return iP1(n,s)}function sP1(e){return function(t){for(var c=0;c!=e.length;++c){var r=e[c];t[r[0]]===void 0&&(t[r[0]]=r[1]),r[2]==="n"&&(t[r[0]]=Number(t[r[0]]))}}}function lo(e){sP1([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}function oP1(e){return a8.WS.indexOf(e)>-1?"sheet":e==a8.CS?"chart":e==a8.DS?"dialog":e==a8.MS?"macro":e&&e.length?e:"sheet"}function lP1(e,a){if(!e)return 0;try{e=a.map(function(c){return c.id||(c.id=c.strRelID),[c.name,e["!id"][c.id].Target,oP1(e["!id"][c.id].Type)]})}catch{return null}return!e||e.length===0?null:e}function fP1(e,a,t,c,r,n,i,s,l,f,u,h){try{n[c]=_5(f4(e,t,!0),a);var d=i3(e,a),m;switch(s){case"sheet":m=vD1(d,a,r,l,n[c],f,u,h);break;case"chart":if(m=gD1(d,a,r,l,n[c],f,u,h),!m||!m["!drawel"])break;var p=i5(m["!drawel"].Target,a),v=Xn(p),g=pT1(f4(e,p,!0),_5(f4(e,v,!0),p)),x=i5(g,p),z=Xn(x);m=JF1(f4(e,x,!0),x,l,_5(f4(e,z,!0),x),f,m);break;case"macro":m=xD1(d,a,r,l,n[c],f,u,h);break;case"dialog":m=CD1(d,a,r,l,n[c],f,u,h);break;default:throw new Error("Unrecognized sheet type "+s)}i[c]=m;var C=[];n&&n[c]&&pe(n[c]).forEach(function(y){var b="";if(n[c][y].Type==a8.CMNT){b=i5(n[c][y].Target,a);var w=yD1(i3(e,b,!0),b,l);if(!w||!w.length)return;yh(m,w,!1)}n[c][y].Type==a8.TCMNT&&(b=i5(n[c][y].Target,a),C=C.concat(gT1(i3(e,b,!0),l)))}),C&&C.length&&yh(m,C,!0,l.people||[])}catch(y){if(l.WTF)throw y}}function v4(e){return e.charAt(0)=="/"?e.slice(1):e}function uP1(e,a){if(tL(),a=a||{},lo(a),x4(e,"META-INF/manifest.xml")||x4(e,"objectdata.xml"))return Fh(e,a);if(x4(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(typeof Ir<"u"){if(e.FileIndex)return Ir(e);var t=r2.utils.cfb_new();return Zu(e).forEach(function(c1){hk1(t,c1,oL(e,c1))}),Ir(t)}throw new Error("Unsupported NUMBERS file")}if(!x4(e,"[Content_Types].xml"))throw x4(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):x4(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var c=Zu(e),r=sA1(f4(e,"[Content_Types].xml")),n=!1,i,s;if(r.workbooks.length===0&&(s="xl/workbook.xml",i3(e,s,!0)&&r.workbooks.push(s)),r.workbooks.length===0){if(s="xl/workbook.bin",!i3(e,s,!0))throw new Error("Could not find workbook");r.workbooks.push(s),n=!0}r.workbooks[0].slice(-3)=="bin"&&(n=!0);var l={},f={};if(!a.bookSheets&&!a.bookProps){if(S5=[],r.sst)try{S5=HD1(i3(e,v4(r.sst)),r.sst,a)}catch(c1){if(a.WTF)throw c1}a.cellStyles&&r.themes.length&&(l=MD1(f4(e,r.themes[0].replace(/^\//,""),!0)||"",r.themes[0],a)),r.style&&(f=zD1(i3(e,v4(r.style)),r.style,l,a))}r.links.map(function(c1){try{var F=_5(f4(e,Xn(v4(c1))),c1);return VD1(i3(e,v4(c1)),F,c1,a)}catch{}});var u=pD1(i3(e,v4(r.workbooks[0])),r.workbooks[0],a),h={},d="";r.coreprops.length&&(d=i3(e,v4(r.coreprops[0]),!0),d&&(h=NL(d)),r.extprops.length!==0&&(d=i3(e,v4(r.extprops[0]),!0),d&&hA1(d,h,a)));var m={};(!a.bookSheets||a.bookProps)&&r.custprops.length!==0&&(d=f4(e,v4(r.custprops[0]),!0),d&&(m=mA1(d,a)));var p={};if((a.bookSheets||a.bookProps)&&(u.Sheets?i=u.Sheets.map(function(F){return F.name}):h.Worksheets&&h.SheetNames.length>0&&(i=h.SheetNames),a.bookProps&&(p.Props=h,p.Custprops=m),a.bookSheets&&typeof i<"u"&&(p.SheetNames=i),a.bookSheets?p.SheetNames:a.bookProps))return p;i={};var v={};a.bookDeps&&r.calcchain&&(v=bD1(i3(e,v4(r.calcchain)),r.calcchain));var g=0,x={},z,C;{var y=u.Sheets;h.Worksheets=y.length,h.SheetNames=[];for(var b=0;b!=y.length;++b)h.SheetNames[b]=y[b].name}var w=n?"bin":"xml",H=r.workbooks[0].lastIndexOf("/"),T=(r.workbooks[0].slice(0,H+1)+"_rels/"+r.workbooks[0].slice(H+1)+".rels").replace(/^\//,"");x4(e,T)||(T="xl/_rels/workbook."+w+".rels");var A=_5(f4(e,T,!0),T.replace(/_rels.*/,"s5s"));(r.metadata||[]).length>=1&&(a.xlmeta=wD1(i3(e,v4(r.metadata[0])),r.metadata[0],a)),(r.people||[]).length>=1&&(a.people=xT1(i3(e,v4(r.people[0])),a)),A&&(A=lP1(A,u.Sheets));var U=i3(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(g=0;g!=h.Worksheets;++g){var D="sheet";if(A&&A[g]?(z="xl/"+A[g][1].replace(/[\/]?xl\//,""),x4(e,z)||(z=A[g][1]),x4(e,z)||(z=T.replace(/_rels\/.*$/,"")+A[g][1]),D=A[g][2]):(z="xl/worksheets/sheet"+(g+1-U)+"."+w,z=z.replace(/sheet0\./,"sheet.")),C=z.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),a&&a.sheets!=null)switch(typeof a.sheets){case"number":if(g!=a.sheets)continue e;break;case"string":if(h.SheetNames[g].toLowerCase()!=a.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(a.sheets)){for(var k=!1,j=0;j!=a.sheets.length;++j)typeof a.sheets[j]=="number"&&a.sheets[j]==g&&(k=1),typeof a.sheets[j]=="string"&&a.sheets[j].toLowerCase()==h.SheetNames[g].toLowerCase()&&(k=1);if(!k)continue e}}fP1(e,z,C,h.SheetNames[g],g,x,i,D,a,u,l,f)}return p={Directory:r,Workbook:u,Props:h,Custprops:m,Deps:v,Sheets:i,SheetNames:h.SheetNames,Strings:S5,Styles:f,Themes:l,SSF:w3(j1)},a&&a.bookFiles&&(e.files?(p.keys=c,p.files=e.files):(p.keys=[],p.files={},e.FullPaths.forEach(function(c1,F){c1=c1.replace(/^Root Entry[\/]/,""),p.keys.push(c1),p.files[c1]=e.FileIndex[F]}))),a&&a.bookVBA&&(r.vba.length>0?p.vbaraw=i3(e,v4(r.vba[0]),!0):r.defaults&&r.defaults.bin===HT1&&(p.vbaraw=i3(e,"xl/vbaProject.bin",!0))),p}function hP1(e,a){var t=a||{},c="Workbook",r=r2.find(e,c);try{if(c="/!DataSpaces/Version",r=r2.find(e,c),!r||!r.content)throw new Error("ECMA-376 Encrypted file missing "+c);if(rN1(r.content),c="/!DataSpaces/DataSpaceMap",r=r2.find(e,c),!r||!r.content)throw new Error("ECMA-376 Encrypted file missing "+c);var n=iN1(r.content);if(n.length!==1||n[0].comps.length!==1||n[0].comps[0].t!==0||n[0].name!=="StrongEncryptionDataSpace"||n[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+c);if(c="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",r=r2.find(e,c),!r||!r.content)throw new Error("ECMA-376 Encrypted file missing "+c);var i=sN1(r.content);if(i.length!=1||i[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+c);if(c="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",r=r2.find(e,c),!r||!r.content)throw new Error("ECMA-376 Encrypted file missing "+c);lN1(r.content)}catch{}if(c="/EncryptionInfo",r=r2.find(e,c),!r||!r.content)throw new Error("ECMA-376 Encrypted file missing "+c);var s=fN1(r.content);if(c="/EncryptedPackage",r=r2.find(e,c),!r||!r.content)throw new Error("ECMA-376 Encrypted file missing "+c);if(s[0]==4&&typeof decrypt_agile<"u")return decrypt_agile(s[1],r.content,t.password||"",t);if(s[0]==2&&typeof decrypt_std76<"u")return decrypt_std76(s[1],r.content,t.password||"",t);throw new Error("File is password-protected")}function fo(e,a){var t="";switch((a||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":t=h4(e.slice(0,12));break;case"binary":t=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(a&&a.type||"undefined"))}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3),t.charCodeAt(4),t.charCodeAt(5),t.charCodeAt(6),t.charCodeAt(7)]}function dP1(e,a){return r2.find(e,"EncryptedPackage")?hP1(e,a):v_(e,a)}function mP1(e,a){var t,c=e,r=a||{};return r.type||(r.type=t2&&Buffer.isBuffer(e)?"buffer":"base64"),t=lL(c,r),uP1(t,r)}function z_(e,a){var t=0;e:for(;t<e.length;)switch(e.charCodeAt(t)){case 10:case 13:case 32:++t;break;case 60:return Kn(e.slice(t),a);default:break e}return fa.to_workbook(e,a)}function pP1(e,a){var t="",c=fo(e,a);switch(a.type){case"base64":t=h4(e);break;case"binary":t=e;break;case"buffer":t=e.toString("binary");break;case"array":t=w6(e);break;default:throw new Error("Unrecognized type "+a.type)}return c[0]==239&&c[1]==187&&c[2]==191&&(t=y2(t)),a.type="binary",z_(t,a)}function vP1(e,a){var t=e;return a.type=="base64"&&(t=h4(t)),t=o0.utils.decode(1200,t.slice(2),"str"),a.type="binary",z_(t,a)}function gP1(e){return e.match(/[^\x00-\x7F]/)?s5(e):e}function $r(e,a,t,c){return c?(t.type="string",fa.to_workbook(e,t)):fa.to_workbook(a,t)}function t9(e,a){Ww();var t=a||{};if(typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer)return t9(new Uint8Array(e),(t=w3(t),t.type="array",t));typeof Uint8Array<"u"&&e instanceof Uint8Array&&!t.type&&(t.type=typeof Deno<"u"?"buffer":"array");var c=e,r=[0,0,0,0],n=!1;if(t.cellStyles&&(t.cellNF=!0,t.sheetStubs=!0),f8={},t.dateNF&&(f8.dateNF=t.dateNF),t.type||(t.type=t2&&Buffer.isBuffer(e)?"buffer":"base64"),t.type=="file"&&(t.type=t2?"buffer":"binary",c=nk1(e),typeof Uint8Array<"u"&&!t2&&(t.type="array")),t.type=="string"&&(n=!0,t.type="binary",t.codepage=65001,c=gP1(e)),t.type=="array"&&typeof Uint8Array<"u"&&e instanceof Uint8Array&&typeof ArrayBuffer<"u"){var i=new ArrayBuffer(3),s=new Uint8Array(i);if(s.foo="bar",!s.foo)return t=w3(t),t.type="array",t9($s(c),t)}switch((r=fo(c,t))[0]){case 208:if(r[1]===207&&r[2]===17&&r[3]===224&&r[4]===161&&r[5]===177&&r[6]===26&&r[7]===225)return dP1(r2.read(c,t),t);break;case 9:if(r[1]<=8)return v_(c,t);break;case 60:return Kn(c,t);case 73:if(r[1]===73&&r[2]===42&&r[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(r[1]===68)return YS1(c,t);break;case 84:if(r[1]===65&&r[2]===66&&r[3]===76)return US1.to_workbook(c,t);break;case 80:return r[1]===75&&r[2]<9&&r[3]<9?mP1(c,t):$r(e,c,t,n);case 239:return r[3]===60?Kn(c,t):$r(e,c,t,n);case 255:if(r[1]===254)return vP1(c,t);if(r[1]===0&&r[2]===2&&r[3]===0)return A5.to_workbook(c,t);break;case 0:if(r[1]===0&&(r[2]>=2&&r[3]===0||r[2]===0&&(r[3]===8||r[3]===9)))return A5.to_workbook(c,t);break;case 3:case 131:case 139:case 140:return Hh.to_workbook(c,t);case 123:if(r[1]===92&&r[2]===114&&r[3]===116)return HN1.to_workbook(c,t);break;case 10:case 13:case 32:return pP1(c,t);case 137:if(r[1]===80&&r[2]===78&&r[3]===71)throw new Error("PNG Image File is not a spreadsheet");break}return IS1.indexOf(r[0])>-1&&r[2]<=12&&r[3]<=31?Hh.to_workbook(c,t):$r(e,c,t,n)}function xP1(e,a,t,c,r,n,i,s){var l=L3(t),f=s.defval,u=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw"),h=!0,d=r===1?[]:{};if(r!==1)if(Object.defineProperty)try{Object.defineProperty(d,"__rowNum__",{value:t,enumerable:!1})}catch{d.__rowNum__=t}else d.__rowNum__=t;if(!i||e[t])for(var m=a.s.c;m<=a.e.c;++m){var p=i?e[t][m]:e[c[m]+l];if(p===void 0||p.t===void 0){if(f===void 0)continue;n[m]!=null&&(d[n[m]]=f);continue}var v=p.v;switch(p.t){case"z":if(v==null)break;continue;case"e":v=v==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+p.t)}if(n[m]!=null){if(v==null)if(p.t=="e"&&v===null)d[n[m]]=null;else if(f!==void 0)d[n[m]]=f;else if(u&&v===null)d[n[m]]=null;else continue;else d[n[m]]=u&&(p.t!=="n"||p.t==="n"&&s.rawNumbers!==!1)?v:Ge(p,v,s);v!=null&&(h=!1)}}return{row:d,isempty:h}}function c9(e,a){if(e==null||e["!ref"]==null)return[];var t={t:"n",v:0},c=0,r=1,n=[],i=0,s="",l={s:{r:0,c:0},e:{r:0,c:0}},f=a||{},u=f.range!=null?f.range:e["!ref"];switch(f.header===1?c=1:f.header==="A"?c=2:Array.isArray(f.header)?c=3:f.header==null&&(c=0),typeof u){case"string":l=G2(u);break;case"number":l=G2(e["!ref"]),l.s.r=u;break;default:l=u}c>0&&(r=0);var h=L3(l.s.r),d=[],m=[],p=0,v=0,g=Array.isArray(e),x=l.s.r,z=0,C={};g&&!e[x]&&(e[x]=[]);var y=f.skipHidden&&e["!cols"]||[],b=f.skipHidden&&e["!rows"]||[];for(z=l.s.c;z<=l.e.c;++z)if(!(y[z]||{}).hidden)switch(d[z]=p3(z),t=g?e[x][z]:e[d[z]+h],c){case 1:n[z]=z-l.s.c;break;case 2:n[z]=d[z];break;case 3:n[z]=f.header[z-l.s.c];break;default:if(t==null&&(t={w:"__EMPTY",t:"s"}),s=i=Ge(t,null,f),v=C[i]||0,!v)C[i]=1;else{do s=i+"_"+v++;while(C[s]);C[i]=v,C[s]=1}n[z]=s}for(x=l.s.r+r;x<=l.e.r;++x)if(!(b[x]||{}).hidden){var w=xP1(e,l,x,d,c,n,g,f);(w.isempty===!1||(c===1?f.blankrows!==!1:f.blankrows))&&(m[p++]=w.row)}return m.length=p,m}var Oh=/"/g;function CP1(e,a,t,c,r,n,i,s){for(var l=!0,f=[],u="",h=L3(t),d=a.s.c;d<=a.e.c;++d)if(c[d]){var m=s.dense?(e[t]||[])[d]:e[c[d]+h];if(m==null)u="";else if(m.v!=null){l=!1,u=""+(s.rawNumbers&&m.t=="n"?m.v:Ge(m,null,s));for(var p=0,v=0;p!==u.length;++p)if((v=u.charCodeAt(p))===r||v===n||v===34||s.forceQuotes){u='"'+u.replace(Oh,'""')+'"';break}u=="ID"&&(u='"ID"')}else m.f!=null&&!m.F?(l=!1,u="="+m.f,u.indexOf(",")>=0&&(u='"'+u.replace(Oh,'""')+'"')):u="";f.push(u)}return s.blankrows===!1&&l?null:f.join(i)}function M_(e,a){var t=[],c=a??{};if(e==null||e["!ref"]==null)return"";var r=G2(e["!ref"]),n=c.FS!==void 0?c.FS:",",i=n.charCodeAt(0),s=c.RS!==void 0?c.RS:`
830
830
  `,l=s.charCodeAt(0),f=new RegExp((n=="|"?"\\|":n)+"+$"),u="",h=[];c.dense=Array.isArray(e);for(var d=c.skipHidden&&e["!cols"]||[],m=c.skipHidden&&e["!rows"]||[],p=r.s.c;p<=r.e.c;++p)(d[p]||{}).hidden||(h[p]=p3(p));for(var v=0,g=r.s.r;g<=r.e.r;++g)(m[g]||{}).hidden||(u=CP1(e,r,g,h,i,l,n,c),u!=null&&(c.strip&&(u=u.replace(f,"")),(u||c.blankrows!==!1)&&t.push((v++?s:"")+u)));return delete c.dense,t.join("")}function zP1(e,a){a||(a={}),a.FS=" ",a.RS=`
831
- `;var t=M_(e,a);return t}function MP1(e){var a="",t,c="";if(e==null||e["!ref"]==null)return[];var r=G2(e["!ref"]),n="",i=[],s,l=[],f=Array.isArray(e);for(s=r.s.c;s<=r.e.c;++s)i[s]=p3(s);for(var u=r.s.r;u<=r.e.r;++u)for(n=L3(u),s=r.s.c;s<=r.e.c;++s)if(a=i[s]+n,t=f?(e[u]||[])[s]:e[a],c="",t!==void 0){if(t.F!=null){if(a=t.F,!t.f)continue;c=t.f,a.indexOf(":")==-1&&(a=a+":"+a)}if(t.f!=null)c=t.f;else{if(t.t=="z")continue;if(t.t=="n"&&t.v!=null)c=""+t.v;else if(t.t=="b")c=t.v?"TRUE":"FALSE";else if(t.w!==void 0)c="'"+t.w;else{if(t.v===void 0)continue;t.t=="s"?c="'"+t.v:c=""+t.v}}l[l.length]=a+"="+c}return l}function H_(e,a,t){var c=t||{},r=+!c.skipHeader,n=e||{},i=0,s=0;if(n&&c.origin!=null)if(typeof c.origin=="number")i=c.origin;else{var l=typeof c.origin=="string"?G3(c.origin):c.origin;i=l.r,s=l.c}var f,u={s:{c:0,r:0},e:{c:s,r:i+a.length-1+r}};if(n["!ref"]){var h=G2(n["!ref"]);u.e.c=Math.max(u.e.c,h.e.c),u.e.r=Math.max(u.e.r,h.e.r),i==-1&&(i=h.e.r+1,u.e.r=i+a.length-1+r)}else i==-1&&(i=0,u.e.r=a.length-1+r);var d=c.header||[],m=0;a.forEach(function(v,g){pe(v).forEach(function(x){(m=d.indexOf(x))==-1&&(d[m=d.length]=x);var z=v[x],C="z",y="",b=W1({c:s+m,r:i+g+r});f=ma(n,b),z&&typeof z=="object"&&!(z instanceof Date)?n[b]=z:(typeof z=="number"?C="n":typeof z=="boolean"?C="b":typeof z=="string"?C="s":z instanceof Date?(C="d",c.cellDates||(C="n",z=Q3(z)),y=c.dateNF||j1[14]):z===null&&c.nullError&&(C="e",z=0),f?(f.t=C,f.v=z,delete f.w,delete f.R,y&&(f.z=y)):n[b]=f={t:C,v:z},y&&(f.z=y))})}),u.e.c=Math.max(u.e.c,s+d.length-1);var p=L3(i);if(r)for(m=0;m<d.length;++m)n[p3(m+s)+p]={t:"s",v:d[m]};return n["!ref"]=n2(u),n}function HP1(e,a){return H_(null,e,a)}function ma(e,a,t){if(typeof a=="string"){if(Array.isArray(e)){var c=G3(a);return e[c.r]||(e[c.r]=[]),e[c.r][c.c]||(e[c.r][c.c]={t:"z"})}return e[a]||(e[a]={t:"z"})}return typeof a!="number"?ma(e,W1(a)):ma(e,W1({r:a,c:t||0}))}function yP1(e,a){if(typeof a=="number"){if(a>=0&&e.SheetNames.length>a)return a;throw new Error("Cannot find sheet # "+a)}else if(typeof a=="string"){var t=e.SheetNames.indexOf(a);if(t>-1)return t;throw new Error("Cannot find sheet name |"+a+"|")}else throw new Error("Cannot find sheet |"+a+"|")}function uo(){return{SheetNames:[],Sheets:{}}}function ho(e,a,t,c){var r=1;if(!t)for(;r<=65535&&e.SheetNames.indexOf(t="Sheet"+r)!=-1;++r,t=void 0);if(!t||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(c&&e.SheetNames.indexOf(t)>=0){var n=t.match(/(^.*?)(\d+)$/);r=n&&+n[2]||0;var i=n&&n[1]||t;for(++r;r<=65535&&e.SheetNames.indexOf(t=i+r)!=-1;++r);}if(sD1(t),e.SheetNames.indexOf(t)>=0)throw new Error("Worksheet with name |"+t+"| already exists!");return e.SheetNames.push(t),e.Sheets[t]=a,t}function bP1(e,a,t){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var c=yP1(e,a);switch(e.Workbook.Sheets[c]||(e.Workbook.Sheets[c]={}),t){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+t)}e.Workbook.Sheets[c].Hidden=t}function VP1(e,a){return e.z=a,e}function y_(e,a,t){return a?(e.l={Target:a},t&&(e.l.Tooltip=t)):delete e.l,e}function wP1(e,a,t){return y_(e,"#"+a,t)}function LP1(e,a,t){e.c||(e.c=[]),e.c.push({t:a,a:t||"SheetJS"})}function _P1(e,a,t,c){for(var r=typeof a!="string"?a:G2(a),n=typeof a=="string"?a:n2(a),i=r.s.r;i<=r.e.r;++i)for(var s=r.s.c;s<=r.e.c;++s){var l=ma(e,i,s);l.t="n",l.F=n,delete l.v,i==r.s.r&&s==r.s.c&&(l.f=t,c&&(l.D=!0))}return e}var kP1={encode_col:p3,encode_row:L3,encode_cell:W1,encode_range:n2,decode_col:Qs,decode_row:Zs,split_cell:Rk1,decode_cell:G3,decode_range:T8,format_cell:Ge,sheet_add_aoa:LL,sheet_add_json:H_,sheet_add_dom:g_,aoa_to_sheet:E8,json_to_sheet:HP1,table_to_sheet:x_,table_to_book:YD1,sheet_to_csv:M_,sheet_to_txt:zP1,sheet_to_json:c9,sheet_to_html:WD1,sheet_to_formulae:MP1,sheet_to_row_object_array:c9,sheet_get_cell:ma,book_new:uo,book_append_sheet:ho,book_set_sheet_visibility:bP1,cell_set_number_format:VP1,cell_set_hyperlink:y_,cell_set_internal_link:wP1,cell_add_comment:LP1,sheet_set_array_formula:_P1,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const AP1=o.defineComponent({__name:"PgaInputFileExcel",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{},excelConfig:{}},{isReadingFile:{type:Boolean,default:!1},isReadingFileModifiers:{}}),emits:o.mergeModels(["newFile","newFileRead"],["update:isReadingFile"]),setup(e,{expose:a,emit:t}){const c=o.useModel(e,"isReadingFile"),r=e,n=t;a({resetInput:s});const i=o.ref();function s(){var f;(f=i.value)==null||f.resetInput()}function l(f){if(n("newFile",f),r.excelConfig){if(!f){n("newFileRead",[]);return}const u=new FileReader;u.onload=function(h){var d;try{c.value=!0;const m=new Uint8Array((d=h.target)==null?void 0:d.result),p=t9(m,{type:"array"}),v=p.SheetNames[0],g=p.Sheets[v],x=r.excelConfig.columns,z=Math.max(...Object.values(x)),C=Array(z).map((b,w)=>`empty${w+1}`);Object.entries(x).forEach(([b,w])=>C[w-1]=b);const y=kP1.sheet_to_json(g,{header:C,range:r.excelConfig.firstRow-1});n("newFileRead",y)}finally{c.value=!1}},u.readAsArrayBuffer(f)}}return(f,u)=>(o.openBlock(),o.createBlock(Os,{ref_key:"inputFileRef",ref:i,label:f.label,withOptionalLabel:f.withOptionalLabel,withLabelSpace:f.withLabelSpace,errors:f.errors,disabled:f.disabled,grow:f.grow,acceptedFormats:["xls","xlsx"],onNewFile:u[0]||(u[0]=h=>l(h))},null,8,["label","withOptionalLabel","withLabelSpace","errors","disabled","grow"]))}}),SP1={class:"input-container"},NP1=["placeholder","disabled"],TP1=["onMousedown"],EP1=["textContent"],FP1=o.defineComponent({__name:"PgaInputSelect",props:o.mergeModels({options:{},descriptionField:{},emptyOptionsText:{type:[String,Number,Function]},placeholder:{type:[String,Number,Function]},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:a}){o.useCssVars(c1=>({"6f5efe36":o.unref(i).input.height,"1c9770e2":o.unref(i).input.padding,"96f82a30":o.unref(i).input.borderColor,"166dbca6":o.unref(i).input.borderRadius,"166c6ab4":o.unref(i).input.backgroundColor,fd10ae78:o.unref(i).input.colorFocus,"53c06342":o.unref(i).input.backgroundColorDisabled,"07a66002":o.unref(i).input.placeholderColor,36546161:o.unref(i).input.paddingWithIcon}));const t=o.useModel(e,"modelValue"),c=e,r=a,n=k3("pgaSelect"),{formOptions:i}=_3.storeToRefs(I3()),s=o.ref(),l=o.ref(),f=o.ref(),u=o.ref(""),h=o.ref(!1),d=o.ref(!1),m=o.computed(()=>c.options.find(c1=>c1.id===t.value)),p=o.computed(()=>!!c.options.length),v=o.computed(()=>{if(d.value)return c.options;const c1=_4.normalizeText(u.value).split(" ");return c.options.filter(F=>{const O=_4.normalizeText(b(F));return c1.every(X=>O.includes(X))})}),g=o.computed(()=>c.disabled||!p.value),x=o.computed(()=>{if(p.value){if(c.placeholder)return H0(c.placeholder)}else return c.emptyOptionsText?H0(c.emptyOptionsText):n("emptyOptionsText")}),z=o.computed(()=>g.value?!1:!!(u.value||t.value)),C=o.computed(()=>g.value?!1:!z.value&&!h.value),y=o.computed(()=>!!(z.value||C.value));o.watch(m,()=>j()),o.watch(l,c1=>{if(!c1)return;const F=document.documentElement.clientHeight,O=document.documentElement.clientWidth,X=s.value.getBoundingClientRect(),f1={};X.top<F/2?f1.top=`${X.bottom}px`:f1.bottom=`${F-X.top}px`,f1.left=`${X.left}px`,f1.right=`${O-X.right}px`,f.value=f1});function b(c1){return H0(c1[c.descriptionField])}function w(){d.value=!0,h.value=!0}function H(){j(),h.value=!1}function T(){d.value=!1}function A(c1){k(c1.id)}function U(){var c1;u.value="",k(null),(c1=s.value)==null||c1.blur()}function D(){var c1;(c1=s.value)==null||c1.focus()}function k(c1){t.value=c1,r("change",c1)}function j(){const c1=m.value;u.value=c1?b(c1):""}return zb(s,()=>{var c1;return(c1=s.value)==null?void 0:c1.blur()}),j(),(c1,F)=>(o.openBlock(),o.createBlock(Ke,{label:c1.label,withOptionalLabel:c1.withOptionalLabel,withLabelSpace:c1.withLabelSpace,errors:c1.errors,grow:c1.grow},{default:o.withCtx(()=>[o.createElementVNode("div",SP1,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":F[0]||(F[0]=O=>u.value=O),ref_key:"inputRef",ref:s,class:o.normalizeClass({"input__with-btn":y.value}),placeholder:x.value,disabled:g.value,onFocus:F[1]||(F[1]=O=>w()),onBlur:F[2]||(F[2]=O=>H()),onInput:F[3]||(F[3]=O=>T())},null,42,NP1),[[o.vModelText,u.value]]),z.value?(o.openBlock(),o.createBlock(S7,{key:0,icon:"xmark",onMousedown:F[4]||(F[4]=o.withModifiers(O=>U(),["prevent"]))})):o.createCommentVNode("",!0),C.value?(o.openBlock(),o.createBlock(S7,{key:1,icon:"chevron-down",onMousedown:F[5]||(F[5]=o.withModifiers(O=>D(),["prevent"]))})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[h.value&&v.value.length?(o.openBlock(),o.createElementBlock("ul",{key:0,ref_key:"dropdownRef",ref:l,class:"input-dropdown",style:o.normalizeStyle(f.value)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.value,O=>(o.openBlock(),o.createElementBlock("li",{key:O.id,class:o.normalizeClass(["dropdown--option",{"dropdown--option__selected":O.id===t.value}]),onMousedown:X=>A(O)},[o.createElementVNode("span",{textContent:o.toDisplayString(b(O))},null,8,EP1)],42,TP1))),128))],4)):o.createCommentVNode("",!0)]))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const DP1=Y1(FP1,[["__scopeId","data-v-93d4ae0c"]]),PP1=["disabled"],BP1=["value"],OP1=o.defineComponent({__name:"PgaSelect",props:o.mergeModels({options:{},descriptionField:{},emptyOptionsText:{type:[String,Number,Function]},placeholder:{type:[String,Number,Function]},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:a}){o.useCssVars(s=>({"72c42ce3":o.unref(r).input.height,f44fd056:o.unref(r).input.padding,a33c3f4a:o.unref(r).input.borderColor,"36a9da9a":o.unref(r).input.borderRadius,"3af9ce99":o.unref(r).input.backgroundColor,"47c88e1e":o.unref(r).input.colorFocus,"179a7796":o.unref(r).input.backgroundColorDisabled}));const t=o.useModel(e,"modelValue"),c=e,{formOptions:r}=_3.storeToRefs(I3()),n=o.computed(()=>!!c.options.length),i=o.computed(()=>c.disabled||!n.value);return(s,l)=>(o.openBlock(),o.createBlock(Ke,{label:s.label,withOptionalLabel:s.withOptionalLabel,withLabelSpace:s.withLabelSpace,errors:s.errors,grow:s.grow},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=f=>t.value=f),disabled:i.value},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.options,f=>(o.openBlock(),o.createElementBlock("option",{key:f.id,value:f.id},o.toDisplayString(o.unref(H0)(f[s.descriptionField])),9,BP1))),128))],8,PP1),[[o.vModelSelect,t.value]])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const RP1=Y1(OP1,[["__scopeId","data-v-54c3f41b"]]),IP1=["disabled"],$P1={class:"slider--thumb"},UP1=o.defineComponent({__name:"PgaSwitch",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},disabled:{type:Boolean},fitContent:{type:Boolean},grow:{},updateFn:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=o.useModel(e,"modelValue"),t=e;async function c(r){if(t.updateFn){const n=r.target.checked;try{await t.updateFn(),a.value=n}catch{a.value=!n}}}return(r,n)=>(o.openBlock(),o.createBlock(Ke,{label:r.label,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,fitContent:r.fitContent,grow:r.grow},{default:o.withCtx(()=>[o.createElementVNode("label",{class:o.normalizeClass(["switch",{"switch__with-label":r.label}])},[o.withDirectives(o.createElementVNode("input",{class:"switch--input","onUpdate:modelValue":n[0]||(n[0]=i=>a.value=i),type:"checkbox",role:"switch",disabled:r.disabled,onChange:n[1]||(n[1]=i=>c(i))},null,40,IP1),[[o.vModelCheckbox,a.value]]),o.createElementVNode("div",{class:o.normalizeClass(["switch--slider",{"switch--slider__checked":a.value,"switch--slider__disabled":r.disabled}])},[o.createElementVNode("div",$P1,[o.createVNode(x3,{class:"thumb--icon",icon:a.value?"check":"xmark"},null,8,["icon"])])],2)],2)]),_:1},8,["label","withOptionalLabel","withLabelSpace","fitContent","grow"]))}});const WP1=Y1(UP1,[["__scopeId","data-v-e527d102"]]),YP1={class:"switch-options"},jP1=["onClick"],qP1=o.defineComponent({__name:"PgaSwitchOptions",props:o.mergeModels({items:{},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({"6158f916":o.unref(t).input.borderRadius,"12a855fe":o.unref(t).input.height,fc7b9fc0:o.unref(t).input.borderColor,"7b1a9844":o.unref(t).input.backgroundColor,"2d3fdc8c":o.unref(t).input.colorFocus,"31b128cc":o.unref(t).input.backgroundColorFocus,31784004:o.unref(t).input.backgroundColorHover}));const a=o.useModel(e,"modelValue"),{formOptions:t}=_3.storeToRefs(I3());return(c,r)=>{const n=o.resolveComponent("PgaInputGroup");return o.openBlock(),o.createBlock(n,{label:c.label,withOptionalLabel:c.withOptionalLabel,withLabelSpace:c.withLabelSpace,errors:c.errors,grow:c.grow},{default:o.withCtx(()=>[o.createElementVNode("div",YP1,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.items,(i,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["switch-options--item",{"switch-options--item__first-item":s===0,"switch-options--item__last-item":s+1===c.items.length,"switch-options--item__active":a.value===i.id}]),key:i.id,onClick:l=>a.value=i.id},[o.createVNode(xe,{text:i.label,icon:i.icon},null,8,["text","icon"])],10,jP1))),128))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"])}}});const GP1=Y1(qP1,[["__scopeId","data-v-9c5b2d88"]]),XP1="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJOCAIAAAG3nMQ3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEY3NjIxREQxMkEwMTFFNjg4QjdFMzIwQjE1Q0RCNTMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEY3NjIxREUxMkEwMTFFNjg4QjdFMzIwQjE1Q0RCNTMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRjc2MjFEQjEyQTAxMUU2ODhCN0UzMjBCMTVDREI1MyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRjc2MjFEQzEyQTAxMUU2ODhCN0UzMjBCMTVDREI1MyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pucw4KEAABZ4SURBVHja7NfLasJAGAZQI6Kv4UJBK0V04fvvpCJKEa1gF32NuNGxAYmXhVllTM7HQIZhFsnhn0uS+deyIa+liQAWLFiwYMFCAAsWLFiwYCGABQsWLFiwEMCCBQsWLFgIYMGCBauaaZX+BvvD3+uTB/1ufbEWq23R+bPpqL6VVejji+JWDetCsN41TqeicHXd4P+lQjY/v/nhND2GBus2SZI9P4e9vNT39hBaPF5RLMPZ5ONuJJPK+qEzHvU7nbbKepK81NUrhvqKCCucdKE9Sl29YN3fCWJAiRqr3NuTf8MKn4Zx30UjwnqXNVg+1rvUlD0LFixYsGAJLFiwYMGCJbBgwYIFC5bAggULFixYAgsWLFiwKp2zAOzcQQsBQRgG4JRCyYYoalsH5f//FqWUAym/gDhSSiJ2N4cZu8/bXPfy9M3OzOVtaMA1WbBgwYIFCwEsWLBgwYKFABYsWLBgwUIACxYsWLBgIYAFCxYsWLVP4C6a7f5wuRTtp8vSSafdqilW2X6j5WoTtikx8GQt5lnS6xbHPZ7O9cV6GTENuDn50qkZWw9ZeKxP2+ouFZVXpJ1/z0Zha80jvWc9gN6nKZL5akYlFXlZolLXqpyGsLwNf7s6aMDNz3jUX292pT4ZDpKaYs3S6W390Tb0z4IFCxYsWAILFixYsGAJLFiwYMGCJbBgwYIFC5bAggULFqyK5ioAe/evojAMAHAY/+FTuMi56HDc4vu/goPDcdJFV0Xl5KiTlUBvsVI1RTTftxWkYvmZxAzGP+DiW4iwEBYIC2EhLBAWwkJYICyEhbBAWAgLYYGwEBbCAmEhLIQFwkJYCAuEhbAQFggLYZGCbrKfPM+Ps/lP0+/yKgedCSuaUNVNJ1XfJBxhud7snnvam7Ceb/6dHQ5/iY801ljxB5iyqnC52/96LEas+Dqddp312edkVHXevLA4z32LbLnZ7s8Xrdb0a1xzyR8u5SWsSh/Dwd2/IuUlrLo/6MolfP2NifAyC39hVSZ18RJhPZoUthsiKCY7D8GI1Yhi3e0hGLGiWWSr6MNVccPynv1+L80Hm/SRJ/8bV42NgsnuPiQ9FV7fuMJUiLAQFggLYSEsEBbCQlggLISFsEBYCAthgbAQFsICYSEshAXCQlgIC4SFsBAWCAth8UZOArBzLy0JRGEAhhNCpYttImjThbJCiaBF/3/toohQMA0rokXRxS6ULZqCgSGKVGKm23me1aFA6fDyzWkGDfprjDCxEBYIC2EhLIRlCxAWwkJYICyEhbBAWAgLYYGwEBbCAmEhLIQFwkJYCAuEhbAQFggLYSEsEBbCQlggLISFsEBYCAthgbAQFsICYSEshAXCQlgIC4SFsBAWCAthISwQFsJCWCAshMU/MhryH9/rPXWOT7N45WIxPzszXSjkhRWc2nY9uxe/ub0/O7/aqJaDbSvQS+HrrPqGd9mtt0yssDxHUbzY2qxmFG7IVTm8Y2Jlf3FMZkxldXFifMyemFgpX7kazc7FZde2CCv9U/bB4YltEdYPqO009g+O7YOwUq5qJIquu7faElY/G9Xyu5+sLs/3rypea0tY/RQK+bdtrVeWp0oTA6vSltsNQ7U18Gbpx6retrWyNGcbTawvnqs++625JazBujd37x4m9q9KW8Iaqqpm+2i33kraGqaqpK3vebwtrD9ZVbyO2xq+KhzeB1eVtGVbTKyUq0JYqhLWr6QqYSEs/FcYuI8PoRFWCkL+AKCwUj0B5HLx4uGxl6xT1Gh2hBX0iNprtLN7l9LkuMO7c1X6Va2VF0ysEIdWRp9WZcTtBoSFsBCWLUBYCAthgbAQFsICYSEshAXCQlgIC4SFsBAWCAthISwQFsJCWCAshIWwQFgIC2GBsBAWwgJhISyEBcJCWAgLhIWwEBYIC2EhLBAWwkJYICyEhbBAWAgLYYGwEBbCAmHxA14EYO/uX5oIAwCO3+k2EV+RWmqzJCaBQsN+6P//LYoI/GHCULS07A3C+UJZq/XoxbIszfNq3vx8ENl0oLuD7z3P7V7ih4+eWAqALSGAYAGCBSBYAIIFCBaAYAEIFiBYAIIFIFiAYAEIFoBgAYIFIFgAggUIFoBgAQgWIFgAggUgWIBgAQgWgGABggUgWIBgAQgWgGABggUgWACCBQgWgGABCBYgWACCBSBYgGABCBaAYAGCBSBYAIIFCBaAYAEIFiBYAIIFIFiAYAEIFoBgAYIFIFiAYAEIFkB2ChbBFXRw8Gm5sf651crrG4jj2nx1YKBkVQoWPa7eWNvf/5Dv99BuL9VXioXC4r27Vqhg0ctjq+O1GhoarM5WcvT/b7588357J3kcRojNnb2x0WGrVbDoTV/b7eNPK1PlfE2sZm7e6AQraLW+WKeCBYdjsVC33b39/r7+4aHB8BP7jBAsLl2nluorf/rtxPho9c6MpUS3OKyBH7Zevz2lVkGYjj1+Wg9Rs6wQLLo8tnqx9e5vXrm+sXXBP7S6tql6mBLyX7ZyfSm3c4fzzeXV6GjHfxisjY+N3K5M2jWGYHFuIRyzt6aebbw685WhMhdJVcd2czd8yRaCRRrlaxNjI8Mny9JRmb4+PVm+eKpkC8Eim3HWg8X5JDTR0cGZ4XuxUEiRkjNTJVsIFpmVK0p77NW5UiVbCBbdkTpVsoVgkZnmzl5j9XnyuLYwd7IjmaRKthAsMktVIjm4tJOtzFP1S7ZSfCiJYCFV0clsRXH8j1IFgkUGqfqJWiFY5CBVIFh0y+nXaYDLwMnPgGABCBZwZdmHxXeHZxHeX7AcMMICMMLivBuoOD7+NO9HMCR3x8AIi56d99UW5oqF/G+o4vi3pzRihEWvNSu5YXJyxauPubq2eqlUDINEnRIsrmK5IncbxJQQQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECcuSbAOzdXW8SWQCAYalUWlsFRN2mIau7UpvQmMYb//+dMdFEk3U/NNtt2i4qVPqJFAqtozXEoNvFQZCZeZ6LphASZuaEt+cMA009fPTYUQDMsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAgQLQLAABAsQLIBJlXYIkqnVah82mju7+51uNzJ/XaemCvns/NxsJnPJCAoWSfG2vvf3+lYUt3x37yD4WVy8UcjnZMuSkPirvK5GtFY9W5Xa5r9vDKVgEf+VYPBqj8GO1Hf3g30xoIJFnMVpYvJibcOAJo1zWMlS/3gOqGd1ZSla2//s+cve781my4AKFrF2evr5LeetsSQEECzAkhD6nL0Bd9hodk+6l2dnptNpi0cEi0l02Hj3+1//9N05Nzdbul2ULSwJmSDrm5UvaxVoNJrPnr906ROCxaR4W9+r1nbOeYBmIVhMhKBEg3xk51V127FCsPjBjgabOp0/BQPBYhze1OqDz8WGXHhaVyJYDOW40xnDs5x9s41zYQgWQ5lOj/wal8+/h0uzECzCW1y4PuAjw12NVd2u953U1ywEi9HOsIqLN8LVan3j1Zf3axaCRRjBvGm5dOt/HpRKFfK571UrzUKwCC97df78CdRqufSt68Hza6VZCBbhLS7cvFcuBTOpvvuv5a6uriyNolaaxeB8+Jl+szOZB/fLQT5OTk/b7eOZj5EKcaJ98Fr1mhWiiZhhwYdCBeUKFonBL2OolXkWgsWPEa5WmoVgEaVaaRaCRZRqpVkIFsMK8vHk6Z/rm5Ux1EqzECyGqtVvf6x1T7rV2s5/Nev71kqzECyGqtWnMH2tWaOo1ZngqQ0BgkWYWn21WaOrFQgWQ9Wqr1lqxTi50p1vrlWvWUdH7f2DhmOFGRYTXaszaoVgEY1agWChViBYqBWChVqBYDFuL9Y21ArBAhAsQLAABAtAsADBApgoPvzMJ3d//dlBQLCIBv8QEEtCAMECLAmJt+l0+rjT6d2sbtezV+ajsvGHjaYRFCwS5Keb+a1KrXcz0t9unMteMaCWhMRZIZ+Lzb7cKi4YUMEizjKZS+XlX2KwI3duF72tKVjE3/zc5dWVpQupVHR34V65VLiWNZQJ5BxWQudZD+6XW632cafT7Z5EZbMvXpyaTqcvuGRMsEhmtrzysSQEECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsILneC9De/f80cccBHG7pwfUoBCpfRGTYscy5Zf//v7As2W9LyCSbsg4BKaRgW0pL4Xaui9kUqwjtleN5cj9cPDzMW01f9O4+zf/08y+mAADgJ0IAAIEFACCwAAAQWAAAAgsAQGABACCwAAAEFgCAwAIAQGABAAgsAACBBQAgsAAAEFgAAAILAEBgAQAgsAAABBYAgMACAEBgAQAILAAAgQUAgMACABBYAAACCwBAYAEAILAAAAQWAIDAAgBAYAEACCwAAIEFAIDAAgAQWAAAAgsAAIEFACCwAAAEFgCAwAIAQGABAAgsAACBBQCAwAIAEFgAAAILAACBBQAgsAAABBYAgMACAEBgAQAILAAAgQUAgMACABBYAAACCwAAgQUAILAAAAQWAAACCwBAYAEACCwAAIEFAIDAAgAQWAAAAgsAAIEFACCwAAAEFgAAAgsAQGABAAgsAAAEFgCAwAIAEFgAAAILAACBBQAgsAAABBYAAAILAEBgAQAILAAABBYAgMACABBYAAAILAAAgQUAILAAAAQWAAACCwBAYAEACCwAAAQWAIDAAgAQWAAACCwAAIEFACCwAAAEFgAAAgsAQGABAAgsAAAEFgCAwAIAEFgAAAgsAACBBQAgsAAAEFgAAAILAEBgAQAILAAABBYAgMACABBYAAAILAAAgQUAILAAABBYAAAjFRgB3E+dTtcQhi0MpwwBBBaQ8aK6jOPXtaN6vXHe6xnIaBQmCrOz06sri5NBoLdAYAGZSquj+vHObs0oRu/i8uL4pJFsyf783OyTtZWcd7ZAYAF3Pa3Oe73Nre1cHJtG6vqlVVl/NJeb0ViQbW5yhyzX1Vmnu/n8pboaK9vVvaP6sXvgINu8gwVZVn21P+DoZBBEUWhKw3De67XbnY8d3dk7XCjPmxIILOBOGvAa/01lbaYUuVA1JP1HCn7d/P3qw3HcbLUNHzLMJULIrMuBVwaDoOAFfniS2U7k8+YAAgsAAIEFADCW3IMFfFr/kbezTrd2WG80Tz9cp3QyCEql6OHSg+I/lx1dfAQEFsCgtHq7SOne4eC1HpLkerecZi6fX3u02H9KTmkBAgvgf2m1d3B4UKtf+3fG8c5uLdmWl8qPlhc1FiCwAP6tq83nL2/4kYVJnNXrjWdPK1HRalvA/eImd+CKutp6Ub2VD4ROTvLb1rZVywGBBdz3uto7OBywQukXNFZywnQbK/nu/c3fLzAaLhEC72udno35Ca+VVs1W+48/X+XieH5u9snaSs6t94DAArh5WvV/pf+co8wCBBaQgvLcTKvVvsUTlqaLI06rk0Zz+6/9K5eWkFmAwAJGLQmOhfL8Uf3Nbd2GFUXhyBZrGJxWMgsQWECajfV0Y33rRfXmjZXUVXKqEeTL56eVzAIEFpBmY71NlureF59kbXVpoTw/7Gr5srSSWYDAAtJprOXwwdzsTLPVru7sf/6yWJNBsL62MlOKxj+tZBYgsIB0MivZklpK9i/juH58Uj9pnrW7F5cX776mMFEoRlOl6eLDpYWJfH4EdXK7aSWzAIEFpJNZ/Z1oZXl1ZTnFP8nw0kpmAQILuHdGk1YyCxBYgLSSWYDAArg7aSWzAIEFjFEVnXW69ZM3N1lfdHzSSmYBAgtIP61+f7HTf8bwoFZfXipfN7PGM61kFiCwgJTT6p2ksT4/s8Y/rT6WWRoLEFjAKNLqWpl1t9LqvxqNU/8GAIEFjDStPplZdzetAAQWkGZafSyzpBUgsABulFYfZpZ5AgILkFa3kFYAAgtAWgEILEBaAQgsQFoBCCxAWgEwyIQRAO+pvtpXVwACCwBAYAEACCwAAAQWAIDAAgDIBMs0AO+bDIJe4ClCAIEF3JIwnHr2bcUcAG7CJUIAAIEFACCwgHT+e+fzA462Tk87na4pDUn/E4cGfEEQFEwJMsw9WJBlpVLUarWvPLSzW0s2I0rFZBAUwylzgCz/iGsEkFVhOLXx5HFhwjslY2ej8tgQQGABd1VUDH/8fiOKQqMYE0nv/vDd18VwKvQOFmSaS4SQcckL+dON9fNe72V1t93uGEhaJoNgo/JYWoHAArLTWP3MSvYv4/h17ajRPG2fdXNxbDjDjqrZmemlxXL/jitpBQILyGBm9XcqX62aBsBQuQcLAEBgAQAILAAAgQUAgMACABBYAAACCwAAgQUAILAAAAQWAAACCwBAYAEACCwAAIEFAIDAAgAQWAAAAgsAAIEFACCwAAAEFgAAAgsAQGABAAgsAAAEFgCAwAIAEFgAAAILAACBBQAgsAAABBYAAAILAEBgAQAILAAABBYAgMACABBYAAAILAAAgQUAILAAAAQWAAACCwBAYAEACCwAAAQWAIDAAgAQWAAACCwAAIEFACCwAAAQWAAAAgsAQGABAAgsAAAEFgCAwAIAEFgAAAgsAACBBQAgsAAAEFgAAAILAEBgAQAILAAABBYAgMACABBYAAAILAAAgQUAILAAABBYAAACCwBAYAEAILAAAAQWAIDAAgAQWAAACCwAAIEFACCwAAAQWAAAAgsAQGABACCwAAAEFgCAwAIAQGABAAgsAACBBQAgsAAAEFgAAAILAEBgAQAgsAAABBYAgMACAEBgAQAILAAAgQUAgMACABBYAAACCwBAYAEAILAAAAQWAIDAAgBAYAEACCwAAIEFAIDAAgAQWAAAAgsAQGABACCwAAAEFgCAwAIAQGABAAgsAACBBQCAwAIAGLm/AW3rpsB12Oi5AAAAAElFTkSuQmCC",ZP1=["src"],QP1=["src"],KP1=o.defineComponent({__name:"PgaImage",props:o.mergeModels({source:{default:"dynamic"},image:{},defaultImage:{},uploadFn:{},deleteFn:{},buttonsLayout:{default:"vertical"},size:{},height:{},width:{},borderRadius:{},rounded:{type:Boolean}},{modelValue:{default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(b=>({"6c327572":s.value}));const a=o.useModel(e,"modelValue"),t=e,c=k3("pgaImage"),r=o.ref(!1),n=o.ref(),i=o.ref(),s=o.ref("0"),l=o.ref(!1),f=o.ref(!1),u=o.computed(()=>a.value?a.value:t.image),h=o.computed(()=>`${I3().imageOptions[`${t.source}Url`]}/${u.value}`),d=o.computed(()=>!!(!u.value||r.value)),m=o.computed(()=>t.defaultImage?`${I3().imageOptions.staticUrl}/${t.defaultImage}`:XP1),p=o.computed(()=>{const b=[];return t.size?b.push({height:t.size,width:t.size}):(t.height&&b.push({height:t.height,width:"auto"}),t.width&&b.push({height:"auto",width:t.width}),t.height&&t.width&&b.push({height:t.height,width:t.width})),b}),v=o.computed(()=>{const b=[];return t.rounded?b.push({borderRadius:"100%"}):t.borderRadius&&b.push({borderRadius:t.borderRadius}),b});o.watch(h,()=>r.value=!1);function g(){r.value=!0}async function x(){var b;(b=i.value)==null||b.click()}async function z(b){var w;(w=i.value)==null||w.resetInput();try{l.value=!0;const H={image:b};a.value=await t.uploadFn(H)}finally{l.value=!1}}async function C(){try{f.value=!0,await t.deleteFn(),a.value=void 0}finally{f.value=!1}}function y(){if(!n.value)return;const b=n.value.getBoundingClientRect();t.buttonsLayout==="horizontal"&&(s.value=`${b.height}px`),t.buttonsLayout==="vertical"&&(s.value=`${b.width}px`)}return o.onMounted(()=>{n.value&&new ResizeObserver(y).observe(n.value)}),(b,w)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["img-wrapper",[`img-wrapper__${b.buttonsLayout}`]])},[o.createElementVNode("div",{class:"img-container",style:o.normalizeStyle(p.value)},[d.value?(o.openBlock(),o.createElementBlock("img",{key:0,class:"img",src:m.value,style:o.normalizeStyle(v.value)},null,12,ZP1)):(o.openBlock(),o.createElementBlock("img",{key:1,class:"img",src:h.value,style:o.normalizeStyle(v.value),onError:w[0]||(w[0]=H=>g())},null,44,QP1))],4),b.uploadFn||b.deleteFn?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"imgButtonsRef",ref:n,class:o.normalizeClass(["img-buttons",[`img-buttons__${b.buttonsLayout}`]])},[b.uploadFn?(o.openBlock(),o.createBlock(c3,{key:0,buttonType:"flat",size:"s",icon:"camera",isLoading:l.value,onClick:w[1]||(w[1]=H=>x())},null,8,["isLoading"])):o.createCommentVNode("",!0),b.uploadFn?(o.openBlock(),o.createBlock(Os,{key:1,ref_key:"inputFileRef",ref:i,class:"input-file",acceptedFormats:["jpeg","jpg","png"],onNewFile:w[2]||(w[2]=H=>z(H))},null,512)):o.createCommentVNode("",!0),!d.value&&b.deleteFn?(o.openBlock(),o.createBlock(us,{key:2,withoutText:"",confirmDeleteText:o.unref(c)("confirmDeleteText"),isLoading:f.value,onDeleteConfirmed:w[3]||(w[3]=H=>C())},null,8,["confirmDeleteText","isLoading"])):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0)],2))}});const JP1=Y1(KP1,[["__scopeId","data-v-0939ea5c"]]),b_=e=>(o.pushScopeId("data-v-09dde44c"),e=e(),o.popScopeId(),e),eB1={key:0,class:"pagination"},aB1={key:0,class:"pagination--item-container"},tB1=b_(()=>o.createElementVNode("span",{textContent:"..."},null,-1)),cB1=["textContent","onClick"],rB1={key:1,class:"pagination--item-container"},nB1=b_(()=>o.createElementVNode("span",{textContent:"..."},null,-1)),iB1=["textContent"],sB1=o.defineComponent({__name:"PgaPagination",props:o.mergeModels({totalCount:{},pageSize:{},preventScrollToTop:{type:Boolean}},{modelValue:{required:!0,default:1},modelModifiers:{}}),emits:o.mergeModels(["newPage"],["update:modelValue"]),setup(e,{emit:a}){const t=o.useModel(e,"modelValue"),c=e,r=a,n=o.computed(()=>Math.ceil(c.totalCount/c.pageSize)),i=o.computed(()=>{const h=[t.value];for(let d=t.value-1;d>=t.value-3&&d>=1;d--)h.unshift(d);for(let d=t.value+1;d<=t.value+3&&d<=n.value;d++)h.push(d);if(h.length===7)return h;if(h.includes(1))for(let d=h[h.length-1]+1;d<=7-h.length+h[h.length-1]&&d<=n.value;d++)h.push(d);else for(let d=h[0]-1;d>=-(7-h.length)+h[0]&&d>=1;d--)h.unshift(d);return h}),s=o.computed(()=>!i.value.includes(1)),l=o.computed(()=>!i.value.includes(n.value));return o.watch(t,f=>{r("newPage",f),c.preventScrollToTop||xb()}),(f,u)=>n.value>1?(o.openBlock(),o.createElementBlock("div",eB1,[s.value?(o.openBlock(),o.createElementBlock("div",aB1,[o.createElementVNode("div",{class:"pagination--item",textContent:"1",onClick:u[0]||(u[0]=h=>t.value=1)}),tB1])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,h=>(o.openBlock(),o.createElementBlock("div",{key:h,class:o.normalizeClass(["pagination--item",{"pagination--item__current":h===t.value}]),textContent:o.toDisplayString(h),onClick:d=>t.value=h},null,10,cB1))),128)),l.value?(o.openBlock(),o.createElementBlock("div",rB1,[nB1,o.createElementVNode("div",{class:"pagination--item",textContent:o.toDisplayString(n.value),onClick:u[1]||(u[1]=h=>t.value=n.value)},null,8,iB1)])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}});const V_=Y1(sB1,[["__scopeId","data-v-09dde44c"]]),oB1=o.defineComponent({__name:"PgaTr",props:{index:{}},setup(e){return(a,t)=>(o.openBlock(),o.createElementBlock("tr",{class:o.normalizeClass([typeof a.index>"u"?"":a.index%2===0?"tr__even":"tr__odd"])},[o.renderSlot(a.$slots,"default",{},void 0,!0)],2))}});const Rh=Y1(oB1,[["__scopeId","data-v-dd6d415a"]]),lB1=o.defineComponent({__name:"PgaTh",props:{title:{type:[String,Number,Function],default:""},align:{default:"left"}},setup(e){return o.useCssVars(a=>({"382ad71d":a.align})),(a,t)=>(o.openBlock(),o.createElementBlock("th",null,[o.createVNode(xe,{text:a.title,showEmptyText:""},null,8,["text"])]))}});const Nt=Y1(lB1,[["__scopeId","data-v-aafcdff9"]]),fB1={class:"td--content"},uB1=o.defineComponent({__name:"PgaTd",props:{align:{default:"left"},fitContent:{type:Boolean}},setup(e){o.useCssVars(c=>({"46d10c70":c.align,"99d2ab4c":t.value}));const a=e,t=o.computed(()=>{if(a.align==="left")return"flex-start";if(a.align==="center")return"center";if(a.align==="right")return"flex-end"});return(c,r)=>(o.openBlock(),o.createElementBlock("td",{class:o.normalizeClass({"td__fit-content":!!c.fitContent})},[o.createElementVNode("div",fB1,[o.renderSlot(c.$slots,"default",{},void 0,!0)])],2))}});const Tt=Y1(uB1,[["__scopeId","data-v-2db20038"]]),hB1={class:"filters-modal-container"},dB1=o.defineComponent({__name:"PgaFiltersModal",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const a=o.useModel(e,"modelValue"),t=k3("pgaTable");return(c,r)=>{const n=o.resolveComponent("PgaModal");return o.openBlock(),o.createBlock(n,{modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=i=>a.value=i),title:o.unref(t)("filtersModalTitle")},{default:o.withCtx(()=>[o.createElementVNode("div",hB1,[o.renderSlot(c.$slots,"default",{},void 0,!0)])]),_:3},8,["modelValue","title"])}}});const mB1=Y1(dB1,[["__scopeId","data-v-3d34076b"]]),Ur=o.defineComponent({__name:"PgaActionsButtons",props:o.mergeModels({item:{},getDescriptionFn:{type:Function},withEditButton:{type:Boolean},deleteFn:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["editItem"],["update:modelValue"]),setup(e,{emit:a}){const t=o.useModel(e,"modelValue"),c=e,r=a;async function n(i){try{t.value.push(i.id),await c.deleteFn(i)}finally{t.value=t.value.filter(s=>s!==i.id)}}return(i,s)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[i.withEditButton?(o.openBlock(),o.createBlock(hV,{key:0,onClick:s[0]||(s[0]=l=>r("editItem",i.item))})):o.createCommentVNode("",!0),i.deleteFn?(o.openBlock(),o.createBlock(us,{key:1,confirmDeleteText:i.getDescriptionFn(i.item),isLoading:t.value.includes(i.item.id),onDeleteConfirmed:s[1]||(s[1]=l=>n(i.item))},null,8,["confirmDeleteText","isLoading"])):o.createCommentVNode("",!0)],64))}}),pB1={class:"table-container"},vB1={key:0,class:"table-header"},gB1={key:2,class:"header--search-container"},xB1={class:"indentation-content"},CB1={key:0,class:"indentation-line"},zB1={key:1,class:"actions-buttons"},MB1={key:1,class:"small-devices-list"},HB1={class:"small-devices-actions-buttons"},yB1={key:2,class:"items-selected"},bB1=["textContent"],VB1=o.defineComponent({__name:"PgaTable",props:o.mergeModels({columns:{},columnsAlign:{},createItemBtnText:{},withEditButton:{type:Boolean},deleteFn:{type:Function},actionsOptions:{},useDropdown:{type:Boolean},items:{},descriptionField:{},totalCount:{},noItemsLabel:{type:[String,Number,Function]},preventDisplayNoItemsIcon:{type:Boolean},searchInputPlaceholder:{},filters:{},indentation:{},isLoading:{type:Boolean}},{searchParams:{},searchParamsModifiers:{},itemsSelected:{},itemsSelectedModifiers:{}}),emits:o.mergeModels(["createItem","editItem","refreshList"],["update:searchParams","update:itemsSelected"]),setup(e,{emit:a}){const t=o.useModel(e,"searchParams"),c=o.useModel(e,"itemsSelected"),r=e,n=a,i=k3("pgaTable"),s=o.ref([]),l=o.ref(),f=o.ref([]),u=o.ref({isActive:!1}),h=o.computed(()=>{const D={};for(const k in r.columns){const j=r.columns[k];j.hide||(D[k]=j)}return D}),d=o.computed(()=>{if(!r.indentation)return!1;for(const D of r.items)if(D[r.indentation.propName].length>0)return!0;return!1}),m=o.computed(()=>{if(!d.value)return r.items;const D=[];for(const k of r.items)D.push(k),H(k)&&D.push(...k[r.indentation.propName]);return D}),p=o.computed(()=>!!c.value),v=o.computed(()=>{var D;return!!(r.withEditButton||r.deleteFn||(D=r.actionsOptions)!=null&&D.length)}),g=o.computed(()=>{var D;return(D=r.actionsOptions)!=null&&D.length?!0:r.useDropdown}),x=o.computed(()=>{var D,k;return((D=t.value)==null?void 0:D.page)&&((k=t.value)==null?void 0:k.pageSize)&&r.totalCount}),z=o.computed(()=>{var D;return((D=t.value)==null?void 0:D.search)!==void 0}),C=o.computed(()=>(console.log("props.filters"),console.log(r.filters),r.filters?Object.values(r.filters).reduce((D,k)=>(console.log(D),console.log(k),k?D++:D),0):0));o.watch(()=>r.items,()=>{p.value&&(c.value=[])});function y(D){if(r.descriptionField)return H0(D[r.descriptionField])}function b(){t.value.page=1,n("refreshList")}function w(D){return r.items.map(j=>j.id).includes(D.id)}function H(D){return s.value.includes(D.id)}function T(D){s.value.push(D.id)}function A(D){s.value=s.value.filter(k=>k!==D.id)}function U(){l.value.toggleItemSelected()}return(D,k)=>(o.openBlock(),o.createElementBlock("div",pB1,[D.createItemBtnText||D.$slots.header||z.value||D.isLoading||D.$slots.filters?(o.openBlock(),o.createElementBlock("div",vB1,[D.createItemBtnText?(o.openBlock(),o.createBlock(c3,{key:0,icon:"plus",text:D.createItemBtnText,onClick:k[0]||(k[0]=j=>n("createItem"))},null,8,["text"])):o.createCommentVNode("",!0),o.renderSlot(D.$slots,"header",{},void 0,!0),D.$slots.filters?(o.openBlock(),o.createBlock(c3,{key:1,class:"header--filters-btn",icon:"filter",color:"sky",text:o.unref(i)("filtersBtn"),numberToDisplay:C.value,onClick:k[1]||(k[1]=j=>u.value.isActive=!0)},null,8,["text","numberToDisplay"])):o.createCommentVNode("",!0),o.createVNode(mB1,{modelValue:u.value.isActive,"onUpdate:modelValue":k[2]||(k[2]=j=>u.value.isActive=j)},{default:o.withCtx(()=>[o.renderSlot(D.$slots,"filters",{},void 0,!0)]),_:3},8,["modelValue"]),z.value||D.isLoading?(o.openBlock(),o.createElementBlock("div",gB1,[z.value?(o.openBlock(),o.createBlock(N7,{key:0,class:"header--search",modelValue:t.value.search,"onUpdate:modelValue":k[3]||(k[3]=j=>t.value.search=j),placeholder:D.searchInputPlaceholder,onEnter:k[4]||(k[4]=j=>b()),onValueCleared:k[5]||(k[5]=j=>b())},null,8,["modelValue","placeholder"])):o.createCommentVNode("",!0),D.isLoading?(o.openBlock(),o.createBlock(_a,{key:1,size:"0.7em"})):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["header--filters",{"header--filters__with-search":z.value}])},[o.renderSlot(D.$slots,"filters",{},void 0,!0)],2)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["table-wrapper",{"table-wrapper__with-small-devices-list":D.$slots.smallDevicesItem}])},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[o.createVNode(Rh,null,{default:o.withCtx(()=>[p.value?(o.openBlock(),o.createBlock(Nt,{key:0})):o.createCommentVNode("",!0),d.value?(o.openBlock(),o.createBlock(Nt,{key:1})):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,(j,c1)=>(o.openBlock(),o.createBlock(Nt,{key:c1,title:j.title,align:j.align||D.columnsAlign},null,8,["title","align"]))),128)),v.value?(o.openBlock(),o.createBlock(Nt,{key:2,title:o.unref(i)("columnTitleActions")},null,8,["title"])):o.createCommentVNode("",!0)]),_:1})]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(m.value,(j,c1)=>(o.openBlock(),o.createBlock(Rh,{key:j.id,index:c1},{default:o.withCtx(()=>[p.value?(o.openBlock(),o.createBlock(Tt,{key:0,fitContent:""},{default:o.withCtx(()=>[o.createVNode(gn,{modelValue:c.value,"onUpdate:modelValue":k[6]||(k[6]=F=>c.value=F),items:m.value,item:j},null,8,["modelValue","items","item"])]),_:2},1024)):o.createCommentVNode("",!0),d.value?(o.openBlock(),o.createBlock(Tt,{key:1,fitContent:""},{default:o.withCtx(()=>[o.createElementVNode("div",xB1,[w(j)?H(j)?(o.openBlock(),o.createBlock(x3,{key:1,icon:"caret-down",clickable:"",onClick:F=>A(j)},null,8,["onClick"])):j[r.indentation.propName].length>0?(o.openBlock(),o.createBlock(x3,{key:2,icon:"caret-right",clickable:"",onClick:F=>T(j)},null,8,["onClick"])):o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",CB1))])]),_:2},1024)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,(F,O)=>(o.openBlock(),o.createBlock(Tt,{key:O,align:F.align||D.columnsAlign,fitContent:F.fitContent},{default:o.withCtx(()=>[o.renderSlot(D.$slots,O,{item:j},void 0,!0)]),_:2},1032,["align","fitContent"]))),128)),v.value?(o.openBlock(),o.createBlock(Tt,{key:2,fitContent:""},{default:o.withCtx(()=>[g.value?(o.openBlock(),o.createBlock(Mb,{key:0,item:j,options:D.actionsOptions,align:"right"},{default:o.withCtx(()=>[o.createVNode(Ur,{modelValue:f.value,"onUpdate:modelValue":k[7]||(k[7]=F=>f.value=F),item:j,getDescriptionFn:y,withEditButton:D.withEditButton,deleteFn:D.deleteFn,onEditItem:k[8]||(k[8]=F=>n("editItem",F))},null,8,["modelValue","item","withEditButton","deleteFn"])]),_:2},1032,["item","options"])):(o.openBlock(),o.createElementBlock("div",zB1,[o.createVNode(Ur,{modelValue:f.value,"onUpdate:modelValue":k[9]||(k[9]=F=>f.value=F),item:j,getDescriptionFn:y,withEditButton:D.withEditButton,deleteFn:D.deleteFn,onEditItem:k[10]||(k[10]=F=>n("editItem",F))},null,8,["modelValue","item","withEditButton","deleteFn"])]))]),_:2},1024)):o.createCommentVNode("",!0)]),_:2},1032,["index"]))),128))])])],2),D.$slots.smallDevicesItem?(o.openBlock(),o.createElementBlock("div",MB1,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(m.value,j=>(o.openBlock(),o.createElementBlock("div",{key:j.id,class:"small-devices-item-container"},[o.renderSlot(D.$slots,"smallDevicesItem",{item:j},void 0,!0),o.createVNode(fV),o.createElementVNode("div",HB1,[o.createVNode(Ur,{modelValue:f.value,"onUpdate:modelValue":k[11]||(k[11]=c1=>f.value=c1),item:j,getDescriptionFn:y,withEditButton:D.withEditButton,deleteFn:D.deleteFn,onEditItem:k[12]||(k[12]=c1=>n("editItem",c1))},null,8,["modelValue","item","withEditButton","deleteFn"])])]))),128))])):o.createCommentVNode("",!0),o.createVNode(Tw,{items:m.value,label:D.noItemsLabel,preventDisplayIcon:D.preventDisplayNoItemsIcon,isLoading:D.isLoading},null,8,["items","label","preventDisplayIcon","isLoading"]),p.value&&m.value.length?(o.openBlock(),o.createElementBlock("div",yB1,[o.createVNode(gn,{ref_key:"itemsSelectedRef",ref:l,modelValue:c.value,"onUpdate:modelValue":k[13]||(k[13]=j=>c.value=j),items:m.value},null,8,["modelValue","items"]),o.createVNode(fs,{class:"items-selected--select-all-btn",text:o.unref(i)("selectAllBtn"),onClick:k[14]||(k[14]=j=>U())},null,8,["text"]),o.createElementVNode("span",{class:"items-selected--selected-items-text",textContent:o.toDisplayString(o.unref(i)("withTheSelectedItemsText"))},null,8,bB1),o.renderSlot(D.$slots,"itemsSelected",{},void 0,!0)])):o.createCommentVNode("",!0),x.value?(o.openBlock(),o.createBlock(V_,{key:3,modelValue:t.value.page,"onUpdate:modelValue":k[15]||(k[15]=j=>t.value.page=j),pageSize:t.value.pageSize,totalCount:D.totalCount,onNewPage:k[16]||(k[16]=j=>n("refreshList"))},null,8,["modelValue","pageSize","totalCount"])):o.createCommentVNode("",!0)]))}});const wB1=Y1(VB1,[["__scopeId","data-v-d159990b"]]),LB1=Object.freeze(Object.defineProperty({__proto__:null,PgaBackButton:Kv1,PgaBadge:eh1,PgaButton:c3,PgaButtonLink:fs,PgaCheckbox:g_1,PgaColorCircle:Cb,PgaColorSelector:z_1,PgaDatePicker:lV,PgaDeleteButton:us,PgaDisplayBarcodes:oL1,PgaDisplayDatetime:hL1,PgaDisplayInfo:CL1,PgaDisplayNoItems:Tw,PgaDisplayPrice:LL1,PgaDisplayText:xe,PgaDoughnutChart:rL1,PgaDropdown:Mb,PgaEditButton:hV,PgaForm:Ew,PgaFormRow:NL1,PgaIcon:x3,PgaIconSelector:y_1,PgaImage:JP1,PgaInfoCardFullPage:mh1,PgaInput:N7,PgaInputFile:Os,PgaInputFileExcel:AP1,PgaInputGroup:Ke,PgaInputSelect:DP1,PgaIsEnabled:ph1,PgaItemSelected:gn,PgaLink:lg1,PgaLoginForm:d_1,PgaLogoutButton:fg1,PgaModal:Hh1,PgaMonthSelector:$v1,PgaPagination:V_,PgaRemoveButton:ug1,PgaSelect:RP1,PgaSeparator:fV,PgaSpinner:_a,PgaSwitch:WP1,PgaSwitchOptions:GP1,PgaTable:wB1,PgaToggleButton:hg1,PgaUserMenu:Qv1},Symbol.toStringTag,{value:"Module"})),_B1={class:"notifications"},kB1=o.defineComponent({__name:"Notifications",setup(e){const a=k3("notifications"),{notificationsOptions:t}=_3.storeToRefs(I3()),{notifications:c}=_3.storeToRefs(w0());return(r,n)=>(o.openBlock(),o.createElementBlock("div",_B1,[o.createVNode(o.TransitionGroup,{name:"notifications--transition-group"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(c),i=>(o.openBlock(),o.createElementBlock("div",{key:i.id,class:"notifications--notification",style:o.normalizeStyle({"border-left-color":`var(--pga-color-${i.type})`})},[o.createVNode(xe,{class:"notifications--message",text:i.message},null,8,["text"]),o.unref(t).preventRemove?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(x3,{key:0,class:"notifications--xmark",icon:"xmark",onClick:s=>o.unref(Bs)(i.id)},null,8,["onClick"]))],4))),128))]),_:1}),!o.unref(t).preventRemove&&o.unref(c).length?(o.openBlock(),o.createBlock(fs,{key:0,class:"notifications--remove-all-btn",text:o.unref(a)("removeAllBtn"),onClick:n[0]||(n[0]=i=>o.unref($w)())},null,8,["text"])):o.createCommentVNode("",!0)]))}});const AB1=Y1(kB1,[["__scopeId","data-v-45c95570"]]);function SB1(){const e=document.createElement("div");document.body.appendChild(e),o.createApp({render(){return o.h(AB1)}}).mount(e)}const W0=k3("validations"),NB1=n4.withMessage(()=>W0("requiredRuleError"),jn),TB1=e=>n4.withMessage(()=>W0("minLengthRuleError",{minLength:e}),a_1(e)),EB1=e=>n4.withMessage(()=>W0("maxLengthRuleError",{maxLength:e}),JL1(e)),FB1=n4.withMessage(()=>W0("integerRuleError"),n_1),DB1=e=>n4.withMessage(()=>W0("lessEqualRuleError",{number:e}),n4.withParams({},a=>typeof a!="number"?!0:a<=e)),PB1=e=>n4.withMessage(()=>W0("greaterEqualRuleError",{number:e}),n4.withParams({},a=>typeof a!="number"?!0:a>=e)),BB1=e=>n4.withMessage(()=>W0("lessThanRuleError",{number:e}),n4.withParams({},a=>typeof a!="number"?!0:a<e)),OB1=e=>n4.withMessage(()=>W0("greaterThanRuleError",{number:e}),n4.withParams({},a=>typeof a!="number"?!0:a>e));M9.add(Oe1);M9.add(X81);M9.add(as1);function RB1(e,a){const t=_4.mergeDeep(ns1,a);I3().options=_4.removeProps(t,"colors"),yy(t.colors),e.use(Uh),e.use(Nk,A_),Object.entries(LB1).forEach(([c,r])=>{e.component(c,r)}),SB1()}exports.addNotification=Iw;exports.animation=Ys1;exports.clearNotifications=$w;exports.copyModelFields=qu1;exports.createI18n=wy;exports.default=RB1;exports.displayAlert=uV;exports.getCoinAmountInString=Us1;exports.getColorType=Q8;exports.getDatetimeInString=js1;exports.getFinalValue=H0;exports.getLanguage=o7;exports.getNumberInString=l7;exports.getRandomColorSelector=ss1;exports.getTheme=sn;exports.greaterEqualRule=PB1;exports.greaterThanRule=OB1;exports.integerRule=FB1;exports.isCurrentUrl=Gu1;exports.lessEqualRule=DB1;exports.lessThanRule=BB1;exports.maxLengthRule=EB1;exports.minLengthRule=TB1;exports.removeNotification=Bs;exports.requiredRule=NB1;exports.rgba=Ws1;exports.scrollToTop=xb;exports.setBodyOverflow=f7;exports.setColor=ls1;exports.setColors=yy;exports.setColorsVariable=Pt;exports.setLanguage=$s1;exports.setTheme=os1;exports.useColorsStore=zi;
831
+ `;var t=M_(e,a);return t}function MP1(e){var a="",t,c="";if(e==null||e["!ref"]==null)return[];var r=G2(e["!ref"]),n="",i=[],s,l=[],f=Array.isArray(e);for(s=r.s.c;s<=r.e.c;++s)i[s]=p3(s);for(var u=r.s.r;u<=r.e.r;++u)for(n=L3(u),s=r.s.c;s<=r.e.c;++s)if(a=i[s]+n,t=f?(e[u]||[])[s]:e[a],c="",t!==void 0){if(t.F!=null){if(a=t.F,!t.f)continue;c=t.f,a.indexOf(":")==-1&&(a=a+":"+a)}if(t.f!=null)c=t.f;else{if(t.t=="z")continue;if(t.t=="n"&&t.v!=null)c=""+t.v;else if(t.t=="b")c=t.v?"TRUE":"FALSE";else if(t.w!==void 0)c="'"+t.w;else{if(t.v===void 0)continue;t.t=="s"?c="'"+t.v:c=""+t.v}}l[l.length]=a+"="+c}return l}function H_(e,a,t){var c=t||{},r=+!c.skipHeader,n=e||{},i=0,s=0;if(n&&c.origin!=null)if(typeof c.origin=="number")i=c.origin;else{var l=typeof c.origin=="string"?G3(c.origin):c.origin;i=l.r,s=l.c}var f,u={s:{c:0,r:0},e:{c:s,r:i+a.length-1+r}};if(n["!ref"]){var h=G2(n["!ref"]);u.e.c=Math.max(u.e.c,h.e.c),u.e.r=Math.max(u.e.r,h.e.r),i==-1&&(i=h.e.r+1,u.e.r=i+a.length-1+r)}else i==-1&&(i=0,u.e.r=a.length-1+r);var d=c.header||[],m=0;a.forEach(function(v,g){pe(v).forEach(function(x){(m=d.indexOf(x))==-1&&(d[m=d.length]=x);var z=v[x],C="z",y="",b=W1({c:s+m,r:i+g+r});f=ma(n,b),z&&typeof z=="object"&&!(z instanceof Date)?n[b]=z:(typeof z=="number"?C="n":typeof z=="boolean"?C="b":typeof z=="string"?C="s":z instanceof Date?(C="d",c.cellDates||(C="n",z=Q3(z)),y=c.dateNF||j1[14]):z===null&&c.nullError&&(C="e",z=0),f?(f.t=C,f.v=z,delete f.w,delete f.R,y&&(f.z=y)):n[b]=f={t:C,v:z},y&&(f.z=y))})}),u.e.c=Math.max(u.e.c,s+d.length-1);var p=L3(i);if(r)for(m=0;m<d.length;++m)n[p3(m+s)+p]={t:"s",v:d[m]};return n["!ref"]=n2(u),n}function HP1(e,a){return H_(null,e,a)}function ma(e,a,t){if(typeof a=="string"){if(Array.isArray(e)){var c=G3(a);return e[c.r]||(e[c.r]=[]),e[c.r][c.c]||(e[c.r][c.c]={t:"z"})}return e[a]||(e[a]={t:"z"})}return typeof a!="number"?ma(e,W1(a)):ma(e,W1({r:a,c:t||0}))}function yP1(e,a){if(typeof a=="number"){if(a>=0&&e.SheetNames.length>a)return a;throw new Error("Cannot find sheet # "+a)}else if(typeof a=="string"){var t=e.SheetNames.indexOf(a);if(t>-1)return t;throw new Error("Cannot find sheet name |"+a+"|")}else throw new Error("Cannot find sheet |"+a+"|")}function uo(){return{SheetNames:[],Sheets:{}}}function ho(e,a,t,c){var r=1;if(!t)for(;r<=65535&&e.SheetNames.indexOf(t="Sheet"+r)!=-1;++r,t=void 0);if(!t||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(c&&e.SheetNames.indexOf(t)>=0){var n=t.match(/(^.*?)(\d+)$/);r=n&&+n[2]||0;var i=n&&n[1]||t;for(++r;r<=65535&&e.SheetNames.indexOf(t=i+r)!=-1;++r);}if(sD1(t),e.SheetNames.indexOf(t)>=0)throw new Error("Worksheet with name |"+t+"| already exists!");return e.SheetNames.push(t),e.Sheets[t]=a,t}function bP1(e,a,t){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var c=yP1(e,a);switch(e.Workbook.Sheets[c]||(e.Workbook.Sheets[c]={}),t){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+t)}e.Workbook.Sheets[c].Hidden=t}function VP1(e,a){return e.z=a,e}function y_(e,a,t){return a?(e.l={Target:a},t&&(e.l.Tooltip=t)):delete e.l,e}function wP1(e,a,t){return y_(e,"#"+a,t)}function LP1(e,a,t){e.c||(e.c=[]),e.c.push({t:a,a:t||"SheetJS"})}function _P1(e,a,t,c){for(var r=typeof a!="string"?a:G2(a),n=typeof a=="string"?a:n2(a),i=r.s.r;i<=r.e.r;++i)for(var s=r.s.c;s<=r.e.c;++s){var l=ma(e,i,s);l.t="n",l.F=n,delete l.v,i==r.s.r&&s==r.s.c&&(l.f=t,c&&(l.D=!0))}return e}var kP1={encode_col:p3,encode_row:L3,encode_cell:W1,encode_range:n2,decode_col:Qs,decode_row:Zs,split_cell:Rk1,decode_cell:G3,decode_range:T8,format_cell:Ge,sheet_add_aoa:LL,sheet_add_json:H_,sheet_add_dom:g_,aoa_to_sheet:E8,json_to_sheet:HP1,table_to_sheet:x_,table_to_book:YD1,sheet_to_csv:M_,sheet_to_txt:zP1,sheet_to_json:c9,sheet_to_html:WD1,sheet_to_formulae:MP1,sheet_to_row_object_array:c9,sheet_get_cell:ma,book_new:uo,book_append_sheet:ho,book_set_sheet_visibility:bP1,cell_set_number_format:VP1,cell_set_hyperlink:y_,cell_set_internal_link:wP1,cell_add_comment:LP1,sheet_set_array_formula:_P1,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const AP1=o.defineComponent({__name:"PgaInputFileExcel",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{},excelConfig:{}},{isReadingFile:{type:Boolean,default:!1},isReadingFileModifiers:{}}),emits:o.mergeModels(["newFile","newFileRead"],["update:isReadingFile"]),setup(e,{expose:a,emit:t}){const c=o.useModel(e,"isReadingFile"),r=e,n=t;a({resetInput:s});const i=o.ref();function s(){var f;(f=i.value)==null||f.resetInput()}function l(f){if(n("newFile",f),r.excelConfig){if(!f){n("newFileRead",[]);return}const u=new FileReader;u.onload=function(h){var d;try{c.value=!0;const m=new Uint8Array((d=h.target)==null?void 0:d.result),p=t9(m,{type:"array"}),v=p.SheetNames[0],g=p.Sheets[v],x=r.excelConfig.columns,z=Math.max(...Object.values(x)),C=Array(z).map((b,w)=>`empty${w+1}`);Object.entries(x).forEach(([b,w])=>C[w-1]=b);const y=kP1.sheet_to_json(g,{header:C,range:r.excelConfig.firstRow-1});n("newFileRead",y)}finally{c.value=!1}},u.readAsArrayBuffer(f)}}return(f,u)=>(o.openBlock(),o.createBlock(Os,{ref_key:"inputFileRef",ref:i,label:f.label,withOptionalLabel:f.withOptionalLabel,withLabelSpace:f.withLabelSpace,errors:f.errors,disabled:f.disabled,grow:f.grow,acceptedFormats:["xls","xlsx"],onNewFile:u[0]||(u[0]=h=>l(h))},null,8,["label","withOptionalLabel","withLabelSpace","errors","disabled","grow"]))}}),SP1={class:"input-container"},NP1=["placeholder","disabled"],TP1=["onMousedown"],EP1=["textContent"],FP1=o.defineComponent({__name:"PgaInputSelect",props:o.mergeModels({options:{},descriptionField:{},emptyOptionsText:{type:[String,Number,Function]},placeholder:{type:[String,Number,Function]},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:a}){o.useCssVars(c1=>({"6f5efe36":o.unref(i).input.height,"1c9770e2":o.unref(i).input.padding,"96f82a30":o.unref(i).input.borderColor,"166dbca6":o.unref(i).input.borderRadius,"166c6ab4":o.unref(i).input.backgroundColor,fd10ae78:o.unref(i).input.colorFocus,"53c06342":o.unref(i).input.backgroundColorDisabled,"07a66002":o.unref(i).input.placeholderColor,36546161:o.unref(i).input.paddingWithIcon}));const t=o.useModel(e,"modelValue"),c=e,r=a,n=k3("pgaSelect"),{formOptions:i}=_3.storeToRefs(I3()),s=o.ref(),l=o.ref(),f=o.ref(),u=o.ref(""),h=o.ref(!1),d=o.ref(!1),m=o.computed(()=>c.options.find(c1=>c1.id===t.value)),p=o.computed(()=>!!c.options.length),v=o.computed(()=>{if(d.value)return c.options;const c1=_4.normalizeText(u.value).split(" ");return c.options.filter(F=>{const O=_4.normalizeText(b(F));return c1.every(X=>O.includes(X))})}),g=o.computed(()=>c.disabled||!p.value),x=o.computed(()=>{if(p.value){if(c.placeholder)return H0(c.placeholder)}else return c.emptyOptionsText?H0(c.emptyOptionsText):n("emptyOptionsText")}),z=o.computed(()=>g.value?!1:!!(u.value||t.value)),C=o.computed(()=>g.value?!1:!z.value&&!h.value),y=o.computed(()=>!!(z.value||C.value));o.watch(m,()=>j()),o.watch(l,c1=>{if(!c1)return;const F=document.documentElement.clientHeight,O=document.documentElement.clientWidth,X=s.value.getBoundingClientRect(),f1={};X.top<F/2?f1.top=`${X.bottom}px`:f1.bottom=`${F-X.top}px`,f1.left=`${X.left}px`,f1.right=`${O-X.right}px`,f.value=f1});function b(c1){return H0(c1[c.descriptionField])}function w(){d.value=!0,h.value=!0}function H(){j(),h.value=!1}function T(){d.value=!1}function A(c1){k(c1.id)}function U(){var c1;u.value="",k(null),(c1=s.value)==null||c1.blur()}function D(){var c1;(c1=s.value)==null||c1.focus()}function k(c1){t.value=c1,r("change",c1)}function j(){const c1=m.value;u.value=c1?b(c1):""}return zb(s,()=>{var c1;return(c1=s.value)==null?void 0:c1.blur()}),j(),(c1,F)=>(o.openBlock(),o.createBlock(Ke,{label:c1.label,withOptionalLabel:c1.withOptionalLabel,withLabelSpace:c1.withLabelSpace,errors:c1.errors,grow:c1.grow},{default:o.withCtx(()=>[o.createElementVNode("div",SP1,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":F[0]||(F[0]=O=>u.value=O),ref_key:"inputRef",ref:s,class:o.normalizeClass({"input__with-btn":y.value}),placeholder:x.value,disabled:g.value,onFocus:F[1]||(F[1]=O=>w()),onBlur:F[2]||(F[2]=O=>H()),onInput:F[3]||(F[3]=O=>T())},null,42,NP1),[[o.vModelText,u.value]]),z.value?(o.openBlock(),o.createBlock(S7,{key:0,icon:"xmark",onMousedown:F[4]||(F[4]=o.withModifiers(O=>U(),["prevent"]))})):o.createCommentVNode("",!0),C.value?(o.openBlock(),o.createBlock(S7,{key:1,icon:"chevron-down",onMousedown:F[5]||(F[5]=o.withModifiers(O=>D(),["prevent"]))})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[h.value&&v.value.length?(o.openBlock(),o.createElementBlock("ul",{key:0,ref_key:"dropdownRef",ref:l,class:"input-dropdown",style:o.normalizeStyle(f.value)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.value,O=>(o.openBlock(),o.createElementBlock("li",{key:O.id,class:o.normalizeClass(["dropdown--option",{"dropdown--option__selected":O.id===t.value}]),onMousedown:X=>A(O)},[o.createElementVNode("span",{textContent:o.toDisplayString(b(O))},null,8,EP1)],42,TP1))),128))],4)):o.createCommentVNode("",!0)]))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const DP1=Y1(FP1,[["__scopeId","data-v-93d4ae0c"]]),PP1=["disabled"],BP1=["value"],OP1=o.defineComponent({__name:"PgaSelect",props:o.mergeModels({options:{},descriptionField:{},emptyOptionsText:{type:[String,Number,Function]},placeholder:{type:[String,Number,Function]},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:a}){o.useCssVars(s=>({"72c42ce3":o.unref(r).input.height,f44fd056:o.unref(r).input.padding,a33c3f4a:o.unref(r).input.borderColor,"36a9da9a":o.unref(r).input.borderRadius,"3af9ce99":o.unref(r).input.backgroundColor,"47c88e1e":o.unref(r).input.colorFocus,"179a7796":o.unref(r).input.backgroundColorDisabled}));const t=o.useModel(e,"modelValue"),c=e,{formOptions:r}=_3.storeToRefs(I3()),n=o.computed(()=>!!c.options.length),i=o.computed(()=>c.disabled||!n.value);return(s,l)=>(o.openBlock(),o.createBlock(Ke,{label:s.label,withOptionalLabel:s.withOptionalLabel,withLabelSpace:s.withLabelSpace,errors:s.errors,grow:s.grow},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=f=>t.value=f),disabled:i.value},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.options,f=>(o.openBlock(),o.createElementBlock("option",{key:f.id,value:f.id},o.toDisplayString(o.unref(H0)(f[s.descriptionField])),9,BP1))),128))],8,PP1),[[o.vModelSelect,t.value]])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const RP1=Y1(OP1,[["__scopeId","data-v-54c3f41b"]]),IP1=["disabled"],$P1={class:"slider--thumb"},UP1=o.defineComponent({__name:"PgaSwitch",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},disabled:{type:Boolean},fitContent:{type:Boolean},grow:{},updateFn:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=o.useModel(e,"modelValue"),t=e;async function c(r){if(t.updateFn){const n=r.target.checked;try{await t.updateFn(),a.value=n}catch{a.value=!n}}}return(r,n)=>(o.openBlock(),o.createBlock(Ke,{label:r.label,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,fitContent:r.fitContent,grow:r.grow},{default:o.withCtx(()=>[o.createElementVNode("label",{class:o.normalizeClass(["switch",{"switch__with-label":r.label}])},[o.withDirectives(o.createElementVNode("input",{class:"switch--input","onUpdate:modelValue":n[0]||(n[0]=i=>a.value=i),type:"checkbox",role:"switch",disabled:r.disabled,onChange:n[1]||(n[1]=i=>c(i))},null,40,IP1),[[o.vModelCheckbox,a.value]]),o.createElementVNode("div",{class:o.normalizeClass(["switch--slider",{"switch--slider__checked":a.value,"switch--slider__disabled":r.disabled}])},[o.createElementVNode("div",$P1,[o.createVNode(x3,{class:"thumb--icon",icon:a.value?"check":"xmark"},null,8,["icon"])])],2)],2)]),_:1},8,["label","withOptionalLabel","withLabelSpace","fitContent","grow"]))}});const WP1=Y1(UP1,[["__scopeId","data-v-e527d102"]]),YP1={class:"switch-options"},jP1=["onClick"],qP1=o.defineComponent({__name:"PgaSwitchOptions",props:o.mergeModels({items:{},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({"6158f916":o.unref(t).input.borderRadius,"12a855fe":o.unref(t).input.height,fc7b9fc0:o.unref(t).input.borderColor,"7b1a9844":o.unref(t).input.backgroundColor,"2d3fdc8c":o.unref(t).input.colorFocus,"31b128cc":o.unref(t).input.backgroundColorFocus,31784004:o.unref(t).input.backgroundColorHover}));const a=o.useModel(e,"modelValue"),{formOptions:t}=_3.storeToRefs(I3());return(c,r)=>{const n=o.resolveComponent("PgaInputGroup");return o.openBlock(),o.createBlock(n,{label:c.label,withOptionalLabel:c.withOptionalLabel,withLabelSpace:c.withLabelSpace,errors:c.errors,grow:c.grow},{default:o.withCtx(()=>[o.createElementVNode("div",YP1,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.items,(i,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["switch-options--item",{"switch-options--item__first-item":s===0,"switch-options--item__last-item":s+1===c.items.length,"switch-options--item__active":a.value===i.id}]),key:i.id,onClick:l=>a.value=i.id},[o.createVNode(xe,{text:i.label,icon:i.icon},null,8,["text","icon"])],10,jP1))),128))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"])}}});const GP1=Y1(qP1,[["__scopeId","data-v-9c5b2d88"]]),XP1="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJOCAIAAAG3nMQ3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEY3NjIxREQxMkEwMTFFNjg4QjdFMzIwQjE1Q0RCNTMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEY3NjIxREUxMkEwMTFFNjg4QjdFMzIwQjE1Q0RCNTMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRjc2MjFEQjEyQTAxMUU2ODhCN0UzMjBCMTVDREI1MyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRjc2MjFEQzEyQTAxMUU2ODhCN0UzMjBCMTVDREI1MyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pucw4KEAABZ4SURBVHja7NfLasJAGAZQI6Kv4UJBK0V04fvvpCJKEa1gF32NuNGxAYmXhVllTM7HQIZhFsnhn0uS+deyIa+liQAWLFiwYMFCAAsWLFiwYCGABQsWLFiwEMCCBQsWLFgIYMGCBauaaZX+BvvD3+uTB/1ufbEWq23R+bPpqL6VVejji+JWDetCsN41TqeicHXd4P+lQjY/v/nhND2GBus2SZI9P4e9vNT39hBaPF5RLMPZ5ONuJJPK+qEzHvU7nbbKepK81NUrhvqKCCucdKE9Sl29YN3fCWJAiRqr3NuTf8MKn4Zx30UjwnqXNVg+1rvUlD0LFixYsGAJLFiwYMGCJbBgwYIFC5bAggULFixYAgsWLFiwKp2zAOzcQQsBQRgG4JRCyYYoalsH5f//FqWUAym/gDhSSiJ2N4cZu8/bXPfy9M3OzOVtaMA1WbBgwYIFCwEsWLBgwYKFABYsWLBgwUIACxYsWLBgIYAFCxYsWLVP4C6a7f5wuRTtp8vSSafdqilW2X6j5WoTtikx8GQt5lnS6xbHPZ7O9cV6GTENuDn50qkZWw9ZeKxP2+ouFZVXpJ1/z0Zha80jvWc9gN6nKZL5akYlFXlZolLXqpyGsLwNf7s6aMDNz3jUX292pT4ZDpKaYs3S6W390Tb0z4IFCxYsWAILFixYsGAJLFiwYMGCJbBgwYIFC5bAggULFqyK5ioAe/evojAMAHAY/+FTuMi56HDc4vu/goPDcdJFV0Xl5KiTlUBvsVI1RTTftxWkYvmZxAzGP+DiW4iwEBYIC2EhLBAWwkJYICyEhbBAWAgLYYGwEBbCAmEhLIQFwkJYCAuEhbAQFggLYZGCbrKfPM+Ps/lP0+/yKgedCSuaUNVNJ1XfJBxhud7snnvam7Ceb/6dHQ5/iY801ljxB5iyqnC52/96LEas+Dqddp312edkVHXevLA4z32LbLnZ7s8Xrdb0a1xzyR8u5SWsSh/Dwd2/IuUlrLo/6MolfP2NifAyC39hVSZ18RJhPZoUthsiKCY7D8GI1Yhi3e0hGLGiWWSr6MNVccPynv1+L80Hm/SRJ/8bV42NgsnuPiQ9FV7fuMJUiLAQFggLYSEsEBbCQlggLISFsEBYCAthgbAQFsICYSEshAXCQlgIC4SFsBAWCAth8UZOArBzLy0JRGEAhhNCpYttImjThbJCiaBF/3/toohQMA0rokXRxS6ULZqCgSGKVGKm23me1aFA6fDyzWkGDfprjDCxEBYIC2EhLIRlCxAWwkJYICyEhbBAWAgLYYGwEBbCAmEhLIQFwkJYCAuEhbAQFggLYSEsEBbCQlggLISFsEBYCAthgbAQFsICYSEshAXCQlgIC4SFsBAWCAthISwQFsJCWCAshMU/MhryH9/rPXWOT7N45WIxPzszXSjkhRWc2nY9uxe/ub0/O7/aqJaDbSvQS+HrrPqGd9mtt0yssDxHUbzY2qxmFG7IVTm8Y2Jlf3FMZkxldXFifMyemFgpX7kazc7FZde2CCv9U/bB4YltEdYPqO009g+O7YOwUq5qJIquu7faElY/G9Xyu5+sLs/3rypea0tY/RQK+bdtrVeWp0oTA6vSltsNQ7U18Gbpx6retrWyNGcbTawvnqs++625JazBujd37x4m9q9KW8Iaqqpm+2i33kraGqaqpK3vebwtrD9ZVbyO2xq+KhzeB1eVtGVbTKyUq0JYqhLWr6QqYSEs/FcYuI8PoRFWCkL+AKCwUj0B5HLx4uGxl6xT1Gh2hBX0iNprtLN7l9LkuMO7c1X6Va2VF0ysEIdWRp9WZcTtBoSFsBCWLUBYCAthgbAQFsICYSEshAXCQlgIC4SFsBAWCAthISwQFsJCWCAshIWwQFgIC2GBsBAWwgJhISyEBcJCWAgLhIWwEBYIC2EhLBAWwkJYICyEhbBAWAgLYYGwEBbCAmHxA14EYO/uX5oIAwCO3+k2EV+RWmqzJCaBQsN+6P//LYoI/GHCULS07A3C+UJZq/XoxbIszfNq3vx8ENl0oLuD7z3P7V7ih4+eWAqALSGAYAGCBSBYAIIFCBaAYAEIFiBYAIIFIFiAYAEIFoBgAYIFIFgAggUIFoBgAQgWIFgAggUgWIBgAQgWgGABggUgWIBgAQgWgGABggUgWACCBQgWgGABCBYgWACCBSBYgGABCBaAYAGCBSBYAIIFCBaAYAEIFiBYAIIFIFiAYAEIFoBgAYIFIFiAYAEIFkB2ChbBFXRw8Gm5sf651crrG4jj2nx1YKBkVQoWPa7eWNvf/5Dv99BuL9VXioXC4r27Vqhg0ctjq+O1GhoarM5WcvT/b7588357J3kcRojNnb2x0WGrVbDoTV/b7eNPK1PlfE2sZm7e6AQraLW+WKeCBYdjsVC33b39/r7+4aHB8BP7jBAsLl2nluorf/rtxPho9c6MpUS3OKyBH7Zevz2lVkGYjj1+Wg9Rs6wQLLo8tnqx9e5vXrm+sXXBP7S6tql6mBLyX7ZyfSm3c4fzzeXV6GjHfxisjY+N3K5M2jWGYHFuIRyzt6aebbw685WhMhdJVcd2czd8yRaCRRrlaxNjI8Mny9JRmb4+PVm+eKpkC8Eim3HWg8X5JDTR0cGZ4XuxUEiRkjNTJVsIFpmVK0p77NW5UiVbCBbdkTpVsoVgkZnmzl5j9XnyuLYwd7IjmaRKthAsMktVIjm4tJOtzFP1S7ZSfCiJYCFV0clsRXH8j1IFgkUGqfqJWiFY5CBVIFh0y+nXaYDLwMnPgGABCBZwZdmHxXeHZxHeX7AcMMICMMLivBuoOD7+NO9HMCR3x8AIi56d99UW5oqF/G+o4vi3pzRihEWvNSu5YXJyxauPubq2eqlUDINEnRIsrmK5IncbxJQQQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECcuSbAOzdXW8SWQCAYalUWlsFRN2mIau7UpvQmMYb//+dMdFEk3U/NNtt2i4qVPqJFAqtozXEoNvFQZCZeZ6LphASZuaEt+cMA009fPTYUQDMsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAgQLQLAABAsQLIBJlXYIkqnVah82mju7+51uNzJ/XaemCvns/NxsJnPJCAoWSfG2vvf3+lYUt3x37yD4WVy8UcjnZMuSkPirvK5GtFY9W5Xa5r9vDKVgEf+VYPBqj8GO1Hf3g30xoIJFnMVpYvJibcOAJo1zWMlS/3gOqGd1ZSla2//s+cve781my4AKFrF2evr5LeetsSQEECzAkhD6nL0Bd9hodk+6l2dnptNpi0cEi0l02Hj3+1//9N05Nzdbul2ULSwJmSDrm5UvaxVoNJrPnr906ROCxaR4W9+r1nbOeYBmIVhMhKBEg3xk51V127FCsPjBjgabOp0/BQPBYhze1OqDz8WGXHhaVyJYDOW40xnDs5x9s41zYQgWQ5lOj/wal8+/h0uzECzCW1y4PuAjw12NVd2u953U1ywEi9HOsIqLN8LVan3j1Zf3axaCRRjBvGm5dOt/HpRKFfK571UrzUKwCC97df78CdRqufSt68Hza6VZCBbhLS7cvFcuBTOpvvuv5a6uriyNolaaxeB8+Jl+szOZB/fLQT5OTk/b7eOZj5EKcaJ98Fr1mhWiiZhhwYdCBeUKFonBL2OolXkWgsWPEa5WmoVgEaVaaRaCRZRqpVkIFsMK8vHk6Z/rm5Ux1EqzECyGqtVvf6x1T7rV2s5/Nev71kqzECyGqtWnMH2tWaOo1ZngqQ0BgkWYWn21WaOrFQgWQ9Wqr1lqxTi50p1vrlWvWUdH7f2DhmOFGRYTXaszaoVgEY1agWChViBYqBWChVqBYDFuL9Y21ArBAhAsQLAABAtAsADBApgoPvzMJ3d//dlBQLCIBv8QEEtCAMECLAmJt+l0+rjT6d2sbtezV+ajsvGHjaYRFCwS5Keb+a1KrXcz0t9unMteMaCWhMRZIZ+Lzb7cKi4YUMEizjKZS+XlX2KwI3duF72tKVjE3/zc5dWVpQupVHR34V65VLiWNZQJ5BxWQudZD+6XW632cafT7Z5EZbMvXpyaTqcvuGRMsEhmtrzysSQEECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsAMECBAtAsAAECxAsAMECECxAsAAEC0CwAMECECxAsAAEC0CwAMECECwAwQIEC0CwAAQLECwAwQIQLECwAAQLQLAAwQIQLADBAgQLQLAABAsQLADBAhAsQLAABAtAsADBAhAsILneC9De/f80cccBHG7pwfUoBCpfRGTYscy5Zf//v7As2W9LyCSbsg4BKaRgW0pL4Xaui9kUqwjtleN5cj9cPDzMW01f9O4+zf/08y+mAADgJ0IAAIEFACCwAAAQWAAAAgsAQGABACCwAAAEFgCAwAIAQGABAAgsAACBBQAgsAAAEFgAAAILAEBgAQAgsAAABBYAgMACAEBgAQAILAAAgQUAgMACABBYAAACCwBAYAEAILAAAAQWAIDAAgBAYAEACCwAAIEFAIDAAgAQWAAAAgsAAIEFACCwAAAEFgCAwAIAQGABAAgsAACBBQCAwAIAEFgAAAILAACBBQAgsAAABBYAgMACAEBgAQAILAAAgQUAgMACABBYAAACCwAAgQUAILAAAAQWAAACCwBAYAEACCwAAIEFAIDAAgAQWAAAAgsAAIEFACCwAAAEFgAAAgsAQGABAAgsAAAEFgCAwAIAEFgAAAILAACBBQAgsAAABBYAAAILAEBgAQAILAAABBYAgMACABBYAAAILAAAgQUAILAAAAQWAAACCwBAYAEACCwAAAQWAIDAAgAQWAAACCwAAIEFACCwAAAEFgAAAgsAQGABAAgsAAAEFgCAwAIAEFgAAAgsAACBBQAgsAAAEFgAAAILAEBgAQAILAAABBYAgMACABBYAAAILAAAgQUAILAAABBYAAAjFRgB3E+dTtcQhi0MpwwBBBaQ8aK6jOPXtaN6vXHe6xnIaBQmCrOz06sri5NBoLdAYAGZSquj+vHObs0oRu/i8uL4pJFsyf783OyTtZWcd7ZAYAF3Pa3Oe73Nre1cHJtG6vqlVVl/NJeb0ViQbW5yhyzX1Vmnu/n8pboaK9vVvaP6sXvgINu8gwVZVn21P+DoZBBEUWhKw3De67XbnY8d3dk7XCjPmxIILOBOGvAa/01lbaYUuVA1JP1HCn7d/P3qw3HcbLUNHzLMJULIrMuBVwaDoOAFfniS2U7k8+YAAgsAAIEFADCW3IMFfFr/kbezTrd2WG80Tz9cp3QyCEql6OHSg+I/lx1dfAQEFsCgtHq7SOne4eC1HpLkerecZi6fX3u02H9KTmkBAgvgf2m1d3B4UKtf+3fG8c5uLdmWl8qPlhc1FiCwAP6tq83nL2/4kYVJnNXrjWdPK1HRalvA/eImd+CKutp6Ub2VD4ROTvLb1rZVywGBBdz3uto7OBywQukXNFZywnQbK/nu/c3fLzAaLhEC72udno35Ca+VVs1W+48/X+XieH5u9snaSs6t94DAArh5WvV/pf+co8wCBBaQgvLcTKvVvsUTlqaLI06rk0Zz+6/9K5eWkFmAwAJGLQmOhfL8Uf3Nbd2GFUXhyBZrGJxWMgsQWECajfV0Y33rRfXmjZXUVXKqEeTL56eVzAIEFpBmY71NlureF59kbXVpoTw/7Gr5srSSWYDAAtJprOXwwdzsTLPVru7sf/6yWJNBsL62MlOKxj+tZBYgsIB0MivZklpK9i/juH58Uj9pnrW7F5cX776mMFEoRlOl6eLDpYWJfH4EdXK7aSWzAIEFpJNZ/Z1oZXl1ZTnFP8nw0kpmAQILuHdGk1YyCxBYgLSSWYDAArg7aSWzAIEFjFEVnXW69ZM3N1lfdHzSSmYBAgtIP61+f7HTf8bwoFZfXipfN7PGM61kFiCwgJTT6p2ksT4/s8Y/rT6WWRoLEFjAKNLqWpl1t9LqvxqNU/8GAIEFjDStPplZdzetAAQWkGZafSyzpBUgsABulFYfZpZ5AgILkFa3kFYAAgtAWgEILEBaAQgsQFoBCCxAWgEwyIQRAO+pvtpXVwACCwBAYAEACCwAAAQWAIDAAgDIBMs0AO+bDIJe4ClCAIEF3JIwnHr2bcUcAG7CJUIAAIEFACCwgHT+e+fzA462Tk87na4pDUn/E4cGfEEQFEwJMsw9WJBlpVLUarWvPLSzW0s2I0rFZBAUwylzgCz/iGsEkFVhOLXx5HFhwjslY2ej8tgQQGABd1VUDH/8fiOKQqMYE0nv/vDd18VwKvQOFmSaS4SQcckL+dON9fNe72V1t93uGEhaJoNgo/JYWoHAArLTWP3MSvYv4/h17ajRPG2fdXNxbDjDjqrZmemlxXL/jitpBQILyGBm9XcqX62aBsBQuQcLAEBgAQAILAAAgQUAgMACABBYAAACCwAAgQUAILAAAAQWAAACCwBAYAEACCwAAIEFAIDAAgAQWAAAAgsAAIEFACCwAAAEFgAAAgsAQGABAAgsAAAEFgCAwAIAEFgAAAILAACBBQAgsAAABBYAAAILAEBgAQAILAAABBYAgMACABBYAAAILAAAgQUAILAAAAQWAAACCwBAYAEACCwAAAQWAIDAAgAQWAAACCwAAIEFACCwAAAQWAAAAgsAQGABAAgsAAAEFgCAwAIAEFgAAAgsAACBBQAgsAAAEFgAAAILAEBgAQAILAAABBYAgMACABBYAAAILAAAgQUAILAAABBYAAACCwBAYAEAILAAAAQWAIDAAgAQWAAACCwAAIEFACCwAAAQWAAAAgsAQGABACCwAAAEFgCAwAIAQGABAAgsAACBBQAgsAAAEFgAAAILAEBgAQAgsAAABBYAgMACAEBgAQAILAAAgQUAgMACABBYAAACCwBAYAEAILAAAAQWAIDAAgBAYAEACCwAAIEFAIDAAgAQWAAAAgsAQGABACCwAAAEFgCAwAIAQGABAAgsAACBBQCAwAIAGLm/AW3rpsB12Oi5AAAAAElFTkSuQmCC",ZP1=["src"],QP1=["src"],KP1=o.defineComponent({__name:"PgaImage",props:o.mergeModels({source:{default:"dynamic"},image:{},defaultImage:{},uploadFn:{},deleteFn:{},buttonsLayout:{default:"vertical"},size:{},height:{},width:{},borderRadius:{},rounded:{type:Boolean}},{modelValue:{default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(b=>({"6c327572":s.value}));const a=o.useModel(e,"modelValue"),t=e,c=k3("pgaImage"),r=o.ref(!1),n=o.ref(),i=o.ref(),s=o.ref("0"),l=o.ref(!1),f=o.ref(!1),u=o.computed(()=>a.value?a.value:t.image),h=o.computed(()=>`${I3().imageOptions[`${t.source}Url`]}/${u.value}`),d=o.computed(()=>!!(!u.value||r.value)),m=o.computed(()=>t.defaultImage?`${I3().imageOptions.staticUrl}/${t.defaultImage}`:XP1),p=o.computed(()=>{const b=[];return t.size?b.push({height:t.size,width:t.size}):(t.height&&b.push({height:t.height,width:"auto"}),t.width&&b.push({height:"auto",width:t.width}),t.height&&t.width&&b.push({height:t.height,width:t.width})),b}),v=o.computed(()=>{const b=[];return t.rounded?b.push({borderRadius:"100%"}):t.borderRadius&&b.push({borderRadius:t.borderRadius}),b});o.watch(h,()=>r.value=!1);function g(){r.value=!0}async function x(){var b;(b=i.value)==null||b.click()}async function z(b){var w;(w=i.value)==null||w.resetInput();try{l.value=!0;const H={image:b};a.value=await t.uploadFn(H)}finally{l.value=!1}}async function C(){try{f.value=!0,await t.deleteFn(),a.value=void 0}finally{f.value=!1}}function y(){if(!n.value)return;const b=n.value.getBoundingClientRect();t.buttonsLayout==="horizontal"&&(s.value=`${b.height}px`),t.buttonsLayout==="vertical"&&(s.value=`${b.width}px`)}return o.onMounted(()=>{n.value&&new ResizeObserver(y).observe(n.value)}),(b,w)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["img-wrapper",[`img-wrapper__${b.buttonsLayout}`]])},[o.createElementVNode("div",{class:"img-container",style:o.normalizeStyle(p.value)},[d.value?(o.openBlock(),o.createElementBlock("img",{key:0,class:"img",src:m.value,style:o.normalizeStyle(v.value)},null,12,ZP1)):(o.openBlock(),o.createElementBlock("img",{key:1,class:"img",src:h.value,style:o.normalizeStyle(v.value),onError:w[0]||(w[0]=H=>g())},null,44,QP1))],4),b.uploadFn||b.deleteFn?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"imgButtonsRef",ref:n,class:o.normalizeClass(["img-buttons",[`img-buttons__${b.buttonsLayout}`]])},[b.uploadFn?(o.openBlock(),o.createBlock(c3,{key:0,buttonType:"flat",size:"s",icon:"camera",isLoading:l.value,onClick:w[1]||(w[1]=H=>x())},null,8,["isLoading"])):o.createCommentVNode("",!0),b.uploadFn?(o.openBlock(),o.createBlock(Os,{key:1,ref_key:"inputFileRef",ref:i,class:"input-file",acceptedFormats:["jpeg","jpg","png"],onNewFile:w[2]||(w[2]=H=>z(H))},null,512)):o.createCommentVNode("",!0),!d.value&&b.deleteFn?(o.openBlock(),o.createBlock(us,{key:2,withoutText:"",confirmDeleteText:o.unref(c)("confirmDeleteText"),isLoading:f.value,onDeleteConfirmed:w[3]||(w[3]=H=>C())},null,8,["confirmDeleteText","isLoading"])):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0)],2))}});const JP1=Y1(KP1,[["__scopeId","data-v-0939ea5c"]]),b_=e=>(o.pushScopeId("data-v-09dde44c"),e=e(),o.popScopeId(),e),eB1={key:0,class:"pagination"},aB1={key:0,class:"pagination--item-container"},tB1=b_(()=>o.createElementVNode("span",{textContent:"..."},null,-1)),cB1=["textContent","onClick"],rB1={key:1,class:"pagination--item-container"},nB1=b_(()=>o.createElementVNode("span",{textContent:"..."},null,-1)),iB1=["textContent"],sB1=o.defineComponent({__name:"PgaPagination",props:o.mergeModels({totalCount:{},pageSize:{},preventScrollToTop:{type:Boolean}},{modelValue:{required:!0,default:1},modelModifiers:{}}),emits:o.mergeModels(["newPage"],["update:modelValue"]),setup(e,{emit:a}){const t=o.useModel(e,"modelValue"),c=e,r=a,n=o.computed(()=>Math.ceil(c.totalCount/c.pageSize)),i=o.computed(()=>{const h=[t.value];for(let d=t.value-1;d>=t.value-3&&d>=1;d--)h.unshift(d);for(let d=t.value+1;d<=t.value+3&&d<=n.value;d++)h.push(d);if(h.length===7)return h;if(h.includes(1))for(let d=h[h.length-1]+1;d<=7-h.length+h[h.length-1]&&d<=n.value;d++)h.push(d);else for(let d=h[0]-1;d>=-(7-h.length)+h[0]&&d>=1;d--)h.unshift(d);return h}),s=o.computed(()=>!i.value.includes(1)),l=o.computed(()=>!i.value.includes(n.value));return o.watch(t,f=>{r("newPage",f),c.preventScrollToTop||xb()}),(f,u)=>n.value>1?(o.openBlock(),o.createElementBlock("div",eB1,[s.value?(o.openBlock(),o.createElementBlock("div",aB1,[o.createElementVNode("div",{class:"pagination--item",textContent:"1",onClick:u[0]||(u[0]=h=>t.value=1)}),tB1])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,h=>(o.openBlock(),o.createElementBlock("div",{key:h,class:o.normalizeClass(["pagination--item",{"pagination--item__current":h===t.value}]),textContent:o.toDisplayString(h),onClick:d=>t.value=h},null,10,cB1))),128)),l.value?(o.openBlock(),o.createElementBlock("div",rB1,[nB1,o.createElementVNode("div",{class:"pagination--item",textContent:o.toDisplayString(n.value),onClick:u[1]||(u[1]=h=>t.value=n.value)},null,8,iB1)])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}});const V_=Y1(sB1,[["__scopeId","data-v-09dde44c"]]),oB1=o.defineComponent({__name:"PgaTr",props:{index:{}},setup(e){return(a,t)=>(o.openBlock(),o.createElementBlock("tr",{class:o.normalizeClass([typeof a.index>"u"?"":a.index%2===0?"tr__even":"tr__odd"])},[o.renderSlot(a.$slots,"default",{},void 0,!0)],2))}});const Rh=Y1(oB1,[["__scopeId","data-v-dd6d415a"]]),lB1=o.defineComponent({__name:"PgaTh",props:{title:{type:[String,Number,Function],default:""},align:{default:"left"}},setup(e){return o.useCssVars(a=>({"382ad71d":a.align})),(a,t)=>(o.openBlock(),o.createElementBlock("th",null,[o.createVNode(xe,{text:a.title,showEmptyText:""},null,8,["text"])]))}});const Nt=Y1(lB1,[["__scopeId","data-v-aafcdff9"]]),fB1={class:"td--content"},uB1=o.defineComponent({__name:"PgaTd",props:{align:{default:"left"},fitContent:{type:Boolean}},setup(e){o.useCssVars(c=>({"46d10c70":c.align,"99d2ab4c":t.value}));const a=e,t=o.computed(()=>{if(a.align==="left")return"flex-start";if(a.align==="center")return"center";if(a.align==="right")return"flex-end"});return(c,r)=>(o.openBlock(),o.createElementBlock("td",{class:o.normalizeClass({"td__fit-content":!!c.fitContent})},[o.createElementVNode("div",fB1,[o.renderSlot(c.$slots,"default",{},void 0,!0)])],2))}});const Tt=Y1(uB1,[["__scopeId","data-v-2db20038"]]),hB1={class:"filters-modal-container"},dB1=o.defineComponent({__name:"PgaFiltersModal",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const a=o.useModel(e,"modelValue"),t=k3("pgaTable");return(c,r)=>{const n=o.resolveComponent("PgaModal");return o.openBlock(),o.createBlock(n,{modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=i=>a.value=i),title:o.unref(t)("filtersModalTitle")},{default:o.withCtx(()=>[o.createElementVNode("div",hB1,[o.renderSlot(c.$slots,"default",{},void 0,!0)])]),_:3},8,["modelValue","title"])}}});const mB1=Y1(dB1,[["__scopeId","data-v-3d34076b"]]),Ur=o.defineComponent({__name:"PgaActionsButtons",props:o.mergeModels({item:{},getDescriptionFn:{type:Function},withEditButton:{type:Boolean},deleteFn:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["editItem"],["update:modelValue"]),setup(e,{emit:a}){const t=o.useModel(e,"modelValue"),c=e,r=a;async function n(i){try{t.value.push(i.id),await c.deleteFn(i)}finally{t.value=t.value.filter(s=>s!==i.id)}}return(i,s)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[i.withEditButton?(o.openBlock(),o.createBlock(hV,{key:0,onClick:s[0]||(s[0]=l=>r("editItem",i.item))})):o.createCommentVNode("",!0),i.deleteFn?(o.openBlock(),o.createBlock(us,{key:1,confirmDeleteText:i.getDescriptionFn(i.item),isLoading:t.value.includes(i.item.id),onDeleteConfirmed:s[1]||(s[1]=l=>n(i.item))},null,8,["confirmDeleteText","isLoading"])):o.createCommentVNode("",!0)],64))}}),pB1={class:"table-container"},vB1={key:0,class:"table-header"},gB1={key:2,class:"header--search-container"},xB1={class:"indentation-content"},CB1={key:0,class:"indentation-line"},zB1={key:1,class:"actions-buttons"},MB1={key:1,class:"small-devices-list"},HB1={class:"small-devices-actions-buttons"},yB1={key:2,class:"items-selected"},bB1=["textContent"],VB1=o.defineComponent({__name:"PgaTable",props:o.mergeModels({columns:{},columnsAlign:{},createItemBtnText:{},withEditButton:{type:Boolean},deleteFn:{type:Function},actionsOptions:{},useDropdown:{type:Boolean},items:{},descriptionField:{},totalCount:{},noItemsLabel:{type:[String,Number,Function]},preventDisplayNoItemsIcon:{type:Boolean},searchInputPlaceholder:{},filters:{},indentation:{},isLoading:{type:Boolean}},{searchParams:{},searchParamsModifiers:{},itemsSelected:{},itemsSelectedModifiers:{}}),emits:o.mergeModels(["createItem","editItem","refreshList"],["update:searchParams","update:itemsSelected"]),setup(e,{emit:a}){const t=o.useModel(e,"searchParams"),c=o.useModel(e,"itemsSelected"),r=e,n=a,i=k3("pgaTable"),s=o.ref([]),l=o.ref(),f=o.ref([]),u=o.ref({isActive:!1}),h=o.computed(()=>{const D={};for(const k in r.columns){const j=r.columns[k];j.hide||(D[k]=j)}return D}),d=o.computed(()=>{if(!r.indentation)return!1;for(const D of r.items)if(D[r.indentation.propName].length>0)return!0;return!1}),m=o.computed(()=>{if(!d.value)return r.items;const D=[];for(const k of r.items)D.push(k),H(k)&&D.push(...k[r.indentation.propName]);return D}),p=o.computed(()=>!!c.value),v=o.computed(()=>{var D;return!!(r.withEditButton||r.deleteFn||(D=r.actionsOptions)!=null&&D.length)}),g=o.computed(()=>{var D;return(D=r.actionsOptions)!=null&&D.length?!0:r.useDropdown}),x=o.computed(()=>{var D,k;return((D=t.value)==null?void 0:D.page)&&((k=t.value)==null?void 0:k.pageSize)&&r.totalCount}),z=o.computed(()=>{var D;return((D=t.value)==null?void 0:D.search)!==void 0}),C=o.computed(()=>r.filters?Object.values(r.filters).reduce((D,k)=>k?D+1:D,0):0);o.watch(()=>r.items,()=>{p.value&&(c.value=[])});function y(D){if(r.descriptionField)return H0(D[r.descriptionField])}function b(){t.value.page=1,n("refreshList")}function w(D){return r.items.map(j=>j.id).includes(D.id)}function H(D){return s.value.includes(D.id)}function T(D){s.value.push(D.id)}function A(D){s.value=s.value.filter(k=>k!==D.id)}function U(){l.value.toggleItemSelected()}return(D,k)=>(o.openBlock(),o.createElementBlock("div",pB1,[D.createItemBtnText||D.$slots.header||z.value||D.isLoading||D.$slots.filters?(o.openBlock(),o.createElementBlock("div",vB1,[D.createItemBtnText?(o.openBlock(),o.createBlock(c3,{key:0,icon:"plus",text:D.createItemBtnText,onClick:k[0]||(k[0]=j=>n("createItem"))},null,8,["text"])):o.createCommentVNode("",!0),o.renderSlot(D.$slots,"header",{},void 0,!0),D.$slots.filters?(o.openBlock(),o.createBlock(c3,{key:1,class:"header--filters-btn",icon:"filter",color:"sky",text:o.unref(i)("filtersBtn"),numberToDisplay:C.value,onClick:k[1]||(k[1]=j=>u.value.isActive=!0)},null,8,["text","numberToDisplay"])):o.createCommentVNode("",!0),o.createVNode(mB1,{modelValue:u.value.isActive,"onUpdate:modelValue":k[2]||(k[2]=j=>u.value.isActive=j)},{default:o.withCtx(()=>[o.renderSlot(D.$slots,"filters",{},void 0,!0)]),_:3},8,["modelValue"]),z.value||D.isLoading?(o.openBlock(),o.createElementBlock("div",gB1,[z.value?(o.openBlock(),o.createBlock(N7,{key:0,class:"header--search",modelValue:t.value.search,"onUpdate:modelValue":k[3]||(k[3]=j=>t.value.search=j),placeholder:D.searchInputPlaceholder,onEnter:k[4]||(k[4]=j=>b()),onValueCleared:k[5]||(k[5]=j=>b())},null,8,["modelValue","placeholder"])):o.createCommentVNode("",!0),D.isLoading?(o.openBlock(),o.createBlock(_a,{key:1,size:"0.7em"})):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["header--filters",{"header--filters__with-search":z.value}])},[o.renderSlot(D.$slots,"filters",{},void 0,!0)],2)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["table-wrapper",{"table-wrapper__with-small-devices-list":D.$slots.smallDevicesItem}])},[o.createElementVNode("table",null,[o.createElementVNode("thead",null,[o.createVNode(Rh,null,{default:o.withCtx(()=>[p.value?(o.openBlock(),o.createBlock(Nt,{key:0})):o.createCommentVNode("",!0),d.value?(o.openBlock(),o.createBlock(Nt,{key:1})):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,(j,c1)=>(o.openBlock(),o.createBlock(Nt,{key:c1,title:j.title,align:j.align||D.columnsAlign},null,8,["title","align"]))),128)),v.value?(o.openBlock(),o.createBlock(Nt,{key:2,title:o.unref(i)("columnTitleActions")},null,8,["title"])):o.createCommentVNode("",!0)]),_:1})]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(m.value,(j,c1)=>(o.openBlock(),o.createBlock(Rh,{key:j.id,index:c1},{default:o.withCtx(()=>[p.value?(o.openBlock(),o.createBlock(Tt,{key:0,fitContent:""},{default:o.withCtx(()=>[o.createVNode(gn,{modelValue:c.value,"onUpdate:modelValue":k[6]||(k[6]=F=>c.value=F),items:m.value,item:j},null,8,["modelValue","items","item"])]),_:2},1024)):o.createCommentVNode("",!0),d.value?(o.openBlock(),o.createBlock(Tt,{key:1,fitContent:""},{default:o.withCtx(()=>[o.createElementVNode("div",xB1,[w(j)?H(j)?(o.openBlock(),o.createBlock(x3,{key:1,icon:"caret-down",clickable:"",onClick:F=>A(j)},null,8,["onClick"])):j[r.indentation.propName].length>0?(o.openBlock(),o.createBlock(x3,{key:2,icon:"caret-right",clickable:"",onClick:F=>T(j)},null,8,["onClick"])):o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",CB1))])]),_:2},1024)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,(F,O)=>(o.openBlock(),o.createBlock(Tt,{key:O,align:F.align||D.columnsAlign,fitContent:F.fitContent},{default:o.withCtx(()=>[o.renderSlot(D.$slots,O,{item:j},void 0,!0)]),_:2},1032,["align","fitContent"]))),128)),v.value?(o.openBlock(),o.createBlock(Tt,{key:2,fitContent:""},{default:o.withCtx(()=>[g.value?(o.openBlock(),o.createBlock(Mb,{key:0,item:j,options:D.actionsOptions,align:"right"},{default:o.withCtx(()=>[o.createVNode(Ur,{modelValue:f.value,"onUpdate:modelValue":k[7]||(k[7]=F=>f.value=F),item:j,getDescriptionFn:y,withEditButton:D.withEditButton,deleteFn:D.deleteFn,onEditItem:k[8]||(k[8]=F=>n("editItem",F))},null,8,["modelValue","item","withEditButton","deleteFn"])]),_:2},1032,["item","options"])):(o.openBlock(),o.createElementBlock("div",zB1,[o.createVNode(Ur,{modelValue:f.value,"onUpdate:modelValue":k[9]||(k[9]=F=>f.value=F),item:j,getDescriptionFn:y,withEditButton:D.withEditButton,deleteFn:D.deleteFn,onEditItem:k[10]||(k[10]=F=>n("editItem",F))},null,8,["modelValue","item","withEditButton","deleteFn"])]))]),_:2},1024)):o.createCommentVNode("",!0)]),_:2},1032,["index"]))),128))])])],2),D.$slots.smallDevicesItem?(o.openBlock(),o.createElementBlock("div",MB1,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(m.value,j=>(o.openBlock(),o.createElementBlock("div",{key:j.id,class:"small-devices-item-container"},[o.renderSlot(D.$slots,"smallDevicesItem",{item:j},void 0,!0),o.createVNode(fV),o.createElementVNode("div",HB1,[o.createVNode(Ur,{modelValue:f.value,"onUpdate:modelValue":k[11]||(k[11]=c1=>f.value=c1),item:j,getDescriptionFn:y,withEditButton:D.withEditButton,deleteFn:D.deleteFn,onEditItem:k[12]||(k[12]=c1=>n("editItem",c1))},null,8,["modelValue","item","withEditButton","deleteFn"])])]))),128))])):o.createCommentVNode("",!0),o.createVNode(Tw,{items:m.value,label:D.noItemsLabel,preventDisplayIcon:D.preventDisplayNoItemsIcon,isLoading:D.isLoading},null,8,["items","label","preventDisplayIcon","isLoading"]),p.value&&m.value.length?(o.openBlock(),o.createElementBlock("div",yB1,[o.createVNode(gn,{ref_key:"itemsSelectedRef",ref:l,modelValue:c.value,"onUpdate:modelValue":k[13]||(k[13]=j=>c.value=j),items:m.value},null,8,["modelValue","items"]),o.createVNode(fs,{class:"items-selected--select-all-btn",text:o.unref(i)("selectAllBtn"),onClick:k[14]||(k[14]=j=>U())},null,8,["text"]),o.createElementVNode("span",{class:"items-selected--selected-items-text",textContent:o.toDisplayString(o.unref(i)("withTheSelectedItemsText"))},null,8,bB1),o.renderSlot(D.$slots,"itemsSelected",{},void 0,!0)])):o.createCommentVNode("",!0),x.value?(o.openBlock(),o.createBlock(V_,{key:3,modelValue:t.value.page,"onUpdate:modelValue":k[15]||(k[15]=j=>t.value.page=j),pageSize:t.value.pageSize,totalCount:D.totalCount,onNewPage:k[16]||(k[16]=j=>n("refreshList"))},null,8,["modelValue","pageSize","totalCount"])):o.createCommentVNode("",!0)]))}});const wB1=Y1(VB1,[["__scopeId","data-v-1517c232"]]),LB1=Object.freeze(Object.defineProperty({__proto__:null,PgaBackButton:Kv1,PgaBadge:eh1,PgaButton:c3,PgaButtonLink:fs,PgaCheckbox:g_1,PgaColorCircle:Cb,PgaColorSelector:z_1,PgaDatePicker:lV,PgaDeleteButton:us,PgaDisplayBarcodes:oL1,PgaDisplayDatetime:hL1,PgaDisplayInfo:CL1,PgaDisplayNoItems:Tw,PgaDisplayPrice:LL1,PgaDisplayText:xe,PgaDoughnutChart:rL1,PgaDropdown:Mb,PgaEditButton:hV,PgaForm:Ew,PgaFormRow:NL1,PgaIcon:x3,PgaIconSelector:y_1,PgaImage:JP1,PgaInfoCardFullPage:mh1,PgaInput:N7,PgaInputFile:Os,PgaInputFileExcel:AP1,PgaInputGroup:Ke,PgaInputSelect:DP1,PgaIsEnabled:ph1,PgaItemSelected:gn,PgaLink:lg1,PgaLoginForm:d_1,PgaLogoutButton:fg1,PgaModal:Hh1,PgaMonthSelector:$v1,PgaPagination:V_,PgaRemoveButton:ug1,PgaSelect:RP1,PgaSeparator:fV,PgaSpinner:_a,PgaSwitch:WP1,PgaSwitchOptions:GP1,PgaTable:wB1,PgaToggleButton:hg1,PgaUserMenu:Qv1},Symbol.toStringTag,{value:"Module"})),_B1={class:"notifications"},kB1=o.defineComponent({__name:"Notifications",setup(e){const a=k3("notifications"),{notificationsOptions:t}=_3.storeToRefs(I3()),{notifications:c}=_3.storeToRefs(w0());return(r,n)=>(o.openBlock(),o.createElementBlock("div",_B1,[o.createVNode(o.TransitionGroup,{name:"notifications--transition-group"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(c),i=>(o.openBlock(),o.createElementBlock("div",{key:i.id,class:"notifications--notification",style:o.normalizeStyle({"border-left-color":`var(--pga-color-${i.type})`})},[o.createVNode(xe,{class:"notifications--message",text:i.message},null,8,["text"]),o.unref(t).preventRemove?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(x3,{key:0,class:"notifications--xmark",icon:"xmark",onClick:s=>o.unref(Bs)(i.id)},null,8,["onClick"]))],4))),128))]),_:1}),!o.unref(t).preventRemove&&o.unref(c).length?(o.openBlock(),o.createBlock(fs,{key:0,class:"notifications--remove-all-btn",text:o.unref(a)("removeAllBtn"),onClick:n[0]||(n[0]=i=>o.unref($w)())},null,8,["text"])):o.createCommentVNode("",!0)]))}});const AB1=Y1(kB1,[["__scopeId","data-v-45c95570"]]);function SB1(){const e=document.createElement("div");document.body.appendChild(e),o.createApp({render(){return o.h(AB1)}}).mount(e)}const W0=k3("validations"),NB1=n4.withMessage(()=>W0("requiredRuleError"),jn),TB1=e=>n4.withMessage(()=>W0("minLengthRuleError",{minLength:e}),a_1(e)),EB1=e=>n4.withMessage(()=>W0("maxLengthRuleError",{maxLength:e}),JL1(e)),FB1=n4.withMessage(()=>W0("integerRuleError"),n_1),DB1=e=>n4.withMessage(()=>W0("lessEqualRuleError",{number:e}),n4.withParams({},a=>typeof a!="number"?!0:a<=e)),PB1=e=>n4.withMessage(()=>W0("greaterEqualRuleError",{number:e}),n4.withParams({},a=>typeof a!="number"?!0:a>=e)),BB1=e=>n4.withMessage(()=>W0("lessThanRuleError",{number:e}),n4.withParams({},a=>typeof a!="number"?!0:a<e)),OB1=e=>n4.withMessage(()=>W0("greaterThanRuleError",{number:e}),n4.withParams({},a=>typeof a!="number"?!0:a>e));M9.add(Oe1);M9.add(X81);M9.add(as1);function RB1(e,a){const t=_4.mergeDeep(ns1,a);I3().options=_4.removeProps(t,"colors"),yy(t.colors),e.use(Uh),e.use(Nk,A_),Object.entries(LB1).forEach(([c,r])=>{e.component(c,r)}),SB1()}exports.addNotification=Iw;exports.animation=Ys1;exports.clearNotifications=$w;exports.copyModelFields=qu1;exports.createI18n=wy;exports.default=RB1;exports.displayAlert=uV;exports.getCoinAmountInString=Us1;exports.getColorType=Q8;exports.getDatetimeInString=js1;exports.getFinalValue=H0;exports.getLanguage=o7;exports.getNumberInString=l7;exports.getRandomColorSelector=ss1;exports.getTheme=sn;exports.greaterEqualRule=PB1;exports.greaterThanRule=OB1;exports.integerRule=FB1;exports.isCurrentUrl=Gu1;exports.lessEqualRule=DB1;exports.lessThanRule=BB1;exports.maxLengthRule=EB1;exports.minLengthRule=TB1;exports.removeNotification=Bs;exports.requiredRule=NB1;exports.rgba=Ws1;exports.scrollToTop=xb;exports.setBodyOverflow=f7;exports.setColor=ls1;exports.setColors=yy;exports.setColorsVariable=Pt;exports.setLanguage=$s1;exports.setTheme=os1;exports.useColorsStore=zi;