@feedmepos/ui-library 1.2.8 → 1.2.9-rc.1

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.
Files changed (17) hide show
  1. package/dist/federation/{FmDatePicker.vue_vue_type_script_setup_true_lang-83Hju-Dl.js → FmDatePicker.vue_vue_type_script_setup_true_lang-BfJCE0p_.js} +1 -1
  2. package/dist/federation/{FmDateRangePicker.vue_vue_type_script_setup_true_lang-RTb6u4si.js → FmDateRangePicker.vue_vue_type_script_setup_true_lang-Dj3nC7zH.js} +1 -1
  3. package/dist/federation/FmPopover-BxsfOwNY.js +1 -0
  4. package/dist/federation/{FmPopover-Cwhm_wSM.css → FmPopover-D0-V0GGN.css} +1 -1
  5. package/dist/federation/{FmTimePicker.vue_vue_type_script_setup_true_lang-e8ngpucq.js → FmTimePicker.vue_vue_type_script_setup_true_lang-sUHCYMf3.js} +1 -1
  6. package/dist/federation/{FmTimeRangePicker.vue_vue_type_script_setup_true_lang--BU69Njr.js → FmTimeRangePicker.vue_vue_type_script_setup_true_lang-DLWbmJqs.js} +1 -1
  7. package/dist/federation/{__federation_expose_FmDatePicker-CgFWGp7A.js → __federation_expose_FmDatePicker-B7YrF25z.js} +1 -1
  8. package/dist/federation/{__federation_expose_FmDateRangePicker-CJMHsE3J.js → __federation_expose_FmDateRangePicker-Dq7m2DH8.js} +1 -1
  9. package/dist/federation/{__federation_expose_FmTimePicker-CJsMFzvJ.js → __federation_expose_FmTimePicker-DQGTcsJI.js} +1 -1
  10. package/dist/federation/{__federation_expose_FmTimeRangePicker-D-y0_boU.js → __federation_expose_FmTimeRangePicker-DnhNeeB7.js} +1 -1
  11. package/dist/federation/feedmepos-ui-components.js +1 -1
  12. package/dist/federation/{index-DJjKQVPl.js → index-Cn5Vy4GK.js} +1 -1
  13. package/dist/feedmepos-ui-library.js +231 -229
  14. package/dist/feedmepos-ui-library.umd.cjs +2 -2
  15. package/dist/style.css +1 -1
  16. package/package.json +1 -1
  17. package/dist/federation/FmPopover-CbJVXTIm.js +0 -1
@@ -24,7 +24,7 @@
24
24
  */class km{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const s=n.listeners[i],a=n.duration;s.forEach(l=>l({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(o-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=ka.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const s=o.items;let a=s.length-1,l=!1,d;for(;a>=0;--a)d=s[a],d._active?(d._total>o.duration&&(o.duration=d._total),d.tick(e),l=!0):(s[a]=s[s.length-1],s.pop());l&&(i.draw(),this._notify(i,o,e,"progress")),s.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var lt=new km;const Ja="transparent",xm={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=va(t||Ja),i=o.valid&&va(e||Ja);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Sm{constructor(e,n,o,i){const s=n[o];i=Mn([e.to,i,s,e.from]);const a=Mn([e.from,s,i]);this._active=!0,this._fn=e.fn||xm[e.type||typeof a],this._easing=Pn[e.easing]||Pn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],s=o-this._start,a=this._duration-s;this._start=o,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Mn([e.to,n,i,e.from]),this._from=Mn([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,s=this._from,a=this._loop,l=this._to;let d;if(this._active=s!==l&&(a||n<o),!this._active){this._target[i]=l,this._notify(!0);return}if(n<0){this._target[i]=s;return}d=n/o%2,d=a&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[i]=this._fn(s,l,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class Ka{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!$(e))return;const n=Object.keys(fe.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!$(s))return;const a={};for(const l of n)a[l]=s[l];(se(s.properties)&&s.properties||[i]).forEach(l=>{(l===i||!o.has(l))&&o.set(l,a)})})}_animateOptions(e,n){const o=n.options,i=wm(e,o);if(!i)return[];const s=this._createAnimations(i,o);return o.$shared&&Cm(e.options.$animations,o).then(()=>{e.options=o},()=>{}),s}_createAnimations(e,n){const o=this._properties,i=[],s=e.$animations||(e.$animations={}),a=Object.keys(n),l=Date.now();let d;for(d=a.length-1;d>=0;--d){const c=a[d];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let f=s[c];const p=o.get(c);if(f)if(p&&f.active()){f.update(p,u,l);continue}else f.cancel();if(!p||!p.duration){e[c]=u;continue}s[c]=f=new Sm(p,e,c,u),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return lt.add(this._chart,o),!0}}function Cm(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const s=t[o[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function wm(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Za(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:o?s:i,end:o?i:s}}function Am(t,e,n){if(n===!1)return!1;const o=Za(t,n),i=Za(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function vm(t){let e,n,o,i;return $(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function $a(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=o.length;i<s;++i)n.push(o[i].index);return n}function _a(t,e,n,o={}){const i=t.keys,s=o.mode==="single";let a,l,d,c;if(e!==null){for(a=0,l=i.length;a<l;++a){if(d=+i[a],d===n){if(o.all)continue;break}c=t.values[d],ue(c)&&(s||e===0||Je(e)===Je(c))&&(e+=c)}return e}}function Bm(t){const e=Object.keys(t),n=new Array(e.length);let o,i,s;for(o=0,i=e.length;o<i;++o)s=e[o],n[o]={x:s,y:t[s]};return n}function el(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Dm(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Vm(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Pm(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function tl(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function nl(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:a,index:l}=o,d=s.axis,c=a.axis,u=Dm(s,a,o),f=e.length;let p;for(let m=0;m<f;++m){const h=e[m],{[d]:g,[c]:b}=h,y=h._stacks||(h._stacks={});p=y[c]=Pm(i,u,g),p[l]=b,p._top=tl(p,a,!0,o.type),p._bottom=tl(p,a,!1,o.type);const S=p._visualValues||(p._visualValues={});S[l]=b}}function oi(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Em(t,e){return Dt(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Fm(t,e,n){return Dt(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function On(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[o]===void 0||s[o][n]===void 0)return;delete s[o][n],s[o]._visualValues!==void 0&&s[o]._visualValues[n]!==void 0&&delete s[o]._visualValues[n]}}}const ri=t=>t==="reset"||t==="none",ol=(t,e)=>e?t:Object.assign({},t),Nm=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:$a(n,!0),values:null};class We{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=el(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&On(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(f,p,m,h)=>f==="x"?p:f==="r"?h:m,s=n.xAxisID=q(o.xAxisID,oi(e,"x")),a=n.yAxisID=q(o.yAxisID,oi(e,"y")),l=n.rAxisID=q(o.rAxisID,oi(e,"r")),d=n.indexAxis,c=n.iAxisID=i(d,s,a,l),u=n.vAxisID=i(d,a,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&ba(this._data,this),e._stacked&&On(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if($(n))this._data=Bm(n);else if(o!==n){if(o){ba(o,this);const i=this._cachedMeta;On(i),i._parsed=[]}n&&Object.isExtensible(n)&&bp(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=el(n.vScale,n),n.stack!==o.stack&&(i=!0,On(n),n.stack=o.stack),this._resyncElements(e),(i||s!==n._stacked)&&nl(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:s,_stacked:a}=o,l=s.axis;let d=e===0&&n===i.length?!0:o._sorted,c=e>0&&o._parsed[e-1],u,f,p;if(this._parsing===!1)o._parsed=i,o._sorted=!0,p=i;else{se(i[e])?p=this.parseArrayData(o,i,e,n):$(i[e])?p=this.parseObjectData(o,i,e,n):p=this.parsePrimitiveData(o,i,e,n);const m=()=>f[l]===null||c&&f[l]<c[l];for(u=0;u<n;++u)o._parsed[u+e]=f=p[u],d&&(m()&&(d=!1),c=f);o._sorted=d}a&&nl(this,p)}parsePrimitiveData(e,n,o,i){const{iScale:s,vScale:a}=e,l=s.axis,d=a.axis,c=s.getLabels(),u=s===a,f=new Array(i);let p,m,h;for(p=0,m=i;p<m;++p)h=p+o,f[p]={[l]:u||s.parse(c[h],h),[d]:a.parse(n[h],h)};return f}parseArrayData(e,n,o,i){const{xScale:s,yScale:a}=e,l=new Array(i);let d,c,u,f;for(d=0,c=i;d<c;++d)u=d+o,f=n[u],l[d]={x:s.parse(f[0],u),y:a.parse(f[1],u)};return l}parseObjectData(e,n,o,i){const{xScale:s,yScale:a}=e,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,c=new Array(i);let u,f,p,m;for(u=0,f=i;u<f;++u)p=u+o,m=n[p],c[u]={x:s.parse(At(m,l),p),y:a.parse(At(m,d),p)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,s=this._cachedMeta,a=n[e.axis],l={keys:$a(i,!0),values:n._stacks[e.axis]._visualValues};return _a(l,a,s.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const s=o[n.axis];let a=s===null?NaN:s;const l=i&&o._stacks[n.axis];i&&l&&(i.values=l,a=_a(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,s=o._sorted&&e===o.iScale,a=i.length,l=this._getOtherScale(e),d=Nm(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Vm(l);let p,m;function h(){m=i[p];const g=m[l.axis];return!ue(m[e.axis])||u>g||f<g}for(p=0;p<a&&!(!h()&&(this.updateRangeFromParsed(c,e,m,d),s));++p);if(s){for(p=a-1;p>=0;--p)if(!h()){this.updateRangeFromParsed(c,e,m,d);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,s,a;for(i=0,s=n.length;i<s;++i)a=n[i][e.axis],ue(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:o?""+o.getLabelForValue(s[o.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=vm(q(this.options.clip,Am(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],s=n.chartArea,a=[],l=this._drawStart||0,d=this._drawCount||i.length-l,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,s,l,d),u=l;u<l+d;++u){const f=i[u];f.hidden||(f.active&&c?a.push(f):f.draw(e,s))}for(u=0;u<a.length;++u)a[u].draw(e,s)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];s=a.$context||(a.$context=Fm(this.getContext(),e,a)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=Em(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=o,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",s=this._cachedDataOpts,a=e+"-"+n,l=s[a],d=this.enableOptionSharing&&Bn(o);if(l)return ol(l,d);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],p=c.getOptionScopes(this.getDataset(),u),m=Object.keys(fe.elements[e]),h=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(p,m,h,f);return g.$shared&&(g.$shared=d,s[a]=Object.freeze(ol(g,d))),g}_resolveAnimations(e,n,o){const i=this.chart,s=this._cachedDataOpts,a=`animation-${n}`,l=s[a];if(l)return l;let d;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),p=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(p,this.getContext(e,o,n))}const c=new Ka(i,d&&d.animations);return d&&d._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||ri(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(o),a=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,o),{sharedOptions:s,includeOptions:a}}updateElement(e,n,o,i){ri(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!ri(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[l,d,c]of this._syncList)this[l](d,c);this._syncList=[];const i=o.length,s=n.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,o=!0){const i=this._cachedMeta,s=i.data,a=e+n;let l;const d=c=>{for(c.length+=n,l=c.length-1;l>=a;l--)c[l]=c[l-n]};for(d(s),l=e;l<a;++l)s[l]=new this.dataElementType;this._parsing&&d(i._parsed),this.parse(e,n),o&&this.updateElements(s,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&On(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}H(We,"defaults",{}),H(We,"datasetElementType",null),H(We,"dataElementType",null);function Mm(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,s=n.length;i<s;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=ya(o.sort((i,s)=>i-s))}return t._cache.$bar}function Om(t){const e=t.iScale,n=Mm(e,t.type);let o=e._length,i,s,a,l;const d=()=>{a===32767||a===-32768||(Bn(l)&&(o=Math.min(o,Math.abs(a-l)||o)),l=a)};for(i=0,s=n.length;i<s;++i)a=e.getPixelForValue(n[i]),d();for(l=void 0,i=0,s=e.ticks.length;i<s;++i)a=e.getPixelForTick(i),d();return o}function Im(t,e,n,o){const i=n.barThickness;let s,a;return ee(i)?(s=e.min*n.categoryPercentage,a=n.barPercentage):(s=i*o,a=1),{chunk:s/o,ratio:a,start:e.pixels[t]-s/2}}function Rm(t,e,n,o){const i=e.pixels,s=i[t];let a=t>0?i[t-1]:null,l=t<i.length-1?i[t+1]:null;const d=n.categoryPercentage;a===null&&(a=s-(l===null?e.end-e.start:l-s)),l===null&&(l=s+s-a);const c=s-(s-Math.min(a,l))/2*d;return{chunk:Math.abs(l-a)/2*d/o,ratio:n.barPercentage,start:c}}function Tm(t,e,n,o){const i=n.parse(t[0],o),s=n.parse(t[1],o),a=Math.min(i,s),l=Math.max(i,s);let d=a,c=l;Math.abs(a)>Math.abs(l)&&(d=l,c=a),e[n.axis]=c,e._custom={barStart:d,barEnd:c,start:i,end:s,min:a,max:l}}function rl(t,e,n,o){return se(t)?Tm(t,e,n,o):e[n.axis]=n.parse(t,o),e}function il(t,e,n,o){const i=t.iScale,s=t.vScale,a=i.getLabels(),l=i===s,d=[];let c,u,f,p;for(c=n,u=n+o;c<u;++c)p=e[c],f={},f[i.axis]=l||i.parse(a[c],c),d.push(rl(p,f,s,c));return d}function ii(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function zm(t,e,n){return t!==0?Je(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function Lm(t){let e,n,o,i,s;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",s="start"):(i="start",s="end"),{start:n,end:o,reverse:e,top:i,bottom:s}}function Hm(t,e,n,o){let i=e.borderSkipped;const s={};if(!i){t.borderSkipped=s;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:l,reverse:d,top:c,bottom:u}=Lm(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=u:(s[sl(u,a,l,d)]=!0,i=c)),s[sl(i,a,l,d)]=!0,t.borderSkipped=s}function sl(t,e,n,o){return o?(t=Um(t,e,n),t=al(t,n,e)):t=al(t,e,n),t}function Um(t,e,n){return t===e?n:t===n?e:t}function al(t,e,n){return t==="start"?e:t==="end"?n:t}function jm(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Vo extends We{parsePrimitiveData(e,n,o,i){return il(e,n,o,i)}parseArrayData(e,n,o,i){return il(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:s,vScale:a}=e,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,c=s.axis==="x"?l:d,u=a.axis==="x"?l:d,f=[];let p,m,h,g;for(p=o,m=o+i;p<m;++p)g=n[p],h={},h[s.axis]=s.parse(At(g,c),p),f.push(rl(At(g,u),h,a,p));return f}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const s=o._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,s=this.getParsed(e),a=s._custom,l=ii(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+o.getLabelForValue(s[o.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const s=i==="reset",{index:a,_cachedMeta:{vScale:l}}=this,d=l.getBasePixel(),c=l.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:p}=this._getSharedOptions(n,i);for(let m=n;m<n+o;m++){const h=this.getParsed(m),g=s||ee(h[l.axis])?{base:d,head:d}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,u),y=(h._stacks||{})[l.axis],S={horizontal:c,base:g.base,enableBorderRadius:!y||ii(h._custom)||a===y._top||a===y._bottom,x:c?g.head:b.center,y:c?b.center:g.head,height:c?b.size:Math.abs(g.size),width:c?Math.abs(g.size):b.size};p&&(S.options=f||this.resolveDataElementOptions(m,e[m].active?"active":i));const v=S.options||e[m].options;Hm(S,v,y,a),jm(S,v,u.ratio),this.updateElement(e[m],m,S,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),s=o.options.stacked,a=[],l=d=>{const c=d.controller.getParsed(n),u=c&&c[d.vScale.axis];if(ee(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&l(d))&&((s===!1||a.indexOf(d.stack)===-1||s===void 0&&d.stack===void 0)&&a.push(d.stack),d.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let s,a;for(s=0,a=n.data.length;s<a;++s)i.push(o.getPixelForValue(this.getParsed(s)[o.axis],s));const l=e.barThickness;return{min:l||Om(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:l?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:s,minBarLength:a}}=this,l=s||0,d=this.getParsed(e),c=d._custom,u=ii(c);let f=d[n.axis],p=0,m=o?this.applyStack(n,d,o):f,h,g;m!==f&&(p=m-f,m=f),u&&(f=c.barStart,m=c.barEnd-c.barStart,f!==0&&Je(f)!==Je(c.barEnd)&&(p=0),p+=f);const b=!ee(s)&&!u?s:p;let y=n.getPixelForValue(b);if(this.chart.getDataVisibility(e)?h=n.getPixelForValue(p+m):h=y,g=h-y,Math.abs(g)<a){g=zm(g,n,l)*a,f===l&&(y-=g/2);const S=n.getPixelForDecimal(0),v=n.getPixelForDecimal(1),w=Math.min(S,v),x=Math.max(S,v);y=Math.max(Math.min(y,x),w),h=y+g,o&&!u&&(d._stacks[n.axis]._visualValues[i]=n.getValueForPixel(h)-n.getValueForPixel(y))}if(y===n.getPixelForValue(l)){const S=Je(g)*n.getLineWidthForValue(l)/2;y+=S,g-=S}return{size:g,base:y,head:h,center:h+g/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,s=i.skipNull,a=q(i.maxBarThickness,1/0);let l,d;if(n.grouped){const c=s?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?Rm(e,n,i,c):Im(e,n,i,c),f=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0);l=u.start+u.chunk*f+u.chunk/2,d=Math.min(a,u.chunk*u.ratio)}else l=o.getPixelForValue(this.getParsed(e)[o.axis],e),d=Math.min(a,n.min*n.ratio);return{base:l-d/2,head:l+d/2,center:l,size:d}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&o[s].draw(this._ctx)}}H(Vo,"id","bar"),H(Vo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),H(Vo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Po extends We{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const s=super.parsePrimitiveData(e,n,o,i);for(let a=0;a<s.length;a++)s[a]._custom=this.resolveDataElementOptions(a+o).radius;return s}parseArrayData(e,n,o,i){const s=super.parseArrayData(e,n,o,i);for(let a=0;a<s.length;a++){const l=n[o+a];s[a]._custom=q(l[2],this.resolveDataElementOptions(a+o).radius)}return s}parseObjectData(e,n,o,i){const s=super.parseObjectData(e,n,o,i);for(let a=0;a<s.length;a++){const l=n[o+a];s[a]._custom=q(l&&l.r&&+l.r,this.resolveDataElementOptions(a+o).radius)}return s}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,a=this.getParsed(e),l=i.getLabelForValue(a.x),d=s.getLabelForValue(a.y),c=a._custom;return{label:o[e]||"",value:"("+l+", "+d+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(n,i),u=a.axis,f=l.axis;for(let p=n;p<n+o;p++){const m=e[p],h=!s&&this.getParsed(p),g={},b=g[u]=s?a.getPixelForDecimal(.5):a.getPixelForValue(h[u]),y=g[f]=s?l.getBasePixel():l.getPixelForValue(h[f]);g.skip=isNaN(b)||isNaN(y),c&&(g.options=d||this.resolveDataElementOptions(p,m.active?"active":i),s&&(g.options.radius=0)),this.updateElement(m,p,g,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=q(o&&o._custom,s),i}}H(Po,"id","bubble"),H(Po,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),H(Po,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Qm(t,e,n){let o=1,i=1,s=0,a=0;if(e<le){const l=t,d=l+e,c=Math.cos(l),u=Math.sin(l),f=Math.cos(d),p=Math.sin(d),m=(v,w,x)=>Vn(v,l,d,!0)?1:Math.max(w,w*n,x,x*n),h=(v,w,x)=>Vn(v,l,d,!0)?-1:Math.min(w,w*n,x,x*n),g=m(0,c,f),b=m(me,u,p),y=h(ae,c,f),S=h(ae+me,u,p);o=(g-y)/2,i=(b-S)/2,s=-(g+y)/2,a=-(b+S)/2}return{ratioX:o,ratioY:i,offsetX:s,offsetY:a}}class Xt extends We{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let s=d=>+o[d];if($(o[e])){const{key:d="value"}=this._parsing;s=c=>+At(o[c],d)}let a,l;for(a=e,l=e+n;a<l;++a)i._parsed[a]=s(a)}}_getRotation(){return Qe(this.options.rotation-90)}_getCircumference(){return Qe(this.options.circumference)}_getRotationExtents(){let e=le,n=-le;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,s=i._getRotation(),a=i._getCircumference();e=Math.min(e,s),n=Math.max(n,s+a)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,s=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-a)/2,0),d=Math.min(op(this.options.cutout,l),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:p,ratioY:m,offsetX:h,offsetY:g}=Qm(f,u,d),b=(o.width-a)/p,y=(o.height-a)/m,S=Math.max(Math.min(b,y)/2,0),v=aa(this.options.radius,S),w=Math.max(v*d,0),x=(v-w)/this._getVisibleDatasetWeightTotal();this.offsetX=h*v,this.offsetY=g*v,i.total=this.calculateTotal(),this.outerRadius=v-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*s/le)}updateElements(e,n,o,i){const s=i==="reset",a=this.chart,l=a.chartArea,c=a.options.animation,u=(l.left+l.right)/2,f=(l.top+l.bottom)/2,p=s&&c.animateScale,m=p?0:this.innerRadius,h=p?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(n,i);let y=this._getRotation(),S;for(S=0;S<n;++S)y+=this._circumference(S,s);for(S=n;S<n+o;++S){const v=this._circumference(S,s),w=e[S],x={x:u+this.offsetX,y:f+this.offsetY,startAngle:y,endAngle:y+v,circumference:v,outerRadius:h,innerRadius:m};b&&(x.options=g||this.resolveDataElementOptions(S,w.active?"active":i)),y+=v,this.updateElement(w,S,x,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const s=e._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(s))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?le*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=En(n._parsed[e],o.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,s,a,l,d;if(!e){for(i=0,s=o.data.datasets.length;i<s;++i)if(o.isDatasetVisible(i)){a=o.getDatasetMeta(i),e=a.data,l=a.controller;break}}if(!e)return 0;for(i=0,s=e.length;i<s;++i)d=l.resolveDataElementOptions(i),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const s=this.resolveDataElementOptions(o);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(q(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}H(Xt,"id","doughnut"),H(Xt,"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"}),H(Xt,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),H(Xt,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((s,a)=>{const d=e.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class Eo extends We{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:s}=n,a=this.chart._animationsDisabled;let{start:l,count:d}=Sa(n,i,a);this._drawStart=l,this._drawCount=d,Ca(n)&&(l=0,d=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:c},e),this.updateElements(i,l,d,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:a,vScale:l,_stacked:d,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),p=a.axis,m=l.axis,{spanGaps:h,segment:g}=this.options,b=on(h)?h:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||s||i==="none",S=n+o,v=e.length;let w=n>0&&this.getParsed(n-1);for(let x=0;x<v;++x){const F=e[x],E=y?F:{};if(x<n||x>=S){E.skip=!0;continue}const M=this.getParsed(x),I=ee(M[m]),N=E[p]=a.getPixelForValue(M[p],x),C=E[m]=s||I?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,M,d):M[m],x);E.skip=isNaN(N)||isNaN(C)||I,E.stop=x>0&&Math.abs(M[p]-w[p])>b,g&&(E.parsed=M,E.raw=c.data[x]),f&&(E.options=u||this.resolveDataElementOptions(x,F.active?"active":i)),y||this.updateElement(F,x,E,i),w=M}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,s,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}H(Eo,"id","line"),H(Eo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),H(Eo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class In extends We{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=En(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,n,o,i){return Ta.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),a=Math.max(o.cutoutPercentage?s/100*o.cutoutPercentage:1,0),l=(s-a)/e.getVisibleDatasetCount();this.outerRadius=s-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,o,i){const s=i==="reset",a=this.chart,d=a.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,p=c.getIndexAngle(0)-.5*ae;let m=p,h;const g=360/this.countVisibleElements();for(h=0;h<n;++h)m+=this._computeAngle(h,i,g);for(h=n;h<n+o;h++){const b=e[h];let y=m,S=m+this._computeAngle(h,i,g),v=a.getDataVisibility(h)?c.getDistanceFromCenterForValue(this.getParsed(h).r):0;m=S,s&&(d.animateScale&&(v=0),d.animateRotate&&(y=S=p));const w={x:u,y:f,innerRadius:0,outerRadius:v,startAngle:y,endAngle:S,options:this.resolveDataElementOptions(h,b.active?"active":i)};this.updateElement(b,h,w,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Qe(this.resolveDataElementOptions(e,n).angle||o):0}}H(In,"id","polarArea"),H(In,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),H(In,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((s,a)=>{const d=e.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class si extends Xt{}H(si,"id","pie"),H(si,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Fo extends We{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return Ta.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(o.points=i,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const l={_loop:!0,_fullLoop:s.length===i.length,options:a};this.updateElement(o,void 0,l,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const s=this._cachedMeta.rScale,a=i==="reset";for(let l=n;l<n+o;l++){const d=e[l],c=this.resolveDataElementOptions(l,d.active?"active":i),u=s.getPointPositionForValue(l,this.getParsed(l).r),f=a?s.xCenter:u.x,p=a?s.yCenter:u.y,m={x:f,y:p,angle:u.angle,skip:isNaN(f)||isNaN(p),options:c};this.updateElement(d,l,m,i)}}}H(Fo,"id","radar"),H(Fo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),H(Fo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class No extends We{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,a=this.getParsed(e),l=i.getLabelForValue(a.x),d=s.getLabelForValue(a.y);return{label:o[e]||"",value:"("+l+", "+d+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:a}=Sa(n,o,i);if(this._drawStart=s,this._drawCount=a,Ca(n)&&(s=0,a=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:d}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!d._decimated,l.points=o;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(l,void 0,{animated:!i,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,s,a,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const s=i==="reset",{iScale:a,vScale:l,_stacked:d,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),p=this.includeOptions(i,f),m=a.axis,h=l.axis,{spanGaps:g,segment:b}=this.options,y=on(g)?g:Number.POSITIVE_INFINITY,S=this.chart._animationsDisabled||s||i==="none";let v=n>0&&this.getParsed(n-1);for(let w=n;w<n+o;++w){const x=e[w],F=this.getParsed(w),E=S?x:{},M=ee(F[h]),I=E[m]=a.getPixelForValue(F[m],w),N=E[h]=s||M?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,F,d):F[h],w);E.skip=isNaN(I)||isNaN(N)||M,E.stop=w>0&&Math.abs(F[m]-v[m])>y,b&&(E.parsed=F,E.raw=c.data[w]),p&&(E.options=f||this.resolveDataElementOptions(w,x.active?"active":i)),S||this.updateElement(x,w,E,i),v=F}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let d=n.length-1;d>=0;--d)l=Math.max(l,n[d].size(this.resolveDataElementOptions(d))/2);return l>0&&l}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,a)/2}}H(No,"id","scatter"),H(No,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),H(No,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Wm=Object.freeze({__proto__:null,BarController:Vo,BubbleController:Po,DoughnutController:Xt,LineController:Eo,PieController:si,PolarAreaController:In,RadarController:Fo,ScatterController:No});function Gt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ai{constructor(e){H(this,"options");this.options=e||{}}static override(e){Object.assign(ai.prototype,e)}init(){}formats(){return Gt()}parse(){return Gt()}format(){return Gt()}add(){return Gt()}diff(){return Gt()}startOf(){return Gt()}endOf(){return Gt()}}var Ym={_date:ai};function Xm(t,e,n,o){const{controller:i,data:s,_sorted:a}=t,l=i._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&a&&s.length){const d=l._reversePixels?hp:st;if(o){if(i._sharedOptions){const c=s[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const f=d(s,e,n-u),p=d(s,e,n+u);return{lo:f.lo,hi:p.hi}}}}else return d(s,e,n)}return{lo:0,hi:s.length-1}}function Rn(t,e,n,o,i){const s=t.getSortedVisibleDatasetMetas(),a=n[e];for(let l=0,d=s.length;l<d;++l){const{index:c,data:u}=s[l],{lo:f,hi:p}=Xm(s[l],e,a,i);for(let m=f;m<=p;++m){const h=u[m];h.skip||o(h,c,m)}}}function Gm(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const s=e?Math.abs(o.x-i.x):0,a=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}function li(t,e,n,o,i){const s=[];return!i&&!t.isPointInArea(e)||Rn(t,n,e,function(l,d,c){!i&&!at(l,t.chartArea,0)||l.inRange(e.x,e.y,o)&&s.push({element:l,datasetIndex:d,index:c})},!0),s}function qm(t,e,n,o){let i=[];function s(a,l,d){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],o),{angle:f}=ha(a,{x:e.x,y:e.y});Vn(f,c,u)&&i.push({element:a,datasetIndex:l,index:d})}return Rn(t,n,e,s),i}function Jm(t,e,n,o,i,s){let a=[];const l=Gm(n);let d=Number.POSITIVE_INFINITY;function c(u,f,p){const m=u.inRange(e.x,e.y,i);if(o&&!m)return;const h=u.getCenterPoint(i);if(!(!!s||t.isPointInArea(h))&&!m)return;const b=l(e,h);b<d?(a=[{element:u,datasetIndex:f,index:p}],d=b):b===d&&a.push({element:u,datasetIndex:f,index:p})}return Rn(t,n,e,c),a}function di(t,e,n,o,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!o?qm(t,e,n,i):Jm(t,e,n,o,i,s)}function ll(t,e,n,o,i){const s=[],a=n==="x"?"inXRange":"inYRange";let l=!1;return Rn(t,n,e,(d,c,u)=>{d[a](e[n],i)&&(s.push({element:d,datasetIndex:c,index:u}),l=l||d.inRange(e.x,e.y,i))}),o&&!l?[]:s}var Km={evaluateInteractionItems:Rn,modes:{index(t,e,n,o){const i=Wt(e,t),s=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?li(t,i,s,o,a):di(t,i,s,!1,o,a),d=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=l[0].index,f=c.data[u];f&&!f.skip&&d.push({element:f,datasetIndex:c.index,index:u})}),d):[]},dataset(t,e,n,o){const i=Wt(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?li(t,i,s,o,a):di(t,i,s,!1,o,a);if(l.length>0){const d=l[0].datasetIndex,c=t.getDatasetMeta(d).data;l=[];for(let u=0;u<c.length;++u)l.push({element:c[u],datasetIndex:d,index:u})}return l},point(t,e,n,o){const i=Wt(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return li(t,i,s,o,a)},nearest(t,e,n,o){const i=Wt(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return di(t,i,s,n.intersect,o,a)},x(t,e,n,o){const i=Wt(e,t);return ll(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Wt(e,t);return ll(t,i,"y",n.intersect,o)}}};const dl=["left","top","right","bottom"];function Tn(t,e){return t.filter(n=>n.pos===e)}function cl(t,e){return t.filter(n=>dl.indexOf(n.pos)===-1&&n.box.axis===e)}function zn(t,e){return t.sort((n,o)=>{const i=e?o:n,s=e?n:o;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function Zm(t){const e=[];let n,o,i,s,a,l;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:s,options:{stack:a,stackWeight:l=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&s+a,stackWeight:l});return e}function $m(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:s}=n;if(!o||!dl.includes(i))continue;const a=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return e}function _m(t,e){const n=$m(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let s,a,l;for(s=0,a=t.length;s<a;++s){l=t[s];const{fullSize:d}=l.box,c=n[l.stack],u=c&&l.stackWeight/c.weight;l.horizontal?(l.width=u?u*o:d&&e.availableWidth,l.height=i):(l.width=o,l.height=u?u*i:d&&e.availableHeight)}return n}function eh(t){const e=Zm(t),n=zn(e.filter(c=>c.box.fullSize),!0),o=zn(Tn(e,"left"),!0),i=zn(Tn(e,"right")),s=zn(Tn(e,"top"),!0),a=zn(Tn(e,"bottom")),l=cl(e,"x"),d=cl(e,"y");return{fullSize:n,leftAndTop:o.concat(s),rightAndBottom:i.concat(d).concat(a).concat(l),chartArea:Tn(e,"chartArea"),vertical:o.concat(i).concat(d),horizontal:s.concat(a).concat(l)}}function ul(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function fl(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function th(t,e,n,o){const{pos:i,box:s}=n,a=t.maxPadding;if(!$(i)){n.size&&(t[i]-=n.size);const f=o[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&fl(a,s.getPadding());const l=Math.max(0,e.outerWidth-ul(a,t,"left","right")),d=Math.max(0,e.outerHeight-ul(a,t,"top","bottom")),c=l!==t.w,u=d!==t.h;return t.w=l,t.h=d,n.horizontal?{same:c,other:u}:{same:u,other:c}}function nh(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function oh(t,e){const n=e.maxPadding;function o(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{s[a]=Math.max(e[a],n[a])}),s}return o(t?["left","right"]:["top","bottom"])}function Ln(t,e,n,o){const i=[];let s,a,l,d,c,u;for(s=0,a=t.length,c=0;s<a;++s){l=t[s],d=l.box,d.update(l.width||e.w,l.height||e.h,oh(l.horizontal,e));const{same:f,other:p}=th(e,n,l,o);c|=f&&i.length,u=u||p,d.fullSize||i.push(l)}return c&&Ln(i,e,n,o)||u}function Mo(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function pl(t,e,n,o){const i=n.padding;let{x:s,y:a}=e;for(const l of t){const d=l.box,c=o[l.stack]||{count:1,placed:0,weight:1},u=l.stackWeight/c.weight||1;if(l.horizontal){const f=e.w*u,p=c.size||d.height;Bn(c.start)&&(a=c.start),d.fullSize?Mo(d,i.left,a,n.outerWidth-i.right-i.left,p):Mo(d,e.left+c.placed,a,f,p),c.start=a,c.placed+=f,a=d.bottom}else{const f=e.h*u,p=c.size||d.width;Bn(c.start)&&(s=c.start),d.fullSize?Mo(d,s,i.top,p,n.outerHeight-i.bottom-i.top):Mo(d,s,e.top+c.placed,p,f),c.start=s,c.placed+=f,s=d.right}}e.x=s,e.y=a}var Ae={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=we(t.options.layout.padding),s=Math.max(e-i.width,0),a=Math.max(n-i.height,0),l=eh(t.boxes),d=l.vertical,c=l.horizontal;oe(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=d.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/u,hBoxMaxHeight:a/2}),p=Object.assign({},i);fl(p,we(o));const m=Object.assign({maxPadding:p,w:s,h:a,x:i.left,y:i.top},i),h=_m(d.concat(c),f);Ln(l.fullSize,m,f,h),Ln(d,m,f,h),Ln(c,m,f,h)&&Ln(d,m,f,h),nh(m),pl(l.leftAndTop,m,f,h),m.x+=m.w,m.y+=m.h,pl(l.rightAndBottom,m,f,h),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},oe(l.chartArea,g=>{const b=g.box;Object.assign(b,t.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class ml{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class rh extends ml{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Oo="$chartjs",ih={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},hl=t=>t===null||t==="";function sh(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[Oo]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",hl(i)){const s=Ha(t,"width");s!==void 0&&(t.width=s)}if(hl(o))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Ha(t,"height");s!==void 0&&(t.height=s)}return t}const gl=lm?{passive:!0}:!1;function ah(t,e,n){t&&t.addEventListener(e,n,gl)}function lh(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,gl)}function dh(t,e){const n=ih[t.type]||t.type,{x:o,y:i}=Wt(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function Io(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function ch(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||Io(l.addedNodes,o),a=a&&!Io(l.removedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function uh(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||Io(l.removedNodes,o),a=a&&!Io(l.addedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Hn=new Map;let bl=0;function yl(){const t=window.devicePixelRatio;t!==bl&&(bl=t,Hn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function fh(t,e){Hn.size||window.addEventListener("resize",yl),Hn.set(t,e)}function ph(t){Hn.delete(t),Hn.size||window.removeEventListener("resize",yl)}function mh(t,e,n){const o=t.canvas,i=o&&ni(o);if(!i)return;const s=xa((l,d)=>{const c=i.clientWidth;n(l,d),c<i.clientWidth&&n()},window),a=new ResizeObserver(l=>{const d=l[0],c=d.contentRect.width,u=d.contentRect.height;c===0&&u===0||s(c,u)});return a.observe(i),fh(t,s),a}function ci(t,e,n){n&&n.disconnect(),e==="resize"&&ph(t)}function hh(t,e,n){const o=t.canvas,i=xa(s=>{t.ctx!==null&&n(dh(s,t))},t);return ah(o,e,i),i}class gh extends ml{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(sh(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[Oo])return!1;const o=n[Oo].initial;["height","width"].forEach(s=>{const a=o[s];ee(a)?n.removeAttribute(s):n.setAttribute(s,a)});const i=o.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Oo],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),a={attach:ch,detach:uh,resize:mh}[n]||hh;i[n]=a(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:ci,detach:ci,resize:ci}[n]||lh)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return am(e,n,o,i)}isAttached(e){const n=ni(e);return!!(n&&n.isConnected)}}function bh(t){return!ti()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?rh:gh}let dt=(Ar=class{constructor(){H(this,"x");H(this,"y");H(this,"active",!1);H(this,"options");H(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return on(this.x)&&on(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(s=>{i[s]=o[s]&&o[s].active()?o[s]._to:this[s]}),i}},H(Ar,"defaults",{}),H(Ar,"defaultRoutes"),Ar);function yh(t,e){const n=t.options.ticks,o=kh(t),i=Math.min(n.maxTicksLimit||o,o),s=n.major.enabled?Sh(e):[],a=s.length,l=s[0],d=s[a-1],c=[];if(a>i)return Ch(e,c,s,a/i),c;const u=xh(s,e,i);if(a>0){let f,p;const m=a>1?Math.round((d-l)/(a-1)):null;for(Ro(e,c,u,ee(m)?0:l-m,l),f=0,p=a-1;f<p;f++)Ro(e,c,u,s[f],s[f+1]);return Ro(e,c,u,d,ee(m)?e.length:d+m),c}return Ro(e,c,u),c}function kh(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function xh(t,e,n){const o=wh(t),i=e.length/n;if(!o)return Math.max(i,1);const s=up(o);for(let a=0,l=s.length-1;a<l;a++){const d=s[a];if(d>i)return d}return Math.max(i,1)}function Sh(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function Ch(t,e,n,o){let i=0,s=n[0],a;for(o=Math.ceil(o),a=0;a<t.length;a++)a===s&&(e.push(t[a]),i++,s=n[i*o])}function Ro(t,e,n,o,i){const s=q(o,0),a=Math.min(q(i,t.length),t.length);let l=0,d,c,u;for(n=Math.ceil(n),i&&(d=i-o,n=d/Math.floor(d/n)),u=s;u<0;)l++,u=Math.round(s+l*n);for(c=Math.max(s,0);c<a;c++)c===u&&(e.push(t[c]),l++,u=Math.round(s+l*n))}function wh(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const Ah=t=>t==="left"?"right":t==="right"?"left":t,kl=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,xl=(t,e)=>Math.min(e||t,t);function Sl(t,e){const n=[],o=t.length/e,i=t.length;let s=0;for(;s<i;s+=o)n.push(t[Math.floor(s)]);return n}function vh(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),s=t._startPixel,a=t._endPixel,l=1e-6;let d=t.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(d-s,a-d):e===0?c=(t.getPixelForTick(1)-d)/2:c=(d-t.getPixelForTick(i-1))/2,d+=i<e?c:-c,d<s-l||d>a+l)))return d}function Bh(t,e){oe(t,n=>{const o=n.gc,i=o.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[o[s]];o.splice(0,i)}})}function Un(t){return t.drawTicks?t.tickLength:0}function Cl(t,e){if(!t.display)return 0;const n=be(t.font,e),o=we(t.padding);return(se(t.text)?t.text.length:1)*n.lineHeight+o.height}function Dh(t,e){return Dt(t,{scale:e,type:"scale"})}function Vh(t,e,n){return Dt(t,{tick:n,index:e,type:"tick"})}function Ph(t,e,n){let o=Yr(t);return(n&&e!=="right"||!n&&e==="right")&&(o=Ah(o)),o}function Eh(t,e,n,o){const{top:i,left:s,bottom:a,right:l,chart:d}=t,{chartArea:c,scales:u}=d;let f=0,p,m,h;const g=a-i,b=l-s;if(t.isHorizontal()){if(m=Ce(o,s,l),$(n)){const y=Object.keys(n)[0],S=n[y];h=u[y].getPixelForValue(S)+g-e}else n==="center"?h=(c.bottom+c.top)/2+g-e:h=kl(t,n,e);p=l-s}else{if($(n)){const y=Object.keys(n)[0],S=n[y];m=u[y].getPixelForValue(S)-b+e}else n==="center"?m=(c.left+c.right)/2-b+e:m=kl(t,n,e);h=Ce(o,a,i),f=n==="left"?-me:me}return{titleX:m,titleY:h,maxWidth:p,rotation:f}}class qt extends dt{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=Ne(e,Number.POSITIVE_INFINITY),n=Ne(n,Number.NEGATIVE_INFINITY),o=Ne(o,Number.POSITIVE_INFINITY),i=Ne(i,Number.NEGATIVE_INFINITY),{min:Ne(e,o),max:Ne(n,i),minDefined:ue(e),maxDefined:ue(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:s}=this.getUserBounds(),a;if(i&&s)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let d=0,c=l.length;d<c;++d)a=l[d].controller.getMinMax(this,e),i||(n=Math.min(n,a.min)),s||(o=Math.max(o,a.max));return n=s&&n>o?o:n,o=i&&n>o?n:o,{min:Ne(n,Ne(o,n)),max:Ne(o,Ne(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ie(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:s,ticks:a}=this.options,l=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Lp(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=l<this.ticks.length;this._convertTicksToLabels(d?Sl(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=yh(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ie(this.options.afterUpdate,[this])}beforeSetDimensions(){ie(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(){ie(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ie(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ie(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,s;for(o=0,i=e.length;o<i;o++)s=e[o],s.label=ie(n.callback,[s.value,o,e],this)}afterTickToLabelConversion(){ie(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ie(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=xl(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let a=i,l,d,c;if(!this._isVisible()||!n.display||i>=s||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,p=u.highest.height,m=ke(this.chart.width-f,0,this.maxWidth);l=e.offset?this.maxWidth/o:m/(o-1),f+6>l&&(l=m/(o-(e.offset?.5:1)),d=this.maxHeight-Un(e.grid)-n.padding-Cl(e.title,this.chart.options.font),c=Math.sqrt(f*f+p*p),a=jr(Math.min(Math.asin(ke((u.highest.height+6)/l,-1,1)),Math.asin(ke(d/c,-1,1))-Math.asin(ke(p/c,-1,1)))),a=Math.max(i,Math.min(s,a))),this.labelRotation=a}afterCalculateLabelRotation(){ie(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ie(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:s}}=this,a=this._isVisible(),l=this.isHorizontal();if(a){const d=Cl(i,n.options.font);if(l?(e.width=this.maxWidth,e.height=Un(s)+d):(e.height=this.maxHeight,e.width=Un(s)+d),o.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:p}=this._getLabelSizes(),m=o.padding*2,h=Qe(this.labelRotation),g=Math.cos(h),b=Math.sin(h);if(l){const y=o.mirror?0:b*f.width+g*p.height;e.height=Math.min(this.maxHeight,e.height+y+m)}else{const y=o.mirror?0:g*f.width+b*p.height;e.width=Math.min(this.maxWidth,e.width+y+m)}this._calculatePadding(c,u,b,g)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:s,padding:a},position:l}=this.options,d=this.labelRotation!==0,c=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;d?c?(p=i*e.width,m=o*n.height):(p=o*e.height,m=i*n.width):s==="start"?m=n.width:s==="end"?p=e.width:s!=="inner"&&(p=e.width/2,m=n.width/2),this.paddingLeft=Math.max((p-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-f+a)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;s==="start"?(u=0,f=e.height):s==="end"&&(u=n.height,f=0),this.paddingTop=u+a,this.paddingBottom=f+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ie(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)ee(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=Sl(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:s}=this,a=[],l=[],d=Math.floor(n/xl(n,o));let c=0,u=0,f,p,m,h,g,b,y,S,v,w,x;for(f=0;f<n;f+=d){if(h=e[f].label,g=this._resolveTickFontOptions(f),i.font=b=g.string,y=s[b]=s[b]||{data:{},gc:[]},S=g.lineHeight,v=w=0,!ee(h)&&!se(h))v=So(i,y.data,y.gc,v,h),w=S;else if(se(h))for(p=0,m=h.length;p<m;++p)x=h[p],!ee(x)&&!se(x)&&(v=So(i,y.data,y.gc,v,x),w+=S);a.push(v),l.push(w),c=Math.max(v,c),u=Math.max(w,u)}Bh(s,n);const F=a.indexOf(c),E=l.indexOf(u),M=I=>({width:a[I]||0,height:l[I]||0});return{first:M(0),last:M(n-1),widest:M(F),highest:M(E),widths:a,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return mp(this._alignToPixels?Ht(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=Vh(this.getContext(),e,o))}return this.$context||(this.$context=Dh(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Qe(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),a=e.autoSkipPadding||0,l=s?s.widest.width+a:0,d=s?s.highest.height+a:0;return this.isHorizontal()?d*o>l*i?l/o:d/i:d*i<l*o?d/o:l/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:s,position:a,border:l}=i,d=s.offset,c=this.isHorizontal(),f=this.ticks.length+(d?1:0),p=Un(s),m=[],h=l.setContext(this.getContext()),g=h.display?h.width:0,b=g/2,y=function(V){return Ht(o,V,g)};let S,v,w,x,F,E,M,I,N,C,D,A;if(a==="top")S=y(this.bottom),E=this.bottom-p,I=S-b,C=y(e.top)+b,A=e.bottom;else if(a==="bottom")S=y(this.top),C=e.top,A=y(e.bottom)-b,E=S+b,I=this.top+p;else if(a==="left")S=y(this.right),F=this.right-p,M=S-b,N=y(e.left)+b,D=e.right;else if(a==="right")S=y(this.left),N=e.left,D=y(e.right)-b,F=S+b,M=this.left+p;else if(n==="x"){if(a==="center")S=y((e.top+e.bottom)/2+.5);else if($(a)){const V=Object.keys(a)[0],R=a[V];S=y(this.chart.scales[V].getPixelForValue(R))}C=e.top,A=e.bottom,E=S+b,I=E+p}else if(n==="y"){if(a==="center")S=y((e.left+e.right)/2);else if($(a)){const V=Object.keys(a)[0],R=a[V];S=y(this.chart.scales[V].getPixelForValue(R))}F=S-b,M=F-p,N=e.left,D=e.right}const k=q(i.ticks.maxTicksLimit,f),B=Math.max(1,Math.ceil(f/k));for(v=0;v<f;v+=B){const V=this.getContext(v),R=s.setContext(V),O=l.setContext(V),T=R.lineWidth,U=R.color,W=O.dash||[],j=O.dashOffset,K=R.tickWidth,_=R.tickColor,te=R.tickBorderDash||[],he=R.tickBorderDashOffset;w=vh(this,v,d),w!==void 0&&(x=Ht(o,w,T),c?F=M=N=D=x:E=I=C=A=x,m.push({tx1:F,ty1:E,tx2:M,ty2:I,x1:N,y1:C,x2:D,y2:A,width:T,color:U,borderDash:W,borderDashOffset:j,tickWidth:K,tickColor:_,tickBorderDash:te,tickBorderDashOffset:he}))}return this._ticksLength=f,this._borderValue=S,m}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:s}=o,a=this.isHorizontal(),l=this.ticks,{align:d,crossAlign:c,padding:u,mirror:f}=s,p=Un(o.grid),m=p+u,h=f?-u:m,g=-Qe(this.labelRotation),b=[];let y,S,v,w,x,F,E,M,I,N,C,D,A="middle";if(i==="top")F=this.bottom-h,E=this._getXAxisLabelAlignment();else if(i==="bottom")F=this.top+h,E=this._getXAxisLabelAlignment();else if(i==="left"){const B=this._getYAxisLabelAlignment(p);E=B.textAlign,x=B.x}else if(i==="right"){const B=this._getYAxisLabelAlignment(p);E=B.textAlign,x=B.x}else if(n==="x"){if(i==="center")F=(e.top+e.bottom)/2+m;else if($(i)){const B=Object.keys(i)[0],V=i[B];F=this.chart.scales[B].getPixelForValue(V)+m}E=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(e.left+e.right)/2-m;else if($(i)){const B=Object.keys(i)[0],V=i[B];x=this.chart.scales[B].getPixelForValue(V)}E=this._getYAxisLabelAlignment(p).textAlign}n==="y"&&(d==="start"?A="top":d==="end"&&(A="bottom"));const k=this._getLabelSizes();for(y=0,S=l.length;y<S;++y){v=l[y],w=v.label;const B=s.setContext(this.getContext(y));M=this.getPixelForTick(y)+s.labelOffset,I=this._resolveTickFontOptions(y),N=I.lineHeight,C=se(w)?w.length:1;const V=C/2,R=B.color,O=B.textStrokeColor,T=B.textStrokeWidth;let U=E;a?(x=M,E==="inner"&&(y===S-1?U=this.options.reverse?"left":"right":y===0?U=this.options.reverse?"right":"left":U="center"),i==="top"?c==="near"||g!==0?D=-C*N+N/2:c==="center"?D=-k.highest.height/2-V*N+N:D=-k.highest.height+N/2:c==="near"||g!==0?D=N/2:c==="center"?D=k.highest.height/2-V*N:D=k.highest.height-C*N,f&&(D*=-1),g!==0&&!B.showLabelBackdrop&&(x+=N/2*Math.sin(g))):(F=M,D=(1-C)*N/2);let W;if(B.showLabelBackdrop){const j=we(B.backdropPadding),K=k.heights[y],_=k.widths[y];let te=D-j.top,he=0-j.left;switch(A){case"middle":te-=K/2;break;case"bottom":te-=K;break}switch(E){case"center":he-=_/2;break;case"right":he-=_;break;case"inner":y===S-1?he-=_:y>0&&(he-=_/2);break}W={left:he,top:te,width:_+j.width,height:K+j.height,color:B.backdropColor}}b.push({label:w,font:I,textOffset:D,options:{rotation:g,color:R,strokeColor:O,strokeWidth:T,textAlign:U,textBaseline:A,translation:[x,F],backdrop:W}})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Qe(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:s}}=this.options,a=this._getLabelSizes(),l=e+s,d=a.widest.width;let c,u;return n==="left"?i?(u=this.right+s,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u+=d)):(u=this.right-l,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+s,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u-=d)):(u=this.left+l,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:s,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,s,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,a;const l=(d,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(d.x,d.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(s=0,a=i.length;s<a;++s){const d=i[s];n.drawOnChartArea&&l({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&l({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,s=o.setContext(this.getContext()),a=o.display?s.width:0;if(!a)return;const l=i.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let c,u,f,p;this.isHorizontal()?(c=Ht(e,this.left,a)-a/2,u=Ht(e,this.right,l)+l/2,f=p=d):(f=Ht(e,this.top,a)-a/2,p=Ht(e,this.bottom,l)+l/2,c=u=d),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,p),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&Co(o,i);const s=this.getLabelItems(e);for(const a of s){const l=a.options,d=a.font,c=a.label,u=a.textOffset;Ut(o,c,0,u,d,l)}i&&wo(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const s=be(o.font),a=we(o.padding),l=o.align;let d=s.lineHeight/2;n==="bottom"||n==="center"||$(n)?(d+=a.bottom,se(o.text)&&(d+=s.lineHeight*(o.text.length-1))):d+=a.top;const{titleX:c,titleY:u,maxWidth:f,rotation:p}=Eh(this,d,n,l);Ut(e,o.text,0,0,s,{color:o.color,maxWidth:f,rotation:p,textAlign:Ph(l,n,i),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=q(e.grid&&e.grid.z,-1),i=q(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==qt.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:o,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let s,a;for(s=0,a=n.length;s<a;++s){const l=n[s];l[o]===this.id&&(!e||l.type===e)&&i.push(l)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return be(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class To{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;Mh(n)&&(o=this.register(n));const i=this.items,s=e.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,Fh(e,a,o),this.override&&fe.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in fe[i]&&(delete fe[i][o],this.override&&delete Lt[o])}}function Fh(t,e,n){const o=An(Object.create(null),[n?fe.get(n):{},fe.get(e),t.defaults]);fe.set(e,o),t.defaultRoutes&&Nh(e,t.defaultRoutes),t.descriptors&&fe.describe(e,t.descriptors)}function Nh(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),s=[t].concat(o).join("."),a=e[n].split("."),l=a.pop(),d=a.join(".");fe.route(s,i,d,l)})}function Mh(t){return"id"in t&&"defaults"in t}class Oh{constructor(){this.controllers=new To(We,"datasets",!0),this.elements=new To(dt,"elements"),this.plugins=new To(Object,"plugins"),this.scales=new To(qt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const s=o||this._getRegistryForType(i);o||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):oe(i,a=>{const l=o||this._getRegistryForType(a);this._exec(e,l,a)})})}_exec(e,n,o){const i=Ur(e);ie(o["before"+i],[],o),n[e](o),ie(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var Ke=new Oh;class Ih{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=i?this._descriptors(e).filter(i):this._descriptors(e),a=this._notify(s,e,n,o);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,n,o,i){i=i||{};for(const s of e){const a=s.plugin,l=a[o],d=[n,i,s.options];if(ie(l,d,a)===!1&&i.cancelable)return!1}return!0}invalidate(){ee(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=q(o.options&&o.options.plugins,{}),s=Rh(o);return i===!1&&!n?[]:zh(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(s,a)=>s.filter(l=>!a.some(d=>l.plugin.id===d.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function Rh(t){const e={},n=[],o=Object.keys(Ke.plugins.items);for(let s=0;s<o.length;s++)n.push(Ke.getPlugin(o[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const a=i[s];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function Th(t,e){return!e&&t===!1?null:t===!0?{}:t}function zh(t,{plugins:e,localIds:n},o,i){const s=[],a=t.getContext();for(const l of e){const d=l.id,c=Th(o[d],i);c!==null&&s.push({plugin:l,options:Lh(t.config,{plugin:l,local:n[d]},c,a)})}return s}function Lh(t,{plugin:e,local:n},o,i){const s=t.pluginScopeKeys(e),a=t.getOptionScopes(o,s);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ui(t,e){const n=fe.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Hh(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function Uh(t,e){return t===e?"_index_":"_value_"}function wl(t){if(t==="x"||t==="y"||t==="r")return t}function jh(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function fi(t,...e){if(wl(t))return t;for(const n of e){const o=n.axis||jh(n.position)||t.length>1&&wl(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Al(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Qh(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return Al(t,"x",n[0])||Al(t,"y",n[0])}return{}}function Wh(t,e){const n=Lt[t.type]||{scales:{}},o=e.scales||{},i=ui(t.type,e),s=Object.create(null);return Object.keys(o).forEach(a=>{const l=o[a];if(!$(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const d=fi(a,l,Qh(a,t),fe.scales[l.type]),c=Uh(d,i),u=n.scales||{};s[a]=vn(Object.create(null),[{axis:d},l,u[d],u[c]])}),t.data.datasets.forEach(a=>{const l=a.type||t.type,d=a.indexAxis||ui(l,e),u=(Lt[l]||{}).scales||{};Object.keys(u).forEach(f=>{const p=Hh(f,d),m=a[p+"AxisID"]||p;s[m]=s[m]||Object.create(null),vn(s[m],[{axis:p},o[m],u[f]])})}),Object.keys(s).forEach(a=>{const l=s[a];vn(l,[fe.scales[l.type],fe.scale])}),s}function vl(t){const e=t.options||(t.options={});e.plugins=q(e.plugins,{}),e.scales=Wh(t,e)}function Bl(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Yh(t){return t=t||{},t.data=Bl(t.data),vl(t),t}const Dl=new Map,Vl=new Set;function zo(t,e){let n=Dl.get(t);return n||(n=e(),Dl.set(t,n),Vl.add(n)),n}const jn=(t,e,n)=>{const o=At(e,n);o!==void 0&&t.add(o)};class Xh{constructor(e){this._config=Yh(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Bl(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),vl(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return zo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return zo(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return zo(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return zo(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:s}=this,a=this._cachedScopes(e,o),l=a.get(n);if(l)return l;const d=new Set;n.forEach(u=>{e&&(d.add(e),u.forEach(f=>jn(d,e,f))),u.forEach(f=>jn(d,i,f)),u.forEach(f=>jn(d,Lt[s]||{},f)),u.forEach(f=>jn(d,fe,f)),u.forEach(f=>jn(d,qr,f))});const c=Array.from(d);return c.length===0&&c.push(Object.create(null)),Vl.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Lt[n]||{},fe.datasets[n]||{},{type:n},fe,qr]}resolveNamedOptions(e,n,o,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:l}=Pl(this._resolverCache,e,i);let d=a;if(qh(a,n)){s.$shared=!1,o=vt(o)?o():o;const c=this.createResolver(e,o,l);d=rn(a,o,c)}for(const c of n)s[c]=d[c];return s}createResolver(e,n,o=[""],i){const{resolver:s}=Pl(this._resolverCache,e,o);return $(n)?rn(s,n,void 0,i):s}}function Pl(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let s=o.get(i);return s||(s={resolver:$r(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},o.set(i,s)),s}const Gh=t=>$(t)&&Object.getOwnPropertyNames(t).some(e=>vt(t[e]));function qh(t,e){const{isScriptable:n,isIndexable:o}=Fa(t);for(const i of e){const s=n(i),a=o(i),l=(a||s)&&t[i];if(s&&(vt(l)||Gh(l))||a&&se(l))return!0}return!1}var Jh="4.4.2";const Kh=["top","bottom","left","right","chartArea"];function El(t,e){return t==="top"||t==="bottom"||Kh.indexOf(t)===-1&&e==="x"}function Fl(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function Nl(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ie(n&&n.onComplete,[t],e)}function Zh(t){const e=t.chart,n=e.options.animation;ie(n&&n.onProgress,[t],e)}function Ml(t){return ti()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Lo={},Ol=t=>{const e=Ml(t);return Object.values(Lo).filter(n=>n.canvas===e).pop()};function $h(t,e,n){const o=Object.keys(t);for(const i of o){const s=+i;if(s>=e){const a=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=a)}}}function _h(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function Ho(t,e,n){return t.options.clip?t[n]:e[n]}function eg(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:Ho(n,e,"left"),right:Ho(n,e,"right"),top:Ho(o,e,"top"),bottom:Ho(o,e,"bottom")}:e}class Ye{static register(...e){Ke.add(...e),Il()}static unregister(...e){Ke.remove(...e),Il()}constructor(e,n){const o=this.config=new Xh(n),i=Ml(e),s=Ol(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||bh(i)),this.platform.updateConfig(o);const l=this.platform.acquireContext(i,a.aspectRatio),d=l&&l.canvas,c=d&&d.height,u=d&&d.width;if(this.id=np(),this.ctx=l,this.canvas=d,this.width=u,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Ih,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=yp(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],Lo[this.id]=this,!l||!d){console.error("Failed to create chart: can't acquire context from the given item");return}lt.listen(this,"complete",Nl),lt.listen(this,"progress",Zh),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:s}=this;return ee(e)?n&&s?s:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Ke}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():La(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Va(this.canvas,this.ctx),this}stop(){return lt.stop(this),this}resize(e,n){lt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,s=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,e,n,s),l=o.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,La(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),ie(o.onResize,[this,a],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};oe(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((a,l)=>(a[l]=!1,a),{});let s=[];n&&(s=s.concat(Object.keys(n).map(a=>{const l=n[a],d=fi(a,l),c=d==="r",u=d==="x";return{options:l,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),oe(s,a=>{const l=a.options,d=l.id,c=fi(d,l),u=q(l.type,a.dtype);(l.position===void 0||El(l.position,c)!==El(a.dposition))&&(l.position=a.dposition),i[d]=!0;let f=null;if(d in o&&o[d].type===u)f=o[d];else{const p=Ke.getScale(u);f=new p({id:d,type:u,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(l,e)}),oe(i,(a,l)=>{a||delete o[l]}),oe(o,a=>{Ae.configure(this,a,a.options),Ae.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,s)=>i.index-s.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(Fl("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(s=>s===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const s=n[o];let a=this.getDatasetMeta(o);const l=s.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=l,a.indexAxis=s.indexAxis||ui(l,this.options),a.order=s.order||0,a.index=o,a.label=""+s.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const d=Ke.getController(l),{datasetElementType:c,dataElementType:u}=fe.datasets[l];Object.assign(d,{dataElementType:Ke.getElement(u),datasetElementType:c&&Ke.getElement(c)}),a.controller=new d(this,o),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){oe(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),p=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(p),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),i||oe(s,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Fl("z","_idx"));const{_active:l,_lastEvent:d}=this;d?this._eventHandler(d,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){oe(this.scales,e=>{Ae.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!ca(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:s}of n){const a=o==="_removeElements"?-s:s;$h(e,i,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=s=>new Set(e.filter(a=>a[0]===s).map((a,l)=>l+","+a.splice(1).join(","))),i=o(0);for(let s=1;s<n;s++)if(!ca(i,o(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ae.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],oe(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,vt(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(lt.has(this)?this.attached&&!lt.running(this)&&lt.start(this):(this.draw(),Nl({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,s;for(i=0,s=n.length;i<s;++i){const a=n[i];(!e||a.visible)&&o.push(a)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,s=eg(e,this.chartArea),a={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(i&&Co(n,{left:o.left===!1?0:s.left-o.left,right:o.right===!1?this.width:s.right+o.right,top:o.top===!1?0:s.top-o.top,bottom:o.bottom===!1?this.height:s.bottom+o.bottom}),e.controller.draw(),i&&wo(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return at(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const s=Km.modes[n];return typeof s=="function"?s(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=Dt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",s=this.getDatasetMeta(e),a=s.controller._resolveAnimations(void 0,i);Bn(n)?(s.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),a.update(s,{visible:o}),this.update(l=>l.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),lt.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Va(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Lo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(s,a)=>{n.addEventListener(this,s,a),e[s]=a},i=(s,a,l)=>{s.offsetX=a,s.offsetY=l,this._eventHandler(s)};oe(this.options.events,s=>o(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(d,c)=>{n.addEventListener(this,d,c),e[d]=c},i=(d,c)=>{e[d]&&(n.removeEventListener(this,d,c),delete e[d])},s=(d,c)=>{this.canvas&&this.resize(d,c)};let a;const l=()=>{i("attach",l),this.attached=!0,this.resize(),o("resize",s),o("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),o("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){oe(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},oe(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let s,a,l,d;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),l=0,d=e.length;l<d;++l){a=e[l];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:s,index:a})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[a],index:a}});!go(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,s=(d,c)=>d.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),a=s(n,e),l=o?e:s(e,n);a.length&&this.updateHoverStyle(a,i.mode,!1),l.length&&i.mode&&this.updateHoverStyle(l,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const s=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(s||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:s}=this,a=n,l=this._getActiveElements(e,i,o,a),d=lp(e),c=_h(e,this._lastEvent,o,d);o&&(this._lastEvent=null,ie(s.onHover,[e,l,this],this),d&&ie(s.onClick,[e,l,this],this));const u=!go(l,i);return(u||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}}H(Ye,"defaults",fe),H(Ye,"instances",Lo),H(Ye,"overrides",Lt),H(Ye,"registry",Ke),H(Ye,"version",Jh),H(Ye,"getChart",Ol);function Il(){return oe(Ye.instances,t=>t._plugins.invalidate())}function tg(t,e,n){const{startAngle:o,pixelMargin:i,x:s,y:a,outerRadius:l,innerRadius:d}=e;let c=i/l;t.beginPath(),t.arc(s,a,l,o-c,n+c),d>i?(c=i/d,t.arc(s,a,d,n+c,o-c,!0)):t.arc(s,a,i,n+me,o-me),t.closePath(),t.clip()}function ng(t){return Zr(t,["outerStart","outerEnd","innerStart","innerEnd"])}function og(t,e,n,o){const i=ng(t.options.borderRadius),s=(n-e)/2,a=Math.min(s,o*e/2),l=d=>{const c=(n-Math.min(s,d))*o/2;return ke(d,0,Math.min(s,c))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:ke(i.innerStart,0,a),innerEnd:ke(i.innerEnd,0,a)}}function ln(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Uo(t,e,n,o,i,s){const{x:a,y:l,startAngle:d,pixelMargin:c,innerRadius:u}=e,f=Math.max(e.outerRadius+o+n-c,0),p=u>0?u+o+n+c:0;let m=0;const h=i-d;if(o){const B=u>0?u-o:0,V=f>0?f-o:0,R=(B+V)/2,O=R!==0?h*R/(R+o):h;m=(h-O)/2}const g=Math.max(.001,h*f-n/ae)/f,b=(h-g)/2,y=d+b+m,S=i-b-m,{outerStart:v,outerEnd:w,innerStart:x,innerEnd:F}=og(e,p,f,S-y),E=f-v,M=f-w,I=y+v/E,N=S-w/M,C=p+x,D=p+F,A=y+x/C,k=S-F/D;if(t.beginPath(),s){const B=(I+N)/2;if(t.arc(a,l,f,I,B),t.arc(a,l,f,B,N),w>0){const T=ln(M,N,a,l);t.arc(T.x,T.y,w,N,S+me)}const V=ln(D,S,a,l);if(t.lineTo(V.x,V.y),F>0){const T=ln(D,k,a,l);t.arc(T.x,T.y,F,S+me,k+Math.PI)}const R=(S-F/p+(y+x/p))/2;if(t.arc(a,l,p,S-F/p,R,!0),t.arc(a,l,p,R,y+x/p,!0),x>0){const T=ln(C,A,a,l);t.arc(T.x,T.y,x,A+Math.PI,y-me)}const O=ln(E,y,a,l);if(t.lineTo(O.x,O.y),v>0){const T=ln(E,I,a,l);t.arc(T.x,T.y,v,y-me,I)}}else{t.moveTo(a,l);const B=Math.cos(I)*f+a,V=Math.sin(I)*f+l;t.lineTo(B,V);const R=Math.cos(N)*f+a,O=Math.sin(N)*f+l;t.lineTo(R,O)}t.closePath()}function rg(t,e,n,o,i){const{fullCircles:s,startAngle:a,circumference:l}=e;let d=e.endAngle;if(s){Uo(t,e,n,o,d,i);for(let c=0;c<s;++c)t.fill();isNaN(l)||(d=a+(l%le||le))}return Uo(t,e,n,o,d,i),t.fill(),d}function ig(t,e,n,o,i){const{fullCircles:s,startAngle:a,circumference:l,options:d}=e,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:p}=d,m=d.borderAlign==="inner";if(!c)return;t.setLineDash(f||[]),t.lineDashOffset=p,m?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let h=e.endAngle;if(s){Uo(t,e,n,o,h,i);for(let g=0;g<s;++g)t.stroke();isNaN(l)||(h=a+(l%le||le))}m&&tg(t,e,h),s||(Uo(t,e,n,o,h,i),t.stroke())}class Qn extends dt{constructor(n){super();H(this,"circumference");H(this,"endAngle");H(this,"fullCircles");H(this,"innerRadius");H(this,"outerRadius");H(this,"pixelMargin");H(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,n&&Object.assign(this,n)}inRange(n,o,i){const s=this.getProps(["x","y"],i),{angle:a,distance:l}=ha(s,{x:n,y:o}),{startAngle:d,endAngle:c,innerRadius:u,outerRadius:f,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),m=(this.options.spacing+this.options.borderWidth)/2,g=q(p,c-d)>=le||Vn(a,d,c),b=it(l,u+m,f+m);return g&&b}getCenterPoint(n){const{x:o,y:i,startAngle:s,endAngle:a,innerRadius:l,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,f=(s+a)/2,p=(l+d+u+c)/2;return{x:o+Math.cos(f)*p,y:i+Math.sin(f)*p}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,s=(o.offset||0)/4,a=(o.spacing||0)/2,l=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>le?Math.floor(i/le):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*s,Math.sin(d)*s);const c=1-Math.sin(Math.min(ae,i||0)),u=s*c;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,rg(n,this,u,a,l),ig(n,this,u,a,l),n.restore()}}H(Qn,"id","arc"),H(Qn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),H(Qn,"defaultRoutes",{backgroundColor:"backgroundColor"}),H(Qn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Rl(t,e,n=e){t.lineCap=q(n.borderCapStyle,e.borderCapStyle),t.setLineDash(q(n.borderDash,e.borderDash)),t.lineDashOffset=q(n.borderDashOffset,e.borderDashOffset),t.lineJoin=q(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=q(n.borderWidth,e.borderWidth),t.strokeStyle=q(n.borderColor,e.borderColor)}function sg(t,e,n){t.lineTo(n.x,n.y)}function ag(t){return t.stepped?Ep:t.tension||t.cubicInterpolationMode==="monotone"?Fp:sg}function Tl(t,e,n={}){const o=t.length,{start:i=0,end:s=o-1}=n,{start:a,end:l}=e,d=Math.max(i,a),c=Math.min(s,l),u=i<a&&s<a||i>l&&s>l;return{count:o,start:d,loop:e.loop,ilen:c<d&&!u?o+c-d:c-d}}function lg(t,e,n,o){const{points:i,options:s}=e,{count:a,start:l,loop:d,ilen:c}=Tl(i,n,o),u=ag(s);let{move:f=!0,reverse:p}=o||{},m,h,g;for(m=0;m<=c;++m)h=i[(l+(p?c-m:m))%a],!h.skip&&(f?(t.moveTo(h.x,h.y),f=!1):u(t,g,h,p,s.stepped),g=h);return d&&(h=i[(l+(p?c:0))%a],u(t,g,h,p,s.stepped)),!!d}function dg(t,e,n,o){const i=e.points,{count:s,start:a,ilen:l}=Tl(i,n,o),{move:d=!0,reverse:c}=o||{};let u=0,f=0,p,m,h,g,b,y;const S=w=>(a+(c?l-w:w))%s,v=()=>{g!==b&&(t.lineTo(u,b),t.lineTo(u,g),t.lineTo(u,y))};for(d&&(m=i[S(0)],t.moveTo(m.x,m.y)),p=0;p<=l;++p){if(m=i[S(p)],m.skip)continue;const w=m.x,x=m.y,F=w|0;F===h?(x<g?g=x:x>b&&(b=x),u=(f*u+w)/++f):(v(),t.lineTo(w,x),h=F,f=0,g=b=x),y=x}v()}function pi(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?dg:lg}function cg(t){return t.stepped?dm:t.tension||t.cubicInterpolationMode==="monotone"?cm:Yt}function ug(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),Rl(t,e.options),t.stroke(i)}function fg(t,e,n,o){const{segments:i,options:s}=e,a=pi(e);for(const l of i)Rl(t,s,l.style),t.beginPath(),a(t,e,l,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const pg=typeof Path2D=="function";function mg(t,e,n,o){pg&&!e.options.segment?ug(t,e,n,o):fg(t,e,n,o)}class Vt extends dt{constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;tm(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=gm(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],s=this.points,a=Xa(this,{property:n,start:i,end:i});if(!a.length)return;const l=[],d=cg(o);let c,u;for(c=0,u=a.length;c<u;++c){const{start:f,end:p}=a[c],m=s[f],h=s[p];if(m===h){l.push(m);continue}const g=Math.abs((i-m[n])/(h[n]-m[n])),b=d(m,h,g,o.stepped);b[n]=e[n],l.push(b)}return l.length===1?l[0]:l}pathSegment(e,n,o){return pi(this)(e,this,n,o)}path(e,n,o){const i=this.segments,s=pi(this);let a=this._loop;n=n||0,o=o||this.points.length-n;for(const l of i)a&=s(e,this,l,{start:n,end:n+o-1});return!!a}draw(e,n,o,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),mg(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}H(Vt,"id","line"),H(Vt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),H(Vt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),H(Vt,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function zl(t,e,n,o){const i=t.options,{[n]:s}=t.getProps([n],o);return Math.abs(e-s)<i.radius+i.hitRadius}class jo extends dt{constructor(n){super();H(this,"parsed");H(this,"skip");H(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const s=this.options,{x:a,y:l}=this.getProps(["x","y"],i);return Math.pow(n-a,2)+Math.pow(o-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,o){return zl(this,n,"x",o)}inYRange(n,o){return zl(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!at(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Kr(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}H(jo,"id","point"),H(jo,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),H(jo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Ll(t,e){const{x:n,y:o,base:i,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let l,d,c,u,f;return t.horizontal?(f=a/2,l=Math.min(n,i),d=Math.max(n,i),c=o-f,u=o+f):(f=s/2,l=n-f,d=n+f,c=Math.min(o,i),u=Math.max(o,i)),{left:l,top:c,right:d,bottom:u}}function Pt(t,e,n,o){return t?0:ke(e,n,o)}function hg(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,s=Ea(o);return{t:Pt(i.top,s.top,0,n),r:Pt(i.right,s.right,0,e),b:Pt(i.bottom,s.bottom,0,n),l:Pt(i.left,s.left,0,e)}}function gg(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,s=jt(i),a=Math.min(e,n),l=t.borderSkipped,d=o||$(i);return{topLeft:Pt(!d||l.top||l.left,s.topLeft,0,a),topRight:Pt(!d||l.top||l.right,s.topRight,0,a),bottomLeft:Pt(!d||l.bottom||l.left,s.bottomLeft,0,a),bottomRight:Pt(!d||l.bottom||l.right,s.bottomRight,0,a)}}function bg(t){const e=Ll(t),n=e.right-e.left,o=e.bottom-e.top,i=hg(t,n/2,o/2),s=gg(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:s},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function mi(t,e,n,o){const i=e===null,s=n===null,l=t&&!(i&&s)&&Ll(t,o);return l&&(i||it(e,l.left,l.right))&&(s||it(n,l.top,l.bottom))}function yg(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function kg(t,e){t.rect(e.x,e.y,e.w,e.h)}function hi(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-o,a=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+s,h:t.h+a,radius:t.radius}}class Qo extends dt{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:s,outer:a}=bg(this),l=yg(a.radius)?Nn:kg;e.save(),(a.w!==s.w||a.h!==s.h)&&(e.beginPath(),l(e,hi(a,n,s)),e.clip(),l(e,hi(s,-n,a)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),l(e,hi(s,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return mi(this,e,n,o)}inXRange(e,n){return mi(this,e,null,n)}inYRange(e,n){return mi(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+i)/2:n,y:s?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}H(Qo,"id","bar"),H(Qo,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),H(Qo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var xg=Object.freeze({__proto__:null,ArcElement:Qn,BarElement:Qo,LineElement:Vt,PointElement:jo});const gi=["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)"],Hl=gi.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ul(t){return gi[t%gi.length]}function jl(t){return Hl[t%Hl.length]}function Sg(t,e){return t.borderColor=Ul(e),t.backgroundColor=jl(e),++e}function Cg(t,e){return t.backgroundColor=t.data.map(()=>Ul(e++)),e}function wg(t,e){return t.backgroundColor=t.data.map(()=>jl(e++)),e}function Ag(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof Xt?e=Cg(n,e):i instanceof In?e=wg(n,e):i&&(e=Sg(n,e))}}function Ql(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function vg(t){return t&&(t.borderColor||t.backgroundColor)}var Bg={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:s}=i;if(!n.forceOverride&&(Ql(o)||vg(i)||s&&Ql(s)))return;const a=Ag(t);o.forEach(a)}};function Dg(t,e,n,o,i){const s=i.samples||o;if(s>=n)return t.slice(e,e+n);const a=[],l=(n-2)/(s-2);let d=0;const c=e+n-1;let u=e,f,p,m,h,g;for(a[d++]=t[u],f=0;f<s-2;f++){let b=0,y=0,S;const v=Math.floor((f+1)*l)+1+e,w=Math.min(Math.floor((f+2)*l)+1,n)+e,x=w-v;for(S=v;S<w;S++)b+=t[S].x,y+=t[S].y;b/=x,y/=x;const F=Math.floor(f*l)+1+e,E=Math.min(Math.floor((f+1)*l)+1,n)+e,{x:M,y:I}=t[u];for(m=h=-1,S=F;S<E;S++)h=.5*Math.abs((M-b)*(t[S].y-I)-(M-t[S].x)*(y-I)),h>m&&(m=h,p=t[S],g=S);a[d++]=p,u=g}return a[d++]=t[c],a}function Vg(t,e,n,o){let i=0,s=0,a,l,d,c,u,f,p,m,h,g;const b=[],y=e+n-1,S=t[e].x,w=t[y].x-S;for(a=e;a<e+n;++a){l=t[a],d=(l.x-S)/w*o,c=l.y;const x=d|0;if(x===u)c<h?(h=c,f=a):c>g&&(g=c,p=a),i=(s*i+l.x)/++s;else{const F=a-1;if(!ee(f)&&!ee(p)){const E=Math.min(f,p),M=Math.max(f,p);E!==m&&E!==F&&b.push({...t[E],x:i}),M!==m&&M!==F&&b.push({...t[M],x:i})}a>0&&F!==m&&b.push(t[F]),b.push(l),u=x,s=0,h=g=c,f=p=m=a}}return b}function Wl(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Yl(t){t.data.datasets.forEach(e=>{Wl(e)})}function Pg(t,e){const n=e.length;let o=0,i;const{iScale:s}=t,{min:a,max:l,minDefined:d,maxDefined:c}=s.getUserBounds();return d&&(o=ke(st(e,s.axis,a).lo,0,n-1)),c?i=ke(st(e,s.axis,l).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var Eg={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){Yl(t);return}const o=t.width;t.data.datasets.forEach((i,s)=>{const{_data:a,indexAxis:l}=i,d=t.getDatasetMeta(s),c=a||i.data;if(Mn([l,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const u=t.scales[d.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:p}=Pg(d,c);const m=n.threshold||4*o;if(p<=m){Wl(i);return}ee(a)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let h;switch(n.algorithm){case"lttb":h=Dg(c,f,p,o,n);break;case"min-max":h=Vg(c,f,p,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=h})},destroy(t){Yl(t)}};function Fg(t,e,n){const o=t.segments,i=t.points,s=e.points,a=[];for(const l of o){let{start:d,end:c}=l;c=yi(d,c,i);const u=bi(n,i[d],i[c],l.loop);if(!e.segments){a.push({source:l,target:u,start:i[d],end:i[c]});continue}const f=Xa(e,u);for(const p of f){const m=bi(n,s[p.start],s[p.end],p.loop),h=Ya(l,i,m);for(const g of h)a.push({source:g,target:p,start:{[n]:Xl(u,m,"start",Math.max)},end:{[n]:Xl(u,m,"end",Math.min)}})}}return a}function bi(t,e,n,o){if(o)return;let i=e[t],s=n[t];return t==="angle"&&(i=Me(i),s=Me(s)),{property:t,start:i,end:s}}function Ng(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:a,end:l})=>{l=yi(a,l,i);const d=i[a],c=i[l];o!==null?(s.push({x:d.x,y:o}),s.push({x:c.x,y:o})):n!==null&&(s.push({x:n,y:d.y}),s.push({x:n,y:c.y}))}),s}function yi(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function Xl(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function Gl(t,e){let n=[],o=!1;return se(t)?(o=!0,n=t):n=Ng(t,e),n.length?new Vt({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function ql(t){return t&&t.fill!==!1}function Mg(t,e,n){let i=t[e].fill;const s=[e];let a;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!ue(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function Og(t,e,n){const o=zg(t);if($(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return ue(i)&&Math.floor(i)===i?Ig(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Ig(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function Rg(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:$(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function Tg(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:$(t)?o=t.value:o=e.getBaseValue(),o}function zg(t){const e=t.options,n=e.fill;let o=q(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function Lg(t){const{scale:e,index:n,line:o}=t,i=[],s=o.segments,a=o.points,l=Hg(e,n);l.push(Gl({x:null,y:e.bottom},o));for(let d=0;d<s.length;d++){const c=s[d];for(let u=c.start;u<=c.end;u++)Ug(i,a[u],l)}return new Vt({points:i,options:{}})}function Hg(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const s=o[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function Ug(t,e,n){const o=[];for(let i=0;i<n.length;i++){const s=n[i],{first:a,last:l,point:d}=jg(s,e,"x");if(!(!d||a&&l)){if(a)o.unshift(d);else if(t.push(d),!l)break}}t.push(...o)}function jg(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],s=t.segments,a=t.points;let l=!1,d=!1;for(let c=0;c<s.length;c++){const u=s[c],f=a[u.start][n],p=a[u.end][n];if(it(i,f,p)){l=i===f,d=i===p;break}}return{first:l,last:d,point:o}}class Jl{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:s,radius:a}=this;return n=n||{start:0,end:le},e.arc(i,s,a,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:o+Math.sin(s)*i,angle:s}}}function Qg(t){const{chart:e,fill:n,line:o}=t;if(ue(n))return Wg(e,n);if(n==="stack")return Lg(t);if(n==="shape")return!0;const i=Yg(t);return i instanceof Jl?i:Gl(i,o)}function Wg(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function Yg(t){return(t.scale||{}).getPointPositionForValue?Gg(t):Xg(t)}function Xg(t){const{scale:e={},fill:n}=t,o=Rg(n,e);if(ue(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function Gg(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,s=o.reverse?e.max:e.min,a=Tg(n,e,s),l=[];if(o.grid.circular){const d=e.getPointPositionForValue(0,s);return new Jl({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(a)})}for(let d=0;d<i;++d)l.push(e.getPointPositionForValue(d,a));return l}function ki(t,e,n){const o=Qg(e),{line:i,scale:s,axis:a}=e,l=i.options,d=l.fill,c=l.backgroundColor,{above:u=c,below:f=c}=d||{};o&&i.points.length&&(Co(t,n),qg(t,{line:i,target:o,above:u,below:f,area:n,scale:s,axis:a}),wo(t))}function qg(t,e){const{line:n,target:o,above:i,below:s,area:a,scale:l}=e,d=n._loop?"angle":e.axis;t.save(),d==="x"&&s!==i&&(Kl(t,o,a.top),Zl(t,{line:n,target:o,color:i,scale:l,property:d}),t.restore(),t.save(),Kl(t,o,a.bottom)),Zl(t,{line:n,target:o,color:s,scale:l,property:d}),t.restore()}function Kl(t,e,n){const{segments:o,points:i}=e;let s=!0,a=!1;t.beginPath();for(const l of o){const{start:d,end:c}=l,u=i[d],f=i[yi(d,c,i)];s?(t.moveTo(u.x,u.y),s=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),a=!!e.pathSegment(t,l,{move:a}),a?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Zl(t,e){const{line:n,target:o,property:i,color:s,scale:a}=e,l=Fg(n,o,i);for(const{source:d,target:c,start:u,end:f}of l){const{style:{backgroundColor:p=s}={}}=d,m=o!==!0;t.save(),t.fillStyle=p,Jg(t,a,m&&bi(i,u,f)),t.beginPath();const h=!!n.pathSegment(t,d);let g;if(m){h?t.closePath():$l(t,o,f,i);const b=!!o.pathSegment(t,c,{move:h,reverse:!0});g=h&&b,g||$l(t,o,u,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function Jg(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:s,start:a,end:l}=n||{};s==="x"&&(t.beginPath(),t.rect(a,o,l-a,i-o),t.clip())}function $l(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var Kg={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let s,a,l,d;for(a=0;a<o;++a)s=t.getDatasetMeta(a),l=s.dataset,d=null,l&&l.options&&l instanceof Vt&&(d={visible:t.isDatasetVisible(a),index:a,fill:Og(l,a,o),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=d,i.push(d);for(a=0;a<o;++a)d=i[a],!(!d||d.fill===!1)&&(d.fill=Mg(i,a,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let a=i.length-1;a>=0;--a){const l=i[a].$filler;l&&(l.line.updateControlPoints(s,l.axis),o&&l.fill&&ki(t.ctx,l,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const s=o[i].$filler;ql(s)&&ki(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!ql(o)||n.drawTime!=="beforeDatasetDraw"||ki(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _l=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},Zg=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class ed extends dt{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=ie(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=be(o.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:l,itemHeight:d}=_l(o,s);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,s,l,d)+10):(u=this.maxHeight,c=this._fitCols(a,i,l,d)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:s,maxWidth:a,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+l;let f=e;s.textAlign="left",s.textBaseline="middle";let p=-1,m=-u;return this.legendItems.forEach((h,g)=>{const b=o+n/2+s.measureText(h.text).width;(g===0||c[c.length-1]+b+2*l>a)&&(f+=u,c[c.length-(g>0?0:1)]=0,m+=u,p++),d[g]={left:0,top:m,row:p,width:b,height:i},c[c.length-1]+=b+l}),f}_fitCols(e,n,o,i){const{ctx:s,maxHeight:a,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-e;let f=l,p=0,m=0,h=0,g=0;return this.legendItems.forEach((b,y)=>{const{itemWidth:S,itemHeight:v}=$g(o,n,s,b,i);y>0&&m+v+2*l>u&&(f+=p+l,c.push({width:p,height:m}),h+=p+l,g++,p=m=0),d[y]={left:h,top:m,col:g,width:S,height:v},p=Math.max(p,S),m+=v+l}),f+=p,c.push({width:p,height:m}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:s}}=this,a=an(s,this.left,this.width);if(this.isHorizontal()){let l=0,d=Ce(o,this.left+i,this.right-this.lineWidths[l]);for(const c of n)l!==c.row&&(l=c.row,d=Ce(o,this.left+i,this.right-this.lineWidths[l])),c.top+=this.top+e+i,c.left=a.leftForLtr(a.x(d),c.width),d+=c.width+i}else{let l=0,d=Ce(o,this.top+e+i,this.bottom-this.columnSizes[l].height);for(const c of n)c.col!==l&&(l=c.col,d=Ce(o,this.top+e+i,this.bottom-this.columnSizes[l].height)),c.top=d,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),d+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Co(e,this),this._draw(),wo(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:s,labels:a}=e,l=fe.color,d=an(e.rtl,this.left,this.width),c=be(a.font),{padding:u}=a,f=c.size,p=f/2;let m;this.drawTitle(),i.textAlign=d.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:h,boxHeight:g,itemHeight:b}=_l(a,f),y=function(F,E,M){if(isNaN(h)||h<=0||isNaN(g)||g<0)return;i.save();const I=q(M.lineWidth,1);if(i.fillStyle=q(M.fillStyle,l),i.lineCap=q(M.lineCap,"butt"),i.lineDashOffset=q(M.lineDashOffset,0),i.lineJoin=q(M.lineJoin,"miter"),i.lineWidth=I,i.strokeStyle=q(M.strokeStyle,l),i.setLineDash(q(M.lineDash,[])),a.usePointStyle){const N={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:I},C=d.xPlus(F,h/2),D=E+p;Pa(i,N,C,D,a.pointStyleWidth&&h)}else{const N=E+Math.max((f-g)/2,0),C=d.leftForLtr(F,h),D=jt(M.borderRadius);i.beginPath(),Object.values(D).some(A=>A!==0)?Nn(i,{x:C,y:N,w:h,h:g,radius:D}):i.rect(C,N,h,g),i.fill(),I!==0&&i.stroke()}i.restore()},S=function(F,E,M){Ut(i,M.text,F,E+b/2,c,{strikethrough:M.hidden,textAlign:d.textAlign(M.textAlign)})},v=this.isHorizontal(),w=this._computeTitleHeight();v?m={x:Ce(s,this.left+u,this.right-o[0]),y:this.top+u+w,line:0}:m={x:this.left+u,y:Ce(s,this.top+w+u,this.bottom-n[0].height),line:0},Ua(this.ctx,e.textDirection);const x=b+u;this.legendItems.forEach((F,E)=>{i.strokeStyle=F.fontColor,i.fillStyle=F.fontColor;const M=i.measureText(F.text).width,I=d.textAlign(F.textAlign||(F.textAlign=a.textAlign)),N=h+p+M;let C=m.x,D=m.y;d.setWidth(this.width),v?E>0&&C+N+u>this.right&&(D=m.y+=x,m.line++,C=m.x=Ce(s,this.left+u,this.right-o[m.line])):E>0&&D+x>this.bottom&&(C=m.x=C+n[m.line].width+u,m.line++,D=m.y=Ce(s,this.top+w+u,this.bottom-n[m.line].height));const A=d.x(C);if(y(A,D,F),C=kp(I,C+h+p,v?C+N:this.right,e.rtl),S(d.x(C),D,F),v)m.x+=N+u;else if(typeof F.text!="string"){const k=c.lineHeight;m.y+=td(F,k)+u}else m.y+=x}),ja(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=be(n.font),i=we(n.padding);if(!n.display)return;const s=an(e.rtl,this.left,this.width),a=this.ctx,l=n.position,d=o.size/2,c=i.top+d;let u,f=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),u=this.top+c,f=Ce(e.align,f,this.right-p);else{const h=this.columnSizes.reduce((g,b)=>Math.max(g,b.height),0);u=c+Ce(e.align,this.top,this.bottom-h-e.labels.padding-this._computeTitleHeight())}const m=Ce(l,f,f+p);a.textAlign=s.textAlign(Yr(l)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=o.string,Ut(a,n.text,m,u,o)}_computeTitleHeight(){const e=this.options.title,n=be(e.font),o=we(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,s;if(it(e,this.left,this.right)&&it(n,this.top,this.bottom)){for(s=this.legendHitBoxes,o=0;o<s.length;++o)if(i=s[o],it(e,i.left,i.left+i.width)&&it(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!t0(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=Zg(i,o);i&&!s&&ie(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!s&&ie(n.onHover,[e,o,this],this)}else o&&ie(n.onClick,[e,o,this],this)}}function $g(t,e,n,o,i){const s=_g(o,t,e,n),a=e0(i,o,e.lineHeight);return{itemWidth:s,itemHeight:a}}function _g(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,a)=>s.length>a.length?s:a)),e+n.size/2+o.measureText(i).width}function e0(t,e,n){let o=t;return typeof e.text!="string"&&(o=td(e,n)),o}function td(t,e){const n=t.text?t.text.length:0;return e*n}function t0(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var n0={id:"legend",_element:ed,start(t,e,n){const o=t.legend=new ed({ctx:t.ctx,options:n,chart:t});Ae.configure(t,o,n),Ae.addBox(t,o)},stop(t){Ae.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;Ae.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:s,useBorderRadius:a,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{const c=d.controller.getStyle(n?0:void 0),u=we(c.borderWidth);return{text:e[d.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!d.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(l||c.borderRadius),datasetIndex:d.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class xi extends dt{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=se(o.text)?o.text.length:1;this._padding=we(o.padding);const s=i*be(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:s,options:a}=this,l=a.align;let d=0,c,u,f;return this.isHorizontal()?(u=Ce(l,o,s),f=n+e,c=s-o):(a.position==="left"?(u=o+e,f=Ce(l,i,n),d=ae*-.5):(u=s-e,f=Ce(l,n,i),d=ae*.5),c=i-n),{titleX:u,titleY:f,maxWidth:c,rotation:d}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=be(n.font),s=o.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:d,rotation:c}=this._drawArgs(s);Ut(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:c,textAlign:Yr(n.align),textBaseline:"middle",translation:[a,l]})}}function o0(t,e){const n=new xi({ctx:t.ctx,options:e,chart:t});Ae.configure(t,n,e),Ae.addBox(t,n),t.titleBlock=n}var r0={id:"title",_element:xi,start(t,e,n){o0(t,n)},stop(t){const e=t.titleBlock;Ae.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;Ae.configure(t,o,n),o.options=n},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 Wo=new WeakMap;var i0={id:"subtitle",start(t,e,n){const o=new xi({ctx:t.ctx,options:n,chart:t});Ae.configure(t,o,n),Ae.addBox(t,o),Wo.set(t,o)},stop(t){Ae.removeBox(t,Wo.get(t)),Wo.delete(t)},beforeUpdate(t,e,n){const o=Wo.get(t);Ae.configure(t,o,n),o.options=n},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 Wn={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const l=t[e].element;if(l&&l.hasValue()){const d=l.tooltipPosition();o.add(d.x),i+=d.y,++s}}return{x:[...o].reduce((l,d)=>l+d)/o.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,s,a,l;for(s=0,a=t.length;s<a;++s){const d=t[s].element;if(d&&d.hasValue()){const c=d.getCenterPoint(),u=Qr(e,c);u<i&&(i=u,l=d)}}if(l){const d=l.tooltipPosition();n=d.x,o=d.y}return{x:n,y:o}}};function Ze(t,e){return e&&(se(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ct(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
25
25
  `)>-1?t.split(`
26
26
  `):t}function s0(t,e){const{element:n,datasetIndex:o,index:i}=e,s=t.getDatasetMeta(o).controller,{label:a,value:l}=s.getLabelAndValue(i);return{chart:t,label:a,parsed:s.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:l,dataset:s.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function nd(t,e){const n=t.chart.ctx,{body:o,footer:i,title:s}=t,{boxWidth:a,boxHeight:l}=e,d=be(e.bodyFont),c=be(e.titleFont),u=be(e.footerFont),f=s.length,p=i.length,m=o.length,h=we(e.padding);let g=h.height,b=0,y=o.reduce((w,x)=>w+x.before.length+x.lines.length+x.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),y){const w=e.displayColors?Math.max(l,d.lineHeight):d.lineHeight;g+=m*w+(y-m)*d.lineHeight+(y-1)*e.bodySpacing}p&&(g+=e.footerMarginTop+p*u.lineHeight+(p-1)*e.footerSpacing);let S=0;const v=function(w){b=Math.max(b,n.measureText(w).width+S)};return n.save(),n.font=c.string,oe(t.title,v),n.font=d.string,oe(t.beforeBody.concat(t.afterBody),v),S=e.displayColors?a+2+e.boxPadding:0,oe(o,w=>{oe(w.before,v),oe(w.lines,v),oe(w.after,v)}),S=0,n.font=u.string,oe(t.footer,v),n.restore(),b+=h.width,{width:b,height:g}}function a0(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function l0(t,e,n,o){const{x:i,width:s}=o,a=n.caretSize+n.caretPadding;if(t==="left"&&i+s+a>e.width||t==="right"&&i-s-a<0)return!0}function d0(t,e,n,o){const{x:i,width:s}=n,{width:a,chartArea:{left:l,right:d}}=t;let c="center";return o==="center"?c=i<=(l+d)/2?"left":"right":i<=s/2?c="left":i>=a-s/2&&(c="right"),l0(c,t,e,n)&&(c="center"),c}function od(t,e,n){const o=n.yAlign||e.yAlign||a0(t,n);return{xAlign:n.xAlign||e.xAlign||d0(t,e,n,o),yAlign:o}}function c0(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function u0(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function rd(t,e,n,o){const{caretSize:i,caretPadding:s,cornerRadius:a}=t,{xAlign:l,yAlign:d}=n,c=i+s,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:m}=jt(a);let h=c0(e,l);const g=u0(e,d,c);return d==="center"?l==="left"?h+=c:l==="right"&&(h-=c):l==="left"?h-=Math.max(u,p)+i:l==="right"&&(h+=Math.max(f,m)+i),{x:ke(h,0,o.width-e.width),y:ke(g,0,o.height-e.height)}}function Yo(t,e,n){const o=we(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function id(t){return Ze([],ct(t))}function f0(t,e,n){return Dt(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function sd(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const ad={beforeTitle:rt,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:rt,beforeBody:rt,beforeLabel:rt,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ee(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:rt,afterBody:rt,beforeFooter:rt,footer:rt,afterFooter:rt};function Ve(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?ad[e].call(n,o):i}class Si extends dt{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,s=new Ka(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=f0(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=Ve(o,"beforeTitle",this,e),s=Ve(o,"title",this,e),a=Ve(o,"afterTitle",this,e);let l=[];return l=Ze(l,ct(i)),l=Ze(l,ct(s)),l=Ze(l,ct(a)),l}getBeforeBody(e,n){return id(Ve(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return oe(e,s=>{const a={before:[],lines:[],after:[]},l=sd(o,s);Ze(a.before,ct(Ve(l,"beforeLabel",this,s))),Ze(a.lines,Ve(l,"label",this,s)),Ze(a.after,ct(Ve(l,"afterLabel",this,s))),i.push(a)}),i}getAfterBody(e,n){return id(Ve(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=Ve(o,"beforeFooter",this,e),s=Ve(o,"footer",this,e),a=Ve(o,"afterFooter",this,e);let l=[];return l=Ze(l,ct(i)),l=Ze(l,ct(s)),l=Ze(l,ct(a)),l}_createItems(e){const n=this._active,o=this.chart.data,i=[],s=[],a=[];let l=[],d,c;for(d=0,c=n.length;d<c;++d)l.push(s0(this.chart,n[d]));return e.filter&&(l=l.filter((u,f,p)=>e.filter(u,f,p,o))),e.itemSort&&(l=l.sort((u,f)=>e.itemSort(u,f,o))),oe(l,u=>{const f=sd(e.callbacks,u);i.push(Ve(f,"labelColor",this,u)),s.push(Ve(f,"labelPointStyle",this,u)),a.push(Ve(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=a,this.dataPoints=l,l}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let s,a=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const l=Wn[o.position].call(this,i,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const d=this._size=nd(this,o),c=Object.assign({},l,d),u=od(this.chart,o,c),f=rd(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const s=this.getCaretPosition(e,o,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:s}=this,{caretSize:a,cornerRadius:l}=o,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=jt(l),{x:p,y:m}=e,{width:h,height:g}=n;let b,y,S,v,w,x;return s==="center"?(w=m+g/2,i==="left"?(b=p,y=b-a,v=w+a,x=w-a):(b=p+h,y=b+a,v=w-a,x=w+a),S=b):(i==="left"?y=p+Math.max(d,u)+a:i==="right"?y=p+h-Math.max(c,f)-a:y=this.caretX,s==="top"?(v=m,w=v-a,b=y-a,S=y+a):(v=m+g,w=v+a,b=y+a,S=y-a),x=v),{x1:b,x2:y,x3:S,y1:v,y2:w,y3:x}}drawTitle(e,n,o){const i=this.title,s=i.length;let a,l,d;if(s){const c=an(o.rtl,this.x,this.width);for(e.x=Yo(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",a=be(o.titleFont),l=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,d=0;d<s;++d)n.fillText(i[d],c.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+l,d+1===s&&(e.y+=o.titleMarginBottom-l)}}_drawColorBox(e,n,o,i,s){const a=this.labelColors[o],l=this.labelPointStyles[o],{boxHeight:d,boxWidth:c}=s,u=be(s.bodyFont),f=Yo(this,"left",s),p=i.x(f),m=d<u.lineHeight?(u.lineHeight-d)/2:0,h=n.y+m;if(s.usePointStyle){const g={radius:Math.min(c,d)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=i.leftForLtr(p,c)+c/2,y=h+d/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,Kr(e,g,b,y),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,Kr(e,g,b,y)}else{e.lineWidth=$(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const g=i.leftForLtr(p,c),b=i.leftForLtr(i.xPlus(p,1),c-2),y=jt(a.borderRadius);Object.values(y).some(S=>S!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Nn(e,{x:g,y:h,w:c,h:d,radius:y}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),Nn(e,{x:b,y:h+1,w:c-2,h:d-2,radius:y}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(g,h,c,d),e.strokeRect(g,h,c,d),e.fillStyle=a.backgroundColor,e.fillRect(b,h+1,c-2,d-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:s,bodyAlign:a,displayColors:l,boxHeight:d,boxWidth:c,boxPadding:u}=o,f=be(o.bodyFont);let p=f.lineHeight,m=0;const h=an(o.rtl,this.x,this.width),g=function(M){n.fillText(M,h.x(e.x+m),e.y+p/2),e.y+=p+s},b=h.textAlign(a);let y,S,v,w,x,F,E;for(n.textAlign=a,n.textBaseline="middle",n.font=f.string,e.x=Yo(this,b,o),n.fillStyle=o.bodyColor,oe(this.beforeBody,g),m=l&&b!=="right"?a==="center"?c/2+u:c+2+u:0,w=0,F=i.length;w<F;++w){for(y=i[w],S=this.labelTextColors[w],n.fillStyle=S,oe(y.before,g),v=y.lines,l&&v.length&&(this._drawColorBox(n,e,w,h,o),p=Math.max(f.lineHeight,d)),x=0,E=v.length;x<E;++x)g(v[x]),p=f.lineHeight;oe(y.after,g)}m=0,p=f.lineHeight,oe(this.afterBody,g),e.y-=s}drawFooter(e,n,o){const i=this.footer,s=i.length;let a,l;if(s){const d=an(o.rtl,this.x,this.width);for(e.x=Yo(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=d.textAlign(o.footerAlign),n.textBaseline="middle",a=be(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,l=0;l<s;++l)n.fillText(i[l],d.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:s,yAlign:a}=this,{x:l,y:d}=e,{width:c,height:u}=o,{topLeft:f,topRight:p,bottomLeft:m,bottomRight:h}=jt(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(l+f,d),a==="top"&&this.drawCaret(e,n,o,i),n.lineTo(l+c-p,d),n.quadraticCurveTo(l+c,d,l+c,d+p),a==="center"&&s==="right"&&this.drawCaret(e,n,o,i),n.lineTo(l+c,d+u-h),n.quadraticCurveTo(l+c,d+u,l+c-h,d+u),a==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(l+m,d+u),n.quadraticCurveTo(l,d+u,l,d+u-m),a==="center"&&s==="left"&&this.drawCaret(e,n,o,i),n.lineTo(l,d+f),n.quadraticCurveTo(l,d,l+f,d),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,s=o&&o.y;if(i||s){const a=Wn[e.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=nd(this,e),d=Object.assign({},a,this._size),c=od(n,e,d),u=rd(e,d,c,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=we(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(e.save(),e.globalAlpha=o,this.drawBackground(s,e,i,n),Ua(e,n.textDirection),s.y+=a.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),ja(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:l,index:d})=>{const c=this.chart.getDatasetMeta(l);if(!c)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:c.data[d],index:d}}),s=!go(o,i),a=this._positionChanged(i,n);(s||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],a=this._getActiveElements(e,s,n,o),l=this._positionChanged(a,e),d=n||!go(a,s)||l;return d&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,o,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,s.mode,s,o);return s.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:o,caretY:i,options:s}=this,a=Wn[s.position].call(this,e,n);return a!==!1&&(o!==a.x||i!==a.y)}}H(Si,"positioners",Wn);var p0={id:"tooltip",_element:Si,positioners:Wn,afterInit(t,e,n){n&&(t.tooltip=new Si({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:ad},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},m0=Object.freeze({__proto__:null,Colors:Bg,Decimation:Eg,Filler:Kg,Legend:n0,SubTitle:i0,Title:r0,Tooltip:p0});const h0=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function g0(t,e,n,o){const i=t.indexOf(e);if(i===-1)return h0(t,e,n,o);const s=t.lastIndexOf(e);return i!==s?n:i}const b0=(t,e)=>t===null?null:ke(Math.round(t),0,e);function ld(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ci extends qt{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:s}of n)o[i]===s&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ee(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:g0(o,e,q(n,e),this._addedLabels),b0(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=e;a<=n;a++)i.push({value:a});return i}getLabelForValue(e){return ld.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}H(Ci,"id","category"),H(Ci,"defaults",{ticks:{callback:ld}});function y0(t,e){const n=[],{bounds:i,step:s,min:a,max:l,precision:d,count:c,maxTicks:u,maxDigits:f,includeBounds:p}=t,m=s||1,h=u-1,{min:g,max:b}=e,y=!ee(a),S=!ee(l),v=!ee(c),w=(b-g)/(f+1);let x=fa((b-g)/h/m)*m,F,E,M,I;if(x<1e-14&&!y&&!S)return[{value:g},{value:b}];I=Math.ceil(b/x)-Math.floor(g/x),I>h&&(x=fa(I*x/h/m)*m),ee(d)||(F=Math.pow(10,d),x=Math.ceil(x*F)/F),i==="ticks"?(E=Math.floor(g/x)*x,M=Math.ceil(b/x)*x):(E=g,M=b),y&&S&&s&&fp((l-a)/s,x/1e3)?(I=Math.round(Math.min((l-a)/x,u)),x=(l-a)/I,E=a,M=l):v?(E=y?a:E,M=S?l:M,I=c-1,x=(M-E)/I):(I=(M-E)/x,Dn(I,Math.round(I),x/1e3)?I=Math.round(I):I=Math.ceil(I));const N=Math.max(ma(x),ma(E));F=Math.pow(10,ee(d)?N:d),E=Math.round(E*F)/F,M=Math.round(M*F)/F;let C=0;for(y&&(p&&E!==a?(n.push({value:a}),E<a&&C++,Dn(Math.round((E+C*x)*F)/F,a,dd(a,w,t))&&C++):E<a&&C++);C<I;++C){const D=Math.round((E+C*x)*F)/F;if(S&&D>l)break;n.push({value:D})}return S&&p&&M!==l?n.length&&Dn(n[n.length-1].value,l,dd(l,w,t))?n[n.length-1].value=l:n.push({value:l}):(!S||M===l)&&n.push({value:M}),n}function dd(t,e,{horizontal:n,minRotation:o}){const i=Qe(o),s=(n?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}class Xo extends qt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ee(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:s}=this;const a=d=>i=n?i:d,l=d=>s=o?s:d;if(e){const d=Je(i),c=Je(s);d<0&&c<0?l(0):d>0&&c>0&&a(0)}if(i===s){let d=s===0?1:Math.abs(s*.05);l(s+d),e||a(i-d)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,a=y0(i,s);return e.bounds==="ticks"&&pa(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return En(e,this.chart.options.locale,this.options.ticks.format)}}class wi extends Xo{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ue(e)?e:0,this.max=ue(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Qe(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}H(wi,"id","linear"),H(wi,"defaults",{ticks:{callback:xo.formatters.numeric}});const Yn=t=>Math.floor(Bt(t)),Jt=(t,e)=>Math.pow(10,Yn(t)+e);function cd(t){return t/Math.pow(10,Yn(t))===1}function ud(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function k0(t,e){const n=e-t;let o=Yn(n);for(;ud(t,e,o)>10;)o++;for(;ud(t,e,o)<10;)o--;return Math.min(o,Yn(t))}function x0(t,{min:e,max:n}){e=Ne(t.min,e);const o=[],i=Yn(e);let s=k0(e,n),a=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),d=i>s?Math.pow(10,i):0,c=Math.round((e-d)*a)/a,u=Math.floor((e-d)/l/10)*l*10;let f=Math.floor((c-u)/Math.pow(10,s)),p=Ne(t.min,Math.round((d+u+f*Math.pow(10,s))*a)/a);for(;p<n;)o.push({value:p,major:cd(p),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,a=s>=0?1:a),p=Math.round((d+u+f*Math.pow(10,s))*a)/a;const m=Ne(t.max,p);return o.push({value:m,major:cd(m),significand:f}),o}class Ai extends qt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=Xo.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return ue(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ue(e)?Math.max(0,e):null,this.max=ue(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ue(this._userMin)&&(this.min=e===Jt(this.min,0)?Jt(this.min,-1):Jt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const s=l=>o=e?o:l,a=l=>i=n?i:l;o===i&&(o<=0?(s(1),a(10)):(s(Jt(o,-1)),a(Jt(i,1)))),o<=0&&s(Jt(i,-1)),i<=0&&a(Jt(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=x0(n,this);return e.bounds==="ticks"&&pa(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":En(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Bt(e),this._valueRange=Bt(this.max)-Bt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Bt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}H(Ai,"id","logarithmic"),H(Ai,"defaults",{ticks:{callback:xo.formatters.logarithmic,major:{enabled:!0}}});function vi(t){const e=t.ticks;if(e.display&&t.display){const n=we(e.backdropPadding);return q(e.font&&e.font.size,fe.font.size)+n.height}return 0}function S0(t,e,n){return n=se(n)?n:[n],{w:Pp(t,e.string,n),h:n.length*e.lineHeight}}function fd(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function C0(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],s=t._pointLabels.length,a=t.options.pointLabels,l=a.centerPointLabels?ae/s:0;for(let d=0;d<s;d++){const c=a.setContext(t.getPointLabelContext(d));i[d]=c.padding;const u=t.getPointPosition(d,t.drawingArea+i[d],l),f=be(c.font),p=S0(t.ctx,f,t._pointLabels[d]);o[d]=p;const m=Me(t.getIndexAngle(d)+l),h=Math.round(jr(m)),g=fd(h,u.x,p.w,0,180),b=fd(h,u.y,p.h,90,270);w0(n,e,m,g,b)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=B0(t,o,i)}function w0(t,e,n,o,i){const s=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let l=0,d=0;o.start<e.l?(l=(e.l-o.start)/s,t.l=Math.min(t.l,e.l-l)):o.end>e.r&&(l=(o.end-e.r)/s,t.r=Math.max(t.r,e.r+l)),i.start<e.t?(d=(e.t-i.start)/a,t.t=Math.min(t.t,e.t-d)):i.end>e.b&&(d=(i.end-e.b)/a,t.b=Math.max(t.b,e.b+d))}function A0(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:s,padding:a,size:l}=n,d=t.getPointPosition(e,o+i+a,s),c=Math.round(jr(Me(d.angle+me))),u=P0(d.y,l.h,c),f=D0(c),p=V0(d.x,l.w,f);return{visible:!0,x:d.x,y:u,textAlign:f,left:p,top:u,right:p+l.w,bottom:u+l.h}}function v0(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:s}=t;return!(at({x:n,y:o},e)||at({x:n,y:s},e)||at({x:i,y:o},e)||at({x:i,y:s},e))}function B0(t,e,n){const o=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:a,display:l}=s.pointLabels,d={extra:vi(s)/2,additionalAngle:a?ae/i:0};let c;for(let u=0;u<i;u++){d.padding=n[u],d.size=e[u];const f=A0(t,u,d);o.push(f),l==="auto"&&(f.visible=v0(f,c),f.visible&&(c=f))}return o}function D0(t){return t===0||t===180?"center":t<180?"left":"right"}function V0(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function P0(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function E0(t,e,n){const{left:o,top:i,right:s,bottom:a}=n,{backdropColor:l}=e;if(!ee(l)){const d=jt(e.borderRadius),c=we(e.backdropPadding);t.fillStyle=l;const u=o-c.left,f=i-c.top,p=s-o+c.width,m=a-i+c.height;Object.values(d).some(h=>h!==0)?(t.beginPath(),Nn(t,{x:u,y:f,w:p,h:m,radius:d}),t.fill()):t.fillRect(u,f,p,m)}}function F0(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const a=o.setContext(t.getPointLabelContext(i));E0(n,a,s);const l=be(a.font),{x:d,y:c,textAlign:u}=s;Ut(n,t._pointLabels[i],d,c+l.lineHeight/2,l,{color:a.color,textAlign:u,textBaseline:"middle"})}}function pd(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,le);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let a=1;a<o;a++)s=t.getPointPosition(a,e),i.lineTo(s.x,s.y)}}function N0(t,e,n,o,i){const s=t.ctx,a=e.circular,{color:l,lineWidth:d}=e;!a&&!o||!l||!d||n<0||(s.save(),s.strokeStyle=l,s.lineWidth=d,s.setLineDash(i.dash),s.lineDashOffset=i.dashOffset,s.beginPath(),pd(t,n,a,o),s.closePath(),s.stroke(),s.restore())}function M0(t,e,n){return Dt(t,{label:n,index:e,type:"pointLabel"})}class Xn extends Xo{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=we(vi(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=ue(e)&&!isNaN(e)?e:0,this.max=ue(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/vi(this.options))}generateTickLabels(e){Xo.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=ie(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?C0(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=le/(this._pointLabels.length||1),o=this.options.startAngle||0;return Me(e*n+Qe(o))}getDistanceFromCenterForValue(e){if(ee(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(ee(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return M0(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-me+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:s}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),pd(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:s}=n,a=this._pointLabels.length;let l,d,c;if(n.pointLabels.display&&F0(this,a),i.display&&this.ticks.forEach((u,f)=>{if(f!==0||f===0&&this.min<0){d=this.getDistanceFromCenterForValue(u.value);const p=this.getContext(f),m=i.setContext(p),h=s.setContext(p);N0(this,m,d,a,h)}}),o.display){for(e.save(),l=a-1;l>=0;l--){const u=o.setContext(this.getPointLabelContext(l)),{color:f,lineWidth:p}=u;!p||!f||(e.lineWidth=p,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(l,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let s,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const c=o.setContext(this.getContext(d)),u=be(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[d].value),c.showLabelBackdrop){e.font=u.string,a=e.measureText(l.label).width,e.fillStyle=c.backdropColor;const f=we(c.backdropPadding);e.fillRect(-a/2-f.left,-s-u.size/2-f.top,a+f.width,u.size+f.height)}Ut(e,l.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}H(Xn,"id","radialLinear"),H(Xn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:xo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),H(Xn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),H(Xn,"descriptors",{angleLines:{_fallback:"grid"}});const Go={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}},Pe=Object.keys(Go);function md(t,e){return t-e}function hd(t,e){if(ee(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:s}=t._parseOpts;let a=e;return typeof o=="function"&&(a=o(a)),ue(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(on(s)||s===!0)?n.startOf(a,"isoWeek",s):n.startOf(a,i)),+a)}function gd(t,e,n,o){const i=Pe.length;for(let s=Pe.indexOf(t);s<i-1;++s){const a=Go[Pe[s]],l=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(l*a.size))<=o)return Pe[s]}return Pe[i-1]}function O0(t,e,n,o,i){for(let s=Pe.length-1;s>=Pe.indexOf(n);s--){const a=Pe[s];if(Go[a].common&&t._adapter.diff(i,o,a)>=e-1)return a}return Pe[n?Pe.indexOf(n):0]}function I0(t){for(let e=Pe.indexOf(t)+1,n=Pe.length;e<n;++e)if(Go[Pe[e]].common)return Pe[e]}function bd(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Wr(n,e),s=n[o]>=e?n[o]:n[i];t[s]=!0}}function R0(t,e,n,o){const i=t._adapter,s=+i.startOf(e[0].value,o),a=e[e.length-1].value;let l,d;for(l=s;l<=a;l=+i.add(l,1,o))d=n[l],d>=0&&(e[d].major=!0);return e}function yd(t,e,n){const o=[],i={},s=e.length;let a,l;for(a=0;a<s;++a)l=e[a],i[l]=a,o.push({value:l,major:!1});return s===0||!n?o:R0(t,o,i,n)}class Gn extends qt{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new Ym._date(e.adapters.date);i.init(n),vn(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:hd(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:s,minDefined:a,maxDefined:l}=this.getUserBounds();function d(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!l&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!a||!l)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),i=ue(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),s=ue(s)&&!isNaN(s)?s:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,a=this.max,l=gp(i,s,a);return this._unit=n.unit||(o.autoSkip?gd(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):O0(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:I0(this._unit),this.initOffsets(i),e.reverse&&l.reverse(),yd(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?o=s:o=(s-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=ke(n,0,a),o=ke(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,s=i.time,a=s.unit||gd(s.minUnit,n,o,this._getLabelCapacity(n)),l=q(i.ticks.stepSize,1),d=a==="week"?s.isoWeekday:!1,c=on(d)||d===!0,u={};let f=n,p,m;if(c&&(f=+e.startOf(f,"isoWeek",d)),f=+e.startOf(f,c?"day":a),e.diff(o,n,a)>1e5*l)throw new Error(n+" and "+o+" are too far apart with stepSize of "+l+" "+a);const h=i.ticks.source==="data"&&this.getDataTimestamps();for(p=f,m=0;p<o;p=+e.add(p,l,a),m++)bd(u,p,h);return(p===o||i.bounds==="ticks"||m===1)&&bd(u,p,h),Object.keys(u).sort(md).map(g=>+g)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,s=this._unit,a=n||i[s];return this._adapter.format(e,a)}_tickFormatFunction(e,n,o,i){const s=this.options,a=s.ticks.callback;if(a)return ie(a,[e,n,o],this);const l=s.time.displayFormats,d=this._unit,c=this._majorUnit,u=d&&l[d],f=c&&l[c],p=o[n],m=c&&f&&p&&p.major;return this._adapter.format(e,i||(m?f:u))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Qe(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),a=Math.sin(i),l=this._resolveTickFontOptions(0).size;return{w:o*s+l*a,h:o*a+l*s}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,s=this._tickFormatFunction(e,0,yd(this,[e],this._majorUnit),i),a=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push(hd(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return ya(e.sort(md))}}H(Gn,"id","time"),H(Gn,"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 qo(t,e,n){let o=0,i=t.length-1,s,a,l,d;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=st(t,"pos",e)),{pos:s,time:l}=t[o],{pos:a,time:d}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=st(t,"time",e)),{time:s,pos:l}=t[o],{time:a,pos:d}=t[i]);const c=a-s;return c?l+(d-l)*(e-s)/c:l}class Bi extends Gn{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=qo(n,this.min),this._tableRange=qo(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],s=[];let a,l,d,c,u;for(a=0,l=e.length;a<l;++a)c=e[a],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,l=i.length;a<l;++a)u=i[a+1],d=i[a-1],c=i[a],Math.round((u+d)/2)!==c&&s.push({time:c,pos:a/(l-1)});return s}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,s)=>i-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(qo(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return qo(this._table,o*this._tableRange+this._minPos,!0)}}H(Bi,"id","timeseries"),H(Bi,"defaults",Gn.defaults);var T0=Object.freeze({__proto__:null,CategoryScale:Ci,LinearScale:wi,LogarithmicScale:Ai,RadialLinearScale:Xn,TimeScale:Gn,TimeSeriesScale:Bi});const z0=[Wm,xg,m0,T0];Ye.register(...z0);const L0={class:"flex flex-col h-full m-24 overflow-hidden p-24"},H0={class:"flex flex-col gap-8"},U0={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},j0={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Q0={class:"grow"},kd=r.defineComponent({__name:"FmLine",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean},maintainAspectRatio:{type:Boolean},hideXAxis:{type:Boolean,default:void 0},hideYAxis:{type:Boolean,default:void 0},legend:{default:void 0}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.hideXAxis,()=>e.hideYAxis,()=>e.legend],()=>{o&&o.config.options&&(o.destroy(),l())});const i=r.computed(()=>e.transpose?"y":"x");function s({context:d,color:c}){const{ctx:u,chartArea:f}=d.chart;if(!f)return;const p=u==null?void 0:u.createLinearGradient(0,0,0,f.height);return p.addColorStop(0,Pr(c,.5)),p.addColorStop(1,Pr(c,0)),p}const a=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(d=>{const c=$t(d.color)??"";return{...d,backgroundColor:c?u=>s({context:u,color:c}):"",borderColor:c,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));r.watch(a,()=>{o&&(o.data=a.value,o.update())},{deep:!0});function l(){n.value&&(o=new Ye(n.value,{type:"line",data:a.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0,pointStyle:"line"}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!0},position:"right",beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{l()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",L0,[r.createElementVNode("div",H0,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",U0,r.toDisplayString(d.name),1),r.createElementVNode("div",j0,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",Q0,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),W0={class:"flex flex-col h-full overflow-hidden px-24 py-16"},Y0={class:"flex flex-col gap-8"},X0={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},G0={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},q0={class:"grow"},J0=r.defineComponent({__name:"FmPie",props:{name:{default:void 0},variant:{},paragraph:{default:void 0},datasets:{},metrics:{},legend:{default:void 0},text:{default:void 0},textColor:{default:"#0E1715"},textStyle:{default:"bold 30px sans-serif"},maintainAspectRatio:{type:Boolean,default:!0},percentage:{default:void 0}},setup(t){const e=t,n=r.ref(null);let o=null;const i=r.computed(()=>e.percentage?e.percentage:e.variant==="doughnut"?"90%":"0"),s=r.computed(()=>e.text);r.watch([()=>e.metrics,()=>e.datasets,()=>e.variant,()=>e.legend,()=>e.textColor,()=>e.textStyle,()=>e.text,()=>e.maintainAspectRatio,()=>e.percentage],()=>{o&&(o.destroy(),l())});const a=r.computed(()=>({labels:e.metrics,datasets:e.datasets.map(d=>{let c;return typeof d.backgroundColor=="string"?c=d.backgroundColor:typeof d.backgroundColor=="object"&&(c=d.backgroundColor.map(u=>$t(u)??"")),typeof d.backgroundColor=="string"?c=d.backgroundColor:typeof d.backgroundColor=="object"&&(c=d.backgroundColor.map(u=>$t(u)??"")),{...d,backgroundColor:c,hoverOffset:d.hoverOffset??0}})}));function l(){n.value&&(o=new Ye(n.value,{type:"doughnut",data:a.value,options:{maintainAspectRatio:e.maintainAspectRatio,responsive:!0,cutout:i.value,plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}}}},plugins:[{id:"doughnutlabel",beforeDatasetsDraw:d=>{if(e.variant==="doughnut"){const{ctx:c}=d;c.save();const u=d.getDatasetMeta(0).data[0].x,f=d.getDatasetMeta(0).data[0].y;if(c.font=e.textStyle,c.textAlign="center",c.textBaseline="middle",s.value&&s.value!==""){const p=s.value.split(`
27
- `);for(let m=0;m<p.length;m++){const h=m===0?1:.7;c.fillStyle=Pr($t(e.textColor)??"",h),c.fillText(p[m],u,f+m*40)}}}}}]}))}return r.onMounted(()=>{l()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",W0,[r.createElementVNode("div",Y0,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",X0,r.toDisplayString(d.name),1),r.createElementVNode("div",G0,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",q0,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),K0={class:"flex flex-col h-full overflow-hidden px-24 py-16"},Z0={class:"flex flex-col gap-8"},$0={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},_0={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},e1={class:"grow"},t1=r.defineComponent({__name:"FmBar",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1},maintainAspectRatio:{type:Boolean,default:!0},hideXAxis:{type:Boolean,default:void 0},hideYAxis:{type:Boolean,default:void 0},legend:{default:void 0}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.legend,()=>e.hideXAxis,()=>e.hideYAxis],()=>{o&&(o.destroy(),a())});const i=r.computed(()=>e.transpose?"y":"x"),s=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(l=>{var u;let d,c;return typeof l.backgroundColor=="string"?d=l.backgroundColor:typeof l.backgroundColor=="object"&&(d=l.backgroundColor.map(f=>$t(f)??"")),typeof l.borderColor=="string"?c=l.borderColor:typeof l.borderColor=="object"&&(c=(u=l.borderColor)==null?void 0:u.map(f=>$t(f)??"")),{...l,backgroundColor:d,borderColor:c,borderRadius:10,borderWidth:c?1:0}})}));r.watch(s,()=>{o&&(o.data=s.value,o.update())},{deep:!0});function a(){n.value&&(o=new Ye(n.value,{type:"bar",data:s.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{a()}),(l,d)=>(r.openBlock(),r.createElementBlock("div",K0,[r.createElementVNode("div",Z0,[r.renderSlot(l.$slots,"title"),r.createElementVNode("div",$0,r.toDisplayString(l.name),1),r.createElementVNode("div",_0,r.toDisplayString(l.paragraph),1)]),r.createElementVNode("div",e1,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}});var n1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Di(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xd={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(n1,function(){var n=1e3,o=6e4,i=36e5,s="millisecond",a="second",l="minute",d="hour",c="day",u="week",f="month",p="quarter",m="year",h="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var B=["th","st","nd","rd"],V=k%100;return"["+k+(B[(V-20)%10]||B[V]||B[0])+"]"}},v=function(k,B,V){var R=String(k);return!R||R.length>=B?k:""+Array(B+1-R.length).join(V)+k},w={s:v,z:function(k){var B=-k.utcOffset(),V=Math.abs(B),R=Math.floor(V/60),O=V%60;return(B<=0?"+":"-")+v(R,2,"0")+":"+v(O,2,"0")},m:function k(B,V){if(B.date()<V.date())return-k(V,B);var R=12*(V.year()-B.year())+(V.month()-B.month()),O=B.clone().add(R,f),T=V-O<0,U=B.clone().add(R+(T?-1:1),f);return+(-(R+(V-O)/(T?O-U:U-O))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:f,y:m,w:u,d:c,D:h,h:d,m:l,s:a,ms:s,Q:p}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},x="en",F={};F[x]=S;var E="$isDayjsObject",M=function(k){return k instanceof D||!(!k||!k[E])},I=function k(B,V,R){var O;if(!B)return x;if(typeof B=="string"){var T=B.toLowerCase();F[T]&&(O=T),V&&(F[T]=V,O=T);var U=B.split("-");if(!O&&U.length>1)return k(U[0])}else{var W=B.name;F[W]=B,O=W}return!R&&O&&(x=O),O||!R&&x},N=function(k,B){if(M(k))return k.clone();var V=typeof B=="object"?B:{};return V.date=k,V.args=arguments,new D(V)},C=w;C.l=I,C.i=M,C.w=function(k,B){return N(k,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var D=function(){function k(V){this.$L=I(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[E]=!0}var B=k.prototype;return B.parse=function(V){this.$d=function(R){var O=R.date,T=R.utc;if(O===null)return new Date(NaN);if(C.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var U=O.match(b);if(U){var W=U[2]-1||0,j=(U[7]||"0").substring(0,3);return T?new Date(Date.UTC(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,j)):new Date(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,j)}}return new Date(O)}(V),this.init()},B.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},B.$utils=function(){return C},B.isValid=function(){return this.$d.toString()!==g},B.isSame=function(V,R){var O=N(V);return this.startOf(R)<=O&&O<=this.endOf(R)},B.isAfter=function(V,R){return N(V)<this.startOf(R)},B.isBefore=function(V,R){return this.endOf(R)<N(V)},B.$g=function(V,R,O){return C.u(V)?this[R]:this.set(O,V)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(V,R){var O=this,T=!!C.u(R)||R,U=C.p(V),W=function(ze,ge){var Fe=C.w(O.$u?Date.UTC(O.$y,ge,ze):new Date(O.$y,ge,ze),O);return T?Fe:Fe.endOf(c)},j=function(ze,ge){return C.w(O.toDate()[ze].apply(O.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(ge)),O)},K=this.$W,_=this.$M,te=this.$D,he="set"+(this.$u?"UTC":"");switch(U){case m:return T?W(1,0):W(31,11);case f:return T?W(1,_):W(0,_+1);case u:var Te=this.$locale().weekStart||0,qe=(K<Te?K+7:K)-Te;return W(T?te-qe:te+(6-qe),_);case c:case h:return j(he+"Hours",0);case d:return j(he+"Minutes",1);case l:return j(he+"Seconds",2);case a:return j(he+"Milliseconds",3);default:return this.clone()}},B.endOf=function(V){return this.startOf(V,!1)},B.$set=function(V,R){var O,T=C.p(V),U="set"+(this.$u?"UTC":""),W=(O={},O[c]=U+"Date",O[h]=U+"Date",O[f]=U+"Month",O[m]=U+"FullYear",O[d]=U+"Hours",O[l]=U+"Minutes",O[a]=U+"Seconds",O[s]=U+"Milliseconds",O)[T],j=T===c?this.$D+(R-this.$W):R;if(T===f||T===m){var K=this.clone().set(h,1);K.$d[W](j),K.init(),this.$d=K.set(h,Math.min(this.$D,K.daysInMonth())).$d}else W&&this.$d[W](j);return this.init(),this},B.set=function(V,R){return this.clone().$set(V,R)},B.get=function(V){return this[C.p(V)]()},B.add=function(V,R){var O,T=this;V=Number(V);var U=C.p(R),W=function(_){var te=N(T);return C.w(te.date(te.date()+Math.round(_*V)),T)};if(U===f)return this.set(f,this.$M+V);if(U===m)return this.set(m,this.$y+V);if(U===c)return W(1);if(U===u)return W(7);var j=(O={},O[l]=o,O[d]=i,O[a]=n,O)[U]||1,K=this.$d.getTime()+V*j;return C.w(K,this)},B.subtract=function(V,R){return this.add(-1*V,R)},B.format=function(V){var R=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var T=V||"YYYY-MM-DDTHH:mm:ssZ",U=C.z(this),W=this.$H,j=this.$m,K=this.$M,_=O.weekdays,te=O.months,he=O.meridiem,Te=function(ge,Fe,Le,nt){return ge&&(ge[Fe]||ge(R,T))||Le[Fe].slice(0,nt)},qe=function(ge){return C.s(W%12||12,ge,"0")},ze=he||function(ge,Fe,Le){var nt=ge<12?"AM":"PM";return Le?nt.toLowerCase():nt};return T.replace(y,function(ge,Fe){return Fe||function(Le){switch(Le){case"YY":return String(R.$y).slice(-2);case"YYYY":return C.s(R.$y,4,"0");case"M":return K+1;case"MM":return C.s(K+1,2,"0");case"MMM":return Te(O.monthsShort,K,te,3);case"MMMM":return Te(te,K);case"D":return R.$D;case"DD":return C.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return Te(O.weekdaysMin,R.$W,_,2);case"ddd":return Te(O.weekdaysShort,R.$W,_,3);case"dddd":return _[R.$W];case"H":return String(W);case"HH":return C.s(W,2,"0");case"h":return qe(1);case"hh":return qe(2);case"a":return ze(W,j,!0);case"A":return ze(W,j,!1);case"m":return String(j);case"mm":return C.s(j,2,"0");case"s":return String(R.$s);case"ss":return C.s(R.$s,2,"0");case"SSS":return C.s(R.$ms,3,"0");case"Z":return U}return null}(ge)||U.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(V,R,O){var T,U=this,W=C.p(R),j=N(V),K=(j.utcOffset()-this.utcOffset())*o,_=this-j,te=function(){return C.m(U,j)};switch(W){case m:T=te()/12;break;case f:T=te();break;case p:T=te()/3;break;case u:T=(_-K)/6048e5;break;case c:T=(_-K)/864e5;break;case d:T=_/i;break;case l:T=_/o;break;case a:T=_/n;break;default:T=_}return O?T:C.a(T)},B.daysInMonth=function(){return this.endOf(f).$D},B.$locale=function(){return F[this.$L]},B.locale=function(V,R){if(!V)return this.$L;var O=this.clone(),T=I(V,R,!0);return T&&(O.$L=T),O},B.clone=function(){return C.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},k}(),A=D.prototype;return N.prototype=A,[["$ms",s],["$s",a],["$m",l],["$H",d],["$W",c],["$M",f],["$y",m],["$D",h]].forEach(function(k){A[k[1]]=function(B){return this.$g(B,k[0],k[1])}}),N.extend=function(k,B){return k.$i||(k(B,D,N),k.$i=!0),N},N.locale=I,N.isDayjs=M,N.unix=function(k){return N(1e3*k)},N.en=F[x],N.Ls=F,N.p={},N})})(xd);var o1=xd.exports;const P=Di(o1);function ve(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>ve(t[n],e[n]))}const pe=(t,e,n)=>t&&e&&n?t.isAfter(e,"day")&&t.isBefore(n,"day"):!1,r1={class:"fm-checkbox"},i1={class:"fm-checkbox--wrapper"},s1={class:"fm-checkbox__input--container"},a1=["checked","disabled","indeterminate"],l1={key:0,class:"fm-checkbox__label-container"},d1={class:"fm-typo-en-body-lg-400"},c1={key:0,class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Sd=r.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=J(e,"indeterminate"),a=Array.isArray(i.value),l=r.ref(a?i.value.some(u=>ve(u,e.value)):i.value),d=r.computed(()=>{const u=a?i.value.some(f=>ve(f,e.value)):i.value;return s.value&&!u?"remove":i.value?"check_small":""});function c(){if(o.value)return;s.value=!1,l.value=!l.value;let u=i.value;a?u=l.value?u.concat(e.value):u.filter(f=>!ve(f,e.value)):u=l.value,i.value=u}return r.watch(()=>i.value,()=>{l.value=a?i.value.some(u=>ve(u,e.value)):i.value}),(u,f)=>(r.openBlock(),r.createElementBlock("div",r1,[r.createElementVNode("label",i1,[r.createElementVNode("div",s1,[r.createElementVNode("input",{checked:l.value,class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":l.value}),disabled:o.value,indeterminate:r.unref(s),type:"checkbox",onInput:c},null,42,a1),r.unref(s)||l.value?(r.openBlock(),r.createBlock(Q,{key:0,name:d.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]),e.label?(r.openBlock(),r.createElementBlock("div",l1,[r.renderSlot(u.$slots,"label"),r.createElementVNode("div",d1,r.toDisplayString(e.label),1),e.sublabel?(r.openBlock(),r.createElementBlock("div",c1,r.toDisplayString(e.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)])]))}}),u1={class:"w-full"},de=Z(r.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},iconOutlined:{type:Boolean,default:!1},size:{default:"sm"}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>(r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-field":!0,"fm-field--focused":i.focused,"fm-field--invalid":i.invalid,"fm-field--valid":i.showValidBorder&&!i.invalid,"fm-field--disabled":o.value,"fm-field--md":i.size==="md","fm-field--sm":i.size==="sm"})},{default:r.withCtx(()=>[r.renderSlot(i.$slots,"prepend",{},()=>[i.prependIcon?(r.openBlock(),r.createBlock(Q,{key:0,color:o.value?"disabled":"neutral-black",name:i.prependIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0),r.createElementVNode("div",u1,[r.renderSlot(i.$slots,"default",{},void 0,!0)]),r.renderSlot(i.$slots,"append",{},()=>[i.appendIcon?(r.openBlock(),r.createBlock(Q,{key:0,color:o.value?"disabled":"neutral-black",name:i.appendIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-7eff7cbf"]]),f1={class:"flex gap-4"},Cd=r.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:void 0},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=r.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),s=r.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(a,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-typo-en-body-sm-400",{"text-fm-color-typo-disabled":o.value,"text-fm-color-typo-secondary":a.state==="none"&&!o.value,"text-fm-color-typo-success":a.state==="success"&&!o.value,"text-fm-color-typo-warning":a.state==="warning"&&!o.value,"text-fm-color-typo-error":a.state==="error"&&!o.value}])},[a.errorMessages.length===0?r.renderSlot(a.$slots,"default",{key:0},()=>[r.createElementVNode("div",f1,[i.value?(r.openBlock(),r.createBlock(Q,{key:0,class:r.normalizeClass([s.value,"mt-[2px]"]),name:i.value,size:"sm"},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(a.text),1)])]):r.renderSlot(a.$slots,"default",{key:1},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.errorMessages,d=>(r.openBlock(),r.createElementBlock("div",{key:d,class:"flex gap-4 text-fm-color-typo-error"},[r.createVNode(Q,{class:"mt-[2px] text-fm-color-system-error-300",name:"error",size:"sm"}),r.createElementVNode("span",null,r.toDisplayString(d),1)]))),128))])],2))}}),Et=Math.min,Oe=Math.max,Jo=Math.round,Ko=Math.floor,Ft=t=>({x:t,y:t}),p1={left:"right",right:"left",bottom:"top",top:"bottom"},m1={start:"end",end:"start"};function Vi(t,e,n){return Oe(t,Et(e,n))}function dn(t,e){return typeof t=="function"?t(e):t}function Nt(t){return t.split("-")[0]}function cn(t){return t.split("-")[1]}function wd(t){return t==="x"?"y":"x"}function Pi(t){return t==="y"?"height":"width"}function qn(t){return["top","bottom"].includes(Nt(t))?"y":"x"}function Ei(t){return wd(qn(t))}function h1(t,e,n){n===void 0&&(n=!1);const o=cn(t),i=Ei(t),s=Pi(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Zo(a)),[a,Zo(a)]}function g1(t){const e=Zo(t);return[Fi(t),e,Fi(e)]}function Fi(t){return t.replace(/start|end/g,e=>m1[e])}function b1(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:a;default:return[]}}function y1(t,e,n,o){const i=cn(t);let s=b1(Nt(t),n==="start",o);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(Fi)))),s}function Zo(t){return t.replace(/left|right|bottom|top/g,e=>p1[e])}function k1(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ad(t){return typeof t!="number"?k1(t):{top:t,right:t,bottom:t,left:t}}function $o(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function vd(t,e,n){let{reference:o,floating:i}=t;const s=qn(e),a=Ei(e),l=Pi(a),d=Nt(e),c=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let m;switch(d){case"top":m={x:u,y:o.y-i.height};break;case"bottom":m={x:u,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-i.width,y:f};break;default:m={x:o.x,y:o.y}}switch(cn(e)){case"start":m[a]-=p*(n&&c?-1:1);break;case"end":m[a]+=p*(n&&c?-1:1);break}return m}const x1=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=vd(c,o,d),p=o,m={},h=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x:S,y:v,data:w,reset:x}=await y({x:u,y:f,initialPlacement:o,placement:p,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=S??u,f=v??f,m={...m,[b]:{...m[b],...w}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:f}=vd(c,p,d)),g=-1)}return{x:u,y:f,placement:p,strategy:i,middlewareData:m}};async function Ni(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=dn(e,t),h=Ad(m),b=l[p?f==="floating"?"reference":"floating":f],y=$o(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:d})),S=f==="floating"?{...a.floating,x:o,y:i}:a.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),w=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},x=$o(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:S,offsetParent:v,strategy:d}):S);return{top:(y.top-x.top+h.top)/w.y,bottom:(x.bottom-y.bottom+h.bottom)/w.y,left:(y.left-x.left+h.left)/w.x,right:(x.right-y.right+h.right)/w.x}}const S1=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:d}=e,{element:c,padding:u=0}=dn(t,e)||{};if(c==null)return{};const f=Ad(u),p={x:n,y:o},m=Ei(i),h=Pi(m),g=await a.getDimensions(c),b=m==="y",y=b?"top":"left",S=b?"bottom":"right",v=b?"clientHeight":"clientWidth",w=s.reference[h]+s.reference[m]-p[m]-s.floating[h],x=p[m]-s.reference[m],F=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let E=F?F[v]:0;(!E||!await(a.isElement==null?void 0:a.isElement(F)))&&(E=l.floating[v]||s.floating[h]);const M=w/2-x/2,I=E/2-g[h]/2-1,N=Et(f[y],I),C=Et(f[S],I),D=N,A=E-g[h]-C,k=E/2-g[h]/2+M,B=Vi(D,k,A),V=!d.arrow&&cn(i)!=null&&k!==B&&s.reference[h]/2-(k<D?N:C)-g[h]/2<0,R=V?k<D?k-D:k-A:0;return{[m]:p[m]+R,data:{[m]:B,centerOffset:k-B-R,...V&&{alignmentOffset:R}},reset:V}}}),C1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:d,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...b}=dn(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Nt(i),S=Nt(l)===l,v=await(d.isRTL==null?void 0:d.isRTL(c.floating)),w=p||(S||!g?[Zo(l)]:g1(l));!p&&h!=="none"&&w.push(...y1(l,g,h,v));const x=[l,...w],F=await Ni(e,b),E=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&E.push(F[y]),f){const D=h1(i,a,v);E.push(F[D[0]],F[D[1]])}if(M=[...M,{placement:i,overflows:E}],!E.every(D=>D<=0)){var I,N;const D=(((I=s.flip)==null?void 0:I.index)||0)+1,A=x[D];if(A)return{data:{index:D,overflows:M},reset:{placement:A}};let k=(N=M.filter(B=>B.overflows[0]<=0).sort((B,V)=>B.overflows[1]-V.overflows[1])[0])==null?void 0:N.placement;if(!k)switch(m){case"bestFit":{var C;const B=(C=M.map(V=>[V.placement,V.overflows.filter(R=>R>0).reduce((R,O)=>R+O,0)]).sort((V,R)=>V[1]-R[1])[0])==null?void 0:C[0];B&&(k=B);break}case"initialPlacement":k=l;break}if(i!==k)return{reset:{placement:k}}}return{}}}};async function w1(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Nt(n),l=cn(n),d=qn(n)==="y",c=["left","top"].includes(a)?-1:1,u=s&&d?-1:1,f=dn(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),d?{x:m*u,y:p*c}:{x:p*c,y:m*u}}const Jn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:a,middlewareData:l}=e,d=await w1(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:a}}}}},A1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:S}=b;return{x:y,y:S}}},...d}=dn(t,e),c={x:n,y:o},u=await Ni(e,d),f=qn(Nt(i)),p=wd(f);let m=c[p],h=c[f];if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",S=m+u[b],v=m-u[y];m=Vi(S,m,v)}if(a){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",S=h+u[b],v=h-u[y];h=Vi(S,h,v)}const g=l.fn({...e,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-o}}}}},v1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:s}=e,{apply:a=()=>{},...l}=dn(t,e),d=await Ni(e,l),c=Nt(n),u=cn(n),f=qn(n)==="y",{width:p,height:m}=o.floating;let h,g;c==="top"||c==="bottom"?(h=c,g=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=c,h=u==="end"?"top":"bottom");const b=m-d[h],y=p-d[g],S=!e.middlewareData.shift;let v=b,w=y;if(f){const F=p-d.left-d.right;w=u||S?Et(y,F):F}else{const F=m-d.top-d.bottom;v=u||S?Et(b,F):F}if(S&&!u){const F=Oe(d.left,0),E=Oe(d.right,0),M=Oe(d.top,0),I=Oe(d.bottom,0);f?w=p-2*(F!==0||E!==0?F+E:Oe(d.left,d.right)):v=m-2*(M!==0||I!==0?M+I:Oe(d.top,d.bottom))}await a({...e,availableWidth:w,availableHeight:v});const x=await i.getDimensions(s.floating);return p!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function ut(t){return Mi(t)?(t.nodeName||"").toLowerCase():"#document"}function Ie(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ft(t){var e;return(e=(Mi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Mi(t){return t instanceof Node||t instanceof Ie(t).Node}function pt(t){return t instanceof Element||t instanceof Ie(t).Element}function $e(t){return t instanceof HTMLElement||t instanceof Ie(t).HTMLElement}function Bd(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ie(t).ShadowRoot}function Kn(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Ue(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function B1(t){return["table","td","th"].includes(ut(t))}function Oi(t){const e=Ii(),n=Ue(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function D1(t){let e=un(t);for(;$e(e)&&!_o(e);){if(Oi(e))return e;e=un(e)}return null}function Ii(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _o(t){return["html","body","#document"].includes(ut(t))}function Ue(t){return Ie(t).getComputedStyle(t)}function er(t){return pt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function un(t){if(ut(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Bd(t)&&t.host||ft(t);return Bd(e)?e.host:e}function Dd(t){const e=un(t);return _o(e)?t.ownerDocument?t.ownerDocument.body:t.body:$e(e)&&Kn(e)?e:Dd(e)}function Zn(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Dd(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),a=Ie(i);return s?e.concat(a,a.visualViewport||[],Kn(i)?i:[],a.frameElement&&n?Zn(a.frameElement):[]):e.concat(i,Zn(i,[],n))}function Vd(t){const e=Ue(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=$e(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:o,l=Jo(n)!==s||Jo(o)!==a;return l&&(n=s,o=a),{width:n,height:o,$:l}}function Ri(t){return pt(t)?t:t.contextElement}function fn(t){const e=Ri(t);if(!$e(e))return Ft(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Vd(e);let a=(s?Jo(n.width):n.width)/o,l=(s?Jo(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const V1=Ft(0);function Pd(t){const e=Ie(t);return!Ii()||!e.visualViewport?V1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function P1(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ie(t)?!1:e}function Kt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Ri(t);let a=Ft(1);e&&(o?pt(o)&&(a=fn(o)):a=fn(t));const l=P1(s,n,o)?Pd(s):Ft(0);let d=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,u=i.width/a.x,f=i.height/a.y;if(s){const p=Ie(s),m=o&&pt(o)?Ie(o):o;let h=p,g=h.frameElement;for(;g&&o&&m!==h;){const b=fn(g),y=g.getBoundingClientRect(),S=Ue(g),v=y.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,w=y.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;d*=b.x,c*=b.y,u*=b.x,f*=b.y,d+=v,c+=w,h=Ie(g),g=h.frameElement}}return $o({width:u,height:f,x:d,y:c})}const E1=[":popover-open",":modal"];function Ed(t){return E1.some(e=>{try{return t.matches(e)}catch{return!1}})}function F1(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",a=ft(o),l=e?Ed(e.floating):!1;if(o===a||l&&s)return n;let d={scrollLeft:0,scrollTop:0},c=Ft(1);const u=Ft(0),f=$e(o);if((f||!f&&!s)&&((ut(o)!=="body"||Kn(a))&&(d=er(o)),$e(o))){const p=Kt(o);c=fn(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x,y:n.y*c.y-d.scrollTop*c.y+u.y}}function N1(t){return Array.from(t.getClientRects())}function Fd(t){return Kt(ft(t)).left+er(t).scrollLeft}function M1(t){const e=ft(t),n=er(t),o=t.ownerDocument.body,i=Oe(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=Oe(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Fd(t);const l=-n.scrollTop;return Ue(o).direction==="rtl"&&(a+=Oe(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}function O1(t,e){const n=Ie(t),o=ft(t),i=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,d=0;if(i){s=i.width,a=i.height;const c=Ii();(!c||c&&e==="fixed")&&(l=i.offsetLeft,d=i.offsetTop)}return{width:s,height:a,x:l,y:d}}function I1(t,e){const n=Kt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=$e(t)?fn(t):Ft(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,d=i*s.x,c=o*s.y;return{width:a,height:l,x:d,y:c}}function Nd(t,e,n){let o;if(e==="viewport")o=O1(t,n);else if(e==="document")o=M1(ft(t));else if(pt(e))o=I1(e,n);else{const i=Pd(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return $o(o)}function Md(t,e){const n=un(t);return n===e||!pt(n)||_o(n)?!1:Ue(n).position==="fixed"||Md(n,e)}function R1(t,e){const n=e.get(t);if(n)return n;let o=Zn(t,[],!1).filter(l=>pt(l)&&ut(l)!=="body"),i=null;const s=Ue(t).position==="fixed";let a=s?un(t):t;for(;pt(a)&&!_o(a);){const l=Ue(a),d=Oi(a);!d&&l.position==="fixed"&&(i=null),(s?!d&&!i:!d&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Kn(a)&&!d&&Md(t,a))?o=o.filter(u=>u!==a):i=l,a=un(a)}return e.set(t,o),o}function T1(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?R1(e,this._c):[].concat(n),o],l=a[0],d=a.reduce((c,u)=>{const f=Nd(e,u,i);return c.top=Oe(f.top,c.top),c.right=Et(f.right,c.right),c.bottom=Et(f.bottom,c.bottom),c.left=Oe(f.left,c.left),c},Nd(e,l,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function z1(t){const{width:e,height:n}=Vd(t);return{width:e,height:n}}function L1(t,e,n){const o=$e(e),i=ft(e),s=n==="fixed",a=Kt(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const d=Ft(0);if(o||!o&&!s)if((ut(e)!=="body"||Kn(i))&&(l=er(e)),o){const f=Kt(e,!0,s,e);d.x=f.x+e.clientLeft,d.y=f.y+e.clientTop}else i&&(d.x=Fd(i));const c=a.left+l.scrollLeft-d.x,u=a.top+l.scrollTop-d.y;return{x:c,y:u,width:a.width,height:a.height}}function Od(t,e){return!$e(t)||Ue(t).position==="fixed"?null:e?e(t):t.offsetParent}function Id(t,e){const n=Ie(t);if(!$e(t)||Ed(t))return n;let o=Od(t,e);for(;o&&B1(o)&&Ue(o).position==="static";)o=Od(o,e);return o&&(ut(o)==="html"||ut(o)==="body"&&Ue(o).position==="static"&&!Oi(o))?n:o||D1(t)||n}const H1=async function(t){const e=this.getOffsetParent||Id,n=this.getDimensions;return{reference:L1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function U1(t){return Ue(t).direction==="rtl"}const j1={convertOffsetParentRelativeRectToViewportRelativeRect:F1,getDocumentElement:ft,getClippingRect:T1,getOffsetParent:Id,getElementRects:H1,getClientRects:N1,getDimensions:z1,getScale:fn,isElement:pt,isRTL:U1};function Q1(t,e){let n=null,o;const i=ft(t);function s(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function a(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),s();const{left:c,top:u,width:f,height:p}=t.getBoundingClientRect();if(l||e(),!f||!p)return;const m=Ko(u),h=Ko(i.clientWidth-(c+f)),g=Ko(i.clientHeight-(u+p)),b=Ko(c),S={rootMargin:-m+"px "+-h+"px "+-g+"px "+-b+"px",threshold:Oe(0,Et(1,d))||1};let v=!0;function w(x){const F=x[0].intersectionRatio;if(F!==d){if(!v)return a();F?a(!1,F):o=setTimeout(()=>{a(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(w,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,S)}n.observe(t)}return a(!0),s}function $n(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=Ri(t),u=i||s?[...c?Zn(c):[],...Zn(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&l?Q1(c,n):null;let p=-1,m=null;a&&(m=new ResizeObserver(y=>{let[S]=y;S&&S.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(e)})),n()}),c&&!d&&m.observe(c),m.observe(e));let h,g=d?Kt(t):null;d&&b();function b(){const y=Kt(t);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(b)}return n(),()=>{var y;u.forEach(S=>{i&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),f==null||f(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(h)}}const Rd=A1,_n=C1,W1=v1,Y1=S1,X1=(t,e,n)=>{const o=new Map,i={platform:j1,...n},s={...i.platform,_c:o};return x1(t,e,{...i,platform:s})};function G1(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ti(t){if(G1(t)){const e=t.$el;return Mi(e)&&ut(e)==="#comment"?null:e}return t}function Td(t){return{name:"arrow",options:t,fn(e){const n=Ti(r.unref(t.element));return n==null?{}:Y1({element:n,padding:t.padding}).fn(e)}}}function zd(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ld(t,e){const n=zd(t);return Math.round(e*n)/n}function eo(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var E;return(E=r.unref(n.open))!=null?E:!0}),s=r.computed(()=>r.unref(n.middleware)),a=r.computed(()=>{var E;return(E=r.unref(n.placement))!=null?E:"bottom"}),l=r.computed(()=>{var E;return(E=r.unref(n.strategy))!=null?E:"absolute"}),d=r.computed(()=>{var E;return(E=r.unref(n.transform))!=null?E:!0}),c=r.computed(()=>Ti(t.value)),u=r.computed(()=>Ti(e.value)),f=r.ref(0),p=r.ref(0),m=r.ref(l.value),h=r.ref(a.value),g=r.shallowRef({}),b=r.ref(!1),y=r.computed(()=>{const E={position:m.value,left:"0",top:"0"};if(!u.value)return E;const M=Ld(u.value,f.value),I=Ld(u.value,p.value);return d.value?{...E,transform:"translate("+M+"px, "+I+"px)",...zd(u.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:M+"px",top:I+"px"}});let S;function v(){c.value==null||u.value==null||X1(c.value,u.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(E=>{f.value=E.x,p.value=E.y,m.value=E.strategy,h.value=E.placement,g.value=E.middlewareData,b.value=!0})}function w(){typeof S=="function"&&(S(),S=void 0)}function x(){if(w(),o===void 0){v();return}if(c.value!=null&&u.value!=null){S=o(c.value,u.value,v);return}}function F(){i.value||(b.value=!1)}return r.watch([s,a,l],v,{flush:"sync"}),r.watch([c,u],x,{flush:"sync"}),r.watch(i,F,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose(w),{x:r.shallowReadonly(f),y:r.shallowReadonly(p),strategy:r.shallowReadonly(m),placement:r.shallowReadonly(h),middlewareData:r.shallowReadonly(g),isPositioned:r.shallowReadonly(b),floatingStyles:y,update:v}}const Hd={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?typeof e.arg=="string"?document.querySelectorAll(`#${e.arg}`):Array.isArray(e.arg)?e.arg.map(i=>document.querySelector(`#${i}`)).flat():[]:[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},zi=r.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},placement:{default:"top"},hideArrow:{type:Boolean,default:!1},content:{default:""},disabled:{type:Boolean,default:!1},zIndex:{default:void 0},contentClass:{}},setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(null),{floatingStyles:s,middlewareData:a,placement:l}=eo(n,o,{whileElementsMounted:$n,placement:e.placement,middleware:[_n(),Jn({mainAxis:6}),Td({element:i})]}),d="ontouchstart"in window||navigator.maxTouchPoints>0,c=r.ref(!1),u=r.ref(0),f=r.ref(0),p=()=>{e.disabled||(clearTimeout(f.value),u.value=window.setTimeout(()=>{c.value=!0},250))},m=()=>{e.disabled||(clearTimeout(u.value),f.value=window.setTimeout(()=>c.value=!1,250))},h=()=>{d?c.value?m():p():m()},g=()=>{d||m()},b=()=>{d||m()},y=()=>{m()},S=()=>{clearTimeout(f.value),c.value=!0},v=r.computed(()=>{var x,F,E,M;const w={top:"bottom",right:"left",bottom:"top",left:"right"}[l.value];return{left:((x=a.value.arrow)==null?void 0:x.x)!=null?`${(F=a.value.arrow)==null?void 0:F.x}px`:"",top:((E=a.value.arrow)==null?void 0:E.y)!=null?`${(M=a.value.arrow)==null?void 0:M.y}px`:"",[w]:"-3px"}});return(w,x)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"referenceEl",ref:n,class:r.normalizeClass([[{"cursor-not-allowed pointer-events-none":w.disabled},w.contentClass],"cursor-pointer flex items-center justify-center relative"]),onPointerdown:h,onPointerleave:b,onPointermove:x[0]||(x[0]=F=>{F.pointerType!=="touch"&&p()}),onPointerup:g},[r.renderSlot(w.$slots,"default")],34),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[c.value&&!w.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:r.normalizeClass([{"bg-fm-color-neutral-black text-fm-color-typo-white fm-typo-en-body-sm-400":w.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-en-body-md-400":w.variant==="rich"},"fm-shadow-light-300 max-w-[240px] px-8 py-4 rounded-md"]),style:r.normalizeStyle([r.unref(s),{zIndex:w.zIndex}]),onMouseenter:S,onMouseleave:m},[r.renderSlot(w.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(w.content),1)]),r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:r.normalizeClass([{"bg-fm-color-neutral-black":w.variant==="plain","bg-fm-color-neutral-white":w.variant==="rich"},"absolute h-8 rotate-45 rounded-[2px] w-8"]),style:r.normalizeStyle(v.value)},null,6),[[r.vShow,!w.hideArrow]])],38)):r.createCommentVNode("",!0)]))])),[[r.unref(Hd),y]])}}),Zt=r.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:void 0},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>i.label||i.$slots.default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-en-body-lg-400 flex gap-4",o.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":i.info}])},[r.renderSlot(i.$slots,"default",{},()=>[r.createElementVNode("span",null,r.toDisplayString(i.label),1),i.required?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["fm-typo-en-body-lg-600",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):r.createCommentVNode("",!0),i.optional?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-en-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])}," (optional) ",2)):r.createCommentVNode("",!0),i.info?(r.openBlock(),r.createBlock(zi,{key:2,content:i.info,disabled:o.value,placement:"top"},{default:r.withCtx(()=>[r.createVNode(Q,{class:r.normalizeClass(["fm-typo-en-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"]),name:"info",size:"sm"},null,8,["class"])]),_:1},8,["content","disabled"])):r.createCommentVNode("",!0)])],2)):r.createCommentVNode("",!0)}}),q1={key:1,class:"flex items-center justify-between"},Se=r.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"}},setup(t){const e=t,n=r.inject(re,null),{errorMessages:o,isPristine:i}=$s(e),{focus:s,blur:a}=xn(),l=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),d=r.computed(()=>({label:e.label,disabled:l.value,required:e.required,optional:e.optional,info:e.info})),c=r.computed(()=>({text:e.helperText,disabled:l.value,state:e.helperState,errorMessages:o.value})),u=r.computed(()=>({isPristine:i,invalid:o.value.length>0}));return(f,p)=>(r.openBlock(),r.createBlock(e.tag,{class:"flex flex-col gap-4",onBlur:r.unref(a),onClick:r.unref(s)},{default:r.withCtx(()=>[f.label||f.$slots.label?(r.openBlock(),r.createBlock(Zt,r.normalizeProps(r.mergeProps({key:0},d.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"label")]),_:3},16)):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"default",r.normalizeProps(r.guardReactiveProps(u.value))),c.value.text||c.value.errorMessages.length>0||f.$slots["helper-text"]||f.$slots["helper-append"]?(r.openBlock(),r.createElementBlock("div",q1,[r.createVNode(Cd,r.normalizeProps(r.guardReactiveProps(c.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"helper-text")]),_:3},16),r.renderSlot(f.$slots,"helper-append")])):r.createCommentVNode("",!0)]),_:3},8,["onBlur","onClick"]))}}),_e=Z(r.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},width:{default:void 0},maxHeight:{default:408},inPopover:{type:Boolean,default:!1},stopClickPropagation:{type:Boolean},zIndex:{default:99},offset:{},shift:{type:Boolean,default:!1},minHeight:{}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref([]);let s;const a=r.ref(),l=r.ref(n.maxHeight),d=r.ref(!1),c=r.ref(!1),u=r.inject(Xs,null),f=r.ref(null),p=r.ref(null),{floatingStyles:m}=eo(f,p,{middleware:[W1({apply({availableHeight:M,availableWidth:I,elements:N}){if(n.shift)return;const C=M-16,D=Math.min(C,n.maxHeight);n.minHeight&&D<=n.minHeight||(l.value=D,Object.assign(N.floating.style,{maxWidth:`${I}px`,maxHeight:`${C}px`}))}}),Jn({mainAxis:n.offset??(u?8:4),crossAxis:u?-12:0}),_n({crossAxis:!1,fallbackStrategy:"initialPlacement"}),Rd()],placement:n.placement,whileElementsMounted:$n,strategy:"fixed"}),h=()=>{F.value==="hover"&&b()},g=M=>{if(n.stopClickPropagation&&(M.stopPropagation(),document.body.click()),!n.disabled){if(d.value){d.value=!1;return}F.value==="click"&&b()}},b=()=>{c.value=!0,d.value=!0,u==null||u.setChildId(s)},y=()=>{F.value==="hover"&&(c.value=!1)},S=()=>{c.value=!0},v=()=>{c.value=!1},w=()=>{n.closeOnClick&&setTimeout(()=>{d.value=!1,u==null||u.closeParent()},10)},x=r.computed(()=>({mouseInMenu:c}));r.provide(Xs,{register({injectProps:M}){return i.value=[...i.value,{injectProps:M}],i.value.length},closeParent(){u?(d.value=!1,u==null||u.closeParent()):d.value=F.value!=="click"},setChildId(M){a.value=M},mouseInChildId:a,trigger:n.trigger}),r.provide(Gs,{handleContentClick:w}),r.onMounted(()=>{window.addEventListener("click",E),u&&(s=u.register({injectProps:x}))}),r.onUnmounted(()=>{window.removeEventListener("click",E)}),r.watch(()=>u==null?void 0:u.mouseInChildId.value,M=>{M!==s&&(d.value=!1)});const F=r.computed(()=>u===null?n.trigger:"hover");r.watch(()=>d.value,()=>o("menu-changed",d.value));const E=M=>{if(!d.value)return;const I=M.path||M.composedPath();for(const N of I)if(N==f.value||N==p.value)return;d.value=!1};return(M,I)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:f,class:"fm-menu",onClick:g,onMouseenter:h,onMouseleave:y},[r.renderSlot(M.$slots,"menu-button",{},void 0,!0)],544),(r.openBlock(),r.createBlock(r.Teleport,{disabled:!!r.unref(u)||M.inPopover,to:"body"},[d.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:p,style:r.normalizeStyle({...r.unref(m),zIndex:n.zIndex}),class:"block",onMouseenter:S,onMouseleave:v},[r.renderSlot(M.$slots,"menu-wrapper",r.normalizeProps(r.guardReactiveProps({maxHeight:l.value,width:`${M.width}px`})),()=>[r.createElementVNode("div",{style:r.normalizeStyle({"max-height":`${l.value}px`,width:M.width}),class:"fm-menu__wrapper"},[r.renderSlot(M.$slots,"default",{},void 0,!0)],4)],!0)],36)):r.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-74c5c3b3"]]),J1={class:"fm-menu-item--left"},K1={key:0,class:"fm-menu-item--right"},xe=Z(r.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.ref(!1),i=r.inject(Gs,null),s=e,a=c=>{c.preventDefault(),i==null||i.handleContentClick(),!(n.disabled||!n.selectable)&&s("update:modelValue",!n.modelValue)},l=()=>{s("update:modelValue",n.modelValue)};function d(c){o.value=c}return(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm":!c.disabled&&!c.modelValue&&c.selectable}),onClick:a,onMousedown:u[1]||(u[1]=()=>d(!0)),onMouseleave:u[2]||(u[2]=()=>d(!1)),onMouseup:u[3]||(u[3]=()=>d(!1))},[r.createElementVNode("div",J1,[r.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E",name:c.icon,outline:!o.value&&!c.modelValue,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),c.hasCheckbox?(r.openBlock(),r.createBlock(Sd,{key:1,disabled:c.disabled,indeterminate:c.indeterminate,"model-value":c.modelValue,label:"",name:"something",sublabel:"",value:"",onClick:u[0]||(u[0]=f=>f.preventDefault()),"onUpdate:modelValue":l},null,8,["disabled","indeterminate","model-value"])):r.createCommentVNode("",!0)],!0),r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-md-400 max-w-[240px]",c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"])},r.toDisplayString(c.label),3),c.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-sm-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(c.sublabel),3)):r.createCommentVNode("",!0)])],!0)]),r.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(r.openBlock(),r.createElementBlock("div",K1,[r.createVNode(Q,{color:c.disabled?"#C7C7CC":"#AEAEB2",name:"chevron_right",size:"md"},null,8,["color"])])):r.createCommentVNode("",!0)],34)]))}}),[["__scopeId","data-v-b196a86b"]]),Z1={class:"fm-typo-en-body-lg-600"},$1={class:"h-[264px] overflow-y-auto w-[160px]"},_1=["onVnodeMounted"],eb=["onVnodeMounted"],pn=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.computed(()=>{const c=P(n.min).startOf("year"),u=P(n.max).startOf("year"),f=u.diff(c,"year"),p=[];for(let m=0;m<=f;m++)p.push(u.subtract(m,"year"));return p}),a=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");return c.get("year")===u.get("year")?c.startOf("month").isAfter(u)||c.get("month")===u.get("month"):c.get("year")===f.get("year")?c.startOf("month").isBefore(f)||c.get("month")===f.get("month"):!0},l=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");if(u.get("year")===c.get("year")){o("update:modelValue",u);return}if(f.get("year")===c.get("year")){o("update:modelValue",f);return}o("update:modelValue",c)};function d(c,u){if(!u)return!1;const f=c.el,p=f==null?void 0:f.parentElement;!f||!p||p.scrollTo({top:f.offsetTop-50})}return(c,u)=>(r.openBlock(),r.createBlock(_e,{trigger:"click","in-popover":"",onMenuChanged:u[0]||(u[0]=f=>i.value=f)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-8 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",Z1,[c.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(c.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(c.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(Q,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",$1,[c.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(f,p)=>c.modelValue.month(p)),f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("MMMM"),onVnodeMounted:p=>d(p,c.modelValue.format("MMMM")===f.format("MMMM"))},[r.createVNode(xe,{disabled:!a(f),"model-value":c.modelValue.format("MMMM")===f.format("MMMM"),label:f.format("MMMM"),"onUpdate:modelValue":p=>o("update:modelValue",f)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,_1))),128)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("YYYY"),onVnodeMounted:p=>d(p,c.modelValue.format("YYYY")===f.format("YYYY"))},[r.createVNode(xe,{"model-value":c.modelValue.format("YYYY")===f.format("YYYY"),label:f.format("YYYY"),"onUpdate:modelValue":p=>l(f)},null,8,["model-value","label","onUpdate:modelValue"])],8,eb))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),mt=Z(r.defineComponent({__name:"FmPopover",props:{showPopover:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},zIndex:{default:99},excludeElFromClickOutside:{default:void 0}},emits:["popover-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(o.showPopover),s=r.ref(null),a=r.ref(null),{floatingStyles:l}=eo(s,a,{middleware:[Jn(4),_n(),Rd({crossAxis:!0})],placement:o.placement,whileElementsMounted:$n,strategy:"fixed"}),d=n,c=()=>{i.value||(i.value=!0,d("popover-changed",i.value))},u=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};e({show:c,hide:u});const f=()=>{o.disabled||(i.value=!i.value,d("popover-changed",i.value))};r.watch(()=>o.showPopover,m=>i.value=m);const p=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};return(m,h)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-popover",onClick:f},[r.renderSlot(m.$slots,"popover-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"popoverEl",ref:a,style:r.normalizeStyle({...r.unref(l),zIndex:o.zIndex}),class:"fm-popover__content"},[r.renderSlot(m.$slots,"default",{hide:u,show:c},void 0,!0)],4)):r.createCommentVNode("",!0)])),[[r.unref(Hd),p,m.excludeElFromClickOutside]])}}),[["__scopeId","data-v-9454a3a4"]]),z="YYYY-MM-DD",Li=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e},Ud=(t,e)=>{const n=P().startOf("month"),o=P(t).diff(n,"month"),i=P(e).diff(n,"month"),s=[];for(let a=o-1;a<=i;a++){const l=[],d=n.add(a,"month").startOf("month"),c=d.endOf("month"),u=d.month();let f=d.startOf("week"),p=[];for(;f.isBefore(c.endOf("week"));)f.day()===0&&p.length>0&&(l.push(p),p=[]),p.push({id:d.format("MM-YYYY"),date:f,isCurrentMonth:f.month()===u}),f=f.add(1,"day");p.length>0&&l.push(p),s.push({id:d.format("YYYY-MM-DD"),matrix:l,height:64+48*(c.endOf("week").diff(d.startOf("week"),"week")+1)})}return s},to=Array.from(Array(7),(t,e)=>P().day(e).format("ddd")),tb={class:"p-12 w-[360px]"},nb={class:"w-max"},ob={class:"flex h-40 justify-between px-4 py-8"},rb={class:"flex gap-4 items-center"},ib={class:"flex gap-4 items-center justify-center"},sb={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},ab=["onClick"],lb={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},db=Z(r.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,z)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=r.ref(!1),c=r.ref(!1),u=h=>{i.value=h},f=()=>{o.value=i.value.format(z),setTimeout(()=>{s.value=!1},0)},p=()=>{i.value=o.value?P(o.value):null,s.value=!1},m=h=>{d.value=!1,c.value=!1,l.value=h};return(h,g)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":g[5]||(g[5]=b=>r.isRef(o)?o.value=b:null),disabled:a.value,focused:s.value,"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:b})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":h.zIndex,onPopoverChanged:g[4]||(g[4]=y=>s.value=y)},{"popover-button":r.withCtx(()=>[h.$slots["trigger-button"]?r.renderSlot(h.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:b,opened:s.value,showValidBorder:h.showValidBorder,disabled:a.value})),void 0,!0):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:b,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",tb,[r.createElementVNode("div",nb,[r.createElementVNode("div",ob,[r.createElementVNode("div",rb,[r.createVNode(pn,{max:h.max,min:h.min,"model-value":l.value,picker:"month","onUpdate:modelValue":g[0]||(g[0]=y=>m(y))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:h.max,min:h.min,"model-value":l.value,picker:"year","onUpdate:modelValue":g[1]||(g[1]=y=>m(y))},null,8,["max","min","model-value"])]),r.createElementVNode("div",ib,[r.createVNode(Q,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:g[2]||(g[2]=()=>m(l.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:g[3]||(g[3]=()=>m(l.value.add(1,"month")))})])]),r.createElementVNode("div",null,[r.createElementVNode("div",sb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),y=>(r.openBlock(),r.createElementBlock("div",{key:y,class:"fm-calendar__cell"},r.toDisplayString(y),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(l.value),(y,S)=>(r.openBlock(),r.createElementBlock("div",{key:S,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y,v=>(r.openBlock(),r.createElementBlock("div",{key:v.date.date(),class:"fm-calendar__cell"},[v.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":v.date.isSame(i.value)},"fm-calendar__cell__button"]),type:"button",onClick:()=>u(v.date)},r.toDisplayString(v.date.date()),11,ab)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",lb,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-6d34db79"]]),jd=t=>(r.pushScopeId("data-v-17f2ddbc"),t=t(),r.popScopeId(),t),cb={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},ub={class:"flex items-center justify-center"},fb={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},pb={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},mb=jd(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),hb={id:"wrapper",class:"h-full relative w-[336px]"},gb=["id"],bb={class:"flex gap-4 items-center"},yb={class:"fm-typo-en-body-lg-600"},kb={class:"fm-typo-en-body-lg-600"},xb=["onClick"],Sb={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},Cb=jd(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),wb={class:"flex gap-8 items-center justify-end w-full"},Qd=Z(r.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:99},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=Ud(e.min,e.max),i=J(e,"modelValue"),s=P(),a=r.ref(P(i.value,z)),l=r.ref(!1),d=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),c=r.ref(),u=g=>{a.value=g},f=()=>{i.value=a.value.format(z),setTimeout(()=>{l.value=!1},0)},p=()=>{a.value=i.value?P(i.value):null,l.value=!1},m=()=>{l.value=!0,setTimeout(()=>{c.value.scrollToItem(h(s.startOf("month")))},0)},h=g=>o.findIndex(b=>b.id===g.startOf("month").format(z));return(g,b)=>{const y=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":b[0]||(b[0]=S=>r.isRef(i)?i.value=S:null),disabled:d.value,focused:l.value,"helper-state":g.helperState,"helper-text":g.helperText,info:g.labelInfo,label:g.label,optional:g.labelMark==="optional",required:g.labelMark==="required",rules:g.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(g.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:S})=>[g.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:m},[r.renderSlot(g.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({invalid:S,opened:l.value,showValidBorder:g.showValidBorder})),void 0,!0)])):(r.openBlock(),r.createBlock(de,{key:1,disabled:d.value,focused:l.value,invalid:S,"show-valid-border":g.showValidBorder,class:"cursor-pointer","icon-outlined":"","prepend-icon":"calendar_month",onClick:m},{prepend:r.withCtx(()=>[r.renderSlot(g.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(g.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":r.unref(i)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(i)?r.unref(P)(r.unref(i)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","invalid","show-valid-border"])),l.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",{style:r.normalizeStyle({zIndex:e.zIndex}),class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},[r.createElementVNode("div",cb,[r.createVNode(de,{focused:l.value,invalid:S,"show-valid-border":g.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(g.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(g.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var v,w;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":(v=a.value)!=null&&v.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((w=a.value)!=null&&w.isValid()?r.unref(P)(a.value).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),r.createElementVNode("div",ub,[r.createElementVNode("div",fb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),v=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"fm-calendar__cell"},r.toDisplayString(v),1))),128))])])]),r.createElementVNode("div",pb,[mb,r.createElementVNode("div",hb,[r.createVNode(y,{ref_key:"scroller",ref:c,buffer:200,"item-size":null,items:r.unref(o),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:v})=>[r.createElementVNode("div",{id:v.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",bb,[r.createElementVNode("div",yb,r.toDisplayString(r.unref(P)(v.id).format("MMMM")),1),r.createElementVNode("div",kb,r.toDisplayString(r.unref(P)(v.id).format("YYYY")),1)])],8,gb),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.matrix,(w,x)=>(r.openBlock(),r.createElementBlock("div",{key:x,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w,F=>(r.openBlock(),r.createElementBlock("div",{key:F.date.date(),class:"fm-calendar__cell"},[F.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":F.date.isSame(a.value),"fm-typo-en-body-lg-600":F.date.isSame(r.unref(s),"day")},"fm-calendar__cell__button"]),type:"button",onClick:()=>u(F.date)},r.toDisplayString(F.date.date()),11,xb)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",Sb,[Cb,r.createElementVNode("div",wb,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!a.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])],4)])):r.createCommentVNode("",!0)]),"helper-text":r.withCtx(()=>[r.renderSlot(g.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"])}}}),[["__scopeId","data-v-17f2ddbc"]]),tr=t=>{const e=r.inject(re,null);return r.computed(()=>{const n=t.disabled??(e==null?void 0:e.getDisabled())??!1;return{...t,disabled:n}})},Ab=r.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=xt(),n=t,o=J(n,"modelValue"),i=tr(n);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(db,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(Qd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),Wd=r.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),vb={class:"cursor-pointer fm-switch__container"},Bb={key:0},Db={class:"fm-typo-en-body-lg-400"},Vb={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},Pb={class:"fm-switch__input--container"},Eb=["checked","disabled","value"],Fb={key:1},Nb={class:"fm-typo-en-body-lg-400"},Mb={key:0,class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Hi=Z(r.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{default:null},disabled:{type:Boolean,default:void 0},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=()=>{o.value||(i.value=!i.value)};return(a,l)=>(r.openBlock(),r.createElementBlock("label",vb,[a.labelPlacement==="left"?(r.openBlock(),r.createElementBlock("div",Bb,[r.renderSlot(a.$slots,"label",{},void 0,!0),r.createElementVNode("div",Db,r.toDisplayString(a.label),1),a.sublabel?(r.openBlock(),r.createElementBlock("div",Vb,r.toDisplayString(a.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",Pb,[r.createElementVNode("input",{checked:r.unref(i),disabled:o.value,value:a.value,class:"fm-switch__input--btn",type:"checkbox",onClick:s},null,8,Eb),r.createElementVNode("div",{class:r.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":a.showIcon})},[a.showIcon?(r.openBlock(),r.createBlock(Q,{key:0,color:o.value?"#C7C7CC":r.unref(i)?"#1C1C1E":"#FFFFFF",name:r.unref(i)?"check":"close",size:"sm"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)]),a.labelPlacement==="right"?(r.openBlock(),r.createElementBlock("div",Fb,[r.createElementVNode("div",Nb,r.toDisplayString(a.label),1),a.sublabel?(r.openBlock(),r.createElementBlock("div",Mb,r.toDisplayString(a.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-4448e953"]]);var ye=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(ye||{});const Yd=t=>(r.pushScopeId("data-v-a35b0ec8"),t=t(),r.popScopeId(),t),Ob={key:0,class:"flex gap-4 items-center relative w-full"},Ib={class:"flex flex-col gap-4 w-full"},Rb=Yd(()=>r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),Tb={class:"flex flex-col gap-4 w-full"},zb={key:1,class:"flex flex-col gap-4 w-full"},Lb={class:"flex gap-4 p-12"},Hb={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},Ub={key:0,class:"px-8"},jb={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},Qb={class:"flex flex-col gap-24"},Wb={key:0,class:"flex gap-4 items-center px-12 w-full"},Yb={class:"flex flex-col gap-4 w-full"},Xb=Yd(()=>r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),Gb={class:"flex flex-col gap-4 w-full"},qb={class:"flex gap-24"},Jb={class:"w-max"},Kb={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},Zb={class:"flex gap-4 items-center"},$b={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},_b={class:"h-[288px]"},e2={key:0,class:"fm-calendar__cell__button--today"},t2=["onClick","onMouseover"],n2={class:"w-max"},o2={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},r2={class:"flex gap-4 items-center"},i2={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},s2={key:0,class:"fm-calendar__cell__button--today"},a2=["onClick","onMouseover"],l2={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},d2=Z(r.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var C,D;const e=[{id:ye.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{u.value=ye.PrecedingPeriod;const A=a.value;if(A[0].startDate&&A[0].endDate){const k=A[0].startDate.diff(A[0].endDate,"day");A[1]={startDate:A[0].startDate.subtract(+(1-k),"day"),endDate:A[0].startDate.subtract(1,"day")}}}},{id:ye.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{u.value=ye.PrecedingWeek;const A=a.value;if(A[0].startDate&&A[0].endDate){let k=A[0].endDate.diff(A[0].startDate,"week");k===0&&(k+=1),A[1]={startDate:A[0].startDate.subtract(k,"week"),endDate:A[0].endDate.subtract(k,"week")}}}},{id:ye.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{u.value=ye.PrecedingMonth;const A=a.value;if(A[0].startDate&&A[0].endDate){let k=A[0].endDate.diff(A[0].startDate,"month");k===0&&(k+=1),A[1]={startDate:A[0].startDate.subtract(k,"month"),endDate:A[0].endDate.subtract(k,"month")}}}},{id:ye.Custom,label:"Custom",sublabel:"",action:()=>{u.value=ye.Custom}}],n=t,o=r.inject(re,null),i=P(),s=J(n,"modelValue"),a=r.ref([{startDate:(C=s.value)!=null&&C.startDate?P(s.value.startDate,z):null,endDate:(D=s.value)!=null&&D.endDate?P(s.value.endDate,z):null},{startDate:null,endDate:null}]),l=r.ref(!1),d=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),c=r.ref(!1),u=r.ref(""),f=r.ref(P().startOf("month")),p=r.ref(P().startOf("month").add(1,"month")),m=r.ref(""),h=r.ref(null);let g=0;const b=A=>{var k;if(m.value="",a.value[g].startDate&&a.value[g].endDate){g===1&&(a.value=a.value.map(()=>({startDate:null,endDate:null})),g=0),a.value[0]={startDate:A,endDate:null};return}else if(!a.value[g].startDate&&!a.value[g].endDate)a.value[g].startDate=A;else{if(A.isBefore(a.value[g].startDate)){const B=a.value[g].startDate;a.value[g]={startDate:A,endDate:B}}else a.value[g].endDate=A;c.value&&(g=1),e.find(B=>B.id===u.value)||(u.value=ye.Custom)}(k=e.find(B=>B.id===u.value))==null||k.action()},y=()=>{c.value?s.value=a.value.map(A=>({startDate:A.startDate.format(z),endDate:A.endDate.format(z)})):s.value={startDate:a.value[0].startDate.format(z),endDate:a.value[0].endDate.format(z)},setTimeout(()=>{l.value=!1})},S=()=>{var A,k;Array.isArray(s.value)?a.value=s.value:a.value[0]={startDate:(A=s.value)!=null&&A.startDate?P(s.value.startDate,z):null,endDate:(k=s.value)!=null&&k.endDate?P(s.value.endDate,z):null},l.value=!1},v=(A,k)=>{A==="left"?(f.value=k,p.value=k.add(1,"month")):A==="right"&&(p.value=k,f.value=k.subtract(1,"month"))},w=A=>{const k=a.value[0].startDate,B=a.value[0].endDate,V=a.value[1].startDate,R=a.value[1].endDate,O=h.value,T=k==null?void 0:k.isSame(A),U=B==null?void 0:B.isSame(A),W=V==null?void 0:V.isSame(A),j=R==null?void 0:R.isSame(A),K=O==null?void 0:O.isSame(A),_=T&&B&&!(T&&U)||k&&!B&&T&&(O==null?void 0:O.isAfter(k))||k&&!B&&K&&(O==null?void 0:O.isBefore(k)),te=W&&R&&!(W&&j)||V&&!R&&W&&(O==null?void 0:O.isAfter(V))||V&&!R&&K&&(O==null?void 0:O.isBefore(V)),he=U&&k&&!(T&&U)||k&&!B&&T&&(O==null?void 0:O.isBefore(k))||k&&!B&&K&&(O==null?void 0:O.isAfter(k)),Te=j&&V&&!(W&&j)||V&&!R&&W&&(O==null?void 0:O.isBefore(V))||V&&!R&&K&&(O==null?void 0:O.isAfter(V)),qe=T&&U||T&&!B,ze=W&&j||W&&!R,ge=k&&(B||O)&&B?A.isAfter(k)&&A.isBefore(B):A.isAfter(O)&&A.isBefore(k)||A.isBefore(O)&&A.isAfter(k),Fe=V&&(R||O)&&R?A.isAfter(V)&&A.isBefore(R):A.isAfter(O)&&A.isBefore(V)||A.isBefore(O)&&A.isAfter(V),Le=()=>{if(a.value.filter(Os=>{var ao;for(const vr in Os)if((ao=Os[vr])!=null&&ao.isSame(A,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(T&&U&&(pe(A,V,R)||pe(A,V,O)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(W&&j&&(pe(A,k,B)||pe(A,k,O)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(_||he)return pe(A,V,R)||pe(A,V,O)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(te||Te)return pe(A,k,B)||pe(A,k,O)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(qe)return"bg-fm-color-primary";if(ze)return"bg-fm-color-system-info-300";if(pe(A,k,B)&&(pe(A,V,R)||pe(A,V,O)))return"bg-fm-color-system-success-100";if(ge)return"bg-fm-color-system-warning-100";if(Fe)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${Le()}`]:_||te,[`fm-calendar__cell__button--selected-end ${Le()}`]:he||Te,[`fm-calendar__cell__button--selected-between ${Le()}`]:ge||Fe,[`fm-calendar__cell__button--selected ${Le()}`]:qe||ze}},x=A=>{const k=a.value;if(k[0].startDate&&!k[0].endDate||k[1].startDate&&!k[1].endDate){h.value=A;return}h.value=null},F=A=>{m.value=A.label,a.value[0]={startDate:P(A.value.startDate,z),endDate:P(A.value.endDate,z)}},E=r.computed(()=>c.value?!a.value.every(A=>A.startDate&&A.endDate):!(a.value[0].startDate&&a.value[0].endDate)),M=A=>{u.value="",c.value=A,a.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),g=0},I=r.computed(()=>{if(!s.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const A=c.value&&Array.isArray(s.value)?s.value[0].startDate:s.value.startDate,k=c.value&&Array.isArray(s.value)?s.value[0].endDate:s.value.endDate;return{startDate:A?P(A).format("D MMM YYYY"):"DD MM YYYY",endDate:k?P(k).format("D MMM YYYY"):"DD MM YYYY"}}),N=r.computed(()=>{const A=c.value&&Array.isArray(s.value)?s.value[1].startDate:null,k=c.value&&Array.isArray(s.value)?s.value[1].endDate:null;return A&&k?`Compared: ${P(A).format("D MMM YYYY")} - ${P(k).format("D MMM YYYY")}`:""});return r.watch(()=>s.value,()=>{var A,k;c.value?a.value=s.value.map(B=>({startDate:B!=null&&B.startDate?P(B.startDate,z):null,endDate:B!=null&&B.endDate?P(B.endDate,z):null})):a.value[0]={startDate:(A=s.value)!=null&&A.startDate?P(s.value.startDate,z):null,endDate:(k=s.value)!=null&&k.endDate?P(s.value.endDate,z):null}}),(A,k)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(s),"onUpdate:modelValue":k[8]||(k[8]=B=>r.isRef(s)?s.value=B:null),disabled:d.value,focused:l.value,"helper-state":A.helperState,"helper-text":c.value?N.value:A.helperText,rules:A.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:B})=>[r.createVNode(mt,{disabled:d.value,"show-popover":l.value,"z-index":n.zIndex,onPopoverChanged:k[7]||(k[7]=V=>l.value=V)},{"popover-button":r.withCtx(()=>[A.$slots["trigger-button"]?r.renderSlot(A.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:l.value,invalid:B,showValidBorder:A.showValidBorder,isComparing:c.value,disabled:d.value})),void 0,!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[A.compare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ob,[r.createElementVNode("label",Ib,[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.startLabel),3),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),disabled:d.value,focused:l.value,"icon-outlined":!l.value,invalid:B,"show-valid-border":A.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((V=r.unref(s))!=null&&V.startDate?r.unref(P)(r.unref(s).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),Rb,r.createElementVNode("label",Tb,[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.endLabel),3),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),disabled:d.value,focused:l.value,"icon-outlined":!l.value,invalid:B,"show-valid-border":A.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":I.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((V=r.unref(s))!=null&&V.endDate?r.unref(P)(r.unref(s).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),A.compare?(r.openBlock(),r.createElementBlock("label",zb,[r.createVNode(Zt,{label:A.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:B,"show-valid-border":A.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":I.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(I.value.startDate)+" - "+r.toDisplayString(I.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)],64))]),default:r.withCtx(()=>[r.createElementVNode("div",Lb,[A.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",Hb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.predefinedRange,(V,R)=>(r.openBlock(),r.createBlock(xe,{key:R,label:V.label,"model-value":m.value===V.label,selectable:"",onClick:O=>F(V)},null,8,["label","model-value","onClick"]))),128)),A.compare&&A.predefinedRange?(r.openBlock(),r.createElementBlock("div",Ub,[r.createVNode(Wd,{inset:""})])):r.createCommentVNode("",!0),A.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Hi,{"model-value":c.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":k[0]||(k[0]=V=>M(V))},null,8,["model-value"]),c.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},r.renderList(e,(V,R)=>r.createVNode(xe,{key:R,label:V.label,"model-value":u.value===V.id,sublabel:V.sublabel,selectable:"",onClick:O=>V.action()},null,8,["label","model-value","sublabel","onClick"])),64)):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),A.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",jb)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass({"pl-4":A.showPredefinedRange})},[r.createElementVNode("div",Qb,[c.value?(r.openBlock(),r.createElementBlock("div",Wb,[r.createElementVNode("label",Yb,[r.createVNode(Zt,{label:"Custom"}),r.createVNode(de,{focused:!1},{default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[(V=a.value[0])!=null&&V.startDate&&((R=a.value[0])!=null&&R.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(a.value[0].startDate!==null?a.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(a.value[0].endDate!==null?a.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Xb,r.createElementVNode("label",Gb,[r.createVNode(Zt,{label:"Compare"}),r.createVNode(de,{focused:!1},{default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[(V=a.value[1])!=null&&V.startDate&&((R=a.value[1])!=null&&R.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(a.value[1].startDate!==null?a.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(a.value[1].endDate!==null?a.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):r.createCommentVNode("",!0),r.createElementVNode("div",qb,[r.createElementVNode("div",Jb,[r.createElementVNode("div",Kb,[r.createElementVNode("div",Zb,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:k[1]||(k[1]=()=>v("left",f.value.subtract(1,"month")))}),r.createVNode(pn,{max:A.max,min:A.min,"model-value":f.value,picker:"month","onUpdate:modelValue":k[2]||(k[2]=V=>v("left",V))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:A.max,min:A.min,"model-value":f.value,picker:"year","onUpdate:modelValue":k[3]||(k[3]=V=>v("left",V))},null,8,["max","min","model-value"])])]),r.createElementVNode("div",null,[r.createElementVNode("div",$b,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))]),r.createElementVNode("div",_b,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(f.value),(V,R)=>(r.openBlock(),r.createElementBlock("div",{key:R,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V,O=>(r.openBlock(),r.createElementBlock("div",{key:O.date.date(),class:"fm-calendar__cell"},[O.date.isSame(r.unref(i),"day")&&O.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",e2)):r.createCommentVNode("",!0),O.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[w(O.date),{"fm-typo-en-body-lg-600":O.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>b(O.date),onMouseover:T=>x(O.date)},r.toDisplayString(O.date.date()),43,t2)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",n2,[r.createElementVNode("div",o2,[r.createElementVNode("div",r2,[r.createVNode(pn,{max:A.max,min:A.min,"model-value":p.value,picker:"month","onUpdate:modelValue":k[4]||(k[4]=V=>v("right",V))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:A.max,min:A.min,"model-value":p.value,picker:"year","onUpdate:modelValue":k[5]||(k[5]=V=>v("right",V))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:k[6]||(k[6]=()=>v("left",f.value.add(1,"month")))})]),r.createElementVNode("div",null,[r.createElementVNode("div",i2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(p.value),(V,R)=>(r.openBlock(),r.createElementBlock("div",{key:R,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V,O=>(r.openBlock(),r.createElementBlock("div",{key:O.date.date(),class:"fm-calendar__cell"},[O.date.isSame(r.unref(i),"day")&&O.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",s2)):r.createCommentVNode("",!0),O.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[w(O.date),{"fm-typo-en-body-lg-600":O.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>b(O.date),onMouseover:T=>x(O.date)},r.toDisplayString(O.date.date()),43,a2)):r.createCommentVNode("",!0)]))),128))]))),128))])])])])]),r.createElementVNode("div",l2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:S}),r.createVNode(G,{disabled:E.value,label:"Apply",size:"md",variant:"primary",onClick:y},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[A.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(A.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),[["__scopeId","data-v-a35b0ec8"]]),c2={class:"flex flex-col gap-4"},u2=["id"],f2={class:"flex flex-col gap-4 justify-center"},mn=Z(r.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},menuId:{},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","dropdown-changed"],setup(t,{emit:e}){const n=t,o=r.inject(re,null),i=e,s=J(n,"modelValue"),a=r.ref(!1),l=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),d=(h,g)=>{if(n.multiselect){let b=[];h?b=s.value.length===0?[g]:n.items.filter(y=>s.value.some(S=>ve(y.value,S)||ve(y.value,g.value))):b=n.items.filter(y=>s.value.some(S=>ve(y.value,S)&&!ve(y.value,g.value))),s.value=b.map(y=>y.value)}else s.value=g.value,setTimeout(()=>{a.value=!1},0)},c=h=>{const g=[...s.value].filter((b,y)=>y!==h);s.value=g},u=r.computed(()=>n.multiselect?n.items.filter(h=>r.toRaw(s.value).some(g=>ve(g,h.value))):n.items.filter(h=>ve(s.value,h.value))),f=r.computed(()=>n.items.filter(h=>s.value.some(g=>ve(h.value,g))).map(h=>({label:h.label}))),p=r.computed(()=>{var h;return n.multiselect?n.placeholder:((h=n.items.find(g=>ve(g.value,s.value)))==null?void 0:h.label)??n.placeholder}),m=r.computed(()=>n.multiselect?s.value.length!==0:n.items.some(h=>ve(h.value,s.value)));return(h,g)=>(r.openBlock(),r.createElementBlock("div",c2,[r.createVNode(Se,{modelValue:r.unref(s),"onUpdate:modelValue":g[1]||(g[1]=b=>r.isRef(s)?s.value=b:null),disabled:l.value,focused:a.value,"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules},r.createSlots({default:r.withCtx(({invalid:b})=>[r.createVNode(_e,{"close-on-click":!h.multiselect,disabled:l.value,"max-height":h.maxHeight,placement:h.placement,"show-menu":a.value,width:h.width,onMenuChanged:g[0]||(g[0]=y=>{a.value=y,i("dropdown-changed",a.value)})},{"menu-button":r.withCtx(()=>[r.createVNode(de,{class:r.normalizeClass(l.value?"cursor-not-allowed":"cursor-pointer"),focused:a.value,invalid:b,"show-valid-border":h.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.createVNode(Q,{color:l.value?"#C7C7CC":"black",name:a.value?"expand_less":"expand_more",size:"md"},null,8,["color","name"])]),default:r.withCtx(()=>[r.renderSlot(h.$slots,"default",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([[l.value?"text-fm-color-typo-disabled":m.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"break-all fm-typo-en-body-lg-400 line-clamp-1"])},r.toDisplayString(p.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":r.withCtx(({maxHeight:y,width:S})=>[r.createElementVNode("div",{id:h.menuId,style:r.normalizeStyle({"max-height":`${y}px`,width:`${S}px`}),class:"fm-select__menu__wrapper"},[r.renderSlot(h.$slots,"menu-wrapper",r.mergeProps({handleItemChange:(v,w)=>d(v,w)},{maxHeight:y,width:S}),()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.items,v=>(r.openBlock(),r.createBlock(xe,{key:v.value,"has-checkbox":h.multiselect,label:v.label,"model-value":u.value.some(w=>r.unref(ve)(w.value,v.value)),sublabel:v.sublabel,value:v.value,"onUpdate:modelValue":w=>d(w,v)},null,8,["has-checkbox","label","model-value","sublabel","value","onUpdate:modelValue"]))),128))],!0)],12,u2)]),_:2},1032,["close-on-click","disabled","max-height","placement","show-menu","width"])]),_:2},[h.label||h.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,h.helperText||h.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]),r.createElementVNode("div",f2,[h.multiselect&&u.value.length>0?(r.openBlock(),r.createBlock(Ir,{key:0,disabled:l.value,items:f.value,removable:"",onChipClosed:c},null,8,["disabled","items"])):r.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-43a21fe7"]]),p2={key:0},m2={class:"flex gap-4 items-center relative w-full"},h2={class:"flex flex-col gap-4 w-full"},g2=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),b2={class:"flex flex-col gap-4 w-full"},y2={key:1,class:"flex flex-col gap-4 w-full"},Ui=r.defineComponent({__name:"FmDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?P(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?P(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",p2,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",m2,[r.createElementVNode("label",h2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400 line-clamp-1",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.startDate?r.unref(P)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])]),g2,r.createElementVNode("label",b2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month",disabled:o.disabled,"icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.endDate?r.unref(P)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",y2,[r.createVNode(Zt,{label:o.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),Xd=t=>(r.pushScopeId("data-v-133138e9"),t=t(),r.popScopeId(),t),k2={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},x2={class:"flex items-center justify-center"},S2={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},C2={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},w2=Xd(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),A2={id:"wrapper",class:"h-full relative w-[336px]"},v2=["id"],B2={class:"flex gap-4 items-center"},D2={class:"fm-typo-en-body-lg-600"},V2={class:"fm-typo-en-body-lg-600"},P2=["onClick","onMouseover"],E2={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},F2=Xd(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),N2={class:"flex gap-8 items-center justify-end w-full"},Gd=Z(r.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:100},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var D,A;const e=r.ref(),n=[{id:ye.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{f.value=ye.PrecedingPeriod;const k=d.value;if(k[0].startDate&&k[0].endDate){const B=k[0].startDate.diff(k[0].endDate,"day");k[1]={startDate:k[0].startDate.subtract(+(1-B),"day"),endDate:k[0].startDate.subtract(1,"day")}}}},{id:ye.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{f.value=ye.PrecedingWeek;const k=d.value;if(k[0].startDate&&k[0].endDate){let B=k[0].endDate.diff(k[0].startDate,"week");B===0&&(B+=1),k[1]={startDate:k[0].startDate.subtract(B,"week"),endDate:k[0].endDate.subtract(B,"week")}}}},{id:ye.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{f.value=ye.PrecedingMonth;const k=d.value;if(k[0].startDate&&k[0].endDate){let B=k[0].endDate.diff(k[0].startDate,"month");B===0&&(B+=1),k[1]={startDate:k[0].startDate.subtract(B,"month"),endDate:k[0].endDate.subtract(B,"month")}}}},{id:ye.Custom,label:"Custom",sublabel:"",action:()=>{f.value=ye.Custom}}],o=t,i=r.inject(re,null),s=Ud(o.min,o.max),a=P(),l=J(o,"modelValue"),d=r.ref([{startDate:(D=l.value)!=null&&D.startDate?P(l.value.startDate,z):null,endDate:(A=l.value)!=null&&A.endDate?P(l.value.endDate,z):null},{startDate:null,endDate:null}]),c=r.ref(!1),u=r.ref(!1),f=r.ref(""),p=r.ref(""),m=r.ref(null);let h=0;const g=k=>{var B;if(p.value="",d.value[h].startDate&&d.value[h].endDate){h===1&&(d.value=d.value.map(()=>({startDate:null,endDate:null})),h=0),d.value[0]={startDate:k,endDate:null};return}else if(!d.value[h].startDate&&!d.value[h].endDate)d.value[h].startDate=k;else{if(k.isBefore(d.value[h].startDate)){const V=d.value[h].startDate;d.value[h]={startDate:k,endDate:V}}else d.value[h].endDate=k;u.value&&(h=1),n.find(V=>V.id===f.value)||(f.value=ye.Custom)}(B=n.find(V=>V.id===f.value))==null||B.action()},b=()=>{u.value?l.value=d.value.map(k=>({startDate:k.startDate.format(z),endDate:k.endDate.format(z)})):l.value={startDate:d.value[0].startDate.format(z),endDate:d.value[0].endDate.format(z)},setTimeout(()=>{c.value=!1})},y=()=>{var k,B;Array.isArray(l.value)?d.value=l.value:d.value[0]={startDate:(k=l.value)!=null&&k.startDate?P(l.value.startDate,z):null,endDate:(B=l.value)!=null&&B.endDate?P(l.value.endDate,z):null},c.value=!1},S=k=>{const B=d.value[0].startDate,V=d.value[0].endDate,R=d.value[1].startDate,O=d.value[1].endDate,T=m.value,U=B==null?void 0:B.isSame(k),W=V==null?void 0:V.isSame(k),j=R==null?void 0:R.isSame(k),K=O==null?void 0:O.isSame(k),_=T==null?void 0:T.isSame(k),te=U&&V&&!(U&&W)||B&&!V&&U&&(T==null?void 0:T.isAfter(B))||B&&!V&&_&&(T==null?void 0:T.isBefore(B)),he=j&&O&&!(j&&K)||R&&!O&&j&&(T==null?void 0:T.isAfter(R))||R&&!O&&_&&(T==null?void 0:T.isBefore(R)),Te=W&&B&&!(U&&W)||B&&!V&&U&&(T==null?void 0:T.isBefore(B))||B&&!V&&_&&(T==null?void 0:T.isAfter(B)),qe=K&&R&&!(j&&K)||R&&!O&&j&&(T==null?void 0:T.isBefore(R))||R&&!O&&_&&(T==null?void 0:T.isAfter(R)),ze=U&&W||U&&!V,ge=j&&K||j&&!O,Fe=B&&(V||T)&&V?k.isAfter(B)&&k.isBefore(V):k.isAfter(T)&&k.isBefore(B)||k.isBefore(T)&&k.isAfter(B),Le=R&&(O||T)&&O?k.isAfter(R)&&k.isBefore(O):k.isAfter(T)&&k.isBefore(R)||k.isBefore(T)&&k.isAfter(R),nt=()=>{if(d.value.filter(ao=>{var vr;for(const YC in ao)if((vr=ao[YC])!=null&&vr.isSame(k,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(U&&W&&(pe(k,R,O)||pe(k,R,T)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(j&&K&&(pe(k,B,V)||pe(k,B,T)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(te||Te)return pe(k,R,O)||pe(k,R,T)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(he||qe)return pe(k,B,V)||pe(k,B,T)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(ze)return"bg-fm-color-primary";if(ge)return"bg-fm-color-system-info-300";if(pe(k,B,V)&&(pe(k,R,O)||pe(k,R,T)))return"bg-fm-color-system-success-100";if(Fe)return"bg-fm-color-system-warning-100";if(Le)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${nt()}`]:te||he,[`fm-calendar__cell__button--selected-end ${nt()}`]:Te||qe,[`fm-calendar__cell__button--selected-between ${nt()}`]:Fe||Le,[`fm-calendar__cell__button--selected ${nt()}`]:ze||ge}},v=k=>{const B=d.value;if(B[0].startDate&&!B[0].endDate||B[1].startDate&&!B[1].endDate){m.value=k;return}m.value=null},w=k=>{d.value[0]={startDate:P(k.startDate,z),endDate:P(k.endDate,z)}},x=k=>{const B=n.find(V=>V.id===k);B==null||B.action()},F=r.computed(()=>u.value?!d.value.every(k=>k.startDate&&k.endDate):!(d.value[0].startDate&&d.value[0].endDate)),E=k=>{f.value="",u.value=k,d.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),h=0},M=r.computed(()=>{const k=u.value&&Array.isArray(l.value)?l.value[1].startDate:null,B=u.value&&Array.isArray(l.value)?l.value[1].endDate:null;return k&&B?`Compared: ${P(k).format("D MMM YYYY")} - ${P(B).format("D MMM YYYY")}`:""}),I=r.computed(()=>o.disabled??(i==null?void 0:i.getDisabled())??!1),N=()=>{I.value||(c.value=!0,setTimeout(()=>{e.value.scrollToItem(C(a.startOf("month")))},0))},C=k=>s.findIndex(B=>B.id===k.startOf("month").format(z));return r.watch(()=>l.value,()=>{var k,B;u.value?d.value=l.value.map(V=>({startDate:V!=null&&V.startDate?P(V.startDate,z):null,endDate:V!=null&&V.endDate?P(V.endDate,z):null})):d.value[0]={startDate:(k=l.value)!=null&&k.startDate?P(l.value.startDate,z):null,endDate:(B=l.value)!=null&&B.endDate?P(l.value.endDate,z):null}}),(k,B)=>{const V=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":B[3]||(B[3]=R=>r.isRef(l)?l.value=R:null),disabled:I.value,focused:c.value,"helper-state":k.helperState,"helper-text":u.value?M.value:k.helperText,rules:k.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:R})=>{var O,T,U,W;return[k.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:N},[r.renderSlot(k.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({opened:c.value,invalid:R,showValidBorder:k.showValidBorder,isComparing:u.value,disabled:I.value})),void 0,!0)])):(r.openBlock(),r.createBlock(Ui,{key:1,analytic:k.compare,"compare-label":k.compareLabel,disabled:I.value,"end-label":k.endLabel,focused:c.value,invalid:R,"is-comparing":u.value,"model-value":r.unref(l),"show-valid-border":k.showValidBorder,"start-label":k.startLabel,onClick:N},r.createSlots({_:2},[k.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(k.$slots,"popover-button",{focused:c.value},void 0,!0)]),key:"0"}:void 0]),1032,["analytic","compare-label","disabled","end-label","focused","invalid","is-comparing","model-value","show-valid-border","start-label"])),c.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",{style:r.normalizeStyle({zIndex:o.zIndex}),class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},[r.createElementVNode("div",k2,[k.showPredefinedRange?(r.openBlock(),r.createBlock(mn,{key:0,items:k.predefinedRange,"model-value":p.value,"onUpdate:modelValue":B[0]||(B[0]=j=>w(j))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createVNode(Ui,{analytic:k.compare,"compare-label":k.compareLabel,"end-label":k.endLabel,"is-comparing":u.value,"model-value":{startDate:((O=d.value[0].startDate)==null?void 0:O.format(r.unref(z)))??null,endDate:((T=d.value[0].endDate)==null?void 0:T.format(r.unref(z)))??null},"start-label":k.startLabel},null,8,["analytic","compare-label","end-label","is-comparing","model-value","start-label"]),k.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Hi,{"model-value":u.value,label:"Compare","label-placement":"right","onUpdate:modelValue":B[1]||(B[1]=j=>E(j))},null,8,["model-value"]),u.value&&k.compare?(r.openBlock(),r.createBlock(mn,{key:0,items:n.map(j=>({label:j.label,sublabel:j.sublabel,value:j.id})),"model-value":f.value,"onUpdate:modelValue":B[2]||(B[2]=j=>x(j))},null,8,["items","model-value"])):r.createCommentVNode("",!0),u.value&&k.compare?(r.openBlock(),r.createBlock(Ui,{key:1,analytic:k.compare,"end-label":k.endLabel,"is-comparing":u.value,"model-value":{startDate:((U=d.value[1].startDate)==null?void 0:U.format(r.unref(z)))??null,endDate:((W=d.value[1].endDate)==null?void 0:W.format(r.unref(z)))??null},"start-label":k.startLabel,"compare-label":"Compare: Custom"},null,8,["analytic","end-label","is-comparing","model-value","start-label"])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),r.createElementVNode("div",x2,[r.createElementVNode("div",S2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),j=>(r.openBlock(),r.createElementBlock("div",{key:j,class:"fm-calendar__cell"},r.toDisplayString(j),1))),128))])])]),r.createElementVNode("div",C2,[w2,r.createElementVNode("div",A2,[r.createVNode(V,{ref_key:"scroller",ref:e,buffer:200,"item-size":null,items:r.unref(s),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:j})=>[r.createElementVNode("div",{id:j.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",B2,[r.createElementVNode("div",D2,r.toDisplayString(r.unref(P)(j.id).format("MMMM")),1),r.createElementVNode("div",V2,r.toDisplayString(r.unref(P)(j.id).format("YYYY")),1)])],8,v2),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(j.matrix,(K,_)=>(r.openBlock(),r.createElementBlock("div",{key:_,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(K,te=>(r.openBlock(),r.createElementBlock("div",{key:te.date.date(),class:"fm-calendar__cell"},[te.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([[S(te.date),{"fm-typo-en-body-lg-600":te.date.isSame(r.unref(a),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>g(te.date),onMouseover:he=>v(te.date)},r.toDisplayString(te.date.date()),43,P2)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",E2,[F2,r.createElementVNode("div",N2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(G,{disabled:F.value,label:"Apply",size:"md",variant:"primary",onClick:b},null,8,["disabled"])])])],4)])):r.createCommentVNode("",!0)]}),_:2},[k.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(k.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"])}}}),[["__scopeId","data-v-133138e9"]]),M2=r.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,{breakpoints:n}=xt(),o=J(e,"modelValue"),i=tr(e);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(n).md||r.unref(n).lg?(r.openBlock(),r.createBlock(d2,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(n).xs||r.unref(n).sm?(r.openBlock(),r.createBlock(Gd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),L="YYYY-MM-DD",hn=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e.length<6&&e.push([]),e},O2=Array.from(Array(7),(t,e)=>P().day(e).format("ddd")),qd=(t,e)=>({startAt:t?P(t,L):null,endAt:e?P(e,L):null}),I2={class:"fm-typo-en-body-md-600"},R2={id:"in-calendar-app",class:"h-[264px] overflow-y-auto w-[160px]"},T2=["onVnodeMounted"],z2=["onVnodeMounted"],je=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.computed(()=>{const c=P(n.min).startOf("year"),u=P(n.max).startOf("year"),f=u.diff(c,"year"),p=[];for(let m=0;m<=f;m++)p.push(u.subtract(m,"year"));return p}),a=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");return c.get("year")===u.get("year")?c.startOf("month").isAfter(u)||c.get("month")===u.get("month"):c.get("year")===f.get("year")?c.startOf("month").isBefore(f)||c.get("month")===f.get("month"):!0},l=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");if(u.get("year")===c.get("year")){o("update:modelValue",u);return}if(f.get("year")===c.get("year")){o("update:modelValue",f);return}o("update:modelValue",c)};function d(c,u){if(!u)return!1;const f=c.el,p=f==null?void 0:f.parentElement;!f||!p||p.scrollTo({top:f.offsetTop-50})}return(c,u)=>(r.openBlock(),r.createBlock(_e,{trigger:"click",onMenuChanged:u[0]||(u[0]=f=>i.value=f)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-4 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",I2,[c.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(c.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(c.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(Q,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",R2,[c.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(f,p)=>c.modelValue.month(p)),f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("MMMM"),onVnodeMounted:p=>d(p,c.modelValue.format("MMMM")===f.format("MMMM"))},[r.createVNode(xe,{disabled:!a(f),"model-value":c.modelValue.format("MMMM")===f.format("MMMM"),label:f.format("MMMM"),"onUpdate:modelValue":p=>o("update:modelValue",f)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,T2))),128)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("YYYY"),onVnodeMounted:p=>d(p,c.modelValue.format("YYYY")===f.format("YYYY"))},[r.createVNode(xe,{"model-value":c.modelValue.format("YYYY")===f.format("YYYY"),label:f.format("YYYY"),"onUpdate:modelValue":p=>l(f)},null,8,["model-value","label","onUpdate:modelValue"])],8,z2))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),L2={class:"fm-calendar__name-row fm-typo-en-body-md-400 text-fm-color-typo-tertiary"},H2=["id"],U2={key:0,class:"fm-calendar__cell__button--today"},j2=["onClick","onMouseover"],gn=Z(r.defineComponent({__name:"FmCalendar",props:{days:{},dayCellClass:{type:[Object,Function],default:void 0},onDayClick:{},onCellMouseOver:{type:Function,default:void 0},cellSize:{default:"md"}},setup(t){const e=P(),n=(i,s)=>typeof i=="function"?i(...s):i,o=(i,s)=>{if(!s)return;const a={"fm-calendar__cell--selected":!1,"fm-calendar__cell--selected-start":!1,"fm-calendar__cell--selected-end":!1,"fm-calendar__cell--selected-between":!1};let l;if(typeof s=="function"){const{status:d,className:c}=s(i);d&&(a["fm-calendar__cell--selected"]=d.isSelected??!1,a["fm-calendar__cell--selected-start"]=d.isStart??!1,a["fm-calendar__cell--selected-end"]=d.isEnd??!1,a["fm-calendar__cell--selected-between"]=d.isBetween??!1),l=c??""}else{const{status:d,className:c}=s;d&&(a["fm-calendar__cell--selected"]=n(d.isSelected,[i])??!1,a["fm-calendar__cell--selected-start"]=n(d.isStart,[i])??!1,a["fm-calendar__cell--selected-end"]=n(d.isEnd,[i])??!1,a["fm-calendar__cell--selected-between"]=n(d.isBetween,[i])??!1),l=n(c,[i])??""}return[a,l]};return(i,s)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",L2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(O2),a=>(r.openBlock(),r.createElementBlock("div",{key:a,class:r.normalizeClass(["fm-calendar__cell",`fm-calendar__cell__${i.cellSize}`])},r.toDisplayString(a),3))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.days,(a,l)=>(r.openBlock(),r.createElementBlock("div",{key:l,class:"fm-calendar__row fm-typo-en-body-md-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a,d=>(r.openBlock(),r.createElementBlock("div",{id:`${d.date.toISOString()}`,key:d.date.date(),class:r.normalizeClass(["fm-calendar__cell",[`fm-calendar__cell__${i.cellSize}`,o(d.date,i.dayCellClass),!d.isCurrentMonth&&"fm-calendar__cell--not-current-month"]])},[d.date.isSame(r.unref(e),"day")&&d.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",U2)):r.createCommentVNode("",!0),d.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:"fm-calendar__cell__button",type:"button",onClick:c=>i.onDayClick(d),onMouseover:c=>{var u;return(u=i.onCellMouseOver)==null?void 0:u.call(i,d.date)}},r.toDisplayString(d.date.date()),41,j2)):r.createCommentVNode("",!0)],10,H2))),128))]))),128))])]))}}),[["__scopeId","data-v-c82f9b53"]]),Q2={class:"p-12 space-y-4 w-[552px]"},W2={class:"w-max"},Y2={class:"flex space-x-24"},X2={class:"flex items-center py-8 space-x-16"},G2={class:"flex space-x-4"},q2={class:"flex items-center justify-end py-8 space-x-16"},J2={class:"flex space-x-4"},K2={class:"flex gap-8 items-center justify-end w-full"},Z2=r.defineComponent({__name:"FmSimpleDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,L)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=r.ref(P().startOf("month").add(1,"month")),c=(b,y)=>{b==="left"?(l.value=y,d.value=y.add(1,"month")):b==="right"&&(d.value=y,l.value=y.subtract(1,"month"))},u=b=>{i.value=b},f=r.computed(()=>hn(l.value)),p=r.computed(()=>hn(l.value.add(1,"month"))),m=()=>{o.value=i.value.format(L),setTimeout(()=>{s.value=!1},0)},h=()=>{i.value=o.value?P(o.value):null,s.value=!1},g=b=>{s.value=b,b||h()};return(b,y)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":y[6]||(y[6]=S=>r.isRef(o)?o.value=S:null),disabled:a.value,focused:s.value,"helper-state":b.helperState,"helper-text":b.helperText,info:b.labelInfo,label:b.label,optional:b.labelMark==="optional",required:b.labelMark==="required",rules:b.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(b.$slots,"label")]),default:r.withCtx(({invalid:S})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":e.zIndex,onPopoverChanged:g},{"popover-button":r.withCtx(()=>[b.$slots["trigger-button"]?r.renderSlot(b.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:S,opened:s.value,showValidBorder:b.showValidBorder,disabled:a.value}))):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:S,"show-valid-border":b.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(b.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(b.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",Q2,[r.createElementVNode("div",W2,[r.createElementVNode("div",Y2,[r.createElementVNode("div",null,[r.createElementVNode("div",X2,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:y[0]||(y[0]=()=>c("left",l.value.subtract(1,"month")))}),r.createElementVNode("div",G2,[r.createVNode(je,{max:b.max,min:b.min,"model-value":l.value,picker:"month","onUpdate:modelValue":y[1]||(y[1]=v=>c("left",v))},null,8,["max","min","model-value"]),r.createVNode(je,{max:b.max,min:b.min,"model-value":l.value,picker:"year","onUpdate:modelValue":y[2]||(y[2]=v=>c("left",v))},null,8,["max","min","model-value"])])]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:v=>v.isSame(i.value,"date")}},days:f.value,"on-day-click":v=>u(v.date)},null,8,["day-cell-class","days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",q2,[r.createElementVNode("div",J2,[r.createVNode(je,{max:b.max,min:b.min,"model-value":d.value,picker:"month","onUpdate:modelValue":y[3]||(y[3]=v=>c("right",v))},null,8,["max","min","model-value"]),r.createVNode(je,{max:b.max,min:b.min,"model-value":d.value,picker:"year","onUpdate:modelValue":y[4]||(y[4]=v=>c("right",v))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:y[5]||(y[5]=()=>c("left",l.value.add(1,"month")))})]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:v=>v.isSame(i.value,"date")}},days:p.value,"on-day-click":v=>u(v.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",K2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:h}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:m},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(b.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),$2={class:"p-12 space-y-4 w-[276px]"},_2={class:"w-max"},ey={class:"flex space-x-24"},ty={class:"flex items-center justify-between py-8"},ny={class:"flex space-x-4"},oy={class:"flex space-x-4"},ry={class:"flex gap-8 items-center justify-end w-full"},Jd=r.defineComponent({__name:"FmSimpleDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,L)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=h=>{l.value=h},c=h=>{i.value=h},u=r.computed(()=>hn(l.value)),f=()=>{o.value=i.value.format(L),setTimeout(()=>{s.value=!1},0)},p=()=>{i.value=o.value?P(o.value):null,s.value=!1},m=h=>{s.value=h,h||p()};return(h,g)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":g[4]||(g[4]=b=>r.isRef(o)?o.value=b:null),disabled:a.value,focused:s.value,"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label")]),default:r.withCtx(({invalid:b})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":e.zIndex,onPopoverChanged:m},{"popover-button":r.withCtx(()=>[h.$slots["trigger-button"]?r.renderSlot(h.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:b,opened:s.value,showValidBorder:h.showValidBorder,disabled:a.value}))):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:b,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",$2,[r.createElementVNode("div",_2,[r.createElementVNode("div",ey,[r.createElementVNode("div",null,[r.createElementVNode("div",ty,[r.createElementVNode("div",ny,[r.createVNode(je,{max:h.max,min:h.min,"model-value":l.value,picker:"month","onUpdate:modelValue":g[0]||(g[0]=y=>d(y))},null,8,["max","min","model-value"]),r.createVNode(je,{max:h.max,min:h.min,"model-value":l.value,picker:"year","onUpdate:modelValue":g[1]||(g[1]=y=>d(y))},null,8,["max","min","model-value"])]),r.createElementVNode("div",oy,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:g[2]||(g[2]=()=>d(l.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:g[3]||(g[3]=()=>d(l.value.add(1,"month")))})])]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:y=>y.isSame(i.value,"date")}},days:u.value,"on-day-click":y=>c(y.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",ry,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),iy=r.defineComponent({__name:"FmSimpleDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=xt(),n=t,o=J(n,"modelValue"),i=tr(n);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(Z2,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(Jd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}});var ne=(t=>(t.NoComparison="no_comparison",t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.PrecedingYear="preceding_year",t.Custom="custom",t))(ne||{});const sy={key:1,class:"flex gap-4 items-center relative w-full"},ay={class:"flex flex-col gap-4 w-full"},ly=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),dy={class:"flex flex-col gap-4 w-full"},cy={class:"flex h-[360px]"},uy={class:"flex flex-col items-start p-12 pr-4"},fy={key:0},py={key:1},my=r.createElementVNode("div",{class:"bg-fm-color-neutral-gray-100 h-full mx-4 w-px"},null,-1),hy={class:"w-max"},gy={class:"flex space-x-24"},by={class:"flex items-center py-8 space-x-16"},yy={class:"flex space-x-4"},ky={class:"flex items-center justify-end py-8 space-x-16"},xy={class:"flex space-x-4"},Sy={class:"flex gap-8 items-center justify-end w-full"},Cy=r.defineComponent({__name:"FmSimpleDateRangePickerDesktop",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{default:ne.PrecedingPeriod},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){var I,N;const n=C=>()=>{var B,V;const{startAt:D,endAt:A}=qd((B=s.compareTarget)==null?void 0:B.startDate,(V=s.compareTarget)==null?void 0:V.endDate);if(!D||!A)return;const k=C({startAt:D,endAt:A});return v("right",k.endDate.startOf("month")),k},o=r.computed(()=>[{id:ne.NoComparison,label:"No Comparison",sublabel:"",action:()=>{d.value={startDate:null,endDate:null},h.value=ne.NoComparison}},{id:ne.PrecedingWeek,label:"Same period last week",sublabel:"Match day of week",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"week")+1;return d.value={startDate:C.subtract(A,"week"),endDate:D.subtract(A,"week")},h.value=ne.PrecedingWeek,d.value})},{id:ne.PrecedingMonth,label:"Same period last month",sublabel:"Match day of month",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"month")+1;return d.value={startDate:C.subtract(A,"month"),endDate:D.subtract(A,"month")},h.value=ne.PrecedingMonth,d.value})},{id:ne.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"day")+1;return d.value={startDate:C.subtract(A,"day"),endDate:D.subtract(A,"day")},h.value=ne.PrecedingPeriod,d.value})},{id:ne.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"year")+1;return d.value={startDate:C.subtract(A,"year"),endDate:D.subtract(A,"year")},h.value=ne.PrecedingYear,d.value})},{id:ne.Custom,label:"Custom",sublabel:"",action:()=>{h.value=ne.Custom}}]),i=e,s=t,a=r.inject(re,null),l=J(s,"modelValue"),d=r.ref({startDate:(I=l.value)!=null&&I.startDate?P(l.value.startDate,L):null,endDate:(N=l.value)!=null&&N.endDate?P(l.value.endDate,L):null}),c=r.ref(!1),u=r.computed(()=>s.disabled??(a==null?void 0:a.getDisabled())??!1),f=r.ref(P().startOf("month")),p=r.ref(P().startOf("month").add(1,"month")),m=r.ref(""),h=r.ref(s.defaultCompareType),g=r.ref(null),b=C=>{if(m.value="",h.value=ne.Custom,d.value.startDate&&d.value.endDate){d.value={startDate:C,endDate:null};return}else if(!d.value.startDate&&!d.value.endDate)d.value.startDate=C;else if(C.isBefore(d.value.startDate)){const D=d.value.startDate;d.value={startDate:C,endDate:D}}else d.value.endDate=C},y=()=>{var C,D;l.value={startDate:(C=d.value.startDate)==null?void 0:C.format(L),endDate:(D=d.value.endDate)==null?void 0:D.format(L)},i("select-comparison",h.value),setTimeout(()=>{c.value=!1})},S=()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null},c.value=!1},v=(C,D)=>{C==="left"?(f.value=D,p.value=D.add(1,"month")):C==="right"&&(p.value=D,f.value=D.subtract(1,"month"))},w=C=>{const D=d.value.startDate,A=d.value.endDate,k=g.value,B=D==null?void 0:D.isSame(C),V=A==null?void 0:A.isSame(C),R=k==null?void 0:k.isSame(C),O=B&&A&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isAfter(D))||D&&!A&&R&&(k==null?void 0:k.isBefore(D)),T=V&&D&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isBefore(D))||D&&!A&&R&&(k==null?void 0:k.isAfter(D)),U=B&&V||B&&!A,W=D&&(A||k)&&A?C.isAfter(D)&&C.isBefore(A):C.isAfter(k)&&C.isBefore(D)||C.isBefore(k)&&C.isAfter(D);return{status:{isStart:O??!1,isEnd:T??!1,isBetween:W??!1,isSelected:U??!1}}},x=C=>{const D=d.value;if(D.startDate&&!D.endDate){g.value=C;return}g.value=null},F=C=>{m.value=C.label;const D=P(C.value.startDate,L),A=P(C.value.endDate,L);d.value={startDate:D,endDate:A},v("right",A.startOf("month"))},E=C=>{c.value=C,C||S()},M=r.computed(()=>!h.value&&!(d.value.startDate&&d.value.endDate));return r.watch(()=>l.value,()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null}}),r.watch(()=>s.compareTarget,()=>{if(!s.compareTarget||h.value===ne.Custom)return;const C=o.value.find(A=>A.id===h.value),D=C==null?void 0:C.action();D&&(l.value=D)}),(C,D)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":D[6]||(D[6]=A=>r.isRef(l)?l.value=A:null),disabled:u.value,focused:c.value,"helper-state":C.helperState,"helper-text":C.helperText,rules:C.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:A})=>[r.createVNode(mt,{disabled:u.value,"exclude-el-from-click-outside":["in-calendar-app"],"show-popover":c.value,"z-index":s.zIndex,onPopoverChanged:E},{"popover-button":r.withCtx(()=>[C.$slots["trigger-button"]?r.renderSlot(C.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:c.value,invalid:A,showValidBorder:C.showValidBorder,disabled:u.value}))):(r.openBlock(),r.createElementBlock("div",sy,[r.createElementVNode("label",ay,[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.startLabel),3),r.createVNode(de,{class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),disabled:u.value,focused:c.value,"icon-outlined":!c.value,invalid:A,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(C.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(C.$slots,"append")]),default:r.withCtx(()=>{var k;return[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((k=r.unref(l))!=null&&k.startDate?r.unref(P)(r.unref(l).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),ly,r.createElementVNode("label",dy,[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.endLabel),3),r.createVNode(de,{class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),disabled:u.value,focused:c.value,"icon-outlined":!c.value,invalid:A,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(C.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(C.$slots,"append")]),default:r.withCtx(()=>{var k;return[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((k=r.unref(l))!=null&&k.endDate?r.unref(P)(r.unref(l).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])]))]),default:r.withCtx(()=>[r.createElementVNode("div",cy,[C.showPredefinedRange||C.compareTarget?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",uy,[C.showPredefinedRange&&!C.compareTarget?(r.openBlock(),r.createElementBlock("div",fy,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C.predefinedRange,(k,B)=>(r.openBlock(),r.createBlock(xe,{key:B,label:k.label,"model-value":m.value===k.label,class:"min-w-[158px]",selectable:"",onClick:V=>F(k)},null,8,["label","model-value","onClick"]))),128))])):r.createCommentVNode("",!0),C.compareTarget?(r.openBlock(),r.createElementBlock("div",py,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(k,B)=>(r.openBlock(),r.createBlock(xe,{key:B,label:k.label,"model-value":h.value===k.id,sublabel:k.sublabel,class:"min-w-[158px]",selectable:"",onClick:V=>k.action()},null,8,["label","model-value","sublabel","onClick"]))),128))])):r.createCommentVNode("",!0)]),my],64)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass([{"pl-4":C.showPredefinedRange||C.compareTarget},"p-12 space-y-4"])},[r.createElementVNode("div",hy,[r.createElementVNode("div",gy,[r.createElementVNode("div",null,[r.createElementVNode("div",by,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:D[0]||(D[0]=()=>v("left",f.value.subtract(1,"month")))}),r.createElementVNode("div",yy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"month","onUpdate:modelValue":D[1]||(D[1]=k=>v("left",k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"year","onUpdate:modelValue":D[2]||(D[2]=k=>v("left",k))},null,8,["max","min","model-value"])])]),r.createVNode(gn,{"day-cell-class":w,days:r.unref(hn)(f.value),"on-day-click":k=>b(k.date),onCellMouseOver:x},null,8,["days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",ky,[r.createElementVNode("div",xy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"month","onUpdate:modelValue":D[3]||(D[3]=k=>v("right",k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"year","onUpdate:modelValue":D[4]||(D[4]=k=>v("right",k))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:D[5]||(D[5]=()=>v("left",f.value.add(1,"month")))})]),r.createVNode(gn,{"day-cell-class":k=>w(k),days:r.unref(hn)(p.value),"on-day-click":k=>b(k.date),onCellMouseOver:x},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",Sy,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:S}),r.createVNode(G,{disabled:M.value,label:"Apply",size:"md",variant:"primary",onClick:y},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[C.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),wy={key:0},Ay={class:"flex gap-4 items-center relative w-full"},vy={class:"flex flex-col gap-4 w-full"},By=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),Dy={class:"flex flex-col gap-4 w-full"},Vy={key:1,class:"flex flex-col gap-4 w-full"},Py=r.defineComponent({__name:"FmSimpleDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?P(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?P(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",wy,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",Ay,[r.createElementVNode("label",vy,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400 line-clamp-1",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.startDate?r.unref(P)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])]),By,r.createElementVNode("label",Dy,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.endDate?r.unref(P)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",Vy,[r.createVNode(Zt,{label:o.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),Ey={class:"p-12 space-y-4"},Fy={class:"w-max"},Ny={class:"flex space-x-24"},My={class:"flex items-center justify-between py-8"},Oy={class:"flex space-x-4"},Iy={class:"flex space-x-4"},Ry={class:"flex gap-8 items-center justify-end w-full"},Kd=r.defineComponent({__name:"FmSimpleDateRangePickerMobile",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{default:ne.PrecedingPeriod},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){var I,N;const n=C=>()=>{var B,V;const{startAt:D,endAt:A}=qd((B=s.compareTarget)==null?void 0:B.startDate,(V=s.compareTarget)==null?void 0:V.endDate);if(!D||!A)return;const k=C({startAt:D,endAt:A});return S(k.endDate.startOf("month")),k},o=r.computed(()=>[{id:ne.NoComparison,label:"No Comparison",sublabel:"",action:()=>{d.value={startDate:null,endDate:null},m.value=ne.NoComparison}},{id:ne.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"week")+1;return d.value={startDate:C.subtract(A,"week"),endDate:D.subtract(A,"week")},m.value=ne.PrecedingWeek,d.value})},{id:ne.PrecedingMonth,label:"Same period last week",sublabel:"Match day of month",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"month")+1;return d.value={startDate:C.subtract(A,"month"),endDate:D.subtract(A,"month")},m.value=ne.PrecedingMonth,d.value})},{id:ne.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"day")+1;return d.value={startDate:C.subtract(A,"day"),endDate:D.subtract(A,"day")},m.value=ne.PrecedingPeriod,d.value})},{id:ne.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"year")+1;return d.value={startDate:C.subtract(A,"year"),endDate:D.subtract(A,"year")},m.value=ne.PrecedingYear,d.value})},{id:ne.Custom,label:"Custom",sublabel:"",action:()=>{m.value=ne.Custom}}]),i=e,s=t,a=r.inject(re,null),l=J(s,"modelValue"),d=r.ref({startDate:(I=l.value)!=null&&I.startDate?P(l.value.startDate,L):null,endDate:(N=l.value)!=null&&N.endDate?P(l.value.endDate,L):null}),c=r.ref(!1),u=r.computed(()=>s.disabled??(a==null?void 0:a.getDisabled())??!1),f=r.ref(P().startOf("month")),p=r.ref(""),m=r.ref(s.defaultCompareType),h=r.ref(null),g=C=>{if(p.value="",m.value=ne.Custom,d.value.startDate&&d.value.endDate){d.value={startDate:C,endDate:null};return}else if(!d.value.startDate&&!d.value.endDate)d.value.startDate=C;else if(C.isBefore(d.value.startDate)){const D=d.value.startDate;d.value={startDate:C,endDate:D}}else d.value.endDate=C},b=()=>{var C,D;l.value={startDate:(C=d.value.startDate)==null?void 0:C.format(L),endDate:(D=d.value.endDate)==null?void 0:D.format(L)},i("select-comparison",m.value),setTimeout(()=>{c.value=!1})},y=()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null},c.value=!1},S=C=>{f.value=C},v=C=>{const D=d.value.startDate,A=d.value.endDate,k=h.value,B=D==null?void 0:D.isSame(C),V=A==null?void 0:A.isSame(C),R=k==null?void 0:k.isSame(C),O=B&&A&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isAfter(D))||D&&!A&&R&&(k==null?void 0:k.isBefore(D)),T=V&&D&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isBefore(D))||D&&!A&&R&&(k==null?void 0:k.isAfter(D)),U=B&&V||B&&!A,W=D&&(A||k)&&A?C.isAfter(D)&&C.isBefore(A):C.isAfter(k)&&C.isBefore(D)||C.isBefore(k)&&C.isAfter(D);return{status:{isStart:O??!1,isEnd:T??!1,isBetween:W??!1,isSelected:U??!1}}},w=C=>{const D=d.value;if(D.startDate&&!D.endDate){h.value=C;return}h.value=null},x=C=>{const D=P(C.startDate,L),A=P(C.endDate,L);d.value={startDate:D,endDate:A},S(A.startOf("month"))},F=C=>{const D=o.value.find(A=>A.id===C);D==null||D.action()},E=C=>{c.value=C,C||y()},M=r.computed(()=>!m.value&&!(d.value.startDate&&d.value.endDate));return r.watch(()=>l.value,()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null}}),r.watch(()=>s.compareTarget,()=>{if(!s.compareTarget||m.value===ne.Custom)return;const C=o.value.find(A=>A.id===m.value),D=C==null?void 0:C.action();D&&(l.value=D)}),(C,D)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":D[6]||(D[6]=A=>r.isRef(l)?l.value=A:null),disabled:u.value,focused:c.value,"helper-state":C.helperState,"helper-text":C.helperText,rules:C.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:A})=>[r.createVNode(mt,{disabled:u.value,"exclude-el-from-click-outside":["exclude-from-click-outside","in-calendar-app"],"show-popover":c.value,"z-index":s.zIndex,onPopoverChanged:E},{"popover-button":r.withCtx(()=>[C.$slots["trigger-button"]?r.renderSlot(C.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:c.value,invalid:A,showValidBorder:C.showValidBorder,disabled:u.value}))):(r.openBlock(),r.createBlock(Py,{key:1,disabled:u.value,"end-label":C.endLabel,focused:c.value,invalid:A,"model-value":r.unref(l),"show-valid-border":C.showValidBorder,"start-label":C.startLabel},r.createSlots({_:2},[C.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"popover-button",{focused:c.value})]),key:"0"}:void 0]),1032,["disabled","end-label","focused","invalid","model-value","show-valid-border","start-label"]))]),default:r.withCtx(()=>[r.createElementVNode("div",Ey,[C.showPredefinedRange&&!C.compareTarget?(r.openBlock(),r.createBlock(mn,{key:0,items:C.predefinedRange,"model-value":p.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":D[0]||(D[0]=k=>x(k))},null,8,["items","model-value"])):r.createCommentVNode("",!0),C.compareTarget?(r.openBlock(),r.createBlock(mn,{key:1,items:o.value.map(k=>({label:k.label,sublabel:k.sublabel,value:k.id})),"model-value":m.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":D[1]||(D[1]=k=>F(k))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createElementVNode("div",Fy,[r.createElementVNode("div",Ny,[r.createElementVNode("div",null,[r.createElementVNode("div",My,[r.createElementVNode("div",Oy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"month","onUpdate:modelValue":D[2]||(D[2]=k=>S(k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"year","onUpdate:modelValue":D[3]||(D[3]=k=>S(k))},null,8,["max","min","model-value"])]),r.createElementVNode("div",Iy,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:D[4]||(D[4]=()=>S(f.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:D[5]||(D[5]=()=>S(f.value.add(1,"month")))})])]),r.createVNode(gn,{"day-cell-class":v,days:r.unref(hn)(f.value),"on-day-click":k=>g(k.date),"cell-size":"lg",onCellMouseOver:w},null,8,["days","on-day-click"])])])]),r.createElementVNode("div",Ry,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(G,{disabled:M.value,label:"Apply",size:"md",variant:"primary",onClick:b},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[C.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ty=r.defineComponent({__name:"FmSimpleDateRangePicker",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){const n=t,{breakpoints:o}=xt(),i=J(n,"modelValue"),s=e,a=tr(n);return(l,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(o).md||r.unref(o).lg?(r.openBlock(),r.createBlock(Cy,r.mergeProps({key:0},r.unref(a),{modelValue:r.unref(i),"onUpdate:modelValue":d[0]||(d[0]=c=>r.isRef(i)?i.value=c:null),onSelectComparison:d[1]||(d[1]=c=>s("select-comparison",c))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(c=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(c)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(o).xs||r.unref(o).sm?(r.openBlock(),r.createBlock(Kd,r.mergeProps({key:1},r.unref(a),{modelValue:r.unref(i),"onUpdate:modelValue":d[2]||(d[2]=c=>r.isRef(i)?i.value=c:null),onSelectComparison:d[3]||(d[3]=c=>s("select-comparison",c))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(c=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(c)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),zy=r.defineComponent({__name:"FmForm",props:{disabled:{type:Boolean,default:!1},onValidationSuccess:{},onValidationFailed:{}},emits:["validation-reset","reset"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref([]),s=r.ref(0),a=r.ref(!1),l=n,d=async()=>{var p,m;a.value=!0;let f=[];for(let h=0;h<i.value.length;h++){const g=i.value[h];f=[...f,...g.validate()]}f.length?await((m=o.onValidationFailed)==null?void 0:m.call(o,f)):await((p=o.onValidationSuccess)==null?void 0:p.call(o)),a.value=!1},c=()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValue();l("reset")};return e({validateInputs:d,resetInputsValidation:()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValidation();l("validation-reset")},resetInputs:c,isSubmitting:a}),r.provide(js,{register({validate:f,resetValidation:p,resetValue:m}){return i.value.push({componentId:s.value,validate:f,resetValidation:p,resetValue:m}),s.value++},unregister(f){i.value.filter(p=>p.componentId!==f)}}),r.provide(re,{getDisabled:()=>o.disabled}),(f,p)=>(r.openBlock(),r.createElementBlock("form",{onSubmit:r.withModifiers(d,["prevent"]),onReset:r.withModifiers(c,["prevent"])},[r.renderSlot(f.$slots,"default")],32))}}),Ly={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|9[69])[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-578])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function Zd(t,e){var n=Array.prototype.slice.call(e);return n.push(Ly),t.apply(this,n)}function ji(t){"@babel/helpers - typeof";return ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ji(t)}function $d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Hy(t,e,n){return e&&$d(t.prototype,e),n&&$d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Uy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jy(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&no(t,e)}function Qy(t){var e=ec();return function(){var o=oo(t),i;if(e){var s=oo(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return Wy(this,i)}}function Wy(t,e){if(e&&(ji(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _d(t)}function _d(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qi(t){var e=typeof Map=="function"?new Map:void 0;return Qi=function(o){if(o===null||!Yy(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return nr(o,arguments,oo(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),no(i,o)},Qi(t)}function nr(t,e,n){return ec()?nr=Reflect.construct:nr=function(i,s,a){var l=[null];l.push.apply(l,s);var d=Function.bind.apply(i,l),c=new d;return a&&no(c,a.prototype),c},nr.apply(null,arguments)}function ec(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yy(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function no(t,e){return no=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},no(t,e)}function oo(t){return oo=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},oo(t)}var ht=function(t){jy(n,t);var e=Qy(n);function n(o){var i;return Uy(this,n),i=e.call(this,o),Object.setPrototypeOf(_d(i),n.prototype),i.name=i.constructor.name,i}return Hy(n)}(Qi(Error)),Wi=2,Xy=17,Gy=3,Xe="0-90-9٠-٩۰-۹",qy="-‐-―−ー-",Jy="//",Ky="..",Zy="  ­​⁠ ",$y="()()[]\\[\\]",_y="~⁓∼~",or="".concat(qy).concat(Jy).concat(Ky).concat(Zy).concat($y).concat(_y),Yi="++";function tc(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var s=Number(n[i]),a=Number(o[i]);if(s>a)return 1;if(a>s)return-1;if(!isNaN(s)&&isNaN(a))return 1;if(isNaN(s)&&!isNaN(a))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var e3={}.constructor;function rr(t){return t!=null&&t.constructor===e3}function Xi(t){"@babel/helpers - typeof";return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(t)}function ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nc(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function sr(t,e,n){return e&&nc(t.prototype,e),n&&nc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var t3="1.2.0",n3="1.7.35",oc=" ext. ",o3=/^\d+$/,De=function(){function t(e){ir(this,t),a3(e),this.metadata=e,sc.call(this,e)}return sr(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var o=this.countryCallingCodes()[n];if(o&&o.length===1&&o[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,o){if(n&&o3.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new rc(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new rc(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var o=this.countryCallingCodes()[n];if(o)return o.length===1&&o[0].length===3?void 0:o}},{key:"getCountryCodeForCallingCode",value:function(n){var o=this.getCountryCodesForCallingCode(n);if(o)return o[0]}},{key:"getNumberingPlanMetadata",value:function(n){var o=this.getCountryCodeForCallingCode(n);if(o)return this.getCountryMetadata(o);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var s=this.countryCallingCodes()[n];if(s&&s.length===1&&s[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),rc=function(){function t(e,n){ir(this,t),this.globalMetadataObject=n,this.metadata=e,sc.call(this,n.metadata)}return sr(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,o=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return o.map(function(i){return new r3(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&ic(this.types(),n))return new s3(ic(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?oc:this.metadata[13]||oc}}]),t}(),r3=function(){function t(e,n){ir(this,t),this._format=e,this.metadata=n}return sr(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!i3.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),i3=/^\(?\$1\)?$/,s3=function(){function t(e,n){ir(this,t),this.type=e,this.metadata=n}return sr(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();function ic(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function a3(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!rr(t)||!rr(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(rr(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+l3(t)+": "+t,"."))}var l3=function(e){return Xi(e)};function ar(t,e){if(e=new De(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function d3(t,e){return e.countries.hasOwnProperty(t)}function sc(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?tc(e,t3)===-1?this.v2=!0:tc(e,n3)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var c3=";ext=",bn=function(e){return"([".concat(Xe,"]{1,").concat(e,"})")};function ac(t){var e="20",n="15",o="9",i="6",s="[  \\t,]*",a="[:\\..]?[  \\t,-]*",l="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",p="(?:,{2}|;)",m=c3+bn(e),h=s+d+a+bn(e)+l,g=s+c+a+bn(o)+l,b=u+bn(i)+"#",y=f+p+a+bn(n)+l,S=f+"(?:,)+"+a+bn(o)+l;return m+"|"+h+"|"+g+"|"+b+"|"+y+"|"+S}var u3="["+Xe+"]{"+Wi+"}",f3="["+Yi+"]{0,1}(?:["+or+"]*["+Xe+"]){3,}["+or+Xe+"]*",p3=new RegExp("^["+Yi+"]{0,1}(?:["+or+"]*["+Xe+"]){1,2}$","i"),m3=f3+"(?:"+ac()+")?",h3=new RegExp("^"+u3+"$|^"+m3+"$","i");function g3(t){return t.length>=Wi&&h3.test(t)}function b3(t){return p3.test(t)}var lc=new RegExp("(?:"+ac()+")$","i");function y3(t){var e=t.search(lc);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(lc),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var k3={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function x3(t){return k3[t]}function S3(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=C3(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
27
+ `);for(let m=0;m<p.length;m++){const h=m===0?1:.7;c.fillStyle=Pr($t(e.textColor)??"",h),c.fillText(p[m],u,f+m*40)}}}}}]}))}return r.onMounted(()=>{l()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",W0,[r.createElementVNode("div",Y0,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",X0,r.toDisplayString(d.name),1),r.createElementVNode("div",G0,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",q0,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),K0={class:"flex flex-col h-full overflow-hidden px-24 py-16"},Z0={class:"flex flex-col gap-8"},$0={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},_0={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},e1={class:"grow"},t1=r.defineComponent({__name:"FmBar",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1},maintainAspectRatio:{type:Boolean,default:!0},hideXAxis:{type:Boolean,default:void 0},hideYAxis:{type:Boolean,default:void 0},legend:{default:void 0}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.legend,()=>e.hideXAxis,()=>e.hideYAxis],()=>{o&&(o.destroy(),a())});const i=r.computed(()=>e.transpose?"y":"x"),s=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(l=>{var u;let d,c;return typeof l.backgroundColor=="string"?d=l.backgroundColor:typeof l.backgroundColor=="object"&&(d=l.backgroundColor.map(f=>$t(f)??"")),typeof l.borderColor=="string"?c=l.borderColor:typeof l.borderColor=="object"&&(c=(u=l.borderColor)==null?void 0:u.map(f=>$t(f)??"")),{...l,backgroundColor:d,borderColor:c,borderRadius:10,borderWidth:c?1:0}})}));r.watch(s,()=>{o&&(o.data=s.value,o.update())},{deep:!0});function a(){n.value&&(o=new Ye(n.value,{type:"bar",data:s.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{a()}),(l,d)=>(r.openBlock(),r.createElementBlock("div",K0,[r.createElementVNode("div",Z0,[r.renderSlot(l.$slots,"title"),r.createElementVNode("div",$0,r.toDisplayString(l.name),1),r.createElementVNode("div",_0,r.toDisplayString(l.paragraph),1)]),r.createElementVNode("div",e1,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}});var n1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Di(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xd={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(n1,function(){var n=1e3,o=6e4,i=36e5,s="millisecond",a="second",l="minute",d="hour",c="day",u="week",f="month",p="quarter",m="year",h="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var B=["th","st","nd","rd"],V=k%100;return"["+k+(B[(V-20)%10]||B[V]||B[0])+"]"}},v=function(k,B,V){var R=String(k);return!R||R.length>=B?k:""+Array(B+1-R.length).join(V)+k},w={s:v,z:function(k){var B=-k.utcOffset(),V=Math.abs(B),R=Math.floor(V/60),O=V%60;return(B<=0?"+":"-")+v(R,2,"0")+":"+v(O,2,"0")},m:function k(B,V){if(B.date()<V.date())return-k(V,B);var R=12*(V.year()-B.year())+(V.month()-B.month()),O=B.clone().add(R,f),T=V-O<0,U=B.clone().add(R+(T?-1:1),f);return+(-(R+(V-O)/(T?O-U:U-O))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:f,y:m,w:u,d:c,D:h,h:d,m:l,s:a,ms:s,Q:p}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},x="en",F={};F[x]=S;var E="$isDayjsObject",M=function(k){return k instanceof D||!(!k||!k[E])},I=function k(B,V,R){var O;if(!B)return x;if(typeof B=="string"){var T=B.toLowerCase();F[T]&&(O=T),V&&(F[T]=V,O=T);var U=B.split("-");if(!O&&U.length>1)return k(U[0])}else{var W=B.name;F[W]=B,O=W}return!R&&O&&(x=O),O||!R&&x},N=function(k,B){if(M(k))return k.clone();var V=typeof B=="object"?B:{};return V.date=k,V.args=arguments,new D(V)},C=w;C.l=I,C.i=M,C.w=function(k,B){return N(k,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var D=function(){function k(V){this.$L=I(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[E]=!0}var B=k.prototype;return B.parse=function(V){this.$d=function(R){var O=R.date,T=R.utc;if(O===null)return new Date(NaN);if(C.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var U=O.match(b);if(U){var W=U[2]-1||0,j=(U[7]||"0").substring(0,3);return T?new Date(Date.UTC(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,j)):new Date(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,j)}}return new Date(O)}(V),this.init()},B.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},B.$utils=function(){return C},B.isValid=function(){return this.$d.toString()!==g},B.isSame=function(V,R){var O=N(V);return this.startOf(R)<=O&&O<=this.endOf(R)},B.isAfter=function(V,R){return N(V)<this.startOf(R)},B.isBefore=function(V,R){return this.endOf(R)<N(V)},B.$g=function(V,R,O){return C.u(V)?this[R]:this.set(O,V)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(V,R){var O=this,T=!!C.u(R)||R,U=C.p(V),W=function(ze,ge){var Fe=C.w(O.$u?Date.UTC(O.$y,ge,ze):new Date(O.$y,ge,ze),O);return T?Fe:Fe.endOf(c)},j=function(ze,ge){return C.w(O.toDate()[ze].apply(O.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(ge)),O)},K=this.$W,_=this.$M,te=this.$D,he="set"+(this.$u?"UTC":"");switch(U){case m:return T?W(1,0):W(31,11);case f:return T?W(1,_):W(0,_+1);case u:var Te=this.$locale().weekStart||0,qe=(K<Te?K+7:K)-Te;return W(T?te-qe:te+(6-qe),_);case c:case h:return j(he+"Hours",0);case d:return j(he+"Minutes",1);case l:return j(he+"Seconds",2);case a:return j(he+"Milliseconds",3);default:return this.clone()}},B.endOf=function(V){return this.startOf(V,!1)},B.$set=function(V,R){var O,T=C.p(V),U="set"+(this.$u?"UTC":""),W=(O={},O[c]=U+"Date",O[h]=U+"Date",O[f]=U+"Month",O[m]=U+"FullYear",O[d]=U+"Hours",O[l]=U+"Minutes",O[a]=U+"Seconds",O[s]=U+"Milliseconds",O)[T],j=T===c?this.$D+(R-this.$W):R;if(T===f||T===m){var K=this.clone().set(h,1);K.$d[W](j),K.init(),this.$d=K.set(h,Math.min(this.$D,K.daysInMonth())).$d}else W&&this.$d[W](j);return this.init(),this},B.set=function(V,R){return this.clone().$set(V,R)},B.get=function(V){return this[C.p(V)]()},B.add=function(V,R){var O,T=this;V=Number(V);var U=C.p(R),W=function(_){var te=N(T);return C.w(te.date(te.date()+Math.round(_*V)),T)};if(U===f)return this.set(f,this.$M+V);if(U===m)return this.set(m,this.$y+V);if(U===c)return W(1);if(U===u)return W(7);var j=(O={},O[l]=o,O[d]=i,O[a]=n,O)[U]||1,K=this.$d.getTime()+V*j;return C.w(K,this)},B.subtract=function(V,R){return this.add(-1*V,R)},B.format=function(V){var R=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var T=V||"YYYY-MM-DDTHH:mm:ssZ",U=C.z(this),W=this.$H,j=this.$m,K=this.$M,_=O.weekdays,te=O.months,he=O.meridiem,Te=function(ge,Fe,Le,nt){return ge&&(ge[Fe]||ge(R,T))||Le[Fe].slice(0,nt)},qe=function(ge){return C.s(W%12||12,ge,"0")},ze=he||function(ge,Fe,Le){var nt=ge<12?"AM":"PM";return Le?nt.toLowerCase():nt};return T.replace(y,function(ge,Fe){return Fe||function(Le){switch(Le){case"YY":return String(R.$y).slice(-2);case"YYYY":return C.s(R.$y,4,"0");case"M":return K+1;case"MM":return C.s(K+1,2,"0");case"MMM":return Te(O.monthsShort,K,te,3);case"MMMM":return Te(te,K);case"D":return R.$D;case"DD":return C.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return Te(O.weekdaysMin,R.$W,_,2);case"ddd":return Te(O.weekdaysShort,R.$W,_,3);case"dddd":return _[R.$W];case"H":return String(W);case"HH":return C.s(W,2,"0");case"h":return qe(1);case"hh":return qe(2);case"a":return ze(W,j,!0);case"A":return ze(W,j,!1);case"m":return String(j);case"mm":return C.s(j,2,"0");case"s":return String(R.$s);case"ss":return C.s(R.$s,2,"0");case"SSS":return C.s(R.$ms,3,"0");case"Z":return U}return null}(ge)||U.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(V,R,O){var T,U=this,W=C.p(R),j=N(V),K=(j.utcOffset()-this.utcOffset())*o,_=this-j,te=function(){return C.m(U,j)};switch(W){case m:T=te()/12;break;case f:T=te();break;case p:T=te()/3;break;case u:T=(_-K)/6048e5;break;case c:T=(_-K)/864e5;break;case d:T=_/i;break;case l:T=_/o;break;case a:T=_/n;break;default:T=_}return O?T:C.a(T)},B.daysInMonth=function(){return this.endOf(f).$D},B.$locale=function(){return F[this.$L]},B.locale=function(V,R){if(!V)return this.$L;var O=this.clone(),T=I(V,R,!0);return T&&(O.$L=T),O},B.clone=function(){return C.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},k}(),A=D.prototype;return N.prototype=A,[["$ms",s],["$s",a],["$m",l],["$H",d],["$W",c],["$M",f],["$y",m],["$D",h]].forEach(function(k){A[k[1]]=function(B){return this.$g(B,k[0],k[1])}}),N.extend=function(k,B){return k.$i||(k(B,D,N),k.$i=!0),N},N.locale=I,N.isDayjs=M,N.unix=function(k){return N(1e3*k)},N.en=F[x],N.Ls=F,N.p={},N})})(xd);var o1=xd.exports;const P=Di(o1);function ve(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>ve(t[n],e[n]))}const pe=(t,e,n)=>t&&e&&n?t.isAfter(e,"day")&&t.isBefore(n,"day"):!1,r1={class:"fm-checkbox"},i1={class:"fm-checkbox--wrapper"},s1={class:"fm-checkbox__input--container"},a1=["checked","disabled","indeterminate"],l1={key:0,class:"fm-checkbox__label-container"},d1={class:"fm-typo-en-body-lg-400"},c1={key:0,class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Sd=r.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=J(e,"indeterminate"),a=Array.isArray(i.value),l=r.ref(a?i.value.some(u=>ve(u,e.value)):i.value),d=r.computed(()=>{const u=a?i.value.some(f=>ve(f,e.value)):i.value;return s.value&&!u?"remove":i.value?"check_small":""});function c(){if(o.value)return;s.value=!1,l.value=!l.value;let u=i.value;a?u=l.value?u.concat(e.value):u.filter(f=>!ve(f,e.value)):u=l.value,i.value=u}return r.watch(()=>i.value,()=>{l.value=a?i.value.some(u=>ve(u,e.value)):i.value}),(u,f)=>(r.openBlock(),r.createElementBlock("div",r1,[r.createElementVNode("label",i1,[r.createElementVNode("div",s1,[r.createElementVNode("input",{checked:l.value,class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":l.value}),disabled:o.value,indeterminate:r.unref(s),type:"checkbox",onInput:c},null,42,a1),r.unref(s)||l.value?(r.openBlock(),r.createBlock(Q,{key:0,name:d.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]),e.label?(r.openBlock(),r.createElementBlock("div",l1,[r.renderSlot(u.$slots,"label"),r.createElementVNode("div",d1,r.toDisplayString(e.label),1),e.sublabel?(r.openBlock(),r.createElementBlock("div",c1,r.toDisplayString(e.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)])]))}}),u1={class:"w-full"},de=Z(r.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},iconOutlined:{type:Boolean,default:!1},size:{default:"sm"}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>(r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-field":!0,"fm-field--focused":i.focused,"fm-field--invalid":i.invalid,"fm-field--valid":i.showValidBorder&&!i.invalid,"fm-field--disabled":o.value,"fm-field--md":i.size==="md","fm-field--sm":i.size==="sm"})},{default:r.withCtx(()=>[r.renderSlot(i.$slots,"prepend",{},()=>[i.prependIcon?(r.openBlock(),r.createBlock(Q,{key:0,color:o.value?"disabled":"neutral-black",name:i.prependIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0),r.createElementVNode("div",u1,[r.renderSlot(i.$slots,"default",{},void 0,!0)]),r.renderSlot(i.$slots,"append",{},()=>[i.appendIcon?(r.openBlock(),r.createBlock(Q,{key:0,color:o.value?"disabled":"neutral-black",name:i.appendIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-7eff7cbf"]]),f1={class:"flex gap-4"},Cd=r.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:void 0},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=r.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),s=r.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(a,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-typo-en-body-sm-400",{"text-fm-color-typo-disabled":o.value,"text-fm-color-typo-secondary":a.state==="none"&&!o.value,"text-fm-color-typo-success":a.state==="success"&&!o.value,"text-fm-color-typo-warning":a.state==="warning"&&!o.value,"text-fm-color-typo-error":a.state==="error"&&!o.value}])},[a.errorMessages.length===0?r.renderSlot(a.$slots,"default",{key:0},()=>[r.createElementVNode("div",f1,[i.value?(r.openBlock(),r.createBlock(Q,{key:0,class:r.normalizeClass([s.value,"mt-[2px]"]),name:i.value,size:"sm"},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(a.text),1)])]):r.renderSlot(a.$slots,"default",{key:1},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.errorMessages,d=>(r.openBlock(),r.createElementBlock("div",{key:d,class:"flex gap-4 text-fm-color-typo-error"},[r.createVNode(Q,{class:"mt-[2px] text-fm-color-system-error-300",name:"error",size:"sm"}),r.createElementVNode("span",null,r.toDisplayString(d),1)]))),128))])],2))}}),Et=Math.min,Oe=Math.max,Jo=Math.round,Ko=Math.floor,Ft=t=>({x:t,y:t}),p1={left:"right",right:"left",bottom:"top",top:"bottom"},m1={start:"end",end:"start"};function Vi(t,e,n){return Oe(t,Et(e,n))}function dn(t,e){return typeof t=="function"?t(e):t}function Nt(t){return t.split("-")[0]}function cn(t){return t.split("-")[1]}function wd(t){return t==="x"?"y":"x"}function Pi(t){return t==="y"?"height":"width"}function qn(t){return["top","bottom"].includes(Nt(t))?"y":"x"}function Ei(t){return wd(qn(t))}function h1(t,e,n){n===void 0&&(n=!1);const o=cn(t),i=Ei(t),s=Pi(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Zo(a)),[a,Zo(a)]}function g1(t){const e=Zo(t);return[Fi(t),e,Fi(e)]}function Fi(t){return t.replace(/start|end/g,e=>m1[e])}function b1(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:a;default:return[]}}function y1(t,e,n,o){const i=cn(t);let s=b1(Nt(t),n==="start",o);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(Fi)))),s}function Zo(t){return t.replace(/left|right|bottom|top/g,e=>p1[e])}function k1(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ad(t){return typeof t!="number"?k1(t):{top:t,right:t,bottom:t,left:t}}function $o(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function vd(t,e,n){let{reference:o,floating:i}=t;const s=qn(e),a=Ei(e),l=Pi(a),d=Nt(e),c=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let m;switch(d){case"top":m={x:u,y:o.y-i.height};break;case"bottom":m={x:u,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-i.width,y:f};break;default:m={x:o.x,y:o.y}}switch(cn(e)){case"start":m[a]-=p*(n&&c?-1:1);break;case"end":m[a]+=p*(n&&c?-1:1);break}return m}const x1=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=vd(c,o,d),p=o,m={},h=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x:S,y:v,data:w,reset:x}=await y({x:u,y:f,initialPlacement:o,placement:p,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=S??u,f=v??f,m={...m,[b]:{...m[b],...w}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:f}=vd(c,p,d)),g=-1)}return{x:u,y:f,placement:p,strategy:i,middlewareData:m}};async function Ni(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=dn(e,t),h=Ad(m),b=l[p?f==="floating"?"reference":"floating":f],y=$o(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:d})),S=f==="floating"?{...a.floating,x:o,y:i}:a.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),w=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},x=$o(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:S,offsetParent:v,strategy:d}):S);return{top:(y.top-x.top+h.top)/w.y,bottom:(x.bottom-y.bottom+h.bottom)/w.y,left:(y.left-x.left+h.left)/w.x,right:(x.right-y.right+h.right)/w.x}}const S1=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:d}=e,{element:c,padding:u=0}=dn(t,e)||{};if(c==null)return{};const f=Ad(u),p={x:n,y:o},m=Ei(i),h=Pi(m),g=await a.getDimensions(c),b=m==="y",y=b?"top":"left",S=b?"bottom":"right",v=b?"clientHeight":"clientWidth",w=s.reference[h]+s.reference[m]-p[m]-s.floating[h],x=p[m]-s.reference[m],F=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let E=F?F[v]:0;(!E||!await(a.isElement==null?void 0:a.isElement(F)))&&(E=l.floating[v]||s.floating[h]);const M=w/2-x/2,I=E/2-g[h]/2-1,N=Et(f[y],I),C=Et(f[S],I),D=N,A=E-g[h]-C,k=E/2-g[h]/2+M,B=Vi(D,k,A),V=!d.arrow&&cn(i)!=null&&k!==B&&s.reference[h]/2-(k<D?N:C)-g[h]/2<0,R=V?k<D?k-D:k-A:0;return{[m]:p[m]+R,data:{[m]:B,centerOffset:k-B-R,...V&&{alignmentOffset:R}},reset:V}}}),C1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:d,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...b}=dn(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Nt(i),S=Nt(l)===l,v=await(d.isRTL==null?void 0:d.isRTL(c.floating)),w=p||(S||!g?[Zo(l)]:g1(l));!p&&h!=="none"&&w.push(...y1(l,g,h,v));const x=[l,...w],F=await Ni(e,b),E=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&E.push(F[y]),f){const D=h1(i,a,v);E.push(F[D[0]],F[D[1]])}if(M=[...M,{placement:i,overflows:E}],!E.every(D=>D<=0)){var I,N;const D=(((I=s.flip)==null?void 0:I.index)||0)+1,A=x[D];if(A)return{data:{index:D,overflows:M},reset:{placement:A}};let k=(N=M.filter(B=>B.overflows[0]<=0).sort((B,V)=>B.overflows[1]-V.overflows[1])[0])==null?void 0:N.placement;if(!k)switch(m){case"bestFit":{var C;const B=(C=M.map(V=>[V.placement,V.overflows.filter(R=>R>0).reduce((R,O)=>R+O,0)]).sort((V,R)=>V[1]-R[1])[0])==null?void 0:C[0];B&&(k=B);break}case"initialPlacement":k=l;break}if(i!==k)return{reset:{placement:k}}}return{}}}};async function w1(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Nt(n),l=cn(n),d=qn(n)==="y",c=["left","top"].includes(a)?-1:1,u=s&&d?-1:1,f=dn(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),d?{x:m*u,y:p*c}:{x:p*c,y:m*u}}const Jn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:a,middlewareData:l}=e,d=await w1(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:a}}}}},A1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:S}=b;return{x:y,y:S}}},...d}=dn(t,e),c={x:n,y:o},u=await Ni(e,d),f=qn(Nt(i)),p=wd(f);let m=c[p],h=c[f];if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",S=m+u[b],v=m-u[y];m=Vi(S,m,v)}if(a){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",S=h+u[b],v=h-u[y];h=Vi(S,h,v)}const g=l.fn({...e,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-o}}}}},v1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:s}=e,{apply:a=()=>{},...l}=dn(t,e),d=await Ni(e,l),c=Nt(n),u=cn(n),f=qn(n)==="y",{width:p,height:m}=o.floating;let h,g;c==="top"||c==="bottom"?(h=c,g=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=c,h=u==="end"?"top":"bottom");const b=m-d[h],y=p-d[g],S=!e.middlewareData.shift;let v=b,w=y;if(f){const F=p-d.left-d.right;w=u||S?Et(y,F):F}else{const F=m-d.top-d.bottom;v=u||S?Et(b,F):F}if(S&&!u){const F=Oe(d.left,0),E=Oe(d.right,0),M=Oe(d.top,0),I=Oe(d.bottom,0);f?w=p-2*(F!==0||E!==0?F+E:Oe(d.left,d.right)):v=m-2*(M!==0||I!==0?M+I:Oe(d.top,d.bottom))}await a({...e,availableWidth:w,availableHeight:v});const x=await i.getDimensions(s.floating);return p!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function ut(t){return Mi(t)?(t.nodeName||"").toLowerCase():"#document"}function Ie(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ft(t){var e;return(e=(Mi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Mi(t){return t instanceof Node||t instanceof Ie(t).Node}function pt(t){return t instanceof Element||t instanceof Ie(t).Element}function $e(t){return t instanceof HTMLElement||t instanceof Ie(t).HTMLElement}function Bd(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ie(t).ShadowRoot}function Kn(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Ue(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function B1(t){return["table","td","th"].includes(ut(t))}function Oi(t){const e=Ii(),n=Ue(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function D1(t){let e=un(t);for(;$e(e)&&!_o(e);){if(Oi(e))return e;e=un(e)}return null}function Ii(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _o(t){return["html","body","#document"].includes(ut(t))}function Ue(t){return Ie(t).getComputedStyle(t)}function er(t){return pt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function un(t){if(ut(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Bd(t)&&t.host||ft(t);return Bd(e)?e.host:e}function Dd(t){const e=un(t);return _o(e)?t.ownerDocument?t.ownerDocument.body:t.body:$e(e)&&Kn(e)?e:Dd(e)}function Zn(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Dd(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),a=Ie(i);return s?e.concat(a,a.visualViewport||[],Kn(i)?i:[],a.frameElement&&n?Zn(a.frameElement):[]):e.concat(i,Zn(i,[],n))}function Vd(t){const e=Ue(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=$e(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:o,l=Jo(n)!==s||Jo(o)!==a;return l&&(n=s,o=a),{width:n,height:o,$:l}}function Ri(t){return pt(t)?t:t.contextElement}function fn(t){const e=Ri(t);if(!$e(e))return Ft(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Vd(e);let a=(s?Jo(n.width):n.width)/o,l=(s?Jo(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const V1=Ft(0);function Pd(t){const e=Ie(t);return!Ii()||!e.visualViewport?V1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function P1(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ie(t)?!1:e}function Kt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Ri(t);let a=Ft(1);e&&(o?pt(o)&&(a=fn(o)):a=fn(t));const l=P1(s,n,o)?Pd(s):Ft(0);let d=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,u=i.width/a.x,f=i.height/a.y;if(s){const p=Ie(s),m=o&&pt(o)?Ie(o):o;let h=p,g=h.frameElement;for(;g&&o&&m!==h;){const b=fn(g),y=g.getBoundingClientRect(),S=Ue(g),v=y.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,w=y.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;d*=b.x,c*=b.y,u*=b.x,f*=b.y,d+=v,c+=w,h=Ie(g),g=h.frameElement}}return $o({width:u,height:f,x:d,y:c})}const E1=[":popover-open",":modal"];function Ed(t){return E1.some(e=>{try{return t.matches(e)}catch{return!1}})}function F1(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",a=ft(o),l=e?Ed(e.floating):!1;if(o===a||l&&s)return n;let d={scrollLeft:0,scrollTop:0},c=Ft(1);const u=Ft(0),f=$e(o);if((f||!f&&!s)&&((ut(o)!=="body"||Kn(a))&&(d=er(o)),$e(o))){const p=Kt(o);c=fn(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x,y:n.y*c.y-d.scrollTop*c.y+u.y}}function N1(t){return Array.from(t.getClientRects())}function Fd(t){return Kt(ft(t)).left+er(t).scrollLeft}function M1(t){const e=ft(t),n=er(t),o=t.ownerDocument.body,i=Oe(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=Oe(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Fd(t);const l=-n.scrollTop;return Ue(o).direction==="rtl"&&(a+=Oe(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}function O1(t,e){const n=Ie(t),o=ft(t),i=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,d=0;if(i){s=i.width,a=i.height;const c=Ii();(!c||c&&e==="fixed")&&(l=i.offsetLeft,d=i.offsetTop)}return{width:s,height:a,x:l,y:d}}function I1(t,e){const n=Kt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=$e(t)?fn(t):Ft(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,d=i*s.x,c=o*s.y;return{width:a,height:l,x:d,y:c}}function Nd(t,e,n){let o;if(e==="viewport")o=O1(t,n);else if(e==="document")o=M1(ft(t));else if(pt(e))o=I1(e,n);else{const i=Pd(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return $o(o)}function Md(t,e){const n=un(t);return n===e||!pt(n)||_o(n)?!1:Ue(n).position==="fixed"||Md(n,e)}function R1(t,e){const n=e.get(t);if(n)return n;let o=Zn(t,[],!1).filter(l=>pt(l)&&ut(l)!=="body"),i=null;const s=Ue(t).position==="fixed";let a=s?un(t):t;for(;pt(a)&&!_o(a);){const l=Ue(a),d=Oi(a);!d&&l.position==="fixed"&&(i=null),(s?!d&&!i:!d&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Kn(a)&&!d&&Md(t,a))?o=o.filter(u=>u!==a):i=l,a=un(a)}return e.set(t,o),o}function T1(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?R1(e,this._c):[].concat(n),o],l=a[0],d=a.reduce((c,u)=>{const f=Nd(e,u,i);return c.top=Oe(f.top,c.top),c.right=Et(f.right,c.right),c.bottom=Et(f.bottom,c.bottom),c.left=Oe(f.left,c.left),c},Nd(e,l,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function z1(t){const{width:e,height:n}=Vd(t);return{width:e,height:n}}function L1(t,e,n){const o=$e(e),i=ft(e),s=n==="fixed",a=Kt(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const d=Ft(0);if(o||!o&&!s)if((ut(e)!=="body"||Kn(i))&&(l=er(e)),o){const f=Kt(e,!0,s,e);d.x=f.x+e.clientLeft,d.y=f.y+e.clientTop}else i&&(d.x=Fd(i));const c=a.left+l.scrollLeft-d.x,u=a.top+l.scrollTop-d.y;return{x:c,y:u,width:a.width,height:a.height}}function Od(t,e){return!$e(t)||Ue(t).position==="fixed"?null:e?e(t):t.offsetParent}function Id(t,e){const n=Ie(t);if(!$e(t)||Ed(t))return n;let o=Od(t,e);for(;o&&B1(o)&&Ue(o).position==="static";)o=Od(o,e);return o&&(ut(o)==="html"||ut(o)==="body"&&Ue(o).position==="static"&&!Oi(o))?n:o||D1(t)||n}const H1=async function(t){const e=this.getOffsetParent||Id,n=this.getDimensions;return{reference:L1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function U1(t){return Ue(t).direction==="rtl"}const j1={convertOffsetParentRelativeRectToViewportRelativeRect:F1,getDocumentElement:ft,getClippingRect:T1,getOffsetParent:Id,getElementRects:H1,getClientRects:N1,getDimensions:z1,getScale:fn,isElement:pt,isRTL:U1};function Q1(t,e){let n=null,o;const i=ft(t);function s(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function a(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),s();const{left:c,top:u,width:f,height:p}=t.getBoundingClientRect();if(l||e(),!f||!p)return;const m=Ko(u),h=Ko(i.clientWidth-(c+f)),g=Ko(i.clientHeight-(u+p)),b=Ko(c),S={rootMargin:-m+"px "+-h+"px "+-g+"px "+-b+"px",threshold:Oe(0,Et(1,d))||1};let v=!0;function w(x){const F=x[0].intersectionRatio;if(F!==d){if(!v)return a();F?a(!1,F):o=setTimeout(()=>{a(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(w,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,S)}n.observe(t)}return a(!0),s}function $n(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=Ri(t),u=i||s?[...c?Zn(c):[],...Zn(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&l?Q1(c,n):null;let p=-1,m=null;a&&(m=new ResizeObserver(y=>{let[S]=y;S&&S.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(e)})),n()}),c&&!d&&m.observe(c),m.observe(e));let h,g=d?Kt(t):null;d&&b();function b(){const y=Kt(t);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(b)}return n(),()=>{var y;u.forEach(S=>{i&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),f==null||f(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(h)}}const Rd=A1,_n=C1,W1=v1,Y1=S1,X1=(t,e,n)=>{const o=new Map,i={platform:j1,...n},s={...i.platform,_c:o};return x1(t,e,{...i,platform:s})};function G1(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ti(t){if(G1(t)){const e=t.$el;return Mi(e)&&ut(e)==="#comment"?null:e}return t}function Td(t){return{name:"arrow",options:t,fn(e){const n=Ti(r.unref(t.element));return n==null?{}:Y1({element:n,padding:t.padding}).fn(e)}}}function zd(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ld(t,e){const n=zd(t);return Math.round(e*n)/n}function eo(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var E;return(E=r.unref(n.open))!=null?E:!0}),s=r.computed(()=>r.unref(n.middleware)),a=r.computed(()=>{var E;return(E=r.unref(n.placement))!=null?E:"bottom"}),l=r.computed(()=>{var E;return(E=r.unref(n.strategy))!=null?E:"absolute"}),d=r.computed(()=>{var E;return(E=r.unref(n.transform))!=null?E:!0}),c=r.computed(()=>Ti(t.value)),u=r.computed(()=>Ti(e.value)),f=r.ref(0),p=r.ref(0),m=r.ref(l.value),h=r.ref(a.value),g=r.shallowRef({}),b=r.ref(!1),y=r.computed(()=>{const E={position:m.value,left:"0",top:"0"};if(!u.value)return E;const M=Ld(u.value,f.value),I=Ld(u.value,p.value);return d.value?{...E,transform:"translate("+M+"px, "+I+"px)",...zd(u.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:M+"px",top:I+"px"}});let S;function v(){c.value==null||u.value==null||X1(c.value,u.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(E=>{f.value=E.x,p.value=E.y,m.value=E.strategy,h.value=E.placement,g.value=E.middlewareData,b.value=!0})}function w(){typeof S=="function"&&(S(),S=void 0)}function x(){if(w(),o===void 0){v();return}if(c.value!=null&&u.value!=null){S=o(c.value,u.value,v);return}}function F(){i.value||(b.value=!1)}return r.watch([s,a,l],v,{flush:"sync"}),r.watch([c,u],x,{flush:"sync"}),r.watch(i,F,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose(w),{x:r.shallowReadonly(f),y:r.shallowReadonly(p),strategy:r.shallowReadonly(m),placement:r.shallowReadonly(h),middlewareData:r.shallowReadonly(g),isPositioned:r.shallowReadonly(b),floatingStyles:y,update:v}}const Hd={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?typeof e.arg=="string"?document.querySelectorAll(`#${e.arg}`):Array.isArray(e.arg)?e.arg.map(i=>document.querySelector(`#${i}`)).flat():[]:[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},zi=r.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},placement:{default:"top"},hideArrow:{type:Boolean,default:!1},content:{default:""},disabled:{type:Boolean,default:!1},zIndex:{default:void 0},contentClass:{}},setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(null),{floatingStyles:s,middlewareData:a,placement:l}=eo(n,o,{whileElementsMounted:$n,placement:e.placement,middleware:[_n(),Jn({mainAxis:6}),Td({element:i})]}),d="ontouchstart"in window||navigator.maxTouchPoints>0,c=r.ref(!1),u=r.ref(0),f=r.ref(0),p=()=>{e.disabled||(clearTimeout(f.value),u.value=window.setTimeout(()=>{c.value=!0},250))},m=()=>{e.disabled||(clearTimeout(u.value),f.value=window.setTimeout(()=>c.value=!1,250))},h=()=>{d?c.value?m():p():m()},g=()=>{d||m()},b=()=>{d||m()},y=()=>{m()},S=()=>{clearTimeout(f.value),c.value=!0},v=r.computed(()=>{var x,F,E,M;const w={top:"bottom",right:"left",bottom:"top",left:"right"}[l.value];return{left:((x=a.value.arrow)==null?void 0:x.x)!=null?`${(F=a.value.arrow)==null?void 0:F.x}px`:"",top:((E=a.value.arrow)==null?void 0:E.y)!=null?`${(M=a.value.arrow)==null?void 0:M.y}px`:"",[w]:"-3px"}});return(w,x)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"referenceEl",ref:n,class:r.normalizeClass([[{"cursor-not-allowed pointer-events-none":w.disabled},w.contentClass],"cursor-pointer flex items-center justify-center relative"]),onPointerdown:h,onPointerleave:b,onPointermove:x[0]||(x[0]=F=>{F.pointerType!=="touch"&&p()}),onPointerup:g},[r.renderSlot(w.$slots,"default")],34),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[c.value&&!w.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:r.normalizeClass([{"bg-fm-color-neutral-black text-fm-color-typo-white fm-typo-en-body-sm-400":w.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-en-body-md-400":w.variant==="rich"},"fm-shadow-light-300 max-w-[240px] px-8 py-4 rounded-md"]),style:r.normalizeStyle([r.unref(s),{zIndex:w.zIndex}]),onMouseenter:S,onMouseleave:m},[r.renderSlot(w.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(w.content),1)]),r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:r.normalizeClass([{"bg-fm-color-neutral-black":w.variant==="plain","bg-fm-color-neutral-white":w.variant==="rich"},"absolute h-8 rotate-45 rounded-[2px] w-8"]),style:r.normalizeStyle(v.value)},null,6),[[r.vShow,!w.hideArrow]])],38)):r.createCommentVNode("",!0)]))])),[[r.unref(Hd),y]])}}),Zt=r.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:void 0},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>i.label||i.$slots.default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-en-body-lg-400 flex gap-4",o.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":i.info}])},[r.renderSlot(i.$slots,"default",{},()=>[r.createElementVNode("span",null,r.toDisplayString(i.label),1),i.required?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["fm-typo-en-body-lg-600",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):r.createCommentVNode("",!0),i.optional?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-en-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])}," (optional) ",2)):r.createCommentVNode("",!0),i.info?(r.openBlock(),r.createBlock(zi,{key:2,content:i.info,disabled:o.value,placement:"top"},{default:r.withCtx(()=>[r.createVNode(Q,{class:r.normalizeClass(["fm-typo-en-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"]),name:"info",size:"sm"},null,8,["class"])]),_:1},8,["content","disabled"])):r.createCommentVNode("",!0)])],2)):r.createCommentVNode("",!0)}}),q1={key:1,class:"flex items-center justify-between"},Se=r.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"}},setup(t){const e=t,n=r.inject(re,null),{errorMessages:o,isPristine:i}=$s(e),{focus:s,blur:a}=xn(),l=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),d=r.computed(()=>({label:e.label,disabled:l.value,required:e.required,optional:e.optional,info:e.info})),c=r.computed(()=>({text:e.helperText,disabled:l.value,state:e.helperState,errorMessages:o.value})),u=r.computed(()=>({isPristine:i,invalid:o.value.length>0}));return(f,p)=>(r.openBlock(),r.createBlock(e.tag,{class:"flex flex-col gap-4",onBlur:r.unref(a),onClick:r.unref(s)},{default:r.withCtx(()=>[f.label||f.$slots.label?(r.openBlock(),r.createBlock(Zt,r.normalizeProps(r.mergeProps({key:0},d.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"label")]),_:3},16)):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"default",r.normalizeProps(r.guardReactiveProps(u.value))),c.value.text||c.value.errorMessages.length>0||f.$slots["helper-text"]||f.$slots["helper-append"]?(r.openBlock(),r.createElementBlock("div",q1,[r.createVNode(Cd,r.normalizeProps(r.guardReactiveProps(c.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"helper-text")]),_:3},16),r.renderSlot(f.$slots,"helper-append")])):r.createCommentVNode("",!0)]),_:3},8,["onBlur","onClick"]))}}),_e=Z(r.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},width:{default:void 0},maxHeight:{default:408},inPopover:{type:Boolean,default:!1},stopClickPropagation:{type:Boolean},zIndex:{default:99},offset:{},shift:{type:Boolean,default:!1},minHeight:{}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref([]);let s;const a=r.ref(),l=r.ref(n.maxHeight),d=r.ref(!1),c=r.ref(!1),u=r.inject(Xs,null),f=r.ref(null),p=r.ref(null),{floatingStyles:m}=eo(f,p,{middleware:[W1({apply({availableHeight:M,availableWidth:I,elements:N}){if(n.shift)return;const C=M-16,D=Math.min(C,n.maxHeight);n.minHeight&&D<=n.minHeight||(l.value=D,Object.assign(N.floating.style,{maxWidth:`${I}px`,maxHeight:`${C}px`}))}}),Jn({mainAxis:n.offset??(u?8:4),crossAxis:u?-12:0}),_n({crossAxis:!1,fallbackStrategy:"initialPlacement"}),Rd()],placement:n.placement,whileElementsMounted:$n,strategy:"fixed"}),h=()=>{F.value==="hover"&&b()},g=M=>{if(n.stopClickPropagation&&(M.stopPropagation(),document.body.click()),!n.disabled){if(d.value){d.value=!1;return}F.value==="click"&&b()}},b=()=>{c.value=!0,d.value=!0,u==null||u.setChildId(s)},y=()=>{F.value==="hover"&&(c.value=!1)},S=()=>{c.value=!0},v=()=>{c.value=!1},w=()=>{n.closeOnClick&&setTimeout(()=>{d.value=!1,u==null||u.closeParent()},10)},x=r.computed(()=>({mouseInMenu:c}));r.provide(Xs,{register({injectProps:M}){return i.value=[...i.value,{injectProps:M}],i.value.length},closeParent(){u?(d.value=!1,u==null||u.closeParent()):d.value=F.value!=="click"},setChildId(M){a.value=M},mouseInChildId:a,trigger:n.trigger}),r.provide(Gs,{handleContentClick:w}),r.onMounted(()=>{window.addEventListener("click",E),u&&(s=u.register({injectProps:x}))}),r.onUnmounted(()=>{window.removeEventListener("click",E)}),r.watch(()=>u==null?void 0:u.mouseInChildId.value,M=>{M!==s&&(d.value=!1)});const F=r.computed(()=>u===null?n.trigger:"hover");r.watch(()=>d.value,()=>o("menu-changed",d.value));const E=M=>{if(!d.value)return;const I=M.path||M.composedPath();for(const N of I)if(N==f.value||N==p.value)return;d.value=!1};return(M,I)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:f,class:"fm-menu",onClick:g,onMouseenter:h,onMouseleave:y},[r.renderSlot(M.$slots,"menu-button",{},void 0,!0)],544),(r.openBlock(),r.createBlock(r.Teleport,{disabled:!!r.unref(u)||M.inPopover,to:"body"},[d.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:p,style:r.normalizeStyle({...r.unref(m),zIndex:n.zIndex}),class:"block",onMouseenter:S,onMouseleave:v},[r.renderSlot(M.$slots,"menu-wrapper",r.normalizeProps(r.guardReactiveProps({maxHeight:l.value,width:`${M.width}px`})),()=>[r.createElementVNode("div",{style:r.normalizeStyle({"max-height":`${l.value}px`,width:M.width}),class:"fm-menu__wrapper"},[r.renderSlot(M.$slots,"default",{},void 0,!0)],4)],!0)],36)):r.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-74c5c3b3"]]),J1={class:"fm-menu-item--left"},K1={key:0,class:"fm-menu-item--right"},xe=Z(r.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.ref(!1),i=r.inject(Gs,null),s=e,a=c=>{c.preventDefault(),i==null||i.handleContentClick(),!(n.disabled||!n.selectable)&&s("update:modelValue",!n.modelValue)},l=()=>{s("update:modelValue",n.modelValue)};function d(c){o.value=c}return(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm":!c.disabled&&!c.modelValue&&c.selectable}),onClick:a,onMousedown:u[1]||(u[1]=()=>d(!0)),onMouseleave:u[2]||(u[2]=()=>d(!1)),onMouseup:u[3]||(u[3]=()=>d(!1))},[r.createElementVNode("div",J1,[r.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E",name:c.icon,outline:!o.value&&!c.modelValue,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),c.hasCheckbox?(r.openBlock(),r.createBlock(Sd,{key:1,disabled:c.disabled,indeterminate:c.indeterminate,"model-value":c.modelValue,label:"",name:"something",sublabel:"",value:"",onClick:u[0]||(u[0]=f=>f.preventDefault()),"onUpdate:modelValue":l},null,8,["disabled","indeterminate","model-value"])):r.createCommentVNode("",!0)],!0),r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-md-400 max-w-[240px]",c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"])},r.toDisplayString(c.label),3),c.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-sm-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(c.sublabel),3)):r.createCommentVNode("",!0)])],!0)]),r.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(r.openBlock(),r.createElementBlock("div",K1,[r.createVNode(Q,{color:c.disabled?"#C7C7CC":"#AEAEB2",name:"chevron_right",size:"md"},null,8,["color"])])):r.createCommentVNode("",!0)],34)]))}}),[["__scopeId","data-v-b196a86b"]]),Z1={class:"fm-typo-en-body-lg-600"},$1={class:"h-[264px] overflow-y-auto w-[160px]"},_1=["onVnodeMounted"],eb=["onVnodeMounted"],pn=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.computed(()=>{const c=P(n.min).startOf("year"),u=P(n.max).startOf("year"),f=u.diff(c,"year"),p=[];for(let m=0;m<=f;m++)p.push(u.subtract(m,"year"));return p}),a=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");return c.get("year")===u.get("year")?c.startOf("month").isAfter(u)||c.get("month")===u.get("month"):c.get("year")===f.get("year")?c.startOf("month").isBefore(f)||c.get("month")===f.get("month"):!0},l=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");if(u.get("year")===c.get("year")){o("update:modelValue",u);return}if(f.get("year")===c.get("year")){o("update:modelValue",f);return}o("update:modelValue",c)};function d(c,u){if(!u)return!1;const f=c.el,p=f==null?void 0:f.parentElement;!f||!p||p.scrollTo({top:f.offsetTop-50})}return(c,u)=>(r.openBlock(),r.createBlock(_e,{trigger:"click","in-popover":"",onMenuChanged:u[0]||(u[0]=f=>i.value=f)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-8 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",Z1,[c.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(c.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(c.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(Q,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",$1,[c.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(f,p)=>c.modelValue.month(p)),f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("MMMM"),onVnodeMounted:p=>d(p,c.modelValue.format("MMMM")===f.format("MMMM"))},[r.createVNode(xe,{disabled:!a(f),"model-value":c.modelValue.format("MMMM")===f.format("MMMM"),label:f.format("MMMM"),"onUpdate:modelValue":p=>o("update:modelValue",f)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,_1))),128)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("YYYY"),onVnodeMounted:p=>d(p,c.modelValue.format("YYYY")===f.format("YYYY"))},[r.createVNode(xe,{"model-value":c.modelValue.format("YYYY")===f.format("YYYY"),label:f.format("YYYY"),"onUpdate:modelValue":p=>l(f)},null,8,["model-value","label","onUpdate:modelValue"])],8,eb))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),mt=Z(r.defineComponent({__name:"FmPopover",props:{showPopover:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},zIndex:{default:99},excludeElFromClickOutside:{default:void 0}},emits:["popover-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(o.showPopover),s=r.ref(null),a=r.ref(null),{floatingStyles:l}=eo(s,a,{middleware:[Jn(4),_n(),Rd({crossAxis:!0})],placement:o.placement,whileElementsMounted:$n,strategy:"fixed"}),d=n,c=()=>{i.value||(i.value=!0,d("popover-changed",i.value))},u=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};e({show:c,hide:u});const f=()=>{o.disabled||(i.value=!i.value,d("popover-changed",i.value))};r.watch(()=>o.showPopover,m=>i.value=m);const p=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};return(m,h)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-popover",onClick:f},[r.renderSlot(m.$slots,"popover-button",{},void 0,!0)],512),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"popoverEl",ref:a,style:r.normalizeStyle({...r.unref(l),zIndex:o.zIndex}),class:"fm-popover__content"},[r.renderSlot(m.$slots,"default",{hide:u,show:c},void 0,!0)],4)):r.createCommentVNode("",!0)]))])),[[r.unref(Hd),p,m.excludeElFromClickOutside]])}}),[["__scopeId","data-v-4e09ac31"]]),z="YYYY-MM-DD",Li=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e},Ud=(t,e)=>{const n=P().startOf("month"),o=P(t).diff(n,"month"),i=P(e).diff(n,"month"),s=[];for(let a=o-1;a<=i;a++){const l=[],d=n.add(a,"month").startOf("month"),c=d.endOf("month"),u=d.month();let f=d.startOf("week"),p=[];for(;f.isBefore(c.endOf("week"));)f.day()===0&&p.length>0&&(l.push(p),p=[]),p.push({id:d.format("MM-YYYY"),date:f,isCurrentMonth:f.month()===u}),f=f.add(1,"day");p.length>0&&l.push(p),s.push({id:d.format("YYYY-MM-DD"),matrix:l,height:64+48*(c.endOf("week").diff(d.startOf("week"),"week")+1)})}return s},to=Array.from(Array(7),(t,e)=>P().day(e).format("ddd")),tb={class:"p-12 w-[360px]"},nb={class:"w-max"},ob={class:"flex h-40 justify-between px-4 py-8"},rb={class:"flex gap-4 items-center"},ib={class:"flex gap-4 items-center justify-center"},sb={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},ab=["onClick"],lb={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},db=Z(r.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,z)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=r.ref(!1),c=r.ref(!1),u=h=>{i.value=h},f=()=>{o.value=i.value.format(z),setTimeout(()=>{s.value=!1},0)},p=()=>{i.value=o.value?P(o.value):null,s.value=!1},m=h=>{d.value=!1,c.value=!1,l.value=h};return(h,g)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":g[5]||(g[5]=b=>r.isRef(o)?o.value=b:null),disabled:a.value,focused:s.value,"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:b})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":h.zIndex,onPopoverChanged:g[4]||(g[4]=y=>s.value=y)},{"popover-button":r.withCtx(()=>[h.$slots["trigger-button"]?r.renderSlot(h.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:b,opened:s.value,showValidBorder:h.showValidBorder,disabled:a.value})),void 0,!0):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:b,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",tb,[r.createElementVNode("div",nb,[r.createElementVNode("div",ob,[r.createElementVNode("div",rb,[r.createVNode(pn,{max:h.max,min:h.min,"model-value":l.value,picker:"month","onUpdate:modelValue":g[0]||(g[0]=y=>m(y))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:h.max,min:h.min,"model-value":l.value,picker:"year","onUpdate:modelValue":g[1]||(g[1]=y=>m(y))},null,8,["max","min","model-value"])]),r.createElementVNode("div",ib,[r.createVNode(Q,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:g[2]||(g[2]=()=>m(l.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:g[3]||(g[3]=()=>m(l.value.add(1,"month")))})])]),r.createElementVNode("div",null,[r.createElementVNode("div",sb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),y=>(r.openBlock(),r.createElementBlock("div",{key:y,class:"fm-calendar__cell"},r.toDisplayString(y),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(l.value),(y,S)=>(r.openBlock(),r.createElementBlock("div",{key:S,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y,v=>(r.openBlock(),r.createElementBlock("div",{key:v.date.date(),class:"fm-calendar__cell"},[v.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":v.date.isSame(i.value)},"fm-calendar__cell__button"]),type:"button",onClick:()=>u(v.date)},r.toDisplayString(v.date.date()),11,ab)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",lb,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-6d34db79"]]),jd=t=>(r.pushScopeId("data-v-17f2ddbc"),t=t(),r.popScopeId(),t),cb={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},ub={class:"flex items-center justify-center"},fb={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},pb={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},mb=jd(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),hb={id:"wrapper",class:"h-full relative w-[336px]"},gb=["id"],bb={class:"flex gap-4 items-center"},yb={class:"fm-typo-en-body-lg-600"},kb={class:"fm-typo-en-body-lg-600"},xb=["onClick"],Sb={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},Cb=jd(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),wb={class:"flex gap-8 items-center justify-end w-full"},Qd=Z(r.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:99},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=Ud(e.min,e.max),i=J(e,"modelValue"),s=P(),a=r.ref(P(i.value,z)),l=r.ref(!1),d=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),c=r.ref(),u=g=>{a.value=g},f=()=>{i.value=a.value.format(z),setTimeout(()=>{l.value=!1},0)},p=()=>{a.value=i.value?P(i.value):null,l.value=!1},m=()=>{l.value=!0,setTimeout(()=>{c.value.scrollToItem(h(s.startOf("month")))},0)},h=g=>o.findIndex(b=>b.id===g.startOf("month").format(z));return(g,b)=>{const y=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":b[0]||(b[0]=S=>r.isRef(i)?i.value=S:null),disabled:d.value,focused:l.value,"helper-state":g.helperState,"helper-text":g.helperText,info:g.labelInfo,label:g.label,optional:g.labelMark==="optional",required:g.labelMark==="required",rules:g.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(g.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:S})=>[g.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:m},[r.renderSlot(g.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({invalid:S,opened:l.value,showValidBorder:g.showValidBorder})),void 0,!0)])):(r.openBlock(),r.createBlock(de,{key:1,disabled:d.value,focused:l.value,invalid:S,"show-valid-border":g.showValidBorder,class:"cursor-pointer","icon-outlined":"","prepend-icon":"calendar_month",onClick:m},{prepend:r.withCtx(()=>[r.renderSlot(g.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(g.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":r.unref(i)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(i)?r.unref(P)(r.unref(i)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","invalid","show-valid-border"])),l.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",{style:r.normalizeStyle({zIndex:e.zIndex}),class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},[r.createElementVNode("div",cb,[r.createVNode(de,{focused:l.value,invalid:S,"show-valid-border":g.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(g.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(g.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var v,w;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":(v=a.value)!=null&&v.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((w=a.value)!=null&&w.isValid()?r.unref(P)(a.value).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),r.createElementVNode("div",ub,[r.createElementVNode("div",fb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),v=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"fm-calendar__cell"},r.toDisplayString(v),1))),128))])])]),r.createElementVNode("div",pb,[mb,r.createElementVNode("div",hb,[r.createVNode(y,{ref_key:"scroller",ref:c,buffer:200,"item-size":null,items:r.unref(o),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:v})=>[r.createElementVNode("div",{id:v.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",bb,[r.createElementVNode("div",yb,r.toDisplayString(r.unref(P)(v.id).format("MMMM")),1),r.createElementVNode("div",kb,r.toDisplayString(r.unref(P)(v.id).format("YYYY")),1)])],8,gb),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.matrix,(w,x)=>(r.openBlock(),r.createElementBlock("div",{key:x,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w,F=>(r.openBlock(),r.createElementBlock("div",{key:F.date.date(),class:"fm-calendar__cell"},[F.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":F.date.isSame(a.value),"fm-typo-en-body-lg-600":F.date.isSame(r.unref(s),"day")},"fm-calendar__cell__button"]),type:"button",onClick:()=>u(F.date)},r.toDisplayString(F.date.date()),11,xb)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",Sb,[Cb,r.createElementVNode("div",wb,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!a.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])],4)])):r.createCommentVNode("",!0)]),"helper-text":r.withCtx(()=>[r.renderSlot(g.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"])}}}),[["__scopeId","data-v-17f2ddbc"]]),tr=t=>{const e=r.inject(re,null);return r.computed(()=>{const n=t.disabled??(e==null?void 0:e.getDisabled())??!1;return{...t,disabled:n}})},Ab=r.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=xt(),n=t,o=J(n,"modelValue"),i=tr(n);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(db,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(Qd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),Wd=r.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),vb={class:"cursor-pointer fm-switch__container"},Bb={key:0},Db={class:"fm-typo-en-body-lg-400"},Vb={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},Pb={class:"fm-switch__input--container"},Eb=["checked","disabled","value"],Fb={key:1},Nb={class:"fm-typo-en-body-lg-400"},Mb={key:0,class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Hi=Z(r.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{default:null},disabled:{type:Boolean,default:void 0},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=()=>{o.value||(i.value=!i.value)};return(a,l)=>(r.openBlock(),r.createElementBlock("label",vb,[a.labelPlacement==="left"?(r.openBlock(),r.createElementBlock("div",Bb,[r.renderSlot(a.$slots,"label",{},void 0,!0),r.createElementVNode("div",Db,r.toDisplayString(a.label),1),a.sublabel?(r.openBlock(),r.createElementBlock("div",Vb,r.toDisplayString(a.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",Pb,[r.createElementVNode("input",{checked:r.unref(i),disabled:o.value,value:a.value,class:"fm-switch__input--btn",type:"checkbox",onClick:s},null,8,Eb),r.createElementVNode("div",{class:r.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":a.showIcon})},[a.showIcon?(r.openBlock(),r.createBlock(Q,{key:0,color:o.value?"#C7C7CC":r.unref(i)?"#1C1C1E":"#FFFFFF",name:r.unref(i)?"check":"close",size:"sm"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)]),a.labelPlacement==="right"?(r.openBlock(),r.createElementBlock("div",Fb,[r.createElementVNode("div",Nb,r.toDisplayString(a.label),1),a.sublabel?(r.openBlock(),r.createElementBlock("div",Mb,r.toDisplayString(a.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-4448e953"]]);var ye=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(ye||{});const Yd=t=>(r.pushScopeId("data-v-a35b0ec8"),t=t(),r.popScopeId(),t),Ob={key:0,class:"flex gap-4 items-center relative w-full"},Ib={class:"flex flex-col gap-4 w-full"},Rb=Yd(()=>r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),Tb={class:"flex flex-col gap-4 w-full"},zb={key:1,class:"flex flex-col gap-4 w-full"},Lb={class:"flex gap-4 p-12"},Hb={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},Ub={key:0,class:"px-8"},jb={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},Qb={class:"flex flex-col gap-24"},Wb={key:0,class:"flex gap-4 items-center px-12 w-full"},Yb={class:"flex flex-col gap-4 w-full"},Xb=Yd(()=>r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),Gb={class:"flex flex-col gap-4 w-full"},qb={class:"flex gap-24"},Jb={class:"w-max"},Kb={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},Zb={class:"flex gap-4 items-center"},$b={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},_b={class:"h-[288px]"},e2={key:0,class:"fm-calendar__cell__button--today"},t2=["onClick","onMouseover"],n2={class:"w-max"},o2={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},r2={class:"flex gap-4 items-center"},i2={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},s2={key:0,class:"fm-calendar__cell__button--today"},a2=["onClick","onMouseover"],l2={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},d2=Z(r.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var C,D;const e=[{id:ye.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{u.value=ye.PrecedingPeriod;const A=a.value;if(A[0].startDate&&A[0].endDate){const k=A[0].startDate.diff(A[0].endDate,"day");A[1]={startDate:A[0].startDate.subtract(+(1-k),"day"),endDate:A[0].startDate.subtract(1,"day")}}}},{id:ye.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{u.value=ye.PrecedingWeek;const A=a.value;if(A[0].startDate&&A[0].endDate){let k=A[0].endDate.diff(A[0].startDate,"week");k===0&&(k+=1),A[1]={startDate:A[0].startDate.subtract(k,"week"),endDate:A[0].endDate.subtract(k,"week")}}}},{id:ye.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{u.value=ye.PrecedingMonth;const A=a.value;if(A[0].startDate&&A[0].endDate){let k=A[0].endDate.diff(A[0].startDate,"month");k===0&&(k+=1),A[1]={startDate:A[0].startDate.subtract(k,"month"),endDate:A[0].endDate.subtract(k,"month")}}}},{id:ye.Custom,label:"Custom",sublabel:"",action:()=>{u.value=ye.Custom}}],n=t,o=r.inject(re,null),i=P(),s=J(n,"modelValue"),a=r.ref([{startDate:(C=s.value)!=null&&C.startDate?P(s.value.startDate,z):null,endDate:(D=s.value)!=null&&D.endDate?P(s.value.endDate,z):null},{startDate:null,endDate:null}]),l=r.ref(!1),d=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),c=r.ref(!1),u=r.ref(""),f=r.ref(P().startOf("month")),p=r.ref(P().startOf("month").add(1,"month")),m=r.ref(""),h=r.ref(null);let g=0;const b=A=>{var k;if(m.value="",a.value[g].startDate&&a.value[g].endDate){g===1&&(a.value=a.value.map(()=>({startDate:null,endDate:null})),g=0),a.value[0]={startDate:A,endDate:null};return}else if(!a.value[g].startDate&&!a.value[g].endDate)a.value[g].startDate=A;else{if(A.isBefore(a.value[g].startDate)){const B=a.value[g].startDate;a.value[g]={startDate:A,endDate:B}}else a.value[g].endDate=A;c.value&&(g=1),e.find(B=>B.id===u.value)||(u.value=ye.Custom)}(k=e.find(B=>B.id===u.value))==null||k.action()},y=()=>{c.value?s.value=a.value.map(A=>({startDate:A.startDate.format(z),endDate:A.endDate.format(z)})):s.value={startDate:a.value[0].startDate.format(z),endDate:a.value[0].endDate.format(z)},setTimeout(()=>{l.value=!1})},S=()=>{var A,k;Array.isArray(s.value)?a.value=s.value:a.value[0]={startDate:(A=s.value)!=null&&A.startDate?P(s.value.startDate,z):null,endDate:(k=s.value)!=null&&k.endDate?P(s.value.endDate,z):null},l.value=!1},v=(A,k)=>{A==="left"?(f.value=k,p.value=k.add(1,"month")):A==="right"&&(p.value=k,f.value=k.subtract(1,"month"))},w=A=>{const k=a.value[0].startDate,B=a.value[0].endDate,V=a.value[1].startDate,R=a.value[1].endDate,O=h.value,T=k==null?void 0:k.isSame(A),U=B==null?void 0:B.isSame(A),W=V==null?void 0:V.isSame(A),j=R==null?void 0:R.isSame(A),K=O==null?void 0:O.isSame(A),_=T&&B&&!(T&&U)||k&&!B&&T&&(O==null?void 0:O.isAfter(k))||k&&!B&&K&&(O==null?void 0:O.isBefore(k)),te=W&&R&&!(W&&j)||V&&!R&&W&&(O==null?void 0:O.isAfter(V))||V&&!R&&K&&(O==null?void 0:O.isBefore(V)),he=U&&k&&!(T&&U)||k&&!B&&T&&(O==null?void 0:O.isBefore(k))||k&&!B&&K&&(O==null?void 0:O.isAfter(k)),Te=j&&V&&!(W&&j)||V&&!R&&W&&(O==null?void 0:O.isBefore(V))||V&&!R&&K&&(O==null?void 0:O.isAfter(V)),qe=T&&U||T&&!B,ze=W&&j||W&&!R,ge=k&&(B||O)&&B?A.isAfter(k)&&A.isBefore(B):A.isAfter(O)&&A.isBefore(k)||A.isBefore(O)&&A.isAfter(k),Fe=V&&(R||O)&&R?A.isAfter(V)&&A.isBefore(R):A.isAfter(O)&&A.isBefore(V)||A.isBefore(O)&&A.isAfter(V),Le=()=>{if(a.value.filter(Os=>{var ao;for(const vr in Os)if((ao=Os[vr])!=null&&ao.isSame(A,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(T&&U&&(pe(A,V,R)||pe(A,V,O)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(W&&j&&(pe(A,k,B)||pe(A,k,O)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(_||he)return pe(A,V,R)||pe(A,V,O)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(te||Te)return pe(A,k,B)||pe(A,k,O)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(qe)return"bg-fm-color-primary";if(ze)return"bg-fm-color-system-info-300";if(pe(A,k,B)&&(pe(A,V,R)||pe(A,V,O)))return"bg-fm-color-system-success-100";if(ge)return"bg-fm-color-system-warning-100";if(Fe)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${Le()}`]:_||te,[`fm-calendar__cell__button--selected-end ${Le()}`]:he||Te,[`fm-calendar__cell__button--selected-between ${Le()}`]:ge||Fe,[`fm-calendar__cell__button--selected ${Le()}`]:qe||ze}},x=A=>{const k=a.value;if(k[0].startDate&&!k[0].endDate||k[1].startDate&&!k[1].endDate){h.value=A;return}h.value=null},F=A=>{m.value=A.label,a.value[0]={startDate:P(A.value.startDate,z),endDate:P(A.value.endDate,z)}},E=r.computed(()=>c.value?!a.value.every(A=>A.startDate&&A.endDate):!(a.value[0].startDate&&a.value[0].endDate)),M=A=>{u.value="",c.value=A,a.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),g=0},I=r.computed(()=>{if(!s.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const A=c.value&&Array.isArray(s.value)?s.value[0].startDate:s.value.startDate,k=c.value&&Array.isArray(s.value)?s.value[0].endDate:s.value.endDate;return{startDate:A?P(A).format("D MMM YYYY"):"DD MM YYYY",endDate:k?P(k).format("D MMM YYYY"):"DD MM YYYY"}}),N=r.computed(()=>{const A=c.value&&Array.isArray(s.value)?s.value[1].startDate:null,k=c.value&&Array.isArray(s.value)?s.value[1].endDate:null;return A&&k?`Compared: ${P(A).format("D MMM YYYY")} - ${P(k).format("D MMM YYYY")}`:""});return r.watch(()=>s.value,()=>{var A,k;c.value?a.value=s.value.map(B=>({startDate:B!=null&&B.startDate?P(B.startDate,z):null,endDate:B!=null&&B.endDate?P(B.endDate,z):null})):a.value[0]={startDate:(A=s.value)!=null&&A.startDate?P(s.value.startDate,z):null,endDate:(k=s.value)!=null&&k.endDate?P(s.value.endDate,z):null}}),(A,k)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(s),"onUpdate:modelValue":k[8]||(k[8]=B=>r.isRef(s)?s.value=B:null),disabled:d.value,focused:l.value,"helper-state":A.helperState,"helper-text":c.value?N.value:A.helperText,rules:A.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:B})=>[r.createVNode(mt,{disabled:d.value,"show-popover":l.value,"z-index":n.zIndex,onPopoverChanged:k[7]||(k[7]=V=>l.value=V)},{"popover-button":r.withCtx(()=>[A.$slots["trigger-button"]?r.renderSlot(A.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:l.value,invalid:B,showValidBorder:A.showValidBorder,isComparing:c.value,disabled:d.value})),void 0,!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[A.compare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ob,[r.createElementVNode("label",Ib,[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.startLabel),3),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),disabled:d.value,focused:l.value,"icon-outlined":!l.value,invalid:B,"show-valid-border":A.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((V=r.unref(s))!=null&&V.startDate?r.unref(P)(r.unref(s).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),Rb,r.createElementVNode("label",Tb,[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.endLabel),3),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),disabled:d.value,focused:l.value,"icon-outlined":!l.value,invalid:B,"show-valid-border":A.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":I.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((V=r.unref(s))!=null&&V.endDate?r.unref(P)(r.unref(s).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),A.compare?(r.openBlock(),r.createElementBlock("label",zb,[r.createVNode(Zt,{label:A.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:B,"show-valid-border":A.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":I.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(I.value.startDate)+" - "+r.toDisplayString(I.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)],64))]),default:r.withCtx(()=>[r.createElementVNode("div",Lb,[A.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",Hb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.predefinedRange,(V,R)=>(r.openBlock(),r.createBlock(xe,{key:R,label:V.label,"model-value":m.value===V.label,selectable:"",onClick:O=>F(V)},null,8,["label","model-value","onClick"]))),128)),A.compare&&A.predefinedRange?(r.openBlock(),r.createElementBlock("div",Ub,[r.createVNode(Wd,{inset:""})])):r.createCommentVNode("",!0),A.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Hi,{"model-value":c.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":k[0]||(k[0]=V=>M(V))},null,8,["model-value"]),c.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},r.renderList(e,(V,R)=>r.createVNode(xe,{key:R,label:V.label,"model-value":u.value===V.id,sublabel:V.sublabel,selectable:"",onClick:O=>V.action()},null,8,["label","model-value","sublabel","onClick"])),64)):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),A.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",jb)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass({"pl-4":A.showPredefinedRange})},[r.createElementVNode("div",Qb,[c.value?(r.openBlock(),r.createElementBlock("div",Wb,[r.createElementVNode("label",Yb,[r.createVNode(Zt,{label:"Custom"}),r.createVNode(de,{focused:!1},{default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[(V=a.value[0])!=null&&V.startDate&&((R=a.value[0])!=null&&R.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(a.value[0].startDate!==null?a.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(a.value[0].endDate!==null?a.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Xb,r.createElementVNode("label",Gb,[r.createVNode(Zt,{label:"Compare"}),r.createVNode(de,{focused:!1},{default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[(V=a.value[1])!=null&&V.startDate&&((R=a.value[1])!=null&&R.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(a.value[1].startDate!==null?a.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(a.value[1].endDate!==null?a.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):r.createCommentVNode("",!0),r.createElementVNode("div",qb,[r.createElementVNode("div",Jb,[r.createElementVNode("div",Kb,[r.createElementVNode("div",Zb,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:k[1]||(k[1]=()=>v("left",f.value.subtract(1,"month")))}),r.createVNode(pn,{max:A.max,min:A.min,"model-value":f.value,picker:"month","onUpdate:modelValue":k[2]||(k[2]=V=>v("left",V))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:A.max,min:A.min,"model-value":f.value,picker:"year","onUpdate:modelValue":k[3]||(k[3]=V=>v("left",V))},null,8,["max","min","model-value"])])]),r.createElementVNode("div",null,[r.createElementVNode("div",$b,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))]),r.createElementVNode("div",_b,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(f.value),(V,R)=>(r.openBlock(),r.createElementBlock("div",{key:R,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V,O=>(r.openBlock(),r.createElementBlock("div",{key:O.date.date(),class:"fm-calendar__cell"},[O.date.isSame(r.unref(i),"day")&&O.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",e2)):r.createCommentVNode("",!0),O.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[w(O.date),{"fm-typo-en-body-lg-600":O.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>b(O.date),onMouseover:T=>x(O.date)},r.toDisplayString(O.date.date()),43,t2)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",n2,[r.createElementVNode("div",o2,[r.createElementVNode("div",r2,[r.createVNode(pn,{max:A.max,min:A.min,"model-value":p.value,picker:"month","onUpdate:modelValue":k[4]||(k[4]=V=>v("right",V))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:A.max,min:A.min,"model-value":p.value,picker:"year","onUpdate:modelValue":k[5]||(k[5]=V=>v("right",V))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:k[6]||(k[6]=()=>v("left",f.value.add(1,"month")))})]),r.createElementVNode("div",null,[r.createElementVNode("div",i2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(p.value),(V,R)=>(r.openBlock(),r.createElementBlock("div",{key:R,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V,O=>(r.openBlock(),r.createElementBlock("div",{key:O.date.date(),class:"fm-calendar__cell"},[O.date.isSame(r.unref(i),"day")&&O.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",s2)):r.createCommentVNode("",!0),O.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[w(O.date),{"fm-typo-en-body-lg-600":O.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>b(O.date),onMouseover:T=>x(O.date)},r.toDisplayString(O.date.date()),43,a2)):r.createCommentVNode("",!0)]))),128))]))),128))])])])])]),r.createElementVNode("div",l2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:S}),r.createVNode(G,{disabled:E.value,label:"Apply",size:"md",variant:"primary",onClick:y},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[A.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(A.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),[["__scopeId","data-v-a35b0ec8"]]),c2={class:"flex flex-col gap-4"},u2=["id"],f2={class:"flex flex-col gap-4 justify-center"},mn=Z(r.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},menuId:{},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","dropdown-changed"],setup(t,{emit:e}){const n=t,o=r.inject(re,null),i=e,s=J(n,"modelValue"),a=r.ref(!1),l=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),d=(h,g)=>{if(n.multiselect){let b=[];h?b=s.value.length===0?[g]:n.items.filter(y=>s.value.some(S=>ve(y.value,S)||ve(y.value,g.value))):b=n.items.filter(y=>s.value.some(S=>ve(y.value,S)&&!ve(y.value,g.value))),s.value=b.map(y=>y.value)}else s.value=g.value,setTimeout(()=>{a.value=!1},0)},c=h=>{const g=[...s.value].filter((b,y)=>y!==h);s.value=g},u=r.computed(()=>n.multiselect?n.items.filter(h=>r.toRaw(s.value).some(g=>ve(g,h.value))):n.items.filter(h=>ve(s.value,h.value))),f=r.computed(()=>n.items.filter(h=>s.value.some(g=>ve(h.value,g))).map(h=>({label:h.label}))),p=r.computed(()=>{var h;return n.multiselect?n.placeholder:((h=n.items.find(g=>ve(g.value,s.value)))==null?void 0:h.label)??n.placeholder}),m=r.computed(()=>n.multiselect?s.value.length!==0:n.items.some(h=>ve(h.value,s.value)));return(h,g)=>(r.openBlock(),r.createElementBlock("div",c2,[r.createVNode(Se,{modelValue:r.unref(s),"onUpdate:modelValue":g[1]||(g[1]=b=>r.isRef(s)?s.value=b:null),disabled:l.value,focused:a.value,"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules},r.createSlots({default:r.withCtx(({invalid:b})=>[r.createVNode(_e,{"close-on-click":!h.multiselect,disabled:l.value,"max-height":h.maxHeight,placement:h.placement,"show-menu":a.value,width:h.width,onMenuChanged:g[0]||(g[0]=y=>{a.value=y,i("dropdown-changed",a.value)})},{"menu-button":r.withCtx(()=>[r.createVNode(de,{class:r.normalizeClass(l.value?"cursor-not-allowed":"cursor-pointer"),focused:a.value,invalid:b,"show-valid-border":h.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.createVNode(Q,{color:l.value?"#C7C7CC":"black",name:a.value?"expand_less":"expand_more",size:"md"},null,8,["color","name"])]),default:r.withCtx(()=>[r.renderSlot(h.$slots,"default",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([[l.value?"text-fm-color-typo-disabled":m.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"break-all fm-typo-en-body-lg-400 line-clamp-1"])},r.toDisplayString(p.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":r.withCtx(({maxHeight:y,width:S})=>[r.createElementVNode("div",{id:h.menuId,style:r.normalizeStyle({"max-height":`${y}px`,width:`${S}px`}),class:"fm-select__menu__wrapper"},[r.renderSlot(h.$slots,"menu-wrapper",r.mergeProps({handleItemChange:(v,w)=>d(v,w)},{maxHeight:y,width:S}),()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.items,v=>(r.openBlock(),r.createBlock(xe,{key:v.value,"has-checkbox":h.multiselect,label:v.label,"model-value":u.value.some(w=>r.unref(ve)(w.value,v.value)),sublabel:v.sublabel,value:v.value,"onUpdate:modelValue":w=>d(w,v)},null,8,["has-checkbox","label","model-value","sublabel","value","onUpdate:modelValue"]))),128))],!0)],12,u2)]),_:2},1032,["close-on-click","disabled","max-height","placement","show-menu","width"])]),_:2},[h.label||h.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,h.helperText||h.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]),r.createElementVNode("div",f2,[h.multiselect&&u.value.length>0?(r.openBlock(),r.createBlock(Ir,{key:0,disabled:l.value,items:f.value,removable:"",onChipClosed:c},null,8,["disabled","items"])):r.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-43a21fe7"]]),p2={key:0},m2={class:"flex gap-4 items-center relative w-full"},h2={class:"flex flex-col gap-4 w-full"},g2=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),b2={class:"flex flex-col gap-4 w-full"},y2={key:1,class:"flex flex-col gap-4 w-full"},Ui=r.defineComponent({__name:"FmDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?P(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?P(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",p2,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",m2,[r.createElementVNode("label",h2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400 line-clamp-1",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.startDate?r.unref(P)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])]),g2,r.createElementVNode("label",b2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month",disabled:o.disabled,"icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.endDate?r.unref(P)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",y2,[r.createVNode(Zt,{label:o.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),Xd=t=>(r.pushScopeId("data-v-133138e9"),t=t(),r.popScopeId(),t),k2={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},x2={class:"flex items-center justify-center"},S2={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},C2={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},w2=Xd(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),A2={id:"wrapper",class:"h-full relative w-[336px]"},v2=["id"],B2={class:"flex gap-4 items-center"},D2={class:"fm-typo-en-body-lg-600"},V2={class:"fm-typo-en-body-lg-600"},P2=["onClick","onMouseover"],E2={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},F2=Xd(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),N2={class:"flex gap-8 items-center justify-end w-full"},Gd=Z(r.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:100},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var D,A;const e=r.ref(),n=[{id:ye.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{f.value=ye.PrecedingPeriod;const k=d.value;if(k[0].startDate&&k[0].endDate){const B=k[0].startDate.diff(k[0].endDate,"day");k[1]={startDate:k[0].startDate.subtract(+(1-B),"day"),endDate:k[0].startDate.subtract(1,"day")}}}},{id:ye.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{f.value=ye.PrecedingWeek;const k=d.value;if(k[0].startDate&&k[0].endDate){let B=k[0].endDate.diff(k[0].startDate,"week");B===0&&(B+=1),k[1]={startDate:k[0].startDate.subtract(B,"week"),endDate:k[0].endDate.subtract(B,"week")}}}},{id:ye.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{f.value=ye.PrecedingMonth;const k=d.value;if(k[0].startDate&&k[0].endDate){let B=k[0].endDate.diff(k[0].startDate,"month");B===0&&(B+=1),k[1]={startDate:k[0].startDate.subtract(B,"month"),endDate:k[0].endDate.subtract(B,"month")}}}},{id:ye.Custom,label:"Custom",sublabel:"",action:()=>{f.value=ye.Custom}}],o=t,i=r.inject(re,null),s=Ud(o.min,o.max),a=P(),l=J(o,"modelValue"),d=r.ref([{startDate:(D=l.value)!=null&&D.startDate?P(l.value.startDate,z):null,endDate:(A=l.value)!=null&&A.endDate?P(l.value.endDate,z):null},{startDate:null,endDate:null}]),c=r.ref(!1),u=r.ref(!1),f=r.ref(""),p=r.ref(""),m=r.ref(null);let h=0;const g=k=>{var B;if(p.value="",d.value[h].startDate&&d.value[h].endDate){h===1&&(d.value=d.value.map(()=>({startDate:null,endDate:null})),h=0),d.value[0]={startDate:k,endDate:null};return}else if(!d.value[h].startDate&&!d.value[h].endDate)d.value[h].startDate=k;else{if(k.isBefore(d.value[h].startDate)){const V=d.value[h].startDate;d.value[h]={startDate:k,endDate:V}}else d.value[h].endDate=k;u.value&&(h=1),n.find(V=>V.id===f.value)||(f.value=ye.Custom)}(B=n.find(V=>V.id===f.value))==null||B.action()},b=()=>{u.value?l.value=d.value.map(k=>({startDate:k.startDate.format(z),endDate:k.endDate.format(z)})):l.value={startDate:d.value[0].startDate.format(z),endDate:d.value[0].endDate.format(z)},setTimeout(()=>{c.value=!1})},y=()=>{var k,B;Array.isArray(l.value)?d.value=l.value:d.value[0]={startDate:(k=l.value)!=null&&k.startDate?P(l.value.startDate,z):null,endDate:(B=l.value)!=null&&B.endDate?P(l.value.endDate,z):null},c.value=!1},S=k=>{const B=d.value[0].startDate,V=d.value[0].endDate,R=d.value[1].startDate,O=d.value[1].endDate,T=m.value,U=B==null?void 0:B.isSame(k),W=V==null?void 0:V.isSame(k),j=R==null?void 0:R.isSame(k),K=O==null?void 0:O.isSame(k),_=T==null?void 0:T.isSame(k),te=U&&V&&!(U&&W)||B&&!V&&U&&(T==null?void 0:T.isAfter(B))||B&&!V&&_&&(T==null?void 0:T.isBefore(B)),he=j&&O&&!(j&&K)||R&&!O&&j&&(T==null?void 0:T.isAfter(R))||R&&!O&&_&&(T==null?void 0:T.isBefore(R)),Te=W&&B&&!(U&&W)||B&&!V&&U&&(T==null?void 0:T.isBefore(B))||B&&!V&&_&&(T==null?void 0:T.isAfter(B)),qe=K&&R&&!(j&&K)||R&&!O&&j&&(T==null?void 0:T.isBefore(R))||R&&!O&&_&&(T==null?void 0:T.isAfter(R)),ze=U&&W||U&&!V,ge=j&&K||j&&!O,Fe=B&&(V||T)&&V?k.isAfter(B)&&k.isBefore(V):k.isAfter(T)&&k.isBefore(B)||k.isBefore(T)&&k.isAfter(B),Le=R&&(O||T)&&O?k.isAfter(R)&&k.isBefore(O):k.isAfter(T)&&k.isBefore(R)||k.isBefore(T)&&k.isAfter(R),nt=()=>{if(d.value.filter(ao=>{var vr;for(const YC in ao)if((vr=ao[YC])!=null&&vr.isSame(k,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(U&&W&&(pe(k,R,O)||pe(k,R,T)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(j&&K&&(pe(k,B,V)||pe(k,B,T)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(te||Te)return pe(k,R,O)||pe(k,R,T)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(he||qe)return pe(k,B,V)||pe(k,B,T)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(ze)return"bg-fm-color-primary";if(ge)return"bg-fm-color-system-info-300";if(pe(k,B,V)&&(pe(k,R,O)||pe(k,R,T)))return"bg-fm-color-system-success-100";if(Fe)return"bg-fm-color-system-warning-100";if(Le)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${nt()}`]:te||he,[`fm-calendar__cell__button--selected-end ${nt()}`]:Te||qe,[`fm-calendar__cell__button--selected-between ${nt()}`]:Fe||Le,[`fm-calendar__cell__button--selected ${nt()}`]:ze||ge}},v=k=>{const B=d.value;if(B[0].startDate&&!B[0].endDate||B[1].startDate&&!B[1].endDate){m.value=k;return}m.value=null},w=k=>{d.value[0]={startDate:P(k.startDate,z),endDate:P(k.endDate,z)}},x=k=>{const B=n.find(V=>V.id===k);B==null||B.action()},F=r.computed(()=>u.value?!d.value.every(k=>k.startDate&&k.endDate):!(d.value[0].startDate&&d.value[0].endDate)),E=k=>{f.value="",u.value=k,d.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),h=0},M=r.computed(()=>{const k=u.value&&Array.isArray(l.value)?l.value[1].startDate:null,B=u.value&&Array.isArray(l.value)?l.value[1].endDate:null;return k&&B?`Compared: ${P(k).format("D MMM YYYY")} - ${P(B).format("D MMM YYYY")}`:""}),I=r.computed(()=>o.disabled??(i==null?void 0:i.getDisabled())??!1),N=()=>{I.value||(c.value=!0,setTimeout(()=>{e.value.scrollToItem(C(a.startOf("month")))},0))},C=k=>s.findIndex(B=>B.id===k.startOf("month").format(z));return r.watch(()=>l.value,()=>{var k,B;u.value?d.value=l.value.map(V=>({startDate:V!=null&&V.startDate?P(V.startDate,z):null,endDate:V!=null&&V.endDate?P(V.endDate,z):null})):d.value[0]={startDate:(k=l.value)!=null&&k.startDate?P(l.value.startDate,z):null,endDate:(B=l.value)!=null&&B.endDate?P(l.value.endDate,z):null}}),(k,B)=>{const V=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":B[3]||(B[3]=R=>r.isRef(l)?l.value=R:null),disabled:I.value,focused:c.value,"helper-state":k.helperState,"helper-text":u.value?M.value:k.helperText,rules:k.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:R})=>{var O,T,U,W;return[k.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:N},[r.renderSlot(k.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({opened:c.value,invalid:R,showValidBorder:k.showValidBorder,isComparing:u.value,disabled:I.value})),void 0,!0)])):(r.openBlock(),r.createBlock(Ui,{key:1,analytic:k.compare,"compare-label":k.compareLabel,disabled:I.value,"end-label":k.endLabel,focused:c.value,invalid:R,"is-comparing":u.value,"model-value":r.unref(l),"show-valid-border":k.showValidBorder,"start-label":k.startLabel,onClick:N},r.createSlots({_:2},[k.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(k.$slots,"popover-button",{focused:c.value},void 0,!0)]),key:"0"}:void 0]),1032,["analytic","compare-label","disabled","end-label","focused","invalid","is-comparing","model-value","show-valid-border","start-label"])),c.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",{style:r.normalizeStyle({zIndex:o.zIndex}),class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},[r.createElementVNode("div",k2,[k.showPredefinedRange?(r.openBlock(),r.createBlock(mn,{key:0,items:k.predefinedRange,"model-value":p.value,"onUpdate:modelValue":B[0]||(B[0]=j=>w(j))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createVNode(Ui,{analytic:k.compare,"compare-label":k.compareLabel,"end-label":k.endLabel,"is-comparing":u.value,"model-value":{startDate:((O=d.value[0].startDate)==null?void 0:O.format(r.unref(z)))??null,endDate:((T=d.value[0].endDate)==null?void 0:T.format(r.unref(z)))??null},"start-label":k.startLabel},null,8,["analytic","compare-label","end-label","is-comparing","model-value","start-label"]),k.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Hi,{"model-value":u.value,label:"Compare","label-placement":"right","onUpdate:modelValue":B[1]||(B[1]=j=>E(j))},null,8,["model-value"]),u.value&&k.compare?(r.openBlock(),r.createBlock(mn,{key:0,items:n.map(j=>({label:j.label,sublabel:j.sublabel,value:j.id})),"model-value":f.value,"onUpdate:modelValue":B[2]||(B[2]=j=>x(j))},null,8,["items","model-value"])):r.createCommentVNode("",!0),u.value&&k.compare?(r.openBlock(),r.createBlock(Ui,{key:1,analytic:k.compare,"end-label":k.endLabel,"is-comparing":u.value,"model-value":{startDate:((U=d.value[1].startDate)==null?void 0:U.format(r.unref(z)))??null,endDate:((W=d.value[1].endDate)==null?void 0:W.format(r.unref(z)))??null},"start-label":k.startLabel,"compare-label":"Compare: Custom"},null,8,["analytic","end-label","is-comparing","model-value","start-label"])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),r.createElementVNode("div",x2,[r.createElementVNode("div",S2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),j=>(r.openBlock(),r.createElementBlock("div",{key:j,class:"fm-calendar__cell"},r.toDisplayString(j),1))),128))])])]),r.createElementVNode("div",C2,[w2,r.createElementVNode("div",A2,[r.createVNode(V,{ref_key:"scroller",ref:e,buffer:200,"item-size":null,items:r.unref(s),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:j})=>[r.createElementVNode("div",{id:j.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",B2,[r.createElementVNode("div",D2,r.toDisplayString(r.unref(P)(j.id).format("MMMM")),1),r.createElementVNode("div",V2,r.toDisplayString(r.unref(P)(j.id).format("YYYY")),1)])],8,v2),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(j.matrix,(K,_)=>(r.openBlock(),r.createElementBlock("div",{key:_,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(K,te=>(r.openBlock(),r.createElementBlock("div",{key:te.date.date(),class:"fm-calendar__cell"},[te.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([[S(te.date),{"fm-typo-en-body-lg-600":te.date.isSame(r.unref(a),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>g(te.date),onMouseover:he=>v(te.date)},r.toDisplayString(te.date.date()),43,P2)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",E2,[F2,r.createElementVNode("div",N2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(G,{disabled:F.value,label:"Apply",size:"md",variant:"primary",onClick:b},null,8,["disabled"])])])],4)])):r.createCommentVNode("",!0)]}),_:2},[k.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(k.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"])}}}),[["__scopeId","data-v-133138e9"]]),M2=r.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,{breakpoints:n}=xt(),o=J(e,"modelValue"),i=tr(e);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(n).md||r.unref(n).lg?(r.openBlock(),r.createBlock(d2,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(n).xs||r.unref(n).sm?(r.openBlock(),r.createBlock(Gd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),L="YYYY-MM-DD",hn=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e.length<6&&e.push([]),e},O2=Array.from(Array(7),(t,e)=>P().day(e).format("ddd")),qd=(t,e)=>({startAt:t?P(t,L):null,endAt:e?P(e,L):null}),I2={class:"fm-typo-en-body-md-600"},R2={id:"in-calendar-app",class:"h-[264px] overflow-y-auto w-[160px]"},T2=["onVnodeMounted"],z2=["onVnodeMounted"],je=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.computed(()=>{const c=P(n.min).startOf("year"),u=P(n.max).startOf("year"),f=u.diff(c,"year"),p=[];for(let m=0;m<=f;m++)p.push(u.subtract(m,"year"));return p}),a=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");return c.get("year")===u.get("year")?c.startOf("month").isAfter(u)||c.get("month")===u.get("month"):c.get("year")===f.get("year")?c.startOf("month").isBefore(f)||c.get("month")===f.get("month"):!0},l=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");if(u.get("year")===c.get("year")){o("update:modelValue",u);return}if(f.get("year")===c.get("year")){o("update:modelValue",f);return}o("update:modelValue",c)};function d(c,u){if(!u)return!1;const f=c.el,p=f==null?void 0:f.parentElement;!f||!p||p.scrollTo({top:f.offsetTop-50})}return(c,u)=>(r.openBlock(),r.createBlock(_e,{trigger:"click",onMenuChanged:u[0]||(u[0]=f=>i.value=f)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-4 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",I2,[c.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(c.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(c.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(Q,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",R2,[c.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(f,p)=>c.modelValue.month(p)),f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("MMMM"),onVnodeMounted:p=>d(p,c.modelValue.format("MMMM")===f.format("MMMM"))},[r.createVNode(xe,{disabled:!a(f),"model-value":c.modelValue.format("MMMM")===f.format("MMMM"),label:f.format("MMMM"),"onUpdate:modelValue":p=>o("update:modelValue",f)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,T2))),128)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("YYYY"),onVnodeMounted:p=>d(p,c.modelValue.format("YYYY")===f.format("YYYY"))},[r.createVNode(xe,{"model-value":c.modelValue.format("YYYY")===f.format("YYYY"),label:f.format("YYYY"),"onUpdate:modelValue":p=>l(f)},null,8,["model-value","label","onUpdate:modelValue"])],8,z2))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),L2={class:"fm-calendar__name-row fm-typo-en-body-md-400 text-fm-color-typo-tertiary"},H2=["id"],U2={key:0,class:"fm-calendar__cell__button--today"},j2=["onClick","onMouseover"],gn=Z(r.defineComponent({__name:"FmCalendar",props:{days:{},dayCellClass:{type:[Object,Function],default:void 0},onDayClick:{},onCellMouseOver:{type:Function,default:void 0},cellSize:{default:"md"}},setup(t){const e=P(),n=(i,s)=>typeof i=="function"?i(...s):i,o=(i,s)=>{if(!s)return;const a={"fm-calendar__cell--selected":!1,"fm-calendar__cell--selected-start":!1,"fm-calendar__cell--selected-end":!1,"fm-calendar__cell--selected-between":!1};let l;if(typeof s=="function"){const{status:d,className:c}=s(i);d&&(a["fm-calendar__cell--selected"]=d.isSelected??!1,a["fm-calendar__cell--selected-start"]=d.isStart??!1,a["fm-calendar__cell--selected-end"]=d.isEnd??!1,a["fm-calendar__cell--selected-between"]=d.isBetween??!1),l=c??""}else{const{status:d,className:c}=s;d&&(a["fm-calendar__cell--selected"]=n(d.isSelected,[i])??!1,a["fm-calendar__cell--selected-start"]=n(d.isStart,[i])??!1,a["fm-calendar__cell--selected-end"]=n(d.isEnd,[i])??!1,a["fm-calendar__cell--selected-between"]=n(d.isBetween,[i])??!1),l=n(c,[i])??""}return[a,l]};return(i,s)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",L2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(O2),a=>(r.openBlock(),r.createElementBlock("div",{key:a,class:r.normalizeClass(["fm-calendar__cell",`fm-calendar__cell__${i.cellSize}`])},r.toDisplayString(a),3))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.days,(a,l)=>(r.openBlock(),r.createElementBlock("div",{key:l,class:"fm-calendar__row fm-typo-en-body-md-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a,d=>(r.openBlock(),r.createElementBlock("div",{id:`${d.date.toISOString()}`,key:d.date.date(),class:r.normalizeClass(["fm-calendar__cell",[`fm-calendar__cell__${i.cellSize}`,o(d.date,i.dayCellClass),!d.isCurrentMonth&&"fm-calendar__cell--not-current-month"]])},[d.date.isSame(r.unref(e),"day")&&d.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",U2)):r.createCommentVNode("",!0),d.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:"fm-calendar__cell__button",type:"button",onClick:c=>i.onDayClick(d),onMouseover:c=>{var u;return(u=i.onCellMouseOver)==null?void 0:u.call(i,d.date)}},r.toDisplayString(d.date.date()),41,j2)):r.createCommentVNode("",!0)],10,H2))),128))]))),128))])]))}}),[["__scopeId","data-v-c82f9b53"]]),Q2={class:"p-12 space-y-4 w-[552px]"},W2={class:"w-max"},Y2={class:"flex space-x-24"},X2={class:"flex items-center py-8 space-x-16"},G2={class:"flex space-x-4"},q2={class:"flex items-center justify-end py-8 space-x-16"},J2={class:"flex space-x-4"},K2={class:"flex gap-8 items-center justify-end w-full"},Z2=r.defineComponent({__name:"FmSimpleDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,L)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=r.ref(P().startOf("month").add(1,"month")),c=(b,y)=>{b==="left"?(l.value=y,d.value=y.add(1,"month")):b==="right"&&(d.value=y,l.value=y.subtract(1,"month"))},u=b=>{i.value=b},f=r.computed(()=>hn(l.value)),p=r.computed(()=>hn(l.value.add(1,"month"))),m=()=>{o.value=i.value.format(L),setTimeout(()=>{s.value=!1},0)},h=()=>{i.value=o.value?P(o.value):null,s.value=!1},g=b=>{s.value=b,b||h()};return(b,y)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":y[6]||(y[6]=S=>r.isRef(o)?o.value=S:null),disabled:a.value,focused:s.value,"helper-state":b.helperState,"helper-text":b.helperText,info:b.labelInfo,label:b.label,optional:b.labelMark==="optional",required:b.labelMark==="required",rules:b.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(b.$slots,"label")]),default:r.withCtx(({invalid:S})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":e.zIndex,onPopoverChanged:g},{"popover-button":r.withCtx(()=>[b.$slots["trigger-button"]?r.renderSlot(b.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:S,opened:s.value,showValidBorder:b.showValidBorder,disabled:a.value}))):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:S,"show-valid-border":b.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(b.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(b.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",Q2,[r.createElementVNode("div",W2,[r.createElementVNode("div",Y2,[r.createElementVNode("div",null,[r.createElementVNode("div",X2,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:y[0]||(y[0]=()=>c("left",l.value.subtract(1,"month")))}),r.createElementVNode("div",G2,[r.createVNode(je,{max:b.max,min:b.min,"model-value":l.value,picker:"month","onUpdate:modelValue":y[1]||(y[1]=v=>c("left",v))},null,8,["max","min","model-value"]),r.createVNode(je,{max:b.max,min:b.min,"model-value":l.value,picker:"year","onUpdate:modelValue":y[2]||(y[2]=v=>c("left",v))},null,8,["max","min","model-value"])])]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:v=>v.isSame(i.value,"date")}},days:f.value,"on-day-click":v=>u(v.date)},null,8,["day-cell-class","days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",q2,[r.createElementVNode("div",J2,[r.createVNode(je,{max:b.max,min:b.min,"model-value":d.value,picker:"month","onUpdate:modelValue":y[3]||(y[3]=v=>c("right",v))},null,8,["max","min","model-value"]),r.createVNode(je,{max:b.max,min:b.min,"model-value":d.value,picker:"year","onUpdate:modelValue":y[4]||(y[4]=v=>c("right",v))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:y[5]||(y[5]=()=>c("left",l.value.add(1,"month")))})]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:v=>v.isSame(i.value,"date")}},days:p.value,"on-day-click":v=>u(v.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",K2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:h}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:m},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(b.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),$2={class:"p-12 space-y-4 w-[276px]"},_2={class:"w-max"},ey={class:"flex space-x-24"},ty={class:"flex items-center justify-between py-8"},ny={class:"flex space-x-4"},oy={class:"flex space-x-4"},ry={class:"flex gap-8 items-center justify-end w-full"},Jd=r.defineComponent({__name:"FmSimpleDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,L)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=h=>{l.value=h},c=h=>{i.value=h},u=r.computed(()=>hn(l.value)),f=()=>{o.value=i.value.format(L),setTimeout(()=>{s.value=!1},0)},p=()=>{i.value=o.value?P(o.value):null,s.value=!1},m=h=>{s.value=h,h||p()};return(h,g)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":g[4]||(g[4]=b=>r.isRef(o)?o.value=b:null),disabled:a.value,focused:s.value,"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label")]),default:r.withCtx(({invalid:b})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":e.zIndex,onPopoverChanged:m},{"popover-button":r.withCtx(()=>[h.$slots["trigger-button"]?r.renderSlot(h.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:b,opened:s.value,showValidBorder:h.showValidBorder,disabled:a.value}))):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:b,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",$2,[r.createElementVNode("div",_2,[r.createElementVNode("div",ey,[r.createElementVNode("div",null,[r.createElementVNode("div",ty,[r.createElementVNode("div",ny,[r.createVNode(je,{max:h.max,min:h.min,"model-value":l.value,picker:"month","onUpdate:modelValue":g[0]||(g[0]=y=>d(y))},null,8,["max","min","model-value"]),r.createVNode(je,{max:h.max,min:h.min,"model-value":l.value,picker:"year","onUpdate:modelValue":g[1]||(g[1]=y=>d(y))},null,8,["max","min","model-value"])]),r.createElementVNode("div",oy,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:g[2]||(g[2]=()=>d(l.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:g[3]||(g[3]=()=>d(l.value.add(1,"month")))})])]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:y=>y.isSame(i.value,"date")}},days:u.value,"on-day-click":y=>c(y.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",ry,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),iy=r.defineComponent({__name:"FmSimpleDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=xt(),n=t,o=J(n,"modelValue"),i=tr(n);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(Z2,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(Jd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}});var ne=(t=>(t.NoComparison="no_comparison",t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.PrecedingYear="preceding_year",t.Custom="custom",t))(ne||{});const sy={key:1,class:"flex gap-4 items-center relative w-full"},ay={class:"flex flex-col gap-4 w-full"},ly=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),dy={class:"flex flex-col gap-4 w-full"},cy={class:"flex h-[360px]"},uy={class:"flex flex-col items-start p-12 pr-4"},fy={key:0},py={key:1},my=r.createElementVNode("div",{class:"bg-fm-color-neutral-gray-100 h-full mx-4 w-px"},null,-1),hy={class:"w-max"},gy={class:"flex space-x-24"},by={class:"flex items-center py-8 space-x-16"},yy={class:"flex space-x-4"},ky={class:"flex items-center justify-end py-8 space-x-16"},xy={class:"flex space-x-4"},Sy={class:"flex gap-8 items-center justify-end w-full"},Cy=r.defineComponent({__name:"FmSimpleDateRangePickerDesktop",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{default:ne.PrecedingPeriod},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){var I,N;const n=C=>()=>{var B,V;const{startAt:D,endAt:A}=qd((B=s.compareTarget)==null?void 0:B.startDate,(V=s.compareTarget)==null?void 0:V.endDate);if(!D||!A)return;const k=C({startAt:D,endAt:A});return v("right",k.endDate.startOf("month")),k},o=r.computed(()=>[{id:ne.NoComparison,label:"No Comparison",sublabel:"",action:()=>{d.value={startDate:null,endDate:null},h.value=ne.NoComparison}},{id:ne.PrecedingWeek,label:"Same period last week",sublabel:"Match day of week",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"week")+1;return d.value={startDate:C.subtract(A,"week"),endDate:D.subtract(A,"week")},h.value=ne.PrecedingWeek,d.value})},{id:ne.PrecedingMonth,label:"Same period last month",sublabel:"Match day of month",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"month")+1;return d.value={startDate:C.subtract(A,"month"),endDate:D.subtract(A,"month")},h.value=ne.PrecedingMonth,d.value})},{id:ne.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"day")+1;return d.value={startDate:C.subtract(A,"day"),endDate:D.subtract(A,"day")},h.value=ne.PrecedingPeriod,d.value})},{id:ne.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"year")+1;return d.value={startDate:C.subtract(A,"year"),endDate:D.subtract(A,"year")},h.value=ne.PrecedingYear,d.value})},{id:ne.Custom,label:"Custom",sublabel:"",action:()=>{h.value=ne.Custom}}]),i=e,s=t,a=r.inject(re,null),l=J(s,"modelValue"),d=r.ref({startDate:(I=l.value)!=null&&I.startDate?P(l.value.startDate,L):null,endDate:(N=l.value)!=null&&N.endDate?P(l.value.endDate,L):null}),c=r.ref(!1),u=r.computed(()=>s.disabled??(a==null?void 0:a.getDisabled())??!1),f=r.ref(P().startOf("month")),p=r.ref(P().startOf("month").add(1,"month")),m=r.ref(""),h=r.ref(s.defaultCompareType),g=r.ref(null),b=C=>{if(m.value="",h.value=ne.Custom,d.value.startDate&&d.value.endDate){d.value={startDate:C,endDate:null};return}else if(!d.value.startDate&&!d.value.endDate)d.value.startDate=C;else if(C.isBefore(d.value.startDate)){const D=d.value.startDate;d.value={startDate:C,endDate:D}}else d.value.endDate=C},y=()=>{var C,D;l.value={startDate:(C=d.value.startDate)==null?void 0:C.format(L),endDate:(D=d.value.endDate)==null?void 0:D.format(L)},i("select-comparison",h.value),setTimeout(()=>{c.value=!1})},S=()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null},c.value=!1},v=(C,D)=>{C==="left"?(f.value=D,p.value=D.add(1,"month")):C==="right"&&(p.value=D,f.value=D.subtract(1,"month"))},w=C=>{const D=d.value.startDate,A=d.value.endDate,k=g.value,B=D==null?void 0:D.isSame(C),V=A==null?void 0:A.isSame(C),R=k==null?void 0:k.isSame(C),O=B&&A&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isAfter(D))||D&&!A&&R&&(k==null?void 0:k.isBefore(D)),T=V&&D&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isBefore(D))||D&&!A&&R&&(k==null?void 0:k.isAfter(D)),U=B&&V||B&&!A,W=D&&(A||k)&&A?C.isAfter(D)&&C.isBefore(A):C.isAfter(k)&&C.isBefore(D)||C.isBefore(k)&&C.isAfter(D);return{status:{isStart:O??!1,isEnd:T??!1,isBetween:W??!1,isSelected:U??!1}}},x=C=>{const D=d.value;if(D.startDate&&!D.endDate){g.value=C;return}g.value=null},F=C=>{m.value=C.label;const D=P(C.value.startDate,L),A=P(C.value.endDate,L);d.value={startDate:D,endDate:A},v("right",A.startOf("month"))},E=C=>{c.value=C,C||S()},M=r.computed(()=>!h.value&&!(d.value.startDate&&d.value.endDate));return r.watch(()=>l.value,()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null}}),r.watch(()=>s.compareTarget,()=>{if(!s.compareTarget||h.value===ne.Custom)return;const C=o.value.find(A=>A.id===h.value),D=C==null?void 0:C.action();D&&(l.value=D)}),(C,D)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":D[6]||(D[6]=A=>r.isRef(l)?l.value=A:null),disabled:u.value,focused:c.value,"helper-state":C.helperState,"helper-text":C.helperText,rules:C.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:A})=>[r.createVNode(mt,{disabled:u.value,"exclude-el-from-click-outside":["in-calendar-app"],"show-popover":c.value,"z-index":s.zIndex,onPopoverChanged:E},{"popover-button":r.withCtx(()=>[C.$slots["trigger-button"]?r.renderSlot(C.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:c.value,invalid:A,showValidBorder:C.showValidBorder,disabled:u.value}))):(r.openBlock(),r.createElementBlock("div",sy,[r.createElementVNode("label",ay,[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.startLabel),3),r.createVNode(de,{class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),disabled:u.value,focused:c.value,"icon-outlined":!c.value,invalid:A,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(C.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(C.$slots,"append")]),default:r.withCtx(()=>{var k;return[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((k=r.unref(l))!=null&&k.startDate?r.unref(P)(r.unref(l).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),ly,r.createElementVNode("label",dy,[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.endLabel),3),r.createVNode(de,{class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),disabled:u.value,focused:c.value,"icon-outlined":!c.value,invalid:A,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(C.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(C.$slots,"append")]),default:r.withCtx(()=>{var k;return[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((k=r.unref(l))!=null&&k.endDate?r.unref(P)(r.unref(l).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])]))]),default:r.withCtx(()=>[r.createElementVNode("div",cy,[C.showPredefinedRange||C.compareTarget?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",uy,[C.showPredefinedRange&&!C.compareTarget?(r.openBlock(),r.createElementBlock("div",fy,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C.predefinedRange,(k,B)=>(r.openBlock(),r.createBlock(xe,{key:B,label:k.label,"model-value":m.value===k.label,class:"min-w-[158px]",selectable:"",onClick:V=>F(k)},null,8,["label","model-value","onClick"]))),128))])):r.createCommentVNode("",!0),C.compareTarget?(r.openBlock(),r.createElementBlock("div",py,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(k,B)=>(r.openBlock(),r.createBlock(xe,{key:B,label:k.label,"model-value":h.value===k.id,sublabel:k.sublabel,class:"min-w-[158px]",selectable:"",onClick:V=>k.action()},null,8,["label","model-value","sublabel","onClick"]))),128))])):r.createCommentVNode("",!0)]),my],64)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass([{"pl-4":C.showPredefinedRange||C.compareTarget},"p-12 space-y-4"])},[r.createElementVNode("div",hy,[r.createElementVNode("div",gy,[r.createElementVNode("div",null,[r.createElementVNode("div",by,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:D[0]||(D[0]=()=>v("left",f.value.subtract(1,"month")))}),r.createElementVNode("div",yy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"month","onUpdate:modelValue":D[1]||(D[1]=k=>v("left",k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"year","onUpdate:modelValue":D[2]||(D[2]=k=>v("left",k))},null,8,["max","min","model-value"])])]),r.createVNode(gn,{"day-cell-class":w,days:r.unref(hn)(f.value),"on-day-click":k=>b(k.date),onCellMouseOver:x},null,8,["days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",ky,[r.createElementVNode("div",xy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"month","onUpdate:modelValue":D[3]||(D[3]=k=>v("right",k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"year","onUpdate:modelValue":D[4]||(D[4]=k=>v("right",k))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:D[5]||(D[5]=()=>v("left",f.value.add(1,"month")))})]),r.createVNode(gn,{"day-cell-class":k=>w(k),days:r.unref(hn)(p.value),"on-day-click":k=>b(k.date),onCellMouseOver:x},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",Sy,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:S}),r.createVNode(G,{disabled:M.value,label:"Apply",size:"md",variant:"primary",onClick:y},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[C.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),wy={key:0},Ay={class:"flex gap-4 items-center relative w-full"},vy={class:"flex flex-col gap-4 w-full"},By=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),Dy={class:"flex flex-col gap-4 w-full"},Vy={key:1,class:"flex flex-col gap-4 w-full"},Py=r.defineComponent({__name:"FmSimpleDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?P(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?P(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",wy,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",Ay,[r.createElementVNode("label",vy,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400 line-clamp-1",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.startDate?r.unref(P)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])]),By,r.createElementVNode("label",Dy,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.endDate?r.unref(P)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",Vy,[r.createVNode(Zt,{label:o.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),Ey={class:"p-12 space-y-4"},Fy={class:"w-max"},Ny={class:"flex space-x-24"},My={class:"flex items-center justify-between py-8"},Oy={class:"flex space-x-4"},Iy={class:"flex space-x-4"},Ry={class:"flex gap-8 items-center justify-end w-full"},Kd=r.defineComponent({__name:"FmSimpleDateRangePickerMobile",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{default:ne.PrecedingPeriod},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){var I,N;const n=C=>()=>{var B,V;const{startAt:D,endAt:A}=qd((B=s.compareTarget)==null?void 0:B.startDate,(V=s.compareTarget)==null?void 0:V.endDate);if(!D||!A)return;const k=C({startAt:D,endAt:A});return S(k.endDate.startOf("month")),k},o=r.computed(()=>[{id:ne.NoComparison,label:"No Comparison",sublabel:"",action:()=>{d.value={startDate:null,endDate:null},m.value=ne.NoComparison}},{id:ne.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"week")+1;return d.value={startDate:C.subtract(A,"week"),endDate:D.subtract(A,"week")},m.value=ne.PrecedingWeek,d.value})},{id:ne.PrecedingMonth,label:"Same period last week",sublabel:"Match day of month",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"month")+1;return d.value={startDate:C.subtract(A,"month"),endDate:D.subtract(A,"month")},m.value=ne.PrecedingMonth,d.value})},{id:ne.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"day")+1;return d.value={startDate:C.subtract(A,"day"),endDate:D.subtract(A,"day")},m.value=ne.PrecedingPeriod,d.value})},{id:ne.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"year")+1;return d.value={startDate:C.subtract(A,"year"),endDate:D.subtract(A,"year")},m.value=ne.PrecedingYear,d.value})},{id:ne.Custom,label:"Custom",sublabel:"",action:()=>{m.value=ne.Custom}}]),i=e,s=t,a=r.inject(re,null),l=J(s,"modelValue"),d=r.ref({startDate:(I=l.value)!=null&&I.startDate?P(l.value.startDate,L):null,endDate:(N=l.value)!=null&&N.endDate?P(l.value.endDate,L):null}),c=r.ref(!1),u=r.computed(()=>s.disabled??(a==null?void 0:a.getDisabled())??!1),f=r.ref(P().startOf("month")),p=r.ref(""),m=r.ref(s.defaultCompareType),h=r.ref(null),g=C=>{if(p.value="",m.value=ne.Custom,d.value.startDate&&d.value.endDate){d.value={startDate:C,endDate:null};return}else if(!d.value.startDate&&!d.value.endDate)d.value.startDate=C;else if(C.isBefore(d.value.startDate)){const D=d.value.startDate;d.value={startDate:C,endDate:D}}else d.value.endDate=C},b=()=>{var C,D;l.value={startDate:(C=d.value.startDate)==null?void 0:C.format(L),endDate:(D=d.value.endDate)==null?void 0:D.format(L)},i("select-comparison",m.value),setTimeout(()=>{c.value=!1})},y=()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null},c.value=!1},S=C=>{f.value=C},v=C=>{const D=d.value.startDate,A=d.value.endDate,k=h.value,B=D==null?void 0:D.isSame(C),V=A==null?void 0:A.isSame(C),R=k==null?void 0:k.isSame(C),O=B&&A&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isAfter(D))||D&&!A&&R&&(k==null?void 0:k.isBefore(D)),T=V&&D&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isBefore(D))||D&&!A&&R&&(k==null?void 0:k.isAfter(D)),U=B&&V||B&&!A,W=D&&(A||k)&&A?C.isAfter(D)&&C.isBefore(A):C.isAfter(k)&&C.isBefore(D)||C.isBefore(k)&&C.isAfter(D);return{status:{isStart:O??!1,isEnd:T??!1,isBetween:W??!1,isSelected:U??!1}}},w=C=>{const D=d.value;if(D.startDate&&!D.endDate){h.value=C;return}h.value=null},x=C=>{const D=P(C.startDate,L),A=P(C.endDate,L);d.value={startDate:D,endDate:A},S(A.startOf("month"))},F=C=>{const D=o.value.find(A=>A.id===C);D==null||D.action()},E=C=>{c.value=C,C||y()},M=r.computed(()=>!m.value&&!(d.value.startDate&&d.value.endDate));return r.watch(()=>l.value,()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null}}),r.watch(()=>s.compareTarget,()=>{if(!s.compareTarget||m.value===ne.Custom)return;const C=o.value.find(A=>A.id===m.value),D=C==null?void 0:C.action();D&&(l.value=D)}),(C,D)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":D[6]||(D[6]=A=>r.isRef(l)?l.value=A:null),disabled:u.value,focused:c.value,"helper-state":C.helperState,"helper-text":C.helperText,rules:C.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:A})=>[r.createVNode(mt,{disabled:u.value,"exclude-el-from-click-outside":["exclude-from-click-outside","in-calendar-app"],"show-popover":c.value,"z-index":s.zIndex,onPopoverChanged:E},{"popover-button":r.withCtx(()=>[C.$slots["trigger-button"]?r.renderSlot(C.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:c.value,invalid:A,showValidBorder:C.showValidBorder,disabled:u.value}))):(r.openBlock(),r.createBlock(Py,{key:1,disabled:u.value,"end-label":C.endLabel,focused:c.value,invalid:A,"model-value":r.unref(l),"show-valid-border":C.showValidBorder,"start-label":C.startLabel},r.createSlots({_:2},[C.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"popover-button",{focused:c.value})]),key:"0"}:void 0]),1032,["disabled","end-label","focused","invalid","model-value","show-valid-border","start-label"]))]),default:r.withCtx(()=>[r.createElementVNode("div",Ey,[C.showPredefinedRange&&!C.compareTarget?(r.openBlock(),r.createBlock(mn,{key:0,items:C.predefinedRange,"model-value":p.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":D[0]||(D[0]=k=>x(k))},null,8,["items","model-value"])):r.createCommentVNode("",!0),C.compareTarget?(r.openBlock(),r.createBlock(mn,{key:1,items:o.value.map(k=>({label:k.label,sublabel:k.sublabel,value:k.id})),"model-value":m.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":D[1]||(D[1]=k=>F(k))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createElementVNode("div",Fy,[r.createElementVNode("div",Ny,[r.createElementVNode("div",null,[r.createElementVNode("div",My,[r.createElementVNode("div",Oy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"month","onUpdate:modelValue":D[2]||(D[2]=k=>S(k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"year","onUpdate:modelValue":D[3]||(D[3]=k=>S(k))},null,8,["max","min","model-value"])]),r.createElementVNode("div",Iy,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:D[4]||(D[4]=()=>S(f.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:D[5]||(D[5]=()=>S(f.value.add(1,"month")))})])]),r.createVNode(gn,{"day-cell-class":v,days:r.unref(hn)(f.value),"on-day-click":k=>g(k.date),"cell-size":"lg",onCellMouseOver:w},null,8,["days","on-day-click"])])])]),r.createElementVNode("div",Ry,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(G,{disabled:M.value,label:"Apply",size:"md",variant:"primary",onClick:b},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[C.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ty=r.defineComponent({__name:"FmSimpleDateRangePicker",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){const n=t,{breakpoints:o}=xt(),i=J(n,"modelValue"),s=e,a=tr(n);return(l,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(o).md||r.unref(o).lg?(r.openBlock(),r.createBlock(Cy,r.mergeProps({key:0},r.unref(a),{modelValue:r.unref(i),"onUpdate:modelValue":d[0]||(d[0]=c=>r.isRef(i)?i.value=c:null),onSelectComparison:d[1]||(d[1]=c=>s("select-comparison",c))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(c=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(c)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(o).xs||r.unref(o).sm?(r.openBlock(),r.createBlock(Kd,r.mergeProps({key:1},r.unref(a),{modelValue:r.unref(i),"onUpdate:modelValue":d[2]||(d[2]=c=>r.isRef(i)?i.value=c:null),onSelectComparison:d[3]||(d[3]=c=>s("select-comparison",c))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(c=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(c)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),zy=r.defineComponent({__name:"FmForm",props:{disabled:{type:Boolean,default:!1},onValidationSuccess:{},onValidationFailed:{}},emits:["validation-reset","reset"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref([]),s=r.ref(0),a=r.ref(!1),l=n,d=async()=>{var p,m;a.value=!0;let f=[];for(let h=0;h<i.value.length;h++){const g=i.value[h];f=[...f,...g.validate()]}f.length?await((m=o.onValidationFailed)==null?void 0:m.call(o,f)):await((p=o.onValidationSuccess)==null?void 0:p.call(o)),a.value=!1},c=()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValue();l("reset")};return e({validateInputs:d,resetInputsValidation:()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValidation();l("validation-reset")},resetInputs:c,isSubmitting:a}),r.provide(js,{register({validate:f,resetValidation:p,resetValue:m}){return i.value.push({componentId:s.value,validate:f,resetValidation:p,resetValue:m}),s.value++},unregister(f){i.value.filter(p=>p.componentId!==f)}}),r.provide(re,{getDisabled:()=>o.disabled}),(f,p)=>(r.openBlock(),r.createElementBlock("form",{onSubmit:r.withModifiers(d,["prevent"]),onReset:r.withModifiers(c,["prevent"])},[r.renderSlot(f.$slots,"default")],32))}}),Ly={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|9[69])[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-578])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function Zd(t,e){var n=Array.prototype.slice.call(e);return n.push(Ly),t.apply(this,n)}function ji(t){"@babel/helpers - typeof";return ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ji(t)}function $d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Hy(t,e,n){return e&&$d(t.prototype,e),n&&$d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Uy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jy(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&no(t,e)}function Qy(t){var e=ec();return function(){var o=oo(t),i;if(e){var s=oo(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return Wy(this,i)}}function Wy(t,e){if(e&&(ji(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _d(t)}function _d(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qi(t){var e=typeof Map=="function"?new Map:void 0;return Qi=function(o){if(o===null||!Yy(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return nr(o,arguments,oo(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),no(i,o)},Qi(t)}function nr(t,e,n){return ec()?nr=Reflect.construct:nr=function(i,s,a){var l=[null];l.push.apply(l,s);var d=Function.bind.apply(i,l),c=new d;return a&&no(c,a.prototype),c},nr.apply(null,arguments)}function ec(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yy(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function no(t,e){return no=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},no(t,e)}function oo(t){return oo=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},oo(t)}var ht=function(t){jy(n,t);var e=Qy(n);function n(o){var i;return Uy(this,n),i=e.call(this,o),Object.setPrototypeOf(_d(i),n.prototype),i.name=i.constructor.name,i}return Hy(n)}(Qi(Error)),Wi=2,Xy=17,Gy=3,Xe="0-90-9٠-٩۰-۹",qy="-‐-―−ー-",Jy="//",Ky="..",Zy="  ­​⁠ ",$y="()()[]\\[\\]",_y="~⁓∼~",or="".concat(qy).concat(Jy).concat(Ky).concat(Zy).concat($y).concat(_y),Yi="++";function tc(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var s=Number(n[i]),a=Number(o[i]);if(s>a)return 1;if(a>s)return-1;if(!isNaN(s)&&isNaN(a))return 1;if(isNaN(s)&&!isNaN(a))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var e3={}.constructor;function rr(t){return t!=null&&t.constructor===e3}function Xi(t){"@babel/helpers - typeof";return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(t)}function ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nc(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function sr(t,e,n){return e&&nc(t.prototype,e),n&&nc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var t3="1.2.0",n3="1.7.35",oc=" ext. ",o3=/^\d+$/,De=function(){function t(e){ir(this,t),a3(e),this.metadata=e,sc.call(this,e)}return sr(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var o=this.countryCallingCodes()[n];if(o&&o.length===1&&o[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,o){if(n&&o3.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new rc(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new rc(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var o=this.countryCallingCodes()[n];if(o)return o.length===1&&o[0].length===3?void 0:o}},{key:"getCountryCodeForCallingCode",value:function(n){var o=this.getCountryCodesForCallingCode(n);if(o)return o[0]}},{key:"getNumberingPlanMetadata",value:function(n){var o=this.getCountryCodeForCallingCode(n);if(o)return this.getCountryMetadata(o);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var s=this.countryCallingCodes()[n];if(s&&s.length===1&&s[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),rc=function(){function t(e,n){ir(this,t),this.globalMetadataObject=n,this.metadata=e,sc.call(this,n.metadata)}return sr(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,o=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return o.map(function(i){return new r3(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&ic(this.types(),n))return new s3(ic(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?oc:this.metadata[13]||oc}}]),t}(),r3=function(){function t(e,n){ir(this,t),this._format=e,this.metadata=n}return sr(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!i3.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),i3=/^\(?\$1\)?$/,s3=function(){function t(e,n){ir(this,t),this.type=e,this.metadata=n}return sr(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();function ic(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function a3(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!rr(t)||!rr(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(rr(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+l3(t)+": "+t,"."))}var l3=function(e){return Xi(e)};function ar(t,e){if(e=new De(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function d3(t,e){return e.countries.hasOwnProperty(t)}function sc(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?tc(e,t3)===-1?this.v2=!0:tc(e,n3)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var c3=";ext=",bn=function(e){return"([".concat(Xe,"]{1,").concat(e,"})")};function ac(t){var e="20",n="15",o="9",i="6",s="[  \\t,]*",a="[:\\..]?[  \\t,-]*",l="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",p="(?:,{2}|;)",m=c3+bn(e),h=s+d+a+bn(e)+l,g=s+c+a+bn(o)+l,b=u+bn(i)+"#",y=f+p+a+bn(n)+l,S=f+"(?:,)+"+a+bn(o)+l;return m+"|"+h+"|"+g+"|"+b+"|"+y+"|"+S}var u3="["+Xe+"]{"+Wi+"}",f3="["+Yi+"]{0,1}(?:["+or+"]*["+Xe+"]){3,}["+or+Xe+"]*",p3=new RegExp("^["+Yi+"]{0,1}(?:["+or+"]*["+Xe+"]){1,2}$","i"),m3=f3+"(?:"+ac()+")?",h3=new RegExp("^"+u3+"$|^"+m3+"$","i");function g3(t){return t.length>=Wi&&h3.test(t)}function b3(t){return p3.test(t)}var lc=new RegExp("(?:"+ac()+")$","i");function y3(t){var e=t.search(lc);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(lc),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var k3={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function x3(t){return k3[t]}function S3(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=C3(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
28
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C3(t,e){if(t){if(typeof t=="string")return dc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dc(t,e)}}function dc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function cc(t){for(var e="",n=S3(t.split("")),o;!(o=n()).done;){var i=o.value;e+=w3(i,e)||""}return e}function w3(t,e,n){if(t==="+"){if(e){typeof n=="function"&&n("end");return}return"+"}return x3(t)}function A3(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=v3(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
29
29
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v3(t,e){if(t){if(typeof t=="string")return uc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uc(t,e)}}function uc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function B3(t,e){for(var n=t.slice(),o=A3(e),i;!(i=o()).done;){var s=i.value;t.indexOf(s)<0&&n.push(s)}return n.sort(function(a,l){return a-l})}function Gi(t,e){return fc(t,void 0,e)}function fc(t,e,n){var o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return fc(t,"MOBILE",n);var s=n.type("MOBILE");s&&(i=B3(i,s.possibleLengths()))}else if(e&&!o)return"INVALID_LENGTH";var a=t.length,l=i[0];return l===a?"IS_POSSIBLE":l>a?"TOO_SHORT":i[i.length-1]<a?"TOO_LONG":i.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function D3(t,e,n){if(e===void 0&&(e={}),n=new De(n),e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));n.country(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return pc(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function pc(t,e){switch(Gi(t,e)){case"IS_POSSIBLE":return!0;default:return!1}}function gt(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}function V3(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=P3(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
30
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P3(t,e){if(t){if(typeof t=="string")return mc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mc(t,e)}}function mc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var E3=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function qi(t,e,n){if(e=e||{},!(!t.country&&!t.countryCallingCode)){n=new De(n),n.selectNumberingPlan(t.country,t.countryCallingCode);var o=e.v2?t.nationalNumber:t.phone;if(gt(o,n.nationalNumberPattern())){if(Ji(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||Ji(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=V3(E3),s;!(s=i()).done;){var a=s.value;if(Ji(o,a,n))return a}}}}function Ji(t,e,n){return e=n.type(e),!e||!e.pattern()||e.possibleLengths()&&e.possibleLengths().indexOf(t.length)<0?!1:gt(t,e.pattern())}function F3(t,e,n){if(e=e||{},n=new De(n),n.selectNumberingPlan(t.country,t.countryCallingCode),n.hasTypes())return qi(t,e,n.metadata)!==void 0;var o=e.v2?t.nationalNumber:t.phone;return gt(o,n.nationalNumberPattern())}function N3(t,e,n){var o=new De(n),i=o.getCountryCodesForCallingCode(t);return i?i.filter(function(s){return M3(e,s,n)}):[]}function M3(t,e,n){var o=new De(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}function O3(t){return t.replace(new RegExp("[".concat(or,"]+"),"g")," ").trim()}var I3=/(\$\d)/;function R3(t,e,n){var o=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var s=t.replace(new RegExp(e.pattern()),o?e.internationalFormat():i&&e.nationalPrefixFormattingRule()?e.format().replace(I3,e.nationalPrefixFormattingRule()):e.format());return o?O3(s):s}var T3=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function z3(t,e,n){var o=new De(n);if(o.selectNumberingPlan(t,e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(T3.test(o.IDDPrefix()))return o.IDDPrefix()}function L3(t){var e=t.number,n=t.ext;if(!e)return"";if(e[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(e).concat(n?";ext="+n:"")}function H3(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=U3(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
@@ -75,7 +75,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
75
75
  -moz-box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);
76
76
  box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);
77
77
  }
78
- `;Nc(Gk),ns.render=Xk,ns.__scopeId="data-v-60be6971";var qk=(()=>{const t=ns;return t.install=e=>{e.component("CountryFlag",t)},t})();const Jk=qk,Kk={class:"flex items-center justify-center w-[20px] overflow-hidden"},Mc=Z(r.defineComponent({__name:"FmCountryFlag",props:{countryCode:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Kk,[r.createVNode(r.unref(Jk),{country:e.countryCode,class:"fm-country-flag flex-shrink-0"},null,8,["country"])]))}}),[["__scopeId","data-v-66513277"]]),Zk={class:"flex gap-4"},$k=r.defineComponent({__name:"FmPhoneNumber",props:{modelValue:{},defaultCountry:{default:"MY"},extraCountryCodes:{default:()=>[]},placeholder:{default:""},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.inject(re,null),i=e,s=J(n,"modelValue"),a=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),l=r.ref(["MY","SG","ID",...n.extraCountryCodes]),d=l.value.reduce((y,S)=>(y[S]=`+${Qk(S)}`,y),{}),c=l.value.map(y=>({label:"",value:y}));function u(y){var S;return y?((S=Object.entries(d).find(([,v])=>y.startsWith(v)))==null?void 0:S[0])??null:n.defaultCountry}const f=r.computed(()=>u(n.modelValue)),p=r.computed(()=>!f.value||!n.modelValue?d[n.defaultCountry]:n.modelValue),m=r.computed({get(){const y=es(p.value);return y?y.formatInternational().replace(d[f.value],"").trim():p.value.replace(d[f.value],"").trim()},set(y){const S=`${d[f.value]}${y}`,v=es(S);if(!v){s.value=S;return}s.value=v.formatInternational()}}),h=r.computed({get(){return f.value??n.defaultCountry},set(y){if(!f.value){i("update:modelValue",d[n.defaultCountry]);return}const v=d[f.value],w=d[y];s.value=p.value.replace(v,w)}}),g=r.ref({dropdown:!1,textField:!1});function b(y){const S=f.value;if(!y.replace(d[S],"").trim().length)return!0;const w=es(s.value,S);return!w||!w.isValid()?"Invalid phone number":!0}return(y,S)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(s),"onUpdate:modelValue":S[4]||(S[4]=v=>r.isRef(s)?s.value=v:null),disabled:a.value,focused:g.value.dropdown||g.value.textField,"helper-state":y.helperState,"helper-text":y.helperText,info:y.labelInfo,label:y.label,optional:y.labelMark==="optional",required:y.labelMark==="required",rules:[...y.rules,b],class:"flex gap-4"},r.createSlots({default:r.withCtx(({invalid:v})=>[r.createElementVNode("div",Zk,[r.createVNode(mn,{"model-value":h.value,"onUpdate:modelValue":S[0]||(S[0]=w=>h.value=w),disabled:a.value,items:r.unref(c),onDropdownChanged:S[1]||(S[1]=w=>g.value.dropdown=w)},{default:r.withCtx(()=>[r.createVNode(Mc,{"country-code":h.value},null,8,["country-code"])]),"menu-wrapper":r.withCtx(({handleItemChange:w})=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,x=>(r.openBlock(),r.createBlock(xe,{key:x,"model-value":h.value===x,"onUpdate:modelValue":F=>w(F,r.unref(c).find(E=>E.value===x))},{label:r.withCtx(()=>[r.createVNode(Mc,{"country-code":x},null,8,["country-code"])]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:1},8,["model-value","disabled","items"]),r.createVNode(ts,{"model-value":m.value,"onUpdate:modelValue":S[2]||(S[2]=w=>m.value=w),disabled:a.value,invalid:v,class:"flex-1",inputmode:"tel",onFocusChanged:S[3]||(S[3]=w=>g.value.textField=w)},{prepend:r.withCtx(()=>[r.createElementVNode("span",{class:r.normalizeClass([a.value?"text-fm-color-typo-disabled":""])},"("+r.toDisplayString(r.unref(d)[f.value])+")",3)]),_:2},1032,["model-value","disabled","invalid"])])]),_:2},[y.label||y.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"label")]),key:"0"}:void 0,y.helperText||y.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),_k={class:"flex gap-8 items-center"},e8=["onInput","onKeydown"],t8=Z(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"},isError:{type:Boolean}},emits:["update:modelValue","complete"],setup(t,{emit:e}){const n=e,o=t,i=J(o,"modelValue"),s=r.ref([]),a=(f,p)=>{const m=f.target;if(o.type==="number"&&!/^[0-9]$/g.test(m.value)){m.value="";return}m.value=m.value.slice(-1),c(m.value,p),s.value[p+1]?s.value[p+1].focus():s.value[p].blur()},l=(f,p)=>{f.preventDefault();const m=f.target;m.value="",c(null,p),s.value[p-1]?s.value[p-1].focus():s.value[p].focus()},d=(f,p)=>{f.preventDefault(),f.key==="ArrowLeft"&&(s.value[p-1]?s.value[p-1].focus():s.value[p].focus()),f.key==="ArrowRight"&&(s.value[p+1]?s.value[p+1].focus():s.value[p].focus())},c=(f,p)=>{i.value=i.value.toSpliced(p,1,f)},u=(f,p)=>{s.value[p]=f};return r.onMounted(()=>{i.value=Array.from(Array(o.length).fill(null))}),r.watch(()=>i.value,()=>{i.value.every(f=>f!==null)&&n("complete",i.value.join(""))}),(f,p)=>(r.openBlock(),r.createElementBlock("div",_k,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.length,(m,h)=>(r.openBlock(),r.createElementBlock("input",{key:m,ref_for:!0,ref:g=>u(g,h),class:r.normalizeClass(["fm-pin-field",{[f.isError?"fm-pin-field--error":"fm-pin-field--populated"]:r.unref(i)[h]!==null}]),type:"text",onInput:g=>a(g,h),onKeydown:[r.withKeys(g=>l(g,h),["backspace"]),r.withKeys(g=>d(g,h),["arrow-left","arrow-right"])]},null,42,e8))),128))]))}}),[["__scopeId","data-v-69d9a64d"]]),n8={class:"fm-radio-btn"},o8={class:"fm-radio-btn__input--container"},r8=["checked","disabled","value"],i8={class:"py-8"},s8={class:"fm-typo-en-body-lg-400"},a8={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},l8=Z(r.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue"),o=r.ref(),i=r.inject(Qs,null),s=r.inject(re,null),a=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=r.computed(()=>e.disabled??(i==null?void 0:i.getDisabled())??(s==null?void 0:s.getDisabled())??!1),d=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(c,u)=>{const f=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",n8,[r.createElementVNode("label",{class:r.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value}),onClick:a},[r.withDirectives((r.openBlock(),r.createElementBlock("div",o8,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:d.value,disabled:l.value,value:c.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,r8)])),[[f,!l.value]]),r.createElementVNode("div",i8,[r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",s8,r.toDisplayString(c.label),1),c.sublabel?(r.openBlock(),r.createElementBlock("div",a8,r.toDisplayString(c.sublabel),1)):r.createCommentVNode("",!0)],!0)])],2)])}}}),[["__scopeId","data-v-2eaf3939"]]),d8=r.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue"),o=r.inject(re,null);r.provide(Qs,{groupValue:n,getDisabled:()=>i.value,updateValue(s){n.value=s}});const i=r.computed(()=>e.disabled??(o==null?void 0:o.getDisabled())??!1);return(s,a)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(n),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(n)?n.value=l:null),disabled:i.value,"helper-state":s.helperState,"helper-text":s.helperText,info:s.labelInfo,label:s.label,optional:s.labelMark==="optional",required:s.labelMark==="required",rules:s.rules},{label:r.withCtx(()=>[r.renderSlot(s.$slots,"label")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":s.inline})},[r.renderSlot(s.$slots,"default")],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(s.$slots,"helper-text")]),_:3},8,["modelValue","disabled","helper-state","helper-text","info","label","optional","required","rules"]))}}),os=r.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>{const{modelValue:p,disabled:m,...h}=e;return h}),i=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),s=J(e,"modelValue"),a=r.ref(!1),l=r.ref(),d=r.ref(e.collapsible),c=r.ref(e.collapsible);function u(){d.value=!1,r.nextTick(()=>{var p,m,h,g;(g=(h=(m=(p=l.value)==null?void 0:p.querySelector)==null?void 0:m.call(p,"input"))==null?void 0:h.focus)==null||g.call(h)})}function f(p){if(a.value=p,!!e.collapsible){if(p){c.value=!1;return}d.value=s.value.length===0,d.value&&setTimeout(()=>{c.value=!0},250)}}return(p,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:l,class:"flex items-center justify-end min-w-48 relative"},[r.createVNode(ts,r.mergeProps({modelValue:r.unref(s),"onUpdate:modelValue":m[1]||(m[1]=h=>r.isRef(s)?s.value=h:null),class:["transition-all",{"opacity-100":!p.collapsible||!d.value,"opacity-0 pointer-events-none":p.collapsible&&d.value}],disabled:i.value||p.collapsible&&d.value,style:{width:p.collapsible&&d.value?"24px":"100%"}},o.value,{onFocusChanged:f}),r.createSlots({_:2},[a.value?void 0:{name:"prepend",fn:r.withCtx(()=>[r.createVNode(Q,{name:"search"})]),key:"0"},r.unref(s).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(Q,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:m[0]||(m[0]=h=>s.value="")})]),key:"1"}:void 0]),1040,["modelValue","class","disabled","style"]),p.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute top-0 right-0",d.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:d.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(G,{icon:"search",variant:"tertiary",onClick:u})],6)):r.createCommentVNode("",!0)],512))}}),c8={key:0,class:"flex fm-typo-en-title-sm-800 items-center justify-between text-fm-color-typo-primary"},u8={key:0},f8={class:"overflow-y-auto"},p8={key:1,class:"flex gap-8 items-center"},Oc=Z(r.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0},zIndex:{default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>n.value=!0)},[r.renderSlot(o.$slots,"top-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:i[1]||(i[1]=s=>n.value=!1)},{default:r.withCtx(()=>[r.createVNode(r.Transition,{name:o.fullscreenSize?`slide-${o.fullscreenSize}`:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${o.fullscreenSize}`])},[o.header||o.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",c8,[r.renderSlot(o.$slots,"top-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",u8,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",f8,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",p8,[r.renderSlot(o.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-2e7518aa"]]);var rs={exports:{}};function Ic(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,s,a,l,d;function c(){const f=Date.now()-l;if(f<e&&f>=0)a=setTimeout(c,e-f);else if(a=void 0,!o){const p=i,m=s;i=void 0,s=void 0,d=t.apply(p,m)}}const u=function(...f){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,s=f,l=Date.now();const p=o&&!a;if(a||(a=setTimeout(c,e)),p){const m=i,h=s;i=void 0,s=void 0,d=t.apply(m,h)}return d};return u.clear=()=>{a&&(clearTimeout(a),a=void 0)},u.flush=()=>{if(!a)return;const f=i,p=s;i=void 0,s=void 0,d=t.apply(f,p),clearTimeout(a),a=void 0},u}rs.exports.debounce=Ic,rs.exports=Ic;var m8=rs.exports;const is=Di(m8);var Rc={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(s){return n.test(o,s)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,s){s=s||{};var a=0,l=[],d=i.length,c=0,u=0,f=s.pre||"",p=s.post||"",m=s.caseSensitive&&i||i.toLowerCase(),h;o=s.caseSensitive&&o||o.toLowerCase();for(var g=0;g<d;g++)h=i[g],m[g]===o[a]?(h=f+h+p,a+=1,u+=1+u):u=0,c+=u,l[l.length]=h;return a===o.length?(c=m===o?1/0:c,{rendered:l.join(""),score:c}):null},n.filter=function(o,i,s){return!i||i.length===0?[]:typeof o!="string"?i:(s=s||{},i.reduce(function(a,l,d,c){var u=l;s.extract&&(u=s.extract(l));var f=n.match(o,u,s);return f!=null&&(a[a.length]={string:f.rendered,score:f.score,index:d,original:l}),a},[]).sort(function(a,l){var d=l.score-a.score;return d||a.index-l.index}))}})()})(Rc);var h8=Rc.exports;const g8=Di(h8);function dr(t,e){const[n]=g8.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,s,a)=>(i.push({segment:s,isMatch:a%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const b8={class:"flex flex-col gap-4"},y8={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},k8={class:"hidden sm:inline xs:inline"},x8={key:0},S8={key:0,class:"flex flex-col"},C8={class:"flex flex-col"},w8={class:"flex items-center px-24 py-12"},A8=r.createElementVNode("div",{class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),v8=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),B8=["onClick"],D8={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},V8={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},P8={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},E8={key:3,class:"flex flex-col"},F8=["onClick"],N8={class:"flex flex-col gap-4"},M8={key:0,class:"text-fm-color-typo-secondary"},O8={class:"px-16 py-4"},I8=5,R8=r.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const I=n.recentSearchKey;localStorage.removeItem(I),l.value=[]}function s(){if(!n.recentSearchKey)return;const I=n.recentSearchKey,N=localStorage.getItem(I);if(!N)return[];try{return JSON.parse(N)}catch{return new Array}}const a=is(function(N){if(!n.recentSearchKey)return;const C=n.recentSearchKey,D=N().trim();if(!C||!D)return;const A=s()??[],k=[...new Set([D,...A])].slice(0,I8),B=JSON.stringify(k);return localStorage.setItem(C,B),l.value=k,k},800),l=r.ref(s()),d=J(n,"show");r.watch([()=>n.show],()=>{n.show?(f.value=null,n.suggestions&&S()):o("dismiss")});const c=J(n,"modelValue"),u=r.ref(n.modelValue);r.watch([()=>u.value],()=>{w()});const f=r.ref(null),p=r.ref(!0),m=r.computed(()=>{var I;return p.value?(I=f.value)==null?void 0:I.slice(0,5):f.value});r.watch([()=>f.value],([])=>{p.value=!0});const h=r.computed(()=>f.value===null),g=r.ref(!1),b=r.ref(""),y=()=>u.value;async function S(){if(!d.value)return;const I=y();if(!I)return;const N=Math.random().toString();if(b.value=N,n.suggestions){f.value=n.suggestions.map(C=>({label:dr(I,C.label),sublabel:C.sublabel?dr(I,C.sublabel):null})).filter(C=>{var D;return C.label.matched||((D=C.sublabel)==null?void 0:D.matched)}),a(y);return}if(n.onSearch)try{g.value=!0;const C=await n.onSearch(I);N===b.value&&(f.value=C.map(D=>({label:dr(I,D.label),sublabel:D.sublabel?dr(I,D.sublabel):null})))}catch{N===b.value&&(f.value=[])}finally{N===b.value&&(g.value=!1,a(y))}}function v(I){d.value=!1,o("dismiss"),c.value=I}const w=is(S),x=r.computed(()=>l.value&&l.value.length===0),F=r.computed(()=>(!u.value||h.value)&&!x.value),E=r.computed(()=>(!u.value||h.value)&&x.value),M=r.computed(()=>u.value&&f.value&&f.value.length===0);return(I,N)=>(r.openBlock(),r.createBlock(Oc,{"model-value":r.unref(d),"onUpdate:modelValue":N[4]||(N[4]=C=>r.isRef(d)?d.value=C:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var C,D;return[r.createElementVNode("div",b8,[r.createElementVNode("div",y8,[r.createElementVNode("div",k8,[r.createVNode(G,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:N[0]||(N[0]=A=>d.value=!1)})]),r.createVNode(os,{"model-value":u.value,"onUpdate:modelValue":N[1]||(N[1]=A=>u.value=A),class:"flex-1",placeholder:I.placeholder},null,8,["model-value","placeholder"])]),g.value?(r.openBlock(),r.createElementBlock("div",x8,[r.createVNode(tn,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[F.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[I.recentSearchKey&&((C=l.value)!=null&&C.length)?(r.openBlock(),r.createElementBlock("div",S8,[r.createElementVNode("div",C8,[r.createElementVNode("div",w8,[A8,r.createVNode(St),r.createVNode(G,{label:"Clear history",variant:"plain",size:"md",onClick:N[2]||(N[2]=A=>i())})]),v8]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(A,k)=>(r.openBlock(),r.createElementBlock("div",{key:k,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:B=>u.value=A},[r.createVNode(Q,{size:"lg",name:"history"}),r.createElementVNode("div",D8,r.toDisplayString(A),1)],8,B8))),128))])])):r.createCommentVNode("",!0)],64)):E.value?r.renderSlot(I.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",V8,r.toDisplayString(I.hintPlaceholder),1)]):M.value?r.renderSlot(I.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",P8,r.toDisplayString(I.notFoundPlaceholder||`No result found for “${u.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",E8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(A,k)=>r.renderSlot(I.$slots,"search-result-item",r.mergeProps({key:k},{result:A}),()=>[r.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:B=>v(A.label.label)},[r.createVNode(Q,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",N8,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.label.segments,(B,V)=>(r.openBlock(),r.createElementBlock("span",{key:V,class:r.normalizeClass({"fm-typo-en-body-lg-400":!B.isMatch,"fm-typo-en-body-lg-600":B.isMatch})},r.toDisplayString(B.segment),3))),128))]),A.sublabel?(r.openBlock(),r.createElementBlock("div",M8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.sublabel.segments,(B,V)=>(r.openBlock(),r.createElementBlock("span",{key:V,class:r.normalizeClass({"fm-typo-en-body-md-400":!B.isMatch,"fm-typo-en-body-md-600":B.isMatch})},r.toDisplayString(B.segment),3))),128))])):r.createCommentVNode("",!0)])],8,F8)])),128)),r.createElementVNode("div",O8,[p.value&&(((D=f.value)==null?void 0:D.length)??0)>5?(r.openBlock(),r.createBlock(G,{key:0,label:`show ${f.value.length-5} more results`,variant:"plain",onClick:N[3]||(N[3]=A=>p.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),T8=["disabled","inputMode","placeholder","readOnly","value"],z8={key:0},L8=["disabled"],H8=["disabled"],U8=Z(r.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),{isFocused:s,blur:a,focus:l}=xn(),d=r.ref(null);let c;const u=w=>{if(w!==""){const x=+w.replace(/,/g,"");return isNaN(x)?null:x}return null},f=w=>c.format(w),p=w=>{if(typeof i.value!="number"){i.value=+i.value;return}if(w>0&&y.value||w<0&&S.value)return;let x=v(i.value)?i.value+w:0;x=m(x),i.value=x},m=w=>e.max!==void 0&&w>e.max?e.max:e.min!==void 0&&w<e.min?e.min:w,h=()=>{var w;i.value=u(((w=d.value)==null?void 0:w.value)??"")},g=w=>{if(![...Array(10).keys()].map(x=>x.toString()).includes(w.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(w.key)){w.preventDefault();return}},b=r.computed(()=>i.value!=null?f(i.value):""),y=r.computed(()=>{let w=!1;return e.max!==void 0&&(w=i.value>=e.max),e.min!==void 0&&(w=i.value<e.min),w}),S=r.computed(()=>{let w=!1;return e.max!==void 0&&(w=i.value>e.max),e.min!==void 0&&(w=i.value<=e.min),w});r.onBeforeMount(()=>{c=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function v(w){return typeof w=="number"&&isFinite(w)}return(w,x)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":x[8]||(x[8]=F=>r.isRef(i)?i.value=F:null),disabled:o.value,focused:r.unref(s),"helper-state":w.helperState,"helper-text":w.helperText,info:w.labelInfo,label:w.label,optional:w.labelMark==="optional",required:w.labelMark==="required",rules:w.rules},{label:r.withCtx(()=>[r.renderSlot(w.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:F})=>[r.createVNode(de,{"append-icon":w.appendIcon,focused:r.unref(s),invalid:F,"prepend-icon":w.prependIcon,"show-valid-border":w.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(w.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([{"mr-32":w.showSteppers},"flex items-center justify-center"])},[w.appendText?(r.openBlock(),r.createElementBlock("div",z8,r.toDisplayString(w.appendText),1)):r.createCommentVNode("",!0),w.appendIcon?(r.openBlock(),r.createBlock(Q,{key:1,color:o.value?"#C7C7CC":"#1C1C1E",name:w.appendIcon,size:"md"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)],!0),w.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(s)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{disabled:o.value||y.value,class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onBlur:x[2]||(x[2]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[3]||(x[3]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onMousedown:x[4]||(x[4]=()=>p(w.step))},[r.createVNode(Q,{color:o.value||y.value?"#C7C7CC":"#1C1C1E",name:"expand_less",size:"md"},null,8,["color"])],40,L8),r.createElementVNode("button",{disabled:o.value||S.value,class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onBlur:x[5]||(x[5]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[6]||(x[6]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onMousedown:x[7]||(x[7]=()=>p(-w.step))},[r.createVNode(Q,{color:o.value||S.value?"#C7C7CC":"#1C1C1E",name:"expand_more",size:"md"},null,8,["color"])],40,H8)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:d,disabled:o.value,inputMode:w.inputmode,placeholder:w.placeholder,readOnly:w.readonly,value:b.value,class:"fm-stepper-field--input",type:"text",onBlur:x[0]||(x[0]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[1]||(x[1]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onInput:h,onKeydown:g},null,40,T8)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot(w.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-a5abfe4a"]]),j8=["disabled","maxlength","minlength","placeholder","readOnly","value"],Q8=Z(r.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),{isFocused:s,focus:a,blur:l}=xn(),d=c=>{i.value=c.target.value};return(c,u)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":u[2]||(u[2]=f=>r.isRef(i)?i.value=f:null),disabled:o.value,focused:r.unref(s),"helper-state":c.helperState,"helper-text":c.helperText,info:c.labelInfo,label:c.label,optional:c.labelMark==="optional",required:c.labelMark==="required",rules:c.rules},r.createSlots({label:r.withCtx(()=>[r.renderSlot(c.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:f})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(s),"fm-textarea__container--invalid":!!r.unref(i)&&f,"fm-textarea__container--valid":c.showValidBorder&&c.showSuccess&&!!r.unref(i)&&!f,"fm-textarea__container--disabled":o.value})},[r.createElementVNode("textarea",{class:r.normalizeClass({"fm-textarea--input fm-typo-en-body-lg-400":!0,"fm-color-typo-primary":!o.value,"fm-color-typo-disabled":o.value}),disabled:o.value,maxlength:c.maxLength,minlength:c.minLength,placeholder:c.placeholder,readOnly:c.readonly,value:r.unref(i),onBlur:u[0]||(u[0]=(...p)=>r.unref(l)&&r.unref(l)(...p)),onFocus:u[1]||(u[1]=(...p)=>r.unref(a)&&r.unref(a)(...p)),onInput:d},null,42,j8)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text",{},void 0,!0)]),_:2},[c.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([o.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-en-body-sm-400"])},r.toDisplayString(c.maxLength?`${r.unref(i).length} / ${c.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-bcae4c20"]]),W8={class:"flex flex-col fm-time-input items-center"},Y8=["value"],Tc=Z(r.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(t,{emit:e}){const n=t,o=e,i=r.ref();function s(u){i.value&&(i.value.value=u)}r.watch(()=>n.modelValue,s);function a(){if(!i.value)return;const u=l(i.value.value);if(u==null||u>n.max||u<n.min){s(n.modelValue);return}o("update:model-value",u)}function l(u){return u&&/^\d+$/.test(u)?Number(u):null}function d(){var u;(u=i.value)==null||u.focus(),o("update:model-value",l(n.modelValue)+1)}function c(){var u;(u=i.value)==null||u.focus(),o("update:model-value",l(n.modelValue)-1)}return(u,f)=>(r.openBlock(),r.createElementBlock("div",W8,[r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[r.createVNode(Q,{name:"expand_less",size:"lg"})]),r.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:a},null,40,Y8),r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[r.createVNode(Q,{name:"expand_more",size:"lg"})])]))}}),[["__scopeId","data-v-7e58409e"]]);var et=(t=>(t.AM="AM",t.PM="PM",t))(et||{});function tt(t){return t.toString().padStart(2,"0")}function X8(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),s=o>11?"PM":"AM";let a=o;return a===0?a=12:a>12&&(a-=12),`${tt(a)}:${tt(i)}:${s}`}function Ee(t){const[e,n,o]=X8(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function ss({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${tt(o)}:${tt(e)}`}const G8={class:"flex fm-time-input gap-16 items-center"},q8=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800"},":",-1),J8={class:"fm-time-input-periods"},K8=["onClick"],cr=r.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(s){const a={hours:s.hours??n.modelValue.hours,minutes:s.minutes??n.modelValue.minutes,period:s.period??n.modelValue.period},l=n.modelValue.hours;(l===12&&a.hours===11||l===11&&a.hours===12)&&(a.period=n.modelValue.period===et.AM?et.PM:et.AM),a.hours>12?a.hours=1:a.hours<1&&(a.hours=12),a.minutes>59?a.minutes=0:a.minutes<0&&(a.minutes=59),o("update:model-value",a)}return(s,a)=>(r.openBlock(),r.createElementBlock("div",G8,[r.createVNode(Tc,{"model-value":r.unref(tt)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":a[0]||(a[0]=l=>i({hours:l}))},null,8,["model-value"]),q8,r.createVNode(Tc,{"model-value":r.unref(tt)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":a[1]||(a[1]=l=>i({minutes:l}))},null,8,["model-value"]),r.createElementVNode("div",J8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(et),l=>(r.openBlock(),r.createElementBlock("div",{key:l,class:r.normalizeClass([{"fm-time-input-period__selected":l===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:l})},r.toDisplayString(l),11,K8))),128))])]))}}),Z8={class:"flex gap-8"},$8={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[343px]"},_8=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800 mb-8"},"Enter time",-1),ex={class:"flex items-center justify-center py-16 w-full"},tx={class:"flex justify-end"},nx=r.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=r.ref(null),a=r.computed(()=>{if(!i.value)return null;const{hours:c,minutes:u,period:f}=Ee(i.value);return`${tt(c)}:${tt(u)} ${f}`});function l(){if(!s.value){i.value=null;return}const c=ss(s.value);i.value=c,d.value=!1}r.onMounted(()=>{i.value&&(s.value=Ee(i.value))}),r.watch(()=>i.value,c=>{c&&(s.value=Ee(c))});const d=r.ref(!1);return r.watchEffect(()=>{o.value||(d.value?s.value=Ee(i.value??"00:00"):s.value=i.value?Ee(i.value):null)}),(c,u)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":u[3]||(u[3]=f=>r.isRef(i)?i.value=f:null),disabled:o.value,focused:d.value,"helper-state":c.helperState,"helper-text":c.helperText,info:c.labelInfo,label:c.label,optional:c.labelMark==="optional",required:c.labelMark==="required",rules:c.rules,"disable-auto-focus":"",tag:"div"},{label:r.withCtx(()=>[r.renderSlot(c.$slots,"label")]),default:r.withCtx(({invalid:f})=>[r.createVNode(mt,{disabled:o.value,"show-popover":d.value,"z-index":c.zIndex,onPopoverChanged:u[2]||(u[2]=p=>d.value=p)},{"popover-button":r.withCtx(()=>[c.$slots["trigger-button"]?r.renderSlot(c.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:f,dropdownShowed:d.value,showValidBorder:c.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(de,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:d.value,invalid:f,"show-valid-border":c.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",Z8,[r.createVNode(Q,{outline:!d.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!a.value},"grow"])},r.toDisplayString(a.value??c.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",$8,[_8,r.createElementVNode("div",ex,[r.createVNode(cr,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":u[0]||(u[0]=p=>s.value=p)},null,8,["model-value"])]),r.createElementVNode("div",tx,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:u[1]||(u[1]=p=>d.value=!1)}),r.createVNode(G,{label:"Apply",size:"md",variant:"primary",onClick:l})])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),ox={class:"flex gap-8"},rx={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300"},ix=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800 mb-8"},"Enter time",-1),sx={class:"flex flex-col gap-16 items-center justify-center py-16 w-full"},ax=r.createElementVNode("div",{class:"fm-typo-en-body-lg-600 text-left w-full"}," Starting Time ",-1),lx=r.createElementVNode("div",{class:"fm-typo-en-body-lg-600 text-left w-full"}," Ending Time ",-1),dx={class:"flex gap-8 items-center justify-end"},cx=r.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=r.ref(null),a=r.ref(null),l=r.computed(()=>{const g=Array.isArray(i.value);return!i.value||!g||g&&i.value.every(b=>!m(b))?null:i.value.map(b=>{const{hours:y,minutes:S,period:v}=Ee(b);return`${tt(y)}:${tt(S)} ${v}`}).join(" - ")});function d(){if(!s.value||!a.value){i.value=null;return}let g=!1;const b=s.value,y=a.value;(b.period===et.PM&&y.period===et.AM||b.period===y.period&&(b.hours>y.hours||b.hours===y.hours&&b.minutes>y.minutes))&&(g=!0);const S=ss(s.value),v=ss(a.value);i.value=g?[v,S]:[S,v],u()}r.onMounted(()=>{Array.isArray(i.value)&&i.value.every(g=>!!g)&&(s.value=Ee(i.value[0]),a.value=Ee(i.value[1]))}),r.watch(()=>i.value,g=>{const b=Array.isArray(g);g&&b&&g.every(y=>m(y))&&(s.value=Ee(g[0]),a.value=Ee(g[1]))});const c=r.ref();function u(){var g;(g=c.value)==null||g.hide()}const f=r.ref(!1);function p(g){var b,y,S,v;g?(s.value=Ee(((S=i.value)==null?void 0:S[0])??"00:00"),a.value=Ee(((v=i.value)==null?void 0:v[1])??"23:59")):(s.value=(b=i.value)!=null&&b[0]?Ee(i.value[0]):null,a.value=(y=i.value)!=null&&y[1]?Ee(i.value[1]):null),f.value=g}const m=g=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(g),h=r.computed(()=>ve(s.value,a.value));return(g,b)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":b[2]||(b[2]=y=>r.isRef(i)?i.value=y:null),disabled:o.value,focused:f.value,"helper-state":g.helperState,"helper-text":g.helperText,info:g.labelInfo,label:g.label,optional:g.labelMark==="optional",required:g.labelMark==="required",rules:g.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(g.$slots,"label")]),default:r.withCtx(({invalid:y})=>[r.createVNode(mt,{ref_key:"dropdownRef",ref:c,"show-popover":f.value,width:343,"z-index":e.zIndex,onPopoverChanged:p},{"popover-button":r.withCtx(()=>[g.$slots["trigger-button"]?r.renderSlot(g.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:y,dropdownShowed:f.value,showValidBorder:g.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(de,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:f.value,invalid:y,"show-valid-border":g.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",ox,[r.createVNode(Q,{outline:!f.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!l.value},"grow"])},r.toDisplayString(l.value??g.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",rx,[ix,r.createElementVNode("div",sx,[r.createElementVNode("div",null,[ax,r.createVNode(cr,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":b[0]||(b[0]=S=>s.value=S)},null,8,["model-value"])]),r.createElementVNode("div",null,[lx,r.createVNode(cr,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":b[1]||(b[1]=S=>a.value=S)},null,8,["model-value"])])]),r.createElementVNode("div",dx,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),r.createVNode(G,{disabled:h.value,label:"Apply",size:"md",variant:"primary",onClick:d},null,8,["disabled"])])])]),_:2},1032,["show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(g.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),as=Z(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[r.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-884ba127"]]),ls=Z(r.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;return(n,o)=>{const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled}),onClick:o[0]||(o[0]=r.withModifiers(()=>{},["prevent"]))},{default:r.withCtx(()=>[r.renderSlot(n.$slots,"prepend",{},void 0,!0),r.renderSlot(n.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-en-body-lg-400 line-clamp-1 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(n.label),3),n.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-md-400 line-clamp-2 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(n.sublabel),3)):r.createCommentVNode("",!0)])],!0),n.$slots.append?(r.openBlock(),r.createBlock(St,{key:0})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),[["__scopeId","data-v-884f99a5"]]);function ux(t){for(;t;){if(fx(t))return t;t=t.parentElement}return document.scrollingElement}function fx(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class px{constructor(e,n){H(this,"onScroll");H(this,"scrollParent");this.onScroll=n,this.scrollParent=ux(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const mx={class:"fm-menu__wrapper"},hx=Z(r.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(!1),s=r.ref(null),a=r.ref(null),{floatingStyles:l}=eo(s,a,{middleware:[Jn(4),_n()],placement:o.placement,whileElementsMounted:$n});let d;const c=n;e({show:()=>{i.value||(i.value=!0,c("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,c("dropdown-changed",i.value))}});const u=m=>{m.preventDefault(),m.stopPropagation(),!o.disabled&&(i.value=!i.value,c("dropdown-changed",i.value))},f=m=>{if(!i.value)return;const h=m.path||m.composedPath();for(const g of h)if(g==s.value||g==a.value)return;i.value=!1,c("dropdown-changed",i.value)},p=()=>{c("dropdown-changed",!1)};return r.watch(()=>o.showMenu,m=>i.value=m),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),d=new px(s.value,p),d.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",f),d.unbindScroll()}),(m,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-menu",onClick:u},[r.renderSlot(m.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:a,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(l))},[r.renderSlot(m.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",mx,[r.renderSlot(m.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),gx={class:"fm-typo-en-body-lg-600 mx-8 p-8 text-fm-color-typo-primary"},bx=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",gx,r.toDisplayString(e.label),1))}}),yx=t=>(r.pushScopeId("data-v-6d0e6490"),t=t(),r.popScopeId(),t),kx={class:"relative"},xx={class:"fm-progress-linear fm-typo-en-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},Sx=yx(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),Cx=Z(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(kn(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",kx,[r.createElementVNode("div",xx,[Sx,r.createElementVNode("span",{class:r.normalizeClass(["dash-1",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-6d0e6490"]]),wx={class:"flex fm-typo-en-title-sm-800 items-center justify-between text-fm-color-typo-primary"},Ax={key:0},vx={class:"h-full overflow-y-auto"},Bx={class:"pt-24"},Dx=Z(r.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0},maxWidth:{default:void 0},zIndex:{default:void 0},isContainer:{default:"div"},isContainerProps:{default:()=>({})}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>n.value=!0)},[r.renderSlot(o.$slots,"side-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:i[2]||(i[2]=s=>n.value=!1)},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.isContainer),r.mergeProps({class:[!o.maxWidth&&"max-w-[400px]","fm-side-sheet xs:w-full"],style:{maxWidth:`${o.maxWidth}px`}},o.isContainerProps),{default:r.withCtx(()=>[r.createElementVNode("div",wx,[r.renderSlot(o.$slots,"side-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",Ax,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0),o.closeButton?(r.openBlock(),r.createBlock(Q,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:i[1]||(i[1]=s=>n.value=!1)})):r.createCommentVNode("",!0)]),r.createElementVNode("div",vx,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Bx,[r.renderSlot(o.$slots,"side-sheet-footer",{},void 0,!0)])]),_:3},16,["class","style"]))]),_:3})]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-25ca39ba"]]),Vx={class:"flex"},Px={key:0,class:"mt-8"},zc=Z(r.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0},zIndex:{type:Number,default:1e3}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),s=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-en-body-lg-600"}:{text:n.description,classes:""}),a=r.computed(()=>n.bgColor?kn(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),l=r.computed(()=>n.color?kn(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(d,c)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({style:{zIndex:t.zIndex},class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"},a.value),[r.createElementVNode("div",Vx,[i.value.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:n.color??i.value.icon.color,name:i.value.icon.name,class:"mr-12"},null,8,["color","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(`${s.value.classes} grow ellipsis`)},r.toDisplayString(s.value.text),3),n.dismissable?(r.openBlock(),r.createBlock(Q,{key:1,class:"cursor-pointer",name:"close",style:{"{ flex":"none}"},onClick:c[0]||(c[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",Px,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(d.$slots,"actions",{},()=>[n.action?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:"mt-16 fm-typo-en-body-lg-600"},l.value),[r.createElementVNode("span",{class:"cursor-pointer",onClick:c[1]||(c[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-5fe933ca"]]),Ex={class:"fm-step-description fm-typo-en-body-sm-400 line-clamp-1 mt-4"},ds=r.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-en-title-sm-800":"fm-typo-en-body-md-400"])},r.toDisplayString(t.title),3)]),r.renderSlot(e.$slots,"description",{},()=>[r.createElementVNode("div",Ex,r.toDisplayString(t.description),1)])],2))}}),Fx=["data-title","data-description","data-disabled"],Nx={class:"flex fm-step-container gap-12 grow"},Mx=Z(r.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=r.inject(Ws);function i(){s.value||o(e.value)}const s=r.computed(()=>e.disabled?e.disabled():!1),a=r.computed(()=>e.error?e.error():!1),l=r.computed(()=>n()===e.value),d=r.computed(()=>e.complete()),c=r.computed(()=>l.value||d.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=r.computed(()=>l.value?{className:"bg-fm-color-primary"}:a.value?{config:{name:"warning",color:"system-error-300"}}:s.value?{className:"border-2 border-fm-color-neutral-gray-200"}:d.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,p)=>{const m=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":s.value,class:r.normalizeClass(`fm-step gap-4 grow ${s.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${c.value}`)},null,2)]),r.createElementVNode("div",Nx,[r.createElementVNode("div",{class:r.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",u.value.className])},[u.value.config?(r.openBlock(),r.createBlock(Q,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(ds,{title:t.title,description:t.description,disabled:s.value,class:"grow"},null,8,["title","description","disabled"])])],10,Fx)),[[m,!s.value]])}}}),[["__scopeId","data-v-ee172cad"]]),Ox={class:"hidden items-center xs:flex"},Ix={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},Rx=r.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=u=>{o("update:model-value",u)};r.provide(Ws,{currentStep:()=>n.modelValue,goToStep:i});const s=r.ref(),a=r.ref([]),l=r.computed(()=>a.value[n.modelValue-1]),d=r.computed(()=>`${n.modelValue} of ${a.value.length}`),c=()=>{var f;const u=Array.from(((f=s.value)==null?void 0:f.querySelectorAll(":scope > .fm-step"))??[]);a.value=u.map(p=>({title:p.dataset.title??"",description:p.dataset.description,disabled:p.dataset.disabled=="true"}))};return r.onMounted(()=>{c()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:s,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(u.$slots,"default")],2),r.createElementVNode("div",Ox,[r.createVNode(tn,{"current-step":t.modelValue,"total-steps":a.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(d.value),1)]),_:1},8,["current-step","total-steps"]),l.value?(r.openBlock(),r.createBlock(ds,{key:0,class:"grow","title-bold":"",title:l.value.title,description:l.value.description,disabled:l.value.disabled},null,8,["title","description","disabled"])):r.createCommentVNode("",!0)]),u.$slots.contents?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[r.renderSlot(u.$slots,"contents"),r.createElementVNode("div",Ix,[r.renderSlot(u.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let Tx=0;function zx(){return Tx++}const Lx=t=>(r.pushScopeId("data-v-93cbd978"),t=t(),r.popScopeId(),t),Hx=["disabled"],Ux=[Lx(()=>r.createElementVNode("div",{class:"fm-tab__indicator"},null,-1))],Lc=Z(r.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>zx()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,s=r.ref(!1);function a(f){n.value=f}const l=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},d=f=>{o.children.length!==0&&(s.value=f)},c=r.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{s.value=!1,i("update:modelValue",f)};return(f,p)=>(r.openBlock(),r.createBlock(_e,{"show-menu":s.value,disabled:f.children.length===0,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":f.vertical}]),placement:f.vertical?"right-start":"bottom-start",onMenuChanged:d},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass(["fm-tab",`fm-tab--${f.vertical?"vertical":"horizontal"}`,f.disabled?"cursor-not-allowed":"cursor-pointer",{"fm-tab--selected":c.value}]),disabled:f.disabled,type:"button",onMousedown:p[0]||(p[0]=()=>a(!0)),onMouseup:p[1]||(p[1]=()=>a(!1)),onMouseleave:p[2]||(p[2]=()=>a(!1)),onClick:l},[r.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(r.openBlock(),r.createBlock(Q,{key:0,name:f.icon,outline:!n.value&&!c.value,color:f.disabled?"neutral-gray-200":c.value?"primary":"neutral-black",size:"md"},null,8,["name","outline","color"])):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-en-body-lg-600 text-fm-color-typo-primary row-start-1 text-left",c.value?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:2,class:r.normalizeClass(["fm-typo-en-body-lg-400 row-start-1 text-left",f.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary",!c.value||f.disabled?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.badge?(r.openBlock(),r.createBlock(Tt,{key:3,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0),f.children.length>0?(r.openBlock(),r.createBlock(Q,{key:4,size:"md",name:s.value?"expand_less":"expand_more"},null,8,["name"])):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"append",{},void 0,!0),c.value?(r.openBlock(),r.createElementBlock("div",{key:5,class:r.normalizeClass([`fm-tab__indicator__wrapper--${f.vertical?"vertical":"horizontal"}`])},Ux,2)):r.createCommentVNode("",!0)],42,Hx)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.children,m=>(r.openBlock(),r.createBlock(xe,{key:m.value,"model-value":o.modelValue===m.value,label:m.label,icon:m.icon,disabled:m.disabled,onClick:h=>u(m.value)},{append:r.withCtx(()=>[m.badge?(r.openBlock(),r.createBlock(Tt,{key:0,value:m.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:3},8,["show-menu","disabled","class","placement"]))}}),[["__scopeId","data-v-93cbd978"]]),jx={class:"flex gap-8 h-48 items-center justify-end transition-all w-full xs:flex-wrap-reverse"},Qx={class:"flex flex-1 gap-8"},Wx=r.defineComponent({__name:"FmTableToolbar",props:{searchModel:{default:""},searchable:{type:Boolean},filterable:{type:Boolean},chips:{default:()=>[]},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["update:search-model","click:remove-chip"],setup(t){const e=t,{breakpoints:n}=xt(),o=r.computed(()=>{const l=[];e.searchable&&l.push({label:"Search",icon:"search",key:"search"}),e.filterable&&l.push({label:"Filter",icon:"filter_alt",key:"filter"});const d=l.concat(e.actions);if(n.value.xs){const[h,g,b,...y]=d;return y.length===0?{actionButtons:[h,g,b].filter(S=>S),collapse:y}:{actionButtons:[h,g].filter(S=>S),collapse:[b,...y]}}const[c,u,f,p,...m]=d;return m.length===0?{actionButtons:[c,u,f,p].filter(h=>h),collapse:m}:{actionButtons:[c,u,f].filter(h=>h),collapse:[p,...m]}}),i=r.ref(!1);function s(l){if(n.value.xs){l.stopPropagation(),i.value=!0;return}}const a=J(e,"searchModel");return(l,d)=>(r.openBlock(),r.createElementBlock("div",jx,[r.renderSlot(l.$slots,"chips",{},()=>[l.chips.length?(r.openBlock(),r.createBlock(Ir,{key:0,class:"min-w-0 mr-auto",items:l.chips,removable:"",onChipClosed:d[0]||(d[0]=c=>l.$emit("click:remove-chip",c))},null,8,["items"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",Qx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.actionButtons,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.key},[c.key==="search"?r.renderSlot(l.$slots,"action-search",{key:0},()=>[r.createVNode(os,{"model-value":r.unref(a),"onUpdate:modelValue":d[1]||(d[1]=u=>r.isRef(a)?a.value=u:null),class:"w-full",collapsible:""},null,8,["model-value"])]):r.renderSlot(l.$slots,`action-${c.key}`,{key:1},()=>[r.createVNode(G,{"prepend-icon":c.icon,variant:"tertiary",onClick:u=>l.$emit(`click:action-${c.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(r.openBlock(),r.createBlock(_e,{key:0},{"menu-button":r.withCtx(()=>[r.createVNode(G,{"prepend-icon":"more_vert",variant:"tertiary",onClick:s})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(xe,{key:c.key,label:c.label,icon:c.icon,onClick:u=>{l.$emit(`click:action-${c.key}`),i.value=!1}},null,8,["label","icon","onClick"]))),128))]),_:1})):r.createCommentVNode("",!0),l.$slots.append?r.renderSlot(l.$slots,"append",{key:1}):r.createCommentVNode("",!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Er,{modelValue:i.value,"onUpdate:modelValue":d[2]||(d[2]=c=>i.value=c),"dismiss-away":"","z-index":e.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(as,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(ls,{key:c.key,label:c.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:u=>{l.$emit(`click:action-${c.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue","z-index"])]))]))}});var Yx={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_0b117e10-523d-41eb-afa9-852749c218a0",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_config_user_agent:"pnpm/8.15.8 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_0b117e10-523d-41eb-afa9-852749c218a0",PIPX_HOME:"/opt/pipx",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-8.8",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.3.11579264",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_scripts_copy_tailwind_plugin:"cp ./tailwind-plugin.js ./dist/tailwind-plugin.js && cp ./tailwind-styling.js ./dist/tailwind-styling.js",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"473",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.14/x64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.11/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240616.1.0",npm_package_scripts_dev:"vite --port 5273",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.4/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18597",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"false",GITHUB_RUN_ID:"9655865271",STATS_VMFE:"true",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"ff86f0a13b67bc4d843069ae9d8a614c26962dd4",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/release/vue",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_fb9fb6a3-8670-48ba-ab8b-8b967e6f0ba0",INVOCATION_ID:"2840d7e9ab2345ec9ba95d75eab83187",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"72",GITHUB_TRIGGERING_ACTOR:"sp0033212000",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 343",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"release/vue",GITHUB_REPOSITORY:"feedmepos/ui-library",STATS_D_D:"false",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"1.2.8",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"ff86f0a13b67bc4d843069ae9d8a614c26962dd4",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/release/vue",GITHUB_ACTOR:"sp0033212000",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",LEIN_HOME:"/usr/local/lib/lein",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_0b117e10-523d-41eb-afa9-852749c218a0",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"56681081",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_0b117e10-523d-41eb-afa9-852749c218a0",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_0b117e10-523d-41eb-afa9-852749c218a0",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};function Mt(t,e){return typeof t=="function"?t(e):t}function Re(t,e){return n=>{e.setState(o=>({...o,[t]:Mt(n,o[t])}))}}function ur(t){return t instanceof Function}function Xx(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function Gx(t,e){const n=[],o=i=>{i.forEach(s=>{n.push(s);const a=e(s);a!=null&&a.length&&o(a)})};return o(t),n}function Y(t,e,n){let o=[],i;return s=>{let a;n.key&&n.debug&&(a=Date.now());const l=t(s);if(!(l.length!==o.length||l.some((u,f)=>o[f]!==u)))return i;o=l;let c;if(n.key&&n.debug&&(c=Date.now()),i=e(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-c)*100)/100,p=f/16,m=(h,g)=>{for(h=String(h);h.length<g;)h=" "+h;return h};console.info(`%c⏱ ${m(f,5)} /${m(u,5)} ms`,`
78
+ `;Nc(Gk),ns.render=Xk,ns.__scopeId="data-v-60be6971";var qk=(()=>{const t=ns;return t.install=e=>{e.component("CountryFlag",t)},t})();const Jk=qk,Kk={class:"flex items-center justify-center w-[20px] overflow-hidden"},Mc=Z(r.defineComponent({__name:"FmCountryFlag",props:{countryCode:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Kk,[r.createVNode(r.unref(Jk),{country:e.countryCode,class:"fm-country-flag flex-shrink-0"},null,8,["country"])]))}}),[["__scopeId","data-v-66513277"]]),Zk={class:"flex gap-4"},$k=r.defineComponent({__name:"FmPhoneNumber",props:{modelValue:{},defaultCountry:{default:"MY"},extraCountryCodes:{default:()=>[]},placeholder:{default:""},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.inject(re,null),i=e,s=J(n,"modelValue"),a=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),l=r.ref(["MY","SG","ID",...n.extraCountryCodes]),d=l.value.reduce((y,S)=>(y[S]=`+${Qk(S)}`,y),{}),c=l.value.map(y=>({label:"",value:y}));function u(y){var S;return y?((S=Object.entries(d).find(([,v])=>y.startsWith(v)))==null?void 0:S[0])??null:n.defaultCountry}const f=r.computed(()=>u(n.modelValue)),p=r.computed(()=>!f.value||!n.modelValue?d[n.defaultCountry]:n.modelValue),m=r.computed({get(){const y=es(p.value);return y?y.formatInternational().replace(d[f.value],"").trim():p.value.replace(d[f.value],"").trim()},set(y){const S=`${d[f.value]}${y}`,v=es(S);if(!v){s.value=S;return}s.value=v.formatInternational()}}),h=r.computed({get(){return f.value??n.defaultCountry},set(y){if(!f.value){i("update:modelValue",d[n.defaultCountry]);return}const v=d[f.value],w=d[y];s.value=p.value.replace(v,w)}}),g=r.ref({dropdown:!1,textField:!1});function b(y){const S=f.value;if(!y.replace(d[S],"").trim().length)return!0;const w=es(s.value,S);return!w||!w.isValid()?"Invalid phone number":!0}return(y,S)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(s),"onUpdate:modelValue":S[4]||(S[4]=v=>r.isRef(s)?s.value=v:null),disabled:a.value,focused:g.value.dropdown||g.value.textField,"helper-state":y.helperState,"helper-text":y.helperText,info:y.labelInfo,label:y.label,optional:y.labelMark==="optional",required:y.labelMark==="required",rules:[...y.rules,b],class:"flex gap-4"},r.createSlots({default:r.withCtx(({invalid:v})=>[r.createElementVNode("div",Zk,[r.createVNode(mn,{"model-value":h.value,"onUpdate:modelValue":S[0]||(S[0]=w=>h.value=w),disabled:a.value,items:r.unref(c),onDropdownChanged:S[1]||(S[1]=w=>g.value.dropdown=w)},{default:r.withCtx(()=>[r.createVNode(Mc,{"country-code":h.value},null,8,["country-code"])]),"menu-wrapper":r.withCtx(({handleItemChange:w})=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,x=>(r.openBlock(),r.createBlock(xe,{key:x,"model-value":h.value===x,"onUpdate:modelValue":F=>w(F,r.unref(c).find(E=>E.value===x))},{label:r.withCtx(()=>[r.createVNode(Mc,{"country-code":x},null,8,["country-code"])]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:1},8,["model-value","disabled","items"]),r.createVNode(ts,{"model-value":m.value,"onUpdate:modelValue":S[2]||(S[2]=w=>m.value=w),disabled:a.value,invalid:v,class:"flex-1",inputmode:"tel",onFocusChanged:S[3]||(S[3]=w=>g.value.textField=w)},{prepend:r.withCtx(()=>[r.createElementVNode("span",{class:r.normalizeClass([a.value?"text-fm-color-typo-disabled":""])},"("+r.toDisplayString(r.unref(d)[f.value])+")",3)]),_:2},1032,["model-value","disabled","invalid"])])]),_:2},[y.label||y.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"label")]),key:"0"}:void 0,y.helperText||y.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),_k={class:"flex gap-8 items-center"},e8=["onInput","onKeydown"],t8=Z(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"},isError:{type:Boolean}},emits:["update:modelValue","complete"],setup(t,{emit:e}){const n=e,o=t,i=J(o,"modelValue"),s=r.ref([]),a=(f,p)=>{const m=f.target;if(o.type==="number"&&!/^[0-9]$/g.test(m.value)){m.value="";return}m.value=m.value.slice(-1),c(m.value,p),s.value[p+1]?s.value[p+1].focus():s.value[p].blur()},l=(f,p)=>{f.preventDefault();const m=f.target;m.value="",c(null,p),s.value[p-1]?s.value[p-1].focus():s.value[p].focus()},d=(f,p)=>{f.preventDefault(),f.key==="ArrowLeft"&&(s.value[p-1]?s.value[p-1].focus():s.value[p].focus()),f.key==="ArrowRight"&&(s.value[p+1]?s.value[p+1].focus():s.value[p].focus())},c=(f,p)=>{i.value=i.value.toSpliced(p,1,f)},u=(f,p)=>{s.value[p]=f};return r.onMounted(()=>{i.value=Array.from(Array(o.length).fill(null))}),r.watch(()=>i.value,()=>{i.value.every(f=>f!==null)&&n("complete",i.value.join(""))}),(f,p)=>(r.openBlock(),r.createElementBlock("div",_k,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.length,(m,h)=>(r.openBlock(),r.createElementBlock("input",{key:m,ref_for:!0,ref:g=>u(g,h),class:r.normalizeClass(["fm-pin-field",{[f.isError?"fm-pin-field--error":"fm-pin-field--populated"]:r.unref(i)[h]!==null}]),type:"text",onInput:g=>a(g,h),onKeydown:[r.withKeys(g=>l(g,h),["backspace"]),r.withKeys(g=>d(g,h),["arrow-left","arrow-right"])]},null,42,e8))),128))]))}}),[["__scopeId","data-v-69d9a64d"]]),n8={class:"fm-radio-btn"},o8={class:"fm-radio-btn__input--container"},r8=["checked","disabled","value"],i8={class:"py-8"},s8={class:"fm-typo-en-body-lg-400"},a8={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},l8=Z(r.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue"),o=r.ref(),i=r.inject(Qs,null),s=r.inject(re,null),a=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=r.computed(()=>e.disabled??(i==null?void 0:i.getDisabled())??(s==null?void 0:s.getDisabled())??!1),d=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(c,u)=>{const f=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",n8,[r.createElementVNode("label",{class:r.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value}),onClick:a},[r.withDirectives((r.openBlock(),r.createElementBlock("div",o8,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:d.value,disabled:l.value,value:c.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,r8)])),[[f,!l.value]]),r.createElementVNode("div",i8,[r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",s8,r.toDisplayString(c.label),1),c.sublabel?(r.openBlock(),r.createElementBlock("div",a8,r.toDisplayString(c.sublabel),1)):r.createCommentVNode("",!0)],!0)])],2)])}}}),[["__scopeId","data-v-2eaf3939"]]),d8=r.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue"),o=r.inject(re,null);r.provide(Qs,{groupValue:n,getDisabled:()=>i.value,updateValue(s){n.value=s}});const i=r.computed(()=>e.disabled??(o==null?void 0:o.getDisabled())??!1);return(s,a)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(n),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(n)?n.value=l:null),disabled:i.value,"helper-state":s.helperState,"helper-text":s.helperText,info:s.labelInfo,label:s.label,optional:s.labelMark==="optional",required:s.labelMark==="required",rules:s.rules},{label:r.withCtx(()=>[r.renderSlot(s.$slots,"label")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":s.inline})},[r.renderSlot(s.$slots,"default")],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(s.$slots,"helper-text")]),_:3},8,["modelValue","disabled","helper-state","helper-text","info","label","optional","required","rules"]))}}),os=r.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>{const{modelValue:p,disabled:m,...h}=e;return h}),i=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),s=J(e,"modelValue"),a=r.ref(!1),l=r.ref(),d=r.ref(e.collapsible),c=r.ref(e.collapsible);function u(){d.value=!1,r.nextTick(()=>{var p,m,h,g;(g=(h=(m=(p=l.value)==null?void 0:p.querySelector)==null?void 0:m.call(p,"input"))==null?void 0:h.focus)==null||g.call(h)})}function f(p){if(a.value=p,!!e.collapsible){if(p){c.value=!1;return}d.value=s.value.length===0,d.value&&setTimeout(()=>{c.value=!0},250)}}return(p,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:l,class:"flex items-center justify-end min-w-48 relative"},[r.createVNode(ts,r.mergeProps({modelValue:r.unref(s),"onUpdate:modelValue":m[1]||(m[1]=h=>r.isRef(s)?s.value=h:null),class:["transition-all",{"opacity-100":!p.collapsible||!d.value,"opacity-0 pointer-events-none":p.collapsible&&d.value}],disabled:i.value||p.collapsible&&d.value,style:{width:p.collapsible&&d.value?"24px":"100%"}},o.value,{onFocusChanged:f}),r.createSlots({_:2},[a.value?void 0:{name:"prepend",fn:r.withCtx(()=>[r.createVNode(Q,{name:"search"})]),key:"0"},r.unref(s).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(Q,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:m[0]||(m[0]=h=>s.value="")})]),key:"1"}:void 0]),1040,["modelValue","class","disabled","style"]),p.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute top-0 right-0",d.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:d.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(G,{icon:"search",variant:"tertiary",onClick:u})],6)):r.createCommentVNode("",!0)],512))}}),c8={key:0,class:"flex fm-typo-en-title-sm-800 items-center justify-between text-fm-color-typo-primary"},u8={key:0},f8={class:"overflow-y-auto"},p8={key:1,class:"flex gap-8 items-center"},Oc=Z(r.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0},zIndex:{default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>n.value=!0)},[r.renderSlot(o.$slots,"top-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:i[1]||(i[1]=s=>n.value=!1)},{default:r.withCtx(()=>[r.createVNode(r.Transition,{name:o.fullscreenSize?`slide-${o.fullscreenSize}`:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${o.fullscreenSize}`])},[o.header||o.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",c8,[r.renderSlot(o.$slots,"top-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",u8,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",f8,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",p8,[r.renderSlot(o.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-2e7518aa"]]);var rs={exports:{}};function Ic(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,s,a,l,d;function c(){const f=Date.now()-l;if(f<e&&f>=0)a=setTimeout(c,e-f);else if(a=void 0,!o){const p=i,m=s;i=void 0,s=void 0,d=t.apply(p,m)}}const u=function(...f){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,s=f,l=Date.now();const p=o&&!a;if(a||(a=setTimeout(c,e)),p){const m=i,h=s;i=void 0,s=void 0,d=t.apply(m,h)}return d};return u.clear=()=>{a&&(clearTimeout(a),a=void 0)},u.flush=()=>{if(!a)return;const f=i,p=s;i=void 0,s=void 0,d=t.apply(f,p),clearTimeout(a),a=void 0},u}rs.exports.debounce=Ic,rs.exports=Ic;var m8=rs.exports;const is=Di(m8);var Rc={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(s){return n.test(o,s)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,s){s=s||{};var a=0,l=[],d=i.length,c=0,u=0,f=s.pre||"",p=s.post||"",m=s.caseSensitive&&i||i.toLowerCase(),h;o=s.caseSensitive&&o||o.toLowerCase();for(var g=0;g<d;g++)h=i[g],m[g]===o[a]?(h=f+h+p,a+=1,u+=1+u):u=0,c+=u,l[l.length]=h;return a===o.length?(c=m===o?1/0:c,{rendered:l.join(""),score:c}):null},n.filter=function(o,i,s){return!i||i.length===0?[]:typeof o!="string"?i:(s=s||{},i.reduce(function(a,l,d,c){var u=l;s.extract&&(u=s.extract(l));var f=n.match(o,u,s);return f!=null&&(a[a.length]={string:f.rendered,score:f.score,index:d,original:l}),a},[]).sort(function(a,l){var d=l.score-a.score;return d||a.index-l.index}))}})()})(Rc);var h8=Rc.exports;const g8=Di(h8);function dr(t,e){const[n]=g8.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,s,a)=>(i.push({segment:s,isMatch:a%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const b8={class:"flex flex-col gap-4"},y8={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},k8={class:"hidden sm:inline xs:inline"},x8={key:0},S8={key:0,class:"flex flex-col"},C8={class:"flex flex-col"},w8={class:"flex items-center px-24 py-12"},A8=r.createElementVNode("div",{class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),v8=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),B8=["onClick"],D8={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},V8={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},P8={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},E8={key:3,class:"flex flex-col"},F8=["onClick"],N8={class:"flex flex-col gap-4"},M8={key:0,class:"text-fm-color-typo-secondary"},O8={class:"px-16 py-4"},I8=5,R8=r.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const I=n.recentSearchKey;localStorage.removeItem(I),l.value=[]}function s(){if(!n.recentSearchKey)return;const I=n.recentSearchKey,N=localStorage.getItem(I);if(!N)return[];try{return JSON.parse(N)}catch{return new Array}}const a=is(function(N){if(!n.recentSearchKey)return;const C=n.recentSearchKey,D=N().trim();if(!C||!D)return;const A=s()??[],k=[...new Set([D,...A])].slice(0,I8),B=JSON.stringify(k);return localStorage.setItem(C,B),l.value=k,k},800),l=r.ref(s()),d=J(n,"show");r.watch([()=>n.show],()=>{n.show?(f.value=null,n.suggestions&&S()):o("dismiss")});const c=J(n,"modelValue"),u=r.ref(n.modelValue);r.watch([()=>u.value],()=>{w()});const f=r.ref(null),p=r.ref(!0),m=r.computed(()=>{var I;return p.value?(I=f.value)==null?void 0:I.slice(0,5):f.value});r.watch([()=>f.value],([])=>{p.value=!0});const h=r.computed(()=>f.value===null),g=r.ref(!1),b=r.ref(""),y=()=>u.value;async function S(){if(!d.value)return;const I=y();if(!I)return;const N=Math.random().toString();if(b.value=N,n.suggestions){f.value=n.suggestions.map(C=>({label:dr(I,C.label),sublabel:C.sublabel?dr(I,C.sublabel):null})).filter(C=>{var D;return C.label.matched||((D=C.sublabel)==null?void 0:D.matched)}),a(y);return}if(n.onSearch)try{g.value=!0;const C=await n.onSearch(I);N===b.value&&(f.value=C.map(D=>({label:dr(I,D.label),sublabel:D.sublabel?dr(I,D.sublabel):null})))}catch{N===b.value&&(f.value=[])}finally{N===b.value&&(g.value=!1,a(y))}}function v(I){d.value=!1,o("dismiss"),c.value=I}const w=is(S),x=r.computed(()=>l.value&&l.value.length===0),F=r.computed(()=>(!u.value||h.value)&&!x.value),E=r.computed(()=>(!u.value||h.value)&&x.value),M=r.computed(()=>u.value&&f.value&&f.value.length===0);return(I,N)=>(r.openBlock(),r.createBlock(Oc,{"model-value":r.unref(d),"onUpdate:modelValue":N[4]||(N[4]=C=>r.isRef(d)?d.value=C:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var C,D;return[r.createElementVNode("div",b8,[r.createElementVNode("div",y8,[r.createElementVNode("div",k8,[r.createVNode(G,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:N[0]||(N[0]=A=>d.value=!1)})]),r.createVNode(os,{"model-value":u.value,"onUpdate:modelValue":N[1]||(N[1]=A=>u.value=A),class:"flex-1",placeholder:I.placeholder},null,8,["model-value","placeholder"])]),g.value?(r.openBlock(),r.createElementBlock("div",x8,[r.createVNode(tn,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[F.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[I.recentSearchKey&&((C=l.value)!=null&&C.length)?(r.openBlock(),r.createElementBlock("div",S8,[r.createElementVNode("div",C8,[r.createElementVNode("div",w8,[A8,r.createVNode(St),r.createVNode(G,{label:"Clear history",variant:"plain",size:"md",onClick:N[2]||(N[2]=A=>i())})]),v8]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(A,k)=>(r.openBlock(),r.createElementBlock("div",{key:k,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:B=>u.value=A},[r.createVNode(Q,{size:"lg",name:"history"}),r.createElementVNode("div",D8,r.toDisplayString(A),1)],8,B8))),128))])])):r.createCommentVNode("",!0)],64)):E.value?r.renderSlot(I.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",V8,r.toDisplayString(I.hintPlaceholder),1)]):M.value?r.renderSlot(I.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",P8,r.toDisplayString(I.notFoundPlaceholder||`No result found for “${u.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",E8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(A,k)=>r.renderSlot(I.$slots,"search-result-item",r.mergeProps({key:k},{result:A}),()=>[r.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:B=>v(A.label.label)},[r.createVNode(Q,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",N8,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.label.segments,(B,V)=>(r.openBlock(),r.createElementBlock("span",{key:V,class:r.normalizeClass({"fm-typo-en-body-lg-400":!B.isMatch,"fm-typo-en-body-lg-600":B.isMatch})},r.toDisplayString(B.segment),3))),128))]),A.sublabel?(r.openBlock(),r.createElementBlock("div",M8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.sublabel.segments,(B,V)=>(r.openBlock(),r.createElementBlock("span",{key:V,class:r.normalizeClass({"fm-typo-en-body-md-400":!B.isMatch,"fm-typo-en-body-md-600":B.isMatch})},r.toDisplayString(B.segment),3))),128))])):r.createCommentVNode("",!0)])],8,F8)])),128)),r.createElementVNode("div",O8,[p.value&&(((D=f.value)==null?void 0:D.length)??0)>5?(r.openBlock(),r.createBlock(G,{key:0,label:`show ${f.value.length-5} more results`,variant:"plain",onClick:N[3]||(N[3]=A=>p.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),T8=["disabled","inputMode","placeholder","readOnly","value"],z8={key:0},L8=["disabled"],H8=["disabled"],U8=Z(r.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),{isFocused:s,blur:a,focus:l}=xn(),d=r.ref(null);let c;const u=w=>{if(w!==""){const x=+w.replace(/,/g,"");return isNaN(x)?null:x}return null},f=w=>c.format(w),p=w=>{if(typeof i.value!="number"){i.value=+i.value;return}if(w>0&&y.value||w<0&&S.value)return;let x=v(i.value)?i.value+w:0;x=m(x),i.value=x},m=w=>e.max!==void 0&&w>e.max?e.max:e.min!==void 0&&w<e.min?e.min:w,h=()=>{var w;i.value=u(((w=d.value)==null?void 0:w.value)??"")},g=w=>{if(![...Array(10).keys()].map(x=>x.toString()).includes(w.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(w.key)){w.preventDefault();return}},b=r.computed(()=>i.value!=null?f(i.value):""),y=r.computed(()=>{let w=!1;return e.max!==void 0&&(w=i.value>=e.max),e.min!==void 0&&(w=i.value<e.min),w}),S=r.computed(()=>{let w=!1;return e.max!==void 0&&(w=i.value>e.max),e.min!==void 0&&(w=i.value<=e.min),w});r.onBeforeMount(()=>{c=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function v(w){return typeof w=="number"&&isFinite(w)}return(w,x)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":x[8]||(x[8]=F=>r.isRef(i)?i.value=F:null),disabled:o.value,focused:r.unref(s),"helper-state":w.helperState,"helper-text":w.helperText,info:w.labelInfo,label:w.label,optional:w.labelMark==="optional",required:w.labelMark==="required",rules:w.rules},{label:r.withCtx(()=>[r.renderSlot(w.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:F})=>[r.createVNode(de,{"append-icon":w.appendIcon,focused:r.unref(s),invalid:F,"prepend-icon":w.prependIcon,"show-valid-border":w.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(w.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([{"mr-32":w.showSteppers},"flex items-center justify-center"])},[w.appendText?(r.openBlock(),r.createElementBlock("div",z8,r.toDisplayString(w.appendText),1)):r.createCommentVNode("",!0),w.appendIcon?(r.openBlock(),r.createBlock(Q,{key:1,color:o.value?"#C7C7CC":"#1C1C1E",name:w.appendIcon,size:"md"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)],!0),w.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(s)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{disabled:o.value||y.value,class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onBlur:x[2]||(x[2]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[3]||(x[3]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onMousedown:x[4]||(x[4]=()=>p(w.step))},[r.createVNode(Q,{color:o.value||y.value?"#C7C7CC":"#1C1C1E",name:"expand_less",size:"md"},null,8,["color"])],40,L8),r.createElementVNode("button",{disabled:o.value||S.value,class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onBlur:x[5]||(x[5]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[6]||(x[6]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onMousedown:x[7]||(x[7]=()=>p(-w.step))},[r.createVNode(Q,{color:o.value||S.value?"#C7C7CC":"#1C1C1E",name:"expand_more",size:"md"},null,8,["color"])],40,H8)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:d,disabled:o.value,inputMode:w.inputmode,placeholder:w.placeholder,readOnly:w.readonly,value:b.value,class:"fm-stepper-field--input",type:"text",onBlur:x[0]||(x[0]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[1]||(x[1]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onInput:h,onKeydown:g},null,40,T8)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot(w.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-a5abfe4a"]]),j8=["disabled","maxlength","minlength","placeholder","readOnly","value"],Q8=Z(r.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),{isFocused:s,focus:a,blur:l}=xn(),d=c=>{i.value=c.target.value};return(c,u)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":u[2]||(u[2]=f=>r.isRef(i)?i.value=f:null),disabled:o.value,focused:r.unref(s),"helper-state":c.helperState,"helper-text":c.helperText,info:c.labelInfo,label:c.label,optional:c.labelMark==="optional",required:c.labelMark==="required",rules:c.rules},r.createSlots({label:r.withCtx(()=>[r.renderSlot(c.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:f})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(s),"fm-textarea__container--invalid":!!r.unref(i)&&f,"fm-textarea__container--valid":c.showValidBorder&&c.showSuccess&&!!r.unref(i)&&!f,"fm-textarea__container--disabled":o.value})},[r.createElementVNode("textarea",{class:r.normalizeClass({"fm-textarea--input fm-typo-en-body-lg-400":!0,"fm-color-typo-primary":!o.value,"fm-color-typo-disabled":o.value}),disabled:o.value,maxlength:c.maxLength,minlength:c.minLength,placeholder:c.placeholder,readOnly:c.readonly,value:r.unref(i),onBlur:u[0]||(u[0]=(...p)=>r.unref(l)&&r.unref(l)(...p)),onFocus:u[1]||(u[1]=(...p)=>r.unref(a)&&r.unref(a)(...p)),onInput:d},null,42,j8)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text",{},void 0,!0)]),_:2},[c.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([o.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-en-body-sm-400"])},r.toDisplayString(c.maxLength?`${r.unref(i).length} / ${c.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-bcae4c20"]]),W8={class:"flex flex-col fm-time-input items-center"},Y8=["value"],Tc=Z(r.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(t,{emit:e}){const n=t,o=e,i=r.ref();function s(u){i.value&&(i.value.value=u)}r.watch(()=>n.modelValue,s);function a(){if(!i.value)return;const u=l(i.value.value);if(u==null||u>n.max||u<n.min){s(n.modelValue);return}o("update:model-value",u)}function l(u){return u&&/^\d+$/.test(u)?Number(u):null}function d(){var u;(u=i.value)==null||u.focus(),o("update:model-value",l(n.modelValue)+1)}function c(){var u;(u=i.value)==null||u.focus(),o("update:model-value",l(n.modelValue)-1)}return(u,f)=>(r.openBlock(),r.createElementBlock("div",W8,[r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[r.createVNode(Q,{name:"expand_less",size:"lg"})]),r.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:a},null,40,Y8),r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[r.createVNode(Q,{name:"expand_more",size:"lg"})])]))}}),[["__scopeId","data-v-7e58409e"]]);var et=(t=>(t.AM="AM",t.PM="PM",t))(et||{});function tt(t){return t.toString().padStart(2,"0")}function X8(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),s=o>11?"PM":"AM";let a=o;return a===0?a=12:a>12&&(a-=12),`${tt(a)}:${tt(i)}:${s}`}function Ee(t){const[e,n,o]=X8(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function ss({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${tt(o)}:${tt(e)}`}const G8={class:"flex fm-time-input gap-16 items-center"},q8=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800"},":",-1),J8={class:"fm-time-input-periods"},K8=["onClick"],cr=r.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(s){const a={hours:s.hours??n.modelValue.hours,minutes:s.minutes??n.modelValue.minutes,period:s.period??n.modelValue.period},l=n.modelValue.hours;(l===12&&a.hours===11||l===11&&a.hours===12)&&(a.period=n.modelValue.period===et.AM?et.PM:et.AM),a.hours>12?a.hours=1:a.hours<1&&(a.hours=12),a.minutes>59?a.minutes=0:a.minutes<0&&(a.minutes=59),o("update:model-value",a)}return(s,a)=>(r.openBlock(),r.createElementBlock("div",G8,[r.createVNode(Tc,{"model-value":r.unref(tt)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":a[0]||(a[0]=l=>i({hours:l}))},null,8,["model-value"]),q8,r.createVNode(Tc,{"model-value":r.unref(tt)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":a[1]||(a[1]=l=>i({minutes:l}))},null,8,["model-value"]),r.createElementVNode("div",J8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(et),l=>(r.openBlock(),r.createElementBlock("div",{key:l,class:r.normalizeClass([{"fm-time-input-period__selected":l===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:l})},r.toDisplayString(l),11,K8))),128))])]))}}),Z8={class:"flex gap-8"},$8={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[343px]"},_8=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800 mb-8"},"Enter time",-1),ex={class:"flex items-center justify-center py-16 w-full"},tx={class:"flex justify-end"},nx=r.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=r.ref(null),a=r.computed(()=>{if(!i.value)return null;const{hours:c,minutes:u,period:f}=Ee(i.value);return`${tt(c)}:${tt(u)} ${f}`});function l(){if(!s.value){i.value=null;return}const c=ss(s.value);i.value=c,d.value=!1}r.onMounted(()=>{i.value&&(s.value=Ee(i.value))}),r.watch(()=>i.value,c=>{c&&(s.value=Ee(c))});const d=r.ref(!1);return r.watchEffect(()=>{o.value||(d.value?s.value=Ee(i.value??"00:00"):s.value=i.value?Ee(i.value):null)}),(c,u)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":u[3]||(u[3]=f=>r.isRef(i)?i.value=f:null),disabled:o.value,focused:d.value,"helper-state":c.helperState,"helper-text":c.helperText,info:c.labelInfo,label:c.label,optional:c.labelMark==="optional",required:c.labelMark==="required",rules:c.rules,"disable-auto-focus":"",tag:"div"},{label:r.withCtx(()=>[r.renderSlot(c.$slots,"label")]),default:r.withCtx(({invalid:f})=>[r.createVNode(mt,{disabled:o.value,"show-popover":d.value,"z-index":c.zIndex,onPopoverChanged:u[2]||(u[2]=p=>d.value=p)},{"popover-button":r.withCtx(()=>[c.$slots["trigger-button"]?r.renderSlot(c.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:f,dropdownShowed:d.value,showValidBorder:c.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(de,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:d.value,invalid:f,"show-valid-border":c.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",Z8,[r.createVNode(Q,{outline:!d.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!a.value},"grow"])},r.toDisplayString(a.value??c.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",$8,[_8,r.createElementVNode("div",ex,[r.createVNode(cr,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":u[0]||(u[0]=p=>s.value=p)},null,8,["model-value"])]),r.createElementVNode("div",tx,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:u[1]||(u[1]=p=>d.value=!1)}),r.createVNode(G,{label:"Apply",size:"md",variant:"primary",onClick:l})])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),ox={class:"flex gap-8"},rx={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300"},ix=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800 mb-8"},"Enter time",-1),sx={class:"flex flex-col gap-16 items-center justify-center py-16 w-full"},ax=r.createElementVNode("div",{class:"fm-typo-en-body-lg-600 text-left w-full"}," Starting Time ",-1),lx=r.createElementVNode("div",{class:"fm-typo-en-body-lg-600 text-left w-full"}," Ending Time ",-1),dx={class:"flex gap-8 items-center justify-end"},cx=r.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=r.ref(null),a=r.ref(null),l=r.computed(()=>{const g=Array.isArray(i.value);return!i.value||!g||g&&i.value.every(b=>!m(b))?null:i.value.map(b=>{const{hours:y,minutes:S,period:v}=Ee(b);return`${tt(y)}:${tt(S)} ${v}`}).join(" - ")});function d(){if(!s.value||!a.value){i.value=null;return}let g=!1;const b=s.value,y=a.value;(b.period===et.PM&&y.period===et.AM||b.period===y.period&&(b.hours>y.hours||b.hours===y.hours&&b.minutes>y.minutes))&&(g=!0);const S=ss(s.value),v=ss(a.value);i.value=g?[v,S]:[S,v],u()}r.onMounted(()=>{Array.isArray(i.value)&&i.value.every(g=>!!g)&&(s.value=Ee(i.value[0]),a.value=Ee(i.value[1]))}),r.watch(()=>i.value,g=>{const b=Array.isArray(g);g&&b&&g.every(y=>m(y))&&(s.value=Ee(g[0]),a.value=Ee(g[1]))});const c=r.ref();function u(){var g;(g=c.value)==null||g.hide()}const f=r.ref(!1);function p(g){var b,y,S,v;g?(s.value=Ee(((S=i.value)==null?void 0:S[0])??"00:00"),a.value=Ee(((v=i.value)==null?void 0:v[1])??"23:59")):(s.value=(b=i.value)!=null&&b[0]?Ee(i.value[0]):null,a.value=(y=i.value)!=null&&y[1]?Ee(i.value[1]):null),f.value=g}const m=g=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(g),h=r.computed(()=>ve(s.value,a.value));return(g,b)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":b[2]||(b[2]=y=>r.isRef(i)?i.value=y:null),disabled:o.value,focused:f.value,"helper-state":g.helperState,"helper-text":g.helperText,info:g.labelInfo,label:g.label,optional:g.labelMark==="optional",required:g.labelMark==="required",rules:g.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(g.$slots,"label")]),default:r.withCtx(({invalid:y})=>[r.createVNode(mt,{ref_key:"dropdownRef",ref:c,"show-popover":f.value,width:343,"z-index":e.zIndex,onPopoverChanged:p},{"popover-button":r.withCtx(()=>[g.$slots["trigger-button"]?r.renderSlot(g.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:y,dropdownShowed:f.value,showValidBorder:g.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(de,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:f.value,invalid:y,"show-valid-border":g.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",ox,[r.createVNode(Q,{outline:!f.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!l.value},"grow"])},r.toDisplayString(l.value??g.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",rx,[ix,r.createElementVNode("div",sx,[r.createElementVNode("div",null,[ax,r.createVNode(cr,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":b[0]||(b[0]=S=>s.value=S)},null,8,["model-value"])]),r.createElementVNode("div",null,[lx,r.createVNode(cr,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":b[1]||(b[1]=S=>a.value=S)},null,8,["model-value"])])]),r.createElementVNode("div",dx,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),r.createVNode(G,{disabled:h.value,label:"Apply",size:"md",variant:"primary",onClick:d},null,8,["disabled"])])])]),_:2},1032,["show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(g.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),as=Z(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[r.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-884ba127"]]),ls=Z(r.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;return(n,o)=>{const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled}),onClick:o[0]||(o[0]=r.withModifiers(()=>{},["prevent"]))},{default:r.withCtx(()=>[r.renderSlot(n.$slots,"prepend",{},void 0,!0),r.renderSlot(n.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-en-body-lg-400 line-clamp-1 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(n.label),3),n.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-md-400 line-clamp-2 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(n.sublabel),3)):r.createCommentVNode("",!0)])],!0),n.$slots.append?(r.openBlock(),r.createBlock(St,{key:0})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),[["__scopeId","data-v-884f99a5"]]);function ux(t){for(;t;){if(fx(t))return t;t=t.parentElement}return document.scrollingElement}function fx(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class px{constructor(e,n){H(this,"onScroll");H(this,"scrollParent");this.onScroll=n,this.scrollParent=ux(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const mx={class:"fm-menu__wrapper"},hx=Z(r.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(!1),s=r.ref(null),a=r.ref(null),{floatingStyles:l}=eo(s,a,{middleware:[Jn(4),_n()],placement:o.placement,whileElementsMounted:$n});let d;const c=n;e({show:()=>{i.value||(i.value=!0,c("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,c("dropdown-changed",i.value))}});const u=m=>{m.preventDefault(),m.stopPropagation(),!o.disabled&&(i.value=!i.value,c("dropdown-changed",i.value))},f=m=>{if(!i.value)return;const h=m.path||m.composedPath();for(const g of h)if(g==s.value||g==a.value)return;i.value=!1,c("dropdown-changed",i.value)},p=()=>{c("dropdown-changed",!1)};return r.watch(()=>o.showMenu,m=>i.value=m),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),d=new px(s.value,p),d.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",f),d.unbindScroll()}),(m,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-menu",onClick:u},[r.renderSlot(m.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:a,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(l))},[r.renderSlot(m.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",mx,[r.renderSlot(m.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),gx={class:"fm-typo-en-body-lg-600 mx-8 p-8 text-fm-color-typo-primary"},bx=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",gx,r.toDisplayString(e.label),1))}}),yx=t=>(r.pushScopeId("data-v-6d0e6490"),t=t(),r.popScopeId(),t),kx={class:"relative"},xx={class:"fm-progress-linear fm-typo-en-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},Sx=yx(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),Cx=Z(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(kn(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",kx,[r.createElementVNode("div",xx,[Sx,r.createElementVNode("span",{class:r.normalizeClass(["dash-1",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-6d0e6490"]]),wx={class:"flex fm-typo-en-title-sm-800 items-center justify-between text-fm-color-typo-primary"},Ax={key:0},vx={class:"h-full overflow-y-auto"},Bx={class:"pt-24"},Dx=Z(r.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0},maxWidth:{default:void 0},zIndex:{default:void 0},isContainer:{default:"div"},isContainerProps:{default:()=>({})}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>n.value=!0)},[r.renderSlot(o.$slots,"side-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:i[2]||(i[2]=s=>n.value=!1)},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.isContainer),r.mergeProps({class:[!o.maxWidth&&"max-w-[400px]","fm-side-sheet xs:w-full"],style:{maxWidth:`${o.maxWidth}px`}},o.isContainerProps),{default:r.withCtx(()=>[r.createElementVNode("div",wx,[r.renderSlot(o.$slots,"side-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",Ax,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0),o.closeButton?(r.openBlock(),r.createBlock(Q,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:i[1]||(i[1]=s=>n.value=!1)})):r.createCommentVNode("",!0)]),r.createElementVNode("div",vx,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Bx,[r.renderSlot(o.$slots,"side-sheet-footer",{},void 0,!0)])]),_:3},16,["class","style"]))]),_:3})]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-25ca39ba"]]),Vx={class:"flex"},Px={key:0,class:"mt-8"},zc=Z(r.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0},zIndex:{type:Number,default:1e3}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),s=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-en-body-lg-600"}:{text:n.description,classes:""}),a=r.computed(()=>n.bgColor?kn(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),l=r.computed(()=>n.color?kn(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(d,c)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({style:{zIndex:t.zIndex},class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"},a.value),[r.createElementVNode("div",Vx,[i.value.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:n.color??i.value.icon.color,name:i.value.icon.name,class:"mr-12"},null,8,["color","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(`${s.value.classes} grow ellipsis`)},r.toDisplayString(s.value.text),3),n.dismissable?(r.openBlock(),r.createBlock(Q,{key:1,class:"cursor-pointer",name:"close",style:{"{ flex":"none}"},onClick:c[0]||(c[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",Px,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(d.$slots,"actions",{},()=>[n.action?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:"mt-16 fm-typo-en-body-lg-600"},l.value),[r.createElementVNode("span",{class:"cursor-pointer",onClick:c[1]||(c[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-5fe933ca"]]),Ex={class:"fm-step-description fm-typo-en-body-sm-400 line-clamp-1 mt-4"},ds=r.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-en-title-sm-800":"fm-typo-en-body-md-400"])},r.toDisplayString(t.title),3)]),r.renderSlot(e.$slots,"description",{},()=>[r.createElementVNode("div",Ex,r.toDisplayString(t.description),1)])],2))}}),Fx=["data-title","data-description","data-disabled"],Nx={class:"flex fm-step-container gap-12 grow"},Mx=Z(r.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=r.inject(Ws);function i(){s.value||o(e.value)}const s=r.computed(()=>e.disabled?e.disabled():!1),a=r.computed(()=>e.error?e.error():!1),l=r.computed(()=>n()===e.value),d=r.computed(()=>e.complete()),c=r.computed(()=>l.value||d.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=r.computed(()=>l.value?{className:"bg-fm-color-primary"}:a.value?{config:{name:"warning",color:"system-error-300"}}:s.value?{className:"border-2 border-fm-color-neutral-gray-200"}:d.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,p)=>{const m=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":s.value,class:r.normalizeClass(`fm-step gap-4 grow ${s.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${c.value}`)},null,2)]),r.createElementVNode("div",Nx,[r.createElementVNode("div",{class:r.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",u.value.className])},[u.value.config?(r.openBlock(),r.createBlock(Q,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(ds,{title:t.title,description:t.description,disabled:s.value,class:"grow"},null,8,["title","description","disabled"])])],10,Fx)),[[m,!s.value]])}}}),[["__scopeId","data-v-ee172cad"]]),Ox={class:"hidden items-center xs:flex"},Ix={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},Rx=r.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=u=>{o("update:model-value",u)};r.provide(Ws,{currentStep:()=>n.modelValue,goToStep:i});const s=r.ref(),a=r.ref([]),l=r.computed(()=>a.value[n.modelValue-1]),d=r.computed(()=>`${n.modelValue} of ${a.value.length}`),c=()=>{var f;const u=Array.from(((f=s.value)==null?void 0:f.querySelectorAll(":scope > .fm-step"))??[]);a.value=u.map(p=>({title:p.dataset.title??"",description:p.dataset.description,disabled:p.dataset.disabled=="true"}))};return r.onMounted(()=>{c()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:s,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(u.$slots,"default")],2),r.createElementVNode("div",Ox,[r.createVNode(tn,{"current-step":t.modelValue,"total-steps":a.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(d.value),1)]),_:1},8,["current-step","total-steps"]),l.value?(r.openBlock(),r.createBlock(ds,{key:0,class:"grow","title-bold":"",title:l.value.title,description:l.value.description,disabled:l.value.disabled},null,8,["title","description","disabled"])):r.createCommentVNode("",!0)]),u.$slots.contents?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[r.renderSlot(u.$slots,"contents"),r.createElementVNode("div",Ix,[r.renderSlot(u.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let Tx=0;function zx(){return Tx++}const Lx=t=>(r.pushScopeId("data-v-93cbd978"),t=t(),r.popScopeId(),t),Hx=["disabled"],Ux=[Lx(()=>r.createElementVNode("div",{class:"fm-tab__indicator"},null,-1))],Lc=Z(r.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>zx()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,s=r.ref(!1);function a(f){n.value=f}const l=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},d=f=>{o.children.length!==0&&(s.value=f)},c=r.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{s.value=!1,i("update:modelValue",f)};return(f,p)=>(r.openBlock(),r.createBlock(_e,{"show-menu":s.value,disabled:f.children.length===0,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":f.vertical}]),placement:f.vertical?"right-start":"bottom-start",onMenuChanged:d},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass(["fm-tab",`fm-tab--${f.vertical?"vertical":"horizontal"}`,f.disabled?"cursor-not-allowed":"cursor-pointer",{"fm-tab--selected":c.value}]),disabled:f.disabled,type:"button",onMousedown:p[0]||(p[0]=()=>a(!0)),onMouseup:p[1]||(p[1]=()=>a(!1)),onMouseleave:p[2]||(p[2]=()=>a(!1)),onClick:l},[r.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(r.openBlock(),r.createBlock(Q,{key:0,name:f.icon,outline:!n.value&&!c.value,color:f.disabled?"neutral-gray-200":c.value?"primary":"neutral-black",size:"md"},null,8,["name","outline","color"])):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-en-body-lg-600 text-fm-color-typo-primary row-start-1 text-left",c.value?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:2,class:r.normalizeClass(["fm-typo-en-body-lg-400 row-start-1 text-left",f.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary",!c.value||f.disabled?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.badge?(r.openBlock(),r.createBlock(Tt,{key:3,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0),f.children.length>0?(r.openBlock(),r.createBlock(Q,{key:4,size:"md",name:s.value?"expand_less":"expand_more"},null,8,["name"])):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"append",{},void 0,!0),c.value?(r.openBlock(),r.createElementBlock("div",{key:5,class:r.normalizeClass([`fm-tab__indicator__wrapper--${f.vertical?"vertical":"horizontal"}`])},Ux,2)):r.createCommentVNode("",!0)],42,Hx)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.children,m=>(r.openBlock(),r.createBlock(xe,{key:m.value,"model-value":o.modelValue===m.value,label:m.label,icon:m.icon,disabled:m.disabled,onClick:h=>u(m.value)},{append:r.withCtx(()=>[m.badge?(r.openBlock(),r.createBlock(Tt,{key:0,value:m.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:3},8,["show-menu","disabled","class","placement"]))}}),[["__scopeId","data-v-93cbd978"]]),jx={class:"flex gap-8 h-48 items-center justify-end transition-all w-full xs:flex-wrap-reverse"},Qx={class:"flex flex-1 gap-8"},Wx=r.defineComponent({__name:"FmTableToolbar",props:{searchModel:{default:""},searchable:{type:Boolean},filterable:{type:Boolean},chips:{default:()=>[]},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["update:search-model","click:remove-chip"],setup(t){const e=t,{breakpoints:n}=xt(),o=r.computed(()=>{const l=[];e.searchable&&l.push({label:"Search",icon:"search",key:"search"}),e.filterable&&l.push({label:"Filter",icon:"filter_alt",key:"filter"});const d=l.concat(e.actions);if(n.value.xs){const[h,g,b,...y]=d;return y.length===0?{actionButtons:[h,g,b].filter(S=>S),collapse:y}:{actionButtons:[h,g].filter(S=>S),collapse:[b,...y]}}const[c,u,f,p,...m]=d;return m.length===0?{actionButtons:[c,u,f,p].filter(h=>h),collapse:m}:{actionButtons:[c,u,f].filter(h=>h),collapse:[p,...m]}}),i=r.ref(!1);function s(l){if(n.value.xs){l.stopPropagation(),i.value=!0;return}}const a=J(e,"searchModel");return(l,d)=>(r.openBlock(),r.createElementBlock("div",jx,[r.renderSlot(l.$slots,"chips",{},()=>[l.chips.length?(r.openBlock(),r.createBlock(Ir,{key:0,class:"min-w-0 mr-auto",items:l.chips,removable:"",onChipClosed:d[0]||(d[0]=c=>l.$emit("click:remove-chip",c))},null,8,["items"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",Qx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.actionButtons,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.key},[c.key==="search"?r.renderSlot(l.$slots,"action-search",{key:0},()=>[r.createVNode(os,{"model-value":r.unref(a),"onUpdate:modelValue":d[1]||(d[1]=u=>r.isRef(a)?a.value=u:null),class:"w-full",collapsible:""},null,8,["model-value"])]):r.renderSlot(l.$slots,`action-${c.key}`,{key:1},()=>[r.createVNode(G,{"prepend-icon":c.icon,variant:"tertiary",onClick:u=>l.$emit(`click:action-${c.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(r.openBlock(),r.createBlock(_e,{key:0},{"menu-button":r.withCtx(()=>[r.createVNode(G,{"prepend-icon":"more_vert",variant:"tertiary",onClick:s})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(xe,{key:c.key,label:c.label,icon:c.icon,onClick:u=>{l.$emit(`click:action-${c.key}`),i.value=!1}},null,8,["label","icon","onClick"]))),128))]),_:1})):r.createCommentVNode("",!0),l.$slots.append?r.renderSlot(l.$slots,"append",{key:1}):r.createCommentVNode("",!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Er,{modelValue:i.value,"onUpdate:modelValue":d[2]||(d[2]=c=>i.value=c),"dismiss-away":"","z-index":e.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(as,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(ls,{key:c.key,label:c.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:u=>{l.$emit(`click:action-${c.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue","z-index"])]))]))}});var Yx={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_7daff269-a023-4689-b09d-9961b5777368",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_config_user_agent:"pnpm/8.15.8 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_7daff269-a023-4689-b09d-9961b5777368",PIPX_HOME:"/opt/pipx",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-8.8",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.3.11579264",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_scripts_copy_tailwind_plugin:"cp ./tailwind-plugin.js ./dist/tailwind-plugin.js && cp ./tailwind-styling.js ./dist/tailwind-styling.js",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"471",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.14/x64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.11/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240616.1.0",npm_package_scripts_dev:"vite --port 5273",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.4/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18535",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"false",GITHUB_RUN_ID:"9659682525",STATS_VMFE:"true",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"a63fde063b429092d851a1ca64ffb366fb9ded41",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/release/vue",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_0d4e21e9-bffe-4d0a-b550-9e806c9db9c4",INVOCATION_ID:"1ebdb92d8fd748f29ea6ac4e778894cd",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"75",GITHUB_TRIGGERING_ACTOR:"sp0033212000",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 332",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"release/vue",GITHUB_REPOSITORY:"feedmepos/ui-library",STATS_D_D:"false",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"1.2.9-rc.1",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"a63fde063b429092d851a1ca64ffb366fb9ded41",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/release/vue",GITHUB_ACTOR:"sp0033212000",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",LEIN_HOME:"/usr/local/lib/lein",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_7daff269-a023-4689-b09d-9961b5777368",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"56681081",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_7daff269-a023-4689-b09d-9961b5777368",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_7daff269-a023-4689-b09d-9961b5777368",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};function Mt(t,e){return typeof t=="function"?t(e):t}function Re(t,e){return n=>{e.setState(o=>({...o,[t]:Mt(n,o[t])}))}}function ur(t){return t instanceof Function}function Xx(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function Gx(t,e){const n=[],o=i=>{i.forEach(s=>{n.push(s);const a=e(s);a!=null&&a.length&&o(a)})};return o(t),n}function Y(t,e,n){let o=[],i;return s=>{let a;n.key&&n.debug&&(a=Date.now());const l=t(s);if(!(l.length!==o.length||l.some((u,f)=>o[f]!==u)))return i;o=l;let c;if(n.key&&n.debug&&(c=Date.now()),i=e(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-c)*100)/100,p=f/16,m=(h,g)=>{for(h=String(h);h.length<g;)h=" "+h;return h};console.info(`%c⏱ ${m(f,5)} /${m(u,5)} ms`,`
79
79
  font-size: .6rem;
80
80
  font-weight: bold;
81
81
  color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function X(t,e,n,o){return{debug:()=>{var i;return(i=t==null?void 0:t.debugAll)!=null?i:t[e]},key:Yx.env.NODE_ENV==="development",onChange:o}}function qx(t,e,n,o){const i=()=>{var a;return(a=s.getValue())!=null?a:t.options.renderFallbackValue},s={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:Y(()=>[t,n,e,s],(a,l,d,c)=>({table:a,column:l,row:d,cell:c,getValue:c.getValue,renderValue:c.renderValue}),X(t.options,"debugCells"))};return t._features.forEach(a=>{a.createCell==null||a.createCell(s,n,e,t)},{}),s}function Jx(t,e,n,o){var i,s;const l={...t._getDefaultColumnDef(),...e},d=l.accessorKey;let c=(i=(s=l.id)!=null?s:d?d.replace(".","_"):void 0)!=null?i:typeof l.header=="string"?l.header:void 0,u;if(l.accessorFn?u=l.accessorFn:d&&(d.includes(".")?u=p=>{let m=p;for(const g of d.split(".")){var h;m=(h=m)==null?void 0:h[g]}return m}:u=p=>p[l.accessorKey]),!c)throw new Error;let f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:l,columns:[],getFlatColumns:Y(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(m=>m.getFlatColumns())]},X(t.options,"debugColumns")),getLeafColumns:Y(()=>[t._getOrderColumnsFn()],p=>{var m;if((m=f.columns)!=null&&m.length){let h=f.columns.flatMap(g=>g.getLeafColumns());return p(h)}return[f]},X(t.options,"debugColumns"))};for(const p of t._features)p.createColumn==null||p.createColumn(f,t);return f}const Be="debugHeaders";function Hc(t,e,n){var o;let s={id:(o=n.id)!=null?o:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],l=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(l),a.push(d)};return l(s),a},getContext:()=>({table:t,header:s,column:e})};return t._features.forEach(a=>{a.createHeader==null||a.createHeader(s,t)}),s}const Kx={createTable:t=>{t.getHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var s,a;const l=(s=o==null?void 0:o.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?s:[],d=(a=i==null?void 0:i.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?a:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return fr(e,[...l,...c,...d],t)},X(t.options,Be)),t.getCenterHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(s=>!(o!=null&&o.includes(s.id))&&!(i!=null&&i.includes(s.id))),fr(e,n,t,"center")),X(t.options,Be)),t.getLeftHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?i:[];return fr(e,s,t,"left")},X(t.options,Be)),t.getRightHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?i:[];return fr(e,s,t,"right")},X(t.options,Be)),t.getFooterGroups=Y(()=>[t.getHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getLeftFooterGroups=Y(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getCenterFooterGroups=Y(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getRightFooterGroups=Y(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getFlatHeaders=Y(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getLeftFlatHeaders=Y(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getCenterFlatHeaders=Y(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getRightFlatHeaders=Y(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getCenterLeafHeaders=Y(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),X(t.options,Be)),t.getLeftLeafHeaders=Y(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),X(t.options,Be)),t.getRightLeafHeaders=Y(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),X(t.options,Be)),t.getLeafHeaders=Y(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,s,a,l,d,c;return[...(i=(s=e[0])==null?void 0:s.headers)!=null?i:[],...(a=(l=n[0])==null?void 0:l.headers)!=null?a:[],...(d=(c=o[0])==null?void 0:c.headers)!=null?d:[]].map(u=>u.getLeafHeaders()).flat()},X(t.options,Be))}};function fr(t,e,n,o){var i,s;let a=0;const l=function(p,m){m===void 0&&(m=1),a=Math.max(a,m),p.filter(h=>h.getIsVisible()).forEach(h=>{var g;(g=h.columns)!=null&&g.length&&l(h.columns,m+1)},0)};l(t);let d=[];const c=(p,m)=>{const h={depth:m,id:[o,`${m}`].filter(Boolean).join("_"),headers:[]},g=[];p.forEach(b=>{const y=[...g].reverse()[0],S=b.column.depth===h.depth;let v,w=!1;if(S&&b.column.parent?v=b.column.parent:(v=b.column,w=!0),y&&(y==null?void 0:y.column)===v)y.subHeaders.push(b);else{const x=Hc(n,v,{id:[o,m,v.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${g.filter(F=>F.column===v).length}`:void 0,depth:m,index:g.length});x.subHeaders.push(b),g.push(x)}h.headers.push(b),b.headerGroup=h}),d.push(h),m>0&&c(g,m-1)},u=e.map((p,m)=>Hc(n,p,{depth:a,index:m}));c(u,a-1),d.reverse();const f=p=>p.filter(h=>h.column.getIsVisible()).map(h=>{let g=0,b=0,y=[0];h.subHeaders&&h.subHeaders.length?(y=[],f(h.subHeaders).forEach(v=>{let{colSpan:w,rowSpan:x}=v;g+=w,y.push(x)})):g=1;const S=Math.min(...y);return b=b+S,h.colSpan=g,h.rowSpan=b,{colSpan:g,rowSpan:b}});return f((i=(s=d[0])==null?void 0:s.headers)!=null?i:[]),d}const cs=(t,e,n,o,i,s,a)=>{let l={id:e,index:o,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(l._valuesCache.hasOwnProperty(d))return l._valuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return l._valuesCache[d]=c.accessorFn(l.original,o),l._valuesCache[d]},getUniqueValues:d=>{if(l._uniqueValuesCache.hasOwnProperty(d))return l._uniqueValuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(l._uniqueValuesCache[d]=c.columnDef.getUniqueValues(l.original,o),l._uniqueValuesCache[d]):(l._uniqueValuesCache[d]=[l.getValue(d)],l._uniqueValuesCache[d])},renderValue:d=>{var c;return(c=l.getValue(d))!=null?c:t.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>Gx(l.subRows,d=>d.subRows),getParentRow:()=>l.parentId?t.getRow(l.parentId,!0):void 0,getParentRows:()=>{let d=[],c=l;for(;;){const u=c.getParentRow();if(!u)break;d.push(u),c=u}return d.reverse()},getAllCells:Y(()=>[t.getAllLeafColumns()],d=>d.map(c=>qx(t,l,c,c.id)),X(t.options,"debugRows")),_getAllCellsByColumnId:Y(()=>[l.getAllCells()],d=>d.reduce((c,u)=>(c[u.column.id]=u,c),{}),X(t.options,"debugRows"))};for(let d=0;d<t._features.length;d++){const c=t._features[d];c==null||c.createRow==null||c.createRow(l,t)}return l},Zx={createColumn:(t,e)=>{t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}},Uc=(t,e,n)=>{var o;const i=n.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};Uc.autoRemove=t=>Ge(t);const jc=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};jc.autoRemove=t=>Ge(t);const Qc=(t,e,n)=>{var o;return((o=t.getValue(e))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(n==null?void 0:n.toLowerCase())};Qc.autoRemove=t=>Ge(t);const Wc=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};Wc.autoRemove=t=>Ge(t)||!(t!=null&&t.length);const Yc=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});Yc.autoRemove=t=>Ge(t)||!(t!=null&&t.length);const Xc=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});Xc.autoRemove=t=>Ge(t)||!(t!=null&&t.length);const Gc=(t,e,n)=>t.getValue(e)===n;Gc.autoRemove=t=>Ge(t);const qc=(t,e,n)=>t.getValue(e)==n;qc.autoRemove=t=>Ge(t);const us=(t,e,n)=>{let[o,i]=n;const s=t.getValue(e);return s>=o&&s<=i};us.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,s=e===null||Number.isNaN(o)?-1/0:o,a=n===null||Number.isNaN(i)?1/0:i;if(s>a){const l=s;s=a,a=l}return[s,a]},us.autoRemove=t=>Ge(t)||Ge(t[0])&&Ge(t[1]);const bt={includesString:Uc,includesStringSensitive:jc,equalsString:Qc,arrIncludes:Wc,arrIncludesAll:Yc,arrIncludesSome:Xc,equals:Gc,weakEquals:qc,inNumberRange:us};function Ge(t){return t==null||t===""}const $x={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],...t}),getDefaultOptions:t=>({onColumnFiltersChange:Re("columnFilters",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);return typeof o=="string"?bt.includesString:typeof o=="number"?bt.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?bt.equals:Array.isArray(o)?bt.arrIncludes:bt.weakEquals},t.getFilterFn=()=>{var n,o;return ur(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(o=e.options.filterFns)==null?void 0:o[t.columnDef.filterFn])!=null?n:bt[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,o,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((o=e.options.enableColumnFilters)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,o;return(n=(o=e.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(o=>{const i=t.getFilterFn(),s=o==null?void 0:o.find(u=>u.id===t.id),a=Mt(n,s?s.value:void 0);if(Jc(i,a,t)){var l;return(l=o==null?void 0:o.filter(u=>u.id!==t.id))!=null?l:[]}const d={id:t.id,value:a};if(s){var c;return(c=o==null?void 0:o.map(u=>u.id===t.id?d:u))!=null?c:[]}return o!=null&&o.length?[...o,d]:[d]})}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var s;return(s=Mt(e,i))==null?void 0:s.filter(a=>{const l=n.find(d=>d.id===a.id);if(l){const d=l.getFilterFn();if(Jc(d,a.value,l))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(o)},t.resetColumnFilters=e=>{var n,o;t.setColumnFilters(e?[]:(n=(o=t.initialState)==null?void 0:o.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel())}};function Jc(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const fs={sum:(t,e,n)=>n.reduce((o,i)=>{const s=i.getValue(t);return o+(typeof s=="number"?s:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(s=>{const a=s.getValue(t);a!=null&&(o===void 0?a>=a&&(o=i=a):(o>a&&(o=a),i<a&&(i=a)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let s=i.getValue(t);s!=null&&(s=+s)>=s&&(++n,o+=s)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(s=>s.getValue(t));if(!Xx(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((s,a)=>s-a);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},unique:(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),uniqueCount:(t,e)=>new Set(e.map(n=>n.getValue(t))).size,count:(t,e)=>e.length},_x={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Re("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(o=>o!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,o;return((n=t.columnDef.enableGrouping)!=null?n:!0)&&((o=e.options.enableGrouping)!=null?o:!0)&&(!!t.accessorFn||!!t.columnDef.getGroupingValue)},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);if(typeof o=="number")return fs.sum;if(Object.prototype.toString.call(o)==="[object Date]")return fs.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return ur(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(o=e.options.aggregationFns)==null?void 0:o[t.columnDef.aggregationFn])!=null?n:fs[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,o;t.setGrouping(e?[]:(n=(o=t.initialState)==null?void 0:o.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const o=e.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(t._groupingValuesCache[n]=o.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,o)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function eS(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(s=>!e.includes(s.id));return n==="remove"?o:[...e.map(s=>t.find(a=>a.id===s)).filter(Boolean),...o]}const tS={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Re("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=Y(n=>[ro(e,n)],n=>n.findIndex(o=>o.id===t.id),X(e.options,"debugColumns")),t.getIsFirstColumn=n=>{var o;return((o=ro(e,n)[0])==null?void 0:o.id)===t.id},t.getIsLastColumn=n=>{var o;const i=ro(e,n);return((o=i[i.length-1])==null?void 0:o.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=Y(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let s=[];if(!(e!=null&&e.length))s=i;else{const a=[...e],l=[...i];for(;l.length&&a.length;){const d=a.shift(),c=l.findIndex(u=>u.id===d);c>-1&&s.push(l.splice(c,1)[0])}s=[...s,...l]}return eS(s,n,o)},X(t.options,"debugTable"))}},ps=()=>({left:[],right:[]}),nS={getInitialState:t=>({columnPinning:ps(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Re("columnPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var s,a;if(n==="right"){var l,d;return{left:((l=i==null?void 0:i.left)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((d=i==null?void 0:i.right)!=null?d:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(f=>!(o!=null&&o.includes(f))),right:((a=i==null?void 0:i.right)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,s,a;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((s=(a=e.options.enableColumnPinning)!=null?a:e.options.enablePinning)!=null?s:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(l=>l.id),{left:o,right:i}=e.getState().columnPinning,s=n.some(l=>o==null?void 0:o.includes(l)),a=n.some(l=>i==null?void 0:i.includes(l));return s?"left":a?"right":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();return i?(n=(o=e.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.getCenterVisibleCells=Y(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const s=[...o??[],...i??[]];return n.filter(a=>!s.includes(a.column.id))},X(e.options,"debugRows")),t.getLeftVisibleCells=Y(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,o)=>(o??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),X(e.options,"debugRows")),t.getRightVisibleCells=Y(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),X(e.options,"debugRows"))},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,o;return t.setColumnPinning(e?ps():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:ps())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,s;return!!((i=o.left)!=null&&i.length||(s=o.right)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=Y(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),X(t.options,"debugColumns")),t.getRightLeafColumns=Y(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),X(t.options,"debugColumns")),t.getCenterLeafColumns=Y(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(s=>!i.includes(s.id))},X(t.options,"debugColumns"))}},pr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ms=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),oS={getDefaultColumnDef:()=>pr,getInitialState:t=>({columnSizing:{},columnSizingInfo:ms(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Re("columnSizing",t),onColumnSizingInfoChange:Re("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const s=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:pr.minSize,(o=s??t.columnDef.size)!=null?o:pr.size),(i=t.columnDef.maxSize)!=null?i:pr.maxSize)},t.getStart=Y(n=>[n,ro(e,n),e.getState().columnSizing],(n,o)=>o.slice(0,t.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),X(e.options,"debugColumns")),t.getAfter=Y(n=>[n,ro(e,n),e.getState().columnSizing],(n,o)=>o.slice(t.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),X(e.options,"debugColumns")),t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:o,...i}=n;return i})},t.getCanResize=()=>{var n,o;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((o=e.options.enableColumnResizing)!=null?o:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return o(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=n=>{const o=e.getColumn(t.column.id),i=o==null?void 0:o.getCanResize();return s=>{if(!o||!i||(s.persist==null||s.persist(),hs(s)&&s.touches&&s.touches.length>1))return;const a=t.getSize(),l=t?t.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[o.id,o.getSize()]],d=hs(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(y,S)=>{typeof S=="number"&&(e.setColumnSizingInfo(v=>{var w,x;const F=e.options.columnResizeDirection==="rtl"?-1:1,E=(S-((w=v==null?void 0:v.startOffset)!=null?w:0))*F,M=Math.max(E/((x=v==null?void 0:v.startSize)!=null?x:0),-.999999);return v.columnSizingStart.forEach(I=>{let[N,C]=I;c[N]=Math.round(Math.max(C+C*M,0)*100)/100}),{...v,deltaOffset:E,deltaPercentage:M}}),(e.options.columnResizeMode==="onChange"||y==="end")&&e.setColumnSizing(v=>({...v,...c})))},f=y=>u("move",y),p=y=>{u("end",y),e.setColumnSizingInfo(S=>({...S,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=n||typeof document<"u"?document:null,h={moveHandler:y=>f(y.clientX),upHandler:y=>{m==null||m.removeEventListener("mousemove",h.moveHandler),m==null||m.removeEventListener("mouseup",h.upHandler),p(y.clientX)}},g={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),f(y.touches[0].clientX),!1),upHandler:y=>{var S;m==null||m.removeEventListener("touchmove",g.moveHandler),m==null||m.removeEventListener("touchend",g.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),p((S=y.touches[0])==null?void 0:S.clientX)}},b=rS()?{passive:!1}:!1;hs(s)?(m==null||m.addEventListener("touchmove",g.moveHandler,b),m==null||m.addEventListener("touchend",g.upHandler,b)):(m==null||m.addEventListener("mousemove",h.moveHandler,b),m==null||m.addEventListener("mouseup",h.upHandler,b)),e.setColumnSizingInfo(y=>({...y,startOffset:d,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:o.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?ms():(n=t.initialState.columnSizingInfo)!=null?n:ms())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0}}};let mr=null;function rS(){if(typeof mr=="boolean")return mr;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return mr=t,mr}function hs(t){return t.type==="touchstart"}const iS={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Re("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(o=>({...o,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,o;const i=t.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(o=e.getState().columnVisibility)==null?void 0:o[t.id])!=null?n:!0},t.getCanHide=()=>{var n,o;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((o=e.options.enableHiding)!=null?o:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=Y(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),X(e.options,"debugRows")),t.getVisibleCells=Y(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],X(e.options,"debugRows"))},createTable:t=>{const e=(n,o)=>Y(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),X(t.options,"debugColumns"));t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var o;t.setColumnVisibility(n?{}:(o=t.initialState.columnVisibility)!=null?o:{})},t.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;t.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function ro(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const sS={createTable:t=>{t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}},aS={getInitialState:t=>({globalFilter:void 0,...t}),getDefaultOptions:t=>({onGlobalFilterChange:Re("globalFilter",t),globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const o=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(t,e)=>{t.getCanGlobalFilter=()=>{var n,o,i,s;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((s=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?s:!0)&&!!t.accessorFn}},createTable:t=>{t.getGlobalAutoFilterFn=()=>bt.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return ur(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:bt[o]},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)}}},lS={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Re("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?o:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=o=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(o),t.toggleAllRowsExpanded=o=>{o??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=o=>{var i,s;t.setExpanded(o?{}:(i=(s=t.initialState)==null?void 0:s.expanded)!=null?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const o=t.getState().expanded;return o===!0||Object.values(o).some(Boolean)},t.getIsAllRowsExpanded=()=>{const o=t.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},t.getExpandedDepth=()=>{let o=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(s=>{const a=s.split(".");o=Math.max(o,a.length)}),o},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(o=>{var i;const s=o===!0?!0:!!(o!=null&&o[t.id]);let a={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(l=>{a[l]=!0}):a=o,n=(i=n)!=null?i:!s,!s&&n)return{...a,[t.id]:!0};if(s&&!n){const{[t.id]:l,...d}=a;return d}return o})},t.getIsExpanded=()=>{var n;const o=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:o===!0||o!=null&&o[t.id])},t.getCanExpand=()=>{var n,o,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((o=e.options.enableExpanding)!=null?o:!0)&&!!((i=t.subRows)!=null&&i.length)},t.getIsAllParentsExpanded=()=>{let n=!0,o=t;for(;n&&o.parentId;)o=e.getRow(o.parentId,!0),n=o.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},gs=0,bs=10,ys=()=>({pageIndex:gs,pageSize:bs}),dS={getInitialState:t=>({...t,pagination:{...ys(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Re("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?o:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=o=>{const i=s=>Mt(o,s);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?ys():(i=t.initialState.pagination)!=null?i:ys())},t.setPageIndex=o=>{t.setPagination(i=>{let s=Mt(o,i.pageIndex);const a=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return s=Math.max(0,Math.min(s,a)),{...i,pageIndex:s}})},t.resetPageIndex=o=>{var i,s;t.setPageIndex(o?gs:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:gs)},t.resetPageSize=o=>{var i,s;t.setPageSize(o?bs:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:bs)},t.setPageSize=o=>{t.setPagination(i=>{const s=Math.max(1,Mt(o,i.pageSize)),a=i.pageSize*i.pageIndex,l=Math.floor(a/s);return{...i,pageIndex:l,pageSize:s}})},t.setPageCount=o=>t.setPagination(i=>{var s;let a=Mt(o,(s=t.options.pageCount)!=null?s:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),t.getPageOptions=Y(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((s,a)=>a)),i},X(t.options,"debugTable")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:o}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:o<i-1},t.previousPage=()=>t.setPageIndex(o=>o-1),t.nextPage=()=>t.setPageIndex(o=>o+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var o;return(o=t.options.pageCount)!=null?o:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var o;return(o=t.options.rowCount)!=null?o:t.getPrePaginationRowModel().rows.length}}},ks=()=>({top:[],bottom:[]}),cS={getInitialState:t=>({rowPinning:ks(),...t}),getDefaultOptions:t=>({onRowPinningChange:Re("rowPinning",t)}),createRow:(t,e)=>{t.pin=(n,o,i)=>{const s=o?t.getLeafRows().map(d=>{let{id:c}=d;return c}):[],a=i?t.getParentRows().map(d=>{let{id:c}=d;return c}):[],l=new Set([...a,t.id,...s]);e.setRowPinning(d=>{var c,u;if(n==="bottom"){var f,p;return{top:((f=d==null?void 0:d.top)!=null?f:[]).filter(g=>!(l!=null&&l.has(g))),bottom:[...((p=d==null?void 0:d.bottom)!=null?p:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)]}}if(n==="top"){var m,h;return{top:[...((m=d==null?void 0:d.top)!=null?m:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)],bottom:((h=d==null?void 0:d.bottom)!=null?h:[]).filter(g=>!(l!=null&&l.has(g)))}}return{top:((c=d==null?void 0:d.top)!=null?c:[]).filter(g=>!(l!=null&&l.has(g))),bottom:((u=d==null?void 0:d.bottom)!=null?u:[]).filter(g=>!(l!=null&&l.has(g)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=e.options;return typeof o=="function"?o(t):(n=o??i)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:o,bottom:i}=e.getState().rowPinning,s=n.some(l=>o==null?void 0:o.includes(l)),a=n.some(l=>i==null?void 0:i.includes(l));return s?"top":a?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const s=(n=e._getPinnedRows(i))==null?void 0:n.map(a=>{let{id:l}=a;return l});return(o=s==null?void 0:s.indexOf(t.id))!=null?o:-1}},createTable:t=>{t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,o;return t.setRowPinning(e?ks():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:ks())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,s;return!!((i=o.top)!=null&&i.length||(s=o.bottom)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=Y(e=>[t.getRowModel().rows,t.getState().rowPinning[e],e],(e,n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const l=t.getRow(a,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(a=>e.find(l=>l.id===a))).filter(Boolean).map(a=>({...a,position:o}))},X(t.options,"debugRows")),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=Y(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(s=>!i.has(s.id))},X(t.options,"debugRows"))}},uS={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Re("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const o={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(s=>{s.getCanSelect()&&(o[s.id]=!0)}):i.forEach(s=>{delete o[s.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(s=>{xs(i,s.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=Y(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?Ss(t,n):{rows:[],flatRows:[],rowsById:{}},X(t.options,"debugTable")),t.getFilteredSelectedRowModel=Y(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?Ss(t,n):{rows:[],flatRows:[],rowsById:{}},X(t.options,"debugTable")),t.getGroupedSelectedRowModel=Y(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?Ss(t,n):{rows:[],flatRows:[],rowsById:{}},X(t.options,"debugTable")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let o=!!(e.length&&Object.keys(n).length);return o&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let o=!!e.length;return o&&e.some(i=>!n[i.id])&&(o=!1),o},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,o)=>{const i=t.getIsSelected();e.setRowSelection(s=>{var a;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return s;const l={...s};return xs(l,t.id,n,(a=o==null?void 0:o.selectChildren)!=null?a:!0,e),l})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return Cs(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return ws(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return ws(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return o=>{var i;n&&t.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},xs=(t,e,n,o,i)=>{var s;const a=i.getRow(e,!0);n?(a.getCanMultiSelect()||Object.keys(t).forEach(l=>delete t[l]),a.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(s=a.subRows)!=null&&s.length&&a.getCanSelectSubRows()&&a.subRows.forEach(l=>xs(t,l.id,n,o,i))};function Ss(t,e){const n=t.getState().rowSelection,o=[],i={},s=function(a,l){return a.map(d=>{var c;const u=Cs(d,n);if(u&&(o.push(d),i[d.id]=d),(c=d.subRows)!=null&&c.length&&(d={...d,subRows:s(d.subRows)}),u)return d}).filter(Boolean)};return{rows:s(e.rows),flatRows:o,rowsById:i}}function Cs(t,e){var n;return(n=e[t.id])!=null?n:!1}function ws(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,s=!1;return t.subRows.forEach(a=>{if(!(s&&!i)&&(a.getCanSelect()&&(Cs(a,e)?s=!0:i=!1),a.subRows&&a.subRows.length)){const l=ws(a,e);l==="all"?s=!0:(l==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const As=/([0-9]+)/gm,fS=(t,e,n)=>Kc(Ot(t.getValue(n)).toLowerCase(),Ot(e.getValue(n)).toLowerCase()),pS=(t,e,n)=>Kc(Ot(t.getValue(n)),Ot(e.getValue(n))),mS=(t,e,n)=>vs(Ot(t.getValue(n)).toLowerCase(),Ot(e.getValue(n)).toLowerCase()),hS=(t,e,n)=>vs(Ot(t.getValue(n)),Ot(e.getValue(n))),gS=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},bS=(t,e,n)=>vs(t.getValue(n),e.getValue(n));function vs(t,e){return t===e?0:t>e?1:-1}function Ot(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Kc(t,e){const n=t.split(As).filter(Boolean),o=e.split(As).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),s=o.shift(),a=parseInt(i,10),l=parseInt(s,10),d=[a,l].sort();if(isNaN(d[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(d[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}return n.length-o.length}const io={alphanumeric:fS,alphanumericCaseSensitive:pS,text:mS,textCaseSensitive:hS,datetime:gS,basic:bS},yS=[Kx,iS,tS,nS,Zx,$x,sS,aS,{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Re("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const s=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(s)==="[object Date]")return io.datetime;if(typeof s=="string"&&(o=!0,s.split(As).length>1))return io.alphanumeric}return o?io.text:io.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,o;if(!t)throw new Error;return ur(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(o=e.options.sortingFns)==null?void 0:o[t.columnDef.sortingFn])!=null?n:io[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),s=typeof n<"u"&&n!==null;e.setSorting(a=>{const l=a==null?void 0:a.find(m=>m.id===t.id),d=a==null?void 0:a.findIndex(m=>m.id===t.id);let c=[],u,f=s?n:i==="desc";if(a!=null&&a.length&&t.getCanMultiSort()&&o?l?u="toggle":u="add":a!=null&&a.length&&d!==a.length-1?u="replace":l?u="toggle":u="replace",u==="toggle"&&(s||i||(u="remove")),u==="add"){var p;c=[...a,{id:t.id,desc:f}],c.splice(0,c.length-((p=e.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=a.map(m=>m.id===t.id?{...m,desc:f}:m):u==="remove"?c=a.filter(m=>m.id!==t.id):c=[{id:t.id,desc:f}];return c})},t.getFirstSortDir=()=>{var n,o;return((n=(o=t.columnDef.sortDescFirst)!=null?o:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var o,i;const s=t.getFirstSortDir(),a=t.getIsSorted();return a?a!==s&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":s},t.getCanSort=()=>{var n,o;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((o=e.options.enableSorting)!=null?o:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,o;return(n=(o=t.columnDef.enableMultiSort)!=null?o:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const o=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return o?o.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,o;return(n=(o=e.getState().sorting)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return o=>{n&&(o.persist==null||o.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(o):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,o;t.setSorting(e?[]:(n=(o=t.initialState)==null?void 0:o.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},_x,lS,dS,cS,uS,oS];function kS(t){var e,n;const o=[...yS,...(e=t._features)!=null?e:[]];let i={_features:o};const s=i._features.reduce((p,m)=>Object.assign(p,m.getDefaultOptions==null?void 0:m.getDefaultOptions(i)),{}),a=p=>i.options.mergeOptions?i.options.mergeOptions(s,p):{...s,...p};let d={...{},...(n=t.initialState)!=null?n:{}};i._features.forEach(p=>{var m;d=(m=p.getInitialState==null?void 0:p.getInitialState(d))!=null?m:d});const c=[];let u=!1;const f={_features:o,options:{...s,...t},initialState:d,_queue:p=>{c.push(p),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{i.setState(i.initialState)},setOptions:p=>{const m=Mt(p,i.options);i.options=a(m)},getState:()=>i.options.state,setState:p=>{i.options.onStateChange==null||i.options.onStateChange(p)},_getRowId:(p,m,h)=>{var g;return(g=i.options.getRowId==null?void 0:i.options.getRowId(p,m,h))!=null?g:`${h?[h.id,m].join("."):m}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(p,m)=>{let h=(m?i.getPrePaginationRowModel():i.getRowModel()).rowsById[p];if(!h&&(h=i.getCoreRowModel().rowsById[p],!h))throw new Error;return h},_getDefaultColumnDef:Y(()=>[i.options.defaultColumn],p=>{var m;return p=(m=p)!=null?m:{},{header:h=>{const g=h.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:h=>{var g,b;return(g=(b=h.renderValue())==null||b.toString==null?void 0:b.toString())!=null?g:null},...i._features.reduce((h,g)=>Object.assign(h,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...p}},X(t,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:Y(()=>[i._getColumnDefs()],p=>{const m=function(h,g,b){return b===void 0&&(b=0),h.map(y=>{const S=Jx(i,y,b,g),v=y;return S.columns=v.columns?m(v.columns,S,b+1):[],S})};return m(p)},X(t,"debugColumns")),getAllFlatColumns:Y(()=>[i.getAllColumns()],p=>p.flatMap(m=>m.getFlatColumns()),X(t,"debugColumns")),_getAllFlatColumnsById:Y(()=>[i.getAllFlatColumns()],p=>p.reduce((m,h)=>(m[h.id]=h,m),{}),X(t,"debugColumns")),getAllLeafColumns:Y(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(p,m)=>{let h=p.flatMap(g=>g.getLeafColumns());return m(h)},X(t,"debugColumns")),getColumn:p=>i._getAllFlatColumnsById()[p]};Object.assign(i,f);for(let p=0;p<i._features.length;p++){const m=i._features[p];m==null||m.createTable==null||m.createTable(i)}return i}function xS(){return t=>Y(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,s,a){s===void 0&&(s=0);const l=[];for(let c=0;c<i.length;c++){const u=cs(t,t._getRowId(i[c],c,a),i[c],c,s,void 0,a==null?void 0:a.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),t.options.getSubRows){var d;u.originalSubRows=t.options.getSubRows(i[c],c),(d=u.originalSubRows)!=null&&d.length&&(u.subRows=o(u.originalSubRows,s+1,u))}}return l};return n.rows=o(e),n},X(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function SS(){return t=>Y(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,o)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!o?n:Zc(n),X(t.options,"debugTable"))}function Zc(t){const e=[],n=o=>{var i;e.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function CS(t,e,n){return n.options.filterFromLeafRows?wS(t,e,n):AS(t,e,n)}function wS(t,e,n){var o;const i=[],s={},a=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(d,c){c===void 0&&(c=0);const u=[];for(let p=0;p<d.length;p++){var f;let m=d[p];const h=cs(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(h.columnFilters=m.columnFilters,(f=m.subRows)!=null&&f.length&&c<a){if(h.subRows=l(m.subRows,c+1),m=h,e(m)&&!h.subRows.length){u.push(m),s[m.id]=m,i.push(m);continue}if(e(m)||h.subRows.length){u.push(m),s[m.id]=m,i.push(m);continue}}else m=h,e(m)&&(u.push(m),s[m.id]=m,i.push(m))}return u};return{rows:l(t),flatRows:i,rowsById:s}}function AS(t,e,n){var o;const i=[],s={},a=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(d,c){c===void 0&&(c=0);const u=[];for(let p=0;p<d.length;p++){let m=d[p];if(e(m)){var f;if((f=m.subRows)!=null&&f.length&&c<a){const g=cs(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);g.subRows=l(m.subRows,c+1),m=g}u.push(m),i.push(m),s[m.id]=m}}return u};return{rows:l(t),flatRows:i,rowsById:s}}function vS(){return t=>Y(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let p=0;p<e.flatRows.length;p++)e.flatRows[p].columnFilters={},e.flatRows[p].columnFiltersMeta={};return e}const i=[],s=[];(n??[]).forEach(p=>{var m;const h=t.getColumn(p.id);if(!h)return;const g=h.getFilterFn();g&&i.push({id:p.id,filterFn:g,resolvedValue:(m=g.resolveFilterValue==null?void 0:g.resolveFilterValue(p.value))!=null?m:p.value})});const a=n.map(p=>p.id),l=t.getGlobalFilterFn(),d=t.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());o&&l&&d.length&&(a.push("__global__"),d.forEach(p=>{var m;s.push({id:p.id,filterFn:l,resolvedValue:(m=l.resolveFilterValue==null?void 0:l.resolveFilterValue(o))!=null?m:o})}));let c,u;for(let p=0;p<e.flatRows.length;p++){const m=e.flatRows[p];if(m.columnFilters={},i.length)for(let h=0;h<i.length;h++){c=i[h];const g=c.id;m.columnFilters[g]=c.filterFn(m,g,c.resolvedValue,b=>{m.columnFiltersMeta[g]=b})}if(s.length){for(let h=0;h<s.length;h++){u=s[h];const g=u.id;if(u.filterFn(m,g,u.resolvedValue,b=>{m.columnFiltersMeta[g]=b})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const f=p=>{for(let m=0;m<a.length;m++)if(p.columnFilters[a[m]]===!1)return!1;return!0};return CS(e.rows,f,t)},X(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function BS(t){return e=>Y(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:s}=n;let{rows:a,flatRows:l,rowsById:d}=o;const c=i*s,u=c+i;a=a.slice(c,u);let f;e.options.paginateExpandedRows?f={rows:a,flatRows:l,rowsById:d}:f=Zc({rows:a,flatRows:l,rowsById:d}),f.flatRows=[];const p=m=>{f.flatRows.push(m),m.subRows.length&&m.subRows.forEach(p)};return f.rows.forEach(p),f},X(e.options,"debugTable"))}function DS(){return t=>Y(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],s=o.filter(d=>{var c;return(c=t.getColumn(d.id))==null?void 0:c.getCanSort()}),a={};s.forEach(d=>{const c=t.getColumn(d.id);c&&(a[d.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const l=d=>{const c=d.map(u=>({...u}));return c.sort((u,f)=>{for(let m=0;m<s.length;m+=1){var p;const h=s[m],g=a[h.id],b=g.sortUndefined,y=(p=h==null?void 0:h.desc)!=null?p:!1;let S=0;if(b){const v=u.getValue(h.id),w=f.getValue(h.id),x=v===void 0,F=w===void 0;if(x||F){if(b==="first")return x?-1:1;if(b==="last")return x?1:-1;S=x&&F?0:x?b:-b}}if(S===0&&(S=g.sortingFn(u,f,h.id)),S!==0)return y&&(S*=-1),g.invertSorting&&(S*=-1),S}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=l(u.subRows))}),c};return{rows:l(n.rows),flatRows:i,rowsById:n.rowsById}},X(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}/**