PageSourceSearch

https://newsletter.therealhow.com/assets/i18next-BaeBzRnv.js

js therealhow.com collected 2026-10-05 08:44:06 UTC 47,697 bytes, 5 lines download raw bytes

vendor: 47,580 bytes, lines 1-3
1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c2b6529e-16f5-5de2-ad5f-b8a8ffbe0710")}catch(e){}}();
3var e=e=>typeof e==`string`,t=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},n=e=>e==null?``:``+e,r=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},i=/###/g,a=e=>e&&e.indexOf(`###`)>-1?e.replace(i,`.`):e,o=t=>!t||e(t),s=(t,n,r)=>{let i=e(n)?n.split(`.`):n,s=0;for(;s<i.length-1;){if(o(t))return{};let e=a(i[s]);!t[e]&&r&&(t[e]=new r),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++s}return o(t)?{}:{obj:t,k:a(i[s])}},c=(e,t,n)=>{let{obj:r,k:i}=s(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),c=s(e,o,Object);for(;c.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),c=s(e,o,Object),c&&c.obj&&c.obj[`${c.k}.${a}`]!==void 0&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n},l=(e,t,n,r)=>{let{obj:i,k:a}=s(e,t,Object);i[a]=i[a]||[],i[a].push(n)},u=(e,t)=>{let{obj:n,k:r}=s(e,t);if(n)return n[r]},d=(e,t,n)=>{let r=u(e,n);return r===void 0?u(t,n):r},f=(t,n,r)=>{for(let i in n)i!==`__proto__`&&i!==`constructor`&&(i in t?e(t[i])||t[i]instanceof String||e(n[i])||n[i]instanceof String?r&&(t[i]=n[i]):f(t[i],n[i],r):t[i]=n[i]);return t},p=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),m={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},h=t=>e(t)?t.replace(/[&<>"'\/]/g,e=>m[e]):t,g=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},_=[` `,`,`,`?`,`!`,`;`],v=new g(20),y=(e,t,n)=>{t||=``,n||=``;let r=_.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=v.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},b=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`.`;if(!e)return;if(e[t])return e[t];let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},x=e=>e&&e.replace(`_`,`-`),S={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}},C=new class t{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||`i18next:`,this.logger=e||S,this.options=t,this.debug=t.debug}log(){var e=[...arguments];return this.forward(e,`log`,``,!0)}warn(){var e=[...arguments];return this.forward(e,`warn`,``,!0)}error(){var e=[...arguments];return this.forward(e,`error`,``)}deprecate(){var e=[...arguments];return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(t,n,r,i){return i&&!this.debug?null:(e(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(e){return new t(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e||=this.options,e.prefix=e.prefix||this.prefix,new t(this.logger,e)}},w=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){var t=[...arguments].slice(1);this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[n,r]=e;for(let e=0;e<r;e++)n(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(n=>{let[r,i]=n;for(let n=0;n<i;n++)r.apply(r,[e,...t])})}},T=class extends w{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:[`translation`],defaultNS:`translation`};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=i.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:i.ignoreJSONStructure,s;t.indexOf(`.`)>-1?s=t.split(`.`):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):e(r)&&a?s.push(...r.split(a)):s.push(r)));let c=u(this.data,s);return!c&&!n&&!r&&t.indexOf(`.`)>-1&&(t=s[0],n=s[1],r=s.slice(2).join(`.`)),c||!o||!e(r)?c:b(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),c(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(let i in r)(e(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});i.silent||this.emit(`added`,t,n,r)}addResourceBundle(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=u(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?f(s,n,i):s={...s,...n},c(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.options.compatibilityAPI===`v1`?{...this.getResource(e,t)}: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}},E={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,i))}),t}},D={},O=class t extends w{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),r([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=C.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;let n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator===void 0?this.options.nsSeparator:n.nsSeparator;r===void 0&&(r=`:`);let i=n.keySeparator===void 0?this.options.keySeparator:n.keySeparator,a=n.ns||this.options.defaultNS||[],o=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!y(t,r,i);if(o&&!s){let n=t.match(this.interpolator.nestingRegexp);if(n&&n.length>0)return{key:t,namespaces:e(a)?[a]:a};let o=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(o[0])>-1)&&(a=o.shift()),t=o.join(i)}return{key:t,namespaces:e(a)?[a]:a}}translate(n,r,i){if(typeof r!=`object`&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r==`object`&&(r={...r}),r||={},n==null)return``;Array.isArray(n)||(n=[String(n)]);let a=r.returnDetails===void 0?this.options.returnDetails:r.returnDetails,o=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,{key:s,namespaces:c}=this.extractFromKey(n[n.length-1],r),l=c[c.length-1],u=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()===`cimode`){if(d){let e=r.nsSeparator||this.options.nsSeparator;return a?{res:`${l}${e}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${e}${s}`}return a?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:s}let f=this.resolve(n,r),p=f&&f.res,m=f&&f.usedKey||s,h=f&&f.exactUsedKey||s,g=Object.prototype.toString.apply(p),_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=r.joinArrays===void 0?this.options.joinArrays:r.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=!e(p)&&typeof p!=`boolean`&&typeof p!=`number`;if(y&&p&&b&&_.indexOf(g)<0&&!(e(v)&&Array.isArray(p))){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(m,p,{...r,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(f.res=e,f.usedParams=this.getUsedParamsDetails(r),f):e}if(o){let e=Array.isArray(p),t=e?[]:{},n=e?h:m;for(let e in p)if(Object.prototype.hasOwnProperty.call(p,e)){let i=`${n}${o}${e}`;t[e]=this.translate(i,{...r,joinArrays:!1,ns:c}),t[e]===i&&(t[e]=p[e])}p=t}}else if(y&&e(v)&&Array.isArray(p))p=p.join(v),p&&=this.extendTranslation(p,n,r,i);else{let a=!1,c=!1,d=r.count!==void 0&&!e(r.count),m=t.hasDefaultValue(r),h=d?this.pluralResolver.getSuffix(u,r.count,r):``,g=r.ordinal&&d?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):``,_=d&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),v=_&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${h}`]||r[`defaultValue${g}`]||r.defaultValue;!this.isValidLookup(p)&&m&&(a=!0,p=v),this.isValidLookup(p)||(c=!0,p=s);let y=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&c?void 0:p,b=m&&v!==p&&this.options.updateMissing;if(c||a||b){if(this.logger.log(b?`updateKey`:`missingKey`,u,l,s,b?v:p),o){let e=this.resolve(s,{...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(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);let n=(e,t,n)=>{let i=m&&n!==p?n:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,b,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,b,r),this.emit(`missingKey`,e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&d?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);_&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,r[`defaultValue${t}`]||v)})}):n(e,s,v))}p=this.extendTranslation(p,n,r,f,i),c&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${l}:${s}`),(c||a)&&this.options.parseMissingKeyHandler&&(p=this.options.compatibilityAPI===`v1`?this.options.parseMissingKeyHandler(p):this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,a?p:void 0))}return a?(f.res=p,f.usedParams=this.getUsedParamsDetails(r),f):p}extendTranslation(t,n,r,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});let s=e(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(s){let e=t.match(this.interpolator.nestingRegexp);c=e&&e.length}let l=r.replace&&!e(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),t=this.interpolator.interpolate(t,l,r.lng||this.language||i.usedLng,r),s){let e=t.match(this.interpolator.nestingRegexp),n=e&&e.length;c<n&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!==`v1`&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){var e=[...arguments];return a&&a[0]===e[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${n[0]}`),null):o.translate(...e,n)},r)),r.interpolation&&this.interpolator.reset()}let s=r.postProcess||this.options.postProcess,c=e(s)?[s]:s;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=E.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,a,o,s;return e(t)&&(t=[t]),t.forEach(t=>{if(this.isValidLookup(r))return;let c=this.extractFromKey(t,n),l=c.key;i=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let d=n.count!==void 0&&!e(n.count),f=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(e(n.context)||typeof n.context==`number`)&&n.context!==``,m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);u.forEach(e=>{this.isValidLookup(r)||(s=e,!D[`${m[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(D[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(`, `)}" won't get resolved as namespace "${s}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),m.forEach(t=>{if(this.isValidLookup(r))return;o=t;let i=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,t,e,n);else{let e;d&&(e=this.pluralResolver.getSuffix(t,n.count,n));let r=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(i.push(l+e),n.ordinal&&e.indexOf(a)===0&&i.push(l+e.replace(a,this.options.pluralSeparator)),f&&i.push(l+r)),p){let t=`${l}${this.options.contextSeparator}${n.context}`;i.push(t),d&&(i.push(t+e),n.ordinal&&e.indexOf(a)===0&&i.push(t+e.replace(a,this.options.pluralSeparator)),f&&i.push(t+r))}}let s;for(;s=i.pop();)this.isValidLookup(r)||(a=s,r=this.getResource(t,e,s,n))}))})}),{res:r,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],r=t.replace&&!e(t.replace),i=r?t.replace:t;if(r&&t.count!==void 0&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(let e of n)delete i[e]}return i}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},k=e=>e.charAt(0).toUpperCase()+e.slice(1),A=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=C.create(`languageUtils`)}getScriptPartFromCode(e){if(e=x(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=x(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(t){if(e(t)&&t.indexOf(`-`)>-1){if(typeof Intl<`u`&&Intl.getCanonicalLocales!==void 0)try{let e=Intl.getCanonicalLocales(t)[0];if(e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e)return e}catch{}let e=[`hans`,`hant`,`latn`,`cyrl`,`cans`,`mong`,`arab`],n=t.split(`-`);return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=k(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!==`sgn`&&n[2].length===2&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=k(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=k(n[2].toLowerCase()))),n.join(`-`)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}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(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(e.indexOf(`-`)<0&&n.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&n.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===n||e.indexOf(n)===0&&n.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(t,n){if(!t)return[];if(typeof t==`function`&&(t=t(n)),e(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||=t[this.getScriptPartFromCode(n)],r||=t[this.formatLanguageCode(n)],r||=t[this.getLanguagePartFromCode(n)],r||=t.default,r||[]}toResolveHierarchy(t,n){let r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],a=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return e(t)&&(t.indexOf(`-`)>-1||t.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&a(this.formatLanguageCode(t)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&a(this.getScriptPartFromCode(t)),this.options.load!==`currentOnly`&&a(this.getLanguagePartFromCode(t))):e(t)&&a(this.formatLanguageCode(t)),r.forEach(e=>{i.indexOf(e)<0&&a(this.formatLanguageCode(e))}),i}},j=[{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`.split(`.`),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}],M={1:e=>Number(e>1),2:e=>Number(e!=1),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(e==1?0:e>=2&&e<=4?1:2),7:e=>Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(e==1?0:e==2?1:e!=8&&e!=11?2:3),9:e=>Number(e>=2),10:e=>Number(e==1?0:e==2?1:e<7?2:e<11?3:4),11:e=>Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(e!==0),14:e=>Number(e==1?0:e==2?1:e==3?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:e===0?2:1),17:e=>Number(e==1||e%10==1&&e%100!=11?0:1),18:e=>Number(e==0?0:e==1?1:2),19:e=>Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(e==1?0:e==0||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)},N=[`v1`,`v2`,`v3`],P=[`v4`],F={zero:0,one:1,two:2,few:3,many:4,other:5},I=()=>{let e={};return j.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:M[t.fc]}})}),e},L=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=C.create(`pluralResolver`),(!this.options.compatibilityJSON||P.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=I(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){let n=x(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(!e.match(/-|_/))return;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>F[e]-F[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),``)}getSuffixRetroCompatible(e,t){let n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),r=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r=`plural`:r===1&&(r=``));let i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON===`v1`?r===1?``:typeof r==`number`?`_plural_${r.toString()}`:i():this.options.compatibilityJSON===`v2`||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!N.includes(this.options.compatibilityJSON)}},R=function(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`.`,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=d(t,n,r);return!o&&a&&e(r)&&(o=b(t,r,i),o===void 0&&(o=b(n,r,i))),o},z=e=>e.replace(/\$/g,`$$$$`),B=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=C.create(`interpolator`),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:_,maxReplaces:v,alwaysFormat:y}=e.interpolation;this.escape=t===void 0?h:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?p(i):a||`{{`,this.suffix=o?p(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?p(d):f||p(`$t(`),this.nestingSuffix=m?p(m):g||p(`)`),this.nestingOptionsSeparator=_||`,`,this.maxReplaces=v||1e3,this.alwaysFormat=y===void 0?!1:y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,i,a){let o,s,c,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){let t=R(r,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(t,void 0,i,{...a,...r,interpolationkey:e}):t}let t=e.split(this.formatSeparator),n=t.shift().trim(),o=t.join(this.formatSeparator).trim();return this.format(R(r,l,n,this.options.keySeparator,this.options.ignoreJSONStructure),o,i,{...a,...r,interpolationkey:n})};this.resetRegExp();let d=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,f=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>z(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?z(this.escape(e)):z(e)}].forEach(r=>{for(c=0;o=r.regex.exec(t);){let i=o[1].trim();if(s=u(i),s===void 0)if(typeof d==`function`){let n=d(t,o,a);s=e(n)?n:``}else if(a&&Object.prototype.hasOwnProperty.call(a,i))s=``;else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${i} for interpolating ${t}`),s=``;else !e(s)&&!this.useRawValueToEscape&&(s=n(s));let l=r.safeValue(s);if(t=t.replace(o[0],l),f?(r.regex.lastIndex+=s.length,r.regex.lastIndex-=o[0].length):r.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,o,s,c=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${n}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,s);let a=i.match(/'/g),o=i.match(/"/g);(a&&a.length%2==0&&!o||o.length%2!=0)&&(i=i.replace(/'/g,`"`));try{s=JSON.parse(i),t&&(s={...t,...s})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,e};for(;a=this.nestingRegexp.exec(t);){let l=[];s={...i},s=s.replace&&!e(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){let e=a[1].split(this.formatSeparator).map(e=>e.trim());a[1]=e.shift(),l=e,u=!0}if(o=r(c.call(this,a[1].trim(),s),s),o&&a[0]===t&&!e(o))return o;e(o)||(o=n(o)),o||=(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),``),u&&(o=l.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:a[1].trim()}),o.trim())),t=t.replace(a[0],o),this.regexp.lastIndex=0}return t}},V=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},H=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(x(r),i),t[o]=s),s(n)}},U=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=C.create(`formatter`),this.options=e,this.formats={number:H((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:H((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:H((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:H((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:H((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||`,`}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=H(t)}format(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=V(t);if(this.formats[i]){let t=e;try{let o=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},W=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},G=class extends w{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=C.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{l(n.loaded,[i],a),W(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=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:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=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.`),i&&i();e(t)&&(t=this.languageUtils.toResolveHierarchy(t)),e(n)&&(n=[n]);let a=this.queueLoad(t,n,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend&&this.backend.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},K=()=>({debug:!1,initImmediate:!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:t=>{let n={};if(typeof t[1]==`object`&&(n=t[1]),e(t[1])&&(n.defaultValue=t[1]),e(t[2])&&(n.tDescription=t[2]),typeof t[2]==`object`||typeof t[3]==`object`){let e=t[3]||t[2];Object.keys(e).forEach(t=>{n[t]=e[t]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0}}),q=t=>(e(t.ns)&&(t.ns=[t.ns]),e(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),e(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf(`cimode`)<0&&(t.supportedLngs=t.supportedLngs.concat([`cimode`])),t),J=()=>{},Y=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},X=class n extends w{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=q(e),this.services={},this.logger=C,this.modules={external:[]},Y(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var n=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r==`function`&&(i=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(e(r.ns)?r.defaultNS=r.ns:r.ns.indexOf(`translation`)<0&&(r.defaultNS=r.ns[0]));let a=K();this.options={...a,...this.options,...q(r)},this.options.compatibilityAPI!==`v1`&&(this.options.interpolation={...a.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);let o=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?C.init(o(this.modules.logger),this.options):C.init(null,this.options);let e;this.modules.formatter?e=this.modules.formatter:typeof Intl<`u`&&(e=U);let t=new A(this.options);this.store=new T(this.options.resources,this.options);let r=this.services;r.logger=C,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new L(t,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),e&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(r.formatter=o(e),r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new B(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new G(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on(`*`,function(e){var t=[...arguments].slice(1);n.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on(`*`,function(e){var t=[...arguments].slice(1);n.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,i||=J,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=function(){return n.store[e](...arguments)}}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=function(){return n.store[e](...arguments),n}});let s=t(),c=()=>{let e=(e,t)=>{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),s.resolve(t),i(e,t)};if(this.languages&&this.options.compatibilityAPI!==`v1`&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),s}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J,r=e(t)?t:this.language;if(typeof t==`function`&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload&&this.options.preload.forEach(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,n,r){let i=t();return typeof e==`function`&&(r=e,e=void 0),typeof n==`function`&&(r=n,n=void 0),e||=this.languages,n||=this.options.ns,r||=J,this.services.backendConnector.reload(e,n,e=>{i.resolve(),r(e)}),i}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&E.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].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}}}changeLanguage(n,r){var i=this;this.isLanguageChangingTo=n;let a=t();this.emit(`languageChanging`,n);let o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},s=(e,t)=>{t?(o(t),this.translator.changeLanguage(t),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,t),this.logger.log(`languageChanged`,t)):this.isLanguageChangingTo=void 0,a.resolve(function(){return i.t(...arguments)}),r&&r(e,function(){return i.t(...arguments)})},c=t=>{!n&&!t&&this.services.languageDetector&&(t=[]);let r=e(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);r&&(this.language||o(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(r)),this.loadResources(r,e=>{s(e,r)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n),a}getFixedT(t,n,r){var i=this;let a=function(e,t){let n;if(typeof t!=`object`){var o=[...arguments].slice(2);n=i.options.overloadTranslationOptionHandler([e,t].concat(o))}else n={...t};n.lng=n.lng||a.lng,n.lngs=n.lngs||a.lngs,n.ns=n.ns||a.ns,n.keyPrefix!==``&&(n.keyPrefix=n.keyPrefix||r||a.keyPrefix);let s=i.options.keySeparator||`.`,c;return c=n.keyPrefix&&Array.isArray(e)?e.map(e=>`${n.keyPrefix}${s}${e}`):n.keyPrefix?`${n.keyPrefix}${s}${e}`:e,i.t(c,n)};return e(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?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 n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(n,r){let i=t();return this.options.ns?(e(n)&&(n=[n]),n.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),r&&r(e)}),i):(r&&r(),Promise.resolve())}loadLanguages(n,r){let i=t();e(n)&&(n=[n]);let a=this.options.preload||[],o=n.filter(e=>a.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=a.concat(o),this.loadResources(e=>{i.resolve(),r&&r(e)}),i):(r&&r(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return`rtl`;let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services&&this.services.languageUtils||new A(K());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(){return new n(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J,r=e.forkResourceStore;r&&delete e.forkResourceStore;let i={...this.options,...e,isClone:!0},a=new n(i);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new T(this.store.data,i),a.services.resourceStore=a.store),a.translator=new O(a.services,i),a.translator.on(`*`,function(e){var t=[...arguments].slice(1);a.emit(e,...t)}),a.init(i,t),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},Z=X.createInstance();Z.createInstance=X.createInstance,Z.createInstance,Z.dir,Z.init,Z.loadResources,Z.reloadResources,Z.use,Z.changeLanguage,Z.getFixedT;var Q=Z.t;Z.exists,Z.setDefaultNamespace,Z.hasLoadedNamespace,Z.loadNamespaces,Z.loadLanguages;
3export{Q as n,Z as t};
4//# sourceMappingURL=i18next-BaeBzRnv.js.map
5//# debugId=c2b6529e-16f5-5de2-ad5f-b8a8ffbe0710

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.