pangea-lib 3.0.77 → 3.0.78

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
@@ -833,7 +833,7 @@ A valid view must be one of: ${Iu.join(", ")}.`),e="week"),this.enabledViews.inc
833
833
  * Released under the MIT License
834
834
  */class OW{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,a,r,n){const c=a.listeners[n],i=a.duration;c.forEach(s=>s({chart:t,initial:a.initial,numSteps:i,currentStep:Math.min(r-a.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=dy.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let a=0;this._charts.forEach((r,n)=>{if(!r.running||!r.items.length)return;const c=r.items;let i=c.length-1,s=!1,l;for(;i>=0;--i)l=c[i],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(c[i]=c[c.length-1],c.pop());s&&(n.draw(),this._notify(n,r,t,"progress")),c.length||(r.running=!1,this._notify(n,r,t,"complete"),r.initial=!1),a+=c.length}),this._lastDate=t,a===0&&(this._running=!1)}_getAnims(t){const a=this._charts;let r=a.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},a.set(t,r)),r}listen(t,a,r){this._getAnims(t).listeners[a].push(r)}add(t,a){!a||!a.length||this._getAnims(t).items.push(...a)}has(t){return this._getAnims(t).items.length>0}start(t){const a=this._charts.get(t);a&&(a.running=!0,a.start=Date.now(),a.duration=a.items.reduce((r,n)=>Math.max(r,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const a=this._charts.get(t);return!(!a||!a.running||!a.items.length)}stop(t){const a=this._charts.get(t);if(!a||!a.items.length)return;const r=a.items;let n=r.length-1;for(;n>=0;--n)r[n].cancel();a.items=[],this._notify(t,a,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var tt=new OW;const ud="transparent",PW={boolean(e,t,a){return a>.5?t:e},color(e,t,a){const r=td(e||ud),n=r.valid&&td(t||ud);return n&&n.valid?n.mix(r,a).hexString():t},number(e,t,a){return e+(t-e)*a}};class BW{constructor(t,a,r,n){const c=a[r];n=Ya([t.to,n,c,t.from]);const i=Ya([t.from,c,n]);this._active=!0,this._fn=t.fn||PW[t.type||typeof i],this._easing=hr[t.easing]||hr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=a,this._prop=r,this._from=i,this._to=n,this._promises=void 0}active(){return this._active}update(t,a,r){if(this._active){this._notify(!1);const n=this._target[this._prop],c=r-this._start,i=this._duration-c;this._start=r,this._duration=Math.floor(Math.max(i,t.duration)),this._total+=c,this._loop=!!t.loop,this._to=Ya([t.to,a,n,t.from]),this._from=Ya([t.from,n,a])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const a=t-this._start,r=this._duration,n=this._prop,c=this._from,i=this._loop,s=this._to;let l;if(this._active=c!==s&&(i||a<r),!this._active){this._target[n]=s,this._notify(!0);return}if(a<0){this._target[n]=c;return}l=a/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(c,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((a,r)=>{t.push({res:a,rej:r})})}_notify(t){const a=t?"res":"rej",r=this._promises||[];for(let n=0;n<r.length;n++)r[n][a]()}}class Sy{constructor(t,a){this._chart=t,this._properties=new Map,this.configure(a)}configure(t){if(!u2(t))return;const a=Object.keys(K2.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const c=t[n];if(!u2(c))return;const i={};for(const s of a)i[s]=c[s];(R2(c.properties)&&c.properties||[n]).forEach(s=>{(s===n||!r.has(s))&&r.set(s,i)})})}_animateOptions(t,a){const r=a.options,n=RW(t,r);if(!n)return[];const c=this._createAnimations(n,r);return r.$shared&&FW(t.options.$animations,r).then(()=>{t.options=r},()=>{}),c}_createAnimations(t,a){const r=this._properties,n=[],c=t.$animations||(t.$animations={}),i=Object.keys(a),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"){n.push(...this._animateOptions(t,a));continue}const u=a[f];let d=c[f];const h=r.get(f);if(d)if(h&&d.active()){d.update(h,u,s);continue}else d.cancel();if(!h||!h.duration){t[f]=u;continue}c[f]=d=new BW(h,t,f,u),n.push(d)}return n}update(t,a){if(this._properties.size===0){Object.assign(t,a);return}const r=this._createAnimations(t,a);if(r.length)return tt.add(this._chart,r),!0}}function FW(e,t){const a=[],r=Object.keys(t);for(let n=0;n<r.length;n++){const c=e[r[n]];c&&c.active()&&a.push(c.wait())}return Promise.all(a)}function RW(e,t){if(!t)return;let a=e.options;if(!a){e.options=t;return}return a.$shared&&(e.options=a=Object.assign({},a,{$shared:!1,$animations:{}})),a}function dd(e,t){const a=e&&e.options||{},r=a.reverse,n=a.min===void 0?t:0,c=a.max===void 0?t:0;return{start:r?c:n,end:r?n:c}}function IW(e,t,a){if(a===!1)return!1;const r=dd(e,a),n=dd(t,a);return{top:n.end,right:r.end,bottom:n.start,left:r.start}}function $W(e){let t,a,r,n;return u2(e)?(t=e.top,a=e.right,r=e.bottom,n=e.left):t=a=r=n=e,{top:t,right:a,bottom:r,left:n,disabled:e===!1}}function Ay(e,t){const a=[],r=e._getSortedDatasetMetas(t);let n,c;for(n=0,c=r.length;n<c;++n)a.push(r[n].index);return a}function hd(e,t,a,r={}){const n=e.keys,c=r.mode==="single";let i,s,l,f;if(t===null)return;let u=!1;for(i=0,s=n.length;i<s;++i){if(l=+n[i],l===a){if(u=!0,r.all)continue;break}f=e.values[l],se(f)&&(c||t===0||P4(t)===P4(f))&&(t+=f)}return!u&&!r.all?0:t}function UW(e,t){const{iScale:a,vScale:r}=t,n=a.axis==="x"?"x":"y",c=r.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]={[n]:u,[c]:e[u]};return s}function Ri(e,t){const a=e&&e.options.stacked;return a||a===void 0&&t.stack!==void 0}function WW(e,t,a){return`${e.id}.${t.id}.${a.stack||a.type}`}function qW(e){const{min:t,max:a,minDefined:r,maxDefined:n}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:n?a:Number.POSITIVE_INFINITY}}function jW(e,t,a){const r=e[t]||(e[t]={});return r[a]||(r[a]={})}function md(e,t,a,r){for(const n of t.getMatchingVisibleMetas(r).reverse()){const c=e[n.index];if(a&&c>0||!a&&c<0)return n.index}return null}function pd(e,t){const{chart:a,_cachedMeta:r}=e,n=a._stacks||(a._stacks={}),{iScale:c,vScale:i,index:s}=r,l=c.axis,f=i.axis,u=WW(c,i,r),d=t.length;let h;for(let m=0;m<d;++m){const v=t[m],{[l]:p,[f]:g}=v,y=v._stacks||(v._stacks={});h=y[f]=jW(n,u,p),h[s]=g,h._top=md(h,i,!0,r.type),h._bottom=md(h,i,!1,r.type);const x=h._visualValues||(h._visualValues={});x[s]=g}}function Ii(e,t){const a=e.scales;return Object.keys(a).filter(r=>a[r].axis===t).shift()}function YW(e,t){return v0(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function GW(e,t,a){return v0(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:a,index:t,mode:"default",type:"data"})}function Ta(e,t){const a=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const n of t){const c=n._stacks;if(!c||c[r]===void 0||c[r][a]===void 0)return;delete c[r][a],c[r]._visualValues!==void 0&&c[r]._visualValues[a]!==void 0&&delete c[r]._visualValues[a]}}}const $i=e=>e==="reset"||e==="none",vd=(e,t)=>t?e:Object.assign({},e),XW=(e,t,a)=>e&&!t.hidden&&t._stacked&&{keys:Ay(a,!0),values:null};class l4{constructor(t,a){this.chart=t,this._ctx=t.ctx,this.index=a,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ri(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ta(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,a=this._cachedMeta,r=this.getDataset(),n=(d,h,m,v)=>d==="x"?h:d==="r"?v:m,c=a.xAxisID=a2(r.xAxisID,Ii(t,"x")),i=a.yAxisID=a2(r.yAxisID,Ii(t,"y")),s=a.rAxisID=a2(r.rAxisID,Ii(t,"r")),l=a.indexAxis,f=a.iAxisID=n(l,c,i,s),u=a.vAxisID=n(l,i,c,s);a.xScale=this.getScaleForId(c),a.yScale=this.getScaleForId(i),a.rScale=this.getScaleForId(s),a.iScale=this.getScaleForId(f),a.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const a=this._cachedMeta;return t===a.iScale?a.vScale:a.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Qu(this._data,this),t._stacked&&Ta(t)}_dataCheck(){const t=this.getDataset(),a=t.data||(t.data=[]),r=this._data;if(u2(a)){const n=this._cachedMeta;this._data=UW(a,n)}else if(r!==a){if(r){Qu(r,this);const n=this._cachedMeta;Ta(n),n._parsed=[]}a&&Object.isExtensible(a)&&NU(a,this),this._syncList=[],this._data=a}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const a=this._cachedMeta,r=this.getDataset();let n=!1;this._dataCheck();const c=a._stacked;a._stacked=Ri(a.vScale,a),a.stack!==r.stack&&(n=!0,Ta(a),a.stack=r.stack),this._resyncElements(t),(n||c!==a._stacked)&&(pd(this,a._parsed),a._stacked=Ri(a.vScale,a))}configure(){const t=this.chart.config,a=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),a,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,a){const{_cachedMeta:r,_data:n}=this,{iScale:c,_stacked:i}=r,s=c.axis;let l=t===0&&a===n.length?!0:r._sorted,f=t>0&&r._parsed[t-1],u,d,h;if(this._parsing===!1)r._parsed=n,r._sorted=!0,h=n;else{R2(n[t])?h=this.parseArrayData(r,n,t,a):u2(n[t])?h=this.parseObjectData(r,n,t,a):h=this.parsePrimitiveData(r,n,t,a);const m=()=>d[s]===null||f&&d[s]<f[s];for(u=0;u<a;++u)r._parsed[u+t]=d=h[u],l&&(m()&&(l=!1),f=d);r._sorted=l}i&&pd(this,h)}parsePrimitiveData(t,a,r,n){const{iScale:c,vScale:i}=t,s=c.axis,l=i.axis,f=c.getLabels(),u=c===i,d=new Array(n);let h,m,v;for(h=0,m=n;h<m;++h)v=h+r,d[h]={[s]:u||c.parse(f[v],v),[l]:i.parse(a[v],v)};return d}parseArrayData(t,a,r,n){const{xScale:c,yScale:i}=t,s=new Array(n);let l,f,u,d;for(l=0,f=n;l<f;++l)u=l+r,d=a[u],s[l]={x:c.parse(d[0],u),y:i.parse(d[1],u)};return s}parseObjectData(t,a,r,n){const{xScale:c,yScale:i}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,f=new Array(n);let u,d,h,m;for(u=0,d=n;u<d;++u)h=u+r,m=a[h],f[u]={x:c.parse(f0(m,s),h),y:i.parse(f0(m,l),h)};return f}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,a,r){const n=this.chart,c=this._cachedMeta,i=a[t.axis],s={keys:Ay(n,!0),values:a._stacks[t.axis]._visualValues};return hd(s,i,c.index,{mode:r})}updateRangeFromParsed(t,a,r,n){const c=r[a.axis];let i=c===null?NaN:c;const s=n&&r._stacks[a.axis];n&&s&&(n.values=s,i=hd(n,c,this._cachedMeta.index)),t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}getMinMax(t,a){const r=this._cachedMeta,n=r._parsed,c=r._sorted&&t===r.iScale,i=n.length,s=this._getOtherScale(t),l=XW(a,r,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=qW(s);let h,m;function v(){m=n[h];const p=m[s.axis];return!se(m[t.axis])||u>p||d<p}for(h=0;h<i&&!(!v()&&(this.updateRangeFromParsed(f,t,m,l),c));++h);if(c){for(h=i-1;h>=0;--h)if(!v()){this.updateRangeFromParsed(f,t,m,l);break}}return f}getAllParsedValues(t){const a=this._cachedMeta._parsed,r=[];let n,c,i;for(n=0,c=a.length;n<c;++n)i=a[n][t.axis],se(i)&&r.push(i);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const a=this._cachedMeta,r=a.iScale,n=a.vScale,c=this.getParsed(t);return{label:r?""+r.getLabelForValue(c[r.axis]):"",value:n?""+n.getLabelForValue(c[n.axis]):""}}_update(t){const a=this._cachedMeta;this.update(t||"default"),a._clip=$W(a2(this.options.clip,IW(a.xScale,a.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,a=this.chart,r=this._cachedMeta,n=r.data||[],c=a.chartArea,i=[],s=this._drawStart||0,l=this._drawCount||n.length-s,f=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,c,s,l),u=s;u<s+l;++u){const d=n[u];d.hidden||(d.active&&f?i.push(d):d.draw(t,c))}for(u=0;u<i.length;++u)i[u].draw(t,c)}getStyle(t,a){const r=a?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,a,r){const n=this.getDataset();let c;if(t>=0&&t<this._cachedMeta.data.length){const i=this._cachedMeta.data[t];c=i.$context||(i.$context=GW(this.getContext(),t,i)),c.parsed=this.getParsed(t),c.raw=n.data[t],c.index=c.dataIndex=t}else c=this.$context||(this.$context=YW(this.chart.getContext(),this.index)),c.dataset=n,c.index=c.datasetIndex=this.index;return c.active=!!a,c.mode=r,c}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,a){return this._resolveElementOptions(this.dataElementType.id,a,t)}_resolveElementOptions(t,a="default",r){const n=a==="active",c=this._cachedDataOpts,i=t+"-"+a,s=c[i],l=this.enableOptionSharing&&qr(r);if(s)return vd(s,l);const f=this.chart.config,u=f.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],h=f.getOptionScopes(this.getDataset(),u),m=Object.keys(K2.elements[t]),v=()=>this.getContext(r,n,a),p=f.resolveNamedOptions(h,m,v,d);return p.$shared&&(p.$shared=l,c[i]=Object.freeze(vd(p,l))),p}_resolveAnimations(t,a,r){const n=this.chart,c=this._cachedDataOpts,i=`animation-${a}`,s=c[i];if(s)return s;let l;if(n.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,a),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,r,a))}const f=new Sy(n,l&&l.animations);return l&&l._cacheable&&(c[i]=Object.freeze(f)),f}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,a){return!a||$i(t)||this.chart._animationsDisabled}_getSharedOptions(t,a){const r=this.resolveDataElementOptions(t,a),n=this._sharedOptions,c=this.getSharedOptions(r),i=this.includeOptions(a,c)||c!==n;return this.updateSharedOptions(c,a,r),{sharedOptions:c,includeOptions:i}}updateElement(t,a,r,n){$i(n)?Object.assign(t,r):this._resolveAnimations(a,n).update(t,r)}updateSharedOptions(t,a,r){t&&!$i(a)&&this._resolveAnimations(void 0,a).update(t,r)}_setStyle(t,a,r,n){t.active=n;const c=this.getStyle(a,n);this._resolveAnimations(a,r,n).update(t,{options:!n&&this.getSharedOptions(c)||c})}removeHoverStyle(t,a,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,a,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const a=this._data,r=this._cachedMeta.data;for(const[s,l,f]of this._syncList)this[s](l,f);this._syncList=[];const n=r.length,c=a.length,i=Math.min(c,n);i&&this.parse(0,i),c>n?this._insertElements(n,c-n,t):c<n&&this._removeElements(c,n-c)}_insertElements(t,a,r=!0){const n=this._cachedMeta,c=n.data,i=t+a;let s;const l=f=>{for(f.length+=a,s=f.length-1;s>=i;s--)f[s]=f[s-a]};for(l(c),s=t;s<i;++s)c[s]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,a),r&&this.updateElements(c,t,a,"reset")}updateElements(t,a,r,n){}_removeElements(t,a){const r=this._cachedMeta;if(this._parsing){const n=r._parsed.splice(t,a);r._stacked&&Ta(r,n)}r.data.splice(t,a)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[a,r,n]=t;this[a](r,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,a){a&&this._sync(["_removeElements",t,a]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}v1(l4,"defaults",{}),v1(l4,"datasetElementType",null),v1(l4,"dataElementType",null);function KW(e,t){if(!e._cache.$bar){const a=e.getMatchingVisibleMetas(t);let r=[];for(let n=0,c=a.length;n<c;n++)r=r.concat(a[n].controller.getAllParsedValues(e));e._cache.$bar=uy(r.sort((n,c)=>n-c))}return e._cache.$bar}function ZW(e){const t=e.iScale,a=KW(t,e.type);let r=t._length,n,c,i,s;const l=()=>{i===32767||i===-32768||(qr(s)&&(r=Math.min(r,Math.abs(i-s)||r)),s=i)};for(n=0,c=a.length;n<c;++n)i=t.getPixelForValue(a[n]),l();for(s=void 0,n=0,c=t.ticks.length;n<c;++n)i=t.getPixelForTick(n),l();return r}function QW(e,t,a,r){const n=a.barThickness;let c,i;return x2(n)?(c=t.min*a.categoryPercentage,i=a.barPercentage):(c=n*r,i=1),{chunk:c/r,ratio:i,start:t.pixels[e]-c/2}}function JW(e,t,a,r){const n=t.pixels,c=n[e];let i=e>0?n[e-1]:null,s=e<n.length-1?n[e+1]:null;const l=a.categoryPercentage;i===null&&(i=c-(s===null?t.end-t.start:s-c)),s===null&&(s=c+c-i);const f=c-(c-Math.min(i,s))/2*l;return{chunk:Math.abs(s-i)/2*l/r,ratio:a.barPercentage,start:f}}function eq(e,t,a,r){const n=a.parse(e[0],r),c=a.parse(e[1],r),i=Math.min(n,c),s=Math.max(n,c);let l=i,f=s;Math.abs(i)>Math.abs(s)&&(l=s,f=i),t[a.axis]=f,t._custom={barStart:l,barEnd:f,start:n,end:c,min:i,max:s}}function Ty(e,t,a,r){return R2(e)?eq(e,t,a,r):t[a.axis]=a.parse(e,r),t}function gd(e,t,a,r){const n=e.iScale,c=e.vScale,i=n.getLabels(),s=n===c,l=[];let f,u,d,h;for(f=a,u=a+r;f<u;++f)h=t[f],d={},d[n.axis]=s||n.parse(i[f],f),l.push(Ty(h,d,c,f));return l}function Ui(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function tq(e,t,a){return e!==0?P4(e):(t.isHorizontal()?1:-1)*(t.min>=a?1:-1)}function aq(e){let t,a,r,n,c;return e.horizontal?(t=e.base>e.x,a="left",r="right"):(t=e.base<e.y,a="bottom",r="top"),t?(n="end",c="start"):(n="start",c="end"),{start:a,end:r,reverse:t,top:n,bottom:c}}function rq(e,t,a,r){let n=t.borderSkipped;const c={};if(!n){e.borderSkipped=c;return}if(n===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:i,end:s,reverse:l,top:f,bottom:u}=aq(e);n==="middle"&&a&&(e.enableBorderRadius=!0,(a._top||0)===r?n=f:(a._bottom||0)===r?n=u:(c[yd(u,i,s,l)]=!0,n=f)),c[yd(n,i,s,l)]=!0,e.borderSkipped=c}function yd(e,t,a,r){return r?(e=nq(e,t,a),e=xd(e,a,t)):e=xd(e,t,a),e}function nq(e,t,a){return e===t?a:e===a?t:e}function xd(e,t,a){return e==="start"?t:e==="end"?a:e}function cq(e,{inflateAmount:t},a){e.inflateAmount=t==="auto"?a===1?.33:0:t}class j8 extends l4{parsePrimitiveData(t,a,r,n){return gd(t,a,r,n)}parseArrayData(t,a,r,n){return gd(t,a,r,n)}parseObjectData(t,a,r,n){const{iScale:c,vScale:i}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,f=c.axis==="x"?s:l,u=i.axis==="x"?s:l,d=[];let h,m,v,p;for(h=r,m=r+n;h<m;++h)p=a[h],v={},v[c.axis]=c.parse(f0(p,f),h),d.push(Ty(f0(p,u),v,i,h));return d}updateRangeFromParsed(t,a,r,n){super.updateRangeFromParsed(t,a,r,n);const c=r._custom;c&&a===this._cachedMeta.vScale&&(t.min=Math.min(t.min,c.min),t.max=Math.max(t.max,c.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const a=this._cachedMeta,{iScale:r,vScale:n}=a,c=this.getParsed(t),i=c._custom,s=Ui(i)?"["+i.start+", "+i.end+"]":""+n.getLabelForValue(c[n.axis]);return{label:""+r.getLabelForValue(c[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const a=this._cachedMeta;this.updateElements(a.data,0,a.data.length,t)}updateElements(t,a,r,n){const c=n==="reset",{index:i,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),f=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(a,n);for(let m=a;m<a+r;m++){const v=this.getParsed(m),p=c||x2(v[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(m),g=this._calculateBarIndexPixels(m,u),y=(v._stacks||{})[s.axis],x={horizontal:f,base:p.base,enableBorderRadius:!y||Ui(v._custom)||i===y._top||i===y._bottom,x:f?p.head:g.center,y:f?g.center:p.head,height:f?g.size:Math.abs(p.size),width:f?Math.abs(p.size):g.size};h&&(x.options=d||this.resolveDataElementOptions(m,t[m].active?"active":n));const C=x.options||t[m].options;rq(x,C,y,i),cq(x,C,u.ratio),this.updateElement(t[m],m,x,n)}}_getStacks(t,a){const{iScale:r}=this._cachedMeta,n=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),c=r.options.stacked,i=[],s=this._cachedMeta.controller.getParsed(a),l=s&&s[r.axis],f=u=>{const d=u._parsed.find(m=>m[r.axis]===l),h=d&&d[u.vScale.axis];if(x2(h)||isNaN(h))return!0};for(const u of n)if(!(a!==void 0&&f(u))&&((c===!1||i.indexOf(u.stack)===-1||c===void 0&&u.stack===void 0)&&i.push(u.stack),u.index===t))break;return i.length||i.push(void 0),i}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,a,r){const n=this._getStacks(t,r),c=a!==void 0?n.indexOf(a):-1;return c===-1?n.length-1:c}_getRuler(){const t=this.options,a=this._cachedMeta,r=a.iScale,n=[];let c,i;for(c=0,i=a.data.length;c<i;++c)n.push(r.getPixelForValue(this.getParsed(c)[r.axis],c));const s=t.barThickness;return{min:s||ZW(a),pixels:n,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:a,_stacked:r,index:n},options:{base:c,minBarLength:i}}=this,s=c||0,l=this.getParsed(t),f=l._custom,u=Ui(f);let d=l[a.axis],h=0,m=r?this.applyStack(a,l,r):d,v,p;m!==d&&(h=m-d,m=d),u&&(d=f.barStart,m=f.barEnd-f.barStart,d!==0&&P4(d)!==P4(f.barEnd)&&(h=0),h+=d);const g=!x2(c)&&!u?c:h;let y=a.getPixelForValue(g);if(this.chart.getDataVisibility(t)?v=a.getPixelForValue(h+m):v=y,p=v-y,Math.abs(p)<i){p=tq(p,a,s)*i,d===s&&(y-=p/2);const x=a.getPixelForDecimal(0),C=a.getPixelForDecimal(1),b=Math.min(x,C),M=Math.max(x,C);y=Math.max(Math.min(y,M),b),v=y+p,r&&!u&&(l._stacks[a.axis]._visualValues[n]=a.getValueForPixel(v)-a.getValueForPixel(y))}if(y===a.getPixelForValue(s)){const x=P4(p)*a.getLineWidthForValue(s)/2;y+=x,p-=x}return{size:p,base:y,head:v,center:v+p/2}}_calculateBarIndexPixels(t,a){const r=a.scale,n=this.options,c=n.skipNull,i=a2(n.maxBarThickness,1/0);let s,l;if(a.grouped){const f=c?this._getStackCount(t):a.stackCount,u=n.barThickness==="flex"?JW(t,a,n,f):QW(t,a,n,f),d=this._getStackIndex(this.index,this._cachedMeta.stack,c?t:void 0);s=u.start+u.chunk*d+u.chunk/2,l=Math.min(i,u.chunk*u.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(i,a.min*a.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,a=t.vScale,r=t.data,n=r.length;let c=0;for(;c<n;++c)this.getParsed(c)[a.axis]!==null&&!r[c].hidden&&r[c].draw(this._ctx)}}v1(j8,"id","bar"),v1(j8,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),v1(j8,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Y8 extends l4{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,a,r,n){const c=super.parsePrimitiveData(t,a,r,n);for(let i=0;i<c.length;i++)c[i]._custom=this.resolveDataElementOptions(i+r).radius;return c}parseArrayData(t,a,r,n){const c=super.parseArrayData(t,a,r,n);for(let i=0;i<c.length;i++){const s=a[r+i];c[i]._custom=a2(s[2],this.resolveDataElementOptions(i+r).radius)}return c}parseObjectData(t,a,r,n){const c=super.parseObjectData(t,a,r,n);for(let i=0;i<c.length;i++){const s=a[r+i];c[i]._custom=a2(s&&s.r&&+s.r,this.resolveDataElementOptions(i+r).radius)}return c}getMaxOverflow(){const t=this._cachedMeta.data;let a=0;for(let r=t.length-1;r>=0;--r)a=Math.max(a,t[r].size(this.resolveDataElementOptions(r))/2);return a>0&&a}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart.data.labels||[],{xScale:n,yScale:c}=a,i=this.getParsed(t),s=n.getLabelForValue(i.x),l=c.getLabelForValue(i.y),f=i._custom;return{label:r[t]||"",value:"("+s+", "+l+(f?", "+f:"")+")"}}update(t){const a=this._cachedMeta.data;this.updateElements(a,0,a.length,t)}updateElements(t,a,r,n){const c=n==="reset",{iScale:i,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:f}=this._getSharedOptions(a,n),u=i.axis,d=s.axis;for(let h=a;h<a+r;h++){const m=t[h],v=!c&&this.getParsed(h),p={},g=p[u]=c?i.getPixelForDecimal(.5):i.getPixelForValue(v[u]),y=p[d]=c?s.getBasePixel():s.getPixelForValue(v[d]);p.skip=isNaN(g)||isNaN(y),f&&(p.options=l||this.resolveDataElementOptions(h,m.active?"active":n),c&&(p.options.radius=0)),this.updateElement(m,h,p,n)}}resolveDataElementOptions(t,a){const r=this.getParsed(t);let n=super.resolveDataElementOptions(t,a);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const c=n.radius;return a!=="active"&&(n.radius=0),n.radius+=a2(r&&r._custom,c),n}}v1(Y8,"id","bubble"),v1(Y8,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),v1(Y8,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function iq(e,t,a){let r=1,n=1,c=0,i=0;if(t<$2){const s=e,l=s+t,f=Math.cos(s),u=Math.sin(s),d=Math.cos(l),h=Math.sin(l),m=(C,b,M)=>jr(C,s,l,!0)?1:Math.max(b,b*a,M,M*a),v=(C,b,M)=>jr(C,s,l,!0)?-1:Math.min(b,b*a,M,M*a),p=m(0,f,d),g=m(pe,u,h),y=v(U2,f,d),x=v(U2+pe,u,h);r=(p-y)/2,n=(g-x)/2,c=-(p+y)/2,i=-(g+x)/2}return{ratioX:r,ratioY:n,offsetX:c,offsetY:i}}class I0 extends l4{constructor(t,a){super(t,a),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,a){const r=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=r;else{let c=l=>+r[l];if(u2(r[t])){const{key:l="value"}=this._parsing;c=f=>+f0(r[f],l)}let i,s;for(i=t,s=t+a;i<s;++i)n._parsed[i]=c(i)}}_getRotation(){return n4(this.options.rotation-90)}_getCircumference(){return n4(this.options.circumference)}_getRotationExtents(){let t=$2,a=-$2;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const n=this.chart.getDatasetMeta(r).controller,c=n._getRotation(),i=n._getCircumference();t=Math.min(t,c),a=Math.max(a,c+i)}return{rotation:t,circumference:a-t}}update(t){const a=this.chart,{chartArea:r}=a,n=this._cachedMeta,c=n.data,i=this.getMaxBorderWidth()+this.getMaxOffset(c)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-i)/2,0),l=Math.min(bU(this.options.cutout,s),1),f=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:m,offsetX:v,offsetY:p}=iq(d,u,l),g=(r.width-i)/h,y=(r.height-i)/m,x=Math.max(Math.min(g,y)/2,0),C=iy(this.options.radius,x),b=Math.max(C*l,0),M=(C-b)/this._getVisibleDatasetWeightTotal();this.offsetX=v*C,this.offsetY=p*C,n.total=this.calculateTotal(),this.outerRadius=C-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*f,0),this.updateElements(c,0,c.length,t)}_circumference(t,a){const r=this.options,n=this._cachedMeta,c=this._getCircumference();return a&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*c/$2)}updateElements(t,a,r,n){const c=n==="reset",i=this.chart,s=i.chartArea,f=i.options.animation,u=(s.left+s.right)/2,d=(s.top+s.bottom)/2,h=c&&f.animateScale,m=h?0:this.innerRadius,v=h?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(a,n);let y=this._getRotation(),x;for(x=0;x<a;++x)y+=this._circumference(x,c);for(x=a;x<a+r;++x){const C=this._circumference(x,c),b=t[x],M={x:u+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+C,circumference:C,outerRadius:v,innerRadius:m};g&&(M.options=p||this.resolveDataElementOptions(x,b.active?"active":n)),y+=C,this.updateElement(b,x,M,n)}}calculateTotal(){const t=this._cachedMeta,a=t.data;let r=0,n;for(n=0;n<a.length;n++){const c=t._parsed[n];c!==null&&!isNaN(c)&&this.chart.getDataVisibility(n)&&!a[n].hidden&&(r+=Math.abs(c))}return r}calculateCircumference(t){const a=this._cachedMeta.total;return a>0&&!isNaN(t)?$2*(Math.abs(t)/a):0}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart,n=r.data.labels||[],c=kn(a._parsed[t],r.options.locale);return{label:n[t]||"",value:c}}getMaxBorderWidth(t){let a=0;const r=this.chart;let n,c,i,s,l;if(!t){for(n=0,c=r.data.datasets.length;n<c;++n)if(r.isDatasetVisible(n)){i=r.getDatasetMeta(n),t=i.data,s=i.controller;break}}if(!t)return 0;for(n=0,c=t.length;n<c;++n)l=s.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(a=Math.max(a,l.borderWidth||0,l.hoverBorderWidth||0));return a}getMaxOffset(t){let a=0;for(let r=0,n=t.length;r<n;++r){const c=this.resolveDataElementOptions(r);a=Math.max(a,c.offset||0,c.hoverOffset||0)}return a}_getRingWeightOffset(t){let a=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(a+=this._getRingWeight(r));return a}_getRingWeight(t){return Math.max(a2(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}v1(I0,"id","doughnut"),v1(I0,"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"}),v1(I0,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),v1(I0,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const a=t.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:r,color:n}}=t.legend.options;return a.labels.map((c,i)=>{const l=t.getDatasetMeta(0).controller.getStyle(i);return{text:c,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,a,r){r.chart.toggleDataVisibility(a.index),r.chart.update()}}}});class G8 extends l4{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const a=this._cachedMeta,{dataset:r,data:n=[],_dataset:c}=a,i=this.chart._animationsDisabled;let{start:s,count:l}=my(a,n,i);this._drawStart=s,this._drawCount=l,py(a)&&(s=0,l=n.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!c._decimated,r.points=n;const f=this.resolveDatasetElementOptions(t);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:f},t),this.updateElements(n,s,l,t)}updateElements(t,a,r,n){const c=n==="reset",{iScale:i,vScale:s,_stacked:l,_dataset:f}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(a,n),h=i.axis,m=s.axis,{spanGaps:v,segment:p}=this.options,g=Z6(v)?v:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||c||n==="none",x=a+r,C=t.length;let b=a>0&&this.getParsed(a-1);for(let M=0;M<C;++M){const w=t[M],z=y?w:{};if(M<a||M>=x){z.skip=!0;continue}const H=this.getParsed(M),A=x2(H[m]),V=z[h]=i.getPixelForValue(H[h],M),k=z[m]=c||A?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,H,l):H[m],M);z.skip=isNaN(V)||isNaN(k)||A,z.stop=M>0&&Math.abs(H[h]-b[h])>g,p&&(z.parsed=H,z.raw=f.data[M]),d&&(z.options=u||this.resolveDataElementOptions(M,w.active?"active":n)),y||this.updateElement(w,M,z,n),b=H}}getMaxOverflow(){const t=this._cachedMeta,a=t.dataset,r=a.options&&a.options.borderWidth||0,n=t.data||[];if(!n.length)return r;const c=n[0].size(this.resolveDataElementOptions(0)),i=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,c,i)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}v1(G8,"id","line"),v1(G8,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),v1(G8,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class pr extends l4{constructor(t,a){super(t,a),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart,n=r.data.labels||[],c=kn(a._parsed[t].r,r.options.locale);return{label:n[t]||"",value:c}}parseObjectData(t,a,r,n){return zy.bind(this)(t,a,r,n)}update(t){const a=this._cachedMeta.data;this._updateRadius(),this.updateElements(a,0,a.length,t)}getMinMax(){const t=this._cachedMeta,a={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,n)=>{const c=this.getParsed(n).r;!isNaN(c)&&this.chart.getDataVisibility(n)&&(c<a.min&&(a.min=c),c>a.max&&(a.max=c))}),a}_updateRadius(){const t=this.chart,a=t.chartArea,r=t.options,n=Math.min(a.right-a.left,a.bottom-a.top),c=Math.max(n/2,0),i=Math.max(r.cutoutPercentage?c/100*r.cutoutPercentage:1,0),s=(c-i)/t.getVisibleDatasetCount();this.outerRadius=c-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,a,r,n){const c=n==="reset",i=this.chart,l=i.options.animation,f=this._cachedMeta.rScale,u=f.xCenter,d=f.yCenter,h=f.getIndexAngle(0)-.5*U2;let m=h,v;const p=360/this.countVisibleElements();for(v=0;v<a;++v)m+=this._computeAngle(v,n,p);for(v=a;v<a+r;v++){const g=t[v];let y=m,x=m+this._computeAngle(v,n,p),C=i.getDataVisibility(v)?f.getDistanceFromCenterForValue(this.getParsed(v).r):0;m=x,c&&(l.animateScale&&(C=0),l.animateRotate&&(y=x=h));const b={x:u,y:d,innerRadius:0,outerRadius:C,startAngle:y,endAngle:x,options:this.resolveDataElementOptions(v,g.active?"active":n)};this.updateElement(g,v,b,n)}}countVisibleElements(){const t=this._cachedMeta;let a=0;return t.data.forEach((r,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&a++}),a}_computeAngle(t,a,r){return this.chart.getDataVisibility(t)?n4(this.resolveDataElementOptions(t,a).angle||r):0}}v1(pr,"id","polarArea"),v1(pr,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),v1(pr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const a=t.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:r,color:n}}=t.legend.options;return a.labels.map((c,i)=>{const l=t.getDatasetMeta(0).controller.getStyle(i);return{text:c,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,a,r){r.chart.toggleDataVisibility(a.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class f7 extends I0{}v1(f7,"id","pie"),v1(f7,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class X8 extends l4{getLabelAndValue(t){const a=this._cachedMeta.vScale,r=this.getParsed(t);return{label:a.getLabels()[t],value:""+a.getLabelForValue(r[a.axis])}}parseObjectData(t,a,r,n){return zy.bind(this)(t,a,r,n)}update(t){const a=this._cachedMeta,r=a.dataset,n=a.data||[],c=a.iScale.getLabels();if(r.points=n,t!=="resize"){const i=this.resolveDatasetElementOptions(t);this.options.showLine||(i.borderWidth=0);const s={_loop:!0,_fullLoop:c.length===n.length,options:i};this.updateElement(r,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,a,r,n){const c=this._cachedMeta.rScale,i=n==="reset";for(let s=a;s<a+r;s++){const l=t[s],f=this.resolveDataElementOptions(s,l.active?"active":n),u=c.getPointPositionForValue(s,this.getParsed(s).r),d=i?c.xCenter:u.x,h=i?c.yCenter:u.y,m={x:d,y:h,angle:u.angle,skip:isNaN(d)||isNaN(h),options:f};this.updateElement(l,s,m,n)}}}v1(X8,"id","radar"),v1(X8,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),v1(X8,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class K8 extends l4{getLabelAndValue(t){const a=this._cachedMeta,r=this.chart.data.labels||[],{xScale:n,yScale:c}=a,i=this.getParsed(t),s=n.getLabelForValue(i.x),l=c.getLabelForValue(i.y);return{label:r[t]||"",value:"("+s+", "+l+")"}}update(t){const a=this._cachedMeta,{data:r=[]}=a,n=this.chart._animationsDisabled;let{start:c,count:i}=my(a,r,n);if(this._drawStart=c,this._drawCount=i,py(a)&&(c=0,i=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:l}=a;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=r;const f=this.resolveDatasetElementOptions(t);f.segment=this.options.segment,this.updateElement(s,void 0,{animated:!n,options:f},t)}else this.datasetElementType&&(delete a.dataset,this.datasetElementType=!1);this.updateElements(r,c,i,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,a,r,n){const c=n==="reset",{iScale:i,vScale:s,_stacked:l,_dataset:f}=this._cachedMeta,u=this.resolveDataElementOptions(a,n),d=this.getSharedOptions(u),h=this.includeOptions(n,d),m=i.axis,v=s.axis,{spanGaps:p,segment:g}=this.options,y=Z6(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||c||n==="none";let C=a>0&&this.getParsed(a-1);for(let b=a;b<a+r;++b){const M=t[b],w=this.getParsed(b),z=x?M:{},H=x2(w[v]),A=z[m]=i.getPixelForValue(w[m],b),V=z[v]=c||H?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,w,l):w[v],b);z.skip=isNaN(A)||isNaN(V)||H,z.stop=b>0&&Math.abs(w[m]-C[m])>y,g&&(z.parsed=w,z.raw=f.data[b]),h&&(z.options=d||this.resolveDataElementOptions(b,M.active?"active":n)),x||this.updateElement(M,b,z,n),C=w}this.updateSharedOptions(d,n,u)}getMaxOverflow(){const t=this._cachedMeta,a=t.data||[];if(!this.options.showLine){let s=0;for(let l=a.length-1;l>=0;--l)s=Math.max(s,a[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,n=r.options&&r.options.borderWidth||0;if(!a.length)return n;const c=a[0].size(this.resolveDataElementOptions(0)),i=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(n,c,i)/2}}v1(K8,"id","scatter"),v1(K8,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),v1(K8,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var sq=Object.freeze({__proto__:null,BarController:j8,BubbleController:Y8,DoughnutController:I0,LineController:G8,PieController:f7,PolarAreaController:pr,RadarController:X8,ScatterController:K8});function V0(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ml{constructor(t){v1(this,"options");this.options=t||{}}static override(t){Object.assign(ml.prototype,t)}init(){}formats(){return V0()}parse(){return V0()}format(){return V0()}add(){return V0()}diff(){return V0()}startOf(){return V0()}endOf(){return V0()}}var oq={_date:ml};function lq(e,t,a,r){const{controller:n,data:c,_sorted:i}=e,s=n._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&i&&c.length){const l=s._reversePixels?TU:ft;if(r){if(n._sharedOptions){const f=c[0],u=typeof f.getRange=="function"&&f.getRange(t);if(u){const d=l(c,t,a-u),h=l(c,t,a+u);return{lo:d.lo,hi:h.hi}}}}else return l(c,t,a)}return{lo:0,hi:c.length-1}}function Hn(e,t,a,r,n){const c=e.getSortedVisibleDatasetMetas(),i=a[t];for(let s=0,l=c.length;s<l;++s){const{index:f,data:u}=c[s],{lo:d,hi:h}=lq(c[s],t,i,n);for(let m=d;m<=h;++m){const v=u[m];v.skip||r(v,f,m)}}}function fq(e){const t=e.indexOf("x")!==-1,a=e.indexOf("y")!==-1;return function(r,n){const c=t?Math.abs(r.x-n.x):0,i=a?Math.abs(r.y-n.y):0;return Math.sqrt(Math.pow(c,2)+Math.pow(i,2))}}function Wi(e,t,a,r,n){const c=[];return!n&&!e.isPointInArea(t)||Hn(e,a,t,function(s,l,f){!n&&!ut(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&c.push({element:s,datasetIndex:l,index:f})},!0),c}function uq(e,t,a,r){let n=[];function c(i,s,l){const{startAngle:f,endAngle:u}=i.getProps(["startAngle","endAngle"],r),{angle:d}=ly(i,{x:t.x,y:t.y});jr(d,f,u)&&n.push({element:i,datasetIndex:s,index:l})}return Hn(e,a,t,c),n}function dq(e,t,a,r,n,c){let i=[];const s=fq(a);let l=Number.POSITIVE_INFINITY;function f(u,d,h){const m=u.inRange(t.x,t.y,n);if(r&&!m)return;const v=u.getCenterPoint(n);if(!(!!c||e.isPointInArea(v))&&!m)return;const g=s(t,v);g<l?(i=[{element:u,datasetIndex:d,index:h}],l=g):g===l&&i.push({element:u,datasetIndex:d,index:h})}return Hn(e,a,t,f),i}function qi(e,t,a,r,n,c){return!c&&!e.isPointInArea(t)?[]:a==="r"&&!r?uq(e,t,a,n):dq(e,t,a,r,n,c)}function bd(e,t,a,r,n){const c=[],i=a==="x"?"inXRange":"inYRange";let s=!1;return Hn(e,a,t,(l,f,u)=>{l[i]&&l[i](t[a],n)&&(c.push({element:l,datasetIndex:f,index:u}),s=s||l.inRange(t.x,t.y,n))}),r&&!s?[]:c}var hq={evaluateInteractionItems:Hn,modes:{index(e,t,a,r){const n=T0(t,e),c=a.axis||"x",i=a.includeInvisible||!1,s=a.intersect?Wi(e,n,c,r,i):qi(e,n,c,!1,r,i),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(f=>{const u=s[0].index,d=f.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:f.index,index:u})}),l):[]},dataset(e,t,a,r){const n=T0(t,e),c=a.axis||"xy",i=a.includeInvisible||!1;let s=a.intersect?Wi(e,n,c,r,i):qi(e,n,c,!1,r,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,t,a,r){const n=T0(t,e),c=a.axis||"xy",i=a.includeInvisible||!1;return Wi(e,n,c,r,i)},nearest(e,t,a,r){const n=T0(t,e),c=a.axis||"xy",i=a.includeInvisible||!1;return qi(e,n,c,a.intersect,r,i)},x(e,t,a,r){const n=T0(t,e);return bd(e,n,"x",a.intersect,r)},y(e,t,a,r){const n=T0(t,e);return bd(e,n,"y",a.intersect,r)}}};const Ey=["left","top","right","bottom"];function Ea(e,t){return e.filter(a=>a.pos===t)}function Cd(e,t){return e.filter(a=>Ey.indexOf(a.pos)===-1&&a.box.axis===t)}function Na(e,t){return e.sort((a,r)=>{const n=t?r:a,c=t?a:r;return n.weight===c.weight?n.index-c.index:n.weight-c.weight})}function mq(e){const t=[];let a,r,n,c,i,s;for(a=0,r=(e||[]).length;a<r;++a)n=e[a],{position:c,options:{stack:i,stackWeight:s=1}}=n,t.push({index:a,box:n,pos:c,horizontal:n.isHorizontal(),weight:n.weight,stack:i&&c+i,stackWeight:s});return t}function pq(e){const t={};for(const a of e){const{stack:r,pos:n,stackWeight:c}=a;if(!r||!Ey.includes(n))continue;const i=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=c}return t}function vq(e,t){const a=pq(e),{vBoxMaxWidth:r,hBoxMaxHeight:n}=t;let c,i,s;for(c=0,i=e.length;c<i;++c){s=e[c];const{fullSize:l}=s.box,f=a[s.stack],u=f&&s.stackWeight/f.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=n):(s.width=r,s.height=u?u*n:l&&t.availableHeight)}return a}function gq(e){const t=mq(e),a=Na(t.filter(f=>f.box.fullSize),!0),r=Na(Ea(t,"left"),!0),n=Na(Ea(t,"right")),c=Na(Ea(t,"top"),!0),i=Na(Ea(t,"bottom")),s=Cd(t,"x"),l=Cd(t,"y");return{fullSize:a,leftAndTop:r.concat(c),rightAndBottom:n.concat(l).concat(i).concat(s),chartArea:Ea(t,"chartArea"),vertical:r.concat(n).concat(l),horizontal:c.concat(i).concat(s)}}function Md(e,t,a,r){return Math.max(e[a],t[a])+Math.max(e[r],t[r])}function Ny(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function yq(e,t,a,r){const{pos:n,box:c}=a,i=e.maxPadding;if(!u2(n)){a.size&&(e[n]-=a.size);const d=r[a.stack]||{size:0,count:1};d.size=Math.max(d.size,a.horizontal?c.height:c.width),a.size=d.size/d.count,e[n]+=a.size}c.getPadding&&Ny(i,c.getPadding());const s=Math.max(0,t.outerWidth-Md(i,e,"left","right")),l=Math.max(0,t.outerHeight-Md(i,e,"top","bottom")),f=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,a.horizontal?{same:f,other:u}:{same:u,other:f}}function xq(e){const t=e.maxPadding;function a(r){const n=Math.max(t[r]-e[r],0);return e[r]+=n,n}e.y+=a("top"),e.x+=a("left"),a("right"),a("bottom")}function bq(e,t){const a=t.maxPadding;function r(n){const c={left:0,top:0,right:0,bottom:0};return n.forEach(i=>{c[i]=Math.max(t[i],a[i])}),c}return r(e?["left","right"]:["top","bottom"])}function Ga(e,t,a,r){const n=[];let c,i,s,l,f,u;for(c=0,i=e.length,f=0;c<i;++c){s=e[c],l=s.box,l.update(s.width||t.w,s.height||t.h,bq(s.horizontal,t));const{same:d,other:h}=yq(t,a,s,r);f|=d&&n.length,u=u||h,l.fullSize||n.push(s)}return f&&Ga(n,t,a,r)||u}function p8(e,t,a,r,n){e.top=a,e.left=t,e.right=t+r,e.bottom=a+n,e.width=r,e.height=n}function zd(e,t,a,r){const n=a.padding;let{x:c,y:i}=t;for(const s of e){const l=s.box,f=r[s.stack]||{count:1,placed:0,weight:1},u=s.stackWeight/f.weight||1;if(s.horizontal){const d=t.w*u,h=f.size||l.height;qr(f.start)&&(i=f.start),l.fullSize?p8(l,n.left,i,a.outerWidth-n.right-n.left,h):p8(l,t.left+f.placed,i,d,h),f.start=i,f.placed+=d,i=l.bottom}else{const d=t.h*u,h=f.size||l.width;qr(f.start)&&(c=f.start),l.fullSize?p8(l,c,n.top,h,a.outerHeight-n.bottom-n.top):p8(l,c,t.top+f.placed,h,d),f.start=c,f.placed+=d,c=l.right}}t.x=c,t.y=i}var Ze={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(a){t.draw(a)}}]},e.boxes.push(t)},removeBox(e,t){const a=e.boxes?e.boxes.indexOf(t):-1;a!==-1&&e.boxes.splice(a,1)},configure(e,t,a){t.fullSize=a.fullSize,t.position=a.position,t.weight=a.weight},update(e,t,a,r){if(!e)return;const n=t3(e.options.layout.padding),c=Math.max(t-n.width,0),i=Math.max(a-n.height,0),s=gq(e.boxes),l=s.vertical,f=s.horizontal;V2(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:a,padding:n,availableWidth:c,availableHeight:i,vBoxMaxWidth:c/2/u,hBoxMaxHeight:i/2}),h=Object.assign({},n);Ny(h,t3(r));const m=Object.assign({maxPadding:h,w:c,h:i,x:n.left,y:n.top},n),v=vq(l.concat(f),d);Ga(s.fullSize,m,d,v),Ga(l,m,d,v),Ga(f,m,d,v)&&Ga(l,m,d,v),xq(m),zd(s.leftAndTop,m,d,v),m.x+=m.w,m.y+=m.h,zd(s.rightAndBottom,m,d,v),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},V2(s.chartArea,p=>{const g=p.box;Object.assign(g,e.chartArea),g.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class Dy{acquireContext(t,a){}releaseContext(t){return!1}addEventListener(t,a,r){}removeEventListener(t,a,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,a,r,n){return a=Math.max(0,a||t.width),r=r||t.height,{width:a,height:Math.max(0,n?Math.floor(a/n):r)}}isAttached(t){return!0}updateConfig(t){}}class Cq extends Dy{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Z8="$chartjs",Mq={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},wd=e=>e===null||e==="";function zq(e,t){const a=e.style,r=e.getAttribute("height"),n=e.getAttribute("width");if(e[Z8]={initial:{height:r,width:n,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",wd(n)){const c=sd(e,"width");c!==void 0&&(e.width=c)}if(wd(r))if(e.style.height==="")e.height=e.width/(t||2);else{const c=sd(e,"height");c!==void 0&&(e.height=c)}return e}const Oy=_W?{passive:!0}:!1;function wq(e,t,a){e&&e.addEventListener(t,a,Oy)}function _q(e,t,a){e&&e.canvas&&e.canvas.removeEventListener(t,a,Oy)}function kq(e,t){const a=Mq[e.type]||e.type,{x:r,y:n}=T0(e,t);return{type:a,chart:t,native:e,x:r!==void 0?r:null,y:n!==void 0?n:null}}function Tc(e,t){for(const a of e)if(a===t||a.contains(t))return!0}function Hq(e,t,a){const r=e.canvas,n=new MutationObserver(c=>{let i=!1;for(const s of c)i=i||Tc(s.addedNodes,r),i=i&&!Tc(s.removedNodes,r);i&&a()});return n.observe(document,{childList:!0,subtree:!0}),n}function Vq(e,t,a){const r=e.canvas,n=new MutationObserver(c=>{let i=!1;for(const s of c)i=i||Tc(s.removedNodes,r),i=i&&!Tc(s.addedNodes,r);i&&a()});return n.observe(document,{childList:!0,subtree:!0}),n}const Gr=new Map;let _d=0;function Py(){const e=window.devicePixelRatio;e!==_d&&(_d=e,Gr.forEach((t,a)=>{a.currentDevicePixelRatio!==e&&t()}))}function Lq(e,t){Gr.size||window.addEventListener("resize",Py),Gr.set(e,t)}function Sq(e){Gr.delete(e),Gr.size||window.removeEventListener("resize",Py)}function Aq(e,t,a){const r=e.canvas,n=r&&hl(r);if(!n)return;const c=hy((s,l)=>{const f=n.clientWidth;a(s,l),f<n.clientWidth&&a()},window),i=new ResizeObserver(s=>{const l=s[0],f=l.contentRect.width,u=l.contentRect.height;f===0&&u===0||c(f,u)});return i.observe(n),Lq(e,c),i}function ji(e,t,a){a&&a.disconnect(),t==="resize"&&Sq(e)}function Tq(e,t,a){const r=e.canvas,n=hy(c=>{e.ctx!==null&&a(kq(c,e))},e);return wq(r,t,n),n}class Eq extends Dy{acquireContext(t,a){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(zq(t,a),r):null}releaseContext(t){const a=t.canvas;if(!a[Z8])return!1;const r=a[Z8].initial;["height","width"].forEach(c=>{const i=r[c];x2(i)?a.removeAttribute(c):a.setAttribute(c,i)});const n=r.style||{};return Object.keys(n).forEach(c=>{a.style[c]=n[c]}),a.width=a.width,delete a[Z8],!0}addEventListener(t,a,r){this.removeEventListener(t,a);const n=t.$proxies||(t.$proxies={}),i={attach:Hq,detach:Vq,resize:Aq}[a]||Tq;n[a]=i(t,a,r)}removeEventListener(t,a){const r=t.$proxies||(t.$proxies={}),n=r[a];if(!n)return;({attach:ji,detach:ji,resize:ji}[a]||_q)(t,a,n),r[a]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,a,r,n){return wW(t,a,r,n)}isAttached(t){const a=t&&hl(t);return!!(a&&a.isConnected)}}function Nq(e){return!dl()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Cq:Eq}class g4{constructor(){v1(this,"x");v1(this,"y");v1(this,"active",!1);v1(this,"options");v1(this,"$animations")}tooltipPosition(t){const{x:a,y:r}=this.getProps(["x","y"],t);return{x:a,y:r}}hasValue(){return Z6(this.x)&&Z6(this.y)}getProps(t,a){const r=this.$animations;if(!a||!r)return this;const n={};return t.forEach(c=>{n[c]=r[c]&&r[c].active()?r[c]._to:this[c]}),n}}v1(g4,"defaults",{}),v1(g4,"defaultRoutes");function Dq(e,t){const a=e.options.ticks,r=Oq(e),n=Math.min(a.maxTicksLimit||r,r),c=a.major.enabled?Bq(t):[],i=c.length,s=c[0],l=c[i-1],f=[];if(i>n)return Fq(t,f,c,i/n),f;const u=Pq(c,t,n);if(i>0){let d,h;const m=i>1?Math.round((l-s)/(i-1)):null;for(v8(t,f,u,x2(m)?0:s-m,s),d=0,h=i-1;d<h;d++)v8(t,f,u,c[d],c[d+1]);return v8(t,f,u,l,x2(m)?t.length:l+m),f}return v8(t,f,u),f}function Oq(e){const t=e.options.offset,a=e._tickSize(),r=e._length/a+(t?0:1),n=e._maxLength/a;return Math.floor(Math.min(r,n))}function Pq(e,t,a){const r=Rq(e),n=t.length/a;if(!r)return Math.max(n,1);const c=VU(r);for(let i=0,s=c.length-1;i<s;i++){const l=c[i];if(l>n)return l}return Math.max(n,1)}function Bq(e){const t=[];let a,r;for(a=0,r=e.length;a<r;a++)e[a].major&&t.push(a);return t}function Fq(e,t,a,r){let n=0,c=a[0],i;for(r=Math.ceil(r),i=0;i<e.length;i++)i===c&&(t.push(e[i]),n++,c=a[n*r])}function v8(e,t,a,r,n){const c=a2(r,0),i=Math.min(a2(n,e.length),e.length);let s=0,l,f,u;for(a=Math.ceil(a),n&&(l=n-r,a=l/Math.floor(l/a)),u=c;u<0;)s++,u=Math.round(c+s*a);for(f=Math.max(c,0);f<i;f++)f===u&&(t.push(e[f]),s++,u=Math.round(c+s*a))}function Rq(e){const t=e.length;let a,r;if(t<2)return!1;for(r=e[0],a=1;a<t;++a)if(e[a]-e[a-1]!==r)return!1;return r}const Iq=e=>e==="left"?"right":e==="right"?"left":e,kd=(e,t,a)=>t==="top"||t==="left"?e[t]+a:e[t]-a,Hd=(e,t)=>Math.min(t||e,e);function Vd(e,t){const a=[],r=e.length/t,n=e.length;let c=0;for(;c<n;c+=r)a.push(e[Math.floor(c)]);return a}function $q(e,t,a){const r=e.ticks.length,n=Math.min(t,r-1),c=e._startPixel,i=e._endPixel,s=1e-6;let l=e.getPixelForTick(n),f;if(!(a&&(r===1?f=Math.max(l-c,i-l):t===0?f=(e.getPixelForTick(1)-l)/2:f=(l-e.getPixelForTick(n-1))/2,l+=n<t?f:-f,l<c-s||l>i+s)))return l}function Uq(e,t){V2(e,a=>{const r=a.gc,n=r.length/2;let c;if(n>t){for(c=0;c<n;++c)delete a.data[r[c]];r.splice(0,n)}})}function Da(e){return e.drawTicks?e.tickLength:0}function Ld(e,t){if(!e.display)return 0;const a=Ve(e.font,t),r=t3(e.padding);return(R2(e.text)?e.text.length:1)*a.lineHeight+r.height}function Wq(e,t){return v0(e,{scale:t,type:"scale"})}function qq(e,t,a){return v0(e,{tick:a,index:t,type:"tick"})}function jq(e,t,a){let r=il(e);return(a&&t!=="right"||!a&&t==="right")&&(r=Iq(r)),r}function Yq(e,t,a,r){const{top:n,left:c,bottom:i,right:s,chart:l}=e,{chartArea:f,scales:u}=l;let d=0,h,m,v;const p=i-n,g=s-c;if(e.isHorizontal()){if(m=je(r,c,s),u2(a)){const y=Object.keys(a)[0],x=a[y];v=u[y].getPixelForValue(x)+p-t}else a==="center"?v=(f.bottom+f.top)/2+p-t:v=kd(e,a,t);h=s-c}else{if(u2(a)){const y=Object.keys(a)[0],x=a[y];m=u[y].getPixelForValue(x)-g+t}else a==="center"?m=(f.left+f.right)/2-g+t:m=kd(e,a,t);v=je(r,i,n),d=a==="left"?-pe:pe}return{titleX:m,titleY:v,maxWidth:h,rotation:d}}class h6 extends g4{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,a){return t}getUserBounds(){let{_userMin:t,_userMax:a,_suggestedMin:r,_suggestedMax:n}=this;return t=x3(t,Number.POSITIVE_INFINITY),a=x3(a,Number.NEGATIVE_INFINITY),r=x3(r,Number.POSITIVE_INFINITY),n=x3(n,Number.NEGATIVE_INFINITY),{min:x3(t,r),max:x3(a,n),minDefined:se(t),maxDefined:se(a)}}getMinMax(t){let{min:a,max:r,minDefined:n,maxDefined:c}=this.getUserBounds(),i;if(n&&c)return{min:a,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,f=s.length;l<f;++l)i=s[l].controller.getMinMax(this,t),n||(a=Math.min(a,i.min)),c||(r=Math.max(r,i.max));return a=c&&a>r?r:a,r=n&&a>r?a:r,{min:x3(a,x3(r,a)),max:x3(r,x3(a,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){E2(this.options.beforeUpdate,[this])}update(t,a,r){const{beginAtZero:n,grace:c,ticks:i}=this.options,s=i.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=a,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=aW(this,c,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?Vd(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||i.source==="auto")&&(this.ticks=Dq(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,a,r;this.isHorizontal()?(a=this.left,r=this.right):(a=this.top,r=this.bottom,t=!t),this._startPixel=a,this._endPixel=r,this._reversePixels=t,this._length=r-a,this._alignToPixels=this.options.alignToPixels}afterUpdate(){E2(this.options.afterUpdate,[this])}beforeSetDimensions(){E2(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(){E2(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),E2(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){E2(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const a=this.options.ticks;let r,n,c;for(r=0,n=t.length;r<n;r++)c=t[r],c.label=E2(a.callback,[c.value,r,t],this)}afterTickToLabelConversion(){E2(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){E2(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,a=t.ticks,r=Hd(this.ticks.length,t.ticks.maxTicksLimit),n=a.minRotation||0,c=a.maxRotation;let i=n,s,l,f;if(!this._isVisible()||!a.display||n>=c||r<=1||!this.isHorizontal()){this.labelRotation=n;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,m=Ne(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:m/(r-1),d+6>s&&(s=m/(r-(t.offset?.5:1)),l=this.maxHeight-Da(t.grid)-a.padding-Ld(t.title,this.chart.options.font),f=Math.sqrt(d*d+h*h),i=nl(Math.min(Math.asin(Ne((u.highest.height+6)/s,-1,1)),Math.asin(Ne(l/f,-1,1))-Math.asin(Ne(h/f,-1,1)))),i=Math.max(n,Math.min(c,i))),this.labelRotation=i}afterCalculateLabelRotation(){E2(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){E2(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:a,options:{ticks:r,title:n,grid:c}}=this,i=this._isVisible(),s=this.isHorizontal();if(i){const l=Ld(n,a.options.font);if(s?(t.width=this.maxWidth,t.height=Da(c)+l):(t.height=this.maxHeight,t.width=Da(c)+l),r.display&&this.ticks.length){const{first:f,last:u,widest:d,highest:h}=this._getLabelSizes(),m=r.padding*2,v=n4(this.labelRotation),p=Math.cos(v),g=Math.sin(v);if(s){const y=r.mirror?0:g*d.width+p*h.height;t.height=Math.min(this.maxHeight,t.height+y+m)}else{const y=r.mirror?0:p*d.width+g*h.height;t.width=Math.min(this.maxWidth,t.width+y+m)}this._calculatePadding(f,u,g,p)}}this._handleMargins(),s?(this.width=this._length=a.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=a.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,a,r,n){const{ticks:{align:c,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,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,m=0;l?f?(h=n*t.width,m=r*a.height):(h=r*t.height,m=n*a.width):c==="start"?m=a.width:c==="end"?h=t.width:c!=="inner"&&(h=t.width/2,m=a.width/2),this.paddingLeft=Math.max((h-u+i)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-d+i)*this.width/(this.width-d),0)}else{let u=a.height/2,d=t.height/2;c==="start"?(u=0,d=t.height):c==="end"&&(u=a.height,d=0),this.paddingTop=u+i,this.paddingBottom=d+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(){E2(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:a}=this.options;return a==="top"||a==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let a,r;for(a=0,r=t.length;a<r;a++)x2(t[a].label)&&(t.splice(a,1),r--,a--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const a=this.options.ticks.sampleSize;let r=this.ticks;a<r.length&&(r=Vd(r,a)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,a,r){const{ctx:n,_longestTextCache:c}=this,i=[],s=[],l=Math.floor(a/Hd(a,r));let f=0,u=0,d,h,m,v,p,g,y,x,C,b,M;for(d=0;d<a;d+=l){if(v=t[d].label,p=this._resolveTickFontOptions(d),n.font=g=p.string,y=c[g]=c[g]||{data:{},gc:[]},x=p.lineHeight,C=b=0,!x2(v)&&!R2(v))C=Sc(n,y.data,y.gc,C,v),b=x;else if(R2(v))for(h=0,m=v.length;h<m;++h)M=v[h],!x2(M)&&!R2(M)&&(C=Sc(n,y.data,y.gc,C,M),b+=x);i.push(C),s.push(b),f=Math.max(C,f),u=Math.max(b,u)}Uq(c,a);const w=i.indexOf(f),z=s.indexOf(u),H=A=>({width:i[A]||0,height:s[A]||0});return{first:H(0),last:H(a-1),widest:H(w),highest:H(z),widths:i,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,a){return NaN}getValueForPixel(t){}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const a=this._startPixel+t*this._length;return AU(this._alignToPixels?H0(this.chart,a,0):a)}getDecimalForPixel(t){const a=(t-this._startPixel)/this._length;return this._reversePixels?1-a:a}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:a}=this;return t<0&&a<0?a:t>0&&a>0?t:0}getContext(t){const a=this.ticks||[];if(t>=0&&t<a.length){const r=a[t];return r.$context||(r.$context=qq(this.getContext(),t,r))}return this.$context||(this.$context=Wq(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,a=n4(this.labelRotation),r=Math.abs(Math.cos(a)),n=Math.abs(Math.sin(a)),c=this._getLabelSizes(),i=t.autoSkipPadding||0,s=c?c.widest.width+i:0,l=c?c.highest.height+i:0;return this.isHorizontal()?l*r>s*n?s/r:l/n:l*n<s*r?l/r:s/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const a=this.axis,r=this.chart,n=this.options,{grid:c,position:i,border:s}=n,l=c.offset,f=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=Da(c),m=[],v=s.setContext(this.getContext()),p=v.display?v.width:0,g=p/2,y=function(B){return H0(r,B,p)};let x,C,b,M,w,z,H,A,V,k,_,N;if(i==="top")x=y(this.bottom),z=this.bottom-h,A=x-g,k=y(t.top)+g,N=t.bottom;else if(i==="bottom")x=y(this.top),k=t.top,N=y(t.bottom)-g,z=x+g,A=this.top+h;else if(i==="left")x=y(this.right),w=this.right-h,H=x-g,V=y(t.left)+g,_=t.right;else if(i==="right")x=y(this.left),V=t.left,_=y(t.right)-g,w=x+g,H=this.left+h;else if(a==="x"){if(i==="center")x=y((t.top+t.bottom)/2+.5);else if(u2(i)){const B=Object.keys(i)[0],F=i[B];x=y(this.chart.scales[B].getPixelForValue(F))}k=t.top,N=t.bottom,z=x+g,A=z+h}else if(a==="y"){if(i==="center")x=y((t.left+t.right)/2);else if(u2(i)){const B=Object.keys(i)[0],F=i[B];x=y(this.chart.scales[B].getPixelForValue(F))}w=x-g,H=w-h,V=t.left,_=t.right}const q=a2(n.ticks.maxTicksLimit,d),S=Math.max(1,Math.ceil(d/q));for(C=0;C<d;C+=S){const B=this.getContext(C),F=c.setContext(B),e1=s.setContext(B),Y=F.lineWidth,G=F.color,O=e1.dash||[],T=e1.dashOffset,L=F.tickWidth,W=F.tickColor,j=F.tickBorderDash||[],E=F.tickBorderDashOffset;b=$q(this,C,l),b!==void 0&&(M=H0(r,b,Y),f?w=H=V=_=M:z=A=k=N=M,m.push({tx1:w,ty1:z,tx2:H,ty2:A,x1:V,y1:k,x2:_,y2:N,width:Y,color:G,borderDash:O,borderDashOffset:T,tickWidth:L,tickColor:W,tickBorderDash:j,tickBorderDashOffset:E}))}return this._ticksLength=d,this._borderValue=x,m}_computeLabelItems(t){const a=this.axis,r=this.options,{position:n,ticks:c}=r,i=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:f,padding:u,mirror:d}=c,h=Da(r.grid),m=h+u,v=d?-u:m,p=-n4(this.labelRotation),g=[];let y,x,C,b,M,w,z,H,A,V,k,_,N="middle";if(n==="top")w=this.bottom-v,z=this._getXAxisLabelAlignment();else if(n==="bottom")w=this.top+v,z=this._getXAxisLabelAlignment();else if(n==="left"){const S=this._getYAxisLabelAlignment(h);z=S.textAlign,M=S.x}else if(n==="right"){const S=this._getYAxisLabelAlignment(h);z=S.textAlign,M=S.x}else if(a==="x"){if(n==="center")w=(t.top+t.bottom)/2+m;else if(u2(n)){const S=Object.keys(n)[0],B=n[S];w=this.chart.scales[S].getPixelForValue(B)+m}z=this._getXAxisLabelAlignment()}else if(a==="y"){if(n==="center")M=(t.left+t.right)/2-m;else if(u2(n)){const S=Object.keys(n)[0],B=n[S];M=this.chart.scales[S].getPixelForValue(B)}z=this._getYAxisLabelAlignment(h).textAlign}a==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const q=this._getLabelSizes();for(y=0,x=s.length;y<x;++y){C=s[y],b=C.label;const S=c.setContext(this.getContext(y));H=this.getPixelForTick(y)+c.labelOffset,A=this._resolveTickFontOptions(y),V=A.lineHeight,k=R2(b)?b.length:1;const B=k/2,F=S.color,e1=S.textStrokeColor,Y=S.textStrokeWidth;let G=z;i?(M=H,z==="inner"&&(y===x-1?G=this.options.reverse?"left":"right":y===0?G=this.options.reverse?"right":"left":G="center"),n==="top"?f==="near"||p!==0?_=-k*V+V/2:f==="center"?_=-q.highest.height/2-B*V+V:_=-q.highest.height+V/2:f==="near"||p!==0?_=V/2:f==="center"?_=q.highest.height/2-B*V:_=q.highest.height-k*V,d&&(_*=-1),p!==0&&!S.showLabelBackdrop&&(M+=V/2*Math.sin(p))):(w=H,_=(1-k)*V/2);let O;if(S.showLabelBackdrop){const T=t3(S.backdropPadding),L=q.heights[y],W=q.widths[y];let j=_-T.top,E=0-T.left;switch(N){case"middle":j-=L/2;break;case"bottom":j-=L;break}switch(z){case"center":E-=W/2;break;case"right":E-=W;break;case"inner":y===x-1?E-=W:y>0&&(E-=W/2);break}O={left:E,top:j,width:W+T.width,height:L+T.height,color:S.backdropColor}}g.push({label:b,font:A,textOffset:_,options:{rotation:p,color:F,strokeColor:e1,strokeWidth:Y,textAlign:G,textBaseline:N,translation:[M,w],backdrop:O}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:a}=this.options;if(-n4(this.labelRotation))return t==="top"?"left":"right";let n="center";return a.align==="start"?n="left":a.align==="end"?n="right":a.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:a,ticks:{crossAlign:r,mirror:n,padding:c}}=this.options,i=this._getLabelSizes(),s=t+c,l=i.widest.width;let f,u;return a==="left"?n?(u=this.right+c,r==="near"?f="left":r==="center"?(f="center",u+=l/2):(f="right",u+=l)):(u=this.right-s,r==="near"?f="right":r==="center"?(f="center",u-=l/2):(f="left",u=this.left)):a==="right"?n?(u=this.left+c,r==="near"?f="right":r==="center"?(f="center",u-=l/2):(f="left",u-=l)):(u=this.left+s,r==="near"?f="left":r==="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 t=this.chart,a=this.options.position;if(a==="left"||a==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(a==="top"||a==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:a},left:r,top:n,width:c,height:i}=this;a&&(t.save(),t.fillStyle=a,t.fillRect(r,n,c,i),t.restore())}getLineWidthForValue(t){const a=this.options.grid;if(!this._isVisible()||!a.display)return 0;const n=this.ticks.findIndex(c=>c.value===t);return n>=0?a.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const a=this.options.grid,r=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let c,i;const s=(l,f,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(f.x,f.y),r.stroke(),r.restore())};if(a.display)for(c=0,i=n.length;c<i;++c){const l=n[c];a.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),a.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:t,ctx:a,options:{border:r,grid:n}}=this,c=r.setContext(this.getContext()),i=r.display?c.width:0;if(!i)return;const s=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let f,u,d,h;this.isHorizontal()?(f=H0(t,this.left,i)-i/2,u=H0(t,this.right,s)+s/2,d=h=l):(d=H0(t,this.top,i)-i/2,h=H0(t,this.bottom,s)+s/2,f=u=l),a.save(),a.lineWidth=c.width,a.strokeStyle=c.color,a.beginPath(),a.moveTo(f,d),a.lineTo(u,h),a.stroke(),a.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,n=this._computeLabelArea();n&&H5(r,n);const c=this.getLabelItems(t);for(const i of c){const s=i.options,l=i.font,f=i.label,u=i.textOffset;r6(r,f,0,u,l,s)}n&&V5(r)}drawTitle(){const{ctx:t,options:{position:a,title:r,reverse:n}}=this;if(!r.display)return;const c=Ve(r.font),i=t3(r.padding),s=r.align;let l=c.lineHeight/2;a==="bottom"||a==="center"||u2(a)?(l+=i.bottom,R2(r.text)&&(l+=c.lineHeight*(r.text.length-1))):l+=i.top;const{titleX:f,titleY:u,maxWidth:d,rotation:h}=Yq(this,l,a,s);r6(t,r.text,0,0,c,{color:r.color,maxWidth:d,rotation:h,textAlign:jq(s,a,n),textBaseline:"middle",translation:[f,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,a=t.ticks&&t.ticks.z||0,r=a2(t.grid&&t.grid.z,-1),n=a2(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==h6.prototype.draw?[{z:a,draw:c=>{this.draw(c)}}]:[{z:r,draw:c=>{this.drawBackground(),this.drawGrid(c),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:a,draw:c=>{this.drawLabels(c)}}]}getMatchingVisibleMetas(t){const a=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",n=[];let c,i;for(c=0,i=a.length;c<i;++c){const s=a[c];s[r]===this.id&&(!t||s.type===t)&&n.push(s)}return n}_resolveTickFontOptions(t){const a=this.options.ticks.setContext(this.getContext(t));return Ve(a.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class g8{constructor(t,a,r){this.type=t,this.scope=a,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const a=Object.getPrototypeOf(t);let r;Kq(a)&&(r=this.register(a));const n=this.items,c=t.id,i=this.scope+"."+c;if(!c)throw new Error("class does not have id: "+t);return c in n||(n[c]=t,Gq(t,i,r),this.override&&K2.override(t.id,t.overrides)),i}get(t){return this.items[t]}unregister(t){const a=this.items,r=t.id,n=this.scope;r in a&&delete a[r],n&&r in K2[n]&&(delete K2[n][r],this.override&&delete a6[r])}}function Gq(e,t,a){const r=Wr(Object.create(null),[a?K2.get(a):{},K2.get(t),e.defaults]);K2.set(t,r),e.defaultRoutes&&Xq(t,e.defaultRoutes),e.descriptors&&K2.describe(t,e.descriptors)}function Xq(e,t){Object.keys(t).forEach(a=>{const r=a.split("."),n=r.pop(),c=[e].concat(r).join("."),i=t[a].split("."),s=i.pop(),l=i.join(".");K2.route(c,n,l,s)})}function Kq(e){return"id"in e&&"defaults"in e}class Zq{constructor(){this.controllers=new g8(l4,"datasets",!0),this.elements=new g8(g4,"elements"),this.plugins=new g8(Object,"plugins"),this.scales=new g8(h6,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,a,r){[...a].forEach(n=>{const c=r||this._getRegistryForType(n);r||c.isForType(n)||c===this.plugins&&n.id?this._exec(t,c,n):V2(n,i=>{const s=r||this._getRegistryForType(i);this._exec(t,s,i)})})}_exec(t,a,r){const n=rl(t);E2(r["before"+n],[],r),a[t](r),E2(r["after"+n],[],r)}_getRegistryForType(t){for(let a=0;a<this._typedRegistries.length;a++){const r=this._typedRegistries[a];if(r.isForType(t))return r}return this.plugins}_get(t,a,r){const n=a.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return n}}var k4=new Zq;class Qq{constructor(){this._init=[]}notify(t,a,r,n){a==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const c=n?this._descriptors(t).filter(n):this._descriptors(t),i=this._notify(c,t,a,r);return a==="afterDestroy"&&(this._notify(c,t,"stop"),this._notify(this._init,t,"uninstall")),i}_notify(t,a,r,n){n=n||{};for(const c of t){const i=c.plugin,s=i[r],l=[a,n,c.options];if(E2(s,l,i)===!1&&n.cancelable)return!1}return!0}invalidate(){x2(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const a=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),a}_createDescriptors(t,a){const r=t&&t.config,n=a2(r.options&&r.options.plugins,{}),c=Jq(r);return n===!1&&!a?[]:tj(t,c,n,a)}_notifyStateChanges(t){const a=this._oldCache||[],r=this._cache,n=(c,i)=>c.filter(s=>!i.some(l=>s.plugin.id===l.plugin.id));this._notify(n(a,r),t,"stop"),this._notify(n(r,a),t,"start")}}function Jq(e){const t={},a=[],r=Object.keys(k4.plugins.items);for(let c=0;c<r.length;c++)a.push(k4.getPlugin(r[c]));const n=e.plugins||[];for(let c=0;c<n.length;c++){const i=n[c];a.indexOf(i)===-1&&(a.push(i),t[i.id]=!0)}return{plugins:a,localIds:t}}function ej(e,t){return!t&&e===!1?null:e===!0?{}:e}function tj(e,{plugins:t,localIds:a},r,n){const c=[],i=e.getContext();for(const s of t){const l=s.id,f=ej(r[l],n);f!==null&&c.push({plugin:s,options:aj(e.config,{plugin:s,local:a[l]},f,i)})}return c}function aj(e,{plugin:t,local:a},r,n){const c=e.pluginScopeKeys(t),i=e.getOptionScopes(r,c);return a&&t.defaults&&i.push(t.defaults),e.createResolver(i,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function u7(e,t){const a=K2.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||a.indexAxis||"x"}function rj(e,t){let a=e;return e==="_index_"?a=t:e==="_value_"&&(a=t==="x"?"y":"x"),a}function nj(e,t){return e===t?"_index_":"_value_"}function Sd(e){if(e==="x"||e==="y"||e==="r")return e}function cj(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function d7(e,...t){if(Sd(e))return e;for(const a of t){const r=a.axis||cj(a.position)||e.length>1&&Sd(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Ad(e,t,a){if(a[t+"AxisID"]===e)return{axis:t}}function ij(e,t){if(t.data&&t.data.datasets){const a=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(a.length)return Ad(e,"x",a[0])||Ad(e,"y",a[0])}return{}}function sj(e,t){const a=a6[e.type]||{scales:{}},r=t.scales||{},n=u7(e.type,t),c=Object.create(null);return Object.keys(r).forEach(i=>{const s=r[i];if(!u2(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=d7(i,s,ij(i,e),K2.scales[s.type]),f=nj(l,n),u=a.scales||{};c[i]=ur(Object.create(null),[{axis:l},s,u[l],u[f]])}),e.data.datasets.forEach(i=>{const s=i.type||e.type,l=i.indexAxis||u7(s,t),u=(a6[s]||{}).scales||{};Object.keys(u).forEach(d=>{const h=rj(d,l),m=i[h+"AxisID"]||h;c[m]=c[m]||Object.create(null),ur(c[m],[{axis:h},r[m],u[d]])})}),Object.keys(c).forEach(i=>{const s=c[i];ur(s,[K2.scales[s.type],K2.scale])}),c}function By(e){const t=e.options||(e.options={});t.plugins=a2(t.plugins,{}),t.scales=sj(e,t)}function Fy(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function oj(e){return e=e||{},e.data=Fy(e.data),By(e),e}const Td=new Map,Ry=new Set;function y8(e,t){let a=Td.get(e);return a||(a=t(),Td.set(e,a),Ry.add(a)),a}const Oa=(e,t,a)=>{const r=f0(t,a);r!==void 0&&e.add(r)};class lj{constructor(t){this._config=oj(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Fy(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),By(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return y8(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,a){return y8(`${t}.transition.${a}`,()=>[[`datasets.${t}.transitions.${a}`,`transitions.${a}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,a){return y8(`${t}-${a}`,()=>[[`datasets.${t}.elements.${a}`,`datasets.${t}`,`elements.${a}`,""]])}pluginScopeKeys(t){const a=t.id,r=this.type;return y8(`${r}-plugin-${a}`,()=>[[`plugins.${a}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,a){const r=this._scopeCache;let n=r.get(t);return(!n||a)&&(n=new Map,r.set(t,n)),n}getOptionScopes(t,a,r){const{options:n,type:c}=this,i=this._cachedScopes(t,r),s=i.get(a);if(s)return s;const l=new Set;a.forEach(u=>{t&&(l.add(t),u.forEach(d=>Oa(l,t,d))),u.forEach(d=>Oa(l,n,d)),u.forEach(d=>Oa(l,a6[c]||{},d)),u.forEach(d=>Oa(l,K2,d)),u.forEach(d=>Oa(l,o7,d))});const f=Array.from(l);return f.length===0&&f.push(Object.create(null)),Ry.has(a)&&i.set(a,f),f}chartOptionScopes(){const{options:t,type:a}=this;return[t,a6[a]||{},K2.datasets[a]||{},{type:a},K2,o7]}resolveNamedOptions(t,a,r,n=[""]){const c={$shared:!0},{resolver:i,subPrefixes:s}=Ed(this._resolverCache,t,n);let l=i;if(uj(i,a)){c.$shared=!1,r=u0(r)?r():r;const f=this.createResolver(t,r,s);l=Q6(i,r,f)}for(const f of a)c[f]=l[f];return c}createResolver(t,a,r=[""],n){const{resolver:c}=Ed(this._resolverCache,t,r);return u2(a)?Q6(c,a,void 0,n):c}}function Ed(e,t,a){let r=e.get(t);r||(r=new Map,e.set(t,r));const n=a.join();let c=r.get(n);return c||(c={resolver:ll(t,a),subPrefixes:a.filter(s=>!s.toLowerCase().includes("hover"))},r.set(n,c)),c}const fj=e=>u2(e)&&Object.getOwnPropertyNames(e).some(t=>u0(e[t]));function uj(e,t){const{isScriptable:a,isIndexable:r}=xy(e);for(const n of t){const c=a(n),i=r(n),s=(i||c)&&e[n];if(c&&(u0(s)||fj(s))||i&&R2(s))return!0}return!1}var dj="4.4.6";const hj=["top","bottom","left","right","chartArea"];function Nd(e,t){return e==="top"||e==="bottom"||hj.indexOf(e)===-1&&t==="x"}function Dd(e,t){return function(a,r){return a[e]===r[e]?a[t]-r[t]:a[e]-r[e]}}function Od(e){const t=e.chart,a=t.options.animation;t.notifyPlugins("afterRender"),E2(a&&a.onComplete,[e],t)}function mj(e){const t=e.chart,a=t.options.animation;E2(a&&a.onProgress,[e],t)}function Iy(e){return dl()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Q8={},Pd=e=>{const t=Iy(e);return Object.values(Q8).filter(a=>a.canvas===t).pop()};function pj(e,t,a){const r=Object.keys(e);for(const n of r){const c=+n;if(c>=t){const i=e[n];delete e[n],(a>0||c>t)&&(e[c+a]=i)}}}function vj(e,t,a,r){return!a||e.type==="mouseout"?null:r?t:e}function x8(e,t,a){return e.options.clip?e[a]:t[a]}function gj(e,t){const{xScale:a,yScale:r}=e;return a&&r?{left:x8(a,t,"left"),right:x8(a,t,"right"),top:x8(r,t,"top"),bottom:x8(r,t,"bottom")}:t}class H4{static register(...t){k4.add(...t),Bd()}static unregister(...t){k4.remove(...t),Bd()}constructor(t,a){const r=this.config=new lj(a),n=Iy(t),c=Pd(n);if(c)throw new Error("Canvas is already in use. Chart with ID '"+c.id+"' must be destroyed before the canvas with ID '"+c.canvas.id+"' can be reused.");const i=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Nq(n)),this.platform.updateConfig(r);const s=this.platform.acquireContext(n,i.aspectRatio),l=s&&s.canvas,f=l&&l.height,u=l&&l.width;if(this.id=xU(),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 Qq,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=DU(d=>this.update(d),i.resizeDelay||0),this._dataChanges=[],Q8[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}tt.listen(this,"complete",Od),tt.listen(this,"progress",mj),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:a},width:r,height:n,_aspectRatio:c}=this;return x2(t)?a&&c?c:n?r/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return k4}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():id(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return rd(this.canvas,this.ctx),this}stop(){return tt.stop(this),this}resize(t,a){tt.running(this)?this._resizeBeforeDraw={width:t,height:a}:this._resize(t,a)}_resize(t,a){const r=this.options,n=this.canvas,c=r.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(n,t,a,c),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,id(this,s,!0)&&(this.notifyPlugins("resize",{size:i}),E2(r.onResize,[this,i],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const a=this.options.scales||{};V2(a,(r,n)=>{r.id=n})}buildOrUpdateScales(){const t=this.options,a=t.scales,r=this.scales,n=Object.keys(r).reduce((i,s)=>(i[s]=!1,i),{});let c=[];a&&(c=c.concat(Object.keys(a).map(i=>{const s=a[i],l=d7(i,s),f=l==="r",u=l==="x";return{options:s,dposition:f?"chartArea":u?"bottom":"left",dtype:f?"radialLinear":u?"category":"linear"}}))),V2(c,i=>{const s=i.options,l=s.id,f=d7(l,s),u=a2(s.type,i.dtype);(s.position===void 0||Nd(s.position,f)!==Nd(i.dposition))&&(s.position=i.dposition),n[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const h=k4.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),V2(n,(i,s)=>{i||delete r[s]}),V2(r,i=>{Ze.configure(this,i,i.options),Ze.addBox(this,i)})}_updateMetasets(){const t=this._metasets,a=this.data.datasets.length,r=t.length;if(t.sort((n,c)=>n.index-c.index),r>a){for(let n=a;n<r;++n)this._destroyDatasetMeta(n);t.splice(a,r-a)}this._sortedMetasets=t.slice(0).sort(Dd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:a}}=this;t.length>a.length&&delete this._stacks,t.forEach((r,n)=>{a.filter(c=>c===r._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],a=this.data.datasets;let r,n;for(this._removeUnreferencedMetasets(),r=0,n=a.length;r<n;r++){const c=a[r];let i=this.getDatasetMeta(r);const s=c.type||this.config.type;if(i.type&&i.type!==s&&(this._destroyDatasetMeta(r),i=this.getDatasetMeta(r)),i.type=s,i.indexAxis=c.indexAxis||u7(s,this.options),i.order=c.order||0,i.index=r,i.label=""+c.label,i.visible=this.isDatasetVisible(r),i.controller)i.controller.updateIndex(r),i.controller.linkScales();else{const l=k4.getController(s),{datasetElementType:f,dataElementType:u}=K2.datasets[s];Object.assign(l,{dataElementType:k4.getElement(u),datasetElementType:f&&k4.getElement(f)}),i.controller=new l(this,r),t.push(i.controller)}}return this._updateMetasets(),t}_resetElements(){V2(this.data.datasets,(t,a)=>{this.getDatasetMeta(a).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const a=this.config;a.update();const r=this._options=a.createResolver(a.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const c=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let f=0,u=this.data.datasets.length;f<u;f++){const{controller:d}=this.getDatasetMeta(f),h=!n&&c.indexOf(d)===-1;d.buildOrUpdateElements(h),i=Math.max(+d.getMaxOverflow(),i)}i=this._minPadding=r.layout.autoPadding?i:0,this._updateLayout(i),n||V2(c,f=>{f.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Dd("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){V2(this.scales,t=>{Ze.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,a=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Gu(a,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,a=this._getUniformDataChanges()||[];for(const{method:r,start:n,count:c}of a){const i=r==="_removeElements"?-c:c;pj(t,n,i)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const a=this.data.datasets.length,r=c=>new Set(t.filter(i=>i[0]===c).map((i,s)=>s+","+i.splice(1).join(","))),n=r(0);for(let c=1;c<a;c++)if(!Gu(n,r(c)))return;return Array.from(n).map(c=>c.split(",")).map(c=>({method:c[1],start:+c[2],count:+c[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ze.update(this,this.width,this.height,t);const a=this.chartArea,r=a.width<=0||a.height<=0;this._layers=[],V2(this.boxes,n=>{r&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,c)=>{n._idx=c}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let a=0,r=this.data.datasets.length;a<r;++a)this.getDatasetMeta(a).controller.configure();for(let a=0,r=this.data.datasets.length;a<r;++a)this._updateDataset(a,u0(t)?t({datasetIndex:a}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,a){const r=this.getDatasetMeta(t),n={meta:r,index:t,mode:a,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(r.controller._update(a),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(tt.has(this)?this.attached&&!tt.running(this)&&tt.start(this):(this.draw(),Od({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const a=this._layers;for(t=0;t<a.length&&a[t].z<=0;++t)a[t].draw(this.chartArea);for(this._drawDatasets();t<a.length;++t)a[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const a=this._sortedMetasets,r=[];let n,c;for(n=0,c=a.length;n<c;++n){const i=a[n];(!t||i.visible)&&r.push(i)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let a=t.length-1;a>=0;--a)this._drawDataset(t[a]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const a=this.ctx,r=t._clip,n=!r.disabled,c=gj(t,this.chartArea),i={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(n&&H5(a,{left:r.left===!1?0:c.left-r.left,right:r.right===!1?this.width:c.right+r.right,top:r.top===!1?0:c.top-r.top,bottom:r.bottom===!1?this.height:c.bottom+r.bottom}),t.controller.draw(),n&&V5(a),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return ut(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,a,r,n){const c=hq.modes[a];return typeof c=="function"?c(this,t,r,n):[]}getDatasetMeta(t){const a=this.data.datasets[t],r=this._metasets;let n=r.filter(c=>c&&c._dataset===a).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a&&a.order||0,index:t,_dataset:a,_parsed:[],_sorted:!1},r.push(n)),n}getContext(){return this.$context||(this.$context=v0(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const a=this.data.datasets[t];if(!a)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!a.hidden}setDatasetVisibility(t,a){const r=this.getDatasetMeta(t);r.hidden=!a}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,a,r){const n=r?"show":"hide",c=this.getDatasetMeta(t),i=c.controller._resolveAnimations(void 0,n);qr(a)?(c.data[a].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),i.update(c,{visible:r}),this.update(s=>s.datasetIndex===t?n:void 0))}hide(t,a){this._updateVisibility(t,a,!1)}show(t,a){this._updateVisibility(t,a,!0)}_destroyDatasetMeta(t){const a=this._metasets[t];a&&a.controller&&a.controller._destroy(),delete this._metasets[t]}_stop(){let t,a;for(this.stop(),tt.remove(this),t=0,a=this.data.datasets.length;t<a;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:a}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),rd(t,a),this.platform.releaseContext(a),this.canvas=null,this.ctx=null),delete Q8[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,a=this.platform,r=(c,i)=>{a.addEventListener(this,c,i),t[c]=i},n=(c,i,s)=>{c.offsetX=i,c.offsetY=s,this._eventHandler(c)};V2(this.options.events,c=>r(c,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,a=this.platform,r=(l,f)=>{a.addEventListener(this,l,f),t[l]=f},n=(l,f)=>{t[l]&&(a.removeEventListener(this,l,f),delete t[l])},c=(l,f)=>{this.canvas&&this.resize(l,f)};let i;const s=()=>{n("attach",s),this.attached=!0,this.resize(),r("resize",c),r("detach",i)};i=()=>{this.attached=!1,n("resize",c),this._stop(),this._resize(0,0),r("attach",s)},a.isAttached(this.canvas)?s():i()}unbindEvents(){V2(this._listeners,(t,a)=>{this.platform.removeEventListener(this,a,t)}),this._listeners={},V2(this._responsiveListeners,(t,a)=>{this.platform.removeEventListener(this,a,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,a,r){const n=r?"set":"remove";let c,i,s,l;for(a==="dataset"&&(c=this.getDatasetMeta(t[0].datasetIndex),c.controller["_"+n+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){i=t[s];const f=i&&this.getDatasetMeta(i.datasetIndex).controller;f&&f[n+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const a=this._active||[],r=t.map(({datasetIndex:c,index:i})=>{const s=this.getDatasetMeta(c);if(!s)throw new Error("No dataset found at index "+c);return{datasetIndex:c,element:s.data[i],index:i}});!Hc(r,a)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,a))}notifyPlugins(t,a,r){return this._plugins.notify(this,t,a,r)}isPluginEnabled(t){return this._plugins._cache.filter(a=>a.plugin.id===t).length===1}_updateHoverStyles(t,a,r){const n=this.options.hover,c=(l,f)=>l.filter(u=>!f.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),i=c(a,t),s=r?t:c(t,a);i.length&&this.updateHoverStyle(i,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,a){const r={event:t,replay:a,cancelable:!0,inChartArea:this.isPointInArea(t)},n=i=>(i.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,n)===!1)return;const c=this._handleEvent(t,a,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,n),(c||r.changed)&&this.render(),this}_handleEvent(t,a,r){const{_active:n=[],options:c}=this,i=a,s=this._getActiveElements(t,n,r,i),l=_U(t),f=vj(t,this._lastEvent,r,l);r&&(this._lastEvent=null,E2(c.onHover,[t,s,this],this),l&&E2(c.onClick,[t,s,this],this));const u=!Hc(s,n);return(u||a)&&(this._active=s,this._updateHoverStyles(s,n,a)),this._lastEvent=f,u}_getActiveElements(t,a,r,n){if(t.type==="mouseout")return[];if(!r)return a;const c=this.options.hover;return this.getElementsAtEventForMode(t,c.mode,c,n)}}v1(H4,"defaults",K2),v1(H4,"instances",Q8),v1(H4,"overrides",a6),v1(H4,"registry",k4),v1(H4,"version",dj),v1(H4,"getChart",Pd);function Bd(){return V2(H4.instances,e=>e._plugins.invalidate())}function yj(e,t,a){const{startAngle:r,pixelMargin:n,x:c,y:i,outerRadius:s,innerRadius:l}=t;let f=n/s;e.beginPath(),e.arc(c,i,s,r-f,a+f),l>n?(f=n/l,e.arc(c,i,l,a+f,r-f,!0)):e.arc(c,i,n,a+pe,r-pe),e.closePath(),e.clip()}function xj(e){return ol(e,["outerStart","outerEnd","innerStart","innerEnd"])}function bj(e,t,a,r){const n=xj(e.options.borderRadius),c=(a-t)/2,i=Math.min(c,r*t/2),s=l=>{const f=(a-Math.min(c,l))*r/2;return Ne(l,0,Math.min(c,f))};return{outerStart:s(n.outerStart),outerEnd:s(n.outerEnd),innerStart:Ne(n.innerStart,0,i),innerEnd:Ne(n.innerEnd,0,i)}}function H6(e,t,a,r){return{x:a+e*Math.cos(t),y:r+e*Math.sin(t)}}function Ec(e,t,a,r,n,c){const{x:i,y:s,startAngle:l,pixelMargin:f,innerRadius:u}=t,d=Math.max(t.outerRadius+r+a-f,0),h=u>0?u+r+a+f:0;let m=0;const v=n-l;if(r){const S=u>0?u-r:0,B=d>0?d-r:0,F=(S+B)/2,e1=F!==0?v*F/(F+r):v;m=(v-e1)/2}const p=Math.max(.001,v*d-a/U2)/d,g=(v-p)/2,y=l+g+m,x=n-g-m,{outerStart:C,outerEnd:b,innerStart:M,innerEnd:w}=bj(t,h,d,x-y),z=d-C,H=d-b,A=y+C/z,V=x-b/H,k=h+M,_=h+w,N=y+M/k,q=x-w/_;if(e.beginPath(),c){const S=(A+V)/2;if(e.arc(i,s,d,A,S),e.arc(i,s,d,S,V),b>0){const Y=H6(H,V,i,s);e.arc(Y.x,Y.y,b,V,x+pe)}const B=H6(_,x,i,s);if(e.lineTo(B.x,B.y),w>0){const Y=H6(_,q,i,s);e.arc(Y.x,Y.y,w,x+pe,q+Math.PI)}const F=(x-w/h+(y+M/h))/2;if(e.arc(i,s,h,x-w/h,F,!0),e.arc(i,s,h,F,y+M/h,!0),M>0){const Y=H6(k,N,i,s);e.arc(Y.x,Y.y,M,N+Math.PI,y-pe)}const e1=H6(z,y,i,s);if(e.lineTo(e1.x,e1.y),C>0){const Y=H6(z,A,i,s);e.arc(Y.x,Y.y,C,y-pe,A)}}else{e.moveTo(i,s);const S=Math.cos(A)*d+i,B=Math.sin(A)*d+s;e.lineTo(S,B);const F=Math.cos(V)*d+i,e1=Math.sin(V)*d+s;e.lineTo(F,e1)}e.closePath()}function Cj(e,t,a,r,n){const{fullCircles:c,startAngle:i,circumference:s}=t;let l=t.endAngle;if(c){Ec(e,t,a,r,l,n);for(let f=0;f<c;++f)e.fill();isNaN(s)||(l=i+(s%$2||$2))}return Ec(e,t,a,r,l,n),e.fill(),l}function Mj(e,t,a,r,n){const{fullCircles:c,startAngle:i,circumference:s,options:l}=t,{borderWidth:f,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,m=l.borderAlign==="inner";if(!f)return;e.setLineDash(d||[]),e.lineDashOffset=h,m?(e.lineWidth=f*2,e.lineJoin=u||"round"):(e.lineWidth=f,e.lineJoin=u||"bevel");let v=t.endAngle;if(c){Ec(e,t,a,r,v,n);for(let p=0;p<c;++p)e.stroke();isNaN(s)||(v=i+(s%$2||$2))}m&&yj(e,t,v),c||(Ec(e,t,a,r,v,n),e.stroke())}class Xa extends g4{constructor(a){super();v1(this,"circumference");v1(this,"endAngle");v1(this,"fullCircles");v1(this,"innerRadius");v1(this,"outerRadius");v1(this,"pixelMargin");v1(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,a&&Object.assign(this,a)}inRange(a,r,n){const c=this.getProps(["x","y"],n),{angle:i,distance:s}=ly(c,{x:a,y:r}),{startAngle:l,endAngle:f,innerRadius:u,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),m=(this.options.spacing+this.options.borderWidth)/2,v=a2(h,f-l),p=jr(i,l,f)&&l!==f,g=v>=$2||p,y=lt(s,u+m,d+m);return g&&y}getCenterPoint(a){const{x:r,y:n,startAngle:c,endAngle:i,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],a),{offset:f,spacing:u}=this.options,d=(c+i)/2,h=(s+l+u+f)/2;return{x:r+Math.cos(d)*h,y:n+Math.sin(d)*h}}tooltipPosition(a){return this.getCenterPoint(a)}draw(a){const{options:r,circumference:n}=this,c=(r.offset||0)/4,i=(r.spacing||0)/2,s=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=n>$2?Math.floor(n/$2):0,n===0||this.innerRadius<0||this.outerRadius<0)return;a.save();const l=(this.startAngle+this.endAngle)/2;a.translate(Math.cos(l)*c,Math.sin(l)*c);const f=1-Math.sin(Math.min(U2,n||0)),u=c*f;a.fillStyle=r.backgroundColor,a.strokeStyle=r.borderColor,Cj(a,this,u,i,s),Mj(a,this,u,i,s),a.restore()}}v1(Xa,"id","arc"),v1(Xa,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),v1(Xa,"defaultRoutes",{backgroundColor:"backgroundColor"}),v1(Xa,"descriptors",{_scriptable:!0,_indexable:a=>a!=="borderDash"});function $y(e,t,a=t){e.lineCap=a2(a.borderCapStyle,t.borderCapStyle),e.setLineDash(a2(a.borderDash,t.borderDash)),e.lineDashOffset=a2(a.borderDashOffset,t.borderDashOffset),e.lineJoin=a2(a.borderJoinStyle,t.borderJoinStyle),e.lineWidth=a2(a.borderWidth,t.borderWidth),e.strokeStyle=a2(a.borderColor,t.borderColor)}function zj(e,t,a){e.lineTo(a.x,a.y)}function wj(e){return e.stepped?YU:e.tension||e.cubicInterpolationMode==="monotone"?GU:zj}function Uy(e,t,a={}){const r=e.length,{start:n=0,end:c=r-1}=a,{start:i,end:s}=t,l=Math.max(n,i),f=Math.min(c,s),u=n<i&&c<i||n>s&&c>s;return{count:r,start:l,loop:t.loop,ilen:f<l&&!u?r+f-l:f-l}}function _j(e,t,a,r){const{points:n,options:c}=t,{count:i,start:s,loop:l,ilen:f}=Uy(n,a,r),u=wj(c);let{move:d=!0,reverse:h}=r||{},m,v,p;for(m=0;m<=f;++m)v=n[(s+(h?f-m:m))%i],!v.skip&&(d?(e.moveTo(v.x,v.y),d=!1):u(e,p,v,h,c.stepped),p=v);return l&&(v=n[(s+(h?f:0))%i],u(e,p,v,h,c.stepped)),!!l}function kj(e,t,a,r){const n=t.points,{count:c,start:i,ilen:s}=Uy(n,a,r),{move:l=!0,reverse:f}=r||{};let u=0,d=0,h,m,v,p,g,y;const x=b=>(i+(f?s-b:b))%c,C=()=>{p!==g&&(e.lineTo(u,g),e.lineTo(u,p),e.lineTo(u,y))};for(l&&(m=n[x(0)],e.moveTo(m.x,m.y)),h=0;h<=s;++h){if(m=n[x(h)],m.skip)continue;const b=m.x,M=m.y,w=b|0;w===v?(M<p?p=M:M>g&&(g=M),u=(d*u+b)/++d):(C(),e.lineTo(b,M),v=w,d=0,p=g=M),y=M}C()}function h7(e){const t=e.options,a=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!a?kj:_j}function Hj(e){return e.stepped?kW:e.tension||e.cubicInterpolationMode==="monotone"?HW:E0}function Vj(e,t,a,r){let n=t._path;n||(n=t._path=new Path2D,t.path(n,a,r)&&n.closePath()),$y(e,t.options),e.stroke(n)}function Lj(e,t,a,r){const{segments:n,options:c}=t,i=h7(t);for(const s of n)$y(e,c,s.style),e.beginPath(),i(e,t,s,{start:a,end:a+r-1})&&e.closePath(),e.stroke()}const Sj=typeof Path2D=="function";function Aj(e,t,a,r){Sj&&!t.options.segment?Vj(e,t,a,r):Lj(e,t,a,r)}class Yt extends g4{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,a){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const n=r.spanGaps?this._loop:this._fullLoop;yW(this._points,r,t,n,a),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=EW(this,this.options.segment))}first(){const t=this.segments,a=this.points;return t.length&&a[t[0].start]}last(){const t=this.segments,a=this.points,r=t.length;return r&&a[t[r-1].end]}interpolate(t,a){const r=this.options,n=t[a],c=this.points,i=Ly(this,{property:a,start:n,end:n});if(!i.length)return;const s=[],l=Hj(r);let f,u;for(f=0,u=i.length;f<u;++f){const{start:d,end:h}=i[f],m=c[d],v=c[h];if(m===v){s.push(m);continue}const p=Math.abs((n-m[a])/(v[a]-m[a])),g=l(m,v,p,r.stepped);g[a]=t[a],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,a,r){return h7(this)(t,this,a,r)}path(t,a,r){const n=this.segments,c=h7(this);let i=this._loop;a=a||0,r=r||this.points.length-a;for(const s of n)i&=c(t,this,s,{start:a,end:a+r-1});return!!i}draw(t,a,r,n){const c=this.options||{};(this.points||[]).length&&c.borderWidth&&(t.save(),Aj(t,this,r,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}v1(Yt,"id","line"),v1(Yt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),v1(Yt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),v1(Yt,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Fd(e,t,a,r){const n=e.options,{[a]:c}=e.getProps([a],r);return Math.abs(t-c)<n.radius+n.hitRadius}class J8 extends g4{constructor(a){super();v1(this,"parsed");v1(this,"skip");v1(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,a&&Object.assign(this,a)}inRange(a,r,n){const c=this.options,{x:i,y:s}=this.getProps(["x","y"],n);return Math.pow(a-i,2)+Math.pow(r-s,2)<Math.pow(c.hitRadius+c.radius,2)}inXRange(a,r){return Fd(this,a,"x",r)}inYRange(a,r){return Fd(this,a,"y",r)}getCenterPoint(a){const{x:r,y:n}=this.getProps(["x","y"],a);return{x:r,y:n}}size(a){a=a||this.options||{};let r=a.radius||0;r=Math.max(r,r&&a.hoverRadius||0);const n=r&&a.borderWidth||0;return(r+n)*2}draw(a,r){const n=this.options;this.skip||n.radius<.1||!ut(this,r,this.size(n)/2)||(a.strokeStyle=n.borderColor,a.lineWidth=n.borderWidth,a.fillStyle=n.backgroundColor,l7(a,n,this.x,this.y))}getRange(){const a=this.options||{};return a.radius+a.hitRadius}}v1(J8,"id","point"),v1(J8,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),v1(J8,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Wy(e,t){const{x:a,y:r,base:n,width:c,height:i}=e.getProps(["x","y","base","width","height"],t);let s,l,f,u,d;return e.horizontal?(d=i/2,s=Math.min(a,n),l=Math.max(a,n),f=r-d,u=r+d):(d=c/2,s=a-d,l=a+d,f=Math.min(r,n),u=Math.max(r,n)),{left:s,top:f,right:l,bottom:u}}function Gt(e,t,a,r){return e?0:Ne(t,a,r)}function Tj(e,t,a){const r=e.options.borderWidth,n=e.borderSkipped,c=yy(r);return{t:Gt(n.top,c.top,0,a),r:Gt(n.right,c.right,0,t),b:Gt(n.bottom,c.bottom,0,a),l:Gt(n.left,c.left,0,t)}}function Ej(e,t,a){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),n=e.options.borderRadius,c=j0(n),i=Math.min(t,a),s=e.borderSkipped,l=r||u2(n);return{topLeft:Gt(!l||s.top||s.left,c.topLeft,0,i),topRight:Gt(!l||s.top||s.right,c.topRight,0,i),bottomLeft:Gt(!l||s.bottom||s.left,c.bottomLeft,0,i),bottomRight:Gt(!l||s.bottom||s.right,c.bottomRight,0,i)}}function Nj(e){const t=Wy(e),a=t.right-t.left,r=t.bottom-t.top,n=Tj(e,a/2,r/2),c=Ej(e,a/2,r/2);return{outer:{x:t.left,y:t.top,w:a,h:r,radius:c},inner:{x:t.left+n.l,y:t.top+n.t,w:a-n.l-n.r,h:r-n.t-n.b,radius:{topLeft:Math.max(0,c.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,c.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,c.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,c.bottomRight-Math.max(n.b,n.r))}}}}function Yi(e,t,a,r){const n=t===null,c=a===null,s=e&&!(n&&c)&&Wy(e,r);return s&&(n||lt(t,s.left,s.right))&&(c||lt(a,s.top,s.bottom))}function Dj(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Oj(e,t){e.rect(t.x,t.y,t.w,t.h)}function Gi(e,t,a={}){const r=e.x!==a.x?-t:0,n=e.y!==a.y?-t:0,c=(e.x+e.w!==a.x+a.w?t:0)-r,i=(e.y+e.h!==a.y+a.h?t:0)-n;return{x:e.x+r,y:e.y+n,w:e.w+c,h:e.h+i,radius:e.radius}}class ec extends g4{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:a,options:{borderColor:r,backgroundColor:n}}=this,{inner:c,outer:i}=Nj(this),s=Dj(i.radius)?Yr:Oj;t.save(),(i.w!==c.w||i.h!==c.h)&&(t.beginPath(),s(t,Gi(i,a,c)),t.clip(),s(t,Gi(c,-a,i)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,Gi(c,a)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,a,r){return Yi(this,t,a,r)}inXRange(t,a){return Yi(this,t,null,a)}inYRange(t,a){return Yi(this,null,t,a)}getCenterPoint(t){const{x:a,y:r,base:n,horizontal:c}=this.getProps(["x","y","base","horizontal"],t);return{x:c?(a+n)/2:a,y:c?r:(r+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}v1(ec,"id","bar"),v1(ec,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),v1(ec,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Pj=Object.freeze({__proto__:null,ArcElement:Xa,BarElement:ec,LineElement:Yt,PointElement:J8});const m7=["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)"],Rd=m7.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function qy(e){return m7[e%m7.length]}function jy(e){return Rd[e%Rd.length]}function Bj(e,t){return e.borderColor=qy(t),e.backgroundColor=jy(t),++t}function Fj(e,t){return e.backgroundColor=e.data.map(()=>qy(t++)),t}function Rj(e,t){return e.backgroundColor=e.data.map(()=>jy(t++)),t}function Ij(e){let t=0;return(a,r)=>{const n=e.getDatasetMeta(r).controller;n instanceof I0?t=Fj(a,t):n instanceof pr?t=Rj(a,t):n&&(t=Bj(a,t))}}function Id(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function $j(e){return e&&(e.borderColor||e.backgroundColor)}function Uj(){return K2.borderColor!=="rgba(0,0,0,0.1)"||K2.backgroundColor!=="rgba(0,0,0,0.1)"}var Wj={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,a){if(!a.enabled)return;const{data:{datasets:r},options:n}=e.config,{elements:c}=n,i=Id(r)||$j(n)||c&&Id(c)||Uj();if(!a.forceOverride&&i)return;const s=Ij(e);r.forEach(s)}};function qj(e,t,a,r,n){const c=n.samples||r;if(c>=a)return e.slice(t,t+a);const i=[],s=(a-2)/(c-2);let l=0;const f=t+a-1;let u=t,d,h,m,v,p;for(i[l++]=e[u],d=0;d<c-2;d++){let g=0,y=0,x;const C=Math.floor((d+1)*s)+1+t,b=Math.min(Math.floor((d+2)*s)+1,a)+t,M=b-C;for(x=C;x<b;x++)g+=e[x].x,y+=e[x].y;g/=M,y/=M;const w=Math.floor(d*s)+1+t,z=Math.min(Math.floor((d+1)*s)+1,a)+t,{x:H,y:A}=e[u];for(m=v=-1,x=w;x<z;x++)v=.5*Math.abs((H-g)*(e[x].y-A)-(H-e[x].x)*(y-A)),v>m&&(m=v,h=e[x],p=x);i[l++]=h,u=p}return i[l++]=e[f],i}function jj(e,t,a,r){let n=0,c=0,i,s,l,f,u,d,h,m,v,p;const g=[],y=t+a-1,x=e[t].x,b=e[y].x-x;for(i=t;i<t+a;++i){s=e[i],l=(s.x-x)/b*r,f=s.y;const M=l|0;if(M===u)f<v?(v=f,d=i):f>p&&(p=f,h=i),n=(c*n+s.x)/++c;else{const w=i-1;if(!x2(d)&&!x2(h)){const z=Math.min(d,h),H=Math.max(d,h);z!==m&&z!==w&&g.push({...e[z],x:n}),H!==m&&H!==w&&g.push({...e[H],x:n})}i>0&&w!==m&&g.push(e[w]),g.push(s),u=M,c=0,v=p=f,d=h=m=i}}return g}function Yy(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function $d(e){e.data.datasets.forEach(t=>{Yy(t)})}function Yj(e,t){const a=t.length;let r=0,n;const{iScale:c}=e,{min:i,max:s,minDefined:l,maxDefined:f}=c.getUserBounds();return l&&(r=Ne(ft(t,c.axis,i).lo,0,a-1)),f?n=Ne(ft(t,c.axis,s).hi+1,r,a)-r:n=a-r,{start:r,count:n}}var Gj={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,a)=>{if(!a.enabled){$d(e);return}const r=e.width;e.data.datasets.forEach((n,c)=>{const{_data:i,indexAxis:s}=n,l=e.getDatasetMeta(c),f=i||n.data;if(Ya([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:d,count:h}=Yj(l,f);const m=a.threshold||4*r;if(h<=m){Yy(n);return}x2(i)&&(n._data=f,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let v;switch(a.algorithm){case"lttb":v=qj(f,d,h,r,a);break;case"min-max":v=jj(f,d,h,r);break;default:throw new Error(`Unsupported decimation algorithm '${a.algorithm}'`)}n._decimated=v})},destroy(e){$d(e)}};function Xj(e,t,a){const r=e.segments,n=e.points,c=t.points,i=[];for(const s of r){let{start:l,end:f}=s;f=pl(l,f,n);const u=p7(a,n[l],n[f],s.loop);if(!t.segments){i.push({source:s,target:u,start:n[l],end:n[f]});continue}const d=Ly(t,u);for(const h of d){const m=p7(a,c[h.start],c[h.end],h.loop),v=Vy(s,n,m);for(const p of v)i.push({source:p,target:h,start:{[a]:Ud(u,m,"start",Math.max)},end:{[a]:Ud(u,m,"end",Math.min)}})}}return i}function p7(e,t,a,r){if(r)return;let n=t[e],c=a[e];return e==="angle"&&(n=b3(n),c=b3(c)),{property:e,start:n,end:c}}function Kj(e,t){const{x:a=null,y:r=null}=e||{},n=t.points,c=[];return t.segments.forEach(({start:i,end:s})=>{s=pl(i,s,n);const l=n[i],f=n[s];r!==null?(c.push({x:l.x,y:r}),c.push({x:f.x,y:r})):a!==null&&(c.push({x:a,y:l.y}),c.push({x:a,y:f.y}))}),c}function pl(e,t,a){for(;t>e;t--){const r=a[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function Ud(e,t,a,r){return e&&t?r(e[a],t[a]):e?e[a]:t?t[a]:0}function Gy(e,t){let a=[],r=!1;return R2(e)?(r=!0,a=e):a=Kj(e,t),a.length?new Yt({points:a,options:{tension:0},_loop:r,_fullLoop:r}):null}function Wd(e){return e&&e.fill!==!1}function Zj(e,t,a){let n=e[t].fill;const c=[t];let i;if(!a)return n;for(;n!==!1&&c.indexOf(n)===-1;){if(!se(n))return n;if(i=e[n],!i)return!1;if(i.visible)return n;c.push(n),n=i.fill}return!1}function Qj(e,t,a){const r=aY(e);if(u2(r))return isNaN(r.value)?!1:r;let n=parseFloat(r);return se(n)&&Math.floor(n)===n?Jj(r[0],t,n,a):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Jj(e,t,a,r){return(e==="-"||e==="+")&&(a=t+a),a===t||a<0||a>=r?!1:a}function eY(e,t){let a=null;return e==="start"?a=t.bottom:e==="end"?a=t.top:u2(e)?a=t.getPixelForValue(e.value):t.getBasePixel&&(a=t.getBasePixel()),a}function tY(e,t,a){let r;return e==="start"?r=a:e==="end"?r=t.options.reverse?t.min:t.max:u2(e)?r=e.value:r=t.getBaseValue(),r}function aY(e){const t=e.options,a=t.fill;let r=a2(a&&a.target,a);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function rY(e){const{scale:t,index:a,line:r}=e,n=[],c=r.segments,i=r.points,s=nY(t,a);s.push(Gy({x:null,y:t.bottom},r));for(let l=0;l<c.length;l++){const f=c[l];for(let u=f.start;u<=f.end;u++)cY(n,i[u],s)}return new Yt({points:n,options:{}})}function nY(e,t){const a=[],r=e.getMatchingVisibleMetas("line");for(let n=0;n<r.length;n++){const c=r[n];if(c.index===t)break;c.hidden||a.unshift(c.dataset)}return a}function cY(e,t,a){const r=[];for(let n=0;n<a.length;n++){const c=a[n],{first:i,last:s,point:l}=iY(c,t,"x");if(!(!l||i&&s)){if(i)r.unshift(l);else if(e.push(l),!s)break}}e.push(...r)}function iY(e,t,a){const r=e.interpolate(t,a);if(!r)return{};const n=r[a],c=e.segments,i=e.points;let s=!1,l=!1;for(let f=0;f<c.length;f++){const u=c[f],d=i[u.start][a],h=i[u.end][a];if(lt(n,d,h)){s=n===d,l=n===h;break}}return{first:s,last:l,point:r}}class Xy{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,a,r){const{x:n,y:c,radius:i}=this;return a=a||{start:0,end:$2},t.arc(n,c,i,a.end,a.start,!0),!r.bounds}interpolate(t){const{x:a,y:r,radius:n}=this,c=t.angle;return{x:a+Math.cos(c)*n,y:r+Math.sin(c)*n,angle:c}}}function sY(e){const{chart:t,fill:a,line:r}=e;if(se(a))return oY(t,a);if(a==="stack")return rY(e);if(a==="shape")return!0;const n=lY(e);return n instanceof Xy?n:Gy(n,r)}function oY(e,t){const a=e.getDatasetMeta(t);return a&&e.isDatasetVisible(t)?a.dataset:null}function lY(e){return(e.scale||{}).getPointPositionForValue?uY(e):fY(e)}function fY(e){const{scale:t={},fill:a}=e,r=eY(a,t);if(se(r)){const n=t.isHorizontal();return{x:n?r:null,y:n?null:r}}return null}function uY(e){const{scale:t,fill:a}=e,r=t.options,n=t.getLabels().length,c=r.reverse?t.max:t.min,i=tY(a,t,c),s=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,c);return new Xy({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(i)})}for(let l=0;l<n;++l)s.push(t.getPointPositionForValue(l,i));return s}function Xi(e,t,a){const r=sY(t),{line:n,scale:c,axis:i}=t,s=n.options,l=s.fill,f=s.backgroundColor,{above:u=f,below:d=f}=l||{};r&&n.points.length&&(H5(e,a),dY(e,{line:n,target:r,above:u,below:d,area:a,scale:c,axis:i}),V5(e))}function dY(e,t){const{line:a,target:r,above:n,below:c,area:i,scale:s}=t,l=a._loop?"angle":t.axis;e.save(),l==="x"&&c!==n&&(qd(e,r,i.top),jd(e,{line:a,target:r,color:n,scale:s,property:l}),e.restore(),e.save(),qd(e,r,i.bottom)),jd(e,{line:a,target:r,color:c,scale:s,property:l}),e.restore()}function qd(e,t,a){const{segments:r,points:n}=t;let c=!0,i=!1;e.beginPath();for(const s of r){const{start:l,end:f}=s,u=n[l],d=n[pl(l,f,n)];c?(e.moveTo(u.x,u.y),c=!1):(e.lineTo(u.x,a),e.lineTo(u.x,u.y)),i=!!t.pathSegment(e,s,{move:i}),i?e.closePath():e.lineTo(d.x,a)}e.lineTo(t.first().x,a),e.closePath(),e.clip()}function jd(e,t){const{line:a,target:r,property:n,color:c,scale:i}=t,s=Xj(a,r,n);for(const{source:l,target:f,start:u,end:d}of s){const{style:{backgroundColor:h=c}={}}=l,m=r!==!0;e.save(),e.fillStyle=h,hY(e,i,m&&p7(n,u,d)),e.beginPath();const v=!!a.pathSegment(e,l);let p;if(m){v?e.closePath():Yd(e,r,d,n);const g=!!r.pathSegment(e,f,{move:v,reverse:!0});p=v&&g,p||Yd(e,r,u,n)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function hY(e,t,a){const{top:r,bottom:n}=t.chart.chartArea,{property:c,start:i,end:s}=a||{};c==="x"&&(e.beginPath(),e.rect(i,r,s-i,n-r),e.clip())}function Yd(e,t,a,r){const n=t.interpolate(a,r);n&&e.lineTo(n.x,n.y)}var mY={id:"filler",afterDatasetsUpdate(e,t,a){const r=(e.data.datasets||[]).length,n=[];let c,i,s,l;for(i=0;i<r;++i)c=e.getDatasetMeta(i),s=c.dataset,l=null,s&&s.options&&s instanceof Yt&&(l={visible:e.isDatasetVisible(i),index:i,fill:Qj(s,i,r),chart:e,axis:c.controller.options.indexAxis,scale:c.vScale,line:s}),c.$filler=l,n.push(l);for(i=0;i<r;++i)l=n[i],!(!l||l.fill===!1)&&(l.fill=Zj(n,i,a.propagate))},beforeDraw(e,t,a){const r=a.drawTime==="beforeDraw",n=e.getSortedVisibleDatasetMetas(),c=e.chartArea;for(let i=n.length-1;i>=0;--i){const s=n[i].$filler;s&&(s.line.updateControlPoints(c,s.axis),r&&s.fill&&Xi(e.ctx,s,c))}},beforeDatasetsDraw(e,t,a){if(a.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let n=r.length-1;n>=0;--n){const c=r[n].$filler;Wd(c)&&Xi(e.ctx,c,e.chartArea)}},beforeDatasetDraw(e,t,a){const r=t.meta.$filler;!Wd(r)||a.drawTime!=="beforeDatasetDraw"||Xi(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Gd=(e,t)=>{let{boxHeight:a=t,boxWidth:r=t}=e;return e.usePointStyle&&(a=Math.min(a,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:a,itemHeight:Math.max(t,a)}},pY=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Xd extends g4{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,a,r){this.maxWidth=t,this.maxHeight=a,this._margins=r,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 t=this.options.labels||{};let a=E2(t.generateLabels,[this.chart],this)||[];t.filter&&(a=a.filter(r=>t.filter(r,this.chart.data))),t.sort&&(a=a.sort((r,n)=>t.sort(r,n,this.chart.data))),this.options.reverse&&a.reverse(),this.legendItems=a}fit(){const{options:t,ctx:a}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,n=Ve(r.font),c=n.size,i=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Gd(r,c);let f,u;a.font=n.string,this.isHorizontal()?(f=this.maxWidth,u=this._fitRows(i,c,s,l)+10):(u=this.maxHeight,f=this._fitCols(i,n,s,l)+10),this.width=Math.min(f,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,a,r,n){const{ctx:c,maxWidth:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],f=this.lineWidths=[0],u=n+s;let d=t;c.textAlign="left",c.textBaseline="middle";let h=-1,m=-u;return this.legendItems.forEach((v,p)=>{const g=r+a/2+c.measureText(v.text).width;(p===0||f[f.length-1]+g+2*s>i)&&(d+=u,f[f.length-(p>0?0:1)]=0,m+=u,h++),l[p]={left:0,top:m,row:h,width:g,height:n},f[f.length-1]+=g+s}),d}_fitCols(t,a,r,n){const{ctx:c,maxHeight:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],f=this.columnSizes=[],u=i-t;let d=s,h=0,m=0,v=0,p=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:x,itemHeight:C}=vY(r,a,c,g,n);y>0&&m+C+2*s>u&&(d+=h+s,f.push({width:h,height:m}),v+=h+s,p++,h=m=0),l[y]={left:v,top:m,col:p,width:x,height:C},h=Math.max(h,x),m+=C+s}),d+=h,f.push({width:h,height:m}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:a,options:{align:r,labels:{padding:n},rtl:c}}=this,i=q6(c,this.left,this.width);if(this.isHorizontal()){let s=0,l=je(r,this.left+n,this.right-this.lineWidths[s]);for(const f of a)s!==f.row&&(s=f.row,l=je(r,this.left+n,this.right-this.lineWidths[s])),f.top+=this.top+t+n,f.left=i.leftForLtr(i.x(l),f.width),l+=f.width+n}else{let s=0,l=je(r,this.top+t+n,this.bottom-this.columnSizes[s].height);for(const f of a)f.col!==s&&(s=f.col,l=je(r,this.top+t+n,this.bottom-this.columnSizes[s].height)),f.top=l,f.left+=this.left+n,f.left=i.leftForLtr(i.x(f.left),f.width),l+=f.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;H5(t,this),this._draw(),V5(t)}}_draw(){const{options:t,columnSizes:a,lineWidths:r,ctx:n}=this,{align:c,labels:i}=t,s=K2.color,l=q6(t.rtl,this.left,this.width),f=Ve(i.font),{padding:u}=i,d=f.size,h=d/2;let m;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=f.string;const{boxWidth:v,boxHeight:p,itemHeight:g}=Gd(i,d),y=function(w,z,H){if(isNaN(v)||v<=0||isNaN(p)||p<0)return;n.save();const A=a2(H.lineWidth,1);if(n.fillStyle=a2(H.fillStyle,s),n.lineCap=a2(H.lineCap,"butt"),n.lineDashOffset=a2(H.lineDashOffset,0),n.lineJoin=a2(H.lineJoin,"miter"),n.lineWidth=A,n.strokeStyle=a2(H.strokeStyle,s),n.setLineDash(a2(H.lineDash,[])),i.usePointStyle){const V={radius:p*Math.SQRT2/2,pointStyle:H.pointStyle,rotation:H.rotation,borderWidth:A},k=l.xPlus(w,v/2),_=z+h;gy(n,V,k,_,i.pointStyleWidth&&v)}else{const V=z+Math.max((d-p)/2,0),k=l.leftForLtr(w,v),_=j0(H.borderRadius);n.beginPath(),Object.values(_).some(N=>N!==0)?Yr(n,{x:k,y:V,w:v,h:p,radius:_}):n.rect(k,V,v,p),n.fill(),A!==0&&n.stroke()}n.restore()},x=function(w,z,H){r6(n,H.text,w,z+g/2,f,{strikethrough:H.hidden,textAlign:l.textAlign(H.textAlign)})},C=this.isHorizontal(),b=this._computeTitleHeight();C?m={x:je(c,this.left+u,this.right-r[0]),y:this.top+u+b,line:0}:m={x:this.left+u,y:je(c,this.top+b+u,this.bottom-a[0].height),line:0},_y(this.ctx,t.textDirection);const M=g+u;this.legendItems.forEach((w,z)=>{n.strokeStyle=w.fontColor,n.fillStyle=w.fontColor;const H=n.measureText(w.text).width,A=l.textAlign(w.textAlign||(w.textAlign=i.textAlign)),V=v+h+H;let k=m.x,_=m.y;l.setWidth(this.width),C?z>0&&k+V+u>this.right&&(_=m.y+=M,m.line++,k=m.x=je(c,this.left+u,this.right-r[m.line])):z>0&&_+M>this.bottom&&(k=m.x=k+a[m.line].width+u,m.line++,_=m.y=je(c,this.top+b+u,this.bottom-a[m.line].height));const N=l.x(k);if(y(N,_,w),k=OU(A,k+v+h,C?k+V:this.right,t.rtl),x(l.x(k),_,w),C)m.x+=V+u;else if(typeof w.text!="string"){const q=f.lineHeight;m.y+=Ky(w,q)+u}else m.y+=M}),ky(this.ctx,t.textDirection)}drawTitle(){const t=this.options,a=t.title,r=Ve(a.font),n=t3(a.padding);if(!a.display)return;const c=q6(t.rtl,this.left,this.width),i=this.ctx,s=a.position,l=r.size/2,f=n.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+f,d=je(t.align,d,this.right-h);else{const v=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);u=f+je(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const m=je(s,d,d+h);i.textAlign=c.textAlign(il(s)),i.textBaseline="middle",i.strokeStyle=a.color,i.fillStyle=a.color,i.font=r.string,r6(i,a.text,m,u,r)}_computeTitleHeight(){const t=this.options.title,a=Ve(t.font),r=t3(t.padding);return t.display?a.lineHeight+r.height:0}_getLegendItemAt(t,a){let r,n,c;if(lt(t,this.left,this.right)&&lt(a,this.top,this.bottom)){for(c=this.legendHitBoxes,r=0;r<c.length;++r)if(n=c[r],lt(t,n.left,n.left+n.width)&&lt(a,n.top,n.top+n.height))return this.legendItems[r]}return null}handleEvent(t){const a=this.options;if(!xY(t.type,a))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,c=pY(n,r);n&&!c&&E2(a.onLeave,[t,n,this],this),this._hoveredItem=r,r&&!c&&E2(a.onHover,[t,r,this],this)}else r&&E2(a.onClick,[t,r,this],this)}}function vY(e,t,a,r,n){const c=gY(r,e,t,a),i=yY(n,r,t.lineHeight);return{itemWidth:c,itemHeight:i}}function gY(e,t,a,r){let n=e.text;return n&&typeof n!="string"&&(n=n.reduce((c,i)=>c.length>i.length?c:i)),t+a.size/2+r.measureText(n).width}function yY(e,t,a){let r=e;return typeof t.text!="string"&&(r=Ky(t,a)),r}function Ky(e,t){const a=e.text?e.text.length:0;return t*a}function xY(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var bY={id:"legend",_element:Xd,start(e,t,a){const r=e.legend=new Xd({ctx:e.ctx,options:a,chart:e});Ze.configure(e,r,a),Ze.addBox(e,r)},stop(e){Ze.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,a){const r=e.legend;Ze.configure(e,r,a),r.options=a},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,a){const r=t.datasetIndex,n=a.chart;n.isDatasetVisible(r)?(n.hide(r),t.hidden=!0):(n.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:a,pointStyle:r,textAlign:n,color:c,useBorderRadius:i,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const f=l.controller.getStyle(a?0:void 0),u=t3(f.borderWidth);return{text:t[l.index].label,fillStyle:f.backgroundColor,fontColor:c,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:r||f.pointStyle,rotation:f.rotation,textAlign:n||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 vl extends g4{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,a){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=a;const n=R2(r.text)?r.text.length:1;this._padding=t3(r.padding);const c=n*Ve(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=c:this.width=c}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:a,left:r,bottom:n,right:c,options:i}=this,s=i.align;let l=0,f,u,d;return this.isHorizontal()?(u=je(s,r,c),d=a+t,f=c-r):(i.position==="left"?(u=r+t,d=je(s,n,a),l=U2*-.5):(u=c-t,d=je(s,a,n),l=U2*.5),f=n-a),{titleX:u,titleY:d,maxWidth:f,rotation:l}}draw(){const t=this.ctx,a=this.options;if(!a.display)return;const r=Ve(a.font),c=r.lineHeight/2+this._padding.top,{titleX:i,titleY:s,maxWidth:l,rotation:f}=this._drawArgs(c);r6(t,a.text,0,0,r,{color:a.color,maxWidth:l,rotation:f,textAlign:il(a.align),textBaseline:"middle",translation:[i,s]})}}function CY(e,t){const a=new vl({ctx:e.ctx,options:t,chart:e});Ze.configure(e,a,t),Ze.addBox(e,a),e.titleBlock=a}var MY={id:"title",_element:vl,start(e,t,a){CY(e,a)},stop(e){const t=e.titleBlock;Ze.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,a){const r=e.titleBlock;Ze.configure(e,r,a),r.options=a},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 b8=new WeakMap;var zY={id:"subtitle",start(e,t,a){const r=new vl({ctx:e.ctx,options:a,chart:e});Ze.configure(e,r,a),Ze.addBox(e,r),b8.set(e,r)},stop(e){Ze.removeBox(e,b8.get(e)),b8.delete(e)},beforeUpdate(e,t,a){const r=b8.get(e);Ze.configure(e,r,a),r.options=a},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 Ka={average(e){if(!e.length)return!1;let t,a,r=new Set,n=0,c=0;for(t=0,a=e.length;t<a;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),n+=l.y,++c}}return c===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:n/c}},nearest(e,t){if(!e.length)return!1;let a=t.x,r=t.y,n=Number.POSITIVE_INFINITY,c,i,s;for(c=0,i=e.length;c<i;++c){const l=e[c].element;if(l&&l.hasValue()){const f=l.getCenterPoint(),u=s7(t,f);u<n&&(n=u,s=l)}}if(s){const l=s.tooltipPosition();a=l.x,r=l.y}return{x:a,y:r}}};function w4(e,t){return t&&(R2(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function at(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
835
835
  `)>-1?e.split(`
836
- `):e}function wY(e,t){const{element:a,datasetIndex:r,index:n}=t,c=e.getDatasetMeta(r).controller,{label:i,value:s}=c.getLabelAndValue(n);return{chart:e,label:i,parsed:c.getParsed(n),raw:e.data.datasets[r].data[n],formattedValue:s,dataset:c.getDataset(),dataIndex:n,datasetIndex:r,element:a}}function Kd(e,t){const a=e.chart.ctx,{body:r,footer:n,title:c}=e,{boxWidth:i,boxHeight:s}=t,l=Ve(t.bodyFont),f=Ve(t.titleFont),u=Ve(t.footerFont),d=c.length,h=n.length,m=r.length,v=t3(t.padding);let p=v.height,g=0,y=r.reduce((b,M)=>b+M.before.length+M.lines.length+M.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(p+=d*f.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const b=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=m*b+(y-m)*l.lineHeight+(y-1)*t.bodySpacing}h&&(p+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let x=0;const C=function(b){g=Math.max(g,a.measureText(b).width+x)};return a.save(),a.font=f.string,V2(e.title,C),a.font=l.string,V2(e.beforeBody.concat(e.afterBody),C),x=t.displayColors?i+2+t.boxPadding:0,V2(r,b=>{V2(b.before,C),V2(b.lines,C),V2(b.after,C)}),x=0,a.font=u.string,V2(e.footer,C),a.restore(),g+=v.width,{width:g,height:p}}function _Y(e,t){const{y:a,height:r}=t;return a<r/2?"top":a>e.height-r/2?"bottom":"center"}function kY(e,t,a,r){const{x:n,width:c}=r,i=a.caretSize+a.caretPadding;if(e==="left"&&n+c+i>t.width||e==="right"&&n-c-i<0)return!0}function HY(e,t,a,r){const{x:n,width:c}=a,{width:i,chartArea:{left:s,right:l}}=e;let f="center";return r==="center"?f=n<=(s+l)/2?"left":"right":n<=c/2?f="left":n>=i-c/2&&(f="right"),kY(f,e,t,a)&&(f="center"),f}function Zd(e,t,a){const r=a.yAlign||t.yAlign||_Y(e,a);return{xAlign:a.xAlign||t.xAlign||HY(e,t,a,r),yAlign:r}}function VY(e,t){let{x:a,width:r}=e;return t==="right"?a-=r:t==="center"&&(a-=r/2),a}function LY(e,t,a){let{y:r,height:n}=e;return t==="top"?r+=a:t==="bottom"?r-=n+a:r-=n/2,r}function Qd(e,t,a,r){const{caretSize:n,caretPadding:c,cornerRadius:i}=e,{xAlign:s,yAlign:l}=a,f=n+c,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:m}=j0(i);let v=VY(t,s);const p=LY(t,l,f);return l==="center"?s==="left"?v+=f:s==="right"&&(v-=f):s==="left"?v-=Math.max(u,h)+n:s==="right"&&(v+=Math.max(d,m)+n),{x:Ne(v,0,r.width-t.width),y:Ne(p,0,r.height-t.height)}}function C8(e,t,a){const r=t3(a.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Jd(e){return w4([],at(e))}function SY(e,t,a){return v0(e,{tooltip:t,tooltipItems:a,type:"tooltip"})}function eh(e,t){const a=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return a?e.override(a):e}const Zy={beforeTitle:et,title(e){if(e.length>0){const t=e[0],a=t.chart.data.labels,r=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return a[t.dataIndex]}return""},afterTitle:et,beforeBody:et,beforeLabel:et,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const a=e.formattedValue;return x2(a)||(t+=a),t},labelColor(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:et,afterBody:et,beforeFooter:et,footer:et,afterFooter:et};function h3(e,t,a,r){const n=e[t].call(a,r);return typeof n>"u"?Zy[t].call(a,r):n}class v7 extends g4{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const a=this.chart,r=this.options.setContext(this.getContext()),n=r.enabled&&a.options.animation&&r.animations,c=new Sy(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(c)),c}getContext(){return this.$context||(this.$context=SY(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,a){const{callbacks:r}=a,n=h3(r,"beforeTitle",this,t),c=h3(r,"title",this,t),i=h3(r,"afterTitle",this,t);let s=[];return s=w4(s,at(n)),s=w4(s,at(c)),s=w4(s,at(i)),s}getBeforeBody(t,a){return Jd(h3(a.callbacks,"beforeBody",this,t))}getBody(t,a){const{callbacks:r}=a,n=[];return V2(t,c=>{const i={before:[],lines:[],after:[]},s=eh(r,c);w4(i.before,at(h3(s,"beforeLabel",this,c))),w4(i.lines,h3(s,"label",this,c)),w4(i.after,at(h3(s,"afterLabel",this,c))),n.push(i)}),n}getAfterBody(t,a){return Jd(h3(a.callbacks,"afterBody",this,t))}getFooter(t,a){const{callbacks:r}=a,n=h3(r,"beforeFooter",this,t),c=h3(r,"footer",this,t),i=h3(r,"afterFooter",this,t);let s=[];return s=w4(s,at(n)),s=w4(s,at(c)),s=w4(s,at(i)),s}_createItems(t){const a=this._active,r=this.chart.data,n=[],c=[],i=[];let s=[],l,f;for(l=0,f=a.length;l<f;++l)s.push(wY(this.chart,a[l]));return t.filter&&(s=s.filter((u,d,h)=>t.filter(u,d,h,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),V2(s,u=>{const d=eh(t.callbacks,u);n.push(h3(d,"labelColor",this,u)),c.push(h3(d,"labelPointStyle",this,u)),i.push(h3(d,"labelTextColor",this,u))}),this.labelColors=n,this.labelPointStyles=c,this.labelTextColors=i,this.dataPoints=s,s}update(t,a){const r=this.options.setContext(this.getContext()),n=this._active;let c,i=[];if(!n.length)this.opacity!==0&&(c={opacity:0});else{const s=Ka[r.position].call(this,n,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const l=this._size=Kd(this,r),f=Object.assign({},s,l),u=Zd(this.chart,r,f),d=Qd(r,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,c={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=i,this.$context=void 0,c&&this._resolveAnimations().update(this,c),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(t,a,r,n){const c=this.getCaretPosition(t,r,n);a.lineTo(c.x1,c.y1),a.lineTo(c.x2,c.y2),a.lineTo(c.x3,c.y3)}getCaretPosition(t,a,r){const{xAlign:n,yAlign:c}=this,{caretSize:i,cornerRadius:s}=r,{topLeft:l,topRight:f,bottomLeft:u,bottomRight:d}=j0(s),{x:h,y:m}=t,{width:v,height:p}=a;let g,y,x,C,b,M;return c==="center"?(b=m+p/2,n==="left"?(g=h,y=g-i,C=b+i,M=b-i):(g=h+v,y=g+i,C=b-i,M=b+i),x=g):(n==="left"?y=h+Math.max(l,u)+i:n==="right"?y=h+v-Math.max(f,d)-i:y=this.caretX,c==="top"?(C=m,b=C-i,g=y-i,x=y+i):(C=m+p,b=C+i,g=y+i,x=y-i),M=C),{x1:g,x2:y,x3:x,y1:C,y2:b,y3:M}}drawTitle(t,a,r){const n=this.title,c=n.length;let i,s,l;if(c){const f=q6(r.rtl,this.x,this.width);for(t.x=C8(this,r.titleAlign,r),a.textAlign=f.textAlign(r.titleAlign),a.textBaseline="middle",i=Ve(r.titleFont),s=r.titleSpacing,a.fillStyle=r.titleColor,a.font=i.string,l=0;l<c;++l)a.fillText(n[l],f.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+s,l+1===c&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,a,r,n,c){const i=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:f}=c,u=Ve(c.bodyFont),d=C8(this,"left",c),h=n.x(d),m=l<u.lineHeight?(u.lineHeight-l)/2:0,v=a.y+m;if(c.usePointStyle){const p={radius:Math.min(f,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=n.leftForLtr(h,f)+f/2,y=v+l/2;t.strokeStyle=c.multiKeyBackground,t.fillStyle=c.multiKeyBackground,l7(t,p,g,y),t.strokeStyle=i.borderColor,t.fillStyle=i.backgroundColor,l7(t,p,g,y)}else{t.lineWidth=u2(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,t.strokeStyle=i.borderColor,t.setLineDash(i.borderDash||[]),t.lineDashOffset=i.borderDashOffset||0;const p=n.leftForLtr(h,f),g=n.leftForLtr(n.xPlus(h,1),f-2),y=j0(i.borderRadius);Object.values(y).some(x=>x!==0)?(t.beginPath(),t.fillStyle=c.multiKeyBackground,Yr(t,{x:p,y:v,w:f,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=i.backgroundColor,t.beginPath(),Yr(t,{x:g,y:v+1,w:f-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=c.multiKeyBackground,t.fillRect(p,v,f,l),t.strokeRect(p,v,f,l),t.fillStyle=i.backgroundColor,t.fillRect(g,v+1,f-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,a,r){const{body:n}=this,{bodySpacing:c,bodyAlign:i,displayColors:s,boxHeight:l,boxWidth:f,boxPadding:u}=r,d=Ve(r.bodyFont);let h=d.lineHeight,m=0;const v=q6(r.rtl,this.x,this.width),p=function(H){a.fillText(H,v.x(t.x+m),t.y+h/2),t.y+=h+c},g=v.textAlign(i);let y,x,C,b,M,w,z;for(a.textAlign=i,a.textBaseline="middle",a.font=d.string,t.x=C8(this,g,r),a.fillStyle=r.bodyColor,V2(this.beforeBody,p),m=s&&g!=="right"?i==="center"?f/2+u:f+2+u:0,b=0,w=n.length;b<w;++b){for(y=n[b],x=this.labelTextColors[b],a.fillStyle=x,V2(y.before,p),C=y.lines,s&&C.length&&(this._drawColorBox(a,t,b,v,r),h=Math.max(d.lineHeight,l)),M=0,z=C.length;M<z;++M)p(C[M]),h=d.lineHeight;V2(y.after,p)}m=0,h=d.lineHeight,V2(this.afterBody,p),t.y-=c}drawFooter(t,a,r){const n=this.footer,c=n.length;let i,s;if(c){const l=q6(r.rtl,this.x,this.width);for(t.x=C8(this,r.footerAlign,r),t.y+=r.footerMarginTop,a.textAlign=l.textAlign(r.footerAlign),a.textBaseline="middle",i=Ve(r.footerFont),a.fillStyle=r.footerColor,a.font=i.string,s=0;s<c;++s)a.fillText(n[s],l.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+r.footerSpacing}}drawBackground(t,a,r,n){const{xAlign:c,yAlign:i}=this,{x:s,y:l}=t,{width:f,height:u}=r,{topLeft:d,topRight:h,bottomLeft:m,bottomRight:v}=j0(n.cornerRadius);a.fillStyle=n.backgroundColor,a.strokeStyle=n.borderColor,a.lineWidth=n.borderWidth,a.beginPath(),a.moveTo(s+d,l),i==="top"&&this.drawCaret(t,a,r,n),a.lineTo(s+f-h,l),a.quadraticCurveTo(s+f,l,s+f,l+h),i==="center"&&c==="right"&&this.drawCaret(t,a,r,n),a.lineTo(s+f,l+u-v),a.quadraticCurveTo(s+f,l+u,s+f-v,l+u),i==="bottom"&&this.drawCaret(t,a,r,n),a.lineTo(s+m,l+u),a.quadraticCurveTo(s,l+u,s,l+u-m),i==="center"&&c==="left"&&this.drawCaret(t,a,r,n),a.lineTo(s,l+d),a.quadraticCurveTo(s,l,s+d,l),a.closePath(),a.fill(),n.borderWidth>0&&a.stroke()}_updateAnimationTarget(t){const a=this.chart,r=this.$animations,n=r&&r.x,c=r&&r.y;if(n||c){const i=Ka[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=Kd(this,t),l=Object.assign({},i,this._size),f=Zd(a,t,l),u=Qd(t,l,f,a);(n._to!==u.x||c._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(t){const a=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(a);const n={width:this.width,height:this.height},c={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=t3(a.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(c,t,n,a),_y(t,a.textDirection),c.y+=i.top,this.drawTitle(c,t,a),this.drawBody(c,t,a),this.drawFooter(c,t,a),ky(t,a.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,a){const r=this._active,n=t.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}}),c=!Hc(r,n),i=this._positionChanged(n,a);(c||i)&&(this._active=n,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,a,r=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,c=this._active||[],i=this._getActiveElements(t,c,a,r),s=this._positionChanged(i,t),l=a||!Hc(i,c)||s;return l&&(this._active=i,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,a))),l}_getActiveElements(t,a,r,n){const c=this.options;if(t.type==="mouseout")return[];if(!n)return a.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const i=this.chart.getElementsAtEventForMode(t,c.mode,c,r);return c.reverse&&i.reverse(),i}_positionChanged(t,a){const{caretX:r,caretY:n,options:c}=this,i=Ka[c.position].call(this,t,a);return i!==!1&&(r!==i.x||n!==i.y)}}v1(v7,"positioners",Ka);var AY={id:"tooltip",_element:v7,positioners:Ka,afterInit(e,t,a){a&&(e.tooltip=new v7({chart:e,options:a}))},beforeUpdate(e,t,a){e.tooltip&&e.tooltip.initialize(a)},reset(e,t,a){e.tooltip&&e.tooltip.initialize(a)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const a={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",a)}},afterEvent(e,t){if(e.tooltip){const a=t.replay;e.tooltip.handleEvent(t.event,a,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Zy},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"]},TY=Object.freeze({__proto__:null,Colors:Wj,Decimation:Gj,Filler:mY,Legend:bY,SubTitle:zY,Title:MY,Tooltip:AY});const EY=(e,t,a,r)=>(typeof t=="string"?(a=e.push(t)-1,r.unshift({index:a,label:t})):isNaN(t)&&(a=null),a);function NY(e,t,a,r){const n=e.indexOf(t);if(n===-1)return EY(e,t,a,r);const c=e.lastIndexOf(t);return n!==c?a:n}const DY=(e,t)=>e===null?null:Ne(Math.round(e),0,t);function th(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class g7 extends h6{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const a=this._addedLabels;if(a.length){const r=this.getLabels();for(const{index:n,label:c}of a)r[n]===c&&r.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,a){if(x2(t))return null;const r=this.getLabels();return a=isFinite(a)&&r[a]===t?a:NY(r,t,a2(a,t),this._addedLabels),DY(a,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:r,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),a||(n=this.getLabels().length-1)),this.min=r,this.max=n}buildTicks(){const t=this.min,a=this.max,r=this.options.offset,n=[];let c=this.getLabels();c=t===0&&a===c.length-1?c:c.slice(t,a+1),this._valueRange=Math.max(c.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=t;i<=a;i++)n.push({value:i});return n}getLabelForValue(t){return th.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}v1(g7,"id","category"),v1(g7,"defaults",{ticks:{callback:th}});function OY(e,t){const a=[],{bounds:n,step:c,min:i,max:s,precision:l,count:f,maxTicks:u,maxDigits:d,includeBounds:h}=e,m=c||1,v=u-1,{min:p,max:g}=t,y=!x2(i),x=!x2(s),C=!x2(f),b=(g-p)/(d+1);let M=Ku((g-p)/v/m)*m,w,z,H,A;if(M<1e-14&&!y&&!x)return[{value:p},{value:g}];A=Math.ceil(g/M)-Math.floor(p/M),A>v&&(M=Ku(A*M/v/m)*m),x2(l)||(w=Math.pow(10,l),M=Math.ceil(M*w)/w),n==="ticks"?(z=Math.floor(p/M)*M,H=Math.ceil(g/M)*M):(z=p,H=g),y&&x&&c&&LU((s-i)/c,M/1e3)?(A=Math.round(Math.min((s-i)/M,u)),M=(s-i)/A,z=i,H=s):C?(z=y?i:z,H=x?s:H,A=f-1,M=(H-z)/A):(A=(H-z)/M,dr(A,Math.round(A),M/1e3)?A=Math.round(A):A=Math.ceil(A));const V=Math.max(Zu(M),Zu(z));w=Math.pow(10,x2(l)?V:l),z=Math.round(z*w)/w,H=Math.round(H*w)/w;let k=0;for(y&&(h&&z!==i?(a.push({value:i}),z<i&&k++,dr(Math.round((z+k*M)*w)/w,i,ah(i,b,e))&&k++):z<i&&k++);k<A;++k){const _=Math.round((z+k*M)*w)/w;if(x&&_>s)break;a.push({value:_})}return x&&h&&H!==s?a.length&&dr(a[a.length-1].value,s,ah(s,b,e))?a[a.length-1].value=s:a.push({value:s}):(!x||H===s)&&a.push({value:H}),a}function ah(e,t,{horizontal:a,minRotation:r}){const n=n4(r),c=(a?Math.sin(n):Math.cos(n))||.001,i=.75*t*(""+e).length;return Math.min(t/c,i)}class Nc extends h6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,a){return x2(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:a,maxDefined:r}=this.getUserBounds();let{min:n,max:c}=this;const i=l=>n=a?n:l,s=l=>c=r?c:l;if(t){const l=P4(n),f=P4(c);l<0&&f<0?s(0):l>0&&f>0&&i(0)}if(n===c){let l=c===0?1:Math.abs(c*.05);s(c+l),t||i(n-l)}this.min=n,this.max=c}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:a,stepSize:r}=t,n;return r?(n=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,a=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const n={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},c=this._range||this,i=OY(n,c);return t.bounds==="ticks"&&oy(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let a=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const n=(r-a)/Math.max(t.length-1,1)/2;a-=n,r+=n}this._startValue=a,this._endValue=r,this._valueRange=r-a}getLabelForValue(t){return kn(t,this.chart.options.locale,this.options.ticks.format)}}class y7 extends Nc{determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=se(t)?t:0,this.max=se(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),a=t?this.width:this.height,r=n4(this.options.ticks.minRotation),n=(t?Math.sin(r):Math.cos(r))||.001,c=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,c.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}v1(y7,"id","linear"),v1(y7,"defaults",{ticks:{callback:k5.formatters.numeric}});const Xr=e=>Math.floor(jt(e)),L0=(e,t)=>Math.pow(10,Xr(e)+t);function rh(e){return e/Math.pow(10,Xr(e))===1}function nh(e,t,a){const r=Math.pow(10,a),n=Math.floor(e/r);return Math.ceil(t/r)-n}function PY(e,t){const a=t-e;let r=Xr(a);for(;nh(e,t,r)>10;)r++;for(;nh(e,t,r)<10;)r--;return Math.min(r,Xr(e))}function BY(e,{min:t,max:a}){t=x3(e.min,t);const r=[],n=Xr(t);let c=PY(t,a),i=c<0?Math.pow(10,Math.abs(c)):1;const s=Math.pow(10,c),l=n>c?Math.pow(10,n):0,f=Math.round((t-l)*i)/i,u=Math.floor((t-l)/s/10)*s*10;let d=Math.floor((f-u)/Math.pow(10,c)),h=x3(e.min,Math.round((l+u+d*Math.pow(10,c))*i)/i);for(;h<a;)r.push({value:h,major:rh(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(c++,d=2,i=c>=0?1:i),h=Math.round((l+u+d*Math.pow(10,c))*i)/i;const m=x3(e.max,h);return r.push({value:m,major:rh(m),significand:d}),r}class x7 extends h6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,a){const r=Nc.prototype.parse.apply(this,[t,a]);if(r===0){this._zero=!0;return}return se(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=se(t)?Math.max(0,t):null,this.max=se(a)?Math.max(0,a):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!se(this._userMin)&&(this.min=t===L0(this.min,0)?L0(this.min,-1):L0(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let r=this.min,n=this.max;const c=s=>r=t?r:s,i=s=>n=a?n:s;r===n&&(r<=0?(c(1),i(10)):(c(L0(r,-1)),i(L0(n,1)))),r<=0&&c(L0(n,-1)),n<=0&&i(L0(r,1)),this.min=r,this.max=n}buildTicks(){const t=this.options,a={min:this._userMin,max:this._userMax},r=BY(a,this);return t.bounds==="ticks"&&oy(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":kn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=jt(t),this._valueRange=jt(this.max)-jt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(jt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const a=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+a*this._valueRange)}}v1(x7,"id","logarithmic"),v1(x7,"defaults",{ticks:{callback:k5.formatters.logarithmic,major:{enabled:!0}}});function b7(e){const t=e.ticks;if(t.display&&e.display){const a=t3(t.backdropPadding);return a2(t.font&&t.font.size,K2.font.size)+a.height}return 0}function FY(e,t,a){return a=R2(a)?a:[a],{w:jU(e,t.string,a),h:a.length*t.lineHeight}}function ch(e,t,a,r,n){return e===r||e===n?{start:t-a/2,end:t+a/2}:e<r||e>n?{start:t-a,end:t}:{start:t,end:t+a}}function RY(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},a=Object.assign({},t),r=[],n=[],c=e._pointLabels.length,i=e.options.pointLabels,s=i.centerPointLabels?U2/c:0;for(let l=0;l<c;l++){const f=i.setContext(e.getPointLabelContext(l));n[l]=f.padding;const u=e.getPointPosition(l,e.drawingArea+n[l],s),d=Ve(f.font),h=FY(e.ctx,d,e._pointLabels[l]);r[l]=h;const m=b3(e.getIndexAngle(l)+s),v=Math.round(nl(m)),p=ch(v,u.x,h.w,0,180),g=ch(v,u.y,h.h,90,270);IY(a,t,m,p,g)}e.setCenterPoint(t.l-a.l,a.r-t.r,t.t-a.t,a.b-t.b),e._pointLabelItems=WY(e,r,n)}function IY(e,t,a,r,n){const c=Math.abs(Math.sin(a)),i=Math.abs(Math.cos(a));let s=0,l=0;r.start<t.l?(s=(t.l-r.start)/c,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/c,e.r=Math.max(e.r,t.r+s)),n.start<t.t?(l=(t.t-n.start)/i,e.t=Math.min(e.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/i,e.b=Math.max(e.b,t.b+l))}function $Y(e,t,a){const r=e.drawingArea,{extra:n,additionalAngle:c,padding:i,size:s}=a,l=e.getPointPosition(t,r+n+i,c),f=Math.round(nl(b3(l.angle+pe))),u=YY(l.y,s.h,f),d=qY(f),h=jY(l.x,s.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+s.w,bottom:u+s.h}}function UY(e,t){if(!t)return!0;const{left:a,top:r,right:n,bottom:c}=e;return!(ut({x:a,y:r},t)||ut({x:a,y:c},t)||ut({x:n,y:r},t)||ut({x:n,y:c},t))}function WY(e,t,a){const r=[],n=e._pointLabels.length,c=e.options,{centerPointLabels:i,display:s}=c.pointLabels,l={extra:b7(c)/2,additionalAngle:i?U2/n:0};let f;for(let u=0;u<n;u++){l.padding=a[u],l.size=t[u];const d=$Y(e,u,l);r.push(d),s==="auto"&&(d.visible=UY(d,f),d.visible&&(f=d))}return r}function qY(e){return e===0||e===180?"center":e<180?"left":"right"}function jY(e,t,a){return a==="right"?e-=t:a==="center"&&(e-=t/2),e}function YY(e,t,a){return a===90||a===270?e-=t/2:(a>270||a<90)&&(e-=t),e}function GY(e,t,a){const{left:r,top:n,right:c,bottom:i}=a,{backdropColor:s}=t;if(!x2(s)){const l=j0(t.borderRadius),f=t3(t.backdropPadding);e.fillStyle=s;const u=r-f.left,d=n-f.top,h=c-r+f.width,m=i-n+f.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),Yr(e,{x:u,y:d,w:h,h:m,radius:l}),e.fill()):e.fillRect(u,d,h,m)}}function XY(e,t){const{ctx:a,options:{pointLabels:r}}=e;for(let n=t-1;n>=0;n--){const c=e._pointLabelItems[n];if(!c.visible)continue;const i=r.setContext(e.getPointLabelContext(n));GY(a,i,c);const s=Ve(i.font),{x:l,y:f,textAlign:u}=c;r6(a,e._pointLabels[n],l,f+s.lineHeight/2,s,{color:i.color,textAlign:u,textBaseline:"middle"})}}function Qy(e,t,a,r){const{ctx:n}=e;if(a)n.arc(e.xCenter,e.yCenter,t,0,$2);else{let c=e.getPointPosition(0,t);n.moveTo(c.x,c.y);for(let i=1;i<r;i++)c=e.getPointPosition(i,t),n.lineTo(c.x,c.y)}}function KY(e,t,a,r,n){const c=e.ctx,i=t.circular,{color:s,lineWidth:l}=t;!i&&!r||!s||!l||a<0||(c.save(),c.strokeStyle=s,c.lineWidth=l,c.setLineDash(n.dash||[]),c.lineDashOffset=n.dashOffset,c.beginPath(),Qy(e,a,i,r),c.closePath(),c.stroke(),c.restore())}function ZY(e,t,a){return v0(e,{label:a,index:t,type:"pointLabel"})}class Za extends Nc{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=t3(b7(this.options)/2),a=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+a/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(a,r)/2)}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!1);this.min=se(t)&&!isNaN(t)?t:0,this.max=se(a)&&!isNaN(a)?a:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/b7(this.options))}generateTickLabels(t){Nc.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((a,r)=>{const n=E2(this.options.pointLabels.callback,[a,r],this);return n||n===0?n:""}).filter((a,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?RY(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,a,r,n){this.xCenter+=Math.floor((t-a)/2),this.yCenter+=Math.floor((r-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,a,r,n))}getIndexAngle(t){const a=$2/(this._pointLabels.length||1),r=this.options.startAngle||0;return b3(t*a+n4(r))}getDistanceFromCenterForValue(t){if(x2(t))return NaN;const a=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*a:(t-this.min)*a}getValueForDistanceFromCenter(t){if(x2(t))return NaN;const a=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-a:this.min+a}getPointLabelContext(t){const a=this._pointLabels||[];if(t>=0&&t<a.length){const r=a[t];return ZY(this.getContext(),t,r)}}getPointPosition(t,a,r=0){const n=this.getIndexAngle(t)-pe+r;return{x:Math.cos(n)*a+this.xCenter,y:Math.sin(n)*a+this.yCenter,angle:n}}getPointPositionForValue(t,a){return this.getPointPosition(t,this.getDistanceFromCenterForValue(a))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:a,top:r,right:n,bottom:c}=this._pointLabelItems[t];return{left:a,top:r,right:n,bottom:c}}drawBackground(){const{backgroundColor:t,grid:{circular:a}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),Qy(this,this.getDistanceFromCenterForValue(this._endValue),a,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,a=this.options,{angleLines:r,grid:n,border:c}=a,i=this._pointLabels.length;let s,l,f;if(a.pointLabels.display&&XY(this,i),n.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),m=n.setContext(h),v=c.setContext(h);KY(this,m,l,i,v)}}),r.display){for(t.save(),s=i-1;s>=0;s--){const u=r.setContext(this.getPointLabelContext(s)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),f=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;const n=this.getIndexAngle(0);let c,i;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!a.reverse)return;const f=r.setContext(this.getContext(l)),u=Ve(f.font);if(c=this.getDistanceFromCenterForValue(this.ticks[l].value),f.showLabelBackdrop){t.font=u.string,i=t.measureText(s.label).width,t.fillStyle=f.backdropColor;const d=t3(f.backdropPadding);t.fillRect(-i/2-d.left,-c-u.size/2-d.top,i+d.width,u.size+d.height)}r6(t,s.label,0,-c,u,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}v1(Za,"id","radialLinear"),v1(Za,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:k5.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),v1(Za,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),v1(Za,"descriptors",{angleLines:{_fallback:"grid"}});const S5={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}},g3=Object.keys(S5);function ih(e,t){return e-t}function sh(e,t){if(x2(t))return null;const a=e._adapter,{parser:r,round:n,isoWeekday:c}=e._parseOpts;let i=t;return typeof r=="function"&&(i=r(i)),se(i)||(i=typeof r=="string"?a.parse(i,r):a.parse(i)),i===null?null:(n&&(i=n==="week"&&(Z6(c)||c===!0)?a.startOf(i,"isoWeek",c):a.startOf(i,n)),+i)}function oh(e,t,a,r){const n=g3.length;for(let c=g3.indexOf(e);c<n-1;++c){const i=S5[g3[c]],s=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((a-t)/(s*i.size))<=r)return g3[c]}return g3[n-1]}function QY(e,t,a,r,n){for(let c=g3.length-1;c>=g3.indexOf(a);c--){const i=g3[c];if(S5[i].common&&e._adapter.diff(n,r,i)>=t-1)return i}return g3[a?g3.indexOf(a):0]}function JY(e){for(let t=g3.indexOf(e)+1,a=g3.length;t<a;++t)if(S5[g3[t]].common)return g3[t]}function lh(e,t,a){if(!a)e[t]=!0;else if(a.length){const{lo:r,hi:n}=cl(a,t),c=a[r]>=t?a[r]:a[n];e[c]=!0}}function eG(e,t,a,r){const n=e._adapter,c=+n.startOf(t[0].value,r),i=t[t.length-1].value;let s,l;for(s=c;s<=i;s=+n.add(s,1,r))l=a[s],l>=0&&(t[l].major=!0);return t}function fh(e,t,a){const r=[],n={},c=t.length;let i,s;for(i=0;i<c;++i)s=t[i],n[s]=i,r.push({value:s,major:!1});return c===0||!a?r:eG(e,r,n,a)}class Kr extends h6{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,a={}){const r=t.time||(t.time={}),n=this._adapter=new oq._date(t.adapters.date);n.init(a),ur(r.displayFormats,n.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=a.normalized}parse(t,a){return t===void 0?null:sh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,a=this._adapter,r=t.time.unit||"day";let{min:n,max:c,minDefined:i,maxDefined:s}=this.getUserBounds();function l(f){!i&&!isNaN(f.min)&&(n=Math.min(n,f.min)),!s&&!isNaN(f.max)&&(c=Math.max(c,f.max))}(!i||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=se(n)&&!isNaN(n)?n:+a.startOf(Date.now(),r),c=se(c)&&!isNaN(c)?c:+a.endOf(Date.now(),r)+1,this.min=Math.min(n,c-1),this.max=Math.max(n+1,c)}_getLabelBounds(){const t=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(a=t[0],r=t[t.length-1]),{min:a,max:r}}buildTicks(){const t=this.options,a=t.time,r=t.ticks,n=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const c=this.min,i=this.max,s=EU(n,c,i);return this._unit=a.unit||(r.autoSkip?oh(a.minUnit,this.min,this.max,this._getLabelCapacity(c)):QY(this,s.length,a.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:JY(this._unit),this.initOffsets(n),t.reverse&&s.reverse(),fh(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let a=0,r=0,n,c;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?a=1-n:a=(this.getDecimalForValue(t[1])-n)/2,c=this.getDecimalForValue(t[t.length-1]),t.length===1?r=c:r=(c-this.getDecimalForValue(t[t.length-2]))/2);const i=t.length<3?.5:.25;a=Ne(a,0,i),r=Ne(r,0,i),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){const t=this._adapter,a=this.min,r=this.max,n=this.options,c=n.time,i=c.unit||oh(c.minUnit,a,r,this._getLabelCapacity(a)),s=a2(n.ticks.stepSize,1),l=i==="week"?c.isoWeekday:!1,f=Z6(l)||l===!0,u={};let d=a,h,m;if(f&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,f?"day":i),t.diff(r,a,i)>1e5*s)throw new Error(a+" and "+r+" are too far apart with stepSize of "+s+" "+i);const v=n.ticks.source==="data"&&this.getDataTimestamps();for(h=d,m=0;h<r;h=+t.add(h,s,i),m++)lh(u,h,v);return(h===r||n.bounds==="ticks"||m===1)&&lh(u,h,v),Object.keys(u).sort(ih).map(p=>+p)}getLabelForValue(t){const a=this._adapter,r=this.options.time;return r.tooltipFormat?a.format(t,r.tooltipFormat):a.format(t,r.displayFormats.datetime)}format(t,a){const n=this.options.time.displayFormats,c=this._unit,i=a||n[c];return this._adapter.format(t,i)}_tickFormatFunction(t,a,r,n){const c=this.options,i=c.ticks.callback;if(i)return E2(i,[t,a,r],this);const s=c.time.displayFormats,l=this._unit,f=this._majorUnit,u=l&&s[l],d=f&&s[f],h=r[a],m=f&&d&&h&&h.major;return this._adapter.format(t,n||(m?d:u))}generateTickLabels(t){let a,r,n;for(a=0,r=t.length;a<r;++a)n=t[a],n.label=this._tickFormatFunction(n.value,a,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const a=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((a.start+r)*a.factor)}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const a=this.options.ticks,r=this.ctx.measureText(t).width,n=n4(this.isHorizontal()?a.maxRotation:a.minRotation),c=Math.cos(n),i=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:r*c+s*i,h:r*i+s*c}}_getLabelCapacity(t){const a=this.options.time,r=a.displayFormats,n=r[a.unit]||r.millisecond,c=this._tickFormatFunction(t,0,fh(this,[t],this._majorUnit),n),i=this._getLabelSize(c),s=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],a,r;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(a=0,r=n.length;a<r;++a)t=t.concat(n[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let a,r;if(t.length)return t;const n=this.getLabels();for(a=0,r=n.length;a<r;++a)t.push(sh(this,n[a]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return uy(t.sort(ih))}}v1(Kr,"id","time"),v1(Kr,"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 M8(e,t,a){let r=0,n=e.length-1,c,i,s,l;a?(t>=e[r].pos&&t<=e[n].pos&&({lo:r,hi:n}=ft(e,"pos",t)),{pos:c,time:s}=e[r],{pos:i,time:l}=e[n]):(t>=e[r].time&&t<=e[n].time&&({lo:r,hi:n}=ft(e,"time",t)),{time:c,pos:s}=e[r],{time:i,pos:l}=e[n]);const f=i-c;return f?s+(l-s)*(t-c)/f:s}class C7 extends Kr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(t);this._minPos=M8(a,this.min),this._tableRange=M8(a,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:a,max:r}=this,n=[],c=[];let i,s,l,f,u;for(i=0,s=t.length;i<s;++i)f=t[i],f>=a&&f<=r&&n.push(f);if(n.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(i=0,s=n.length;i<s;++i)u=n[i+1],l=n[i-1],f=n[i],Math.round((u+l)/2)!==f&&c.push({time:f,pos:i/(s-1)});return c}_generate(){const t=this.min,a=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(a)||r.length===1)&&r.push(a),r.sort((n,c)=>n-c)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const a=this.getDataTimestamps(),r=this.getLabelTimestamps();return a.length&&r.length?t=this.normalize(a.concat(r)):t=a.length?a:r,t=this._cache.all=t,t}getDecimalForValue(t){return(M8(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return M8(this._table,r*this._tableRange+this._minPos,!0)}}v1(C7,"id","timeseries"),v1(C7,"defaults",Kr.defaults);var tG=Object.freeze({__proto__:null,CategoryScale:g7,LinearScale:y7,LogarithmicScale:x7,RadialLinearScale:Za,TimeScale:Kr,TimeSeriesScale:C7});const Jy=[sq,Pj,TY,tG];var aG=typeof global=="object"&&global&&global.Object===Object&&global;const ex=aG;var rG=typeof self=="object"&&self&&self.Object===Object&&self,nG=ex||rG||Function("return this")();const j4=nG;var cG=j4.Symbol;const d0=cG;var tx=Object.prototype,iG=tx.hasOwnProperty,sG=tx.toString,Pa=d0?d0.toStringTag:void 0;function oG(e){var t=iG.call(e,Pa),a=e[Pa];try{e[Pa]=void 0;var r=!0}catch{}var n=sG.call(e);return r&&(t?e[Pa]=a:delete e[Pa]),n}var lG=Object.prototype,fG=lG.toString;function uG(e){return fG.call(e)}var dG="[object Null]",hG="[object Undefined]",uh=d0?d0.toStringTag:void 0;function Vn(e){return e==null?e===void 0?hG:dG:uh&&uh in Object(e)?oG(e):uG(e)}function n6(e){return e!=null&&typeof e=="object"}var mG=Array.isArray;const ea=mG;function Ln(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pG="[object AsyncFunction]",vG="[object Function]",gG="[object GeneratorFunction]",yG="[object Proxy]";function ax(e){if(!Ln(e))return!1;var t=Vn(e);return t==vG||t==gG||t==pG||t==yG}var xG=j4["__core-js_shared__"];const Ki=xG;var dh=function(){var e=/[^.]+$/.exec(Ki&&Ki.keys&&Ki.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bG(e){return!!dh&&dh in e}var CG=Function.prototype,MG=CG.toString;function m6(e){if(e!=null){try{return MG.call(e)}catch{}try{return e+""}catch{}}return""}var zG=/[\\^$.*+?()[\]{}|]/g,wG=/^\[object .+?Constructor\]$/,_G=Function.prototype,kG=Object.prototype,HG=_G.toString,VG=kG.hasOwnProperty,LG=RegExp("^"+HG.call(VG).replace(zG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function SG(e){if(!Ln(e)||bG(e))return!1;var t=ax(e)?LG:wG;return t.test(m6(e))}function AG(e,t){return e==null?void 0:e[t]}function p6(e,t){var a=AG(e,t);return SG(a)?a:void 0}var TG=p6(j4,"WeakMap");const M7=TG;var hh=Object.create,EG=function(){function e(){}return function(t){if(!Ln(t))return{};if(hh)return hh(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();const NG=EG;function DG(e,t){var a=-1,r=e.length;for(t||(t=Array(r));++a<r;)t[a]=e[a];return t}var OG=function(){try{var e=p6(Object,"defineProperty");return e({},"",{}),e}catch{}}();const mh=OG;function PG(e,t){for(var a=-1,r=e==null?0:e.length;++a<r&&t(e[a],a,e)!==!1;);return e}var BG=9007199254740991,FG=/^(?:0|[1-9]\d*)$/;function RG(e,t){var a=typeof e;return t=t??BG,!!t&&(a=="number"||a!="symbol"&&FG.test(e))&&e>-1&&e%1==0&&e<t}function rx(e,t,a){t=="__proto__"&&mh?mh(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function gl(e,t){return e===t||e!==e&&t!==t}var IG=Object.prototype,$G=IG.hasOwnProperty;function nx(e,t,a){var r=e[t];(!($G.call(e,t)&&gl(r,a))||a===void 0&&!(t in e))&&rx(e,t,a)}function A5(e,t,a,r){var n=!a;a||(a={});for(var c=-1,i=t.length;++c<i;){var s=t[c],l=r?r(a[s],e[s],s,a,e):void 0;l===void 0&&(l=e[s]),n?rx(a,s,l):nx(a,s,l)}return a}var UG=9007199254740991;function cx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=UG}function yl(e){return e!=null&&cx(e.length)&&!ax(e)}var WG=Object.prototype;function T5(e){var t=e&&e.constructor,a=typeof t=="function"&&t.prototype||WG;return e===a}function qG(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}var jG="[object Arguments]";function ph(e){return n6(e)&&Vn(e)==jG}var ix=Object.prototype,YG=ix.hasOwnProperty,GG=ix.propertyIsEnumerable,XG=ph(function(){return arguments}())?ph:function(e){return n6(e)&&YG.call(e,"callee")&&!GG.call(e,"callee")};const sx=XG;function KG(){return!1}var ox=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vh=ox&&typeof module=="object"&&module&&!module.nodeType&&module,ZG=vh&&vh.exports===ox,gh=ZG?j4.Buffer:void 0,QG=gh?gh.isBuffer:void 0,JG=QG||KG;const Zr=JG;var eX="[object Arguments]",tX="[object Array]",aX="[object Boolean]",rX="[object Date]",nX="[object Error]",cX="[object Function]",iX="[object Map]",sX="[object Number]",oX="[object Object]",lX="[object RegExp]",fX="[object Set]",uX="[object String]",dX="[object WeakMap]",hX="[object ArrayBuffer]",mX="[object DataView]",pX="[object Float32Array]",vX="[object Float64Array]",gX="[object Int8Array]",yX="[object Int16Array]",xX="[object Int32Array]",bX="[object Uint8Array]",CX="[object Uint8ClampedArray]",MX="[object Uint16Array]",zX="[object Uint32Array]",B2={};B2[pX]=B2[vX]=B2[gX]=B2[yX]=B2[xX]=B2[bX]=B2[CX]=B2[MX]=B2[zX]=!0;B2[eX]=B2[tX]=B2[hX]=B2[aX]=B2[mX]=B2[rX]=B2[nX]=B2[cX]=B2[iX]=B2[sX]=B2[oX]=B2[lX]=B2[fX]=B2[uX]=B2[dX]=!1;function wX(e){return n6(e)&&cx(e.length)&&!!B2[Vn(e)]}function xl(e){return function(t){return e(t)}}var lx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vr=lx&&typeof module=="object"&&module&&!module.nodeType&&module,_X=vr&&vr.exports===lx,Zi=_X&&ex.process,kX=function(){try{var e=vr&&vr.require&&vr.require("util").types;return e||Zi&&Zi.binding&&Zi.binding("util")}catch{}}();const ta=kX;var yh=ta&&ta.isTypedArray,HX=yh?xl(yh):wX;const bl=HX;var VX=Object.prototype,LX=VX.hasOwnProperty;function fx(e,t){var a=ea(e),r=!a&&sx(e),n=!a&&!r&&Zr(e),c=!a&&!r&&!n&&bl(e),i=a||r||n||c,s=i?qG(e.length,String):[],l=s.length;for(var f in e)(t||LX.call(e,f))&&!(i&&(f=="length"||n&&(f=="offset"||f=="parent")||c&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||RG(f,l)))&&s.push(f);return s}function ux(e,t){return function(a){return e(t(a))}}var SX=ux(Object.keys,Object);const AX=SX;var TX=Object.prototype,EX=TX.hasOwnProperty;function dx(e){if(!T5(e))return AX(e);var t=[];for(var a in Object(e))EX.call(e,a)&&a!="constructor"&&t.push(a);return t}function Cl(e){return yl(e)?fx(e):dx(e)}function NX(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}var DX=Object.prototype,OX=DX.hasOwnProperty;function PX(e){if(!Ln(e))return NX(e);var t=T5(e),a=[];for(var r in e)r=="constructor"&&(t||!OX.call(e,r))||a.push(r);return a}function Ml(e){return yl(e)?fx(e,!0):PX(e)}var BX=p6(Object,"create");const Qr=BX;function FX(){this.__data__=Qr?Qr(null):{},this.size=0}function RX(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var IX="__lodash_hash_undefined__",$X=Object.prototype,UX=$X.hasOwnProperty;function WX(e){var t=this.__data__;if(Qr){var a=t[e];return a===IX?void 0:a}return UX.call(t,e)?t[e]:void 0}var qX=Object.prototype,jX=qX.hasOwnProperty;function YX(e){var t=this.__data__;return Qr?t[e]!==void 0:jX.call(t,e)}var GX="__lodash_hash_undefined__";function XX(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=Qr&&t===void 0?GX:t,this}function c6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}c6.prototype.clear=FX;c6.prototype.delete=RX;c6.prototype.get=WX;c6.prototype.has=YX;c6.prototype.set=XX;function KX(){this.__data__=[],this.size=0}function E5(e,t){for(var a=e.length;a--;)if(gl(e[a][0],t))return a;return-1}var ZX=Array.prototype,QX=ZX.splice;function JX(e){var t=this.__data__,a=E5(t,e);if(a<0)return!1;var r=t.length-1;return a==r?t.pop():QX.call(t,a,1),--this.size,!0}function eK(e){var t=this.__data__,a=E5(t,e);return a<0?void 0:t[a][1]}function tK(e){return E5(this.__data__,e)>-1}function aK(e,t){var a=this.__data__,r=E5(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function St(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}St.prototype.clear=KX;St.prototype.delete=JX;St.prototype.get=eK;St.prototype.has=tK;St.prototype.set=aK;var rK=p6(j4,"Map");const Jr=rK;function nK(){this.size=0,this.__data__={hash:new c6,map:new(Jr||St),string:new c6}}function cK(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function N5(e,t){var a=e.__data__;return cK(t)?a[typeof t=="string"?"string":"hash"]:a.map}function iK(e){var t=N5(this,e).delete(e);return this.size-=t?1:0,t}function sK(e){return N5(this,e).get(e)}function oK(e){return N5(this,e).has(e)}function lK(e,t){var a=N5(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function v6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}v6.prototype.clear=nK;v6.prototype.delete=iK;v6.prototype.get=sK;v6.prototype.has=oK;v6.prototype.set=lK;function hx(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}var fK=ux(Object.getPrototypeOf,Object);const mx=fK;function uK(){this.__data__=new St,this.size=0}function dK(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}function hK(e){return this.__data__.get(e)}function mK(e){return this.__data__.has(e)}var pK=200;function vK(e,t){var a=this.__data__;if(a instanceof St){var r=a.__data__;if(!Jr||r.length<pK-1)return r.push([e,t]),this.size=++a.size,this;a=this.__data__=new v6(r)}return a.set(e,t),this.size=a.size,this}function gt(e){var t=this.__data__=new St(e);this.size=t.size}gt.prototype.clear=uK;gt.prototype.delete=dK;gt.prototype.get=hK;gt.prototype.has=mK;gt.prototype.set=vK;function gK(e,t){return e&&A5(t,Cl(t),e)}function yK(e,t){return e&&A5(t,Ml(t),e)}var px=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xh=px&&typeof module=="object"&&module&&!module.nodeType&&module,xK=xh&&xh.exports===px,bh=xK?j4.Buffer:void 0,Ch=bh?bh.allocUnsafe:void 0;function bK(e,t){if(t)return e.slice();var a=e.length,r=Ch?Ch(a):new e.constructor(a);return e.copy(r),r}function CK(e,t){for(var a=-1,r=e==null?0:e.length,n=0,c=[];++a<r;){var i=e[a];t(i,a,e)&&(c[n++]=i)}return c}function vx(){return[]}var MK=Object.prototype,zK=MK.propertyIsEnumerable,Mh=Object.getOwnPropertySymbols,wK=Mh?function(e){return e==null?[]:(e=Object(e),CK(Mh(e),function(t){return zK.call(e,t)}))}:vx;const zl=wK;function _K(e,t){return A5(e,zl(e),t)}var kK=Object.getOwnPropertySymbols,HK=kK?function(e){for(var t=[];e;)hx(t,zl(e)),e=mx(e);return t}:vx;const gx=HK;function VK(e,t){return A5(e,gx(e),t)}function yx(e,t,a){var r=t(e);return ea(e)?r:hx(r,a(e))}function z7(e){return yx(e,Cl,zl)}function LK(e){return yx(e,Ml,gx)}var SK=p6(j4,"DataView");const w7=SK;var AK=p6(j4,"Promise");const _7=AK;var TK=p6(j4,"Set");const k7=TK;var zh="[object Map]",EK="[object Object]",wh="[object Promise]",_h="[object Set]",kh="[object WeakMap]",Hh="[object DataView]",NK=m6(w7),DK=m6(Jr),OK=m6(_7),PK=m6(k7),BK=m6(M7),N0=Vn;(w7&&N0(new w7(new ArrayBuffer(1)))!=Hh||Jr&&N0(new Jr)!=zh||_7&&N0(_7.resolve())!=wh||k7&&N0(new k7)!=_h||M7&&N0(new M7)!=kh)&&(N0=function(e){var t=Vn(e),a=t==EK?e.constructor:void 0,r=a?m6(a):"";if(r)switch(r){case NK:return Hh;case DK:return zh;case OK:return wh;case PK:return _h;case BK:return kh}return t});const aa=N0;var FK=Object.prototype,RK=FK.hasOwnProperty;function IK(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&RK.call(e,"index")&&(a.index=e.index,a.input=e.input),a}var $K=j4.Uint8Array;const Dc=$K;function wl(e){var t=new e.constructor(e.byteLength);return new Dc(t).set(new Dc(e)),t}function UK(e,t){var a=t?wl(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var WK=/\w*$/;function qK(e){var t=new e.constructor(e.source,WK.exec(e));return t.lastIndex=e.lastIndex,t}var Vh=d0?d0.prototype:void 0,Lh=Vh?Vh.valueOf:void 0;function jK(e){return Lh?Object(Lh.call(e)):{}}function YK(e,t){var a=t?wl(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var GK="[object Boolean]",XK="[object Date]",KK="[object Map]",ZK="[object Number]",QK="[object RegExp]",JK="[object Set]",eZ="[object String]",tZ="[object Symbol]",aZ="[object ArrayBuffer]",rZ="[object DataView]",nZ="[object Float32Array]",cZ="[object Float64Array]",iZ="[object Int8Array]",sZ="[object Int16Array]",oZ="[object Int32Array]",lZ="[object Uint8Array]",fZ="[object Uint8ClampedArray]",uZ="[object Uint16Array]",dZ="[object Uint32Array]";function hZ(e,t,a){var r=e.constructor;switch(t){case aZ:return wl(e);case GK:case XK:return new r(+e);case rZ:return UK(e,a);case nZ:case cZ:case iZ:case sZ:case oZ:case lZ:case fZ:case uZ:case dZ:return YK(e,a);case KK:return new r;case ZK:case eZ:return new r(e);case QK:return qK(e);case JK:return new r;case tZ:return jK(e)}}function mZ(e){return typeof e.constructor=="function"&&!T5(e)?NG(mx(e)):{}}var pZ="[object Map]";function vZ(e){return n6(e)&&aa(e)==pZ}var Sh=ta&&ta.isMap,gZ=Sh?xl(Sh):vZ;const yZ=gZ;var xZ="[object Set]";function bZ(e){return n6(e)&&aa(e)==xZ}var Ah=ta&&ta.isSet,CZ=Ah?xl(Ah):bZ;const MZ=CZ;var zZ=1,wZ=2,_Z=4,xx="[object Arguments]",kZ="[object Array]",HZ="[object Boolean]",VZ="[object Date]",LZ="[object Error]",bx="[object Function]",SZ="[object GeneratorFunction]",AZ="[object Map]",TZ="[object Number]",Cx="[object Object]",EZ="[object RegExp]",NZ="[object Set]",DZ="[object String]",OZ="[object Symbol]",PZ="[object WeakMap]",BZ="[object ArrayBuffer]",FZ="[object DataView]",RZ="[object Float32Array]",IZ="[object Float64Array]",$Z="[object Int8Array]",UZ="[object Int16Array]",WZ="[object Int32Array]",qZ="[object Uint8Array]",jZ="[object Uint8ClampedArray]",YZ="[object Uint16Array]",GZ="[object Uint32Array]",T2={};T2[xx]=T2[kZ]=T2[BZ]=T2[FZ]=T2[HZ]=T2[VZ]=T2[RZ]=T2[IZ]=T2[$Z]=T2[UZ]=T2[WZ]=T2[AZ]=T2[TZ]=T2[Cx]=T2[EZ]=T2[NZ]=T2[DZ]=T2[OZ]=T2[qZ]=T2[jZ]=T2[YZ]=T2[GZ]=!0;T2[LZ]=T2[bx]=T2[PZ]=!1;function tc(e,t,a,r,n,c){var i,s=t&zZ,l=t&wZ,f=t&_Z;if(a&&(i=n?a(e,r,n,c):a(e)),i!==void 0)return i;if(!Ln(e))return e;var u=ea(e);if(u){if(i=IK(e),!s)return DG(e,i)}else{var d=aa(e),h=d==bx||d==SZ;if(Zr(e))return bK(e,s);if(d==Cx||d==xx||h&&!n){if(i=l||h?{}:mZ(e),!s)return l?VK(e,yK(i,e)):_K(e,gK(i,e))}else{if(!T2[d])return n?e:{};i=hZ(e,d,s)}}c||(c=new gt);var m=c.get(e);if(m)return m;c.set(e,i),MZ(e)?e.forEach(function(g){i.add(tc(g,t,a,g,e,c))}):yZ(e)&&e.forEach(function(g,y){i.set(y,tc(g,t,a,y,e,c))});var v=f?l?LK:z7:l?Ml:Cl,p=u?void 0:v(e);return PG(p||e,function(g,y){p&&(y=g,g=e[y]),nx(i,y,tc(g,t,a,y,e,c))}),i}var XZ=1,KZ=4;function Ba(e){return tc(e,XZ|KZ)}var ZZ="__lodash_hash_undefined__";function QZ(e){return this.__data__.set(e,ZZ),this}function JZ(e){return this.__data__.has(e)}function Oc(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new v6;++t<a;)this.add(e[t])}Oc.prototype.add=Oc.prototype.push=QZ;Oc.prototype.has=JZ;function eQ(e,t){for(var a=-1,r=e==null?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}function tQ(e,t){return e.has(t)}var aQ=1,rQ=2;function Mx(e,t,a,r,n,c){var i=a&aQ,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var f=c.get(e),u=c.get(t);if(f&&u)return f==t&&u==e;var d=-1,h=!0,m=a&rQ?new Oc:void 0;for(c.set(e,t),c.set(t,e);++d<s;){var v=e[d],p=t[d];if(r)var g=i?r(p,v,d,t,e,c):r(v,p,d,e,t,c);if(g!==void 0){if(g)continue;h=!1;break}if(m){if(!eQ(t,function(y,x){if(!tQ(m,x)&&(v===y||n(v,y,a,r,c)))return m.push(x)})){h=!1;break}}else if(!(v===p||n(v,p,a,r,c))){h=!1;break}}return c.delete(e),c.delete(t),h}function nQ(e){var t=-1,a=Array(e.size);return e.forEach(function(r,n){a[++t]=[n,r]}),a}function cQ(e){var t=-1,a=Array(e.size);return e.forEach(function(r){a[++t]=r}),a}var iQ=1,sQ=2,oQ="[object Boolean]",lQ="[object Date]",fQ="[object Error]",uQ="[object Map]",dQ="[object Number]",hQ="[object RegExp]",mQ="[object Set]",pQ="[object String]",vQ="[object Symbol]",gQ="[object ArrayBuffer]",yQ="[object DataView]",Th=d0?d0.prototype:void 0,Qi=Th?Th.valueOf:void 0;function xQ(e,t,a,r,n,c,i){switch(a){case yQ:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gQ:return!(e.byteLength!=t.byteLength||!c(new Dc(e),new Dc(t)));case oQ:case lQ:case dQ:return gl(+e,+t);case fQ:return e.name==t.name&&e.message==t.message;case hQ:case pQ:return e==t+"";case uQ:var s=nQ;case mQ:var l=r&iQ;if(s||(s=cQ),e.size!=t.size&&!l)return!1;var f=i.get(e);if(f)return f==t;r|=sQ,i.set(e,t);var u=Mx(s(e),s(t),r,n,c,i);return i.delete(e),u;case vQ:if(Qi)return Qi.call(e)==Qi.call(t)}return!1}var bQ=1,CQ=Object.prototype,MQ=CQ.hasOwnProperty;function zQ(e,t,a,r,n,c){var i=a&bQ,s=z7(e),l=s.length,f=z7(t),u=f.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var h=s[d];if(!(i?h in t:MQ.call(t,h)))return!1}var m=c.get(e),v=c.get(t);if(m&&v)return m==t&&v==e;var p=!0;c.set(e,t),c.set(t,e);for(var g=i;++d<l;){h=s[d];var y=e[h],x=t[h];if(r)var C=i?r(x,y,h,t,e,c):r(y,x,h,e,t,c);if(!(C===void 0?y===x||n(y,x,a,r,c):C)){p=!1;break}g||(g=h=="constructor")}if(p&&!g){var b=e.constructor,M=t.constructor;b!=M&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof M=="function"&&M instanceof M)&&(p=!1)}return c.delete(e),c.delete(t),p}var wQ=1,Eh="[object Arguments]",Nh="[object Array]",z8="[object Object]",_Q=Object.prototype,Dh=_Q.hasOwnProperty;function kQ(e,t,a,r,n,c){var i=ea(e),s=ea(t),l=i?Nh:aa(e),f=s?Nh:aa(t);l=l==Eh?z8:l,f=f==Eh?z8:f;var u=l==z8,d=f==z8,h=l==f;if(h&&Zr(e)){if(!Zr(t))return!1;i=!0,u=!1}if(h&&!u)return c||(c=new gt),i||bl(e)?Mx(e,t,a,r,n,c):xQ(e,t,l,a,r,n,c);if(!(a&wQ)){var m=u&&Dh.call(e,"__wrapped__"),v=d&&Dh.call(t,"__wrapped__");if(m||v){var p=m?e.value():e,g=v?t.value():t;return c||(c=new gt),n(p,g,a,r,c)}}return h?(c||(c=new gt),zQ(e,t,a,r,n,c)):!1}function zx(e,t,a,r,n){return e===t?!0:e==null||t==null||!n6(e)&&!n6(t)?e!==e&&t!==t:kQ(e,t,a,r,zx,n)}var HQ="[object Map]",VQ="[object Set]",LQ=Object.prototype,SQ=LQ.hasOwnProperty;function AQ(e){if(e==null)return!0;if(yl(e)&&(ea(e)||typeof e=="string"||typeof e.splice=="function"||Zr(e)||bl(e)||sx(e)))return!e.length;var t=aa(e);if(t==HQ||t==VQ)return!e.size;if(T5(e))return!dx(e).length;for(var a in e)if(SQ.call(e,a))return!1;return!0}function Oh(e,t){return zx(e,t)}var TQ=Object.defineProperty,EQ=Object.defineProperties,NQ=Object.getOwnPropertyDescriptors,Ph=Object.getOwnPropertySymbols,DQ=Object.prototype.hasOwnProperty,OQ=Object.prototype.propertyIsEnumerable,Bh=(e,t,a)=>t in e?TQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,PQ=(e,t)=>{for(var a in t||(t={}))DQ.call(t,a)&&Bh(e,a,t[a]);if(Ph)for(var a of Ph(t))OQ.call(t,a)&&Bh(e,a,t[a]);return e},BQ=(e,t)=>EQ(e,NQ(t));function FQ(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var g0=(e,t)=>{const a={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}},r=FQ(e);return o.defineComponent({name:r,props:a,emits:{"labels:update":()=>!0,"chart:update":n=>!0,"chart:destroy":()=>!0,"chart:render":n=>!0},setup(n,{emit:c,expose:i}){const s=o.ref(null),l=`${n.chartId}`;let f=o.shallowRef(null);o.watch(()=>n.chartData,u,{deep:!0}),o.watch(()=>n.options,g=>{f.value&&g&&(f.value.options=Ba(g),v())},{deep:!0});function u(g){if(f.value){let y=f.value;Oh(g.labels,f.value.data.labels)||(y.data.labels=g.labels,h()),Oh(g.datasets,f.value.data.datasets)||g.datasets.forEach((x,C)=>{var b,M;if(AQ(x))y.data.datasets=[];else{const w=Ba(y.data),z=Object.keys((M=(b=w.datasets)==null?void 0:b[C])!=null?M:{}),H=Object.keys(x);z.filter(V=>V!=="_meta"&&H.indexOf(V)===-1).forEach(V=>{y.data.datasets[C]&&delete y.data.datasets[C][V]});for(const V in x){const k=Ba(x[V]);y.data.datasets[C]||(y.data.datasets[C]={}),x.hasOwnProperty(V)&&k!=null&&y&&(y.data.datasets[C][V]=k)}}}),v()}else f.value&&p(),d()}function d(){s.value?(f.value=new H4(s.value,{data:Ba(n.chartData),type:t,options:Ba(n.options),plugins:n.plugins}),m()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function h(){c("labels:update"),n.onLabelsUpdate&&n.onLabelsUpdate()}function m(){f.value&&(c("chart:render",f.value),n.onChartRender&&n.onChartRender(f.value))}function v(){f.value&&(f.value.update(),c("chart:update",f.value),n.onChartUpdate&&n.onChartUpdate(f.value))}function p(){f.value&&f.value.destroy(),c("chart:destroy"),n.onChartDestroy&&n.onChartDestroy()}return o.onMounted(d),o.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),i({canvasRef:s,renderChart:d,chartInstance:f,canvasId:l,update:v}),()=>o.h("div",{style:BQ(PQ({maxWidth:"100%"},n.styles),{position:"relative"}),class:n.cssClasses},[o.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:n.width,height:n.height,ref:s})])}})},RQ=g0("bar-chart","bar"),IQ=g0("doughnut-chart","doughnut");g0("line-chart","line");g0("pie-chart","pie");g0("polar-chart","polarArea");g0("radar-chart","radar");g0("bubble-chart","bubble");g0("scatter-chart","scatter");const $Q=o.defineComponent({__name:"PgaBarChart",props:{data:{},options:{}},setup(e){H4.register(...Jy);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(RQ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),UQ=o.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){H4.register(...Jy);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(IQ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),WQ={class:"pga-display-barcodes"},qQ={key:0},jQ={class:"barcodes-container"},YQ=o.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){const t=e,a=o.ref(!1),r=o.computed(()=>a.value?t.barcodes:t.barcodes.slice(0,2));return(n,c)=>(o.openBlock(),o.createElementBlock("div",WQ,[n.barcodes.length?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",jQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(i,s)=>(o.openBlock(),o.createElementBlock("span",{class:"barcode",key:s},[o.createVNode(Oe,{icon:"barcode"}),o.createTextVNode("   "+o.toDisplayString(i),1)]))),128))]),n.barcodes.length>2?(o.openBlock(),o.createBlock(qo,{key:0,modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=i=>a.value=i)},null,8,["modelValue"])):o.createCommentVNode("",!0)],64)):(o.openBlock(),o.createElementBlock("span",qQ,"-"))]))}});const GQ=R1(YQ,[["__scopeId","data-v-d2646648"]]),XQ={class:"pga-display-content"},KQ=o.defineComponent({__name:"PgaDisplayContent",props:{label:{type:[String,Number,Function]}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",XQ,[o.createVNode(ye,{class:"item--label",text:t.label},null,8,["text"]),o.renderSlot(t.$slots,"default",{},void 0,!0)]))}});const ZQ=R1(KQ,[["__scopeId","data-v-66c0a02b"]]),QQ={key:0},JQ=o.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},format:{default:"short"},noIcon:{type:Boolean},withBackground:{type:Boolean}},setup(e){const t=e,a=o.computed(()=>t.datetime instanceof Date),r=o.computed(()=>{if(a.value)return m4(t.datetime,{format:t.format,withTime:!1})}),n=o.computed(()=>t.noIcon?void 0:"calendar-days"),c=o.computed(()=>a.value?m4(t.datetime,{justTime:!0}):"");return(i,s)=>{const l=o.resolveDirective("tooltip");return a.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["pga-datetime",{"pga-datetime__with-background":i.withBackground}])},[o.createVNode(ye,{text:r.value,icon:n.value,nowrap:""},null,8,["text","icon"])],2)),[[l,c.value]]):(o.openBlock(),o.createElementBlock("span",QQ,"-"))}}});const eJ=R1(JQ,[["__scopeId","data-v-9ed5e6ff"]]),tJ={class:"info-card"},aJ={class:"info-card--icon-container"},rJ={class:"info-card--content-container"},nJ={class:"info-card--content"},cJ=["textContent"],iJ=o.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){o.useCssVars(i=>({"47ea99c5":n.value,"42bce5a0":c.value}));const t=e,a=o.computed(()=>{if(t.type==="info")return"circle-info";if(t.type==="success")return"circle-check";if(t.type==="error")return"circle-xmark";if(t.type==="warning")return"circle-exclamation"}),r=o.computed(()=>{if(t.type==="info")return"aqua";if(t.type==="success")return"success";if(t.type==="error")return"danger";if(t.type==="warning")return"warning"}),n=o.computed(()=>`var(--pga-color-${r.value}-08)`),c=o.computed(()=>`var(--pga-color-${r.value}-contrast)`);return(i,s)=>{const l=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",tJ,[o.createElementVNode("div",aJ,[o.createVNode(l,{class:"info-card--icon",icon:a.value},null,8,["icon"])]),o.createElementVNode("div",rJ,[o.createElementVNode("div",nJ,[i.info?(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(i.info)},null,8,cJ)):o.renderSlot(i.$slots,"default",{key:1},void 0,!0)])])])}}});const sJ=R1(iJ,[["__scopeId","data-v-c3d5b74a"]]),oJ={key:0,class:"no-items-container"},lJ={key:1,class:"no-items"},fJ=o.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const t=e,a=_2("pgaDisplay"),r=o.computed(()=>{var c;return!(((c=t.items)==null?void 0:c.length)>0)}),n=o.computed(()=>t.label?t.label:a("noItemsText"));return(c,i)=>r.value?(o.openBlock(),o.createElementBlock("div",oJ,[c.isLoading?(o.openBlock(),o.createBlock(Lt,{key:0})):(o.openBlock(),o.createElementBlock("div",lJ,[c.preventDisplayIcon?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Oe,{key:0,class:"no-items--icon",icon:c.icon},null,8,["icon"])),o.createVNode(ye,{class:"no-items--text",text:n.value},null,8,["text"])]))])):o.createCommentVNode("",!0)}});const wx=R1(fJ,[["__scopeId","data-v-f7c86b3b"]]),uJ={key:0},dJ={key:0,class:"price--sign"},hJ=["textContent"],mJ=o.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},maxDecimals:{},prefix:{},suffix:{},size:{default:"m"},fontSize:{},color:{default:"first"},noSign:{type:Boolean},noBackground:{type:Boolean},withBackground:{type:Boolean}},setup(e){o.useCssVars(d=>({"9c1ce24a":f.value,"169bfd50":u.value}));const t=e,{display:a}=$e(),r=o.computed(()=>t.noSign?!1:a.price.withSign),n=o.computed(()=>t.noBackground?!1:t.withBackground?!0:a.price.withBackground),c=o.computed(()=>t.price!==void 0),i={maxDecimals:t.maxDecimals,prefix:t.prefix,suffix:t.suffix},s=o.computed(()=>{if(c.value)return typeof t.price=="string"?t.price:Es(t.price,i)}),l=o.computed(()=>t.tooltipPrice===void 0?"":typeof t.tooltipPrice=="string"?t.tooltipPrice:Es(t.tooltipPrice,{...i,prefix:i.prefix||"$"})),f=o.computed(()=>{if(t.fontSize)return t.fontSize;if(t.size==="s")return"0.9rem";if(t.size==="m")return"1rem";if(t.size==="l")return"1.1rem"}),u=o.computed(()=>mn(t.color)?`var(--pga-color-${t.color})`:t.color);return(d,h)=>{const m=o.resolveDirective("tooltip");return c.value?o.withDirectives((o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["price",{"price__with-background":n.value}])},[r.value?(o.openBlock(),o.createElementBlock("span",dJ,"$")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"price--value",textContent:o.toDisplayString(s.value)},null,8,hJ)],2)),[[m,l.value]]):(o.openBlock(),o.createElementBlock("span",uJ,"-"))}}});const pJ=R1(mJ,[["__scopeId","data-v-70585abb"]]),vJ=o.defineComponent({__name:"PgaDisplayTime",props:{datetime:{}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{icon:"clock",text:o.unref(lc)(t.datetime)},null,8,["text"])}}}),gJ=o.defineComponent({__name:"PgaForm",props:{withSubmitButton:{type:Boolean},submitBtnText:{},submitBtnIcon:{},isLoading:{type:Boolean},width:{default:"100%"}},emits:["submit"],setup(e,{emit:t}){o.useCssVars(n=>({f2ba1544:n.width}));const a=t,r=_2("pgaForm");return(n,c)=>(o.openBlock(),o.createElementBlock("form",{class:"pga-form",onSubmit:c[1]||(c[1]=o.withModifiers(()=>{},["prevent"]))},[o.renderSlot(n.$slots,"default",{},void 0,!0),n.withSubmitButton||n.submitBtnText?(o.openBlock(),o.createBlock(L2,{key:0,class:"form--submit-btn",type:"submit",text:n.submitBtnText||o.unref(r)("submitBtn"),icon:n.submitBtnIcon||"save",variant:"filled",isLoading:n.isLoading,onClick:c[0]||(c[0]=i=>a("submit"))},null,8,["text","icon","isLoading"])):o.createCommentVNode("",!0)],32))}});const _x=R1(gJ,[["__scopeId","data-v-fad80058"]]),yJ=o.defineComponent({__name:"PgaFormRow",props:{breakRow:{type:Boolean}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["pga-form-row",{"pga-form-row__break-row":t.breakRow}])},[o.renderSlot(t.$slots,"default")],2))}});const xJ=o.defineComponent({__name:"PgaFormSubtitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{class:"pga-form-subtitle",text:t.title},null,8,["text"])}}});const bJ=R1(xJ,[["__scopeId","data-v-488b1ab9"]]),CJ=o.defineComponent({__name:"PgaFormTitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{class:"pga-form-title",text:t.title},null,8,["text"])}}});const MJ=R1(CJ,[["__scopeId","data-v-46e35803"]]),zJ={key:0,class:"input-group--header"},wJ={key:0,class:"header--label"},_J={key:1,class:"header--required-label"},kJ={key:2,class:"header--optional-label"},HJ=["innerHTML"],VJ={key:2,class:"input-group--errors"},LJ=["textContent"],SJ=o.defineComponent({__name:"PgaInputGroup",props:{label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},fitContent:{type:Boolean},grow:{}},setup(e){o.useCssVars(c=>({"26eab7ff":c.grow}));const t=e,a=_2("pgaForm"),r=o.computed(()=>t.label||t.withLabelSpace),n=o.computed(()=>t.label||" ");return(c,i)=>{const s=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["input-group",{"input-group__fit-content":c.fitContent,"input-group__with-flex-grow":c.grow!==void 0}])},[r.value||c.withRequiredLabel||c.withOptionalLabel?(o.openBlock(),o.createElementBlock("div",zJ,[r.value?(o.openBlock(),o.createElementBlock("label",wJ,o.toDisplayString(n.value),1)):o.createCommentVNode("",!0),c.withRequiredLabel?(o.openBlock(),o.createElementBlock("span",_J,o.toDisplayString(o.unref(a)("requiredLabel")),1)):o.createCommentVNode("",!0),c.withOptionalLabel?(o.openBlock(),o.createElementBlock("span",kJ,o.toDisplayString(o.unref(a)("optionalLabel")),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.renderSlot(c.$slots,"default",{},void 0,!0),c.description?(o.openBlock(),o.createElementBlock("span",{key:1,class:"input-group--description",innerHTML:c.description},null,8,HJ)):o.createCommentVNode("",!0),c.errors?(o.openBlock(),o.createElementBlock("div",VJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.errors,(l,f)=>(o.openBlock(),o.createElementBlock("div",{key:f,class:"errors--error"},[o.createVNode(s,{class:"error--icon",icon:["fas","triangle-exclamation"]}),o.createElementVNode("span",{class:"error--message",textContent:o.toDisplayString(l.$message)},null,8,LJ)]))),128))])):o.createCommentVNode("",!0)],2)}}});const A3=R1(SJ,[["__scopeId","data-v-14d41e2a"]]);function Fh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function Rt(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Fh(Object(a),!0).forEach(function(r){AJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Fh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function AJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Rh(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((a,r)=>(t.includes(r)||(a[r]=o.unref(e[r])),a),{})}function Pc(e){return typeof e=="function"}function TJ(e){return o.isReactive(e)||o.isReadonly(e)}function kx(e,t,a){let r=e;const n=t.split(".");for(let c=0;c<n.length;c++){if(!r[n[c]])return a;r=r[n[c]]}return r}function Ji(e,t,a){return o.computed(()=>e.some(r=>kx(t,r,{[a]:!1})[a]))}function Ih(e,t,a){return o.computed(()=>e.reduce((r,n)=>{const c=kx(t,n,{[a]:!1})[a]||[];return r.concat(c)},[]))}function Hx(e,t,a,r){return e.call(r,o.unref(t),o.unref(a),r)}function Vx(e){return e.$valid!==void 0?!e.$valid:!e}function EJ(e,t,a,r,n,c,i){let{$lazy:s,$rewardEarly:l}=n,f=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8?arguments[8]:void 0,d=arguments.length>9?arguments[9]:void 0,h=arguments.length>10?arguments[10]:void 0;const m=o.ref(!!r.value),v=o.ref(0);a.value=!1;const p=o.watch([t,r].concat(f,h),()=>{if(s&&!r.value||l&&!d.value&&!a.value)return;let g;try{g=Hx(e,t,u,i)}catch(y){g=Promise.reject(y)}v.value++,a.value=!!v.value,m.value=!1,Promise.resolve(g).then(y=>{v.value--,a.value=!!v.value,c.value=y,m.value=Vx(y)}).catch(y=>{v.value--,a.value=!!v.value,c.value=y,m.value=!0})},{immediate:!0,deep:typeof t=="object"});return{$invalid:m,$unwatch:p}}function NJ(e,t,a,r,n,c,i,s){let{$lazy:l,$rewardEarly:f}=r;const u=()=>({}),d=o.computed(()=>{if(l&&!a.value||f&&!s.value)return!1;let h=!0;try{const m=Hx(e,t,i,c);n.value=m,h=Vx(m)}catch(m){n.value=m}return h});return{$unwatch:u,$invalid:d}}function DJ(e,t,a,r,n,c,i,s,l,f,u){const d=o.ref(!1),h=e.$params||{},m=o.ref(null);let v,p;e.$async?{$invalid:v,$unwatch:p}=EJ(e.$validator,t,d,a,r,m,n,e.$watchTargets,l,f,u):{$invalid:v,$unwatch:p}=NJ(e.$validator,t,a,r,m,n,l,f);const g=e.$message;return{$message:Pc(g)?o.computed(()=>g(Rh({$pending:d,$invalid:v,$params:Rh(h),$model:t,$response:m,$validator:c,$propertyPath:s,$property:i}))):g||"",$params:h,$pending:d,$invalid:v,$response:m,$unwatch:p}}function OJ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=o.unref(e),a=Object.keys(t),r={},n={},c={};let i=null;return a.forEach(s=>{const l=t[s];switch(!0){case Pc(l.$validator):r[s]=l;break;case Pc(l):r[s]={$validator:l};break;case s==="$validationGroups":i=l;break;case s.startsWith("$"):c[s]=l;break;default:n[s]=l}}),{rules:r,nestedValidators:n,config:c,validationGroups:i}}const PJ="__root";function BJ(e,t,a,r,n,c,i,s,l){const f=Object.keys(e),u=r.get(n,e),d=o.ref(!1),h=o.ref(!1),m=o.ref(0);if(u){if(!u.$partial)return u;u.$unwatch(),d.value=u.$dirty.value}const v={$dirty:d,$path:n,$touch:()=>{d.value||(d.value=!0)},$reset:()=>{d.value&&(d.value=!1)},$commit:()=>{}};return f.length?(f.forEach(p=>{v[p]=DJ(e[p],t,v.$dirty,c,i,p,a,n,l,h,m)}),v.$externalResults=o.computed(()=>s.value?[].concat(s.value).map((p,g)=>({$propertyPath:n,$property:a,$validator:"$externalResults",$uid:`${n}-externalResult-${g}`,$message:p,$params:{},$response:null,$pending:!1})):[]),v.$invalid=o.computed(()=>{const p=f.some(g=>o.unref(v[g].$invalid));return h.value=p,!!v.$externalResults.value.length||p}),v.$pending=o.computed(()=>f.some(p=>o.unref(v[p].$pending))),v.$error=o.computed(()=>v.$dirty.value?v.$pending.value||v.$invalid.value:!1),v.$silentErrors=o.computed(()=>f.filter(p=>o.unref(v[p].$invalid)).map(p=>{const g=v[p];return o.reactive({$propertyPath:n,$property:a,$validator:p,$uid:`${n}-${p}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(v.$externalResults.value)),v.$errors=o.computed(()=>v.$dirty.value?v.$silentErrors.value:[]),v.$unwatch=()=>f.forEach(p=>{v[p].$unwatch()}),v.$commit=()=>{h.value=!0,m.value=Date.now()},r.set(n,e,v),v):(u&&r.set(n,e,v),v)}function FJ(e,t,a,r,n,c,i){const s=Object.keys(e);return s.length?s.reduce((l,f)=>(l[f]=H7({validations:e[f],state:t,key:f,parentKey:a,resultsCache:r,globalConfig:n,instance:c,externalResults:i}),l),{}):{}}function RJ(e,t,a){const r=o.computed(()=>[t,a].filter(v=>v).reduce((v,p)=>v.concat(Object.values(o.unref(p))),[])),n=o.computed({get(){return e.$dirty.value||(r.value.length?r.value.every(v=>v.$dirty):!1)},set(v){e.$dirty.value=v}}),c=o.computed(()=>{const v=o.unref(e.$silentErrors)||[],p=r.value.filter(g=>(o.unref(g).$silentErrors||[]).length).reduce((g,y)=>g.concat(...y.$silentErrors),[]);return v.concat(p)}),i=o.computed(()=>{const v=o.unref(e.$errors)||[],p=r.value.filter(g=>(o.unref(g).$errors||[]).length).reduce((g,y)=>g.concat(...y.$errors),[]);return v.concat(p)}),s=o.computed(()=>r.value.some(v=>v.$invalid)||o.unref(e.$invalid)||!1),l=o.computed(()=>r.value.some(v=>o.unref(v.$pending))||o.unref(e.$pending)||!1),f=o.computed(()=>r.value.some(v=>v.$dirty)||r.value.some(v=>v.$anyDirty)||n.value),u=o.computed(()=>n.value?l.value||s.value:!1),d=()=>{e.$touch(),r.value.forEach(v=>{v.$touch()})},h=()=>{e.$commit(),r.value.forEach(v=>{v.$commit()})},m=()=>{e.$reset(),r.value.forEach(v=>{v.$reset()})};return r.value.length&&r.value.every(v=>v.$dirty)&&d(),{$dirty:n,$errors:i,$invalid:s,$anyDirty:f,$error:u,$pending:l,$touch:d,$reset:m,$silentErrors:c,$commit:h}}function H7(e){let{validations:t,state:a,key:r,parentKey:n,childResults:c,resultsCache:i,globalConfig:s={},instance:l,externalResults:f}=e;const u=n?`${n}.${r}`:r,{rules:d,nestedValidators:h,config:m,validationGroups:v}=OJ(t),p=Rt(Rt({},s),m),g=r?o.computed(()=>{const G=o.unref(a);return G?o.unref(G[r]):void 0}):a,y=Rt({},o.unref(f)||{}),x=o.computed(()=>{const G=o.unref(f);return r?G?o.unref(G[r]):void 0:G}),C=BJ(d,g,r,i,u,p,l,x,a),b=FJ(h,g,u,i,p,l,x),M={};v&&Object.entries(v).forEach(G=>{let[O,T]=G;M[O]={$invalid:Ji(T,b,"$invalid"),$error:Ji(T,b,"$error"),$pending:Ji(T,b,"$pending"),$errors:Ih(T,b,"$errors"),$silentErrors:Ih(T,b,"$silentErrors")}});const{$dirty:w,$errors:z,$invalid:H,$anyDirty:A,$error:V,$pending:k,$touch:_,$reset:N,$silentErrors:q,$commit:S}=RJ(C,b,c),B=r?o.computed({get:()=>o.unref(g),set:G=>{w.value=!0;const O=o.unref(a),T=o.unref(f);T&&(T[r]=y[r]),o.isRef(O[r])?O[r].value=G:O[r]=G}}):null;r&&p.$autoDirty&&o.watch(g,()=>{w.value||_();const G=o.unref(f);G&&(G[r]=y[r])},{flush:"sync"});async function F(){return _(),p.$rewardEarly&&(S(),await o.nextTick()),await o.nextTick(),new Promise(G=>{if(!k.value)return G(!H.value);const O=o.watch(k,()=>{G(!H.value),O()})})}function e1(G){return(c.value||{})[G]}function Y(){o.isRef(f)?f.value=y:Object.keys(y).length===0?Object.keys(f).forEach(G=>{delete f[G]}):Object.assign(f,y)}return o.reactive(Rt(Rt(Rt({},C),{},{$model:B,$dirty:w,$error:V,$errors:z,$invalid:H,$anyDirty:A,$pending:k,$touch:_,$reset:N,$path:u||PJ,$silentErrors:q,$validate:F,$commit:S},c&&{$getResultsForChild:e1,$clearExternalResults:Y,$validationGroups:M}),b))}class IJ{constructor(){this.storage=new Map}set(t,a,r){this.storage.set(t,{rules:a,result:r})}checkRulesValidity(t,a,r){const n=Object.keys(r),c=Object.keys(a);return c.length!==n.length||!c.every(s=>n.includes(s))?!1:c.every(s=>a[s].$params?Object.keys(a[s].$params).every(l=>o.unref(r[s].$params[l])===o.unref(a[s].$params[l])):!0)}get(t,a){const r=this.storage.get(t);if(!r)return;const{rules:n,result:c}=r,i=this.checkRulesValidity(t,a,n),s=c.$unwatch?c.$unwatch:()=>({});return i?c:{$dirty:c.$dirty,$partial:!0,$unwatch:s}}}const ac={COLLECT_ALL:!0,COLLECT_NONE:!1},$h=Symbol("vuelidate#injectChildResults"),Uh=Symbol("vuelidate#removeChildResults");function $J(e){let{$scope:t,instance:a}=e;const r={},n=o.ref([]),c=o.computed(()=>n.value.reduce((u,d)=>(u[d]=o.unref(r[d]),u),{}));function i(u,d){let{$registerAs:h,$scope:m,$stopPropagation:v}=d;v||t===ac.COLLECT_NONE||m===ac.COLLECT_NONE||t!==ac.COLLECT_ALL&&t!==m||(r[h]=u,n.value.push(h))}a.__vuelidateInjectInstances=[].concat(a.__vuelidateInjectInstances||[],i);function s(u){n.value=n.value.filter(d=>d!==u),delete r[u]}a.__vuelidateRemoveInstances=[].concat(a.__vuelidateRemoveInstances||[],s);const l=o.inject($h,[]);o.provide($h,a.__vuelidateInjectInstances);const f=o.inject(Uh,[]);return o.provide(Uh,a.__vuelidateRemoveInstances),{childResults:c,sendValidationResultsToParent:l,removeValidationResultsFromParent:f}}function Lx(e){return new Proxy(e,{get(t,a){return typeof t[a]=="object"?Lx(t[a]):o.computed(()=>t[a])}})}let Wh=0;function UJ(e,t){var a;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(r=e,e=void 0,t=void 0);let{$registerAs:n,$scope:c=ac.COLLECT_ALL,$stopPropagation:i,$externalResults:s,currentVueInstance:l}=r;const f=l||((a=o.getCurrentInstance())===null||a===void 0?void 0:a.proxy),u=f?f.$options:{};n||(Wh+=1,n=`_vuelidate_${Wh}`);const d=o.ref({}),h=new IJ,{childResults:m,sendValidationResultsToParent:v,removeValidationResultsFromParent:p}=f?$J({$scope:c,instance:f}):{childResults:o.ref({})};if(!e&&u.validations){const g=u.validations;t=o.ref({}),o.onBeforeMount(()=>{t.value=f,o.watch(()=>Pc(g)?g.call(t.value,new Lx(t.value)):g,y=>{d.value=H7({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:f,externalResults:s||f.vuelidateExternalResults})},{immediate:!0})}),r=u.validationsConfig||r}else{const g=o.isRef(e)||TJ(e)?e:o.reactive(e||{});o.watch(g,y=>{d.value=H7({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:f??{},externalResults:s})},{immediate:!0})}return f&&(v.forEach(g=>g(d,{$registerAs:n,$scope:c,$stopPropagation:i})),o.onBeforeUnmount(()=>p.forEach(g=>g(n)))),o.computed(()=>Rt(Rt({},o.unref(d.value)),m.value))}function qh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function en(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?qh(Object(a),!0).forEach(function(r){WJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):qh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function WJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Bc(e){return typeof e=="function"}function V7(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function D5(e){return Bc(e.$validator)?en({},e):{$validator:e}}function Sx(e){return typeof e=="object"?e.$valid:e}function Ax(e){return e.$validator||e}function qJ(e,t){if(!V7(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!V7(t)&&!Bc(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=D5(t);return a.$params=en(en({},a.$params||{}),e),a}function jJ(e,t){if(!Bc(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(!V7(t)&&!Bc(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=D5(t);return a.$message=e,a}function YJ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=D5(e);return en(en({},a),{},{$async:!0,$watchTargets:t})}function GJ(e){return{$validator(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];return o.unref(t).reduce((c,i,s)=>{const l=Object.entries(i).reduce((f,u)=>{let[d,h]=u;const m=e[d]||{},v=Object.entries(m).reduce((p,g)=>{let[y,x]=g;const b=Ax(x).call(this,h,i,s,...r),M=Sx(b);if(p.$data[y]=b,p.$data.$invalid=!M||!!p.$data.$invalid,p.$data.$error=p.$data.$invalid,!M){let w=x.$message||"";const z=x.$params||{};typeof w=="function"&&(w=w({$pending:!1,$invalid:!M,$params:z,$model:h,$response:b})),p.$errors.push({$property:d,$message:w,$params:z,$response:b,$model:h,$pending:!1,$validator:y})}return{$valid:p.$valid&&M,$data:p.$data,$errors:p.$errors}},{$valid:!0,$data:{},$errors:[]});return f.$data[d]=v.$data,f.$errors[d]=v.$errors,{$valid:f.$valid&&v.$valid,$data:f.$data,$errors:f.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:c.$valid&&l.$valid,$data:c.$data.concat(l.$data),$errors:c.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:t=>{let{$response:a}=t;return a?a.$errors.map(r=>Object.values(r).map(n=>n.map(c=>c.$message)).reduce((n,c)=>n.concat(c),[])):[]}}}const Sn=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 t in e)return!0;return!1}return!!String(e).length},_l=e=>(e=o.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function y0(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r=>(r=o.unref(r),!Sn(r)||t.every(n=>(n.lastIndex=0,n.test(r))))}var i6=Object.freeze({__proto__:null,forEach:GJ,len:_l,normalizeValidatorObject:D5,regex:y0,req:Sn,unwrap:o.unref,unwrapNormalizedValidator:Ax,unwrapValidatorResponse:Sx,withAsync:YJ,withMessage:jJ,withParams:qJ});y0(/^[a-zA-Z]*$/);y0(/^[a-zA-Z0-9]*$/);y0(/^\d*(\.\d+)?$/);const XJ=/^(?:[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;y0(XJ);function KJ(e){return t=>!Sn(t)||_l(t)<=o.unref(e)}function ZJ(e){return{$validator:KJ(e),$message:t=>{let{$params:a}=t;return`The maximum length allowed is ${a.max}`},$params:{max:e,type:"maxLength"}}}function QJ(e){return t=>!Sn(t)||_l(t)>=o.unref(e)}function JJ(e){return{$validator:QJ(e),$message:t=>{let{$params:a}=t;return`This field should be at least ${a.min} characters long`},$params:{min:e,type:"minLength"}}}function e11(e){return typeof e=="string"&&(e=e.trim()),Sn(e)}var t11={$validator:e11,$message:"Value is required",$params:{type:"required"}};const a11=/^(?:(?:(?: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;y0(a11);var r11=y0(/(^[0-9]*$)|(^-[0-9]+$)/),n11={$validator:r11,$message:"Value is not an integer",$params:{type:"integer"}};y0(/^[-]?\d*(\.\d+)?$/);const An=_2("validations"),L7=i6.withMessage(()=>An("requiredRuleError"),t11),c11=i6.withMessage(()=>An("requiredRuleError"),i6.withParams({},e=>typeof e!="number"?!1:e>0)),S7=e=>Tx("minLength",e),A7=e=>Tx("maxLength",e),i11=i6.withMessage(()=>An("integerRuleError"),n11),s11=e=>O5("lessEqual",e),o11=e=>O5("greaterEqual",e),l11=e=>O5("lessThan",e),f11=e=>O5("greaterThan",e);function Tx(e,t){const a={minLength:JJ,maxLength:ZJ};return i6.withMessage(()=>An(`${e}RuleError`,{length:t}),a[e](t))}function O5(e,t){const a={lessEqual:r=>r<=t,greaterEqual:r=>r>=t,lessThan:r=>r<t,greaterThan:r=>r>t};return i6.withMessage(()=>An(`${e}RuleError`,{number:t}),i6.withParams({},r=>typeof r!="number"?!0:a[e](r)))}const u11=o.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){o.useCssVars(a=>({d66bfd04:o.unref(t).input.height,"66ebfdd4":o.unref(t).input.iconWidth,"9d32e216":o.unref(t).input.borderRadius,"1936f71a":o.unref(t).input.backgroundColorFocus,"19536b7e":o.unref(t).input.backgroundColorHover}));const{form:t}=$e();return(a,r)=>(o.openBlock(),o.createBlock(L2,{class:o.normalizeClass(["input-right-button",{"input-right-button__with-background":a.withBackground}]),variant:"flat",icon:a.icon,tabindex:"-1"},null,8,["class","icon"]))}});const Fc=R1(u11,[["__scopeId","data-v-1088e7d4"]]),d11={class:"input-container"},h11={class:"input-content"},m11=["type","placeholder","autofocus","disabled"],es="",p11=o.defineComponent({__name:"PgaInput",props:o.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:t,emit:a}){o.useCssVars(b=>({"7426ec94":o.unref(i).input.height,"9e656378":o.unref(i).input.padding,c8e0867a:o.unref(i).input.paddingWithIcon,"55e8474a":o.unref(i).input.borderColor,"7ff0518b":o.unref(i).input.borderRadius,"5a052608":o.unref(i).input.backgroundColor,"2c758fbc":o.unref(i).input.colorFocus,"63a33ca4":o.unref(i).input.backgroundColorDisabled,"3e5ce0dd":o.unref(i).input.placeholderColor}));const r=o.useModel(e,"modelValue"),n=e,c=a;t({focus:h});const{form:i}=$e(),s=o.ref(),l=o.ref(es),f=o.ref(!1),u=o.computed(()=>n.type==="password"),d=o.computed(()=>u.value?!1:!n.disabled&&l.value);o.watch(r,b=>x(b),{immediate:!0});function h(){var b;(b=s.value)==null||b.focus()}function m(){n.type==="number"&&!l.value&&(l.value=es)}function v(){n.type==="number"&&!l.value&&(l.value=y())}function p(){C(es),c("valueCleared")}function g(b){return b===""?null:n.type==="number"&&n.integer&&typeof b=="number"?Math.round(b):b}function y(b){const M=typeof b>"u"?r.value:b;return M===null?"":M}function x(b){const M=g(b);return r.value=M,l.value=y(M),M}function C(b){const M=x(b);c("change",M)}return(b,M)=>(o.openBlock(),o.createBlock(A3,{label:b.label,withRequiredLabel:b.withRequiredLabel,withOptionalLabel:b.withOptionalLabel,withLabelSpace:b.withLabelSpace,description:b.description,errors:b.errors,grow:b.grow},{default:o.withCtx(()=>[o.createElementVNode("div",d11,[o.createElementVNode("div",h11,[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":M[0]||(M[0]=w=>l.value=w),class:o.normalizeClass(["input",{input__disabled:b.disabled}]),type:f.value?"text":b.type,placeholder:o.unref(vt)(b.placeholder),autofocus:b.autofocus,disabled:b.disabled,onInput:M[1]||(M[1]=w=>C(l.value)),onKeyup:M[2]||(M[2]=o.withKeys(w=>c("enter"),["enter"])),onFocus:M[3]||(M[3]=w=>m()),onBlur:M[4]||(M[4]=w=>v())},null,42,m11),[[o.vModelDynamic,l.value]]),u.value?(o.openBlock(),o.createBlock(Fc,{key:0,icon:f.value?"eye-slash":"eye",withBackground:"",onClick:M[5]||(M[5]=w=>f.value=!f.value)},null,8,["icon"])):d.value?(o.openBlock(),o.createBlock(Fc,{key:1,icon:"xmark",onClick:M[6]||(M[6]=w=>p())})):o.createCommentVNode("",!0)]),o.renderSlot(b.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const Rc=R1(p11,[["__scopeId","data-v-7df318f0"]]),v11={class:"login-form-container"},g11={class:"user-icon-container"},y11=o.defineComponent({__name:"PgaLoginForm",setup(e){class t{constructor(){v1(this,"username","");v1(this,"password","")}}const a=Z2.getConfig(),r=_2("pgaForm"),n=Vr.useRoute(),c={username:{requiredRule:L7,minLengthRule:S7(8),maxLengthRule:A7(a.stringLengths.short)},password:{requiredRule:L7,minLengthRule:S7(8),maxLengthRule:A7(a.stringLengths.short)}},i=o.ref(new t),s=UJ(c,i),l=o.ref(!1);async function f(){if(!await s.value.$validate())return;const u={isLoadingRef:l,redirectToName:n.query.redirectTo};Np($3().currentRouteType,i.value,u)}return(u,d)=>(o.openBlock(),o.createElementBlock("div",v11,[o.createVNode(_x,{class:"login-form",submitBtnText:o.unref(r)("loginBtn"),submitBtnIcon:"right-to-bracket",isLoading:l.value,onSubmit:d[2]||(d[2]=h=>f())},{default:o.withCtx(()=>[o.createElementVNode("div",g11,[o.createVNode(Oe,{class:"user-icon",icon:"user"})]),o.createVNode(Rc,{modelValue:i.value.username,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value.username=h),label:o.unref(r)("usernameLabel"),errors:o.unref(s).username.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"]),o.createVNode(Rc,{modelValue:i.value.password,"onUpdate:modelValue":d[1]||(d[1]=h=>i.value.password=h),type:"password",label:o.unref(r)("passwordLabel"),errors:o.unref(s).password.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"])]),_:1},8,["submitBtnText","isLoading"])]))}});const x11=R1(y11,[["__scopeId","data-v-f0930bcf"]]),b11={class:"pga-checkbox"},C11=["textContent"],M11=o.defineComponent({__name:"PgaCheckbox",props:o.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(a,r)=>(o.openBlock(),o.createElementBlock("label",b11,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>t.value=n),type:"checkbox"},null,512),[[o.vModelCheckbox,t.value]]),a.label?(o.openBlock(),o.createElementBlock("span",{key:0,class:"checkbox--label",textContent:o.toDisplayString(a.label)},null,8,C11)):o.createCommentVNode("",!0)]))}});const z11=R1(M11,[["__scopeId","data-v-89f11c66"]]),w11={class:"colors-container"},_11=o.defineComponent({__name:"PgaColorSelector",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(n=>({"1d17ba59":o.unref(a).input.padding,ff76be42:o.unref(a).input.borderColor,bdc1aad4:o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=$e();function r(n){var c;return((c=t.value)==null?void 0:c.toLowerCase())===n.toLowerCase()}return(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createElementVNode("div",w11,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(Lp),i=>(o.openBlock(),o.createBlock(L2,{key:i,variant:r(i)?"outlined":"flat",color:r(i)?"primary":"first",disabled:n.disabled,onClick:s=>t.value=i},{default:o.withCtx(()=>[o.createVNode(Jg,{color:i},null,8,["color"])]),_:2},1032,["variant","color","disabled","onClick"]))),128))])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const k11=R1(_11,[["__scopeId","data-v-76761025"]]);function Y1(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function z2(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function J3(e,t){const a=Y1(e);return isNaN(t)?z2(e,NaN):(t&&a.setDate(a.getDate()+t),a)}function f4(e,t){const a=Y1(e);if(isNaN(t))return z2(e,NaN);if(!t)return a;const r=a.getDate(),n=z2(e,a.getTime());n.setMonth(a.getMonth()+t+1,0);const c=n.getDate();return r>=c?n:(a.setFullYear(n.getFullYear(),n.getMonth(),r),a)}function Ex(e,t){const{years:a=0,months:r=0,weeks:n=0,days:c=0,hours:i=0,minutes:s=0,seconds:l=0}=t,f=Y1(e),u=r||a?f4(f,r+a*12):f,d=c||n?J3(u,c+n*7):u,h=s+i*60,v=(l+h*60)*1e3;return z2(e,d.getTime()+v)}function H11(e,t){const a=+Y1(e);return z2(e,a+t)}const Nx=6048e5,V11=864e5,L11=6e4,Dx=36e5,S11=1e3;function A11(e,t){return H11(e,t*Dx)}let T11={};function g6(){return T11}function y4(e,t){var s,l,f,u;const a=g6(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??a.weekStartsOn??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.weekStartsOn)??0,n=Y1(e),c=n.getDay(),i=(c<r?7:0)+c-r;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function ra(e){return y4(e,{weekStartsOn:1})}function Ox(e){const t=Y1(e),a=t.getFullYear(),r=z2(e,0);r.setFullYear(a+1,0,4),r.setHours(0,0,0,0);const n=ra(r),c=z2(e,0);c.setFullYear(a,0,4),c.setHours(0,0,0,0);const i=ra(c);return t.getTime()>=n.getTime()?a+1:t.getTime()>=i.getTime()?a:a-1}function jh(e){const t=Y1(e);return t.setHours(0,0,0,0),t}function Ic(e){const t=Y1(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function Px(e,t){const a=jh(e),r=jh(t),n=+a-Ic(a),c=+r-Ic(r);return Math.round((n-c)/V11)}function E11(e){const t=Ox(e),a=z2(e,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),ra(a)}function N11(e,t){const a=t*3;return f4(e,a)}function kl(e,t){return f4(e,t*12)}function Bx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gr(e){if(!Bx(e)&&typeof e!="number")return!1;const t=Y1(e);return!isNaN(Number(t))}function Yh(e){const t=Y1(e);return Math.trunc(t.getMonth()/3)+1}function Fx(e,t){const a=Y1(e.start),r=Y1(e.end);let n=+a>+r;const c=n?+a:+r,i=n?r:a;i.setHours(0,0,0,0);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const l=[];for(;+i<=c;)l.push(Y1(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function $0(e){const t=Y1(e),a=t.getMonth(),r=a-a%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function D11(e,t){const a=Y1(e.start),r=Y1(e.end);let n=+a>+r;const c=n?+$0(a):+$0(r);let i=$0(n?r:a),s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const l=[];for(;+i<=c;)l.push(Y1(i)),i=N11(i,s);return n?l.reverse():l}function Rx(e){const t=Y1(e),a=t.getFullYear();return t.setFullYear(a+1,0,0),t.setHours(23,59,59,999),t}function Hl(e){const t=Y1(e),a=z2(e,0);return a.setFullYear(t.getFullYear(),0,1),a.setHours(0,0,0,0),a}function Ix(e,t){var s,l,f,u;const a=g6(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??a.weekStartsOn??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.weekStartsOn)??0,n=Y1(e),c=n.getDay(),i=(c<r?-7:0)+6-(c-r);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}function Gh(e){const t=Y1(e),a=t.getMonth(),r=a-a%3+3;return t.setMonth(r,0),t.setHours(23,59,59,999),t}const O11={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},P11=(e,t,a)=>{let r;const n=O11[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+r:r+" ago":r};function ts(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const B11={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},F11={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},R11={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},I11={date:ts({formats:B11,defaultWidth:"full"}),time:ts({formats:F11,defaultWidth:"full"}),dateTime:ts({formats:R11,defaultWidth:"full"})},$11={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},U11=(e,t,a,r)=>$11[e];function Fa(e){return(t,a)=>{const r=a!=null&&a.context?String(a.context):"standalone";let n;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=a!=null&&a.width?String(a.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=a!=null&&a.width?String(a.width):e.defaultWidth;n=e.values[s]||e.values[i]}const c=e.argumentCallback?e.argumentCallback(t):t;return n[c]}}const W11={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},q11={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},j11={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Y11={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},G11={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},X11={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},K11=(e,t)=>{const a=Number(e),r=a%100;if(r>20||r<10)switch(r%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},Z11={ordinalNumber:K11,era:Fa({values:W11,defaultWidth:"wide"}),quarter:Fa({values:q11,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fa({values:j11,defaultWidth:"wide"}),day:Fa({values:Y11,defaultWidth:"wide"}),dayPeriod:Fa({values:G11,defaultWidth:"wide",formattingValues:X11,defaultFormattingWidth:"wide"})};function Ra(e){return(t,a={})=>{const r=a.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],c=t.match(n);if(!c)return null;const i=c[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?J11(s,d=>d.test(i)):Q11(s,d=>d.test(i));let f;f=e.valueCallback?e.valueCallback(l):l,f=a.valueCallback?a.valueCallback(f):f;const u=t.slice(i.length);return{value:f,rest:u}}}function Q11(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function J11(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function e21(e){return(t,a={})=>{const r=t.match(e.matchPattern);if(!r)return null;const n=r[0],c=t.match(e.parsePattern);if(!c)return null;let i=e.valueCallback?e.valueCallback(c[0]):c[0];i=a.valueCallback?a.valueCallback(i):i;const s=t.slice(n.length);return{value:i,rest:s}}}const t21=/^(\d+)(th|st|nd|rd)?/i,a21=/\d+/i,r21={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},n21={any:[/^b/i,/^(a|c)/i]},c21={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},i21={any:[/1/i,/2/i,/3/i,/4/i]},s21={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},o21={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},l21={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},f21={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},u21={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},d21={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},h21={ordinalNumber:e21({matchPattern:t21,parsePattern:a21,valueCallback:e=>parseInt(e,10)}),era:Ra({matchPatterns:r21,defaultMatchWidth:"wide",parsePatterns:n21,defaultParseWidth:"any"}),quarter:Ra({matchPatterns:c21,defaultMatchWidth:"wide",parsePatterns:i21,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ra({matchPatterns:s21,defaultMatchWidth:"wide",parsePatterns:o21,defaultParseWidth:"any"}),day:Ra({matchPatterns:l21,defaultMatchWidth:"wide",parsePatterns:f21,defaultParseWidth:"any"}),dayPeriod:Ra({matchPatterns:u21,defaultMatchWidth:"any",parsePatterns:d21,defaultParseWidth:"any"})},$x={code:"en-US",formatDistance:P11,formatLong:I11,formatRelative:U11,localize:Z11,match:h21,options:{weekStartsOn:0,firstWeekContainsDate:1}};function m21(e){const t=Y1(e);return Px(t,Hl(t))+1}function Vl(e){const t=Y1(e),a=+ra(t)-+E11(t);return Math.round(a/Nx)+1}function Ll(e,t){var u,d,h,m;const a=Y1(e),r=a.getFullYear(),n=g6(),c=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=z2(e,0);i.setFullYear(r+1,0,c),i.setHours(0,0,0,0);const s=y4(i,t),l=z2(e,0);l.setFullYear(r,0,c),l.setHours(0,0,0,0);const f=y4(l,t);return a.getTime()>=s.getTime()?r+1:a.getTime()>=f.getTime()?r:r-1}function p21(e,t){var s,l,f,u;const a=g6(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??a.firstWeekContainsDate??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.firstWeekContainsDate)??1,n=Ll(e,t),c=z2(e,0);return c.setFullYear(n,0,r),c.setHours(0,0,0,0),y4(c,t)}function Sl(e,t){const a=Y1(e),r=+y4(a,t)-+p21(a,t);return Math.round(r/Nx)+1}function H2(e,t){const a=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return a+r}const Nt={y(e,t){const a=e.getFullYear(),r=a>0?a:1-a;return H2(t==="yy"?r%100:r,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):H2(a+1,2)},d(e,t){return H2(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return H2(e.getHours()%12||12,t.length)},H(e,t){return H2(e.getHours(),t.length)},m(e,t){return H2(e.getMinutes(),t.length)},s(e,t){return H2(e.getSeconds(),t.length)},S(e,t){const a=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,a-3));return H2(n,t.length)}},V6={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xh={G:function(e,t,a){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const r=e.getFullYear(),n=r>0?r:1-r;return a.ordinalNumber(n,{unit:"year"})}return Nt.y(e,t)},Y:function(e,t,a,r){const n=Ll(e,r),c=n>0?n:1-n;if(t==="YY"){const i=c%100;return H2(i,2)}return t==="Yo"?a.ordinalNumber(c,{unit:"year"}):H2(c,t.length)},R:function(e,t){const a=Ox(e);return H2(a,t.length)},u:function(e,t){const a=e.getFullYear();return H2(a,t.length)},Q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return H2(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return H2(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,a){const r=e.getMonth();switch(t){case"M":case"MM":return Nt.M(e,t);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,a){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return H2(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,a,r){const n=Sl(e,r);return t==="wo"?a.ordinalNumber(n,{unit:"week"}):H2(n,t.length)},I:function(e,t,a){const r=Vl(e);return t==="Io"?a.ordinalNumber(r,{unit:"week"}):H2(r,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):Nt.d(e,t)},D:function(e,t,a){const r=m21(e);return t==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):H2(r,t.length)},E:function(e,t,a){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,a,r){const n=e.getDay(),c=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return H2(c,2);case"eo":return a.ordinalNumber(c,{unit:"day"});case"eee":return a.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(n,{width:"short",context:"formatting"});case"eeee":default:return a.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,a,r){const n=e.getDay(),c=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return H2(c,t.length);case"co":return a.ordinalNumber(c,{unit:"day"});case"ccc":return a.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(n,{width:"narrow",context:"standalone"});case"cccccc":return a.day(n,{width:"short",context:"standalone"});case"cccc":default:return a.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,a){const r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return H2(n,t.length);case"io":return a.ordinalNumber(n,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,a){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,a){const r=e.getHours();let n;switch(r===12?n=V6.noon:r===0?n=V6.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,a){const r=e.getHours();let n;switch(r>=17?n=V6.evening:r>=12?n=V6.afternoon:r>=4?n=V6.morning:n=V6.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return Nt.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):Nt.H(e,t)},K:function(e,t,a){const r=e.getHours()%12;return t==="Ko"?a.ordinalNumber(r,{unit:"hour"}):H2(r,t.length)},k:function(e,t,a){let r=e.getHours();return r===0&&(r=24),t==="ko"?a.ordinalNumber(r,{unit:"hour"}):H2(r,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):Nt.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):Nt.s(e,t)},S:function(e,t){return Nt.S(e,t)},X:function(e,t,a){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Zh(r);case"XXXX":case"XX":return D0(r);case"XXXXX":case"XXX":default:return D0(r,":")}},x:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"x":return Zh(r);case"xxxx":case"xx":return D0(r);case"xxxxx":case"xxx":default:return D0(r,":")}},O:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Kh(r,":");case"OOOO":default:return"GMT"+D0(r,":")}},z:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Kh(r,":");case"zzzz":default:return"GMT"+D0(r,":")}},t:function(e,t,a){const r=Math.trunc(e.getTime()/1e3);return H2(r,t.length)},T:function(e,t,a){const r=e.getTime();return H2(r,t.length)}};function Kh(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),c=r%60;return c===0?a+String(n):a+String(n)+t+H2(c,2)}function Zh(e,t){return e%60===0?(e>0?"-":"+")+H2(Math.abs(e)/60,2):D0(e,t)}function D0(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=H2(Math.trunc(r/60),2),c=H2(r%60,2);return a+n+t+c}const Qh=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ux=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},v21=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],r=a[1],n=a[2];if(!n)return Qh(e,t);let c;switch(r){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Qh(r,t)).replace("{{time}}",Ux(n,t))},T7={p:Ux,P:v21},g21=/^D+$/,y21=/^Y+$/,x21=["D","DD","YY","YYYY"];function Wx(e){return g21.test(e)}function qx(e){return y21.test(e)}function E7(e,t,a){const r=b21(e,t,a);if(console.warn(r),x21.includes(e))throw new RangeError(r)}function b21(e,t,a){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const C21=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,M21=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,z21=/^'([^]*?)'?$/,w21=/''/g,_21=/[a-zA-Z]/;function B4(e,t,a){var u,d,h,m,v,p,g,y;const r=g6(),n=(a==null?void 0:a.locale)??r.locale??$x,c=(a==null?void 0:a.firstWeekContainsDate)??((d=(u=a==null?void 0:a.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=(a==null?void 0:a.weekStartsOn)??((p=(v=a==null?void 0:a.locale)==null?void 0:v.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((y=(g=r.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=Y1(e);if(!gr(s))throw new RangeError("Invalid time value");let l=t.match(M21).map(x=>{const C=x[0];if(C==="p"||C==="P"){const b=T7[C];return b(x,n.formatLong)}return x}).join("").match(C21).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const C=x[0];if(C==="'")return{isToken:!1,value:k21(x)};if(Xh[C])return{isToken:!0,value:x};if(C.match(_21))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:x}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));const f={firstWeekContainsDate:c,weekStartsOn:i,locale:n};return l.map(x=>{if(!x.isToken)return x.value;const C=x.value;(!(a!=null&&a.useAdditionalWeekYearTokens)&&qx(C)||!(a!=null&&a.useAdditionalDayOfYearTokens)&&Wx(C))&&E7(C,t,String(e));const b=Xh[C[0]];return b(s,C,n.localize,f)}).join("")}function k21(e){const t=e.match(z21);return t?t[1].replace(w21,"'"):e}function H21(e){return Y1(e).getDay()}function V21(e){const t=Y1(e),a=t.getFullYear(),r=t.getMonth(),n=z2(e,0);return n.setFullYear(a,r+1,0),n.setHours(0,0,0,0),n.getDate()}function L21(){return Object.assign({},g6())}function wt(e){return Y1(e).getHours()}function S21(e){let a=Y1(e).getDay();return a===0&&(a=7),a}function h0(e){return Y1(e).getMinutes()}function o2(e){return Y1(e).getMonth()}function na(e){return Y1(e).getSeconds()}function n2(e){return Y1(e).getFullYear()}function ca(e,t){const a=Y1(e),r=Y1(t);return a.getTime()>r.getTime()}function tn(e,t){const a=Y1(e),r=Y1(t);return+a<+r}function B6(e,t){const a=Y1(e),r=Y1(t);return+a==+r}function A21(e,t){const a=t instanceof Date?z2(t,0):new t(0);return a.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),a.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),a}const T21=10;class jx{constructor(){v1(this,"subPriority",0)}validate(t,a){return!0}}class E21 extends jx{constructor(t,a,r,n,c){super(),this.value=t,this.validateValue=a,this.setValue=r,this.priority=n,c&&(this.subPriority=c)}validate(t,a){return this.validateValue(t,this.value,a)}set(t,a,r){return this.setValue(t,a,this.value,r)}}class N21 extends jx{constructor(){super(...arguments);v1(this,"priority",T21);v1(this,"subPriority",-1)}set(a,r){return r.timestampIsSet?a:z2(a,A21(a,Date))}}class w2{run(t,a,r,n){const c=this.parse(t,a,r,n);return c?{setter:new E21(c.value,this.validate,this.set,this.priority,this.subPriority),rest:c.rest}:null}validate(t,a,r){return!0}}class D21 extends w2{constructor(){super(...arguments);v1(this,"priority",140);v1(this,"incompatibleTokens",["R","u","t","T"])}parse(a,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})||n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"})}}set(a,r,n){return r.era=n,a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}const ve={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},L4={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ge(e,t){return e&&{value:t(e.value),rest:e.rest}}function ae(e,t){const a=t.match(e);return a?{value:parseInt(a[0],10),rest:t.slice(a[0].length)}:null}function S4(e,t){const a=t.match(e);if(!a)return null;if(a[0]==="Z")return{value:0,rest:t.slice(1)};const r=a[1]==="+"?1:-1,n=a[2]?parseInt(a[2],10):0,c=a[3]?parseInt(a[3],10):0,i=a[5]?parseInt(a[5],10):0;return{value:r*(n*Dx+c*L11+i*S11),rest:t.slice(a[0].length)}}function Yx(e){return ae(ve.anyDigitsSigned,e)}function oe(e,t){switch(e){case 1:return ae(ve.singleDigit,t);case 2:return ae(ve.twoDigits,t);case 3:return ae(ve.threeDigits,t);case 4:return ae(ve.fourDigits,t);default:return ae(new RegExp("^\\d{1,"+e+"}"),t)}}function $c(e,t){switch(e){case 1:return ae(ve.singleDigitSigned,t);case 2:return ae(ve.twoDigitsSigned,t);case 3:return ae(ve.threeDigitsSigned,t);case 4:return ae(ve.fourDigitsSigned,t);default:return ae(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Al(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Gx(e,t){const a=t>0,r=a?t:1-t;let n;if(r<=50)n=e||100;else{const c=r+50,i=Math.trunc(c/100)*100,s=e>=c%100;n=e+i-(s?100:0)}return a?n:1-n}function Xx(e){return e%400===0||e%4===0&&e%100!==0}class O21 extends w2{constructor(){super(...arguments);v1(this,"priority",130);v1(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(a,r,n){const c=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return ge(oe(4,a),c);case"yo":return ge(n.ordinalNumber(a,{unit:"year"}),c);default:return ge(oe(r.length,a),c)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n){const c=a.getFullYear();if(n.isTwoDigitYear){const s=Gx(n.year,c);return a.setFullYear(s,0,1),a.setHours(0,0,0,0),a}const i=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(i,0,1),a.setHours(0,0,0,0),a}}class P21 extends w2{constructor(){super(...arguments);v1(this,"priority",130);v1(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(a,r,n){const c=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ge(oe(4,a),c);case"Yo":return ge(n.ordinalNumber(a,{unit:"year"}),c);default:return ge(oe(r.length,a),c)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n,c){const i=Ll(a,c);if(n.isTwoDigitYear){const l=Gx(n.year,i);return a.setFullYear(l,0,c.firstWeekContainsDate),a.setHours(0,0,0,0),y4(a,c)}const s=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(s,0,c.firstWeekContainsDate),a.setHours(0,0,0,0),y4(a,c)}}class B21 extends w2{constructor(){super(...arguments);v1(this,"priority",130);v1(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(a,r){return $c(r==="R"?4:r.length,a)}set(a,r,n){const c=z2(a,0);return c.setFullYear(n,0,4),c.setHours(0,0,0,0),ra(c)}}class F21 extends w2{constructor(){super(...arguments);v1(this,"priority",130);v1(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(a,r){return $c(r==="u"?4:r.length,a)}set(a,r,n){return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}class R21 extends w2{constructor(){super(...arguments);v1(this,"priority",120);v1(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"Q":case"QQ":return oe(r.length,a);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})||n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class I21 extends w2{constructor(){super(...arguments);v1(this,"priority",120);v1(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"q":case"qq":return oe(r.length,a);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})||n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class $21 extends w2{constructor(){super(...arguments);v1(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);v1(this,"priority",110)}parse(a,r,n){const c=i=>i-1;switch(r){case"M":return ge(ae(ve.month,a),c);case"MM":return ge(oe(2,a),c);case"Mo":return ge(n.ordinalNumber(a,{unit:"month"}),c);case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})||n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}class U21 extends w2{constructor(){super(...arguments);v1(this,"priority",110);v1(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(a,r,n){const c=i=>i-1;switch(r){case"L":return ge(ae(ve.month,a),c);case"LL":return ge(oe(2,a),c);case"Lo":return ge(n.ordinalNumber(a,{unit:"month"}),c);case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})||n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}function W21(e,t,a){const r=Y1(e),n=Sl(r,a)-t;return r.setDate(r.getDate()-n*7),r}class q21 extends w2{constructor(){super(...arguments);v1(this,"priority",100);v1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(a,r,n){switch(r){case"w":return ae(ve.week,a);case"wo":return n.ordinalNumber(a,{unit:"week"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n,c){return y4(W21(a,n,c),c)}}function j21(e,t){const a=Y1(e),r=Vl(a)-t;return a.setDate(a.getDate()-r*7),a}class Y21 extends w2{constructor(){super(...arguments);v1(this,"priority",100);v1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(a,r,n){switch(r){case"I":return ae(ve.week,a);case"Io":return n.ordinalNumber(a,{unit:"week"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n){return ra(j21(a,n))}}const G21=[31,28,31,30,31,30,31,31,30,31,30,31],X21=[31,29,31,30,31,30,31,31,30,31,30,31];class K21 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"subPriority",1);v1(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"d":return ae(ve.date,a);case"do":return n.ordinalNumber(a,{unit:"date"});default:return oe(r.length,a)}}validate(a,r){const n=a.getFullYear(),c=Xx(n),i=a.getMonth();return c?r>=1&&r<=X21[i]:r>=1&&r<=G21[i]}set(a,r,n){return a.setDate(n),a.setHours(0,0,0,0),a}}class Z21 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"subpriority",1);v1(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(a,r,n){switch(r){case"D":case"DD":return ae(ve.dayOfYear,a);case"Do":return n.ordinalNumber(a,{unit:"date"});default:return oe(r.length,a)}}validate(a,r){const n=a.getFullYear();return Xx(n)?r>=1&&r<=366:r>=1&&r<=365}set(a,r,n){return a.setMonth(0,n),a.setHours(0,0,0,0),a}}function Tl(e,t,a){var d,h,m,v;const r=g6(),n=(a==null?void 0:a.weekStartsOn)??((h=(d=a==null?void 0:a.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((v=(m=r.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,c=Y1(e),i=c.getDay(),l=(t%7+7)%7,f=7-n,u=t<0||t>6?t-(i+f)%7:(l+f)%7-(i+f)%7;return J3(c,u)}class Q21 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Tl(a,n,c),a.setHours(0,0,0,0),a}}class J21 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(a,r,n,c){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+c.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ge(oe(r.length,a),i);case"eo":return ge(n.ordinalNumber(a,{unit:"day"}),i);case"eee":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Tl(a,n,c),a.setHours(0,0,0,0),a}}class ee1 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(a,r,n,c){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+c.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ge(oe(r.length,a),i);case"co":return ge(n.ordinalNumber(a,{unit:"day"}),i);case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})||n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Tl(a,n,c),a.setHours(0,0,0,0),a}}function te1(e,t){const a=Y1(e),r=S21(a),n=t-r;return J3(a,n)}class ae1 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(a,r,n){const c=i=>i===0?7:i;switch(r){case"i":case"ii":return oe(r.length,a);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return ge(n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c);case"iiiii":return ge(n.day(a,{width:"narrow",context:"formatting"}),c);case"iiiiii":return ge(n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c);case"iiii":default:return ge(n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c)}}validate(a,r){return r>=1&&r<=7}set(a,r,n){return a=te1(a,n),a.setHours(0,0,0,0),a}}class re1 extends w2{constructor(){super(...arguments);v1(this,"priority",80);v1(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(a,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Al(n),0,0,0),a}}class ne1 extends w2{constructor(){super(...arguments);v1(this,"priority",80);v1(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(a,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Al(n),0,0,0),a}}class ce1 extends w2{constructor(){super(...arguments);v1(this,"priority",80);v1(this,"incompatibleTokens",["a","b","t","T"])}parse(a,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Al(n),0,0,0),a}}class ie1 extends w2{constructor(){super(...arguments);v1(this,"priority",70);v1(this,"incompatibleTokens",["H","K","k","t","T"])}parse(a,r,n){switch(r){case"h":return ae(ve.hour12h,a);case"ho":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=12}set(a,r,n){const c=a.getHours()>=12;return c&&n<12?a.setHours(n+12,0,0,0):!c&&n===12?a.setHours(0,0,0,0):a.setHours(n,0,0,0),a}}class se1 extends w2{constructor(){super(...arguments);v1(this,"priority",70);v1(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(a,r,n){switch(r){case"H":return ae(ve.hour23h,a);case"Ho":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=23}set(a,r,n){return a.setHours(n,0,0,0),a}}class oe1 extends w2{constructor(){super(...arguments);v1(this,"priority",70);v1(this,"incompatibleTokens",["h","H","k","t","T"])}parse(a,r,n){switch(r){case"K":return ae(ve.hour11h,a);case"Ko":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.getHours()>=12&&n<12?a.setHours(n+12,0,0,0):a.setHours(n,0,0,0),a}}class le1 extends w2{constructor(){super(...arguments);v1(this,"priority",70);v1(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(a,r,n){switch(r){case"k":return ae(ve.hour24h,a);case"ko":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=24}set(a,r,n){const c=n<=24?n%24:n;return a.setHours(c,0,0,0),a}}class fe1 extends w2{constructor(){super(...arguments);v1(this,"priority",60);v1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"m":return ae(ve.minute,a);case"mo":return n.ordinalNumber(a,{unit:"minute"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setMinutes(n,0,0),a}}class ue1 extends w2{constructor(){super(...arguments);v1(this,"priority",50);v1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"s":return ae(ve.second,a);case"so":return n.ordinalNumber(a,{unit:"second"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setSeconds(n,0),a}}class de1 extends w2{constructor(){super(...arguments);v1(this,"priority",30);v1(this,"incompatibleTokens",["t","T"])}parse(a,r){const n=c=>Math.trunc(c*Math.pow(10,-r.length+3));return ge(oe(r.length,a),n)}set(a,r,n){return a.setMilliseconds(n),a}}class he1 extends w2{constructor(){super(...arguments);v1(this,"priority",10);v1(this,"incompatibleTokens",["t","T","x"])}parse(a,r){switch(r){case"X":return S4(L4.basicOptionalMinutes,a);case"XX":return S4(L4.basic,a);case"XXXX":return S4(L4.basicOptionalSeconds,a);case"XXXXX":return S4(L4.extendedOptionalSeconds,a);case"XXX":default:return S4(L4.extended,a)}}set(a,r,n){return r.timestampIsSet?a:z2(a,a.getTime()-Ic(a)-n)}}class me1 extends w2{constructor(){super(...arguments);v1(this,"priority",10);v1(this,"incompatibleTokens",["t","T","X"])}parse(a,r){switch(r){case"x":return S4(L4.basicOptionalMinutes,a);case"xx":return S4(L4.basic,a);case"xxxx":return S4(L4.basicOptionalSeconds,a);case"xxxxx":return S4(L4.extendedOptionalSeconds,a);case"xxx":default:return S4(L4.extended,a)}}set(a,r,n){return r.timestampIsSet?a:z2(a,a.getTime()-Ic(a)-n)}}class pe1 extends w2{constructor(){super(...arguments);v1(this,"priority",40);v1(this,"incompatibleTokens","*")}parse(a){return Yx(a)}set(a,r,n){return[z2(a,n*1e3),{timestampIsSet:!0}]}}class ve1 extends w2{constructor(){super(...arguments);v1(this,"priority",20);v1(this,"incompatibleTokens","*")}parse(a){return Yx(a)}set(a,r,n){return[z2(a,n),{timestampIsSet:!0}]}}const ge1={G:new D21,y:new O21,Y:new P21,R:new B21,u:new F21,Q:new R21,q:new I21,M:new $21,L:new U21,w:new q21,I:new Y21,d:new K21,D:new Z21,E:new Q21,e:new J21,c:new ee1,i:new ae1,a:new re1,b:new ne1,B:new ce1,h:new ie1,H:new se1,K:new oe1,k:new le1,m:new fe1,s:new ue1,S:new de1,X:new he1,x:new me1,t:new pe1,T:new ve1},ye1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xe1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,be1=/^'([^]*?)'?$/,Ce1=/''/g,Me1=/\S/,ze1=/[a-zA-Z]/;function N7(e,t,a,r){var p,g,y,x,C,b,M,w;const n=L21(),c=(r==null?void 0:r.locale)??n.locale??$x,i=(r==null?void 0:r.firstWeekContainsDate)??((g=(p=r==null?void 0:r.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??n.firstWeekContainsDate??((x=(y=n.locale)==null?void 0:y.options)==null?void 0:x.firstWeekContainsDate)??1,s=(r==null?void 0:r.weekStartsOn)??((b=(C=r==null?void 0:r.locale)==null?void 0:C.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((w=(M=n.locale)==null?void 0:M.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?Y1(a):z2(a,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:c},f=[new N21],u=t.match(xe1).map(z=>{const H=z[0];if(H in T7){const A=T7[H];return A(z,c.formatLong)}return z}).join("").match(ye1),d=[];for(let z of u){!(r!=null&&r.useAdditionalWeekYearTokens)&&qx(z)&&E7(z,t,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Wx(z)&&E7(z,t,e);const H=z[0],A=ge1[H];if(A){const{incompatibleTokens:V}=A;if(Array.isArray(V)){const _=d.find(N=>V.includes(N.token)||N.token===H);if(_)throw new RangeError(`The format string mustn't contain \`${_.fullToken}\` and \`${z}\` at the same time`)}else if(A.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${z}\` and any other token at the same time`);d.push({token:H,fullToken:z});const k=A.run(e,z,c.match,l);if(!k)return z2(a,NaN);f.push(k.setter),e=k.rest}else{if(H.match(ze1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+H+"`");if(z==="''"?z="'":H==="'"&&(z=we1(z)),e.indexOf(z)===0)e=e.slice(z.length);else return z2(a,NaN)}}if(e.length>0&&Me1.test(e))return z2(a,NaN);const h=f.map(z=>z.priority).sort((z,H)=>H-z).filter((z,H,A)=>A.indexOf(z)===H).map(z=>f.filter(H=>H.priority===z).sort((H,A)=>A.subPriority-H.subPriority)).map(z=>z[0]);let m=Y1(a);if(isNaN(m.getTime()))return z2(a,NaN);const v={};for(const z of h){if(!z.validate(m,l))return z2(a,NaN);const H=z.set(m,v,l);Array.isArray(H)?(m=H[0],Object.assign(v,H[1])):m=H}return z2(a,m)}function we1(e){return e.match(be1)[1].replace(Ce1,"'")}function Jh(e,t){const a=$0(e),r=$0(t);return+a==+r}function _e1(e,t){return J3(e,-t)}function Kx(e,t){const a=Y1(e),r=a.getFullYear(),n=a.getDate(),c=z2(e,0);c.setFullYear(r,t,15),c.setHours(0,0,0,0);const i=V21(c);return a.setMonth(t,Math.min(n,i)),a}function N2(e,t){let a=Y1(e);return isNaN(+a)?z2(e,NaN):(t.year!=null&&a.setFullYear(t.year),t.month!=null&&(a=Kx(a,t.month)),t.date!=null&&a.setDate(t.date),t.hours!=null&&a.setHours(t.hours),t.minutes!=null&&a.setMinutes(t.minutes),t.seconds!=null&&a.setSeconds(t.seconds),t.milliseconds!=null&&a.setMilliseconds(t.milliseconds),a)}function Zx(e,t){const a=Y1(e);return a.setHours(t),a}function El(e,t){const a=Y1(e);return a.setMilliseconds(t),a}function Qx(e,t){const a=Y1(e);return a.setMinutes(t),a}function Nl(e,t){const a=Y1(e);return a.setSeconds(t),a}function N4(e,t){const a=Y1(e);return isNaN(+a)?z2(e,NaN):(a.setFullYear(t),a)}function ia(e,t){return f4(e,-t)}function ke1(e,t){const{years:a=0,months:r=0,weeks:n=0,days:c=0,hours:i=0,minutes:s=0,seconds:l=0}=t,f=ia(e,r+a*12),u=_e1(f,c+n*7),d=s+i*60,m=(l+d*60)*1e3;return z2(e,u.getTime()-m)}function Jx(e,t){return kl(e,-t)}function va(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),o.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}va.compatConfig={MODE:3};function eb(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),o.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}eb.compatConfig={MODE:3};function Dl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Dl.compatConfig={MODE:3};function Ol(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}Ol.compatConfig={MODE:3};function Pl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),o.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}Pl.compatConfig={MODE:3};function Bl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Bl.compatConfig={MODE:3};function Fl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Fl.compatConfig={MODE:3};const F4=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),tb=(e,t)=>D7(e,t)||A1(),He1=(e,t)=>t.dateInTz?F4(new Date(e),t.dateInTz):A1(e),D7=(e,t)=>{if(!e)return null;if(!t)return A1(e);const a=A1(e);return t.exactMatch?He1(e,t):F4(a,t.timezone)},Ve1=e=>{if(!e)return 0;const t=new Date,a=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),r=new Date(t.toLocaleString("en-US",{timeZone:e})),n=r.getTimezoneOffset()/60;return(+a-+r)/(1e3*60*60)-n};var X3=(e=>(e.month="month",e.year="year",e))(X3||{}),O0=(e=>(e.top="top",e.bottom="bottom",e))(O0||{}),G0=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(G0||{}),Ye=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(Ye||{});const Le1=["timestamp","date","iso"];var c3=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(c3||{}),te=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))(te||{});function em(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function Se1(e){return t=>B4(new Date(`2017-01-0${t}T00:00:00+00:00`),"EEEEEE",{locale:e})}const Ae1=(e,t,a)=>{const r=[1,2,3,4,5,6,7];let n;if(e!==null)try{n=r.map(Se1(e))}catch{n=r.map(em(t))}else n=r.map(em(t));const c=n.slice(0,a),i=n.slice(a+1,n.length);return[n[a]].concat(...i).concat(...c)},Rl=(e,t,a)=>{const r=[];for(let n=+e[0];n<=+e[1];n++)r.push({value:+n,text:cb(n,t)});return a?r.reverse():r},ab=(e,t,a)=>{const r=[1,2,3,4,5,6,7,8,9,10,11,12].map(c=>{const i=c<10?`0${c}`:c;return new Date(`2017-${i}-01T00:00:00+00:00`)});if(e!==null)try{const c=a==="long"?"MMMM":"MMM";return r.map((i,s)=>{const l=B4(F4(i,"UTC"),c,{locale:e});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:s}})}catch{}const n=new Intl.DateTimeFormat(t,{month:a,timeZone:"UTC"});return r.map((c,i)=>{const s=n.format(c);return{text:s.charAt(0).toUpperCase()+s.substring(1),value:i}})},Te1=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],ke=e=>{const t=o.unref(e);return t!=null&&t.$el?t==null?void 0:t.$el:t},Ee1=e=>({type:"dot",...e??{}}),rb=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,Il={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},Te=e=>e,tm=e=>e===0?e:!e||isNaN(+e)?null:+e,am=e=>e===null,nb=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},Ne1=e=>{const t=[],a=r=>r.filter(n=>n);for(let r=0;r<e.length;r+=3){const n=[e[r],e[r+1],e[r+2]];t.push(a(n))}return t},an=(e,t,a)=>{const r=a!=null,n=t!=null;if(!r&&!n)return!1;const c=+a,i=+t;return r&&n?+e>c||+e<i:r?+e>c:n?+e<i:!1},sa=(e,t)=>Ne1(e).map(a=>a.map(r=>{const{active:n,disabled:c,isBetween:i,highlighted:s}=t(r);return{...r,active:n,disabled:c,className:{dp__overlay_cell_active:n,dp__overlay_cell:!n,dp__overlay_cell_disabled:c,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:c&&n,dp__cell_in_between:i,"dp--highlighted":s}}})),r0=(e,t,a=!1)=>{e&&t.allowStopPropagation&&(a&&e.stopImmediatePropagation(),e.stopPropagation())},De1=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function Oe1(e,t){let a=[...document.querySelectorAll(De1())];a=a.filter(n=>!e.contains(n)||n.hasAttribute("data-datepicker-instance"));const r=a.indexOf(e);if(r>=0&&(t?r-1>=0:r+1<=a.length))return a[r+(t?-1:1)]}const Pe1=(e,t)=>e==null?void 0:e.querySelector(`[data-dp-element="${t}"]`),cb=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),$l=e=>B4(e,"dd-MM-yyyy"),as=e=>Array.isArray(e),Uc=(e,t)=>t.get($l(e)),Be1=(e,t)=>e?t?t instanceof Map?!!Uc(e,t):t(A1(e)):!1:!0,y3=(e,t,a=!1)=>{if(e.key===te.enter||e.key===te.space)return a&&e.preventDefault(),t()},rm=(e,t,a,r,n,c)=>{const i=N7(e,t.slice(0,e.length),new Date,{locale:c});return gr(i)&&Bx(i)?r||n?i:N2(i,{hours:+a.hours,minutes:+(a==null?void 0:a.minutes),seconds:+(a==null?void 0:a.seconds),milliseconds:0}):null},Fe1=(e,t,a,r,n,c)=>{const i=Array.isArray(a)?a[0]:a;if(typeof t=="string")return rm(e,t,i,r,n,c);if(Array.isArray(t)){let s=null;for(const l of t)if(s=rm(e,l,i,r,n,c),s)break;return s}return typeof t=="function"?t(e):null},A1=e=>e?new Date(e):new Date,Re1=(e,t,a)=>{if(t){const n=(e.getMonth()+1).toString().padStart(2,"0"),c=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),l=a?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${n}-${c}T${i}:${s}:${l}.000Z`}const r=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(r).toISOString()},k3=e=>{let t=A1(JSON.parse(JSON.stringify(e)));return t=Zx(t,0),t=Qx(t,0),t=Nl(t,0),t=El(t,0),t},n0=(e,t,a,r)=>{let n=e?A1(e):A1();return(t||t===0)&&(n=Zx(n,+t)),(a||a===0)&&(n=Qx(n,+a)),(r||r===0)&&(n=Nl(n,+r)),El(n,0)},ne=(e,t)=>!e||!t?!1:tn(k3(e),k3(t)),l2=(e,t)=>!e||!t?!1:B6(k3(e),k3(t)),me=(e,t)=>!e||!t?!1:ca(k3(e),k3(t)),P5=(e,t,a)=>e!=null&&e[0]&&e!=null&&e[1]?me(a,e[0])&&ne(a,e[1]):e!=null&&e[0]&&t?me(a,e[0])&&ne(a,t)||ne(a,e[0])&&me(a,t):!1,e4=e=>{const t=N2(new Date(e),{date:1});return k3(t)},rs=(e,t,a)=>t&&(a||a===0)?Object.fromEntries(["hours","minutes","seconds"].map(r=>r===t?[r,a]:[r,isNaN(+e[r])?void 0:+e[r]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},X0=e=>({hours:wt(e),minutes:h0(e),seconds:na(e)}),ib=(e,t)=>{if(t){const a=n2(A1(t));if(a>e)return 12;if(a===e)return o2(A1(t))}},sb=(e,t)=>{if(t){const a=n2(A1(t));return a<e?-1:a===e?o2(A1(t)):void 0}},oa=e=>{if(e)return n2(A1(e))},ob=(e,t)=>{const a=me(e,t)?t:e,r=me(t,e)?t:e;return Fx({start:a,end:r})},Ie1=e=>{const t=f4(e,1);return{month:o2(t),year:n2(t)}},ct=(e,t)=>{const a=y4(e,{weekStartsOn:+t}),r=Ix(e,{weekStartsOn:+t});return[a,r]},lb=(e,t)=>{const a={hours:wt(A1()),minutes:h0(A1()),seconds:t?na(A1()):0};return Object.assign(a,e)},Xt=(e,t,a)=>[N2(A1(e),{date:1}),N2(A1(),{month:t,year:a,date:1})],dt=(e,t,a)=>{let r=e?A1(e):A1();return(t||t===0)&&(r=Kx(r,t)),a&&(r=N4(r,a)),r},fb=(e,t,a,r,n)=>{if(!r||n&&!t||!n&&!a)return!1;const c=n?f4(e,1):ia(e,1),i=[o2(c),n2(c)];return n?!Ue1(...i,t):!$e1(...i,a)},$e1=(e,t,a)=>ne(...Xt(a,e,t))||l2(...Xt(a,e,t)),Ue1=(e,t,a)=>me(...Xt(a,e,t))||l2(...Xt(a,e,t)),ub=(e,t,a,r,n,c,i)=>{if(typeof t=="function"&&!i)return t(e);const s=a?{locale:a}:void 0;return Array.isArray(e)?`${B4(e[0],c,s)}${n&&!e[1]?"":r}${e[1]?B4(e[1],c,s):""}`:B4(e,c,s)},L6=e=>{if(e)return null;throw new Error(Il.prop("partial-range"))},w8=(e,t)=>{if(t)return e();throw new Error(Il.prop("range"))},O7=e=>Array.isArray(e)?gr(e[0])&&(e[1]?gr(e[1]):!0):e?gr(e):!1,We1=(e,t)=>N2(t??A1(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),ns=(e,t,a,r)=>{if(!e)return!0;if(r){const n=a==="max"?tn(e,t):ca(e,t),c={seconds:0,milliseconds:0};return n||B6(N2(e,c),N2(t,c))}return a==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},cs=(e,t,a)=>e?We1(e,t):A1(a??t),nm=(e,t,a,r,n)=>{if(Array.isArray(r)){const i=cs(e,r[0],t),s=cs(e,r[1],t);return ns(r[0],i,a,!!t)&&ns(r[1],s,a,!!t)&&n}const c=cs(e,r,t);return ns(r,c,a,!!t)&&n},is=e=>N2(A1(),X0(e)),qe1=(e,t)=>e instanceof Map?Array.from(e.values()).filter(a=>n2(A1(a))===t).map(a=>o2(a)):[],db=(e,t,a)=>typeof e=="function"?e({month:t,year:a}):!!e.months.find(r=>r.month===t&&r.year===a),Ul=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),Ia=o.reactive({menuFocused:!1,shiftKeyInMenu:!1}),hb=()=>{const e=a=>{Ia.menuFocused=a},t=a=>{Ia.shiftKeyInMenu!==a&&(Ia.shiftKeyInMenu=a)};return{control:o.computed(()=>({shiftKeyInMenu:Ia.shiftKeyInMenu,menuFocused:Ia.menuFocused})),setMenuFocused:e,setShiftKey:t}},P2=o.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),ss=o.ref(null),_8=o.ref(!1),os=o.ref(!1),ls=o.ref(!1),fs=o.ref(!1),We=o.ref(0),ue=o.ref(0),x0=()=>{const e=o.computed(()=>_8.value?[...P2.selectionGrid,P2.actionRow].filter(d=>d.length):os.value?[...P2.timePicker[0],...P2.timePicker[1],fs.value?[]:[ss.value],P2.actionRow].filter(d=>d.length):ls.value?[...P2.monthPicker,P2.actionRow]:[P2.monthYear,...P2.calendar,P2.time,P2.actionRow].filter(d=>d.length)),t=d=>{We.value=d?We.value+1:We.value-1;let h=null;e.value[ue.value]&&(h=e.value[ue.value][We.value]),!h&&e.value[ue.value+(d?1:-1)]?(ue.value=ue.value+(d?1:-1),We.value=d?0:e.value[ue.value].length-1):h||(We.value=d?We.value-1:We.value+1)},a=d=>{ue.value===0&&!d||ue.value===e.value.length&&d||(ue.value=d?ue.value+1:ue.value-1,e.value[ue.value]?e.value[ue.value]&&!e.value[ue.value][We.value]&&We.value!==0&&(We.value=e.value[ue.value].length-1):ue.value=d?ue.value-1:ue.value+1)},r=d=>{let h=null;e.value[ue.value]&&(h=e.value[ue.value][We.value]),h?h.focus({preventScroll:!_8.value}):We.value=d?We.value-1:We.value+1},n=()=>{t(!0),r(!0)},c=()=>{t(!1),r(!1)},i=()=>{a(!1),r(!0)},s=()=>{a(!0),r(!0)},l=(d,h)=>{P2[h]=d},f=(d,h)=>{P2[h]=d},u=()=>{We.value=0,ue.value=0};return{buildMatrix:l,buildMultiLevelMatrix:f,setTimePickerBackRef:d=>{ss.value=d},setSelectionGrid:d=>{_8.value=d,u(),d||(P2.selectionGrid=[])},setTimePicker:(d,h=!1)=>{os.value=d,fs.value=h,u(),d||(P2.timePicker[0]=[],P2.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{P2.timePicker[h]=d},arrowRight:n,arrowLeft:c,arrowUp:i,arrowDown:s,clearArrowNav:()=>{P2.monthYear=[],P2.calendar=[],P2.time=[],P2.actionRow=[],P2.selectionGrid=[],P2.timePicker[0]=[],P2.timePicker[1]=[],_8.value=!1,os.value=!1,fs.value=!1,ls.value=!1,u(),ss.value=null},setMonthPicker:d=>{ls.value=d,u()},refSets:P2}},cm=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),je1=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,...e??{}}),im=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,Ye1=e=>{const t=typeof e=="object"&&e,a={static:!0,solo:!1};if(!e)return{...a,count:im(!1)};const r=t?e:{},n=t?r.count??!0:e,c=im(n);return Object.assign(a,r,{count:c})},Ge1=(e,t,a)=>e||(typeof a=="string"?a:t),Xe1=e=>typeof e=="boolean"?e?cm({}):!1:cm(e),Ke1=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:!0,selectOnFocus:!1,rangeSeparator:" - "};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},Ze1=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),Qe1=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),Je1=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},e31=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,...e??{}}),t31=e=>{const t={dates:Array.isArray(e)?e.map(a=>A1(a)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},a31=e=>typeof e=="object"?{type:(e==null?void 0:e.type)??"local",hideOnOffsetDates:(e==null?void 0:e.hideOnOffsetDates)??!1}:{type:e,hideOnOffsetDates:!1},r31=(e,t)=>typeof e=="object"?{enabled:!0,...{noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1},...e}:{enabled:e,noDisabledRange:t.noDisabledRange,showLastInRange:t.showLastInRange,minMaxRawRange:t.minMaxRawRange,partialRange:t.partialRange,disableTimeRangeValidation:t.disableTimeRangeValidation,maxRange:t.maxRange,minRange:t.minRange,autoRange:t.autoRange,fixedStart:t.fixedStart,fixedEnd:t.fixedEnd},n31=(e,t)=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:t,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:t??e.emitTimezone,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:t},us=(e,t)=>new Map(e.map(a=>{const r=tb(a,t);return[$l(r),r]})),c31=(e,t)=>e.length?new Map(e.map(a=>{const r=tb(a.date,t);return[$l(r),a]})):null,i31=(e,t,a,r,n,c,i)=>({minDate:D7(e,i),maxDate:D7(t,i),disabledDates:as(a)?us(a,i):a,allowedDates:as(r)?us(r,i):null,highlight:typeof n=="object"&&as(n==null?void 0:n.dates)?us(n.dates,i):n,markers:c31(c,i)}),s31=(e,t)=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:+t}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},re=e=>{const t=()=>{const M=e.enableSeconds?":ss":"",w=e.enableMinutes?":mm":"";return e.is24?`HH${w}${M}`:`hh${w}${M} aa`},a=()=>{var M;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((M=g.value)==null?void 0:M.type)==="iso"?"RR":"ww"}-yyyy`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},r=M=>lb(M,e.enableSeconds),n=()=>b.value.enabled?e.startTime&&Array.isArray(e.startTime)?[r(e.startTime[0]),r(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?r(e.startTime):null,c=o.computed(()=>Ye1(e.multiCalendars)),i=o.computed(()=>n()),s=o.computed(()=>je1(e.ariaLabels)),l=o.computed(()=>Ze1(e.filters)),f=o.computed(()=>Xe1(e.transitions)),u=o.computed(()=>Qe1(e.actionRow)),d=o.computed(()=>Ge1(e.previewFormat,e.format,a())),h=o.computed(()=>Ke1(e.textInput)),m=o.computed(()=>Je1(e.inline)),v=o.computed(()=>e31(e.config)),p=o.computed(()=>t31(e.highlight)),g=o.computed(()=>a31(e.weekNumbers)),y=o.computed(()=>n31(e.timezone,e.emitTimezone)),x=o.computed(()=>s31(e.multiDates,e.multiDatesLimit)),C=o.computed(()=>i31(e.minDate,e.maxDate,e.disabledDates,e.allowedDates,p.value,e.markers,y.value)),b=o.computed(()=>r31(e.range,{minMaxRawRange:!1,maxRange:e.maxRange,minRange:e.minRange,noDisabledRange:e.noDisabledRange,showLastInRange:e.showLastInRange,partialRange:e.partialRange,disableTimeRangeValidation:e.disableTimeRangeValidation,autoRange:e.autoRange,fixedStart:e.fixedStart,fixedEnd:e.fixedEnd}));return{defaultedTransitions:f,defaultedMultiCalendars:c,defaultedStartTime:i,defaultedAriaLabels:s,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:m,defaultedConfig:v,defaultedHighlight:p,defaultedWeekNumbers:g,defaultedRange:b,propDates:C,defaultedTz:y,defaultedMultiDates:x,getDefaultPattern:a,getDefaultStartTime:n}},o31=(e,t,a)=>{const r=o.ref(),{defaultedTextInput:n,defaultedRange:c,defaultedTz:i,defaultedMultiDates:s,getDefaultPattern:l}=re(t),f=o.ref(""),u=o.toRef(t,"format"),d=o.toRef(t,"formatLocale");o.watch(r,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",r.value,E(!0))},{deep:!0}),o.watch(c,(I,a1)=>{I.enabled!==a1.enabled&&(r.value=null)}),o.watch(u,()=>{e1()});const h=I=>i.value.timezone&&i.value.convertModel?F4(I,i.value.timezone):I,m=I=>{if(i.value.timezone&&i.value.convertModel){const a1=Ve1(i.value.timezone);return A11(I,a1)}return I},v=(I,a1,n1=!1)=>ub(I,t.format,t.formatLocale,n.value.rangeSeparator,t.modelAuto,a1??l(),n1),p=I=>I?t.modelType?G(I):{hours:wt(I),minutes:h0(I),seconds:t.enableSeconds?na(I):0}:null,g=I=>t.modelType?G(I):{month:o2(I),year:n2(I)},y=I=>Array.isArray(I)?s.value.enabled?I.map(a1=>x(a1,N4(A1(),a1))):w8(()=>[N4(A1(),I[0]),I[1]?N4(A1(),I[1]):L6(c.value.partialRange)],c.value.enabled):N4(A1(),+I),x=(I,a1)=>(typeof I=="string"||typeof I=="number")&&t.modelType?Y(I):a1,C=I=>Array.isArray(I)?[x(I[0],n0(null,+I[0].hours,+I[0].minutes,I[0].seconds)),x(I[1],n0(null,+I[1].hours,+I[1].minutes,I[1].seconds))]:x(I,n0(null,I.hours,I.minutes,I.seconds)),b=I=>{const a1=N2(A1(),{date:1});return Array.isArray(I)?s.value.enabled?I.map(n1=>x(n1,dt(a1,+n1.month,+n1.year))):w8(()=>[x(I[0],dt(a1,+I[0].month,+I[0].year)),x(I[1],I[1]?dt(a1,+I[1].month,+I[1].year):L6(c.value.partialRange))],c.value.enabled):x(I,dt(a1,+I.month,+I.year))},M=I=>{if(Array.isArray(I))return I.map(a1=>Y(a1));throw new Error(Il.dateArr("multi-dates"))},w=I=>{if(Array.isArray(I)&&c.value.enabled){const a1=I[0],n1=I[1];return[A1(Array.isArray(a1)?a1[0]:null),A1(Array.isArray(n1)?n1[0]:null)]}return A1(I[0])},z=I=>t.modelAuto?Array.isArray(I)?[Y(I[0]),Y(I[1])]:t.autoApply?[Y(I)]:[Y(I),null]:Array.isArray(I)?w8(()=>I[1]?[Y(I[0]),I[1]?Y(I[1]):L6(c.value.partialRange)]:[Y(I[0])],c.value.enabled):Y(I),H=()=>{Array.isArray(r.value)&&c.value.enabled&&r.value.length===1&&r.value.push(L6(c.value.partialRange))},A=()=>{const I=r.value;return[G(I[0]),I[1]?G(I[1]):L6(c.value.partialRange)]},V=()=>r.value[1]?A():G(Te(r.value[0])),k=()=>(r.value||[]).map(I=>G(I)),_=(I=!1)=>(I||H(),t.modelAuto?V():s.value.enabled?k():Array.isArray(r.value)?w8(()=>A(),c.value.enabled):G(Te(r.value))),N=I=>!I||Array.isArray(I)&&!I.length?null:t.timePicker?C(Te(I)):t.monthPicker?b(Te(I)):t.yearPicker?y(Te(I)):s.value.enabled?M(Te(I)):t.weekPicker?w(Te(I)):z(Te(I)),q=I=>{const a1=N(I);O7(Te(a1))?(r.value=Te(a1),e1()):(r.value=null,f.value="")},S=()=>{const I=a1=>B4(a1,n.value.format);return`${I(r.value[0])} ${n.value.rangeSeparator} ${r.value[1]?I(r.value[1]):""}`},B=()=>a.value&&r.value?Array.isArray(r.value)?S():B4(r.value,n.value.format):v(r.value),F=()=>r.value?s.value.enabled?r.value.map(I=>v(I)).join("; "):n.value.enabled&&typeof n.value.format=="string"?B():v(r.value):"",e1=()=>{!t.format||typeof t.format=="string"||n.value.enabled&&typeof n.value.format=="string"?f.value=F():f.value=t.format(r.value)},Y=I=>{if(t.utc){const a1=new Date(I);return t.utc==="preserve"?new Date(a1.getTime()+a1.getTimezoneOffset()*6e4):a1}return t.modelType?Le1.includes(t.modelType)?h(new Date(I)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?h(N7(I,l(),new Date,{locale:d.value})):h(N7(I,t.modelType,new Date,{locale:d.value})):h(new Date(I))},G=I=>I?t.utc?Re1(I,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+m(I):t.modelType==="iso"?m(I).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?v(m(I)):v(m(I),t.modelType,!0):m(I):"",O=(I,a1=!1,n1=!1)=>{if(n1)return I;if(e("update:model-value",I),i.value.emitTimezone&&a1){const t1=Array.isArray(I)?I.map(d1=>F4(Te(d1),i.value.emitTimezone)):F4(Te(I),i.value.emitTimezone);e("update:model-timezone-value",t1)}},T=I=>Array.isArray(r.value)?s.value.enabled?r.value.map(a1=>I(a1)):[I(r.value[0]),r.value[1]?I(r.value[1]):L6(c.value.partialRange)]:I(Te(r.value)),L=()=>{if(Array.isArray(r.value)){const I=ct(r.value[0],t.weekStart),a1=r.value[1]?ct(r.value[1],t.weekStart):[];return[I.map(n1=>A1(n1)),a1.map(n1=>A1(n1))]}return ct(r.value,t.weekStart).map(I=>A1(I))},W=(I,a1)=>O(Te(T(I)),!1,a1),j=I=>{const a1=L();return I?a1:e("update:model-value",L())},E=(I=!1)=>(I||e1(),t.monthPicker?W(g,I):t.timePicker?W(p,I):t.yearPicker?W(n2,I):t.weekPicker?j(I):O(_(I),!0,I));return{inputValue:f,internalModelValue:r,checkBeforeEmit:()=>r.value?c.value.enabled?c.value.partialRange?r.value.length>=1:r.value.length===2:!!r.value:!1,parseExternalModelValue:q,formatInputValue:e1,emitModelValue:E}},l31=(e,t)=>{const{defaultedFilters:a,propDates:r}=re(e),{validateMonthYearInRange:n}=b0(e),c=(u,d)=>{let h=u;return a.value.months.includes(o2(h))?(h=d?f4(u,1):ia(u,1),c(h,d)):h},i=(u,d)=>{let h=u;return a.value.years.includes(n2(h))?(h=d?kl(u,1):Jx(u,1),i(h,d)):h},s=(u,d=!1)=>{const h=N2(A1(),{month:e.month,year:e.year});let m=u?f4(h,1):ia(h,1);e.disableYearSelect&&(m=N4(m,e.year));let v=o2(m),p=n2(m);a.value.months.includes(v)&&(m=c(m,u),v=o2(m),p=n2(m)),a.value.years.includes(p)&&(m=i(m,u),p=n2(m)),n(v,p,u,e.preventMinMaxNavigation)&&l(v,p,d)},l=(u,d,h)=>{t("update-month-year",{month:u,year:d,fromNav:h})},f=o.computed(()=>u=>fb(N2(A1(),{month:e.month,year:e.year}),r.value.maxDate,r.value.minDate,e.preventMinMaxNavigation,u));return{handleMonthYearChange:s,isDisabled:f,updateMonthYear:l}};var E6=(e=>(e.center="center",e.left="left",e.right="right",e))(E6||{});const f31=({menuRef:e,menuRefInner:t,inputRef:a,pickerWrapperRef:r,inline:n,emit:c,props:i,slots:s})=>{const l=o.ref({}),f=o.ref(!1),u=o.ref({top:"0",left:"0"}),d=o.ref(!1),h=o.toRef(i,"teleportCenter");o.watch(h,()=>{u.value=JSON.parse(JSON.stringify({})),b()});const m=S=>{if(i.teleport){const B=S.getBoundingClientRect();return{left:B.left+window.scrollX,top:B.top+window.scrollY}}return{top:0,left:0}},v=(S,B)=>{u.value.left=`${S+B-l.value.width}px`},p=S=>{u.value.left=`${S}px`},g=(S,B)=>{i.position===E6.left&&p(S),i.position===E6.right&&v(S,B),i.position===E6.center&&(u.value.left=`${S+B/2-l.value.width/2}px`)},y=S=>{const{width:B,height:F}=S.getBoundingClientRect(),{top:e1,left:Y}=i.altPosition?i.altPosition(S):m(S);return{top:+e1,left:+Y,width:B,height:F}},x=()=>{u.value.left="50%",u.value.top="50%",u.value.transform="translate(-50%, -50%)",u.value.position="fixed",delete u.value.opacity},C=()=>{const S=ke(a),{top:B,left:F,transform:e1}=i.altPosition(S);u.value={top:`${B}px`,left:`${F}px`,transform:e1??""}},b=(S=!0)=>{var B;if(!n.value.enabled){if(h.value)return x();if(i.altPosition!==null)return C();if(S){const F=i.teleport?(B=t.value)==null?void 0:B.$el:e.value;F&&(l.value=F.getBoundingClientRect()),c("recalculate-position")}return k()}},M=({inputEl:S,left:B,width:F})=>{window.screen.width>768&&!f.value&&g(B,F),H(S)},w=S=>{const{top:B,left:F,height:e1,width:Y}=y(S);u.value.top=`${e1+B+ +i.offset}px`,d.value=!1,f.value||(u.value.left=`${F+Y/2-l.value.width/2}px`),M({inputEl:S,left:F,width:Y})},z=S=>{const{top:B,left:F,width:e1}=y(S);u.value.top=`${B-+i.offset-l.value.height}px`,d.value=!0,M({inputEl:S,left:F,width:e1})},H=S=>{if(i.autoPosition){const{left:B,width:F}=y(S),{left:e1,right:Y}=l.value;if(!f.value){if(Math.abs(e1)!==Math.abs(Y)){if(e1<=0)return f.value=!0,p(B);if(Y>=document.documentElement.clientWidth)return f.value=!0,v(B,F)}return g(B,F)}}},A=()=>{const S=ke(a);if(S){const{height:B}=l.value,{top:F,height:e1}=S.getBoundingClientRect(),Y=window.innerHeight-F-e1,G=F;return B<=Y?O0.bottom:B>Y&&B<=G?O0.top:Y>=G?O0.bottom:O0.top}return O0.bottom},V=S=>A()===O0.bottom?w(S):z(S),k=()=>{const S=ke(a);if(S)return i.autoPosition?V(S):w(S)},_=function(S){if(S){const B=S.scrollHeight>S.clientHeight,F=window.getComputedStyle(S).overflowY.indexOf("hidden")!==-1;return B&&!F}return!0},N=function(S){return!S||S===document.body||S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:_(S)?S:N(S.assignedSlot?S.assignedSlot.parentNode:S.parentNode)},q=S=>{if(S)switch(i.position){case E6.left:return{left:0,transform:"translateX(0)"};case E6.right:return{left:`${S.width}px`,transform:"translateX(-100%)"};default:return{left:`${S.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:d,menuStyle:u,xCorrect:f,setMenuPosition:b,getScrollableParent:N,shadowRender:(S,B)=>{var F,e1,Y;const G=document.createElement("div"),O=(F=ke(a))==null?void 0:F.getBoundingClientRect();G.setAttribute("id","dp--temp-container");const T=(e1=r.value)!=null&&e1.clientWidth?r.value:document.body;T.append(G);const L=q(O),W=o.h(S,{...B,shadow:!0,style:{opacity:0,position:"absolute",...L}},Object.fromEntries(Object.keys(s).filter(j=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(j)).map(j=>[j,s[j]])));o.render(W,G),l.value=(Y=W.el)==null?void 0:Y.getBoundingClientRect(),o.render(null,G),T.removeChild(G)}}},Dt=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]}],u31=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],d31={all:()=>Dt,monthYear:()=>Dt.filter(e=>e.use.includes("month-year")),input:()=>u31,timePicker:()=>Dt.filter(e=>e.use.includes("time")),action:()=>Dt.filter(e=>e.use.includes("action")),calendar:()=>Dt.filter(e=>e.use.includes("calendar")),menu:()=>Dt.filter(e=>e.use.includes("menu")),shared:()=>Dt.filter(e=>e.use.includes("shared")),yearMode:()=>Dt.filter(e=>e.use.includes("year-mode"))},z3=(e,t,a)=>{const r=[];return d31[t]().forEach(n=>{e[n.name]&&r.push(n.name)}),a!=null&&a.length&&a.forEach(n=>{n.slot&&r.push(n.slot)}),r},Tn=e=>{const t=o.computed(()=>r=>e.value?r?e.value.open:e.value.close:""),a=o.computed(()=>r=>e.value?r?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:a}},En=(e,t)=>{const{defaultedRange:a,defaultedTz:r}=re(e),n=A1(F4(A1(),r.value.timezone)),c=o.ref([{month:o2(n),year:n2(n)}]),i=d=>{const h={hours:wt(n),minutes:h0(n),seconds:0};return a.value.enabled?[h[d],h[d]]:h[d]},s=o.reactive({hours:i("hours"),minutes:i("minutes"),seconds:i("seconds")});o.watch(a,(d,h)=>{d.enabled!==h.enabled&&(s.hours=i("hours"),s.minutes=i("minutes"),s.seconds=i("seconds"))},{deep:!0});const l=o.computed({get:()=>e.internalModelValue,set:d=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",d)}}),f=o.computed(()=>d=>c.value[d]?c.value[d].month:0),u=o.computed(()=>d=>c.value[d]?c.value[d].year:0);return{calendars:c,time:s,modelValue:l,month:f,year:u,today:n}},h31=(e,t)=>{const{defaultedMultiCalendars:a,defaultedMultiDates:r,defaultedHighlight:n,defaultedTz:c,propDates:i,defaultedRange:s}=re(t),{isDisabled:l}=b0(t),f=o.ref(null),u=o.ref(F4(new Date,c.value.timezone)),d=L=>{!L.current&&t.hideOffsetDates||(f.value=L.value)},h=()=>{f.value=null},m=L=>Array.isArray(e.value)&&s.value.enabled&&e.value[0]&&f.value?L?me(f.value,e.value[0]):ne(f.value,e.value[0]):!0,v=(L,W)=>{const j=()=>e.value?W?e.value[0]||null:e.value[1]:null,E=e.value&&Array.isArray(e.value)?j():null;return l2(A1(L.value),E)},p=L=>{const W=Array.isArray(e.value)?e.value[0]:null;return L?!ne(f.value??null,W):!0},g=(L,W=!0)=>(s.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!L.current?!1:l2(A1(L.value),e.value[W?0:1]):s.value.enabled?v(L,W)&&p(W)||l2(L.value,Array.isArray(e.value)?e.value[0]:null)&&m(W):!1,y=(L,W)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const j=l2(L.value,f.value);return W?me(e.value[0],L.value)&&j:ne(e.value[0],L.value)&&j}return!1},x=L=>!e.value||t.hideOffsetDates&&!L.current?!1:s.value.enabled?t.modelAuto&&Array.isArray(e.value)?l2(L.value,e.value[0]?e.value[0]:u.value):!1:r.value.enabled&&Array.isArray(e.value)?e.value.some(W=>l2(W,L.value)):l2(L.value,e.value?e.value:u.value),C=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){if(t.hideOffsetDates&&!L.current)return!1;const W=J3(f.value,+s.value.autoRange),j=ct(A1(f.value),t.weekStart);return t.weekPicker?l2(j[1],A1(L.value)):l2(W,A1(L.value))}return!1}return!1},b=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){const W=J3(f.value,+s.value.autoRange);if(t.hideOffsetDates&&!L.current)return!1;const j=ct(A1(f.value),t.weekStart);return t.weekPicker?me(L.value,j[0])&&ne(L.value,j[1]):me(L.value,f.value)&&ne(L.value,W)}return!1}return!1},M=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){if(t.hideOffsetDates&&!L.current)return!1;const W=ct(A1(f.value),t.weekStart);return t.weekPicker?l2(W[0],L.value):l2(f.value,L.value)}return!1}return!1},w=L=>P5(e.value,f.value,L.value),z=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,H=()=>t.modelAuto?rb(t.internalModelValue):!0,A=L=>{if(t.weekPicker)return!1;const W=s.value.enabled?!g(L)&&!g(L,!1):!0;return!l(L.value)&&!x(L)&&!(!L.current&&t.hideOffsetDates)&&W},V=L=>s.value.enabled?t.modelAuto?z()&&x(L):!1:x(L),k=L=>n.value?Be1(L.value,i.value.highlight):!1,_=L=>{const W=l(L.value);return W&&(typeof n.value=="function"?!n.value(L.value,W):!n.value.options.highlightDisabled)},N=L=>{var W;return typeof n.value=="function"?n.value(L.value):(W=n.value.weekdays)==null?void 0:W.includes(L.value.getDay())},q=L=>(s.value.enabled||t.weekPicker)&&(!(a.value.count>0)||L.current)&&H()&&!(!L.current&&t.hideOffsetDates)&&!x(L)?w(L):!1,S=L=>{const{isRangeStart:W,isRangeEnd:j}=Y(L),E=s.value.enabled?W||j:!1;return{dp__cell_offset:!L.current,dp__pointer:!t.disabled&&!(!L.current&&t.hideOffsetDates)&&!l(L.value),dp__cell_disabled:l(L.value),dp__cell_highlight:!_(L)&&(k(L)||N(L))&&!V(L)&&!E&&!M(L)&&!(q(L)&&t.weekPicker)&&!j,dp__cell_highlight_active:!_(L)&&(k(L)||N(L))&&V(L),dp__today:!t.noToday&&l2(L.value,u.value)&&L.current,"dp--past":ne(L.value,u.value),"dp--future":me(L.value,u.value)}},B=L=>({dp__active_date:V(L),dp__date_hover:A(L)}),F=L=>{if(e.value&&!Array.isArray(e.value)){const W=ct(e.value,t.weekStart);return{...O(L),dp__range_start:l2(W[0],L.value),dp__range_end:l2(W[1],L.value),dp__range_between_week:me(L.value,W[0])&&ne(L.value,W[1])}}return{...O(L)}},e1=L=>{if(e.value&&Array.isArray(e.value)){const W=ct(e.value[0],t.weekStart),j=e.value[1]?ct(e.value[1],t.weekStart):[];return{...O(L),dp__range_start:l2(W[0],L.value)||l2(j[0],L.value),dp__range_end:l2(W[1],L.value)||l2(j[1],L.value),dp__range_between_week:me(L.value,W[0])&&ne(L.value,W[1])||me(L.value,j[0])&&ne(L.value,j[1]),dp__range_between:me(L.value,W[1])&&ne(L.value,j[0])}}return{...O(L)}},Y=L=>{const W=a.value.count>0?L.current&&g(L)&&H():g(L)&&H(),j=a.value.count>0?L.current&&g(L,!1)&&H():g(L,!1)&&H();return{isRangeStart:W,isRangeEnd:j}},G=L=>{const{isRangeStart:W,isRangeEnd:j}=Y(L);return{dp__range_start:W,dp__range_end:j,dp__range_between:q(L),dp__date_hover:l2(L.value,f.value)&&!W&&!j&&!t.weekPicker,dp__date_hover_start:y(L,!0),dp__date_hover_end:y(L,!1)}},O=L=>({...G(L),dp__cell_auto_range:b(L),dp__cell_auto_range_start:M(L),dp__cell_auto_range_end:C(L)}),T=L=>s.value.enabled?s.value.autoRange?O(L):t.modelAuto?{...B(L),...G(L)}:t.weekPicker?e1(L):G(L):t.weekPicker?F(L):B(L);return{setHoverDate:d,clearHoverDate:h,getDayClassData:L=>t.hideOffsetDates&&!L.current?{}:{...S(L),...T(L),[t.dayClass?t.dayClass(L.value):""]:!0,[t.calendarCellClassName]:!!t.calendarCellClassName}}},b0=e=>{const{defaultedFilters:t,defaultedRange:a,propDates:r,defaultedMultiDates:n}=re(e),c=_=>r.value.disabledDates?typeof r.value.disabledDates=="function"?r.value.disabledDates(A1(_)):!!Uc(_,r.value.disabledDates):!1,i=_=>{const N=r.value.maxDate?me(_,r.value.maxDate):!1,q=r.value.minDate?ne(_,r.value.minDate):!1,S=c(_),B=t.value.months.map(O=>+O).includes(o2(_)),F=e.disabledWeekDays.length?e.disabledWeekDays.some(O=>+O===H21(_)):!1,e1=d(_),Y=n2(_),G=Y<+e.yearRange[0]||Y>+e.yearRange[1];return!(N||q||S||B||G||F||e1)},s=(_,N)=>ne(...Xt(r.value.minDate,_,N))||l2(...Xt(r.value.minDate,_,N)),l=(_,N)=>me(...Xt(r.value.maxDate,_,N))||l2(...Xt(r.value.maxDate,_,N)),f=(_,N,q)=>{let S=!1;return r.value.maxDate&&q&&l(_,N)&&(S=!0),r.value.minDate&&!q&&s(_,N)&&(S=!0),S},u=(_,N,q,S)=>{let B=!1;return S?r.value.minDate&&r.value.maxDate?B=f(_,N,q):(r.value.minDate&&s(_,N)||r.value.maxDate&&l(_,N))&&(B=!0):B=!0,B},d=_=>Array.isArray(r.value.allowedDates)&&!r.value.allowedDates.length?!0:r.value.allowedDates?!Uc(_,r.value.allowedDates):!1,h=_=>!i(_),m=_=>a.value.noDisabledRange?!Fx({start:_[0],end:_[1]}).some(N=>h(N)):!0,v=_=>{if(_){const N=n2(_);return N>=+e.yearRange[0]&&N<=e.yearRange[1]}return!0},p=(_,N)=>!!(Array.isArray(_)&&_[N]&&(a.value.maxRange||a.value.minRange)&&v(_[N])),g=(_,N,q=0)=>{if(p(N,q)&&v(_)){const S=Px(_,N[q]),B=ob(N[q],_),F=B.length===1?0:B.filter(Y=>h(Y)).length,e1=Math.abs(S)-(a.value.minMaxRawRange?0:F);if(a.value.minRange&&a.value.maxRange)return e1>=+a.value.minRange&&e1<=+a.value.maxRange;if(a.value.minRange)return e1>=+a.value.minRange;if(a.value.maxRange)return e1<=+a.value.maxRange}return!0},y=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,x=_=>Array.isArray(_)?[_[0]?is(_[0]):null,_[1]?is(_[1]):null]:is(_),C=(_,N,q)=>_.find(S=>+S.hours===wt(N)&&S.minutes==="*"?!0:+S.minutes===h0(N)&&+S.hours===wt(N))&&q,b=(_,N,q)=>{const[S,B]=_,[F,e1]=N;return!C(S,F,q)&&!C(B,e1,q)&&q},M=(_,N)=>{const q=Array.isArray(N)?N:[N];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?b(e.disabledTimes,q,_):!q.some(S=>C(e.disabledTimes,S,_)):_},w=(_,N)=>{const q=Array.isArray(N)?[X0(N[0]),N[1]?X0(N[1]):void 0]:X0(N),S=!e.disabledTimes(q);return _&&S},z=(_,N)=>e.disabledTimes?Array.isArray(e.disabledTimes)?M(N,_):w(N,_):N,H=_=>{let N=!0;if(!_||y())return!0;const q=!r.value.minDate&&!r.value.maxDate?x(_):_;return(e.maxTime||r.value.maxDate)&&(N=nm(e.maxTime,r.value.maxDate,"max",Te(q),N)),(e.minTime||r.value.minDate)&&(N=nm(e.minTime,r.value.minDate,"min",Te(q),N)),z(_,N)},A=_=>{if(!e.monthPicker)return!0;let N=!0;const q=A1(e4(_));if(r.value.minDate&&r.value.maxDate){const S=A1(e4(r.value.minDate)),B=A1(e4(r.value.maxDate));return me(q,S)&&ne(q,B)||l2(q,S)||l2(q,B)}if(r.value.minDate){const S=A1(e4(r.value.minDate));N=me(q,S)||l2(q,S)}if(r.value.maxDate){const S=A1(e4(r.value.maxDate));N=ne(q,S)||l2(q,S)}return N},V=o.computed(()=>_=>!e.enableTimePicker||e.ignoreTimeValidation?!0:H(_)),k=o.computed(()=>_=>e.monthPicker?Array.isArray(_)&&(a.value.enabled||n.value.enabled)?!_.filter(N=>!A(N)).length:A(_):!0);return{isDisabled:h,validateDate:i,validateMonthYearInRange:u,isDateRangeAllowed:m,checkMinMaxRange:g,isValidTime:H,isTimeValid:V,isMonthValid:k}},B5=()=>{const e=o.computed(()=>(r,n)=>r==null?void 0:r.includes(n)),t=o.computed(()=>(r,n)=>r.count?r.solo?!0:n===0:!0),a=o.computed(()=>(r,n)=>r.count?r.solo?!0:n===r.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:a}},m31=(e,t,a)=>{const r=o.ref(0),n=o.reactive({[G0.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[G0.calendar]:!1,[G0.header]:!1}),c=o.computed(()=>e.monthPicker||e.timePicker),i=d=>{var h;if((h=e.flow)!=null&&h.length){if(!d&&c.value)return u();n[d]=!0,Object.keys(n).filter(m=>!n[m]).length||u()}},s=()=>{var d;(d=e.flow)!=null&&d.length&&r.value!==-1&&(r.value+=1,t("flow-step",r.value),u())},l=()=>{r.value=-1},f=(d,h,...m)=>{var v,p;e.flow[r.value]===d&&a.value&&((p=(v=a.value)[h])==null||p.call(v,...m))},u=()=>{f(Ye.month,"toggleMonthPicker",!0),f(Ye.year,"toggleYearPicker",!0),f(Ye.calendar,"toggleTimePicker",!1,!0),f(Ye.time,"toggleTimePicker",!0,!0);const d=e.flow[r.value];(d===Ye.hours||d===Ye.minutes||d===Ye.seconds)&&f(d,"toggleTimePicker",!0,!0,d)};return{childMount:i,updateFlowStep:s,resetFlow:l,flowStep:r}},F5={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},emitTimezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},calendarClassName:{type:String,default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0}},b4={...F5,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})}},p31={key:1,class:"dp__input_wrap"},v31=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],g31={key:2,class:"dp__clear_icon"},y31=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...F5},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTextInput:c,defaultedAriaLabels:i,defaultedInline:s,defaultedConfig:l,defaultedRange:f,defaultedMultiDates:u,getDefaultPattern:d,getDefaultStartTime:h}=re(n),{checkMinMaxRange:m}=b0(n),v=o.ref(),p=o.ref(null),g=o.ref(!1),y=o.ref(!1),x=o.computed(()=>({dp__pointer:!n.disabled&&!n.readonly&&!c.value.enabled,dp__disabled:n.disabled,dp__input_readonly:!c.value.enabled,dp__input:!0,dp__input_icon_pad:!n.hideInputIcon,dp__input_valid:!!n.state,dp__input_invalid:n.state===!1,dp__input_focus:g.value||n.isMenuOpen,dp__input_reg:!c.value.enabled,[n.inputClassName]:!!n.inputClassName})),C=()=>{r("set-input-date",null),n.clearable&&n.autoApply&&(r("set-empty-date"),v.value=null)},b=B=>{const F=h();return Fe1(B,c.value.format??d(),F??lb({},n.enableSeconds),n.inputValue,y.value,n.formatLocale)},M=B=>{const{rangeSeparator:F}=c.value,[e1,Y]=B.split(`${F}`);if(e1){const G=b(e1.trim()),O=Y?b(Y.trim()):null;if(ca(G,O))return;const T=G&&O?[G,O]:[G];m(O,T,0)&&(v.value=G?T:null)}},w=()=>{y.value=!0},z=B=>{if(f.value.enabled)M(B);else if(u.value.enabled){const F=B.split(";");v.value=F.map(e1=>b(e1.trim())).filter(e1=>e1)}else v.value=b(B)},H=B=>{var F;const e1=typeof B=="string"?B:(F=B.target)==null?void 0:F.value;e1!==""?(c.value.openMenu&&!n.isMenuOpen&&r("open"),z(e1),r("set-input-date",v.value)):C(),y.value=!1,r("update:input-value",e1)},A=B=>{c.value.enabled?(z(B.target.value),c.value.enterSubmit&&O7(v.value)&&n.inputValue!==""?(r("set-input-date",v.value,!0),v.value=null):c.value.enterSubmit&&n.inputValue===""&&(v.value=null,r("clear"))):_(B)},V=B=>{c.value.enabled&&c.value.tabSubmit&&z(B.target.value),c.value.tabSubmit&&O7(v.value)&&n.inputValue!==""?(r("set-input-date",v.value,!0,!0),v.value=null):c.value.tabSubmit&&n.inputValue===""&&(v.value=null,r("clear",!0))},k=()=>{g.value=!0,r("focus"),o.nextTick().then(()=>{var B;c.value.enabled&&c.value.selectOnFocus&&((B=p.value)==null||B.select())})},_=B=>{B.preventDefault(),r0(B,l.value,!0),c.value.enabled&&c.value.openMenu&&!s.value.input&&!n.isMenuOpen?r("open"):c.value.enabled||r("toggle")},N=()=>{r("real-blur"),g.value=!1,(!n.isMenuOpen||s.value.enabled&&s.value.input)&&r("blur"),n.autoApply&&c.value.enabled&&v.value&&!n.isMenuOpen&&(r("set-input-date",v.value),r("select-date"),v.value=null)},q=B=>{r0(B,l.value,!0),r("clear")},S=B=>{if(B.key==="Tab"&&V(B),B.key==="Enter"&&A(B),!c.value.enabled){if(B.code==="Tab")return;B.preventDefault()}};return t({focusInput:()=>{var B;(B=p.value)==null||B.focus({preventScroll:!0})},setParsedDate:B=>{v.value=B}}),(B,F)=>{var e1;return o.openBlock(),o.createElementBlock("div",{onClick:_},[B.$slots.trigger&&!B.$slots["dp-input"]&&!o.unref(s).enabled?o.renderSlot(B.$slots,"trigger",{key:0}):o.createCommentVNode("",!0),!B.$slots.trigger&&(!o.unref(s).enabled||o.unref(s).input)?(o.openBlock(),o.createElementBlock("div",p31,[B.$slots["dp-input"]&&!B.$slots.trigger&&(!o.unref(s).enabled||o.unref(s).enabled&&o.unref(s).input)?o.renderSlot(B.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:H,onEnter:A,onTab:V,onClear:q,onBlur:N,onKeypress:S,onPaste:w,openMenu:()=>B.$emit("open"),closeMenu:()=>B.$emit("close"),toggleMenu:()=>B.$emit("toggle")}):o.createCommentVNode("",!0),B.$slots["dp-input"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("input",{key:1,id:B.uid?`dp-input-${B.uid}`:void 0,ref_key:"inputRef",ref:p,"data-test":"dp-input",name:B.name,class:o.normalizeClass(x.value),inputmode:o.unref(c).enabled?"text":"none",placeholder:B.placeholder,disabled:B.disabled,readonly:B.readonly,required:B.required,value:e.inputValue,autocomplete:B.autocomplete,"aria-label":(e1=o.unref(i))==null?void 0:e1.input,"aria-disabled":B.disabled||void 0,"aria-invalid":B.state===!1?!0:void 0,onInput:H,onBlur:N,onFocus:k,onKeypress:S,onKeydown:S,onPaste:w},null,42,v31)),o.createElementVNode("div",{onClick:F[2]||(F[2]=Y=>r("toggle"))},[B.$slots["input-icon"]&&!B.hideInputIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:F[0]||(F[0]=Y=>r("toggle"))},[o.renderSlot(B.$slots,"input-icon")])):o.createCommentVNode("",!0),!B.$slots["input-icon"]&&!B.hideInputIcon&&!B.$slots["dp-input"]?(o.openBlock(),o.createBlock(o.unref(va),{key:1,class:"dp__input_icon dp__input_icons",onClick:F[1]||(F[1]=Y=>r("toggle"))})):o.createCommentVNode("",!0)]),B.$slots["clear-icon"]&&e.inputValue&&B.clearable&&!B.disabled&&!B.readonly?(o.openBlock(),o.createElementBlock("span",g31,[o.renderSlot(B.$slots,"clear-icon",{clear:q})])):o.createCommentVNode("",!0),B.clearable&&!B.$slots["clear-icon"]&&e.inputValue&&!B.disabled&&!B.readonly?(o.openBlock(),o.createBlock(o.unref(eb),{key:3,class:"dp__clear_icon dp__input_icons","data-test":"clear-icon",onClick:F[3]||(F[3]=o.withModifiers(Y=>q(Y),["prevent"]))})):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)])}}}),x31=["title"],b31=["disabled"],C31=o.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...b4},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const a=t,r=e,{defaultedActionRow:n,defaultedPreviewFormat:c,defaultedMultiCalendars:i,defaultedTextInput:s,defaultedInline:l,defaultedRange:f,defaultedMultiDates:u,getDefaultPattern:d}=re(r),{isTimeValid:h,isMonthValid:m}=b0(r),{buildMatrix:v}=x0(),p=o.ref(null),g=o.ref(null),y=o.ref(!1),x=o.ref({}),C=o.ref(null),b=o.ref(null);o.onMounted(()=>{r.arrowNavigation&&v([ke(p),ke(g)],"actionRow"),M(),window.addEventListener("resize",M)}),o.onUnmounted(()=>{window.removeEventListener("resize",M)});const M=()=>{y.value=!1,setTimeout(()=>{var S,B;const F=(S=C.value)==null?void 0:S.getBoundingClientRect(),e1=(B=b.value)==null?void 0:B.getBoundingClientRect();F&&e1&&(x.value.maxWidth=`${e1.width-F.width-20}px`),y.value=!0},0)},w=o.computed(()=>f.value.enabled&&!f.value.partialRange&&r.internalModelValue?r.internalModelValue.length===2:!0),z=o.computed(()=>!h.value(r.internalModelValue)||!m.value(r.internalModelValue)||!w.value),H=()=>{const S=c.value;return r.timePicker||r.monthPicker,S(Te(r.internalModelValue))},A=()=>{const S=r.internalModelValue;return i.value.count>0?`${V(S[0])} - ${V(S[1])}`:[V(S[0]),V(S[1])]},V=S=>ub(S,c.value,r.formatLocale,s.value.rangeSeparator,r.modelAuto,d()),k=o.computed(()=>!r.internalModelValue||!r.menuMount?"":typeof c.value=="string"?Array.isArray(r.internalModelValue)?r.internalModelValue.length===2&&r.internalModelValue[1]?A():u.value.enabled?r.internalModelValue.map(S=>`${V(S)}`):r.modelAuto?`${V(r.internalModelValue[0])}`:`${V(r.internalModelValue[0])} -`:V(r.internalModelValue):H()),_=()=>u.value.enabled?"; ":" - ",N=o.computed(()=>Array.isArray(k.value)?k.value.join(_()):k.value),q=()=>{h.value(r.internalModelValue)&&m.value(r.internalModelValue)&&w.value?a("select-date"):a("invalid-select")};return(S,B)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"actionRowRef",ref:b,class:"dp__action_row"},[S.$slots["action-row"]?o.renderSlot(S.$slots,"action-row",o.normalizeProps(o.mergeProps({key:0},{internalModelValue:S.internalModelValue,disabled:z.value,selectDate:()=>S.$emit("select-date"),closePicker:()=>S.$emit("close-picker")}))):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(n).showPreview?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__selection_preview",title:N.value,style:o.normalizeStyle(x.value)},[S.$slots["action-preview"]&&y.value?o.renderSlot(S.$slots,"action-preview",{key:0,value:S.internalModelValue}):o.createCommentVNode("",!0),!S.$slots["action-preview"]&&y.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(N.value),1)],64)):o.createCommentVNode("",!0)],12,x31)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"actionBtnContainer",ref:C,class:"dp__action_buttons","data-dp-element":"action-row"},[S.$slots["action-buttons"]?o.renderSlot(S.$slots,"action-buttons",{key:0,value:S.internalModelValue}):o.createCommentVNode("",!0),S.$slots["action-buttons"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[!o.unref(l).enabled&&o.unref(n).showCancel?(o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:p,type:"button",class:"dp__action_button dp__action_cancel",onClick:B[0]||(B[0]=F=>S.$emit("close-picker")),onKeydown:B[1]||(B[1]=F=>o.unref(y3)(F,()=>S.$emit("close-picker")))},o.toDisplayString(S.cancelText),545)):o.createCommentVNode("",!0),o.unref(n).showNow?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:B[2]||(B[2]=F=>S.$emit("select-now")),onKeydown:B[3]||(B[3]=F=>o.unref(y3)(F,()=>S.$emit("select-now")))},o.toDisplayString(S.nowButtonLabel),33)):o.createCommentVNode("",!0),o.unref(n).showSelect?(o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:g,type:"button",class:"dp__action_button dp__action_select",disabled:z.value,"data-test":"select-button",onKeydown:B[4]||(B[4]=F=>o.unref(y3)(F,()=>q())),onClick:q},o.toDisplayString(S.selectText),41,b31)):o.createCommentVNode("",!0)],64))],512)],64))],512))}}),M31={class:"dp__selection_grid_header"},z31=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],w31=["aria-label"],Nn=o.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:a}){const{setSelectionGrid:r,buildMultiLevelMatrix:n,setMonthPicker:c}=x0(),i=a,s=e,{defaultedAriaLabels:l,defaultedTextInput:f,defaultedConfig:u}=re(s),{hideNavigationButtons:d}=B5(),h=o.ref(!1),m=o.ref(null),v=o.ref(null),p=o.ref([]),g=o.ref(),y=o.ref(null),x=o.ref(0),C=o.ref(null);o.onBeforeUpdate(()=>{m.value=null}),o.onMounted(()=>{o.nextTick().then(()=>k()),s.noOverlayFocus||M(),b(!0)}),o.onUnmounted(()=>b(!1));const b=T=>{var L;s.arrowNavigation&&((L=s.headerRefs)!=null&&L.length?c(T):r(T))},M=()=>{var T;const L=ke(v);L&&(f.value.enabled||(m.value?(T=m.value)==null||T.focus({preventScroll:!0}):L.focus({preventScroll:!0})),h.value=L.clientHeight<L.scrollHeight)},w=o.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!s.useRelative,"dp--overlay-relative":s.useRelative})),z=o.computed(()=>s.useRelative?{height:`${s.height}px`,width:"260px"}:void 0),H=o.computed(()=>({dp__overlay_col:!0})),A=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:s.isLast})),V=o.computed(()=>{var T,L;return{dp__overlay_container:!0,dp__container_flex:((T=s.items)==null?void 0:T.length)<=6,dp__container_block:((L=s.items)==null?void 0:L.length)>6}});o.watch(()=>s.items,()=>k(!1),{deep:!0});const k=(T=!0)=>{o.nextTick().then(()=>{const L=ke(m),W=ke(v),j=ke(y),E=ke(C),I=j?j.getBoundingClientRect().height:0;W&&(W.getBoundingClientRect().height?x.value=W.getBoundingClientRect().height-I:x.value=u.value.modeHeight-I),L&&E&&T&&(E.scrollTop=L.offsetTop-E.offsetTop-(x.value/2-L.getBoundingClientRect().height)-I)})},_=T=>{T.disabled||i("selected",T.value)},N=()=>{i("toggle"),i("reset-flow")},q=()=>{s.escClose&&N()},S=(T,L,W,j)=>{T&&((L.active||L.value===s.focusValue)&&(m.value=T),s.arrowNavigation&&(Array.isArray(p.value[W])?p.value[W][j]=T:p.value[W]=[T],B()))},B=()=>{var T,L;const W=(T=s.headerRefs)!=null&&T.length?[s.headerRefs].concat(p.value):p.value.concat([s.skipButtonRef?[]:[y.value]]);n(Te(W),(L=s.headerRefs)!=null&&L.length?"monthPicker":"selectionGrid")},F=T=>{s.arrowNavigation||r0(T,u.value,!0)},e1=T=>{g.value=T,i("hover-value",T)},Y=()=>{if(N(),!s.isLast){const T=Pe1(s.menuWrapRef??null,"action-row");if(T){const L=nb(T);L==null||L.focus()}}},G=T=>{switch(T.key){case te.esc:return q();case te.arrowLeft:return F(T);case te.arrowRight:return F(T);case te.arrowUp:return F(T);case te.arrowDown:return F(T);default:return}},O=T=>{if(T.key===te.enter)return N();if(T.key===te.tab)return Y()};return t({focusGrid:M}),(T,L)=>{var W;return o.openBlock(),o.createElementBlock("div",{ref_key:"gridWrapRef",ref:v,class:o.normalizeClass(w.value),style:o.normalizeStyle(z.value),role:"dialog",tabindex:"0",onKeydown:G},[o.createElementVNode("div",{ref_key:"containerRef",ref:C,class:o.normalizeClass(V.value),role:"grid",style:o.normalizeStyle({"--dp-overlay-height":`${x.value}px`})},[o.createElementVNode("div",M31,[o.renderSlot(T.$slots,"header")]),T.$slots.overlay?o.renderSlot(T.$slots,"overlay",{key:0}):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(T.items,(j,E)=>(o.openBlock(),o.createElementBlock("div",{key:E,class:o.normalizeClass(["dp__overlay_row",{dp__flex_row:T.items.length>=3}]),role:"row"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(j,(I,a1)=>(o.openBlock(),o.createElementBlock("div",{key:I.value,ref_for:!0,ref:n1=>S(n1,I,E,a1),role:"gridcell",class:o.normalizeClass(H.value),"aria-selected":I.active||void 0,"aria-disabled":I.disabled||void 0,tabindex:"0","data-test":I.text,onClick:n1=>_(I),onKeydown:n1=>o.unref(y3)(n1,()=>_(I),!0),onMouseover:n1=>e1(I.value)},[o.createElementVNode("div",{class:o.normalizeClass(I.className)},[T.$slots.item?o.renderSlot(T.$slots,"item",{key:0,item:I}):o.createCommentVNode("",!0),T.$slots.item?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(I.text),1)],64))],2)],42,z31))),128))],2))),128))],6),T.$slots["button-icon"]?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:y,type:"button","aria-label":(W=o.unref(l))==null?void 0:W.toggleOverlay,class:o.normalizeClass(A.value),tabindex:"0",onClick:N,onKeydown:O},[o.renderSlot(T.$slots,"button-icon")],42,w31)),[[o.vShow,!o.unref(d)(T.hideNavigation,T.type)]]):o.createCommentVNode("",!0)],38)}}}),R5=o.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(e){const t=e,a=o.computed(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),r=o.computed(()=>({dp__instance_calendar:t.multiCalendars>0}));return(n,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass({dp__menu_inner:!n.stretch,"dp--menu--inner-stretched":n.stretch,dp__flex_display:n.multiCalendars>0,"dp--flex-display-collapsed":n.collapse})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(i,s)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(r.value)},[o.renderSlot(n.$slots,"default",{instance:i,index:s})],2))),128))],2))}}),_31=["aria-label","aria-disabled"],yr=o.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const a=t,r=o.ref(null);return o.onMounted(()=>a("set-ref",r)),(n,c)=>(o.openBlock(),o.createElementBlock("button",{ref_key:"elRef",ref:r,type:"button",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":n.ariaLabel,"aria-disabled":n.disabled||void 0,onClick:c[0]||(c[0]=i=>n.$emit("activate")),onKeydown:c[1]||(c[1]=i=>o.unref(y3)(i,()=>n.$emit("activate"),!0))},[o.createElementVNode("span",{class:o.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:n.disabled}])},[o.renderSlot(n.$slots,"default")],2)],40,_31))}}),k31={class:"dp--year-mode-picker"},H31=["aria-label","data-test"],mb=o.defineComponent({__name:"YearModePicker",props:{...b4,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const a=t,r=e,{showRightIcon:n,showLeftIcon:c}=B5(),{defaultedConfig:i,defaultedMultiCalendars:s,defaultedAriaLabels:l,defaultedTransitions:f}=re(r),{showTransition:u,transitionName:d}=Tn(f),h=(p=!1,g)=>{a("toggle-year-picker",{flow:p,show:g})},m=p=>{a("year-select",p)},v=(p=!1)=>{a("handle-year",p)};return(p,g)=>{var y,x,C;return o.openBlock(),o.createElementBlock("div",k31,[o.unref(c)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(yr,{key:0,ref:"mpPrevIconRef","aria-label":(y=o.unref(l))==null?void 0:y.prevYear,disabled:e.isDisabled(!1),onActivate:g[0]||(g[0]=b=>v(!1))},{default:o.withCtx(()=>[p.$slots["arrow-left"]?o.renderSlot(p.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),p.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Dl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":(x=o.unref(l))==null?void 0:x.openYearsOverlay,"data-test":`year-mode-btn-${e.instance}`,onClick:g[1]||(g[1]=()=>h(!1)),onKeydown:g[2]||(g[2]=o.withKeys(()=>h(!1),["enter"]))},[p.$slots.year?o.renderSlot(p.$slots,"year",{key:0,year:e.year}):o.createCommentVNode("",!0),p.$slots.year?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(e.year),1)],64))],40,H31),o.unref(n)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(yr,{key:1,ref:"mpNextIconRef","aria-label":(C=o.unref(l))==null?void 0:C.nextYear,disabled:e.isDisabled(!0),onActivate:g[3]||(g[3]=b=>v(!0))},{default:o.withCtx(()=>[p.$slots["arrow-right"]?o.renderSlot(p.$slots,"arrow-right",{key:0}):o.createCommentVNode("",!0),p.$slots["arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ol),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(d)(e.showYearPicker),css:o.unref(u)},{default:o.withCtx(()=>[e.showYearPicker?(o.openBlock(),o.createBlock(Nn,{key:0,items:e.items,"text-input":p.textInput,"esc-close":p.escClose,config:p.config,"is-last":p.autoApply&&!o.unref(i).keepActionRow,"hide-navigation":p.hideNavigation,"aria-labels":p.ariaLabels,type:"year",onToggle:h,onSelected:g[4]||(g[4]=b=>m(b))},o.createSlots({"button-icon":o.withCtx(()=>[p.$slots["calendar-icon"]?o.renderSlot(p.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),p.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(va),{key:1}))]),_:2},[p.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:b})=>[o.renderSlot(p.$slots,"year-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels"])):o.createCommentVNode("",!0)]),_:3},8,["name","css"])])}}}),Wl=(e,t,a)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(r=>l2(e,r))){const r=t.value.filter(n=>!l2(n,e));t.value=r.length?r:null}else(a&&+a>t.value.length||!a)&&t.value.push(e);else t.value=[e]},ql=(e,t,a)=>{let r=e.value?e.value.slice():[];return r.length===2&&r[1]!==null&&(r=[]),r.length?ne(t,r[0])?(r.unshift(t),a("range-start",r[0]),a("range-start",r[1])):(r[1]=t,a("range-end",t)):(r=[t],a("range-start",t)),r},I5=(e,t,a,r)=>{e&&(e[0]&&e[1]&&a&&t("auto-apply"),e[0]&&!e[1]&&r&&a&&t("auto-apply"))},pb=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>F4(A1(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=F4(A1(e.value),e.timezone))},vb=(e,t,a,r)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&r.value.partialRange)?r.value.fixedStart&&(me(e,t.value[0])||l2(e,t.value[0]))?[t.value[0],e]:r.value.fixedEnd&&(ne(e,t.value[1])||l2(e,t.value[1]))?[e,t.value[1]]:(a("invalid-fixed-range",e),t.value):[],gb=({multiCalendars:e,highlight:t,propDates:a,calendars:r,modelValue:n,props:c,filters:i,year:s,month:l,emit:f})=>{const u=o.computed(()=>Rl(c.yearRange,c.locale,c.reverseYears)),d=o.ref([!1]),h=o.computed(()=>(w,z)=>{const H=N2(e4(new Date),{month:l.value(w),year:s.value(w)}),A=z?Rx(H):Hl(H);return fb(A,a.value.maxDate,a.value.minDate,c.preventMinMaxNavigation,z)}),m=()=>{for(let w=0;w<e.value.count;w++)if(w===0)r.value[w]=r.value[0];else{const z=N2(A1(),r.value[w-1]);r.value[w]={month:o2(z),year:n2(kl(z,1))}}},v=w=>{if(!w)return m();const z=N2(A1(),r.value[w]);return r.value[0].year=n2(Jx(z,e.value.count-1)),m()},p=w=>c.focusStartDate?w[0]:w[1]?w[1]:w[0],g=()=>{if(n.value){const w=Array.isArray(n.value)?p(n.value):n.value;r.value[0]={month:o2(w),year:n2(w)}}};o.onMounted(()=>{g(),e.value.count&&m()});const y=(w,z)=>{r.value[z].year=w,f("update-month-year",{instance:z,year:w,month:r.value[z].month}),e.value.count&&!e.value.solo&&v(z)},x=o.computed(()=>w=>sa(u.value,z=>{var H;const A=s.value(w)===z.value,V=an(z.value,oa(a.value.minDate),oa(a.value.maxDate))||((H=i.value.years)==null?void 0:H.includes(s.value(w))),k=Ul(t.value,z.value);return{active:A,disabled:V,highlighted:k}})),C=(w,z)=>{y(w,z),M(z)},b=(w,z=!1)=>{if(!h.value(w,z)){const H=z?s.value(w)+1:s.value(w)-1;y(H,w)}},M=(w,z=!1,H)=>{z||f("reset-flow"),H!==void 0?d.value[w]=H:d.value[w]=!d.value[w],d.value[w]?f("overlay-toggle",{open:!0,overlay:Ye.year}):(f("overlay-closed"),f("overlay-toggle",{open:!1,overlay:Ye.year}))};return{isDisabled:h,groupedYears:x,showYearPicker:d,selectYear:y,toggleYearPicker:M,handleYearSelect:C,handleYear:b}},V31=(e,t)=>{const{defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:c,defaultedRange:i,defaultedHighlight:s,propDates:l,defaultedTz:f,defaultedFilters:u,defaultedMultiDates:d}=re(e),{modelValue:h,year:m,month:v,calendars:p}=En(e,t),g=o.computed(()=>ab(e.formatLocale,e.locale,e.monthNameFormat)),y=o.ref(null),{checkMinMaxRange:x}=b0(e),{selectYear:C,groupedYears:b,showYearPicker:M,toggleYearPicker:w,handleYearSelect:z,handleYear:H,isDisabled:A}=gb({modelValue:h,multiCalendars:a,highlight:s,calendars:p,year:m,propDates:l,month:v,filters:u,props:e,emit:t});o.onMounted(()=>{e.startDate&&(h.value&&e.focusStartDate||!h.value)&&C(n2(A1(e.startDate)),0)});const V=L=>L?{month:o2(L),year:n2(L)}:{month:null,year:null},k=()=>h.value?Array.isArray(h.value)?h.value.map(L=>V(L)):V(h.value):V(),_=(L,W)=>{const j=p.value[L],E=k();return Array.isArray(E)?E.some(I=>I.year===(j==null?void 0:j.year)&&I.month===W):(j==null?void 0:j.year)===E.year&&W===E.month},N=(L,W,j)=>{var E,I;const a1=k();return Array.isArray(a1)?m.value(W)===((E=a1[j])==null?void 0:E.year)&&L===((I=a1[j])==null?void 0:I.month):!1},q=(L,W)=>{if(i.value.enabled){const j=k();if(Array.isArray(h.value)&&Array.isArray(j)){const E=N(L,W,0)||N(L,W,1),I=dt(e4(A1()),L,m.value(W));return P5(h.value,y.value,I)&&!E}return!1}return!1},S=o.computed(()=>L=>sa(g.value,W=>{var j;const E=_(L,W.value),I=an(W.value,ib(m.value(L),l.value.minDate),sb(m.value(L),l.value.maxDate))||qe1(l.value.disabledDates,m.value(L)).includes(W.value)||((j=u.value.months)==null?void 0:j.includes(W.value)),a1=q(W.value,L),n1=db(s.value,W.value,m.value(L));return{active:E,disabled:I,isBetween:a1,highlighted:n1}})),B=(L,W)=>dt(e4(A1()),L,m.value(W)),F=(L,W)=>{const j=h.value?h.value:e4(new Date);h.value=dt(j,L,m.value(W)),t("auto-apply"),t("update-flow-step")},e1=(L,W)=>{const j=B(L,W);i.value.fixedEnd||i.value.fixedStart?h.value=vb(j,h,t,i):h.value?x(j,h.value)&&(h.value=ql(h,B(L,W),t)):h.value=[B(L,W)],o.nextTick().then(()=>{I5(h.value,t,e.autoApply,e.modelAuto)})},Y=(L,W)=>{Wl(B(L,W),h,d.value.limit),t("auto-apply",!0)},G=(L,W)=>(p.value[W].month=L,T(W,p.value[W].year,L),d.value.enabled?Y(L,W):i.value.enabled?e1(L,W):F(L,W)),O=(L,W)=>{C(L,W),T(W,L,null)},T=(L,W,j)=>{let E=j;if(!E&&E!==0){const I=k();E=Array.isArray(I)?I[L].month:I.month}t("update-month-year",{instance:L,year:W,month:E})};return{groupedMonths:S,groupedYears:b,year:m,isDisabled:A,defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:c,showYearPicker:M,modelValue:h,presetDate:(L,W)=>{pb({value:L,modelValue:h,range:i.value.enabled,timezone:W?void 0:f.value.timezone}),t("auto-apply")},setHoverDate:(L,W)=>{y.value=B(L,W)},selectMonth:G,selectYear:O,toggleYearPicker:w,handleYearSelect:z,handleYear:H,getModelMonthYear:k}},L31=o.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...b4},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=o.useSlots(),c=z3(n,"yearMode"),i=e;o.onMounted(()=>{i.shadow||r("mount",null)});const{groupedMonths:s,groupedYears:l,year:f,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:m,modelValue:v,presetDate:p,setHoverDate:g,selectMonth:y,selectYear:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M,getModelMonthYear:w}=V31(i,r);return t({getSidebarProps:()=>({modelValue:v,year:f,getModelMonthYear:w,selectMonth:y,selectYear:x,handleYear:M}),presetDate:p,toggleYearPicker:z=>C(0,z)}),(z,H)=>(o.openBlock(),o.createBlock(R5,{"multi-calendars":o.unref(d).count,collapse:z.collapse,stretch:""},{default:o.withCtx(({instance:A})=>[z.$slots["top-extra"]?o.renderSlot(z.$slots,"top-extra",{key:0,value:z.internalModelValue}):o.createCommentVNode("",!0),z.$slots["month-year"]?o.renderSlot(z.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{year:o.unref(f),months:o.unref(s)(A),years:o.unref(l)(A),selectMonth:o.unref(y),selectYear:o.unref(x),instance:A}))):(o.openBlock(),o.createBlock(Nn,{key:2,items:o.unref(s)(A),"arrow-navigation":z.arrowNavigation,"is-last":z.autoApply&&!o.unref(h).keepActionRow,"esc-close":z.escClose,height:o.unref(h).modeHeight,config:z.config,"no-overlay-focus":!!(z.noOverlayFocus||z.textInput),"use-relative":"",type:"month",onSelected:V=>o.unref(y)(V,A),onHoverValue:V=>o.unref(g)(V,A)},o.createSlots({header:o.withCtx(()=>[o.createVNode(mb,o.mergeProps(z.$props,{items:o.unref(l)(A),instance:A,"show-year-picker":o.unref(m)[A],year:o.unref(f)(A),"is-disabled":V=>o.unref(u)(A,V),onHandleYear:V=>o.unref(M)(A,V),onYearSelect:V=>o.unref(b)(V,A),onToggleYearPicker:V=>o.unref(C)(A,V==null?void 0:V.flow,V==null?void 0:V.show)}),o.createSlots({_:2},[o.renderList(o.unref(c),(V,k)=>({name:V,fn:o.withCtx(_=>[o.renderSlot(z.$slots,V,o.normalizeProps(o.guardReactiveProps(_)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[z.$slots["month-overlay-value"]?{name:"item",fn:o.withCtx(({item:V})=>[o.renderSlot(z.$slots,"month-overlay-value",{text:V.text,value:V.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),S31=(e,t)=>{const{modelValue:a}=En(e,t),r=o.ref(null),{defaultedHighlight:n,defaultedMultiDates:c,defaultedFilters:i,defaultedRange:s,propDates:l}=re(e),f=o.ref();o.onMounted(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(f.value=n2(A1(e.startDate)))});const u=v=>Array.isArray(a.value)?a.value.some(p=>n2(p)===v):a.value?n2(a.value)===v:!1,d=v=>s.value.enabled&&Array.isArray(a.value)?P5(a.value,r.value,m(v)):!1,h=o.computed(()=>sa(Rl(e.yearRange,e.locale,e.reverseYears),v=>{const p=u(v.value),g=an(v.value,oa(l.value.minDate),oa(l.value.maxDate))||i.value.years.includes(v.value),y=d(v.value)&&!p,x=Ul(n.value,v.value);return{active:p,disabled:g,isBetween:y,highlighted:x}})),m=v=>N4(e4(new Date),v);return{groupedYears:h,modelValue:a,focusYear:f,setHoverValue:v=>{r.value=N4(e4(new Date),v)},selectYear:v=>{var p;if(t("update-month-year",{instance:0,year:v}),c.value.enabled)return a.value?Array.isArray(a.value)&&(((p=a.value)==null?void 0:p.map(g=>n2(g))).includes(v)?a.value=a.value.filter(g=>n2(g)!==v):a.value.push(N4(k3(A1()),v))):a.value=[N4(k3(A1()),v)],t("auto-apply",!0);s.value.enabled?(a.value=ql(a,m(v),t),o.nextTick().then(()=>{I5(a.value,t,e.autoApply,e.modelAuto)})):(a.value=m(v),t("auto-apply"))}}},A31=o.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...b4},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,{groupedYears:c,modelValue:i,focusYear:s,selectYear:l,setHoverValue:f}=S31(n,r),{defaultedConfig:u}=re(n);return t({getSidebarProps:()=>({modelValue:i,selectYear:l})}),(d,h)=>(o.openBlock(),o.createElementBlock("div",null,[d.$slots["top-extra"]?o.renderSlot(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):o.createCommentVNode("",!0),d.$slots["month-year"]?o.renderSlot(d.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{years:o.unref(c),selectYear:o.unref(l)}))):(o.openBlock(),o.createBlock(Nn,{key:2,items:o.unref(c),"is-last":d.autoApply&&!o.unref(u).keepActionRow,height:o.unref(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":o.unref(s),type:"year","use-relative":"",onSelected:o.unref(l),onHoverValue:o.unref(f)},o.createSlots({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:m})=>[o.renderSlot(d.$slots,"year-overlay-value",{text:m.text,value:m.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),T31={key:0,class:"dp__time_input"},E31=["data-test","aria-label","onKeydown","onClick","onMousedown"],N31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),D31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),O31=["aria-label","disabled","data-test","onKeydown","onClick"],P31=["data-test","aria-label","onKeydown","onClick","onMousedown"],B31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),F31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),R31={key:0},I31=["aria-label"],$31=o.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...b4},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{setTimePickerElements:c,setTimePickerBackRef:i}=x0(),{defaultedAriaLabels:s,defaultedTransitions:l,defaultedFilters:f,defaultedConfig:u,defaultedRange:d}=re(n),{transitionName:h,showTransition:m}=Tn(l),v=o.reactive({hours:!1,minutes:!1,seconds:!1}),p=o.ref("AM"),g=o.ref(null),y=o.ref([]),x=o.ref();o.onMounted(()=>{r("mounted")});const C=R=>N2(new Date,{hours:R.hours,minutes:R.minutes,seconds:n.enableSeconds?R.seconds:0,milliseconds:0}),b=o.computed(()=>R=>B(R,n[R])||w(R,n[R])),M=o.computed(()=>({hours:n.hours,minutes:n.minutes,seconds:n.seconds})),w=(R,p1)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!n.validateTime(R,p1):!1,z=(R,p1)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const z1=p1?+n[`${R}Increment`]:-+n[`${R}Increment`],h1=n[R]+z1;return!n.validateTime(R,h1)}return!1},H=o.computed(()=>R=>!O(+n[R]+ +n[`${R}Increment`],R)||z(R,!0)),A=o.computed(()=>R=>!O(+n[R]-+n[`${R}Increment`],R)||z(R,!1)),V=(R,p1)=>Ex(N2(A1(),R),p1),k=(R,p1)=>ke1(N2(A1(),R),p1),_=o.computed(()=>({dp__time_col:!0,dp__time_col_block:!n.timePickerInline,dp__time_col_reg_block:!n.enableSeconds&&n.is24&&!n.timePickerInline,dp__time_col_reg_inline:!n.enableSeconds&&n.is24&&n.timePickerInline,dp__time_col_reg_with_button:!n.enableSeconds&&!n.is24,dp__time_col_sec:n.enableSeconds&&n.is24,dp__time_col_sec_with_button:n.enableSeconds&&!n.is24})),N=o.computed(()=>{const R=[{type:"hours"}];return n.enableMinutes&&R.push({type:"",separator:!0},{type:"minutes"}),n.enableSeconds&&R.push({type:"",separator:!0},{type:"seconds"}),R}),q=o.computed(()=>N.value.filter(R=>!R.separator)),S=o.computed(()=>R=>{if(R==="hours"){const p1=I(+n.hours);return{text:p1<10?`0${p1}`:`${p1}`,value:p1}}return{text:n[R]<10?`0${n[R]}`:`${n[R]}`,value:n[R]}}),B=(R,p1)=>{var z1;if(!n.disabledTimesConfig)return!1;const h1=n.disabledTimesConfig(n.order,R==="hours"?p1:void 0);return h1[R]?!!((z1=h1[R])!=null&&z1.includes(p1)):!0},F=(R,p1)=>p1!=="hours"||p.value==="AM"?R:R+12,e1=R=>{const p1=n.is24?24:12,z1=R==="hours"?p1:60,h1=+n[`${R}GridIncrement`],l1=R==="hours"&&!n.is24?h1:0,f1=[];for(let u1=l1;u1<z1;u1+=h1)f1.push({value:n.is24?u1:F(u1,R),text:u1<10?`0${u1}`:`${u1}`});return R==="hours"&&!n.is24&&f1.unshift({value:p.value==="PM"?12:0,text:"12"}),sa(f1,u1=>({active:!1,disabled:f.value.times[R].includes(u1.value)||!O(u1.value,R)||B(R,u1.value)||w(R,u1.value)}))},Y=R=>R>=0?R:59,G=R=>R>=0?R:23,O=(R,p1)=>{const z1=n.minTime?C(rs(n.minTime)):null,h1=n.maxTime?C(rs(n.maxTime)):null,l1=C(rs(M.value,p1,p1==="minutes"||p1==="seconds"?Y(R):G(R)));return z1&&h1?(tn(l1,h1)||B6(l1,h1))&&(ca(l1,z1)||B6(l1,z1)):z1?ca(l1,z1)||B6(l1,z1):h1?tn(l1,h1)||B6(l1,h1):!0},T=R=>n[`no${R[0].toUpperCase()+R.slice(1)}Overlay`],L=R=>{T(R)||(v[R]=!v[R],v[R]?r("overlay-opened",R):r("overlay-closed",R))},W=R=>R==="hours"?wt:R==="minutes"?h0:na,j=()=>{x.value&&clearTimeout(x.value)},E=(R,p1=!0,z1)=>{const h1=p1?V:k,l1=p1?+n[`${R}Increment`]:-+n[`${R}Increment`];O(+n[R]+l1,R)&&r(`update:${R}`,W(R)(h1({[R]:+n[R]},{[R]:+n[`${R}Increment`]}))),!(z1!=null&&z1.keyboard)&&u.value.timeArrowHoldThreshold&&(x.value=setTimeout(()=>{E(R,p1)},u.value.timeArrowHoldThreshold))},I=R=>n.is24?R:(R>=12?p.value="PM":p.value="AM",Te1(R)),a1=()=>{p.value==="PM"?(p.value="AM",r("update:hours",n.hours-12)):(p.value="PM",r("update:hours",n.hours+12)),r("am-pm-change",p.value)},n1=R=>{v[R]=!0},t1=(R,p1,z1)=>{if(R&&n.arrowNavigation){Array.isArray(y.value[p1])?y.value[p1][z1]=R:y.value[p1]=[R];const h1=y.value.reduce((l1,f1)=>f1.map((u1,g1)=>[...l1[g1]||[],f1[g1]]),[]);i(n.closeTimePickerBtn),g.value&&(h1[1]=h1[1].concat(g.value)),c(h1,n.order)}},d1=(R,p1)=>(L(R),r(`update:${R}`,p1));return t({openChildCmp:n1}),(R,p1)=>{var z1;return R.disabled?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",T31,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(h1,l1)=>{var f1,u1,g1;return o.openBlock(),o.createElementBlock("div",{key:l1,class:o.normalizeClass(_.value)},[h1.separator?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(" : ")],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,0),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!R.timePickerInline,dp__inc_dec_button_inline:R.timePickerInline,dp__tp_inline_btn_top:R.timePickerInline,dp__inc_dec_button_disabled:H.value(h1.type)}),"data-test":`${h1.type}-time-inc-btn-${n.order}`,"aria-label":(f1=o.unref(s))==null?void 0:f1.incrementValue(h1.type),tabindex:"0",onKeydown:k1=>o.unref(y3)(k1,()=>E(h1.type,!0,{keyboard:!0}),!0),onClick:k1=>o.unref(u).timeArrowHoldThreshold?void 0:E(h1.type,!0),onMousedown:k1=>o.unref(u).timeArrowHoldThreshold?E(h1.type,!0):void 0,onMouseup:j},[n.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[N31,D31],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[R.$slots["arrow-up"]?o.renderSlot(R.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),R.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Bl),{key:1}))],64))],42,E31),o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,1),type:"button","aria-label":(u1=o.unref(s))==null?void 0:u1.openTpOverlay(h1.type),class:o.normalizeClass({dp__time_display:!0,dp__time_display_block:!R.timePickerInline,dp__time_display_inline:R.timePickerInline,"dp--time-invalid":b.value(h1.type),"dp--time-overlay-btn":!b.value(h1.type)}),disabled:T(h1.type),tabindex:"0","data-test":`${h1.type}-toggle-overlay-btn-${n.order}`,onKeydown:k1=>o.unref(y3)(k1,()=>L(h1.type),!0),onClick:k1=>L(h1.type)},[R.$slots[h1.type]?o.renderSlot(R.$slots,h1.type,{key:0,text:S.value(h1.type).text,value:S.value(h1.type).value}):o.createCommentVNode("",!0),R.$slots[h1.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(S.value(h1.type).text),1)],64))],42,O31),o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,2),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!R.timePickerInline,dp__inc_dec_button_inline:R.timePickerInline,dp__tp_inline_btn_bottom:R.timePickerInline,dp__inc_dec_button_disabled:A.value(h1.type)}),"data-test":`${h1.type}-time-dec-btn-${n.order}`,"aria-label":(g1=o.unref(s))==null?void 0:g1.decrementValue(h1.type),tabindex:"0",onKeydown:k1=>o.unref(y3)(k1,()=>E(h1.type,!1,{keyboard:!0}),!0),onClick:k1=>o.unref(u).timeArrowHoldThreshold?void 0:E(h1.type,!1),onMousedown:k1=>o.unref(u).timeArrowHoldThreshold?E(h1.type,!1):void 0,onMouseup:j},[n.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[B31,F31],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[R.$slots["arrow-down"]?o.renderSlot(R.$slots,"arrow-down",{key:0}):o.createCommentVNode("",!0),R.$slots["arrow-down"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Fl),{key:1}))],64))],42,P31)],64))],2)}),128)),R.is24?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",R31,[R.$slots["am-pm-button"]?o.renderSlot(R.$slots,"am-pm-button",{key:0,toggle:a1,value:p.value}):o.createCommentVNode("",!0),R.$slots["am-pm-button"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:g,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(z1=o.unref(s))==null?void 0:z1.amPmButton,tabindex:"0",onClick:a1,onKeydown:p1[0]||(p1[0]=h1=>o.unref(y3)(h1,()=>a1(),!0))},o.toDisplayString(p.value),41,I31))])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(q.value,(h1,l1)=>(o.openBlock(),o.createBlock(o.Transition,{key:l1,name:o.unref(h)(v[h1.type]),css:o.unref(m)},{default:o.withCtx(()=>[v[h1.type]?(o.openBlock(),o.createBlock(Nn,{key:0,items:e1(h1.type),"is-last":R.autoApply&&!o.unref(u).keepActionRow,"esc-close":R.escClose,type:h1.type,"text-input":R.textInput,config:R.config,"arrow-navigation":R.arrowNavigation,"aria-labels":R.ariaLabels,onSelected:f1=>d1(h1.type,f1),onToggle:f1=>L(h1.type),onResetFlow:p1[1]||(p1[1]=f1=>R.$emit("reset-flow"))},o.createSlots({"button-icon":o.withCtx(()=>[R.$slots["clock-icon"]?o.renderSlot(R.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),R.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(R.timePickerInline?o.unref(va):o.unref(Pl)),{key:1}))]),_:2},[R.$slots[`${h1.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:f1})=>[o.renderSlot(R.$slots,`${h1.type}-overlay-value`,{text:f1.text,value:f1.value})]),key:"0"}:void 0,R.$slots[`${h1.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(R.$slots,`${h1.type}-overlay-header`,{toggle:()=>L(h1.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"]))),128))]))}}}),U31={class:"dp--tp-wrap"},W31=["aria-label","tabindex"],q31=["tabindex"],j31=["aria-label"],yb=o.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...b4},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMatrix:c,setTimePicker:i}=x0(),s=o.useSlots(),{defaultedTransitions:l,defaultedAriaLabels:f,defaultedTextInput:u,defaultedConfig:d,defaultedRange:h}=re(n),{transitionName:m,showTransition:v}=Tn(l),{hideNavigationButtons:p}=B5(),g=o.ref(null),y=o.ref(null),x=o.ref([]),C=o.ref(null);o.onMounted(()=>{r("mount"),!n.timePicker&&n.arrowNavigation?c([ke(g.value)],"time"):i(!0,n.timePicker)});const b=o.computed(()=>h.value.enabled&&n.modelAuto?rb(n.internalModelValue):!0),M=o.ref(!1),w=F=>({hours:Array.isArray(n.hours)?n.hours[F]:n.hours,minutes:Array.isArray(n.minutes)?n.minutes[F]:n.minutes,seconds:Array.isArray(n.seconds)?n.seconds[F]:n.seconds}),z=o.computed(()=>{const F=[];if(h.value.enabled)for(let e1=0;e1<2;e1++)F.push(w(e1));else F.push(w(0));return F}),H=(F,e1=!1,Y="")=>{e1||r("reset-flow"),M.value=F,r(F?"overlay-opened":"overlay-closed",Ye.time),n.arrowNavigation&&i(F),o.nextTick(()=>{Y!==""&&x.value[0]&&x.value[0].openChildCmp(Y)})},A=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:n.autoApply&&!d.value.keepActionRow})),V=z3(s,"timePicker"),k=(F,e1,Y)=>h.value.enabled?e1===0?[F,z.value[1][Y]]:[z.value[0][Y],F]:F,_=F=>{r("update:hours",F)},N=F=>{r("update:minutes",F)},q=F=>{r("update:seconds",F)},S=()=>{if(C.value&&!u.value.enabled&&!n.noOverlayFocus){const F=nb(C.value);F&&F.focus({preventScroll:!0})}},B=F=>{r("overlay-closed",F)};return t({toggleTimePicker:H}),(F,e1)=>{var Y;return o.openBlock(),o.createElementBlock("div",U31,[!F.timePicker&&!F.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:g,type:"button",class:o.normalizeClass(A.value),"aria-label":(Y=o.unref(f))==null?void 0:Y.openTimePicker,tabindex:F.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:e1[0]||(e1[0]=G=>o.unref(y3)(G,()=>H(!0))),onClick:e1[1]||(e1[1]=G=>H(!0))},[F.$slots["clock-icon"]?o.renderSlot(F.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),F.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Pl),{key:1}))],42,W31)),[[o.vShow,!o.unref(p)(F.hideNavigation,"time")]]):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(m)(M.value),css:o.unref(v)&&!F.timePickerInline},{default:o.withCtx(()=>{var G;return[M.value||F.timePicker||F.timePickerInline?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:C,class:o.normalizeClass({dp__overlay:!F.timePickerInline,"dp--overlay-absolute":!n.timePicker&&!F.timePickerInline,"dp--overlay-relative":n.timePicker}),style:o.normalizeStyle(F.timePicker?{height:`${o.unref(d).modeHeight}px`}:void 0),tabindex:F.timePickerInline?void 0:0},[o.createElementVNode("div",{class:o.normalizeClass(F.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[F.$slots["time-picker-overlay"]?o.renderSlot(F.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:_,setMinutes:N,setSeconds:q}):o.createCommentVNode("",!0),F.$slots["time-picker-overlay"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(F.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,(O,T)=>o.withDirectives((o.openBlock(),o.createBlock($31,o.mergeProps({key:T,ref_for:!0},{...F.$props,order:T,hours:O.hours,minutes:O.minutes,seconds:O.seconds,closeTimePickerBtn:y.value,disabledTimesConfig:e.disabledTimesConfig,disabled:T===0?F.fixedStart:F.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:x,"validate-time":(L,W)=>e.validateTime(L,k(W,T,L)),"onUpdate:hours":L=>_(k(L,T,"hours")),"onUpdate:minutes":L=>N(k(L,T,"minutes")),"onUpdate:seconds":L=>q(k(L,T,"seconds")),onMounted:S,onOverlayClosed:B,onOverlayOpened:e1[2]||(e1[2]=L=>F.$emit("overlay-opened",L)),onAmPmChange:e1[3]||(e1[3]=L=>F.$emit("am-pm-change",L))}),o.createSlots({_:2},[o.renderList(o.unref(V),(L,W)=>({name:L,fn:o.withCtx(j=>[o.renderSlot(F.$slots,L,o.mergeProps({ref_for:!0},j))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[o.vShow,T===0?!0:b.value]])),128))],2)),!F.timePicker&&!F.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:y,type:"button",class:o.normalizeClass(A.value),"aria-label":(G=o.unref(f))==null?void 0:G.closeTimePicker,tabindex:"0",onKeydown:e1[4]||(e1[4]=O=>o.unref(y3)(O,()=>H(!1))),onClick:e1[5]||(e1[5]=O=>H(!1))},[F.$slots["calendar-icon"]?o.renderSlot(F.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),F.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(va),{key:1}))],42,j31)),[[o.vShow,!o.unref(p)(F.hideNavigation,"time")]]):o.createCommentVNode("",!0)],2)],14,q31)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])])}}}),xb=(e,t,a,r)=>{const{defaultedRange:n}=re(e),c=(C,b)=>Array.isArray(t[C])?t[C][b]:t[C],i=C=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[C]:t.seconds:0,s=(C,b)=>C?b!==void 0?n0(C,c("hours",b),c("minutes",b),i(b)):n0(C,t.hours,t.minutes,i()):Nl(A1(),i(b)),l=(C,b)=>{t[C]=b},f=o.computed(()=>e.modelAuto&&n.value.enabled?Array.isArray(a.value)?a.value.length>1:!1:n.value.enabled),u=(C,b)=>{const M=Object.fromEntries(Object.keys(t).map(w=>w===C?[w,b]:[w,t[w]].slice()));if(f.value&&!n.value.disableTimeRangeValidation){const w=H=>a.value?n0(a.value[H],M.hours[H],M.minutes[H],M.seconds[H]):null,z=H=>El(a.value[H],0);return!(l2(w(0),w(1))&&(ca(w(0),z(1))||tn(w(1),z(0))))}return!0},d=(C,b)=>{u(C,b)&&(l(C,b),r&&r())},h=C=>{d("hours",C)},m=C=>{d("minutes",C)},v=C=>{d("seconds",C)},p=(C,b,M,w)=>{b&&h(C),!b&&!M&&m(C),M&&v(C),a.value&&w(a.value)},g=C=>{if(C){const b=Array.isArray(C),M=b?[+C[0].hours,+C[1].hours]:+C.hours,w=b?[+C[0].minutes,+C[1].minutes]:+C.minutes,z=b?[+C[0].seconds,+C[1].seconds]:+C.seconds;l("hours",M),l("minutes",w),e.enableSeconds&&l("seconds",z)}},y=(C,b)=>{const M={hours:Array.isArray(t.hours)?t.hours[C]:t.hours,disabledArr:[]};return(b||b===0)&&(M.hours=b),Array.isArray(e.disabledTimes)&&(M.disabledArr=n.value.enabled&&Array.isArray(e.disabledTimes[C])?e.disabledTimes[C]:e.disabledTimes),M},x=o.computed(()=>(C,b)=>{var M;if(Array.isArray(e.disabledTimes)){const{disabledArr:w,hours:z}=y(C,b),H=w.filter(A=>+A.hours===z);return((M=H[0])==null?void 0:M.minutes)==="*"?{hours:[z],minutes:void 0,seconds:void 0}:{hours:[],minutes:(H==null?void 0:H.map(A=>+A.minutes))??[],seconds:(H==null?void 0:H.map(A=>A.seconds?+A.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:h,updateMinutes:m,updateSeconds:v,getSetDateTime:s,updateTimeValues:p,getSecondsValue:i,assignStartTime:g,validateTime:u,disabledTimesConfig:x}},Y31=(e,t)=>{const{modelValue:a,time:r}=En(e,t),{defaultedStartTime:n,defaultedRange:c}=re(e),{updateTimeValues:i,getSetDateTime:s,setTime:l,assignStartTime:f,disabledTimesConfig:u,validateTime:d}=xb(e,r,a,h);function h(){t("update-flow-step")}const m=b=>{const{hours:M,minutes:w,seconds:z}=b;return{hours:+M,minutes:+w,seconds:z?+z:0}},v=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const M=m(e.startTime[0]),w=m(e.startTime[1]);return[N2(A1(),M),N2(A1(),w)]}const b=m(e.startTime);return N2(A1(),b)}return c.value.enabled?[null,null]:null},p=()=>{if(c.value.enabled){const[b,M]=v();a.value=[s(b,0),s(M,1)]}else a.value=s(v())},g=b=>Array.isArray(b)?[X0(A1(b[0])),X0(A1(b[1]))]:[X0(b??A1())],y=(b,M,w)=>{l("hours",b),l("minutes",M),l("seconds",e.enableSeconds?w:0)},x=()=>{const[b,M]=g(a.value);return c.value.enabled?y([b.hours,M.hours],[b.minutes,M.minutes],[b.seconds,M.seconds]):y(b.hours,b.minutes,b.seconds)};o.onMounted(()=>{if(!e.shadow)return f(n.value),a.value?x():p()});const C=()=>{Array.isArray(a.value)?a.value=a.value.map((b,M)=>b&&s(b,M)):a.value=s(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:u,updateTime:(b,M=!0,w=!1)=>{i(b,M,w,C)},validateTime:d}},G31=o.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...b4},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=z3(c,"timePicker"),s=o.ref(null),{time:l,modelValue:f,disabledTimesConfig:u,updateTime:d,validateTime:h}=Y31(n,r);return o.onMounted(()=>{n.shadow||r("mount",null)}),t({getSidebarProps:()=>({modelValue:f,time:l,updateTime:d}),toggleTimePicker:(m,v=!1,p="")=>{var g;(g=s.value)==null||g.toggleTimePicker(m,v,p)}}),(m,v)=>(o.openBlock(),o.createBlock(R5,{"multi-calendars":0,stretch:""},{default:o.withCtx(()=>[o.createVNode(yb,o.mergeProps({ref_key:"tpRef",ref:s},m.$props,{hours:o.unref(l).hours,minutes:o.unref(l).minutes,seconds:o.unref(l).seconds,"internal-model-value":m.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(h),"onUpdate:hours":v[0]||(v[0]=p=>o.unref(d)(p)),"onUpdate:minutes":v[1]||(v[1]=p=>o.unref(d)(p,!1)),"onUpdate:seconds":v[2]||(v[2]=p=>o.unref(d)(p,!1,!0)),onAmPmChange:v[3]||(v[3]=p=>m.$emit("am-pm-change",p)),onResetFlow:v[4]||(v[4]=p=>m.$emit("reset-flow")),onOverlayClosed:v[5]||(v[5]=p=>m.$emit("overlay-toggle",{open:!1,overlay:p})),onOverlayOpened:v[6]||(v[6]=p=>m.$emit("overlay-toggle",{open:!0,overlay:p}))}),o.createSlots({_:2},[o.renderList(o.unref(i),(p,g)=>({name:p,fn:o.withCtx(y=>[o.renderSlot(m.$slots,p,o.normalizeProps(o.guardReactiveProps(y)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),X31={class:"dp--header-wrap"},K31={key:0,class:"dp__month_year_wrap"},Z31={key:0},Q31={class:"dp__month_year_wrap"},J31=["aria-label","data-test","onClick","onKeydown"],e41=o.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...b4},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTransitions:c,defaultedAriaLabels:i,defaultedMultiCalendars:s,defaultedFilters:l,defaultedConfig:f,defaultedHighlight:u,propDates:d}=re(n),{transitionName:h,showTransition:m}=Tn(c),{buildMatrix:v}=x0(),{handleMonthYearChange:p,isDisabled:g,updateMonthYear:y}=l31(n,r),{showLeftIcon:x,showRightIcon:C}=B5(),b=o.ref(!1),M=o.ref(!1),w=o.ref([null,null,null,null]);o.onMounted(()=>{r("mount")});const z=O=>({get:()=>n[O],set:T=>{const L=O===X3.month?X3.year:X3.month;r("update-month-year",{[O]:T,[L]:n[L]}),O===X3.month?S(!0):B(!0)}}),H=o.computed(z(X3.month)),A=o.computed(z(X3.year)),V=o.computed(()=>O=>({month:n.month,year:n.year,items:O===X3.month?n.months:n.years,instance:n.instance,updateMonthYear:y,toggle:O===X3.month?S:B})),k=o.computed(()=>n.months.find(T=>T.value===n.month)||{text:"",value:0}),_=o.computed(()=>sa(n.months,O=>{const T=n.month===O.value,L=an(O.value,ib(n.year,d.value.minDate),sb(n.year,d.value.maxDate))||l.value.months.includes(O.value),W=db(u.value,O.value,n.year);return{active:T,disabled:L,highlighted:W}})),N=o.computed(()=>sa(n.years,O=>{const T=n.year===O.value,L=an(O.value,oa(d.value.minDate),oa(d.value.maxDate))||l.value.years.includes(O.value),W=Ul(u.value,O.value);return{active:T,disabled:L,highlighted:W}})),q=(O,T,L)=>{L!==void 0?O.value=L:O.value=!O.value,O.value?r("overlay-opened",T):r("overlay-closed",T)},S=(O=!1,T)=>{F(O),q(b,Ye.month,T)},B=(O=!1,T)=>{F(O),q(M,Ye.year,T)},F=O=>{O||r("reset-flow")},e1=(O,T)=>{n.arrowNavigation&&(w.value[T]=ke(O),v(w.value,"monthYear"))},Y=o.computed(()=>{var O,T;return[{type:X3.month,index:1,toggle:S,modelValue:H.value,updateModelValue:L=>H.value=L,text:k.value.text,showSelectionGrid:b.value,items:_.value,ariaLabel:(O=i.value)==null?void 0:O.openMonthsOverlay},{type:X3.year,index:2,toggle:B,modelValue:A.value,updateModelValue:L=>A.value=L,text:cb(n.year,n.locale),showSelectionGrid:M.value,items:N.value,ariaLabel:(T=i.value)==null?void 0:T.openYearsOverlay}]}),G=o.computed(()=>n.disableYearSelect?[Y.value[0]]:n.yearFirst?[...Y.value].reverse():Y.value);return t({toggleMonthPicker:S,toggleYearPicker:B,handleMonthYearChange:p}),(O,T)=>{var L,W,j;return o.openBlock(),o.createElementBlock("div",X31,[O.$slots["month-year"]?(o.openBlock(),o.createElementBlock("div",K31,[o.renderSlot(O.$slots,"month-year",o.normalizeProps(o.guardReactiveProps({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:o.unref(y),handleMonthYearChange:o.unref(p),instance:e.instance})))])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[O.$slots["top-extra"]?(o.openBlock(),o.createElementBlock("div",Z31,[o.renderSlot(O.$slots,"top-extra",{value:O.internalModelValue})])):o.createCommentVNode("",!0),o.createElementVNode("div",Q31,[o.unref(x)(o.unref(s),e.instance)&&!O.vertical?(o.openBlock(),o.createBlock(yr,{key:0,"aria-label":(L=o.unref(i))==null?void 0:L.prevMonth,disabled:o.unref(g)(!1),onActivate:T[0]||(T[0]=E=>o.unref(p)(!1,!0)),onSetRef:T[1]||(T[1]=E=>e1(E,0))},{default:o.withCtx(()=>[O.$slots["arrow-left"]?o.renderSlot(O.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),O.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Dl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:O.disableYearSelect}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(G.value,(E,I)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:E.type},[o.createElementVNode("button",{ref_for:!0,ref:a1=>e1(a1,I+1),type:"button",class:"dp__btn dp__month_year_select",tabindex:"0","aria-label":E.ariaLabel,"data-test":`${E.type}-toggle-overlay-${e.instance}`,onClick:E.toggle,onKeydown:a1=>o.unref(y3)(a1,()=>E.toggle(),!0)},[O.$slots[E.type]?o.renderSlot(O.$slots,E.type,{key:0,text:E.text,value:n[E.type]}):o.createCommentVNode("",!0),O.$slots[E.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(E.text),1)],64))],40,J31),o.createVNode(o.Transition,{name:o.unref(h)(E.showSelectionGrid),css:o.unref(m)},{default:o.withCtx(()=>[E.showSelectionGrid?(o.openBlock(),o.createBlock(Nn,{key:0,items:E.items,"arrow-navigation":O.arrowNavigation,"hide-navigation":O.hideNavigation,"is-last":O.autoApply&&!o.unref(f).keepActionRow,"skip-button-ref":!1,config:O.config,type:E.type,"header-refs":[],"esc-close":O.escClose,"menu-wrap-ref":O.menuWrapRef,"text-input":O.textInput,"aria-labels":O.ariaLabels,onSelected:E.updateModelValue,onToggle:E.toggle},o.createSlots({"button-icon":o.withCtx(()=>[O.$slots["calendar-icon"]?o.renderSlot(O.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),O.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(va),{key:1}))]),_:2},[O.$slots[`${E.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:a1})=>[o.renderSlot(O.$slots,`${E.type}-overlay-value`,{text:a1.text,value:a1.value})]),key:"0"}:void 0,O.$slots[`${E.type}-overlay`]?{name:"overlay",fn:o.withCtx(()=>[o.renderSlot(O.$slots,`${E.type}-overlay`,o.mergeProps({ref_for:!0},V.value(E.type)))]),key:"1"}:void 0,O.$slots[`${E.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(O.$slots,`${E.type}-overlay-header`,{toggle:E.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),o.unref(x)(o.unref(s),e.instance)&&O.vertical?(o.openBlock(),o.createBlock(yr,{key:1,"aria-label":(W=o.unref(i))==null?void 0:W.prevMonth,disabled:o.unref(g)(!1),onActivate:T[2]||(T[2]=E=>o.unref(p)(!1,!0))},{default:o.withCtx(()=>[O.$slots["arrow-up"]?o.renderSlot(O.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),O.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Bl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.unref(C)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(yr,{key:2,ref:"rightIcon",disabled:o.unref(g)(!0),"aria-label":(j=o.unref(i))==null?void 0:j.nextMonth,onActivate:T[3]||(T[3]=E=>o.unref(p)(!0,!0)),onSetRef:T[4]||(T[4]=E=>e1(E,O.disableYearSelect?2:3))},{default:o.withCtx(()=>[O.$slots[O.vertical?"arrow-down":"arrow-right"]?o.renderSlot(O.$slots,O.vertical?"arrow-down":"arrow-right",{key:0}):o.createCommentVNode("",!0),O.$slots[O.vertical?"arrow-down":"arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(O.vertical?o.unref(Fl):o.unref(Ol)),{key:1}))]),_:3},8,["disabled","aria-label"])):o.createCommentVNode("",!0)])],64))])}}}),t41=["aria-label"],a41={class:"dp__calendar_header",role:"row"},r41={key:0,class:"dp__calendar_header_item",role:"gridcell"},n41=["aria-label"],c41=o.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1),i41=["aria-label"],s41={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},o41={class:"dp__cell_inner"},l41=["id","aria-selected","aria-disabled","aria-label","data-test","onClick","onKeydown","onMouseenter","onMouseleave","onMousedown"],f41=o.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...b4},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMultiLevelMatrix:c}=x0(),{defaultedTransitions:i,defaultedConfig:s,defaultedAriaLabels:l,defaultedMultiCalendars:f,defaultedWeekNumbers:u,defaultedMultiDates:d}=re(n),h=o.ref(null),m=o.ref({bottom:"",left:"",transform:""}),v=o.ref([]),p=o.ref(null),g=o.ref(!0),y=o.ref(""),x=o.ref({startX:0,endX:0,startY:0,endY:0}),C=o.ref([]),b=o.ref({left:"50%"}),M=o.ref(!1),w=o.computed(()=>n.calendar?n.calendar(n.mappedDates):n.mappedDates),z=o.computed(()=>n.dayNames?Array.isArray(n.dayNames)?n.dayNames:n.dayNames(n.locale,+n.weekStart):Ae1(n.formatLocale,n.locale,+n.weekStart));o.onMounted(()=>{r("mount",{cmp:"calendar",refs:v}),s.value.noSwipe||p.value&&(p.value.addEventListener("touchstart",Y,{passive:!1}),p.value.addEventListener("touchend",G,{passive:!1}),p.value.addEventListener("touchmove",O,{passive:!1})),n.monthChangeOnScroll&&p.value&&p.value.addEventListener("wheel",W,{passive:!1})});const H=t1=>t1?n.vertical?"vNext":"next":n.vertical?"vPrevious":"previous",A=(t1,d1)=>{if(n.transitions){const R=k3(dt(A1(),n.month,n.year));y.value=me(k3(dt(A1(),t1,d1)),R)?i.value[H(!0)]:i.value[H(!1)],g.value=!1,o.nextTick(()=>{g.value=!0})}},V=o.computed(()=>({[n.calendarClassName]:!!n.calendarClassName})),k=o.computed(()=>t1=>{const d1=Ee1(t1);return{dp__marker_dot:d1.type==="dot",dp__marker_line:d1.type==="line"}}),_=o.computed(()=>t1=>l2(t1,h.value)),N=o.computed(()=>({dp__calendar:!0,dp__calendar_next:f.value.count>0&&n.instance!==0})),q=o.computed(()=>t1=>n.hideOffsetDates?t1.current:!0),S=t1=>B4(t1,"yyyy-MM-dd"),B=async(t1,d1,R)=>{const p1=ke(v.value[d1][R]);if(p1){const{width:z1,height:h1}=p1.getBoundingClientRect();h.value=t1.value;let l1={left:`${z1/2}px`},f1=-50;if(await o.nextTick(),C.value[0]){const{left:u1,width:g1}=C.value[0].getBoundingClientRect();u1<0&&(l1={left:"0"},f1=0,b.value.left=`${z1/2}px`),window.innerWidth<u1+g1&&(l1={right:"0"},f1=0,b.value.left=`${g1-z1/2}px`)}m.value={bottom:`${h1}px`,...l1,transform:`translateX(${f1}%)`},r("tooltip-open",t1.marker)}},F=async(t1,d1,R)=>{var p1,z1;if(M.value&&d.value.enabled&&d.value.dragSelect)return r("select-date",t1);r("set-hover-date",t1),(z1=(p1=t1.marker)==null?void 0:p1.tooltip)!=null&&z1.length&&await B(t1,d1,R)},e1=t1=>{h.value&&(h.value=null,m.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),r("tooltip-close",t1.marker))},Y=t1=>{x.value.startX=t1.changedTouches[0].screenX,x.value.startY=t1.changedTouches[0].screenY},G=t1=>{x.value.endX=t1.changedTouches[0].screenX,x.value.endY=t1.changedTouches[0].screenY,T()},O=t1=>{n.vertical&&!n.inline&&t1.preventDefault()},T=()=>{const t1=n.vertical?"Y":"X";Math.abs(x.value[`start${t1}`]-x.value[`end${t1}`])>10&&r("handle-swipe",x.value[`start${t1}`]>x.value[`end${t1}`]?"right":"left")},L=(t1,d1,R)=>{t1&&(Array.isArray(v.value[d1])?v.value[d1][R]=t1:v.value[d1]=[t1]),n.arrowNavigation&&c(v.value,"calendar")},W=t1=>{n.monthChangeOnScroll&&(t1.preventDefault(),r("handle-scroll",t1))},j=t1=>u.value.type==="local"?Sl(t1.value,{weekStartsOn:+n.weekStart}):u.value.type==="iso"?Vl(t1.value):typeof u.value.type=="function"?u.value.type(t1.value):"",E=t1=>{const d1=t1[0];return u.value.hideOnOffsetDates?t1.some(R=>R.current)?j(d1):"":j(d1)},I=(t1,d1)=>{d.value.enabled||(r0(t1,s.value),r("select-date",d1))},a1=t1=>{r0(t1,s.value)},n1=t1=>{d.value.enabled&&d.value.dragSelect?(M.value=!0,r("select-date",t1)):d.value.enabled&&r("select-date",t1)};return t({triggerTransition:A}),(t1,d1)=>{var R;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(N.value)},[o.createElementVNode("div",{ref_key:"calendarWrapRef",ref:p,role:"grid",class:o.normalizeClass(V.value),"aria-label":(R=o.unref(l))==null?void 0:R.calendarWrap},[o.createElementVNode("div",a41,[t1.weekNumbers?(o.openBlock(),o.createElementBlock("div",r41,o.toDisplayString(t1.weekNumName),1)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,(p1,z1)=>{var h1,l1;return o.openBlock(),o.createElementBlock("div",{key:z1,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(l1=(h1=o.unref(l))==null?void 0:h1.weekDay)==null?void 0:l1.call(h1,z1)},[t1.$slots["calendar-header"]?o.renderSlot(t1.$slots,"calendar-header",{key:0,day:p1,index:z1}):o.createCommentVNode("",!0),t1.$slots["calendar-header"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(p1),1)],64))],8,n41)}),128))]),c41,o.createVNode(o.Transition,{name:y.value,css:!!t1.transitions},{default:o.withCtx(()=>{var p1;return[g.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup","aria-label":((p1=o.unref(l))==null?void 0:p1.calendarDays)||void 0,onMouseleave:d1[1]||(d1[1]=z1=>M.value=!1)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(w.value,(z1,h1)=>(o.openBlock(),o.createElementBlock("div",{key:h1,class:"dp__calendar_row",role:"row"},[t1.weekNumbers?(o.openBlock(),o.createElementBlock("div",s41,[o.createElementVNode("div",o41,o.toDisplayString(E(z1.days)),1)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z1.days,(l1,f1)=>{var u1,g1,k1;return o.openBlock(),o.createElementBlock("div",{id:S(l1.value),ref_for:!0,ref:b1=>L(b1,h1,f1),key:f1+h1,role:"gridcell",class:"dp__calendar_item","aria-selected":(l1.classData.dp__active_date||l1.classData.dp__range_start||l1.classData.dp__range_start)??void 0,"aria-disabled":l1.classData.dp__cell_disabled||void 0,"aria-label":(g1=(u1=o.unref(l))==null?void 0:u1.day)==null?void 0:g1.call(u1,l1),tabindex:"0","data-test":l1.value,onClick:o.withModifiers(b1=>I(b1,l1),["prevent"]),onKeydown:b1=>o.unref(y3)(b1,()=>t1.$emit("select-date",l1)),onMouseenter:b1=>F(l1,h1,f1),onMouseleave:b1=>e1(l1),onMousedown:b1=>n1(l1),onMouseup:d1[0]||(d1[0]=b1=>M.value=!1)},[o.createElementVNode("div",{class:o.normalizeClass(["dp__cell_inner",l1.classData])},[t1.$slots.day&&q.value(l1)?o.renderSlot(t1.$slots,"day",{key:0,day:+l1.text,date:l1.value}):o.createCommentVNode("",!0),t1.$slots.day?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(l1.text),1)],64)),l1.marker&&q.value(l1)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[t1.$slots.marker?o.renderSlot(t1.$slots,"marker",{key:0,marker:l1.marker,day:+l1.text,date:l1.value}):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(k.value(l1.marker)),style:o.normalizeStyle(l1.marker.color?{backgroundColor:l1.marker.color}:{})},null,6))],64)):o.createCommentVNode("",!0),_.value(l1.value)?(o.openBlock(),o.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:C,class:"dp__marker_tooltip",style:o.normalizeStyle(m.value)},[(k1=l1.marker)!=null&&k1.tooltip?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:a1},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l1.marker.tooltip,(b1,H1)=>(o.openBlock(),o.createElementBlock("div",{key:H1,class:"dp__tooltip_text"},[t1.$slots["marker-tooltip"]?o.renderSlot(t1.$slots,"marker-tooltip",{key:0,tooltip:b1,day:l1.value}):o.createCommentVNode("",!0),t1.$slots["marker-tooltip"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{class:"dp__tooltip_mark",style:o.normalizeStyle(b1.color?{backgroundColor:b1.color}:{})},null,4),o.createElementVNode("div",null,o.toDisplayString(b1.text),1)],64))]))),128)),o.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:o.normalizeStyle(b.value)},null,4)])):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0)],2)],40,l41)}),128))]))),128))],40,i41)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])],10,t41)],2)}}}),sm=e=>Array.isArray(e),u41=(e,t,a,r)=>{const n=o.ref([]),c=o.ref(new Date),i=o.ref(),{modelValue:s,calendars:l,time:f,today:u}=En(e,t),{defaultedMultiCalendars:d,defaultedStartTime:h,defaultedRange:m,defaultedConfig:v,defaultedTz:p,propDates:g,defaultedMultiDates:y}=re(e),{validateMonthYearInRange:x,isDisabled:C,isDateRangeAllowed:b,checkMinMaxRange:M}=b0(e),{updateTimeValues:w,getSetDateTime:z,setTime:H,assignStartTime:A,validateTime:V,disabledTimesConfig:k}=xb(e,f,s,r),_=o.computed(()=>y1=>l.value[y1]?l.value[y1].month:0),N=o.computed(()=>y1=>l.value[y1]?l.value[y1].year:0),q=y1=>!v.value.keepViewOnOffsetClick||y1?!0:!i.value,S=(y1,m1,S1,T1=!1)=>{var Q1,Q2;q(T1)&&(l.value[y1]||(l.value[y1]={month:0,year:0}),l.value[y1].month=am(m1)?(Q1=l.value[y1])==null?void 0:Q1.month:m1,l.value[y1].year=am(S1)?(Q2=l.value[y1])==null?void 0:Q2.year:S1)},B=()=>{e.autoApply&&t("select-date")};o.watch(s,(y1,m1)=>{JSON.stringify(y1)!==JSON.stringify(m1)&&Y()},{deep:!0}),o.onMounted(()=>{e.shadow||(s.value||(t1(),h.value&&A(h.value)),Y(!0),e.focusStartDate&&e.startDate&&t1())});const F=o.computed(()=>{var y1;return(y1=e.flow)!=null&&y1.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),e1=()=>{e.autoApply&&F.value&&t("auto-apply")},Y=(y1=!1)=>{if(s.value)return Array.isArray(s.value)?(n.value=s.value,E(y1)):T(s.value,y1);if(d.value.count&&y1&&!e.startDate)return O(A1(),y1)},G=()=>Array.isArray(s.value)&&m.value.enabled?o2(s.value[0])===o2(s.value[1]??s.value[0]):!1,O=(y1,m1=!1)=>{if((!d.value.count||!d.value.static||m1)&&S(0,o2(y1),n2(y1)),d.value.count&&(!d.value.solo||!s.value||G()))for(let S1=1;S1<d.value.count;S1++){const T1=N2(A1(),{month:_.value(S1-1),year:N.value(S1-1)}),Q1=Ex(T1,{months:1});l.value[S1]={month:o2(Q1),year:n2(Q1)}}},T=(y1,m1)=>{O(y1),H("hours",wt(y1)),H("minutes",h0(y1)),H("seconds",na(y1)),d.value.count&&m1&&n1()},L=y1=>{if(d.value.count){if(d.value.solo)return 0;const m1=o2(y1[0]),S1=o2(y1[1]);return Math.abs(S1-m1)<d.value.count?0:1}return 1},W=(y1,m1)=>{y1[1]&&m.value.showLastInRange?O(y1[L(y1)],m1):O(y1[0],m1);const S1=(T1,Q1)=>[T1(y1[0]),y1[1]?T1(y1[1]):f[Q1][1]];H("hours",S1(wt,"hours")),H("minutes",S1(h0,"minutes")),H("seconds",S1(na,"seconds"))},j=(y1,m1)=>{if((m.value.enabled||e.weekPicker)&&!y.value.enabled)return W(y1,m1);if(y.value.enabled&&m1){const S1=y1[y1.length-1];return T(S1,m1)}},E=y1=>{const m1=s.value;j(m1,y1),d.value.count&&d.value.solo&&n1()},I=(y1,m1)=>{const S1=N2(A1(),{month:_.value(m1),year:N.value(m1)}),T1=y1<0?f4(S1,1):ia(S1,1);x(o2(T1),n2(T1),y1<0,e.preventMinMaxNavigation)&&(S(m1,o2(T1),n2(T1)),t("update-month-year",{instance:m1,month:o2(T1),year:n2(T1)}),d.value.count&&!d.value.solo&&a1(m1),a())},a1=y1=>{for(let m1=y1-1;m1>=0;m1--){const S1=ia(N2(A1(),{month:_.value(m1+1),year:N.value(m1+1)}),1);S(m1,o2(S1),n2(S1))}for(let m1=y1+1;m1<=d.value.count-1;m1++){const S1=f4(N2(A1(),{month:_.value(m1-1),year:N.value(m1-1)}),1);S(m1,o2(S1),n2(S1))}},n1=()=>{if(Array.isArray(s.value)&&s.value.length===2){const y1=A1(A1(s.value[1]?s.value[1]:f4(s.value[0],1))),[m1,S1]=[o2(s.value[0]),n2(s.value[0])],[T1,Q1]=[o2(s.value[1]),n2(s.value[1])];(m1!==T1||m1===T1&&S1!==Q1)&&d.value.solo&&S(1,o2(y1),n2(y1))}else s.value&&!Array.isArray(s.value)&&(S(0,o2(s.value),n2(s.value)),O(A1()))},t1=()=>{e.startDate&&(S(0,o2(A1(e.startDate)),n2(A1(e.startDate))),d.value.count&&a1(0))},d1=(y1,m1)=>{if(e.monthChangeOnScroll){const S1=new Date().getTime()-c.value.getTime(),T1=Math.abs(y1.deltaY);let Q1=500;T1>1&&(Q1=100),T1>100&&(Q1=0),S1>Q1&&(c.value=new Date,I(e.monthChangeOnScroll!=="inverse"?-y1.deltaY:y1.deltaY,m1))}},R=(y1,m1,S1=!1)=>{e.monthChangeOnArrows&&e.vertical===S1&&p1(y1,m1)},p1=(y1,m1)=>{I(y1==="right"?-1:1,m1)},z1=y1=>{if(g.value.markers)return Uc(y1.value,g.value.markers)},h1=(y1,m1)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[y1==0,!0];case"fair":return[y1==0||m1>y1,!0];case"append":return[!1,!1];default:return[!1,!1]}},l1=(y1,m1,S1,T1)=>{if(e.sixWeeks&&y1.length<6){const Q1=6-y1.length,Q2=(m1.getDay()+7-T1)%7,we=6-(S1.getDay()+7-T1)%7,[d3,j3]=h1(Q2,we);for(let k2=1;k2<=Q1;k2++)if(j3?!!(k2%2)==d3:d3){const xe=y1[0].days[0],X4=f1(J3(xe.value,-7),o2(m1));y1.unshift({days:X4})}else{const xe=y1[y1.length-1],X4=xe.days[xe.days.length-1],K4=f1(J3(X4.value,1),o2(m1));y1.push({days:K4})}}return y1},f1=(y1,m1)=>{const S1=A1(y1),T1=[];for(let Q1=0;Q1<7;Q1++){const Q2=J3(S1,Q1),we=o2(Q2)!==m1;T1.push({text:e.hideOffsetDates&&we?"":Q2.getDate(),value:Q2,current:!we,classData:{}})}return T1},u1=(y1,m1)=>{const S1=[],T1=new Date(m1,y1),Q1=new Date(m1,y1+1,0),Q2=e.weekStart,we=y4(T1,{weekStartsOn:Q2}),d3=j3=>{const k2=f1(j3,y1);if(S1.push({days:k2}),!S1[S1.length-1].days.some(xe=>l2(k3(xe.value),k3(Q1)))){const xe=J3(j3,7);d3(xe)}};return d3(we),l1(S1,T1,Q1,Q2)},g1=y1=>{const m1=n0(A1(y1.value),f.hours,f.minutes,K1());t("date-update",m1),y.value.enabled?Wl(m1,s,y.value.limit):s.value=m1,r(),o.nextTick().then(()=>{e1()})},k1=y1=>m.value.noDisabledRange?ob(n.value[0],y1).some(m1=>C(m1)):!1,b1=()=>{n.value=s.value?s.value.slice():[],n.value.length===2&&!(m.value.fixedStart||m.value.fixedEnd)&&(n.value=[])},H1=(y1,m1)=>{const S1=[A1(y1.value),J3(A1(y1.value),+m.value.autoRange)];b(S1)?(m1&&F1(y1.value),n.value=S1):t("invalid-date",y1.value)},F1=y1=>{const m1=o2(A1(y1)),S1=n2(A1(y1));if(S(0,m1,S1),d.value.count>0)for(let T1=1;T1<d.value.count;T1++){const Q1=Ie1(N2(A1(y1),{year:_.value(T1-1),month:N.value(T1-1)}));S(T1,Q1.month,Q1.year)}},$1=y1=>{if(k1(y1.value)||!M(y1.value,s.value,m.value.fixedStart?0:1))return t("invalid-date",y1.value);n.value=vb(A1(y1.value),s,t,m)},W1=(y1,m1)=>{if(b1(),m.value.autoRange)return H1(y1,m1);if(m.value.fixedStart||m.value.fixedEnd)return $1(y1);n.value[0]?M(A1(y1.value),s.value)&&!k1(y1.value)?ne(A1(y1.value),A1(n.value[0]))?(n.value.unshift(A1(y1.value)),t("range-end",n.value[0])):(n.value[1]=A1(y1.value),t("range-end",n.value[1])):(e.autoApply&&t("auto-apply-invalid",y1.value),t("invalid-date",y1.value)):(n.value[0]=A1(y1.value),t("range-start",n.value[0]))},K1=(y1=!0)=>e.enableSeconds?Array.isArray(f.seconds)?y1?f.seconds[0]:f.seconds[1]:f.seconds:0,d2=y1=>{n.value[y1]=n0(n.value[y1],f.hours[y1],f.minutes[y1],K1(y1!==1))},G1=()=>{var y1,m1;n.value[0]&&n.value[1]&&+((y1=n.value)==null?void 0:y1[0])>+((m1=n.value)==null?void 0:m1[1])&&(n.value.reverse(),t("range-start",n.value[0]),t("range-end",n.value[1]))},j2=()=>{n.value.length&&(n.value[0]&&!n.value[1]?d2(0):(d2(0),d2(1),r()),G1(),s.value=n.value.slice(),I5(n.value,t,e.autoApply,e.modelAuto))},O1=(y1,m1=!1)=>{if(C(y1.value)||!y1.current&&e.hideOffsetDates)return t("invalid-date",y1.value);if(i.value=JSON.parse(JSON.stringify(y1)),!m.value.enabled)return g1(y1);sm(f.hours)&&sm(f.minutes)&&!y.value.enabled&&(W1(y1,m1),j2())},c2=(y1,m1)=>{var S1;S(y1,m1.month,m1.year,!0),d.value.count&&!d.value.solo&&a1(y1),t("update-month-year",{instance:y1,month:m1.month,year:m1.year}),a(d.value.solo?y1:void 0);const T1=(S1=e.flow)!=null&&S1.length?e.flow[e.flowStep]:void 0;!m1.fromNav&&(T1===Ye.month||T1===Ye.year)&&r()},Y2=(y1,m1)=>{pb({value:y1,modelValue:s,range:m.value.enabled,timezone:m1?void 0:p.value.timezone}),B(),e.multiCalendars&&o.nextTick().then(()=>Y(!0))},m2=()=>{m.value.enabled?s.value&&Array.isArray(s.value)&&s.value[0]?s.value=ne(A1(),s.value[0])?[A1(),s.value[0]]:[s.value[0],A1()]:s.value=[A1()]:s.value=A1(),B()},A2=()=>{if(Array.isArray(s.value))if(y.value.enabled){const y1=Pe();s.value[s.value.length-1]=z(y1)}else s.value=s.value.map((y1,m1)=>y1&&z(y1,m1));else s.value=z(s.value);t("time-update")},Pe=()=>Array.isArray(s.value)&&s.value.length?s.value[s.value.length-1]:null;return{calendars:l,modelValue:s,month:_,year:N,time:f,disabledTimesConfig:k,today:u,validateTime:V,getCalendarDays:u1,getMarker:z1,handleScroll:d1,handleSwipe:p1,handleArrow:R,selectDate:O1,updateMonthYear:c2,presetDate:Y2,selectCurrentDate:m2,updateTime:(y1,m1=!0,S1=!1)=>{w(y1,m1,S1,A2)}}},d41={key:0},h41=o.defineComponent({__name:"DatePicker",props:{...b4},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,{calendars:c,month:i,year:s,modelValue:l,time:f,disabledTimesConfig:u,today:d,validateTime:h,getCalendarDays:m,getMarker:v,handleArrow:p,handleScroll:g,handleSwipe:y,selectDate:x,updateMonthYear:C,presetDate:b,selectCurrentDate:M,updateTime:w}=u41(n,r,G,O),z=o.useSlots(),{setHoverDate:H,getDayClassData:A,clearHoverDate:V}=h31(l,n),{defaultedMultiCalendars:k}=re(n),_=o.ref([]),N=o.ref([]),q=o.ref(null),S=z3(z,"calendar"),B=z3(z,"monthYear"),F=z3(z,"timePicker"),e1=d1=>{n.shadow||r("mount",d1)};o.watch(c,()=>{n.shadow||setTimeout(()=>{r("recalculate-position")},0)},{deep:!0});const Y=o.computed(()=>d1=>m(i.value(d1),s.value(d1)).map(R=>({...R,days:R.days.map(p1=>(p1.marker=v(p1),p1.classData=A(p1),p1))})));function G(d1){var R;d1||d1===0?(R=N.value[d1])==null||R.triggerTransition(i.value(d1),s.value(d1)):N.value.forEach((p1,z1)=>p1.triggerTransition(i.value(z1),s.value(z1)))}function O(){r("update-flow-step")}const T=(d1,R=!1)=>{x(d1,R),n.spaceConfirm&&r("select-date")},L=(d1,R,p1=0)=>{var z1;(z1=_.value[p1])==null||z1.toggleMonthPicker(d1,R)},W=(d1,R,p1=0)=>{var z1;(z1=_.value[p1])==null||z1.toggleYearPicker(d1,R)},j=(d1,R,p1)=>{var z1;(z1=q.value)==null||z1.toggleTimePicker(d1,R,p1)},E=d1=>{if(!n.range){const R=l.value?l.value:d,p1=d1?y4(R,{weekStartsOn:1}):Ix(R,{weekStartsOn:1});x({value:p1,current:o2(R)===i.value(0),text:"",classData:{}})}},I=d1=>{var R;(R=_.value[0])==null||R.handleMonthYearChange(d1,!0)},a1=d1=>{C(0,{month:i.value(0),year:s.value(0)+(d1?1:-1),fromNav:!0})},n1=(d1,R)=>{d1===Ye.time&&r(`time-picker-${R?"open":"close"}`),r("overlay-toggle",{open:R,overlay:d1})},t1=d1=>{r("overlay-toggle",{open:!1,overlay:d1}),r("focus-menu")};return t({clearHoverDate:V,presetDate:b,selectCurrentDate:M,toggleMonthPicker:L,toggleYearPicker:W,toggleTimePicker:j,handleArrow:p,updateMonthYear:C,getSidebarProps:()=>({modelValue:l,month:i,year:s,time:f,updateTime:w,updateMonthYear:C,selectDate:x,presetDate:b}),changeMonth:I,changeYear:a1,selectWeekDate:E}),(d1,R)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(R5,{"multi-calendars":o.unref(k).count,collapse:d1.collapse},{default:o.withCtx(({instance:p1,index:z1})=>[d1.disableMonthYearSelect?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(e41,o.mergeProps({key:0,ref:h1=>{h1&&(_.value[z1]=h1)},months:o.unref(ab)(d1.formatLocale,d1.locale,d1.monthNameFormat),years:o.unref(Rl)(d1.yearRange,d1.locale,d1.reverseYears),month:o.unref(i)(p1),year:o.unref(s)(p1),instance:p1},d1.$props,{onMount:R[0]||(R[0]=h1=>e1(o.unref(G0).header)),onResetFlow:R[1]||(R[1]=h1=>d1.$emit("reset-flow")),onUpdateMonthYear:h1=>o.unref(C)(p1,h1),onOverlayClosed:t1,onOverlayOpened:R[2]||(R[2]=h1=>d1.$emit("overlay-toggle",{open:!0,overlay:h1}))}),o.createSlots({_:2},[o.renderList(o.unref(B),(h1,l1)=>({name:h1,fn:o.withCtx(f1=>[o.renderSlot(d1.$slots,h1,o.normalizeProps(o.guardReactiveProps(f1)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),o.createVNode(f41,o.mergeProps({ref:h1=>{h1&&(N.value[z1]=h1)},"mapped-dates":Y.value(p1),month:o.unref(i)(p1),year:o.unref(s)(p1),instance:p1},d1.$props,{onSelectDate:h1=>o.unref(x)(h1,p1!==1),onHandleSpace:h1=>T(h1,p1!==1),onSetHoverDate:R[3]||(R[3]=h1=>o.unref(H)(h1)),onHandleScroll:h1=>o.unref(g)(h1,p1),onHandleSwipe:h1=>o.unref(y)(h1,p1),onMount:R[4]||(R[4]=h1=>e1(o.unref(G0).calendar)),onResetFlow:R[5]||(R[5]=h1=>d1.$emit("reset-flow")),onTooltipOpen:R[6]||(R[6]=h1=>d1.$emit("tooltip-open",h1)),onTooltipClose:R[7]||(R[7]=h1=>d1.$emit("tooltip-close",h1))}),o.createSlots({_:2},[o.renderList(o.unref(S),(h1,l1)=>({name:h1,fn:o.withCtx(f1=>[o.renderSlot(d1.$slots,h1,o.normalizeProps(o.guardReactiveProps({...f1})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),d1.enableTimePicker?(o.openBlock(),o.createElementBlock("div",d41,[d1.$slots["time-picker"]?o.renderSlot(d1.$slots,"time-picker",o.normalizeProps(o.mergeProps({key:0},{time:o.unref(f),updateTime:o.unref(w)}))):(o.openBlock(),o.createBlock(yb,o.mergeProps({key:1,ref_key:"timePickerRef",ref:q},d1.$props,{hours:o.unref(f).hours,minutes:o.unref(f).minutes,seconds:o.unref(f).seconds,"internal-model-value":d1.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(h),onMount:R[8]||(R[8]=p1=>e1(o.unref(G0).timePicker)),"onUpdate:hours":R[9]||(R[9]=p1=>o.unref(w)(p1)),"onUpdate:minutes":R[10]||(R[10]=p1=>o.unref(w)(p1,!1)),"onUpdate:seconds":R[11]||(R[11]=p1=>o.unref(w)(p1,!1,!0)),onResetFlow:R[12]||(R[12]=p1=>d1.$emit("reset-flow")),onOverlayClosed:R[13]||(R[13]=p1=>n1(p1,!1)),onOverlayOpened:R[14]||(R[14]=p1=>n1(p1,!0)),onAmPmChange:R[15]||(R[15]=p1=>d1.$emit("am-pm-change",p1))}),o.createSlots({_:2},[o.renderList(o.unref(F),(p1,z1)=>({name:p1,fn:o.withCtx(h1=>[o.renderSlot(d1.$slots,p1,o.normalizeProps(o.guardReactiveProps(h1)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):o.createCommentVNode("",!0)],64))}}),m41=(e,t)=>{const a=o.ref(),{defaultedMultiCalendars:r,defaultedConfig:n,defaultedHighlight:c,defaultedRange:i,propDates:s,defaultedFilters:l,defaultedMultiDates:f}=re(e),{modelValue:u,year:d,month:h,calendars:m}=En(e,t),{isDisabled:v}=b0(e),{selectYear:p,groupedYears:g,showYearPicker:y,isDisabled:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M}=gb({modelValue:u,multiCalendars:r,highlight:c,calendars:m,propDates:s,month:h,year:d,filters:l,props:e,emit:t}),w=(S,B)=>[S,B].map(F=>B4(F,"MMMM",{locale:e.formatLocale})).join("-"),z=o.computed(()=>S=>u.value?Array.isArray(u.value)?u.value.some(B=>Jh(S,B)):Jh(u.value,S):!1),H=S=>{if(i.value.enabled){if(Array.isArray(u.value)){const B=l2(S,u.value[0])||l2(S,u.value[1]);return P5(u.value,a.value,S)&&!B}return!1}return!1},A=(S,B)=>S.quarter===Yh(B)&&S.year===n2(B),V=S=>typeof c.value=="function"?c.value({quarter:Yh(S),year:n2(S)}):!!c.value.quarters.find(B=>A(B,S)),k=o.computed(()=>S=>{const B=N2(new Date,{year:d.value(S)});return D11({start:Hl(B),end:Rx(B)}).map(F=>{const e1=$0(F),Y=Gh(F),G=v(F),O=H(e1),T=V(e1);return{text:w(e1,Y),value:e1,active:z.value(e1),highlighted:T,disabled:G,isBetween:O}})}),_=S=>{Wl(S,u,f.value.limit),t("auto-apply",!0)},N=S=>{u.value=ql(u,S,t),I5(u.value,t,e.autoApply,e.modelAuto)},q=S=>{u.value=S,t("auto-apply")};return{defaultedConfig:n,defaultedMultiCalendars:r,groupedYears:g,year:d,isDisabled:x,quarters:k,showYearPicker:y,modelValue:u,setHoverDate:S=>{a.value=S},selectYear:p,selectQuarter:(S,B,F)=>{if(!F)return m.value[B].month=o2(Gh(S)),f.value.enabled?_(S):i.value.enabled?N(S):q(S)},toggleYearPicker:C,handleYearSelect:b,handleYear:M}},p41={class:"dp--quarter-items"},v41=["data-test","disabled","onClick","onMouseover"],g41=o.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...b4},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=z3(c,"yearMode"),{defaultedMultiCalendars:s,defaultedConfig:l,groupedYears:f,year:u,isDisabled:d,quarters:h,modelValue:m,showYearPicker:v,setHoverDate:p,selectQuarter:g,toggleYearPicker:y,handleYearSelect:x,handleYear:C}=m41(n,r);return t({getSidebarProps:()=>({modelValue:m,year:u,selectQuarter:g,handleYearSelect:x,handleYear:C})}),(b,M)=>(o.openBlock(),o.createBlock(R5,{"multi-calendars":o.unref(s).count,collapse:b.collapse,stretch:""},{default:o.withCtx(({instance:w})=>[o.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:o.normalizeStyle({minHeight:`${o.unref(l).modeHeight}px`})},[b.$slots["top-extra"]?o.renderSlot(b.$slots,"top-extra",{key:0,value:b.internalModelValue}):o.createCommentVNode("",!0),o.createElementVNode("div",null,[o.createVNode(mb,o.mergeProps(b.$props,{items:o.unref(f)(w),instance:w,"show-year-picker":o.unref(v)[w],year:o.unref(u)(w),"is-disabled":z=>o.unref(d)(w,z),onHandleYear:z=>o.unref(C)(w,z),onYearSelect:z=>o.unref(x)(z,w),onToggleYearPicker:z=>o.unref(y)(w,z==null?void 0:z.flow,z==null?void 0:z.show)}),o.createSlots({_:2},[o.renderList(o.unref(i),(z,H)=>({name:z,fn:o.withCtx(A=>[o.renderSlot(b.$slots,z,o.normalizeProps(o.guardReactiveProps(A)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),o.createElementVNode("div",p41,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(h)(w),(z,H)=>(o.openBlock(),o.createElementBlock("div",{key:H},[o.createElementVNode("button",{type:"button",class:o.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":z.active,"dp--qr-btn-between":z.isBetween,"dp--qr-btn-disabled":z.disabled,"dp--highlighted":z.highlighted}]),"data-test":z.value,disabled:z.disabled,onClick:A=>o.unref(g)(z.value,w,z.disabled),onMouseover:A=>o.unref(p)(z.value)},[b.$slots.quarter?o.renderSlot(b.$slots,"quarter",{key:0,value:z.value,text:z.text}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(z.text),1)],64))],42,v41)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),y41=["id","aria-label"],x41={key:0,class:"dp--menu-load-container"},b41=o.createElementVNode("span",{class:"dp--menu-loader"},null,-1),C41=[b41],M41={key:0,class:"dp__sidebar_left"},z41=["data-test","onClick","onKeydown"],w41={key:2,class:"dp__sidebar_right"},_41={key:3,class:"dp__action_extra"},om=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...F5,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.ref(null),i=o.computed(()=>{const{openOnTop:l1,...f1}=n;return{...f1,flowStep:H.value,collapse:n.collapse,noOverlayFocus:n.noOverlayFocus,menuWrapRef:c.value}}),{setMenuFocused:s,setShiftKey:l,control:f}=hb(),u=o.useSlots(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:m}=re(n),v=o.ref(null),p=o.ref(0),g=o.ref(null),y=o.ref(!1),x=o.ref(null);o.onMounted(()=>{if(!n.shadow){y.value=!0,C(),window.addEventListener("resize",C);const l1=ke(c);if(l1&&!d.value.enabled&&!h.value.enabled&&(s(!0),q()),l1){const f1=u1=>{m.value.allowPreventDefault&&u1.preventDefault(),r0(u1,m.value,!0)};l1.addEventListener("pointerdown",f1),l1.addEventListener("mousedown",f1)}}}),o.onUnmounted(()=>{window.removeEventListener("resize",C)});const C=()=>{const l1=ke(g);l1&&(p.value=l1.getBoundingClientRect().width)},{arrowRight:b,arrowLeft:M,arrowDown:w,arrowUp:z}=x0(),{flowStep:H,updateFlowStep:A,childMount:V,resetFlow:k}=m31(n,r,x),_=o.computed(()=>n.monthPicker?L31:n.yearPicker?A31:n.timePicker?G31:n.quarterPicker?g41:h41),N=o.computed(()=>{var l1;if(m.value.arrowLeft)return m.value.arrowLeft;const f1=(l1=c.value)==null?void 0:l1.getBoundingClientRect(),u1=n.getInputRect();return u1.width<p.value&&u1.left<=((f1==null?void 0:f1.left)??0)?`${u1.width/2}px`:"50%"}),q=()=>{const l1=ke(c);l1&&l1.focus({preventScroll:!0})},S=o.computed(()=>{var l1;return((l1=x.value)==null?void 0:l1.getSidebarProps())||{}}),B=()=>{n.openOnTop&&r("recalculate-position")},F=z3(u,"action"),e1=o.computed(()=>n.monthPicker||n.yearPicker?z3(u,"monthYear"):n.timePicker?z3(u,"timePicker"):z3(u,"shared")),Y=o.computed(()=>n.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),G=o.computed(()=>({dp__menu_disabled:n.disabled,dp__menu_readonly:n.readonly,"dp-menu-loading":n.loading})),O=o.computed(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,[n.menuClassName]:!!n.menuClassName})),T=l1=>{r0(l1,m.value,!0)},L=()=>{n.escClose&&r("close-picker")},W=l1=>{if(n.arrowNavigation){if(l1===c3.up)return z();if(l1===c3.down)return w();if(l1===c3.left)return M();if(l1===c3.right)return b()}else l1===c3.right||l1===c3.up?n1("handleArrow",c3.left,0,l1===c3.up):n1("handleArrow",c3.right,0,l1===c3.down)},j=l1=>{l(l1.shiftKey),!n.disableMonthYearSelect&&l1.code===te.tab&&l1.target.classList.contains("dp__menu")&&f.value.shiftKeyInMenu&&(l1.preventDefault(),r0(l1,m.value,!0),r("close-picker"))},E=()=>{q(),r("time-picker-close")},I=l1=>{var f1,u1,g1;(f1=x.value)==null||f1.toggleTimePicker(!1,!1),(u1=x.value)==null||u1.toggleMonthPicker(!1,!1,l1),(g1=x.value)==null||g1.toggleYearPicker(!1,!1,l1)},a1=(l1,f1=0)=>{var u1,g1,k1;return l1==="month"?(u1=x.value)==null?void 0:u1.toggleMonthPicker(!1,!0,f1):l1==="year"?(g1=x.value)==null?void 0:g1.toggleYearPicker(!1,!0,f1):l1==="time"?(k1=x.value)==null?void 0:k1.toggleTimePicker(!0,!1):I(f1)},n1=(l1,...f1)=>{var u1,g1;(u1=x.value)!=null&&u1[l1]&&((g1=x.value)==null||g1[l1](...f1))},t1=()=>{n1("selectCurrentDate")},d1=(l1,f1)=>{n1("presetDate",l1,f1)},R=()=>{n1("clearHoverDate")},p1=(l1,f1)=>{n1("updateMonthYear",l1,f1)},z1=(l1,f1)=>{l1.preventDefault(),W(f1)},h1=l1=>{if(j(l1),l1.key===te.home||l1.key===te.end)return n1("selectWeekDate",l1.key===te.home);if(l1.key===te.pageUp||l1.key===te.pageDown)return l1.shiftKey?n1("changeYear",l1.key===te.pageUp):n1("changeMonth",l1.key===te.pageUp);switch(l1.key){case te.esc:return L();case te.arrowLeft:return z1(l1,c3.left);case te.arrowRight:return z1(l1,c3.right);case te.arrowUp:return z1(l1,c3.up);case te.arrowDown:return z1(l1,c3.down);default:return}};return t({updateMonthYear:p1,switchView:a1}),(l1,f1)=>{var u1,g1,k1;return o.openBlock(),o.createElementBlock("div",{id:l1.uid?`dp-menu-${l1.uid}`:void 0,ref_key:"dpMenuRef",ref:c,tabindex:"0",role:"dialog","aria-label":(u1=l1.ariaLabels)==null?void 0:u1.menu,class:o.normalizeClass(O.value),style:o.normalizeStyle({"--dp-arrow-left":N.value}),onMouseleave:R,onClick:T,onKeydown:h1},[(l1.disabled||l1.readonly)&&o.unref(h).enabled||l1.loading?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(G.value)},[l1.loading?(o.openBlock(),o.createElementBlock("div",x41,C41)):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),!o.unref(h).enabled&&!l1.teleportCenter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(Y.value)},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"innerMenuRef",ref:g,class:o.normalizeClass({dp__menu_content_wrapper:((g1=l1.presetDates)==null?void 0:g1.length)||!!l1.$slots["left-sidebar"]||!!l1.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((k1=l1.presetDates)==null?void 0:k1.length)||!!l1.$slots["left-sidebar"]||!!l1.$slots["right-sidebar"])}),style:o.normalizeStyle({"--dp-menu-width":`${p.value}px`})},[l1.$slots["left-sidebar"]?(o.openBlock(),o.createElementBlock("div",M41,[o.renderSlot(l1.$slots,"left-sidebar",o.normalizeProps(o.guardReactiveProps(S.value)))])):o.createCommentVNode("",!0),l1.presetDates.length?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l1.presetDates,(b1,H1)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:H1},[b1.slot?o.renderSlot(l1.$slots,b1.slot,{key:0,presetDate:d1,label:b1.label,value:b1.value}):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",style:o.normalizeStyle(b1.style||{}),class:o.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test":b1.testId??void 0,onClick:o.withModifiers(F1=>d1(b1.value,b1.noTz),["prevent"]),onKeydown:F1=>o.unref(y3)(F1,()=>d1(b1.value,b1.noTz),!0)},o.toDisplayString(b1.label),47,z41))],64))),128))],2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:v,class:"dp__instance_calendar",role:"document"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(_.value),o.mergeProps({ref_key:"dynCmpRef",ref:x},i.value,{"flow-step":o.unref(H),onMount:o.unref(V),onUpdateFlowStep:o.unref(A),onResetFlow:o.unref(k),onFocusMenu:q,onSelectDate:f1[0]||(f1[0]=b1=>l1.$emit("select-date")),onDateUpdate:f1[1]||(f1[1]=b1=>l1.$emit("date-update",b1)),onTooltipOpen:f1[2]||(f1[2]=b1=>l1.$emit("tooltip-open",b1)),onTooltipClose:f1[3]||(f1[3]=b1=>l1.$emit("tooltip-close",b1)),onAutoApply:f1[4]||(f1[4]=b1=>l1.$emit("auto-apply",b1)),onRangeStart:f1[5]||(f1[5]=b1=>l1.$emit("range-start",b1)),onRangeEnd:f1[6]||(f1[6]=b1=>l1.$emit("range-end",b1)),onInvalidFixedRange:f1[7]||(f1[7]=b1=>l1.$emit("invalid-fixed-range",b1)),onTimeUpdate:f1[8]||(f1[8]=b1=>l1.$emit("time-update")),onAmPmChange:f1[9]||(f1[9]=b1=>l1.$emit("am-pm-change",b1)),onTimePickerOpen:f1[10]||(f1[10]=b1=>l1.$emit("time-picker-open",b1)),onTimePickerClose:E,onRecalculatePosition:B,onUpdateMonthYear:f1[11]||(f1[11]=b1=>l1.$emit("update-month-year",b1)),onAutoApplyInvalid:f1[12]||(f1[12]=b1=>l1.$emit("auto-apply-invalid",b1)),onInvalidDate:f1[13]||(f1[13]=b1=>l1.$emit("invalid-date",b1)),onOverlayToggle:f1[14]||(f1[14]=b1=>l1.$emit("overlay-toggle",b1)),"onUpdate:internalModelValue":f1[15]||(f1[15]=b1=>l1.$emit("update:internal-model-value",b1))}),o.createSlots({_:2},[o.renderList(e1.value,(b1,H1)=>({name:b1,fn:o.withCtx(F1=>[o.renderSlot(l1.$slots,b1,o.normalizeProps(o.guardReactiveProps({...F1})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),l1.$slots["right-sidebar"]?(o.openBlock(),o.createElementBlock("div",w41,[o.renderSlot(l1.$slots,"right-sidebar",o.normalizeProps(o.guardReactiveProps(S.value)))])):o.createCommentVNode("",!0),l1.$slots["action-extra"]?(o.openBlock(),o.createElementBlock("div",_41,[l1.$slots["action-extra"]?o.renderSlot(l1.$slots,"action-extra",{key:0,selectCurrentDate:t1}):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],6),!l1.autoApply||o.unref(m).keepActionRow?(o.openBlock(),o.createBlock(C31,o.mergeProps({key:2,"menu-mount":y.value},i.value,{"calendar-width":p.value,onClosePicker:f1[16]||(f1[16]=b1=>l1.$emit("close-picker")),onSelectDate:f1[17]||(f1[17]=b1=>l1.$emit("select-date")),onInvalidSelect:f1[18]||(f1[18]=b1=>l1.$emit("invalid-select")),onSelectNow:t1}),o.createSlots({_:2},[o.renderList(o.unref(F),(b1,H1)=>({name:b1,fn:o.withCtx(F1=>[o.renderSlot(l1.$slots,b1,o.normalizeProps(o.guardReactiveProps({...F1})))])}))]),1040,["menu-mount","calendar-width"])):o.createCommentVNode("",!0)],46,y41)}}}),k41=typeof window<"u"?window:void 0,ds=()=>{},H41=e=>o.getCurrentScope()?(o.onScopeDispose(e),!0):!1,V41=(e,t,a,r)=>{if(!e)return ds;let n=ds;const c=o.watch(()=>o.unref(e),s=>{n(),s&&(s.addEventListener(t,a,r),n=()=>{s.removeEventListener(t,a,r),n=ds})},{immediate:!0,flush:"post"}),i=()=>{c(),n()};return H41(i),i},L41=(e,t,a,r={})=>{const{window:n=k41,event:c="pointerdown"}=r;return n?V41(n,c,i=>{const s=ke(e),l=ke(t);!s||!l||s===i.target||i.composedPath().includes(s)||i.composedPath().includes(l)||a(i)},{passive:!0}):void 0},S41=o.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...F5},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=o.ref(!1),s=o.toRef(n,"modelValue"),l=o.toRef(n,"timezone"),f=o.ref(null),u=o.ref(null),d=o.ref(null),h=o.ref(!1),m=o.ref(null),v=o.ref(!1),p=o.ref(!1),g=o.ref(!1),{setMenuFocused:y,setShiftKey:x}=hb(),{clearArrowNav:C}=x0(),{validateDate:b,isValidTime:M}=b0(n),{defaultedTransitions:w,defaultedTextInput:z,defaultedInline:H,defaultedConfig:A,defaultedRange:V,defaultedMultiDates:k}=re(n),{menuTransition:_,showTransition:N}=Tn(w);o.onMounted(()=>{W(n.modelValue),o.nextTick().then(()=>{if(!H.value.enabled){const m1=G(m.value);m1==null||m1.addEventListener("scroll",z1),window==null||window.addEventListener("resize",h1)}}),H.value.enabled&&(i.value=!0),window==null||window.addEventListener("keyup",l1),window==null||window.addEventListener("keydown",f1)}),o.onUnmounted(()=>{if(!H.value.enabled){const m1=G(m.value);m1==null||m1.removeEventListener("scroll",z1),window==null||window.removeEventListener("resize",h1)}window==null||window.removeEventListener("keyup",l1),window==null||window.removeEventListener("keydown",f1)});const q=z3(c,"all",n.presetDates),S=z3(c,"input");o.watch([s,l],()=>{W(s.value)},{deep:!0});const{openOnTop:B,menuStyle:F,xCorrect:e1,setMenuPosition:Y,getScrollableParent:G,shadowRender:O}=f31({menuRef:f,menuRefInner:u,inputRef:d,pickerWrapperRef:m,inline:H,emit:r,props:n,slots:c}),{inputValue:T,internalModelValue:L,parseExternalModelValue:W,emitModelValue:j,formatInputValue:E,checkBeforeEmit:I}=o31(r,n,h),a1=o.computed(()=>({dp__main:!0,dp__theme_dark:n.dark,dp__theme_light:!n.dark,dp__flex_display:H.value.enabled,"dp--flex-display-collapsed":g.value,dp__flex_display_with_input:H.value.input})),n1=o.computed(()=>n.dark?"dp__theme_dark":"dp__theme_light"),t1=o.computed(()=>n.teleport?{to:typeof n.teleport=="boolean"?"body":n.teleport,disabled:!n.teleport||H.value.enabled}:{}),d1=o.computed(()=>({class:"dp__outer_menu_wrap"})),R=o.computed(()=>H.value.enabled&&(n.timePicker||n.monthPicker||n.yearPicker||n.quarterPicker)),p1=()=>{var m1,S1;return(S1=(m1=d.value)==null?void 0:m1.$el)==null?void 0:S1.getBoundingClientRect()},z1=()=>{i.value&&(A.value.closeOnScroll?K1():Y())},h1=()=>{var m1;i.value&&Y();const S1=(m1=u.value)==null?void 0:m1.$el.getBoundingClientRect().width;g.value=document.body.offsetWidth<=S1},l1=m1=>{m1.key==="Tab"&&!H.value.enabled&&!n.teleport&&A.value.tabOutClosesMenu&&(m.value.contains(document.activeElement)||K1()),p.value=m1.shiftKey},f1=m1=>{p.value=m1.shiftKey},u1=()=>{!n.disabled&&!n.readonly&&(O(om,n),Y(!1),i.value=!0,i.value&&r("open"),i.value||W1(),W(n.modelValue))},g1=()=>{var m1;T.value="",W1(),(m1=d.value)==null||m1.setParsedDate(null),r("update:model-value",null),r("update:model-timezone-value",null),r("cleared"),A.value.closeOnClearValue&&K1()},k1=()=>{const m1=L.value;return!m1||!Array.isArray(m1)&&b(m1)?!0:Array.isArray(m1)?k.value.enabled||m1.length===2&&b(m1[0])&&b(m1[1])?!0:V.value.partialRange&&!n.timePicker?b(m1[0]):!1:!1},b1=()=>{I()&&k1()?(j(),K1()):r("invalid-select",L.value)},H1=m1=>{F1(),j(),A.value.closeOnAutoApply&&!m1&&K1()},F1=()=>{d.value&&z.value.enabled&&d.value.setParsedDate(L.value)},$1=(m1=!1)=>{n.autoApply&&M(L.value)&&k1()&&(V.value.enabled&&Array.isArray(L.value)?(V.value.partialRange||L.value.length===2)&&H1(m1):H1(m1))},W1=()=>{z.value.enabled||(L.value=null)},K1=()=>{H.value.enabled||(i.value&&(i.value=!1,e1.value=!1,y(!1),x(!1),C(),r("closed"),T.value&&W(s.value)),W1(),r("blur"))},d2=(m1,S1,T1=!1)=>{if(!m1){L.value=null;return}const Q1=Array.isArray(m1)?!m1.some(we=>!b(we)):b(m1),Q2=M(m1);Q1&&Q2&&(L.value=m1,S1&&(v.value=T1,b1(),r("text-submit")))},G1=()=>{n.autoApply&&M(L.value)&&j(),F1()},j2=()=>i.value?K1():u1(),O1=m1=>{L.value=m1},c2=()=>{z.value.enabled&&(h.value=!0,E()),r("focus")},Y2=()=>{if(z.value.enabled&&(h.value=!1,W(n.modelValue),v.value)){const m1=Oe1(m.value,p.value);m1==null||m1.focus()}r("blur")},m2=m1=>{u.value&&u.value.updateMonthYear(0,{month:tm(m1.month),year:tm(m1.year)})},A2=m1=>{W(m1??n.modelValue)},Pe=(m1,S1)=>{var T1;(T1=u.value)==null||T1.switchView(m1,S1)},y1=m1=>A.value.onClickOutside?A.value.onClickOutside(m1):K1();return L41(f,d,()=>y1(k1)),t({closeMenu:K1,selectDate:b1,clearValue:g1,openMenu:u1,onScroll:z1,formatInputValue:E,updateInternalModelValue:O1,setMonthYear:m2,parseModel:A2,switchView:Pe,toggleMenu:j2}),(m1,S1)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:m,class:o.normalizeClass(a1.value),"data-datepicker-instance":""},[o.createVNode(y31,o.mergeProps({ref_key:"inputRef",ref:d,"input-value":o.unref(T),"onUpdate:inputValue":S1[0]||(S1[0]=T1=>o.isRef(T)?T.value=T1:null),"is-menu-open":i.value},m1.$props,{onClear:g1,onOpen:u1,onSetInputDate:d2,onSetEmptyDate:o.unref(j),onSelectDate:b1,onToggle:j2,onClose:K1,onFocus:c2,onBlur:Y2,onRealBlur:S1[1]||(S1[1]=T1=>h.value=!1)}),o.createSlots({_:2},[o.renderList(o.unref(S),(T1,Q1)=>({name:T1,fn:o.withCtx(Q2=>[o.renderSlot(m1.$slots,T1,o.normalizeProps(o.guardReactiveProps(Q2)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(m1.teleport?o.Teleport:"div"),o.normalizeProps(o.guardReactiveProps(t1.value)),{default:o.withCtx(()=>[o.createVNode(o.Transition,{name:o.unref(_)(o.unref(B)),css:o.unref(N)&&!o.unref(H).enabled},{default:o.withCtx(()=>[i.value?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:f},d1.value,{class:{"dp--menu-wrapper":!o.unref(H).enabled},style:o.unref(H).enabled?void 0:o.unref(F)}),[o.createVNode(om,o.mergeProps({ref_key:"dpMenuRef",ref:u},m1.$props,{"internal-model-value":o.unref(L),"onUpdate:internalModelValue":S1[2]||(S1[2]=T1=>o.isRef(L)?L.value=T1:null),class:{[n1.value]:!0,"dp--menu-wrapper":m1.teleport},"open-on-top":o.unref(B),"no-overlay-focus":R.value,collapse:g.value,"get-input-rect":p1,onClosePicker:K1,onSelectDate:b1,onAutoApply:$1,onTimeUpdate:G1,onFlowStep:S1[3]||(S1[3]=T1=>m1.$emit("flow-step",T1)),onUpdateMonthYear:S1[4]||(S1[4]=T1=>m1.$emit("update-month-year",T1)),onInvalidSelect:S1[5]||(S1[5]=T1=>m1.$emit("invalid-select",o.unref(L))),onAutoApplyInvalid:S1[6]||(S1[6]=T1=>m1.$emit("invalid-select",T1)),onInvalidFixedRange:S1[7]||(S1[7]=T1=>m1.$emit("invalid-fixed-range",T1)),onRecalculatePosition:o.unref(Y),onTooltipOpen:S1[8]||(S1[8]=T1=>m1.$emit("tooltip-open",T1)),onTooltipClose:S1[9]||(S1[9]=T1=>m1.$emit("tooltip-close",T1)),onTimePickerOpen:S1[10]||(S1[10]=T1=>m1.$emit("time-picker-open",T1)),onTimePickerClose:S1[11]||(S1[11]=T1=>m1.$emit("time-picker-close",T1)),onAmPmChange:S1[12]||(S1[12]=T1=>m1.$emit("am-pm-change",T1)),onRangeStart:S1[13]||(S1[13]=T1=>m1.$emit("range-start",T1)),onRangeEnd:S1[14]||(S1[14]=T1=>m1.$emit("range-end",T1)),onDateUpdate:S1[15]||(S1[15]=T1=>m1.$emit("date-update",T1)),onInvalidDate:S1[16]||(S1[16]=T1=>m1.$emit("invalid-date",T1)),onOverlayToggle:S1[17]||(S1[17]=T1=>m1.$emit("overlay-toggle",T1))}),o.createSlots({_:2},[o.renderList(o.unref(q),(T1,Q1)=>({name:T1,fn:o.withCtx(Q2=>[o.renderSlot(m1.$slots,T1,o.normalizeProps(o.guardReactiveProps({...Q2})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","onRecalculatePosition"])],16)):o.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),jl=(()=>{const e=S41;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),A41=Object.freeze(Object.defineProperty({__proto__:null,default:jl},Symbol.toStringTag,{value:"Module"}));Object.entries(A41).forEach(([e,t])=>{e!=="default"&&(jl[e]=t)});const T41=o.defineComponent({__name:"PgaVueDatePicker",props:o.mergeModels({yearPicker:{type:Boolean},monthPicker:{type:Boolean},range:{type:Boolean},enableTimePicker:{type:Boolean},notClearable:{type:Boolean},disabled:{type:Boolean},format:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({cc305282:o.unref(r).input.borderColor,"883a9e94":o.unref(r).input.borderRadius,"6c15f2fd":o.unref(r).input.backgroundColor,"58b376ce":o.unref(r).input.backgroundColorDisabled,"3e8b660d":o.unref(r).input.colorFocus}));const t=o.useModel(e,"modelValue"),a=_2("pgaForm"),{form:r}=$e(),n=o.ref(!1);return(c,i)=>(o.openBlock(),o.createBlock(o.unref(jl),{class:o.normalizeClass(["date-picker",{"date-picker__disabled":c.disabled,"date-picker__open":n.value}]),modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=s=>t.value=s),disabled:c.disabled,clearable:!c.notClearable,yearPicker:c.yearPicker,monthPicker:c.monthPicker,range:c.range,enableTimePicker:c.enableTimePicker,timePickerInline:"",is24:"",teleport:!0,locale:o.unref(h4)().language,format:c.format,previewFormat:c.format,cancelText:o.unref(a)("cancelBtn"),selectText:o.unref(a)("selectBtn"),onOpen:i[1]||(i[1]=s=>n.value=!0),onBlur:i[2]||(i[2]=s=>n.value=!1)},null,8,["class","modelValue","disabled","clearable","yearPicker","monthPicker","range","enableTimePicker","locale","format","previewFormat","cancelText","selectText"]))}});const Dn=R1(T41,[["__scopeId","data-v-94c456f9"]]),E41=o.defineComponent({__name:"PgaDatePicker",props:o.mergeModels({useDate:{type:Boolean},label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue"),a=e,r=o.computed({get(){const c=t.value;if(!c)return null;if(c instanceof Date)return c;const[i,s,l]=c.split("-").map(Number);return new Date(i,s-1,l)},set(c){if(!c){t.value=null;return}if(a.useDate){t.value=c;return}t.value=c.toISOString().split("T")[0]}});function n(c){return m4(c,{format:"numeric",withTime:!1})}return(c,i)=>(o.openBlock(),o.createBlock(A3,{label:c.label,withRequiredLabel:c.withRequiredLabel,withOptionalLabel:c.withOptionalLabel,withLabelSpace:c.withLabelSpace,description:c.description,errors:c.errors,grow:c.grow},{default:o.withCtx(()=>[o.createVNode(Dn,{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=s=>r.value=s),disabled:c.disabled,notClearable:c.notClearable,format:n},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}}),N41=o.defineComponent({__name:"PgaDatetimePicker",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");function a(r){return m4(r,{format:"short",withTime:!0})}return(r,n)=>(o.openBlock(),o.createBlock(A3,{label:r.label,withRequiredLabel:r.withRequiredLabel,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,description:r.description,errors:r.errors,grow:r.grow},{default:o.withCtx(()=>[o.createVNode(Dn,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=c=>t.value=c),enableTimePicker:"",disabled:r.disabled,notClearable:r.notClearable,format:a},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}}),D41={class:"icons-container"},O41=o.defineComponent({__name:"PgaIconSelector",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(n=>({"1d063eb6":o.unref(a).input.padding,"226faebc":o.unref(a).input.borderColor,"4455d859":o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=$e(),r=["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(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createElementVNode("div",D41,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,i=>o.createVNode(L2,{key:i,icon:i,variant:t.value===i?"outlined":"flat",color:t.value===i?"primary":"first",width:"2.5rem",disabled:n.disabled,onClick:s=>t.value=i},null,8,["icon","variant","color","disabled","onClick"])),64))])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const P41=R1(O41,[["__scopeId","data-v-b927e62b"]]),B41=["accept","multiple","disabled"],F41={class:"input-file--label-container"},R41=o.defineComponent({__name:"PgaInputFile",props:{formats:{},multiple:{type:Boolean},disabled:{type:Boolean},selectFileLabel:{type:[String,Number,Function]},isLoading:{type:Boolean}},emits:["newFile","newFiles"],setup(e,{expose:t,emit:a}){o.useCssVars(b=>({"6e9c5da8":o.unref(c).input.borderColor,"7dbf06ed":o.unref(c).input.borderRadius,"33eadd66":o.unref(c).input.backgroundColor,"7f906b76":o.unref(c).input.backgroundColorHover,"35fa93fc":o.unref(c).input.backgroundColorDisabled}));const r=e,n=a;t({click:y,resetInput:x});const{form:c}=$e(),i=_2("pgaForm"),s=o.ref(),l=o.ref([]),f=o.ref(!1),u=o.ref(!1),d=o.computed(()=>r.disabled||r.isLoading),h=o.computed(()=>!!l.value.length),m=o.computed(()=>{if(!r.formats)return!0;for(const b of l.value){const M=b.name.split(".").pop();if(!r.formats.includes(M))return!1}return!0}),v=o.computed(()=>r.formats?r.formats.map(b=>`.${b}`).join(","):"*"),p=o.computed(()=>{const b={icon:"upload"};return!h.value||f.value&&!u.value&&!d.value?b:m.value?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}}),g=o.computed(()=>h.value?l.value.map(b=>b.name).join(", "):r.selectFileLabel?r.selectFileLabel:r.multiple?i("selectFilesLabel"):i("selectFileLabel"));function y(){var b;(b=s.value)==null||b.click()}function x(){l.value=[],s.value&&(s.value.value="")}function C(b){f.value=!1;const w=b.target.files;if(w.length){if(l.value=[...w],!m.value){T4("danger",()=>i("newFileError"));return}n("newFile",w[0]),n("newFiles",[...w])}}return(b,M)=>(o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(["pga-input-file",{"pga-input-file__disabled":d.value}]),onMouseenter:M[4]||(M[4]=w=>f.value=!0),onMouseleave:M[5]||(M[5]=w=>f.value=!1)},[b.isLoading?(o.openBlock(),o.createBlock(Lt,{key:0})):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("input",{ref_key:"inputRef",ref:s,class:"input-file--input",type:"file",accept:v.value,multiple:b.multiple,disabled:d.value,onChange:M[0]||(M[0]=w=>C(w))},null,40,B41),o.createVNode(Oe,{class:"input-file--icon",icon:p.value.icon,color:p.value.color},null,8,["icon","color"]),o.createElementVNode("div",F41,[o.createVNode(ye,{text:g.value},null,8,["text"])]),h.value?(o.openBlock(),o.createBlock(L2,{key:0,text:o.unref(i)("removeBtn"),variant:"flat",color:"danger",size:"s",disabled:d.value,onMouseenter:M[1]||(M[1]=w=>u.value=!0),onMouseleave:M[2]||(M[2]=w=>u.value=!1),onClick:M[3]||(M[3]=o.withModifiers(w=>x(),["prevent"]))},null,8,["text","disabled"])):o.createCommentVNode("",!0)],64))],34))}});const $5=R1(R41,[["__scopeId","data-v-3b0655c7"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var bb=1252,I41=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Yl={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},Gl=function(e){I41.indexOf(e)!=-1&&(bb=Yl[0]=e)};function $41(){Gl(1252)}var c4=function(e){Gl(e)};function Cb(){c4(1200),$41()}function lm(e){for(var t=[],a=0,r=e.length;a<r;++a)t[a]=e.charCodeAt(a);return t}function U41(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a)+(e.charCodeAt(2*a+1)<<8));return t.join("")}function Mb(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a+1)+(e.charCodeAt(2*a)<<8));return t.join("")}var Qa=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1);return t==255&&a==254?U41(e.slice(2)):t==254&&a==255?Mb(e.slice(2)):t==65279?e.slice(1):e},k8=function(t){return String.fromCharCode(t)},fm=function(t){return String.fromCharCode(t)},It,Kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function um(e){for(var t="",a=0,r=0,n=0,c=0,i=0,s=0,l=0,f=0;f<e.length;)a=e.charCodeAt(f++),c=a>>2,r=e.charCodeAt(f++),i=(a&3)<<4|r>>4,n=e.charCodeAt(f++),s=(r&15)<<2|n>>6,l=n&63,isNaN(r)?s=l=64:isNaN(n)&&(l=64),t+=Kt.charAt(c)+Kt.charAt(i)+Kt.charAt(s)+Kt.charAt(l);return t}function H3(e){var t="",a=0,r=0,n=0,c=0,i=0,s=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f<e.length;)c=Kt.indexOf(e.charAt(f++)),i=Kt.indexOf(e.charAt(f++)),a=c<<2|i>>4,t+=String.fromCharCode(a),s=Kt.indexOf(e.charAt(f++)),r=(i&15)<<4|s>>2,s!==64&&(t+=String.fromCharCode(r)),l=Kt.indexOf(e.charAt(f++)),n=(s&3)<<6|l,l!==64&&(t+=String.fromCharCode(n));return t}var h2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),y6=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,a){return a?new Buffer(t,a):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function m0(e){return h2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function dm(e){return h2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var t4=function(t){return h2?y6(t,"binary"):t.split("").map(function(a){return a.charCodeAt(0)&255})};function x6(e){if(Array.isArray(e))return e.map(function(r){return String.fromCharCode(r)}).join("");for(var t=[],a=0;a<e.length;++a)t[a]=String.fromCharCode(e[a]);return t.join("")}function Xl(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Xl(new Uint8Array(e));for(var t=new Array(e.length),a=0;a<e.length;++a)t[a]=e[a];return t}var $t=h2?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:y6(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,a=0;for(t=0;t<e.length;++t)a+=e[t].length;var r=new Uint8Array(a),n=0;for(t=0,a=0;t<e.length;a+=n,++t)if(n=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],a);else{if(typeof e[t]=="string")throw"wtf";r.set(new Uint8Array(e[t]),a)}return r}return[].concat.apply([],e.map(function(c){return Array.isArray(c)?c:[].slice.call(c)}))};function W41(e){for(var t=[],a=0,r=e.length+250,n=m0(e.length+255),c=0;c<e.length;++c){var i=e.charCodeAt(c);if(i<128)n[a++]=i;else if(i<2048)n[a++]=192|i>>6&31,n[a++]=128|i&63;else if(i>=55296&&i<57344){i=(i&1023)+64;var s=e.charCodeAt(++c)&1023;n[a++]=240|i>>8&7,n[a++]=128|i>>2&63,n[a++]=128|s>>6&15|(i&3)<<4,n[a++]=128|s&63}else n[a++]=224|i>>12&15,n[a++]=128|i>>6&63,n[a++]=128|i&63;a>r&&(t.push(n.slice(0,a)),a=0,n=m0(65535),r=65530)}return t.push(n.slice(0,a)),$t(t)}var l3=/\u0000/g,Ja=/[\u0001-\u0006]/g;function j6(e){for(var t="",a=e.length-1;a>=0;)t+=e.charAt(a--);return t}function i4(e,t){var a=""+e;return a.length>=t?a:ce("0",t-a.length)+a}function Kl(e,t){var a=""+e;return a.length>=t?a:ce(" ",t-a.length)+a}function Wc(e,t){var a=""+e;return a.length>=t?a:a+ce(" ",t-a.length)}function q41(e,t){var a=""+Math.round(e);return a.length>=t?a:ce("0",t-a.length)+a}function j41(e,t){var a=""+e;return a.length>=t?a:ce("0",t-a.length)+a}var hm=Math.pow(2,32);function S6(e,t){if(e>hm||e<-hm)return q41(e,t);var a=Math.round(e);return j41(a,t)}function qc(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var mm=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],hs=[["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 Y41(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 e2={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"秒 "'},pm={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},G41={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 jc(e,t,a){for(var r=e<0?-1:1,n=e*r,c=0,i=1,s=0,l=1,f=0,u=0,d=Math.floor(n);f<t&&(d=Math.floor(n),s=d*i+c,u=d*f+l,!(n-d<5e-8));)n=1/(n-d),c=i,i=s,l=f,f=u;if(u>t&&(f>t?(u=l,s=c):(u=f,s=i)),!a)return[0,r*s,u];var h=Math.floor(r*s/u);return[h,r*s-h*u,u]}function U0(e,t,a){if(e>2958465||e<0)return null;var r=e|0,n=Math.floor(86400*(e-r)),c=0,i=[],s={D:r,T:n,u:86400*(e-r)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(r+=1462),s.u>.9999&&(s.u=0,++n==86400&&(s.T=n=0,++r,++s.D)),r===60)i=a?[1317,10,29]:[1900,2,29],c=3;else if(r===0)i=a?[1317,8,29]:[1900,1,0],c=6;else{r>60&&--r;var l=new Date(1900,0,1);l.setDate(l.getDate()+r-1),i=[l.getFullYear(),l.getMonth()+1,l.getDate()],c=l.getDay(),r<60&&(c=(c+6)%7),a&&(c=et1(l,i))}return s.y=i[0],s.m=i[1],s.d=i[2],s.S=n%60,n=Math.floor(n/60),s.M=n%60,n=Math.floor(n/60),s.H=n,s.q=c,s}var zb=new Date(1899,11,31,0,0,0),X41=zb.getTime(),K41=new Date(1900,2,1,0,0,0);function wb(e,t){var a=e.getTime();return t?a-=1461*24*60*60*1e3:e>=K41&&(a+=24*60*60*1e3),(a-(X41+(e.getTimezoneOffset()-zb.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Zl(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function Z41(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function Q41(e){var t=e<0?12:11,a=Zl(e.toFixed(12));return a.length<=t||(a=e.toPrecision(10),a.length<=t)?a:e.toExponential(5)}function J41(e){var t=Zl(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function rn(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),a;return t>=-4&&t<=-1?a=e.toPrecision(10+t):Math.abs(t)<=9?a=Q41(e):t===10?a=e.toFixed(10).substr(0,12):a=J41(e),Zl(Z41(a.toUpperCase()))}function s6(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):rn(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return I3(14,wb(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function et1(e,t){t[0]-=581;var a=e.getDay();return e<60&&(a=(a+6)%7),a}function tt1(e,t,a,r){var n="",c=0,i=0,s=a.y,l,f=0;switch(e){case 98:s=a.y+543;case 121:switch(t.length){case 1:case 2:l=s%100,f=2;break;default:l=s%1e4,f=4;break}break;case 109:switch(t.length){case 1:case 2:l=a.m,f=t.length;break;case 3:return hs[a.m-1][1];case 5:return hs[a.m-1][0];default:return hs[a.m-1][2]}break;case 100:switch(t.length){case 1:case 2:l=a.d,f=t.length;break;case 3:return mm[a.q][0];default:return mm[a.q][1]}break;case 104:switch(t.length){case 1:case 2:l=1+(a.H+11)%12,f=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:l=a.H,f=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:l=a.M,f=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return a.u===0&&(t=="s"||t=="ss")?i4(a.S,t.length):(r>=2?i=r===3?1e3:100:i=r===1?10:1,c=Math.round(i*(a.S+a.u)),c>=60*i&&(c=0),t==="s"?c===0?"0":""+c/i:(n=i4(c,2+r),t==="ss"?n.substr(0,2):"."+n.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":l=a.D*24+a.H;break;case"[m]":case"[mm]":l=(a.D*24+a.H)*60+a.M;break;case"[s]":case"[ss]":l=((a.D*24+a.H)*60+a.M)*60+Math.round(a.S+a.u);break;default:throw"bad abstime format: "+t}f=t.length===3?1:2;break;case 101:l=s,f=1;break}var u=f>0?i4(l,f):"";return u}function Zt(e){var t=3;if(e.length<=t)return e;for(var a=e.length%t,r=e.substr(0,a);a!=e.length;a+=t)r+=(r.length>0?",":"")+e.substr(a,t);return r}var _b=/%/g;function at1(e,t,a){var r=t.replace(_b,""),n=t.length-r.length;return yt(e,r,a*Math.pow(10,2*n))+ce("%",n)}function rt1(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return yt(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function kb(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+kb(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var c=Math.floor(Math.log(t)*Math.LOG10E)%n;if(c<0&&(c+=n),a=(t/Math.pow(10,c)).toPrecision(r+1+(n+c)%n),a.indexOf("e")===-1){var i=Math.floor(Math.log(t)*Math.LOG10E);for(a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+c):a+="E+"+(i-c);a.substr(0,2)==="0.";)a=a.charAt(0)+a.substr(2,n)+"."+a.substr(2+n),a=a.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(n+c)%n)+"."+u.substr(c)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}var Hb=/# (\?+)( ?)\/( ?)(\d+)/;function nt1(e,t,a){var r=parseInt(e[4],10),n=Math.round(t*r),c=Math.floor(n/r),i=n-c*r,s=r;return a+(c===0?"":""+c)+" "+(i===0?ce(" ",e[1].length+1+e[4].length):Kl(i,e[1].length)+e[2]+"/"+e[3]+i4(s,e[4].length))}function ct1(e,t,a){return a+(t===0?"":""+t)+ce(" ",e[1].length+2+e[4].length)}var Vb=/^#*0*\.([0#]+)/,Lb=/\).*[0#]/,Sb=/\(###\) ###\\?-####/;function i3(e){for(var t="",a,r=0;r!=e.length;++r)switch(a=e.charCodeAt(r)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(a)}return t}function vm(e,t){var a=Math.pow(10,t);return""+Math.round(e*a)/a}function gm(e,t){var a=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(a*r)).length?0:Math.round(a*r)}function it1(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function st1(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function O3(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Lb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?O3("n",r,a):"("+O3("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return rt1(e,t,a);if(t.indexOf("%")!==-1)return at1(e,t,a);if(t.indexOf("E")!==-1)return kb(t,a);if(t.charCodeAt(0)===36)return"$"+O3(e,t.substr(t.charAt(1)==" "?2:1),a);var n,c,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+S6(l,t.length);if(t.match(/^[#?]+$/))return n=S6(a,0),n==="0"&&(n=""),n.length>t.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(Hb))return nt1(c,l,f);if(t.match(/^#+0+$/))return f+S6(l,t.length-t.indexOf("0"));if(c=t.match(Vb))return n=vm(a,c[1].length).replace(/^([^\.]+)$/,"$1."+i3(c[1])).replace(/\.$/,"."+i3(c[1])).replace(/\.(\d*)$/,function(v,p){return"."+p+ce("0",i3(c[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),c=t.match(/^(0*)\.(#*)$/))return f+vm(l,c[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,c[1].length?"0.":".");if(c=t.match(/^#{1,3},##0(\.?)$/))return f+Zt(S6(l,0));if(c=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+O3(e,t,-a):Zt(""+(Math.floor(a)+it1(a,c[1].length)))+"."+i4(gm(a,c[1].length),c[1].length);if(c=t.match(/^#,#*,#0/))return O3(e,t.replace(/^#,#*,/,""),a);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=j6(O3(e,t.replace(/[\\-]/g,""),a)),i=0,j6(j6(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return i<n.length?n.charAt(i++):v==="0"?"0":""}));if(t.match(Sb))return n=O3(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var u="";if(c=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(c[4].length,7),s=jc(l,Math.pow(10,i)-1,!1),n=""+f,u=yt("n",c[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),n+=u+c[2]+"/"+c[3],u=Wc(s[2],i),u.length<c[4].length&&(u=i3(c[4].substr(c[4].length-u.length))+u),n+=u,n;if(c=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(c[1].length,c[4].length),7),s=jc(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Kl(s[1],i)+c[2]+"/"+c[3]+Wc(s[2],i):ce(" ",2*i+1+c[2].length+c[3].length));if(c=t.match(/^[#0?]+$/))return n=S6(a,0),t.length<=n.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(/^([#0?]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(c[2].length,10)).replace(/([^0])0+$/,"$1"),i=n.indexOf(".");var d=t.indexOf(".")-i,h=t.length-n.length-d;return i3(t.substr(0,d)+n+t.substr(t.length-h))}if(c=t.match(/^00,000\.([#0]*0)$/))return i=gm(a,c[1].length),a<0?"-"+O3(e,t,-a):Zt(st1(a)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?i4(0,3-v.length):"")+v})+"."+i4(i,c[1].length);switch(t){case"###,##0.00":return O3(e,"#,##0.00",a);case"###,###":case"##,###":case"#,###":var m=Zt(S6(l,0));return m!=="0"?f+m:"";case"###,###.00":return O3(e,"###,##0.00",a).replace(/^0\./,".");case"#,###.00":return O3(e,"#,##0.00",a).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function ot1(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return yt(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function lt1(e,t,a){var r=t.replace(_b,""),n=t.length-r.length;return yt(e,r,a*Math.pow(10,2*n))+ce("%",n)}function Ab(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+Ab(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var c=Math.floor(Math.log(t)*Math.LOG10E)%n;if(c<0&&(c+=n),a=(t/Math.pow(10,c)).toPrecision(r+1+(n+c)%n),!a.match(/[Ee]/)){var i=Math.floor(Math.log(t)*Math.LOG10E);a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+c):a+="E+"+(i-c),a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(n+c)%n)+"."+u.substr(c)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}function _4(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Lb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?_4("n",r,a):"("+_4("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return ot1(e,t,a);if(t.indexOf("%")!==-1)return lt1(e,t,a);if(t.indexOf("E")!==-1)return Ab(t,a);if(t.charCodeAt(0)===36)return"$"+_4(e,t.substr(t.charAt(1)==" "?2:1),a);var n,c,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+i4(l,t.length);if(t.match(/^[#?]+$/))return n=""+a,a===0&&(n=""),n.length>t.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(Hb))return ct1(c,l,f);if(t.match(/^#+0+$/))return f+i4(l,t.length-t.indexOf("0"));if(c=t.match(Vb))return n=(""+a).replace(/^([^\.]+)$/,"$1."+i3(c[1])).replace(/\.$/,"."+i3(c[1])),n=n.replace(/\.(\d*)$/,function(v,p){return"."+p+ce("0",i3(c[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),c=t.match(/^(0*)\.(#*)$/))return f+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,c[1].length?"0.":".");if(c=t.match(/^#{1,3},##0(\.?)$/))return f+Zt(""+l);if(c=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+_4(e,t,-a):Zt(""+a)+"."+ce("0",c[1].length);if(c=t.match(/^#,#*,#0/))return _4(e,t.replace(/^#,#*,/,""),a);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=j6(_4(e,t.replace(/[\\-]/g,""),a)),i=0,j6(j6(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return i<n.length?n.charAt(i++):v==="0"?"0":""}));if(t.match(Sb))return n=_4(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var u="";if(c=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(c[4].length,7),s=jc(l,Math.pow(10,i)-1,!1),n=""+f,u=yt("n",c[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),n+=u+c[2]+"/"+c[3],u=Wc(s[2],i),u.length<c[4].length&&(u=i3(c[4].substr(c[4].length-u.length))+u),n+=u,n;if(c=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(c[1].length,c[4].length),7),s=jc(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Kl(s[1],i)+c[2]+"/"+c[3]+Wc(s[2],i):ce(" ",2*i+1+c[2].length+c[3].length));if(c=t.match(/^[#0?]+$/))return n=""+a,t.length<=n.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(/^([#0]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(c[2].length,10)).replace(/([^0])0+$/,"$1"),i=n.indexOf(".");var d=t.indexOf(".")-i,h=t.length-n.length-d;return i3(t.substr(0,d)+n+t.substr(t.length-h))}if(c=t.match(/^00,000\.([#0]*0)$/))return a<0?"-"+_4(e,t,-a):Zt(""+a).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?i4(0,3-v.length):"")+v})+"."+i4(0,c[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=Zt(""+l);return m!=="0"?f+m:"";default:if(t.match(/\.[0#?]*$/))return _4(e,t.slice(0,t.lastIndexOf(".")),a)+i3(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function yt(e,t,a){return(a|0)===a?_4(e,t,a):O3(e,t,a)}function ft1(e){for(var t=[],a=!1,r=0,n=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:a=!a;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(n,r-n),n=r+1}if(t[t.length]=e.substr(n),a===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var Tb=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function ga(e){for(var t=0,a="",r="";t<e.length;)switch(a=e.charAt(t)){case"G":qc(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+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(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(r=a;e.charAt(t++)!=="]"&&t<e.length;)r+=e.charAt(t);if(r.match(Tb))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(a=e.charAt(++t))>-1||a=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===a;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function ut1(e,t,a,r){for(var n=[],c="",i=0,s="",l="t",f,u,d,h="H";i<e.length;)switch(s=e.charAt(i)){case"G":if(!qc(e,i))throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"G",v:"General"},i+=7;break;case'"':for(c="";(d=e.charCodeAt(++i))!==34&&i<e.length;)c+=String.fromCharCode(d);n[n.length]={t:"t",v:c},++i;break;case"\\":var m=e.charAt(++i),v=m==="("||m===")"?m:"t";n[n.length]={t:v,v:m},++i;break;case"_":n[n.length]={t:"t",v:" "},i+=2;break;case"@":n[n.length]={t:"T",v:t},++i;break;case"B":case"b":if(e.charAt(i+1)==="1"||e.charAt(i+1)==="2"){if(f==null&&(f=U0(t,a,e.charAt(i+1)==="2"),f==null))return"";n[n.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(t<0||f==null&&(f=U0(t,a),f==null))return"";for(c=s;++i<e.length&&e.charAt(i).toLowerCase()===s;)c+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=h),n[n.length]={t:s,v:c},l=s;break;case"A":case"a":case"上":var p={t:s,v:s};if(f==null&&(f=U0(t,a)),e.substr(i,3).toUpperCase()==="A/P"?(f!=null&&(p.v=f.H>=12?"P":"A"),p.t="T",h="h",i+=3):e.substr(i,5).toUpperCase()==="AM/PM"?(f!=null&&(p.v=f.H>=12?"PM":"AM"),p.t="T",i+=5,h="h"):e.substr(i,5).toUpperCase()==="上午/下午"?(f!=null&&(p.v=f.H>=12?"下午":"上午"),p.t="T",i+=5,h="h"):(p.t="t",++i),f==null&&p.t==="T")return"";n[n.length]=p,l=s;break;case"[":for(c=s;e.charAt(i++)!=="]"&&i<e.length;)c+=e.charAt(i);if(c.slice(-1)!=="]")throw'unterminated "[" block: |'+c+"|";if(c.match(Tb)){if(f==null&&(f=U0(t,a),f==null))return"";n[n.length]={t:"Z",v:c.toLowerCase()},l=c.charAt(1)}else c.indexOf("$")>-1&&(c=(c.match(/\$([^-\[\]]*)/)||[])[1]||"$",ga(e)||(n[n.length]={t:"t",v:c}));break;case".":if(f!=null){for(c=s;++i<e.length&&(s=e.charAt(i))==="0";)c+=s;n[n.length]={t:"s",v:c};break}case"0":case"#":for(c=s;++i<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(i))>-1;)c+=s;n[n.length]={t:"n",v:c};break;case"?":for(c=s;e.charAt(++i)===s;)c+=s;n[n.length]={t:s,v:c},l=s;break;case"*":++i,(e.charAt(i)==" "||e.charAt(i)=="*")&&++i;break;case"(":case")":n[n.length]={t:r===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(c=s;i<e.length&&"0123456789".indexOf(e.charAt(++i))>-1;)c+=e.charAt(i);n[n.length]={t:"D",v:c};break;case" ":n[n.length]={t:s,v:s},++i;break;case"$":n[n.length]={t:"t",v:"$"},++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"t",v:s},++i;break}var g=0,y=0,x;for(i=n.length-1,l="t";i>=0;--i)switch(n[i].t){case"h":case"H":n[i].t=h,l="h",g<1&&(g=1);break;case"s":(x=n[i].v.match(/\.0+$/))&&(y=Math.max(y,x[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":l=n[i].t;break;case"m":l==="s"&&(n[i].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&n[i].v.match(/[Hh]/)&&(g=1),g<2&&n[i].v.match(/[Mm]/)&&(g=2),g<3&&n[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="",b;for(i=0;i<n.length;++i)switch(n[i].t){case"t":case"T":case" ":case"D":break;case"X":n[i].v="",n[i].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":n[i].v=tt1(n[i].t.charCodeAt(0),n[i].v,f,y),n[i].t="t";break;case"n":case"?":for(b=i+1;n[b]!=null&&((s=n[b].t)==="?"||s==="D"||(s===" "||s==="t")&&n[b+1]!=null&&(n[b+1].t==="?"||n[b+1].t==="t"&&n[b+1].v==="/")||n[i].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(n[b].v==="/"||n[b].v===" "&&n[b+1]!=null&&n[b+1].t=="?"));)n[i].v+=n[b].v,n[b]={v:"",t:";"},++b;C+=n[i].v,i=b-1;break;case"G":n[i].t="t",n[i].v=s6(t,a);break}var M="",w,z;if(C.length>0){C.charCodeAt(0)==40?(w=t<0&&C.charCodeAt(0)===45?-t:t,z=yt("n",C,w)):(w=t<0&&r>1?-t:t,z=yt("n",C,w),w<0&&n[0]&&n[0].t=="t"&&(z=z.substr(1),n[0].v="-"+n[0].v)),b=z.length-1;var H=n.length;for(i=0;i<n.length;++i)if(n[i]!=null&&n[i].t!="t"&&n[i].v.indexOf(".")>-1){H=i;break}var A=n.length;if(H===n.length&&z.indexOf("E")===-1){for(i=n.length-1;i>=0;--i)n[i]==null||"n?".indexOf(n[i].t)===-1||(b>=n[i].v.length-1?(b-=n[i].v.length,n[i].v=z.substr(b+1,n[i].v.length)):b<0?n[i].v="":(n[i].v=z.substr(0,b+1),b=-1),n[i].t="t",A=i);b>=0&&A<n.length&&(n[A].v=z.substr(0,b+1)+n[A].v)}else if(H!==n.length&&z.indexOf("E")===-1){for(b=z.indexOf(".")-1,i=H;i>=0;--i)if(!(n[i]==null||"n?".indexOf(n[i].t)===-1)){for(u=n[i].v.indexOf(".")>-1&&i===H?n[i].v.indexOf(".")-1:n[i].v.length-1,M=n[i].v.substr(u+1);u>=0;--u)b>=0&&(n[i].v.charAt(u)==="0"||n[i].v.charAt(u)==="#")&&(M=z.charAt(b--)+M);n[i].v=M,n[i].t="t",A=i}for(b>=0&&A<n.length&&(n[A].v=z.substr(0,b+1)+n[A].v),b=z.indexOf(".")+1,i=H;i<n.length;++i)if(!(n[i]==null||"n?(".indexOf(n[i].t)===-1&&i!==H)){for(u=n[i].v.indexOf(".")>-1&&i===H?n[i].v.indexOf(".")+1:0,M=n[i].v.substr(0,u);u<n[i].v.length;++u)b<z.length&&(M+=z.charAt(b++));n[i].v=M,n[i].t="t",A=i}}}for(i=0;i<n.length;++i)n[i]!=null&&"n?".indexOf(n[i].t)>-1&&(w=r>1&&t<0&&i>0&&n[i-1].v==="-"?-t:t,n[i].v=yt(n[i].t,n[i].v,w),n[i].t="t");var V="";for(i=0;i!==n.length;++i)n[i]!=null&&(V+=n[i].v);return V}var ym=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function xm(e,t){if(t==null)return!1;var a=parseFloat(t[2]);switch(t[1]){case"=":if(e==a)return!0;break;case">":if(e>a)return!0;break;case"<":if(e<a)return!0;break;case"<>":if(e!=a)return!0;break;case">=":if(e>=a)return!0;break;case"<=":if(e<=a)return!0;break}return!1}function dt1(e,t){var a=ft1(e),r=a.length,n=a[r-1].indexOf("@");if(r<4&&n>-1&&--r,a.length>4)throw new Error("cannot find right format for |"+a.join("|")+"|");if(typeof t!="number")return[4,a.length===4||n>-1?a[a.length-1]:"@"];switch(a.length){case 1:a=n>-1?["General","General","General",a[0]]:[a[0],a[0],a[0],"@"];break;case 2:a=n>-1?[a[0],a[0],a[0],a[1]]:[a[0],a[1],a[0],"@"];break;case 3:a=n>-1?[a[0],a[1],a[0],a[2]]:[a[0],a[1],a[2],"@"];break}var c=t>0?a[0]:t<0?a[1]:a[2];if(a[0].indexOf("[")===-1&&a[1].indexOf("[")===-1)return[r,c];if(a[0].match(/\[[=<>]/)!=null||a[1].match(/\[[=<>]/)!=null){var i=a[0].match(ym),s=a[1].match(ym);return xm(t,i)?[r,a[0]]:xm(t,s)?[r,a[1]]:[r,a[i!=null&&s!=null?2:1]]}return[r,c]}function I3(e,t,a){a==null&&(a={});var r="";switch(typeof e){case"string":e=="m/d/yy"&&a.dateNF?r=a.dateNF:r=e;break;case"number":e==14&&a.dateNF?r=a.dateNF:r=(a.table!=null?a.table:e2)[e],r==null&&(r=a.table&&a.table[pm[e]]||e2[pm[e]]),r==null&&(r=G41[e]||"General");break}if(qc(r,0))return s6(t,a);t instanceof Date&&(t=wb(t,a.date1904));var n=dt1(r,t);if(qc(n[1]))return s6(t,a);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return ut1(n[1],t,a,n[0])}function K0(e,t){if(typeof t!="number"){t=+t||-1;for(var a=0;a<392;++a){if(e2[a]==null){t<0&&(t=a);continue}if(e2[a]==e){t=a;break}}t<0&&(t=391)}return e2[t]=e,t}function Eb(){e2=Y41()}var ht1={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"},Nb=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function mt1(e){var t=typeof e=="number"?e2[e]:e;return t=t.replace(Nb,"(\\d+)"),new RegExp("^"+t+"$")}function pt1(e,t,a){var r=-1,n=-1,c=-1,i=-1,s=-1,l=-1;(t.match(Nb)||[]).forEach(function(d,h){var m=parseInt(a[h+1],10);switch(d.toLowerCase().charAt(0)){case"y":r=m;break;case"d":c=m;break;case"h":i=m;break;case"s":l=m;break;case"m":i>=0?s=m:n=m;break}}),l>=0&&s==-1&&n>=0&&(s=n,n=-1);var f=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(c>=1?c: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:r==-1&&n==-1&&c==-1?u:f+"T"+u}var vt1=function(){var e={};e.version="1.2.0";function t(){for(var z=0,H=new Array(256),A=0;A!=256;++A)z=A,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,H[A]=z;return typeof Int32Array<"u"?new Int32Array(H):H}var a=t();function r(z){var H=0,A=0,V=0,k=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(V=0;V!=256;++V)k[V]=z[V];for(V=0;V!=256;++V)for(A=z[V],H=256+V;H<4096;H+=256)A=k[H]=A>>>8^z[A&255];var _=[];for(V=1;V!=16;++V)_[V-1]=typeof Int32Array<"u"?k.subarray(V*256,V*256+256):k.slice(V*256,V*256+256);return _}var n=r(a),c=n[0],i=n[1],s=n[2],l=n[3],f=n[4],u=n[5],d=n[6],h=n[7],m=n[8],v=n[9],p=n[10],g=n[11],y=n[12],x=n[13],C=n[14];function b(z,H){for(var A=H^-1,V=0,k=z.length;V<k;)A=A>>>8^a[(A^z.charCodeAt(V++))&255];return~A}function M(z,H){for(var A=H^-1,V=z.length-15,k=0;k<V;)A=C[z[k++]^A&255]^x[z[k++]^A>>8&255]^y[z[k++]^A>>16&255]^g[z[k++]^A>>>24]^p[z[k++]]^v[z[k++]]^m[z[k++]]^h[z[k++]]^d[z[k++]]^u[z[k++]]^f[z[k++]]^l[z[k++]]^s[z[k++]]^i[z[k++]]^c[z[k++]]^a[z[k++]];for(V+=15;k<V;)A=A>>>8^a[(A^z[k++])&255];return~A}function w(z,H){for(var A=H^-1,V=0,k=z.length,_=0,N=0;V<k;)_=z.charCodeAt(V++),_<128?A=A>>>8^a[(A^_)&255]:_<2048?(A=A>>>8^a[(A^(192|_>>6&31))&255],A=A>>>8^a[(A^(128|_&63))&255]):_>=55296&&_<57344?(_=(_&1023)+64,N=z.charCodeAt(V++)&1023,A=A>>>8^a[(A^(240|_>>8&7))&255],A=A>>>8^a[(A^(128|_>>2&63))&255],A=A>>>8^a[(A^(128|N>>6&15|(_&3)<<4))&255],A=A>>>8^a[(A^(128|N&63))&255]):(A=A>>>8^a[(A^(224|_>>12&15))&255],A=A>>>8^a[(A^(128|_>>6&63))&255],A=A>>>8^a[(A^(128|_&63))&255]);return~A}return e.table=a,e.bstr=b,e.buf=M,e.str=w,e}(),v2=function(){var t={};t.version="1.2.1";function a(X,r1){for(var Q=X.split("/"),J=r1.split("/"),c1=0,i1=0,C1=Math.min(Q.length,J.length);c1<C1;++c1){if(i1=Q[c1].length-J[c1].length)return i1;if(Q[c1]!=J[c1])return Q[c1]<J[c1]?-1:1}return Q.length-J.length}function r(X){if(X.charAt(X.length-1)=="/")return X.slice(0,-1).indexOf("/")===-1?X:r(X.slice(0,-1));var r1=X.lastIndexOf("/");return r1===-1?X:X.slice(0,r1+1)}function n(X){if(X.charAt(X.length-1)=="/")return n(X.slice(0,-1));var r1=X.lastIndexOf("/");return r1===-1?X:X.slice(r1+1)}function c(X,r1){typeof r1=="string"&&(r1=new Date(r1));var Q=r1.getHours();Q=Q<<6|r1.getMinutes(),Q=Q<<5|r1.getSeconds()>>>1,X.write_shift(2,Q);var J=r1.getFullYear()-1980;J=J<<4|r1.getMonth()+1,J=J<<5|r1.getDate(),X.write_shift(2,J)}function i(X){var r1=X.read_shift(2)&65535,Q=X.read_shift(2)&65535,J=new Date,c1=Q&31;Q>>>=5;var i1=Q&15;Q>>>=4,J.setMilliseconds(0),J.setFullYear(Q+1980),J.setMonth(i1-1),J.setDate(c1);var C1=r1&31;r1>>>=5;var M1=r1&63;return r1>>>=6,J.setHours(r1),J.setMinutes(M1),J.setSeconds(C1<<1),J}function s(X){Be(X,0);for(var r1={},Q=0;X.l<=X.length-4;){var J=X.read_shift(2),c1=X.read_shift(2),i1=X.l+c1,C1={};switch(J){case 21589:Q=X.read_shift(1),Q&1&&(C1.mtime=X.read_shift(4)),c1>5&&(Q&2&&(C1.atime=X.read_shift(4)),Q&4&&(C1.ctime=X.read_shift(4))),C1.mtime&&(C1.mt=new Date(C1.mtime*1e3));break}X.l=i1,r1[J]=C1}return r1}var l;function f(){return l||(l={})}function u(X,r1){if(X[0]==80&&X[1]==75)return Q1(X,r1);if((X[0]|32)==109&&(X[1]|32)==105)return Z4(X,r1);if(X.length<512)throw new Error("CFB file size "+X.length+" < 512");var Q=3,J=512,c1=0,i1=0,C1=0,M1=0,D=0,U=[],P=X.slice(0,512);Be(P,0);var K=d(P);switch(Q=K[0],Q){case 3:J=512;break;case 4:J=4096;break;case 0:if(K[1]==0)return Q1(X,r1);default:throw new Error("Major Version: Expected 3 or 4 saw "+Q)}J!==512&&(P=X.slice(0,J),Be(P,28));var Z=X.slice(0,J);h(P,Q);var o1=P.read_shift(4,"i");if(Q===3&&o1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+o1);P.l+=4,C1=P.read_shift(4,"i"),P.l+=4,P.chk("00100000","Mini Stream Cutoff Size: "),M1=P.read_shift(4,"i"),c1=P.read_shift(4,"i"),D=P.read_shift(4,"i"),i1=P.read_shift(4,"i");for(var s1=-1,x1=0;x1<109&&(s1=P.read_shift(4,"i"),!(s1<0));++x1)U[x1]=s1;var V1=m(X,J);g(D,i1,V1,J,U);var L1=x(V1,C1,U,J);L1[C1].name="!Directory",c1>0&&M1!==N&&(L1[M1].name="!MiniFAT"),L1[U[0]].name="!FAT",L1.fat_addrs=U,L1.ssz=J;var w1={},N1=[],I1=[],J1=[];C(C1,L1,V1,N1,c1,w1,I1,M1),v(I1,J1,N1),N1.shift();var U1={FileIndex:I1,FullPaths:J1};return r1&&r1.raw&&(U1.raw={header:Z,sectors:V1}),U1}function d(X){if(X[X.l]==80&&X[X.l+1]==75)return[0,0];X.chk(q,"Header Signature: "),X.l+=16;var r1=X.read_shift(2,"u");return[X.read_shift(2,"u"),r1]}function h(X,r1){var Q=9;switch(X.l+=2,Q=X.read_shift(2)){case 9:if(r1!=3)throw new Error("Sector Shift: Expected 9 saw "+Q);break;case 12:if(r1!=4)throw new Error("Sector Shift: Expected 12 saw "+Q);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+Q)}X.chk("0600","Mini Sector Shift: "),X.chk("000000000000","Reserved: ")}function m(X,r1){for(var Q=Math.ceil(X.length/r1)-1,J=[],c1=1;c1<Q;++c1)J[c1-1]=X.slice(c1*r1,(c1+1)*r1);return J[Q-1]=X.slice(Q*r1),J}function v(X,r1,Q){for(var J=0,c1=0,i1=0,C1=0,M1=0,D=Q.length,U=[],P=[];J<D;++J)U[J]=P[J]=J,r1[J]=Q[J];for(;M1<P.length;++M1)J=P[M1],c1=X[J].L,i1=X[J].R,C1=X[J].C,U[J]===J&&(c1!==-1&&U[c1]!==c1&&(U[J]=U[c1]),i1!==-1&&U[i1]!==i1&&(U[J]=U[i1])),C1!==-1&&(U[C1]=J),c1!==-1&&J!=U[J]&&(U[c1]=U[J],P.lastIndexOf(c1)<M1&&P.push(c1)),i1!==-1&&J!=U[J]&&(U[i1]=U[J],P.lastIndexOf(i1)<M1&&P.push(i1));for(J=1;J<D;++J)U[J]===J&&(i1!==-1&&U[i1]!==i1?U[J]=U[i1]:c1!==-1&&U[c1]!==c1&&(U[J]=U[c1]));for(J=1;J<D;++J)if(X[J].type!==0){if(M1=J,M1!=U[M1])do M1=U[M1],r1[J]=r1[M1]+"/"+r1[J];while(M1!==0&&U[M1]!==-1&&M1!=U[M1]);U[J]=-1}for(r1[0]+="/",J=1;J<D;++J)X[J].type!==2&&(r1[J]+="/")}function p(X,r1,Q){for(var J=X.start,c1=X.size,i1=[],C1=J;Q&&c1>0&&C1>=0;)i1.push(r1.slice(C1*_,C1*_+_)),c1-=_,C1=P0(Q,C1*4);return i1.length===0?_e(0):$t(i1).slice(0,X.size)}function g(X,r1,Q,J,c1){var i1=N;if(X===N){if(r1!==0)throw new Error("DIFAT chain shorter than expected")}else if(X!==-1){var C1=Q[X],M1=(J>>>2)-1;if(!C1)return;for(var D=0;D<M1&&(i1=P0(C1,D*4))!==N;++D)c1.push(i1);g(P0(C1,J-4),r1-1,Q,J,c1)}}function y(X,r1,Q,J,c1){var i1=[],C1=[];c1||(c1=[]);var M1=J-1,D=0,U=0;for(D=r1;D>=0;){c1[D]=!0,i1[i1.length]=D,C1.push(X[D]);var P=Q[Math.floor(D*4/J)];if(U=D*4&M1,J<4+U)throw new Error("FAT boundary crossed: "+D+" 4 "+J);if(!X[P])break;D=P0(X[P],U)}return{nodes:i1,data:Lm([C1])}}function x(X,r1,Q,J){var c1=X.length,i1=[],C1=[],M1=[],D=[],U=J-1,P=0,K=0,Z=0,o1=0;for(P=0;P<c1;++P)if(M1=[],Z=P+r1,Z>=c1&&(Z-=c1),!C1[Z]){D=[];var s1=[];for(K=Z;K>=0;){s1[K]=!0,C1[K]=!0,M1[M1.length]=K,D.push(X[K]);var x1=Q[Math.floor(K*4/J)];if(o1=K*4&U,J<4+o1)throw new Error("FAT boundary crossed: "+K+" 4 "+J);if(!X[x1]||(K=P0(X[x1],o1),s1[K]))break}i1[Z]={nodes:M1,data:Lm([D])}}return i1}function C(X,r1,Q,J,c1,i1,C1,M1){for(var D=0,U=J.length?2:0,P=r1[X].data,K=0,Z=0,o1;K<P.length;K+=128){var s1=P.slice(K,K+128);Be(s1,64),Z=s1.read_shift(2),o1=a9(s1,0,Z-U),J.push(o1);var x1={name:o1,type:s1.read_shift(1),color:s1.read_shift(1),L:s1.read_shift(4,"i"),R:s1.read_shift(4,"i"),C:s1.read_shift(4,"i"),clsid:s1.read_shift(16),state:s1.read_shift(4,"i"),start:0,size:0},V1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);V1!==0&&(x1.ct=b(s1,s1.l-8));var L1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);L1!==0&&(x1.mt=b(s1,s1.l-8)),x1.start=s1.read_shift(4,"i"),x1.size=s1.read_shift(4,"i"),x1.size<0&&x1.start<0&&(x1.size=x1.type=0,x1.start=N,x1.name=""),x1.type===5?(D=x1.start,c1>0&&D!==N&&(r1[D].name="!StreamData")):x1.size>=4096?(x1.storage="fat",r1[x1.start]===void 0&&(r1[x1.start]=y(Q,x1.start,r1.fat_addrs,r1.ssz)),r1[x1.start].name=x1.name,x1.content=r1[x1.start].data.slice(0,x1.size)):(x1.storage="minifat",x1.size<0?x1.size=0:D!==N&&x1.start!==N&&r1[D]&&(x1.content=p(x1,r1[D].data,(r1[M1]||{}).data))),x1.content&&Be(x1.content,0),i1[o1]=x1,C1.push(x1)}}function b(X,r1){return new Date((C3(X,r1+4)/1e7*Math.pow(2,32)+C3(X,r1)/1e7-11644473600)*1e3)}function M(X,r1){return f(),u(l.readFileSync(X),r1)}function w(X,r1){var Q=r1&&r1.type;switch(Q||h2&&Buffer.isBuffer(X)&&(Q="buffer"),Q||"base64"){case"file":return M(X,r1);case"base64":return u(t4(H3(X)),r1);case"binary":return u(t4(X),r1)}return u(X,r1)}function z(X,r1){var Q=r1||{},J=Q.root||"Root Entry";if(X.FullPaths||(X.FullPaths=[]),X.FileIndex||(X.FileIndex=[]),X.FullPaths.length!==X.FileIndex.length)throw new Error("inconsistent CFB structure");X.FullPaths.length===0&&(X.FullPaths[0]=J+"/",X.FileIndex[0]={name:J,type:5}),Q.CLSID&&(X.FileIndex[0].clsid=Q.CLSID),H(X)}function H(X){var r1="Sh33tJ5";if(!v2.find(X,"/"+r1)){var Q=_e(4);Q[0]=55,Q[1]=Q[3]=50,Q[2]=54,X.FileIndex.push({name:r1,type:2,content:Q,size:4,L:69,R:69,C:69}),X.FullPaths.push(X.FullPaths[0]+r1),A(X)}}function A(X,r1){z(X);for(var Q=!1,J=!1,c1=X.FullPaths.length-1;c1>=0;--c1){var i1=X.FileIndex[c1];switch(i1.type){case 0:J?Q=!0:(X.FileIndex.pop(),X.FullPaths.pop());break;case 1:case 2:case 5:J=!0,isNaN(i1.R*i1.L*i1.C)&&(Q=!0),i1.R>-1&&i1.L>-1&&i1.R==i1.L&&(Q=!0);break;default:Q=!0;break}}if(!(!Q&&!r1)){var C1=new Date(1987,1,19),M1=0,D=Object.create?Object.create(null):{},U=[];for(c1=0;c1<X.FullPaths.length;++c1)D[X.FullPaths[c1]]=!0,X.FileIndex[c1].type!==0&&U.push([X.FullPaths[c1],X.FileIndex[c1]]);for(c1=0;c1<U.length;++c1){var P=r(U[c1][0]);J=D[P],J||(U.push([P,{name:n(P).replace("/",""),type:1,clsid:B,ct:C1,mt:C1,content:null}]),D[P]=!0)}for(U.sort(function(o1,s1){return a(o1[0],s1[0])}),X.FullPaths=[],X.FileIndex=[],c1=0;c1<U.length;++c1)X.FullPaths[c1]=U[c1][0],X.FileIndex[c1]=U[c1][1];for(c1=0;c1<U.length;++c1){var K=X.FileIndex[c1],Z=X.FullPaths[c1];if(K.name=n(Z).replace("/",""),K.L=K.R=K.C=-(K.color=1),K.size=K.content?K.content.length:0,K.start=0,K.clsid=K.clsid||B,c1===0)K.C=U.length>1?1:-1,K.size=0,K.type=5;else if(Z.slice(-1)=="/"){for(M1=c1+1;M1<U.length&&r(X.FullPaths[M1])!=Z;++M1);for(K.C=M1>=U.length?-1:M1,M1=c1+1;M1<U.length&&r(X.FullPaths[M1])!=r(Z);++M1);K.R=M1>=U.length?-1:M1,K.type=1}else r(X.FullPaths[c1+1]||"")==r(Z)&&(K.R=c1+1),K.type=2}}}function V(X,r1){var Q=r1||{};if(Q.fileType=="mad")return M0(X,Q);switch(A(X),Q.fileType){case"zip":return we(X,Q)}var J=function(o1){for(var s1=0,x1=0,V1=0;V1<o1.FileIndex.length;++V1){var L1=o1.FileIndex[V1];if(L1.content){var w1=L1.content.length;w1>0&&(w1<4096?s1+=w1+63>>6:x1+=w1+511>>9)}}for(var N1=o1.FullPaths.length+3>>2,I1=s1+7>>3,J1=s1+127>>7,U1=I1+x1+N1+J1,i2=U1+127>>7,O2=i2<=109?0:Math.ceil((i2-109)/127);U1+i2+O2+127>>7>i2;)O2=++i2<=109?0:Math.ceil((i2-109)/127);var fe=[1,O2,i2,J1,N1,x1,s1,0];return o1.FileIndex[0].size=s1<<6,fe[7]=(o1.FileIndex[0].start=fe[0]+fe[1]+fe[2]+fe[3]+fe[4]+fe[5])+(fe[6]+7>>3),fe}(X),c1=_e(J[7]<<9),i1=0,C1=0;{for(i1=0;i1<8;++i1)c1.write_shift(1,S[i1]);for(i1=0;i1<8;++i1)c1.write_shift(2,0);for(c1.write_shift(2,62),c1.write_shift(2,3),c1.write_shift(2,65534),c1.write_shift(2,9),c1.write_shift(2,6),i1=0;i1<3;++i1)c1.write_shift(2,0);for(c1.write_shift(4,0),c1.write_shift(4,J[2]),c1.write_shift(4,J[0]+J[1]+J[2]+J[3]-1),c1.write_shift(4,0),c1.write_shift(4,4096),c1.write_shift(4,J[3]?J[0]+J[1]+J[2]-1:N),c1.write_shift(4,J[3]),c1.write_shift(-4,J[1]?J[0]-1:N),c1.write_shift(4,J[1]),i1=0;i1<109;++i1)c1.write_shift(-4,i1<J[2]?J[1]+i1:-1)}if(J[1])for(C1=0;C1<J[1];++C1){for(;i1<236+C1*127;++i1)c1.write_shift(-4,i1<J[2]?J[1]+i1:-1);c1.write_shift(-4,C1===J[1]-1?N:C1+1)}var M1=function(o1){for(C1+=o1;i1<C1-1;++i1)c1.write_shift(-4,i1+1);o1&&(++i1,c1.write_shift(-4,N))};for(C1=i1=0,C1+=J[1];i1<C1;++i1)c1.write_shift(-4,F.DIFSECT);for(C1+=J[2];i1<C1;++i1)c1.write_shift(-4,F.FATSECT);M1(J[3]),M1(J[4]);for(var D=0,U=0,P=X.FileIndex[0];D<X.FileIndex.length;++D)P=X.FileIndex[D],P.content&&(U=P.content.length,!(U<4096)&&(P.start=C1,M1(U+511>>9)));for(M1(J[6]+7>>3);c1.l&511;)c1.write_shift(-4,F.ENDOFCHAIN);for(C1=i1=0,D=0;D<X.FileIndex.length;++D)P=X.FileIndex[D],P.content&&(U=P.content.length,!(!U||U>=4096)&&(P.start=C1,M1(U+63>>6)));for(;c1.l&511;)c1.write_shift(-4,F.ENDOFCHAIN);for(i1=0;i1<J[4]<<2;++i1){var K=X.FullPaths[i1];if(!K||K.length===0){for(D=0;D<17;++D)c1.write_shift(4,0);for(D=0;D<3;++D)c1.write_shift(4,-1);for(D=0;D<12;++D)c1.write_shift(4,0);continue}P=X.FileIndex[i1],i1===0&&(P.start=P.size?P.start-1:N);var Z=i1===0&&Q.root||P.name;if(U=2*(Z.length+1),c1.write_shift(64,Z,"utf16le"),c1.write_shift(2,U),c1.write_shift(1,P.type),c1.write_shift(1,P.color),c1.write_shift(-4,P.L),c1.write_shift(-4,P.R),c1.write_shift(-4,P.C),P.clsid)c1.write_shift(16,P.clsid,"hex");else for(D=0;D<4;++D)c1.write_shift(4,0);c1.write_shift(4,P.state||0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,P.start),c1.write_shift(4,P.size),c1.write_shift(4,0)}for(i1=1;i1<X.FileIndex.length;++i1)if(P=X.FileIndex[i1],P.size>=4096)if(c1.l=P.start+1<<9,h2&&Buffer.isBuffer(P.content))P.content.copy(c1,c1.l,0,P.size),c1.l+=P.size+511&-512;else{for(D=0;D<P.size;++D)c1.write_shift(1,P.content[D]);for(;D&511;++D)c1.write_shift(1,0)}for(i1=1;i1<X.FileIndex.length;++i1)if(P=X.FileIndex[i1],P.size>0&&P.size<4096)if(h2&&Buffer.isBuffer(P.content))P.content.copy(c1,c1.l,0,P.size),c1.l+=P.size+63&-64;else{for(D=0;D<P.size;++D)c1.write_shift(1,P.content[D]);for(;D&63;++D)c1.write_shift(1,0)}if(h2)c1.l=c1.length;else for(;c1.l<c1.length;)c1.write_shift(1,0);return c1}function k(X,r1){var Q=X.FullPaths.map(function(D){return D.toUpperCase()}),J=Q.map(function(D){var U=D.split("/");return U[U.length-(D.slice(-1)=="/"?2:1)]}),c1=!1;r1.charCodeAt(0)===47?(c1=!0,r1=Q[0].slice(0,-1)+r1):c1=r1.indexOf("/")!==-1;var i1=r1.toUpperCase(),C1=c1===!0?Q.indexOf(i1):J.indexOf(i1);if(C1!==-1)return X.FileIndex[C1];var M1=!i1.match(Ja);for(i1=i1.replace(l3,""),M1&&(i1=i1.replace(Ja,"!")),C1=0;C1<Q.length;++C1)if((M1?Q[C1].replace(Ja,"!"):Q[C1]).replace(l3,"")==i1||(M1?J[C1].replace(Ja,"!"):J[C1]).replace(l3,"")==i1)return X.FileIndex[C1];return null}var _=64,N=-2,q="d0cf11e0a1b11ae1",S=[208,207,17,224,161,177,26,225],B="00000000000000000000000000000000",F={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:N,FREESECT:-1,HEADER_SIGNATURE:q,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:B,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function e1(X,r1,Q){f();var J=V(X,Q);l.writeFileSync(r1,J)}function Y(X){for(var r1=new Array(X.length),Q=0;Q<X.length;++Q)r1[Q]=String.fromCharCode(X[Q]);return r1.join("")}function G(X,r1){var Q=V(X,r1);switch(r1&&r1.type||"buffer"){case"file":return f(),l.writeFileSync(r1.filename,Q),Q;case"binary":return typeof Q=="string"?Q:Y(Q);case"base64":return um(typeof Q=="string"?Q:Y(Q));case"buffer":if(h2)return Buffer.isBuffer(Q)?Q:y6(Q);case"array":return typeof Q=="string"?t4(Q):Q}return Q}var O;function T(X){try{var r1=X.InflateRaw,Q=new r1;if(Q._processChunk(new Uint8Array([3,0]),Q._finishFlushFlag),Q.bytesRead)O=X;else throw new Error("zlib does not expose bytesRead")}catch(J){console.error("cannot use native zlib: "+(J.message||J))}}function L(X,r1){if(!O)return S1(X,r1);var Q=O.InflateRaw,J=new Q,c1=J._processChunk(X.slice(X.l),J._finishFlushFlag);return X.l+=J.bytesRead,c1}function W(X){return O?O.deflateRawSync(X):O1(X)}var j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=[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 a1(X){var r1=(X<<1|X<<11)&139536|(X<<5|X<<15)&558144;return(r1>>16|r1>>8|r1)&255}for(var n1=typeof Uint8Array<"u",t1=n1?new Uint8Array(256):[],d1=0;d1<256;++d1)t1[d1]=a1(d1);function R(X,r1){var Q=t1[X&255];return r1<=8?Q>>>8-r1:(Q=Q<<8|t1[X>>8&255],r1<=16?Q>>>16-r1:(Q=Q<<8|t1[X>>16&255],Q>>>24-r1))}function p1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=6?0:X[J+1]<<8))>>>Q&3}function z1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=5?0:X[J+1]<<8))>>>Q&7}function h1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=4?0:X[J+1]<<8))>>>Q&15}function l1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=3?0:X[J+1]<<8))>>>Q&31}function f1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=1?0:X[J+1]<<8))>>>Q&127}function u1(X,r1,Q){var J=r1&7,c1=r1>>>3,i1=(1<<Q)-1,C1=X[c1]>>>J;return Q<8-J||(C1|=X[c1+1]<<8-J,Q<16-J)||(C1|=X[c1+2]<<16-J,Q<24-J)||(C1|=X[c1+3]<<24-J),C1&i1}function g1(X,r1,Q){var J=r1&7,c1=r1>>>3;return J<=5?X[c1]|=(Q&7)<<J:(X[c1]|=Q<<J&255,X[c1+1]=(Q&7)>>8-J),r1+3}function k1(X,r1,Q){var J=r1&7,c1=r1>>>3;return Q=(Q&1)<<J,X[c1]|=Q,r1+1}function b1(X,r1,Q){var J=r1&7,c1=r1>>>3;return Q<<=J,X[c1]|=Q&255,Q>>>=8,X[c1+1]=Q,r1+8}function H1(X,r1,Q){var J=r1&7,c1=r1>>>3;return Q<<=J,X[c1]|=Q&255,Q>>>=8,X[c1+1]=Q&255,X[c1+2]=Q>>>8,r1+16}function F1(X,r1){var Q=X.length,J=2*Q>r1?2*Q:r1+5,c1=0;if(Q>=r1)return X;if(h2){var i1=dm(J);if(X.copy)X.copy(i1);else for(;c1<X.length;++c1)i1[c1]=X[c1];return i1}else if(n1){var C1=new Uint8Array(J);if(C1.set)C1.set(X);else for(;c1<Q;++c1)C1[c1]=X[c1];return C1}return X.length=J,X}function $1(X){for(var r1=new Array(X),Q=0;Q<X;++Q)r1[Q]=0;return r1}function W1(X,r1,Q){var J=1,c1=0,i1=0,C1=0,M1=0,D=X.length,U=n1?new Uint16Array(32):$1(32);for(i1=0;i1<32;++i1)U[i1]=0;for(i1=D;i1<Q;++i1)X[i1]=0;D=X.length;var P=n1?new Uint16Array(D):$1(D);for(i1=0;i1<D;++i1)U[c1=X[i1]]++,J<c1&&(J=c1),P[i1]=0;for(U[0]=0,i1=1;i1<=J;++i1)U[i1+16]=M1=M1+U[i1-1]<<1;for(i1=0;i1<D;++i1)M1=X[i1],M1!=0&&(P[i1]=U[M1+16]++);var K=0;for(i1=0;i1<D;++i1)if(K=X[i1],K!=0)for(M1=R(P[i1],J)>>J-K,C1=(1<<J+4-K)-1;C1>=0;--C1)r1[M1|C1<<K]=K&15|i1<<4;return J}var K1=n1?new Uint16Array(512):$1(512),d2=n1?new Uint16Array(32):$1(32);if(!n1){for(var G1=0;G1<512;++G1)K1[G1]=0;for(G1=0;G1<32;++G1)d2[G1]=0}(function(){for(var X=[],r1=0;r1<32;r1++)X.push(5);W1(X,d2,32);var Q=[];for(r1=0;r1<=143;r1++)Q.push(8);for(;r1<=255;r1++)Q.push(9);for(;r1<=279;r1++)Q.push(7);for(;r1<=287;r1++)Q.push(8);W1(Q,K1,288)})();var j2=function(){for(var r1=n1?new Uint8Array(32768):[],Q=0,J=0;Q<I.length-1;++Q)for(;J<I[Q+1];++J)r1[J]=Q;for(;J<32768;++J)r1[J]=29;var c1=n1?new Uint8Array(259):[];for(Q=0,J=0;Q<E.length-1;++Q)for(;J<E[Q+1];++J)c1[J]=Q;function i1(M1,D){for(var U=0;U<M1.length;){var P=Math.min(65535,M1.length-U),K=U+P==M1.length;for(D.write_shift(1,+K),D.write_shift(2,P),D.write_shift(2,~P&65535);P-- >0;)D[D.l++]=M1[U++]}return D.l}function C1(M1,D){for(var U=0,P=0,K=n1?new Uint16Array(32768):[];P<M1.length;){var Z=Math.min(65535,M1.length-P);if(Z<10){for(U=g1(D,U,+(P+Z==M1.length)),U&7&&(U+=8-(U&7)),D.l=U/8|0,D.write_shift(2,Z),D.write_shift(2,~Z&65535);Z-- >0;)D[D.l++]=M1[P++];U=D.l*8;continue}U=g1(D,U,+(P+Z==M1.length)+2);for(var o1=0;Z-- >0;){var s1=M1[P];o1=(o1<<5^s1)&32767;var x1=-1,V1=0;if((x1=K[o1])&&(x1|=P&-32768,x1>P&&(x1-=32768),x1<P))for(;M1[x1+V1]==M1[P+V1]&&V1<250;)++V1;if(V1>2){s1=c1[V1],s1<=22?U=b1(D,U,t1[s1+1]>>1)-1:(b1(D,U,3),U+=5,b1(D,U,t1[s1-23]>>5),U+=3);var L1=s1<8?0:s1-4>>2;L1>0&&(H1(D,U,V1-E[s1]),U+=L1),s1=r1[P-x1],U=b1(D,U,t1[s1]>>3),U-=3;var w1=s1<4?0:s1-2>>1;w1>0&&(H1(D,U,P-x1-I[s1]),U+=w1);for(var N1=0;N1<V1;++N1)K[o1]=P&32767,o1=(o1<<5^M1[P])&32767,++P;Z-=V1-1}else s1<=143?s1=s1+48:U=k1(D,U,1),U=b1(D,U,t1[s1]),K[o1]=P&32767,++P}U=b1(D,U,0)-1}return D.l=(U+7)/8|0,D.l}return function(D,U){return D.length<8?i1(D,U):C1(D,U)}}();function O1(X){var r1=_e(50+Math.floor(X.length*1.1)),Q=j2(X,r1);return r1.slice(0,Q)}var c2=n1?new Uint16Array(32768):$1(32768),Y2=n1?new Uint16Array(32768):$1(32768),m2=n1?new Uint16Array(128):$1(128),A2=1,Pe=1;function y1(X,r1){var Q=l1(X,r1)+257;r1+=5;var J=l1(X,r1)+1;r1+=5;var c1=h1(X,r1)+4;r1+=4;for(var i1=0,C1=n1?new Uint8Array(19):$1(19),M1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],D=1,U=n1?new Uint8Array(8):$1(8),P=n1?new Uint8Array(8):$1(8),K=C1.length,Z=0;Z<c1;++Z)C1[j[Z]]=i1=z1(X,r1),D<i1&&(D=i1),U[i1]++,r1+=3;var o1=0;for(U[0]=0,Z=1;Z<=D;++Z)P[Z]=o1=o1+U[Z-1]<<1;for(Z=0;Z<K;++Z)(o1=C1[Z])!=0&&(M1[Z]=P[o1]++);var s1=0;for(Z=0;Z<K;++Z)if(s1=C1[Z],s1!=0){o1=t1[M1[Z]]>>8-s1;for(var x1=(1<<7-s1)-1;x1>=0;--x1)m2[o1|x1<<s1]=s1&7|Z<<3}var V1=[];for(D=1;V1.length<Q+J;)switch(o1=m2[f1(X,r1)],r1+=o1&7,o1>>>=3){case 16:for(i1=3+p1(X,r1),r1+=2,o1=V1[V1.length-1];i1-- >0;)V1.push(o1);break;case 17:for(i1=3+z1(X,r1),r1+=3;i1-- >0;)V1.push(0);break;case 18:for(i1=11+f1(X,r1),r1+=7;i1-- >0;)V1.push(0);break;default:V1.push(o1),D<o1&&(D=o1);break}var L1=V1.slice(0,Q),w1=V1.slice(Q);for(Z=Q;Z<286;++Z)L1[Z]=0;for(Z=J;Z<30;++Z)w1[Z]=0;return A2=W1(L1,c2,286),Pe=W1(w1,Y2,30),r1}function m1(X,r1){if(X[0]==3&&!(X[1]&3))return[m0(r1),2];for(var Q=0,J=0,c1=dm(r1||1<<18),i1=0,C1=c1.length>>>0,M1=0,D=0;!(J&1);){if(J=z1(X,Q),Q+=3,J>>>1)J>>1==1?(M1=9,D=5):(Q=y1(X,Q),M1=A2,D=Pe);else{Q&7&&(Q+=8-(Q&7));var U=X[Q>>>3]|X[(Q>>>3)+1]<<8;if(Q+=32,U>0)for(!r1&&C1<i1+U&&(c1=F1(c1,i1+U),C1=c1.length);U-- >0;)c1[i1++]=X[Q>>>3],Q+=8;continue}for(;;){!r1&&C1<i1+32767&&(c1=F1(c1,i1+32767),C1=c1.length);var P=u1(X,Q,M1),K=J>>>1==1?K1[P]:c2[P];if(Q+=K&15,K>>>=4,!(K>>>8&255))c1[i1++]=K;else{if(K==256)break;K-=257;var Z=K<8?0:K-4>>2;Z>5&&(Z=0);var o1=i1+E[K];Z>0&&(o1+=u1(X,Q,Z),Q+=Z),P=u1(X,Q,D),K=J>>>1==1?d2[P]:Y2[P],Q+=K&15,K>>>=4;var s1=K<4?0:K-2>>1,x1=I[K];for(s1>0&&(x1+=u1(X,Q,s1),Q+=s1),!r1&&C1<o1&&(c1=F1(c1,o1+100),C1=c1.length);i1<o1;)c1[i1]=c1[i1-x1],++i1}}}return r1?[c1,Q+7>>>3]:[c1.slice(0,i1),Q+7>>>3]}function S1(X,r1){var Q=X.slice(X.l||0),J=m1(Q,r1);return X.l+=J[1],J[0]}function T1(X,r1){if(X)typeof console<"u"&&console.error(r1);else throw new Error(r1)}function Q1(X,r1){var Q=X;Be(Q,0);var J=[],c1=[],i1={FileIndex:J,FullPaths:c1};z(i1,{root:r1.root});for(var C1=Q.length-4;(Q[C1]!=80||Q[C1+1]!=75||Q[C1+2]!=5||Q[C1+3]!=6)&&C1>=0;)--C1;Q.l=C1+4,Q.l+=4;var M1=Q.read_shift(2);Q.l+=6;var D=Q.read_shift(4);for(Q.l=D,C1=0;C1<M1;++C1){Q.l+=20;var U=Q.read_shift(4),P=Q.read_shift(4),K=Q.read_shift(2),Z=Q.read_shift(2),o1=Q.read_shift(2);Q.l+=8;var s1=Q.read_shift(4),x1=s(Q.slice(Q.l+K,Q.l+K+Z));Q.l+=K+Z+o1;var V1=Q.l;Q.l=s1+4,Q2(Q,U,P,i1,x1),Q.l=V1}return i1}function Q2(X,r1,Q,J,c1){X.l+=2;var i1=X.read_shift(2),C1=X.read_shift(2),M1=i(X);if(i1&8257)throw new Error("Unsupported ZIP encryption");for(var D=X.read_shift(4),U=X.read_shift(4),P=X.read_shift(4),K=X.read_shift(2),Z=X.read_shift(2),o1="",s1=0;s1<K;++s1)o1+=String.fromCharCode(X[X.l++]);if(Z){var x1=s(X.slice(X.l,X.l+Z));(x1[21589]||{}).mt&&(M1=x1[21589].mt),((c1||{})[21589]||{}).mt&&(M1=c1[21589].mt)}X.l+=Z;var V1=X.slice(X.l,X.l+U);switch(C1){case 8:V1=L(X,P);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+C1)}var L1=!1;i1&8&&(D=X.read_shift(4),D==134695760&&(D=X.read_shift(4),L1=!0),U=X.read_shift(4),P=X.read_shift(4)),U!=r1&&T1(L1,"Bad compressed size: "+r1+" != "+U),P!=Q&&T1(L1,"Bad uncompressed size: "+Q+" != "+P),T3(J,o1,V1,{unsafe:!0,mt:M1})}function we(X,r1){var Q=r1||{},J=[],c1=[],i1=_e(1),C1=Q.compression?8:0,M1=0,D=0,U=0,P=0,K=0,Z=X.FullPaths[0],o1=Z,s1=X.FileIndex[0],x1=[],V1=0;for(D=1;D<X.FullPaths.length;++D)if(o1=X.FullPaths[D].slice(Z.length),s1=X.FileIndex[D],!(!s1.size||!s1.content||o1=="Sh33tJ5")){var L1=P,w1=_e(o1.length);for(U=0;U<o1.length;++U)w1.write_shift(1,o1.charCodeAt(U)&127);w1=w1.slice(0,w1.l),x1[K]=vt1.buf(s1.content,0);var N1=s1.content;C1==8&&(N1=W(N1)),i1=_e(30),i1.write_shift(4,67324752),i1.write_shift(2,20),i1.write_shift(2,M1),i1.write_shift(2,C1),s1.mt?c(i1,s1.mt):i1.write_shift(4,0),i1.write_shift(-4,x1[K]),i1.write_shift(4,N1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,w1.length),i1.write_shift(2,0),P+=i1.length,J.push(i1),P+=w1.length,J.push(w1),P+=N1.length,J.push(N1),i1=_e(46),i1.write_shift(4,33639248),i1.write_shift(2,0),i1.write_shift(2,20),i1.write_shift(2,M1),i1.write_shift(2,C1),i1.write_shift(4,0),i1.write_shift(-4,x1[K]),i1.write_shift(4,N1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,w1.length),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(4,0),i1.write_shift(4,L1),V1+=i1.l,c1.push(i1),V1+=w1.length,c1.push(w1),++K}return i1=_e(22),i1.write_shift(4,101010256),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,K),i1.write_shift(2,K),i1.write_shift(4,V1),i1.write_shift(4,P),i1.write_shift(2,0),$t([$t(J),$t(c1),i1])}var d3={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 j3(X,r1){if(X.ctype)return X.ctype;var Q=X.name||"",J=Q.match(/\.([^\.]+)$/);return J&&d3[J[1]]||r1&&(J=(Q=r1).match(/[\.\\]([^\.\\])+$/),J&&d3[J[1]])?d3[J[1]]:"application/octet-stream"}function k2(X){for(var r1=um(X),Q=[],J=0;J<r1.length;J+=76)Q.push(r1.slice(J,J+76));return Q.join(`\r
836
+ `):e}function wY(e,t){const{element:a,datasetIndex:r,index:n}=t,c=e.getDatasetMeta(r).controller,{label:i,value:s}=c.getLabelAndValue(n);return{chart:e,label:i,parsed:c.getParsed(n),raw:e.data.datasets[r].data[n],formattedValue:s,dataset:c.getDataset(),dataIndex:n,datasetIndex:r,element:a}}function Kd(e,t){const a=e.chart.ctx,{body:r,footer:n,title:c}=e,{boxWidth:i,boxHeight:s}=t,l=Ve(t.bodyFont),f=Ve(t.titleFont),u=Ve(t.footerFont),d=c.length,h=n.length,m=r.length,v=t3(t.padding);let p=v.height,g=0,y=r.reduce((b,M)=>b+M.before.length+M.lines.length+M.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(p+=d*f.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const b=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=m*b+(y-m)*l.lineHeight+(y-1)*t.bodySpacing}h&&(p+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let x=0;const C=function(b){g=Math.max(g,a.measureText(b).width+x)};return a.save(),a.font=f.string,V2(e.title,C),a.font=l.string,V2(e.beforeBody.concat(e.afterBody),C),x=t.displayColors?i+2+t.boxPadding:0,V2(r,b=>{V2(b.before,C),V2(b.lines,C),V2(b.after,C)}),x=0,a.font=u.string,V2(e.footer,C),a.restore(),g+=v.width,{width:g,height:p}}function _Y(e,t){const{y:a,height:r}=t;return a<r/2?"top":a>e.height-r/2?"bottom":"center"}function kY(e,t,a,r){const{x:n,width:c}=r,i=a.caretSize+a.caretPadding;if(e==="left"&&n+c+i>t.width||e==="right"&&n-c-i<0)return!0}function HY(e,t,a,r){const{x:n,width:c}=a,{width:i,chartArea:{left:s,right:l}}=e;let f="center";return r==="center"?f=n<=(s+l)/2?"left":"right":n<=c/2?f="left":n>=i-c/2&&(f="right"),kY(f,e,t,a)&&(f="center"),f}function Zd(e,t,a){const r=a.yAlign||t.yAlign||_Y(e,a);return{xAlign:a.xAlign||t.xAlign||HY(e,t,a,r),yAlign:r}}function VY(e,t){let{x:a,width:r}=e;return t==="right"?a-=r:t==="center"&&(a-=r/2),a}function LY(e,t,a){let{y:r,height:n}=e;return t==="top"?r+=a:t==="bottom"?r-=n+a:r-=n/2,r}function Qd(e,t,a,r){const{caretSize:n,caretPadding:c,cornerRadius:i}=e,{xAlign:s,yAlign:l}=a,f=n+c,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:m}=j0(i);let v=VY(t,s);const p=LY(t,l,f);return l==="center"?s==="left"?v+=f:s==="right"&&(v-=f):s==="left"?v-=Math.max(u,h)+n:s==="right"&&(v+=Math.max(d,m)+n),{x:Ne(v,0,r.width-t.width),y:Ne(p,0,r.height-t.height)}}function C8(e,t,a){const r=t3(a.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Jd(e){return w4([],at(e))}function SY(e,t,a){return v0(e,{tooltip:t,tooltipItems:a,type:"tooltip"})}function eh(e,t){const a=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return a?e.override(a):e}const Zy={beforeTitle:et,title(e){if(e.length>0){const t=e[0],a=t.chart.data.labels,r=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return a[t.dataIndex]}return""},afterTitle:et,beforeBody:et,beforeLabel:et,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const a=e.formattedValue;return x2(a)||(t+=a),t},labelColor(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:et,afterBody:et,beforeFooter:et,footer:et,afterFooter:et};function h3(e,t,a,r){const n=e[t].call(a,r);return typeof n>"u"?Zy[t].call(a,r):n}class v7 extends g4{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const a=this.chart,r=this.options.setContext(this.getContext()),n=r.enabled&&a.options.animation&&r.animations,c=new Sy(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(c)),c}getContext(){return this.$context||(this.$context=SY(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,a){const{callbacks:r}=a,n=h3(r,"beforeTitle",this,t),c=h3(r,"title",this,t),i=h3(r,"afterTitle",this,t);let s=[];return s=w4(s,at(n)),s=w4(s,at(c)),s=w4(s,at(i)),s}getBeforeBody(t,a){return Jd(h3(a.callbacks,"beforeBody",this,t))}getBody(t,a){const{callbacks:r}=a,n=[];return V2(t,c=>{const i={before:[],lines:[],after:[]},s=eh(r,c);w4(i.before,at(h3(s,"beforeLabel",this,c))),w4(i.lines,h3(s,"label",this,c)),w4(i.after,at(h3(s,"afterLabel",this,c))),n.push(i)}),n}getAfterBody(t,a){return Jd(h3(a.callbacks,"afterBody",this,t))}getFooter(t,a){const{callbacks:r}=a,n=h3(r,"beforeFooter",this,t),c=h3(r,"footer",this,t),i=h3(r,"afterFooter",this,t);let s=[];return s=w4(s,at(n)),s=w4(s,at(c)),s=w4(s,at(i)),s}_createItems(t){const a=this._active,r=this.chart.data,n=[],c=[],i=[];let s=[],l,f;for(l=0,f=a.length;l<f;++l)s.push(wY(this.chart,a[l]));return t.filter&&(s=s.filter((u,d,h)=>t.filter(u,d,h,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),V2(s,u=>{const d=eh(t.callbacks,u);n.push(h3(d,"labelColor",this,u)),c.push(h3(d,"labelPointStyle",this,u)),i.push(h3(d,"labelTextColor",this,u))}),this.labelColors=n,this.labelPointStyles=c,this.labelTextColors=i,this.dataPoints=s,s}update(t,a){const r=this.options.setContext(this.getContext()),n=this._active;let c,i=[];if(!n.length)this.opacity!==0&&(c={opacity:0});else{const s=Ka[r.position].call(this,n,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const l=this._size=Kd(this,r),f=Object.assign({},s,l),u=Zd(this.chart,r,f),d=Qd(r,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,c={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=i,this.$context=void 0,c&&this._resolveAnimations().update(this,c),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(t,a,r,n){const c=this.getCaretPosition(t,r,n);a.lineTo(c.x1,c.y1),a.lineTo(c.x2,c.y2),a.lineTo(c.x3,c.y3)}getCaretPosition(t,a,r){const{xAlign:n,yAlign:c}=this,{caretSize:i,cornerRadius:s}=r,{topLeft:l,topRight:f,bottomLeft:u,bottomRight:d}=j0(s),{x:h,y:m}=t,{width:v,height:p}=a;let g,y,x,C,b,M;return c==="center"?(b=m+p/2,n==="left"?(g=h,y=g-i,C=b+i,M=b-i):(g=h+v,y=g+i,C=b-i,M=b+i),x=g):(n==="left"?y=h+Math.max(l,u)+i:n==="right"?y=h+v-Math.max(f,d)-i:y=this.caretX,c==="top"?(C=m,b=C-i,g=y-i,x=y+i):(C=m+p,b=C+i,g=y+i,x=y-i),M=C),{x1:g,x2:y,x3:x,y1:C,y2:b,y3:M}}drawTitle(t,a,r){const n=this.title,c=n.length;let i,s,l;if(c){const f=q6(r.rtl,this.x,this.width);for(t.x=C8(this,r.titleAlign,r),a.textAlign=f.textAlign(r.titleAlign),a.textBaseline="middle",i=Ve(r.titleFont),s=r.titleSpacing,a.fillStyle=r.titleColor,a.font=i.string,l=0;l<c;++l)a.fillText(n[l],f.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+s,l+1===c&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,a,r,n,c){const i=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:f}=c,u=Ve(c.bodyFont),d=C8(this,"left",c),h=n.x(d),m=l<u.lineHeight?(u.lineHeight-l)/2:0,v=a.y+m;if(c.usePointStyle){const p={radius:Math.min(f,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=n.leftForLtr(h,f)+f/2,y=v+l/2;t.strokeStyle=c.multiKeyBackground,t.fillStyle=c.multiKeyBackground,l7(t,p,g,y),t.strokeStyle=i.borderColor,t.fillStyle=i.backgroundColor,l7(t,p,g,y)}else{t.lineWidth=u2(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,t.strokeStyle=i.borderColor,t.setLineDash(i.borderDash||[]),t.lineDashOffset=i.borderDashOffset||0;const p=n.leftForLtr(h,f),g=n.leftForLtr(n.xPlus(h,1),f-2),y=j0(i.borderRadius);Object.values(y).some(x=>x!==0)?(t.beginPath(),t.fillStyle=c.multiKeyBackground,Yr(t,{x:p,y:v,w:f,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=i.backgroundColor,t.beginPath(),Yr(t,{x:g,y:v+1,w:f-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=c.multiKeyBackground,t.fillRect(p,v,f,l),t.strokeRect(p,v,f,l),t.fillStyle=i.backgroundColor,t.fillRect(g,v+1,f-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,a,r){const{body:n}=this,{bodySpacing:c,bodyAlign:i,displayColors:s,boxHeight:l,boxWidth:f,boxPadding:u}=r,d=Ve(r.bodyFont);let h=d.lineHeight,m=0;const v=q6(r.rtl,this.x,this.width),p=function(H){a.fillText(H,v.x(t.x+m),t.y+h/2),t.y+=h+c},g=v.textAlign(i);let y,x,C,b,M,w,z;for(a.textAlign=i,a.textBaseline="middle",a.font=d.string,t.x=C8(this,g,r),a.fillStyle=r.bodyColor,V2(this.beforeBody,p),m=s&&g!=="right"?i==="center"?f/2+u:f+2+u:0,b=0,w=n.length;b<w;++b){for(y=n[b],x=this.labelTextColors[b],a.fillStyle=x,V2(y.before,p),C=y.lines,s&&C.length&&(this._drawColorBox(a,t,b,v,r),h=Math.max(d.lineHeight,l)),M=0,z=C.length;M<z;++M)p(C[M]),h=d.lineHeight;V2(y.after,p)}m=0,h=d.lineHeight,V2(this.afterBody,p),t.y-=c}drawFooter(t,a,r){const n=this.footer,c=n.length;let i,s;if(c){const l=q6(r.rtl,this.x,this.width);for(t.x=C8(this,r.footerAlign,r),t.y+=r.footerMarginTop,a.textAlign=l.textAlign(r.footerAlign),a.textBaseline="middle",i=Ve(r.footerFont),a.fillStyle=r.footerColor,a.font=i.string,s=0;s<c;++s)a.fillText(n[s],l.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+r.footerSpacing}}drawBackground(t,a,r,n){const{xAlign:c,yAlign:i}=this,{x:s,y:l}=t,{width:f,height:u}=r,{topLeft:d,topRight:h,bottomLeft:m,bottomRight:v}=j0(n.cornerRadius);a.fillStyle=n.backgroundColor,a.strokeStyle=n.borderColor,a.lineWidth=n.borderWidth,a.beginPath(),a.moveTo(s+d,l),i==="top"&&this.drawCaret(t,a,r,n),a.lineTo(s+f-h,l),a.quadraticCurveTo(s+f,l,s+f,l+h),i==="center"&&c==="right"&&this.drawCaret(t,a,r,n),a.lineTo(s+f,l+u-v),a.quadraticCurveTo(s+f,l+u,s+f-v,l+u),i==="bottom"&&this.drawCaret(t,a,r,n),a.lineTo(s+m,l+u),a.quadraticCurveTo(s,l+u,s,l+u-m),i==="center"&&c==="left"&&this.drawCaret(t,a,r,n),a.lineTo(s,l+d),a.quadraticCurveTo(s,l,s+d,l),a.closePath(),a.fill(),n.borderWidth>0&&a.stroke()}_updateAnimationTarget(t){const a=this.chart,r=this.$animations,n=r&&r.x,c=r&&r.y;if(n||c){const i=Ka[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=Kd(this,t),l=Object.assign({},i,this._size),f=Zd(a,t,l),u=Qd(t,l,f,a);(n._to!==u.x||c._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(t){const a=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(a);const n={width:this.width,height:this.height},c={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=t3(a.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(c,t,n,a),_y(t,a.textDirection),c.y+=i.top,this.drawTitle(c,t,a),this.drawBody(c,t,a),this.drawFooter(c,t,a),ky(t,a.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,a){const r=this._active,n=t.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}}),c=!Hc(r,n),i=this._positionChanged(n,a);(c||i)&&(this._active=n,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,a,r=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,c=this._active||[],i=this._getActiveElements(t,c,a,r),s=this._positionChanged(i,t),l=a||!Hc(i,c)||s;return l&&(this._active=i,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,a))),l}_getActiveElements(t,a,r,n){const c=this.options;if(t.type==="mouseout")return[];if(!n)return a.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const i=this.chart.getElementsAtEventForMode(t,c.mode,c,r);return c.reverse&&i.reverse(),i}_positionChanged(t,a){const{caretX:r,caretY:n,options:c}=this,i=Ka[c.position].call(this,t,a);return i!==!1&&(r!==i.x||n!==i.y)}}v1(v7,"positioners",Ka);var AY={id:"tooltip",_element:v7,positioners:Ka,afterInit(e,t,a){a&&(e.tooltip=new v7({chart:e,options:a}))},beforeUpdate(e,t,a){e.tooltip&&e.tooltip.initialize(a)},reset(e,t,a){e.tooltip&&e.tooltip.initialize(a)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const a={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",a)}},afterEvent(e,t){if(e.tooltip){const a=t.replay;e.tooltip.handleEvent(t.event,a,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Zy},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"]},TY=Object.freeze({__proto__:null,Colors:Wj,Decimation:Gj,Filler:mY,Legend:bY,SubTitle:zY,Title:MY,Tooltip:AY});const EY=(e,t,a,r)=>(typeof t=="string"?(a=e.push(t)-1,r.unshift({index:a,label:t})):isNaN(t)&&(a=null),a);function NY(e,t,a,r){const n=e.indexOf(t);if(n===-1)return EY(e,t,a,r);const c=e.lastIndexOf(t);return n!==c?a:n}const DY=(e,t)=>e===null?null:Ne(Math.round(e),0,t);function th(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class g7 extends h6{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const a=this._addedLabels;if(a.length){const r=this.getLabels();for(const{index:n,label:c}of a)r[n]===c&&r.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,a){if(x2(t))return null;const r=this.getLabels();return a=isFinite(a)&&r[a]===t?a:NY(r,t,a2(a,t),this._addedLabels),DY(a,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:r,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),a||(n=this.getLabels().length-1)),this.min=r,this.max=n}buildTicks(){const t=this.min,a=this.max,r=this.options.offset,n=[];let c=this.getLabels();c=t===0&&a===c.length-1?c:c.slice(t,a+1),this._valueRange=Math.max(c.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=t;i<=a;i++)n.push({value:i});return n}getLabelForValue(t){return th.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}v1(g7,"id","category"),v1(g7,"defaults",{ticks:{callback:th}});function OY(e,t){const a=[],{bounds:n,step:c,min:i,max:s,precision:l,count:f,maxTicks:u,maxDigits:d,includeBounds:h}=e,m=c||1,v=u-1,{min:p,max:g}=t,y=!x2(i),x=!x2(s),C=!x2(f),b=(g-p)/(d+1);let M=Ku((g-p)/v/m)*m,w,z,H,A;if(M<1e-14&&!y&&!x)return[{value:p},{value:g}];A=Math.ceil(g/M)-Math.floor(p/M),A>v&&(M=Ku(A*M/v/m)*m),x2(l)||(w=Math.pow(10,l),M=Math.ceil(M*w)/w),n==="ticks"?(z=Math.floor(p/M)*M,H=Math.ceil(g/M)*M):(z=p,H=g),y&&x&&c&&LU((s-i)/c,M/1e3)?(A=Math.round(Math.min((s-i)/M,u)),M=(s-i)/A,z=i,H=s):C?(z=y?i:z,H=x?s:H,A=f-1,M=(H-z)/A):(A=(H-z)/M,dr(A,Math.round(A),M/1e3)?A=Math.round(A):A=Math.ceil(A));const V=Math.max(Zu(M),Zu(z));w=Math.pow(10,x2(l)?V:l),z=Math.round(z*w)/w,H=Math.round(H*w)/w;let k=0;for(y&&(h&&z!==i?(a.push({value:i}),z<i&&k++,dr(Math.round((z+k*M)*w)/w,i,ah(i,b,e))&&k++):z<i&&k++);k<A;++k){const _=Math.round((z+k*M)*w)/w;if(x&&_>s)break;a.push({value:_})}return x&&h&&H!==s?a.length&&dr(a[a.length-1].value,s,ah(s,b,e))?a[a.length-1].value=s:a.push({value:s}):(!x||H===s)&&a.push({value:H}),a}function ah(e,t,{horizontal:a,minRotation:r}){const n=n4(r),c=(a?Math.sin(n):Math.cos(n))||.001,i=.75*t*(""+e).length;return Math.min(t/c,i)}class Nc extends h6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,a){return x2(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:a,maxDefined:r}=this.getUserBounds();let{min:n,max:c}=this;const i=l=>n=a?n:l,s=l=>c=r?c:l;if(t){const l=P4(n),f=P4(c);l<0&&f<0?s(0):l>0&&f>0&&i(0)}if(n===c){let l=c===0?1:Math.abs(c*.05);s(c+l),t||i(n-l)}this.min=n,this.max=c}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:a,stepSize:r}=t,n;return r?(n=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,a=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const n={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},c=this._range||this,i=OY(n,c);return t.bounds==="ticks"&&oy(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let a=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const n=(r-a)/Math.max(t.length-1,1)/2;a-=n,r+=n}this._startValue=a,this._endValue=r,this._valueRange=r-a}getLabelForValue(t){return kn(t,this.chart.options.locale,this.options.ticks.format)}}class y7 extends Nc{determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=se(t)?t:0,this.max=se(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),a=t?this.width:this.height,r=n4(this.options.ticks.minRotation),n=(t?Math.sin(r):Math.cos(r))||.001,c=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,c.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}v1(y7,"id","linear"),v1(y7,"defaults",{ticks:{callback:k5.formatters.numeric}});const Xr=e=>Math.floor(jt(e)),L0=(e,t)=>Math.pow(10,Xr(e)+t);function rh(e){return e/Math.pow(10,Xr(e))===1}function nh(e,t,a){const r=Math.pow(10,a),n=Math.floor(e/r);return Math.ceil(t/r)-n}function PY(e,t){const a=t-e;let r=Xr(a);for(;nh(e,t,r)>10;)r++;for(;nh(e,t,r)<10;)r--;return Math.min(r,Xr(e))}function BY(e,{min:t,max:a}){t=x3(e.min,t);const r=[],n=Xr(t);let c=PY(t,a),i=c<0?Math.pow(10,Math.abs(c)):1;const s=Math.pow(10,c),l=n>c?Math.pow(10,n):0,f=Math.round((t-l)*i)/i,u=Math.floor((t-l)/s/10)*s*10;let d=Math.floor((f-u)/Math.pow(10,c)),h=x3(e.min,Math.round((l+u+d*Math.pow(10,c))*i)/i);for(;h<a;)r.push({value:h,major:rh(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(c++,d=2,i=c>=0?1:i),h=Math.round((l+u+d*Math.pow(10,c))*i)/i;const m=x3(e.max,h);return r.push({value:m,major:rh(m),significand:d}),r}class x7 extends h6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,a){const r=Nc.prototype.parse.apply(this,[t,a]);if(r===0){this._zero=!0;return}return se(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=se(t)?Math.max(0,t):null,this.max=se(a)?Math.max(0,a):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!se(this._userMin)&&(this.min=t===L0(this.min,0)?L0(this.min,-1):L0(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let r=this.min,n=this.max;const c=s=>r=t?r:s,i=s=>n=a?n:s;r===n&&(r<=0?(c(1),i(10)):(c(L0(r,-1)),i(L0(n,1)))),r<=0&&c(L0(n,-1)),n<=0&&i(L0(r,1)),this.min=r,this.max=n}buildTicks(){const t=this.options,a={min:this._userMin,max:this._userMax},r=BY(a,this);return t.bounds==="ticks"&&oy(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":kn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=jt(t),this._valueRange=jt(this.max)-jt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(jt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const a=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+a*this._valueRange)}}v1(x7,"id","logarithmic"),v1(x7,"defaults",{ticks:{callback:k5.formatters.logarithmic,major:{enabled:!0}}});function b7(e){const t=e.ticks;if(t.display&&e.display){const a=t3(t.backdropPadding);return a2(t.font&&t.font.size,K2.font.size)+a.height}return 0}function FY(e,t,a){return a=R2(a)?a:[a],{w:jU(e,t.string,a),h:a.length*t.lineHeight}}function ch(e,t,a,r,n){return e===r||e===n?{start:t-a/2,end:t+a/2}:e<r||e>n?{start:t-a,end:t}:{start:t,end:t+a}}function RY(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},a=Object.assign({},t),r=[],n=[],c=e._pointLabels.length,i=e.options.pointLabels,s=i.centerPointLabels?U2/c:0;for(let l=0;l<c;l++){const f=i.setContext(e.getPointLabelContext(l));n[l]=f.padding;const u=e.getPointPosition(l,e.drawingArea+n[l],s),d=Ve(f.font),h=FY(e.ctx,d,e._pointLabels[l]);r[l]=h;const m=b3(e.getIndexAngle(l)+s),v=Math.round(nl(m)),p=ch(v,u.x,h.w,0,180),g=ch(v,u.y,h.h,90,270);IY(a,t,m,p,g)}e.setCenterPoint(t.l-a.l,a.r-t.r,t.t-a.t,a.b-t.b),e._pointLabelItems=WY(e,r,n)}function IY(e,t,a,r,n){const c=Math.abs(Math.sin(a)),i=Math.abs(Math.cos(a));let s=0,l=0;r.start<t.l?(s=(t.l-r.start)/c,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/c,e.r=Math.max(e.r,t.r+s)),n.start<t.t?(l=(t.t-n.start)/i,e.t=Math.min(e.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/i,e.b=Math.max(e.b,t.b+l))}function $Y(e,t,a){const r=e.drawingArea,{extra:n,additionalAngle:c,padding:i,size:s}=a,l=e.getPointPosition(t,r+n+i,c),f=Math.round(nl(b3(l.angle+pe))),u=YY(l.y,s.h,f),d=qY(f),h=jY(l.x,s.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+s.w,bottom:u+s.h}}function UY(e,t){if(!t)return!0;const{left:a,top:r,right:n,bottom:c}=e;return!(ut({x:a,y:r},t)||ut({x:a,y:c},t)||ut({x:n,y:r},t)||ut({x:n,y:c},t))}function WY(e,t,a){const r=[],n=e._pointLabels.length,c=e.options,{centerPointLabels:i,display:s}=c.pointLabels,l={extra:b7(c)/2,additionalAngle:i?U2/n:0};let f;for(let u=0;u<n;u++){l.padding=a[u],l.size=t[u];const d=$Y(e,u,l);r.push(d),s==="auto"&&(d.visible=UY(d,f),d.visible&&(f=d))}return r}function qY(e){return e===0||e===180?"center":e<180?"left":"right"}function jY(e,t,a){return a==="right"?e-=t:a==="center"&&(e-=t/2),e}function YY(e,t,a){return a===90||a===270?e-=t/2:(a>270||a<90)&&(e-=t),e}function GY(e,t,a){const{left:r,top:n,right:c,bottom:i}=a,{backdropColor:s}=t;if(!x2(s)){const l=j0(t.borderRadius),f=t3(t.backdropPadding);e.fillStyle=s;const u=r-f.left,d=n-f.top,h=c-r+f.width,m=i-n+f.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),Yr(e,{x:u,y:d,w:h,h:m,radius:l}),e.fill()):e.fillRect(u,d,h,m)}}function XY(e,t){const{ctx:a,options:{pointLabels:r}}=e;for(let n=t-1;n>=0;n--){const c=e._pointLabelItems[n];if(!c.visible)continue;const i=r.setContext(e.getPointLabelContext(n));GY(a,i,c);const s=Ve(i.font),{x:l,y:f,textAlign:u}=c;r6(a,e._pointLabels[n],l,f+s.lineHeight/2,s,{color:i.color,textAlign:u,textBaseline:"middle"})}}function Qy(e,t,a,r){const{ctx:n}=e;if(a)n.arc(e.xCenter,e.yCenter,t,0,$2);else{let c=e.getPointPosition(0,t);n.moveTo(c.x,c.y);for(let i=1;i<r;i++)c=e.getPointPosition(i,t),n.lineTo(c.x,c.y)}}function KY(e,t,a,r,n){const c=e.ctx,i=t.circular,{color:s,lineWidth:l}=t;!i&&!r||!s||!l||a<0||(c.save(),c.strokeStyle=s,c.lineWidth=l,c.setLineDash(n.dash||[]),c.lineDashOffset=n.dashOffset,c.beginPath(),Qy(e,a,i,r),c.closePath(),c.stroke(),c.restore())}function ZY(e,t,a){return v0(e,{label:a,index:t,type:"pointLabel"})}class Za extends Nc{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=t3(b7(this.options)/2),a=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+a/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(a,r)/2)}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!1);this.min=se(t)&&!isNaN(t)?t:0,this.max=se(a)&&!isNaN(a)?a:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/b7(this.options))}generateTickLabels(t){Nc.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((a,r)=>{const n=E2(this.options.pointLabels.callback,[a,r],this);return n||n===0?n:""}).filter((a,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?RY(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,a,r,n){this.xCenter+=Math.floor((t-a)/2),this.yCenter+=Math.floor((r-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,a,r,n))}getIndexAngle(t){const a=$2/(this._pointLabels.length||1),r=this.options.startAngle||0;return b3(t*a+n4(r))}getDistanceFromCenterForValue(t){if(x2(t))return NaN;const a=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*a:(t-this.min)*a}getValueForDistanceFromCenter(t){if(x2(t))return NaN;const a=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-a:this.min+a}getPointLabelContext(t){const a=this._pointLabels||[];if(t>=0&&t<a.length){const r=a[t];return ZY(this.getContext(),t,r)}}getPointPosition(t,a,r=0){const n=this.getIndexAngle(t)-pe+r;return{x:Math.cos(n)*a+this.xCenter,y:Math.sin(n)*a+this.yCenter,angle:n}}getPointPositionForValue(t,a){return this.getPointPosition(t,this.getDistanceFromCenterForValue(a))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:a,top:r,right:n,bottom:c}=this._pointLabelItems[t];return{left:a,top:r,right:n,bottom:c}}drawBackground(){const{backgroundColor:t,grid:{circular:a}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),Qy(this,this.getDistanceFromCenterForValue(this._endValue),a,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,a=this.options,{angleLines:r,grid:n,border:c}=a,i=this._pointLabels.length;let s,l,f;if(a.pointLabels.display&&XY(this,i),n.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),m=n.setContext(h),v=c.setContext(h);KY(this,m,l,i,v)}}),r.display){for(t.save(),s=i-1;s>=0;s--){const u=r.setContext(this.getPointLabelContext(s)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),f=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;const n=this.getIndexAngle(0);let c,i;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!a.reverse)return;const f=r.setContext(this.getContext(l)),u=Ve(f.font);if(c=this.getDistanceFromCenterForValue(this.ticks[l].value),f.showLabelBackdrop){t.font=u.string,i=t.measureText(s.label).width,t.fillStyle=f.backdropColor;const d=t3(f.backdropPadding);t.fillRect(-i/2-d.left,-c-u.size/2-d.top,i+d.width,u.size+d.height)}r6(t,s.label,0,-c,u,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}v1(Za,"id","radialLinear"),v1(Za,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:k5.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),v1(Za,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),v1(Za,"descriptors",{angleLines:{_fallback:"grid"}});const S5={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}},g3=Object.keys(S5);function ih(e,t){return e-t}function sh(e,t){if(x2(t))return null;const a=e._adapter,{parser:r,round:n,isoWeekday:c}=e._parseOpts;let i=t;return typeof r=="function"&&(i=r(i)),se(i)||(i=typeof r=="string"?a.parse(i,r):a.parse(i)),i===null?null:(n&&(i=n==="week"&&(Z6(c)||c===!0)?a.startOf(i,"isoWeek",c):a.startOf(i,n)),+i)}function oh(e,t,a,r){const n=g3.length;for(let c=g3.indexOf(e);c<n-1;++c){const i=S5[g3[c]],s=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((a-t)/(s*i.size))<=r)return g3[c]}return g3[n-1]}function QY(e,t,a,r,n){for(let c=g3.length-1;c>=g3.indexOf(a);c--){const i=g3[c];if(S5[i].common&&e._adapter.diff(n,r,i)>=t-1)return i}return g3[a?g3.indexOf(a):0]}function JY(e){for(let t=g3.indexOf(e)+1,a=g3.length;t<a;++t)if(S5[g3[t]].common)return g3[t]}function lh(e,t,a){if(!a)e[t]=!0;else if(a.length){const{lo:r,hi:n}=cl(a,t),c=a[r]>=t?a[r]:a[n];e[c]=!0}}function eG(e,t,a,r){const n=e._adapter,c=+n.startOf(t[0].value,r),i=t[t.length-1].value;let s,l;for(s=c;s<=i;s=+n.add(s,1,r))l=a[s],l>=0&&(t[l].major=!0);return t}function fh(e,t,a){const r=[],n={},c=t.length;let i,s;for(i=0;i<c;++i)s=t[i],n[s]=i,r.push({value:s,major:!1});return c===0||!a?r:eG(e,r,n,a)}class Kr extends h6{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,a={}){const r=t.time||(t.time={}),n=this._adapter=new oq._date(t.adapters.date);n.init(a),ur(r.displayFormats,n.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=a.normalized}parse(t,a){return t===void 0?null:sh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,a=this._adapter,r=t.time.unit||"day";let{min:n,max:c,minDefined:i,maxDefined:s}=this.getUserBounds();function l(f){!i&&!isNaN(f.min)&&(n=Math.min(n,f.min)),!s&&!isNaN(f.max)&&(c=Math.max(c,f.max))}(!i||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=se(n)&&!isNaN(n)?n:+a.startOf(Date.now(),r),c=se(c)&&!isNaN(c)?c:+a.endOf(Date.now(),r)+1,this.min=Math.min(n,c-1),this.max=Math.max(n+1,c)}_getLabelBounds(){const t=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(a=t[0],r=t[t.length-1]),{min:a,max:r}}buildTicks(){const t=this.options,a=t.time,r=t.ticks,n=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const c=this.min,i=this.max,s=EU(n,c,i);return this._unit=a.unit||(r.autoSkip?oh(a.minUnit,this.min,this.max,this._getLabelCapacity(c)):QY(this,s.length,a.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:JY(this._unit),this.initOffsets(n),t.reverse&&s.reverse(),fh(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let a=0,r=0,n,c;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?a=1-n:a=(this.getDecimalForValue(t[1])-n)/2,c=this.getDecimalForValue(t[t.length-1]),t.length===1?r=c:r=(c-this.getDecimalForValue(t[t.length-2]))/2);const i=t.length<3?.5:.25;a=Ne(a,0,i),r=Ne(r,0,i),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){const t=this._adapter,a=this.min,r=this.max,n=this.options,c=n.time,i=c.unit||oh(c.minUnit,a,r,this._getLabelCapacity(a)),s=a2(n.ticks.stepSize,1),l=i==="week"?c.isoWeekday:!1,f=Z6(l)||l===!0,u={};let d=a,h,m;if(f&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,f?"day":i),t.diff(r,a,i)>1e5*s)throw new Error(a+" and "+r+" are too far apart with stepSize of "+s+" "+i);const v=n.ticks.source==="data"&&this.getDataTimestamps();for(h=d,m=0;h<r;h=+t.add(h,s,i),m++)lh(u,h,v);return(h===r||n.bounds==="ticks"||m===1)&&lh(u,h,v),Object.keys(u).sort(ih).map(p=>+p)}getLabelForValue(t){const a=this._adapter,r=this.options.time;return r.tooltipFormat?a.format(t,r.tooltipFormat):a.format(t,r.displayFormats.datetime)}format(t,a){const n=this.options.time.displayFormats,c=this._unit,i=a||n[c];return this._adapter.format(t,i)}_tickFormatFunction(t,a,r,n){const c=this.options,i=c.ticks.callback;if(i)return E2(i,[t,a,r],this);const s=c.time.displayFormats,l=this._unit,f=this._majorUnit,u=l&&s[l],d=f&&s[f],h=r[a],m=f&&d&&h&&h.major;return this._adapter.format(t,n||(m?d:u))}generateTickLabels(t){let a,r,n;for(a=0,r=t.length;a<r;++a)n=t[a],n.label=this._tickFormatFunction(n.value,a,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const a=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((a.start+r)*a.factor)}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const a=this.options.ticks,r=this.ctx.measureText(t).width,n=n4(this.isHorizontal()?a.maxRotation:a.minRotation),c=Math.cos(n),i=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:r*c+s*i,h:r*i+s*c}}_getLabelCapacity(t){const a=this.options.time,r=a.displayFormats,n=r[a.unit]||r.millisecond,c=this._tickFormatFunction(t,0,fh(this,[t],this._majorUnit),n),i=this._getLabelSize(c),s=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],a,r;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(a=0,r=n.length;a<r;++a)t=t.concat(n[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let a,r;if(t.length)return t;const n=this.getLabels();for(a=0,r=n.length;a<r;++a)t.push(sh(this,n[a]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return uy(t.sort(ih))}}v1(Kr,"id","time"),v1(Kr,"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 M8(e,t,a){let r=0,n=e.length-1,c,i,s,l;a?(t>=e[r].pos&&t<=e[n].pos&&({lo:r,hi:n}=ft(e,"pos",t)),{pos:c,time:s}=e[r],{pos:i,time:l}=e[n]):(t>=e[r].time&&t<=e[n].time&&({lo:r,hi:n}=ft(e,"time",t)),{time:c,pos:s}=e[r],{time:i,pos:l}=e[n]);const f=i-c;return f?s+(l-s)*(t-c)/f:s}class C7 extends Kr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(t);this._minPos=M8(a,this.min),this._tableRange=M8(a,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:a,max:r}=this,n=[],c=[];let i,s,l,f,u;for(i=0,s=t.length;i<s;++i)f=t[i],f>=a&&f<=r&&n.push(f);if(n.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(i=0,s=n.length;i<s;++i)u=n[i+1],l=n[i-1],f=n[i],Math.round((u+l)/2)!==f&&c.push({time:f,pos:i/(s-1)});return c}_generate(){const t=this.min,a=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(a)||r.length===1)&&r.push(a),r.sort((n,c)=>n-c)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const a=this.getDataTimestamps(),r=this.getLabelTimestamps();return a.length&&r.length?t=this.normalize(a.concat(r)):t=a.length?a:r,t=this._cache.all=t,t}getDecimalForValue(t){return(M8(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return M8(this._table,r*this._tableRange+this._minPos,!0)}}v1(C7,"id","timeseries"),v1(C7,"defaults",Kr.defaults);var tG=Object.freeze({__proto__:null,CategoryScale:g7,LinearScale:y7,LogarithmicScale:x7,RadialLinearScale:Za,TimeScale:Kr,TimeSeriesScale:C7});const Jy=[sq,Pj,TY,tG];var aG=typeof global=="object"&&global&&global.Object===Object&&global;const ex=aG;var rG=typeof self=="object"&&self&&self.Object===Object&&self,nG=ex||rG||Function("return this")();const j4=nG;var cG=j4.Symbol;const d0=cG;var tx=Object.prototype,iG=tx.hasOwnProperty,sG=tx.toString,Pa=d0?d0.toStringTag:void 0;function oG(e){var t=iG.call(e,Pa),a=e[Pa];try{e[Pa]=void 0;var r=!0}catch{}var n=sG.call(e);return r&&(t?e[Pa]=a:delete e[Pa]),n}var lG=Object.prototype,fG=lG.toString;function uG(e){return fG.call(e)}var dG="[object Null]",hG="[object Undefined]",uh=d0?d0.toStringTag:void 0;function Vn(e){return e==null?e===void 0?hG:dG:uh&&uh in Object(e)?oG(e):uG(e)}function n6(e){return e!=null&&typeof e=="object"}var mG=Array.isArray;const ea=mG;function Ln(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pG="[object AsyncFunction]",vG="[object Function]",gG="[object GeneratorFunction]",yG="[object Proxy]";function ax(e){if(!Ln(e))return!1;var t=Vn(e);return t==vG||t==gG||t==pG||t==yG}var xG=j4["__core-js_shared__"];const Ki=xG;var dh=function(){var e=/[^.]+$/.exec(Ki&&Ki.keys&&Ki.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bG(e){return!!dh&&dh in e}var CG=Function.prototype,MG=CG.toString;function m6(e){if(e!=null){try{return MG.call(e)}catch{}try{return e+""}catch{}}return""}var zG=/[\\^$.*+?()[\]{}|]/g,wG=/^\[object .+?Constructor\]$/,_G=Function.prototype,kG=Object.prototype,HG=_G.toString,VG=kG.hasOwnProperty,LG=RegExp("^"+HG.call(VG).replace(zG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function SG(e){if(!Ln(e)||bG(e))return!1;var t=ax(e)?LG:wG;return t.test(m6(e))}function AG(e,t){return e==null?void 0:e[t]}function p6(e,t){var a=AG(e,t);return SG(a)?a:void 0}var TG=p6(j4,"WeakMap");const M7=TG;var hh=Object.create,EG=function(){function e(){}return function(t){if(!Ln(t))return{};if(hh)return hh(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();const NG=EG;function DG(e,t){var a=-1,r=e.length;for(t||(t=Array(r));++a<r;)t[a]=e[a];return t}var OG=function(){try{var e=p6(Object,"defineProperty");return e({},"",{}),e}catch{}}();const mh=OG;function PG(e,t){for(var a=-1,r=e==null?0:e.length;++a<r&&t(e[a],a,e)!==!1;);return e}var BG=9007199254740991,FG=/^(?:0|[1-9]\d*)$/;function RG(e,t){var a=typeof e;return t=t??BG,!!t&&(a=="number"||a!="symbol"&&FG.test(e))&&e>-1&&e%1==0&&e<t}function rx(e,t,a){t=="__proto__"&&mh?mh(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function gl(e,t){return e===t||e!==e&&t!==t}var IG=Object.prototype,$G=IG.hasOwnProperty;function nx(e,t,a){var r=e[t];(!($G.call(e,t)&&gl(r,a))||a===void 0&&!(t in e))&&rx(e,t,a)}function A5(e,t,a,r){var n=!a;a||(a={});for(var c=-1,i=t.length;++c<i;){var s=t[c],l=r?r(a[s],e[s],s,a,e):void 0;l===void 0&&(l=e[s]),n?rx(a,s,l):nx(a,s,l)}return a}var UG=9007199254740991;function cx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=UG}function yl(e){return e!=null&&cx(e.length)&&!ax(e)}var WG=Object.prototype;function T5(e){var t=e&&e.constructor,a=typeof t=="function"&&t.prototype||WG;return e===a}function qG(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}var jG="[object Arguments]";function ph(e){return n6(e)&&Vn(e)==jG}var ix=Object.prototype,YG=ix.hasOwnProperty,GG=ix.propertyIsEnumerable,XG=ph(function(){return arguments}())?ph:function(e){return n6(e)&&YG.call(e,"callee")&&!GG.call(e,"callee")};const sx=XG;function KG(){return!1}var ox=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vh=ox&&typeof module=="object"&&module&&!module.nodeType&&module,ZG=vh&&vh.exports===ox,gh=ZG?j4.Buffer:void 0,QG=gh?gh.isBuffer:void 0,JG=QG||KG;const Zr=JG;var eX="[object Arguments]",tX="[object Array]",aX="[object Boolean]",rX="[object Date]",nX="[object Error]",cX="[object Function]",iX="[object Map]",sX="[object Number]",oX="[object Object]",lX="[object RegExp]",fX="[object Set]",uX="[object String]",dX="[object WeakMap]",hX="[object ArrayBuffer]",mX="[object DataView]",pX="[object Float32Array]",vX="[object Float64Array]",gX="[object Int8Array]",yX="[object Int16Array]",xX="[object Int32Array]",bX="[object Uint8Array]",CX="[object Uint8ClampedArray]",MX="[object Uint16Array]",zX="[object Uint32Array]",B2={};B2[pX]=B2[vX]=B2[gX]=B2[yX]=B2[xX]=B2[bX]=B2[CX]=B2[MX]=B2[zX]=!0;B2[eX]=B2[tX]=B2[hX]=B2[aX]=B2[mX]=B2[rX]=B2[nX]=B2[cX]=B2[iX]=B2[sX]=B2[oX]=B2[lX]=B2[fX]=B2[uX]=B2[dX]=!1;function wX(e){return n6(e)&&cx(e.length)&&!!B2[Vn(e)]}function xl(e){return function(t){return e(t)}}var lx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vr=lx&&typeof module=="object"&&module&&!module.nodeType&&module,_X=vr&&vr.exports===lx,Zi=_X&&ex.process,kX=function(){try{var e=vr&&vr.require&&vr.require("util").types;return e||Zi&&Zi.binding&&Zi.binding("util")}catch{}}();const ta=kX;var yh=ta&&ta.isTypedArray,HX=yh?xl(yh):wX;const bl=HX;var VX=Object.prototype,LX=VX.hasOwnProperty;function fx(e,t){var a=ea(e),r=!a&&sx(e),n=!a&&!r&&Zr(e),c=!a&&!r&&!n&&bl(e),i=a||r||n||c,s=i?qG(e.length,String):[],l=s.length;for(var f in e)(t||LX.call(e,f))&&!(i&&(f=="length"||n&&(f=="offset"||f=="parent")||c&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||RG(f,l)))&&s.push(f);return s}function ux(e,t){return function(a){return e(t(a))}}var SX=ux(Object.keys,Object);const AX=SX;var TX=Object.prototype,EX=TX.hasOwnProperty;function dx(e){if(!T5(e))return AX(e);var t=[];for(var a in Object(e))EX.call(e,a)&&a!="constructor"&&t.push(a);return t}function Cl(e){return yl(e)?fx(e):dx(e)}function NX(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}var DX=Object.prototype,OX=DX.hasOwnProperty;function PX(e){if(!Ln(e))return NX(e);var t=T5(e),a=[];for(var r in e)r=="constructor"&&(t||!OX.call(e,r))||a.push(r);return a}function Ml(e){return yl(e)?fx(e,!0):PX(e)}var BX=p6(Object,"create");const Qr=BX;function FX(){this.__data__=Qr?Qr(null):{},this.size=0}function RX(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var IX="__lodash_hash_undefined__",$X=Object.prototype,UX=$X.hasOwnProperty;function WX(e){var t=this.__data__;if(Qr){var a=t[e];return a===IX?void 0:a}return UX.call(t,e)?t[e]:void 0}var qX=Object.prototype,jX=qX.hasOwnProperty;function YX(e){var t=this.__data__;return Qr?t[e]!==void 0:jX.call(t,e)}var GX="__lodash_hash_undefined__";function XX(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=Qr&&t===void 0?GX:t,this}function c6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}c6.prototype.clear=FX;c6.prototype.delete=RX;c6.prototype.get=WX;c6.prototype.has=YX;c6.prototype.set=XX;function KX(){this.__data__=[],this.size=0}function E5(e,t){for(var a=e.length;a--;)if(gl(e[a][0],t))return a;return-1}var ZX=Array.prototype,QX=ZX.splice;function JX(e){var t=this.__data__,a=E5(t,e);if(a<0)return!1;var r=t.length-1;return a==r?t.pop():QX.call(t,a,1),--this.size,!0}function eK(e){var t=this.__data__,a=E5(t,e);return a<0?void 0:t[a][1]}function tK(e){return E5(this.__data__,e)>-1}function aK(e,t){var a=this.__data__,r=E5(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function St(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}St.prototype.clear=KX;St.prototype.delete=JX;St.prototype.get=eK;St.prototype.has=tK;St.prototype.set=aK;var rK=p6(j4,"Map");const Jr=rK;function nK(){this.size=0,this.__data__={hash:new c6,map:new(Jr||St),string:new c6}}function cK(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function N5(e,t){var a=e.__data__;return cK(t)?a[typeof t=="string"?"string":"hash"]:a.map}function iK(e){var t=N5(this,e).delete(e);return this.size-=t?1:0,t}function sK(e){return N5(this,e).get(e)}function oK(e){return N5(this,e).has(e)}function lK(e,t){var a=N5(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function v6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}v6.prototype.clear=nK;v6.prototype.delete=iK;v6.prototype.get=sK;v6.prototype.has=oK;v6.prototype.set=lK;function hx(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}var fK=ux(Object.getPrototypeOf,Object);const mx=fK;function uK(){this.__data__=new St,this.size=0}function dK(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}function hK(e){return this.__data__.get(e)}function mK(e){return this.__data__.has(e)}var pK=200;function vK(e,t){var a=this.__data__;if(a instanceof St){var r=a.__data__;if(!Jr||r.length<pK-1)return r.push([e,t]),this.size=++a.size,this;a=this.__data__=new v6(r)}return a.set(e,t),this.size=a.size,this}function gt(e){var t=this.__data__=new St(e);this.size=t.size}gt.prototype.clear=uK;gt.prototype.delete=dK;gt.prototype.get=hK;gt.prototype.has=mK;gt.prototype.set=vK;function gK(e,t){return e&&A5(t,Cl(t),e)}function yK(e,t){return e&&A5(t,Ml(t),e)}var px=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xh=px&&typeof module=="object"&&module&&!module.nodeType&&module,xK=xh&&xh.exports===px,bh=xK?j4.Buffer:void 0,Ch=bh?bh.allocUnsafe:void 0;function bK(e,t){if(t)return e.slice();var a=e.length,r=Ch?Ch(a):new e.constructor(a);return e.copy(r),r}function CK(e,t){for(var a=-1,r=e==null?0:e.length,n=0,c=[];++a<r;){var i=e[a];t(i,a,e)&&(c[n++]=i)}return c}function vx(){return[]}var MK=Object.prototype,zK=MK.propertyIsEnumerable,Mh=Object.getOwnPropertySymbols,wK=Mh?function(e){return e==null?[]:(e=Object(e),CK(Mh(e),function(t){return zK.call(e,t)}))}:vx;const zl=wK;function _K(e,t){return A5(e,zl(e),t)}var kK=Object.getOwnPropertySymbols,HK=kK?function(e){for(var t=[];e;)hx(t,zl(e)),e=mx(e);return t}:vx;const gx=HK;function VK(e,t){return A5(e,gx(e),t)}function yx(e,t,a){var r=t(e);return ea(e)?r:hx(r,a(e))}function z7(e){return yx(e,Cl,zl)}function LK(e){return yx(e,Ml,gx)}var SK=p6(j4,"DataView");const w7=SK;var AK=p6(j4,"Promise");const _7=AK;var TK=p6(j4,"Set");const k7=TK;var zh="[object Map]",EK="[object Object]",wh="[object Promise]",_h="[object Set]",kh="[object WeakMap]",Hh="[object DataView]",NK=m6(w7),DK=m6(Jr),OK=m6(_7),PK=m6(k7),BK=m6(M7),N0=Vn;(w7&&N0(new w7(new ArrayBuffer(1)))!=Hh||Jr&&N0(new Jr)!=zh||_7&&N0(_7.resolve())!=wh||k7&&N0(new k7)!=_h||M7&&N0(new M7)!=kh)&&(N0=function(e){var t=Vn(e),a=t==EK?e.constructor:void 0,r=a?m6(a):"";if(r)switch(r){case NK:return Hh;case DK:return zh;case OK:return wh;case PK:return _h;case BK:return kh}return t});const aa=N0;var FK=Object.prototype,RK=FK.hasOwnProperty;function IK(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&RK.call(e,"index")&&(a.index=e.index,a.input=e.input),a}var $K=j4.Uint8Array;const Dc=$K;function wl(e){var t=new e.constructor(e.byteLength);return new Dc(t).set(new Dc(e)),t}function UK(e,t){var a=t?wl(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var WK=/\w*$/;function qK(e){var t=new e.constructor(e.source,WK.exec(e));return t.lastIndex=e.lastIndex,t}var Vh=d0?d0.prototype:void 0,Lh=Vh?Vh.valueOf:void 0;function jK(e){return Lh?Object(Lh.call(e)):{}}function YK(e,t){var a=t?wl(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var GK="[object Boolean]",XK="[object Date]",KK="[object Map]",ZK="[object Number]",QK="[object RegExp]",JK="[object Set]",eZ="[object String]",tZ="[object Symbol]",aZ="[object ArrayBuffer]",rZ="[object DataView]",nZ="[object Float32Array]",cZ="[object Float64Array]",iZ="[object Int8Array]",sZ="[object Int16Array]",oZ="[object Int32Array]",lZ="[object Uint8Array]",fZ="[object Uint8ClampedArray]",uZ="[object Uint16Array]",dZ="[object Uint32Array]";function hZ(e,t,a){var r=e.constructor;switch(t){case aZ:return wl(e);case GK:case XK:return new r(+e);case rZ:return UK(e,a);case nZ:case cZ:case iZ:case sZ:case oZ:case lZ:case fZ:case uZ:case dZ:return YK(e,a);case KK:return new r;case ZK:case eZ:return new r(e);case QK:return qK(e);case JK:return new r;case tZ:return jK(e)}}function mZ(e){return typeof e.constructor=="function"&&!T5(e)?NG(mx(e)):{}}var pZ="[object Map]";function vZ(e){return n6(e)&&aa(e)==pZ}var Sh=ta&&ta.isMap,gZ=Sh?xl(Sh):vZ;const yZ=gZ;var xZ="[object Set]";function bZ(e){return n6(e)&&aa(e)==xZ}var Ah=ta&&ta.isSet,CZ=Ah?xl(Ah):bZ;const MZ=CZ;var zZ=1,wZ=2,_Z=4,xx="[object Arguments]",kZ="[object Array]",HZ="[object Boolean]",VZ="[object Date]",LZ="[object Error]",bx="[object Function]",SZ="[object GeneratorFunction]",AZ="[object Map]",TZ="[object Number]",Cx="[object Object]",EZ="[object RegExp]",NZ="[object Set]",DZ="[object String]",OZ="[object Symbol]",PZ="[object WeakMap]",BZ="[object ArrayBuffer]",FZ="[object DataView]",RZ="[object Float32Array]",IZ="[object Float64Array]",$Z="[object Int8Array]",UZ="[object Int16Array]",WZ="[object Int32Array]",qZ="[object Uint8Array]",jZ="[object Uint8ClampedArray]",YZ="[object Uint16Array]",GZ="[object Uint32Array]",T2={};T2[xx]=T2[kZ]=T2[BZ]=T2[FZ]=T2[HZ]=T2[VZ]=T2[RZ]=T2[IZ]=T2[$Z]=T2[UZ]=T2[WZ]=T2[AZ]=T2[TZ]=T2[Cx]=T2[EZ]=T2[NZ]=T2[DZ]=T2[OZ]=T2[qZ]=T2[jZ]=T2[YZ]=T2[GZ]=!0;T2[LZ]=T2[bx]=T2[PZ]=!1;function tc(e,t,a,r,n,c){var i,s=t&zZ,l=t&wZ,f=t&_Z;if(a&&(i=n?a(e,r,n,c):a(e)),i!==void 0)return i;if(!Ln(e))return e;var u=ea(e);if(u){if(i=IK(e),!s)return DG(e,i)}else{var d=aa(e),h=d==bx||d==SZ;if(Zr(e))return bK(e,s);if(d==Cx||d==xx||h&&!n){if(i=l||h?{}:mZ(e),!s)return l?VK(e,yK(i,e)):_K(e,gK(i,e))}else{if(!T2[d])return n?e:{};i=hZ(e,d,s)}}c||(c=new gt);var m=c.get(e);if(m)return m;c.set(e,i),MZ(e)?e.forEach(function(g){i.add(tc(g,t,a,g,e,c))}):yZ(e)&&e.forEach(function(g,y){i.set(y,tc(g,t,a,y,e,c))});var v=f?l?LK:z7:l?Ml:Cl,p=u?void 0:v(e);return PG(p||e,function(g,y){p&&(y=g,g=e[y]),nx(i,y,tc(g,t,a,y,e,c))}),i}var XZ=1,KZ=4;function Ba(e){return tc(e,XZ|KZ)}var ZZ="__lodash_hash_undefined__";function QZ(e){return this.__data__.set(e,ZZ),this}function JZ(e){return this.__data__.has(e)}function Oc(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new v6;++t<a;)this.add(e[t])}Oc.prototype.add=Oc.prototype.push=QZ;Oc.prototype.has=JZ;function eQ(e,t){for(var a=-1,r=e==null?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}function tQ(e,t){return e.has(t)}var aQ=1,rQ=2;function Mx(e,t,a,r,n,c){var i=a&aQ,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var f=c.get(e),u=c.get(t);if(f&&u)return f==t&&u==e;var d=-1,h=!0,m=a&rQ?new Oc:void 0;for(c.set(e,t),c.set(t,e);++d<s;){var v=e[d],p=t[d];if(r)var g=i?r(p,v,d,t,e,c):r(v,p,d,e,t,c);if(g!==void 0){if(g)continue;h=!1;break}if(m){if(!eQ(t,function(y,x){if(!tQ(m,x)&&(v===y||n(v,y,a,r,c)))return m.push(x)})){h=!1;break}}else if(!(v===p||n(v,p,a,r,c))){h=!1;break}}return c.delete(e),c.delete(t),h}function nQ(e){var t=-1,a=Array(e.size);return e.forEach(function(r,n){a[++t]=[n,r]}),a}function cQ(e){var t=-1,a=Array(e.size);return e.forEach(function(r){a[++t]=r}),a}var iQ=1,sQ=2,oQ="[object Boolean]",lQ="[object Date]",fQ="[object Error]",uQ="[object Map]",dQ="[object Number]",hQ="[object RegExp]",mQ="[object Set]",pQ="[object String]",vQ="[object Symbol]",gQ="[object ArrayBuffer]",yQ="[object DataView]",Th=d0?d0.prototype:void 0,Qi=Th?Th.valueOf:void 0;function xQ(e,t,a,r,n,c,i){switch(a){case yQ:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gQ:return!(e.byteLength!=t.byteLength||!c(new Dc(e),new Dc(t)));case oQ:case lQ:case dQ:return gl(+e,+t);case fQ:return e.name==t.name&&e.message==t.message;case hQ:case pQ:return e==t+"";case uQ:var s=nQ;case mQ:var l=r&iQ;if(s||(s=cQ),e.size!=t.size&&!l)return!1;var f=i.get(e);if(f)return f==t;r|=sQ,i.set(e,t);var u=Mx(s(e),s(t),r,n,c,i);return i.delete(e),u;case vQ:if(Qi)return Qi.call(e)==Qi.call(t)}return!1}var bQ=1,CQ=Object.prototype,MQ=CQ.hasOwnProperty;function zQ(e,t,a,r,n,c){var i=a&bQ,s=z7(e),l=s.length,f=z7(t),u=f.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var h=s[d];if(!(i?h in t:MQ.call(t,h)))return!1}var m=c.get(e),v=c.get(t);if(m&&v)return m==t&&v==e;var p=!0;c.set(e,t),c.set(t,e);for(var g=i;++d<l;){h=s[d];var y=e[h],x=t[h];if(r)var C=i?r(x,y,h,t,e,c):r(y,x,h,e,t,c);if(!(C===void 0?y===x||n(y,x,a,r,c):C)){p=!1;break}g||(g=h=="constructor")}if(p&&!g){var b=e.constructor,M=t.constructor;b!=M&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof M=="function"&&M instanceof M)&&(p=!1)}return c.delete(e),c.delete(t),p}var wQ=1,Eh="[object Arguments]",Nh="[object Array]",z8="[object Object]",_Q=Object.prototype,Dh=_Q.hasOwnProperty;function kQ(e,t,a,r,n,c){var i=ea(e),s=ea(t),l=i?Nh:aa(e),f=s?Nh:aa(t);l=l==Eh?z8:l,f=f==Eh?z8:f;var u=l==z8,d=f==z8,h=l==f;if(h&&Zr(e)){if(!Zr(t))return!1;i=!0,u=!1}if(h&&!u)return c||(c=new gt),i||bl(e)?Mx(e,t,a,r,n,c):xQ(e,t,l,a,r,n,c);if(!(a&wQ)){var m=u&&Dh.call(e,"__wrapped__"),v=d&&Dh.call(t,"__wrapped__");if(m||v){var p=m?e.value():e,g=v?t.value():t;return c||(c=new gt),n(p,g,a,r,c)}}return h?(c||(c=new gt),zQ(e,t,a,r,n,c)):!1}function zx(e,t,a,r,n){return e===t?!0:e==null||t==null||!n6(e)&&!n6(t)?e!==e&&t!==t:kQ(e,t,a,r,zx,n)}var HQ="[object Map]",VQ="[object Set]",LQ=Object.prototype,SQ=LQ.hasOwnProperty;function AQ(e){if(e==null)return!0;if(yl(e)&&(ea(e)||typeof e=="string"||typeof e.splice=="function"||Zr(e)||bl(e)||sx(e)))return!e.length;var t=aa(e);if(t==HQ||t==VQ)return!e.size;if(T5(e))return!dx(e).length;for(var a in e)if(SQ.call(e,a))return!1;return!0}function Oh(e,t){return zx(e,t)}var TQ=Object.defineProperty,EQ=Object.defineProperties,NQ=Object.getOwnPropertyDescriptors,Ph=Object.getOwnPropertySymbols,DQ=Object.prototype.hasOwnProperty,OQ=Object.prototype.propertyIsEnumerable,Bh=(e,t,a)=>t in e?TQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,PQ=(e,t)=>{for(var a in t||(t={}))DQ.call(t,a)&&Bh(e,a,t[a]);if(Ph)for(var a of Ph(t))OQ.call(t,a)&&Bh(e,a,t[a]);return e},BQ=(e,t)=>EQ(e,NQ(t));function FQ(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var g0=(e,t)=>{const a={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}},r=FQ(e);return o.defineComponent({name:r,props:a,emits:{"labels:update":()=>!0,"chart:update":n=>!0,"chart:destroy":()=>!0,"chart:render":n=>!0},setup(n,{emit:c,expose:i}){const s=o.ref(null),l=`${n.chartId}`;let f=o.shallowRef(null);o.watch(()=>n.chartData,u,{deep:!0}),o.watch(()=>n.options,g=>{f.value&&g&&(f.value.options=Ba(g),v())},{deep:!0});function u(g){if(f.value){let y=f.value;Oh(g.labels,f.value.data.labels)||(y.data.labels=g.labels,h()),Oh(g.datasets,f.value.data.datasets)||g.datasets.forEach((x,C)=>{var b,M;if(AQ(x))y.data.datasets=[];else{const w=Ba(y.data),z=Object.keys((M=(b=w.datasets)==null?void 0:b[C])!=null?M:{}),H=Object.keys(x);z.filter(V=>V!=="_meta"&&H.indexOf(V)===-1).forEach(V=>{y.data.datasets[C]&&delete y.data.datasets[C][V]});for(const V in x){const k=Ba(x[V]);y.data.datasets[C]||(y.data.datasets[C]={}),x.hasOwnProperty(V)&&k!=null&&y&&(y.data.datasets[C][V]=k)}}}),v()}else f.value&&p(),d()}function d(){s.value?(f.value=new H4(s.value,{data:Ba(n.chartData),type:t,options:Ba(n.options),plugins:n.plugins}),m()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function h(){c("labels:update"),n.onLabelsUpdate&&n.onLabelsUpdate()}function m(){f.value&&(c("chart:render",f.value),n.onChartRender&&n.onChartRender(f.value))}function v(){f.value&&(f.value.update(),c("chart:update",f.value),n.onChartUpdate&&n.onChartUpdate(f.value))}function p(){f.value&&f.value.destroy(),c("chart:destroy"),n.onChartDestroy&&n.onChartDestroy()}return o.onMounted(d),o.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),i({canvasRef:s,renderChart:d,chartInstance:f,canvasId:l,update:v}),()=>o.h("div",{style:BQ(PQ({maxWidth:"100%"},n.styles),{position:"relative"}),class:n.cssClasses},[o.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:n.width,height:n.height,ref:s})])}})},RQ=g0("bar-chart","bar"),IQ=g0("doughnut-chart","doughnut");g0("line-chart","line");g0("pie-chart","pie");g0("polar-chart","polarArea");g0("radar-chart","radar");g0("bubble-chart","bubble");g0("scatter-chart","scatter");const $Q=o.defineComponent({__name:"PgaBarChart",props:{data:{},options:{}},setup(e){H4.register(...Jy);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(RQ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),UQ=o.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){H4.register(...Jy);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(IQ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),WQ={class:"pga-display-barcodes"},qQ={key:0},jQ={class:"barcodes-container"},YQ=o.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){const t=e,a=o.ref(!1),r=o.computed(()=>a.value?t.barcodes:t.barcodes.slice(0,2));return(n,c)=>(o.openBlock(),o.createElementBlock("div",WQ,[n.barcodes.length?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",jQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(i,s)=>(o.openBlock(),o.createElementBlock("span",{class:"barcode",key:s},[o.createVNode(Oe,{icon:"barcode"}),o.createTextVNode("   "+o.toDisplayString(i),1)]))),128))]),n.barcodes.length>2?(o.openBlock(),o.createBlock(qo,{key:0,modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=i=>a.value=i)},null,8,["modelValue"])):o.createCommentVNode("",!0)],64)):(o.openBlock(),o.createElementBlock("span",qQ,"-"))]))}});const GQ=R1(YQ,[["__scopeId","data-v-d2646648"]]),XQ={class:"pga-display-content"},KQ=o.defineComponent({__name:"PgaDisplayContent",props:{label:{type:[String,Number,Function]}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",XQ,[o.createVNode(ye,{class:"item--label",text:t.label},null,8,["text"]),o.renderSlot(t.$slots,"default",{},void 0,!0)]))}});const ZQ=R1(KQ,[["__scopeId","data-v-66c0a02b"]]),QQ={key:0},JQ=o.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},format:{default:"short"},noIcon:{type:Boolean},withBackground:{type:Boolean}},setup(e){const t=e,a=o.computed(()=>t.datetime instanceof Date),r=o.computed(()=>{if(a.value)return m4(t.datetime,{format:t.format,withTime:!1})}),n=o.computed(()=>t.noIcon?void 0:"calendar-days"),c=o.computed(()=>a.value?m4(t.datetime,{justTime:!0}):"");return(i,s)=>{const l=o.resolveDirective("tooltip");return a.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["pga-datetime",{"pga-datetime__with-background":i.withBackground}])},[o.createVNode(ye,{text:r.value,icon:n.value,nowrap:""},null,8,["text","icon"])],2)),[[l,c.value]]):(o.openBlock(),o.createElementBlock("span",QQ,"-"))}}});const eJ=R1(JQ,[["__scopeId","data-v-9ed5e6ff"]]),tJ={class:"info-card"},aJ={class:"info-card--icon-container"},rJ={class:"info-card--content-container"},nJ={class:"info-card--content"},cJ=["textContent"],iJ=o.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){o.useCssVars(i=>({"47ea99c5":n.value,"42bce5a0":c.value}));const t=e,a=o.computed(()=>{if(t.type==="info")return"circle-info";if(t.type==="success")return"circle-check";if(t.type==="error")return"circle-xmark";if(t.type==="warning")return"circle-exclamation"}),r=o.computed(()=>{if(t.type==="info")return"aqua";if(t.type==="success")return"success";if(t.type==="error")return"danger";if(t.type==="warning")return"warning"}),n=o.computed(()=>`var(--pga-color-${r.value}-08)`),c=o.computed(()=>`var(--pga-color-${r.value}-contrast)`);return(i,s)=>{const l=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",tJ,[o.createElementVNode("div",aJ,[o.createVNode(l,{class:"info-card--icon",icon:a.value},null,8,["icon"])]),o.createElementVNode("div",rJ,[o.createElementVNode("div",nJ,[i.info?(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(i.info)},null,8,cJ)):o.renderSlot(i.$slots,"default",{key:1},void 0,!0)])])])}}});const sJ=R1(iJ,[["__scopeId","data-v-c3d5b74a"]]),oJ={key:0,class:"no-items-container"},lJ={key:1,class:"no-items"},fJ=o.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const t=e,a=_2("pgaDisplay"),r=o.computed(()=>{var c;return!(((c=t.items)==null?void 0:c.length)>0)}),n=o.computed(()=>t.label?t.label:a("noItemsText"));return(c,i)=>r.value?(o.openBlock(),o.createElementBlock("div",oJ,[c.isLoading?(o.openBlock(),o.createBlock(Lt,{key:0})):(o.openBlock(),o.createElementBlock("div",lJ,[c.preventDisplayIcon?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Oe,{key:0,class:"no-items--icon",icon:c.icon},null,8,["icon"])),o.createVNode(ye,{class:"no-items--text",text:n.value},null,8,["text"])]))])):o.createCommentVNode("",!0)}});const wx=R1(fJ,[["__scopeId","data-v-f7c86b3b"]]),uJ={key:0},dJ={key:0,class:"price--sign"},hJ=["textContent"],mJ=o.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},maxDecimals:{},prefix:{},suffix:{},size:{default:"m"},fontSize:{},color:{default:"first"},noSign:{type:Boolean},noBackground:{type:Boolean},withBackground:{type:Boolean}},setup(e){o.useCssVars(d=>({"9c1ce24a":f.value,"169bfd50":u.value}));const t=e,{display:a}=$e(),r=o.computed(()=>t.noSign?!1:a.price.withSign),n=o.computed(()=>t.noBackground?!1:t.withBackground?!0:a.price.withBackground),c=o.computed(()=>t.price!==void 0),i={maxDecimals:t.maxDecimals,prefix:t.prefix,suffix:t.suffix},s=o.computed(()=>{if(c.value)return typeof t.price=="string"?t.price:Es(t.price,i)}),l=o.computed(()=>t.tooltipPrice===void 0?"":typeof t.tooltipPrice=="string"?t.tooltipPrice:Es(t.tooltipPrice,{...i,prefix:i.prefix||"$"})),f=o.computed(()=>{if(t.fontSize)return t.fontSize;if(t.size==="s")return"0.9rem";if(t.size==="m")return"1rem";if(t.size==="l")return"1.1rem"}),u=o.computed(()=>mn(t.color)?`var(--pga-color-${t.color})`:t.color);return(d,h)=>{const m=o.resolveDirective("tooltip");return c.value?o.withDirectives((o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["price",{"price__with-background":n.value}])},[r.value?(o.openBlock(),o.createElementBlock("span",dJ,"$")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"price--value",textContent:o.toDisplayString(s.value)},null,8,hJ)],2)),[[m,l.value]]):(o.openBlock(),o.createElementBlock("span",uJ,"-"))}}});const pJ=R1(mJ,[["__scopeId","data-v-70585abb"]]),vJ=o.defineComponent({__name:"PgaDisplayTime",props:{datetime:{}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{icon:"clock",text:o.unref(lc)(t.datetime)},null,8,["text"])}}}),gJ=o.defineComponent({__name:"PgaForm",props:{withSubmitButton:{type:Boolean},submitBtnText:{},submitBtnIcon:{},isLoading:{type:Boolean},width:{default:"100%"}},emits:["submit"],setup(e,{emit:t}){o.useCssVars(n=>({f2ba1544:n.width}));const a=t,r=_2("pgaForm");return(n,c)=>(o.openBlock(),o.createElementBlock("form",{class:"pga-form",onSubmit:c[1]||(c[1]=o.withModifiers(()=>{},["prevent"]))},[o.renderSlot(n.$slots,"default",{},void 0,!0),n.withSubmitButton||n.submitBtnText?(o.openBlock(),o.createBlock(L2,{key:0,class:"form--submit-btn",type:"submit",text:n.submitBtnText||o.unref(r)("submitBtn"),icon:n.submitBtnIcon||"save",variant:"filled",isLoading:n.isLoading,onClick:c[0]||(c[0]=i=>a("submit"))},null,8,["text","icon","isLoading"])):o.createCommentVNode("",!0)],32))}});const _x=R1(gJ,[["__scopeId","data-v-fad80058"]]),yJ=o.defineComponent({__name:"PgaFormRow",props:{breakRow:{type:Boolean}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["pga-form-row",{"pga-form-row__break-row":t.breakRow}])},[o.renderSlot(t.$slots,"default")],2))}});const xJ=o.defineComponent({__name:"PgaFormSubtitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{class:"pga-form-subtitle",text:t.title},null,8,["text"])}}});const bJ=R1(xJ,[["__scopeId","data-v-488b1ab9"]]),CJ=o.defineComponent({__name:"PgaFormTitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{class:"pga-form-title",text:t.title},null,8,["text"])}}});const MJ=R1(CJ,[["__scopeId","data-v-46e35803"]]),zJ={key:0,class:"input-group--header"},wJ={key:0,class:"header--label"},_J={key:1,class:"header--required-label"},kJ={key:2,class:"header--optional-label"},HJ=["innerHTML"],VJ={key:2,class:"input-group--errors"},LJ=["textContent"],SJ=o.defineComponent({__name:"PgaInputGroup",props:{label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},fitContent:{type:Boolean},grow:{}},setup(e){o.useCssVars(c=>({"26eab7ff":c.grow}));const t=e,a=_2("pgaForm"),r=o.computed(()=>t.label||t.withLabelSpace),n=o.computed(()=>t.label||" ");return(c,i)=>{const s=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["input-group",{"input-group__fit-content":c.fitContent,"input-group__with-flex-grow":c.grow!==void 0}])},[r.value||c.withRequiredLabel||c.withOptionalLabel?(o.openBlock(),o.createElementBlock("div",zJ,[r.value?(o.openBlock(),o.createElementBlock("label",wJ,o.toDisplayString(n.value),1)):o.createCommentVNode("",!0),c.withRequiredLabel?(o.openBlock(),o.createElementBlock("span",_J,o.toDisplayString(o.unref(a)("requiredLabel")),1)):o.createCommentVNode("",!0),c.withOptionalLabel?(o.openBlock(),o.createElementBlock("span",kJ,o.toDisplayString(o.unref(a)("optionalLabel")),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.renderSlot(c.$slots,"default",{},void 0,!0),c.description?(o.openBlock(),o.createElementBlock("span",{key:1,class:"input-group--description",innerHTML:c.description},null,8,HJ)):o.createCommentVNode("",!0),c.errors?(o.openBlock(),o.createElementBlock("div",VJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.errors,(l,f)=>(o.openBlock(),o.createElementBlock("div",{key:f,class:"errors--error"},[o.createVNode(s,{class:"error--icon",icon:["fas","triangle-exclamation"]}),o.createElementVNode("span",{class:"error--message",textContent:o.toDisplayString(l.$message)},null,8,LJ)]))),128))])):o.createCommentVNode("",!0)],2)}}});const A3=R1(SJ,[["__scopeId","data-v-14d41e2a"]]);function Fh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function Rt(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Fh(Object(a),!0).forEach(function(r){AJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Fh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function AJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Rh(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((a,r)=>(t.includes(r)||(a[r]=o.unref(e[r])),a),{})}function Pc(e){return typeof e=="function"}function TJ(e){return o.isReactive(e)||o.isReadonly(e)}function kx(e,t,a){let r=e;const n=t.split(".");for(let c=0;c<n.length;c++){if(!r[n[c]])return a;r=r[n[c]]}return r}function Ji(e,t,a){return o.computed(()=>e.some(r=>kx(t,r,{[a]:!1})[a]))}function Ih(e,t,a){return o.computed(()=>e.reduce((r,n)=>{const c=kx(t,n,{[a]:!1})[a]||[];return r.concat(c)},[]))}function Hx(e,t,a,r){return e.call(r,o.unref(t),o.unref(a),r)}function Vx(e){return e.$valid!==void 0?!e.$valid:!e}function EJ(e,t,a,r,n,c,i){let{$lazy:s,$rewardEarly:l}=n,f=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8?arguments[8]:void 0,d=arguments.length>9?arguments[9]:void 0,h=arguments.length>10?arguments[10]:void 0;const m=o.ref(!!r.value),v=o.ref(0);a.value=!1;const p=o.watch([t,r].concat(f,h),()=>{if(s&&!r.value||l&&!d.value&&!a.value)return;let g;try{g=Hx(e,t,u,i)}catch(y){g=Promise.reject(y)}v.value++,a.value=!!v.value,m.value=!1,Promise.resolve(g).then(y=>{v.value--,a.value=!!v.value,c.value=y,m.value=Vx(y)}).catch(y=>{v.value--,a.value=!!v.value,c.value=y,m.value=!0})},{immediate:!0,deep:typeof t=="object"});return{$invalid:m,$unwatch:p}}function NJ(e,t,a,r,n,c,i,s){let{$lazy:l,$rewardEarly:f}=r;const u=()=>({}),d=o.computed(()=>{if(l&&!a.value||f&&!s.value)return!1;let h=!0;try{const m=Hx(e,t,i,c);n.value=m,h=Vx(m)}catch(m){n.value=m}return h});return{$unwatch:u,$invalid:d}}function DJ(e,t,a,r,n,c,i,s,l,f,u){const d=o.ref(!1),h=e.$params||{},m=o.ref(null);let v,p;e.$async?{$invalid:v,$unwatch:p}=EJ(e.$validator,t,d,a,r,m,n,e.$watchTargets,l,f,u):{$invalid:v,$unwatch:p}=NJ(e.$validator,t,a,r,m,n,l,f);const g=e.$message;return{$message:Pc(g)?o.computed(()=>g(Rh({$pending:d,$invalid:v,$params:Rh(h),$model:t,$response:m,$validator:c,$propertyPath:s,$property:i}))):g||"",$params:h,$pending:d,$invalid:v,$response:m,$unwatch:p}}function OJ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=o.unref(e),a=Object.keys(t),r={},n={},c={};let i=null;return a.forEach(s=>{const l=t[s];switch(!0){case Pc(l.$validator):r[s]=l;break;case Pc(l):r[s]={$validator:l};break;case s==="$validationGroups":i=l;break;case s.startsWith("$"):c[s]=l;break;default:n[s]=l}}),{rules:r,nestedValidators:n,config:c,validationGroups:i}}const PJ="__root";function BJ(e,t,a,r,n,c,i,s,l){const f=Object.keys(e),u=r.get(n,e),d=o.ref(!1),h=o.ref(!1),m=o.ref(0);if(u){if(!u.$partial)return u;u.$unwatch(),d.value=u.$dirty.value}const v={$dirty:d,$path:n,$touch:()=>{d.value||(d.value=!0)},$reset:()=>{d.value&&(d.value=!1)},$commit:()=>{}};return f.length?(f.forEach(p=>{v[p]=DJ(e[p],t,v.$dirty,c,i,p,a,n,l,h,m)}),v.$externalResults=o.computed(()=>s.value?[].concat(s.value).map((p,g)=>({$propertyPath:n,$property:a,$validator:"$externalResults",$uid:`${n}-externalResult-${g}`,$message:p,$params:{},$response:null,$pending:!1})):[]),v.$invalid=o.computed(()=>{const p=f.some(g=>o.unref(v[g].$invalid));return h.value=p,!!v.$externalResults.value.length||p}),v.$pending=o.computed(()=>f.some(p=>o.unref(v[p].$pending))),v.$error=o.computed(()=>v.$dirty.value?v.$pending.value||v.$invalid.value:!1),v.$silentErrors=o.computed(()=>f.filter(p=>o.unref(v[p].$invalid)).map(p=>{const g=v[p];return o.reactive({$propertyPath:n,$property:a,$validator:p,$uid:`${n}-${p}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(v.$externalResults.value)),v.$errors=o.computed(()=>v.$dirty.value?v.$silentErrors.value:[]),v.$unwatch=()=>f.forEach(p=>{v[p].$unwatch()}),v.$commit=()=>{h.value=!0,m.value=Date.now()},r.set(n,e,v),v):(u&&r.set(n,e,v),v)}function FJ(e,t,a,r,n,c,i){const s=Object.keys(e);return s.length?s.reduce((l,f)=>(l[f]=H7({validations:e[f],state:t,key:f,parentKey:a,resultsCache:r,globalConfig:n,instance:c,externalResults:i}),l),{}):{}}function RJ(e,t,a){const r=o.computed(()=>[t,a].filter(v=>v).reduce((v,p)=>v.concat(Object.values(o.unref(p))),[])),n=o.computed({get(){return e.$dirty.value||(r.value.length?r.value.every(v=>v.$dirty):!1)},set(v){e.$dirty.value=v}}),c=o.computed(()=>{const v=o.unref(e.$silentErrors)||[],p=r.value.filter(g=>(o.unref(g).$silentErrors||[]).length).reduce((g,y)=>g.concat(...y.$silentErrors),[]);return v.concat(p)}),i=o.computed(()=>{const v=o.unref(e.$errors)||[],p=r.value.filter(g=>(o.unref(g).$errors||[]).length).reduce((g,y)=>g.concat(...y.$errors),[]);return v.concat(p)}),s=o.computed(()=>r.value.some(v=>v.$invalid)||o.unref(e.$invalid)||!1),l=o.computed(()=>r.value.some(v=>o.unref(v.$pending))||o.unref(e.$pending)||!1),f=o.computed(()=>r.value.some(v=>v.$dirty)||r.value.some(v=>v.$anyDirty)||n.value),u=o.computed(()=>n.value?l.value||s.value:!1),d=()=>{e.$touch(),r.value.forEach(v=>{v.$touch()})},h=()=>{e.$commit(),r.value.forEach(v=>{v.$commit()})},m=()=>{e.$reset(),r.value.forEach(v=>{v.$reset()})};return r.value.length&&r.value.every(v=>v.$dirty)&&d(),{$dirty:n,$errors:i,$invalid:s,$anyDirty:f,$error:u,$pending:l,$touch:d,$reset:m,$silentErrors:c,$commit:h}}function H7(e){let{validations:t,state:a,key:r,parentKey:n,childResults:c,resultsCache:i,globalConfig:s={},instance:l,externalResults:f}=e;const u=n?`${n}.${r}`:r,{rules:d,nestedValidators:h,config:m,validationGroups:v}=OJ(t),p=Rt(Rt({},s),m),g=r?o.computed(()=>{const G=o.unref(a);return G?o.unref(G[r]):void 0}):a,y=Rt({},o.unref(f)||{}),x=o.computed(()=>{const G=o.unref(f);return r?G?o.unref(G[r]):void 0:G}),C=BJ(d,g,r,i,u,p,l,x,a),b=FJ(h,g,u,i,p,l,x),M={};v&&Object.entries(v).forEach(G=>{let[O,T]=G;M[O]={$invalid:Ji(T,b,"$invalid"),$error:Ji(T,b,"$error"),$pending:Ji(T,b,"$pending"),$errors:Ih(T,b,"$errors"),$silentErrors:Ih(T,b,"$silentErrors")}});const{$dirty:w,$errors:z,$invalid:H,$anyDirty:A,$error:V,$pending:k,$touch:_,$reset:N,$silentErrors:q,$commit:S}=RJ(C,b,c),B=r?o.computed({get:()=>o.unref(g),set:G=>{w.value=!0;const O=o.unref(a),T=o.unref(f);T&&(T[r]=y[r]),o.isRef(O[r])?O[r].value=G:O[r]=G}}):null;r&&p.$autoDirty&&o.watch(g,()=>{w.value||_();const G=o.unref(f);G&&(G[r]=y[r])},{flush:"sync"});async function F(){return _(),p.$rewardEarly&&(S(),await o.nextTick()),await o.nextTick(),new Promise(G=>{if(!k.value)return G(!H.value);const O=o.watch(k,()=>{G(!H.value),O()})})}function e1(G){return(c.value||{})[G]}function Y(){o.isRef(f)?f.value=y:Object.keys(y).length===0?Object.keys(f).forEach(G=>{delete f[G]}):Object.assign(f,y)}return o.reactive(Rt(Rt(Rt({},C),{},{$model:B,$dirty:w,$error:V,$errors:z,$invalid:H,$anyDirty:A,$pending:k,$touch:_,$reset:N,$path:u||PJ,$silentErrors:q,$validate:F,$commit:S},c&&{$getResultsForChild:e1,$clearExternalResults:Y,$validationGroups:M}),b))}class IJ{constructor(){this.storage=new Map}set(t,a,r){this.storage.set(t,{rules:a,result:r})}checkRulesValidity(t,a,r){const n=Object.keys(r),c=Object.keys(a);return c.length!==n.length||!c.every(s=>n.includes(s))?!1:c.every(s=>a[s].$params?Object.keys(a[s].$params).every(l=>o.unref(r[s].$params[l])===o.unref(a[s].$params[l])):!0)}get(t,a){const r=this.storage.get(t);if(!r)return;const{rules:n,result:c}=r,i=this.checkRulesValidity(t,a,n),s=c.$unwatch?c.$unwatch:()=>({});return i?c:{$dirty:c.$dirty,$partial:!0,$unwatch:s}}}const ac={COLLECT_ALL:!0,COLLECT_NONE:!1},$h=Symbol("vuelidate#injectChildResults"),Uh=Symbol("vuelidate#removeChildResults");function $J(e){let{$scope:t,instance:a}=e;const r={},n=o.ref([]),c=o.computed(()=>n.value.reduce((u,d)=>(u[d]=o.unref(r[d]),u),{}));function i(u,d){let{$registerAs:h,$scope:m,$stopPropagation:v}=d;v||t===ac.COLLECT_NONE||m===ac.COLLECT_NONE||t!==ac.COLLECT_ALL&&t!==m||(r[h]=u,n.value.push(h))}a.__vuelidateInjectInstances=[].concat(a.__vuelidateInjectInstances||[],i);function s(u){n.value=n.value.filter(d=>d!==u),delete r[u]}a.__vuelidateRemoveInstances=[].concat(a.__vuelidateRemoveInstances||[],s);const l=o.inject($h,[]);o.provide($h,a.__vuelidateInjectInstances);const f=o.inject(Uh,[]);return o.provide(Uh,a.__vuelidateRemoveInstances),{childResults:c,sendValidationResultsToParent:l,removeValidationResultsFromParent:f}}function Lx(e){return new Proxy(e,{get(t,a){return typeof t[a]=="object"?Lx(t[a]):o.computed(()=>t[a])}})}let Wh=0;function UJ(e,t){var a;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(r=e,e=void 0,t=void 0);let{$registerAs:n,$scope:c=ac.COLLECT_ALL,$stopPropagation:i,$externalResults:s,currentVueInstance:l}=r;const f=l||((a=o.getCurrentInstance())===null||a===void 0?void 0:a.proxy),u=f?f.$options:{};n||(Wh+=1,n=`_vuelidate_${Wh}`);const d=o.ref({}),h=new IJ,{childResults:m,sendValidationResultsToParent:v,removeValidationResultsFromParent:p}=f?$J({$scope:c,instance:f}):{childResults:o.ref({})};if(!e&&u.validations){const g=u.validations;t=o.ref({}),o.onBeforeMount(()=>{t.value=f,o.watch(()=>Pc(g)?g.call(t.value,new Lx(t.value)):g,y=>{d.value=H7({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:f,externalResults:s||f.vuelidateExternalResults})},{immediate:!0})}),r=u.validationsConfig||r}else{const g=o.isRef(e)||TJ(e)?e:o.reactive(e||{});o.watch(g,y=>{d.value=H7({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:f??{},externalResults:s})},{immediate:!0})}return f&&(v.forEach(g=>g(d,{$registerAs:n,$scope:c,$stopPropagation:i})),o.onBeforeUnmount(()=>p.forEach(g=>g(n)))),o.computed(()=>Rt(Rt({},o.unref(d.value)),m.value))}function qh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function en(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?qh(Object(a),!0).forEach(function(r){WJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):qh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function WJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Bc(e){return typeof e=="function"}function V7(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function D5(e){return Bc(e.$validator)?en({},e):{$validator:e}}function Sx(e){return typeof e=="object"?e.$valid:e}function Ax(e){return e.$validator||e}function qJ(e,t){if(!V7(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!V7(t)&&!Bc(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=D5(t);return a.$params=en(en({},a.$params||{}),e),a}function jJ(e,t){if(!Bc(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(!V7(t)&&!Bc(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=D5(t);return a.$message=e,a}function YJ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=D5(e);return en(en({},a),{},{$async:!0,$watchTargets:t})}function GJ(e){return{$validator(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];return o.unref(t).reduce((c,i,s)=>{const l=Object.entries(i).reduce((f,u)=>{let[d,h]=u;const m=e[d]||{},v=Object.entries(m).reduce((p,g)=>{let[y,x]=g;const b=Ax(x).call(this,h,i,s,...r),M=Sx(b);if(p.$data[y]=b,p.$data.$invalid=!M||!!p.$data.$invalid,p.$data.$error=p.$data.$invalid,!M){let w=x.$message||"";const z=x.$params||{};typeof w=="function"&&(w=w({$pending:!1,$invalid:!M,$params:z,$model:h,$response:b})),p.$errors.push({$property:d,$message:w,$params:z,$response:b,$model:h,$pending:!1,$validator:y})}return{$valid:p.$valid&&M,$data:p.$data,$errors:p.$errors}},{$valid:!0,$data:{},$errors:[]});return f.$data[d]=v.$data,f.$errors[d]=v.$errors,{$valid:f.$valid&&v.$valid,$data:f.$data,$errors:f.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:c.$valid&&l.$valid,$data:c.$data.concat(l.$data),$errors:c.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:t=>{let{$response:a}=t;return a?a.$errors.map(r=>Object.values(r).map(n=>n.map(c=>c.$message)).reduce((n,c)=>n.concat(c),[])):[]}}}const Sn=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 t in e)return!0;return!1}return!!String(e).length},_l=e=>(e=o.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function y0(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r=>(r=o.unref(r),!Sn(r)||t.every(n=>(n.lastIndex=0,n.test(r))))}var i6=Object.freeze({__proto__:null,forEach:GJ,len:_l,normalizeValidatorObject:D5,regex:y0,req:Sn,unwrap:o.unref,unwrapNormalizedValidator:Ax,unwrapValidatorResponse:Sx,withAsync:YJ,withMessage:jJ,withParams:qJ});y0(/^[a-zA-Z]*$/);y0(/^[a-zA-Z0-9]*$/);y0(/^\d*(\.\d+)?$/);const XJ=/^(?:[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;y0(XJ);function KJ(e){return t=>!Sn(t)||_l(t)<=o.unref(e)}function ZJ(e){return{$validator:KJ(e),$message:t=>{let{$params:a}=t;return`The maximum length allowed is ${a.max}`},$params:{max:e,type:"maxLength"}}}function QJ(e){return t=>!Sn(t)||_l(t)>=o.unref(e)}function JJ(e){return{$validator:QJ(e),$message:t=>{let{$params:a}=t;return`This field should be at least ${a.min} characters long`},$params:{min:e,type:"minLength"}}}function e11(e){return typeof e=="string"&&(e=e.trim()),Sn(e)}var t11={$validator:e11,$message:"Value is required",$params:{type:"required"}};const a11=/^(?:(?:(?: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;y0(a11);var r11=y0(/(^[0-9]*$)|(^-[0-9]+$)/),n11={$validator:r11,$message:"Value is not an integer",$params:{type:"integer"}};y0(/^[-]?\d*(\.\d+)?$/);const An=_2("validations"),L7=i6.withMessage(()=>An("requiredRuleError"),t11),c11=i6.withMessage(()=>An("requiredRuleError"),i6.withParams({},e=>typeof e!="number"?!1:e>0)),S7=e=>Tx("minLength",e),A7=e=>Tx("maxLength",e),i11=i6.withMessage(()=>An("integerRuleError"),n11),s11=e=>O5("lessEqual",e),o11=e=>O5("greaterEqual",e),l11=e=>O5("lessThan",e),f11=e=>O5("greaterThan",e);function Tx(e,t){const a={minLength:JJ,maxLength:ZJ};return i6.withMessage(()=>An(`${e}RuleError`,{length:t}),a[e](t))}function O5(e,t){const a={lessEqual:r=>r<=t,greaterEqual:r=>r>=t,lessThan:r=>r<t,greaterThan:r=>r>t};return i6.withMessage(()=>An(`${e}RuleError`,{number:t}),i6.withParams({},r=>typeof r!="number"?!0:a[e](r)))}const u11=o.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){o.useCssVars(a=>({d66bfd04:o.unref(t).input.height,"66ebfdd4":o.unref(t).input.iconWidth,"9d32e216":o.unref(t).input.borderRadius,"1936f71a":o.unref(t).input.backgroundColorFocus,"19536b7e":o.unref(t).input.backgroundColorHover}));const{form:t}=$e();return(a,r)=>(o.openBlock(),o.createBlock(L2,{class:o.normalizeClass(["input-right-button",{"input-right-button__with-background":a.withBackground}]),variant:"flat",icon:a.icon,tabindex:"-1"},null,8,["class","icon"]))}});const Fc=R1(u11,[["__scopeId","data-v-1088e7d4"]]),d11={class:"input-container"},h11={class:"input-content"},m11=["type","placeholder","autofocus","disabled"],es="",p11=o.defineComponent({__name:"PgaInput",props:o.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:t,emit:a}){o.useCssVars(b=>({"7426ec94":o.unref(i).input.height,"9e656378":o.unref(i).input.padding,c8e0867a:o.unref(i).input.paddingWithIcon,"55e8474a":o.unref(i).input.borderColor,"7ff0518b":o.unref(i).input.borderRadius,"5a052608":o.unref(i).input.backgroundColor,"2c758fbc":o.unref(i).input.colorFocus,"63a33ca4":o.unref(i).input.backgroundColorDisabled,"3e5ce0dd":o.unref(i).input.placeholderColor}));const r=o.useModel(e,"modelValue"),n=e,c=a;t({focus:h});const{form:i}=$e(),s=o.ref(),l=o.ref(es),f=o.ref(!1),u=o.computed(()=>n.type==="password"),d=o.computed(()=>u.value?!1:!n.disabled&&l.value);o.watch(r,b=>x(b),{immediate:!0});function h(){var b;(b=s.value)==null||b.focus()}function m(){n.type==="number"&&!l.value&&(l.value=es)}function v(){n.type==="number"&&!l.value&&(l.value=y())}function p(){C(es),c("valueCleared")}function g(b){return b===""?null:n.type==="number"&&n.integer&&typeof b=="number"?Math.round(b):b}function y(b){const M=typeof b>"u"?r.value:b;return M===null?"":M}function x(b){const M=g(b);return r.value=M,l.value=y(M),M}function C(b){const M=x(b);c("change",M)}return(b,M)=>(o.openBlock(),o.createBlock(A3,{label:b.label,withRequiredLabel:b.withRequiredLabel,withOptionalLabel:b.withOptionalLabel,withLabelSpace:b.withLabelSpace,description:b.description,errors:b.errors,grow:b.grow},{default:o.withCtx(()=>[o.createElementVNode("div",d11,[o.createElementVNode("div",h11,[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":M[0]||(M[0]=w=>l.value=w),class:o.normalizeClass(["input",{input__disabled:b.disabled}]),type:f.value?"text":b.type,placeholder:o.unref(vt)(b.placeholder),autofocus:b.autofocus,disabled:b.disabled,onInput:M[1]||(M[1]=w=>C(l.value)),onKeyup:M[2]||(M[2]=o.withKeys(w=>c("enter"),["enter"])),onFocus:M[3]||(M[3]=w=>m()),onBlur:M[4]||(M[4]=w=>v())},null,42,m11),[[o.vModelDynamic,l.value]]),u.value?(o.openBlock(),o.createBlock(Fc,{key:0,icon:f.value?"eye-slash":"eye",withBackground:"",onClick:M[5]||(M[5]=w=>f.value=!f.value)},null,8,["icon"])):d.value?(o.openBlock(),o.createBlock(Fc,{key:1,icon:"xmark",onClick:M[6]||(M[6]=w=>p())})):o.createCommentVNode("",!0)]),o.renderSlot(b.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const Rc=R1(p11,[["__scopeId","data-v-7df318f0"]]),v11={class:"login-form-container"},g11={class:"user-icon-container"},y11=o.defineComponent({__name:"PgaLoginForm",setup(e){class t{constructor(){v1(this,"username","");v1(this,"password","")}}const a=Z2.getConfig(),r=_2("pgaForm"),n=Vr.useRoute(),c={username:{requiredRule:L7,minLengthRule:S7(8),maxLengthRule:A7(a.stringLengths.short)},password:{requiredRule:L7,minLengthRule:S7(8),maxLengthRule:A7(a.stringLengths.short)}},i=o.ref(new t),s=UJ(c,i),l=o.ref(!1);async function f(){if(!await s.value.$validate())return;const u={isLoadingRef:l,redirectToName:n.query.redirectTo};Np($3().currentRouteType,i.value,u)}return(u,d)=>(o.openBlock(),o.createElementBlock("div",v11,[o.createVNode(_x,{class:"login-form",submitBtnText:o.unref(r)("loginBtn"),submitBtnIcon:"right-to-bracket",isLoading:l.value,onSubmit:d[2]||(d[2]=h=>f())},{default:o.withCtx(()=>[o.createElementVNode("div",g11,[o.createVNode(Oe,{class:"user-icon",icon:"user"})]),o.createVNode(Rc,{modelValue:i.value.username,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value.username=h),label:o.unref(r)("usernameLabel"),errors:o.unref(s).username.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"]),o.createVNode(Rc,{modelValue:i.value.password,"onUpdate:modelValue":d[1]||(d[1]=h=>i.value.password=h),type:"password",label:o.unref(r)("passwordLabel"),errors:o.unref(s).password.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"])]),_:1},8,["submitBtnText","isLoading"])]))}});const x11=R1(y11,[["__scopeId","data-v-f0930bcf"]]),b11={class:"pga-checkbox"},C11=["textContent"],M11=o.defineComponent({__name:"PgaCheckbox",props:o.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(a,r)=>(o.openBlock(),o.createElementBlock("label",b11,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>t.value=n),type:"checkbox"},null,512),[[o.vModelCheckbox,t.value]]),a.label?(o.openBlock(),o.createElementBlock("span",{key:0,class:"checkbox--label",textContent:o.toDisplayString(a.label)},null,8,C11)):o.createCommentVNode("",!0)]))}});const z11=R1(M11,[["__scopeId","data-v-89f11c66"]]),w11={class:"colors-container"},_11=o.defineComponent({__name:"PgaColorSelector",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(n=>({"1d17ba59":o.unref(a).input.padding,ff76be42:o.unref(a).input.borderColor,bdc1aad4:o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=$e();function r(n){var c;return((c=t.value)==null?void 0:c.toLowerCase())===n.toLowerCase()}return(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createElementVNode("div",w11,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(Lp),i=>(o.openBlock(),o.createBlock(L2,{key:i,variant:r(i)?"outlined":"flat",color:r(i)?"primary":"first",disabled:n.disabled,onClick:s=>t.value=i},{default:o.withCtx(()=>[o.createVNode(Jg,{color:i},null,8,["color"])]),_:2},1032,["variant","color","disabled","onClick"]))),128))])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const k11=R1(_11,[["__scopeId","data-v-76761025"]]);function Y1(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function z2(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function J3(e,t){const a=Y1(e);return isNaN(t)?z2(e,NaN):(t&&a.setDate(a.getDate()+t),a)}function f4(e,t){const a=Y1(e);if(isNaN(t))return z2(e,NaN);if(!t)return a;const r=a.getDate(),n=z2(e,a.getTime());n.setMonth(a.getMonth()+t+1,0);const c=n.getDate();return r>=c?n:(a.setFullYear(n.getFullYear(),n.getMonth(),r),a)}function Ex(e,t){const{years:a=0,months:r=0,weeks:n=0,days:c=0,hours:i=0,minutes:s=0,seconds:l=0}=t,f=Y1(e),u=r||a?f4(f,r+a*12):f,d=c||n?J3(u,c+n*7):u,h=s+i*60,v=(l+h*60)*1e3;return z2(e,d.getTime()+v)}function H11(e,t){const a=+Y1(e);return z2(e,a+t)}const Nx=6048e5,V11=864e5,L11=6e4,Dx=36e5,S11=1e3;function A11(e,t){return H11(e,t*Dx)}let T11={};function g6(){return T11}function y4(e,t){var s,l,f,u;const a=g6(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??a.weekStartsOn??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.weekStartsOn)??0,n=Y1(e),c=n.getDay(),i=(c<r?7:0)+c-r;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function ra(e){return y4(e,{weekStartsOn:1})}function Ox(e){const t=Y1(e),a=t.getFullYear(),r=z2(e,0);r.setFullYear(a+1,0,4),r.setHours(0,0,0,0);const n=ra(r),c=z2(e,0);c.setFullYear(a,0,4),c.setHours(0,0,0,0);const i=ra(c);return t.getTime()>=n.getTime()?a+1:t.getTime()>=i.getTime()?a:a-1}function jh(e){const t=Y1(e);return t.setHours(0,0,0,0),t}function Ic(e){const t=Y1(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function Px(e,t){const a=jh(e),r=jh(t),n=+a-Ic(a),c=+r-Ic(r);return Math.round((n-c)/V11)}function E11(e){const t=Ox(e),a=z2(e,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),ra(a)}function N11(e,t){const a=t*3;return f4(e,a)}function kl(e,t){return f4(e,t*12)}function Bx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gr(e){if(!Bx(e)&&typeof e!="number")return!1;const t=Y1(e);return!isNaN(Number(t))}function Yh(e){const t=Y1(e);return Math.trunc(t.getMonth()/3)+1}function Fx(e,t){const a=Y1(e.start),r=Y1(e.end);let n=+a>+r;const c=n?+a:+r,i=n?r:a;i.setHours(0,0,0,0);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const l=[];for(;+i<=c;)l.push(Y1(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function $0(e){const t=Y1(e),a=t.getMonth(),r=a-a%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function D11(e,t){const a=Y1(e.start),r=Y1(e.end);let n=+a>+r;const c=n?+$0(a):+$0(r);let i=$0(n?r:a),s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const l=[];for(;+i<=c;)l.push(Y1(i)),i=N11(i,s);return n?l.reverse():l}function Rx(e){const t=Y1(e),a=t.getFullYear();return t.setFullYear(a+1,0,0),t.setHours(23,59,59,999),t}function Hl(e){const t=Y1(e),a=z2(e,0);return a.setFullYear(t.getFullYear(),0,1),a.setHours(0,0,0,0),a}function Ix(e,t){var s,l,f,u;const a=g6(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??a.weekStartsOn??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.weekStartsOn)??0,n=Y1(e),c=n.getDay(),i=(c<r?-7:0)+6-(c-r);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}function Gh(e){const t=Y1(e),a=t.getMonth(),r=a-a%3+3;return t.setMonth(r,0),t.setHours(23,59,59,999),t}const O11={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},P11=(e,t,a)=>{let r;const n=O11[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+r:r+" ago":r};function ts(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const B11={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},F11={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},R11={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},I11={date:ts({formats:B11,defaultWidth:"full"}),time:ts({formats:F11,defaultWidth:"full"}),dateTime:ts({formats:R11,defaultWidth:"full"})},$11={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},U11=(e,t,a,r)=>$11[e];function Fa(e){return(t,a)=>{const r=a!=null&&a.context?String(a.context):"standalone";let n;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=a!=null&&a.width?String(a.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=a!=null&&a.width?String(a.width):e.defaultWidth;n=e.values[s]||e.values[i]}const c=e.argumentCallback?e.argumentCallback(t):t;return n[c]}}const W11={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},q11={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},j11={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Y11={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},G11={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},X11={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},K11=(e,t)=>{const a=Number(e),r=a%100;if(r>20||r<10)switch(r%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},Z11={ordinalNumber:K11,era:Fa({values:W11,defaultWidth:"wide"}),quarter:Fa({values:q11,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fa({values:j11,defaultWidth:"wide"}),day:Fa({values:Y11,defaultWidth:"wide"}),dayPeriod:Fa({values:G11,defaultWidth:"wide",formattingValues:X11,defaultFormattingWidth:"wide"})};function Ra(e){return(t,a={})=>{const r=a.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],c=t.match(n);if(!c)return null;const i=c[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?J11(s,d=>d.test(i)):Q11(s,d=>d.test(i));let f;f=e.valueCallback?e.valueCallback(l):l,f=a.valueCallback?a.valueCallback(f):f;const u=t.slice(i.length);return{value:f,rest:u}}}function Q11(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function J11(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function e21(e){return(t,a={})=>{const r=t.match(e.matchPattern);if(!r)return null;const n=r[0],c=t.match(e.parsePattern);if(!c)return null;let i=e.valueCallback?e.valueCallback(c[0]):c[0];i=a.valueCallback?a.valueCallback(i):i;const s=t.slice(n.length);return{value:i,rest:s}}}const t21=/^(\d+)(th|st|nd|rd)?/i,a21=/\d+/i,r21={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},n21={any:[/^b/i,/^(a|c)/i]},c21={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},i21={any:[/1/i,/2/i,/3/i,/4/i]},s21={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},o21={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},l21={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},f21={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},u21={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},d21={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},h21={ordinalNumber:e21({matchPattern:t21,parsePattern:a21,valueCallback:e=>parseInt(e,10)}),era:Ra({matchPatterns:r21,defaultMatchWidth:"wide",parsePatterns:n21,defaultParseWidth:"any"}),quarter:Ra({matchPatterns:c21,defaultMatchWidth:"wide",parsePatterns:i21,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ra({matchPatterns:s21,defaultMatchWidth:"wide",parsePatterns:o21,defaultParseWidth:"any"}),day:Ra({matchPatterns:l21,defaultMatchWidth:"wide",parsePatterns:f21,defaultParseWidth:"any"}),dayPeriod:Ra({matchPatterns:u21,defaultMatchWidth:"any",parsePatterns:d21,defaultParseWidth:"any"})},$x={code:"en-US",formatDistance:P11,formatLong:I11,formatRelative:U11,localize:Z11,match:h21,options:{weekStartsOn:0,firstWeekContainsDate:1}};function m21(e){const t=Y1(e);return Px(t,Hl(t))+1}function Vl(e){const t=Y1(e),a=+ra(t)-+E11(t);return Math.round(a/Nx)+1}function Ll(e,t){var u,d,h,m;const a=Y1(e),r=a.getFullYear(),n=g6(),c=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=z2(e,0);i.setFullYear(r+1,0,c),i.setHours(0,0,0,0);const s=y4(i,t),l=z2(e,0);l.setFullYear(r,0,c),l.setHours(0,0,0,0);const f=y4(l,t);return a.getTime()>=s.getTime()?r+1:a.getTime()>=f.getTime()?r:r-1}function p21(e,t){var s,l,f,u;const a=g6(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??a.firstWeekContainsDate??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.firstWeekContainsDate)??1,n=Ll(e,t),c=z2(e,0);return c.setFullYear(n,0,r),c.setHours(0,0,0,0),y4(c,t)}function Sl(e,t){const a=Y1(e),r=+y4(a,t)-+p21(a,t);return Math.round(r/Nx)+1}function H2(e,t){const a=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return a+r}const Nt={y(e,t){const a=e.getFullYear(),r=a>0?a:1-a;return H2(t==="yy"?r%100:r,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):H2(a+1,2)},d(e,t){return H2(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return H2(e.getHours()%12||12,t.length)},H(e,t){return H2(e.getHours(),t.length)},m(e,t){return H2(e.getMinutes(),t.length)},s(e,t){return H2(e.getSeconds(),t.length)},S(e,t){const a=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,a-3));return H2(n,t.length)}},V6={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xh={G:function(e,t,a){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const r=e.getFullYear(),n=r>0?r:1-r;return a.ordinalNumber(n,{unit:"year"})}return Nt.y(e,t)},Y:function(e,t,a,r){const n=Ll(e,r),c=n>0?n:1-n;if(t==="YY"){const i=c%100;return H2(i,2)}return t==="Yo"?a.ordinalNumber(c,{unit:"year"}):H2(c,t.length)},R:function(e,t){const a=Ox(e);return H2(a,t.length)},u:function(e,t){const a=e.getFullYear();return H2(a,t.length)},Q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return H2(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return H2(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,a){const r=e.getMonth();switch(t){case"M":case"MM":return Nt.M(e,t);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,a){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return H2(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,a,r){const n=Sl(e,r);return t==="wo"?a.ordinalNumber(n,{unit:"week"}):H2(n,t.length)},I:function(e,t,a){const r=Vl(e);return t==="Io"?a.ordinalNumber(r,{unit:"week"}):H2(r,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):Nt.d(e,t)},D:function(e,t,a){const r=m21(e);return t==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):H2(r,t.length)},E:function(e,t,a){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,a,r){const n=e.getDay(),c=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return H2(c,2);case"eo":return a.ordinalNumber(c,{unit:"day"});case"eee":return a.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(n,{width:"short",context:"formatting"});case"eeee":default:return a.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,a,r){const n=e.getDay(),c=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return H2(c,t.length);case"co":return a.ordinalNumber(c,{unit:"day"});case"ccc":return a.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(n,{width:"narrow",context:"standalone"});case"cccccc":return a.day(n,{width:"short",context:"standalone"});case"cccc":default:return a.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,a){const r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return H2(n,t.length);case"io":return a.ordinalNumber(n,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,a){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,a){const r=e.getHours();let n;switch(r===12?n=V6.noon:r===0?n=V6.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,a){const r=e.getHours();let n;switch(r>=17?n=V6.evening:r>=12?n=V6.afternoon:r>=4?n=V6.morning:n=V6.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return Nt.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):Nt.H(e,t)},K:function(e,t,a){const r=e.getHours()%12;return t==="Ko"?a.ordinalNumber(r,{unit:"hour"}):H2(r,t.length)},k:function(e,t,a){let r=e.getHours();return r===0&&(r=24),t==="ko"?a.ordinalNumber(r,{unit:"hour"}):H2(r,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):Nt.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):Nt.s(e,t)},S:function(e,t){return Nt.S(e,t)},X:function(e,t,a){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Zh(r);case"XXXX":case"XX":return D0(r);case"XXXXX":case"XXX":default:return D0(r,":")}},x:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"x":return Zh(r);case"xxxx":case"xx":return D0(r);case"xxxxx":case"xxx":default:return D0(r,":")}},O:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Kh(r,":");case"OOOO":default:return"GMT"+D0(r,":")}},z:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Kh(r,":");case"zzzz":default:return"GMT"+D0(r,":")}},t:function(e,t,a){const r=Math.trunc(e.getTime()/1e3);return H2(r,t.length)},T:function(e,t,a){const r=e.getTime();return H2(r,t.length)}};function Kh(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),c=r%60;return c===0?a+String(n):a+String(n)+t+H2(c,2)}function Zh(e,t){return e%60===0?(e>0?"-":"+")+H2(Math.abs(e)/60,2):D0(e,t)}function D0(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=H2(Math.trunc(r/60),2),c=H2(r%60,2);return a+n+t+c}const Qh=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ux=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},v21=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],r=a[1],n=a[2];if(!n)return Qh(e,t);let c;switch(r){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Qh(r,t)).replace("{{time}}",Ux(n,t))},T7={p:Ux,P:v21},g21=/^D+$/,y21=/^Y+$/,x21=["D","DD","YY","YYYY"];function Wx(e){return g21.test(e)}function qx(e){return y21.test(e)}function E7(e,t,a){const r=b21(e,t,a);if(console.warn(r),x21.includes(e))throw new RangeError(r)}function b21(e,t,a){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const C21=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,M21=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,z21=/^'([^]*?)'?$/,w21=/''/g,_21=/[a-zA-Z]/;function B4(e,t,a){var u,d,h,m,v,p,g,y;const r=g6(),n=(a==null?void 0:a.locale)??r.locale??$x,c=(a==null?void 0:a.firstWeekContainsDate)??((d=(u=a==null?void 0:a.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=(a==null?void 0:a.weekStartsOn)??((p=(v=a==null?void 0:a.locale)==null?void 0:v.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((y=(g=r.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=Y1(e);if(!gr(s))throw new RangeError("Invalid time value");let l=t.match(M21).map(x=>{const C=x[0];if(C==="p"||C==="P"){const b=T7[C];return b(x,n.formatLong)}return x}).join("").match(C21).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const C=x[0];if(C==="'")return{isToken:!1,value:k21(x)};if(Xh[C])return{isToken:!0,value:x};if(C.match(_21))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:x}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));const f={firstWeekContainsDate:c,weekStartsOn:i,locale:n};return l.map(x=>{if(!x.isToken)return x.value;const C=x.value;(!(a!=null&&a.useAdditionalWeekYearTokens)&&qx(C)||!(a!=null&&a.useAdditionalDayOfYearTokens)&&Wx(C))&&E7(C,t,String(e));const b=Xh[C[0]];return b(s,C,n.localize,f)}).join("")}function k21(e){const t=e.match(z21);return t?t[1].replace(w21,"'"):e}function H21(e){return Y1(e).getDay()}function V21(e){const t=Y1(e),a=t.getFullYear(),r=t.getMonth(),n=z2(e,0);return n.setFullYear(a,r+1,0),n.setHours(0,0,0,0),n.getDate()}function L21(){return Object.assign({},g6())}function wt(e){return Y1(e).getHours()}function S21(e){let a=Y1(e).getDay();return a===0&&(a=7),a}function h0(e){return Y1(e).getMinutes()}function o2(e){return Y1(e).getMonth()}function na(e){return Y1(e).getSeconds()}function n2(e){return Y1(e).getFullYear()}function ca(e,t){const a=Y1(e),r=Y1(t);return a.getTime()>r.getTime()}function tn(e,t){const a=Y1(e),r=Y1(t);return+a<+r}function B6(e,t){const a=Y1(e),r=Y1(t);return+a==+r}function A21(e,t){const a=t instanceof Date?z2(t,0):new t(0);return a.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),a.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),a}const T21=10;class jx{constructor(){v1(this,"subPriority",0)}validate(t,a){return!0}}class E21 extends jx{constructor(t,a,r,n,c){super(),this.value=t,this.validateValue=a,this.setValue=r,this.priority=n,c&&(this.subPriority=c)}validate(t,a){return this.validateValue(t,this.value,a)}set(t,a,r){return this.setValue(t,a,this.value,r)}}class N21 extends jx{constructor(){super(...arguments);v1(this,"priority",T21);v1(this,"subPriority",-1)}set(a,r){return r.timestampIsSet?a:z2(a,A21(a,Date))}}class w2{run(t,a,r,n){const c=this.parse(t,a,r,n);return c?{setter:new E21(c.value,this.validate,this.set,this.priority,this.subPriority),rest:c.rest}:null}validate(t,a,r){return!0}}class D21 extends w2{constructor(){super(...arguments);v1(this,"priority",140);v1(this,"incompatibleTokens",["R","u","t","T"])}parse(a,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})||n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"})}}set(a,r,n){return r.era=n,a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}const ve={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},L4={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ge(e,t){return e&&{value:t(e.value),rest:e.rest}}function ae(e,t){const a=t.match(e);return a?{value:parseInt(a[0],10),rest:t.slice(a[0].length)}:null}function S4(e,t){const a=t.match(e);if(!a)return null;if(a[0]==="Z")return{value:0,rest:t.slice(1)};const r=a[1]==="+"?1:-1,n=a[2]?parseInt(a[2],10):0,c=a[3]?parseInt(a[3],10):0,i=a[5]?parseInt(a[5],10):0;return{value:r*(n*Dx+c*L11+i*S11),rest:t.slice(a[0].length)}}function Yx(e){return ae(ve.anyDigitsSigned,e)}function oe(e,t){switch(e){case 1:return ae(ve.singleDigit,t);case 2:return ae(ve.twoDigits,t);case 3:return ae(ve.threeDigits,t);case 4:return ae(ve.fourDigits,t);default:return ae(new RegExp("^\\d{1,"+e+"}"),t)}}function $c(e,t){switch(e){case 1:return ae(ve.singleDigitSigned,t);case 2:return ae(ve.twoDigitsSigned,t);case 3:return ae(ve.threeDigitsSigned,t);case 4:return ae(ve.fourDigitsSigned,t);default:return ae(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Al(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Gx(e,t){const a=t>0,r=a?t:1-t;let n;if(r<=50)n=e||100;else{const c=r+50,i=Math.trunc(c/100)*100,s=e>=c%100;n=e+i-(s?100:0)}return a?n:1-n}function Xx(e){return e%400===0||e%4===0&&e%100!==0}class O21 extends w2{constructor(){super(...arguments);v1(this,"priority",130);v1(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(a,r,n){const c=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return ge(oe(4,a),c);case"yo":return ge(n.ordinalNumber(a,{unit:"year"}),c);default:return ge(oe(r.length,a),c)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n){const c=a.getFullYear();if(n.isTwoDigitYear){const s=Gx(n.year,c);return a.setFullYear(s,0,1),a.setHours(0,0,0,0),a}const i=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(i,0,1),a.setHours(0,0,0,0),a}}class P21 extends w2{constructor(){super(...arguments);v1(this,"priority",130);v1(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(a,r,n){const c=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ge(oe(4,a),c);case"Yo":return ge(n.ordinalNumber(a,{unit:"year"}),c);default:return ge(oe(r.length,a),c)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n,c){const i=Ll(a,c);if(n.isTwoDigitYear){const l=Gx(n.year,i);return a.setFullYear(l,0,c.firstWeekContainsDate),a.setHours(0,0,0,0),y4(a,c)}const s=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(s,0,c.firstWeekContainsDate),a.setHours(0,0,0,0),y4(a,c)}}class B21 extends w2{constructor(){super(...arguments);v1(this,"priority",130);v1(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(a,r){return $c(r==="R"?4:r.length,a)}set(a,r,n){const c=z2(a,0);return c.setFullYear(n,0,4),c.setHours(0,0,0,0),ra(c)}}class F21 extends w2{constructor(){super(...arguments);v1(this,"priority",130);v1(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(a,r){return $c(r==="u"?4:r.length,a)}set(a,r,n){return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}class R21 extends w2{constructor(){super(...arguments);v1(this,"priority",120);v1(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"Q":case"QQ":return oe(r.length,a);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})||n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class I21 extends w2{constructor(){super(...arguments);v1(this,"priority",120);v1(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"q":case"qq":return oe(r.length,a);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})||n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class $21 extends w2{constructor(){super(...arguments);v1(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);v1(this,"priority",110)}parse(a,r,n){const c=i=>i-1;switch(r){case"M":return ge(ae(ve.month,a),c);case"MM":return ge(oe(2,a),c);case"Mo":return ge(n.ordinalNumber(a,{unit:"month"}),c);case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})||n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}class U21 extends w2{constructor(){super(...arguments);v1(this,"priority",110);v1(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(a,r,n){const c=i=>i-1;switch(r){case"L":return ge(ae(ve.month,a),c);case"LL":return ge(oe(2,a),c);case"Lo":return ge(n.ordinalNumber(a,{unit:"month"}),c);case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})||n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}function W21(e,t,a){const r=Y1(e),n=Sl(r,a)-t;return r.setDate(r.getDate()-n*7),r}class q21 extends w2{constructor(){super(...arguments);v1(this,"priority",100);v1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(a,r,n){switch(r){case"w":return ae(ve.week,a);case"wo":return n.ordinalNumber(a,{unit:"week"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n,c){return y4(W21(a,n,c),c)}}function j21(e,t){const a=Y1(e),r=Vl(a)-t;return a.setDate(a.getDate()-r*7),a}class Y21 extends w2{constructor(){super(...arguments);v1(this,"priority",100);v1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(a,r,n){switch(r){case"I":return ae(ve.week,a);case"Io":return n.ordinalNumber(a,{unit:"week"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n){return ra(j21(a,n))}}const G21=[31,28,31,30,31,30,31,31,30,31,30,31],X21=[31,29,31,30,31,30,31,31,30,31,30,31];class K21 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"subPriority",1);v1(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"d":return ae(ve.date,a);case"do":return n.ordinalNumber(a,{unit:"date"});default:return oe(r.length,a)}}validate(a,r){const n=a.getFullYear(),c=Xx(n),i=a.getMonth();return c?r>=1&&r<=X21[i]:r>=1&&r<=G21[i]}set(a,r,n){return a.setDate(n),a.setHours(0,0,0,0),a}}class Z21 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"subpriority",1);v1(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(a,r,n){switch(r){case"D":case"DD":return ae(ve.dayOfYear,a);case"Do":return n.ordinalNumber(a,{unit:"date"});default:return oe(r.length,a)}}validate(a,r){const n=a.getFullYear();return Xx(n)?r>=1&&r<=366:r>=1&&r<=365}set(a,r,n){return a.setMonth(0,n),a.setHours(0,0,0,0),a}}function Tl(e,t,a){var d,h,m,v;const r=g6(),n=(a==null?void 0:a.weekStartsOn)??((h=(d=a==null?void 0:a.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((v=(m=r.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,c=Y1(e),i=c.getDay(),l=(t%7+7)%7,f=7-n,u=t<0||t>6?t-(i+f)%7:(l+f)%7-(i+f)%7;return J3(c,u)}class Q21 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Tl(a,n,c),a.setHours(0,0,0,0),a}}class J21 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(a,r,n,c){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+c.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ge(oe(r.length,a),i);case"eo":return ge(n.ordinalNumber(a,{unit:"day"}),i);case"eee":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Tl(a,n,c),a.setHours(0,0,0,0),a}}class ee1 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(a,r,n,c){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+c.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ge(oe(r.length,a),i);case"co":return ge(n.ordinalNumber(a,{unit:"day"}),i);case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})||n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Tl(a,n,c),a.setHours(0,0,0,0),a}}function te1(e,t){const a=Y1(e),r=S21(a),n=t-r;return J3(a,n)}class ae1 extends w2{constructor(){super(...arguments);v1(this,"priority",90);v1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(a,r,n){const c=i=>i===0?7:i;switch(r){case"i":case"ii":return oe(r.length,a);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return ge(n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c);case"iiiii":return ge(n.day(a,{width:"narrow",context:"formatting"}),c);case"iiiiii":return ge(n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c);case"iiii":default:return ge(n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c)}}validate(a,r){return r>=1&&r<=7}set(a,r,n){return a=te1(a,n),a.setHours(0,0,0,0),a}}class re1 extends w2{constructor(){super(...arguments);v1(this,"priority",80);v1(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(a,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Al(n),0,0,0),a}}class ne1 extends w2{constructor(){super(...arguments);v1(this,"priority",80);v1(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(a,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Al(n),0,0,0),a}}class ce1 extends w2{constructor(){super(...arguments);v1(this,"priority",80);v1(this,"incompatibleTokens",["a","b","t","T"])}parse(a,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Al(n),0,0,0),a}}class ie1 extends w2{constructor(){super(...arguments);v1(this,"priority",70);v1(this,"incompatibleTokens",["H","K","k","t","T"])}parse(a,r,n){switch(r){case"h":return ae(ve.hour12h,a);case"ho":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=12}set(a,r,n){const c=a.getHours()>=12;return c&&n<12?a.setHours(n+12,0,0,0):!c&&n===12?a.setHours(0,0,0,0):a.setHours(n,0,0,0),a}}class se1 extends w2{constructor(){super(...arguments);v1(this,"priority",70);v1(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(a,r,n){switch(r){case"H":return ae(ve.hour23h,a);case"Ho":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=23}set(a,r,n){return a.setHours(n,0,0,0),a}}class oe1 extends w2{constructor(){super(...arguments);v1(this,"priority",70);v1(this,"incompatibleTokens",["h","H","k","t","T"])}parse(a,r,n){switch(r){case"K":return ae(ve.hour11h,a);case"Ko":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.getHours()>=12&&n<12?a.setHours(n+12,0,0,0):a.setHours(n,0,0,0),a}}class le1 extends w2{constructor(){super(...arguments);v1(this,"priority",70);v1(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(a,r,n){switch(r){case"k":return ae(ve.hour24h,a);case"ko":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=24}set(a,r,n){const c=n<=24?n%24:n;return a.setHours(c,0,0,0),a}}class fe1 extends w2{constructor(){super(...arguments);v1(this,"priority",60);v1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"m":return ae(ve.minute,a);case"mo":return n.ordinalNumber(a,{unit:"minute"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setMinutes(n,0,0),a}}class ue1 extends w2{constructor(){super(...arguments);v1(this,"priority",50);v1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"s":return ae(ve.second,a);case"so":return n.ordinalNumber(a,{unit:"second"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setSeconds(n,0),a}}class de1 extends w2{constructor(){super(...arguments);v1(this,"priority",30);v1(this,"incompatibleTokens",["t","T"])}parse(a,r){const n=c=>Math.trunc(c*Math.pow(10,-r.length+3));return ge(oe(r.length,a),n)}set(a,r,n){return a.setMilliseconds(n),a}}class he1 extends w2{constructor(){super(...arguments);v1(this,"priority",10);v1(this,"incompatibleTokens",["t","T","x"])}parse(a,r){switch(r){case"X":return S4(L4.basicOptionalMinutes,a);case"XX":return S4(L4.basic,a);case"XXXX":return S4(L4.basicOptionalSeconds,a);case"XXXXX":return S4(L4.extendedOptionalSeconds,a);case"XXX":default:return S4(L4.extended,a)}}set(a,r,n){return r.timestampIsSet?a:z2(a,a.getTime()-Ic(a)-n)}}class me1 extends w2{constructor(){super(...arguments);v1(this,"priority",10);v1(this,"incompatibleTokens",["t","T","X"])}parse(a,r){switch(r){case"x":return S4(L4.basicOptionalMinutes,a);case"xx":return S4(L4.basic,a);case"xxxx":return S4(L4.basicOptionalSeconds,a);case"xxxxx":return S4(L4.extendedOptionalSeconds,a);case"xxx":default:return S4(L4.extended,a)}}set(a,r,n){return r.timestampIsSet?a:z2(a,a.getTime()-Ic(a)-n)}}class pe1 extends w2{constructor(){super(...arguments);v1(this,"priority",40);v1(this,"incompatibleTokens","*")}parse(a){return Yx(a)}set(a,r,n){return[z2(a,n*1e3),{timestampIsSet:!0}]}}class ve1 extends w2{constructor(){super(...arguments);v1(this,"priority",20);v1(this,"incompatibleTokens","*")}parse(a){return Yx(a)}set(a,r,n){return[z2(a,n),{timestampIsSet:!0}]}}const ge1={G:new D21,y:new O21,Y:new P21,R:new B21,u:new F21,Q:new R21,q:new I21,M:new $21,L:new U21,w:new q21,I:new Y21,d:new K21,D:new Z21,E:new Q21,e:new J21,c:new ee1,i:new ae1,a:new re1,b:new ne1,B:new ce1,h:new ie1,H:new se1,K:new oe1,k:new le1,m:new fe1,s:new ue1,S:new de1,X:new he1,x:new me1,t:new pe1,T:new ve1},ye1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xe1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,be1=/^'([^]*?)'?$/,Ce1=/''/g,Me1=/\S/,ze1=/[a-zA-Z]/;function N7(e,t,a,r){var p,g,y,x,C,b,M,w;const n=L21(),c=(r==null?void 0:r.locale)??n.locale??$x,i=(r==null?void 0:r.firstWeekContainsDate)??((g=(p=r==null?void 0:r.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??n.firstWeekContainsDate??((x=(y=n.locale)==null?void 0:y.options)==null?void 0:x.firstWeekContainsDate)??1,s=(r==null?void 0:r.weekStartsOn)??((b=(C=r==null?void 0:r.locale)==null?void 0:C.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((w=(M=n.locale)==null?void 0:M.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?Y1(a):z2(a,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:c},f=[new N21],u=t.match(xe1).map(z=>{const H=z[0];if(H in T7){const A=T7[H];return A(z,c.formatLong)}return z}).join("").match(ye1),d=[];for(let z of u){!(r!=null&&r.useAdditionalWeekYearTokens)&&qx(z)&&E7(z,t,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Wx(z)&&E7(z,t,e);const H=z[0],A=ge1[H];if(A){const{incompatibleTokens:V}=A;if(Array.isArray(V)){const _=d.find(N=>V.includes(N.token)||N.token===H);if(_)throw new RangeError(`The format string mustn't contain \`${_.fullToken}\` and \`${z}\` at the same time`)}else if(A.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${z}\` and any other token at the same time`);d.push({token:H,fullToken:z});const k=A.run(e,z,c.match,l);if(!k)return z2(a,NaN);f.push(k.setter),e=k.rest}else{if(H.match(ze1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+H+"`");if(z==="''"?z="'":H==="'"&&(z=we1(z)),e.indexOf(z)===0)e=e.slice(z.length);else return z2(a,NaN)}}if(e.length>0&&Me1.test(e))return z2(a,NaN);const h=f.map(z=>z.priority).sort((z,H)=>H-z).filter((z,H,A)=>A.indexOf(z)===H).map(z=>f.filter(H=>H.priority===z).sort((H,A)=>A.subPriority-H.subPriority)).map(z=>z[0]);let m=Y1(a);if(isNaN(m.getTime()))return z2(a,NaN);const v={};for(const z of h){if(!z.validate(m,l))return z2(a,NaN);const H=z.set(m,v,l);Array.isArray(H)?(m=H[0],Object.assign(v,H[1])):m=H}return z2(a,m)}function we1(e){return e.match(be1)[1].replace(Ce1,"'")}function Jh(e,t){const a=$0(e),r=$0(t);return+a==+r}function _e1(e,t){return J3(e,-t)}function Kx(e,t){const a=Y1(e),r=a.getFullYear(),n=a.getDate(),c=z2(e,0);c.setFullYear(r,t,15),c.setHours(0,0,0,0);const i=V21(c);return a.setMonth(t,Math.min(n,i)),a}function N2(e,t){let a=Y1(e);return isNaN(+a)?z2(e,NaN):(t.year!=null&&a.setFullYear(t.year),t.month!=null&&(a=Kx(a,t.month)),t.date!=null&&a.setDate(t.date),t.hours!=null&&a.setHours(t.hours),t.minutes!=null&&a.setMinutes(t.minutes),t.seconds!=null&&a.setSeconds(t.seconds),t.milliseconds!=null&&a.setMilliseconds(t.milliseconds),a)}function Zx(e,t){const a=Y1(e);return a.setHours(t),a}function El(e,t){const a=Y1(e);return a.setMilliseconds(t),a}function Qx(e,t){const a=Y1(e);return a.setMinutes(t),a}function Nl(e,t){const a=Y1(e);return a.setSeconds(t),a}function N4(e,t){const a=Y1(e);return isNaN(+a)?z2(e,NaN):(a.setFullYear(t),a)}function ia(e,t){return f4(e,-t)}function ke1(e,t){const{years:a=0,months:r=0,weeks:n=0,days:c=0,hours:i=0,minutes:s=0,seconds:l=0}=t,f=ia(e,r+a*12),u=_e1(f,c+n*7),d=s+i*60,m=(l+d*60)*1e3;return z2(e,u.getTime()-m)}function Jx(e,t){return kl(e,-t)}function va(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),o.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}va.compatConfig={MODE:3};function eb(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),o.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}eb.compatConfig={MODE:3};function Dl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Dl.compatConfig={MODE:3};function Ol(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}Ol.compatConfig={MODE:3};function Pl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),o.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}Pl.compatConfig={MODE:3};function Bl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Bl.compatConfig={MODE:3};function Fl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Fl.compatConfig={MODE:3};const F4=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),tb=(e,t)=>D7(e,t)||A1(),He1=(e,t)=>t.dateInTz?F4(new Date(e),t.dateInTz):A1(e),D7=(e,t)=>{if(!e)return null;if(!t)return A1(e);const a=A1(e);return t.exactMatch?He1(e,t):F4(a,t.timezone)},Ve1=e=>{if(!e)return 0;const t=new Date,a=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),r=new Date(t.toLocaleString("en-US",{timeZone:e})),n=r.getTimezoneOffset()/60;return(+a-+r)/(1e3*60*60)-n};var X3=(e=>(e.month="month",e.year="year",e))(X3||{}),O0=(e=>(e.top="top",e.bottom="bottom",e))(O0||{}),G0=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(G0||{}),Ye=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(Ye||{});const Le1=["timestamp","date","iso"];var c3=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(c3||{}),te=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))(te||{});function em(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function Se1(e){return t=>B4(new Date(`2017-01-0${t}T00:00:00+00:00`),"EEEEEE",{locale:e})}const Ae1=(e,t,a)=>{const r=[1,2,3,4,5,6,7];let n;if(e!==null)try{n=r.map(Se1(e))}catch{n=r.map(em(t))}else n=r.map(em(t));const c=n.slice(0,a),i=n.slice(a+1,n.length);return[n[a]].concat(...i).concat(...c)},Rl=(e,t,a)=>{const r=[];for(let n=+e[0];n<=+e[1];n++)r.push({value:+n,text:cb(n,t)});return a?r.reverse():r},ab=(e,t,a)=>{const r=[1,2,3,4,5,6,7,8,9,10,11,12].map(c=>{const i=c<10?`0${c}`:c;return new Date(`2017-${i}-01T00:00:00+00:00`)});if(e!==null)try{const c=a==="long"?"MMMM":"MMM";return r.map((i,s)=>{const l=B4(F4(i,"UTC"),c,{locale:e});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:s}})}catch{}const n=new Intl.DateTimeFormat(t,{month:a,timeZone:"UTC"});return r.map((c,i)=>{const s=n.format(c);return{text:s.charAt(0).toUpperCase()+s.substring(1),value:i}})},Te1=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],ke=e=>{const t=o.unref(e);return t!=null&&t.$el?t==null?void 0:t.$el:t},Ee1=e=>({type:"dot",...e??{}}),rb=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,Il={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},Te=e=>e,tm=e=>e===0?e:!e||isNaN(+e)?null:+e,am=e=>e===null,nb=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},Ne1=e=>{const t=[],a=r=>r.filter(n=>n);for(let r=0;r<e.length;r+=3){const n=[e[r],e[r+1],e[r+2]];t.push(a(n))}return t},an=(e,t,a)=>{const r=a!=null,n=t!=null;if(!r&&!n)return!1;const c=+a,i=+t;return r&&n?+e>c||+e<i:r?+e>c:n?+e<i:!1},sa=(e,t)=>Ne1(e).map(a=>a.map(r=>{const{active:n,disabled:c,isBetween:i,highlighted:s}=t(r);return{...r,active:n,disabled:c,className:{dp__overlay_cell_active:n,dp__overlay_cell:!n,dp__overlay_cell_disabled:c,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:c&&n,dp__cell_in_between:i,"dp--highlighted":s}}})),r0=(e,t,a=!1)=>{e&&t.allowStopPropagation&&(a&&e.stopImmediatePropagation(),e.stopPropagation())},De1=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function Oe1(e,t){let a=[...document.querySelectorAll(De1())];a=a.filter(n=>!e.contains(n)||n.hasAttribute("data-datepicker-instance"));const r=a.indexOf(e);if(r>=0&&(t?r-1>=0:r+1<=a.length))return a[r+(t?-1:1)]}const Pe1=(e,t)=>e==null?void 0:e.querySelector(`[data-dp-element="${t}"]`),cb=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),$l=e=>B4(e,"dd-MM-yyyy"),as=e=>Array.isArray(e),Uc=(e,t)=>t.get($l(e)),Be1=(e,t)=>e?t?t instanceof Map?!!Uc(e,t):t(A1(e)):!1:!0,y3=(e,t,a=!1)=>{if(e.key===te.enter||e.key===te.space)return a&&e.preventDefault(),t()},rm=(e,t,a,r,n,c)=>{const i=N7(e,t.slice(0,e.length),new Date,{locale:c});return gr(i)&&Bx(i)?r||n?i:N2(i,{hours:+a.hours,minutes:+(a==null?void 0:a.minutes),seconds:+(a==null?void 0:a.seconds),milliseconds:0}):null},Fe1=(e,t,a,r,n,c)=>{const i=Array.isArray(a)?a[0]:a;if(typeof t=="string")return rm(e,t,i,r,n,c);if(Array.isArray(t)){let s=null;for(const l of t)if(s=rm(e,l,i,r,n,c),s)break;return s}return typeof t=="function"?t(e):null},A1=e=>e?new Date(e):new Date,Re1=(e,t,a)=>{if(t){const n=(e.getMonth()+1).toString().padStart(2,"0"),c=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),l=a?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${n}-${c}T${i}:${s}:${l}.000Z`}const r=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(r).toISOString()},k3=e=>{let t=A1(JSON.parse(JSON.stringify(e)));return t=Zx(t,0),t=Qx(t,0),t=Nl(t,0),t=El(t,0),t},n0=(e,t,a,r)=>{let n=e?A1(e):A1();return(t||t===0)&&(n=Zx(n,+t)),(a||a===0)&&(n=Qx(n,+a)),(r||r===0)&&(n=Nl(n,+r)),El(n,0)},ne=(e,t)=>!e||!t?!1:tn(k3(e),k3(t)),l2=(e,t)=>!e||!t?!1:B6(k3(e),k3(t)),me=(e,t)=>!e||!t?!1:ca(k3(e),k3(t)),P5=(e,t,a)=>e!=null&&e[0]&&e!=null&&e[1]?me(a,e[0])&&ne(a,e[1]):e!=null&&e[0]&&t?me(a,e[0])&&ne(a,t)||ne(a,e[0])&&me(a,t):!1,e4=e=>{const t=N2(new Date(e),{date:1});return k3(t)},rs=(e,t,a)=>t&&(a||a===0)?Object.fromEntries(["hours","minutes","seconds"].map(r=>r===t?[r,a]:[r,isNaN(+e[r])?void 0:+e[r]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},X0=e=>({hours:wt(e),minutes:h0(e),seconds:na(e)}),ib=(e,t)=>{if(t){const a=n2(A1(t));if(a>e)return 12;if(a===e)return o2(A1(t))}},sb=(e,t)=>{if(t){const a=n2(A1(t));return a<e?-1:a===e?o2(A1(t)):void 0}},oa=e=>{if(e)return n2(A1(e))},ob=(e,t)=>{const a=me(e,t)?t:e,r=me(t,e)?t:e;return Fx({start:a,end:r})},Ie1=e=>{const t=f4(e,1);return{month:o2(t),year:n2(t)}},ct=(e,t)=>{const a=y4(e,{weekStartsOn:+t}),r=Ix(e,{weekStartsOn:+t});return[a,r]},lb=(e,t)=>{const a={hours:wt(A1()),minutes:h0(A1()),seconds:t?na(A1()):0};return Object.assign(a,e)},Xt=(e,t,a)=>[N2(A1(e),{date:1}),N2(A1(),{month:t,year:a,date:1})],dt=(e,t,a)=>{let r=e?A1(e):A1();return(t||t===0)&&(r=Kx(r,t)),a&&(r=N4(r,a)),r},fb=(e,t,a,r,n)=>{if(!r||n&&!t||!n&&!a)return!1;const c=n?f4(e,1):ia(e,1),i=[o2(c),n2(c)];return n?!Ue1(...i,t):!$e1(...i,a)},$e1=(e,t,a)=>ne(...Xt(a,e,t))||l2(...Xt(a,e,t)),Ue1=(e,t,a)=>me(...Xt(a,e,t))||l2(...Xt(a,e,t)),ub=(e,t,a,r,n,c,i)=>{if(typeof t=="function"&&!i)return t(e);const s=a?{locale:a}:void 0;return Array.isArray(e)?`${B4(e[0],c,s)}${n&&!e[1]?"":r}${e[1]?B4(e[1],c,s):""}`:B4(e,c,s)},L6=e=>{if(e)return null;throw new Error(Il.prop("partial-range"))},w8=(e,t)=>{if(t)return e();throw new Error(Il.prop("range"))},O7=e=>Array.isArray(e)?gr(e[0])&&(e[1]?gr(e[1]):!0):e?gr(e):!1,We1=(e,t)=>N2(t??A1(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),ns=(e,t,a,r)=>{if(!e)return!0;if(r){const n=a==="max"?tn(e,t):ca(e,t),c={seconds:0,milliseconds:0};return n||B6(N2(e,c),N2(t,c))}return a==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},cs=(e,t,a)=>e?We1(e,t):A1(a??t),nm=(e,t,a,r,n)=>{if(Array.isArray(r)){const i=cs(e,r[0],t),s=cs(e,r[1],t);return ns(r[0],i,a,!!t)&&ns(r[1],s,a,!!t)&&n}const c=cs(e,r,t);return ns(r,c,a,!!t)&&n},is=e=>N2(A1(),X0(e)),qe1=(e,t)=>e instanceof Map?Array.from(e.values()).filter(a=>n2(A1(a))===t).map(a=>o2(a)):[],db=(e,t,a)=>typeof e=="function"?e({month:t,year:a}):!!e.months.find(r=>r.month===t&&r.year===a),Ul=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),Ia=o.reactive({menuFocused:!1,shiftKeyInMenu:!1}),hb=()=>{const e=a=>{Ia.menuFocused=a},t=a=>{Ia.shiftKeyInMenu!==a&&(Ia.shiftKeyInMenu=a)};return{control:o.computed(()=>({shiftKeyInMenu:Ia.shiftKeyInMenu,menuFocused:Ia.menuFocused})),setMenuFocused:e,setShiftKey:t}},P2=o.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),ss=o.ref(null),_8=o.ref(!1),os=o.ref(!1),ls=o.ref(!1),fs=o.ref(!1),We=o.ref(0),ue=o.ref(0),x0=()=>{const e=o.computed(()=>_8.value?[...P2.selectionGrid,P2.actionRow].filter(d=>d.length):os.value?[...P2.timePicker[0],...P2.timePicker[1],fs.value?[]:[ss.value],P2.actionRow].filter(d=>d.length):ls.value?[...P2.monthPicker,P2.actionRow]:[P2.monthYear,...P2.calendar,P2.time,P2.actionRow].filter(d=>d.length)),t=d=>{We.value=d?We.value+1:We.value-1;let h=null;e.value[ue.value]&&(h=e.value[ue.value][We.value]),!h&&e.value[ue.value+(d?1:-1)]?(ue.value=ue.value+(d?1:-1),We.value=d?0:e.value[ue.value].length-1):h||(We.value=d?We.value-1:We.value+1)},a=d=>{ue.value===0&&!d||ue.value===e.value.length&&d||(ue.value=d?ue.value+1:ue.value-1,e.value[ue.value]?e.value[ue.value]&&!e.value[ue.value][We.value]&&We.value!==0&&(We.value=e.value[ue.value].length-1):ue.value=d?ue.value-1:ue.value+1)},r=d=>{let h=null;e.value[ue.value]&&(h=e.value[ue.value][We.value]),h?h.focus({preventScroll:!_8.value}):We.value=d?We.value-1:We.value+1},n=()=>{t(!0),r(!0)},c=()=>{t(!1),r(!1)},i=()=>{a(!1),r(!0)},s=()=>{a(!0),r(!0)},l=(d,h)=>{P2[h]=d},f=(d,h)=>{P2[h]=d},u=()=>{We.value=0,ue.value=0};return{buildMatrix:l,buildMultiLevelMatrix:f,setTimePickerBackRef:d=>{ss.value=d},setSelectionGrid:d=>{_8.value=d,u(),d||(P2.selectionGrid=[])},setTimePicker:(d,h=!1)=>{os.value=d,fs.value=h,u(),d||(P2.timePicker[0]=[],P2.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{P2.timePicker[h]=d},arrowRight:n,arrowLeft:c,arrowUp:i,arrowDown:s,clearArrowNav:()=>{P2.monthYear=[],P2.calendar=[],P2.time=[],P2.actionRow=[],P2.selectionGrid=[],P2.timePicker[0]=[],P2.timePicker[1]=[],_8.value=!1,os.value=!1,fs.value=!1,ls.value=!1,u(),ss.value=null},setMonthPicker:d=>{ls.value=d,u()},refSets:P2}},cm=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),je1=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,...e??{}}),im=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,Ye1=e=>{const t=typeof e=="object"&&e,a={static:!0,solo:!1};if(!e)return{...a,count:im(!1)};const r=t?e:{},n=t?r.count??!0:e,c=im(n);return Object.assign(a,r,{count:c})},Ge1=(e,t,a)=>e||(typeof a=="string"?a:t),Xe1=e=>typeof e=="boolean"?e?cm({}):!1:cm(e),Ke1=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:!0,selectOnFocus:!1,rangeSeparator:" - "};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},Ze1=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),Qe1=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),Je1=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},e31=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,...e??{}}),t31=e=>{const t={dates:Array.isArray(e)?e.map(a=>A1(a)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},a31=e=>typeof e=="object"?{type:(e==null?void 0:e.type)??"local",hideOnOffsetDates:(e==null?void 0:e.hideOnOffsetDates)??!1}:{type:e,hideOnOffsetDates:!1},r31=(e,t)=>typeof e=="object"?{enabled:!0,...{noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1},...e}:{enabled:e,noDisabledRange:t.noDisabledRange,showLastInRange:t.showLastInRange,minMaxRawRange:t.minMaxRawRange,partialRange:t.partialRange,disableTimeRangeValidation:t.disableTimeRangeValidation,maxRange:t.maxRange,minRange:t.minRange,autoRange:t.autoRange,fixedStart:t.fixedStart,fixedEnd:t.fixedEnd},n31=(e,t)=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:t,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:t??e.emitTimezone,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:t},us=(e,t)=>new Map(e.map(a=>{const r=tb(a,t);return[$l(r),r]})),c31=(e,t)=>e.length?new Map(e.map(a=>{const r=tb(a.date,t);return[$l(r),a]})):null,i31=(e,t,a,r,n,c,i)=>({minDate:D7(e,i),maxDate:D7(t,i),disabledDates:as(a)?us(a,i):a,allowedDates:as(r)?us(r,i):null,highlight:typeof n=="object"&&as(n==null?void 0:n.dates)?us(n.dates,i):n,markers:c31(c,i)}),s31=(e,t)=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:+t}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},re=e=>{const t=()=>{const M=e.enableSeconds?":ss":"",w=e.enableMinutes?":mm":"";return e.is24?`HH${w}${M}`:`hh${w}${M} aa`},a=()=>{var M;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((M=g.value)==null?void 0:M.type)==="iso"?"RR":"ww"}-yyyy`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},r=M=>lb(M,e.enableSeconds),n=()=>b.value.enabled?e.startTime&&Array.isArray(e.startTime)?[r(e.startTime[0]),r(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?r(e.startTime):null,c=o.computed(()=>Ye1(e.multiCalendars)),i=o.computed(()=>n()),s=o.computed(()=>je1(e.ariaLabels)),l=o.computed(()=>Ze1(e.filters)),f=o.computed(()=>Xe1(e.transitions)),u=o.computed(()=>Qe1(e.actionRow)),d=o.computed(()=>Ge1(e.previewFormat,e.format,a())),h=o.computed(()=>Ke1(e.textInput)),m=o.computed(()=>Je1(e.inline)),v=o.computed(()=>e31(e.config)),p=o.computed(()=>t31(e.highlight)),g=o.computed(()=>a31(e.weekNumbers)),y=o.computed(()=>n31(e.timezone,e.emitTimezone)),x=o.computed(()=>s31(e.multiDates,e.multiDatesLimit)),C=o.computed(()=>i31(e.minDate,e.maxDate,e.disabledDates,e.allowedDates,p.value,e.markers,y.value)),b=o.computed(()=>r31(e.range,{minMaxRawRange:!1,maxRange:e.maxRange,minRange:e.minRange,noDisabledRange:e.noDisabledRange,showLastInRange:e.showLastInRange,partialRange:e.partialRange,disableTimeRangeValidation:e.disableTimeRangeValidation,autoRange:e.autoRange,fixedStart:e.fixedStart,fixedEnd:e.fixedEnd}));return{defaultedTransitions:f,defaultedMultiCalendars:c,defaultedStartTime:i,defaultedAriaLabels:s,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:m,defaultedConfig:v,defaultedHighlight:p,defaultedWeekNumbers:g,defaultedRange:b,propDates:C,defaultedTz:y,defaultedMultiDates:x,getDefaultPattern:a,getDefaultStartTime:n}},o31=(e,t,a)=>{const r=o.ref(),{defaultedTextInput:n,defaultedRange:c,defaultedTz:i,defaultedMultiDates:s,getDefaultPattern:l}=re(t),f=o.ref(""),u=o.toRef(t,"format"),d=o.toRef(t,"formatLocale");o.watch(r,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",r.value,E(!0))},{deep:!0}),o.watch(c,(I,a1)=>{I.enabled!==a1.enabled&&(r.value=null)}),o.watch(u,()=>{e1()});const h=I=>i.value.timezone&&i.value.convertModel?F4(I,i.value.timezone):I,m=I=>{if(i.value.timezone&&i.value.convertModel){const a1=Ve1(i.value.timezone);return A11(I,a1)}return I},v=(I,a1,n1=!1)=>ub(I,t.format,t.formatLocale,n.value.rangeSeparator,t.modelAuto,a1??l(),n1),p=I=>I?t.modelType?G(I):{hours:wt(I),minutes:h0(I),seconds:t.enableSeconds?na(I):0}:null,g=I=>t.modelType?G(I):{month:o2(I),year:n2(I)},y=I=>Array.isArray(I)?s.value.enabled?I.map(a1=>x(a1,N4(A1(),a1))):w8(()=>[N4(A1(),I[0]),I[1]?N4(A1(),I[1]):L6(c.value.partialRange)],c.value.enabled):N4(A1(),+I),x=(I,a1)=>(typeof I=="string"||typeof I=="number")&&t.modelType?Y(I):a1,C=I=>Array.isArray(I)?[x(I[0],n0(null,+I[0].hours,+I[0].minutes,I[0].seconds)),x(I[1],n0(null,+I[1].hours,+I[1].minutes,I[1].seconds))]:x(I,n0(null,I.hours,I.minutes,I.seconds)),b=I=>{const a1=N2(A1(),{date:1});return Array.isArray(I)?s.value.enabled?I.map(n1=>x(n1,dt(a1,+n1.month,+n1.year))):w8(()=>[x(I[0],dt(a1,+I[0].month,+I[0].year)),x(I[1],I[1]?dt(a1,+I[1].month,+I[1].year):L6(c.value.partialRange))],c.value.enabled):x(I,dt(a1,+I.month,+I.year))},M=I=>{if(Array.isArray(I))return I.map(a1=>Y(a1));throw new Error(Il.dateArr("multi-dates"))},w=I=>{if(Array.isArray(I)&&c.value.enabled){const a1=I[0],n1=I[1];return[A1(Array.isArray(a1)?a1[0]:null),A1(Array.isArray(n1)?n1[0]:null)]}return A1(I[0])},z=I=>t.modelAuto?Array.isArray(I)?[Y(I[0]),Y(I[1])]:t.autoApply?[Y(I)]:[Y(I),null]:Array.isArray(I)?w8(()=>I[1]?[Y(I[0]),I[1]?Y(I[1]):L6(c.value.partialRange)]:[Y(I[0])],c.value.enabled):Y(I),H=()=>{Array.isArray(r.value)&&c.value.enabled&&r.value.length===1&&r.value.push(L6(c.value.partialRange))},A=()=>{const I=r.value;return[G(I[0]),I[1]?G(I[1]):L6(c.value.partialRange)]},V=()=>r.value[1]?A():G(Te(r.value[0])),k=()=>(r.value||[]).map(I=>G(I)),_=(I=!1)=>(I||H(),t.modelAuto?V():s.value.enabled?k():Array.isArray(r.value)?w8(()=>A(),c.value.enabled):G(Te(r.value))),N=I=>!I||Array.isArray(I)&&!I.length?null:t.timePicker?C(Te(I)):t.monthPicker?b(Te(I)):t.yearPicker?y(Te(I)):s.value.enabled?M(Te(I)):t.weekPicker?w(Te(I)):z(Te(I)),q=I=>{const a1=N(I);O7(Te(a1))?(r.value=Te(a1),e1()):(r.value=null,f.value="")},S=()=>{const I=a1=>B4(a1,n.value.format);return`${I(r.value[0])} ${n.value.rangeSeparator} ${r.value[1]?I(r.value[1]):""}`},B=()=>a.value&&r.value?Array.isArray(r.value)?S():B4(r.value,n.value.format):v(r.value),F=()=>r.value?s.value.enabled?r.value.map(I=>v(I)).join("; "):n.value.enabled&&typeof n.value.format=="string"?B():v(r.value):"",e1=()=>{!t.format||typeof t.format=="string"||n.value.enabled&&typeof n.value.format=="string"?f.value=F():f.value=t.format(r.value)},Y=I=>{if(t.utc){const a1=new Date(I);return t.utc==="preserve"?new Date(a1.getTime()+a1.getTimezoneOffset()*6e4):a1}return t.modelType?Le1.includes(t.modelType)?h(new Date(I)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?h(N7(I,l(),new Date,{locale:d.value})):h(N7(I,t.modelType,new Date,{locale:d.value})):h(new Date(I))},G=I=>I?t.utc?Re1(I,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+m(I):t.modelType==="iso"?m(I).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?v(m(I)):v(m(I),t.modelType,!0):m(I):"",O=(I,a1=!1,n1=!1)=>{if(n1)return I;if(e("update:model-value",I),i.value.emitTimezone&&a1){const t1=Array.isArray(I)?I.map(d1=>F4(Te(d1),i.value.emitTimezone)):F4(Te(I),i.value.emitTimezone);e("update:model-timezone-value",t1)}},T=I=>Array.isArray(r.value)?s.value.enabled?r.value.map(a1=>I(a1)):[I(r.value[0]),r.value[1]?I(r.value[1]):L6(c.value.partialRange)]:I(Te(r.value)),L=()=>{if(Array.isArray(r.value)){const I=ct(r.value[0],t.weekStart),a1=r.value[1]?ct(r.value[1],t.weekStart):[];return[I.map(n1=>A1(n1)),a1.map(n1=>A1(n1))]}return ct(r.value,t.weekStart).map(I=>A1(I))},W=(I,a1)=>O(Te(T(I)),!1,a1),j=I=>{const a1=L();return I?a1:e("update:model-value",L())},E=(I=!1)=>(I||e1(),t.monthPicker?W(g,I):t.timePicker?W(p,I):t.yearPicker?W(n2,I):t.weekPicker?j(I):O(_(I),!0,I));return{inputValue:f,internalModelValue:r,checkBeforeEmit:()=>r.value?c.value.enabled?c.value.partialRange?r.value.length>=1:r.value.length===2:!!r.value:!1,parseExternalModelValue:q,formatInputValue:e1,emitModelValue:E}},l31=(e,t)=>{const{defaultedFilters:a,propDates:r}=re(e),{validateMonthYearInRange:n}=b0(e),c=(u,d)=>{let h=u;return a.value.months.includes(o2(h))?(h=d?f4(u,1):ia(u,1),c(h,d)):h},i=(u,d)=>{let h=u;return a.value.years.includes(n2(h))?(h=d?kl(u,1):Jx(u,1),i(h,d)):h},s=(u,d=!1)=>{const h=N2(A1(),{month:e.month,year:e.year});let m=u?f4(h,1):ia(h,1);e.disableYearSelect&&(m=N4(m,e.year));let v=o2(m),p=n2(m);a.value.months.includes(v)&&(m=c(m,u),v=o2(m),p=n2(m)),a.value.years.includes(p)&&(m=i(m,u),p=n2(m)),n(v,p,u,e.preventMinMaxNavigation)&&l(v,p,d)},l=(u,d,h)=>{t("update-month-year",{month:u,year:d,fromNav:h})},f=o.computed(()=>u=>fb(N2(A1(),{month:e.month,year:e.year}),r.value.maxDate,r.value.minDate,e.preventMinMaxNavigation,u));return{handleMonthYearChange:s,isDisabled:f,updateMonthYear:l}};var E6=(e=>(e.center="center",e.left="left",e.right="right",e))(E6||{});const f31=({menuRef:e,menuRefInner:t,inputRef:a,pickerWrapperRef:r,inline:n,emit:c,props:i,slots:s})=>{const l=o.ref({}),f=o.ref(!1),u=o.ref({top:"0",left:"0"}),d=o.ref(!1),h=o.toRef(i,"teleportCenter");o.watch(h,()=>{u.value=JSON.parse(JSON.stringify({})),b()});const m=S=>{if(i.teleport){const B=S.getBoundingClientRect();return{left:B.left+window.scrollX,top:B.top+window.scrollY}}return{top:0,left:0}},v=(S,B)=>{u.value.left=`${S+B-l.value.width}px`},p=S=>{u.value.left=`${S}px`},g=(S,B)=>{i.position===E6.left&&p(S),i.position===E6.right&&v(S,B),i.position===E6.center&&(u.value.left=`${S+B/2-l.value.width/2}px`)},y=S=>{const{width:B,height:F}=S.getBoundingClientRect(),{top:e1,left:Y}=i.altPosition?i.altPosition(S):m(S);return{top:+e1,left:+Y,width:B,height:F}},x=()=>{u.value.left="50%",u.value.top="50%",u.value.transform="translate(-50%, -50%)",u.value.position="fixed",delete u.value.opacity},C=()=>{const S=ke(a),{top:B,left:F,transform:e1}=i.altPosition(S);u.value={top:`${B}px`,left:`${F}px`,transform:e1??""}},b=(S=!0)=>{var B;if(!n.value.enabled){if(h.value)return x();if(i.altPosition!==null)return C();if(S){const F=i.teleport?(B=t.value)==null?void 0:B.$el:e.value;F&&(l.value=F.getBoundingClientRect()),c("recalculate-position")}return k()}},M=({inputEl:S,left:B,width:F})=>{window.screen.width>768&&!f.value&&g(B,F),H(S)},w=S=>{const{top:B,left:F,height:e1,width:Y}=y(S);u.value.top=`${e1+B+ +i.offset}px`,d.value=!1,f.value||(u.value.left=`${F+Y/2-l.value.width/2}px`),M({inputEl:S,left:F,width:Y})},z=S=>{const{top:B,left:F,width:e1}=y(S);u.value.top=`${B-+i.offset-l.value.height}px`,d.value=!0,M({inputEl:S,left:F,width:e1})},H=S=>{if(i.autoPosition){const{left:B,width:F}=y(S),{left:e1,right:Y}=l.value;if(!f.value){if(Math.abs(e1)!==Math.abs(Y)){if(e1<=0)return f.value=!0,p(B);if(Y>=document.documentElement.clientWidth)return f.value=!0,v(B,F)}return g(B,F)}}},A=()=>{const S=ke(a);if(S){const{height:B}=l.value,{top:F,height:e1}=S.getBoundingClientRect(),Y=window.innerHeight-F-e1,G=F;return B<=Y?O0.bottom:B>Y&&B<=G?O0.top:Y>=G?O0.bottom:O0.top}return O0.bottom},V=S=>A()===O0.bottom?w(S):z(S),k=()=>{const S=ke(a);if(S)return i.autoPosition?V(S):w(S)},_=function(S){if(S){const B=S.scrollHeight>S.clientHeight,F=window.getComputedStyle(S).overflowY.indexOf("hidden")!==-1;return B&&!F}return!0},N=function(S){return!S||S===document.body||S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:_(S)?S:N(S.assignedSlot?S.assignedSlot.parentNode:S.parentNode)},q=S=>{if(S)switch(i.position){case E6.left:return{left:0,transform:"translateX(0)"};case E6.right:return{left:`${S.width}px`,transform:"translateX(-100%)"};default:return{left:`${S.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:d,menuStyle:u,xCorrect:f,setMenuPosition:b,getScrollableParent:N,shadowRender:(S,B)=>{var F,e1,Y;const G=document.createElement("div"),O=(F=ke(a))==null?void 0:F.getBoundingClientRect();G.setAttribute("id","dp--temp-container");const T=(e1=r.value)!=null&&e1.clientWidth?r.value:document.body;T.append(G);const L=q(O),W=o.h(S,{...B,shadow:!0,style:{opacity:0,position:"absolute",...L}},Object.fromEntries(Object.keys(s).filter(j=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(j)).map(j=>[j,s[j]])));o.render(W,G),l.value=(Y=W.el)==null?void 0:Y.getBoundingClientRect(),o.render(null,G),T.removeChild(G)}}},Dt=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]}],u31=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],d31={all:()=>Dt,monthYear:()=>Dt.filter(e=>e.use.includes("month-year")),input:()=>u31,timePicker:()=>Dt.filter(e=>e.use.includes("time")),action:()=>Dt.filter(e=>e.use.includes("action")),calendar:()=>Dt.filter(e=>e.use.includes("calendar")),menu:()=>Dt.filter(e=>e.use.includes("menu")),shared:()=>Dt.filter(e=>e.use.includes("shared")),yearMode:()=>Dt.filter(e=>e.use.includes("year-mode"))},z3=(e,t,a)=>{const r=[];return d31[t]().forEach(n=>{e[n.name]&&r.push(n.name)}),a!=null&&a.length&&a.forEach(n=>{n.slot&&r.push(n.slot)}),r},Tn=e=>{const t=o.computed(()=>r=>e.value?r?e.value.open:e.value.close:""),a=o.computed(()=>r=>e.value?r?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:a}},En=(e,t)=>{const{defaultedRange:a,defaultedTz:r}=re(e),n=A1(F4(A1(),r.value.timezone)),c=o.ref([{month:o2(n),year:n2(n)}]),i=d=>{const h={hours:wt(n),minutes:h0(n),seconds:0};return a.value.enabled?[h[d],h[d]]:h[d]},s=o.reactive({hours:i("hours"),minutes:i("minutes"),seconds:i("seconds")});o.watch(a,(d,h)=>{d.enabled!==h.enabled&&(s.hours=i("hours"),s.minutes=i("minutes"),s.seconds=i("seconds"))},{deep:!0});const l=o.computed({get:()=>e.internalModelValue,set:d=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",d)}}),f=o.computed(()=>d=>c.value[d]?c.value[d].month:0),u=o.computed(()=>d=>c.value[d]?c.value[d].year:0);return{calendars:c,time:s,modelValue:l,month:f,year:u,today:n}},h31=(e,t)=>{const{defaultedMultiCalendars:a,defaultedMultiDates:r,defaultedHighlight:n,defaultedTz:c,propDates:i,defaultedRange:s}=re(t),{isDisabled:l}=b0(t),f=o.ref(null),u=o.ref(F4(new Date,c.value.timezone)),d=L=>{!L.current&&t.hideOffsetDates||(f.value=L.value)},h=()=>{f.value=null},m=L=>Array.isArray(e.value)&&s.value.enabled&&e.value[0]&&f.value?L?me(f.value,e.value[0]):ne(f.value,e.value[0]):!0,v=(L,W)=>{const j=()=>e.value?W?e.value[0]||null:e.value[1]:null,E=e.value&&Array.isArray(e.value)?j():null;return l2(A1(L.value),E)},p=L=>{const W=Array.isArray(e.value)?e.value[0]:null;return L?!ne(f.value??null,W):!0},g=(L,W=!0)=>(s.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!L.current?!1:l2(A1(L.value),e.value[W?0:1]):s.value.enabled?v(L,W)&&p(W)||l2(L.value,Array.isArray(e.value)?e.value[0]:null)&&m(W):!1,y=(L,W)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const j=l2(L.value,f.value);return W?me(e.value[0],L.value)&&j:ne(e.value[0],L.value)&&j}return!1},x=L=>!e.value||t.hideOffsetDates&&!L.current?!1:s.value.enabled?t.modelAuto&&Array.isArray(e.value)?l2(L.value,e.value[0]?e.value[0]:u.value):!1:r.value.enabled&&Array.isArray(e.value)?e.value.some(W=>l2(W,L.value)):l2(L.value,e.value?e.value:u.value),C=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){if(t.hideOffsetDates&&!L.current)return!1;const W=J3(f.value,+s.value.autoRange),j=ct(A1(f.value),t.weekStart);return t.weekPicker?l2(j[1],A1(L.value)):l2(W,A1(L.value))}return!1}return!1},b=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){const W=J3(f.value,+s.value.autoRange);if(t.hideOffsetDates&&!L.current)return!1;const j=ct(A1(f.value),t.weekStart);return t.weekPicker?me(L.value,j[0])&&ne(L.value,j[1]):me(L.value,f.value)&&ne(L.value,W)}return!1}return!1},M=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){if(t.hideOffsetDates&&!L.current)return!1;const W=ct(A1(f.value),t.weekStart);return t.weekPicker?l2(W[0],L.value):l2(f.value,L.value)}return!1}return!1},w=L=>P5(e.value,f.value,L.value),z=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,H=()=>t.modelAuto?rb(t.internalModelValue):!0,A=L=>{if(t.weekPicker)return!1;const W=s.value.enabled?!g(L)&&!g(L,!1):!0;return!l(L.value)&&!x(L)&&!(!L.current&&t.hideOffsetDates)&&W},V=L=>s.value.enabled?t.modelAuto?z()&&x(L):!1:x(L),k=L=>n.value?Be1(L.value,i.value.highlight):!1,_=L=>{const W=l(L.value);return W&&(typeof n.value=="function"?!n.value(L.value,W):!n.value.options.highlightDisabled)},N=L=>{var W;return typeof n.value=="function"?n.value(L.value):(W=n.value.weekdays)==null?void 0:W.includes(L.value.getDay())},q=L=>(s.value.enabled||t.weekPicker)&&(!(a.value.count>0)||L.current)&&H()&&!(!L.current&&t.hideOffsetDates)&&!x(L)?w(L):!1,S=L=>{const{isRangeStart:W,isRangeEnd:j}=Y(L),E=s.value.enabled?W||j:!1;return{dp__cell_offset:!L.current,dp__pointer:!t.disabled&&!(!L.current&&t.hideOffsetDates)&&!l(L.value),dp__cell_disabled:l(L.value),dp__cell_highlight:!_(L)&&(k(L)||N(L))&&!V(L)&&!E&&!M(L)&&!(q(L)&&t.weekPicker)&&!j,dp__cell_highlight_active:!_(L)&&(k(L)||N(L))&&V(L),dp__today:!t.noToday&&l2(L.value,u.value)&&L.current,"dp--past":ne(L.value,u.value),"dp--future":me(L.value,u.value)}},B=L=>({dp__active_date:V(L),dp__date_hover:A(L)}),F=L=>{if(e.value&&!Array.isArray(e.value)){const W=ct(e.value,t.weekStart);return{...O(L),dp__range_start:l2(W[0],L.value),dp__range_end:l2(W[1],L.value),dp__range_between_week:me(L.value,W[0])&&ne(L.value,W[1])}}return{...O(L)}},e1=L=>{if(e.value&&Array.isArray(e.value)){const W=ct(e.value[0],t.weekStart),j=e.value[1]?ct(e.value[1],t.weekStart):[];return{...O(L),dp__range_start:l2(W[0],L.value)||l2(j[0],L.value),dp__range_end:l2(W[1],L.value)||l2(j[1],L.value),dp__range_between_week:me(L.value,W[0])&&ne(L.value,W[1])||me(L.value,j[0])&&ne(L.value,j[1]),dp__range_between:me(L.value,W[1])&&ne(L.value,j[0])}}return{...O(L)}},Y=L=>{const W=a.value.count>0?L.current&&g(L)&&H():g(L)&&H(),j=a.value.count>0?L.current&&g(L,!1)&&H():g(L,!1)&&H();return{isRangeStart:W,isRangeEnd:j}},G=L=>{const{isRangeStart:W,isRangeEnd:j}=Y(L);return{dp__range_start:W,dp__range_end:j,dp__range_between:q(L),dp__date_hover:l2(L.value,f.value)&&!W&&!j&&!t.weekPicker,dp__date_hover_start:y(L,!0),dp__date_hover_end:y(L,!1)}},O=L=>({...G(L),dp__cell_auto_range:b(L),dp__cell_auto_range_start:M(L),dp__cell_auto_range_end:C(L)}),T=L=>s.value.enabled?s.value.autoRange?O(L):t.modelAuto?{...B(L),...G(L)}:t.weekPicker?e1(L):G(L):t.weekPicker?F(L):B(L);return{setHoverDate:d,clearHoverDate:h,getDayClassData:L=>t.hideOffsetDates&&!L.current?{}:{...S(L),...T(L),[t.dayClass?t.dayClass(L.value):""]:!0,[t.calendarCellClassName]:!!t.calendarCellClassName}}},b0=e=>{const{defaultedFilters:t,defaultedRange:a,propDates:r,defaultedMultiDates:n}=re(e),c=_=>r.value.disabledDates?typeof r.value.disabledDates=="function"?r.value.disabledDates(A1(_)):!!Uc(_,r.value.disabledDates):!1,i=_=>{const N=r.value.maxDate?me(_,r.value.maxDate):!1,q=r.value.minDate?ne(_,r.value.minDate):!1,S=c(_),B=t.value.months.map(O=>+O).includes(o2(_)),F=e.disabledWeekDays.length?e.disabledWeekDays.some(O=>+O===H21(_)):!1,e1=d(_),Y=n2(_),G=Y<+e.yearRange[0]||Y>+e.yearRange[1];return!(N||q||S||B||G||F||e1)},s=(_,N)=>ne(...Xt(r.value.minDate,_,N))||l2(...Xt(r.value.minDate,_,N)),l=(_,N)=>me(...Xt(r.value.maxDate,_,N))||l2(...Xt(r.value.maxDate,_,N)),f=(_,N,q)=>{let S=!1;return r.value.maxDate&&q&&l(_,N)&&(S=!0),r.value.minDate&&!q&&s(_,N)&&(S=!0),S},u=(_,N,q,S)=>{let B=!1;return S?r.value.minDate&&r.value.maxDate?B=f(_,N,q):(r.value.minDate&&s(_,N)||r.value.maxDate&&l(_,N))&&(B=!0):B=!0,B},d=_=>Array.isArray(r.value.allowedDates)&&!r.value.allowedDates.length?!0:r.value.allowedDates?!Uc(_,r.value.allowedDates):!1,h=_=>!i(_),m=_=>a.value.noDisabledRange?!Fx({start:_[0],end:_[1]}).some(N=>h(N)):!0,v=_=>{if(_){const N=n2(_);return N>=+e.yearRange[0]&&N<=e.yearRange[1]}return!0},p=(_,N)=>!!(Array.isArray(_)&&_[N]&&(a.value.maxRange||a.value.minRange)&&v(_[N])),g=(_,N,q=0)=>{if(p(N,q)&&v(_)){const S=Px(_,N[q]),B=ob(N[q],_),F=B.length===1?0:B.filter(Y=>h(Y)).length,e1=Math.abs(S)-(a.value.minMaxRawRange?0:F);if(a.value.minRange&&a.value.maxRange)return e1>=+a.value.minRange&&e1<=+a.value.maxRange;if(a.value.minRange)return e1>=+a.value.minRange;if(a.value.maxRange)return e1<=+a.value.maxRange}return!0},y=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,x=_=>Array.isArray(_)?[_[0]?is(_[0]):null,_[1]?is(_[1]):null]:is(_),C=(_,N,q)=>_.find(S=>+S.hours===wt(N)&&S.minutes==="*"?!0:+S.minutes===h0(N)&&+S.hours===wt(N))&&q,b=(_,N,q)=>{const[S,B]=_,[F,e1]=N;return!C(S,F,q)&&!C(B,e1,q)&&q},M=(_,N)=>{const q=Array.isArray(N)?N:[N];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?b(e.disabledTimes,q,_):!q.some(S=>C(e.disabledTimes,S,_)):_},w=(_,N)=>{const q=Array.isArray(N)?[X0(N[0]),N[1]?X0(N[1]):void 0]:X0(N),S=!e.disabledTimes(q);return _&&S},z=(_,N)=>e.disabledTimes?Array.isArray(e.disabledTimes)?M(N,_):w(N,_):N,H=_=>{let N=!0;if(!_||y())return!0;const q=!r.value.minDate&&!r.value.maxDate?x(_):_;return(e.maxTime||r.value.maxDate)&&(N=nm(e.maxTime,r.value.maxDate,"max",Te(q),N)),(e.minTime||r.value.minDate)&&(N=nm(e.minTime,r.value.minDate,"min",Te(q),N)),z(_,N)},A=_=>{if(!e.monthPicker)return!0;let N=!0;const q=A1(e4(_));if(r.value.minDate&&r.value.maxDate){const S=A1(e4(r.value.minDate)),B=A1(e4(r.value.maxDate));return me(q,S)&&ne(q,B)||l2(q,S)||l2(q,B)}if(r.value.minDate){const S=A1(e4(r.value.minDate));N=me(q,S)||l2(q,S)}if(r.value.maxDate){const S=A1(e4(r.value.maxDate));N=ne(q,S)||l2(q,S)}return N},V=o.computed(()=>_=>!e.enableTimePicker||e.ignoreTimeValidation?!0:H(_)),k=o.computed(()=>_=>e.monthPicker?Array.isArray(_)&&(a.value.enabled||n.value.enabled)?!_.filter(N=>!A(N)).length:A(_):!0);return{isDisabled:h,validateDate:i,validateMonthYearInRange:u,isDateRangeAllowed:m,checkMinMaxRange:g,isValidTime:H,isTimeValid:V,isMonthValid:k}},B5=()=>{const e=o.computed(()=>(r,n)=>r==null?void 0:r.includes(n)),t=o.computed(()=>(r,n)=>r.count?r.solo?!0:n===0:!0),a=o.computed(()=>(r,n)=>r.count?r.solo?!0:n===r.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:a}},m31=(e,t,a)=>{const r=o.ref(0),n=o.reactive({[G0.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[G0.calendar]:!1,[G0.header]:!1}),c=o.computed(()=>e.monthPicker||e.timePicker),i=d=>{var h;if((h=e.flow)!=null&&h.length){if(!d&&c.value)return u();n[d]=!0,Object.keys(n).filter(m=>!n[m]).length||u()}},s=()=>{var d;(d=e.flow)!=null&&d.length&&r.value!==-1&&(r.value+=1,t("flow-step",r.value),u())},l=()=>{r.value=-1},f=(d,h,...m)=>{var v,p;e.flow[r.value]===d&&a.value&&((p=(v=a.value)[h])==null||p.call(v,...m))},u=()=>{f(Ye.month,"toggleMonthPicker",!0),f(Ye.year,"toggleYearPicker",!0),f(Ye.calendar,"toggleTimePicker",!1,!0),f(Ye.time,"toggleTimePicker",!0,!0);const d=e.flow[r.value];(d===Ye.hours||d===Ye.minutes||d===Ye.seconds)&&f(d,"toggleTimePicker",!0,!0,d)};return{childMount:i,updateFlowStep:s,resetFlow:l,flowStep:r}},F5={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},emitTimezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},calendarClassName:{type:String,default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0}},b4={...F5,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})}},p31={key:1,class:"dp__input_wrap"},v31=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],g31={key:2,class:"dp__clear_icon"},y31=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...F5},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTextInput:c,defaultedAriaLabels:i,defaultedInline:s,defaultedConfig:l,defaultedRange:f,defaultedMultiDates:u,getDefaultPattern:d,getDefaultStartTime:h}=re(n),{checkMinMaxRange:m}=b0(n),v=o.ref(),p=o.ref(null),g=o.ref(!1),y=o.ref(!1),x=o.computed(()=>({dp__pointer:!n.disabled&&!n.readonly&&!c.value.enabled,dp__disabled:n.disabled,dp__input_readonly:!c.value.enabled,dp__input:!0,dp__input_icon_pad:!n.hideInputIcon,dp__input_valid:!!n.state,dp__input_invalid:n.state===!1,dp__input_focus:g.value||n.isMenuOpen,dp__input_reg:!c.value.enabled,[n.inputClassName]:!!n.inputClassName})),C=()=>{r("set-input-date",null),n.clearable&&n.autoApply&&(r("set-empty-date"),v.value=null)},b=B=>{const F=h();return Fe1(B,c.value.format??d(),F??lb({},n.enableSeconds),n.inputValue,y.value,n.formatLocale)},M=B=>{const{rangeSeparator:F}=c.value,[e1,Y]=B.split(`${F}`);if(e1){const G=b(e1.trim()),O=Y?b(Y.trim()):null;if(ca(G,O))return;const T=G&&O?[G,O]:[G];m(O,T,0)&&(v.value=G?T:null)}},w=()=>{y.value=!0},z=B=>{if(f.value.enabled)M(B);else if(u.value.enabled){const F=B.split(";");v.value=F.map(e1=>b(e1.trim())).filter(e1=>e1)}else v.value=b(B)},H=B=>{var F;const e1=typeof B=="string"?B:(F=B.target)==null?void 0:F.value;e1!==""?(c.value.openMenu&&!n.isMenuOpen&&r("open"),z(e1),r("set-input-date",v.value)):C(),y.value=!1,r("update:input-value",e1)},A=B=>{c.value.enabled?(z(B.target.value),c.value.enterSubmit&&O7(v.value)&&n.inputValue!==""?(r("set-input-date",v.value,!0),v.value=null):c.value.enterSubmit&&n.inputValue===""&&(v.value=null,r("clear"))):_(B)},V=B=>{c.value.enabled&&c.value.tabSubmit&&z(B.target.value),c.value.tabSubmit&&O7(v.value)&&n.inputValue!==""?(r("set-input-date",v.value,!0,!0),v.value=null):c.value.tabSubmit&&n.inputValue===""&&(v.value=null,r("clear",!0))},k=()=>{g.value=!0,r("focus"),o.nextTick().then(()=>{var B;c.value.enabled&&c.value.selectOnFocus&&((B=p.value)==null||B.select())})},_=B=>{B.preventDefault(),r0(B,l.value,!0),c.value.enabled&&c.value.openMenu&&!s.value.input&&!n.isMenuOpen?r("open"):c.value.enabled||r("toggle")},N=()=>{r("real-blur"),g.value=!1,(!n.isMenuOpen||s.value.enabled&&s.value.input)&&r("blur"),n.autoApply&&c.value.enabled&&v.value&&!n.isMenuOpen&&(r("set-input-date",v.value),r("select-date"),v.value=null)},q=B=>{r0(B,l.value,!0),r("clear")},S=B=>{if(B.key==="Tab"&&V(B),B.key==="Enter"&&A(B),!c.value.enabled){if(B.code==="Tab")return;B.preventDefault()}};return t({focusInput:()=>{var B;(B=p.value)==null||B.focus({preventScroll:!0})},setParsedDate:B=>{v.value=B}}),(B,F)=>{var e1;return o.openBlock(),o.createElementBlock("div",{onClick:_},[B.$slots.trigger&&!B.$slots["dp-input"]&&!o.unref(s).enabled?o.renderSlot(B.$slots,"trigger",{key:0}):o.createCommentVNode("",!0),!B.$slots.trigger&&(!o.unref(s).enabled||o.unref(s).input)?(o.openBlock(),o.createElementBlock("div",p31,[B.$slots["dp-input"]&&!B.$slots.trigger&&(!o.unref(s).enabled||o.unref(s).enabled&&o.unref(s).input)?o.renderSlot(B.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:H,onEnter:A,onTab:V,onClear:q,onBlur:N,onKeypress:S,onPaste:w,openMenu:()=>B.$emit("open"),closeMenu:()=>B.$emit("close"),toggleMenu:()=>B.$emit("toggle")}):o.createCommentVNode("",!0),B.$slots["dp-input"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("input",{key:1,id:B.uid?`dp-input-${B.uid}`:void 0,ref_key:"inputRef",ref:p,"data-test":"dp-input",name:B.name,class:o.normalizeClass(x.value),inputmode:o.unref(c).enabled?"text":"none",placeholder:B.placeholder,disabled:B.disabled,readonly:B.readonly,required:B.required,value:e.inputValue,autocomplete:B.autocomplete,"aria-label":(e1=o.unref(i))==null?void 0:e1.input,"aria-disabled":B.disabled||void 0,"aria-invalid":B.state===!1?!0:void 0,onInput:H,onBlur:N,onFocus:k,onKeypress:S,onKeydown:S,onPaste:w},null,42,v31)),o.createElementVNode("div",{onClick:F[2]||(F[2]=Y=>r("toggle"))},[B.$slots["input-icon"]&&!B.hideInputIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:F[0]||(F[0]=Y=>r("toggle"))},[o.renderSlot(B.$slots,"input-icon")])):o.createCommentVNode("",!0),!B.$slots["input-icon"]&&!B.hideInputIcon&&!B.$slots["dp-input"]?(o.openBlock(),o.createBlock(o.unref(va),{key:1,class:"dp__input_icon dp__input_icons",onClick:F[1]||(F[1]=Y=>r("toggle"))})):o.createCommentVNode("",!0)]),B.$slots["clear-icon"]&&e.inputValue&&B.clearable&&!B.disabled&&!B.readonly?(o.openBlock(),o.createElementBlock("span",g31,[o.renderSlot(B.$slots,"clear-icon",{clear:q})])):o.createCommentVNode("",!0),B.clearable&&!B.$slots["clear-icon"]&&e.inputValue&&!B.disabled&&!B.readonly?(o.openBlock(),o.createBlock(o.unref(eb),{key:3,class:"dp__clear_icon dp__input_icons","data-test":"clear-icon",onClick:F[3]||(F[3]=o.withModifiers(Y=>q(Y),["prevent"]))})):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)])}}}),x31=["title"],b31=["disabled"],C31=o.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...b4},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const a=t,r=e,{defaultedActionRow:n,defaultedPreviewFormat:c,defaultedMultiCalendars:i,defaultedTextInput:s,defaultedInline:l,defaultedRange:f,defaultedMultiDates:u,getDefaultPattern:d}=re(r),{isTimeValid:h,isMonthValid:m}=b0(r),{buildMatrix:v}=x0(),p=o.ref(null),g=o.ref(null),y=o.ref(!1),x=o.ref({}),C=o.ref(null),b=o.ref(null);o.onMounted(()=>{r.arrowNavigation&&v([ke(p),ke(g)],"actionRow"),M(),window.addEventListener("resize",M)}),o.onUnmounted(()=>{window.removeEventListener("resize",M)});const M=()=>{y.value=!1,setTimeout(()=>{var S,B;const F=(S=C.value)==null?void 0:S.getBoundingClientRect(),e1=(B=b.value)==null?void 0:B.getBoundingClientRect();F&&e1&&(x.value.maxWidth=`${e1.width-F.width-20}px`),y.value=!0},0)},w=o.computed(()=>f.value.enabled&&!f.value.partialRange&&r.internalModelValue?r.internalModelValue.length===2:!0),z=o.computed(()=>!h.value(r.internalModelValue)||!m.value(r.internalModelValue)||!w.value),H=()=>{const S=c.value;return r.timePicker||r.monthPicker,S(Te(r.internalModelValue))},A=()=>{const S=r.internalModelValue;return i.value.count>0?`${V(S[0])} - ${V(S[1])}`:[V(S[0]),V(S[1])]},V=S=>ub(S,c.value,r.formatLocale,s.value.rangeSeparator,r.modelAuto,d()),k=o.computed(()=>!r.internalModelValue||!r.menuMount?"":typeof c.value=="string"?Array.isArray(r.internalModelValue)?r.internalModelValue.length===2&&r.internalModelValue[1]?A():u.value.enabled?r.internalModelValue.map(S=>`${V(S)}`):r.modelAuto?`${V(r.internalModelValue[0])}`:`${V(r.internalModelValue[0])} -`:V(r.internalModelValue):H()),_=()=>u.value.enabled?"; ":" - ",N=o.computed(()=>Array.isArray(k.value)?k.value.join(_()):k.value),q=()=>{h.value(r.internalModelValue)&&m.value(r.internalModelValue)&&w.value?a("select-date"):a("invalid-select")};return(S,B)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"actionRowRef",ref:b,class:"dp__action_row"},[S.$slots["action-row"]?o.renderSlot(S.$slots,"action-row",o.normalizeProps(o.mergeProps({key:0},{internalModelValue:S.internalModelValue,disabled:z.value,selectDate:()=>S.$emit("select-date"),closePicker:()=>S.$emit("close-picker")}))):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(n).showPreview?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__selection_preview",title:N.value,style:o.normalizeStyle(x.value)},[S.$slots["action-preview"]&&y.value?o.renderSlot(S.$slots,"action-preview",{key:0,value:S.internalModelValue}):o.createCommentVNode("",!0),!S.$slots["action-preview"]&&y.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(N.value),1)],64)):o.createCommentVNode("",!0)],12,x31)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"actionBtnContainer",ref:C,class:"dp__action_buttons","data-dp-element":"action-row"},[S.$slots["action-buttons"]?o.renderSlot(S.$slots,"action-buttons",{key:0,value:S.internalModelValue}):o.createCommentVNode("",!0),S.$slots["action-buttons"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[!o.unref(l).enabled&&o.unref(n).showCancel?(o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:p,type:"button",class:"dp__action_button dp__action_cancel",onClick:B[0]||(B[0]=F=>S.$emit("close-picker")),onKeydown:B[1]||(B[1]=F=>o.unref(y3)(F,()=>S.$emit("close-picker")))},o.toDisplayString(S.cancelText),545)):o.createCommentVNode("",!0),o.unref(n).showNow?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:B[2]||(B[2]=F=>S.$emit("select-now")),onKeydown:B[3]||(B[3]=F=>o.unref(y3)(F,()=>S.$emit("select-now")))},o.toDisplayString(S.nowButtonLabel),33)):o.createCommentVNode("",!0),o.unref(n).showSelect?(o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:g,type:"button",class:"dp__action_button dp__action_select",disabled:z.value,"data-test":"select-button",onKeydown:B[4]||(B[4]=F=>o.unref(y3)(F,()=>q())),onClick:q},o.toDisplayString(S.selectText),41,b31)):o.createCommentVNode("",!0)],64))],512)],64))],512))}}),M31={class:"dp__selection_grid_header"},z31=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],w31=["aria-label"],Nn=o.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:a}){const{setSelectionGrid:r,buildMultiLevelMatrix:n,setMonthPicker:c}=x0(),i=a,s=e,{defaultedAriaLabels:l,defaultedTextInput:f,defaultedConfig:u}=re(s),{hideNavigationButtons:d}=B5(),h=o.ref(!1),m=o.ref(null),v=o.ref(null),p=o.ref([]),g=o.ref(),y=o.ref(null),x=o.ref(0),C=o.ref(null);o.onBeforeUpdate(()=>{m.value=null}),o.onMounted(()=>{o.nextTick().then(()=>k()),s.noOverlayFocus||M(),b(!0)}),o.onUnmounted(()=>b(!1));const b=T=>{var L;s.arrowNavigation&&((L=s.headerRefs)!=null&&L.length?c(T):r(T))},M=()=>{var T;const L=ke(v);L&&(f.value.enabled||(m.value?(T=m.value)==null||T.focus({preventScroll:!0}):L.focus({preventScroll:!0})),h.value=L.clientHeight<L.scrollHeight)},w=o.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!s.useRelative,"dp--overlay-relative":s.useRelative})),z=o.computed(()=>s.useRelative?{height:`${s.height}px`,width:"260px"}:void 0),H=o.computed(()=>({dp__overlay_col:!0})),A=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:s.isLast})),V=o.computed(()=>{var T,L;return{dp__overlay_container:!0,dp__container_flex:((T=s.items)==null?void 0:T.length)<=6,dp__container_block:((L=s.items)==null?void 0:L.length)>6}});o.watch(()=>s.items,()=>k(!1),{deep:!0});const k=(T=!0)=>{o.nextTick().then(()=>{const L=ke(m),W=ke(v),j=ke(y),E=ke(C),I=j?j.getBoundingClientRect().height:0;W&&(W.getBoundingClientRect().height?x.value=W.getBoundingClientRect().height-I:x.value=u.value.modeHeight-I),L&&E&&T&&(E.scrollTop=L.offsetTop-E.offsetTop-(x.value/2-L.getBoundingClientRect().height)-I)})},_=T=>{T.disabled||i("selected",T.value)},N=()=>{i("toggle"),i("reset-flow")},q=()=>{s.escClose&&N()},S=(T,L,W,j)=>{T&&((L.active||L.value===s.focusValue)&&(m.value=T),s.arrowNavigation&&(Array.isArray(p.value[W])?p.value[W][j]=T:p.value[W]=[T],B()))},B=()=>{var T,L;const W=(T=s.headerRefs)!=null&&T.length?[s.headerRefs].concat(p.value):p.value.concat([s.skipButtonRef?[]:[y.value]]);n(Te(W),(L=s.headerRefs)!=null&&L.length?"monthPicker":"selectionGrid")},F=T=>{s.arrowNavigation||r0(T,u.value,!0)},e1=T=>{g.value=T,i("hover-value",T)},Y=()=>{if(N(),!s.isLast){const T=Pe1(s.menuWrapRef??null,"action-row");if(T){const L=nb(T);L==null||L.focus()}}},G=T=>{switch(T.key){case te.esc:return q();case te.arrowLeft:return F(T);case te.arrowRight:return F(T);case te.arrowUp:return F(T);case te.arrowDown:return F(T);default:return}},O=T=>{if(T.key===te.enter)return N();if(T.key===te.tab)return Y()};return t({focusGrid:M}),(T,L)=>{var W;return o.openBlock(),o.createElementBlock("div",{ref_key:"gridWrapRef",ref:v,class:o.normalizeClass(w.value),style:o.normalizeStyle(z.value),role:"dialog",tabindex:"0",onKeydown:G},[o.createElementVNode("div",{ref_key:"containerRef",ref:C,class:o.normalizeClass(V.value),role:"grid",style:o.normalizeStyle({"--dp-overlay-height":`${x.value}px`})},[o.createElementVNode("div",M31,[o.renderSlot(T.$slots,"header")]),T.$slots.overlay?o.renderSlot(T.$slots,"overlay",{key:0}):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(T.items,(j,E)=>(o.openBlock(),o.createElementBlock("div",{key:E,class:o.normalizeClass(["dp__overlay_row",{dp__flex_row:T.items.length>=3}]),role:"row"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(j,(I,a1)=>(o.openBlock(),o.createElementBlock("div",{key:I.value,ref_for:!0,ref:n1=>S(n1,I,E,a1),role:"gridcell",class:o.normalizeClass(H.value),"aria-selected":I.active||void 0,"aria-disabled":I.disabled||void 0,tabindex:"0","data-test":I.text,onClick:n1=>_(I),onKeydown:n1=>o.unref(y3)(n1,()=>_(I),!0),onMouseover:n1=>e1(I.value)},[o.createElementVNode("div",{class:o.normalizeClass(I.className)},[T.$slots.item?o.renderSlot(T.$slots,"item",{key:0,item:I}):o.createCommentVNode("",!0),T.$slots.item?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(I.text),1)],64))],2)],42,z31))),128))],2))),128))],6),T.$slots["button-icon"]?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:y,type:"button","aria-label":(W=o.unref(l))==null?void 0:W.toggleOverlay,class:o.normalizeClass(A.value),tabindex:"0",onClick:N,onKeydown:O},[o.renderSlot(T.$slots,"button-icon")],42,w31)),[[o.vShow,!o.unref(d)(T.hideNavigation,T.type)]]):o.createCommentVNode("",!0)],38)}}}),R5=o.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(e){const t=e,a=o.computed(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),r=o.computed(()=>({dp__instance_calendar:t.multiCalendars>0}));return(n,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass({dp__menu_inner:!n.stretch,"dp--menu--inner-stretched":n.stretch,dp__flex_display:n.multiCalendars>0,"dp--flex-display-collapsed":n.collapse})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(i,s)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(r.value)},[o.renderSlot(n.$slots,"default",{instance:i,index:s})],2))),128))],2))}}),_31=["aria-label","aria-disabled"],yr=o.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const a=t,r=o.ref(null);return o.onMounted(()=>a("set-ref",r)),(n,c)=>(o.openBlock(),o.createElementBlock("button",{ref_key:"elRef",ref:r,type:"button",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":n.ariaLabel,"aria-disabled":n.disabled||void 0,onClick:c[0]||(c[0]=i=>n.$emit("activate")),onKeydown:c[1]||(c[1]=i=>o.unref(y3)(i,()=>n.$emit("activate"),!0))},[o.createElementVNode("span",{class:o.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:n.disabled}])},[o.renderSlot(n.$slots,"default")],2)],40,_31))}}),k31={class:"dp--year-mode-picker"},H31=["aria-label","data-test"],mb=o.defineComponent({__name:"YearModePicker",props:{...b4,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const a=t,r=e,{showRightIcon:n,showLeftIcon:c}=B5(),{defaultedConfig:i,defaultedMultiCalendars:s,defaultedAriaLabels:l,defaultedTransitions:f}=re(r),{showTransition:u,transitionName:d}=Tn(f),h=(p=!1,g)=>{a("toggle-year-picker",{flow:p,show:g})},m=p=>{a("year-select",p)},v=(p=!1)=>{a("handle-year",p)};return(p,g)=>{var y,x,C;return o.openBlock(),o.createElementBlock("div",k31,[o.unref(c)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(yr,{key:0,ref:"mpPrevIconRef","aria-label":(y=o.unref(l))==null?void 0:y.prevYear,disabled:e.isDisabled(!1),onActivate:g[0]||(g[0]=b=>v(!1))},{default:o.withCtx(()=>[p.$slots["arrow-left"]?o.renderSlot(p.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),p.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Dl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":(x=o.unref(l))==null?void 0:x.openYearsOverlay,"data-test":`year-mode-btn-${e.instance}`,onClick:g[1]||(g[1]=()=>h(!1)),onKeydown:g[2]||(g[2]=o.withKeys(()=>h(!1),["enter"]))},[p.$slots.year?o.renderSlot(p.$slots,"year",{key:0,year:e.year}):o.createCommentVNode("",!0),p.$slots.year?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(e.year),1)],64))],40,H31),o.unref(n)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(yr,{key:1,ref:"mpNextIconRef","aria-label":(C=o.unref(l))==null?void 0:C.nextYear,disabled:e.isDisabled(!0),onActivate:g[3]||(g[3]=b=>v(!0))},{default:o.withCtx(()=>[p.$slots["arrow-right"]?o.renderSlot(p.$slots,"arrow-right",{key:0}):o.createCommentVNode("",!0),p.$slots["arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ol),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(d)(e.showYearPicker),css:o.unref(u)},{default:o.withCtx(()=>[e.showYearPicker?(o.openBlock(),o.createBlock(Nn,{key:0,items:e.items,"text-input":p.textInput,"esc-close":p.escClose,config:p.config,"is-last":p.autoApply&&!o.unref(i).keepActionRow,"hide-navigation":p.hideNavigation,"aria-labels":p.ariaLabels,type:"year",onToggle:h,onSelected:g[4]||(g[4]=b=>m(b))},o.createSlots({"button-icon":o.withCtx(()=>[p.$slots["calendar-icon"]?o.renderSlot(p.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),p.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(va),{key:1}))]),_:2},[p.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:b})=>[o.renderSlot(p.$slots,"year-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels"])):o.createCommentVNode("",!0)]),_:3},8,["name","css"])])}}}),Wl=(e,t,a)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(r=>l2(e,r))){const r=t.value.filter(n=>!l2(n,e));t.value=r.length?r:null}else(a&&+a>t.value.length||!a)&&t.value.push(e);else t.value=[e]},ql=(e,t,a)=>{let r=e.value?e.value.slice():[];return r.length===2&&r[1]!==null&&(r=[]),r.length?ne(t,r[0])?(r.unshift(t),a("range-start",r[0]),a("range-start",r[1])):(r[1]=t,a("range-end",t)):(r=[t],a("range-start",t)),r},I5=(e,t,a,r)=>{e&&(e[0]&&e[1]&&a&&t("auto-apply"),e[0]&&!e[1]&&r&&a&&t("auto-apply"))},pb=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>F4(A1(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=F4(A1(e.value),e.timezone))},vb=(e,t,a,r)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&r.value.partialRange)?r.value.fixedStart&&(me(e,t.value[0])||l2(e,t.value[0]))?[t.value[0],e]:r.value.fixedEnd&&(ne(e,t.value[1])||l2(e,t.value[1]))?[e,t.value[1]]:(a("invalid-fixed-range",e),t.value):[],gb=({multiCalendars:e,highlight:t,propDates:a,calendars:r,modelValue:n,props:c,filters:i,year:s,month:l,emit:f})=>{const u=o.computed(()=>Rl(c.yearRange,c.locale,c.reverseYears)),d=o.ref([!1]),h=o.computed(()=>(w,z)=>{const H=N2(e4(new Date),{month:l.value(w),year:s.value(w)}),A=z?Rx(H):Hl(H);return fb(A,a.value.maxDate,a.value.minDate,c.preventMinMaxNavigation,z)}),m=()=>{for(let w=0;w<e.value.count;w++)if(w===0)r.value[w]=r.value[0];else{const z=N2(A1(),r.value[w-1]);r.value[w]={month:o2(z),year:n2(kl(z,1))}}},v=w=>{if(!w)return m();const z=N2(A1(),r.value[w]);return r.value[0].year=n2(Jx(z,e.value.count-1)),m()},p=w=>c.focusStartDate?w[0]:w[1]?w[1]:w[0],g=()=>{if(n.value){const w=Array.isArray(n.value)?p(n.value):n.value;r.value[0]={month:o2(w),year:n2(w)}}};o.onMounted(()=>{g(),e.value.count&&m()});const y=(w,z)=>{r.value[z].year=w,f("update-month-year",{instance:z,year:w,month:r.value[z].month}),e.value.count&&!e.value.solo&&v(z)},x=o.computed(()=>w=>sa(u.value,z=>{var H;const A=s.value(w)===z.value,V=an(z.value,oa(a.value.minDate),oa(a.value.maxDate))||((H=i.value.years)==null?void 0:H.includes(s.value(w))),k=Ul(t.value,z.value);return{active:A,disabled:V,highlighted:k}})),C=(w,z)=>{y(w,z),M(z)},b=(w,z=!1)=>{if(!h.value(w,z)){const H=z?s.value(w)+1:s.value(w)-1;y(H,w)}},M=(w,z=!1,H)=>{z||f("reset-flow"),H!==void 0?d.value[w]=H:d.value[w]=!d.value[w],d.value[w]?f("overlay-toggle",{open:!0,overlay:Ye.year}):(f("overlay-closed"),f("overlay-toggle",{open:!1,overlay:Ye.year}))};return{isDisabled:h,groupedYears:x,showYearPicker:d,selectYear:y,toggleYearPicker:M,handleYearSelect:C,handleYear:b}},V31=(e,t)=>{const{defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:c,defaultedRange:i,defaultedHighlight:s,propDates:l,defaultedTz:f,defaultedFilters:u,defaultedMultiDates:d}=re(e),{modelValue:h,year:m,month:v,calendars:p}=En(e,t),g=o.computed(()=>ab(e.formatLocale,e.locale,e.monthNameFormat)),y=o.ref(null),{checkMinMaxRange:x}=b0(e),{selectYear:C,groupedYears:b,showYearPicker:M,toggleYearPicker:w,handleYearSelect:z,handleYear:H,isDisabled:A}=gb({modelValue:h,multiCalendars:a,highlight:s,calendars:p,year:m,propDates:l,month:v,filters:u,props:e,emit:t});o.onMounted(()=>{e.startDate&&(h.value&&e.focusStartDate||!h.value)&&C(n2(A1(e.startDate)),0)});const V=L=>L?{month:o2(L),year:n2(L)}:{month:null,year:null},k=()=>h.value?Array.isArray(h.value)?h.value.map(L=>V(L)):V(h.value):V(),_=(L,W)=>{const j=p.value[L],E=k();return Array.isArray(E)?E.some(I=>I.year===(j==null?void 0:j.year)&&I.month===W):(j==null?void 0:j.year)===E.year&&W===E.month},N=(L,W,j)=>{var E,I;const a1=k();return Array.isArray(a1)?m.value(W)===((E=a1[j])==null?void 0:E.year)&&L===((I=a1[j])==null?void 0:I.month):!1},q=(L,W)=>{if(i.value.enabled){const j=k();if(Array.isArray(h.value)&&Array.isArray(j)){const E=N(L,W,0)||N(L,W,1),I=dt(e4(A1()),L,m.value(W));return P5(h.value,y.value,I)&&!E}return!1}return!1},S=o.computed(()=>L=>sa(g.value,W=>{var j;const E=_(L,W.value),I=an(W.value,ib(m.value(L),l.value.minDate),sb(m.value(L),l.value.maxDate))||qe1(l.value.disabledDates,m.value(L)).includes(W.value)||((j=u.value.months)==null?void 0:j.includes(W.value)),a1=q(W.value,L),n1=db(s.value,W.value,m.value(L));return{active:E,disabled:I,isBetween:a1,highlighted:n1}})),B=(L,W)=>dt(e4(A1()),L,m.value(W)),F=(L,W)=>{const j=h.value?h.value:e4(new Date);h.value=dt(j,L,m.value(W)),t("auto-apply"),t("update-flow-step")},e1=(L,W)=>{const j=B(L,W);i.value.fixedEnd||i.value.fixedStart?h.value=vb(j,h,t,i):h.value?x(j,h.value)&&(h.value=ql(h,B(L,W),t)):h.value=[B(L,W)],o.nextTick().then(()=>{I5(h.value,t,e.autoApply,e.modelAuto)})},Y=(L,W)=>{Wl(B(L,W),h,d.value.limit),t("auto-apply",!0)},G=(L,W)=>(p.value[W].month=L,T(W,p.value[W].year,L),d.value.enabled?Y(L,W):i.value.enabled?e1(L,W):F(L,W)),O=(L,W)=>{C(L,W),T(W,L,null)},T=(L,W,j)=>{let E=j;if(!E&&E!==0){const I=k();E=Array.isArray(I)?I[L].month:I.month}t("update-month-year",{instance:L,year:W,month:E})};return{groupedMonths:S,groupedYears:b,year:m,isDisabled:A,defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:c,showYearPicker:M,modelValue:h,presetDate:(L,W)=>{pb({value:L,modelValue:h,range:i.value.enabled,timezone:W?void 0:f.value.timezone}),t("auto-apply")},setHoverDate:(L,W)=>{y.value=B(L,W)},selectMonth:G,selectYear:O,toggleYearPicker:w,handleYearSelect:z,handleYear:H,getModelMonthYear:k}},L31=o.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...b4},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=o.useSlots(),c=z3(n,"yearMode"),i=e;o.onMounted(()=>{i.shadow||r("mount",null)});const{groupedMonths:s,groupedYears:l,year:f,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:m,modelValue:v,presetDate:p,setHoverDate:g,selectMonth:y,selectYear:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M,getModelMonthYear:w}=V31(i,r);return t({getSidebarProps:()=>({modelValue:v,year:f,getModelMonthYear:w,selectMonth:y,selectYear:x,handleYear:M}),presetDate:p,toggleYearPicker:z=>C(0,z)}),(z,H)=>(o.openBlock(),o.createBlock(R5,{"multi-calendars":o.unref(d).count,collapse:z.collapse,stretch:""},{default:o.withCtx(({instance:A})=>[z.$slots["top-extra"]?o.renderSlot(z.$slots,"top-extra",{key:0,value:z.internalModelValue}):o.createCommentVNode("",!0),z.$slots["month-year"]?o.renderSlot(z.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{year:o.unref(f),months:o.unref(s)(A),years:o.unref(l)(A),selectMonth:o.unref(y),selectYear:o.unref(x),instance:A}))):(o.openBlock(),o.createBlock(Nn,{key:2,items:o.unref(s)(A),"arrow-navigation":z.arrowNavigation,"is-last":z.autoApply&&!o.unref(h).keepActionRow,"esc-close":z.escClose,height:o.unref(h).modeHeight,config:z.config,"no-overlay-focus":!!(z.noOverlayFocus||z.textInput),"use-relative":"",type:"month",onSelected:V=>o.unref(y)(V,A),onHoverValue:V=>o.unref(g)(V,A)},o.createSlots({header:o.withCtx(()=>[o.createVNode(mb,o.mergeProps(z.$props,{items:o.unref(l)(A),instance:A,"show-year-picker":o.unref(m)[A],year:o.unref(f)(A),"is-disabled":V=>o.unref(u)(A,V),onHandleYear:V=>o.unref(M)(A,V),onYearSelect:V=>o.unref(b)(V,A),onToggleYearPicker:V=>o.unref(C)(A,V==null?void 0:V.flow,V==null?void 0:V.show)}),o.createSlots({_:2},[o.renderList(o.unref(c),(V,k)=>({name:V,fn:o.withCtx(_=>[o.renderSlot(z.$slots,V,o.normalizeProps(o.guardReactiveProps(_)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[z.$slots["month-overlay-value"]?{name:"item",fn:o.withCtx(({item:V})=>[o.renderSlot(z.$slots,"month-overlay-value",{text:V.text,value:V.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),S31=(e,t)=>{const{modelValue:a}=En(e,t),r=o.ref(null),{defaultedHighlight:n,defaultedMultiDates:c,defaultedFilters:i,defaultedRange:s,propDates:l}=re(e),f=o.ref();o.onMounted(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(f.value=n2(A1(e.startDate)))});const u=v=>Array.isArray(a.value)?a.value.some(p=>n2(p)===v):a.value?n2(a.value)===v:!1,d=v=>s.value.enabled&&Array.isArray(a.value)?P5(a.value,r.value,m(v)):!1,h=o.computed(()=>sa(Rl(e.yearRange,e.locale,e.reverseYears),v=>{const p=u(v.value),g=an(v.value,oa(l.value.minDate),oa(l.value.maxDate))||i.value.years.includes(v.value),y=d(v.value)&&!p,x=Ul(n.value,v.value);return{active:p,disabled:g,isBetween:y,highlighted:x}})),m=v=>N4(e4(new Date),v);return{groupedYears:h,modelValue:a,focusYear:f,setHoverValue:v=>{r.value=N4(e4(new Date),v)},selectYear:v=>{var p;if(t("update-month-year",{instance:0,year:v}),c.value.enabled)return a.value?Array.isArray(a.value)&&(((p=a.value)==null?void 0:p.map(g=>n2(g))).includes(v)?a.value=a.value.filter(g=>n2(g)!==v):a.value.push(N4(k3(A1()),v))):a.value=[N4(k3(A1()),v)],t("auto-apply",!0);s.value.enabled?(a.value=ql(a,m(v),t),o.nextTick().then(()=>{I5(a.value,t,e.autoApply,e.modelAuto)})):(a.value=m(v),t("auto-apply"))}}},A31=o.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...b4},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,{groupedYears:c,modelValue:i,focusYear:s,selectYear:l,setHoverValue:f}=S31(n,r),{defaultedConfig:u}=re(n);return t({getSidebarProps:()=>({modelValue:i,selectYear:l})}),(d,h)=>(o.openBlock(),o.createElementBlock("div",null,[d.$slots["top-extra"]?o.renderSlot(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):o.createCommentVNode("",!0),d.$slots["month-year"]?o.renderSlot(d.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{years:o.unref(c),selectYear:o.unref(l)}))):(o.openBlock(),o.createBlock(Nn,{key:2,items:o.unref(c),"is-last":d.autoApply&&!o.unref(u).keepActionRow,height:o.unref(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":o.unref(s),type:"year","use-relative":"",onSelected:o.unref(l),onHoverValue:o.unref(f)},o.createSlots({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:m})=>[o.renderSlot(d.$slots,"year-overlay-value",{text:m.text,value:m.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),T31={key:0,class:"dp__time_input"},E31=["data-test","aria-label","onKeydown","onClick","onMousedown"],N31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),D31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),O31=["aria-label","disabled","data-test","onKeydown","onClick"],P31=["data-test","aria-label","onKeydown","onClick","onMousedown"],B31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),F31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),R31={key:0},I31=["aria-label"],$31=o.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...b4},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{setTimePickerElements:c,setTimePickerBackRef:i}=x0(),{defaultedAriaLabels:s,defaultedTransitions:l,defaultedFilters:f,defaultedConfig:u,defaultedRange:d}=re(n),{transitionName:h,showTransition:m}=Tn(l),v=o.reactive({hours:!1,minutes:!1,seconds:!1}),p=o.ref("AM"),g=o.ref(null),y=o.ref([]),x=o.ref();o.onMounted(()=>{r("mounted")});const C=R=>N2(new Date,{hours:R.hours,minutes:R.minutes,seconds:n.enableSeconds?R.seconds:0,milliseconds:0}),b=o.computed(()=>R=>B(R,n[R])||w(R,n[R])),M=o.computed(()=>({hours:n.hours,minutes:n.minutes,seconds:n.seconds})),w=(R,p1)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!n.validateTime(R,p1):!1,z=(R,p1)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const z1=p1?+n[`${R}Increment`]:-+n[`${R}Increment`],h1=n[R]+z1;return!n.validateTime(R,h1)}return!1},H=o.computed(()=>R=>!O(+n[R]+ +n[`${R}Increment`],R)||z(R,!0)),A=o.computed(()=>R=>!O(+n[R]-+n[`${R}Increment`],R)||z(R,!1)),V=(R,p1)=>Ex(N2(A1(),R),p1),k=(R,p1)=>ke1(N2(A1(),R),p1),_=o.computed(()=>({dp__time_col:!0,dp__time_col_block:!n.timePickerInline,dp__time_col_reg_block:!n.enableSeconds&&n.is24&&!n.timePickerInline,dp__time_col_reg_inline:!n.enableSeconds&&n.is24&&n.timePickerInline,dp__time_col_reg_with_button:!n.enableSeconds&&!n.is24,dp__time_col_sec:n.enableSeconds&&n.is24,dp__time_col_sec_with_button:n.enableSeconds&&!n.is24})),N=o.computed(()=>{const R=[{type:"hours"}];return n.enableMinutes&&R.push({type:"",separator:!0},{type:"minutes"}),n.enableSeconds&&R.push({type:"",separator:!0},{type:"seconds"}),R}),q=o.computed(()=>N.value.filter(R=>!R.separator)),S=o.computed(()=>R=>{if(R==="hours"){const p1=I(+n.hours);return{text:p1<10?`0${p1}`:`${p1}`,value:p1}}return{text:n[R]<10?`0${n[R]}`:`${n[R]}`,value:n[R]}}),B=(R,p1)=>{var z1;if(!n.disabledTimesConfig)return!1;const h1=n.disabledTimesConfig(n.order,R==="hours"?p1:void 0);return h1[R]?!!((z1=h1[R])!=null&&z1.includes(p1)):!0},F=(R,p1)=>p1!=="hours"||p.value==="AM"?R:R+12,e1=R=>{const p1=n.is24?24:12,z1=R==="hours"?p1:60,h1=+n[`${R}GridIncrement`],l1=R==="hours"&&!n.is24?h1:0,f1=[];for(let u1=l1;u1<z1;u1+=h1)f1.push({value:n.is24?u1:F(u1,R),text:u1<10?`0${u1}`:`${u1}`});return R==="hours"&&!n.is24&&f1.unshift({value:p.value==="PM"?12:0,text:"12"}),sa(f1,u1=>({active:!1,disabled:f.value.times[R].includes(u1.value)||!O(u1.value,R)||B(R,u1.value)||w(R,u1.value)}))},Y=R=>R>=0?R:59,G=R=>R>=0?R:23,O=(R,p1)=>{const z1=n.minTime?C(rs(n.minTime)):null,h1=n.maxTime?C(rs(n.maxTime)):null,l1=C(rs(M.value,p1,p1==="minutes"||p1==="seconds"?Y(R):G(R)));return z1&&h1?(tn(l1,h1)||B6(l1,h1))&&(ca(l1,z1)||B6(l1,z1)):z1?ca(l1,z1)||B6(l1,z1):h1?tn(l1,h1)||B6(l1,h1):!0},T=R=>n[`no${R[0].toUpperCase()+R.slice(1)}Overlay`],L=R=>{T(R)||(v[R]=!v[R],v[R]?r("overlay-opened",R):r("overlay-closed",R))},W=R=>R==="hours"?wt:R==="minutes"?h0:na,j=()=>{x.value&&clearTimeout(x.value)},E=(R,p1=!0,z1)=>{const h1=p1?V:k,l1=p1?+n[`${R}Increment`]:-+n[`${R}Increment`];O(+n[R]+l1,R)&&r(`update:${R}`,W(R)(h1({[R]:+n[R]},{[R]:+n[`${R}Increment`]}))),!(z1!=null&&z1.keyboard)&&u.value.timeArrowHoldThreshold&&(x.value=setTimeout(()=>{E(R,p1)},u.value.timeArrowHoldThreshold))},I=R=>n.is24?R:(R>=12?p.value="PM":p.value="AM",Te1(R)),a1=()=>{p.value==="PM"?(p.value="AM",r("update:hours",n.hours-12)):(p.value="PM",r("update:hours",n.hours+12)),r("am-pm-change",p.value)},n1=R=>{v[R]=!0},t1=(R,p1,z1)=>{if(R&&n.arrowNavigation){Array.isArray(y.value[p1])?y.value[p1][z1]=R:y.value[p1]=[R];const h1=y.value.reduce((l1,f1)=>f1.map((u1,g1)=>[...l1[g1]||[],f1[g1]]),[]);i(n.closeTimePickerBtn),g.value&&(h1[1]=h1[1].concat(g.value)),c(h1,n.order)}},d1=(R,p1)=>(L(R),r(`update:${R}`,p1));return t({openChildCmp:n1}),(R,p1)=>{var z1;return R.disabled?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",T31,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(h1,l1)=>{var f1,u1,g1;return o.openBlock(),o.createElementBlock("div",{key:l1,class:o.normalizeClass(_.value)},[h1.separator?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(" : ")],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,0),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!R.timePickerInline,dp__inc_dec_button_inline:R.timePickerInline,dp__tp_inline_btn_top:R.timePickerInline,dp__inc_dec_button_disabled:H.value(h1.type)}),"data-test":`${h1.type}-time-inc-btn-${n.order}`,"aria-label":(f1=o.unref(s))==null?void 0:f1.incrementValue(h1.type),tabindex:"0",onKeydown:k1=>o.unref(y3)(k1,()=>E(h1.type,!0,{keyboard:!0}),!0),onClick:k1=>o.unref(u).timeArrowHoldThreshold?void 0:E(h1.type,!0),onMousedown:k1=>o.unref(u).timeArrowHoldThreshold?E(h1.type,!0):void 0,onMouseup:j},[n.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[N31,D31],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[R.$slots["arrow-up"]?o.renderSlot(R.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),R.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Bl),{key:1}))],64))],42,E31),o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,1),type:"button","aria-label":(u1=o.unref(s))==null?void 0:u1.openTpOverlay(h1.type),class:o.normalizeClass({dp__time_display:!0,dp__time_display_block:!R.timePickerInline,dp__time_display_inline:R.timePickerInline,"dp--time-invalid":b.value(h1.type),"dp--time-overlay-btn":!b.value(h1.type)}),disabled:T(h1.type),tabindex:"0","data-test":`${h1.type}-toggle-overlay-btn-${n.order}`,onKeydown:k1=>o.unref(y3)(k1,()=>L(h1.type),!0),onClick:k1=>L(h1.type)},[R.$slots[h1.type]?o.renderSlot(R.$slots,h1.type,{key:0,text:S.value(h1.type).text,value:S.value(h1.type).value}):o.createCommentVNode("",!0),R.$slots[h1.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(S.value(h1.type).text),1)],64))],42,O31),o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,2),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!R.timePickerInline,dp__inc_dec_button_inline:R.timePickerInline,dp__tp_inline_btn_bottom:R.timePickerInline,dp__inc_dec_button_disabled:A.value(h1.type)}),"data-test":`${h1.type}-time-dec-btn-${n.order}`,"aria-label":(g1=o.unref(s))==null?void 0:g1.decrementValue(h1.type),tabindex:"0",onKeydown:k1=>o.unref(y3)(k1,()=>E(h1.type,!1,{keyboard:!0}),!0),onClick:k1=>o.unref(u).timeArrowHoldThreshold?void 0:E(h1.type,!1),onMousedown:k1=>o.unref(u).timeArrowHoldThreshold?E(h1.type,!1):void 0,onMouseup:j},[n.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[B31,F31],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[R.$slots["arrow-down"]?o.renderSlot(R.$slots,"arrow-down",{key:0}):o.createCommentVNode("",!0),R.$slots["arrow-down"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Fl),{key:1}))],64))],42,P31)],64))],2)}),128)),R.is24?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",R31,[R.$slots["am-pm-button"]?o.renderSlot(R.$slots,"am-pm-button",{key:0,toggle:a1,value:p.value}):o.createCommentVNode("",!0),R.$slots["am-pm-button"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:g,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(z1=o.unref(s))==null?void 0:z1.amPmButton,tabindex:"0",onClick:a1,onKeydown:p1[0]||(p1[0]=h1=>o.unref(y3)(h1,()=>a1(),!0))},o.toDisplayString(p.value),41,I31))])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(q.value,(h1,l1)=>(o.openBlock(),o.createBlock(o.Transition,{key:l1,name:o.unref(h)(v[h1.type]),css:o.unref(m)},{default:o.withCtx(()=>[v[h1.type]?(o.openBlock(),o.createBlock(Nn,{key:0,items:e1(h1.type),"is-last":R.autoApply&&!o.unref(u).keepActionRow,"esc-close":R.escClose,type:h1.type,"text-input":R.textInput,config:R.config,"arrow-navigation":R.arrowNavigation,"aria-labels":R.ariaLabels,onSelected:f1=>d1(h1.type,f1),onToggle:f1=>L(h1.type),onResetFlow:p1[1]||(p1[1]=f1=>R.$emit("reset-flow"))},o.createSlots({"button-icon":o.withCtx(()=>[R.$slots["clock-icon"]?o.renderSlot(R.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),R.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(R.timePickerInline?o.unref(va):o.unref(Pl)),{key:1}))]),_:2},[R.$slots[`${h1.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:f1})=>[o.renderSlot(R.$slots,`${h1.type}-overlay-value`,{text:f1.text,value:f1.value})]),key:"0"}:void 0,R.$slots[`${h1.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(R.$slots,`${h1.type}-overlay-header`,{toggle:()=>L(h1.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"]))),128))]))}}}),U31={class:"dp--tp-wrap"},W31=["aria-label","tabindex"],q31=["tabindex"],j31=["aria-label"],yb=o.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...b4},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMatrix:c,setTimePicker:i}=x0(),s=o.useSlots(),{defaultedTransitions:l,defaultedAriaLabels:f,defaultedTextInput:u,defaultedConfig:d,defaultedRange:h}=re(n),{transitionName:m,showTransition:v}=Tn(l),{hideNavigationButtons:p}=B5(),g=o.ref(null),y=o.ref(null),x=o.ref([]),C=o.ref(null);o.onMounted(()=>{r("mount"),!n.timePicker&&n.arrowNavigation?c([ke(g.value)],"time"):i(!0,n.timePicker)});const b=o.computed(()=>h.value.enabled&&n.modelAuto?rb(n.internalModelValue):!0),M=o.ref(!1),w=F=>({hours:Array.isArray(n.hours)?n.hours[F]:n.hours,minutes:Array.isArray(n.minutes)?n.minutes[F]:n.minutes,seconds:Array.isArray(n.seconds)?n.seconds[F]:n.seconds}),z=o.computed(()=>{const F=[];if(h.value.enabled)for(let e1=0;e1<2;e1++)F.push(w(e1));else F.push(w(0));return F}),H=(F,e1=!1,Y="")=>{e1||r("reset-flow"),M.value=F,r(F?"overlay-opened":"overlay-closed",Ye.time),n.arrowNavigation&&i(F),o.nextTick(()=>{Y!==""&&x.value[0]&&x.value[0].openChildCmp(Y)})},A=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:n.autoApply&&!d.value.keepActionRow})),V=z3(s,"timePicker"),k=(F,e1,Y)=>h.value.enabled?e1===0?[F,z.value[1][Y]]:[z.value[0][Y],F]:F,_=F=>{r("update:hours",F)},N=F=>{r("update:minutes",F)},q=F=>{r("update:seconds",F)},S=()=>{if(C.value&&!u.value.enabled&&!n.noOverlayFocus){const F=nb(C.value);F&&F.focus({preventScroll:!0})}},B=F=>{r("overlay-closed",F)};return t({toggleTimePicker:H}),(F,e1)=>{var Y;return o.openBlock(),o.createElementBlock("div",U31,[!F.timePicker&&!F.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:g,type:"button",class:o.normalizeClass(A.value),"aria-label":(Y=o.unref(f))==null?void 0:Y.openTimePicker,tabindex:F.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:e1[0]||(e1[0]=G=>o.unref(y3)(G,()=>H(!0))),onClick:e1[1]||(e1[1]=G=>H(!0))},[F.$slots["clock-icon"]?o.renderSlot(F.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),F.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Pl),{key:1}))],42,W31)),[[o.vShow,!o.unref(p)(F.hideNavigation,"time")]]):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(m)(M.value),css:o.unref(v)&&!F.timePickerInline},{default:o.withCtx(()=>{var G;return[M.value||F.timePicker||F.timePickerInline?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:C,class:o.normalizeClass({dp__overlay:!F.timePickerInline,"dp--overlay-absolute":!n.timePicker&&!F.timePickerInline,"dp--overlay-relative":n.timePicker}),style:o.normalizeStyle(F.timePicker?{height:`${o.unref(d).modeHeight}px`}:void 0),tabindex:F.timePickerInline?void 0:0},[o.createElementVNode("div",{class:o.normalizeClass(F.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[F.$slots["time-picker-overlay"]?o.renderSlot(F.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:_,setMinutes:N,setSeconds:q}):o.createCommentVNode("",!0),F.$slots["time-picker-overlay"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(F.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,(O,T)=>o.withDirectives((o.openBlock(),o.createBlock($31,o.mergeProps({key:T,ref_for:!0},{...F.$props,order:T,hours:O.hours,minutes:O.minutes,seconds:O.seconds,closeTimePickerBtn:y.value,disabledTimesConfig:e.disabledTimesConfig,disabled:T===0?F.fixedStart:F.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:x,"validate-time":(L,W)=>e.validateTime(L,k(W,T,L)),"onUpdate:hours":L=>_(k(L,T,"hours")),"onUpdate:minutes":L=>N(k(L,T,"minutes")),"onUpdate:seconds":L=>q(k(L,T,"seconds")),onMounted:S,onOverlayClosed:B,onOverlayOpened:e1[2]||(e1[2]=L=>F.$emit("overlay-opened",L)),onAmPmChange:e1[3]||(e1[3]=L=>F.$emit("am-pm-change",L))}),o.createSlots({_:2},[o.renderList(o.unref(V),(L,W)=>({name:L,fn:o.withCtx(j=>[o.renderSlot(F.$slots,L,o.mergeProps({ref_for:!0},j))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[o.vShow,T===0?!0:b.value]])),128))],2)),!F.timePicker&&!F.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:y,type:"button",class:o.normalizeClass(A.value),"aria-label":(G=o.unref(f))==null?void 0:G.closeTimePicker,tabindex:"0",onKeydown:e1[4]||(e1[4]=O=>o.unref(y3)(O,()=>H(!1))),onClick:e1[5]||(e1[5]=O=>H(!1))},[F.$slots["calendar-icon"]?o.renderSlot(F.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),F.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(va),{key:1}))],42,j31)),[[o.vShow,!o.unref(p)(F.hideNavigation,"time")]]):o.createCommentVNode("",!0)],2)],14,q31)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])])}}}),xb=(e,t,a,r)=>{const{defaultedRange:n}=re(e),c=(C,b)=>Array.isArray(t[C])?t[C][b]:t[C],i=C=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[C]:t.seconds:0,s=(C,b)=>C?b!==void 0?n0(C,c("hours",b),c("minutes",b),i(b)):n0(C,t.hours,t.minutes,i()):Nl(A1(),i(b)),l=(C,b)=>{t[C]=b},f=o.computed(()=>e.modelAuto&&n.value.enabled?Array.isArray(a.value)?a.value.length>1:!1:n.value.enabled),u=(C,b)=>{const M=Object.fromEntries(Object.keys(t).map(w=>w===C?[w,b]:[w,t[w]].slice()));if(f.value&&!n.value.disableTimeRangeValidation){const w=H=>a.value?n0(a.value[H],M.hours[H],M.minutes[H],M.seconds[H]):null,z=H=>El(a.value[H],0);return!(l2(w(0),w(1))&&(ca(w(0),z(1))||tn(w(1),z(0))))}return!0},d=(C,b)=>{u(C,b)&&(l(C,b),r&&r())},h=C=>{d("hours",C)},m=C=>{d("minutes",C)},v=C=>{d("seconds",C)},p=(C,b,M,w)=>{b&&h(C),!b&&!M&&m(C),M&&v(C),a.value&&w(a.value)},g=C=>{if(C){const b=Array.isArray(C),M=b?[+C[0].hours,+C[1].hours]:+C.hours,w=b?[+C[0].minutes,+C[1].minutes]:+C.minutes,z=b?[+C[0].seconds,+C[1].seconds]:+C.seconds;l("hours",M),l("minutes",w),e.enableSeconds&&l("seconds",z)}},y=(C,b)=>{const M={hours:Array.isArray(t.hours)?t.hours[C]:t.hours,disabledArr:[]};return(b||b===0)&&(M.hours=b),Array.isArray(e.disabledTimes)&&(M.disabledArr=n.value.enabled&&Array.isArray(e.disabledTimes[C])?e.disabledTimes[C]:e.disabledTimes),M},x=o.computed(()=>(C,b)=>{var M;if(Array.isArray(e.disabledTimes)){const{disabledArr:w,hours:z}=y(C,b),H=w.filter(A=>+A.hours===z);return((M=H[0])==null?void 0:M.minutes)==="*"?{hours:[z],minutes:void 0,seconds:void 0}:{hours:[],minutes:(H==null?void 0:H.map(A=>+A.minutes))??[],seconds:(H==null?void 0:H.map(A=>A.seconds?+A.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:h,updateMinutes:m,updateSeconds:v,getSetDateTime:s,updateTimeValues:p,getSecondsValue:i,assignStartTime:g,validateTime:u,disabledTimesConfig:x}},Y31=(e,t)=>{const{modelValue:a,time:r}=En(e,t),{defaultedStartTime:n,defaultedRange:c}=re(e),{updateTimeValues:i,getSetDateTime:s,setTime:l,assignStartTime:f,disabledTimesConfig:u,validateTime:d}=xb(e,r,a,h);function h(){t("update-flow-step")}const m=b=>{const{hours:M,minutes:w,seconds:z}=b;return{hours:+M,minutes:+w,seconds:z?+z:0}},v=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const M=m(e.startTime[0]),w=m(e.startTime[1]);return[N2(A1(),M),N2(A1(),w)]}const b=m(e.startTime);return N2(A1(),b)}return c.value.enabled?[null,null]:null},p=()=>{if(c.value.enabled){const[b,M]=v();a.value=[s(b,0),s(M,1)]}else a.value=s(v())},g=b=>Array.isArray(b)?[X0(A1(b[0])),X0(A1(b[1]))]:[X0(b??A1())],y=(b,M,w)=>{l("hours",b),l("minutes",M),l("seconds",e.enableSeconds?w:0)},x=()=>{const[b,M]=g(a.value);return c.value.enabled?y([b.hours,M.hours],[b.minutes,M.minutes],[b.seconds,M.seconds]):y(b.hours,b.minutes,b.seconds)};o.onMounted(()=>{if(!e.shadow)return f(n.value),a.value?x():p()});const C=()=>{Array.isArray(a.value)?a.value=a.value.map((b,M)=>b&&s(b,M)):a.value=s(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:u,updateTime:(b,M=!0,w=!1)=>{i(b,M,w,C)},validateTime:d}},G31=o.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...b4},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=z3(c,"timePicker"),s=o.ref(null),{time:l,modelValue:f,disabledTimesConfig:u,updateTime:d,validateTime:h}=Y31(n,r);return o.onMounted(()=>{n.shadow||r("mount",null)}),t({getSidebarProps:()=>({modelValue:f,time:l,updateTime:d}),toggleTimePicker:(m,v=!1,p="")=>{var g;(g=s.value)==null||g.toggleTimePicker(m,v,p)}}),(m,v)=>(o.openBlock(),o.createBlock(R5,{"multi-calendars":0,stretch:""},{default:o.withCtx(()=>[o.createVNode(yb,o.mergeProps({ref_key:"tpRef",ref:s},m.$props,{hours:o.unref(l).hours,minutes:o.unref(l).minutes,seconds:o.unref(l).seconds,"internal-model-value":m.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(h),"onUpdate:hours":v[0]||(v[0]=p=>o.unref(d)(p)),"onUpdate:minutes":v[1]||(v[1]=p=>o.unref(d)(p,!1)),"onUpdate:seconds":v[2]||(v[2]=p=>o.unref(d)(p,!1,!0)),onAmPmChange:v[3]||(v[3]=p=>m.$emit("am-pm-change",p)),onResetFlow:v[4]||(v[4]=p=>m.$emit("reset-flow")),onOverlayClosed:v[5]||(v[5]=p=>m.$emit("overlay-toggle",{open:!1,overlay:p})),onOverlayOpened:v[6]||(v[6]=p=>m.$emit("overlay-toggle",{open:!0,overlay:p}))}),o.createSlots({_:2},[o.renderList(o.unref(i),(p,g)=>({name:p,fn:o.withCtx(y=>[o.renderSlot(m.$slots,p,o.normalizeProps(o.guardReactiveProps(y)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),X31={class:"dp--header-wrap"},K31={key:0,class:"dp__month_year_wrap"},Z31={key:0},Q31={class:"dp__month_year_wrap"},J31=["aria-label","data-test","onClick","onKeydown"],e41=o.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...b4},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTransitions:c,defaultedAriaLabels:i,defaultedMultiCalendars:s,defaultedFilters:l,defaultedConfig:f,defaultedHighlight:u,propDates:d}=re(n),{transitionName:h,showTransition:m}=Tn(c),{buildMatrix:v}=x0(),{handleMonthYearChange:p,isDisabled:g,updateMonthYear:y}=l31(n,r),{showLeftIcon:x,showRightIcon:C}=B5(),b=o.ref(!1),M=o.ref(!1),w=o.ref([null,null,null,null]);o.onMounted(()=>{r("mount")});const z=O=>({get:()=>n[O],set:T=>{const L=O===X3.month?X3.year:X3.month;r("update-month-year",{[O]:T,[L]:n[L]}),O===X3.month?S(!0):B(!0)}}),H=o.computed(z(X3.month)),A=o.computed(z(X3.year)),V=o.computed(()=>O=>({month:n.month,year:n.year,items:O===X3.month?n.months:n.years,instance:n.instance,updateMonthYear:y,toggle:O===X3.month?S:B})),k=o.computed(()=>n.months.find(T=>T.value===n.month)||{text:"",value:0}),_=o.computed(()=>sa(n.months,O=>{const T=n.month===O.value,L=an(O.value,ib(n.year,d.value.minDate),sb(n.year,d.value.maxDate))||l.value.months.includes(O.value),W=db(u.value,O.value,n.year);return{active:T,disabled:L,highlighted:W}})),N=o.computed(()=>sa(n.years,O=>{const T=n.year===O.value,L=an(O.value,oa(d.value.minDate),oa(d.value.maxDate))||l.value.years.includes(O.value),W=Ul(u.value,O.value);return{active:T,disabled:L,highlighted:W}})),q=(O,T,L)=>{L!==void 0?O.value=L:O.value=!O.value,O.value?r("overlay-opened",T):r("overlay-closed",T)},S=(O=!1,T)=>{F(O),q(b,Ye.month,T)},B=(O=!1,T)=>{F(O),q(M,Ye.year,T)},F=O=>{O||r("reset-flow")},e1=(O,T)=>{n.arrowNavigation&&(w.value[T]=ke(O),v(w.value,"monthYear"))},Y=o.computed(()=>{var O,T;return[{type:X3.month,index:1,toggle:S,modelValue:H.value,updateModelValue:L=>H.value=L,text:k.value.text,showSelectionGrid:b.value,items:_.value,ariaLabel:(O=i.value)==null?void 0:O.openMonthsOverlay},{type:X3.year,index:2,toggle:B,modelValue:A.value,updateModelValue:L=>A.value=L,text:cb(n.year,n.locale),showSelectionGrid:M.value,items:N.value,ariaLabel:(T=i.value)==null?void 0:T.openYearsOverlay}]}),G=o.computed(()=>n.disableYearSelect?[Y.value[0]]:n.yearFirst?[...Y.value].reverse():Y.value);return t({toggleMonthPicker:S,toggleYearPicker:B,handleMonthYearChange:p}),(O,T)=>{var L,W,j;return o.openBlock(),o.createElementBlock("div",X31,[O.$slots["month-year"]?(o.openBlock(),o.createElementBlock("div",K31,[o.renderSlot(O.$slots,"month-year",o.normalizeProps(o.guardReactiveProps({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:o.unref(y),handleMonthYearChange:o.unref(p),instance:e.instance})))])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[O.$slots["top-extra"]?(o.openBlock(),o.createElementBlock("div",Z31,[o.renderSlot(O.$slots,"top-extra",{value:O.internalModelValue})])):o.createCommentVNode("",!0),o.createElementVNode("div",Q31,[o.unref(x)(o.unref(s),e.instance)&&!O.vertical?(o.openBlock(),o.createBlock(yr,{key:0,"aria-label":(L=o.unref(i))==null?void 0:L.prevMonth,disabled:o.unref(g)(!1),onActivate:T[0]||(T[0]=E=>o.unref(p)(!1,!0)),onSetRef:T[1]||(T[1]=E=>e1(E,0))},{default:o.withCtx(()=>[O.$slots["arrow-left"]?o.renderSlot(O.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),O.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Dl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:O.disableYearSelect}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(G.value,(E,I)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:E.type},[o.createElementVNode("button",{ref_for:!0,ref:a1=>e1(a1,I+1),type:"button",class:"dp__btn dp__month_year_select",tabindex:"0","aria-label":E.ariaLabel,"data-test":`${E.type}-toggle-overlay-${e.instance}`,onClick:E.toggle,onKeydown:a1=>o.unref(y3)(a1,()=>E.toggle(),!0)},[O.$slots[E.type]?o.renderSlot(O.$slots,E.type,{key:0,text:E.text,value:n[E.type]}):o.createCommentVNode("",!0),O.$slots[E.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(E.text),1)],64))],40,J31),o.createVNode(o.Transition,{name:o.unref(h)(E.showSelectionGrid),css:o.unref(m)},{default:o.withCtx(()=>[E.showSelectionGrid?(o.openBlock(),o.createBlock(Nn,{key:0,items:E.items,"arrow-navigation":O.arrowNavigation,"hide-navigation":O.hideNavigation,"is-last":O.autoApply&&!o.unref(f).keepActionRow,"skip-button-ref":!1,config:O.config,type:E.type,"header-refs":[],"esc-close":O.escClose,"menu-wrap-ref":O.menuWrapRef,"text-input":O.textInput,"aria-labels":O.ariaLabels,onSelected:E.updateModelValue,onToggle:E.toggle},o.createSlots({"button-icon":o.withCtx(()=>[O.$slots["calendar-icon"]?o.renderSlot(O.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),O.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(va),{key:1}))]),_:2},[O.$slots[`${E.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:a1})=>[o.renderSlot(O.$slots,`${E.type}-overlay-value`,{text:a1.text,value:a1.value})]),key:"0"}:void 0,O.$slots[`${E.type}-overlay`]?{name:"overlay",fn:o.withCtx(()=>[o.renderSlot(O.$slots,`${E.type}-overlay`,o.mergeProps({ref_for:!0},V.value(E.type)))]),key:"1"}:void 0,O.$slots[`${E.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(O.$slots,`${E.type}-overlay-header`,{toggle:E.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),o.unref(x)(o.unref(s),e.instance)&&O.vertical?(o.openBlock(),o.createBlock(yr,{key:1,"aria-label":(W=o.unref(i))==null?void 0:W.prevMonth,disabled:o.unref(g)(!1),onActivate:T[2]||(T[2]=E=>o.unref(p)(!1,!0))},{default:o.withCtx(()=>[O.$slots["arrow-up"]?o.renderSlot(O.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),O.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Bl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.unref(C)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(yr,{key:2,ref:"rightIcon",disabled:o.unref(g)(!0),"aria-label":(j=o.unref(i))==null?void 0:j.nextMonth,onActivate:T[3]||(T[3]=E=>o.unref(p)(!0,!0)),onSetRef:T[4]||(T[4]=E=>e1(E,O.disableYearSelect?2:3))},{default:o.withCtx(()=>[O.$slots[O.vertical?"arrow-down":"arrow-right"]?o.renderSlot(O.$slots,O.vertical?"arrow-down":"arrow-right",{key:0}):o.createCommentVNode("",!0),O.$slots[O.vertical?"arrow-down":"arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(O.vertical?o.unref(Fl):o.unref(Ol)),{key:1}))]),_:3},8,["disabled","aria-label"])):o.createCommentVNode("",!0)])],64))])}}}),t41=["aria-label"],a41={class:"dp__calendar_header",role:"row"},r41={key:0,class:"dp__calendar_header_item",role:"gridcell"},n41=["aria-label"],c41=o.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1),i41=["aria-label"],s41={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},o41={class:"dp__cell_inner"},l41=["id","aria-selected","aria-disabled","aria-label","data-test","onClick","onKeydown","onMouseenter","onMouseleave","onMousedown"],f41=o.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...b4},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMultiLevelMatrix:c}=x0(),{defaultedTransitions:i,defaultedConfig:s,defaultedAriaLabels:l,defaultedMultiCalendars:f,defaultedWeekNumbers:u,defaultedMultiDates:d}=re(n),h=o.ref(null),m=o.ref({bottom:"",left:"",transform:""}),v=o.ref([]),p=o.ref(null),g=o.ref(!0),y=o.ref(""),x=o.ref({startX:0,endX:0,startY:0,endY:0}),C=o.ref([]),b=o.ref({left:"50%"}),M=o.ref(!1),w=o.computed(()=>n.calendar?n.calendar(n.mappedDates):n.mappedDates),z=o.computed(()=>n.dayNames?Array.isArray(n.dayNames)?n.dayNames:n.dayNames(n.locale,+n.weekStart):Ae1(n.formatLocale,n.locale,+n.weekStart));o.onMounted(()=>{r("mount",{cmp:"calendar",refs:v}),s.value.noSwipe||p.value&&(p.value.addEventListener("touchstart",Y,{passive:!1}),p.value.addEventListener("touchend",G,{passive:!1}),p.value.addEventListener("touchmove",O,{passive:!1})),n.monthChangeOnScroll&&p.value&&p.value.addEventListener("wheel",W,{passive:!1})});const H=t1=>t1?n.vertical?"vNext":"next":n.vertical?"vPrevious":"previous",A=(t1,d1)=>{if(n.transitions){const R=k3(dt(A1(),n.month,n.year));y.value=me(k3(dt(A1(),t1,d1)),R)?i.value[H(!0)]:i.value[H(!1)],g.value=!1,o.nextTick(()=>{g.value=!0})}},V=o.computed(()=>({[n.calendarClassName]:!!n.calendarClassName})),k=o.computed(()=>t1=>{const d1=Ee1(t1);return{dp__marker_dot:d1.type==="dot",dp__marker_line:d1.type==="line"}}),_=o.computed(()=>t1=>l2(t1,h.value)),N=o.computed(()=>({dp__calendar:!0,dp__calendar_next:f.value.count>0&&n.instance!==0})),q=o.computed(()=>t1=>n.hideOffsetDates?t1.current:!0),S=t1=>B4(t1,"yyyy-MM-dd"),B=async(t1,d1,R)=>{const p1=ke(v.value[d1][R]);if(p1){const{width:z1,height:h1}=p1.getBoundingClientRect();h.value=t1.value;let l1={left:`${z1/2}px`},f1=-50;if(await o.nextTick(),C.value[0]){const{left:u1,width:g1}=C.value[0].getBoundingClientRect();u1<0&&(l1={left:"0"},f1=0,b.value.left=`${z1/2}px`),window.innerWidth<u1+g1&&(l1={right:"0"},f1=0,b.value.left=`${g1-z1/2}px`)}m.value={bottom:`${h1}px`,...l1,transform:`translateX(${f1}%)`},r("tooltip-open",t1.marker)}},F=async(t1,d1,R)=>{var p1,z1;if(M.value&&d.value.enabled&&d.value.dragSelect)return r("select-date",t1);r("set-hover-date",t1),(z1=(p1=t1.marker)==null?void 0:p1.tooltip)!=null&&z1.length&&await B(t1,d1,R)},e1=t1=>{h.value&&(h.value=null,m.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),r("tooltip-close",t1.marker))},Y=t1=>{x.value.startX=t1.changedTouches[0].screenX,x.value.startY=t1.changedTouches[0].screenY},G=t1=>{x.value.endX=t1.changedTouches[0].screenX,x.value.endY=t1.changedTouches[0].screenY,T()},O=t1=>{n.vertical&&!n.inline&&t1.preventDefault()},T=()=>{const t1=n.vertical?"Y":"X";Math.abs(x.value[`start${t1}`]-x.value[`end${t1}`])>10&&r("handle-swipe",x.value[`start${t1}`]>x.value[`end${t1}`]?"right":"left")},L=(t1,d1,R)=>{t1&&(Array.isArray(v.value[d1])?v.value[d1][R]=t1:v.value[d1]=[t1]),n.arrowNavigation&&c(v.value,"calendar")},W=t1=>{n.monthChangeOnScroll&&(t1.preventDefault(),r("handle-scroll",t1))},j=t1=>u.value.type==="local"?Sl(t1.value,{weekStartsOn:+n.weekStart}):u.value.type==="iso"?Vl(t1.value):typeof u.value.type=="function"?u.value.type(t1.value):"",E=t1=>{const d1=t1[0];return u.value.hideOnOffsetDates?t1.some(R=>R.current)?j(d1):"":j(d1)},I=(t1,d1)=>{d.value.enabled||(r0(t1,s.value),r("select-date",d1))},a1=t1=>{r0(t1,s.value)},n1=t1=>{d.value.enabled&&d.value.dragSelect?(M.value=!0,r("select-date",t1)):d.value.enabled&&r("select-date",t1)};return t({triggerTransition:A}),(t1,d1)=>{var R;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(N.value)},[o.createElementVNode("div",{ref_key:"calendarWrapRef",ref:p,role:"grid",class:o.normalizeClass(V.value),"aria-label":(R=o.unref(l))==null?void 0:R.calendarWrap},[o.createElementVNode("div",a41,[t1.weekNumbers?(o.openBlock(),o.createElementBlock("div",r41,o.toDisplayString(t1.weekNumName),1)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,(p1,z1)=>{var h1,l1;return o.openBlock(),o.createElementBlock("div",{key:z1,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(l1=(h1=o.unref(l))==null?void 0:h1.weekDay)==null?void 0:l1.call(h1,z1)},[t1.$slots["calendar-header"]?o.renderSlot(t1.$slots,"calendar-header",{key:0,day:p1,index:z1}):o.createCommentVNode("",!0),t1.$slots["calendar-header"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(p1),1)],64))],8,n41)}),128))]),c41,o.createVNode(o.Transition,{name:y.value,css:!!t1.transitions},{default:o.withCtx(()=>{var p1;return[g.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup","aria-label":((p1=o.unref(l))==null?void 0:p1.calendarDays)||void 0,onMouseleave:d1[1]||(d1[1]=z1=>M.value=!1)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(w.value,(z1,h1)=>(o.openBlock(),o.createElementBlock("div",{key:h1,class:"dp__calendar_row",role:"row"},[t1.weekNumbers?(o.openBlock(),o.createElementBlock("div",s41,[o.createElementVNode("div",o41,o.toDisplayString(E(z1.days)),1)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z1.days,(l1,f1)=>{var u1,g1,k1;return o.openBlock(),o.createElementBlock("div",{id:S(l1.value),ref_for:!0,ref:b1=>L(b1,h1,f1),key:f1+h1,role:"gridcell",class:"dp__calendar_item","aria-selected":(l1.classData.dp__active_date||l1.classData.dp__range_start||l1.classData.dp__range_start)??void 0,"aria-disabled":l1.classData.dp__cell_disabled||void 0,"aria-label":(g1=(u1=o.unref(l))==null?void 0:u1.day)==null?void 0:g1.call(u1,l1),tabindex:"0","data-test":l1.value,onClick:o.withModifiers(b1=>I(b1,l1),["prevent"]),onKeydown:b1=>o.unref(y3)(b1,()=>t1.$emit("select-date",l1)),onMouseenter:b1=>F(l1,h1,f1),onMouseleave:b1=>e1(l1),onMousedown:b1=>n1(l1),onMouseup:d1[0]||(d1[0]=b1=>M.value=!1)},[o.createElementVNode("div",{class:o.normalizeClass(["dp__cell_inner",l1.classData])},[t1.$slots.day&&q.value(l1)?o.renderSlot(t1.$slots,"day",{key:0,day:+l1.text,date:l1.value}):o.createCommentVNode("",!0),t1.$slots.day?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(l1.text),1)],64)),l1.marker&&q.value(l1)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[t1.$slots.marker?o.renderSlot(t1.$slots,"marker",{key:0,marker:l1.marker,day:+l1.text,date:l1.value}):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(k.value(l1.marker)),style:o.normalizeStyle(l1.marker.color?{backgroundColor:l1.marker.color}:{})},null,6))],64)):o.createCommentVNode("",!0),_.value(l1.value)?(o.openBlock(),o.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:C,class:"dp__marker_tooltip",style:o.normalizeStyle(m.value)},[(k1=l1.marker)!=null&&k1.tooltip?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:a1},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l1.marker.tooltip,(b1,H1)=>(o.openBlock(),o.createElementBlock("div",{key:H1,class:"dp__tooltip_text"},[t1.$slots["marker-tooltip"]?o.renderSlot(t1.$slots,"marker-tooltip",{key:0,tooltip:b1,day:l1.value}):o.createCommentVNode("",!0),t1.$slots["marker-tooltip"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{class:"dp__tooltip_mark",style:o.normalizeStyle(b1.color?{backgroundColor:b1.color}:{})},null,4),o.createElementVNode("div",null,o.toDisplayString(b1.text),1)],64))]))),128)),o.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:o.normalizeStyle(b.value)},null,4)])):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0)],2)],40,l41)}),128))]))),128))],40,i41)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])],10,t41)],2)}}}),sm=e=>Array.isArray(e),u41=(e,t,a,r)=>{const n=o.ref([]),c=o.ref(new Date),i=o.ref(),{modelValue:s,calendars:l,time:f,today:u}=En(e,t),{defaultedMultiCalendars:d,defaultedStartTime:h,defaultedRange:m,defaultedConfig:v,defaultedTz:p,propDates:g,defaultedMultiDates:y}=re(e),{validateMonthYearInRange:x,isDisabled:C,isDateRangeAllowed:b,checkMinMaxRange:M}=b0(e),{updateTimeValues:w,getSetDateTime:z,setTime:H,assignStartTime:A,validateTime:V,disabledTimesConfig:k}=xb(e,f,s,r),_=o.computed(()=>y1=>l.value[y1]?l.value[y1].month:0),N=o.computed(()=>y1=>l.value[y1]?l.value[y1].year:0),q=y1=>!v.value.keepViewOnOffsetClick||y1?!0:!i.value,S=(y1,m1,S1,T1=!1)=>{var Q1,Q2;q(T1)&&(l.value[y1]||(l.value[y1]={month:0,year:0}),l.value[y1].month=am(m1)?(Q1=l.value[y1])==null?void 0:Q1.month:m1,l.value[y1].year=am(S1)?(Q2=l.value[y1])==null?void 0:Q2.year:S1)},B=()=>{e.autoApply&&t("select-date")};o.watch(s,(y1,m1)=>{JSON.stringify(y1)!==JSON.stringify(m1)&&Y()},{deep:!0}),o.onMounted(()=>{e.shadow||(s.value||(t1(),h.value&&A(h.value)),Y(!0),e.focusStartDate&&e.startDate&&t1())});const F=o.computed(()=>{var y1;return(y1=e.flow)!=null&&y1.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),e1=()=>{e.autoApply&&F.value&&t("auto-apply")},Y=(y1=!1)=>{if(s.value)return Array.isArray(s.value)?(n.value=s.value,E(y1)):T(s.value,y1);if(d.value.count&&y1&&!e.startDate)return O(A1(),y1)},G=()=>Array.isArray(s.value)&&m.value.enabled?o2(s.value[0])===o2(s.value[1]??s.value[0]):!1,O=(y1,m1=!1)=>{if((!d.value.count||!d.value.static||m1)&&S(0,o2(y1),n2(y1)),d.value.count&&(!d.value.solo||!s.value||G()))for(let S1=1;S1<d.value.count;S1++){const T1=N2(A1(),{month:_.value(S1-1),year:N.value(S1-1)}),Q1=Ex(T1,{months:1});l.value[S1]={month:o2(Q1),year:n2(Q1)}}},T=(y1,m1)=>{O(y1),H("hours",wt(y1)),H("minutes",h0(y1)),H("seconds",na(y1)),d.value.count&&m1&&n1()},L=y1=>{if(d.value.count){if(d.value.solo)return 0;const m1=o2(y1[0]),S1=o2(y1[1]);return Math.abs(S1-m1)<d.value.count?0:1}return 1},W=(y1,m1)=>{y1[1]&&m.value.showLastInRange?O(y1[L(y1)],m1):O(y1[0],m1);const S1=(T1,Q1)=>[T1(y1[0]),y1[1]?T1(y1[1]):f[Q1][1]];H("hours",S1(wt,"hours")),H("minutes",S1(h0,"minutes")),H("seconds",S1(na,"seconds"))},j=(y1,m1)=>{if((m.value.enabled||e.weekPicker)&&!y.value.enabled)return W(y1,m1);if(y.value.enabled&&m1){const S1=y1[y1.length-1];return T(S1,m1)}},E=y1=>{const m1=s.value;j(m1,y1),d.value.count&&d.value.solo&&n1()},I=(y1,m1)=>{const S1=N2(A1(),{month:_.value(m1),year:N.value(m1)}),T1=y1<0?f4(S1,1):ia(S1,1);x(o2(T1),n2(T1),y1<0,e.preventMinMaxNavigation)&&(S(m1,o2(T1),n2(T1)),t("update-month-year",{instance:m1,month:o2(T1),year:n2(T1)}),d.value.count&&!d.value.solo&&a1(m1),a())},a1=y1=>{for(let m1=y1-1;m1>=0;m1--){const S1=ia(N2(A1(),{month:_.value(m1+1),year:N.value(m1+1)}),1);S(m1,o2(S1),n2(S1))}for(let m1=y1+1;m1<=d.value.count-1;m1++){const S1=f4(N2(A1(),{month:_.value(m1-1),year:N.value(m1-1)}),1);S(m1,o2(S1),n2(S1))}},n1=()=>{if(Array.isArray(s.value)&&s.value.length===2){const y1=A1(A1(s.value[1]?s.value[1]:f4(s.value[0],1))),[m1,S1]=[o2(s.value[0]),n2(s.value[0])],[T1,Q1]=[o2(s.value[1]),n2(s.value[1])];(m1!==T1||m1===T1&&S1!==Q1)&&d.value.solo&&S(1,o2(y1),n2(y1))}else s.value&&!Array.isArray(s.value)&&(S(0,o2(s.value),n2(s.value)),O(A1()))},t1=()=>{e.startDate&&(S(0,o2(A1(e.startDate)),n2(A1(e.startDate))),d.value.count&&a1(0))},d1=(y1,m1)=>{if(e.monthChangeOnScroll){const S1=new Date().getTime()-c.value.getTime(),T1=Math.abs(y1.deltaY);let Q1=500;T1>1&&(Q1=100),T1>100&&(Q1=0),S1>Q1&&(c.value=new Date,I(e.monthChangeOnScroll!=="inverse"?-y1.deltaY:y1.deltaY,m1))}},R=(y1,m1,S1=!1)=>{e.monthChangeOnArrows&&e.vertical===S1&&p1(y1,m1)},p1=(y1,m1)=>{I(y1==="right"?-1:1,m1)},z1=y1=>{if(g.value.markers)return Uc(y1.value,g.value.markers)},h1=(y1,m1)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[y1==0,!0];case"fair":return[y1==0||m1>y1,!0];case"append":return[!1,!1];default:return[!1,!1]}},l1=(y1,m1,S1,T1)=>{if(e.sixWeeks&&y1.length<6){const Q1=6-y1.length,Q2=(m1.getDay()+7-T1)%7,we=6-(S1.getDay()+7-T1)%7,[d3,j3]=h1(Q2,we);for(let k2=1;k2<=Q1;k2++)if(j3?!!(k2%2)==d3:d3){const xe=y1[0].days[0],X4=f1(J3(xe.value,-7),o2(m1));y1.unshift({days:X4})}else{const xe=y1[y1.length-1],X4=xe.days[xe.days.length-1],K4=f1(J3(X4.value,1),o2(m1));y1.push({days:K4})}}return y1},f1=(y1,m1)=>{const S1=A1(y1),T1=[];for(let Q1=0;Q1<7;Q1++){const Q2=J3(S1,Q1),we=o2(Q2)!==m1;T1.push({text:e.hideOffsetDates&&we?"":Q2.getDate(),value:Q2,current:!we,classData:{}})}return T1},u1=(y1,m1)=>{const S1=[],T1=new Date(m1,y1),Q1=new Date(m1,y1+1,0),Q2=e.weekStart,we=y4(T1,{weekStartsOn:Q2}),d3=j3=>{const k2=f1(j3,y1);if(S1.push({days:k2}),!S1[S1.length-1].days.some(xe=>l2(k3(xe.value),k3(Q1)))){const xe=J3(j3,7);d3(xe)}};return d3(we),l1(S1,T1,Q1,Q2)},g1=y1=>{const m1=n0(A1(y1.value),f.hours,f.minutes,K1());t("date-update",m1),y.value.enabled?Wl(m1,s,y.value.limit):s.value=m1,r(),o.nextTick().then(()=>{e1()})},k1=y1=>m.value.noDisabledRange?ob(n.value[0],y1).some(m1=>C(m1)):!1,b1=()=>{n.value=s.value?s.value.slice():[],n.value.length===2&&!(m.value.fixedStart||m.value.fixedEnd)&&(n.value=[])},H1=(y1,m1)=>{const S1=[A1(y1.value),J3(A1(y1.value),+m.value.autoRange)];b(S1)?(m1&&F1(y1.value),n.value=S1):t("invalid-date",y1.value)},F1=y1=>{const m1=o2(A1(y1)),S1=n2(A1(y1));if(S(0,m1,S1),d.value.count>0)for(let T1=1;T1<d.value.count;T1++){const Q1=Ie1(N2(A1(y1),{year:_.value(T1-1),month:N.value(T1-1)}));S(T1,Q1.month,Q1.year)}},$1=y1=>{if(k1(y1.value)||!M(y1.value,s.value,m.value.fixedStart?0:1))return t("invalid-date",y1.value);n.value=vb(A1(y1.value),s,t,m)},W1=(y1,m1)=>{if(b1(),m.value.autoRange)return H1(y1,m1);if(m.value.fixedStart||m.value.fixedEnd)return $1(y1);n.value[0]?M(A1(y1.value),s.value)&&!k1(y1.value)?ne(A1(y1.value),A1(n.value[0]))?(n.value.unshift(A1(y1.value)),t("range-end",n.value[0])):(n.value[1]=A1(y1.value),t("range-end",n.value[1])):(e.autoApply&&t("auto-apply-invalid",y1.value),t("invalid-date",y1.value)):(n.value[0]=A1(y1.value),t("range-start",n.value[0]))},K1=(y1=!0)=>e.enableSeconds?Array.isArray(f.seconds)?y1?f.seconds[0]:f.seconds[1]:f.seconds:0,d2=y1=>{n.value[y1]=n0(n.value[y1],f.hours[y1],f.minutes[y1],K1(y1!==1))},G1=()=>{var y1,m1;n.value[0]&&n.value[1]&&+((y1=n.value)==null?void 0:y1[0])>+((m1=n.value)==null?void 0:m1[1])&&(n.value.reverse(),t("range-start",n.value[0]),t("range-end",n.value[1]))},j2=()=>{n.value.length&&(n.value[0]&&!n.value[1]?d2(0):(d2(0),d2(1),r()),G1(),s.value=n.value.slice(),I5(n.value,t,e.autoApply,e.modelAuto))},O1=(y1,m1=!1)=>{if(C(y1.value)||!y1.current&&e.hideOffsetDates)return t("invalid-date",y1.value);if(i.value=JSON.parse(JSON.stringify(y1)),!m.value.enabled)return g1(y1);sm(f.hours)&&sm(f.minutes)&&!y.value.enabled&&(W1(y1,m1),j2())},c2=(y1,m1)=>{var S1;S(y1,m1.month,m1.year,!0),d.value.count&&!d.value.solo&&a1(y1),t("update-month-year",{instance:y1,month:m1.month,year:m1.year}),a(d.value.solo?y1:void 0);const T1=(S1=e.flow)!=null&&S1.length?e.flow[e.flowStep]:void 0;!m1.fromNav&&(T1===Ye.month||T1===Ye.year)&&r()},Y2=(y1,m1)=>{pb({value:y1,modelValue:s,range:m.value.enabled,timezone:m1?void 0:p.value.timezone}),B(),e.multiCalendars&&o.nextTick().then(()=>Y(!0))},m2=()=>{m.value.enabled?s.value&&Array.isArray(s.value)&&s.value[0]?s.value=ne(A1(),s.value[0])?[A1(),s.value[0]]:[s.value[0],A1()]:s.value=[A1()]:s.value=A1(),B()},A2=()=>{if(Array.isArray(s.value))if(y.value.enabled){const y1=Pe();s.value[s.value.length-1]=z(y1)}else s.value=s.value.map((y1,m1)=>y1&&z(y1,m1));else s.value=z(s.value);t("time-update")},Pe=()=>Array.isArray(s.value)&&s.value.length?s.value[s.value.length-1]:null;return{calendars:l,modelValue:s,month:_,year:N,time:f,disabledTimesConfig:k,today:u,validateTime:V,getCalendarDays:u1,getMarker:z1,handleScroll:d1,handleSwipe:p1,handleArrow:R,selectDate:O1,updateMonthYear:c2,presetDate:Y2,selectCurrentDate:m2,updateTime:(y1,m1=!0,S1=!1)=>{w(y1,m1,S1,A2)}}},d41={key:0},h41=o.defineComponent({__name:"DatePicker",props:{...b4},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,{calendars:c,month:i,year:s,modelValue:l,time:f,disabledTimesConfig:u,today:d,validateTime:h,getCalendarDays:m,getMarker:v,handleArrow:p,handleScroll:g,handleSwipe:y,selectDate:x,updateMonthYear:C,presetDate:b,selectCurrentDate:M,updateTime:w}=u41(n,r,G,O),z=o.useSlots(),{setHoverDate:H,getDayClassData:A,clearHoverDate:V}=h31(l,n),{defaultedMultiCalendars:k}=re(n),_=o.ref([]),N=o.ref([]),q=o.ref(null),S=z3(z,"calendar"),B=z3(z,"monthYear"),F=z3(z,"timePicker"),e1=d1=>{n.shadow||r("mount",d1)};o.watch(c,()=>{n.shadow||setTimeout(()=>{r("recalculate-position")},0)},{deep:!0});const Y=o.computed(()=>d1=>m(i.value(d1),s.value(d1)).map(R=>({...R,days:R.days.map(p1=>(p1.marker=v(p1),p1.classData=A(p1),p1))})));function G(d1){var R;d1||d1===0?(R=N.value[d1])==null||R.triggerTransition(i.value(d1),s.value(d1)):N.value.forEach((p1,z1)=>p1.triggerTransition(i.value(z1),s.value(z1)))}function O(){r("update-flow-step")}const T=(d1,R=!1)=>{x(d1,R),n.spaceConfirm&&r("select-date")},L=(d1,R,p1=0)=>{var z1;(z1=_.value[p1])==null||z1.toggleMonthPicker(d1,R)},W=(d1,R,p1=0)=>{var z1;(z1=_.value[p1])==null||z1.toggleYearPicker(d1,R)},j=(d1,R,p1)=>{var z1;(z1=q.value)==null||z1.toggleTimePicker(d1,R,p1)},E=d1=>{if(!n.range){const R=l.value?l.value:d,p1=d1?y4(R,{weekStartsOn:1}):Ix(R,{weekStartsOn:1});x({value:p1,current:o2(R)===i.value(0),text:"",classData:{}})}},I=d1=>{var R;(R=_.value[0])==null||R.handleMonthYearChange(d1,!0)},a1=d1=>{C(0,{month:i.value(0),year:s.value(0)+(d1?1:-1),fromNav:!0})},n1=(d1,R)=>{d1===Ye.time&&r(`time-picker-${R?"open":"close"}`),r("overlay-toggle",{open:R,overlay:d1})},t1=d1=>{r("overlay-toggle",{open:!1,overlay:d1}),r("focus-menu")};return t({clearHoverDate:V,presetDate:b,selectCurrentDate:M,toggleMonthPicker:L,toggleYearPicker:W,toggleTimePicker:j,handleArrow:p,updateMonthYear:C,getSidebarProps:()=>({modelValue:l,month:i,year:s,time:f,updateTime:w,updateMonthYear:C,selectDate:x,presetDate:b}),changeMonth:I,changeYear:a1,selectWeekDate:E}),(d1,R)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(R5,{"multi-calendars":o.unref(k).count,collapse:d1.collapse},{default:o.withCtx(({instance:p1,index:z1})=>[d1.disableMonthYearSelect?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(e41,o.mergeProps({key:0,ref:h1=>{h1&&(_.value[z1]=h1)},months:o.unref(ab)(d1.formatLocale,d1.locale,d1.monthNameFormat),years:o.unref(Rl)(d1.yearRange,d1.locale,d1.reverseYears),month:o.unref(i)(p1),year:o.unref(s)(p1),instance:p1},d1.$props,{onMount:R[0]||(R[0]=h1=>e1(o.unref(G0).header)),onResetFlow:R[1]||(R[1]=h1=>d1.$emit("reset-flow")),onUpdateMonthYear:h1=>o.unref(C)(p1,h1),onOverlayClosed:t1,onOverlayOpened:R[2]||(R[2]=h1=>d1.$emit("overlay-toggle",{open:!0,overlay:h1}))}),o.createSlots({_:2},[o.renderList(o.unref(B),(h1,l1)=>({name:h1,fn:o.withCtx(f1=>[o.renderSlot(d1.$slots,h1,o.normalizeProps(o.guardReactiveProps(f1)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),o.createVNode(f41,o.mergeProps({ref:h1=>{h1&&(N.value[z1]=h1)},"mapped-dates":Y.value(p1),month:o.unref(i)(p1),year:o.unref(s)(p1),instance:p1},d1.$props,{onSelectDate:h1=>o.unref(x)(h1,p1!==1),onHandleSpace:h1=>T(h1,p1!==1),onSetHoverDate:R[3]||(R[3]=h1=>o.unref(H)(h1)),onHandleScroll:h1=>o.unref(g)(h1,p1),onHandleSwipe:h1=>o.unref(y)(h1,p1),onMount:R[4]||(R[4]=h1=>e1(o.unref(G0).calendar)),onResetFlow:R[5]||(R[5]=h1=>d1.$emit("reset-flow")),onTooltipOpen:R[6]||(R[6]=h1=>d1.$emit("tooltip-open",h1)),onTooltipClose:R[7]||(R[7]=h1=>d1.$emit("tooltip-close",h1))}),o.createSlots({_:2},[o.renderList(o.unref(S),(h1,l1)=>({name:h1,fn:o.withCtx(f1=>[o.renderSlot(d1.$slots,h1,o.normalizeProps(o.guardReactiveProps({...f1})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),d1.enableTimePicker?(o.openBlock(),o.createElementBlock("div",d41,[d1.$slots["time-picker"]?o.renderSlot(d1.$slots,"time-picker",o.normalizeProps(o.mergeProps({key:0},{time:o.unref(f),updateTime:o.unref(w)}))):(o.openBlock(),o.createBlock(yb,o.mergeProps({key:1,ref_key:"timePickerRef",ref:q},d1.$props,{hours:o.unref(f).hours,minutes:o.unref(f).minutes,seconds:o.unref(f).seconds,"internal-model-value":d1.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(h),onMount:R[8]||(R[8]=p1=>e1(o.unref(G0).timePicker)),"onUpdate:hours":R[9]||(R[9]=p1=>o.unref(w)(p1)),"onUpdate:minutes":R[10]||(R[10]=p1=>o.unref(w)(p1,!1)),"onUpdate:seconds":R[11]||(R[11]=p1=>o.unref(w)(p1,!1,!0)),onResetFlow:R[12]||(R[12]=p1=>d1.$emit("reset-flow")),onOverlayClosed:R[13]||(R[13]=p1=>n1(p1,!1)),onOverlayOpened:R[14]||(R[14]=p1=>n1(p1,!0)),onAmPmChange:R[15]||(R[15]=p1=>d1.$emit("am-pm-change",p1))}),o.createSlots({_:2},[o.renderList(o.unref(F),(p1,z1)=>({name:p1,fn:o.withCtx(h1=>[o.renderSlot(d1.$slots,p1,o.normalizeProps(o.guardReactiveProps(h1)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):o.createCommentVNode("",!0)],64))}}),m41=(e,t)=>{const a=o.ref(),{defaultedMultiCalendars:r,defaultedConfig:n,defaultedHighlight:c,defaultedRange:i,propDates:s,defaultedFilters:l,defaultedMultiDates:f}=re(e),{modelValue:u,year:d,month:h,calendars:m}=En(e,t),{isDisabled:v}=b0(e),{selectYear:p,groupedYears:g,showYearPicker:y,isDisabled:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M}=gb({modelValue:u,multiCalendars:r,highlight:c,calendars:m,propDates:s,month:h,year:d,filters:l,props:e,emit:t}),w=(S,B)=>[S,B].map(F=>B4(F,"MMMM",{locale:e.formatLocale})).join("-"),z=o.computed(()=>S=>u.value?Array.isArray(u.value)?u.value.some(B=>Jh(S,B)):Jh(u.value,S):!1),H=S=>{if(i.value.enabled){if(Array.isArray(u.value)){const B=l2(S,u.value[0])||l2(S,u.value[1]);return P5(u.value,a.value,S)&&!B}return!1}return!1},A=(S,B)=>S.quarter===Yh(B)&&S.year===n2(B),V=S=>typeof c.value=="function"?c.value({quarter:Yh(S),year:n2(S)}):!!c.value.quarters.find(B=>A(B,S)),k=o.computed(()=>S=>{const B=N2(new Date,{year:d.value(S)});return D11({start:Hl(B),end:Rx(B)}).map(F=>{const e1=$0(F),Y=Gh(F),G=v(F),O=H(e1),T=V(e1);return{text:w(e1,Y),value:e1,active:z.value(e1),highlighted:T,disabled:G,isBetween:O}})}),_=S=>{Wl(S,u,f.value.limit),t("auto-apply",!0)},N=S=>{u.value=ql(u,S,t),I5(u.value,t,e.autoApply,e.modelAuto)},q=S=>{u.value=S,t("auto-apply")};return{defaultedConfig:n,defaultedMultiCalendars:r,groupedYears:g,year:d,isDisabled:x,quarters:k,showYearPicker:y,modelValue:u,setHoverDate:S=>{a.value=S},selectYear:p,selectQuarter:(S,B,F)=>{if(!F)return m.value[B].month=o2(Gh(S)),f.value.enabled?_(S):i.value.enabled?N(S):q(S)},toggleYearPicker:C,handleYearSelect:b,handleYear:M}},p41={class:"dp--quarter-items"},v41=["data-test","disabled","onClick","onMouseover"],g41=o.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...b4},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=z3(c,"yearMode"),{defaultedMultiCalendars:s,defaultedConfig:l,groupedYears:f,year:u,isDisabled:d,quarters:h,modelValue:m,showYearPicker:v,setHoverDate:p,selectQuarter:g,toggleYearPicker:y,handleYearSelect:x,handleYear:C}=m41(n,r);return t({getSidebarProps:()=>({modelValue:m,year:u,selectQuarter:g,handleYearSelect:x,handleYear:C})}),(b,M)=>(o.openBlock(),o.createBlock(R5,{"multi-calendars":o.unref(s).count,collapse:b.collapse,stretch:""},{default:o.withCtx(({instance:w})=>[o.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:o.normalizeStyle({minHeight:`${o.unref(l).modeHeight}px`})},[b.$slots["top-extra"]?o.renderSlot(b.$slots,"top-extra",{key:0,value:b.internalModelValue}):o.createCommentVNode("",!0),o.createElementVNode("div",null,[o.createVNode(mb,o.mergeProps(b.$props,{items:o.unref(f)(w),instance:w,"show-year-picker":o.unref(v)[w],year:o.unref(u)(w),"is-disabled":z=>o.unref(d)(w,z),onHandleYear:z=>o.unref(C)(w,z),onYearSelect:z=>o.unref(x)(z,w),onToggleYearPicker:z=>o.unref(y)(w,z==null?void 0:z.flow,z==null?void 0:z.show)}),o.createSlots({_:2},[o.renderList(o.unref(i),(z,H)=>({name:z,fn:o.withCtx(A=>[o.renderSlot(b.$slots,z,o.normalizeProps(o.guardReactiveProps(A)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),o.createElementVNode("div",p41,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(h)(w),(z,H)=>(o.openBlock(),o.createElementBlock("div",{key:H},[o.createElementVNode("button",{type:"button",class:o.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":z.active,"dp--qr-btn-between":z.isBetween,"dp--qr-btn-disabled":z.disabled,"dp--highlighted":z.highlighted}]),"data-test":z.value,disabled:z.disabled,onClick:A=>o.unref(g)(z.value,w,z.disabled),onMouseover:A=>o.unref(p)(z.value)},[b.$slots.quarter?o.renderSlot(b.$slots,"quarter",{key:0,value:z.value,text:z.text}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(z.text),1)],64))],42,v41)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),y41=["id","aria-label"],x41={key:0,class:"dp--menu-load-container"},b41=o.createElementVNode("span",{class:"dp--menu-loader"},null,-1),C41=[b41],M41={key:0,class:"dp__sidebar_left"},z41=["data-test","onClick","onKeydown"],w41={key:2,class:"dp__sidebar_right"},_41={key:3,class:"dp__action_extra"},om=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...F5,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.ref(null),i=o.computed(()=>{const{openOnTop:l1,...f1}=n;return{...f1,flowStep:H.value,collapse:n.collapse,noOverlayFocus:n.noOverlayFocus,menuWrapRef:c.value}}),{setMenuFocused:s,setShiftKey:l,control:f}=hb(),u=o.useSlots(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:m}=re(n),v=o.ref(null),p=o.ref(0),g=o.ref(null),y=o.ref(!1),x=o.ref(null);o.onMounted(()=>{if(!n.shadow){y.value=!0,C(),window.addEventListener("resize",C);const l1=ke(c);if(l1&&!d.value.enabled&&!h.value.enabled&&(s(!0),q()),l1){const f1=u1=>{m.value.allowPreventDefault&&u1.preventDefault(),r0(u1,m.value,!0)};l1.addEventListener("pointerdown",f1),l1.addEventListener("mousedown",f1)}}}),o.onUnmounted(()=>{window.removeEventListener("resize",C)});const C=()=>{const l1=ke(g);l1&&(p.value=l1.getBoundingClientRect().width)},{arrowRight:b,arrowLeft:M,arrowDown:w,arrowUp:z}=x0(),{flowStep:H,updateFlowStep:A,childMount:V,resetFlow:k}=m31(n,r,x),_=o.computed(()=>n.monthPicker?L31:n.yearPicker?A31:n.timePicker?G31:n.quarterPicker?g41:h41),N=o.computed(()=>{var l1;if(m.value.arrowLeft)return m.value.arrowLeft;const f1=(l1=c.value)==null?void 0:l1.getBoundingClientRect(),u1=n.getInputRect();return u1.width<p.value&&u1.left<=((f1==null?void 0:f1.left)??0)?`${u1.width/2}px`:"50%"}),q=()=>{const l1=ke(c);l1&&l1.focus({preventScroll:!0})},S=o.computed(()=>{var l1;return((l1=x.value)==null?void 0:l1.getSidebarProps())||{}}),B=()=>{n.openOnTop&&r("recalculate-position")},F=z3(u,"action"),e1=o.computed(()=>n.monthPicker||n.yearPicker?z3(u,"monthYear"):n.timePicker?z3(u,"timePicker"):z3(u,"shared")),Y=o.computed(()=>n.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),G=o.computed(()=>({dp__menu_disabled:n.disabled,dp__menu_readonly:n.readonly,"dp-menu-loading":n.loading})),O=o.computed(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,[n.menuClassName]:!!n.menuClassName})),T=l1=>{r0(l1,m.value,!0)},L=()=>{n.escClose&&r("close-picker")},W=l1=>{if(n.arrowNavigation){if(l1===c3.up)return z();if(l1===c3.down)return w();if(l1===c3.left)return M();if(l1===c3.right)return b()}else l1===c3.right||l1===c3.up?n1("handleArrow",c3.left,0,l1===c3.up):n1("handleArrow",c3.right,0,l1===c3.down)},j=l1=>{l(l1.shiftKey),!n.disableMonthYearSelect&&l1.code===te.tab&&l1.target.classList.contains("dp__menu")&&f.value.shiftKeyInMenu&&(l1.preventDefault(),r0(l1,m.value,!0),r("close-picker"))},E=()=>{q(),r("time-picker-close")},I=l1=>{var f1,u1,g1;(f1=x.value)==null||f1.toggleTimePicker(!1,!1),(u1=x.value)==null||u1.toggleMonthPicker(!1,!1,l1),(g1=x.value)==null||g1.toggleYearPicker(!1,!1,l1)},a1=(l1,f1=0)=>{var u1,g1,k1;return l1==="month"?(u1=x.value)==null?void 0:u1.toggleMonthPicker(!1,!0,f1):l1==="year"?(g1=x.value)==null?void 0:g1.toggleYearPicker(!1,!0,f1):l1==="time"?(k1=x.value)==null?void 0:k1.toggleTimePicker(!0,!1):I(f1)},n1=(l1,...f1)=>{var u1,g1;(u1=x.value)!=null&&u1[l1]&&((g1=x.value)==null||g1[l1](...f1))},t1=()=>{n1("selectCurrentDate")},d1=(l1,f1)=>{n1("presetDate",l1,f1)},R=()=>{n1("clearHoverDate")},p1=(l1,f1)=>{n1("updateMonthYear",l1,f1)},z1=(l1,f1)=>{l1.preventDefault(),W(f1)},h1=l1=>{if(j(l1),l1.key===te.home||l1.key===te.end)return n1("selectWeekDate",l1.key===te.home);if(l1.key===te.pageUp||l1.key===te.pageDown)return l1.shiftKey?n1("changeYear",l1.key===te.pageUp):n1("changeMonth",l1.key===te.pageUp);switch(l1.key){case te.esc:return L();case te.arrowLeft:return z1(l1,c3.left);case te.arrowRight:return z1(l1,c3.right);case te.arrowUp:return z1(l1,c3.up);case te.arrowDown:return z1(l1,c3.down);default:return}};return t({updateMonthYear:p1,switchView:a1}),(l1,f1)=>{var u1,g1,k1;return o.openBlock(),o.createElementBlock("div",{id:l1.uid?`dp-menu-${l1.uid}`:void 0,ref_key:"dpMenuRef",ref:c,tabindex:"0",role:"dialog","aria-label":(u1=l1.ariaLabels)==null?void 0:u1.menu,class:o.normalizeClass(O.value),style:o.normalizeStyle({"--dp-arrow-left":N.value}),onMouseleave:R,onClick:T,onKeydown:h1},[(l1.disabled||l1.readonly)&&o.unref(h).enabled||l1.loading?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(G.value)},[l1.loading?(o.openBlock(),o.createElementBlock("div",x41,C41)):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),!o.unref(h).enabled&&!l1.teleportCenter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(Y.value)},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"innerMenuRef",ref:g,class:o.normalizeClass({dp__menu_content_wrapper:((g1=l1.presetDates)==null?void 0:g1.length)||!!l1.$slots["left-sidebar"]||!!l1.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((k1=l1.presetDates)==null?void 0:k1.length)||!!l1.$slots["left-sidebar"]||!!l1.$slots["right-sidebar"])}),style:o.normalizeStyle({"--dp-menu-width":`${p.value}px`})},[l1.$slots["left-sidebar"]?(o.openBlock(),o.createElementBlock("div",M41,[o.renderSlot(l1.$slots,"left-sidebar",o.normalizeProps(o.guardReactiveProps(S.value)))])):o.createCommentVNode("",!0),l1.presetDates.length?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l1.presetDates,(b1,H1)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:H1},[b1.slot?o.renderSlot(l1.$slots,b1.slot,{key:0,presetDate:d1,label:b1.label,value:b1.value}):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",style:o.normalizeStyle(b1.style||{}),class:o.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test":b1.testId??void 0,onClick:o.withModifiers(F1=>d1(b1.value,b1.noTz),["prevent"]),onKeydown:F1=>o.unref(y3)(F1,()=>d1(b1.value,b1.noTz),!0)},o.toDisplayString(b1.label),47,z41))],64))),128))],2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:v,class:"dp__instance_calendar",role:"document"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(_.value),o.mergeProps({ref_key:"dynCmpRef",ref:x},i.value,{"flow-step":o.unref(H),onMount:o.unref(V),onUpdateFlowStep:o.unref(A),onResetFlow:o.unref(k),onFocusMenu:q,onSelectDate:f1[0]||(f1[0]=b1=>l1.$emit("select-date")),onDateUpdate:f1[1]||(f1[1]=b1=>l1.$emit("date-update",b1)),onTooltipOpen:f1[2]||(f1[2]=b1=>l1.$emit("tooltip-open",b1)),onTooltipClose:f1[3]||(f1[3]=b1=>l1.$emit("tooltip-close",b1)),onAutoApply:f1[4]||(f1[4]=b1=>l1.$emit("auto-apply",b1)),onRangeStart:f1[5]||(f1[5]=b1=>l1.$emit("range-start",b1)),onRangeEnd:f1[6]||(f1[6]=b1=>l1.$emit("range-end",b1)),onInvalidFixedRange:f1[7]||(f1[7]=b1=>l1.$emit("invalid-fixed-range",b1)),onTimeUpdate:f1[8]||(f1[8]=b1=>l1.$emit("time-update")),onAmPmChange:f1[9]||(f1[9]=b1=>l1.$emit("am-pm-change",b1)),onTimePickerOpen:f1[10]||(f1[10]=b1=>l1.$emit("time-picker-open",b1)),onTimePickerClose:E,onRecalculatePosition:B,onUpdateMonthYear:f1[11]||(f1[11]=b1=>l1.$emit("update-month-year",b1)),onAutoApplyInvalid:f1[12]||(f1[12]=b1=>l1.$emit("auto-apply-invalid",b1)),onInvalidDate:f1[13]||(f1[13]=b1=>l1.$emit("invalid-date",b1)),onOverlayToggle:f1[14]||(f1[14]=b1=>l1.$emit("overlay-toggle",b1)),"onUpdate:internalModelValue":f1[15]||(f1[15]=b1=>l1.$emit("update:internal-model-value",b1))}),o.createSlots({_:2},[o.renderList(e1.value,(b1,H1)=>({name:b1,fn:o.withCtx(F1=>[o.renderSlot(l1.$slots,b1,o.normalizeProps(o.guardReactiveProps({...F1})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),l1.$slots["right-sidebar"]?(o.openBlock(),o.createElementBlock("div",w41,[o.renderSlot(l1.$slots,"right-sidebar",o.normalizeProps(o.guardReactiveProps(S.value)))])):o.createCommentVNode("",!0),l1.$slots["action-extra"]?(o.openBlock(),o.createElementBlock("div",_41,[l1.$slots["action-extra"]?o.renderSlot(l1.$slots,"action-extra",{key:0,selectCurrentDate:t1}):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],6),!l1.autoApply||o.unref(m).keepActionRow?(o.openBlock(),o.createBlock(C31,o.mergeProps({key:2,"menu-mount":y.value},i.value,{"calendar-width":p.value,onClosePicker:f1[16]||(f1[16]=b1=>l1.$emit("close-picker")),onSelectDate:f1[17]||(f1[17]=b1=>l1.$emit("select-date")),onInvalidSelect:f1[18]||(f1[18]=b1=>l1.$emit("invalid-select")),onSelectNow:t1}),o.createSlots({_:2},[o.renderList(o.unref(F),(b1,H1)=>({name:b1,fn:o.withCtx(F1=>[o.renderSlot(l1.$slots,b1,o.normalizeProps(o.guardReactiveProps({...F1})))])}))]),1040,["menu-mount","calendar-width"])):o.createCommentVNode("",!0)],46,y41)}}}),k41=typeof window<"u"?window:void 0,ds=()=>{},H41=e=>o.getCurrentScope()?(o.onScopeDispose(e),!0):!1,V41=(e,t,a,r)=>{if(!e)return ds;let n=ds;const c=o.watch(()=>o.unref(e),s=>{n(),s&&(s.addEventListener(t,a,r),n=()=>{s.removeEventListener(t,a,r),n=ds})},{immediate:!0,flush:"post"}),i=()=>{c(),n()};return H41(i),i},L41=(e,t,a,r={})=>{const{window:n=k41,event:c="pointerdown"}=r;return n?V41(n,c,i=>{const s=ke(e),l=ke(t);!s||!l||s===i.target||i.composedPath().includes(s)||i.composedPath().includes(l)||a(i)},{passive:!0}):void 0},S41=o.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...F5},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=o.ref(!1),s=o.toRef(n,"modelValue"),l=o.toRef(n,"timezone"),f=o.ref(null),u=o.ref(null),d=o.ref(null),h=o.ref(!1),m=o.ref(null),v=o.ref(!1),p=o.ref(!1),g=o.ref(!1),{setMenuFocused:y,setShiftKey:x}=hb(),{clearArrowNav:C}=x0(),{validateDate:b,isValidTime:M}=b0(n),{defaultedTransitions:w,defaultedTextInput:z,defaultedInline:H,defaultedConfig:A,defaultedRange:V,defaultedMultiDates:k}=re(n),{menuTransition:_,showTransition:N}=Tn(w);o.onMounted(()=>{W(n.modelValue),o.nextTick().then(()=>{if(!H.value.enabled){const m1=G(m.value);m1==null||m1.addEventListener("scroll",z1),window==null||window.addEventListener("resize",h1)}}),H.value.enabled&&(i.value=!0),window==null||window.addEventListener("keyup",l1),window==null||window.addEventListener("keydown",f1)}),o.onUnmounted(()=>{if(!H.value.enabled){const m1=G(m.value);m1==null||m1.removeEventListener("scroll",z1),window==null||window.removeEventListener("resize",h1)}window==null||window.removeEventListener("keyup",l1),window==null||window.removeEventListener("keydown",f1)});const q=z3(c,"all",n.presetDates),S=z3(c,"input");o.watch([s,l],()=>{W(s.value)},{deep:!0});const{openOnTop:B,menuStyle:F,xCorrect:e1,setMenuPosition:Y,getScrollableParent:G,shadowRender:O}=f31({menuRef:f,menuRefInner:u,inputRef:d,pickerWrapperRef:m,inline:H,emit:r,props:n,slots:c}),{inputValue:T,internalModelValue:L,parseExternalModelValue:W,emitModelValue:j,formatInputValue:E,checkBeforeEmit:I}=o31(r,n,h),a1=o.computed(()=>({dp__main:!0,dp__theme_dark:n.dark,dp__theme_light:!n.dark,dp__flex_display:H.value.enabled,"dp--flex-display-collapsed":g.value,dp__flex_display_with_input:H.value.input})),n1=o.computed(()=>n.dark?"dp__theme_dark":"dp__theme_light"),t1=o.computed(()=>n.teleport?{to:typeof n.teleport=="boolean"?"body":n.teleport,disabled:!n.teleport||H.value.enabled}:{}),d1=o.computed(()=>({class:"dp__outer_menu_wrap"})),R=o.computed(()=>H.value.enabled&&(n.timePicker||n.monthPicker||n.yearPicker||n.quarterPicker)),p1=()=>{var m1,S1;return(S1=(m1=d.value)==null?void 0:m1.$el)==null?void 0:S1.getBoundingClientRect()},z1=()=>{i.value&&(A.value.closeOnScroll?K1():Y())},h1=()=>{var m1;i.value&&Y();const S1=(m1=u.value)==null?void 0:m1.$el.getBoundingClientRect().width;g.value=document.body.offsetWidth<=S1},l1=m1=>{m1.key==="Tab"&&!H.value.enabled&&!n.teleport&&A.value.tabOutClosesMenu&&(m.value.contains(document.activeElement)||K1()),p.value=m1.shiftKey},f1=m1=>{p.value=m1.shiftKey},u1=()=>{!n.disabled&&!n.readonly&&(O(om,n),Y(!1),i.value=!0,i.value&&r("open"),i.value||W1(),W(n.modelValue))},g1=()=>{var m1;T.value="",W1(),(m1=d.value)==null||m1.setParsedDate(null),r("update:model-value",null),r("update:model-timezone-value",null),r("cleared"),A.value.closeOnClearValue&&K1()},k1=()=>{const m1=L.value;return!m1||!Array.isArray(m1)&&b(m1)?!0:Array.isArray(m1)?k.value.enabled||m1.length===2&&b(m1[0])&&b(m1[1])?!0:V.value.partialRange&&!n.timePicker?b(m1[0]):!1:!1},b1=()=>{I()&&k1()?(j(),K1()):r("invalid-select",L.value)},H1=m1=>{F1(),j(),A.value.closeOnAutoApply&&!m1&&K1()},F1=()=>{d.value&&z.value.enabled&&d.value.setParsedDate(L.value)},$1=(m1=!1)=>{n.autoApply&&M(L.value)&&k1()&&(V.value.enabled&&Array.isArray(L.value)?(V.value.partialRange||L.value.length===2)&&H1(m1):H1(m1))},W1=()=>{z.value.enabled||(L.value=null)},K1=()=>{H.value.enabled||(i.value&&(i.value=!1,e1.value=!1,y(!1),x(!1),C(),r("closed"),T.value&&W(s.value)),W1(),r("blur"))},d2=(m1,S1,T1=!1)=>{if(!m1){L.value=null;return}const Q1=Array.isArray(m1)?!m1.some(we=>!b(we)):b(m1),Q2=M(m1);Q1&&Q2&&(L.value=m1,S1&&(v.value=T1,b1(),r("text-submit")))},G1=()=>{n.autoApply&&M(L.value)&&j(),F1()},j2=()=>i.value?K1():u1(),O1=m1=>{L.value=m1},c2=()=>{z.value.enabled&&(h.value=!0,E()),r("focus")},Y2=()=>{if(z.value.enabled&&(h.value=!1,W(n.modelValue),v.value)){const m1=Oe1(m.value,p.value);m1==null||m1.focus()}r("blur")},m2=m1=>{u.value&&u.value.updateMonthYear(0,{month:tm(m1.month),year:tm(m1.year)})},A2=m1=>{W(m1??n.modelValue)},Pe=(m1,S1)=>{var T1;(T1=u.value)==null||T1.switchView(m1,S1)},y1=m1=>A.value.onClickOutside?A.value.onClickOutside(m1):K1();return L41(f,d,()=>y1(k1)),t({closeMenu:K1,selectDate:b1,clearValue:g1,openMenu:u1,onScroll:z1,formatInputValue:E,updateInternalModelValue:O1,setMonthYear:m2,parseModel:A2,switchView:Pe,toggleMenu:j2}),(m1,S1)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:m,class:o.normalizeClass(a1.value),"data-datepicker-instance":""},[o.createVNode(y31,o.mergeProps({ref_key:"inputRef",ref:d,"input-value":o.unref(T),"onUpdate:inputValue":S1[0]||(S1[0]=T1=>o.isRef(T)?T.value=T1:null),"is-menu-open":i.value},m1.$props,{onClear:g1,onOpen:u1,onSetInputDate:d2,onSetEmptyDate:o.unref(j),onSelectDate:b1,onToggle:j2,onClose:K1,onFocus:c2,onBlur:Y2,onRealBlur:S1[1]||(S1[1]=T1=>h.value=!1)}),o.createSlots({_:2},[o.renderList(o.unref(S),(T1,Q1)=>({name:T1,fn:o.withCtx(Q2=>[o.renderSlot(m1.$slots,T1,o.normalizeProps(o.guardReactiveProps(Q2)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(m1.teleport?o.Teleport:"div"),o.normalizeProps(o.guardReactiveProps(t1.value)),{default:o.withCtx(()=>[o.createVNode(o.Transition,{name:o.unref(_)(o.unref(B)),css:o.unref(N)&&!o.unref(H).enabled},{default:o.withCtx(()=>[i.value?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:f},d1.value,{class:{"dp--menu-wrapper":!o.unref(H).enabled},style:o.unref(H).enabled?void 0:o.unref(F)}),[o.createVNode(om,o.mergeProps({ref_key:"dpMenuRef",ref:u},m1.$props,{"internal-model-value":o.unref(L),"onUpdate:internalModelValue":S1[2]||(S1[2]=T1=>o.isRef(L)?L.value=T1:null),class:{[n1.value]:!0,"dp--menu-wrapper":m1.teleport},"open-on-top":o.unref(B),"no-overlay-focus":R.value,collapse:g.value,"get-input-rect":p1,onClosePicker:K1,onSelectDate:b1,onAutoApply:$1,onTimeUpdate:G1,onFlowStep:S1[3]||(S1[3]=T1=>m1.$emit("flow-step",T1)),onUpdateMonthYear:S1[4]||(S1[4]=T1=>m1.$emit("update-month-year",T1)),onInvalidSelect:S1[5]||(S1[5]=T1=>m1.$emit("invalid-select",o.unref(L))),onAutoApplyInvalid:S1[6]||(S1[6]=T1=>m1.$emit("invalid-select",T1)),onInvalidFixedRange:S1[7]||(S1[7]=T1=>m1.$emit("invalid-fixed-range",T1)),onRecalculatePosition:o.unref(Y),onTooltipOpen:S1[8]||(S1[8]=T1=>m1.$emit("tooltip-open",T1)),onTooltipClose:S1[9]||(S1[9]=T1=>m1.$emit("tooltip-close",T1)),onTimePickerOpen:S1[10]||(S1[10]=T1=>m1.$emit("time-picker-open",T1)),onTimePickerClose:S1[11]||(S1[11]=T1=>m1.$emit("time-picker-close",T1)),onAmPmChange:S1[12]||(S1[12]=T1=>m1.$emit("am-pm-change",T1)),onRangeStart:S1[13]||(S1[13]=T1=>m1.$emit("range-start",T1)),onRangeEnd:S1[14]||(S1[14]=T1=>m1.$emit("range-end",T1)),onDateUpdate:S1[15]||(S1[15]=T1=>m1.$emit("date-update",T1)),onInvalidDate:S1[16]||(S1[16]=T1=>m1.$emit("invalid-date",T1)),onOverlayToggle:S1[17]||(S1[17]=T1=>m1.$emit("overlay-toggle",T1))}),o.createSlots({_:2},[o.renderList(o.unref(q),(T1,Q1)=>({name:T1,fn:o.withCtx(Q2=>[o.renderSlot(m1.$slots,T1,o.normalizeProps(o.guardReactiveProps({...Q2})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","onRecalculatePosition"])],16)):o.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),jl=(()=>{const e=S41;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),A41=Object.freeze(Object.defineProperty({__proto__:null,default:jl},Symbol.toStringTag,{value:"Module"}));Object.entries(A41).forEach(([e,t])=>{e!=="default"&&(jl[e]=t)});const T41=o.defineComponent({__name:"PgaVueDatePicker",props:o.mergeModels({yearPicker:{type:Boolean},monthPicker:{type:Boolean},range:{type:Boolean},enableTimePicker:{type:Boolean},notClearable:{type:Boolean},disabled:{type:Boolean},format:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({cc305282:o.unref(r).input.borderColor,"883a9e94":o.unref(r).input.borderRadius,"6c15f2fd":o.unref(r).input.backgroundColor,"58b376ce":o.unref(r).input.backgroundColorDisabled,"3e8b660d":o.unref(r).input.colorFocus}));const t=o.useModel(e,"modelValue"),a=_2("pgaForm"),{form:r}=$e(),n=o.ref(!1);return(c,i)=>(o.openBlock(),o.createBlock(o.unref(jl),{class:o.normalizeClass(["date-picker",{"date-picker__disabled":c.disabled,"date-picker__open":n.value}]),modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=s=>t.value=s),disabled:c.disabled,clearable:!c.notClearable,yearPicker:c.yearPicker,monthPicker:c.monthPicker,range:c.range,enableTimePicker:c.enableTimePicker,timePickerInline:"",is24:"",teleport:!0,locale:o.unref(h4)().language,format:c.format,previewFormat:c.format,cancelText:o.unref(a)("cancelBtn"),selectText:o.unref(a)("selectBtn"),onOpen:i[1]||(i[1]=s=>n.value=!0),onBlur:i[2]||(i[2]=s=>n.value=!1)},null,8,["class","modelValue","disabled","clearable","yearPicker","monthPicker","range","enableTimePicker","locale","format","previewFormat","cancelText","selectText"]))}});const Dn=R1(T41,[["__scopeId","data-v-94c456f9"]]),E41=o.defineComponent({__name:"PgaDatePicker",props:o.mergeModels({isDateModel:{type:Boolean},label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue"),a=e,r=o.computed({get(){const c=t.value;if(!c)return null;if(c instanceof Date)return c;const[i,s,l]=c.split("-").map(Number);return new Date(i,s-1,l)},set(c){if(!c){t.value=null;return}if(a.isDateModel){t.value=c;return}t.value=c.toISOString().split("T")[0]}});function n(c){return m4(c,{format:"numeric",withTime:!1})}return(c,i)=>(o.openBlock(),o.createBlock(A3,{label:c.label,withRequiredLabel:c.withRequiredLabel,withOptionalLabel:c.withOptionalLabel,withLabelSpace:c.withLabelSpace,description:c.description,errors:c.errors,grow:c.grow},{default:o.withCtx(()=>[o.createVNode(Dn,{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=s=>r.value=s),disabled:c.disabled,notClearable:c.notClearable,format:n},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}}),N41=o.defineComponent({__name:"PgaDatetimePicker",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");function a(r){return m4(r,{format:"short",withTime:!0})}return(r,n)=>(o.openBlock(),o.createBlock(A3,{label:r.label,withRequiredLabel:r.withRequiredLabel,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,description:r.description,errors:r.errors,grow:r.grow},{default:o.withCtx(()=>[o.createVNode(Dn,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=c=>t.value=c),enableTimePicker:"",disabled:r.disabled,notClearable:r.notClearable,format:a},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}}),D41={class:"icons-container"},O41=o.defineComponent({__name:"PgaIconSelector",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(n=>({"1d063eb6":o.unref(a).input.padding,"226faebc":o.unref(a).input.borderColor,"4455d859":o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=$e(),r=["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(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createElementVNode("div",D41,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,i=>o.createVNode(L2,{key:i,icon:i,variant:t.value===i?"outlined":"flat",color:t.value===i?"primary":"first",width:"2.5rem",disabled:n.disabled,onClick:s=>t.value=i},null,8,["icon","variant","color","disabled","onClick"])),64))])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const P41=R1(O41,[["__scopeId","data-v-b927e62b"]]),B41=["accept","multiple","disabled"],F41={class:"input-file--label-container"},R41=o.defineComponent({__name:"PgaInputFile",props:{formats:{},multiple:{type:Boolean},disabled:{type:Boolean},selectFileLabel:{type:[String,Number,Function]},isLoading:{type:Boolean}},emits:["newFile","newFiles"],setup(e,{expose:t,emit:a}){o.useCssVars(b=>({"6e9c5da8":o.unref(c).input.borderColor,"7dbf06ed":o.unref(c).input.borderRadius,"33eadd66":o.unref(c).input.backgroundColor,"7f906b76":o.unref(c).input.backgroundColorHover,"35fa93fc":o.unref(c).input.backgroundColorDisabled}));const r=e,n=a;t({click:y,resetInput:x});const{form:c}=$e(),i=_2("pgaForm"),s=o.ref(),l=o.ref([]),f=o.ref(!1),u=o.ref(!1),d=o.computed(()=>r.disabled||r.isLoading),h=o.computed(()=>!!l.value.length),m=o.computed(()=>{if(!r.formats)return!0;for(const b of l.value){const M=b.name.split(".").pop();if(!r.formats.includes(M))return!1}return!0}),v=o.computed(()=>r.formats?r.formats.map(b=>`.${b}`).join(","):"*"),p=o.computed(()=>{const b={icon:"upload"};return!h.value||f.value&&!u.value&&!d.value?b:m.value?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}}),g=o.computed(()=>h.value?l.value.map(b=>b.name).join(", "):r.selectFileLabel?r.selectFileLabel:r.multiple?i("selectFilesLabel"):i("selectFileLabel"));function y(){var b;(b=s.value)==null||b.click()}function x(){l.value=[],s.value&&(s.value.value="")}function C(b){f.value=!1;const w=b.target.files;if(w.length){if(l.value=[...w],!m.value){T4("danger",()=>i("newFileError"));return}n("newFile",w[0]),n("newFiles",[...w])}}return(b,M)=>(o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(["pga-input-file",{"pga-input-file__disabled":d.value}]),onMouseenter:M[4]||(M[4]=w=>f.value=!0),onMouseleave:M[5]||(M[5]=w=>f.value=!1)},[b.isLoading?(o.openBlock(),o.createBlock(Lt,{key:0})):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("input",{ref_key:"inputRef",ref:s,class:"input-file--input",type:"file",accept:v.value,multiple:b.multiple,disabled:d.value,onChange:M[0]||(M[0]=w=>C(w))},null,40,B41),o.createVNode(Oe,{class:"input-file--icon",icon:p.value.icon,color:p.value.color},null,8,["icon","color"]),o.createElementVNode("div",F41,[o.createVNode(ye,{text:g.value},null,8,["text"])]),h.value?(o.openBlock(),o.createBlock(L2,{key:0,text:o.unref(i)("removeBtn"),variant:"flat",color:"danger",size:"s",disabled:d.value,onMouseenter:M[1]||(M[1]=w=>u.value=!0),onMouseleave:M[2]||(M[2]=w=>u.value=!1),onClick:M[3]||(M[3]=o.withModifiers(w=>x(),["prevent"]))},null,8,["text","disabled"])):o.createCommentVNode("",!0)],64))],34))}});const $5=R1(R41,[["__scopeId","data-v-3b0655c7"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var bb=1252,I41=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Yl={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},Gl=function(e){I41.indexOf(e)!=-1&&(bb=Yl[0]=e)};function $41(){Gl(1252)}var c4=function(e){Gl(e)};function Cb(){c4(1200),$41()}function lm(e){for(var t=[],a=0,r=e.length;a<r;++a)t[a]=e.charCodeAt(a);return t}function U41(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a)+(e.charCodeAt(2*a+1)<<8));return t.join("")}function Mb(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a+1)+(e.charCodeAt(2*a)<<8));return t.join("")}var Qa=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1);return t==255&&a==254?U41(e.slice(2)):t==254&&a==255?Mb(e.slice(2)):t==65279?e.slice(1):e},k8=function(t){return String.fromCharCode(t)},fm=function(t){return String.fromCharCode(t)},It,Kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function um(e){for(var t="",a=0,r=0,n=0,c=0,i=0,s=0,l=0,f=0;f<e.length;)a=e.charCodeAt(f++),c=a>>2,r=e.charCodeAt(f++),i=(a&3)<<4|r>>4,n=e.charCodeAt(f++),s=(r&15)<<2|n>>6,l=n&63,isNaN(r)?s=l=64:isNaN(n)&&(l=64),t+=Kt.charAt(c)+Kt.charAt(i)+Kt.charAt(s)+Kt.charAt(l);return t}function H3(e){var t="",a=0,r=0,n=0,c=0,i=0,s=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f<e.length;)c=Kt.indexOf(e.charAt(f++)),i=Kt.indexOf(e.charAt(f++)),a=c<<2|i>>4,t+=String.fromCharCode(a),s=Kt.indexOf(e.charAt(f++)),r=(i&15)<<4|s>>2,s!==64&&(t+=String.fromCharCode(r)),l=Kt.indexOf(e.charAt(f++)),n=(s&3)<<6|l,l!==64&&(t+=String.fromCharCode(n));return t}var h2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),y6=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,a){return a?new Buffer(t,a):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function m0(e){return h2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function dm(e){return h2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var t4=function(t){return h2?y6(t,"binary"):t.split("").map(function(a){return a.charCodeAt(0)&255})};function x6(e){if(Array.isArray(e))return e.map(function(r){return String.fromCharCode(r)}).join("");for(var t=[],a=0;a<e.length;++a)t[a]=String.fromCharCode(e[a]);return t.join("")}function Xl(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Xl(new Uint8Array(e));for(var t=new Array(e.length),a=0;a<e.length;++a)t[a]=e[a];return t}var $t=h2?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:y6(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,a=0;for(t=0;t<e.length;++t)a+=e[t].length;var r=new Uint8Array(a),n=0;for(t=0,a=0;t<e.length;a+=n,++t)if(n=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],a);else{if(typeof e[t]=="string")throw"wtf";r.set(new Uint8Array(e[t]),a)}return r}return[].concat.apply([],e.map(function(c){return Array.isArray(c)?c:[].slice.call(c)}))};function W41(e){for(var t=[],a=0,r=e.length+250,n=m0(e.length+255),c=0;c<e.length;++c){var i=e.charCodeAt(c);if(i<128)n[a++]=i;else if(i<2048)n[a++]=192|i>>6&31,n[a++]=128|i&63;else if(i>=55296&&i<57344){i=(i&1023)+64;var s=e.charCodeAt(++c)&1023;n[a++]=240|i>>8&7,n[a++]=128|i>>2&63,n[a++]=128|s>>6&15|(i&3)<<4,n[a++]=128|s&63}else n[a++]=224|i>>12&15,n[a++]=128|i>>6&63,n[a++]=128|i&63;a>r&&(t.push(n.slice(0,a)),a=0,n=m0(65535),r=65530)}return t.push(n.slice(0,a)),$t(t)}var l3=/\u0000/g,Ja=/[\u0001-\u0006]/g;function j6(e){for(var t="",a=e.length-1;a>=0;)t+=e.charAt(a--);return t}function i4(e,t){var a=""+e;return a.length>=t?a:ce("0",t-a.length)+a}function Kl(e,t){var a=""+e;return a.length>=t?a:ce(" ",t-a.length)+a}function Wc(e,t){var a=""+e;return a.length>=t?a:a+ce(" ",t-a.length)}function q41(e,t){var a=""+Math.round(e);return a.length>=t?a:ce("0",t-a.length)+a}function j41(e,t){var a=""+e;return a.length>=t?a:ce("0",t-a.length)+a}var hm=Math.pow(2,32);function S6(e,t){if(e>hm||e<-hm)return q41(e,t);var a=Math.round(e);return j41(a,t)}function qc(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var mm=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],hs=[["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 Y41(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 e2={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"秒 "'},pm={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},G41={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 jc(e,t,a){for(var r=e<0?-1:1,n=e*r,c=0,i=1,s=0,l=1,f=0,u=0,d=Math.floor(n);f<t&&(d=Math.floor(n),s=d*i+c,u=d*f+l,!(n-d<5e-8));)n=1/(n-d),c=i,i=s,l=f,f=u;if(u>t&&(f>t?(u=l,s=c):(u=f,s=i)),!a)return[0,r*s,u];var h=Math.floor(r*s/u);return[h,r*s-h*u,u]}function U0(e,t,a){if(e>2958465||e<0)return null;var r=e|0,n=Math.floor(86400*(e-r)),c=0,i=[],s={D:r,T:n,u:86400*(e-r)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(r+=1462),s.u>.9999&&(s.u=0,++n==86400&&(s.T=n=0,++r,++s.D)),r===60)i=a?[1317,10,29]:[1900,2,29],c=3;else if(r===0)i=a?[1317,8,29]:[1900,1,0],c=6;else{r>60&&--r;var l=new Date(1900,0,1);l.setDate(l.getDate()+r-1),i=[l.getFullYear(),l.getMonth()+1,l.getDate()],c=l.getDay(),r<60&&(c=(c+6)%7),a&&(c=et1(l,i))}return s.y=i[0],s.m=i[1],s.d=i[2],s.S=n%60,n=Math.floor(n/60),s.M=n%60,n=Math.floor(n/60),s.H=n,s.q=c,s}var zb=new Date(1899,11,31,0,0,0),X41=zb.getTime(),K41=new Date(1900,2,1,0,0,0);function wb(e,t){var a=e.getTime();return t?a-=1461*24*60*60*1e3:e>=K41&&(a+=24*60*60*1e3),(a-(X41+(e.getTimezoneOffset()-zb.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Zl(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function Z41(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function Q41(e){var t=e<0?12:11,a=Zl(e.toFixed(12));return a.length<=t||(a=e.toPrecision(10),a.length<=t)?a:e.toExponential(5)}function J41(e){var t=Zl(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function rn(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),a;return t>=-4&&t<=-1?a=e.toPrecision(10+t):Math.abs(t)<=9?a=Q41(e):t===10?a=e.toFixed(10).substr(0,12):a=J41(e),Zl(Z41(a.toUpperCase()))}function s6(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):rn(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return I3(14,wb(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function et1(e,t){t[0]-=581;var a=e.getDay();return e<60&&(a=(a+6)%7),a}function tt1(e,t,a,r){var n="",c=0,i=0,s=a.y,l,f=0;switch(e){case 98:s=a.y+543;case 121:switch(t.length){case 1:case 2:l=s%100,f=2;break;default:l=s%1e4,f=4;break}break;case 109:switch(t.length){case 1:case 2:l=a.m,f=t.length;break;case 3:return hs[a.m-1][1];case 5:return hs[a.m-1][0];default:return hs[a.m-1][2]}break;case 100:switch(t.length){case 1:case 2:l=a.d,f=t.length;break;case 3:return mm[a.q][0];default:return mm[a.q][1]}break;case 104:switch(t.length){case 1:case 2:l=1+(a.H+11)%12,f=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:l=a.H,f=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:l=a.M,f=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return a.u===0&&(t=="s"||t=="ss")?i4(a.S,t.length):(r>=2?i=r===3?1e3:100:i=r===1?10:1,c=Math.round(i*(a.S+a.u)),c>=60*i&&(c=0),t==="s"?c===0?"0":""+c/i:(n=i4(c,2+r),t==="ss"?n.substr(0,2):"."+n.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":l=a.D*24+a.H;break;case"[m]":case"[mm]":l=(a.D*24+a.H)*60+a.M;break;case"[s]":case"[ss]":l=((a.D*24+a.H)*60+a.M)*60+Math.round(a.S+a.u);break;default:throw"bad abstime format: "+t}f=t.length===3?1:2;break;case 101:l=s,f=1;break}var u=f>0?i4(l,f):"";return u}function Zt(e){var t=3;if(e.length<=t)return e;for(var a=e.length%t,r=e.substr(0,a);a!=e.length;a+=t)r+=(r.length>0?",":"")+e.substr(a,t);return r}var _b=/%/g;function at1(e,t,a){var r=t.replace(_b,""),n=t.length-r.length;return yt(e,r,a*Math.pow(10,2*n))+ce("%",n)}function rt1(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return yt(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function kb(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+kb(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var c=Math.floor(Math.log(t)*Math.LOG10E)%n;if(c<0&&(c+=n),a=(t/Math.pow(10,c)).toPrecision(r+1+(n+c)%n),a.indexOf("e")===-1){var i=Math.floor(Math.log(t)*Math.LOG10E);for(a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+c):a+="E+"+(i-c);a.substr(0,2)==="0.";)a=a.charAt(0)+a.substr(2,n)+"."+a.substr(2+n),a=a.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(n+c)%n)+"."+u.substr(c)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}var Hb=/# (\?+)( ?)\/( ?)(\d+)/;function nt1(e,t,a){var r=parseInt(e[4],10),n=Math.round(t*r),c=Math.floor(n/r),i=n-c*r,s=r;return a+(c===0?"":""+c)+" "+(i===0?ce(" ",e[1].length+1+e[4].length):Kl(i,e[1].length)+e[2]+"/"+e[3]+i4(s,e[4].length))}function ct1(e,t,a){return a+(t===0?"":""+t)+ce(" ",e[1].length+2+e[4].length)}var Vb=/^#*0*\.([0#]+)/,Lb=/\).*[0#]/,Sb=/\(###\) ###\\?-####/;function i3(e){for(var t="",a,r=0;r!=e.length;++r)switch(a=e.charCodeAt(r)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(a)}return t}function vm(e,t){var a=Math.pow(10,t);return""+Math.round(e*a)/a}function gm(e,t){var a=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(a*r)).length?0:Math.round(a*r)}function it1(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function st1(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function O3(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Lb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?O3("n",r,a):"("+O3("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return rt1(e,t,a);if(t.indexOf("%")!==-1)return at1(e,t,a);if(t.indexOf("E")!==-1)return kb(t,a);if(t.charCodeAt(0)===36)return"$"+O3(e,t.substr(t.charAt(1)==" "?2:1),a);var n,c,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+S6(l,t.length);if(t.match(/^[#?]+$/))return n=S6(a,0),n==="0"&&(n=""),n.length>t.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(Hb))return nt1(c,l,f);if(t.match(/^#+0+$/))return f+S6(l,t.length-t.indexOf("0"));if(c=t.match(Vb))return n=vm(a,c[1].length).replace(/^([^\.]+)$/,"$1."+i3(c[1])).replace(/\.$/,"."+i3(c[1])).replace(/\.(\d*)$/,function(v,p){return"."+p+ce("0",i3(c[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),c=t.match(/^(0*)\.(#*)$/))return f+vm(l,c[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,c[1].length?"0.":".");if(c=t.match(/^#{1,3},##0(\.?)$/))return f+Zt(S6(l,0));if(c=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+O3(e,t,-a):Zt(""+(Math.floor(a)+it1(a,c[1].length)))+"."+i4(gm(a,c[1].length),c[1].length);if(c=t.match(/^#,#*,#0/))return O3(e,t.replace(/^#,#*,/,""),a);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=j6(O3(e,t.replace(/[\\-]/g,""),a)),i=0,j6(j6(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return i<n.length?n.charAt(i++):v==="0"?"0":""}));if(t.match(Sb))return n=O3(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var u="";if(c=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(c[4].length,7),s=jc(l,Math.pow(10,i)-1,!1),n=""+f,u=yt("n",c[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),n+=u+c[2]+"/"+c[3],u=Wc(s[2],i),u.length<c[4].length&&(u=i3(c[4].substr(c[4].length-u.length))+u),n+=u,n;if(c=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(c[1].length,c[4].length),7),s=jc(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Kl(s[1],i)+c[2]+"/"+c[3]+Wc(s[2],i):ce(" ",2*i+1+c[2].length+c[3].length));if(c=t.match(/^[#0?]+$/))return n=S6(a,0),t.length<=n.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(/^([#0?]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(c[2].length,10)).replace(/([^0])0+$/,"$1"),i=n.indexOf(".");var d=t.indexOf(".")-i,h=t.length-n.length-d;return i3(t.substr(0,d)+n+t.substr(t.length-h))}if(c=t.match(/^00,000\.([#0]*0)$/))return i=gm(a,c[1].length),a<0?"-"+O3(e,t,-a):Zt(st1(a)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?i4(0,3-v.length):"")+v})+"."+i4(i,c[1].length);switch(t){case"###,##0.00":return O3(e,"#,##0.00",a);case"###,###":case"##,###":case"#,###":var m=Zt(S6(l,0));return m!=="0"?f+m:"";case"###,###.00":return O3(e,"###,##0.00",a).replace(/^0\./,".");case"#,###.00":return O3(e,"#,##0.00",a).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function ot1(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return yt(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function lt1(e,t,a){var r=t.replace(_b,""),n=t.length-r.length;return yt(e,r,a*Math.pow(10,2*n))+ce("%",n)}function Ab(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+Ab(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var c=Math.floor(Math.log(t)*Math.LOG10E)%n;if(c<0&&(c+=n),a=(t/Math.pow(10,c)).toPrecision(r+1+(n+c)%n),!a.match(/[Ee]/)){var i=Math.floor(Math.log(t)*Math.LOG10E);a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+c):a+="E+"+(i-c),a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(n+c)%n)+"."+u.substr(c)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}function _4(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Lb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?_4("n",r,a):"("+_4("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return ot1(e,t,a);if(t.indexOf("%")!==-1)return lt1(e,t,a);if(t.indexOf("E")!==-1)return Ab(t,a);if(t.charCodeAt(0)===36)return"$"+_4(e,t.substr(t.charAt(1)==" "?2:1),a);var n,c,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+i4(l,t.length);if(t.match(/^[#?]+$/))return n=""+a,a===0&&(n=""),n.length>t.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(Hb))return ct1(c,l,f);if(t.match(/^#+0+$/))return f+i4(l,t.length-t.indexOf("0"));if(c=t.match(Vb))return n=(""+a).replace(/^([^\.]+)$/,"$1."+i3(c[1])).replace(/\.$/,"."+i3(c[1])),n=n.replace(/\.(\d*)$/,function(v,p){return"."+p+ce("0",i3(c[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),c=t.match(/^(0*)\.(#*)$/))return f+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,c[1].length?"0.":".");if(c=t.match(/^#{1,3},##0(\.?)$/))return f+Zt(""+l);if(c=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+_4(e,t,-a):Zt(""+a)+"."+ce("0",c[1].length);if(c=t.match(/^#,#*,#0/))return _4(e,t.replace(/^#,#*,/,""),a);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=j6(_4(e,t.replace(/[\\-]/g,""),a)),i=0,j6(j6(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return i<n.length?n.charAt(i++):v==="0"?"0":""}));if(t.match(Sb))return n=_4(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var u="";if(c=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(c[4].length,7),s=jc(l,Math.pow(10,i)-1,!1),n=""+f,u=yt("n",c[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),n+=u+c[2]+"/"+c[3],u=Wc(s[2],i),u.length<c[4].length&&(u=i3(c[4].substr(c[4].length-u.length))+u),n+=u,n;if(c=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(c[1].length,c[4].length),7),s=jc(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Kl(s[1],i)+c[2]+"/"+c[3]+Wc(s[2],i):ce(" ",2*i+1+c[2].length+c[3].length));if(c=t.match(/^[#0?]+$/))return n=""+a,t.length<=n.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(/^([#0]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(c[2].length,10)).replace(/([^0])0+$/,"$1"),i=n.indexOf(".");var d=t.indexOf(".")-i,h=t.length-n.length-d;return i3(t.substr(0,d)+n+t.substr(t.length-h))}if(c=t.match(/^00,000\.([#0]*0)$/))return a<0?"-"+_4(e,t,-a):Zt(""+a).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?i4(0,3-v.length):"")+v})+"."+i4(0,c[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=Zt(""+l);return m!=="0"?f+m:"";default:if(t.match(/\.[0#?]*$/))return _4(e,t.slice(0,t.lastIndexOf(".")),a)+i3(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function yt(e,t,a){return(a|0)===a?_4(e,t,a):O3(e,t,a)}function ft1(e){for(var t=[],a=!1,r=0,n=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:a=!a;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(n,r-n),n=r+1}if(t[t.length]=e.substr(n),a===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var Tb=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function ga(e){for(var t=0,a="",r="";t<e.length;)switch(a=e.charAt(t)){case"G":qc(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+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(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(r=a;e.charAt(t++)!=="]"&&t<e.length;)r+=e.charAt(t);if(r.match(Tb))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(a=e.charAt(++t))>-1||a=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===a;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function ut1(e,t,a,r){for(var n=[],c="",i=0,s="",l="t",f,u,d,h="H";i<e.length;)switch(s=e.charAt(i)){case"G":if(!qc(e,i))throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"G",v:"General"},i+=7;break;case'"':for(c="";(d=e.charCodeAt(++i))!==34&&i<e.length;)c+=String.fromCharCode(d);n[n.length]={t:"t",v:c},++i;break;case"\\":var m=e.charAt(++i),v=m==="("||m===")"?m:"t";n[n.length]={t:v,v:m},++i;break;case"_":n[n.length]={t:"t",v:" "},i+=2;break;case"@":n[n.length]={t:"T",v:t},++i;break;case"B":case"b":if(e.charAt(i+1)==="1"||e.charAt(i+1)==="2"){if(f==null&&(f=U0(t,a,e.charAt(i+1)==="2"),f==null))return"";n[n.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(t<0||f==null&&(f=U0(t,a),f==null))return"";for(c=s;++i<e.length&&e.charAt(i).toLowerCase()===s;)c+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=h),n[n.length]={t:s,v:c},l=s;break;case"A":case"a":case"上":var p={t:s,v:s};if(f==null&&(f=U0(t,a)),e.substr(i,3).toUpperCase()==="A/P"?(f!=null&&(p.v=f.H>=12?"P":"A"),p.t="T",h="h",i+=3):e.substr(i,5).toUpperCase()==="AM/PM"?(f!=null&&(p.v=f.H>=12?"PM":"AM"),p.t="T",i+=5,h="h"):e.substr(i,5).toUpperCase()==="上午/下午"?(f!=null&&(p.v=f.H>=12?"下午":"上午"),p.t="T",i+=5,h="h"):(p.t="t",++i),f==null&&p.t==="T")return"";n[n.length]=p,l=s;break;case"[":for(c=s;e.charAt(i++)!=="]"&&i<e.length;)c+=e.charAt(i);if(c.slice(-1)!=="]")throw'unterminated "[" block: |'+c+"|";if(c.match(Tb)){if(f==null&&(f=U0(t,a),f==null))return"";n[n.length]={t:"Z",v:c.toLowerCase()},l=c.charAt(1)}else c.indexOf("$")>-1&&(c=(c.match(/\$([^-\[\]]*)/)||[])[1]||"$",ga(e)||(n[n.length]={t:"t",v:c}));break;case".":if(f!=null){for(c=s;++i<e.length&&(s=e.charAt(i))==="0";)c+=s;n[n.length]={t:"s",v:c};break}case"0":case"#":for(c=s;++i<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(i))>-1;)c+=s;n[n.length]={t:"n",v:c};break;case"?":for(c=s;e.charAt(++i)===s;)c+=s;n[n.length]={t:s,v:c},l=s;break;case"*":++i,(e.charAt(i)==" "||e.charAt(i)=="*")&&++i;break;case"(":case")":n[n.length]={t:r===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(c=s;i<e.length&&"0123456789".indexOf(e.charAt(++i))>-1;)c+=e.charAt(i);n[n.length]={t:"D",v:c};break;case" ":n[n.length]={t:s,v:s},++i;break;case"$":n[n.length]={t:"t",v:"$"},++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"t",v:s},++i;break}var g=0,y=0,x;for(i=n.length-1,l="t";i>=0;--i)switch(n[i].t){case"h":case"H":n[i].t=h,l="h",g<1&&(g=1);break;case"s":(x=n[i].v.match(/\.0+$/))&&(y=Math.max(y,x[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":l=n[i].t;break;case"m":l==="s"&&(n[i].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&n[i].v.match(/[Hh]/)&&(g=1),g<2&&n[i].v.match(/[Mm]/)&&(g=2),g<3&&n[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="",b;for(i=0;i<n.length;++i)switch(n[i].t){case"t":case"T":case" ":case"D":break;case"X":n[i].v="",n[i].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":n[i].v=tt1(n[i].t.charCodeAt(0),n[i].v,f,y),n[i].t="t";break;case"n":case"?":for(b=i+1;n[b]!=null&&((s=n[b].t)==="?"||s==="D"||(s===" "||s==="t")&&n[b+1]!=null&&(n[b+1].t==="?"||n[b+1].t==="t"&&n[b+1].v==="/")||n[i].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(n[b].v==="/"||n[b].v===" "&&n[b+1]!=null&&n[b+1].t=="?"));)n[i].v+=n[b].v,n[b]={v:"",t:";"},++b;C+=n[i].v,i=b-1;break;case"G":n[i].t="t",n[i].v=s6(t,a);break}var M="",w,z;if(C.length>0){C.charCodeAt(0)==40?(w=t<0&&C.charCodeAt(0)===45?-t:t,z=yt("n",C,w)):(w=t<0&&r>1?-t:t,z=yt("n",C,w),w<0&&n[0]&&n[0].t=="t"&&(z=z.substr(1),n[0].v="-"+n[0].v)),b=z.length-1;var H=n.length;for(i=0;i<n.length;++i)if(n[i]!=null&&n[i].t!="t"&&n[i].v.indexOf(".")>-1){H=i;break}var A=n.length;if(H===n.length&&z.indexOf("E")===-1){for(i=n.length-1;i>=0;--i)n[i]==null||"n?".indexOf(n[i].t)===-1||(b>=n[i].v.length-1?(b-=n[i].v.length,n[i].v=z.substr(b+1,n[i].v.length)):b<0?n[i].v="":(n[i].v=z.substr(0,b+1),b=-1),n[i].t="t",A=i);b>=0&&A<n.length&&(n[A].v=z.substr(0,b+1)+n[A].v)}else if(H!==n.length&&z.indexOf("E")===-1){for(b=z.indexOf(".")-1,i=H;i>=0;--i)if(!(n[i]==null||"n?".indexOf(n[i].t)===-1)){for(u=n[i].v.indexOf(".")>-1&&i===H?n[i].v.indexOf(".")-1:n[i].v.length-1,M=n[i].v.substr(u+1);u>=0;--u)b>=0&&(n[i].v.charAt(u)==="0"||n[i].v.charAt(u)==="#")&&(M=z.charAt(b--)+M);n[i].v=M,n[i].t="t",A=i}for(b>=0&&A<n.length&&(n[A].v=z.substr(0,b+1)+n[A].v),b=z.indexOf(".")+1,i=H;i<n.length;++i)if(!(n[i]==null||"n?(".indexOf(n[i].t)===-1&&i!==H)){for(u=n[i].v.indexOf(".")>-1&&i===H?n[i].v.indexOf(".")+1:0,M=n[i].v.substr(0,u);u<n[i].v.length;++u)b<z.length&&(M+=z.charAt(b++));n[i].v=M,n[i].t="t",A=i}}}for(i=0;i<n.length;++i)n[i]!=null&&"n?".indexOf(n[i].t)>-1&&(w=r>1&&t<0&&i>0&&n[i-1].v==="-"?-t:t,n[i].v=yt(n[i].t,n[i].v,w),n[i].t="t");var V="";for(i=0;i!==n.length;++i)n[i]!=null&&(V+=n[i].v);return V}var ym=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function xm(e,t){if(t==null)return!1;var a=parseFloat(t[2]);switch(t[1]){case"=":if(e==a)return!0;break;case">":if(e>a)return!0;break;case"<":if(e<a)return!0;break;case"<>":if(e!=a)return!0;break;case">=":if(e>=a)return!0;break;case"<=":if(e<=a)return!0;break}return!1}function dt1(e,t){var a=ft1(e),r=a.length,n=a[r-1].indexOf("@");if(r<4&&n>-1&&--r,a.length>4)throw new Error("cannot find right format for |"+a.join("|")+"|");if(typeof t!="number")return[4,a.length===4||n>-1?a[a.length-1]:"@"];switch(a.length){case 1:a=n>-1?["General","General","General",a[0]]:[a[0],a[0],a[0],"@"];break;case 2:a=n>-1?[a[0],a[0],a[0],a[1]]:[a[0],a[1],a[0],"@"];break;case 3:a=n>-1?[a[0],a[1],a[0],a[2]]:[a[0],a[1],a[2],"@"];break}var c=t>0?a[0]:t<0?a[1]:a[2];if(a[0].indexOf("[")===-1&&a[1].indexOf("[")===-1)return[r,c];if(a[0].match(/\[[=<>]/)!=null||a[1].match(/\[[=<>]/)!=null){var i=a[0].match(ym),s=a[1].match(ym);return xm(t,i)?[r,a[0]]:xm(t,s)?[r,a[1]]:[r,a[i!=null&&s!=null?2:1]]}return[r,c]}function I3(e,t,a){a==null&&(a={});var r="";switch(typeof e){case"string":e=="m/d/yy"&&a.dateNF?r=a.dateNF:r=e;break;case"number":e==14&&a.dateNF?r=a.dateNF:r=(a.table!=null?a.table:e2)[e],r==null&&(r=a.table&&a.table[pm[e]]||e2[pm[e]]),r==null&&(r=G41[e]||"General");break}if(qc(r,0))return s6(t,a);t instanceof Date&&(t=wb(t,a.date1904));var n=dt1(r,t);if(qc(n[1]))return s6(t,a);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return ut1(n[1],t,a,n[0])}function K0(e,t){if(typeof t!="number"){t=+t||-1;for(var a=0;a<392;++a){if(e2[a]==null){t<0&&(t=a);continue}if(e2[a]==e){t=a;break}}t<0&&(t=391)}return e2[t]=e,t}function Eb(){e2=Y41()}var ht1={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"},Nb=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function mt1(e){var t=typeof e=="number"?e2[e]:e;return t=t.replace(Nb,"(\\d+)"),new RegExp("^"+t+"$")}function pt1(e,t,a){var r=-1,n=-1,c=-1,i=-1,s=-1,l=-1;(t.match(Nb)||[]).forEach(function(d,h){var m=parseInt(a[h+1],10);switch(d.toLowerCase().charAt(0)){case"y":r=m;break;case"d":c=m;break;case"h":i=m;break;case"s":l=m;break;case"m":i>=0?s=m:n=m;break}}),l>=0&&s==-1&&n>=0&&(s=n,n=-1);var f=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(c>=1?c: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:r==-1&&n==-1&&c==-1?u:f+"T"+u}var vt1=function(){var e={};e.version="1.2.0";function t(){for(var z=0,H=new Array(256),A=0;A!=256;++A)z=A,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,H[A]=z;return typeof Int32Array<"u"?new Int32Array(H):H}var a=t();function r(z){var H=0,A=0,V=0,k=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(V=0;V!=256;++V)k[V]=z[V];for(V=0;V!=256;++V)for(A=z[V],H=256+V;H<4096;H+=256)A=k[H]=A>>>8^z[A&255];var _=[];for(V=1;V!=16;++V)_[V-1]=typeof Int32Array<"u"?k.subarray(V*256,V*256+256):k.slice(V*256,V*256+256);return _}var n=r(a),c=n[0],i=n[1],s=n[2],l=n[3],f=n[4],u=n[5],d=n[6],h=n[7],m=n[8],v=n[9],p=n[10],g=n[11],y=n[12],x=n[13],C=n[14];function b(z,H){for(var A=H^-1,V=0,k=z.length;V<k;)A=A>>>8^a[(A^z.charCodeAt(V++))&255];return~A}function M(z,H){for(var A=H^-1,V=z.length-15,k=0;k<V;)A=C[z[k++]^A&255]^x[z[k++]^A>>8&255]^y[z[k++]^A>>16&255]^g[z[k++]^A>>>24]^p[z[k++]]^v[z[k++]]^m[z[k++]]^h[z[k++]]^d[z[k++]]^u[z[k++]]^f[z[k++]]^l[z[k++]]^s[z[k++]]^i[z[k++]]^c[z[k++]]^a[z[k++]];for(V+=15;k<V;)A=A>>>8^a[(A^z[k++])&255];return~A}function w(z,H){for(var A=H^-1,V=0,k=z.length,_=0,N=0;V<k;)_=z.charCodeAt(V++),_<128?A=A>>>8^a[(A^_)&255]:_<2048?(A=A>>>8^a[(A^(192|_>>6&31))&255],A=A>>>8^a[(A^(128|_&63))&255]):_>=55296&&_<57344?(_=(_&1023)+64,N=z.charCodeAt(V++)&1023,A=A>>>8^a[(A^(240|_>>8&7))&255],A=A>>>8^a[(A^(128|_>>2&63))&255],A=A>>>8^a[(A^(128|N>>6&15|(_&3)<<4))&255],A=A>>>8^a[(A^(128|N&63))&255]):(A=A>>>8^a[(A^(224|_>>12&15))&255],A=A>>>8^a[(A^(128|_>>6&63))&255],A=A>>>8^a[(A^(128|_&63))&255]);return~A}return e.table=a,e.bstr=b,e.buf=M,e.str=w,e}(),v2=function(){var t={};t.version="1.2.1";function a(X,r1){for(var Q=X.split("/"),J=r1.split("/"),c1=0,i1=0,C1=Math.min(Q.length,J.length);c1<C1;++c1){if(i1=Q[c1].length-J[c1].length)return i1;if(Q[c1]!=J[c1])return Q[c1]<J[c1]?-1:1}return Q.length-J.length}function r(X){if(X.charAt(X.length-1)=="/")return X.slice(0,-1).indexOf("/")===-1?X:r(X.slice(0,-1));var r1=X.lastIndexOf("/");return r1===-1?X:X.slice(0,r1+1)}function n(X){if(X.charAt(X.length-1)=="/")return n(X.slice(0,-1));var r1=X.lastIndexOf("/");return r1===-1?X:X.slice(r1+1)}function c(X,r1){typeof r1=="string"&&(r1=new Date(r1));var Q=r1.getHours();Q=Q<<6|r1.getMinutes(),Q=Q<<5|r1.getSeconds()>>>1,X.write_shift(2,Q);var J=r1.getFullYear()-1980;J=J<<4|r1.getMonth()+1,J=J<<5|r1.getDate(),X.write_shift(2,J)}function i(X){var r1=X.read_shift(2)&65535,Q=X.read_shift(2)&65535,J=new Date,c1=Q&31;Q>>>=5;var i1=Q&15;Q>>>=4,J.setMilliseconds(0),J.setFullYear(Q+1980),J.setMonth(i1-1),J.setDate(c1);var C1=r1&31;r1>>>=5;var M1=r1&63;return r1>>>=6,J.setHours(r1),J.setMinutes(M1),J.setSeconds(C1<<1),J}function s(X){Be(X,0);for(var r1={},Q=0;X.l<=X.length-4;){var J=X.read_shift(2),c1=X.read_shift(2),i1=X.l+c1,C1={};switch(J){case 21589:Q=X.read_shift(1),Q&1&&(C1.mtime=X.read_shift(4)),c1>5&&(Q&2&&(C1.atime=X.read_shift(4)),Q&4&&(C1.ctime=X.read_shift(4))),C1.mtime&&(C1.mt=new Date(C1.mtime*1e3));break}X.l=i1,r1[J]=C1}return r1}var l;function f(){return l||(l={})}function u(X,r1){if(X[0]==80&&X[1]==75)return Q1(X,r1);if((X[0]|32)==109&&(X[1]|32)==105)return Z4(X,r1);if(X.length<512)throw new Error("CFB file size "+X.length+" < 512");var Q=3,J=512,c1=0,i1=0,C1=0,M1=0,D=0,U=[],P=X.slice(0,512);Be(P,0);var K=d(P);switch(Q=K[0],Q){case 3:J=512;break;case 4:J=4096;break;case 0:if(K[1]==0)return Q1(X,r1);default:throw new Error("Major Version: Expected 3 or 4 saw "+Q)}J!==512&&(P=X.slice(0,J),Be(P,28));var Z=X.slice(0,J);h(P,Q);var o1=P.read_shift(4,"i");if(Q===3&&o1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+o1);P.l+=4,C1=P.read_shift(4,"i"),P.l+=4,P.chk("00100000","Mini Stream Cutoff Size: "),M1=P.read_shift(4,"i"),c1=P.read_shift(4,"i"),D=P.read_shift(4,"i"),i1=P.read_shift(4,"i");for(var s1=-1,x1=0;x1<109&&(s1=P.read_shift(4,"i"),!(s1<0));++x1)U[x1]=s1;var V1=m(X,J);g(D,i1,V1,J,U);var L1=x(V1,C1,U,J);L1[C1].name="!Directory",c1>0&&M1!==N&&(L1[M1].name="!MiniFAT"),L1[U[0]].name="!FAT",L1.fat_addrs=U,L1.ssz=J;var w1={},N1=[],I1=[],J1=[];C(C1,L1,V1,N1,c1,w1,I1,M1),v(I1,J1,N1),N1.shift();var U1={FileIndex:I1,FullPaths:J1};return r1&&r1.raw&&(U1.raw={header:Z,sectors:V1}),U1}function d(X){if(X[X.l]==80&&X[X.l+1]==75)return[0,0];X.chk(q,"Header Signature: "),X.l+=16;var r1=X.read_shift(2,"u");return[X.read_shift(2,"u"),r1]}function h(X,r1){var Q=9;switch(X.l+=2,Q=X.read_shift(2)){case 9:if(r1!=3)throw new Error("Sector Shift: Expected 9 saw "+Q);break;case 12:if(r1!=4)throw new Error("Sector Shift: Expected 12 saw "+Q);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+Q)}X.chk("0600","Mini Sector Shift: "),X.chk("000000000000","Reserved: ")}function m(X,r1){for(var Q=Math.ceil(X.length/r1)-1,J=[],c1=1;c1<Q;++c1)J[c1-1]=X.slice(c1*r1,(c1+1)*r1);return J[Q-1]=X.slice(Q*r1),J}function v(X,r1,Q){for(var J=0,c1=0,i1=0,C1=0,M1=0,D=Q.length,U=[],P=[];J<D;++J)U[J]=P[J]=J,r1[J]=Q[J];for(;M1<P.length;++M1)J=P[M1],c1=X[J].L,i1=X[J].R,C1=X[J].C,U[J]===J&&(c1!==-1&&U[c1]!==c1&&(U[J]=U[c1]),i1!==-1&&U[i1]!==i1&&(U[J]=U[i1])),C1!==-1&&(U[C1]=J),c1!==-1&&J!=U[J]&&(U[c1]=U[J],P.lastIndexOf(c1)<M1&&P.push(c1)),i1!==-1&&J!=U[J]&&(U[i1]=U[J],P.lastIndexOf(i1)<M1&&P.push(i1));for(J=1;J<D;++J)U[J]===J&&(i1!==-1&&U[i1]!==i1?U[J]=U[i1]:c1!==-1&&U[c1]!==c1&&(U[J]=U[c1]));for(J=1;J<D;++J)if(X[J].type!==0){if(M1=J,M1!=U[M1])do M1=U[M1],r1[J]=r1[M1]+"/"+r1[J];while(M1!==0&&U[M1]!==-1&&M1!=U[M1]);U[J]=-1}for(r1[0]+="/",J=1;J<D;++J)X[J].type!==2&&(r1[J]+="/")}function p(X,r1,Q){for(var J=X.start,c1=X.size,i1=[],C1=J;Q&&c1>0&&C1>=0;)i1.push(r1.slice(C1*_,C1*_+_)),c1-=_,C1=P0(Q,C1*4);return i1.length===0?_e(0):$t(i1).slice(0,X.size)}function g(X,r1,Q,J,c1){var i1=N;if(X===N){if(r1!==0)throw new Error("DIFAT chain shorter than expected")}else if(X!==-1){var C1=Q[X],M1=(J>>>2)-1;if(!C1)return;for(var D=0;D<M1&&(i1=P0(C1,D*4))!==N;++D)c1.push(i1);g(P0(C1,J-4),r1-1,Q,J,c1)}}function y(X,r1,Q,J,c1){var i1=[],C1=[];c1||(c1=[]);var M1=J-1,D=0,U=0;for(D=r1;D>=0;){c1[D]=!0,i1[i1.length]=D,C1.push(X[D]);var P=Q[Math.floor(D*4/J)];if(U=D*4&M1,J<4+U)throw new Error("FAT boundary crossed: "+D+" 4 "+J);if(!X[P])break;D=P0(X[P],U)}return{nodes:i1,data:Lm([C1])}}function x(X,r1,Q,J){var c1=X.length,i1=[],C1=[],M1=[],D=[],U=J-1,P=0,K=0,Z=0,o1=0;for(P=0;P<c1;++P)if(M1=[],Z=P+r1,Z>=c1&&(Z-=c1),!C1[Z]){D=[];var s1=[];for(K=Z;K>=0;){s1[K]=!0,C1[K]=!0,M1[M1.length]=K,D.push(X[K]);var x1=Q[Math.floor(K*4/J)];if(o1=K*4&U,J<4+o1)throw new Error("FAT boundary crossed: "+K+" 4 "+J);if(!X[x1]||(K=P0(X[x1],o1),s1[K]))break}i1[Z]={nodes:M1,data:Lm([D])}}return i1}function C(X,r1,Q,J,c1,i1,C1,M1){for(var D=0,U=J.length?2:0,P=r1[X].data,K=0,Z=0,o1;K<P.length;K+=128){var s1=P.slice(K,K+128);Be(s1,64),Z=s1.read_shift(2),o1=a9(s1,0,Z-U),J.push(o1);var x1={name:o1,type:s1.read_shift(1),color:s1.read_shift(1),L:s1.read_shift(4,"i"),R:s1.read_shift(4,"i"),C:s1.read_shift(4,"i"),clsid:s1.read_shift(16),state:s1.read_shift(4,"i"),start:0,size:0},V1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);V1!==0&&(x1.ct=b(s1,s1.l-8));var L1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);L1!==0&&(x1.mt=b(s1,s1.l-8)),x1.start=s1.read_shift(4,"i"),x1.size=s1.read_shift(4,"i"),x1.size<0&&x1.start<0&&(x1.size=x1.type=0,x1.start=N,x1.name=""),x1.type===5?(D=x1.start,c1>0&&D!==N&&(r1[D].name="!StreamData")):x1.size>=4096?(x1.storage="fat",r1[x1.start]===void 0&&(r1[x1.start]=y(Q,x1.start,r1.fat_addrs,r1.ssz)),r1[x1.start].name=x1.name,x1.content=r1[x1.start].data.slice(0,x1.size)):(x1.storage="minifat",x1.size<0?x1.size=0:D!==N&&x1.start!==N&&r1[D]&&(x1.content=p(x1,r1[D].data,(r1[M1]||{}).data))),x1.content&&Be(x1.content,0),i1[o1]=x1,C1.push(x1)}}function b(X,r1){return new Date((C3(X,r1+4)/1e7*Math.pow(2,32)+C3(X,r1)/1e7-11644473600)*1e3)}function M(X,r1){return f(),u(l.readFileSync(X),r1)}function w(X,r1){var Q=r1&&r1.type;switch(Q||h2&&Buffer.isBuffer(X)&&(Q="buffer"),Q||"base64"){case"file":return M(X,r1);case"base64":return u(t4(H3(X)),r1);case"binary":return u(t4(X),r1)}return u(X,r1)}function z(X,r1){var Q=r1||{},J=Q.root||"Root Entry";if(X.FullPaths||(X.FullPaths=[]),X.FileIndex||(X.FileIndex=[]),X.FullPaths.length!==X.FileIndex.length)throw new Error("inconsistent CFB structure");X.FullPaths.length===0&&(X.FullPaths[0]=J+"/",X.FileIndex[0]={name:J,type:5}),Q.CLSID&&(X.FileIndex[0].clsid=Q.CLSID),H(X)}function H(X){var r1="Sh33tJ5";if(!v2.find(X,"/"+r1)){var Q=_e(4);Q[0]=55,Q[1]=Q[3]=50,Q[2]=54,X.FileIndex.push({name:r1,type:2,content:Q,size:4,L:69,R:69,C:69}),X.FullPaths.push(X.FullPaths[0]+r1),A(X)}}function A(X,r1){z(X);for(var Q=!1,J=!1,c1=X.FullPaths.length-1;c1>=0;--c1){var i1=X.FileIndex[c1];switch(i1.type){case 0:J?Q=!0:(X.FileIndex.pop(),X.FullPaths.pop());break;case 1:case 2:case 5:J=!0,isNaN(i1.R*i1.L*i1.C)&&(Q=!0),i1.R>-1&&i1.L>-1&&i1.R==i1.L&&(Q=!0);break;default:Q=!0;break}}if(!(!Q&&!r1)){var C1=new Date(1987,1,19),M1=0,D=Object.create?Object.create(null):{},U=[];for(c1=0;c1<X.FullPaths.length;++c1)D[X.FullPaths[c1]]=!0,X.FileIndex[c1].type!==0&&U.push([X.FullPaths[c1],X.FileIndex[c1]]);for(c1=0;c1<U.length;++c1){var P=r(U[c1][0]);J=D[P],J||(U.push([P,{name:n(P).replace("/",""),type:1,clsid:B,ct:C1,mt:C1,content:null}]),D[P]=!0)}for(U.sort(function(o1,s1){return a(o1[0],s1[0])}),X.FullPaths=[],X.FileIndex=[],c1=0;c1<U.length;++c1)X.FullPaths[c1]=U[c1][0],X.FileIndex[c1]=U[c1][1];for(c1=0;c1<U.length;++c1){var K=X.FileIndex[c1],Z=X.FullPaths[c1];if(K.name=n(Z).replace("/",""),K.L=K.R=K.C=-(K.color=1),K.size=K.content?K.content.length:0,K.start=0,K.clsid=K.clsid||B,c1===0)K.C=U.length>1?1:-1,K.size=0,K.type=5;else if(Z.slice(-1)=="/"){for(M1=c1+1;M1<U.length&&r(X.FullPaths[M1])!=Z;++M1);for(K.C=M1>=U.length?-1:M1,M1=c1+1;M1<U.length&&r(X.FullPaths[M1])!=r(Z);++M1);K.R=M1>=U.length?-1:M1,K.type=1}else r(X.FullPaths[c1+1]||"")==r(Z)&&(K.R=c1+1),K.type=2}}}function V(X,r1){var Q=r1||{};if(Q.fileType=="mad")return M0(X,Q);switch(A(X),Q.fileType){case"zip":return we(X,Q)}var J=function(o1){for(var s1=0,x1=0,V1=0;V1<o1.FileIndex.length;++V1){var L1=o1.FileIndex[V1];if(L1.content){var w1=L1.content.length;w1>0&&(w1<4096?s1+=w1+63>>6:x1+=w1+511>>9)}}for(var N1=o1.FullPaths.length+3>>2,I1=s1+7>>3,J1=s1+127>>7,U1=I1+x1+N1+J1,i2=U1+127>>7,O2=i2<=109?0:Math.ceil((i2-109)/127);U1+i2+O2+127>>7>i2;)O2=++i2<=109?0:Math.ceil((i2-109)/127);var fe=[1,O2,i2,J1,N1,x1,s1,0];return o1.FileIndex[0].size=s1<<6,fe[7]=(o1.FileIndex[0].start=fe[0]+fe[1]+fe[2]+fe[3]+fe[4]+fe[5])+(fe[6]+7>>3),fe}(X),c1=_e(J[7]<<9),i1=0,C1=0;{for(i1=0;i1<8;++i1)c1.write_shift(1,S[i1]);for(i1=0;i1<8;++i1)c1.write_shift(2,0);for(c1.write_shift(2,62),c1.write_shift(2,3),c1.write_shift(2,65534),c1.write_shift(2,9),c1.write_shift(2,6),i1=0;i1<3;++i1)c1.write_shift(2,0);for(c1.write_shift(4,0),c1.write_shift(4,J[2]),c1.write_shift(4,J[0]+J[1]+J[2]+J[3]-1),c1.write_shift(4,0),c1.write_shift(4,4096),c1.write_shift(4,J[3]?J[0]+J[1]+J[2]-1:N),c1.write_shift(4,J[3]),c1.write_shift(-4,J[1]?J[0]-1:N),c1.write_shift(4,J[1]),i1=0;i1<109;++i1)c1.write_shift(-4,i1<J[2]?J[1]+i1:-1)}if(J[1])for(C1=0;C1<J[1];++C1){for(;i1<236+C1*127;++i1)c1.write_shift(-4,i1<J[2]?J[1]+i1:-1);c1.write_shift(-4,C1===J[1]-1?N:C1+1)}var M1=function(o1){for(C1+=o1;i1<C1-1;++i1)c1.write_shift(-4,i1+1);o1&&(++i1,c1.write_shift(-4,N))};for(C1=i1=0,C1+=J[1];i1<C1;++i1)c1.write_shift(-4,F.DIFSECT);for(C1+=J[2];i1<C1;++i1)c1.write_shift(-4,F.FATSECT);M1(J[3]),M1(J[4]);for(var D=0,U=0,P=X.FileIndex[0];D<X.FileIndex.length;++D)P=X.FileIndex[D],P.content&&(U=P.content.length,!(U<4096)&&(P.start=C1,M1(U+511>>9)));for(M1(J[6]+7>>3);c1.l&511;)c1.write_shift(-4,F.ENDOFCHAIN);for(C1=i1=0,D=0;D<X.FileIndex.length;++D)P=X.FileIndex[D],P.content&&(U=P.content.length,!(!U||U>=4096)&&(P.start=C1,M1(U+63>>6)));for(;c1.l&511;)c1.write_shift(-4,F.ENDOFCHAIN);for(i1=0;i1<J[4]<<2;++i1){var K=X.FullPaths[i1];if(!K||K.length===0){for(D=0;D<17;++D)c1.write_shift(4,0);for(D=0;D<3;++D)c1.write_shift(4,-1);for(D=0;D<12;++D)c1.write_shift(4,0);continue}P=X.FileIndex[i1],i1===0&&(P.start=P.size?P.start-1:N);var Z=i1===0&&Q.root||P.name;if(U=2*(Z.length+1),c1.write_shift(64,Z,"utf16le"),c1.write_shift(2,U),c1.write_shift(1,P.type),c1.write_shift(1,P.color),c1.write_shift(-4,P.L),c1.write_shift(-4,P.R),c1.write_shift(-4,P.C),P.clsid)c1.write_shift(16,P.clsid,"hex");else for(D=0;D<4;++D)c1.write_shift(4,0);c1.write_shift(4,P.state||0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,P.start),c1.write_shift(4,P.size),c1.write_shift(4,0)}for(i1=1;i1<X.FileIndex.length;++i1)if(P=X.FileIndex[i1],P.size>=4096)if(c1.l=P.start+1<<9,h2&&Buffer.isBuffer(P.content))P.content.copy(c1,c1.l,0,P.size),c1.l+=P.size+511&-512;else{for(D=0;D<P.size;++D)c1.write_shift(1,P.content[D]);for(;D&511;++D)c1.write_shift(1,0)}for(i1=1;i1<X.FileIndex.length;++i1)if(P=X.FileIndex[i1],P.size>0&&P.size<4096)if(h2&&Buffer.isBuffer(P.content))P.content.copy(c1,c1.l,0,P.size),c1.l+=P.size+63&-64;else{for(D=0;D<P.size;++D)c1.write_shift(1,P.content[D]);for(;D&63;++D)c1.write_shift(1,0)}if(h2)c1.l=c1.length;else for(;c1.l<c1.length;)c1.write_shift(1,0);return c1}function k(X,r1){var Q=X.FullPaths.map(function(D){return D.toUpperCase()}),J=Q.map(function(D){var U=D.split("/");return U[U.length-(D.slice(-1)=="/"?2:1)]}),c1=!1;r1.charCodeAt(0)===47?(c1=!0,r1=Q[0].slice(0,-1)+r1):c1=r1.indexOf("/")!==-1;var i1=r1.toUpperCase(),C1=c1===!0?Q.indexOf(i1):J.indexOf(i1);if(C1!==-1)return X.FileIndex[C1];var M1=!i1.match(Ja);for(i1=i1.replace(l3,""),M1&&(i1=i1.replace(Ja,"!")),C1=0;C1<Q.length;++C1)if((M1?Q[C1].replace(Ja,"!"):Q[C1]).replace(l3,"")==i1||(M1?J[C1].replace(Ja,"!"):J[C1]).replace(l3,"")==i1)return X.FileIndex[C1];return null}var _=64,N=-2,q="d0cf11e0a1b11ae1",S=[208,207,17,224,161,177,26,225],B="00000000000000000000000000000000",F={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:N,FREESECT:-1,HEADER_SIGNATURE:q,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:B,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function e1(X,r1,Q){f();var J=V(X,Q);l.writeFileSync(r1,J)}function Y(X){for(var r1=new Array(X.length),Q=0;Q<X.length;++Q)r1[Q]=String.fromCharCode(X[Q]);return r1.join("")}function G(X,r1){var Q=V(X,r1);switch(r1&&r1.type||"buffer"){case"file":return f(),l.writeFileSync(r1.filename,Q),Q;case"binary":return typeof Q=="string"?Q:Y(Q);case"base64":return um(typeof Q=="string"?Q:Y(Q));case"buffer":if(h2)return Buffer.isBuffer(Q)?Q:y6(Q);case"array":return typeof Q=="string"?t4(Q):Q}return Q}var O;function T(X){try{var r1=X.InflateRaw,Q=new r1;if(Q._processChunk(new Uint8Array([3,0]),Q._finishFlushFlag),Q.bytesRead)O=X;else throw new Error("zlib does not expose bytesRead")}catch(J){console.error("cannot use native zlib: "+(J.message||J))}}function L(X,r1){if(!O)return S1(X,r1);var Q=O.InflateRaw,J=new Q,c1=J._processChunk(X.slice(X.l),J._finishFlushFlag);return X.l+=J.bytesRead,c1}function W(X){return O?O.deflateRawSync(X):O1(X)}var j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=[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 a1(X){var r1=(X<<1|X<<11)&139536|(X<<5|X<<15)&558144;return(r1>>16|r1>>8|r1)&255}for(var n1=typeof Uint8Array<"u",t1=n1?new Uint8Array(256):[],d1=0;d1<256;++d1)t1[d1]=a1(d1);function R(X,r1){var Q=t1[X&255];return r1<=8?Q>>>8-r1:(Q=Q<<8|t1[X>>8&255],r1<=16?Q>>>16-r1:(Q=Q<<8|t1[X>>16&255],Q>>>24-r1))}function p1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=6?0:X[J+1]<<8))>>>Q&3}function z1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=5?0:X[J+1]<<8))>>>Q&7}function h1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=4?0:X[J+1]<<8))>>>Q&15}function l1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=3?0:X[J+1]<<8))>>>Q&31}function f1(X,r1){var Q=r1&7,J=r1>>>3;return(X[J]|(Q<=1?0:X[J+1]<<8))>>>Q&127}function u1(X,r1,Q){var J=r1&7,c1=r1>>>3,i1=(1<<Q)-1,C1=X[c1]>>>J;return Q<8-J||(C1|=X[c1+1]<<8-J,Q<16-J)||(C1|=X[c1+2]<<16-J,Q<24-J)||(C1|=X[c1+3]<<24-J),C1&i1}function g1(X,r1,Q){var J=r1&7,c1=r1>>>3;return J<=5?X[c1]|=(Q&7)<<J:(X[c1]|=Q<<J&255,X[c1+1]=(Q&7)>>8-J),r1+3}function k1(X,r1,Q){var J=r1&7,c1=r1>>>3;return Q=(Q&1)<<J,X[c1]|=Q,r1+1}function b1(X,r1,Q){var J=r1&7,c1=r1>>>3;return Q<<=J,X[c1]|=Q&255,Q>>>=8,X[c1+1]=Q,r1+8}function H1(X,r1,Q){var J=r1&7,c1=r1>>>3;return Q<<=J,X[c1]|=Q&255,Q>>>=8,X[c1+1]=Q&255,X[c1+2]=Q>>>8,r1+16}function F1(X,r1){var Q=X.length,J=2*Q>r1?2*Q:r1+5,c1=0;if(Q>=r1)return X;if(h2){var i1=dm(J);if(X.copy)X.copy(i1);else for(;c1<X.length;++c1)i1[c1]=X[c1];return i1}else if(n1){var C1=new Uint8Array(J);if(C1.set)C1.set(X);else for(;c1<Q;++c1)C1[c1]=X[c1];return C1}return X.length=J,X}function $1(X){for(var r1=new Array(X),Q=0;Q<X;++Q)r1[Q]=0;return r1}function W1(X,r1,Q){var J=1,c1=0,i1=0,C1=0,M1=0,D=X.length,U=n1?new Uint16Array(32):$1(32);for(i1=0;i1<32;++i1)U[i1]=0;for(i1=D;i1<Q;++i1)X[i1]=0;D=X.length;var P=n1?new Uint16Array(D):$1(D);for(i1=0;i1<D;++i1)U[c1=X[i1]]++,J<c1&&(J=c1),P[i1]=0;for(U[0]=0,i1=1;i1<=J;++i1)U[i1+16]=M1=M1+U[i1-1]<<1;for(i1=0;i1<D;++i1)M1=X[i1],M1!=0&&(P[i1]=U[M1+16]++);var K=0;for(i1=0;i1<D;++i1)if(K=X[i1],K!=0)for(M1=R(P[i1],J)>>J-K,C1=(1<<J+4-K)-1;C1>=0;--C1)r1[M1|C1<<K]=K&15|i1<<4;return J}var K1=n1?new Uint16Array(512):$1(512),d2=n1?new Uint16Array(32):$1(32);if(!n1){for(var G1=0;G1<512;++G1)K1[G1]=0;for(G1=0;G1<32;++G1)d2[G1]=0}(function(){for(var X=[],r1=0;r1<32;r1++)X.push(5);W1(X,d2,32);var Q=[];for(r1=0;r1<=143;r1++)Q.push(8);for(;r1<=255;r1++)Q.push(9);for(;r1<=279;r1++)Q.push(7);for(;r1<=287;r1++)Q.push(8);W1(Q,K1,288)})();var j2=function(){for(var r1=n1?new Uint8Array(32768):[],Q=0,J=0;Q<I.length-1;++Q)for(;J<I[Q+1];++J)r1[J]=Q;for(;J<32768;++J)r1[J]=29;var c1=n1?new Uint8Array(259):[];for(Q=0,J=0;Q<E.length-1;++Q)for(;J<E[Q+1];++J)c1[J]=Q;function i1(M1,D){for(var U=0;U<M1.length;){var P=Math.min(65535,M1.length-U),K=U+P==M1.length;for(D.write_shift(1,+K),D.write_shift(2,P),D.write_shift(2,~P&65535);P-- >0;)D[D.l++]=M1[U++]}return D.l}function C1(M1,D){for(var U=0,P=0,K=n1?new Uint16Array(32768):[];P<M1.length;){var Z=Math.min(65535,M1.length-P);if(Z<10){for(U=g1(D,U,+(P+Z==M1.length)),U&7&&(U+=8-(U&7)),D.l=U/8|0,D.write_shift(2,Z),D.write_shift(2,~Z&65535);Z-- >0;)D[D.l++]=M1[P++];U=D.l*8;continue}U=g1(D,U,+(P+Z==M1.length)+2);for(var o1=0;Z-- >0;){var s1=M1[P];o1=(o1<<5^s1)&32767;var x1=-1,V1=0;if((x1=K[o1])&&(x1|=P&-32768,x1>P&&(x1-=32768),x1<P))for(;M1[x1+V1]==M1[P+V1]&&V1<250;)++V1;if(V1>2){s1=c1[V1],s1<=22?U=b1(D,U,t1[s1+1]>>1)-1:(b1(D,U,3),U+=5,b1(D,U,t1[s1-23]>>5),U+=3);var L1=s1<8?0:s1-4>>2;L1>0&&(H1(D,U,V1-E[s1]),U+=L1),s1=r1[P-x1],U=b1(D,U,t1[s1]>>3),U-=3;var w1=s1<4?0:s1-2>>1;w1>0&&(H1(D,U,P-x1-I[s1]),U+=w1);for(var N1=0;N1<V1;++N1)K[o1]=P&32767,o1=(o1<<5^M1[P])&32767,++P;Z-=V1-1}else s1<=143?s1=s1+48:U=k1(D,U,1),U=b1(D,U,t1[s1]),K[o1]=P&32767,++P}U=b1(D,U,0)-1}return D.l=(U+7)/8|0,D.l}return function(D,U){return D.length<8?i1(D,U):C1(D,U)}}();function O1(X){var r1=_e(50+Math.floor(X.length*1.1)),Q=j2(X,r1);return r1.slice(0,Q)}var c2=n1?new Uint16Array(32768):$1(32768),Y2=n1?new Uint16Array(32768):$1(32768),m2=n1?new Uint16Array(128):$1(128),A2=1,Pe=1;function y1(X,r1){var Q=l1(X,r1)+257;r1+=5;var J=l1(X,r1)+1;r1+=5;var c1=h1(X,r1)+4;r1+=4;for(var i1=0,C1=n1?new Uint8Array(19):$1(19),M1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],D=1,U=n1?new Uint8Array(8):$1(8),P=n1?new Uint8Array(8):$1(8),K=C1.length,Z=0;Z<c1;++Z)C1[j[Z]]=i1=z1(X,r1),D<i1&&(D=i1),U[i1]++,r1+=3;var o1=0;for(U[0]=0,Z=1;Z<=D;++Z)P[Z]=o1=o1+U[Z-1]<<1;for(Z=0;Z<K;++Z)(o1=C1[Z])!=0&&(M1[Z]=P[o1]++);var s1=0;for(Z=0;Z<K;++Z)if(s1=C1[Z],s1!=0){o1=t1[M1[Z]]>>8-s1;for(var x1=(1<<7-s1)-1;x1>=0;--x1)m2[o1|x1<<s1]=s1&7|Z<<3}var V1=[];for(D=1;V1.length<Q+J;)switch(o1=m2[f1(X,r1)],r1+=o1&7,o1>>>=3){case 16:for(i1=3+p1(X,r1),r1+=2,o1=V1[V1.length-1];i1-- >0;)V1.push(o1);break;case 17:for(i1=3+z1(X,r1),r1+=3;i1-- >0;)V1.push(0);break;case 18:for(i1=11+f1(X,r1),r1+=7;i1-- >0;)V1.push(0);break;default:V1.push(o1),D<o1&&(D=o1);break}var L1=V1.slice(0,Q),w1=V1.slice(Q);for(Z=Q;Z<286;++Z)L1[Z]=0;for(Z=J;Z<30;++Z)w1[Z]=0;return A2=W1(L1,c2,286),Pe=W1(w1,Y2,30),r1}function m1(X,r1){if(X[0]==3&&!(X[1]&3))return[m0(r1),2];for(var Q=0,J=0,c1=dm(r1||1<<18),i1=0,C1=c1.length>>>0,M1=0,D=0;!(J&1);){if(J=z1(X,Q),Q+=3,J>>>1)J>>1==1?(M1=9,D=5):(Q=y1(X,Q),M1=A2,D=Pe);else{Q&7&&(Q+=8-(Q&7));var U=X[Q>>>3]|X[(Q>>>3)+1]<<8;if(Q+=32,U>0)for(!r1&&C1<i1+U&&(c1=F1(c1,i1+U),C1=c1.length);U-- >0;)c1[i1++]=X[Q>>>3],Q+=8;continue}for(;;){!r1&&C1<i1+32767&&(c1=F1(c1,i1+32767),C1=c1.length);var P=u1(X,Q,M1),K=J>>>1==1?K1[P]:c2[P];if(Q+=K&15,K>>>=4,!(K>>>8&255))c1[i1++]=K;else{if(K==256)break;K-=257;var Z=K<8?0:K-4>>2;Z>5&&(Z=0);var o1=i1+E[K];Z>0&&(o1+=u1(X,Q,Z),Q+=Z),P=u1(X,Q,D),K=J>>>1==1?d2[P]:Y2[P],Q+=K&15,K>>>=4;var s1=K<4?0:K-2>>1,x1=I[K];for(s1>0&&(x1+=u1(X,Q,s1),Q+=s1),!r1&&C1<o1&&(c1=F1(c1,o1+100),C1=c1.length);i1<o1;)c1[i1]=c1[i1-x1],++i1}}}return r1?[c1,Q+7>>>3]:[c1.slice(0,i1),Q+7>>>3]}function S1(X,r1){var Q=X.slice(X.l||0),J=m1(Q,r1);return X.l+=J[1],J[0]}function T1(X,r1){if(X)typeof console<"u"&&console.error(r1);else throw new Error(r1)}function Q1(X,r1){var Q=X;Be(Q,0);var J=[],c1=[],i1={FileIndex:J,FullPaths:c1};z(i1,{root:r1.root});for(var C1=Q.length-4;(Q[C1]!=80||Q[C1+1]!=75||Q[C1+2]!=5||Q[C1+3]!=6)&&C1>=0;)--C1;Q.l=C1+4,Q.l+=4;var M1=Q.read_shift(2);Q.l+=6;var D=Q.read_shift(4);for(Q.l=D,C1=0;C1<M1;++C1){Q.l+=20;var U=Q.read_shift(4),P=Q.read_shift(4),K=Q.read_shift(2),Z=Q.read_shift(2),o1=Q.read_shift(2);Q.l+=8;var s1=Q.read_shift(4),x1=s(Q.slice(Q.l+K,Q.l+K+Z));Q.l+=K+Z+o1;var V1=Q.l;Q.l=s1+4,Q2(Q,U,P,i1,x1),Q.l=V1}return i1}function Q2(X,r1,Q,J,c1){X.l+=2;var i1=X.read_shift(2),C1=X.read_shift(2),M1=i(X);if(i1&8257)throw new Error("Unsupported ZIP encryption");for(var D=X.read_shift(4),U=X.read_shift(4),P=X.read_shift(4),K=X.read_shift(2),Z=X.read_shift(2),o1="",s1=0;s1<K;++s1)o1+=String.fromCharCode(X[X.l++]);if(Z){var x1=s(X.slice(X.l,X.l+Z));(x1[21589]||{}).mt&&(M1=x1[21589].mt),((c1||{})[21589]||{}).mt&&(M1=c1[21589].mt)}X.l+=Z;var V1=X.slice(X.l,X.l+U);switch(C1){case 8:V1=L(X,P);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+C1)}var L1=!1;i1&8&&(D=X.read_shift(4),D==134695760&&(D=X.read_shift(4),L1=!0),U=X.read_shift(4),P=X.read_shift(4)),U!=r1&&T1(L1,"Bad compressed size: "+r1+" != "+U),P!=Q&&T1(L1,"Bad uncompressed size: "+Q+" != "+P),T3(J,o1,V1,{unsafe:!0,mt:M1})}function we(X,r1){var Q=r1||{},J=[],c1=[],i1=_e(1),C1=Q.compression?8:0,M1=0,D=0,U=0,P=0,K=0,Z=X.FullPaths[0],o1=Z,s1=X.FileIndex[0],x1=[],V1=0;for(D=1;D<X.FullPaths.length;++D)if(o1=X.FullPaths[D].slice(Z.length),s1=X.FileIndex[D],!(!s1.size||!s1.content||o1=="Sh33tJ5")){var L1=P,w1=_e(o1.length);for(U=0;U<o1.length;++U)w1.write_shift(1,o1.charCodeAt(U)&127);w1=w1.slice(0,w1.l),x1[K]=vt1.buf(s1.content,0);var N1=s1.content;C1==8&&(N1=W(N1)),i1=_e(30),i1.write_shift(4,67324752),i1.write_shift(2,20),i1.write_shift(2,M1),i1.write_shift(2,C1),s1.mt?c(i1,s1.mt):i1.write_shift(4,0),i1.write_shift(-4,x1[K]),i1.write_shift(4,N1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,w1.length),i1.write_shift(2,0),P+=i1.length,J.push(i1),P+=w1.length,J.push(w1),P+=N1.length,J.push(N1),i1=_e(46),i1.write_shift(4,33639248),i1.write_shift(2,0),i1.write_shift(2,20),i1.write_shift(2,M1),i1.write_shift(2,C1),i1.write_shift(4,0),i1.write_shift(-4,x1[K]),i1.write_shift(4,N1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,w1.length),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(4,0),i1.write_shift(4,L1),V1+=i1.l,c1.push(i1),V1+=w1.length,c1.push(w1),++K}return i1=_e(22),i1.write_shift(4,101010256),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,K),i1.write_shift(2,K),i1.write_shift(4,V1),i1.write_shift(4,P),i1.write_shift(2,0),$t([$t(J),$t(c1),i1])}var d3={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 j3(X,r1){if(X.ctype)return X.ctype;var Q=X.name||"",J=Q.match(/\.([^\.]+)$/);return J&&d3[J[1]]||r1&&(J=(Q=r1).match(/[\.\\]([^\.\\])+$/),J&&d3[J[1]])?d3[J[1]]:"application/octet-stream"}function k2(X){for(var r1=um(X),Q=[],J=0;J<r1.length;J+=76)Q.push(r1.slice(J,J+76));return Q.join(`\r
837
837
  `)+`\r
838
838
  `}function xe(X){var r1=X.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(U){var P=U.charCodeAt(0).toString(16).toUpperCase();return"="+(P.length==1?"0"+P:P)});r1=r1.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),r1.charAt(0)==`
839
839
  `&&(r1="=0D"+r1.slice(1)),r1=r1.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`