1"use strict";(self.webpackChunkreact_typescript_rspack=self.webpackChunkreact_typescript_rspack||[]).push([["31"],{8449(e,t,i){i.d(t,{Ay:()=>_,Ts:()=>J,t:()=>q});let s=e=>"string"==typeof e,o=()=>{let e,t,i=new Promise((i,s)=>{e=i,t=s});return i.resolve=e,i.reject=t,i},r=e=>null==e?"":""+e,n=/###/g,a=e=>e&&e.indexOf("###")>-1?e.replace(n,"."):e,l=e=>!e||s(e),h=(e,t,i)=>{let o=s(t)?t.split("."):t,r=0;for(;r<o.length-1;){if(l(e))return{};let t=a(o[r]);!e[t]&&i&&(e[t]=new i),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return l(e)?{}:{obj:e,k:a(o[r])}},u=(e,t,i)=>{let{obj:s,k:o}=h(e,t,Object);if(void 0!==s||1===t.length){s[o]=i;return}let r=t[t.length-1],n=t.slice(0,t.length-1),a=h(e,n,Object);for(;void 0===a.obj&&n.length;)r=`${n[n.length-1]}.${r}`,(null==(a=h(e,n=n.slice(0,n.length-1),Object))?void 0:a.obj)&&void 0!==a.obj[`${a.k}.${r}`]&&(a.obj=void 0);a.obj[`${a.k}.${r}`]=i},p=(e,t)=>{let{obj:i,k:s}=h(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s]},g=(e,t,i)=>{for(let o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?s(e[o])||e[o]instanceof String||s(t[o])||t[o]instanceof String?i&&(e[o]=t[o]):g(e[o],t[o],i):e[o]=t[o]);return e};var d={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let c=e=>s(e)?e.replace(/[&<>"'\/]/g,e=>d[e]):e,f=[" ",",","?","!",";"],v=new class{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}constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}}(20),m=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),o=e;for(let e=0;e<s.length;){let t;if(!o||"object"!=typeof o)return;let r="";for(let n=e;n<s.length;++n)if(n!==e&&(r+=i),r+=s[n],void 0!==(t=o[r])){if(["string","number","boolean"].indexOf(typeof t)>-1&&n<s.length-1)continue;e+=n-e+1;break}o=t}return o},y=e=>null==e?void 0:e.replace(/_/g,"-"),x={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var i,s,o;null==(o=console)||null==(s=o[e])||null==(i=s.apply)||i.call(s,console,t)}};class b{init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||x,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,o){return o&&!this.debug?null:(s(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new b(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new b(this.logger,e)}constructor(e,t={}){this.init(e,t)}}var k=new b;class S{on(e,t){return e.split(" ").forEach(e=>{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<t;s++)i[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[t,s]=e;for(let e=0;e<s;e++)t(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{let[s,o]=t;for(let t=0;t<o;t++)s.apply(s,[e,...i])})}constructor(){this.observers={}}}class O extends S{addNamespaces(e){0>this.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){var o,r;let n,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,h=void 0!==a.ignoreJSONStructure?a.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?n=e.split("."):(n=[e,t],i&&(Array.isArray(i)?n.push(...i):s(i)&&l?n.push(...i.split(l)):n.push(i)));let u=p(this.data,n);return(!u&&!t&&!i&&e.indexOf(".")>
1-1&&(e=n[0],t=n[1],i=n.slice(2).join(".")),!u&&h&&s(i))?m(null==(r=this.data)||null==(o=r[e])?void 0:o[t],i,l):u}addResource(e,t,i,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},r=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,n=[e,t];i&&(n=n.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(n=e.split("."),s=t,t=n[1]),this.addNamespaces(t),u(this.data,n,s),o.silent||this.emit("added",e,t,i,s)}addResources(e,t,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let o in i)(s(i[o])||Array.isArray(i[o]))&&this.addResource(e,t,o,i[o],{silent:!0});o.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,o){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},n=[e,t];e.indexOf(".")>-1&&(n=e.split("."),s=i,i=t,t=n[1]),this.addNamespaces(t);let a=p(this.data,n)||{};r.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?g(a,i,o):a={...a,...i},u(this.data,n,a),r.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}constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}}var L={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,s,o){return e.forEach(e=>{var r;t=(null==(r=this.processors[e])?void 0:r.process(t,i,s,o))??t}),t}};let $=Symbol("i18next/PATH_KEY");function w(e,t){let i,s,o,{[$]:r}=e((s=[],(o=Object.create(null)).get=(e,t)=>{var r;return(null==i||null==(r=i.revoke)||r.call(i),t===$)?s:(s.push(t),(i=Proxy.revocable(e,o)).proxy)},Proxy.revocable(Object.create(null),o).proxy)),n=(null==t?void 0:t.keySeparator)??".",a=(null==t?void 0:t.nsSeparator)??":";if(r.length>1&&a){let e=null==t?void 0:t.ns;if((e?Array.isArray(e)?e:[e]:[]).includes(r[0]))return`${r[0]}${a}${r.slice(1).join(n)}`}return r.join(n)}let R={},C=e=>!s(e)&&"boolean"!=typeof e&&"number"!=typeof e;class P extends S{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((null==s?void 0:s.res)===void 0)return!1;let o=C(s.res);return!1!==i.returnObjects||!o}extractFromKey(e,t){let i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");let o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS||[],n=i&&e.indexOf(i)>-1,a=!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 o=v.getRegExp(`(${s.map(e=>"?"===e?"\\?":e).join("|")})`),r=!o.test(e);if(!r){let t=e.indexOf(i);t>0&&!o.test(e.substring(0,t))&&(r=!0)}return r})(e,i,o);if(n&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:s(r)?[r]:r};let n=e.split(i);(i!==o||i===o&&this.options.ns.indexOf(n[0])>-1)&&(r=n.shift()),e=n.join(o)}return{key:e,namespaces:s(r)?[r]:r}}translate(e,t,i){let o="object"==typeof t?{...t}:t;if("object"!=typeof o&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof o&&(o={...o}),o||(o={}),null==e)return"";"function"==typeof e&&(e=w(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?w(e,{...this.options,...o}):String(e));let r=void 0!==o.returnDetails?o.returnDetails:this.options.returnDetails,n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],o),h=l[l.length-1],u=void 0!==o.nsSeparator?o.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let p=o.lng||this.language,g=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((null==p?void 0:p.toLowerCase())==="cimode")return g?r?{res:`${h}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:p,usedNS:h,usedParams:this.getUsedParamsDetails(o)}:`${h}${u}${a}`:r?{res:a,usedKey:a,exactUsedKey:a,usedLng:p,usedNS:h,usedParams:this.getUsedParamsDetails(o)}:a;let d=this.resolve(e,o),c=null==d?void 0:d.res,f=(null==d?void 0:d.usedKey)||a,v=(null==d?void 0:d.exactUsedKey)||a,m=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,x=void 0!==o.count&&!s(o.c
1ount),b=P.hasDefaultValue(o),k=x?this.pluralResolver.getSuffix(p,o.count,o):"",S=o.ordinal&&x?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",O=x&&!o.ordinal&&0===o.count,L=O&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${k}`]||o[`defaultValue${S}`]||o.defaultValue,$=c;y&&!c&&b&&($=L);let R=C($),j=Object.prototype.toString.apply($);if(y&&$&&R&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(j)&&!(s(m)&&Array.isArray($))){if(!o.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,$,{...o,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(d.res=e,d.usedParams=this.getUsedParamsDetails(o),d):e}if(n){let e=Array.isArray($),t=e?[]:{},i=e?v:f;for(let e in $)if(Object.prototype.hasOwnProperty.call($,e)){let s=`${i}${n}${e}`;b&&!c?t[e]=this.translate(s,{...o,defaultValue:C(L)?L[e]:void 0,...{joinArrays:!1,ns:l}}):t[e]=this.translate(s,{...o,joinArrays:!1,ns:l}),t[e]===s&&(t[e]=$[e])}c=t}}else if(y&&s(m)&&Array.isArray(c))(c=c.join(m))&&(c=this.extendTranslation(c,e,o,i));else{let t=!1,s=!1;!this.isValidLookup(c)&&b&&(t=!0,c=L),this.isValidLookup(c)||(s=!0,c=a);let r=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:c,l=b&&L!==c&&this.options.updateMissing;if(s||t||l){if(this.logger.log(l?"updateKey":"missingKey",p,h,a,l?L:c),n){let e=this.resolve(a,{...o,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,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let i=0;i<t.length;i++)e.push(t[i]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(o.lng||this.language):e.push(o.lng||this.language);let i=(e,t,i)=>{var s;let n=b&&i!==c?i:r;this.options.missingKeyHandler?this.options.missingKeyHandler(e,h,t,n,l,o):(null==(s=this.backendConnector)?void 0:s.saveMissing)&&this.backendConnector.saveMissing(e,h,t,n,l,o),this.emit("missingKey",e,h,t,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,o);O&&o[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{i([e],a+t,o[`defaultValue${t}`]||L)})}):i(e,a,L))}c=this.extendTranslation(c,e,o,d,i),s&&c===a&&this.options.appendNamespaceToMissingKey&&(c=`${h}${u}${a}`),(s||t)&&this.options.parseMissingKeyHandler&&(c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${u}${a}`:a,t?c:void 0,o))}return r?(d.res=c,d.usedParams=this.getUsedParamsDetails(o),d):c}extendTranslation(e,t,i,o,r){var n;if(null==(n=this.i18nFormat)?void 0:n.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){let n;var a,l=this;i.interpolation&&this.interpolator.init({...i,...{interpolation:{...this.options.interpolation,...i.interpolation}}});let h=s(e)&&((null==i||null==(a=i.interpolation)?void 0:a.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(h){let t=e.match(this.interpolator.nestingRegexp);n=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||o.usedLng,i),h){let t=e.match(this.interpolator.nestingRegexp);n<(t&&t.length)&&(i.nest=!1)}!i.lng&&o&&o.res&&(i.lng=this.language||o.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,s=Array(e),o=0;o<e;o++)s[o]=arguments[o];return(null==r?void 0:r[0])!==s[0]||i.context?l.translate(...s,t):(l.logger.warn(`It seems you are nesting recursively key: ${s[0]} in key: ${t[0]}`),null)},i)),i.interpolation&&this.interpolator.reset()}let h=i.postProcess||this.options.postProcess,u=s(h)?[h]:h;return null!=e&&(null==u?void 0:u.length)&&!1!==i.applyPostProcessor&&(e=L.handle(u,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let t,i,o,r,n,a=arguments.length>1&&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,...a}
1):e)),e.forEach(e=>{if(this.isValidLookup(t))return;let l=this.extractFromKey(e,a),h=l.key;i=h;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let p=void 0!==a.count&&!s(a.count),g=p&&!a.ordinal&&0===a.count,d=void 0!==a.context&&(s(a.context)||"number"==typeof a.context)&&""!==a.context,c=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach(e=>{var s,l;this.isValidLookup(t)||(n=e,R[`${c[0]}-${e}`]||null==(s=this.utils)||!s.hasLoadedNamespace||(null==(l=this.utils)?void 0:l.hasLoadedNamespace(n))||(R[`${c[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${c.join(", ")}" won't get resolved as namespace "${n}" 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!!!")),c.forEach(i=>{var s;let n;if(this.isValidLookup(t))return;r=i;let l=[h];if(null==(s=this.i18nFormat)?void 0:s.addLookupKeys)this.i18nFormat.addLookupKeys(l,h,i,e,a);else{let e;p&&(e=this.pluralResolver.getSuffix(i,a.count,a));let t=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(a.ordinal&&0===e.indexOf(s)&&l.push(h+e.replace(s,this.options.pluralSeparator)),l.push(h+e),g&&l.push(h+t)),d){let i=`${h}${this.options.contextSeparator||"_"}${a.context}`;l.push(i),p&&(a.ordinal&&0===e.indexOf(s)&&l.push(i+e.replace(s,this.options.pluralSeparator)),l.push(i+e),g&&l.push(i+t))}}for(;n=l.pop();)this.isValidLookup(t)||(o=n,t=this.getResource(i,e,n,a))}))})}),{res:t,usedKey:i,exactUsedKey:o,usedLng:r,usedNS:n}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,i){var s;let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(null==(s=this.i18nFormat)?void 0:s.getResource)?this.i18nFormat.getResource(e,t,i,o):this.resourceStore.getResource(e,t,i,o)}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}constructor(e,t={}){super(),((e,t,i)=>{e.forEach(e=>{t[e]&&(i[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=k.create("translator")}}class j{getScriptPartFromCode(e){if(!(e=y(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=y(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),o=[],r=e=>{e&&(this.isSupportedCode(e)?o.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&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):s(e)&&r(this.formatLanguageCode(e)),i.forEach(e=>{0>o.indexOf(e)&&r(this.formatLanguageCode(e))}),o}constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=k.create("languageUtils")}}let N={zero:0,one:1,two:2,few:3,many:4,other:5},E={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class A{clearCache(){this.pluralRulesCache={}}getRule(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=y("dev"===e?"en":e),o=i.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:s,type:o});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];try{t=new Intl.PluralRules(s,{type:o})}catch(o){if("u"<typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),E;if(!e.match(/-|_/))return E;let s=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(s,i)}return this.pluralRulesCache[r]=t,t}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),(null==i?void 0: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)=>N[e]-N[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}
1`),this.getSuffix("dev",t,i))}constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=k.create("pluralResolver"),this.pluralRulesCache={}}}let F=function(e,t,i){let o,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",n=!(arguments.length>4)||void 0===arguments[4]||arguments[4],a=void 0!==(o=p(e,i))?o:p(t,i);return!a&&n&&s(i)&&void 0===(a=m(e,i,r))&&(a=m(t,i,r)),a};class T{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:o,prefixEscaped:r,suffix:n,suffixEscaped:a,formatSeparator:l,unescapeSuffix:h,unescapePrefix:u,nestingPrefix:p,nestingPrefixEscaped:g,nestingSuffix:d,nestingSuffixEscaped:f,nestingOptionsSeparator:v,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:c,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==s&&s,this.prefix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):r||"{{",this.suffix=n?n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=h?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=p?p.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):g||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=v||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>(null==e?void 0: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,o){var n;let a,l,h,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=e=>{if(0>e.indexOf(this.formatSeparator)){let s=F(t,u,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,i,{...o,...t,interpolationkey:e}):s}let s=e.split(this.formatSeparator),r=s.shift().trim(),n=s.join(this.formatSeparator).trim();return this.format(F(t,u,r,this.options.keySeparator,this.options.ignoreJSONStructure),n,i,{...o,...t,interpolationkey:r})};this.resetRegExp();let g=(null==o?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=(null==o||null==(n=o.interpolation)?void 0:n.skipOnVariables)!==void 0?o.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(h=0;a=t.regex.exec(e);){let i=a[1].trim();if(void 0===(l=p(i)))if("function"==typeof g){let t=g(e,a,o);l=s(t)?t:""}else if(o&&Object.prototype.hasOwnProperty.call(o,i))l="";else if(d){l=a[0];continue}else this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),l="";else s(l)||this.useRawValueToEscape||(l=r(l));let n=t.safeValue(l);if(e=e.replace(a[0],n),d?(t.regex.lastIndex+=l.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++h>=this.maxReplaces)break}}),e}nest(e,t){let i,o,n,a=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,"\\$&")}[ ]*{`)),o=`{${s[1]}`;e=s[0];let r=(o=this.interpolate(o,n)).match(/'/g),a=o.match(/"/g);(((null==r?void 0:r.length)??0)%2!=0||a)&&((null==a?void 0:a.length)??0)%2==0||(o=o.replace(/'/g,'"'));try{n=JSON.parse(o),t&&(n={...t,...n})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${o}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let h=[];(n=(n={...a}).replace&&!s(n.replace)?n.replace:n).applyPostProcessor=!1,delete n.defaultValue;let u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==u&&(h=i[1].slice(u).split(this.formatSeparator).map(e=>
1e.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),(o=t(l.call(this,i[1].trim(),n),n))&&i[0]===e&&!s(o))return o;s(o)||(o=r(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),o=""),h.length&&(o=h.reduce((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:i[1].trim()}),o.trim())),e=e.replace(i[0],o),this.regexp.lastIndex=0}return e}constructor(e={}){var t;this.logger=k.create("interpolator"),this.options=e,this.format=(null==e||null==(t=e.interpolation)?void 0:t.format)||(e=>e),this.init(e)}}let I=e=>{let t={};return(i,s,o)=>{let r=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(r={...r,[o.interpolationkey]:void 0});let n=s+JSON.stringify(r),a=t[n];return a||(a=e(y(s),o),t[n]=a),a(i)}},V=e=>(t,i,s)=>e(y(i),s)(t);class D{init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";let i=t.cacheInBuiltFormats?I:V;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()]=I(t)}format(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{let{formatName:o,formatOptions:r}=(e=>{let t=e.toLowerCase().trim(),i={};if(e.indexOf("(")>-1){let s=e.split("(");t=s[0].toLowerCase().trim();let o=s[1].substring(0,s[1].length-1);"currency"===t&&0>o.indexOf(":")?i.currency||(i.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?i.range||(i.range=o.trim()):o.split(";").forEach(e=>{if(e){let[t,...s]=e.split(":"),o=s.join(":").trim().replace(/^'+|'+$/g,""),r=t.trim();i[r]||(i[r]=o),"false"===o&&(i[r]=!1),"true"===o&&(i[r]=!0),isNaN(o)||(i[r]=parseInt(o,10))}})}return{formatName:t,formatOptions:i}})(t);if(this.formats[o]){let t=e;try{var n;let a=(null==s||null==(n=s.formatParams)?void 0:n[s.interpolationkey])||{},l=a.locale||a.lng||s.locale||s.lng||i;t=this.formats[o](e,l,{...r,...s,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}constructor(e={}){this.logger=k.create("formatter"),this.options=e,this.init(e)}}class K extends S{queueLoad(e,t,i,s){let o={},r={},n={},a={};return e.forEach(e=>{let s=!0;t.forEach(t=>{let n=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[n]=2:this.state[n]<0||(1===this.state[n]?void 0===r[n]&&(r[n]=!0):(this.state[n]=1,s=!1,void 0===r[n]&&(r[n]=!0),void 0===o[n]&&(o[n]=!0),void 0===a[t]&&(a[t]=!0)))}),s||(n[e]=!0)}),(Object.keys(o).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(r),toLoadLanguages:Object.keys(n),toLoadNamespaces:Object.keys(a)}}loaded(e,t,i){let s=e.split("|"),o=s[0],r=s[1];t&&this.emit("failedLoading",o,r,t),!t&&i&&this.store.addResourceBundle(o,r,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);let n={};this.queue.forEach(i=>{((e,t,i,s)=>{let{obj:o,k:r}=h(e,t,Object);o[r]=o[r]||[],o[r].push(i)})(i.loaded,[o],r),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=>{n[e]||(n[e]={});let t=i.loaded[e];t.length&&t.forEach(t=>{void 0===n[e][t]&&(n[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",n),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:o,callback:r});this.readingCalls++;let n=(n,a)=>
1{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)}n&&a&&s<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,i,s+1,2*o,r)},o):r(n,a)},a=this.backend[i].bind(this.backend);if(2===a.length){try{let i=a(e,t);i&&"function"==typeof i.then?i.then(e=>n(null,e)).catch(n):n(null,i)}catch(e){n(e)}return}return a(e,t,n)}prepareLoading(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=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."),o&&o();s(e)&&(e=this.languageUtils.toResolveHierarchy(e)),s(t)&&(t=[t]);let r=this.queueLoad(e,t,i,o);if(!r.toLoad.length)return r.pending.length||o(),null;r.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],o=i[1];this.read(s,o,"read",void 0,void 0,(i,r)=>{i&&this.logger.warn(`${t}loading namespace ${o} for language ${s} failed`,i),!i&&r&&this.logger.log(`${t}loaded namespace ${o} for language ${s}`,r),this.loaded(e,i,r)})}saveMissing(e,t,i,s,o){var r,n,a,l,h;let u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if((null==(n=this.services)||null==(r=n.utils)?void 0:r.hasLoadedNamespace)&&!(null==(l=this.services)||null==(a=l.utils)?void 0:a.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(null==(h=this.backend)?void 0:h.create){let r={...u,isUpdate:o},n=this.backend.create.bind(this.backend);if(n.length<6)try{let o;(o=5===n.length?n(e,t,i,s,r):n(e,t,i,s))&&"function"==typeof o.then?o.then(e=>p(null,e)).catch(p):p(null,o)}catch(e){p(e)}else n(e,t,i,s,p,r)}e&&e[0]&&this.store.addResource(e[0],t,i,s)}}constructor(e,t,i,s={}){var o,r;super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=k.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=[],null==(r=this.backend)||null==(o=r.init)||o.call(r,i,s.backend,s)}}let U=()=>({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];
1Object.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}),M=e=>{var t,i;return s(e.ns)&&(e.ns=[e.ns]),s(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),s(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null==(i=e.supportedLngs)||null==(t=i.indexOf)?void 0:t.call(i,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},z=()=>{},H="__i18next_supportNoticeShown";class B extends S{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=U();this.options={...i,...this.options,...M(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation}
1,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&&!((null==this||null==(l=this.modules)||null==(a=l.backend)||null==(n=a.name)?void 0:n.indexOf("Locize"))>0||(null==this||null==(g=this.modules)||null==(p=g.backend)||null==(u=p.constructor)||null==(h=u.name)?void 0:h.indexOf("Locize"))>0||(null==this||null==(c=this.options)||null==(d=c.backend)?void 0:d.backends)&&this.options.backend.backends.some(e=>{var t,i,s;return(null==e||null==(t=e.name)?void 0:t.indexOf("Locize"))>0||(null==e||null==(s=e.constructor)||null==(i=s.name)?void 0:i.indexOf("Locize"))>0})||(null==this||null==(v=this.options)||null==(f=v.backend)?void 0:f.projectId)||(null==this||null==(y=this.options)||null==(m=y.backend)?void 0:m.backendOptions)&&this.options.backend.backendOptions.some(e=>null==e?void 0:e.projectId))&&1&&!("u">typeof globalThis&&globalThis[H])&&("u">typeof console&&void 0!==console.info&&console.info("\uD83C\uDF10 i18next is made possible by our own product, Locize â consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \uD83D\uDC99"),"u">typeof globalThis&&(globalThis[H]=!0));let r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;var n,a,l,h,u,p,g,d,c,f,v,m,y,x=this;this.modules.logger?k.init(r(this.modules.logger),this.options):k.init(null,this.options),e=this.modules.formatter?this.modules.formatter:D;let t=new j(this.options);this.store=new O(this.options.resources,this.options);let s=this.services;s.logger=k,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=r(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 K(r(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;s<t;s++)i[s-1]=arguments[s];x.emit(e,...i)}),this.modules.languageDetector&&(s.languageDetector=r(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=r(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new P(this.services,this.options),this.translator.on("*",function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];x.emit(e,...i)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=z),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),o=0;o<i;o++)s[o]=arguments[o];return t.store[e](...s)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{var t=this;this[e]=function(){for(var i=arguments.length,s=Array(i),o=0;o<i;o++)s[o]=arguments[o];return t.store[e](...s),t}});let b=o(),S=()=>{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
1("initialized",this.options),b.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?S():setTimeout(S,0),b}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z,i=t,o=s(e)?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){var r,n;if((null==o?void 0:o.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)})};o?t(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),null==(n=this.options.preload)||null==(r=n.forEach)||r.call(n,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=o();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=z),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&&L.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<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-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=o();this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},n=(s,o)=>{var n=this;o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,i.resolve(function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.t(...t)}),t&&t(s,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.t(...t)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);let i=s(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(s(t)?[t]:t);if(o){var a,l;this.language||r(o),this.translator.language||this.translator.changeLanguage(o),null==(l=this.services.languageDetector)||null==(a=l.cacheUserLanguage)||a.call(l,o)}this.loadResources(o,e=>{n(e,o)})};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(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),i}getFixedT(e,t,i){var o=this;let r=function(e,t){let s,n;for(var a=arguments.length,l=Array(a>2?a-2:0),h=2;h<a;h++)l[h-2]=arguments[h];(s="object"!=typeof t?o.options.overloadTranslationOptionHandler([e,t].concat(l)):{...t}).lng=s.lng||r.lng,s.lngs=s.lngs||r.lngs,s.ns=s.ns||r.ns,""!==s.keyPrefix&&(s.keyPrefix=s.keyPrefix||i||r.keyPrefix);let u=o.options.keySeparator||".";return s.keyPrefix&&Array.isArray(e)?n=e.map(e=>("function"==typeof e&&(e=w(e,{...o.options,...t})),`${s.keyPrefix}${u}${e}`)):("function"==typeof e&&(e=w(e,{...o.options,...t})),n=s.keyPrefix?`${s.keyPrefix}${u}${e}`:e),o.t(n,s)};return s(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=i,r}t(){for(var e,t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];return null==(e=this.translator)?void 0:e.translate(...i)}exists(){for(var e,t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];return null==(e=this.translator)?void 0:e.exists(...i)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
1if(!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,o=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;let r=(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,r);if(void 0!==e)return e}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(i,e)&&(!s||r(o,e)))}loadNamespaces(e,t){let i=o();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=o();s(e)&&(e=[e]);let r=this.options.preload||[],n=e.filter(e=>0>r.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return n.length?(this.options.preload=r.concat(n),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){var t,i;if(e||(e=this.resolvedLanguage||((null==(t=this.languages)?void 0:t.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 s=(null==(i=this.services)?void 0:i.languageUtils)||new j(U());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(s.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 B(e,t);return i.createInstance=B.createInstance,i}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z,i=e.forkResourceStore;i&&delete e.forkResourceStore;let s={...this.options,...e,isClone:!0},o=new B(s);if((void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},i&&(o.store=new O(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),o.services.resourceStore=o.store),e.interpolation){let t={...U().interpolation,...this.options.interpolation,...e.interpolation},i={...s,interpolation:t};o.services.interpolator=new T(i)}return o.translator=new P(o.services,s),o.translator.on("*",function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];o.emit(e,...i)}),o.init(s,t),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}constructor(e={},t){if(super(),this.options=M(e),this.services={},this.logger=k,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)}}}let _=B.createInstance();_.createInstance,_.dir;let J=_.init;_.loadResources,_.reloadResources,_.use,_.changeLanguage,_.getFixedT;let q=_.t;_.exists,_.setDefaultNamespace,_.hasLoadedNamespace,_.loadNamespaces,_.loadLanguages}}]); 2//# sourceMappingURL=spa.vendor.i18next.bundle.69312c1c4046b8b8.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.