mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
47 lines
865 KiB
JavaScript
47 lines
865 KiB
JavaScript
var ve=Object.defineProperty;var be=(t,e,a)=>e in t?ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var R=(t,e,a)=>(be(t,typeof e!="symbol"?e+"":e,a),a);function bind$4(t,e){return function(){return t.apply(e,arguments)}}const{toString:toString$7}=Object.prototype,{getPrototypeOf}=Object,kindOf=(t=>e=>{const a=toString$7.call(e);return t[a]||(t[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=t=>(t=t.toLowerCase(),e=>kindOf(e)===t),typeOfTest=t=>e=>typeof e===t,{isArray:isArray$d}=Array,isUndefined=typeOfTest("undefined");function isBuffer$3(t){return t!==null&&!isUndefined(t)&&t.constructor!==null&&!isUndefined(t.constructor)&&isFunction$6(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&isArrayBuffer(t.buffer),e}const isString$1=typeOfTest("string"),isFunction$6=typeOfTest("function"),isNumber$1=typeOfTest("number"),isObject$c=t=>t!==null&&typeof t=="object",isBoolean=t=>t===!0||t===!1,isPlainObject=t=>{if(kindOf(t)!=="object")return!1;const e=getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=t=>isObject$c(t)&&isFunction$6(t.pipe),isFormData=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||isFunction$6(t.append)&&((e=kindOf(t))==="formdata"||e==="object"&&isFunction$6(t.toString)&&t.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),trim$2=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(t,e,{allOwnKeys:a=!1}={}){if(t===null||typeof t>"u")return;let n,r;if(typeof t!="object"&&(t=[t]),isArray$d(t))for(n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else{const i=a?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,t[s],s,t)}}function findKey$1(t,e){e=e.toLowerCase();const a=Object.keys(t);let n=a.length,r;for(;n-- >0;)if(r=a[n],e===r.toLowerCase())return r;return null}const _global=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),isContextDefined=t=>!isUndefined(t)&&t!==_global;function merge$1(){const{caseless:t}=isContextDefined(this)&&this||{},e={},a=(n,r)=>{const i=t&&findKey$1(e,r)||r;isPlainObject(e[i])&&isPlainObject(n)?e[i]=merge$1(e[i],n):isPlainObject(n)?e[i]=merge$1({},n):isArray$d(n)?e[i]=n.slice():e[i]=n};for(let n=0,r=arguments.length;n<r;n++)arguments[n]&&forEach(arguments[n],a);return e}const extend=(t,e,a,{allOwnKeys:n}={})=>(forEach(e,(r,i)=>{a&&isFunction$6(r)?t[i]=bind$4(r,a):t[i]=r},{allOwnKeys:n}),t),stripBOM=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),inherits=(t,e,a,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),a&&Object.assign(t.prototype,a)},toFlatObject=(t,e,a,n)=>{let r,i,o;const s={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)o=r[i],(!n||n(o,t,e))&&!s[o]&&(e[o]=t[o],s[o]=!0);t=a!==!1&&getPrototypeOf(t)}while(t&&(!a||a(t,e))&&t!==Object.prototype);return e},endsWith=(t,e,a)=>{t=String(t),(a===void 0||a>t.length)&&(a=t.length),a-=e.length;const n=t.indexOf(e,a);return n!==-1&&n===a},toArray=t=>{if(!t)return null;if(isArray$d(t))return t;let e=t.length;if(!isNumber$1(e))return null;const a=new Array(e);for(;e-- >0;)a[e]=t[e];return a},isTypedArray$3=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const i=r.value;e.call(t,i[0],i[1])}},matchAll=(t,e)=>{let a;const n=[];for(;(a=t.exec(e))!==null;)n.push(a);return n},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,n,r){return n.toUpperCase()+r}),hasOwnProperty$c=(({hasOwnProperty:t})=>(e,a)=>t.call(e,a))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(t,e)=>{const a=Object.getOwnPropertyDescriptors(t),n={};forEach(a,(r,i)=>{let o;(o=e(r,i,t))!==!1&&(n[i]=o||r)}),Object.defineProperties(t,n)},freezeMethods=t=>{reduceDescriptors(t,(e,a)=>{if(isFunction$6(t)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const n=t[a];if(isFunction$6(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},toObjectSet=(t,e)=>{const a={},n=r=>{r.forEach(i=>{a[i]=!0})};return isArray$d(t)?n(t):n(String(t).split(e)),a},noop$4=()=>{},toFiniteNumber=(t,e)=>(t=+t,Number.isFinite(t)?t:e),ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(t=16,e=ALPHABET.ALPHA_DIGIT)=>{let a="";const{length:n}=e;for(;t--;)a+=e[Math.random()*n|0];return a};function isSpecCompliantForm(t){return!!(t&&isFunction$6(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const toJSONObject=t=>{const e=new Array(10),a=(n,r)=>{if(isObject$c(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[r]=n;const i=isArray$d(n)?[]:{};return forEach(n,(o,s)=>{const l=a(o,r+1);!isUndefined(l)&&(i[s]=l)}),e[r]=void 0,i}}return n};return a(t,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=t=>t&&(isObject$c(t)||isFunction$6(t))&&isFunction$6(t.then)&&isFunction$6(t.catch),utils={isArray:isArray$d,isArrayBuffer,isBuffer:isBuffer$3,isFormData,isArrayBufferView,isString:isString$1,isNumber:isNumber$1,isBoolean,isObject:isObject$c,isPlainObject,isUndefined,isDate:isDate$1,isFile,isBlob,isRegExp,isFunction:isFunction$6,isStream,isURLSearchParams,isTypedArray:isTypedArray$3,isFileList,forEach,merge:merge$1,extend,trim:trim$2,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$c,hasOwnProp:hasOwnProperty$c,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$4,toFiniteNumber,findKey:findKey$1,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable};function AxiosError(t,e,a,n,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),a&&(this.config=a),n&&(this.request=n),r&&(this.response=r)}utils.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors$1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{descriptors$1[t]={value:t}});Object.defineProperties(AxiosError,descriptors$1);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError.from=(t,e,a,n,r,i)=>{const o=Object.create(prototype$1);return utils.toFlatObject(t,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),AxiosError.call(o,t.message,e,a,n,r),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const httpAdapter=null;function isVisitable(t){return utils.isPlainObject(t)||utils.isArray(t)}function removeBrackets(t){return utils.endsWith(t,"[]")?t.slice(0,-2):t}function renderKey(t,e,a){return t?t.concat(e).map(function(r,i){return r=removeBrackets(r),!a&&i?"["+r+"]":r}).join(a?".":""):e}function isFlatArray(t){return utils.isArray(t)&&!t.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,function(e){return/^is[A-Z]/.test(e)});function toFormData(t,e,a){if(!utils.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,a=utils.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!utils.isUndefined(y[v])});const n=a.metaTokens,r=a.visitor||c,i=a.dots,o=a.indexes,l=(a.Blob||typeof Blob<"u"&&Blob)&&utils.isSpecCompliantForm(e);if(!utils.isFunction(r))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(utils.isDate(p))return p.toISOString();if(!l&&utils.isBlob(p))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(p)||utils.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,y){let w=p;if(p&&!y&&typeof p=="object"){if(utils.endsWith(v,"{}"))v=n?v:v.slice(0,-2),p=JSON.stringify(p);else if(utils.isArray(p)&&isFlatArray(p)||(utils.isFileList(p)||utils.endsWith(v,"[]"))&&(w=utils.toArray(p)))return v=removeBrackets(v),w.forEach(function(D,k){!(utils.isUndefined(D)||D===null)&&e.append(o===!0?renderKey([v],k,i):o===null?v:v+"[]",u(D))}),!1}return isVisitable(p)?!0:(e.append(renderKey(y,v,i),u(p)),!1)}const d=[],h=Object.assign(predicates,{defaultVisitor:c,convertValue:u,isVisitable});function m(p,v){if(!utils.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),utils.forEach(p,function(w,_){(!(utils.isUndefined(w)||w===null)&&r.call(e,w,utils.isString(_)?_.trim():_,v,h))===!0&&m(w,v?v.concat(_):[_])}),d.pop()}}if(!utils.isObject(t))throw new TypeError("data must be an object");return m(t),e}function encode$1(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function AxiosURLSearchParams(t,e){this._pairs=[],t&&toFormData(t,this,e)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(e,a){this._pairs.push([e,a])};prototype.toString=function(e){const a=e?function(n){return e.call(this,n,encode$1)}:encode$1;return this._pairs.map(function(r){return a(r[0])+"="+a(r[1])},"").join("&")};function encode(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(t,e,a){if(!e)return t;const n=a&&a.encode||encode,r=a&&a.serialize;let i;if(r?i=r(e,a):i=utils.isURLSearchParams(e)?e.toString():new AxiosURLSearchParams(e,a).toString(n),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class InterceptorManager{constructor(){this.handlers=[]}use(e,a,n){return this.handlers.push({fulfilled:e,rejected:a,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils.forEach(this.handlers,function(n){n!==null&&e(n)})}}const InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,isStandardBrowserEnv=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),isStandardBrowserWebWorkerEnv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),platform={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},isStandardBrowserEnv,isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(t,e){return toFormData(t,new platform.classes.URLSearchParams,Object.assign({visitor:function(a,n,r,i){return platform.isNode&&utils.isBuffer(a)?(this.append(n,a.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function parsePropPath(t){return utils.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function arrayToObject(t){const e={},a=Object.keys(t);let n;const r=a.length;let i;for(n=0;n<r;n++)i=a[n],e[i]=t[i];return e}function formDataToJSON(t){function e(a,n,r,i){let o=a[i++];const s=Number.isFinite(+o),l=i>=a.length;return o=!o&&utils.isArray(r)?r.length:o,l?(utils.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s):((!r[o]||!utils.isObject(r[o]))&&(r[o]=[]),e(a,n,r[o],i)&&utils.isArray(r[o])&&(r[o]=arrayToObject(r[o])),!s)}if(utils.isFormData(t)&&utils.isFunction(t.entries)){const a={};return utils.forEachEntry(t,(n,r)=>{e(parsePropPath(n),r,a,0)}),a}return null}function stringifySafely(t,e,a){if(utils.isString(t))try{return(e||JSON.parse)(t),utils.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(a||JSON.stringify)(t)}const defaults$1={transitional:transitionalDefaults,adapter:platform.isNode?"http":"xhr",transformRequest:[function(e,a){const n=a.getContentType()||"",r=n.indexOf("application/json")>-1,i=utils.isObject(e);if(i&&utils.isHTMLForm(e)&&(e=new FormData(e)),utils.isFormData(e))return r&&r?JSON.stringify(formDataToJSON(e)):e;if(utils.isArrayBuffer(e)||utils.isBuffer(e)||utils.isStream(e)||utils.isFile(e)||utils.isBlob(e))return e;if(utils.isArrayBufferView(e))return e.buffer;if(utils.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((s=utils.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return toFormData(s?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||r?(a.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(e){const a=this.transitional||defaults$1.transitional,n=a&&a.forcedJSONParsing,r=this.responseType==="json";if(e&&utils.isString(e)&&(n&&!this.responseType||r)){const o=!(a&&a.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?AxiosError.from(s,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils.forEach(["delete","get","head","post","put","patch"],t=>{defaults$1.headers[t]={}});const defaults$2=defaults$1,ignoreDuplicateOf=utils.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=t=>{const e={};let a,n,r;return t&&t.split(`
|
||
`).forEach(function(o){r=o.indexOf(":"),a=o.substring(0,r).trim().toLowerCase(),n=o.substring(r+1).trim(),!(!a||e[a]&&ignoreDuplicateOf[a])&&(a==="set-cookie"?e[a]?e[a].push(n):e[a]=[n]:e[a]=e[a]?e[a]+", "+n:n)}),e},$internals=Symbol("internals");function normalizeHeader(t){return t&&String(t).trim().toLowerCase()}function normalizeValue(t){return t===!1||t==null?t:utils.isArray(t)?t.map(normalizeValue):String(t)}function parseTokens(t){const e=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=a.exec(t);)e[n[1]]=n[2];return e}const isValidHeaderName=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function matchHeaderValue(t,e,a,n,r){if(utils.isFunction(n))return n.call(this,e,a);if(r&&(e=a),!!utils.isString(e)){if(utils.isString(n))return e.indexOf(n)!==-1;if(utils.isRegExp(n))return n.test(e)}}function formatHeader(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,a,n)=>a.toUpperCase()+n)}function buildAccessors(t,e){const a=utils.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+a,{value:function(r,i,o){return this[n].call(this,e,r,i,o)},configurable:!0})})}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,a,n){const r=this;function i(s,l,u){const c=normalizeHeader(l);if(!c)throw new Error("header name must be a non-empty string");const d=utils.findKey(r,c);(!d||r[d]===void 0||u===!0||u===void 0&&r[d]!==!1)&&(r[d||l]=normalizeValue(s))}const o=(s,l)=>utils.forEach(s,(u,c)=>i(u,c,l));return utils.isPlainObject(e)||e instanceof this.constructor?o(e,a):utils.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)?o(parseHeaders(e),a):e!=null&&i(a,e,n),this}get(e,a){if(e=normalizeHeader(e),e){const n=utils.findKey(this,e);if(n){const r=this[n];if(!a)return r;if(a===!0)return parseTokens(r);if(utils.isFunction(a))return a.call(this,r,n);if(utils.isRegExp(a))return a.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=normalizeHeader(e),e){const n=utils.findKey(this,e);return!!(n&&this[n]!==void 0&&(!a||matchHeaderValue(this,this[n],n,a)))}return!1}delete(e,a){const n=this;let r=!1;function i(o){if(o=normalizeHeader(o),o){const s=utils.findKey(n,o);s&&(!a||matchHeaderValue(n,n[s],s,a))&&(delete n[s],r=!0)}}return utils.isArray(e)?e.forEach(i):i(e),r}clear(e){const a=Object.keys(this);let n=a.length,r=!1;for(;n--;){const i=a[n];(!e||matchHeaderValue(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){const a=this,n={};return utils.forEach(this,(r,i)=>{const o=utils.findKey(n,i);if(o){a[o]=normalizeValue(r),delete a[i];return}const s=e?formatHeader(i):String(i).trim();s!==i&&delete a[i],a[s]=normalizeValue(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const a=Object.create(null);return utils.forEach(this,(n,r)=>{n!=null&&n!==!1&&(a[r]=e&&utils.isArray(n)?n.join(", "):n)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,a])=>e+": "+a).join(`
|
||
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...a){const n=new this(e);return a.forEach(r=>n.set(r)),n}static accessor(e){const n=(this[$internals]=this[$internals]={accessors:{}}).accessors,r=this.prototype;function i(o){const s=normalizeHeader(o);n[s]||(buildAccessors(r,o),n[s]=!0)}return utils.isArray(e)?e.forEach(i):i(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils.reduceDescriptors(AxiosHeaders.prototype,({value:t},e)=>{let a=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[a]=n}}});utils.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(t,e){const a=this||defaults$2,n=e||a,r=AxiosHeaders$1.from(n.headers);let i=n.data;return utils.forEach(t,function(s){i=s.call(a,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function isCancel(t){return!!(t&&t.__CANCEL__)}function CanceledError(t,e,a){AxiosError.call(this,t??"canceled",AxiosError.ERR_CANCELED,e,a),this.name="CanceledError"}utils.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(t,e,a){const n=a.config.validateStatus;!a.status||!n||n(a.status)?t(a):e(new AxiosError("Request failed with status code "+a.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}const cookies=platform.isStandardBrowserEnv?function(){return{write:function(a,n,r,i,o,s){const l=[];l.push(a+"="+encodeURIComponent(n)),utils.isNumber(r)&&l.push("expires="+new Date(r).toGMTString()),utils.isString(i)&&l.push("path="+i),utils.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(a){const n=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(a){this.write(a,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function isAbsoluteURL(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function combineURLs(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function buildFullPath(t,e){return t&&!isAbsoluteURL(e)?combineURLs(t,e):e}const isURLSameOrigin=platform.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),a=document.createElement("a");let n;function r(i){let o=i;return e&&(a.setAttribute("href",o),o=a.href),a.setAttribute("href",o),{href:a.href,protocol:a.protocol?a.protocol.replace(/:$/,""):"",host:a.host,search:a.search?a.search.replace(/^\?/,""):"",hash:a.hash?a.hash.replace(/^#/,""):"",hostname:a.hostname,port:a.port,pathname:a.pathname.charAt(0)==="/"?a.pathname:"/"+a.pathname}}return n=r(window.location.href),function(o){const s=utils.isString(o)?r(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function parseProtocol(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function speedometer(t,e){t=t||10;const a=new Array(t),n=new Array(t);let r=0,i=0,o;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=n[i];o||(o=u),a[r]=l,n[r]=u;let d=i,h=0;for(;d!==r;)h+=a[d++],d=d%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),u-o<e)return;const m=c&&u-c;return m?Math.round(h*1e3/m):void 0}}function progressEventReducer(t,e){let a=0;const n=speedometer(50,250);return r=>{const i=r.loaded,o=r.lengthComputable?r.total:void 0,s=i-a,l=n(s),u=i<=o;a=i;const c={loaded:i,total:o,progress:o?i/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&u?(o-i)/l:void 0,event:r};c[e?"download":"upload"]=!0,t(c)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(t){return new Promise(function(a,n){let r=t.data;const i=AxiosHeaders$1.from(t.headers).normalize(),o=t.responseType;let s;function l(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}utils.isFormData(r)&&(platform.isStandardBrowserEnv||platform.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(t.auth){const m=t.auth.username||"",p=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(m+":"+p))}const c=buildFullPath(t.baseURL,t.url);u.open(t.method.toUpperCase(),buildURL(c,t.params,t.paramsSerializer),!0),u.timeout=t.timeout;function d(){if(!u)return;const m=AxiosHeaders$1.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),v={data:!o||o==="text"||o==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:m,config:t,request:u};settle(function(w){a(w),l()},function(w){n(w),l()},v),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new AxiosError("Network Error",AxiosError.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let p=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const v=t.transitional||transitionalDefaults;t.timeoutErrorMessage&&(p=t.timeoutErrorMessage),n(new AxiosError(p,v.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,t,u)),u=null},platform.isStandardBrowserEnv){const m=(t.withCredentials||isURLSameOrigin(c))&&t.xsrfCookieName&&cookies.read(t.xsrfCookieName);m&&i.set(t.xsrfHeaderName,m)}r===void 0&&i.setContentType(null),"setRequestHeader"in u&&utils.forEach(i.toJSON(),function(p,v){u.setRequestHeader(v,p)}),utils.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),o&&o!=="json"&&(u.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&u.addEventListener("progress",progressEventReducer(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",progressEventReducer(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=m=>{u&&(n(!m||m.type?new CanceledError(null,t,u):m),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const h=parseProtocol(c);if(h&&platform.protocols.indexOf(h)===-1){n(new AxiosError("Unsupported protocol "+h+":",AxiosError.ERR_BAD_REQUEST,t));return}u.send(r||null)})},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const adapters$1={getAdapter:t=>{t=utils.isArray(t)?t:[t];const{length:e}=t;let a,n;for(let r=0;r<e&&(a=t[r],!(n=utils.isString(a)?knownAdapters[a.toLowerCase()]:a));r++);if(!n)throw n===!1?new AxiosError(`Adapter ${a} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(utils.hasOwnProp(knownAdapters,a)?`Adapter '${a}' is not available in the build`:`Unknown adapter '${a}'`);if(!utils.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:knownAdapters};function throwIfCancellationRequested(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new CanceledError(null,t)}function dispatchRequest(t){return throwIfCancellationRequested(t),t.headers=AxiosHeaders$1.from(t.headers),t.data=transformData.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),adapters$1.getAdapter(t.adapter||defaults$2.adapter)(t).then(function(n){return throwIfCancellationRequested(t),n.data=transformData.call(t,t.transformResponse,n),n.headers=AxiosHeaders$1.from(n.headers),n},function(n){return isCancel(n)||(throwIfCancellationRequested(t),n&&n.response&&(n.response.data=transformData.call(t,t.transformResponse,n.response),n.response.headers=AxiosHeaders$1.from(n.response.headers))),Promise.reject(n)})}const headersToObject=t=>t instanceof AxiosHeaders$1?t.toJSON():t;function mergeConfig(t,e){e=e||{};const a={};function n(u,c,d){return utils.isPlainObject(u)&&utils.isPlainObject(c)?utils.merge.call({caseless:d},u,c):utils.isPlainObject(c)?utils.merge({},c):utils.isArray(c)?c.slice():c}function r(u,c,d){if(utils.isUndefined(c)){if(!utils.isUndefined(u))return n(void 0,u,d)}else return n(u,c,d)}function i(u,c){if(!utils.isUndefined(c))return n(void 0,c)}function o(u,c){if(utils.isUndefined(c)){if(!utils.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,d){if(d in e)return n(u,c);if(d in t)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c)=>r(headersToObject(u),headersToObject(c),!0)};return utils.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||r,h=d(t[c],e[c],c);utils.isUndefined(h)&&d!==s||(a[c]=h)}),a}const VERSION$1="1.5.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{validators$1[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const deprecatedWarnings={};validators$1.transitional=function(e,a,n){function r(i,o){return"[Axios v"+VERSION$1+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,s)=>{if(e===!1)throw new AxiosError(r(o," has been removed"+(a?" in "+a:"")),AxiosError.ERR_DEPRECATED);return a&&!deprecatedWarnings[o]&&(deprecatedWarnings[o]=!0,console.warn(r(o," has been deprecated since v"+a+" and will be removed in the near future"))),e?e(i,o,s):!0}};function assertOptions(t,e,a){if(typeof t!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let r=n.length;for(;r-- >0;){const i=n[r],o=e[i];if(o){const s=t[i],l=s===void 0||o(s,i,t);if(l!==!0)throw new AxiosError("option "+i+" must be "+l,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new AxiosError("Unknown option "+i,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}request(e,a){typeof e=="string"?(a=a||{},a.url=e):a=e||{},a=mergeConfig(this.defaults,a);const{transitional:n,paramsSerializer:r,headers:i}=a;n!==void 0&&validator.assertOptions(n,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),r!=null&&(utils.isFunction(r)?a.paramsSerializer={serialize:r}:validator.assertOptions(r,{encode:validators.function,serialize:validators.function},!0)),a.method=(a.method||this.defaults.method||"get").toLowerCase();let o=i&&utils.merge(i.common,i[a.method]);i&&utils.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),a.headers=AxiosHeaders$1.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(a)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,d=0,h;if(!l){const p=[dispatchRequest.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,u),h=p.length,c=Promise.resolve(a);d<h;)c=c.then(p[d++],p[d++]);return c}h=s.length;let m=a;for(d=0;d<h;){const p=s[d++],v=s[d++];try{m=p(m)}catch(y){v.call(this,y);break}}try{c=dispatchRequest.call(this,m)}catch(p){return Promise.reject(p)}for(d=0,h=u.length;d<h;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=mergeConfig(this.defaults,e);const a=buildFullPath(e.baseURL,e.url);return buildURL(a,e.params,e.paramsSerializer)}}utils.forEach(["delete","get","head","options"],function(e){Axios.prototype[e]=function(a,n){return this.request(mergeConfig(n||{},{method:e,url:a,data:(n||{}).data}))}});utils.forEach(["post","put","patch"],function(e){function a(n){return function(i,o,s){return this.request(mergeConfig(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Axios.prototype[e]=a(),Axios.prototype[e+"Form"]=a(!0)});const Axios$1=Axios;class CancelToken{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(i){a=i});const n=this;this.promise.then(r=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](r);n._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(s=>{n.subscribe(s),i=s}).then(r);return o.cancel=function(){n.unsubscribe(i)},o},e(function(i,o,s){n.reason||(n.reason=new CanceledError(i,o,s),a(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const a=this._listeners.indexOf(e);a!==-1&&this._listeners.splice(a,1)}static source(){let e;return{token:new CancelToken(function(r){e=r}),cancel:e}}}const CancelToken$1=CancelToken;function spread(t){return function(a){return t.apply(null,a)}}function isAxiosError(t){return utils.isObject(t)&&t.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([t,e])=>{HttpStatusCode[e]=t});const HttpStatusCode$1=HttpStatusCode;function createInstance(t){const e=new Axios$1(t),a=bind$4(Axios$1.prototype.request,e);return utils.extend(a,Axios$1.prototype,e,{allOwnKeys:!0}),utils.extend(a,e,null,{allOwnKeys:!0}),a.create=function(r){return createInstance(mergeConfig(t,r))},a}const axios=createInstance(defaults$2);axios.Axios=Axios$1;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel;axios.VERSION=VERSION$1;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function(e){return Promise.all(e)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=t=>formDataToJSON(utils.isHTMLForm(t)?new FormData(t):t);axios.getAdapter=adapters$1.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const axios$1=axios;var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var assign$1=make_assign(),create$2=make_create(),trim$1=make_trim(),Global$5=typeof window<"u"?window:commonjsGlobal,util$7={assign:assign$1,create:create$2,trim:trim$1,bind:bind$3,slice:slice$2,each:each$9,map:map$2,pluck:pluck$1,isList:isList$1,isFunction:isFunction$5,isObject:isObject$b,Global:Global$5};function make_assign(){return Object.assign?Object.assign:function(e,a,n,r){for(var i=1;i<arguments.length;i++)each$9(Object(arguments[i]),function(o,s){e[s]=o});return e}}function make_create(){if(Object.create)return function(a,n,r,i){var o=slice$2(arguments,1);return assign$1.apply(this,[Object.create(a)].concat(o))};{let e=function(){};var t=e;return function(n,r,i,o){var s=slice$2(arguments,1);return e.prototype=n,assign$1.apply(this,[new e].concat(s))}}}function make_trim(){return String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function bind$3(t,e){return function(){return e.apply(t,Array.prototype.slice.call(arguments,0))}}function slice$2(t,e){return Array.prototype.slice.call(t,e||0)}function each$9(t,e){pluck$1(t,function(a,n){return e(a,n),!1})}function map$2(t,e){var a=isList$1(t)?[]:{};return pluck$1(t,function(n,r){return a[r]=e(n,r),!1}),a}function pluck$1(t,e){if(isList$1(t)){for(var a=0;a<t.length;a++)if(e(t[a],a))return t[a]}else for(var n in t)if(t.hasOwnProperty(n)&&e(t[n],n))return t[n]}function isList$1(t){return t!=null&&typeof t!="function"&&typeof t.length=="number"}function isFunction$5(t){return t&&{}.toString.call(t)==="[object Function]"}function isObject$b(t){return t&&{}.toString.call(t)==="[object Object]"}var util$6=util$7,slice$1=util$6.slice,pluck=util$6.pluck,each$8=util$6.each,bind$2=util$6.bind,create$1=util$6.create,isList=util$6.isList,isFunction$4=util$6.isFunction,isObject$a=util$6.isObject,storeEngine={createStore},storeAPI={version:"2.0.12",enabled:!1,get:function(t,e){var a=this.storage.read(this._namespacePrefix+t);return this._deserialize(a,e)},set:function(t,e){return e===void 0?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(e)),e)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var e=this;this.storage.each(function(a,n){t.call(e,e._deserialize(a),(n||"").replace(e._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return createStore.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return createStore(this.storage,this.plugins,t)}};function _warn(){var t=typeof console>"u"?null:console;if(t){var e=t.warn?t.warn:t.log;e.apply(t,arguments)}}function createStore(t,e,a){a||(a=""),t&&!isList(t)&&(t=[t]),e&&!isList(e)&&(e=[e]);var n=a?"__storejs_"+a+"_":"",r=a?new RegExp("^"+n):null,i=/^[a-zA-Z0-9_\-]*$/;if(!i.test(a))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var o={_namespacePrefix:n,_namespaceRegexp:r,_testStorage:function(l){try{var u="__storejs__test__";l.write(u,u);var c=l.read(u)===u;return l.remove(u),c}catch{return!1}},_assignPluginFnProp:function(l,u){var c=this[u];this[u]=function(){var h=slice$1(arguments,0),m=this;function p(){if(c)return each$8(arguments,function(y,w){h[w]=y}),c.apply(m,h)}var v=[p].concat(h);return l.apply(m,v)}},_serialize:function(l){return JSON.stringify(l)},_deserialize:function(l,u){if(!l)return u;var c="";try{c=JSON.parse(l)}catch{c=l}return c!==void 0?c:u},_addStorage:function(l){this.enabled||this._testStorage(l)&&(this.storage=l,this.enabled=!0)},_addPlugin:function(l){var u=this;if(isList(l)){each$8(l,function(h){u._addPlugin(h)});return}var c=pluck(this.plugins,function(h){return l===h});if(!c){if(this.plugins.push(l),!isFunction$4(l))throw new Error("Plugins must be function values that return objects");var d=l.call(this);if(!isObject$a(d))throw new Error("Plugins must return an object of function properties");each$8(d,function(h,m){if(!isFunction$4(h))throw new Error("Bad plugin property: "+m+" from plugin "+l.name+". Plugins should only return functions.");u._assignPluginFnProp(h,m)})}},addStorage:function(l){_warn("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(l)}},s=create$1(o,storeAPI,{plugins:[]});return s.raw={},each$8(s,function(l,u){isFunction$4(l)&&(s.raw[u]=bind$2(s,l))}),each$8(t,function(l){s._addStorage(l)}),each$8(e,function(l){s._addPlugin(l)}),s}var util$5=util$7,Global$4=util$5.Global,localStorage_1={name:"localStorage",read:read$6,write:write$6,each:each$7,remove:remove$5,clearAll:clearAll$5};function localStorage(){return Global$4.localStorage}function read$6(t){return localStorage().getItem(t)}function write$6(t,e){return localStorage().setItem(t,e)}function each$7(t){for(var e=localStorage().length-1;e>=0;e--){var a=localStorage().key(e);t(read$6(a),a)}}function remove$5(t){return localStorage().removeItem(t)}function clearAll$5(){return localStorage().clear()}var util$4=util$7,Global$3=util$4.Global,oldFFGlobalStorage={name:"oldFF-globalStorage",read:read$5,write:write$5,each:each$6,remove:remove$4,clearAll:clearAll$4},globalStorage=Global$3.globalStorage;function read$5(t){return globalStorage[t]}function write$5(t,e){globalStorage[t]=e}function each$6(t){for(var e=globalStorage.length-1;e>=0;e--){var a=globalStorage.key(e);t(globalStorage[a],a)}}function remove$4(t){return globalStorage.removeItem(t)}function clearAll$4(){each$6(function(t,e){delete globalStorage[t]})}var util$3=util$7,Global$2=util$3.Global,oldIEUserDataStorage={name:"oldIE-userDataStorage",write:write$4,read:read$4,each:each$5,remove:remove$3,clearAll:clearAll$3},storageName="storejs",doc$1=Global$2.document,_withStorageEl=_makeIEStorageElFunction(),disable=(Global$2.navigator?Global$2.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function write$4(t,e){if(!disable){var a=fixKey(t);_withStorageEl(function(n){n.setAttribute(a,e),n.save(storageName)})}}function read$4(t){if(!disable){var e=fixKey(t),a=null;return _withStorageEl(function(n){a=n.getAttribute(e)}),a}}function each$5(t){_withStorageEl(function(e){for(var a=e.XMLDocument.documentElement.attributes,n=a.length-1;n>=0;n--){var r=a[n];t(e.getAttribute(r.name),r.name)}})}function remove$3(t){var e=fixKey(t);_withStorageEl(function(a){a.removeAttribute(e),a.save(storageName)})}function clearAll$3(){_withStorageEl(function(t){var e=t.XMLDocument.documentElement.attributes;t.load(storageName);for(var a=e.length-1;a>=0;a--)t.removeAttribute(e[a].name);t.save(storageName)})}var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function fixKey(t){return t.replace(/^\d/,"___$&").replace(forbiddenCharsRegex,"___")}function _makeIEStorageElFunction(){if(!doc$1||!doc$1.documentElement||!doc$1.documentElement.addBehavior)return null;var t="script",e,a,n;try{a=new ActiveXObject("htmlfile"),a.open(),a.write("<"+t+">document.w=window</"+t+'><iframe src="/favicon.ico"></iframe>'),a.close(),e=a.w.frames[0].document,n=e.createElement("div")}catch{n=doc$1.createElement("div"),e=doc$1.body}return function(r){var i=[].slice.call(arguments,0);i.unshift(n),e.appendChild(n),n.addBehavior("#default#userData"),n.load(storageName),r.apply(this,i),e.removeChild(n)}}var util$2=util$7,Global$1=util$2.Global,trim=util$2.trim,cookieStorage={name:"cookieStorage",read:read$3,write:write$3,each:each$4,remove:remove$2,clearAll:clearAll$2},doc=Global$1.document;function read$3(t){if(!t||!_has(t))return null;var e="(?:^|.*;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(doc.cookie.replace(new RegExp(e),"$1"))}function each$4(t){for(var e=doc.cookie.split(/; ?/g),a=e.length-1;a>=0;a--)if(trim(e[a])){var n=e[a].split("="),r=unescape(n[0]),i=unescape(n[1]);t(i,r)}}function write$3(t,e){t&&(doc.cookie=escape(t)+"="+escape(e)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function remove$2(t){!t||!_has(t)||(doc.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function clearAll$2(){each$4(function(t,e){remove$2(e)})}function _has(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(doc.cookie)}var util$1=util$7,Global=util$1.Global,sessionStorage_1={name:"sessionStorage",read:read$2,write:write$2,each:each$3,remove:remove$1,clearAll:clearAll$1};function sessionStorage(){return Global.sessionStorage}function read$2(t){return sessionStorage().getItem(t)}function write$2(t,e){return sessionStorage().setItem(t,e)}function each$3(t){for(var e=sessionStorage().length-1;e>=0;e--){var a=sessionStorage().key(e);t(read$2(a),a)}}function remove$1(t){return sessionStorage().removeItem(t)}function clearAll$1(){return sessionStorage().clear()}var memoryStorage_1={name:"memoryStorage",read:read$1,write:write$1,each:each$2,remove,clearAll},memoryStorage={};function read$1(t){return memoryStorage[t]}function write$1(t,e){memoryStorage[t]=e}function each$2(t){for(var e in memoryStorage)memoryStorage.hasOwnProperty(e)&&t(memoryStorage[e],e)}function remove(t){delete memoryStorage[t]}function clearAll(t){memoryStorage={}}var all=[localStorage_1,oldFFGlobalStorage,oldIEUserDataStorage,cookieStorage,sessionStorage_1,memoryStorage_1],json2$1={},hasRequiredJson2;function requireJson2(){return hasRequiredJson2||(hasRequiredJson2=1,typeof JSON!="object"&&(JSON={}),function(){var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(t){return t<10?"0"+t:t}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,function(e){var a=meta[e];return typeof a=="string"?a:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var a,n,r,i,o=gap,s,l=e[t];switch(l&&typeof l=="object"&&typeof l.toJSON=="function"&&(l=l.toJSON(t)),typeof rep=="function"&&(l=rep.call(e,t,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],Object.prototype.toString.apply(l)==="[object Array]"){for(i=l.length,a=0;a<i;a+=1)s[a]=str(a,l)||"null";return r=s.length===0?"[]":gap?`[
|
||
`+gap+s.join(`,
|
||
`+gap)+`
|
||
`+o+"]":"["+s.join(",")+"]",gap=o,r}if(rep&&typeof rep=="object")for(i=rep.length,a=0;a<i;a+=1)typeof rep[a]=="string"&&(n=rep[a],r=str(n,l),r&&s.push(quote(n)+(gap?": ":":")+r));else for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(r=str(n,l),r&&s.push(quote(n)+(gap?": ":":")+r));return r=s.length===0?"{}":gap?`{
|
||
`+gap+s.join(`,
|
||
`+gap)+`
|
||
`+o+"}":"{"+s.join(",")+"}",gap=o,r}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,a){var n;if(gap="",indent="",typeof a=="number")for(n=0;n<a;n+=1)indent+=" ";else typeof a=="string"&&(indent=a);if(rep=e,e&&typeof e!="function"&&(typeof e!="object"||typeof e.length!="number"))throw new Error("JSON.stringify");return str("",{"":t})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(t,e){var a,n,r=t[e];if(r&&typeof r=="object")for(a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n=walk(r,a),n!==void 0?r[a]=n:delete r[a]);return reviver.call(t,e,r)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()),json2$1}var json2=json2Plugin;function json2Plugin(){return requireJson2(),{}}var engine=storeEngine,storages=all,plugins=[json2],store_legacy=engine.createStore(storages,plugins);const store$1=getDefaultExportFromCjs(store_legacy);var util=util$7,bind$1=util.bind,each$1=util.each,create=util.create,slice=util.slice,events=eventsPlugin$1;function eventsPlugin$1(){var t=_newPubSub();return{watch:e,unwatch:a,once:n,set:r,remove:i,clearAll:o};function e(s,l,u){return t.on(l,bind$1(this,u))}function a(s,l){t.off(l)}function n(s,l,u){t.once(l,bind$1(this,u))}function r(s,l,u){var c=this.get(l);s(),t.fire(l,u,c)}function i(s,l){var u=this.get(l);s(),t.fire(l,void 0,u)}function o(s){var l={};this.each(function(u,c){l[c]=u}),s(),each$1(l,function(u,c){t.fire(c,void 0,u)})}}function _newPubSub(){return create(_pubSubBase,{_id:0,_subSignals:{},_subCallbacks:{}})}var _pubSubBase={_id:null,_subCallbacks:null,_subSignals:null,on:function(t,e){return this._subCallbacks[t]||(this._subCallbacks[t]={}),this._id+=1,this._subCallbacks[t][this._id]=e,this._subSignals[this._id]=t,this._id},off:function(t){var e=this._subSignals[t];delete this._subCallbacks[e][t],delete this._subSignals[t]},once:function(t,e){var a=this.on(t,bind$1(this,function(){e.apply(this,arguments),this.off(a)}))},fire:function(t){var e=slice(arguments,1);each$1(this._subCallbacks[t],function(a){a.apply(this,e)})}},eventsPlugin=events,observe=[eventsPlugin,observePlugin];function observePlugin(){return{observe:t,unobserve:e};function t(a,n,r){var i=this.watch(n,r);return r(this.get(n)),i}function e(a,n){this.unwatch(n)}}const observePlugin$1=getDefaultExportFromCjs(observe);var flushPending=!1,flushing=!1,queue=[],lastFlushedIndex=-1;function scheduler(t){queueJob(t)}function queueJob(t){queue.includes(t)||queue.push(t),queueFlush()}function dequeueJob(t){let e=queue.indexOf(t);e!==-1&&e>lastFlushedIndex&&queue.splice(e,1)}function queueFlush(){!flushing&&!flushPending&&(flushPending=!0,queueMicrotask(flushJobs))}function flushJobs(){flushPending=!1,flushing=!0;for(let t=0;t<queue.length;t++)queue[t](),lastFlushedIndex=t;queue.length=0,lastFlushedIndex=-1,flushing=!1}var reactive,effect$3,release,raw,shouldSchedule=!0;function disableEffectScheduling(t){shouldSchedule=!1,t(),shouldSchedule=!0}function setReactivityEngine(t){reactive=t.reactive,release=t.release,effect$3=e=>t.effect(e,{scheduler:a=>{shouldSchedule?scheduler(a):a()}}),raw=t.raw}function overrideEffect(t){effect$3=t}function elementBoundEffect(t){let e=()=>{};return[n=>{let r=effect$3(n);return t._x_effects||(t._x_effects=new Set,t._x_runEffects=()=>{t._x_effects.forEach(i=>i())}),t._x_effects.add(r),e=()=>{r!==void 0&&(t._x_effects.delete(r),release(r))},r},()=>{e()}]}function dispatch(t,e,a={}){t.dispatchEvent(new CustomEvent(e,{detail:a,bubbles:!0,composed:!0,cancelable:!0}))}function walk(t,e){if(typeof ShadowRoot=="function"&&t instanceof ShadowRoot){Array.from(t.children).forEach(r=>walk(r,e));return}let a=!1;if(e(t,()=>a=!0),a)return;let n=t.firstElementChild;for(;n;)walk(n,e),n=n.nextElementSibling}function warn(t,...e){console.warn(`Alpine Warning: ${t}`,...e)}var started=!1;function start$1(){started&&warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),started=!0,document.body||warn("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),dispatch(document,"alpine:init"),dispatch(document,"alpine:initializing"),startObservingMutations(),onElAdded(e=>initTree(e,walk)),onElRemoved(e=>destroyTree(e)),onAttributesAdded((e,a)=>{directives(e,a).forEach(n=>n())});let t=e=>!closestRoot(e.parentElement,!0);Array.from(document.querySelectorAll(allSelectors())).filter(t).forEach(e=>{initTree(e)}),dispatch(document,"alpine:initialized")}var rootSelectorCallbacks=[],initSelectorCallbacks=[];function rootSelectors(){return rootSelectorCallbacks.map(t=>t())}function allSelectors(){return rootSelectorCallbacks.concat(initSelectorCallbacks).map(t=>t())}function addRootSelector(t){rootSelectorCallbacks.push(t)}function addInitSelector(t){initSelectorCallbacks.push(t)}function closestRoot(t,e=!1){return findClosest(t,a=>{if((e?allSelectors():rootSelectors()).some(r=>a.matches(r)))return!0})}function findClosest(t,e){if(t){if(e(t))return t;if(t._x_teleportBack&&(t=t._x_teleportBack),!!t.parentElement)return findClosest(t.parentElement,e)}}function isRoot(t){return rootSelectors().some(e=>t.matches(e))}var initInterceptors=[];function interceptInit(t){initInterceptors.push(t)}function initTree(t,e=walk,a=()=>{}){deferHandlingDirectives(()=>{e(t,(n,r)=>{a(n,r),initInterceptors.forEach(i=>i(n,r)),directives(n,n.attributes).forEach(i=>i()),n._x_ignore&&r()})})}function destroyTree(t){walk(t,e=>{cleanupAttributes(e),cleanupElement(e)})}var onAttributeAddeds=[],onElRemoveds=[],onElAddeds=[];function onElAdded(t){onElAddeds.push(t)}function onElRemoved(t,e){typeof e=="function"?(t._x_cleanups||(t._x_cleanups=[]),t._x_cleanups.push(e)):(e=t,onElRemoveds.push(e))}function onAttributesAdded(t){onAttributeAddeds.push(t)}function onAttributeRemoved(t,e,a){t._x_attributeCleanups||(t._x_attributeCleanups={}),t._x_attributeCleanups[e]||(t._x_attributeCleanups[e]=[]),t._x_attributeCleanups[e].push(a)}function cleanupAttributes(t,e){t._x_attributeCleanups&&Object.entries(t._x_attributeCleanups).forEach(([a,n])=>{(e===void 0||e.includes(a))&&(n.forEach(r=>r()),delete t._x_attributeCleanups[a])})}function cleanupElement(t){if(t._x_cleanups)for(;t._x_cleanups.length;)t._x_cleanups.pop()()}var observer=new MutationObserver(onMutate),currentlyObserving=!1;function startObservingMutations(){observer.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),currentlyObserving=!0}function stopObservingMutations(){flushObserver(),observer.disconnect(),currentlyObserving=!1}var recordQueue=[],willProcessRecordQueue=!1;function flushObserver(){recordQueue=recordQueue.concat(observer.takeRecords()),recordQueue.length&&!willProcessRecordQueue&&(willProcessRecordQueue=!0,queueMicrotask(()=>{processRecordQueue(),willProcessRecordQueue=!1}))}function processRecordQueue(){onMutate(recordQueue),recordQueue.length=0}function mutateDom(t){if(!currentlyObserving)return t();stopObservingMutations();let e=t();return startObservingMutations(),e}var isCollecting=!1,deferredMutations=[];function deferMutations(){isCollecting=!0}function flushAndStopDeferringMutations(){isCollecting=!1,onMutate(deferredMutations),deferredMutations=[]}function onMutate(t){if(isCollecting){deferredMutations=deferredMutations.concat(t);return}let e=[],a=[],n=new Map,r=new Map;for(let i=0;i<t.length;i++)if(!t[i].target._x_ignoreMutationObserver&&(t[i].type==="childList"&&(t[i].addedNodes.forEach(o=>o.nodeType===1&&e.push(o)),t[i].removedNodes.forEach(o=>o.nodeType===1&&a.push(o))),t[i].type==="attributes")){let o=t[i].target,s=t[i].attributeName,l=t[i].oldValue,u=()=>{n.has(o)||n.set(o,[]),n.get(o).push({name:s,value:o.getAttribute(s)})},c=()=>{r.has(o)||r.set(o,[]),r.get(o).push(s)};o.hasAttribute(s)&&l===null?u():o.hasAttribute(s)?(c(),u()):c()}r.forEach((i,o)=>{cleanupAttributes(o,i)}),n.forEach((i,o)=>{onAttributeAddeds.forEach(s=>s(o,i))});for(let i of a)e.includes(i)||(onElRemoveds.forEach(o=>o(i)),destroyTree(i));e.forEach(i=>{i._x_ignoreSelf=!0,i._x_ignore=!0});for(let i of e)a.includes(i)||i.isConnected&&(delete i._x_ignoreSelf,delete i._x_ignore,onElAddeds.forEach(o=>o(i)),i._x_ignore=!0,i._x_ignoreSelf=!0);e.forEach(i=>{delete i._x_ignoreSelf,delete i._x_ignore}),e=null,a=null,n=null,r=null}function scope(t){return mergeProxies(closestDataStack(t))}function addScopeToNode(t,e,a){return t._x_dataStack=[e,...closestDataStack(a||t)],()=>{t._x_dataStack=t._x_dataStack.filter(n=>n!==e)}}function closestDataStack(t){return t._x_dataStack?t._x_dataStack:typeof ShadowRoot=="function"&&t instanceof ShadowRoot?closestDataStack(t.host):t.parentNode?closestDataStack(t.parentNode):[]}function mergeProxies(t){let e=new Proxy({},{ownKeys:()=>Array.from(new Set(t.flatMap(a=>Object.keys(a)))),has:(a,n)=>t.some(r=>r.hasOwnProperty(n)),get:(a,n)=>(t.find(r=>{if(r.hasOwnProperty(n)){let i=Object.getOwnPropertyDescriptor(r,n);if(i.get&&i.get._x_alreadyBound||i.set&&i.set._x_alreadyBound)return!0;if((i.get||i.set)&&i.enumerable){let o=i.get,s=i.set,l=i;o=o&&o.bind(e),s=s&&s.bind(e),o&&(o._x_alreadyBound=!0),s&&(s._x_alreadyBound=!0),Object.defineProperty(r,n,{...l,get:o,set:s})}return!0}return!1})||{})[n],set:(a,n,r)=>{let i=t.find(o=>o.hasOwnProperty(n));return i?i[n]=r:t[t.length-1][n]=r,!0}});return e}function initInterceptors2(t){let e=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,a=(n,r="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([i,{value:o,enumerable:s}])=>{if(s===!1||o===void 0)return;let l=r===""?i:`${r}.${i}`;typeof o=="object"&&o!==null&&o._x_interceptor?n[i]=o.initialize(t,l,i):e(o)&&o!==n&&!(o instanceof Element)&&a(o,l)})};return a(t)}function interceptor(t,e=()=>{}){let a={initialValue:void 0,_x_interceptor:!0,initialize(n,r,i){return t(this.initialValue,()=>get$3(n,r),o=>set$3(n,r,o),r,i)}};return e(a),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let r=a.initialize.bind(a);a.initialize=(i,o,s)=>{let l=n.initialize(i,o,s);return a.initialValue=l,r(i,o,s)}}else a.initialValue=n;return a}}function get$3(t,e){return e.split(".").reduce((a,n)=>a[n],t)}function set$3(t,e,a){if(typeof e=="string"&&(e=e.split(".")),e.length===1)t[e[0]]=a;else{if(e.length===0)throw error;return t[e[0]]||(t[e[0]]={}),set$3(t[e[0]],e.slice(1),a)}}var magics={};function magic(t,e){magics[t]=e}function injectMagics(t,e){return Object.entries(magics).forEach(([a,n])=>{let r=null;function i(){if(r)return r;{let[o,s]=getElementBoundUtilities(e);return r={interceptor,...o},onElRemoved(e,s),r}}Object.defineProperty(t,`$${a}`,{get(){return n(e,i())},enumerable:!1})}),t}function tryCatch(t,e,a,...n){try{return a(...n)}catch(r){handleError(r,t,e)}}function handleError(t,e,a=void 0){Object.assign(t,{el:e,expression:a}),console.warn(`Alpine Expression Error: ${t.message}
|
||
|
||
${a?'Expression: "'+a+`"
|
||
|
||
`:""}`,e),setTimeout(()=>{throw t},0)}var shouldAutoEvaluateFunctions=!0;function dontAutoEvaluateFunctions(t){let e=shouldAutoEvaluateFunctions;shouldAutoEvaluateFunctions=!1;let a=t();return shouldAutoEvaluateFunctions=e,a}function evaluate(t,e,a={}){let n;return evaluateLater(t,e)(r=>n=r,a),n}function evaluateLater(...t){return theEvaluatorFunction(...t)}var theEvaluatorFunction=normalEvaluator;function setEvaluator(t){theEvaluatorFunction=t}function normalEvaluator(t,e){let a={};injectMagics(a,t);let n=[a,...closestDataStack(t)],r=typeof e=="function"?generateEvaluatorFromFunction(n,e):generateEvaluatorFromString(n,e,t);return tryCatch.bind(null,t,e,r)}function generateEvaluatorFromFunction(t,e){return(a=()=>{},{scope:n={},params:r=[]}={})=>{let i=e.apply(mergeProxies([n,...t]),r);runIfTypeOfFunction(a,i)}}var evaluatorMemo={};function generateFunctionFromString(t,e){if(evaluatorMemo[t])return evaluatorMemo[t];let a=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(t.trim())||/^(let|const)\s/.test(t.trim())?`(async()=>{ ${t} })()`:t,i=(()=>{try{return new a(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`)}catch(o){return handleError(o,e,t),Promise.resolve()}})();return evaluatorMemo[t]=i,i}function generateEvaluatorFromString(t,e,a){let n=generateFunctionFromString(e,a);return(r=()=>{},{scope:i={},params:o=[]}={})=>{n.result=void 0,n.finished=!1;let s=mergeProxies([i,...t]);if(typeof n=="function"){let l=n(n,s).catch(u=>handleError(u,a,e));n.finished?(runIfTypeOfFunction(r,n.result,s,o,a),n.result=void 0):l.then(u=>{runIfTypeOfFunction(r,u,s,o,a)}).catch(u=>handleError(u,a,e)).finally(()=>n.result=void 0)}}}function runIfTypeOfFunction(t,e,a,n,r){if(shouldAutoEvaluateFunctions&&typeof e=="function"){let i=e.apply(a,n);i instanceof Promise?i.then(o=>runIfTypeOfFunction(t,o,a,n)).catch(o=>handleError(o,r,e)):t(i)}else typeof e=="object"&&e instanceof Promise?e.then(i=>t(i)):t(e)}var prefixAsString="x-";function prefix(t=""){return prefixAsString+t}function setPrefix(t){prefixAsString=t}var directiveHandlers={};function directive(t,e){return directiveHandlers[t]=e,{before(a){if(!directiveHandlers[a]){console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution");return}const n=directiveOrder.indexOf(a);directiveOrder.splice(n>=0?n:directiveOrder.indexOf("DEFAULT"),0,t)}}}function directives(t,e,a){if(e=Array.from(e),t._x_virtualDirectives){let i=Object.entries(t._x_virtualDirectives).map(([s,l])=>({name:s,value:l})),o=attributesOnly(i);i=i.map(s=>o.find(l=>l.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),e=e.concat(i)}let n={};return e.map(toTransformedAttributes((i,o)=>n[i]=o)).filter(outNonAlpineAttributes).map(toParsedDirectives(n,a)).sort(byPriority).map(i=>getDirectiveHandler(t,i))}function attributesOnly(t){return Array.from(t).map(toTransformedAttributes()).filter(e=>!outNonAlpineAttributes(e))}var isDeferringHandlers=!1,directiveHandlerStacks=new Map,currentHandlerStackKey=Symbol();function deferHandlingDirectives(t){isDeferringHandlers=!0;let e=Symbol();currentHandlerStackKey=e,directiveHandlerStacks.set(e,[]);let a=()=>{for(;directiveHandlerStacks.get(e).length;)directiveHandlerStacks.get(e).shift()();directiveHandlerStacks.delete(e)},n=()=>{isDeferringHandlers=!1,a()};t(a),n()}function getElementBoundUtilities(t){let e=[],a=s=>e.push(s),[n,r]=elementBoundEffect(t);return e.push(r),[{Alpine:alpine_default,effect:n,cleanup:a,evaluateLater:evaluateLater.bind(evaluateLater,t),evaluate:evaluate.bind(evaluate,t)},()=>e.forEach(s=>s())]}function getDirectiveHandler(t,e){let a=()=>{},n=directiveHandlers[e.type]||a,[r,i]=getElementBoundUtilities(t);onAttributeRemoved(t,e.original,i);let o=()=>{t._x_ignore||t._x_ignoreSelf||(n.inline&&n.inline(t,e,r),n=n.bind(n,t,e,r),isDeferringHandlers?directiveHandlerStacks.get(currentHandlerStackKey).push(n):n())};return o.runCleanups=i,o}var startingWith=(t,e)=>({name:a,value:n})=>(a.startsWith(t)&&(a=a.replace(t,e)),{name:a,value:n}),into=t=>t;function toTransformedAttributes(t=()=>{}){return({name:e,value:a})=>{let{name:n,value:r}=attributeTransformers.reduce((i,o)=>o(i),{name:e,value:a});return n!==e&&t(n,e),{name:n,value:r}}}var attributeTransformers=[];function mapAttributes(t){attributeTransformers.push(t)}function outNonAlpineAttributes({name:t}){return alpineAttributeRegex().test(t)}var alpineAttributeRegex=()=>new RegExp(`^${prefixAsString}([^:^.]+)\\b`);function toParsedDirectives(t,e){return({name:a,value:n})=>{let r=a.match(alpineAttributeRegex()),i=a.match(/:([a-zA-Z0-9\-:]+)/),o=a.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],s=e||t[a]||a;return{type:r?r[1]:null,value:i?i[1]:null,modifiers:o.map(l=>l.replace(".","")),expression:n,original:s}}}var DEFAULT="DEFAULT",directiveOrder=["ignore","ref","data","id","bind","init","for","model","modelable","transition","show","if",DEFAULT,"teleport"];function byPriority(t,e){let a=directiveOrder.indexOf(t.type)===-1?DEFAULT:t.type,n=directiveOrder.indexOf(e.type)===-1?DEFAULT:e.type;return directiveOrder.indexOf(a)-directiveOrder.indexOf(n)}var tickStack=[],isHolding=!1;function nextTick(t=()=>{}){return queueMicrotask(()=>{isHolding||setTimeout(()=>{releaseNextTicks()})}),new Promise(e=>{tickStack.push(()=>{t(),e()})})}function releaseNextTicks(){for(isHolding=!1;tickStack.length;)tickStack.shift()()}function holdNextTicks(){isHolding=!0}function setClasses(t,e){return Array.isArray(e)?setClassesFromString(t,e.join(" ")):typeof e=="object"&&e!==null?setClassesFromObject(t,e):typeof e=="function"?setClasses(t,e()):setClassesFromString(t,e)}function setClassesFromString(t,e){let a=r=>r.split(" ").filter(i=>!t.classList.contains(i)).filter(Boolean),n=r=>(t.classList.add(...r),()=>{t.classList.remove(...r)});return e=e===!0?e="":e||"",n(a(e))}function setClassesFromObject(t,e){let a=s=>s.split(" ").filter(Boolean),n=Object.entries(e).flatMap(([s,l])=>l?a(s):!1).filter(Boolean),r=Object.entries(e).flatMap(([s,l])=>l?!1:a(s)).filter(Boolean),i=[],o=[];return r.forEach(s=>{t.classList.contains(s)&&(t.classList.remove(s),o.push(s))}),n.forEach(s=>{t.classList.contains(s)||(t.classList.add(s),i.push(s))}),()=>{o.forEach(s=>t.classList.add(s)),i.forEach(s=>t.classList.remove(s))}}function setStyles(t,e){return typeof e=="object"&&e!==null?setStylesFromObject(t,e):setStylesFromString(t,e)}function setStylesFromObject(t,e){let a={};return Object.entries(e).forEach(([n,r])=>{a[n]=t.style[n],n.startsWith("--")||(n=kebabCase(n)),t.style.setProperty(n,r)}),setTimeout(()=>{t.style.length===0&&t.removeAttribute("style")}),()=>{setStyles(t,a)}}function setStylesFromString(t,e){let a=t.getAttribute("style",e);return t.setAttribute("style",e),()=>{t.setAttribute("style",a||"")}}function kebabCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function once(t,e=()=>{}){let a=!1;return function(){a?e.apply(this,arguments):(a=!0,t.apply(this,arguments))}}directive("transition",(t,{value:e,modifiers:a,expression:n},{evaluate:r})=>{typeof n=="function"&&(n=r(n)),n!==!1&&(!n||typeof n=="boolean"?registerTransitionsFromHelper(t,a,e):registerTransitionsFromClassString(t,n,e))});function registerTransitionsFromClassString(t,e,a){registerTransitionObject(t,setClasses,""),{enter:r=>{t._x_transition.enter.during=r},"enter-start":r=>{t._x_transition.enter.start=r},"enter-end":r=>{t._x_transition.enter.end=r},leave:r=>{t._x_transition.leave.during=r},"leave-start":r=>{t._x_transition.leave.start=r},"leave-end":r=>{t._x_transition.leave.end=r}}[a](e)}function registerTransitionsFromHelper(t,e,a){registerTransitionObject(t,setStyles);let n=!e.includes("in")&&!e.includes("out")&&!a,r=n||e.includes("in")||["enter"].includes(a),i=n||e.includes("out")||["leave"].includes(a);e.includes("in")&&!n&&(e=e.filter((w,_)=>_<e.indexOf("out"))),e.includes("out")&&!n&&(e=e.filter((w,_)=>_>e.indexOf("out")));let o=!e.includes("opacity")&&!e.includes("scale"),s=o||e.includes("opacity"),l=o||e.includes("scale"),u=s?0:1,c=l?modifierValue(e,"scale",95)/100:1,d=modifierValue(e,"delay",0)/1e3,h=modifierValue(e,"origin","center"),m="opacity, transform",p=modifierValue(e,"duration",150)/1e3,v=modifierValue(e,"duration",75)/1e3,y="cubic-bezier(0.4, 0.0, 0.2, 1)";r&&(t._x_transition.enter.during={transformOrigin:h,transitionDelay:`${d}s`,transitionProperty:m,transitionDuration:`${p}s`,transitionTimingFunction:y},t._x_transition.enter.start={opacity:u,transform:`scale(${c})`},t._x_transition.enter.end={opacity:1,transform:"scale(1)"}),i&&(t._x_transition.leave.during={transformOrigin:h,transitionDelay:`${d}s`,transitionProperty:m,transitionDuration:`${v}s`,transitionTimingFunction:y},t._x_transition.leave.start={opacity:1,transform:"scale(1)"},t._x_transition.leave.end={opacity:u,transform:`scale(${c})`})}function registerTransitionObject(t,e,a={}){t._x_transition||(t._x_transition={enter:{during:a,start:a,end:a},leave:{during:a,start:a,end:a},in(n=()=>{},r=()=>{}){transition(t,e,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,r)},out(n=()=>{},r=()=>{}){transition(t,e,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,r)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(t,e,a,n){const r=document.visibilityState==="visible"?requestAnimationFrame:setTimeout;let i=()=>r(a);if(e){t._x_transition&&(t._x_transition.enter||t._x_transition.leave)?t._x_transition.enter&&(Object.entries(t._x_transition.enter.during).length||Object.entries(t._x_transition.enter.start).length||Object.entries(t._x_transition.enter.end).length)?t._x_transition.in(a):i():t._x_transition?t._x_transition.in(a):i();return}t._x_hidePromise=t._x_transition?new Promise((o,s)=>{t._x_transition.out(()=>{},()=>o(n)),t._x_transitioning.beforeCancel(()=>s({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let o=closestHide(t);o?(o._x_hideChildren||(o._x_hideChildren=[]),o._x_hideChildren.push(t)):r(()=>{let s=l=>{let u=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(s)]).then(([c])=>c());return delete l._x_hidePromise,delete l._x_hideChildren,u};s(t).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function closestHide(t){let e=t.parentNode;if(e)return e._x_hidePromise?e:closestHide(e)}function transition(t,e,{during:a,start:n,end:r}={},i=()=>{},o=()=>{}){if(t._x_transitioning&&t._x_transitioning.cancel(),Object.keys(a).length===0&&Object.keys(n).length===0&&Object.keys(r).length===0){i(),o();return}let s,l,u;performTransition(t,{start(){s=e(t,n)},during(){l=e(t,a)},before:i,end(){s(),u=e(t,r)},after:o,cleanup(){l(),u()}})}function performTransition(t,e){let a,n,r,i=once(()=>{mutateDom(()=>{a=!0,n||e.before(),r||(e.end(),releaseNextTicks()),e.after(),t.isConnected&&e.cleanup(),delete t._x_transitioning})});t._x_transitioning={beforeCancels:[],beforeCancel(o){this.beforeCancels.push(o)},cancel:once(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();i()}),finish:i},mutateDom(()=>{e.start(),e.during()}),holdNextTicks(),requestAnimationFrame(()=>{if(a)return;let o=Number(getComputedStyle(t).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,s=Number(getComputedStyle(t).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;o===0&&(o=Number(getComputedStyle(t).animationDuration.replace("s",""))*1e3),mutateDom(()=>{e.before()}),n=!0,requestAnimationFrame(()=>{a||(mutateDom(()=>{e.end()}),releaseNextTicks(),setTimeout(t._x_transitioning.finish,o+s),r=!0)})})}function modifierValue(t,e,a){if(t.indexOf(e)===-1)return a;const n=t[t.indexOf(e)+1];if(!n||e==="scale"&&isNaN(n))return a;if(e==="duration"||e==="delay"){let r=n.match(/([0-9]+)ms/);if(r)return r[1]}return e==="origin"&&["top","right","left","center","bottom"].includes(t[t.indexOf(e)+2])?[n,t[t.indexOf(e)+2]].join(" "):n}var isCloning=!1;function skipDuringClone(t,e=()=>{}){return(...a)=>isCloning?e(...a):t(...a)}function onlyDuringClone(t){return(...e)=>isCloning&&t(...e)}function cloneNode(t,e){t._x_dataStack&&(e._x_dataStack=t._x_dataStack,e.setAttribute("data-has-alpine-state",!0)),isCloning=!0,dontRegisterReactiveSideEffects(()=>{initTree(e,(a,n)=>{n(a,()=>{})})}),isCloning=!1}var isCloningLegacy=!1;function clone$3(t,e){e._x_dataStack||(e._x_dataStack=t._x_dataStack),isCloning=!0,isCloningLegacy=!0,dontRegisterReactiveSideEffects(()=>{cloneTree(e)}),isCloning=!1,isCloningLegacy=!1}function cloneTree(t){let e=!1;initTree(t,(n,r)=>{walk(n,(i,o)=>{if(e&&isRoot(i))return o();e=!0,r(i,o)})})}function dontRegisterReactiveSideEffects(t){let e=effect$3;overrideEffect((a,n)=>{let r=e(a);return release(r),()=>{}}),t(),overrideEffect(e)}function shouldSkipRegisteringDataDuringClone(t){return isCloning?isCloningLegacy?!0:t.hasAttribute("data-has-alpine-state"):!1}function bind(t,e,a,n=[]){switch(t._x_bindings||(t._x_bindings=reactive({})),t._x_bindings[e]=a,e=n.includes("camel")?camelCase$2(e):e,e){case"value":bindInputValue(t,a);break;case"style":bindStyles(t,a);break;case"class":bindClasses(t,a);break;case"selected":case"checked":bindAttributeAndProperty(t,e,a);break;default:bindAttribute(t,e,a);break}}function bindInputValue(t,e){if(t.type==="radio")t.attributes.value===void 0&&(t.value=e),window.fromModel&&(t.checked=checkedAttrLooseCompare(t.value,e));else if(t.type==="checkbox")Number.isInteger(e)?t.value=e:!Array.isArray(e)&&typeof e!="boolean"&&![null,void 0].includes(e)?t.value=String(e):Array.isArray(e)?t.checked=e.some(a=>checkedAttrLooseCompare(a,t.value)):t.checked=!!e;else if(t.tagName==="SELECT")updateSelect(t,e);else{if(t.value===e)return;t.value=e===void 0?"":e}}function bindClasses(t,e){t._x_undoAddedClasses&&t._x_undoAddedClasses(),t._x_undoAddedClasses=setClasses(t,e)}function bindStyles(t,e){t._x_undoAddedStyles&&t._x_undoAddedStyles(),t._x_undoAddedStyles=setStyles(t,e)}function bindAttributeAndProperty(t,e,a){bindAttribute(t,e,a),setPropertyIfChanged(t,e,a)}function bindAttribute(t,e,a){[null,void 0,!1].includes(a)&&attributeShouldntBePreservedIfFalsy(e)?t.removeAttribute(e):(isBooleanAttr(e)&&(a=e),setIfChanged(t,e,a))}function setIfChanged(t,e,a){t.getAttribute(e)!=a&&t.setAttribute(e,a)}function setPropertyIfChanged(t,e,a){t[e]!==a&&(t[e]=a)}function updateSelect(t,e){const a=[].concat(e).map(n=>n+"");Array.from(t.options).forEach(n=>{n.selected=a.includes(n.value)})}function camelCase$2(t){return t.toLowerCase().replace(/-(\w)/g,(e,a)=>a.toUpperCase())}function checkedAttrLooseCompare(t,e){return t==e}function isBooleanAttr(t){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(t)}function attributeShouldntBePreservedIfFalsy(t){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(t)}function getBinding(t,e,a){return t._x_bindings&&t._x_bindings[e]!==void 0?t._x_bindings[e]:getAttributeBinding(t,e,a)}function extractProp(t,e,a,n=!0){if(t._x_bindings&&t._x_bindings[e]!==void 0)return t._x_bindings[e];if(t._x_inlineBindings&&t._x_inlineBindings[e]!==void 0){let r=t._x_inlineBindings[e];return r.extract=n,dontAutoEvaluateFunctions(()=>evaluate(t,r.expression))}return getAttributeBinding(t,e,a)}function getAttributeBinding(t,e,a){let n=t.getAttribute(e);return n===null?typeof a=="function"?a():a:n===""?!0:isBooleanAttr(e)?!![e,"true"].includes(n):n}function debounce$2(t,e){var a;return function(){var n=this,r=arguments,i=function(){a=null,t.apply(n,r)};clearTimeout(a),a=setTimeout(i,e)}}function throttle(t,e){let a;return function(){let n=this,r=arguments;a||(t.apply(n,r),a=!0,setTimeout(()=>a=!1,e))}}function entangle({get:t,set:e},{get:a,set:n}){let r=!0,i,o,s,l=effect$3(()=>{let u,c;r?(u=t(),n(JSON.parse(JSON.stringify(u))),c=a(),r=!1):(u=t(),c=a(),o=JSON.stringify(u),s=JSON.stringify(c),o!==i?(c=a(),n(u),c=u):(e(JSON.parse(s??null)),u=c)),i=JSON.stringify(u),JSON.stringify(c)});return()=>{release(l)}}function plugin(t){(Array.isArray(t)?t:[t]).forEach(a=>a(alpine_default))}var stores={},isReactive=!1;function store(t,e){if(isReactive||(stores=reactive(stores),isReactive=!0),e===void 0)return stores[t];stores[t]=e,typeof e=="object"&&e!==null&&e.hasOwnProperty("init")&&typeof e.init=="function"&&stores[t].init(),initInterceptors2(stores[t])}function getStores(){return stores}var binds={};function bind2(t,e){let a=typeof e!="function"?()=>e:e;return t instanceof Element?applyBindingsObject(t,a()):(binds[t]=a,()=>{})}function injectBindingProviders(t){return Object.entries(binds).forEach(([e,a])=>{Object.defineProperty(t,e,{get(){return(...n)=>a(...n)}})}),t}function applyBindingsObject(t,e,a){let n=[];for(;n.length;)n.pop()();let r=Object.entries(e).map(([o,s])=>({name:o,value:s})),i=attributesOnly(r);return r=r.map(o=>i.find(s=>s.name===o.name)?{name:`x-bind:${o.name}`,value:`"${o.value}"`}:o),directives(t,r,a).map(o=>{n.push(o.runCleanups),o()}),()=>{for(;n.length;)n.pop()()}}var datas={};function data(t,e){datas[t]=e}function injectDataProviders(t,e){return Object.entries(datas).forEach(([a,n])=>{Object.defineProperty(t,a,{get(){return(...r)=>n.bind(e)(...r)},enumerable:!1})}),t}var Alpine$1={get reactive(){return reactive},get release(){return release},get effect(){return effect$3},get raw(){return raw},version:"3.13.0",flushAndStopDeferringMutations,dontAutoEvaluateFunctions,disableEffectScheduling,startObservingMutations,stopObservingMutations,setReactivityEngine,onAttributeRemoved,onAttributesAdded,closestDataStack,skipDuringClone,onlyDuringClone,addRootSelector,addInitSelector,addScopeToNode,deferMutations,mapAttributes,evaluateLater,interceptInit,setEvaluator,mergeProxies,extractProp,findClosest,onElRemoved,closestRoot,destroyTree,interceptor,transition,setStyles,mutateDom,directive,entangle,throttle,debounce:debounce$2,evaluate,initTree,nextTick,prefixed:prefix,prefix:setPrefix,plugin,magic,store,start:start$1,clone:clone$3,cloneNode,bound:getBinding,$data:scope,walk,data,bind:bind2},alpine_default=Alpine$1;function makeMap(t,e){const a=Object.create(null),n=t.split(",");for(let r=0;r<n.length;r++)a[n[r]]=!0;return e?r=>!!a[r.toLowerCase()]:r=>!!a[r]}var EMPTY_OBJ=Object.freeze({}),hasOwnProperty$b=Object.prototype.hasOwnProperty,hasOwn=(t,e)=>hasOwnProperty$b.call(t,e),isArray$c=Array.isArray,isMap=t=>toTypeString(t)==="[object Map]",isString=t=>typeof t=="string",isSymbol$6=t=>typeof t=="symbol",isObject$9=t=>t!==null&&typeof t=="object",objectToString$2=Object.prototype.toString,toTypeString=t=>objectToString$2.call(t),toRawType=t=>toTypeString(t).slice(8,-1),isIntegerKey=t=>isString(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,cacheStringFunction=t=>{const e=Object.create(null);return a=>e[a]||(e[a]=t(a))},capitalize$2=cacheStringFunction(t=>t.charAt(0).toUpperCase()+t.slice(1)),hasChanged=(t,e)=>t!==e&&(t===t||e===e),targetMap=new WeakMap,effectStack=[],activeEffect,ITERATE_KEY=Symbol("iterate"),MAP_KEY_ITERATE_KEY=Symbol("Map key iterate");function isEffect(t){return t&&t._isEffect===!0}function effect2(t,e=EMPTY_OBJ){isEffect(t)&&(t=t.raw);const a=createReactiveEffect(t,e);return e.lazy||a(),a}function stop(t){t.active&&(cleanup(t),t.options.onStop&&t.options.onStop(),t.active=!1)}var uid$1=0;function createReactiveEffect(t,e){const a=function(){if(!a.active)return t();if(!effectStack.includes(a)){cleanup(a);try{return enableTracking(),effectStack.push(a),activeEffect=a,t()}finally{effectStack.pop(),resetTracking(),activeEffect=effectStack[effectStack.length-1]}}};return a.id=uid$1++,a.allowRecurse=!!e.allowRecurse,a._isEffect=!0,a.active=!0,a.raw=t,a.deps=[],a.options=e,a}function cleanup(t){const{deps:e}=t;if(e.length){for(let a=0;a<e.length;a++)e[a].delete(t);e.length=0}}var shouldTrack=!0,trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function enableTracking(){trackStack.push(shouldTrack),shouldTrack=!0}function resetTracking(){const t=trackStack.pop();shouldTrack=t===void 0?!0:t}function track(t,e,a){if(!shouldTrack||activeEffect===void 0)return;let n=targetMap.get(t);n||targetMap.set(t,n=new Map);let r=n.get(a);r||n.set(a,r=new Set),r.has(activeEffect)||(r.add(activeEffect),activeEffect.deps.push(r),activeEffect.options.onTrack&&activeEffect.options.onTrack({effect:activeEffect,target:t,type:e,key:a}))}function trigger(t,e,a,n,r,i){const o=targetMap.get(t);if(!o)return;const s=new Set,l=c=>{c&&c.forEach(d=>{(d!==activeEffect||d.allowRecurse)&&s.add(d)})};if(e==="clear")o.forEach(l);else if(a==="length"&&isArray$c(t))o.forEach((c,d)=>{(d==="length"||d>=n)&&l(c)});else switch(a!==void 0&&l(o.get(a)),e){case"add":isArray$c(t)?isIntegerKey(a)&&l(o.get("length")):(l(o.get(ITERATE_KEY)),isMap(t)&&l(o.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$c(t)||(l(o.get(ITERATE_KEY)),isMap(t)&&l(o.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(t)&&l(o.get(ITERATE_KEY));break}const u=c=>{c.options.onTrigger&&c.options.onTrigger({effect:c,target:t,key:a,type:e,newValue:n,oldValue:r,oldTarget:i}),c.options.scheduler?c.options.scheduler(c):c()};s.forEach(u)}var isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).map(t=>Symbol[t]).filter(isSymbol$6)),get2=createGetter(),readonlyGet=createGetter(!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...a){const n=toRaw(this);for(let i=0,o=this.length;i<o;i++)track(n,"get",i+"");const r=n[e](...a);return r===-1||r===!1?n[e](...a.map(toRaw)):r}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...a){pauseTracking();const n=toRaw(this)[e].apply(this,a);return resetTracking(),n}}),t}function createGetter(t=!1,e=!1){return function(n,r,i){if(r==="__v_isReactive")return!t;if(r==="__v_isReadonly")return t;if(r==="__v_raw"&&i===(t?e?shallowReadonlyMap:readonlyMap:e?shallowReactiveMap:reactiveMap).get(n))return n;const o=isArray$c(n);if(!t&&o&&hasOwn(arrayInstrumentations,r))return Reflect.get(arrayInstrumentations,r,i);const s=Reflect.get(n,r,i);return(isSymbol$6(r)?builtInSymbols.has(r):isNonTrackableKeys(r))||(t||track(n,"get",r),e)?s:isRef(s)?!o||!isIntegerKey(r)?s.value:s:isObject$9(s)?t?readonly(s):reactive2(s):s}}var set2=createSetter();function createSetter(t=!1){return function(a,n,r,i){let o=a[n];if(!t&&(r=toRaw(r),o=toRaw(o),!isArray$c(a)&&isRef(o)&&!isRef(r)))return o.value=r,!0;const s=isArray$c(a)&&isIntegerKey(n)?Number(n)<a.length:hasOwn(a,n),l=Reflect.set(a,n,r,i);return a===toRaw(i)&&(s?hasChanged(r,o)&&trigger(a,"set",n,r,o):trigger(a,"add",n,r)),l}}function deleteProperty(t,e){const a=hasOwn(t,e),n=t[e],r=Reflect.deleteProperty(t,e);return r&&a&&trigger(t,"delete",e,void 0,n),r}function has$2(t,e){const a=Reflect.has(t,e);return(!isSymbol$6(e)||!builtInSymbols.has(e))&&track(t,"has",e),a}function ownKeys(t){return track(t,"iterate",isArray$c(t)?"length":ITERATE_KEY),Reflect.ownKeys(t)}var mutableHandlers={get:get2,set:set2,deleteProperty,has:has$2,ownKeys},readonlyHandlers={get:readonlyGet,set(t,e){return console.warn(`Set operation on key "${String(e)}" failed: target is readonly.`,t),!0},deleteProperty(t,e){return console.warn(`Delete operation on key "${String(e)}" failed: target is readonly.`,t),!0}},toReactive=t=>isObject$9(t)?reactive2(t):t,toReadonly=t=>isObject$9(t)?readonly(t):t,toShallow=t=>t,getProto=t=>Reflect.getPrototypeOf(t);function get$1$1(t,e,a=!1,n=!1){t=t.__v_raw;const r=toRaw(t),i=toRaw(e);e!==i&&!a&&track(r,"get",e),!a&&track(r,"get",i);const{has:o}=getProto(r),s=n?toShallow:a?toReadonly:toReactive;if(o.call(r,e))return s(t.get(e));if(o.call(r,i))return s(t.get(i));t!==r&&t.get(e)}function has$1$1(t,e=!1){const a=this.__v_raw,n=toRaw(a),r=toRaw(t);return t!==r&&!e&&track(n,"has",t),!e&&track(n,"has",r),t===r?a.has(t):a.has(t)||a.has(r)}function size(t,e=!1){return t=t.__v_raw,!e&&track(toRaw(t),"iterate",ITERATE_KEY),Reflect.get(t,"size",t)}function add(t){t=toRaw(t);const e=toRaw(this);return getProto(e).has.call(e,t)||(e.add(t),trigger(e,"add",t,t)),this}function set$1$1(t,e){e=toRaw(e);const a=toRaw(this),{has:n,get:r}=getProto(a);let i=n.call(a,t);i?checkIdentityKeys(a,n,t):(t=toRaw(t),i=n.call(a,t));const o=r.call(a,t);return a.set(t,e),i?hasChanged(e,o)&&trigger(a,"set",t,e,o):trigger(a,"add",t,e),this}function deleteEntry(t){const e=toRaw(this),{has:a,get:n}=getProto(e);let r=a.call(e,t);r?checkIdentityKeys(e,a,t):(t=toRaw(t),r=a.call(e,t));const i=n?n.call(e,t):void 0,o=e.delete(t);return r&&trigger(e,"delete",t,void 0,i),o}function clear(){const t=toRaw(this),e=t.size!==0,a=isMap(t)?new Map(t):new Set(t),n=t.clear();return e&&trigger(t,"clear",void 0,void 0,a),n}function createForEach(t,e){return function(n,r){const i=this,o=i.__v_raw,s=toRaw(o),l=e?toShallow:t?toReadonly:toReactive;return!t&&track(s,"iterate",ITERATE_KEY),o.forEach((u,c)=>n.call(r,l(u),l(c),i))}}function createIterableMethod(t,e,a){return function(...n){const r=this.__v_raw,i=toRaw(r),o=isMap(i),s=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,u=r[t](...n),c=a?toShallow:e?toReadonly:toReactive;return!e&&track(i,"iterate",l?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:d,done:h}=u.next();return h?{value:d,done:h}:{value:s?[c(d[0]),c(d[1])]:c(d),done:h}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(t){return function(...e){{const a=e[0]?`on key "${e[0]}" `:"";console.warn(`${capitalize$2(t)} operation ${a}failed: target is readonly.`,toRaw(this))}return t==="delete"?!1:this}}function createInstrumentations(){const t={get(i){return get$1$1(this,i)},get size(){return size(this)},has:has$1$1,add,set:set$1$1,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},e={get(i){return get$1$1(this,i,!1,!0)},get size(){return size(this)},has:has$1$1,add,set:set$1$1,delete:deleteEntry,clear,forEach:createForEach(!1,!0)},a={get(i){return get$1$1(this,i,!0)},get size(){return size(this,!0)},has(i){return has$1$1.call(this,i,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},n={get(i){return get$1$1(this,i,!0,!0)},get size(){return size(this,!0)},has(i){return has$1$1.call(this,i,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{t[i]=createIterableMethod(i,!1,!1),a[i]=createIterableMethod(i,!0,!1),e[i]=createIterableMethod(i,!1,!0),n[i]=createIterableMethod(i,!0,!0)}),[t,a,e,n]}var[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(t,e){const a=e?t?shallowReadonlyInstrumentations:shallowInstrumentations:t?readonlyInstrumentations:mutableInstrumentations;return(n,r,i)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?n:Reflect.get(hasOwn(a,r)&&r in n?a:n,r,i)}var mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)};function checkIdentityKeys(t,e,a){const n=toRaw(a);if(n!==a&&e.call(t,n)){const r=toRawType(t);console.warn(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(t){return t.__v_skip||!Object.isExtensible(t)?0:targetTypeMap(toRawType(t))}function reactive2(t){return t&&t.__v_isReadonly?t:createReactiveObject(t,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function readonly(t){return createReactiveObject(t,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function createReactiveObject(t,e,a,n,r){if(!isObject$9(t))return console.warn(`value cannot be made reactive: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=r.get(t);if(i)return i;const o=getTargetType(t);if(o===0)return t;const s=new Proxy(t,o===2?n:a);return r.set(t,s),s}function toRaw(t){return t&&toRaw(t.__v_raw)||t}function isRef(t){return!!(t&&t.__v_isRef===!0)}magic("nextTick",()=>nextTick);magic("dispatch",t=>dispatch.bind(dispatch,t));magic("watch",(t,{evaluateLater:e,effect:a})=>(n,r)=>{let i=e(n),o=!0,s,l=a(()=>i(u=>{JSON.stringify(u),o?s=u:queueMicrotask(()=>{r(u,s),s=u}),o=!1}));t._x_effects.delete(l)});magic("store",getStores);magic("data",t=>scope(t));magic("root",t=>closestRoot(t));magic("refs",t=>(t._x_refs_proxy||(t._x_refs_proxy=mergeProxies(getArrayOfRefObject(t))),t._x_refs_proxy));function getArrayOfRefObject(t){let e=[],a=t;for(;a;)a._x_refs&&e.push(a._x_refs),a=a.parentNode;return e}var globalIdMemo={};function findAndIncrementId(t){return globalIdMemo[t]||(globalIdMemo[t]=0),++globalIdMemo[t]}function closestIdRoot(t,e){return findClosest(t,a=>{if(a._x_ids&&a._x_ids[e])return!0})}function setIdRoot(t,e){t._x_ids||(t._x_ids={}),t._x_ids[e]||(t._x_ids[e]=findAndIncrementId(e))}magic("id",t=>(e,a=null)=>{let n=closestIdRoot(t,e),r=n?n._x_ids[e]:findAndIncrementId(e);return a?`${e}-${r}-${a}`:`${e}-${r}`});magic("el",t=>t);warnMissingPluginMagic("Focus","focus","focus");warnMissingPluginMagic("Persist","persist","persist");function warnMissingPluginMagic(t,e,a){magic(e,n=>warn(`You can't use [$${directiveName}] without first installing the "${t}" plugin here: https://alpinejs.dev/plugins/${a}`,n))}directive("modelable",(t,{expression:e},{effect:a,evaluateLater:n,cleanup:r})=>{let i=n(e),o=()=>{let c;return i(d=>c=d),c},s=n(`${e} = __placeholder`),l=c=>s(()=>{},{scope:{__placeholder:c}}),u=o();l(u),queueMicrotask(()=>{if(!t._x_model)return;t._x_removeModelListeners.default();let c=t._x_model.get,d=t._x_model.set,h=entangle({get(){return c()},set(m){d(m)}},{get(){return o()},set(m){l(m)}});r(h)})});var teleportContainerDuringClone=document.createElement("div");directive("teleport",(t,{modifiers:e,expression:a},{cleanup:n})=>{t.tagName.toLowerCase()!=="template"&&warn("x-teleport can only be used on a <template> tag",t);let r=skipDuringClone(()=>document.querySelector(a),()=>teleportContainerDuringClone)();r||warn(`Cannot find x-teleport element for selector: "${a}"`);let i=t.content.cloneNode(!0).firstElementChild;t._x_teleport=i,i._x_teleportBack=t,t._x_forwardEvents&&t._x_forwardEvents.forEach(o=>{i.addEventListener(o,s=>{s.stopPropagation(),t.dispatchEvent(new s.constructor(s.type,s))})}),addScopeToNode(i,{},t),mutateDom(()=>{e.includes("prepend")?r.parentNode.insertBefore(i,r):e.includes("append")?r.parentNode.insertBefore(i,r.nextSibling):r.appendChild(i),initTree(i),i._x_ignore=!0}),n(()=>i.remove())});var handler=()=>{};handler.inline=(t,{modifiers:e},{cleanup:a})=>{e.includes("self")?t._x_ignoreSelf=!0:t._x_ignore=!0,a(()=>{e.includes("self")?delete t._x_ignoreSelf:delete t._x_ignore})};directive("ignore",handler);directive("effect",(t,{expression:e},{effect:a})=>a(evaluateLater(t,e)));function on(t,e,a,n){let r=t,i=l=>n(l),o={},s=(l,u)=>c=>u(l,c);if(a.includes("dot")&&(e=dotSyntax(e)),a.includes("camel")&&(e=camelCase2(e)),a.includes("passive")&&(o.passive=!0),a.includes("capture")&&(o.capture=!0),a.includes("window")&&(r=window),a.includes("document")&&(r=document),a.includes("debounce")){let l=a[a.indexOf("debounce")+1]||"invalid-wait",u=isNumeric$1(l.split("ms")[0])?Number(l.split("ms")[0]):250;i=debounce$2(i,u)}if(a.includes("throttle")){let l=a[a.indexOf("throttle")+1]||"invalid-wait",u=isNumeric$1(l.split("ms")[0])?Number(l.split("ms")[0]):250;i=throttle(i,u)}return a.includes("prevent")&&(i=s(i,(l,u)=>{u.preventDefault(),l(u)})),a.includes("stop")&&(i=s(i,(l,u)=>{u.stopPropagation(),l(u)})),a.includes("self")&&(i=s(i,(l,u)=>{u.target===t&&l(u)})),(a.includes("away")||a.includes("outside"))&&(r=document,i=s(i,(l,u)=>{t.contains(u.target)||u.target.isConnected!==!1&&(t.offsetWidth<1&&t.offsetHeight<1||t._x_isShown!==!1&&l(u))})),a.includes("once")&&(i=s(i,(l,u)=>{l(u),r.removeEventListener(e,i,o)})),i=s(i,(l,u)=>{isKeyEvent(e)&&isListeningForASpecificKeyThatHasntBeenPressed(u,a)||l(u)}),r.addEventListener(e,i,o),()=>{r.removeEventListener(e,i,o)}}function dotSyntax(t){return t.replace(/-/g,".")}function camelCase2(t){return t.toLowerCase().replace(/-(\w)/g,(e,a)=>a.toUpperCase())}function isNumeric$1(t){return!Array.isArray(t)&&!isNaN(t)}function kebabCase2(t){return[" ","_"].includes(t)?t:t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function isKeyEvent(t){return["keydown","keyup"].includes(t)}function isListeningForASpecificKeyThatHasntBeenPressed(t,e){let a=e.filter(i=>!["window","document","prevent","stop","once","capture"].includes(i));if(a.includes("debounce")){let i=a.indexOf("debounce");a.splice(i,isNumeric$1((a[i+1]||"invalid-wait").split("ms")[0])?2:1)}if(a.includes("throttle")){let i=a.indexOf("throttle");a.splice(i,isNumeric$1((a[i+1]||"invalid-wait").split("ms")[0])?2:1)}if(a.length===0||a.length===1&&keyToModifiers(t.key).includes(a[0]))return!1;const r=["ctrl","shift","alt","meta","cmd","super"].filter(i=>a.includes(i));return a=a.filter(i=>!r.includes(i)),!(r.length>0&&r.filter(o=>((o==="cmd"||o==="super")&&(o="meta"),t[`${o}Key`])).length===r.length&&keyToModifiers(t.key).includes(a[0]))}function keyToModifiers(t){if(!t)return[];t=kebabCase2(t);let e={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",equal:"=",minus:"-",underscore:"_"};return e[t]=t,Object.keys(e).map(a=>{if(e[a]===t)return a}).filter(a=>a)}directive("model",(t,{modifiers:e,expression:a},{effect:n,cleanup:r})=>{let i=t;e.includes("parent")&&(i=t.parentNode);let o=evaluateLater(i,a),s;typeof a=="string"?s=evaluateLater(i,`${a} = __placeholder`):typeof a=="function"&&typeof a()=="string"?s=evaluateLater(i,`${a()} = __placeholder`):s=()=>{};let l=()=>{let h;return o(m=>h=m),isGetterSetter(h)?h.get():h},u=h=>{let m;o(p=>m=p),isGetterSetter(m)?m.set(h):s(()=>{},{scope:{__placeholder:h}})};typeof a=="string"&&t.type==="radio"&&mutateDom(()=>{t.hasAttribute("name")||t.setAttribute("name",a)});var c=t.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(t.type)||e.includes("lazy")?"change":"input";let d=isCloning?()=>{}:on(t,c,e,h=>{u(getInputValue(t,e,h,l()))});if(e.includes("fill")&&([null,""].includes(l())||t.type==="checkbox"&&Array.isArray(l()))&&t.dispatchEvent(new Event(c,{})),t._x_removeModelListeners||(t._x_removeModelListeners={}),t._x_removeModelListeners.default=d,r(()=>t._x_removeModelListeners.default()),t.form){let h=on(t.form,"reset",[],m=>{nextTick(()=>t._x_model&&t._x_model.set(t.value))});r(()=>h())}t._x_model={get(){return l()},set(h){u(h)}},t._x_forceModelUpdate=h=>{h===void 0&&typeof a=="string"&&a.match(/\./)&&(h=""),window.fromModel=!0,mutateDom(()=>bind(t,"value",h)),delete window.fromModel},n(()=>{let h=l();e.includes("unintrusive")&&document.activeElement.isSameNode(t)||t._x_forceModelUpdate(h)})});function getInputValue(t,e,a,n){return mutateDom(()=>{if(a instanceof CustomEvent&&a.detail!==void 0)return a.detail??a.target.value;if(t.type==="checkbox")if(Array.isArray(n)){let r=e.includes("number")?safeParseNumber(a.target.value):a.target.value;return a.target.checked?n.concat([r]):n.filter(i=>!checkedAttrLooseCompare2(i,r))}else return a.target.checked;else{if(t.tagName.toLowerCase()==="select"&&t.multiple)return e.includes("number")?Array.from(a.target.selectedOptions).map(r=>{let i=r.value||r.text;return safeParseNumber(i)}):Array.from(a.target.selectedOptions).map(r=>r.value||r.text);{let r=a.target.value;return e.includes("number")?safeParseNumber(r):e.includes("trim")?r.trim():r}}})}function safeParseNumber(t){let e=t?parseFloat(t):null;return isNumeric2(e)?e:t}function checkedAttrLooseCompare2(t,e){return t==e}function isNumeric2(t){return!Array.isArray(t)&&!isNaN(t)}function isGetterSetter(t){return t!==null&&typeof t=="object"&&typeof t.get=="function"&&typeof t.set=="function"}directive("cloak",t=>queueMicrotask(()=>mutateDom(()=>t.removeAttribute(prefix("cloak")))));addInitSelector(()=>`[${prefix("init")}]`);directive("init",skipDuringClone((t,{expression:e},{evaluate:a})=>typeof e=="string"?!!e.trim()&&a(e,{},!1):a(e,{},!1)));directive("text",(t,{expression:e},{effect:a,evaluateLater:n})=>{let r=n(e);a(()=>{r(i=>{mutateDom(()=>{t.textContent=i})})})});directive("html",(t,{expression:e},{effect:a,evaluateLater:n})=>{let r=n(e);a(()=>{r(i=>{mutateDom(()=>{t.innerHTML=i,t._x_ignoreSelf=!0,initTree(t),delete t._x_ignoreSelf})})})});mapAttributes(startingWith(":",into(prefix("bind:"))));var handler2=(t,{value:e,modifiers:a,expression:n,original:r},{effect:i})=>{if(!e){let s={};injectBindingProviders(s),evaluateLater(t,n)(u=>{applyBindingsObject(t,u,r)},{scope:s});return}if(e==="key")return storeKeyForXFor(t,n);if(t._x_inlineBindings&&t._x_inlineBindings[e]&&t._x_inlineBindings[e].extract)return;let o=evaluateLater(t,n);i(()=>o(s=>{s===void 0&&typeof n=="string"&&n.match(/\./)&&(s=""),mutateDom(()=>bind(t,e,s,a))}))};handler2.inline=(t,{value:e,modifiers:a,expression:n})=>{e&&(t._x_inlineBindings||(t._x_inlineBindings={}),t._x_inlineBindings[e]={expression:n,extract:!1})};directive("bind",handler2);function storeKeyForXFor(t,e){t._x_keyExpression=e}addRootSelector(()=>`[${prefix("data")}]`);directive("data",(t,{expression:e},{cleanup:a})=>{if(shouldSkipRegisteringDataDuringClone(t))return;e=e===""?"{}":e;let n={};injectMagics(n,t);let r={};injectDataProviders(r,n);let i=evaluate(t,e,{scope:r});(i===void 0||i===!0)&&(i={}),injectMagics(i,t);let o=reactive(i);initInterceptors2(o);let s=addScopeToNode(t,o);o.init&&evaluate(t,o.init),a(()=>{o.destroy&&evaluate(t,o.destroy),s()})});directive("show",(t,{modifiers:e,expression:a},{effect:n})=>{let r=evaluateLater(t,a);t._x_doHide||(t._x_doHide=()=>{mutateDom(()=>{t.style.setProperty("display","none",e.includes("important")?"important":void 0)})}),t._x_doShow||(t._x_doShow=()=>{mutateDom(()=>{t.style.length===1&&t.style.display==="none"?t.removeAttribute("style"):t.style.removeProperty("display")})});let i=()=>{t._x_doHide(),t._x_isShown=!1},o=()=>{t._x_doShow(),t._x_isShown=!0},s=()=>setTimeout(o),l=once(d=>d?o():i(),d=>{typeof t._x_toggleAndCascadeWithTransitions=="function"?t._x_toggleAndCascadeWithTransitions(t,d,o,i):d?s():i()}),u,c=!0;n(()=>r(d=>{!c&&d===u||(e.includes("immediate")&&(d?s():i()),l(d),u=d,c=!1)}))});directive("for",(t,{expression:e},{effect:a,cleanup:n})=>{let r=parseForExpression(e),i=evaluateLater(t,r.items),o=evaluateLater(t,t._x_keyExpression||"index");t._x_prevKeys=[],t._x_lookup={},a(()=>loop(t,r,i,o)),n(()=>{Object.values(t._x_lookup).forEach(s=>s.remove()),delete t._x_prevKeys,delete t._x_lookup})});function loop(t,e,a,n){let r=o=>typeof o=="object"&&!Array.isArray(o),i=t;a(o=>{isNumeric3(o)&&o>=0&&(o=Array.from(Array(o).keys(),y=>y+1)),o===void 0&&(o=[]);let s=t._x_lookup,l=t._x_prevKeys,u=[],c=[];if(r(o))o=Object.entries(o).map(([y,w])=>{let _=getIterationScopeVariables(e,w,y,o);n(D=>c.push(D),{scope:{index:y,..._}}),u.push(_)});else for(let y=0;y<o.length;y++){let w=getIterationScopeVariables(e,o[y],y,o);n(_=>c.push(_),{scope:{index:y,...w}}),u.push(w)}let d=[],h=[],m=[],p=[];for(let y=0;y<l.length;y++){let w=l[y];c.indexOf(w)===-1&&m.push(w)}l=l.filter(y=>!m.includes(y));let v="template";for(let y=0;y<c.length;y++){let w=c[y],_=l.indexOf(w);if(_===-1)l.splice(y,0,w),d.push([v,y]);else if(_!==y){let D=l.splice(y,1)[0],k=l.splice(_-1,1)[0];l.splice(y,0,k),l.splice(_,0,D),h.push([D,k])}else p.push(w);v=w}for(let y=0;y<m.length;y++){let w=m[y];s[w]._x_effects&&s[w]._x_effects.forEach(dequeueJob),s[w].remove(),s[w]=null,delete s[w]}for(let y=0;y<h.length;y++){let[w,_]=h[y],D=s[w],k=s[_],O=document.createElement("div");mutateDom(()=>{k||warn('x-for ":key" is undefined or invalid',i),k.after(O),D.after(k),k._x_currentIfEl&&k.after(k._x_currentIfEl),O.before(D),D._x_currentIfEl&&D.after(D._x_currentIfEl),O.remove()}),k._x_refreshXForScope(u[c.indexOf(_)])}for(let y=0;y<d.length;y++){let[w,_]=d[y],D=w==="template"?i:s[w];D._x_currentIfEl&&(D=D._x_currentIfEl);let k=u[_],O=c[_],N=document.importNode(i.content,!0).firstElementChild,F=reactive(k);addScopeToNode(N,F,i),N._x_refreshXForScope=g=>{Object.entries(g).forEach(([b,$])=>{F[b]=$})},mutateDom(()=>{D.after(N),initTree(N)}),typeof O=="object"&&warn("x-for key cannot be an object, it must be a string or an integer",i),s[O]=N}for(let y=0;y<p.length;y++)s[p[y]]._x_refreshXForScope(u[c.indexOf(p[y])]);i._x_prevKeys=c})}function parseForExpression(t){let e=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,a=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,r=t.match(n);if(!r)return;let i={};i.items=r[2].trim();let o=r[1].replace(a,"").trim(),s=o.match(e);return s?(i.item=o.replace(e,"").trim(),i.index=s[1].trim(),s[2]&&(i.collection=s[2].trim())):i.item=o,i}function getIterationScopeVariables(t,e,a,n){let r={};return/^\[.*\]$/.test(t.item)&&Array.isArray(e)?t.item.replace("[","").replace("]","").split(",").map(o=>o.trim()).forEach((o,s)=>{r[o]=e[s]}):/^\{.*\}$/.test(t.item)&&!Array.isArray(e)&&typeof e=="object"?t.item.replace("{","").replace("}","").split(",").map(o=>o.trim()).forEach(o=>{r[o]=e[o]}):r[t.item]=e,t.index&&(r[t.index]=a),t.collection&&(r[t.collection]=n),r}function isNumeric3(t){return!Array.isArray(t)&&!isNaN(t)}function handler3(){}handler3.inline=(t,{expression:e},{cleanup:a})=>{let n=closestRoot(t);n._x_refs||(n._x_refs={}),n._x_refs[e]=t,a(()=>delete n._x_refs[e])};directive("ref",handler3);directive("if",(t,{expression:e},{effect:a,cleanup:n})=>{let r=evaluateLater(t,e),i=()=>{if(t._x_currentIfEl)return t._x_currentIfEl;let s=t.content.cloneNode(!0).firstElementChild;return addScopeToNode(s,{},t),mutateDom(()=>{t.after(s),initTree(s)}),t._x_currentIfEl=s,t._x_undoIf=()=>{walk(s,l=>{l._x_effects&&l._x_effects.forEach(dequeueJob)}),s.remove(),delete t._x_currentIfEl},s},o=()=>{t._x_undoIf&&(t._x_undoIf(),delete t._x_undoIf)};a(()=>r(s=>{s?i():o()})),n(()=>t._x_undoIf&&t._x_undoIf())});directive("id",(t,{expression:e},{evaluate:a})=>{a(e).forEach(r=>setIdRoot(t,r))});mapAttributes(startingWith("@",into(prefix("on:"))));directive("on",skipDuringClone((t,{value:e,modifiers:a,expression:n},{cleanup:r})=>{let i=n?evaluateLater(t,n):()=>{};t.tagName.toLowerCase()==="template"&&(t._x_forwardEvents||(t._x_forwardEvents=[]),t._x_forwardEvents.includes(e)||t._x_forwardEvents.push(e));let o=on(t,e,a,s=>{i(()=>{},{scope:{$event:s},params:[s]})});r(()=>o())}));warnMissingPluginDirective("Collapse","collapse","collapse");warnMissingPluginDirective("Intersect","intersect","intersect");warnMissingPluginDirective("Focus","trap","focus");warnMissingPluginDirective("Mask","mask","mask");function warnMissingPluginDirective(t,e,a){directive(e,n=>warn(`You can't use [x-${e}] without first installing the "${t}" plugin here: https://alpinejs.dev/plugins/${a}`,n))}alpine_default.setEvaluator(normalEvaluator);alpine_default.setReactivityEngine({reactive:reactive2,effect:effect2,release:stop,raw:toRaw});var src_default=alpine_default,module_default=src_default,top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(t,e){return t.concat([e+"-"+start,e+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(t,e){return t.concat([e,e+"-"+start,e+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(t){return t?(t.nodeName||"").toLowerCase():null}function getWindow(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function isElement$1(t){var e=getWindow(t).Element;return t instanceof e||t instanceof Element}function isHTMLElement(t){var e=getWindow(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function isShadowRoot(t){if(typeof ShadowRoot>"u")return!1;var e=getWindow(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function applyStyles(t){var e=t.state;Object.keys(e.elements).forEach(function(a){var n=e.styles[a]||{},r=e.attributes[a]||{},i=e.elements[a];!isHTMLElement(i)||!getNodeName(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(o){var s=r[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function effect$2(t){var e=t.state,a={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,a.popper),e.styles=a,e.elements.arrow&&Object.assign(e.elements.arrow.style,a.arrow),function(){Object.keys(e.elements).forEach(function(n){var r=e.elements[n],i=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:a[n]),s=o.reduce(function(l,u){return l[u]="",l},{});!isHTMLElement(r)||!getNodeName(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(t){return t.split("-")[0]}var max=Math.max,min=Math.min,round$1=Math.round;function getUAString(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(t,e,a){e===void 0&&(e=!1),a===void 0&&(a=!1);var n=t.getBoundingClientRect(),r=1,i=1;e&&isHTMLElement(t)&&(r=t.offsetWidth>0&&round$1(n.width)/t.offsetWidth||1,i=t.offsetHeight>0&&round$1(n.height)/t.offsetHeight||1);var o=isElement$1(t)?getWindow(t):window,s=o.visualViewport,l=!isLayoutViewport()&&a,u=(n.left+(l&&s?s.offsetLeft:0))/r,c=(n.top+(l&&s?s.offsetTop:0))/i,d=n.width/r,h=n.height/i;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function getLayoutRect(t){var e=getBoundingClientRect(t),a=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-a)<=1&&(a=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:a,height:n}}function contains(t,e){var a=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(a&&isShadowRoot(a)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function getComputedStyle$2(t){return getWindow(t).getComputedStyle(t)}function isTableElement(t){return["table","td","th"].indexOf(getNodeName(t))>=0}function getDocumentElement(t){return((isElement$1(t)?t.ownerDocument:t.document)||window.document).documentElement}function getParentNode(t){return getNodeName(t)==="html"?t:t.assignedSlot||t.parentNode||(isShadowRoot(t)?t.host:null)||getDocumentElement(t)}function getTrueOffsetParent(t){return!isHTMLElement(t)||getComputedStyle$2(t).position==="fixed"?null:t.offsetParent}function getContainingBlock(t){var e=/firefox/i.test(getUAString()),a=/Trident/i.test(getUAString());if(a&&isHTMLElement(t)){var n=getComputedStyle$2(t);if(n.position==="fixed")return null}var r=getParentNode(t);for(isShadowRoot(r)&&(r=r.host);isHTMLElement(r)&&["html","body"].indexOf(getNodeName(r))<0;){var i=getComputedStyle$2(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function getOffsetParent(t){for(var e=getWindow(t),a=getTrueOffsetParent(t);a&&isTableElement(a)&&getComputedStyle$2(a).position==="static";)a=getTrueOffsetParent(a);return a&&(getNodeName(a)==="html"||getNodeName(a)==="body"&&getComputedStyle$2(a).position==="static")?e:a||getContainingBlock(t)||e}function getMainAxisFromPlacement(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function within$1(t,e,a){return max(t,min(e,a))}function withinMaxClamp(t,e,a){var n=within$1(t,e,a);return n>a?a:n}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(t){return Object.assign({},getFreshSideObject(),t)}function expandToHashMap(t,e){return e.reduce(function(a,n){return a[n]=t,a},{})}var toPaddingObject=function t(e,a){return e=typeof e=="function"?e(Object.assign({},a.rects,{placement:a.placement})):e,mergePaddingObject(typeof e!="number"?e:expandToHashMap(e,basePlacements))};function arrow(t){var e,a=t.state,n=t.name,r=t.options,i=a.elements.arrow,o=a.modifiersData.popperOffsets,s=getBasePlacement(a.placement),l=getMainAxisFromPlacement(s),u=[left,right].indexOf(s)>=0,c=u?"height":"width";if(!(!i||!o)){var d=toPaddingObject(r.padding,a),h=getLayoutRect(i),m=l==="y"?top:left,p=l==="y"?bottom:right,v=a.rects.reference[c]+a.rects.reference[l]-o[l]-a.rects.popper[c],y=o[l]-a.rects.reference[l],w=getOffsetParent(i),_=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,D=v/2-y/2,k=d[m],O=_-h[c]-d[p],N=_/2-h[c]/2+D,F=within$1(k,N,O),g=l;a.modifiersData[n]=(e={},e[g]=F,e.centerOffset=F-N,e)}}function effect$1(t){var e=t.state,a=t.options,n=a.element,r=n===void 0?"[data-popper-arrow]":n;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||contains(e.elements.popper,r)&&(e.elements.arrow=r))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(t){return t.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(t,e){var a=t.x,n=t.y,r=e.devicePixelRatio||1;return{x:round$1(a*r)/r||0,y:round$1(n*r)/r||0}}function mapToStyles(t){var e,a=t.popper,n=t.popperRect,r=t.placement,i=t.variation,o=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=o.x,m=h===void 0?0:h,p=o.y,v=p===void 0?0:p,y=typeof c=="function"?c({x:m,y:v}):{x:m,y:v};m=y.x,v=y.y;var w=o.hasOwnProperty("x"),_=o.hasOwnProperty("y"),D=left,k=top,O=window;if(u){var N=getOffsetParent(a),F="clientHeight",g="clientWidth";if(N===getWindow(a)&&(N=getDocumentElement(a),getComputedStyle$2(N).position!=="static"&&s==="absolute"&&(F="scrollHeight",g="scrollWidth")),N=N,r===top||(r===left||r===right)&&i===end){k=bottom;var b=d&&N===O&&O.visualViewport?O.visualViewport.height:N[F];v-=b-n.height,v*=l?1:-1}if(r===left||(r===top||r===bottom)&&i===end){D=right;var $=d&&N===O&&O.visualViewport?O.visualViewport.width:N[g];m-=$-n.width,m*=l?1:-1}}var S=Object.assign({position:s},u&&unsetSides),P=c===!0?roundOffsetsByDPR({x:m,y:v},getWindow(a)):{x:m,y:v};if(m=P.x,v=P.y,l){var M;return Object.assign({},S,(M={},M[k]=_?"0":"",M[D]=w?"0":"",M.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",M))}return Object.assign({},S,(e={},e[k]=_?v+"px":"",e[D]=w?m+"px":"",e.transform="",e))}function computeStyles(t){var e=t.state,a=t.options,n=a.gpuAcceleration,r=n===void 0?!0:n,i=a.adaptive,o=i===void 0?!0:i,s=a.roundOffsets,l=s===void 0?!0:s,u={placement:getBasePlacement(e.placement),variation:getVariation(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,mapToStyles(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,mapToStyles(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(t){var e=t.state,a=t.instance,n=t.options,r=n.scroll,i=r===void 0?!0:r,o=n.resize,s=o===void 0?!0:o,l=getWindow(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",a.update,passive)}),s&&l.addEventListener("resize",a.update,passive),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",a.update,passive)}),s&&l.removeEventListener("resize",a.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function t(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(t){return t.replace(/left|right|bottom|top/g,function(e){return hash$1[e]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(t){return t.replace(/start|end/g,function(e){return hash[e]})}function getWindowScroll(t){var e=getWindow(t),a=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:a,scrollTop:n}}function getWindowScrollBarX(t){return getBoundingClientRect(getDocumentElement(t)).left+getWindowScroll(t).scrollLeft}function getViewportRect(t,e){var a=getWindow(t),n=getDocumentElement(t),r=a.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(r){i=r.width,o=r.height;var u=isLayoutViewport();(u||!u&&e==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:o,x:s+getWindowScrollBarX(t),y:l}}function getDocumentRect(t){var e,a=getDocumentElement(t),n=getWindowScroll(t),r=(e=t.ownerDocument)==null?void 0:e.body,i=max(a.scrollWidth,a.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=max(a.scrollHeight,a.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-n.scrollLeft+getWindowScrollBarX(t),l=-n.scrollTop;return getComputedStyle$2(r||a).direction==="rtl"&&(s+=max(a.clientWidth,r?r.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}function isScrollParent(t){var e=getComputedStyle$2(t),a=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(a+r+n)}function getScrollParent(t){return["html","body","#document"].indexOf(getNodeName(t))>=0?t.ownerDocument.body:isHTMLElement(t)&&isScrollParent(t)?t:getScrollParent(getParentNode(t))}function listScrollParents(t,e){var a;e===void 0&&(e=[]);var n=getScrollParent(t),r=n===((a=t.ownerDocument)==null?void 0:a.body),i=getWindow(n),o=r?[i].concat(i.visualViewport||[],isScrollParent(n)?n:[]):n,s=e.concat(o);return r?s:s.concat(listScrollParents(getParentNode(o)))}function rectToClientRect(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function getInnerBoundingClientRect(t,e){var a=getBoundingClientRect(t,!1,e==="fixed");return a.top=a.top+t.clientTop,a.left=a.left+t.clientLeft,a.bottom=a.top+t.clientHeight,a.right=a.left+t.clientWidth,a.width=t.clientWidth,a.height=t.clientHeight,a.x=a.left,a.y=a.top,a}function getClientRectFromMixedType(t,e,a){return e===viewport?rectToClientRect(getViewportRect(t,a)):isElement$1(e)?getInnerBoundingClientRect(e,a):rectToClientRect(getDocumentRect(getDocumentElement(t)))}function getClippingParents(t){var e=listScrollParents(getParentNode(t)),a=["absolute","fixed"].indexOf(getComputedStyle$2(t).position)>=0,n=a&&isHTMLElement(t)?getOffsetParent(t):t;return isElement$1(n)?e.filter(function(r){return isElement$1(r)&&contains(r,n)&&getNodeName(r)!=="body"}):[]}function getClippingRect(t,e,a,n){var r=e==="clippingParents"?getClippingParents(t):[].concat(e),i=[].concat(r,[a]),o=i[0],s=i.reduce(function(l,u){var c=getClientRectFromMixedType(t,u,n);return l.top=max(c.top,l.top),l.right=min(c.right,l.right),l.bottom=min(c.bottom,l.bottom),l.left=max(c.left,l.left),l},getClientRectFromMixedType(t,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function computeOffsets(t){var e=t.reference,a=t.element,n=t.placement,r=n?getBasePlacement(n):null,i=n?getVariation(n):null,o=e.x+e.width/2-a.width/2,s=e.y+e.height/2-a.height/2,l;switch(r){case top:l={x:o,y:e.y-a.height};break;case bottom:l={x:o,y:e.y+e.height};break;case right:l={x:e.x+e.width,y:s};break;case left:l={x:e.x-a.width,y:s};break;default:l={x:e.x,y:e.y}}var u=r?getMainAxisFromPlacement(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case start:l[u]=l[u]-(e[c]/2-a[c]/2);break;case end:l[u]=l[u]+(e[c]/2-a[c]/2);break}}return l}function detectOverflow(t,e){e===void 0&&(e={});var a=e,n=a.placement,r=n===void 0?t.placement:n,i=a.strategy,o=i===void 0?t.strategy:i,s=a.boundary,l=s===void 0?clippingParents:s,u=a.rootBoundary,c=u===void 0?viewport:u,d=a.elementContext,h=d===void 0?popper:d,m=a.altBoundary,p=m===void 0?!1:m,v=a.padding,y=v===void 0?0:v,w=mergePaddingObject(typeof y!="number"?y:expandToHashMap(y,basePlacements)),_=h===popper?reference:popper,D=t.rects.popper,k=t.elements[p?_:h],O=getClippingRect(isElement$1(k)?k:k.contextElement||getDocumentElement(t.elements.popper),l,c,o),N=getBoundingClientRect(t.elements.reference),F=computeOffsets({reference:N,element:D,strategy:"absolute",placement:r}),g=rectToClientRect(Object.assign({},D,F)),b=h===popper?g:N,$={top:O.top-b.top+w.top,bottom:b.bottom-O.bottom+w.bottom,left:O.left-b.left+w.left,right:b.right-O.right+w.right},S=t.modifiersData.offset;if(h===popper&&S){var P=S[r];Object.keys($).forEach(function(M){var C=[right,bottom].indexOf(M)>=0?1:-1,E=[top,bottom].indexOf(M)>=0?"y":"x";$[M]+=P[E]*C})}return $}function computeAutoPlacement(t,e){e===void 0&&(e={});var a=e,n=a.placement,r=a.boundary,i=a.rootBoundary,o=a.padding,s=a.flipVariations,l=a.allowedAutoPlacements,u=l===void 0?placements:l,c=getVariation(n),d=c?s?variationPlacements:variationPlacements.filter(function(p){return getVariation(p)===c}):basePlacements,h=d.filter(function(p){return u.indexOf(p)>=0});h.length===0&&(h=d);var m=h.reduce(function(p,v){return p[v]=detectOverflow(t,{placement:v,boundary:r,rootBoundary:i,padding:o})[getBasePlacement(v)],p},{});return Object.keys(m).sort(function(p,v){return m[p]-m[v]})}function getExpandedFallbackPlacements(t){if(getBasePlacement(t)===auto)return[];var e=getOppositePlacement(t);return[getOppositeVariationPlacement(t),e,getOppositeVariationPlacement(e)]}function flip(t){var e=t.state,a=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=a.mainAxis,i=r===void 0?!0:r,o=a.altAxis,s=o===void 0?!0:o,l=a.fallbackPlacements,u=a.padding,c=a.boundary,d=a.rootBoundary,h=a.altBoundary,m=a.flipVariations,p=m===void 0?!0:m,v=a.allowedAutoPlacements,y=e.options.placement,w=getBasePlacement(y),_=w===y,D=l||(_||!p?[getOppositePlacement(y)]:getExpandedFallbackPlacements(y)),k=[y].concat(D).reduce(function(B,V){return B.concat(getBasePlacement(V)===auto?computeAutoPlacement(e,{placement:V,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:v}):V)},[]),O=e.rects.reference,N=e.rects.popper,F=new Map,g=!0,b=k[0],$=0;$<k.length;$++){var S=k[$],P=getBasePlacement(S),M=getVariation(S)===start,C=[top,bottom].indexOf(P)>=0,E=C?"width":"height",T=detectOverflow(e,{placement:S,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),x=C?M?right:left:M?bottom:top;O[E]>N[E]&&(x=getOppositePlacement(x));var A=getOppositePlacement(x),L=[];if(i&&L.push(T[P]<=0),s&&L.push(T[x]<=0,T[A]<=0),L.every(function(B){return B})){b=S,g=!1;break}F.set(S,L)}if(g)for(var I=p?3:1,W=function(V){var H=k.find(function(G){var K=F.get(G);if(K)return K.slice(0,V).every(function(Y){return Y})});if(H)return b=H,"break"},z=I;z>0;z--){var U=W(z);if(U==="break")break}e.placement!==b&&(e.modifiersData[n]._skip=!0,e.placement=b,e.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(t,e,a){return a===void 0&&(a={x:0,y:0}),{top:t.top-e.height-a.y,right:t.right-e.width+a.x,bottom:t.bottom-e.height+a.y,left:t.left-e.width-a.x}}function isAnySideFullyClipped(t){return[top,right,bottom,left].some(function(e){return t[e]>=0})}function hide(t){var e=t.state,a=t.name,n=e.rects.reference,r=e.rects.popper,i=e.modifiersData.preventOverflow,o=detectOverflow(e,{elementContext:"reference"}),s=detectOverflow(e,{altBoundary:!0}),l=getSideOffsets(o,n),u=getSideOffsets(s,r,i),c=isAnySideFullyClipped(l),d=isAnySideFullyClipped(u);e.modifiersData[a]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(t,e,a){var n=getBasePlacement(t),r=[left,top].indexOf(n)>=0?-1:1,i=typeof a=="function"?a(Object.assign({},e,{placement:t})):a,o=i[0],s=i[1];return o=o||0,s=(s||0)*r,[left,right].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function offset(t){var e=t.state,a=t.options,n=t.name,r=a.offset,i=r===void 0?[0,0]:r,o=placements.reduce(function(c,d){return c[d]=distanceAndSkiddingToXY(d,e.rects,i),c},{}),s=o[e.placement],l=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=o}const offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(t){var e=t.state,a=t.name;e.modifiersData[a]=computeOffsets({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(t){return t==="x"?"y":"x"}function preventOverflow(t){var e=t.state,a=t.options,n=t.name,r=a.mainAxis,i=r===void 0?!0:r,o=a.altAxis,s=o===void 0?!1:o,l=a.boundary,u=a.rootBoundary,c=a.altBoundary,d=a.padding,h=a.tether,m=h===void 0?!0:h,p=a.tetherOffset,v=p===void 0?0:p,y=detectOverflow(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),w=getBasePlacement(e.placement),_=getVariation(e.placement),D=!_,k=getMainAxisFromPlacement(w),O=getAltAxis(k),N=e.modifiersData.popperOffsets,F=e.rects.reference,g=e.rects.popper,b=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,$=typeof b=="number"?{mainAxis:b,altAxis:b}:Object.assign({mainAxis:0,altAxis:0},b),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(N){if(i){var M,C=k==="y"?top:left,E=k==="y"?bottom:right,T=k==="y"?"height":"width",x=N[k],A=x+y[C],L=x-y[E],I=m?-g[T]/2:0,W=_===start?F[T]:g[T],z=_===start?-g[T]:-F[T],U=e.elements.arrow,B=m&&U?getLayoutRect(U):{width:0,height:0},V=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:getFreshSideObject(),H=V[C],G=V[E],K=within$1(0,F[T],B[T]),Y=D?F[T]/2-I-K-H-$.mainAxis:W-K-H-$.mainAxis,J=D?-F[T]/2+I+K+G+$.mainAxis:z+K+G+$.mainAxis,Q=e.elements.arrow&&getOffsetParent(e.elements.arrow),ee=Q?k==="y"?Q.clientTop||0:Q.clientLeft||0:0,Z=(M=S==null?void 0:S[k])!=null?M:0,X=x+Y-Z-ee,q=x+J-Z,ie=within$1(m?min(A,X):A,x,m?max(L,q):L);N[k]=ie,P[k]=ie-x}if(s){var oe,ge=k==="x"?top:left,pe=k==="x"?bottom:right,te=N[O],ae=O==="y"?"height":"width",se=te+y[ge],le=te-y[pe],re=[top,left].indexOf(w)!==-1,ue=(oe=S==null?void 0:S[O])!=null?oe:0,ce=re?se:te-F[ae]-g[ae]-ue+$.altAxis,fe=re?te+F[ae]+g[ae]-ue-$.altAxis:le,he=m&&re?withinMaxClamp(ce,te,fe):within$1(m?ce:se,te,m?fe:le);N[O]=he,P[O]=he-te}e.modifiersData[n]=P}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function getNodeScroll(t){return t===getWindow(t)||!isHTMLElement(t)?getWindowScroll(t):getHTMLElementScroll(t)}function isElementScaled(t){var e=t.getBoundingClientRect(),a=round$1(e.width)/t.offsetWidth||1,n=round$1(e.height)/t.offsetHeight||1;return a!==1||n!==1}function getCompositeRect(t,e,a){a===void 0&&(a=!1);var n=isHTMLElement(e),r=isHTMLElement(e)&&isElementScaled(e),i=getDocumentElement(e),o=getBoundingClientRect(t,r,a),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!a)&&((getNodeName(e)!=="body"||isScrollParent(i))&&(s=getNodeScroll(e)),isHTMLElement(e)?(l=getBoundingClientRect(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=getWindowScrollBarX(i))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function order(t){var e=new Map,a=new Set,n=[];t.forEach(function(i){e.set(i.name,i)});function r(i){a.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!a.has(s)){var l=e.get(s);l&&r(l)}}),n.push(i)}return t.forEach(function(i){a.has(i.name)||r(i)}),n}function orderModifiers(t){var e=order(t);return modifierPhases.reduce(function(a,n){return a.concat(e.filter(function(r){return r.phase===n}))},[])}function debounce$1(t){var e;return function(){return e||(e=new Promise(function(a){Promise.resolve().then(function(){e=void 0,a(t())})})),e}}function mergeByName(t){var e=t.reduce(function(a,n){var r=a[n.name];return a[n.name]=r?Object.assign({},r,n,{options:Object.assign({},r.options,n.options),data:Object.assign({},r.data,n.data)}):n,a},{});return Object.keys(e).map(function(a){return e[a]})}var DEFAULT_OPTIONS$1={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function popperGenerator(t){t===void 0&&(t={});var e=t,a=e.defaultModifiers,n=a===void 0?[]:a,r=e.defaultOptions,i=r===void 0?DEFAULT_OPTIONS$1:r;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS$1,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],h=!1,m={state:c,setOptions:function(w){var _=typeof w=="function"?w(c.options):w;v(),c.options=Object.assign({},i,c.options,_),c.scrollParents={reference:isElement$1(s)?listScrollParents(s):s.contextElement?listScrollParents(s.contextElement):[],popper:listScrollParents(l)};var D=orderModifiers(mergeByName([].concat(n,c.options.modifiers)));return c.orderedModifiers=D.filter(function(k){return k.enabled}),p(),m.update()},forceUpdate:function(){if(!h){var w=c.elements,_=w.reference,D=w.popper;if(areValidElements(_,D)){c.rects={reference:getCompositeRect(_,getOffsetParent(D),c.options.strategy==="fixed"),popper:getLayoutRect(D)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function($){return c.modifiersData[$.name]=Object.assign({},$.data)});for(var k=0;k<c.orderedModifiers.length;k++){if(c.reset===!0){c.reset=!1,k=-1;continue}var O=c.orderedModifiers[k],N=O.fn,F=O.options,g=F===void 0?{}:F,b=O.name;typeof N=="function"&&(c=N({state:c,options:g,name:b,instance:m})||c)}}}},update:debounce$1(function(){return new Promise(function(y){m.forceUpdate(),y(c)})}),destroy:function(){v(),h=!0}};if(!areValidElements(s,l))return m;m.setOptions(u).then(function(y){!h&&u.onFirstUpdate&&u.onFirstUpdate(y)});function p(){c.orderedModifiers.forEach(function(y){var w=y.name,_=y.options,D=_===void 0?{}:_,k=y.effect;if(typeof k=="function"){var O=k({state:c,name:w,instance:m,options:D}),N=function(){};d.push(O||N)}})}function v(){d.forEach(function(y){return y()}),d=[]}return m}}var createPopper$2=popperGenerator(),defaultModifiers$1=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1],createPopper$1=popperGenerator({defaultModifiers:defaultModifiers$1}),defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers});const Popper=Object.freeze(Object.defineProperty({__proto__:null,afterMain,afterRead,afterWrite,applyStyles:applyStyles$1,arrow:arrow$1,auto,basePlacements,beforeMain,beforeRead,beforeWrite,bottom,clippingParents,computeStyles:computeStyles$1,createPopper,createPopperBase:createPopper$2,createPopperLite:createPopper$1,detectOverflow,end,eventListeners,flip:flip$1,hide:hide$1,left,main,modifierPhases,offset:offset$1,placements,popper,popperGenerator,popperOffsets:popperOffsets$1,preventOverflow:preventOverflow$1,read,reference,right,start,top,variationPlacements,viewport,write},Symbol.toStringTag,{value:"Module"}));/*!
|
||
* Bootstrap v5.3.2 (https://getbootstrap.com/)
|
||
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||
*/const elementMap=new Map,Data={set(t,e,a){elementMap.has(t)||elementMap.set(t,new Map);const n=elementMap.get(t);if(!n.has(e)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(e,a)},get(t,e){return elementMap.has(t)&&elementMap.get(t).get(e)||null},remove(t,e){if(!elementMap.has(t))return;const a=elementMap.get(t);a.delete(e),a.size===0&&elementMap.delete(t)}},MAX_UID=1e6,MILLISECONDS_MULTIPLIER=1e3,TRANSITION_END="transitionend",parseSelector=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(e,a)=>`#${CSS.escape(a)}`)),t),toType=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),getUID=t=>{do t+=Math.floor(Math.random()*MAX_UID);while(document.getElementById(t));return t},getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:a}=window.getComputedStyle(t);const n=Number.parseFloat(e),r=Number.parseFloat(a);return!n&&!r?0:(e=e.split(",")[0],a=a.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(a))*MILLISECONDS_MULTIPLIER)},triggerTransitionEnd=t=>{t.dispatchEvent(new Event(TRANSITION_END))},isElement=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),getElement=t=>isElement(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(parseSelector(t)):null,isVisible=t=>{if(!isElement(t)||t.getClientRects().length===0)return!1;const e=getComputedStyle(t).getPropertyValue("visibility")==="visible",a=t.closest("details:not([open])");if(!a)return e;if(a!==t){const n=t.closest("summary");if(n&&n.parentNode!==a||n===null)return!1}return e},isDisabled=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",findShadowRoot=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?findShadowRoot(t.parentNode):null},noop$3=()=>{},reflow=t=>{t.offsetHeight},getjQuery=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,DOMContentLoadedCallbacks=[],onDOMContentLoaded=t=>{document.readyState==="loading"?(DOMContentLoadedCallbacks.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of DOMContentLoadedCallbacks)e()}),DOMContentLoadedCallbacks.push(t)):t()},isRTL=()=>document.documentElement.dir==="rtl",defineJQueryPlugin=t=>{onDOMContentLoaded(()=>{const e=getjQuery();if(e){const a=t.NAME,n=e.fn[a];e.fn[a]=t.jQueryInterface,e.fn[a].Constructor=t,e.fn[a].noConflict=()=>(e.fn[a]=n,t.jQueryInterface)}})},execute=(t,e=[],a=t)=>typeof t=="function"?t(...e):a,executeAfterTransition=(t,e,a=!0)=>{if(!a){execute(t);return}const n=5,r=getTransitionDurationFromElement(e)+n;let i=!1;const o=({target:s})=>{s===e&&(i=!0,e.removeEventListener(TRANSITION_END,o),execute(t))};e.addEventListener(TRANSITION_END,o),setTimeout(()=>{i||triggerTransitionEnd(e)},r)},getNextActiveElement=(t,e,a,n)=>{const r=t.length;let i=t.indexOf(e);return i===-1?!a&&n?t[r-1]:t[0]:(i+=a?1:-1,n&&(i=(i+r)%r),t[Math.max(0,Math.min(i,r-1))])},namespaceRegex=/[^.]*(?=\..*)\.|.*/,stripNameRegex=/\..*/,stripUidRegex=/::\d+$/,eventRegistry={};let uidEvent=1;const customEvents={mouseenter:"mouseover",mouseleave:"mouseout"},nativeEvents=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function makeEventUid(t,e){return e&&`${e}::${uidEvent++}`||t.uidEvent||uidEvent++}function getElementEvents(t){const e=makeEventUid(t);return t.uidEvent=e,eventRegistry[e]=eventRegistry[e]||{},eventRegistry[e]}function bootstrapHandler(t,e){return function a(n){return hydrateObj(n,{delegateTarget:t}),a.oneOff&&EventHandler.off(t,n.type,e),e.apply(t,[n])}}function bootstrapDelegationHandler(t,e,a){return function n(r){const i=t.querySelectorAll(e);for(let{target:o}=r;o&&o!==this;o=o.parentNode)for(const s of i)if(s===o)return hydrateObj(r,{delegateTarget:o}),n.oneOff&&EventHandler.off(t,r.type,e,a),a.apply(o,[r])}}function findHandler(t,e,a=null){return Object.values(t).find(n=>n.callable===e&&n.delegationSelector===a)}function normalizeParameters(t,e,a){const n=typeof e=="string",r=n?a:e||a;let i=getTypeEvent(t);return nativeEvents.has(i)||(i=t),[n,r,i]}function addHandler(t,e,a,n,r){if(typeof e!="string"||!t)return;let[i,o,s]=normalizeParameters(e,a,n);e in customEvents&&(o=(p=>function(v){if(!v.relatedTarget||v.relatedTarget!==v.delegateTarget&&!v.delegateTarget.contains(v.relatedTarget))return p.call(this,v)})(o));const l=getElementEvents(t),u=l[s]||(l[s]={}),c=findHandler(u,o,i?a:null);if(c){c.oneOff=c.oneOff&&r;return}const d=makeEventUid(o,e.replace(namespaceRegex,"")),h=i?bootstrapDelegationHandler(t,a,o):bootstrapHandler(t,o);h.delegationSelector=i?a:null,h.callable=o,h.oneOff=r,h.uidEvent=d,u[d]=h,t.addEventListener(s,h,i)}function removeHandler(t,e,a,n,r){const i=findHandler(e[a],n,r);i&&(t.removeEventListener(a,i,!!r),delete e[a][i.uidEvent])}function removeNamespacedHandlers(t,e,a,n){const r=e[a]||{};for(const[i,o]of Object.entries(r))i.includes(n)&&removeHandler(t,e,a,o.callable,o.delegationSelector)}function getTypeEvent(t){return t=t.replace(stripNameRegex,""),customEvents[t]||t}const EventHandler={on(t,e,a,n){addHandler(t,e,a,n,!1)},one(t,e,a,n){addHandler(t,e,a,n,!0)},off(t,e,a,n){if(typeof e!="string"||!t)return;const[r,i,o]=normalizeParameters(e,a,n),s=o!==e,l=getElementEvents(t),u=l[o]||{},c=e.startsWith(".");if(typeof i<"u"){if(!Object.keys(u).length)return;removeHandler(t,l,o,i,r?a:null);return}if(c)for(const d of Object.keys(l))removeNamespacedHandlers(t,l,d,e.slice(1));for(const[d,h]of Object.entries(u)){const m=d.replace(stripUidRegex,"");(!s||e.includes(m))&&removeHandler(t,l,o,h.callable,h.delegationSelector)}},trigger(t,e,a){if(typeof e!="string"||!t)return null;const n=getjQuery(),r=getTypeEvent(e),i=e!==r;let o=null,s=!0,l=!0,u=!1;i&&n&&(o=n.Event(e,a),n(t).trigger(o),s=!o.isPropagationStopped(),l=!o.isImmediatePropagationStopped(),u=o.isDefaultPrevented());const c=hydrateObj(new Event(e,{bubbles:s,cancelable:!0}),a);return u&&c.preventDefault(),l&&t.dispatchEvent(c),c.defaultPrevented&&o&&o.preventDefault(),c}};function hydrateObj(t,e={}){for(const[a,n]of Object.entries(e))try{t[a]=n}catch{Object.defineProperty(t,a,{configurable:!0,get(){return n}})}return t}function normalizeData(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function normalizeDataKey(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Manipulator={setDataAttribute(t,e,a){t.setAttribute(`data-bs-${normalizeDataKey(e)}`,a)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${normalizeDataKey(e)}`)},getDataAttributes(t){if(!t)return{};const e={},a=Object.keys(t.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(const n of a){let r=n.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),e[r]=normalizeData(t.dataset[n])}return e},getDataAttribute(t,e){return normalizeData(t.getAttribute(`data-bs-${normalizeDataKey(e)}`))}};let Config$1=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,a){const n=isElement(a)?Manipulator.getDataAttribute(a,"config"):{};return{...this.constructor.Default,...typeof n=="object"?n:{},...isElement(a)?Manipulator.getDataAttributes(a):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,a=this.constructor.DefaultType){for(const[n,r]of Object.entries(a)){const i=e[n],o=isElement(i)?"element":toType(i);if(!new RegExp(r).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${r}".`)}}};const VERSION="5.3.2";class BaseComponent extends Config$1{constructor(e,a){super(),e=getElement(e),e&&(this._element=e,this._config=this._getConfig(a),Data.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Data.remove(this._element,this.constructor.DATA_KEY),EventHandler.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,a,n=!0){executeAfterTransition(e,a,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Data.get(getElement(e),this.DATA_KEY)}static getOrCreateInstance(e,a={}){return this.getInstance(e)||new this(e,typeof a=="object"?a:null)}static get VERSION(){return VERSION}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const getSelector=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let a=t.getAttribute("href");if(!a||!a.includes("#")&&!a.startsWith("."))return null;a.includes("#")&&!a.startsWith("#")&&(a=`#${a.split("#")[1]}`),e=a&&a!=="#"?parseSelector(a.trim()):null}return e},SelectorEngine={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(a=>a.matches(e))},parents(t,e){const a=[];let n=t.parentNode.closest(e);for(;n;)a.push(n),n=n.parentNode.closest(e);return a},prev(t,e){let a=t.previousElementSibling;for(;a;){if(a.matches(e))return[a];a=a.previousElementSibling}return[]},next(t,e){let a=t.nextElementSibling;for(;a;){if(a.matches(e))return[a];a=a.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(a=>`${a}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(a=>!isDisabled(a)&&isVisible(a))},getSelectorFromElement(t){const e=getSelector(t);return e&&SelectorEngine.findOne(e)?e:null},getElementFromSelector(t){const e=getSelector(t);return e?SelectorEngine.findOne(e):null},getMultipleElementsFromSelector(t){const e=getSelector(t);return e?SelectorEngine.find(e):[]}},enableDismissTrigger=(t,e="hide")=>{const a=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;EventHandler.on(document,a,`[data-bs-dismiss="${n}"]`,function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),isDisabled(this))return;const i=SelectorEngine.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(i)[e]()})},NAME$f="alert",DATA_KEY$a="bs.alert",EVENT_KEY$b=`.${DATA_KEY$a}`,EVENT_CLOSE=`close${EVENT_KEY$b}`,EVENT_CLOSED=`closed${EVENT_KEY$b}`,CLASS_NAME_FADE$5="fade",CLASS_NAME_SHOW$8="show";class Alert extends BaseComponent{static get NAME(){return NAME$f}close(){if(EventHandler.trigger(this._element,EVENT_CLOSE).defaultPrevented)return;this._element.classList.remove(CLASS_NAME_SHOW$8);const a=this._element.classList.contains(CLASS_NAME_FADE$5);this._queueCallback(()=>this._destroyElement(),this._element,a)}_destroyElement(){this._element.remove(),EventHandler.trigger(this._element,EVENT_CLOSED),this.dispose()}static jQueryInterface(e){return this.each(function(){const a=Alert.getOrCreateInstance(this);if(typeof e=="string"){if(a[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);a[e](this)}})}}enableDismissTrigger(Alert,"close");defineJQueryPlugin(Alert);const NAME$e="button",DATA_KEY$9="bs.button",EVENT_KEY$a=`.${DATA_KEY$9}`,DATA_API_KEY$6=".data-api",CLASS_NAME_ACTIVE$3="active",SELECTOR_DATA_TOGGLE$5='[data-bs-toggle="button"]',EVENT_CLICK_DATA_API$6=`click${EVENT_KEY$a}${DATA_API_KEY$6}`;class Button extends BaseComponent{static get NAME(){return NAME$e}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(CLASS_NAME_ACTIVE$3))}static jQueryInterface(e){return this.each(function(){const a=Button.getOrCreateInstance(this);e==="toggle"&&a[e]()})}}EventHandler.on(document,EVENT_CLICK_DATA_API$6,SELECTOR_DATA_TOGGLE$5,t=>{t.preventDefault();const e=t.target.closest(SELECTOR_DATA_TOGGLE$5);Button.getOrCreateInstance(e).toggle()});defineJQueryPlugin(Button);const NAME$d="swipe",EVENT_KEY$9=".bs.swipe",EVENT_TOUCHSTART=`touchstart${EVENT_KEY$9}`,EVENT_TOUCHMOVE=`touchmove${EVENT_KEY$9}`,EVENT_TOUCHEND=`touchend${EVENT_KEY$9}`,EVENT_POINTERDOWN=`pointerdown${EVENT_KEY$9}`,EVENT_POINTERUP=`pointerup${EVENT_KEY$9}`,POINTER_TYPE_TOUCH="touch",POINTER_TYPE_PEN="pen",CLASS_NAME_POINTER_EVENT="pointer-event",SWIPE_THRESHOLD=40,Default$c={endCallback:null,leftCallback:null,rightCallback:null},DefaultType$c={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Swipe extends Config$1{constructor(e,a){super(),this._element=e,!(!e||!Swipe.isSupported())&&(this._config=this._getConfig(a),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Default$c}static get DefaultType(){return DefaultType$c}static get NAME(){return NAME$d}dispose(){EventHandler.off(this._element,EVENT_KEY$9)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),execute(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=SWIPE_THRESHOLD)return;const a=e/this._deltaX;this._deltaX=0,a&&execute(a>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(EventHandler.on(this._element,EVENT_POINTERDOWN,e=>this._start(e)),EventHandler.on(this._element,EVENT_POINTERUP,e=>this._end(e)),this._element.classList.add(CLASS_NAME_POINTER_EVENT)):(EventHandler.on(this._element,EVENT_TOUCHSTART,e=>this._start(e)),EventHandler.on(this._element,EVENT_TOUCHMOVE,e=>this._move(e)),EventHandler.on(this._element,EVENT_TOUCHEND,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===POINTER_TYPE_PEN||e.pointerType===POINTER_TYPE_TOUCH)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const NAME$c="carousel",DATA_KEY$8="bs.carousel",EVENT_KEY$8=`.${DATA_KEY$8}`,DATA_API_KEY$5=".data-api",ARROW_LEFT_KEY$1="ArrowLeft",ARROW_RIGHT_KEY$1="ArrowRight",TOUCHEVENT_COMPAT_WAIT=500,ORDER_NEXT="next",ORDER_PREV="prev",DIRECTION_LEFT="left",DIRECTION_RIGHT="right",EVENT_SLIDE=`slide${EVENT_KEY$8}`,EVENT_SLID=`slid${EVENT_KEY$8}`,EVENT_KEYDOWN$1=`keydown${EVENT_KEY$8}`,EVENT_MOUSEENTER$1=`mouseenter${EVENT_KEY$8}`,EVENT_MOUSELEAVE$1=`mouseleave${EVENT_KEY$8}`,EVENT_DRAG_START=`dragstart${EVENT_KEY$8}`,EVENT_LOAD_DATA_API$3=`load${EVENT_KEY$8}${DATA_API_KEY$5}`,EVENT_CLICK_DATA_API$5=`click${EVENT_KEY$8}${DATA_API_KEY$5}`,CLASS_NAME_CAROUSEL="carousel",CLASS_NAME_ACTIVE$2="active",CLASS_NAME_SLIDE="slide",CLASS_NAME_END="carousel-item-end",CLASS_NAME_START="carousel-item-start",CLASS_NAME_NEXT="carousel-item-next",CLASS_NAME_PREV="carousel-item-prev",SELECTOR_ACTIVE=".active",SELECTOR_ITEM=".carousel-item",SELECTOR_ACTIVE_ITEM=SELECTOR_ACTIVE+SELECTOR_ITEM,SELECTOR_ITEM_IMG=".carousel-item img",SELECTOR_INDICATORS=".carousel-indicators",SELECTOR_DATA_SLIDE="[data-bs-slide], [data-bs-slide-to]",SELECTOR_DATA_RIDE='[data-bs-ride="carousel"]',KEY_TO_DIRECTION={[ARROW_LEFT_KEY$1]:DIRECTION_RIGHT,[ARROW_RIGHT_KEY$1]:DIRECTION_LEFT},Default$b={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},DefaultType$b={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Carousel extends BaseComponent{constructor(e,a){super(e,a),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=SelectorEngine.findOne(SELECTOR_INDICATORS,this._element),this._addEventListeners(),this._config.ride===CLASS_NAME_CAROUSEL&&this.cycle()}static get Default(){return Default$b}static get DefaultType(){return DefaultType$b}static get NAME(){return NAME$c}next(){this._slide(ORDER_NEXT)}nextWhenVisible(){!document.hidden&&isVisible(this._element)&&this.next()}prev(){this._slide(ORDER_PREV)}pause(){this._isSliding&&triggerTransitionEnd(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){EventHandler.one(this._element,EVENT_SLID,()=>this.cycle());return}this.cycle()}}to(e){const a=this._getItems();if(e>a.length-1||e<0)return;if(this._isSliding){EventHandler.one(this._element,EVENT_SLID,()=>this.to(e));return}const n=this._getItemIndex(this._getActive());if(n===e)return;const r=e>n?ORDER_NEXT:ORDER_PREV;this._slide(r,a[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&EventHandler.on(this._element,EVENT_KEYDOWN$1,e=>this._keydown(e)),this._config.pause==="hover"&&(EventHandler.on(this._element,EVENT_MOUSEENTER$1,()=>this.pause()),EventHandler.on(this._element,EVENT_MOUSELEAVE$1,()=>this._maybeEnableCycle())),this._config.touch&&Swipe.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const n of SelectorEngine.find(SELECTOR_ITEM_IMG,this._element))EventHandler.on(n,EVENT_DRAG_START,r=>r.preventDefault());const a={leftCallback:()=>this._slide(this._directionToOrder(DIRECTION_LEFT)),rightCallback:()=>this._slide(this._directionToOrder(DIRECTION_RIGHT)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),TOUCHEVENT_COMPAT_WAIT+this._config.interval))}};this._swipeHelper=new Swipe(this._element,a)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const a=KEY_TO_DIRECTION[e.key];a&&(e.preventDefault(),this._slide(this._directionToOrder(a)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const a=SelectorEngine.findOne(SELECTOR_ACTIVE,this._indicatorsElement);a.classList.remove(CLASS_NAME_ACTIVE$2),a.removeAttribute("aria-current");const n=SelectorEngine.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(CLASS_NAME_ACTIVE$2),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const a=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=a||this._config.defaultInterval}_slide(e,a=null){if(this._isSliding)return;const n=this._getActive(),r=e===ORDER_NEXT,i=a||getNextActiveElement(this._getItems(),n,r,this._config.wrap);if(i===n)return;const o=this._getItemIndex(i),s=m=>EventHandler.trigger(this._element,m,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(s(EVENT_SLIDE).defaultPrevented||!n||!i)return;const u=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const c=r?CLASS_NAME_START:CLASS_NAME_END,d=r?CLASS_NAME_NEXT:CLASS_NAME_PREV;i.classList.add(d),reflow(i),n.classList.add(c),i.classList.add(c);const h=()=>{i.classList.remove(c,d),i.classList.add(CLASS_NAME_ACTIVE$2),n.classList.remove(CLASS_NAME_ACTIVE$2,d,c),this._isSliding=!1,s(EVENT_SLID)};this._queueCallback(h,n,this._isAnimated()),u&&this.cycle()}_isAnimated(){return this._element.classList.contains(CLASS_NAME_SLIDE)}_getActive(){return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM,this._element)}_getItems(){return SelectorEngine.find(SELECTOR_ITEM,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return isRTL()?e===DIRECTION_LEFT?ORDER_PREV:ORDER_NEXT:e===DIRECTION_LEFT?ORDER_NEXT:ORDER_PREV}_orderToDirection(e){return isRTL()?e===ORDER_PREV?DIRECTION_LEFT:DIRECTION_RIGHT:e===ORDER_PREV?DIRECTION_RIGHT:DIRECTION_LEFT}static jQueryInterface(e){return this.each(function(){const a=Carousel.getOrCreateInstance(this,e);if(typeof e=="number"){a.to(e);return}if(typeof e=="string"){if(a[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);a[e]()}})}}EventHandler.on(document,EVENT_CLICK_DATA_API$5,SELECTOR_DATA_SLIDE,function(t){const e=SelectorEngine.getElementFromSelector(this);if(!e||!e.classList.contains(CLASS_NAME_CAROUSEL))return;t.preventDefault();const a=Carousel.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");if(n){a.to(n),a._maybeEnableCycle();return}if(Manipulator.getDataAttribute(this,"slide")==="next"){a.next(),a._maybeEnableCycle();return}a.prev(),a._maybeEnableCycle()});EventHandler.on(window,EVENT_LOAD_DATA_API$3,()=>{const t=SelectorEngine.find(SELECTOR_DATA_RIDE);for(const e of t)Carousel.getOrCreateInstance(e)});defineJQueryPlugin(Carousel);const NAME$b="collapse",DATA_KEY$7="bs.collapse",EVENT_KEY$7=`.${DATA_KEY$7}`,DATA_API_KEY$4=".data-api",EVENT_SHOW$6=`show${EVENT_KEY$7}`,EVENT_SHOWN$6=`shown${EVENT_KEY$7}`,EVENT_HIDE$6=`hide${EVENT_KEY$7}`,EVENT_HIDDEN$6=`hidden${EVENT_KEY$7}`,EVENT_CLICK_DATA_API$4=`click${EVENT_KEY$7}${DATA_API_KEY$4}`,CLASS_NAME_SHOW$7="show",CLASS_NAME_COLLAPSE="collapse",CLASS_NAME_COLLAPSING="collapsing",CLASS_NAME_COLLAPSED="collapsed",CLASS_NAME_DEEPER_CHILDREN=`:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`,CLASS_NAME_HORIZONTAL="collapse-horizontal",WIDTH="width",HEIGHT="height",SELECTOR_ACTIVES=".collapse.show, .collapse.collapsing",SELECTOR_DATA_TOGGLE$4='[data-bs-toggle="collapse"]',Default$a={parent:null,toggle:!0},DefaultType$a={parent:"(null|element)",toggle:"boolean"};class Collapse extends BaseComponent{constructor(e,a){super(e,a),this._isTransitioning=!1,this._triggerArray=[];const n=SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);for(const r of n){const i=SelectorEngine.getSelectorFromElement(r),o=SelectorEngine.find(i).filter(s=>s===this._element);i!==null&&o.length&&this._triggerArray.push(r)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Default$a}static get DefaultType(){return DefaultType$a}static get NAME(){return NAME$b}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(s=>s!==this._element).map(s=>Collapse.getOrCreateInstance(s,{toggle:!1}))),e.length&&e[0]._isTransitioning||EventHandler.trigger(this._element,EVENT_SHOW$6).defaultPrevented)return;for(const s of e)s.hide();const n=this._getDimension();this._element.classList.remove(CLASS_NAME_COLLAPSE),this._element.classList.add(CLASS_NAME_COLLAPSING),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(CLASS_NAME_COLLAPSING),this._element.classList.add(CLASS_NAME_COLLAPSE,CLASS_NAME_SHOW$7),this._element.style[n]="",EventHandler.trigger(this._element,EVENT_SHOWN$6)},o=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(r,this._element,!0),this._element.style[n]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||EventHandler.trigger(this._element,EVENT_HIDE$6).defaultPrevented)return;const a=this._getDimension();this._element.style[a]=`${this._element.getBoundingClientRect()[a]}px`,reflow(this._element),this._element.classList.add(CLASS_NAME_COLLAPSING),this._element.classList.remove(CLASS_NAME_COLLAPSE,CLASS_NAME_SHOW$7);for(const r of this._triggerArray){const i=SelectorEngine.getElementFromSelector(r);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([r],!1)}this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(CLASS_NAME_COLLAPSING),this._element.classList.add(CLASS_NAME_COLLAPSE),EventHandler.trigger(this._element,EVENT_HIDDEN$6)};this._element.style[a]="",this._queueCallback(n,this._element,!0)}_isShown(e=this._element){return e.classList.contains(CLASS_NAME_SHOW$7)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=getElement(e.parent),e}_getDimension(){return this._element.classList.contains(CLASS_NAME_HORIZONTAL)?WIDTH:HEIGHT}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);for(const a of e){const n=SelectorEngine.getElementFromSelector(a);n&&this._addAriaAndCollapsedClass([a],this._isShown(n))}}_getFirstLevelChildren(e){const a=SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN,this._config.parent);return SelectorEngine.find(e,this._config.parent).filter(n=>!a.includes(n))}_addAriaAndCollapsedClass(e,a){if(e.length)for(const n of e)n.classList.toggle(CLASS_NAME_COLLAPSED,!a),n.setAttribute("aria-expanded",a)}static jQueryInterface(e){const a={};return typeof e=="string"&&/show|hide/.test(e)&&(a.toggle=!1),this.each(function(){const n=Collapse.getOrCreateInstance(this,a);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}}EventHandler.on(document,EVENT_CLICK_DATA_API$4,SELECTOR_DATA_TOGGLE$4,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();for(const e of SelectorEngine.getMultipleElementsFromSelector(this))Collapse.getOrCreateInstance(e,{toggle:!1}).toggle()});defineJQueryPlugin(Collapse);const NAME$a="dropdown",DATA_KEY$6="bs.dropdown",EVENT_KEY$6=`.${DATA_KEY$6}`,DATA_API_KEY$3=".data-api",ESCAPE_KEY$2="Escape",TAB_KEY$1="Tab",ARROW_UP_KEY$1="ArrowUp",ARROW_DOWN_KEY$1="ArrowDown",RIGHT_MOUSE_BUTTON=2,EVENT_HIDE$5=`hide${EVENT_KEY$6}`,EVENT_HIDDEN$5=`hidden${EVENT_KEY$6}`,EVENT_SHOW$5=`show${EVENT_KEY$6}`,EVENT_SHOWN$5=`shown${EVENT_KEY$6}`,EVENT_CLICK_DATA_API$3=`click${EVENT_KEY$6}${DATA_API_KEY$3}`,EVENT_KEYDOWN_DATA_API=`keydown${EVENT_KEY$6}${DATA_API_KEY$3}`,EVENT_KEYUP_DATA_API=`keyup${EVENT_KEY$6}${DATA_API_KEY$3}`,CLASS_NAME_SHOW$6="show",CLASS_NAME_DROPUP="dropup",CLASS_NAME_DROPEND="dropend",CLASS_NAME_DROPSTART="dropstart",CLASS_NAME_DROPUP_CENTER="dropup-center",CLASS_NAME_DROPDOWN_CENTER="dropdown-center",SELECTOR_DATA_TOGGLE$3='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',SELECTOR_DATA_TOGGLE_SHOWN=`${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`,SELECTOR_MENU=".dropdown-menu",SELECTOR_NAVBAR=".navbar",SELECTOR_NAVBAR_NAV=".navbar-nav",SELECTOR_VISIBLE_ITEMS=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",PLACEMENT_TOP=isRTL()?"top-end":"top-start",PLACEMENT_TOPEND=isRTL()?"top-start":"top-end",PLACEMENT_BOTTOM=isRTL()?"bottom-end":"bottom-start",PLACEMENT_BOTTOMEND=isRTL()?"bottom-start":"bottom-end",PLACEMENT_RIGHT=isRTL()?"left-start":"right-start",PLACEMENT_LEFT=isRTL()?"right-start":"left-start",PLACEMENT_TOPCENTER="top",PLACEMENT_BOTTOMCENTER="bottom",Default$9={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},DefaultType$9={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Dropdown extends BaseComponent{constructor(e,a){super(e,a),this._popper=null,this._parent=this._element.parentNode,this._menu=SelectorEngine.next(this._element,SELECTOR_MENU)[0]||SelectorEngine.prev(this._element,SELECTOR_MENU)[0]||SelectorEngine.findOne(SELECTOR_MENU,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Default$9}static get DefaultType(){return DefaultType$9}static get NAME(){return NAME$a}toggle(){return this._isShown()?this.hide():this.show()}show(){if(isDisabled(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!EventHandler.trigger(this._element,EVENT_SHOW$5,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(SELECTOR_NAVBAR_NAV))for(const n of[].concat(...document.body.children))EventHandler.on(n,"mouseover",noop$3);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(CLASS_NAME_SHOW$6),this._element.classList.add(CLASS_NAME_SHOW$6),EventHandler.trigger(this._element,EVENT_SHOWN$5,e)}}hide(){if(isDisabled(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!EventHandler.trigger(this._element,EVENT_HIDE$5,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const n of[].concat(...document.body.children))EventHandler.off(n,"mouseover",noop$3);this._popper&&this._popper.destroy(),this._menu.classList.remove(CLASS_NAME_SHOW$6),this._element.classList.remove(CLASS_NAME_SHOW$6),this._element.setAttribute("aria-expanded","false"),Manipulator.removeDataAttribute(this._menu,"popper"),EventHandler.trigger(this._element,EVENT_HIDDEN$5,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!isElement(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${NAME$a.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof Popper>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:isElement(this._config.reference)?e=getElement(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const a=this._getPopperConfig();this._popper=createPopper(e,this._menu,a)}_isShown(){return this._menu.classList.contains(CLASS_NAME_SHOW$6)}_getPlacement(){const e=this._parent;if(e.classList.contains(CLASS_NAME_DROPEND))return PLACEMENT_RIGHT;if(e.classList.contains(CLASS_NAME_DROPSTART))return PLACEMENT_LEFT;if(e.classList.contains(CLASS_NAME_DROPUP_CENTER))return PLACEMENT_TOPCENTER;if(e.classList.contains(CLASS_NAME_DROPDOWN_CENTER))return PLACEMENT_BOTTOMCENTER;const a=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(CLASS_NAME_DROPUP)?a?PLACEMENT_TOPEND:PLACEMENT_TOP:a?PLACEMENT_BOTTOMEND:PLACEMENT_BOTTOM}_detectNavbar(){return this._element.closest(SELECTOR_NAVBAR)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(a=>Number.parseInt(a,10)):typeof e=="function"?a=>e(a,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Manipulator.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...execute(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:a}){const n=SelectorEngine.find(SELECTOR_VISIBLE_ITEMS,this._menu).filter(r=>isVisible(r));n.length&&getNextActiveElement(n,a,e===ARROW_DOWN_KEY$1,!n.includes(a)).focus()}static jQueryInterface(e){return this.each(function(){const a=Dropdown.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof a[e]>"u")throw new TypeError(`No method named "${e}"`);a[e]()}})}static clearMenus(e){if(e.button===RIGHT_MOUSE_BUTTON||e.type==="keyup"&&e.key!==TAB_KEY$1)return;const a=SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);for(const n of a){const r=Dropdown.getInstance(n);if(!r||r._config.autoClose===!1)continue;const i=e.composedPath(),o=i.includes(r._menu);if(i.includes(r._element)||r._config.autoClose==="inside"&&!o||r._config.autoClose==="outside"&&o||r._menu.contains(e.target)&&(e.type==="keyup"&&e.key===TAB_KEY$1||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const s={relatedTarget:r._element};e.type==="click"&&(s.clickEvent=e),r._completeHide(s)}}static dataApiKeydownHandler(e){const a=/input|textarea/i.test(e.target.tagName),n=e.key===ESCAPE_KEY$2,r=[ARROW_UP_KEY$1,ARROW_DOWN_KEY$1].includes(e.key);if(!r&&!n||a&&!n)return;e.preventDefault();const i=this.matches(SELECTOR_DATA_TOGGLE$3)?this:SelectorEngine.prev(this,SELECTOR_DATA_TOGGLE$3)[0]||SelectorEngine.next(this,SELECTOR_DATA_TOGGLE$3)[0]||SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3,e.delegateTarget.parentNode),o=Dropdown.getOrCreateInstance(i);if(r){e.stopPropagation(),o.show(),o._selectMenuItem(e);return}o._isShown()&&(e.stopPropagation(),o.hide(),i.focus())}}EventHandler.on(document,EVENT_KEYDOWN_DATA_API,SELECTOR_DATA_TOGGLE$3,Dropdown.dataApiKeydownHandler);EventHandler.on(document,EVENT_KEYDOWN_DATA_API,SELECTOR_MENU,Dropdown.dataApiKeydownHandler);EventHandler.on(document,EVENT_CLICK_DATA_API$3,Dropdown.clearMenus);EventHandler.on(document,EVENT_KEYUP_DATA_API,Dropdown.clearMenus);EventHandler.on(document,EVENT_CLICK_DATA_API$3,SELECTOR_DATA_TOGGLE$3,function(t){t.preventDefault(),Dropdown.getOrCreateInstance(this).toggle()});defineJQueryPlugin(Dropdown);const NAME$9="backdrop",CLASS_NAME_FADE$4="fade",CLASS_NAME_SHOW$5="show",EVENT_MOUSEDOWN=`mousedown.bs.${NAME$9}`,Default$8={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},DefaultType$8={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Backdrop extends Config$1{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Default$8}static get DefaultType(){return DefaultType$8}static get NAME(){return NAME$9}show(e){if(!this._config.isVisible){execute(e);return}this._append();const a=this._getElement();this._config.isAnimated&&reflow(a),a.classList.add(CLASS_NAME_SHOW$5),this._emulateAnimation(()=>{execute(e)})}hide(e){if(!this._config.isVisible){execute(e);return}this._getElement().classList.remove(CLASS_NAME_SHOW$5),this._emulateAnimation(()=>{this.dispose(),execute(e)})}dispose(){this._isAppended&&(EventHandler.off(this._element,EVENT_MOUSEDOWN),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(CLASS_NAME_FADE$4),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=getElement(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),EventHandler.on(e,EVENT_MOUSEDOWN,()=>{execute(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){executeAfterTransition(e,this._getElement(),this._config.isAnimated)}}const NAME$8="focustrap",DATA_KEY$5="bs.focustrap",EVENT_KEY$5=`.${DATA_KEY$5}`,EVENT_FOCUSIN$2=`focusin${EVENT_KEY$5}`,EVENT_KEYDOWN_TAB=`keydown.tab${EVENT_KEY$5}`,TAB_KEY="Tab",TAB_NAV_FORWARD="forward",TAB_NAV_BACKWARD="backward",Default$7={autofocus:!0,trapElement:null},DefaultType$7={autofocus:"boolean",trapElement:"element"};class FocusTrap extends Config$1{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Default$7}static get DefaultType(){return DefaultType$7}static get NAME(){return NAME$8}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),EventHandler.off(document,EVENT_KEY$5),EventHandler.on(document,EVENT_FOCUSIN$2,e=>this._handleFocusin(e)),EventHandler.on(document,EVENT_KEYDOWN_TAB,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,EventHandler.off(document,EVENT_KEY$5))}_handleFocusin(e){const{trapElement:a}=this._config;if(e.target===document||e.target===a||a.contains(e.target))return;const n=SelectorEngine.focusableChildren(a);n.length===0?a.focus():this._lastTabNavDirection===TAB_NAV_BACKWARD?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){e.key===TAB_KEY&&(this._lastTabNavDirection=e.shiftKey?TAB_NAV_BACKWARD:TAB_NAV_FORWARD)}}const SELECTOR_FIXED_CONTENT=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",SELECTOR_STICKY_CONTENT=".sticky-top",PROPERTY_PADDING="padding-right",PROPERTY_MARGIN="margin-right";class ScrollBarHelper{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,PROPERTY_PADDING,a=>a+e),this._setElementAttributes(SELECTOR_FIXED_CONTENT,PROPERTY_PADDING,a=>a+e),this._setElementAttributes(SELECTOR_STICKY_CONTENT,PROPERTY_MARGIN,a=>a-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,PROPERTY_PADDING),this._resetElementAttributes(SELECTOR_FIXED_CONTENT,PROPERTY_PADDING),this._resetElementAttributes(SELECTOR_STICKY_CONTENT,PROPERTY_MARGIN)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,a,n){const r=this.getWidth(),i=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+r)return;this._saveInitialAttribute(o,a);const s=window.getComputedStyle(o).getPropertyValue(a);o.style.setProperty(a,`${n(Number.parseFloat(s))}px`)};this._applyManipulationCallback(e,i)}_saveInitialAttribute(e,a){const n=e.style.getPropertyValue(a);n&&Manipulator.setDataAttribute(e,a,n)}_resetElementAttributes(e,a){const n=r=>{const i=Manipulator.getDataAttribute(r,a);if(i===null){r.style.removeProperty(a);return}Manipulator.removeDataAttribute(r,a),r.style.setProperty(a,i)};this._applyManipulationCallback(e,n)}_applyManipulationCallback(e,a){if(isElement(e)){a(e);return}for(const n of SelectorEngine.find(e,this._element))a(n)}}const NAME$7="modal",DATA_KEY$4="bs.modal",EVENT_KEY$4=`.${DATA_KEY$4}`,DATA_API_KEY$2=".data-api",ESCAPE_KEY$1="Escape",EVENT_HIDE$4=`hide${EVENT_KEY$4}`,EVENT_HIDE_PREVENTED$1=`hidePrevented${EVENT_KEY$4}`,EVENT_HIDDEN$4=`hidden${EVENT_KEY$4}`,EVENT_SHOW$4=`show${EVENT_KEY$4}`,EVENT_SHOWN$4=`shown${EVENT_KEY$4}`,EVENT_RESIZE$1=`resize${EVENT_KEY$4}`,EVENT_CLICK_DISMISS=`click.dismiss${EVENT_KEY$4}`,EVENT_MOUSEDOWN_DISMISS=`mousedown.dismiss${EVENT_KEY$4}`,EVENT_KEYDOWN_DISMISS$1=`keydown.dismiss${EVENT_KEY$4}`,EVENT_CLICK_DATA_API$2=`click${EVENT_KEY$4}${DATA_API_KEY$2}`,CLASS_NAME_OPEN="modal-open",CLASS_NAME_FADE$3="fade",CLASS_NAME_SHOW$4="show",CLASS_NAME_STATIC="modal-static",OPEN_SELECTOR$1=".modal.show",SELECTOR_DIALOG=".modal-dialog",SELECTOR_MODAL_BODY=".modal-body",SELECTOR_DATA_TOGGLE$2='[data-bs-toggle="modal"]',Default$6={backdrop:!0,focus:!0,keyboard:!0},DefaultType$6={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Modal extends BaseComponent{constructor(e,a){super(e,a),this._dialog=SelectorEngine.findOne(SELECTOR_DIALOG,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new ScrollBarHelper,this._addEventListeners()}static get Default(){return Default$6}static get DefaultType(){return DefaultType$6}static get NAME(){return NAME$7}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||EventHandler.trigger(this._element,EVENT_SHOW$4,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(CLASS_NAME_OPEN),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||EventHandler.trigger(this._element,EVENT_HIDE$4).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(CLASS_NAME_SHOW$4),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){EventHandler.off(window,EVENT_KEY$4),EventHandler.off(this._dialog,EVENT_KEY$4),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Backdrop({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new FocusTrap({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const a=SelectorEngine.findOne(SELECTOR_MODAL_BODY,this._dialog);a&&(a.scrollTop=0),reflow(this._element),this._element.classList.add(CLASS_NAME_SHOW$4);const n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,EventHandler.trigger(this._element,EVENT_SHOWN$4,{relatedTarget:e})};this._queueCallback(n,this._dialog,this._isAnimated())}_addEventListeners(){EventHandler.on(this._element,EVENT_KEYDOWN_DISMISS$1,e=>{if(e.key===ESCAPE_KEY$1){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),EventHandler.on(window,EVENT_RESIZE$1,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),EventHandler.on(this._element,EVENT_MOUSEDOWN_DISMISS,e=>{EventHandler.one(this._element,EVENT_CLICK_DISMISS,a=>{if(!(this._element!==e.target||this._element!==a.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(CLASS_NAME_OPEN),this._resetAdjustments(),this._scrollBar.reset(),EventHandler.trigger(this._element,EVENT_HIDDEN$4)})}_isAnimated(){return this._element.classList.contains(CLASS_NAME_FADE$3)}_triggerBackdropTransition(){if(EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED$1).defaultPrevented)return;const a=this._element.scrollHeight>document.documentElement.clientHeight,n=this._element.style.overflowY;n==="hidden"||this._element.classList.contains(CLASS_NAME_STATIC)||(a||(this._element.style.overflowY="hidden"),this._element.classList.add(CLASS_NAME_STATIC),this._queueCallback(()=>{this._element.classList.remove(CLASS_NAME_STATIC),this._queueCallback(()=>{this._element.style.overflowY=n},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,a=this._scrollBar.getWidth(),n=a>0;if(n&&!e){const r=isRTL()?"paddingLeft":"paddingRight";this._element.style[r]=`${a}px`}if(!n&&e){const r=isRTL()?"paddingRight":"paddingLeft";this._element.style[r]=`${a}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,a){return this.each(function(){const n=Modal.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e](a)}})}}EventHandler.on(document,EVENT_CLICK_DATA_API$2,SELECTOR_DATA_TOGGLE$2,function(t){const e=SelectorEngine.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),EventHandler.one(e,EVENT_SHOW$4,r=>{r.defaultPrevented||EventHandler.one(e,EVENT_HIDDEN$4,()=>{isVisible(this)&&this.focus()})});const a=SelectorEngine.findOne(OPEN_SELECTOR$1);a&&Modal.getInstance(a).hide(),Modal.getOrCreateInstance(e).toggle(this)});enableDismissTrigger(Modal);defineJQueryPlugin(Modal);const NAME$6="offcanvas",DATA_KEY$3="bs.offcanvas",EVENT_KEY$3=`.${DATA_KEY$3}`,DATA_API_KEY$1=".data-api",EVENT_LOAD_DATA_API$2=`load${EVENT_KEY$3}${DATA_API_KEY$1}`,ESCAPE_KEY="Escape",CLASS_NAME_SHOW$3="show",CLASS_NAME_SHOWING$1="showing",CLASS_NAME_HIDING="hiding",CLASS_NAME_BACKDROP="offcanvas-backdrop",OPEN_SELECTOR=".offcanvas.show",EVENT_SHOW$3=`show${EVENT_KEY$3}`,EVENT_SHOWN$3=`shown${EVENT_KEY$3}`,EVENT_HIDE$3=`hide${EVENT_KEY$3}`,EVENT_HIDE_PREVENTED=`hidePrevented${EVENT_KEY$3}`,EVENT_HIDDEN$3=`hidden${EVENT_KEY$3}`,EVENT_RESIZE=`resize${EVENT_KEY$3}`,EVENT_CLICK_DATA_API$1=`click${EVENT_KEY$3}${DATA_API_KEY$1}`,EVENT_KEYDOWN_DISMISS=`keydown.dismiss${EVENT_KEY$3}`,SELECTOR_DATA_TOGGLE$1='[data-bs-toggle="offcanvas"]',Default$5={backdrop:!0,keyboard:!0,scroll:!1},DefaultType$5={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Offcanvas extends BaseComponent{constructor(e,a){super(e,a),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Default$5}static get DefaultType(){return DefaultType$5}static get NAME(){return NAME$6}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||EventHandler.trigger(this._element,EVENT_SHOW$3,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new ScrollBarHelper().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(CLASS_NAME_SHOWING$1);const n=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(CLASS_NAME_SHOW$3),this._element.classList.remove(CLASS_NAME_SHOWING$1),EventHandler.trigger(this._element,EVENT_SHOWN$3,{relatedTarget:e})};this._queueCallback(n,this._element,!0)}hide(){if(!this._isShown||EventHandler.trigger(this._element,EVENT_HIDE$3).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(CLASS_NAME_HIDING),this._backdrop.hide();const a=()=>{this._element.classList.remove(CLASS_NAME_SHOW$3,CLASS_NAME_HIDING),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new ScrollBarHelper().reset(),EventHandler.trigger(this._element,EVENT_HIDDEN$3)};this._queueCallback(a,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED);return}this.hide()},a=!!this._config.backdrop;return new Backdrop({className:CLASS_NAME_BACKDROP,isVisible:a,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:a?e:null})}_initializeFocusTrap(){return new FocusTrap({trapElement:this._element})}_addEventListeners(){EventHandler.on(this._element,EVENT_KEYDOWN_DISMISS,e=>{if(e.key===ESCAPE_KEY){if(this._config.keyboard){this.hide();return}EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED)}})}static jQueryInterface(e){return this.each(function(){const a=Offcanvas.getOrCreateInstance(this,e);if(typeof e=="string"){if(a[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);a[e](this)}})}}EventHandler.on(document,EVENT_CLICK_DATA_API$1,SELECTOR_DATA_TOGGLE$1,function(t){const e=SelectorEngine.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),isDisabled(this))return;EventHandler.one(e,EVENT_HIDDEN$3,()=>{isVisible(this)&&this.focus()});const a=SelectorEngine.findOne(OPEN_SELECTOR);a&&a!==e&&Offcanvas.getInstance(a).hide(),Offcanvas.getOrCreateInstance(e).toggle(this)});EventHandler.on(window,EVENT_LOAD_DATA_API$2,()=>{for(const t of SelectorEngine.find(OPEN_SELECTOR))Offcanvas.getOrCreateInstance(t).show()});EventHandler.on(window,EVENT_RESIZE,()=>{for(const t of SelectorEngine.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&Offcanvas.getOrCreateInstance(t).hide()});enableDismissTrigger(Offcanvas);defineJQueryPlugin(Offcanvas);const ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i,DefaultAllowlist={"*":["class","dir","id","lang","role",ARIA_ATTRIBUTE_PATTERN],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},uriAttributes=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),SAFE_URL_PATTERN=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,allowedAttribute=(t,e)=>{const a=t.nodeName.toLowerCase();return e.includes(a)?uriAttributes.has(a)?!!SAFE_URL_PATTERN.test(t.nodeValue):!0:e.filter(n=>n instanceof RegExp).some(n=>n.test(a))};function sanitizeHtml(t,e,a){if(!t.length)return t;if(a&&typeof a=="function")return a(t);const r=new window.DOMParser().parseFromString(t,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(const o of i){const s=o.nodeName.toLowerCase();if(!Object.keys(e).includes(s)){o.remove();continue}const l=[].concat(...o.attributes),u=[].concat(e["*"]||[],e[s]||[]);for(const c of l)allowedAttribute(c,u)||o.removeAttribute(c.nodeName)}return r.body.innerHTML}const NAME$5="TemplateFactory",Default$4={allowList:DefaultAllowlist,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},DefaultType$4={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},DefaultContentType={entry:"(string|element|function|null)",selector:"(string|element)"};class TemplateFactory extends Config$1{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Default$4}static get DefaultType(){return DefaultType$4}static get NAME(){return NAME$5}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[r,i]of Object.entries(this._config.content))this._setContent(e,i,r);const a=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&a.classList.add(...n.split(" ")),a}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[a,n]of Object.entries(e))super._typeCheckConfig({selector:a,entry:n},DefaultContentType)}_setContent(e,a,n){const r=SelectorEngine.findOne(n,e);if(r){if(a=this._resolvePossibleFunction(a),!a){r.remove();return}if(isElement(a)){this._putElementInTemplate(getElement(a),r);return}if(this._config.html){r.innerHTML=this._maybeSanitize(a);return}r.textContent=a}}_maybeSanitize(e){return this._config.sanitize?sanitizeHtml(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return execute(e,[this])}_putElementInTemplate(e,a){if(this._config.html){a.innerHTML="",a.append(e);return}a.textContent=e.textContent}}const NAME$4="tooltip",DISALLOWED_ATTRIBUTES=new Set(["sanitize","allowList","sanitizeFn"]),CLASS_NAME_FADE$2="fade",CLASS_NAME_MODAL="modal",CLASS_NAME_SHOW$2="show",SELECTOR_TOOLTIP_INNER=".tooltip-inner",SELECTOR_MODAL=`.${CLASS_NAME_MODAL}`,EVENT_MODAL_HIDE="hide.bs.modal",TRIGGER_HOVER="hover",TRIGGER_FOCUS="focus",TRIGGER_CLICK="click",TRIGGER_MANUAL="manual",EVENT_HIDE$2="hide",EVENT_HIDDEN$2="hidden",EVENT_SHOW$2="show",EVENT_SHOWN$2="shown",EVENT_INSERTED="inserted",EVENT_CLICK$1="click",EVENT_FOCUSIN$1="focusin",EVENT_FOCUSOUT$1="focusout",EVENT_MOUSEENTER="mouseenter",EVENT_MOUSELEAVE="mouseleave",AttachmentMap={AUTO:"auto",TOP:"top",RIGHT:isRTL()?"left":"right",BOTTOM:"bottom",LEFT:isRTL()?"right":"left"},Default$3={allowList:DefaultAllowlist,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},DefaultType$3={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};let Tooltip$1=class me extends BaseComponent{constructor(e,a){if(typeof Popper>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,a),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Default$3}static get DefaultType(){return DefaultType$3}static get NAME(){return NAME$4}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),EventHandler.off(this._element.closest(SELECTOR_MODAL),EVENT_MODAL_HIDE,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=EventHandler.trigger(this._element,this.constructor.eventName(EVENT_SHOW$2)),n=(findShadowRoot(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!n)return;this._disposePopper();const r=this._getTipElement();this._element.setAttribute("aria-describedby",r.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(r),EventHandler.trigger(this._element,this.constructor.eventName(EVENT_INSERTED))),this._popper=this._createPopper(r),r.classList.add(CLASS_NAME_SHOW$2),"ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))EventHandler.on(s,"mouseover",noop$3);const o=()=>{EventHandler.trigger(this._element,this.constructor.eventName(EVENT_SHOWN$2)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown()||EventHandler.trigger(this._element,this.constructor.eventName(EVENT_HIDE$2)).defaultPrevented)return;if(this._getTipElement().classList.remove(CLASS_NAME_SHOW$2),"ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))EventHandler.off(r,"mouseover",noop$3);this._activeTrigger[TRIGGER_CLICK]=!1,this._activeTrigger[TRIGGER_FOCUS]=!1,this._activeTrigger[TRIGGER_HOVER]=!1,this._isHovered=null;const n=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),EventHandler.trigger(this._element,this.constructor.eventName(EVENT_HIDDEN$2)))};this._queueCallback(n,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const a=this._getTemplateFactory(e).toHtml();if(!a)return null;a.classList.remove(CLASS_NAME_FADE$2,CLASS_NAME_SHOW$2),a.classList.add(`bs-${this.constructor.NAME}-auto`);const n=getUID(this.constructor.NAME).toString();return a.setAttribute("id",n),this._isAnimated()&&a.classList.add(CLASS_NAME_FADE$2),a}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new TemplateFactory({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[SELECTOR_TOOLTIP_INNER]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(CLASS_NAME_FADE$2)}_isShown(){return this.tip&&this.tip.classList.contains(CLASS_NAME_SHOW$2)}_createPopper(e){const a=execute(this._config.placement,[this,e,this._element]),n=AttachmentMap[a.toUpperCase()];return createPopper(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(a=>Number.parseInt(a,10)):typeof e=="function"?a=>e(a,this._element):e}_resolvePossibleFunction(e){return execute(e,[this._element])}_getPopperConfig(e){const a={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return{...a,...execute(this._config.popperConfig,[a])}}_setListeners(){const e=this._config.trigger.split(" ");for(const a of e)if(a==="click")EventHandler.on(this._element,this.constructor.eventName(EVENT_CLICK$1),this._config.selector,n=>{this._initializeOnDelegatedTarget(n).toggle()});else if(a!==TRIGGER_MANUAL){const n=a===TRIGGER_HOVER?this.constructor.eventName(EVENT_MOUSEENTER):this.constructor.eventName(EVENT_FOCUSIN$1),r=a===TRIGGER_HOVER?this.constructor.eventName(EVENT_MOUSELEAVE):this.constructor.eventName(EVENT_FOCUSOUT$1);EventHandler.on(this._element,n,this._config.selector,i=>{const o=this._initializeOnDelegatedTarget(i);o._activeTrigger[i.type==="focusin"?TRIGGER_FOCUS:TRIGGER_HOVER]=!0,o._enter()}),EventHandler.on(this._element,r,this._config.selector,i=>{const o=this._initializeOnDelegatedTarget(i);o._activeTrigger[i.type==="focusout"?TRIGGER_FOCUS:TRIGGER_HOVER]=o._element.contains(i.relatedTarget),o._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},EventHandler.on(this._element.closest(SELECTOR_MODAL),EVENT_MODAL_HIDE,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,a){clearTimeout(this._timeout),this._timeout=setTimeout(e,a)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const a=Manipulator.getDataAttributes(this._element);for(const n of Object.keys(a))DISALLOWED_ATTRIBUTES.has(n)&&delete a[n];return e={...a,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:getElement(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[a,n]of Object.entries(this._config))this.constructor.Default[a]!==n&&(e[a]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const a=me.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof a[e]>"u")throw new TypeError(`No method named "${e}"`);a[e]()}})}};defineJQueryPlugin(Tooltip$1);const NAME$3="popover",SELECTOR_TITLE=".popover-header",SELECTOR_CONTENT=".popover-body",Default$2={...Tooltip$1.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},DefaultType$2={...Tooltip$1.DefaultType,content:"(null|string|element|function)"};class Popover extends Tooltip$1{static get Default(){return Default$2}static get DefaultType(){return DefaultType$2}static get NAME(){return NAME$3}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[SELECTOR_TITLE]:this._getTitle(),[SELECTOR_CONTENT]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const a=Popover.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof a[e]>"u")throw new TypeError(`No method named "${e}"`);a[e]()}})}}defineJQueryPlugin(Popover);const NAME$2="scrollspy",DATA_KEY$2="bs.scrollspy",EVENT_KEY$2=`.${DATA_KEY$2}`,DATA_API_KEY=".data-api",EVENT_ACTIVATE=`activate${EVENT_KEY$2}`,EVENT_CLICK=`click${EVENT_KEY$2}`,EVENT_LOAD_DATA_API$1=`load${EVENT_KEY$2}${DATA_API_KEY}`,CLASS_NAME_DROPDOWN_ITEM="dropdown-item",CLASS_NAME_ACTIVE$1="active",SELECTOR_DATA_SPY='[data-bs-spy="scroll"]',SELECTOR_TARGET_LINKS="[href]",SELECTOR_NAV_LIST_GROUP=".nav, .list-group",SELECTOR_NAV_LINKS=".nav-link",SELECTOR_NAV_ITEMS=".nav-item",SELECTOR_LIST_ITEMS=".list-group-item",SELECTOR_LINK_ITEMS=`${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`,SELECTOR_DROPDOWN=".dropdown",SELECTOR_DROPDOWN_TOGGLE$1=".dropdown-toggle",Default$1={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},DefaultType$1={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ScrollSpy extends BaseComponent{constructor(e,a){super(e,a),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Default$1}static get DefaultType(){return DefaultType$1}static get NAME(){return NAME$2}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=getElement(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(a=>Number.parseFloat(a))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(EventHandler.off(this._config.target,EVENT_CLICK),EventHandler.on(this._config.target,EVENT_CLICK,SELECTOR_TARGET_LINKS,e=>{const a=this._observableSections.get(e.target.hash);if(a){e.preventDefault();const n=this._rootElement||window,r=a.offsetTop-this._element.offsetTop;if(n.scrollTo){n.scrollTo({top:r,behavior:"smooth"});return}n.scrollTop=r}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(a=>this._observerCallback(a),e)}_observerCallback(e){const a=o=>this._targetLinks.get(`#${o.target.id}`),n=o=>{this._previousScrollData.visibleEntryTop=o.target.offsetTop,this._process(a(o))},r=(this._rootElement||document.documentElement).scrollTop,i=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(a(o));continue}const s=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&s){if(n(o),!r)return;continue}!i&&!s&&n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=SelectorEngine.find(SELECTOR_TARGET_LINKS,this._config.target);for(const a of e){if(!a.hash||isDisabled(a))continue;const n=SelectorEngine.findOne(decodeURI(a.hash),this._element);isVisible(n)&&(this._targetLinks.set(decodeURI(a.hash),a),this._observableSections.set(a.hash,n))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(CLASS_NAME_ACTIVE$1),this._activateParents(e),EventHandler.trigger(this._element,EVENT_ACTIVATE,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(CLASS_NAME_DROPDOWN_ITEM)){SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1,e.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);return}for(const a of SelectorEngine.parents(e,SELECTOR_NAV_LIST_GROUP))for(const n of SelectorEngine.prev(a,SELECTOR_LINK_ITEMS))n.classList.add(CLASS_NAME_ACTIVE$1)}_clearActiveClass(e){e.classList.remove(CLASS_NAME_ACTIVE$1);const a=SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE$1}`,e);for(const n of a)n.classList.remove(CLASS_NAME_ACTIVE$1)}static jQueryInterface(e){return this.each(function(){const a=ScrollSpy.getOrCreateInstance(this,e);if(typeof e=="string"){if(a[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);a[e]()}})}}EventHandler.on(window,EVENT_LOAD_DATA_API$1,()=>{for(const t of SelectorEngine.find(SELECTOR_DATA_SPY))ScrollSpy.getOrCreateInstance(t)});defineJQueryPlugin(ScrollSpy);const NAME$1="tab",DATA_KEY$1="bs.tab",EVENT_KEY$1=`.${DATA_KEY$1}`,EVENT_HIDE$1=`hide${EVENT_KEY$1}`,EVENT_HIDDEN$1=`hidden${EVENT_KEY$1}`,EVENT_SHOW$1=`show${EVENT_KEY$1}`,EVENT_SHOWN$1=`shown${EVENT_KEY$1}`,EVENT_CLICK_DATA_API=`click${EVENT_KEY$1}`,EVENT_KEYDOWN=`keydown${EVENT_KEY$1}`,EVENT_LOAD_DATA_API=`load${EVENT_KEY$1}`,ARROW_LEFT_KEY="ArrowLeft",ARROW_RIGHT_KEY="ArrowRight",ARROW_UP_KEY="ArrowUp",ARROW_DOWN_KEY="ArrowDown",HOME_KEY="Home",END_KEY="End",CLASS_NAME_ACTIVE="active",CLASS_NAME_FADE$1="fade",CLASS_NAME_SHOW$1="show",CLASS_DROPDOWN="dropdown",SELECTOR_DROPDOWN_TOGGLE=".dropdown-toggle",SELECTOR_DROPDOWN_MENU=".dropdown-menu",NOT_SELECTOR_DROPDOWN_TOGGLE=`:not(${SELECTOR_DROPDOWN_TOGGLE})`,SELECTOR_TAB_PANEL='.list-group, .nav, [role="tablist"]',SELECTOR_OUTER=".nav-item, .list-group-item",SELECTOR_INNER=`.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`,SELECTOR_DATA_TOGGLE='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',SELECTOR_INNER_ELEM=`${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`,SELECTOR_DATA_TOGGLE_ACTIVE=`.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`;class Tab extends BaseComponent{constructor(e){super(e),this._parent=this._element.closest(SELECTOR_TAB_PANEL),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),EventHandler.on(this._element,EVENT_KEYDOWN,a=>this._keydown(a)))}static get NAME(){return NAME$1}show(){const e=this._element;if(this._elemIsActive(e))return;const a=this._getActiveElem(),n=a?EventHandler.trigger(a,EVENT_HIDE$1,{relatedTarget:e}):null;EventHandler.trigger(e,EVENT_SHOW$1,{relatedTarget:a}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(a,e),this._activate(e,a))}_activate(e,a){if(!e)return;e.classList.add(CLASS_NAME_ACTIVE),this._activate(SelectorEngine.getElementFromSelector(e));const n=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(CLASS_NAME_SHOW$1);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),EventHandler.trigger(e,EVENT_SHOWN$1,{relatedTarget:a})};this._queueCallback(n,e,e.classList.contains(CLASS_NAME_FADE$1))}_deactivate(e,a){if(!e)return;e.classList.remove(CLASS_NAME_ACTIVE),e.blur(),this._deactivate(SelectorEngine.getElementFromSelector(e));const n=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(CLASS_NAME_SHOW$1);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),EventHandler.trigger(e,EVENT_HIDDEN$1,{relatedTarget:a})};this._queueCallback(n,e,e.classList.contains(CLASS_NAME_FADE$1))}_keydown(e){if(![ARROW_LEFT_KEY,ARROW_RIGHT_KEY,ARROW_UP_KEY,ARROW_DOWN_KEY,HOME_KEY,END_KEY].includes(e.key))return;e.stopPropagation(),e.preventDefault();const a=this._getChildren().filter(r=>!isDisabled(r));let n;if([HOME_KEY,END_KEY].includes(e.key))n=a[e.key===HOME_KEY?0:a.length-1];else{const r=[ARROW_RIGHT_KEY,ARROW_DOWN_KEY].includes(e.key);n=getNextActiveElement(a,e.target,r,!0)}n&&(n.focus({preventScroll:!0}),Tab.getOrCreateInstance(n).show())}_getChildren(){return SelectorEngine.find(SELECTOR_INNER_ELEM,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,a){this._setAttributeIfNotExists(e,"role","tablist");for(const n of a)this._setInitialAttributesOnChild(n)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const a=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",a),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),a||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const a=SelectorEngine.getElementFromSelector(e);a&&(this._setAttributeIfNotExists(a,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(a,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,a){const n=this._getOuterElement(e);if(!n.classList.contains(CLASS_DROPDOWN))return;const r=(i,o)=>{const s=SelectorEngine.findOne(i,n);s&&s.classList.toggle(o,a)};r(SELECTOR_DROPDOWN_TOGGLE,CLASS_NAME_ACTIVE),r(SELECTOR_DROPDOWN_MENU,CLASS_NAME_SHOW$1),n.setAttribute("aria-expanded",a)}_setAttributeIfNotExists(e,a,n){e.hasAttribute(a)||e.setAttribute(a,n)}_elemIsActive(e){return e.classList.contains(CLASS_NAME_ACTIVE)}_getInnerElement(e){return e.matches(SELECTOR_INNER_ELEM)?e:SelectorEngine.findOne(SELECTOR_INNER_ELEM,e)}_getOuterElement(e){return e.closest(SELECTOR_OUTER)||e}static jQueryInterface(e){return this.each(function(){const a=Tab.getOrCreateInstance(this);if(typeof e=="string"){if(a[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);a[e]()}})}}EventHandler.on(document,EVENT_CLICK_DATA_API,SELECTOR_DATA_TOGGLE,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),!isDisabled(this)&&Tab.getOrCreateInstance(this).show()});EventHandler.on(window,EVENT_LOAD_DATA_API,()=>{for(const t of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE))Tab.getOrCreateInstance(t)});defineJQueryPlugin(Tab);const NAME="toast",DATA_KEY="bs.toast",EVENT_KEY=`.${DATA_KEY}`,EVENT_MOUSEOVER=`mouseover${EVENT_KEY}`,EVENT_MOUSEOUT=`mouseout${EVENT_KEY}`,EVENT_FOCUSIN=`focusin${EVENT_KEY}`,EVENT_FOCUSOUT=`focusout${EVENT_KEY}`,EVENT_HIDE=`hide${EVENT_KEY}`,EVENT_HIDDEN=`hidden${EVENT_KEY}`,EVENT_SHOW=`show${EVENT_KEY}`,EVENT_SHOWN=`shown${EVENT_KEY}`,CLASS_NAME_FADE="fade",CLASS_NAME_HIDE="hide",CLASS_NAME_SHOW="show",CLASS_NAME_SHOWING="showing",DefaultType={animation:"boolean",autohide:"boolean",delay:"number"},Default={animation:!0,autohide:!0,delay:5e3};class Toast extends BaseComponent{constructor(e,a){super(e,a),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Default}static get DefaultType(){return DefaultType}static get NAME(){return NAME}show(){if(EventHandler.trigger(this._element,EVENT_SHOW).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(CLASS_NAME_FADE);const a=()=>{this._element.classList.remove(CLASS_NAME_SHOWING),EventHandler.trigger(this._element,EVENT_SHOWN),this._maybeScheduleHide()};this._element.classList.remove(CLASS_NAME_HIDE),reflow(this._element),this._element.classList.add(CLASS_NAME_SHOW,CLASS_NAME_SHOWING),this._queueCallback(a,this._element,this._config.animation)}hide(){if(!this.isShown()||EventHandler.trigger(this._element,EVENT_HIDE).defaultPrevented)return;const a=()=>{this._element.classList.add(CLASS_NAME_HIDE),this._element.classList.remove(CLASS_NAME_SHOWING,CLASS_NAME_SHOW),EventHandler.trigger(this._element,EVENT_HIDDEN)};this._element.classList.add(CLASS_NAME_SHOWING),this._queueCallback(a,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(CLASS_NAME_SHOW),super.dispose()}isShown(){return this._element.classList.contains(CLASS_NAME_SHOW)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,a){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=a;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=a;break}}if(a){this._clearTimeout();return}const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){EventHandler.on(this._element,EVENT_MOUSEOVER,e=>this._onInteraction(e,!0)),EventHandler.on(this._element,EVENT_MOUSEOUT,e=>this._onInteraction(e,!1)),EventHandler.on(this._element,EVENT_FOCUSIN,e=>this._onInteraction(e,!0)),EventHandler.on(this._element,EVENT_FOCUSOUT,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const a=Toast.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof a[e]>"u")throw new TypeError(`No method named "${e}"`);a[e](this)}})}}enableDismissTrigger(Toast);defineJQueryPlugin(Toast);const url="/",api=axios$1.create({baseURL:url,withCredentials:!0});axios$1.defaults.withCredentials=!0;axios$1.defaults.baseURL=url;class Preferences{getByName(e){return api.get("/api/v1/preferences/"+e)}getByNameNow(e){return api.get("/api/v1/preferences/"+e)}postByName(e,a){return api.post("/api/v1/preferences",{name:e,data:a})}}class Post{post(e,a){let n="/api/v1/preferences";return api.post(n,{name:e,data:a})}}function getFreshVariable(t,e=null){return new Preferences().getByName(t).then(n=>Promise.resolve(parseResponse$1(t,n))).catch(()=>{new Post().post(t,e).then(r=>Promise.resolve(parseResponse$1(t,r)))})}function parseResponse$1(t,e){return e.data.data.attributes.data}function getVariable(t,e=null){const a=window.store.get("cacheValid");if(a&&window.hasOwnProperty(t))return Promise.resolve(window[t]);const n=window.store.get(t);return a&&typeof n<"u"?Promise.resolve(n):new Preferences().getByName(t).then(i=>Promise.resolve(parseResponse(t,i))).catch(()=>{new Post().post(t,e).then(o=>Promise.resolve(parseResponse(t,o)))})}function parseResponse(t,e){let a=e.data.data.attributes.data;return window.store.set(t,a),a}function _typeof(t){"@babel/helpers - typeof";return _typeof=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},_typeof(t)}function toInteger$2(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function requiredArgs(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function toDate(t){requiredArgs(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||_typeof(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function addDays(t,e){requiredArgs(2,arguments);var a=toDate(t),n=toInteger$2(e);return isNaN(n)?new Date(NaN):(n&&a.setDate(a.getDate()+n),a)}function addMonths(t,e){requiredArgs(2,arguments);var a=toDate(t),n=toInteger$2(e);if(isNaN(n))return new Date(NaN);if(!n)return a;var r=a.getDate(),i=new Date(a.getTime());i.setMonth(a.getMonth()+n+1,0);var o=i.getDate();return r>=o?i:(a.setFullYear(i.getFullYear(),i.getMonth(),r),a)}function addMilliseconds(t,e){requiredArgs(2,arguments);var a=toDate(t).getTime(),n=toInteger$2(e);return new Date(a+n)}var MILLISECONDS_IN_HOUR=36e5;function addHours(t,e){requiredArgs(2,arguments);var a=toInteger$2(e);return addMilliseconds(t,a*MILLISECONDS_IN_HOUR)}var defaultOptions={};function getDefaultOptions(){return defaultOptions}function startOfWeek(t,e){var a,n,r,i,o,s,l,u;requiredArgs(1,arguments);var c=getDefaultOptions(),d=toInteger$2((a=(n=(r=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&a!==void 0?a:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=toDate(t),m=h.getDay(),p=(m<d?7:0)+m-d;return h.setDate(h.getDate()-p),h.setHours(0,0,0,0),h}function getTimezoneOffsetInMilliseconds(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function startOfDay(t){requiredArgs(1,arguments);var e=toDate(t);return e.setHours(0,0,0,0),e}var MILLISECONDS_IN_DAY$1=864e5;function differenceInCalendarDays(t,e){requiredArgs(2,arguments);var a=startOfDay(t),n=startOfDay(e),r=a.getTime()-getTimezoneOffsetInMilliseconds(a),i=n.getTime()-getTimezoneOffsetInMilliseconds(n);return Math.round((r-i)/MILLISECONDS_IN_DAY$1)}var MILLISECONDS_IN_MINUTE=6e4;function addMinutes(t,e){requiredArgs(2,arguments);var a=toInteger$2(e);return addMilliseconds(t,a*MILLISECONDS_IN_MINUTE)}function addQuarters(t,e){requiredArgs(2,arguments);var a=toInteger$2(e),n=a*3;return addMonths(t,n)}function addSeconds(t,e){requiredArgs(2,arguments);var a=toInteger$2(e);return addMilliseconds(t,a*1e3)}function addWeeks(t,e){requiredArgs(2,arguments);var a=toInteger$2(e),n=a*7;return addDays(t,n)}function addYears(t,e){requiredArgs(2,arguments);var a=toInteger$2(e);return addMonths(t,a*12)}function compareAsc(t,e){requiredArgs(2,arguments);var a=toDate(t),n=toDate(e),r=a.getTime()-n.getTime();return r<0?-1:r>0?1:r}var millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3;function isDate(t){return requiredArgs(1,arguments),t instanceof Date||_typeof(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function isValid(t){if(requiredArgs(1,arguments),!isDate(t)&&typeof t!="number")return!1;var e=toDate(t);return!isNaN(Number(e))}function differenceInCalendarMonths(t,e){requiredArgs(2,arguments);var a=toDate(t),n=toDate(e),r=a.getFullYear()-n.getFullYear(),i=a.getMonth()-n.getMonth();return r*12+i}function differenceInCalendarYears(t,e){requiredArgs(2,arguments);var a=toDate(t),n=toDate(e);return a.getFullYear()-n.getFullYear()}function compareLocalAsc(t,e){var a=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return a<0?-1:a>0?1:a}function differenceInDays(t,e){requiredArgs(2,arguments);var a=toDate(t),n=toDate(e),r=compareLocalAsc(a,n),i=Math.abs(differenceInCalendarDays(a,n));a.setDate(a.getDate()-r*i);var o=+(compareLocalAsc(a,n)===-r),s=r*(i-o);return s===0?0:s}function differenceInMilliseconds(t,e){return requiredArgs(2,arguments),toDate(t).getTime()-toDate(e).getTime()}var roundingMap={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function t(e){return e<0?Math.ceil(e):Math.floor(e)}},defaultRoundingMethod="trunc";function getRoundingMethod(t){return t?roundingMap[t]:roundingMap[defaultRoundingMethod]}function differenceInHours(t,e,a){requiredArgs(2,arguments);var n=differenceInMilliseconds(t,e)/millisecondsInHour;return getRoundingMethod(a==null?void 0:a.roundingMethod)(n)}function differenceInMinutes(t,e,a){requiredArgs(2,arguments);var n=differenceInMilliseconds(t,e)/millisecondsInMinute;return getRoundingMethod(a==null?void 0:a.roundingMethod)(n)}function endOfDay(t){requiredArgs(1,arguments);var e=toDate(t);return e.setHours(23,59,59,999),e}function endOfMonth(t){requiredArgs(1,arguments);var e=toDate(t),a=e.getMonth();return e.setFullYear(e.getFullYear(),a+1,0),e.setHours(23,59,59,999),e}function isLastDayOfMonth(t){requiredArgs(1,arguments);var e=toDate(t);return endOfDay(e).getTime()===endOfMonth(e).getTime()}function differenceInMonths(t,e){requiredArgs(2,arguments);var a=toDate(t),n=toDate(e),r=compareAsc(a,n),i=Math.abs(differenceInCalendarMonths(a,n)),o;if(i<1)o=0;else{a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-r*i);var s=compareAsc(a,n)===-r;isLastDayOfMonth(toDate(t))&&i===1&&compareAsc(t,n)===1&&(s=!1),o=r*(i-Number(s))}return o===0?0:o}function differenceInQuarters(t,e,a){requiredArgs(2,arguments);var n=differenceInMonths(t,e)/3;return getRoundingMethod(a==null?void 0:a.roundingMethod)(n)}function differenceInSeconds(t,e,a){requiredArgs(2,arguments);var n=differenceInMilliseconds(t,e)/1e3;return getRoundingMethod(a==null?void 0:a.roundingMethod)(n)}function differenceInWeeks(t,e,a){requiredArgs(2,arguments);var n=differenceInDays(t,e)/7;return getRoundingMethod(a==null?void 0:a.roundingMethod)(n)}function differenceInYears(t,e){requiredArgs(2,arguments);var a=toDate(t),n=toDate(e),r=compareAsc(a,n),i=Math.abs(differenceInCalendarYears(a,n));a.setFullYear(1584),n.setFullYear(1584);var o=compareAsc(a,n)===-r,s=r*(i-Number(o));return s===0?0:s}function startOfMinute(t){requiredArgs(1,arguments);var e=toDate(t);return e.setSeconds(0,0),e}function startOfQuarter(t){requiredArgs(1,arguments);var e=toDate(t),a=e.getMonth(),n=a-a%3;return e.setMonth(n,1),e.setHours(0,0,0,0),e}function startOfMonth(t){requiredArgs(1,arguments);var e=toDate(t);return e.setDate(1),e.setHours(0,0,0,0),e}function endOfYear(t){requiredArgs(1,arguments);var e=toDate(t),a=e.getFullYear();return e.setFullYear(a+1,0,0),e.setHours(23,59,59,999),e}function startOfYear(t){requiredArgs(1,arguments);var e=toDate(t),a=new Date(0);return a.setFullYear(e.getFullYear(),0,1),a.setHours(0,0,0,0),a}function endOfHour(t){requiredArgs(1,arguments);var e=toDate(t);return e.setMinutes(59,59,999),e}function endOfWeek(t,e){var a,n,r,i,o,s,l,u;requiredArgs(1,arguments);var c=getDefaultOptions(),d=toInteger$2((a=(n=(r=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&a!==void 0?a:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=toDate(t),m=h.getDay(),p=(m<d?-7:0)+6-(m-d);return h.setDate(h.getDate()+p),h.setHours(23,59,59,999),h}function endOfMinute(t){requiredArgs(1,arguments);var e=toDate(t);return e.setSeconds(59,999),e}function endOfQuarter(t){requiredArgs(1,arguments);var e=toDate(t),a=e.getMonth(),n=a-a%3+3;return e.setMonth(n,0),e.setHours(23,59,59,999),e}function endOfSecond(t){requiredArgs(1,arguments);var e=toDate(t);return e.setMilliseconds(999),e}function subMilliseconds(t,e){requiredArgs(2,arguments);var a=toInteger$2(e);return addMilliseconds(t,-a)}var MILLISECONDS_IN_DAY=864e5;function getUTCDayOfYear(t){requiredArgs(1,arguments);var e=toDate(t),a=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),r=a-n;return Math.floor(r/MILLISECONDS_IN_DAY)+1}function startOfUTCISOWeek(t){requiredArgs(1,arguments);var e=1,a=toDate(t),n=a.getUTCDay(),r=(n<e?7:0)+n-e;return a.setUTCDate(a.getUTCDate()-r),a.setUTCHours(0,0,0,0),a}function getUTCISOWeekYear(t){requiredArgs(1,arguments);var e=toDate(t),a=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(a+1,0,4),n.setUTCHours(0,0,0,0);var r=startOfUTCISOWeek(n),i=new Date(0);i.setUTCFullYear(a,0,4),i.setUTCHours(0,0,0,0);var o=startOfUTCISOWeek(i);return e.getTime()>=r.getTime()?a+1:e.getTime()>=o.getTime()?a:a-1}function startOfUTCISOWeekYear(t){requiredArgs(1,arguments);var e=getUTCISOWeekYear(t),a=new Date(0);a.setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0);var n=startOfUTCISOWeek(a);return n}var MILLISECONDS_IN_WEEK$1=6048e5;function getUTCISOWeek(t){requiredArgs(1,arguments);var e=toDate(t),a=startOfUTCISOWeek(e).getTime()-startOfUTCISOWeekYear(e).getTime();return Math.round(a/MILLISECONDS_IN_WEEK$1)+1}function startOfUTCWeek(t,e){var a,n,r,i,o,s,l,u;requiredArgs(1,arguments);var c=getDefaultOptions(),d=toInteger$2((a=(n=(r=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&a!==void 0?a:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=toDate(t),m=h.getUTCDay(),p=(m<d?7:0)+m-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function getUTCWeekYear(t,e){var a,n,r,i,o,s,l,u;requiredArgs(1,arguments);var c=toDate(t),d=c.getUTCFullYear(),h=getDefaultOptions(),m=toInteger$2((a=(n=(r=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&n!==void 0?n:(l=h.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,m),p.setUTCHours(0,0,0,0);var v=startOfUTCWeek(p,e),y=new Date(0);y.setUTCFullYear(d,0,m),y.setUTCHours(0,0,0,0);var w=startOfUTCWeek(y,e);return c.getTime()>=v.getTime()?d+1:c.getTime()>=w.getTime()?d:d-1}function startOfUTCWeekYear(t,e){var a,n,r,i,o,s,l,u;requiredArgs(1,arguments);var c=getDefaultOptions(),d=toInteger$2((a=(n=(r=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:1),h=getUTCWeekYear(t,e),m=new Date(0);m.setUTCFullYear(h,0,d),m.setUTCHours(0,0,0,0);var p=startOfUTCWeek(m,e);return p}var MILLISECONDS_IN_WEEK=6048e5;function getUTCWeek(t,e){requiredArgs(1,arguments);var a=toDate(t),n=startOfUTCWeek(a,e).getTime()-startOfUTCWeekYear(a,e).getTime();return Math.round(n/MILLISECONDS_IN_WEEK)+1}function addLeadingZeros(t,e){for(var a=t<0?"-":"",n=Math.abs(t).toString();n.length<e;)n="0"+n;return a+n}var formatters$3={y:function t(e,a){var n=e.getUTCFullYear(),r=n>0?n:1-n;return addLeadingZeros(a==="yy"?r%100:r,a.length)},M:function t(e,a){var n=e.getUTCMonth();return a==="M"?String(n+1):addLeadingZeros(n+1,2)},d:function t(e,a){return addLeadingZeros(e.getUTCDate(),a.length)},a:function t(e,a){var n=e.getUTCHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function t(e,a){return addLeadingZeros(e.getUTCHours()%12||12,a.length)},H:function t(e,a){return addLeadingZeros(e.getUTCHours(),a.length)},m:function t(e,a){return addLeadingZeros(e.getUTCMinutes(),a.length)},s:function t(e,a){return addLeadingZeros(e.getUTCSeconds(),a.length)},S:function t(e,a){var n=a.length,r=e.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return addLeadingZeros(i,a.length)}};const formatters$4=formatters$3;var dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters$1={G:function t(e,a,n){var r=e.getUTCFullYear()>0?1:0;switch(a){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function t(e,a,n){if(a==="yo"){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return formatters$4.y(e,a)},Y:function t(e,a,n,r){var i=getUTCWeekYear(e,r),o=i>0?i:1-i;if(a==="YY"){var s=o%100;return addLeadingZeros(s,2)}return a==="Yo"?n.ordinalNumber(o,{unit:"year"}):addLeadingZeros(o,a.length)},R:function t(e,a){var n=getUTCISOWeekYear(e);return addLeadingZeros(n,a.length)},u:function t(e,a){var n=e.getUTCFullYear();return addLeadingZeros(n,a.length)},Q:function t(e,a,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(a){case"Q":return String(r);case"QQ":return addLeadingZeros(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function t(e,a,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(a){case"q":return String(r);case"qq":return addLeadingZeros(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function t(e,a,n){var r=e.getUTCMonth();switch(a){case"M":case"MM":return formatters$4.M(e,a);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function t(e,a,n){var r=e.getUTCMonth();switch(a){case"L":return String(r+1);case"LL":return addLeadingZeros(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function t(e,a,n,r){var i=getUTCWeek(e,r);return a==="wo"?n.ordinalNumber(i,{unit:"week"}):addLeadingZeros(i,a.length)},I:function t(e,a,n){var r=getUTCISOWeek(e);return a==="Io"?n.ordinalNumber(r,{unit:"week"}):addLeadingZeros(r,a.length)},d:function t(e,a,n){return a==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):formatters$4.d(e,a)},D:function t(e,a,n){var r=getUTCDayOfYear(e);return a==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):addLeadingZeros(r,a.length)},E:function t(e,a,n){var r=e.getUTCDay();switch(a){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function t(e,a,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(a){case"e":return String(o);case"ee":return addLeadingZeros(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function t(e,a,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(a){case"c":return String(o);case"cc":return addLeadingZeros(o,a.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function t(e,a,n){var r=e.getUTCDay(),i=r===0?7:r;switch(a){case"i":return String(i);case"ii":return addLeadingZeros(i,a.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function t(e,a,n){var r=e.getUTCHours(),i=r/12>=1?"pm":"am";switch(a){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function t(e,a,n){var r=e.getUTCHours(),i;switch(r===12?i=dayPeriodEnum.noon:r===0?i=dayPeriodEnum.midnight:i=r/12>=1?"pm":"am",a){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function t(e,a,n){var r=e.getUTCHours(),i;switch(r>=17?i=dayPeriodEnum.evening:r>=12?i=dayPeriodEnum.afternoon:r>=4?i=dayPeriodEnum.morning:i=dayPeriodEnum.night,a){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function t(e,a,n){if(a==="ho"){var r=e.getUTCHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return formatters$4.h(e,a)},H:function t(e,a,n){return a==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):formatters$4.H(e,a)},K:function t(e,a,n){var r=e.getUTCHours()%12;return a==="Ko"?n.ordinalNumber(r,{unit:"hour"}):addLeadingZeros(r,a.length)},k:function t(e,a,n){var r=e.getUTCHours();return r===0&&(r=24),a==="ko"?n.ordinalNumber(r,{unit:"hour"}):addLeadingZeros(r,a.length)},m:function t(e,a,n){return a==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):formatters$4.m(e,a)},s:function t(e,a,n){return a==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):formatters$4.s(e,a)},S:function t(e,a){return formatters$4.S(e,a)},X:function t(e,a,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(a){case"X":return formatTimezoneWithOptionalMinutes(o);case"XXXX":case"XX":return formatTimezone(o);case"XXXXX":case"XXX":default:return formatTimezone(o,":")}},x:function t(e,a,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(a){case"x":return formatTimezoneWithOptionalMinutes(o);case"xxxx":case"xx":return formatTimezone(o);case"xxxxx":case"xxx":default:return formatTimezone(o,":")}},O:function t(e,a,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(a){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(o,":");case"OOOO":default:return"GMT"+formatTimezone(o,":")}},z:function t(e,a,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(a){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(o,":");case"zzzz":default:return"GMT"+formatTimezone(o,":")}},t:function t(e,a,n,r){var i=r._originalDate||e,o=Math.floor(i.getTime()/1e3);return addLeadingZeros(o,a.length)},T:function t(e,a,n,r){var i=r._originalDate||e,o=i.getTime();return addLeadingZeros(o,a.length)}};function formatTimezoneShort(t,e){var a=t>0?"-":"+",n=Math.abs(t),r=Math.floor(n/60),i=n%60;if(i===0)return a+String(r);var o=e||"";return a+String(r)+o+addLeadingZeros(i,2)}function formatTimezoneWithOptionalMinutes(t,e){if(t%60===0){var a=t>0?"-":"+";return a+addLeadingZeros(Math.abs(t)/60,2)}return formatTimezone(t,e)}function formatTimezone(t,e){var a=e||"",n=t>0?"-":"+",r=Math.abs(t),i=addLeadingZeros(Math.floor(r/60),2),o=addLeadingZeros(r%60,2);return n+i+a+o}const formatters$2=formatters$1;var dateLongFormatter=function t(e,a){switch(e){case"P":return a.date({width:"short"});case"PP":return a.date({width:"medium"});case"PPP":return a.date({width:"long"});case"PPPP":default:return a.date({width:"full"})}},timeLongFormatter=function t(e,a){switch(e){case"p":return a.time({width:"short"});case"pp":return a.time({width:"medium"});case"ppp":return a.time({width:"long"});case"pppp":default:return a.time({width:"full"})}},dateTimeLongFormatter=function t(e,a){var n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return dateLongFormatter(e,a);var o;switch(r){case"P":o=a.dateTime({width:"short"});break;case"PP":o=a.dateTime({width:"medium"});break;case"PPP":o=a.dateTime({width:"long"});break;case"PPPP":default:o=a.dateTime({width:"full"});break}return o.replace("{{date}}",dateLongFormatter(r,a)).replace("{{time}}",timeLongFormatter(i,a))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter};const longFormatters$1=longFormatters;var protectedDayOfYearTokens=["D","DD"],protectedWeekYearTokens=["YY","YYYY"];function isProtectedDayOfYearToken(t){return protectedDayOfYearTokens.indexOf(t)!==-1}function isProtectedWeekYearToken(t){return protectedWeekYearTokens.indexOf(t)!==-1}function throwProtectedError(t,e,a){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(a,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(a,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(a,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(a,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var formatDistanceLocale$t={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance$Y=function t(e,a,n){var r,i=formatDistanceLocale$t[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const formatDistance$Z=formatDistance$Y;function buildFormatLongFn(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=e.width?String(e.width):t.defaultWidth,n=t.formats[a]||t.formats[t.defaultWidth];return n}}var dateFormats$v={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats$v={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats$v={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$_={date:buildFormatLongFn({formats:dateFormats$v,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$v,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$v,defaultWidth:"full"})};const formatLong$$=formatLong$_;var formatRelativeLocale$u={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative$Y=function t(e,a,n,r){return formatRelativeLocale$u[e]};const formatRelative$Z=formatRelative$Y;function buildLocalizeFn(t){return function(e,a){var n=a!=null&&a.context?String(a.context):"standalone",r;if(n==="formatting"&&t.formattingValues){var i=t.defaultFormattingWidth||t.defaultWidth,o=a!=null&&a.width?String(a.width):i;r=t.formattingValues[o]||t.formattingValues[i]}else{var s=t.defaultWidth,l=a!=null&&a.width?String(a.width):t.defaultWidth;r=t.values[l]||t.values[s]}var u=t.argumentCallback?t.argumentCallback(e):e;return r[u]}}var eraValues$u={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues$u={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues$u={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues$u={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues$u={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues$l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber$u=function t(e,a){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},localize$Y={ordinalNumber:ordinalNumber$u,era:buildLocalizeFn({values:eraValues$u,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$u,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$u,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$u,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$u,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$l,defaultFormattingWidth:"wide"})};const localize$Z=localize$Y;function buildMatchFn(t){return function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.width,r=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],i=e.match(r);if(!i)return null;var o=i[0],s=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(s)?findIndex(s,function(d){return d.test(o)}):findKey(s,function(d){return d.test(o)}),u;u=t.valueCallback?t.valueCallback(l):l,u=a.valueCallback?a.valueCallback(u):u;var c=e.slice(o.length);return{value:u,rest:c}}}function findKey(t,e){for(var a in t)if(t.hasOwnProperty(a)&&e(t[a]))return a}function findIndex(t,e){for(var a=0;a<t.length;a++)if(e(t[a]))return a}function buildMatchPatternFn(t){return function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(t.matchPattern);if(!n)return null;var r=n[0],i=e.match(t.parsePattern);if(!i)return null;var o=t.valueCallback?t.valueCallback(i[0]):i[0];o=a.valueCallback?a.valueCallback(o):o;var s=e.slice(r.length);return{value:o,rest:s}}}var matchOrdinalNumberPattern$u=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern$u=/\d+/i,matchEraPatterns$u={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns$u={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns$u={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns$u={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$u={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns$u={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$u={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns$u={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns$u={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns$u={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match$Y={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$u,parsePattern:parseOrdinalNumberPattern$u,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$u,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$u,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$u,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$u,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$u,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$u,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$u,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$u,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$u,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$u,defaultParseWidth:"any"})};const match$Z=match$Y;var locale$v={code:"en-US",formatDistance:formatDistance$Z,formatLong:formatLong$$,formatRelative:formatRelative$Z,localize:localize$Z,match:match$Z,options:{weekStartsOn:0,firstWeekContainsDate:1}};const enUS=locale$v;var formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;function format$1(t,e,a){var n,r,i,o,s,l,u,c,d,h,m,p,v,y,w,_,D,k;requiredArgs(2,arguments);var O=String(e),N=getDefaultOptions(),F=(n=(r=a==null?void 0:a.locale)!==null&&r!==void 0?r:N.locale)!==null&&n!==void 0?n:enUS,g=toInteger$2((i=(o=(s=(l=a==null?void 0:a.firstWeekContainsDate)!==null&&l!==void 0?l:a==null||(u=a.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:N.firstWeekContainsDate)!==null&&o!==void 0?o:(d=N.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=toInteger$2((m=(p=(v=(y=a==null?void 0:a.weekStartsOn)!==null&&y!==void 0?y:a==null||(w=a.locale)===null||w===void 0||(_=w.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&v!==void 0?v:N.weekStartsOn)!==null&&p!==void 0?p:(D=N.locale)===null||D===void 0||(k=D.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&m!==void 0?m:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!F.localize)throw new RangeError("locale must contain localize property");if(!F.formatLong)throw new RangeError("locale must contain formatLong property");var $=toDate(t);if(!isValid($))throw new RangeError("Invalid time value");var S=getTimezoneOffsetInMilliseconds($),P=subMilliseconds($,S),M={firstWeekContainsDate:g,weekStartsOn:b,locale:F,_originalDate:$},C=O.match(longFormattingTokensRegExp$1).map(function(E){var T=E[0];if(T==="p"||T==="P"){var x=longFormatters$1[T];return x(E,F.formatLong)}return E}).join("").match(formattingTokensRegExp$1).map(function(E){if(E==="''")return"'";var T=E[0];if(T==="'")return cleanEscapedString$1(E);var x=formatters$2[T];if(x)return!(a!=null&&a.useAdditionalWeekYearTokens)&&isProtectedWeekYearToken(E)&&throwProtectedError(E,e,String(t)),!(a!=null&&a.useAdditionalDayOfYearTokens)&&isProtectedDayOfYearToken(E)&&throwProtectedError(E,e,String(t)),x(P,E,F.localize,M);if(T.match(unescapedLatinCharacterRegExp$1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return E}).join("");return C}function cleanEscapedString$1(t){var e=t.match(escapedStringRegExp$1);return e?e[1].replace(doubleQuoteRegExp$1,"'"):t}function assign(t,e){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}function _arrayLikeToArray(t,e){(e==null||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}function _unsupportedIterableToArray(t,e){if(t){if(typeof t=="string")return _arrayLikeToArray(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);if(a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set")return Array.from(t);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,e)}}function _createForOfIteratorHelper(t,e){var a=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||e&&t&&typeof t.length=="number"){a&&(t=a);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,s;return{s:function(){a=a.call(t)},n:function(){var u=a.next();return i=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!i&&a.return!=null&&a.return()}finally{if(o)throw s}}}}function _assertThisInitialized(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},_setPrototypeOf(t,e)}function _inherits(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&&_setPrototypeOf(t,e)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},_getPrototypeOf(t)}function _isNativeReflectConstruct(){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 _possibleConstructorReturn(t,e){if(e&&(_typeof(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _createSuper(t){var e=_isNativeReflectConstruct();return function(){var n=_getPrototypeOf(t),r;if(e){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _toPrimitive(t,e){if(_typeof(t)!=="object"||t===null)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var n=a.call(t,e||"default");if(_typeof(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return _typeof(e)==="symbol"?e:String(e)}function _defineProperties(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_toPropertyKey(n.key),n)}}function _createClass(t,e,a){return e&&_defineProperties(t.prototype,e),a&&_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}function _defineProperty$1(t,e,a){return e=_toPropertyKey(e),e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var TIMEZONE_UNIT_PRIORITY=10,Setter=function(){function t(){_classCallCheck(this,t),_defineProperty$1(this,"priority",void 0),_defineProperty$1(this,"subPriority",0)}return _createClass(t,[{key:"validate",value:function(a,n){return!0}}]),t}(),ValueSetter=function(t){_inherits(a,t);var e=_createSuper(a);function a(n,r,i,o,s){var l;return _classCallCheck(this,a),l=e.call(this),l.value=n,l.validateValue=r,l.setValue=i,l.priority=o,s&&(l.subPriority=s),l}return _createClass(a,[{key:"validate",value:function(r,i){return this.validateValue(r,this.value,i)}},{key:"set",value:function(r,i,o){return this.setValue(r,i,this.value,o)}}]),a}(Setter),DateToSystemTimezoneSetter=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",TIMEZONE_UNIT_PRIORITY),_defineProperty$1(_assertThisInitialized(n),"subPriority",-1),n}return _createClass(a,[{key:"set",value:function(r,i){if(i.timestampIsSet)return r;var o=new Date(0);return o.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),o.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),o}}]),a}(Setter),Parser=function(){function t(){_classCallCheck(this,t),_defineProperty$1(this,"incompatibleTokens",void 0),_defineProperty$1(this,"priority",void 0),_defineProperty$1(this,"subPriority",void 0)}return _createClass(t,[{key:"run",value:function(a,n,r,i){var o=this.parse(a,n,r,i);return o?{setter:new ValueSetter(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(a,n,r){return!0}}]),t}(),EraParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",140),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["R","u","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"})||o.era(r,{width:"narrow"});case"GGGGG":return o.era(r,{width:"narrow"});case"GGGG":default:return o.era(r,{width:"wide"})||o.era(r,{width:"abbreviated"})||o.era(r,{width:"narrow"})}}},{key:"set",value:function(r,i,o){return i.era=o,r.setUTCFullYear(o,0,1),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(t,e){return t&&{value:e(t.value),rest:t.rest}}function parseNumericPattern(t,e){var a=e.match(t);return a?{value:parseInt(a[0],10),rest:e.slice(a[0].length)}:null}function parseTimezonePattern(t,e){var a=e.match(t);if(!a)return null;if(a[0]==="Z")return{value:0,rest:e.slice(1)};var n=a[1]==="+"?1:-1,r=a[2]?parseInt(a[2],10):0,i=a[3]?parseInt(a[3],10):0,o=a[5]?parseInt(a[5],10):0;return{value:n*(r*millisecondsInHour+i*millisecondsInMinute+o*millisecondsInSecond),rest:e.slice(a[0].length)}}function parseAnyDigitsSigned(t){return parseNumericPattern(numericPatterns.anyDigitsSigned,t)}function parseNDigits(t,e){switch(t){case 1:return parseNumericPattern(numericPatterns.singleDigit,e);case 2:return parseNumericPattern(numericPatterns.twoDigits,e);case 3:return parseNumericPattern(numericPatterns.threeDigits,e);case 4:return parseNumericPattern(numericPatterns.fourDigits,e);default:return parseNumericPattern(new RegExp("^\\d{1,"+t+"}"),e)}}function parseNDigitsSigned(t,e){switch(t){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,e);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,e);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,e);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,e);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+t+"}"),e)}}function dayPeriodEnumToHours(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function normalizeTwoDigitYear(t,e){var a=e>0,n=a?e:1-e,r;if(n<=50)r=t||100;else{var i=n+50,o=Math.floor(i/100)*100,s=t>=i%100;r=t+o-(s?100:0)}return a?r:1-r}function isLeapYearIndex$1(t){return t%400===0||t%4===0&&t%100!==0}var YearParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",130),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){var s=function(u){return{year:u,isTwoDigitYear:i==="yy"}};switch(i){case"y":return mapValue(parseNDigits(4,r),s);case"yo":return mapValue(o.ordinalNumber(r,{unit:"year"}),s);default:return mapValue(parseNDigits(i.length,r),s)}}},{key:"validate",value:function(r,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(r,i,o){var s=r.getUTCFullYear();if(o.isTwoDigitYear){var l=normalizeTwoDigitYear(o.year,s);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}var u=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(u,0,1),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),LocalWeekYearParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",130),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){var s=function(u){return{year:u,isTwoDigitYear:i==="YY"}};switch(i){case"Y":return mapValue(parseNDigits(4,r),s);case"Yo":return mapValue(o.ordinalNumber(r,{unit:"year"}),s);default:return mapValue(parseNDigits(i.length,r),s)}}},{key:"validate",value:function(r,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(r,i,o,s){var l=getUTCWeekYear(r,s);if(o.isTwoDigitYear){var u=normalizeTwoDigitYear(o.year,l);return r.setUTCFullYear(u,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),startOfUTCWeek(r,s)}var c=!("era"in i)||i.era===1?o.year:1-o.year;return r.setUTCFullYear(c,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),startOfUTCWeek(r,s)}}]),a}(Parser),ISOWeekYearParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",130),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i){return parseNDigitsSigned(i==="R"?4:i.length,r)}},{key:"set",value:function(r,i,o){var s=new Date(0);return s.setUTCFullYear(o,0,4),s.setUTCHours(0,0,0,0),startOfUTCISOWeek(s)}}]),a}(Parser),ExtendedYearParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",130),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i){return parseNDigitsSigned(i==="u"?4:i.length,r)}},{key:"set",value:function(r,i,o){return r.setUTCFullYear(o,0,1),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),QuarterParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",120),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"Q":case"QQ":return parseNDigits(i.length,r);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"})||o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(r,{width:"wide",context:"formatting"})||o.quarter(r,{width:"abbreviated",context:"formatting"})||o.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,i){return i>=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),StandAloneQuarterParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",120),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"q":case"qq":return parseNDigits(i.length,r);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"})||o.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(r,{width:"wide",context:"standalone"})||o.quarter(r,{width:"abbreviated",context:"standalone"})||o.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,i){return i>=1&&i<=4}},{key:"set",value:function(r,i,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),MonthParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),_defineProperty$1(_assertThisInitialized(n),"priority",110),n}return _createClass(a,[{key:"parse",value:function(r,i,o){var s=function(u){return u-1};switch(i){case"M":return mapValue(parseNumericPattern(numericPatterns.month,r),s);case"MM":return mapValue(parseNDigits(2,r),s);case"Mo":return mapValue(o.ordinalNumber(r,{unit:"month"}),s);case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"})||o.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(r,{width:"wide",context:"formatting"})||o.month(r,{width:"abbreviated",context:"formatting"})||o.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,i){return i>=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),StandAloneMonthParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",110),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){var s=function(u){return u-1};switch(i){case"L":return mapValue(parseNumericPattern(numericPatterns.month,r),s);case"LL":return mapValue(parseNDigits(2,r),s);case"Lo":return mapValue(o.ordinalNumber(r,{unit:"month"}),s);case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"})||o.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(r,{width:"wide",context:"standalone"})||o.month(r,{width:"abbreviated",context:"standalone"})||o.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,i){return i>=0&&i<=11}},{key:"set",value:function(r,i,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),a}(Parser);function setUTCWeek(t,e,a){requiredArgs(2,arguments);var n=toDate(t),r=toInteger$2(e),i=getUTCWeek(n,a)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var LocalWeekParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",100),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"w":return parseNumericPattern(numericPatterns.week,r);case"wo":return o.ordinalNumber(r,{unit:"week"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){return i>=1&&i<=53}},{key:"set",value:function(r,i,o,s){return startOfUTCWeek(setUTCWeek(r,o,s),s)}}]),a}(Parser);function setUTCISOWeek(t,e){requiredArgs(2,arguments);var a=toDate(t),n=toInteger$2(e),r=getUTCISOWeek(a)-n;return a.setUTCDate(a.getUTCDate()-r*7),a}var ISOWeekParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",100),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"I":return parseNumericPattern(numericPatterns.week,r);case"Io":return o.ordinalNumber(r,{unit:"week"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){return i>=1&&i<=53}},{key:"set",value:function(r,i,o){return startOfUTCISOWeek(setUTCISOWeek(r,o))}}]),a}(Parser),DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31],DateParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",90),_defineProperty$1(_assertThisInitialized(n),"subPriority",1),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"d":return parseNumericPattern(numericPatterns.date,r);case"do":return o.ordinalNumber(r,{unit:"date"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){var o=r.getUTCFullYear(),s=isLeapYearIndex$1(o),l=r.getUTCMonth();return s?i>=1&&i<=DAYS_IN_MONTH_LEAP_YEAR[l]:i>=1&&i<=DAYS_IN_MONTH[l]}},{key:"set",value:function(r,i,o){return r.setUTCDate(o),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),DayOfYearParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",90),_defineProperty$1(_assertThisInitialized(n),"subpriority",1),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,r);case"Do":return o.ordinalNumber(r,{unit:"date"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){var o=r.getUTCFullYear(),s=isLeapYearIndex$1(o);return s?i>=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(r,i,o){return r.setUTCMonth(0,o),r.setUTCHours(0,0,0,0),r}}]),a}(Parser);function setUTCDay(t,e,a){var n,r,i,o,s,l,u,c;requiredArgs(2,arguments);var d=getDefaultOptions(),h=toInteger$2((n=(r=(i=(o=a==null?void 0:a.weekStartsOn)!==null&&o!==void 0?o:a==null||(s=a.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&r!==void 0?r:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=toDate(t),p=toInteger$2(e),v=m.getUTCDay(),y=p%7,w=(y+7)%7,_=(w<h?7:0)+p-v;return m.setUTCDate(m.getUTCDate()+_),m}var DayParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",90),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(r,{width:"wide",context:"formatting"})||o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,i){return i>=0&&i<=6}},{key:"set",value:function(r,i,o,s){return r=setUTCDay(r,o,s),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),LocalDayParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",90),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o,s){var l=function(c){var d=Math.floor((c-1)/7)*7;return(c+s.weekStartsOn+6)%7+d};switch(i){case"e":case"ee":return mapValue(parseNDigits(i.length,r),l);case"eo":return mapValue(o.ordinalNumber(r,{unit:"day"}),l);case"eee":return o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"eeeee":return o.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(r,{width:"wide",context:"formatting"})||o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,i){return i>=0&&i<=6}},{key:"set",value:function(r,i,o,s){return r=setUTCDay(r,o,s),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),StandAloneLocalDayParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",90),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o,s){var l=function(c){var d=Math.floor((c-1)/7)*7;return(c+s.weekStartsOn+6)%7+d};switch(i){case"c":case"cc":return mapValue(parseNDigits(i.length,r),l);case"co":return mapValue(o.ordinalNumber(r,{unit:"day"}),l);case"ccc":return o.day(r,{width:"abbreviated",context:"standalone"})||o.day(r,{width:"short",context:"standalone"})||o.day(r,{width:"narrow",context:"standalone"});case"ccccc":return o.day(r,{width:"narrow",context:"standalone"});case"cccccc":return o.day(r,{width:"short",context:"standalone"})||o.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(r,{width:"wide",context:"standalone"})||o.day(r,{width:"abbreviated",context:"standalone"})||o.day(r,{width:"short",context:"standalone"})||o.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,i){return i>=0&&i<=6}},{key:"set",value:function(r,i,o,s){return r=setUTCDay(r,o,s),r.setUTCHours(0,0,0,0),r}}]),a}(Parser);function setUTCISODay(t,e){requiredArgs(2,arguments);var a=toInteger$2(e);a%7===0&&(a=a-7);var n=1,r=toDate(t),i=r.getUTCDay(),o=a%7,s=(o+7)%7,l=(s<n?7:0)+a-i;return r.setUTCDate(r.getUTCDate()+l),r}var ISODayParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",90),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){var s=function(u){return u===0?7:u};switch(i){case"i":case"ii":return parseNDigits(i.length,r);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return mapValue(o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s);case"iiiii":return mapValue(o.day(r,{width:"narrow",context:"formatting"}),s);case"iiiiii":return mapValue(o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s);case"iiii":default:return mapValue(o.day(r,{width:"wide",context:"formatting"})||o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(r,i){return i>=1&&i<=7}},{key:"set",value:function(r,i,o){return r=setUTCISODay(r,o),r.setUTCHours(0,0,0,0),r}}]),a}(Parser),AMPMParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",80),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"a":case"aa":case"aaa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})||o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,i,o){return r.setUTCHours(dayPeriodEnumToHours(o),0,0,0),r}}]),a}(Parser),AMPMMidnightParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",80),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"b":case"bb":case"bbb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})||o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,i,o){return r.setUTCHours(dayPeriodEnumToHours(o),0,0,0),r}}]),a}(Parser),DayPeriodParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",80),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["a","b","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"B":case"BB":case"BBB":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})||o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,i,o){return r.setUTCHours(dayPeriodEnumToHours(o),0,0,0),r}}]),a}(Parser),Hour1to12Parser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",70),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["H","K","k","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"h":return parseNumericPattern(numericPatterns.hour12h,r);case"ho":return o.ordinalNumber(r,{unit:"hour"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){return i>=1&&i<=12}},{key:"set",value:function(r,i,o){var s=r.getUTCHours()>=12;return s&&o<12?r.setUTCHours(o+12,0,0,0):!s&&o===12?r.setUTCHours(0,0,0,0):r.setUTCHours(o,0,0,0),r}}]),a}(Parser),Hour0to23Parser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",70),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"H":return parseNumericPattern(numericPatterns.hour23h,r);case"Ho":return o.ordinalNumber(r,{unit:"hour"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){return i>=0&&i<=23}},{key:"set",value:function(r,i,o){return r.setUTCHours(o,0,0,0),r}}]),a}(Parser),Hour0To11Parser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",70),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["h","H","k","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"K":return parseNumericPattern(numericPatterns.hour11h,r);case"Ko":return o.ordinalNumber(r,{unit:"hour"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){return i>=0&&i<=11}},{key:"set",value:function(r,i,o){var s=r.getUTCHours()>=12;return s&&o<12?r.setUTCHours(o+12,0,0,0):r.setUTCHours(o,0,0,0),r}}]),a}(Parser),Hour1To24Parser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",70),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"k":return parseNumericPattern(numericPatterns.hour24h,r);case"ko":return o.ordinalNumber(r,{unit:"hour"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){return i>=1&&i<=24}},{key:"set",value:function(r,i,o){var s=o<=24?o%24:o;return r.setUTCHours(s,0,0,0),r}}]),a}(Parser),MinuteParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",60),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"m":return parseNumericPattern(numericPatterns.minute,r);case"mo":return o.ordinalNumber(r,{unit:"minute"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){return i>=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCMinutes(o,0,0),r}}]),a}(Parser),SecondParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",50),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i,o){switch(i){case"s":return parseNumericPattern(numericPatterns.second,r);case"so":return o.ordinalNumber(r,{unit:"second"});default:return parseNDigits(i.length,r)}}},{key:"validate",value:function(r,i){return i>=0&&i<=59}},{key:"set",value:function(r,i,o){return r.setUTCSeconds(o,0),r}}]),a}(Parser),FractionOfSecondParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",30),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["t","T"]),n}return _createClass(a,[{key:"parse",value:function(r,i){var o=function(l){return Math.floor(l*Math.pow(10,-i.length+3))};return mapValue(parseNDigits(i.length,r),o)}},{key:"set",value:function(r,i,o){return r.setUTCMilliseconds(o),r}}]),a}(Parser),ISOTimezoneWithZParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",10),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["t","T","x"]),n}return _createClass(a,[{key:"parse",value:function(r,i){switch(i){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,r);case"XX":return parseTimezonePattern(timezonePatterns.basic,r);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,r);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,r);case"XXX":default:return parseTimezonePattern(timezonePatterns.extended,r)}}},{key:"set",value:function(r,i,o){return i.timestampIsSet?r:new Date(r.getTime()-o)}}]),a}(Parser),ISOTimezoneParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",10),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens",["t","T","X"]),n}return _createClass(a,[{key:"parse",value:function(r,i){switch(i){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,r);case"xx":return parseTimezonePattern(timezonePatterns.basic,r);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,r);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,r);case"xxx":default:return parseTimezonePattern(timezonePatterns.extended,r)}}},{key:"set",value:function(r,i,o){return i.timestampIsSet?r:new Date(r.getTime()-o)}}]),a}(Parser),TimestampSecondsParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",40),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens","*"),n}return _createClass(a,[{key:"parse",value:function(r){return parseAnyDigitsSigned(r)}},{key:"set",value:function(r,i,o){return[new Date(o*1e3),{timestampIsSet:!0}]}}]),a}(Parser),TimestampMillisecondsParser=function(t){_inherits(a,t);var e=_createSuper(a);function a(){var n;_classCallCheck(this,a);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),_defineProperty$1(_assertThisInitialized(n),"priority",20),_defineProperty$1(_assertThisInitialized(n),"incompatibleTokens","*"),n}return _createClass(a,[{key:"parse",value:function(r){return parseAnyDigitsSigned(r)}},{key:"set",value:function(r,i,o){return[new Date(o),{timestampIsSet:!0}]}}]),a}(Parser),parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser},formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,notWhitespaceRegExp=/\S/,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse$1(t,e,a,n){var r,i,o,s,l,u,c,d,h,m,p,v,y,w,_,D,k,O;requiredArgs(3,arguments);var N=String(t),F=String(e),g=getDefaultOptions(),b=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:g.locale)!==null&&r!==void 0?r:enUS;if(!b.match)throw new RangeError("locale must contain match property");var $=toInteger$2((o=(s=(l=(u=n==null?void 0:n.firstWeekContainsDate)!==null&&u!==void 0?u:n==null||(c=n.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:g.firstWeekContainsDate)!==null&&s!==void 0?s:(h=g.locale)===null||h===void 0||(m=h.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!($>=1&&$<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=toInteger$2((p=(v=(y=(w=n==null?void 0:n.weekStartsOn)!==null&&w!==void 0?w:n==null||(_=n.locale)===null||_===void 0||(D=_.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&y!==void 0?y:g.weekStartsOn)!==null&&v!==void 0?v:(k=g.locale)===null||k===void 0||(O=k.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&p!==void 0?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(F==="")return N===""?toDate(a):new Date(NaN);var P={firstWeekContainsDate:$,weekStartsOn:S,locale:b},M=[new DateToSystemTimezoneSetter],C=F.match(longFormattingTokensRegExp).map(function(K){var Y=K[0];if(Y in longFormatters$1){var J=longFormatters$1[Y];return J(K,b.formatLong)}return K}).join("").match(formattingTokensRegExp),E=[],T=_createForOfIteratorHelper(C),x;try{var A=function(){var Y=x.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&isProtectedWeekYearToken(Y)&&throwProtectedError(Y,F,t),!(n!=null&&n.useAdditionalDayOfYearTokens)&&isProtectedDayOfYearToken(Y)&&throwProtectedError(Y,F,t);var J=Y[0],Q=parsers[J];if(Q){var ee=Q.incompatibleTokens;if(Array.isArray(ee)){var Z=E.find(function(q){return ee.includes(q.token)||q.token===J});if(Z)throw new RangeError("The format string mustn't contain `".concat(Z.fullToken,"` and `").concat(Y,"` at the same time"))}else if(Q.incompatibleTokens==="*"&&E.length>0)throw new RangeError("The format string mustn't contain `".concat(Y,"` and any other token at the same time"));E.push({token:J,fullToken:Y});var X=Q.run(N,Y,b.match,P);if(!X)return{v:new Date(NaN)};M.push(X.setter),N=X.rest}else{if(J.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+J+"`");if(Y==="''"?Y="'":J==="'"&&(Y=cleanEscapedString(Y)),N.indexOf(Y)===0)N=N.slice(Y.length);else return{v:new Date(NaN)}}};for(T.s();!(x=T.n()).done;){var L=A();if(_typeof(L)==="object")return L.v}}catch(K){T.e(K)}finally{T.f()}if(N.length>0&¬WhitespaceRegExp.test(N))return new Date(NaN);var I=M.map(function(K){return K.priority}).sort(function(K,Y){return Y-K}).filter(function(K,Y,J){return J.indexOf(K)===Y}).map(function(K){return M.filter(function(Y){return Y.priority===K}).sort(function(Y,J){return J.subPriority-Y.subPriority})}).map(function(K){return K[0]}),W=toDate(a);if(isNaN(W.getTime()))return new Date(NaN);var z=subMilliseconds(W,getTimezoneOffsetInMilliseconds(W)),U={},B=_createForOfIteratorHelper(I),V;try{for(B.s();!(V=B.n()).done;){var H=V.value;if(!H.validate(z,P))return new Date(NaN);var G=H.set(z,U,P);Array.isArray(G)?(z=G[0],assign(U,G[1])):z=G}}catch(K){B.e(K)}finally{B.f()}return z}function cleanEscapedString(t){return t.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,"'")}function startOfHour(t){requiredArgs(1,arguments);var e=toDate(t);return e.setMinutes(0,0,0),e}function startOfSecond(t){requiredArgs(1,arguments);var e=toDate(t);return e.setMilliseconds(0),e}function subDays(t,e){requiredArgs(2,arguments);var a=toInteger$2(e);return addDays(t,-a)}function parseISO(t,e){var a;requiredArgs(1,arguments);var n=toInteger$2((a=e==null?void 0:e.additionalDigits)!==null&&a!==void 0?a:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var r=splitDateString(t),i;if(r.date){var o=parseYear(r.date,n);i=parseDate$1(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s=i.getTime(),l=0,u;if(r.time&&(l=parseTime(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(u=parseTimezone(r.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(s+l),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return new Date(s+l+u)}var patterns={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},dateRegex=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,timeRegex=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,timezoneRegex=/^([+-])(\d{2})(?::?(\d{2}))?$/;function splitDateString(t){var e={},a=t.split(patterns.dateTimeDelimiter),n;if(a.length>2)return e;if(/:/.test(a[0])?n=a[0]:(e.date=a[0],n=a[1],patterns.timeZoneDelimiter.test(e.date)&&(e.date=t.split(patterns.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){var r=patterns.timezone.exec(n);r?(e.time=n.replace(r[1],""),e.timezone=r[1]):e.time=n}return e}function parseYear(t,e){var a=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(a);if(!n)return{year:NaN,restDateString:""};var r=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?r:i*100,restDateString:t.slice((n[1]||n[2]).length)}}function parseDate$1(t,e){if(e===null)return new Date(NaN);var a=t.match(dateRegex);if(!a)return new Date(NaN);var n=!!a[4],r=parseDateUnit(a[1]),i=parseDateUnit(a[2])-1,o=parseDateUnit(a[3]),s=parseDateUnit(a[4]),l=parseDateUnit(a[5])-1;if(n)return validateWeekDate(e,s,l)?dayOfISOWeekYear(e,s,l):new Date(NaN);var u=new Date(0);return!validateDate(e,i,o)||!validateDayOfYearDate(e,r)?new Date(NaN):(u.setUTCFullYear(e,i,Math.max(r,o)),u)}function parseDateUnit(t){return t?parseInt(t):1}function parseTime(t){var e=t.match(timeRegex);if(!e)return NaN;var a=parseTimeUnit(e[1]),n=parseTimeUnit(e[2]),r=parseTimeUnit(e[3]);return validateTime(a,n,r)?a*millisecondsInHour+n*millisecondsInMinute+r*1e3:NaN}function parseTimeUnit(t){return t&&parseFloat(t.replace(",","."))||0}function parseTimezone(t){if(t==="Z")return 0;var e=t.match(timezoneRegex);if(!e)return 0;var a=e[1]==="+"?-1:1,n=parseInt(e[2]),r=e[3]&&parseInt(e[3])||0;return validateTimezone(n,r)?a*(n*millisecondsInHour+r*millisecondsInMinute):NaN}function dayOfISOWeekYear(t,e,a){var n=new Date(0);n.setUTCFullYear(t,0,4);var r=n.getUTCDay()||7,i=(e-1)*7+a+1-r;return n.setUTCDate(n.getUTCDate()+i),n}var daysInMonths=[31,null,31,30,31,30,31,31,30,31,30,31];function isLeapYearIndex(t){return t%400===0||t%4===0&&t%100!==0}function validateDate(t,e,a){return e>=0&&e<=11&&a>=1&&a<=(daysInMonths[e]||(isLeapYearIndex(t)?29:28))}function validateDayOfYearDate(t,e){return e>=1&&e<=(isLeapYearIndex(t)?366:365)}function validateWeekDate(t,e,a){return e>=1&&e<=53&&a>=0&&a<=6}function validateTime(t,e,a){return t===24?e===0&&a===0:a>=0&&a<60&&e>=0&&e<60&&t>=0&&t<25}function validateTimezone(t,e){return e>=0&&e<=59}function subMonths(t,e){requiredArgs(2,arguments);var a=toInteger$2(e);return addMonths(t,-a)}function getViewRange(t,e){let a,n;switch(t){case"last365":a=startOfDay(subDays(e,365)),n=endOfDay(e);break;case"last90":a=startOfDay(subDays(e,90)),n=endOfDay(e);break;case"last30":a=startOfDay(subDays(e,30)),n=endOfDay(e);break;case"last7":a=startOfDay(subDays(e,7)),n=endOfDay(e);break;case"YTD":a=startOfYear(e),n=endOfDay(e);break;case"QTD":a=startOfQuarter(e),n=endOfDay(e);break;case"MTD":a=startOfMonth(e),n=endOfDay(e);break;case"1D":a=startOfDay(e),n=endOfDay(e);break;case"1W":a=startOfDay(startOfWeek(e,{weekStartsOn:1})),n=endOfDay(endOfWeek(e,{weekStartsOn:1}));break;case"1M":a=startOfDay(startOfMonth(e)),n=endOfDay(endOfMonth(e));break;case"3M":a=startOfDay(startOfQuarter(e)),n=endOfDay(endOfQuarter(e));break;case"6M":e.getMonth()<=5&&(a=new Date(e),a.setMonth(0),a.setDate(1),a=startOfDay(a),n=new Date(e),n.setMonth(5),n.setDate(30),n=endOfDay(a)),e.getMonth()>5&&(a=new Date(e),a.setMonth(6),a.setDate(1),a=startOfDay(a),n=new Date(e),n.setMonth(11),n.setDate(31),n=endOfDay(a));break;case"1Y":a=new Date(e),a.setMonth(0),a.setDate(1),a=startOfDay(a),n=new Date(e),n.setMonth(11),n.setDate(31),n=endOfDay(n);break}return{start:a,end:n}}store$1.addPlugin(observePlugin$1);window.bootstrapped=!1;window.store=store$1;getFreshVariable("lastActivity").then(t=>{const e=store$1.get("lastActivity");store$1.set("cacheValid",e===t),store$1.set("lastActivity",t),console.log("Server value: "+t),console.log("Local value: "+e),console.log("Cache valid: "+(e===t))}).then(()=>{Promise.all([getVariable("viewRange"),getVariable("darkMode"),getVariable("locale"),getVariable("language")]).then(t=>{if(!store$1.get("start")||!store$1.get("end")){const a=getViewRange(t[0],new Date);store$1.set("start",a.start),store$1.set("end",a.end)}window.__localeId__=t[2],store$1.set("language",t[3]),store$1.set("locale",t[3]);const e=new Event("firefly-iii-bootstrapped");document.dispatchEvent(e),window.bootstrapped=!0})});window.axios=axios$1;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";window.Alpine=module_default;function isSameUTCWeek(t,e,a){requiredArgs(2,arguments);var n=startOfUTCWeek(t,a),r=startOfUTCWeek(e,a);return n.getTime()===r.getTime()}var formatDistanceLocale$s={lessThanXSeconds:{one:"по-малко от секунда",other:"по-малко от {{count}} секунди"},xSeconds:{one:"1 секунда",other:"{{count}} секунди"},halfAMinute:"половин минута",lessThanXMinutes:{one:"по-малко от минута",other:"по-малко от {{count}} минути"},xMinutes:{one:"1 минута",other:"{{count}} минути"},aboutXHours:{one:"около час",other:"около {{count}} часа"},xHours:{one:"1 час",other:"{{count}} часа"},xDays:{one:"1 ден",other:"{{count}} дни"},aboutXWeeks:{one:"около седмица",other:"около {{count}} седмици"},xWeeks:{one:"1 седмица",other:"{{count}} седмици"},aboutXMonths:{one:"около месец",other:"около {{count}} месеца"},xMonths:{one:"1 месец",other:"{{count}} месеца"},aboutXYears:{one:"около година",other:"около {{count}} години"},xYears:{one:"1 година",other:"{{count}} години"},overXYears:{one:"над година",other:"над {{count}} години"},almostXYears:{one:"почти година",other:"почти {{count}} години"}},formatDistance$W=function t(e,a,n){var r,i=formatDistanceLocale$s[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"след "+r:"преди "+r:r};const formatDistance$X=formatDistance$W;var dateFormats$u={full:"EEEE, dd MMMM yyyy",long:"dd MMMM yyyy",medium:"dd MMM yyyy",short:"dd/MM/yyyy"},timeFormats$u={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"H:mm"},dateTimeFormats$u={any:"{{date}} {{time}}"},formatLong$Y={date:buildFormatLongFn({formats:dateFormats$u,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$u,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$u,defaultWidth:"any"})};const formatLong$Z=formatLong$Y;var weekdays$1=["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"];function lastWeek$1(t){var e=weekdays$1[t];switch(t){case 0:case 3:case 6:return"'миналата "+e+" в' p";case 1:case 2:case 4:case 5:return"'миналия "+e+" в' p"}}function thisWeek$4(t){var e=weekdays$1[t];return t===2?"'във "+e+" в' p":"'в "+e+" в' p"}function nextWeek$1(t){var e=weekdays$1[t];switch(t){case 0:case 3:case 6:return"'следващата "+e+" в' p";case 1:case 2:case 4:case 5:return"'следващия "+e+" в' p"}}var lastWeekFormatToken=function t(e,a,n){var r=toDate(e),i=r.getUTCDay();return isSameUTCWeek(r,a,n)?thisWeek$4(i):lastWeek$1(i)},nextWeekFormatToken=function t(e,a,n){var r=toDate(e),i=r.getUTCDay();return isSameUTCWeek(r,a,n)?thisWeek$4(i):nextWeek$1(i)},formatRelativeLocale$t={lastWeek:lastWeekFormatToken,yesterday:"'вчера в' p",today:"'днес в' p",tomorrow:"'утре в' p",nextWeek:nextWeekFormatToken,other:"P"},formatRelative$W=function t(e,a,n,r){var i=formatRelativeLocale$t[e];return typeof i=="function"?i(a,n,r):i};const formatRelative$X=formatRelative$W;var eraValues$t={narrow:["пр.н.е.","н.е."],abbreviated:["преди н. е.","н. е."],wide:["преди новата ера","новата ера"]},quarterValues$t={narrow:["1","2","3","4"],abbreviated:["1-во тримес.","2-ро тримес.","3-то тримес.","4-то тримес."],wide:["1-во тримесечие","2-ро тримесечие","3-то тримесечие","4-то тримесечие"]},monthValues$t={abbreviated:["яну","фев","мар","апр","май","юни","юли","авг","сеп","окт","ное","дек"],wide:["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември"]},dayValues$t={narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вто","сря","чет","пет","съб"],wide:["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"]},dayPeriodValues$t={wide:{am:"преди обяд",pm:"след обяд",midnight:"в полунощ",noon:"на обяд",morning:"сутринта",afternoon:"следобед",evening:"вечерта",night:"през нощта"}};function isFeminine(t){return t==="year"||t==="week"||t==="minute"||t==="second"}function isNeuter(t){return t==="quarter"}function numberWithSuffix(t,e,a,n,r){var i=isNeuter(e)?r:isFeminine(e)?n:a;return t+"-"+i}var ordinalNumber$t=function t(e,a){var n=Number(e),r=a==null?void 0:a.unit;if(n===0)return numberWithSuffix(0,r,"ев","ева","ево");if(n%1e3===0)return numberWithSuffix(n,r,"ен","на","но");if(n%100===0)return numberWithSuffix(n,r,"тен","тна","тно");var i=n%100;if(i>20||i<10)switch(i%10){case 1:return numberWithSuffix(n,r,"ви","ва","во");case 2:return numberWithSuffix(n,r,"ри","ра","ро");case 7:case 8:return numberWithSuffix(n,r,"ми","ма","мо")}return numberWithSuffix(n,r,"ти","та","то")},localize$W={ordinalNumber:ordinalNumber$t,era:buildLocalizeFn({values:eraValues$t,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$t,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$t,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$t,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$t,defaultWidth:"wide"})};const localize$X=localize$W;var matchOrdinalNumberPattern$t=/^(\d+)(-?[врмт][аи]|-?т?(ен|на)|-?(ев|ева))?/i,parseOrdinalNumberPattern$t=/\d+/i,matchEraPatterns$t={narrow:/^((пр)?н\.?\s?е\.?)/i,abbreviated:/^((пр)?н\.?\s?е\.?)/i,wide:/^(преди новата ера|новата ера|нова ера)/i},parseEraPatterns$t={any:[/^п/i,/^н/i]},matchQuarterPatterns$t={narrow:/^[1234]/i,abbreviated:/^[1234](-?[врт]?o?)? тримес.?/i,wide:/^[1234](-?[врт]?о?)? тримесечие/i},parseQuarterPatterns$t={any:[/1/i,/2/i,/3/i,/4/i]},matchDayPatterns$t={narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)/i,abbreviated:/^(нед|пон|вто|сря|чет|пет|съб)/i,wide:/^(неделя|понеделник|вторник|сряда|четвъртък|петък|събота)/i},parseDayPatterns$t={narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н[ед]/i,/^п[он]/i,/^вт/i,/^ср/i,/^ч[ет]/i,/^п[ет]/i,/^с[ъб]/i]},matchMonthPatterns$t={abbreviated:/^(яну|фев|мар|апр|май|юни|юли|авг|сеп|окт|ное|дек)/i,wide:/^(януари|февруари|март|април|май|юни|юли|август|септември|октомври|ноември|декември)/i},parseMonthPatterns$t={any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^май/i,/^юн/i,/^юл/i,/^ав/i,/^се/i,/^окт/i,/^но/i,/^де/i]},matchDayPeriodPatterns$t={any:/^(преди о|след о|в по|на о|през|веч|сут|следо)/i},parseDayPeriodPatterns$t={any:{am:/^преди о/i,pm:/^след о/i,midnight:/^в пол/i,noon:/^на об/i,morning:/^сут/i,afternoon:/^следо/i,evening:/^веч/i,night:/^през н/i}},match$W={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$t,parsePattern:parseOrdinalNumberPattern$t,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$t,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$t,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$t,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$t,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$t,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$t,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$t,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$t,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$t,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$t,defaultParseWidth:"any"})};const match$X=match$W;var locale$u={code:"bg",formatDistance:formatDistance$X,formatLong:formatLong$Z,formatRelative:formatRelative$X,localize:localize$X,match:match$X,options:{weekStartsOn:1,firstWeekContainsDate:1}};const bg=locale$u;var formatDistanceLocale$r={lessThanXSeconds:{one:"menys d'un segon",eleven:"menys d'onze segons",other:"menys de {{count}} segons"},xSeconds:{one:"1 segon",other:"{{count}} segons"},halfAMinute:"mig minut",lessThanXMinutes:{one:"menys d'un minut",eleven:"menys d'onze minuts",other:"menys de {{count}} minuts"},xMinutes:{one:"1 minut",other:"{{count}} minuts"},aboutXHours:{one:"aproximadament una hora",other:"aproximadament {{count}} hores"},xHours:{one:"1 hora",other:"{{count}} hores"},xDays:{one:"1 dia",other:"{{count}} dies"},aboutXWeeks:{one:"aproximadament una setmana",other:"aproximadament {{count}} setmanes"},xWeeks:{one:"1 setmana",other:"{{count}} setmanes"},aboutXMonths:{one:"aproximadament un mes",other:"aproximadament {{count}} mesos"},xMonths:{one:"1 mes",other:"{{count}} mesos"},aboutXYears:{one:"aproximadament un any",other:"aproximadament {{count}} anys"},xYears:{one:"1 any",other:"{{count}} anys"},overXYears:{one:"més d'un any",eleven:"més d'onze anys",other:"més de {{count}} anys"},almostXYears:{one:"gairebé un any",other:"gairebé {{count}} anys"}},formatDistance$U=function t(e,a,n){var r,i=formatDistanceLocale$r[e];return typeof i=="string"?r=i:a===1?r=i.one:a===11&&i.eleven?r=i.eleven:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"en "+r:"fa "+r:r};const formatDistance$V=formatDistance$U;var dateFormats$t={full:"EEEE, d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},timeFormats$t={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$t={full:"{{date}} 'a les' {{time}}",long:"{{date}} 'a les' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$W={date:buildFormatLongFn({formats:dateFormats$t,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$t,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$t,defaultWidth:"full"})};const formatLong$X=formatLong$W;var formatRelativeLocale$s={lastWeek:"'el' eeee 'passat a la' LT",yesterday:"'ahir a la' p",today:"'avui a la' p",tomorrow:"'demà a la' p",nextWeek:"eeee 'a la' p",other:"P"},formatRelativeLocalePlural$1={lastWeek:"'el' eeee 'passat a les' p",yesterday:"'ahir a les' p",today:"'avui a les' p",tomorrow:"'demà a les' p",nextWeek:"eeee 'a les' p",other:"P"},formatRelative$U=function t(e,a,n,r){return a.getUTCHours()!==1?formatRelativeLocalePlural$1[e]:formatRelativeLocale$s[e]};const formatRelative$V=formatRelative$U;var eraValues$s={narrow:["aC","dC"],abbreviated:["a. de C.","d. de C."],wide:["abans de Crist","després de Crist"]},quarterValues$s={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1r trimestre","2n trimestre","3r trimestre","4t trimestre"]},monthValues$s={narrow:["GN","FB","MÇ","AB","MG","JN","JL","AG","ST","OC","NV","DS"],abbreviated:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des."],wide:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"]},dayValues$s={narrow:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],short:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],abbreviated:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],wide:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"]},dayPeriodValues$s={narrow:{am:"am",pm:"pm",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"}},formattingDayPeriodValues$k={narrow:{am:"am",pm:"pm",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},abbreviated:{am:"AM",pm:"PM",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"}},ordinalNumber$s=function t(e,a){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"r";case 2:return n+"n";case 3:return n+"r";case 4:return n+"t"}return n+"è"},localize$U={ordinalNumber:ordinalNumber$s,era:buildLocalizeFn({values:eraValues$s,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$s,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$s,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$s,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$s,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$k,defaultFormattingWidth:"wide"})};const localize$V=localize$U;var matchOrdinalNumberPattern$s=/^(\d+)(è|r|n|r|t)?/i,parseOrdinalNumberPattern$s=/\d+/i,matchEraPatterns$s={narrow:/^(aC|dC)/i,abbreviated:/^(a. de C.|d. de C.)/i,wide:/^(abans de Crist|despr[eé]s de Crist)/i},parseEraPatterns$s={narrow:[/^aC/i,/^dC/i],abbreviated:[/^(a. de C.)/i,/^(d. de C.)/i],wide:[/^(abans de Crist)/i,/^(despr[eé]s de Crist)/i]},matchQuarterPatterns$s={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](è|r|n|r|t)? trimestre/i},parseQuarterPatterns$s={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$s={narrow:/^(GN|FB|MÇ|AB|MG|JN|JL|AG|ST|OC|NV|DS)/i,abbreviated:/^(gen.|febr.|març|abr.|maig|juny|jul.|ag.|set.|oct.|nov.|des.)/i,wide:/^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i},parseMonthPatterns$s={narrow:[/^GN/i,/^FB/i,/^MÇ/i,/^AB/i,/^MG/i,/^JN/i,/^JL/i,/^AG/i,/^ST/i,/^OC/i,/^NV/i,/^DS/i],abbreviated:[/^gen./i,/^febr./i,/^març/i,/^abr./i,/^maig/i,/^juny/i,/^jul./i,/^ag./i,/^set./i,/^oct./i,/^nov./i,/^des./i],wide:[/^gener/i,/^febrer/i,/^març/i,/^abril/i,/^maig/i,/^juny/i,/^juliol/i,/^agost/i,/^setembre/i,/^octubre/i,/^novembre/i,/^desembre/i]},matchDayPatterns$s={narrow:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,short:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,abbreviated:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,wide:/^(diumenge|dilluns|dimarts|dimecres|dijous|divendres|dissabte)/i},parseDayPatterns$s={narrow:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],abbreviated:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],wide:[/^diumenge/i,/^dilluns/i,/^dimarts/i,/^dimecres/i,/^dijous/i,/^divendres/i,/^disssabte/i]},matchDayPeriodPatterns$s={narrow:/^(a|p|mn|md|(del|de la) (matí|tarda|vespre|nit))/i,abbreviated:/^([ap]\.?\s?m\.?|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,wide:/^(ante meridiem|post meridiem|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i},parseDayPeriodPatterns$s={any:{am:/^a/i,pm:/^p/i,midnight:/^mitjanit/i,noon:/^migdia/i,morning:/matí/i,afternoon:/tarda/i,evening:/vespre/i,night:/nit/i}},match$U={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$s,parsePattern:parseOrdinalNumberPattern$s,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$s,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$s,defaultParseWidth:"wide"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$s,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$s,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$s,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$s,defaultParseWidth:"wide"}),day:buildMatchFn({matchPatterns:matchDayPatterns$s,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$s,defaultParseWidth:"wide"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$s,defaultMatchWidth:"wide",parsePatterns:parseDayPeriodPatterns$s,defaultParseWidth:"any"})};const match$V=match$U;var locale$t={code:"ca",formatDistance:formatDistance$V,formatLong:formatLong$X,formatRelative:formatRelative$V,localize:localize$V,match:match$V,options:{weekStartsOn:1,firstWeekContainsDate:4}};const ca=locale$t;var formatDistanceLocale$q={lessThanXSeconds:{one:{regular:"méně než sekunda",past:"před méně než sekundou",future:"za méně než sekundu"},few:{regular:"méně než {{count}} sekundy",past:"před méně než {{count}} sekundami",future:"za méně než {{count}} sekundy"},many:{regular:"méně než {{count}} sekund",past:"před méně než {{count}} sekundami",future:"za méně než {{count}} sekund"}},xSeconds:{one:{regular:"sekunda",past:"před sekundou",future:"za sekundu"},few:{regular:"{{count}} sekundy",past:"před {{count}} sekundami",future:"za {{count}} sekundy"},many:{regular:"{{count}} sekund",past:"před {{count}} sekundami",future:"za {{count}} sekund"}},halfAMinute:{type:"other",other:{regular:"půl minuty",past:"před půl minutou",future:"za půl minuty"}},lessThanXMinutes:{one:{regular:"méně než minuta",past:"před méně než minutou",future:"za méně než minutu"},few:{regular:"méně než {{count}} minuty",past:"před méně než {{count}} minutami",future:"za méně než {{count}} minuty"},many:{regular:"méně než {{count}} minut",past:"před méně než {{count}} minutami",future:"za méně než {{count}} minut"}},xMinutes:{one:{regular:"minuta",past:"před minutou",future:"za minutu"},few:{regular:"{{count}} minuty",past:"před {{count}} minutami",future:"za {{count}} minuty"},many:{regular:"{{count}} minut",past:"před {{count}} minutami",future:"za {{count}} minut"}},aboutXHours:{one:{regular:"přibližně hodina",past:"přibližně před hodinou",future:"přibližně za hodinu"},few:{regular:"přibližně {{count}} hodiny",past:"přibližně před {{count}} hodinami",future:"přibližně za {{count}} hodiny"},many:{regular:"přibližně {{count}} hodin",past:"přibližně před {{count}} hodinami",future:"přibližně za {{count}} hodin"}},xHours:{one:{regular:"hodina",past:"před hodinou",future:"za hodinu"},few:{regular:"{{count}} hodiny",past:"před {{count}} hodinami",future:"za {{count}} hodiny"},many:{regular:"{{count}} hodin",past:"před {{count}} hodinami",future:"za {{count}} hodin"}},xDays:{one:{regular:"den",past:"před dnem",future:"za den"},few:{regular:"{{count}} dny",past:"před {{count}} dny",future:"za {{count}} dny"},many:{regular:"{{count}} dní",past:"před {{count}} dny",future:"za {{count}} dní"}},aboutXWeeks:{one:{regular:"přibližně týden",past:"přibližně před týdnem",future:"přibližně za týden"},few:{regular:"přibližně {{count}} týdny",past:"přibližně před {{count}} týdny",future:"přibližně za {{count}} týdny"},many:{regular:"přibližně {{count}} týdnů",past:"přibližně před {{count}} týdny",future:"přibližně za {{count}} týdnů"}},xWeeks:{one:{regular:"týden",past:"před týdnem",future:"za týden"},few:{regular:"{{count}} týdny",past:"před {{count}} týdny",future:"za {{count}} týdny"},many:{regular:"{{count}} týdnů",past:"před {{count}} týdny",future:"za {{count}} týdnů"}},aboutXMonths:{one:{regular:"přibližně měsíc",past:"přibližně před měsícem",future:"přibližně za měsíc"},few:{regular:"přibližně {{count}} měsíce",past:"přibližně před {{count}} měsíci",future:"přibližně za {{count}} měsíce"},many:{regular:"přibližně {{count}} měsíců",past:"přibližně před {{count}} měsíci",future:"přibližně za {{count}} měsíců"}},xMonths:{one:{regular:"měsíc",past:"před měsícem",future:"za měsíc"},few:{regular:"{{count}} měsíce",past:"před {{count}} měsíci",future:"za {{count}} měsíce"},many:{regular:"{{count}} měsíců",past:"před {{count}} měsíci",future:"za {{count}} měsíců"}},aboutXYears:{one:{regular:"přibližně rok",past:"přibližně před rokem",future:"přibližně za rok"},few:{regular:"přibližně {{count}} roky",past:"přibližně před {{count}} roky",future:"přibližně za {{count}} roky"},many:{regular:"přibližně {{count}} roků",past:"přibližně před {{count}} roky",future:"přibližně za {{count}} roků"}},xYears:{one:{regular:"rok",past:"před rokem",future:"za rok"},few:{regular:"{{count}} roky",past:"před {{count}} roky",future:"za {{count}} roky"},many:{regular:"{{count}} roků",past:"před {{count}} roky",future:"za {{count}} roků"}},overXYears:{one:{regular:"více než rok",past:"před více než rokem",future:"za více než rok"},few:{regular:"více než {{count}} roky",past:"před více než {{count}} roky",future:"za více než {{count}} roky"},many:{regular:"více než {{count}} roků",past:"před více než {{count}} roky",future:"za více než {{count}} roků"}},almostXYears:{one:{regular:"skoro rok",past:"skoro před rokem",future:"skoro za rok"},few:{regular:"skoro {{count}} roky",past:"skoro před {{count}} roky",future:"skoro za {{count}} roky"},many:{regular:"skoro {{count}} roků",past:"skoro před {{count}} roky",future:"skoro za {{count}} roků"}}},formatDistance$S=function t(e,a,n){var r,i=formatDistanceLocale$q[e];i.type==="other"?r=i.other:a===1?r=i.one:a>1&&a<5?r=i.few:r=i.many;var o=(n==null?void 0:n.addSuffix)===!0,s=n==null?void 0:n.comparison,l;return o&&s===-1?l=r.past:o&&s===1?l=r.future:l=r.regular,l.replace("{{count}}",String(a))};const formatDistance$T=formatDistance$S;var dateFormats$s={full:"EEEE, d. MMMM yyyy",long:"d. MMMM yyyy",medium:"d. M. yyyy",short:"dd.MM.yyyy"},timeFormats$s={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},dateTimeFormats$s={full:"{{date}} 'v' {{time}}",long:"{{date}} 'v' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$U={date:buildFormatLongFn({formats:dateFormats$s,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$s,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$s,defaultWidth:"full"})};const formatLong$V=formatLong$U;var accusativeWeekdays$4=["neděli","pondělí","úterý","středu","čtvrtek","pátek","sobotu"],formatRelativeLocale$r={lastWeek:"'poslední' eeee 've' p",yesterday:"'včera v' p",today:"'dnes v' p",tomorrow:"'zítra v' p",nextWeek:function t(e){var a=e.getUTCDay();return"'v "+accusativeWeekdays$4[a]+" o' p"},other:"P"},formatRelative$S=function t(e,a){var n=formatRelativeLocale$r[e];return typeof n=="function"?n(a):n};const formatRelative$T=formatRelative$S;var eraValues$r={narrow:["př. n. l.","n. l."],abbreviated:["př. n. l.","n. l."],wide:["před naším letopočtem","našeho letopočtu"]},quarterValues$r={narrow:["1","2","3","4"],abbreviated:["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"],wide:["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"]},monthValues$r={narrow:["L","Ú","B","D","K","Č","Č","S","Z","Ř","L","P"],abbreviated:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],wide:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"]},formattingMonthValues$7={narrow:["L","Ú","B","D","K","Č","Č","S","Z","Ř","L","P"],abbreviated:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],wide:["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"]},dayValues$r={narrow:["ne","po","út","st","čt","pá","so"],short:["ne","po","út","st","čt","pá","so"],abbreviated:["ned","pon","úte","stř","čtv","pát","sob"],wide:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"]},dayPeriodValues$r={narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"}},formattingDayPeriodValues$j={narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"}},ordinalNumber$r=function t(e,a){var n=Number(e);return n+"."},localize$S={ordinalNumber:ordinalNumber$r,era:buildLocalizeFn({values:eraValues$r,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$r,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$r,defaultWidth:"wide",formattingValues:formattingMonthValues$7,defaultFormattingWidth:"wide"}),day:buildLocalizeFn({values:dayValues$r,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$r,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$j,defaultFormattingWidth:"wide"})};const localize$T=localize$S;var matchOrdinalNumberPattern$r=/^(\d+)\.?/i,parseOrdinalNumberPattern$r=/\d+/i,matchEraPatterns$r={narrow:/^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,abbreviated:/^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,wide:/^(p[řr](\.|ed) Kristem|p[řr](\.|ed) na[šs][íi]m letopo[čc]tem|po Kristu|na[šs]eho letopo[čc]tu)/i},parseEraPatterns$r={any:[/^p[řr]/i,/^(po|n)/i]},matchQuarterPatterns$r={narrow:/^[1234]/i,abbreviated:/^[1234]\. [čc]tvrtlet[íi]/i,wide:/^[1234]\. [čc]tvrtlet[íi]/i},parseQuarterPatterns$r={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$r={narrow:/^[lúubdkčcszřrlp]/i,abbreviated:/^(led|[úu]no|b[řr]e|dub|kv[ěe]|[čc]vn|[čc]vc|srp|z[áa][řr]|[řr][íi]j|lis|pro)/i,wide:/^(leden|ledna|[úu]nora?|b[řr]ezen|b[řr]ezna|duben|dubna|kv[ěe]ten|kv[ěe]tna|[čc]erven(ec|ce)?|[čc]ervna|srpen|srpna|z[áa][řr][íi]|[řr][íi]jen|[řr][íi]jna|listopad(a|u)?|prosinec|prosince)/i},parseMonthPatterns$r={narrow:[/^l/i,/^[úu]/i,/^b/i,/^d/i,/^k/i,/^[čc]/i,/^[čc]/i,/^s/i,/^z/i,/^[řr]/i,/^l/i,/^p/i],any:[/^led/i,/^[úu]n/i,/^b[řr]e/i,/^dub/i,/^kv[ěe]/i,/^[čc]vn|[čc]erven(?!\w)|[čc]ervna/i,/^[čc]vc|[čc]erven(ec|ce)/i,/^srp/i,/^z[áa][řr]/i,/^[řr][íi]j/i,/^lis/i,/^pro/i]},matchDayPatterns$r={narrow:/^[npuúsčps]/i,short:/^(ne|po|[úu]t|st|[čc]t|p[áa]|so)/i,abbreviated:/^(ned|pon|[úu]te|st[rř]|[čc]tv|p[áa]t|sob)/i,wide:/^(ned[ěe]le|pond[ěe]l[íi]|[úu]ter[ýy]|st[řr]eda|[čc]tvrtek|p[áa]tek|sobota)/i},parseDayPatterns$r={narrow:[/^n/i,/^p/i,/^[úu]/i,/^s/i,/^[čc]/i,/^p/i,/^s/i],any:[/^ne/i,/^po/i,/^[úu]t/i,/^st/i,/^[čc]t/i,/^p[áa]/i,/^so/i]},matchDayPeriodPatterns$r={any:/^dopoledne|dop\.?|odpoledne|odp\.?|p[ůu]lnoc|poledne|r[áa]no|odpoledne|ve[čc]er|(v )?noci?/i},parseDayPeriodPatterns$r={any:{am:/^dop/i,pm:/^odp/i,midnight:/^p[ůu]lnoc/i,noon:/^poledne/i,morning:/r[áa]no/i,afternoon:/odpoledne/i,evening:/ve[čc]er/i,night:/noc/i}},match$S={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$r,parsePattern:parseOrdinalNumberPattern$r,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$r,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$r,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$r,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$r,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$r,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$r,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$r,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$r,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$r,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$r,defaultParseWidth:"any"})};const match$T=match$S;var locale$s={code:"cs",formatDistance:formatDistance$T,formatLong:formatLong$V,formatRelative:formatRelative$T,localize:localize$T,match:match$T,options:{weekStartsOn:1,firstWeekContainsDate:4}};const cs=locale$s;var formatDistanceLocale$p={lessThanXSeconds:{one:"mindre end ét sekund",other:"mindre end {{count}} sekunder"},xSeconds:{one:"1 sekund",other:"{{count}} sekunder"},halfAMinute:"ét halvt minut",lessThanXMinutes:{one:"mindre end ét minut",other:"mindre end {{count}} minutter"},xMinutes:{one:"1 minut",other:"{{count}} minutter"},aboutXHours:{one:"cirka 1 time",other:"cirka {{count}} timer"},xHours:{one:"1 time",other:"{{count}} timer"},xDays:{one:"1 dag",other:"{{count}} dage"},aboutXWeeks:{one:"cirka 1 uge",other:"cirka {{count}} uger"},xWeeks:{one:"1 uge",other:"{{count}} uger"},aboutXMonths:{one:"cirka 1 måned",other:"cirka {{count}} måneder"},xMonths:{one:"1 måned",other:"{{count}} måneder"},aboutXYears:{one:"cirka 1 år",other:"cirka {{count}} år"},xYears:{one:"1 år",other:"{{count}} år"},overXYears:{one:"over 1 år",other:"over {{count}} år"},almostXYears:{one:"næsten 1 år",other:"næsten {{count}} år"}},formatDistance$Q=function t(e,a,n){var r,i=formatDistanceLocale$p[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"om "+r:r+" siden":r};const formatDistance$R=formatDistance$Q;var dateFormats$r={full:"EEEE 'den' d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd/MM/y"},timeFormats$r={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$r={full:"{{date}} 'kl'. {{time}}",long:"{{date}} 'kl'. {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$S={date:buildFormatLongFn({formats:dateFormats$r,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$r,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$r,defaultWidth:"full"})};const formatLong$T=formatLong$S;var formatRelativeLocale$q={lastWeek:"'sidste' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"'på' eeee 'kl.' p",other:"P"},formatRelative$Q=function t(e,a,n,r){return formatRelativeLocale$q[e]};const formatRelative$R=formatRelative$Q;var eraValues$q={narrow:["fvt","vt"],abbreviated:["f.v.t.","v.t."],wide:["før vesterlandsk tidsregning","vesterlandsk tidsregning"]},quarterValues$q={narrow:["1","2","3","4"],abbreviated:["1. kvt.","2. kvt.","3. kvt.","4. kvt."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},monthValues$q={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},dayValues$q={narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn.","man.","tir.","ons.","tor.","fre.","lør."],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},dayPeriodValues$q={narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"}},formattingDayPeriodValues$i={narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"}},ordinalNumber$q=function t(e,a){var n=Number(e);return n+"."},localize$Q={ordinalNumber:ordinalNumber$q,era:buildLocalizeFn({values:eraValues$q,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$q,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$q,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$q,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$q,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$i,defaultFormattingWidth:"wide"})};const localize$R=localize$Q;var matchOrdinalNumberPattern$q=/^(\d+)(\.)?/i,parseOrdinalNumberPattern$q=/\d+/i,matchEraPatterns$q={narrow:/^(fKr|fvt|eKr|vt)/i,abbreviated:/^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,wide:/^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i},parseEraPatterns$q={any:[/^f/i,/^(v|e)/i]},matchQuarterPatterns$q={narrow:/^[1234]/i,abbreviated:/^[1234]. kvt\./i,wide:/^[1234]\.? kvartal/i},parseQuarterPatterns$q={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$q={narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i},parseMonthPatterns$q={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$q={narrow:/^[smtofl]/i,short:/^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},parseDayPatterns$q={narrow:[/^s/i,/^m/i,/^t/i,/^o/i,/^t/i,/^f/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},matchDayPeriodPatterns$q={narrow:/^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,any:/^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i},parseDayPeriodPatterns$q={any:{am:/^a/i,pm:/^p/i,midnight:/midnat/i,noon:/middag/i,morning:/morgen/i,afternoon:/eftermiddag/i,evening:/aften/i,night:/nat/i}},match$Q={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$q,parsePattern:parseOrdinalNumberPattern$q,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$q,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$q,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$q,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$q,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$q,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$q,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$q,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$q,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$q,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$q,defaultParseWidth:"any"})};const match$R=match$Q;var locale$r={code:"da",formatDistance:formatDistance$R,formatLong:formatLong$T,formatRelative:formatRelative$R,localize:localize$R,match:match$R,options:{weekStartsOn:1,firstWeekContainsDate:4}};const da=locale$r;var formatDistanceLocale$o={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"halbe Minute",withPreposition:"halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},formatDistance$O=function t(e,a,n){var r,i=n!=null&&n.addSuffix?formatDistanceLocale$o[e].withPreposition:formatDistanceLocale$o[e].standalone;return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:"vor "+r:r};const formatDistance$P=formatDistance$O;var dateFormats$q={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},timeFormats$q={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$q={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$Q={date:buildFormatLongFn({formats:dateFormats$q,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$q,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$q,defaultWidth:"full"})};const formatLong$R=formatLong$Q;var formatRelativeLocale$p={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},formatRelative$O=function t(e,a,n,r){return formatRelativeLocale$p[e]};const formatRelative$P=formatRelative$O;var eraValues$p={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},quarterValues$p={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},monthValues$p={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},formattingMonthValues$6={narrow:monthValues$p.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:monthValues$p.wide},dayValues$p={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},dayPeriodValues$p={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},formattingDayPeriodValues$h={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},ordinalNumber$p=function t(e){var a=Number(e);return a+"."},localize$O={ordinalNumber:ordinalNumber$p,era:buildLocalizeFn({values:eraValues$p,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$p,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$p,formattingValues:formattingMonthValues$6,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$p,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$p,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$h,defaultFormattingWidth:"wide"})};const localize$P=localize$O;var matchOrdinalNumberPattern$p=/^(\d+)(\.)?/i,parseOrdinalNumberPattern$p=/\d+/i,matchEraPatterns$p={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},parseEraPatterns$p={any:[/^v/i,/^n/i]},matchQuarterPatterns$p={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},parseQuarterPatterns$p={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$p={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},parseMonthPatterns$p={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$p={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},parseDayPatterns$p={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},matchDayPeriodPatterns$p={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},parseDayPeriodPatterns$p={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},match$O={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$p,parsePattern:parseOrdinalNumberPattern$p,valueCallback:function t(e){return parseInt(e)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$p,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$p,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$p,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$p,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$p,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$p,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$p,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$p,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$p,defaultMatchWidth:"wide",parsePatterns:parseDayPeriodPatterns$p,defaultParseWidth:"any"})};const match$P=match$O;var locale$q={code:"de",formatDistance:formatDistance$P,formatLong:formatLong$R,formatRelative:formatRelative$P,localize:localize$P,match:match$P,options:{weekStartsOn:1,firstWeekContainsDate:4}};const de=locale$q;var formatDistanceLocale$n={lessThanXSeconds:{one:"λιγότερο από ένα δευτερόλεπτο",other:"λιγότερο από {{count}} δευτερόλεπτα"},xSeconds:{one:"1 δευτερόλεπτο",other:"{{count}} δευτερόλεπτα"},halfAMinute:"μισό λεπτό",lessThanXMinutes:{one:"λιγότερο από ένα λεπτό",other:"λιγότερο από {{count}} λεπτά"},xMinutes:{one:"1 λεπτό",other:"{{count}} λεπτά"},aboutXHours:{one:"περίπου 1 ώρα",other:"περίπου {{count}} ώρες"},xHours:{one:"1 ώρα",other:"{{count}} ώρες"},xDays:{one:"1 ημέρα",other:"{{count}} ημέρες"},aboutXWeeks:{one:"περίπου 1 εβδομάδα",other:"περίπου {{count}} εβδομάδες"},xWeeks:{one:"1 εβδομάδα",other:"{{count}} εβδομάδες"},aboutXMonths:{one:"περίπου 1 μήνας",other:"περίπου {{count}} μήνες"},xMonths:{one:"1 μήνας",other:"{{count}} μήνες"},aboutXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"},xYears:{one:"1 χρόνο",other:"{{count}} χρόνια"},overXYears:{one:"πάνω από 1 χρόνο",other:"πάνω από {{count}} χρόνια"},almostXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"}},formatDistance$M=function t(e,a,n){var r,i=formatDistanceLocale$n[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"σε "+r:r+" πριν":r};const formatDistance$N=formatDistance$M;var dateFormats$p={full:"EEEE, d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"d/M/yy"},timeFormats$p={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats$p={full:"{{date}} - {{time}}",long:"{{date}} - {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$O={date:buildFormatLongFn({formats:dateFormats$p,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$p,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$p,defaultWidth:"full"})};const formatLong$P=formatLong$O;var formatRelativeLocale$o={lastWeek:function t(e){switch(e.getUTCDay()){case 6:return"'το προηγούμενο' eeee 'στις' p";default:return"'την προηγούμενη' eeee 'στις' p"}},yesterday:"'χθες στις' p",today:"'σήμερα στις' p",tomorrow:"'αύριο στις' p",nextWeek:"eeee 'στις' p",other:"P"},formatRelative$M=function t(e,a){var n=formatRelativeLocale$o[e];return typeof n=="function"?n(a):n};const formatRelative$N=formatRelative$M;var eraValues$o={narrow:["πΧ","μΧ"],abbreviated:["π.Χ.","μ.Χ."],wide:["προ Χριστού","μετά Χριστόν"]},quarterValues$o={narrow:["1","2","3","4"],abbreviated:["Τ1","Τ2","Τ3","Τ4"],wide:["1ο τρίμηνο","2ο τρίμηνο","3ο τρίμηνο","4ο τρίμηνο"]},monthValues$o={narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],wide:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},formattingMonthValues$5={narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],wide:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},dayValues$o={narrow:["Κ","Δ","T","Τ","Π","Π","Σ"],short:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],abbreviated:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"],wide:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},dayPeriodValues$o={narrow:{am:"πμ",pm:"μμ",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},abbreviated:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},wide:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"}},ordinalNumber$o=function t(e,a){var n=Number(e),r=a==null?void 0:a.unit,i;return r==="year"||r==="month"?i="ος":r==="week"||r==="dayOfYear"||r==="day"||r==="hour"||r==="date"?i="η":i="ο",n+i},localize$M={ordinalNumber:ordinalNumber$o,era:buildLocalizeFn({values:eraValues$o,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$o,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$o,defaultWidth:"wide",formattingValues:formattingMonthValues$5,defaultFormattingWidth:"wide"}),day:buildLocalizeFn({values:dayValues$o,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$o,defaultWidth:"wide"})};const localize$N=localize$M;var matchOrdinalNumberPattern$o=/^(\d+)(ος|η|ο)?/i,parseOrdinalNumberPattern$o=/\d+/i,matchEraPatterns$o={narrow:/^(πΧ|μΧ)/i,abbreviated:/^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,wide:/^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i},parseEraPatterns$o={any:[/^π/i,/^(μ|κ)/i]},matchQuarterPatterns$o={narrow:/^[1234]/i,abbreviated:/^τ[1234]/i,wide:/^[1234]ο? τρ(ί|ι)μηνο/i},parseQuarterPatterns$o={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$o={narrow:/^[ιφμαμιιασονδ]/i,abbreviated:/^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,wide:/^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i},parseMonthPatterns$o={narrow:[/^ι/i,/^φ/i,/^μ/i,/^α/i,/^μ/i,/^ι/i,/^ι/i,/^α/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i],any:[/^ια/i,/^φ/i,/^μ[άα]ρ/i,/^απ/i,/^μ[άα][ιΐ]/i,/^ιο[ύυ]ν/i,/^ιο[ύυ]λ/i,/^α[ύυ]/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i]},matchDayPatterns$o={narrow:/^[κδτπσ]/i,short:/^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,abbreviated:/^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,wide:/^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i},parseDayPatterns$o={narrow:[/^κ/i,/^δ/i,/^τ/i,/^τ/i,/^π/i,/^π/i,/^σ/i],any:[/^κ/i,/^δ/i,/^τρ/i,/^τε/i,/^π[εέ]/i,/^π[αά]/i,/^σ/i]},matchDayPeriodPatterns$o={narrow:/^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,any:/^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i},parseDayPeriodPatterns$o={any:{am:/^πμ|π\.\s?μ\./i,pm:/^μμ|μ\.\s?μ\./i,midnight:/^μεσάν/i,noon:/^μεσημ(έ|ε)/i,morning:/πρω(ί|ι)/i,afternoon:/απ(ό|ο)γευμα/i,evening:/βρ(ά|α)δυ/i,night:/ν(ύ|υ)χτα/i}},match$M={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$o,parsePattern:parseOrdinalNumberPattern$o,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$o,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$o,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$o,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$o,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$o,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$o,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$o,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$o,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$o,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$o,defaultParseWidth:"any"})};const match$N=match$M;var locale$p={code:"el",formatDistance:formatDistance$N,formatLong:formatLong$P,formatRelative:formatRelative$N,localize:localize$N,match:match$N,options:{weekStartsOn:1,firstWeekContainsDate:4}};const el=locale$p;var dateFormats$o={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},timeFormats$o={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$o={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$M={date:buildFormatLongFn({formats:dateFormats$o,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$o,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$o,defaultWidth:"full"})};const formatLong$N=formatLong$M;var locale$o={code:"en-GB",formatDistance:formatDistance$Z,formatLong:formatLong$N,formatRelative:formatRelative$Z,localize:localize$Z,match:match$Z,options:{weekStartsOn:1,firstWeekContainsDate:4}};const enGB=locale$o;var formatDistanceLocale$m={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},formatDistance$K=function t(e,a,n){var r,i=formatDistanceLocale$m[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r};const formatDistance$L=formatDistance$K;var dateFormats$n={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},timeFormats$n={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$n={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$K={date:buildFormatLongFn({formats:dateFormats$n,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$n,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$n,defaultWidth:"full"})};const formatLong$L=formatLong$K;var formatRelativeLocale$n={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},formatRelativeLocalePlural={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},formatRelative$K=function t(e,a,n,r){return a.getUTCHours()!==1?formatRelativeLocalePlural[e]:formatRelativeLocale$n[e]};const formatRelative$L=formatRelative$K;var eraValues$n={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},quarterValues$n={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},monthValues$n={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},dayValues$n={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},dayPeriodValues$n={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},formattingDayPeriodValues$g={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},ordinalNumber$n=function t(e,a){var n=Number(e);return n+"º"},localize$K={ordinalNumber:ordinalNumber$n,era:buildLocalizeFn({values:eraValues$n,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$n,defaultWidth:"wide",argumentCallback:function t(e){return Number(e)-1}}),month:buildLocalizeFn({values:monthValues$n,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$n,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$n,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$g,defaultFormattingWidth:"wide"})};const localize$L=localize$K;var matchOrdinalNumberPattern$n=/^(\d+)(º)?/i,parseOrdinalNumberPattern$n=/\d+/i,matchEraPatterns$n={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},parseEraPatterns$n={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},matchQuarterPatterns$n={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},parseQuarterPatterns$n={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$n={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},parseMonthPatterns$n={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},matchDayPatterns$n={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},parseDayPatterns$n={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},matchDayPeriodPatterns$n={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},parseDayPeriodPatterns$n={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},match$K={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$n,parsePattern:parseOrdinalNumberPattern$n,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$n,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$n,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$n,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$n,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$n,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$n,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$n,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$n,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$n,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$n,defaultParseWidth:"any"})};const match$L=match$K;var locale$n={code:"es",formatDistance:formatDistance$L,formatLong:formatLong$L,formatRelative:formatRelative$L,localize:localize$L,match:match$L,options:{weekStartsOn:1,firstWeekContainsDate:1}};const es=locale$n;function futureSeconds(t){return t.replace(/sekuntia?/,"sekunnin")}function futureMinutes(t){return t.replace(/minuuttia?/,"minuutin")}function futureHours(t){return t.replace(/tuntia?/,"tunnin")}function futureDays(t){return t.replace(/päivää?/,"päivän")}function futureWeeks(t){return t.replace(/(viikko|viikkoa)/,"viikon")}function futureMonths(t){return t.replace(/(kuukausi|kuukautta)/,"kuukauden")}function futureYears(t){return t.replace(/(vuosi|vuotta)/,"vuoden")}var formatDistanceLocale$l={lessThanXSeconds:{one:"alle sekunti",other:"alle {{count}} sekuntia",futureTense:futureSeconds},xSeconds:{one:"sekunti",other:"{{count}} sekuntia",futureTense:futureSeconds},halfAMinute:{one:"puoli minuuttia",other:"puoli minuuttia",futureTense:function t(e){return"puolen minuutin"}},lessThanXMinutes:{one:"alle minuutti",other:"alle {{count}} minuuttia",futureTense:futureMinutes},xMinutes:{one:"minuutti",other:"{{count}} minuuttia",futureTense:futureMinutes},aboutXHours:{one:"noin tunti",other:"noin {{count}} tuntia",futureTense:futureHours},xHours:{one:"tunti",other:"{{count}} tuntia",futureTense:futureHours},xDays:{one:"päivä",other:"{{count}} päivää",futureTense:futureDays},aboutXWeeks:{one:"noin viikko",other:"noin {{count}} viikkoa",futureTense:futureWeeks},xWeeks:{one:"viikko",other:"{{count}} viikkoa",futureTense:futureWeeks},aboutXMonths:{one:"noin kuukausi",other:"noin {{count}} kuukautta",futureTense:futureMonths},xMonths:{one:"kuukausi",other:"{{count}} kuukautta",futureTense:futureMonths},aboutXYears:{one:"noin vuosi",other:"noin {{count}} vuotta",futureTense:futureYears},xYears:{one:"vuosi",other:"{{count}} vuotta",futureTense:futureYears},overXYears:{one:"yli vuosi",other:"yli {{count}} vuotta",futureTense:futureYears},almostXYears:{one:"lähes vuosi",other:"lähes {{count}} vuotta",futureTense:futureYears}},formatDistance$I=function t(e,a,n){var r=formatDistanceLocale$l[e],i=a===1?r.one:r.other.replace("{{count}}",String(a));return n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r.futureTense(i)+" kuluttua":i+" sitten":i};const formatDistance$J=formatDistance$I;var dateFormats$m={full:"eeee d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"d.M.y"},timeFormats$m={full:"HH.mm.ss zzzz",long:"HH.mm.ss z",medium:"HH.mm.ss",short:"HH.mm"},dateTimeFormats$m={full:"{{date}} 'klo' {{time}}",long:"{{date}} 'klo' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$I={date:buildFormatLongFn({formats:dateFormats$m,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$m,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$m,defaultWidth:"full"})};const formatLong$J=formatLong$I;var formatRelativeLocale$m={lastWeek:"'viime' eeee 'klo' p",yesterday:"'eilen klo' p",today:"'tänään klo' p",tomorrow:"'huomenna klo' p",nextWeek:"'ensi' eeee 'klo' p",other:"P"},formatRelative$I=function t(e,a,n,r){return formatRelativeLocale$m[e]};const formatRelative$J=formatRelative$I;var eraValues$m={narrow:["eaa.","jaa."],abbreviated:["eaa.","jaa."],wide:["ennen ajanlaskun alkua","jälkeen ajanlaskun alun"]},quarterValues$m={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartaali","2. kvartaali","3. kvartaali","4. kvartaali"]},monthValues$m={narrow:["T","H","M","H","T","K","H","E","S","L","M","J"],abbreviated:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],wide:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"]},formattingMonthValues$4={narrow:monthValues$m.narrow,abbreviated:monthValues$m.abbreviated,wide:["tammikuuta","helmikuuta","maaliskuuta","huhtikuuta","toukokuuta","kesäkuuta","heinäkuuta","elokuuta","syyskuuta","lokakuuta","marraskuuta","joulukuuta"]},dayValues$m={narrow:["S","M","T","K","T","P","L"],short:["su","ma","ti","ke","to","pe","la"],abbreviated:["sunn.","maan.","tiis.","kesk.","torst.","perj.","la"],wide:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},formattingDayValues={narrow:dayValues$m.narrow,short:dayValues$m.short,abbreviated:dayValues$m.abbreviated,wide:["sunnuntaina","maanantaina","tiistaina","keskiviikkona","torstaina","perjantaina","lauantaina"]},dayPeriodValues$m={narrow:{am:"ap",pm:"ip",midnight:"keskiyö",noon:"keskipäivä",morning:"ap",afternoon:"ip",evening:"illalla",night:"yöllä"},abbreviated:{am:"ap",pm:"ip",midnight:"keskiyö",noon:"keskipäivä",morning:"ap",afternoon:"ip",evening:"illalla",night:"yöllä"},wide:{am:"ap",pm:"ip",midnight:"keskiyöllä",noon:"keskipäivällä",morning:"aamupäivällä",afternoon:"iltapäivällä",evening:"illalla",night:"yöllä"}},ordinalNumber$m=function t(e,a){var n=Number(e);return n+"."},localize$I={ordinalNumber:ordinalNumber$m,era:buildLocalizeFn({values:eraValues$m,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$m,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$m,defaultWidth:"wide",formattingValues:formattingMonthValues$4,defaultFormattingWidth:"wide"}),day:buildLocalizeFn({values:dayValues$m,defaultWidth:"wide",formattingValues:formattingDayValues,defaultFormattingWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$m,defaultWidth:"wide"})};const localize$J=localize$I;var matchOrdinalNumberPattern$m=/^(\d+)(\.)/i,parseOrdinalNumberPattern$m=/\d+/i,matchEraPatterns$m={narrow:/^(e|j)/i,abbreviated:/^(eaa.|jaa.)/i,wide:/^(ennen ajanlaskun alkua|jälkeen ajanlaskun alun)/i},parseEraPatterns$m={any:[/^e/i,/^j/i]},matchQuarterPatterns$m={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]\.? kvartaali/i},parseQuarterPatterns$m={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$m={narrow:/^[thmkeslj]/i,abbreviated:/^(tammi|helmi|maalis|huhti|touko|kesä|heinä|elo|syys|loka|marras|joulu)/i,wide:/^(tammikuu|helmikuu|maaliskuu|huhtikuu|toukokuu|kesäkuu|heinäkuu|elokuu|syyskuu|lokakuu|marraskuu|joulukuu)(ta)?/i},parseMonthPatterns$m={narrow:[/^t/i,/^h/i,/^m/i,/^h/i,/^t/i,/^k/i,/^h/i,/^e/i,/^s/i,/^l/i,/^m/i,/^j/i],any:[/^ta/i,/^hel/i,/^maa/i,/^hu/i,/^to/i,/^k/i,/^hei/i,/^e/i,/^s/i,/^l/i,/^mar/i,/^j/i]},matchDayPatterns$m={narrow:/^[smtkpl]/i,short:/^(su|ma|ti|ke|to|pe|la)/i,abbreviated:/^(sunn.|maan.|tiis.|kesk.|torst.|perj.|la)/i,wide:/^(sunnuntai|maanantai|tiistai|keskiviikko|torstai|perjantai|lauantai)(na)?/i},parseDayPatterns$m={narrow:[/^s/i,/^m/i,/^t/i,/^k/i,/^t/i,/^p/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^k/i,/^to/i,/^p/i,/^l/i]},matchDayPeriodPatterns$m={narrow:/^(ap|ip|keskiyö|keskipäivä|aamupäivällä|iltapäivällä|illalla|yöllä)/i,any:/^(ap|ip|keskiyöllä|keskipäivällä|aamupäivällä|iltapäivällä|illalla|yöllä)/i},parseDayPeriodPatterns$m={any:{am:/^ap/i,pm:/^ip/i,midnight:/^keskiyö/i,noon:/^keskipäivä/i,morning:/aamupäivällä/i,afternoon:/iltapäivällä/i,evening:/illalla/i,night:/yöllä/i}},match$I={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$m,parsePattern:parseOrdinalNumberPattern$m,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$m,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$m,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$m,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$m,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$m,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$m,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$m,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$m,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$m,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$m,defaultParseWidth:"any"})};const match$J=match$I;var locale$m={code:"fi",formatDistance:formatDistance$J,formatLong:formatLong$J,formatRelative:formatRelative$J,localize:localize$J,match:match$J,options:{weekStartsOn:1,firstWeekContainsDate:4}};const fi=locale$m;var formatDistanceLocale$k={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},formatDistance$G=function t(e,a,n){var r,i=formatDistanceLocale$k[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dans "+r:"il y a "+r:r};const formatDistance$H=formatDistance$G;var dateFormats$l={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},timeFormats$l={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$l={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$G={date:buildFormatLongFn({formats:dateFormats$l,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$l,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$l,defaultWidth:"full"})};const formatLong$H=formatLong$G;var formatRelativeLocale$l={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},formatRelative$G=function t(e,a,n,r){return formatRelativeLocale$l[e]};const formatRelative$H=formatRelative$G;var eraValues$l={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},quarterValues$l={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},monthValues$l={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},dayValues$l={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},dayPeriodValues$l={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},ordinalNumber$l=function t(e,a){var n=Number(e),r=a==null?void 0:a.unit;if(n===0)return"0";var i=["year","week","hour","minute","second"],o;return n===1?o=r&&i.includes(r)?"ère":"er":o="ème",n+o},localize$G={ordinalNumber:ordinalNumber$l,era:buildLocalizeFn({values:eraValues$l,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$l,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$l,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$l,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$l,defaultWidth:"wide"})};const localize$H=localize$G;var matchOrdinalNumberPattern$l=/^(\d+)(ième|ère|ème|er|e)?/i,parseOrdinalNumberPattern$l=/\d+/i,matchEraPatterns$l={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},parseEraPatterns$l={any:[/^av/i,/^ap/i]},matchQuarterPatterns$l={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},parseQuarterPatterns$l={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$l={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},parseMonthPatterns$l={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$l={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},parseDayPatterns$l={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},matchDayPeriodPatterns$l={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},parseDayPeriodPatterns$l={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},match$G={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$l,parsePattern:parseOrdinalNumberPattern$l,valueCallback:function t(e){return parseInt(e)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$l,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$l,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$l,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$l,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$l,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$l,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$l,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$l,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$l,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$l,defaultParseWidth:"any"})};const match$H=match$G;var locale$l={code:"fr",formatDistance:formatDistance$H,formatLong:formatLong$H,formatRelative:formatRelative$H,localize:localize$H,match:match$H,options:{weekStartsOn:1,firstWeekContainsDate:4}};const fr=locale$l;var translations$1={about:"körülbelül",over:"több mint",almost:"majdnem",lessthan:"kevesebb mint"},withoutSuffixes={xseconds:" másodperc",halfaminute:"fél perc",xminutes:" perc",xhours:" óra",xdays:" nap",xweeks:" hét",xmonths:" hónap",xyears:" év"},withSuffixes={xseconds:{"-1":" másodperccel ezelőtt",1:" másodperc múlva",0:" másodperce"},halfaminute:{"-1":"fél perccel ezelőtt",1:"fél perc múlva",0:"fél perce"},xminutes:{"-1":" perccel ezelőtt",1:" perc múlva",0:" perce"},xhours:{"-1":" órával ezelőtt",1:" óra múlva",0:" órája"},xdays:{"-1":" nappal ezelőtt",1:" nap múlva",0:" napja"},xweeks:{"-1":" héttel ezelőtt",1:" hét múlva",0:" hete"},xmonths:{"-1":" hónappal ezelőtt",1:" hónap múlva",0:" hónapja"},xyears:{"-1":" évvel ezelőtt",1:" év múlva",0:" éve"}},formatDistance$E=function t(e,a,n){var r=e.match(/about|over|almost|lessthan/i),i=r?e.replace(r[0],""):e,o=(n==null?void 0:n.addSuffix)===!0,s=i.toLowerCase(),l=(n==null?void 0:n.comparison)||0,u=o?withSuffixes[s][l]:withoutSuffixes[s],c=s==="halfaminute"?u:a+u;if(r){var d=r[0].toLowerCase();c=translations$1[d]+" "+c}return c};const formatDistance$F=formatDistance$E;var dateFormats$k={full:"y. MMMM d., EEEE",long:"y. MMMM d.",medium:"y. MMM d.",short:"y. MM. dd."},timeFormats$k={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},dateTimeFormats$k={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$E={date:buildFormatLongFn({formats:dateFormats$k,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$k,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$k,defaultWidth:"full"})};const formatLong$F=formatLong$E;var accusativeWeekdays$3=["vasárnap","hétfőn","kedden","szerdán","csütörtökön","pénteken","szombaton"];function week(t){return function(e){var a=accusativeWeekdays$3[e.getUTCDay()],n=t?"":"'múlt' ";return"".concat(n,"'").concat(a,"' p'-kor'")}}var formatRelativeLocale$k={lastWeek:week(!1),yesterday:"'tegnap' p'-kor'",today:"'ma' p'-kor'",tomorrow:"'holnap' p'-kor'",nextWeek:week(!0),other:"P"},formatRelative$E=function t(e,a){var n=formatRelativeLocale$k[e];return typeof n=="function"?n(a):n};const formatRelative$F=formatRelative$E;var eraValues$k={narrow:["ie.","isz."],abbreviated:["i. e.","i. sz."],wide:["Krisztus előtt","időszámításunk szerint"]},quarterValues$k={narrow:["1.","2.","3.","4."],abbreviated:["1. n.év","2. n.év","3. n.év","4. n.év"],wide:["1. negyedév","2. negyedév","3. negyedév","4. negyedév"]},formattingQuarterValues$1={narrow:["I.","II.","III.","IV."],abbreviated:["I. n.év","II. n.év","III. n.év","IV. n.év"],wide:["I. negyedév","II. negyedév","III. negyedév","IV. negyedév"]},monthValues$k={narrow:["J","F","M","Á","M","J","J","A","Sz","O","N","D"],abbreviated:["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."],wide:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"]},dayValues$k={narrow:["V","H","K","Sz","Cs","P","Sz"],short:["V","H","K","Sze","Cs","P","Szo"],abbreviated:["V","H","K","Sze","Cs","P","Szo"],wide:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"]},dayPeriodValues$k={narrow:{am:"de.",pm:"du.",midnight:"éjfél",noon:"dél",morning:"reggel",afternoon:"du.",evening:"este",night:"éjjel"},abbreviated:{am:"de.",pm:"du.",midnight:"éjfél",noon:"dél",morning:"reggel",afternoon:"du.",evening:"este",night:"éjjel"},wide:{am:"de.",pm:"du.",midnight:"éjfél",noon:"dél",morning:"reggel",afternoon:"délután",evening:"este",night:"éjjel"}},ordinalNumber$k=function t(e,a){var n=Number(e);return n+"."},localize$E={ordinalNumber:ordinalNumber$k,era:buildLocalizeFn({values:eraValues$k,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$k,defaultWidth:"wide",argumentCallback:function t(e){return e-1},formattingValues:formattingQuarterValues$1,defaultFormattingWidth:"wide"}),month:buildLocalizeFn({values:monthValues$k,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$k,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$k,defaultWidth:"wide"})};const localize$F=localize$E;var matchOrdinalNumberPattern$k=/^(\d+)\.?/i,parseOrdinalNumberPattern$k=/\d+/i,matchEraPatterns$k={narrow:/^(ie\.|isz\.)/i,abbreviated:/^(i\.\s?e\.?|b?\s?c\s?e|i\.\s?sz\.?)/i,wide:/^(Krisztus előtt|időszámításunk előtt|időszámításunk szerint|i\. sz\.)/i},parseEraPatterns$k={narrow:[/ie/i,/isz/i],abbreviated:[/^(i\.?\s?e\.?|b\s?ce)/i,/^(i\.?\s?sz\.?|c\s?e)/i],any:[/előtt/i,/(szerint|i. sz.)/i]},matchQuarterPatterns$k={narrow:/^[1234]\.?/i,abbreviated:/^[1234]?\.?\s?n\.év/i,wide:/^([1234]|I|II|III|IV)?\.?\s?negyedév/i},parseQuarterPatterns$k={any:[/1|I$/i,/2|II$/i,/3|III/i,/4|IV/i]},matchMonthPatterns$k={narrow:/^[jfmaásond]|sz/i,abbreviated:/^(jan\.?|febr\.?|márc\.?|ápr\.?|máj\.?|jún\.?|júl\.?|aug\.?|szept\.?|okt\.?|nov\.?|dec\.?)/i,wide:/^(január|február|március|április|május|június|július|augusztus|szeptember|október|november|december)/i},parseMonthPatterns$k={narrow:[/^j/i,/^f/i,/^m/i,/^a|á/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s|sz/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^már/i,/^áp/i,/^máj/i,/^jún/i,/^júl/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$k={narrow:/^([vhkpc]|sz|cs|sz)/i,short:/^([vhkp]|sze|cs|szo)/i,abbreviated:/^([vhkp]|sze|cs|szo)/i,wide:/^(vasárnap|hétfő|kedd|szerda|csütörtök|péntek|szombat)/i},parseDayPatterns$k={narrow:[/^v/i,/^h/i,/^k/i,/^sz/i,/^c/i,/^p/i,/^sz/i],any:[/^v/i,/^h/i,/^k/i,/^sze/i,/^c/i,/^p/i,/^szo/i]},matchDayPeriodPatterns$k={any:/^((de|du)\.?|éjfél|délután|dél|reggel|este|éjjel)/i},parseDayPeriodPatterns$k={any:{am:/^de\.?/i,pm:/^du\.?/i,midnight:/^éjf/i,noon:/^dé/i,morning:/reg/i,afternoon:/^délu\.?/i,evening:/es/i,night:/éjj/i}},match$E={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$k,parsePattern:parseOrdinalNumberPattern$k,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$k,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$k,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$k,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$k,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$k,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$k,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$k,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$k,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$k,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$k,defaultParseWidth:"any"})};const match$F=match$E;var locale$k={code:"hu",formatDistance:formatDistance$F,formatLong:formatLong$F,formatRelative:formatRelative$F,localize:localize$F,match:match$F,options:{weekStartsOn:1,firstWeekContainsDate:4}};const hu=locale$k;var formatDistanceLocale$j={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},formatDistance$C=function t(e,a,n){var r,i=formatDistanceLocale$j[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+r:r+" yang lalu":r};const formatDistance$D=formatDistance$C;var dateFormats$j={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},timeFormats$j={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},dateTimeFormats$j={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$C={date:buildFormatLongFn({formats:dateFormats$j,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$j,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$j,defaultWidth:"full"})};const formatLong$D=formatLong$C;var formatRelativeLocale$j={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},formatRelative$C=function t(e,a,n,r){return formatRelativeLocale$j[e]};const formatRelative$D=formatRelative$C;var eraValues$j={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},quarterValues$j={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},monthValues$j={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},dayValues$j={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},dayPeriodValues$j={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},formattingDayPeriodValues$f={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},ordinalNumber$j=function t(e,a){var n=Number(e);return"ke-"+n},localize$C={ordinalNumber:ordinalNumber$j,era:buildLocalizeFn({values:eraValues$j,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$j,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$j,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$j,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$j,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$f,defaultFormattingWidth:"wide"})};const localize$D=localize$C;var matchOrdinalNumberPattern$j=/^ke-(\d+)?/i,parseOrdinalNumberPattern$j=/\d+/i,matchEraPatterns$j={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},parseEraPatterns$j={any:[/^s/i,/^(m|e)/i]},matchQuarterPatterns$j={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},parseQuarterPatterns$j={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$j={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},parseMonthPatterns$j={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$j={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},parseDayPatterns$j={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},matchDayPeriodPatterns$j={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},parseDayPeriodPatterns$j={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},match$C={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$j,parsePattern:parseOrdinalNumberPattern$j,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$j,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$j,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$j,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$j,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$j,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$j,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$j,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$j,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$j,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$j,defaultParseWidth:"any"})};const match$D=match$C;var locale$j={code:"id",formatDistance:formatDistance$D,formatLong:formatLong$D,formatRelative:formatRelative$D,localize:localize$D,match:match$D,options:{weekStartsOn:1,firstWeekContainsDate:1}};const id=locale$j;var formatDistanceLocale$i={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},formatDistance$A=function t(e,a,n){var r,i=formatDistanceLocale$i[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"tra "+r:r+" fa":r};const formatDistance$B=formatDistance$A;var dateFormats$i={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},timeFormats$i={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$i={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$A={date:buildFormatLongFn({formats:dateFormats$i,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$i,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$i,defaultWidth:"full"})};const formatLong$B=formatLong$A;var weekdays=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function _lastWeek$2(t){switch(t){case 0:return"'domenica scorsa alle' p";default:return"'"+weekdays[t]+" scorso alle' p"}}function thisWeek$3(t){return"'"+weekdays[t]+" alle' p"}function _nextWeek$2(t){switch(t){case 0:return"'domenica prossima alle' p";default:return"'"+weekdays[t]+" prossimo alle' p"}}var formatRelativeLocale$i={lastWeek:function t(e,a,n){var r=e.getUTCDay();return isSameUTCWeek(e,a,n)?thisWeek$3(r):_lastWeek$2(r)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:function t(e,a,n){var r=e.getUTCDay();return isSameUTCWeek(e,a,n)?thisWeek$3(r):_nextWeek$2(r)},other:"P"},formatRelative$A=function t(e,a,n,r){var i=formatRelativeLocale$i[e];return typeof i=="function"?i(a,n,r):i};const formatRelative$B=formatRelative$A;var eraValues$i={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},quarterValues$i={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},monthValues$i={narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},dayValues$i={narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},dayPeriodValues$i={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},formattingDayPeriodValues$e={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},ordinalNumber$i=function t(e,a){var n=Number(e);return String(n)},localize$A={ordinalNumber:ordinalNumber$i,era:buildLocalizeFn({values:eraValues$i,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$i,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$i,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$i,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$i,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$e,defaultFormattingWidth:"wide"})};const localize$B=localize$A;var matchOrdinalNumberPattern$i=/^(\d+)(º)?/i,parseOrdinalNumberPattern$i=/\d+/i,matchEraPatterns$i={narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},parseEraPatterns$i={any:[/^a/i,/^(d|e)/i]},matchQuarterPatterns$i={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},parseQuarterPatterns$i={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$i={narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},parseMonthPatterns$i={narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$i={narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},parseDayPatterns$i={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},matchDayPeriodPatterns$i={narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},parseDayPeriodPatterns$i={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},match$A={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$i,parsePattern:parseOrdinalNumberPattern$i,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$i,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$i,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$i,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$i,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$i,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$i,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$i,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$i,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$i,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$i,defaultParseWidth:"any"})};const match$B=match$A;var locale$i={code:"it",formatDistance:formatDistance$B,formatLong:formatLong$B,formatRelative:formatRelative$B,localize:localize$B,match:match$B,options:{weekStartsOn:1,firstWeekContainsDate:4}};const it=locale$i;var formatDistanceLocale$h={lessThanXSeconds:{one:"1秒未満",other:"{{count}}秒未満",oneWithSuffix:"約1秒",otherWithSuffix:"約{{count}}秒"},xSeconds:{one:"1秒",other:"{{count}}秒"},halfAMinute:"30秒",lessThanXMinutes:{one:"1分未満",other:"{{count}}分未満",oneWithSuffix:"約1分",otherWithSuffix:"約{{count}}分"},xMinutes:{one:"1分",other:"{{count}}分"},aboutXHours:{one:"約1時間",other:"約{{count}}時間"},xHours:{one:"1時間",other:"{{count}}時間"},xDays:{one:"1日",other:"{{count}}日"},aboutXWeeks:{one:"約1週間",other:"約{{count}}週間"},xWeeks:{one:"1週間",other:"{{count}}週間"},aboutXMonths:{one:"約1か月",other:"約{{count}}か月"},xMonths:{one:"1か月",other:"{{count}}か月"},aboutXYears:{one:"約1年",other:"約{{count}}年"},xYears:{one:"1年",other:"{{count}}年"},overXYears:{one:"1年以上",other:"{{count}}年以上"},almostXYears:{one:"1年近く",other:"{{count}}年近く"}},formatDistance$y=function t(e,a,n){n=n||{};var r,i=formatDistanceLocale$h[e];return typeof i=="string"?r=i:a===1?n.addSuffix&&i.oneWithSuffix?r=i.oneWithSuffix:r=i.one:n.addSuffix&&i.otherWithSuffix?r=i.otherWithSuffix.replace("{{count}}",String(a)):r=i.other.replace("{{count}}",String(a)),n.addSuffix?n.comparison&&n.comparison>0?r+"後":r+"前":r};const formatDistance$z=formatDistance$y;var dateFormats$h={full:"y年M月d日EEEE",long:"y年M月d日",medium:"y/MM/dd",short:"y/MM/dd"},timeFormats$h={full:"H時mm分ss秒 zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},dateTimeFormats$h={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$y={date:buildFormatLongFn({formats:dateFormats$h,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$h,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$h,defaultWidth:"full"})};const formatLong$z=formatLong$y;var formatRelativeLocale$h={lastWeek:"先週のeeeeのp",yesterday:"昨日のp",today:"今日のp",tomorrow:"明日のp",nextWeek:"翌週のeeeeのp",other:"P"},formatRelative$y=function t(e,a,n,r){return formatRelativeLocale$h[e]};const formatRelative$z=formatRelative$y;var eraValues$h={narrow:["BC","AC"],abbreviated:["紀元前","西暦"],wide:["紀元前","西暦"]},quarterValues$h={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["第1四半期","第2四半期","第3四半期","第4四半期"]},monthValues$h={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},dayValues$h={narrow:["日","月","火","水","木","金","土"],short:["日","月","火","水","木","金","土"],abbreviated:["日","月","火","水","木","金","土"],wide:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},dayPeriodValues$h={narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},formattingDayPeriodValues$d={narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},ordinalNumber$h=function t(e,a){var n=Number(e),r=String(a==null?void 0:a.unit);switch(r){case"year":return"".concat(n,"年");case"quarter":return"第".concat(n,"四半期");case"month":return"".concat(n,"月");case"week":return"第".concat(n,"週");case"date":return"".concat(n,"日");case"hour":return"".concat(n,"時");case"minute":return"".concat(n,"分");case"second":return"".concat(n,"秒");default:return"".concat(n)}},localize$y={ordinalNumber:ordinalNumber$h,era:buildLocalizeFn({values:eraValues$h,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$h,defaultWidth:"wide",argumentCallback:function t(e){return Number(e)-1}}),month:buildLocalizeFn({values:monthValues$h,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$h,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$h,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$d,defaultFormattingWidth:"wide"})};const localize$z=localize$y;var matchOrdinalNumberPattern$h=/^第?\d+(年|四半期|月|週|日|時|分|秒)?/i,parseOrdinalNumberPattern$h=/\d+/i,matchEraPatterns$h={narrow:/^(B\.?C\.?|A\.?D\.?)/i,abbreviated:/^(紀元[前後]|西暦)/i,wide:/^(紀元[前後]|西暦)/i},parseEraPatterns$h={narrow:[/^B/i,/^A/i],any:[/^(紀元前)/i,/^(西暦|紀元後)/i]},matchQuarterPatterns$h={narrow:/^[1234]/i,abbreviated:/^Q[1234]/i,wide:/^第[1234一二三四1234]四半期/i},parseQuarterPatterns$h={any:[/(1|一|1)/i,/(2|二|2)/i,/(3|三|3)/i,/(4|四|4)/i]},matchMonthPatterns$h={narrow:/^([123456789]|1[012])/,abbreviated:/^([123456789]|1[012])月/i,wide:/^([123456789]|1[012])月/i},parseMonthPatterns$h={any:[/^1\D/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},matchDayPatterns$h={narrow:/^[日月火水木金土]/,short:/^[日月火水木金土]/,abbreviated:/^[日月火水木金土]/,wide:/^[日月火水木金土]曜日/},parseDayPatterns$h={any:[/^日/,/^月/,/^火/,/^水/,/^木/,/^金/,/^土/]},matchDayPeriodPatterns$h={any:/^(AM|PM|午前|午後|正午|深夜|真夜中|夜|朝)/i},parseDayPeriodPatterns$h={any:{am:/^(A|午前)/i,pm:/^(P|午後)/i,midnight:/^深夜|真夜中/i,noon:/^正午/i,morning:/^朝/i,afternoon:/^午後/i,evening:/^夜/i,night:/^深夜/i}},match$y={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$h,parsePattern:parseOrdinalNumberPattern$h,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$h,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$h,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$h,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$h,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$h,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$h,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$h,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$h,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$h,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$h,defaultParseWidth:"any"})};const match$z=match$y;var locale$h={code:"ja",formatDistance:formatDistance$z,formatLong:formatLong$z,formatRelative:formatRelative$z,localize:localize$z,match:match$z,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ja=locale$h;var formatDistanceLocale$g={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},formatDistance$w=function t(e,a,n){var r,i=formatDistanceLocale$g[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+" 후":r+" 전":r};const formatDistance$x=formatDistance$w;var dateFormats$g={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},timeFormats$g={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$g={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$w={date:buildFormatLongFn({formats:dateFormats$g,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$g,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$g,defaultWidth:"full"})};const formatLong$x=formatLong$w;var formatRelativeLocale$g={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},formatRelative$w=function t(e,a,n,r){return formatRelativeLocale$g[e]};const formatRelative$x=formatRelative$w;var eraValues$g={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},quarterValues$g={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},monthValues$g={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},dayValues$g={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},dayPeriodValues$g={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},formattingDayPeriodValues$c={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},ordinalNumber$g=function t(e,a){var n=Number(e),r=String(a==null?void 0:a.unit);switch(r){case"minute":case"second":return String(n);case"date":return n+"일";default:return n+"번째"}},localize$w={ordinalNumber:ordinalNumber$g,era:buildLocalizeFn({values:eraValues$g,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$g,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$g,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$g,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$g,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$c,defaultFormattingWidth:"wide"})};const localize$x=localize$w;var matchOrdinalNumberPattern$g=/^(\d+)(일|번째)?/i,parseOrdinalNumberPattern$g=/\d+/i,matchEraPatterns$g={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},parseEraPatterns$g={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},matchQuarterPatterns$g={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},parseQuarterPatterns$g={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$g={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},parseMonthPatterns$g={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},matchDayPatterns$g={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},parseDayPatterns$g={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},matchDayPeriodPatterns$g={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},parseDayPeriodPatterns$g={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},match$w={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$g,parsePattern:parseOrdinalNumberPattern$g,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$g,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$g,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$g,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$g,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$g,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$g,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$g,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$g,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$g,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$g,defaultParseWidth:"any"})};const match$x=match$w;var locale$g={code:"ko",formatDistance:formatDistance$x,formatLong:formatLong$x,formatRelative:formatRelative$x,localize:localize$x,match:match$x,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ko=locale$g;var formatDistanceLocale$f={lessThanXSeconds:{one:"mindre enn ett sekund",other:"mindre enn {{count}} sekunder"},xSeconds:{one:"ett sekund",other:"{{count}} sekunder"},halfAMinute:"et halvt minutt",lessThanXMinutes:{one:"mindre enn ett minutt",other:"mindre enn {{count}} minutter"},xMinutes:{one:"ett minutt",other:"{{count}} minutter"},aboutXHours:{one:"omtrent en time",other:"omtrent {{count}} timer"},xHours:{one:"en time",other:"{{count}} timer"},xDays:{one:"en dag",other:"{{count}} dager"},aboutXWeeks:{one:"omtrent en uke",other:"omtrent {{count}} uker"},xWeeks:{one:"en uke",other:"{{count}} uker"},aboutXMonths:{one:"omtrent en måned",other:"omtrent {{count}} måneder"},xMonths:{one:"en måned",other:"{{count}} måneder"},aboutXYears:{one:"omtrent ett år",other:"omtrent {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"over ett år",other:"over {{count}} år"},almostXYears:{one:"nesten ett år",other:"nesten {{count}} år"}},formatDistance$u=function t(e,a,n){var r,i=formatDistanceLocale$f[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"om "+r:r+" siden":r};const formatDistance$v=formatDistance$u;var dateFormats$f={full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},timeFormats$f={full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$f={full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$u={date:buildFormatLongFn({formats:dateFormats$f,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$f,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$f,defaultWidth:"full"})};const formatLong$v=formatLong$u;var formatRelativeLocale$f={lastWeek:"'forrige' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},formatRelative$u=function t(e,a,n,r){return formatRelativeLocale$f[e]};const formatRelative$v=formatRelative$u;var eraValues$f={narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},quarterValues$f={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},monthValues$f={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},dayValues$f={narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn","man","tir","ons","tor","fre","lør"],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},dayPeriodValues$f={narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgenen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natten"}},ordinalNumber$f=function t(e,a){var n=Number(e);return n+"."},localize$u={ordinalNumber:ordinalNumber$f,era:buildLocalizeFn({values:eraValues$f,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$f,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$f,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$f,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$f,defaultWidth:"wide"})};const localize$v=localize$u;var matchOrdinalNumberPattern$f=/^(\d+)\.?/i,parseOrdinalNumberPattern$f=/\d+/i,matchEraPatterns$f={narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},parseEraPatterns$f={any:[/^f/i,/^e/i]},matchQuarterPatterns$f={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},parseQuarterPatterns$f={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$f={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},parseMonthPatterns$f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$f={narrow:/^[smtofl]/i,short:/^(sø|ma|ti|on|to|fr|lø)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},parseDayPatterns$f={any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},matchDayPeriodPatterns$f={narrow:/^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i},parseDayPeriodPatterns$f={any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgen/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},match$u={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$f,parsePattern:parseOrdinalNumberPattern$f,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$f,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$f,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$f,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$f,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$f,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$f,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$f,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$f,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$f,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$f,defaultParseWidth:"any"})};const match$v=match$u;var locale$f={code:"nb",formatDistance:formatDistance$v,formatLong:formatLong$v,formatRelative:formatRelative$v,localize:localize$v,match:match$v,options:{weekStartsOn:1,firstWeekContainsDate:4}};const nb=locale$f;var formatDistanceLocale$e={lessThanXSeconds:{one:"minder dan een seconde",other:"minder dan {{count}} seconden"},xSeconds:{one:"1 seconde",other:"{{count}} seconden"},halfAMinute:"een halve minuut",lessThanXMinutes:{one:"minder dan een minuut",other:"minder dan {{count}} minuten"},xMinutes:{one:"een minuut",other:"{{count}} minuten"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} uur"},xHours:{one:"1 uur",other:"{{count}} uur"},xDays:{one:"1 dag",other:"{{count}} dagen"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weken"},xWeeks:{one:"1 week",other:"{{count}} weken"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maanden"},xMonths:{one:"1 maand",other:"{{count}} maanden"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer dan 1 jaar",other:"meer dan {{count}} jaar"},almostXYears:{one:"bijna 1 jaar",other:"bijna {{count}} jaar"}},formatDistance$s=function t(e,a,n){var r,i=formatDistanceLocale$e[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"over "+r:r+" geleden":r};const formatDistance$t=formatDistance$s;var dateFormats$e={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},timeFormats$e={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$e={full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$s={date:buildFormatLongFn({formats:dateFormats$e,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$e,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$e,defaultWidth:"full"})};const formatLong$t=formatLong$s;var formatRelativeLocale$e={lastWeek:"'afgelopen' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},formatRelative$s=function t(e,a,n,r){return formatRelativeLocale$e[e]};const formatRelative$t=formatRelative$s;var eraValues$e={narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},quarterValues$e={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"]},monthValues$e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},dayValues$e={narrow:["Z","M","D","W","D","V","Z"],short:["zo","ma","di","wo","do","vr","za"],abbreviated:["zon","maa","din","woe","don","vri","zat"],wide:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},dayPeriodValues$e={narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"}},ordinalNumber$e=function t(e,a){var n=Number(e);return n+"e"},localize$s={ordinalNumber:ordinalNumber$e,era:buildLocalizeFn({values:eraValues$e,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$e,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$e,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$e,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$e,defaultWidth:"wide"})};const localize$t=localize$s;var matchOrdinalNumberPattern$e=/^(\d+)e?/i,parseOrdinalNumberPattern$e=/\d+/i,matchEraPatterns$e={narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},parseEraPatterns$e={any:[/^v/,/^n/]},matchQuarterPatterns$e={narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e kwartaal/i},parseQuarterPatterns$e={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$e={narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i},parseMonthPatterns$e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mei/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i]},matchDayPatterns$e={narrow:/^[zmdwv]/i,short:/^(zo|ma|di|wo|do|vr|za)/i,abbreviated:/^(zon|maa|din|woe|don|vri|zat)/i,wide:/^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i},parseDayPatterns$e={narrow:[/^z/i,/^m/i,/^d/i,/^w/i,/^d/i,/^v/i,/^z/i],any:[/^zo/i,/^ma/i,/^di/i,/^wo/i,/^do/i,/^vr/i,/^za/i]},matchDayPeriodPatterns$e={any:/^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i},parseDayPeriodPatterns$e={any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^het middaguur/i,morning:/ochtend/i,afternoon:/middag/i,evening:/avond/i,night:/nacht/i}},match$s={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$e,parsePattern:parseOrdinalNumberPattern$e,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$e,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$e,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$e,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$e,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$e,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$e,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$e,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$e,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$e,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$e,defaultParseWidth:"any"})};const match$t=match$s;var locale$e={code:"nl",formatDistance:formatDistance$t,formatLong:formatLong$t,formatRelative:formatRelative$t,localize:localize$t,match:match$t,options:{weekStartsOn:1,firstWeekContainsDate:4}};const nl=locale$e;var formatDistanceLocale$d={lessThanXSeconds:{one:"mindre enn eitt sekund",other:"mindre enn {{count}} sekund"},xSeconds:{one:"eitt sekund",other:"{{count}} sekund"},halfAMinute:"eit halvt minutt",lessThanXMinutes:{one:"mindre enn eitt minutt",other:"mindre enn {{count}} minutt"},xMinutes:{one:"eitt minutt",other:"{{count}} minutt"},aboutXHours:{one:"omtrent ein time",other:"omtrent {{count}} timar"},xHours:{one:"ein time",other:"{{count}} timar"},xDays:{one:"ein dag",other:"{{count}} dagar"},aboutXWeeks:{one:"omtrent ei veke",other:"omtrent {{count}} veker"},xWeeks:{one:"ei veke",other:"{{count}} veker"},aboutXMonths:{one:"omtrent ein månad",other:"omtrent {{count}} månader"},xMonths:{one:"ein månad",other:"{{count}} månader"},aboutXYears:{one:"omtrent eitt år",other:"omtrent {{count}} år"},xYears:{one:"eitt år",other:"{{count}} år"},overXYears:{one:"over eitt år",other:"over {{count}} år"},almostXYears:{one:"nesten eitt år",other:"nesten {{count}} år"}},wordMapping$1=["null","ein","to","tre","fire","fem","seks","sju","åtte","ni","ti","elleve","tolv"],formatDistance$q=function t(e,a,n){var r,i=formatDistanceLocale$d[e];return typeof i=="string"?r=i:a===1?r=i.one:n&&n.onlyNumeric?r=i.other.replace("{{count}}",String(a)):r=i.other.replace("{{count}}",a<13?wordMapping$1[a]:String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"om "+r:r+" sidan":r};const formatDistance$r=formatDistance$q;var dateFormats$d={full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},timeFormats$d={full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$d={full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$q={date:buildFormatLongFn({formats:dateFormats$d,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$d,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$d,defaultWidth:"full"})};const formatLong$r=formatLong$q;var formatRelativeLocale$d={lastWeek:"'førre' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},formatRelative$q=function t(e,a,n,r){return formatRelativeLocale$d[e]};const formatRelative$r=formatRelative$q;var eraValues$d={narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},quarterValues$d={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},monthValues$d={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},dayValues$d={narrow:["S","M","T","O","T","F","L"],short:["su","må","ty","on","to","fr","lau"],abbreviated:["sun","mån","tys","ons","tor","fre","laur"],wide:["sundag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"]},dayPeriodValues$d={narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natta"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natta"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgonen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natta"}},ordinalNumber$d=function t(e,a){var n=Number(e);return n+"."},localize$q={ordinalNumber:ordinalNumber$d,era:buildLocalizeFn({values:eraValues$d,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$d,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$d,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$d,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$d,defaultWidth:"wide"})};const localize$r=localize$q;var matchOrdinalNumberPattern$d=/^(\d+)\.?/i,parseOrdinalNumberPattern$d=/\d+/i,matchEraPatterns$d={narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},parseEraPatterns$d={any:[/^f/i,/^e/i]},matchQuarterPatterns$d={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},parseQuarterPatterns$d={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},parseMonthPatterns$d={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$d={narrow:/^[smtofl]/i,short:/^(su|må|ty|on|to|fr|la)/i,abbreviated:/^(sun|mån|tys|ons|tor|fre|laur)/i,wide:/^(sundag|måndag|tysdag|onsdag|torsdag|fredag|laurdag)/i},parseDayPatterns$d={any:[/^s/i,/^m/i,/^ty/i,/^o/i,/^to/i,/^f/i,/^l/i]},matchDayPeriodPatterns$d={narrow:/^(midnatt|middag|(på) (morgonen|ettermiddagen|kvelden|natta)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgonen|ettermiddagen|kvelden|natta))/i},parseDayPeriodPatterns$d={any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},match$q={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$d,parsePattern:parseOrdinalNumberPattern$d,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$d,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$d,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$d,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$d,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$d,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$d,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$d,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$d,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$d,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$d,defaultParseWidth:"any"})};const match$r=match$q;var locale$d={code:"nn",formatDistance:formatDistance$r,formatLong:formatLong$r,formatRelative:formatRelative$r,localize:localize$r,match:match$r,options:{weekStartsOn:1,firstWeekContainsDate:4}};const nn=locale$d;var formatDistanceLocale$c={lessThanXSeconds:{one:{regular:"mniej niż sekunda",past:"mniej niż sekundę",future:"mniej niż sekundę"},twoFour:"mniej niż {{count}} sekundy",other:"mniej niż {{count}} sekund"},xSeconds:{one:{regular:"sekunda",past:"sekundę",future:"sekundę"},twoFour:"{{count}} sekundy",other:"{{count}} sekund"},halfAMinute:{one:"pół minuty",twoFour:"pół minuty",other:"pół minuty"},lessThanXMinutes:{one:{regular:"mniej niż minuta",past:"mniej niż minutę",future:"mniej niż minutę"},twoFour:"mniej niż {{count}} minuty",other:"mniej niż {{count}} minut"},xMinutes:{one:{regular:"minuta",past:"minutę",future:"minutę"},twoFour:"{{count}} minuty",other:"{{count}} minut"},aboutXHours:{one:{regular:"około godziny",past:"około godziny",future:"około godzinę"},twoFour:"około {{count}} godziny",other:"około {{count}} godzin"},xHours:{one:{regular:"godzina",past:"godzinę",future:"godzinę"},twoFour:"{{count}} godziny",other:"{{count}} godzin"},xDays:{one:{regular:"dzień",past:"dzień",future:"1 dzień"},twoFour:"{{count}} dni",other:"{{count}} dni"},aboutXWeeks:{one:"około tygodnia",twoFour:"około {{count}} tygodni",other:"około {{count}} tygodni"},xWeeks:{one:"tydzień",twoFour:"{{count}} tygodnie",other:"{{count}} tygodni"},aboutXMonths:{one:"około miesiąc",twoFour:"około {{count}} miesiące",other:"około {{count}} miesięcy"},xMonths:{one:"miesiąc",twoFour:"{{count}} miesiące",other:"{{count}} miesięcy"},aboutXYears:{one:"około rok",twoFour:"około {{count}} lata",other:"około {{count}} lat"},xYears:{one:"rok",twoFour:"{{count}} lata",other:"{{count}} lat"},overXYears:{one:"ponad rok",twoFour:"ponad {{count}} lata",other:"ponad {{count}} lat"},almostXYears:{one:"prawie rok",twoFour:"prawie {{count}} lata",other:"prawie {{count}} lat"}};function declensionGroup$1(t,e){if(e===1)return t.one;var a=e%100;if(a<=20&&a>10)return t.other;var n=a%10;return n>=2&&n<=4?t.twoFour:t.other}function declension$3(t,e,a){var n=declensionGroup$1(t,e),r=typeof n=="string"?n:n[a];return r.replace("{{count}}",String(e))}var formatDistance$o=function t(e,a,n){var r=formatDistanceLocale$c[e];return n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"za "+declension$3(r,a,"future"):declension$3(r,a,"past")+" temu":declension$3(r,a,"regular")};const formatDistance$p=formatDistance$o;var dateFormats$c={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},timeFormats$c={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$c={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$o={date:buildFormatLongFn({formats:dateFormats$c,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$c,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$c,defaultWidth:"full"})};const formatLong$p=formatLong$o;var adjectivesLastWeek={masculine:"ostatni",feminine:"ostatnia"},adjectivesThisWeek={masculine:"ten",feminine:"ta"},adjectivesNextWeek={masculine:"następny",feminine:"następna"},dayGrammaticalGender={0:"feminine",1:"masculine",2:"masculine",3:"feminine",4:"masculine",5:"masculine",6:"feminine"};function dayAndTimeWithAdjective(t,e,a,n){var r;if(isSameUTCWeek(e,a,n))r=adjectivesThisWeek;else if(t==="lastWeek")r=adjectivesLastWeek;else if(t==="nextWeek")r=adjectivesNextWeek;else throw new Error("Cannot determine adjectives for token ".concat(t));var i=e.getUTCDay(),o=dayGrammaticalGender[i],s=r[o];return"'".concat(s,"' eeee 'o' p")}var formatRelativeLocale$c={lastWeek:dayAndTimeWithAdjective,yesterday:"'wczoraj o' p",today:"'dzisiaj o' p",tomorrow:"'jutro o' p",nextWeek:dayAndTimeWithAdjective,other:"P"},formatRelative$o=function t(e,a,n,r){var i=formatRelativeLocale$c[e];return typeof i=="function"?i(e,a,n,r):i};const formatRelative$p=formatRelative$o;var eraValues$c={narrow:["p.n.e.","n.e."],abbreviated:["p.n.e.","n.e."],wide:["przed naszą erą","naszej ery"]},quarterValues$c={narrow:["1","2","3","4"],abbreviated:["I kw.","II kw.","III kw.","IV kw."],wide:["I kwartał","II kwartał","III kwartał","IV kwartał"]},monthValues$c={narrow:["S","L","M","K","M","C","L","S","W","P","L","G"],abbreviated:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],wide:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"]},monthFormattingValues={narrow:["s","l","m","k","m","c","l","s","w","p","l","g"],abbreviated:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],wide:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"]},dayValues$c={narrow:["N","P","W","Ś","C","P","S"],short:["nie","pon","wto","śro","czw","pią","sob"],abbreviated:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],wide:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},dayFormattingValues={narrow:["n","p","w","ś","c","p","s"],short:["nie","pon","wto","śro","czw","pią","sob"],abbreviated:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],wide:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},dayPeriodValues$c={narrow:{am:"a",pm:"p",midnight:"półn.",noon:"poł",morning:"rano",afternoon:"popoł.",evening:"wiecz.",night:"noc"},abbreviated:{am:"AM",pm:"PM",midnight:"północ",noon:"południe",morning:"rano",afternoon:"popołudnie",evening:"wieczór",night:"noc"},wide:{am:"AM",pm:"PM",midnight:"północ",noon:"południe",morning:"rano",afternoon:"popołudnie",evening:"wieczór",night:"noc"}},dayPeriodFormattingValues={narrow:{am:"a",pm:"p",midnight:"o półn.",noon:"w poł.",morning:"rano",afternoon:"po poł.",evening:"wiecz.",night:"w nocy"},abbreviated:{am:"AM",pm:"PM",midnight:"o północy",noon:"w południe",morning:"rano",afternoon:"po południu",evening:"wieczorem",night:"w nocy"},wide:{am:"AM",pm:"PM",midnight:"o północy",noon:"w południe",morning:"rano",afternoon:"po południu",evening:"wieczorem",night:"w nocy"}},ordinalNumber$c=function t(e,a){return String(e)},localize$o={ordinalNumber:ordinalNumber$c,era:buildLocalizeFn({values:eraValues$c,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$c,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$c,defaultWidth:"wide",formattingValues:monthFormattingValues,defaultFormattingWidth:"wide"}),day:buildLocalizeFn({values:dayValues$c,defaultWidth:"wide",formattingValues:dayFormattingValues,defaultFormattingWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$c,defaultWidth:"wide",formattingValues:dayPeriodFormattingValues,defaultFormattingWidth:"wide"})};const localize$p=localize$o;var matchOrdinalNumberPattern$c=/^(\d+)?/i,parseOrdinalNumberPattern$c=/\d+/i,matchEraPatterns$c={narrow:/^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,abbreviated:/^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,wide:/^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i},parseEraPatterns$c={any:[/^p/i,/^n/i]},matchQuarterPatterns$c={narrow:/^[1234]/i,abbreviated:/^(I|II|III|IV)\s*kw\.?/i,wide:/^(I|II|III|IV)\s*kwarta(ł|l)/i},parseQuarterPatterns$c={narrow:[/1/i,/2/i,/3/i,/4/i],any:[/^I kw/i,/^II kw/i,/^III kw/i,/^IV kw/i]},matchMonthPatterns$c={narrow:/^[slmkcwpg]/i,abbreviated:/^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,wide:/^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i},parseMonthPatterns$c={narrow:[/^s/i,/^l/i,/^m/i,/^k/i,/^m/i,/^c/i,/^l/i,/^s/i,/^w/i,/^p/i,/^l/i,/^g/i],any:[/^st/i,/^lu/i,/^mar/i,/^k/i,/^maj/i,/^c/i,/^lip/i,/^si/i,/^w/i,/^p/i,/^lis/i,/^g/i]},matchDayPatterns$c={narrow:/^[npwścs]/i,short:/^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,abbreviated:/^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,wide:/^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i},parseDayPatterns$c={narrow:[/^n/i,/^p/i,/^w/i,/^ś/i,/^c/i,/^p/i,/^s/i],abbreviated:[/^n/i,/^po/i,/^w/i,/^(ś|s)r/i,/^c/i,/^pt/i,/^so/i],any:[/^n/i,/^po/i,/^w/i,/^(ś|s)r/i,/^c/i,/^pi/i,/^so/i]},matchDayPeriodPatterns$c={narrow:/^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,any:/^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i},parseDayPeriodPatterns$c={narrow:{am:/^a$/i,pm:/^p$/i,midnight:/pó(ł|l)n/i,noon:/po(ł|l)/i,morning:/rano/i,afternoon:/po\s*po(ł|l)/i,evening:/wiecz/i,night:/noc/i},any:{am:/^am/i,pm:/^pm/i,midnight:/pó(ł|l)n/i,noon:/po(ł|l)/i,morning:/rano/i,afternoon:/po\s*po(ł|l)/i,evening:/wiecz/i,night:/noc/i}},match$o={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$c,parsePattern:parseOrdinalNumberPattern$c,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$c,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$c,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$c,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$c,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$c,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$c,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$c,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$c,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$c,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$c,defaultParseWidth:"any"})};const match$p=match$o;var locale$c={code:"pl",formatDistance:formatDistance$p,formatLong:formatLong$p,formatRelative:formatRelative$p,localize:localize$p,match:match$p,options:{weekStartsOn:1,firstWeekContainsDate:4}};const pl=locale$c;var formatDistanceLocale$b={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 mês",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},formatDistance$m=function t(e,a,n){var r,i=formatDistanceLocale$b[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"há "+r:r};const formatDistance$n=formatDistance$m;var dateFormats$b={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},timeFormats$b={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$b={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$m={date:buildFormatLongFn({formats:dateFormats$b,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$b,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$b,defaultWidth:"full"})};const formatLong$n=formatLong$m;var formatRelativeLocale$b={lastWeek:function t(e){var a=e.getUTCDay(),n=a===0||a===6?"último":"última";return"'"+n+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},formatRelative$m=function t(e,a,n,r){var i=formatRelativeLocale$b[e];return typeof i=="function"?i(a):i};const formatRelative$n=formatRelative$m;var eraValues$b={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},quarterValues$b={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},monthValues$b={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},dayValues$b={narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sáb"],abbreviated:["dom","seg","ter","qua","qui","sex","sáb"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},dayPeriodValues$b={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"}},formattingDayPeriodValues$b={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},ordinalNumber$b=function t(e,a){var n=Number(e);return n+"º"},localize$m={ordinalNumber:ordinalNumber$b,era:buildLocalizeFn({values:eraValues$b,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$b,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$b,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$b,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$b,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$b,defaultFormattingWidth:"wide"})};const localize$n=localize$m;var matchOrdinalNumberPattern$b=/^(\d+)(º|ª)?/i,parseOrdinalNumberPattern$b=/\d+/i,matchEraPatterns$b={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},parseEraPatterns$b={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},matchQuarterPatterns$b={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},parseQuarterPatterns$b={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$b={narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},parseMonthPatterns$b={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$b={narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},parseDayPatterns$b={narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},matchDayPeriodPatterns$b={narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},parseDayPeriodPatterns$b={any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},match$m={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$b,parsePattern:parseOrdinalNumberPattern$b,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$b,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$b,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$b,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$b,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$b,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$b,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$b,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$b,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$b,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$b,defaultParseWidth:"any"})};const match$n=match$m;var locale$b={code:"pt",formatDistance:formatDistance$n,formatLong:formatLong$n,formatRelative:formatRelative$n,localize:localize$n,match:match$n,options:{weekStartsOn:1,firstWeekContainsDate:4}};const pt=locale$b;var formatDistanceLocale$a={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},formatDistance$k=function t(e,a,n){var r,i=formatDistanceLocale$a[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+r:"há "+r:r};const formatDistance$l=formatDistance$k;var dateFormats$a={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},timeFormats$a={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$a={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$k={date:buildFormatLongFn({formats:dateFormats$a,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$a,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$a,defaultWidth:"full"})};const formatLong$l=formatLong$k;var formatRelativeLocale$a={lastWeek:function t(e){var a=e.getUTCDay(),n=a===0||a===6?"último":"última";return"'"+n+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},formatRelative$k=function t(e,a,n,r){var i=formatRelativeLocale$a[e];return typeof i=="function"?i(a):i};const formatRelative$l=formatRelative$k;var eraValues$a={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},quarterValues$a={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},monthValues$a={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},dayValues$a={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},dayPeriodValues$a={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},formattingDayPeriodValues$a={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},ordinalNumber$a=function t(e,a){var n=Number(e);return(a==null?void 0:a.unit)==="week"?n+"ª":n+"º"},localize$k={ordinalNumber:ordinalNumber$a,era:buildLocalizeFn({values:eraValues$a,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$a,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$a,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$a,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$a,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$a,defaultFormattingWidth:"wide"})};const localize$l=localize$k;var matchOrdinalNumberPattern$a=/^(\d+)[ºªo]?/i,parseOrdinalNumberPattern$a=/\d+/i,matchEraPatterns$a={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},parseEraPatterns$a={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},matchQuarterPatterns$a={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},parseQuarterPatterns$a={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$a={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},parseMonthPatterns$a={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},matchDayPatterns$a={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},parseDayPatterns$a={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},matchDayPeriodPatterns$a={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},parseDayPeriodPatterns$a={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},match$k={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$a,parsePattern:parseOrdinalNumberPattern$a,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$a,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$a,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$a,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$a,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$a,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$a,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$a,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$a,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$a,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$a,defaultParseWidth:"any"})};const match$l=match$k;var locale$a={code:"pt-BR",formatDistance:formatDistance$l,formatLong:formatLong$l,formatRelative:formatRelative$l,localize:localize$l,match:match$l,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ptBR=locale$a;var formatDistanceLocale$9={lessThanXSeconds:{one:"mai puțin de o secundă",other:"mai puțin de {{count}} secunde"},xSeconds:{one:"1 secundă",other:"{{count}} secunde"},halfAMinute:"jumătate de minut",lessThanXMinutes:{one:"mai puțin de un minut",other:"mai puțin de {{count}} minute"},xMinutes:{one:"1 minut",other:"{{count}} minute"},aboutXHours:{one:"circa 1 oră",other:"circa {{count}} ore"},xHours:{one:"1 oră",other:"{{count}} ore"},xDays:{one:"1 zi",other:"{{count}} zile"},aboutXWeeks:{one:"circa o săptămână",other:"circa {{count}} săptămâni"},xWeeks:{one:"1 săptămână",other:"{{count}} săptămâni"},aboutXMonths:{one:"circa 1 lună",other:"circa {{count}} luni"},xMonths:{one:"1 lună",other:"{{count}} luni"},aboutXYears:{one:"circa 1 an",other:"circa {{count}} ani"},xYears:{one:"1 an",other:"{{count}} ani"},overXYears:{one:"peste 1 an",other:"peste {{count}} ani"},almostXYears:{one:"aproape 1 an",other:"aproape {{count}} ani"}},formatDistance$i=function t(e,a,n){var r,i=formatDistanceLocale$9[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"în "+r:r+" în urmă":r};const formatDistance$j=formatDistance$i;var dateFormats$9={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd.MM.yyyy"},timeFormats$9={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$9={full:"{{date}} 'la' {{time}}",long:"{{date}} 'la' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$i={date:buildFormatLongFn({formats:dateFormats$9,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$9,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$9,defaultWidth:"full"})};const formatLong$j=formatLong$i;var formatRelativeLocale$9={lastWeek:"eeee 'trecută la' p",yesterday:"'ieri la' p",today:"'astăzi la' p",tomorrow:"'mâine la' p",nextWeek:"eeee 'viitoare la' p",other:"P"},formatRelative$i=function t(e,a,n,r){return formatRelativeLocale$9[e]};const formatRelative$j=formatRelative$i;var eraValues$9={narrow:["Î","D"],abbreviated:["Î.d.C.","D.C."],wide:["Înainte de Cristos","După Cristos"]},quarterValues$9={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["primul trimestru","al doilea trimestru","al treilea trimestru","al patrulea trimestru"]},monthValues$9={narrow:["I","F","M","A","M","I","I","A","S","O","N","D"],abbreviated:["ian","feb","mar","apr","mai","iun","iul","aug","sep","oct","noi","dec"],wide:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"]},dayValues$9={narrow:["d","l","m","m","j","v","s"],short:["du","lu","ma","mi","jo","vi","sâ"],abbreviated:["dum","lun","mar","mie","joi","vin","sâm"],wide:["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"]},dayPeriodValues$9={narrow:{am:"a",pm:"p",midnight:"mn",noon:"ami",morning:"dim",afternoon:"da",evening:"s",night:"n"},abbreviated:{am:"AM",pm:"PM",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},wide:{am:"a.m.",pm:"p.m.",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"}},formattingDayPeriodValues$9={narrow:{am:"a",pm:"p",midnight:"mn",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},abbreviated:{am:"AM",pm:"PM",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"},wide:{am:"a.m.",pm:"p.m.",midnight:"miezul nopții",noon:"amiază",morning:"dimineață",afternoon:"după-amiază",evening:"seară",night:"noapte"}},ordinalNumber$9=function t(e,a){return String(e)},localize$i={ordinalNumber:ordinalNumber$9,era:buildLocalizeFn({values:eraValues$9,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$9,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$9,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$9,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$9,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$9,defaultFormattingWidth:"wide"})};const localize$j=localize$i;var matchOrdinalNumberPattern$9=/^(\d+)?/i,parseOrdinalNumberPattern$9=/\d+/i,matchEraPatterns$9={narrow:/^(Î|D)/i,abbreviated:/^(Î\.?\s?d\.?\s?C\.?|Î\.?\s?e\.?\s?n\.?|D\.?\s?C\.?|e\.?\s?n\.?)/i,wide:/^(Înainte de Cristos|Înaintea erei noastre|După Cristos|Era noastră)/i},parseEraPatterns$9={any:[/^ÎC/i,/^DC/i],wide:[/^(Înainte de Cristos|Înaintea erei noastre)/i,/^(După Cristos|Era noastră)/i]},matchQuarterPatterns$9={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^trimestrul [1234]/i},parseQuarterPatterns$9={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$9={narrow:/^[ifmaasond]/i,abbreviated:/^(ian|feb|mar|apr|mai|iun|iul|aug|sep|oct|noi|dec)/i,wide:/^(ianuarie|februarie|martie|aprilie|mai|iunie|iulie|august|septembrie|octombrie|noiembrie|decembrie)/i},parseMonthPatterns$9={narrow:[/^i/i,/^f/i,/^m/i,/^a/i,/^m/i,/^i/i,/^i/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ia/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^iun/i,/^iul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$9={narrow:/^[dlmjvs]/i,short:/^(d|l|ma|mi|j|v|s)/i,abbreviated:/^(dum|lun|mar|mie|jo|vi|sâ)/i,wide:/^(duminica|luni|marţi|miercuri|joi|vineri|sâmbătă)/i},parseDayPatterns$9={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^mi/i,/^j/i,/^v/i,/^s/i]},matchDayPeriodPatterns$9={narrow:/^(a|p|mn|a|(dimineaţa|după-amiaza|seara|noaptea))/i,any:/^([ap]\.?\s?m\.?|miezul nopții|amiaza|(dimineaţa|după-amiaza|seara|noaptea))/i},parseDayPeriodPatterns$9={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/amiaza/i,morning:/dimineaţa/i,afternoon:/după-amiaza/i,evening:/seara/i,night:/noaptea/i}},match$i={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$9,parsePattern:parseOrdinalNumberPattern$9,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$9,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$9,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$9,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$9,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$9,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$9,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$9,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$9,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$9,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$9,defaultParseWidth:"any"})};const match$j=match$i;var locale$9={code:"ro",formatDistance:formatDistance$j,formatLong:formatLong$j,formatRelative:formatRelative$j,localize:localize$j,match:match$j,options:{weekStartsOn:1,firstWeekContainsDate:1}};const ro=locale$9;function declension$2(t,e){if(t.one!==void 0&&e===1)return t.one;var a=e%10,n=e%100;return a===1&&n!==11?t.singularNominative.replace("{{count}}",String(e)):a>=2&&a<=4&&(n<10||n>20)?t.singularGenitive.replace("{{count}}",String(e)):t.pluralGenitive.replace("{{count}}",String(e))}function buildLocalizeTokenFn$1(t){return function(e,a){return a!=null&&a.addSuffix?a.comparison&&a.comparison>0?t.future?declension$2(t.future,e):"через "+declension$2(t.regular,e):t.past?declension$2(t.past,e):declension$2(t.regular,e)+" назад":declension$2(t.regular,e)}}var formatDistanceLocale$8={lessThanXSeconds:buildLocalizeTokenFn$1({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:buildLocalizeTokenFn$1({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:function t(e,a){return a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"через полминуты":"полминуты назад":"полминуты"},lessThanXMinutes:buildLocalizeTokenFn$1({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:buildLocalizeTokenFn$1({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:buildLocalizeTokenFn$1({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:buildLocalizeTokenFn$1({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:buildLocalizeTokenFn$1({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:buildLocalizeTokenFn$1({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:buildLocalizeTokenFn$1({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:buildLocalizeTokenFn$1({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:buildLocalizeTokenFn$1({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:buildLocalizeTokenFn$1({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:buildLocalizeTokenFn$1({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:buildLocalizeTokenFn$1({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:buildLocalizeTokenFn$1({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},formatDistance$g=function t(e,a,n){return formatDistanceLocale$8[e](a,n)};const formatDistance$h=formatDistance$g;var dateFormats$8={full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},timeFormats$8={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},dateTimeFormats$8={any:"{{date}}, {{time}}"},formatLong$g={date:buildFormatLongFn({formats:dateFormats$8,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$8,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$8,defaultWidth:"any"})};const formatLong$h=formatLong$g;var accusativeWeekdays$2=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function _lastWeek$1(t){var e=accusativeWeekdays$2[t];switch(t){case 0:return"'в прошлое "+e+" в' p";case 1:case 2:case 4:return"'в прошлый "+e+" в' p";case 3:case 5:case 6:return"'в прошлую "+e+" в' p"}}function thisWeek$2(t){var e=accusativeWeekdays$2[t];return t===2?"'во "+e+" в' p":"'в "+e+" в' p"}function _nextWeek$1(t){var e=accusativeWeekdays$2[t];switch(t){case 0:return"'в следующее "+e+" в' p";case 1:case 2:case 4:return"'в следующий "+e+" в' p";case 3:case 5:case 6:return"'в следующую "+e+" в' p"}}var formatRelativeLocale$8={lastWeek:function t(e,a,n){var r=e.getUTCDay();return isSameUTCWeek(e,a,n)?thisWeek$2(r):_lastWeek$1(r)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:function t(e,a,n){var r=e.getUTCDay();return isSameUTCWeek(e,a,n)?thisWeek$2(r):_nextWeek$1(r)},other:"P"},formatRelative$g=function t(e,a,n,r){var i=formatRelativeLocale$8[e];return typeof i=="function"?i(a,n,r):i};const formatRelative$h=formatRelative$g;var eraValues$8={narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},quarterValues$8={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},monthValues$8={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},formattingMonthValues$3={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},dayValues$8={narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},dayPeriodValues$8={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},formattingDayPeriodValues$8={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},ordinalNumber$8=function t(e,a){var n=Number(e),r=a==null?void 0:a.unit,i;return r==="date"?i="-е":r==="week"||r==="minute"||r==="second"?i="-я":i="-й",n+i},localize$g={ordinalNumber:ordinalNumber$8,era:buildLocalizeFn({values:eraValues$8,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$8,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$8,defaultWidth:"wide",formattingValues:formattingMonthValues$3,defaultFormattingWidth:"wide"}),day:buildLocalizeFn({values:dayValues$8,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$8,defaultWidth:"any",formattingValues:formattingDayPeriodValues$8,defaultFormattingWidth:"wide"})};const localize$h=localize$g;var matchOrdinalNumberPattern$8=/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parseOrdinalNumberPattern$8=/\d+/i,matchEraPatterns$8={narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},parseEraPatterns$8={any:[/^д/i,/^н/i]},matchQuarterPatterns$8={narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},parseQuarterPatterns$8={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$8={narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},parseMonthPatterns$8={narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},matchDayPatterns$8={narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},parseDayPatterns$8={narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},matchDayPeriodPatterns$8={narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},parseDayPeriodPatterns$8={any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},match$g={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$8,parsePattern:parseOrdinalNumberPattern$8,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$8,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$8,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$8,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$8,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$8,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$8,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$8,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$8,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$8,defaultMatchWidth:"wide",parsePatterns:parseDayPeriodPatterns$8,defaultParseWidth:"any"})};const match$h=match$g;var locale$8={code:"ru",formatDistance:formatDistance$h,formatLong:formatLong$h,formatRelative:formatRelative$h,localize:localize$h,match:match$h,options:{weekStartsOn:1,firstWeekContainsDate:1}};const ru=locale$8;function declensionGroup(t,e){return e===1&&t.one?t.one:e>=2&&e<=4&&t.twoFour?t.twoFour:t.other}function declension$1(t,e,a){var n=declensionGroup(t,e),r=n[a];return r.replace("{{count}}",String(e))}function extractPreposition(t){var e=["lessThan","about","over","almost"].filter(function(a){return!!t.match(new RegExp("^"+a))});return e[0]}function prefixPreposition(t){var e="";return t==="almost"&&(e="takmer"),t==="about"&&(e="približne"),e.length>0?e+" ":""}function suffixPreposition(t){var e="";return t==="lessThan"&&(e="menej než"),t==="over"&&(e="viac než"),e.length>0?e+" ":""}function lowercaseFirstLetter(t){return t.charAt(0).toLowerCase()+t.slice(1)}var formatDistanceLocale$7={xSeconds:{one:{present:"sekunda",past:"sekundou",future:"sekundu"},twoFour:{present:"{{count}} sekundy",past:"{{count}} sekundami",future:"{{count}} sekundy"},other:{present:"{{count}} sekúnd",past:"{{count}} sekundami",future:"{{count}} sekúnd"}},halfAMinute:{other:{present:"pol minúty",past:"pol minútou",future:"pol minúty"}},xMinutes:{one:{present:"minúta",past:"minútou",future:"minútu"},twoFour:{present:"{{count}} minúty",past:"{{count}} minútami",future:"{{count}} minúty"},other:{present:"{{count}} minút",past:"{{count}} minútami",future:"{{count}} minút"}},xHours:{one:{present:"hodina",past:"hodinou",future:"hodinu"},twoFour:{present:"{{count}} hodiny",past:"{{count}} hodinami",future:"{{count}} hodiny"},other:{present:"{{count}} hodín",past:"{{count}} hodinami",future:"{{count}} hodín"}},xDays:{one:{present:"deň",past:"dňom",future:"deň"},twoFour:{present:"{{count}} dni",past:"{{count}} dňami",future:"{{count}} dni"},other:{present:"{{count}} dní",past:"{{count}} dňami",future:"{{count}} dní"}},xWeeks:{one:{present:"týždeň",past:"týždňom",future:"týždeň"},twoFour:{present:"{{count}} týždne",past:"{{count}} týždňami",future:"{{count}} týždne"},other:{present:"{{count}} týždňov",past:"{{count}} týždňami",future:"{{count}} týždňov"}},xMonths:{one:{present:"mesiac",past:"mesiacom",future:"mesiac"},twoFour:{present:"{{count}} mesiace",past:"{{count}} mesiacmi",future:"{{count}} mesiace"},other:{present:"{{count}} mesiacov",past:"{{count}} mesiacmi",future:"{{count}} mesiacov"}},xYears:{one:{present:"rok",past:"rokom",future:"rok"},twoFour:{present:"{{count}} roky",past:"{{count}} rokmi",future:"{{count}} roky"},other:{present:"{{count}} rokov",past:"{{count}} rokmi",future:"{{count}} rokov"}}},formatDistance$e=function t(e,a,n){var r=extractPreposition(e)||"",i=lowercaseFirstLetter(e.substring(r.length)),o=formatDistanceLocale$7[i];return n!=null&&n.addSuffix?n.comparison&&n.comparison>0?prefixPreposition(r)+"o "+suffixPreposition(r)+declension$1(o,a,"future"):prefixPreposition(r)+"pred "+suffixPreposition(r)+declension$1(o,a,"past"):prefixPreposition(r)+suffixPreposition(r)+declension$1(o,a,"present")};const formatDistance$f=formatDistance$e;var dateFormats$7={full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. M. y",short:"d. M. y"},timeFormats$7={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},dateTimeFormats$7={full:"{{date}}, {{time}}",long:"{{date}}, {{time}}",medium:"{{date}}, {{time}}",short:"{{date}} {{time}}"},formatLong$e={date:buildFormatLongFn({formats:dateFormats$7,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$7,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$7,defaultWidth:"full"})};const formatLong$f=formatLong$e;var accusativeWeekdays$1=["nedeľu","pondelok","utorok","stredu","štvrtok","piatok","sobotu"];function _lastWeek(t){var e=accusativeWeekdays$1[t];switch(t){case 0:case 3:case 6:return"'minulú "+e+" o' p";default:return"'minulý' eeee 'o' p"}}function thisWeek$1(t){var e=accusativeWeekdays$1[t];return t===4?"'vo' eeee 'o' p":"'v "+e+" o' p"}function _nextWeek(t){var e=accusativeWeekdays$1[t];switch(t){case 0:case 4:case 6:return"'budúcu "+e+" o' p";default:return"'budúci' eeee 'o' p"}}var formatRelativeLocale$7={lastWeek:function t(e,a,n){var r=e.getUTCDay();return isSameUTCWeek(e,a,n)?thisWeek$1(r):_lastWeek(r)},yesterday:"'včera o' p",today:"'dnes o' p",tomorrow:"'zajtra o' p",nextWeek:function t(e,a,n){var r=e.getUTCDay();return isSameUTCWeek(e,a,n)?thisWeek$1(r):_nextWeek(r)},other:"P"},formatRelative$e=function t(e,a,n,r){var i=formatRelativeLocale$7[e];return typeof i=="function"?i(a,n,r):i};const formatRelative$f=formatRelative$e;var eraValues$7={narrow:["pred Kr.","po Kr."],abbreviated:["pred Kr.","po Kr."],wide:["pred Kristom","po Kristovi"]},quarterValues$7={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. štvrťrok","2. štvrťrok","3. štvrťrok","4. štvrťrok"]},monthValues$7={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],wide:["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december"]},formattingMonthValues$2={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],wide:["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra"]},dayValues$7={narrow:["n","p","u","s","š","p","s"],short:["ne","po","ut","st","št","pi","so"],abbreviated:["ne","po","ut","st","št","pi","so"],wide:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"]},dayPeriodValues$7={narrow:{am:"AM",pm:"PM",midnight:"poln.",noon:"pol.",morning:"ráno",afternoon:"pop.",evening:"več.",night:"noc"},abbreviated:{am:"AM",pm:"PM",midnight:"poln.",noon:"pol.",morning:"ráno",afternoon:"popol.",evening:"večer",night:"noc"},wide:{am:"AM",pm:"PM",midnight:"polnoc",noon:"poludnie",morning:"ráno",afternoon:"popoludnie",evening:"večer",night:"noc"}},formattingDayPeriodValues$7={narrow:{am:"AM",pm:"PM",midnight:"o poln.",noon:"nap.",morning:"ráno",afternoon:"pop.",evening:"več.",night:"v n."},abbreviated:{am:"AM",pm:"PM",midnight:"o poln.",noon:"napol.",morning:"ráno",afternoon:"popol.",evening:"večer",night:"v noci"},wide:{am:"AM",pm:"PM",midnight:"o polnoci",noon:"napoludnie",morning:"ráno",afternoon:"popoludní",evening:"večer",night:"v noci"}},ordinalNumber$7=function t(e,a){var n=Number(e);return n+"."},localize$e={ordinalNumber:ordinalNumber$7,era:buildLocalizeFn({values:eraValues$7,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$7,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$7,defaultWidth:"wide",formattingValues:formattingMonthValues$2,defaultFormattingWidth:"wide"}),day:buildLocalizeFn({values:dayValues$7,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$7,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$7,defaultFormattingWidth:"wide"})};const localize$f=localize$e;var matchOrdinalNumberPattern$7=/^(\d+)\.?/i,parseOrdinalNumberPattern$7=/\d+/i,matchEraPatterns$7={narrow:/^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,abbreviated:/^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,wide:/^(pred Kristom|pred na[šs][íi]m letopo[čc]tom|po Kristovi|n[áa][šs]ho letopo[čc]tu)/i},parseEraPatterns$7={any:[/^pr/i,/^(po|n)/i]},matchQuarterPatterns$7={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]\. [šs]tvr[ťt]rok/i},parseQuarterPatterns$7={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$7={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|m[áa]j|j[úu]n|j[úu]l|aug|sep|okt|nov|dec)/i,wide:/^(janu[áa]ra?|febru[áa]ra?|(marec|marca)|apr[íi]la?|m[áa]ja?|j[úu]na?|j[úu]la?|augusta?|(september|septembra)|(okt[óo]ber|okt[óo]bra)|(november|novembra)|(december|decembra))/i},parseMonthPatterns$7={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^m[áa]j/i,/^j[úu]n/i,/^j[úu]l/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$7={narrow:/^[npusšp]/i,short:/^(ne|po|ut|st|št|pi|so)/i,abbreviated:/^(ne|po|ut|st|št|pi|so)/i,wide:/^(nede[ľl]a|pondelok|utorok|streda|[šs]tvrtok|piatok|sobota])/i},parseDayPatterns$7={narrow:[/^n/i,/^p/i,/^u/i,/^s/i,/^š/i,/^p/i,/^s/i],any:[/^n/i,/^po/i,/^u/i,/^st/i,/^(št|stv)/i,/^pi/i,/^so/i]},matchDayPeriodPatterns$7={narrow:/^(am|pm|(o )?poln\.?|(nap\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]\.?|(v n\.?|noc))/i,abbreviated:/^(am|pm|(o )?poln\.?|(napol\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]er|(v )?noci?)/i,any:/^(am|pm|(o )?polnoci?|(na)?poludnie|r[áa]no|popoludn(ie|í|i)|ve[čc]er|(v )?noci?)/i},parseDayPeriodPatterns$7={any:{am:/^am/i,pm:/^pm/i,midnight:/poln/i,noon:/^(nap|(na)?pol(\.|u))/i,morning:/^r[áa]no/i,afternoon:/^pop/i,evening:/^ve[čc]/i,night:/^(noc|v n\.)/i}},match$e={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$7,parsePattern:parseOrdinalNumberPattern$7,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$7,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$7,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$7,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$7,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$7,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$7,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$7,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$7,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$7,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$7,defaultParseWidth:"any"})};const match$f=match$e;var locale$7={code:"sk",formatDistance:formatDistance$f,formatLong:formatLong$f,formatRelative:formatRelative$f,localize:localize$f,match:match$f,options:{weekStartsOn:1,firstWeekContainsDate:4}};const sk=locale$7;function isPluralType(t){return t.one!==void 0}var formatDistanceLocale$6={lessThanXSeconds:{present:{one:"manj kot {{count}} sekunda",two:"manj kot {{count}} sekundi",few:"manj kot {{count}} sekunde",other:"manj kot {{count}} sekund"},past:{one:"manj kot {{count}} sekundo",two:"manj kot {{count}} sekundama",few:"manj kot {{count}} sekundami",other:"manj kot {{count}} sekundami"},future:{one:"manj kot {{count}} sekundo",two:"manj kot {{count}} sekundi",few:"manj kot {{count}} sekunde",other:"manj kot {{count}} sekund"}},xSeconds:{present:{one:"{{count}} sekunda",two:"{{count}} sekundi",few:"{{count}} sekunde",other:"{{count}} sekund"},past:{one:"{{count}} sekundo",two:"{{count}} sekundama",few:"{{count}} sekundami",other:"{{count}} sekundami"},future:{one:"{{count}} sekundo",two:"{{count}} sekundi",few:"{{count}} sekunde",other:"{{count}} sekund"}},halfAMinute:"pol minute",lessThanXMinutes:{present:{one:"manj kot {{count}} minuta",two:"manj kot {{count}} minuti",few:"manj kot {{count}} minute",other:"manj kot {{count}} minut"},past:{one:"manj kot {{count}} minuto",two:"manj kot {{count}} minutama",few:"manj kot {{count}} minutami",other:"manj kot {{count}} minutami"},future:{one:"manj kot {{count}} minuto",two:"manj kot {{count}} minuti",few:"manj kot {{count}} minute",other:"manj kot {{count}} minut"}},xMinutes:{present:{one:"{{count}} minuta",two:"{{count}} minuti",few:"{{count}} minute",other:"{{count}} minut"},past:{one:"{{count}} minuto",two:"{{count}} minutama",few:"{{count}} minutami",other:"{{count}} minutami"},future:{one:"{{count}} minuto",two:"{{count}} minuti",few:"{{count}} minute",other:"{{count}} minut"}},aboutXHours:{present:{one:"približno {{count}} ura",two:"približno {{count}} uri",few:"približno {{count}} ure",other:"približno {{count}} ur"},past:{one:"približno {{count}} uro",two:"približno {{count}} urama",few:"približno {{count}} urami",other:"približno {{count}} urami"},future:{one:"približno {{count}} uro",two:"približno {{count}} uri",few:"približno {{count}} ure",other:"približno {{count}} ur"}},xHours:{present:{one:"{{count}} ura",two:"{{count}} uri",few:"{{count}} ure",other:"{{count}} ur"},past:{one:"{{count}} uro",two:"{{count}} urama",few:"{{count}} urami",other:"{{count}} urami"},future:{one:"{{count}} uro",two:"{{count}} uri",few:"{{count}} ure",other:"{{count}} ur"}},xDays:{present:{one:"{{count}} dan",two:"{{count}} dni",few:"{{count}} dni",other:"{{count}} dni"},past:{one:"{{count}} dnem",two:"{{count}} dnevoma",few:"{{count}} dnevi",other:"{{count}} dnevi"},future:{one:"{{count}} dan",two:"{{count}} dni",few:"{{count}} dni",other:"{{count}} dni"}},aboutXWeeks:{one:"približno {{count}} teden",two:"približno {{count}} tedna",few:"približno {{count}} tedne",other:"približno {{count}} tednov"},xWeeks:{one:"{{count}} teden",two:"{{count}} tedna",few:"{{count}} tedne",other:"{{count}} tednov"},aboutXMonths:{present:{one:"približno {{count}} mesec",two:"približno {{count}} meseca",few:"približno {{count}} mesece",other:"približno {{count}} mesecev"},past:{one:"približno {{count}} mesecem",two:"približno {{count}} mesecema",few:"približno {{count}} meseci",other:"približno {{count}} meseci"},future:{one:"približno {{count}} mesec",two:"približno {{count}} meseca",few:"približno {{count}} mesece",other:"približno {{count}} mesecev"}},xMonths:{present:{one:"{{count}} mesec",two:"{{count}} meseca",few:"{{count}} meseci",other:"{{count}} mesecev"},past:{one:"{{count}} mesecem",two:"{{count}} mesecema",few:"{{count}} meseci",other:"{{count}} meseci"},future:{one:"{{count}} mesec",two:"{{count}} meseca",few:"{{count}} mesece",other:"{{count}} mesecev"}},aboutXYears:{present:{one:"približno {{count}} leto",two:"približno {{count}} leti",few:"približno {{count}} leta",other:"približno {{count}} let"},past:{one:"približno {{count}} letom",two:"približno {{count}} letoma",few:"približno {{count}} leti",other:"približno {{count}} leti"},future:{one:"približno {{count}} leto",two:"približno {{count}} leti",few:"približno {{count}} leta",other:"približno {{count}} let"}},xYears:{present:{one:"{{count}} leto",two:"{{count}} leti",few:"{{count}} leta",other:"{{count}} let"},past:{one:"{{count}} letom",two:"{{count}} letoma",few:"{{count}} leti",other:"{{count}} leti"},future:{one:"{{count}} leto",two:"{{count}} leti",few:"{{count}} leta",other:"{{count}} let"}},overXYears:{present:{one:"več kot {{count}} leto",two:"več kot {{count}} leti",few:"več kot {{count}} leta",other:"več kot {{count}} let"},past:{one:"več kot {{count}} letom",two:"več kot {{count}} letoma",few:"več kot {{count}} leti",other:"več kot {{count}} leti"},future:{one:"več kot {{count}} leto",two:"več kot {{count}} leti",few:"več kot {{count}} leta",other:"več kot {{count}} let"}},almostXYears:{present:{one:"skoraj {{count}} leto",two:"skoraj {{count}} leti",few:"skoraj {{count}} leta",other:"skoraj {{count}} let"},past:{one:"skoraj {{count}} letom",two:"skoraj {{count}} letoma",few:"skoraj {{count}} leti",other:"skoraj {{count}} leti"},future:{one:"skoraj {{count}} leto",two:"skoraj {{count}} leti",few:"skoraj {{count}} leta",other:"skoraj {{count}} let"}}};function getFormFromCount(t){switch(t%100){case 1:return"one";case 2:return"two";case 3:case 4:return"few";default:return"other"}}var formatDistance$c=function t(e,a,n){var r="",i="present";n!=null&&n.addSuffix&&(n.comparison&&n.comparison>0?(i="future",r="čez "):(i="past",r="pred "));var o=formatDistanceLocale$6[e];if(typeof o=="string")r+=o;else{var s=getFormFromCount(a);isPluralType(o)?r+=o[s].replace("{{count}}",String(a)):r+=o[i][s].replace("{{count}}",String(a))}return r};const formatDistance$d=formatDistance$c;var dateFormats$6={full:"EEEE, dd. MMMM y",long:"dd. MMMM y",medium:"d. MMM y",short:"d. MM. yy"},timeFormats$6={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$6={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$c={date:buildFormatLongFn({formats:dateFormats$6,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$6,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$6,defaultWidth:"full"})};const formatLong$d=formatLong$c;var formatRelativeLocale$6={lastWeek:function t(e){var a=e.getUTCDay();switch(a){case 0:return"'prejšnjo nedeljo ob' p";case 3:return"'prejšnjo sredo ob' p";case 6:return"'prejšnjo soboto ob' p";default:return"'prejšnji' EEEE 'ob' p"}},yesterday:"'včeraj ob' p",today:"'danes ob' p",tomorrow:"'jutri ob' p",nextWeek:function t(e){var a=e.getUTCDay();switch(a){case 0:return"'naslednjo nedeljo ob' p";case 3:return"'naslednjo sredo ob' p";case 6:return"'naslednjo soboto ob' p";default:return"'naslednji' EEEE 'ob' p"}},other:"P"},formatRelative$c=function t(e,a,n,r){var i=formatRelativeLocale$6[e];return typeof i=="function"?i(a):i};const formatRelative$d=formatRelative$c;var eraValues$6={narrow:["pr. n. št.","po n. št."],abbreviated:["pr. n. št.","po n. št."],wide:["pred našim štetjem","po našem štetju"]},quarterValues$6={narrow:["1","2","3","4"],abbreviated:["1. čet.","2. čet.","3. čet.","4. čet."],wide:["1. četrtletje","2. četrtletje","3. četrtletje","4. četrtletje"]},monthValues$6={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","avg.","sep.","okt.","nov.","dec."],wide:["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december"]},dayValues$6={narrow:["n","p","t","s","č","p","s"],short:["ned.","pon.","tor.","sre.","čet.","pet.","sob."],abbreviated:["ned.","pon.","tor.","sre.","čet.","pet.","sob."],wide:["nedelja","ponedeljek","torek","sreda","četrtek","petek","sobota"]},dayPeriodValues$6={narrow:{am:"d",pm:"p",midnight:"24.00",noon:"12.00",morning:"j",afternoon:"p",evening:"v",night:"n"},abbreviated:{am:"dop.",pm:"pop.",midnight:"poln.",noon:"pold.",morning:"jut.",afternoon:"pop.",evening:"več.",night:"noč"},wide:{am:"dop.",pm:"pop.",midnight:"polnoč",noon:"poldne",morning:"jutro",afternoon:"popoldne",evening:"večer",night:"noč"}},formattingDayPeriodValues$6={narrow:{am:"d",pm:"p",midnight:"24.00",noon:"12.00",morning:"zj",afternoon:"p",evening:"zv",night:"po"},abbreviated:{am:"dop.",pm:"pop.",midnight:"opoln.",noon:"opold.",morning:"zjut.",afternoon:"pop.",evening:"zveč.",night:"ponoči"},wide:{am:"dop.",pm:"pop.",midnight:"opolnoči",noon:"opoldne",morning:"zjutraj",afternoon:"popoldan",evening:"zvečer",night:"ponoči"}},ordinalNumber$6=function t(e,a){var n=Number(e);return n+"."},localize$c={ordinalNumber:ordinalNumber$6,era:buildLocalizeFn({values:eraValues$6,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$6,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$6,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$6,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$6,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$6,defaultFormattingWidth:"wide"})};const localize$d=localize$c;var matchOrdinalNumberPattern$6=/^(\d+)\./i,parseOrdinalNumberPattern$6=/\d+/i,matchEraPatterns$6={abbreviated:/^(pr\. n\. št\.|po n\. št\.)/i,wide:/^(pred Kristusom|pred na[sš]im [sš]tetjem|po Kristusu|po na[sš]em [sš]tetju|na[sš]ega [sš]tetja)/i},parseEraPatterns$6={any:[/^pr/i,/^(po|na[sš]em)/i]},matchQuarterPatterns$6={narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?[čc]et\.?/i,wide:/^[1234]\. [čc]etrtletje/i},parseQuarterPatterns$6={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$6={narrow:/^[jfmasond]/i,abbreviated:/^(jan\.|feb\.|mar\.|apr\.|maj|jun\.|jul\.|avg\.|sep\.|okt\.|nov\.|dec\.)/i,wide:/^(januar|februar|marec|april|maj|junij|julij|avgust|september|oktober|november|december)/i},parseMonthPatterns$6={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],abbreviated:[/^ja/i,/^fe/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^av/i,/^s/i,/^o/i,/^n/i,/^d/i],wide:[/^ja/i,/^fe/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^av/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$6={narrow:/^[nptsčc]/i,short:/^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,abbreviated:/^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,wide:/^(nedelja|ponedeljek|torek|sreda|[cč]etrtek|petek|sobota)/i},parseDayPatterns$6={narrow:[/^n/i,/^p/i,/^t/i,/^s/i,/^[cč]/i,/^p/i,/^s/i],any:[/^n/i,/^po/i,/^t/i,/^sr/i,/^[cč]/i,/^pe/i,/^so/i]},matchDayPeriodPatterns$6={narrow:/^(d|po?|z?v|n|z?j|24\.00|12\.00)/i,any:/^(dop\.|pop\.|o?poln(\.|o[cč]i?)|o?pold(\.|ne)|z?ve[cč](\.|er)|(po)?no[cč]i?|popold(ne|an)|jut(\.|ro)|zjut(\.|raj))/i},parseDayPeriodPatterns$6={narrow:{am:/^d/i,pm:/^p/i,midnight:/^24/i,noon:/^12/i,morning:/^(z?j)/i,afternoon:/^p/i,evening:/^(z?v)/i,night:/^(n|po)/i},any:{am:/^dop\./i,pm:/^pop\./i,midnight:/^o?poln/i,noon:/^o?pold/i,morning:/j/i,afternoon:/^pop\./i,evening:/^z?ve/i,night:/(po)?no/i}},match$c={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$6,parsePattern:parseOrdinalNumberPattern$6,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$6,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$6,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$6,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$6,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$6,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$6,defaultParseWidth:"wide"}),day:buildMatchFn({matchPatterns:matchDayPatterns$6,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$6,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$6,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$6,defaultParseWidth:"any"})};const match$d=match$c;var locale$6={code:"sl",formatDistance:formatDistance$d,formatLong:formatLong$d,formatRelative:formatRelative$d,localize:localize$d,match:match$d,options:{weekStartsOn:1,firstWeekContainsDate:1}};const sl=locale$6;var formatDistanceLocale$5={lessThanXSeconds:{one:"mindre än en sekund",other:"mindre än {{count}} sekunder"},xSeconds:{one:"en sekund",other:"{{count}} sekunder"},halfAMinute:"en halv minut",lessThanXMinutes:{one:"mindre än en minut",other:"mindre än {{count}} minuter"},xMinutes:{one:"en minut",other:"{{count}} minuter"},aboutXHours:{one:"ungefär en timme",other:"ungefär {{count}} timmar"},xHours:{one:"en timme",other:"{{count}} timmar"},xDays:{one:"en dag",other:"{{count}} dagar"},aboutXWeeks:{one:"ungefär en vecka",other:"ungefär {{count}} vecka"},xWeeks:{one:"en vecka",other:"{{count}} vecka"},aboutXMonths:{one:"ungefär en månad",other:"ungefär {{count}} månader"},xMonths:{one:"en månad",other:"{{count}} månader"},aboutXYears:{one:"ungefär ett år",other:"ungefär {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"över ett år",other:"över {{count}} år"},almostXYears:{one:"nästan ett år",other:"nästan {{count}} år"}},wordMapping=["noll","en","två","tre","fyra","fem","sex","sju","åtta","nio","tio","elva","tolv"],formatDistance$a=function t(e,a,n){var r,i=formatDistanceLocale$5[e];return typeof i=="string"?r=i:a===1?r=i.one:n&&n.onlyNumeric?r=i.other.replace("{{count}}",String(a)):r=i.other.replace("{{count}}",a<13?wordMapping[a]:String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"om "+r:r+" sedan":r};const formatDistance$b=formatDistance$a;var dateFormats$5={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"y-MM-dd"},timeFormats$5={full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$5={full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$a={date:buildFormatLongFn({formats:dateFormats$5,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$5,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$5,defaultWidth:"full"})};const formatLong$b=formatLong$a;var formatRelativeLocale$5={lastWeek:"'i' EEEE's kl.' p",yesterday:"'igår kl.' p",today:"'idag kl.' p",tomorrow:"'imorgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},formatRelative$a=function t(e,a,n,r){return formatRelativeLocale$5[e]};const formatRelative$b=formatRelative$a;var eraValues$5={narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["före Kristus","efter Kristus"]},quarterValues$5={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"]},monthValues$5={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},dayValues$5={narrow:["S","M","T","O","T","F","L"],short:["sö","må","ti","on","to","fr","lö"],abbreviated:["sön","mån","tis","ons","tors","fre","lör"],wide:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"]},dayPeriodValues$5={narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"morg.",afternoon:"efterm.",evening:"kväll",night:"natt"},abbreviated:{am:"f.m.",pm:"e.m.",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"efterm.",evening:"kväll",night:"natt"},wide:{am:"förmiddag",pm:"eftermiddag",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"eftermiddag",evening:"kväll",night:"natt"}},formattingDayPeriodValues$5={narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},abbreviated:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},wide:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morgonen",afternoon:"på eftermiddagen",evening:"på kvällen",night:"på natten"}},ordinalNumber$5=function t(e,a){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:case 2:return n+":a"}return n+":e"},localize$a={ordinalNumber:ordinalNumber$5,era:buildLocalizeFn({values:eraValues$5,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$5,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$5,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$5,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$5,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$5,defaultFormattingWidth:"wide"})};const localize$b=localize$a;var matchOrdinalNumberPattern$5=/^(\d+)(:a|:e)?/i,parseOrdinalNumberPattern$5=/\d+/i,matchEraPatterns$5={narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},parseEraPatterns$5={any:[/^f/i,/^[ev]/i]},matchQuarterPatterns$5={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},parseQuarterPatterns$5={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$5={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},parseMonthPatterns$5={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$5={narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},parseDayPatterns$5={any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},matchDayPeriodPatterns$5={any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},parseDayPeriodPatterns$5={any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},match$a={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$5,parsePattern:parseOrdinalNumberPattern$5,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$5,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$5,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$5,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$5,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$5,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$5,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$5,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$5,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$5,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$5,defaultParseWidth:"any"})};const match$b=match$a;var locale$5={code:"sv",formatDistance:formatDistance$b,formatLong:formatLong$b,formatRelative:formatRelative$b,localize:localize$b,match:match$b,options:{weekStartsOn:1,firstWeekContainsDate:4}};const sv=locale$5;var formatDistanceLocale$4={lessThanXSeconds:{one:"bir saniyeden az",other:"{{count}} saniyeden az"},xSeconds:{one:"1 saniye",other:"{{count}} saniye"},halfAMinute:"yarım dakika",lessThanXMinutes:{one:"bir dakikadan az",other:"{{count}} dakikadan az"},xMinutes:{one:"1 dakika",other:"{{count}} dakika"},aboutXHours:{one:"yaklaşık 1 saat",other:"yaklaşık {{count}} saat"},xHours:{one:"1 saat",other:"{{count}} saat"},xDays:{one:"1 gün",other:"{{count}} gün"},aboutXWeeks:{one:"yaklaşık 1 hafta",other:"yaklaşık {{count}} hafta"},xWeeks:{one:"1 hafta",other:"{{count}} hafta"},aboutXMonths:{one:"yaklaşık 1 ay",other:"yaklaşık {{count}} ay"},xMonths:{one:"1 ay",other:"{{count}} ay"},aboutXYears:{one:"yaklaşık 1 yıl",other:"yaklaşık {{count}} yıl"},xYears:{one:"1 yıl",other:"{{count}} yıl"},overXYears:{one:"1 yıldan fazla",other:"{{count}} yıldan fazla"},almostXYears:{one:"neredeyse 1 yıl",other:"neredeyse {{count}} yıl"}},formatDistance$8=function t(e,a,n){var r,i=formatDistanceLocale$4[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+" sonra":r+" önce":r};const formatDistance$9=formatDistance$8;var dateFormats$4={full:"d MMMM y EEEE",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.yyyy"},timeFormats$4={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$4={full:"{{date}} 'saat' {{time}}",long:"{{date}} 'saat' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$8={date:buildFormatLongFn({formats:dateFormats$4,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$4,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$4,defaultWidth:"full"})};const formatLong$9=formatLong$8;var formatRelativeLocale$4={lastWeek:"'geçen hafta' eeee 'saat' p",yesterday:"'dün saat' p",today:"'bugün saat' p",tomorrow:"'yarın saat' p",nextWeek:"eeee 'saat' p",other:"P"},formatRelative$8=function t(e,a,n,r){return formatRelativeLocale$4[e]};const formatRelative$9=formatRelative$8;var eraValues$4={narrow:["MÖ","MS"],abbreviated:["MÖ","MS"],wide:["Milattan Önce","Milattan Sonra"]},quarterValues$4={narrow:["1","2","3","4"],abbreviated:["1Ç","2Ç","3Ç","4Ç"],wide:["İlk çeyrek","İkinci Çeyrek","Üçüncü çeyrek","Son çeyrek"]},monthValues$4={narrow:["O","Ş","M","N","M","H","T","A","E","E","K","A"],abbreviated:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],wide:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"]},dayValues$4={narrow:["P","P","S","Ç","P","C","C"],short:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],abbreviated:["Paz","Pzt","Sal","Çar","Per","Cum","Cts"],wide:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},dayPeriodValues$4={narrow:{am:"öö",pm:"ös",midnight:"gy",noon:"ö",morning:"sa",afternoon:"ös",evening:"ak",night:"ge"},abbreviated:{am:"ÖÖ",pm:"ÖS",midnight:"gece yarısı",noon:"öğle",morning:"sabah",afternoon:"öğleden sonra",evening:"akşam",night:"gece"},wide:{am:"Ö.Ö.",pm:"Ö.S.",midnight:"gece yarısı",noon:"öğle",morning:"sabah",afternoon:"öğleden sonra",evening:"akşam",night:"gece"}},formattingDayPeriodValues$4={narrow:{am:"öö",pm:"ös",midnight:"gy",noon:"ö",morning:"sa",afternoon:"ös",evening:"ak",night:"ge"},abbreviated:{am:"ÖÖ",pm:"ÖS",midnight:"gece yarısı",noon:"öğlen",morning:"sabahleyin",afternoon:"öğleden sonra",evening:"akşamleyin",night:"geceleyin"},wide:{am:"ö.ö.",pm:"ö.s.",midnight:"gece yarısı",noon:"öğlen",morning:"sabahleyin",afternoon:"öğleden sonra",evening:"akşamleyin",night:"geceleyin"}},ordinalNumber$4=function t(e,a){var n=Number(e);return n+"."},localize$8={ordinalNumber:ordinalNumber$4,era:buildLocalizeFn({values:eraValues$4,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$4,defaultWidth:"wide",argumentCallback:function t(e){return Number(e)-1}}),month:buildLocalizeFn({values:monthValues$4,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$4,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$4,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$4,defaultFormattingWidth:"wide"})};const localize$9=localize$8;var matchOrdinalNumberPattern$4=/^(\d+)(\.)?/i,parseOrdinalNumberPattern$4=/\d+/i,matchEraPatterns$4={narrow:/^(mö|ms)/i,abbreviated:/^(mö|ms)/i,wide:/^(milattan önce|milattan sonra)/i},parseEraPatterns$4={any:[/(^mö|^milattan önce)/i,/(^ms|^milattan sonra)/i]},matchQuarterPatterns$4={narrow:/^[1234]/i,abbreviated:/^[1234]ç/i,wide:/^((i|İ)lk|(i|İ)kinci|üçüncü|son) çeyrek/i},parseQuarterPatterns$4={any:[/1/i,/2/i,/3/i,/4/i],abbreviated:[/1ç/i,/2ç/i,/3ç/i,/4ç/i],wide:[/^(i|İ)lk çeyrek/i,/(i|İ)kinci çeyrek/i,/üçüncü çeyrek/i,/son çeyrek/i]},matchMonthPatterns$4={narrow:/^[oşmnhtaek]/i,abbreviated:/^(oca|şub|mar|nis|may|haz|tem|ağu|eyl|eki|kas|ara)/i,wide:/^(ocak|şubat|mart|nisan|mayıs|haziran|temmuz|ağustos|eylül|ekim|kasım|aralık)/i},parseMonthPatterns$4={narrow:[/^o/i,/^ş/i,/^m/i,/^n/i,/^m/i,/^h/i,/^t/i,/^a/i,/^e/i,/^e/i,/^k/i,/^a/i],any:[/^o/i,/^ş/i,/^mar/i,/^n/i,/^may/i,/^h/i,/^t/i,/^ağ/i,/^ey/i,/^ek/i,/^k/i,/^ar/i]},matchDayPatterns$4={narrow:/^[psçc]/i,short:/^(pz|pt|sa|ça|pe|cu|ct)/i,abbreviated:/^(paz|pzt|sal|çar|per|cum|cts)/i,wide:/^(pazar(?!tesi)|pazartesi|salı|çarşamba|perşembe|cuma(?!rtesi)|cumartesi)/i},parseDayPatterns$4={narrow:[/^p/i,/^p/i,/^s/i,/^ç/i,/^p/i,/^c/i,/^c/i],any:[/^pz/i,/^pt/i,/^sa/i,/^ça/i,/^pe/i,/^cu/i,/^ct/i],wide:[/^pazar(?!tesi)/i,/^pazartesi/i,/^salı/i,/^çarşamba/i,/^perşembe/i,/^cuma(?!rtesi)/i,/^cumartesi/i]},matchDayPeriodPatterns$4={narrow:/^(öö|ös|gy|ö|sa|ös|ak|ge)/i,any:/^(ö\.?\s?[ös]\.?|öğleden sonra|gece yarısı|öğle|(sabah|öğ|akşam|gece)(leyin))/i},parseDayPeriodPatterns$4={any:{am:/^ö\.?ö\.?/i,pm:/^ö\.?s\.?/i,midnight:/^(gy|gece yarısı)/i,noon:/^öğ/i,morning:/^sa/i,afternoon:/^öğleden sonra/i,evening:/^ak/i,night:/^ge/i}},match$8={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$4,parsePattern:parseOrdinalNumberPattern$4,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$4,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$4,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$4,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$4,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$4,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$4,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$4,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$4,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$4,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$4,defaultParseWidth:"any"})};const match$9=match$8;var locale$4={code:"tr",formatDistance:formatDistance$9,formatLong:formatLong$9,formatRelative:formatRelative$9,localize:localize$9,match:match$9,options:{weekStartsOn:1,firstWeekContainsDate:1}};const tr=locale$4;function declension(t,e){if(t.one!==void 0&&e===1)return t.one;var a=e%10,n=e%100;return a===1&&n!==11?t.singularNominative.replace("{{count}}",String(e)):a>=2&&a<=4&&(n<10||n>20)?t.singularGenitive.replace("{{count}}",String(e)):t.pluralGenitive.replace("{{count}}",String(e))}function buildLocalizeTokenFn(t){return function(e,a){return a&&a.addSuffix?a.comparison&&a.comparison>0?t.future?declension(t.future,e):"за "+declension(t.regular,e):t.past?declension(t.past,e):declension(t.regular,e)+" тому":declension(t.regular,e)}}var halfAtMinute=function t(e,a){return a&&a.addSuffix?a.comparison&&a.comparison>0?"за півхвилини":"півхвилини тому":"півхвилини"},formatDistanceLocale$3={lessThanXSeconds:buildLocalizeTokenFn({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:buildLocalizeTokenFn({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунди",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду тому",singularGenitive:"{{count}} секунди тому",pluralGenitive:"{{count}} секунд тому"},future:{singularNominative:"за {{count}} секунду",singularGenitive:"за {{count}} секунди",pluralGenitive:"за {{count}} секунд"}}),halfAMinute:halfAtMinute,lessThanXMinutes:buildLocalizeTokenFn({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:buildLocalizeTokenFn({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:buildLocalizeTokenFn({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:buildLocalizeTokenFn({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:buildLocalizeTokenFn({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:buildLocalizeTokenFn({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:buildLocalizeTokenFn({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:buildLocalizeTokenFn({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:buildLocalizeTokenFn({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:buildLocalizeTokenFn({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:buildLocalizeTokenFn({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:buildLocalizeTokenFn({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:buildLocalizeTokenFn({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},formatDistance$6=function t(e,a,n){return n=n||{},formatDistanceLocale$3[e](a,n)};const formatDistance$7=formatDistance$6;var dateFormats$3={full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},timeFormats$3={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},dateTimeFormats$3={full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$6={date:buildFormatLongFn({formats:dateFormats$3,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$3,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$3,defaultWidth:"full"})};const formatLong$7=formatLong$6;var accusativeWeekdays=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function lastWeek(t){var e=accusativeWeekdays[t];switch(t){case 0:case 3:case 5:case 6:return"'у минулу "+e+" о' p";case 1:case 2:case 4:return"'у минулий "+e+" о' p"}}function thisWeek(t){var e=accusativeWeekdays[t];return"'у "+e+" о' p"}function nextWeek(t){var e=accusativeWeekdays[t];switch(t){case 0:case 3:case 5:case 6:return"'у наступну "+e+" о' p";case 1:case 2:case 4:return"'у наступний "+e+" о' p"}}var lastWeekFormat=function t(e,a,n){var r=toDate(e),i=r.getUTCDay();return isSameUTCWeek(r,a,n)?thisWeek(i):lastWeek(i)},nextWeekFormat=function t(e,a,n){var r=toDate(e),i=r.getUTCDay();return isSameUTCWeek(r,a,n)?thisWeek(i):nextWeek(i)},formatRelativeLocale$3={lastWeek:lastWeekFormat,yesterday:"'вчора о' p",today:"'сьогодні о' p",tomorrow:"'завтра о' p",nextWeek:nextWeekFormat,other:"P"},formatRelative$6=function t(e,a,n,r){var i=formatRelativeLocale$3[e];return typeof i=="function"?i(a,n,r):i};const formatRelative$7=formatRelative$6;var eraValues$3={narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},quarterValues$3={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},monthValues$3={narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},formattingMonthValues$1={narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},dayValues$3={narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},dayPeriodValues$3={narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранок",afternoon:"день",evening:"вечір",night:"ніч"}},formattingDayPeriodValues$3={narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"}},ordinalNumber$3=function t(e,a){var n=String(a==null?void 0:a.unit),r=Number(e),i;return n==="date"?r===3||r===23?i="-є":i="-е":n==="minute"||n==="second"||n==="hour"?i="-а":i="-й",r+i},localize$6={ordinalNumber:ordinalNumber$3,era:buildLocalizeFn({values:eraValues$3,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$3,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$3,defaultWidth:"wide",formattingValues:formattingMonthValues$1,defaultFormattingWidth:"wide"}),day:buildLocalizeFn({values:dayValues$3,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$3,defaultWidth:"any",formattingValues:formattingDayPeriodValues$3,defaultFormattingWidth:"wide"})};const localize$7=localize$6;var matchOrdinalNumberPattern$3=/^(\d+)(-?(е|й|є|а|я))?/i,parseOrdinalNumberPattern$3=/\d+/i,matchEraPatterns$3={narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},parseEraPatterns$3={any:[/^д/i,/^н/i]},matchQuarterPatterns$3={narrow:/^[1234]/i,abbreviated:/^[1234](-?[иі]?й?)? кв.?/i,wide:/^[1234](-?[иі]?й?)? квартал/i},parseQuarterPatterns$3={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$3={narrow:/^[слбктчвжг]/i,abbreviated:/^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,wide:/^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i},parseMonthPatterns$3={narrow:[/^с/i,/^л/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^с/i,/^в/i,/^ж/i,/^л/i,/^г/i],any:[/^сі/i,/^лю/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^лип/i,/^се/i,/^в/i,/^ж/i,/^лис/i,/^г/i]},matchDayPatterns$3={narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)\.?/i,abbreviated:/^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,wide:/^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i},parseDayPatterns$3={narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[он]/i,/^в/i,/^с[ер]/i,/^ч/i,/^п\W*?[ят]/i,/^с[уб]/i]},matchDayPeriodPatterns$3={narrow:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,abbreviated:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,wide:/^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i},parseDayPeriodPatterns$3={any:{am:/^дп/i,pm:/^пп/i,midnight:/^півн/i,noon:/^пол/i,morning:/^р/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},match$6={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$3,parsePattern:parseOrdinalNumberPattern$3,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$3,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$3,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$3,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$3,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseDayPeriodPatterns$3,defaultParseWidth:"any"})};const match$7=match$6;var locale$3={code:"uk",formatDistance:formatDistance$7,formatLong:formatLong$7,formatRelative:formatRelative$7,localize:localize$7,match:match$7,options:{weekStartsOn:1,firstWeekContainsDate:1}};const uk=locale$3;var formatDistanceLocale$2={lessThanXSeconds:{one:"dưới 1 giây",other:"dưới {{count}} giây"},xSeconds:{one:"1 giây",other:"{{count}} giây"},halfAMinute:"nửa phút",lessThanXMinutes:{one:"dưới 1 phút",other:"dưới {{count}} phút"},xMinutes:{one:"1 phút",other:"{{count}} phút"},aboutXHours:{one:"khoảng 1 giờ",other:"khoảng {{count}} giờ"},xHours:{one:"1 giờ",other:"{{count}} giờ"},xDays:{one:"1 ngày",other:"{{count}} ngày"},aboutXWeeks:{one:"khoảng 1 tuần",other:"khoảng {{count}} tuần"},xWeeks:{one:"1 tuần",other:"{{count}} tuần"},aboutXMonths:{one:"khoảng 1 tháng",other:"khoảng {{count}} tháng"},xMonths:{one:"1 tháng",other:"{{count}} tháng"},aboutXYears:{one:"khoảng 1 năm",other:"khoảng {{count}} năm"},xYears:{one:"1 năm",other:"{{count}} năm"},overXYears:{one:"hơn 1 năm",other:"hơn {{count}} năm"},almostXYears:{one:"gần 1 năm",other:"gần {{count}} năm"}},formatDistance$4=function t(e,a,n){var r,i=formatDistanceLocale$2[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+" nữa":r+" trước":r};const formatDistance$5=formatDistance$4;var dateFormats$2={full:"EEEE, 'ngày' d MMMM 'năm' y",long:"'ngày' d MMMM 'năm' y",medium:"d MMM 'năm' y",short:"dd/MM/y"},timeFormats$2={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$2={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$4={date:buildFormatLongFn({formats:dateFormats$2,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$2,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$2,defaultWidth:"full"})};const formatLong$5=formatLong$4;var formatRelativeLocale$2={lastWeek:"eeee 'tuần trước vào lúc' p",yesterday:"'hôm qua vào lúc' p",today:"'hôm nay vào lúc' p",tomorrow:"'ngày mai vào lúc' p",nextWeek:"eeee 'tới vào lúc' p",other:"P"},formatRelative$4=function t(e,a,n,r){return formatRelativeLocale$2[e]};const formatRelative$5=formatRelative$4;var eraValues$2={narrow:["TCN","SCN"],abbreviated:["trước CN","sau CN"],wide:["trước Công Nguyên","sau Công Nguyên"]},quarterValues$2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["Quý 1","Quý 2","Quý 3","Quý 4"]},formattingQuarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["quý I","quý II","quý III","quý IV"]},monthValues$2={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["Thg 1","Thg 2","Thg 3","Thg 4","Thg 5","Thg 6","Thg 7","Thg 8","Thg 9","Thg 10","Thg 11","Thg 12"],wide:["Tháng Một","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai"]},formattingMonthValues={narrow:["01","02","03","04","05","06","07","08","09","10","11","12"],abbreviated:["thg 1","thg 2","thg 3","thg 4","thg 5","thg 6","thg 7","thg 8","thg 9","thg 10","thg 11","thg 12"],wide:["tháng 01","tháng 02","tháng 03","tháng 04","tháng 05","tháng 06","tháng 07","tháng 08","tháng 09","tháng 10","tháng 11","tháng 12"]},dayValues$2={narrow:["CN","T2","T3","T4","T5","T6","T7"],short:["CN","Th 2","Th 3","Th 4","Th 5","Th 6","Th 7"],abbreviated:["CN","Thứ 2","Thứ 3","Thứ 4","Thứ 5","Thứ 6","Thứ 7"],wide:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"]},dayPeriodValues$2={narrow:{am:"am",pm:"pm",midnight:"nửa đêm",noon:"tr",morning:"sg",afternoon:"ch",evening:"tối",night:"đêm"},abbreviated:{am:"AM",pm:"PM",midnight:"nửa đêm",noon:"trưa",morning:"sáng",afternoon:"chiều",evening:"tối",night:"đêm"},wide:{am:"SA",pm:"CH",midnight:"nửa đêm",noon:"trưa",morning:"sáng",afternoon:"chiều",evening:"tối",night:"đêm"}},formattingDayPeriodValues$2={narrow:{am:"am",pm:"pm",midnight:"nửa đêm",noon:"tr",morning:"sg",afternoon:"ch",evening:"tối",night:"đêm"},abbreviated:{am:"AM",pm:"PM",midnight:"nửa đêm",noon:"trưa",morning:"sáng",afternoon:"chiều",evening:"tối",night:"đêm"},wide:{am:"SA",pm:"CH",midnight:"nửa đêm",noon:"giữa trưa",morning:"vào buổi sáng",afternoon:"vào buổi chiều",evening:"vào buổi tối",night:"vào ban đêm"}},ordinalNumber$2=function t(e,a){var n=Number(e),r=a==null?void 0:a.unit;if(r==="quarter")switch(n){case 1:return"I";case 2:return"II";case 3:return"III";case 4:return"IV"}else if(r==="day")switch(n){case 1:return"thứ 2";case 2:return"thứ 3";case 3:return"thứ 4";case 4:return"thứ 5";case 5:return"thứ 6";case 6:return"thứ 7";case 7:return"chủ nhật"}else{if(r==="week")return n===1?"thứ nhất":"thứ "+n;if(r==="dayOfYear")return n===1?"đầu tiên":"thứ "+n}return String(n)},localize$4={ordinalNumber:ordinalNumber$2,era:buildLocalizeFn({values:eraValues$2,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$2,defaultWidth:"wide",formattingValues:formattingQuarterValues,defaultFormattingWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$2,defaultWidth:"wide",formattingValues:formattingMonthValues,defaultFormattingWidth:"wide"}),day:buildLocalizeFn({values:dayValues$2,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$2,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$2,defaultFormattingWidth:"wide"})};const localize$5=localize$4;var matchOrdinalNumberPattern$2=/^(\d+)/i,parseOrdinalNumberPattern$2=/\d+/i,matchEraPatterns$2={narrow:/^(tcn|scn)/i,abbreviated:/^(trước CN|sau CN)/i,wide:/^(trước Công Nguyên|sau Công Nguyên)/i},parseEraPatterns$2={any:[/^t/i,/^s/i]},matchQuarterPatterns$2={narrow:/^([1234]|i{1,3}v?)/i,abbreviated:/^q([1234]|i{1,3}v?)/i,wide:/^quý ([1234]|i{1,3}v?)/i},parseQuarterPatterns$2={any:[/(1|i)$/i,/(2|ii)$/i,/(3|iii)$/i,/(4|iv)$/i]},matchMonthPatterns$2={narrow:/^(0?[2-9]|10|11|12|0?1)/i,abbreviated:/^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,wide:/^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i},parseMonthPatterns$2={narrow:[/0?1$/i,/0?2/i,/3/,/4/,/5/,/6/,/7/,/8/,/9/,/10/,/11/,/12/],abbreviated:[/^thg[ _]?0?1(?!\d)/i,/^thg[ _]?0?2/i,/^thg[ _]?0?3/i,/^thg[ _]?0?4/i,/^thg[ _]?0?5/i,/^thg[ _]?0?6/i,/^thg[ _]?0?7/i,/^thg[ _]?0?8/i,/^thg[ _]?0?9/i,/^thg[ _]?10/i,/^thg[ _]?11/i,/^thg[ _]?12/i],wide:[/^tháng ?(Một|0?1(?!\d))/i,/^tháng ?(Hai|0?2)/i,/^tháng ?(Ba|0?3)/i,/^tháng ?(Tư|0?4)/i,/^tháng ?(Năm|0?5)/i,/^tháng ?(Sáu|0?6)/i,/^tháng ?(Bảy|0?7)/i,/^tháng ?(Tám|0?8)/i,/^tháng ?(Chín|0?9)/i,/^tháng ?(Mười|10)/i,/^tháng ?(Mười ?Một|11)/i,/^tháng ?(Mười ?Hai|12)/i]},matchDayPatterns$2={narrow:/^(CN|T2|T3|T4|T5|T6|T7)/i,short:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,abbreviated:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,wide:/^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i},parseDayPatterns$2={narrow:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],short:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],abbreviated:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],wide:[/(Chủ|Chúa) ?Nhật/i,/Hai/i,/Ba/i,/Tư/i,/Năm/i,/Sáu/i,/Bảy/i]},matchDayPeriodPatterns$2={narrow:/^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,abbreviated:/^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,wide:/^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i},parseDayPeriodPatterns$2={any:{am:/^(a|sa)/i,pm:/^(p|ch[^i]*)/i,midnight:/nửa đêm/i,noon:/trưa/i,morning:/sáng/i,afternoon:/chiều/i,evening:/tối/i,night:/^đêm/i}},match$4={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$2,parsePattern:parseOrdinalNumberPattern$2,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$2,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$2,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$2,defaultParseWidth:"wide"}),day:buildMatchFn({matchPatterns:matchDayPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$2,defaultParseWidth:"wide"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseDayPeriodPatterns$2,defaultParseWidth:"any"})};const match$5=match$4;var locale$2={code:"vi",formatDistance:formatDistance$5,formatLong:formatLong$5,formatRelative:formatRelative$5,localize:localize$5,match:match$5,options:{weekStartsOn:1,firstWeekContainsDate:1}};const vi=locale$2;var formatDistanceLocale$1={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},formatDistance$2=function t(e,a,n){var r,i=formatDistanceLocale$1[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r};const formatDistance$3=formatDistance$2;var dateFormats$1={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},timeFormats$1={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},dateTimeFormats$1={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong$2={date:buildFormatLongFn({formats:dateFormats$1,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$1,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$1,defaultWidth:"full"})};const formatLong$3=formatLong$2;function checkWeek(t,e,a){var n="eeee p";return isSameUTCWeek(t,e,a)?n:t.getTime()>e.getTime()?"'下个'"+n:"'上个'"+n}var formatRelativeLocale$1={lastWeek:checkWeek,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:checkWeek,other:"PP p"},formatRelative$2=function t(e,a,n,r){var i=formatRelativeLocale$1[e];return typeof i=="function"?i(a,n,r):i};const formatRelative$3=formatRelative$2;var eraValues$1={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},quarterValues$1={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},monthValues$1={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},dayValues$1={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},dayPeriodValues$1={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},formattingDayPeriodValues$1={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},ordinalNumber$1=function t(e,a){var n=Number(e);switch(a==null?void 0:a.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},localize$2={ordinalNumber:ordinalNumber$1,era:buildLocalizeFn({values:eraValues$1,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$1,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues$1,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$1,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$1,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$1,defaultFormattingWidth:"wide"})};const localize$3=localize$2;var matchOrdinalNumberPattern$1=/^(第\s*)?\d+(日|时|分|秒)?/i,parseOrdinalNumberPattern$1=/\d+/i,matchEraPatterns$1={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},parseEraPatterns$1={any:[/^(前)/i,/^(公元)/i]},matchQuarterPatterns$1={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},parseQuarterPatterns$1={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},matchMonthPatterns$1={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},parseMonthPatterns$1={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},matchDayPatterns$1={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},parseDayPatterns$1={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},matchDayPeriodPatterns$1={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},parseDayPeriodPatterns$1={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},match$2={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$1,parsePattern:parseOrdinalNumberPattern$1,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$1,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$1,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$1,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$1,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$1,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$1,defaultParseWidth:"any"})};const match$3=match$2;var locale$1={code:"zh-CN",formatDistance:formatDistance$3,formatLong:formatLong$3,formatRelative:formatRelative$3,localize:localize$3,match:match$3,options:{weekStartsOn:1,firstWeekContainsDate:4}};const zhCN=locale$1;var formatDistanceLocale={lessThanXSeconds:{one:"少於 1 秒",other:"少於 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分鐘",lessThanXMinutes:{one:"少於 1 分鐘",other:"少於 {{count}} 分鐘"},xMinutes:{one:"1 分鐘",other:"{{count}} 分鐘"},xHours:{one:"1 小時",other:"{{count}} 小時"},aboutXHours:{one:"大約 1 小時",other:"大約 {{count}} 小時"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大約 1 個星期",other:"大約 {{count}} 個星期"},xWeeks:{one:"1 個星期",other:"{{count}} 個星期"},aboutXMonths:{one:"大約 1 個月",other:"大約 {{count}} 個月"},xMonths:{one:"1 個月",other:"{{count}} 個月"},aboutXYears:{one:"大約 1 年",other:"大約 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超過 1 年",other:"超過 {{count}} 年"},almostXYears:{one:"將近 1 年",other:"將近 {{count}} 年"}},formatDistance=function t(e,a,n){var r,i=formatDistanceLocale[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",String(a)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+"內":r+"前":r};const formatDistance$1=formatDistance;var dateFormats={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},timeFormats={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},dateTimeFormats={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})};const formatLong$1=formatLong;var formatRelativeLocale={lastWeek:"'上個'eeee p",yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:"'下個'eeee p",other:"P"},formatRelative=function t(e,a,n,r){return formatRelativeLocale[e]};const formatRelative$1=formatRelative;var eraValues={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["第一刻","第二刻","第三刻","第四刻"],wide:["第一刻鐘","第二刻鐘","第三刻鐘","第四刻鐘"]},monthValues={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},dayValues={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["週日","週一","週二","週三","週四","週五","週六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},dayPeriodValues={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"}},formattingDayPeriodValues={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜間"}},ordinalNumber=function t(e,a){var n=Number(e);switch(a==null?void 0:a.unit){case"date":return n+"日";case"hour":return n+"時";case"minute":return n+"分";case"second":return n+"秒";default:return"第 "+n}},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function t(e){return e-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};const localize$1=localize;var matchOrdinalNumberPattern=/^(第\s*)?\d+(日|時|分|秒)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},parseEraPatterns={any:[/^(前)/i,/^(公元)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻鐘/i},parseQuarterPatterns={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},matchMonthPatterns={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},parseMonthPatterns={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},matchDayPatterns={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^週[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},parseDayPatterns={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},matchDayPeriodPatterns={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i},parseDayPeriodPatterns={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function t(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function t(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})};const match$1=match;var locale={code:"zh-TW",formatDistance:formatDistance$1,formatLong:formatLong$1,formatRelative:formatRelative$1,localize:localize$1,match:match$1,options:{weekStartsOn:1,firstWeekContainsDate:4}};const zhTW=locale,locales={bg,cs,da,de,el,enGB,enUS,es,ca,fi,fr,hu,id,it,ja,ko,nb,nn,nl,pl,ptBR,pt,ro,ru,sk,sl,sv,tr,uk,vi,zhTW,zhCN};function format(t,e="PP"){let a=window.__localeId__.replace("_","");return format$1(t,e,{locale:locales[a]??locales[a.slice(0,2)]??locales.enUS})}const dates=()=>({range:{start:null,end:null},defaultRange:{start:null,end:null},language:"en-US",init(){this.range={start:new Date(window.store.get("start")),end:new Date(window.store.get("end"))},this.defaultRange={start:new Date(window.store.get("start")),end:new Date(window.store.get("end"))},this.language=window.store.get("language"),this.locale=window.store.get("locale"),this.locale=this.locale==="equal"?this.language:this.locale,window.__localeId__=this.language,this.buildDateRange(),window.store.observe("start",t=>{this.range.start=new Date(t)}),window.store.observe("end",t=>{this.range.end=new Date(t),this.buildDateRange()})},buildDateRange(){let t=this.getNextRange(),e=this.getPrevRange(),a=this.lastDays(7),n=this.lastDays(30),r=this.mtd(),i=this.ytd(),o=document.getElementsByClassName("daterange-holder")[0];o.textContent=format(this.range.start)+" - "+format(this.range.end),o.setAttribute("data-start",format(this.range.start,"yyyy-MM-dd")),o.setAttribute("data-end",format(this.range.end,"yyyy-MM-dd")),o=document.getElementsByClassName("daterange-current")[0],o.textContent=format(this.defaultRange.start)+" - "+format(this.defaultRange.end),o.setAttribute("data-start",format(this.defaultRange.start,"yyyy-MM-dd")),o.setAttribute("data-end",format(this.defaultRange.end,"yyyy-MM-dd")),o=document.getElementsByClassName("daterange-next")[0],o.textContent=format(t.start)+" - "+format(t.end),o.setAttribute("data-start",format(t.start,"yyyy-MM-dd")),o.setAttribute("data-end",format(t.end,"yyyy-MM-dd")),o=document.getElementsByClassName("daterange-prev")[0],o.textContent=format(e.start)+" - "+format(e.end),o.setAttribute("data-start",format(e.start,"yyyy-MM-dd")),o.setAttribute("data-end",format(e.end,"yyyy-MM-dd")),o=document.getElementsByClassName("daterange-7d")[0],o.setAttribute("data-start",format(a.start,"yyyy-MM-dd")),o.setAttribute("data-end",format(a.end,"yyyy-MM-dd")),o=document.getElementsByClassName("daterange-90d")[0],o.setAttribute("data-start",format(n.start,"yyyy-MM-dd")),o.setAttribute("data-end",format(n.end,"yyyy-MM-dd")),o=document.getElementsByClassName("daterange-mtd")[0],o.setAttribute("data-start",format(r.start,"yyyy-MM-dd")),o.setAttribute("data-end",format(r.end,"yyyy-MM-dd")),o=document.getElementsByClassName("daterange-ytd")[0],o.setAttribute("data-start",format(i.start,"yyyy-MM-dd")),o.setAttribute("data-end",format(i.end,"yyyy-MM-dd"))},getNextRange(){let t=startOfMonth(this.range.start),e=addMonths(t,1),a=endOfMonth(e);return{start:e,end:a}},getPrevRange(){let t=startOfMonth(this.range.start),e=subMonths(t,1),a=endOfMonth(e);return{start:e,end:a}},ytd(){let t=new Date;return{start:startOfYear(this.range.start),end:t}},mtd(){let t=new Date;return{start:startOfMonth(this.range.start),end:t}},lastDays(t){let e=new Date;return{start:subDays(e,t),end:e}},changeDateRange(t){t.preventDefault();let e=t.currentTarget,a=new Date(e.getAttribute("data-start")),n=new Date(e.getAttribute("data-end"));return window.store.set("start",a),window.store.set("end",n),!1}});class Summary{get(e,a,n){return api.get("/api/v2/summary/basic",{params:{start:e,end:a,code:n}})}}function formatMoney(t,e){let a=window.__localeId__.replace("_","-");return Intl.NumberFormat(a,{style:"currency",currency:e}).format(t)}let afterPromises$6=!1;const CACHE_KEY$5="dashboard-boxes-data",boxes=()=>({balanceBox:{amounts:[],subtitles:[]},billBox:{paid:[],unpaid:[]},leftBox:{left:[],perDay:[]},netBox:{net:[]},autoConversion:!1,loading:!1,boxData:null,boxOptions:null,getFreshData(){const t=window.store.get("cacheValid");let e=window.store.get(CACHE_KEY$5);if(t&&typeof e<"u"){this.boxData=e,this.generateOptions(this.boxData);return}let a=new Summary,n=new Date(window.store.get("start")),r=new Date(window.store.get("end"));a.get(format$1(n,"yyyy-MM-dd"),format$1(r,"yyyy-MM-dd"),null).then(i=>{this.boxData=i.data,window.store.set(CACHE_KEY$5,i.data),this.generateOptions(this.boxData)})},generateOptions(t){this.balanceBox={amounts:[],subtitles:[]},this.billBox={paid:[],unpaid:[]},this.leftBox={left:[],perDay:[]},this.netBox={net:[]};let e={};for(const a in t)if(t.hasOwnProperty(a)){const n=t[a];let r=n.key;if(this.autoConversion){if(r.startsWith("balance-in-native")){this.balanceBox.amounts.push(formatMoney(n.value,n.currency_code)),e.hasOwnProperty(n.currency_code)||(e[n.currency_code]="");continue}if(r.startsWith("spent-in-native")){e.hasOwnProperty(n.currency_code)||(e[n.currency_code]=""),e[n.currency_code]=e[n.currency_code]+formatMoney(n.value,n.currency_code);continue}if(r.startsWith("earned-in-native")){e.hasOwnProperty(n.currency_code)||(e[n.currency_code]=""),e[n.currency_code]=formatMoney(n.value,n.currency_code)+" + "+e[n.currency_code];continue}if(r.startsWith("bills-unpaid-in-native")){this.billBox.unpaid.push(formatMoney(n.value,n.currency_code));continue}if(r.startsWith("bills-paid-in-native")){this.billBox.paid.push(formatMoney(n.value,n.currency_code));continue}if(r.startsWith("left-to-spend-in-native")){this.leftBox.left.push(formatMoney(n.value,n.currency_code));continue}if(r.startsWith("left-per-day-to-spend-in-native")){this.leftBox.perDay.push(formatMoney(n.value,n.currency_code));continue}if(r.startsWith("net-worth-in-native")){this.netBox.net.push(formatMoney(n.value,n.currency_code));continue}}if(!this.autoConversion&&!r.endsWith("native")){if(r.startsWith("balance-in-")){this.balanceBox.amounts.push(formatMoney(n.value,n.currency_code));continue}if(r.startsWith("spent-in-")){e.hasOwnProperty(n.currency_code)||(e[n.currency_code]=""),e[n.currency_code]=e[n.currency_code]+formatMoney(n.value,n.currency_code);continue}if(r.startsWith("earned-in-")){e.hasOwnProperty(n.currency_code)||(e[n.currency_code]=""),e[n.currency_code]=formatMoney(n.value,n.currency_code)+" + "+e[n.currency_code];continue}if(r.startsWith("bills-unpaid-in-")){this.billBox.unpaid.push(formatMoney(n.value,n.currency_code));continue}if(r.startsWith("bills-paid-in-")){this.billBox.paid.push(formatMoney(n.value,n.currency_code));continue}if(r.startsWith("left-to-spend-in-")){this.leftBox.left.push(formatMoney(n.value,n.currency_code));continue}if(r.startsWith("left-per-day-to-spend-in-")){this.leftBox.perDay.push(formatMoney(n.value,n.currency_code));continue}r.startsWith("net-worth-in-")&&this.netBox.net.push(formatMoney(n.value,n.currency_code))}}for(let a in e)e.hasOwnProperty(a)&&this.balanceBox.subtitles.push(e[a]);this.loading=!1},loadBoxes(){if(this.loading!==!0){if(this.loading=!0,this.boxData===null){this.getFreshData();return}this.generateOptions(this.boxData),this.loading=!1}},init(){Promise.all([getVariable("viewRange"),getVariable("autoConversion",!1)]).then(t=>{afterPromises$6=!0,this.autoConversion=t[1],this.loadBoxes()}),window.store.observe("end",()=>{afterPromises$6&&(this.boxData=null,this.loadBoxes())}),window.store.observe("autoConversion",t=>{afterPromises$6&&(this.autoConversion=t,this.loadBoxes())})}});class Put{put(e,a){let n="/api/v1/preferences/"+e;return api.put(n,{data:a})}}function setVariable(t,e=null){window.store.set(t,e),new Put().put(t,e).then(n=>{}).catch(()=>{new Post().post(t,e).then(r=>{})})}let Dashboard$2=class{dashboard(e,a){let n=format$1(e,"y-MM-dd"),r=format$1(a,"y-MM-dd");return api.get("/api/v2/chart/account/dashboard",{params:{start:n,end:r}})}expense(e,a){let n=format$1(e,"y-MM-dd"),r=format$1(a,"y-MM-dd");return api.get("/api/v2/chart/account/expense-dashboard",{params:{start:n,end:r}})}},Get$3=class{get(e,a){let n={date:format$1(a,"y-MM-d").slice(0,10)};return a?api.get("/api/v2/accounts/"+e,{params:n}):api.get("/api/v2/accounts/"+e)}transactions(e,a){return api.get("/api/v2/accounts/"+e+"/transactions",{params:{page:a}})}};/*!
|
||
* @kurkle/color v0.3.2
|
||
* https://github.com/kurkle/color#readme
|
||
* (c) 2023 Jukka Kurkela
|
||
* Released under the MIT License
|
||
*/function round(t){return t+.5|0}const lim=(t,e,a)=>Math.max(Math.min(t,a),e);function p2b(t){return lim(round(t*2.55),0,255)}function n2b(t){return lim(round(t*255),0,255)}function b2n(t){return lim(round(t/2.55)/100,0,1)}function n2p(t){return lim(round(t*100),0,100)}const map$1={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},hex=[..."0123456789ABCDEF"],h1=t=>hex[t&15],h2=t=>hex[(t&240)>>4]+hex[t&15],eq$5=t=>(t&240)>>4===(t&15),isShort=t=>eq$5(t.r)&&eq$5(t.g)&&eq$5(t.b)&&eq$5(t.a);function hexParse(t){var e=t.length,a;return t[0]==="#"&&(e===4||e===5?a={r:255&map$1[t[1]]*17,g:255&map$1[t[2]]*17,b:255&map$1[t[3]]*17,a:e===5?map$1[t[4]]*17:255}:(e===7||e===9)&&(a={r:map$1[t[1]]<<4|map$1[t[2]],g:map$1[t[3]]<<4|map$1[t[4]],b:map$1[t[5]]<<4|map$1[t[6]],a:e===9?map$1[t[7]]<<4|map$1[t[8]]:255})),a}const alpha=(t,e)=>t<255?e(t):"";function hexString(t){var e=isShort(t)?h1:h2;return t?"#"+e(t.r)+e(t.g)+e(t.b)+alpha(t.a,e):void 0}const HUE_RE=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function hsl2rgbn(t,e,a){const n=e*Math.min(a,1-a),r=(i,o=(i+t/30)%12)=>a-n*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function hsv2rgbn(t,e,a){const n=(r,i=(r+t/60)%6)=>a-a*e*Math.max(Math.min(i,4-i,1),0);return[n(5),n(3),n(1)]}function hwb2rgbn(t,e,a){const n=hsl2rgbn(t,1,.5);let r;for(e+a>1&&(r=1/(e+a),e*=r,a*=r),r=0;r<3;r++)n[r]*=1-e-a,n[r]+=e;return n}function hueValue(t,e,a,n,r){return t===r?(e-a)/n+(e<a?6:0):e===r?(a-t)/n+2:(t-e)/n+4}function rgb2hsl(t){const a=t.r/255,n=t.g/255,r=t.b/255,i=Math.max(a,n,r),o=Math.min(a,n,r),s=(i+o)/2;let l,u,c;return i!==o&&(c=i-o,u=s>.5?c/(2-i-o):c/(i+o),l=hueValue(a,n,r,c,i),l=l*60+.5),[l|0,u||0,s]}function calln(t,e,a,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,a,n)).map(n2b)}function hsl2rgb(t,e,a){return calln(hsl2rgbn,t,e,a)}function hwb2rgb(t,e,a){return calln(hwb2rgbn,t,e,a)}function hsv2rgb(t,e,a){return calln(hsv2rgbn,t,e,a)}function hue(t){return(t%360+360)%360}function hueParse(t){const e=HUE_RE.exec(t);let a=255,n;if(!e)return;e[5]!==n&&(a=e[6]?p2b(+e[5]):n2b(+e[5]));const r=hue(+e[2]),i=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?n=hwb2rgb(r,i,o):e[1]==="hsv"?n=hsv2rgb(r,i,o):n=hsl2rgb(r,i,o),{r:n[0],g:n[1],b:n[2],a}}function rotate(t,e){var a=rgb2hsl(t);a[0]=hue(a[0]+e),a=hsl2rgb(a),t.r=a[0],t.g=a[1],t.b=a[2]}function hslString(t){if(!t)return;const e=rgb2hsl(t),a=e[0],n=n2p(e[1]),r=n2p(e[2]);return t.a<255?`hsla(${a}, ${n}%, ${r}%, ${b2n(t.a)})`:`hsl(${a}, ${n}%, ${r}%)`}const map={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},names$1={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function unpack(){const t={},e=Object.keys(names$1),a=Object.keys(map);let n,r,i,o,s;for(n=0;n<e.length;n++){for(o=s=e[n],r=0;r<a.length;r++)i=a[r],s=s.replace(i,map[i]);i=parseInt(names$1[o],16),t[s]=[i>>16&255,i>>8&255,i&255]}return t}let names;function nameParse(t){names||(names=unpack(),names.transparent=[0,0,0,0]);const e=names[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const RGB_RE=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function rgbParse(t){const e=RGB_RE.exec(t);let a=255,n,r,i;if(e){if(e[7]!==n){const o=+e[7];a=e[8]?p2b(o):lim(o*255,0,255)}return n=+e[1],r=+e[3],i=+e[5],n=255&(e[2]?p2b(n):lim(n,0,255)),r=255&(e[4]?p2b(r):lim(r,0,255)),i=255&(e[6]?p2b(i):lim(i,0,255)),{r:n,g:r,b:i,a}}}function rgbString(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${b2n(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const to=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,from=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function interpolate$2(t,e,a){const n=from(b2n(t.r)),r=from(b2n(t.g)),i=from(b2n(t.b));return{r:n2b(to(n+a*(from(b2n(e.r))-n))),g:n2b(to(r+a*(from(b2n(e.g))-r))),b:n2b(to(i+a*(from(b2n(e.b))-i))),a:t.a+a*(e.a-t.a)}}function modHSL(t,e,a){if(t){let n=rgb2hsl(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*a,e===0?360:1)),n=hsl2rgb(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function clone$2(t,e){return t&&Object.assign(e||{},t)}function fromObject(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=n2b(t[3]))):(e=clone$2(t,{r:0,g:0,b:0,a:1}),e.a=n2b(e.a)),e}function functionParse(t){return t.charAt(0)==="r"?rgbParse(t):hueParse(t)}class Color{constructor(e){if(e instanceof Color)return e;const a=typeof e;let n;a==="object"?n=fromObject(e):a==="string"&&(n=hexParse(e)||nameParse(e)||functionParse(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=clone$2(this._rgb);return e&&(e.a=b2n(e.a)),e}set rgb(e){this._rgb=fromObject(e)}rgbString(){return this._valid?rgbString(this._rgb):void 0}hexString(){return this._valid?hexString(this._rgb):void 0}hslString(){return this._valid?hslString(this._rgb):void 0}mix(e,a){if(e){const n=this.rgb,r=e.rgb;let i;const o=a===i?.5:a,s=2*o-1,l=n.a-r.a,u=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;i=1-u,n.r=255&u*n.r+i*r.r+.5,n.g=255&u*n.g+i*r.g+.5,n.b=255&u*n.b+i*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(e,a){return e&&(this._rgb=interpolate$2(this._rgb,e._rgb,a)),this}clone(){return new Color(this.rgb)}alpha(e){return this._rgb.a=n2b(e),this}clearer(e){const a=this._rgb;return a.a*=1-e,this}greyscale(){const e=this._rgb,a=round(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=a,this}opaquer(e){const a=this._rgb;return a.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return modHSL(this._rgb,2,e),this}darken(e){return modHSL(this._rgb,2,-e),this}saturate(e){return modHSL(this._rgb,1,e),this}desaturate(e){return modHSL(this._rgb,1,-e),this}rotate(e){return rotate(this._rgb,e),this}}/*!
|
||
* Chart.js v4.4.0
|
||
* https://www.chartjs.org
|
||
* (c) 2023 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/function noop$2(){}const uid=(()=>{let t=0;return()=>t++})();function isNullOrUndef(t){return t===null||typeof t>"u"}function isArray$b(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function isObject$8(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function isNumberFinite(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function finiteOrDefault(t,e){return isNumberFinite(t)?t:e}function valueOrDefault(t,e){return typeof t>"u"?e:t}const toPercentage=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,toDimension=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function callback(t,e,a){if(t&&typeof t.call=="function")return t.apply(a,e)}function each(t,e,a,n){let r,i,o;if(isArray$b(t))if(i=t.length,n)for(r=i-1;r>=0;r--)e.call(a,t[r],r);else for(r=0;r<i;r++)e.call(a,t[r],r);else if(isObject$8(t))for(o=Object.keys(t),i=o.length,r=0;r<i;r++)e.call(a,t[o[r]],o[r])}function _elementsEqual(t,e){let a,n,r,i;if(!t||!e||t.length!==e.length)return!1;for(a=0,n=t.length;a<n;++a)if(r=t[a],i=e[a],r.datasetIndex!==i.datasetIndex||r.index!==i.index)return!1;return!0}function clone$1(t){if(isArray$b(t))return t.map(clone$1);if(isObject$8(t)){const e=Object.create(null),a=Object.keys(t),n=a.length;let r=0;for(;r<n;++r)e[a[r]]=clone$1(t[a[r]]);return e}return t}function isValidKey(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function _merger(t,e,a,n){if(!isValidKey(t))return;const r=e[t],i=a[t];isObject$8(r)&&isObject$8(i)?merge(r,i,n):e[t]=clone$1(i)}function merge(t,e,a){const n=isArray$b(e)?e:[e],r=n.length;if(!isObject$8(t))return t;a=a||{};const i=a.merger||_merger;let o;for(let s=0;s<r;++s){if(o=n[s],!isObject$8(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)i(l[u],t,o,a)}return t}function mergeIf(t,e){return merge(t,e,{merger:_mergerIf})}function _mergerIf(t,e,a){if(!isValidKey(t))return;const n=e[t],r=a[t];isObject$8(n)&&isObject$8(r)?mergeIf(n,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=clone$1(r))}const keyResolvers={"":t=>t,x:t=>t.x,y:t=>t.y};function _splitKey(t){const e=t.split("."),a=[];let n="";for(const r of e)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(a.push(n),n="");return a}function _getKeyResolver(t){const e=_splitKey(t);return a=>{for(const n of e){if(n==="")break;a=a&&a[n]}return a}}function resolveObjectKey(t,e){return(keyResolvers[e]||(keyResolvers[e]=_getKeyResolver(e)))(t)}function _capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)}const defined$1=t=>typeof t<"u",isFunction$3=t=>typeof t=="function",setsEqual=(t,e)=>{if(t.size!==e.size)return!1;for(const a of t)if(!e.has(a))return!1;return!0};function _isClickEvent(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const PI=Math.PI,TAU=2*PI,PITAU=TAU+PI,INFINITY$5=Number.POSITIVE_INFINITY,RAD_PER_DEG=PI/180,HALF_PI=PI/2,QUARTER_PI=PI/4,TWO_THIRDS_PI=PI*2/3,log10=Math.log10,sign=Math.sign;function almostEquals(t,e,a){return Math.abs(t-e)<a}function niceNum(t){const e=Math.round(t);t=almostEquals(t,e,t/1e3)?e:t;const a=Math.pow(10,Math.floor(log10(t))),n=t/a;return(n<=1?1:n<=2?2:n<=5?5:10)*a}function _factorize(t){const e=[],a=Math.sqrt(t);let n;for(n=1;n<a;n++)t%n===0&&(e.push(n),e.push(t/n));return a===(a|0)&&e.push(a),e.sort((r,i)=>r-i).pop(),e}function isNumber(t){return!isNaN(parseFloat(t))&&isFinite(t)}function almostWhole(t,e){const a=Math.round(t);return a-e<=t&&a+e>=t}function _setMinAndMaxByKey(t,e,a){let n,r,i;for(n=0,r=t.length;n<r;n++)i=t[n][a],isNaN(i)||(e.min=Math.min(e.min,i),e.max=Math.max(e.max,i))}function toRadians(t){return t*(PI/180)}function toDegrees(t){return t*(180/PI)}function _decimalPlaces(t){if(!isNumberFinite(t))return;let e=1,a=0;for(;Math.round(t*e)/e!==t;)e*=10,a++;return a}function getAngleFromPoint(t,e){const a=e.x-t.x,n=e.y-t.y,r=Math.sqrt(a*a+n*n);let i=Math.atan2(n,a);return i<-.5*PI&&(i+=TAU),{angle:i,distance:r}}function distanceBetweenPoints(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function _angleDiff(t,e){return(t-e+PITAU)%TAU-PI}function _normalizeAngle(t){return(t%TAU+TAU)%TAU}function _angleBetween(t,e,a,n){const r=_normalizeAngle(t),i=_normalizeAngle(e),o=_normalizeAngle(a),s=_normalizeAngle(i-r),l=_normalizeAngle(o-r),u=_normalizeAngle(r-i),c=_normalizeAngle(r-o);return r===i||r===o||n&&i===o||s>l&&u<c}function _limitValue(t,e,a){return Math.max(e,Math.min(a,t))}function _int16Range(t){return _limitValue(t,-32768,32767)}function _isBetween(t,e,a,n=1e-6){return t>=Math.min(e,a)-n&&t<=Math.max(e,a)+n}function _lookup(t,e,a){a=a||(o=>t[o]<e);let n=t.length-1,r=0,i;for(;n-r>1;)i=r+n>>1,a(i)?r=i:n=i;return{lo:r,hi:n}}const _lookupByKey=(t,e,a,n)=>_lookup(t,a,n?r=>{const i=t[r][e];return i<a||i===a&&t[r+1][e]===a}:r=>t[r][e]<a),_rlookupByKey=(t,e,a)=>_lookup(t,a,n=>t[n][e]>=a);function _filterBetween(t,e,a){let n=0,r=t.length;for(;n<r&&t[n]<e;)n++;for(;r>n&&t[r-1]>a;)r--;return n>0||r<t.length?t.slice(n,r):t}const arrayEvents=["push","pop","shift","splice","unshift"];function listenArrayEvents(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),arrayEvents.forEach(a=>{const n="_onData"+_capitalize(a),r=t[a];Object.defineProperty(t,a,{configurable:!0,enumerable:!1,value(...i){const o=r.apply(this,i);return t._chartjs.listeners.forEach(s=>{typeof s[n]=="function"&&s[n](...i)}),o}})})}function unlistenArrayEvents(t,e){const a=t._chartjs;if(!a)return;const n=a.listeners,r=n.indexOf(e);r!==-1&&n.splice(r,1),!(n.length>0)&&(arrayEvents.forEach(i=>{delete t[i]}),delete t._chartjs)}function _arrayUnique(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const requestAnimFrame=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function throttled(t,e){let a=[],n=!1;return function(...r){a=r,n||(n=!0,requestAnimFrame.call(window,()=>{n=!1,t.apply(e,a)}))}}function debounce(t,e){let a;return function(...n){return e?(clearTimeout(a),a=setTimeout(t,e,n)):t.apply(this,n),e}}const _toLeftRightCenter=t=>t==="start"?"left":t==="end"?"right":"center",_alignStartEnd=(t,e,a)=>t==="start"?e:t==="end"?a:(e+a)/2,_textX=(t,e,a,n)=>t===(n?"left":"right")?a:t==="center"?(e+a)/2:e;function _getStartAndCountOfVisiblePoints(t,e,a){const n=e.length;let r=0,i=n;if(t._sorted){const{iScale:o,_parsed:s}=t,l=o.axis,{min:u,max:c,minDefined:d,maxDefined:h}=o.getUserBounds();d&&(r=_limitValue(Math.min(_lookupByKey(s,l,u).lo,a?n:_lookupByKey(e,l,o.getPixelForValue(u)).lo),0,n-1)),h?i=_limitValue(Math.max(_lookupByKey(s,o.axis,c,!0).hi+1,a?0:_lookupByKey(e,l,o.getPixelForValue(c),!0).hi+1),r,n)-r:i=n-r}return{start:r,count:i}}function _scaleRangesChanged(t){const{xScale:e,yScale:a,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:a.min,ymax:a.max};if(!n)return t._scaleRanges=r,!0;const i=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==a.min||n.ymax!==a.max;return Object.assign(n,r),i}const atEdge=t=>t===0||t===1,elasticIn=(t,e,a)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*TAU/a)),elasticOut=(t,e,a)=>Math.pow(2,-10*t)*Math.sin((t-e)*TAU/a)+1,effects={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*HALF_PI)+1,easeOutSine:t=>Math.sin(t*HALF_PI),easeInOutSine:t=>-.5*(Math.cos(PI*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>atEdge(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>atEdge(t)?t:elasticIn(t,.075,.3),easeOutElastic:t=>atEdge(t)?t:elasticOut(t,.075,.3),easeInOutElastic(t){return atEdge(t)?t:t<.5?.5*elasticIn(t*2,.1125,.45):.5+.5*elasticOut(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-effects.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?effects.easeInBounce(t*2)*.5:effects.easeOutBounce(t*2-1)*.5+.5};function isPatternOrGradient(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function color(t){return isPatternOrGradient(t)?t:new Color(t)}function getHoverColor(t){return isPatternOrGradient(t)?t:new Color(t).saturate(.5).darken(.1).hexString()}const numbers=["x","y","borderWidth","radius","tension"],colors=["color","borderColor","backgroundColor"];function applyAnimationsDefaults(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:colors},numbers:{type:"number",properties:numbers}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function applyLayoutsDefaults(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const intlCache=new Map;function getNumberFormat(t,e){e=e||{};const a=t+JSON.stringify(e);let n=intlCache.get(a);return n||(n=new Intl.NumberFormat(t,e),intlCache.set(a,n)),n}function formatNumber$1(t,e,a){return getNumberFormat(e,a).format(t)}const formatters={values(t){return isArray$b(t)?t:""+t},numeric(t,e,a){if(t===0)return"0";const n=this.chart.options.locale;let r,i=t;if(a.length>1){const u=Math.max(Math.abs(a[0].value),Math.abs(a[a.length-1].value));(u<1e-4||u>1e15)&&(r="scientific"),i=calculateDelta(t,a)}const o=log10(Math.abs(i)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),formatNumber$1(t,n,l)},logarithmic(t,e,a){if(t===0)return"0";const n=a[e].significand||t/Math.pow(10,Math.floor(log10(t)));return[1,2,3,5,10,15].includes(n)||e>.8*a.length?formatters.numeric.call(this,t,e,a):""}};function calculateDelta(t,e){let a=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(a)>=1&&t!==Math.floor(t)&&(a=t-Math.floor(t)),a}var Ticks={formatters};function applyScaleDefaults(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,a)=>a.lineWidth,tickColor:(e,a)=>a.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ticks.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const overrides=Object.create(null),descriptors=Object.create(null);function getScope$1(t,e){if(!e)return t;const a=e.split(".");for(let n=0,r=a.length;n<r;++n){const i=a[n];t=t[i]||(t[i]=Object.create(null))}return t}function set$2(t,e,a){return typeof e=="string"?merge(getScope$1(t,e),a):merge(getScope$1(t,""),e)}class Defaults{constructor(e,a){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>getHoverColor(r.backgroundColor),this.hoverBorderColor=(n,r)=>getHoverColor(r.borderColor),this.hoverColor=(n,r)=>getHoverColor(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(a)}set(e,a){return set$2(this,e,a)}get(e){return getScope$1(this,e)}describe(e,a){return set$2(descriptors,e,a)}override(e,a){return set$2(overrides,e,a)}route(e,a,n,r){const i=getScope$1(this,e),o=getScope$1(this,n),s="_"+a;Object.defineProperties(i,{[s]:{value:i[a],writable:!0},[a]:{enumerable:!0,get(){const l=this[s],u=o[r];return isObject$8(l)?Object.assign({},u,l):valueOrDefault(l,u)},set(l){this[s]=l}}})}apply(e){e.forEach(a=>a(this))}}var defaults=new Defaults({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[applyAnimationsDefaults,applyLayoutsDefaults,applyScaleDefaults]);function toFontString(t){return!t||isNullOrUndef(t.size)||isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function _measureText(t,e,a,n,r){let i=e[r];return i||(i=e[r]=t.measureText(r).width,a.push(r)),i>n&&(n=i),n}function _longestText(t,e,a,n){n=n||{};let r=n.data=n.data||{},i=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},i=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let o=0;const s=a.length;let l,u,c,d,h;for(l=0;l<s;l++)if(d=a[l],d!=null&&!isArray$b(d))o=_measureText(t,r,i,o,d);else if(isArray$b(d))for(u=0,c=d.length;u<c;u++)h=d[u],h!=null&&!isArray$b(h)&&(o=_measureText(t,r,i,o,h));t.restore();const m=i.length/2;if(m>a.length){for(l=0;l<m;l++)delete r[i[l]];i.splice(0,m)}return o}function _alignPixel(t,e,a){const n=t.currentDevicePixelRatio,r=a!==0?Math.max(a/2,.5):0;return Math.round((e-r)*n)/n+r}function clearCanvas(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function drawPoint(t,e,a,n){drawPointLegend(t,e,a,n,null)}function drawPointLegend(t,e,a,n,r){let i,o,s,l,u,c,d,h;const m=e.pointStyle,p=e.rotation,v=e.radius;let y=(p||0)*RAD_PER_DEG;if(m&&typeof m=="object"&&(i=m.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){t.save(),t.translate(a,n),t.rotate(y),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(v)||v<=0)){switch(t.beginPath(),m){default:r?t.ellipse(a,n,r/2,v,0,0,TAU):t.arc(a,n,v,0,TAU),t.closePath();break;case"triangle":c=r?r/2:v,t.moveTo(a+Math.sin(y)*c,n-Math.cos(y)*v),y+=TWO_THIRDS_PI,t.lineTo(a+Math.sin(y)*c,n-Math.cos(y)*v),y+=TWO_THIRDS_PI,t.lineTo(a+Math.sin(y)*c,n-Math.cos(y)*v),t.closePath();break;case"rectRounded":u=v*.516,l=v-u,o=Math.cos(y+QUARTER_PI)*l,d=Math.cos(y+QUARTER_PI)*(r?r/2-u:l),s=Math.sin(y+QUARTER_PI)*l,h=Math.sin(y+QUARTER_PI)*(r?r/2-u:l),t.arc(a-d,n-s,u,y-PI,y-HALF_PI),t.arc(a+h,n-o,u,y-HALF_PI,y),t.arc(a+d,n+s,u,y,y+HALF_PI),t.arc(a-h,n+o,u,y+HALF_PI,y+PI),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*v,c=r?r/2:l,t.rect(a-c,n-l,2*c,2*l);break}y+=QUARTER_PI;case"rectRot":d=Math.cos(y)*(r?r/2:v),o=Math.cos(y)*v,s=Math.sin(y)*v,h=Math.sin(y)*(r?r/2:v),t.moveTo(a-d,n-s),t.lineTo(a+h,n-o),t.lineTo(a+d,n+s),t.lineTo(a-h,n+o),t.closePath();break;case"crossRot":y+=QUARTER_PI;case"cross":d=Math.cos(y)*(r?r/2:v),o=Math.cos(y)*v,s=Math.sin(y)*v,h=Math.sin(y)*(r?r/2:v),t.moveTo(a-d,n-s),t.lineTo(a+d,n+s),t.moveTo(a+h,n-o),t.lineTo(a-h,n+o);break;case"star":d=Math.cos(y)*(r?r/2:v),o=Math.cos(y)*v,s=Math.sin(y)*v,h=Math.sin(y)*(r?r/2:v),t.moveTo(a-d,n-s),t.lineTo(a+d,n+s),t.moveTo(a+h,n-o),t.lineTo(a-h,n+o),y+=QUARTER_PI,d=Math.cos(y)*(r?r/2:v),o=Math.cos(y)*v,s=Math.sin(y)*v,h=Math.sin(y)*(r?r/2:v),t.moveTo(a-d,n-s),t.lineTo(a+d,n+s),t.moveTo(a+h,n-o),t.lineTo(a-h,n+o);break;case"line":o=r?r/2:Math.cos(y)*v,s=Math.sin(y)*v,t.moveTo(a-o,n-s),t.lineTo(a+o,n+s);break;case"dash":t.moveTo(a,n),t.lineTo(a+Math.cos(y)*(r?r/2:v),n+Math.sin(y)*v);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function _isPointInArea(t,e,a){return a=a||.5,!e||t&&t.x>e.left-a&&t.x<e.right+a&&t.y>e.top-a&&t.y<e.bottom+a}function clipArea(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function unclipArea(t){t.restore()}function _steppedLineTo(t,e,a,n,r){if(!e)return t.lineTo(a.x,a.y);if(r==="middle"){const i=(e.x+a.x)/2;t.lineTo(i,e.y),t.lineTo(i,a.y)}else r==="after"!=!!n?t.lineTo(e.x,a.y):t.lineTo(a.x,e.y);t.lineTo(a.x,a.y)}function _bezierCurveTo(t,e,a,n){if(!e)return t.lineTo(a.x,a.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?a.cp2x:a.cp1x,n?a.cp2y:a.cp1y,a.x,a.y)}function setRenderOpts(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),isNullOrUndef(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function decorateText(t,e,a,n,r){if(r.strikethrough||r.underline){const i=t.measureText(n),o=e-i.actualBoundingBoxLeft,s=e+i.actualBoundingBoxRight,l=a-i.actualBoundingBoxAscent,u=a+i.actualBoundingBoxDescent,c=r.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(o,c),t.lineTo(s,c),t.stroke()}}function drawBackdrop(t,e){const a=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=a}function renderText(t,e,a,n,r,i={}){const o=isArray$b(e)?e:[e],s=i.strokeWidth>0&&i.strokeColor!=="";let l,u;for(t.save(),t.font=r.string,setRenderOpts(t,i),l=0;l<o.length;++l)u=o[l],i.backdrop&&drawBackdrop(t,i.backdrop),s&&(i.strokeColor&&(t.strokeStyle=i.strokeColor),isNullOrUndef(i.strokeWidth)||(t.lineWidth=i.strokeWidth),t.strokeText(u,a,n,i.maxWidth)),t.fillText(u,a,n,i.maxWidth),decorateText(t,a,n,u,i),n+=Number(r.lineHeight);t.restore()}function addRoundedRectPath(t,e){const{x:a,y:n,w:r,h:i,radius:o}=e;t.arc(a+o.topLeft,n+o.topLeft,o.topLeft,1.5*PI,PI,!0),t.lineTo(a,n+i-o.bottomLeft),t.arc(a+o.bottomLeft,n+i-o.bottomLeft,o.bottomLeft,PI,HALF_PI,!0),t.lineTo(a+r-o.bottomRight,n+i),t.arc(a+r-o.bottomRight,n+i-o.bottomRight,o.bottomRight,HALF_PI,0,!0),t.lineTo(a+r,n+o.topRight),t.arc(a+r-o.topRight,n+o.topRight,o.topRight,0,-HALF_PI,!0),t.lineTo(a+o.topLeft,n)}const LINE_HEIGHT=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,FONT_STYLE=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function toLineHeight(t,e){const a=(""+t).match(LINE_HEIGHT);if(!a||a[1]==="normal")return e*1.2;switch(t=+a[2],a[3]){case"px":return t;case"%":t/=100;break}return e*t}const numberOrZero=t=>+t||0;function _readValueToProps(t,e){const a={},n=isObject$8(e),r=n?Object.keys(e):e,i=isObject$8(t)?n?o=>valueOrDefault(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of r)a[o]=numberOrZero(i(o));return a}function toTRBL(t){return _readValueToProps(t,{top:"y",right:"x",bottom:"y",left:"x"})}function toTRBLCorners(t){return _readValueToProps(t,["topLeft","topRight","bottomLeft","bottomRight"])}function toPadding(t){const e=toTRBL(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function toFont(t,e){t=t||{},e=e||defaults.font;let a=valueOrDefault(t.size,e.size);typeof a=="string"&&(a=parseInt(a,10));let n=valueOrDefault(t.style,e.style);n&&!(""+n).match(FONT_STYLE)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const r={family:valueOrDefault(t.family,e.family),lineHeight:toLineHeight(valueOrDefault(t.lineHeight,e.lineHeight),a),size:a,style:n,weight:valueOrDefault(t.weight,e.weight),string:""};return r.string=toFontString(r),r}function resolve(t,e,a,n){let r=!0,i,o,s;for(i=0,o=t.length;i<o;++i)if(s=t[i],s!==void 0&&(e!==void 0&&typeof s=="function"&&(s=s(e),r=!1),a!==void 0&&isArray$b(s)&&(s=s[a%s.length],r=!1),s!==void 0))return n&&!r&&(n.cacheable=!1),s}function _addGrace(t,e,a){const{min:n,max:r}=t,i=toDimension(e,(r-n)/2),o=(s,l)=>a&&s===0?0:s+l;return{min:o(n,-Math.abs(i)),max:o(r,i)}}function createContext(t,e){return Object.assign(Object.create(t),e)}function _createResolver(t,e=[""],a,n,r=()=>t[0]){const i=a||t;typeof n>"u"&&(n=_resolve("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:s=>_createResolver([s,...t],e,i,n)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete t[0][l],!0},get(s,l){return _cached(s,l,()=>_resolveWithPrefixes(l,e,t,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(s,l){return getKeysFromAllScopes(s).includes(l)},ownKeys(s){return getKeysFromAllScopes(s)},set(s,l,u){const c=s._storage||(s._storage=r());return s[l]=c[l]=u,delete s._keys,!0}})}function _attachContext(t,e,a,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:a,_stack:new Set,_descriptors:_descriptors(t,n),setContext:i=>_attachContext(t,i,a,n),override:i=>_attachContext(t.override(i),e,a,n)};return new Proxy(r,{deleteProperty(i,o){return delete i[o],delete t[o],!0},get(i,o,s){return _cached(i,o,()=>_resolveWithContext(i,o,s))},getOwnPropertyDescriptor(i,o){return i._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(i,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(i,o,s){return t[o]=s,delete i[o],!0}})}function _descriptors(t,e={scriptable:!0,indexable:!0}){const{_scriptable:a=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:a,indexable:n,isScriptable:isFunction$3(a)?a:()=>a,isIndexable:isFunction$3(n)?n:()=>n}}const readKey=(t,e)=>t?t+_capitalize(e):e,needsSubResolver=(t,e)=>isObject$8(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function _cached(t,e,a){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=a();return t[e]=n,n}function _resolveWithContext(t,e,a){const{_proxy:n,_context:r,_subProxy:i,_descriptors:o}=t;let s=n[e];return isFunction$3(s)&&o.isScriptable(e)&&(s=_resolveScriptable(e,s,t,a)),isArray$b(s)&&s.length&&(s=_resolveArray(e,s,t,o.isIndexable)),needsSubResolver(e,s)&&(s=_attachContext(s,r,i&&i[e],o)),s}function _resolveScriptable(t,e,a,n){const{_proxy:r,_context:i,_subProxy:o,_stack:s}=a;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t);let l=e(i,o||n);return s.delete(t),needsSubResolver(t,l)&&(l=createSubResolver(r._scopes,r,t,l)),l}function _resolveArray(t,e,a,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=a;if(typeof i.index<"u"&&n(t))return e[i.index%e.length];if(isObject$8(e[0])){const l=e,u=r._scopes.filter(c=>c!==l);e=[];for(const c of l){const d=createSubResolver(u,r,t,c);e.push(_attachContext(d,i,o&&o[t],s))}}return e}function resolveFallback(t,e,a){return isFunction$3(t)?t(e,a):t}const getScope=(t,e)=>t===!0?e:typeof t=="string"?resolveObjectKey(e,t):void 0;function addScopes(t,e,a,n,r){for(const i of e){const o=getScope(a,i);if(o){t.add(o);const s=resolveFallback(o._fallback,a,r);if(typeof s<"u"&&s!==a&&s!==n)return s}else if(o===!1&&typeof n<"u"&&a!==n)return null}return!1}function createSubResolver(t,e,a,n){const r=e._rootScopes,i=resolveFallback(e._fallback,a,n),o=[...t,...r],s=new Set;s.add(n);let l=addScopesFromKey(s,o,a,i||a,n);return l===null||typeof i<"u"&&i!==a&&(l=addScopesFromKey(s,o,i,l,n),l===null)?!1:_createResolver(Array.from(s),[""],r,i,()=>subGetTarget(e,a,n))}function addScopesFromKey(t,e,a,n,r){for(;a;)a=addScopes(t,e,a,n,r);return a}function subGetTarget(t,e,a){const n=t._getTarget();e in n||(n[e]={});const r=n[e];return isArray$b(r)&&isObject$8(a)?a:r||{}}function _resolveWithPrefixes(t,e,a,n){let r;for(const i of e)if(r=_resolve(readKey(i,t),a),typeof r<"u")return needsSubResolver(t,r)?createSubResolver(a,n,t,r):r}function _resolve(t,e){for(const a of e){if(!a)continue;const n=a[t];if(typeof n<"u")return n}}function getKeysFromAllScopes(t){let e=t._keys;return e||(e=t._keys=resolveKeysFromAllScopes(t._scopes)),e}function resolveKeysFromAllScopes(t){const e=new Set;for(const a of t)for(const n of Object.keys(a).filter(r=>!r.startsWith("_")))e.add(n);return Array.from(e)}function _parseObjectDataRadialScale(t,e,a,n){const{iScale:r}=t,{key:i="r"}=this._parsing,o=new Array(n);let s,l,u,c;for(s=0,l=n;s<l;++s)u=s+a,c=e[u],o[s]={r:r.parse(resolveObjectKey(c,i),u)};return o}const EPSILON=Number.EPSILON||1e-14,getPoint=(t,e)=>e<t.length&&!t[e].skip&&t[e],getValueAxis=t=>t==="x"?"y":"x";function splineCurve(t,e,a,n){const r=t.skip?e:t,i=e,o=a.skip?e:a,s=distanceBetweenPoints(i,r),l=distanceBetweenPoints(o,i);let u=s/(s+l),c=l/(s+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const d=n*u,h=n*c;return{previous:{x:i.x-d*(o.x-r.x),y:i.y-d*(o.y-r.y)},next:{x:i.x+h*(o.x-r.x),y:i.y+h*(o.y-r.y)}}}function monotoneAdjust(t,e,a){const n=t.length;let r,i,o,s,l,u=getPoint(t,0);for(let c=0;c<n-1;++c)if(l=u,u=getPoint(t,c+1),!(!l||!u)){if(almostEquals(e[c],0,EPSILON)){a[c]=a[c+1]=0;continue}r=a[c]/e[c],i=a[c+1]/e[c],s=Math.pow(r,2)+Math.pow(i,2),!(s<=9)&&(o=3/Math.sqrt(s),a[c]=r*o*e[c],a[c+1]=i*o*e[c])}}function monotoneCompute(t,e,a="x"){const n=getValueAxis(a),r=t.length;let i,o,s,l=getPoint(t,0);for(let u=0;u<r;++u){if(o=s,s=l,l=getPoint(t,u+1),!s)continue;const c=s[a],d=s[n];o&&(i=(c-o[a])/3,s[`cp1${a}`]=c-i,s[`cp1${n}`]=d-i*e[u]),l&&(i=(l[a]-c)/3,s[`cp2${a}`]=c+i,s[`cp2${n}`]=d+i*e[u])}}function splineCurveMonotone(t,e="x"){const a=getValueAxis(e),n=t.length,r=Array(n).fill(0),i=Array(n);let o,s,l,u=getPoint(t,0);for(o=0;o<n;++o)if(s=l,l=u,u=getPoint(t,o+1),!!l){if(u){const c=u[e]-l[e];r[o]=c!==0?(u[a]-l[a])/c:0}i[o]=s?u?sign(r[o-1])!==sign(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}monotoneAdjust(t,r,i),monotoneCompute(t,i,e)}function capControlPoint(t,e,a){return Math.max(Math.min(t,a),e)}function capBezierPoints(t,e){let a,n,r,i,o,s=_isPointInArea(t[0],e);for(a=0,n=t.length;a<n;++a)o=i,i=s,s=a<n-1&&_isPointInArea(t[a+1],e),i&&(r=t[a],o&&(r.cp1x=capControlPoint(r.cp1x,e.left,e.right),r.cp1y=capControlPoint(r.cp1y,e.top,e.bottom)),s&&(r.cp2x=capControlPoint(r.cp2x,e.left,e.right),r.cp2y=capControlPoint(r.cp2y,e.top,e.bottom)))}function _updateBezierControlPoints(t,e,a,n,r){let i,o,s,l;if(e.spanGaps&&(t=t.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")splineCurveMonotone(t,r);else{let u=n?t[t.length-1]:t[0];for(i=0,o=t.length;i<o;++i)s=t[i],l=splineCurve(u,s,t[Math.min(i+1,o-(n?0:1))%o],e.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,u=s}e.capBezierPoints&&capBezierPoints(t,a)}function _isDomSupported(){return typeof window<"u"&&typeof document<"u"}function _getParentNode(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function parseMaxStyle(t,e,a){let n;return typeof t=="string"?(n=parseInt(t,10),t.indexOf("%")!==-1&&(n=n/100*e.parentNode[a])):n=t,n}const getComputedStyle$1=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function getStyle(t,e){return getComputedStyle$1(t).getPropertyValue(e)}const positions=["top","right","bottom","left"];function getPositionedStyle(t,e,a){const n={};a=a?"-"+a:"";for(let r=0;r<4;r++){const i=positions[r];n[i]=parseFloat(t[e+"-"+i+a])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const useOffsetPos=(t,e,a)=>(t>0||e>0)&&(!a||!a.shadowRoot);function getCanvasPosition(t,e){const a=t.touches,n=a&&a.length?a[0]:t,{offsetX:r,offsetY:i}=n;let o=!1,s,l;if(useOffsetPos(r,i,t.target))s=r,l=i;else{const u=e.getBoundingClientRect();s=n.clientX-u.left,l=n.clientY-u.top,o=!0}return{x:s,y:l,box:o}}function getRelativePosition(t,e){if("native"in t)return t;const{canvas:a,currentDevicePixelRatio:n}=e,r=getComputedStyle$1(a),i=r.boxSizing==="border-box",o=getPositionedStyle(r,"padding"),s=getPositionedStyle(r,"border","width"),{x:l,y:u,box:c}=getCanvasPosition(t,a),d=o.left+(c&&s.left),h=o.top+(c&&s.top);let{width:m,height:p}=e;return i&&(m-=o.width+s.width,p-=o.height+s.height),{x:Math.round((l-d)/m*a.width/n),y:Math.round((u-h)/p*a.height/n)}}function getContainerSize(t,e,a){let n,r;if(e===void 0||a===void 0){const i=_getParentNode(t);if(!i)e=t.clientWidth,a=t.clientHeight;else{const o=i.getBoundingClientRect(),s=getComputedStyle$1(i),l=getPositionedStyle(s,"border","width"),u=getPositionedStyle(s,"padding");e=o.width-u.width-l.width,a=o.height-u.height-l.height,n=parseMaxStyle(s.maxWidth,i,"clientWidth"),r=parseMaxStyle(s.maxHeight,i,"clientHeight")}}return{width:e,height:a,maxWidth:n||INFINITY$5,maxHeight:r||INFINITY$5}}const round1=t=>Math.round(t*10)/10;function getMaximumSize(t,e,a,n){const r=getComputedStyle$1(t),i=getPositionedStyle(r,"margin"),o=parseMaxStyle(r.maxWidth,t,"clientWidth")||INFINITY$5,s=parseMaxStyle(r.maxHeight,t,"clientHeight")||INFINITY$5,l=getContainerSize(t,e,a);let{width:u,height:c}=l;if(r.boxSizing==="content-box"){const h=getPositionedStyle(r,"border","width"),m=getPositionedStyle(r,"padding");u-=m.width+h.width,c-=m.height+h.height}return u=Math.max(0,u-i.width),c=Math.max(0,n?u/n:c-i.height),u=round1(Math.min(u,o,l.maxWidth)),c=round1(Math.min(c,s,l.maxHeight)),u&&!c&&(c=round1(u/2)),(e!==void 0||a!==void 0)&&n&&l.height&&c>l.height&&(c=l.height,u=round1(Math.floor(c*n))),{width:u,height:c}}function retinaScale(t,e,a){const n=e||1,r=Math.floor(t.height*n),i=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(a||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||o.height!==r||o.width!==i?(t.currentDevicePixelRatio=n,o.height=r,o.width=i,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}const supportsEventListenerOptions=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return t}();function readUsedSize(t,e){const a=getStyle(t,e),n=a&&a.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function _pointInLine(t,e,a,n){return{x:t.x+a*(e.x-t.x),y:t.y+a*(e.y-t.y)}}function _steppedInterpolation(t,e,a,n){return{x:t.x+a*(e.x-t.x),y:n==="middle"?a<.5?t.y:e.y:n==="after"?a<1?t.y:e.y:a>0?e.y:t.y}}function _bezierInterpolation(t,e,a,n){const r={x:t.cp2x,y:t.cp2y},i={x:e.cp1x,y:e.cp1y},o=_pointInLine(t,r,a),s=_pointInLine(r,i,a),l=_pointInLine(i,e,a),u=_pointInLine(o,s,a),c=_pointInLine(s,l,a);return _pointInLine(u,c,a)}const getRightToLeftAdapter=function(t,e){return{x(a){return t+t+e-a},setWidth(a){e=a},textAlign(a){return a==="center"?a:a==="right"?"left":"right"},xPlus(a,n){return a-n},leftForLtr(a,n){return a-n}}},getLeftToRightAdapter=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function getRtlAdapter(t,e,a){return t?getRightToLeftAdapter(e,a):getLeftToRightAdapter()}function overrideTextDirection(t,e){let a,n;(e==="ltr"||e==="rtl")&&(a=t.canvas.style,n=[a.getPropertyValue("direction"),a.getPropertyPriority("direction")],a.setProperty("direction",e,"important"),t.prevTextDirection=n)}function restoreTextDirection(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function propertyFn(t){return t==="angle"?{between:_angleBetween,compare:_angleDiff,normalize:_normalizeAngle}:{between:_isBetween,compare:(e,a)=>e-a,normalize:e=>e}}function normalizeSegment({start:t,end:e,count:a,loop:n,style:r}){return{start:t%a,end:e%a,loop:n&&(e-t+1)%a===0,style:r}}function getSegment(t,e,a){const{property:n,start:r,end:i}=a,{between:o,normalize:s}=propertyFn(n),l=e.length;let{start:u,end:c,loop:d}=t,h,m;if(d){for(u+=l,c+=l,h=0,m=l;h<m&&o(s(e[u%l][n]),r,i);++h)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:d,style:t.style}}function _boundSegment(t,e,a){if(!a)return[t];const{property:n,start:r,end:i}=a,o=e.length,{compare:s,between:l,normalize:u}=propertyFn(n),{start:c,end:d,loop:h,style:m}=getSegment(t,e,a),p=[];let v=!1,y=null,w,_,D;const k=()=>l(r,D,w)&&s(r,D)!==0,O=()=>s(i,w)===0||l(i,D,w),N=()=>v||k(),F=()=>!v||O();for(let g=c,b=c;g<=d;++g)_=e[g%o],!_.skip&&(w=u(_[n]),w!==D&&(v=l(w,r,i),y===null&&N()&&(y=s(w,r)===0?g:b),y!==null&&F()&&(p.push(normalizeSegment({start:y,end:g,loop:h,count:o,style:m})),y=null),b=g,D=w));return y!==null&&p.push(normalizeSegment({start:y,end:d,loop:h,count:o,style:m})),p}function _boundSegments(t,e){const a=[],n=t.segments;for(let r=0;r<n.length;r++){const i=_boundSegment(n[r],t.points,e);i.length&&a.push(...i)}return a}function findStartAndEnd(t,e,a,n){let r=0,i=e-1;if(a&&!n)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,a&&(i+=r);i>r&&t[i%e].skip;)i--;return i%=e,{start:r,end:i}}function solidSegments(t,e,a,n){const r=t.length,i=[];let o=e,s=t[e],l;for(l=e+1;l<=a;++l){const u=t[l%r];u.skip||u.stop?s.skip||(n=!1,i.push({start:e%r,end:(l-1)%r,loop:n}),e=o=u.stop?l:null):(o=l,s.skip&&(e=l)),s=u}return o!==null&&i.push({start:e%r,end:o%r,loop:n}),i}function _computeSegments(t,e){const a=t.points,n=t.options.spanGaps,r=a.length;if(!r)return[];const i=!!t._loop,{start:o,end:s}=findStartAndEnd(a,r,i,n);if(n===!0)return splitByStyles(t,[{start:o,end:s,loop:i}],a,e);const l=s<o?s+r:s,u=!!t._fullLoop&&o===0&&s===r-1;return splitByStyles(t,solidSegments(a,o,l,u),a,e)}function splitByStyles(t,e,a,n){return!n||!n.setContext||!a?e:doSplitByStyles(t,e,a,n)}function doSplitByStyles(t,e,a,n){const r=t._chart.getContext(),i=readStyle(t.options),{_datasetIndex:o,options:{spanGaps:s}}=t,l=a.length,u=[];let c=i,d=e[0].start,h=d;function m(p,v,y,w){const _=s?-1:1;if(p!==v){for(p+=l;a[p%l].skip;)p-=_;for(;a[v%l].skip;)v+=_;p%l!==v%l&&(u.push({start:p%l,end:v%l,loop:y,style:w}),c=w,d=v%l)}}for(const p of e){d=s?d:p.start;let v=a[d%l],y;for(h=d+1;h<=p.end;h++){const w=a[h%l];y=readStyle(n.setContext(createContext(r,{type:"segment",p0:v,p1:w,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),styleChanged(y,c)&&m(d,h-1,p.loop,c),v=w,c=y}d<h-1&&m(d,h-1,p.loop,c)}return u}function readStyle(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function styleChanged(t,e){if(!e)return!1;const a=[],n=function(r,i){return isPatternOrGradient(i)?(a.includes(i)||a.push(i),a.indexOf(i)):i};return JSON.stringify(t,n)!==JSON.stringify(e,n)}/*!
|
||
* Chart.js v4.4.0
|
||
* https://www.chartjs.org
|
||
* (c) 2023 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,a,n,r){const i=a.listeners[r],o=a.duration;i.forEach(s=>s({chart:e,initial:a.initial,numSteps:o,currentStep:Math.min(n-a.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let a=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;const i=n.items;let o=i.length-1,s=!1,l;for(;o>=0;--o)l=i[o],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),s=!0):(i[o]=i[i.length-1],i.pop());s&&(r.draw(),this._notify(r,n,e,"progress")),i.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),a+=i.length}),this._lastDate=e,a===0&&(this._running=!1)}_getAnims(e){const a=this._charts;let n=a.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},a.set(e,n)),n}listen(e,a,n){this._getAnims(e).listeners[a].push(n)}add(e,a){!a||!a.length||this._getAnims(e).items.push(...a)}has(e){return this._getAnims(e).items.length>0}start(e){const a=this._charts.get(e);a&&(a.running=!0,a.start=Date.now(),a.duration=a.items.reduce((n,r)=>Math.max(n,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;const a=this._charts.get(e);return!(!a||!a.running||!a.items.length)}stop(e){const a=this._charts.get(e);if(!a||!a.items.length)return;const n=a.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();a.items=[],this._notify(e,a,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var animator=new Animator;const transparent="transparent",interpolators={boolean(t,e,a){return a>.5?e:t},color(t,e,a){const n=color(t||transparent),r=n.valid&&color(e||transparent);return r&&r.valid?r.mix(n,a).hexString():e},number(t,e,a){return t+(e-t)*a}};class Animation{constructor(e,a,n,r){const i=a[n];r=resolve([e.to,r,i,e.from]);const o=resolve([e.from,i,r]);this._active=!0,this._fn=e.fn||interpolators[e.type||typeof o],this._easing=effects[e.easing]||effects.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=a,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(e,a,n){if(this._active){this._notify(!1);const r=this._target[this._prop],i=n-this._start,o=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=resolve([e.to,a,r,e.from]),this._from=resolve([e.from,r,a])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const a=e-this._start,n=this._duration,r=this._prop,i=this._from,o=this._loop,s=this._to;let l;if(this._active=i!==s&&(o||a<n),!this._active){this._target[r]=s,this._notify(!0);return}if(a<0){this._target[r]=i;return}l=a/n%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(i,s,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((a,n)=>{e.push({res:a,rej:n})})}_notify(e){const a=e?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][a]()}}class Animations{constructor(e,a){this._chart=e,this._properties=new Map,this.configure(a)}configure(e){if(!isObject$8(e))return;const a=Object.keys(defaults.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{const i=e[r];if(!isObject$8(i))return;const o={};for(const s of a)o[s]=i[s];(isArray$b(i.properties)&&i.properties||[r]).forEach(s=>{(s===r||!n.has(s))&&n.set(s,o)})})}_animateOptions(e,a){const n=a.options,r=resolveTargetOptions(e,n);if(!r)return[];const i=this._createAnimations(r,n);return n.$shared&&awaitAll(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,a){const n=this._properties,r=[],i=e.$animations||(e.$animations={}),o=Object.keys(a),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){r.push(...this._animateOptions(e,a));continue}const c=a[u];let d=i[u];const h=n.get(u);if(d)if(h&&d.active()){d.update(h,c,s);continue}else d.cancel();if(!h||!h.duration){e[u]=c;continue}i[u]=d=new Animation(h,e,u,c),r.push(d)}return r}update(e,a){if(this._properties.size===0){Object.assign(e,a);return}const n=this._createAnimations(e,a);if(n.length)return animator.add(this._chart,n),!0}}function awaitAll(t,e){const a=[],n=Object.keys(e);for(let r=0;r<n.length;r++){const i=t[n[r]];i&&i.active()&&a.push(i.wait())}return Promise.all(a)}function resolveTargetOptions(t,e){if(!e)return;let a=t.options;if(!a){t.options=e;return}return a.$shared&&(t.options=a=Object.assign({},a,{$shared:!1,$animations:{}})),a}function scaleClip(t,e){const a=t&&t.options||{},n=a.reverse,r=a.min===void 0?e:0,i=a.max===void 0?e:0;return{start:n?i:r,end:n?r:i}}function defaultClip(t,e,a){if(a===!1)return!1;const n=scaleClip(t,a),r=scaleClip(e,a);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}function toClip(t){let e,a,n,r;return isObject$8(t)?(e=t.top,a=t.right,n=t.bottom,r=t.left):e=a=n=r=t,{top:e,right:a,bottom:n,left:r,disabled:t===!1}}function getSortedDatasetIndices(t,e){const a=[],n=t._getSortedDatasetMetas(e);let r,i;for(r=0,i=n.length;r<i;++r)a.push(n[r].index);return a}function applyStack(t,e,a,n={}){const r=t.keys,i=n.mode==="single";let o,s,l,u;if(e!==null){for(o=0,s=r.length;o<s;++o){if(l=+r[o],l===a){if(n.all)continue;break}u=t.values[l],isNumberFinite(u)&&(i||e===0||sign(e)===sign(u))&&(e+=u)}return e}}function convertObjectDataToArray(t){const e=Object.keys(t),a=new Array(e.length);let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],a[n]={x:i,y:t[i]};return a}function isStacked(t,e){const a=t&&t.options.stacked;return a||a===void 0&&e.stack!==void 0}function getStackKey(t,e,a){return`${t.id}.${e.id}.${a.stack||a.type}`}function getUserBounds(t){const{min:e,max:a,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?a:Number.POSITIVE_INFINITY}}function getOrCreateStack(t,e,a){const n=t[e]||(t[e]={});return n[a]||(n[a]={})}function getLastIndexInStack(t,e,a,n){for(const r of e.getMatchingVisibleMetas(n).reverse()){const i=t[r.index];if(a&&i>0||!a&&i<0)return r.index}return null}function updateStacks(t,e){const{chart:a,_cachedMeta:n}=t,r=a._stacks||(a._stacks={}),{iScale:i,vScale:o,index:s}=n,l=i.axis,u=o.axis,c=getStackKey(i,o,n),d=e.length;let h;for(let m=0;m<d;++m){const p=e[m],{[l]:v,[u]:y}=p,w=p._stacks||(p._stacks={});h=w[u]=getOrCreateStack(r,c,v),h[s]=y,h._top=getLastIndexInStack(h,o,!0,n.type),h._bottom=getLastIndexInStack(h,o,!1,n.type);const _=h._visualValues||(h._visualValues={});_[s]=y}}function getFirstScaleId(t,e){const a=t.scales;return Object.keys(a).filter(n=>a[n].axis===e).shift()}function createDatasetContext(t,e){return createContext(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function createDataContext(t,e,a){return createContext(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:a,index:e,mode:"default",type:"data"})}function clearStacks(t,e){const a=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const r of e){const i=r._stacks;if(!i||i[n]===void 0||i[n][a]===void 0)return;delete i[n][a],i[n]._visualValues!==void 0&&i[n]._visualValues[a]!==void 0&&delete i[n]._visualValues[a]}}}const isDirectUpdateMode=t=>t==="reset"||t==="none",cloneIfNotShared=(t,e)=>e?t:Object.assign({},t),createStack=(t,e,a)=>t&&!e.hidden&&e._stacked&&{keys:getSortedDatasetIndices(a,!0),values:null};class DatasetController{constructor(e,a){this.chart=e,this._ctx=e.ctx,this.index=a,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=isStacked(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&clearStacks(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,a=this._cachedMeta,n=this.getDataset(),r=(d,h,m,p)=>d==="x"?h:d==="r"?p:m,i=a.xAxisID=valueOrDefault(n.xAxisID,getFirstScaleId(e,"x")),o=a.yAxisID=valueOrDefault(n.yAxisID,getFirstScaleId(e,"y")),s=a.rAxisID=valueOrDefault(n.rAxisID,getFirstScaleId(e,"r")),l=a.indexAxis,u=a.iAxisID=r(l,i,o,s),c=a.vAxisID=r(l,o,i,s);a.xScale=this.getScaleForId(i),a.yScale=this.getScaleForId(o),a.rScale=this.getScaleForId(s),a.iScale=this.getScaleForId(u),a.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const a=this._cachedMeta;return e===a.iScale?a.vScale:a.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&unlistenArrayEvents(this._data,this),e._stacked&&clearStacks(e)}_dataCheck(){const e=this.getDataset(),a=e.data||(e.data=[]),n=this._data;if(isObject$8(a))this._data=convertObjectDataToArray(a);else if(n!==a){if(n){unlistenArrayEvents(n,this);const r=this._cachedMeta;clearStacks(r),r._parsed=[]}a&&Object.isExtensible(a)&&listenArrayEvents(a,this),this._syncList=[],this._data=a}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const a=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const i=a._stacked;a._stacked=isStacked(a.vScale,a),a.stack!==n.stack&&(r=!0,clearStacks(a),a.stack=n.stack),this._resyncElements(e),(r||i!==a._stacked)&&updateStacks(this,a._parsed)}configure(){const e=this.chart.config,a=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),a,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,a){const{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:o}=n,s=i.axis;let l=e===0&&a===r.length?!0:n._sorted,u=e>0&&n._parsed[e-1],c,d,h;if(this._parsing===!1)n._parsed=r,n._sorted=!0,h=r;else{isArray$b(r[e])?h=this.parseArrayData(n,r,e,a):isObject$8(r[e])?h=this.parseObjectData(n,r,e,a):h=this.parsePrimitiveData(n,r,e,a);const m=()=>d[s]===null||u&&d[s]<u[s];for(c=0;c<a;++c)n._parsed[c+e]=d=h[c],l&&(m()&&(l=!1),u=d);n._sorted=l}o&&updateStacks(this,h)}parsePrimitiveData(e,a,n,r){const{iScale:i,vScale:o}=e,s=i.axis,l=o.axis,u=i.getLabels(),c=i===o,d=new Array(r);let h,m,p;for(h=0,m=r;h<m;++h)p=h+n,d[h]={[s]:c||i.parse(u[p],p),[l]:o.parse(a[p],p)};return d}parseArrayData(e,a,n,r){const{xScale:i,yScale:o}=e,s=new Array(r);let l,u,c,d;for(l=0,u=r;l<u;++l)c=l+n,d=a[c],s[l]={x:i.parse(d[0],c),y:o.parse(d[1],c)};return s}parseObjectData(e,a,n,r){const{xScale:i,yScale:o}=e,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=new Array(r);let c,d,h,m;for(c=0,d=r;c<d;++c)h=c+n,m=a[h],u[c]={x:i.parse(resolveObjectKey(m,s),h),y:o.parse(resolveObjectKey(m,l),h)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,a,n){const r=this.chart,i=this._cachedMeta,o=a[e.axis],s={keys:getSortedDatasetIndices(r,!0),values:a._stacks[e.axis]._visualValues};return applyStack(s,o,i.index,{mode:n})}updateRangeFromParsed(e,a,n,r){const i=n[a.axis];let o=i===null?NaN:i;const s=r&&n._stacks[a.axis];r&&s&&(r.values=s,o=applyStack(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,a){const n=this._cachedMeta,r=n._parsed,i=n._sorted&&e===n.iScale,o=r.length,s=this._getOtherScale(e),l=createStack(a,n,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=getUserBounds(s);let h,m;function p(){m=r[h];const v=m[s.axis];return!isNumberFinite(m[e.axis])||c>v||d<v}for(h=0;h<o&&!(!p()&&(this.updateRangeFromParsed(u,e,m,l),i));++h);if(i){for(h=o-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(u,e,m,l);break}}return u}getAllParsedValues(e){const a=this._cachedMeta._parsed,n=[];let r,i,o;for(r=0,i=a.length;r<i;++r)o=a[r][e.axis],isNumberFinite(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const a=this._cachedMeta,n=a.iScale,r=a.vScale,i=this.getParsed(e);return{label:n?""+n.getLabelForValue(i[n.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(e){const a=this._cachedMeta;this.update(e||"default"),a._clip=toClip(valueOrDefault(this.options.clip,defaultClip(a.xScale,a.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,a=this.chart,n=this._cachedMeta,r=n.data||[],i=a.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||r.length-s,u=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(e,i,s,l),c=s;c<s+l;++c){const d=r[c];d.hidden||(d.active&&u?o.push(d):d.draw(e,i))}for(c=0;c<o.length;++c)o[c].draw(e,i)}getStyle(e,a){const n=a?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,a,n){const r=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];i=o.$context||(o.$context=createDataContext(this.getContext(),e,o)),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=createDatasetContext(this.chart.getContext(),this.index)),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!a,i.mode=n,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,a){return this._resolveElementOptions(this.dataElementType.id,a,e)}_resolveElementOptions(e,a="default",n){const r=a==="active",i=this._cachedDataOpts,o=e+"-"+a,s=i[o],l=this.enableOptionSharing&&defined$1(n);if(s)return cloneIfNotShared(s,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,e),d=r?[`${e}Hover`,"hover",e,""]:[e,""],h=u.getOptionScopes(this.getDataset(),c),m=Object.keys(defaults.elements[e]),p=()=>this.getContext(n,r,a),v=u.resolveNamedOptions(h,m,p,d);return v.$shared&&(v.$shared=l,i[o]=Object.freeze(cloneIfNotShared(v,l))),v}_resolveAnimations(e,a,n){const r=this.chart,i=this._cachedDataOpts,o=`animation-${a}`,s=i[o];if(s)return s;let l;if(r.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,a),h=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(h,this.getContext(e,n,a))}const u=new Animations(r,l&&l.animations);return l&&l._cacheable&&(i[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,a){return!a||isDirectUpdateMode(e)||this.chart._animationsDisabled}_getSharedOptions(e,a){const n=this.resolveDataElementOptions(e,a),r=this._sharedOptions,i=this.getSharedOptions(n),o=this.includeOptions(a,i)||i!==r;return this.updateSharedOptions(i,a,n),{sharedOptions:i,includeOptions:o}}updateElement(e,a,n,r){isDirectUpdateMode(r)?Object.assign(e,n):this._resolveAnimations(a,r).update(e,n)}updateSharedOptions(e,a,n){e&&!isDirectUpdateMode(a)&&this._resolveAnimations(void 0,a).update(e,n)}_setStyle(e,a,n,r){e.active=r;const i=this.getStyle(a,r);this._resolveAnimations(a,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,a,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,a,n){this._setStyle(e,n,"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 a=this._data,n=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const r=n.length,i=a.length,o=Math.min(i,r);o&&this.parse(0,o),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,a,n=!0){const r=this._cachedMeta,i=r.data,o=e+a;let s;const l=u=>{for(u.length+=a,s=u.length-1;s>=o;s--)u[s]=u[s-a]};for(l(i),s=e;s<o;++s)i[s]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(e,a),n&&this.updateElements(i,e,a,"reset")}updateElements(e,a,n,r){}_removeElements(e,a){const n=this._cachedMeta;if(this._parsing){const r=n._parsed.splice(e,a);n._stacked&&clearStacks(n,r)}n.data.splice(e,a)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[a,n,r]=e;this[a](n,r)}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,a){a&&this._sync(["_removeElements",e,a]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}R(DatasetController,"defaults",{}),R(DatasetController,"datasetElementType",null),R(DatasetController,"dataElementType",null);function getAllScaleValues(t,e){if(!t._cache.$bar){const a=t.getMatchingVisibleMetas(e);let n=[];for(let r=0,i=a.length;r<i;r++)n=n.concat(a[r].controller.getAllParsedValues(t));t._cache.$bar=_arrayUnique(n.sort((r,i)=>r-i))}return t._cache.$bar}function computeMinSampleSize(t){const e=t.iScale,a=getAllScaleValues(e,t.type);let n=e._length,r,i,o,s;const l=()=>{o===32767||o===-32768||(defined$1(s)&&(n=Math.min(n,Math.abs(o-s)||n)),s=o)};for(r=0,i=a.length;r<i;++r)o=e.getPixelForValue(a[r]),l();for(s=void 0,r=0,i=e.ticks.length;r<i;++r)o=e.getPixelForTick(r),l();return n}function computeFitCategoryTraits(t,e,a,n){const r=a.barThickness;let i,o;return isNullOrUndef(r)?(i=e.min*a.categoryPercentage,o=a.barPercentage):(i=r*n,o=1),{chunk:i/n,ratio:o,start:e.pixels[t]-i/2}}function computeFlexCategoryTraits(t,e,a,n){const r=e.pixels,i=r[t];let o=t>0?r[t-1]:null,s=t<r.length-1?r[t+1]:null;const l=a.categoryPercentage;o===null&&(o=i-(s===null?e.end-e.start:s-i)),s===null&&(s=i+i-o);const u=i-(i-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/n,ratio:a.barPercentage,start:u}}function parseFloatBar(t,e,a,n){const r=a.parse(t[0],n),i=a.parse(t[1],n),o=Math.min(r,i),s=Math.max(r,i);let l=o,u=s;Math.abs(o)>Math.abs(s)&&(l=s,u=o),e[a.axis]=u,e._custom={barStart:l,barEnd:u,start:r,end:i,min:o,max:s}}function parseValue(t,e,a,n){return isArray$b(t)?parseFloatBar(t,e,a,n):e[a.axis]=a.parse(t,n),e}function parseArrayOrPrimitive(t,e,a,n){const r=t.iScale,i=t.vScale,o=r.getLabels(),s=r===i,l=[];let u,c,d,h;for(u=a,c=a+n;u<c;++u)h=e[u],d={},d[r.axis]=s||r.parse(o[u],u),l.push(parseValue(h,d,i,u));return l}function isFloatBar(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function barSign(t,e,a){return t!==0?sign(t):(e.isHorizontal()?1:-1)*(e.min>=a?1:-1)}function borderProps(t){let e,a,n,r,i;return t.horizontal?(e=t.base>t.x,a="left",n="right"):(e=t.base<t.y,a="bottom",n="top"),e?(r="end",i="start"):(r="start",i="end"),{start:a,end:n,reverse:e,top:r,bottom:i}}function setBorderSkipped(t,e,a,n){let r=e.borderSkipped;const i={};if(!r){t.borderSkipped=i;return}if(r===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:s,reverse:l,top:u,bottom:c}=borderProps(t);r==="middle"&&a&&(t.enableBorderRadius=!0,(a._top||0)===n?r=u:(a._bottom||0)===n?r=c:(i[parseEdge(c,o,s,l)]=!0,r=u)),i[parseEdge(r,o,s,l)]=!0,t.borderSkipped=i}function parseEdge(t,e,a,n){return n?(t=swap(t,e,a),t=startEnd(t,a,e)):t=startEnd(t,e,a),t}function swap(t,e,a){return t===e?a:t===a?e:t}function startEnd(t,e,a){return t==="start"?e:t==="end"?a:t}function setInflateAmount(t,{inflateAmount:e},a){t.inflateAmount=e==="auto"?a===1?.33:0:e}class BarController extends DatasetController{parsePrimitiveData(e,a,n,r){return parseArrayOrPrimitive(e,a,n,r)}parseArrayData(e,a,n,r){return parseArrayOrPrimitive(e,a,n,r)}parseObjectData(e,a,n,r){const{iScale:i,vScale:o}=e,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=i.axis==="x"?s:l,c=o.axis==="x"?s:l,d=[];let h,m,p,v;for(h=n,m=n+r;h<m;++h)v=a[h],p={},p[i.axis]=i.parse(resolveObjectKey(v,u),h),d.push(parseValue(resolveObjectKey(v,c),p,o,h));return d}updateRangeFromParsed(e,a,n,r){super.updateRangeFromParsed(e,a,n,r);const i=n._custom;i&&a===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const a=this._cachedMeta,{iScale:n,vScale:r}=a,i=this.getParsed(e),o=i._custom,s=isFloatBar(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(i[r.axis]);return{label:""+n.getLabelForValue(i[n.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const a=this._cachedMeta;this.updateElements(a.data,0,a.data.length,e)}updateElements(e,a,n,r){const i=r==="reset",{index:o,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),u=s.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(a,r);for(let m=a;m<a+n;m++){const p=this.getParsed(m),v=i||isNullOrUndef(p[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(m),y=this._calculateBarIndexPixels(m,c),w=(p._stacks||{})[s.axis],_={horizontal:u,base:v.base,enableBorderRadius:!w||isFloatBar(p._custom)||o===w._top||o===w._bottom,x:u?v.head:y.center,y:u?y.center:v.head,height:u?y.size:Math.abs(v.size),width:u?Math.abs(v.size):y.size};h&&(_.options=d||this.resolveDataElementOptions(m,e[m].active?"active":r));const D=_.options||e[m].options;setBorderSkipped(_,D,w,o),setInflateAmount(_,D,c.ratio),this.updateElement(e[m],m,_,r)}}_getStacks(e,a){const{iScale:n}=this._cachedMeta,r=n.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),i=n.options.stacked,o=[],s=l=>{const u=l.controller.getParsed(a),c=u&&u[l.vScale.axis];if(isNullOrUndef(c)||isNaN(c))return!0};for(const l of r)if(!(a!==void 0&&s(l))&&((i===!1||o.indexOf(l.stack)===-1||i===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,a,n){const r=this._getStacks(e,n),i=a!==void 0?r.indexOf(a):-1;return i===-1?r.length-1:i}_getRuler(){const e=this.options,a=this._cachedMeta,n=a.iScale,r=[];let i,o;for(i=0,o=a.data.length;i<o;++i)r.push(n.getPixelForValue(this.getParsed(i)[n.axis],i));const s=e.barThickness;return{min:s||computeMinSampleSize(a),pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:e.grouped,ratio:s?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:a,_stacked:n,index:r},options:{base:i,minBarLength:o}}=this,s=i||0,l=this.getParsed(e),u=l._custom,c=isFloatBar(u);let d=l[a.axis],h=0,m=n?this.applyStack(a,l,n):d,p,v;m!==d&&(h=m-d,m=d),c&&(d=u.barStart,m=u.barEnd-u.barStart,d!==0&&sign(d)!==sign(u.barEnd)&&(h=0),h+=d);const y=!isNullOrUndef(i)&&!c?i:h;let w=a.getPixelForValue(y);if(this.chart.getDataVisibility(e)?p=a.getPixelForValue(h+m):p=w,v=p-w,Math.abs(v)<o){v=barSign(v,a,s)*o,d===s&&(w-=v/2);const _=a.getPixelForDecimal(0),D=a.getPixelForDecimal(1),k=Math.min(_,D),O=Math.max(_,D);w=Math.max(Math.min(w,O),k),p=w+v,n&&!c&&(l._stacks[a.axis]._visualValues[r]=a.getValueForPixel(p)-a.getValueForPixel(w))}if(w===a.getPixelForValue(s)){const _=sign(v)*a.getLineWidthForValue(s)/2;w+=_,v-=_}return{size:v,base:w,head:p,center:p+v/2}}_calculateBarIndexPixels(e,a){const n=a.scale,r=this.options,i=r.skipNull,o=valueOrDefault(r.maxBarThickness,1/0);let s,l;if(a.grouped){const u=i?this._getStackCount(e):a.stackCount,c=r.barThickness==="flex"?computeFlexCategoryTraits(e,a,r,u):computeFitCategoryTraits(e,a,r,u),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?e:void 0);s=c.start+c.chunk*d+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else s=n.getPixelForValue(this.getParsed(e)[n.axis],e),l=Math.min(o,a.min*a.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const e=this._cachedMeta,a=e.vScale,n=e.data,r=n.length;let i=0;for(;i<r;++i)this.getParsed(i)[a.axis]!==null&&n[i].draw(this._ctx)}}R(BarController,"id","bar"),R(BarController,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),R(BarController,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function getRatioAndOffset(t,e,a){let n=1,r=1,i=0,o=0;if(e<TAU){const s=t,l=s+e,u=Math.cos(s),c=Math.sin(s),d=Math.cos(l),h=Math.sin(l),m=(D,k,O)=>_angleBetween(D,s,l,!0)?1:Math.max(k,k*a,O,O*a),p=(D,k,O)=>_angleBetween(D,s,l,!0)?-1:Math.min(k,k*a,O,O*a),v=m(0,u,d),y=m(HALF_PI,c,h),w=p(PI,u,d),_=p(PI+HALF_PI,c,h);n=(v-w)/2,r=(y-_)/2,i=-(v+w)/2,o=-(y+_)/2}return{ratioX:n,ratioY:r,offsetX:i,offsetY:o}}class DoughnutController extends DatasetController{constructor(e,a){super(e,a),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,a){const n=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=n;else{let i=l=>+n[l];if(isObject$8(n[e])){const{key:l="value"}=this._parsing;i=u=>+resolveObjectKey(n[u],l)}let o,s;for(o=e,s=e+a;o<s;++o)r._parsed[o]=i(o)}}_getRotation(){return toRadians(this.options.rotation-90)}_getCircumference(){return toRadians(this.options.circumference)}_getRotationExtents(){let e=TAU,a=-TAU;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const r=this.chart.getDatasetMeta(n).controller,i=r._getRotation(),o=r._getCircumference();e=Math.min(e,i),a=Math.max(a,i+o)}return{rotation:e,circumference:a-e}}update(e){const a=this.chart,{chartArea:n}=a,r=this._cachedMeta,i=r.data,o=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,s=Math.max((Math.min(n.width,n.height)-o)/2,0),l=Math.min(toPercentage(this.options.cutout,s),1),u=this._getRingWeight(this.index),{circumference:c,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:m,offsetX:p,offsetY:v}=getRatioAndOffset(d,c,l),y=(n.width-o)/h,w=(n.height-o)/m,_=Math.max(Math.min(y,w)/2,0),D=toDimension(this.options.radius,_),k=Math.max(D*l,0),O=(D-k)/this._getVisibleDatasetWeightTotal();this.offsetX=p*D,this.offsetY=v*D,r.total=this.calculateTotal(),this.outerRadius=D-O*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-O*u,0),this.updateElements(i,0,i.length,e)}_circumference(e,a){const n=this.options,r=this._cachedMeta,i=this._getCircumference();return a&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||r._parsed[e]===null||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*i/TAU)}updateElements(e,a,n,r){const i=r==="reset",o=this.chart,s=o.chartArea,u=o.options.animation,c=(s.left+s.right)/2,d=(s.top+s.bottom)/2,h=i&&u.animateScale,m=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:v,includeOptions:y}=this._getSharedOptions(a,r);let w=this._getRotation(),_;for(_=0;_<a;++_)w+=this._circumference(_,i);for(_=a;_<a+n;++_){const D=this._circumference(_,i),k=e[_],O={x:c+this.offsetX,y:d+this.offsetY,startAngle:w,endAngle:w+D,circumference:D,outerRadius:p,innerRadius:m};y&&(O.options=v||this.resolveDataElementOptions(_,k.active?"active":r)),w+=D,this.updateElement(k,_,O,r)}}calculateTotal(){const e=this._cachedMeta,a=e.data;let n=0,r;for(r=0;r<a.length;r++){const i=e._parsed[r];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(r)&&!a[r].hidden&&(n+=Math.abs(i))}return n}calculateCircumference(e){const a=this._cachedMeta.total;return a>0&&!isNaN(e)?TAU*(Math.abs(e)/a):0}getLabelAndValue(e){const a=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=formatNumber$1(a._parsed[e],n.options.locale);return{label:r[e]||"",value:i}}getMaxBorderWidth(e){let a=0;const n=this.chart;let r,i,o,s,l;if(!e){for(r=0,i=n.data.datasets.length;r<i;++r)if(n.isDatasetVisible(r)){o=n.getDatasetMeta(r),e=o.data,s=o.controller;break}}if(!e)return 0;for(r=0,i=e.length;r<i;++r)l=s.resolveDataElementOptions(r),l.borderAlign!=="inner"&&(a=Math.max(a,l.borderWidth||0,l.hoverBorderWidth||0));return a}getMaxOffset(e){let a=0;for(let n=0,r=e.length;n<r;++n){const i=this.resolveDataElementOptions(n);a=Math.max(a,i.offset||0,i.hoverOffset||0)}return a}_getRingWeightOffset(e){let a=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(a+=this._getRingWeight(n));return a}_getRingWeight(e){return Math.max(valueOrDefault(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}R(DoughnutController,"id","doughnut"),R(DoughnutController,"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"}),R(DoughnutController,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),R(DoughnutController,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const a=e.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return a.labels.map((i,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,a,n){n.chart.toggleDataVisibility(a.index),n.chart.update()}}}});class LineController extends DatasetController{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const a=this._cachedMeta,{dataset:n,data:r=[],_dataset:i}=a,o=this.chart._animationsDisabled;let{start:s,count:l}=_getStartAndCountOfVisiblePoints(a,r,o);this._drawStart=s,this._drawCount=l,_scaleRangesChanged(a)&&(s=0,l=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!i._decimated,n.points=r;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:u},e),this.updateElements(r,s,l,e)}updateElements(e,a,n,r){const i=r==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(a,r),h=o.axis,m=s.axis,{spanGaps:p,segment:v}=this.options,y=isNumber(p)?p:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||i||r==="none",_=a+n,D=e.length;let k=a>0&&this.getParsed(a-1);for(let O=0;O<D;++O){const N=e[O],F=w?N:{};if(O<a||O>=_){F.skip=!0;continue}const g=this.getParsed(O),b=isNullOrUndef(g[m]),$=F[h]=o.getPixelForValue(g[h],O),S=F[m]=i||b?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,g,l):g[m],O);F.skip=isNaN($)||isNaN(S)||b,F.stop=O>0&&Math.abs(g[h]-k[h])>y,v&&(F.parsed=g,F.raw=u.data[O]),d&&(F.options=c||this.resolveDataElementOptions(O,N.active?"active":r)),w||this.updateElement(N,O,F,r),k=g}}getMaxOverflow(){const e=this._cachedMeta,a=e.dataset,n=a.options&&a.options.borderWidth||0,r=e.data||[];if(!r.length)return n;const i=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}R(LineController,"id","line"),R(LineController,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),R(LineController,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class PolarAreaController extends DatasetController{constructor(e,a){super(e,a),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const a=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=formatNumber$1(a._parsed[e].r,n.options.locale);return{label:r[e]||"",value:i}}parseObjectData(e,a,n,r){return _parseObjectDataRadialScale.bind(this)(e,a,n,r)}update(e){const a=this._cachedMeta.data;this._updateRadius(),this.updateElements(a,0,a.length,e)}getMinMax(){const e=this._cachedMeta,a={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((n,r)=>{const i=this.getParsed(r).r;!isNaN(i)&&this.chart.getDataVisibility(r)&&(i<a.min&&(a.min=i),i>a.max&&(a.max=i))}),a}_updateRadius(){const e=this.chart,a=e.chartArea,n=e.options,r=Math.min(a.right-a.left,a.bottom-a.top),i=Math.max(r/2,0),o=Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0),s=(i-o)/e.getVisibleDatasetCount();this.outerRadius=i-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(e,a,n,r){const i=r==="reset",o=this.chart,l=o.options.animation,u=this._cachedMeta.rScale,c=u.xCenter,d=u.yCenter,h=u.getIndexAngle(0)-.5*PI;let m=h,p;const v=360/this.countVisibleElements();for(p=0;p<a;++p)m+=this._computeAngle(p,r,v);for(p=a;p<a+n;p++){const y=e[p];let w=m,_=m+this._computeAngle(p,r,v),D=o.getDataVisibility(p)?u.getDistanceFromCenterForValue(this.getParsed(p).r):0;m=_,i&&(l.animateScale&&(D=0),l.animateRotate&&(w=_=h));const k={x:c,y:d,innerRadius:0,outerRadius:D,startAngle:w,endAngle:_,options:this.resolveDataElementOptions(p,y.active?"active":r)};this.updateElement(y,p,k,r)}}countVisibleElements(){const e=this._cachedMeta;let a=0;return e.data.forEach((n,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&a++}),a}_computeAngle(e,a,n){return this.chart.getDataVisibility(e)?toRadians(this.resolveDataElementOptions(e,a).angle||n):0}}R(PolarAreaController,"id","polarArea"),R(PolarAreaController,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),R(PolarAreaController,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const a=e.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return a.labels.map((i,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,a,n){n.chart.toggleDataVisibility(a.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class PieController extends DoughnutController{}R(PieController,"id","pie"),R(PieController,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});function abstract(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class DateAdapterBase{constructor(e){R(this,"options");this.options=e||{}}static override(e){Object.assign(DateAdapterBase.prototype,e)}init(){}formats(){return abstract()}parse(){return abstract()}format(){return abstract()}add(){return abstract()}diff(){return abstract()}startOf(){return abstract()}endOf(){return abstract()}}var adapters={_date:DateAdapterBase};function binarySearch(t,e,a,n){const{controller:r,data:i,_sorted:o}=t,s=r._cachedMeta.iScale;if(s&&e===s.axis&&e!=="r"&&o&&i.length){const l=s._reversePixels?_rlookupByKey:_lookupByKey;if(n){if(r._sharedOptions){const u=i[0],c=typeof u.getRange=="function"&&u.getRange(e);if(c){const d=l(i,e,a-c),h=l(i,e,a+c);return{lo:d.lo,hi:h.hi}}}}else return l(i,e,a)}return{lo:0,hi:i.length-1}}function evaluateInteractionItems(t,e,a,n,r){const i=t.getSortedVisibleDatasetMetas(),o=a[e];for(let s=0,l=i.length;s<l;++s){const{index:u,data:c}=i[s],{lo:d,hi:h}=binarySearch(i[s],e,o,r);for(let m=d;m<=h;++m){const p=c[m];p.skip||n(p,u,m)}}}function getDistanceMetricForAxis(t){const e=t.indexOf("x")!==-1,a=t.indexOf("y")!==-1;return function(n,r){const i=e?Math.abs(n.x-r.x):0,o=a?Math.abs(n.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function getIntersectItems(t,e,a,n,r){const i=[];return!r&&!t.isPointInArea(e)||evaluateInteractionItems(t,a,e,function(s,l,u){!r&&!_isPointInArea(s,t.chartArea,0)||s.inRange(e.x,e.y,n)&&i.push({element:s,datasetIndex:l,index:u})},!0),i}function getNearestRadialItems(t,e,a,n){let r=[];function i(o,s,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],n),{angle:d}=getAngleFromPoint(o,{x:e.x,y:e.y});_angleBetween(d,u,c)&&r.push({element:o,datasetIndex:s,index:l})}return evaluateInteractionItems(t,a,e,i),r}function getNearestCartesianItems(t,e,a,n,r,i){let o=[];const s=getDistanceMetricForAxis(a);let l=Number.POSITIVE_INFINITY;function u(c,d,h){const m=c.inRange(e.x,e.y,r);if(n&&!m)return;const p=c.getCenterPoint(r);if(!(!!i||t.isPointInArea(p))&&!m)return;const y=s(e,p);y<l?(o=[{element:c,datasetIndex:d,index:h}],l=y):y===l&&o.push({element:c,datasetIndex:d,index:h})}return evaluateInteractionItems(t,a,e,u),o}function getNearestItems(t,e,a,n,r,i){return!i&&!t.isPointInArea(e)?[]:a==="r"&&!n?getNearestRadialItems(t,e,a,r):getNearestCartesianItems(t,e,a,n,r,i)}function getAxisItems(t,e,a,n,r){const i=[],o=a==="x"?"inXRange":"inYRange";let s=!1;return evaluateInteractionItems(t,a,e,(l,u,c)=>{l[o](e[a],r)&&(i.push({element:l,datasetIndex:u,index:c}),s=s||l.inRange(e.x,e.y,r))}),n&&!s?[]:i}var Interaction={evaluateInteractionItems,modes:{index(t,e,a,n){const r=getRelativePosition(e,t),i=a.axis||"x",o=a.includeInvisible||!1,s=a.intersect?getIntersectItems(t,r,i,n,o):getNearestItems(t,r,i,!1,n,o),l=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const c=s[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(t,e,a,n){const r=getRelativePosition(e,t),i=a.axis||"xy",o=a.includeInvisible||!1;let s=a.intersect?getIntersectItems(t,r,i,n,o):getNearestItems(t,r,i,!1,n,o);if(s.length>0){const l=s[0].datasetIndex,u=t.getDatasetMeta(l).data;s=[];for(let c=0;c<u.length;++c)s.push({element:u[c],datasetIndex:l,index:c})}return s},point(t,e,a,n){const r=getRelativePosition(e,t),i=a.axis||"xy",o=a.includeInvisible||!1;return getIntersectItems(t,r,i,n,o)},nearest(t,e,a,n){const r=getRelativePosition(e,t),i=a.axis||"xy",o=a.includeInvisible||!1;return getNearestItems(t,r,i,a.intersect,n,o)},x(t,e,a,n){const r=getRelativePosition(e,t);return getAxisItems(t,r,"x",a.intersect,n)},y(t,e,a,n){const r=getRelativePosition(e,t);return getAxisItems(t,r,"y",a.intersect,n)}}};const STATIC_POSITIONS=["left","top","right","bottom"];function filterByPosition(t,e){return t.filter(a=>a.pos===e)}function filterDynamicPositionByAxis(t,e){return t.filter(a=>STATIC_POSITIONS.indexOf(a.pos)===-1&&a.box.axis===e)}function sortByWeight(t,e){return t.sort((a,n)=>{const r=e?n:a,i=e?a:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function wrapBoxes(t){const e=[];let a,n,r,i,o,s;for(a=0,n=(t||[]).length;a<n;++a)r=t[a],{position:i,options:{stack:o,stackWeight:s=1}}=r,e.push({index:a,box:r,pos:i,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&i+o,stackWeight:s});return e}function buildStacks(t){const e={};for(const a of t){const{stack:n,pos:r,stackWeight:i}=a;if(!n||!STATIC_POSITIONS.includes(r))continue;const o=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return e}function setLayoutDims(t,e){const a=buildStacks(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let i,o,s;for(i=0,o=t.length;i<o;++i){s=t[i];const{fullSize:l}=s.box,u=a[s.stack],c=u&&s.stackWeight/u.weight;s.horizontal?(s.width=c?c*n:l&&e.availableWidth,s.height=r):(s.width=n,s.height=c?c*r:l&&e.availableHeight)}return a}function buildLayoutBoxes(t){const e=wrapBoxes(t),a=sortByWeight(e.filter(u=>u.box.fullSize),!0),n=sortByWeight(filterByPosition(e,"left"),!0),r=sortByWeight(filterByPosition(e,"right")),i=sortByWeight(filterByPosition(e,"top"),!0),o=sortByWeight(filterByPosition(e,"bottom")),s=filterDynamicPositionByAxis(e,"x"),l=filterDynamicPositionByAxis(e,"y");return{fullSize:a,leftAndTop:n.concat(i),rightAndBottom:r.concat(l).concat(o).concat(s),chartArea:filterByPosition(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:i.concat(o).concat(s)}}function getCombinedMax(t,e,a,n){return Math.max(t[a],e[a])+Math.max(t[n],e[n])}function updateMaxPadding(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 updateDims(t,e,a,n){const{pos:r,box:i}=a,o=t.maxPadding;if(!isObject$8(r)){a.size&&(t[r]-=a.size);const d=n[a.stack]||{size:0,count:1};d.size=Math.max(d.size,a.horizontal?i.height:i.width),a.size=d.size/d.count,t[r]+=a.size}i.getPadding&&updateMaxPadding(o,i.getPadding());const s=Math.max(0,e.outerWidth-getCombinedMax(o,t,"left","right")),l=Math.max(0,e.outerHeight-getCombinedMax(o,t,"top","bottom")),u=s!==t.w,c=l!==t.h;return t.w=s,t.h=l,a.horizontal?{same:u,other:c}:{same:c,other:u}}function handleMaxPadding(t){const e=t.maxPadding;function a(n){const r=Math.max(e[n]-t[n],0);return t[n]+=r,r}t.y+=a("top"),t.x+=a("left"),a("right"),a("bottom")}function getMargins(t,e){const a=e.maxPadding;function n(r){const i={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{i[o]=Math.max(e[o],a[o])}),i}return n(t?["left","right"]:["top","bottom"])}function fitBoxes(t,e,a,n){const r=[];let i,o,s,l,u,c;for(i=0,o=t.length,u=0;i<o;++i){s=t[i],l=s.box,l.update(s.width||e.w,s.height||e.h,getMargins(s.horizontal,e));const{same:d,other:h}=updateDims(e,a,s,n);u|=d&&r.length,c=c||h,l.fullSize||r.push(s)}return u&&fitBoxes(r,e,a,n)||c}function setBoxDims(t,e,a,n,r){t.top=a,t.left=e,t.right=e+n,t.bottom=a+r,t.width=n,t.height=r}function placeBoxes(t,e,a,n){const r=a.padding;let{x:i,y:o}=e;for(const s of t){const l=s.box,u=n[s.stack]||{count:1,placed:0,weight:1},c=s.stackWeight/u.weight||1;if(s.horizontal){const d=e.w*c,h=u.size||l.height;defined$1(u.start)&&(o=u.start),l.fullSize?setBoxDims(l,r.left,o,a.outerWidth-r.right-r.left,h):setBoxDims(l,e.left+u.placed,o,d,h),u.start=o,u.placed+=d,o=l.bottom}else{const d=e.h*c,h=u.size||l.width;defined$1(u.start)&&(i=u.start),l.fullSize?setBoxDims(l,i,r.top,h,a.outerHeight-r.bottom-r.top):setBoxDims(l,i,e.top+u.placed,h,d),u.start=i,u.placed+=d,i=l.right}}e.x=i,e.y=o}var layouts={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(a){e.draw(a)}}]},t.boxes.push(e)},removeBox(t,e){const a=t.boxes?t.boxes.indexOf(e):-1;a!==-1&&t.boxes.splice(a,1)},configure(t,e,a){e.fullSize=a.fullSize,e.position=a.position,e.weight=a.weight},update(t,e,a,n){if(!t)return;const r=toPadding(t.options.layout.padding),i=Math.max(e-r.width,0),o=Math.max(a-r.height,0),s=buildLayoutBoxes(t.boxes),l=s.vertical,u=s.horizontal;each(t.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const c=l.reduce((v,y)=>y.box.options&&y.box.options.display===!1?v:v+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:a,padding:r,availableWidth:i,availableHeight:o,vBoxMaxWidth:i/2/c,hBoxMaxHeight:o/2}),h=Object.assign({},r);updateMaxPadding(h,toPadding(n));const m=Object.assign({maxPadding:h,w:i,h:o,x:r.left,y:r.top},r),p=setLayoutDims(l.concat(u),d);fitBoxes(s.fullSize,m,d,p),fitBoxes(l,m,d,p),fitBoxes(u,m,d,p)&&fitBoxes(l,m,d,p),handleMaxPadding(m),placeBoxes(s.leftAndTop,m,d,p),m.x+=m.w,m.y+=m.h,placeBoxes(s.rightAndBottom,m,d,p),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},each(s.chartArea,v=>{const y=v.box;Object.assign(y,t.chartArea),y.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class BasePlatform{acquireContext(e,a){}releaseContext(e){return!1}addEventListener(e,a,n){}removeEventListener(e,a,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,a,n,r){return a=Math.max(0,a||e.width),n=n||e.height,{width:a,height:Math.max(0,r?Math.floor(a/r):n)}}isAttached(e){return!0}updateConfig(e){}}class BasicPlatform extends BasePlatform{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const EXPANDO_KEY="$chartjs",EVENT_TYPES={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},isNullOrEmpty=t=>t===null||t==="";function initCanvas(t,e){const a=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t[EXPANDO_KEY]={initial:{height:n,width:r,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",isNullOrEmpty(r)){const i=readUsedSize(t,"width");i!==void 0&&(t.width=i)}if(isNullOrEmpty(n))if(t.style.height==="")t.height=t.width/(e||2);else{const i=readUsedSize(t,"height");i!==void 0&&(t.height=i)}return t}const eventListenerOptions=supportsEventListenerOptions?{passive:!0}:!1;function addListener(t,e,a){t.addEventListener(e,a,eventListenerOptions)}function removeListener(t,e,a){t.canvas.removeEventListener(e,a,eventListenerOptions)}function fromNativeEvent(t,e){const a=EVENT_TYPES[t.type]||t.type,{x:n,y:r}=getRelativePosition(t,e);return{type:a,chart:e,native:t,x:n!==void 0?n:null,y:r!==void 0?r:null}}function nodeListContains(t,e){for(const a of t)if(a===e||a.contains(e))return!0}function createAttachObserver(t,e,a){const n=t.canvas,r=new MutationObserver(i=>{let o=!1;for(const s of i)o=o||nodeListContains(s.addedNodes,n),o=o&&!nodeListContains(s.removedNodes,n);o&&a()});return r.observe(document,{childList:!0,subtree:!0}),r}function createDetachObserver(t,e,a){const n=t.canvas,r=new MutationObserver(i=>{let o=!1;for(const s of i)o=o||nodeListContains(s.removedNodes,n),o=o&&!nodeListContains(s.addedNodes,n);o&&a()});return r.observe(document,{childList:!0,subtree:!0}),r}const drpListeningCharts=new Map;let oldDevicePixelRatio=0;function onWindowResize(){const t=window.devicePixelRatio;t!==oldDevicePixelRatio&&(oldDevicePixelRatio=t,drpListeningCharts.forEach((e,a)=>{a.currentDevicePixelRatio!==t&&e()}))}function listenDevicePixelRatioChanges(t,e){drpListeningCharts.size||window.addEventListener("resize",onWindowResize),drpListeningCharts.set(t,e)}function unlistenDevicePixelRatioChanges(t){drpListeningCharts.delete(t),drpListeningCharts.size||window.removeEventListener("resize",onWindowResize)}function createResizeObserver(t,e,a){const n=t.canvas,r=n&&_getParentNode(n);if(!r)return;const i=throttled((s,l)=>{const u=r.clientWidth;a(s,l),u<r.clientWidth&&a()},window),o=new ResizeObserver(s=>{const l=s[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||i(u,c)});return o.observe(r),listenDevicePixelRatioChanges(t,i),o}function releaseObserver(t,e,a){a&&a.disconnect(),e==="resize"&&unlistenDevicePixelRatioChanges(t)}function createProxyAndListen(t,e,a){const n=t.canvas,r=throttled(i=>{t.ctx!==null&&a(fromNativeEvent(i,t))},t);return addListener(n,e,r),r}class DomPlatform extends BasePlatform{acquireContext(e,a){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(initCanvas(e,a),n):null}releaseContext(e){const a=e.canvas;if(!a[EXPANDO_KEY])return!1;const n=a[EXPANDO_KEY].initial;["height","width"].forEach(i=>{const o=n[i];isNullOrUndef(o)?a.removeAttribute(i):a.setAttribute(i,o)});const r=n.style||{};return Object.keys(r).forEach(i=>{a.style[i]=r[i]}),a.width=a.width,delete a[EXPANDO_KEY],!0}addEventListener(e,a,n){this.removeEventListener(e,a);const r=e.$proxies||(e.$proxies={}),o={attach:createAttachObserver,detach:createDetachObserver,resize:createResizeObserver}[a]||createProxyAndListen;r[a]=o(e,a,n)}removeEventListener(e,a){const n=e.$proxies||(e.$proxies={}),r=n[a];if(!r)return;({attach:releaseObserver,detach:releaseObserver,resize:releaseObserver}[a]||removeListener)(e,a,r),n[a]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,a,n,r){return getMaximumSize(e,a,n,r)}isAttached(e){const a=_getParentNode(e);return!!(a&&a.isConnected)}}function _detectPlatform(t){return!_isDomSupported()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?BasicPlatform:DomPlatform}var ne;let Element$1=(ne=class{constructor(){R(this,"x");R(this,"y");R(this,"active",!1);R(this,"options");R(this,"$animations")}tooltipPosition(e){const{x:a,y:n}=this.getProps(["x","y"],e);return{x:a,y:n}}hasValue(){return isNumber(this.x)&&isNumber(this.y)}getProps(e,a){const n=this.$animations;if(!a||!n)return this;const r={};return e.forEach(i=>{r[i]=n[i]&&n[i].active()?n[i]._to:this[i]}),r}},R(ne,"defaults",{}),R(ne,"defaultRoutes"),ne);function autoSkip(t,e){const a=t.options.ticks,n=determineMaxTicks(t),r=Math.min(a.maxTicksLimit||n,n),i=a.major.enabled?getMajorIndices(e):[],o=i.length,s=i[0],l=i[o-1],u=[];if(o>r)return skipMajors(e,u,i,o/r),u;const c=calculateSpacing(i,e,r);if(o>0){let d,h;const m=o>1?Math.round((l-s)/(o-1)):null;for(skip(e,u,c,isNullOrUndef(m)?0:s-m,s),d=0,h=o-1;d<h;d++)skip(e,u,c,i[d],i[d+1]);return skip(e,u,c,l,isNullOrUndef(m)?e.length:l+m),u}return skip(e,u,c),u}function determineMaxTicks(t){const e=t.options.offset,a=t._tickSize(),n=t._length/a+(e?0:1),r=t._maxLength/a;return Math.floor(Math.min(n,r))}function calculateSpacing(t,e,a){const n=getEvenSpacing(t),r=e.length/a;if(!n)return Math.max(r,1);const i=_factorize(n);for(let o=0,s=i.length-1;o<s;o++){const l=i[o];if(l>r)return l}return Math.max(r,1)}function getMajorIndices(t){const e=[];let a,n;for(a=0,n=t.length;a<n;a++)t[a].major&&e.push(a);return e}function skipMajors(t,e,a,n){let r=0,i=a[0],o;for(n=Math.ceil(n),o=0;o<t.length;o++)o===i&&(e.push(t[o]),r++,i=a[r*n])}function skip(t,e,a,n,r){const i=valueOrDefault(n,0),o=Math.min(valueOrDefault(r,t.length),t.length);let s=0,l,u,c;for(a=Math.ceil(a),r&&(l=r-n,a=l/Math.floor(l/a)),c=i;c<0;)s++,c=Math.round(i+s*a);for(u=Math.max(i,0);u<o;u++)u===c&&(e.push(t[u]),s++,c=Math.round(i+s*a))}function getEvenSpacing(t){const e=t.length;let a,n;if(e<2)return!1;for(n=t[0],a=1;a<e;++a)if(t[a]-t[a-1]!==n)return!1;return n}const reverseAlign=t=>t==="left"?"right":t==="right"?"left":t,offsetFromEdge=(t,e,a)=>e==="top"||e==="left"?t[e]+a:t[e]-a,getTicksLimit=(t,e)=>Math.min(e||t,t);function sample(t,e){const a=[],n=t.length/e,r=t.length;let i=0;for(;i<r;i+=n)a.push(t[Math.floor(i)]);return a}function getPixelForGridLine(t,e,a){const n=t.ticks.length,r=Math.min(e,n-1),i=t._startPixel,o=t._endPixel,s=1e-6;let l=t.getPixelForTick(r),u;if(!(a&&(n===1?u=Math.max(l-i,o-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(r-1))/2,l+=r<e?u:-u,l<i-s||l>o+s)))return l}function garbageCollect(t,e){each(t,a=>{const n=a.gc,r=n.length/2;let i;if(r>e){for(i=0;i<r;++i)delete a.data[n[i]];n.splice(0,r)}})}function getTickMarkLength(t){return t.drawTicks?t.tickLength:0}function getTitleHeight(t,e){if(!t.display)return 0;const a=toFont(t.font,e),n=toPadding(t.padding);return(isArray$b(t.text)?t.text.length:1)*a.lineHeight+n.height}function createScaleContext(t,e){return createContext(t,{scale:e,type:"scale"})}function createTickContext(t,e,a){return createContext(t,{tick:a,index:e,type:"tick"})}function titleAlign(t,e,a){let n=_toLeftRightCenter(t);return(a&&e!=="right"||!a&&e==="right")&&(n=reverseAlign(n)),n}function titleArgs(t,e,a,n){const{top:r,left:i,bottom:o,right:s,chart:l}=t,{chartArea:u,scales:c}=l;let d=0,h,m,p;const v=o-r,y=s-i;if(t.isHorizontal()){if(m=_alignStartEnd(n,i,s),isObject$8(a)){const w=Object.keys(a)[0],_=a[w];p=c[w].getPixelForValue(_)+v-e}else a==="center"?p=(u.bottom+u.top)/2+v-e:p=offsetFromEdge(t,a,e);h=s-i}else{if(isObject$8(a)){const w=Object.keys(a)[0],_=a[w];m=c[w].getPixelForValue(_)-y+e}else a==="center"?m=(u.left+u.right)/2-y+e:m=offsetFromEdge(t,a,e);p=_alignStartEnd(n,o,r),d=a==="left"?-HALF_PI:HALF_PI}return{titleX:m,titleY:p,maxWidth:h,rotation:d}}class Scale extends Element$1{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,a){return e}getUserBounds(){let{_userMin:e,_userMax:a,_suggestedMin:n,_suggestedMax:r}=this;return e=finiteOrDefault(e,Number.POSITIVE_INFINITY),a=finiteOrDefault(a,Number.NEGATIVE_INFINITY),n=finiteOrDefault(n,Number.POSITIVE_INFINITY),r=finiteOrDefault(r,Number.NEGATIVE_INFINITY),{min:finiteOrDefault(e,n),max:finiteOrDefault(a,r),minDefined:isNumberFinite(e),maxDefined:isNumberFinite(a)}}getMinMax(e){let{min:a,max:n,minDefined:r,maxDefined:i}=this.getUserBounds(),o;if(r&&i)return{min:a,max:n};const s=this.getMatchingVisibleMetas();for(let l=0,u=s.length;l<u;++l)o=s[l].controller.getMinMax(this,e),r||(a=Math.min(a,o.min)),i||(n=Math.max(n,o.max));return a=i&&a>n?n:a,n=r&&a>n?a:n,{min:finiteOrDefault(a,finiteOrDefault(n,a)),max:finiteOrDefault(n,finiteOrDefault(a,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){callback(this.options.beforeUpdate,[this])}update(e,a,n){const{beginAtZero:r,grace:i,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=a,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_addGrace(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?sample(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=autoSkip(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,a,n;this.isHorizontal()?(a=this.left,n=this.right):(a=this.top,n=this.bottom,e=!e),this._startPixel=a,this._endPixel=n,this._reversePixels=e,this._length=n-a,this._alignToPixels=this.options.alignToPixels}afterUpdate(){callback(this.options.afterUpdate,[this])}beforeSetDimensions(){callback(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){callback(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),callback(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){callback(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const a=this.options.ticks;let n,r,i;for(n=0,r=e.length;n<r;n++)i=e[n],i.label=callback(a.callback,[i.value,n,e],this)}afterTickToLabelConversion(){callback(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){callback(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,a=e.ticks,n=getTicksLimit(this.ticks.length,e.ticks.maxTicksLimit),r=a.minRotation||0,i=a.maxRotation;let o=r,s,l,u;if(!this._isVisible()||!a.display||r>=i||n<=1||!this.isHorizontal()){this.labelRotation=r;return}const c=this._getLabelSizes(),d=c.widest.width,h=c.highest.height,m=_limitValue(this.chart.width-d,0,this.maxWidth);s=e.offset?this.maxWidth/n:m/(n-1),d+6>s&&(s=m/(n-(e.offset?.5:1)),l=this.maxHeight-getTickMarkLength(e.grid)-a.padding-getTitleHeight(e.title,this.chart.options.font),u=Math.sqrt(d*d+h*h),o=toDegrees(Math.min(Math.asin(_limitValue((c.highest.height+6)/s,-1,1)),Math.asin(_limitValue(l/u,-1,1))-Math.asin(_limitValue(h/u,-1,1)))),o=Math.max(r,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){callback(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:a,options:{ticks:n,title:r,grid:i}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=getTitleHeight(r,a.options.font);if(s?(e.width=this.maxWidth,e.height=getTickMarkLength(i)+l):(e.height=this.maxHeight,e.width=getTickMarkLength(i)+l),n.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:h}=this._getLabelSizes(),m=n.padding*2,p=toRadians(this.labelRotation),v=Math.cos(p),y=Math.sin(p);if(s){const w=n.mirror?0:y*d.width+v*h.height;e.height=Math.min(this.maxHeight,e.height+w+m)}else{const w=n.mirror?0:v*d.width+y*h.height;e.width=Math.min(this.maxWidth,e.width+w+m)}this._calculatePadding(u,c,y,v)}}this._handleMargins(),s?(this.width=this._length=a.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=a.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,a,n,r){const{ticks:{align:i,padding:o},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,m=0;l?u?(h=r*e.width,m=n*a.height):(h=n*e.height,m=r*a.width):i==="start"?m=a.width:i==="end"?h=e.width:i!=="inner"&&(h=e.width/2,m=a.width/2),this.paddingLeft=Math.max((h-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((m-d+o)*this.width/(this.width-d),0)}else{let c=a.height/2,d=e.height/2;i==="start"?(c=0,d=e.height):i==="end"&&(c=a.height,d=0),this.paddingTop=c+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){callback(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:a}=this.options;return a==="top"||a==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let a,n;for(a=0,n=e.length;a<n;a++)isNullOrUndef(e[a].label)&&(e.splice(a,1),n--,a--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const a=this.options.ticks.sampleSize;let n=this.ticks;a<n.length&&(n=sample(n,a)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,a,n){const{ctx:r,_longestTextCache:i}=this,o=[],s=[],l=Math.floor(a/getTicksLimit(a,n));let u=0,c=0,d,h,m,p,v,y,w,_,D,k,O;for(d=0;d<a;d+=l){if(p=e[d].label,v=this._resolveTickFontOptions(d),r.font=y=v.string,w=i[y]=i[y]||{data:{},gc:[]},_=v.lineHeight,D=k=0,!isNullOrUndef(p)&&!isArray$b(p))D=_measureText(r,w.data,w.gc,D,p),k=_;else if(isArray$b(p))for(h=0,m=p.length;h<m;++h)O=p[h],!isNullOrUndef(O)&&!isArray$b(O)&&(D=_measureText(r,w.data,w.gc,D,O),k+=_);o.push(D),s.push(k),u=Math.max(D,u),c=Math.max(k,c)}garbageCollect(i,a);const N=o.indexOf(u),F=s.indexOf(c),g=b=>({width:o[b]||0,height:s[b]||0});return{first:g(0),last:g(a-1),widest:g(N),highest:g(F),widths:o,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,a){return NaN}getValueForPixel(e){}getPixelForTick(e){const a=this.ticks;return e<0||e>a.length-1?null:this.getPixelForValue(a[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const a=this._startPixel+e*this._length;return _int16Range(this._alignToPixels?_alignPixel(this.chart,a,0):a)}getDecimalForPixel(e){const a=(e-this._startPixel)/this._length;return this._reversePixels?1-a:a}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:a}=this;return e<0&&a<0?a:e>0&&a>0?e:0}getContext(e){const a=this.ticks||[];if(e>=0&&e<a.length){const n=a[e];return n.$context||(n.$context=createTickContext(this.getContext(),e,n))}return this.$context||(this.$context=createScaleContext(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,a=toRadians(this.labelRotation),n=Math.abs(Math.cos(a)),r=Math.abs(Math.sin(a)),i=this._getLabelSizes(),o=e.autoSkipPadding||0,s=i?i.widest.width+o:0,l=i?i.highest.height+o:0;return this.isHorizontal()?l*n>s*r?s/n:l/r:l*r<s*n?l/n:s/r}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const a=this.axis,n=this.chart,r=this.options,{grid:i,position:o,border:s}=r,l=i.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=getTickMarkLength(i),m=[],p=s.setContext(this.getContext()),v=p.display?p.width:0,y=v/2,w=function(T){return _alignPixel(n,T,v)};let _,D,k,O,N,F,g,b,$,S,P,M;if(o==="top")_=w(this.bottom),F=this.bottom-h,b=_-y,S=w(e.top)+y,M=e.bottom;else if(o==="bottom")_=w(this.top),S=e.top,M=w(e.bottom)-y,F=_+y,b=this.top+h;else if(o==="left")_=w(this.right),N=this.right-h,g=_-y,$=w(e.left)+y,P=e.right;else if(o==="right")_=w(this.left),$=e.left,P=w(e.right)-y,N=_+y,g=this.left+h;else if(a==="x"){if(o==="center")_=w((e.top+e.bottom)/2+.5);else if(isObject$8(o)){const T=Object.keys(o)[0],x=o[T];_=w(this.chart.scales[T].getPixelForValue(x))}S=e.top,M=e.bottom,F=_+y,b=F+h}else if(a==="y"){if(o==="center")_=w((e.left+e.right)/2);else if(isObject$8(o)){const T=Object.keys(o)[0],x=o[T];_=w(this.chart.scales[T].getPixelForValue(x))}N=_-y,g=N-h,$=e.left,P=e.right}const C=valueOrDefault(r.ticks.maxTicksLimit,d),E=Math.max(1,Math.ceil(d/C));for(D=0;D<d;D+=E){const T=this.getContext(D),x=i.setContext(T),A=s.setContext(T),L=x.lineWidth,I=x.color,W=A.dash||[],z=A.dashOffset,U=x.tickWidth,B=x.tickColor,V=x.tickBorderDash||[],H=x.tickBorderDashOffset;k=getPixelForGridLine(this,D,l),k!==void 0&&(O=_alignPixel(n,k,L),u?N=g=$=P=O:F=b=S=M=O,m.push({tx1:N,ty1:F,tx2:g,ty2:b,x1:$,y1:S,x2:P,y2:M,width:L,color:I,borderDash:W,borderDashOffset:z,tickWidth:U,tickColor:B,tickBorderDash:V,tickBorderDashOffset:H}))}return this._ticksLength=d,this._borderValue=_,m}_computeLabelItems(e){const a=this.axis,n=this.options,{position:r,ticks:i}=n,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:u,padding:c,mirror:d}=i,h=getTickMarkLength(n.grid),m=h+c,p=d?-c:m,v=-toRadians(this.labelRotation),y=[];let w,_,D,k,O,N,F,g,b,$,S,P,M="middle";if(r==="top")N=this.bottom-p,F=this._getXAxisLabelAlignment();else if(r==="bottom")N=this.top+p,F=this._getXAxisLabelAlignment();else if(r==="left"){const E=this._getYAxisLabelAlignment(h);F=E.textAlign,O=E.x}else if(r==="right"){const E=this._getYAxisLabelAlignment(h);F=E.textAlign,O=E.x}else if(a==="x"){if(r==="center")N=(e.top+e.bottom)/2+m;else if(isObject$8(r)){const E=Object.keys(r)[0],T=r[E];N=this.chart.scales[E].getPixelForValue(T)+m}F=this._getXAxisLabelAlignment()}else if(a==="y"){if(r==="center")O=(e.left+e.right)/2-m;else if(isObject$8(r)){const E=Object.keys(r)[0],T=r[E];O=this.chart.scales[E].getPixelForValue(T)}F=this._getYAxisLabelAlignment(h).textAlign}a==="y"&&(l==="start"?M="top":l==="end"&&(M="bottom"));const C=this._getLabelSizes();for(w=0,_=s.length;w<_;++w){D=s[w],k=D.label;const E=i.setContext(this.getContext(w));g=this.getPixelForTick(w)+i.labelOffset,b=this._resolveTickFontOptions(w),$=b.lineHeight,S=isArray$b(k)?k.length:1;const T=S/2,x=E.color,A=E.textStrokeColor,L=E.textStrokeWidth;let I=F;o?(O=g,F==="inner"&&(w===_-1?I=this.options.reverse?"left":"right":w===0?I=this.options.reverse?"right":"left":I="center"),r==="top"?u==="near"||v!==0?P=-S*$+$/2:u==="center"?P=-C.highest.height/2-T*$+$:P=-C.highest.height+$/2:u==="near"||v!==0?P=$/2:u==="center"?P=C.highest.height/2-T*$:P=C.highest.height-S*$,d&&(P*=-1),v!==0&&!E.showLabelBackdrop&&(O+=$/2*Math.sin(v))):(N=g,P=(1-S)*$/2);let W;if(E.showLabelBackdrop){const z=toPadding(E.backdropPadding),U=C.heights[w],B=C.widths[w];let V=P-z.top,H=0-z.left;switch(M){case"middle":V-=U/2;break;case"bottom":V-=U;break}switch(F){case"center":H-=B/2;break;case"right":H-=B;break}W={left:H,top:V,width:B+z.width,height:U+z.height,color:E.backdropColor}}y.push({label:k,font:b,textOffset:P,options:{rotation:v,color:x,strokeColor:A,strokeWidth:L,textAlign:I,textBaseline:M,translation:[O,N],backdrop:W}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:a}=this.options;if(-toRadians(this.labelRotation))return e==="top"?"left":"right";let r="center";return a.align==="start"?r="left":a.align==="end"?r="right":a.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){const{position:a,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,o=this._getLabelSizes(),s=e+i,l=o.widest.width;let u,c;return a==="left"?r?(c=this.right+i,n==="near"?u="left":n==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-s,n==="near"?u="right":n==="center"?(u="center",c-=l/2):(u="left",c=this.left)):a==="right"?r?(c=this.left+i,n==="near"?u="right":n==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+s,n==="near"?u="left":n==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,a=this.options.position;if(a==="left"||a==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(a==="top"||a==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:a},left:n,top:r,width:i,height:o}=this;a&&(e.save(),e.fillStyle=a,e.fillRect(n,r,i,o),e.restore())}getLineWidthForValue(e){const a=this.options.grid;if(!this._isVisible()||!a.display)return 0;const r=this.ticks.findIndex(i=>i.value===e);return r>=0?a.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const a=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,o;const s=(l,u,c)=>{!c.width||!c.color||(n.save(),n.lineWidth=c.width,n.strokeStyle=c.color,n.setLineDash(c.borderDash||[]),n.lineDashOffset=c.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(u.x,u.y),n.stroke(),n.restore())};if(a.display)for(i=0,o=r.length;i<o;++i){const l=r[i];a.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),a.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:a,options:{border:n,grid:r}}=this,i=n.setContext(this.getContext()),o=n.display?i.width:0;if(!o)return;const s=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,d,h;this.isHorizontal()?(u=_alignPixel(e,this.left,o)-o/2,c=_alignPixel(e,this.right,s)+s/2,d=h=l):(d=_alignPixel(e,this.top,o)-o/2,h=_alignPixel(e,this.bottom,s)+s/2,u=c=l),a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.beginPath(),a.moveTo(u,d),a.lineTo(c,h),a.stroke(),a.restore()}drawLabels(e){if(!this.options.ticks.display)return;const n=this.ctx,r=this._computeLabelArea();r&&clipArea(n,r);const i=this.getLabelItems(e);for(const o of i){const s=o.options,l=o.font,u=o.label,c=o.textOffset;renderText(n,u,0,c,l,s)}r&&unclipArea(n)}drawTitle(){const{ctx:e,options:{position:a,title:n,reverse:r}}=this;if(!n.display)return;const i=toFont(n.font),o=toPadding(n.padding),s=n.align;let l=i.lineHeight/2;a==="bottom"||a==="center"||isObject$8(a)?(l+=o.bottom,isArray$b(n.text)&&(l+=i.lineHeight*(n.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:h}=titleArgs(this,l,a,s);renderText(e,n.text,0,0,i,{color:n.color,maxWidth:d,rotation:h,textAlign:titleAlign(s,a,r),textBaseline:"middle",translation:[u,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,a=e.ticks&&e.ticks.z||0,n=valueOrDefault(e.grid&&e.grid.z,-1),r=valueOrDefault(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Scale.prototype.draw?[{z:a,draw:i=>{this.draw(i)}}]:[{z:n,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:a,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const a=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let i,o;for(i=0,o=a.length;i<o;++i){const s=a[i];s[n]===this.id&&(!e||s.type===e)&&r.push(s)}return r}_resolveTickFontOptions(e){const a=this.options.ticks.setContext(this.getContext(e));return toFont(a.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class TypedRegistry{constructor(e,a,n){this.type=e,this.scope=a,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const a=Object.getPrototypeOf(e);let n;isIChartComponent(a)&&(n=this.register(a));const r=this.items,i=e.id,o=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in r||(r[i]=e,registerDefaults(e,o,n),this.override&&defaults.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const a=this.items,n=e.id,r=this.scope;n in a&&delete a[n],r&&n in defaults[r]&&(delete defaults[r][n],this.override&&delete overrides[n])}}function registerDefaults(t,e,a){const n=merge(Object.create(null),[a?defaults.get(a):{},defaults.get(e),t.defaults]);defaults.set(e,n),t.defaultRoutes&&routeDefaults(e,t.defaultRoutes),t.descriptors&&defaults.describe(e,t.descriptors)}function routeDefaults(t,e){Object.keys(e).forEach(a=>{const n=a.split("."),r=n.pop(),i=[t].concat(n).join("."),o=e[a].split("."),s=o.pop(),l=o.join(".");defaults.route(i,r,l,s)})}function isIChartComponent(t){return"id"in t&&"defaults"in t}class Registry{constructor(){this.controllers=new TypedRegistry(DatasetController,"datasets",!0),this.elements=new TypedRegistry(Element$1,"elements"),this.plugins=new TypedRegistry(Object,"plugins"),this.scales=new TypedRegistry(Scale,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,a,n){[...a].forEach(r=>{const i=n||this._getRegistryForType(r);n||i.isForType(r)||i===this.plugins&&r.id?this._exec(e,i,r):each(r,o=>{const s=n||this._getRegistryForType(o);this._exec(e,s,o)})})}_exec(e,a,n){const r=_capitalize(e);callback(n["before"+r],[],n),a[e](n),callback(n["after"+r],[],n)}_getRegistryForType(e){for(let a=0;a<this._typedRegistries.length;a++){const n=this._typedRegistries[a];if(n.isForType(e))return n}return this.plugins}_get(e,a,n){const r=a.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+n+".");return r}}var registry=new Registry;class PluginService{constructor(){this._init=[]}notify(e,a,n,r){a==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const i=r?this._descriptors(e).filter(r):this._descriptors(e),o=this._notify(i,e,a,n);return a==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,a,n,r){r=r||{};for(const i of e){const o=i.plugin,s=o[n],l=[a,r,i.options];if(callback(s,l,o)===!1&&r.cancelable)return!1}return!0}invalidate(){isNullOrUndef(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const a=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),a}_createDescriptors(e,a){const n=e&&e.config,r=valueOrDefault(n.options&&n.options.plugins,{}),i=allPlugins(n);return r===!1&&!a?[]:createDescriptors(e,i,r,a)}_notifyStateChanges(e){const a=this._oldCache||[],n=this._cache,r=(i,o)=>i.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(r(a,n),e,"stop"),this._notify(r(n,a),e,"start")}}function allPlugins(t){const e={},a=[],n=Object.keys(registry.plugins.items);for(let i=0;i<n.length;i++)a.push(registry.getPlugin(n[i]));const r=t.plugins||[];for(let i=0;i<r.length;i++){const o=r[i];a.indexOf(o)===-1&&(a.push(o),e[o.id]=!0)}return{plugins:a,localIds:e}}function getOpts(t,e){return!e&&t===!1?null:t===!0?{}:t}function createDescriptors(t,{plugins:e,localIds:a},n,r){const i=[],o=t.getContext();for(const s of e){const l=s.id,u=getOpts(n[l],r);u!==null&&i.push({plugin:s,options:pluginOpts(t.config,{plugin:s,local:a[l]},u,o)})}return i}function pluginOpts(t,{plugin:e,local:a},n,r){const i=t.pluginScopeKeys(e),o=t.getOptionScopes(n,i);return a&&e.defaults&&o.push(e.defaults),t.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function getIndexAxis(t,e){const a=defaults.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||a.indexAxis||"x"}function getAxisFromDefaultScaleID(t,e){let a=t;return t==="_index_"?a=e:t==="_value_"&&(a=e==="x"?"y":"x"),a}function getDefaultScaleIDFromAxis(t,e){return t===e?"_index_":"_value_"}function idMatchesAxis(t){if(t==="x"||t==="y"||t==="r")return t}function axisFromPosition(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function determineAxis(t,...e){if(idMatchesAxis(t))return t;for(const a of e){const n=a.axis||axisFromPosition(a.position)||t.length>1&&idMatchesAxis(t[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function getAxisFromDataset(t,e,a){if(a[e+"AxisID"]===t)return{axis:e}}function retrieveAxisFromDatasets(t,e){if(e.data&&e.data.datasets){const a=e.data.datasets.filter(n=>n.xAxisID===t||n.yAxisID===t);if(a.length)return getAxisFromDataset(t,"x",a[0])||getAxisFromDataset(t,"y",a[0])}return{}}function mergeScaleConfig(t,e){const a=overrides[t.type]||{scales:{}},n=e.scales||{},r=getIndexAxis(t.type,e),i=Object.create(null);return Object.keys(n).forEach(o=>{const s=n[o];if(!isObject$8(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=determineAxis(o,s,retrieveAxisFromDatasets(o,t),defaults.scales[s.type]),u=getDefaultScaleIDFromAxis(l,r),c=a.scales||{};i[o]=mergeIf(Object.create(null),[{axis:l},s,c[l],c[u]])}),t.data.datasets.forEach(o=>{const s=o.type||t.type,l=o.indexAxis||getIndexAxis(s,e),c=(overrides[s]||{}).scales||{};Object.keys(c).forEach(d=>{const h=getAxisFromDefaultScaleID(d,l),m=o[h+"AxisID"]||h;i[m]=i[m]||Object.create(null),mergeIf(i[m],[{axis:h},n[m],c[d]])})}),Object.keys(i).forEach(o=>{const s=i[o];mergeIf(s,[defaults.scales[s.type],defaults.scale])}),i}function initOptions(t){const e=t.options||(t.options={});e.plugins=valueOrDefault(e.plugins,{}),e.scales=mergeScaleConfig(t,e)}function initData(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function initConfig(t){return t=t||{},t.data=initData(t.data),initOptions(t),t}const keyCache=new Map,keysCached=new Set;function cachedKeys(t,e){let a=keyCache.get(t);return a||(a=e(),keyCache.set(t,a),keysCached.add(a)),a}const addIfFound=(t,e,a)=>{const n=resolveObjectKey(e,a);n!==void 0&&t.add(n)};class Config{constructor(e){this._config=initConfig(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=initData(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),initOptions(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return cachedKeys(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,a){return cachedKeys(`${e}.transition.${a}`,()=>[[`datasets.${e}.transitions.${a}`,`transitions.${a}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,a){return cachedKeys(`${e}-${a}`,()=>[[`datasets.${e}.elements.${a}`,`datasets.${e}`,`elements.${a}`,""]])}pluginScopeKeys(e){const a=e.id,n=this.type;return cachedKeys(`${n}-plugin-${a}`,()=>[[`plugins.${a}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,a){const n=this._scopeCache;let r=n.get(e);return(!r||a)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,a,n){const{options:r,type:i}=this,o=this._cachedScopes(e,n),s=o.get(a);if(s)return s;const l=new Set;a.forEach(c=>{e&&(l.add(e),c.forEach(d=>addIfFound(l,e,d))),c.forEach(d=>addIfFound(l,r,d)),c.forEach(d=>addIfFound(l,overrides[i]||{},d)),c.forEach(d=>addIfFound(l,defaults,d)),c.forEach(d=>addIfFound(l,descriptors,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),keysCached.has(a)&&o.set(a,u),u}chartOptionScopes(){const{options:e,type:a}=this;return[e,overrides[a]||{},defaults.datasets[a]||{},{type:a},defaults,descriptors]}resolveNamedOptions(e,a,n,r=[""]){const i={$shared:!0},{resolver:o,subPrefixes:s}=getResolver(this._resolverCache,e,r);let l=o;if(needContext(o,a)){i.$shared=!1,n=isFunction$3(n)?n():n;const u=this.createResolver(e,n,s);l=_attachContext(o,n,u)}for(const u of a)i[u]=l[u];return i}createResolver(e,a,n=[""],r){const{resolver:i}=getResolver(this._resolverCache,e,n);return isObject$8(a)?_attachContext(i,a,void 0,r):i}}function getResolver(t,e,a){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=a.join();let i=n.get(r);return i||(i={resolver:_createResolver(e,a),subPrefixes:a.filter(s=>!s.toLowerCase().includes("hover"))},n.set(r,i)),i}const hasFunction=t=>isObject$8(t)&&Object.getOwnPropertyNames(t).reduce((e,a)=>e||isFunction$3(t[a]),!1);function needContext(t,e){const{isScriptable:a,isIndexable:n}=_descriptors(t);for(const r of e){const i=a(r),o=n(r),s=(o||i)&&t[r];if(i&&(isFunction$3(s)||hasFunction(s))||o&&isArray$b(s))return!0}return!1}var version="4.4.0";const KNOWN_POSITIONS=["top","bottom","left","right","chartArea"];function positionIsHorizontal(t,e){return t==="top"||t==="bottom"||KNOWN_POSITIONS.indexOf(t)===-1&&e==="x"}function compare2Level(t,e){return function(a,n){return a[t]===n[t]?a[e]-n[e]:a[t]-n[t]}}function onAnimationsComplete(t){const e=t.chart,a=e.options.animation;e.notifyPlugins("afterRender"),callback(a&&a.onComplete,[t],e)}function onAnimationProgress(t){const e=t.chart,a=e.options.animation;callback(a&&a.onProgress,[t],e)}function getCanvas(t){return _isDomSupported()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const instances={},getChart=t=>{const e=getCanvas(t);return Object.values(instances).filter(a=>a.canvas===e).pop()};function moveNumericKeys(t,e,a){const n=Object.keys(t);for(const r of n){const i=+r;if(i>=e){const o=t[r];delete t[r],(a>0||i>e)&&(t[i+a]=o)}}}function determineLastEvent(t,e,a,n){return!a||t.type==="mouseout"?null:n?e:t}function getSizeForArea(t,e,a){return t.options.clip?t[a]:e[a]}function getDatasetArea(t,e){const{xScale:a,yScale:n}=t;return a&&n?{left:getSizeForArea(a,e,"left"),right:getSizeForArea(a,e,"right"),top:getSizeForArea(n,e,"top"),bottom:getSizeForArea(n,e,"bottom")}:e}class Chart{static register(...e){registry.add(...e),invalidatePlugins()}static unregister(...e){registry.remove(...e),invalidatePlugins()}constructor(e,a){const n=this.config=new Config(a),r=getCanvas(e),i=getChart(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||_detectPlatform(r)),this.platform.updateConfig(n);const s=this.platform.acquireContext(r,o.aspectRatio),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;if(this.id=uid(),this.ctx=s,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new PluginService,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=debounce(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],instances[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}animator.listen(this,"complete",onAnimationsComplete),animator.listen(this,"progress",onAnimationProgress),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:a},width:n,height:r,_aspectRatio:i}=this;return isNullOrUndef(e)?a&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return registry}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return clearCanvas(this.canvas,this.ctx),this}stop(){return animator.stop(this),this}resize(e,a){animator.running(this)?this._resizeBeforeDraw={width:e,height:a}:this._resize(e,a)}_resize(e,a){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,e,a,i),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,retinaScale(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),callback(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const a=this.options.scales||{};each(a,(n,r)=>{n.id=r})}buildOrUpdateScales(){const e=this.options,a=e.scales,n=this.scales,r=Object.keys(n).reduce((o,s)=>(o[s]=!1,o),{});let i=[];a&&(i=i.concat(Object.keys(a).map(o=>{const s=a[o],l=determineAxis(o,s),u=l==="r",c=l==="x";return{options:s,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),each(i,o=>{const s=o.options,l=s.id,u=determineAxis(l,s),c=valueOrDefault(s.type,o.dtype);(s.position===void 0||positionIsHorizontal(s.position,u)!==positionIsHorizontal(o.dposition))&&(s.position=o.dposition),r[l]=!0;let d=null;if(l in n&&n[l].type===c)d=n[l];else{const h=registry.getScale(c);d=new h({id:l,type:c,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(s,e)}),each(r,(o,s)=>{o||delete n[s]}),each(n,o=>{layouts.configure(this,o,o.options),layouts.addBox(this,o)})}_updateMetasets(){const e=this._metasets,a=this.data.datasets.length,n=e.length;if(e.sort((r,i)=>r.index-i.index),n>a){for(let r=a;r<n;++r)this._destroyDatasetMeta(r);e.splice(a,n-a)}this._sortedMetasets=e.slice(0).sort(compare2Level("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:a}}=this;e.length>a.length&&delete this._stacks,e.forEach((n,r)=>{a.filter(i=>i===n._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],a=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=a.length;n<r;n++){const i=a[n];let o=this.getDatasetMeta(n);const s=i.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=s,o.indexAxis=i.indexAxis||getIndexAxis(s,this.options),o.order=i.order||0,o.index=n,o.label=""+i.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const l=registry.getController(s),{datasetElementType:u,dataElementType:c}=defaults.datasets[s];Object.assign(l,{dataElementType:registry.getElement(c),datasetElementType:u&®istry.getElement(u)}),o.controller=new l(this,n),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){each(this.data.datasets,(e,a)=>{this.getDatasetMeta(a).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const a=this.config;a.update();const n=this._options=a.createResolver(a.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),h=!r&&i.indexOf(d)===-1;d.buildOrUpdateElements(h),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),r||each(i,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(compare2Level("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){each(this.scales,e=>{layouts.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,a=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!setsEqual(a,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,a=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of a){const o=n==="_removeElements"?-i:i;moveNumericKeys(e,r,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const a=this.data.datasets.length,n=i=>new Set(e.filter(o=>o[0]===i).map((o,s)=>s+","+o.splice(1).join(","))),r=n(0);for(let i=1;i<a;i++)if(!setsEqual(r,n(i)))return;return Array.from(r).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;layouts.update(this,this.width,this.height,e);const a=this.chartArea,n=a.width<=0||a.height<=0;this._layers=[],each(this.boxes,r=>{n&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let a=0,n=this.data.datasets.length;a<n;++a)this.getDatasetMeta(a).controller.configure();for(let a=0,n=this.data.datasets.length;a<n;++a)this._updateDataset(a,isFunction$3(e)?e({datasetIndex:a}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,a){const n=this.getDatasetMeta(e),r={meta:n,index:e,mode:a,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(n.controller._update(a),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(animator.has(this)?this.attached&&!animator.running(this)&&animator.start(this):(this.draw(),onAnimationsComplete({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:n,height:r}=this._resizeBeforeDraw;this._resize(n,r),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const a=this._layers;for(e=0;e<a.length&&a[e].z<=0;++e)a[e].draw(this.chartArea);for(this._drawDatasets();e<a.length;++e)a[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const a=this._sortedMetasets,n=[];let r,i;for(r=0,i=a.length;r<i;++r){const o=a[r];(!e||o.visible)&&n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let a=e.length-1;a>=0;--a)this._drawDataset(e[a]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const a=this.ctx,n=e._clip,r=!n.disabled,i=getDatasetArea(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&clipArea(a,{left:n.left===!1?0:i.left-n.left,right:n.right===!1?this.width:i.right+n.right,top:n.top===!1?0:i.top-n.top,bottom:n.bottom===!1?this.height:i.bottom+n.bottom}),e.controller.draw(),r&&unclipArea(a),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return _isPointInArea(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,a,n,r){const i=Interaction.modes[a];return typeof i=="function"?i(this,e,n,r):[]}getDatasetMeta(e){const a=this.data.datasets[e],n=this._metasets;let r=n.filter(i=>i&&i._dataset===a).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a&&a.order||0,index:e,_dataset:a,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=createContext(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const a=this.data.datasets[e];if(!a)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!a.hidden}setDatasetVisibility(e,a){const n=this.getDatasetMeta(e);n.hidden=!a}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,a,n){const r=n?"show":"hide",i=this.getDatasetMeta(e),o=i.controller._resolveAnimations(void 0,r);defined$1(a)?(i.data[a].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(i,{visible:n}),this.update(s=>s.datasetIndex===e?r:void 0))}hide(e,a){this._updateVisibility(e,a,!1)}show(e,a){this._updateVisibility(e,a,!0)}_destroyDatasetMeta(e){const a=this._metasets[e];a&&a.controller&&a.controller._destroy(),delete this._metasets[e]}_stop(){let e,a;for(this.stop(),animator.remove(this),e=0,a=this.data.datasets.length;e<a;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:a}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),clearCanvas(e,a),this.platform.releaseContext(a),this.canvas=null,this.ctx=null),delete instances[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,a=this.platform,n=(i,o)=>{a.addEventListener(this,i,o),e[i]=o},r=(i,o,s)=>{i.offsetX=o,i.offsetY=s,this._eventHandler(i)};each(this.options.events,i=>n(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,a=this.platform,n=(l,u)=>{a.addEventListener(this,l,u),e[l]=u},r=(l,u)=>{e[l]&&(a.removeEventListener(this,l,u),delete e[l])},i=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const s=()=>{r("attach",s),this.attached=!0,this.resize(),n("resize",i),n("detach",o)};o=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",s)},a.isAttached(this.canvas)?s():o()}unbindEvents(){each(this._listeners,(e,a)=>{this.platform.removeEventListener(this,a,e)}),this._listeners={},each(this._responsiveListeners,(e,a)=>{this.platform.removeEventListener(this,a,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,a,n){const r=n?"set":"remove";let i,o,s,l;for(a==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),s=0,l=e.length;s<l;++s){o=e[s];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const a=this._active||[],n=e.map(({datasetIndex:i,index:o})=>{const s=this.getDatasetMeta(i);if(!s)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:s.data[o],index:o}});!_elementsEqual(n,a)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,a))}notifyPlugins(e,a,n){return this._plugins.notify(this,e,a,n)}isPluginEnabled(e){return this._plugins._cache.filter(a=>a.plugin.id===e).length===1}_updateHoverStyles(e,a,n){const r=this.options.hover,i=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=i(a,e),s=n?e:i(e,a);o.length&&this.updateHoverStyle(o,r.mode,!1),s.length&&r.mode&&this.updateHoverStyle(s,r.mode,!0)}_eventHandler(e,a){const n={event:e,replay:a,cancelable:!0,inChartArea:this.isPointInArea(e)},r=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,r)===!1)return;const i=this._handleEvent(e,a,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,a,n){const{_active:r=[],options:i}=this,o=a,s=this._getActiveElements(e,r,n,o),l=_isClickEvent(e),u=determineLastEvent(e,this._lastEvent,n,l);n&&(this._lastEvent=null,callback(i.onHover,[e,s,this],this),l&&callback(i.onClick,[e,s,this],this));const c=!_elementsEqual(s,r);return(c||a)&&(this._active=s,this._updateHoverStyles(s,r,a)),this._lastEvent=u,c}_getActiveElements(e,a,n,r){if(e.type==="mouseout")return[];if(!n)return a;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}}R(Chart,"defaults",defaults),R(Chart,"instances",instances),R(Chart,"overrides",overrides),R(Chart,"registry",registry),R(Chart,"version",version),R(Chart,"getChart",getChart);function invalidatePlugins(){return each(Chart.instances,t=>t._plugins.invalidate())}function clipArc(t,e,a){const{startAngle:n,pixelMargin:r,x:i,y:o,outerRadius:s,innerRadius:l}=e;let u=r/s;t.beginPath(),t.arc(i,o,s,n-u,a+u),l>r?(u=r/l,t.arc(i,o,l,a+u,n-u,!0)):t.arc(i,o,r,a+HALF_PI,n-HALF_PI),t.closePath(),t.clip()}function toRadiusCorners(t){return _readValueToProps(t,["outerStart","outerEnd","innerStart","innerEnd"])}function parseBorderRadius$1(t,e,a,n){const r=toRadiusCorners(t.options.borderRadius),i=(a-e)/2,o=Math.min(i,n*e/2),s=l=>{const u=(a-Math.min(i,l))*n/2;return _limitValue(l,0,Math.min(i,u))};return{outerStart:s(r.outerStart),outerEnd:s(r.outerEnd),innerStart:_limitValue(r.innerStart,0,o),innerEnd:_limitValue(r.innerEnd,0,o)}}function rThetaToXY(t,e,a,n){return{x:a+t*Math.cos(e),y:n+t*Math.sin(e)}}function pathArc(t,e,a,n,r,i){const{x:o,y:s,startAngle:l,pixelMargin:u,innerRadius:c}=e,d=Math.max(e.outerRadius+n+a-u,0),h=c>0?c+n+a+u:0;let m=0;const p=r-l;if(n){const E=c>0?c-n:0,T=d>0?d-n:0,x=(E+T)/2,A=x!==0?p*x/(x+n):p;m=(p-A)/2}const v=Math.max(.001,p*d-a/PI)/d,y=(p-v)/2,w=l+y+m,_=r-y-m,{outerStart:D,outerEnd:k,innerStart:O,innerEnd:N}=parseBorderRadius$1(e,h,d,_-w),F=d-D,g=d-k,b=w+D/F,$=_-k/g,S=h+O,P=h+N,M=w+O/S,C=_-N/P;if(t.beginPath(),i){const E=(b+$)/2;if(t.arc(o,s,d,b,E),t.arc(o,s,d,E,$),k>0){const L=rThetaToXY(g,$,o,s);t.arc(L.x,L.y,k,$,_+HALF_PI)}const T=rThetaToXY(P,_,o,s);if(t.lineTo(T.x,T.y),N>0){const L=rThetaToXY(P,C,o,s);t.arc(L.x,L.y,N,_+HALF_PI,C+Math.PI)}const x=(_-N/h+(w+O/h))/2;if(t.arc(o,s,h,_-N/h,x,!0),t.arc(o,s,h,x,w+O/h,!0),O>0){const L=rThetaToXY(S,M,o,s);t.arc(L.x,L.y,O,M+Math.PI,w-HALF_PI)}const A=rThetaToXY(F,w,o,s);if(t.lineTo(A.x,A.y),D>0){const L=rThetaToXY(F,b,o,s);t.arc(L.x,L.y,D,w-HALF_PI,b)}}else{t.moveTo(o,s);const E=Math.cos(b)*d+o,T=Math.sin(b)*d+s;t.lineTo(E,T);const x=Math.cos($)*d+o,A=Math.sin($)*d+s;t.lineTo(x,A)}t.closePath()}function drawArc(t,e,a,n,r){const{fullCircles:i,startAngle:o,circumference:s}=e;let l=e.endAngle;if(i){pathArc(t,e,a,n,l,r);for(let u=0;u<i;++u)t.fill();isNaN(s)||(l=o+(s%TAU||TAU))}return pathArc(t,e,a,n,l,r),t.fill(),l}function drawBorder(t,e,a,n,r){const{fullCircles:i,startAngle:o,circumference:s,options:l}=e,{borderWidth:u,borderJoinStyle:c,borderDash:d,borderDashOffset:h}=l,m=l.borderAlign==="inner";if(!u)return;t.setLineDash(d||[]),t.lineDashOffset=h,m?(t.lineWidth=u*2,t.lineJoin=c||"round"):(t.lineWidth=u,t.lineJoin=c||"bevel");let p=e.endAngle;if(i){pathArc(t,e,a,n,p,r);for(let v=0;v<i;++v)t.stroke();isNaN(s)||(p=o+(s%TAU||TAU))}m&&clipArc(t,e,p),i||(pathArc(t,e,a,n,p,r),t.stroke())}class ArcElement extends Element$1{constructor(a){super();R(this,"circumference");R(this,"endAngle");R(this,"fullCircles");R(this,"innerRadius");R(this,"outerRadius");R(this,"pixelMargin");R(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,a&&Object.assign(this,a)}inRange(a,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:s}=getAngleFromPoint(i,{x:a,y:n}),{startAngle:l,endAngle:u,innerRadius:c,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),m=(this.options.spacing+this.options.borderWidth)/2,v=valueOrDefault(h,u-l)>=TAU||_angleBetween(o,l,u),y=_isBetween(s,c+m,d+m);return v&&y}getCenterPoint(a){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],a),{offset:u,spacing:c}=this.options,d=(i+o)/2,h=(s+l+c+u)/2;return{x:n+Math.cos(d)*h,y:r+Math.sin(d)*h}}tooltipPosition(a){return this.getCenterPoint(a)}draw(a){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,s=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>TAU?Math.floor(r/TAU):0,r===0||this.innerRadius<0||this.outerRadius<0)return;a.save();const l=(this.startAngle+this.endAngle)/2;a.translate(Math.cos(l)*i,Math.sin(l)*i);const u=1-Math.sin(Math.min(PI,r||0)),c=i*u;a.fillStyle=n.backgroundColor,a.strokeStyle=n.borderColor,drawArc(a,this,c,o,s),drawBorder(a,this,c,o,s),a.restore()}}R(ArcElement,"id","arc"),R(ArcElement,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),R(ArcElement,"defaultRoutes",{backgroundColor:"backgroundColor"}),R(ArcElement,"descriptors",{_scriptable:!0,_indexable:a=>a!=="borderDash"});function setStyle$1(t,e,a=e){t.lineCap=valueOrDefault(a.borderCapStyle,e.borderCapStyle),t.setLineDash(valueOrDefault(a.borderDash,e.borderDash)),t.lineDashOffset=valueOrDefault(a.borderDashOffset,e.borderDashOffset),t.lineJoin=valueOrDefault(a.borderJoinStyle,e.borderJoinStyle),t.lineWidth=valueOrDefault(a.borderWidth,e.borderWidth),t.strokeStyle=valueOrDefault(a.borderColor,e.borderColor)}function lineTo(t,e,a){t.lineTo(a.x,a.y)}function getLineMethod(t){return t.stepped?_steppedLineTo:t.tension||t.cubicInterpolationMode==="monotone"?_bezierCurveTo:lineTo}function pathVars(t,e,a={}){const n=t.length,{start:r=0,end:i=n-1}=a,{start:o,end:s}=e,l=Math.max(r,o),u=Math.min(i,s),c=r<o&&i<o||r>s&&i>s;return{count:n,start:l,loop:e.loop,ilen:u<l&&!c?n+u-l:u-l}}function pathSegment(t,e,a,n){const{points:r,options:i}=e,{count:o,start:s,loop:l,ilen:u}=pathVars(r,a,n),c=getLineMethod(i);let{move:d=!0,reverse:h}=n||{},m,p,v;for(m=0;m<=u;++m)p=r[(s+(h?u-m:m))%o],!p.skip&&(d?(t.moveTo(p.x,p.y),d=!1):c(t,v,p,h,i.stepped),v=p);return l&&(p=r[(s+(h?u:0))%o],c(t,v,p,h,i.stepped)),!!l}function fastPathSegment(t,e,a,n){const r=e.points,{count:i,start:o,ilen:s}=pathVars(r,a,n),{move:l=!0,reverse:u}=n||{};let c=0,d=0,h,m,p,v,y,w;const _=k=>(o+(u?s-k:k))%i,D=()=>{v!==y&&(t.lineTo(c,y),t.lineTo(c,v),t.lineTo(c,w))};for(l&&(m=r[_(0)],t.moveTo(m.x,m.y)),h=0;h<=s;++h){if(m=r[_(h)],m.skip)continue;const k=m.x,O=m.y,N=k|0;N===p?(O<v?v=O:O>y&&(y=O),c=(d*c+k)/++d):(D(),t.lineTo(k,O),p=N,d=0,v=y=O),w=O}D()}function _getSegmentMethod(t){const e=t.options,a=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!a?fastPathSegment:pathSegment}function _getInterpolationMethod(t){return t.stepped?_steppedInterpolation:t.tension||t.cubicInterpolationMode==="monotone"?_bezierInterpolation:_pointInLine}function strokePathWithCache(t,e,a,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,a,n)&&r.closePath()),setStyle$1(t,e.options),t.stroke(r)}function strokePathDirect(t,e,a,n){const{segments:r,options:i}=e,o=_getSegmentMethod(e);for(const s of r)setStyle$1(t,i,s.style),t.beginPath(),o(t,e,s,{start:a,end:a+n-1})&&t.closePath(),t.stroke()}const usePath2D=typeof Path2D=="function";function draw(t,e,a,n){usePath2D&&!e.options.segment?strokePathWithCache(t,e,a,n):strokePathDirect(t,e,a,n)}class LineElement extends Element$1{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,a){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;_updateBezierControlPoints(this._points,n,e,r,a),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=_computeSegments(this,this.options.segment))}first(){const e=this.segments,a=this.points;return e.length&&a[e[0].start]}last(){const e=this.segments,a=this.points,n=e.length;return n&&a[e[n-1].end]}interpolate(e,a){const n=this.options,r=e[a],i=this.points,o=_boundSegments(this,{property:a,start:r,end:r});if(!o.length)return;const s=[],l=_getInterpolationMethod(n);let u,c;for(u=0,c=o.length;u<c;++u){const{start:d,end:h}=o[u],m=i[d],p=i[h];if(m===p){s.push(m);continue}const v=Math.abs((r-m[a])/(p[a]-m[a])),y=l(m,p,v,n.stepped);y[a]=e[a],s.push(y)}return s.length===1?s[0]:s}pathSegment(e,a,n){return _getSegmentMethod(this)(e,this,a,n)}path(e,a,n){const r=this.segments,i=_getSegmentMethod(this);let o=this._loop;a=a||0,n=n||this.points.length-a;for(const s of r)o&=i(e,this,s,{start:a,end:a+n-1});return!!o}draw(e,a,n,r){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),draw(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}R(LineElement,"id","line"),R(LineElement,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),R(LineElement,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),R(LineElement,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function inRange$1(t,e,a,n){const r=t.options,{[a]:i}=t.getProps([a],n);return Math.abs(e-i)<r.radius+r.hitRadius}class PointElement extends Element$1{constructor(a){super();R(this,"parsed");R(this,"skip");R(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,a&&Object.assign(this,a)}inRange(a,n,r){const i=this.options,{x:o,y:s}=this.getProps(["x","y"],r);return Math.pow(a-o,2)+Math.pow(n-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(a,n){return inRange$1(this,a,"x",n)}inYRange(a,n){return inRange$1(this,a,"y",n)}getCenterPoint(a){const{x:n,y:r}=this.getProps(["x","y"],a);return{x:n,y:r}}size(a){a=a||this.options||{};let n=a.radius||0;n=Math.max(n,n&&a.hoverRadius||0);const r=n&&a.borderWidth||0;return(n+r)*2}draw(a,n){const r=this.options;this.skip||r.radius<.1||!_isPointInArea(this,n,this.size(r)/2)||(a.strokeStyle=r.borderColor,a.lineWidth=r.borderWidth,a.fillStyle=r.backgroundColor,drawPoint(a,r,this.x,this.y))}getRange(){const a=this.options||{};return a.radius+a.hitRadius}}R(PointElement,"id","point"),R(PointElement,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),R(PointElement,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function getBarBounds(t,e){const{x:a,y:n,base:r,width:i,height:o}=t.getProps(["x","y","base","width","height"],e);let s,l,u,c,d;return t.horizontal?(d=o/2,s=Math.min(a,r),l=Math.max(a,r),u=n-d,c=n+d):(d=i/2,s=a-d,l=a+d,u=Math.min(n,r),c=Math.max(n,r)),{left:s,top:u,right:l,bottom:c}}function skipOrLimit(t,e,a,n){return t?0:_limitValue(e,a,n)}function parseBorderWidth(t,e,a){const n=t.options.borderWidth,r=t.borderSkipped,i=toTRBL(n);return{t:skipOrLimit(r.top,i.top,0,a),r:skipOrLimit(r.right,i.right,0,e),b:skipOrLimit(r.bottom,i.bottom,0,a),l:skipOrLimit(r.left,i.left,0,e)}}function parseBorderRadius(t,e,a){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,i=toTRBLCorners(r),o=Math.min(e,a),s=t.borderSkipped,l=n||isObject$8(r);return{topLeft:skipOrLimit(!l||s.top||s.left,i.topLeft,0,o),topRight:skipOrLimit(!l||s.top||s.right,i.topRight,0,o),bottomLeft:skipOrLimit(!l||s.bottom||s.left,i.bottomLeft,0,o),bottomRight:skipOrLimit(!l||s.bottom||s.right,i.bottomRight,0,o)}}function boundingRects(t){const e=getBarBounds(t),a=e.right-e.left,n=e.bottom-e.top,r=parseBorderWidth(t,a/2,n/2),i=parseBorderRadius(t,a/2,n/2);return{outer:{x:e.left,y:e.top,w:a,h:n,radius:i},inner:{x:e.left+r.l,y:e.top+r.t,w:a-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,i.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(r.b,r.r))}}}}function inRange(t,e,a,n){const r=e===null,i=a===null,s=t&&!(r&&i)&&getBarBounds(t,n);return s&&(r||_isBetween(e,s.left,s.right))&&(i||_isBetween(a,s.top,s.bottom))}function hasRadius(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function addNormalRectPath(t,e){t.rect(e.x,e.y,e.w,e.h)}function inflateRect(t,e,a={}){const n=t.x!==a.x?-e:0,r=t.y!==a.y?-e:0,i=(t.x+t.w!==a.x+a.w?e:0)-n,o=(t.y+t.h!==a.y+a.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+i,h:t.h+o,radius:t.radius}}class BarElement extends Element$1{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:a,options:{borderColor:n,backgroundColor:r}}=this,{inner:i,outer:o}=boundingRects(this),s=hasRadius(o.radius)?addRoundedRectPath:addNormalRectPath;e.save(),(o.w!==i.w||o.h!==i.h)&&(e.beginPath(),s(e,inflateRect(o,a,i)),e.clip(),s(e,inflateRect(i,-a,o)),e.fillStyle=n,e.fill("evenodd")),e.beginPath(),s(e,inflateRect(i,a)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,a,n){return inRange(this,e,a,n)}inXRange(e,a){return inRange(this,e,null,a)}inYRange(e,a){return inRange(this,null,e,a)}getCenterPoint(e){const{x:a,y:n,base:r,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{x:i?(a+r)/2:a,y:i?n:(n+r)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}R(BarElement,"id","bar"),R(BarElement,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),R(BarElement,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const BORDER_COLORS=["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)"],BACKGROUND_COLORS=BORDER_COLORS.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function getBorderColor(t){return BORDER_COLORS[t%BORDER_COLORS.length]}function getBackgroundColor(t){return BACKGROUND_COLORS[t%BACKGROUND_COLORS.length]}function colorizeDefaultDataset(t,e){return t.borderColor=getBorderColor(e),t.backgroundColor=getBackgroundColor(e),++e}function colorizeDoughnutDataset(t,e){return t.backgroundColor=t.data.map(()=>getBorderColor(e++)),e}function colorizePolarAreaDataset(t,e){return t.backgroundColor=t.data.map(()=>getBackgroundColor(e++)),e}function getColorizer(t){let e=0;return(a,n)=>{const r=t.getDatasetMeta(n).controller;r instanceof DoughnutController?e=colorizeDoughnutDataset(a,e):r instanceof PolarAreaController?e=colorizePolarAreaDataset(a,e):r&&(e=colorizeDefaultDataset(a,e))}}function containsColorsDefinitions(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function containsColorsDefinition(t){return t&&(t.borderColor||t.backgroundColor)}var plugin_colors={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,a){if(!a.enabled)return;const{data:{datasets:n},options:r}=t.config,{elements:i}=r;if(!a.forceOverride&&(containsColorsDefinitions(n)||containsColorsDefinition(r)||i&&containsColorsDefinitions(i)))return;const o=getColorizer(t);n.forEach(o)}};function _segments(t,e,a){const n=t.segments,r=t.points,i=e.points,o=[];for(const s of n){let{start:l,end:u}=s;u=_findSegmentEnd(l,u,r);const c=_getBounds(a,r[l],r[u],s.loop);if(!e.segments){o.push({source:s,target:c,start:r[l],end:r[u]});continue}const d=_boundSegments(e,c);for(const h of d){const m=_getBounds(a,i[h.start],i[h.end],h.loop),p=_boundSegment(s,r,m);for(const v of p)o.push({source:v,target:h,start:{[a]:_getEdge(c,m,"start",Math.max)},end:{[a]:_getEdge(c,m,"end",Math.min)}})}}return o}function _getBounds(t,e,a,n){if(n)return;let r=e[t],i=a[t];return t==="angle"&&(r=_normalizeAngle(r),i=_normalizeAngle(i)),{property:t,start:r,end:i}}function _pointsFromSegments(t,e){const{x:a=null,y:n=null}=t||{},r=e.points,i=[];return e.segments.forEach(({start:o,end:s})=>{s=_findSegmentEnd(o,s,r);const l=r[o],u=r[s];n!==null?(i.push({x:l.x,y:n}),i.push({x:u.x,y:n})):a!==null&&(i.push({x:a,y:l.y}),i.push({x:a,y:u.y}))}),i}function _findSegmentEnd(t,e,a){for(;e>t;e--){const n=a[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function _getEdge(t,e,a,n){return t&&e?n(t[a],e[a]):t?t[a]:e?e[a]:0}function _createBoundaryLine(t,e){let a=[],n=!1;return isArray$b(t)?(n=!0,a=t):a=_pointsFromSegments(t,e),a.length?new LineElement({points:a,options:{tension:0},_loop:n,_fullLoop:n}):null}function _shouldApplyFill(t){return t&&t.fill!==!1}function _resolveTarget(t,e,a){let r=t[e].fill;const i=[e];let o;if(!a)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!isNumberFinite(r))return r;if(o=t[r],!o)return!1;if(o.visible)return r;i.push(r),r=o.fill}return!1}function _decodeFill(t,e,a){const n=parseFillOption(t);if(isObject$8(n))return isNaN(n.value)?!1:n;let r=parseFloat(n);return isNumberFinite(r)&&Math.floor(r)===r?decodeTargetIndex(n[0],e,r,a):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function decodeTargetIndex(t,e,a,n){return(t==="-"||t==="+")&&(a=e+a),a===e||a<0||a>=n?!1:a}function _getTargetPixel(t,e){let a=null;return t==="start"?a=e.bottom:t==="end"?a=e.top:isObject$8(t)?a=e.getPixelForValue(t.value):e.getBasePixel&&(a=e.getBasePixel()),a}function _getTargetValue(t,e,a){let n;return t==="start"?n=a:t==="end"?n=e.options.reverse?e.min:e.max:isObject$8(t)?n=t.value:n=e.getBaseValue(),n}function parseFillOption(t){const e=t.options,a=e.fill;let n=valueOrDefault(a&&a.target,a);return n===void 0&&(n=!!e.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function _buildStackLine(t){const{scale:e,index:a,line:n}=t,r=[],i=n.segments,o=n.points,s=getLinesBelow(e,a);s.push(_createBoundaryLine({x:null,y:e.bottom},n));for(let l=0;l<i.length;l++){const u=i[l];for(let c=u.start;c<=u.end;c++)addPointsBelow(r,o[c],s)}return new LineElement({points:r,options:{}})}function getLinesBelow(t,e){const a=[],n=t.getMatchingVisibleMetas("line");for(let r=0;r<n.length;r++){const i=n[r];if(i.index===e)break;i.hidden||a.unshift(i.dataset)}return a}function addPointsBelow(t,e,a){const n=[];for(let r=0;r<a.length;r++){const i=a[r],{first:o,last:s,point:l}=findPoint(i,e,"x");if(!(!l||o&&s)){if(o)n.unshift(l);else if(t.push(l),!s)break}}t.push(...n)}function findPoint(t,e,a){const n=t.interpolate(e,a);if(!n)return{};const r=n[a],i=t.segments,o=t.points;let s=!1,l=!1;for(let u=0;u<i.length;u++){const c=i[u],d=o[c.start][a],h=o[c.end][a];if(_isBetween(r,d,h)){s=r===d,l=r===h;break}}return{first:s,last:l,point:n}}class simpleArc{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,a,n){const{x:r,y:i,radius:o}=this;return a=a||{start:0,end:TAU},e.arc(r,i,o,a.end,a.start,!0),!n.bounds}interpolate(e){const{x:a,y:n,radius:r}=this,i=e.angle;return{x:a+Math.cos(i)*r,y:n+Math.sin(i)*r,angle:i}}}function _getTarget(t){const{chart:e,fill:a,line:n}=t;if(isNumberFinite(a))return getLineByIndex(e,a);if(a==="stack")return _buildStackLine(t);if(a==="shape")return!0;const r=computeBoundary(t);return r instanceof simpleArc?r:_createBoundaryLine(r,n)}function getLineByIndex(t,e){const a=t.getDatasetMeta(e);return a&&t.isDatasetVisible(e)?a.dataset:null}function computeBoundary(t){return(t.scale||{}).getPointPositionForValue?computeCircularBoundary(t):computeLinearBoundary(t)}function computeLinearBoundary(t){const{scale:e={},fill:a}=t,n=_getTargetPixel(a,e);if(isNumberFinite(n)){const r=e.isHorizontal();return{x:r?n:null,y:r?null:n}}return null}function computeCircularBoundary(t){const{scale:e,fill:a}=t,n=e.options,r=e.getLabels().length,i=n.reverse?e.max:e.min,o=_getTargetValue(a,e,i),s=[];if(n.grid.circular){const l=e.getPointPositionForValue(0,i);return new simpleArc({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(o)})}for(let l=0;l<r;++l)s.push(e.getPointPositionForValue(l,o));return s}function _drawfill(t,e,a){const n=_getTarget(e),{line:r,scale:i,axis:o}=e,s=r.options,l=s.fill,u=s.backgroundColor,{above:c=u,below:d=u}=l||{};n&&r.points.length&&(clipArea(t,a),doFill(t,{line:r,target:n,above:c,below:d,area:a,scale:i,axis:o}),unclipArea(t))}function doFill(t,e){const{line:a,target:n,above:r,below:i,area:o,scale:s}=e,l=a._loop?"angle":e.axis;t.save(),l==="x"&&i!==r&&(clipVertical(t,n,o.top),fill(t,{line:a,target:n,color:r,scale:s,property:l}),t.restore(),t.save(),clipVertical(t,n,o.bottom)),fill(t,{line:a,target:n,color:i,scale:s,property:l}),t.restore()}function clipVertical(t,e,a){const{segments:n,points:r}=e;let i=!0,o=!1;t.beginPath();for(const s of n){const{start:l,end:u}=s,c=r[l],d=r[_findSegmentEnd(l,u,r)];i?(t.moveTo(c.x,c.y),i=!1):(t.lineTo(c.x,a),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,s,{move:o}),o?t.closePath():t.lineTo(d.x,a)}t.lineTo(e.first().x,a),t.closePath(),t.clip()}function fill(t,e){const{line:a,target:n,property:r,color:i,scale:o}=e,s=_segments(a,n,r);for(const{source:l,target:u,start:c,end:d}of s){const{style:{backgroundColor:h=i}={}}=l,m=n!==!0;t.save(),t.fillStyle=h,clipBounds(t,o,m&&_getBounds(r,c,d)),t.beginPath();const p=!!a.pathSegment(t,l);let v;if(m){p?t.closePath():interpolatedLineTo(t,n,d,r);const y=!!n.pathSegment(t,u,{move:p,reverse:!0});v=p&&y,v||interpolatedLineTo(t,n,c,r)}t.closePath(),t.fill(v?"evenodd":"nonzero"),t.restore()}}function clipBounds(t,e,a){const{top:n,bottom:r}=e.chart.chartArea,{property:i,start:o,end:s}=a||{};i==="x"&&(t.beginPath(),t.rect(o,n,s-o,r-n),t.clip())}function interpolatedLineTo(t,e,a,n){const r=e.interpolate(a,n);r&&t.lineTo(r.x,r.y)}var index$1={id:"filler",afterDatasetsUpdate(t,e,a){const n=(t.data.datasets||[]).length,r=[];let i,o,s,l;for(o=0;o<n;++o)i=t.getDatasetMeta(o),s=i.dataset,l=null,s&&s.options&&s instanceof LineElement&&(l={visible:t.isDatasetVisible(o),index:o,fill:_decodeFill(s,o,n),chart:t,axis:i.controller.options.indexAxis,scale:i.vScale,line:s}),i.$filler=l,r.push(l);for(o=0;o<n;++o)l=r[o],!(!l||l.fill===!1)&&(l.fill=_resolveTarget(r,o,a.propagate))},beforeDraw(t,e,a){const n=a.drawTime==="beforeDraw",r=t.getSortedVisibleDatasetMetas(),i=t.chartArea;for(let o=r.length-1;o>=0;--o){const s=r[o].$filler;s&&(s.line.updateControlPoints(i,s.axis),n&&s.fill&&_drawfill(t.ctx,s,i))}},beforeDatasetsDraw(t,e,a){if(a.drawTime!=="beforeDatasetsDraw")return;const n=t.getSortedVisibleDatasetMetas();for(let r=n.length-1;r>=0;--r){const i=n[r].$filler;_shouldApplyFill(i)&&_drawfill(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,a){const n=e.meta.$filler;!_shouldApplyFill(n)||a.drawTime!=="beforeDatasetDraw"||_drawfill(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const getBoxSize=(t,e)=>{let{boxHeight:a=e,boxWidth:n=e}=t;return t.usePointStyle&&(a=Math.min(a,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:a,itemHeight:Math.max(e,a)}},itemsEqual=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Legend extends Element$1{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,a,n){this.maxWidth=e,this.maxHeight=a,this._margins=n,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 a=callback(e.generateLabels,[this.chart],this)||[];e.filter&&(a=a.filter(n=>e.filter(n,this.chart.data))),e.sort&&(a=a.sort((n,r)=>e.sort(n,r,this.chart.data))),this.options.reverse&&a.reverse(),this.legendItems=a}fit(){const{options:e,ctx:a}=this;if(!e.display){this.width=this.height=0;return}const n=e.labels,r=toFont(n.font),i=r.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=getBoxSize(n,i);let u,c;a.font=r.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,i,s,l)+10):(c=this.maxHeight,u=this._fitCols(o,r,s,l)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,a,n,r){const{ctx:i,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=r+s;let d=e;i.textAlign="left",i.textBaseline="middle";let h=-1,m=-c;return this.legendItems.forEach((p,v)=>{const y=n+a/2+i.measureText(p.text).width;(v===0||u[u.length-1]+y+2*s>o)&&(d+=c,u[u.length-(v>0?0:1)]=0,m+=c,h++),l[v]={left:0,top:m,row:h,width:y,height:r},u[u.length-1]+=y+s}),d}_fitCols(e,a,n,r){const{ctx:i,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-e;let d=s,h=0,m=0,p=0,v=0;return this.legendItems.forEach((y,w)=>{const{itemWidth:_,itemHeight:D}=calculateItemSize(n,a,i,y,r);w>0&&m+D+2*s>c&&(d+=h+s,u.push({width:h,height:m}),p+=h+s,v++,h=m=0),l[w]={left:p,top:m,col:v,width:_,height:D},h=Math.max(h,_),m+=D+s}),d+=h,u.push({width:h,height:m}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:a,options:{align:n,labels:{padding:r},rtl:i}}=this,o=getRtlAdapter(i,this.left,this.width);if(this.isHorizontal()){let s=0,l=_alignStartEnd(n,this.left+r,this.right-this.lineWidths[s]);for(const u of a)s!==u.row&&(s=u.row,l=_alignStartEnd(n,this.left+r,this.right-this.lineWidths[s])),u.top+=this.top+e+r,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+r}else{let s=0,l=_alignStartEnd(n,this.top+e+r,this.bottom-this.columnSizes[s].height);for(const u of a)u.col!==s&&(s=u.col,l=_alignStartEnd(n,this.top+e+r,this.bottom-this.columnSizes[s].height)),u.top=l,u.left+=this.left+r,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;clipArea(e,this),this._draw(),unclipArea(e)}}_draw(){const{options:e,columnSizes:a,lineWidths:n,ctx:r}=this,{align:i,labels:o}=e,s=defaults.color,l=getRtlAdapter(e.rtl,this.left,this.width),u=toFont(o.font),{padding:c}=o,d=u.size,h=d/2;let m;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=u.string;const{boxWidth:p,boxHeight:v,itemHeight:y}=getBoxSize(o,d),w=function(N,F,g){if(isNaN(p)||p<=0||isNaN(v)||v<0)return;r.save();const b=valueOrDefault(g.lineWidth,1);if(r.fillStyle=valueOrDefault(g.fillStyle,s),r.lineCap=valueOrDefault(g.lineCap,"butt"),r.lineDashOffset=valueOrDefault(g.lineDashOffset,0),r.lineJoin=valueOrDefault(g.lineJoin,"miter"),r.lineWidth=b,r.strokeStyle=valueOrDefault(g.strokeStyle,s),r.setLineDash(valueOrDefault(g.lineDash,[])),o.usePointStyle){const $={radius:v*Math.SQRT2/2,pointStyle:g.pointStyle,rotation:g.rotation,borderWidth:b},S=l.xPlus(N,p/2),P=F+h;drawPointLegend(r,$,S,P,o.pointStyleWidth&&p)}else{const $=F+Math.max((d-v)/2,0),S=l.leftForLtr(N,p),P=toTRBLCorners(g.borderRadius);r.beginPath(),Object.values(P).some(M=>M!==0)?addRoundedRectPath(r,{x:S,y:$,w:p,h:v,radius:P}):r.rect(S,$,p,v),r.fill(),b!==0&&r.stroke()}r.restore()},_=function(N,F,g){renderText(r,g.text,N,F+y/2,u,{strikethrough:g.hidden,textAlign:l.textAlign(g.textAlign)})},D=this.isHorizontal(),k=this._computeTitleHeight();D?m={x:_alignStartEnd(i,this.left+c,this.right-n[0]),y:this.top+c+k,line:0}:m={x:this.left+c,y:_alignStartEnd(i,this.top+k+c,this.bottom-a[0].height),line:0},overrideTextDirection(this.ctx,e.textDirection);const O=y+c;this.legendItems.forEach((N,F)=>{r.strokeStyle=N.fontColor,r.fillStyle=N.fontColor;const g=r.measureText(N.text).width,b=l.textAlign(N.textAlign||(N.textAlign=o.textAlign)),$=p+h+g;let S=m.x,P=m.y;l.setWidth(this.width),D?F>0&&S+$+c>this.right&&(P=m.y+=O,m.line++,S=m.x=_alignStartEnd(i,this.left+c,this.right-n[m.line])):F>0&&P+O>this.bottom&&(S=m.x=S+a[m.line].width+c,m.line++,P=m.y=_alignStartEnd(i,this.top+k+c,this.bottom-a[m.line].height));const M=l.x(S);if(w(M,P,N),S=_textX(b,S+p+h,D?S+$:this.right,e.rtl),_(l.x(S),P,N),D)m.x+=$+c;else if(typeof N.text!="string"){const C=u.lineHeight;m.y+=calculateLegendItemHeight(N,C)+c}else m.y+=O}),restoreTextDirection(this.ctx,e.textDirection)}drawTitle(){const e=this.options,a=e.title,n=toFont(a.font),r=toPadding(a.padding);if(!a.display)return;const i=getRtlAdapter(e.rtl,this.left,this.width),o=this.ctx,s=a.position,l=n.size/2,u=r.top+l;let c,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+u,d=_alignStartEnd(e.align,d,this.right-h);else{const p=this.columnSizes.reduce((v,y)=>Math.max(v,y.height),0);c=u+_alignStartEnd(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const m=_alignStartEnd(s,d,d+h);o.textAlign=i.textAlign(_toLeftRightCenter(s)),o.textBaseline="middle",o.strokeStyle=a.color,o.fillStyle=a.color,o.font=n.string,renderText(o,a.text,m,c,n)}_computeTitleHeight(){const e=this.options.title,a=toFont(e.font),n=toPadding(e.padding);return e.display?a.lineHeight+n.height:0}_getLegendItemAt(e,a){let n,r,i;if(_isBetween(e,this.left,this.right)&&_isBetween(a,this.top,this.bottom)){for(i=this.legendHitBoxes,n=0;n<i.length;++n)if(r=i[n],_isBetween(e,r.left,r.left+r.width)&&_isBetween(a,r.top,r.top+r.height))return this.legendItems[n]}return null}handleEvent(e){const a=this.options;if(!isListened(e.type,a))return;const n=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const r=this._hoveredItem,i=itemsEqual(r,n);r&&!i&&callback(a.onLeave,[e,r,this],this),this._hoveredItem=n,n&&!i&&callback(a.onHover,[e,n,this],this)}else n&&callback(a.onClick,[e,n,this],this)}}function calculateItemSize(t,e,a,n,r){const i=calculateItemWidth(n,t,e,a),o=calculateItemHeight(r,n,e.lineHeight);return{itemWidth:i,itemHeight:o}}function calculateItemWidth(t,e,a,n){let r=t.text;return r&&typeof r!="string"&&(r=r.reduce((i,o)=>i.length>o.length?i:o)),e+a.size/2+n.measureText(r).width}function calculateItemHeight(t,e,a){let n=t;return typeof e.text!="string"&&(n=calculateLegendItemHeight(e,a)),n}function calculateLegendItemHeight(t,e){const a=t.text?t.text.length:0;return e*a}function isListened(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var plugin_legend={id:"legend",_element:Legend,start(t,e,a){const n=t.legend=new Legend({ctx:t.ctx,options:a,chart:t});layouts.configure(t,n,a),layouts.addBox(t,n)},stop(t){layouts.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,a){const n=t.legend;layouts.configure(t,n,a),n.options=a},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,a){const n=e.datasetIndex,r=a.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),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:a,pointStyle:n,textAlign:r,color:i,useBorderRadius:o,borderRadius:s}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(a?0:void 0),c=toPadding(u.borderWidth);return{text:e[l.index].label,fillStyle:u.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:n||u.pointStyle,rotation:u.rotation,textAlign:r||u.textAlign,borderRadius:o&&(s||u.borderRadius),datasetIndex:l.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)}}};const positioners={average(t){if(!t.length)return!1;let e,a,n=0,r=0,i=0;for(e=0,a=t.length;e<a;++e){const o=t[e].element;if(o&&o.hasValue()){const s=o.tooltipPosition();n+=s.x,r+=s.y,++i}}return{x:n/i,y:r/i}},nearest(t,e){if(!t.length)return!1;let a=e.x,n=e.y,r=Number.POSITIVE_INFINITY,i,o,s;for(i=0,o=t.length;i<o;++i){const l=t[i].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=distanceBetweenPoints(e,u);c<r&&(r=c,s=l)}}if(s){const l=s.tooltipPosition();a=l.x,n=l.y}return{x:a,y:n}}};function pushOrConcat(t,e){return e&&(isArray$b(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function splitNewlines(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
||
`)>-1?t.split(`
|
||
`):t}function createTooltipItem(t,e){const{element:a,datasetIndex:n,index:r}=e,i=t.getDatasetMeta(n).controller,{label:o,value:s}=i.getLabelAndValue(r);return{chart:t,label:o,parsed:i.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:s,dataset:i.getDataset(),dataIndex:r,datasetIndex:n,element:a}}function getTooltipSize(t,e){const a=t.chart.ctx,{body:n,footer:r,title:i}=t,{boxWidth:o,boxHeight:s}=e,l=toFont(e.bodyFont),u=toFont(e.titleFont),c=toFont(e.footerFont),d=i.length,h=r.length,m=n.length,p=toPadding(e.padding);let v=p.height,y=0,w=n.reduce((k,O)=>k+O.before.length+O.lines.length+O.after.length,0);if(w+=t.beforeBody.length+t.afterBody.length,d&&(v+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),w){const k=e.displayColors?Math.max(s,l.lineHeight):l.lineHeight;v+=m*k+(w-m)*l.lineHeight+(w-1)*e.bodySpacing}h&&(v+=e.footerMarginTop+h*c.lineHeight+(h-1)*e.footerSpacing);let _=0;const D=function(k){y=Math.max(y,a.measureText(k).width+_)};return a.save(),a.font=u.string,each(t.title,D),a.font=l.string,each(t.beforeBody.concat(t.afterBody),D),_=e.displayColors?o+2+e.boxPadding:0,each(n,k=>{each(k.before,D),each(k.lines,D),each(k.after,D)}),_=0,a.font=c.string,each(t.footer,D),a.restore(),y+=p.width,{width:y,height:v}}function determineYAlign(t,e){const{y:a,height:n}=e;return a<n/2?"top":a>t.height-n/2?"bottom":"center"}function doesNotFitWithAlign(t,e,a,n){const{x:r,width:i}=n,o=a.caretSize+a.caretPadding;if(t==="left"&&r+i+o>e.width||t==="right"&&r-i-o<0)return!0}function determineXAlign(t,e,a,n){const{x:r,width:i}=a,{width:o,chartArea:{left:s,right:l}}=t;let u="center";return n==="center"?u=r<=(s+l)/2?"left":"right":r<=i/2?u="left":r>=o-i/2&&(u="right"),doesNotFitWithAlign(u,t,e,a)&&(u="center"),u}function determineAlignment(t,e,a){const n=a.yAlign||e.yAlign||determineYAlign(t,a);return{xAlign:a.xAlign||e.xAlign||determineXAlign(t,e,a,n),yAlign:n}}function alignX(t,e){let{x:a,width:n}=t;return e==="right"?a-=n:e==="center"&&(a-=n/2),a}function alignY(t,e,a){let{y:n,height:r}=t;return e==="top"?n+=a:e==="bottom"?n-=r+a:n-=r/2,n}function getBackgroundPoint(t,e,a,n){const{caretSize:r,caretPadding:i,cornerRadius:o}=t,{xAlign:s,yAlign:l}=a,u=r+i,{topLeft:c,topRight:d,bottomLeft:h,bottomRight:m}=toTRBLCorners(o);let p=alignX(e,s);const v=alignY(e,l,u);return l==="center"?s==="left"?p+=u:s==="right"&&(p-=u):s==="left"?p-=Math.max(c,h)+r:s==="right"&&(p+=Math.max(d,m)+r),{x:_limitValue(p,0,n.width-e.width),y:_limitValue(v,0,n.height-e.height)}}function getAlignedX(t,e,a){const n=toPadding(a.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-n.right:t.x+n.left}function getBeforeAfterBodyLines(t){return pushOrConcat([],splitNewlines(t))}function createTooltipContext(t,e,a){return createContext(t,{tooltip:e,tooltipItems:a,type:"tooltip"})}function overrideCallbacks(t,e){const a=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return a?t.override(a):t}const defaultCallbacks={beforeTitle:noop$2,title(t){if(t.length>0){const e=t[0],a=e.chart.data.labels,n=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return a[e.dataIndex]}return""},afterTitle:noop$2,beforeBody:noop$2,beforeLabel:noop$2,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 a=t.formattedValue;return isNullOrUndef(a)||(e+=a),e},labelColor(t){const a=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const a=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:noop$2,afterBody:noop$2,beforeFooter:noop$2,footer:noop$2,afterFooter:noop$2};function invokeCallbackWithFallback(t,e,a,n){const r=t[e].call(a,n);return typeof r>"u"?defaultCallbacks[e].call(a,n):r}class Tooltip extends Element$1{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 a=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&a.options.animation&&n.animations,i=new Animations(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=createTooltipContext(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,a){const{callbacks:n}=a,r=invokeCallbackWithFallback(n,"beforeTitle",this,e),i=invokeCallbackWithFallback(n,"title",this,e),o=invokeCallbackWithFallback(n,"afterTitle",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(i)),s=pushOrConcat(s,splitNewlines(o)),s}getBeforeBody(e,a){return getBeforeAfterBodyLines(invokeCallbackWithFallback(a.callbacks,"beforeBody",this,e))}getBody(e,a){const{callbacks:n}=a,r=[];return each(e,i=>{const o={before:[],lines:[],after:[]},s=overrideCallbacks(n,i);pushOrConcat(o.before,splitNewlines(invokeCallbackWithFallback(s,"beforeLabel",this,i))),pushOrConcat(o.lines,invokeCallbackWithFallback(s,"label",this,i)),pushOrConcat(o.after,splitNewlines(invokeCallbackWithFallback(s,"afterLabel",this,i))),r.push(o)}),r}getAfterBody(e,a){return getBeforeAfterBodyLines(invokeCallbackWithFallback(a.callbacks,"afterBody",this,e))}getFooter(e,a){const{callbacks:n}=a,r=invokeCallbackWithFallback(n,"beforeFooter",this,e),i=invokeCallbackWithFallback(n,"footer",this,e),o=invokeCallbackWithFallback(n,"afterFooter",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(i)),s=pushOrConcat(s,splitNewlines(o)),s}_createItems(e){const a=this._active,n=this.chart.data,r=[],i=[],o=[];let s=[],l,u;for(l=0,u=a.length;l<u;++l)s.push(createTooltipItem(this.chart,a[l]));return e.filter&&(s=s.filter((c,d,h)=>e.filter(c,d,h,n))),e.itemSort&&(s=s.sort((c,d)=>e.itemSort(c,d,n))),each(s,c=>{const d=overrideCallbacks(e.callbacks,c);r.push(invokeCallbackWithFallback(d,"labelColor",this,c)),i.push(invokeCallbackWithFallback(d,"labelPointStyle",this,c)),o.push(invokeCallbackWithFallback(d,"labelTextColor",this,c))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=s,s}update(e,a){const n=this.options.setContext(this.getContext()),r=this._active;let i,o=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{const s=positioners[n.position].call(this,r,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const l=this._size=getTooltipSize(this,n),u=Object.assign({},s,l),c=determineAlignment(this.chart,n,u),d=getBackgroundPoint(n,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,i={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(e,a,n,r){const i=this.getCaretPosition(e,n,r);a.lineTo(i.x1,i.y1),a.lineTo(i.x2,i.y2),a.lineTo(i.x3,i.y3)}getCaretPosition(e,a,n){const{xAlign:r,yAlign:i}=this,{caretSize:o,cornerRadius:s}=n,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=toTRBLCorners(s),{x:h,y:m}=e,{width:p,height:v}=a;let y,w,_,D,k,O;return i==="center"?(k=m+v/2,r==="left"?(y=h,w=y-o,D=k+o,O=k-o):(y=h+p,w=y+o,D=k-o,O=k+o),_=y):(r==="left"?w=h+Math.max(l,c)+o:r==="right"?w=h+p-Math.max(u,d)-o:w=this.caretX,i==="top"?(D=m,k=D-o,y=w-o,_=w+o):(D=m+v,k=D+o,y=w+o,_=w-o),O=D),{x1:y,x2:w,x3:_,y1:D,y2:k,y3:O}}drawTitle(e,a,n){const r=this.title,i=r.length;let o,s,l;if(i){const u=getRtlAdapter(n.rtl,this.x,this.width);for(e.x=getAlignedX(this,n.titleAlign,n),a.textAlign=u.textAlign(n.titleAlign),a.textBaseline="middle",o=toFont(n.titleFont),s=n.titleSpacing,a.fillStyle=n.titleColor,a.font=o.string,l=0;l<i;++l)a.fillText(r[l],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+s,l+1===i&&(e.y+=n.titleMarginBottom-s)}}_drawColorBox(e,a,n,r,i){const o=this.labelColors[n],s=this.labelPointStyles[n],{boxHeight:l,boxWidth:u}=i,c=toFont(i.bodyFont),d=getAlignedX(this,"left",i),h=r.x(d),m=l<c.lineHeight?(c.lineHeight-l)/2:0,p=a.y+m;if(i.usePointStyle){const v={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},y=r.leftForLtr(h,u)+u/2,w=p+l/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,drawPoint(e,v,y,w),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,drawPoint(e,v,y,w)}else{e.lineWidth=isObject$8(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const v=r.leftForLtr(h,u),y=r.leftForLtr(r.xPlus(h,1),u-2),w=toTRBLCorners(o.borderRadius);Object.values(w).some(_=>_!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,addRoundedRectPath(e,{x:v,y:p,w:u,h:l,radius:w}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),addRoundedRectPath(e,{x:y,y:p+1,w:u-2,h:l-2,radius:w}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(v,p,u,l),e.strokeRect(v,p,u,l),e.fillStyle=o.backgroundColor,e.fillRect(y,p+1,u-2,l-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,a,n){const{body:r}=this,{bodySpacing:i,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:c}=n,d=toFont(n.bodyFont);let h=d.lineHeight,m=0;const p=getRtlAdapter(n.rtl,this.x,this.width),v=function(g){a.fillText(g,p.x(e.x+m),e.y+h/2),e.y+=h+i},y=p.textAlign(o);let w,_,D,k,O,N,F;for(a.textAlign=o,a.textBaseline="middle",a.font=d.string,e.x=getAlignedX(this,y,n),a.fillStyle=n.bodyColor,each(this.beforeBody,v),m=s&&y!=="right"?o==="center"?u/2+c:u+2+c:0,k=0,N=r.length;k<N;++k){for(w=r[k],_=this.labelTextColors[k],a.fillStyle=_,each(w.before,v),D=w.lines,s&&D.length&&(this._drawColorBox(a,e,k,p,n),h=Math.max(d.lineHeight,l)),O=0,F=D.length;O<F;++O)v(D[O]),h=d.lineHeight;each(w.after,v)}m=0,h=d.lineHeight,each(this.afterBody,v),e.y-=i}drawFooter(e,a,n){const r=this.footer,i=r.length;let o,s;if(i){const l=getRtlAdapter(n.rtl,this.x,this.width);for(e.x=getAlignedX(this,n.footerAlign,n),e.y+=n.footerMarginTop,a.textAlign=l.textAlign(n.footerAlign),a.textBaseline="middle",o=toFont(n.footerFont),a.fillStyle=n.footerColor,a.font=o.string,s=0;s<i;++s)a.fillText(r[s],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+n.footerSpacing}}drawBackground(e,a,n,r){const{xAlign:i,yAlign:o}=this,{x:s,y:l}=e,{width:u,height:c}=n,{topLeft:d,topRight:h,bottomLeft:m,bottomRight:p}=toTRBLCorners(r.cornerRadius);a.fillStyle=r.backgroundColor,a.strokeStyle=r.borderColor,a.lineWidth=r.borderWidth,a.beginPath(),a.moveTo(s+d,l),o==="top"&&this.drawCaret(e,a,n,r),a.lineTo(s+u-h,l),a.quadraticCurveTo(s+u,l,s+u,l+h),o==="center"&&i==="right"&&this.drawCaret(e,a,n,r),a.lineTo(s+u,l+c-p),a.quadraticCurveTo(s+u,l+c,s+u-p,l+c),o==="bottom"&&this.drawCaret(e,a,n,r),a.lineTo(s+m,l+c),a.quadraticCurveTo(s,l+c,s,l+c-m),o==="center"&&i==="left"&&this.drawCaret(e,a,n,r),a.lineTo(s,l+d),a.quadraticCurveTo(s,l,s+d,l),a.closePath(),a.fill(),r.borderWidth>0&&a.stroke()}_updateAnimationTarget(e){const a=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){const o=positioners[e.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=getTooltipSize(this,e),l=Object.assign({},o,this._size),u=determineAlignment(a,e,l),c=getBackgroundPoint(e,l,u,a);(r._to!==c.x||i._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const a=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(a);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=toPadding(a.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&s&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,r,a),overrideTextDirection(e,a.textDirection),i.y+=o.top,this.drawTitle(i,e,a),this.drawBody(i,e,a),this.drawFooter(i,e,a),restoreTextDirection(e,a.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,a){const n=this._active,r=e.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),i=!_elementsEqual(n,r),o=this._positionChanged(r,a);(i||o)&&(this._active=r,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,a,n=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],o=this._getActiveElements(e,i,a,n),s=this._positionChanged(o,e),l=a||!_elementsEqual(o,i)||s;return l&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,a))),l}_getActiveElements(e,a,n,r){const i=this.options;if(e.type==="mouseout")return[];if(!r)return a;const o=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&o.reverse(),o}_positionChanged(e,a){const{caretX:n,caretY:r,options:i}=this,o=positioners[i.position].call(this,e,a);return o!==!1&&(n!==o.x||r!==o.y)}}R(Tooltip,"positioners",positioners);var plugin_tooltip={id:"tooltip",_element:Tooltip,positioners,afterInit(t,e,a){a&&(t.tooltip=new Tooltip({chart:t,options:a}))},beforeUpdate(t,e,a){t.tooltip&&t.tooltip.initialize(a)},reset(t,e,a){t.tooltip&&t.tooltip.initialize(a)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const a={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",a)}},afterEvent(t,e){if(t.tooltip){const a=e.replay;t.tooltip.handleEvent(e.event,a,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:defaultCallbacks},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"]};const addIfString=(t,e,a,n)=>(typeof e=="string"?(a=t.push(e)-1,n.unshift({index:a,label:e})):isNaN(e)&&(a=null),a);function findOrAddLabel(t,e,a,n){const r=t.indexOf(e);if(r===-1)return addIfString(t,e,a,n);const i=t.lastIndexOf(e);return r!==i?a:r}const validIndex=(t,e)=>t===null?null:_limitValue(Math.round(t),0,e);function _getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class CategoryScale extends Scale{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const a=this._addedLabels;if(a.length){const n=this.getLabels();for(const{index:r,label:i}of a)n[r]===i&&n.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,a){if(isNullOrUndef(e))return null;const n=this.getLabels();return a=isFinite(a)&&n[a]===e?a:findOrAddLabel(n,e,valueOrDefault(a,e),this._addedLabels),validIndex(a,n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:a}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(n=0),a||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const e=this.min,a=this.max,n=this.options.offset,r=[];let i=this.getLabels();i=e===0&&a===i.length-1?i:i.slice(e,a+1),this._valueRange=Math.max(i.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=e;o<=a;o++)r.push({value:o});return r}getLabelForValue(e){return _getLabelForValue.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 a=this.ticks;return e<0||e>a.length-1?null:this.getPixelForValue(a[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}R(CategoryScale,"id","category"),R(CategoryScale,"defaults",{ticks:{callback:_getLabelForValue}});function generateTicks$1(t,e){const a=[],{bounds:r,step:i,min:o,max:s,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:h}=t,m=i||1,p=c-1,{min:v,max:y}=e,w=!isNullOrUndef(o),_=!isNullOrUndef(s),D=!isNullOrUndef(u),k=(y-v)/(d+1);let O=niceNum((y-v)/p/m)*m,N,F,g,b;if(O<1e-14&&!w&&!_)return[{value:v},{value:y}];b=Math.ceil(y/O)-Math.floor(v/O),b>p&&(O=niceNum(b*O/p/m)*m),isNullOrUndef(l)||(N=Math.pow(10,l),O=Math.ceil(O*N)/N),r==="ticks"?(F=Math.floor(v/O)*O,g=Math.ceil(y/O)*O):(F=v,g=y),w&&_&&i&&almostWhole((s-o)/i,O/1e3)?(b=Math.round(Math.min((s-o)/O,c)),O=(s-o)/b,F=o,g=s):D?(F=w?o:F,g=_?s:g,b=u-1,O=(g-F)/b):(b=(g-F)/O,almostEquals(b,Math.round(b),O/1e3)?b=Math.round(b):b=Math.ceil(b));const $=Math.max(_decimalPlaces(O),_decimalPlaces(F));N=Math.pow(10,isNullOrUndef(l)?$:l),F=Math.round(F*N)/N,g=Math.round(g*N)/N;let S=0;for(w&&(h&&F!==o?(a.push({value:o}),F<o&&S++,almostEquals(Math.round((F+S*O)*N)/N,o,relativeLabelSize(o,k,t))&&S++):F<o&&S++);S<b;++S){const P=Math.round((F+S*O)*N)/N;if(_&&P>s)break;a.push({value:P})}return _&&h&&g!==s?a.length&&almostEquals(a[a.length-1].value,s,relativeLabelSize(s,k,t))?a[a.length-1].value=s:a.push({value:s}):(!_||g===s)&&a.push({value:g}),a}function relativeLabelSize(t,e,{horizontal:a,minRotation:n}){const r=toRadians(n),i=(a?Math.sin(r):Math.cos(r))||.001,o=.75*e*(""+t).length;return Math.min(e/i,o)}class LinearScaleBase extends Scale{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,a){return isNullOrUndef(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:a,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this;const o=l=>r=a?r:l,s=l=>i=n?i:l;if(e){const l=sign(r),u=sign(i);l<0&&u<0?s(0):l>0&&u>0&&o(0)}if(r===i){let l=i===0?1:Math.abs(i*.05);s(i+l),e||o(r-l)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:a,stepSize:n}=e,r;return n?(r=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),a=a||11),a&&(r=Math.min(a,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,a=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},i=this._range||this,o=generateTicks$1(r,i);return e.bounds==="ticks"&&_setMinAndMaxByKey(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let a=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const r=(n-a)/Math.max(e.length-1,1)/2;a-=r,n+=r}this._startValue=a,this._endValue=n,this._valueRange=n-a}getLabelForValue(e){return formatNumber$1(e,this.chart.options.locale,this.options.ticks.format)}}class LinearScale extends LinearScaleBase{determineDataLimits(){const{min:e,max:a}=this.getMinMax(!0);this.min=isNumberFinite(e)?e:0,this.max=isNumberFinite(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),a=e?this.width:this.height,n=toRadians(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}R(LinearScale,"id","linear"),R(LinearScale,"defaults",{ticks:{callback:Ticks.formatters.numeric}});const log10Floor=t=>Math.floor(log10(t)),changeExponent=(t,e)=>Math.pow(10,log10Floor(t)+e);function isMajor(t){return t/Math.pow(10,log10Floor(t))===1}function steps(t,e,a){const n=Math.pow(10,a),r=Math.floor(t/n);return Math.ceil(e/n)-r}function startExp(t,e){const a=e-t;let n=log10Floor(a);for(;steps(t,e,n)>10;)n++;for(;steps(t,e,n)<10;)n--;return Math.min(n,log10Floor(t))}function generateTicks(t,{min:e,max:a}){e=finiteOrDefault(t.min,e);const n=[],r=log10Floor(e);let i=startExp(e,a),o=i<0?Math.pow(10,Math.abs(i)):1;const s=Math.pow(10,i),l=r>i?Math.pow(10,r):0,u=Math.round((e-l)*o)/o,c=Math.floor((e-l)/s/10)*s*10;let d=Math.floor((u-c)/Math.pow(10,i)),h=finiteOrDefault(t.min,Math.round((l+c+d*Math.pow(10,i))*o)/o);for(;h<a;)n.push({value:h,major:isMajor(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(i++,d=2,o=i>=0?1:o),h=Math.round((l+c+d*Math.pow(10,i))*o)/o;const m=finiteOrDefault(t.max,h);return n.push({value:m,major:isMajor(m),significand:d}),n}class LogarithmicScale extends Scale{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,a){const n=LinearScaleBase.prototype.parse.apply(this,[e,a]);if(n===0){this._zero=!0;return}return isNumberFinite(n)&&n>0?n:null}determineDataLimits(){const{min:e,max:a}=this.getMinMax(!0);this.min=isNumberFinite(e)?Math.max(0,e):null,this.max=isNumberFinite(a)?Math.max(0,a):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!isNumberFinite(this._userMin)&&(this.min=e===changeExponent(this.min,0)?changeExponent(this.min,-1):changeExponent(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:a}=this.getUserBounds();let n=this.min,r=this.max;const i=s=>n=e?n:s,o=s=>r=a?r:s;n===r&&(n<=0?(i(1),o(10)):(i(changeExponent(n,-1)),o(changeExponent(r,1)))),n<=0&&i(changeExponent(r,-1)),r<=0&&o(changeExponent(n,1)),this.min=n,this.max=r}buildTicks(){const e=this.options,a={min:this._userMin,max:this._userMax},n=generateTicks(a,this);return e.bounds==="ticks"&&_setMinAndMaxByKey(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":formatNumber$1(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=log10(e),this._valueRange=log10(this.max)-log10(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(log10(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const a=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+a*this._valueRange)}}R(LogarithmicScale,"id","logarithmic"),R(LogarithmicScale,"defaults",{ticks:{callback:Ticks.formatters.logarithmic,major:{enabled:!0}}});function getTickBackdropHeight(t){const e=t.ticks;if(e.display&&t.display){const a=toPadding(e.backdropPadding);return valueOrDefault(e.font&&e.font.size,defaults.font.size)+a.height}return 0}function measureLabelSize(t,e,a){return a=isArray$b(a)?a:[a],{w:_longestText(t,e.string,a),h:a.length*e.lineHeight}}function determineLimits(t,e,a,n,r){return t===n||t===r?{start:e-a/2,end:e+a/2}:t<n||t>r?{start:e-a,end:e}:{start:e,end:e+a}}function fitWithPointLabels(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},a=Object.assign({},e),n=[],r=[],i=t._pointLabels.length,o=t.options.pointLabels,s=o.centerPointLabels?PI/i:0;for(let l=0;l<i;l++){const u=o.setContext(t.getPointLabelContext(l));r[l]=u.padding;const c=t.getPointPosition(l,t.drawingArea+r[l],s),d=toFont(u.font),h=measureLabelSize(t.ctx,d,t._pointLabels[l]);n[l]=h;const m=_normalizeAngle(t.getIndexAngle(l)+s),p=Math.round(toDegrees(m)),v=determineLimits(p,c.x,h.w,0,180),y=determineLimits(p,c.y,h.h,90,270);updateLimits(a,e,m,v,y)}t.setCenterPoint(e.l-a.l,a.r-e.r,e.t-a.t,a.b-e.b),t._pointLabelItems=buildPointLabelItems(t,n,r)}function updateLimits(t,e,a,n,r){const i=Math.abs(Math.sin(a)),o=Math.abs(Math.cos(a));let s=0,l=0;n.start<e.l?(s=(e.l-n.start)/i,t.l=Math.min(t.l,e.l-s)):n.end>e.r&&(s=(n.end-e.r)/i,t.r=Math.max(t.r,e.r+s)),r.start<e.t?(l=(e.t-r.start)/o,t.t=Math.min(t.t,e.t-l)):r.end>e.b&&(l=(r.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function createPointLabelItem(t,e,a){const n=t.drawingArea,{extra:r,additionalAngle:i,padding:o,size:s}=a,l=t.getPointPosition(e,n+r+o,i),u=Math.round(toDegrees(_normalizeAngle(l.angle+HALF_PI))),c=yForAngle(l.y,s.h,u),d=getTextAlignForAngle(u),h=leftForTextAlign(l.x,s.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:h,top:c,right:h+s.w,bottom:c+s.h}}function isNotOverlapped(t,e){if(!e)return!0;const{left:a,top:n,right:r,bottom:i}=t;return!(_isPointInArea({x:a,y:n},e)||_isPointInArea({x:a,y:i},e)||_isPointInArea({x:r,y:n},e)||_isPointInArea({x:r,y:i},e))}function buildPointLabelItems(t,e,a){const n=[],r=t._pointLabels.length,i=t.options,{centerPointLabels:o,display:s}=i.pointLabels,l={extra:getTickBackdropHeight(i)/2,additionalAngle:o?PI/r:0};let u;for(let c=0;c<r;c++){l.padding=a[c],l.size=e[c];const d=createPointLabelItem(t,c,l);n.push(d),s==="auto"&&(d.visible=isNotOverlapped(d,u),d.visible&&(u=d))}return n}function getTextAlignForAngle(t){return t===0||t===180?"center":t<180?"left":"right"}function leftForTextAlign(t,e,a){return a==="right"?t-=e:a==="center"&&(t-=e/2),t}function yForAngle(t,e,a){return a===90||a===270?t-=e/2:(a>270||a<90)&&(t-=e),t}function drawPointLabelBox(t,e,a){const{left:n,top:r,right:i,bottom:o}=a,{backdropColor:s}=e;if(!isNullOrUndef(s)){const l=toTRBLCorners(e.borderRadius),u=toPadding(e.backdropPadding);t.fillStyle=s;const c=n-u.left,d=r-u.top,h=i-n+u.width,m=o-r+u.height;Object.values(l).some(p=>p!==0)?(t.beginPath(),addRoundedRectPath(t,{x:c,y:d,w:h,h:m,radius:l}),t.fill()):t.fillRect(c,d,h,m)}}function drawPointLabels(t,e){const{ctx:a,options:{pointLabels:n}}=t;for(let r=e-1;r>=0;r--){const i=t._pointLabelItems[r];if(!i.visible)continue;const o=n.setContext(t.getPointLabelContext(r));drawPointLabelBox(a,o,i);const s=toFont(o.font),{x:l,y:u,textAlign:c}=i;renderText(a,t._pointLabels[r],l,u+s.lineHeight/2,s,{color:o.color,textAlign:c,textBaseline:"middle"})}}function pathRadiusLine(t,e,a,n){const{ctx:r}=t;if(a)r.arc(t.xCenter,t.yCenter,e,0,TAU);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o<n;o++)i=t.getPointPosition(o,e),r.lineTo(i.x,i.y)}}function drawRadiusLine(t,e,a,n,r){const i=t.ctx,o=e.circular,{color:s,lineWidth:l}=e;!o&&!n||!s||!l||a<0||(i.save(),i.strokeStyle=s,i.lineWidth=l,i.setLineDash(r.dash),i.lineDashOffset=r.dashOffset,i.beginPath(),pathRadiusLine(t,a,o,n),i.closePath(),i.stroke(),i.restore())}function createPointLabelContext(t,e,a){return createContext(t,{label:a,index:e,type:"pointLabel"})}class RadialLinearScale extends LinearScaleBase{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=toPadding(getTickBackdropHeight(this.options)/2),a=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+a/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(a,n)/2)}determineDataLimits(){const{min:e,max:a}=this.getMinMax(!1);this.min=isNumberFinite(e)&&!isNaN(e)?e:0,this.max=isNumberFinite(a)&&!isNaN(a)?a:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/getTickBackdropHeight(this.options))}generateTickLabels(e){LinearScaleBase.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((a,n)=>{const r=callback(this.options.pointLabels.callback,[a,n],this);return r||r===0?r:""}).filter((a,n)=>this.chart.getDataVisibility(n))}fit(){const e=this.options;e.display&&e.pointLabels.display?fitWithPointLabels(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,a,n,r){this.xCenter+=Math.floor((e-a)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,a,n,r))}getIndexAngle(e){const a=TAU/(this._pointLabels.length||1),n=this.options.startAngle||0;return _normalizeAngle(e*a+toRadians(n))}getDistanceFromCenterForValue(e){if(isNullOrUndef(e))return NaN;const a=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*a:(e-this.min)*a}getValueForDistanceFromCenter(e){if(isNullOrUndef(e))return NaN;const a=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-a:this.min+a}getPointLabelContext(e){const a=this._pointLabels||[];if(e>=0&&e<a.length){const n=a[e];return createPointLabelContext(this.getContext(),e,n)}}getPointPosition(e,a,n=0){const r=this.getIndexAngle(e)-HALF_PI+n;return{x:Math.cos(r)*a+this.xCenter,y:Math.sin(r)*a+this.yCenter,angle:r}}getPointPositionForValue(e,a){return this.getPointPosition(e,this.getDistanceFromCenterForValue(a))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:a,top:n,right:r,bottom:i}=this._pointLabelItems[e];return{left:a,top:n,right:r,bottom:i}}drawBackground(){const{backgroundColor:e,grid:{circular:a}}=this.options;if(e){const n=this.ctx;n.save(),n.beginPath(),pathRadiusLine(this,this.getDistanceFromCenterForValue(this._endValue),a,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const e=this.ctx,a=this.options,{angleLines:n,grid:r,border:i}=a,o=this._pointLabels.length;let s,l,u;if(a.pointLabels.display&&drawPointLabels(this,o),r.display&&this.ticks.forEach((c,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(c.value);const h=this.getContext(d),m=r.setContext(h),p=i.setContext(h);drawRadiusLine(this,m,l,o,p)}}),n.display){for(e.save(),s=o-1;s>=0;s--){const c=n.setContext(this.getPointLabelContext(s)),{color:d,lineWidth:h}=c;!h||!d||(e.lineWidth=h,e.strokeStyle=d,e.setLineDash(c.borderDash),e.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(a.ticks.reverse?this.min:this.max),u=this.getPointPosition(s,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,a=this.options,n=a.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let i,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!a.reverse)return;const u=n.setContext(this.getContext(l)),c=toFont(u.font);if(i=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){e.font=c.string,o=e.measureText(s.label).width,e.fillStyle=u.backdropColor;const d=toPadding(u.backdropPadding);e.fillRect(-o/2-d.left,-i-c.size/2-d.top,o+d.width,c.size+d.height)}renderText(e,s.label,0,-i,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}}R(RadialLinearScale,"id","radialLinear"),R(RadialLinearScale,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ticks.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),R(RadialLinearScale,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),R(RadialLinearScale,"descriptors",{angleLines:{_fallback:"grid"}});const INTERVALS={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},UNITS=Object.keys(INTERVALS);function sorter(t,e){return t-e}function parse(t,e){if(isNullOrUndef(e))return null;const a=t._adapter,{parser:n,round:r,isoWeekday:i}=t._parseOpts;let o=e;return typeof n=="function"&&(o=n(o)),isNumberFinite(o)||(o=typeof n=="string"?a.parse(o,n):a.parse(o)),o===null?null:(r&&(o=r==="week"&&(isNumber(i)||i===!0)?a.startOf(o,"isoWeek",i):a.startOf(o,r)),+o)}function determineUnitForAutoTicks(t,e,a,n){const r=UNITS.length;for(let i=UNITS.indexOf(t);i<r-1;++i){const o=INTERVALS[UNITS[i]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((a-e)/(s*o.size))<=n)return UNITS[i]}return UNITS[r-1]}function determineUnitForFormatting(t,e,a,n,r){for(let i=UNITS.length-1;i>=UNITS.indexOf(a);i--){const o=UNITS[i];if(INTERVALS[o].common&&t._adapter.diff(r,n,o)>=e-1)return o}return UNITS[a?UNITS.indexOf(a):0]}function determineMajorUnit(t){for(let e=UNITS.indexOf(t)+1,a=UNITS.length;e<a;++e)if(INTERVALS[UNITS[e]].common)return UNITS[e]}function addTick(t,e,a){if(!a)t[e]=!0;else if(a.length){const{lo:n,hi:r}=_lookup(a,e),i=a[n]>=e?a[n]:a[r];t[i]=!0}}function setMajorTicks(t,e,a,n){const r=t._adapter,i=+r.startOf(e[0].value,n),o=e[e.length-1].value;let s,l;for(s=i;s<=o;s=+r.add(s,1,n))l=a[s],l>=0&&(e[l].major=!0);return e}function ticksFromTimestamps(t,e,a){const n=[],r={},i=e.length;let o,s;for(o=0;o<i;++o)s=e[o],r[s]=o,n.push({value:s,major:!1});return i===0||!a?n:setMajorTicks(t,n,r,a)}class TimeScale extends Scale{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,a={}){const n=e.time||(e.time={}),r=this._adapter=new adapters._date(e.adapters.date);r.init(a),mergeIf(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=a.normalized}parse(e,a){return e===void 0?null:parse(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,a=this._adapter,n=e.time.unit||"day";let{min:r,max:i,minDefined:o,maxDefined:s}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(r=Math.min(r,u.min)),!s&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!o||!s)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=isNumberFinite(r)&&!isNaN(r)?r:+a.startOf(Date.now(),n),i=isNumberFinite(i)&&!isNaN(i)?i:+a.endOf(Date.now(),n)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(a=e[0],n=e[e.length-1]),{min:a,max:n}}buildTicks(){const e=this.options,a=e.time,n=e.ticks,r=n.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,o=this.max,s=_filterBetween(r,i,o);return this._unit=a.unit||(n.autoSkip?determineUnitForAutoTicks(a.minUnit,this.min,this.max,this._getLabelCapacity(i)):determineUnitForFormatting(this,s.length,a.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:determineMajorUnit(this._unit),this.initOffsets(r),e.reverse&&s.reverse(),ticksFromTimestamps(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let a=0,n=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?a=1-r:a=(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?n=i:n=(i-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;a=_limitValue(a,0,o),n=_limitValue(n,0,o),this._offsets={start:a,end:n,factor:1/(a+1+n)}}_generate(){const e=this._adapter,a=this.min,n=this.max,r=this.options,i=r.time,o=i.unit||determineUnitForAutoTicks(i.minUnit,a,n,this._getLabelCapacity(a)),s=valueOrDefault(r.ticks.stepSize,1),l=o==="week"?i.isoWeekday:!1,u=isNumber(l)||l===!0,c={};let d=a,h,m;if(u&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,u?"day":o),e.diff(n,a,o)>1e5*s)throw new Error(a+" and "+n+" are too far apart with stepSize of "+s+" "+o);const p=r.ticks.source==="data"&&this.getDataTimestamps();for(h=d,m=0;h<n;h=+e.add(h,s,o),m++)addTick(c,h,p);return(h===n||r.bounds==="ticks"||m===1)&&addTick(c,h,p),Object.keys(c).sort(sorter).map(v=>+v)}getLabelForValue(e){const a=this._adapter,n=this.options.time;return n.tooltipFormat?a.format(e,n.tooltipFormat):a.format(e,n.displayFormats.datetime)}format(e,a){const r=this.options.time.displayFormats,i=this._unit,o=a||r[i];return this._adapter.format(e,o)}_tickFormatFunction(e,a,n,r){const i=this.options,o=i.ticks.callback;if(o)return callback(o,[e,a,n],this);const s=i.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&s[l],d=u&&s[u],h=n[a],m=u&&d&&h&&h.major;return this._adapter.format(e,r||(m?d:c))}generateTickLabels(e){let a,n,r;for(a=0,n=e.length;a<n;++a)r=e[a],r.label=this._tickFormatFunction(r.value,a,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const a=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((a.start+n)*a.factor)}getValueForPixel(e){const a=this._offsets,n=this.getDecimalForPixel(e)/a.factor-a.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const a=this.options.ticks,n=this.ctx.measureText(e).width,r=toRadians(this.isHorizontal()?a.maxRotation:a.minRotation),i=Math.cos(r),o=Math.sin(r),s=this._resolveTickFontOptions(0).size;return{w:n*i+s*o,h:n*o+s*i}}_getLabelCapacity(e){const a=this.options.time,n=a.displayFormats,r=n[a.unit]||n.millisecond,i=this._tickFormatFunction(e,0,ticksFromTimestamps(this,[e],this._majorUnit),r),o=this._getLabelSize(i),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let e=this._cache.data||[],a,n;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(a=0,n=r.length;a<n;++a)e=e.concat(r[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let a,n;if(e.length)return e;const r=this.getLabels();for(a=0,n=r.length;a<n;++a)e.push(parse(this,r[a]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return _arrayUnique(e.sort(sorter))}}R(TimeScale,"id","time"),R(TimeScale,"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 interpolate$1(t,e,a){let n=0,r=t.length-1,i,o,s,l;a?(e>=t[n].pos&&e<=t[r].pos&&({lo:n,hi:r}=_lookupByKey(t,"pos",e)),{pos:i,time:s}=t[n],{pos:o,time:l}=t[r]):(e>=t[n].time&&e<=t[r].time&&({lo:n,hi:r}=_lookupByKey(t,"time",e)),{time:i,pos:s}=t[n],{time:o,pos:l}=t[r]);const u=o-i;return u?s+(l-s)*(e-i)/u:s}class TimeSeriesScale extends TimeScale{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(e);this._minPos=interpolate$1(a,this.min),this._tableRange=interpolate$1(a,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:a,max:n}=this,r=[],i=[];let o,s,l,u,c;for(o=0,s=e.length;o<s;++o)u=e[o],u>=a&&u<=n&&r.push(u);if(r.length<2)return[{time:a,pos:0},{time:n,pos:1}];for(o=0,s=r.length;o<s;++o)c=r[o+1],l=r[o-1],u=r[o],Math.round((c+l)/2)!==u&&i.push({time:u,pos:o/(s-1)});return i}_generate(){const e=this.min,a=this.max;let n=super.getDataTimestamps();return(!n.includes(e)||!n.length)&&n.splice(0,0,e),(!n.includes(a)||n.length===1)&&n.push(a),n.sort((r,i)=>r-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const a=this.getDataTimestamps(),n=this.getLabelTimestamps();return a.length&&n.length?e=this.normalize(a.concat(n)):e=a.length?a:n,e=this._cache.all=e,e}getDecimalForValue(e){return(interpolate$1(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const a=this._offsets,n=this.getDecimalForPixel(e)/a.factor-a.end;return interpolate$1(this._table,n*this._tableRange+this._minPos,!0)}}R(TimeSeriesScale,"id","timeseries"),R(TimeSeriesScale,"defaults",TimeScale.defaults);function getDefaultChartSettings(t){return t==="sankey"?{type:"sankey",data:{datasets:[]}}:t==="pie"?{type:"pie",data:{datasets:[]}}:t==="column"?{type:"bar",data:{labels:[],datasets:[]},options:{plugins:{tooltip:{callbacks:{label:function(e){let a=e.dataset.currency_code;return formatMoney(e.raw,a)}}}},maintainAspectRatio:!1,scales:{}}}:t==="line"?{options:{plugins:{tooltip:{callbacks:{label:function(e){let a=e.dataset.currency_code;return formatMoney(e.raw,a)}}}},maintainAspectRatio:!1,scales:{x:{type:"time",time:{tooltipFormat:"PP"}}}},type:"line",data:{labels:[],datasets:[]}}:{}}let blue=new Color("#36a2eb"),red=new Color("#ff6384"),green=new Color("#4bc0c0"),orange=new Color("#ff9f40"),purple=new Color("#9966ff"),yellow=new Color("#ffcd56"),grey=new Color("#c9cbcf"),index=0;window.theme==="dark"&&(red.darken(.3).desaturate(.3),green.darken(.3).desaturate(.3),blue.darken(.3).desaturate(.3),orange.darken(.3).desaturate(.3));let allColors=[red,orange,blue,green,purple,yellow,grey,green];function getColors(t,e){let a={borderColor:red.rgbString(),backgroundColor:red.rgbString()},n;switch(t){default:let i=Math.floor(index/2)%allColors.length;n=new Color(allColors[i].rgbString()),n.lighten(.38),a={borderColor:allColors[i].hexString(),backgroundColor:n.hexString()};break;case"spent":n=new Color(blue.rgbString()),n.lighten(.38),a={borderColor:blue.rgbString(),backgroundColor:n.rgbString()};break;case"left":n=new Color(green.rgbString()),n.lighten(.38),a={borderColor:green.rgbString(),backgroundColor:n.rgbString()};break;case"overspent":n=new Color(red.rgbString()),n.lighten(.22),a={borderColor:red.rgbString(),backgroundColor:n.rgbString()};break}return index++,e==="border"?a.borderColor:e==="background"?a.backgroundColor:"#FF0000"}let currencies$2=[],chart$4=null,chartData$2=null,afterPromises$5=!1;const CHART_CACHE_KEY="dashboard-accounts-chart",ACCOUNTS_CACHE_KEY="dashboard-accounts-data",accounts=()=>({loading:!1,loadingAccounts:!1,accountList:[],autoConversion:!1,chartOptions:null,switchAutoConversion(){this.autoConversion=!this.autoConversion,setVariable("autoConversion",this.autoConversion)},getFreshData(){const t=window.store.get("cacheValid");let e=window.store.get(CHART_CACHE_KEY);if(t&&typeof e<"u"){this.drawChart(this.generateOptions(e)),this.loading=!1;return}new Dashboard$2().dashboard(new Date(window.store.get("start")),new Date(window.store.get("end")),null).then(n=>{this.chartData=n.data,window.store.set(CHART_CACHE_KEY,n.data),this.drawChart(this.generateOptions(this.chartData)),this.loading=!1})},generateOptions(t){currencies$2=[];let e=getDefaultChartSettings("line");for(let a=0;a<t.length;a++)if(t.hasOwnProperty(a)){let n="y",r=t[a],i={},o=[];a===0&&(e.data.labels=Object.keys(r.entries)),i.label=r.label,this.autoConversion&&(currencies$2.push(r.native_code),i.currency_code=r.native_code,o=Object.values(r.native_entries),n="y"+r.native_code),this.autoConversion||(n="y"+r.currency_code,i.currency_code=r.currency_code,currencies$2.push(r.currency_code),o=Object.values(r.entries)),i.yAxisID=n,i.data=o,e.data.datasets.push(i)}for(let a in currencies$2)if(currencies$2.hasOwnProperty(a)){let n="y"+currencies$2[a];e.options.scales.hasOwnProperty(n)||(e.options.scales[n]={id:a,type:"linear",position:parseInt(a)===1?"right":"left",ticks:{callback:function(r,i,o){return formatMoney(r,currencies$2[a])}}})}return e},loadChart(){if(this.loading!==!0){if(this.loading=!0,chartData$2===null){this.getFreshData();return}this.drawChart(this.generateOptions(chartData$2)),this.loading=!1}},drawChart(t){if(chart$4!==null){chart$4.options=t.options,chart$4.data=t.data,chart$4.update();return}chart$4=new Chart(document.querySelector("#account-chart"),t)},loadAccounts(){if(this.loadingAccounts===!0)return;if(this.loadingAccounts=!0,this.accountList.length>0){this.loadingAccounts=!1;return}const t=window.store.get("cacheValid");let e=window.store.get(ACCOUNTS_CACHE_KEY);if(t&&typeof e<"u"){this.accountList=e,this.loadingAccounts=!1;return}const a=10;let n=0,r=0,i=[];Promise.all([getVariable("frontpageAccounts")]).then(o=>{n=o[0].length;for(let s in o[0]){let l=o[0];if(l.hasOwnProperty(s)){let u=l[s];new Get$3().get(u,new Date(window.store.get("end"))).then(c=>{let d=c.data.data;new Get$3().transactions(d.id,1).then(h=>{let m=[];for(let p=0;p<h.data.data.length&&!(p>=a);p++){let v=h.data.data[p],y={title:v.attributes.group_title===null?"":v.attributes.group_title,id:v.id,transactions:[]};for(let w=0;w<v.attributes.transactions.length;w++){let _=v.attributes.transactions[w];y.transactions.push({description:_.description,id:v.id,type:_.type,amount_raw:parseFloat(_.amount),amount:formatMoney(_.amount,_.currency_code),native_amount_raw:parseFloat(_.native_amount),native_amount:formatMoney(_.native_amount,_.native_code)})}m.push(y)}i.push({name:d.attributes.name,order:d.attributes.order,id:d.id,balance_raw:parseFloat(d.attributes.current_balance),balance:formatMoney(d.attributes.current_balance,d.attributes.currency_code),native_balance_raw:parseFloat(d.attributes.native_current_balance),native_balance:formatMoney(d.attributes.native_current_balance,d.attributes.native_code),groups:m}),r++,r===n&&(i.sort((p,v)=>p.order-v.order),this.accountList=i,this.loadingAccounts=!1,window.store.set(ACCOUNTS_CACHE_KEY,i))})})}}})},init(){Promise.all([getVariable("viewRange","1M"),getVariable("autoConversion",!1),getVariable("language","en-US")]).then(t=>{this.autoConversion=t[1],afterPromises$5=!0,this.loadChart(),this.loadAccounts()}),window.store.observe("end",()=>{afterPromises$5&&(chartData$2=null,this.accountList=[],this.loadChart(),this.loadAccounts())}),window.store.observe("autoConversion",()=>{afterPromises$5&&(this.loadChart(),this.loadAccounts())})}});let Dashboard$1=class{dashboard(e,a){let n=format$1(e,"y-MM-dd"),r=format$1(a,"y-MM-dd");return api.get("/api/v2/chart/budget/dashboard",{params:{start:n,end:r}})}};var isArray$a=Array.isArray,isArray_1=isArray$a,freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$8=freeGlobal||freeSelf||Function("return this")(),_root=root$8,root$7=_root,Symbol$6=root$7.Symbol,_Symbol=Symbol$6,Symbol$5=_Symbol,objectProto$d=Object.prototype,hasOwnProperty$a=objectProto$d.hasOwnProperty,nativeObjectToString$1=objectProto$d.toString,symToStringTag$1=Symbol$5?Symbol$5.toStringTag:void 0;function getRawTag$1(t){var e=hasOwnProperty$a.call(t,symToStringTag$1),a=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var n=!0}catch{}var r=nativeObjectToString$1.call(t);return n&&(e?t[symToStringTag$1]=a:delete t[symToStringTag$1]),r}var _getRawTag=getRawTag$1,objectProto$c=Object.prototype,nativeObjectToString=objectProto$c.toString;function objectToString$1(t){return nativeObjectToString.call(t)}var _objectToString=objectToString$1,Symbol$4=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$4?Symbol$4.toStringTag:void 0;function baseGetTag$5(t){return t==null?t===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(t)?getRawTag(t):objectToString(t)}var _baseGetTag=baseGetTag$5;function isObjectLike$5(t){return t!=null&&typeof t=="object"}var isObjectLike_1=isObjectLike$5,baseGetTag$4=_baseGetTag,isObjectLike$4=isObjectLike_1,symbolTag$1="[object Symbol]";function isSymbol$5(t){return typeof t=="symbol"||isObjectLike$4(t)&&baseGetTag$4(t)==symbolTag$1}var isSymbol_1=isSymbol$5,isArray$9=isArray_1,isSymbol$4=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$3(t,e){if(isArray$9(t))return!1;var a=typeof t;return a=="number"||a=="symbol"||a=="boolean"||t==null||isSymbol$4(t)?!0:reIsPlainProp.test(t)||!reIsDeepProp.test(t)||e!=null&&t in Object(e)}var _isKey=isKey$3;function isObject$6(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var isObject_1=isObject$6;const isObject$7=getDefaultExportFromCjs(isObject_1);var baseGetTag$3=_baseGetTag,isObject$5=isObject_1,asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(t){if(!isObject$5(t))return!1;var e=baseGetTag$3(t);return e==funcTag$1||e==genTag||e==asyncTag||e==proxyTag}var isFunction_1=isFunction$2,root$6=_root,coreJsData$1=root$6["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var t=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function isMasked$1(t){return!!maskSrcKey&&maskSrcKey in t}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$2(t){if(t!=null){try{return funcToString$1.call(t)}catch{}try{return t+""}catch{}}return""}var _toSource=toSource$2,isFunction$1=isFunction_1,isMasked=_isMasked,isObject$4=isObject_1,toSource$1=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$b=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$9=objectProto$b.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$9).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(t){if(!isObject$4(t)||isMasked(t))return!1;var e=isFunction$1(t)?reIsNative:reIsHostCtor;return e.test(toSource$1(t))}var _baseIsNative=baseIsNative$1;function getValue$1(t,e){return t==null?void 0:t[e]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$7(t,e){var a=getValue(t,e);return baseIsNative(a)?a:void 0}var _getNative=getNative$7,getNative$6=_getNative,nativeCreate$4=getNative$6(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$a=Object.prototype,hasOwnProperty$8=objectProto$a.hasOwnProperty;function hashGet$1(t){var e=this.__data__;if(nativeCreate$2){var a=e[t];return a===HASH_UNDEFINED$2?void 0:a}return hasOwnProperty$8.call(e,t)?e[t]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$9=Object.prototype,hasOwnProperty$7=objectProto$9.hasOwnProperty;function hashHas$1(t){var e=this.__data__;return nativeCreate$1?e[t]!==void 0:hasOwnProperty$7.call(e,t)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet$1(t,e){var a=this.__data__;return this.size+=this.has(t)?0:1,a[t]=nativeCreate&&e===void 0?HASH_UNDEFINED$1:e,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(t){var e=-1,a=t==null?0:t.length;for(this.clear();++e<a;){var n=t[e];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear;Hash$1.prototype.delete=hashDelete;Hash$1.prototype.get=hashGet;Hash$1.prototype.has=hashHas;Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$4(t,e){return t===e||t!==t&&e!==e}var eq_1=eq$4,eq$3=eq_1;function assocIndexOf$4(t,e){for(var a=t.length;a--;)if(eq$3(t[a][0],e))return a;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(t){var e=this.__data__,a=assocIndexOf$3(e,t);if(a<0)return!1;var n=e.length-1;return a==n?e.pop():splice.call(e,a,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(t){var e=this.__data__,a=assocIndexOf$2(e,t);return a<0?void 0:e[a][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(t){return assocIndexOf$1(this.__data__,t)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(t,e){var a=this.__data__,n=assocIndexOf(a,t);return n<0?(++this.size,a.push([t,e])):a[n][1]=e,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(t){var e=-1,a=t==null?0:t.length;for(this.clear();++e<a;){var n=t[e];this.set(n[0],n[1])}}ListCache$4.prototype.clear=listCacheClear;ListCache$4.prototype.delete=listCacheDelete;ListCache$4.prototype.get=listCacheGet;ListCache$4.prototype.has=listCacheHas;ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,getNative$5=_getNative,root$5=_root,Map$4=getNative$5(root$5,"Map"),_Map=Map$4,Hash=_Hash,ListCache$3=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$3),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(t,e){var a=t.__data__;return isKeyable(e)?a[typeof e=="string"?"string":"hash"]:a.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(t){var e=getMapData$3(this,t).delete(t);return this.size-=e?1:0,e}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(t){return getMapData$2(this,t).get(t)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(t){return getMapData$1(this,t).has(t)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(t,e){var a=getMapData(this,t),n=a.size;return a.set(t,e),this.size+=a.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$3(t){var e=-1,a=t==null?0:t.length;for(this.clear();++e<a;){var n=t[e];this.set(n[0],n[1])}}MapCache$3.prototype.clear=mapCacheClear;MapCache$3.prototype.delete=mapCacheDelete;MapCache$3.prototype.get=mapCacheGet;MapCache$3.prototype.has=mapCacheHas;MapCache$3.prototype.set=mapCacheSet;var _MapCache=MapCache$3,MapCache$2=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(FUNC_ERROR_TEXT);var a=function(){var n=arguments,r=e?e.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=t.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(memoize$1.Cache||MapCache$2),a}memoize$1.Cache=MapCache$2;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(t){var e=memoize(t,function(n){return a.size===MAX_MEMOIZE_SIZE&&a.clear(),n}),a=e.cache;return e}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(rePropName,function(a,n,r,i){e.push(r?i.replace(reEscapeChar,"$1"):n||a)}),e}),_stringToPath=stringToPath$1;function arrayMap$2(t,e){for(var a=-1,n=t==null?0:t.length,r=Array(n);++a<n;)r[a]=e(t[a],a,t);return r}var _arrayMap=arrayMap$2,Symbol$3=_Symbol,arrayMap$1=_arrayMap,isArray$8=isArray_1,isSymbol$3=isSymbol_1,INFINITY$4=1/0,symbolProto$1=Symbol$3?Symbol$3.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString$1(t){if(typeof t=="string")return t;if(isArray$8(t))return arrayMap$1(t,baseToString$1)+"";if(isSymbol$3(t))return symbolToString?symbolToString.call(t):"";var e=t+"";return e=="0"&&1/t==-INFINITY$4?"-0":e}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$6(t){return t==null?"":baseToString(t)}var toString_1=toString$6,isArray$7=isArray_1,isKey$2=_isKey,stringToPath=_stringToPath,toString$5=toString_1;function castPath$3(t,e){return isArray$7(t)?t:isKey$2(t,e)?[t]:stringToPath(toString$5(t))}var _castPath=castPath$3,isSymbol$2=isSymbol_1,INFINITY$3=1/0;function toKey$5(t){if(typeof t=="string"||isSymbol$2(t))return t;var e=t+"";return e=="0"&&1/t==-INFINITY$3?"-0":e}var _toKey=toKey$5,castPath$2=_castPath,toKey$4=_toKey;function baseGet$3(t,e){e=castPath$2(e,t);for(var a=0,n=e.length;t!=null&&a<n;)t=t[toKey$4(e[a++])];return a&&a==n?t:void 0}var _baseGet=baseGet$3,baseGet$2=_baseGet;function get$1(t,e,a){var n=t==null?void 0:baseGet$2(t,e);return n===void 0?a:n}var get_1=get$1;const get$2=getDefaultExportFromCjs(get_1);var objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function baseHas$1(t,e){return t!=null&&hasOwnProperty$6.call(t,e)}var _baseHas=baseHas$1,baseGetTag$2=_baseGetTag,isObjectLike$3=isObjectLike_1,argsTag$2="[object Arguments]";function baseIsArguments$1(t){return isObjectLike$3(t)&&baseGetTag$2(t)==argsTag$2}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$2=isObjectLike_1,objectProto$7=Object.prototype,hasOwnProperty$5=objectProto$7.hasOwnProperty,propertyIsEnumerable$1=objectProto$7.propertyIsEnumerable,isArguments$3=baseIsArguments(function(){return arguments}())?baseIsArguments:function(t){return isObjectLike$2(t)&&hasOwnProperty$5.call(t,"callee")&&!propertyIsEnumerable$1.call(t,"callee")},isArguments_1=isArguments$3,MAX_SAFE_INTEGER$3=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$4(t,e){var a=typeof t;return e=e??MAX_SAFE_INTEGER$3,!!e&&(a=="number"||a!="symbol"&&reIsUint.test(t))&&t>-1&&t%1==0&&t<e}var _isIndex=isIndex$4,MAX_SAFE_INTEGER$2=9007199254740991;function isLength$3(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER$2}var isLength_1=isLength$3,castPath$1=_castPath,isArguments$2=isArguments_1,isArray$6=isArray_1,isIndex$3=_isIndex,isLength$2=isLength_1,toKey$3=_toKey;function hasPath$2(t,e,a){e=castPath$1(e,t);for(var n=-1,r=e.length,i=!1;++n<r;){var o=toKey$3(e[n]);if(!(i=t!=null&&a(t,o)))break;t=t[o]}return i||++n!=r?i:(r=t==null?0:t.length,!!r&&isLength$2(r)&&isIndex$3(o,r)&&(isArray$6(t)||isArguments$2(t)))}var _hasPath=hasPath$2,baseHas=_baseHas,hasPath$1=_hasPath;function has(t,e){return t!=null&&hasPath$1(t,e,baseHas)}var has_1=has;const has$1=getDefaultExportFromCjs(has_1);var getNative$4=_getNative,defineProperty$2=function(){try{var t=getNative$4(Object,"defineProperty");return t({},"",{}),t}catch{}}(),_defineProperty=defineProperty$2,defineProperty$1=_defineProperty;function baseAssignValue$1(t,e,a){e=="__proto__"&&defineProperty$1?defineProperty$1(t,e,{configurable:!0,enumerable:!0,value:a,writable:!0}):t[e]=a}var _baseAssignValue=baseAssignValue$1,baseAssignValue=_baseAssignValue,eq$2=eq_1,objectProto$6=Object.prototype,hasOwnProperty$4=objectProto$6.hasOwnProperty;function assignValue$2(t,e,a){var n=t[e];(!(hasOwnProperty$4.call(t,e)&&eq$2(n,a))||a===void 0&&!(e in t))&&baseAssignValue(t,e,a)}var _assignValue=assignValue$2,assignValue$1=_assignValue,castPath=_castPath,isIndex$2=_isIndex,isObject$3=isObject_1,toKey$2=_toKey;function baseSet$2(t,e,a,n){if(!isObject$3(t))return t;e=castPath(e,t);for(var r=-1,i=e.length,o=i-1,s=t;s!=null&&++r<i;){var l=toKey$2(e[r]),u=a;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(r!=o){var c=s[l];u=n?n(c,l,s):void 0,u===void 0&&(u=isObject$3(c)?c:isIndex$2(e[r+1])?[]:{})}assignValue$1(s,l,u),s=s[l]}return t}var _baseSet=baseSet$2,baseSet$1=_baseSet;function set(t,e,a){return t==null?t:baseSet$1(t,e,a)}var set_1=set;const set$1=getDefaultExportFromCjs(set_1);var baseSet=_baseSet;function setWith(t,e,a,n){return n=typeof n=="function"?n:void 0,t==null?t:baseSet(t,e,a,n)}var setWith_1=setWith;const setWith$1=getDefaultExportFromCjs(setWith_1);var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(t){return this.__data__.set(t,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(t){return this.__data__.has(t)}var _setCacheHas=setCacheHas$1,MapCache$1=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$2(t){var e=-1,a=t==null?0:t.length;for(this.__data__=new MapCache$1;++e<a;)this.add(t[e])}SetCache$2.prototype.add=SetCache$2.prototype.push=setCacheAdd;SetCache$2.prototype.has=setCacheHas;var _SetCache=SetCache$2;function baseFindIndex$1(t,e,a,n){for(var r=t.length,i=a+(n?1:-1);n?i--:++i<r;)if(e(t[i],i,t))return i;return-1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(t){return t!==t}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(t,e,a){for(var n=a-1,r=t.length;++n<r;)if(t[n]===e)return n;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$1(t,e,a){return e===e?strictIndexOf(t,e,a):baseFindIndex(t,baseIsNaN,a)}var _baseIndexOf=baseIndexOf$1,baseIndexOf=_baseIndexOf;function arrayIncludes$1(t,e){var a=t==null?0:t.length;return!!a&&baseIndexOf(t,e,0)>-1}var _arrayIncludes=arrayIncludes$1;function arrayIncludesWith$1(t,e,a){for(var n=-1,r=t==null?0:t.length;++n<r;)if(a(e,t[n]))return!0;return!1}var _arrayIncludesWith=arrayIncludesWith$1;function cacheHas$2(t,e){return t.has(e)}var _cacheHas=cacheHas$2,getNative$3=_getNative,root$4=_root,Set$3=getNative$3(root$4,"Set"),_Set=Set$3;function noop$1(){}var noop_1=noop$1;function setToArray$3(t){var e=-1,a=Array(t.size);return t.forEach(function(n){a[++e]=n}),a}var _setToArray=setToArray$3,Set$2=_Set,noop=noop_1,setToArray$2=_setToArray,INFINITY$2=1/0,createSet$1=Set$2&&1/setToArray$2(new Set$2([,-0]))[1]==INFINITY$2?function(t){return new Set$2(t)}:noop,_createSet=createSet$1,SetCache$1=_SetCache,arrayIncludes=_arrayIncludes,arrayIncludesWith=_arrayIncludesWith,cacheHas$1=_cacheHas,createSet=_createSet,setToArray$1=_setToArray,LARGE_ARRAY_SIZE$1=200;function baseUniq$1(t,e,a){var n=-1,r=arrayIncludes,i=t.length,o=!0,s=[],l=s;if(a)o=!1,r=arrayIncludesWith;else if(i>=LARGE_ARRAY_SIZE$1){var u=e?null:createSet(t);if(u)return setToArray$1(u);o=!1,r=cacheHas$1,l=new SetCache$1}else l=e?[]:s;e:for(;++n<i;){var c=t[n],d=e?e(c):c;if(c=a||c!==0?c:0,o&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;e&&l.push(d),s.push(c)}else r(l,d,a)||(l!==s&&l.push(d),s.push(c))}return s}var _baseUniq=baseUniq$1,baseUniq=_baseUniq;function uniq(t){return t&&t.length?baseUniq(t):[]}var uniq_1=uniq;const uniq$1=getDefaultExportFromCjs(uniq_1),defaultLocaleResolver=(t,e)=>{const a=[],n=[];return a.push(e),e||a.push(t.locale),t.enableFallback&&a.push(t.defaultLocale),a.filter(Boolean).map(r=>r.toString()).forEach(function(r){if(n.includes(r)||n.push(r),!t.enableFallback)return;const i=r.split("-");i.length===3&&n.push(`${i[0]}-${i[1]}`),n.push(i[0])}),uniq$1(n)};class Locales{constructor(e){this.i18n=e,this.registry={},this.register("default",defaultLocaleResolver)}register(e,a){if(typeof a!="function"){const n=a;a=()=>n}this.registry[e]=a}get(e){let a=this.registry[e]||this.registry[this.i18n.locale]||this.registry.default;return typeof a=="function"&&(a=a(this.i18n,e)),a instanceof Array||(a=[a]),a}}const en=(t,e)=>{const a=String(t).split("."),n=!a[1],r=Number(a[0])==t,i=r&&a[0].slice(-1),o=r&&a[0].slice(-2);return e?i==1&&o!=11?"one":i==2&&o!=12?"two":i==3&&o!=13?"few":"other":t==1&&n?"one":"other"};function useMakePlural({pluralizer:t,includeZero:e=!0,ordinal:a=!1}){return function(n,r){return[e&&r===0?"zero":"",t(r,a)].filter(Boolean)}}const defaultPluralizer=useMakePlural({pluralizer:en,includeZero:!0});class Pluralization{constructor(e){this.i18n=e,this.registry={},this.register("default",defaultPluralizer)}register(e,a){this.registry[e]=a}get(e){return this.registry[e]||this.registry[this.i18n.locale]||this.registry.default}}function baseSlice$1(t,e,a){var n=-1,r=t.length;e<0&&(e=-e>r?0:r+e),a=a>r?r:a,a<0&&(a+=r),r=e>a?0:a-e>>>0,e>>>=0;for(var i=Array(r);++n<r;)i[n]=t[n+e];return i}var _baseSlice=baseSlice$1,baseSlice=_baseSlice;function castSlice$1(t,e,a){var n=t.length;return a=a===void 0?n:a,!e&&a>=n?t:baseSlice(t,e,a)}var _castSlice=castSlice$1,rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$3+reComboHalfMarksRange$3+rsComboSymbolsRange$3,rsVarRange$2="\\ufe0e\\ufe0f",rsZWJ$2="\\u200d",reHasUnicode=RegExp("["+rsZWJ$2+rsAstralRange$2+rsComboRange$3+rsVarRange$2+"]");function hasUnicode$2(t){return reHasUnicode.test(t)}var _hasUnicode=hasUnicode$2;function asciiToArray$1(t){return t.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsVarRange$1="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange$1+"]",rsCombo$2="["+rsComboRange$2+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$2+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsSymbol="(?:"+[rsNonAstral$1+rsCombo$2+"?",rsCombo$2,rsRegional$1,rsSurrPair$1,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz$1+"(?="+rsFitz$1+")|"+rsSymbol+rsSeq$1,"g");function unicodeToArray$1(t){return t.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode$1=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(t){return hasUnicode$1(t)?unicodeToArray(t):asciiToArray(t)}var _stringToArray=stringToArray$1,castSlice=_castSlice,hasUnicode=_hasUnicode,stringToArray=_stringToArray,toString$4=toString_1;function createCaseFirst$1(t){return function(e){e=toString$4(e);var a=hasUnicode(e)?stringToArray(e):void 0,n=a?a[0]:e.charAt(0),r=a?castSlice(a,1).join(""):e.slice(1);return n[t]()+r}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst$1=createCaseFirst("toUpperCase"),upperFirst_1=upperFirst$1,toString$3=toString_1,upperFirst=upperFirst_1;function capitalize$1(t){return upperFirst(toString$3(t).toLowerCase())}var capitalize_1=capitalize$1;function arrayReduce$1(t,e,a,n){var r=-1,i=t==null?0:t.length;for(n&&i&&(a=t[++r]);++r<i;)a=e(a,t[r],r,t);return a}var _arrayReduce=arrayReduce$1;function basePropertyOf$1(t){return function(e){return t==null?void 0:t[e]}}var _basePropertyOf=basePropertyOf$1,basePropertyOf=_basePropertyOf,deburredLetters={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},deburrLetter$1=basePropertyOf(deburredLetters),_deburrLetter=deburrLetter$1,deburrLetter=_deburrLetter,toString$2=toString_1,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsCombo$1="["+rsComboRange$1+"]",reComboMark=RegExp(rsCombo$1,"g");function deburr$1(t){return t=toString$2(t),t&&t.replace(reLatin,deburrLetter).replace(reComboMark,"")}var deburr_1=deburr$1,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function asciiWords$1(t){return t.match(reAsciiWord)||[]}var _asciiWords=asciiWords$1,reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function hasUnicodeWord$1(t){return reHasUnicodeWord.test(t)}var _hasUnicodeWord=hasUnicodeWord$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos$1="['’]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos$1+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos$1+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");function unicodeWords$1(t){return t.match(reUnicodeWord)||[]}var _unicodeWords=unicodeWords$1,asciiWords=_asciiWords,hasUnicodeWord=_hasUnicodeWord,toString$1=toString_1,unicodeWords=_unicodeWords;function words$1(t,e,a){return t=toString$1(t),e=a?void 0:e,e===void 0?hasUnicodeWord(t)?unicodeWords(t):asciiWords(t):t.match(e)||[]}var words_1=words$1,arrayReduce=_arrayReduce,deburr=deburr_1,words=words_1,rsApos="['’]",reApos=RegExp(rsApos,"g");function createCompounder$1(t){return function(e){return arrayReduce(words(deburr(e).replace(reApos,"")),t,"")}}var _createCompounder=createCompounder$1,capitalize=capitalize_1,createCompounder=_createCompounder,camelCase=createCompounder(function(t,e,a){return e=e.toLowerCase(),t+(a?capitalize(e):e)}),camelCase_1=camelCase;const camelCase$1=getDefaultExportFromCjs(camelCase_1);function camelCaseKeys(t){return t?Object.keys(t).reduce((e,a)=>(e[camelCase$1(a)]=t[a],e),{}):{}}function isSet(t){return t!=null}function createTranslationOptions(t,e,a){let n=[{scope:e}];if(isSet(a.defaults)&&(n=n.concat(a.defaults)),isSet(a.defaultValue)){const r=typeof a.defaultValue=="function"?a.defaultValue(t,e,a):a.defaultValue;n.push({message:r}),delete a.defaultValue}return n}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER$1=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(t){var e,a,n,r=_.prototype={constructor:_,toString:null,valueOf:null},i=new _(1),o=20,s=4,l=-7,u=21,c=-1e7,d=1e7,h=!1,m=1,p=0,v={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},y="0123456789abcdefghijklmnopqrstuvwxyz",w=!0;function _(g,b){var $,S,P,M,C,E,T,x,A=this;if(!(A instanceof _))return new _(g,b);if(b==null){if(g&&g._isBigNumber===!0){A.s=g.s,!g.c||g.e>d?A.c=A.e=null:g.e<c?A.c=[A.e=0]:(A.e=g.e,A.c=g.c.slice());return}if((E=typeof g=="number")&&g*0==0){if(A.s=1/g<0?(g=-g,-1):1,g===~~g){for(M=0,C=g;C>=10;C/=10,M++);M>d?A.c=A.e=null:(A.e=M,A.c=[g]);return}x=String(g)}else{if(!isNumeric.test(x=String(g)))return n(A,x,E);A.s=x.charCodeAt(0)==45?(x=x.slice(1),-1):1}(M=x.indexOf("."))>-1&&(x=x.replace(".","")),(C=x.search(/e/i))>0?(M<0&&(M=C),M+=+x.slice(C+1),x=x.substring(0,C)):M<0&&(M=x.length)}else{if(intCheck(b,2,y.length,"Base"),b==10&&w)return A=new _(g),N(A,o+A.e+1,s);if(x=String(g),E=typeof g=="number"){if(g*0!=0)return n(A,x,E,b);if(A.s=1/g<0?(x=x.slice(1),-1):1,_.DEBUG&&x.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+g)}else A.s=x.charCodeAt(0)===45?(x=x.slice(1),-1):1;for($=y.slice(0,b),M=C=0,T=x.length;C<T;C++)if($.indexOf(S=x.charAt(C))<0){if(S=="."){if(C>M){M=T;continue}}else if(!P&&(x==x.toUpperCase()&&(x=x.toLowerCase())||x==x.toLowerCase()&&(x=x.toUpperCase()))){P=!0,C=-1,M=0;continue}return n(A,String(g),E,b)}E=!1,x=a(x,b,10,A.s),(M=x.indexOf("."))>-1?x=x.replace(".",""):M=x.length}for(C=0;x.charCodeAt(C)===48;C++);for(T=x.length;x.charCodeAt(--T)===48;);if(x=x.slice(C,++T)){if(T-=C,E&&_.DEBUG&&T>15&&(g>MAX_SAFE_INTEGER$1||g!==mathfloor(g)))throw Error(tooManyDigits+A.s*g);if((M=M-C-1)>d)A.c=A.e=null;else if(M<c)A.c=[A.e=0];else{if(A.e=M,A.c=[],C=(M+1)%LOG_BASE,M<0&&(C+=LOG_BASE),C<T){for(C&&A.c.push(+x.slice(0,C)),T-=LOG_BASE;C<T;)A.c.push(+x.slice(C,C+=LOG_BASE));C=LOG_BASE-(x=x.slice(C)).length}else C-=T;for(;C--;x+="0");A.c.push(+x)}}else A.c=[A.e=0]}_.clone=clone,_.ROUND_UP=0,_.ROUND_DOWN=1,_.ROUND_CEIL=2,_.ROUND_FLOOR=3,_.ROUND_HALF_UP=4,_.ROUND_HALF_DOWN=5,_.ROUND_HALF_EVEN=6,_.ROUND_HALF_CEIL=7,_.ROUND_HALF_FLOOR=8,_.EUCLID=9,_.config=_.set=function(g){var b,$;if(g!=null)if(typeof g=="object"){if(g.hasOwnProperty(b="DECIMAL_PLACES")&&($=g[b],intCheck($,0,MAX,b),o=$),g.hasOwnProperty(b="ROUNDING_MODE")&&($=g[b],intCheck($,0,8,b),s=$),g.hasOwnProperty(b="EXPONENTIAL_AT")&&($=g[b],$&&$.pop?(intCheck($[0],-MAX,0,b),intCheck($[1],0,MAX,b),l=$[0],u=$[1]):(intCheck($,-MAX,MAX,b),l=-(u=$<0?-$:$))),g.hasOwnProperty(b="RANGE"))if($=g[b],$&&$.pop)intCheck($[0],-MAX,-1,b),intCheck($[1],1,MAX,b),c=$[0],d=$[1];else if(intCheck($,-MAX,MAX,b),$)c=-(d=$<0?-$:$);else throw Error(bignumberError+b+" cannot be zero: "+$);if(g.hasOwnProperty(b="CRYPTO"))if($=g[b],$===!!$)if($)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))h=$;else throw h=!$,Error(bignumberError+"crypto unavailable");else h=$;else throw Error(bignumberError+b+" not true or false: "+$);if(g.hasOwnProperty(b="MODULO_MODE")&&($=g[b],intCheck($,0,9,b),m=$),g.hasOwnProperty(b="POW_PRECISION")&&($=g[b],intCheck($,0,MAX,b),p=$),g.hasOwnProperty(b="FORMAT"))if($=g[b],typeof $=="object")v=$;else throw Error(bignumberError+b+" not an object: "+$);if(g.hasOwnProperty(b="ALPHABET"))if($=g[b],typeof $=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test($))w=$.slice(0,10)=="0123456789",y=$;else throw Error(bignumberError+b+" invalid: "+$)}else throw Error(bignumberError+"Object expected: "+g);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[l,u],RANGE:[c,d],CRYPTO:h,MODULO_MODE:m,POW_PRECISION:p,FORMAT:v,ALPHABET:y}},_.isBigNumber=function(g){if(!g||g._isBigNumber!==!0)return!1;if(!_.DEBUG)return!0;var b,$,S=g.c,P=g.e,M=g.s;e:if({}.toString.call(S)=="[object Array]"){if((M===1||M===-1)&&P>=-MAX&&P<=MAX&&P===mathfloor(P)){if(S[0]===0){if(P===0&&S.length===1)return!0;break e}if(b=(P+1)%LOG_BASE,b<1&&(b+=LOG_BASE),String(S[0]).length==b){for(b=0;b<S.length;b++)if($=S[b],$<0||$>=BASE||$!==mathfloor($))break e;if($!==0)return!0}}}else if(S===null&&P===null&&(M===null||M===1||M===-1))return!0;throw Error(bignumberError+"Invalid BigNumber: "+g)},_.maximum=_.max=function(){return k(arguments,-1)},_.minimum=_.min=function(){return k(arguments,1)},_.random=function(){var g=9007199254740992,b=Math.random()*g&2097151?function(){return mathfloor(Math.random()*g)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function($){var S,P,M,C,E,T=0,x=[],A=new _(i);if($==null?$=o:intCheck($,0,MAX),C=mathceil($/LOG_BASE),h)if(crypto.getRandomValues){for(S=crypto.getRandomValues(new Uint32Array(C*=2));T<C;)E=S[T]*131072+(S[T+1]>>>11),E>=9e15?(P=crypto.getRandomValues(new Uint32Array(2)),S[T]=P[0],S[T+1]=P[1]):(x.push(E%1e14),T+=2);T=C/2}else if(crypto.randomBytes){for(S=crypto.randomBytes(C*=7);T<C;)E=(S[T]&31)*281474976710656+S[T+1]*1099511627776+S[T+2]*4294967296+S[T+3]*16777216+(S[T+4]<<16)+(S[T+5]<<8)+S[T+6],E>=9e15?crypto.randomBytes(7).copy(S,T):(x.push(E%1e14),T+=7);T=C/7}else throw h=!1,Error(bignumberError+"crypto unavailable");if(!h)for(;T<C;)E=b(),E<9e15&&(x[T++]=E%1e14);for(C=x[--T],$%=LOG_BASE,C&&$&&(E=POWS_TEN[LOG_BASE-$],x[T]=mathfloor(C/E)*E);x[T]===0;x.pop(),T--);if(T<0)x=[M=0];else{for(M=-1;x[0]===0;x.splice(0,1),M-=LOG_BASE);for(T=1,E=x[0];E>=10;E/=10,T++);T<LOG_BASE&&(M-=LOG_BASE-T)}return A.e=M,A.c=x,A}}(),_.sum=function(){for(var g=1,b=arguments,$=new _(b[0]);g<b.length;)$=$.plus(b[g++]);return $},a=function(){var g="0123456789";function b($,S,P,M){for(var C,E=[0],T,x=0,A=$.length;x<A;){for(T=E.length;T--;E[T]*=S);for(E[0]+=M.indexOf($.charAt(x++)),C=0;C<E.length;C++)E[C]>P-1&&(E[C+1]==null&&(E[C+1]=0),E[C+1]+=E[C]/P|0,E[C]%=P)}return E.reverse()}return function($,S,P,M,C){var E,T,x,A,L,I,W,z,U=$.indexOf("."),B=o,V=s;for(U>=0&&(A=p,p=0,$=$.replace(".",""),z=new _(S),I=z.pow($.length-U),p=A,z.c=b(toFixedPoint(coeffToString(I.c),I.e,"0"),10,P,g),z.e=z.c.length),W=b($,S,P,C?(E=y,g):(E=g,y)),x=A=W.length;W[--A]==0;W.pop());if(!W[0])return E.charAt(0);if(U<0?--x:(I.c=W,I.e=x,I.s=M,I=e(I,z,B,V,P),W=I.c,L=I.r,x=I.e),T=x+B+1,U=W[T],A=P/2,L=L||T<0||W[T+1]!=null,L=V<4?(U!=null||L)&&(V==0||V==(I.s<0?3:2)):U>A||U==A&&(V==4||L||V==6&&W[T-1]&1||V==(I.s<0?8:7)),T<1||!W[0])$=L?toFixedPoint(E.charAt(1),-B,E.charAt(0)):E.charAt(0);else{if(W.length=T,L)for(--P;++W[--T]>P;)W[T]=0,T||(++x,W=[1].concat(W));for(A=W.length;!W[--A];);for(U=0,$="";U<=A;$+=E.charAt(W[U++]));$=toFixedPoint($,x,E.charAt(0))}return $}}(),e=function(){function g(S,P,M){var C,E,T,x,A=0,L=S.length,I=P%SQRT_BASE,W=P/SQRT_BASE|0;for(S=S.slice();L--;)T=S[L]%SQRT_BASE,x=S[L]/SQRT_BASE|0,C=W*T+x*I,E=I*T+C%SQRT_BASE*SQRT_BASE+A,A=(E/M|0)+(C/SQRT_BASE|0)+W*x,S[L]=E%M;return A&&(S=[A].concat(S)),S}function b(S,P,M,C){var E,T;if(M!=C)T=M>C?1:-1;else for(E=T=0;E<M;E++)if(S[E]!=P[E]){T=S[E]>P[E]?1:-1;break}return T}function $(S,P,M,C){for(var E=0;M--;)S[M]-=E,E=S[M]<P[M]?1:0,S[M]=E*C+S[M]-P[M];for(;!S[0]&&S.length>1;S.splice(0,1));}return function(S,P,M,C,E){var T,x,A,L,I,W,z,U,B,V,H,G,K,Y,J,Q,ee,Z=S.s==P.s?1:-1,X=S.c,q=P.c;if(!X||!X[0]||!q||!q[0])return new _(!S.s||!P.s||(X?q&&X[0]==q[0]:!q)?NaN:X&&X[0]==0||!q?Z*0:Z/0);for(U=new _(Z),B=U.c=[],x=S.e-P.e,Z=M+x+1,E||(E=BASE,x=bitFloor(S.e/LOG_BASE)-bitFloor(P.e/LOG_BASE),Z=Z/LOG_BASE|0),A=0;q[A]==(X[A]||0);A++);if(q[A]>(X[A]||0)&&x--,Z<0)B.push(1),L=!0;else{for(Y=X.length,Q=q.length,A=0,Z+=2,I=mathfloor(E/(q[0]+1)),I>1&&(q=g(q,I,E),X=g(X,I,E),Q=q.length,Y=X.length),K=Q,V=X.slice(0,Q),H=V.length;H<Q;V[H++]=0);ee=q.slice(),ee=[0].concat(ee),J=q[0],q[1]>=E/2&&J++;do{if(I=0,T=b(q,V,Q,H),T<0){if(G=V[0],Q!=H&&(G=G*E+(V[1]||0)),I=mathfloor(G/J),I>1)for(I>=E&&(I=E-1),W=g(q,I,E),z=W.length,H=V.length;b(W,V,z,H)==1;)I--,$(W,Q<z?ee:q,z,E),z=W.length,T=1;else I==0&&(T=I=1),W=q.slice(),z=W.length;if(z<H&&(W=[0].concat(W)),$(V,W,H,E),H=V.length,T==-1)for(;b(q,V,Q,H)<1;)I++,$(V,Q<H?ee:q,H,E),H=V.length}else T===0&&(I++,V=[0]);B[A++]=I,V[0]?V[H++]=X[K]||0:(V=[X[K]],H=1)}while((K++<Y||V[0]!=null)&&Z--);L=V[0]!=null,B[0]||B.splice(0,1)}if(E==BASE){for(A=1,Z=B[0];Z>=10;Z/=10,A++);N(U,M+(U.e=A+x*LOG_BASE-1)+1,C,L)}else U.e=x,U.r=+L;return U}}();function D(g,b,$,S){var P,M,C,E,T;if($==null?$=s:intCheck($,0,8),!g.c)return g.toString();if(P=g.c[0],C=g.e,b==null)T=coeffToString(g.c),T=S==1||S==2&&(C<=l||C>=u)?toExponential(T,C):toFixedPoint(T,C,"0");else if(g=N(new _(g),b,$),M=g.e,T=coeffToString(g.c),E=T.length,S==1||S==2&&(b<=M||M<=l)){for(;E<b;T+="0",E++);T=toExponential(T,M)}else if(b-=C,T=toFixedPoint(T,M,"0"),M+1>E){if(--b>0)for(T+=".";b--;T+="0");}else if(b+=M-E,b>0)for(M+1==E&&(T+=".");b--;T+="0");return g.s<0&&P?"-"+T:T}function k(g,b){for(var $,S,P=1,M=new _(g[0]);P<g.length;P++)S=new _(g[P]),(!S.s||($=compare(M,S))===b||$===0&&M.s===b)&&(M=S);return M}function O(g,b,$){for(var S=1,P=b.length;!b[--P];b.pop());for(P=b[0];P>=10;P/=10,S++);return($=S+$*LOG_BASE-1)>d?g.c=g.e=null:$<c?g.c=[g.e=0]:(g.e=$,g.c=b),g}n=function(){var g=/^(-?)0([xbo])(?=\w[\w.]*$)/i,b=/^([^.]+)\.$/,$=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,P=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(M,C,E,T){var x,A=E?C:C.replace(P,"");if(S.test(A))M.s=isNaN(A)?null:A<0?-1:1;else{if(!E&&(A=A.replace(g,function(L,I,W){return x=(W=W.toLowerCase())=="x"?16:W=="b"?2:8,!T||T==x?I:L}),T&&(x=T,A=A.replace(b,"$1").replace($,"0.$1")),C!=A))return new _(A,x);if(_.DEBUG)throw Error(bignumberError+"Not a"+(T?" base "+T:"")+" number: "+C);M.s=null}M.c=M.e=null}}();function N(g,b,$,S){var P,M,C,E,T,x,A,L=g.c,I=POWS_TEN;if(L){e:{for(P=1,E=L[0];E>=10;E/=10,P++);if(M=b-P,M<0)M+=LOG_BASE,C=b,T=L[x=0],A=mathfloor(T/I[P-C-1]%10);else if(x=mathceil((M+1)/LOG_BASE),x>=L.length)if(S){for(;L.length<=x;L.push(0));T=A=0,P=1,M%=LOG_BASE,C=M-LOG_BASE+1}else break e;else{for(T=E=L[x],P=1;E>=10;E/=10,P++);M%=LOG_BASE,C=M-LOG_BASE+P,A=C<0?0:mathfloor(T/I[P-C-1]%10)}if(S=S||b<0||L[x+1]!=null||(C<0?T:T%I[P-C-1]),S=$<4?(A||S)&&($==0||$==(g.s<0?3:2)):A>5||A==5&&($==4||S||$==6&&(M>0?C>0?T/I[P-C]:0:L[x-1])%10&1||$==(g.s<0?8:7)),b<1||!L[0])return L.length=0,S?(b-=g.e+1,L[0]=I[(LOG_BASE-b%LOG_BASE)%LOG_BASE],g.e=-b||0):L[0]=g.e=0,g;if(M==0?(L.length=x,E=1,x--):(L.length=x+1,E=I[LOG_BASE-M],L[x]=C>0?mathfloor(T/I[P-C]%I[C])*E:0),S)for(;;)if(x==0){for(M=1,C=L[0];C>=10;C/=10,M++);for(C=L[0]+=E,E=1;C>=10;C/=10,E++);M!=E&&(g.e++,L[0]==BASE&&(L[0]=1));break}else{if(L[x]+=E,L[x]!=BASE)break;L[x--]=0,E=1}for(M=L.length;L[--M]===0;L.pop());}g.e>d?g.c=g.e=null:g.e<c&&(g.c=[g.e=0])}return g}function F(g){var b,$=g.e;return $===null?g.toString():(b=coeffToString(g.c),b=$<=l||$>=u?toExponential(b,$):toFixedPoint(b,$,"0"),g.s<0?"-"+b:b)}return r.absoluteValue=r.abs=function(){var g=new _(this);return g.s<0&&(g.s=1),g},r.comparedTo=function(g,b){return compare(this,new _(g,b))},r.decimalPlaces=r.dp=function(g,b){var $,S,P,M=this;if(g!=null)return intCheck(g,0,MAX),b==null?b=s:intCheck(b,0,8),N(new _(M),g+M.e+1,b);if(!($=M.c))return null;if(S=((P=$.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,P=$[P])for(;P%10==0;P/=10,S--);return S<0&&(S=0),S},r.dividedBy=r.div=function(g,b){return e(this,new _(g,b),o,s)},r.dividedToIntegerBy=r.idiv=function(g,b){return e(this,new _(g,b),0,1)},r.exponentiatedBy=r.pow=function(g,b){var $,S,P,M,C,E,T,x,A,L=this;if(g=new _(g),g.c&&!g.isInteger())throw Error(bignumberError+"Exponent not an integer: "+F(g));if(b!=null&&(b=new _(b)),E=g.e>14,!L.c||!L.c[0]||L.c[0]==1&&!L.e&&L.c.length==1||!g.c||!g.c[0])return A=new _(Math.pow(+F(L),E?g.s*(2-isOdd(g)):+F(g))),b?A.mod(b):A;if(T=g.s<0,b){if(b.c?!b.c[0]:!b.s)return new _(NaN);S=!T&&L.isInteger()&&b.isInteger(),S&&(L=L.mod(b))}else{if(g.e>9&&(L.e>0||L.e<-1||(L.e==0?L.c[0]>1||E&&L.c[1]>=24e7:L.c[0]<8e13||E&&L.c[0]<=9999975e7)))return M=L.s<0&&isOdd(g)?-0:0,L.e>-1&&(M=1/M),new _(T?1/M:M);p&&(M=mathceil(p/LOG_BASE+2))}for(E?($=new _(.5),T&&(g.s=1),x=isOdd(g)):(P=Math.abs(+F(g)),x=P%2),A=new _(i);;){if(x){if(A=A.times(L),!A.c)break;M?A.c.length>M&&(A.c.length=M):S&&(A=A.mod(b))}if(P){if(P=mathfloor(P/2),P===0)break;x=P%2}else if(g=g.times($),N(g,g.e+1,1),g.e>14)x=isOdd(g);else{if(P=+F(g),P===0)break;x=P%2}L=L.times(L),M?L.c&&L.c.length>M&&(L.c.length=M):S&&(L=L.mod(b))}return S?A:(T&&(A=i.div(A)),b?A.mod(b):M?N(A,p,s,C):A)},r.integerValue=function(g){var b=new _(this);return g==null?g=s:intCheck(g,0,8),N(b,b.e+1,g)},r.isEqualTo=r.eq=function(g,b){return compare(this,new _(g,b))===0},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(g,b){return compare(this,new _(g,b))>0},r.isGreaterThanOrEqualTo=r.gte=function(g,b){return(b=compare(this,new _(g,b)))===1||b===0},r.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},r.isLessThan=r.lt=function(g,b){return compare(this,new _(g,b))<0},r.isLessThanOrEqualTo=r.lte=function(g,b){return(b=compare(this,new _(g,b)))===-1||b===0},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&this.c[0]==0},r.minus=function(g,b){var $,S,P,M,C=this,E=C.s;if(g=new _(g,b),b=g.s,!E||!b)return new _(NaN);if(E!=b)return g.s=-b,C.plus(g);var T=C.e/LOG_BASE,x=g.e/LOG_BASE,A=C.c,L=g.c;if(!T||!x){if(!A||!L)return A?(g.s=-b,g):new _(L?C:NaN);if(!A[0]||!L[0])return L[0]?(g.s=-b,g):new _(A[0]?C:s==3?-0:0)}if(T=bitFloor(T),x=bitFloor(x),A=A.slice(),E=T-x){for((M=E<0)?(E=-E,P=A):(x=T,P=L),P.reverse(),b=E;b--;P.push(0));P.reverse()}else for(S=(M=(E=A.length)<(b=L.length))?E:b,E=b=0;b<S;b++)if(A[b]!=L[b]){M=A[b]<L[b];break}if(M&&(P=A,A=L,L=P,g.s=-g.s),b=(S=L.length)-($=A.length),b>0)for(;b--;A[$++]=0);for(b=BASE-1;S>E;){if(A[--S]<L[S]){for($=S;$&&!A[--$];A[$]=b);--A[$],A[S]+=BASE}A[S]-=L[S]}for(;A[0]==0;A.splice(0,1),--x);return A[0]?O(g,A,x):(g.s=s==3?-1:1,g.c=[g.e=0],g)},r.modulo=r.mod=function(g,b){var $,S,P=this;return g=new _(g,b),!P.c||!g.s||g.c&&!g.c[0]?new _(NaN):!g.c||P.c&&!P.c[0]?new _(P):(m==9?(S=g.s,g.s=1,$=e(P,g,0,3),g.s=S,$.s*=S):$=e(P,g,0,m),g=P.minus($.times(g)),!g.c[0]&&m==1&&(g.s=P.s),g)},r.multipliedBy=r.times=function(g,b){var $,S,P,M,C,E,T,x,A,L,I,W,z,U,B,V=this,H=V.c,G=(g=new _(g,b)).c;if(!H||!G||!H[0]||!G[0])return!V.s||!g.s||H&&!H[0]&&!G||G&&!G[0]&&!H?g.c=g.e=g.s=null:(g.s*=V.s,!H||!G?g.c=g.e=null:(g.c=[0],g.e=0)),g;for(S=bitFloor(V.e/LOG_BASE)+bitFloor(g.e/LOG_BASE),g.s*=V.s,T=H.length,L=G.length,T<L&&(z=H,H=G,G=z,P=T,T=L,L=P),P=T+L,z=[];P--;z.push(0));for(U=BASE,B=SQRT_BASE,P=L;--P>=0;){for($=0,I=G[P]%B,W=G[P]/B|0,C=T,M=P+C;M>P;)x=H[--C]%B,A=H[C]/B|0,E=W*x+A*I,x=I*x+E%B*B+z[M]+$,$=(x/U|0)+(E/B|0)+W*A,z[M--]=x%U;z[M]=$}return $?++S:z.splice(0,1),O(g,z,S)},r.negated=function(){var g=new _(this);return g.s=-g.s||null,g},r.plus=function(g,b){var $,S=this,P=S.s;if(g=new _(g,b),b=g.s,!P||!b)return new _(NaN);if(P!=b)return g.s=-b,S.minus(g);var M=S.e/LOG_BASE,C=g.e/LOG_BASE,E=S.c,T=g.c;if(!M||!C){if(!E||!T)return new _(P/0);if(!E[0]||!T[0])return T[0]?g:new _(E[0]?S:P*0)}if(M=bitFloor(M),C=bitFloor(C),E=E.slice(),P=M-C){for(P>0?(C=M,$=T):(P=-P,$=E),$.reverse();P--;$.push(0));$.reverse()}for(P=E.length,b=T.length,P-b<0&&($=T,T=E,E=$,b=P),P=0;b;)P=(E[--b]=E[b]+T[b]+P)/BASE|0,E[b]=BASE===E[b]?0:E[b]%BASE;return P&&(E=[P].concat(E),++C),O(g,E,C)},r.precision=r.sd=function(g,b){var $,S,P,M=this;if(g!=null&&g!==!!g)return intCheck(g,1,MAX),b==null?b=s:intCheck(b,0,8),N(new _(M),g,b);if(!($=M.c))return null;if(P=$.length-1,S=P*LOG_BASE+1,P=$[P]){for(;P%10==0;P/=10,S--);for(P=$[0];P>=10;P/=10,S++);}return g&&M.e+1>S&&(S=M.e+1),S},r.shiftedBy=function(g){return intCheck(g,-MAX_SAFE_INTEGER$1,MAX_SAFE_INTEGER$1),this.times("1e"+g)},r.squareRoot=r.sqrt=function(){var g,b,$,S,P,M=this,C=M.c,E=M.s,T=M.e,x=o+4,A=new _("0.5");if(E!==1||!C||!C[0])return new _(!E||E<0&&(!C||C[0])?NaN:C?M:1/0);if(E=Math.sqrt(+F(M)),E==0||E==1/0?(b=coeffToString(C),(b.length+T)%2==0&&(b+="0"),E=Math.sqrt(+b),T=bitFloor((T+1)/2)-(T<0||T%2),E==1/0?b="5e"+T:(b=E.toExponential(),b=b.slice(0,b.indexOf("e")+1)+T),$=new _(b)):$=new _(E+""),$.c[0]){for(T=$.e,E=T+x,E<3&&(E=0);;)if(P=$,$=A.times(P.plus(e(M,P,x,1))),coeffToString(P.c).slice(0,E)===(b=coeffToString($.c)).slice(0,E))if($.e<T&&--E,b=b.slice(E-3,E+1),b=="9999"||!S&&b=="4999"){if(!S&&(N(P,P.e+o+2,0),P.times(P).eq(M))){$=P;break}x+=4,E+=4,S=1}else{(!+b||!+b.slice(1)&&b.charAt(0)=="5")&&(N($,$.e+o+2,1),g=!$.times($).eq(M));break}}return N($,$.e+o+1,s,g)},r.toExponential=function(g,b){return g!=null&&(intCheck(g,0,MAX),g++),D(this,g,b,1)},r.toFixed=function(g,b){return g!=null&&(intCheck(g,0,MAX),g=g+this.e+1),D(this,g,b)},r.toFormat=function(g,b,$){var S,P=this;if($==null)g!=null&&b&&typeof b=="object"?($=b,b=null):g&&typeof g=="object"?($=g,g=b=null):$=v;else if(typeof $!="object")throw Error(bignumberError+"Argument not an object: "+$);if(S=P.toFixed(g,b),P.c){var M,C=S.split("."),E=+$.groupSize,T=+$.secondaryGroupSize,x=$.groupSeparator||"",A=C[0],L=C[1],I=P.s<0,W=I?A.slice(1):A,z=W.length;if(T&&(M=E,E=T,T=M,z-=M),E>0&&z>0){for(M=z%E||E,A=W.substr(0,M);M<z;M+=E)A+=x+W.substr(M,E);T>0&&(A+=x+W.slice(M)),I&&(A="-"+A)}S=L?A+($.decimalSeparator||"")+((T=+$.fractionGroupSize)?L.replace(new RegExp("\\d{"+T+"}\\B","g"),"$&"+($.fractionGroupSeparator||"")):L):A}return($.prefix||"")+S+($.suffix||"")},r.toFraction=function(g){var b,$,S,P,M,C,E,T,x,A,L,I,W=this,z=W.c;if(g!=null&&(E=new _(g),!E.isInteger()&&(E.c||E.s!==1)||E.lt(i)))throw Error(bignumberError+"Argument "+(E.isInteger()?"out of range: ":"not an integer: ")+F(E));if(!z)return new _(W);for(b=new _(i),x=$=new _(i),S=T=new _(i),I=coeffToString(z),M=b.e=I.length-W.e-1,b.c[0]=POWS_TEN[(C=M%LOG_BASE)<0?LOG_BASE+C:C],g=!g||E.comparedTo(b)>0?M>0?b:x:E,C=d,d=1/0,E=new _(I),T.c[0]=0;A=e(E,b,0,1),P=$.plus(A.times(S)),P.comparedTo(g)!=1;)$=S,S=P,x=T.plus(A.times(P=x)),T=P,b=E.minus(A.times(P=b)),E=P;return P=e(g.minus($),S,0,1),T=T.plus(P.times(x)),$=$.plus(P.times(S)),T.s=x.s=W.s,M=M*2,L=e(x,S,M,s).minus(W).abs().comparedTo(e(T,$,M,s).minus(W).abs())<1?[x,S]:[T,$],d=C,L},r.toNumber=function(){return+F(this)},r.toPrecision=function(g,b){return g!=null&&intCheck(g,1,MAX),D(this,g,b,2)},r.toString=function(g){var b,$=this,S=$.s,P=$.e;return P===null?S?(b="Infinity",S<0&&(b="-"+b)):b="NaN":(g==null?b=P<=l||P>=u?toExponential(coeffToString($.c),P):toFixedPoint(coeffToString($.c),P,"0"):g===10&&w?($=N(new _($),o+P+1,s),b=toFixedPoint(coeffToString($.c),$.e,"0")):(intCheck(g,2,y.length,"Base"),b=a(toFixedPoint(coeffToString($.c),P,"0"),10,g,S,!0)),S<0&&$.c[0]&&(b="-"+b)),b},r.valueOf=r.toJSON=function(){return F(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,t!=null&&_.set(t),_}function bitFloor(t){var e=t|0;return t>0||t===e?e:e-1}function coeffToString(t){for(var e,a,n=1,r=t.length,i=t[0]+"";n<r;){for(e=t[n++]+"",a=LOG_BASE-e.length;a--;e="0"+e);i+=e}for(r=i.length;i.charCodeAt(--r)===48;);return i.slice(0,r+1||1)}function compare(t,e){var a,n,r=t.c,i=e.c,o=t.s,s=e.s,l=t.e,u=e.e;if(!o||!s)return null;if(a=r&&!r[0],n=i&&!i[0],a||n)return a?n?0:-s:o;if(o!=s)return o;if(a=o<0,n=l==u,!r||!i)return n?0:!r^a?1:-1;if(!n)return l>u^a?1:-1;for(s=(l=r.length)<(u=i.length)?l:u,o=0;o<s;o++)if(r[o]!=i[o])return r[o]>i[o]^a?1:-1;return l==u?0:l>u^a?1:-1}function intCheck(t,e,a,n){if(t<e||t>a||t!==mathfloor(t))throw Error(bignumberError+(n||"Argument")+(typeof t=="number"?t<e||t>a?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function isOdd(t){var e=t.c.length-1;return bitFloor(t.e/LOG_BASE)==e&&t.c[e]%2!=0}function toExponential(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function toFixedPoint(t,e,a){var n,r;if(e<0){for(r=a+".";++e;r+=a);t=r+t}else if(n=t.length,++e>n){for(r=a,e-=n;--e;r+=a);t+=r}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}var BigNumber=clone(),RoundingModeMap;(function(t){t[t.up=BigNumber.ROUND_UP]="up",t[t.down=BigNumber.ROUND_DOWN]="down",t[t.truncate=BigNumber.ROUND_DOWN]="truncate",t[t.halfUp=BigNumber.ROUND_HALF_UP]="halfUp",t[t.default=BigNumber.ROUND_HALF_UP]="default",t[t.halfDown=BigNumber.ROUND_HALF_DOWN]="halfDown",t[t.halfEven=BigNumber.ROUND_HALF_EVEN]="halfEven",t[t.banker=BigNumber.ROUND_HALF_EVEN]="banker",t[t.ceiling=BigNumber.ROUND_CEIL]="ceiling",t[t.ceil=BigNumber.ROUND_CEIL]="ceil",t[t.floor=BigNumber.ROUND_FLOOR]="floor"})(RoundingModeMap||(RoundingModeMap={}));function expandRoundMode(t){var e;return(e=RoundingModeMap[t])!==null&&e!==void 0?e:RoundingModeMap.default}var MAX_SAFE_INTEGER=9007199254740991,nativeFloor=Math.floor;function baseRepeat$1(t,e){var a="";if(!t||e<1||e>MAX_SAFE_INTEGER)return a;do e%2&&(a+=t),e=nativeFloor(e/2),e&&(t+=t);while(e);return a}var _baseRepeat=baseRepeat$1,isFunction=isFunction_1,isLength$1=isLength_1;function isArrayLike$4(t){return t!=null&&isLength$1(t.length)&&!isFunction(t)}var isArrayLike_1=isArrayLike$4,eq$1=eq_1,isArrayLike$3=isArrayLike_1,isIndex$1=_isIndex,isObject$2=isObject_1;function isIterateeCall$3(t,e,a){if(!isObject$2(a))return!1;var n=typeof e;return(n=="number"?isArrayLike$3(a)&&isIndex$1(e,a.length):n=="string"&&e in a)?eq$1(a[e],t):!1}var _isIterateeCall=isIterateeCall$3,reWhitespace=/\s/;function trimmedEndIndex$1(t){for(var e=t.length;e--&&reWhitespace.test(t.charAt(e)););return e}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(t){return t&&t.slice(0,trimmedEndIndex(t)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1,baseTrim=_baseTrim,isObject$1=isObject_1,isSymbol$1=isSymbol_1,NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(t){if(typeof t=="number")return t;if(isSymbol$1(t))return NAN;if(isObject$1(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject$1(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=baseTrim(t);var a=reIsBinary.test(t);return a||reIsOctal.test(t)?freeParseInt(t.slice(2),a?2:8):reIsBadHex.test(t)?NAN:+t}var toNumber_1=toNumber$1,toNumber=toNumber_1,INFINITY$1=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$2(t){if(!t)return t===0?t:0;if(t=toNumber(t),t===INFINITY$1||t===-INFINITY$1){var e=t<0?-1:1;return e*MAX_INTEGER}return t===t?t:0}var toFinite_1=toFinite$2,toFinite$1=toFinite_1;function toInteger$1(t){var e=toFinite$1(t),a=e%1;return e===e?a?e-a:e:0}var toInteger_1=toInteger$1,baseRepeat=_baseRepeat,isIterateeCall$2=_isIterateeCall,toInteger=toInteger_1,toString=toString_1;function repeat(t,e,a){return(a?isIterateeCall$2(t,e,a):e===void 0)?e=1:e=toInteger(e),baseRepeat(toString(t),e)}var repeat_1=repeat;const repeat$1=getDefaultExportFromCjs(repeat_1);function digitCount(t){return t.isZero()?1:Math.floor(Math.log10(t.abs().toNumber())+1)}function getAbsolutePrecision(t,{precision:e,significant:a}){return a&&e!==null&&e>0?e-digitCount(t):e}function roundNumber(t,e){const a=getAbsolutePrecision(t,e);if(a===null)return t.toString();const n=expandRoundMode(e.roundMode);if(a>=0)return t.toFixed(a,n);const r=Math.pow(10,Math.abs(a));return t=new BigNumber(t.div(r).toFixed(0,n)).times(r),t.toString()}function replaceInFormat(t,{formattedNumber:e,unit:a}){return t.replace("%n",e).replace("%u",a)}function computeSignificand({significand:t,whole:e,precision:a}){if(e==="0"||a===null)return t;const n=Math.max(0,a-e.length);return(t??"").substr(0,n)}function formatNumber(t,e){var a,n,r;const i=new BigNumber(t);if(e.raise&&!i.isFinite())throw new Error(`"${t}" is not a valid numeric value`);const o=roundNumber(i,e),s=new BigNumber(o),l=s.lt(0),u=s.isZero();let[c,d]=o.split(".");const h=[];let m;const p=(a=e.format)!==null&&a!==void 0?a:"%n",v=(n=e.negativeFormat)!==null&&n!==void 0?n:`-${p}`,y=l&&!u?v:p;for(c=c.replace("-","");c.length>0;)h.unshift(c.substr(Math.max(0,c.length-3),3)),c=c.substr(0,c.length-3);return c=h.join(""),m=h.join(e.delimiter),e.significant?d=computeSignificand({whole:c,significand:d,precision:e.precision}):d=d??repeat$1("0",(r=e.precision)!==null&&r!==void 0?r:0),e.stripInsignificantZeros&&d&&(d=d.replace(/0+$/,"")),i.isNaN()&&(m=t.toString()),d&&i.isFinite()&&(m+=(e.separator||".")+d),replaceInFormat(y,{formattedNumber:m,unit:e.unit})}function getFullScope(t,e,a){let n="";return(e instanceof String||typeof e=="string")&&(n=e),e instanceof Array&&(n=e.join(t.defaultSeparator)),a.scope&&(n=[a.scope,n].join(t.defaultSeparator)),n}function inferType(t){var e,a;if(t===null)return"null";const n=typeof t;return n!=="object"?n:((a=(e=t==null?void 0:t.constructor)===null||e===void 0?void 0:e.name)===null||a===void 0?void 0:a.toLowerCase())||"object"}function interpolate(t,e,a){a=Object.keys(a).reduce((r,i)=>(r[t.transformKey(i)]=a[i],r),{});const n=e.match(t.placeholder);if(!n)return e;for(;n.length;){let r;const i=n.shift(),o=i.replace(t.placeholder,"$1");isSet(a[o])?r=a[o].toString().replace(/\$/gm,"_#$#_"):o in a?r=t.nullPlaceholder(t,i,e,a):r=t.missingPlaceholder(t,i,e,a);const s=new RegExp(i.replace(/\{/gm,"\\{").replace(/\}/gm,"\\}"));e=e.replace(s,r)}return e.replace(/_#\$#_/g,"$")}function lookup(t,e,a={}){a=Object.assign({},a);const n="locale"in a?a.locale:t.locale,r=inferType(n),i=t.locales.get(r==="string"?n:typeof n).slice();e=getFullScope(t,e,a).split(t.defaultSeparator).map(s=>t.transformKey(s)).join(".");const o=i.map(s=>get$2(t.translations,[s,e].join(".")));return o.push(a.defaultValue),o.find(s=>isSet(s))}function numberToDelimited(t,e){const a=new BigNumber(t);if(!a.isFinite())return t.toString();if(!e.delimiterPattern.global)throw new Error(`options.delimiterPattern must be a global regular expression; received ${e.delimiterPattern}`);let[n,r]=a.toString().split(".");return n=n.replace(e.delimiterPattern,i=>`${i}${e.delimiter}`),[n,r].filter(Boolean).join(e.separator)}function arrayPush$2(t,e){for(var a=-1,n=e.length,r=t.length;++a<n;)t[r+a]=e[a];return t}var _arrayPush=arrayPush$2,Symbol$2=_Symbol,isArguments$1=isArguments_1,isArray$5=isArray_1,spreadableSymbol=Symbol$2?Symbol$2.isConcatSpreadable:void 0;function isFlattenable$1(t){return isArray$5(t)||isArguments$1(t)||!!(spreadableSymbol&&t&&t[spreadableSymbol])}var _isFlattenable=isFlattenable$1,arrayPush$1=_arrayPush,isFlattenable=_isFlattenable;function baseFlatten$2(t,e,a,n,r){var i=-1,o=t.length;for(a||(a=isFlattenable),r||(r=[]);++i<o;){var s=t[i];e>0&&a(s)?e>1?baseFlatten$2(s,e-1,a,n,r):arrayPush$1(r,s):n||(r[r.length]=s)}return r}var _baseFlatten=baseFlatten$2,ListCache$2=_ListCache;function stackClear$1(){this.__data__=new ListCache$2,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(t){var e=this.__data__,a=e.delete(t);return this.size=e.size,a}var _stackDelete=stackDelete$1;function stackGet$1(t){return this.__data__.get(t)}var _stackGet=stackGet$1;function stackHas$1(t){return this.__data__.has(t)}var _stackHas=stackHas$1,ListCache$1=_ListCache,Map$2=_Map,MapCache=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(t,e){var a=this.__data__;if(a instanceof ListCache$1){var n=a.__data__;if(!Map$2||n.length<LARGE_ARRAY_SIZE-1)return n.push([t,e]),this.size=++a.size,this;a=this.__data__=new MapCache(n)}return a.set(t,e),this.size=a.size,this}var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$2(t){var e=this.__data__=new ListCache(t);this.size=e.size}Stack$2.prototype.clear=stackClear;Stack$2.prototype.delete=stackDelete;Stack$2.prototype.get=stackGet;Stack$2.prototype.has=stackHas;Stack$2.prototype.set=stackSet;var _Stack=Stack$2;function arraySome$1(t,e){for(var a=-1,n=t==null?0:t.length;++a<n;)if(e(t[a],a,t))return!0;return!1}var _arraySome=arraySome$1,SetCache=_SetCache,arraySome=_arraySome,cacheHas=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(t,e,a,n,r,i){var o=a&COMPARE_PARTIAL_FLAG$5,s=t.length,l=e.length;if(s!=l&&!(o&&l>s))return!1;var u=i.get(t),c=i.get(e);if(u&&c)return u==e&&c==t;var d=-1,h=!0,m=a&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(i.set(t,e),i.set(e,t);++d<s;){var p=t[d],v=e[d];if(n)var y=o?n(v,p,d,e,t,i):n(p,v,d,t,e,i);if(y!==void 0){if(y)continue;h=!1;break}if(m){if(!arraySome(e,function(w,_){if(!cacheHas(m,_)&&(p===w||r(p,w,a,n,i)))return m.push(_)})){h=!1;break}}else if(!(p===v||r(p,v,a,n,i))){h=!1;break}}return i.delete(t),i.delete(e),h}var _equalArrays=equalArrays$2,root$3=_root,Uint8Array$2=root$3.Uint8Array,_Uint8Array=Uint8Array$2;function mapToArray$1(t){var e=-1,a=Array(t.size);return t.forEach(function(n,r){a[++e]=[r,n]}),a}var _mapToArray=mapToArray$1,Symbol$1=_Symbol,Uint8Array$1=_Uint8Array,eq=eq_1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$2="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$2="[object DataView]",symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag$1(t,e,a,n,r,i,o){switch(a){case dataViewTag$2:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case arrayBufferTag$1:return!(t.byteLength!=e.byteLength||!i(new Uint8Array$1(t),new Uint8Array$1(e)));case boolTag$1:case dateTag$1:case numberTag$1:return eq(+t,+e);case errorTag$1:return t.name==e.name&&t.message==e.message;case regexpTag$1:case stringTag$1:return t==e+"";case mapTag$2:var s=mapToArray;case setTag$2:var l=n&COMPARE_PARTIAL_FLAG$4;if(s||(s=setToArray),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;n|=COMPARE_UNORDERED_FLAG$2,o.set(t,e);var c=equalArrays$1(s(t),s(e),n,r,i,o);return o.delete(t),c;case symbolTag:if(symbolValueOf)return symbolValueOf.call(t)==symbolValueOf.call(e)}return!1}var _equalByTag=equalByTag$1,arrayPush=_arrayPush,isArray$4=isArray_1;function baseGetAllKeys$1(t,e,a){var n=e(t);return isArray$4(t)?n:arrayPush(n,a(t))}var _baseGetAllKeys=baseGetAllKeys$1;function arrayFilter$1(t,e){for(var a=-1,n=t==null?0:t.length,r=0,i=[];++a<n;){var o=t[a];e(o,a,t)&&(i[r++]=o)}return i}var _arrayFilter=arrayFilter$1;function stubArray$1(){return[]}var stubArray_1=stubArray$1,arrayFilter=_arrayFilter,stubArray=stubArray_1,objectProto$5=Object.prototype,propertyIsEnumerable=objectProto$5.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols$1=nativeGetSymbols?function(t){return t==null?[]:(t=Object(t),arrayFilter(nativeGetSymbols(t),function(e){return propertyIsEnumerable.call(t,e)}))}:stubArray,_getSymbols=getSymbols$1;function baseTimes$1(t,e){for(var a=-1,n=Array(t);++a<t;)n[a]=e(a);return n}var _baseTimes=baseTimes$1,isBuffer$2={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;isBuffer$2.exports;(function(t,e){var a=_root,n=stubFalse_1,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o?a.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;t.exports=u})(isBuffer$2,isBuffer$2.exports);var isBufferExports=isBuffer$2.exports,baseGetTag$1=_baseGetTag,isLength=isLength_1,isObjectLike$1=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$1="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$1]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray$1(t){return isObjectLike$1(t)&&isLength(t.length)&&!!typedArrayTags[baseGetTag$1(t)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$2(t){return function(e){return t(e)}}var _baseUnary=baseUnary$2,_nodeUtil={exports:{}};_nodeUtil.exports;(function(t,e){var a=_freeGlobal,n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i&&a.process,s=function(){try{var l=r&&r.require&&r.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary$1=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$2=nodeIsTypedArray?baseUnary$1(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$2,baseTimes=_baseTimes,isArguments=isArguments_1,isArray$3=isArray_1,isBuffer$1=isBufferExports,isIndex=_isIndex,isTypedArray$1=isTypedArray_1,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function arrayLikeKeys$1(t,e){var a=isArray$3(t),n=!a&&isArguments(t),r=!a&&!n&&isBuffer$1(t),i=!a&&!n&&!r&&isTypedArray$1(t),o=a||n||r||i,s=o?baseTimes(t.length,String):[],l=s.length;for(var u in t)(e||hasOwnProperty$3.call(t,u))&&!(o&&(u=="length"||r&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||isIndex(u,l)))&&s.push(u);return s}var _arrayLikeKeys=arrayLikeKeys$1,objectProto$3=Object.prototype;function isPrototype$1(t){var e=t&&t.constructor,a=typeof e=="function"&&e.prototype||objectProto$3;return t===a}var _isPrototype=isPrototype$1;function overArg$1(t,e){return function(a){return t(e(a))}}var _overArg=overArg$1,overArg=_overArg,nativeKeys$1=overArg(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype=_isPrototype,nativeKeys=_nativeKeys,objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function baseKeys$1(t){if(!isPrototype(t))return nativeKeys(t);var e=[];for(var a in Object(t))hasOwnProperty$2.call(t,a)&&a!="constructor"&&e.push(a);return e}var _baseKeys=baseKeys$1,arrayLikeKeys=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$2=isArrayLike_1;function keys$3(t){return isArrayLike$2(t)?arrayLikeKeys(t):baseKeys(t)}var keys_1=keys$3,baseGetAllKeys=_baseGetAllKeys,getSymbols=_getSymbols,keys$2=keys_1;function getAllKeys$1(t){return baseGetAllKeys(t,keys$2,getSymbols)}var _getAllKeys=getAllKeys$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function equalObjects$1(t,e,a,n,r,i){var o=a&COMPARE_PARTIAL_FLAG$3,s=getAllKeys(t),l=s.length,u=getAllKeys(e),c=u.length;if(l!=c&&!o)return!1;for(var d=l;d--;){var h=s[d];if(!(o?h in e:hasOwnProperty$1.call(e,h)))return!1}var m=i.get(t),p=i.get(e);if(m&&p)return m==e&&p==t;var v=!0;i.set(t,e),i.set(e,t);for(var y=o;++d<l;){h=s[d];var w=t[h],_=e[h];if(n)var D=o?n(_,w,h,e,t,i):n(w,_,h,t,e,i);if(!(D===void 0?w===_||r(w,_,a,n,i):D)){v=!1;break}y||(y=h=="constructor")}if(v&&!y){var k=t.constructor,O=e.constructor;k!=O&&"constructor"in t&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof O=="function"&&O instanceof O)&&(v=!1)}return i.delete(t),i.delete(e),v}var _equalObjects=equalObjects$1,getNative$2=_getNative,root$2=_root,DataView$1=getNative$2(root$2,"DataView"),_DataView=DataView$1,getNative$1=_getNative,root$1=_root,Promise$2=getNative$1(root$1,"Promise"),_Promise=Promise$2,getNative=_getNative,root=_root,WeakMap$2=getNative(root,"WeakMap"),_WeakMap=WeakMap$2,DataView=_DataView,Map$1=_Map,Promise$1=_Promise,Set$1=_Set,WeakMap$1=_WeakMap,baseGetTag=_baseGetTag,toSource=_toSource,mapTag="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap$1),getTag$1=baseGetTag;(DataView&&getTag$1(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map$1&&getTag$1(new Map$1)!=mapTag||Promise$1&&getTag$1(Promise$1.resolve())!=promiseTag||Set$1&&getTag$1(new Set$1)!=setTag||WeakMap$1&&getTag$1(new WeakMap$1)!=weakMapTag)&&(getTag$1=function(t){var e=baseGetTag(t),a=e==objectTag$1?t.constructor:void 0,n=a?toSource(a):"";if(n)switch(n){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return e});var _getTag=getTag$1,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag=_getTag,isArray$2=isArray_1,isBuffer=isBufferExports,isTypedArray=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function baseIsEqualDeep$1(t,e,a,n,r,i){var o=isArray$2(t),s=isArray$2(e),l=o?arrayTag:getTag(t),u=s?arrayTag:getTag(e);l=l==argsTag?objectTag:l,u=u==argsTag?objectTag:u;var c=l==objectTag,d=u==objectTag,h=l==u;if(h&&isBuffer(t)){if(!isBuffer(e))return!1;o=!0,c=!1}if(h&&!c)return i||(i=new Stack$1),o||isTypedArray(t)?equalArrays(t,e,a,n,r,i):equalByTag(t,e,l,a,n,r,i);if(!(a&COMPARE_PARTIAL_FLAG$2)){var m=c&&hasOwnProperty.call(t,"__wrapped__"),p=d&&hasOwnProperty.call(e,"__wrapped__");if(m||p){var v=m?t.value():t,y=p?e.value():e;return i||(i=new Stack$1),r(v,y,a,n,i)}}return h?(i||(i=new Stack$1),equalObjects(t,e,a,n,r,i)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike=isObjectLike_1;function baseIsEqual$2(t,e,a,n,r){return t===e?!0:t==null||e==null||!isObjectLike(t)&&!isObjectLike(e)?t!==t&&e!==e:baseIsEqualDeep(t,e,a,n,baseIsEqual$2,r)}var _baseIsEqual=baseIsEqual$2,Stack=_Stack,baseIsEqual$1=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(t,e,a,n){var r=a.length,i=r,o=!n;if(t==null)return!i;for(t=Object(t);r--;){var s=a[r];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++r<i;){s=a[r];var l=s[0],u=t[l],c=s[1];if(o&&s[2]){if(u===void 0&&!(l in t))return!1}else{var d=new Stack;if(n)var h=n(u,c,l,t,e,d);if(!(h===void 0?baseIsEqual$1(c,u,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,n,d):h))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject=isObject_1;function isStrictComparable$2(t){return t===t&&!isObject(t)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$1=keys_1;function getMatchData$1(t){for(var e=keys$1(t),a=e.length;a--;){var n=e[a],r=t[n];e[a]=[n,r,isStrictComparable$1(r)]}return e}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(t,e){return function(a){return a==null?!1:a[t]===e&&(e!==void 0||t in Object(a))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(t){var e=getMatchData(t);return e.length==1&&e[0][2]?matchesStrictComparable$1(e[0][0],e[0][1]):function(a){return a===t||baseIsMatch(a,t,e)}}var _baseMatches=baseMatches$1;function baseHasIn$1(t,e){return t!=null&&e in Object(t)}var _baseHasIn=baseHasIn$1,baseHasIn=_baseHasIn,hasPath=_hasPath;function hasIn$1(t,e){return t!=null&&hasPath(t,e,baseHasIn)}var hasIn_1=hasIn$1,baseIsEqual=_baseIsEqual,get=get_1,hasIn=hasIn_1,isKey$1=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$1=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(t,e){return isKey$1(t)&&isStrictComparable(e)?matchesStrictComparable(toKey$1(t),e):function(a){var n=get(a,t);return n===void 0&&n===e?hasIn(a,t):baseIsEqual(e,n,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1;function identity$4(t){return t}var identity_1=identity$4;function baseProperty$1(t){return function(e){return e==null?void 0:e[t]}}var _baseProperty=baseProperty$1,baseGet$1=_baseGet;function basePropertyDeep$1(t){return function(e){return baseGet$1(e,t)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey=_isKey,toKey=_toKey;function property$1(t){return isKey(t)?baseProperty(toKey(t)):basePropertyDeep(t)}var property_1=property$1,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity$3=identity_1,isArray$1=isArray_1,property=property_1;function baseIteratee$1(t){return typeof t=="function"?t:t==null?identity$3:typeof t=="object"?isArray$1(t)?baseMatchesProperty(t[0],t[1]):baseMatches(t):property(t)}var _baseIteratee=baseIteratee$1;function createBaseFor$1(t){return function(e,a,n){for(var r=-1,i=Object(e),o=n(e),s=o.length;s--;){var l=o[t?s:++r];if(a(i[l],l,i)===!1)break}return e}}var _createBaseFor=createBaseFor$1,createBaseFor=_createBaseFor,baseFor$1=createBaseFor(),_baseFor=baseFor$1,baseFor=_baseFor,keys=keys_1;function baseForOwn$1(t,e){return t&&baseFor(t,e,keys)}var _baseForOwn=baseForOwn$1,isArrayLike$1=isArrayLike_1;function createBaseEach$1(t,e){return function(a,n){if(a==null)return a;if(!isArrayLike$1(a))return t(a,n);for(var r=a.length,i=e?r:-1,o=Object(a);(e?i--:++i<r)&&n(o[i],i,o)!==!1;);return a}}var _createBaseEach=createBaseEach$1,baseForOwn=_baseForOwn,createBaseEach=_createBaseEach,baseEach$1=createBaseEach(baseForOwn),_baseEach=baseEach$1,baseEach=_baseEach,isArrayLike=isArrayLike_1;function baseMap$1(t,e){var a=-1,n=isArrayLike(t)?Array(t.length):[];return baseEach(t,function(r,i,o){n[++a]=e(r,i,o)}),n}var _baseMap=baseMap$1;function baseSortBy$1(t,e){var a=t.length;for(t.sort(e);a--;)t[a]=t[a].value;return t}var _baseSortBy=baseSortBy$1,isSymbol=isSymbol_1;function compareAscending$1(t,e){if(t!==e){var a=t!==void 0,n=t===null,r=t===t,i=isSymbol(t),o=e!==void 0,s=e===null,l=e===e,u=isSymbol(e);if(!s&&!u&&!i&&t>e||i&&o&&l&&!s&&!u||n&&o&&l||!a&&l||!r)return 1;if(!n&&!i&&!u&&t<e||u&&a&&r&&!n&&!i||s&&a&&r||!o&&r||!l)return-1}return 0}var _compareAscending=compareAscending$1,compareAscending=_compareAscending;function compareMultiple$1(t,e,a){for(var n=-1,r=t.criteria,i=e.criteria,o=r.length,s=a.length;++n<o;){var l=compareAscending(r[n],i[n]);if(l){if(n>=s)return l;var u=a[n];return l*(u=="desc"?-1:1)}}return t.index-e.index}var _compareMultiple=compareMultiple$1,arrayMap=_arrayMap,baseGet=_baseGet,baseIteratee=_baseIteratee,baseMap=_baseMap,baseSortBy=_baseSortBy,baseUnary=_baseUnary,compareMultiple=_compareMultiple,identity$2=identity_1,isArray=isArray_1;function baseOrderBy$1(t,e,a){e.length?e=arrayMap(e,function(i){return isArray(i)?function(o){return baseGet(o,i.length===1?i[0]:i)}:i}):e=[identity$2];var n=-1;e=arrayMap(e,baseUnary(baseIteratee));var r=baseMap(t,function(i,o,s){var l=arrayMap(e,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return baseSortBy(r,function(i,o){return compareMultiple(i,o,a)})}var _baseOrderBy=baseOrderBy$1;function apply$1(t,e,a){switch(a.length){case 0:return t.call(e);case 1:return t.call(e,a[0]);case 2:return t.call(e,a[0],a[1]);case 3:return t.call(e,a[0],a[1],a[2])}return t.apply(e,a)}var _apply=apply$1,apply=_apply,nativeMax$1=Math.max;function overRest$1(t,e,a){return e=nativeMax$1(e===void 0?t.length-1:e,0),function(){for(var n=arguments,r=-1,i=nativeMax$1(n.length-e,0),o=Array(i);++r<i;)o[r]=n[e+r];r=-1;for(var s=Array(e+1);++r<e;)s[r]=n[r];return s[e]=a(o),apply(t,this,s)}}var _overRest=overRest$1;function constant$1(t){return function(){return t}}var constant_1=constant$1,constant=constant_1,defineProperty=_defineProperty,identity$1=identity_1,baseSetToString$1=defineProperty?function(t,e){return defineProperty(t,"toString",{configurable:!0,enumerable:!1,value:constant(e),writable:!0})}:identity$1,_baseSetToString=baseSetToString$1,HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut$1(t){var e=0,a=0;return function(){var n=nativeNow(),r=HOT_SPAN-(n-a);if(a=n,r>0){if(++e>=HOT_COUNT)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var _shortOut=shortOut$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$1=shortOut(baseSetToString),_setToString=setToString$1,identity=identity_1,overRest=_overRest,setToString=_setToString;function baseRest$1(t,e){return setToString(overRest(t,e,identity),t+"")}var _baseRest=baseRest$1,baseFlatten$1=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest=_baseRest,isIterateeCall$1=_isIterateeCall,sortBy=baseRest(function(t,e){if(t==null)return[];var a=e.length;return a>1&&isIterateeCall$1(t,e[0],e[1])?e=[]:a>2&&isIterateeCall$1(e[0],e[1],e[2])&&(e=[e[0]]),baseOrderBy(t,baseFlatten$1(e,1),[])}),sortBy_1=sortBy;const sortBy$1=getDefaultExportFromCjs(sortBy_1);function baseZipObject$1(t,e,a){for(var n=-1,r=t.length,i=e.length,o={};++n<r;){var s=n<i?e[n]:void 0;a(o,t[n],s)}return o}var _baseZipObject=baseZipObject$1,assignValue=_assignValue,baseZipObject=_baseZipObject;function zipObject(t,e){return baseZipObject(t||[],e||[],assignValue)}var zipObject_1=zipObject;const zipObject$1=getDefaultExportFromCjs(zipObject_1),DECIMAL_UNITS={0:"unit",1:"ten",2:"hundred",3:"thousand",6:"million",9:"billion",12:"trillion",15:"quadrillion","-1":"deci","-2":"centi","-3":"mili","-6":"micro","-9":"nano","-12":"pico","-15":"femto"},INVERTED_DECIMAL_UNITS=zipObject$1(Object.values(DECIMAL_UNITS),Object.keys(DECIMAL_UNITS).map(t=>parseInt(t,10)));function numberToHuman(t,e,a){const n={roundMode:a.roundMode,precision:a.precision,significant:a.significant};let r;if(inferType(a.units)==="string"){const d=a.units;if(r=lookup(t,d),!r)throw new Error(`The scope "${t.locale}${t.defaultSeparator}${getFullScope(t,d,{})}" couldn't be found`)}else r=a.units;let i=roundNumber(new BigNumber(e),n);const o=d=>sortBy$1(Object.keys(d).map(h=>INVERTED_DECIMAL_UNITS[h]),h=>h*-1),s=(d,h)=>{const m=d.isZero()?0:Math.floor(Math.log10(d.abs().toNumber()));return o(h).find(p=>m>=p)||0},l=(d,h)=>{const m=DECIMAL_UNITS[h.toString()];return d[m]||""},u=s(new BigNumber(i),r),c=l(r,u);if(i=roundNumber(new BigNumber(i).div(Math.pow(10,u)),n),a.stripInsignificantZeros){let[d,h]=i.split(".");h=(h||"").replace(/0+$/,""),i=d,h&&(i+=`${a.separator}${h}`)}return a.format.replace("%n",i||"0").replace("%u",c).trim()}const STORAGE_UNITS=["byte","kb","mb","gb","tb","pb","eb"];function numberToHumanSize(t,e,a){const n=expandRoundMode(a.roundMode),r=1024,i=new BigNumber(e).abs(),o=i.lt(r);let s;const l=(p,v)=>{const y=v.length-1,w=new BigNumber(Math.log(p.toNumber())).div(Math.log(r)).integerValue(BigNumber.ROUND_DOWN).toNumber();return Math.min(y,w)},u=p=>`number.human.storage_units.units.${o?"byte":p[c]}`,c=l(i,STORAGE_UNITS);o?s=i.integerValue():s=new BigNumber(roundNumber(i.div(Math.pow(r,c)),{significant:a.significant,precision:a.precision,roundMode:a.roundMode}));const d=t.translate("number.human.storage_units.format",{defaultValue:"%n %u"}),h=t.translate(u(STORAGE_UNITS),{count:i.integerValue().toNumber()});let m=s.toFixed(a.precision,n);return a.stripInsignificantZeros&&(m=m.replace(/(\..*?)0+$/,"$1").replace(/\.$/,"")),d.replace("%n",m).replace("%u",h)}function parseDate(t){if(t instanceof Date)return t;if(typeof t=="number"){const n=new Date;return n.setTime(t),n}const e=new String(t).match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})(?:[.,](\d{1,3}))?)?(Z|\+00:?00)?/);if(e){const n=e.slice(1,8).map(h=>parseInt(h,10)||0);n[1]-=1;const[r,i,o,s,l,u,c]=n;return e[8]?new Date(Date.UTC(r,i,o,s,l,u,c)):new Date(r,i,o,s,l,u,c)}t.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)&&new Date().setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" ")));const a=new Date;return a.setTime(Date.parse(t)),a}function pluralize({i18n:t,count:e,scope:a,options:n,baseScope:r}){n=Object.assign({},n);let i,o;if(typeof a=="object"&&a?i=a:i=lookup(t,a,n),!i)return t.missingTranslation.get(a,n);const l=t.pluralization.get(n.locale)(t,e),u=[];for(;l.length;){const c=l.shift();if(isSet(i[c])){o=i[c];break}u.push(c)}return isSet(o)?(n.count=e,t.interpolate(t,o,n)):t.missingTranslation.get(r.split(t.defaultSeparator).concat([u[0]]),n)}var baseFlatten=_baseFlatten,INFINITY=1/0;function flattenDeep(t){var e=t==null?0:t.length;return e?baseFlatten(t,INFINITY):[]}var flattenDeep_1=flattenDeep;const flattenDeep$1=getDefaultExportFromCjs(flattenDeep_1);class PropertyFlatList{constructor(e){this.target=e}call(){const e=flattenDeep$1(Object.keys(this.target).map(a=>this.compute(this.target[a],a)));return e.sort(),e}compute(e,a){return!Array.isArray(e)&&isObject$7(e)?Object.keys(e).map(n=>this.compute(e[n],`${a}.${n}`)):a}}function propertyFlatList(t){return new PropertyFlatList(t).call()}const DEFAULT_OPTIONS={meridian:{am:"AM",pm:"PM"},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthNames:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbrMonthNames:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function strftime(t,e,a={}){const{abbrDayNames:n,dayNames:r,abbrMonthNames:i,monthNames:o,meridian:s}=Object.assign(Object.assign({},DEFAULT_OPTIONS),a);if(isNaN(t.getTime()))throw new Error("strftime() requires a valid date object, but received an invalid date.");const l=t.getDay(),u=t.getDate(),c=t.getFullYear(),d=t.getMonth()+1,h=t.getHours();let m=h;const p=h>11?"pm":"am",v=t.getSeconds(),y=t.getMinutes(),w=t.getTimezoneOffset(),_=Math.floor(Math.abs(w/60)),D=Math.abs(w)-_*60,k=(w>0?"-":"+")+(_.toString().length<2?"0"+_:_)+(D.toString().length<2?"0"+D:D);return m>12?m=m-12:m===0&&(m=12),e=e.replace("%a",n[l]),e=e.replace("%A",r[l]),e=e.replace("%b",i[d]),e=e.replace("%B",o[d]),e=e.replace("%d",u.toString().padStart(2,"0")),e=e.replace("%e",u.toString()),e=e.replace("%-d",u.toString()),e=e.replace("%H",h.toString().padStart(2,"0")),e=e.replace("%-H",h.toString()),e=e.replace("%k",h.toString()),e=e.replace("%I",m.toString().padStart(2,"0")),e=e.replace("%-I",m.toString()),e=e.replace("%l",m.toString()),e=e.replace("%m",d.toString().padStart(2,"0")),e=e.replace("%-m",d.toString()),e=e.replace("%M",y.toString().padStart(2,"0")),e=e.replace("%-M",y.toString()),e=e.replace("%p",s[p]),e=e.replace("%P",s[p].toLowerCase()),e=e.replace("%S",v.toString().padStart(2,"0")),e=e.replace("%-S",v.toString()),e=e.replace("%w",l.toString()),e=e.replace("%y",c.toString().padStart(2,"0").substr(-2)),e=e.replace("%-y",c.toString().padStart(2,"0").substr(-2).replace(/^0+/,"")),e=e.replace("%Y",c.toString()),e=e.replace(/%z/i,k),e}var nativeCeil=Math.ceil,nativeMax=Math.max;function baseRange$1(t,e,a,n){for(var r=-1,i=nativeMax(nativeCeil((e-t)/(a||1)),0),o=Array(i);i--;)o[n?i:++r]=t,t+=a;return o}var _baseRange=baseRange$1,baseRange=_baseRange,isIterateeCall=_isIterateeCall,toFinite=toFinite_1;function createRange$1(t){return function(e,a,n){return n&&typeof n!="number"&&isIterateeCall(e,a,n)&&(a=n=void 0),e=toFinite(e),a===void 0?(a=e,e=0):a=toFinite(a),n=n===void 0?e<a?1:-1:toFinite(n),baseRange(e,a,n,t)}}var _createRange=createRange$1,createRange=_createRange,range=createRange(),range_1=range;const range$1=getDefaultExportFromCjs(range_1),within=(t,e,a)=>a>=t&&a<=e;function timeAgoInWords(t,e,a,n={}){const r=n.scope||"datetime.distance_in_words",i=(F,g=0)=>t.t(F,{count:g,scope:r});e=parseDate(e),a=parseDate(a);let o=e.getTime()/1e3,s=a.getTime()/1e3;o>s&&([e,a,o,s]=[a,e,s,o]);const l=Math.round(s-o),u=Math.round((s-o)/60),d=u/60/24,h=Math.round(u/60),m=Math.round(d),p=Math.round(m/30);if(within(0,1,u))return n.includeSeconds?within(0,4,l)?i("less_than_x_seconds",5):within(5,9,l)?i("less_than_x_seconds",10):within(10,19,l)?i("less_than_x_seconds",20):within(20,39,l)?i("half_a_minute"):within(40,59,l)?i("less_than_x_minutes",1):i("x_minutes",1):u===0?i("less_than_x_minutes",1):i("x_minutes",u);if(within(2,44,u))return i("x_minutes",u);if(within(45,89,u))return i("about_x_hours",1);if(within(90,1439,u))return i("about_x_hours",h);if(within(1440,2519,u))return i("x_days",1);if(within(2520,43199,u))return i("x_days",m);if(within(43200,86399,u))return i("about_x_months",Math.round(u/43200));if(within(86400,525599,u))return i("x_months",p);let v=e.getFullYear();e.getMonth()+1>=3&&(v+=1);let y=a.getFullYear();a.getMonth()+1<3&&(y-=1);const w=v>y?0:range$1(v,y).filter(F=>new Date(F,1,29).getMonth()==1).length,_=525600,D=w*1440,k=u-D,O=Math.trunc(k/_),N=parseFloat((k/_-O).toPrecision(3));return N<.25?i("about_x_years",O):N<.75?i("over_x_years",O):i("almost_x_years",O+1)}const guessStrategy=function(t,e){e instanceof Array&&(e=e.join(t.defaultSeparator));const a=e.split(t.defaultSeparator).slice(-1)[0];return t.missingTranslationPrefix+a.replace("_"," ").replace(/([a-z])([A-Z])/g,(n,r,i)=>`${r} ${i.toLowerCase()}`)},messageStrategy=(t,e,a)=>{const n=getFullScope(t,e,a),r="locale"in a?a.locale:t.locale,i=inferType(r);return`[missing "${[i=="string"?r:i,n].join(t.defaultSeparator)}" translation]`},errorStrategy=(t,e,a)=>{const n=getFullScope(t,e,a),r=[t.locale,n].join(t.defaultSeparator);throw new Error(`Missing translation: ${r}`)};class MissingTranslation{constructor(e){this.i18n=e,this.registry={},this.register("guess",guessStrategy),this.register("message",messageStrategy),this.register("error",errorStrategy)}register(e,a){this.registry[e]=a}get(e,a){var n;return this.registry[(n=a.missingBehavior)!==null&&n!==void 0?n:this.i18n.missingBehavior](this.i18n,e,a)}}var __awaiter=globalThis&&globalThis.__awaiter||function(t,e,a,n){function r(i){return i instanceof a?i:new a(function(o){o(i)})}return new(a||(a=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(d){o(d)}}function l(c){try{u(n.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):r(c.value).then(s,l)}u((n=n.apply(t,e||[])).next())})};const DEFAULT_I18N_OPTIONS={defaultLocale:"en",availableLocales:["en"],locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,enableFallback:!1,missingBehavior:"message",missingTranslationPrefix:"",missingPlaceholder:(t,e)=>`[missing "${e}" value]`,nullPlaceholder:(t,e,a,n)=>t.missingPlaceholder(t,e,a,n),transformKey:t=>t};class I18n{constructor(e={},a={}){this._locale=DEFAULT_I18N_OPTIONS.locale,this._defaultLocale=DEFAULT_I18N_OPTIONS.defaultLocale,this._version=0,this.onChangeHandlers=[],this.translations={},this.availableLocales=[],this.t=this.translate,this.p=this.pluralize,this.l=this.localize,this.distanceOfTimeInWords=this.timeAgoInWords;const{locale:n,enableFallback:r,missingBehavior:i,missingTranslationPrefix:o,missingPlaceholder:s,nullPlaceholder:l,defaultLocale:u,defaultSeparator:c,placeholder:d,transformKey:h}=Object.assign(Object.assign({},DEFAULT_I18N_OPTIONS),a);this.locale=n,this.defaultLocale=u,this.defaultSeparator=c,this.enableFallback=r,this.locale=n,this.missingBehavior=i,this.missingTranslationPrefix=o,this.missingPlaceholder=s,this.nullPlaceholder=l,this.placeholder=d,this.pluralization=new Pluralization(this),this.locales=new Locales(this),this.missingTranslation=new MissingTranslation(this),this.transformKey=h,this.interpolate=interpolate,this.store(e)}store(e){propertyFlatList(e).forEach(n=>setWith$1(this.translations,n,get$2(e,n),Object)),this.hasChanged()}get locale(){return this._locale||this.defaultLocale||"en"}set locale(e){if(typeof e!="string")throw new Error(`Expected newLocale to be a string; got ${inferType(e)}`);const a=this._locale!==e;this._locale=e,a&&this.hasChanged()}get defaultLocale(){return this._defaultLocale||"en"}set defaultLocale(e){if(typeof e!="string")throw new Error(`Expected newLocale to be a string; got ${inferType(e)}`);const a=this._defaultLocale!==e;this._defaultLocale=e,a&&this.hasChanged()}translate(e,a){a=Object.assign({},a);const n=createTranslationOptions(this,e,a);let r;return n.some(o=>(isSet(o.scope)?r=lookup(this,o.scope,a):isSet(o.message)&&(r=o.message),r!=null))?(typeof r=="string"?r=this.interpolate(this,r,a):typeof r=="object"&&r&&isSet(a.count)&&(r=pluralize({i18n:this,count:a.count||0,scope:r,options:a,baseScope:getFullScope(this,e,a)})),a&&r instanceof Array&&(r=r.map(o=>typeof o=="string"?interpolate(this,o,a):o)),r):this.missingTranslation.get(e,a)}pluralize(e,a,n){return pluralize({i18n:this,count:e,scope:a,options:Object.assign({},n),baseScope:getFullScope(this,a,n??{})})}localize(e,a,n){if(n=Object.assign({},n),a==null)return"";switch(e){case"currency":return this.numberToCurrency(a);case"number":return formatNumber(a,Object.assign({delimiter:",",precision:3,separator:".",significant:!1,stripInsignificantZeros:!1},lookup(this,"number.format")));case"percentage":return this.numberToPercentage(a);default:{let r;return e.match(/^(date|time)/)?r=this.toTime(e,a):r=a.toString(),interpolate(this,r,n)}}}toTime(e,a){const n=parseDate(a),r=lookup(this,e);return n.toString().match(/invalid/i)||!r?n.toString():this.strftime(n,r)}numberToCurrency(e,a={}){return formatNumber(e,Object.assign(Object.assign(Object.assign({delimiter:",",format:"%u%n",precision:2,separator:".",significant:!1,stripInsignificantZeros:!1,unit:"$"},camelCaseKeys(this.get("number.format"))),camelCaseKeys(this.get("number.currency.format"))),a))}numberToPercentage(e,a={}){return formatNumber(e,Object.assign(Object.assign(Object.assign({delimiter:"",format:"%n%",precision:3,stripInsignificantZeros:!1,separator:".",significant:!1},camelCaseKeys(this.get("number.format"))),camelCaseKeys(this.get("number.percentage.format"))),a))}numberToHumanSize(e,a={}){return numberToHumanSize(this,e,Object.assign(Object.assign(Object.assign({delimiter:"",precision:3,significant:!0,stripInsignificantZeros:!0,units:{billion:"Billion",million:"Million",quadrillion:"Quadrillion",thousand:"Thousand",trillion:"Trillion",unit:""}},camelCaseKeys(this.get("number.human.format"))),camelCaseKeys(this.get("number.human.storage_units"))),a))}numberToHuman(e,a={}){return numberToHuman(this,e,Object.assign(Object.assign(Object.assign({delimiter:"",separator:".",precision:3,significant:!0,stripInsignificantZeros:!0,format:"%n %u",roundMode:"default",units:{billion:"Billion",million:"Million",quadrillion:"Quadrillion",thousand:"Thousand",trillion:"Trillion",unit:""}},camelCaseKeys(this.get("number.human.format"))),camelCaseKeys(this.get("number.human.decimal_units"))),a))}numberToRounded(e,a){return formatNumber(e,Object.assign({unit:"",precision:3,significant:!1,separator:".",delimiter:"",stripInsignificantZeros:!1},a))}numberToDelimited(e,a={}){return numberToDelimited(e,Object.assign({delimiterPattern:/(\d)(?=(\d\d\d)+(?!\d))/g,delimiter:",",separator:"."},a))}withLocale(e,a){return __awaiter(this,void 0,void 0,function*(){const n=this.locale;try{this.locale=e,yield a()}finally{this.locale=n}})}strftime(e,a,n={}){return strftime(e,a,Object.assign(Object.assign(Object.assign({},camelCaseKeys(lookup(this,"date"))),{meridian:{am:lookup(this,"time.am")||"AM",pm:lookup(this,"time.pm")||"PM"}}),n))}update(e,a,n={strict:!1}){if(n.strict&&!has$1(this.translations,e))throw new Error(`The path "${e}" is not currently defined`);const r=get$2(this.translations,e),i=inferType(r),o=inferType(a);if(n.strict&&i!==o)throw new Error(`The current type for "${e}" is "${i}", but you're trying to override it with "${o}"`);let s;o==="object"?s=Object.assign(Object.assign({},r),a):s=a,set$1(this.translations,e,s),this.hasChanged()}toSentence(e,a={}){const{wordsConnector:n,twoWordsConnector:r,lastWordConnector:i}=Object.assign(Object.assign({wordsConnector:", ",twoWordsConnector:" and ",lastWordConnector:", and "},camelCaseKeys(lookup(this,"support.array"))),a),o=e.length;switch(o){case 0:return"";case 1:return`${e[0]}`;case 2:return e.join(r);default:return[e.slice(0,o-1).join(n),i,e[o-1]].join("")}}timeAgoInWords(e,a,n={}){return timeAgoInWords(this,e,a,n)}onChange(e){return this.onChangeHandlers.push(e),()=>{this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(e),1)}}get version(){return this._version}formatNumber(e,a){return formatNumber(e,a)}get(e){return lookup(this,e)}runCallbacks(){this.onChangeHandlers.forEach(e=>e(this))}hasChanged(){this._version+=1,this.runCallbacks()}}async function loadTranslations(t,e){const n=await(await fetch(`./v2/i18n/${e}.json`)).json();t.store(n)}let currencies$1=[],chart$3=null,chartData$1=null,afterPromises$4=!1,i18n$3;const CACHE_KEY$4="dashboard-budgets-chart",budgets=()=>({loading:!1,autoConversion:!1,loadChart(){if(this.loading!==!0){if(this.loading=!0,chartData$1!==null){this.drawChart(this.generateOptions(chartData$1)),this.loading=!1;return}this.getFreshData()}},drawChart(t){if(chart$3!==null){chart$3.data.datasets=t.data.datasets,chart$3.update();return}chart$3=new Chart(document.querySelector("#budget-chart"),t)},getFreshData(){const t=window.store.get("cacheValid");let e=window.store.get(CACHE_KEY$4);if(t&&typeof e<"u"){chartData$1=e,this.drawChart(this.generateOptions(chartData$1)),this.loading=!1;return}new Dashboard$1().dashboard(new Date(window.store.get("start")),new Date(window.store.get("end")),null).then(n=>{chartData$1=n.data,this.drawChart(this.generateOptions(chartData$1)),window.store.set(CACHE_KEY$4,chartData$1),this.loading=!1})},generateOptions(t){currencies$1=[];let e=getDefaultChartSettings("column");e.options.locale=window.store.get("locale").replace("_","-"),e.options.plugins={tooltip:{callbacks:{title:function(a){return a.label},label:function(a){let n=a.dataset.label||"";return n&&(n+=": "),n+" "+formatMoney(a.parsed.y,currencies$1[a.parsed.x]??"EUR")}}}},e.data={labels:[],datasets:[{label:i18n$3.t("firefly.spent"),data:[],borderWidth:1,stack:1,backgroundColor:getColors("spent","background"),borderColor:getColors("spent","border")},{label:i18n$3.t("firefly.left"),data:[],borderWidth:1,stack:1,backgroundColor:getColors("left","background"),borderColor:getColors("left","border")},{label:i18n$3.t("firefly.overspent"),data:[],borderWidth:1,stack:1,backgroundColor:getColors("overspent","background"),borderColor:getColors("overspent","border")}]};for(const a in t)if(t.hasOwnProperty(a)){let n=t[a],r=n.label+" ("+n.currency_code+")";e.data.labels.push(r),this.autoConversion&&(currencies$1.push(n.native_code),e.data.datasets[0].data.push(parseFloat(n.native_entries.spent)*-1),e.data.datasets[1].data.push(parseFloat(n.native_entries.left)),e.data.datasets[2].data.push(parseFloat(n.native_entries.overspent))),this.autoConversion||(currencies$1.push(n.currency_code),e.data.datasets[0].data.push(parseFloat(n.entries.spent)*-1),e.data.datasets[1].data.push(parseFloat(n.entries.left)),e.data.datasets[2].data.push(parseFloat(n.entries.overspent)))}return e.options.scales={y:{ticks:{callback:function(a){return formatMoney(a,currencies$1[0])}}}},e},init(){Promise.all([getVariable("autoConversion",!1),getVariable("language","en-US")]).then(t=>{i18n$3=new I18n,i18n$3.locale=t[1],loadTranslations(i18n$3,t[1]).then(()=>{this.autoConversion=t[0],afterPromises$4=!0,this.loading===!1&&this.loadChart()})}),window.store.observe("end",()=>{afterPromises$4&&this.loading===!1&&(chartData$1=null,this.loadChart())}),window.store.observe("autoConversion",t=>{afterPromises$4&&(this.autoConversion=t,this.loading===!1&&this.loadChart())})}});class Dashboard{dashboard(e,a){let n=format$1(e,"y-MM-dd"),r=format$1(a,"y-MM-dd");return api.get("/api/v2/chart/category/dashboard",{params:{start:n,end:r}})}}let currencies=[],chart$2=null,chartData=null,afterPromises$3=!1;const CACHE_KEY$3="dashboard-categories-chart",categories=()=>({loading:!1,autoConversion:!1,generateOptions(t){currencies=[];let e=getDefaultChartSettings("column"),a={};for(const r in t)if(t.hasOwnProperty(r)){let i=t[r],o=i.currency_code;this.autoConversion&&(o=i.native_code),a.hasOwnProperty(o)||(a[o]={name:o,yAxisID:"",data:{}},currencies.push(o))}for(const r in t)if(t.hasOwnProperty(r)){let i=t[r],o=i.currency_code;this.autoConversion&&(o=i.native_code);for(const s in a)if(a.hasOwnProperty(s)){let l=0;o===s&&(l=parseFloat(i.amount),""+i.currency_code,this.autoConversion&&(l=parseFloat(i.native_amount),""+i.native_code)),a[s].data.hasOwnProperty(i.label)&&(a[s].data[i.label]=a[s].data[i.label]+l),a[s].data.hasOwnProperty(i.label)||(a[s].data[i.label]=l)}e.data.labels.includes(i.label)||e.data.labels.push(i.label)}let n=0;for(const r in a){let i="y"+r,o={label:r,currency_code:r,yAxisID:i,data:[]};for(const s in a[r].data)o.data.push(a[r].data[s]);e.data.datasets.push(o),e.options.scales.hasOwnProperty(i)||(e.options.scales[i]={beginAtZero:!0,type:"linear",position:n===1?"right":"left",ticks:{callback:function(s,l,u){return formatMoney(s,r)}}},n++)}return e},drawChart(t){if(chart$2!==null){chart$2.options=t.options,chart$2.data=t.data,chart$2.update();return}chart$2=new Chart(document.querySelector("#category-chart"),t)},getFreshData(){const t=window.store.get("cacheValid");let e=window.store.get(CACHE_KEY$3);if(t&&typeof e<"u"){chartData=e,this.drawChart(this.generateOptions(chartData)),this.loading=!1;return}new Dashboard().dashboard(new Date(window.store.get("start")),new Date(window.store.get("end")),null).then(n=>{chartData=n.data,this.drawChart(this.generateOptions(n.data)),window.store.set(CACHE_KEY$3,chartData),this.loading=!1})},loadChart(){if(this.loading!==!0){if(this.loading=!0,chartData!==null){this.drawChart(this.generateOptions(chartData)),this.loading=!1;return}this.getFreshData()}},init(){Promise.all([getVariable("autoConversion",!1)]).then(t=>{this.autoConversion=t[0],afterPromises$3=!0,this.loadChart()}),window.store.observe("end",()=>{afterPromises$3&&(this.chartData=null,this.loadChart())}),window.store.observe("autoConversion",t=>{afterPromises$3&&(this.autoConversion=t,this.loadChart())})}});let Get$2=class{get(e){return api.get("/api/v2/transactions",{params:e})}};/*!
|
||
* chartjs-chart-sankey v0.12.0
|
||
* https://github.com/kurkle/chartjs-chart-sankey#readme
|
||
* (c) 2022 Jukka Kurkela
|
||
* Released under the MIT license
|
||
*/function toTextLines(t){const e=[],a=isArray$b(t)?t:isNullOrUndef(t)?[]:[t];for(;a.length;){const n=a.pop();typeof n=="string"?e.unshift.apply(e,n.split(`
|
||
`)):Array.isArray(n)?a.push.apply(a,n):isNullOrUndef(a)||e.unshift(""+n)}return e}function validateSizeValue(t){return!t||["min","max"].indexOf(t)===-1?"max":t}const defined=t=>t!==void 0;function calculateX(t,e){const a=new Set(e.map(o=>o.to)),n=new Set(e.map(o=>o.from)),r=new Set([...t.keys()]);let i=0;for(;r.size;){const o=nextColumn([...r],a);for(const s of o){const l=t.get(s);defined(l.x)||(l.x=i),r.delete(s)}r.size&&(a.clear(),e.filter(s=>r.has(s.from)).forEach(s=>a.add(s.to)),i++)}return[...t.keys()].filter(o=>!n.has(o)).forEach(o=>{const s=t.get(o);s.column||(s.x=i)}),i}function nextColumn(t,e){const a=t.filter(n=>!e.has(n));return a.length?a:t.slice(0,1)}const nodeByXY=(t,e)=>t.x!==e.x?t.x-e.x:t.y-e.y;let prevCountId=-1;function getCountId(){return prevCountId=prevCountId<100?prevCountId+1:0,prevCountId}function nodeCount(t,e,a=getCountId()){let n=0;for(const r of t)r.node._visited!==a&&(r.node._visited=a,n+=r.node[e].length+nodeCount(r.node[e],e,a));return n}const flowByNodeCount=t=>(e,a)=>nodeCount(e.node[t],t)-nodeCount(a.node[t],t)||e.node[t].length-a.node[t].length;function processFrom(t,e){t.from.sort(flowByNodeCount("from"));for(const a of t.from){const n=a.node;defined(n.y)||(n.y=e,processFrom(n,e)),e=Math.max(n.y+n.out,e)}return e}function processTo(t,e){t.to.sort(flowByNodeCount("to"));for(const a of t.to){const n=a.node;defined(n.y)||(n.y=e,processTo(n,e)),e=Math.max(n.y+n.in,e)}return e}function setOrGetY(t,e){return defined(t.y)?t.y:(t.y=e,e)}function processRest(t,e){const a=t.filter(c=>c.x===0),n=t.filter(c=>c.x===e),r=a.filter(c=>!defined(c.y)),i=n.filter(c=>!defined(c.y)),o=t.filter(c=>c.x>0&&c.x<e&&!defined(c.y));let s=a.reduce((c,d)=>Math.max(c,d.y+d.out||0),0),l=n.reduce((c,d)=>Math.max(c,d.y+d.in||0),0),u=0;return s>=l?(r.forEach(c=>{s=setOrGetY(c,s),s=Math.max(s+c.out,processTo(c,s))}),i.forEach(c=>{l=setOrGetY(c,l),l=Math.max(l+c.in,processTo(c,l))})):(i.forEach(c=>{l=setOrGetY(c,l),l=Math.max(l+c.in,processTo(c,l))}),r.forEach(c=>{s=setOrGetY(c,s),s=Math.max(s+c.out,processTo(c,s))})),o.forEach(c=>{let d=t.filter(h=>h.x===c.x&&defined(h.y)).reduce((h,m)=>Math.max(h,m.y+Math.max(m.in,m.out)),0);d=setOrGetY(c,d),d=Math.max(d+c.in,processFrom(c,d)),d=Math.max(d+c.out,processTo(c,d)),u=Math.max(u,d)}),Math.max(s,l,u)}function calculateY(t,e){t.sort((o,s)=>Math.max(s.in,s.out)-Math.max(o.in,o.out));const a=t[0];a.y=0;const n=processFrom(a,0),r=processTo(a,0),i=processRest(t,e);return Math.max(n,r,i)}function calculateYUsingPriority(t,e){let a=0,n=0;for(let r=0;r<=e;r++){let i=n;const o=t.filter(s=>s.x===r).sort((s,l)=>s.priority-l.priority);n=o[0].to.filter(s=>s.node.x>r+1).reduce((s,l)=>s+l.flow,0)||0;for(const s of o)s.y=i,i+=Math.max(s.out,s.in);a=Math.max(i,a)}return a}function addPadding(t,e){let a=1,n=0,r=0,i=0;const o=[];t.sort(nodeByXY);for(const s of t){if(s.y){if(s.x===0)o.push(s.y);else{for(n!==s.x&&(n=s.x,r=0),a=r+1;a<o.length&&!(o[a]>s.y);a++);r=a}s.y+=a*e,a++}i=Math.max(i,s.y+Math.max(s.in,s.out))}return i}function sortFlows(t,e){t.forEach(a=>{const n=Math[e](a.in||a.out,a.out||a.in),r=n<a.in,i=n<a.out;let o=0,s=a.from.length;a.from.sort((l,u)=>l.node.y+l.node.out/2-(u.node.y+u.node.out/2)).forEach((l,u)=>{r?l.addY=u*(n-l.flow)/(s-1):(l.addY=o,o+=l.flow)}),o=0,s=a.to.length,a.to.sort((l,u)=>l.node.y+l.node.in/2-(u.node.y+u.node.in/2)).forEach((l,u)=>{i?l.addY=u*(n-l.flow)/(s-1):(l.addY=o,o+=l.flow)})})}function layout(t,e,a,n){const r=[...t.values()],i=calculateX(t,e),s=(a?calculateYUsingPriority(r,i):calculateY(r,i))*.03,l=addPadding(r,s);return sortFlows(r,n),{maxX:i,maxY:l}}function buildNodesFromRawData(t){const e=new Map;for(let n=0;n<t.length;n++){const{from:r,to:i,flow:o}=t[n];if(!e.has(r))e.set(r,{key:r,in:0,out:o,from:[],to:[{key:i,flow:o,index:n}]});else{const s=e.get(r);s.out+=o,s.to.push({key:i,flow:o,index:n})}if(!e.has(i))e.set(i,{key:i,in:o,out:0,from:[{key:r,flow:o,index:n}],to:[]});else{const s=e.get(i);s.in+=o,s.from.push({key:r,flow:o,index:n})}}const a=(n,r)=>r.flow-n.flow;return[...e.values()].forEach(n=>{n.from=n.from.sort(a),n.from.forEach(r=>{r.node=e.get(r.key)}),n.to=n.to.sort(a),n.to.forEach(r=>{r.node=e.get(r.key)})}),e}function getAddY(t,e,a){for(const n of t)if(n.key===e&&n.index===a)return n.addY;return 0}class SankeyController extends DatasetController{parseObjectData(e,a,n,r){const{from:i="from",to:o="to",flow:s="flow"}=this.options.parsing,l=a.map(({[i]:_,[o]:D,[s]:k})=>({from:_,to:D,flow:k})),{xScale:u,yScale:c}=e,d=[],h=this._nodes=buildNodesFromRawData(l),{column:m,priority:p,size:v}=this.getDataset();if(p)for(const _ of h.values())_.key in p&&(_.priority=p[_.key]);if(m)for(const _ of h.values())_.key in m&&(_.column=!0,_.x=m[_.key]);const{maxX:y,maxY:w}=layout(h,l,!!p,validateSizeValue(v));this._maxX=y,this._maxY=w;for(let _=0,D=l.length;_<D;++_){const k=l[_],O=h.get(k.from),N=h.get(k.to),F=O.y+getAddY(O.to,k.to,_),g=N.y+getAddY(N.from,k.from,_);d.push({x:u.parse(O.x,_),y:c.parse(F,_),_custom:{from:O,to:N,x:u.parse(N.x,_),y:c.parse(g,_),height:c.parse(k.flow,_)}})}return d.slice(n,n+r)}getMinMax(e){return{min:0,max:e===this._cachedMeta.xScale?this._maxX:this._maxY}}update(e){const{data:a}=this._cachedMeta;this.updateElements(a,0,a.length,e)}updateElements(e,a,n,r){const{xScale:i,yScale:o}=this._cachedMeta,s=this.resolveDataElementOptions(a,r),l=this.getSharedOptions(r,e[a],s),u=this.getDataset(),c=valueOrDefault(u.borderWidth,1)/2+.5,d=valueOrDefault(u.nodeWidth,10);for(let h=a;h<a+n;h++){const m=this.getParsed(h),p=m._custom,v=o.getPixelForValue(m.y);this.updateElement(e[h],h,{x:i.getPixelForValue(m.x)+d+c,y:v,x2:i.getPixelForValue(p.x)-c,y2:o.getPixelForValue(p.y),from:p.from,to:p.to,progress:r==="reset"?0:1,height:Math.abs(o.getPixelForValue(m.y+p.height)-v),options:this.resolveDataElementOptions(h,r)},r)}this.updateSharedOptions(l,r)}_drawLabels(){const e=this._ctx,a=this._nodes||new Map,n=this.getDataset(),r=validateSizeValue(n.size),i=valueOrDefault(n.borderWidth,1),o=valueOrDefault(n.nodeWidth,10),s=n.labels,{xScale:l,yScale:u}=this._cachedMeta;e.save();const c=this.chart.chartArea;for(const d of a.values()){const h=l.getPixelForValue(d.x),m=u.getPixelForValue(d.y),p=Math[r](d.in||d.out,d.out||d.in),v=Math.abs(u.getPixelForValue(d.y+p)-m),y=s&&s[d.key]||d.key;let w=h;e.fillStyle=n.color||"black",e.textBaseline="middle",h<c.width/2?(e.textAlign="left",w+=o+i+4):(e.textAlign="right",w-=i+4),this._drawLabel(y,m,v,e,w)}e.restore()}_drawLabel(e,a,n,r,i){const o=toFont(this.options.font,this.chart.options.font),s=isNullOrUndef(e)?[]:toTextLines(e),l=s.length,u=a+n/2,c=o.lineHeight,d=valueOrDefault(this.options.padding,c/2);if(r.font=o.string,l>1){const h=u-c*l/2+d;for(let m=0;m<l;m++)r.fillText(s[m],i,h+m*c)}else r.fillText(e,i,u)}_drawNodes(){const e=this._ctx,a=this._nodes||new Map,n=this.getDataset(),r=validateSizeValue(n.size),{xScale:i,yScale:o}=this._cachedMeta,s=valueOrDefault(n.borderWidth,1),l=valueOrDefault(n.nodeWidth,10);e.save(),e.strokeStyle=n.borderColor||"black",e.lineWidth=s;for(const u of a.values()){e.fillStyle=u.color;const c=i.getPixelForValue(u.x),d=o.getPixelForValue(u.y),h=Math[r](u.in||u.out,u.out||u.in),m=Math.abs(o.getPixelForValue(u.y+h)-d);s&&e.strokeRect(c,d,l,m),e.fillRect(c,d,l,m)}e.restore()}draw(){const e=this._ctx,a=this.getMeta().data||[],n=[];for(let r=0,i=a.length;r<i;++r){const o=a[r];o.from.color=o.options.colorFrom,o.to.color=o.options.colorTo,o.active&&n.push(o)}for(const r of n)r.from.color=r.options.colorFrom,r.to.color=r.options.colorTo;this._drawNodes();for(let r=0,i=a.length;r<i;++r)a[r].draw(e);this._drawLabels()}}SankeyController.id="sankey";SankeyController.defaults={dataElementType:"flow",animations:{numbers:{type:"number",properties:["x","y","x2","y2","height"]},progress:{easing:"linear",duration:t=>t.type==="data"?(t.parsed._custom.x-t.parsed.x)*200:void 0,delay:t=>t.type==="data"?t.parsed.x*500+t.dataIndex*20:void 0},colors:{type:"color",properties:["colorFrom","colorTo"]}},transitions:{hide:{animations:{colors:{type:"color",properties:["colorFrom","colorTo"],to:"transparent"}}},show:{animations:{colors:{type:"color",properties:["colorFrom","colorTo"],from:"transparent"}}}}};SankeyController.overrides={interaction:{mode:"nearest",intersect:!0},datasets:{clip:!1,parsing:!0},plugins:{tooltip:{callbacks:{title(){return""},label(t){const e=t.dataset.data[t.dataIndex];return e.from+" -> "+e.to+": "+e.flow}}},legend:{display:!1}},scales:{x:{type:"linear",bounds:"data",display:!1,min:0,offset:!1},y:{type:"linear",bounds:"data",display:!1,min:0,reverse:!0,offset:!1}},layout:{padding:{top:3,left:3,right:13,bottom:3}}};const controlPoints=(t,e,a,n)=>t<a?{cp1:{x:t+(a-t)/3*2,y:e},cp2:{x:t+(a-t)/3,y:n}}:{cp1:{x:t-(t-a)/3,y:0},cp2:{x:a+(t-a)/3,y:0}},pointInLine=(t,e,a)=>({x:t.x+a*(e.x-t.x),y:t.y+a*(e.y-t.y)});function setStyle(t,{x:e,x2:a,options:n}){let r;n.colorMode==="from"?r=color(n.colorFrom).alpha(.5).rgbString():n.colorMode==="to"?r=color(n.colorTo).alpha(.5).rgbString():(r=t.createLinearGradient(e,0,a,0),r.addColorStop(0,color(n.colorFrom).alpha(.5).rgbString()),r.addColorStop(1,color(n.colorTo).alpha(.5).rgbString())),t.fillStyle=r,t.strokeStyle=r,t.lineWidth=.5}class Flow extends Element$1{constructor(e){super(),this.options=void 0,this.x=void 0,this.y=void 0,this.x2=void 0,this.y2=void 0,this.height=void 0,e&&Object.assign(this,e)}draw(e){const a=this,{x:n,x2:r,y:i,y2:o,height:s,progress:l}=a,{cp1:u,cp2:c}=controlPoints(n,i,r,o);l!==0&&(e.save(),l<1&&(e.beginPath(),e.rect(n,Math.min(i,o),(r-n)*l+1,Math.abs(o-i)+s+1),e.clip()),setStyle(e,a),e.beginPath(),e.moveTo(n,i),e.bezierCurveTo(u.x,u.y,c.x,c.y,r,o),e.lineTo(r,o+s),e.bezierCurveTo(c.x,c.y+s,u.x,u.y+s,n,i+s),e.lineTo(n,i),e.stroke(),e.closePath(),e.fill(),e.restore())}inRange(e,a,n){const{x:r,y:i,x2:o,y2:s,height:l}=this.getProps(["x","y","x2","y2","height"],n);if(e<r||e>o)return!1;const{cp1:u,cp2:c}=controlPoints(r,i,o,s),d=(e-r)/(o-r),h={x:r,y:i},m={x:o,y:s},p=pointInLine(h,u,d),v=pointInLine(u,c,d),y=pointInLine(c,m,d),w=pointInLine(p,v,d),_=pointInLine(v,y,d),D=pointInLine(w,_,d).y;return a>=D&&a<=D+l}inXRange(e,a){const{x:n,x2:r}=this.getProps(["x","x2"],a);return e>=n&&e<=r}inYRange(e,a){const{y:n,y2:r,height:i}=this.getProps(["y","y2","height"],a),o=Math.min(n,r),s=Math.max(n,r)+i;return e>=o&&e<=s}getCenterPoint(e){const{x:a,y:n,x2:r,y2:i,height:o}=this.getProps(["x","y","x2","y2","height"],e);return{x:(a+r)/2,y:(n+i+o)/2}}tooltipPosition(e){return this.getCenterPoint(e)}getRange(e){return e==="x"?this.width/2:this.height/2}}Flow.id="flow";Flow.defaults={colorFrom:"red",colorTo:"green",colorMode:"gradient",hoverColorFrom:(t,e)=>getHoverColor(e.colorFrom),hoverColorTo:(t,e)=>getHoverColor(e.colorTo)};Chart.register({SankeyController,Flow});const CACHE_KEY$2="dashboard-sankey-data";let i18n$2,afterPromises$2=!1,chart$1=null,transactions=[],autoConversion=!1,translations={category:null,unknown_category:null,in:null,out:null,unknown_source:null,unknown_dest:null,unknown_account:null,expense_account:null,revenue_account:null,budget:null,unknown_budget:null,all_money:null};const getColor=function(t){return t.includes(translations.revenue_account)?"forestgreen":t.includes("("+translations.in+",")?"green":t.includes(translations.budget)||t.includes(translations.unknown_budget)?"Orchid":t.includes("("+translations.out+",")?"MediumOrchid":t.includes(translations.all_money)?"blue":"red"};function getObjectName(t,e,a,n){if(t==="category"&&e!==null&&a==="in")return translations.category+' "'+e+'" ('+translations.in+(autoConversion?", "+n+")":")");if(t==="category"&&e===null&&a==="in")return translations.unknown_category+" ("+translations.in+(autoConversion?", "+n+")":")");if(t==="category"&&e!==null&&a==="out")return translations.category+' "'+e+'" ('+translations.out+(autoConversion?", "+n+")":")");if(t==="category"&&e===null&&a==="out")return translations.unknown_category+" ("+translations.out+(autoConversion?", "+n+")":")");if(t==="account"&&e===null&&a==="in")return translations.unknown_source+(autoConversion?" ("+n+")":"");if(t==="account"&&e!==null&&a==="in")return translations.revenue_account+'"'+e+'"'+(autoConversion?" ("+n+")":"");if(t==="account"&&e===null&&a==="out")return translations.unknown_dest+(autoConversion?" ("+n+")":"");if(t==="account"&&e!==null&&a==="out")return translations.expense_account+' "'+e+'"'+(autoConversion?" ("+n+")":"");if(t==="budget"&&e!==null)return translations.budget+' "'+e+'"'+(autoConversion?" ("+n+")":"");if(t==="budget"&&e===null)return translations.unknown_budget+(autoConversion?" ("+n+")":"");console.error('Cannot handle: type:"'+t+'", dir: "'+a+'"')}function getLabelName(t,e,a){if(t==="category"&&e!==null)return translations.category+' "'+e+'"'+(autoConversion?" ("+a+")":"");if(t==="category"&&e===null)return translations.unknown_category+(autoConversion?" ("+a+")":"");if(t==="account"&&e===null)return translations.unknown_account+(autoConversion?" ("+a+")":"");if(t==="account"&&e!==null)return e+(autoConversion?" ("+a+")":"");if(t==="budget"&&e!==null)return translations.budget+' "'+e+'"'+(autoConversion?" ("+a+")":"");if(t==="budget"&&e===null)return translations.unknown_budget+(autoConversion?" ("+a+")":"");console.error('Cannot handle: type:"'+t+'"')}const sankey=()=>({loading:!1,autoConversion:!1,generateOptions(){let t=getDefaultChartSettings("sankey"),e={},a={};for(let r in transactions)if(transactions.hasOwnProperty(r)){let i=transactions[r];for(let o in i.attributes.transactions)if(i.attributes.transactions.hasOwnProperty(o)){let s=i.attributes.transactions[o],l=this.autoConversion?s.native_code:s.currency_code,u=this.autoConversion?parseFloat(s.native_amount):parseFloat(s.amount),c;if(s.type==="deposit"){let d=getObjectName("category",s.category_name,"in",l),h=getObjectName("account",s.source_name,"in",l);a[d]=getLabelName("category",s.category_name,l),a[h]=getLabelName("account",s.source_name,l),c=h+"-"+d+"-"+l,e.hasOwnProperty(c)||(e[c]={from:h,to:d,amount:0}),e[c].amount+=u,c=d+"-"+translations.all_money+"-"+l,e.hasOwnProperty(c)||(e[c]={from:d,to:translations.all_money+(this.autoConversion?" ("+l+")":""),amount:0}),e[c].amount+=u}if(s.type==="withdrawal"){let d=getObjectName("budget",s.budget_name,"out",l);a[d]=getLabelName("budget",s.budget_name,l),c=translations.all_money+"-"+d+"-"+l,e.hasOwnProperty(c)||(e[c]={from:translations.all_money+(this.autoConversion?" ("+l+")":""),to:d,amount:0}),e[c].amount+=u;let h=getObjectName("category",s.category_name,"out",l);a[h]=getLabelName("category",s.category_name,l),c=d+"-"+h+"-"+l,e.hasOwnProperty(c)||(e[c]={from:d,to:h,amount:0}),e[c].amount+=u;let m=getObjectName("account",s.destination_name,"out",l);a[m]=getLabelName("account",s.destination_name,l),c=h+"-"+m+"-"+l,e.hasOwnProperty(c)||(e[c]={from:h,to:m,amount:0}),e[c].amount+=u}}}let n={label:"Firefly III dashboard sankey chart",data:[],colorFrom:r=>getColor(r.dataset.data[r.dataIndex].from),colorTo:r=>getColor(r.dataset.data[r.dataIndex].to),colorMode:"gradient",labels:a,size:"min"};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r];n.data.push({from:i.from,to:i.to,flow:i.amount})}return t.data.datasets.push(n),t},drawChart(t){if(chart$1!==null){chart$1.data.datasets=t.data.datasets,chart$1.update();return}chart$1=new Chart(document.querySelector("#sankey-chart"),t)},getFreshData(){const t=window.store.get("cacheValid");let e=window.store.get(CACHE_KEY$2);if(t&&typeof e<"u"){transactions=e,this.drawChart(this.generateOptions()),this.loading=!1;return}let a={start:window.store.get("start").slice(0,10),end:window.store.get("end").slice(0,10),type:"withdrawal,deposit",page:1};this.downloadTransactions(a)},downloadTransactions(t){new Get$2().get(t).then(a=>{if(transactions=[...transactions,...a.data.data],parseInt(a.data.meta.pagination.total_pages)>t.page){t.page++,this.downloadTransactions(t);return}window.store.set(CACHE_KEY$2,transactions),this.drawChart(this.generateOptions()),this.loading=!1})},loadChart(){if(this.loading!==!0){if(this.loading=!0,transactions.length!==0){this.drawChart(this.generateOptions()),this.loading=!1;return}this.getFreshData()}},init(){transactions=[],Promise.all([getVariable("autoConversion",!1),getVariable("language","en-US")]).then(t=>{this.autoConversion=t[0],autoConversion=t[0],i18n$2=new I18n,i18n$2.locale=t[1],loadTranslations(i18n$2,t[1]).then(()=>{translations.all_money=i18n$2.t("firefly.all_money"),translations.category=i18n$2.t("firefly.category"),translations.in=i18n$2.t("firefly.money_flowing_in"),translations.out=i18n$2.t("firefly.money_flowing_out"),translations.unknown_category=i18n$2.t("firefly.unknown_category_plain"),translations.unknown_source=i18n$2.t("firefly.unknown_source_plain"),translations.unknown_dest=i18n$2.t("firefly.unknown_dest_plain"),translations.unknown_account=i18n$2.t("firefly.unknown_any_plain"),translations.unknown_budget=i18n$2.t("firefly.unknown_budget_plain"),translations.expense_account=i18n$2.t("firefly.expense_account"),translations.revenue_account=i18n$2.t("firefly.revenue_account"),translations.budget=i18n$2.t("firefly.budget"),afterPromises$2=!0,this.loadChart()})}),window.store.observe("end",()=>{afterPromises$2&&(this.transactions=[],this.loadChart())}),window.store.observe("autoConversion",t=>{afterPromises$2&&(this.autoConversion=t,this.loadChart())})}});let Get$1=class{get(e){return api.get("/api/v2/subscriptions",{params:e})}paid(e){return api.get("/api/v2/subscriptions/sum/paid",{params:e})}unpaid(e){return api.get("/api/v2/subscriptions/sum/unpaid",{params:e})}};const CACHE_KEY$1="dashboard-subscriptions-data";let chart=null,afterPromises$1=!1,i18n$1;const subscriptions=()=>({loading:!1,autoConversion:!1,loadChart(){this.loading!==!0&&(this.loading=!0,this.getFreshData())},drawChart(t){if(chart!==null){chart.data.datasets=t.data.datasets,chart.update();return}chart=new Chart(document.querySelector("#subscriptions-chart"),t)},getFreshData(){const t=window.store.get("cacheValid");let e=window.store.get(CACHE_KEY$1);if(t&&typeof e<"u"){this.drawChart(this.generateOptions(e)),this.loading=!1;return}const a=new Get$1;let n={start:format$1(new Date(window.store.get("start")),"y-MM-dd"),end:format$1(new Date(window.store.get("end")),"y-MM-dd")};a.paid(n).then(r=>{let i=r.data;a.unpaid(n).then(o=>{let s=o.data,l={paid:i,unpaid:s};window.store.set(CACHE_KEY$1,l),this.drawChart(this.generateOptions(l)),this.loading=!1})})},generateOptions(t){let e=getDefaultChartSettings("pie");e.data.labels=[i18n$1.t("firefly.paid"),i18n$1.t("firefly.unpaid")],e.data.datasets=[];let a={};for(let n in t.paid)if(t.paid.hasOwnProperty(n)){let r=t.paid[n],i=this.autoConversion?r.native_code:r.currency_code,o=this.autoConversion?r.native_sum:r.sum;a.hasOwnProperty(i)||(a[i]={paid:0,unpaid:0}),a[i].paid+=parseFloat(o)*-1}for(let n in t.unpaid)if(t.unpaid.hasOwnProperty(n)){let r=t.unpaid[n],i=this.autoConversion?r.native_code:r.currency_code,o=this.autoConversion?r.native_sum:r.sum;a.hasOwnProperty(i)||(a[i]={paid:0,unpaid:0}),a[i].unpaid+=parseFloat(o)}for(let n in a)if(a.hasOwnProperty(n)){let r=a[n];e.data.datasets.push({label:n,data:[r.paid,r.unpaid],backgroundColor:["rgb(54, 162, 235)","rgb(255, 99, 132)"]})}return e},init(){Promise.all([getVariable("autoConversion",!1),getVariable("language","en-US")]).then(t=>{this.autoConversion=t[0],afterPromises$1=!0,i18n$1=new I18n,i18n$1.locale=t[1],loadTranslations(i18n$1,t[1]).then(()=>{this.loading===!1&&this.loadChart()})}),window.store.observe("end",()=>{afterPromises$1&&this.loading===!1&&(this.chartData=null,this.loadChart())}),window.store.observe("autoConversion",t=>{afterPromises$1&&(this.autoConversion=t,this.loading===!1&&this.loadChart())})}});class Get{get(e){return api.get("/api/v2/piggy-banks",{params:e})}}let apiData={},afterPromises=!1,i18n;const CACHE_KEY="dashboard-piggies-data",piggies=()=>({loading:!1,autoConversion:!1,sankeyGrouping:"account",piggies:[],getFreshData(){const t=window.store.get("cacheValid");let e=window.store.get(CACHE_KEY);if(t&&typeof e<"u"){apiData=e,this.parsePiggies(),this.loading=!1;return}let a={start:window.store.get("start").slice(0,10),end:window.store.get("end").slice(0,10),page:1};this.downloadPiggyBanks(a)},downloadPiggyBanks(t){new Get().get(t).then(a=>{if(apiData=[...apiData,...a.data.data],parseInt(a.data.meta.pagination.total_pages)>t.page){t.page++,this.downloadPiggyBanks(t);return}window.store.set(CACHE_KEY,apiData),this.parsePiggies(),this.loading=!1})},parsePiggies(){let t=[];for(let e in apiData)if(apiData.hasOwnProperty(e)){let a=apiData[e];if(a.attributes.percentage>=100||a.attributes.percentage===0)continue;let n=a.object_group_title??i18n.t("firefly.default_group_title_name_plain");t.hasOwnProperty(n)||(t[n]={id:a.object_group_id??0,title:n,order:a.object_group_order??0,piggies:[]});let r={id:a.id,name:a.attributes.name,percentage:parseInt(a.attributes.percentage),amount:this.autoConversion?a.attributes.native_current_amount:a.attributes.current_amount,left_to_save:this.autoConversion?a.attributes.native_left_to_save:a.attributes.left_to_save,target_amount:this.autoConversion?a.attributes.native_target_amount:a.attributes.target_amount,save_per_month:this.autoConversion?a.attributes.native_save_per_month:a.attributes.save_per_month,currency_code:this.autoConversion?a.attributes.native_code:a.attributes.currency_code};t[n].piggies.push(r)}this.piggies=Object.values(t)},loadPiggyBanks(){if(this.loading!==!0){if(this.loading=!0,this.piggies.length!==0){this.parsePiggies(),this.loading=!1;return}this.getFreshData()}},init(){apiData=[],Promise.all([getVariable("autoConversion",!1),getVariable("language","en-US")]).then(t=>{i18n=new I18n,i18n.locale=t[1],loadTranslations(i18n,t[1]).then(()=>{afterPromises=!0,this.autoConversion=t[0],this.loadPiggyBanks()})}),window.store.observe("end",()=>{afterPromises&&(apiData=[],this.loadPiggyBanks())}),window.store.observe("autoConversion",t=>{afterPromises&&(this.autoConversion=t,this.loadPiggyBanks())})}});/*!
|
||
* chartjs-adapter-date-fns v3.0.0
|
||
* https://www.chartjs.org
|
||
* (c) 2022 chartjs-adapter-date-fns Contributors
|
||
* Released under the MIT license
|
||
*/const FORMATS={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};adapters._date.override({_id:"date-fns",formats:function(){return FORMATS},parse:function(t,e){if(t===null||typeof t>"u")return null;const a=typeof t;return a==="number"||t instanceof Date?t=toDate(t):a==="string"&&(typeof e=="string"?t=parse$1(t,e,new Date,this.options):t=parseISO(t,this.options)),isValid(t)?t.getTime():null},format:function(t,e){return format$1(t,e,this.options)},add:function(t,e,a){switch(a){case"millisecond":return addMilliseconds(t,e);case"second":return addSeconds(t,e);case"minute":return addMinutes(t,e);case"hour":return addHours(t,e);case"day":return addDays(t,e);case"week":return addWeeks(t,e);case"month":return addMonths(t,e);case"quarter":return addQuarters(t,e);case"year":return addYears(t,e);default:return t}},diff:function(t,e,a){switch(a){case"millisecond":return differenceInMilliseconds(t,e);case"second":return differenceInSeconds(t,e);case"minute":return differenceInMinutes(t,e);case"hour":return differenceInHours(t,e);case"day":return differenceInDays(t,e);case"week":return differenceInWeeks(t,e);case"month":return differenceInMonths(t,e);case"quarter":return differenceInQuarters(t,e);case"year":return differenceInYears(t,e);default:return 0}},startOf:function(t,e,a){switch(e){case"second":return startOfSecond(t);case"minute":return startOfMinute(t);case"hour":return startOfHour(t);case"day":return startOfDay(t);case"week":return startOfWeek(t);case"isoWeek":return startOfWeek(t,{weekStartsOn:+a});case"month":return startOfMonth(t);case"quarter":return startOfQuarter(t);case"year":return startOfYear(t);default:return t}},endOf:function(t,e){switch(e){case"second":return endOfSecond(t);case"minute":return endOfMinute(t);case"hour":return endOfHour(t);case"day":return endOfDay(t);case"week":return endOfWeek(t);case"month":return endOfMonth(t);case"quarter":return endOfQuarter(t);case"year":return endOfYear(t);default:return t}}});Chart.register({LineController,LineElement,ArcElement,BarController,TimeScale,PieController,BarElement,Filler:index$1,Colors:plugin_colors,LinearScale,CategoryScale,PointElement,Tooltip:plugin_tooltip,Legend:plugin_legend});const comps={dates,boxes,accounts,budgets,categories,sankey,subscriptions,piggies};function loadPage(t){Object.keys(t).forEach(e=>{console.log(`Loading page component "${e}"`);let a=t[e]();Alpine.data(e,()=>a)}),Alpine.start()}document.addEventListener("firefly-iii-bootstrapped",()=>{loadPage(comps)});window.bootstrapped&&loadPage(comps);
|