(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,557799,(e,t,i)=>{t.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},325661,(e,t,i)=>{"use strict";var s=e.r(942347),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=s.useState,a=s.useEffect,o=s.useLayoutEffect,l=s.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!r(e,i)}catch(e){return!0}}var p="u"{"use strict";t.exports=e.r(325661)},816688,123980,103910,424624,180705,675066,586743,e=>{"use strict";let t;var i=e.i(942347);let s=e=>"string"==typeof e,r=()=>{let e,t,i=new Promise((i,s)=>{e=i,t=s});return i.resolve=e,i.reject=t,i},n=e=>null==e?"":""+e,a=/###/g,o=e=>e&&e.indexOf("###")>-1?e.replace(a,"."):e,l=e=>!e||s(e),u=(e,t,i)=>{let r=s(t)?t.split("."):t,n=0;for(;n{let{obj:s,k:r}=u(e,t,Object);if(void 0!==s||1===t.length){s[r]=i;return}let n=t[t.length-1],a=t.slice(0,t.length-1),o=u(e,a,Object);for(;void 0===o.obj&&a.length;)n=`${a[a.length-1]}.${n}`,o=u(e,a=a.slice(0,a.length-1),Object),o?.obj&&void 0!==o.obj[`${o.k}.${n}`]&&(o.obj=void 0);o.obj[`${o.k}.${n}`]=i},h=(e,t)=>{let{obj:i,k:s}=u(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s]},c=(e,t,i)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?s(e[r])||e[r]instanceof String||s(t[r])||t[r]instanceof String?i&&(e[r]=t[r]):c(e[r],t[r],i):e[r]=t[r]);return e};var g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let d=e=>s(e)?e.replace(/[&<>"'\/]/g,e=>g[e]):e,f=[" ",",","?","!",";"],m=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}(20),y=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let s=t.split(i),r=e;for(let e=0;e-1&&ae?.replace(/_/g,"-"),b={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)}};class x{constructor(e,t={}){this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||b,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),i=0;i{this.observers[e]||(this.observers[e]=new Map);let i=this.observers[e].get(t)||0;this.observers[e].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s{let[t,s]=e;for(let e=0;e{let[s,r]=t;for(let t=0;tthis.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i){let r,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],i&&(Array.isArray(i)?r.push(...i):s(i)&&a?r.push(...i.split(a)):r.push(i)));let l=h(this.data,r);return(!l&&!t&&!i&&e.indexOf(".")>-1&&(e=r[0],t=r[1],i=r.slice(2).join(".")),!l&&o&&s(i))?y(this.data?.[e]?.[t],i,a):l}addResource(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},n=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=[e,t];i&&(a=a.concat(n?i.split(n):i)),e.indexOf(".")>-1&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),p(this.data,a,s),r.silent||this.emit("added",e,t,i,s)}addResources(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let r in i)(s(i[r])||Array.isArray(i[r]))&&this.addResource(e,t,r,i[r],{silent:!0});r.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,r){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),s=i,i=t,t=a[1]),this.addNamespaces(t);let o=h(this.data,a)||{};n.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?c(o,i,r):o={...o,...i},p(this.data,a,o),n.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(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}}var $={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,s,r){return e.forEach(e=>{t=this.processors[e]?.process(t,i,s,r)??t}),t}};let L=Symbol("i18next/PATH_KEY");function w(e,t){let i,s,r,{[L]:n}=e((s=[],(r=Object.create(null)).get=(e,t)=>(i?.revoke?.(),t===L)?s:(s.push(t),(i=Proxy.revocable(e,r)).proxy),Proxy.revocable(Object.create(null),r).proxy)),a=t?.keySeparator??".",o=t?.nsSeparator??":";if(n.length>1&&o){let e=t?.ns;if((e?Array.isArray(e)?e:[e]:[]).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(a)}`}return n.join(a)}let N={},E=e=>!s(e)&&"boolean"!=typeof e&&"number"!=typeof e;class R extends k{constructor(e,t={}){super(),((e,t,i)=>{e.forEach(e=>{t[e]&&(i[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=O.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},i={...t};if(null==e)return!1;let s=this.resolve(e,i);if(s?.res===void 0)return!1;let r=E(s.res);return!1!==i.returnObjects||!r}extractFromKey(e,t){let i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,n=t.ns||this.options.defaultNS||[],a=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,i)=>{t=t||"",i=i||"";let s=f.filter(e=>0>t.indexOf(e)&&0>i.indexOf(e));if(0===s.length)return!0;let r=m.getRegExp(`(${s.map(e=>"?"===e?"\\?":e).join("|")})`),n=!r.test(e);if(!n){let t=e.indexOf(i);t>0&&!r.test(e.substring(0,t))&&(n=!0)}return n})(e,i,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:s(n)?[n]:n};let a=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(a[0])>-1)&&(n=a.shift()),e=a.join(r)}return{key:e,namespaces:s(n)?[n]:n}}translate(e,t,i){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=w(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?w(e,{...this.options,...r}):String(e));let n=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,a=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],r),u=l[l.length-1],p=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===p&&(p=":");let h=r.lng||this.language,c=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return c?n?{res:`${u}${p}${o}`,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${p}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:o;let g=this.resolve(e,r),d=g?.res,f=g?.usedKey||o,m=g?.exactUsedKey||o,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!s(r.count),x=R.hasDefaultValue(r),O=b?this.pluralResolver.getSuffix(h,r.count,r):"",k=r.ordinal&&b?this.pluralResolver.getSuffix(h,r.count,{ordinal:!1}):"",S=b&&!r.ordinal&&0===r.count,$=S&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${O}`]||r[`defaultValue${k}`]||r.defaultValue,L=d;v&&!d&&x&&(L=$);let N=E(L),j=Object.prototype.toString.apply(L);if(v&&L&&N&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(j)&&!(s(y)&&Array.isArray(L))){if(!r.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(f,L,{...r,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(g.res=e,g.usedParams=this.getUsedParamsDetails(r),g):e}if(a){let e=Array.isArray(L),t=e?[]:{},i=e?m:f;for(let e in L)if(Object.prototype.hasOwnProperty.call(L,e)){let s=`${i}${a}${e}`;x&&!d?t[e]=this.translate(s,{...r,defaultValue:E($)?$[e]:void 0,...{joinArrays:!1,ns:l}}):t[e]=this.translate(s,{...r,joinArrays:!1,ns:l}),t[e]===s&&(t[e]=L[e])}d=t}}else if(v&&s(y)&&Array.isArray(d))(d=d.join(y))&&(d=this.extendTranslation(d,e,r,i));else{let t=!1,s=!1;!this.isValidLookup(d)&&x&&(t=!0,d=$),this.isValidLookup(d)||(s=!0,d=o);let n=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:d,l=x&&$!==d&&this.options.updateMissing;if(s||t||l){if(this.logger.log(l?"updateKey":"missingKey",h,u,o,l?$:d),a){let e=this.resolve(o,{...r,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,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let i=0;i{let s=x&&i!==d?i:n;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,s,l,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,s,l,r),this.emit("missingKey",e,u,t,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);S&&r[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{i([e],o+t,r[`defaultValue${t}`]||$)})}):i(e,o,$))}d=this.extendTranslation(d,e,r,g,i),s&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${u}${p}${o}`),(s||t)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${p}${o}`:o,t?d:void 0,r))}return n?(g.res=d,g.usedParams=this.getUsedParamsDetails(r),g):d}extendTranslation(e,t,i,r,n){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){let o;var a=this;i.interpolation&&this.interpolator.init({...i,...{interpolation:{...this.options.interpolation,...i.interpolation}}});let l=s(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(l){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let u=i.replace&&!s(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,i.lng||this.language||r.usedLng,i),l){let t=e.match(this.interpolator.nestingRegexp);o<(t&&t.length)&&(i.nest=!1)}!i.lng&&r&&r.res&&(i.lng=this.language||r.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,s=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return s(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?w(e,{...this.options,...o}):e)),e.forEach(e=>{if(this.isValidLookup(t))return;let l=this.extractFromKey(e,o),u=l.key;i=u;let p=l.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));let h=void 0!==o.count&&!s(o.count),c=h&&!o.ordinal&&0===o.count,g=void 0!==o.context&&(s(o.context)||"number"==typeof o.context)&&""!==o.context,d=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);p.forEach(e=>{this.isValidLookup(t)||(a=e,!N[`${d[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(N[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${d.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),d.forEach(i=>{let s;if(this.isValidLookup(t))return;n=i;let a=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,u,i,e,o);else{let e;h&&(e=this.pluralResolver.getSuffix(i,o.count,o));let t=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(o.ordinal&&0===e.indexOf(s)&&a.push(u+e.replace(s,this.options.pluralSeparator)),a.push(u+e),c&&a.push(u+t)),g){let i=`${u}${this.options.contextSeparator||"_"}${o.context}`;a.push(i),h&&(o.ordinal&&0===e.indexOf(s)&&a.push(i+e.replace(s,this.options.pluralSeparator)),a.push(i+e),c&&a.push(i+t))}}for(;s=a.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(i,e,s,o))}))})}),{res:t,usedKey:i,exactUsedKey:r,usedLng:n,usedNS:a}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!s(e.replace),i=t?e.replace:e;if(t&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!t)for(let e of(i={...i},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete i[e];return i}static hasDefaultValue(e){let t="defaultValue";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&void 0!==e[i])return!0;return!1}}class j{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=O.create("languageUtils")}getScriptPartFromCode(e){if(!(e=v(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=v(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(s(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let i=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let i=this.getScriptPartFromCode(e);if(this.isSupportedCode(i))return t=i;let s=this.getLanguagePartFromCode(e);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(e=>{if(e===s||!(0>e.indexOf("-")&&0>s.indexOf("-"))&&(e.indexOf("-")>0&&0>s.indexOf("-")&&e.substring(0,e.indexOf("-"))===s||0===e.indexOf(s)&&s.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),s(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){let i=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],n=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return s(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&n(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&n(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&n(this.getLanguagePartFromCode(e))):s(e)&&n(this.formatLanguageCode(e)),i.forEach(e=>{0>r.indexOf(e)&&n(this.formatLanguageCode(e))}),r}}let C={zero:0,one:1,two:2,few:3,many:4,other:5},P={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class A{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=O.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=v("dev"===e?"en":e),r=i.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:s,type:r});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];try{t=new Intl.PluralRules(s,{type:r})}catch(r){if("u"1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,t);return(i||(i=this.getRule("dev",t)),i)?i.resolvedOptions().pluralCategories.sort((e,t)=>C[e]-C[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}let I=function(e,t,i){let r,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",a=!(arguments.length>4)||void 0===arguments[4]||arguments[4],o=void 0!==(r=h(e,i))?r:h(t,i);return!o&&a&&s(i)&&void 0===(o=y(e,i,n))&&(o=y(t,i,n)),o};class T{constructor(e={}){this.logger=O.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:r,prefixEscaped:n,suffix:a,suffixEscaped:o,formatSeparator:l,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:h,nestingPrefixEscaped:c,nestingSuffix:g,nestingSuffixEscaped:f,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:d,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==s&&s,this.prefix=r?r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):n||"{{",this.suffix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):o||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?h.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):c||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=g?g.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):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,i,r){let a,o,l,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=e=>{if(0>e.indexOf(this.formatSeparator)){let s=I(t,u,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,i,{...r,...t,interpolationkey:e}):s}let s=e.split(this.formatSeparator),n=s.shift().trim(),a=s.join(this.formatSeparator).trim();return this.format(I(t,u,n,this.options.keySeparator,this.options.ignoreJSONStructure),a,i,{...r,...t,interpolationkey:n})};this.resetRegExp();let h=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(l=0;a=t.regex.exec(e);){let i=a[1].trim();if(void 0===(o=p(i)))if("function"==typeof h){let t=h(e,a,r);o=s(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,i))o="";else if(c){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),o="";else s(o)||this.useRawValueToEscape||(o=n(o));let u=t.safeValue(o);if(e=e.replace(a[0],u),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++l>=this.maxReplaces)break}}),e}nest(e,t){let i,r,a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=(e,t)=>{let i=this.nestingOptionsSeparator;if(0>e.indexOf(i))return e;let s=e.split(RegExp(`${i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}[ ]*{`)),r=`{${s[1]}`;e=s[0];let n=(r=this.interpolate(r,a)).match(/'/g),o=r.match(/"/g);((n?.length??0)%2!=0||o)&&(o?.length??0)%2==0||(r=r.replace(/'/g,'"'));try{a=JSON.parse(r),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${r}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let u=[];(a=(a={...o}).replace&&!s(a.replace)?a.replace:a).applyPostProcessor=!1,delete a.defaultValue;let p=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==p&&(u=i[1].slice(p).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),i[1]=i[1].slice(0,p)),(r=t(l.call(this,i[1].trim(),a),a))&&i[0]===e&&!s(r))return r;s(r)||(r=n(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u.length&&(r=u.reduce((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}let V=e=>{let t={};return(i,s,r)=>{let n=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(n={...n,[r.interpolationkey]:void 0});let a=s+JSON.stringify(n),o=t[a];return o||(o=e(v(s),r),t[a]=o),o(i)}},F=e=>(t,i,s)=>e(v(i),s)(t);class D{constructor(e={}){this.logger=O.create("formatter"),this.options=e,this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";let i=t.cacheInBuiltFormats?V:F;this.formats={number:i((e,t)=>{let i=new Intl.NumberFormat(e,{...t});return e=>i.format(e)}),currency:i((e,t)=>{let i=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>i.format(e)}),datetime:i((e,t)=>{let i=new Intl.DateTimeFormat(e,{...t});return e=>i.format(e)}),relativetime:i((e,t)=>{let i=new Intl.RelativeTimeFormat(e,{...t});return e=>i.format(e,t.range||"day")}),list:i((e,t)=>{let i=new Intl.ListFormat(e,{...t});return e=>i.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=V(t)}format(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&0>r[0].indexOf(")")&&r.find(e=>e.indexOf(")")>-1)){let e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{let{formatName:r,formatOptions:n}=(e=>{let t=e.toLowerCase().trim(),i={};if(e.indexOf("(")>-1){let s=e.split("(");t=s[0].toLowerCase().trim();let r=s[1].substring(0,s[1].length-1);"currency"===t&&0>r.indexOf(":")?i.currency||(i.currency=r.trim()):"relativetime"===t&&0>r.indexOf(":")?i.range||(i.range=r.trim()):r.split(";").forEach(e=>{if(e){let[t,...s]=e.split(":"),r=s.join(":").trim().replace(/^'+|'+$/g,""),n=t.trim();i[n]||(i[n]=r),"false"===r&&(i[n]=!1),"true"===r&&(i[n]=!0),isNaN(r)||(i[n]=parseInt(r,10))}})}return{formatName:t,formatOptions:i}})(t);if(this.formats[r]){let t=e;try{let a=s?.formatParams?.[s.interpolationkey]||{},o=a.locale||a.lng||s.locale||s.lng||i;t=this.formats[r](e,o,{...n,...s,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class U extends k{constructor(e,t,i,s={}){super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=O.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(e,t,i,s){let r={},n={},a={},o={};return e.forEach(e=>{let s=!0;t.forEach(t=>{let a=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===n[a]&&(n[a]=!0):(this.state[a]=1,s=!1,void 0===n[a]&&(n[a]=!0),void 0===r[a]&&(r[a]=!0),void 0===o[t]&&(o[t]=!0)))}),s||(a[e]=!0)}),(Object.keys(r).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(r),pending:Object.keys(n),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(o)}}loaded(e,t,i){let s=e.split("|"),r=s[0],n=s[1];t&&this.emit("failedLoading",r,n,t),!t&&i&&this.store.addResourceBundle(r,n,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);let a={};this.queue.forEach(i=>{((e,t,i,s)=>{let{obj:r,k:n}=u(e,t,Object);r[n]=r[n]||[],r[n].push(i)})(i.loaded,[r],n),void 0!==i.pending[e]&&(delete i.pending[e],i.pendingCount--),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{a[e]||(a[e]={});let t=i.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,n=arguments.length>5?arguments[5]:void 0;if(!e.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:r,callback:n});this.readingCalls++;let a=(a,o)=>{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)}a&&o&&s{this.read.call(this,e,t,i,s+1,2*r,n)},r):n(a,o)},o=this.backend[i].bind(this.backend);if(2===o.length){try{let i=o(e,t);i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}return}return o(e,t,a)}prepareLoading(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();s(e)&&(e=this.languageUtils.toResolveHierarchy(e)),s(t)&&(t=[t]);let n=this.queueLoad(e,t,i,r);if(!n.toLoad.length)return n.pending.length||r(),null;n.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),s=i[0],r=i[1];this.read(s,r,"read",void 0,void 0,(i,n)=>{i&&this.logger.warn(`${t}loading namespace ${r} for language ${s} failed`,i),!i&&n&&this.logger.log(`${t}loaded namespace ${r} for language ${s}`,n),this.loaded(e,i,n)})}saveMissing(e,t,i,s,r){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${i}" 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!!!");if(null!=i&&""!==i){if(this.backend?.create){let o={...n,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;(r=5===l.length?l(e,t,i,s,o):l(e,t,i,s))&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}else l(e,t,i,s,a,o)}e&&e[0]&&this.store.addResource(e[0],t,i,s)}}}let z=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,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("object"==typeof e[1]&&(t=e[1]),s(e[1])&&(t.defaultValue=e[1]),s(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let i=e[3]||e[2];Object.keys(i).forEach(e=>{t[e]=i[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_=e=>(s(e.ns)&&(e.ns=[e.ns]),s(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),s(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),K=()=>{},M="__i18next_supportNoticeShown";class H extends k{constructor(e={},t){if(super(),this.options=_(e),this.services={},this.logger=O,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(s(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let i=z();this.options={...i,...this.options,..._(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler),!1!==this.options.showSupportNotice&&!(this?.modules?.backend?.name?.indexOf("Locize")>0||this?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||this?.options?.backend?.backends&&this.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||this?.options?.backend?.projectId||this?.options?.backend?.backendOptions&&this.options.backend.backendOptions.some(e=>e?.projectId))&&1&&!("u">typeof globalThis&&globalThis[M])&&("u">typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"u">typeof globalThis&&(globalThis[M]=!0));let n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;var a=this;this.modules.logger?O.init(n(this.modules.logger),this.options):O.init(null,this.options),e=this.modules.formatter?this.modules.formatter:D;let t=new j(this.options);this.store=new S(this.options.resources,this.options);let s=this.services;s.logger=O,s.resourceStore=this.store,s.languageUtils=t,s.pluralResolver=new A(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(s.formatter=n(e),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new T(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new U(n(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s1?t-1:0),s=1;s{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=K),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(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=>{var t=this;this[e]=function(){for(var i=arguments.length,s=Array(i),r=0;r{var t=this;this[e]=function(){for(var i=arguments.length,s=Array(i),r=0;r{let e=(e,i)=>{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),o.resolve(i),t(e,i)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,i=t,r=s(e)?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return i();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(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),i(e)})}else i(null)}reloadResources(e,t,i){let s=r();return"function"==typeof e&&(i=e,e=void 0),"function"==typeof t&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=K),this.services.backendConnector.reload(e,t,e=>{s.resolve(),i(e)}),s}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"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&$.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let i=r();this.emit("languageChanging",e);let n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(s,r)=>{var a=this;r?this.isLanguageChangingTo===e&&(n(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,i.resolve(function(){for(var e=arguments.length,t=Array(e),i=0;i{e||t||!this.services.languageDetector||(t=[]);let i=s(t)?t:t&&t[0],r=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(s(t)?[t]:t);r&&(this.language||n(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector?.cacheUserLanguage?.(r)),this.loadResources(r,e=>{a(e,r)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),i}getFixedT(e,t,i){var r=this;let n=function(e,t){let s,a;for(var o=arguments.length,l=Array(o>2?o-2:0),u=2;u("function"==typeof e&&(e=w(e,{...r.options,...t})),`${s.keyPrefix}${p}${e}`)):("function"==typeof e&&(e=w(e,{...r.options,...t})),a=s.keyPrefix?`${s.keyPrefix}${p}${e}`:e),r.t(a,s)};return s(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=i,n}t(){for(var e=arguments.length,t=Array(e),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};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 i=t.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;let n=(e,t)=>{let i=this.services.backendConnector.state[`${e}|${t}`];return -1===i||0===i||2===i};if(t.precheck){let e=t.precheck(this,n);if(void 0!==e)return e}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||n(i,e)&&(!s||n(r,e)))}loadNamespaces(e,t){let i=r();return this.options.ns?(s(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){let i=r();s(e)&&(e=[e]);let n=this.options.preload||[],a=e.filter(e=>0>n.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=n.concat(a),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(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(e){}let t=this.services?.languageUtils||new j(z());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,i=new H(e,t);return i.createInstance=H.createInstance,i}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,i=e.forkResourceStore;i&&delete e.forkResourceStore;let s={...this.options,...e,isClone:!0},r=new H(s);if((void 0!==e.debug||void 0!==e.prefix)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},i&&(r.store=new S(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((i,s)=>(i[s]={...e[t][s]},i),e[t]),e),{}),s),r.services.resourceStore=r.store),e.interpolation){let t={...z().interpolation,...this.options.interpolation,...e.interpolation},i={...s,interpolation:t};r.services.interpolator=new T(i)}return r.translator=new R(r.services,s),r.translator.on("*",function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;sq,"keyFromSelector",()=>w,"t",()=>J],123980);var W=e.i(557799),Y=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function G(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=e.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(t.name=i[1],(W.default[i[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var s=e.indexOf("-->");return{type:"comment",comment:-1!==s?e.slice(4,s):""}}for(var r=new RegExp(Y),n=null;null!==(n=r.exec(e));)if(n[0].trim())if(n[1]){var a=n[1].trim(),o=[a,""];a.indexOf("=")>-1&&(o=a.split("=")),t.attrs[o[0]]=o[1],r.lastIndex--}else n[2]&&(t.attrs[n[2]]=n[3].trim().substring(1,n[3].length-1));return t}var Z=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Q=/^\s*$/,X=Object.create(null);let ee=function(e,t){t||(t={}),t.components||(t.components=X);var i,s=[],r=[],n=-1,a=!1;if(0!==e.indexOf("<")){var o=e.indexOf("<");s.push({type:"text",content:-1===o?e:e.substring(0,o)})}return e.replace(Z,function(o,l){if(a){if(o!=="")return;a=!1}var u,p="/"!==o.charAt(1),h=o.startsWith("