import{n as e}from"./chunk-62oNxeRG.js";import{n as t}from"./useTranslation-DypAWQ0w.js";import{n,r,t as i}from"./landing-D7nOuCYq.js";var a=e=>typeof e==`string`,o=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},s=e=>e==null?``:String(e),c=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},l=/###/g,u=e=>e&&e.includes(`###`)?e.replace(l,`.`):e,d=e=>!e||a(e),f=(e,t,n)=>{let r=a(t)?t.split(`.`):t,i=0;for(;i{let{obj:r,k:i}=f(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=f(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=f(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},m=(e,t,n,r)=>{let{obj:i,k:a}=f(e,t,Object);i[a]=i[a]||[],i[a].push(n)},h=(e,t)=>{let{obj:n,k:r}=f(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},g=(e,t,n)=>{let r=h(e,n);return r===void 0?h(t,n):r},_=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?a(e[r])||e[r]instanceof String||a(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):_(e[r],t[r],n):e[r]=t[r]);return e},v=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),y={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},b=e=>a(e)?e.replace(/[&<>"'\/]/g,e=>y[e]):e,x=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},S=[` `,`,`,`?`,`!`,`;`],C=new x(20),w=(e,t,n)=>{t||=``,n||=``;let r=S.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=C.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},T=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;ee?.replace(/_/g,`-`),D={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},O=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||D,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>a(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),a(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},k=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r{for(let i=0;i-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,o=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,s;e.includes(`.`)?s=e.split(`.`):(s=[e,t],n&&(Array.isArray(n)?s.push(...n):a(n)&&i?s.push(...n.split(i)):s.push(n)));let c=h(this.data,s);return!c&&!t&&!n&&e.includes(`.`)&&(e=s[0],t=s[1],n=s.slice(2).join(`.`)),c||!o||!a(n)?c:T(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),p(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(a(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=h(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?_(s,n,i):s={...s,...n},p(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},te={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},ne=Symbol(`i18next/PATH_KEY`);function re(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===ne?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function A(e,t){let{[ne]:n}=e(re()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var ie=e=>!a(e)&&typeof e!=`boolean`&&typeof e!=`number`,ae=class e extends k{constructor(e,t={}){super(),c([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=O.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=ie(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.includes(n),s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!w(e,n,r);if(o&&!s){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:a(i)?[i]:i};let o=e.split(n);(n!==r||n===r&&this.options.ns.includes(o[0]))&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:a(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=A(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?A(e,{...this.options,...i}):String(e));let o=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,s=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:c,namespaces:l}=this.extractFromKey(t[t.length-1],i),u=l[l.length-1],d=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;d===void 0&&(d=`:`);let f=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()===`cimode`)return p?o?{res:`${u}${d}${c}`,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${d}${c}`:o?{res:c,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:c;let m=this.resolve(t,i),h=m?.res,g=m?.usedKey||c,_=m?.exactUsedKey||c,v=[`[object Number]`,`[object Function]`,`[object RegExp]`],y=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!a(i.count),S=e.hasDefaultValue(i),C=x?this.pluralResolver.getSuffix(f,i.count,i):``,w=i.ordinal&&x?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):``,T=x&&!i.ordinal&&i.count===0,E=T&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${C}`]||i[`defaultValue${w}`]||i.defaultValue,D=h;b&&!h&&S&&(D=E);let O=ie(D),k=Object.prototype.toString.apply(D);if(b&&D&&O&&!v.includes(k)&&!(a(y)&&Array.isArray(D))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,D,{...i,ns:l}):`key '${c} (${this.language})' returned an object instead of string.`;return o?(m.res=e,m.usedParams=this.getUsedParamsDetails(i),m):e}if(s){let e=Array.isArray(D),t=e?[]:{},n=e?_:g;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let r=`${n}${s}${e}`;S&&!h?t[e]=this.translate(r,{...i,defaultValue:ie(E)?E[e]:void 0,joinArrays:!1,ns:l}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:l}),t[e]===r&&(t[e]=D[e])}h=t}}else if(b&&a(y)&&Array.isArray(h))h=h.join(y),h&&=this.extendTranslation(h,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(h)&&S&&(e=!0,h=E),this.isValidLookup(h)||(n=!0,h=c);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:h,o=S&&E!==h&&this.options.updateMissing;if(n||e||o){if(this.logger.log(o?`updateKey`:`missingKey`,f,u,c,o?E:h),s){let e=this.resolve(c,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n{let r=S&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,r,o,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,r,o,i),this.emit(`missingKey`,e,u,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);T&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],c+t,i[`defaultValue${t}`]||E)})}):n(e,c,E))}h=this.extendTranslation(h,t,i,m,r),n&&h===c&&this.options.appendNamespaceToMissingKey&&(h=`${u}${d}${c}`),(n||e)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${c}`:c,e?h:void 0,i))}return o?(m.res=h,m.usedParams=this.getUsedParamsDetails(i),m):h}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let o=a(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),s;if(o){let t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=n.replace&&!a(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||r.usedLng,n),o){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;si?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let o=n.postProcess||this.options.postProcess,s=a(o)?[o]:o;return e!=null&&s?.length&&n.applyPostProcessor!==!1&&(e=te.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,o,s;return a(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?A(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let c=this.extractFromKey(e,t),l=c.key;r=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let d=t.count!==void 0&&!a(t.count),f=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(a(t.context)||typeof t.context==`number`)&&t.context!==``,m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(s=e,!this.checkedLoadedFor[`${m[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(this.checkedLoadedFor[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(`, `)}" won't get resolved as namespace "${s}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),m.forEach(r=>{if(this.isValidLookup(n))return;o=r;let a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&e.startsWith(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),a.push(l+e),f&&a.push(l+n)),p){let r=`${l}${this.options.contextSeparator||`_`}${t.context}`;a.push(r),d&&(t.ordinal&&e.startsWith(i)&&a.push(r+e.replace(i,this.options.pluralSeparator)),a.push(r+e),f&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!a(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},oe=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=O.create(`languageUtils`)}getScriptPartFromCode(e){if(e=E(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=E(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(a(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),a(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return a(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):a(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},se={zero:0,one:1,two:2,few:3,many:4,other:5},ce={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},le=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=O.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=E(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),ce;if(!e.match(/-|_/))return ce;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>se[e]-se[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},ue=(e,t,n,r=`.`,i=!0)=>{let o=g(e,t,n);return!o&&i&&a(n)&&(o=T(e,n,r),o===void 0&&(o=T(t,n,r))),o},de=e=>e.replace(/\$/g,`$$$$`),fe=class{constructor(e={}){this.logger=O.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?b:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?v(i):a||`{{`,this.suffix=o?v(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?v(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?v(l):``,this.nestingPrefix=d?v(d):f||v(`$t(`),this.nestingSuffix=p?v(p):m||v(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,c,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(!e.includes(this.formatSeparator)){let i=ue(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(ue(t,l,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let d=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>de(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?de(this.escape(e)):de(e)}].forEach(t=>{for(c=0;i=t.regex.exec(e);){let n=i[1].trim();if(o=u(n),o===void 0)if(typeof d==`function`){let t=d(e,i,r);o=a(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o=``;else if(f){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=``;else !a(o)&&!this.useRawValueToEscape&&(o=s(o));let l=t.safeValue(o);if(e=e.replace(i[0],l),f?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,o,c=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${v(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);let a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let l=[];o={...n},o=o.replace&&!a(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(u!==-1&&(l=r[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,u)),i=t(c.call(this,r[1].trim(),o),o),i&&r[0]===e&&!a(i))return i;a(i)||(i=s(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),l.length&&(i=l.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},pe=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},me=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(E(r),i),t[o]=s),s(n)}},he=e=>(t,n,r)=>e(E(n),r)(t),ge=class{constructor(e={}){this.logger=O.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?me:he;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=me(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&!i[0].includes(`)`)&&i.find(e=>e.includes(`)`))){let e=i.findIndex(e=>e.includes(`)`));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=pe(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},_e=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},ve=class extends k{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=O.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{m(n.loaded,[i],a),_e(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();a(e)&&(e=this.languageUtils.toResolveHierarchy(e)),a(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},ye=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),a(e[1])&&(t.defaultValue=e[1]),a(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),be=e=>(a(e.ns)&&(e.ns=[e.ns]),a(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),a(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),xe=()=>{},Se=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},j=class e extends k{constructor(e={},t){if(super(),this.options=be(e),this.services={},this.logger=O,this.modules={external:[]},Se(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(a(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=ye();this.options={...n,...this.options,...be(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?O.init(r(this.modules.logger),this.options):O.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ge;let t=new oe(this.options);this.store=new ee(this.options.resources,this.options);let n=this.services;n.logger=O,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new le(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new fe(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new ve(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new ae(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=xe,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=o(),s=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),i}loadResources(e,t=xe){let n=t,r=a(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=o();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=xe,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&te.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},s=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=a(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(a(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{i(e,o)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=A(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=A(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=A(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return a(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=o();return this.options.ns?(a(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=o();a(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new oe(ye());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=xe){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new ee(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...ye().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new fe(n)}return a.translator=new ae(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();j.createInstance,j.dir,j.init,j.loadResources,j.reloadResources,j.use,j.changeLanguage,j.getFixedT,j.t,j.exists,j.setDefaultNamespace,j.hasLoadedNamespace,j.loadNamespaces,j.loadLanguages;var{slice:Ce,forEach:we}=[];function Te(e){return we.call(Ce.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Ee(e){return typeof e==`string`?[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e)):!1}var De=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Oe=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!De.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!De.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},ke={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Oe(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},Me={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},M=null,Ne=()=>{if(M!==null)return M;try{if(M=typeof window<`u`&&window.localStorage!==null,!M)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{M=!1}return M},Pe={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&Ne())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Ne()&&window.localStorage.setItem(n,e)}},N=null,Fe=()=>{if(N!==null)return N;try{if(N=typeof window<`u`&&window.sessionStorage!==null,!N)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{N=!1}return N},Ie={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&Fe())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Fe()&&window.sessionStorage.setItem(n,e)}},Le={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n0?t:void 0}},Re={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},ze={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},Be={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},Ve=!1;try{document.cookie,Ve=!0}catch{}var He=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];Ve||He.splice(1,1);var Ue=()=>({order:He,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),We=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Te(t,this.options||{},Ue()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Ae),this.addDetector(je),this.addDetector(Pe),this.addDetector(Ie),this.addDetector(Le),this.addDetector(Re),this.addDetector(ze),this.addDetector(Be),this.addDetector(Me)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!Ee(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}};We.type=`languageDetector`,j.use(We).use(t).init({resources:{"zh-CN":{common:{button:{confirm:`确认`,cancel:`取消`,save:`保存`,delete:`删除`,edit:`编辑`,add:`添加`,close:`关闭`,back:`返回`,refresh:`刷新`,export:`导出`,selectAll:`全选`,deselectAll:`取消全选`,retry:`重试`,reload:`重新加载`,collapse:`收起`,viewCandidates:`查看候选`},status:{loading:`加载中...`,error:`加载失败`,empty:`暂无数据`,success:`操作成功`},nav:{dashboard:`工作台`,newSchedule:`生成排班`,history:`排班历史`,credits:`我的积分`,logout:`退出登录`,user:`用户`,creditsDisplay:`{{count}} 积分`,closeMenu:`关闭菜单`,openMenu:`打开菜单`},confirm:{deleteTitle:`确认删除`,deleteMessage:`此操作不可撤销,确定要删除吗?`,yes:`确定`,no:`取消`},language:{zhCN:`简体中文`,zhTW:`繁體中文`,en:`English`},legal:{backToLogin:`返回登录`,lastUpdated:`最近更新日期:{{date}}`,privacy:{title:`隐私政策`},terms:{title:`服务协议`}},dashboard:{welcomeBack:`欢迎回来,{{name}}`,greeting:{0:`周日好,享受悠闲的一天吧`,1:`周一啦,又是元气满满的一周`,2:`周二加油,保持好节奏`,3:`周三,一周过半,继续冲`,4:`周四了,胜利就在眼前`,5:`周五到,周末近在咫尺`,6:`周六好,今天是工作还是休息呢`},stats:{creditsBalance:`积分余额`,totalSchedules:`排班总数`,inProgress:`进行中`},quickActions:{title:`快捷操作`,newSchedule:{title:`生成排班`,description:`创建新的排班计划`},history:{title:`排班历史`,description:`查看历史排班记录`},credits:{title:`我的积分`,description:`查看积分余额和明细`}},recentSchedules:{title:`最近排班`,viewAll:`查看全部`,columns:{period:`排班周期`,status:`状态`,createdAt:`创建时间`,actions:`操作`},viewDetail:`查看详情`,loadError:`加载排班记录失败,请重试`,empty:`暂无排班记录`,createFirst:`创建第一个排班`}}},auth:{appName:`排班宝`,title:`AI智能排班软件`,subtitle:`面向非固定班次团队的智能排班工具`,brandHeadline:`让排班变得简单高效`,brandSubtitle:`简单配置,智能生成 专为非固定班次团队设计的自动排班软件`,welcome:`欢迎回来`,phone:`手机号`,password:`密码`,phonePlaceholder:`请输入手机号`,passwordPlaceholder:`请输入密码(至少6位)`,showPassword:`显示密码`,hidePassword:`隐藏密码`,processing:`处理中...`,loginRegister:`登录 / 注册`,login:`登录`,register:`注册`,loginTab:`登录`,registerTab:`注册`,agreePrefix:`同意并接受`,termsLink:`《服务协议》`,and:`和`,privacyLink:`《隐私政策》`,newUserHint:`新用户将自动注册并获赠`,creditsGift:`10 积分`,registerSuccess:`注册成功!已赠送 10 积分`,loginSuccess:`登录成功`,smsTab:`验证码登录`,passwordTab:`密码登录`,smsCode:`验证码`,smsCodePlaceholder:`请输入 6 位验证码`,sendCode:`发送验证码`,resendCode:`重新发送`,codeSent:`验证码已发送`,countdown:`{{seconds}} 秒后重新发送`,confirmRegister:`确认注册`,back:`返回`,error:{loginFailed:`登录失败,请检查手机号和密码`,registerFailed:`注册失败,请重试`,agreeRequired:`请先同意服务协议与隐私政策`,phoneRequired:`请输入手机号`,phoneInvalid:`请输入正确的手机号`,passwordRequired:`请输入密码`,passwordTooShort:`密码至少6位`,authFailed:`认证失败`,smsCodeRequired:`请输入验证码`,smsCodeInvalid:`验证码格式错误`,sendFailed:`验证码发送失败,请重试`}},schedule:{new:{title:`新建排班`,pageTitle:`生成排班`,pageSubtitle:`按步骤配置排班信息,快速生成排班表`,step:{shifts:`班次列表`,employees:`员工管理`,constraints:`排班要求`,generate:`生成排班`,shiftsAndEmployees:`班次与员工`,scheduleConfig:`排班配置`},shift:{add:`添加班次`,edit:`编辑班次`,delete:`删除班次`,name:`班次名称`,startTime:`开始时间`,endTime:`结束时间`,minStaff:`最少人数`,empty:`暂无班次,请添加`,section:`班次列表`,countBadge:`({{count}}个)`,emptyNew:`暂无班次,请先添加`,incompleteHint:`时间信息不完整,请在班次设置中完善`,importIncompleteHint:`时间信息不完整,导入后请完善`,timeRuleLabel:`时间规则`,addTimeRule:`+ 添加规则`,applicableDays:`适用日期`,differentTimeHint:`可以为工作日和周末分别设置不同的时间`,colorLabel:`颜色`,namePlaceholder:`如:早班、晚班`},employee:{add:`添加员工`,edit:`编辑员工`,delete:`删除员工`,name:`姓名`,role:`角色`,contractType:`合同类型`,fulltime:`全职`,parttime:`兼职`,empty:`暂无员工,请添加`,section:`员工列表`,countBadge:`({{count}}人)`,emptyNew:`暂无员工,请先添加`,incompleteHint:`岗位信息缺失,请完善员工信息`,nameLabel:`员工姓名`,codeLabel:`员工编号`,codePlaceholder:`可选`,roleLabel:`岗位`,rolePlaceholder:`如:收银员、理货员`},constraint:{placeholder:`请用自然语言描述排班要求,例如:每人每周最多工作5天,相邻班次间隔至少8小时...`,label:`排班要求`,optional:`排班要求(可选)`,examples:[`每人每周工作5天`,`连续工作不超过5天`,`某班次优先安排某某`,`某班次只排某某`,`某班次不排某某`,`某某优先安排某班次`,`某某只排某班次`,`某某不排某班次`,`周六周日最多_人休息`,`晚班次日不能安排早班`,`某某本周休假`]},generate:{button:`生成排班`,generating:`生成中...`,assignRestForUnassigned:`班次已满时,为未排班员工安排休息`},summary:{shiftsEmployees:`{{shifts}} 个班次 · {{employees}} 名员工`,andMore:`等{{count}}个`,andMorePeople:`等{{count}}人`},action:{edit:`编辑`,nextStep:`下一步`,prevStep:`上一步`,collapse:`收起`,modify:`修改`,add:`添加`,batchDelete:`批量删除`,selected:`已选 {{count}} 个`,confirmDelete:`删除 ({{count}})`,cancel:`取消`,selectAll:`全选`,deselectAll:`取消全选`},period:{start:`开始日期`,end:`结束日期`},assignRest:{description:`每天既未排班也未安排休息的员工将被安排休息日`},credits:{info:`当前积分:{{count}},生成一次消耗 1 积分`},file:{import:`导入文件`,parsing:`解析中...`,costCredits:`(消耗2积分)`,clear:`清空`,clearTitle:`清空所有班次和员工`,importPreview:`导入预览`,parseResult:`解析结果预览`,importHint:`仅提取上传文档中包含的班次和员工,如有遗漏请导入后自行添加`,constraintLabel:`建议的排班要求`,constraintNote:`(可编辑,确认后追加到排班配置)`,constraintPlaceholder:`LLM 将根据排班表规律自动生成排班要求建议…`,confirming:`导入中...`,confirmImport:`确认添加`},day:{sun:`周日`,mon:`周一`,tue:`周二`,wed:`周三`,thu:`周四`,fri:`周五`,sat:`周六`,sunShort:`日`,monShort:`一`,tueShort:`二`,wedShort:`三`,thuShort:`四`,friShort:`五`,satShort:`六`},needData:`请先添加班次和员工`,incompleteShiftsTooltip:`以下班次时间信息不完整,请先完善:{{names}}`,error:{selectPeriod:`请选择排班周期`,periodOrder:`开始日期不能晚于结束日期`,noShifts:`请先添加至少一个班次`,noEmployees:`请先添加至少一个员工`,createSchedule:`创建排班失败`,updateShift:`更新班次失败`,createShift:`创建班次失败`,updateEmployee:`更新员工失败`,createEmployee:`创建员工失败`,delete:`删除失败`,clear:`清空失败`,import:`导入失败`,upload:`上传失败`,parseFile:`文件解析失败`,parseTimeout:`文件解析超时(超过120秒),请重试`},confirm:{deleteShift:`确定要删除这个班次吗?`,deleteEmployee:`确定要删除这个员工吗?`,clearAll:`确定要清空所有班次和员工吗?此操作不可撤销。`},step1:{tabNL:`快捷输入`,tabExcel:`Excel 导入`,tabImage:`图片导入`,tabManual:`手动配置`},nl:{shiftsLabel:`班次`,employeesLabel:`员工`,parseBtn:`解析并预览`,errorShiftsRequired:`请输入班次信息`,errorEmployeesRequired:`请输入员工信息`,errorShiftTimeMissing:`第 {{line}} 行班次缺少时间范围(格式:HH:MM-HH:MM)`,parseFailed:`解析失败,请重试`,shiftsPlaceholder:`早班,周一至周日 8:00-14:00 中班,周一至周日 14:00-22:00 夜班,周一至周日 22:00-06:00`,employeesPlaceholder:`张三,10001 李四,10002 王五,10003`},excel:{downloadTemplate:`下载示例文件`,templateHint:`包含班次和员工的排班表`,downloadBtn:`下载`,selectBtn:`点击选择 Excel 文件`,releaseHint:`松开以上传`,costCredits:`消耗 1 积分`},image:{dropHint:`拖拽图片到此处`,releaseHint:`松开以上传`,clickHint:`点击选择文件`,costCredits:`消耗 2 积分`,parsingHint:`AI大模型解析中,需要10秒左右,请耐心等候...`}},result:{title:`排班结果`,tableView:`表格视图`,calendarView:`日历视图`,export:`导出 Excel`,regenerate:`重新生成`,rest:`休息`,unassigned:`未排班`,editMode:`编辑模式`,saveChanges:`保存修改`,cancelEdit:`取消编辑`,explanation:`排班说明`,statistics:`排班统计`,violations:`约束冲突`,noViolations:`无冲突`,error:{loadFailed:`加载排班结果失败`,saveFailed:`保存修改失败`,exportFailed:`导出失败`},pageLoading:`加载中...`,notFound:`未找到排班数据`,backToNew:`返回新建`,backToHistory:`返回排班历史`,exportFilenamePrefix:`排班表_`,emptyShift:`(空)`,generating:`正在生成排班,请稍候...`,generatingHint:`页面会自动刷新`,failed:`排班生成失败`,days:`({{count}}天)`,totalAssignments:`排班数:{{count}}`,totalEmployees:`员工:{{count}}`,autoRest:`空缺自动休息`,keepUnassigned:`保留未排班状态`,constraints:`排班要求`,generatedAt:`生成于 {{datetime}}`,clickTip:`点击班次单元格可修改班次、设为休息或发起与其他格的交换`,regenerateConfirm:`重新生成排班将消耗 1 积分,确定继续吗?`,regenerateFailed:`重新生成失败`,noData:`暂无排班数据`,employee:`员工`,unknownShift:`未知班次`,currentRest:`当前:休息`,currentUnassigned:`当前:未排班`,changeShift:`更改班次`,noOtherShifts:`无其他可用班次`,setRest:`设为休息`,selectForSwap:`选中此格,交换班次`,setToRest:`已设为休息`,foundCandidates:`发现 {{count}} 位员工可替班`,noCandidates:`当天暂无空闲员工`,freeToday:`当天空闲`,hasShiftAdjustable:`有班次(可调整)`,arrangeReplacement:`安排替班`,swapSelected:`已选中 {{shiftName}}({{date}}),请点击需要交换的班次单元格`,swapSelectedShort:`已选 {{shiftName}},点击目标格`,confirmSwap:`确认交换班次?`,employeeA:`员工 A`,employeeB:`员工 B`,swapViolationWarning:`注意:交换后存在约束冲突`,swapping:`交换中...`,forceSwap:`仍然交换`,confirmSwapBtn:`确认交换`,loadFailed:`加载失败`,excel:{worksheet:`排班表`,employeeCode:`员工编号`,employee:`员工`,shift:`班次`,time:`时间`,rest:`休息`,unassigned:`未排班`}},status:{pending:`等待中`,processing:`生成中`,completed:`已完成`,failed:`失败`},progress:{start:`开始生成排班...`,parsing:`解析约束条件...`,solving:`排班求解中...`,done:`排班生成完成`}},history:{title:`排班历史`,subtitle:`查看和管理历史排班记录`,empty:`暂无排班历史`,emptyDescription:`开始创建您的第一个排班计划`,createSchedule:`创建排班`,generateSchedule:`生成排班`,days:`{{count}} 天`,generationCount:`已生成 {{count}} 次`,error:{loadFailed:`加载历史记录失败`},columns:{period:`排班周期`,status:`状态`,createdAt:`创建时间`,actions:`操作`},action:{view:`查看`,delete:`删除`}},credits:{title:`我的积分`,subtitle:`查看积分余额和充值/消耗记录`,balance:`当前积分`,currentBalance:`当前积分余额`,topUp:`充值积分`,topUpComingSoon:`积分充值功能即将上线,敬请期待!`,empty:`暂无积分记录`,loading:`加载中...`,usageInfo:{title:`积分使用说明`,registerGift:`新用户注册赠送 10 积分`,scheduleGenerate:`每次生成排班消耗 1 积分`,excelImport:`Excel 导入解析消耗 1 积分`,imageImport:`图片导入解析消耗 2 积分`},transactionHistory:`积分记录`,error:{loadFailed:`加载积分记录失败`},columns:{type:`类型`,amount:`变动`,balance:`余额`,createdAt:`时间`},type:{register:`注册赠送`,file_import:`导入文件`,schedule_generate:`生成排班`,refund:`退款返还`,topup:`积分充值`},reason:{register:`注册赠送`,schedule:`排班生成`,refund:`积分退还`},topup:{title:`积分充值`,selectAmount:`选择充值金额`,selectPayment:`选择支付方式`,wechat:`微信支付`,alipay:`支付宝`,bankTransfer:`银行转账`,comingSoon:`即将开放`,bankInfo:`转账信息`,bankName:`银行`,accountName:`户名`,accountNumber:`账号`,amount:`金额`,noteReminder:`请转账时在备注栏填写订单号`,submit:`提交订单`,submitting:`提交中...`,pendingTitle:`待付款`,orderNumber:`订单号`,copyOrderNumber:`复制订单号`,copied:`已复制`,expireReminder:`请在 24 小时内完成银行转账,并在备注栏填写上方订单号,运营确认收款后将自动充值积分`,transferNote:`转账备注`,close:`关闭`,creditsUnit:`积分`,yuan:`元`,submitError:`提交失败,请重试`,noPackages:`暂无可用套餐`}},landing:r},"zh-TW":{common:{button:{confirm:`確認`,cancel:`取消`,save:`儲存`,delete:`刪除`,edit:`編輯`,add:`新增`,close:`關閉`,back:`返回`,refresh:`重新整理`,export:`匯出`,selectAll:`全選`,deselectAll:`取消全選`,retry:`重試`,reload:`重新載入`,collapse:`收起`,viewCandidates:`查看候選`},status:{loading:`載入中...`,error:`載入失敗`,empty:`暫無資料`,success:`操作成功`},nav:{dashboard:`工作台`,newSchedule:`產生排班`,history:`排班歷史`,credits:`我的積分`,logout:`登出`,user:`用戶`,creditsDisplay:`{{count}} 積分`,closeMenu:`關閉選單`,openMenu:`開啟選單`},confirm:{deleteTitle:`確認刪除`,deleteMessage:`此操作不可撤銷,確定要刪除嗎?`,yes:`確定`,no:`取消`},language:{zhCN:`简体中文`,zhTW:`繁體中文`,en:`English`},legal:{backToLogin:`返回登入`,lastUpdated:`最近更新日期:{{date}}`,privacy:{title:`隱私政策`},terms:{title:`服務協議`}},dashboard:{welcomeBack:`歡迎回來,{{name}}`,greeting:{0:`週日好,享受悠閒的一天吧`,1:`週一啦,又是元氣滿滿的一週`,2:`週二加油,保持好節奏`,3:`週三,一週過半,繼續衝`,4:`週四了,勝利就在眼前`,5:`週五到,週末近在咫尺`,6:`週六好,今天是工作還是休息呢`},stats:{creditsBalance:`積分餘額`,totalSchedules:`排班總數`,inProgress:`進行中`},quickActions:{title:`快捷操作`,newSchedule:{title:`產生排班`,description:`建立新的排班計畫`},history:{title:`排班歷史`,description:`查看歷史排班記錄`},credits:{title:`我的積分`,description:`查看積分餘額和明細`}},recentSchedules:{title:`最近排班`,viewAll:`查看全部`,columns:{period:`排班周期`,status:`狀態`,createdAt:`建立時間`,actions:`操作`},viewDetail:`查看詳情`,loadError:`載入排班記錄失敗,請重試`,empty:`尚無排班記錄`,createFirst:`建立第一個排班`}}},auth:{appName:`排班寶`,title:`AI智能排班軟件`,subtitle:`面向非固定班次團隊的智能排班工具`,brandHeadline:`讓排班變得簡單高效`,brandSubtitle:`簡單配置,智能生成 專為非固定班次團隊設計的自動排班軟件`,welcome:`歡迎回來`,phone:`手機號`,password:`密碼`,phonePlaceholder:`請輸入手機號`,passwordPlaceholder:`請輸入密碼(至少6位)`,showPassword:`顯示密碼`,hidePassword:`隱藏密碼`,processing:`處理中...`,loginRegister:`登入 / 註冊`,login:`登入`,register:`註冊`,loginTab:`登入`,registerTab:`註冊`,agreePrefix:`同意並接受`,termsLink:`《服務協議》`,and:`和`,privacyLink:`《隱私政策》`,newUserHint:`新用戶將自動註冊並獲贈`,creditsGift:`10 積分`,registerSuccess:`註冊成功!已贈送 10 積分`,loginSuccess:`登入成功`,smsTab:`驗證碼登入`,passwordTab:`密碼登入`,smsCode:`驗證碼`,smsCodePlaceholder:`請輸入 6 位驗證碼`,sendCode:`發送驗證碼`,resendCode:`重新發送`,codeSent:`驗證碼已發送`,countdown:`{{seconds}} 秒後重新發送`,confirmRegister:`確認註冊`,back:`返回`,error:{loginFailed:`登入失敗,請檢查手機號和密碼`,registerFailed:`註冊失敗,請重試`,agreeRequired:`請先同意服務協議與隱私政策`,phoneRequired:`請輸入手機號`,phoneInvalid:`請輸入正確的手機號`,passwordRequired:`請輸入密碼`,passwordTooShort:`密碼至少6位`,authFailed:`認證失敗`,smsCodeRequired:`請輸入驗證碼`,smsCodeInvalid:`驗證碼格式錯誤`,sendFailed:`驗證碼發送失敗,請重試`}},schedule:{new:{title:`新建排班`,pageTitle:`產生排班`,pageSubtitle:`按步驟配置排班資訊,快速產生排班表`,step:{shifts:`班次列表`,employees:`員工管理`,constraints:`排班要求`,generate:`產生排班`,shiftsAndEmployees:`班次與員工`,scheduleConfig:`排班配置`},shift:{add:`新增班次`,edit:`編輯班次`,delete:`刪除班次`,name:`班次名稱`,startTime:`開始時間`,endTime:`結束時間`,minStaff:`最少人數`,empty:`尚無班次,請新增`,section:`班次列表`,countBadge:`({{count}}個)`,emptyNew:`尚無班次,請先新增`,incompleteHint:`時間資訊不完整,請在班次設定中完善`,importIncompleteHint:`時間資訊不完整,匯入後請完善`,timeRuleLabel:`時間規則`,addTimeRule:`+ 新增規則`,applicableDays:`適用日期`,differentTimeHint:`可以為工作日和週末分別設定不同的時間`,colorLabel:`顏色`,namePlaceholder:`如:早班、晚班`},employee:{add:`新增員工`,edit:`編輯員工`,delete:`刪除員工`,name:`姓名`,role:`角色`,contractType:`合約類型`,fulltime:`全職`,parttime:`兼職`,empty:`尚無員工,請新增`,section:`員工列表`,countBadge:`({{count}}人)`,emptyNew:`尚無員工,請先新增`,incompleteHint:`職位資訊缺失,請完善員工資訊`,nameLabel:`員工姓名`,codeLabel:`員工編號`,codePlaceholder:`選填`,roleLabel:`職位`,rolePlaceholder:`如:收銀員、理貨員`},constraint:{placeholder:`請用自然語言描述排班要求,例如:每人每週最多工作 5 天,相鄰班次間隔至少 8 小時...`,label:`排班要求`,optional:`排班要求(選填)`,examples:[`每人每週工作5天`,`連續工作不超過5天`,`某班次優先安排某某`,`某班次只排某某`,`某班次不排某某`,`某某優先安排某班次`,`某某只排某班次`,`某某不排某班次`,`週六週日最多_人休息`,`晚班次日不能安排早班`,`某某本週休假`]},generate:{button:`產生排班`,generating:`產生中...`,assignRestForUnassigned:`班次已滿時,為未排班員工安排休息`},summary:{shiftsEmployees:`{{shifts}} 個班次 · {{employees}} 名員工`,andMore:`等{{count}}個`,andMorePeople:`等{{count}}人`},action:{edit:`編輯`,nextStep:`下一步`,prevStep:`上一步`,collapse:`收起`,modify:`修改`,add:`新增`,batchDelete:`批量刪除`,selected:`已選 {{count}} 個`,confirmDelete:`刪除 ({{count}})`,cancel:`取消`,selectAll:`全選`,deselectAll:`取消全選`},period:{start:`開始日期`,end:`結束日期`},assignRest:{description:`每天既未排班也未安排休息的員工將被安排休息日`},credits:{info:`目前積分:{{count}},產生一次消耗 1 積分`},file:{import:`匯入檔案`,parsing:`解析中...`,costCredits:`(消耗2積分)`,clear:`清空`,clearTitle:`清空所有班次和員工`,importPreview:`匯入預覽`,parseResult:`解析結果預覽`,importHint:`僅提取上傳文件中包含的班次和員工,如有遺漏請匯入後自行新增`,constraintLabel:`建議的排班要求`,constraintNote:`(可編輯,確認後追加到排班配置)`,constraintPlaceholder:`LLM 將根據排班表規律自動產生排班要求建議…`,confirming:`匯入中...`,confirmImport:`確認新增`},day:{sun:`週日`,mon:`週一`,tue:`週二`,wed:`週三`,thu:`週四`,fri:`週五`,sat:`週六`,sunShort:`日`,monShort:`一`,tueShort:`二`,wedShort:`三`,thuShort:`四`,friShort:`五`,satShort:`六`},needData:`請先新增班次和員工`,incompleteShiftsTooltip:`以下班次時間資訊不完整,請先完善:{{names}}`,error:{selectPeriod:`請選擇排班週期`,periodOrder:`開始日期不能晚於結束日期`,noShifts:`請先新增至少一個班次`,noEmployees:`請先新增至少一個員工`,createSchedule:`建立排班失敗`,updateShift:`更新班次失敗`,createShift:`建立班次失敗`,updateEmployee:`更新員工失敗`,createEmployee:`建立員工失敗`,delete:`刪除失敗`,clear:`清空失敗`,import:`匯入失敗`,upload:`上傳失敗`,parseFile:`檔案解析失敗`,parseTimeout:`檔案解析逾時(超過120秒),請重試`},confirm:{deleteShift:`確定要刪除這個班次嗎?`,deleteEmployee:`確定要刪除這個員工嗎?`,clearAll:`確定要清空所有班次和員工嗎?此操作不可撤銷。`},step1:{tabNL:`快捷輸入`,tabExcel:`Excel 匯入`,tabImage:`圖片匯入`,tabManual:`手動設定`},nl:{shiftsLabel:`班次`,employeesLabel:`員工`,parseBtn:`解析並預覽`,errorShiftsRequired:`請輸入班次資訊`,errorEmployeesRequired:`請輸入員工資訊`,errorShiftTimeMissing:`第 {{line}} 行班次缺少時間範圍(格式:HH:MM-HH:MM)`,parseFailed:`解析失敗,請重試`,shiftsPlaceholder:`早班,週一至週日 8:00-14:00 中班,週一至週日 14:00-22:00 夜班,週一至週日 22:00-06:00`,employeesPlaceholder:`張三,10001 李四,10002 王五,10003`},excel:{downloadTemplate:`下載示例文件`,templateHint:`包含班次與員工的排班表`,downloadBtn:`下載`,selectBtn:`點擊選擇 Excel 檔案`,releaseHint:`放開以上傳`,costCredits:`消耗 1 點數`},image:{dropHint:`拖曳圖片至此`,releaseHint:`放開以上傳`,clickHint:`點擊選擇檔案`,costCredits:`消耗 2 點數`,parsingHint:`AI大模型解析中,需要10秒左右,請耐心等候...`}},result:{title:`排班結果`,tableView:`表格檢視`,calendarView:`行事曆檢視`,export:`匯出 Excel`,regenerate:`重新產生`,rest:`休息`,unassigned:`未排班`,editMode:`編輯模式`,saveChanges:`儲存修改`,cancelEdit:`取消編輯`,explanation:`排班說明`,statistics:`排班統計`,violations:`約束衝突`,noViolations:`無衝突`,error:{loadFailed:`載入排班結果失敗`,saveFailed:`儲存修改失敗`,exportFailed:`匯出失敗`},pageLoading:`載入中...`,notFound:`未找到排班資料`,backToNew:`返回新建`,backToHistory:`返回排班歷史`,exportFilenamePrefix:`排班表_`,emptyShift:`(空)`,generating:`正在產生排班,請稍候...`,generatingHint:`頁面會自動重新整理`,failed:`排班產生失敗`,days:`({{count}}天)`,totalAssignments:`排班數:{{count}}`,totalEmployees:`員工:{{count}}`,autoRest:`空缺自動休息`,keepUnassigned:`保留未排班狀態`,constraints:`排班要求`,generatedAt:`產生於 {{datetime}}`,clickTip:`點擊班次儲存格可修改班次、設為休息或發起與其他格的交換`,regenerateConfirm:`重新產生排班將消耗 1 積分,確定繼續嗎?`,regenerateFailed:`重新產生失敗`,noData:`暫無排班資料`,employee:`員工`,unknownShift:`未知班次`,currentRest:`目前:休息`,currentUnassigned:`目前:未排班`,changeShift:`更改班次`,noOtherShifts:`無其他可用班次`,setRest:`設為休息`,selectForSwap:`選中此格,交換班次`,setToRest:`已設為休息`,foundCandidates:`發現 {{count}} 位員工可替班`,noCandidates:`當天暫無空閒員工`,freeToday:`當天空閒`,hasShiftAdjustable:`有班次(可調整)`,arrangeReplacement:`安排替班`,swapSelected:`已選中 {{shiftName}}({{date}}),請點擊需要交換的班次儲存格`,swapSelectedShort:`已選 {{shiftName}},點擊目標格`,confirmSwap:`確認交換班次?`,employeeA:`員工 A`,employeeB:`員工 B`,swapViolationWarning:`注意:交換後存在約束衝突`,swapping:`交換中...`,forceSwap:`仍然交換`,confirmSwapBtn:`確認交換`,loadFailed:`載入失敗`,excel:{worksheet:`排班表`,employeeCode:`員工編號`,employee:`員工`,shift:`班次`,time:`時間`,rest:`休息`,unassigned:`未排班`}},status:{pending:`等待中`,processing:`產生中`,completed:`已完成`,failed:`失敗`},progress:{start:`開始產生排班...`,parsing:`解析約束條件...`,solving:`排班求解中...`,done:`排班產生完成`}},history:{title:`排班歷史`,subtitle:`查看和管理歷史排班記錄`,empty:`尚無排班歷史`,emptyDescription:`開始建立您的第一個排班計畫`,createSchedule:`建立排班`,generateSchedule:`產生排班`,days:`{{count}} 天`,generationCount:`已產生 {{count}} 次`,error:{loadFailed:`載入歷史記錄失敗`},columns:{period:`排班周期`,status:`狀態`,createdAt:`建立時間`,actions:`操作`},action:{view:`查看`,delete:`刪除`}},credits:{title:`我的積分`,subtitle:`查看積分餘額和儲值/消耗記錄`,balance:`目前積分`,currentBalance:`目前積分餘額`,topUp:`儲值積分`,topUpComingSoon:`積分儲值功能即將上線,敬請期待!`,empty:`尚無積分記錄`,loading:`載入中...`,usageInfo:{title:`積分使用說明`,registerGift:`新用戶註冊贈送 10 積分`,scheduleGenerate:`每次產生排班消耗 1 點數`,excelImport:`Excel 匯入解析消耗 1 點數`,imageImport:`圖片匯入解析消耗 2 點數`},transactionHistory:`積分記錄`,error:{loadFailed:`載入積分記錄失敗`},columns:{type:`類型`,amount:`異動`,balance:`餘額`,createdAt:`時間`},type:{register:`註冊贈送`,file_import:`匯入檔案`,schedule_generate:`產生排班`,refund:`退款返還`,topup:`積分儲值`},reason:{register:`註冊贈送`,schedule:`排班產生`,refund:`積分退還`},topup:{title:`積分儲值`,selectAmount:`選擇儲值金額`,selectPayment:`選擇支付方式`,wechat:`微信支付`,alipay:`支付寶`,bankTransfer:`銀行轉帳`,comingSoon:`即將開放`,bankInfo:`轉帳資訊`,bankName:`銀行`,accountName:`戶名`,accountNumber:`帳號`,amount:`金額`,noteReminder:`請在轉帳備註欄填寫訂單號`,submit:`提交訂單`,submitting:`提交中...`,pendingTitle:`待付款`,orderNumber:`訂單號`,copyOrderNumber:`複製訂單號`,copied:`已複製`,expireReminder:`請在 24 小時內完成銀行轉帳,並在備註欄填寫上方訂單號,運營確認收款後將自動儲值積分`,transferNote:`轉帳備註`,close:`關閉`,creditsUnit:`積分`,yuan:`元`,submitError:`提交失敗,請重試`,noPackages:`目前無可用方案`}},landing:n},en:{landing:i}},defaultNS:`common`,fallbackLng:`zh-CN`,detection:{order:[`localStorage`,`navigator`],lookupLocalStorage:`language`,caches:[`localStorage`]},interpolation:{escapeValue:!1}});var Ge=j;function Ke(e,t){return function(){return e.apply(t,arguments)}}var{toString:qe}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:Ye,toStringTag:Xe}=Symbol,Ze=(e=>t=>{let n=qe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>Ze(t)===e),Qe=e=>t=>typeof t===e,{isArray:F}=Array,I=Qe(`undefined`);function L(e){return e!==null&&!I(e)&&e.constructor!==null&&!I(e.constructor)&&R(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var $e=P(`ArrayBuffer`);function et(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&$e(e.buffer),t}var tt=Qe(`string`),R=Qe(`function`),nt=Qe(`number`),z=e=>typeof e==`object`&&!!e,rt=e=>e===!0||e===!1,it=e=>{if(Ze(e)!==`object`)return!1;let t=Je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Xe in e)&&!(Ye in e)},at=e=>{if(!z(e)||L(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ot=P(`Date`),st=P(`File`),ct=e=>!!(e&&e.uri!==void 0),lt=e=>e&&e.getParts!==void 0,ut=P(`Blob`),dt=P(`FileList`),ft=e=>z(e)&&R(e.pipe);function pt(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var mt=pt(),ht=mt.FormData===void 0?void 0:mt.FormData,gt=e=>{if(!e)return!1;if(ht&&e instanceof ht)return!0;let t=Je(e);if(!t||t===Object.prototype||!R(e.append))return!1;let n=Ze(e);return n===`formdata`||n===`object`&&R(e.toString)&&e.toString()===`[object FormData]`},_t=P(`URLSearchParams`),[vt,yt,bt,xt]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(P),St=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function B(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),F(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var V=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,wt=e=>!I(e)&&e!==V;function Tt(){let{caseless:e,skipUndefined:t}=wt(this)&&this||{},n={},r=(r,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=e&&Ct(n,i)||i;it(n[a])&&it(r)?n[a]=Tt(n[a],r):it(r)?n[a]=Tt({},r):F(r)?n[a]=r.slice():(!t||!I(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e(B(t,(t,r)=>{n&&R(t)?Object.defineProperty(e,r,{value:Ke(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Dt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ot=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},kt=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Je(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},At=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},jt=e=>{if(!e)return null;if(F(e))return e;let t=e.length;if(!nt(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},Mt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Je(Uint8Array)),Nt=(e,t)=>{let n=(e&&e[Ye]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Pt=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ft=P(`HTMLFormElement`),It=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Lt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Rt=P(`RegExp`),zt=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};B(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Bt=e=>{zt(e,(t,n)=>{if(R(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(R(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Vt=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return F(e)?r(e):r(String(e).split(t)),n},Ht=()=>{},Ut=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Wt(e){return!!(e&&R(e.append)&&e[Xe]===`FormData`&&e[Ye])}var Gt=e=>{let t=Array(10),n=(e,r)=>{if(z(e)){if(t.indexOf(e)>=0)return;if(L(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=F(e)?[]:{};return B(e,(e,t)=>{let a=n(e,r+1);!I(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},Kt=P(`AsyncFunction`),qt=e=>e&&(z(e)||R(e))&&R(e.then)&&R(e.catch),Jt=((e,t)=>e?setImmediate:t?((e,t)=>(V.addEventListener(`message`,({source:n,data:r})=>{n===V&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),V.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,R(V.postMessage)),H={isArray:F,isArrayBuffer:$e,isBuffer:L,isFormData:gt,isArrayBufferView:et,isString:tt,isNumber:nt,isBoolean:rt,isObject:z,isPlainObject:it,isEmptyObject:at,isReadableStream:vt,isRequest:yt,isResponse:bt,isHeaders:xt,isUndefined:I,isDate:ot,isFile:st,isReactNativeBlob:ct,isReactNative:lt,isBlob:ut,isRegExp:Rt,isFunction:R,isStream:ft,isURLSearchParams:_t,isTypedArray:Mt,isFileList:dt,forEach:B,merge:Tt,extend:Et,trim:St,stripBOM:Dt,inherits:Ot,toFlatObject:kt,kindOf:Ze,kindOfTest:P,endsWith:At,toArray:jt,forEachEntry:Nt,matchAll:Pt,isHTMLForm:Ft,hasOwnProperty:Lt,hasOwnProp:Lt,reduceDescriptors:zt,freezeMethods:Bt,toObjectSet:Vt,toCamelCase:It,noop:Ht,toFiniteNumber:Ut,findKey:Ct,global:V,isContextDefined:wt,isSpecCompliantForm:Wt,toJSONObject:Gt,isAsyncFn:Kt,isThenable:qt,setImmediate:Jt,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(V):typeof process<`u`&&process.nextTick||Jt,isIterable:e=>e!=null&&R(e[Ye])},U=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){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:H.toJSONObject(this.config),code:this.code,status:this.status}}};U.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,U.ERR_BAD_OPTION=`ERR_BAD_OPTION`,U.ECONNABORTED=`ECONNABORTED`,U.ETIMEDOUT=`ETIMEDOUT`,U.ERR_NETWORK=`ERR_NETWORK`,U.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,U.ERR_DEPRECATED=`ERR_DEPRECATED`,U.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,U.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,U.ERR_CANCELED=`ERR_CANCELED`,U.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,U.ERR_INVALID_URL=`ERR_INVALID_URL`,U.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function Yt(e){return H.isPlainObject(e)||H.isArray(e)}function Xt(e){return H.endsWith(e,`[]`)?e.slice(0,-2):e}function Zt(e,t,n){return e?e.concat(t).map(function(e,t){return e=Xt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Qt(e){return H.isArray(e)&&!e.some(Yt)}var $t=H.toFlatObject(H,{},null,function(e){return/^is[A-Z]/.test(e)});function en(e,t,n){if(!H.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!H.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(H.isDate(e))return e.toISOString();if(H.isBoolean(e))return e.toString();if(!l&&H.isBlob(e))throw new U(`Blob is not supported. Use a Buffer instead.`);return H.isArrayBuffer(e)||H.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(H.isReactNative(t)&&H.isReactNativeBlob(e))return t.append(Zt(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(H.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(H.isArray(e)&&Qt(e)||(H.isFileList(e)||H.endsWith(n,`[]`))&&(s=H.toArray(e)))return n=Xt(n),s.forEach(function(e,r){!(H.isUndefined(e)||e===null)&&t.append(o===!0?Zt([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return Yt(e)?!0:(t.append(Zt(i,n,a),u(e)),!1)}let f=[],p=Object.assign($t,{defaultVisitor:d,convertValue:u,isVisitable:Yt});function m(e,n,r=0){if(!H.isUndefined(e)){if(r>c)throw new U(`Object is too deeply nested (`+r+` levels). Max depth: `+c,U.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),H.forEach(e,function(e,a){(!(H.isUndefined(e)||e===null)&&i.call(t,e,H.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!H.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function tn(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function nn(e,t){this._pairs=[],e&&en(e,this,t)}var rn=nn.prototype;rn.append=function(e,t){this._pairs.push([e,t])},rn.toString=function(e){let t=e?function(t){return e.call(this,t,tn)}:tn;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function an(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function on(e,t,n){if(!t)return e;let r=n&&n.encode||an,i=H.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):H.isURLSearchParams(t)?t.toString():new nn(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var sn=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,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&&=[]}forEach(e){H.forEach(this.handlers,function(t){t!==null&&e(t)})}},cn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ln={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:nn,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},un=e({hasBrowserEnv:()=>dn,hasStandardBrowserEnv:()=>pn,hasStandardBrowserWebWorkerEnv:()=>mn,navigator:()=>fn,origin:()=>hn}),dn=typeof window<`u`&&typeof document<`u`,fn=typeof navigator==`object`&&navigator||void 0,pn=dn&&(!fn||[`ReactNative`,`NativeScript`,`NS`].indexOf(fn.product)<0),mn=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,hn=dn&&window.location.href||`http://localhost`,W={...un,...ln};function gn(e,t){return en(e,new W.classes.URLSearchParams,{visitor:function(e,t,n,r){return W.isNode&&H.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function _n(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function vn(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r=e.length;return a=!a&&H.isArray(r)?r.length:a,s?(H.hasOwnProp(r,a)?r[a]=H.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!r[a]||!H.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&H.isArray(r[a])&&(r[a]=vn(r[a])),!o)}if(H.isFormData(e)&&H.isFunction(e.entries)){let n={};return H.forEachEntry(e,(e,r)=>{t(_n(e),r,n,0)}),n}return null}var G=(e,t)=>e!=null&&H.hasOwnProp(e,t)?e[t]:void 0;function bn(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var K={transitional:cn,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=H.isObject(e);if(i&&H.isHTMLForm(e)&&(e=new FormData(e)),H.isFormData(e))return r?JSON.stringify(yn(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=G(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return gn(e,t).toString();if((a=H.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=G(this,`env`),r=n&&n.FormData;return en(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),bn(e)):e}],transformResponse:[function(e){let t=G(this,`transitional`)||K.transitional,n=t&&t.forcedJSONParsing,r=G(this,`responseType`),i=r===`json`;if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,G(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?U.from(e,U.ERR_BAD_RESPONSE,this,null,G(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:W.classes.FormData,Blob:W.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};H.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{K.headers[e]={}});var xn=H.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`]),Sn=e=>{let t={},n,r,i;return e&&e.split(` `).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&xn[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},Cn=Symbol(`internals`),wn=/[^\x09\x20-\x7E\x80-\xFF]/g;function Tn(e){let t=0,n=e.length;for(;tt;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function q(e){return e&&String(e).trim().toLowerCase()}function En(e){return Tn(e.replace(wn,``))}function Dn(e){return e===!1||e==null?e:H.isArray(e)?e.map(Dn):En(String(e))}function On(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var kn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function An(e,t,n,r,i){if(H.isFunction(r))return r.call(this,t,n);if(i&&(t=n),H.isString(t)){if(H.isString(r))return t.indexOf(r)!==-1;if(H.isRegExp(r))return r.test(t)}}function jn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Mn(e,t){let n=H.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var J=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=q(t);if(!i)throw Error(`header name must be a non-empty string`);let a=H.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=Dn(e))}let a=(e,t)=>H.forEach(e,(e,n)=>i(e,n,t));if(H.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(H.isString(e)&&(e=e.trim())&&!kn(e))a(Sn(e),t);else if(H.isObject(e)&&H.isIterable(e)){let n={},r,i;for(let t of e){if(!H.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?H.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=q(e),e){let n=H.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return On(e);if(H.isFunction(t))return t.call(this,e,n);if(H.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=q(e),e){let n=H.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||An(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=q(e),e){let i=H.findKey(n,e);i&&(!t||An(n,n[i],i,t))&&(delete n[i],r=!0)}}return H.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||An(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return H.forEach(this,(r,i)=>{let a=H.findKey(n,i);if(a){t[a]=Dn(r),delete t[i];return}let o=e?jn(i):String(i).trim();o!==i&&delete t[i],t[o]=Dn(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return H.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&H.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` `)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Cn]=this[Cn]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=q(e);t[r]||(Mn(n,e),t[r]=!0)}return H.isArray(e)?e.forEach(r):r(e),this}};J.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),H.reduceDescriptors(J.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),H.freezeMethods(J);function Nn(e,t){let n=this||K,r=t||n,i=J.from(r.headers),a=r.data;return H.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Pn(e){return!!(e&&e.__CANCEL__)}var Y=class extends U{constructor(e,t,n){super(e??`canceled`,U.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Fn(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new U(`Request failed with status code `+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function In(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function Ln(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var zn=(e,t,n=3)=>{let r=0,i=Ln(50,250);return Rn(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Bn=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Vn=e=>(...t)=>H.asap(()=>e(...t)),Hn=W.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,W.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(W.origin),W.navigator&&/(msie|trident)/i.test(W.navigator.userAgent)):()=>!0,Un=W.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];H.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),H.isString(r)&&s.push(`path=${r}`),H.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),H.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Wn(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Gn(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function Kn(e,t,n){let r=!Wn(t);return e&&(r||n===!1)?Gn(e,t):t}var qn=e=>e instanceof J?{...e}:e;function X(e,t){t||={};let n={};function r(e,t,n,r){return H.isPlainObject(e)&&H.isPlainObject(t)?H.merge.call({caseless:r},e,t):H.isPlainObject(t)?H.merge({},t):H.isArray(t)?t.slice():t}function i(e,t,n,i){if(!H.isUndefined(t))return r(e,t,n,i);if(!H.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!H.isUndefined(t))return r(void 0,t)}function o(e,t){if(!H.isUndefined(t))return r(void 0,t);if(!H.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(H.hasOwnProp(t,a))return r(n,i);if(H.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken: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:(e,t,n)=>i(qn(e),qn(t),n,!0)};return H.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=H.hasOwnProp(c,r)?c[r]:i,o=a(H.hasOwnProp(e,r)?e[r]:void 0,H.hasOwnProp(t,r)?t[r]:void 0,r);H.isUndefined(o)&&a!==s||(n[r]=o)}),n}var Jn=e=>{let t=X({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=J.from(o),t.url=on(Kn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``))),H.isFormData(n)){if(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(H.isFunction(n.getHeaders)){let e=n.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}}if(W.hasStandardBrowserEnv&&(H.isFunction(r)&&(r=r(t)),r===!0||r==null&&Hn(t.url))){let e=i&&a&&Un.read(a);e&&o.set(i,e)}return t},Yn=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=Jn(e),i=r.data,a=J.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=J.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Fn(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new U(`Request aborted`,U.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new U(t&&t.message?t.message:`Network Error`,U.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||cn;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new U(t,i.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&H.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),H.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=zn(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=zn(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new Y(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=In(r.url);if(_&&W.protocols.indexOf(_)===-1){n(new U(`Unsupported protocol `+_+`:`,U.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Xn=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof U?t:new Y(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new U(`timeout of ${t}ms exceeded`,U.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>H.asap(o),s}},Zn=function*(e,t){let n=e.byteLength;if(!t||n{let i=Qn(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},tr=64*1024,{isFunction:nr}=H,rr=(({Request:e,Response:t})=>({Request:e,Response:t}))(H.global),{ReadableStream:ir,TextEncoder:ar}=H.global,or=(e,...t)=>{try{return!!e(...t)}catch{return!1}},sr=e=>{e=H.merge.call({skipUndefined:!0},rr,e);let{fetch:t,Request:n,Response:r}=e,i=t?nr(t):typeof fetch==`function`,a=nr(n),o=nr(r);if(!i)return!1;let s=i&&nr(ir),c=i&&(typeof ar==`function`?(e=>t=>e.encode(t))(new ar):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&or(()=>{let e=!1,t=new n(W.origin,{body:new ir,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),u=o&&s&&or(()=>H.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new U(`Response type '${e}' is not supported`,U.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new n(W.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e+=``),H.isString(e))return(await c(e)).byteLength},p=async(e,t)=>H.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=Jn(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=Xn([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),T;try{if(g&&l&&o!==`get`&&o!==`head`&&(T=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(H.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=Bn(T,zn(Vn(g)));s=er(e.body,tr,t,n)}}H.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype;if(H.isFormData(s)){let e=v.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&v.delete(`content-type`)}let c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=H.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&Bn(t,zn(Vn(h),!0))||[];f=new r(er(f.body,tr,n,()=>{i&&i(),w&&w()}),e)}_||=`text`;let E=await d[H.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{Fn(t,n,{data:E,headers:J.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new U(`Network Error`,U.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):U.from(t,t&&t.code,e,C,t&&t.response)}}},cr=new Map,lr=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=cr;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:sr(t)),l=c;return c};lr();var ur={http:null,xhr:Yn,fetch:{get:lr}};H.forEach(ur,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var dr=e=>`- ${e}`,fr=e=>H.isFunction(e)||e===null||e===!1;function pr(e,t){e=H.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new U(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since : `+e.map(dr).join(` `):` `+dr(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var mr={getAdapter:pr,adapters:ur};function hr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Y(null,e)}function gr(e){return hr(e),e.headers=J.from(e.headers),e.data=Nn.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),mr.getAdapter(e.adapter||K.adapter,e)(e).then(function(t){return hr(e),t.data=Nn.call(e,e.transformResponse,t),t.headers=J.from(t.headers),t},function(t){return Pn(t)||(hr(e),t&&t.response&&(t.response.data=Nn.call(e,e.transformResponse,t.response),t.response.headers=J.from(t.response.headers))),Promise.reject(t)})}var _r=`1.15.1`,vr={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{vr[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var yr={};vr.transitional=function(e,t,n){function r(e,t){return`[Axios v`+_r+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new U(r(i,` has been removed`+(t?` in `+t:``)),U.ERR_DEPRECATED);return t&&!yr[i]&&(yr[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},vr.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function br(e,t,n){if(typeof e!=`object`)throw new U(`options must be an object`,U.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=t[a];if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new U(`option `+a+` must be `+n,U.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new U(`Unknown option `+a,U.ERR_BAD_OPTION)}}var xr={assertOptions:br,validators:vr},Z=xr.validators,Q=class{constructor(e){this.defaults=e||{},this.interceptors={request:new sn,response:new sn}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(` `);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(` `),r=t===-1?-1:n.indexOf(` `,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=` `+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=X(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&xr.assertOptions(n,{silentJSONParsing:Z.transitional(Z.boolean),forcedJSONParsing:Z.transitional(Z.boolean),clarifyTimeoutError:Z.transitional(Z.boolean),legacyInterceptorReqResOrdering:Z.transitional(Z.boolean)},!1),r!=null&&(H.isFunction(r)?t.paramsSerializer={serialize:r}:xr.assertOptions(r,{encode:Z.function,serialize:Z.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),xr.assertOptions(t,{baseUrl:Z.spelling(`baseURL`),withXsrfToken:Z.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&H.merge(i.common,i[t.method]);i&&H.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=J.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||cn;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[gr.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Y(e,r,i),t(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;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Cr(e){return function(t){return e.apply(null,t)}}function wr(e){return H.isObject(e)&&e.isAxiosError===!0}var Tr={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Tr).forEach(([e,t])=>{Tr[t]=e});function Er(e){let t=new Q(e),n=Ke(Q.prototype.request,t);return H.extend(n,Q.prototype,t,{allOwnKeys:!0}),H.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Er(X(e,t))},n}var $=Er(K);$.Axios=Q,$.CanceledError=Y,$.CancelToken=Sr,$.isCancel=Pn,$.VERSION=_r,$.toFormData=en,$.AxiosError=U,$.Cancel=$.CanceledError,$.all=function(e){return Promise.all(e)},$.spread=Cr,$.isAxiosError=wr,$.mergeConfig=X,$.AxiosHeaders=J,$.formToJSON=e=>yn(H.isHTMLForm(e)?new FormData(e):e),$.getAdapter=mr.getAdapter,$.HttpStatusCode=Tr,$.default=$;var Dr=$.create({baseURL:`/api`,withCredentials:!0,headers:{"Content-Type":`application/json`}}),Or=!1,kr=[],Ar=e=>{kr.forEach(t=>{e?t.reject(e):t.resolve()}),kr=[]};Dr.interceptors.request.use(e=>(e.headers[`Accept-Language`]=Ge.resolvedLanguage??Ge.language??`zh-CN`,e)),Dr.interceptors.response.use(e=>e,async e=>{let t=e.config;if(e.response?.status===401&&!t._retry&&!t.url?.includes(`/auth/refresh`)&&!t.url?.includes(`/auth`)){if(Or)return new Promise((e,t)=>{kr.push({resolve:e,reject:t})}).then(()=>Dr(t));t._retry=!0,Or=!0;try{return await $.post(`/api/auth/refresh`,{},{withCredentials:!0}),Ar(null),Dr(t)}catch(e){return Ar(e),localStorage.removeItem(`auth-storage`),window.location.pathname!==`/auth`&&(window.location.href=`/auth`),Promise.reject(e)}finally{Or=!1}}return e.response?.status===401&&(localStorage.removeItem(`auth-storage`),window.location.pathname!==`/auth`&&(window.location.href=`/auth`)),Promise.reject(e)});function jr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t