1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return typeof e=="string"&&(e=[e]),e.forEach(d=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(d,t),C=f.key;i=C;let O=f.namespaces;this.options.fallbackNS&&(O=O.concat(this.options.fallbackNS));const E=t.count!==void 0&&typeof t.count!="string",P=E&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),D=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",$=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);O.forEach(H=>{this.isValidLookup(r)||(s=H,!rT[`${$[0]}-${H}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(rT[`${$[0]}-${H}`]=!0,this.logger.warn(`key "${i}" for languages "${$.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!!!")),$.forEach(Q=>{if(this.isValidLookup(r))return;a=Q;const N=[C];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(N,C,Q,H,t);else{let ae;E&&(ae=this.pluralResolver.getSuffix(Q,t.count,t));const pe=`${this.options.pluralSeparator}zero`,fe=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(N.push(C+ae),t.ordinal&&ae.indexOf(fe)===0&&N.push(C+ae.replace(fe,this.options.pluralSeparator)),P&&N.push(C+pe)),D){const X=`${C}${this.options.contextSeparator}${t.context}`;N.push(X),E&&(N.push(X+ae),t.ordinal&&ae.indexOf(fe)===0&&N.push(X+ae.replace(fe,this.options.pluralSeparator)),P&&N.push(X+pe))}}let Z;for(;Z=N.pop();)this.isValidLookup(r)||(o=Z,r=this.getResource(Q,H,Z,t))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,i):this.resourceStore.getResource(e,t,r,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&typeof e.replace!="string";let i=r?e.replace:e;if(r&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of t)delete i[o]}return i}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}function CS(n){return n.charAt(0).toUpperCase()+n.slice(1)}class iT{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Df.create("languageUtils")}getScriptPartFromCode(e){if(e=l4(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=l4(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=CS(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=CS(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=CS(r[2].toLowerCase()))),r.join("-")}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.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):typeof e=="string"&&o(this.formatLanguageCode(e)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}let RZ=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],zZ={1:function(n){return+(n>1)},2:function(n){return+(n!=1)},3:function(n){return 0},4:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},5:function(n){return n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},6:function(n){return n==1?0:n>=2&&n<=4?1:2},7:function(n){return n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},8:function(n){return n==1?0:n==2?1:n!=8&&n!=11?2:3},9:function(n){return+(n>=2)},10:function(n){return n==1?0:n==2?1:n<7?2:n<11?3:4},11:function(n){return n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3},12:function(n){return+(n%10!=1||n%100==11)},13:function(n){return+(n!==0)},14:function(n){return n==1?0:n==2?1:n==3?2:3},15:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2},16:function(n){return n%10==1&&n%100!=11?0:n!==0?1:2},17:function(n){return n==1||n%10==1&&n%100!=11?0:1},18:function(n){return n==0?0:n==1?1:2},19:function(n){return n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3},20:function(n){return n==1?0:n==0||n%100>0&&n%100<20?1:2},21:function(n){return n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0},22:function(n){return n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3}};const jZ=["v1","v2","v3"],NZ=["v4"],oT={zero:0,one:1,two:2,few:3,many:4,other:5};function WZ(){const n={};return RZ.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:zZ[e.fc]}})}),n}class GZ{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Df.create("pluralResolver"),(!this.options.compatibilityJSON||NZ.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=WZ()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(l4(e==="dev"?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,t);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>oT[i]-oT[o]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!jZ.includes(this.options.compatibilityJSON)}}function aT(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=TZ(n,e,t);return!o&&i&&typeof t=="string"&&(o=$6(n,t,r),o===void 0&&(o=$6(e,t,r))),o}class $Z{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Df.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:d,formatSeparator:f,unescapeSuffix:C,unescapePrefix:O,nestingPrefix:E,nestingPrefixEscaped:P,nestingSuffix:D,nestingSuffixEscaped:$,nestingOptionsSeparator:H,maxReplaces:Q,alwaysFormat:N}=e.interpolation;this.escape=t!==void 0?t:PZ,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?kg(o):a||"{{",this.suffix=s?kg(s):d||"}}",this.formatSeparator=f||",",this.unescapePrefix=C?"":O||"-",this.unescapeSuffix=this.unescapePrefix?"":C||"",this.nestingPrefix=E?kg(E):P||kg("$t("),this.nestingSuffix=D?kg(D):$||kg(")"),this.nestingOptionsSeparator=H||",",this.maxReplaces=Q||1e3,this.alwaysFormat=N!==void 0?N:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>t&&t.source===r?(t.lastIndex=0,t):new RegExp(r,"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,r,i){let o,a,s;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(D){return D.replace(/\$/g,"$$$$")}const C=D=>{if(D.indexOf(this.formatSeparator)<0){const N=aT(t,d,D,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,r,{...i,...t,interpolationkey:D}):N}const $=D.split(this.formatSeparator),H=$.shift().trim(),Q=$.join(this.formatSeparator).trim();return this.format(aT(t,d,H,this.options.keySeparator,this.options.ignoreJSONStructure),Q,r,{...i,...t,interpolationkey:H})};this.resetRegExp();const O=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,E=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:D=>f(D)},{regex:this.regexp,safeValue:D=>this.escapeValue?f(this.escape(D)):f(D)}].forEach(D=>{for(s=0;o=D.regex.exec(e);){const $=o[1].trim();if(a=C($),a===void 0)if(typeof O=="function"){const Q=O(e,o,i);a=typeof Q=="string"?Q:""}else if(i&&Object.prototype.hasOwnProperty.call(i,$))a="";else if(E){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${$} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=eT(a));const H=D.safeValue(a);if(e=e.replace(o[0],H),E?(D.regex.lastIndex+=a.length,D.regex.lastIndex-=o[0].length):D.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;function s(d,f){const C=this.nestingOptionsSeparator;if(d.indexOf(C)<0)return d;const O=d.split(new RegExp(`${C}[ ]*{`));let E=`{${O[1]}`;d=O[0],E=this.interpolate(E,a);const P=E.match(/'/g),D=E.match(/"/g);(P&&P.length%2===0&&!D||D.length%2!==0)&&(E=E.replace(/'/g,'"'));try{a=JSON.parse(E),f&&(a={...f,...a})}catch($){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,$),`${d}${C}${E}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,d}for(;i=this.nestingRegexp.exec(e);){let d=[];a={...r},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let f=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const C=i[1].split(this.formatSeparator).map(O=>O.trim());i[1]=C.shift(),d=C,f=!0}if(o=t(s.call(this,i[1].trim(),a),a),o&&i[0]===e&&typeof o!="string")return o;typeof o!="string"&&(o=eT(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),o=""),f&&(o=d.reduce((C,O)=>this.format(C,O,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),e=e.replace(i[0],o),this.regexp.lastIndex=0}return e}}function QZ(n){let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...d]=a.split(":"),f=d.join(":").trim().replace(/^'+|'+$/g,""),C=s.trim();t[C]||(t[C]=f),f==="false"&&(t[C]=!1),f==="true"&&(t[C]=!0),isNaN(f)||(t[C]=parseInt(f,10))}})}return{formatName:e,formatOptions:t}}function Tg(n){const e={};return function(r,i,o){const a=i+JSON.stringify(o);let s=e[a];return s||(s=n(l4(i),o),e[a]=s),s(r)}}class YZ{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Df.create("formatter"),this.options=e,this.formats={number:Tg((t,r)=>{const i=new Intl.NumberFormat(t,{...r});return o=>i.format(o)}),currency:Tg((t,r)=>{const i=new Intl.NumberFormat(t,{...r,style:"currency"});return o=>i.format(o)}),datetime:Tg((t,r)=>{const i=new Intl.DateTimeFormat(t,{...r});return o=>i.format(o)}),relativetime:Tg((t,r)=>{const i=new Intl.RelativeTimeFormat(t,{...r});return o=>i.format(o,r.range||"day")}),list:Tg((t,r)=>{const i=new Intl.ListFormat(t,{...r});return o=>i.format(o)})},this.init(e)}init(e){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Tg(t)}format(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((s,d)=>{const{formatName:f,formatOptions:C}=QZ(d);if(this.formats[f]){let O=s;try{const E=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},P=E.locale||E.lng||i.locale||i.lng||r;O=this.formats[f](s,P,{...C,...i,...E})}catch(E){this.logger.warn(E)}return O}else this.logger.warn(`there was no format function for ${f}`);return s},e)}}function qZ(n,e){n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)}class VZ extends X5{constructor(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Df.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(e,t,r,i){const o={},a={},s={},d={};return e.forEach(f=>{let C=!0;t.forEach(O=>{const E=`${f}|${O}`;!r.reload&&this.store.hasResourceBundle(f,O)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?a[E]===void 0&&(a[E]=!0):(this.state[E]=1,C=!1,a[E]===void 0&&(a[E]=!0),o[E]===void 0&&(o[E]=!0),d[O]===void 0&&(d[O]=!0)))}),C||(s[f]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(d)}}loaded(e,t,r){const i=e.split("|"),o=i[0],a=i[1];t&&this.emit("failedLoading",o,a,t),r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const s={};this.queue.forEach(d=>{kZ(d.loaded,[o],a),qZ(d,e),t&&d.errors.push(t),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(f=>{s[f]||(s[f]={});const C=d.loaded[f];C.length&&C.forEach(O=>{s[f][O]===void 0&&(s[f][O]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(d=>!d.done)}read(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(f,C)=>{if(this.readingCalls--,this.waitingReads.length>0){const O=this.waitingReads.shift();this.read(O.lng,O.ns,O.fcName,O.tried,O.wait,O.callback)}if(f&&C&&i